iobroker.admin 7.7.1 → 7.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +3 -4
  2. package/adminWww/assets/{AdapterUpdateDialog-Bgswiqs9.js → AdapterUpdateDialog-DHGhgEEq.js} +1 -1
  3. package/adminWww/assets/{Adapters-yQiEeoh8.js → Adapters-CgSIajcF.js} +2 -2
  4. package/adminWww/assets/{Config-C1Gjt8DC.js → Config-BQSl4bfA.js} +1 -1
  5. package/adminWww/assets/{CustomModal-CgEtkfCG.js → CustomModal-DNMTLv4y.js} +1 -1
  6. package/adminWww/assets/{CustomTab-CwioFUor.js → CustomTab-Bl8S8QZW.js} +1 -1
  7. package/adminWww/assets/{DefaultPropsProvider-DxsXuIyE.js → DefaultPropsProvider-u5xB1Fxz.js} +1 -1
  8. package/adminWww/assets/{EasyMode-CN-reJVI.js → EasyMode-xDbqrply.js} +1 -1
  9. package/adminWww/assets/{Enums-8m252lzC.js → Enums-BSICIhWI.js} +1 -1
  10. package/adminWww/assets/{Fields-lI3YkIzQ.js → Fields-C3JkTmfP.js} +1 -1
  11. package/adminWww/assets/{Files-fQpSPYWI.js → Files-DK85-COY.js} +2 -2
  12. package/adminWww/assets/{FilledInput-CKswrNd5.js → FilledInput-CysG4ax_.js} +1 -1
  13. package/adminWww/assets/{Hosts-BPdUlXV5.js → Hosts-qIsB4Gub.js} +2 -2
  14. package/adminWww/assets/Instances-BA_DCzs8.js +2 -0
  15. package/adminWww/assets/{Intro-Dr1-aqO9.js → Intro-00oh6SLw.js} +1 -1
  16. package/adminWww/assets/{Logs-xCCrWV30.js → Logs-Cvpgh-zN.js} +1 -1
  17. package/adminWww/assets/Objects-Dp71iotS.js +60 -0
  18. package/adminWww/assets/{State-nZ6sjU9_.js → State-BqfD2ABf.js} +1 -1
  19. package/adminWww/assets/{Tabs-BJ1rL35Z.js → Tabs-sxfWgN0b.js} +2 -2
  20. package/adminWww/assets/{Users-B0iasrSG.js → Users-CDcWqTfZ.js} +1 -1
  21. package/adminWww/assets/ace-BG5WYul1.js +985 -0
  22. package/adminWww/assets/{blueGrey-D-KQaGde.js → blueGrey-DYsiMDOn.js} +1 -1
  23. package/adminWww/assets/{bootstrap-DDrI3lVl.js → bootstrap-BYQTdf9r.js} +91 -103
  24. package/adminWww/assets/{createSvgIcon-DuKI6CvW.js → createSvgIcon-Bh3KWtyp.js} +1 -1
  25. package/adminWww/assets/{emotion-react.browser.esm-DApPKwaj.js → emotion-react.browser.esm-BCDt9NrH.js} +1 -1
  26. package/adminWww/assets/{emotion-styled.browser.esm-Dc05hmeu.js → emotion-styled.browser.esm-CyFqGgyG.js} +1 -1
  27. package/adminWww/assets/{emotion-utils.browser.esm-DOjH6Olm.js → emotion-utils.browser.esm-pglN4_eI.js} +1 -1
  28. package/adminWww/assets/{geosearch.module-CWfRtxrN.js → geosearch.module-DH4NhiPj.js} +1 -1
  29. package/adminWww/assets/hostInit-fzxL8JAx.js +1 -1
  30. package/adminWww/assets/{iconBase-CgxZ5MMC.js → iconBase-C3vi24ZE.js} +1 -1
  31. package/adminWww/assets/{index-BmWdDCX_.js → index-B1ITPhEY.js} +2 -2
  32. package/adminWww/assets/{index-D7Rlw-5R.js → index-D--ojYan.js} +1 -1
  33. package/adminWww/assets/{index-BjVqnwqt.js → index-D3IAEXXP.js} +1 -1
  34. package/adminWww/assets/{index-HOidq_rM.js → index-DPDg2YA0.js} +1 -1
  35. package/adminWww/assets/{index-Bsv_DXxB.js → index-DTGUg51P.js} +1 -1
  36. package/adminWww/assets/{index-BP5kWU3L.js → index-Qa7Q_Dz5.js} +1 -1
  37. package/adminWww/assets/{index-RvHSqeMD.js → index-qcIeekse.js} +13 -13
  38. package/adminWww/assets/{index-gHyOgbGJ.js → index-rKfs-rCa.js} +1 -1
  39. package/adminWww/assets/{index-DH1kmwK1.js → index-wN1ZlPSW.js} +2 -2
  40. package/adminWww/assets/iobroker_admin__loadShare___mf_0_emotion_mf_1_react__loadShare__-BOKYvG_W.js +1 -0
  41. package/adminWww/assets/{iobroker_admin__loadShare__leaflet__loadShare__-B1OZ7tj-.js → iobroker_admin__loadShare__leaflet__loadShare__-h9SMNPLU.js} +1 -1
  42. package/adminWww/assets/iobroker_admin__loadShare__prop_mf_2_types__loadShare__-BnsS7SOQ.js +1 -0
  43. package/adminWww/assets/{iobroker_admin__loadShare__react__loadShare__-DtlEM_52.js → iobroker_admin__loadShare__react__loadShare__-Bis6NHgw.js} +1 -1
  44. package/adminWww/assets/iobroker_admin__mf_v__runtimeInit__mf_v__-CTkuGOOk.js +5 -0
  45. package/adminWww/assets/{sentry-CNy_SQq1.js → sentry-H_UdJ2zx.js} +1 -1
  46. package/adminWww/assets/{zh-cn-DZTx1vAh.js → zh-cn-vvAC9zpl.js} +3 -3
  47. package/adminWww/index.html +2 -2
  48. package/adminWww/mf-manifest.json +1 -1
  49. package/adminWww/remoteEntry.js +2 -2
  50. package/adminWww/static/js/worker-javascript.js +1 -1
  51. package/adminWww/static/js/worker-yaml.js +1 -1
  52. package/io-package.json +14 -14
  53. package/package.json +10 -9
  54. package/adminWww/assets/Instances-BStmfz4r.js +0 -2
  55. package/adminWww/assets/Objects-BF8brXaf.js +0 -60
  56. package/adminWww/assets/ace-CFIUQz8j.js +0 -970
  57. package/adminWww/assets/iobroker_admin__loadShare___mf_0_emotion_mf_1_react__loadShare__-gw2iqPBS.js +0 -1
  58. package/adminWww/assets/iobroker_admin__loadShare__prop_mf_2_types__loadShare__-BGyJCibC.js +0 -1
  59. package/adminWww/assets/iobroker_admin__mf_v__runtimeInit__mf_v__-VDoBF19b.js +0 -10
  60. package/build-backend/src/lib/checkLinuxPass.js +0 -280
  61. package/build-backend/src/lib/checkLinuxPass.js.map +0 -1
  62. package/build-backend/src/lib/testPassword.js +0 -58
  63. package/build-backend/src/lib/testPassword.js.map +0 -1
  64. package/build-backend/src/lib/translations.js +0 -27
  65. package/build-backend/src/lib/translations.js.map +0 -1
  66. package/build-backend/src/lib/utils.js +0 -344
  67. package/build-backend/src/lib/utils.js.map +0 -1
  68. package/build-backend/src/lib/web.js +0 -1165
  69. package/build-backend/src/lib/web.js.map +0 -1
  70. package/build-backend/src/main.js +0 -1704
  71. package/build-backend/src/main.js.map +0 -1
  72. package/build-backend/src-admin/src/components/Adapters/Utils.js +0 -39
  73. package/build-backend/src-admin/src/components/Adapters/Utils.js.map +0 -1
@@ -1,970 +0,0 @@
1
- var ye={exports:{}};(function(pe,$e){(function(){var k="ace",x=function(){return this}();!x&&typeof window<"u"&&(x=window);var z=function(n,r,i){if(typeof n!="string"){z.original?z.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(i=r),z.modules[n]||(z.payloads[n]=i,z.modules[n]=null)};z.modules={},z.payloads={};var T=function(n,r,i){if(typeof r=="string"){var t=a(n,r);if(t!=null)return i&&i(),t}else if(Object.prototype.toString.call(r)==="[object Array]"){for(var e=[],o=0,s=r.length;o<s;++o){var c=a(n,r[o]);if(c==null&&A.original)return;e.push(c)}return i&&i.apply(null,e)||!0}},A=function(n,r){var i=T("",n,r);return i==null&&A.original?A.original.apply(this,arguments):i},$=function(n,r){if(r.indexOf("!")!==-1){var i=r.split("!");return $(n,i[0])+"!"+$(n,i[1])}if(r.charAt(0)=="."){var t=n.split("/").slice(0,-1).join("/");for(r=t+"/"+r;r.indexOf(".")!==-1&&e!=r;){var e=r;r=r.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return r},a=function(n,r){r=$(n,r);var i=z.modules[r];if(!i){if(i=z.payloads[r],typeof i=="function"){var t={},e={id:r,uri:"",exports:t,packaged:!0},o=function(c,u){return T(r,c,u)},s=i(o,t,e);t=s||e.exports,z.modules[r]=t,delete z.payloads[r]}i=z.modules[r]=t||i}return i};function h(n){var r=x;x[n]||(x[n]={}),r=x[n],(!r.define||!r.define.packaged)&&(z.original=r.define,r.define=z,r.define.packaged=!0),(!r.require||!r.require.packaged)&&(A.original=r.require,r.require=A,r.require.packaged=!0)}h(k)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(k,x,z){function T(A,$,a){Object.defineProperty(A,$,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||T(String.prototype,"startsWith",function(A,$){return $=$||0,this.lastIndexOf(A,$)===$}),String.prototype.endsWith||T(String.prototype,"endsWith",function(A,$){var a=this;($===void 0||$>a.length)&&($=a.length),$-=A.length;var h=a.indexOf(A,$);return h!==-1&&h===$}),String.prototype.repeat||T(String.prototype,"repeat",function(A){for(var $="",a=this;A>0;)A&1&&($+=a),(A>>=1)&&(a+=a);return $}),String.prototype.includes||T(String.prototype,"includes",function(A,$){return this.indexOf(A,$)!=-1}),Object.assign||(Object.assign=function(A){if(A==null)throw new TypeError("Cannot convert undefined or null to object");for(var $=Object(A),a=1;a<arguments.length;a++){var h=arguments[a];h!=null&&Object.keys(h).forEach(function(n){$[n]=h[n]})}return $}),Object.values||(Object.values=function(A){return Object.keys(A).map(function($){return A[$]})}),Array.prototype.find||T(Array.prototype,"find",function(A){for(var $=this.length,a=arguments[1],h=0;h<$;h++){var n=this[h];if(A.call(a,n,h,this))return n}}),Array.prototype.findIndex||T(Array.prototype,"findIndex",function(A){for(var $=this.length,a=arguments[1],h=0;h<$;h++){var n=this[h];if(A.call(a,n,h,this))return h}}),Array.prototype.includes||T(Array.prototype,"includes",function(A,$){return this.indexOf(A,$)!=-1}),Array.prototype.fill||T(Array.prototype,"fill",function(A){for(var $=this,a=$.length>>>0,h=arguments[1],n=h>>0,r=n<0?Math.max(a+n,0):Math.min(n,a),i=arguments[2],t=i===void 0?a:i>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);r<e;)$[r]=A,r++;return $}),Array.of||T(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(k,x,z){k("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(k,x,z){x.deepCopy=function T(A){if(typeof A!="object"||!A)return A;var $;if(Array.isArray(A)){$=[];for(var a=0;a<A.length;a++)$[a]=T(A[a]);return $}if(Object.prototype.toString.call(A)!=="[object Object]")return A;$={};for(var a in A)$[a]=T(A[a]);return $}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(k,x,z){x.last=function($){return $[$.length-1]},x.stringReverse=function($){return $.split("").reverse().join("")},x.stringRepeat=function($,a){for(var h="";a>0;)a&1&&(h+=$),(a>>=1)&&($+=$);return h};var T=/^\s\s*/,A=/\s\s*$/;x.stringTrimLeft=function($){return $.replace(T,"")},x.stringTrimRight=function($){return $.replace(A,"")},x.copyObject=function($){var a={};for(var h in $)a[h]=$[h];return a},x.copyArray=function($){for(var a=[],h=0,n=$.length;h<n;h++)$[h]&&typeof $[h]=="object"?a[h]=this.copyObject($[h]):a[h]=$[h];return a},x.deepCopy=k("./deep_copy").deepCopy,x.arrayToMap=function($){for(var a={},h=0;h<$.length;h++)a[$[h]]=1;return a},x.createMap=function($){var a=Object.create(null);for(var h in $)a[h]=$[h];return a},x.arrayRemove=function($,a){for(var h=0;h<=$.length;h++)a===$[h]&&$.splice(h,1)},x.escapeRegExp=function($){return $.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},x.escapeHTML=function($){return(""+$).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},x.getMatchOffsets=function($,a){var h=[];return $.replace(a,function(n){h.push({offset:arguments[arguments.length-2],length:n.length})}),h},x.deferredCall=function($){var a=null,h=function(){a=null,$()},n=function(r){return n.cancel(),a=setTimeout(h,r||0),n};return n.schedule=n,n.call=function(){return this.cancel(),$(),n},n.cancel=function(){return clearTimeout(a),a=null,n},n.isPending=function(){return a},n},x.delayedCall=function($,a){var h=null,n=function(){h=null,$()},r=function(i){h==null&&(h=setTimeout(n,i||a))};return r.delay=function(i){h&&clearTimeout(h),h=setTimeout(n,i||a)},r.schedule=r,r.call=function(){this.cancel(),$()},r.cancel=function(){h&&clearTimeout(h),h=null},r.isPending=function(){return h},r},x.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},x.skipEmptyMatch=function($,a,h){return h&&$.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(k,x,z){x.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},x.getOS=function(){return x.isMac?x.OS.MAC:x.isLinux?x.OS.LINUX:x.OS.WINDOWS};var T=typeof navigator=="object"?navigator:{},A=(/mac|win|linux/i.exec(T.platform)||["other"])[0].toLowerCase(),$=T.userAgent||"",a=T.appName||"";x.isWin=A=="win",x.isMac=A=="mac",x.isLinux=A=="linux",x.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat(($.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat(($.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),x.isOldIE=x.isIE&&x.isIE<9,x.isGecko=x.isMozilla=$.match(/ Gecko\/\d+/),x.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",x.isWebKit=parseFloat($.split("WebKit/")[1])||void 0,x.isChrome=parseFloat($.split(" Chrome/")[1])||void 0,x.isSafari=parseFloat($.split(" Safari/")[1])&&!x.isChrome||void 0,x.isEdge=parseFloat($.split(" Edge/")[1])||void 0,x.isAIR=$.indexOf("AdobeAIR")>=0,x.isAndroid=$.indexOf("Android")>=0,x.isChromeOS=$.indexOf(" CrOS ")>=0,x.isIOS=/iPad|iPhone|iPod/.test($)&&!window.MSStream,x.isIOS&&(x.isMac=!0),x.isMobile=x.isIOS||x.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(k,x,z){var T=k("./useragent"),A="http://www.w3.org/1999/xhtml";x.buildDom=function i(t,e,o){if(typeof t=="string"&&t){var s=document.createTextNode(t);return e&&e.appendChild(s),s}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var c=[],u=0;u<t.length;u++){var y=i(t[u],e,o);y&&c.push(y)}return c}var m=document.createElement(t[0]),p=t[1],g=1;p&&typeof p=="object"&&!Array.isArray(p)&&(g=2);for(var u=g;u<t.length;u++)i(t[u],m,o);return g==2&&Object.keys(p).forEach(function(w){var L=p[w];w==="class"?m.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||w=="value"||w[0]=="$"?m[w]=L:w==="ref"?o&&(o[L]=m):w==="style"?typeof L=="string"&&(m.style.cssText=L):L!=null&&m.setAttribute(w,L)}),e&&e.appendChild(m),m},x.getDocumentHead=function(i){return i||(i=document),i.head||i.getElementsByTagName("head")[0]||i.documentElement},x.createElement=function(i,t){return document.createElementNS?document.createElementNS(t||A,i):document.createElement(i)},x.removeChildren=function(i){i.innerHTML=""},x.createTextNode=function(i,t){var e=t?t.ownerDocument:document;return e.createTextNode(i)},x.createFragment=function(i){var t=i?i.ownerDocument:document;return t.createDocumentFragment()},x.hasCssClass=function(i,t){var e=(i.className+"").split(/\s+/g);return e.indexOf(t)!==-1},x.addCssClass=function(i,t){x.hasCssClass(i,t)||(i.className+=" "+t)},x.removeCssClass=function(i,t){for(var e=i.className.split(/\s+/g);;){var o=e.indexOf(t);if(o==-1)break;e.splice(o,1)}i.className=e.join(" ")},x.toggleCssClass=function(i,t){for(var e=i.className.split(/\s+/g),o=!0;;){var s=e.indexOf(t);if(s==-1)break;o=!1,e.splice(s,1)}return o&&e.push(t),i.className=e.join(" "),o},x.setCssClass=function(i,t,e){e?x.addCssClass(i,t):x.removeCssClass(i,t)},x.hasCssString=function(i,t){var e=0,o;if(t=t||document,o=t.querySelectorAll("style")){for(;e<o.length;)if(o[e++].id===i)return!0}},x.removeElementById=function(i,t){t=t||document,t.getElementById(i)&&t.getElementById(i).remove()};var $,a=[];x.useStrictCSP=function(i){$=i,i==!1?h():a||(a=[])};function h(){var i=a;a=null,i&&i.forEach(function(t){n(t[0],t[1])})}function n(i,t,e){if(!(typeof document>"u")){if(a){if(e)h();else if(e===!1)return a.push([i,t])}if(!$){var o=e;!e||!e.getRootNode?o=document:(o=e.getRootNode(),(!o||o==e)&&(o=document));var s=o.ownerDocument||o;if(t&&x.hasCssString(t,o))return null;t&&(i+=`
2
- /*# sourceURL=ace/css/`+t+" */");var c=x.createElement("style");c.appendChild(s.createTextNode(i)),t&&(c.id=t),o==s&&(o=x.getDocumentHead(s)),o.insertBefore(c,o.firstChild)}}}if(x.importCssString=n,x.importCssStylsheet=function(i,t){x.buildDom(["link",{rel:"stylesheet",href:i}],x.getDocumentHead(t))},x.scrollbarWidth=function(i){var t=x.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=x.createElement("ace_outer"),o=e.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",e.appendChild(t);var s=i&&i.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(e);var c=t.offsetWidth;o.overflow="scroll";var u=t.offsetWidth;return c===u&&(u=e.clientWidth),s.removeChild(e),c-u},x.computedStyle=function(i,t){return window.getComputedStyle(i,"")||{}},x.setStyle=function(i,t,e){i[t]!==e&&(i[t]=e)},x.HAS_CSS_ANIMATION=!1,x.HAS_CSS_TRANSFORMS=!1,x.HI_DPI=T.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,T.isChromeOS&&(x.HI_DPI=!1),typeof document<"u"){var r=document.createElement("div");x.HI_DPI&&r.style.transform!==void 0&&(x.HAS_CSS_TRANSFORMS=!0),!T.isEdge&&typeof r.style.animationName<"u"&&(x.HAS_CSS_ANIMATION=!0),r=null}x.HAS_CSS_TRANSFORMS?x.translate=function(i,t,e){i.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:x.translate=function(i,t,e){i.style.top=Math.round(e)+"px",i.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(k,x,z){/*
3
- * based on code from:
4
- *
5
- * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
6
- * Available via the MIT or new BSD license.
7
- * see: http://github.com/jrburke/requirejs for details
8
- */var T=k("./dom");x.get=function(A,$){var a=new XMLHttpRequest;a.open("GET",A,!0),a.onreadystatechange=function(){a.readyState===4&&$(a.responseText)},a.send(null)},x.loadScript=function(A,$){var a=T.getDocumentHead(),h=document.createElement("script");h.src=A,a.appendChild(h),h.onload=h.onreadystatechange=function(n,r){(r||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,r||$())}},x.qualifyURL=function(A){var $=document.createElement("a");return $.href=A,$.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(k,x,z){x.inherits=function(T,A){T.super_=A,T.prototype=Object.create(A.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}})},x.mixin=function(T,A){for(var $ in A)T[$]=A[$];return T},x.implement=function(T,A){x.mixin(T,A)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(k,x,z){var T={},A=function(){this.propagationStopped=!0},$=function(){this.defaultPrevented=!0};T._emit=T._dispatchEvent=function(a,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[a]||[],r=this._defaultHandlers[a];if(!(!n.length&&!r)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=a),h.stopPropagation||(h.stopPropagation=A),h.preventDefault||(h.preventDefault=$),n=n.slice();for(var i=0;i<n.length&&(n[i](h,this),!h.propagationStopped);i++);if(r&&!h.defaultPrevented)return r(h,this)}},T._signal=function(a,h){var n=(this._eventRegistry||{})[a];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](h,this)}},T.once=function(a,h){var n=this;if(this.on(a,function r(){n.off(a,r),h.apply(null,arguments)}),!h)return new Promise(function(r){h=r})},T.setDefaultHandler=function(a,h){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[a]){var r=n[a],i=n._disabled_[a];i||(n._disabled_[a]=i=[]),i.push(r);var t=i.indexOf(h);t!=-1&&i.splice(t,1)}n[a]=h},T.removeDefaultHandler=function(a,h){var n=this._defaultHandlers;if(n){var r=n._disabled_[a];if(n[a]==h)r&&this.setDefaultHandler(a,r.pop());else if(r){var i=r.indexOf(h);i!=-1&&r.splice(i,1)}}},T.on=T.addEventListener=function(a,h,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[a];return r||(r=this._eventRegistry[a]=[]),r.indexOf(h)==-1&&r[n?"unshift":"push"](h),h},T.off=T.removeListener=T.removeEventListener=function(a,h){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[a];if(n){var r=n.indexOf(h);r!==-1&&n.splice(r,1)}},T.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},x.EventEmitter=T}),ace.define("ace/lib/report_error",["require","exports","module"],function(k,x,z){x.reportError=function(A,$){var a=new Error(A);a.data=$,typeof console=="object"&&console.error&&console.error(a),setTimeout(function(){throw a})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(k,x,z){var T={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions"};x.defaultEnglishMessages=T}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(k,x,z){"no use strict";var T=k("./oop"),A=k("./event_emitter").EventEmitter,$=k("./report_error").reportError,a=k("./default_english_messages").defaultEnglishMessages,h={setOptions:function(e){Object.keys(e).forEach(function(o){this.setOption(o,e[o])},this)},getOptions:function(e){var o={};if(e)Array.isArray(e)||(o=e,e=Object.keys(o));else{var s=this.$options;e=Object.keys(s).filter(function(c){return!s[c].hidden})}return e.forEach(function(c){o[c]=this.getOption(c)},this),o},setOption:function(e,o){if(this["$"+e]!==o){var s=this.$options[e];if(!s)return n('misspelled option "'+e+'"');if(s.forwardTo)return this[s.forwardTo]&&this[s.forwardTo].setOption(e,o);s.handlesSet||(this["$"+e]=o),s&&s.set&&s.set.call(this,o)}},getOption:function(e){var o=this.$options[e];return o?o.forwardTo?this[o.forwardTo]&&this[o.forwardTo].getOption(e):o&&o.get?o.get.call(this):this["$"+e]:n('misspelled option "'+e+'"')}};function n(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var r,i,t=function(){function e(){this.$defaultOptions={},r=a,i="dollarSigns"}return e.prototype.defineOptions=function(o,s,c){return o.$options||(this.$defaultOptions[s]=o.$options={}),Object.keys(c).forEach(function(u){var y=c[u];typeof y=="string"&&(y={forwardTo:y}),y.name||(y.name=u),o.$options[y.name]=y,"initialValue"in y&&(o["$"+y.name]=y.initialValue)}),T.implement(o,h),this},e.prototype.resetOptions=function(o){Object.keys(o.$options).forEach(function(s){var c=o.$options[s];"value"in c&&o.setOption(s,c.value)})},e.prototype.setDefaultValue=function(o,s,c){if(!o){for(o in this.$defaultOptions)if(this.$defaultOptions[o][s])break;if(!this.$defaultOptions[o][s])return!1}var u=this.$defaultOptions[o]||(this.$defaultOptions[o]={});u[s]&&(u.forwardTo?this.setDefaultValue(u.forwardTo,s,c):u[s].value=c)},e.prototype.setDefaultValues=function(o,s){Object.keys(s).forEach(function(c){this.setDefaultValue(o,c,s[c])},this)},e.prototype.setMessages=function(o,s){r=o,s&&s.placeholders&&(i=s.placeholders)},e.prototype.nls=function(o,s,c){r[o]||(n("No message found for the key '"+o+"' in messages with id "+r.$id+", trying to find a translation for the default string '"+s+"'."),r[s]||n("No message found for the default string '"+s+"' in the provided messages. Falling back to the default English message."));var u=r[o]||r[s]||s;return c&&(i==="dollarSigns"&&(u=u.replace(/\$(\$|[\d]+)/g,function(y,m){return m=="$"?"$":c[m]})),i==="curlyBrackets"&&(u=u.replace(/\{([^\}]+)\}/g,function(y,m){return c[m]}))),u},e}();t.prototype.warn=n,t.prototype.reportError=$,T.implement(t.prototype,A),x.AppConfig=t}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(k,x,z){z.exports=`.ace-tm .ace_gutter {
9
- background: #f0f0f0;
10
- color: #333;
11
- }
12
-
13
- .ace-tm .ace_print-margin {
14
- width: 1px;
15
- background: #e8e8e8;
16
- }
17
-
18
- .ace-tm .ace_fold {
19
- background-color: #6B72E6;
20
- }
21
-
22
- .ace-tm {
23
- background-color: #FFFFFF;
24
- color: black;
25
- }
26
-
27
- .ace-tm .ace_cursor {
28
- color: black;
29
- }
30
-
31
- .ace-tm .ace_invisible {
32
- color: rgb(191, 191, 191);
33
- }
34
-
35
- .ace-tm .ace_storage,
36
- .ace-tm .ace_keyword {
37
- color: blue;
38
- }
39
-
40
- .ace-tm .ace_constant {
41
- color: rgb(197, 6, 11);
42
- }
43
-
44
- .ace-tm .ace_constant.ace_buildin {
45
- color: rgb(88, 72, 246);
46
- }
47
-
48
- .ace-tm .ace_constant.ace_language {
49
- color: rgb(88, 92, 246);
50
- }
51
-
52
- .ace-tm .ace_constant.ace_library {
53
- color: rgb(6, 150, 14);
54
- }
55
-
56
- .ace-tm .ace_invalid {
57
- background-color: rgba(255, 0, 0, 0.1);
58
- color: red;
59
- }
60
-
61
- .ace-tm .ace_support.ace_function {
62
- color: rgb(60, 76, 114);
63
- }
64
-
65
- .ace-tm .ace_support.ace_constant {
66
- color: rgb(6, 150, 14);
67
- }
68
-
69
- .ace-tm .ace_support.ace_type,
70
- .ace-tm .ace_support.ace_class {
71
- color: rgb(109, 121, 222);
72
- }
73
-
74
- .ace-tm .ace_keyword.ace_operator {
75
- color: rgb(104, 118, 135);
76
- }
77
-
78
- .ace-tm .ace_string {
79
- color: rgb(3, 106, 7);
80
- }
81
-
82
- .ace-tm .ace_comment {
83
- color: rgb(76, 136, 107);
84
- }
85
-
86
- .ace-tm .ace_comment.ace_doc {
87
- color: rgb(0, 102, 255);
88
- }
89
-
90
- .ace-tm .ace_comment.ace_doc.ace_tag {
91
- color: rgb(128, 159, 191);
92
- }
93
-
94
- .ace-tm .ace_constant.ace_numeric {
95
- color: rgb(0, 0, 205);
96
- }
97
-
98
- .ace-tm .ace_variable {
99
- color: rgb(49, 132, 149);
100
- }
101
-
102
- .ace-tm .ace_xml-pe {
103
- color: rgb(104, 104, 91);
104
- }
105
-
106
- .ace-tm .ace_entity.ace_name.ace_function {
107
- color: #0000A2;
108
- }
109
-
110
-
111
- .ace-tm .ace_heading {
112
- color: rgb(12, 7, 255);
113
- }
114
-
115
- .ace-tm .ace_list {
116
- color:rgb(185, 6, 144);
117
- }
118
-
119
- .ace-tm .ace_meta.ace_tag {
120
- color:rgb(0, 22, 142);
121
- }
122
-
123
- .ace-tm .ace_string.ace_regex {
124
- color: rgb(255, 0, 0)
125
- }
126
-
127
- .ace-tm .ace_marker-layer .ace_selection {
128
- background: rgb(181, 213, 255);
129
- }
130
- .ace-tm.ace_multiselect .ace_selection.ace_start {
131
- box-shadow: 0 0 3px 0px white;
132
- }
133
- .ace-tm .ace_marker-layer .ace_step {
134
- background: rgb(252, 255, 0);
135
- }
136
-
137
- .ace-tm .ace_marker-layer .ace_stack {
138
- background: rgb(164, 229, 101);
139
- }
140
-
141
- .ace-tm .ace_marker-layer .ace_bracket {
142
- margin: -1px 0 0 -1px;
143
- border: 1px solid rgb(192, 192, 192);
144
- }
145
-
146
- .ace-tm .ace_marker-layer .ace_active-line {
147
- background: rgba(0, 0, 0, 0.07);
148
- }
149
-
150
- .ace-tm .ace_gutter-active-line {
151
- background-color : #dcdcdc;
152
- }
153
-
154
- .ace-tm .ace_marker-layer .ace_selected-word {
155
- background: rgb(250, 250, 255);
156
- border: 1px solid rgb(200, 200, 250);
157
- }
158
-
159
- .ace-tm .ace_indent-guide {
160
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
161
- }
162
-
163
- .ace-tm .ace_indent-guide-active {
164
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
165
- }
166
- `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(k,x,z){x.isDark=!1,x.cssClass="ace-tm",x.cssText=k("./textmate-css"),x.$id="ace/theme/textmate";var T=k("../lib/dom");T.importCssString(x.cssText,x.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(k,x,z){"no use strict";var T=k("./lib/lang"),A=k("./lib/net"),$=k("./lib/dom"),a=k("./lib/app_config").AppConfig;z.exports=x=new a;var h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};x.get=function(t){if(!h.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return h[t]},x.set=function(t,e){if(h.hasOwnProperty(t))h[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&$.useStrictCSP(e)},x.all=function(){return T.copyObject(h)},x.$modes={},x.moduleUrl=function(t,e){if(h.$moduleUrls[t])return h.$moduleUrls[t];var o=t.split("/");e=e||o[o.length-2]||"";var s=e=="snippets"?"/":"-",c=o[o.length-1];if(e=="worker"&&s=="-"){var u=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");c=c.replace(u,"")}(!c||c==e)&&o.length>1&&(c=o[o.length-2]);var y=h[e+"Path"];return y==null?y=h.basePath:s=="/"&&(e=s=""),y&&y.slice(-1)!="/"&&(y+="/"),y+e+s+c+this.get("suffix")},x.setModuleUrl=function(t,e){return h.$moduleUrls[t]=e};var n=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,k("./theme/textmate"));if(r)return r(t,e);console.error("loader is not configured")},r;x.setLoader=function(t){r=t},x.dynamicModules=Object.create(null),x.$loading={},x.$loaded={},x.loadModule=function(t,e){var o;if(Array.isArray(t))var s=t[0],c=t[1];else if(typeof t=="string")var c=t;var u=function(y){if(y&&!x.$loading[c])return e&&e(y);if(x.$loading[c]||(x.$loading[c]=[]),x.$loading[c].push(e),!(x.$loading[c].length>1)){var m=function(){n(c,function(p,g){g&&(x.$loaded[c]=g),x._emit("load.module",{name:c,module:g});var w=x.$loading[c];x.$loading[c]=null,w.forEach(function(L){L&&L(g)})})};if(!x.get("packaged"))return m();A.loadScript(x.moduleUrl(c,s),m),i()}};if(x.dynamicModules[c])x.dynamicModules[c]().then(function(y){y.default?u(y.default):u(y)});else{try{o=this.$require(c)}catch{}u(o||x.$loaded[c])}},x.$require=function(t){if(typeof z.require=="function"){var e="require";return z[e](t)}},x.setModuleLoader=function(t,e){x.dynamicModules[t]=e};var i=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),i=function(){})};x.version="1.37.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(k,x,z){k("./lib/fixoldbrowsers");var T=k("./config");T.setLoader(function(h,n){k([h],function(r){n(null,r)})});var A=function(){return this||typeof window<"u"&&window}();z.exports=function(h){T.init=$,T.$require=k,h.require=k},$(!0);function $(h){if(!(!A||!A.document)){T.set("packaged",h||k.packaged||z.packaged||A.define&&(void 0).packaged);var n={},r="",i=document.currentScript||document._currentScript,t=i&&i.ownerDocument||document;i&&i.src&&(r=i.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),o=0;o<e.length;o++){var s=e[o],c=s.src||s.getAttribute("src");if(c){for(var u=s.attributes,y=0,m=u.length;y<m;y++){var p=u[y];p.name.indexOf("data-ace-")===0&&(n[a(p.name.replace(/^data-ace-/,""))]=p.value)}var g=c.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);g&&(r=g[1])}}r&&(n.base=n.base||r,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base;for(var w in n)typeof n[w]<"u"&&T.set(w,n[w])}}function a(h){return h.replace(/-(.)/g,function(n,r){return r.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(k,x,z){var T=function(){function A($,a,h,n){this.start={row:$,column:a},this.end={row:h,column:n}}return A.prototype.isEqual=function($){return this.start.row===$.start.row&&this.end.row===$.end.row&&this.start.column===$.start.column&&this.end.column===$.end.column},A.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},A.prototype.contains=function($,a){return this.compare($,a)==0},A.prototype.compareRange=function($){var a,h=$.end,n=$.start;return a=this.compare(h.row,h.column),a==1?(a=this.compare(n.row,n.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(n.row,n.column),a==-1?-1:a==1?42:0)},A.prototype.comparePoint=function($){return this.compare($.row,$.column)},A.prototype.containsRange=function($){return this.comparePoint($.start)==0&&this.comparePoint($.end)==0},A.prototype.intersects=function($){var a=this.compareRange($);return a==-1||a==0||a==1},A.prototype.isEnd=function($,a){return this.end.row==$&&this.end.column==a},A.prototype.isStart=function($,a){return this.start.row==$&&this.start.column==a},A.prototype.setStart=function($,a){typeof $=="object"?(this.start.column=$.column,this.start.row=$.row):(this.start.row=$,this.start.column=a)},A.prototype.setEnd=function($,a){typeof $=="object"?(this.end.column=$.column,this.end.row=$.row):(this.end.row=$,this.end.column=a)},A.prototype.inside=function($,a){return this.compare($,a)==0?!(this.isEnd($,a)||this.isStart($,a)):!1},A.prototype.insideStart=function($,a){return this.compare($,a)==0?!this.isEnd($,a):!1},A.prototype.insideEnd=function($,a){return this.compare($,a)==0?!this.isStart($,a):!1},A.prototype.compare=function($,a){return!this.isMultiLine()&&$===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:$<this.start.row?-1:$>this.end.row?1:this.start.row===$?a>=this.start.column?0:-1:this.end.row===$?a<=this.end.column?0:1:0},A.prototype.compareStart=function($,a){return this.start.row==$&&this.start.column==a?-1:this.compare($,a)},A.prototype.compareEnd=function($,a){return this.end.row==$&&this.end.column==a?1:this.compare($,a)},A.prototype.compareInside=function($,a){return this.end.row==$&&this.end.column==a?1:this.start.row==$&&this.start.column==a?-1:this.compare($,a)},A.prototype.clipRows=function($,a){if(this.end.row>a)var h={row:a+1,column:0};else if(this.end.row<$)var h={row:$,column:0};if(this.start.row>a)var n={row:a+1,column:0};else if(this.start.row<$)var n={row:$,column:0};return A.fromPoints(n||this.start,h||this.end)},A.prototype.extend=function($,a){var h=this.compare($,a);if(h==0)return this;if(h==-1)var n={row:$,column:a};else var r={row:$,column:a};return A.fromPoints(n||this.start,r||this.end)},A.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},A.prototype.isMultiLine=function(){return this.start.row!==this.end.row},A.prototype.clone=function(){return A.fromPoints(this.start,this.end)},A.prototype.collapseRows=function(){return this.end.column==0?new A(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new A(this.start.row,0,this.end.row,0)},A.prototype.toScreenRange=function($){var a=$.documentToScreenPosition(this.start),h=$.documentToScreenPosition(this.end);return new A(a.row,a.column,h.row,h.column)},A.prototype.moveBy=function($,a){this.start.row+=$,this.start.column+=a,this.end.row+=$,this.end.column+=a},A}();T.fromPoints=function(A,$){return new T(A.row,A.column,$.row,$.column)},T.comparePoints=function(A,$){return A.row-$.row||A.column-$.column},x.Range=T}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(k,x,z){for(var T=k("./oop"),A={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},$={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)$["Digit"+a]=48+a,$["Numpad"+a]=96+a,A.PRINTABLE_KEYS[48+a]=""+a,A.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var h=String.fromCharCode(a+32);$["Key"+h.toUpperCase()]=a,A.PRINTABLE_KEYS[a]=h}for(var a=1;a<13;a++)$["F"+a]=111+a,A.FUNCTION_KEYS[111+a]="F"+a;var n={Shift:16,Control:17,Alt:18,Meta:224};for(var r in n)$[r]=$[r+"Left"]=$[r+"Right"]=n[r];x.$codeToKeyCode=$,A.PRINTABLE_KEYS[173]="-";for(var i in A.FUNCTION_KEYS){var t=A.FUNCTION_KEYS[i].toLowerCase();A[t]=parseInt(i,10)}for(var i in A.PRINTABLE_KEYS){var t=A.PRINTABLE_KEYS[i].toLowerCase();A[t]=parseInt(i,10)}T.mixin(A,A.MODIFIER_KEYS),T.mixin(A,A.PRINTABLE_KEYS),T.mixin(A,A.FUNCTION_KEYS),A.enter=A.return,A.escape=A.esc,A.del=A.delete,function(){for(var e=["cmd","ctrl","alt","shift"],o=Math.pow(2,e.length);o--;)A.KEY_MODS[o]=e.filter(function(s){return o&A.KEY_MODS[s]}).join("-")+"-"}(),A.KEY_MODS[0]="",A.KEY_MODS[-1]="input-",T.mixin(x,A),x.default=x,x.keyCodeToString=function(e){var o=A[e];return typeof o!="string"&&(o=String.fromCharCode(e)),o.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(k,x,z){var T=k("./keys"),A=k("./useragent"),$=null,a=0,h;function n(){h=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return h={passive:!1},!0}})}catch{}}function r(){return h==null&&n(),h}function i(y,m,p){this.elem=y,this.type=m,this.callback=p}i.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=x.addListener=function(y,m,p,g){y.addEventListener(m,p,r()),g&&g.$toDestroy.push(new i(y,m,p))},e=x.removeListener=function(y,m,p){y.removeEventListener(m,p,r())};x.stopEvent=function(y){return x.stopPropagation(y),x.preventDefault(y),!1},x.stopPropagation=function(y){y.stopPropagation&&y.stopPropagation()},x.preventDefault=function(y){y.preventDefault&&y.preventDefault()},x.getButton=function(y){return y.type=="dblclick"?0:y.type=="contextmenu"||A.isMac&&y.ctrlKey&&!y.altKey&&!y.shiftKey?2:y.button},x.capture=function(y,m,p){var g=y&&y.ownerDocument||document;function w(L){m&&m(L),p&&p(L),e(g,"mousemove",m),e(g,"mouseup",w),e(g,"dragstart",w)}return t(g,"mousemove",m),t(g,"mouseup",w),t(g,"dragstart",w),w},x.addMouseWheelListener=function(y,m,p){t(y,"wheel",function(g){var w=.15,L=g.deltaX||0,S=g.deltaY||0;switch(g.deltaMode){case g.DOM_DELTA_PIXEL:g.wheelX=L*w,g.wheelY=S*w;break;case g.DOM_DELTA_LINE:var b=15;g.wheelX=L*b,g.wheelY=S*b;break;case g.DOM_DELTA_PAGE:var R=150;g.wheelX=L*R,g.wheelY=S*R;break}m(g)},p)},x.addMultiMouseDownListener=function(y,m,p,g,w){var L=0,S,b,R,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function l(f){if(x.getButton(f)!==0?L=0:f.detail>1?(L++,L>4&&(L=1)):L=1,A.isIE){var v=Math.abs(f.clientX-S)>5||Math.abs(f.clientY-b)>5;(!R||v)&&(L=1),R&&clearTimeout(R),R=setTimeout(function(){R=null},m[L-1]||600),L==1&&(S=f.clientX,b=f.clientY)}if(f._clicks=L,p[g]("mousedown",f),L>4)L=0;else if(L>1)return p[g](d[L],f)}Array.isArray(y)||(y=[y]),y.forEach(function(f){t(f,"mousedown",l,w)})};function o(y){return 0|(y.ctrlKey?1:0)|(y.altKey?2:0)|(y.shiftKey?4:0)|(y.metaKey?8:0)}x.getModifierString=function(y){return T.KEY_MODS[o(y)]};function s(y,m,p){var g=o(m);if(!p&&m.code&&(p=T.$codeToKeyCode[m.code]||p),!A.isMac&&$){if(m.getModifierState&&(m.getModifierState("OS")||m.getModifierState("Win"))&&(g|=8),$.altGr)if((3&g)!=3)$.altGr=0;else return;if(p===18||p===17){var w=m.location;if(p===17&&w===1)$[p]==1&&(a=m.timeStamp);else if(p===18&&g===3&&w===2){var L=m.timeStamp-a;L<50&&($.altGr=!0)}}}if(p in T.MODIFIER_KEYS&&(p=-1),!(!g&&p===13&&m.location===3&&(y(m,g,-p),m.defaultPrevented))){if(A.isChromeOS&&g&8){if(y(m,g,p),m.defaultPrevented)return;g&=-9}return!g&&!(p in T.FUNCTION_KEYS)&&!(p in T.PRINTABLE_KEYS)?!1:y(m,g,p)}}x.addCommandKeyListener=function(y,m,p){var g=null;t(y,"keydown",function(w){$[w.keyCode]=($[w.keyCode]||0)+1;var L=s(m,w,w.keyCode);return g=w.defaultPrevented,L},p),t(y,"keypress",function(w){g&&(w.ctrlKey||w.altKey||w.shiftKey||w.metaKey)&&(x.stopEvent(w),g=null)},p),t(y,"keyup",function(w){$[w.keyCode]=null},p),$||(c(),t(window,"focus",c))};function c(){$=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!A.isOldIE){var u=1;x.nextTick=function(y,m){m=m||window;var p="zero-timeout-message-"+u++,g=function(w){w.data==p&&(x.stopPropagation(w),e(m,"message",g),y())};t(m,"message",g),m.postMessage(p,"*")}}x.$idleBlocked=!1,x.onIdle=function(y,m){return setTimeout(function p(){x.$idleBlocked?setTimeout(p,100):y()},m)},x.$idleBlockId=null,x.blockIdle=function(y){x.$idleBlockId&&clearTimeout(x.$idleBlockId),x.$idleBlocked=!0,x.$idleBlockId=setTimeout(function(){x.$idleBlocked=!1},y||100)},x.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),x.nextFrame?x.nextFrame=x.nextFrame.bind(window):x.nextFrame=function(y){setTimeout(y,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(k,x,z){var T;z.exports={lineMode:!1,pasteCancelled:function(){return T&&T>Date.now()-50?!0:T=!1},cancel:function(){T=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(k,x,z){var T=k("../lib/event"),A=k("../config").nls,$=k("../lib/useragent"),a=k("../lib/dom"),h=k("../lib/lang"),n=k("../clipboard"),r=$.isChrome<18,i=$.isIE,t=$.isChrome>63,e=400,o=k("../lib/keys"),s=o.KEY_MODS,c=$.isIOS,u=c?/\s/:/\n/,y=$.isMobile,m;m=function(p,g){var w=a.createElement("textarea");w.className="ace_text-input",w.setAttribute("wrap","off"),w.setAttribute("autocorrect","off"),w.setAttribute("autocapitalize","off"),w.setAttribute("spellcheck","false"),w.style.opacity="0",p.insertBefore(w,p.firstChild);var L=!1,S=!1,b=!1,R=!1,d="";y||(w.style.fontSize="1px");var l=!1,f=!1,v="",C=0,M=0,E=0,_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,O=0;try{var H=document.activeElement===w}catch{}this.setNumberOfExtraLines=function(B){if(_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,B<0){O=0;return}O=B},this.setAriaLabel=function(){var B="";if(g.$textInputAriaLabel&&(B+="".concat(g.$textInputAriaLabel,", ")),g.session){var G=g.session.selection.cursor.row;B+=A("text-input.aria-label","Cursor at row $0",[G+1])}w.setAttribute("aria-label",B)},this.setAriaOptions=function(B){B.activeDescendant?(w.setAttribute("aria-haspopup","true"),w.setAttribute("aria-autocomplete",B.inline?"both":"list"),w.setAttribute("aria-activedescendant",B.activeDescendant)):(w.setAttribute("aria-haspopup","false"),w.setAttribute("aria-autocomplete","both"),w.removeAttribute("aria-activedescendant")),B.role&&w.setAttribute("role",B.role),B.setLabel&&(w.setAttribute("aria-roledescription",A("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),T.addListener(w,"blur",function(B){f||(g.onBlur(B),H=!1)},g),T.addListener(w,"focus",function(B){if(!f){if(H=!0,$.isEdge)try{if(!document.hasFocus())return}catch{}g.onFocus(B),$.isEdge?setTimeout(N):N()}},g),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:g.renderer.enableKeyboardAccessibility}),d||t||this.$focusScroll=="browser")return w.focus({preventScroll:!0});var B=w.style.top;w.style.position="fixed",w.style.top="0px";try{var G=w.getBoundingClientRect().top!=0}catch{return}var Y=[];if(G)for(var Q=w.parentElement;Q&&Q.nodeType==1;)Y.push(Q),Q.setAttribute("ace_nocontext","true"),!Q.parentElement&&Q.getRootNode?Q=Q.getRootNode().host:Q=Q.parentElement;w.focus({preventScroll:!0}),G&&Y.forEach(function(Z){Z.removeAttribute("ace_nocontext")}),setTimeout(function(){w.style.position="",w.style.top=="0px"&&(w.style.top=B)},0)},this.blur=function(){w.blur()},this.isFocused=function(){return H},g.on("beforeEndOperation",function(){var B=g.curOp,G=B&&B.command&&B.command.name;if(G!="insertstring"){var Y=G&&(B.docChanged||B.selectionChanged);b&&Y&&(v=w.value="",ce()),N()}}),g.on("changeSelection",this.setAriaLabel);var D=function(B,G){for(var Y=G,Q=1;Q<=B-_&&Q<2*O+1;Q++)Y+=g.session.getLine(B-Q).length+1;return Y},N=c?function(B){if(!(!H||L&&!B||R)){B||(B="");var G=`
167
- ab`+B+`cde fg
168
- `;G!=w.value&&(w.value=v=G);var Y=4,Q=4+(B.length||(g.selection.isEmpty()?0:1));(C!=Y||M!=Q)&&w.setSelectionRange(Y,Q),C=Y,M=Q}}:function(){if(!(b||R)&&!(!H&&!j)){b=!0;var B=0,G=0,Y="";if(g.session){var Q=g.selection,Z=Q.getRange(),te=Q.cursor.row;te===I+1?(_=I+1,I=_+2*O):te===_-1?(I=_-1,_=I-2*O):(te<_-1||te>I+1)&&(_=te>O?te-O:0,I=te>O?te+O:2*O);for(var ne=[],ie=_;ie<=I;ie++)ne.push(g.session.getLine(ie));if(Y=ne.join(`
169
- `),B=D(Z.start.row,Z.start.column),G=D(Z.end.row,Z.end.column),Z.start.row<_){var ee=g.session.getLine(_-1);B=Z.start.row<_-1?0:B,G+=ee.length+1,Y=ee+`
170
- `+Y}else if(Z.end.row>I){var X=g.session.getLine(I+1);G=Z.end.row>I+1?X.length:Z.end.column,G+=Y.length+1,Y=Y+`
171
- `+X}else y&&te>0&&(Y=`
172
- `+Y,G+=1,B+=1);Y.length>e&&(B<e&&G<e?Y=Y.slice(0,e):(Y=`
173
- `,B==G?B=G=0:(B=0,G=1)));var se=Y+`
174
-
175
- `;se!=v&&(w.value=v=se,C=M=se.length)}if(j&&(C=w.selectionStart,M=w.selectionEnd),M!=G||C!=B||w.selectionEnd!=M)try{w.setSelectionRange(B,G),C=B,M=G}catch{}b=!1}};this.resetSelection=N,H&&g.onFocus();var W=function(B){return B.selectionStart===0&&B.selectionEnd>=v.length&&B.value===v&&v&&B.selectionEnd!==M},F=function(B){b||(L?L=!1:W(w)?(g.selectAll(),N()):y&&w.selectionStart!=C&&N())},P=null;this.setInputHandler=function(B){P=B},this.getInputHandler=function(){return P};var j=!1,V=function(B,G){if(j&&(j=!1),S)return N(),B&&g.onPaste(B),S=!1,"";for(var Y=w.selectionStart,Q=w.selectionEnd,Z=C,te=v.length-M,ne=B,ie=B.length-Y,ee=B.length-Q,X=0;Z>0&&v[X]==B[X];)X++,Z--;for(ne=ne.slice(X),X=1;te>0&&v.length-X>C-1&&v[v.length-X]==B[B.length-X];)X++,te--;ie-=X-1,ee-=X-1;var se=ne.length-X+1;if(se<0&&(Z=-se,se=0),ne=ne.slice(0,se),!G&&!ne&&!ie&&!Z&&!te&&!ee)return"";R=!0;var he=!1;return $.isAndroid&&ne==". "&&(ne=" ",he=!0),ne&&!Z&&!te&&!ie&&!ee||l?g.onTextInput(ne):g.onTextInput(ne,{extendLeft:Z,extendRight:te,restoreStart:ie,restoreEnd:ee}),R=!1,v=B,C=Y,M=Q,E=ee,he?`
176
- `:ne},U=function(B){if(b)return le();if(B&&B.inputType){if(B.inputType=="historyUndo")return g.execCommand("undo");if(B.inputType=="historyRedo")return g.execCommand("redo")}var G=w.value,Y=V(G,!0);(G.length>e+100||u.test(Y)||y&&C<1&&C==M)&&N()},K=function(B,G,Y){var Q=B.clipboardData||window.clipboardData;if(!(!Q||r)){var Z=i||Y?"Text":"text/plain";try{return G?Q.setData(Z,G)!==!1:Q.getData(Z)}catch(te){if(!Y)return K(te,G,!0)}}},J=function(B,G){var Y=g.getCopyText();if(!Y)return T.preventDefault(B);K(B,Y)?(c&&(N(Y),L=Y,setTimeout(function(){L=!1},10)),G?g.onCut():g.onCopy(),T.preventDefault(B)):(L=!0,w.value=Y,w.select(),setTimeout(function(){L=!1,N(),G?g.onCut():g.onCopy()}))},oe=function(B){J(B,!0)},re=function(B){J(B,!1)},q=function(B){var G=K(B);n.pasteCancelled()||(typeof G=="string"?(G&&g.onPaste(G,B),$.isIE&&setTimeout(N),T.preventDefault(B)):(w.value="",S=!0))};T.addCommandKeyListener(w,function(B,G,Y){if(!b)return g.onCommandKey(B,G,Y)},g),T.addListener(w,"select",F,g),T.addListener(w,"input",U,g),T.addListener(w,"cut",oe,g),T.addListener(w,"copy",re,g),T.addListener(w,"paste",q,g),(!("oncut"in w)||!("oncopy"in w)||!("onpaste"in w))&&T.addListener(p,"keydown",function(B){if(!($.isMac&&!B.metaKey||!B.ctrlKey))switch(B.keyCode){case 67:re(B);break;case 86:q(B);break;case 88:oe(B);break}},g);var ae=function(B){if(!(b||!g.onCompositionStart||g.$readOnly)&&(b={},!l)){B.data&&(b.useTextareaForIME=!1),setTimeout(le,0),g._signal("compositionStart"),g.on("mousedown",de);var G=g.getSelectionRange();G.end.row=G.start.row,G.end.column=G.start.column,b.markerRange=G,b.selectionStart=C,g.onCompositionStart(b),b.useTextareaForIME?(v=w.value="",C=0,M=0):(w.msGetInputContext&&(b.context=w.msGetInputContext()),w.getInputContext&&(b.context=w.getInputContext()))}},le=function(){if(!(!b||!g.onCompositionUpdate||g.$readOnly)){if(l)return de();if(b.useTextareaForIME)g.onCompositionUpdate(w.value);else{var B=w.value;V(B),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+M-b.selectionStart+E)}}},ce=function(B){!g.onCompositionEnd||g.$readOnly||(b=!1,g.onCompositionEnd(),g.off("mousedown",de),B&&U())};function de(){f=!0,w.blur(),w.focus(),f=!1}var me=h.delayedCall(le,50).schedule.bind(null,null);function we(B){B.keyCode==27&&w.value.length<w.selectionStart&&(b||(v=w.value),C=M=-1,N()),me()}T.addListener(w,"compositionstart",ae,g),T.addListener(w,"compositionupdate",le,g),T.addListener(w,"keyup",we,g),T.addListener(w,"keydown",me,g),T.addListener(w,"compositionend",ce,g),this.getElement=function(){return w},this.setCommandMode=function(B){l=B,w.readOnly=!1},this.setReadOnly=function(B){l||(w.readOnly=B)},this.setCopyWithEmptySelection=function(B){},this.onContextMenu=function(B){j=!0,N(),g._emit("nativecontextmenu",{target:g,domEvent:B}),this.moveToMouse(B,!0)},this.moveToMouse=function(B,G){d||(d=w.style.cssText),w.style.cssText=(G?"z-index:100000;":"")+($.isIE?"opacity:0.1;":"")+"text-indent: -"+(C+M)*g.renderer.characterWidth*.5+"px;";var Y=g.container.getBoundingClientRect(),Q=a.computedStyle(g.container),Z=Y.top+(parseInt(Q.borderTopWidth)||0),te=Y.left+(parseInt(Y.borderLeftWidth)||0),ne=Y.bottom-Z-w.clientHeight-2,ie=function(ee){a.translate(w,ee.clientX-te-2,Math.min(ee.clientY-Z-2,ne))};ie(B),B.type=="mousedown"&&(g.renderer.$isMousePressed=!0,clearTimeout(fe),$.isWin&&T.capture(g.container,ie,ue))},this.onContextMenuClose=ue;var fe;function ue(){clearTimeout(fe),fe=setTimeout(function(){d&&(w.style.cssText=d,d=""),g.renderer.$isMousePressed=!1,g.renderer.$keepTextAreaAtCursor&&g.renderer.$moveTextAreaToCursor()},0)}var ge=function(B){g.textInput.onContextMenu(B),ue()};T.addListener(w,"mouseup",ge,g),T.addListener(w,"mousedown",function(B){B.preventDefault(),ue()},g),T.addListener(g.renderer.scroller,"contextmenu",ge,g),T.addListener(w,"contextmenu",ge,g),c&&be(p,g,w);function be(B,G,Y){var Q=null,Z=!1;Y.addEventListener("keydown",function(ne){Q&&clearTimeout(Q),Z=!0},!0),Y.addEventListener("keyup",function(ne){Q=setTimeout(function(){Z=!1},100)},!0);var te=function(ne){if(document.activeElement===Y&&!(Z||b||G.$mouseHandler.isMousePressed)&&!L){var ie=Y.selectionStart,ee=Y.selectionEnd,X=null,se=0;if(ie==0?X=o.up:ie==1?X=o.home:ee>M&&v[ee]==`
177
- `?X=o.end:ie<C&&v[ie-1]==" "?(X=o.left,se=s.option):ie<C||ie==C&&M!=C&&ie==ee?X=o.left:ee>M&&v.slice(0,ee).split(`
178
- `).length>2?X=o.down:ee>M&&v[ee-1]==" "?(X=o.right,se=s.option):(ee>M||ee==M&&M!=C&&ie==ee)&&(X=o.right),ie!==ee&&(se|=s.shift),X){var he=G.onCommandKey({},se,X);if(!he&&G.commands){X=o.keyCodeToString(X);var ve=G.commands.findKeyCommand(se,X);ve&&G.execCommand(ve)}C=ie,M=ee,N("")}}};document.addEventListener("selectionchange",te),G.on("destroy",function(){document.removeEventListener("selectionchange",te)})}this.destroy=function(){w.parentElement&&w.parentElement.removeChild(w)}},x.TextInput=m,x.$setUserAgentForTests=function(p,g){y=p,c=g}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(k,x,z){var T=k("../lib/useragent"),A=0,$=550,a=function(){function r(i){i.$clickSelection=null;var t=i.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(i)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(i)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(i)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(i)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(i));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(o){i[o]=this[o]},this),i.selectByLines=this.extendSelectionBy.bind(i,"getLineRange"),i.selectByWords=this.extendSelectionBy.bind(i,"getWordRange")}return r.prototype.onMouseDown=function(i){var t=i.inSelection(),e=i.getDocumentPosition();this.mousedownEvent=i;var o=this.editor,s=i.getButton();if(s!==0){var c=o.getSelectionRange(),u=c.isEmpty();(u||s==1)&&o.selection.moveToPosition(e),s==2&&(o.textInput.onContextMenu(i.domEvent),T.isMozilla||i.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!o.isFocused()&&(o.focus(),this.$focusTimeout&&!this.$clickSelection&&!o.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(i);return}return this.captureMouse(i),this.startSelect(e,i.domEvent._clicks>1),i.preventDefault()},r.prototype.startSelect=function(i,t){i=i||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(i):t||e.selection.moveToPosition(i),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},r.prototype.select=function(){var i,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(e);if(o==-1)i=this.$clickSelection.end;else if(o==1)i=this.$clickSelection.start;else{var s=n(this.$clickSelection,e);e=s.cursor,i=s.anchor}t.selection.setSelectionAnchor(i.row,i.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},r.prototype.extendSelectionBy=function(i){var t,e=this.editor,o=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[i](o.row,o.column);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(s.start),u=this.$clickSelection.comparePoint(s.end);if(c==-1&&u<=0)t=this.$clickSelection.end,(s.end.row!=o.row||s.end.column!=o.column)&&(o=s.start);else if(u==1&&c>=0)t=this.$clickSelection.start,(s.start.row!=o.row||s.start.column!=o.column)&&(o=s.end);else if(c==-1&&u==1)o=s.end,t=s.start;else{var y=n(this.$clickSelection,o);o=y.cursor,t=y.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(o),e.renderer.scrollCursorIntoView()},r.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},r.prototype.focusWait=function(){var i=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(i>A||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},r.prototype.onDoubleClick=function(i){var t=i.getDocumentPosition(),e=this.editor,o=e.session,s=o.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},r.prototype.onTripleClick=function(i){var t=i.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var o=e.getSelectionRange();o.isMultiLine()&&o.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(o.start.row),this.$clickSelection.end=e.selection.getLineRange(o.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},r.prototype.onQuadClick=function(i){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},r.prototype.onMouseWheel=function(i){if(!i.getAccelKey()){i.getShiftKey()&&i.wheelY&&!i.wheelX&&(i.wheelX=i.wheelY,i.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,o=i.domEvent.timeStamp,s=o-e.t,c=s?i.wheelX/s:e.vx,u=s?i.wheelY/s:e.vy;s<$&&(c=(c+e.vx)/2,u=(u+e.vy)/2);var y=Math.abs(c/u),m=!1;if(y>=1&&t.renderer.isScrollableBy(i.wheelX*i.speed,0)&&(m=!0),y<=1&&t.renderer.isScrollableBy(0,i.wheelY*i.speed)&&(m=!0),m)e.allowed=o;else if(o-e.allowed<$){var p=Math.abs(c)<=1.5*Math.abs(e.vx)&&Math.abs(u)<=1.5*Math.abs(e.vy);p?(m=!0,e.allowed=o):e.allowed=0}if(e.t=o,e.vx=c,e.vy=u,m)return t.renderer.scrollBy(i.wheelX*i.speed,i.wheelY*i.speed),i.stop()}},r}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,x.DefaultHandlers=a;function h(r,i,t,e){return Math.sqrt(Math.pow(t-r,2)+Math.pow(e-i,2))}function n(r,i){if(r.start.row==r.end.row)var t=2*i.column-r.start.column-r.end.column;else if(r.start.row==r.end.row-1&&!r.start.column&&!r.end.column)var t=i.column-4;else var t=2*i.row-r.start.row-r.end.row;return t<0?{cursor:r.start,anchor:r.end}:{cursor:r.end,anchor:r.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(k,x,z){x.preventParentScroll=function(A){A.stopPropagation();var $=A.currentTarget,a=$.scrollHeight>$.clientHeight;a||A.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(k,x,z){var T=this&&this.__extends||function(){var o=function(s,c){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,y){u.__proto__=y}||function(u,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(u[m]=y[m])},o(s,c)};return function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");o(s,c);function u(){this.constructor=s}s.prototype=c===null?Object.create(c):(u.prototype=c.prototype,new u)}}(),A=this&&this.__values||function(o){var s=typeof Symbol=="function"&&Symbol.iterator,c=s&&o[s],u=0;if(c)return c.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&u>=o.length&&(o=void 0),{value:o&&o[u++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},$=k("./lib/dom");k("./lib/event");var a=k("./range").Range,h=k("./lib/scroll").preventParentScroll,n="ace_tooltip",r=function(){function o(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return o.prototype.$init=function(){return this.$element=$.createElement("div"),this.$element.className=n,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},o.prototype.getElement=function(){return this.$element||this.$init()},o.prototype.setText=function(s){this.getElement().textContent=s},o.prototype.setHtml=function(s){this.getElement().innerHTML=s},o.prototype.setPosition=function(s,c){this.getElement().style.left=s+"px",this.getElement().style.top=c+"px"},o.prototype.setClassName=function(s){$.addCssClass(this.getElement(),s)},o.prototype.setTheme=function(s){this.$element.className=n+" "+(s.isDark?"ace_dark ":"")+(s.cssClass||"")},o.prototype.show=function(s,c,u){s!=null&&this.setText(s),c!=null&&u!=null&&this.setPosition(c,u),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},o.prototype.hide=function(s){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=n,this.isOpen=!1)},o.prototype.getHeight=function(){return this.getElement().offsetHeight},o.prototype.getWidth=function(){return this.getElement().offsetWidth},o.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},o}(),i=function(){function o(){this.popups=[]}return o.prototype.addPopup=function(s){this.popups.push(s),this.updatePopups()},o.prototype.removePopup=function(s){var c=this.popups.indexOf(s);c!==-1&&(this.popups.splice(c,1),this.updatePopups())},o.prototype.updatePopups=function(){var s,c,u,y;this.popups.sort(function(d,l){return l.priority-d.priority});var m=[];try{for(var p=A(this.popups),g=p.next();!g.done;g=p.next()){var w=g.value,L=!0;try{for(var S=(u=void 0,A(m)),b=S.next();!b.done;b=S.next()){var R=b.value;if(this.doPopupsOverlap(R,w)){L=!1;break}}}catch(d){u={error:d}}finally{try{b&&!b.done&&(y=S.return)&&y.call(S)}finally{if(u)throw u.error}}L?m.push(w):w.hide()}}catch(d){s={error:d}}finally{try{g&&!g.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}},o.prototype.doPopupsOverlap=function(s,c){var u=s.getElement().getBoundingClientRect(),y=c.getElement().getBoundingClientRect();return u.left<y.right&&u.right>y.left&&u.top<y.bottom&&u.bottom>y.top},o}(),t=new i;x.popupManager=t,x.Tooltip=r;var e=function(o){T(s,o);function s(c){c===void 0&&(c=document.body);var u=o.call(this,c)||this;u.timeout=void 0,u.lastT=0,u.idleTime=350,u.lastEvent=void 0,u.onMouseOut=u.onMouseOut.bind(u),u.onMouseMove=u.onMouseMove.bind(u),u.waitForHover=u.waitForHover.bind(u),u.hide=u.hide.bind(u);var y=u.getElement();return y.style.whiteSpace="pre-wrap",y.style.pointerEvents="auto",y.addEventListener("mouseout",u.onMouseOut),y.tabIndex=-1,y.addEventListener("blur",function(){y.contains(document.activeElement)||this.hide()}.bind(u)),y.addEventListener("wheel",h),u}return s.prototype.addToEditor=function(c){c.on("mousemove",this.onMouseMove),c.on("mousedown",this.hide),c.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},s.prototype.removeFromEditor=function(c){c.off("mousemove",this.onMouseMove),c.off("mousedown",this.hide),c.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.onMouseMove=function(c,u){this.lastEvent=c,this.lastT=Date.now();var y=u.$mouseHandler.isMousePressed;if(this.isOpen){var m=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(m.row,m.column)||y||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||y||(this.lastEvent=c,this.timeout=setTimeout(this.waitForHover,this.idleTime))},s.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var c=Date.now()-this.lastT;if(this.idleTime-c>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-c);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},s.prototype.isOutsideOfText=function(c){var u=c.editor,y=c.getDocumentPosition(),m=u.session.getLine(y.row);if(y.column==m.length){var p=u.renderer.pixelToScreenCoordinates(c.clientX,c.clientY),g=u.session.documentToScreenPosition(y.row,y.column);if(g.column!=p.column||g.row!=p.row)return!0}return!1},s.prototype.setDataProvider=function(c){this.$gatherData=c},s.prototype.showForRange=function(c,u,y,m){var p=10;if(!(m&&m!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var g=c.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(g.theme)),this.isOpen=!0,this.addMarker(u,c.session),this.range=a.fromPoints(u.start,u.end);var w=g.textToScreenCoordinates(u.start.row,u.start.column),L=g.scroller.getBoundingClientRect();w.pageX<L.left&&(w.pageX=L.left);var S=this.getElement();S.innerHTML="",S.appendChild(y),S.style.maxHeight="",S.style.display="block";var b=S.clientHeight,R=S.clientWidth,d=window.innerHeight-w.pageY-g.lineHeight,l=!0;w.pageY-b<0&&w.pageY<d&&(l=!1),S.style.maxHeight=(l?w.pageY:d)-p+"px",S.style.top=l?"":w.pageY+g.lineHeight+"px",S.style.bottom=l?window.innerHeight-w.pageY+"px":"",S.style.left=Math.min(w.pageX,window.innerWidth-R-p)+"px"}},s.prototype.addMarker=function(c,u){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=u,this.marker=u&&u.addMarker(c,"ace_highlight-marker","text")},s.prototype.hide=function(c){!c&&document.activeElement==this.getElement()||c&&c.target&&(c.type!="keydown"||c.ctrlKey||c.metaKey)&&this.$element.contains(c.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,t.removePopup(this)))},s.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},s.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},s.prototype.onMouseOut=function(c){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!c.relatedTarget||this.getElement().contains(c.relatedTarget)||c&&c.currentTarget.contains(c.relatedTarget)||c.relatedTarget.classList.contains("ace_content")||this.hide())},s}(r);x.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"],function(k,x,z){var T=this&&this.__extends||function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,c){s.__proto__=c}||function(s,c){for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(s[u]=c[u])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function s(){this.constructor=e}e.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}(),A=this&&this.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,o=e&&t[e],s=0;if(o)return o.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$=k("../lib/dom"),a=k("../lib/event"),h=k("../tooltip").Tooltip,n=k("../config").nls;k("../lib/lang");function r(t){var e=t.editor,o=e.renderer.$gutterLayer,s=new i(e);t.editor.setDefaultHandler("guttermousedown",function(g){if(!(!e.isFocused()||g.getButton()!=0)){var w=o.getRegion(g);if(w!="foldWidgets"){var L=g.getDocumentPosition().row,S=e.session.selection;if(g.getShiftKey())S.selectTo(L,0);else{if(g.domEvent.detail==2)return e.selectAll(),g.preventDefault();t.$clickSelection=e.selection.getLineRange(L)}return t.setState("selectByLines"),t.captureMouse(g),g.preventDefault()}}});var c,u;function y(){var g=u.getDocumentPosition().row,w=e.session.getLength();if(g==w){var L=e.renderer.pixelToScreenCoordinates(0,u.y).row,S=u.$pos;if(L>e.session.documentToScreenRow(S.row,S.column))return m()}if(s.showTooltip(g),!!s.isOpen)if(e.on("mousewheel",m),t.$tooltipFollowsMouse)p(u);else{var b=u.getGutterRow(),R=o.$lines.get(b);if(R){var d=R.element.querySelector(".ace_gutter_annotation"),l=d.getBoundingClientRect(),f=s.getElement().style;f.left=l.right+"px",f.top=l.bottom+"px"}else p(u)}}function m(){c&&(c=clearTimeout(c)),s.isOpen&&(s.hideTooltip(),e.off("mousewheel",m))}function p(g){s.setPosition(g.x,g.y)}t.editor.setDefaultHandler("guttermousemove",function(g){var w=g.domEvent.target||g.domEvent.srcElement;if($.hasCssClass(w,"ace_fold-widget"))return m();s.isOpen&&t.$tooltipFollowsMouse&&p(g),u=g,!c&&(c=setTimeout(function(){c=null,u&&!t.isMousePressed?y():m()},50))}),a.addListener(e.renderer.$gutter,"mouseout",function(g){u=null,!(!s.isOpen||c)&&(c=setTimeout(function(){c=null,m()},50))},e),e.on("changeSession",m),e.on("input",m)}x.GutterHandler=r;var i=function(t){T(e,t);function e(o){var s=t.call(this,o.container)||this;return s.editor=o,s.visibleTooltipRow,s}return e.prototype.setPosition=function(o,s){var c=window.innerWidth||document.documentElement.clientWidth,u=window.innerHeight||document.documentElement.clientHeight,y=this.getWidth(),m=this.getHeight();o+=15,s+=15,o+y>c&&(o-=o+y-c),s+m>u&&(s-=20+m),h.prototype.setPosition.call(this,o,s)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:n("gutter-tooltip.aria-label.error.singular","error"),plural:n("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:n("gutter-tooltip.aria-label.security.singular","security finding"),plural:n("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:n("gutter-tooltip.aria-label.warning.singular","warning"),plural:n("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:n("gutter-tooltip.aria-label.info.singular","information message"),plural:n("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:n("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:n("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(o){var s,c=this.editor.renderer.$gutterLayer,u=c.$annotations[o],y;u?y={displayText:Array.from(u.displayText),type:Array.from(u.type)}:y={displayText:[],type:[]};var m=c.session.getFoldLine(o);if(m&&c.$showFoldedAnnotations){for(var p={error:[],security:[],warning:[],info:[],hint:[]},g={error:1,security:2,warning:3,info:4,hint:5},w,L=o+1;L<=m.end.row;L++)if(c.$annotations[L])for(var S=0;S<c.$annotations[L].text.length;S++){var b=c.$annotations[L].type[S];p[b].push(c.$annotations[L].text[S]),(!w||g[b]<g[w])&&(w=b)}if(["error","security","warning"].includes(w)){var R="".concat(e.annotationsToSummaryString(p)," in folded code.");y.displayText.push(R),y.type.push(w+"_fold")}}if(y.displayText.length===0)return this.hideTooltip();for(var d={error:[],security:[],warning:[],info:[],hint:[]},l=c.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=0;L<y.displayText.length;L++){var f=$.createElement("span"),v=$.createElement("span");(s=v.classList).add.apply(s,["ace_".concat(y.type[L]),l]),v.setAttribute("aria-label","".concat(e.annotationLabels[y.type[L].replace("_fold","")].singular)),v.setAttribute("role","img"),v.appendChild($.createTextNode(" ")),f.appendChild(v),f.appendChild($.createTextNode(y.displayText[L])),f.appendChild($.createElement("br")),d[y.type[L].replace("_fold","")].push(f)}var C=this.getElement();$.removeChildren(C),d.error.forEach(function(M){return C.appendChild(M)}),d.security.forEach(function(M){return C.appendChild(M)}),d.warning.forEach(function(M){return C.appendChild(M)}),d.info.forEach(function(M){return C.appendChild(M)}),d.hint.forEach(function(M){return C.appendChild(M)}),C.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=o,this.editor._signal("showGutterTooltip",this)},e.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},e.annotationsToSummaryString=function(o){var s,c,u=[],y=["error","security","warning","info","hint"];try{for(var m=A(y),p=m.next();!p.done;p=m.next()){var g=p.value;if(o[g].length){var w=o[g].length===1?e.annotationLabels[g].singular:e.annotationLabels[g].plural;u.push("".concat(o[g].length," ").concat(w))}}}catch(L){s={error:L}}finally{try{p&&!p.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}return u.join(", ")},e}(h);x.GutterTooltip=i}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(k,x,z){var T=k("../lib/event"),A=k("../lib/useragent"),$=function(){function a(h,n){this.speed,this.wheelX,this.wheelY,this.domEvent=h,this.editor=n,this.x=this.clientX=h.clientX,this.y=this.clientY=h.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){T.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){T.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var h=this.getDocumentPosition().row,n=this.editor.session.documentToScreenRow(h,0),r=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return n-r},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,n=h.getSelectionRange();if(n.isEmpty())this.$inSelection=!1;else{var r=this.getDocumentPosition();this.$inSelection=n.contains(r.row,r.column)}return this.$inSelection},a.prototype.getButton=function(){return T.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return A.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();x.MouseEvent=$}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(k,x,z){var T=k("../lib/dom"),A=k("../lib/event"),$=k("../lib/useragent"),a=200,h=200,n=5;function r(t){var e=t.editor,o=T.createElement("div");o.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",o.textContent=" ";var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(D){t[D]=this[D]},this),e.on("mousedown",this.onMouseDown.bind(t));var c=e.container,u,y,m,p,g,w,L=0,S,b,R,d,l;this.onDragStart=function(D){if(this.cancelDrag||!c.draggable){var N=this;return setTimeout(function(){N.startSelect(),N.captureMouse(D)},0),D.preventDefault()}g=e.getSelectionRange();var W=D.dataTransfer;W.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(o),W.setDragImage&&W.setDragImage(o,0,0),setTimeout(function(){e.container.removeChild(o)}),W.clearData(),W.setData("Text",e.session.getTextRange()),b=!0,this.setState("drag")},this.onDragEnd=function(D){if(c.draggable=!1,b=!1,this.setState(null),!e.getReadOnly()){var N=D.dataTransfer.dropEffect;!S&&N=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(D){if(!(e.getReadOnly()||!O(D.dataTransfer)))return y=D.clientX,m=D.clientY,u||M(),L++,D.dataTransfer.dropEffect=S=H(D),A.preventDefault(D)},this.onDragOver=function(D){if(!(e.getReadOnly()||!O(D.dataTransfer)))return y=D.clientX,m=D.clientY,u||(M(),L++),_!==null&&(_=null),D.dataTransfer.dropEffect=S=H(D),A.preventDefault(D)},this.onDragLeave=function(D){if(L--,L<=0&&u)return E(),S=null,A.preventDefault(D)},this.onDrop=function(D){if(w){var N=D.dataTransfer;if(b)switch(S){case"move":g.contains(w.row,w.column)?g={start:w,end:w}:g=e.moveText(g,w);break;case"copy":g=e.moveText(g,w,!0);break}else{var W=N.getData("Text");g={start:w,end:e.session.insert(w,W)},e.focus(),S=null}return E(),A.preventDefault(D)}},A.addListener(c,"dragstart",this.onDragStart.bind(t),e),A.addListener(c,"dragend",this.onDragEnd.bind(t),e),A.addListener(c,"dragenter",this.onDragEnter.bind(t),e),A.addListener(c,"dragover",this.onDragOver.bind(t),e),A.addListener(c,"dragleave",this.onDragLeave.bind(t),e),A.addListener(c,"drop",this.onDrop.bind(t),e);function f(D,N){var W=Date.now(),F=!N||D.row!=N.row,P=!N||D.column!=N.column;if(!d||F||P)e.moveCursorToPosition(D),d=W,l={x:y,y:m};else{var j=i(l.x,l.y,y,m);j>n?d=null:W-d>=h&&(e.renderer.scrollCursorIntoView(),d=null)}}function v(D,N){var W=Date.now(),F=e.renderer.layerConfig.lineHeight,P=e.renderer.layerConfig.characterWidth,j=e.renderer.scroller.getBoundingClientRect(),V={x:{left:y-j.left,right:j.right-y},y:{top:m-j.top,bottom:j.bottom-m}},U=Math.min(V.x.left,V.x.right),K=Math.min(V.y.top,V.y.bottom),J={row:D.row,column:D.column};U/P<=2&&(J.column+=V.x.left<V.x.right?-3:2),K/F<=1&&(J.row+=V.y.top<V.y.bottom?-1:1);var oe=D.row!=J.row,re=D.column!=J.column,q=!N||D.row!=N.row;oe||re&&!q?R?W-R>=a&&e.renderer.scrollCursorIntoView(J):R=W:R=null}function C(){var D=w;w=e.renderer.screenToTextCoordinates(y,m),f(w,D),v(w,D)}function M(){g=e.selection.toOrientedRange(),u=e.session.addMarker(g,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(p),C(),p=setInterval(C,20),L=0,A.addListener(document,"mousemove",I)}function E(){clearInterval(p),e.session.removeMarker(u),u=null,e.selection.fromOrientedRange(g),e.isFocused()&&!b&&e.$resetCursorStyle(),g=null,w=null,L=0,R=null,d=null,A.removeListener(document,"mousemove",I)}var _=null;function I(){_==null&&(_=setTimeout(function(){_!=null&&u&&E()},20))}function O(D){var N=D.types;return!N||Array.prototype.some.call(N,function(W){return W=="text/plain"||W=="Text"})}function H(D){var N=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],F=$.isMac?D.altKey:D.ctrlKey,P="uninitialized";try{P=D.dataTransfer.effectAllowed.toLowerCase()}catch{}var j="none";return F&&N.indexOf(P)>=0?j="copy":W.indexOf(P)>=0?j="move":N.indexOf(P)>=0&&(j="copy"),j}}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var o=$.isWin?"default":"move";t.renderer.setCursorStyle(o),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if($.isIE&&this.state=="dragReady"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>3&&e.dragDrop()}if(this.state==="dragWait"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,o=t.inSelection(),s=t.getButton(),c=t.domEvent.detail||1;if(c===1&&s===0&&o){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var u=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in u&&(u.unselectable="on"),e.getDragDelay()){if($.isWebKit){this.cancelDrag=!0;var y=e.container;y.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(r.prototype);function i(t,e,o,s){return Math.sqrt(Math.pow(o-t,2)+Math.pow(s-e,2))}x.DragdropHandler=r}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(k,x,z){var T=k("./mouse_event").MouseEvent,A=k("../lib/event"),$=k("../lib/dom");x.addTouchListeners=function(a,h){var n="scroll",r,i,t,e,o,s,c=0,u,y=0,m=0,p=0,g,w;function L(){var f=window.navigator&&window.navigator.clipboard,v=!1,C=function(){var _=h.getCopyText(),I=h.session.getUndoManager().hasUndo();w.replaceChild($.buildDom(v?["span",!_&&M("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],_&&M("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],_&&M("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],f&&M("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&M("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],M("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],M("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),w.firstChild)},M=function(_){return h.commands.canExecute(_,h)},E=function(_){var I=_.target.getAttribute("action");if(I=="more"||!v)return v=!v,C();I=="paste"?f.readText().then(function(O){h.execCommand(I,O)}):I&&((I=="cut"||I=="copy")&&(f?f.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(I)),w.firstChild.style.display="none",v=!1,I!="openCommandPalette"&&h.focus()};w=$.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(_){n="menu",_.stopPropagation(),_.preventDefault(),h.textInput.focus()},ontouchend:function(_){_.stopPropagation(),_.preventDefault(),E(_)},onclick:E},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function S(){if(!h.getOption("enableMobileMenu")){w&&b();return}w||L();var f=h.selection.cursor,v=h.renderer.textToScreenCoordinates(f.row,f.column),C=h.renderer.textToScreenCoordinates(0,0).pageX,M=h.renderer.scrollLeft,E=h.container.getBoundingClientRect();w.style.top=v.pageY-E.top-3+"px",v.pageX-E.left<E.width-70?(w.style.left="",w.style.right="10px"):(w.style.right="",w.style.left=C+M-E.left+"px"),w.style.display="",w.firstChild.style.display="none",h.on("input",b)}function b(f){w&&(w.style.display="none"),h.off("input",b)}function R(){o=null,clearTimeout(o);var f=h.selection.getRange(),v=f.contains(u.row,u.column);(f.isEmpty()||!v)&&(h.selection.moveToPosition(u),h.selection.selectWord()),n="wait",S()}function d(){o=null,clearTimeout(o),h.selection.moveToPosition(u);var f=y>=2?h.selection.getLineRange(u.row):h.session.getBracketRange(u);f&&!f.isEmpty()?h.selection.setRange(f):h.selection.selectWord(),n="wait"}A.addListener(a,"contextmenu",function(f){if(g){var v=h.textInput.getElement();v.focus()}},h),A.addListener(a,"touchstart",function(f){var v=f.touches;if(o||v.length>1){clearTimeout(o),o=null,t=-1,n="zoom";return}g=h.$mouseHandler.isMousePressed=!0;var C=h.renderer.layerConfig.lineHeight,M=h.renderer.layerConfig.lineHeight,E=f.timeStamp;e=E;var _=v[0],I=_.clientX,O=_.clientY;Math.abs(r-I)+Math.abs(i-O)>C&&(t=-1),r=f.clientX=I,i=f.clientY=O,m=p=0;var H=new T(f,h);if(u=H.getDocumentPosition(),E-t<500&&v.length==1&&!c)y++,f.preventDefault(),f.button=0,d();else{y=0;var D=h.selection.cursor,N=h.selection.isEmpty()?D:h.selection.anchor,W=h.renderer.$cursorLayer.getPixelPosition(D,!0),F=h.renderer.$cursorLayer.getPixelPosition(N,!0),P=h.renderer.scroller.getBoundingClientRect(),j=h.renderer.layerConfig.offset,V=h.renderer.scrollLeft,U=function(oe,re){return oe=oe/M,re=re/C-.75,oe*oe+re*re};if(f.clientX<P.left){n="zoom";return}var K=U(f.clientX-P.left-W.left+V,f.clientY-P.top-W.top+j),J=U(f.clientX-P.left-F.left+V,f.clientY-P.top-F.top+j);K<3.5&&J<3.5&&(n=K>J?"cursor":"anchor"),J<3.5?n="anchor":K<3.5?n="cursor":n="scroll",o=setTimeout(R,450)}t=E},h),A.addListener(a,"touchend",function(f){g=h.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),n=="zoom"?(n="",c=0):o?(h.selection.moveToPosition(u),c=0,S()):n=="scroll"?(l(),b()):S(),clearTimeout(o),o=null},h),A.addListener(a,"touchmove",function(f){o&&(clearTimeout(o),o=null);var v=f.touches;if(!(v.length>1||n=="zoom")){var C=v[0],M=r-C.clientX,E=i-C.clientY;if(n=="wait")if(M*M+E*E>4)n="cursor";else return f.preventDefault();r=C.clientX,i=C.clientY,f.clientX=C.clientX,f.clientY=C.clientY;var _=f.timeStamp,I=_-e;if(e=_,n=="scroll"){var O=new T(f,h);O.speed=1,O.wheelX=M,O.wheelY=E,10*Math.abs(M)<Math.abs(E)&&(M=0),10*Math.abs(E)<Math.abs(M)&&(E=0),I!=0&&(m=M/I,p=E/I),h._emit("mousewheel",O),O.propagationStopped||(m=p=0)}else{var H=new T(f,h),D=H.getDocumentPosition();n=="cursor"?h.selection.moveCursorToPosition(D):n=="anchor"&&h.selection.setSelectionAnchor(D.row,D.column),h.renderer.scrollCursorIntoView(D),f.preventDefault()}}},h);function l(){c+=60,s=setInterval(function(){c--<=0&&(clearInterval(s),s=null),Math.abs(m)<.01&&(m=0),Math.abs(p)<.01&&(p=0),c<20&&(m=.9*m),c<20&&(p=.9*p);var f=h.session.getScrollTop();h.renderer.scrollBy(10*m,10*p),f==h.session.getScrollTop()&&(c=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(k,x,z){var T=k("../lib/event"),A=k("../lib/useragent"),$=k("./default_handlers").DefaultHandlers,a=k("./default_gutter_handler").GutterHandler,h=k("./mouse_event").MouseEvent,n=k("./dragdrop_handler").DragdropHandler,r=k("./touch_handler").addTouchListeners,i=k("../config"),t=function(){function e(o){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var s=this;this.editor=o,new $(this),new a(this),new n(this);var c=function(m){var p=!document.hasFocus||!document.hasFocus()||!o.isFocused()&&document.activeElement==(o.textInput&&o.textInput.getElement());p&&window.focus(),o.focus(),setTimeout(function(){o.isFocused()||o.focus()})},u=o.renderer.getMouseEventTarget();T.addListener(u,"click",this.onMouseEvent.bind(this,"click"),o),T.addListener(u,"mousemove",this.onMouseMove.bind(this,"mousemove"),o),T.addMultiMouseDownListener([u,o.renderer.scrollBarV&&o.renderer.scrollBarV.inner,o.renderer.scrollBarH&&o.renderer.scrollBarH.inner,o.textInput&&o.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",o),T.addMouseWheelListener(o.container,this.onMouseWheel.bind(this,"mousewheel"),o),r(o.container,o);var y=o.renderer.$gutter;T.addListener(y,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),o),T.addListener(y,"click",this.onMouseEvent.bind(this,"gutterclick"),o),T.addListener(y,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),o),T.addListener(y,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),o),T.addListener(u,"mousedown",c,o),T.addListener(y,"mousedown",c,o),A.isIE&&o.renderer.scrollBarV&&(T.addListener(o.renderer.scrollBarV.element,"mousedown",c,o),T.addListener(o.renderer.scrollBarH.element,"mousedown",c,o)),o.on("mousemove",function(m){if(!(s.state||s.$dragDelay||!s.$dragEnabled)){var p=o.renderer.screenToTextCoordinates(m.x,m.y),g=o.session.selection.getRange(),w=o.renderer;!g.isEmpty()&&g.insideStart(p.row,p.column)?w.setCursorStyle("default"):w.setCursorStyle("")}},o)}return e.prototype.onMouseEvent=function(o,s){this.editor.session&&this.editor._emit(o,new h(s,this.editor))},e.prototype.onMouseMove=function(o,s){var c=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!c||!c.length||this.editor._emit(o,new h(s,this.editor))},e.prototype.onMouseWheel=function(o,s){var c=new h(s,this.editor);c.speed=this.$scrollSpeed*2,c.wheelX=s.wheelX,c.wheelY=s.wheelY,this.editor._emit(o,c)},e.prototype.setState=function(o){this.state=o},e.prototype.captureMouse=function(o,s){this.x=o.x,this.y=o.y,this.isMousePressed=!0;var c=this.editor,u=this.editor.renderer;u.$isMousePressed=!0;var y=this,m=function(S){if(S){if(A.isWebKit&&!S.which&&y.releaseMouse)return y.releaseMouse();y.x=S.clientX,y.y=S.clientY,s&&s(S),y.mouseEvent=new h(S,y.editor),y.$mouseMoved=!0}},p=function(S){c.off("beforeEndOperation",w),clearInterval(L),c.session&&g(),y[y.state+"End"]&&y[y.state+"End"](S),y.state="",y.isMousePressed=u.$isMousePressed=!1,u.$keepTextAreaAtCursor&&u.$moveTextAreaToCursor(),y.$onCaptureMouseMove=y.releaseMouse=null,S&&y.onMouseEvent("mouseup",S),c.endOperation()},g=function(){y[y.state]&&y[y.state](),y.$mouseMoved=!1};if(A.isOldIE&&o.domEvent.type=="dblclick")return setTimeout(function(){p(o)});var w=function(S){y.releaseMouse&&c.curOp.command.name&&c.curOp.selectionChanged&&(y[y.state+"End"]&&y[y.state+"End"](),y.state="",y.releaseMouse())};c.on("beforeEndOperation",w),c.startOperation({command:{name:"mouse"}}),y.$onCaptureMouseMove=m,y.releaseMouse=T.capture(this.editor.container,m,p);var L=setInterval(g,20)},e.prototype.cancelContextMenu=function(){var o=function(s){s&&s.domEvent&&s.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",o),s&&s.domEvent&&T.stopEvent(s.domEvent))}.bind(this);setTimeout(o,10),this.editor.on("nativecontextmenu",o)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();t.prototype.releaseMouse=null,i.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:A.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),x.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(k,x,z){var T=k("../lib/dom"),A=function(){function $(a){a.on("click",function(h){var n=h.getDocumentPosition(),r=a.session,i=r.getFoldAt(n.row,n.column,1);i&&(h.getAccelKey()?r.removeFold(i):r.expandFold(i),h.stop());var t=h.domEvent&&h.domEvent.target;t&&T.hasCssClass(t,"ace_inline_button")&&T.hasCssClass(t,"ace_toggle_wrap")&&(r.setOption("wrap",!r.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(h){var n=a.renderer.$gutterLayer.getRegion(h);if(n=="foldWidgets"){var r=h.getDocumentPosition().row,i=a.session;i.foldWidgets&&i.foldWidgets[r]&&a.session.onFoldWidgetClick(r,h),a.isFocused()||a.focus(),h.stop()}}),a.on("gutterdblclick",function(h){var n=a.renderer.$gutterLayer.getRegion(h);if(n=="foldWidgets"){var r=h.getDocumentPosition().row,i=a.session,t=i.getParentFoldRangeData(r,!0),e=t.range||t.firstRange;if(e){r=e.start.row;var o=i.getFoldAt(r,i.getLine(r).length,1);o?i.removeFold(o):(i.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}h.stop()}})}return $}();x.FoldHandler=A}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(k,x,z){var T=k("../lib/keys"),A=k("../lib/event"),$=function(){function a(h){this.$editor=h,this.$data={editor:h},this.$handlers=[],this.setDefaultHandler(h.commands)}return a.prototype.setDefaultHandler=function(h){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=h,this.addKeyboardHandler(h,0)},a.prototype.setKeyboardHandler=function(h){var n=this.$handlers;if(n[n.length-1]!=h){for(;n[n.length-1]&&n[n.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(n[n.length-1]);this.addKeyboardHandler(h,1)}},a.prototype.addKeyboardHandler=function(h,n){if(h){typeof h=="function"&&!h.handleKeyboard&&(h.handleKeyboard=h);var r=this.$handlers.indexOf(h);r!=-1&&this.$handlers.splice(r,1),n==null?this.$handlers.push(h):this.$handlers.splice(n,0,h),r==-1&&h.attach&&h.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(h){var n=this.$handlers.indexOf(h);return n==-1?!1:(this.$handlers.splice(n,1),h.detach&&h.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var h=this.$data,n=h.editor;return this.$handlers.map(function(r){return r.getStatusText&&r.getStatusText(n,h)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(h,n,r,i){for(var t,e=!1,o=this.$editor.commands,s=this.$handlers.length;s--&&(t=this.$handlers[s].handleKeyboard(this.$data,h,n,r,i),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=o.exec(t.command,this.$editor,t.args,i),e&&i&&h!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&A.stopEvent(i),e))););return!e&&h==-1&&(t={command:"insertstring"},e=o.exec("insertstring",this.$editor,n)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},a.prototype.onCommandKey=function(h,n,r){var i=T.keyCodeToString(r);return this.$callKeyboardHandlers(n,i,r,h)},a.prototype.onTextInput=function(h){return this.$callKeyboardHandlers(-1,h)},a}();x.KeyBinding=$}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(k,x,z){var T=0,A=0,$=!1,a=!1,h=!1,n=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],r=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],i=0,t=1,e=0,o=1,s=2,c=3,u=4,y=5,m=6,p=7,g=8,w=9,L=10,S=11,b=12,R=13,d=14,l=15,f=16,v=17,C=18,M=[C,C,C,C,C,C,C,C,C,m,y,m,g,y,C,C,C,C,C,C,C,C,C,C,C,C,C,C,y,y,y,m,g,u,u,S,S,S,u,u,u,u,u,L,w,L,w,w,s,s,s,s,s,s,s,s,s,s,w,u,u,u,u,u,u,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,u,u,u,u,u,u,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,u,u,u,u,C,C,C,C,C,C,y,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,w,u,S,S,S,S,u,u,u,u,e,u,u,C,u,u,S,S,s,s,u,e,u,u,u,s,e,u,u,u,u,u],E=[g,g,g,g,g,g,g,g,g,g,g,C,C,C,e,o,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,g,y,R,d,l,f,v,w,S,S,S,S,S,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,w,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,g];function _(D,N,W,F){var P=T?r:n,j=null,V=null,U=null,K=0,J=null,oe=null,re=-1,q=null,ae=null,le=[];if(!F)for(q=0,F=[];q<W;q++)F[q]=H(D[q]);for(A=T,$=!1,a=!1,h=!1,ae=0;ae<W;ae++){if(j=K,le[ae]=V=O(D,F,le,ae),K=P[j][V],J=K&240,K&=15,N[ae]=U=P[K][5],J>0)if(J==16){for(q=re;q<ae;q++)N[q]=1;re=-1}else re=-1;if(oe=P[K][6],oe)re==-1&&(re=ae);else if(re>-1){for(q=re;q<ae;q++)N[q]=U;re=-1}F[ae]==y&&(N[ae]=0),A|=U}if(h){for(q=0;q<W;q++)if(F[q]==m){N[q]=T;for(var ce=q-1;ce>=0&&F[ce]==g;ce--)N[ce]=T}}}function I(D,N,W){if(!(A<D)){if(D==1&&T==t&&!a){W.reverse();return}for(var F=W.length,P=0,j,V,U,K;P<F;){if(N[P]>=D){for(j=P+1;j<F&&N[j]>=D;)j++;for(V=P,U=j-1;V<U;V++,U--)K=W[V],W[V]=W[U],W[U]=K;P=j}P++}}}function O(D,N,W,F){var P=N[F],j,V,U,K;switch(P){case e:case o:$=!1;case u:case c:return P;case s:return $?c:s;case p:return $=!0,o;case g:return u;case w:return F<1||F+1>=N.length||(j=W[F-1])!=s&&j!=c||(V=N[F+1])!=s&&V!=c?u:($&&(V=c),V==j?V:u);case L:return j=F>0?W[F-1]:y,j==s&&F+1<N.length&&N[F+1]==s?s:u;case S:if(F>0&&W[F-1]==s)return s;if($)return u;for(K=F+1,U=N.length;K<U&&N[K]==S;)K++;return K<U&&N[K]==s?s:u;case b:for(U=N.length,K=F+1;K<U&&N[K]==b;)K++;if(K<U){var J=D[F],oe=J>=1425&&J<=2303||J==64286;if(j=N[K],oe&&(j==o||j==p))return o}return F<1||(j=N[F-1])==y?u:W[F-1];case y:return $=!1,a=!0,T;case m:return h=!0,u;case R:case d:case f:case v:case l:$=!1;case C:return u}}function H(D){var N=D.charCodeAt(0),W=N>>8;return W==0?N>191?e:M[N]:W==5?/[\u0591-\u05f4]/.test(D)?o:e:W==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(D)?b:/[\u0660-\u0669\u066b-\u066c]/.test(D)?c:N==1642?S:/[\u06f0-\u06f9]/.test(D)?s:p:W==32&&N<=8287?E[N&255]:W==254&&N>=65136?p:u}x.L=e,x.R=o,x.EN=s,x.ON_R=3,x.AN=4,x.R_H=5,x.B=6,x.RLE=7,x.DOT="·",x.doBidiReorder=function(D,N,W){if(D.length<2)return{};var F=D.split(""),P=new Array(F.length),j=new Array(F.length),V=[];T=W?t:i,_(F,V,F.length,N);for(var U=0;U<P.length;P[U]=U,U++);I(2,V,P),I(1,V,P);for(var U=0;U<P.length-1;U++)N[U]===c?V[U]=x.AN:V[U]===o&&(N[U]>p&&N[U]<R||N[U]===u||N[U]===C)?V[U]=x.ON_R:U>0&&F[U-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(F[U])&&(V[U-1]=V[U]=x.R_H,U++);F[F.length-1]===x.DOT&&(V[F.length-1]=x.B),F[0]==="‫"&&(V[0]=x.RLE);for(var U=0;U<P.length;U++)j[U]=V[P[U]];return{logicalFromVisual:P,bidiLevels:j}},x.hasBidiCharacters=function(D,N){for(var W=!1,F=0;F<D.length;F++)N[F]=H(D.charAt(F)),!W&&(N[F]==o||N[F]==p||N[F]==c)&&(W=!0);return W},x.getVisualFromLogicalIdx=function(D,N){for(var W=0;W<N.logicalFromVisual.length;W++)if(N.logicalFromVisual[W]==D)return W;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(k,x,z){var T=k("./lib/bidiutil"),A=k("./lib/lang"),$=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function h(n){this.session=n,this.bidiMap={},this.currentRow=null,this.bidiUtil=T,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=$.test(n.getValue())}return h.prototype.isBidiRow=function(n,r,i){return this.seenBidi?(n!==this.currentRow&&(this.currentRow=n,this.updateRowLine(r,i),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},h.prototype.onChange=function(n){this.seenBidi?this.currentRow=null:n.action=="insert"&&$.test(n.lines.join(`
179
- `))&&(this.seenBidi=!0,this.currentRow=null)},h.prototype.getDocumentRow=function(){var n=0,r=this.session.$screenRowCache;if(r.length){var i=this.session.$getRowCacheIndex(r,this.currentRow);i>=0&&(n=this.session.$docRowCache[i])}return n},h.prototype.getSplitIndex=function(){var n=0,r=this.session.$screenRowCache;if(r.length)for(var i,t=this.session.$getRowCacheIndex(r,this.currentRow);this.currentRow-n>0&&(i=this.session.$getRowCacheIndex(r,this.currentRow-n-1),i===t);)t=i,n++;else n=this.currentRow;return n},h.prototype.updateRowLine=function(n,r){n===void 0&&(n=this.getDocumentRow());var i=n===this.session.getLength()-1,t=i?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(n),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[n];e&&(r===void 0&&(r=this.getSplitIndex()),r>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[T.L],this.line=r<e.length?this.line.substring(e[r-1],e[r]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[r]),r==e.length&&(this.line+=this.showInvisibles?t:T.DOT))}else this.line+=this.showInvisibles?t:T.DOT;var o=this.session,s=0,c;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(u,y){return u===" "||o.isFullWidth(u.charCodeAt(0))?(c=u===" "?o.getScreenTabSize(y+s):2,s+=c-1,A.stringRepeat(T.DOT,c)):u}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==T.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},h.prototype.updateBidiMap=function(){var n=[];T.hasBidiCharacters(this.line,n)||this.isRtlDir?this.bidiMap=T.doBidiReorder(this.line,n,this.isRtlDir):this.bidiMap={}},h.prototype.markAsDirty=function(){this.currentRow=null},h.prototype.updateCharacterWidths=function(n){if(this.characterWidth!==n.$characterSize.width){this.fontMetrics=n;var r=this.characterWidth=n.$characterSize.width,i=n.$measureCharWidth("ה");this.charWidths[T.L]=this.charWidths[T.EN]=this.charWidths[T.ON_R]=r,this.charWidths[T.R]=this.charWidths[T.AN]=i,this.charWidths[T.R_H]=i*.45,this.charWidths[T.B]=this.charWidths[T.RLE]=0,this.currentRow=null}},h.prototype.setShowInvisibles=function(n){this.showInvisibles=n,this.currentRow=null},h.prototype.setEolChar=function(n){this.EOL=n},h.prototype.setContentWidth=function(n){this.contentWidth=n},h.prototype.isRtlLine=function(n){return this.$isRtl?!0:n!=null?this.session.getLine(n).charAt(0)==this.RLE:this.isRtlDir},h.prototype.setRtlDirection=function(n,r){for(var i=n.getCursorPosition(),t=n.selection.getSelectionAnchor().row;t<=i.row;t++)!r&&n.session.getLine(t).charAt(0)===n.session.$bidiHandler.RLE?n.session.doc.removeInLine(t,0,1):r&&n.session.getLine(t).charAt(0)!==n.session.$bidiHandler.RLE&&n.session.doc.insert({column:0,row:t},n.session.$bidiHandler.RLE)},h.prototype.getPosLeft=function(n){n-=this.wrapIndent;var r=this.line.charAt(0)===this.RLE?1:0,i=n>r?this.session.getOverwrite()?n:n-1:r,t=T.getVisualFromLogicalIdx(i,this.bidiMap),e=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&n<=r&&e[t]%2!==0&&t++;for(var s=0;s<t;s++)o+=this.charWidths[e[s]];return!this.session.getOverwrite()&&n>r&&e[t]%2===0&&(o+=this.charWidths[e[t]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},h.prototype.getSelections=function(n,r){var i=this.bidiMap,t=i.bidiLevels,e,o=[],s=0,c=Math.min(n,r)-this.wrapIndent,u=Math.max(n,r)-this.wrapIndent,y=!1,m=!1,p=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var g,w=0;w<t.length;w++)g=i.logicalFromVisual[w],e=t[w],y=g>=c&&g<u,y&&!m?p=s:!y&&m&&o.push({left:p,width:s-p}),s+=this.charWidths[e],m=y;if(y&&w===t.length&&o.push({left:p,width:s-p}),this.isRtlDir)for(var L=0;L<o.length;L++)o[L].left+=this.rtlLineOffset;return o},h.prototype.offsetToCol=function(i){this.isRtlDir&&(i-=this.rtlLineOffset);var r=0,i=Math.max(i,0),t=0,e=0,o=this.bidiMap.bidiLevels,s=this.charWidths[o[e]];for(this.wrapIndent&&(i-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);i>t+s/2;){if(t+=s,e===o.length-1){s=0;break}s=this.charWidths[o[++e]]}return e>0&&o[e-1]%2!==0&&o[e]%2===0?(i<t&&e--,r=this.bidiMap.logicalFromVisual[e]):e>0&&o[e-1]%2===0&&o[e]%2!==0?r=1+(i>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===o.length-1&&s===0&&o[e-1]%2===0||!this.isRtlDir&&e===0&&o[e]%2!==0?r=1+this.bidiMap.logicalFromVisual[e]:(e>0&&o[e-1]%2!==0&&s!==0&&e--,r=this.bidiMap.logicalFromVisual[e]),r===0&&this.isRtlDir&&r++,r+this.wrapIndent},h}();x.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(k,x,z){var T=k("./lib/oop"),A=k("./lib/lang"),$=k("./lib/event_emitter").EventEmitter,a=k("./range").Range,h=function(){function n(r){this.session=r,this.doc=r.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var i=this;this.cursor.on("change",function(t){i.$cursorChanged=!0,i.$silent||i._emit("changeCursor"),!i.$isEmpty&&!i.$silent&&i._emit("changeSelection"),!i.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(i.$desiredColumn=null)}),this.anchor.on("change",function(){i.$anchorChanged=!0,!i.$isEmpty&&!i.$silent&&i._emit("changeSelection")})}return n.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},n.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},n.prototype.getCursor=function(){return this.lead.getPosition()},n.prototype.setAnchor=function(r,i){this.$isEmpty=!1,this.anchor.setPosition(r,i)},n.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},n.prototype.getSelectionLead=function(){return this.lead.getPosition()},n.prototype.isBackwards=function(){var r=this.anchor,i=this.lead;return r.row>i.row||r.row==i.row&&r.column>i.column},n.prototype.getRange=function(){var r=this.anchor,i=this.lead;return this.$isEmpty?a.fromPoints(i,i):this.isBackwards()?a.fromPoints(i,r):a.fromPoints(r,i)},n.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},n.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},n.prototype.setRange=function(r,i){var t=i?r.end:r.start,e=i?r.start:r.end;this.$setSelection(t.row,t.column,e.row,e.column)},n.prototype.$setSelection=function(r,i,t,e){if(!this.$silent){var o=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(r,i),this.cursor.setPosition(t,e),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||s)&&this._emit("changeSelection")}},n.prototype.$moveSelection=function(r){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),r.call(this)},n.prototype.selectTo=function(r,i){this.$moveSelection(function(){this.moveCursorTo(r,i)})},n.prototype.selectToPosition=function(r){this.$moveSelection(function(){this.moveCursorToPosition(r)})},n.prototype.moveTo=function(r,i){this.clearSelection(),this.moveCursorTo(r,i)},n.prototype.moveToPosition=function(r){this.clearSelection(),this.moveCursorToPosition(r)},n.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},n.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},n.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},n.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},n.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},n.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},n.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},n.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},n.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},n.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},n.prototype.getWordRange=function(r,i){if(typeof i>"u"){var t=r||this.lead;r=t.row,i=t.column}return this.session.getWordRange(r,i)},n.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},n.prototype.selectAWord=function(){var r=this.getCursor(),i=this.session.getAWordRange(r.row,r.column);this.setSelectionRange(i)},n.prototype.getLineRange=function(r,i){var t=typeof r=="number"?r:this.lead.row,e,o=this.session.getFoldLine(t);return o?(t=o.start.row,e=o.end.row):e=t,i===!0?new a(t,0,e,this.session.getLine(e).length):new a(t,0,e+1,0)},n.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},n.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},n.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},n.prototype.wouldMoveIntoSoftTab=function(r,i,t){var e=r.column,o=r.column+i;return t<0&&(e=r.column-i,o=r.column),this.session.isTabStop(r)&&this.doc.getLine(r.row).slice(e,o).split(" ").length-1==i},n.prototype.moveCursorLeft=function(){var r=this.lead.getPosition(),i;if(i=this.session.getFoldAt(r.row,r.column,-1))this.moveCursorTo(i.start.row,i.start.column);else if(r.column===0)r.row>0&&this.moveCursorTo(r.row-1,this.doc.getLine(r.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(r,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},n.prototype.moveCursorRight=function(){var r=this.lead.getPosition(),i;if(i=this.session.getFoldAt(r.row,r.column,1))this.moveCursorTo(i.end.row,i.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var t=this.session.getTabSize(),r=this.lead;this.wouldMoveIntoSoftTab(r,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},n.prototype.moveCursorLineStart=function(){var r=this.lead.row,i=this.lead.column,t=this.session.documentToScreenRow(r,i),e=this.session.screenToDocumentPosition(t,0),o=this.session.getDisplayLine(r,null,e.row,e.column),s=o.match(/^\s*/);s[0].length!=i&&!this.session.$useEmacsStyleLineStart&&(e.column+=s[0].length),this.moveCursorToPosition(e)},n.prototype.moveCursorLineEnd=function(){var r=this.lead,i=this.session.getDocumentLastRowColumnPosition(r.row,r.column);if(this.lead.column==i.column){var t=this.session.getLine(i.row);if(i.column==t.length){var e=t.search(/\s+$/);e>0&&(i.column=e)}}this.moveCursorTo(i.row,i.column)},n.prototype.moveCursorFileEnd=function(){var r=this.doc.getLength()-1,i=this.doc.getLine(r).length;this.moveCursorTo(r,i)},n.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},n.prototype.moveCursorLongWordRight=function(){var r=this.lead.row,i=this.lead.column,t=this.doc.getLine(r),e=t.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(r,i,1);if(o){this.moveCursorTo(o.end.row,o.end.column);return}if(this.session.nonTokenRe.exec(e)&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(i)),i>=t.length){this.moveCursorTo(r,t.length),this.moveCursorRight(),r<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(i+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(r,i)},n.prototype.moveCursorLongWordLeft=function(){var r=this.lead.row,i=this.lead.column,t;if(t=this.session.getFoldAt(r,i,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(r,i,-1);e==null&&(e=this.doc.getLine(r).substring(0,i));var o=A.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(i-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0){this.moveCursorTo(r,0),this.moveCursorLeft(),r>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(r,i)},n.prototype.$shortWordEndIndex=function(r){var i=0,t,e=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(r))i=this.session.tokenRe.lastIndex;else{for(;(t=r[i])&&e.test(t);)i++;if(i<1){for(o.lastIndex=0;(t=r[i])&&!o.test(t);)if(o.lastIndex=0,i++,e.test(t))if(i>2){i--;break}else{for(;(t=r[i])&&e.test(t);)i++;if(i>2)break}}}return o.lastIndex=0,i},n.prototype.moveCursorShortWordRight=function(){var r=this.lead.row,i=this.lead.column,t=this.doc.getLine(r),e=t.substring(i),o=this.session.getFoldAt(r,i,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(i==t.length){var s=this.doc.getLength();do r++,e=this.doc.getLine(r);while(r<s&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),i=0}var c=this.$shortWordEndIndex(e);this.moveCursorTo(r,i+c)},n.prototype.moveCursorShortWordLeft=function(){var r=this.lead.row,i=this.lead.column,t;if(t=this.session.getFoldAt(r,i,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(r).substring(0,i);if(i===0){do r--,e=this.doc.getLine(r);while(r>0&&/^\s*$/.test(e));i=e.length,/\s+$/.test(e)||(e="")}var o=A.stringReverse(e),s=this.$shortWordEndIndex(o);return this.moveCursorTo(r,i-s)},n.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},n.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},n.prototype.moveCursorBy=function(r,i){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(i===0&&(r!==0&&(this.session.$bidiHandler.isBidiRow(t.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(t.column),t.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=t.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?t.column=this.$desiredColumn:this.$desiredColumn=t.column),r!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];r<0?r-=o.rowsAbove||0:r>0&&(r+=o.rowCount-(o.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+r,t.column,e);r!==0&&i===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+i,i===0)},n.prototype.moveCursorToPosition=function(r){this.moveCursorTo(r.row,r.column)},n.prototype.moveCursorTo=function(r,i,t){var e=this.session.getFoldAt(r,i,1);e&&(r=e.start.row,i=e.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(r);/[\uDC00-\uDFFF]/.test(o.charAt(i))&&o.charAt(i-1)&&(this.lead.row==r&&this.lead.column==i+1?i=i-1:i=i+1),this.lead.setPosition(r,i),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},n.prototype.moveCursorToScreen=function(r,i,t){var e=this.session.screenToDocumentPosition(r,i);this.moveCursorTo(e.row,e.column,t)},n.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},n.prototype.fromOrientedRange=function(r){this.setSelectionRange(r,r.cursor==r.start),this.$desiredColumn=r.desiredColumn||this.$desiredColumn},n.prototype.toOrientedRange=function(r){var i=this.getRange();return r?(r.start.column=i.start.column,r.start.row=i.start.row,r.end.column=i.end.column,r.end.row=i.end.row):r=i,r.cursor=this.isBackwards()?r.start:r.end,r.desiredColumn=this.$desiredColumn,r},n.prototype.getRangeOfMovements=function(r){var i=this.getCursor();try{r(this);var t=this.getCursor();return a.fromPoints(i,t)}catch{return a.fromPoints(i,i)}finally{this.moveCursorToPosition(i)}},n.prototype.toJSON=function(){if(this.rangeCount)var r=this.ranges.map(function(i){var t=i.clone();return t.isBackwards=i.cursor==i.start,t});else{var r=this.getRange();r.isBackwards=this.isBackwards()}return r},n.prototype.fromJSON=function(r){if(r.start==null)if(this.rangeList&&r.length>1){this.toSingleRange(r[0]);for(var i=r.length;i--;){var t=a.fromPoints(r[i].start,r[i].end);r[i].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else r=r[0];this.rangeList&&this.toSingleRange(r),this.setSelectionRange(r,r.isBackwards)},n.prototype.isEqual=function(r){if((r.length||this.rangeCount)&&r.length!=this.rangeCount)return!1;if(!r.length||!this.ranges)return this.getRange().isEqual(r);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(r[i]))return!1;return!0},n}();h.prototype.setSelectionAnchor=h.prototype.setAnchor,h.prototype.getSelectionAnchor=h.prototype.getAnchor,h.prototype.setSelectionRange=h.prototype.setRange,T.implement(h.prototype,$),x.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(k,x,z){var T=k("./lib/report_error").reportError,A=2e3,$=function(){function a(h){this.splitRegex,this.states=h,this.regExps={},this.matchMappings={};for(var n in this.states){for(var r=this.states[n],i=[],t=0,e=this.matchMappings[n]={defaultToken:"text"},o="g",s=[],c=0;c<r.length;c++){var u=r[c];if(u.defaultToken&&(e.defaultToken=u.defaultToken),u.caseInsensitive&&o.indexOf("i")===-1&&(o+="i"),u.unicode&&o.indexOf("u")===-1&&(o+="u"),u.regex!=null){u.regex instanceof RegExp&&(u.regex=u.regex.toString().slice(1,-1));var y=u.regex,m=new RegExp("(?:("+y+")|(.))").exec("a").length-2;Array.isArray(u.token)?u.token.length==1||m==1?u.token=u.token[0]:m-1!=u.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:u,groupCount:m-1}),u.token=u.token[0]):(u.tokenArray=u.token,u.token=null,u.onMatch=this.$arrayTokens):typeof u.token=="function"&&!u.onMatch&&(m>1?u.onMatch=this.$applyToken:u.onMatch=u.token),m>1&&(/\\\d/.test(u.regex)?y=u.regex.replace(/\\([0-9]+)/g,function(p,g){return"\\"+(parseInt(g,10)+t+1)}):(m=1,y=this.removeCapturingGroups(u.regex)),!u.splitRegex&&typeof u.token!="string"&&s.push(u)),e[t]=c,t+=m,i.push(y),u.onMatch||(u.onMatch=null)}}i.length||(e[0]=0,i.push("$")),s.forEach(function(p){p.splitRegex=this.createSplitterRegexp(p.regex,o)},this),this.regExps[n]=new RegExp("("+i.join(")|(")+")|($)",o)}}return a.prototype.$setMaxTokenCount=function(h){A=h|0},a.prototype.$applyToken=function(h){var n=this.splitRegex.exec(h).slice(1),r=this.token.apply(this,n);if(typeof r=="string")return[{type:r,value:h}];for(var i=[],t=0,e=r.length;t<e;t++)n[t]&&(i[i.length]={type:r[t],value:n[t]});return i},a.prototype.$arrayTokens=function(h){if(!h)return[];var n=this.splitRegex.exec(h);if(!n)return"text";for(var r=[],i=this.tokenArray,t=0,e=i.length;t<e;t++)n[t+1]&&(r[r.length]={type:i[t],value:n[t+1]});return r},a.prototype.removeCapturingGroups=function(h){var n=h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(r,i){return i?"(?:":r});return n},a.prototype.createSplitterRegexp=function(h,n){if(h.indexOf("(?=")!=-1){var r=0,i=!1,t={};h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,o,s,c,u,y){return i?i=u!="]":u?i=!0:c?(r==t.stack&&(t.end=y+1,t.stack=-1),r--):s&&(r++,s.length!=1&&(t.stack=r,t.start=y)),e}),t.end!=null&&/^\)*$/.test(h.substr(t.end))&&(h=h.substring(0,t.start)+h.substr(t.end))}return h.charAt(0)!="^"&&(h="^"+h),h.charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(n||"").replace("g",""))},a.prototype.getLineTokens=function(h,n){if(n&&typeof n!="string"){var r=n.slice(0);n=r[0],n==="#tmp"&&(r.shift(),n=r.shift())}else var r=[];var i=n||"start",t=this.states[i];t||(i="start",t=this.states[i]);var e=this.matchMappings[i],o=this.regExps[i];o.lastIndex=0;for(var s,c=[],u=0,y=0,m={type:null,value:""};s=o.exec(h);){var p=e.defaultToken,g=null,w=s[0],L=o.lastIndex;if(L-w.length>u){var S=h.substring(u,L-w.length);m.type==p?m.value+=S:(m.type&&c.push(m),m={type:p,value:S})}for(var b=0;b<s.length-2;b++)if(s[b+1]!==void 0){g=t[e[b]],g.onMatch?p=g.onMatch(w,i,r,h):p=g.token,g.next&&(typeof g.next=="string"?i=g.next:i=g.next(i,r),t=this.states[i],t||(this.reportError("state doesn't exist",i),i="start",t=this.states[i]),e=this.matchMappings[i],u=L,o=this.regExps[i],o.lastIndex=L),g.consumeLineEnd&&(u=L);break}if(w){if(typeof p=="string")(!g||g.merge!==!1)&&m.type===p?m.value+=w:(m.type&&c.push(m),m={type:p,value:w});else if(p){m.type&&c.push(m),m={type:null,value:""};for(var b=0;b<p.length;b++)c.push(p[b])}}if(u==h.length)break;if(u=L,y++>A){for(y>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:n,line:h});u<h.length;)m.type&&c.push(m),m={value:h.substring(u,u+=500),type:"overflow"};i="start",r=[];break}}return m.type&&c.push(m),r.length>1&&r[0]!==i&&r.unshift("#tmp",i),{tokens:c,state:r.length?r:i}},a}();$.prototype.reportError=T,x.Tokenizer=$}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(k,x,z){var T=k("../lib/deep_copy").deepCopy,A;A=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(h,n){if(!n){for(var r in h)this.$rules[r]=h[r];return}for(var r in h){for(var i=h[r],t=0;t<i.length;t++){var e=i[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(n)!==0&&(e.next=n+e.next),e.nextState&&e.nextState.indexOf(n)!==0&&(e.nextState=n+e.nextState))}this.$rules[n+r]=i}},this.getRules=function(){return this.$rules},this.embedRules=function(h,n,r,i,t){var e=typeof h=="function"?new h().getRules():h;if(i)for(var o=0;o<i.length;o++)i[o]=n+i[o];else{i=[];for(var s in e)i.push(n+s)}if(this.addRules(e,n),r)for(var c=Array.prototype[t?"push":"unshift"],o=0;o<i.length;o++)c.apply(this.$rules[i[o]],T(r));this.$embeds||(this.$embeds=[]),this.$embeds.push(n)},this.getEmbeds=function(){return this.$embeds};var $=function(h,n){return(h!="start"||n.length)&&n.unshift(this.nextState,h),this.nextState},a=function(h,n){return n.shift(),n.shift()||"start"};this.normalizeRules=function(){var h=0,n=this.$rules;function r(i){var t=n[i];t.processed=!0;for(var e=0;e<t.length;e++){var o=t[e],s=null;Array.isArray(o)&&(s=o,o={}),!o.regex&&o.start&&(o.regex=o.start,o.next||(o.next=[]),o.next.push({defaultToken:o.token},{token:o.token+".end",regex:o.end||o.start,next:"pop"}),o.token=o.token+".start",o.push=!0);var c=o.next||o.push;if(c&&Array.isArray(c)){var u=o.stateName;u||(u=o.token,typeof u!="string"&&(u=u[0]||""),n[u]&&(u+=h++)),n[u]=c,o.next=u,r(u)}else c=="pop"&&(o.next=a);if(o.push&&(o.nextState=o.next||o.push,o.next=$,delete o.push),o.rules)for(var y in o.rules)n[y]?n[y].push&&n[y].push.apply(n[y],o.rules[y]):n[y]=o.rules[y];var m=typeof o=="string"?o:o.include;if(m&&(m==="$self"&&(m="start"),Array.isArray(m)?s=m.map(function(g){return n[g]}):s=n[m]),s){var p=[e,1].concat(s);o.noEscape&&(p=p.filter(function(g){return!g.next})),t.splice.apply(t,p),e--}o.keywordMap&&(o.token=this.createKeywordMapper(o.keywordMap,o.defaultToken||"text",o.caseInsensitive),delete o.defaultToken)}}Object.keys(n).forEach(r,this)},this.createKeywordMapper=function(h,n,r,i){var t=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(e){for(var o=h[e],s=o.split(i||"|"),c=s.length;c--;){var u=s[c];this.$keywordList.push(u),r&&(u=u.toLowerCase()),t[u]=e}},this),h=null,r?function(e){return t[e.toLowerCase()]||n}:function(e){return t[e]||n}},this.getKeywords=function(){return this.$keywords}}.call(A.prototype),x.TextHighlightRules=A}),ace.define("ace/mode/behaviour",["require","exports","module"],function(k,x,z){var T;T=function(){this.$behaviours={}},function(){this.add=function(A,$,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[A]:this.$behaviours[A]={}}this.$behaviours[A][$]=a},this.addBehaviours=function(A){for(var $ in A)for(var a in A[$])this.add($,a,A[$][a])},this.remove=function(A){this.$behaviours&&this.$behaviours[A]&&delete this.$behaviours[A]},this.inherit=function(A,$){if(typeof A=="function")var a=new A().getBehaviours($);else var a=A.getBehaviours($);this.addBehaviours(a)},this.getBehaviours=function(A){if(A){for(var $={},a=0;a<A.length;a++)this.$behaviours[A[a]]&&($[A[a]]=this.$behaviours[A[a]]);return $}else return this.$behaviours}}.call(T.prototype),x.Behaviour=T}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(k,x,z){var T=k("./range").Range,A=function(){function $(a,h,n){this.$session=a,this.$row=h,this.$rowTokens=a.getTokens(h);var r=a.getTokenAt(h,n);this.$tokenIndex=r?r.index:-1}return $.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},$.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},$.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},$.prototype.getCurrentTokenRow=function(){return this.$row},$.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,h=this.$tokenIndex,n=a[h].start;if(n!==void 0)return n;for(n=0;h>0;)h-=1,n+=a[h].value.length;return n},$.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},$.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new T(this.$row,h,this.$row,h+a.value.length)},$}();x.TokenIterator=A}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(k,x,z){var T=k("../../lib/oop"),A=k("../behaviour").Behaviour,$=k("../../token_iterator").TokenIterator,a=k("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],n=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],r,i={},t={'"':'"',"'":"'"},e=function(c){var u=-1;if(c.multiSelect&&(u=c.selection.index,i.rangeCount!=c.multiSelect.rangeCount&&(i={rangeCount:c.multiSelect.rangeCount})),i[u])return r=i[u];r=i[u]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},o=function(c,u,y,m){var p=c.end.row-c.start.row;return{text:y+u+m,selection:[0,c.start.column+1,p,c.end.column+(p?0:1)]}},s;s=function(c){c=c||{},this.add("braces","insertion",function(u,y,m,p,g){var w=m.getCursorPosition(),L=p.doc.getLine(w.row);if(g=="{"){e(m);var S=m.getSelectionRange(),b=p.doc.getTextRange(S),R=p.getTokenAt(w.row,w.column);if(b!==""&&b!=="{"&&m.getWrapBehavioursEnabled())return o(S,b,"{","}");if(R&&/(?:string)\.quasi|\.xml/.test(R.type)){var d=[/tag\-(?:open|name)/,/attribute\-name/];return d.some(function(_){return _.test(R.type)})||/(string)\.quasi/.test(R.type)&&R.value[w.column-R.start-1]!=="$"?void 0:(s.recordAutoInsert(m,p,"}"),{text:"{}",selection:[1,1]})}else if(s.isSaneInsertion(m,p))return/[\]\}\)]/.test(L[w.column])||m.inMultiSelectMode||c.braces?(s.recordAutoInsert(m,p,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(m,p,"{"),{text:"{",selection:[1,1]})}else if(g=="}"){e(m);var l=L.substring(w.column,w.column+1);if(l=="}"){var f=p.$findOpeningBracket("}",{column:w.column+1,row:w.row});if(f!==null&&s.isAutoInsertedClosing(w,L,g))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(g==`
180
- `||g==`\r
181
- `){e(m);var v="";s.isMaybeInsertedClosing(w,L)&&(v=a.stringRepeat("}",r.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var l=L.substring(w.column,w.column+1);if(l==="}"){var C=p.findMatchingBracket({row:w.row,column:w.column+1},"}");if(!C)return null;var M=this.$getIndent(p.getLine(C.row))}else if(v)var M=this.$getIndent(L);else{s.clearMaybeInsertedClosing();return}var E=M+p.getTabString();return{text:`
182
- `+E+`
183
- `+M+v,selection:[1,E.length,1,E.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(u,y,m,p,g){var w=p.doc.getTextRange(g);if(!g.isMultiLine()&&w=="{"){e(m);var L=p.doc.getLine(g.start.row),S=L.substring(g.end.column,g.end.column+1);if(S=="}")return g.end.column++,g;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(u,y,m,p,g){if(g=="("){e(m);var w=m.getSelectionRange(),L=p.doc.getTextRange(w);if(L!==""&&m.getWrapBehavioursEnabled())return o(w,L,"(",")");if(s.isSaneInsertion(m,p))return s.recordAutoInsert(m,p,")"),{text:"()",selection:[1,1]}}else if(g==")"){e(m);var S=m.getCursorPosition(),b=p.doc.getLine(S.row),R=b.substring(S.column,S.column+1);if(R==")"){var d=p.$findOpeningBracket(")",{column:S.column+1,row:S.row});if(d!==null&&s.isAutoInsertedClosing(S,b,g))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(u,y,m,p,g){var w=p.doc.getTextRange(g);if(!g.isMultiLine()&&w=="("){e(m);var L=p.doc.getLine(g.start.row),S=L.substring(g.start.column+1,g.start.column+2);if(S==")")return g.end.column++,g}}),this.add("brackets","insertion",function(u,y,m,p,g){if(g=="["){e(m);var w=m.getSelectionRange(),L=p.doc.getTextRange(w);if(L!==""&&m.getWrapBehavioursEnabled())return o(w,L,"[","]");if(s.isSaneInsertion(m,p))return s.recordAutoInsert(m,p,"]"),{text:"[]",selection:[1,1]}}else if(g=="]"){e(m);var S=m.getCursorPosition(),b=p.doc.getLine(S.row),R=b.substring(S.column,S.column+1);if(R=="]"){var d=p.$findOpeningBracket("]",{column:S.column+1,row:S.row});if(d!==null&&s.isAutoInsertedClosing(S,b,g))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(u,y,m,p,g){var w=p.doc.getTextRange(g);if(!g.isMultiLine()&&w=="["){e(m);var L=p.doc.getLine(g.start.row),S=L.substring(g.start.column+1,g.start.column+2);if(S=="]")return g.end.column++,g}}),this.add("string_dquotes","insertion",function(u,y,m,p,g){var w=p.$mode.$quotes||t;if(g.length==1&&w[g]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(g)!=-1)return;e(m);var L=g,S=m.getSelectionRange(),b=p.doc.getTextRange(S);if(b!==""&&(b.length!=1||!w[b])&&m.getWrapBehavioursEnabled())return o(S,b,L,L);if(!b){var R=m.getCursorPosition(),d=p.doc.getLine(R.row),l=d.substring(R.column-1,R.column),f=d.substring(R.column,R.column+1),v=p.getTokenAt(R.row,R.column),C=p.getTokenAt(R.row,R.column+1);if(l=="\\"&&v&&/escape/.test(v.type))return null;var M=v&&/string|escape/.test(v.type),E=!C||/string|escape/.test(C.type),_;if(f==L)_=M!==E,_&&/string\.end/.test(C.type)&&(_=!1);else{if(M&&!E||M&&E)return null;var I=p.$mode.tokenRe;I.lastIndex=0;var O=I.test(l);I.lastIndex=0;var H=I.test(f),D=p.$mode.$pairQuotesAfter,N=D&&D[L]&&D[L].test(l);if(!N&&O||H||f&&!/[\s;,.})\]\\]/.test(f))return null;var W=d[R.column-2];if(l==L&&(W==L||I.test(W)))return null;_=!0}return{text:_?L+L:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(u,y,m,p,g){var w=p.$mode.$quotes||t,L=p.doc.getTextRange(g);if(!g.isMultiLine()&&w.hasOwnProperty(L)){e(m);var S=p.doc.getLine(g.start.row),b=S.substring(g.start.column+1,g.start.column+2);if(b==L)return g.end.column++,g}}),c.closeDocComment!==!1&&this.add("doc comment end","insertion",function(u,y,m,p,g){if(u==="doc-start"&&(g===`
184
- `||g===`\r
185
- `)&&m.selection.isEmpty()){var w=m.getCursorPosition();if(w.column===0)return;for(var L=p.doc.getLine(w.row),S=p.doc.getLine(w.row+1),b=p.getTokens(w.row),R=0,d=0;d<b.length;d++){R+=b[d].value.length;var l=b[d];if(R>=w.column){if(R===w.column){if(!/\.doc/.test(l.type))return;if(/\*\//.test(l.value)){var f=b[d+1];if(!f||!/\.doc/.test(f.type))return}}var v=w.column-(R-l.value.length),C=l.value.indexOf("*/"),M=l.value.indexOf("/**",C>-1?C+2:0);if(M!==-1&&v>M&&v<M+3||C!==-1&&M!==-1&&v>=C&&v<=M||!/\.doc/.test(l.type))return;break}}var E=this.$getIndent(L);if(/\s*\*/.test(S))return/^\s*\*/.test(L)?{text:g+E+"* ",selection:[1,2+E.length,1,2+E.length]}:{text:g+E+" * ",selection:[1,3+E.length,1,3+E.length]};if(/\/\*\*/.test(L.substring(0,w.column)))return{text:g+E+" * "+g+" "+E+"*/",selection:[1,4+E.length,1,4+E.length]}}})},s.isSaneInsertion=function(c,u){var y=c.getCursorPosition(),m=new $(u,y.row,y.column);if(!this.$matchTokenType(m.getCurrentToken()||"text",h)){if(/[)}\]]/.test(c.session.getLine(y.row)[y.column]))return!0;var p=new $(u,y.row,y.column+1);if(!this.$matchTokenType(p.getCurrentToken()||"text",h))return!1}return m.stepForward(),m.getCurrentTokenRow()!==y.row||this.$matchTokenType(m.getCurrentToken()||"text",n)},s.$matchTokenType=function(c,u){return u.indexOf(c.type||c)>-1},s.recordAutoInsert=function(c,u,y){var m=c.getCursorPosition(),p=u.doc.getLine(m.row);this.isAutoInsertedClosing(m,p,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=m.row,r.autoInsertedLineEnd=y+p.substr(m.column),r.autoInsertedBrackets++},s.recordMaybeInsert=function(c,u,y){var m=c.getCursorPosition(),p=u.doc.getLine(m.row);this.isMaybeInsertedClosing(m,p)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=m.row,r.maybeInsertedLineStart=p.substr(0,m.column)+y,r.maybeInsertedLineEnd=p.substr(m.column),r.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(c,u,y){return r.autoInsertedBrackets>0&&c.row===r.autoInsertedRow&&y===r.autoInsertedLineEnd[0]&&u.substr(c.column)===r.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(c,u){return r.maybeInsertedBrackets>0&&c.row===r.maybeInsertedRow&&u.substr(c.column)===r.maybeInsertedLineEnd&&u.substr(0,c.column)==r.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},T.inherits(s,A),x.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(k,x,z){for(var T=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],A=0,$=[],a=0;a<T.length;a+=2)$.push(A+=T[a]),T[a+1]&&$.push(45,A+=T[a+1]);x.wordChars=String.fromCharCode.apply(null,$)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(k,x,z){var T=k("../config"),A=k("../tokenizer").Tokenizer,$=k("./text_highlight_rules").TextHighlightRules,a=k("./behaviour/cstyle").CstyleBehaviour,h=k("../unicode"),n=k("../lib/lang"),r=k("../token_iterator").TokenIterator,i=k("../range").Range,t;t=function(){this.HighlightRules=$},function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new A(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,o,s,c){var u=o.doc,y=!0,m=!0,p=1/0,g=o.getTabSize(),w=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var b=this.lineCommentStart.map(n.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var b=n.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;b=new RegExp("^(\\s*)(?:"+b+") ?"),w=o.getUseSoftTabs();var l=function(H,D){var N=H.match(b);if(N){var W=N[1].length,F=N[0].length;!C(H,W,F)&&N[0][F-1]==" "&&F--,u.removeInLine(D,W,F)}},v=L+" ",d=function(H,D){(!y||/\S/.test(H))&&(C(H,p,p)?u.insertInLine({row:D,column:p},v):u.insertInLine({row:D,column:p},L))},f=function(H,D){return b.test(H)},C=function(H,D,N){for(var W=0;D--&&H.charAt(D)==" ";)W++;if(W%g!=0)return!1;for(var W=0;H.charAt(N++)==" ";)W++;return g>2?W%g!=g-1:W%g==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,S=this.blockComment.end,b=new RegExp("^(\\s*)(?:"+n.escapeRegExp(L)+")"),R=new RegExp("(?:"+n.escapeRegExp(S)+")\\s*$"),d=function(_,I){f(_,I)||(!y||/\S/.test(_))&&(u.insertInLine({row:I,column:_.length},S),u.insertInLine({row:I,column:p},L))},l=function(_,I){var O;(O=_.match(R))&&u.removeInLine(I,_.length-O[0].length,_.length),(O=_.match(b))&&u.removeInLine(I,O[1].length,O[0].length)},f=function(_,I){if(b.test(_))return!0;for(var O=o.getTokens(I),H=0;H<O.length;H++)if(O[H].type==="comment")return!0}}function M(_){for(var I=s;I<=c;I++)_(u.getLine(I),I)}var E=1/0;M(function(_,I){var O=_.search(/\S/);O!==-1?(O<p&&(p=O),m&&!f(_,I)&&(m=!1)):E>_.length&&(E=_.length)}),p==1/0&&(p=E,y=!1,m=!1),w&&p%g!=0&&(p=Math.floor(p/g)*g),M(m?l:d)},this.toggleBlockComment=function(e,o,s,c){var u=this.blockComment;if(u){!u.start&&u[0]&&(u=u[0]);var y=new r(o,c.row,c.column),m=y.getCurrentToken();o.selection;var p=o.selection.toOrientedRange(),g,w;if(m&&/comment/.test(m.type)){for(var L,S;m&&/comment/.test(m.type);){var b=m.value.indexOf(u.start);if(b!=-1){var R=y.getCurrentTokenRow(),d=y.getCurrentTokenColumn()+b;L=new i(R,d,R,d+u.start.length);break}m=y.stepBackward()}for(var y=new r(o,c.row,c.column),m=y.getCurrentToken();m&&/comment/.test(m.type);){var b=m.value.indexOf(u.end);if(b!=-1){var R=y.getCurrentTokenRow(),d=y.getCurrentTokenColumn()+b;S=new i(R,d,R,d+u.end.length);break}m=y.stepForward()}S&&o.remove(S),L&&(o.remove(L),g=L.start.row,w=-u.start.length)}else w=u.start.length,g=s.start.row,o.insert(s.end,u.end),o.insert(s.start,u.start);p.start.row==g&&(p.start.column+=w),p.end.row==g&&(p.end.column+=w),o.selection.fromOrientedRange(p)}},this.getNextLineIndent=function(e,o,s){return this.$getIndent(o)},this.checkOutdent=function(e,o,s){return!1},this.autoOutdent=function(e,o,s){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var o in e)if(e[o]){var s=e[o],c=s.prototype.$id,u=T.$modes[c];u||(T.$modes[c]=u=new s),T.$modes[o]||(T.$modes[o]=u),this.$embeds.push(o),this.$modes[o]=u}for(var y=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],m=function(g){(function(w){var L=y[g],S=w[L];w[y[g]]=function(){return this.$delegator(L,arguments,S)}})(p)},p=this,o=0;o<y.length;o++)m(o)},this.$delegator=function(e,o,s){var c=o[0]||"start";if(typeof c!="string"){if(Array.isArray(c[2])){var u=c[2][c[2].length-1],y=this.$modes[u];if(y)return y[e].apply(y,[c[1]].concat([].slice.call(o,1)))}c=c[0]||"start"}for(var m=0;m<this.$embeds.length;m++)if(this.$modes[this.$embeds[m]]){var p=c.split(this.$embeds[m]);if(!p[0]&&p[1]){o[0]=p[1];var y=this.$modes[this.$embeds[m]];return y[e].apply(y,o)}}var g=s.apply(this,o);return s?g:void 0},this.transformAction=function(e,o,s,c,u){if(this.$behaviour){var y=this.$behaviour.getBehaviours();for(var m in y)if(y[m][o]){var p=y[m][o].apply(this,arguments);if(p)return p}}},this.getKeywords=function(e){if(!this.completionKeywords){var o=this.$tokenizer.rules,s=[];for(var c in o)for(var u=o[c],y=0,m=u.length;y<m;y++)if(typeof u[y].token=="string")/keyword|support|storage/.test(u[y].token)&&s.push(u[y].regex);else if(typeof u[y].token=="object"){for(var p=0,g=u[y].token.length;p<g;p++)if(/keyword|support|storage/.test(u[y].token[p])){var c=u[y].regex.match(/\(.+?\)/g)[p];s.push(c.substr(1,c.length-2))}}this.completionKeywords=s}return e?s.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,o,s,c){var u=this.$keywordList||this.$createKeywordList();return u.map(function(y){return{name:y,value:y,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}.call(t.prototype),x.Mode=t}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(k,x,z){var T=k("./lib/dom"),A=function(){function $(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return $.prototype.getRowLength=function(a){var h;return this.lineWidgets?h=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[a]?1+h:this.$wrapData[a].length+1+h},$.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(a+=h.rowCount)}),a},$.prototype.$onChangeEditor=function(a){this.attach(a.editor)},$.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},$.prototype.detach=function(a){var h=this.editor;if(h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(r){r&&r.el&&r.el.parentNode&&(r._inDocument=!1,r.el.parentNode.removeChild(r.el))})}},$.prototype.updateOnFold=function(a,h){var n=h.lineWidgets;if(!(!n||!a.action)){for(var r=a.data,i=r.start.row,t=r.end.row,e=a.action=="add",o=i+1;o<t;o++)n[o]&&(n[o].hidden=e);n[t]&&(e?n[i]?n[t].hidden=e:n[i]=n[t]:(n[i]==n[t]&&(n[i]=void 0),n[t].hidden=e))}},$.prototype.updateOnChange=function(a){var h=this.session.lineWidgets;if(h){var n=a.start.row,r=a.end.row-n;if(r!==0)if(a.action=="remove"){var i=h.splice(n+1,r);!h[n]&&i[i.length-1]&&(h[n]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(r);h[n]&&h[n].column!=null&&a.start.column>h[n].column&&n++,t.unshift(n,0),h.splice.apply(h,t),this.$updateRows()}}},$.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var h=!0;a.forEach(function(n,r){if(n)for(h=!1,n.row=r;n.$oldWidget;)n.$oldWidget.row=r,n=n.$oldWidget}),h&&(this.session.lineWidgets=null)}},$.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[a.row];return h&&(a.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},$.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var h=this.editor.renderer;a.html&&!a.el&&(a.el=T.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=T.createElement("div"),a.el.textContent=a.text),a.el&&(T.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&T.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",h.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/h.layerConfig.lineHeight);var n=this.session.getFoldAt(a.row,0);if(a.$fold=n,n){var r=this.session.lineWidgets;a.row==n.end.row&&!r[n.start.row]?r[n.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(a),a},$.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var h=this.session.lineWidgets[a.row];if(h==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;h;){if(h.$oldWidget==a){h.$oldWidget=a.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},$.prototype.getWidgetsAtRow=function(a){for(var h=this.session.lineWidgets,n=h&&h[a],r=[];n;)r.push(n),n=n.$oldWidget;return r},$.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},$.prototype.measureWidgets=function(a,h){var n=this.session._changedWidgets,r=h.layerConfig;if(!(!n||!n.length)){for(var i=1/0,t=0;t<n.length;t++){var e=n[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,h.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/r.characterWidth));var o=e.h/r.lineHeight;e.coverLine&&(o-=this.session.getRowLineCount(e.row),o<0&&(o=0)),e.rowCount!=o&&(e.rowCount=o,e.row<i&&(i=e.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},$.prototype.renderWidgets=function(a,h){var n=h.layerConfig,r=this.session.lineWidgets;if(r){for(var i=Math.min(this.firstRow,n.firstRow),t=Math.max(this.lastRow,n.lastRow,r.length);i>0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,h.$cursorLayer.config=n;for(var e=i;e<=t;e++){var o=r[e];if(!(!o||!o.el)){if(o.hidden){o.el.style.top=-100-(o.pixelHeight||0)+"px";continue}o._inDocument||(o._inDocument=!0,h.container.appendChild(o.el));var s=h.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;o.coverLine||(s+=n.lineHeight*this.session.getRowLineCount(o.row)),o.el.style.top=s-n.offset+"px";var c=o.coverGutter?0:h.gutterWidth;o.fixedWidth||(c-=h.scrollLeft),o.el.style.left=c+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=n.width+2*n.padding+"px"),o.fixedWidth?o.el.style.right=h.scrollBar.getWidth()+"px":o.el.style.right=""}}}},$}();x.LineWidgets=A}),ace.define("ace/apply_delta",["require","exports","module"],function(k,x,z){x.applyDelta=function(T,A,$){var a=A.start.row,h=A.start.column,n=T[a]||"";switch(A.action){case"insert":var r=A.lines;if(r.length===1)T[a]=n.substring(0,h)+A.lines[0]+n.substring(h);else{var i=[a,1].concat(A.lines);T.splice.apply(T,i),T[a]=n.substring(0,h)+T[a],T[a+A.lines.length-1]+=n.substring(h)}break;case"remove":var t=A.end.column,e=A.end.row;a===e?T[a]=n.substring(0,h)+n.substring(t):T.splice(a,e-a+1,n.substring(0,h)+T[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(k,x,z){var T=k("./lib/oop"),A=k("./lib/event_emitter").EventEmitter,$=function(){function n(r,i,t){this.$onChange=this.onChange.bind(this),this.attach(r),typeof i!="number"?this.setPosition(i.row,i.column):this.setPosition(i,t)}return n.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},n.prototype.getDocument=function(){return this.document},n.prototype.onChange=function(r){if(!(r.start.row==r.end.row&&r.start.row!=this.row)&&!(r.start.row>this.row)){var i=h(r,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},n.prototype.setPosition=function(r,i,t){var e;if(t?e={row:r,column:i}:e=this.$clipPositionToDocument(r,i),!(this.row==e.row&&this.column==e.column)){var o={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:o,value:e})}},n.prototype.detach=function(){this.document.off("change",this.$onChange)},n.prototype.attach=function(r){this.document=r||this.document,this.document.on("change",this.$onChange)},n.prototype.$clipPositionToDocument=function(r,i){var t={};return r>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):r<0?(t.row=0,t.column=0):(t.row=r,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,i))),i<0&&(t.column=0),t},n}();$.prototype.$insertRight=!1,T.implement($.prototype,A);function a(n,r,i){var t=i?n.column<=r.column:n.column<r.column;return n.row<r.row||n.row==r.row&&t}function h(n,r,i){var t=n.action=="insert",e=(t?1:-1)*(n.end.row-n.start.row),o=(t?1:-1)*(n.end.column-n.start.column),s=n.start,c=t?s:n.end;return a(r,s,i)?{row:r.row,column:r.column}:a(c,r,!i)?{row:r.row+e,column:r.column+(r.row==c.row?o:0)}:{row:s.row,column:s.column}}x.Anchor=$}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(k,x,z){var T=k("./lib/oop"),A=k("./apply_delta").applyDelta,$=k("./lib/event_emitter").EventEmitter,a=k("./range").Range,h=k("./anchor").Anchor,n=function(){function r(i){this.$lines=[""],i.length===0?this.$lines=[""]:Array.isArray(i)?this.insertMergedLines({row:0,column:0},i):this.insert({row:0,column:0},i)}return r.prototype.setValue=function(i){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},i||"")},r.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},r.prototype.createAnchor=function(i,t){return new h(this,i,t)},r.prototype.$detectNewLine=function(i){var t=i.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:`
186
- `,this._signal("changeNewLineMode")},r.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
187
- `;case"unix":return`
188
- `;default:return this.$autoNewLine||`
189
- `}},r.prototype.setNewLineMode=function(i){this.$newLineMode!==i&&(this.$newLineMode=i,this._signal("changeNewLineMode"))},r.prototype.getNewLineMode=function(){return this.$newLineMode},r.prototype.isNewLine=function(i){return i==`\r
190
- `||i=="\r"||i==`
191
- `},r.prototype.getLine=function(i){return this.$lines[i]||""},r.prototype.getLines=function(i,t){return this.$lines.slice(i,t+1)},r.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},r.prototype.getLength=function(){return this.$lines.length},r.prototype.getTextRange=function(i){return this.getLinesForRange(i).join(this.getNewLineCharacter())},r.prototype.getLinesForRange=function(i){var t;if(i.start.row===i.end.row)t=[this.getLine(i.start.row).substring(i.start.column,i.end.column)];else{t=this.getLines(i.start.row,i.end.row),t[0]=(t[0]||"").substring(i.start.column);var e=t.length-1;i.end.row-i.start.row==e&&(t[e]=t[e].substring(0,i.end.column))}return t},r.prototype.insertLines=function(i,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(i,t)},r.prototype.removeLines=function(i,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(i,t)},r.prototype.insertNewLine=function(i){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(i,["",""])},r.prototype.insert=function(i,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(i,this.$split(t))},r.prototype.insertInLine=function(i,t){var e=this.clippedPos(i.row,i.column),o=this.pos(i.row,i.column+t.length);return this.applyDelta({start:e,end:o,action:"insert",lines:[t]},!0),this.clonePos(o)},r.prototype.clippedPos=function(i,t){var e=this.getLength();i===void 0?i=e:i<0?i=0:i>=e&&(i=e-1,t=void 0);var o=this.getLine(i);return t==null&&(t=o.length),t=Math.min(Math.max(t,0),o.length),{row:i,column:t}},r.prototype.clonePos=function(i){return{row:i.row,column:i.column}},r.prototype.pos=function(i,t){return{row:i,column:t}},r.prototype.$clipPosition=function(i){var t=this.getLength();return i.row>=t?(i.row=Math.max(0,t-1),i.column=this.getLine(t-1).length):(i.row=Math.max(0,i.row),i.column=Math.min(Math.max(i.column,0),this.getLine(i.row).length)),i},r.prototype.insertFullLines=function(i,t){i=Math.min(Math.max(i,0),this.getLength());var e=0;i<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),i--,e=this.$lines[i].length),this.insertMergedLines({row:i,column:e},t)},r.prototype.insertMergedLines=function(i,t){var e=this.clippedPos(i.row,i.column),o={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:o,action:"insert",lines:t}),this.clonePos(o)},r.prototype.remove=function(i){var t=this.clippedPos(i.start.row,i.start.column),e=this.clippedPos(i.end.row,i.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},r.prototype.removeInLine=function(i,t,e){var o=this.clippedPos(i,t),s=this.clippedPos(i,e);return this.applyDelta({start:o,end:s,action:"remove",lines:this.getLinesForRange({start:o,end:s})},!0),this.clonePos(o)},r.prototype.removeFullLines=function(i,t){i=Math.min(Math.max(0,i),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&i>0,o=t<this.getLength()-1,s=e?i-1:i,c=e?this.getLine(s).length:0,u=o?t+1:t,y=o?0:this.getLine(u).length,m=new a(s,c,u,y),p=this.$lines.slice(i,t+1);return this.applyDelta({start:m.start,end:m.end,action:"remove",lines:this.getLinesForRange(m)}),p},r.prototype.removeNewLine=function(i){i<this.getLength()-1&&i>=0&&this.applyDelta({start:this.pos(i,this.getLine(i).length),end:this.pos(i+1,0),action:"remove",lines:["",""]})},r.prototype.replace=function(i,t){if(i instanceof a||(i=a.fromPoints(i.start,i.end)),t.length===0&&i.isEmpty())return i.start;if(t==this.getTextRange(i))return i.end;this.remove(i);var e;return t?e=this.insert(i.start,t):e=i.start,e},r.prototype.applyDeltas=function(i){for(var t=0;t<i.length;t++)this.applyDelta(i[t])},r.prototype.revertDeltas=function(i){for(var t=i.length-1;t>=0;t--)this.revertDelta(i[t])},r.prototype.applyDelta=function(i,t){var e=i.action=="insert";(e?i.lines.length<=1&&!i.lines[0]:!a.comparePoints(i.start,i.end))||(e&&i.lines.length>2e4?this.$splitAndapplyLargeDelta(i,2e4):(A(this.$lines,i,t),this._signal("change",i)))},r.prototype.$safeApplyDelta=function(i){var t=this.$lines.length;(i.action=="remove"&&i.start.row<t&&i.end.row<t||i.action=="insert"&&i.start.row<=t)&&this.applyDelta(i)},r.prototype.$splitAndapplyLargeDelta=function(i,t){for(var e=i.lines,o=e.length-t+1,s=i.start.row,c=i.start.column,u=0,y=0;u<o;u=y){y+=t-1;var m=e.slice(u,y);m.push(""),this.applyDelta({start:this.pos(s+u,c),end:this.pos(s+y,c=0),action:i.action,lines:m},!0)}i.lines=e.slice(u),i.start.row=s+u,i.start.column=c,this.applyDelta(i,!0)},r.prototype.revertDelta=function(i){this.$safeApplyDelta({start:this.clonePos(i.start),end:this.clonePos(i.end),action:i.action=="insert"?"remove":"insert",lines:i.lines.slice()})},r.prototype.indexToPosition=function(i,t){for(var e=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,s=t||0,c=e.length;s<c;s++)if(i-=e[s].length+o,i<0)return{row:s,column:i+e[s].length+o};return{row:c-1,column:i+e[c-1].length+o}},r.prototype.positionToIndex=function(i,t){for(var e=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,s=0,c=Math.min(i.row,e.length),u=t||0;u<c;++u)s+=e[u].length+o;return s+i.column},r.prototype.$split=function(i){return i.split(/\r\n|\r|\n/)},r}();n.prototype.$autoNewLine="",n.prototype.$newLineMode="auto",T.implement(n.prototype,$),x.Document=n}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(k,x,z){var T=k("./lib/oop"),A=k("./lib/event_emitter").EventEmitter,$=function(){function a(h,n){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var r=this;this.$worker=function(){if(r.running){for(var i=new Date,t=r.currentLine,e=-1,o=r.doc,s=t;r.lines[t];)t++;var c=o.getLength(),u=0;for(r.running=!1;t<c;){r.$tokenizeRow(t),e=t;do t++;while(r.lines[t]);if(u++,u%5===0&&new Date-i>20){r.running=setTimeout(r.$worker,20);break}}r.currentLine=t,e==-1&&(e=t),s<=e&&r.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(h,n){var r={first:h,last:n};this._signal("update",{data:r})},a.prototype.start=function(h){this.currentLine=Math.min(h||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(h){var n=h.start.row,r=h.end.row-n;if(r===0)this.lines[n]=null;else if(h.action=="remove")this.lines.splice(n,r+1,null),this.states.splice(n,r+1,null);else{var i=Array(r+1);i.unshift(n,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},a.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},a.prototype.$tokenizeRow=function(h){var n=this.doc.getLine(h),r=this.states[h-1],i=this.tokenizer.getLineTokens(n,r,h);return this.states[h]+""!=i.state+""?(this.states[h]=i.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=i.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();T.implement($.prototype,A),x.BackgroundTokenizer=$}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(k,x,z){var T=k("./lib/lang"),A=k("./range").Range,$=function(){function a(h,n,r){r===void 0&&(r="text"),this.setRegexp(h),this.clazz=n,this.type=r}return a.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},a.prototype.update=function(h,n,r,i){if(this.regExp)for(var t=i.firstRow,e=i.lastRow,o={},s=t;s<=e;s++){var c=this.cache[s];c==null&&(c=T.getMatchOffsets(r.getLine(s),this.regExp),c.length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(p){return new A(s,p.offset,s,p.offset+p.length)}),this.cache[s]=c.length?c:"");for(var u=c.length;u--;){var y=c[u].toScreenRange(r),m=y.toString();o[m]||(o[m]=!0,n.drawSingleLineMarker(h,y,this.clazz,i))}}},a}();$.prototype.MAX_RANGES=500,x.SearchHighlight=$}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(k,x,z){var T=function(){function p(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return p.prototype.addSession=function(g){this.$session=g},p.prototype.add=function(g,w,L){if(!this.$fromUndo&&g!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),w===!1||!this.lastDeltas){this.lastDeltas=[];var S=this.$undoStack.length;S>this.$undoDepth-1&&this.$undoStack.splice(0,S-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),g.id=this.$rev=++this.$maxRev}(g.action=="remove"||g.action=="insert")&&(this.$lastDelta=g),this.lastDeltas.push(g)}},p.prototype.addSelection=function(g,w){this.selections.push({value:g,rev:w||this.$rev})},p.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},p.prototype.markIgnored=function(g,w){w==null&&(w=this.$rev+1);for(var L=this.$undoStack,S=L.length;S--;){var b=L[S][0];if(b.id<=g)break;b.id<w&&(b.ignore=!0)}this.lastDeltas=null},p.prototype.getSelection=function(g,w){for(var L=this.selections,S=L.length;S--;){var b=L[S];if(b.rev<g)return w&&(b=L[S+1]),b}},p.prototype.getRevision=function(){return this.$rev},p.prototype.getDeltas=function(g,w){w==null&&(w=this.$rev+1);for(var L=this.$undoStack,S=null,b=0,R=L.length;R--;){var d=L[R][0];if(d.id<w&&!S&&(S=R+1),d.id<=g){b=R+1;break}}return L.slice(b,S)},p.prototype.getChangedRanges=function(g,w){w==null&&(w=this.$rev+1)},p.prototype.getChangedLines=function(g,w){w==null&&(w=this.$rev+1)},p.prototype.undo=function(g,w){this.lastDeltas=null;var L=this.$undoStack;if(A(L,L.length)){g||(g=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var S=L.pop(),b=null;return S&&(b=g.undoChanges(S,w),this.$redoStack.push(S),this.$syncRev()),this.$fromUndo=!1,b}},p.prototype.redo=function(g,w){if(this.lastDeltas=null,g||(g=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);m(this.$redoStack,L),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(R){R[0].id=++this.$maxRev},this)}var S=this.$redoStack.pop(),b=null;return S&&(b=g.redoChanges(S,w),this.$undoStack.push(S),this.$syncRev()),this.$fromUndo=!1,b},p.prototype.$syncRev=function(){var g=this.$undoStack,w=g[g.length-1],L=w&&w[0].id||0;this.$redoStackBaseRev=L,this.$rev=L},p.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},p.prototype.canUndo=function(){return this.$undoStack.length>0},p.prototype.canRedo=function(){return this.$redoStack.length>0},p.prototype.bookmark=function(g){g==null&&(g=this.$rev),this.mark=g},p.prototype.isAtBookmark=function(){return this.$rev===this.mark},p.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},p.prototype.fromJSON=function(g){this.reset(),this.$undoStack=g.$undoStack,this.$redoStack=g.$redoStack},p.prototype.$prettyPrint=function(g){return g?r(g):r(this.$undoStack)+`
192
- ---
193
- `+r(this.$redoStack)},p}();T.prototype.hasUndo=T.prototype.canUndo,T.prototype.hasRedo=T.prototype.canRedo,T.prototype.isClean=T.prototype.isAtBookmark,T.prototype.markClean=T.prototype.bookmark;function A(p,g){for(var w=g;w--;){var L=p[w];if(L&&!L[0].ignore){for(;w<g-1;){var S=e(p[w],p[w+1]);p[w]=S[0],p[w+1]=S[1],w++}return!0}}}var $=k("./range").Range,a=$.comparePoints;$.comparePoints;function h(p){return{row:p.row,column:p.column}}function n(p){return{start:h(p.start),end:h(p.end),action:p.action,lines:p.lines.slice()}}function r(p){if(p=p||this,Array.isArray(p))return p.map(r).join(`
194
- `);var g="";return p.action?(g=p.action=="insert"?"+":"-",g+="["+p.lines+"]"):p.value&&(Array.isArray(p.value)?g=p.value.map(i).join(`
195
- `):g=i(p.value)),p.start&&(g+=i(p)),(p.id||p.rev)&&(g+=" ("+(p.id||p.rev)+")"),g}function i(p){return p.start.row+":"+p.start.column+"=>"+p.end.row+":"+p.end.column}function t(p,g){var w=p.action=="insert",L=g.action=="insert";if(w&&L)if(a(g.start,p.end)>=0)s(g,p,-1);else if(a(g.start,p.start)<=0)s(p,g,1);else return null;else if(w&&!L)if(a(g.start,p.end)>=0)s(g,p,-1);else if(a(g.end,p.start)<=0)s(p,g,-1);else return null;else if(!w&&L)if(a(g.start,p.start)>=0)s(g,p,1);else if(a(g.start,p.start)<=0)s(p,g,1);else return null;else if(!w&&!L)if(a(g.start,p.start)>=0)s(g,p,1);else if(a(g.end,p.start)<=0)s(p,g,-1);else return null;return[g,p]}function e(p,g){for(var w=p.length;w--;)for(var L=0;L<g.length;L++)if(!t(p[w],g[L])){for(;w<p.length;){for(;L--;)t(g[L],p[w]);L=g.length,w++}return[p,g]}return p.selectionBefore=g.selectionBefore=p.selectionAfter=g.selectionAfter=null,[g,p]}function o(p,g){var w=p.action=="insert",L=g.action=="insert";if(w&&L)a(p.start,g.start)<0?s(g,p,1):s(p,g,1);else if(w&&!L)a(p.start,g.end)>=0?s(p,g,-1):(a(p.start,g.start)<=0||s(p,$.fromPoints(g.start,p.start),-1),s(g,p,1));else if(!w&&L)a(g.start,p.end)>=0?s(g,p,-1):(a(g.start,p.start)<=0||s(g,$.fromPoints(p.start,g.start),-1),s(p,g,1));else if(!w&&!L)if(a(g.start,p.end)>=0)s(g,p,-1);else if(a(g.end,p.start)<=0)s(p,g,-1);else{var S,b;return a(p.start,g.start)<0&&(S=p,p=u(p,g.start)),a(p.end,g.end)>0&&(b=u(p,g.end)),c(g.end,p.start,p.end,-1),b&&!S&&(p.lines=b.lines,p.start=b.start,p.end=b.end,b=p),[g,S,b].filter(Boolean)}return[g,p]}function s(p,g,w){c(p.start,g.start,g.end,w),c(p.end,g.start,g.end,w)}function c(p,g,w,L){p.row==(L==1?g:w).row&&(p.column+=L*(w.column-g.column)),p.row+=L*(w.row-g.row)}function u(p,g){var w=p.lines,L=p.end;p.end=h(g);var S=p.end.row-p.start.row,b=w.splice(S,w.length),R=S?g.column:g.column-p.start.column;w.push(b[0].substring(0,R)),b[0]=b[0].substr(R);var d={start:h(g),end:L,lines:b,action:p.action};return d}function y(p,g){g=n(g);for(var w=p.length;w--;){for(var L=p[w],S=0;S<L.length;S++){var b=L[S],R=o(b,g);g=R[0],R.length!=2&&(R[2]?(L.splice(S+1,1,R[1],R[2]),S++):R[1]||(L.splice(S,1),S--))}L.length||p.splice(w,1)}return p}function m(p,g){for(var w=0;w<g.length;w++)for(var L=g[w],S=0;S<L.length;S++)y(p,L[S])}x.UndoManager=T}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(k,x,z){var T=k("../range").Range,A=function(){function $(a,h){this.foldData=a,Array.isArray(h)?this.folds=h:h=this.folds=[h];var n=h[h.length-1];this.range=new T(h[0].start.row,h[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(r){r.setFoldLine(this)},this)}return $.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(h){h.start.row+=a,h.end.row+=a})},$.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(h,n){return-h.range.compareEnd(n.start.row,n.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},$.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},$.prototype.walk=function(a,h,n){var r=0,i=this.folds,t,e,o,s=!0;h==null&&(h=this.end.row,n=this.end.column);for(var c=0;c<i.length;c++){if(t=i[c],e=t.range.compareStart(h,n),e==-1){a(null,h,n,r,s);return}if(o=a(null,t.start.row,t.start.column,r,s),o=!o&&a(t.placeholder,t.start.row,t.start.column,r),o||e===0)return;s=!t.sameRow,r=t.end.column}a(null,h,n,r,s)},$.prototype.getNextFoldTo=function(a,h){for(var n,r,i=0;i<this.folds.length;i++){if(n=this.folds[i],r=n.range.compareEnd(a,h),r==-1)return{fold:n,kind:"after"};if(r===0)return{fold:n,kind:"inside"}}return null},$.prototype.addRemoveChars=function(a,h,n){var r=this.getNextFoldTo(a,h),i,t;if(r){if(i=r.fold,r.kind=="inside"&&i.start.column!=h&&i.start.row!=a)window.console&&window.console.log(a,h,i);else if(i.start.row==a){t=this.folds;var e=t.indexOf(i);for(e===0&&(this.start.column+=n),e;e<t.length;e++){if(i=t[e],i.start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}}},$.prototype.split=function(a,h){var n=this.getNextFoldTo(a,h);if(!n||n.kind=="inside")return null;var r=n.fold,i=this.folds,t=this.foldData,e=i.indexOf(r),o=i[e-1];this.end.row=o.end.row,this.end.column=o.end.column,i=i.splice(e,i.length-e);var s=new $(t,i);return t.splice(t.indexOf(this)+1,0,s),s},$.prototype.merge=function(a){for(var h=a.folds,n=0;n<h.length;n++)this.addFold(h[n]);var r=this.foldData;r.splice(r.indexOf(a),1)},$.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(h){a.push(" "+h.toString())}),a.push("]"),a.join(`
196
- `)},$.prototype.idxToPosition=function(a){for(var h=0,n=0;n<this.folds.length;n++){var r=this.folds[n];if(a-=r.start.column-h,a<0)return{row:r.start.row,column:r.start.column+a};if(a-=r.placeholder.length,a<0)return r.start;h=r.end.column}return{row:this.end.row,column:this.end.column+a}},$}();x.FoldLine=A}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(k,x,z){var T=k("./range").Range,A=T.comparePoints,$=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(h,n,r){for(var i=this.ranges,t=r||0;t<i.length;t++){var e=i[t],o=A(h,e.end);if(!(o>0)){var s=A(h,e.start);return o===0?n&&s!==0?-t-2:t:s>0||s===0&&!n?t:-t-1}}return-t-1},a.prototype.add=function(h){var n=!h.isEmpty(),r=this.pointIndex(h.start,n);r<0&&(r=-r-1);var i=this.pointIndex(h.end,n,r);return i<0?i=-i-1:i++,this.ranges.splice(r,i-r,h)},a.prototype.addList=function(h){for(var n=[],r=h.length;r--;)n.push.apply(n,this.add(h[r]));return n},a.prototype.substractPoint=function(h){var n=this.pointIndex(h);if(n>=0)return this.ranges.splice(n,1)},a.prototype.merge=function(){var h=[],n=this.ranges;n=n.sort(function(o,s){return A(o.start,s.start)});for(var r=n[0],i,t=1;t<n.length;t++){i=r,r=n[t];var e=A(i.end,r.start);e<0||e==0&&!i.isEmpty()&&!r.isEmpty()||(A(i.end,r.end)<0&&(i.end.row=r.end.row,i.end.column=r.end.column),n.splice(t,1),h.push(r),r=i,t--)}return this.ranges=n,h},a.prototype.contains=function(h,n){return this.pointIndex({row:h,column:n})>=0},a.prototype.containsPoint=function(h){return this.pointIndex(h)>=0},a.prototype.rangeAtPoint=function(h){var n=this.pointIndex(h);if(n>=0)return this.ranges[n]},a.prototype.clipRows=function(h,n){var r=this.ranges;if(r[0].start.row>n||r[r.length-1].start.row<h)return[];var i=this.pointIndex({row:h,column:0});i<0&&(i=-i-1);var t=this.pointIndex({row:n,column:0},i);t<0&&(t=-t-1);for(var e=[],o=i;o<t;o++)e.push(r[o]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(h){this.session&&this.detach(),this.session=h,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(h){for(var n=h.start,r=h.end,i=n.row,t=r.row,e=this.ranges,o=0,s=e.length;o<s;o++){var c=e[o];if(c.end.row>=i)break}if(h.action=="insert")for(var u=t-i,y=-n.column+r.column;o<s;o++){var c=e[o];if(c.start.row>i)break;if(c.start.row==i&&c.start.column>=n.column&&(c.start.column==n.column&&this.$bias<=0||(c.start.column+=y,c.start.row+=u)),c.end.row==i&&c.end.column>=n.column){if(c.end.column==n.column&&this.$bias<0)continue;c.end.column==n.column&&y>0&&o<s-1&&c.end.column>c.start.column&&c.end.column==e[o+1].start.column&&(c.end.column-=y),c.end.column+=y,c.end.row+=u}}else for(var u=i-t,y=n.column-r.column;o<s;o++){var c=e[o];if(c.start.row>t)break;c.end.row<t&&(i<c.end.row||i==c.end.row&&n.column<c.end.column)?(c.end.row=i,c.end.column=n.column):c.end.row==t?c.end.column<=r.column?(u||c.end.column>n.column)&&(c.end.column=n.column,c.end.row=n.row):(c.end.column+=y,c.end.row+=u):c.end.row>t&&(c.end.row+=u),c.start.row<t&&(i<c.start.row||i==c.start.row&&n.column<c.start.column)?(c.start.row=i,c.start.column=n.column):c.start.row==t?c.start.column<=r.column?(u||c.start.column>n.column)&&(c.start.column=n.column,c.start.row=n.row):(c.start.column+=y,c.start.row+=u):c.start.row>t&&(c.start.row+=u)}if(u!=0&&o<s)for(;o<s;o++){var c=e[o];c.start.row+=u,c.end.row+=u}},a}();$.prototype.comparePoints=A,x.RangeList=$}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(k,x,z){var T=this&&this.__extends||function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(o[c]=s[c])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),A=k("../range_list").RangeList,$=function(i){T(t,i);function t(e,o){var s=i.call(this)||this;return s.foldLine=null,s.placeholder=o,s.range=e,s.start=e.start,s.end=e.end,s.sameRow=e.start.row==e.end.row,s.subFolds=s.ranges=[],s}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(o){o.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),o=new t(e,this.placeholder);return this.subFolds.forEach(function(s){o.subFolds.push(s.clone())}),o.collapseChildren=this.collapseChildren,o},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){h(e,this.start);for(var y=e.start.row,m=e.start.column,o=0,s=-1;o<this.subFolds.length&&(s=this.subFolds[o].range.compare(y,m),s==1);o++);var c=this.subFolds[o],u=0;if(s==0){if(c.range.containsRange(e))return c.addSubFold(e);u=1}for(var y=e.range.end.row,m=e.range.end.column,p=o,s=-1;p<this.subFolds.length&&(s=this.subFolds[p].range.compare(y,m),s==1);p++);s==0&&p++;for(var g=this.subFolds.splice(o,p-o,e),w=s==0?g.length-1:g.length,L=u;L<w;L++)e.addSubFold(g[L]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return r(e,this.start)},t}(A);function a(i,t){i.row-=t.row,i.row==0&&(i.column-=t.column)}function h(i,t){a(i.start,t),a(i.end,t)}function n(i,t){i.row==0&&(i.column+=t.column),i.row+=t.row}function r(i,t){n(i.start,t),n(i.end,t)}x.Fold=$}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(k,x,z){var T=k("../range").Range,A=k("./fold_line").FoldLine,$=k("./fold").Fold,a=k("../token_iterator").TokenIterator,h=k("../mouse/mouse_event").MouseEvent;function n(){this.getFoldAt=function(r,i,t){var e=this.getFoldLine(r);if(!e)return null;for(var o=e.folds,s=0;s<o.length;s++){var c=o[s].range;if(c.contains(r,i)){if(t==1&&c.isEnd(r,i)&&!c.isEmpty())continue;if(t==-1&&c.isStart(r,i)&&!c.isEmpty())continue;return o[s]}}},this.getFoldsInRange=function(r){var i=r.start,t=r.end,e=this.$foldData,o=[];i.column+=1,t.column-=1;for(var s=0;s<e.length;s++){var c=e[s].range.compareRange(r);if(c!=2){if(c==-2)break;for(var u=e[s].folds,y=0;y<u.length;y++){var m=u[y];if(c=m.range.compareRange(r),c==-2)break;if(c==2)continue;if(c==42)break;o.push(m)}}}return i.column-=1,t.column+=1,o},this.getFoldsInRangeList=function(r){if(Array.isArray(r)){var i=[];r.forEach(function(t){i=i.concat(this.getFoldsInRange(t))},this)}else var i=this.getFoldsInRange(r);return i},this.getAllFolds=function(){for(var r=[],i=this.$foldData,t=0;t<i.length;t++)for(var e=0;e<i[t].folds.length;e++)r.push(i[t].folds[e]);return r},this.getFoldStringAt=function(r,i,t,e){if(e=e||this.getFoldLine(r),!e)return null;for(var o={end:{column:0}},s,c,u=0;u<e.folds.length;u++){c=e.folds[u];var y=c.range.compareEnd(r,i);if(y==-1){s=this.getLine(c.start.row).substring(o.end.column,c.start.column);break}else if(y===0)return null;o=c}return s||(s=this.getLine(c.start.row).substring(o.end.column)),t==-1?s.substring(0,i-o.end.column):t==1?s.substring(i-o.end.column):s},this.getFoldLine=function(r,i){var t=this.$foldData,e=0;for(i&&(e=t.indexOf(i)),e==-1&&(e=0),e;e<t.length;e++){var o=t[e];if(o.start.row<=r&&o.end.row>=r)return o;if(o.end.row>r)return null}return null},this.getNextFoldLine=function(r,i){var t=this.$foldData,e=0;for(i&&(e=t.indexOf(i)),e==-1&&(e=0),e;e<t.length;e++){var o=t[e];if(o.end.row>=r)return o}return null},this.getFoldedRowCount=function(r,i){for(var t=this.$foldData,e=i-r+1,o=0;o<t.length;o++){var s=t[o],c=s.end.row,u=s.start.row;if(c>=i){u<i&&(u>=r?e-=i-u:e=0);break}else c>=r&&(u>=r?e-=c-u:e-=c-r+1)}return e},this.$addFoldLine=function(r){return this.$foldData.push(r),this.$foldData.sort(function(i,t){return i.start.row-t.start.row}),r},this.addFold=function(r,i){var t=this.$foldData,e=!1,o;r instanceof $?o=r:(o=new $(i,r),o.collapseChildren=i.collapseChildren),this.$clipRangeToDocument(o.range);var s=o.start.row,c=o.start.column,u=o.end.row,y=o.end.column,m=this.getFoldAt(s,c,1),p=this.getFoldAt(u,y,-1);if(m&&p==m)return m.addSubFold(o);m&&!m.range.isStart(s,c)&&this.removeFold(m),p&&!p.range.isEnd(u,y)&&this.removeFold(p);var g=this.getFoldsInRange(o.range);g.length>0&&(this.removeFolds(g),o.collapseChildren||g.forEach(function(b){o.addSubFold(b)}));for(var w=0;w<t.length;w++){var L=t[w];if(u==L.start.row){L.addFold(o),e=!0;break}else if(s==L.end.row){if(L.addFold(o),e=!0,!o.sameRow){var S=t[w+1];if(S&&S.start.row==u){L.merge(S);break}}break}else if(u<=L.start.row)break}return e||(L=this.$addFoldLine(new A(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(L.start.row,L.start.row):this.$updateRowLengthCache(L.start.row,L.start.row),this.$modified=!0,this._signal("changeFold",{data:o,action:"add"}),o},this.addFolds=function(r){r.forEach(function(i){this.addFold(i)},this)},this.removeFold=function(r){var i=r.foldLine,t=i.start.row,e=i.end.row,o=this.$foldData,s=i.folds;if(s.length==1)o.splice(o.indexOf(i),1);else if(i.range.isEnd(r.end.row,r.end.column))s.pop(),i.end.row=s[s.length-1].end.row,i.end.column=s[s.length-1].end.column;else if(i.range.isStart(r.start.row,r.start.column))s.shift(),i.start.row=s[0].start.row,i.start.column=s[0].start.column;else if(r.sameRow)s.splice(s.indexOf(r),1);else{var c=i.split(r.start.row,r.start.column);s=c.folds,s.shift(),c.start.row=s[0].start.row,c.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:r,action:"remove"})},this.removeFolds=function(r){for(var i=[],t=0;t<r.length;t++)i.push(r[t]);i.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(r){this.removeFold(r),r.subFolds.forEach(function(i){r.restoreRange(i),this.addFold(i)},this),r.collapseChildren>0&&this.foldAll(r.start.row+1,r.end.row,r.collapseChildren-1),r.subFolds=[]},this.expandFolds=function(r){r.forEach(function(i){this.expandFold(i)},this)},this.unfold=function(r,i){var t,e;if(r==null)t=new T(0,0,this.getLength(),0),i==null&&(i=!0);else if(typeof r=="number")t=new T(r,0,r,this.getLine(r).length);else if("row"in r)t=T.fromPoints(r,r);else{if(Array.isArray(r))return e=[],r.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=r}e=this.getFoldsInRangeList(t);for(var o=e;e.length==1&&T.comparePoints(e[0].start,t.start)<0&&T.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(i!=!1?this.removeFolds(e):this.expandFolds(e),o.length)return o},this.isRowFolded=function(r,i){return!!this.getFoldLine(r,i)},this.getRowFoldEnd=function(r,i){var t=this.getFoldLine(r,i);return t?t.end.row:r},this.getRowFoldStart=function(r,i){var t=this.getFoldLine(r,i);return t?t.start.row:r},this.getFoldDisplayLine=function(r,i,t,e,o){e==null&&(e=r.start.row),o==null&&(o=0),i==null&&(i=r.end.row),t==null&&(t=this.getLine(i).length);var s=this.doc,c="";return r.walk(function(u,y,m,p){if(!(y<e)){if(y==e){if(m<o)return;p=Math.max(o,p)}u!=null?c+=u:c+=s.getLine(y).substring(p,m)}},i,t),c},this.getDisplayLine=function(r,i,t,e){var o=this.getFoldLine(r);if(o)return this.getFoldDisplayLine(o,r,i,t,e);var s;return s=this.doc.getLine(r),s.substring(e||0,i||s.length)},this.$cloneFoldData=function(){var r=[];return r=this.$foldData.map(function(i){var t=i.folds.map(function(e){return e.clone()});return new A(r,t)}),r},this.toggleFold=function(r){var i=this.selection,t=i.getRange(),e,o;if(t.isEmpty()){var s=t.start;if(e=this.getFoldAt(s.row,s.column),e){this.expandFold(e);return}else(o=this.findMatchingBracket(s))?t.comparePoint(o)==1?t.end=o:(t.start=o,t.start.column++,t.end.column--):(o=this.findMatchingBracket({row:s.row,column:s.column+1}))?(t.comparePoint(o)==1?t.end=o:t.start=o,t.start.column++):t=this.getCommentFoldRange(s.row,s.column)||t}else{var c=this.getFoldsInRange(t);if(r&&c.length){this.expandFolds(c);return}else c.length==1&&(e=c[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var u="...";if(!t.isMultiLine()){if(u=this.getTextRange(t),u.length<4)return;u=u.trim().substring(0,2)+".."}this.addFold(u,t)},this.getCommentFoldRange=function(r,i,t){var e=new a(this,r,i),o=e.getCurrentToken(),s=o&&o.type;if(o&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s=="comment"&&(s+="|doc-start|\\.doc");var c=new RegExp(s),u=new T;if(t!=1){do o=e.stepBackward();while(o&&c.test(o.type));o=e.stepForward()}u.start.row=e.getCurrentTokenRow(),u.start.column=e.getCurrentTokenColumn()+o.value.length,e=new a(this,r,i);var y=this.getState(e.$row);if(t!=-1){var m=-1;do if(o=e.stepForward(),m==-1){var p=this.getState(e.$row);y.toString()!==p.toString()&&(m=e.$row)}else if(e.$row>m)break;while(o&&c.test(o.type));o=e.stepBackward()}else o=e.getCurrentToken();return u.end.row=e.getCurrentTokenRow(),u.end.column=e.getCurrentTokenColumn(),u}},this.foldAll=function(r,i,t,e){t==null&&(t=1e5);var o=this.foldWidgets;if(o){i=i||this.getLength(),r=r||0;for(var s=r;s<i;s++)if(o[s]==null&&(o[s]=this.getFoldWidget(s)),o[s]=="start"&&!(e&&!e(s))){var c=this.getFoldWidgetRange(s);c&&c.isMultiLine()&&c.end.row<=i&&c.start.row>=r&&(s=c.end.row,c.collapseChildren=t,this.addFold("...",c))}}},this.foldToLevel=function(r){for(this.foldAll();r-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var r=this;this.foldAll(null,null,null,function(i){for(var t=r.getTokens(i),e=0;e<t.length;e++){var o=t[e];if(!(o.type=="text"&&/^\s+$/.test(o.value)))return!!/comment/.test(o.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(r){if(!this.$foldStyles[r])throw new Error("invalid fold style: "+r+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=r){this.$foldStyle=r,r=="manual"&&this.unfold();var i=this.$foldMode;this.$setFolding(null),this.$setFolding(i)}},this.$setFolding=function(r){if(this.$foldMode!=r){if(this.$foldMode=r,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!r||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=r.getFoldWidget.bind(r,this,this.$foldStyle),this.getFoldWidgetRange=r.getFoldWidgetRange.bind(r,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(r,i){var t=this.foldWidgets;if(!t||i&&t[r])return{};for(var e=r-1,o;e>=0;){var s=t[e];if(s==null&&(s=t[e]=this.getFoldWidget(e)),s=="start"){var c=this.getFoldWidgetRange(e);if(o||(o=c),c&&c.end.row>=r)break}e--}return{range:e!==-1&&c,firstRange:o}},this.onFoldWidgetClick=function(r,i){i instanceof h&&(i=i.domEvent);var t={children:i.shiftKey,all:i.ctrlKey||i.metaKey,siblings:i.altKey},e=this.$toggleFoldWidget(r,t);if(!e){var o=i.target||i.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(r,i){if(this.getFoldWidget){var t=this.getFoldWidget(r),e=this.getLine(r),o=t==="end"?-1:1,s=this.getFoldAt(r,o===-1?0:e.length,o);if(s)return i.children||i.all?this.removeFold(s):this.expandFold(s),s;var c=this.getFoldWidgetRange(r,!0);if(c&&!c.isMultiLine()&&(s=this.getFoldAt(c.start.row,c.start.column,1),s&&c.isEqual(s.range)))return this.removeFold(s),s;if(i.siblings){var u=this.getParentFoldRangeData(r);if(u.range)var y=u.range.start.row+1,m=u.range.end.row;this.foldAll(y,m,i.all?1e4:0)}else i.children?(m=c?c.end.row:this.getLength(),this.foldAll(r+1,m,i.all?1e4:0)):c&&(i.all&&(c.collapseChildren=1e4),this.addFold("...",c));return c}},this.toggleFoldWidget=function(r){var i=this.selection.getCursor().row;i=this.getRowFoldStart(i);var t=this.$toggleFoldWidget(i,{});if(!t){var e=this.getParentFoldRangeData(i,!0);if(t=e.range||e.firstRange,t){i=t.start.row;var o=this.getFoldAt(i,this.getLine(i).length,1);o?this.removeFold(o):this.addFold("...",t)}}},this.updateFoldWidgets=function(r){var i=r.start.row,t=r.end.row-i;if(t===0)this.foldWidgets[i]=null;else if(r.action=="remove")this.foldWidgets.splice(i,t+1,null);else{var e=Array(t+1);e.unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(r){var i=r.data;i.first!=i.last&&this.foldWidgets.length>i.first&&this.foldWidgets.splice(i.first,this.foldWidgets.length)}}x.Folding=n}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(k,x,z){var T=k("../token_iterator").TokenIterator,A=k("../range").Range;function $(){this.findMatchingBracket=function(a,h){if(a.column==0)return null;var n=h||this.getLine(a.row).charAt(a.column-1);if(n=="")return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],a):this.$findOpeningBracket(r[2],a):null},this.getBracketRange=function(a){var h=this.getLine(a.row),n=!0,r,i=h.charAt(a.column-1),t=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(t||(i=h.charAt(a.column),a={row:a.row,column:a.column+1},t=i&&i.match(/([\(\[\{])|([\)\]\}])/),n=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],a);if(!e)return null;r=A.fromPoints(a,e),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;r=A.fromPoints(e,a),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.getMatchingBracketRanges=function(a,h){var n=this.getLine(a.row),r=/([\(\[\{])|([\)\]\}])/,i=!h&&n.charAt(a.column-1),t=i&&i.match(r);if(t||(i=(h===void 0||h)&&n.charAt(a.column),a={row:a.row,column:a.column+1},t=i&&i.match(r)),!t)return null;var e=new A(a.row,a.column-1,a.row,a.column),o=t[1]?this.$findClosingBracket(t[1],a):this.$findOpeningBracket(t[2],a);if(!o)return[e];var s=new A(o.row,o.column,o.row,o.column+1);return[e,s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,h,n){var r=this.$brackets[a],i=1,t=new T(this,h.row,h.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){n||(n=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var o=h.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;o>=0;){var c=s.charAt(o);if(c==r){if(i-=1,i==0)return{row:t.getCurrentTokenRow(),column:o+t.getCurrentTokenColumn()}}else c==a&&(i+=1);o-=1}do e=t.stepBackward();while(e&&!n.test(e.type));if(e==null)break;s=e.value,o=s.length-1}return null}},this.$findClosingBracket=function(a,h,n){var r=this.$brackets[a],i=1,t=new T(this,h.row,h.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){n||(n=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var o=h.column-t.getCurrentTokenColumn();;){for(var s=e.value,c=s.length;o<c;){var u=s.charAt(o);if(u==r){if(i-=1,i==0)return{row:t.getCurrentTokenRow(),column:o+t.getCurrentTokenColumn()}}else u==a&&(i+=1);o+=1}do e=t.stepForward();while(e&&!n.test(e.type));if(e==null)break;o=0}return null}},this.getMatchingTags=function(a){var h=new T(this,a.row,a.column),n=this.$findTagName(h);if(n){var r=h.stepBackward();return r.value==="<"?this.$findClosingTag(h,n):this.$findOpeningTag(h,n)}},this.$findTagName=function(a){var h=a.getCurrentToken(),n=!1,r=!1;if(h&&h.type.indexOf("tag-name")===-1)do r?h=a.stepBackward():h=a.stepForward(),h&&(h.value==="/>"?r=!0:h.type.indexOf("tag-name")!==-1&&(n=!0));while(h&&!n);return h},this.$findClosingTag=function(a,h){var n,r=h.value,i=h.value,t=0,e=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);h=a.stepForward();var o=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length),s=!1;do{if(n=h,n.type.indexOf("tag-close")!==-1&&!s){var c=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(h=a.stepForward(),h){if(h.value===">"&&!s){var c=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(h.type.indexOf("tag-name")!==-1){if(r=h.value,i===r){if(n.value==="<")t++;else if(n.value==="</"&&(t--,t<0)){a.stepBackward();var u=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);h=a.stepForward();var y=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=a.stepForward()),h&&h.value===">")var m=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(i===r&&h.value==="/>"&&(t--,t<0))var u=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),y=u,m=y,c=new A(o.end.row,o.end.column,o.end.row,o.end.column+1)}}while(h&&t>=0);if(e&&c&&u&&m&&o&&y)return{openTag:new A(e.start.row,e.start.column,c.end.row,c.end.column),closeTag:new A(u.start.row,u.start.column,m.end.row,m.end.column),openTagName:o,closeTagName:y}},this.$findOpeningTag=function(a,h){var n=a.getCurrentToken(),r=h.value,i=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),o=e+2,s=new A(t,e,t,o);a.stepForward();var c=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=a.stepForward()),!(!h||h.value!==">")){var u=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(h=n,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),o=e+h.value.length,n=a.stepBackward(),h){if(h.type.indexOf("tag-name")!==-1){if(r===h.value)if(n.value==="<"){if(i++,i>0){var y=new A(t,e,t,o),m=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do h=a.stepForward();while(h&&h.value!==">");var p=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else n.value==="</"&&i--}else if(h.value==="/>"){for(var g=0,w=n;w;){if(w.type.indexOf("tag-name")!==-1&&w.value===r){i--;break}else if(w.value==="<")break;w=a.stepBackward(),g++}for(var L=0;L<g;L++)a.stepForward()}}while(n&&i<=0);if(m&&p&&s&&u&&y&&c)return{openTag:new A(m.start.row,m.start.column,p.end.row,p.end.column),closeTag:new A(s.start.row,s.start.column,u.end.row,u.end.column),openTagName:y,closeTagName:c}}}}x.BracketMatch=$}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(k,x,z){var T=k("./lib/oop"),A=k("./lib/lang"),$=k("./bidihandler").BidiHandler,a=k("./config"),h=k("./lib/event_emitter").EventEmitter,n=k("./selection").Selection,r=k("./mode/text").Mode,i=k("./range").Range,t=k("./line_widgets").LineWidgets,e=k("./document").Document,o=k("./background_tokenizer").BackgroundTokenizer,s=k("./search_highlight").SearchHighlight,c=k("./undomanager").UndoManager,u=function(){function d(l,f){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++d.$uid,this.$foldData.toString=function(){return this.join(`
197
- `)},this.bgTokenizer=new o(new r().getTokenizer(),this);var v=this;this.bgTokenizer.on("update",function(C){v._signal("tokenizerUpdate",C)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof l!="object"||!l.getLine)&&(l=new e(l)),this.setDocument(l),this.selection=new n(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new $(this),a.resetOptions(this),this.setMode(f),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return d.prototype.$initOperationListeners=function(){var l=this;this.curOp=null,this.on("change",function(){l.curOp||(l.startOperation(),l.curOp.selectionBefore=l.$lastSel),l.curOp.docChanged=!0},!0),this.on("changeSelection",function(){l.curOp||(l.startOperation(),l.curOp.selectionBefore=l.$lastSel),l.curOp.selectionChanged=!0},!0),this.$operationResetTimer=A.delayedCall(this.endOperation.bind(this,!0))},d.prototype.startOperation=function(l){if(this.curOp){if(!l||this.curOp.command)return;this.prevOp=this.curOp}l||(l={}),this.$operationResetTimer.schedule(),this.curOp={command:l.command||{},args:l.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",l)},d.prototype.endOperation=function(l){if(this.curOp){if(l&&l.returnValue===!1){this.curOp=null,this._signal("endOperation",l);return}if(l==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var f=this.selection.toJSON();this.curOp.selectionAfter=f,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(f),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",l)}},d.prototype.setDocument=function(l){this.doc&&this.doc.off("change",this.$onChange),this.doc=l,l.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},d.prototype.getDocument=function(){return this.doc},Object.defineProperty(d.prototype,"widgetManager",{get:function(){var l=new t(this);return this.widgetManager=l,this.$editor&&l.attach(this.$editor),l},set:function(l){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:l})},enumerable:!1,configurable:!0}),d.prototype.$resetRowCache=function(l){if(!l){this.$docRowCache=[],this.$screenRowCache=[];return}var f=this.$docRowCache.length,v=this.$getRowCacheIndex(this.$docRowCache,l)+1;f>v&&(this.$docRowCache.splice(v,f),this.$screenRowCache.splice(v,f))},d.prototype.$getRowCacheIndex=function(l,f){for(var v=0,C=l.length-1;v<=C;){var M=v+C>>1,E=l[M];if(f>E)v=M+1;else if(f<E)C=M-1;else return M}return v-1},d.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},d.prototype.onChangeFold=function(l){var f=l.data;this.$resetRowCache(f.start.row)},d.prototype.onChange=function(l){this.$modified=!0,this.$bidiHandler.onChange(l),this.$resetRowCache(l.start.row);var f=this.$updateInternalDataOnChange(l);!this.$fromUndo&&this.$undoManager&&(f&&f.length&&(this.$undoManager.add({action:"removeFolds",folds:f},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(l,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(l),this._signal("change",l)},d.prototype.onSelectionChange=function(){this._signal("changeSelection")},d.prototype.setValue=function(l){this.doc.setValue(l),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},d.fromJSON=function(l){typeof l=="string"&&(l=JSON.parse(l));var f=new c;f.$undoStack=l.history.undo,f.$redoStack=l.history.redo,f.mark=l.history.mark,f.$rev=l.history.rev;var v=new d(l.value);return l.folds.forEach(function(C){v.addFold("...",i.fromPoints(C.start,C.end))}),v.setAnnotations(l.annotations),v.setBreakpoints(l.breakpoints),v.setMode(l.mode),v.setScrollLeft(l.scrollLeft),v.setScrollTop(l.scrollTop),v.setUndoManager(f),v.selection.fromJSON(l.selection),v},d.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(l){return l.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},d.prototype.toString=function(){return this.doc.getValue()},d.prototype.getSelection=function(){return this.selection},d.prototype.getState=function(l){return this.bgTokenizer.getState(l)},d.prototype.getTokens=function(l){return this.bgTokenizer.getTokens(l)},d.prototype.getTokenAt=function(l,f){var v=this.bgTokenizer.getTokens(l),C,M=0;if(f==null){var E=v.length-1;M=this.getLine(l).length}else for(var E=0;E<v.length&&(M+=v[E].value.length,!(M>=f));E++);return C=v[E],C?(C.index=E,C.start=M-C.value.length,C):null},d.prototype.setUndoManager=function(l){if(this.$undoManager=l,this.$informUndoManager&&this.$informUndoManager.cancel(),l){var f=this;l.addSession(this),this.$syncInformUndoManager=function(){f.$informUndoManager.cancel(),f.mergeUndoDeltas=!1},this.$informUndoManager=A.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},d.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},d.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},d.prototype.getTabString=function(){return this.getUseSoftTabs()?A.stringRepeat(" ",this.getTabSize()):" "},d.prototype.setUseSoftTabs=function(l){this.setOption("useSoftTabs",l)},d.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},d.prototype.setTabSize=function(l){this.setOption("tabSize",l)},d.prototype.getTabSize=function(){return this.$tabSize},d.prototype.isTabStop=function(l){return this.$useSoftTabs&&l.column%this.$tabSize===0},d.prototype.setNavigateWithinSoftTabs=function(l){this.setOption("navigateWithinSoftTabs",l)},d.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},d.prototype.setOverwrite=function(l){this.setOption("overwrite",l)},d.prototype.getOverwrite=function(){return this.$overwrite},d.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},d.prototype.addGutterDecoration=function(l,f){this.$decorations[l]||(this.$decorations[l]=""),this.$decorations[l]+=" "+f,this._signal("changeBreakpoint",{})},d.prototype.removeGutterDecoration=function(l,f){this.$decorations[l]=(this.$decorations[l]||"").replace(" "+f,""),this._signal("changeBreakpoint",{})},d.prototype.getBreakpoints=function(){return this.$breakpoints},d.prototype.setBreakpoints=function(l){this.$breakpoints=[];for(var f=0;f<l.length;f++)this.$breakpoints[l[f]]="ace_breakpoint";this._signal("changeBreakpoint",{})},d.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},d.prototype.setBreakpoint=function(l,f){f===void 0&&(f="ace_breakpoint"),f?this.$breakpoints[l]=f:delete this.$breakpoints[l],this._signal("changeBreakpoint",{})},d.prototype.clearBreakpoint=function(l){delete this.$breakpoints[l],this._signal("changeBreakpoint",{})},d.prototype.addMarker=function(l,f,v,C){var M=this.$markerId++,E={range:l,type:v||"line",renderer:typeof v=="function"?v:null,clazz:f,inFront:!!C,id:M};return C?(this.$frontMarkers[M]=E,this._signal("changeFrontMarker")):(this.$backMarkers[M]=E,this._signal("changeBackMarker")),M},d.prototype.addDynamicMarker=function(l,f){if(l.update){var v=this.$markerId++;return l.id=v,l.inFront=!!f,f?(this.$frontMarkers[v]=l,this._signal("changeFrontMarker")):(this.$backMarkers[v]=l,this._signal("changeBackMarker")),l}},d.prototype.removeMarker=function(l){var f=this.$frontMarkers[l]||this.$backMarkers[l];if(f){var v=f.inFront?this.$frontMarkers:this.$backMarkers;delete v[l],this._signal(f.inFront?"changeFrontMarker":"changeBackMarker")}},d.prototype.getMarkers=function(l){return l?this.$frontMarkers:this.$backMarkers},d.prototype.highlight=function(l){if(!this.$searchHighlight){var f=new s(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(f)}this.$searchHighlight.setRegexp(l)},d.prototype.highlightLines=function(l,f,v,C){typeof f!="number"&&(v=f,f=l),v||(v="ace_step");var M=new i(l,0,f,1/0);return M.id=this.addMarker(M,v,"fullLine",C),M},d.prototype.setAnnotations=function(l){this.$annotations=l,this._signal("changeAnnotation",{})},d.prototype.getAnnotations=function(){return this.$annotations||[]},d.prototype.clearAnnotations=function(){this.setAnnotations([])},d.prototype.$detectNewLine=function(l){var f=l.match(/^.*?(\r?\n)/m);f?this.$autoNewLine=f[1]:this.$autoNewLine=`
198
- `},d.prototype.getWordRange=function(l,f){var v=this.getLine(l),C=!1;if(f>0&&(C=!!v.charAt(f-1).match(this.tokenRe)),C||(C=!!v.charAt(f).match(this.tokenRe)),C)var M=this.tokenRe;else if(/^\s+$/.test(v.slice(f-1,f+1)))var M=/\s/;else var M=this.nonTokenRe;var E=f;if(E>0){do E--;while(E>=0&&v.charAt(E).match(M));E++}for(var _=f;_<v.length&&v.charAt(_).match(M);)_++;return new i(l,E,l,_)},d.prototype.getAWordRange=function(l,f){for(var v=this.getWordRange(l,f),C=this.getLine(v.end.row);C.charAt(v.end.column).match(/[ \t]/);)v.end.column+=1;return v},d.prototype.setNewLineMode=function(l){this.doc.setNewLineMode(l)},d.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},d.prototype.setUseWorker=function(l){this.setOption("useWorker",l)},d.prototype.getUseWorker=function(){return this.$useWorker},d.prototype.onReloadTokenizer=function(l){var f=l.data;this.bgTokenizer.start(f.first),this._signal("tokenizerUpdate",l)},d.prototype.setMode=function(l,f){if(l&&typeof l=="object"){if(l.getTokenizer)return this.$onChangeMode(l);var v=l,C=v.path}else C=l||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new r),this.$modes[C]&&!v){this.$onChangeMode(this.$modes[C]),f&&f();return}this.$modeId=C,a.loadModule(["mode",C],function(M){if(this.$modeId!==C)return f&&f();this.$modes[C]&&!v?this.$onChangeMode(this.$modes[C]):M&&M.Mode&&(M=new M.Mode(v),v||(this.$modes[C]=M,M.$id=C),this.$onChangeMode(M)),f&&f()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},d.prototype.$onChangeMode=function(l,f){if(f||(this.$modeId=l.$id),this.$mode!==l){var v=this.$mode;this.$mode=l,this.$stopWorker(),this.$useWorker&&this.$startWorker();var C=l.getTokenizer();if(C.on!==void 0){var M=this.onReloadTokenizer.bind(this);C.on("update",M)}this.bgTokenizer.setTokenizer(C),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=l.tokenRe,this.nonTokenRe=l.nonTokenRe,f||(l.attachToSession&&l.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(l.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:v,mode:l}))}},d.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},d.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(l){a.warn("Could not load worker",l),this.$worker=null}},d.prototype.getMode=function(){return this.$mode},d.prototype.setScrollTop=function(l){this.$scrollTop===l||isNaN(l)||(this.$scrollTop=l,this._signal("changeScrollTop",l))},d.prototype.getScrollTop=function(){return this.$scrollTop},d.prototype.setScrollLeft=function(l){this.$scrollLeft===l||isNaN(l)||(this.$scrollLeft=l,this._signal("changeScrollLeft",l))},d.prototype.getScrollLeft=function(){return this.$scrollLeft},d.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},d.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var l=0;return this.lineWidgets.forEach(function(f){f&&f.screenWidth>l&&(l=f.screenWidth)}),this.lineWidgetWidth=l},d.prototype.$computeWidth=function(l){if(this.$modified||l){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var f=this.doc.getAllLines(),v=this.$rowLengthCache,C=0,M=0,E=this.$foldData[M],_=E?E.start.row:1/0,I=f.length,O=0;O<I;O++){if(O>_){if(O=E.end.row+1,O>=I)break;E=this.$foldData[M++],_=E?E.start.row:1/0}v[O]==null&&(v[O]=this.$getStringScreenWidth(f[O])[0]),v[O]>C&&(C=v[O])}this.screenWidth=C}},d.prototype.getLine=function(l){return this.doc.getLine(l)},d.prototype.getLines=function(l,f){return this.doc.getLines(l,f)},d.prototype.getLength=function(){return this.doc.getLength()},d.prototype.getTextRange=function(l){return this.doc.getTextRange(l||this.selection.getRange())},d.prototype.insert=function(l,f){return this.doc.insert(l,f)},d.prototype.remove=function(l){return this.doc.remove(l)},d.prototype.removeFullLines=function(l,f){return this.doc.removeFullLines(l,f)},d.prototype.undoChanges=function(l,f){if(l.length){this.$fromUndo=!0;for(var v=l.length-1;v!=-1;v--){var C=l[v];C.action=="insert"||C.action=="remove"?this.doc.revertDelta(C):C.folds&&this.addFolds(C.folds)}!f&&this.$undoSelect&&(l.selectionBefore?this.selection.fromJSON(l.selectionBefore):this.selection.setRange(this.$getUndoSelection(l,!0))),this.$fromUndo=!1}},d.prototype.redoChanges=function(l,f){if(l.length){this.$fromUndo=!0;for(var v=0;v<l.length;v++){var C=l[v];(C.action=="insert"||C.action=="remove")&&this.doc.$safeApplyDelta(C)}!f&&this.$undoSelect&&(l.selectionAfter?this.selection.fromJSON(l.selectionAfter):this.selection.setRange(this.$getUndoSelection(l,!1))),this.$fromUndo=!1}},d.prototype.setUndoSelect=function(l){this.$undoSelect=l},d.prototype.$getUndoSelection=function(l,f){function v(I){return f?I.action!=="insert":I.action==="insert"}for(var C,M,E=0;E<l.length;E++){var _=l[E];if(_.start){if(!C){v(_)?C=i.fromPoints(_.start,_.end):C=i.fromPoints(_.start,_.start);continue}v(_)?(M=_.start,C.compare(M.row,M.column)==-1&&C.setStart(M),M=_.end,C.compare(M.row,M.column)==1&&C.setEnd(M)):(M=_.start,C.compare(M.row,M.column)==-1&&(C=i.fromPoints(_.start,_.start)))}}return C},d.prototype.replace=function(l,f){return this.doc.replace(l,f)},d.prototype.moveText=function(l,f,v){var C=this.getTextRange(l),M=this.getFoldsInRange(l),E=i.fromPoints(f,f);if(!v){this.remove(l);var _=l.start.row-l.end.row,I=_?-l.end.column:l.start.column-l.end.column;I&&(E.start.row==l.end.row&&E.start.column>l.end.column&&(E.start.column+=I),E.end.row==l.end.row&&E.end.column>l.end.column&&(E.end.column+=I)),_&&E.start.row>=l.end.row&&(E.start.row+=_,E.end.row+=_)}if(E.end=this.insert(E.start,C),M.length){var O=l.start,H=E.start,_=H.row-O.row,I=H.column-O.column;this.addFolds(M.map(function(W){return W=W.clone(),W.start.row==O.row&&(W.start.column+=I),W.end.row==O.row&&(W.end.column+=I),W.start.row+=_,W.end.row+=_,W}))}return E},d.prototype.indentRows=function(l,f,v){v=v.replace(/\t/g,this.getTabString());for(var C=l;C<=f;C++)this.doc.insertInLine({row:C,column:0},v)},d.prototype.outdentRows=function(l){for(var f=l.collapseRows(),v=new i(0,0,0,0),C=this.getTabSize(),M=f.start.row;M<=f.end.row;++M){var E=this.getLine(M);v.start.row=M,v.end.row=M;for(var _=0;_<C&&E.charAt(_)==" ";++_);_<C&&E.charAt(_)==" "?(v.start.column=_,v.end.column=_+1):(v.start.column=0,v.end.column=_),this.remove(v)}},d.prototype.$moveLines=function(l,f,v){if(l=this.getRowFoldStart(l),f=this.getRowFoldEnd(f),v<0){var C=this.getRowFoldStart(l+v);if(C<0)return 0;var M=C-l}else if(v>0){var C=this.getRowFoldEnd(f+v);if(C>this.doc.getLength()-1)return 0;var M=C-f}else{l=this.$clipRowToDocument(l),f=this.$clipRowToDocument(f);var M=f-l+1}var E=new i(l,0,f,Number.MAX_VALUE),_=this.getFoldsInRange(E).map(function(O){return O=O.clone(),O.start.row+=M,O.end.row+=M,O}),I=v==0?this.doc.getLines(l,f):this.doc.removeFullLines(l,f);return this.doc.insertFullLines(l+M,I),_.length&&this.addFolds(_),M},d.prototype.moveLinesUp=function(l,f){return this.$moveLines(l,f,-1)},d.prototype.moveLinesDown=function(l,f){return this.$moveLines(l,f,1)},d.prototype.duplicateLines=function(l,f){return this.$moveLines(l,f,0)},d.prototype.$clipRowToDocument=function(l){return Math.max(0,Math.min(l,this.doc.getLength()-1))},d.prototype.$clipColumnToRow=function(l,f){return f<0?0:Math.min(this.doc.getLine(l).length,f)},d.prototype.$clipPositionToDocument=function(l,f){if(f=Math.max(0,f),l<0)l=0,f=0;else{var v=this.doc.getLength();l>=v?(l=v-1,f=this.doc.getLine(v-1).length):f=Math.min(this.doc.getLine(l).length,f)}return{row:l,column:f}},d.prototype.$clipRangeToDocument=function(l){l.start.row<0?(l.start.row=0,l.start.column=0):l.start.column=this.$clipColumnToRow(l.start.row,l.start.column);var f=this.doc.getLength()-1;return l.end.row>f?(l.end.row=f,l.end.column=this.doc.getLine(f).length):l.end.column=this.$clipColumnToRow(l.end.row,l.end.column),l},d.prototype.setUseWrapMode=function(l){if(l!=this.$useWrapMode){if(this.$useWrapMode=l,this.$modified=!0,this.$resetRowCache(0),l){var f=this.getLength();this.$wrapData=Array(f),this.$updateWrapData(0,f-1)}this._signal("changeWrapMode")}},d.prototype.getUseWrapMode=function(){return this.$useWrapMode},d.prototype.setWrapLimitRange=function(l,f){(this.$wrapLimitRange.min!==l||this.$wrapLimitRange.max!==f)&&(this.$wrapLimitRange={min:l,max:f},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},d.prototype.adjustWrapLimit=function(l,f){var v=this.$wrapLimitRange;v.max<0&&(v={min:f,max:f});var C=this.$constrainWrapLimit(l,v.min,v.max);return C!=this.$wrapLimit&&C>1?(this.$wrapLimit=C,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},d.prototype.$constrainWrapLimit=function(l,f,v){return f&&(l=Math.max(f,l)),v&&(l=Math.min(v,l)),l},d.prototype.getWrapLimit=function(){return this.$wrapLimit},d.prototype.setWrapLimit=function(l){this.setWrapLimitRange(l,l)},d.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},d.prototype.$updateInternalDataOnChange=function(l){var f=this.$useWrapMode,v=l.action,C=l.start,M=l.end,E=C.row,_=M.row,I=_-E,O=null;if(this.$updating=!0,I!=0)if(v==="remove"){this[f?"$wrapData":"$rowLengthCache"].splice(E,I);var H=this.$foldData;O=this.getFoldsInRange(l),this.removeFolds(O);var D=this.getFoldLine(M.row),N=0;if(D){D.addRemoveChars(M.row,M.column,C.column-M.column),D.shiftRow(-I);var W=this.getFoldLine(E);W&&W!==D&&(W.merge(D),D=W),N=H.indexOf(D)+1}for(N;N<H.length;N++){var D=H[N];D.start.row>=M.row&&D.shiftRow(-I)}_=E}else{var F=Array(I);F.unshift(E,0);var P=f?this.$wrapData:this.$rowLengthCache;P.splice.apply(P,F);var H=this.$foldData,D=this.getFoldLine(E),N=0;if(D){var j=D.range.compareInside(C.row,C.column);j==0?(D=D.split(C.row,C.column),D&&(D.shiftRow(I),D.addRemoveChars(_,0,M.column-C.column))):j==-1&&(D.addRemoveChars(E,0,M.column-C.column),D.shiftRow(I)),N=H.indexOf(D)+1}for(N;N<H.length;N++){var D=H[N];D.start.row>=E&&D.shiftRow(I)}}else{I=Math.abs(l.start.column-l.end.column),v==="remove"&&(O=this.getFoldsInRange(l),this.removeFolds(O),I=-I);var D=this.getFoldLine(E);D&&D.addRemoveChars(E,C.column,I)}return f&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,f?this.$updateWrapData(E,_):this.$updateRowLengthCache(E,_),O},d.prototype.$updateRowLengthCache=function(l,f){this.$rowLengthCache[l]=null,this.$rowLengthCache[f]=null},d.prototype.$updateWrapData=function(l,f){var v=this.doc.getAllLines(),C=this.getTabSize(),M=this.$wrapData,E=this.$wrapLimit,_,I,O=l;for(f=Math.min(f,v.length-1);O<=f;)I=this.getFoldLine(O,I),I?(_=[],I.walk(function(H,D,N,W){var F;if(H!=null){F=this.$getDisplayTokens(H,_.length),F[0]=p;for(var P=1;P<F.length;P++)F[P]=g}else F=this.$getDisplayTokens(v[D].substring(W,N),_.length);_=_.concat(F)}.bind(this),I.end.row,v[I.end.row].length+1),M[I.start.row]=this.$computeWrapSplits(_,E,C),O=I.end.row+1):(_=this.$getDisplayTokens(v[O]),M[O]=this.$computeWrapSplits(_,E,C),O++)},d.prototype.$computeWrapSplits=function(l,f,v){if(l.length==0)return[];var C=[],M=l.length,E=0,_=0,I=this.$wrapAsCode,O=this.$indentedSoftWrap,H=f<=Math.max(2*v,8)||O===!1?0:Math.floor(f/2);function D(){var j=0;if(H===0)return j;if(O)for(var V=0;V<l.length;V++){var U=l[V];if(U==L)j+=1;else if(U==S)j+=v;else{if(U==b)continue;break}}return I&&O!==!1&&(j+=v),Math.min(j,H)}function N(j){for(var V=j-E,U=E;U<j;U++){var K=l[U];(K===12||K===2)&&(V-=1)}C.length||(W=D(),C.indent=W),_+=V,C.push(_),E=j}for(var W=0;M-E>f-W;){var F=E+f-W;if(l[F-1]>=L&&l[F]>=L){N(F);continue}if(l[F]==p||l[F]==g){for(F;F!=E-1&&l[F]!=p;F--);if(F>E){N(F);continue}for(F=E+f,F;F<l.length&&l[F]==g;F++);if(F==l.length)break;N(F);continue}for(var P=Math.max(F-(f-(f>>2)),E-1);F>P&&l[F]<p;)F--;if(I){for(;F>P&&l[F]<p;)F--;for(;F>P&&l[F]==w;)F--}else for(;F>P&&l[F]<L;)F--;if(F>P){N(++F);continue}F=E+f,l[F]==m&&F--,N(F-W)}return C},d.prototype.$getDisplayTokens=function(l,f){var v=[],C;f=f||0;for(var M=0;M<l.length;M++){var E=l.charCodeAt(M);if(E==9){C=this.getScreenTabSize(v.length+f),v.push(S);for(var _=1;_<C;_++)v.push(b)}else E==32?v.push(L):E>39&&E<48||E>57&&E<64?v.push(w):E>=4352&&R(E)?v.push(y,m):v.push(y)}return v},d.prototype.$getStringScreenWidth=function(l,f,v){if(f==0)return[0,0];f==null&&(f=1/0),v=v||0;var C,M;for(M=0;M<l.length&&(C=l.charCodeAt(M),C==9?v+=this.getScreenTabSize(v):C>=4352&&R(C)?v+=2:v+=1,!(v>f));M++);return[v,M]},d.prototype.getRowLength=function(l){var f=1;return this.lineWidgets&&(f+=this.lineWidgets[l]&&this.lineWidgets[l].rowCount||0),!this.$useWrapMode||!this.$wrapData[l]?f:this.$wrapData[l].length+f},d.prototype.getRowLineCount=function(l){return!this.$useWrapMode||!this.$wrapData[l]?1:this.$wrapData[l].length+1},d.prototype.getRowWrapIndent=function(l){if(this.$useWrapMode){var f=this.screenToDocumentPosition(l,Number.MAX_VALUE),v=this.$wrapData[f.row];return v.length&&v[0]<f.column?v.indent:0}else return 0},d.prototype.getScreenLastRowColumn=function(l){var f=this.screenToDocumentPosition(l,Number.MAX_VALUE);return this.documentToScreenColumn(f.row,f.column)},d.prototype.getDocumentLastRowColumn=function(l,f){var v=this.documentToScreenRow(l,f);return this.getScreenLastRowColumn(v)},d.prototype.getDocumentLastRowColumnPosition=function(l,f){var v=this.documentToScreenRow(l,f);return this.screenToDocumentPosition(v,Number.MAX_VALUE/10)},d.prototype.getRowSplitData=function(l){if(this.$useWrapMode)return this.$wrapData[l]},d.prototype.getScreenTabSize=function(l){return this.$tabSize-(l%this.$tabSize|0)},d.prototype.screenToDocumentRow=function(l,f){return this.screenToDocumentPosition(l,f).row},d.prototype.screenToDocumentColumn=function(l,f){return this.screenToDocumentPosition(l,f).column},d.prototype.screenToDocumentPosition=function(l,f,v){if(l<0)return{row:0,column:0};var C,M=0,E=0,_,I=0,O=0,H=this.$screenRowCache,D=this.$getRowCacheIndex(H,l),N=H.length;if(N&&D>=0)var I=H[D],M=this.$docRowCache[D],W=l>H[N-1];else var W=!N;for(var F=this.getLength()-1,P=this.getNextFoldLine(M),j=P?P.start.row:1/0;I<=l&&(O=this.getRowLength(M),!(I+O>l||M>=F));)I+=O,M++,M>j&&(M=P.end.row+1,P=this.getNextFoldLine(M,P),j=P?P.start.row:1/0),W&&(this.$docRowCache.push(M),this.$screenRowCache.push(I));if(P&&P.start.row<=M)C=this.getFoldDisplayLine(P),M=P.start.row;else{if(I+O<=l||M>F)return{row:F,column:this.getLine(F).length};C=this.getLine(M),P=null}var V=0,U=Math.floor(l-I);if(this.$useWrapMode){var K=this.$wrapData[M];K&&(_=K[U],U>0&&K.length&&(V=K.indent,E=K[U-1]||K[K.length-1],C=C.substring(E)))}return v!==void 0&&this.$bidiHandler.isBidiRow(I+U,M,U)&&(f=this.$bidiHandler.offsetToCol(v)),E+=this.$getStringScreenWidth(C,f-V)[1],this.$useWrapMode&&E>=_&&(E=_-1),P?P.idxToPosition(E):{row:M,column:E}},d.prototype.documentToScreenPosition=function(l,f){if(typeof f>"u")var v=this.$clipPositionToDocument(l.row,l.column);else v=this.$clipPositionToDocument(l,f);l=v.row,f=v.column;var C=0,M=null,E=null;E=this.getFoldAt(l,f,1),E&&(l=E.start.row,f=E.start.column);var _,I=0,O=this.$docRowCache,H=this.$getRowCacheIndex(O,l),D=O.length;if(D&&H>=0)var I=O[H],C=this.$screenRowCache[H],N=l>O[D-1];else var N=!D;for(var W=this.getNextFoldLine(I),F=W?W.start.row:1/0;I<l;){if(I>=F){if(_=W.end.row+1,_>l)break;W=this.getNextFoldLine(_,W),F=W?W.start.row:1/0}else _=I+1;C+=this.getRowLength(I),I=_,N&&(this.$docRowCache.push(I),this.$screenRowCache.push(C))}var P="";W&&I>=F?(P=this.getFoldDisplayLine(W,l,f),M=W.start.row):(P=this.getLine(l).substring(0,f),M=l);var j=0;if(this.$useWrapMode){var V=this.$wrapData[M];if(V){for(var U=0;P.length>=V[U];)C++,U++;P=P.substring(V[U-1]||0,P.length),j=U>0?V.indent:0}}return this.lineWidgets&&this.lineWidgets[I]&&this.lineWidgets[I].rowsAbove&&(C+=this.lineWidgets[I].rowsAbove),{row:C,column:j+this.$getStringScreenWidth(P)[0]}},d.prototype.documentToScreenColumn=function(l,f){return this.documentToScreenPosition(l,f).column},d.prototype.documentToScreenRow=function(l,f){return this.documentToScreenPosition(l,f).row},d.prototype.getScreenLength=function(){var l=0,f=null;if(this.$useWrapMode)for(var M=this.$wrapData.length,E=0,C=0,f=this.$foldData[C++],_=f?f.start.row:1/0;E<M;){var I=this.$wrapData[E];l+=I?I.length+1:1,E++,E>_&&(E=f.end.row+1,f=this.$foldData[C++],_=f?f.start.row:1/0)}else{l=this.getLength();for(var v=this.$foldData,C=0;C<v.length;C++)f=v[C],l-=f.end.row-f.start.row}return this.lineWidgets&&(l+=this.$getWidgetScreenLength()),l},d.prototype.$setFontMetrics=function(l){this.$enableVarChar&&(this.$getStringScreenWidth=function(f,v,C){if(v===0)return[0,0];v||(v=1/0),C=C||0;var M,E;for(E=0;E<f.length&&(M=f.charAt(E),M===" "?C+=this.getScreenTabSize(C):C+=l.getCharacterWidth(M),!(C>v));E++);return[C,E]})},d.prototype.getPrecedingCharacter=function(){var l=this.selection.getCursor();if(l.column===0)return l.row===0?"":this.doc.getNewLineCharacter();var f=this.getLine(l.row);return f[l.column-1]},d.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},d}();u.$uid=0,u.prototype.$modes=a.$modes,u.prototype.getValue=u.prototype.toString,u.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},u.prototype.$overwrite=!1,u.prototype.$mode=null,u.prototype.$modeId=null,u.prototype.$scrollTop=0,u.prototype.$scrollLeft=0,u.prototype.$wrapLimit=80,u.prototype.$useWrapMode=!1,u.prototype.$wrapLimitRange={min:null,max:null},u.prototype.lineWidgets=null,u.prototype.isFullWidth=R,T.implement(u.prototype,h);var y=1,m=2,p=3,g=4,w=9,L=10,S=11,b=12;function R(d){return d<4352?!1:d>=4352&&d<=4447||d>=4515&&d<=4519||d>=4602&&d<=4607||d>=9001&&d<=9002||d>=11904&&d<=11929||d>=11931&&d<=12019||d>=12032&&d<=12245||d>=12272&&d<=12283||d>=12288&&d<=12350||d>=12353&&d<=12438||d>=12441&&d<=12543||d>=12549&&d<=12589||d>=12593&&d<=12686||d>=12688&&d<=12730||d>=12736&&d<=12771||d>=12784&&d<=12830||d>=12832&&d<=12871||d>=12880&&d<=13054||d>=13056&&d<=19903||d>=19968&&d<=42124||d>=42128&&d<=42182||d>=43360&&d<=43388||d>=44032&&d<=55203||d>=55216&&d<=55238||d>=55243&&d<=55291||d>=63744&&d<=64255||d>=65040&&d<=65049||d>=65072&&d<=65106||d>=65108&&d<=65126||d>=65128&&d<=65131||d>=65281&&d<=65376||d>=65504&&d<=65510}k("./edit_session/folding").Folding.call(u.prototype),k("./edit_session/bracket_match").BracketMatch.call(u.prototype),a.defineOptions(u.prototype,"session",{wrap:{set:function(d){if(!d||d=="off"?d=!1:d=="free"?d=!0:d=="printMargin"?d=-1:typeof d=="string"&&(d=parseInt(d,10)||!1),this.$wrap!=d)if(this.$wrap=d,!d)this.setUseWrapMode(!1);else{var l=typeof d=="number"?d:null;this.setWrapLimitRange(l,l),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(d){d=d=="auto"?this.$mode.type!="text":d!="text",d!=this.$wrapAsCode&&(this.$wrapAsCode=d,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(d){this.$useWorker=d,this.$stopWorker(),d&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(d){d=parseInt(d),d>0&&this.$tabSize!==d&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=d,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(d){this.setFoldStyle(d)},handlesSet:!0},overwrite:{set:function(d){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(d){this.doc.setNewLineMode(d)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(d){this.setMode(d)},get:function(){return this.$modeId},handlesSet:!0}}),x.EditSession=u}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(k,x,z){var T=k("./lib/lang"),A=k("./lib/oop"),$=k("./range").Range,a=function(){function n(){this.$options={}}return n.prototype.set=function(r){return A.mixin(this.$options,r),this},n.prototype.getOptions=function(){return T.copyObject(this.$options)},n.prototype.setOptions=function(r){this.$options=r},n.prototype.find=function(r){var i=this.$options,t=this.$matchIterator(r,i);if(!t)return!1;var e=null;return t.forEach(function(o,s,c,u){return e=new $(o,s,c,u),s==u&&i.start&&i.start.start&&i.skipCurrent!=!1&&e.isEqual(i.start)?(e=null,!1):!0}),e},n.prototype.findAll=function(r){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var t=i.range,e=t?r.getLines(t.start.row,t.end.row):r.doc.getAllLines(),o=[],s=i.re;if(i.$isMultiLine){var c=s.length,u=e.length-c,y;e:for(var m=s.offset||0;m<=u;m++){for(var p=0;p<c;p++)if(e[m+p].search(s[p])==-1)continue e;var g=e[m],w=e[m+c-1],L=g.length-g.match(s[0])[0].length,S=w.match(s[c-1])[0].length;y&&y.end.row===m&&y.end.column>L||(o.push(y=new $(m,L,m+c-1,S)),c>2&&(m=m+c-2))}}else for(var b=0;b<e.length;b++)for(var R=T.getMatchOffsets(e[b],s),p=0;p<R.length;p++){var d=R[p];o.push(new $(b,d.offset,b,d.offset+d.length))}if(t){for(var l=t.start.column,f=t.end.column,b=0,p=o.length-1;b<p&&o[b].start.column<l&&o[b].start.row==0;)b++;for(var v=t.end.row-t.start.row;b<p&&o[p].end.column>f&&o[p].end.row==v;)p--;for(o=o.slice(b,p+1),b=0,p=o.length;b<p;b++)o[b].start.row+=t.start.row,o[b].end.row+=t.start.row}return o},n.prototype.replace=function(r,i){var t=this.$options,e=this.$assembleRegExp(t);if(t.$isMultiLine)return i;if(e){var o=e.exec(r);if(!o||o[0].length!=r.length)return null;if(t.regExp||(i=i.replace(/\$/g,"$$$$")),i=r.replace(e,i),t.preserveCase){i=i.split("");for(var s=Math.min(r.length,r.length);s--;){var c=r[s];c&&c.toLowerCase()!=c?i[s]=i[s].toUpperCase():i[s]=i[s].toLowerCase()}i=i.join("")}return i}},n.prototype.$assembleRegExp=function(r,i){if(r.needle instanceof RegExp)return r.re=r.needle;var t=r.needle;if(!r.needle)return r.re=!1;r.regExp||(t=T.escapeRegExp(t));var e=r.caseSensitive?"gm":"gmi";try{new RegExp(t,"u"),r.$supportsUnicodeFlag=!0,e+="u"}catch{r.$supportsUnicodeFlag=!1}if(r.wholeWord&&(t=h(t,r)),r.$isMultiLine=!i&&/[\n\r]/.test(t),r.$isMultiLine)return r.re=this.$assembleMultilineRegExp(t,e);try{var o=new RegExp(t,e)}catch{o=!1}return r.re=o},n.prototype.$assembleMultilineRegExp=function(r,i){for(var t=r.replace(/\r\n|\r|\n/g,`$
199
- ^`).split(`
200
- `),e=[],o=0;o<t.length;o++)try{e.push(new RegExp(t[o],i))}catch{return!1}return e},n.prototype.$matchIterator=function(r,i){var t=this.$assembleRegExp(i);if(!t)return!1;var e=i.backwards==!0,o=i.skipCurrent!=!1,s=t.unicode,c=i.range,u=i.start;u||(u=c?c[e?"end":"start"]:r.selection.getRange()),u.start&&(u=u[o!=e?"end":"start"]);var y=c?c.start.row:0,m=c?c.end.row:r.getLength()-1;if(e)var p=function(L){var S=u.row;if(!w(S,u.column,L)){for(S--;S>=y;S--)if(w(S,Number.MAX_VALUE,L))return;if(i.wrap!=!1){for(S=m,y=u.row;S>=y;S--)if(w(S,Number.MAX_VALUE,L))return}}};else var p=function(S){var b=u.row;if(!w(b,u.column,S)){for(b=b+1;b<=m;b++)if(w(b,0,S))return;if(i.wrap!=!1){for(b=y,m=u.row;b<=m;b++)if(w(b,0,S))return}}};if(i.$isMultiLine)var g=t.length,w=function(L,S,b){var R=e?L-g+1:L;if(!(R<0||R+g>r.getLength())){var d=r.getLine(R),l=d.search(t[0]);if(!(!e&&l<S||l===-1)){for(var f=1;f<g;f++)if(d=r.getLine(R+f),d.search(t[f])==-1)return;var v=d.match(t[g-1])[0].length;if(!(e&&v>S)&&b(R,l,R+g-1,v))return!0}}};else if(e)var w=function(S,b,R){var d=r.getLine(S),l=[],f,v=0;for(t.lastIndex=0;f=t.exec(d);){var C=f[0].length;if(v=f.index,!C){if(v>=d.length)break;t.lastIndex=v+=T.skipEmptyMatch(d,v,s)}if(f.index+C>b)break;l.push(f.index,C)}for(var M=l.length-1;M>=0;M-=2){var E=l[M-1],C=l[M];if(R(S,E,S,E+C))return!0}};else var w=function(S,b,R){var d=r.getLine(S),l,f;for(t.lastIndex=b;f=t.exec(d);){var v=f[0].length;if(l=f.index,R(S,l,S,l+v))return!0;if(!v&&(t.lastIndex=l+=T.skipEmptyMatch(d,l,s),l>=d.length))return!1}};return{forEach:p}},n}();function h(n,r){var i=T.supportsLookbehind();function t(c,u){u===void 0&&(u=!0);var y=i&&r.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return y.test(c)||r.regExp?i&&r.$supportsUnicodeFlag?u?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var e=Array.from(n),o=e[0],s=e[e.length-1];return t(o)+n+t(s,!1)}x.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(k,x,z){var T=this&&this.__extends||function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(o[c]=s[c])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),A=k("../lib/keys"),$=k("../lib/useragent"),a=A.KEY_MODS,h=function(){function i(t,e){this.$init(t,e,!1)}return i.prototype.$init=function(t,e,o){this.platform=e||($.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=o},i.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},i.prototype.removeCommand=function(t,e){var o=t&&(typeof t=="string"?t:t.name);t=this.commands[o],e||delete this.commands[o];var s=this.commandKeyBinding;for(var c in s){var u=s[c];if(u==t)delete s[c];else if(Array.isArray(u)){var y=u.indexOf(t);y!=-1&&(u.splice(y,1),u.length==1&&(s[c]=u[0]))}}},i.prototype.bindKey=function(t,e,o){if(typeof t=="object"&&t&&(o==null&&(o=t.position),t=t[this.platform]),!!t){if(typeof e=="function")return this.addCommand({exec:e,bindKey:t,name:e.name||t});t.split("|").forEach(function(s){var c="";if(s.indexOf(" ")!=-1){var u=s.split(/\s+/);s=u.pop(),u.forEach(function(p){var g=this.parseKeys(p),w=a[g.hashId]+g.key;c+=(c?" ":"")+w,this._addCommandToBinding(c,"chainKeys")},this),c+=" "}var y=this.parseKeys(s),m=a[y.hashId]+y.key;this._addCommandToBinding(c+m,e,o)},this)}},i.prototype._addCommandToBinding=function(t,e,o){var s=this.commandKeyBinding,c;if(!e)delete s[t];else if(!s[t]||this.$singleCommand)s[t]=e;else{Array.isArray(s[t])?(c=s[t].indexOf(e))!=-1&&s[t].splice(c,1):s[t]=[s[t]],typeof o!="number"&&(o=n(e));var u=s[t];for(c=0;c<u.length;c++){var y=u[c],m=n(y);if(m>o)break}u.splice(c,0,e)}},i.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var o=t[e];if(o){if(typeof o=="string")return this.bindKey(o,e);typeof o=="function"&&(o={exec:o}),typeof o=="object"&&(o.name||(o.name=e),this.addCommand(o))}},this)},i.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},i.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},i.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},i.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(m){return m}),o=e.pop(),s=A[o];if(A.FUNCTION_KEYS[s])o=A.FUNCTION_KEYS[s].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:o.toUpperCase(),hashId:-1}}else return{key:o,hashId:-1};for(var c=0,u=e.length;u--;){var y=A.KEY_MODS[e[u]];if(y==null)return typeof console<"u"&&console.error("invalid modifier "+e[u]+" in "+t),!1;c|=y}return{key:o,hashId:c}},i.prototype.findKeyCommand=function(t,e){var o=a[t]+e;return this.commandKeyBinding[o]},i.prototype.handleKeyboard=function(t,e,o,s){if(!(s<0)){var c=a[e]+o,u=this.commandKeyBinding[c];return t.$keyChain&&(t.$keyChain+=" "+c,u=this.commandKeyBinding[t.$keyChain]||u),u&&(u=="chainKeys"||u[u.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||c,{command:"null"}):(t.$keyChain&&((!e||e==4)&&o.length==1?t.$keyChain=t.$keyChain.slice(0,-c.length-1):(e==-1||s>0)&&(t.$keyChain="")),{command:u})}},i.prototype.getStatusText=function(t,e){return e.$keyChain||""},i}();function n(i){return typeof i=="object"&&i.bindKey&&i.bindKey.position||(i.isDefault?-100:0)}var r=function(i){T(t,i);function t(e,o){var s=i.call(this,e,o)||this;return s.$singleCommand=!0,s}return t}(h);r.call=function(i,t,e){h.prototype.$init.call(i,t,e,!0)},h.call=function(i,t,e){h.prototype.$init.call(i,t,e,!1)},x.HashHandler=r,x.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(k,x,z){var T=this&&this.__extends||function(){var n=function(r,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(r,i);function t(){this.constructor=r}r.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}}(),A=k("../lib/oop"),$=k("../keyboard/hash_handler").MultiHashHandler,a=k("../lib/event_emitter").EventEmitter,h=function(n){T(r,n);function r(i,t){var e=n.call(this,t,i)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(o){return o.args?o.command.exec(o.editor,o.args,o.event,!1):o.command.exec(o.editor,{},o.event,!0)}),e}return r.prototype.exec=function(i,t,e){if(Array.isArray(i)){for(var o=i.length;o--;)if(this.exec(i[o],t,e))return!0;return!1}if(typeof i=="string"&&(i=this.commands[i]),!this.canExecute(i,t))return!1;var s={editor:t,command:i,args:e};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1},r.prototype.canExecute=function(i,t){return typeof i=="string"&&(i=this.commands[i]),!(!i||t&&t.$readOnly&&!i.readOnly||this.$checkCommandState!=!1&&i.isAvailable&&!i.isAvailable(t))},r.prototype.toggleRecording=function(i){if(!this.$inReplay)return i&&i._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},r.prototype.replay=function(i){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(i);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,i):this.exec(t[0],i,t[1])},this)}finally{this.$inReplay=!1}}},r.prototype.trimMacro=function(i){return i.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},r}($);A.implement(h.prototype,a),x.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(k,x,z){var T=k("../lib/lang"),A=k("../config"),$=k("../range").Range;function a(n,r){return{win:n,mac:r}}x.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(n){A.loadModule("ace/ext/settings_menu",function(r){r.init(n),n.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(n){A.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(n,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(n){A.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(n,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(n){n.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(n){n.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(n,r){typeof r=="number"&&!isNaN(r)&&n.gotoLine(r),n.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(n){n.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll(),n.session.unfold(n.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(n){n.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(n){A.loadModule("ace/ext/searchbox",function(r){r.Search(n)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(n,r){n.navigateUp(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(n,r){n.navigateDown(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(n,r){n.navigateLeft(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(n,r){n.navigateRight(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(n){n.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(n){n.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(n){n.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(n){n.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(n){n.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(n){},readOnly:!0},{name:"cut",description:"Cut",exec:function(n){var r=n.$copyWithEmptySelection&&n.selection.isEmpty(),i=r?n.selection.getLineRange():n.selection.getRange();n._emit("cut",i),i.isEmpty()||n.session.remove(i),n.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(n,r){n.$handlePaste(r)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(n){n.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(n){A.loadModule("ace/ext/searchbox",function(r){r.Search(n,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(n){n.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(n){if(n.selection.isEmpty())n.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(n){n.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(n){var r=n.selection.getRange();r.start.column=0,n.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(n){var r=n.selection.getRange();r.end.column=Number.MAX_VALUE,n.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(n){n.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(n,r){n.insert(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(n,r){n.insert(T.stringRepeat(r.text||"",r.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(n){n.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(n){n.transposeLetters()},multiSelectAction:function(n){n.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(n){n.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var r=n.selection.getRange();r.start.column=r.end.column=0,r.end.row++,n.selection.setRange(r,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(n){n.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(n){for(var r=n.selection.isBackwards(),i=r?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),t=r?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),e=n.session.doc.getLine(i.row).length,o=n.session.doc.getTextRange(n.selection.getRange()),s=o.replace(/\n\s*/," ").length,c=n.session.doc.getLine(i.row),u=i.row+1;u<=t.row+1;u++){var y=T.stringTrimLeft(T.stringTrimRight(n.session.doc.getLine(u)));y.length!==0&&(y=" "+y),c+=y}t.row+1<n.session.doc.getLength()-1&&(c+=n.session.doc.getNewLineCharacter()),n.clearSelection(),n.session.doc.replace(new $(i.row,0,t.row+2,0),c),s>0?(n.selection.moveCursorTo(i.row,i.column),n.selection.selectTo(i.row,i.column+s)):(e=n.session.doc.getLine(i.row).length>e?e+1:e,n.selection.moveCursorTo(i.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(n){var r=n.session.doc.getLength()-1,i=n.session.doc.getLine(r).length,t=n.selection.rangeList.ranges,e=[];t.length<1&&(t=[n.selection.getRange()]);for(var o=0;o<t.length;o++)o==t.length-1&&(t[o].end.row===r&&t[o].end.column===i||e.push(new $(t[o].end.row,t[o].end.column,r,i))),o===0?t[o].start.row===0&&t[o].start.column===0||e.push(new $(0,0,t[o].start.row,t[o].start.column)):e.push(new $(t[o-1].end.row,t[o-1].end.column,t[o].start.row,t[o].start.column));n.exitMultiSelectMode(),n.clearSelection();for(var o=0;o<e.length;o++)n.selection.addRange(e[o],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(n){n.selection.clearSelection(),n.navigateLineEnd(),n.insert(`
201
- `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(n){n.selection.clearSelection();var r=n.getCursorPosition();n.selection.moveTo(r.row-1,Number.MAX_VALUE),n.insert(`
202
- `),r.row===0&&n.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(n){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),n.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(n){n.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(n){n.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)x.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(n){n.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(k,x,z){var T=k("../lib/keys"),A=k("../mouse/default_gutter_handler").GutterTooltip,$=function(){function h(n){this.editor=n,this.gutterLayer=n.renderer.$gutterLayer,this.element=n.renderer.$gutter,this.lines=n.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new A(this.editor)}return h.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},h.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},h.prototype.$onGutterKeyDown=function(n){if(this.annotationTooltip.isOpen){n.preventDefault(),n.keyCode===T.escape&&this.annotationTooltip.hideTooltip();return}if(n.target===this.element){if(n.keyCode!=T.enter)return;n.preventDefault();var r=this.editor.getCursorPosition().row;this.editor.isRowVisible(r)||this.editor.scrollToLine(r,!0,!0),setTimeout(function(){var i=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(i),e=this.$findNearestAnnotation(i);if(!(t===null&&e===null)){if(t===null&&e!==null){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(t!==null&&e===null){this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(e-i)<Math.abs(t-i)){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}.bind(this),10);return}this.$handleGutterKeyboardInteraction(n),setTimeout(function(){this.editor._signal("gutterkeydown",new a(n,this))}.bind(this),10)},h.prototype.$handleGutterKeyboardInteraction=function(n){if(n.keyCode===T.tab){n.preventDefault();return}if(n.keyCode===T.escape){n.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(n.keyCode===T.up){switch(n.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(n.keyCode===T.down){switch(n.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(n.keyCode===T.left){n.preventDefault(),this.$switchLane("annotation");return}if(n.keyCode===T.right){n.preventDefault(),this.$switchLane("fold");return}if(n.keyCode===T.enter||n.keyCode===T.space){switch(n.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var r=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),n),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==r&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(r),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var i=this.lines.cells[this.activeRowIndex].element.childNodes[2],t=i.getBoundingClientRect(),e=this.annotationTooltip.getElement().style;e.left=t.right+"px",e.top=t.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},h.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},h.prototype.$isFoldWidgetVisible=function(n){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(n)),i=this.$getFoldWidget(n).style.display!=="none";return r&&i},h.prototype.$isAnnotationVisible=function(n){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(n)),i=this.$getAnnotation(n).style.display!=="none";return r&&i},h.prototype.$getFoldWidget=function(n){var r=this.lines.get(n),i=r.element;return i.childNodes[1]},h.prototype.$getAnnotation=function(n){var r=this.lines.get(n),i=r.element;return i.childNodes[2]},h.prototype.$findNearestFoldWidget=function(n){if(this.$isFoldWidgetVisible(n))return n;for(var r=0;n-r>0||n+r<this.lines.getLength()-1;){if(r++,n-r>=0&&this.$isFoldWidgetVisible(n-r))return n-r;if(n+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(n+r))return n+r}return null},h.prototype.$findNearestAnnotation=function(n){if(this.$isAnnotationVisible(n))return n;for(var r=0;n-r>0||n+r<this.lines.getLength()-1;){if(r++,n-r>=0&&this.$isAnnotationVisible(n-r))return n-r;if(n+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(n+r))return n+r}return null},h.prototype.$focusFoldWidget=function(n){if(n!=null){var r=this.$getFoldWidget(n);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},h.prototype.$focusAnnotation=function(n){if(n!=null){var r=this.$getAnnotation(n);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},h.prototype.$blurFoldWidget=function(n){var r=this.$getFoldWidget(n);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},h.prototype.$blurAnnotation=function(n){var r=this.$getAnnotation(n);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},h.prototype.$moveFoldWidgetUp=function(){for(var n=this.activeRowIndex;n>0;)if(n--,this.$isFoldWidgetVisible(n)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex);return}},h.prototype.$moveFoldWidgetDown=function(){for(var n=this.activeRowIndex;n<this.lines.getLength()-1;)if(n++,this.$isFoldWidgetVisible(n)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex);return}},h.prototype.$moveAnnotationUp=function(){for(var n=this.activeRowIndex;n>0;)if(n--,this.$isAnnotationVisible(n)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$moveAnnotationDown=function(){for(var n=this.activeRowIndex;n<this.lines.getLength()-1;)if(n++,this.$isAnnotationVisible(n)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$switchLane=function(n){switch(n){case"annotation":if(this.activeLane==="annotation")break;var r=this.$findNearestAnnotation(this.activeRowIndex);if(r==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var i=this.$findNearestFoldWidget(this.activeRowIndex);if(i==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusFoldWidget(this.activeRowIndex);break}},h.prototype.$rowIndexToRow=function(n){var r=this.lines.get(n);return r?r.row:null},h.prototype.$rowToRowIndex=function(n){for(var r=0;r<this.lines.getLength();r++){var i=this.lines.get(r);if(i.row==n)return r}return null},h}();x.GutterKeyboardHandler=$;var a=function(){function h(n,r){this.gutterKeyboardHandler=r,this.domEvent=n}return h.prototype.getKey=function(){return T.keyCodeToString(this.domEvent.keyCode)},h.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},h.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},h.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},h}();x.GutterKeyboardEvent=a}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(k,x,z){var T=this&&this.__values||function(d){var l=typeof Symbol=="function"&&Symbol.iterator,f=l&&d[l],v=0;if(f)return f.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&v>=d.length&&(d=void 0),{value:d&&d[v++],done:!d}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},A=k("./lib/oop"),$=k("./lib/dom"),a=k("./lib/lang"),h=k("./lib/useragent"),n=k("./keyboard/textinput").TextInput,r=k("./mouse/mouse_handler").MouseHandler,i=k("./mouse/fold_handler").FoldHandler,t=k("./keyboard/keybinding").KeyBinding,e=k("./edit_session").EditSession,o=k("./search").Search,s=k("./range").Range,c=k("./lib/event_emitter").EventEmitter,u=k("./commands/command_manager").CommandManager,y=k("./commands/default_commands").commands,m=k("./config"),p=k("./token_iterator").TokenIterator,g=k("./keyboard/gutter_handler").GutterKeyboardHandler,w=k("./config").nls,L=k("./clipboard"),S=k("./lib/keys"),b=function(){function d(l,f,v){this.session,this.$toDestroy=[];var C=l.getContainerElement();this.container=C,this.renderer=l,this.id="editor"+ ++d.$uid,this.commands=new u(h.isMac?"mac":"win",y),typeof document=="object"&&(this.textInput=new n(l.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new r(this),new i(this)),this.keyBinding=new t(this),this.$search=new o().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(M,E){E._$emitInputEvent.schedule(31)}),this.setSession(f||v&&v.session||new e("")),m.resetOptions(this),v&&this.setOptions(v),m._signal("editor",this)}return d.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},d.prototype.startOperation=function(l){this.session.startOperation(l)},d.prototype.endOperation=function(l){this.session.endOperation(l)},d.prototype.onStartOperation=function(l){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,l||(this.previousCommand=null)},d.prototype.onEndOperation=function(l){if(this.curOp&&this.session){if(l&&l.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var f=this.curOp.command,v=f&&f.scrollIntoView;if(v){switch(v){case"center-animate":v="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var C=this.selection.getRange(),M=this.renderer.layerConfig;(C.start.row>=M.lastRow||C.end.row<=M.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}v=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},d.prototype.$historyTracker=function(l){if(this.$mergeUndoDeltas){var f=this.prevOp,v=this.$mergeableCommands,C=f.command&&l.command.name==f.command.name;if(l.command.name=="insertstring"){var M=l.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),C=C&&this.mergeNextCommand&&(!/\s/.test(M)||/\s/.test(f.args)),this.mergeNextCommand=!0}else C=C&&v.indexOf(l.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(C=!1),C?this.session.mergeUndoDeltas=!0:v.indexOf(l.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},d.prototype.setKeyboardHandler=function(l,f){if(l&&typeof l=="string"&&l!="ace"){this.$keybindingId=l;var v=this;m.loadModule(["keybinding",l],function(C){v.$keybindingId==l&&v.keyBinding.setKeyboardHandler(C&&C.handler),f&&f()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(l),f&&f()},d.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},d.prototype.setSession=function(l){if(this.session!=l){this.curOp&&this.endOperation(),this.curOp={};var f=this.session;if(f){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var v=this.session.getSelection();v.off("changeCursor",this.$onCursorChange),v.off("changeSelection",this.$onSelectionChange)}this.session=l,l?(this.$onDocumentChange=this.onDocumentChange.bind(this),l.on("change",this.$onDocumentChange),this.renderer.setSession(l),this.$onChangeMode=this.onChangeMode.bind(this),l.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),l.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),l.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),l.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),l.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),l.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=l.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(l)),this._signal("changeSession",{session:l,oldSession:f}),this.curOp=null,f&&f._signal("changeEditor",{oldEditor:this}),f&&(f.$editor=null),l&&l._signal("changeEditor",{editor:this}),l&&(l.$editor=this),l&&!l.destroyed&&l.bgTokenizer.scheduleStart()}},d.prototype.getSession=function(){return this.session},d.prototype.setValue=function(l,f){return this.session.doc.setValue(l),f?f==1?this.navigateFileEnd():f==-1&&this.navigateFileStart():this.selectAll(),l},d.prototype.getValue=function(){return this.session.getValue()},d.prototype.getSelection=function(){return this.selection},d.prototype.resize=function(l){this.renderer.onResize(l)},d.prototype.setTheme=function(l,f){this.renderer.setTheme(l,f)},d.prototype.getTheme=function(){return this.renderer.getTheme()},d.prototype.setStyle=function(l){this.renderer.setStyle(l)},d.prototype.unsetStyle=function(l){this.renderer.unsetStyle(l)},d.prototype.getFontSize=function(){return this.getOption("fontSize")||$.computedStyle(this.container).fontSize},d.prototype.setFontSize=function(l){this.setOption("fontSize",l)},d.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var l=this;this.$highlightPending=!0,setTimeout(function(){l.$highlightPending=!1;var f=l.session;if(!(!f||f.destroyed)){f.$bracketHighlight&&(f.$bracketHighlight.markerIds.forEach(function(D){f.removeMarker(D)}),f.$bracketHighlight=null);var v=l.getCursorPosition(),C=l.getKeyboardHandler(),M=C&&C.$getDirectionForHighlight&&C.$getDirectionForHighlight(l),E=f.getMatchingBracketRanges(v,M);if(!E){var _=new p(f,v.row,v.column),I=_.getCurrentToken();if(I&&/\b(?:tag-open|tag-name)/.test(I.type)){var O=f.getMatchingTags(v);O&&(E=[O.openTagName.isEmpty()?O.openTag:O.openTagName,O.closeTagName.isEmpty()?O.closeTag:O.closeTagName])}}if(!E&&f.$mode.getMatching&&(E=f.$mode.getMatching(l.session)),!E){l.getHighlightIndentGuides()&&l.renderer.$textLayer.$highlightIndentGuide();return}var H="ace_bracket";Array.isArray(E)?E.length==1&&(H="ace_error_bracket"):E=[E],E.length==2&&(s.comparePoints(E[0].end,E[1].start)==0?E=[s.fromPoints(E[0].start,E[1].end)]:s.comparePoints(E[0].start,E[1].end)==0&&(E=[s.fromPoints(E[1].start,E[0].end)])),f.$bracketHighlight={ranges:E,markerIds:E.map(function(D){return f.addMarker(D,H,"text")})},l.getHighlightIndentGuides()&&l.renderer.$textLayer.$highlightIndentGuide()}},50)}},d.prototype.focus=function(){this.textInput.focus()},d.prototype.isFocused=function(){return this.textInput.isFocused()},d.prototype.blur=function(){this.textInput.blur()},d.prototype.onFocus=function(l){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",l))},d.prototype.onBlur=function(l){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",l))},d.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},d.prototype.onDocumentChange=function(l){var f=this.session.$useWrapMode,v=l.start.row==l.end.row?l.end.row:1/0;this.renderer.updateLines(l.start.row,v,f),this._signal("change",l),this.$cursorChange()},d.prototype.onTokenizerUpdate=function(l){var f=l.data;this.renderer.updateLines(f.first,f.last)},d.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},d.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},d.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},d.prototype.$updateHighlightActiveLine=function(){var l=this.getSession(),f;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(f=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(f=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(f=!1)),l.$highlightLineMarker&&!f)l.removeMarker(l.$highlightLineMarker.id),l.$highlightLineMarker=null;else if(!l.$highlightLineMarker&&f){var v=new s(f.row,f.column,f.row,1/0);v.id=l.addMarker(v,"ace_active-line","screenLine"),l.$highlightLineMarker=v}else f&&(l.$highlightLineMarker.start.row=f.row,l.$highlightLineMarker.end.row=f.row,l.$highlightLineMarker.start.column=f.column,l._signal("changeBackMarker"))},d.prototype.onSelectionChange=function(l){var f=this.session;if(f.$selectionMarker&&f.removeMarker(f.$selectionMarker),f.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var v=this.selection.getRange(),C=this.getSelectionStyle();f.$selectionMarker=f.addMarker(v,"ace_selection",C)}var M=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(M),this._signal("changeSelection")},d.prototype.$getSelectionHighLightRegexp=function(){var l=this.session,f=this.getSelectionRange();if(!(f.isEmpty()||f.isMultiLine())){var v=f.start.column,C=f.end.column,M=l.getLine(f.start.row),E=M.substring(v,C);if(!(E.length>5e3||!/[\w\d]/.test(E))){var _=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:E}),I=M.substring(v-1,C+1);if(_.test(I))return _}}},d.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},d.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},d.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},d.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},d.prototype.onChangeMode=function(l){this.renderer.updateText(),this._emit("changeMode",l)},d.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},d.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},d.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},d.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},d.prototype.getCopyText=function(){var l=this.getSelectedText(),f=this.session.doc.getNewLineCharacter(),v=!1;if(!l&&this.$copyWithEmptySelection){v=!0;for(var C=this.selection.getAllRanges(),M=0;M<C.length;M++){var E=C[M];M&&C[M-1].start.row==E.start.row||(l+=this.session.getLine(E.start.row)+f)}}var _={text:l};return this._signal("copy",_),L.lineMode=v?_.text:!1,_.text},d.prototype.onCopy=function(){this.commands.exec("copy",this)},d.prototype.onCut=function(){this.commands.exec("cut",this)},d.prototype.onPaste=function(l,f){var v={text:l,event:f};this.commands.exec("paste",this,v)},d.prototype.$handlePaste=function(l){typeof l=="string"&&(l={text:l}),this._signal("paste",l);var f=l.text,v=f===L.lineMode,C=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)v?C.insert({row:this.selection.lead.row,column:0},f):this.insert(f);else if(v)this.selection.rangeList.ranges.forEach(function(H){C.insert({row:H.start.row,column:0},f)});else{var M=f.split(/\r\n|\r|\n/),E=this.selection.rangeList.ranges,_=M.length==2&&(!M[0]||!M[1]);if(M.length!=E.length||_)return this.commands.exec("insertstring",this,f);for(var I=E.length;I--;){var O=E[I];O.isEmpty()||C.remove(O),C.insert(O.start,M[I])}}},d.prototype.execCommand=function(l,f){return this.commands.exec(l,this,f)},d.prototype.insert=function(l,f){var v=this.session,C=v.getMode(),M=this.getCursorPosition();if(this.getBehavioursEnabled()&&!f){var E=C.transformAction(v.getState(M.row),"insertion",this,v,l);E&&(l!==E.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),l=E.text)}if(l==" "&&(l=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&l.indexOf(`
203
- `)==-1){var _=s.fromPoints(M,M);_.end.column+=l.length,this.session.remove(_)}}else{var _=this.getSelectionRange();M=this.session.remove(_),this.clearSelection()}if(l==`
204
- `||l==`\r
205
- `){var D=v.getLine(M.row);if(M.column>D.search(/\S|$/)){var I=D.substr(M.column).search(/\S|$/);v.doc.removeInLine(M.row,M.column,M.column+I)}}this.clearSelection();var O=M.column,H=v.getState(M.row),D=v.getLine(M.row),N=C.checkOutdent(H,D,l);if(v.insert(M,l),E&&E.selection&&(E.selection.length==2?this.selection.setSelectionRange(new s(M.row,O+E.selection[0],M.row,O+E.selection[1])):this.selection.setSelectionRange(new s(M.row+E.selection[0],E.selection[1],M.row+E.selection[2],E.selection[3]))),this.$enableAutoIndent){if(v.getDocument().isNewLine(l)){var W=C.getNextLineIndent(H,D.slice(0,M.column),v.getTabString());v.insert({row:M.row+1,column:0},W)}N&&C.autoOutdent(H,v,M.row)}},d.prototype.autoIndent=function(){for(var l=this.session,f=l.getMode(),v=this.selection.isEmpty()?[new s(0,0,l.doc.getLength()-1,0)]:this.selection.getAllRanges(),C="",M="",E="",_=l.getTabString(),I=0;I<v.length;I++)for(var O=v[I].start.row,H=v[I].end.row,D=O;D<=H;D++){D>0&&(C=l.getState(D-1),M=l.getLine(D-1),E=f.getNextLineIndent(C,M,_));var N=l.getLine(D),W=f.$getIndent(N);if(E!==W){if(W.length>0){var F=new s(D,0,D,W.length);l.remove(F)}E.length>0&&l.insert({row:D,column:0},E)}f.autoOutdent(C,l,D)}},d.prototype.onTextInput=function(l,f){if(!f)return this.keyBinding.onTextInput(l);this.startOperation({command:{name:"insertstring"}});var v=this.applyComposition.bind(this,l,f);this.selection.rangeCount?this.forEachSelection(v):v(),this.endOperation()},d.prototype.applyComposition=function(l,f){if(f.extendLeft||f.extendRight){var v=this.selection.getRange();v.start.column-=f.extendLeft,v.end.column+=f.extendRight,v.start.column<0&&(v.start.row--,v.start.column+=this.session.getLine(v.start.row).length+1),this.selection.setRange(v),!l&&!v.isEmpty()&&this.remove()}if((l||!this.selection.isEmpty())&&this.insert(l,!0),f.restoreStart||f.restoreEnd){var v=this.selection.getRange();v.start.column-=f.restoreStart,v.end.column-=f.restoreEnd,this.selection.setRange(v)}},d.prototype.onCommandKey=function(l,f,v){return this.keyBinding.onCommandKey(l,f,v)},d.prototype.setOverwrite=function(l){this.session.setOverwrite(l)},d.prototype.getOverwrite=function(){return this.session.getOverwrite()},d.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},d.prototype.setScrollSpeed=function(l){this.setOption("scrollSpeed",l)},d.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},d.prototype.setDragDelay=function(l){this.setOption("dragDelay",l)},d.prototype.getDragDelay=function(){return this.getOption("dragDelay")},d.prototype.setSelectionStyle=function(l){this.setOption("selectionStyle",l)},d.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},d.prototype.setHighlightActiveLine=function(l){this.setOption("highlightActiveLine",l)},d.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},d.prototype.setHighlightGutterLine=function(l){this.setOption("highlightGutterLine",l)},d.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},d.prototype.setHighlightSelectedWord=function(l){this.setOption("highlightSelectedWord",l)},d.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},d.prototype.setAnimatedScroll=function(l){this.renderer.setAnimatedScroll(l)},d.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},d.prototype.setShowInvisibles=function(l){this.renderer.setShowInvisibles(l)},d.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},d.prototype.setDisplayIndentGuides=function(l){this.renderer.setDisplayIndentGuides(l)},d.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},d.prototype.setHighlightIndentGuides=function(l){this.renderer.setHighlightIndentGuides(l)},d.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},d.prototype.setShowPrintMargin=function(l){this.renderer.setShowPrintMargin(l)},d.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},d.prototype.setPrintMarginColumn=function(l){this.renderer.setPrintMarginColumn(l)},d.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},d.prototype.setReadOnly=function(l){this.setOption("readOnly",l)},d.prototype.getReadOnly=function(){return this.getOption("readOnly")},d.prototype.setBehavioursEnabled=function(l){this.setOption("behavioursEnabled",l)},d.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},d.prototype.setWrapBehavioursEnabled=function(l){this.setOption("wrapBehavioursEnabled",l)},d.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},d.prototype.setShowFoldWidgets=function(l){this.setOption("showFoldWidgets",l)},d.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},d.prototype.setFadeFoldWidgets=function(l){this.setOption("fadeFoldWidgets",l)},d.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},d.prototype.remove=function(l){this.selection.isEmpty()&&(l=="left"?this.selection.selectLeft():this.selection.selectRight());var f=this.getSelectionRange();if(this.getBehavioursEnabled()){var v=this.session,C=v.getState(f.start.row),M=v.getMode().transformAction(C,"deletion",this,v,f);if(f.end.column===0){var E=v.getTextRange(f);if(E[E.length-1]==`
206
- `){var _=v.getLine(f.end.row);/^\s+$/.test(_)&&(f.end.column=_.length)}}M&&(f=M)}this.session.remove(f),this.clearSelection()},d.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},d.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},d.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},d.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var l=this.getSelectionRange();l.start.column==l.end.column&&l.start.row==l.end.row&&(l.end.column=0,l.end.row++),this.session.remove(l),this.clearSelection()},d.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var l=this.getCursorPosition();this.insert(`
207
- `),this.moveCursorToPosition(l)},d.prototype.setGhostText=function(l,f){this.renderer.setGhostText(l,f)},d.prototype.removeGhostText=function(){this.renderer.removeGhostText()},d.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var l=this.getCursorPosition(),f=l.column;if(f!==0){var v=this.session.getLine(l.row),C,M;f<v.length?(C=v.charAt(f)+v.charAt(f-1),M=new s(l.row,f-1,l.row,f+1)):(C=v.charAt(f-1)+v.charAt(f-2),M=new s(l.row,f-2,l.row,f)),this.session.replace(M,C),this.session.selection.moveToPosition(M.end)}}},d.prototype.toLowerCase=function(){var l=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var f=this.getSelectionRange(),v=this.session.getTextRange(f);this.session.replace(f,v.toLowerCase()),this.selection.setSelectionRange(l)},d.prototype.toUpperCase=function(){var l=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var f=this.getSelectionRange(),v=this.session.getTextRange(f);this.session.replace(f,v.toUpperCase()),this.selection.setSelectionRange(l)},d.prototype.indent=function(){var l=this.session,f=this.getSelectionRange();if(f.start.row<f.end.row){var v=this.$getSelectedRows();l.indentRows(v.first,v.last," ");return}else if(f.start.column<f.end.column){var C=l.getTextRange(f);if(!/^\s+$/.test(C)){var v=this.$getSelectedRows();l.indentRows(v.first,v.last," ");return}}var M=l.getLine(f.start.row),E=f.start,_=l.getTabSize(),I=l.documentToScreenColumn(E.row,E.column);if(this.session.getUseSoftTabs())var O=_-I%_,H=a.stringRepeat(" ",O);else{for(var O=I%_;M[f.start.column-1]==" "&&O;)f.start.column--,O--;this.selection.setSelectionRange(f),H=" "}return this.insert(H)},d.prototype.blockIndent=function(){var l=this.$getSelectedRows();this.session.indentRows(l.first,l.last," ")},d.prototype.blockOutdent=function(){var l=this.session.getSelection();this.session.outdentRows(l.getRange())},d.prototype.sortLines=function(){for(var l=this.$getSelectedRows(),f=this.session,v=[],C=l.first;C<=l.last;C++)v.push(f.getLine(C));v.sort(function(_,I){return _.toLowerCase()<I.toLowerCase()?-1:_.toLowerCase()>I.toLowerCase()?1:0});for(var M=new s(0,0,0,0),C=l.first;C<=l.last;C++){var E=f.getLine(C);M.start.row=C,M.end.row=C,M.end.column=E.length,f.replace(M,v[C-l.first])}},d.prototype.toggleCommentLines=function(){var l=this.session.getState(this.getCursorPosition().row),f=this.$getSelectedRows();this.session.getMode().toggleCommentLines(l,this.session,f.first,f.last)},d.prototype.toggleBlockComment=function(){var l=this.getCursorPosition(),f=this.session.getState(l.row),v=this.getSelectionRange();this.session.getMode().toggleBlockComment(f,this.session,v,l)},d.prototype.getNumberAt=function(l,f){var v=/[\-]?[0-9]+(?:\.[0-9]+)?/g;v.lastIndex=0;for(var C=this.session.getLine(l);v.lastIndex<f;){var M=v.exec(C);if(M.index<=f&&M.index+M[0].length>=f){var E={value:M[0],start:M.index,end:M.index+M[0].length};return E}}return null},d.prototype.modifyNumber=function(l){var f=this.selection.getCursor().row,v=this.selection.getCursor().column,C=new s(f,v-1,f,v),M=this.session.getTextRange(C);if(!isNaN(parseFloat(M))&&isFinite(M)){var E=this.getNumberAt(f,v);if(E){var _=E.value.indexOf(".")>=0?E.start+E.value.indexOf(".")+1:E.end,I=E.start+E.value.length-_,O=parseFloat(E.value);O*=Math.pow(10,I),_!==E.end&&v<_?l*=Math.pow(10,E.end-v-1):l*=Math.pow(10,E.end-v),O+=l,O/=Math.pow(10,I);var H=O.toFixed(I),D=new s(f,E.start,f,E.end);this.session.replace(D,H),this.moveCursorTo(f,Math.max(E.start+1,v+H.length-E.value.length))}}else this.toggleWord()},d.prototype.toggleWord=function(){var l=this.selection.getCursor().row,f=this.selection.getCursor().column;this.selection.selectWord();var v=this.getSelectedText(),C=this.selection.getWordRange().start.column,M=v.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),E=f-C-1;E<0&&(E=0);var _=0,I=0,O=this;v.match(/[A-Za-z0-9_]+/)&&M.forEach(function(U,K){I=_+U.length,E>=_&&E<=I&&(v=U,O.selection.clearSelection(),O.moveCursorTo(l,_+C),O.selection.selectTo(l,I+C)),_=I});for(var H=this.$toggleWordPairs,D,N=0;N<H.length;N++)for(var W=H[N],F=0;F<=1;F++){var P=+!F,j=v.match(new RegExp("^\\s?_?("+a.escapeRegExp(W[F])+")\\s?$","i"));if(j){var V=v.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(j[1])+")($|\\s)","g"));V&&(D=v.replace(new RegExp(a.escapeRegExp(W[F]),"i"),function(U){var K=W[P];return U.toUpperCase()==U?K=K.toUpperCase():U.charAt(0).toUpperCase()==U.charAt(0)&&(K=K.substr(0,0)+W[P].charAt(0).toUpperCase()+K.substr(1)),K}),this.insert(D),D="")}}},d.prototype.findLinkAt=function(l,f){var v,C,M=this.session.getLine(l),E=M.split(/((?:https?|ftp):\/\/[\S]+)/),_=f;_<0&&(_=0);var I=0,O=0,H;try{for(var D=T(E),N=D.next();!N.done;N=D.next()){var W=N.value;if(O=I+W.length,_>=I&&_<=O&&W.match(/((?:https?|ftp):\/\/[\S]+)/)){H=W.replace(/[\s:.,'";}\]]+$/,"");break}I=O}}catch(F){v={error:F}}finally{try{N&&!N.done&&(C=D.return)&&C.call(D)}finally{if(v)throw v.error}}return H},d.prototype.openLink=function(){var l=this.selection.getCursor(),f=this.findLinkAt(l.row,l.column);return f&&window.open(f,"_blank"),f!=null},d.prototype.removeLines=function(){var l=this.$getSelectedRows();this.session.removeFullLines(l.first,l.last),this.clearSelection()},d.prototype.duplicateSelection=function(){var l=this.selection,f=this.session,v=l.getRange(),C=l.isBackwards();if(v.isEmpty()){var M=v.start.row;f.duplicateLines(M,M)}else{var E=C?v.start:v.end,_=f.insert(E,f.getTextRange(v));v.start=E,v.end=_,l.setSelectionRange(v,C)}},d.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},d.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},d.prototype.moveText=function(l,f,v){return this.session.moveText(l,f,v)},d.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},d.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},d.prototype.$moveLines=function(l,f){var v,C,M=this.selection;if(!M.inMultiSelectMode||this.inVirtualSelectionMode){var E=M.toOrientedRange();v=this.$getSelectedRows(E),C=this.session.$moveLines(v.first,v.last,f?0:l),f&&l==-1&&(C=0),E.moveBy(C,0),M.fromOrientedRange(E)}else{var _=M.rangeList.ranges;M.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var I=0,O=0,H=_.length,D=0;D<H;D++){var N=D;_[D].moveBy(I,0),v=this.$getSelectedRows(_[D]);for(var W=v.first,F=v.last;++D<H;){O&&_[D].moveBy(O,0);var P=this.$getSelectedRows(_[D]);if(f&&P.first!=F)break;if(!f&&P.first>F+1)break;F=P.last}for(D--,I=this.session.$moveLines(W,F,f?0:l),f&&l==-1&&(N=D+1);N<=D;)_[N].moveBy(I,0),N++;f||(I=0),O+=I}M.fromOrientedRange(M.ranges[0]),M.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},d.prototype.$getSelectedRows=function(l){return l=(l||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(l.start.row),last:this.session.getRowFoldEnd(l.end.row)}},d.prototype.onCompositionStart=function(l){this.renderer.showComposition(l)},d.prototype.onCompositionUpdate=function(l){this.renderer.setCompositionText(l)},d.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},d.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},d.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},d.prototype.isRowVisible=function(l){return l>=this.getFirstVisibleRow()&&l<=this.getLastVisibleRow()},d.prototype.isRowFullyVisible=function(l){return l>=this.renderer.getFirstFullyVisibleRow()&&l<=this.renderer.getLastFullyVisibleRow()},d.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},d.prototype.$moveByPage=function(l,f){var v=this.renderer,C=this.renderer.layerConfig,M=l*Math.floor(C.height/C.lineHeight);f===!0?this.selection.$moveSelection(function(){this.moveCursorBy(M,0)}):f===!1&&(this.selection.moveCursorBy(M,0),this.selection.clearSelection());var E=v.scrollTop;v.scrollBy(0,M*C.lineHeight),f!=null&&v.scrollCursorIntoView(null,.5),v.animateScrolling(E)},d.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},d.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},d.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},d.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},d.prototype.scrollPageDown=function(){this.$moveByPage(1)},d.prototype.scrollPageUp=function(){this.$moveByPage(-1)},d.prototype.scrollToRow=function(l){this.renderer.scrollToRow(l)},d.prototype.scrollToLine=function(l,f,v,C){this.renderer.scrollToLine(l,f,v,C)},d.prototype.centerSelection=function(){var l=this.getSelectionRange(),f={row:Math.floor(l.start.row+(l.end.row-l.start.row)/2),column:Math.floor(l.start.column+(l.end.column-l.start.column)/2)};this.renderer.alignCursor(f,.5)},d.prototype.getCursorPosition=function(){return this.selection.getCursor()},d.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},d.prototype.getSelectionRange=function(){return this.selection.getRange()},d.prototype.selectAll=function(){this.selection.selectAll()},d.prototype.clearSelection=function(){this.selection.clearSelection()},d.prototype.moveCursorTo=function(l,f){this.selection.moveCursorTo(l,f)},d.prototype.moveCursorToPosition=function(l){this.selection.moveCursorToPosition(l)},d.prototype.jumpToMatching=function(l,f){var v=this.getCursorPosition(),C=new p(this.session,v.row,v.column),M=C.getCurrentToken(),E=0;M&&M.type.indexOf("tag-name")!==-1&&(M=C.stepBackward());var _=M||C.stepForward();if(_){var I,O=!1,H={},D=v.column-_.start,N,W={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(_.value.match(/[{}()\[\]]/g)){for(;D<_.value.length&&!O;D++)if(W[_.value[D]])switch(N=W[_.value[D]]+"."+_.type.replace("rparen","lparen"),isNaN(H[N])&&(H[N]=0),_.value[D]){case"(":case"[":case"{":H[N]++;break;case")":case"]":case"}":H[N]--,H[N]===-1&&(I="bracket",O=!0);break}}else _.type.indexOf("tag-name")!==-1&&(isNaN(H[_.value])&&(H[_.value]=0),M.value==="<"&&E>1?H[_.value]++:M.value==="</"&&H[_.value]--,H[_.value]===-1&&(I="tag",O=!0));O||(M=_,E++,_=C.stepForward(),D=0)}while(_&&!O);if(I){var F,P;if(I==="bracket")F=this.session.getBracketRange(v),F||(F=new s(C.getCurrentTokenRow(),C.getCurrentTokenColumn()+D-1,C.getCurrentTokenRow(),C.getCurrentTokenColumn()+D-1),P=F.start,(f||P.row===v.row&&Math.abs(P.column-v.column)<2)&&(F=this.session.getBracketRange(P)));else if(I==="tag"){if(!_||_.type.indexOf("tag-name")===-1)return;if(F=new s(C.getCurrentTokenRow(),C.getCurrentTokenColumn()-2,C.getCurrentTokenRow(),C.getCurrentTokenColumn()-2),F.compare(v.row,v.column)===0){var j=this.session.getMatchingTags(v);j&&(j.openTag.contains(v.row,v.column)?(F=j.closeTag,P=F.start):(F=j.openTag,j.closeTag.start.row===v.row&&j.closeTag.start.column===v.column?P=F.end:P=F.start))}P=P||F.start}P=F&&F.cursor||P,P&&(l?F&&f?this.selection.setRange(F):F&&F.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(P.row,P.column):this.selection.moveTo(P.row,P.column))}}},d.prototype.gotoLine=function(l,f,v){this.selection.clearSelection(),this.session.unfold({row:l-1,column:f||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(l-1,f||0),this.isRowFullyVisible(l-1)||this.scrollToLine(l-1,!0,v)},d.prototype.navigateTo=function(l,f){this.selection.moveTo(l,f)},d.prototype.navigateUp=function(l){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var f=this.selection.anchor.getPosition();return this.moveCursorToPosition(f)}this.selection.clearSelection(),this.selection.moveCursorBy(-l||-1,0)},d.prototype.navigateDown=function(l){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var f=this.selection.anchor.getPosition();return this.moveCursorToPosition(f)}this.selection.clearSelection(),this.selection.moveCursorBy(l||1,0)},d.prototype.navigateLeft=function(l){if(this.selection.isEmpty())for(l=l||1;l--;)this.selection.moveCursorLeft();else{var f=this.getSelectionRange().start;this.moveCursorToPosition(f)}this.clearSelection()},d.prototype.navigateRight=function(l){if(this.selection.isEmpty())for(l=l||1;l--;)this.selection.moveCursorRight();else{var f=this.getSelectionRange().end;this.moveCursorToPosition(f)}this.clearSelection()},d.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},d.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},d.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},d.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},d.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},d.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},d.prototype.replace=function(l,f){f&&this.$search.set(f);var v=this.$search.find(this.session),C=0;return v&&(this.$tryReplace(v,l)&&(C=1),this.selection.setSelectionRange(v),this.renderer.scrollSelectionIntoView(v.start,v.end)),C},d.prototype.replaceAll=function(l,f){f&&this.$search.set(f);var v=this.$search.findAll(this.session),C=0;if(!v.length)return C;var M=this.getSelectionRange();this.selection.moveTo(0,0);for(var E=v.length-1;E>=0;--E)this.$tryReplace(v[E],l)&&C++;return this.selection.setSelectionRange(M),C},d.prototype.$tryReplace=function(l,f){var v=this.session.getTextRange(l);return f=this.$search.replace(v,f),f!==null?(l.end=this.session.replace(l,f),l):null},d.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},d.prototype.find=function(l,f,v){f||(f={}),typeof l=="string"||l instanceof RegExp?f.needle=l:typeof l=="object"&&A.mixin(f,l);var C=this.selection.getRange();f.needle==null&&(l=this.session.getTextRange(C)||this.$search.$options.needle,l||(C=this.session.getWordRange(C.start.row,C.start.column),l=this.session.getTextRange(C)),this.$search.set({needle:l})),this.$search.set(f),f.start||this.$search.set({start:C});var M=this.$search.find(this.session);if(f.preventScroll)return M;if(M)return this.revealRange(M,v),M;f.backwards?C.start=C.end:C.end=C.start,this.selection.setRange(C)},d.prototype.findNext=function(l,f){this.find({skipCurrent:!0,backwards:!1},l,f)},d.prototype.findPrevious=function(l,f){this.find(l,{skipCurrent:!0,backwards:!0},f)},d.prototype.revealRange=function(l,f){this.session.unfold(l),this.selection.setSelectionRange(l);var v=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(l.start,l.end,.5),f!==!1&&this.renderer.animateScrolling(v)},d.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},d.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},d.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(l){l.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},d.prototype.setAutoScrollEditorIntoView=function(l){if(l){var f,v=this,C=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var M=this.$scrollAnchor;M.style.cssText="position:absolute",this.container.insertBefore(M,this.container.firstChild);var E=this.on("changeSelection",function(){C=!0}),_=this.renderer.on("beforeRender",function(){C&&(f=v.renderer.container.getBoundingClientRect())}),I=this.renderer.on("afterRender",function(){if(C&&f&&(v.isFocused()||v.searchBox&&v.searchBox.isFocused())){var O=v.renderer,H=O.$cursorLayer.$pixelPos,D=O.layerConfig,N=H.top-D.offset;H.top>=0&&N+f.top<0?C=!0:H.top<D.height&&H.top+f.top+D.lineHeight>window.innerHeight?C=!1:C=null,C!=null&&(M.style.top=N+"px",M.style.left=H.left+"px",M.style.height=D.lineHeight+"px",M.scrollIntoView(C)),C=f=null}});this.setAutoScrollEditorIntoView=function(O){O||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",E),this.renderer.off("afterRender",I),this.renderer.off("beforeRender",_))}}},d.prototype.$resetCursorStyle=function(){var l=this.$cursorStyle||"ace",f=this.renderer.$cursorLayer;f&&(f.setSmoothBlinking(/smooth/.test(l)),f.isBlinking=!this.$readOnly&&l!="wide",$.setCssClass(f.element,"ace_slim-cursors",/slim/.test(l)))},d.prototype.prompt=function(l,f,v){var C=this;m.loadModule("ace/ext/prompt",function(M){M.prompt(C,l,f,v)})},d}();b.$uid=0,b.prototype.curOp=null,b.prototype.prevOp={},b.prototype.$mergeableCommands=["backspace","del","insertstring"],b.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],A.implement(b.prototype,c),m.defineOptions(b.prototype,"editor",{selectionStyle:{set:function(d){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:d})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(d){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(d){this.textInput.setReadOnly(d),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(d){this.textInput.setCopyWithEmptySelection(d)},initialValue:!1},cursorStyle:{set:function(d){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(d){this.setAutoScrollEditorIntoView(d)}},keyboardHandler:{set:function(d){this.setKeyboardHandler(d)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(d){this.session.setValue(d)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(d){this.setSession(d)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(d){this.renderer.$gutterLayer.setShowLineNumbers(d),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),d&&this.$relativeLineNumbers?R.attach(this):R.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(d){this.$showLineNumbers&&d?R.attach(this):R.detach(this)}},placeholder:{set:function(d){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var l=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(l&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),$.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!l&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),$.addCssClass(this.container,"ace_hasPlaceholder");var f=$.createElement("div");f.className="ace_placeholder",f.textContent=this.$placeholder||"",this.renderer.placeholderNode=f,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!l&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(d){var l={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(C){C.blur(),C.renderer.scroller.focus()},readOnly:!0},f=function(C){if(C.target==this.renderer.scroller&&C.keyCode===S.enter){C.preventDefault();var M=this.getCursorPosition().row;this.isRowVisible(M)||this.scrollToLine(M,!0,!0),this.focus()}},v;d?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(h.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",w("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",w("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",f.bind(this)),this.commands.addCommand(l),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",w("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",w("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),v||(v=new g(this)),v.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",f.bind(this)),this.commands.removeCommand(l),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),v&&v.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(d){this.$textInputAriaLabel=d},initialValue:""},enableMobileMenu:{set:function(d){this.$enableMobileMenu=d},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var R={getText:function(d,l){return(Math.abs(d.selection.lead.row-l)||l+1+(l<9?"·":""))+""},getWidth:function(d,l,f){return Math.max(l.toString().length,(f.lastRow+1).toString().length,2)*f.characterWidth},update:function(d,l){l.renderer.$loop.schedule(l.renderer.CHANGE_GUTTER)},attach:function(d){d.renderer.$gutterLayer.$renderer=this,d.on("changeSelection",this.update),this.update(null,d)},detach:function(d){d.renderer.$gutterLayer.$renderer==this&&(d.renderer.$gutterLayer.$renderer=null),d.off("changeSelection",this.update),this.update(null,d)}};x.Editor=b}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(k,x,z){var T=k("../lib/dom"),A=function(){function $(a,h){this.element=a,this.canvasHeight=h||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return $.prototype.moveContainer=function(a){T.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},$.prototype.pageChanged=function(a,h){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)},$.prototype.computeLineTop=function(a,h,n){var r=h.firstRowScreen*h.lineHeight,i=Math.floor(r/this.canvasHeight),t=n.documentToScreenRow(a,0)*h.lineHeight;return t-i*this.canvasHeight},$.prototype.computeLineHeight=function(a,h,n){return h.lineHeight*n.getRowLineCount(a)},$.prototype.getLength=function(){return this.cells.length},$.prototype.get=function(a){return this.cells[a]},$.prototype.shift=function(){this.$cacheCell(this.cells.shift())},$.prototype.pop=function(){this.$cacheCell(this.cells.pop())},$.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var h=T.createFragment(this.element),n=0;n<a.length;n++)h.appendChild(a[n].element);this.element.appendChild(h)}else this.cells.push(a),this.element.appendChild(a.element)},$.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var h=T.createFragment(this.element),n=0;n<a.length;n++)h.appendChild(a[n].element);this.element.firstChild?this.element.insertBefore(h,this.element.firstChild):this.element.appendChild(h)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},$.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},$.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},$.prototype.createCell=function(a,h,n,r){var i=this.cellCache.pop();if(!i){var t=T.createElement("div");r&&r(t),this.element.appendChild(t),i={element:t,text:"",row:a}}return i.row=a,i},$}();x.Lines=A}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(k,x,z){var T=k("../lib/dom"),A=k("../lib/oop"),$=k("../lib/lang"),a=k("../lib/event_emitter").EventEmitter,h=k("./lines").Lines,n=k("../config").nls,r=function(){function t(e){this.element=T.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new h(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(e,o){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,o)},t.prototype.removeGutterDecoration=function(e,o){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,o)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var o=0;o<e.length;o++){var s=e[o],c=s.row,u=this.$annotations[c];u||(u=this.$annotations[c]={text:[],type:[],displayText:[]});var y=s.text,m=s.text,p=s.type;y=y?$.escapeHTML(y):s.html||"",m=m||s.html||"",u.text.indexOf(y)===-1&&(u.text.push(y),u.type.push(p),u.displayText.push(m));var g=s.className;g?u.className=g:p==="error"?u.className=" ace_error":p==="security"&&!/\bace_error\b/.test(u.className)?u.className=" ace_security":p==="warning"&&!/\bace_(error|security)\b/.test(u.className)?u.className=" ace_warning":p==="info"&&!u.className?u.className=" ace_info":p==="hint"&&!u.className&&(u.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var o=e.start.row,s=e.end.row-o;if(s!==0)if(e.action=="remove")this.$annotations.splice(o,s+1,null);else{var c=new Array(s+1);c.unshift(o,1),this.$annotations.splice.apply(this.$annotations,c)}}},t.prototype.update=function(e){this.config=e;var o=this.session,s=e.firstRow,c=Math.min(e.lastRow+e.gutterOffset,o.getLength()-1);this.oldLastRow=c,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var u=o.getNextFoldLine(s),y=u?u.start.row:1/0,m=null,p=-1,g=s;;){if(g>y&&(g=u.end.row+1,u=o.getNextFoldLine(g,u),y=u?u.start.row:1/0),g>c){for(;this.$lines.getLength()>p+1;)this.$lines.pop();break}m=this.$lines.get(++p),m?m.row=g:(m=this.$lines.createCell(g,e,this.session,i),this.$lines.push(m)),this.$renderCell(m,e,u,g),g++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var o=this.session,s=o.gutterRenderer||this.$renderer,c=o.$firstLineNumber,u=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||o.$useWrapMode)&&(u=o.getLength()+c-1);var y=s?s.getWidth(o,u,e):u.toString().length*e.characterWidth,m=this.$padding||this.$computePadding();y+=m.left+m.right,y!==this.gutterWidth&&!isNaN(y)&&(this.gutterWidth=y,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",y))},t.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},t.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var o=this.$lines.cells;this.$cursorCell=null;for(var s=0;s<o.length;s++){var c=o[s];if(c.row>=this.$cursorRow){if(c.row>this.$cursorRow){var u=this.session.getFoldLine(this.$cursorRow);if(s>0&&u&&u.start.row==o[s-1].row)c=o[s-1];else break}c.element.className="ace_gutter-active-line "+c.element.className,this.$cursorCell=c;break}}}}},t.prototype.scrollLines=function(e){var o=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(o,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),c=this.oldLastRow;if(this.oldLastRow=s,!o||c<e.firstRow)return this.update(e);if(s<o.firstRow)return this.update(e);if(o.firstRow<e.firstRow)for(var u=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);u>0;u--)this.$lines.shift();if(c>s)for(var u=this.session.getFoldedRowCount(s+1,c);u>0;u--)this.$lines.pop();e.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,o.firstRow-1)),s>c&&this.$lines.push(this.$renderLines(e,c+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,o,s){for(var c=[],u=o,y=this.session.getNextFoldLine(u),m=y?y.start.row:1/0;u>m&&(u=y.end.row+1,y=this.session.getNextFoldLine(u,y),m=y?y.start.row:1/0),!(u>s);){var p=this.$lines.createCell(u,e,this.session,i);this.$renderCell(p,e,y,u),c.push(p),u++}return c},t.prototype.$renderCell=function(e,o,s,c){var u=e.element,y=this.session,m=u.childNodes[0],p=u.childNodes[1],g=u.childNodes[2],w=g.firstChild,L=y.$firstLineNumber,S=y.$breakpoints,b=y.$decorations,R=y.gutterRenderer||this.$renderer,d=this.$showFoldWidgets&&y.foldWidgets,l=s?s.start.row:Number.MAX_VALUE,f=o.lineHeight+"px",v=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",C=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",M=(R?R.getText(y,c):c+L).toString();if(this.$highlightGutterLine&&(c==this.$cursorRow||s&&c<this.$cursorRow&&c>=l&&this.$cursorRow<=s.end.row)&&(v+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),S[c]&&(v+=S[c]),b[c]&&(v+=b[c]),this.$annotations[c]&&c!==l&&(v+=this.$annotations[c].className),d){var E=d[c];E==null&&(E=d[c]=y.getFoldWidget(c))}if(E){var _="ace_fold-widget ace_"+E,I=E=="start"&&c==l&&c<s.end.row;if(I){_+=" ace_closed";for(var O="",H=!1,D=c+1;D<=s.end.row;D++)if(this.$annotations[D]){if(this.$annotations[D].className===" ace_error"){H=!0,O=" ace_error_fold";break}this.$annotations[D].className===" ace_security"?(H=!0,O=" ace_security_fold"):this.$annotations[D].className===" ace_warning"&&O!==" ace_security_fold"&&(H=!0,O=" ace_warning_fold")}v+=O}else _+=" ace_open";p.className!=_&&(p.className=_),T.setStyle(p.style,"height",f),T.setStyle(p.style,"display","inline-block"),p.setAttribute("role","button"),p.setAttribute("tabindex","-1");var N=y.getFoldWidgetRange(c);N?p.setAttribute("aria-label",n("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[N.start.row+1,N.end.row+1])):s?p.setAttribute("aria-label",n("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[s.start.row+1,s.end.row+1])):p.setAttribute("aria-label",n("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[c+1])),I?(p.setAttribute("aria-expanded","false"),p.setAttribute("title",n("gutter.code-folding.closed.title","Unfold code"))):(p.setAttribute("aria-expanded","true"),p.setAttribute("title",n("gutter.code-folding.open.title","Fold code")))}else p&&(T.setStyle(p.style,"display","none"),p.setAttribute("tabindex","0"),p.removeAttribute("role"),p.removeAttribute("aria-label"));if(H&&this.$showFoldedAnnotations){g.className="ace_gutter_annotation",w.className=C,w.className+=O,T.setStyle(w.style,"height",f),T.setStyle(g.style,"display","block"),T.setStyle(g.style,"height",f);var W;switch(O){case" ace_error_fold":W=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[M]);break;case" ace_security_fold":W=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[M]);break;case" ace_warning_fold":W=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[M]);break}g.setAttribute("aria-label",W),g.setAttribute("tabindex","-1"),g.setAttribute("role","button")}else if(this.$annotations[c]){g.className="ace_gutter_annotation",w.className=C,this.$useSvgGutterIcons?w.className+=this.$annotations[c].className:u.classList.add(this.$annotations[c].className.replace(" ","")),T.setStyle(w.style,"height",f),T.setStyle(g.style,"display","block"),T.setStyle(g.style,"height",f);var W;switch(this.$annotations[c].className){case" ace_error":W=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[M]);break;case" ace_security":W=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[M]);break;case" ace_warning":W=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[M]);break;case" ace_info":W=n("gutter.annotation.aria-label.info","Info, read annotations row $0",[M]);break;case" ace_hint":W=n("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[M]);break}g.setAttribute("aria-label",W),g.setAttribute("tabindex","-1"),g.setAttribute("role","button")}else T.setStyle(g.style,"display","none"),g.removeAttribute("aria-label"),g.removeAttribute("role"),g.setAttribute("tabindex","0");return M!==m.data&&(m.data=M),u.className!=v&&(u.className=v),T.setStyle(e.element.style,"height",this.$lines.computeLineHeight(c,o,y)+"px"),T.setStyle(e.element.style,"top",this.$lines.computeLineTop(c,o,y)+"px"),e.text=M,g.style.display==="none"&&p.style.display==="none"?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},t.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},t.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(e){e?T.addCssClass(this.element,"ace_folding-enabled"):T.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=T.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},t.prototype.getRegion=function(e){var o=this.$padding||this.$computePadding(),s=this.element.getBoundingClientRect();if(e.x<o.left+s.left)return"markers";if(this.$showFoldWidgets&&e.x>s.right-o.right)return"foldWidgets"},t}();r.prototype.$fixedWidth=!1,r.prototype.$highlightGutterLine=!0,r.prototype.$renderer="",r.prototype.$showLineNumbers=!0,r.prototype.$showFoldWidgets=!0,A.implement(r.prototype,a);function i(t){var e=document.createTextNode("");t.appendChild(e);var o=T.createElement("span");t.appendChild(o);var s=T.createElement("span");t.appendChild(s);var c=T.createElement("span");return s.appendChild(c),t}x.Gutter=r}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(k,x,z){var T=k("../range").Range,A=k("../lib/dom"),$=function(){function h(n){this.element=A.createElement("div"),this.element.className="ace_layer ace_marker-layer",n.appendChild(this.element)}return h.prototype.setPadding=function(n){this.$padding=n},h.prototype.setSession=function(n){this.session=n},h.prototype.setMarkers=function(n){this.markers=n},h.prototype.elt=function(n,r){var i=this.i!=-1&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=r,i.className=n},h.prototype.update=function(n){if(n){this.config=n,this.i=0;var r;for(var i in this.markers){var t=this.markers[i];if(!t.range){t.update(r,this,this.session,n);continue}var e=t.range.clipRows(n.firstRow,n.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var o=this.$getTop(e.start.row,n),s=this.$padding+e.start.column*n.characterWidth;t.renderer(r,e,s,o,n)}else t.type=="fullLine"?this.drawFullLineMarker(r,e,t.clazz,n):t.type=="screenLine"?this.drawScreenLineMarker(r,e,t.clazz,n):e.isMultiLine()?t.type=="text"?this.drawTextMarker(r,e,t.clazz,n):this.drawMultiLineMarker(r,e,t.clazz,n):this.drawSingleLineMarker(r,e,t.clazz+" ace_start ace_br15",n)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},h.prototype.$getTop=function(n,r){return(n-r.firstRowScreen)*r.lineHeight},h.prototype.drawTextMarker=function(n,r,i,t,e){for(var o=this.session,s=r.start.row,c=r.end.row,u=s,y=0,m=0,p=o.getScreenLastRowColumn(u),g=new T(u,r.start.column,u,m);u<=c;u++)g.start.row=g.end.row=u,g.start.column=u==s?r.start.column:o.getRowWrapIndent(u),g.end.column=p,y=m,m=p,p=u+1<c?o.getScreenLastRowColumn(u+1):u==c?0:r.end.column,this.drawSingleLineMarker(n,g,i+(u==s?" ace_start":"")+" ace_br"+a(u==s||u==s+1&&r.start.column,y<m,m>p,u==c),t,u==c?0:1,e)},h.prototype.drawMultiLineMarker=function(n,r,i,t,e){var o=this.$padding,s=t.lineHeight,c=this.$getTop(r.start.row,t),u=o+r.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(r.start.row)){var y=r.clone();y.end.row=y.start.row,y.end.column=this.session.getLine(y.start.row).length,this.drawBidiSingleLineMarker(n,y,i+" ace_br1 ace_start",t,null,e)}else this.elt(i+" ace_br1 ace_start","height:"+s+"px;right:"+o+"px;top:"+c+"px;left:"+u+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(r.end.row)){var y=r.clone();y.start.row=y.end.row,y.start.column=0,this.drawBidiSingleLineMarker(n,y,i+" ace_br12",t,null,e)}else{c=this.$getTop(r.end.row,t);var m=r.end.column*t.characterWidth;this.elt(i+" ace_br12","height:"+s+"px;width:"+m+"px;top:"+c+"px;left:"+o+"px;"+(e||""))}if(s=(r.end.row-r.start.row-1)*t.lineHeight,!(s<=0)){c=this.$getTop(r.start.row+1,t);var p=(r.start.column?1:0)|(r.end.column?0:8);this.elt(i+(p?" ace_br"+p:""),"height:"+s+"px;right:"+o+"px;top:"+c+"px;left:"+o+"px;"+(e||""))}},h.prototype.drawSingleLineMarker=function(n,r,i,t,e,o){if(this.session.$bidiHandler.isBidiRow(r.start.row))return this.drawBidiSingleLineMarker(n,r,i,t,e,o);var s=t.lineHeight,c=(r.end.column+(e||0)-r.start.column)*t.characterWidth,u=this.$getTop(r.start.row,t),y=this.$padding+r.start.column*t.characterWidth;this.elt(i,"height:"+s+"px;width:"+c+"px;top:"+u+"px;left:"+y+"px;"+(o||""))},h.prototype.drawBidiSingleLineMarker=function(n,r,i,t,e,o){var s=t.lineHeight,c=this.$getTop(r.start.row,t),u=this.$padding,y=this.session.$bidiHandler.getSelections(r.start.column,r.end.column);y.forEach(function(m){this.elt(i,"height:"+s+"px;width:"+(m.width+(e||0))+"px;top:"+c+"px;left:"+(u+m.left)+"px;"+(o||""))},this)},h.prototype.drawFullLineMarker=function(n,r,i,t,e){var o=this.$getTop(r.start.row,t),s=t.lineHeight;r.start.row!=r.end.row&&(s+=this.$getTop(r.end.row,t)-o),this.elt(i,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(e||""))},h.prototype.drawScreenLineMarker=function(n,r,i,t,e){var o=this.$getTop(r.start.row,t),s=t.lineHeight;this.elt(i,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(e||""))},h}();$.prototype.$padding=0;function a(h,n,r,i){return(h?1:0)|(n?2:0)|(r?4:0)|(i?8:0)}x.Marker=$}),ace.define("ace/layer/text_util",["require","exports","module"],function(k,x,z){var T=new Set(["text","rparen","lparen"]);x.isTextToken=function(A){return T.has(A)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(k,x,z){var T=k("../lib/oop"),A=k("../lib/dom"),$=k("../lib/lang"),a=k("./lines").Lines,h=k("../lib/event_emitter").EventEmitter,n=k("../config").nls,r=k("./text_util").isTextToken,i=function(){function t(e){this.dom=A,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,o=e.getNewLineCharacter()==`
208
- `&&e.getNewLineMode()!="windows",s=o?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=s)return this.EOL_CHAR=s,!0},t.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(o){this._signal("changeCharacterSize",o)}.bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},t.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},t.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},t.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var o=this.$tabStrings=[0],s=1;s<e+1;s++)if(this.showTabs){var c=this.dom.createElement("span");c.className="ace_invisible ace_invisible_tab",c.textContent=$.stringRepeat(this.TAB_CHAR,s),o.push(c)}else o.push(this.dom.createTextNode($.stringRepeat(" ",s),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var u="ace_indent-guide",y=this.showSpaces?" ace_invisible ace_invisible_space":"",m=this.showSpaces?$.stringRepeat(this.SPACE_CHAR,this.tabSize):$.stringRepeat(" ",this.tabSize),p=this.showTabs?" ace_invisible ace_invisible_tab":"",g=this.showTabs?$.stringRepeat(this.TAB_CHAR,this.tabSize):m,c=this.dom.createElement("span");c.className=u+y,c.textContent=m,this.$tabStrings[" "]=c;var c=this.dom.createElement("span");c.className=u+p,c.textContent=g,this.$tabStrings[" "]=c}},t.prototype.updateLines=function(e,o,s){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var c=Math.max(o,e.firstRow),u=Math.min(s,e.lastRow),y=this.element.childNodes,m=0,g=e.firstRow;g<c;g++){var w=this.session.getFoldLine(g);if(w)if(w.containsRow(c)){c=w.start.row;break}else g=w.end.row;m++}for(var p=!1,g=c,w=this.session.getNextFoldLine(g),L=w?w.start.row:1/0;g>L&&(g=w.end.row+1,w=this.session.getNextFoldLine(g,w),L=w?w.start.row:1/0),!(g>u);){var S=y[m++];if(S){this.dom.removeChildren(S),this.$renderLine(S,g,g==L?w:!1),p&&(S.style.top=this.$lines.computeLineTop(g,e,this.session)+"px");var b=e.lineHeight*this.session.getRowLength(g)+"px";S.style.height!=b&&(p=!0,S.style.height=b)}g++}if(p)for(;m<this.$lines.cells.length;){var R=this.$lines.cells[m++];R.element.style.top=this.$lines.computeLineTop(R.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var o=this.config;if(this.config=e,this.$lines.pageChanged(o,e))return this.update(e);this.$lines.moveContainer(e);var s=e.lastRow,c=o?o.lastRow:-1;if(!o||c<e.firstRow)return this.update(e);if(s<o.firstRow)return this.update(e);if(!o||o.lastRow<e.firstRow)return this.update(e);if(e.lastRow<o.firstRow)return this.update(e);if(o.firstRow<e.firstRow)for(var u=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);u>0;u--)this.$lines.shift();if(o.lastRow>e.lastRow)for(var u=this.session.getFoldedRowCount(e.lastRow+1,o.lastRow);u>0;u--)this.$lines.pop();e.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,o.firstRow-1)),e.lastRow>o.lastRow&&this.$lines.push(this.$renderLinesFragment(e,o.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,o,s){for(var c=[],u=o,y=this.session.getNextFoldLine(u),m=y?y.start.row:1/0;u>m&&(u=y.end.row+1,y=this.session.getNextFoldLine(u,y),m=y?y.start.row:1/0),!(u>s);){var p=this.$lines.createCell(u,e,this.session),g=p.element;this.dom.removeChildren(g),A.setStyle(g.style,"height",this.$lines.computeLineHeight(u,e,this.session)+"px"),A.setStyle(g.style,"top",this.$lines.computeLineTop(u,e,this.session)+"px"),this.$renderLine(g,u,u==m?y:!1),this.$useLineGroups()?g.className="ace_line_group":g.className="ace_line",c.push(p),u++}return c},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var o=e.firstRow,s=e.lastRow,c=this.$lines;c.getLength();)c.pop();c.push(this.$renderLinesFragment(e,o,s))},t.prototype.$renderToken=function(e,o,s,c){for(var u=this,y=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,m=this.dom.createFragment(this.element),p,g=0;p=y.exec(c);){var w=p[1],L=p[2],S=p[3],b=p[4],R=p[5];if(!(!u.showSpaces&&L)){var d=g!=p.index?c.slice(g,p.index):"";if(g=p.index+p[0].length,d&&m.appendChild(this.dom.createTextNode(d,this.element)),w){var l=u.session.getScreenTabSize(o+p.index);m.appendChild(u.$tabStrings[l].cloneNode(!0)),o+=l-1}else if(L)if(u.showSpaces){var f=this.dom.createElement("span");f.className="ace_invisible ace_invisible_space",f.textContent=$.stringRepeat(u.SPACE_CHAR,L.length),m.appendChild(f)}else m.appendChild(this.dom.createTextNode(L,this.element));else if(S){var f=this.dom.createElement("span");f.className="ace_invisible ace_invisible_space ace_invalid",f.textContent=$.stringRepeat(u.SPACE_CHAR,S.length),m.appendChild(f)}else if(b){o+=1;var f=this.dom.createElement("span");f.style.width=u.config.characterWidth*2+"px",f.className=u.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",f.textContent=u.showSpaces?u.SPACE_CHAR:b,m.appendChild(f)}else if(R){o+=1;var f=this.dom.createElement("span");f.style.width=u.config.characterWidth*2+"px",f.className="ace_cjk",f.textContent=R,m.appendChild(f)}}}if(m.appendChild(this.dom.createTextNode(g?c.slice(g):c,this.element)),r(s.type))e.appendChild(m);else{var v="ace_"+s.type.replace(/\./g," ace_"),f=this.dom.createElement("span");s.type=="fold"&&(f.style.width=s.value.length*this.config.characterWidth+"px",f.setAttribute("title",n("inline-fold.closed.title","Unfold code"))),f.className=v,f.appendChild(m),e.appendChild(f)}return o+c.length},t.prototype.renderIndentGuide=function(e,o,s){var c=o.search(this.$indentGuideRe);if(c<=0||c>=s)return o;if(o[0]==" "){c-=c%this.tabSize;for(var u=c/this.tabSize,y=0;y<u;y++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),o.substr(c)}else if(o[0]==" "){for(var y=0;y<c;y++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),o.substr(c)}return this.$highlightIndentGuide(),o},t.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var o=this.session.selection.getCursor(),s=/^\s*/.exec(this.session.doc.getLine(o.row))[0].length,c=Math.floor(s/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:c,start:o.row};var u=this.session.$bracketHighlight;if(u){for(var y=this.session.$bracketHighlight.ranges,m=0;m<y.length;m++)if(o.row!==y[m].start.row){this.$highlightIndentGuideMarker.end=y[m].start.row,o.row>y[m].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[o.row]!==""&&o.column===e[o.row].length){this.$highlightIndentGuideMarker.dir=1;for(var m=o.row+1;m<e.length;m++){var p=e[m],g=/^\s*/.exec(p)[0].length;if(p!==""&&(this.$highlightIndentGuideMarker.end=m,g<=s))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,o=0;o<e.length;o++){var s=e[o],c=s.element.childNodes;if(c.length>0){for(var u=0;u<c.length;u++)if(c[u].classList&&c[u].classList.contains("ace_indent-guide-active")){c[u].classList.remove("ace_indent-guide-active");break}}}},t.prototype.$setIndentGuideActive=function(e,o){var s=this.session.doc.getLine(e.row);if(s!==""){var c=e.element.childNodes;if(c){var u=c[o-1];u&&u.classList&&u.classList.contains("ace_indent-guide")&&u.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var o=this.$highlightIndentGuideMarker.indentLevel;if(o!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var s=0;s<e.length;s++){var c=e[s];if(this.$highlightIndentGuideMarker.end&&c.row>=this.$highlightIndentGuideMarker.start+1){if(c.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(c,o)}}else for(var s=e.length-1;s>=0;s--){var c=e[s];if(this.$highlightIndentGuideMarker.end&&c.row<this.$highlightIndentGuideMarker.start){if(c.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(c,o)}}}},t.prototype.$createLineElement=function(e){var o=this.dom.createElement("div");return o.className="ace_line",o.style.height=this.config.lineHeight+"px",o},t.prototype.$renderWrappedLine=function(e,o,s){var c=0,u=0,y=s[0],m=0,p=this.$createLineElement();e.appendChild(p);for(var g=0;g<o.length;g++){var w=o[g],L=w.value;if(g==0&&this.displayIndentGuides){if(c=L.length,L=this.renderIndentGuide(p,L,y),!L)continue;c-=L.length}if(c+L.length<y)m=this.$renderToken(p,m,w,L),c+=L.length;else{for(;c+L.length>=y;)m=this.$renderToken(p,m,w,L.substring(0,y-c)),L=L.substring(y-c),c=y,p=this.$createLineElement(),e.appendChild(p),p.appendChild(this.dom.createTextNode($.stringRepeat(" ",s.indent),this.element)),u++,m=0,y=s[u]||Number.MAX_VALUE;L.length!=0&&(c+=L.length,m=this.$renderToken(p,m,w,L))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(p,m,null,"",!0)},t.prototype.$renderSimpleLine=function(e,o){for(var s=0,c=0;c<o.length;c++){var u=o[c],y=u.value;if(!(c==0&&this.displayIndentGuides&&(y=this.renderIndentGuide(e,y),!y))){if(s+y.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,u,y);s=this.$renderToken(e,s,u,y)}}},t.prototype.$renderOverflowMessage=function(e,o,s,c,u){s&&this.$renderToken(e,o,s,c.slice(0,this.MAX_LINE_LENGTH-o));var y=this.dom.createElement("span");y.className="ace_inline_button ace_keyword ace_toggle_wrap",y.textContent=u?"<hide>":"<click to see more...>",e.appendChild(y)},t.prototype.$renderLine=function(e,o,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(o)),s)var c=this.$getFoldLineTokens(o,s);else var c=this.session.getTokens(o);var u=e;if(c.length){var y=this.session.getRowSplitData(o);if(y&&y.length){this.$renderWrappedLine(e,c,y);var u=e.lastChild}else{var u=e;this.$useLineGroups()&&(u=this.$createLineElement(),e.appendChild(u)),this.$renderSimpleLine(u,c)}}else this.$useLineGroups()&&(u=this.$createLineElement(),e.appendChild(u));if(this.showEOL&&u){s&&(o=s.end.row);var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_eol",m.textContent=o==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,u.appendChild(m)}},t.prototype.$getFoldLineTokens=function(e,o){var s=this.session,c=[];function u(m,p,g){for(var w=0,L=0;L+m[w].value.length<p;)if(L+=m[w].value.length,w++,w==m.length)return;if(L!=p){var S=m[w].value.substring(p-L);S.length>g-p&&(S=S.substring(0,g-p)),c.push({type:m[w].type,value:S}),L=p+S.length,w+=1}for(;L<g&&w<m.length;){var S=m[w].value;S.length+L>g?c.push({type:m[w].type,value:S.substring(0,g-L)}):c.push(m[w]),L+=S.length,w+=1}}var y=s.getTokens(e);return o.walk(function(m,p,g,w,L){m!=null?c.push({type:"fold",value:m}):(L&&(y=s.getTokens(p)),y.length&&u(y,w,g))},o.end.row,this.session.getLine(o.end.row).length),c},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();i.prototype.EOF_CHAR="¶",i.prototype.EOL_CHAR_LF="¬",i.prototype.EOL_CHAR_CRLF="¤",i.prototype.EOL_CHAR=i.prototype.EOL_CHAR_LF,i.prototype.TAB_CHAR="—",i.prototype.SPACE_CHAR="·",i.prototype.$padding=0,i.prototype.MAX_LINE_LENGTH=1e4,i.prototype.showInvisibles=!1,i.prototype.showSpaces=!1,i.prototype.showTabs=!1,i.prototype.showEOL=!1,i.prototype.displayIndentGuides=!0,i.prototype.$highlightIndentGuides=!0,i.prototype.$tabStrings=[],i.prototype.destroy={},i.prototype.onChangeTabSize=i.prototype.$computeTabString,T.implement(i.prototype,h),x.Text=i}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(k,x,z){var T=k("../lib/dom"),A=function(){function $(a){this.element=T.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),T.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return $.prototype.$updateOpacity=function(a){for(var h=this.cursors,n=h.length;n--;)T.setStyle(h[n].style,"opacity",a?"":"0")},$.prototype.$startCssAnimation=function(){for(var a=this.cursors,h=a.length;h--;)a[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&T.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},$.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,T.removeCssClass(this.element,"ace_animate-blinking")},$.prototype.setPadding=function(a){this.$padding=a},$.prototype.setSession=function(a){this.session=a},$.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},$.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},$.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,T.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},$.prototype.addCursor=function(){var a=T.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},$.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},$.prototype.hideCursor=function(){this.isVisible=!1,T.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},$.prototype.showCursor=function(){this.isVisible=!0,T.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},$.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,T.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&T.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),T.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),h()},this.blinkInterval),h()}},$.prototype.getPixelPosition=function(a,h){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(a),r=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,a.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),i=(n.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},$.prototype.isCursorInView=function(a,h){return a.top>=0&&a.top<h.maxHeight},$.prototype.update=function(a){this.config=a;var h=this.session.$selectionMarkers,n=0,r=0;(h===void 0||h.length===0)&&(h=[{cursor:null}]);for(var n=0,i=h.length;n<i;n++){var t=this.getPixelPosition(h[n].cursor,!0);if(!((t.top>a.height+a.offset||t.top<0)&&n>1)){var e=this.cursors[r++]||this.addCursor(),o=e.style;this.drawCursor?this.drawCursor(e,t,a,h[n],this.session):this.isCursorInView(t,a)?(T.setStyle(o,"display","block"),T.translate(e,t.left,t.top),T.setStyle(o,"width",Math.round(a.characterWidth)+"px"),T.setStyle(o,"height",a.lineHeight+"px")):T.setStyle(o,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},$.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?T.addCssClass(this.element,"ace_overwrite-cursors"):T.removeCssClass(this.element,"ace_overwrite-cursors"))},$.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},$}();A.prototype.$padding=0,A.prototype.drawCursor=null,x.Cursor=A}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(k,x,z){var T=this&&this.__extends||function(){var e=function(o,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var y in u)Object.prototype.hasOwnProperty.call(u,y)&&(c[y]=u[y])},e(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(o,s);function c(){this.constructor=o}o.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)}}(),A=k("./lib/oop"),$=k("./lib/dom"),a=k("./lib/event"),h=k("./lib/event_emitter").EventEmitter,n=32768,r=function(){function e(o,s){this.element=$.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=$.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},e}();A.implement(r.prototype,h);var i=function(e){T(o,e);function o(s,c){var u=e.call(this,s,"-v")||this;return u.scrollTop=0,u.scrollHeight=0,c.$scrollbarWidth=u.width=$.scrollbarWidth(s.ownerDocument),u.inner.style.width=u.element.style.width=(u.width||15)+5+"px",u.$minWidth=0,u}return o.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var s=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-s)/(this.coeff-s)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(s){this.element.style.height=s+"px"},o.prototype.setScrollHeight=function(s){this.scrollHeight=s,s>n?(this.coeff=n/s,s=n):this.coeff!=1&&(this.coeff=1),this.inner.style.height=s+"px"},o.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},o}(r);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var t=function(e){T(o,e);function o(s,c){var u=e.call(this,s,"-h")||this;return u.scrollLeft=0,u.height=c.$scrollbarWidth,u.inner.style.height=u.element.style.height=(u.height||15)+5+"px",u}return o.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.setWidth=function(s){this.element.style.width=s+"px"},o.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},o.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},o.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},o}(r);x.ScrollBar=i,x.ScrollBarV=i,x.ScrollBarH=t,x.VScrollBar=i,x.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(k,x,z){var T=this&&this.__extends||function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,c){s.__proto__=c}||function(s,c){for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(s[u]=c[u])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function s(){this.constructor=e}e.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}(),A=k("./lib/oop"),$=k("./lib/dom"),a=k("./lib/event"),h=k("./lib/event_emitter").EventEmitter;$.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
209
- position: absolute;
210
- background: rgba(128, 128, 128, 0.6);
211
- -moz-box-sizing: border-box;
212
- box-sizing: border-box;
213
- border: 1px solid #bbb;
214
- border-radius: 2px;
215
- z-index: 8;
216
- }
217
- .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
218
- position: absolute;
219
- z-index: 6;
220
- background: none;
221
- overflow: hidden!important;
222
- }
223
- .ace_editor>.ace_sb-v {
224
- z-index: 6;
225
- right: 0;
226
- top: 0;
227
- width: 12px;
228
- }
229
- .ace_editor>.ace_sb-v div {
230
- z-index: 8;
231
- right: 0;
232
- width: 100%;
233
- }
234
- .ace_editor>.ace_sb-h {
235
- bottom: 0;
236
- left: 0;
237
- height: 12px;
238
- }
239
- .ace_editor>.ace_sb-h div {
240
- bottom: 0;
241
- height: 100%;
242
- }
243
- .ace_editor>.ace_sb_grabbed {
244
- z-index: 8;
245
- background: #000;
246
- }`,"ace_scrollbar.css",!1);var n=function(){function t(e,o){this.element=$.createElement("div"),this.element.className="ace_sb"+o,this.inner=$.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},t}();A.implement(n.prototype,h);var r=function(t){T(e,t);function e(o,s){var c=t.call(this,o,"-v")||this;return c.scrollTop=0,c.scrollHeight=0,c.parent=o,c.width=c.VScrollWidth,c.renderer=s,c.inner.style.width=c.element.style.width=(c.width||15)+"px",c.$minWidth=0,c}return e.prototype.onMouseDown=function(o,s){if(o==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var c=this,u=s.clientY,y=function(b){u=b.clientY},m=function(){clearInterval(L)},p=s.clientY,g=this.thumbTop,w=function(){if(u!==void 0){var b=c.scrollTopFromThumbTop(g+u-p);b!==c.scrollTop&&c._emit("scroll",{data:b})}};a.capture(this.inner,y,m);var L=setInterval(w,20);return a.preventDefault(s)}var S=s.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(S)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(o){var s=o*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return s=s>>0,s<0?s=0:s>this.pageHeight-this.viewHeight&&(s=this.pageHeight-this.viewHeight),s},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(o){this.height=Math.max(0,o),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(o,s){this.pageHeight===o&&!s||(this.pageHeight=o,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},e.prototype.setScrollTop=function(o){this.scrollTop=o,o<0&&(o=0),this.thumbTop=o*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(n);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var i=function(t){T(e,t);function e(o,s){var c=t.call(this,o,"-h")||this;return c.scrollLeft=0,c.scrollWidth=0,c.height=c.HScrollHeight,c.inner.style.height=c.element.style.height=(c.height||12)+"px",c.renderer=s,c}return e.prototype.onMouseDown=function(o,s){if(o==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var c=this,u=s.clientX,y=function(b){u=b.clientX},m=function(){clearInterval(L)},p=s.clientX,g=this.thumbLeft,w=function(){if(u!==void 0){var b=c.scrollLeftFromThumbLeft(g+u-p);b!==c.scrollLeft&&c._emit("scroll",{data:b})}};a.capture(this.inner,y,m);var L=setInterval(w,20);return a.preventDefault(s)}var S=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(S)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(o){var s=o*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return s=s>>0,s<0?s=0:s>this.pageWidth-this.viewWidth&&(s=this.pageWidth-this.viewWidth),s},e.prototype.setWidth=function(o){this.width=Math.max(0,o),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(o,s){this.pageWidth===o&&!s||(this.pageWidth=o,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},e.prototype.setScrollLeft=function(o){this.scrollLeft=o,o<0&&(o=0),this.thumbLeft=o*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(n);i.prototype.setInnerWidth=i.prototype.setScrollWidth,x.ScrollBar=r,x.ScrollBarV=r,x.ScrollBarH=i,x.VScrollBar=r,x.HScrollBar=i}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(k,x,z){var T=k("./lib/event"),A=function(){function $(a,h){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var n=this;this._flush=function(r){n.pending=!1;var i=n.changes;if(i&&(T.blockIdle(100),n.changes=0,n.onRender(i)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return $.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(T.nextFrame(this._flush),this.pending=!0)},$.prototype.clear=function(a){var h=this.changes;return this.changes=0,h},$}();x.RenderLoop=A}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(k,x,z){var T=k("../lib/oop"),A=k("../lib/dom"),$=k("../lib/lang"),a=k("../lib/event"),h=k("../lib/useragent"),n=k("../lib/event_emitter").EventEmitter,r=512,i=typeof ResizeObserver=="function",t=200,e=function(){function o(s){this.el=A.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=A.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=A.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=$.stringRepeat("X",r),this.$characterSize={width:0,height:0},i?this.$addObserver():this.checkForSizeChanges()}return o.prototype.$setMeasureNodeStyles=function(s,c){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",h.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=c?"hidden":"visible"},o.prototype.checkForSizeChanges=function(s){if(s===void 0&&(s=this.$measureSizes()),s&&(this.$characterSize.width!==s.width||this.$characterSize.height!==s.height)){this.$measureNode.style.fontWeight="bold";var c=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=c&&c.width===s.width&&c.height===s.height,this._emit("changeCharacterSize",{data:s})}},o.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(c){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},o.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var s=this;return this.$pollSizeChangesTimer=a.onIdle(function c(){s.checkForSizeChanges(),a.onIdle(c,500)},500)},o.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},o.prototype.$measureSizes=function(s){var c={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/r};return c.width===0||c.height===0?null:c},o.prototype.$measureCharWidth=function(s){this.$main.textContent=$.stringRepeat(s,r);var c=this.$main.getBoundingClientRect();return c.width/r},o.prototype.getCharacterWidth=function(s){var c=this.charSizes[s];return c===void 0&&(c=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),c},o.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},o.prototype.$getZoom=function(s){return!s||!s.parentElement?1:(Number(window.getComputedStyle(s).zoom)||1)*this.$getZoom(s.parentElement)},o.prototype.$initTransformMeasureNodes=function(){var s=function(c,u){return["div",{style:"position: absolute;top:"+c+"px;left:"+u+"px;"}]};this.els=A.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},o.prototype.transformCoordinates=function(s,c){if(s){var u=this.$getZoom(this.el);s=g(1/u,s)}function y(I,O,H){var D=I[1]*O[0]-I[0]*O[1];return[(-O[1]*H[0]+O[0]*H[1])/D,(+I[1]*H[0]-I[0]*H[1])/D]}function m(I,O){return[I[0]-O[0],I[1]-O[1]]}function p(I,O){return[I[0]+O[0],I[1]+O[1]]}function g(I,O){return[I*O[0],I*O[1]]}this.els||this.$initTransformMeasureNodes();function w(I){var O=I.getBoundingClientRect();return[O.left,O.top]}var L=w(this.els[0]),S=w(this.els[1]),b=w(this.els[2]),R=w(this.els[3]),d=y(m(R,S),m(R,b),m(p(S,b),p(R,L))),l=g(1+d[0],m(S,L)),f=g(1+d[1],m(b,L));if(c){var v=c,C=d[0]*v[0]/t+d[1]*v[1]/t+1,M=p(g(v[0],l),g(v[1],f));return p(g(1/C/t,M),L)}var E=m(s,L),_=y(m(l,g(d[0],E)),m(f,g(d[1],E)),E);return g(t,_)},o}();e.prototype.$characterSize={width:0,height:0},T.implement(e.prototype,n),x.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(k,x,z){z.exports=`
247
- .ace_br1 {border-top-left-radius : 3px;}
248
- .ace_br2 {border-top-right-radius : 3px;}
249
- .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
250
- .ace_br4 {border-bottom-right-radius: 3px;}
251
- .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
252
- .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
253
- .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
254
- .ace_br8 {border-bottom-left-radius : 3px;}
255
- .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
256
- .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
257
- .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
258
- .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
259
- .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
260
- .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
261
- .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
262
-
263
-
264
- .ace_editor {
265
- position: relative;
266
- overflow: hidden;
267
- padding: 0;
268
- font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
269
- direction: ltr;
270
- text-align: left;
271
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
272
- forced-color-adjust: none;
273
- }
274
-
275
- .ace_scroller {
276
- position: absolute;
277
- overflow: hidden;
278
- top: 0;
279
- bottom: 0;
280
- background-color: inherit;
281
- -ms-user-select: none;
282
- -moz-user-select: none;
283
- -webkit-user-select: none;
284
- user-select: none;
285
- cursor: text;
286
- }
287
-
288
- .ace_content {
289
- position: absolute;
290
- box-sizing: border-box;
291
- min-width: 100%;
292
- contain: style size layout;
293
- font-variant-ligatures: no-common-ligatures;
294
- }
295
-
296
- .ace_keyboard-focus:focus {
297
- box-shadow: inset 0 0 0 2px #5E9ED6;
298
- outline: none;
299
- }
300
-
301
- .ace_dragging .ace_scroller:before{
302
- position: absolute;
303
- top: 0;
304
- left: 0;
305
- right: 0;
306
- bottom: 0;
307
- content: '';
308
- background: rgba(250, 250, 250, 0.01);
309
- z-index: 1000;
310
- }
311
- .ace_dragging.ace_dark .ace_scroller:before{
312
- background: rgba(0, 0, 0, 0.01);
313
- }
314
-
315
- .ace_gutter {
316
- position: absolute;
317
- overflow : hidden;
318
- width: auto;
319
- top: 0;
320
- bottom: 0;
321
- left: 0;
322
- cursor: default;
323
- z-index: 4;
324
- -ms-user-select: none;
325
- -moz-user-select: none;
326
- -webkit-user-select: none;
327
- user-select: none;
328
- contain: style size layout;
329
- }
330
-
331
- .ace_gutter-active-line {
332
- position: absolute;
333
- left: 0;
334
- right: 0;
335
- }
336
-
337
- .ace_scroller.ace_scroll-left:after {
338
- content: "";
339
- position: absolute;
340
- top: 0;
341
- right: 0;
342
- bottom: 0;
343
- left: 0;
344
- box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
345
- pointer-events: none;
346
- }
347
-
348
- .ace_gutter-cell, .ace_gutter-cell_svg-icons {
349
- position: absolute;
350
- top: 0;
351
- left: 0;
352
- right: 0;
353
- padding-left: 19px;
354
- padding-right: 6px;
355
- background-repeat: no-repeat;
356
- }
357
-
358
- .ace_gutter-cell_svg-icons .ace_gutter_annotation {
359
- margin-left: -14px;
360
- float: left;
361
- }
362
-
363
- .ace_gutter-cell .ace_gutter_annotation {
364
- margin-left: -19px;
365
- float: left;
366
- }
367
-
368
- .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
369
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
370
- background-repeat: no-repeat;
371
- background-position: 2px center;
372
- }
373
-
374
- .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
375
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
376
- background-repeat: no-repeat;
377
- background-position: 2px center;
378
- }
379
-
380
- .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
381
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
382
- background-repeat: no-repeat;
383
- background-position: 2px center;
384
- }
385
-
386
- .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
387
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
388
- }
389
-
390
- .ace_icon_svg.ace_error {
391
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
392
- background-color: crimson;
393
- }
394
- .ace_icon_svg.ace_security {
395
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
396
- background-color: crimson;
397
- }
398
- .ace_icon_svg.ace_warning {
399
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
400
- background-color: darkorange;
401
- }
402
- .ace_icon_svg.ace_info {
403
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
404
- background-color: royalblue;
405
- }
406
- .ace_icon_svg.ace_hint {
407
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
408
- background-color: silver;
409
- }
410
-
411
- .ace_icon_svg.ace_error_fold {
412
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
413
- background-color: crimson;
414
- }
415
- .ace_icon_svg.ace_security_fold {
416
- -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
417
- background-color: crimson;
418
- }
419
- .ace_icon_svg.ace_warning_fold {
420
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
421
- background-color: darkorange;
422
- }
423
-
424
- .ace_scrollbar {
425
- contain: strict;
426
- position: absolute;
427
- right: 0;
428
- bottom: 0;
429
- z-index: 6;
430
- }
431
-
432
- .ace_scrollbar-inner {
433
- position: absolute;
434
- cursor: text;
435
- left: 0;
436
- top: 0;
437
- }
438
-
439
- .ace_scrollbar-v{
440
- overflow-x: hidden;
441
- overflow-y: scroll;
442
- top: 0;
443
- }
444
-
445
- .ace_scrollbar-h {
446
- overflow-x: scroll;
447
- overflow-y: hidden;
448
- left: 0;
449
- }
450
-
451
- .ace_print-margin {
452
- position: absolute;
453
- height: 100%;
454
- }
455
-
456
- .ace_text-input {
457
- position: absolute;
458
- z-index: 0;
459
- width: 0.5em;
460
- height: 1em;
461
- opacity: 0;
462
- background: transparent;
463
- -moz-appearance: none;
464
- appearance: none;
465
- border: none;
466
- resize: none;
467
- outline: none;
468
- overflow: hidden;
469
- font: inherit;
470
- padding: 0 1px;
471
- margin: 0 -1px;
472
- contain: strict;
473
- -ms-user-select: text;
474
- -moz-user-select: text;
475
- -webkit-user-select: text;
476
- user-select: text;
477
- /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
478
- white-space: pre!important;
479
- }
480
- .ace_text-input.ace_composition {
481
- background: transparent;
482
- color: inherit;
483
- z-index: 1000;
484
- opacity: 1;
485
- }
486
- .ace_composition_placeholder { color: transparent }
487
- .ace_composition_marker {
488
- border-bottom: 1px solid;
489
- position: absolute;
490
- border-radius: 0;
491
- margin-top: 1px;
492
- }
493
-
494
- [ace_nocontext=true] {
495
- transform: none!important;
496
- filter: none!important;
497
- clip-path: none!important;
498
- mask : none!important;
499
- contain: none!important;
500
- perspective: none!important;
501
- mix-blend-mode: initial!important;
502
- z-index: auto;
503
- }
504
-
505
- .ace_layer {
506
- z-index: 1;
507
- position: absolute;
508
- overflow: hidden;
509
- /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
510
- word-wrap: normal;
511
- white-space: pre;
512
- height: 100%;
513
- width: 100%;
514
- box-sizing: border-box;
515
- /* setting pointer-events: auto; on node under the mouse, which changes
516
- during scroll, will break mouse wheel scrolling in Safari */
517
- pointer-events: none;
518
- }
519
-
520
- .ace_gutter-layer {
521
- position: relative;
522
- width: auto;
523
- text-align: right;
524
- pointer-events: auto;
525
- height: 1000000px;
526
- contain: style size layout;
527
- }
528
-
529
- .ace_text-layer {
530
- font: inherit !important;
531
- position: absolute;
532
- height: 1000000px;
533
- width: 1000000px;
534
- contain: style size layout;
535
- }
536
-
537
- .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
538
- contain: style size layout;
539
- position: absolute;
540
- top: 0;
541
- left: 0;
542
- right: 0;
543
- }
544
-
545
- .ace_hidpi .ace_text-layer,
546
- .ace_hidpi .ace_gutter-layer,
547
- .ace_hidpi .ace_content,
548
- .ace_hidpi .ace_gutter {
549
- contain: strict;
550
- }
551
- .ace_hidpi .ace_text-layer > .ace_line,
552
- .ace_hidpi .ace_text-layer > .ace_line_group {
553
- contain: strict;
554
- }
555
-
556
- .ace_cjk {
557
- display: inline-block;
558
- text-align: center;
559
- }
560
-
561
- .ace_cursor-layer {
562
- z-index: 4;
563
- }
564
-
565
- .ace_cursor {
566
- z-index: 4;
567
- position: absolute;
568
- box-sizing: border-box;
569
- border-left: 2px solid;
570
- /* workaround for smooth cursor repaintng whole screen in chrome */
571
- transform: translatez(0);
572
- }
573
-
574
- .ace_multiselect .ace_cursor {
575
- border-left-width: 1px;
576
- }
577
-
578
- .ace_slim-cursors .ace_cursor {
579
- border-left-width: 1px;
580
- }
581
-
582
- .ace_overwrite-cursors .ace_cursor {
583
- border-left-width: 0;
584
- border-bottom: 1px solid;
585
- }
586
-
587
- .ace_hidden-cursors .ace_cursor {
588
- opacity: 0.2;
589
- }
590
-
591
- .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
592
- opacity: 0;
593
- }
594
-
595
- .ace_smooth-blinking .ace_cursor {
596
- transition: opacity 0.18s;
597
- }
598
-
599
- .ace_animate-blinking .ace_cursor {
600
- animation-duration: 1000ms;
601
- animation-timing-function: step-end;
602
- animation-name: blink-ace-animate;
603
- animation-iteration-count: infinite;
604
- }
605
-
606
- .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
607
- animation-duration: 1000ms;
608
- animation-timing-function: ease-in-out;
609
- animation-name: blink-ace-animate-smooth;
610
- }
611
-
612
- @keyframes blink-ace-animate {
613
- from, to { opacity: 1; }
614
- 60% { opacity: 0; }
615
- }
616
-
617
- @keyframes blink-ace-animate-smooth {
618
- from, to { opacity: 1; }
619
- 45% { opacity: 1; }
620
- 60% { opacity: 0; }
621
- 85% { opacity: 0; }
622
- }
623
-
624
- .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
625
- position: absolute;
626
- z-index: 3;
627
- }
628
-
629
- .ace_marker-layer .ace_selection {
630
- position: absolute;
631
- z-index: 5;
632
- }
633
-
634
- .ace_marker-layer .ace_bracket {
635
- position: absolute;
636
- z-index: 6;
637
- }
638
-
639
- .ace_marker-layer .ace_error_bracket {
640
- position: absolute;
641
- border-bottom: 1px solid #DE5555;
642
- border-radius: 0;
643
- }
644
-
645
- .ace_marker-layer .ace_active-line {
646
- position: absolute;
647
- z-index: 2;
648
- }
649
-
650
- .ace_marker-layer .ace_selected-word {
651
- position: absolute;
652
- z-index: 4;
653
- box-sizing: border-box;
654
- }
655
-
656
- .ace_line .ace_fold {
657
- box-sizing: border-box;
658
-
659
- display: inline-block;
660
- height: 11px;
661
- margin-top: -2px;
662
- vertical-align: middle;
663
-
664
- background-image:
665
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
666
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
667
- background-repeat: no-repeat, repeat-x;
668
- background-position: center center, top left;
669
- color: transparent;
670
-
671
- border: 1px solid black;
672
- border-radius: 2px;
673
-
674
- cursor: pointer;
675
- pointer-events: auto;
676
- }
677
-
678
- .ace_dark .ace_fold {
679
- }
680
-
681
- .ace_fold:hover{
682
- background-image:
683
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
684
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
685
- }
686
-
687
- .ace_tooltip {
688
- background-color: #f5f5f5;
689
- border: 1px solid gray;
690
- border-radius: 1px;
691
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
692
- color: black;
693
- max-width: 100%;
694
- padding: 3px 4px;
695
- position: fixed;
696
- z-index: 999999;
697
- box-sizing: border-box;
698
- cursor: default;
699
- white-space: pre-wrap;
700
- word-wrap: break-word;
701
- line-height: normal;
702
- font-style: normal;
703
- font-weight: normal;
704
- letter-spacing: normal;
705
- pointer-events: none;
706
- overflow: auto;
707
- max-width: min(60em, 66vw);
708
- overscroll-behavior: contain;
709
- }
710
- .ace_tooltip pre {
711
- white-space: pre-wrap;
712
- }
713
-
714
- .ace_tooltip.ace_dark {
715
- background-color: #636363;
716
- color: #fff;
717
- }
718
-
719
- .ace_tooltip:focus {
720
- outline: 1px solid #5E9ED6;
721
- }
722
-
723
- .ace_icon {
724
- display: inline-block;
725
- width: 18px;
726
- vertical-align: top;
727
- }
728
-
729
- .ace_icon_svg {
730
- display: inline-block;
731
- width: 12px;
732
- vertical-align: top;
733
- -webkit-mask-repeat: no-repeat;
734
- -webkit-mask-size: 12px;
735
- -webkit-mask-position: center;
736
- }
737
-
738
- .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
739
- padding-right: 13px;
740
- }
741
-
742
- .ace_fold-widget {
743
- box-sizing: border-box;
744
-
745
- margin: 0 -12px 0 1px;
746
- display: none;
747
- width: 11px;
748
- vertical-align: top;
749
-
750
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
751
- background-repeat: no-repeat;
752
- background-position: center;
753
-
754
- border-radius: 3px;
755
-
756
- border: 1px solid transparent;
757
- cursor: pointer;
758
- }
759
-
760
- .ace_folding-enabled .ace_fold-widget {
761
- display: inline-block;
762
- }
763
-
764
- .ace_fold-widget.ace_end {
765
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
766
- }
767
-
768
- .ace_fold-widget.ace_closed {
769
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
770
- }
771
-
772
- .ace_fold-widget:hover {
773
- border: 1px solid rgba(0, 0, 0, 0.3);
774
- background-color: rgba(255, 255, 255, 0.2);
775
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
776
- }
777
-
778
- .ace_fold-widget:active {
779
- border: 1px solid rgba(0, 0, 0, 0.4);
780
- background-color: rgba(0, 0, 0, 0.05);
781
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
782
- }
783
- /**
784
- * Dark version for fold widgets
785
- */
786
- .ace_dark .ace_fold-widget {
787
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
788
- }
789
- .ace_dark .ace_fold-widget.ace_end {
790
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
791
- }
792
- .ace_dark .ace_fold-widget.ace_closed {
793
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
794
- }
795
- .ace_dark .ace_fold-widget:hover {
796
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
797
- background-color: rgba(255, 255, 255, 0.1);
798
- }
799
- .ace_dark .ace_fold-widget:active {
800
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
801
- }
802
-
803
- .ace_inline_button {
804
- border: 1px solid lightgray;
805
- display: inline-block;
806
- margin: -1px 8px;
807
- padding: 0 5px;
808
- pointer-events: auto;
809
- cursor: pointer;
810
- }
811
- .ace_inline_button:hover {
812
- border-color: gray;
813
- background: rgba(200,200,200,0.2);
814
- display: inline-block;
815
- pointer-events: auto;
816
- }
817
-
818
- .ace_fold-widget.ace_invalid {
819
- background-color: #FFB4B4;
820
- border-color: #DE5555;
821
- }
822
-
823
- .ace_fade-fold-widgets .ace_fold-widget {
824
- transition: opacity 0.4s ease 0.05s;
825
- opacity: 0;
826
- }
827
-
828
- .ace_fade-fold-widgets:hover .ace_fold-widget {
829
- transition: opacity 0.05s ease 0.05s;
830
- opacity:1;
831
- }
832
-
833
- .ace_underline {
834
- text-decoration: underline;
835
- }
836
-
837
- .ace_bold {
838
- font-weight: bold;
839
- }
840
-
841
- .ace_nobold .ace_bold {
842
- font-weight: normal;
843
- }
844
-
845
- .ace_italic {
846
- font-style: italic;
847
- }
848
-
849
-
850
- .ace_error-marker {
851
- background-color: rgba(255, 0, 0,0.2);
852
- position: absolute;
853
- z-index: 9;
854
- }
855
-
856
- .ace_highlight-marker {
857
- background-color: rgba(255, 255, 0,0.2);
858
- position: absolute;
859
- z-index: 8;
860
- }
861
-
862
- .ace_mobile-menu {
863
- position: absolute;
864
- line-height: 1.5;
865
- border-radius: 4px;
866
- -ms-user-select: none;
867
- -moz-user-select: none;
868
- -webkit-user-select: none;
869
- user-select: none;
870
- background: white;
871
- box-shadow: 1px 3px 2px grey;
872
- border: 1px solid #dcdcdc;
873
- color: black;
874
- }
875
- .ace_dark > .ace_mobile-menu {
876
- background: #333;
877
- color: #ccc;
878
- box-shadow: 1px 3px 2px grey;
879
- border: 1px solid #444;
880
-
881
- }
882
- .ace_mobile-button {
883
- padding: 2px;
884
- cursor: pointer;
885
- overflow: hidden;
886
- }
887
- .ace_mobile-button:hover {
888
- background-color: #eee;
889
- opacity:1;
890
- }
891
- .ace_mobile-button:active {
892
- background-color: #ddd;
893
- }
894
-
895
- .ace_placeholder {
896
- position: relative;
897
- font-family: arial;
898
- transform: scale(0.9);
899
- transform-origin: left;
900
- white-space: pre;
901
- opacity: 0.7;
902
- margin: 0 10px;
903
- z-index: 1;
904
- }
905
-
906
- .ace_ghost_text {
907
- opacity: 0.5;
908
- font-style: italic;
909
- }
910
-
911
- .ace_ghost_text_container > div {
912
- white-space: pre;
913
- }
914
-
915
- .ghost_text_line_wrapped::after {
916
- content: "↩";
917
- position: absolute;
918
- }
919
-
920
- .ace_lineWidgetContainer.ace_ghost_text {
921
- margin: 0px 4px
922
- }
923
-
924
- .ace_screenreader-only {
925
- position:absolute;
926
- left:-10000px;
927
- top:auto;
928
- width:1px;
929
- height:1px;
930
- overflow:hidden;
931
- }
932
-
933
- .ace_hidden_token {
934
- display: none;
935
- }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(k,x,z){var T=k("../lib/dom"),A=k("../lib/oop"),$=k("../lib/event_emitter").EventEmitter,a=function(){function h(n,r){this.canvas=T.createElement("canvas"),this.renderer=r,this.pixelRatio=1,this.maxHeight=r.layerConfig.maxHeight,this.lineHeight=r.layerConfig.lineHeight,this.canvasHeight=n.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=n.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},n.element.appendChild(this.canvas)}return h.prototype.$updateDecorators=function(n){var r=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(n){this.maxHeight=n.maxHeight,this.lineHeight=n.lineHeight,this.canvasHeight=n.height;var i=(n.lastRow+1)*this.lineHeight;i<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var t=this.canvas.getContext("2d");function e(R,d){return R.priority<d.priority?-1:R.priority>d.priority?1:0}var o=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),o){var s={info:1,warning:2,error:3};o.forEach(function(R){R.priority=s[R.type]||null}),o=o.sort(e);for(var c=this.renderer.session.$foldData,u=0;u<o.length;u++){var y=o[u].row,m=this.compensateFoldRows(y,c),p=Math.round((y-m)*this.lineHeight*this.heightRatio),g=Math.round((y-m)*this.lineHeight*this.heightRatio),w=Math.round(((y-m)*this.lineHeight+this.lineHeight)*this.heightRatio),L=w-g;if(L<this.minDecorationHeight){var S=(g+w)/2|0;S<this.halfMinDecorationHeight?S=this.halfMinDecorationHeight:S+this.halfMinDecorationHeight>this.canvasHeight&&(S=this.canvasHeight-this.halfMinDecorationHeight),g=Math.round(S-this.halfMinDecorationHeight),w=Math.round(S+this.halfMinDecorationHeight)}t.fillStyle=r[o[u].type]||null,t.fillRect(0,p,this.canvasWidth,w-g)}}var b=this.renderer.session.selection.getCursor();if(b){var m=this.compensateFoldRows(b.row,c),p=Math.round((b.row-m)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,p,this.canvasWidth,2)}},h.prototype.compensateFoldRows=function(n,r){var i=0;if(r&&r.length>0)for(var t=0;t<r.length;t++)n>r[t].start.row&&n<r[t].end.row?i+=n-r[t].start.row:n>=r[t].end.row&&(i+=r[t].end.row-r[t].start.row);return i},h}();A.implement(a.prototype,$),x.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(k,x,z){var T=k("./lib/oop"),A=k("./lib/dom"),$=k("./lib/lang"),a=k("./config"),h=k("./layer/gutter").Gutter,n=k("./layer/marker").Marker,r=k("./layer/text").Text,i=k("./layer/cursor").Cursor,t=k("./scrollbar").HScrollBar,e=k("./scrollbar").VScrollBar,o=k("./scrollbar_custom").HScrollBar,s=k("./scrollbar_custom").VScrollBar,c=k("./renderloop").RenderLoop,u=k("./layer/font_metrics").FontMetrics,y=k("./lib/event_emitter").EventEmitter,m=k("./css/editor-css"),p=k("./layer/decorators").Decorator,g=k("./lib/useragent"),w=k("./layer/text_util").isTextToken;A.importCssString(m,"ace_editor.css",!1);var L=function(){function S(b,R){var d=this;this.container=b||A.createElement("div"),A.addCssClass(this.container,"ace_editor"),A.HI_DPI&&A.addCssClass(this.container,"ace_hidpi"),this.setTheme(R),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=A.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=A.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=A.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new n(this.content);var l=this.$textLayer=new r(this.content);this.canvas=l.element,this.$markerFront=new n(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.on("scroll",function(f){d.$scrollAnimation||d.session.setScrollTop(f.data-d.scrollMargin.top)}),this.scrollBarH.on("scroll",function(f){d.$scrollAnimation||d.session.setScrollLeft(f.data-d.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new u(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(f){d.updateCharacterSize(),d.onResize(!0,d.gutterWidth,d.$size.width,d.$size.height),d._signal("changeCharacterSize",f)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new c(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return S.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),A.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},S.prototype.setSession=function(b){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=b,b&&this.scrollMargin.top&&b.getScrollTop()<=0&&b.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(b),this.$markerBack.setSession(b),this.$markerFront.setSession(b),this.$gutterLayer.setSession(b),this.$textLayer.setSession(b),b&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},S.prototype.updateLines=function(b,R,d){if(R===void 0&&(R=1/0),this.$changedLines?(this.$changedLines.firstRow>b&&(this.$changedLines.firstRow=b),this.$changedLines.lastRow<R&&(this.$changedLines.lastRow=R)):this.$changedLines={firstRow:b,lastRow:R},this.$changedLines.lastRow<this.layerConfig.firstRow)if(d)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},S.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},S.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},S.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},S.prototype.updateFull=function(b){b?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},S.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},S.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},S.prototype.onResize=function(b,R,d,l){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=b?1:0;var f=this.container;l||(l=f.clientHeight||f.scrollHeight),!l&&this.$maxLines&&this.lineHeight>1&&(!f.style.height||f.style.height=="0px")&&(f.style.height="1px",l=f.clientHeight||f.scrollHeight),d||(d=f.clientWidth||f.scrollWidth);var v=this.$updateCachedSize(b,R,d,l);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!d&&!l)return this.resizing=0;b&&(this.$gutterLayer.$padding=null),b?this.$renderChanges(v|this.$changes,!0):this.$loop.schedule(v|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},S.prototype.$updateCachedSize=function(b,R,d,l){l-=this.$extraHeight||0;var f=0,v=this.$size,C={width:v.width,height:v.height,scrollerHeight:v.scrollerHeight,scrollerWidth:v.scrollerWidth};if(l&&(b||v.height!=l)&&(v.height=l,f|=this.CHANGE_SIZE,v.scrollerHeight=v.height,this.$horizScroll&&(v.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(v.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",f=f|this.CHANGE_SCROLL),d&&(b||v.width!=d)){f|=this.CHANGE_SIZE,v.width=d,R==null&&(R=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=R,A.setStyle(this.scrollBarH.element.style,"left",R+"px"),A.setStyle(this.scroller.style,"left",R+this.margin.left+"px"),v.scrollerWidth=Math.max(0,d-R-this.scrollBarV.getWidth()-this.margin.h),A.setStyle(this.$gutter.style,"left",this.margin.left+"px");var M=this.scrollBarV.getWidth()+"px";A.setStyle(this.scrollBarH.element.style,"right",M),A.setStyle(this.scroller.style,"right",M),A.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(v.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||b)&&(f|=this.CHANGE_FULL)}return v.$dirty=!d||!l,f&&this._signal("resize",C),f},S.prototype.onGutterResize=function(b){var R=this.$showGutter?b:0;R!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,R,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},S.prototype.adjustWrapLimit=function(){var b=this.$size.scrollerWidth-this.$padding*2,R=Math.floor(b/this.characterWidth);return this.session.adjustWrapLimit(R,this.$showPrintMargin&&this.$printMarginColumn)},S.prototype.setAnimatedScroll=function(b){this.setOption("animatedScroll",b)},S.prototype.getAnimatedScroll=function(){return this.$animatedScroll},S.prototype.setShowInvisibles=function(b){this.setOption("showInvisibles",b),this.session.$bidiHandler.setShowInvisibles(b)},S.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},S.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},S.prototype.setDisplayIndentGuides=function(b){this.setOption("displayIndentGuides",b)},S.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},S.prototype.setHighlightIndentGuides=function(b){this.setOption("highlightIndentGuides",b)},S.prototype.setShowPrintMargin=function(b){this.setOption("showPrintMargin",b)},S.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},S.prototype.setPrintMarginColumn=function(b){this.setOption("printMarginColumn",b)},S.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},S.prototype.getShowGutter=function(){return this.getOption("showGutter")},S.prototype.setShowGutter=function(b){return this.setOption("showGutter",b)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.setFadeFoldWidgets=function(b){this.setOption("fadeFoldWidgets",b)},S.prototype.setHighlightGutterLine=function(b){this.setOption("highlightGutterLine",b)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var b=A.createElement("div");b.className="ace_layer ace_print-margin-layer",this.$printMarginEl=A.createElement("div"),this.$printMarginEl.className="ace_print-margin",b.appendChild(this.$printMarginEl),this.content.insertBefore(b,this.content.firstChild)}var R=this.$printMarginEl.style;R.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",R.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},S.prototype.getContainerElement=function(){return this.container},S.prototype.getMouseEventTarget=function(){return this.scroller},S.prototype.getTextAreaContainer=function(){return this.container},S.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var b=this.textarea.style,R=this.$composition;if(!this.$keepTextAreaAtCursor&&!R){A.translate(this.textarea,-100,0);return}var d=this.$cursorLayer.$pixelPos;if(d){R&&R.markerRange&&(d=this.$cursorLayer.getPixelPosition(R.markerRange.start,!0));var l=this.layerConfig,f=d.top,v=d.left;f-=l.offset;var C=R&&R.useTextareaForIME||g.isMobile?this.lineHeight:1;if(f<0||f>l.height-C){A.translate(this.textarea,0,0);return}var M=1,E=this.$size.height-C;if(!R)f+=this.lineHeight;else if(R.useTextareaForIME){var _=this.textarea.value;M=this.characterWidth*this.session.$getStringScreenWidth(_)[0]}else f+=this.lineHeight+2;v-=this.scrollLeft,v>this.$size.scrollerWidth-M&&(v=this.$size.scrollerWidth-M),v+=this.gutterWidth+this.margin.left,A.setStyle(b,"height",C+"px"),A.setStyle(b,"width",M+"px"),A.translate(this.textarea,Math.min(v,this.$size.scrollerWidth-M),Math.min(f,E))}}},S.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},S.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},S.prototype.getLastFullyVisibleRow=function(){var b=this.layerConfig,R=b.lastRow,d=this.session.documentToScreenRow(R,0)*b.lineHeight;return d-this.session.getScrollTop()>b.height-b.lineHeight?R-1:R},S.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},S.prototype.setPadding=function(b){this.$padding=b,this.$textLayer.setPadding(b),this.$cursorLayer.setPadding(b),this.$markerFront.setPadding(b),this.$markerBack.setPadding(b),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},S.prototype.setScrollMargin=function(b,R,d,l){var f=this.scrollMargin;f.top=b|0,f.bottom=R|0,f.right=l|0,f.left=d|0,f.v=f.top+f.bottom,f.h=f.left+f.right,f.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-f.top),this.updateFull()},S.prototype.setMargin=function(b,R,d,l){var f=this.margin;f.top=b|0,f.bottom=R|0,f.right=l|0,f.left=d|0,f.v=f.top+f.bottom,f.h=f.left+f.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},S.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},S.prototype.setHScrollBarAlwaysVisible=function(b){this.setOption("hScrollBarAlwaysVisible",b)},S.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},S.prototype.setVScrollBarAlwaysVisible=function(b){this.setOption("vScrollBarAlwaysVisible",b)},S.prototype.$updateScrollBarV=function(){var b=this.layerConfig.maxHeight,R=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(b-=(R-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>b-R&&(b=this.scrollTop+R,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(b+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},S.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},S.prototype.freeze=function(){this.$frozen=!0},S.prototype.unfreeze=function(){this.$frozen=!1},S.prototype.$renderChanges=function(b,R){if(this.$changes&&(b|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!b&&!R){this.$changes|=b;return}if(this.$size.$dirty)return this.$changes|=b,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",b),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var d=this.layerConfig;if(b&this.CHANGE_FULL||b&this.CHANGE_SIZE||b&this.CHANGE_TEXT||b&this.CHANGE_LINES||b&this.CHANGE_SCROLL||b&this.CHANGE_H_SCROLL){if(b|=this.$computeLayerConfig()|this.$loop.clear(),d.firstRow!=this.layerConfig.firstRow&&d.firstRowScreen==this.layerConfig.firstRowScreen){var l=this.scrollTop+(d.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;l>0&&(this.scrollTop=l,b=b|this.CHANGE_SCROLL,b|=this.$computeLayerConfig()|this.$loop.clear())}d=this.layerConfig,this.$updateScrollBarV(),b&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),A.translate(this.content,-this.scrollLeft,-d.offset);var f=d.width+2*this.$padding+"px",v=d.minHeight+"px";A.setStyle(this.content.style,"width",f),A.setStyle(this.content.style,"height",v)}if(b&this.CHANGE_H_SCROLL&&(A.translate(this.content,-this.scrollLeft,-d.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),b&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(d),this.$showGutter&&this.$gutterLayer.update(d),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(d),this.$markerBack.update(d),this.$markerFront.update(d),this.$cursorLayer.update(d),this.$moveTextAreaToCursor(),this._signal("afterRender",b);return}if(b&this.CHANGE_SCROLL){this.$changedLines=null,b&this.CHANGE_TEXT||b&this.CHANGE_LINES?this.$textLayer.update(d):this.$textLayer.scrollLines(d),this.$showGutter&&(b&this.CHANGE_GUTTER||b&this.CHANGE_LINES?this.$gutterLayer.update(d):this.$gutterLayer.scrollLines(d)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(d),this.$markerBack.update(d),this.$markerFront.update(d),this.$cursorLayer.update(d),this.$moveTextAreaToCursor(),this._signal("afterRender",b);return}b&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(d),this.$showGutter&&this.$gutterLayer.update(d),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(d)):b&this.CHANGE_LINES?((this.$updateLines()||b&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(d),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(d)):b&this.CHANGE_TEXT||b&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(d),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(d)):b&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(d),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(d)),b&this.CHANGE_CURSOR&&(this.$cursorLayer.update(d),this.$moveTextAreaToCursor()),b&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(d),b&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(d),this._signal("afterRender",b)},S.prototype.$autosize=function(){var b=this.session.getScreenLength()*this.lineHeight,R=this.$maxLines*this.lineHeight,d=Math.min(R,Math.max((this.$minLines||1)*this.lineHeight,b))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(d+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&d>this.$maxPixelHeight&&(d=this.$maxPixelHeight);var l=d<=2*this.lineHeight,f=!l&&b>R;if(d!=this.desiredHeight||this.$size.height!=this.desiredHeight||f!=this.$vScroll){f!=this.$vScroll&&(this.$vScroll=f,this.scrollBarV.setVisible(f));var v=this.container.clientWidth;this.container.style.height=d+"px",this.$updateCachedSize(!0,this.$gutterWidth,v,d),this.desiredHeight=d,this._signal("autosize")}},S.prototype.$computeLayerConfig=function(){var b=this.session,R=this.$size,d=R.height<=2*this.lineHeight,l=this.session.getScreenLength(),f=l*this.lineHeight,v=this.$getLongestLine(),C=!d&&(this.$hScrollBarAlwaysVisible||R.scrollerWidth-v-2*this.$padding<0),M=this.$horizScroll!==C;M&&(this.$horizScroll=C,this.scrollBarH.setVisible(C));var E=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var _=R.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(R.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;f+=I;var O=this.scrollMargin;this.session.setScrollTop(Math.max(-O.top,Math.min(this.scrollTop,f-R.scrollerHeight+O.bottom))),this.session.setScrollLeft(Math.max(-O.left,Math.min(this.scrollLeft,v+2*this.$padding-R.scrollerWidth+O.right)));var H=!d&&(this.$vScrollBarAlwaysVisible||R.scrollerHeight-f+I<0||this.scrollTop>O.top),D=E!==H;D&&(this.$vScroll=H,this.scrollBarV.setVisible(H));var N=this.scrollTop%this.lineHeight,W=Math.ceil(_/this.lineHeight)-1,F=Math.max(0,Math.round((this.scrollTop-N)/this.lineHeight)),P=F+W,j,V,U=this.lineHeight;F=b.screenToDocumentRow(F,0);var K=b.getFoldLine(F);K&&(F=K.start.row),j=b.documentToScreenRow(F,0),V=b.getRowLength(F)*U,P=Math.min(b.screenToDocumentRow(P,0),b.getLength()-1),_=R.scrollerHeight+b.getRowLength(P)*U+V,N=this.scrollTop-j*U;var J=0;return(this.layerConfig.width!=v||M)&&(J=this.CHANGE_H_SCROLL),(M||D)&&(J|=this.$updateCachedSize(!0,this.gutterWidth,R.width,R.height),this._signal("scrollbarVisibilityChanged"),D&&(v=this.$getLongestLine())),this.layerConfig={width:v,padding:this.$padding,firstRow:F,firstRowScreen:j,lastRow:P,lineHeight:U,characterWidth:this.characterWidth,minHeight:_,maxHeight:f,offset:N,gutterOffset:U?Math.max(0,Math.ceil((N+R.height-R.scrollerHeight)/U)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(v-this.$padding),J},S.prototype.$updateLines=function(){if(this.$changedLines){var b=this.$changedLines.firstRow,R=this.$changedLines.lastRow;this.$changedLines=null;var d=this.layerConfig;if(!(b>d.lastRow+1)&&!(R<d.firstRow)){if(R===1/0){this.$showGutter&&this.$gutterLayer.update(d),this.$textLayer.update(d);return}return this.$textLayer.updateLines(d,b,R),!0}}},S.prototype.$getLongestLine=function(){var b=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(b+=1),this.$textLayer&&b>this.$textLayer.MAX_LINE_LENGTH&&(b=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(b*this.characterWidth))},S.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},S.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},S.prototype.addGutterDecoration=function(b,R){this.$gutterLayer.addGutterDecoration(b,R)},S.prototype.removeGutterDecoration=function(b,R){this.$gutterLayer.removeGutterDecoration(b,R)},S.prototype.updateBreakpoints=function(b){this._rows=b,this.$loop.schedule(this.CHANGE_GUTTER)},S.prototype.setAnnotations=function(b){this.$gutterLayer.setAnnotations(b),this.$loop.schedule(this.CHANGE_GUTTER)},S.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},S.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},S.prototype.showCursor=function(){this.$cursorLayer.showCursor()},S.prototype.scrollSelectionIntoView=function(b,R,d){this.scrollCursorIntoView(b,d),this.scrollCursorIntoView(R,d)},S.prototype.scrollCursorIntoView=function(b,R,d){if(this.$size.scrollerHeight!==0){var l=this.$cursorLayer.getPixelPosition(b),f=l.left,v=l.top,C=d&&d.top||0,M=d&&d.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var E=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;E+C>v?(R&&E+C>v+this.lineHeight&&(v-=R*this.$size.scrollerHeight),v===0&&(v=-this.scrollMargin.top),this.session.setScrollTop(v)):E+this.$size.scrollerHeight-M<v+this.lineHeight&&(R&&E+this.$size.scrollerHeight-M<v-this.lineHeight&&(v+=R*this.$size.scrollerHeight),this.session.setScrollTop(v+this.lineHeight+M-this.$size.scrollerHeight));var _=this.scrollLeft,I=2*this.layerConfig.characterWidth;f-I<_?(f-=I,f<this.$padding+I&&(f=-this.scrollMargin.left),this.session.setScrollLeft(f)):(f+=I,_+this.$size.scrollerWidth<f+this.characterWidth?this.session.setScrollLeft(Math.round(f+this.characterWidth-this.$size.scrollerWidth)):_<=this.$padding&&f-_<this.characterWidth&&this.session.setScrollLeft(0))}},S.prototype.getScrollTop=function(){return this.session.getScrollTop()},S.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},S.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},S.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},S.prototype.scrollToRow=function(b){this.session.setScrollTop(b*this.lineHeight)},S.prototype.alignCursor=function(b,R){typeof b=="number"&&(b={row:b,column:0});var d=this.$cursorLayer.getPixelPosition(b),l=this.$size.scrollerHeight-this.lineHeight,f=d.top-l*(R||0);return this.session.setScrollTop(f),f},S.prototype.$calcSteps=function(b,R){var d=0,l=this.STEPS,f=[],v=function(C,M,E){return E*(Math.pow(C-1,3)+1)+M};for(d=0;d<l;++d)f.push(v(d/this.STEPS,b,R-b));return f},S.prototype.scrollToLine=function(b,R,d,l){var f=this.$cursorLayer.getPixelPosition({row:b,column:0}),v=f.top;R&&(v-=this.$size.scrollerHeight/2);var C=this.scrollTop;this.session.setScrollTop(v),d!==!1&&this.animateScrolling(C,l)},S.prototype.animateScrolling=function(b,R){var d=this.scrollTop;if(!this.$animatedScroll)return;var l=this;if(b==d)return;if(this.$scrollAnimation){var f=this.$scrollAnimation.steps;if(f.length&&(b=f[0],b==d))return}var v=l.$calcSteps(b,d);this.$scrollAnimation={from:b,to:d,steps:v},clearInterval(this.$timer),l.session.setScrollTop(v.shift()),l.session.$scrollTop=d;function C(){l.$timer=clearInterval(l.$timer),l.$scrollAnimation=null,l.$stopAnimation=!1,R&&R()}this.$timer=setInterval(function(){if(l.$stopAnimation){C();return}if(!l.session)return clearInterval(l.$timer);v.length?(l.session.setScrollTop(v.shift()),l.session.$scrollTop=d):d!=null?(l.session.$scrollTop=-1,l.session.setScrollTop(d),d=null):C()},10)},S.prototype.scrollToY=function(b){this.scrollTop!==b&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=b)},S.prototype.scrollToX=function(b){this.scrollLeft!==b&&(this.scrollLeft=b),this.$loop.schedule(this.CHANGE_H_SCROLL)},S.prototype.scrollTo=function(b,R){this.session.setScrollTop(R),this.session.setScrollLeft(b)},S.prototype.scrollBy=function(b,R){R&&this.session.setScrollTop(this.session.getScrollTop()+R),b&&this.session.setScrollLeft(this.session.getScrollLeft()+b)},S.prototype.isScrollableBy=function(b,R){if(R<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||R>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||b<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||b>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},S.prototype.pixelToScreenCoordinates=function(b,R){var d;if(this.$hasCssTransforms){d={top:0,left:0};var l=this.$fontMetrics.transformCoordinates([b,R]);b=l[1]-this.gutterWidth-this.margin.left,R=l[0]}else d=this.scroller.getBoundingClientRect();var f=b+this.scrollLeft-d.left-this.$padding,v=f/this.characterWidth,C=Math.floor((R+this.scrollTop-d.top)/this.lineHeight),M=this.$blockCursor?Math.floor(v):Math.round(v);return{row:C,column:M,side:v-M>0?1:-1,offsetX:f}},S.prototype.screenToTextCoordinates=function(b,R){var d;if(this.$hasCssTransforms){d={top:0,left:0};var l=this.$fontMetrics.transformCoordinates([b,R]);b=l[1]-this.gutterWidth-this.margin.left,R=l[0]}else d=this.scroller.getBoundingClientRect();var f=b+this.scrollLeft-d.left-this.$padding,v=f/this.characterWidth,C=this.$blockCursor?Math.floor(v):Math.round(v),M=Math.floor((R+this.scrollTop-d.top)/this.lineHeight);return this.session.screenToDocumentPosition(M,Math.max(C,0),f)},S.prototype.textToScreenCoordinates=function(b,R){var d=this.scroller.getBoundingClientRect(),l=this.session.documentToScreenPosition(b,R),f=this.$padding+(this.session.$bidiHandler.isBidiRow(l.row,b)?this.session.$bidiHandler.getPosLeft(l.column):Math.round(l.column*this.characterWidth)),v=l.row*this.lineHeight;return{pageX:d.left+f-this.scrollLeft,pageY:d.top+v-this.scrollTop}},S.prototype.visualizeFocus=function(){A.addCssClass(this.container,"ace_focus")},S.prototype.visualizeBlur=function(){A.removeCssClass(this.container,"ace_focus")},S.prototype.showComposition=function(b){this.$composition=b,b.cssText||(b.cssText=this.textarea.style.cssText),b.useTextareaForIME==null&&(b.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(A.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):b.markerId=this.session.addMarker(b.markerRange,"ace_composition_marker","text")},S.prototype.setCompositionText=function(b){var R=this.session.selection.cursor;this.addToken(b,"composition_placeholder",R.row,R.column),this.$moveTextAreaToCursor()},S.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),A.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var b=this.session.selection.cursor;this.removeExtraToken(b.row,b.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},S.prototype.setGhostText=function(b,R){var d=this.session.selection.cursor,l=R||{row:d.row,column:d.column};this.removeGhostText();var f=this.$calculateWrappedTextChunks(b,l);this.addToken(f[0].text,"ghost_text",l.row,l.column),this.$ghostText={text:b,position:{row:l.row,column:l.column}};var v=A.createElement("div");if(f.length>1){var C=this.hideTokensAfterPosition(l.row,l.column),M;f.slice(1).forEach(function(D){var N=A.createElement("div"),W=A.createElement("span");W.className="ace_ghost_text",D.wrapped&&(N.className="ghost_text_line_wrapped"),D.text.length===0&&(D.text=" "),W.appendChild(A.createTextNode(D.text)),N.appendChild(W),v.appendChild(N),M=N}),C.forEach(function(D){var N=A.createElement("span");w(D.type)||(N.className="ace_"+D.type.replace(/\./g," ace_")),N.appendChild(A.createTextNode(D.value)),M.appendChild(N)}),this.$ghostTextWidget={el:v,row:l.row,column:l.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var E=this.$cursorLayer.getPixelPosition(l,!0),_=this.container,I=_.getBoundingClientRect().height,O=f.length*this.lineHeight,H=O<I-E.top;if(H)return;O<I?this.scrollBy(0,(f.length-1)*this.lineHeight):this.scrollToRow(l.row)}},S.prototype.$calculateWrappedTextChunks=function(b,R){var d=this.$size.scrollerWidth-this.$padding*2,l=Math.floor(d/this.characterWidth)-2;l=l<=0?60:l;for(var f=b.split(/\r?\n/),v=[],C=0;C<f.length;C++){var M=this.session.$getDisplayTokens(f[C],R.column),E=this.session.$computeWrapSplits(M,l,this.session.$tabSize);if(E.length>0){var _=0;E.push(f[C].length);for(var I=0;I<E.length;I++){var O=f[C].slice(_,E[I]);v.push({text:O,wrapped:!0}),_=E[I]}}else v.push({text:f[C],wrapped:!1})}return v},S.prototype.removeGhostText=function(){if(this.$ghostText){var b=this.$ghostText.position;this.removeExtraToken(b.row,b.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},S.prototype.addToken=function(b,R,d,l){var f=this.session;f.bgTokenizer.lines[d]=null;var v={type:R,value:b},C=f.getTokens(d);if(l==null||!C.length)C.push(v);else for(var M=0,E=0;E<C.length;E++){var _=C[E];if(M+=_.value.length,l<=M){var I=_.value.length-(M-l),O=_.value.slice(0,I),H=_.value.slice(I);C.splice(E,1,{type:_.type,value:O},v,{type:_.type,value:H});break}}this.updateLines(d,d)},S.prototype.hideTokensAfterPosition=function(b,R){for(var d=this.session.getTokens(b),l=0,f=!1,v=[],C=0;C<d.length;C++){var M=d[C];if(l+=M.value.length,M.type!=="ghost_text"){if(f){v.push({type:M.type,value:M.value}),M.type="hidden_token";continue}l===R&&(f=!0)}}return this.updateLines(b,b),v},S.prototype.removeExtraToken=function(b,R){this.session.bgTokenizer.lines[b]=null,this.updateLines(b,b)},S.prototype.setTheme=function(b,R){var d=this;if(this.$themeId=b,d._dispatchEvent("themeChange",{theme:b}),!b||typeof b=="string"){var l=b||this.$options.theme.initialValue;a.loadModule(["theme",l],f)}else f(b);function f(v){if(d.$themeId!=b)return R&&R();if(!v||!v.cssClass)throw new Error("couldn't load module "+b+" or it didn't call define");v.$id&&(d.$themeId=v.$id),A.importCssString(v.cssText,v.cssClass,d.container),d.theme&&A.removeCssClass(d.container,d.theme.cssClass);var C="padding"in v?v.padding:"padding"in(d.theme||{})?4:d.$padding;d.$padding&&C!=d.$padding&&d.setPadding(C),d.$theme=v.cssClass,d.theme=v,A.addCssClass(d.container,v.cssClass),A.setCssClass(d.container,"ace_dark",v.isDark),d.$size&&(d.$size.width=0,d.$updateSizeAsync()),d._dispatchEvent("themeLoaded",{theme:v}),R&&R(),g.isSafari&&d.scroller&&(d.scroller.style.background="red",d.scroller.style.background="")}},S.prototype.getTheme=function(){return this.$themeId},S.prototype.setStyle=function(b,R){A.setCssClass(this.container,b,R!==!1)},S.prototype.unsetStyle=function(b){A.removeCssClass(this.container,b)},S.prototype.setCursorStyle=function(b){A.setStyle(this.scroller.style,"cursor",b)},S.prototype.setMouseCursor=function(b){A.setStyle(this.scroller.style,"cursor",b)},S.prototype.attachToShadowRoot=function(){A.importCssString(m,"ace_editor.css",this.container)},S.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},S.prototype.$updateCustomScrollbar=function(b){var R=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,b===!0?(this.scrollBarV=new s(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(d){R.$scrollAnimation||R.session.setScrollTop(d.data-R.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(d){R.$scrollAnimation||R.session.setScrollLeft(d.data-R.scrollMargin.left)}),this.$scrollDecorator=new p(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.addEventListener("scroll",function(d){R.$scrollAnimation||R.session.setScrollTop(d.data-R.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(d){R.$scrollAnimation||R.session.setScrollLeft(d.data-R.scrollMargin.left)}))},S.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var b=this;this.$resizeTimer=$.delayedCall(function(){b.destroyed||b.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(R){var d=R[0].contentRect.width,l=R[0].contentRect.height;Math.abs(b.$size.width-d)>1||Math.abs(b.$size.height-l)>1?b.$resizeTimer.delay():b.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},S}();L.prototype.CHANGE_CURSOR=1,L.prototype.CHANGE_MARKER=2,L.prototype.CHANGE_GUTTER=4,L.prototype.CHANGE_SCROLL=8,L.prototype.CHANGE_LINES=16,L.prototype.CHANGE_TEXT=32,L.prototype.CHANGE_SIZE=64,L.prototype.CHANGE_MARKER_BACK=128,L.prototype.CHANGE_MARKER_FRONT=256,L.prototype.CHANGE_FULL=512,L.prototype.CHANGE_H_SCROLL=1024,L.prototype.$changes=0,L.prototype.$padding=null,L.prototype.$frozen=!1,L.prototype.STEPS=8,T.implement(L.prototype,y),a.defineOptions(L.prototype,"renderer",{useResizeObserver:{set:function(S){!S&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):S&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(S){this.$textLayer.setShowInvisibles(S)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(S){typeof S=="number"&&(this.$printMarginColumn=S),this.$showPrintMargin=!!S,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(S){this.$gutter.style.display=S?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(S){this.$gutterLayer.$useSvgGutterIcons=S},initialValue:!1},showFoldedAnnotations:{set:function(S){this.$gutterLayer.$showFoldedAnnotations=S},initialValue:!1},fadeFoldWidgets:{set:function(S){A.setCssClass(this.$gutter,"ace_fade-fold-widgets",S)},initialValue:!1},showFoldWidgets:{set:function(S){this.$gutterLayer.setShowFoldWidgets(S),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(S){this.$textLayer.setDisplayIndentGuides(S)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(S){this.$textLayer.setHighlightIndentGuides(S)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(S){this.$gutterLayer.setHighlightGutterLine(S),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(S){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(S){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(S){typeof S=="number"&&(S=S+"px"),this.container.style.fontSize=S,this.updateFontSize()},initialValue:12},fontFamily:{set:function(S){this.container.style.fontFamily=S,this.updateFontSize()}},maxLines:{set:function(S){this.updateFull()}},minLines:{set:function(S){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(S){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(S){S=+S||0,this.$scrollPastEnd!=S&&(this.$scrollPastEnd=S,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(S){this.$gutterLayer.$fixedWidth=!!S,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(S){this.$updateCustomScrollbar(S)},initialValue:!1},theme:{set:function(S){this.setTheme(S)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!g.isMobile&&!g.isIE}}),x.VirtualRenderer=L}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(k,x,z){var T=k("../lib/oop"),A=k("../lib/net"),$=k("../lib/event_emitter").EventEmitter,a=k("../config");function h(t){var e="importScripts('"+A.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new o;return s.append(e),s.getBlob("application/javascript")}}function n(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=h(t),o=window.URL||window.webkitURL,s=o.createObjectURL(e);return new Worker(s)}return new Worker(t)}var r=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){T.implement(this,$),this.$createWorkerFromOldConfig=function(t,e,o,s,c){if(k.nameToUrl&&!k.toUrl&&(k.toUrl=k.nameToUrl),a.get("packaged")||!k.toUrl)s=s||a.moduleUrl(e,"worker");else{var u=this.$normalizePath;s=s||u(k.toUrl("ace/worker/worker.js",null,"_"));var y={};t.forEach(function(m){y[m]=u(k.toUrl(m,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=n(s),c&&this.send("importScripts",c),this.$worker.postMessage({init:!0,tlns:y,module:e,classname:o}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var o=this.callbacks[e.id];o&&(o(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return A.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,o){if(o){var s=this.callbackId++;this.callbacks[s]=o,e.push(s)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.data}})}catch(o){console.error(o.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),t.action=="insert"?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(r.prototype);var i=function(t,e,o){var s=null,c=!1,u=Object.create($),y=[],m=new r({messageBuffer:y,terminate:function(){},postMessage:function(g){y.push(g),s&&(c?setTimeout(p):p())}});m.setEmitSync=function(g){c=g};var p=function(){var g=y.shift();g.command?s[g.command].apply(s,g.args):g.event&&u._signal(g.event,g.data)};return u.postMessage=function(g){m.onMessage({data:g})},u.callback=function(g,w){this.postMessage({type:"call",id:w,data:g})},u.emit=function(g,w){this.postMessage({type:"event",name:g,data:w})},a.loadModule(["worker",e],function(g){for(s=new g[o](u);y.length;)p()}),m};x.UIWorkerClient=i,x.WorkerClient=r,x.createWorker=n}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(k,x,z){var T=k("./range").Range,A=k("./lib/event_emitter").EventEmitter,$=k("./lib/oop"),a=function(){function h(n,r,i,t,e,o){var s=this;this.length=r,this.session=n,this.doc=n.getDocument(),this.mainClass=e,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=i;var c=n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=c.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var n=this,r=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=r.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=i.addMarker(new T(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var o=r.createAnchor(e.row,e.column);o.$insertRight=!0,o.detach(),n.others.push(o)}),i.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var n=this.session,r=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=n.addMarker(new T(i.row,i.column,i.row,i.column+r.length),r.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n<this.others.length;n++)this.session.removeMarker(this.others[n].markerId)}},h.prototype.onUpdate=function(n){if(this.$updating)return this.updateAnchors(n);var r=n;if(r.start.row===r.end.row&&r.start.row===this.pos.row){this.$updating=!0;var i=n.action==="insert"?r.end.column-r.start.column:r.start.column-r.end.column,t=r.start.column>=this.pos.column&&r.start.column<=this.pos.column+this.length+1,e=r.start.column-this.pos.column;if(this.updateAnchors(n),t&&(this.length+=i),t&&!this.session.$fromUndo){if(n.action==="insert")for(var o=this.others.length-1;o>=0;o--){var s=this.others[o],c={row:s.row,column:s.column+e};this.doc.insertMergedLines(c,n.lines)}else if(n.action==="remove")for(var o=this.others.length-1;o>=0;o--){var s=this.others[o],c={row:s.row,column:s.column+e};this.doc.remove(new T(c.row,c.column,c.row,c.column-i))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(n){this.pos.onChange(n);for(var r=this.others.length;r--;)this.others[r].onChange(n);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var n=this,r=this.session,i=function(e,o){r.removeMarker(e.markerId),e.markerId=r.addMarker(new T(e.row,e.column,e.row,e.column+n.length),o,null,!1)};i(this.pos,this.mainClass);for(var t=this.others.length;t--;)i(this.others[t],this.othersClass)}},h.prototype.onCursorChange=function(n){if(!(this.$updating||!this.session)){var r=this.session.selection.getCursor();r.row===this.pos.row&&r.column>=this.pos.column&&r.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n))}},h.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var n=this.session.getUndoManager(),r=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,i=0;i<r;i++)n.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h}();$.implement(a.prototype,A),x.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(k,x,z){var T=k("../lib/event"),A=k("../lib/useragent");function $(h,n){return h.row==n.row&&h.column==n.column}function a(h){var n=h.domEvent,r=n.altKey,i=n.shiftKey,t=n.ctrlKey,e=h.getAccelKey(),o=h.getButton();if(t&&A.isMac&&(o=n.button),h.editor.inMultiSelectMode&&o==2){h.editor.textInput.onContextMenu(h.domEvent);return}if(!t&&!r&&!e){o===0&&h.editor.inMultiSelectMode&&h.editor.exitMultiSelectMode();return}if(o===0){var s=h.editor,c=s.selection,u=s.inMultiSelectMode,y=h.getDocumentPosition(),m=c.getCursor(),p=h.inSelection()||c.isEmpty()&&$(y,m),g=h.x,w=h.y,L=function(O){g=O.clientX,w=O.clientY},S=s.session,b=s.renderer.pixelToScreenCoordinates(g,w),R=b,d;if(s.$mouseHandler.$enableJumpToDef)t&&r||e&&r?d=i?"block":"add":r&&s.$blockSelectEnabled&&(d="block");else if(e&&!r){if(d="add",!u&&i)return}else r&&s.$blockSelectEnabled&&(d="block");if(d&&A.isMac&&n.ctrlKey&&s.$mouseHandler.cancelContextMenu(),d=="add"){if(!u&&p)return;if(!u){var l=c.toOrientedRange();s.addSelectionMarker(l)}var f=c.rangeList.rangeAtPoint(y);s.inVirtualSelectionMode=!0,i&&(f=null,l=c.ranges[0]||l,s.removeSelectionMarker(l)),s.once("mouseup",function(){var O=c.toOrientedRange();f&&O.isEmpty()&&$(f.cursor,O.cursor)?c.substractPoint(O.cursor):(i?c.substractPoint(l.cursor):l&&(s.removeSelectionMarker(l),c.addRange(l)),c.addRange(O)),s.inVirtualSelectionMode=!1})}else if(d=="block"){h.stop(),s.inVirtualSelectionMode=!0;var v,C=[],M=function(){var O=s.renderer.pixelToScreenCoordinates(g,w),H=S.screenToDocumentPosition(O.row,O.column,O.offsetX);$(R,O)&&$(H,c.lead)||(R=O,s.selection.moveToPosition(H),s.renderer.scrollCursorIntoView(),s.removeSelectionMarkers(C),C=c.rectangularRangeBlock(R,b),s.$mouseHandler.$clickSelection&&C.length==1&&C[0].isEmpty()&&(C[0]=s.$mouseHandler.$clickSelection.clone()),C.forEach(s.addSelectionMarker,s),s.updateSelectionMarkers())};u&&!e?c.toSingleRange():!u&&e&&(v=c.toOrientedRange(),s.addSelectionMarker(v)),i?b=S.documentToScreenPosition(c.lead):c.moveToPosition(y),R={row:-1,column:-1};var E=function(O){M(),clearInterval(I),s.removeSelectionMarkers(C),C.length||(C=[c.toOrientedRange()]),v&&(s.removeSelectionMarker(v),c.toSingleRange(v));for(var H=0;H<C.length;H++)c.addRange(C[H]);s.inVirtualSelectionMode=!1,s.$mouseHandler.$clickSelection=null},_=M;T.capture(s.container,L,E);var I=setInterval(function(){_()},20);return h.preventDefault()}}}x.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(k,x,z){x.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(A){A.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(A){A.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(A){A.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(A){A.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(A){A.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(A){A.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(A){A.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(A){A.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(A){A.multiSelect.rangeCount>1?A.multiSelect.joinSelections():A.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(A){A.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(A){A.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(A){A.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],x.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(A){A.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(A){return A&&A.inMultiSelectMode}}];var T=k("../keyboard/hash_handler").HashHandler;x.keyboardHandler=new T(x.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(k,x,z){var T=k("./range_list").RangeList,A=k("./range").Range,$=k("./selection").Selection,a=k("./mouse/multi_select_handler").onMouseDown,h=k("./lib/event"),n=k("./lib/lang"),r=k("./commands/multi_select_commands");x.commands=r.defaultCommands.concat(r.multiSelectCommands);var i=k("./search").Search,t=new i;function e(m,p,g){return t.$options.wrap=!0,t.$options.needle=p,t.$options.backwards=g==-1,t.find(m)}var o=k("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(o.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(m,p){if(m){if(!this.inMultiSelectMode&&this.rangeCount===0){var g=this.toOrientedRange();if(this.rangeList.add(g),this.rangeList.add(m),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),p||this.fromOrientedRange(m);this.rangeList.removeAll(),this.rangeList.add(g),this.$onAddRange(g)}m.cursor||(m.cursor=m.end);var w=this.rangeList.add(m);return this.$onAddRange(m),w.length&&this.$onRemoveRange(w),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),p||this.fromOrientedRange(m)}},this.toSingleRange=function(m){m=m||this.ranges[0];var p=this.rangeList.removeAll();p.length&&this.$onRemoveRange(p),m&&this.fromOrientedRange(m)},this.substractPoint=function(m){var p=this.rangeList.substractPoint(m);if(p)return this.$onRemoveRange(p),p[0]},this.mergeOverlappingRanges=function(){var m=this.rangeList.merge();m.length&&this.$onRemoveRange(m)},this.$onAddRange=function(m){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(m),this._signal("addRange",{range:m})},this.$onRemoveRange=function(m){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var p=this.rangeList.ranges.pop();m.push(p),this.rangeCount=0}for(var g=m.length;g--;){var w=this.ranges.indexOf(m[g]);this.ranges.splice(w,1)}this._signal("removeRange",{ranges:m}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),p=p||this.ranges[0],p&&!p.isEqual(this.getRange())&&this.fromOrientedRange(p)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new T,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var m=this.ranges.length?this.ranges:[this.getRange()],p=[],g=0;g<m.length;g++){var w=m[g],L=w.start.row,S=w.end.row;if(L===S)p.push(w.clone());else{for(p.push(new A(L,w.start.column,L,this.session.getLine(L).length));++L<S;)p.push(this.getLineRange(L,!0));p.push(new A(S,0,S,w.end.column))}g==0&&!this.isBackwards()&&(p=p.reverse())}this.toSingleRange();for(var g=p.length;g--;)this.addRange(p[g])},this.joinSelections=function(){var m=this.rangeList.ranges,p=m[m.length-1],g=A.fromPoints(m[0].start,p.end);this.toSingleRange(),this.setSelectionRange(g,p.cursor==p.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var m=this.rangeList.ranges,p=m[m.length-1],g=A.fromPoints(m[0].start,p.end);this.toSingleRange(),this.setSelectionRange(g,p.cursor==p.start)}else{var w=this.session.documentToScreenPosition(this.cursor),L=this.session.documentToScreenPosition(this.anchor),S=this.rectangularRangeBlock(w,L);S.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(m,p,g){var w=[],L=m.column<p.column;if(L)var S=m.column,b=p.column,R=m.offsetX,d=p.offsetX;else var S=p.column,b=m.column,R=p.offsetX,d=m.offsetX;var l=m.row<p.row;if(l)var f=m.row,v=p.row;else var f=p.row,v=m.row;S<0&&(S=0),f<0&&(f=0),f==v&&(g=!0);for(var C,M=f;M<=v;M++){var E=A.fromPoints(this.session.screenToDocumentPosition(M,S,R),this.session.screenToDocumentPosition(M,b,d));if(E.isEmpty()){if(C&&c(E.end,C))break;C=E.end}E.cursor=L?E.start:E.end,w.push(E)}if(l&&w.reverse(),!g){for(var _=w.length-1;w[_].isEmpty()&&_>0;)_--;if(_>0)for(var I=0;w[I].isEmpty();)I++;for(var O=_;O>=I;O--)w[O].isEmpty()&&w.splice(O,1)}return w}}.call($.prototype);var s=k("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(m){m.cursor||(m.cursor=m.end);var p=this.getSelectionStyle();return m.marker=this.session.addMarker(m,"ace_selection",p),this.session.$selectionMarkers.push(m),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,m},this.removeSelectionMarker=function(m){if(m.marker){this.session.removeMarker(m.marker);var p=this.session.$selectionMarkers.indexOf(m);p!=-1&&this.session.$selectionMarkers.splice(p,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(m){for(var p=this.session.$selectionMarkers,g=m.length;g--;){var w=m[g];if(w.marker){this.session.removeMarker(w.marker);var L=p.indexOf(w);L!=-1&&p.splice(L,1)}}this.session.selectionMarkerCount=p.length},this.$onAddRange=function(m){this.addSelectionMarker(m.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(m){this.removeSelectionMarkers(m.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(m){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(r.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(m){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(r.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(m){var p=m.command,g=m.editor;if(g.multiSelect){if(p.multiSelectAction)p.multiSelectAction=="forEach"?w=g.forEachSelection(p,m.args):p.multiSelectAction=="forEachLine"?w=g.forEachSelection(p,m.args,!0):p.multiSelectAction=="single"?(g.exitMultiSelectMode(),w=p.exec(g,m.args||{})):w=p.multiSelectAction(g,m.args||{});else{var w=p.exec(g,m.args||{});g.multiSelect.addRange(g.multiSelect.toOrientedRange()),g.multiSelect.mergeOverlappingRanges()}return w}},this.forEachSelection=function(m,p,g){if(!this.inVirtualSelectionMode){var w=g&&g.keepOrder,L=g==!0||g&&g.$byLines,S=this.session,b=this.selection,R=b.rangeList,d=(w?b:R).ranges,l;if(!d.length)return m.exec?m.exec(this,p||{}):m(this,p||{});var f=b._eventRegistry;b._eventRegistry={};var v=new $(S);this.inVirtualSelectionMode=!0;for(var C=d.length;C--;){if(L)for(;C>0&&d[C].start.row==d[C-1].end.row;)C--;v.fromOrientedRange(d[C]),v.index=C,this.selection=S.selection=v;var M=m.exec?m.exec(this,p||{}):m(this,p||{});!l&&M!==void 0&&(l=M),v.toOrientedRange(d[C])}v.detach(),this.selection=S.selection=b,this.inVirtualSelectionMode=!1,b._eventRegistry=f,b.mergeOverlappingRanges(),b.ranges[0]&&b.fromOrientedRange(b.ranges[0]);var E=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),E&&E.from==E.to&&this.renderer.animateScrolling(E.from),l}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var m="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var p=this.multiSelect.rangeList.ranges,g=[],w=0;w<p.length;w++)g.push(this.session.getTextRange(p[w]));var L=this.session.getDocument().getNewLineCharacter();m=g.join(L),m.length==(g.length-1)*L.length&&(m="")}else this.selection.isEmpty()||(m=this.session.getTextRange(this.getSelectionRange()));return m},this.$checkMultiselectChange=function(m,p){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var g=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&p==this.multiSelect.anchor)return;var w=p==this.multiSelect.anchor?g.cursor==g.start?g.end:g.start:g.cursor;w.row!=p.row||this.session.$clipPositionToDocument(w.row,w.column).column!=p.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(m,p,g){if(p=p||{},p.needle=m||p.needle,p.needle==null){var w=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();p.needle=this.session.getTextRange(w)}this.$search.set(p);var L=this.$search.findAll(this.session);if(!L.length)return 0;var S=this.multiSelect;g||S.toSingleRange(L[0]);for(var b=L.length;b--;)S.addRange(L[b],!0);return w&&S.rangeList.rangeAtPoint(w.start)&&S.addRange(w,!0),L.length},this.selectMoreLines=function(m,p){var g=this.selection.toOrientedRange(),w=g.cursor==g.end,L=this.session.documentToScreenPosition(g.cursor);this.selection.$desiredColumn&&(L.column=this.selection.$desiredColumn);var S=this.session.screenToDocumentPosition(L.row+m,L.column);if(g.isEmpty())var R=S;else var b=this.session.documentToScreenPosition(w?g.end:g.start),R=this.session.screenToDocumentPosition(b.row+m,b.column);if(w){var d=A.fromPoints(S,R);d.cursor=d.start}else{var d=A.fromPoints(R,S);d.cursor=d.end}if(d.desiredColumn=L.column,!this.selection.inMultiSelectMode)this.selection.addRange(g);else if(p)var l=g.cursor;this.selection.addRange(d),l&&this.selection.substractPoint(l)},this.transposeSelections=function(m){for(var p=this.session,g=p.multiSelect,w=g.ranges,L=w.length;L--;){var S=w[L];if(S.isEmpty()){var b=p.getWordRange(S.start.row,S.start.column);S.start.row=b.start.row,S.start.column=b.start.column,S.end.row=b.end.row,S.end.column=b.end.column}}g.mergeOverlappingRanges();for(var R=[],L=w.length;L--;){var S=w[L];R.unshift(p.getTextRange(S))}m<0?R.unshift(R.pop()):R.push(R.shift());for(var L=w.length;L--;){var S=w[L],d=S.clone();p.replace(S,R[L]),S.start.row=d.start.row,S.start.column=d.start.column}g.fromOrientedRange(g.ranges[0])},this.selectMore=function(m,p,g){var w=this.session,L=w.multiSelect,S=L.toOrientedRange();if(!(S.isEmpty()&&(S=w.getWordRange(S.start.row,S.start.column),S.cursor=m==-1?S.start:S.end,this.multiSelect.addRange(S),g))){var b=w.getTextRange(S),R=e(w,b,m);R&&(R.cursor=m==-1?R.start:R.end,this.session.unfold(R),this.multiSelect.addRange(R),this.renderer.scrollCursorIntoView(null,.5)),p&&this.multiSelect.substractPoint(S.cursor)}},this.alignCursors=function(){var m=this.session,p=m.multiSelect,g=p.ranges,w=-1,L=g.filter(function(_){if(_.cursor.row==w)return!0;w=_.cursor.row});if(!g.length||L.length==g.length-1){var S=this.selection.getRange(),b=S.start.row,R=S.end.row,d=b==R;if(d){var l=this.session.getLength(),f;do f=this.session.getLine(R);while(/[=:]/.test(f)&&++R<l);do f=this.session.getLine(b);while(/[=:]/.test(f)&&--b>0);b<0&&(b=0),R>=l&&(R=l-1)}var v=this.session.removeFullLines(b,R);v=this.$reAlignText(v,d),this.session.insert({row:b,column:0},v.join(`
936
- `)+`
937
- `),d||(S.start.column=0,S.end.column=v[v.length-1].length),this.selection.setRange(S)}else{L.forEach(function(_){p.substractPoint(_.cursor)});var C=0,M=1/0,E=g.map(function(_){var I=_.cursor,O=m.getLine(I.row),H=O.substr(I.column).search(/\S/g);return H==-1&&(H=0),I.column>C&&(C=I.column),H<M&&(M=H),H});g.forEach(function(_,I){var O=_.cursor,H=C-O.column,D=E[I]-M;H>D?m.insert(O,n.stringRepeat(" ",H-D)):m.remove(new A(O.row,O.column,O.row,O.column-H+D)),_.start.column=_.end.column=C,_.start.row=_.end.row=O.row,_.cursor=_.end}),p.fromOrientedRange(g[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(m,p){var g=!0,w=!0,L,S,b;return m.map(function(v){var C=v.match(/(\s*)(.*?)(\s*)([=:].*)/);return C?L==null?(L=C[1].length,S=C[2].length,b=C[3].length,C):(L+S+b!=C[1].length+C[2].length+C[3].length&&(w=!1),L!=C[1].length&&(g=!1),L>C[1].length&&(L=C[1].length),S<C[2].length&&(S=C[2].length),b>C[3].length&&(b=C[3].length),C):[v]}).map(p?d:g?w?l:d:f);function R(v){return n.stringRepeat(" ",v)}function d(v){return v[2]?R(L)+v[2]+R(S-v[2].length+b)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function l(v){return v[2]?R(L+S-v[2].length)+v[2]+R(b)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function f(v){return v[2]?R(L)+v[2]+R(b)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}}}).call(s.prototype);function c(m,p){return m.row==p.row&&m.column==p.column}x.onSessionChange=function(m){var p=m.session;p&&!p.multiSelect&&(p.$selectionMarkers=[],p.selection.$initRangeList(),p.multiSelect=p.selection),this.multiSelect=p&&p.multiSelect;var g=m.oldSession;g&&(g.multiSelect.off("addRange",this.$onAddRange),g.multiSelect.off("removeRange",this.$onRemoveRange),g.multiSelect.off("multiSelect",this.$onMultiSelect),g.multiSelect.off("singleSelect",this.$onSingleSelect),g.multiSelect.lead.off("change",this.$checkMultiselectChange),g.multiSelect.anchor.off("change",this.$checkMultiselectChange)),p&&(p.multiSelect.on("addRange",this.$onAddRange),p.multiSelect.on("removeRange",this.$onRemoveRange),p.multiSelect.on("multiSelect",this.$onMultiSelect),p.multiSelect.on("singleSelect",this.$onSingleSelect),p.multiSelect.lead.on("change",this.$checkMultiselectChange),p.multiSelect.anchor.on("change",this.$checkMultiselectChange)),p&&this.inMultiSelectMode!=p.selection.inMultiSelectMode&&(p.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function u(m){m.$multiselectOnSessionChange||(m.$onAddRange=m.$onAddRange.bind(m),m.$onRemoveRange=m.$onRemoveRange.bind(m),m.$onMultiSelect=m.$onMultiSelect.bind(m),m.$onSingleSelect=m.$onSingleSelect.bind(m),m.$multiselectOnSessionChange=x.onSessionChange.bind(m),m.$checkMultiselectChange=m.$checkMultiselectChange.bind(m),m.$multiselectOnSessionChange(m),m.on("changeSession",m.$multiselectOnSessionChange),m.on("mousedown",a),m.commands.addCommands(r.defaultCommands),y(m))}function y(m){if(!m.textInput)return;var p=m.textInput.getElement(),g=!1;h.addListener(p,"keydown",function(L){var S=L.keyCode==18&&!(L.ctrlKey||L.shiftKey||L.metaKey);m.$blockSelectEnabled&&S?g||(m.renderer.setMouseCursor("crosshair"),g=!0):g&&w()},m),h.addListener(p,"keyup",w,m),h.addListener(p,"blur",w,m);function w(L){g&&(m.renderer.setMouseCursor(""),g=!1)}}x.MultiSelect=u,k("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(m){u(this),m?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(m){this.$blockSelectEnabled=m},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(k,x,z){var T=k("../../range").Range,A=x.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function($,a,h){var n=$.getLine(h);return this.foldingStartMarker.test(n)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function($,a,h){return null},this.indentationBlock=function($,a,h){var n=/\S/,r=$.getLine(a),i=r.search(n);if(i!=-1){for(var t=h||r.length,e=$.getLength(),o=a,s=a;++a<e;){var c=$.getLine(a).search(n);if(c!=-1){if(c<=i){var u=$.getTokenAt(a,0);if(!u||u.type!=="string")break}s=a}}if(s>o){var y=$.getLine(s).length;return new T(o,t,s,y)}}},this.openingBracketBlock=function($,a,h,n,r){var i={row:h,column:n+1},t=$.$findClosingBracket(a,i,r);if(t){var e=$.foldWidgets[t.row];return e==null&&(e=$.getFoldWidget(t.row)),e=="start"&&t.row>i.row&&(t.row--,t.column=$.getLine(t.row).length),T.fromPoints(i,t)}},this.closingBracketBlock=function($,a,h,n,r){var i={row:h,column:n},t=$.$findOpeningBracket(a,i);if(t)return t.column++,i.column--,T.fromPoints(t,i)}}).call(A.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(k,x,z){var T=k("../lib/dom"),A=k("../range").Range,$=k("../config").nls;function a(n,r,i){for(var t=0,e=n.length-1;t<=e;){var o=t+e>>1,s=i(r,n[o]);if(s>0)t=o+1;else if(s<0)e=o-1;else return o}return-(t+1)}function h(n,r,i){var t=n.getAnnotations().sort(A.comparePoints);if(t.length){var e=a(t,{row:r,column:-1},A.comparePoints);e<0&&(e=-e-1),e>=t.length?e=i>0?0:t.length-1:e===0&&i<0&&(e=t.length-1);var o=t[e];if(!(!o||!i)){if(o.row===r){do o=t[e+=i];while(o&&o.row===r);if(!o)return t.slice()}var s=[];r=o.row;do s[i<0?"unshift":"push"](o),o=t[e+=i];while(o&&o.row==r);return s.length&&s}}}x.showErrorMarker=function(n,r){var i=n.session,t=n.getCursorPosition(),e=t.row,o=i.widgetManager.getWidgetsAtRow(e).filter(function(L){return L.type=="errorMarker"})[0];o?o.destroy():e-=r;var s=h(i,e,r),c;if(s){var u=s[0];t.column=(u.pos&&typeof u.column!="number"?u.pos.sc:u.column)||0,t.row=u.row,c=n.renderer.$gutterLayer.$annotations[t.row]}else{if(o)return;c={displayText:[$("error-marker.good-state","Looks good!")],className:"ace_ok"}}n.session.unfold(t.row),n.selection.moveToPosition(t);var y={row:t.row,fixedWidth:!0,coverGutter:!0,el:T.createElement("div"),type:"errorMarker"},m=y.el.appendChild(T.createElement("div")),p=y.el.appendChild(T.createElement("div"));p.className="error_widget_arrow "+c.className;var g=n.renderer.$cursorLayer.getPixelPosition(t).left;p.style.left=g+n.renderer.gutterWidth-5+"px",y.el.className="error_widget_wrapper",m.className="error_widget "+c.className,c.displayText.forEach(function(L,S){m.appendChild(T.createTextNode(L)),S<c.displayText.length-1&&m.appendChild(T.createElement("br"))}),m.appendChild(T.createElement("div"));var w=function(L,S,b){if(S===0&&(b==="esc"||b==="return"))return y.destroy(),{command:"null"}};y.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(w),i.widgetManager.removeLineWidget(y),n.off("changeSelection",y.destroy),n.off("changeSession",y.destroy),n.off("mouseup",y.destroy),n.off("change",y.destroy))},n.keyBinding.addKeyboardHandler(w),n.on("changeSelection",y.destroy),n.on("changeSession",y.destroy),n.on("mouseup",y.destroy),n.on("change",y.destroy),n.session.widgetManager.addLineWidget(y),y.el.onmousedown=n.focus.bind(n),n.renderer.scrollCursorIntoView(null,.5,{bottom:y.el.offsetHeight})},T.importCssString(`
938
- .error_widget_wrapper {
939
- background: inherit;
940
- color: inherit;
941
- border:none
942
- }
943
- .error_widget {
944
- border-top: solid 2px;
945
- border-bottom: solid 2px;
946
- margin: 5px 0;
947
- padding: 10px 40px;
948
- white-space: pre-wrap;
949
- }
950
- .error_widget.ace_error, .error_widget_arrow.ace_error{
951
- border-color: #ff5a5a
952
- }
953
- .error_widget.ace_warning, .error_widget_arrow.ace_warning{
954
- border-color: #F1D817
955
- }
956
- .error_widget.ace_info, .error_widget_arrow.ace_info{
957
- border-color: #5a5a5a
958
- }
959
- .error_widget.ace_ok, .error_widget_arrow.ace_ok{
960
- border-color: #5aaa5a
961
- }
962
- .error_widget_arrow {
963
- position: absolute;
964
- border: solid 5px;
965
- border-top-color: transparent!important;
966
- border-right-color: transparent!important;
967
- border-left-color: transparent!important;
968
- top: -5px;
969
- }
970
- `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(k,x,z){k("./loader_build")(x);var T=k("./lib/dom"),A=k("./range").Range,$=k("./editor").Editor,a=k("./edit_session").EditSession,h=k("./undomanager").UndoManager,n=k("./virtual_renderer").VirtualRenderer;k("./worker/worker_client"),k("./keyboard/hash_handler"),k("./placeholder"),k("./multi_select"),k("./mode/folding/fold_mode"),k("./theme/textmate"),k("./ext/error_marker"),x.config=k("./config"),x.edit=function(i,t){if(typeof i=="string"){var e=i;if(i=document.getElementById(e),!i)throw new Error("ace.edit can't find div #"+e)}if(i&&i.env&&i.env.editor instanceof $)return i.env.editor;var o="";if(i&&/input|textarea/i.test(i.tagName)){var s=i;o=s.value,i=T.createElement("pre"),s.parentNode.replaceChild(i,s)}else i&&(o=i.textContent,i.innerHTML="");var c=x.createEditSession(o),u=new $(new n(i),c,t),y={document:c,editor:u,onResize:u.resize.bind(u,null)};return s&&(y.textarea=s),u.on("destroy",function(){y.editor.container.env=null}),u.container.env=u.env=y,u},x.createEditSession=function(i,t){var e=new a(i,t);return e.setUndoManager(new h),e},x.Range=A,x.Editor=$,x.EditSession=a,x.UndoManager=h,x.VirtualRenderer=n;var r=x.config.version;x.version=r}),function(){ace.require(["ace/ace"],function(k){k&&(k.config.init(!0),k.define=ace.define);var x=function(){return this}();!x&&typeof window<"u"&&(x=window),!x&&typeof self<"u"&&(x=self),x.ace||(x.ace=k);for(var z in k)k.hasOwnProperty(z)&&(x.ace[z]=k[z]);x.ace.default=x.ace,pe&&(pe.exports=x.ace)})}()})(ye);var Ce=ye.exports;export{Ce as a};