@oas-tools/oas-telemetry 0.7.0-alpha.4 → 0.7.0

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 (112) hide show
  1. package/.env.example +6 -2
  2. package/README.md +35 -17
  3. package/dist/cjs/config/bootConfig.cjs +3 -1
  4. package/dist/cjs/config/config.cjs +7 -5
  5. package/dist/cjs/docs/openapi.yaml +1399 -0
  6. package/dist/cjs/routesManager.cjs +36 -48
  7. package/dist/cjs/telemetry/custom-implementations/exporters/InMemoryDbLogExporter.cjs +43 -13
  8. package/dist/cjs/telemetry/custom-implementations/exporters/InMemoryDbMetricExporter.cjs +10 -2
  9. package/dist/cjs/telemetry/custom-implementations/exporters/InMemoryDbSpanExporter.cjs +21 -16
  10. package/dist/cjs/telemetry/initializeTelemetry.cjs +39 -15
  11. package/dist/cjs/telemetry/telemetryConfigurator.cjs +6 -9
  12. package/dist/cjs/telemetry/telemetryRegistry.cjs +11 -8
  13. package/dist/cjs/tlm-ai/agent.cjs +54 -84
  14. package/dist/cjs/tlm-ai/aiController.cjs +69 -47
  15. package/dist/cjs/tlm-ai/aiRoutes.cjs +10 -3
  16. package/dist/cjs/tlm-ai/aiService.cjs +109 -0
  17. package/dist/cjs/tlm-ai/tools.cjs +30 -268
  18. package/dist/cjs/tlm-auth/authController.cjs +91 -26
  19. package/dist/cjs/tlm-auth/authMiddleware.cjs +20 -7
  20. package/dist/cjs/tlm-auth/authRoutes.cjs +3 -2
  21. package/dist/cjs/tlm-log/logController.cjs +30 -36
  22. package/dist/cjs/tlm-log/logRoutes.cjs +3 -2
  23. package/dist/cjs/tlm-metric/metricsController.cjs +15 -8
  24. package/dist/cjs/tlm-metric/metricsRoutes.cjs +2 -1
  25. package/dist/cjs/tlm-plugin/pluginController.cjs +11 -1
  26. package/dist/cjs/tlm-plugin/pluginProcess.cjs +4 -2
  27. package/dist/cjs/tlm-plugin/pluginService.cjs +3 -0
  28. package/dist/cjs/tlm-trace/traceController.cjs +16 -9
  29. package/dist/cjs/tlm-trace/traceRoutes.cjs +2 -1
  30. package/dist/cjs/tlm-util/utilController.cjs +23 -2
  31. package/dist/cjs/tlm-util/utilRoutes.cjs +44 -5
  32. package/dist/cjs/utils/logger.cjs +35 -13
  33. package/dist/esm/config/bootConfig.js +2 -0
  34. package/dist/esm/config/config.js +4 -2
  35. package/dist/esm/docs/openapi.yaml +1399 -0
  36. package/dist/esm/routesManager.js +37 -49
  37. package/dist/esm/telemetry/custom-implementations/exporters/InMemoryDbLogExporter.js +32 -11
  38. package/dist/esm/telemetry/custom-implementations/exporters/InMemoryDbMetricExporter.js +10 -2
  39. package/dist/esm/telemetry/custom-implementations/exporters/InMemoryDbSpanExporter.js +20 -13
  40. package/dist/esm/telemetry/initializeTelemetry.js +22 -14
  41. package/dist/esm/telemetry/telemetryConfigurator.js +7 -10
  42. package/dist/esm/telemetry/telemetryRegistry.js +10 -7
  43. package/dist/esm/tlm-ai/agent.js +37 -78
  44. package/dist/esm/tlm-ai/aiController.js +56 -39
  45. package/dist/esm/tlm-ai/aiRoutes.js +11 -4
  46. package/dist/esm/tlm-ai/aiService.js +94 -0
  47. package/dist/esm/tlm-ai/tools.js +29 -255
  48. package/dist/esm/tlm-auth/authController.js +62 -20
  49. package/dist/esm/tlm-auth/authMiddleware.js +18 -9
  50. package/dist/esm/tlm-auth/authRoutes.js +4 -3
  51. package/dist/esm/tlm-log/logController.js +26 -28
  52. package/dist/esm/tlm-log/logRoutes.js +4 -3
  53. package/dist/esm/tlm-metric/metricsController.js +10 -6
  54. package/dist/esm/tlm-metric/metricsRoutes.js +3 -2
  55. package/dist/esm/tlm-plugin/pluginController.js +2 -1
  56. package/dist/esm/tlm-plugin/pluginProcess.js +4 -2
  57. package/dist/esm/tlm-plugin/pluginService.js +4 -0
  58. package/dist/esm/tlm-trace/traceController.js +11 -7
  59. package/dist/esm/tlm-trace/traceRoutes.js +3 -2
  60. package/dist/esm/tlm-util/utilController.js +22 -0
  61. package/dist/esm/tlm-util/utilRoutes.js +40 -5
  62. package/dist/esm/utils/logger.js +35 -12
  63. package/dist/types/config/bootConfig.d.ts +1 -0
  64. package/dist/types/config/config.d.ts +6 -3
  65. package/dist/types/telemetry/custom-implementations/exporters/InMemoryDbLogExporter.d.ts +7 -1
  66. package/dist/types/telemetry/custom-implementations/exporters/InMemoryDbMetricExporter.d.ts +1 -0
  67. package/dist/types/telemetry/custom-implementations/exporters/InMemoryDbSpanExporter.d.ts +1 -0
  68. package/dist/types/telemetry/telemetryRegistry.d.ts +22 -6
  69. package/dist/types/tlm-ai/agent.d.ts +2 -2
  70. package/dist/types/tlm-ai/aiController.d.ts +5 -4
  71. package/dist/types/tlm-ai/aiRoutes.d.ts +1 -1
  72. package/dist/types/tlm-ai/aiService.d.ts +38 -0
  73. package/dist/types/tlm-ai/tools.d.ts +5 -14
  74. package/dist/types/tlm-auth/authController.d.ts +2 -1
  75. package/dist/types/tlm-log/logController.d.ts +2 -2
  76. package/dist/types/tlm-metric/metricsController.d.ts +2 -1
  77. package/dist/types/tlm-plugin/pluginService.d.ts +2 -0
  78. package/dist/types/tlm-trace/traceController.d.ts +2 -1
  79. package/dist/types/tlm-util/utilController.d.ts +1 -0
  80. package/dist/types/utils/logger.d.ts +5 -5
  81. package/dist/ui/assets/ApiDocsPage-C_VVPPHa.js +16 -0
  82. package/dist/ui/assets/CollapsibleCard-B3KR_8mL.js +1 -0
  83. package/dist/ui/assets/DevToolsPage-OyZcDcmw.js +1 -0
  84. package/dist/ui/assets/LandingPage-CppFBA6K.js +6 -0
  85. package/dist/ui/assets/LogsPage-9Fq8GArS.js +26 -0
  86. package/dist/ui/assets/NotFoundPage-B3quk3P1.js +1 -0
  87. package/dist/ui/assets/PluginCreatePage-X_aCH4t4.js +50 -0
  88. package/dist/ui/assets/PluginPage-DMDSihrZ.js +27 -0
  89. package/dist/ui/assets/alert-jQ9HCPIf.js +1133 -0
  90. package/dist/ui/assets/badge-CNq0-mH5.js +1 -0
  91. package/dist/ui/assets/card-DFAwwhN3.js +1 -0
  92. package/dist/ui/assets/chevron-down-CPsvsmqj.js +6 -0
  93. package/dist/ui/assets/chevron-up-Df9jMo1X.js +6 -0
  94. package/dist/ui/assets/circle-alert-DOPQPvU8.js +6 -0
  95. package/dist/ui/assets/index-BkD6DijD.js +15 -0
  96. package/dist/ui/assets/index-CERGVYZK.js +292 -0
  97. package/dist/ui/assets/index-CSIPf9qw.css +1 -0
  98. package/dist/ui/assets/input-Dzvg_ZEZ.js +1 -0
  99. package/dist/ui/assets/label-DuVnkZ4q.js +1 -0
  100. package/dist/ui/assets/loader-circle-CrvlRy5o.js +6 -0
  101. package/dist/ui/assets/loginPage-qa4V-B70.js +6 -0
  102. package/dist/ui/assets/select-DhS8YUtJ.js +1 -0
  103. package/dist/ui/assets/separator-isK4chBP.js +6 -0
  104. package/dist/ui/assets/severityOptions-O38dSOfk.js +11 -0
  105. package/dist/ui/assets/switch-Z3mImG9n.js +1 -0
  106. package/dist/ui/assets/tabs-_77MUUQe.js +16 -0
  107. package/dist/ui/assets/upload-C1LT4Gkb.js +16 -0
  108. package/dist/ui/assets/utilService-DNyqzwj0.js +1 -0
  109. package/dist/ui/index.html +2 -2
  110. package/package.json +18 -7
  111. package/dist/ui/assets/index-BzIdRox6.js +0 -1733
  112. package/dist/ui/assets/index-CkoHzrrt.css +0 -1
@@ -0,0 +1,1133 @@
1
+ import{c as an,y as Xe,z as be,D as Et,E as ai,j as ln,o as cn,G as li}from"./index-CERGVYZK.js";/**
2
+ * @license lucide-react v0.515.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const ci=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],_i=an("code",ci);/**
7
+ * @license lucide-react v0.515.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const hi=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ki=an("globe",hi);class ui{async listPlugins(){var H,k;try{return{status:"success",message:"",data:(await Xe.get("/plugins")).data.plugins}}catch(M){let F="Error listing plugins";return(k=(H=M.response)==null?void 0:H.data)!=null&&k.message&&(F=M.response.data),{status:"error",message:F,data:[]}}}async createPlugin(H){try{return{status:"success",message:"Plugin created",data:(await Xe.post("/plugins",H)).data}}catch(k){let M="Error creating plugin",F="error";return k.response&&(F=k.response.status===400?"fail":"error",M=k.response.data||M),{status:F,message:M,data:null}}}async activatePlugin(H){try{return await Xe.post(`/plugins/${encodeURIComponent(H)}/activate`),{status:"success",message:"Plugin activated",data:!0}}catch(k){let M=`Error activating plugin ${H}`,F="error";return k.response&&(F=k.response.status===400?"fail":"error",M=k.response.data||M),{status:F,message:M,data:!1}}}async deactivatePlugin(H){try{return await Xe.post(`/plugins/${encodeURIComponent(H)}/deactivate`),{status:"success",message:"Plugin deactivated",data:!0}}catch(k){let M=`Error deactivating plugin ${H}`,F="error";return k.response&&(F=k.response.status===400?"fail":"error",M=k.response.data||M),{status:F,message:M,data:!1}}}async deletePlugin(H){try{return await Xe.delete(`/plugins/${encodeURIComponent(H)}`),{status:"success",message:"Plugin deleted",data:!0}}catch(k){let M=`Error deleting plugin ${H}`,F="error";return k.response&&(F=k.response.status===400?"fail":"error",M=k.response.data||M),{status:F,message:M,data:!1}}}}const di=new ui,Li=()=>di;var Le={},Te={},$t={exports:{}},Ut;function lt(){return Ut||(Ut=1,function(ee,H){(function(){var k="ace",M=function(){return this}();!M&&typeof window<"u"&&(M=window);var F=function(r,n,i){if(typeof r!="string"){F.original?F.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(i=n),F.modules[r]||(F.payloads[r]=i,F.modules[r]=null)};F.modules={},F.payloads={};var v=function(r,n,i){if(typeof n=="string"){var t=a(r,n);if(t!=null)return i&&i(),t}else if(Object.prototype.toString.call(n)==="[object Array]"){for(var e=[],o=0,s=n.length;o<s;++o){var c=a(r,n[o]);if(c==null&&f.original)return;e.push(c)}return i&&i.apply(null,e)||!0}},f=function(r,n){var i=v("",r,n);return i==null&&f.original?f.original.apply(this,arguments):i},g=function(r,n){if(n.indexOf("!")!==-1){var i=n.split("!");return g(r,i[0])+"!"+g(r,i[1])}if(n.charAt(0)=="."){var t=r.split("/").slice(0,-1).join("/");for(n=t+"/"+n;n.indexOf(".")!==-1&&e!=n;){var e=n;n=n.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},a=function(r,n){n=g(r,n);var i=F.modules[n];if(!i){if(i=F.payloads[n],typeof i=="function"){var t={},e={id:n,uri:"",exports:t,packaged:!0},o=function(c,h){return v(n,c,h)},s=i(o,t,e);t=s||e.exports,F.modules[n]=t,delete F.payloads[n]}i=F.modules[n]=t||i}return i};function l(r){var n=M;M[r]||(M[r]={}),n=M[r],(!n.define||!n.define.packaged)&&(F.original=n.define,n.define=F,n.define.packaged=!0),(!n.require||!n.require.packaged)&&(f.original=n.require,n.require=f,n.require.packaged=!0)}l(k)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(k,M,F){function v(f,g,a){Object.defineProperty(f,g,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||v(String.prototype,"startsWith",function(f,g){return g=g||0,this.lastIndexOf(f,g)===g}),String.prototype.endsWith||v(String.prototype,"endsWith",function(f,g){var a=this;(g===void 0||g>a.length)&&(g=a.length),g-=f.length;var l=a.indexOf(f,g);return l!==-1&&l===g}),String.prototype.repeat||v(String.prototype,"repeat",function(f){for(var g="",a=this;f>0;)f&1&&(g+=a),(f>>=1)&&(a+=a);return g}),String.prototype.includes||v(String.prototype,"includes",function(f,g){return this.indexOf(f,g)!=-1}),Object.assign||(Object.assign=function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var g=Object(f),a=1;a<arguments.length;a++){var l=arguments[a];l!=null&&Object.keys(l).forEach(function(r){g[r]=l[r]})}return g}),Object.values||(Object.values=function(f){return Object.keys(f).map(function(g){return f[g]})}),Array.prototype.find||v(Array.prototype,"find",function(f){for(var g=this.length,a=arguments[1],l=0;l<g;l++){var r=this[l];if(f.call(a,r,l,this))return r}}),Array.prototype.findIndex||v(Array.prototype,"findIndex",function(f){for(var g=this.length,a=arguments[1],l=0;l<g;l++){var r=this[l];if(f.call(a,r,l,this))return l}}),Array.prototype.includes||v(Array.prototype,"includes",function(f,g){return this.indexOf(f,g)!=-1}),Array.prototype.fill||v(Array.prototype,"fill",function(f){for(var g=this,a=g.length>>>0,l=arguments[1],r=l>>0,n=r<0?Math.max(a+r,0):Math.min(r,a),i=arguments[2],t=i===void 0?a:i>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);n<e;)g[n]=f,n++;return g}),Array.of||v(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(k,M,F){k("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(k,M,F){M.deepCopy=function v(f){if(typeof f!="object"||!f)return f;var g;if(Array.isArray(f)){g=[];for(var a=0;a<f.length;a++)g[a]=v(f[a]);return g}if(Object.prototype.toString.call(f)!=="[object Object]")return f;g={};for(var a in f)g[a]=v(f[a]);return g}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(k,M,F){M.last=function(g){return g[g.length-1]},M.stringReverse=function(g){return g.split("").reverse().join("")},M.stringRepeat=function(g,a){for(var l="";a>0;)a&1&&(l+=g),(a>>=1)&&(g+=g);return l};var v=/^\s\s*/,f=/\s\s*$/;M.stringTrimLeft=function(g){return g.replace(v,"")},M.stringTrimRight=function(g){return g.replace(f,"")},M.copyObject=function(g){var a={};for(var l in g)a[l]=g[l];return a},M.copyArray=function(g){for(var a=[],l=0,r=g.length;l<r;l++)g[l]&&typeof g[l]=="object"?a[l]=this.copyObject(g[l]):a[l]=g[l];return a},M.deepCopy=k("./deep_copy").deepCopy,M.arrayToMap=function(g){for(var a={},l=0;l<g.length;l++)a[g[l]]=1;return a},M.createMap=function(g){var a=Object.create(null);for(var l in g)a[l]=g[l];return a},M.arrayRemove=function(g,a){for(var l=0;l<=g.length;l++)a===g[l]&&g.splice(l,1)},M.escapeRegExp=function(g){return g.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},M.escapeHTML=function(g){return(""+g).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},M.getMatchOffsets=function(g,a){var l=[];return g.replace(a,function(r){l.push({offset:arguments[arguments.length-2],length:r.length})}),l},M.deferredCall=function(g){var a=null,l=function(){a=null,g()},r=function(n){return r.cancel(),a=setTimeout(l,n||0),r};return r.schedule=r,r.call=function(){return this.cancel(),g(),r},r.cancel=function(){return clearTimeout(a),a=null,r},r.isPending=function(){return a},r},M.delayedCall=function(g,a){var l=null,r=function(){l=null,g()},n=function(i){l==null&&(l=setTimeout(r,i||a))};return n.delay=function(i){l&&clearTimeout(l),l=setTimeout(r,i||a)},n.schedule=n,n.call=function(){this.cancel(),g()},n.cancel=function(){l&&clearTimeout(l),l=null},n.isPending=function(){return l},n},M.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},M.skipEmptyMatch=function(g,a,l){return l&&g.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(k,M,F){M.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},M.getOS=function(){return M.isMac?M.OS.MAC:M.isLinux?M.OS.LINUX:M.OS.WINDOWS};var v=typeof navigator=="object"?navigator:{},f=(/mac|win|linux/i.exec(v.platform)||["other"])[0].toLowerCase(),g=v.userAgent||"",a=v.appName||"";M.isWin=f=="win",M.isMac=f=="mac",M.isLinux=f=="linux",M.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((g.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((g.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),M.isOldIE=M.isIE&&M.isIE<9,M.isGecko=M.isMozilla=g.match(/ Gecko\/\d+/),M.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",M.isWebKit=parseFloat(g.split("WebKit/")[1])||void 0,M.isChrome=parseFloat(g.split(" Chrome/")[1])||void 0,M.isSafari=parseFloat(g.split(" Safari/")[1])&&!M.isChrome||void 0,M.isEdge=parseFloat(g.split(" Edge/")[1])||void 0,M.isAIR=g.indexOf("AdobeAIR")>=0,M.isAndroid=g.indexOf("Android")>=0,M.isChromeOS=g.indexOf(" CrOS ")>=0,M.isIOS=/iPad|iPhone|iPod/.test(g)&&!window.MSStream,M.isIOS&&(M.isMac=!0),M.isMobile=M.isIOS||M.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(k,M,F){var v=k("./useragent"),f="http://www.w3.org/1999/xhtml";M.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=[],h=0;h<t.length;h++){var y=i(t[h],e,o);y&&c.push(y)}return c}var w=document.createElement(t[0]),p=t[1],u=1;p&&typeof p=="object"&&!Array.isArray(p)&&(u=2);for(var h=u;h<t.length;h++)i(t[h],w,o);return u==2&&Object.keys(p).forEach(function(C){var _=p[C];C==="class"?w.className=Array.isArray(_)?_.join(" "):_:typeof _=="function"||C=="value"||C[0]=="$"?w[C]=_:C==="ref"?o&&(o[_]=w):C==="style"?typeof _=="string"&&(w.style.cssText=_):_!=null&&w.setAttribute(C,_)}),e&&e.appendChild(w),w},M.getDocumentHead=function(i){return i||(i=document),i.head||i.getElementsByTagName("head")[0]||i.documentElement},M.createElement=function(i,t){return document.createElementNS?document.createElementNS(t||f,i):document.createElement(i)},M.removeChildren=function(i){i.innerHTML=""},M.createTextNode=function(i,t){var e=t?t.ownerDocument:document;return e.createTextNode(i)},M.createFragment=function(i){var t=i?i.ownerDocument:document;return t.createDocumentFragment()},M.hasCssClass=function(i,t){var e=(i.className+"").split(/\s+/g);return e.indexOf(t)!==-1},M.addCssClass=function(i,t){M.hasCssClass(i,t)||(i.className+=" "+t)},M.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(" ")},M.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},M.setCssClass=function(i,t,e){e?M.addCssClass(i,t):M.removeCssClass(i,t)},M.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}},M.removeElementById=function(i,t){t=t||document,t.getElementById(i)&&t.getElementById(i).remove()};var g,a=[];M.useStrictCSP=function(i){g=i,i==!1?l():a||(a=[])};function l(){var i=a;a=null,i&&i.forEach(function(t){r(t[0],t[1])})}function r(i,t,e){if(!(typeof document>"u")){if(a){if(e)l();else if(e===!1)return a.push([i,t])}if(!g){var o=e;!e||!e.getRootNode?o=document:(o=e.getRootNode(),(!o||o==e)&&(o=document));var s=o.ownerDocument||o;if(t&&M.hasCssString(t,o))return null;t&&(i+=`
12
+ /*# sourceURL=ace/css/`+t+" */");var c=M.createElement("style");c.appendChild(s.createTextNode(i)),t&&(c.id=t),o==s&&(o=M.getDocumentHead(s)),o.insertBefore(c,o.firstChild)}}}if(M.importCssString=r,M.importCssStylsheet=function(i,t){M.buildDom(["link",{rel:"stylesheet",href:i}],M.getDocumentHead(t))},M.scrollbarWidth=function(i){var t=M.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=M.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 h=t.offsetWidth;return c===h&&(h=e.clientWidth),s.removeChild(e),c-h},M.computedStyle=function(i,t){return window.getComputedStyle(i,"")||{}},M.setStyle=function(i,t,e){i[t]!==e&&(i[t]=e)},M.HAS_CSS_ANIMATION=!1,M.HAS_CSS_TRANSFORMS=!1,M.HI_DPI=v.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,v.isChromeOS&&(M.HI_DPI=!1),typeof document<"u"){var n=document.createElement("div");M.HI_DPI&&n.style.transform!==void 0&&(M.HAS_CSS_TRANSFORMS=!0),!v.isEdge&&typeof n.style.animationName<"u"&&(M.HAS_CSS_ANIMATION=!0),n=null}M.HAS_CSS_TRANSFORMS?M.translate=function(i,t,e){i.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:M.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,M,F){/*
13
+ * based on code from:
14
+ *
15
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
16
+ * Available via the MIT or new BSD license.
17
+ * see: http://github.com/jrburke/requirejs for details
18
+ */var v=k("./dom");M.get=function(f,g){var a=new XMLHttpRequest;a.open("GET",f,!0),a.onreadystatechange=function(){a.readyState===4&&g(a.responseText)},a.send(null)},M.loadScript=function(f,g){var a=v.getDocumentHead(),l=document.createElement("script");l.src=f,a.appendChild(l),l.onload=l.onreadystatechange=function(r,n){(n||!l.readyState||l.readyState=="loaded"||l.readyState=="complete")&&(l=l.onload=l.onreadystatechange=null,n||g())}},M.qualifyURL=function(f){var g=document.createElement("a");return g.href=f,g.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(k,M,F){M.inherits=function(v,f){v.super_=f,v.prototype=Object.create(f.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}})},M.mixin=function(v,f){for(var g in f)v[g]=f[g];return v},M.implement=function(v,f){M.mixin(v,f)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(k,M,F){var v={},f=function(){this.propagationStopped=!0},g=function(){this.defaultPrevented=!0};v._emit=v._dispatchEvent=function(a,l){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[a]||[],n=this._defaultHandlers[a];if(!(!r.length&&!n)){(typeof l!="object"||!l)&&(l={}),l.type||(l.type=a),l.stopPropagation||(l.stopPropagation=f),l.preventDefault||(l.preventDefault=g),r=r.slice();for(var i=0;i<r.length&&(r[i](l,this),!l.propagationStopped);i++);if(n&&!l.defaultPrevented)return n(l,this)}},v._signal=function(a,l){var r=(this._eventRegistry||{})[a];if(r){r=r.slice();for(var n=0;n<r.length;n++)r[n](l,this)}},v.once=function(a,l){var r=this;if(this.on(a,function n(){r.off(a,n),l.apply(null,arguments)}),!l)return new Promise(function(n){l=n})},v.setDefaultHandler=function(a,l){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[a]){var n=r[a],i=r._disabled_[a];i||(r._disabled_[a]=i=[]),i.push(n);var t=i.indexOf(l);t!=-1&&i.splice(t,1)}r[a]=l},v.removeDefaultHandler=function(a,l){var r=this._defaultHandlers;if(r){var n=r._disabled_[a];if(r[a]==l)n&&this.setDefaultHandler(a,n.pop());else if(n){var i=n.indexOf(l);i!=-1&&n.splice(i,1)}}},v.on=v.addEventListener=function(a,l,r){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[a];return n||(n=this._eventRegistry[a]=[]),n.indexOf(l)==-1&&n[r?"unshift":"push"](l),l},v.off=v.removeListener=v.removeEventListener=function(a,l){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[a];if(r){var n=r.indexOf(l);n!==-1&&r.splice(n,1)}},v.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},M.EventEmitter=v}),ace.define("ace/lib/report_error",["require","exports","module"],function(k,M,F){M.reportError=function(f,g){var a=new Error(f);a.data=g,typeof console=="object"&&console.error&&console.error(a),setTimeout(function(){throw a})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(k,M,F){var v={"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 gutter","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","editor.tooltip.disable-editing":"Editing is disabled"};M.defaultEnglishMessages=v}),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,M,F){"no use strict";var v=k("./oop"),f=k("./event_emitter").EventEmitter,g=k("./report_error").reportError,a=k("./default_english_messages").defaultEnglishMessages,l={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)||(e=Object.keys(e));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 r('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]:r('misspelled option "'+e+'"')}};function r(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var n,i,t=function(){function e(){this.$defaultOptions={},n=a,i="dollarSigns"}return e.prototype.defineOptions=function(o,s,c){return o.$options||(this.$defaultOptions[s]=o.$options={}),Object.keys(c).forEach(function(h){var y=c[h];typeof y=="string"&&(y={forwardTo:y}),y.name||(y.name=h),o.$options[y.name]=y,"initialValue"in y&&(o["$"+y.name]=y.initialValue)}),v.implement(o,l),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 h=this.$defaultOptions[o]||(this.$defaultOptions[o]={});h[s]&&(h.forwardTo?this.setDefaultValue(h.forwardTo,s,c):h[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){n=o,s&&s.placeholders&&(i=s.placeholders)},e.prototype.nls=function(o,s,c){n[o]||(r("No message found for the key '"+o+"' in messages with id "+n.$id+", trying to find a translation for the default string '"+s+"'."),n[s]||r("No message found for the default string '"+s+"' in the provided messages. Falling back to the default English message."));var h=n[o]||n[s]||s;return c&&(i==="dollarSigns"&&(h=h.replace(/\$(\$|[\d]+)/g,function(y,w){return w=="$"?"$":c[w]})),i==="curlyBrackets"&&(h=h.replace(/\{([^\}]+)\}/g,function(y,w){return c[w]}))),h},e}();t.prototype.warn=r,t.prototype.reportError=g,v.implement(t.prototype,f),M.AppConfig=t}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(k,M,F){F.exports=`.ace-tm .ace_gutter {
19
+ background: #f0f0f0;
20
+ color: #333;
21
+ }
22
+
23
+ .ace-tm .ace_print-margin {
24
+ width: 1px;
25
+ background: #e8e8e8;
26
+ }
27
+
28
+ .ace-tm .ace_fold {
29
+ background-color: #6B72E6;
30
+ }
31
+
32
+ .ace-tm {
33
+ background-color: #FFFFFF;
34
+ color: black;
35
+ }
36
+
37
+ .ace-tm .ace_cursor {
38
+ color: black;
39
+ }
40
+
41
+ .ace-tm .ace_invisible {
42
+ color: rgb(191, 191, 191);
43
+ }
44
+
45
+ .ace-tm .ace_storage,
46
+ .ace-tm .ace_keyword {
47
+ color: blue;
48
+ }
49
+
50
+ .ace-tm .ace_constant {
51
+ color: rgb(197, 6, 11);
52
+ }
53
+
54
+ .ace-tm .ace_constant.ace_buildin {
55
+ color: rgb(88, 72, 246);
56
+ }
57
+
58
+ .ace-tm .ace_constant.ace_language {
59
+ color: rgb(88, 92, 246);
60
+ }
61
+
62
+ .ace-tm .ace_constant.ace_library {
63
+ color: rgb(6, 150, 14);
64
+ }
65
+
66
+ .ace-tm .ace_invalid {
67
+ background-color: rgba(255, 0, 0, 0.1);
68
+ color: red;
69
+ }
70
+
71
+ .ace-tm .ace_support.ace_function {
72
+ color: rgb(60, 76, 114);
73
+ }
74
+
75
+ .ace-tm .ace_support.ace_constant {
76
+ color: rgb(6, 150, 14);
77
+ }
78
+
79
+ .ace-tm .ace_support.ace_type,
80
+ .ace-tm .ace_support.ace_class {
81
+ color: rgb(109, 121, 222);
82
+ }
83
+
84
+ .ace-tm .ace_keyword.ace_operator {
85
+ color: rgb(104, 118, 135);
86
+ }
87
+
88
+ .ace-tm .ace_string {
89
+ color: rgb(3, 106, 7);
90
+ }
91
+
92
+ .ace-tm .ace_comment {
93
+ color: rgb(76, 136, 107);
94
+ }
95
+
96
+ .ace-tm .ace_comment.ace_doc {
97
+ color: rgb(0, 102, 255);
98
+ }
99
+
100
+ .ace-tm .ace_comment.ace_doc.ace_tag {
101
+ color: rgb(128, 159, 191);
102
+ }
103
+
104
+ .ace-tm .ace_constant.ace_numeric {
105
+ color: rgb(0, 0, 205);
106
+ }
107
+
108
+ .ace-tm .ace_variable {
109
+ color: rgb(49, 132, 149);
110
+ }
111
+
112
+ .ace-tm .ace_xml-pe {
113
+ color: rgb(104, 104, 91);
114
+ }
115
+
116
+ .ace-tm .ace_entity.ace_name.ace_function {
117
+ color: #0000A2;
118
+ }
119
+
120
+
121
+ .ace-tm .ace_heading {
122
+ color: rgb(12, 7, 255);
123
+ }
124
+
125
+ .ace-tm .ace_list {
126
+ color:rgb(185, 6, 144);
127
+ }
128
+
129
+ .ace-tm .ace_meta.ace_tag {
130
+ color:rgb(0, 22, 142);
131
+ }
132
+
133
+ .ace-tm .ace_string.ace_regex {
134
+ color: rgb(255, 0, 0)
135
+ }
136
+
137
+ .ace-tm .ace_marker-layer .ace_selection {
138
+ background: rgb(181, 213, 255);
139
+ }
140
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
141
+ box-shadow: 0 0 3px 0px white;
142
+ }
143
+ .ace-tm .ace_marker-layer .ace_step {
144
+ background: rgb(252, 255, 0);
145
+ }
146
+
147
+ .ace-tm .ace_marker-layer .ace_stack {
148
+ background: rgb(164, 229, 101);
149
+ }
150
+
151
+ .ace-tm .ace_marker-layer .ace_bracket {
152
+ margin: -1px 0 0 -1px;
153
+ border: 1px solid rgb(192, 192, 192);
154
+ }
155
+
156
+ .ace-tm .ace_marker-layer .ace_active-line {
157
+ background: rgba(0, 0, 0, 0.07);
158
+ }
159
+
160
+ .ace-tm .ace_gutter-active-line {
161
+ background-color : #dcdcdc;
162
+ }
163
+
164
+ .ace-tm .ace_marker-layer .ace_selected-word {
165
+ background: rgb(250, 250, 255);
166
+ border: 1px solid rgb(200, 200, 250);
167
+ }
168
+
169
+ .ace-tm .ace_indent-guide {
170
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
171
+ }
172
+
173
+ .ace-tm .ace_indent-guide-active {
174
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
175
+ }
176
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(k,M,F){M.isDark=!1,M.cssClass="ace-tm",M.cssText=k("./textmate-css"),M.$id="ace/theme/textmate";var v=k("../lib/dom");v.importCssString(M.cssText,M.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,M,F){"no use strict";var v=k("./lib/lang"),f=k("./lib/net"),g=k("./lib/dom"),a=k("./lib/app_config").AppConfig;F.exports=M=new a;var l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};M.get=function(t){if(!l.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return l[t]},M.set=function(t,e){if(l.hasOwnProperty(t))l[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&g.useStrictCSP(e)},M.all=function(){return v.copyObject(l)},M.$modes={},M.moduleUrl=function(t,e){if(l.$moduleUrls[t])return l.$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 h=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");c=c.replace(h,"")}(!c||c==e)&&o.length>1&&(c=o[o.length-2]);var y=l[e+"Path"];return y==null?y=l.basePath:s=="/"&&(e=s=""),y&&y.slice(-1)!="/"&&(y+="/"),y+e+s+c+this.get("suffix")},M.setModuleUrl=function(t,e){return l.$moduleUrls[t]=e};var r=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,k("./theme/textmate"));if(n)return n(t,e);console.error("loader is not configured")},n;M.setLoader=function(t){n=t},M.dynamicModules=Object.create(null),M.$loading={},M.$loaded={},M.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 h=function(y){if(y&&!M.$loading[c])return e&&e(y);if(M.$loading[c]||(M.$loading[c]=[]),M.$loading[c].push(e),!(M.$loading[c].length>1)){var w=function(){r(c,function(p,u){u&&(M.$loaded[c]=u),M._emit("load.module",{name:c,module:u});var C=M.$loading[c];M.$loading[c]=null,C.forEach(function(_){_&&_(u)})})};if(!M.get("packaged"))return w();f.loadScript(M.moduleUrl(c,s),w),i()}};if(M.dynamicModules[c])M.dynamicModules[c]().then(function(y){y.default?h(y.default):h(y)});else{try{o=this.$require(c)}catch{}h(o||M.$loaded[c])}},M.$require=function(t){if(typeof F.require=="function"){var e="require";return F[e](t)}},M.setModuleLoader=function(t,e){M.dynamicModules[t]=e};var i=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$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(){})};M.version="1.43.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(k,M,F){k("./lib/fixoldbrowsers");var v=k("./config");v.setLoader(function(l,r){k([l],function(n){r(null,n)})});var f=function(){return this||typeof window<"u"&&window}();F.exports=function(l){v.init=g,v.$require=k,l.require=k},g(!0);function g(l){if(!(!f||!f.document)){v.set("packaged",l||k.packaged||F.packaged||f.define&&(void 0).packaged);var r={},n="",i=document.currentScript||document._currentScript,t=i&&i.ownerDocument||document;i&&i.src&&(n=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 h=s.attributes,y=0,w=h.length;y<w;y++){var p=h[y];p.name.indexOf("data-ace-")===0&&(r[a(p.name.replace(/^data-ace-/,""))]=p.value)}var u=c.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);u&&(n=u[1])}}n&&(r.base=r.base||n,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var C in r)typeof r[C]<"u"&&v.set(C,r[C])}}function a(l){return l.replace(/-(.)/g,function(r,n){return n.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(k,M,F){var v=function(){function f(g,a,l,r){this.start={row:g,column:a},this.end={row:l,column:r}}return f.prototype.isEqual=function(g){return this.start.row===g.start.row&&this.end.row===g.end.row&&this.start.column===g.start.column&&this.end.column===g.end.column},f.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},f.prototype.contains=function(g,a){return this.compare(g,a)==0},f.prototype.compareRange=function(g){var a,l=g.end,r=g.start;return a=this.compare(l.row,l.column),a==1?(a=this.compare(r.row,r.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(r.row,r.column),a==-1?-1:a==1?42:0)},f.prototype.comparePoint=function(g){return this.compare(g.row,g.column)},f.prototype.containsRange=function(g){return this.comparePoint(g.start)==0&&this.comparePoint(g.end)==0},f.prototype.intersects=function(g){var a=this.compareRange(g);return a==-1||a==0||a==1},f.prototype.isEnd=function(g,a){return this.end.row==g&&this.end.column==a},f.prototype.isStart=function(g,a){return this.start.row==g&&this.start.column==a},f.prototype.setStart=function(g,a){typeof g=="object"?(this.start.column=g.column,this.start.row=g.row):(this.start.row=g,this.start.column=a)},f.prototype.setEnd=function(g,a){typeof g=="object"?(this.end.column=g.column,this.end.row=g.row):(this.end.row=g,this.end.column=a)},f.prototype.inside=function(g,a){return this.compare(g,a)==0?!(this.isEnd(g,a)||this.isStart(g,a)):!1},f.prototype.insideStart=function(g,a){return this.compare(g,a)==0?!this.isEnd(g,a):!1},f.prototype.insideEnd=function(g,a){return this.compare(g,a)==0?!this.isStart(g,a):!1},f.prototype.compare=function(g,a){return!this.isMultiLine()&&g===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:g<this.start.row?-1:g>this.end.row?1:this.start.row===g?a>=this.start.column?0:-1:this.end.row===g?a<=this.end.column?0:1:0},f.prototype.compareStart=function(g,a){return this.start.row==g&&this.start.column==a?-1:this.compare(g,a)},f.prototype.compareEnd=function(g,a){return this.end.row==g&&this.end.column==a?1:this.compare(g,a)},f.prototype.compareInside=function(g,a){return this.end.row==g&&this.end.column==a?1:this.start.row==g&&this.start.column==a?-1:this.compare(g,a)},f.prototype.clipRows=function(g,a){if(this.end.row>a)var l={row:a+1,column:0};else if(this.end.row<g)var l={row:g,column:0};if(this.start.row>a)var r={row:a+1,column:0};else if(this.start.row<g)var r={row:g,column:0};return f.fromPoints(r||this.start,l||this.end)},f.prototype.extend=function(g,a){var l=this.compare(g,a);if(l==0)return this;if(l==-1)var r={row:g,column:a};else var n={row:g,column:a};return f.fromPoints(r||this.start,n||this.end)},f.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},f.prototype.isMultiLine=function(){return this.start.row!==this.end.row},f.prototype.clone=function(){return f.fromPoints(this.start,this.end)},f.prototype.collapseRows=function(){return this.end.column==0?new f(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new f(this.start.row,0,this.end.row,0)},f.prototype.toScreenRange=function(g){var a=g.documentToScreenPosition(this.start),l=g.documentToScreenPosition(this.end);return new f(a.row,a.column,l.row,l.column)},f.prototype.moveBy=function(g,a){this.start.row+=g,this.start.column+=a,this.end.row+=g,this.end.column+=a},f}();v.fromPoints=function(f,g){return new v(f.row,f.column,g.row,g.column)},v.comparePoints=function(f,g){return f.row-g.row||f.column-g.column},M.Range=v}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(k,M,F){for(var v=k("./oop"),f={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:"*"}},g={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++)g["Digit"+a]=48+a,g["Numpad"+a]=96+a,f.PRINTABLE_KEYS[48+a]=""+a,f.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var l=String.fromCharCode(a+32);g["Key"+l.toUpperCase()]=a,f.PRINTABLE_KEYS[a]=l}for(var a=1;a<13;a++)g["F"+a]=111+a,f.FUNCTION_KEYS[111+a]="F"+a;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var n in r)g[n]=g[n+"Left"]=g[n+"Right"]=r[n];M.$codeToKeyCode=g,f.PRINTABLE_KEYS[173]="-";for(var i in f.FUNCTION_KEYS){var t=f.FUNCTION_KEYS[i].toLowerCase();f[t]=parseInt(i,10)}for(var i in f.PRINTABLE_KEYS){var t=f.PRINTABLE_KEYS[i].toLowerCase();f[t]=parseInt(i,10)}v.mixin(f,f.MODIFIER_KEYS),v.mixin(f,f.PRINTABLE_KEYS),v.mixin(f,f.FUNCTION_KEYS),f.enter=f.return,f.escape=f.esc,f.del=f.delete,function(){for(var e=["cmd","ctrl","alt","shift"],o=Math.pow(2,e.length);o--;)f.KEY_MODS[o]=e.filter(function(s){return o&f.KEY_MODS[s]}).join("-")+"-"}(),f.KEY_MODS[0]="",f.KEY_MODS[-1]="input-",v.mixin(M,f),M.default=M,M.keyCodeToString=function(e){var o=f[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,M,F){var v=k("./keys"),f=k("./useragent"),g=null,a=0,l;function r(){l=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return l={passive:!1},!0}})}catch{}}function n(){return l==null&&r(),l}function i(y,w,p){this.elem=y,this.type=w,this.callback=p}i.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=M.addListener=function(y,w,p,u){y.addEventListener(w,p,n()),u&&u.$toDestroy.push(new i(y,w,p))},e=M.removeListener=function(y,w,p){y.removeEventListener(w,p,n())};M.stopEvent=function(y){return M.stopPropagation(y),M.preventDefault(y),!1},M.stopPropagation=function(y){y.stopPropagation&&y.stopPropagation()},M.preventDefault=function(y){y.preventDefault&&y.preventDefault()},M.getButton=function(y){return y.type=="dblclick"?0:y.type=="contextmenu"||f.isMac&&y.ctrlKey&&!y.altKey&&!y.shiftKey?2:y.button},M.capture=function(y,w,p){var u=y&&y.ownerDocument||document;function C(_){w&&w(_),p&&p(_),e(u,"mousemove",w),e(u,"mouseup",C),e(u,"dragstart",C)}return t(u,"mousemove",w),t(u,"mouseup",C),t(u,"dragstart",C),C},M.addMouseWheelListener=function(y,w,p){t(y,"wheel",function(u){var C=.15,_=u.deltaX||0,A=u.deltaY||0;switch(u.deltaMode){case u.DOM_DELTA_PIXEL:u.wheelX=_*C,u.wheelY=A*C;break;case u.DOM_DELTA_LINE:var x=15;u.wheelX=_*x,u.wheelY=A*x;break;case u.DOM_DELTA_PAGE:var E=150;u.wheelX=_*E,u.wheelY=A*E;break}w(u)},p)},M.addMultiMouseDownListener=function(y,w,p,u,C){var _=0,A,x,E,S={2:"dblclick",3:"tripleclick",4:"quadclick"};function $(m){if(M.getButton(m)!==0?_=0:m.detail>1?(_++,_>4&&(_=1)):_=1,f.isIE){var d=Math.abs(m.clientX-A)>5||Math.abs(m.clientY-x)>5;(!E||d)&&(_=1),E&&clearTimeout(E),E=setTimeout(function(){E=null},w[_-1]||600),_==1&&(A=m.clientX,x=m.clientY)}if(m._clicks=_,p[u]("mousedown",m),_>4)_=0;else if(_>1)return p[u](S[_],m)}Array.isArray(y)||(y=[y]),y.forEach(function(m){t(m,"mousedown",$,C)})};function o(y){return 0|(y.ctrlKey?1:0)|(y.altKey?2:0)|(y.shiftKey?4:0)|(y.metaKey?8:0)}M.getModifierString=function(y){return v.KEY_MODS[o(y)]};function s(y,w,p){var u=o(w);if(!p&&w.code&&(p=v.$codeToKeyCode[w.code]||p),!f.isMac&&g){if(w.getModifierState&&(w.getModifierState("OS")||w.getModifierState("Win"))&&(u|=8),g.altGr)if((3&u)!=3)g.altGr=0;else return;if(p===18||p===17){var C=w.location;if(p===17&&C===1)g[p]==1&&(a=w.timeStamp);else if(p===18&&u===3&&C===2){var _=w.timeStamp-a;_<50&&(g.altGr=!0)}}}if(p in v.MODIFIER_KEYS&&(p=-1),!(!u&&p===13&&w.location===3&&(y(w,u,-p),w.defaultPrevented))){if(f.isChromeOS&&u&8){if(y(w,u,p),w.defaultPrevented)return;u&=-9}return!u&&!(p in v.FUNCTION_KEYS)&&!(p in v.PRINTABLE_KEYS)?!1:y(w,u,p)}}M.addCommandKeyListener=function(y,w,p){var u=null;t(y,"keydown",function(C){g[C.keyCode]=(g[C.keyCode]||0)+1;var _=s(w,C,C.keyCode);return u=C.defaultPrevented,_},p),t(y,"keypress",function(C){u&&(C.ctrlKey||C.altKey||C.shiftKey||C.metaKey)&&(M.stopEvent(C),u=null)},p),t(y,"keyup",function(C){g[C.keyCode]=null},p),g||(c(),t(window,"focus",c))};function c(){g=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!f.isOldIE){var h=1;M.nextTick=function(y,w){w=w||window;var p="zero-timeout-message-"+h++,u=function(C){C.data==p&&(M.stopPropagation(C),e(w,"message",u),y())};t(w,"message",u),w.postMessage(p,"*")}}M.$idleBlocked=!1,M.onIdle=function(y,w){return setTimeout(function p(){M.$idleBlocked?setTimeout(p,100):y()},w)},M.$idleBlockId=null,M.blockIdle=function(y){M.$idleBlockId&&clearTimeout(M.$idleBlockId),M.$idleBlocked=!0,M.$idleBlockId=setTimeout(function(){M.$idleBlocked=!1},y||100)},M.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),M.nextFrame?M.nextFrame=M.nextFrame.bind(window):M.nextFrame=function(y){setTimeout(y,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(k,M,F){var v;F.exports={lineMode:!1,pasteCancelled:function(){return v&&v>Date.now()-50?!0:v=!1},cancel:function(){v=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,M,F){var v=k("../lib/event"),f=k("../config").nls,g=k("../lib/useragent"),a=k("../lib/dom"),l=k("../lib/lang"),r=k("../clipboard"),n=g.isChrome<18,i=g.isIE,t=g.isChrome>63,e=400,o=k("../lib/keys"),s=o.KEY_MODS,c=g.isIOS,h=c?/\s/:/\n/,y=g.isMobile,w=function(){function p(u,C){var _=this;this.host=C,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",u.insertBefore(this.text,u.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",y||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),v.addListener(this.text,"blur",function(A){_.ignoreFocusEvents||(C.onBlur(A),_.$isFocused=!1)},C),v.addListener(this.text,"focus",function(A){if(!_.ignoreFocusEvents){if(_.$isFocused=!0,g.isEdge)try{if(!document.hasFocus())return}catch{}C.onFocus(A),g.isEdge?setTimeout(_.resetSelection.bind(_)):_.resetSelection()}},C),this.$focusScroll=!1,C.on("beforeEndOperation",function(){var A=C.curOp,x=A&&A.command&&A.command.name;if(x!="insertstring"){var E=x&&(A.docChanged||A.selectionChanged);_.inComposition&&E&&(_.lastValue=_.text.value="",_.onCompositionEnd()),_.resetSelection()}}),C.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=c?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&C.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,v.addCommandKeyListener(this.text,function(A,x,E){if(!_.inComposition)return C.onCommandKey(A,x,E)},C),v.addListener(this.text,"select",this.onSelect.bind(this),C),v.addListener(this.text,"input",this.onInput.bind(this),C),v.addListener(this.text,"cut",this.onCut.bind(this),C),v.addListener(this.text,"copy",this.onCopy.bind(this),C),v.addListener(this.text,"paste",this.onPaste.bind(this),C),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&v.addListener(u,"keydown",function(A){if(!(g.isMac&&!A.metaKey||!A.ctrlKey))switch(A.keyCode){case 67:_.onCopy(A);break;case 86:_.onPaste(A);break;case 88:_.onCut(A);break}},C),this.syncComposition=l.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),v.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),C),v.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),C),v.addListener(this.text,"keyup",this.onKeyup.bind(this),C),v.addListener(this.text,"keydown",this.syncComposition.bind(this),C),v.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),C),this.closeTimeout,v.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),C),v.addListener(this.text,"mousedown",function(A){A.preventDefault(),_.onContextMenuClose()},C),v.addListener(C.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),C),v.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),C),c&&this.addIosSelectionHandler(u,C,this.text)}return p.prototype.addIosSelectionHandler=function(u,C,_){var A=this,x=null,E=!1;_.addEventListener("keydown",function($){x&&clearTimeout(x),E=!0},!0),_.addEventListener("keyup",function($){x=setTimeout(function(){E=!1},100)},!0);var S=function($){if(document.activeElement===_&&!(E||A.inComposition||C.$mouseHandler.isMousePressed)&&!A.copied){var m=_.selectionStart,d=_.selectionEnd,b=null,L=0;if(m==0?b=o.up:m==1?b=o.home:d>A.lastSelectionEnd&&A.lastValue[d]==`
177
+ `?b=o.end:m<A.lastSelectionStart&&A.lastValue[m-1]==" "?(b=o.left,L=s.option):m<A.lastSelectionStart||m==A.lastSelectionStart&&A.lastSelectionEnd!=A.lastSelectionStart&&m==d?b=o.left:d>A.lastSelectionEnd&&A.lastValue.slice(0,d).split(`
178
+ `).length>2?b=o.down:d>A.lastSelectionEnd&&A.lastValue[d-1]==" "?(b=o.right,L=s.option):(d>A.lastSelectionEnd||d==A.lastSelectionEnd&&A.lastSelectionEnd!=A.lastSelectionStart&&m==d)&&(b=o.right),m!==d&&(L|=s.shift),b){var T=C.onCommandKey({},L,b);if(!T&&C.commands){b=o.keyCodeToString(b);var R=C.commands.findKeyCommand(L,b);R&&C.execCommand(R)}A.lastSelectionStart=m,A.lastSelectionEnd=d,A.resetSelection("")}}};document.addEventListener("selectionchange",S),C.on("destroy",function(){document.removeEventListener("selectionchange",S)})},p.prototype.onContextMenuClose=function(){var u=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){u.tempStyle&&(u.text.style.cssText=u.tempStyle,u.tempStyle=""),u.host.renderer.$isMousePressed=!1,u.host.renderer.$keepTextAreaAtCursor&&u.host.renderer.$moveTextAreaToCursor()},0)},p.prototype.$onContextMenu=function(u){this.host.textInput.onContextMenu(u),this.onContextMenuClose()},p.prototype.onKeyup=function(u){u.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},p.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},p.prototype.onCompositionStart=function(u){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){u.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var C=this.host.getSelectionRange();C.end.row=C.start.row,C.end.column=C.start.column,this.inComposition.markerRange=C,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},p.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var u=this.text.value;this.sendText(u),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},p.prototype.onCompositionEnd=function(u){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),u&&this.onInput())},p.prototype.onCut=function(u){this.doCopy(u,!0)},p.prototype.onCopy=function(u){this.doCopy(u,!1)},p.prototype.onPaste=function(u){var C=this.handleClipboardData(u);r.pasteCancelled()||(typeof C=="string"?(C&&this.host.onPaste(C,u),g.isIE&&setTimeout(this.resetSelection),v.preventDefault(u)):(this.text.value="",this.pasted=!0))},p.prototype.doCopy=function(u,C){var _=this,A=this.host.getCopyText();if(!A)return v.preventDefault(u);this.handleClipboardData(u,A)?(c&&(this.resetSelection(A),this.copied=A,setTimeout(function(){_.copied=!1},10)),C?this.host.onCut():this.host.onCopy(),v.preventDefault(u)):(this.copied=!0,this.text.value=A,this.text.select(),setTimeout(function(){_.copied=!1,_.resetSelection(),C?_.host.onCut():_.host.onCopy()}))},p.prototype.handleClipboardData=function(u,C,_){var A=u.clipboardData||window.clipboardData;if(!(!A||n)){var x=i||_?"Text":"text/plain";try{return C?A.setData(x,C)!==!1:A.getData(x)}catch(E){if(!_)return this.handleClipboardData(E,C,!0)}}},p.prototype.onInput=function(u){if(this.inComposition)return this.onCompositionUpdate();if(u&&u.inputType){if(u.inputType=="historyUndo")return this.host.execCommand("undo");if(u.inputType=="historyRedo")return this.host.execCommand("redo")}var C=this.text.value,_=this.sendText(C,!0);(C.length>e+100||h.test(_)||y&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},p.prototype.sendText=function(u,C){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),u&&this.host.onPaste(u),this.pasted=!1,"";for(var _=this.text.selectionStart,A=this.text.selectionEnd,x=this.lastSelectionStart,E=this.lastValue.length-this.lastSelectionEnd,S=u,$=u.length-_,m=u.length-A,d=0;x>0&&this.lastValue[d]==u[d];)d++,x--;for(S=S.slice(d),d=1;E>0&&this.lastValue.length-d>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-d]==u[u.length-d];)d++,E--;$-=d-1,m-=d-1;var b=S.length-d+1;if(b<0&&(x=-b,b=0),S=S.slice(0,b),!C&&!S&&!$&&!x&&!E&&!m)return"";this.sendingText=!0;var L=!1;return g.isAndroid&&S==". "&&(S=" ",L=!0),S&&!x&&!E&&!$&&!m||this.commandMode?this.host.onTextInput(S):this.host.onTextInput(S,{extendLeft:x,extendRight:E,restoreStart:$,restoreEnd:m}),this.sendingText=!1,this.lastValue=u,this.lastSelectionStart=_,this.lastSelectionEnd=A,this.lastRestoreEnd=m,L?`
179
+ `:S},p.prototype.onSelect=function(u){var C=this;if(!this.inComposition){var _=function(A){return A.selectionStart===0&&A.selectionEnd>=C.lastValue.length&&A.value===C.lastValue&&C.lastValue&&A.selectionEnd!==C.lastSelectionEnd};this.copied?this.copied=!1:_(this.text)?(this.host.selectAll(),this.resetSelection()):y&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},p.prototype.$resetSelectionIOS=function(u){if(!(!this.$isFocused||this.copied&&!u||this.sendingText)){u||(u="");var C=`
180
+ ab`+u+`cde fg
181
+ `;C!=this.text.value&&(this.text.value=this.lastValue=C);var _=4,A=4+(u.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=_||this.lastSelectionEnd!=A)&&this.text.setSelectionRange(_,A),this.lastSelectionStart=_,this.lastSelectionEnd=A}},p.prototype.$resetSelection=function(){var u=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var C=0,_=0,A="",x=function(R,I){for(var D=I,z=1;z<=R-u.rowStart&&z<2*u.numberOfExtraLines+1;z++)D+=u.host.session.getLine(R-z).length+1;return D};if(this.host.session){var E=this.host.selection,S=E.getRange(),$=E.cursor.row;$===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):$===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):($<this.rowStart-1||$>this.rowEnd+1)&&(this.rowStart=$>this.numberOfExtraLines?$-this.numberOfExtraLines:0,this.rowEnd=$>this.numberOfExtraLines?$+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var m=[],d=this.rowStart;d<=this.rowEnd;d++)m.push(this.host.session.getLine(d));if(A=m.join(`
182
+ `),C=x(S.start.row,S.start.column),_=x(S.end.row,S.end.column),S.start.row<this.rowStart){var b=this.host.session.getLine(this.rowStart-1);C=S.start.row<this.rowStart-1?0:C,_+=b.length+1,A=b+`
183
+ `+A}else if(S.end.row>this.rowEnd){var L=this.host.session.getLine(this.rowEnd+1);_=S.end.row>this.rowEnd+1?L.length:S.end.column,_+=A.length+1,A=A+`
184
+ `+L}else y&&$>0&&(A=`
185
+ `+A,_+=1,C+=1);A.length>e&&(C<e&&_<e?A=A.slice(0,e):(A=`
186
+ `,C==_?C=_=0:(C=0,_=1)));var T=A+`
187
+
188
+ `;T!=this.lastValue&&(this.text.value=this.lastValue=T,this.lastSelectionStart=this.lastSelectionEnd=T.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=_||this.lastSelectionStart!=C||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(C,_),this.lastSelectionStart=C,this.lastSelectionEnd=_}catch{}this.inComposition=!1}},p.prototype.setHost=function(u){this.host=u},p.prototype.setNumberOfExtraLines=function(u){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,u<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=u},p.prototype.setAriaLabel=function(){var u="";if(this.host.$textInputAriaLabel&&(u+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var C=this.host.session.selection.cursor.row;u+=f("text-input.aria-label","Cursor at row $0",[C+1])}this.text.setAttribute("aria-label",u)},p.prototype.setAriaOptions=function(u){u.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",u.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",u.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),u.role&&this.text.setAttribute("role",u.role),u.setLabel&&(this.text.setAttribute("aria-roledescription",f("text-input.aria-roledescription","editor")),this.setAriaLabel())},p.prototype.focus=function(){var u=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||t||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var C=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var _=this.text.getBoundingClientRect().top!=0}catch{return}var A=[];if(_)for(var x=this.text.parentElement;x&&x.nodeType==1;)A.push(x),x.setAttribute("ace_nocontext","true"),!x.parentElement&&x.getRootNode?x=x.getRootNode().host:x=x.parentElement;this.text.focus({preventScroll:!0}),_&&A.forEach(function(E){E.removeAttribute("ace_nocontext")}),setTimeout(function(){u.text.style.position="",u.text.style.top=="0px"&&(u.text.style.top=C)},0)},p.prototype.blur=function(){this.text.blur()},p.prototype.isFocused=function(){return this.$isFocused},p.prototype.setInputHandler=function(u){this.inputHandler=u},p.prototype.getInputHandler=function(){return this.inputHandler},p.prototype.getElement=function(){return this.text},p.prototype.setCommandMode=function(u){this.commandMode=u,this.text.readOnly=!1},p.prototype.setReadOnly=function(u){this.commandMode||(this.text.readOnly=u)},p.prototype.setCopyWithEmptySelection=function(u){},p.prototype.onContextMenu=function(u){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:u}),this.moveToMouse(u,!0)},p.prototype.moveToMouse=function(u,C){var _=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(C?"z-index:100000;":"")+(g.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var A=this.host.container.getBoundingClientRect(),x=a.computedStyle(this.host.container),E=A.top+(parseInt(x.borderTopWidth)||0),S=A.left+(parseInt(x.borderLeftWidth)||0),$=A.bottom-E-this.text.clientHeight-2,m=function(d){a.translate(_.text,d.clientX-S-2,Math.min(d.clientY-E-2,$))};m(u),u.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),g.isWin&&v.capture(this.host.container,m,this.onContextMenuClose.bind(this)))},p.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},p}();M.TextInput=w,M.$setUserAgentForTests=function(p,u){y=p,c=u}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(k,M,F){var v=k("../lib/useragent"),f=0,g=550,a=function(){function n(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 n.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(),h=c.isEmpty();(h||s==1)&&o.selection.moveToPosition(e),s==2&&(o.textInput.onContextMenu(i.domEvent),v.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()},n.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"))},n.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=r(this.$clickSelection,e);e=s.cursor,i=s.anchor}t.selection.setSelectionAnchor(i.row,i.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},n.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),h=this.$clickSelection.comparePoint(s.end);if(c==-1&&h<=0)t=this.$clickSelection.end,(s.end.row!=o.row||s.end.column!=o.column)&&(o=s.start);else if(h==1&&c>=0)t=this.$clickSelection.start,(s.start.row!=o.row||s.start.column!=o.column)&&(o=s.end);else if(c==-1&&h==1)o=s.end,t=s.start;else{var y=r(this.$clickSelection,o);o=y.cursor,t=y.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(o),e.renderer.scrollCursorIntoView()},n.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},n.prototype.focusWait=function(){var i=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(i>f||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},n.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()},n.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()},n.prototype.onQuadClick=function(i){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},n.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,h=s?i.wheelY/s:e.vy;s<g&&(c=(c+e.vx)/2,h=(h+e.vy)/2);var y=Math.abs(c/h),w=!1;if(y>=1&&t.renderer.isScrollableBy(i.wheelX*i.speed,0)&&(w=!0),y<=1&&t.renderer.isScrollableBy(0,i.wheelY*i.speed)&&(w=!0),w)e.allowed=o;else if(o-e.allowed<g){var p=Math.abs(c)<=1.5*Math.abs(e.vx)&&Math.abs(h)<=1.5*Math.abs(e.vy);p?(w=!0,e.allowed=o):e.allowed=0}if(e.t=o,e.vx=c,e.vy=h,w)return t.renderer.scrollBy(i.wheelX*i.speed,i.wheelY*i.speed),i.stop()}},n}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,M.DefaultHandlers=a;function l(n,i,t,e){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-i,2))}function r(n,i){if(n.start.row==n.end.row)var t=2*i.column-n.start.column-n.end.column;else if(n.start.row==n.end.row-1&&!n.start.column&&!n.end.column)var t=i.column-4;else var t=2*i.row-n.start.row-n.end.row;return t<0?{cursor:n.start,anchor:n.end}:{cursor:n.end,anchor:n.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(k,M,F){M.preventParentScroll=function(f){f.stopPropagation();var g=f.currentTarget,a=g.scrollHeight>g.clientHeight;a||f.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(k,M,F){var v=this&&this.__extends||function(){var o=function(s,c){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,y){h.__proto__=y}||function(h,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(h[w]=y[w])},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 h(){this.constructor=s}s.prototype=c===null?Object.create(c):(h.prototype=c.prototype,new h)}}(),f=this&&this.__values||function(o){var s=typeof Symbol=="function"&&Symbol.iterator,c=s&&o[s],h=0;if(c)return c.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&h>=o.length&&(o=void 0),{value:o&&o[h++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},g=k("./lib/dom");k("./lib/event");var a=k("./range").Range,l=k("./lib/scroll").preventParentScroll,r="ace_tooltip",n=function(){function o(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return o.prototype.$init=function(){return this.$element=g.createElement("div"),this.$element.className=r,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){var h=this.getElement(),y=h.offsetParent&&h.offsetParent.getBoundingClientRect();h.style.left=s-(y?y.left:0)+"px",h.style.top=c-(y?y.top:0)+"px"},o.prototype.setClassName=function(s){g.addCssClass(this.getElement(),s)},o.prototype.setTheme=function(s){this.$element.className=r+" "+(s.isDark?"ace_dark ":"")+(s.cssClass||"")},o.prototype.show=function(s,c,h){s!=null&&this.setText(s),c!=null&&h!=null&&this.setPosition(c,h),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=r,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,h,y;this.popups.sort(function(S,$){return $.priority-S.priority});var w=[];try{for(var p=f(this.popups),u=p.next();!u.done;u=p.next()){var C=u.value,_=!0;try{for(var A=(h=void 0,f(w)),x=A.next();!x.done;x=A.next()){var E=x.value;if(this.doPopupsOverlap(E,C)){_=!1;break}}}catch(S){h={error:S}}finally{try{x&&!x.done&&(y=A.return)&&y.call(A)}finally{if(h)throw h.error}}_?w.push(C):C.hide()}}catch(S){s={error:S}}finally{try{u&&!u.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}},o.prototype.doPopupsOverlap=function(s,c){var h=s.getElement().getBoundingClientRect(),y=c.getElement().getBoundingClientRect();return h.left<y.right&&h.right>y.left&&h.top<y.bottom&&h.bottom>y.top},o}(),t=new i;M.popupManager=t,M.Tooltip=n;var e=function(o){v(s,o);function s(c){c===void 0&&(c=document.body);var h=o.call(this,c)||this;h.timeout=void 0,h.lastT=0,h.idleTime=350,h.lastEvent=void 0,h.onMouseOut=h.onMouseOut.bind(h),h.onMouseMove=h.onMouseMove.bind(h),h.waitForHover=h.waitForHover.bind(h),h.hide=h.hide.bind(h);var y=h.getElement();return y.style.whiteSpace="pre-wrap",y.style.pointerEvents="auto",y.addEventListener("mouseout",h.onMouseOut),y.tabIndex=-1,y.addEventListener("blur",(function(){y.contains(document.activeElement)||this.hide()}).bind(h)),y.addEventListener("wheel",l),h}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,h){this.lastEvent=c,this.lastT=Date.now();var y=h.$mouseHandler.isMousePressed;if(this.isOpen){var w=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(w.row,w.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 h=c.editor,y=c.getDocumentPosition(),w=h.session.getLine(y.row);if(y.column==w.length){var p=h.renderer.pixelToScreenCoordinates(c.clientX,c.clientY),u=h.session.documentToScreenPosition(y.row,y.column);if(u.column!=p.column||u.row!=p.row)return!0}return!1},s.prototype.setDataProvider=function(c){this.$gatherData=c},s.prototype.showForRange=function(c,h,y,w){var p=10;if(!(w&&w!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var u=c.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(u.theme)),this.isOpen=!0,this.addMarker(h,c.session),this.range=a.fromPoints(h.start,h.end);var C=u.textToScreenCoordinates(h.start.row,h.start.column),_=u.scroller.getBoundingClientRect();C.pageX<_.left&&(C.pageX=_.left);var A=this.getElement();A.innerHTML="",A.appendChild(y),A.style.maxHeight="",A.style.display="block";var x=A.clientHeight,E=A.clientWidth,S=window.innerHeight-C.pageY-u.lineHeight,$=!0;C.pageY-x<0&&C.pageY<S&&($=!1),A.style.maxHeight=($?C.pageY:S)-p+"px",A.style.top=$?"":C.pageY+u.lineHeight+"px",A.style.bottom=$?window.innerHeight-C.pageY+"px":"",A.style.left=Math.min(C.pageX,window.innerWidth-E-p)+"px"}},s.prototype.addMarker=function(c,h){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=h,this.marker=h&&h.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}(n);M.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(k,M,F){var v=this&&this.__extends||function(){var o=function(s,c){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,y){h.__proto__=y}||function(h,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(h[w]=y[w])},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 h(){this.constructor=s}s.prototype=c===null?Object.create(c):(h.prototype=c.prototype,new h)}}(),f=this&&this.__values||function(o){var s=typeof Symbol=="function"&&Symbol.iterator,c=s&&o[s],h=0;if(c)return c.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&h>=o.length&&(o=void 0),{value:o&&o[h++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},g=k("../lib/dom"),a=k("../lib/event"),l=k("../tooltip").Tooltip,r=k("../config").nls,n=5,i=3;M.GUTTER_TOOLTIP_LEFT_OFFSET=n,M.GUTTER_TOOLTIP_TOP_OFFSET=i;function t(o){var s=o.editor,c=s.renderer.$gutterLayer,h=new e(s,!0);o.editor.setDefaultHandler("guttermousedown",function(_){if(!(!s.isFocused()||_.getButton()!=0)){var A=c.getRegion(_);if(A!="foldWidgets"){var x=_.getDocumentPosition().row,E=s.session.selection;if(_.getShiftKey())E.selectTo(x,0);else{if(_.domEvent.detail==2)return s.selectAll(),_.preventDefault();o.$clickSelection=s.selection.getLineRange(x)}return o.setState("selectByLines"),o.captureMouse(_),_.preventDefault()}}});var y,w;function p(){var _=w.getDocumentPosition().row,A=s.session.getLength();if(_==A){var x=s.renderer.pixelToScreenCoordinates(0,w.y).row,E=w.$pos;if(x>s.session.documentToScreenRow(E.row,E.column))return u()}if(h.showTooltip(_),!!h.isOpen)if(s.on("mousewheel",u),s.on("changeSession",u),window.addEventListener("keydown",u,!0),o.$tooltipFollowsMouse)C(w);else{var S=w.getGutterRow(),$=c.$lines.get(S);if($){var m=$.element.querySelector(".ace_gutter_annotation"),d=m.getBoundingClientRect(),b=h.getElement().style;b.left=d.right-n+"px",b.top=d.bottom-i+"px"}else C(w)}}function u(_){_&&_.type==="keydown"&&(_.ctrlKey||_.metaKey)||_&&_.type==="mouseout"&&(!_.relatedTarget||h.getElement().contains(_.relatedTarget))||(y&&(y=clearTimeout(y)),h.isOpen&&(h.hideTooltip(),s.off("mousewheel",u),s.off("changeSession",u),window.removeEventListener("keydown",u,!0)))}function C(_){h.setPosition(_.x,_.y)}o.editor.setDefaultHandler("guttermousemove",function(_){var A=_.domEvent.target||_.domEvent.srcElement;if(g.hasCssClass(A,"ace_fold-widget")||g.hasCssClass(A,"ace_custom-widget"))return u();h.isOpen&&o.$tooltipFollowsMouse&&C(_),w=_,!y&&(y=setTimeout(function(){y=null,w&&!o.isMousePressed&&p()},50))}),a.addListener(s.renderer.$gutter,"mouseout",function(_){w=null,h.isOpen&&(y=setTimeout(function(){y=null,u(_)},50))},s)}M.GutterHandler=t;var e=function(o){v(s,o);function s(c,h){h===void 0&&(h=!1);var y=o.call(this,c.container)||this;y.id="gt"+ ++s.$uid,y.editor=c,y.visibleTooltipRow;var w=y.getElement();return w.setAttribute("role","tooltip"),w.setAttribute("id",y.id),w.style.pointerEvents="auto",h&&(y.onMouseOut=y.onMouseOut.bind(y),w.addEventListener("mouseout",y.onMouseOut)),y}return s.prototype.onMouseOut=function(c){this.isOpen&&(!c.relatedTarget||this.getElement().contains(c.relatedTarget)||c&&c.currentTarget.contains(c.relatedTarget)||this.hideTooltip())},s.prototype.setPosition=function(c,h){var y=window.innerWidth||document.documentElement.clientWidth,w=window.innerHeight||document.documentElement.clientHeight,p=this.getWidth(),u=this.getHeight();c+=15,h+=15,c+p>y&&(c-=c+p-y),h+u>w&&(h-=20+u),l.prototype.setPosition.call(this,c,h)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(c){var h,y=this.editor.renderer.$gutterLayer,w=y.$annotations[c],p;w?p={displayText:Array.from(w.displayText),type:Array.from(w.type)}:p={displayText:[],type:[]};var u=y.session.getFoldLine(c);if(u&&y.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},_={error:1,security:2,warning:3,info:4,hint:5},A,x=c+1;x<=u.end.row;x++)if(y.$annotations[x])for(var E=0;E<y.$annotations[x].text.length;E++){var S=y.$annotations[x].type[E];C[S].push(y.$annotations[x].text[E]),(!A||_[S]<_[A])&&(A=S)}if(["error","security","warning"].includes(A)){var $="".concat(s.annotationsToSummaryString(C)," in folded code.");p.displayText.push($),p.type.push(A+"_fold")}}if(p.displayText.length===0)return this.hideTooltip();for(var m={error:[],security:[],warning:[],info:[],hint:[]},d=y.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",x=0;x<p.displayText.length;x++){var b=g.createElement("span"),L=g.createElement("span");(h=L.classList).add.apply(h,["ace_".concat(p.type[x]),d]),L.setAttribute("aria-label","".concat(s.annotationLabels[p.type[x].replace("_fold","")].singular)),L.setAttribute("role","img"),L.appendChild(g.createTextNode(" ")),b.appendChild(L),b.appendChild(g.createTextNode(p.displayText[x])),b.appendChild(g.createElement("br")),m[p.type[x].replace("_fold","")].push(b)}var T=this.getElement();g.removeChildren(T),m.error.forEach(function(I){return T.appendChild(I)}),m.security.forEach(function(I){return T.appendChild(I)}),m.warning.forEach(function(I){return T.appendChild(I)}),m.info.forEach(function(I){return T.appendChild(I)}),m.hint.forEach(function(I){return T.appendChild(I)}),T.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var R=this.$findLinkedAnnotationNode(c);R&&R.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=c,this.editor._signal("showGutterTooltip",this)},s.prototype.$findLinkedAnnotationNode=function(c){var h=this.$findCellByRow(c);if(h){var y=h.element;if(y.childNodes.length>2)return y.childNodes[2]}},s.prototype.$findCellByRow=function(c){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(h){return h.row===c})},s.prototype.hideTooltip=function(){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow!=null){var c=this.$findLinkedAnnotationNode(this.visibleTooltipRow);c&&c.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this)}},s.annotationsToSummaryString=function(c){var h,y,w=[],p=["error","security","warning","info","hint"];try{for(var u=f(p),C=u.next();!C.done;C=u.next()){var _=C.value;if(c[_].length){var A=c[_].length===1?s.annotationLabels[_].singular:s.annotationLabels[_].plural;w.push("".concat(c[_].length," ").concat(A))}}}catch(x){h={error:x}}finally{try{C&&!C.done&&(y=u.return)&&y.call(u)}finally{if(h)throw h.error}}return w.join(", ")},s}(l);e.$uid=0,M.GutterTooltip=e}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(k,M,F){var v=k("../lib/event"),f=k("../lib/useragent"),g=function(){function a(l,r){this.speed,this.wheelX,this.wheelY,this.domEvent=l,this.editor=r,this.x=this.clientX=l.clientX,this.y=this.clientY=l.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){v.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){v.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 l=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(l,0),n=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-n},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var l=this.editor,r=l.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=r.contains(n.row,n.column)}return this.$inSelection},a.prototype.getButton=function(){return v.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return f.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();M.MouseEvent=g}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(k,M,F){var v=k("../lib/dom"),f=k("../lib/event"),g=k("../lib/useragent"),a=200,l=200,r=5;function n(t){var e=t.editor,o=v.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(N){t[N]=this[N]},this),e.on("mousedown",this.onMouseDown.bind(t));var c=e.container,h,y,w,p,u,C,_=0,A,x,E,S,$;this.onDragStart=function(N){if(this.cancelDrag||!c.draggable){var B=this;return setTimeout(function(){B.startSelect(),B.captureMouse(N)},0),N.preventDefault()}u=e.getSelectionRange();var W=N.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()),x=!0,this.setState("drag")},this.onDragEnd=function(N){if(c.draggable=!1,x=!1,this.setState(null),!e.getReadOnly()){var B=N.dataTransfer.dropEffect;!A&&B=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(N){if(!(e.getReadOnly()||!D(N.dataTransfer)))return y=N.clientX,w=N.clientY,h||L(),_++,N.dataTransfer.dropEffect=A=z(N),f.preventDefault(N)},this.onDragOver=function(N){if(!(e.getReadOnly()||!D(N.dataTransfer)))return y=N.clientX,w=N.clientY,h||(L(),_++),R!==null&&(R=null),N.dataTransfer.dropEffect=A=z(N),f.preventDefault(N)},this.onDragLeave=function(N){if(_--,_<=0&&h)return T(),A=null,f.preventDefault(N)},this.onDrop=function(N){if(C){var B=N.dataTransfer;if(x)switch(A){case"move":u.contains(C.row,C.column)?u={start:C,end:C}:u=e.moveText(u,C);break;case"copy":u=e.moveText(u,C,!0);break}else{var W=B.getData("Text");u={start:C,end:e.session.insert(C,W)},e.focus(),A=null}return T(),f.preventDefault(N)}},f.addListener(c,"dragstart",this.onDragStart.bind(t),e),f.addListener(c,"dragend",this.onDragEnd.bind(t),e),f.addListener(c,"dragenter",this.onDragEnter.bind(t),e),f.addListener(c,"dragover",this.onDragOver.bind(t),e),f.addListener(c,"dragleave",this.onDragLeave.bind(t),e),f.addListener(c,"drop",this.onDrop.bind(t),e);function m(N,B){var W=Date.now(),j=!B||N.row!=B.row,G=!B||N.column!=B.column;if(!S||j||G)e.moveCursorToPosition(N),S=W,$={x:y,y:w};else{var V=i($.x,$.y,y,w);V>r?S=null:W-S>=l&&(e.renderer.scrollCursorIntoView(),S=null)}}function d(N,B){var W=Date.now(),j=e.renderer.layerConfig.lineHeight,G=e.renderer.layerConfig.characterWidth,V=e.renderer.scroller.getBoundingClientRect(),X={x:{left:y-V.left,right:V.right-y},y:{top:w-V.top,bottom:V.bottom-w}},Y=Math.min(X.x.left,X.x.right),J=Math.min(X.y.top,X.y.bottom),ne={row:N.row,column:N.column};Y/G<=2&&(ne.column+=X.x.left<X.x.right?-3:2),J/j<=1&&(ne.row+=X.y.top<X.y.bottom?-1:1);var se=N.row!=ne.row,ae=N.column!=ne.column,re=!B||N.row!=B.row;se||ae&&!re?E?W-E>=a&&e.renderer.scrollCursorIntoView(ne):E=W:E=null}function b(){var N=C;C=e.renderer.screenToTextCoordinates(y,w),m(C,N),d(C,N)}function L(){u=e.selection.toOrientedRange(),h=e.session.addMarker(u,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(p),b(),p=setInterval(b,20),_=0,f.addListener(document,"mousemove",I)}function T(){clearInterval(p),e.session.removeMarker(h),h=null,e.selection.fromOrientedRange(u),e.isFocused()&&!x&&e.$resetCursorStyle(),u=null,C=null,_=0,E=null,S=null,f.removeListener(document,"mousemove",I)}var R=null;function I(){R==null&&(R=setTimeout(function(){R!=null&&h&&T()},20))}function D(N){var B=N.types;return!B||Array.prototype.some.call(B,function(W){return W=="text/plain"||W=="Text"})}function z(N){var B=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],j=g.isMac?N.altKey:N.ctrlKey,G="uninitialized";try{G=N.dataTransfer.effectAllowed.toLowerCase()}catch{}var V="none";return j&&B.indexOf(G)>=0?V="copy":W.indexOf(G)>=0?V="move":B.indexOf(G)>=0&&(V="copy"),V}}(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=g.isWin?"default":"move";t.renderer.setCursorStyle(o),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(g.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 h=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in h&&(h.unselectable="on"),e.getDragDelay()){if(g.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(n.prototype);function i(t,e,o,s){return Math.sqrt(Math.pow(o-t,2)+Math.pow(s-e,2))}M.DragdropHandler=n}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(k,M,F){var v=k("./mouse_event").MouseEvent,f=k("../lib/event"),g=k("../lib/dom");M.addTouchListeners=function(a,l){var r="scroll",n,i,t,e,o,s,c=0,h,y=0,w=0,p=0,u,C;function _(){var m=window.navigator&&window.navigator.clipboard,d=!1,b=function(){var R=l.getCopyText(),I=l.session.getUndoManager().hasUndo();C.replaceChild(g.buildDom(d?["span",!R&&L("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&L("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&L("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],m&&L("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&L("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],L("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],L("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),C.firstChild)},L=function(R){return l.commands.canExecute(R,l)},T=function(R){var I=R.target.getAttribute("action");if(I=="more"||!d)return d=!d,b();I=="paste"?m.readText().then(function(D){l.execCommand(I,D)}):I&&((I=="cut"||I=="copy")&&(m?m.writeText(l.getCopyText()):document.execCommand("copy")),l.execCommand(I)),C.firstChild.style.display="none",d=!1,I!="openCommandPalette"&&l.focus()};C=g.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(R){r="menu",R.stopPropagation(),R.preventDefault(),l.textInput.focus()},ontouchend:function(R){R.stopPropagation(),R.preventDefault(),T(R)},onclick:T},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],l.container)}function A(){if(!l.getOption("enableMobileMenu")){C&&x();return}C||_();var m=l.selection.cursor,d=l.renderer.textToScreenCoordinates(m.row,m.column),b=l.renderer.textToScreenCoordinates(0,0).pageX,L=l.renderer.scrollLeft,T=l.container.getBoundingClientRect();C.style.top=d.pageY-T.top-3+"px",d.pageX-T.left<T.width-70?(C.style.left="",C.style.right="10px"):(C.style.right="",C.style.left=b+L-T.left+"px"),C.style.display="",C.firstChild.style.display="none",l.on("input",x)}function x(m){C&&(C.style.display="none"),l.off("input",x)}function E(){o=null,clearTimeout(o);var m=l.selection.getRange(),d=m.contains(h.row,h.column);(m.isEmpty()||!d)&&(l.selection.moveToPosition(h),l.selection.selectWord()),r="wait",A()}function S(){o=null,clearTimeout(o),l.selection.moveToPosition(h);var m=y>=2?l.selection.getLineRange(h.row):l.session.getBracketRange(h);m&&!m.isEmpty()?l.selection.setRange(m):l.selection.selectWord(),r="wait"}f.addListener(a,"contextmenu",function(m){if(u){var d=l.textInput.getElement();d.focus()}},l),f.addListener(a,"touchstart",function(m){var d=m.touches;if(o||d.length>1){clearTimeout(o),o=null,t=-1,r="zoom";return}u=l.$mouseHandler.isMousePressed=!0;var b=l.renderer.layerConfig.lineHeight,L=l.renderer.layerConfig.lineHeight,T=m.timeStamp;e=T;var R=d[0],I=R.clientX,D=R.clientY;Math.abs(n-I)+Math.abs(i-D)>b&&(t=-1),n=m.clientX=I,i=m.clientY=D,w=p=0;var z=new v(m,l);if(h=z.getDocumentPosition(),T-t<500&&d.length==1&&!c)y++,m.preventDefault(),m.button=0,S();else{y=0;var N=l.selection.cursor,B=l.selection.isEmpty()?N:l.selection.anchor,W=l.renderer.$cursorLayer.getPixelPosition(N,!0),j=l.renderer.$cursorLayer.getPixelPosition(B,!0),G=l.renderer.scroller.getBoundingClientRect(),V=l.renderer.layerConfig.offset,X=l.renderer.scrollLeft,Y=function(se,ae){return se=se/L,ae=ae/b-.75,se*se+ae*ae};if(m.clientX<G.left){r="zoom";return}var J=Y(m.clientX-G.left-W.left+X,m.clientY-G.top-W.top+V),ne=Y(m.clientX-G.left-j.left+X,m.clientY-G.top-j.top+V);J<3.5&&ne<3.5&&(r=J>ne?"cursor":"anchor"),ne<3.5?r="anchor":J<3.5?r="cursor":r="scroll",o=setTimeout(E,450)}t=T},l),f.addListener(a,"touchend",function(m){u=l.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),r=="zoom"?(r="",c=0):o?(l.selection.moveToPosition(h),c=0,A()):r=="scroll"?($(),x()):A(),clearTimeout(o),o=null},l),f.addListener(a,"touchmove",function(m){o&&(clearTimeout(o),o=null);var d=m.touches;if(!(d.length>1||r=="zoom")){var b=d[0],L=n-b.clientX,T=i-b.clientY;if(r=="wait")if(L*L+T*T>4)r="cursor";else return m.preventDefault();n=b.clientX,i=b.clientY,m.clientX=b.clientX,m.clientY=b.clientY;var R=m.timeStamp,I=R-e;if(e=R,r=="scroll"){var D=new v(m,l);D.speed=1,D.wheelX=L,D.wheelY=T,10*Math.abs(L)<Math.abs(T)&&(L=0),10*Math.abs(T)<Math.abs(L)&&(T=0),I!=0&&(w=L/I,p=T/I),l._emit("mousewheel",D),D.propagationStopped||(w=p=0)}else{var z=new v(m,l),N=z.getDocumentPosition();r=="cursor"?l.selection.moveCursorToPosition(N):r=="anchor"&&l.selection.setSelectionAnchor(N.row,N.column),l.renderer.scrollCursorIntoView(N),m.preventDefault()}}},l);function $(){c+=60,s=setInterval(function(){c--<=0&&(clearInterval(s),s=null),Math.abs(w)<.01&&(w=0),Math.abs(p)<.01&&(p=0),c<20&&(w=.9*w),c<20&&(p=.9*p);var m=l.session.getScrollTop();l.renderer.scrollBy(10*w,10*p),m==l.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,M,F){var v=k("../lib/event"),f=k("../lib/useragent"),g=k("./default_handlers").DefaultHandlers,a=k("./default_gutter_handler").GutterHandler,l=k("./mouse_event").MouseEvent,r=k("./dragdrop_handler").DragdropHandler,n=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 g(this),new a(this),new r(this);var c=function(w){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()})},h=o.renderer.getMouseEventTarget();v.addListener(h,"click",this.onMouseEvent.bind(this,"click"),o),v.addListener(h,"mousemove",this.onMouseMove.bind(this,"mousemove"),o),v.addMultiMouseDownListener([h,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),v.addMouseWheelListener(o.container,this.onMouseWheel.bind(this,"mousewheel"),o),n(o.container,o);var y=o.renderer.$gutter;v.addListener(y,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),o),v.addListener(y,"click",this.onMouseEvent.bind(this,"gutterclick"),o),v.addListener(y,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),o),v.addListener(y,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),o),v.addListener(h,"mousedown",c,o),v.addListener(y,"mousedown",c,o),f.isIE&&o.renderer.scrollBarV&&(v.addListener(o.renderer.scrollBarV.element,"mousedown",c,o),v.addListener(o.renderer.scrollBarH.element,"mousedown",c,o)),o.on("mousemove",function(w){if(!(s.state||s.$dragDelay||!s.$dragEnabled)){var p=o.renderer.screenToTextCoordinates(w.x,w.y),u=o.session.selection.getRange(),C=o.renderer;!u.isEmpty()&&u.insideStart(p.row,p.column)?C.setCursorStyle("default"):C.setCursorStyle("")}},o)}return e.prototype.onMouseEvent=function(o,s){this.editor.session&&this.editor._emit(o,new l(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 l(s,this.editor))},e.prototype.onMouseWheel=function(o,s){var c=new l(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,h=this.editor.renderer;h.$isMousePressed=!0;var y=this,w=!0,p=function(x){if(x){if(f.isWebKit&&!x.which&&y.releaseMouse)return y.releaseMouse();y.x=x.clientX,y.y=x.clientY,s&&s(x),y.mouseEvent=new l(x,y.editor),y.$mouseMoved=!0}},u=function(x){c.off("beforeEndOperation",A),w=!1,c.session&&C(),y[y.state+"End"]&&y[y.state+"End"](x),y.state="",y.isMousePressed=h.$isMousePressed=!1,h.$keepTextAreaAtCursor&&h.$moveTextAreaToCursor(),y.$onCaptureMouseMove=y.releaseMouse=null,x&&y.onMouseEvent("mouseup",x),c.endOperation()},C=function(){y[y.state]&&y[y.state](),y.$mouseMoved=!1},_=function(){w&&(C(),v.nextFrame(_))};if(f.isOldIE&&o.domEvent.type=="dblclick")return setTimeout(function(){u(o)});var A=function(x){y.releaseMouse&&c.curOp.command.name&&c.curOp.selectionChanged&&(y[y.state+"End"]&&y[y.state+"End"](),y.state="",y.releaseMouse())};c.on("beforeEndOperation",A),c.startOperation({command:{name:"mouse"}}),y.$onCaptureMouseMove=p,y.releaseMouse=v.capture(this.editor.container,p,u),_()},e.prototype.cancelContextMenu=function(){var o=(function(s){s&&s.domEvent&&s.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",o),s&&s.domEvent&&v.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:f.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),M.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(k,M,F){var v=k("../lib/dom"),f=function(){function g(a){a.on("click",function(l){var r=l.getDocumentPosition(),n=a.session,i=n.getFoldAt(r.row,r.column,1);i&&(l.getAccelKey()?n.removeFold(i):n.expandFold(i),l.stop());var t=l.domEvent&&l.domEvent.target;t&&v.hasCssClass(t,"ace_inline_button")&&v.hasCssClass(t,"ace_toggle_wrap")&&(n.setOption("wrap",!n.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(l){var r=a.renderer.$gutterLayer.getRegion(l);if(r=="foldWidgets"){var n=l.getDocumentPosition().row,i=a.session;i.foldWidgets&&i.foldWidgets[n]&&a.session.onFoldWidgetClick(n,l),a.isFocused()||a.focus(),l.stop()}}),a.on("gutterdblclick",function(l){var r=a.renderer.$gutterLayer.getRegion(l);if(r=="foldWidgets"){var n=l.getDocumentPosition().row,i=a.session,t=i.getParentFoldRangeData(n,!0),e=t.range||t.firstRange;if(e){n=e.start.row;var o=i.getFoldAt(n,i.getLine(n).length,1);o?i.removeFold(o):(i.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}l.stop()}})}return g}();M.FoldHandler=f}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(k,M,F){var v=k("../lib/keys"),f=k("../lib/event"),g=function(){function a(l){this.$editor=l,this.$data={editor:l},this.$handlers=[],this.setDefaultHandler(l.commands)}return a.prototype.setDefaultHandler=function(l){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=l,this.addKeyboardHandler(l,0)},a.prototype.setKeyboardHandler=function(l){var r=this.$handlers;if(r[r.length-1]!=l){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(l,1)}},a.prototype.addKeyboardHandler=function(l,r){if(l){typeof l=="function"&&!l.handleKeyboard&&(l.handleKeyboard=l);var n=this.$handlers.indexOf(l);n!=-1&&this.$handlers.splice(n,1),r==null?this.$handlers.push(l):this.$handlers.splice(r,0,l),n==-1&&l.attach&&l.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(l){var r=this.$handlers.indexOf(l);return r==-1?!1:(this.$handlers.splice(r,1),l.detach&&l.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var l=this.$data,r=l.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(r,l)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(l,r,n,i){for(var t,e=!1,o=this.$editor.commands,s=this.$handlers.length;s--&&(t=this.$handlers[s].handleKeyboard(this.$data,l,r,n,i),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=o.exec(t.command,this.$editor,t.args,i),e&&i&&l!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&f.stopEvent(i),e))););return!e&&l==-1&&(t={command:"insertstring"},e=o.exec("insertstring",this.$editor,r)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},a.prototype.onCommandKey=function(l,r,n){var i=v.keyCodeToString(n);return this.$callKeyboardHandlers(r,i,n,l)},a.prototype.onTextInput=function(l){return this.$callKeyboardHandlers(-1,l)},a}();M.KeyBinding=g}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(k,M,F){var v=0,f=0,g=!1,a=!1,l=!1,r=[[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]],n=[[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,h=4,y=5,w=6,p=7,u=8,C=9,_=10,A=11,x=12,E=13,S=14,$=15,m=16,d=17,b=18,L=[b,b,b,b,b,b,b,b,b,w,y,w,u,y,b,b,b,b,b,b,b,b,b,b,b,b,b,b,y,y,y,w,u,h,h,A,A,A,h,h,h,h,h,_,C,_,C,C,s,s,s,s,s,s,s,s,s,s,C,h,h,h,h,h,h,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,h,h,h,h,h,h,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,h,h,h,h,b,b,b,b,b,b,y,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C,h,A,A,A,A,h,h,h,h,e,h,h,b,h,h,A,A,s,s,h,e,h,h,h,s,e,h,h,h,h,h],T=[u,u,u,u,u,u,u,u,u,u,u,b,b,b,e,o,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,u,y,E,S,$,m,d,C,A,A,A,A,A,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,C,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,u];function R(N,B,W,j){var G=v?n:r,V=null,X=null,Y=null,J=0,ne=null,se=null,ae=-1,re=null,fe=null,Fe=[];if(!j)for(re=0,j=[];re<W;re++)j[re]=z(N[re]);for(f=v,g=!1,a=!1,l=!1,fe=0;fe<W;fe++){if(V=J,Fe[fe]=X=D(N,j,Fe,fe),J=G[V][X],ne=J&240,J&=15,B[fe]=Y=G[J][5],ne>0)if(ne==16){for(re=ae;re<fe;re++)B[re]=1;ae=-1}else ae=-1;if(se=G[J][6],se)ae==-1&&(ae=fe);else if(ae>-1){for(re=ae;re<fe;re++)B[re]=Y;ae=-1}j[fe]==y&&(B[fe]=0),f|=Y}if(l){for(re=0;re<W;re++)if(j[re]==w){B[re]=v;for(var Ce=re-1;Ce>=0&&j[Ce]==u;Ce--)B[Ce]=v}}}function I(N,B,W){if(!(f<N)){if(N==1&&v==t&&!a){W.reverse();return}for(var j=W.length,G=0,V,X,Y,J;G<j;){if(B[G]>=N){for(V=G+1;V<j&&B[V]>=N;)V++;for(X=G,Y=V-1;X<Y;X++,Y--)J=W[X],W[X]=W[Y],W[Y]=J;G=V}G++}}}function D(N,B,W,j){var G=B[j],V,X,Y,J;switch(G){case e:case o:g=!1;case h:case c:return G;case s:return g?c:s;case p:return g=!0,o;case u:return h;case C:return j<1||j+1>=B.length||(V=W[j-1])!=s&&V!=c||(X=B[j+1])!=s&&X!=c?h:(g&&(X=c),X==V?X:h);case _:return V=j>0?W[j-1]:y,V==s&&j+1<B.length&&B[j+1]==s?s:h;case A:if(j>0&&W[j-1]==s)return s;if(g)return h;for(J=j+1,Y=B.length;J<Y&&B[J]==A;)J++;return J<Y&&B[J]==s?s:h;case x:for(Y=B.length,J=j+1;J<Y&&B[J]==x;)J++;if(J<Y){var ne=N[j],se=ne>=1425&&ne<=2303||ne==64286;if(V=B[J],se&&(V==o||V==p))return o}return j<1||(V=B[j-1])==y?h:W[j-1];case y:return g=!1,a=!0,v;case w:return l=!0,h;case E:case S:case m:case d:case $:g=!1;case b:return h}}function z(N){var B=N.charCodeAt(0),W=B>>8;return W==0?B>191?e:L[B]:W==5?/[\u0591-\u05f4]/.test(N)?o:e:W==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(N)?x:/[\u0660-\u0669\u066b-\u066c]/.test(N)?c:B==1642?A:/[\u06f0-\u06f9]/.test(N)?s:p:W==32&&B<=8287?T[B&255]:W==254&&B>=65136?p:h}M.L=e,M.R=o,M.EN=s,M.ON_R=3,M.AN=4,M.R_H=5,M.B=6,M.RLE=7,M.DOT="·",M.doBidiReorder=function(N,B,W){if(N.length<2)return{};var j=N.split(""),G=new Array(j.length),V=new Array(j.length),X=[];v=W?t:i,R(j,X,j.length,B);for(var Y=0;Y<G.length;G[Y]=Y,Y++);I(2,X,G),I(1,X,G);for(var Y=0;Y<G.length-1;Y++)B[Y]===c?X[Y]=M.AN:X[Y]===o&&(B[Y]>p&&B[Y]<E||B[Y]===h||B[Y]===b)?X[Y]=M.ON_R:Y>0&&j[Y-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(j[Y])&&(X[Y-1]=X[Y]=M.R_H,Y++);j[j.length-1]===M.DOT&&(X[j.length-1]=M.B),j[0]==="‫"&&(X[0]=M.RLE);for(var Y=0;Y<G.length;Y++)V[Y]=X[G[Y]];return{logicalFromVisual:G,bidiLevels:V}},M.hasBidiCharacters=function(N,B){for(var W=!1,j=0;j<N.length;j++)B[j]=z(N.charAt(j)),!W&&(B[j]==o||B[j]==p||B[j]==c)&&(W=!0);return W},M.getVisualFromLogicalIdx=function(N,B){for(var W=0;W<B.logicalFromVisual.length;W++)if(B.logicalFromVisual[W]==N)return W;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(k,M,F){var v=k("./lib/bidiutil"),f=k("./lib/lang"),g=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function l(r){this.session=r,this.bidiMap={},this.currentRow=null,this.bidiUtil=v,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=g.test(r.getValue())}return l.prototype.isBidiRow=function(r,n,i){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(n,i),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},l.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&g.test(r.lines.join(`
189
+ `))&&(this.seenBidi=!0,this.currentRow=null)},l.prototype.getDocumentRow=function(){var r=0,n=this.session.$screenRowCache;if(n.length){var i=this.session.$getRowCacheIndex(n,this.currentRow);i>=0&&(r=this.session.$docRowCache[i])}return r},l.prototype.getSplitIndex=function(){var r=0,n=this.session.$screenRowCache;if(n.length)for(var i,t=this.session.$getRowCacheIndex(n,this.currentRow);this.currentRow-r>0&&(i=this.session.$getRowCacheIndex(n,this.currentRow-r-1),i===t);)t=i,r++;else r=this.currentRow;return r},l.prototype.updateRowLine=function(r,n){r===void 0&&(r=this.getDocumentRow());var i=r===this.session.getLength()-1,t=i?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[r];e&&(n===void 0&&(n=this.getSplitIndex()),n>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[v.L],this.line=n<e.length?this.line.substring(e[n-1],e[n]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[n]),n==e.length&&(this.line+=this.showInvisibles?t:v.DOT))}else this.line+=this.showInvisibles?t:v.DOT;var o=this.session,s=0,c;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(h,y){return h===" "||o.isFullWidth(h.charCodeAt(0))?(c=h===" "?o.getScreenTabSize(y+s):2,s+=c-1,f.stringRepeat(v.DOT,c)):h}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==v.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},l.prototype.updateBidiMap=function(){var r=[];v.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=v.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={}},l.prototype.markAsDirty=function(){this.currentRow=null},l.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var n=this.characterWidth=r.$characterSize.width,i=r.$measureCharWidth("ה");this.charWidths[v.L]=this.charWidths[v.EN]=this.charWidths[v.ON_R]=n,this.charWidths[v.R]=this.charWidths[v.AN]=i,this.charWidths[v.R_H]=i*.45,this.charWidths[v.B]=this.charWidths[v.RLE]=0,this.currentRow=null}},l.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null},l.prototype.setEolChar=function(r){this.EOL=r},l.prototype.setContentWidth=function(r){this.contentWidth=r},l.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},l.prototype.setRtlDirection=function(r,n){for(var i=r.getCursorPosition(),t=r.selection.getSelectionAnchor().row;t<=i.row;t++)!n&&r.session.getLine(t).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(t,0,1):n&&r.session.getLine(t).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:t},r.session.$bidiHandler.RLE)},l.prototype.getPosLeft=function(r){r-=this.wrapIndent;var n=this.line.charAt(0)===this.RLE?1:0,i=r>n?this.session.getOverwrite()?r:r-1:n,t=v.getVisualFromLogicalIdx(i,this.bidiMap),e=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&r<=n&&e[t]%2!==0&&t++;for(var s=0;s<t;s++)o+=this.charWidths[e[s]];return!this.session.getOverwrite()&&r>n&&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},l.prototype.getSelections=function(r,n){var i=this.bidiMap,t=i.bidiLevels,e,o=[],s=0,c=Math.min(r,n)-this.wrapIndent,h=Math.max(r,n)-this.wrapIndent,y=!1,w=!1,p=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var u,C=0;C<t.length;C++)u=i.logicalFromVisual[C],e=t[C],y=u>=c&&u<h,y&&!w?p=s:!y&&w&&o.push({left:p,width:s-p}),s+=this.charWidths[e],w=y;if(y&&C===t.length&&o.push({left:p,width:s-p}),this.isRtlDir)for(var _=0;_<o.length;_++)o[_].left+=this.rtlLineOffset;return o},l.prototype.offsetToCol=function(i){this.isRtlDir&&(i-=this.rtlLineOffset);var n=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--,n=this.bidiMap.logicalFromVisual[e]):e>0&&o[e-1]%2===0&&o[e]%2!==0?n=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?n=1+this.bidiMap.logicalFromVisual[e]:(e>0&&o[e-1]%2!==0&&s!==0&&e--,n=this.bidiMap.logicalFromVisual[e]),n===0&&this.isRtlDir&&n++,n+this.wrapIndent},l}();M.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(k,M,F){var v=k("./lib/oop"),f=k("./lib/lang"),g=k("./lib/event_emitter").EventEmitter,a=k("./range").Range,l=function(){function r(n){this.session=n,this.doc=n.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 r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(n,i){this.$isEmpty=!1,this.anchor.setPosition(n,i)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var n=this.anchor,i=this.lead;return n.row>i.row||n.row==i.row&&n.column>i.column},r.prototype.getRange=function(){var n=this.anchor,i=this.lead;return this.$isEmpty?a.fromPoints(i,i):this.isBackwards()?a.fromPoints(i,n):a.fromPoints(n,i)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(n,i){var t=i?n.end:n.start,e=i?n.start:n.end;this.$setSelection(t.row,t.column,e.row,e.column)},r.prototype.$setSelection=function(n,i,t,e){if(!this.$silent){var o=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(n,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")}},r.prototype.$moveSelection=function(n){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),n.call(this)},r.prototype.selectTo=function(n,i){this.$moveSelection(function(){this.moveCursorTo(n,i)})},r.prototype.selectToPosition=function(n){this.$moveSelection(function(){this.moveCursorToPosition(n)})},r.prototype.moveTo=function(n,i){this.clearSelection(),this.moveCursorTo(n,i)},r.prototype.moveToPosition=function(n){this.clearSelection(),this.moveCursorToPosition(n)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(n,i){if(typeof i>"u"){var t=n||this.lead;n=t.row,i=t.column}return this.session.getWordRange(n,i)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var n=this.getCursor(),i=this.session.getAWordRange(n.row,n.column);this.setSelectionRange(i)},r.prototype.getLineRange=function(n,i){var t=typeof n=="number"?n: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)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(n,i,t){var e=n.column,o=n.column+i;return t<0&&(e=n.column-i,o=n.column),this.session.isTabStop(n)&&this.doc.getLine(n.row).slice(e,o).split(" ").length-1==i},r.prototype.moveCursorLeft=function(){var n=this.lead.getPosition(),i;if(i=this.session.getFoldAt(n.row,n.column,-1))this.moveCursorTo(i.start.row,i.start.column);else if(n.column===0)n.row>0&&this.moveCursorTo(n.row-1,this.doc.getLine(n.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(n,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var n=this.lead.getPosition(),i;if(i=this.session.getFoldAt(n.row,n.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(),n=this.lead;this.wouldMoveIntoSoftTab(n,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var n=this.lead.row,i=this.lead.column,t=this.session.documentToScreenRow(n,i),e=this.session.screenToDocumentPosition(t,0),o=this.session.getDisplayLine(n,null,e.row,e.column),s=o.match(/^\s*/);s[0].length!=i&&!this.session.$useEmacsStyleLineStart&&(e.column+=s[0].length),this.moveCursorToPosition(e)},r.prototype.moveCursorLineEnd=function(){var n=this.lead,i=this.session.getDocumentLastRowColumnPosition(n.row,n.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)},r.prototype.moveCursorFileEnd=function(){var n=this.doc.getLength()-1,i=this.doc.getLine(n).length;this.moveCursorTo(n,i)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var n=this.lead.row,i=this.lead.column,t=this.doc.getLine(n),e=t.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(n,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(n,t.length),this.moveCursorRight(),n<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(i+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(n,i)},r.prototype.moveCursorLongWordLeft=function(){var n=this.lead.row,i=this.lead.column,t;if(t=this.session.getFoldAt(n,i,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(n,i,-1);e==null&&(e=this.doc.getLine(n).substring(0,i));var o=f.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(n,0),this.moveCursorLeft(),n>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(n,i)},r.prototype.$shortWordEndIndex=function(n){var i=0,t,e=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(n))i=this.session.tokenRe.lastIndex;else{for(;(t=n[i])&&e.test(t);)i++;if(i<1){for(o.lastIndex=0;(t=n[i])&&!o.test(t);)if(o.lastIndex=0,i++,e.test(t))if(i>2){i--;break}else{for(;(t=n[i])&&e.test(t);)i++;if(i>2)break}}}return o.lastIndex=0,i},r.prototype.moveCursorShortWordRight=function(){var n=this.lead.row,i=this.lead.column,t=this.doc.getLine(n),e=t.substring(i),o=this.session.getFoldAt(n,i,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(i==t.length){var s=this.doc.getLength();do n++,e=this.doc.getLine(n);while(n<s&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),i=0}var c=this.$shortWordEndIndex(e);this.moveCursorTo(n,i+c)},r.prototype.moveCursorShortWordLeft=function(){var n=this.lead.row,i=this.lead.column,t;if(t=this.session.getFoldAt(n,i,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(n).substring(0,i);if(i===0){do n--,e=this.doc.getLine(n);while(n>0&&/^\s*$/.test(e));i=e.length,/\s+$/.test(e)||(e="")}var o=f.stringReverse(e),s=this.$shortWordEndIndex(o);return this.moveCursorTo(n,i-s)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(n,i){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(i===0&&(n!==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),n!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];n<0?n-=o.rowsAbove||0:n>0&&(n+=o.rowCount-(o.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+n,t.column,e);n!==0&&i===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+i,i===0)},r.prototype.moveCursorToPosition=function(n){this.moveCursorTo(n.row,n.column)},r.prototype.moveCursorTo=function(n,i,t){var e=this.session.getFoldAt(n,i,1);e&&(n=e.start.row,i=e.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(n);/[\uDC00-\uDFFF]/.test(o.charAt(i))&&o.charAt(i-1)&&(this.lead.row==n&&this.lead.column==i+1?i=i-1:i=i+1),this.lead.setPosition(n,i),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(n,i,t){var e=this.session.screenToDocumentPosition(n,i);this.moveCursorTo(e.row,e.column,t)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(n){this.setSelectionRange(n,n.cursor==n.start),this.$desiredColumn=n.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(n){var i=this.getRange();return n?(n.start.column=i.start.column,n.start.row=i.start.row,n.end.column=i.end.column,n.end.row=i.end.row):n=i,n.cursor=this.isBackwards()?n.start:n.end,n.desiredColumn=this.$desiredColumn,n},r.prototype.getRangeOfMovements=function(n){var i=this.getCursor();try{n(this);var t=this.getCursor();return a.fromPoints(i,t)}catch{return a.fromPoints(i,i)}finally{this.moveCursorToPosition(i)}},r.prototype.toJSON=function(){if(this.rangeCount)var n=this.ranges.map(function(i){var t=i.clone();return t.isBackwards=i.cursor==i.start,t});else{var n=this.getRange();n.isBackwards=this.isBackwards()}return n},r.prototype.fromJSON=function(n){if(n.start==null)if(this.rangeList&&n.length>1){this.toSingleRange(n[0]);for(var i=n.length;i--;){var t=a.fromPoints(n[i].start,n[i].end);n[i].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else n=n[0];this.rangeList&&this.toSingleRange(n),this.setSelectionRange(n,n.isBackwards)},r.prototype.isEqual=function(n){if((n.length||this.rangeCount)&&n.length!=this.rangeCount)return!1;if(!n.length||!this.ranges)return this.getRange().isEqual(n);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(n[i]))return!1;return!0},r}();l.prototype.setSelectionAnchor=l.prototype.setAnchor,l.prototype.getSelectionAnchor=l.prototype.getAnchor,l.prototype.setSelectionRange=l.prototype.setRange,v.implement(l.prototype,g),M.Selection=l}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(k,M,F){var v=k("./lib/report_error").reportError,f=2e3,g=function(){function a(l){this.splitRegex,this.states=l,this.regExps={},this.matchMappings={};for(var r in this.states){for(var n=this.states[r],i=[],t=0,e=this.matchMappings[r]={defaultToken:"text"},o="g",s=[],c=0;c<n.length;c++){var h=n[c];if(h.defaultToken&&(e.defaultToken=h.defaultToken),h.caseInsensitive&&o.indexOf("i")===-1&&(o+="i"),h.unicode&&o.indexOf("u")===-1&&(o+="u"),h.regex!=null){h.regex instanceof RegExp&&(h.regex=h.regex.toString().slice(1,-1));var y=h.regex,w=new RegExp("(?:("+y+")|(.))").exec("a").length-2;Array.isArray(h.token)?h.token.length==1||w==1?h.token=h.token[0]:w-1!=h.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:h,groupCount:w-1}),h.token=h.token[0]):(h.tokenArray=h.token,h.token=null,h.onMatch=this.$arrayTokens):typeof h.token=="function"&&!h.onMatch&&(w>1?h.onMatch=this.$applyToken:h.onMatch=h.token),w>1&&(/\\\d/.test(h.regex)?y=h.regex.replace(/\\([0-9]+)/g,function(p,u){return"\\"+(parseInt(u,10)+t+1)}):(w=1,y=this.removeCapturingGroups(h.regex)),!h.splitRegex&&typeof h.token!="string"&&s.push(h)),e[t]=c,t+=w,i.push(y),h.onMatch||(h.onMatch=null)}}i.length||(e[0]=0,i.push("$")),s.forEach(function(p){p.splitRegex=this.createSplitterRegexp(p.regex,o)},this),this.regExps[r]=new RegExp("("+i.join(")|(")+")|($)",o)}}return a.prototype.$setMaxTokenCount=function(l){f=l|0},a.prototype.$applyToken=function(l){var r=this.splitRegex.exec(l).slice(1),n=this.token.apply(this,r);if(typeof n=="string")return[{type:n,value:l}];for(var i=[],t=0,e=n.length;t<e;t++)r[t]&&(i[i.length]={type:n[t],value:r[t]});return i},a.prototype.$arrayTokens=function(l){if(!l)return[];var r=this.splitRegex.exec(l);if(!r)return"text";for(var n=[],i=this.tokenArray,t=0,e=i.length;t<e;t++)r[t+1]&&(n[n.length]={type:i[t],value:r[t+1]});return n},a.prototype.removeCapturingGroups=function(l){var r=l.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(n,i){return i?"(?:":n});return r},a.prototype.createSplitterRegexp=function(l,r){if(l.indexOf("(?=")!=-1){var n=0,i=!1,t={};l.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,o,s,c,h,y){return i?i=h!="]":h?i=!0:c?(n==t.stack&&(t.end=y+1,t.stack=-1),n--):s&&(n++,s.length!=1&&(t.stack=n,t.start=y)),e}),t.end!=null&&/^\)*$/.test(l.substr(t.end))&&(l=l.substring(0,t.start)+l.substr(t.end))}return l.charAt(0)!="^"&&(l="^"+l),l.charAt(l.length-1)!="$"&&(l+="$"),new RegExp(l,(r||"").replace("g",""))},a.prototype.getLineTokens=function(l,r){if(r&&typeof r!="string"){var n=r.slice(0);r=n[0],r==="#tmp"&&(n.shift(),r=n.shift())}else var n=[];var i=r||"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=[],h=0,y=0,w={type:null,value:""};s=o.exec(l);){var p=e.defaultToken,u=null,C=s[0],_=o.lastIndex;if(_-C.length>h){var A=l.substring(h,_-C.length);w.type==p?w.value+=A:(w.type&&c.push(w),w={type:p,value:A})}for(var x=0;x<s.length-2;x++)if(s[x+1]!==void 0){u=t[e[x]],u.onMatch?p=u.onMatch(C,i,n,l):p=u.token,u.next&&(typeof u.next=="string"?i=u.next:i=u.next(i,n),t=this.states[i],t||(this.reportError("state doesn't exist",i),i="start",t=this.states[i]),e=this.matchMappings[i],h=_,o=this.regExps[i],o.lastIndex=_),u.consumeLineEnd&&(h=_);break}if(C){if(typeof p=="string")(!u||u.merge!==!1)&&w.type===p?w.value+=C:(w.type&&c.push(w),w={type:p,value:C});else if(p){w.type&&c.push(w),w={type:null,value:""};for(var x=0;x<p.length;x++)c.push(p[x])}}if(h==l.length)break;if(h=_,y++>f){for(y>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:l});h<l.length;)w.type&&c.push(w),w={value:l.substring(h,h+=500),type:"overflow"};i="start",n=[];break}}return w.type&&c.push(w),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},a}();g.prototype.reportError=v,M.Tokenizer=g}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(k,M,F){var v=k("../lib/deep_copy").deepCopy,f;f=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(l,r){if(!r){for(var n in l)this.$rules[n]=l[n];return}for(var n in l){for(var i=l[n],t=0;t<i.length;t++){var e=i[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(r)!==0&&(e.next=r+e.next),e.nextState&&e.nextState.indexOf(r)!==0&&(e.nextState=r+e.nextState))}this.$rules[r+n]=i}},this.getRules=function(){return this.$rules},this.embedRules=function(l,r,n,i,t){var e=typeof l=="function"?new l().getRules():l;if(i)for(var o=0;o<i.length;o++)i[o]=r+i[o];else{i=[];for(var s in e)i.push(r+s)}if(this.addRules(e,r),n)for(var c=Array.prototype[t?"push":"unshift"],o=0;o<i.length;o++)c.apply(this.$rules[i[o]],v(n));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var g=function(l,r){return(l!="start"||r.length)&&r.unshift(this.nextState,l),this.nextState},a=function(l,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var l=0,r=this.$rules;function n(i){var t=r[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 h=o.stateName;h||(h=o.token,typeof h!="string"&&(h=h[0]||""),r[h]&&(h+=l++)),r[h]=c,o.next=h,n(h)}else c=="pop"&&(o.next=a);if(o.push&&(o.nextState=o.next||o.push,o.next=g,delete o.push),o.rules)for(var y in o.rules)r[y]?r[y].push&&r[y].push.apply(r[y],o.rules[y]):r[y]=o.rules[y];var w=typeof o=="string"?o:o.include;if(w&&(w==="$self"&&(w="start"),Array.isArray(w)?s=w.map(function(u){return r[u]}):s=r[w]),s){var p=[e,1].concat(s);o.noEscape&&(p=p.filter(function(u){return!u.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(r).forEach(n,this)},this.createKeywordMapper=function(l,r,n,i){var t=Object.create(null);return this.$keywordList=[],Object.keys(l).forEach(function(e){for(var o=l[e],s=o.split(i||"|"),c=s.length;c--;){var h=s[c];this.$keywordList.push(h),n&&(h=h.toLowerCase()),t[h]=e}},this),l=null,n?function(e){return t[e.toLowerCase()]||r}:function(e){return t[e]||r}},this.getKeywords=function(){return this.$keywords}}).call(f.prototype),M.TextHighlightRules=f}),ace.define("ace/mode/behaviour",["require","exports","module"],function(k,M,F){var v;v=function(){this.$behaviours={}},(function(){this.add=function(f,g,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[f]:this.$behaviours[f]={}}this.$behaviours[f][g]=a},this.addBehaviours=function(f){for(var g in f)for(var a in f[g])this.add(g,a,f[g][a])},this.remove=function(f){this.$behaviours&&this.$behaviours[f]&&delete this.$behaviours[f]},this.inherit=function(f,g){if(typeof f=="function")var a=new f().getBehaviours(g);else var a=f.getBehaviours(g);this.addBehaviours(a)},this.getBehaviours=function(f){if(f){for(var g={},a=0;a<f.length;a++)this.$behaviours[f[a]]&&(g[f[a]]=this.$behaviours[f[a]]);return g}else return this.$behaviours}}).call(v.prototype),M.Behaviour=v}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(k,M,F){var v=k("./range").Range,f=function(){function g(a,l,r){this.$session=a,this.$row=l,this.$rowTokens=a.getTokens(l);var n=a.getTokenAt(l,r);this.$tokenIndex=n?n.index:-1}return g.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]},g.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]},g.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},g.prototype.getCurrentTokenRow=function(){return this.$row},g.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,l=this.$tokenIndex,r=a[l].start;if(r!==void 0)return r;for(r=0;l>0;)l-=1,r+=a[l].value.length;return r},g.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},g.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new v(this.$row,l,this.$row,l+a.value.length)},g}();M.TokenIterator=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(k,M,F){var v=k("../../lib/oop"),f=k("../behaviour").Behaviour,g=k("../../token_iterator").TokenIterator,a=k("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],n,i={},t={'"':'"',"'":"'"},e=function(c){var h=-1;if(c.multiSelect&&(h=c.selection.index,i.rangeCount!=c.multiSelect.rangeCount&&(i={rangeCount:c.multiSelect.rangeCount})),i[h])return n=i[h];n=i[h]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},o=function(c,h,y,w){var p=c.end.row-c.start.row;return{text:y+h+w,selection:[0,c.start.column+1,p,c.end.column+(p?0:1)]}},s;s=function(c){c=c||{},this.add("braces","insertion",function(h,y,w,p,u){var C=w.getCursorPosition(),_=p.doc.getLine(C.row);if(u=="{"){e(w);var A=w.getSelectionRange(),x=p.doc.getTextRange(A),E=p.getTokenAt(C.row,C.column);if(x!==""&&x!=="{"&&w.getWrapBehavioursEnabled())return o(A,x,"{","}");if(E&&/(?:string)\.quasi|\.xml/.test(E.type)){var S=[/tag\-(?:open|name)/,/attribute\-name/];return S.some(function(R){return R.test(E.type)})||/(string)\.quasi/.test(E.type)&&E.value[C.column-E.start-1]!=="$"?void 0:(s.recordAutoInsert(w,p,"}"),{text:"{}",selection:[1,1]})}else if(s.isSaneInsertion(w,p))return/[\]\}\)]/.test(_[C.column])||w.inMultiSelectMode||c.braces?(s.recordAutoInsert(w,p,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(w,p,"{"),{text:"{",selection:[1,1]})}else if(u=="}"){e(w);var $=_.substring(C.column,C.column+1);if($=="}"){var m=p.$findOpeningBracket("}",{column:C.column+1,row:C.row});if(m!==null&&s.isAutoInsertedClosing(C,_,u))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(u==`
190
+ `||u==`\r
191
+ `){e(w);var d="";s.isMaybeInsertedClosing(C,_)&&(d=a.stringRepeat("}",n.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var $=_.substring(C.column,C.column+1);if($==="}"){var b=p.findMatchingBracket({row:C.row,column:C.column+1},"}");if(!b)return null;var L=this.$getIndent(p.getLine(b.row))}else if(d)var L=this.$getIndent(_);else{s.clearMaybeInsertedClosing();return}var T=L+p.getTabString();return{text:`
192
+ `+T+`
193
+ `+L+d,selection:[1,T.length,1,T.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(h,y,w,p,u){var C=p.doc.getTextRange(u);if(!u.isMultiLine()&&C=="{"){e(w);var _=p.doc.getLine(u.start.row),A=_.substring(u.end.column,u.end.column+1);if(A=="}")return u.end.column++,u;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(h,y,w,p,u){if(u=="("){e(w);var C=w.getSelectionRange(),_=p.doc.getTextRange(C);if(_!==""&&w.getWrapBehavioursEnabled())return o(C,_,"(",")");if(s.isSaneInsertion(w,p))return s.recordAutoInsert(w,p,")"),{text:"()",selection:[1,1]}}else if(u==")"){e(w);var A=w.getCursorPosition(),x=p.doc.getLine(A.row),E=x.substring(A.column,A.column+1);if(E==")"){var S=p.$findOpeningBracket(")",{column:A.column+1,row:A.row});if(S!==null&&s.isAutoInsertedClosing(A,x,u))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(h,y,w,p,u){var C=p.doc.getTextRange(u);if(!u.isMultiLine()&&C=="("){e(w);var _=p.doc.getLine(u.start.row),A=_.substring(u.start.column+1,u.start.column+2);if(A==")")return u.end.column++,u}}),this.add("brackets","insertion",function(h,y,w,p,u){if(u=="["){e(w);var C=w.getSelectionRange(),_=p.doc.getTextRange(C);if(_!==""&&w.getWrapBehavioursEnabled())return o(C,_,"[","]");if(s.isSaneInsertion(w,p))return s.recordAutoInsert(w,p,"]"),{text:"[]",selection:[1,1]}}else if(u=="]"){e(w);var A=w.getCursorPosition(),x=p.doc.getLine(A.row),E=x.substring(A.column,A.column+1);if(E=="]"){var S=p.$findOpeningBracket("]",{column:A.column+1,row:A.row});if(S!==null&&s.isAutoInsertedClosing(A,x,u))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(h,y,w,p,u){var C=p.doc.getTextRange(u);if(!u.isMultiLine()&&C=="["){e(w);var _=p.doc.getLine(u.start.row),A=_.substring(u.start.column+1,u.start.column+2);if(A=="]")return u.end.column++,u}}),this.add("string_dquotes","insertion",function(h,y,w,p,u){var C=p.$mode.$quotes||t;if(u.length==1&&C[u]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(u)!=-1)return;e(w);var _=u,A=w.getSelectionRange(),x=p.doc.getTextRange(A);if(x!==""&&(x.length!=1||!C[x])&&w.getWrapBehavioursEnabled())return o(A,x,_,_);if(!x){var E=w.getCursorPosition(),S=p.doc.getLine(E.row),$=S.substring(E.column-1,E.column),m=S.substring(E.column,E.column+1),d=p.getTokenAt(E.row,E.column),b=p.getTokenAt(E.row,E.column+1);if($=="\\"&&d&&/escape/.test(d.type))return null;var L=d&&/string|escape/.test(d.type),T=!b||/string|escape/.test(b.type),R;if(m==_)R=L!==T,R&&/string\.end/.test(b.type)&&(R=!1);else{if(L&&!T||L&&T)return null;var I=p.$mode.tokenRe;I.lastIndex=0;var D=I.test($);I.lastIndex=0;var z=I.test(m),N=p.$mode.$pairQuotesAfter,B=N&&N[_]&&N[_].test($);if(!B&&D||z||m&&!/[\s;,.})\]\\]/.test(m))return null;var W=S[E.column-2];if($==_&&(W==_||I.test(W)))return null;R=!0}return{text:R?_+_:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(h,y,w,p,u){var C=p.$mode.$quotes||t,_=p.doc.getTextRange(u);if(!u.isMultiLine()&&C.hasOwnProperty(_)){e(w);var A=p.doc.getLine(u.start.row),x=A.substring(u.start.column+1,u.start.column+2);if(x==_)return u.end.column++,u}}),c.closeDocComment!==!1&&this.add("doc comment end","insertion",function(h,y,w,p,u){if(h==="doc-start"&&(u===`
194
+ `||u===`\r
195
+ `)&&w.selection.isEmpty()){var C=w.getCursorPosition();if(C.column===0)return;for(var _=p.doc.getLine(C.row),A=p.doc.getLine(C.row+1),x=p.getTokens(C.row),E=0,S=0;S<x.length;S++){E+=x[S].value.length;var $=x[S];if(E>=C.column){if(E===C.column){if(!/\.doc/.test($.type))return;if(/\*\//.test($.value)){var m=x[S+1];if(!m||!/\.doc/.test(m.type))return}}var d=C.column-(E-$.value.length),b=$.value.indexOf("*/"),L=$.value.indexOf("/**",b>-1?b+2:0);if(L!==-1&&d>L&&d<L+3||b!==-1&&L!==-1&&d>=b&&d<=L||!/\.doc/.test($.type))return;break}}var T=this.$getIndent(_);if(/\s*\*/.test(A))return/^\s*\*/.test(_)?{text:u+T+"* ",selection:[1,2+T.length,1,2+T.length]}:{text:u+T+" * ",selection:[1,3+T.length,1,3+T.length]};if(/\/\*\*/.test(_.substring(0,C.column)))return{text:u+T+" * "+u+" "+T+"*/",selection:[1,4+T.length,1,4+T.length]}}})},s.isSaneInsertion=function(c,h){var y=c.getCursorPosition(),w=new g(h,y.row,y.column);if(!this.$matchTokenType(w.getCurrentToken()||"text",l)){if(/[)}\]]/.test(c.session.getLine(y.row)[y.column]))return!0;var p=new g(h,y.row,y.column+1);if(!this.$matchTokenType(p.getCurrentToken()||"text",l))return!1}return w.stepForward(),w.getCurrentTokenRow()!==y.row||this.$matchTokenType(w.getCurrentToken()||"text",r)},s.$matchTokenType=function(c,h){return h.indexOf(c.type||c)>-1},s.recordAutoInsert=function(c,h,y){var w=c.getCursorPosition(),p=h.doc.getLine(w.row);this.isAutoInsertedClosing(w,p,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=w.row,n.autoInsertedLineEnd=y+p.substr(w.column),n.autoInsertedBrackets++},s.recordMaybeInsert=function(c,h,y){var w=c.getCursorPosition(),p=h.doc.getLine(w.row);this.isMaybeInsertedClosing(w,p)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=w.row,n.maybeInsertedLineStart=p.substr(0,w.column)+y,n.maybeInsertedLineEnd=p.substr(w.column),n.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(c,h,y){return n.autoInsertedBrackets>0&&c.row===n.autoInsertedRow&&y===n.autoInsertedLineEnd[0]&&h.substr(c.column)===n.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(c,h){return n.maybeInsertedBrackets>0&&c.row===n.maybeInsertedRow&&h.substr(c.column)===n.maybeInsertedLineEnd&&h.substr(0,c.column)==n.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},v.inherits(s,f),M.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(k,M,F){for(var v=[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],f=0,g=[],a=0;a<v.length;a+=2)g.push(f+=v[a]),v[a+1]&&g.push(45,f+=v[a+1]);M.wordChars=String.fromCharCode.apply(null,g)}),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,M,F){var v=k("../config"),f=k("../tokenizer").Tokenizer,g=k("./text_highlight_rules").TextHighlightRules,a=k("./behaviour/cstyle").CstyleBehaviour,l=k("../unicode"),r=k("../lib/lang"),n=k("../token_iterator").TokenIterator,i=k("../range").Range,t;t=function(){this.HighlightRules=g},(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new f(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,o,s,c){var h=o.doc,y=!0,w=!0,p=1/0,u=o.getTabSize(),C=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var x=this.lineCommentStart.map(r.escapeRegExp).join("|"),_=this.lineCommentStart[0];else var x=r.escapeRegExp(this.lineCommentStart),_=this.lineCommentStart;x=new RegExp("^(\\s*)(?:"+x+") ?"),C=o.getUseSoftTabs();var $=function(z,N){var B=z.match(x);if(B){var W=B[1].length,j=B[0].length;!b(z,W,j)&&B[0][j-1]==" "&&j--,h.removeInLine(N,W,j)}},d=_+" ",S=function(z,N){(!y||/\S/.test(z))&&(b(z,p,p)?h.insertInLine({row:N,column:p},d):h.insertInLine({row:N,column:p},_))},m=function(z,N){return x.test(z)},b=function(z,N,B){for(var W=0;N--&&z.charAt(N)==" ";)W++;if(W%u!=0)return!1;for(var W=0;z.charAt(B++)==" ";)W++;return u>2?W%u!=u-1:W%u==0}}else{if(!this.blockComment)return!1;var _=this.blockComment.start,A=this.blockComment.end,x=new RegExp("^(\\s*)(?:"+r.escapeRegExp(_)+")"),E=new RegExp("(?:"+r.escapeRegExp(A)+")\\s*$"),S=function(R,I){m(R,I)||(!y||/\S/.test(R))&&(h.insertInLine({row:I,column:R.length},A),h.insertInLine({row:I,column:p},_))},$=function(R,I){var D;(D=R.match(E))&&h.removeInLine(I,R.length-D[0].length,R.length),(D=R.match(x))&&h.removeInLine(I,D[1].length,D[0].length)},m=function(R,I){if(x.test(R))return!0;for(var D=o.getTokens(I),z=0;z<D.length;z++)if(D[z].type==="comment")return!0}}function L(R){for(var I=s;I<=c;I++)R(h.getLine(I),I)}var T=1/0;L(function(R,I){var D=R.search(/\S/);D!==-1?(D<p&&(p=D),w&&!m(R,I)&&(w=!1)):T>R.length&&(T=R.length)}),p==1/0&&(p=T,y=!1,w=!1),C&&p%u!=0&&(p=Math.floor(p/u)*u),L(w?$:S)},this.toggleBlockComment=function(e,o,s,c){var h=this.blockComment;if(h){!h.start&&h[0]&&(h=h[0]);var y=new n(o,c.row,c.column),w=y.getCurrentToken();o.selection;var p=o.selection.toOrientedRange(),u,C;if(w&&/comment/.test(w.type)){for(var _,A;w&&/comment/.test(w.type);){var x=w.value.indexOf(h.start);if(x!=-1){var E=y.getCurrentTokenRow(),S=y.getCurrentTokenColumn()+x;_=new i(E,S,E,S+h.start.length);break}w=y.stepBackward()}for(var y=new n(o,c.row,c.column),w=y.getCurrentToken();w&&/comment/.test(w.type);){var x=w.value.indexOf(h.end);if(x!=-1){var E=y.getCurrentTokenRow(),S=y.getCurrentTokenColumn()+x;A=new i(E,S,E,S+h.end.length);break}w=y.stepForward()}A&&o.remove(A),_&&(o.remove(_),u=_.start.row,C=-h.start.length)}else C=h.start.length,u=s.start.row,o.insert(s.end,h.end),o.insert(s.start,h.start);p.start.row==u&&(p.start.column+=C),p.end.row==u&&(p.end.column+=C),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,h=v.$modes[c];h||(v.$modes[c]=h=new s),v.$modes[o]||(v.$modes[o]=h),this.$embeds.push(o),this.$modes[o]=h}for(var y=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],w=function(u){(function(C){var _=y[u],A=C[_];C[y[u]]=function(){return this.$delegator(_,arguments,A)}})(p)},p=this,o=0;o<y.length;o++)w(o)},this.$delegator=function(e,o,s){var c=o[0]||"start";if(typeof c!="string"){if(Array.isArray(c[2])){var h=c[2][c[2].length-1],y=this.$modes[h];if(y)return y[e].apply(y,[c[1]].concat([].slice.call(o,1)))}c=c[0]||"start"}for(var w=0;w<this.$embeds.length;w++)if(this.$modes[this.$embeds[w]]){var p=c.split(this.$embeds[w]);if(!p[0]&&p[1]){o[0]=p[1];var y=this.$modes[this.$embeds[w]];return y[e].apply(y,o)}}var u=s.apply(this,o);return s?u:void 0},this.transformAction=function(e,o,s,c,h){if(this.$behaviour){var y=this.$behaviour.getBehaviours();for(var w in y)if(y[w][o]){var p=y[w][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 h=o[c],y=0,w=h.length;y<w;y++)if(typeof h[y].token=="string")/keyword|support|storage/.test(h[y].token)&&s.push(h[y].regex);else if(typeof h[y].token=="object"){for(var p=0,u=h[y].token.length;p<u;p++)if(/keyword|support|storage/.test(h[y].token[p])){var c=h[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 h=this.$keywordList||this.$createKeywordList();return h.map(function(y){return{name:y,value:y,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(t.prototype),M.Mode=t}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(k,M,F){var v=k("./lib/dom"),f=function(){function g(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 g.prototype.getRowLength=function(a){var l;return this.lineWidgets?l=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:l=0,!this.$useWrapMode||!this.$wrapData[a]?1+l:this.$wrapData[a].length+1+l},g.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(l){l&&l.rowCount&&!l.hidden&&(a+=l.rowCount)}),a},g.prototype.$onChangeEditor=function(a){this.attach(a.editor)},g.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)))},g.prototype.detach=function(a){var l=this.editor;if(l){this.editor=null,l.widgetManager=null,l.renderer.off("beforeRender",this.measureWidgets),l.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(n){n&&n.el&&n.el.parentNode&&(n._inDocument=!1,n.el.parentNode.removeChild(n.el))})}},g.prototype.updateOnFold=function(a,l){var r=l.lineWidgets;if(!(!r||!a.action)){for(var n=a.data,i=n.start.row,t=n.end.row,e=a.action=="add",o=i+1;o<t;o++)r[o]&&(r[o].hidden=e);r[t]&&(e?r[i]?r[t].hidden=e:r[i]=r[t]:(r[i]==r[t]&&(r[i]=void 0),r[t].hidden=e))}},g.prototype.updateOnChange=function(a){var l=this.session.lineWidgets;if(l){var r=a.start.row,n=a.end.row-r;if(n!==0)if(a.action=="remove"){var i=l.splice(r+1,n);!l[r]&&i[i.length-1]&&(l[r]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(n);l[r]&&l[r].column!=null&&a.start.column>l[r].column&&r++,t.unshift(r,0),l.splice.apply(l,t),this.$updateRows()}}},g.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var l=!0;a.forEach(function(r,n){if(r)for(l=!1,r.row=n;r.$oldWidget;)r.$oldWidget.row=n,r=r.$oldWidget}),l&&(this.session.lineWidgets=null)}},g.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[a.row];return l&&(a.$oldWidget=l,l.el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},g.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var l=this.editor.renderer;a.html&&!a.el&&(a.el=v.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=v.createElement("div"),a.el.textContent=a.text),a.el&&(v.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&v.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",l.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/l.layerConfig.lineHeight);var r=this.session.getFoldAt(a.row,0);if(a.$fold=r,r){var n=this.session.lineWidgets;a.row==r.end.row&&!n[r.start.row]?n[r.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,l),this.onWidgetChanged(a),a},g.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 l=this.session.lineWidgets[a.row];if(l==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;l;){if(l.$oldWidget==a){l.$oldWidget=a.$oldWidget;break}l=l.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},g.prototype.getWidgetsAtRow=function(a){for(var l=this.session.lineWidgets,r=l&&l[a],n=[];r;)n.push(r),r=r.$oldWidget;return n},g.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},g.prototype.measureWidgets=function(a,l){var r=this.session._changedWidgets,n=l.layerConfig;if(!(!r||!r.length)){for(var i=1/0,t=0;t<r.length;t++){var e=r[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,l.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/n.characterWidth));var o=e.h/n.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=[]}},g.prototype.renderWidgets=function(a,l){var r=l.layerConfig,n=this.session.lineWidgets;if(n){for(var i=Math.min(this.firstRow,r.firstRow),t=Math.max(this.lastRow,r.lastRow,n.length);i>0&&!n[i];)i--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,l.$cursorLayer.config=r;for(var e=i;e<=t;e++){var o=n[e];if(!(!o||!o.el)){if(o.hidden){o.el.style.top=-100-(o.pixelHeight||0)+"px";continue}o._inDocument||(o._inDocument=!0,l.container.appendChild(o.el));var s=l.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;o.coverLine||(s+=r.lineHeight*this.session.getRowLineCount(o.row)),o.el.style.top=s-r.offset+"px";var c=o.coverGutter?0:l.gutterWidth;o.fixedWidth||(c-=l.scrollLeft),o.el.style.left=c+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=r.width+2*r.padding+"px"),o.fixedWidth?o.el.style.right=l.scrollBar.getWidth()+"px":o.el.style.right=""}}}},g}();M.LineWidgets=f}),ace.define("ace/apply_delta",["require","exports","module"],function(k,M,F){M.applyDelta=function(v,f,g){var a=f.start.row,l=f.start.column,r=v[a]||"";switch(f.action){case"insert":var n=f.lines;if(n.length===1)v[a]=r.substring(0,l)+f.lines[0]+r.substring(l);else{var i=[a,1].concat(f.lines);v.splice.apply(v,i),v[a]=r.substring(0,l)+v[a],v[a+f.lines.length-1]+=r.substring(l)}break;case"remove":var t=f.end.column,e=f.end.row;a===e?v[a]=r.substring(0,l)+r.substring(t):v.splice(a,e-a+1,r.substring(0,l)+v[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(k,M,F){var v=k("./lib/oop"),f=k("./lib/event_emitter").EventEmitter,g=function(){function r(n,i,t){this.$onChange=this.onChange.bind(this),this.attach(n),typeof i!="number"?this.setPosition(i.row,i.column):this.setPosition(i,t)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(n){if(!(n.start.row==n.end.row&&n.start.row!=this.row)&&!(n.start.row>this.row)){var i=l(n,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},r.prototype.setPosition=function(n,i,t){var e;if(t?e={row:n,column:i}:e=this.$clipPositionToDocument(n,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})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(n){this.document=n||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(n,i){var t={};return n>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):n<0?(t.row=0,t.column=0):(t.row=n,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,i))),i<0&&(t.column=0),t},r}();g.prototype.$insertRight=!1,v.implement(g.prototype,f);function a(r,n,i){var t=i?r.column<=n.column:r.column<n.column;return r.row<n.row||r.row==n.row&&t}function l(r,n,i){var t=r.action=="insert",e=(t?1:-1)*(r.end.row-r.start.row),o=(t?1:-1)*(r.end.column-r.start.column),s=r.start,c=t?s:r.end;return a(n,s,i)?{row:n.row,column:n.column}:a(c,n,!i)?{row:n.row+e,column:n.column+(n.row==c.row?o:0)}:{row:s.row,column:s.column}}M.Anchor=g}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(k,M,F){var v=k("./lib/oop"),f=k("./apply_delta").applyDelta,g=k("./lib/event_emitter").EventEmitter,a=k("./range").Range,l=k("./anchor").Anchor,r=function(){function n(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 n.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||"")},n.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},n.prototype.createAnchor=function(i,t){return new l(this,i,t)},n.prototype.$detectNewLine=function(i){var t=i.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:`
196
+ `,this._signal("changeNewLineMode")},n.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
197
+ `;case"unix":return`
198
+ `;default:return this.$autoNewLine||`
199
+ `}},n.prototype.setNewLineMode=function(i){this.$newLineMode!==i&&(this.$newLineMode=i,this._signal("changeNewLineMode"))},n.prototype.getNewLineMode=function(){return this.$newLineMode},n.prototype.isNewLine=function(i){return i==`\r
200
+ `||i=="\r"||i==`
201
+ `},n.prototype.getLine=function(i){return this.$lines[i]||""},n.prototype.getLines=function(i,t){return this.$lines.slice(i,t+1)},n.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},n.prototype.getLength=function(){return this.$lines.length},n.prototype.getTextRange=function(i){return this.getLinesForRange(i).join(this.getNewLineCharacter())},n.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},n.prototype.insertLines=function(i,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(i,t)},n.prototype.removeLines=function(i,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(i,t)},n.prototype.insertNewLine=function(i){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(i,["",""])},n.prototype.insert=function(i,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(i,this.$split(t))},n.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)},n.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}},n.prototype.clonePos=function(i){return{row:i.row,column:i.column}},n.prototype.pos=function(i,t){return{row:i,column:t}},n.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},n.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)},n.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)},n.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)},n.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)},n.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,h=o?t+1:t,y=o?0:this.getLine(h).length,w=new a(s,c,h,y),p=this.$lines.slice(i,t+1);return this.applyDelta({start:w.start,end:w.end,action:"remove",lines:this.getLinesForRange(w)}),p},n.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:["",""]})},n.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},n.prototype.applyDeltas=function(i){for(var t=0;t<i.length;t++)this.applyDelta(i[t])},n.prototype.revertDeltas=function(i){for(var t=i.length-1;t>=0;t--)this.revertDelta(i[t])},n.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):(f(this.$lines,i,t),this._signal("change",i)))},n.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)},n.prototype.$splitAndapplyLargeDelta=function(i,t){for(var e=i.lines,o=e.length-t+1,s=i.start.row,c=i.start.column,h=0,y=0;h<o;h=y){y+=t-1;var w=e.slice(h,y);w.push(""),this.applyDelta({start:this.pos(s+h,c),end:this.pos(s+y,c=0),action:i.action,lines:w},!0)}i.lines=e.slice(h),i.start.row=s+h,i.start.column=c,this.applyDelta(i,!0)},n.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()})},n.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}},n.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),h=t||0;h<c;++h)s+=e[h].length+o;return s+i.column},n.prototype.$split=function(i){return i.split(/\r\n|\r|\n/)},n}();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",v.implement(r.prototype,g),M.Document=r}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(k,M,F){var v=k("./lib/oop"),f=k("./lib/event_emitter").EventEmitter,g=function(){function a(l,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=l;var n=this;this.$worker=function(){if(n.running){for(var i=new Date,t=n.currentLine,e=-1,o=n.doc,s=t;n.lines[t];)t++;var c=o.getLength(),h=0;for(n.running=!1;t<c;){n.$tokenizeRow(t),e=t;do t++;while(n.lines[t]);if(h++,h%5===0&&new Date-i>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,e==-1&&(e=t),s<=e&&n.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(l,r){var n={first:l,last:r};this._signal("update",{data:n})},a.prototype.start=function(l){this.currentLine=Math.min(l||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(l){var r=l.start.row,n=l.end.row-r;if(n===0)this.lines[r]=null;else if(l.action=="remove")this.lines.splice(r,n+1,null),this.states.splice(r,n+1,null);else{var i=Array(n+1);i.unshift(r,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(l){return this.lines[l]||this.$tokenizeRow(l)},a.prototype.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},a.prototype.$tokenizeRow=function(l){var r=this.doc.getLine(l),n=this.states[l-1],i=this.tokenizer.getLineTokens(r,n,l);return this.states[l]+""!=i.state+""?(this.states[l]=i.state,this.lines[l+1]=null,this.currentLine>l+1&&(this.currentLine=l+1)):this.currentLine==l&&(this.currentLine=l+1),this.lines[l]=i.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();v.implement(g.prototype,f),M.BackgroundTokenizer=g}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(k,M,F){var v=k("./lib/lang"),f=k("./range").Range,g=function(){function a(l,r,n){n===void 0&&(n="text"),this.setRegexp(l),this.clazz=r,this.type=n,this.docLen=0}return a.prototype.setRegexp=function(l){this.regExp+""!=l+""&&(this.regExp=l,this.cache=[])},a.prototype.update=function(l,r,n,i){if(this.regExp){for(var t=i.firstRow,e=i.lastRow,o={},s=n.$editor&&n.$editor.$search,c=s&&s.$isMultilineSearch(n.$editor.getLastSearchOptions()),h=t;h<=e;h++){var y=this.cache[h];if(y==null||n.getValue().length!=this.docLen){if(c){y=[];var w=s.$multiLineForward(n,this.regExp,h,e);if(w){var p=w.endRow<=e?w.endRow-1:e;p>h&&(h=p),y.push(new f(w.startRow,w.startCol,w.endRow,w.endCol))}y.length>this.MAX_RANGES&&(y=y.slice(0,this.MAX_RANGES))}else y=v.getMatchOffsets(n.getLine(h),this.regExp),y.length>this.MAX_RANGES&&(y=y.slice(0,this.MAX_RANGES)),y=y.map(function(A){return new f(h,A.offset,h,A.offset+A.length)});this.cache[h]=y.length?y:""}if(y.length!==0)for(var u=y.length;u--;){var C=y[u].toScreenRange(n),_=C.toString();o[_]||(o[_]=!0,r.drawSingleLineMarker(l,C,this.clazz,i))}}this.docLen=n.getValue().length}},a}();g.prototype.MAX_RANGES=500,M.SearchHighlight=g}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(k,M,F){var v=function(){function p(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return p.prototype.addSession=function(u){this.$session=u},p.prototype.add=function(u,C,_){if(!this.$fromUndo&&u!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),C===!1||!this.lastDeltas){this.lastDeltas=[];var A=this.$undoStack.length;A>this.$undoDepth-1&&this.$undoStack.splice(0,A-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),u.id=this.$rev=++this.$maxRev}(u.action=="remove"||u.action=="insert")&&(this.$lastDelta=u),this.lastDeltas.push(u)}},p.prototype.addSelection=function(u,C){this.selections.push({value:u,rev:C||this.$rev})},p.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},p.prototype.markIgnored=function(u,C){C==null&&(C=this.$rev+1);for(var _=this.$undoStack,A=_.length;A--;){var x=_[A][0];if(x.id<=u)break;x.id<C&&(x.ignore=!0)}this.lastDeltas=null},p.prototype.getSelection=function(u,C){for(var _=this.selections,A=_.length;A--;){var x=_[A];if(x.rev<u)return C&&(x=_[A+1]),x}},p.prototype.getRevision=function(){return this.$rev},p.prototype.getDeltas=function(u,C){C==null&&(C=this.$rev+1);for(var _=this.$undoStack,A=null,x=0,E=_.length;E--;){var S=_[E][0];if(S.id<C&&!A&&(A=E+1),S.id<=u){x=E+1;break}}return _.slice(x,A)},p.prototype.getChangedRanges=function(u,C){C==null&&(C=this.$rev+1)},p.prototype.getChangedLines=function(u,C){C==null&&(C=this.$rev+1)},p.prototype.undo=function(u,C){this.lastDeltas=null;var _=this.$undoStack;if(f(_,_.length)){u||(u=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var A=_.pop(),x=null;return A&&(x=u.undoChanges(A,C),this.$redoStack.push(A),this.$syncRev()),this.$fromUndo=!1,x}},p.prototype.redo=function(u,C){if(this.lastDeltas=null,u||(u=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var _=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);w(this.$redoStack,_),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(E){E[0].id=++this.$maxRev},this)}var A=this.$redoStack.pop(),x=null;return A&&(x=u.redoChanges(A,C),this.$undoStack.push(A),this.$syncRev()),this.$fromUndo=!1,x},p.prototype.$syncRev=function(){var u=this.$undoStack,C=u[u.length-1],_=C&&C[0].id||0;this.$redoStackBaseRev=_,this.$rev=_},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(u){u==null&&(u=this.$rev),this.mark=u},p.prototype.isAtBookmark=function(){return this.$rev===this.mark},p.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},p.prototype.fromJSON=function(u){this.reset(),this.$undoStack=u.$undoStack,this.$redoStack=u.$redoStack},p.prototype.$prettyPrint=function(u){return u?n(u):n(this.$undoStack)+`
202
+ ---
203
+ `+n(this.$redoStack)},p}();v.prototype.hasUndo=v.prototype.canUndo,v.prototype.hasRedo=v.prototype.canRedo,v.prototype.isClean=v.prototype.isAtBookmark,v.prototype.markClean=v.prototype.bookmark;function f(p,u){for(var C=u;C--;){var _=p[C];if(_&&!_[0].ignore){for(;C<u-1;){var A=e(p[C],p[C+1]);p[C]=A[0],p[C+1]=A[1],C++}return!0}}}var g=k("./range").Range,a=g.comparePoints;g.comparePoints;function l(p){return{row:p.row,column:p.column}}function r(p){return{start:l(p.start),end:l(p.end),action:p.action,lines:p.lines.slice()}}function n(p){if(p=p||this,Array.isArray(p))return p.map(n).join(`
204
+ `);var u="";return p.action?(u=p.action=="insert"?"+":"-",u+="["+p.lines+"]"):p.value&&(Array.isArray(p.value)?u=p.value.map(i).join(`
205
+ `):u=i(p.value)),p.start&&(u+=i(p)),(p.id||p.rev)&&(u+=" ("+(p.id||p.rev)+")"),u}function i(p){return p.start.row+":"+p.start.column+"=>"+p.end.row+":"+p.end.column}function t(p,u){var C=p.action=="insert",_=u.action=="insert";if(C&&_)if(a(u.start,p.end)>=0)s(u,p,-1);else if(a(u.start,p.start)<=0)s(p,u,1);else return null;else if(C&&!_)if(a(u.start,p.end)>=0)s(u,p,-1);else if(a(u.end,p.start)<=0)s(p,u,-1);else return null;else if(!C&&_)if(a(u.start,p.start)>=0)s(u,p,1);else if(a(u.start,p.start)<=0)s(p,u,1);else return null;else if(!C&&!_)if(a(u.start,p.start)>=0)s(u,p,1);else if(a(u.end,p.start)<=0)s(p,u,-1);else return null;return[u,p]}function e(p,u){for(var C=p.length;C--;)for(var _=0;_<u.length;_++)if(!t(p[C],u[_])){for(;C<p.length;){for(;_--;)t(u[_],p[C]);_=u.length,C++}return[p,u]}return p.selectionBefore=u.selectionBefore=p.selectionAfter=u.selectionAfter=null,[u,p]}function o(p,u){var C=p.action=="insert",_=u.action=="insert";if(C&&_)a(p.start,u.start)<0?s(u,p,1):s(p,u,1);else if(C&&!_)a(p.start,u.end)>=0?s(p,u,-1):(a(p.start,u.start)<=0||s(p,g.fromPoints(u.start,p.start),-1),s(u,p,1));else if(!C&&_)a(u.start,p.end)>=0?s(u,p,-1):(a(u.start,p.start)<=0||s(u,g.fromPoints(p.start,u.start),-1),s(p,u,1));else if(!C&&!_)if(a(u.start,p.end)>=0)s(u,p,-1);else if(a(u.end,p.start)<=0)s(p,u,-1);else{var A,x;return a(p.start,u.start)<0&&(A=p,p=h(p,u.start)),a(p.end,u.end)>0&&(x=h(p,u.end)),c(u.end,p.start,p.end,-1),x&&!A&&(p.lines=x.lines,p.start=x.start,p.end=x.end,x=p),[u,A,x].filter(Boolean)}return[u,p]}function s(p,u,C){c(p.start,u.start,u.end,C),c(p.end,u.start,u.end,C)}function c(p,u,C,_){p.row==(_==1?u:C).row&&(p.column+=_*(C.column-u.column)),p.row+=_*(C.row-u.row)}function h(p,u){var C=p.lines,_=p.end;p.end=l(u);var A=p.end.row-p.start.row,x=C.splice(A,C.length),E=A?u.column:u.column-p.start.column;C.push(x[0].substring(0,E)),x[0]=x[0].substr(E);var S={start:l(u),end:_,lines:x,action:p.action};return S}function y(p,u){u=r(u);for(var C=p.length;C--;){for(var _=p[C],A=0;A<_.length;A++){var x=_[A],E=o(x,u);u=E[0],E.length!=2&&(E[2]?(_.splice(A+1,1,E[1],E[2]),A++):E[1]||(_.splice(A,1),A--))}_.length||p.splice(C,1)}return p}function w(p,u){for(var C=0;C<u.length;C++)for(var _=u[C],A=0;A<_.length;A++)y(p,_[A])}M.UndoManager=v}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(k,M,F){var v=k("../range").Range,f=function(){function g(a,l){this.foldData=a,Array.isArray(l)?this.folds=l:l=this.folds=[l];var r=l[l.length-1];this.range=new v(l[0].start.row,l[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(n){n.setFoldLine(this)},this)}return g.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(l){l.start.row+=a,l.end.row+=a})},g.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(l,r){return-l.range.compareEnd(r.start.row,r.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},g.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},g.prototype.walk=function(a,l,r){var n=0,i=this.folds,t,e,o,s=!0;l==null&&(l=this.end.row,r=this.end.column);for(var c=0;c<i.length;c++){if(t=i[c],e=t.range.compareStart(l,r),e==-1){a(null,l,r,n,s);return}if(o=a(null,t.start.row,t.start.column,n,s),o=!o&&a(t.placeholder,t.start.row,t.start.column,n),o||e===0)return;s=!t.sameRow,n=t.end.column}a(null,l,r,n,s)},g.prototype.getNextFoldTo=function(a,l){for(var r,n,i=0;i<this.folds.length;i++){if(r=this.folds[i],n=r.range.compareEnd(a,l),n==-1)return{fold:r,kind:"after"};if(n===0)return{fold:r,kind:"inside"}}return null},g.prototype.addRemoveChars=function(a,l,r){var n=this.getNextFoldTo(a,l),i,t;if(n){if(i=n.fold,n.kind=="inside"&&i.start.column!=l&&i.start.row!=a)window.console&&window.console.log(a,l,i);else if(i.start.row==a){t=this.folds;var e=t.indexOf(i);for(e===0&&(this.start.column+=r),e;e<t.length;e++){if(i=t[e],i.start.column+=r,!i.sameRow)return;i.end.column+=r}this.end.column+=r}}},g.prototype.split=function(a,l){var r=this.getNextFoldTo(a,l);if(!r||r.kind=="inside")return null;var n=r.fold,i=this.folds,t=this.foldData,e=i.indexOf(n),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 g(t,i);return t.splice(t.indexOf(this)+1,0,s),s},g.prototype.merge=function(a){for(var l=a.folds,r=0;r<l.length;r++)this.addFold(l[r]);var n=this.foldData;n.splice(n.indexOf(a),1)},g.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(l){a.push(" "+l.toString())}),a.push("]"),a.join(`
206
+ `)},g.prototype.idxToPosition=function(a){for(var l=0,r=0;r<this.folds.length;r++){var n=this.folds[r];if(a-=n.start.column-l,a<0)return{row:n.start.row,column:n.start.column+a};if(a-=n.placeholder.length,a<0)return n.start;l=n.end.column}return{row:this.end.row,column:this.end.column+a}},g}();M.FoldLine=f}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(k,M,F){var v=k("./range").Range,f=v.comparePoints,g=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(l,r,n){for(var i=this.ranges,t=n||0;t<i.length;t++){var e=i[t],o=f(l,e.end);if(!(o>0)){var s=f(l,e.start);return o===0?r&&s!==0?-t-2:t:s>0||s===0&&!r?t:-t-1}}return-t-1},a.prototype.add=function(l){var r=!l.isEmpty(),n=this.pointIndex(l.start,r);n<0&&(n=-n-1);var i=this.pointIndex(l.end,r,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,l)},a.prototype.addList=function(l){for(var r=[],n=l.length;n--;)r.push.apply(r,this.add(l[n]));return r},a.prototype.substractPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges.splice(r,1)},a.prototype.merge=function(){var l=[],r=this.ranges;r=r.sort(function(o,s){return f(o.start,s.start)});for(var n=r[0],i,t=1;t<r.length;t++){i=n,n=r[t];var e=f(i.end,n.start);e<0||e==0&&!i.isEmpty()&&!n.isEmpty()||(f(i.end,n.end)<0&&(i.end.row=n.end.row,i.end.column=n.end.column),r.splice(t,1),l.push(n),n=i,t--)}return this.ranges=r,l},a.prototype.contains=function(l,r){return this.pointIndex({row:l,column:r})>=0},a.prototype.containsPoint=function(l){return this.pointIndex(l)>=0},a.prototype.rangeAtPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges[r]},a.prototype.clipRows=function(l,r){var n=this.ranges;if(n[0].start.row>r||n[n.length-1].start.row<l)return[];var i=this.pointIndex({row:l,column:0});i<0&&(i=-i-1);var t=this.pointIndex({row:r,column:0},i);t<0&&(t=-t-1);for(var e=[],o=i;o<t;o++)e.push(n[o]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(l){this.session&&this.detach(),this.session=l,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(l){for(var r=l.start,n=l.end,i=r.row,t=n.row,e=this.ranges,o=0,s=e.length;o<s;o++){var c=e[o];if(c.end.row>=i)break}if(l.action=="insert")for(var h=t-i,y=-r.column+n.column;o<s;o++){var c=e[o];if(c.start.row>i)break;if(c.start.row==i&&c.start.column>=r.column&&(c.start.column==r.column&&this.$bias<=0||(c.start.column+=y,c.start.row+=h)),c.end.row==i&&c.end.column>=r.column){if(c.end.column==r.column&&this.$bias<0)continue;c.end.column==r.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+=h}}else for(var h=i-t,y=r.column-n.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&&r.column<c.end.column)?(c.end.row=i,c.end.column=r.column):c.end.row==t?c.end.column<=n.column?(h||c.end.column>r.column)&&(c.end.column=r.column,c.end.row=r.row):(c.end.column+=y,c.end.row+=h):c.end.row>t&&(c.end.row+=h),c.start.row<t&&(i<c.start.row||i==c.start.row&&r.column<c.start.column)?(c.start.row=i,c.start.column=r.column):c.start.row==t?c.start.column<=n.column?(h||c.start.column>r.column)&&(c.start.column=r.column,c.start.row=r.row):(c.start.column+=y,c.start.row+=h):c.start.row>t&&(c.start.row+=h)}if(h!=0&&o<s)for(;o<s;o++){var c=e[o];c.start.row+=h,c.end.row+=h}},a}();g.prototype.comparePoints=f,M.RangeList=g}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(k,M,F){var v=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)}}(),f=k("../range_list").RangeList,g=function(i){v(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)){l(e,this.start);for(var y=e.start.row,w=e.start.column,o=0,s=-1;o<this.subFolds.length&&(s=this.subFolds[o].range.compare(y,w),s==1);o++);var c=this.subFolds[o],h=0;if(s==0){if(c.range.containsRange(e))return c.addSubFold(e);h=1}for(var y=e.range.end.row,w=e.range.end.column,p=o,s=-1;p<this.subFolds.length&&(s=this.subFolds[p].range.compare(y,w),s==1);p++);s==0&&p++;for(var u=this.subFolds.splice(o,p-o,e),C=s==0?u.length-1:u.length,_=h;_<C;_++)e.addSubFold(u[_]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return n(e,this.start)},t}(f);function a(i,t){i.row-=t.row,i.row==0&&(i.column-=t.column)}function l(i,t){a(i.start,t),a(i.end,t)}function r(i,t){i.row==0&&(i.column+=t.column),i.row+=t.row}function n(i,t){r(i.start,t),r(i.end,t)}M.Fold=g}),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,M,F){var v=k("../range").Range,f=k("./fold_line").FoldLine,g=k("./fold").Fold,a=k("../token_iterator").TokenIterator,l=k("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(n,i,t){var e=this.getFoldLine(n);if(!e)return null;for(var o=e.folds,s=0;s<o.length;s++){var c=o[s].range;if(c.contains(n,i)){if(t==1&&c.isEnd(n,i)&&!c.isEmpty())continue;if(t==-1&&c.isStart(n,i)&&!c.isEmpty())continue;return o[s]}}},this.getFoldsInRange=function(n){var i=n.start,t=n.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(n);if(c!=2){if(c==-2)break;for(var h=e[s].folds,y=0;y<h.length;y++){var w=h[y];if(c=w.range.compareRange(n),c==-2)break;if(c==2)continue;if(c==42)break;o.push(w)}}}return i.column-=1,t.column+=1,o},this.getFoldsInRangeList=function(n){if(Array.isArray(n)){var i=[];n.forEach(function(t){i=i.concat(this.getFoldsInRange(t))},this)}else var i=this.getFoldsInRange(n);return i},this.getAllFolds=function(){for(var n=[],i=this.$foldData,t=0;t<i.length;t++)for(var e=0;e<i[t].folds.length;e++)n.push(i[t].folds[e]);return n},this.getFoldStringAt=function(n,i,t,e){if(e=e||this.getFoldLine(n),!e)return null;for(var o={end:{column:0}},s,c,h=0;h<e.folds.length;h++){c=e.folds[h];var y=c.range.compareEnd(n,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(n,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<=n&&o.end.row>=n)return o;if(o.end.row>n)return null}return null},this.getNextFoldLine=function(n,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>=n)return o}return null},this.getFoldedRowCount=function(n,i){for(var t=this.$foldData,e=i-n+1,o=0;o<t.length;o++){var s=t[o],c=s.end.row,h=s.start.row;if(c>=i){h<i&&(h>=n?e-=i-h:e=0);break}else c>=n&&(h>=n?e-=c-h:e-=c-n+1)}return e},this.$addFoldLine=function(n){return this.$foldData.push(n),this.$foldData.sort(function(i,t){return i.start.row-t.start.row}),n},this.addFold=function(n,i){var t=this.$foldData,e=!1,o;n instanceof g?o=n:(o=new g(i,n),o.collapseChildren=i.collapseChildren),this.$clipRangeToDocument(o.range);var s=o.start.row,c=o.start.column,h=o.end.row,y=o.end.column,w=this.getFoldAt(s,c,1),p=this.getFoldAt(h,y,-1);if(w&&p==w)return w.addSubFold(o);w&&!w.range.isStart(s,c)&&this.removeFold(w),p&&!p.range.isEnd(h,y)&&this.removeFold(p);var u=this.getFoldsInRange(o.range);u.length>0&&(this.removeFolds(u),o.collapseChildren||u.forEach(function(x){o.addSubFold(x)}));for(var C=0;C<t.length;C++){var _=t[C];if(h==_.start.row){_.addFold(o),e=!0;break}else if(s==_.end.row){if(_.addFold(o),e=!0,!o.sameRow){var A=t[C+1];if(A&&A.start.row==h){_.merge(A);break}}break}else if(h<=_.start.row)break}return e||(_=this.$addFoldLine(new f(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(_.start.row,_.start.row):this.$updateRowLengthCache(_.start.row,_.start.row),this.$modified=!0,this._signal("changeFold",{data:o,action:"add"}),o},this.addFolds=function(n){n.forEach(function(i){this.addFold(i)},this)},this.removeFold=function(n){var i=n.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(n.end.row,n.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(n.start.row,n.start.column))s.shift(),i.start.row=s[0].start.row,i.start.column=s[0].start.column;else if(n.sameRow)s.splice(s.indexOf(n),1);else{var c=i.split(n.start.row,n.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:n,action:"remove"})},this.removeFolds=function(n){for(var i=[],t=0;t<n.length;t++)i.push(n[t]);i.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(n){this.removeFold(n),n.subFolds.forEach(function(i){n.restoreRange(i),this.addFold(i)},this),n.collapseChildren>0&&this.foldAll(n.start.row+1,n.end.row,n.collapseChildren-1),n.subFolds=[]},this.expandFolds=function(n){n.forEach(function(i){this.expandFold(i)},this)},this.unfold=function(n,i){var t,e;if(n==null)t=new v(0,0,this.getLength(),0),i==null&&(i=!0);else if(typeof n=="number")t=new v(n,0,n,this.getLine(n).length);else if("row"in n)t=v.fromPoints(n,n);else{if(Array.isArray(n))return e=[],n.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=n}e=this.getFoldsInRangeList(t);for(var o=e;e.length==1&&v.comparePoints(e[0].start,t.start)<0&&v.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(n,i){return!!this.getFoldLine(n,i)},this.getRowFoldEnd=function(n,i){var t=this.getFoldLine(n,i);return t?t.end.row:n},this.getRowFoldStart=function(n,i){var t=this.getFoldLine(n,i);return t?t.start.row:n},this.getFoldDisplayLine=function(n,i,t,e,o){e==null&&(e=n.start.row),o==null&&(o=0),i==null&&(i=n.end.row),t==null&&(t=this.getLine(i).length);var s=this.doc,c="";return n.walk(function(h,y,w,p){if(!(y<e)){if(y==e){if(w<o)return;p=Math.max(o,p)}h!=null?c+=h:c+=s.getLine(y).substring(p,w)}},i,t),c},this.getDisplayLine=function(n,i,t,e){var o=this.getFoldLine(n);if(o)return this.getFoldDisplayLine(o,n,i,t,e);var s;return s=this.doc.getLine(n),s.substring(e||0,i||s.length)},this.$cloneFoldData=function(){var n=[];return n=this.$foldData.map(function(i){var t=i.folds.map(function(e){return e.clone()});return new f(n,t)}),n},this.toggleFold=function(n){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 if(n){var c=this.getFoldLine(s.row);c&&this.expandFolds(c.folds);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 h=this.getFoldsInRange(t);if(n&&h.length){this.expandFolds(h);return}else h.length==1&&(e=h[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var y="...";if(!t.isMultiLine()){if(y=this.getTextRange(t),y.length<4)return;y=y.trim().substring(0,2)+".."}this.addFold(y,t)},this.getCommentFoldRange=function(n,i,t){var e=new a(this,n,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),h=new v;if(t!=1){do o=e.stepBackward();while(o&&c.test(o.type));o=e.stepForward()}h.start.row=e.getCurrentTokenRow(),h.start.column=e.getCurrentTokenColumn()+o.value.length,e=new a(this,n,i);var y=this.getState(e.$row);if(t!=-1){var w=-1;do if(o=e.stepForward(),w==-1){var p=this.getState(e.$row);y.toString()!==p.toString()&&(w=e.$row)}else if(e.$row>w)break;while(o&&c.test(o.type));o=e.stepBackward()}else o=e.getCurrentToken();return h.end.row=e.getCurrentTokenRow(),h.end.column=e.getCurrentTokenColumn(),h.start.row==h.end.row&&h.start.column>h.end.column?void 0:h}},this.foldAll=function(n,i,t,e){t==null&&(t=1e5);var o=this.foldWidgets;if(o){i=i||this.getLength(),n=n||0;for(var s=n;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>=n&&(s=c.end.row,c.collapseChildren=t,this.addFold("...",c))}}},this.foldToLevel=function(n){for(this.foldAll();n-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var n=this;this.foldAll(null,null,null,function(i){for(var t=n.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(n){if(!this.$foldStyles[n])throw new Error("invalid fold style: "+n+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=n){this.$foldStyle=n,n=="manual"&&this.unfold();var i=this.$foldMode;this.$setFolding(null),this.$setFolding(i)}},this.$setFolding=function(n){if(this.$foldMode!=n){if(this.$foldMode=n,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!n||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=n.getFoldWidget.bind(n,this,this.$foldStyle),this.getFoldWidgetRange=n.getFoldWidgetRange.bind(n,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(n,i){var t=this.foldWidgets;if(!t||i&&t[n])return{};for(var e=n-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>=n)break}e--}return{range:e!==-1&&c,firstRange:o}},this.onFoldWidgetClick=function(n,i){i instanceof l&&(i=i.domEvent);var t={children:i.shiftKey,all:i.ctrlKey||i.metaKey,siblings:i.altKey},e=this.$toggleFoldWidget(n,t);if(!e){var o=i.target||i.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(n,i){if(this.getFoldWidget){var t=this.getFoldWidget(n),e=this.getLine(n),o=t==="end"?-1:1,s=this.getFoldAt(n,o===-1?0:e.length,o);if(s)return i.children||i.all?this.removeFold(s):this.expandFold(s),s;var c=this.getFoldWidgetRange(n,!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 h=this.getParentFoldRangeData(n);if(h.range)var y=h.range.start.row+1,w=h.range.end.row;this.foldAll(y,w,i.all?1e4:0)}else i.children?(w=c?c.end.row:this.getLength(),this.foldAll(n+1,w,i.all?1e4:0)):c&&(i.all&&(c.collapseChildren=1e4),this.addFold("...",c));return c}},this.toggleFoldWidget=function(n){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(n){var i=n.start.row,t=n.end.row-i;if(t===0)this.foldWidgets[i]=null;else if(n.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(n){var i=n.data;i.first!=i.last&&this.foldWidgets.length>i.first&&this.foldWidgets.splice(i.first,this.foldWidgets.length)}}M.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(k,M,F){var v=k("../token_iterator").TokenIterator,f=k("../range").Range;function g(){this.findMatchingBracket=function(a,l){if(a.column==0)return null;var r=l||this.getLine(a.row).charAt(a.column-1);if(r=="")return null;var n=r.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],a):this.$findOpeningBracket(n[2],a):null},this.getBracketRange=function(a){var l=this.getLine(a.row),r=!0,n,i=l.charAt(a.column-1),t=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(t||(i=l.charAt(a.column),a={row:a.row,column:a.column+1},t=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],a);if(!e)return null;n=f.fromPoints(a,e),r||(n.end.column++,n.start.column--),n.cursor=n.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;n=f.fromPoints(e,a),r||(n.start.column++,n.end.column--),n.cursor=n.start}return n},this.getMatchingBracketRanges=function(a,l){var r=this.getLine(a.row),n=/([\(\[\{])|([\)\]\}])/,i=!l&&r.charAt(a.column-1),t=i&&i.match(n);if(t||(i=(l===void 0||l)&&r.charAt(a.column),a={row:a.row,column:a.column+1},t=i&&i.match(n)),!t)return null;var e=new f(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 f(o.row,o.column,o.row,o.column+1);return[e,s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,l,r){var n=this.$brackets[a],i=1,t=new v(this,l.row,l.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var o=l.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;o>=0;){var c=s.charAt(o);if(c==n){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&&!r.test(e.type));if(e==null)break;s=e.value,o=s.length-1}return null}},this.$findClosingBracket=function(a,l,r){var n=this.$brackets[a],i=1,t=new v(this,l.row,l.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var o=l.column-t.getCurrentTokenColumn();;){for(var s=e.value,c=s.length;o<c;){var h=s.charAt(o);if(h==n){if(i-=1,i==0)return{row:t.getCurrentTokenRow(),column:o+t.getCurrentTokenColumn()}}else h==a&&(i+=1);o+=1}do e=t.stepForward();while(e&&!r.test(e.type));if(e==null)break;o=0}return null}},this.getMatchingTags=function(a){var l=new v(this,a.row,a.column),r=this.$findTagName(l);if(r){var n=l.stepBackward();return n.value==="<"?this.$findClosingTag(l,r):this.$findOpeningTag(l,r)}},this.$findTagName=function(a){var l=a.getCurrentToken(),r=!1,n=!1;if(l&&l.type.indexOf("tag-name")===-1)do n?l=a.stepBackward():l=a.stepForward(),l&&(l.value==="/>"?n=!0:l.type.indexOf("tag-name")!==-1&&(r=!0));while(l&&!r);return l},this.$findClosingTag=function(a,l){var r,n=l.value,i=l.value,t=0,e=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);l=a.stepForward();var o=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length),s=!1;do{if(r=l,r.type.indexOf("tag-close")!==-1&&!s){var c=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(l=a.stepForward(),l){if(l.value===">"&&!s){var c=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(l.type.indexOf("tag-name")!==-1){if(n=l.value,i===n){if(r.value==="<")t++;else if(r.value==="</"&&(t--,t<0)){a.stepBackward();var h=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);l=a.stepForward();var y=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=a.stepForward()),l&&l.value===">")var w=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(i===n&&l.value==="/>"&&(t--,t<0))var h=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),y=h,w=y,c=new f(o.end.row,o.end.column,o.end.row,o.end.column+1)}}while(l&&t>=0);if(e&&c&&h&&w&&o&&y)return{openTag:new f(e.start.row,e.start.column,c.end.row,c.end.column),closeTag:new f(h.start.row,h.start.column,w.end.row,w.end.column),openTagName:o,closeTagName:y}},this.$findOpeningTag=function(a,l){var r=a.getCurrentToken(),n=l.value,i=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),o=e+2,s=new f(t,e,t,o);a.stepForward();var c=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=a.stepForward()),!(!l||l.value!==">")){var h=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(l=r,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),o=e+l.value.length,r=a.stepBackward(),l){if(l.type.indexOf("tag-name")!==-1){if(n===l.value)if(r.value==="<"){if(i++,i>0){var y=new f(t,e,t,o),w=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do l=a.stepForward();while(l&&l.value!==">");var p=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else r.value==="</"&&i--}else if(l.value==="/>"){for(var u=0,C=r;C;){if(C.type.indexOf("tag-name")!==-1&&C.value===n){i--;break}else if(C.value==="<")break;C=a.stepBackward(),u++}for(var _=0;_<u;_++)a.stepForward()}}while(r&&i<=0);if(w&&p&&s&&h&&y&&c)return{openTag:new f(w.start.row,w.start.column,p.end.row,p.end.column),closeTag:new f(s.start.row,s.start.column,h.end.row,h.end.column),openTagName:y,closeTagName:c}}}}M.BracketMatch=g}),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,M,F){var v=k("./lib/oop"),f=k("./lib/lang"),g=k("./bidihandler").BidiHandler,a=k("./config"),l=k("./lib/event_emitter").EventEmitter,r=k("./selection").Selection,n=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,h=function(){function S($,m){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"+ ++S.$uid,this.$foldData.toString=function(){return this.join(`
207
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new o(new n().getTokenizer(),this);var d=this;this.bgTokenizer.on("update",function(b){d._signal("tokenizerUpdate",b)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof $!="object"||!$.getLine)&&($=new e($)),this.setDocument($),this.selection=new r(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new g(this),a.resetOptions(this),this.setMode(m),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return S.prototype.$initOperationListeners=function(){var $=this;this.curOp=null,this.on("change",function(){$.curOp||($.startOperation(),$.curOp.selectionBefore=$.$lastSel),$.curOp.docChanged=!0},!0),this.on("changeSelection",function(){$.curOp||($.startOperation(),$.curOp.selectionBefore=$.$lastSel),$.curOp.selectionChanged=!0},!0),this.$operationResetTimer=f.delayedCall(this.endOperation.bind(this,!0))},S.prototype.startOperation=function($){if(this.curOp){if(!$||this.curOp.command)return;this.prevOp=this.curOp}$||($={}),this.$operationResetTimer.schedule(),this.curOp={command:$.command||{},args:$.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",$)},S.prototype.endOperation=function($){if(this.curOp){if($&&$.returnValue===!1){this.curOp=null,this._signal("endOperation",$);return}if($==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var m=this.selection.toJSON();this.curOp.selectionAfter=m,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(m),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",$)}},S.prototype.setDocument=function($){this.doc&&this.doc.off("change",this.$onChange),this.doc=$,$.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},S.prototype.getDocument=function(){return this.doc},Object.defineProperty(S.prototype,"widgetManager",{get:function(){var $=new t(this);return this.widgetManager=$,this.$editor&&$.attach(this.$editor),$},set:function($){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:$})},enumerable:!1,configurable:!0}),S.prototype.$resetRowCache=function($){if(!$){this.$docRowCache=[],this.$screenRowCache=[];return}var m=this.$docRowCache.length,d=this.$getRowCacheIndex(this.$docRowCache,$)+1;m>d&&(this.$docRowCache.splice(d,m),this.$screenRowCache.splice(d,m))},S.prototype.$getRowCacheIndex=function($,m){for(var d=0,b=$.length-1;d<=b;){var L=d+b>>1,T=$[L];if(m>T)d=L+1;else if(m<T)b=L-1;else return L}return d-1},S.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},S.prototype.onChangeFold=function($){var m=$.data;this.$resetRowCache(m.start.row)},S.prototype.onChange=function($){this.$modified=!0,this.$bidiHandler.onChange($),this.$resetRowCache($.start.row);var m=this.$updateInternalDataOnChange($);!this.$fromUndo&&this.$undoManager&&(m&&m.length&&(this.$undoManager.add({action:"removeFolds",folds:m},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add($,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange($),this._signal("change",$)},S.prototype.onSelectionChange=function(){this._signal("changeSelection")},S.prototype.setValue=function($){this.doc.setValue($),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},S.fromJSON=function($){typeof $=="string"&&($=JSON.parse($));var m=new c;m.$undoStack=$.history.undo,m.$redoStack=$.history.redo,m.mark=$.history.mark,m.$rev=$.history.rev;var d=new S($.value);return $.folds.forEach(function(b){d.addFold("...",i.fromPoints(b.start,b.end))}),d.setAnnotations($.annotations),d.setBreakpoints($.breakpoints),d.setMode($.mode),d.setScrollLeft($.scrollLeft),d.setScrollTop($.scrollTop),d.setUndoManager(m),d.selection.fromJSON($.selection),d},S.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function($){return $.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},S.prototype.toString=function(){return this.doc.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.getState=function($){return this.bgTokenizer.getState($)},S.prototype.getTokens=function($){return this.bgTokenizer.getTokens($)},S.prototype.getTokenAt=function($,m){var d=this.bgTokenizer.getTokens($),b,L=0;if(m==null){var T=d.length-1;L=this.getLine($).length}else for(var T=0;T<d.length&&(L+=d[T].value.length,!(L>=m));T++);return b=d[T],b?(b.index=T,b.start=L-b.value.length,b):null},S.prototype.setUndoManager=function($){if(this.$undoManager=$,this.$informUndoManager&&this.$informUndoManager.cancel(),$){var m=this;$.addSession(this),this.$syncInformUndoManager=function(){m.$informUndoManager.cancel(),m.mergeUndoDeltas=!1},this.$informUndoManager=f.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},S.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},S.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},S.prototype.getTabString=function(){return this.getUseSoftTabs()?f.stringRepeat(" ",this.getTabSize()):" "},S.prototype.setUseSoftTabs=function($){this.setOption("useSoftTabs",$)},S.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},S.prototype.setTabSize=function($){this.setOption("tabSize",$)},S.prototype.getTabSize=function(){return this.$tabSize},S.prototype.isTabStop=function($){return this.$useSoftTabs&&$.column%this.$tabSize===0},S.prototype.setNavigateWithinSoftTabs=function($){this.setOption("navigateWithinSoftTabs",$)},S.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},S.prototype.setOverwrite=function($){this.setOption("overwrite",$)},S.prototype.getOverwrite=function(){return this.$overwrite},S.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},S.prototype.addGutterDecoration=function($,m){this.$decorations[$]||(this.$decorations[$]=""),this.$decorations[$]+=" "+m,this._signal("changeBreakpoint",{})},S.prototype.removeGutterCustomWidget=function($){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget($)},S.prototype.addGutterCustomWidget=function($,m){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget($,m)},S.prototype.removeGutterDecoration=function($,m){this.$decorations[$]=(this.$decorations[$]||"").replace(" "+m,""),this._signal("changeBreakpoint",{})},S.prototype.getBreakpoints=function(){return this.$breakpoints},S.prototype.setBreakpoints=function($){this.$breakpoints=[];for(var m=0;m<$.length;m++)this.$breakpoints[$[m]]="ace_breakpoint";this._signal("changeBreakpoint",{})},S.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},S.prototype.setBreakpoint=function($,m){m===void 0&&(m="ace_breakpoint"),m?this.$breakpoints[$]=m:delete this.$breakpoints[$],this._signal("changeBreakpoint",{})},S.prototype.clearBreakpoint=function($){delete this.$breakpoints[$],this._signal("changeBreakpoint",{})},S.prototype.addMarker=function($,m,d,b){var L=this.$markerId++,T={range:$,type:d||"line",renderer:typeof d=="function"?d:null,clazz:m,inFront:!!b,id:L};return b?(this.$frontMarkers[L]=T,this._signal("changeFrontMarker")):(this.$backMarkers[L]=T,this._signal("changeBackMarker")),L},S.prototype.addDynamicMarker=function($,m){if($.update){var d=this.$markerId++;return $.id=d,$.inFront=!!m,m?(this.$frontMarkers[d]=$,this._signal("changeFrontMarker")):(this.$backMarkers[d]=$,this._signal("changeBackMarker")),$}},S.prototype.removeMarker=function($){var m=this.$frontMarkers[$]||this.$backMarkers[$];if(m){var d=m.inFront?this.$frontMarkers:this.$backMarkers;delete d[$],this._signal(m.inFront?"changeFrontMarker":"changeBackMarker")}},S.prototype.getMarkers=function($){return $?this.$frontMarkers:this.$backMarkers},S.prototype.highlight=function($){if(!this.$searchHighlight){var m=new s(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(m)}this.$searchHighlight.setRegexp($)},S.prototype.highlightLines=function($,m,d,b){typeof m!="number"&&(d=m,m=$),d||(d="ace_step");var L=new i($,0,m,1/0);return L.id=this.addMarker(L,d,"fullLine",b),L},S.prototype.setAnnotations=function($){this.$annotations=$,this._signal("changeAnnotation",{})},S.prototype.getAnnotations=function(){return this.$annotations||[]},S.prototype.clearAnnotations=function(){this.setAnnotations([])},S.prototype.$detectNewLine=function($){var m=$.match(/^.*?(\r?\n)/m);m?this.$autoNewLine=m[1]:this.$autoNewLine=`
208
+ `},S.prototype.getWordRange=function($,m){var d=this.getLine($),b=!1;if(m>0&&(b=!!d.charAt(m-1).match(this.tokenRe)),b||(b=!!d.charAt(m).match(this.tokenRe)),b)var L=this.tokenRe;else if(/^\s+$/.test(d.slice(m-1,m+1)))var L=/\s/;else var L=this.nonTokenRe;var T=m;if(T>0){do T--;while(T>=0&&d.charAt(T).match(L));T++}for(var R=m;R<d.length&&d.charAt(R).match(L);)R++;return new i($,T,$,R)},S.prototype.getAWordRange=function($,m){for(var d=this.getWordRange($,m),b=this.getLine(d.end.row);b.charAt(d.end.column).match(/[ \t]/);)d.end.column+=1;return d},S.prototype.setNewLineMode=function($){this.doc.setNewLineMode($)},S.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},S.prototype.setUseWorker=function($){this.setOption("useWorker",$)},S.prototype.getUseWorker=function(){return this.$useWorker},S.prototype.onReloadTokenizer=function($){var m=$.data;this.bgTokenizer.start(m.first),this._signal("tokenizerUpdate",$)},S.prototype.setMode=function($,m){if($&&typeof $=="object"){if($.getTokenizer)return this.$onChangeMode($);var d=$,b=d.path}else b=$||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new n),this.$modes[b]&&!d){this.$onChangeMode(this.$modes[b]),m&&m();return}this.$modeId=b,a.loadModule(["mode",b],(function(L){if(!this.destroyed){if(this.$modeId!==b)return m&&m();this.$modes[b]&&!d?this.$onChangeMode(this.$modes[b]):L&&L.Mode&&(L=new L.Mode(d),d||(this.$modes[b]=L,L.$id=b),this.$onChangeMode(L)),m&&m()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},S.prototype.$onChangeMode=function($,m){if(m||(this.$modeId=$.$id),this.$mode!==$){var d=this.$mode;this.$mode=$,this.$stopWorker(),this.$useWorker&&this.$startWorker();var b=$.getTokenizer();if(b.on!==void 0){var L=this.onReloadTokenizer.bind(this);b.on("update",L)}this.bgTokenizer.setTokenizer(b),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=$.tokenRe,this.nonTokenRe=$.nonTokenRe,m||($.attachToSession&&$.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding($.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:d,mode:$}))}},S.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},S.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch($){a.warn("Could not load worker",$),this.$worker=null}},S.prototype.getMode=function(){return this.$mode},S.prototype.setScrollTop=function($){this.$scrollTop===$||isNaN($)||(this.$scrollTop=$,this._signal("changeScrollTop",$))},S.prototype.getScrollTop=function(){return this.$scrollTop},S.prototype.setScrollLeft=function($){this.$scrollLeft===$||isNaN($)||(this.$scrollLeft=$,this._signal("changeScrollLeft",$))},S.prototype.getScrollLeft=function(){return this.$scrollLeft},S.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},S.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var $=0;return this.lineWidgets.forEach(function(m){m&&m.screenWidth>$&&($=m.screenWidth)}),this.lineWidgetWidth=$},S.prototype.$computeWidth=function($){if(this.$modified||$){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var m=this.doc.getAllLines(),d=this.$rowLengthCache,b=0,L=0,T=this.$foldData[L],R=T?T.start.row:1/0,I=m.length,D=0;D<I;D++){if(D>R){if(D=T.end.row+1,D>=I)break;T=this.$foldData[L++],R=T?T.start.row:1/0}d[D]==null&&(d[D]=this.$getStringScreenWidth(m[D])[0]),d[D]>b&&(b=d[D])}this.screenWidth=b}},S.prototype.getLine=function($){return this.doc.getLine($)},S.prototype.getLines=function($,m){return this.doc.getLines($,m)},S.prototype.getLength=function(){return this.doc.getLength()},S.prototype.getTextRange=function($){return this.doc.getTextRange($||this.selection.getRange())},S.prototype.insert=function($,m){return this.doc.insert($,m)},S.prototype.remove=function($){return this.doc.remove($)},S.prototype.removeFullLines=function($,m){return this.doc.removeFullLines($,m)},S.prototype.undoChanges=function($,m){if($.length){this.$fromUndo=!0;for(var d=$.length-1;d!=-1;d--){var b=$[d];b.action=="insert"||b.action=="remove"?this.doc.revertDelta(b):b.folds&&this.addFolds(b.folds)}!m&&this.$undoSelect&&($.selectionBefore?this.selection.fromJSON($.selectionBefore):this.selection.setRange(this.$getUndoSelection($,!0))),this.$fromUndo=!1}},S.prototype.redoChanges=function($,m){if($.length){this.$fromUndo=!0;for(var d=0;d<$.length;d++){var b=$[d];(b.action=="insert"||b.action=="remove")&&this.doc.$safeApplyDelta(b)}!m&&this.$undoSelect&&($.selectionAfter?this.selection.fromJSON($.selectionAfter):this.selection.setRange(this.$getUndoSelection($,!1))),this.$fromUndo=!1}},S.prototype.setUndoSelect=function($){this.$undoSelect=$},S.prototype.$getUndoSelection=function($,m){function d(I){return m?I.action!=="insert":I.action==="insert"}for(var b,L,T=0;T<$.length;T++){var R=$[T];if(R.start){if(!b){d(R)?b=i.fromPoints(R.start,R.end):b=i.fromPoints(R.start,R.start);continue}d(R)?(L=R.start,b.compare(L.row,L.column)==-1&&b.setStart(L),L=R.end,b.compare(L.row,L.column)==1&&b.setEnd(L)):(L=R.start,b.compare(L.row,L.column)==-1&&(b=i.fromPoints(R.start,R.start)))}}return b},S.prototype.replace=function($,m){return this.doc.replace($,m)},S.prototype.moveText=function($,m,d){var b=this.getTextRange($),L=this.getFoldsInRange($),T=i.fromPoints(m,m);if(!d){this.remove($);var R=$.start.row-$.end.row,I=R?-$.end.column:$.start.column-$.end.column;I&&(T.start.row==$.end.row&&T.start.column>$.end.column&&(T.start.column+=I),T.end.row==$.end.row&&T.end.column>$.end.column&&(T.end.column+=I)),R&&T.start.row>=$.end.row&&(T.start.row+=R,T.end.row+=R)}if(T.end=this.insert(T.start,b),L.length){var D=$.start,z=T.start,R=z.row-D.row,I=z.column-D.column;this.addFolds(L.map(function(W){return W=W.clone(),W.start.row==D.row&&(W.start.column+=I),W.end.row==D.row&&(W.end.column+=I),W.start.row+=R,W.end.row+=R,W}))}return T},S.prototype.indentRows=function($,m,d){d=d.replace(/\t/g,this.getTabString());for(var b=$;b<=m;b++)this.doc.insertInLine({row:b,column:0},d)},S.prototype.outdentRows=function($){for(var m=$.collapseRows(),d=new i(0,0,0,0),b=this.getTabSize(),L=m.start.row;L<=m.end.row;++L){var T=this.getLine(L);d.start.row=L,d.end.row=L;for(var R=0;R<b&&T.charAt(R)==" ";++R);R<b&&T.charAt(R)==" "?(d.start.column=R,d.end.column=R+1):(d.start.column=0,d.end.column=R),this.remove(d)}},S.prototype.$moveLines=function($,m,d){if($=this.getRowFoldStart($),m=this.getRowFoldEnd(m),d<0){var b=this.getRowFoldStart($+d);if(b<0)return 0;var L=b-$}else if(d>0){var b=this.getRowFoldEnd(m+d);if(b>this.doc.getLength()-1)return 0;var L=b-m}else{$=this.$clipRowToDocument($),m=this.$clipRowToDocument(m);var L=m-$+1}var T=new i($,0,m,Number.MAX_VALUE),R=this.getFoldsInRange(T).map(function(D){return D=D.clone(),D.start.row+=L,D.end.row+=L,D}),I=d==0?this.doc.getLines($,m):this.doc.removeFullLines($,m);return this.doc.insertFullLines($+L,I),R.length&&this.addFolds(R),L},S.prototype.moveLinesUp=function($,m){return this.$moveLines($,m,-1)},S.prototype.moveLinesDown=function($,m){return this.$moveLines($,m,1)},S.prototype.duplicateLines=function($,m){return this.$moveLines($,m,0)},S.prototype.$clipRowToDocument=function($){return Math.max(0,Math.min($,this.doc.getLength()-1))},S.prototype.$clipColumnToRow=function($,m){return m<0?0:Math.min(this.doc.getLine($).length,m)},S.prototype.$clipPositionToDocument=function($,m){if(m=Math.max(0,m),$<0)$=0,m=0;else{var d=this.doc.getLength();$>=d?($=d-1,m=this.doc.getLine(d-1).length):m=Math.min(this.doc.getLine($).length,m)}return{row:$,column:m}},S.prototype.$clipRangeToDocument=function($){$.start.row<0?($.start.row=0,$.start.column=0):$.start.column=this.$clipColumnToRow($.start.row,$.start.column);var m=this.doc.getLength()-1;return $.end.row>m?($.end.row=m,$.end.column=this.doc.getLine(m).length):$.end.column=this.$clipColumnToRow($.end.row,$.end.column),$},S.prototype.setUseWrapMode=function($){if($!=this.$useWrapMode){if(this.$useWrapMode=$,this.$modified=!0,this.$resetRowCache(0),$){var m=this.getLength();this.$wrapData=Array(m),this.$updateWrapData(0,m-1)}this._signal("changeWrapMode")}},S.prototype.getUseWrapMode=function(){return this.$useWrapMode},S.prototype.setWrapLimitRange=function($,m){(this.$wrapLimitRange.min!==$||this.$wrapLimitRange.max!==m)&&(this.$wrapLimitRange={min:$,max:m},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},S.prototype.adjustWrapLimit=function($,m){var d=this.$wrapLimitRange;d.max<0&&(d={min:m,max:m});var b=this.$constrainWrapLimit($,d.min,d.max);return b!=this.$wrapLimit&&b>1?(this.$wrapLimit=b,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},S.prototype.$constrainWrapLimit=function($,m,d){return m&&($=Math.max(m,$)),d&&($=Math.min(d,$)),$},S.prototype.getWrapLimit=function(){return this.$wrapLimit},S.prototype.setWrapLimit=function($){this.setWrapLimitRange($,$)},S.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},S.prototype.$updateInternalDataOnChange=function($){var m=this.$useWrapMode,d=$.action,b=$.start,L=$.end,T=b.row,R=L.row,I=R-T,D=null;if(this.$updating=!0,I!=0)if(d==="remove"){this[m?"$wrapData":"$rowLengthCache"].splice(T,I);var z=this.$foldData;D=this.getFoldsInRange($),this.removeFolds(D);var N=this.getFoldLine(L.row),B=0;if(N){N.addRemoveChars(L.row,L.column,b.column-L.column),N.shiftRow(-I);var W=this.getFoldLine(T);W&&W!==N&&(W.merge(N),N=W),B=z.indexOf(N)+1}for(B;B<z.length;B++){var N=z[B];N.start.row>=L.row&&N.shiftRow(-I)}R=T}else{var j=Array(I);j.unshift(T,0);var G=m?this.$wrapData:this.$rowLengthCache;G.splice.apply(G,j);var z=this.$foldData,N=this.getFoldLine(T),B=0;if(N){var V=N.range.compareInside(b.row,b.column);V==0?(N=N.split(b.row,b.column),N&&(N.shiftRow(I),N.addRemoveChars(R,0,L.column-b.column))):V==-1&&(N.addRemoveChars(T,0,L.column-b.column),N.shiftRow(I)),B=z.indexOf(N)+1}for(B;B<z.length;B++){var N=z[B];N.start.row>=T&&N.shiftRow(I)}}else{I=Math.abs($.start.column-$.end.column),d==="remove"&&(D=this.getFoldsInRange($),this.removeFolds(D),I=-I);var N=this.getFoldLine(T);N&&N.addRemoveChars(T,b.column,I)}return m&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,m?this.$updateWrapData(T,R):this.$updateRowLengthCache(T,R),D},S.prototype.$updateRowLengthCache=function($,m){this.$rowLengthCache[$]=null,this.$rowLengthCache[m]=null},S.prototype.$updateWrapData=function($,m){var d=this.doc.getAllLines(),b=this.getTabSize(),L=this.$wrapData,T=this.$wrapLimit,R,I,D=$;for(m=Math.min(m,d.length-1);D<=m;)I=this.getFoldLine(D,I),I?(R=[],I.walk((function(z,N,B,W){var j;if(z!=null){j=this.$getDisplayTokens(z,R.length),j[0]=p;for(var G=1;G<j.length;G++)j[G]=u}else j=this.$getDisplayTokens(d[N].substring(W,B),R.length);R=R.concat(j)}).bind(this),I.end.row,d[I.end.row].length+1),L[I.start.row]=this.$computeWrapSplits(R,T,b),D=I.end.row+1):(R=this.$getDisplayTokens(d[D]),L[D]=this.$computeWrapSplits(R,T,b),D++)},S.prototype.$computeWrapSplits=function($,m,d){if($.length==0)return[];var b=[],L=$.length,T=0,R=0,I=this.$wrapAsCode,D=this.$indentedSoftWrap,z=m<=Math.max(2*d,8)||D===!1?0:Math.floor(m/2);function N(){var V=0;if(z===0)return V;if(D)for(var X=0;X<$.length;X++){var Y=$[X];if(Y==_)V+=1;else if(Y==A)V+=d;else{if(Y==x)continue;break}}return I&&D!==!1&&(V+=d),Math.min(V,z)}function B(V){for(var X=V-T,Y=T;Y<V;Y++){var J=$[Y];(J===12||J===2)&&(X-=1)}b.length||(W=N(),b.indent=W),R+=X,b.push(R),T=V}for(var W=0;L-T>m-W;){var j=T+m-W;if($[j-1]>=_&&$[j]>=_){B(j);continue}if($[j]==p||$[j]==u){for(j;j!=T-1&&$[j]!=p;j--);if(j>T){B(j);continue}for(j=T+m,j;j<$.length&&$[j]==u;j++);if(j==$.length)break;B(j);continue}for(var G=Math.max(j-(m-(m>>2)),T-1);j>G&&$[j]<p;)j--;if(I){for(;j>G&&$[j]<p;)j--;for(;j>G&&$[j]==C;)j--}else for(;j>G&&$[j]<_;)j--;if(j>G){B(++j);continue}j=T+m,$[j]==w&&j--,B(j-W)}return b},S.prototype.$getDisplayTokens=function($,m){var d=[],b;m=m||0;for(var L=0;L<$.length;L++){var T=$.charCodeAt(L);if(T==9){b=this.getScreenTabSize(d.length+m),d.push(A);for(var R=1;R<b;R++)d.push(x)}else T==32?d.push(_):T>39&&T<48||T>57&&T<64?d.push(C):T>=4352&&E(T)?d.push(y,w):d.push(y)}return d},S.prototype.$getStringScreenWidth=function($,m,d){if(m==0)return[0,0];m==null&&(m=1/0),d=d||0;var b,L;for(L=0;L<$.length&&(b=$.charCodeAt(L),b==9?d+=this.getScreenTabSize(d):b>=4352&&E(b)?d+=2:d+=1,!(d>m));L++);return[d,L]},S.prototype.getRowLength=function($){var m=1;return this.lineWidgets&&(m+=this.lineWidgets[$]&&this.lineWidgets[$].rowCount||0),!this.$useWrapMode||!this.$wrapData[$]?m:this.$wrapData[$].length+m},S.prototype.getRowLineCount=function($){return!this.$useWrapMode||!this.$wrapData[$]?1:this.$wrapData[$].length+1},S.prototype.getRowWrapIndent=function($){if(this.$useWrapMode){var m=this.screenToDocumentPosition($,Number.MAX_VALUE),d=this.$wrapData[m.row];return d.length&&d[0]<m.column?d.indent:0}else return 0},S.prototype.getScreenLastRowColumn=function($){var m=this.screenToDocumentPosition($,Number.MAX_VALUE);return this.documentToScreenColumn(m.row,m.column)},S.prototype.getDocumentLastRowColumn=function($,m){var d=this.documentToScreenRow($,m);return this.getScreenLastRowColumn(d)},S.prototype.getDocumentLastRowColumnPosition=function($,m){var d=this.documentToScreenRow($,m);return this.screenToDocumentPosition(d,Number.MAX_VALUE/10)},S.prototype.getRowSplitData=function($){if(this.$useWrapMode)return this.$wrapData[$]},S.prototype.getScreenTabSize=function($){return this.$tabSize-($%this.$tabSize|0)},S.prototype.screenToDocumentRow=function($,m){return this.screenToDocumentPosition($,m).row},S.prototype.screenToDocumentColumn=function($,m){return this.screenToDocumentPosition($,m).column},S.prototype.screenToDocumentPosition=function($,m,d){if($<0)return{row:0,column:0};var b,L=0,T=0,R,I=0,D=0,z=this.$screenRowCache,N=this.$getRowCacheIndex(z,$),B=z.length;if(B&&N>=0)var I=z[N],L=this.$docRowCache[N],W=$>z[B-1];else var W=!B;for(var j=this.getLength()-1,G=this.getNextFoldLine(L),V=G?G.start.row:1/0;I<=$&&(D=this.getRowLength(L),!(I+D>$||L>=j));)I+=D,L++,L>V&&(L=G.end.row+1,G=this.getNextFoldLine(L,G),V=G?G.start.row:1/0),W&&(this.$docRowCache.push(L),this.$screenRowCache.push(I));if(G&&G.start.row<=L)b=this.getFoldDisplayLine(G),L=G.start.row;else{if(I+D<=$||L>j)return{row:j,column:this.getLine(j).length};b=this.getLine(L),G=null}var X=0,Y=Math.floor($-I);if(this.$useWrapMode){var J=this.$wrapData[L];J&&(R=J[Y],Y>0&&J.length&&(X=J.indent,T=J[Y-1]||J[J.length-1],b=b.substring(T)))}return d!==void 0&&this.$bidiHandler.isBidiRow(I+Y,L,Y)&&(m=this.$bidiHandler.offsetToCol(d)),T+=this.$getStringScreenWidth(b,m-X)[1],this.$useWrapMode&&T>=R&&(T=R-1),G?G.idxToPosition(T):{row:L,column:T}},S.prototype.documentToScreenPosition=function($,m){if(typeof m>"u")var d=this.$clipPositionToDocument($.row,$.column);else d=this.$clipPositionToDocument($,m);$=d.row,m=d.column;var b=0,L=null,T=null;T=this.getFoldAt($,m,1),T&&($=T.start.row,m=T.start.column);var R,I=0,D=this.$docRowCache,z=this.$getRowCacheIndex(D,$),N=D.length;if(N&&z>=0)var I=D[z],b=this.$screenRowCache[z],B=$>D[N-1];else var B=!N;for(var W=this.getNextFoldLine(I),j=W?W.start.row:1/0;I<$;){if(I>=j){if(R=W.end.row+1,R>$)break;W=this.getNextFoldLine(R,W),j=W?W.start.row:1/0}else R=I+1;b+=this.getRowLength(I),I=R,B&&(this.$docRowCache.push(I),this.$screenRowCache.push(b))}var G="";W&&I>=j?(G=this.getFoldDisplayLine(W,$,m),L=W.start.row):(G=this.getLine($).substring(0,m),L=$);var V=0;if(this.$useWrapMode){var X=this.$wrapData[L];if(X){for(var Y=0;G.length>=X[Y];)b++,Y++;G=G.substring(X[Y-1]||0,G.length),V=Y>0?X.indent:0}}return this.lineWidgets&&this.lineWidgets[I]&&this.lineWidgets[I].rowsAbove&&(b+=this.lineWidgets[I].rowsAbove),{row:b,column:V+this.$getStringScreenWidth(G)[0]}},S.prototype.documentToScreenColumn=function($,m){return this.documentToScreenPosition($,m).column},S.prototype.documentToScreenRow=function($,m){return this.documentToScreenPosition($,m).row},S.prototype.getScreenLength=function(){var $=0,m=null;if(this.$useWrapMode)for(var L=this.$wrapData.length,T=0,b=0,m=this.$foldData[b++],R=m?m.start.row:1/0;T<L;){var I=this.$wrapData[T];$+=I?I.length+1:1,T++,T>R&&(T=m.end.row+1,m=this.$foldData[b++],R=m?m.start.row:1/0)}else{$=this.getLength();for(var d=this.$foldData,b=0;b<d.length;b++)m=d[b],$-=m.end.row-m.start.row}return this.lineWidgets&&($+=this.$getWidgetScreenLength()),$},S.prototype.$setFontMetrics=function($){this.$enableVarChar&&(this.$getStringScreenWidth=function(m,d,b){if(d===0)return[0,0];d||(d=1/0),b=b||0;var L,T;for(T=0;T<m.length&&(L=m.charAt(T),L===" "?b+=this.getScreenTabSize(b):b+=$.getCharacterWidth(L),!(b>d));T++);return[b,T]})},S.prototype.getPrecedingCharacter=function(){var $=this.selection.getCursor();if($.column===0)return $.row===0?"":this.doc.getNewLineCharacter();var m=this.getLine($.row);return m[$.column-1]},S.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()},S}();h.$uid=0,h.prototype.$modes=a.$modes,h.prototype.getValue=h.prototype.toString,h.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},h.prototype.$overwrite=!1,h.prototype.$mode=null,h.prototype.$modeId=null,h.prototype.$scrollTop=0,h.prototype.$scrollLeft=0,h.prototype.$wrapLimit=80,h.prototype.$useWrapMode=!1,h.prototype.$wrapLimitRange={min:null,max:null},h.prototype.lineWidgets=null,h.prototype.isFullWidth=E,v.implement(h.prototype,l);var y=1,w=2,p=3,u=4,C=9,_=10,A=11,x=12;function E(S){return S<4352?!1:S>=4352&&S<=4447||S>=4515&&S<=4519||S>=4602&&S<=4607||S>=9001&&S<=9002||S>=11904&&S<=11929||S>=11931&&S<=12019||S>=12032&&S<=12245||S>=12272&&S<=12283||S>=12288&&S<=12350||S>=12353&&S<=12438||S>=12441&&S<=12543||S>=12549&&S<=12589||S>=12593&&S<=12686||S>=12688&&S<=12730||S>=12736&&S<=12771||S>=12784&&S<=12830||S>=12832&&S<=12871||S>=12880&&S<=13054||S>=13056&&S<=19903||S>=19968&&S<=42124||S>=42128&&S<=42182||S>=43360&&S<=43388||S>=44032&&S<=55203||S>=55216&&S<=55238||S>=55243&&S<=55291||S>=63744&&S<=64255||S>=65040&&S<=65049||S>=65072&&S<=65106||S>=65108&&S<=65126||S>=65128&&S<=65131||S>=65281&&S<=65376||S>=65504&&S<=65510}k("./edit_session/folding").Folding.call(h.prototype),k("./edit_session/bracket_match").BracketMatch.call(h.prototype),a.defineOptions(h.prototype,"session",{wrap:{set:function(S){if(!S||S=="off"?S=!1:S=="free"?S=!0:S=="printMargin"?S=-1:typeof S=="string"&&(S=parseInt(S,10)||!1),this.$wrap!=S)if(this.$wrap=S,!S)this.setUseWrapMode(!1);else{var $=typeof S=="number"?S:null;this.setWrapLimitRange($,$),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(S){S=S=="auto"?this.$mode.type!="text":S!="text",S!=this.$wrapAsCode&&(this.$wrapAsCode=S,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(S){this.$useWorker=S,this.$stopWorker(),S&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(S){S=parseInt(S),S>0&&this.$tabSize!==S&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=S,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(S){this.setFoldStyle(S)},handlesSet:!0},overwrite:{set:function(S){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(S){this.doc.setNewLineMode(S)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(S){this.setMode(S)},get:function(){return this.$modeId},handlesSet:!0}}),M.EditSession=h}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(k,M,F){var v=k("./lib/lang"),f=k("./lib/oop"),g=k("./range").Range,a=function(){function i(){this.$options={}}return i.prototype.set=function(t){return f.mixin(this.$options,t),this},i.prototype.getOptions=function(){return v.copyObject(this.$options)},i.prototype.setOptions=function(t){this.$options=t},i.prototype.find=function(t){var e=this.$options,o=this.$matchIterator(t,e);if(!o)return!1;var s=null;return o.forEach(function(c,h,y,w){return s=new g(c,h,y,w),h==w&&e.start&&e.start.start&&e.skipCurrent!=!1&&s.isEqual(e.start)?(s=null,!1):!0}),s},i.prototype.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var o=e.range,s=o?t.getLines(o.start.row,o.end.row):t.doc.getAllLines(),c=[],h=e.re;if(e.$isMultiLine){var y=h.length,w=s.length-y,p;e:for(var u=h.offset||0;u<=w;u++){for(var C=0;C<y;C++)if(s[u+C].search(h[C])==-1)continue e;var _=s[u],A=s[u+y-1],x=_.length-_.match(h[0])[0].length,E=A.match(h[y-1])[0].length;p&&p.end.row===u&&p.end.column>x||(c.push(p=new g(u,x,u+y-1,E)),y>2&&(u=u+y-2))}}else for(var S,$=0;$<s.length;$++)if(this.$isMultilineSearch(e)){var m=s.length-1;if(S=this.$multiLineForward(t,h,$,m),S){var d=S.endRow<=m?S.endRow-1:m;d>$&&($=d),c.push(new g(S.startRow,S.startCol,S.endRow,S.endCol))}}else{S=v.getMatchOffsets(s[$],h);for(var C=0;C<S.length;C++){var b=S[C];c.push(new g($,b.offset,$,b.offset+b.length))}}if(o){for(var L=o.start.column,T=o.end.column,$=0,C=c.length-1;$<C&&c[$].start.column<L&&c[$].start.row==0;)$++;for(var R=o.end.row-o.start.row;$<C&&c[C].end.column>T&&c[C].end.row==R;)C--;for(c=c.slice($,C+1),$=0,C=c.length;$<C;$++)c[$].start.row+=o.start.row,c[$].end.row+=o.start.row}return c},i.prototype.parseReplaceString=function(t){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},o="",s=0,c=t.length;s<c;s++){var h=t.charCodeAt(s);if(h===e.Backslash){if(s++,s>=c){o+="\\";break}var y=t.charCodeAt(s);switch(y){case e.Backslash:o+="\\";break;case e.n:o+=`
209
+ `;break;case e.t:o+=" ";break}continue}if(h===e.DollarSign){if(s++,s>=c){o+="$";break}var w=t.charCodeAt(s);if(w===e.DollarSign){o+="$$";continue}if(w===e.Digit0||w===e.Ampersand){o+="$&";continue}if(e.Digit1<=w&&w<=e.Digit9){o+="$"+t[s];continue}}o+=t[s]}return o||t},i.prototype.replace=function(t,e){var o=this.$options,s=this.$assembleRegExp(o);if(o.$isMultiLine)return e;if(s){var c=this.$isMultilineSearch(o);c&&(t=t.replace(/\r\n|\r|\n/g,`
210
+ `));var h=s.exec(t);if(!h||!c&&h[0].length!=t.length)return null;if(e=o.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=t.replace(s,e),o.preserveCase){e=e.split("");for(var y=Math.min(t.length,t.length);y--;){var w=t[y];w&&w.toLowerCase()!=w?e[y]=e[y].toUpperCase():e[y]=e[y].toLowerCase()}e=e.join("")}return e}},i.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var o=t.needle;if(!t.needle)return t.re=!1;t.regExp||(o=v.escapeRegExp(o));var s=t.caseSensitive?"gm":"gmi";try{new RegExp(o,"u"),t.$supportsUnicodeFlag=!0,s+="u"}catch{t.$supportsUnicodeFlag=!1}if(t.wholeWord&&(o=l(o,t)),t.$isMultiLine=!e&&/[\n\r]/.test(o),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(o,s);try{var c=new RegExp(o,s)}catch{c=!1}return t.re=c},i.prototype.$assembleMultilineRegExp=function(t,e){for(var o=t.replace(/\r\n|\r|\n/g,`$
211
+ ^`).split(`
212
+ `),s=[],c=0;c<o.length;c++)try{s.push(new RegExp(o[c],e))}catch{return!1}return s},i.prototype.$isMultilineSearch=function(t){return t.re&&/\\r\\n|\\r|\\n/.test(t.re.source)&&t.regExp&&!t.$isMultiLine},i.prototype.$multiLineForward=function(t,e,o,s){for(var c,h=n(t,o),y=o;y<=s;){for(var w=0;w<h&&!(y>s);w++){var p=t.getLine(y++);c=c==null?p:c+`
213
+ `+p}var u=e.exec(c);if(e.lastIndex=0,u){var C=c.slice(0,u.index).split(`
214
+ `),_=u[0].split(`
215
+ `),A=o+C.length-1,x=C[C.length-1].length,E=A+_.length-1,S=_.length==1?x+_[0].length:_[_.length-1].length;return{startRow:A,startCol:x,endRow:E,endCol:S}}}return null},i.prototype.$multiLineBackward=function(t,e,o,s,c){for(var h,y=n(t,s),w=t.getLine(s).length-o,p=s;p>=c;){for(var u=0;u<y&&p>=c;u++){var C=t.getLine(p--);h=h==null?C:C+`
216
+ `+h}var _=r(h,e,w);if(_){var A=h.slice(0,_.index).split(`
217
+ `),x=_[0].split(`
218
+ `),E=p+A.length,S=A[A.length-1].length,$=E+x.length-1,m=x.length==1?S+x[0].length:x[x.length-1].length;return{startRow:E,startCol:S,endRow:$,endCol:m}}}return null},i.prototype.$matchIterator=function(t,e){var o=this.$assembleRegExp(e);if(!o)return!1;var s=this.$isMultilineSearch(e),c=this.$multiLineForward,h=this.$multiLineBackward,y=e.backwards==!0,w=e.skipCurrent!=!1,p=o.unicode,u=e.range,C=e.start;C||(C=u?u[y?"end":"start"]:t.selection.getRange()),C.start&&(C=C[w!=y?"end":"start"]);var _=u?u.start.row:0,A=u?u.end.row:t.getLength()-1;if(y)var x=function($){var m=C.row;if(!S(m,C.column,$)){for(m--;m>=_;m--)if(S(m,Number.MAX_VALUE,$))return;if(e.wrap!=!1){for(m=A,_=C.row;m>=_;m--)if(S(m,Number.MAX_VALUE,$))return}}};else var x=function(m){var d=C.row;if(!S(d,C.column,m)){for(d=d+1;d<=A;d++)if(S(d,0,m))return;if(e.wrap!=!1){for(d=_,A=C.row;d<=A;d++)if(S(d,0,m))return}}};if(e.$isMultiLine)var E=o.length,S=function($,m,d){var b=y?$-E+1:$;if(!(b<0||b+E>t.getLength())){var L=t.getLine(b),T=L.search(o[0]);if(!(!y&&T<m||T===-1)){for(var R=1;R<E;R++)if(L=t.getLine(b+R),L.search(o[R])==-1)return;var I=L.match(o[E-1])[0].length;if(!(y&&I>m)&&d(b,T,b+E-1,I))return!0}}};else if(y)var S=function(m,d,b){if(s){var L=h(t,o,d,m,_);if(!L)return!1;if(b(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else{var T=t.getLine(m),R=[],I,D=0;for(o.lastIndex=0;I=o.exec(T);){var z=I[0].length;if(D=I.index,!z){if(D>=T.length)break;o.lastIndex=D+=v.skipEmptyMatch(T,D,p)}if(I.index+z>d)break;R.push(I.index,z)}for(var N=R.length-1;N>=0;N-=2){var B=R[N-1],z=R[N];if(b(m,B,m,B+z))return!0}}};else var S=function(m,d,b){if(o.lastIndex=d,s){var L=c(t,o,m,A);if(L){var T=L.endRow<=A?L.endRow-1:A;T>m&&(m=T)}if(!L)return!1;if(b(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else for(var R=t.getLine(m),I,D;D=o.exec(R);){var z=D[0].length;if(I=D.index,b(m,I,m,I+z))return!0;if(!z&&(o.lastIndex=I+=v.skipEmptyMatch(R,I,p),I>=R.length))return!1}};return{forEach:x}},i}();function l(i,t){var e=v.supportsLookbehind();function o(y,w){w===void 0&&(w=!0);var p=e&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return p.test(y)||t.regExp?e&&t.$supportsUnicodeFlag?w?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(i),c=s[0],h=s[s.length-1];return o(c)+i+o(h,!1)}function r(i,t,e){for(var o=null,s=0;s<=i.length;){t.lastIndex=s;var c=t.exec(i);if(!c)break;var h=c.index+c[0].length;if(h>i.length-e)break;(!o||h>o.index+o[0].length)&&(o=c),s=c.index+1}return o}function n(i,t){var e=5e3,o={row:t,column:0},s=i.doc.positionToIndex(o),c=s+e,h=i.doc.indexToPosition(c),y=h.row;return y+1}M.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(k,M,F){var v=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)}}(),f=k("../lib/keys"),g=k("../lib/useragent"),a=f.KEY_MODS,l=function(){function i(t,e){this.$init(t,e,!1)}return i.prototype.$init=function(t,e,o){this.platform=e||(g.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 h=s[c];if(h==t)delete s[c];else if(Array.isArray(h)){var y=h.indexOf(t);y!=-1&&(h.splice(y,1),h.length==1&&(s[c]=h[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 h=s.split(/\s+/);s=h.pop(),h.forEach(function(p){var u=this.parseKeys(p),C=a[u.hashId]+u.key;c+=(c?" ":"")+C,this._addCommandToBinding(c,"chainKeys")},this),c+=" "}var y=this.parseKeys(s),w=a[y.hashId]+y.key;this._addCommandToBinding(c+w,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=r(e));var h=s[t];for(c=0;c<h.length;c++){var y=h[c],w=r(y);if(w>o)break}h.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(w){return w}),o=e.pop(),s=f[o];if(f.FUNCTION_KEYS[s])o=f.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,h=e.length;h--;){var y=f.KEY_MODS[e[h]];if(y==null)return typeof console<"u"&&console.error("invalid modifier "+e[h]+" 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,h=this.commandKeyBinding[c];return t.$keyChain&&(t.$keyChain+=" "+c,h=this.commandKeyBinding[t.$keyChain]||h),h&&(h=="chainKeys"||h[h.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:h})}},i.prototype.getStatusText=function(t,e){return e.$keyChain||""},i}();function r(i){return typeof i=="object"&&i.bindKey&&i.bindKey.position||(i.isDefault?-100:0)}var n=function(i){v(t,i);function t(e,o){var s=i.call(this,e,o)||this;return s.$singleCommand=!0,s}return t}(l);n.call=function(i,t,e){l.prototype.$init.call(i,t,e,!0)},l.call=function(i,t,e){l.prototype.$init.call(i,t,e,!1)},M.HashHandler=n,M.MultiHashHandler=l}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(k,M,F){var v=this&&this.__extends||function(){var r=function(n,i){return r=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])},r(n,i)};return function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");r(n,i);function t(){this.constructor=n}n.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}}(),f=k("../lib/oop"),g=k("../keyboard/hash_handler").MultiHashHandler,a=k("../lib/event_emitter").EventEmitter,l=function(r){v(n,r);function n(i,t){var e=r.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 n.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}typeof i=="string"&&(i=this.commands[i]);var s={editor:t,command:i,args:e};return this.canExecute(i,t)?(s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1):(this._signal("commandUnavailable",s),!1)},n.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))},n.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)},n.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}}},n.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})},n}(g);f.implement(l.prototype,a),M.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(k,M,F){var v=k("../lib/lang"),f=k("../config"),g=k("../range").Range;function a(r,n){return{win:r,mac:n}}M.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(r){f.loadModule("ace/ext/settings_menu",function(n){n.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(r){f.loadModule("ace/ext/error_marker",function(n){n.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(r){f.loadModule("ace/ext/error_marker",function(n){n.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(r,n){typeof n=="number"&&!isNaN(n)&&r.gotoLine(n),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.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(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(r){f.loadModule("ace/ext/searchbox",function(n){n.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.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(r){r.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(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(r,n){r.navigateUp(n.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(r){r.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(r){r.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(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(r,n){r.navigateDown(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(r){r.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(r){r.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(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(r,n){r.navigateLeft(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(r){r.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(r){r.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(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(r,n){r.navigateRight(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.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(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var n=r.$copyWithEmptySelection&&r.selection.isEmpty(),i=n?r.selection.getLineRange():r.selection.getRange();r._emit("cut",i),i.isEmpty()||r.session.remove(i),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,n){r.$handlePaste(n)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(r){f.loadModule("ace/ext/searchbox",function(n){n.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(r){var n=r.selection.getRange();n.start.column=0,r.session.remove(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(r){var n=r.selection.getRange();n.end.column=Number.MAX_VALUE,r.session.remove(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,n){r.insert(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,n){r.insert(v.stringRepeat(n.text||"",n.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var n=r.selection.getRange();n.start.column=n.end.column=0,n.end.row++,r.selection.setRange(n,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(r){for(var n=r.selection.isBackwards(),i=n?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),t=n?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(i.row).length,o=r.session.doc.getTextRange(r.selection.getRange()),s=o.replace(/\n\s*/," ").length,c=r.session.doc.getLine(i.row),h=i.row+1;h<=t.row+1;h++){var y=v.stringTrimLeft(v.stringTrimRight(r.session.doc.getLine(h)));y.length!==0&&(y=" "+y),c+=y}t.row+1<r.session.doc.getLength()-1&&(c+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new g(i.row,0,t.row+2,0),c),s>0?(r.selection.moveCursorTo(i.row,i.column),r.selection.selectTo(i.row,i.column+s)):(e=r.session.doc.getLine(i.row).length>e?e+1:e,r.selection.moveCursorTo(i.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(r){var n=r.session.doc.getLength()-1,i=r.session.doc.getLine(n).length,t=r.selection.rangeList.ranges,e=[];t.length<1&&(t=[r.selection.getRange()]);for(var o=0;o<t.length;o++)o==t.length-1&&(t[o].end.row===n&&t[o].end.column===i||e.push(new g(t[o].end.row,t[o].end.column,n,i))),o===0?t[o].start.row===0&&t[o].start.column===0||e.push(new g(0,0,t[o].start.row,t[o].start.column)):e.push(new g(t[o-1].end.row,t[o-1].end.column,t[o].start.row,t[o].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var o=0;o<e.length;o++)r.selection.addRange(e[o],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(`
219
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var n=r.getCursorPosition();r.selection.moveTo(n.row-1,Number.MAX_VALUE),r.insert(`
220
+ `),n.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var l=1;l<9;l++)M.commands.push({name:"foldToLevel"+l,description:"Fold To Level "+l,level:l,exec:function(r){r.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,M,F){var v=k("../lib/keys"),f=k("../mouse/default_gutter_handler").GutterTooltip,g=function(){function l(r){this.editor=r,this.gutterLayer=r.renderer.$gutterLayer,this.element=r.renderer.$gutter,this.lines=r.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new f(this.editor)}return l.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))},l.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))},l.prototype.$onGutterKeyDown=function(r){if(this.annotationTooltip.isOpen){r.preventDefault(),r.keyCode===v.escape&&this.annotationTooltip.hideTooltip();return}if(r.target===this.element){if(r.keyCode!=v.enter)return;r.preventDefault();var n=this.editor.getCursorPosition().row;this.editor.isRowVisible(n)||this.editor.scrollToLine(n,!0,!0),setTimeout((function(){var i=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldLaneWidget(i),e=this.$findNearestAnnotation(i);if(!(t===null&&e===null)){var o=this.$findClosestNumber(t,e,i);if(o===t)if(this.activeLane="fold",this.activeRowIndex=t,this.$isCustomWidgetVisible(t)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(r),setTimeout((function(){this.editor._signal("gutterkeydown",new a(r,this))}).bind(this),10)},l.prototype.$handleGutterKeyboardInteraction=function(r){if(r.keyCode===v.tab){r.preventDefault();return}if(r.keyCode===v.escape){r.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(r.keyCode===v.up){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(r.keyCode===v.down){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(r.keyCode===v.left){r.preventDefault(),this.$switchLane("annotation");return}if(r.keyCode===v.right){r.preventDefault(),this.$switchLane("fold");return}if(r.keyCode===v.enter||r.keyCode===v.space){switch(r.preventDefault(),this.activeLane){case"fold":var n=this.$rowIndexToRow(this.activeRowIndex),i=this.editor.session.$gutterCustomWidgets[n];if(i)i.callbacks&&i.callbacks.onClick&&i.callbacks.onClick(r,n);else if(this.gutterLayer.session.foldWidgets[n]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),r),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==n&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(n),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var t=this.lines.cells[this.activeRowIndex].element.childNodes[2],e=t.getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=e.right+"px",o.top=e.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},l.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},l.prototype.$isFoldWidgetVisible=function(r){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),i=this.$getFoldWidget(r).style.display!=="none";return n&&i},l.prototype.$isCustomWidgetVisible=function(r){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),i=!!this.$getCustomWidget(r);return n&&i},l.prototype.$isAnnotationVisible=function(r){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),i=this.$getAnnotation(r).style.display!=="none";return n&&i},l.prototype.$getFoldWidget=function(r){var n=this.lines.get(r),i=n.element;return i.childNodes[1]},l.prototype.$getCustomWidget=function(r){var n=this.lines.get(r),i=n.element;return i.childNodes[3]},l.prototype.$getAnnotation=function(r){var n=this.lines.get(r),i=n.element;return i.childNodes[2]},l.prototype.$findNearestFoldLaneWidget=function(r){if(this.$isCustomWidgetVisible(r)||this.$isFoldWidgetVisible(r))return r;for(var n=0;r-n>0||r+n<this.lines.getLength()-1;){if(n++,r-n>=0&&this.$isCustomWidgetVisible(r-n))return r-n;if(r+n<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(r+n))return r+n;if(r-n>=0&&this.$isFoldWidgetVisible(r-n))return r-n;if(r+n<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(r+n))return r+n}return null},l.prototype.$findNearestAnnotation=function(r){if(this.$isAnnotationVisible(r))return r;for(var n=0;r-n>0||r+n<this.lines.getLength()-1;){if(n++,r-n>=0&&this.$isAnnotationVisible(r-n))return r-n;if(r+n<=this.lines.getLength()-1&&this.$isAnnotationVisible(r+n))return r+n}return null},l.prototype.$focusFoldWidget=function(r){if(r!=null){var n=this.$getFoldWidget(r);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},l.prototype.$focusCustomWidget=function(r){if(r!=null){var n=this.$getCustomWidget(r);n&&(n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus())}},l.prototype.$focusAnnotation=function(r){if(r!=null){var n=this.$getAnnotation(r);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},l.prototype.$blurFoldWidget=function(r){var n=this.$getFoldWidget(r);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},l.prototype.$blurCustomWidget=function(r){var n=this.$getCustomWidget(r);n&&(n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur())},l.prototype.$blurAnnotation=function(r){var n=this.$getAnnotation(r);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},l.prototype.$moveFoldWidgetUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isFoldWidgetVisible(r)||this.$isCustomWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=r,this.$isFoldWidgetVisible(r)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},l.prototype.$moveFoldWidgetDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isFoldWidgetVisible(r)||this.$isCustomWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=r,this.$isFoldWidgetVisible(r)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},l.prototype.$moveAnnotationUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},l.prototype.$moveAnnotationDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},l.prototype.$findClosestNumber=function(r,n,i){return r===null?n:n===null||Math.abs(i-r)<=Math.abs(i-n)?r:n},l.prototype.$switchLane=function(r){switch(r){case"annotation":if(this.activeLane==="annotation")break;var n=this.$findNearestAnnotation(this.activeRowIndex);if(n==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=n,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var i=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(i===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$isCustomWidgetVisible(i)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},l.prototype.$rowIndexToRow=function(r){var n=this.lines.get(r);return n?n.row:null},l.prototype.$rowToRowIndex=function(r){for(var n=0;n<this.lines.getLength();n++){var i=this.lines.get(n);if(i.row==r)return n}return null},l}();M.GutterKeyboardHandler=g;var a=function(){function l(r,n){this.gutterKeyboardHandler=n,this.domEvent=r}return l.prototype.getKey=function(){return v.keyCodeToString(this.domEvent.keyCode)},l.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},l.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},l.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},l}();M.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","ace/lib/event","ace/tooltip"],function(k,M,F){var v=this&&this.__values||function(m){var d=typeof Symbol=="function"&&Symbol.iterator,b=d&&m[d],L=0;if(b)return b.call(m);if(m&&typeof m.length=="number")return{next:function(){return m&&L>=m.length&&(m=void 0),{value:m&&m[L++],done:!m}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},f=k("./lib/oop"),g=k("./lib/dom"),a=k("./lib/lang"),l=k("./lib/useragent"),r=k("./keyboard/textinput").TextInput,n=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,h=k("./commands/command_manager").CommandManager,y=k("./commands/default_commands").commands,w=k("./config"),p=k("./token_iterator").TokenIterator,u=k("./keyboard/gutter_handler").GutterKeyboardHandler,C=k("./config").nls,_=k("./clipboard"),A=k("./lib/keys"),x=k("./lib/event"),E=k("./tooltip").HoverTooltip,S=function(){function m(d,b,L){this.id="editor"+ ++m.$uid,this.session,this.$toDestroy=[];var T=d.getContainerElement();this.container=T,this.renderer=d,this.commands=new h(l.isMac?"mac":"win",y),typeof document=="object"&&(this.textInput=new r(d.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new n(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(R,I){I._$emitInputEvent.schedule(31)}),this.setSession(b||L&&L.session||new e("")),w.resetOptions(this),L&&this.setOptions(L),w._signal("editor",this)}return m.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},m.prototype.startOperation=function(d){this.session.startOperation(d)},m.prototype.endOperation=function(d){this.session.endOperation(d)},m.prototype.onStartOperation=function(d){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,d||(this.previousCommand=null)},m.prototype.onEndOperation=function(d){if(this.curOp&&this.session){if(d&&d.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var b=this.curOp.command,L=b&&b.scrollIntoView;if(L){switch(L){case"center-animate":L="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var T=this.selection.getRange(),R=this.renderer.layerConfig;(T.start.row>=R.lastRow||T.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}L=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},m.prototype.$historyTracker=function(d){if(this.$mergeUndoDeltas){var b=this.prevOp,L=this.$mergeableCommands,T=b.command&&d.command.name==b.command.name;if(d.command.name=="insertstring"){var R=d.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),T=T&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(b.args)),this.mergeNextCommand=!0}else T=T&&L.indexOf(d.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(T=!1),T?this.session.mergeUndoDeltas=!0:L.indexOf(d.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},m.prototype.setKeyboardHandler=function(d,b){if(d&&typeof d=="string"&&d!="ace"){this.$keybindingId=d;var L=this;w.loadModule(["keybinding",d],function(T){L.$keybindingId==d&&L.keyBinding.setKeyboardHandler(T&&T.handler),b&&b()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(d),b&&b()},m.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},m.prototype.setSession=function(d){if(this.session!=d){this.curOp&&this.endOperation(),this.curOp={};var b=this.session;if(b){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 L=this.session.getSelection();L.off("changeCursor",this.$onCursorChange),L.off("changeSelection",this.$onSelectionChange)}this.session=d,d?(this.$onDocumentChange=this.onDocumentChange.bind(this),d.on("change",this.$onDocumentChange),this.renderer.setSession(d),this.$onChangeMode=this.onChangeMode.bind(this),d.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),d.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),d.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),d.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),d.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),d.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=d.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(d)),this._signal("changeSession",{session:d,oldSession:b}),this.curOp=null,b&&b._signal("changeEditor",{oldEditor:this}),b&&(b.$editor=null),d&&d._signal("changeEditor",{editor:this}),d&&(d.$editor=this),d&&!d.destroyed&&d.bgTokenizer.scheduleStart()}},m.prototype.getSession=function(){return this.session},m.prototype.setValue=function(d,b){return this.session.doc.setValue(d),b?b==1?this.navigateFileEnd():b==-1&&this.navigateFileStart():this.selectAll(),d},m.prototype.getValue=function(){return this.session.getValue()},m.prototype.getSelection=function(){return this.selection},m.prototype.resize=function(d){this.renderer.onResize(d)},m.prototype.setTheme=function(d,b){this.renderer.setTheme(d,b)},m.prototype.getTheme=function(){return this.renderer.getTheme()},m.prototype.setStyle=function(d,b){this.renderer.setStyle(d,b)},m.prototype.unsetStyle=function(d){this.renderer.unsetStyle(d)},m.prototype.getFontSize=function(){return this.getOption("fontSize")||g.computedStyle(this.container).fontSize},m.prototype.setFontSize=function(d){this.setOption("fontSize",d)},m.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var d=this;this.$highlightPending=!0,setTimeout(function(){d.$highlightPending=!1;var b=d.session;if(!(!b||b.destroyed)){b.$bracketHighlight&&(b.$bracketHighlight.markerIds.forEach(function(W){b.removeMarker(W)}),b.$bracketHighlight=null);var L=d.getCursorPosition(),T=d.getKeyboardHandler(),R=T&&T.$getDirectionForHighlight&&T.$getDirectionForHighlight(d),I=b.getMatchingBracketRanges(L,R);if(!I){var D=new p(b,L.row,L.column),z=D.getCurrentToken();if(z&&/\b(?:tag-open|tag-name)/.test(z.type)){var N=b.getMatchingTags(L);N&&(I=[N.openTagName.isEmpty()?N.openTag:N.openTagName,N.closeTagName.isEmpty()?N.closeTag:N.closeTagName])}}if(!I&&b.$mode.getMatching&&(I=b.$mode.getMatching(d.session)),!I){d.getHighlightIndentGuides()&&d.renderer.$textLayer.$highlightIndentGuide();return}var B="ace_bracket";Array.isArray(I)?I.length==1&&(B="ace_error_bracket"):I=[I],I.length==2&&(s.comparePoints(I[0].end,I[1].start)==0?I=[s.fromPoints(I[0].start,I[1].end)]:s.comparePoints(I[0].start,I[1].end)==0&&(I=[s.fromPoints(I[1].start,I[0].end)])),b.$bracketHighlight={ranges:I,markerIds:I.map(function(W){return b.addMarker(W,B,"text")})},d.getHighlightIndentGuides()&&d.renderer.$textLayer.$highlightIndentGuide()}},50)}},m.prototype.focus=function(){this.textInput.focus()},m.prototype.isFocused=function(){return this.textInput.isFocused()},m.prototype.blur=function(){this.textInput.blur()},m.prototype.onFocus=function(d){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",d))},m.prototype.onBlur=function(d){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",d))},m.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},m.prototype.onDocumentChange=function(d){var b=this.session.$useWrapMode,L=d.start.row==d.end.row?d.end.row:1/0;this.renderer.updateLines(d.start.row,L,b),this._signal("change",d),this.$cursorChange()},m.prototype.onTokenizerUpdate=function(d){var b=d.data;this.renderer.updateLines(b.first,b.last)},m.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},m.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},m.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},m.prototype.$updateHighlightActiveLine=function(){var d=this.getSession(),b;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(b=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(b=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(b=!1)),d.$highlightLineMarker&&!b)d.removeMarker(d.$highlightLineMarker.id),d.$highlightLineMarker=null;else if(!d.$highlightLineMarker&&b){var L=new s(b.row,b.column,b.row,1/0);L.id=d.addMarker(L,"ace_active-line","screenLine"),d.$highlightLineMarker=L}else b&&(d.$highlightLineMarker.start.row=b.row,d.$highlightLineMarker.end.row=b.row,d.$highlightLineMarker.start.column=b.column,d._signal("changeBackMarker"))},m.prototype.onSelectionChange=function(d){var b=this.session;if(b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var L=this.selection.getRange(),T=this.getSelectionStyle();b.$selectionMarker=b.addMarker(L,"ace_selection",T)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},m.prototype.$getSelectionHighLightRegexp=function(){var d=this.session,b=this.getSelectionRange();if(!(b.isEmpty()||b.isMultiLine())){var L=b.start.column,T=b.end.column,R=d.getLine(b.start.row),I=R.substring(L,T);if(!(I.length>5e3||!/[\w\d]/.test(I))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:I}),z=R.substring(L-1,T+1);if(D.test(z))return D}}},m.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},m.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},m.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},m.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},m.prototype.onChangeMode=function(d){this.renderer.updateText(),this._emit("changeMode",d)},m.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},m.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},m.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},m.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},m.prototype.getCopyText=function(){var d=this.getSelectedText(),b=this.session.doc.getNewLineCharacter(),L=!1;if(!d&&this.$copyWithEmptySelection){L=!0;for(var T=this.selection.getAllRanges(),R=0;R<T.length;R++){var I=T[R];R&&T[R-1].start.row==I.start.row||(d+=this.session.getLine(I.start.row)+b)}}var D={text:d};return this._signal("copy",D),_.lineMode=L?D.text:!1,D.text},m.prototype.onCopy=function(){this.commands.exec("copy",this)},m.prototype.onCut=function(){this.commands.exec("cut",this)},m.prototype.onPaste=function(d,b){var L={text:d,event:b};this.commands.exec("paste",this,L)},m.prototype.$handlePaste=function(d){typeof d=="string"&&(d={text:d}),this._signal("paste",d);var b=d.text,L=b===_.lineMode,T=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)L?T.insert({row:this.selection.lead.row,column:0},b):this.insert(b);else if(L)this.selection.rangeList.ranges.forEach(function(B){T.insert({row:B.start.row,column:0},b)});else{var R=b.split(/\r\n|\r|\n/),I=this.selection.rangeList.ranges,D=R.length==2&&(!R[0]||!R[1]);if(R.length!=I.length||D)return this.commands.exec("insertstring",this,b);for(var z=I.length;z--;){var N=I[z];N.isEmpty()||T.remove(N),T.insert(N.start,R[z])}}},m.prototype.execCommand=function(d,b){return this.commands.exec(d,this,b)},m.prototype.insert=function(d,b){var L=this.session,T=L.getMode(),R=this.getCursorPosition();if(this.getBehavioursEnabled()&&!b){var I=T.transformAction(L.getState(R.row),"insertion",this,L,d);I&&(d!==I.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),d=I.text)}if(d==" "&&(d=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&d.indexOf(`
221
+ `)==-1){var D=s.fromPoints(R,R);D.end.column+=d.length,this.session.remove(D)}}else{var D=this.getSelectionRange();R=this.session.remove(D),this.clearSelection()}if(d==`
222
+ `||d==`\r
223
+ `){var W=L.getLine(R.row);if(R.column>W.search(/\S|$/)){var z=W.substr(R.column).search(/\S|$/);L.doc.removeInLine(R.row,R.column,R.column+z)}}this.clearSelection();var N=R.column,B=L.getState(R.row),W=L.getLine(R.row),j=T.checkOutdent(B,W,d);if(L.insert(R,d),I&&I.selection&&(I.selection.length==2?this.selection.setSelectionRange(new s(R.row,N+I.selection[0],R.row,N+I.selection[1])):this.selection.setSelectionRange(new s(R.row+I.selection[0],I.selection[1],R.row+I.selection[2],I.selection[3]))),this.$enableAutoIndent){if(L.getDocument().isNewLine(d)){var G=T.getNextLineIndent(B,W.slice(0,R.column),L.getTabString());L.insert({row:R.row+1,column:0},G)}j&&T.autoOutdent(B,L,R.row)}},m.prototype.autoIndent=function(){for(var d=this.session,b=d.getMode(),L=this.selection.isEmpty()?[new s(0,0,d.doc.getLength()-1,0)]:this.selection.getAllRanges(),T="",R="",I="",D=d.getTabString(),z=0;z<L.length;z++)for(var N=L[z].start.row,B=L[z].end.row,W=N;W<=B;W++){W>0&&(T=d.getState(W-1),R=d.getLine(W-1),I=b.getNextLineIndent(T,R,D));var j=d.getLine(W),G=b.$getIndent(j);if(I!==G){if(G.length>0){var V=new s(W,0,W,G.length);d.remove(V)}I.length>0&&d.insert({row:W,column:0},I)}b.autoOutdent(T,d,W)}},m.prototype.onTextInput=function(d,b){if(!b)return this.keyBinding.onTextInput(d);this.startOperation({command:{name:"insertstring"}});var L=this.applyComposition.bind(this,d,b);this.selection.rangeCount?this.forEachSelection(L):L(),this.endOperation()},m.prototype.applyComposition=function(d,b){if(b.extendLeft||b.extendRight){var L=this.selection.getRange();L.start.column-=b.extendLeft,L.end.column+=b.extendRight,L.start.column<0&&(L.start.row--,L.start.column+=this.session.getLine(L.start.row).length+1),this.selection.setRange(L),!d&&!L.isEmpty()&&this.remove()}if((d||!this.selection.isEmpty())&&this.insert(d,!0),b.restoreStart||b.restoreEnd){var L=this.selection.getRange();L.start.column-=b.restoreStart,L.end.column-=b.restoreEnd,this.selection.setRange(L)}},m.prototype.onCommandKey=function(d,b,L){return this.keyBinding.onCommandKey(d,b,L)},m.prototype.setOverwrite=function(d){this.session.setOverwrite(d)},m.prototype.getOverwrite=function(){return this.session.getOverwrite()},m.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},m.prototype.setScrollSpeed=function(d){this.setOption("scrollSpeed",d)},m.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},m.prototype.setDragDelay=function(d){this.setOption("dragDelay",d)},m.prototype.getDragDelay=function(){return this.getOption("dragDelay")},m.prototype.setSelectionStyle=function(d){this.setOption("selectionStyle",d)},m.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},m.prototype.setHighlightActiveLine=function(d){this.setOption("highlightActiveLine",d)},m.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},m.prototype.setHighlightGutterLine=function(d){this.setOption("highlightGutterLine",d)},m.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},m.prototype.setHighlightSelectedWord=function(d){this.setOption("highlightSelectedWord",d)},m.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},m.prototype.setAnimatedScroll=function(d){this.renderer.setAnimatedScroll(d)},m.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},m.prototype.setShowInvisibles=function(d){this.renderer.setShowInvisibles(d)},m.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},m.prototype.setDisplayIndentGuides=function(d){this.renderer.setDisplayIndentGuides(d)},m.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},m.prototype.setHighlightIndentGuides=function(d){this.renderer.setHighlightIndentGuides(d)},m.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},m.prototype.setShowPrintMargin=function(d){this.renderer.setShowPrintMargin(d)},m.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},m.prototype.setPrintMarginColumn=function(d){this.renderer.setPrintMarginColumn(d)},m.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},m.prototype.setReadOnly=function(d){this.setOption("readOnly",d)},m.prototype.getReadOnly=function(){return this.getOption("readOnly")},m.prototype.setBehavioursEnabled=function(d){this.setOption("behavioursEnabled",d)},m.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},m.prototype.setWrapBehavioursEnabled=function(d){this.setOption("wrapBehavioursEnabled",d)},m.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},m.prototype.setShowFoldWidgets=function(d){this.setOption("showFoldWidgets",d)},m.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},m.prototype.setFadeFoldWidgets=function(d){this.setOption("fadeFoldWidgets",d)},m.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},m.prototype.remove=function(d){this.selection.isEmpty()&&(d=="left"?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var L=this.session,T=L.getState(b.start.row),R=L.getMode().transformAction(T,"deletion",this,L,b);if(b.end.column===0){var I=L.getTextRange(b);if(I[I.length-1]==`
224
+ `){var D=L.getLine(b.end.row);/^\s+$/.test(D)&&(b.end.column=D.length)}}R&&(b=R)}this.session.remove(b),this.clearSelection()},m.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},m.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},m.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},m.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var d=this.getSelectionRange();d.start.column==d.end.column&&d.start.row==d.end.row&&(d.end.column=0,d.end.row++),this.session.remove(d),this.clearSelection()},m.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var d=this.getCursorPosition();this.insert(`
225
+ `),this.moveCursorToPosition(d)},m.prototype.setGhostText=function(d,b){this.renderer.setGhostText(d,b)},m.prototype.removeGhostText=function(){this.renderer.removeGhostText()},m.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var d=this.getCursorPosition(),b=d.column;if(b!==0){var L=this.session.getLine(d.row),T,R;b<L.length?(T=L.charAt(b)+L.charAt(b-1),R=new s(d.row,b-1,d.row,b+1)):(T=L.charAt(b-1)+L.charAt(b-2),R=new s(d.row,b-2,d.row,b)),this.session.replace(R,T),this.session.selection.moveToPosition(R.end)}}},m.prototype.toLowerCase=function(){var d=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),L=this.session.getTextRange(b);this.session.replace(b,L.toLowerCase()),this.selection.setSelectionRange(d)},m.prototype.toUpperCase=function(){var d=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),L=this.session.getTextRange(b);this.session.replace(b,L.toUpperCase()),this.selection.setSelectionRange(d)},m.prototype.indent=function(){var d=this.session,b=this.getSelectionRange();if(b.start.row<b.end.row){var L=this.$getSelectedRows();d.indentRows(L.first,L.last," ");return}else if(b.start.column<b.end.column){var T=d.getTextRange(b);if(!/^\s+$/.test(T)){var L=this.$getSelectedRows();d.indentRows(L.first,L.last," ");return}}var R=d.getLine(b.start.row),I=b.start,D=d.getTabSize(),z=d.documentToScreenColumn(I.row,I.column);if(this.session.getUseSoftTabs())var N=D-z%D,B=a.stringRepeat(" ",N);else{for(var N=z%D;R[b.start.column-1]==" "&&N;)b.start.column--,N--;this.selection.setSelectionRange(b),B=" "}return this.insert(B)},m.prototype.blockIndent=function(){var d=this.$getSelectedRows();this.session.indentRows(d.first,d.last," ")},m.prototype.blockOutdent=function(){var d=this.session.getSelection();this.session.outdentRows(d.getRange())},m.prototype.sortLines=function(){for(var d=this.$getSelectedRows(),b=this.session,L=[],T=d.first;T<=d.last;T++)L.push(b.getLine(T));L.sort(function(D,z){return D.toLowerCase()<z.toLowerCase()?-1:D.toLowerCase()>z.toLowerCase()?1:0});for(var R=new s(0,0,0,0),T=d.first;T<=d.last;T++){var I=b.getLine(T);R.start.row=T,R.end.row=T,R.end.column=I.length,b.replace(R,L[T-d.first])}},m.prototype.toggleCommentLines=function(){var d=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(d,this.session,b.first,b.last)},m.prototype.toggleBlockComment=function(){var d=this.getCursorPosition(),b=this.session.getState(d.row),L=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,L,d)},m.prototype.getNumberAt=function(d,b){var L=/[\-]?[0-9]+(?:\.[0-9]+)?/g;L.lastIndex=0;for(var T=this.session.getLine(d);L.lastIndex<b;){var R=L.exec(T);if(R.index<=b&&R.index+R[0].length>=b){var I={value:R[0],start:R.index,end:R.index+R[0].length};return I}}return null},m.prototype.modifyNumber=function(d){var b=this.selection.getCursor().row,L=this.selection.getCursor().column,T=new s(b,L-1,b,L),R=this.session.getTextRange(T);if(!isNaN(parseFloat(R))&&isFinite(R)){var I=this.getNumberAt(b,L);if(I){var D=I.value.indexOf(".")>=0?I.start+I.value.indexOf(".")+1:I.end,z=I.start+I.value.length-D,N=parseFloat(I.value);N*=Math.pow(10,z),D!==I.end&&L<D?d*=Math.pow(10,I.end-L-1):d*=Math.pow(10,I.end-L),N+=d,N/=Math.pow(10,z);var B=N.toFixed(z),W=new s(b,I.start,b,I.end);this.session.replace(W,B),this.moveCursorTo(b,Math.max(I.start+1,L+B.length-I.value.length))}}else this.toggleWord()},m.prototype.toggleWord=function(){var d=this.selection.getCursor().row,b=this.selection.getCursor().column;this.selection.selectWord();var L=this.getSelectedText(),T=this.selection.getWordRange().start.column,R=L.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),I=b-T-1;I<0&&(I=0);var D=0,z=0,N=this;L.match(/[A-Za-z0-9_]+/)&&R.forEach(function(ne,se){z=D+ne.length,I>=D&&I<=z&&(L=ne,N.selection.clearSelection(),N.moveCursorTo(d,D+T),N.selection.selectTo(d,z+T)),D=z});for(var B=this.$toggleWordPairs,W,j=0;j<B.length;j++)for(var G=B[j],V=0;V<=1;V++){var X=+!V,Y=L.match(new RegExp("^\\s?_?("+a.escapeRegExp(G[V])+")\\s?$","i"));if(Y){var J=L.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(Y[1])+")($|\\s)","g"));J&&(W=L.replace(new RegExp(a.escapeRegExp(G[V]),"i"),function(ne){var se=G[X];return ne.toUpperCase()==ne?se=se.toUpperCase():ne.charAt(0).toUpperCase()==ne.charAt(0)&&(se=se.substr(0,0)+G[X].charAt(0).toUpperCase()+se.substr(1)),se}),this.insert(W),W="")}}},m.prototype.findLinkAt=function(d,b){var L,T,R=this.session.getLine(d),I=R.split(/((?:https?|ftp):\/\/[\S]+)/),D=b;D<0&&(D=0);var z=0,N=0,B;try{for(var W=v(I),j=W.next();!j.done;j=W.next()){var G=j.value;if(N=z+G.length,D>=z&&D<=N&&G.match(/((?:https?|ftp):\/\/[\S]+)/)){B=G.replace(/[\s:.,'";}\]]+$/,"");break}z=N}}catch(V){L={error:V}}finally{try{j&&!j.done&&(T=W.return)&&T.call(W)}finally{if(L)throw L.error}}return B},m.prototype.openLink=function(){var d=this.selection.getCursor(),b=this.findLinkAt(d.row,d.column);return b&&window.open(b,"_blank"),b!=null},m.prototype.removeLines=function(){var d=this.$getSelectedRows();this.session.removeFullLines(d.first,d.last),this.clearSelection()},m.prototype.duplicateSelection=function(){var d=this.selection,b=this.session,L=d.getRange(),T=d.isBackwards();if(L.isEmpty()){var R=L.start.row;b.duplicateLines(R,R)}else{var I=T?L.start:L.end,D=b.insert(I,b.getTextRange(L));L.start=I,L.end=D,d.setSelectionRange(L,T)}},m.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},m.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},m.prototype.moveText=function(d,b,L){return this.session.moveText(d,b,L)},m.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},m.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},m.prototype.$moveLines=function(d,b){var L,T,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var I=R.toOrientedRange();L=this.$getSelectedRows(I),T=this.session.$moveLines(L.first,L.last,b?0:d),b&&d==-1&&(T=0),I.moveBy(T,0),R.fromOrientedRange(I)}else{var D=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var z=0,N=0,B=D.length,W=0;W<B;W++){var j=W;D[W].moveBy(z,0),L=this.$getSelectedRows(D[W]);for(var G=L.first,V=L.last;++W<B;){N&&D[W].moveBy(N,0);var X=this.$getSelectedRows(D[W]);if(b&&X.first!=V)break;if(!b&&X.first>V+1)break;V=X.last}for(W--,z=this.session.$moveLines(G,V,b?0:d),b&&d==-1&&(j=W+1);j<=W;)D[j].moveBy(z,0),j++;b||(z=0),N+=z}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},m.prototype.$getSelectedRows=function(d){return d=(d||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(d.start.row),last:this.session.getRowFoldEnd(d.end.row)}},m.prototype.onCompositionStart=function(d){this.renderer.showComposition(d)},m.prototype.onCompositionUpdate=function(d){this.renderer.setCompositionText(d)},m.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},m.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},m.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},m.prototype.isRowVisible=function(d){return d>=this.getFirstVisibleRow()&&d<=this.getLastVisibleRow()},m.prototype.isRowFullyVisible=function(d){return d>=this.renderer.getFirstFullyVisibleRow()&&d<=this.renderer.getLastFullyVisibleRow()},m.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},m.prototype.$moveByPage=function(d,b){var L=this.renderer,T=this.renderer.layerConfig,R=d*Math.floor(T.height/T.lineHeight);b===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0)}):b===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var I=L.scrollTop;L.scrollBy(0,R*T.lineHeight),b!=null&&L.scrollCursorIntoView(null,.5),L.animateScrolling(I)},m.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},m.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},m.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},m.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},m.prototype.scrollPageDown=function(){this.$moveByPage(1)},m.prototype.scrollPageUp=function(){this.$moveByPage(-1)},m.prototype.scrollToRow=function(d){this.renderer.scrollToRow(d)},m.prototype.scrollToLine=function(d,b,L,T){this.renderer.scrollToLine(d,b,L,T)},m.prototype.centerSelection=function(){var d=this.getSelectionRange(),b={row:Math.floor(d.start.row+(d.end.row-d.start.row)/2),column:Math.floor(d.start.column+(d.end.column-d.start.column)/2)};this.renderer.alignCursor(b,.5)},m.prototype.getCursorPosition=function(){return this.selection.getCursor()},m.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},m.prototype.getSelectionRange=function(){return this.selection.getRange()},m.prototype.selectAll=function(){this.selection.selectAll()},m.prototype.clearSelection=function(){this.selection.clearSelection()},m.prototype.moveCursorTo=function(d,b){this.selection.moveCursorTo(d,b)},m.prototype.moveCursorToPosition=function(d){this.selection.moveCursorToPosition(d)},m.prototype.jumpToMatching=function(d,b){var L=this.getCursorPosition(),T=new p(this.session,L.row,L.column),R=T.getCurrentToken(),I=0;R&&R.type.indexOf("tag-name")!==-1&&(R=T.stepBackward());var D=R||T.stepForward();if(D){var z,N=!1,B={},W=L.column-D.start,j,G={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;W<D.value.length&&!N;W++)if(G[D.value[W]])switch(j=G[D.value[W]]+"."+D.type.replace("rparen","lparen"),isNaN(B[j])&&(B[j]=0),D.value[W]){case"(":case"[":case"{":B[j]++;break;case")":case"]":case"}":B[j]--,B[j]===-1&&(z="bracket",N=!0);break}}else D.type.indexOf("tag-name")!==-1&&(isNaN(B[D.value])&&(B[D.value]=0),R.value==="<"&&I>1?B[D.value]++:R.value==="</"&&B[D.value]--,B[D.value]===-1&&(z="tag",N=!0));N||(R=D,I++,D=T.stepForward(),W=0)}while(D&&!N);if(z){var V,X;if(z==="bracket")V=this.session.getBracketRange(L),V||(V=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()+W-1,T.getCurrentTokenRow(),T.getCurrentTokenColumn()+W-1),X=V.start,(b||X.row===L.row&&Math.abs(X.column-L.column)<2)&&(V=this.session.getBracketRange(X)));else if(z==="tag"){if(!D||D.type.indexOf("tag-name")===-1)return;if(V=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2,T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2),V.compare(L.row,L.column)===0){var Y=this.session.getMatchingTags(L);Y&&(Y.openTag.contains(L.row,L.column)?(V=Y.closeTag,X=V.start):(V=Y.openTag,Y.closeTag.start.row===L.row&&Y.closeTag.start.column===L.column?X=V.end:X=V.start))}X=X||V.start}X=V&&V.cursor||X,X&&(d?V&&b?this.selection.setRange(V):V&&V.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(X.row,X.column):this.selection.moveTo(X.row,X.column))}}},m.prototype.gotoLine=function(d,b,L){this.selection.clearSelection(),this.session.unfold({row:d-1,column:b||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(d-1,b||0),this.isRowFullyVisible(d-1)||this.scrollToLine(d-1,!0,L)},m.prototype.navigateTo=function(d,b){this.selection.moveTo(d,b)},m.prototype.navigateUp=function(d){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),this.selection.moveCursorBy(-d||-1,0)},m.prototype.navigateDown=function(d){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),this.selection.moveCursorBy(d||1,0)},m.prototype.navigateLeft=function(d){if(this.selection.isEmpty())for(d=d||1;d--;)this.selection.moveCursorLeft();else{var b=this.getSelectionRange().start;this.moveCursorToPosition(b)}this.clearSelection()},m.prototype.navigateRight=function(d){if(this.selection.isEmpty())for(d=d||1;d--;)this.selection.moveCursorRight();else{var b=this.getSelectionRange().end;this.moveCursorToPosition(b)}this.clearSelection()},m.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},m.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},m.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},m.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},m.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},m.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},m.prototype.replace=function(d,b){b&&this.$search.set(b);var L=this.$search.find(this.session),T=0;return L&&(this.$tryReplace(L,d)&&(T=1),this.selection.setSelectionRange(L),this.renderer.scrollSelectionIntoView(L.start,L.end)),T},m.prototype.replaceAll=function(d,b){b&&this.$search.set(b);var L=this.$search.findAll(this.session),T=0;if(!L.length)return T;var R=this.getSelectionRange();this.selection.moveTo(0,0);for(var I=L.length-1;I>=0;--I)this.$tryReplace(L[I],d)&&T++;return this.selection.setSelectionRange(R),T},m.prototype.$tryReplace=function(d,b){var L=this.session.getTextRange(d);return b=this.$search.replace(L,b),b!==null?(d.end=this.session.replace(d,b),d):null},m.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},m.prototype.find=function(d,b,L){b||(b={}),typeof d=="string"||d instanceof RegExp?b.needle=d:typeof d=="object"&&f.mixin(b,d);var T=this.selection.getRange();b.needle==null&&(d=this.session.getTextRange(T)||this.$search.$options.needle,d||(T=this.session.getWordRange(T.start.row,T.start.column),d=this.session.getTextRange(T)),this.$search.set({needle:d})),this.$search.set(b),b.start||this.$search.set({start:T});var R=this.$search.find(this.session);if(b.preventScroll)return R;if(R)return this.revealRange(R,L),R;b.backwards?T.start=T.end:T.end=T.start,this.selection.setRange(T)},m.prototype.findNext=function(d,b){this.find({skipCurrent:!0,backwards:!1},d,b)},m.prototype.findPrevious=function(d,b){this.find(d,{skipCurrent:!0,backwards:!0},b)},m.prototype.revealRange=function(d,b){this.session.unfold(d),this.selection.setSelectionRange(d);var L=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(d.start,d.end,.5),b!==!1&&this.renderer.animateScrolling(L)},m.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},m.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},m.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(d){d.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},m.prototype.setAutoScrollEditorIntoView=function(d){if(d){var b,L=this,T=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var I=this.on("changeSelection",function(){T=!0}),D=this.renderer.on("beforeRender",function(){T&&(b=L.renderer.container.getBoundingClientRect())}),z=this.renderer.on("afterRender",function(){if(T&&b&&(L.isFocused()||L.searchBox&&L.searchBox.isFocused())){var N=L.renderer,B=N.$cursorLayer.$pixelPos,W=N.layerConfig,j=B.top-W.offset;B.top>=0&&j+b.top<0?T=!0:B.top<W.height&&B.top+b.top+W.lineHeight>window.innerHeight?T=!1:T=null,T!=null&&(R.style.top=j+"px",R.style.left=B.left+"px",R.style.height=W.lineHeight+"px",R.scrollIntoView(T)),T=b=null}});this.setAutoScrollEditorIntoView=function(N){N||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",I),this.renderer.off("afterRender",z),this.renderer.off("beforeRender",D))}}},m.prototype.$resetCursorStyle=function(){var d=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking(/smooth/.test(d)),b.isBlinking=!this.$readOnly&&d!="wide",g.setCssClass(b.element,"ace_slim-cursors",/slim/.test(d)))},m.prototype.prompt=function(d,b,L){var T=this;w.loadModule("ace/ext/prompt",function(R){R.prompt(T,d,b,L)})},m}();S.$uid=0,S.prototype.curOp=null,S.prototype.prevOp={},S.prototype.$mergeableCommands=["backspace","del","insertstring"],S.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"],["&&","||"],["==","!="]],f.implement(S.prototype,c),w.defineOptions(S.prototype,"editor",{selectionStyle:{set:function(m){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:m})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(m){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(m){var d=this;if(this.textInput.setReadOnly(m),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(L){var T=!1;if(L&&L.type=="keydown"){if(L&&L.key&&!L.ctrlKey&&!L.metaKey&&(L.key==" "&&L.preventDefault(),T=L.key.length==1),!T)return}else L&&L.type!=="exec"&&(T=!0);if(T){d.hoverTooltip||(d.hoverTooltip=new E);var R=g.createElement("div");R.textContent=C("editor.tooltip.disable-editing","Editing is disabled"),d.hoverTooltip.isOpen||d.hoverTooltip.showForRange(d,d.getSelectionRange(),R)}else d.hoverTooltip&&d.hoverTooltip.isOpen&&d.hoverTooltip.hide()});var b=this.textInput.getElement();m?(x.addListener(b,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(x.removeListener(b,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(m){this.textInput.setCopyWithEmptySelection(m)},initialValue:!1},cursorStyle:{set:function(m){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(m){this.setAutoScrollEditorIntoView(m)}},keyboardHandler:{set:function(m){this.setKeyboardHandler(m)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(m){this.session.setValue(m)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(m){this.setSession(m)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(m){this.renderer.$gutterLayer.setShowLineNumbers(m),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),m&&this.$relativeLineNumbers?$.attach(this):$.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(m){this.$showLineNumbers&&m?$.attach(this):$.detach(this)}},placeholder:{set:function(m){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var d=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(d&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),g.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!d&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),g.addCssClass(this.container,"ace_hasPlaceholder");var b=g.createElement("div");b.className="ace_placeholder",b.textContent=this.$placeholder||"",this.renderer.placeholderNode=b,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!d&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(m){var d={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(T){T.blur(),T.renderer.scroller.focus()},readOnly:!0},b=function(T){if(T.target==this.renderer.scroller&&T.keyCode===A.enter){T.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus()}},L;m?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(l.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",C("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",C("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",b.bind(this)),this.commands.addCommand(d),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",C("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",C("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),L||(L=new u(this)),L.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",b.bind(this)),this.commands.removeCommand(d),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),L&&L.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(m){this.$textInputAriaLabel=m},initialValue:""},enableMobileMenu:{set:function(m){this.$enableMobileMenu=m},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 $={getText:function(m,d){return(Math.abs(m.selection.lead.row-d)||d+1+(d<9?"·":""))+""},getWidth:function(m,d,b){return Math.max(d.toString().length,(b.lastRow+1).toString().length,2)*b.characterWidth},update:function(m,d){d.renderer.$loop.schedule(d.renderer.CHANGE_GUTTER)},attach:function(m){m.renderer.$gutterLayer.$renderer=this,m.on("changeSelection",this.update),this.update(null,m)},detach:function(m){m.renderer.$gutterLayer.$renderer==this&&(m.renderer.$gutterLayer.$renderer=null),m.off("changeSelection",this.update),this.update(null,m)}};M.Editor=S}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(k,M,F){var v=k("../lib/dom"),f=function(){function g(a,l){this.element=a,this.canvasHeight=l||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return g.prototype.moveContainer=function(a){v.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},g.prototype.pageChanged=function(a,l){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},g.prototype.computeLineTop=function(a,l,r){var n=l.firstRowScreen*l.lineHeight,i=Math.floor(n/this.canvasHeight),t=r.documentToScreenRow(a,0)*l.lineHeight;return t-i*this.canvasHeight},g.prototype.computeLineHeight=function(a,l,r){return l.lineHeight*r.getRowLineCount(a)},g.prototype.getLength=function(){return this.cells.length},g.prototype.get=function(a){return this.cells[a]},g.prototype.shift=function(){this.$cacheCell(this.cells.shift())},g.prototype.pop=function(){this.$cacheCell(this.cells.pop())},g.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var l=v.createFragment(this.element),r=0;r<a.length;r++)l.appendChild(a[r].element);this.element.appendChild(l)}else this.cells.push(a),this.element.appendChild(a.element)},g.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var l=v.createFragment(this.element),r=0;r<a.length;r++)l.appendChild(a[r].element);this.element.firstChild?this.element.insertBefore(l,this.element.firstChild):this.element.appendChild(l)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},g.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},g.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},g.prototype.createCell=function(a,l,r,n){var i=this.cellCache.pop();if(!i){var t=v.createElement("div");n&&n(t),this.element.appendChild(t),i={element:t,text:"",row:a}}return i.row=a,i},g}();M.Lines=f}),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,M,F){var v=k("../lib/dom"),f=k("../lib/oop"),g=k("../lib/lang"),a=k("../lib/event_emitter").EventEmitter,l=k("./lines").Lines,r=k("../config").nls,n=function(){function t(e){this.element=v.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 l(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,h=this.$annotations[c];h||(h=this.$annotations[c]={text:[],type:[],displayText:[]});var y=s.text,w=s.text,p=s.type;y=y?g.escapeHTML(y):s.html||"",w=w||s.html||"",h.text.indexOf(y)===-1&&(h.text.push(y),h.type.push(p),h.displayText.push(w));var u=s.className;u?h.className=u:p==="error"?h.className=" ace_error":p==="security"&&!/\bace_error\b/.test(h.className)?h.className=" ace_security":p==="warning"&&!/\bace_(error|security)\b/.test(h.className)?h.className=" ace_warning":p==="info"&&!h.className?h.className=" ace_info":p==="hint"&&!h.className&&(h.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 h=o.getNextFoldLine(s),y=h?h.start.row:1/0,w=null,p=-1,u=s;;){if(u>y&&(u=h.end.row+1,h=o.getNextFoldLine(u,h),y=h?h.start.row:1/0),u>c){for(;this.$lines.getLength()>p+1;)this.$lines.pop();break}w=this.$lines.get(++p),w?w.row=u:(w=this.$lines.createCell(u,e,this.session,i),this.$lines.push(w)),this.$renderCell(w,e,h,u),u++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var o=this.session,s=o.gutterRenderer||this.$renderer,c=o.$firstLineNumber,h=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||o.$useWrapMode)&&(h=o.getLength()+c-1);var y=s?s.getWidth(o,h,e):h.toString().length*e.characterWidth,w=this.$padding||this.$computePadding();y+=w.left+w.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 h=this.session.getFoldLine(this.$cursorRow);if(s>0&&h&&h.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 h=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);h>0;h--)this.$lines.shift();if(c>s)for(var h=this.session.getFoldedRowCount(s+1,c);h>0;h--)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=[],h=o,y=this.session.getNextFoldLine(h),w=y?y.start.row:1/0;h>w&&(h=y.end.row+1,y=this.session.getNextFoldLine(h,y),w=y?y.start.row:1/0),!(h>s);){var p=this.$lines.createCell(h,e,this.session,i);this.$renderCell(p,e,y,h),c.push(p),h++}return c},t.prototype.$renderCell=function(e,o,s,c){var h=e.element,y=this.session,w=h.childNodes[0],p=h.childNodes[1],u=h.childNodes[2],C=h.childNodes[3],_=u.firstChild,A=y.$firstLineNumber,x=y.$breakpoints,E=y.$decorations,S=y.gutterRenderer||this.$renderer,$=this.$showFoldWidgets&&y.foldWidgets,m=s?s.start.row:Number.MAX_VALUE,d=o.lineHeight+"px",b=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",L=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=(S?S.getText(y,c):c+A).toString();if(this.$highlightGutterLine&&(c==this.$cursorRow||s&&c<this.$cursorRow&&c>=m&&this.$cursorRow<=s.end.row)&&(b+="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)),x[c]&&(b+=x[c]),E[c]&&(b+=E[c]),this.$annotations[c]&&c!==m&&(b+=this.$annotations[c].className),$){var R=$[c];R==null&&(R=$[c]=y.getFoldWidget(c))}if(R){var I="ace_fold-widget ace_"+R,D=R=="start"&&c==m&&c<s.end.row;if(D){I+=" ace_closed";for(var z="",N=!1,B=c+1;B<=s.end.row;B++)if(this.$annotations[B]){if(this.$annotations[B].className===" ace_error"){N=!0,z=" ace_error_fold";break}this.$annotations[B].className===" ace_security"?(N=!0,z=" ace_security_fold"):this.$annotations[B].className===" ace_warning"&&z!==" ace_security_fold"&&(N=!0,z=" ace_warning_fold")}b+=z}else I+=" ace_open";p.className!=I&&(p.className=I),v.setStyle(p.style,"height",d),v.setStyle(p.style,"display","inline-block"),p.setAttribute("role","button"),p.setAttribute("tabindex","-1");var W=y.getFoldWidgetRange(c);W?p.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[W.start.row+1,W.end.row+1])):s?p.setAttribute("aria-label",r("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",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[c+1])),D?(p.setAttribute("aria-expanded","false"),p.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):(p.setAttribute("aria-expanded","true"),p.setAttribute("title",r("gutter.code-folding.open.title","Fold code")))}else p&&(v.setStyle(p.style,"display","none"),p.setAttribute("tabindex","0"),p.removeAttribute("role"),p.removeAttribute("aria-label"));var j=this.session.$gutterCustomWidgets[c];if(j?this.$addCustomWidget(c,j,e):C&&this.$removeCustomWidget(c,e),N&&this.$showFoldedAnnotations){u.className="ace_gutter_annotation",_.className=L,_.className+=z,v.setStyle(_.style,"height",d),v.setStyle(u.style,"display","block"),v.setStyle(u.style,"height",d);var G;switch(z){case" ace_error_fold":G=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[T]);break;case" ace_security_fold":G=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[T]);break;case" ace_warning_fold":G=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[T]);break}u.setAttribute("aria-label",G),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")}else if(this.$annotations[c]){u.className="ace_gutter_annotation",_.className=L,this.$useSvgGutterIcons?_.className+=this.$annotations[c].className:h.classList.add(this.$annotations[c].className.replace(" ","")),v.setStyle(_.style,"height",d),v.setStyle(u.style,"display","block"),v.setStyle(u.style,"height",d);var G;switch(this.$annotations[c].className){case" ace_error":G=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[T]);break;case" ace_security":G=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[T]);break;case" ace_warning":G=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[T]);break;case" ace_info":G=r("gutter.annotation.aria-label.info","Info, read annotations row $0",[T]);break;case" ace_hint":G=r("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[T]);break}u.setAttribute("aria-label",G),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")}else v.setStyle(u.style,"display","none"),u.removeAttribute("aria-label"),u.removeAttribute("role"),u.setAttribute("tabindex","0");return T!==w.data&&(w.data=T),h.className!=b&&(h.className=b),v.setStyle(e.element.style,"height",this.$lines.computeLineHeight(c,o,y)+"px"),v.setStyle(e.element.style,"top",this.$lines.computeLineTop(c,o,y)+"px"),e.text=T,u.style.display==="none"&&p.style.display==="none"&&!j?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?v.addCssClass(this.element,"ace_folding-enabled"):v.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$hideFoldWidget=function(e,o){var s=o||this.$getGutterCell(e);if(s&&s.element){var c=s.element.childNodes[1];c&&v.setStyle(c.style,"display","none")}},t.prototype.$showFoldWidget=function(e,o){var s=o||this.$getGutterCell(e);if(s&&s.element){var c=s.element.childNodes[1];c&&this.session.foldWidgets&&this.session.foldWidgets[s.row]&&v.setStyle(c.style,"display","inline-block")}},t.prototype.$getGutterCell=function(e){var o=this.$lines.cells,s=this.session.documentToScreenRow(e,0);return o[e-this.config.firstRowScreen-(e-s)]},t.prototype.$addCustomWidget=function(e,o,s){var c=o.className,h=o.label,y=o.title,w=o.callbacks;this.session.$gutterCustomWidgets[e]={className:c,label:h,title:y,callbacks:w},this.$hideFoldWidget(e,s);var p=s||this.$getGutterCell(e);if(p&&p.element){var u=p.element.querySelector(".ace_custom-widget");u&&u.remove(),u=v.createElement("span"),u.className="ace_custom-widget ".concat(c),u.setAttribute("tabindex","-1"),u.setAttribute("role","button"),u.setAttribute("aria-label",h),u.setAttribute("title",y),v.setStyle(u.style,"display","inline-block"),v.setStyle(u.style,"height","inherit"),w&&w.onClick&&u.addEventListener("click",function(C){w.onClick(C,e),C.stopPropagation()}),p.element.appendChild(u)}},t.prototype.$removeCustomWidget=function(e,o){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,o);var s=o||this.$getGutterCell(e);if(s&&s.element){var c=s.element.querySelector(".ace_custom-widget");c&&s.element.removeChild(c)}},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=v.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}();n.prototype.$fixedWidth=!1,n.prototype.$highlightGutterLine=!0,n.prototype.$renderer="",n.prototype.$showLineNumbers=!0,n.prototype.$showFoldWidgets=!0,f.implement(n.prototype,a);function i(t){var e=document.createTextNode("");t.appendChild(e);var o=v.createElement("span");t.appendChild(o);var s=v.createElement("span");t.appendChild(s);var c=v.createElement("span");return s.appendChild(c),t}M.Gutter=n}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(k,M,F){var v=k("../range").Range,f=k("../lib/dom"),g=function(){function l(r){this.element=f.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return l.prototype.setPadding=function(r){this.$padding=r},l.prototype.setSession=function(r){this.session=r},l.prototype.setMarkers=function(r){this.markers=r},l.prototype.elt=function(r,n){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=n,i.className=r},l.prototype.update=function(r){if(r){this.config=r,this.i=0;var n;for(var i in this.markers){var t=this.markers[i];if(!t.range){t.update(n,this,this.session,r);continue}var e=t.range.clipRows(r.firstRow,r.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var o=this.$getTop(e.start.row,r),s=this.$padding+e.start.column*r.characterWidth;t.renderer(n,e,s,o,r)}else t.type=="fullLine"?this.drawFullLineMarker(n,e,t.clazz,r):t.type=="screenLine"?this.drawScreenLineMarker(n,e,t.clazz,r):e.isMultiLine()?t.type=="text"?this.drawTextMarker(n,e,t.clazz,r):this.drawMultiLineMarker(n,e,t.clazz,r):this.drawSingleLineMarker(n,e,t.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},l.prototype.$getTop=function(r,n){return(r-n.firstRowScreen)*n.lineHeight},l.prototype.drawTextMarker=function(r,n,i,t,e){for(var o=this.session,s=n.start.row,c=n.end.row,h=s,y=0,w=0,p=o.getScreenLastRowColumn(h),u=new v(h,n.start.column,h,w);h<=c;h++)u.start.row=u.end.row=h,u.start.column=h==s?n.start.column:o.getRowWrapIndent(h),u.end.column=p,y=w,w=p,p=h+1<c?o.getScreenLastRowColumn(h+1):h==c?0:n.end.column,this.drawSingleLineMarker(r,u,i+(h==s?" ace_start":"")+" ace_br"+a(h==s||h==s+1&&n.start.column,y<w,w>p,h==c),t,h==c?0:1,e)},l.prototype.drawMultiLineMarker=function(r,n,i,t,e){var o=this.$padding,s=t.lineHeight,c=this.$getTop(n.start.row,t),h=o+n.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(n.start.row)){var y=n.clone();y.end.row=y.start.row,y.end.column=this.session.getLine(y.start.row).length,this.drawBidiSingleLineMarker(r,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:"+h+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(n.end.row)){var y=n.clone();y.start.row=y.end.row,y.start.column=0,this.drawBidiSingleLineMarker(r,y,i+" ace_br12",t,null,e)}else{c=this.$getTop(n.end.row,t);var w=n.end.column*t.characterWidth;this.elt(i+" ace_br12","height:"+s+"px;width:"+w+"px;top:"+c+"px;left:"+o+"px;"+(e||""))}if(s=(n.end.row-n.start.row-1)*t.lineHeight,!(s<=0)){c=this.$getTop(n.start.row+1,t);var p=(n.start.column?1:0)|(n.end.column?0:8);this.elt(i+(p?" ace_br"+p:""),"height:"+s+"px;right:"+o+"px;top:"+c+"px;left:"+o+"px;"+(e||""))}},l.prototype.drawSingleLineMarker=function(r,n,i,t,e,o){if(this.session.$bidiHandler.isBidiRow(n.start.row))return this.drawBidiSingleLineMarker(r,n,i,t,e,o);var s=t.lineHeight,c=(n.end.column+(e||0)-n.start.column)*t.characterWidth,h=this.$getTop(n.start.row,t),y=this.$padding+n.start.column*t.characterWidth;this.elt(i,"height:"+s+"px;width:"+c+"px;top:"+h+"px;left:"+y+"px;"+(o||""))},l.prototype.drawBidiSingleLineMarker=function(r,n,i,t,e,o){var s=t.lineHeight,c=this.$getTop(n.start.row,t),h=this.$padding,y=this.session.$bidiHandler.getSelections(n.start.column,n.end.column);y.forEach(function(w){this.elt(i,"height:"+s+"px;width:"+(w.width+(e||0))+"px;top:"+c+"px;left:"+(h+w.left)+"px;"+(o||""))},this)},l.prototype.drawFullLineMarker=function(r,n,i,t,e){var o=this.$getTop(n.start.row,t),s=t.lineHeight;n.start.row!=n.end.row&&(s+=this.$getTop(n.end.row,t)-o),this.elt(i,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(e||""))},l.prototype.drawScreenLineMarker=function(r,n,i,t,e){var o=this.$getTop(n.start.row,t),s=t.lineHeight;this.elt(i,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(e||""))},l}();g.prototype.$padding=0;function a(l,r,n,i){return(l?1:0)|(r?2:0)|(n?4:0)|(i?8:0)}M.Marker=g}),ace.define("ace/layer/text_util",["require","exports","module"],function(k,M,F){var v=new Set(["text","rparen","lparen"]);M.isTextToken=function(f){return v.has(f)}}),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,M,F){var v=k("../lib/oop"),f=k("../lib/dom"),g=k("../lib/lang"),a=k("./lines").Lines,l=k("../lib/event_emitter").EventEmitter,r=k("../config").nls,n=k("./text_util").isTextToken,i=function(){function t(e){this.dom=f,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()==`
226
+ `&&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=g.stringRepeat(this.TAB_CHAR,s),o.push(c)}else o.push(this.dom.createTextNode(g.stringRepeat(" ",s),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var h="ace_indent-guide",y=this.showSpaces?" ace_invisible ace_invisible_space":"",w=this.showSpaces?g.stringRepeat(this.SPACE_CHAR,this.tabSize):g.stringRepeat(" ",this.tabSize),p=this.showTabs?" ace_invisible ace_invisible_tab":"",u=this.showTabs?g.stringRepeat(this.TAB_CHAR,this.tabSize):w,c=this.dom.createElement("span");c.className=h+y,c.textContent=w,this.$tabStrings[" "]=c;var c=this.dom.createElement("span");c.className=h+p,c.textContent=u,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),h=Math.min(s,e.lastRow),y=this.element.childNodes,w=0,u=e.firstRow;u<c;u++){var C=this.session.getFoldLine(u);if(C)if(C.containsRow(c)){c=C.start.row;break}else u=C.end.row;w++}for(var p=!1,u=c,C=this.session.getNextFoldLine(u),_=C?C.start.row:1/0;u>_&&(u=C.end.row+1,C=this.session.getNextFoldLine(u,C),_=C?C.start.row:1/0),!(u>h);){var A=y[w++];if(A){this.dom.removeChildren(A),this.$renderLine(A,u,u==_?C:!1),p&&(A.style.top=this.$lines.computeLineTop(u,e,this.session)+"px");var x=e.lineHeight*this.session.getRowLength(u)+"px";A.style.height!=x&&(p=!0,A.style.height=x)}u++}if(p)for(;w<this.$lines.cells.length;){var E=this.$lines.cells[w++];E.element.style.top=this.$lines.computeLineTop(E.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 h=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);h>0;h--)this.$lines.shift();if(o.lastRow>e.lastRow)for(var h=this.session.getFoldedRowCount(e.lastRow+1,o.lastRow);h>0;h--)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=[],h=o,y=this.session.getNextFoldLine(h),w=y?y.start.row:1/0;h>w&&(h=y.end.row+1,y=this.session.getNextFoldLine(h,y),w=y?y.start.row:1/0),!(h>s);){var p=this.$lines.createCell(h,e,this.session),u=p.element;this.dom.removeChildren(u),f.setStyle(u.style,"height",this.$lines.computeLineHeight(h,e,this.session)+"px"),f.setStyle(u.style,"top",this.$lines.computeLineTop(h,e,this.session)+"px"),this.$renderLine(u,h,h==w?y:!1),this.$useLineGroups()?u.className="ace_line_group":u.className="ace_line",c.push(p),h++}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 h=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,w=this.dom.createFragment(this.element),p,u=0;p=y.exec(c);){var C=p[1],_=p[2],A=p[3],x=p[4],E=p[5];if(!(!h.showSpaces&&_)){var S=u!=p.index?c.slice(u,p.index):"";if(u=p.index+p[0].length,S&&w.appendChild(this.dom.createTextNode(S,this.element)),C){var $=h.session.getScreenTabSize(o+p.index),m=h.$tabStrings[$].cloneNode(!0);m.charCount=1,w.appendChild(m),o+=$-1}else if(_)if(h.showSpaces){var d=this.dom.createElement("span");d.className="ace_invisible ace_invisible_space",d.textContent=g.stringRepeat(h.SPACE_CHAR,_.length),w.appendChild(d)}else w.appendChild(this.dom.createTextNode(_,this.element));else if(A){var d=this.dom.createElement("span");d.className="ace_invisible ace_invisible_space ace_invalid",d.textContent=g.stringRepeat(h.SPACE_CHAR,A.length),w.appendChild(d)}else if(x){o+=1;var d=this.dom.createElement("span");d.style.width=h.config.characterWidth*2+"px",d.className=h.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",d.textContent=h.showSpaces?h.SPACE_CHAR:x,w.appendChild(d)}else if(E){o+=1;var d=this.dom.createElement("span");d.style.width=h.config.characterWidth*2+"px",d.className="ace_cjk",d.textContent=E,w.appendChild(d)}}}if(w.appendChild(this.dom.createTextNode(u?c.slice(u):c,this.element)),n(s.type))e.appendChild(w);else{var b="ace_"+s.type.replace(/\./g," ace_"),d=this.dom.createElement("span");s.type=="fold"&&(d.style.width=s.value.length*this.config.characterWidth+"px",d.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),d.className=b,d.appendChild(w),e.appendChild(d)}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 h=c/this.tabSize,y=0;y<h;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 h=this.session.$bracketHighlight;if(h){for(var y=this.session.$bracketHighlight.ranges,w=0;w<y.length;w++)if(o.row!==y[w].start.row){this.$highlightIndentGuideMarker.end=y[w].start.row+1,o.row>y[w].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 w=o.row+1;w<e.length;w++){var p=e[w],u=/^\s*/.exec(p)[0].length;if(p!==""&&(this.$highlightIndentGuideMarker.end=w,u<=s))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),o=0;o<e.length;o++)e[o].classList.remove("ace_indent-guide-active")},t.prototype.$setIndentGuideActive=function(e,o){var s=this.session.doc.getLine(e.row);if(s!==""){var c=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)c=e.element.childNodes[0];else return;var h=c.childNodes;if(h){var y=h[o-1];y&&y.classList&&y.classList.contains("ace_indent-guide")&&y.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,h=0,y=s[0],w=0,p=this.$createLineElement();e.appendChild(p);for(var u=0;u<o.length;u++){var C=o[u],_=C.value;if(u==0&&this.displayIndentGuides){if(c=_.length,_=this.renderIndentGuide(p,_,y),!_)continue;c-=_.length}if(c+_.length<y)w=this.$renderToken(p,w,C,_),c+=_.length;else{for(;c+_.length>=y;){w=this.$renderToken(p,w,C,_.substring(0,y-c)),_=_.substring(y-c),c=y,p=this.$createLineElement(),e.appendChild(p);var A=this.dom.createTextNode(g.stringRepeat(" ",s.indent),this.element);A.charCount=0,p.appendChild(A),h++,w=0,y=s[h]||Number.MAX_VALUE}_.length!=0&&(c+=_.length,w=this.$renderToken(p,w,C,_))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(p,w,null,"",!0)},t.prototype.$renderSimpleLine=function(e,o){for(var s=0,c=0;c<o.length;c++){var h=o[c],y=h.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,h,y);s=this.$renderToken(e,s,h,y)}}},t.prototype.$renderOverflowMessage=function(e,o,s,c,h){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=h?"<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 h=e;if(c.length){var y=this.session.getRowSplitData(o);if(y&&y.length){this.$renderWrappedLine(e,c,y);var h=e.lastChild}else{var h=e;this.$useLineGroups()&&(h=this.$createLineElement(),e.appendChild(h)),this.$renderSimpleLine(h,c)}}else this.$useLineGroups()&&(h=this.$createLineElement(),e.appendChild(h));if(this.showEOL&&h){s&&(o=s.end.row);var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_eol",w.textContent=o==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,h.appendChild(w)}},t.prototype.$getFoldLineTokens=function(e,o){var s=this.session,c=[];function h(w,p,u){for(var C=0,_=0;_+w[C].value.length<p;)if(_+=w[C].value.length,C++,C==w.length)return;if(_!=p){var A=w[C].value.substring(p-_);A.length>u-p&&(A=A.substring(0,u-p)),c.push({type:w[C].type,value:A}),_=p+A.length,C+=1}for(;_<u&&C<w.length;){var A=w[C].value;A.length+_>u?c.push({type:w[C].type,value:A.substring(0,u-_)}):c.push(w[C]),_+=A.length,C+=1}}var y=s.getTokens(e);return o.walk(function(w,p,u,C,_){w!=null?c.push({type:"fold",value:w}):(_&&(y=s.getTokens(p)),y.length&&h(y,C,u))},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,v.implement(i.prototype,l),M.Text=i}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(k,M,F){var v=k("../lib/dom"),f=function(){function g(a){this.element=v.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(),v.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return g.prototype.$updateOpacity=function(a){for(var l=this.cursors,r=l.length;r--;)v.setStyle(l[r].style,"opacity",a?"":"0")},g.prototype.$startCssAnimation=function(){for(var a=this.cursors,l=a.length;l--;)a[l].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&v.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},g.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,v.removeCssClass(this.element,"ace_animate-blinking")},g.prototype.setPadding=function(a){this.$padding=a},g.prototype.setSession=function(a){this.session=a},g.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},g.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},g.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,v.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},g.prototype.addCursor=function(){var a=v.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},g.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},g.prototype.hideCursor=function(){this.isVisible=!1,v.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},g.prototype.showCursor=function(){this.isVisible=!0,v.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},g.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,v.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&&v.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),v.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var l=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),l()},this.blinkInterval),l()}},g.prototype.getPixelPosition=function(a,l){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(a),n=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,a.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),i=(r.row-(l?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:n,top:i}},g.prototype.isCursorInView=function(a,l){return a.top>=0&&a.top<l.maxHeight},g.prototype.update=function(a){this.config=a;var l=this.session.$selectionMarkers,r=0,n=0;(l===void 0||l.length===0)&&(l=[{cursor:null}]);for(var r=0,i=l.length;r<i;r++){var t=this.getPixelPosition(l[r].cursor,!0);if(!((t.top>a.height+a.offset||t.top<0)&&r>1)){var e=this.cursors[n++]||this.addCursor(),o=e.style;this.drawCursor?this.drawCursor(e,t,a,l[r],this.session):this.isCursorInView(t,a)?(v.setStyle(o,"display","block"),v.translate(e,t.left,t.top),v.setStyle(o,"width",Math.round(a.characterWidth)+"px"),v.setStyle(o,"height",a.lineHeight+"px")):v.setStyle(o,"display","none")}}for(;this.cursors.length>n;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},g.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?v.addCssClass(this.element,"ace_overwrite-cursors"):v.removeCssClass(this.element,"ace_overwrite-cursors"))},g.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},g}();f.prototype.$padding=0,f.prototype.drawCursor=null,M.Cursor=f}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(k,M,F){var v=this&&this.__extends||function(){var e=function(o,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(c[y]=h[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)}}(),f=k("./lib/oop"),g=k("./lib/dom"),a=k("./lib/event"),l=k("./lib/event_emitter").EventEmitter,r=32768,n=function(){function e(o,s){this.element=g.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=g.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}();f.implement(n.prototype,l);var i=function(e){v(o,e);function o(s,c){var h=e.call(this,s,"-v")||this;return h.scrollTop=0,h.scrollHeight=0,c.$scrollbarWidth=h.width=g.scrollbarWidth(s.ownerDocument),h.inner.style.width=h.element.style.width=(h.width||15)+5+"px",h.$minWidth=0,h}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>r?(this.coeff=r/s,s=r):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}(n);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var t=function(e){v(o,e);function o(s,c){var h=e.call(this,s,"-h")||this;return h.scrollLeft=0,h.height=c.$scrollbarWidth,h.inner.style.height=h.element.style.height=(h.height||15)+5+"px",h}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}(n);M.ScrollBar=i,M.ScrollBarV=i,M.ScrollBarH=t,M.VScrollBar=i,M.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,M,F){var v=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 h in c)Object.prototype.hasOwnProperty.call(c,h)&&(s[h]=c[h])},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)}}(),f=k("./lib/oop"),g=k("./lib/dom"),a=k("./lib/event"),l=k("./lib/event_emitter").EventEmitter;g.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
227
+ position: absolute;
228
+ background: rgba(128, 128, 128, 0.6);
229
+ -moz-box-sizing: border-box;
230
+ box-sizing: border-box;
231
+ border: 1px solid #bbb;
232
+ border-radius: 2px;
233
+ z-index: 8;
234
+ }
235
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
236
+ position: absolute;
237
+ z-index: 6;
238
+ background: none;
239
+ overflow: hidden!important;
240
+ }
241
+ .ace_editor>.ace_sb-v {
242
+ z-index: 6;
243
+ right: 0;
244
+ top: 0;
245
+ width: 12px;
246
+ }
247
+ .ace_editor>.ace_sb-v div {
248
+ z-index: 8;
249
+ right: 0;
250
+ width: 100%;
251
+ }
252
+ .ace_editor>.ace_sb-h {
253
+ bottom: 0;
254
+ left: 0;
255
+ height: 12px;
256
+ }
257
+ .ace_editor>.ace_sb-h div {
258
+ bottom: 0;
259
+ height: 100%;
260
+ }
261
+ .ace_editor>.ace_sb_grabbed {
262
+ z-index: 8;
263
+ background: #000;
264
+ }`,"ace_scrollbar.css",!1);var r=function(){function t(e,o){this.element=g.createElement("div"),this.element.className="ace_sb"+o,this.inner=g.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}();f.implement(r.prototype,l);var n=function(t){v(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,h=s.clientY,y=function(x){h=x.clientY},w=function(){clearInterval(_)},p=s.clientY,u=this.thumbTop,C=function(){if(h!==void 0){var x=c.scrollTopFromThumbTop(u+h-p);x!==c.scrollTop&&c._emit("scroll",{data:x})}};a.capture(this.inner,y,w);var _=setInterval(C,20);return a.preventDefault(s)}var A=s.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(A)}),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}(r);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var i=function(t){v(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,h=s.clientX,y=function(x){h=x.clientX},w=function(){clearInterval(_)},p=s.clientX,u=this.thumbLeft,C=function(){if(h!==void 0){var x=c.scrollLeftFromThumbLeft(u+h-p);x!==c.scrollLeft&&c._emit("scroll",{data:x})}};a.capture(this.inner,y,w);var _=setInterval(C,20);return a.preventDefault(s)}var A=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(A)}),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}(r);i.prototype.setInnerWidth=i.prototype.setScrollWidth,M.ScrollBar=n,M.ScrollBarV=n,M.ScrollBarH=i,M.VScrollBar=n,M.HScrollBar=i}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(k,M,F){var v=k("./lib/event"),f=function(){function g(a,l){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=l||window;var r=this;this._flush=function(n){r.pending=!1;var i=r.changes;if(i&&(v.blockIdle(100),r.changes=0,r.onRender(i)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return g.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(v.nextFrame(this._flush),this.pending=!0)},g.prototype.clear=function(a){var l=this.changes;return this.changes=0,l},g}();M.RenderLoop=f}),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,M,F){var v=k("../lib/oop"),f=k("../lib/dom"),g=k("../lib/lang"),a=k("../lib/event"),l=k("../lib/useragent"),r=k("../lib/event_emitter").EventEmitter,n=512,i=typeof ResizeObserver=="function",t=200,e=function(){function o(s){this.el=f.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=f.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=f.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=g.stringRepeat("X",n),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",l.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/n};return c.width===0||c.height===0?null:c},o.prototype.$measureCharWidth=function(s){this.$main.textContent=g.stringRepeat(s,n);var c=this.$main.getBoundingClientRect();return c.width/n},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,h){return["div",{style:"position: absolute;top:"+c+"px;left:"+h+"px;"}]};this.els=f.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},o.prototype.transformCoordinates=function(s,c){if(s){var h=this.$getZoom(this.el);s=u(1/h,s)}function y(I,D,z){var N=I[1]*D[0]-I[0]*D[1];return[(-D[1]*z[0]+D[0]*z[1])/N,(+I[1]*z[0]-I[0]*z[1])/N]}function w(I,D){return[I[0]-D[0],I[1]-D[1]]}function p(I,D){return[I[0]+D[0],I[1]+D[1]]}function u(I,D){return[I*D[0],I*D[1]]}this.els||this.$initTransformMeasureNodes();function C(I){var D=I.getBoundingClientRect();return[D.left,D.top]}var _=C(this.els[0]),A=C(this.els[1]),x=C(this.els[2]),E=C(this.els[3]),S=y(w(E,A),w(E,x),w(p(A,x),p(E,_))),$=u(1+S[0],w(A,_)),m=u(1+S[1],w(x,_));if(c){var d=c,b=S[0]*d[0]/t+S[1]*d[1]/t+1,L=p(u(d[0],$),u(d[1],m));return p(u(1/b/t,L),_)}var T=w(s,_),R=y(w($,u(S[0],T)),w(m,u(S[1],T)),T);return u(t,R)},o}();e.prototype.$characterSize={width:0,height:0},v.implement(e.prototype,r),M.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(k,M,F){F.exports=`
265
+ .ace_br1 {border-top-left-radius : 3px;}
266
+ .ace_br2 {border-top-right-radius : 3px;}
267
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
268
+ .ace_br4 {border-bottom-right-radius: 3px;}
269
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
270
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
271
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
272
+ .ace_br8 {border-bottom-left-radius : 3px;}
273
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
274
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
275
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
276
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
277
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
278
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
279
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
280
+
281
+
282
+ .ace_editor {
283
+ position: relative;
284
+ overflow: hidden;
285
+ padding: 0;
286
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
287
+ direction: ltr;
288
+ text-align: left;
289
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
290
+ forced-color-adjust: none;
291
+ }
292
+
293
+ .ace_scroller {
294
+ position: absolute;
295
+ overflow: hidden;
296
+ top: 0;
297
+ bottom: 0;
298
+ background-color: inherit;
299
+ -ms-user-select: none;
300
+ -moz-user-select: none;
301
+ -webkit-user-select: none;
302
+ user-select: none;
303
+ cursor: text;
304
+ }
305
+
306
+ .ace_content {
307
+ position: absolute;
308
+ box-sizing: border-box;
309
+ min-width: 100%;
310
+ contain: style size layout;
311
+ font-variant-ligatures: no-common-ligatures;
312
+ }
313
+ .ace_invisible {
314
+ font-variant-ligatures: none;
315
+ }
316
+
317
+ .ace_keyboard-focus:focus {
318
+ box-shadow: inset 0 0 0 2px #5E9ED6;
319
+ outline: none;
320
+ }
321
+
322
+ .ace_dragging .ace_scroller:before{
323
+ position: absolute;
324
+ top: 0;
325
+ left: 0;
326
+ right: 0;
327
+ bottom: 0;
328
+ content: '';
329
+ background: rgba(250, 250, 250, 0.01);
330
+ z-index: 1000;
331
+ }
332
+ .ace_dragging.ace_dark .ace_scroller:before{
333
+ background: rgba(0, 0, 0, 0.01);
334
+ }
335
+
336
+ .ace_gutter {
337
+ position: absolute;
338
+ overflow : hidden;
339
+ width: auto;
340
+ top: 0;
341
+ bottom: 0;
342
+ left: 0;
343
+ cursor: default;
344
+ z-index: 4;
345
+ -ms-user-select: none;
346
+ -moz-user-select: none;
347
+ -webkit-user-select: none;
348
+ user-select: none;
349
+ contain: style size layout;
350
+ }
351
+
352
+ .ace_gutter-active-line {
353
+ position: absolute;
354
+ left: 0;
355
+ right: 0;
356
+ }
357
+
358
+ .ace_scroller.ace_scroll-left:after {
359
+ content: "";
360
+ position: absolute;
361
+ top: 0;
362
+ right: 0;
363
+ bottom: 0;
364
+ left: 0;
365
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
366
+ pointer-events: none;
367
+ }
368
+
369
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
370
+ position: absolute;
371
+ top: 0;
372
+ left: 0;
373
+ right: 0;
374
+ padding-left: 19px;
375
+ padding-right: 6px;
376
+ background-repeat: no-repeat;
377
+ }
378
+
379
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
380
+ margin-left: -14px;
381
+ float: left;
382
+ }
383
+
384
+ .ace_gutter-cell .ace_gutter_annotation {
385
+ margin-left: -19px;
386
+ float: left;
387
+ }
388
+
389
+ .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 {
390
+ 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==");
391
+ background-repeat: no-repeat;
392
+ background-position: 2px center;
393
+ }
394
+
395
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
396
+ 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==");
397
+ background-repeat: no-repeat;
398
+ background-position: 2px center;
399
+ }
400
+
401
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
402
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
403
+ background-repeat: no-repeat;
404
+ background-position: 2px center;
405
+ }
406
+
407
+ .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 {
408
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
409
+ }
410
+
411
+ .ace_icon_svg.ace_error {
412
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
413
+ background-color: crimson;
414
+ }
415
+ .ace_icon_svg.ace_security {
416
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
417
+ background-color: crimson;
418
+ }
419
+ .ace_icon_svg.ace_warning {
420
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
421
+ background-color: darkorange;
422
+ }
423
+ .ace_icon_svg.ace_info {
424
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
425
+ background-color: royalblue;
426
+ }
427
+ .ace_icon_svg.ace_hint {
428
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
429
+ background-color: silver;
430
+ }
431
+
432
+ .ace_icon_svg.ace_error_fold {
433
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
434
+ background-color: crimson;
435
+ }
436
+ .ace_icon_svg.ace_security_fold {
437
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
438
+ background-color: crimson;
439
+ }
440
+ .ace_icon_svg.ace_warning_fold {
441
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
442
+ background-color: darkorange;
443
+ }
444
+
445
+ .ace_scrollbar {
446
+ contain: strict;
447
+ position: absolute;
448
+ right: 0;
449
+ bottom: 0;
450
+ z-index: 6;
451
+ }
452
+
453
+ .ace_scrollbar-inner {
454
+ position: absolute;
455
+ cursor: text;
456
+ left: 0;
457
+ top: 0;
458
+ }
459
+
460
+ .ace_scrollbar-v{
461
+ overflow-x: hidden;
462
+ overflow-y: scroll;
463
+ top: 0;
464
+ }
465
+
466
+ .ace_scrollbar-h {
467
+ overflow-x: scroll;
468
+ overflow-y: hidden;
469
+ left: 0;
470
+ }
471
+
472
+ .ace_print-margin {
473
+ position: absolute;
474
+ height: 100%;
475
+ }
476
+
477
+ .ace_text-input {
478
+ position: absolute;
479
+ z-index: 0;
480
+ width: 0.5em;
481
+ height: 1em;
482
+ opacity: 0;
483
+ background: transparent;
484
+ -moz-appearance: none;
485
+ appearance: none;
486
+ border: none;
487
+ resize: none;
488
+ outline: none;
489
+ overflow: hidden;
490
+ font: inherit;
491
+ padding: 0 1px;
492
+ margin: 0 -1px;
493
+ contain: strict;
494
+ -ms-user-select: text;
495
+ -moz-user-select: text;
496
+ -webkit-user-select: text;
497
+ user-select: text;
498
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
499
+ white-space: pre!important;
500
+ }
501
+ .ace_text-input.ace_composition {
502
+ background: transparent;
503
+ color: inherit;
504
+ z-index: 1000;
505
+ opacity: 1;
506
+ }
507
+ .ace_composition_placeholder { color: transparent }
508
+ .ace_composition_marker {
509
+ border-bottom: 1px solid;
510
+ position: absolute;
511
+ border-radius: 0;
512
+ margin-top: 1px;
513
+ }
514
+
515
+ [ace_nocontext=true] {
516
+ transform: none!important;
517
+ filter: none!important;
518
+ clip-path: none!important;
519
+ mask : none!important;
520
+ contain: none!important;
521
+ perspective: none!important;
522
+ mix-blend-mode: initial!important;
523
+ z-index: auto;
524
+ }
525
+
526
+ .ace_layer {
527
+ z-index: 1;
528
+ position: absolute;
529
+ overflow: hidden;
530
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
531
+ word-wrap: normal;
532
+ white-space: pre;
533
+ height: 100%;
534
+ width: 100%;
535
+ box-sizing: border-box;
536
+ /* setting pointer-events: auto; on node under the mouse, which changes
537
+ during scroll, will break mouse wheel scrolling in Safari */
538
+ pointer-events: none;
539
+ }
540
+
541
+ .ace_gutter-layer {
542
+ position: relative;
543
+ width: auto;
544
+ text-align: right;
545
+ pointer-events: auto;
546
+ height: 1000000px;
547
+ contain: style size layout;
548
+ }
549
+
550
+ .ace_text-layer {
551
+ font: inherit !important;
552
+ position: absolute;
553
+ height: 1000000px;
554
+ width: 1000000px;
555
+ contain: style size layout;
556
+ }
557
+
558
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
559
+ contain: style size layout;
560
+ position: absolute;
561
+ top: 0;
562
+ left: 0;
563
+ right: 0;
564
+ }
565
+
566
+ .ace_hidpi .ace_text-layer,
567
+ .ace_hidpi .ace_gutter-layer,
568
+ .ace_hidpi .ace_content,
569
+ .ace_hidpi .ace_gutter {
570
+ contain: strict;
571
+ }
572
+ .ace_hidpi .ace_text-layer > .ace_line,
573
+ .ace_hidpi .ace_text-layer > .ace_line_group {
574
+ contain: strict;
575
+ }
576
+
577
+ .ace_cjk {
578
+ display: inline-block;
579
+ text-align: center;
580
+ }
581
+
582
+ .ace_cursor-layer {
583
+ z-index: 4;
584
+ }
585
+
586
+ .ace_cursor {
587
+ z-index: 4;
588
+ position: absolute;
589
+ box-sizing: border-box;
590
+ border-left: 2px solid;
591
+ /* workaround for smooth cursor repaintng whole screen in chrome */
592
+ transform: translatez(0);
593
+ }
594
+
595
+ .ace_multiselect .ace_cursor {
596
+ border-left-width: 1px;
597
+ }
598
+
599
+ .ace_slim-cursors .ace_cursor {
600
+ border-left-width: 1px;
601
+ }
602
+
603
+ .ace_overwrite-cursors .ace_cursor {
604
+ border-left-width: 0;
605
+ border-bottom: 1px solid;
606
+ }
607
+
608
+ .ace_hidden-cursors .ace_cursor {
609
+ opacity: 0.2;
610
+ }
611
+
612
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
613
+ opacity: 0;
614
+ }
615
+
616
+ .ace_smooth-blinking .ace_cursor {
617
+ transition: opacity 0.18s;
618
+ }
619
+
620
+ .ace_animate-blinking .ace_cursor {
621
+ animation-duration: 1000ms;
622
+ animation-timing-function: step-end;
623
+ animation-name: blink-ace-animate;
624
+ animation-iteration-count: infinite;
625
+ }
626
+
627
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
628
+ animation-duration: 1000ms;
629
+ animation-timing-function: ease-in-out;
630
+ animation-name: blink-ace-animate-smooth;
631
+ }
632
+
633
+ @keyframes blink-ace-animate {
634
+ from, to { opacity: 1; }
635
+ 60% { opacity: 0; }
636
+ }
637
+
638
+ @keyframes blink-ace-animate-smooth {
639
+ from, to { opacity: 1; }
640
+ 45% { opacity: 1; }
641
+ 60% { opacity: 0; }
642
+ 85% { opacity: 0; }
643
+ }
644
+
645
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
646
+ position: absolute;
647
+ z-index: 3;
648
+ }
649
+
650
+ .ace_marker-layer .ace_selection {
651
+ position: absolute;
652
+ z-index: 5;
653
+ }
654
+
655
+ .ace_marker-layer .ace_bracket {
656
+ position: absolute;
657
+ z-index: 6;
658
+ }
659
+
660
+ .ace_marker-layer .ace_error_bracket {
661
+ position: absolute;
662
+ border-bottom: 1px solid #DE5555;
663
+ border-radius: 0;
664
+ }
665
+
666
+ .ace_marker-layer .ace_active-line {
667
+ position: absolute;
668
+ z-index: 2;
669
+ }
670
+
671
+ .ace_marker-layer .ace_selected-word {
672
+ position: absolute;
673
+ z-index: 4;
674
+ box-sizing: border-box;
675
+ }
676
+
677
+ .ace_line .ace_fold {
678
+ box-sizing: border-box;
679
+
680
+ display: inline-block;
681
+ height: 11px;
682
+ margin-top: -2px;
683
+ vertical-align: middle;
684
+
685
+ background-image:
686
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
687
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
688
+ background-repeat: no-repeat, repeat-x;
689
+ background-position: center center, top left;
690
+ color: transparent;
691
+
692
+ border: 1px solid black;
693
+ border-radius: 2px;
694
+
695
+ cursor: pointer;
696
+ pointer-events: auto;
697
+ }
698
+
699
+ .ace_dark .ace_fold {
700
+ }
701
+
702
+ .ace_fold:hover{
703
+ background-image:
704
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
705
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
706
+ }
707
+
708
+ .ace_tooltip {
709
+ background-color: #f5f5f5;
710
+ border: 1px solid gray;
711
+ border-radius: 1px;
712
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
713
+ color: black;
714
+ padding: 3px 4px;
715
+ position: absolute;
716
+ z-index: 999999;
717
+ box-sizing: border-box;
718
+ cursor: default;
719
+ white-space: pre-wrap;
720
+ word-wrap: break-word;
721
+ line-height: normal;
722
+ font-style: normal;
723
+ font-weight: normal;
724
+ letter-spacing: normal;
725
+ pointer-events: none;
726
+ overflow: auto;
727
+ max-width: min(33em, 66vw);
728
+ overscroll-behavior: contain;
729
+ }
730
+ .ace_tooltip pre {
731
+ white-space: pre-wrap;
732
+ }
733
+
734
+ .ace_tooltip.ace_dark {
735
+ background-color: #636363;
736
+ color: #fff;
737
+ }
738
+
739
+ .ace_tooltip:focus {
740
+ outline: 1px solid #5E9ED6;
741
+ }
742
+
743
+ .ace_icon {
744
+ display: inline-block;
745
+ width: 18px;
746
+ vertical-align: top;
747
+ }
748
+
749
+ .ace_icon_svg {
750
+ display: inline-block;
751
+ width: 12px;
752
+ vertical-align: top;
753
+ -webkit-mask-repeat: no-repeat;
754
+ -webkit-mask-size: 12px;
755
+ -webkit-mask-position: center;
756
+ }
757
+
758
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
759
+ padding-right: 13px;
760
+ }
761
+
762
+ .ace_fold-widget, .ace_custom-widget {
763
+ box-sizing: border-box;
764
+
765
+ margin: 0 -12px 0 1px;
766
+ display: none;
767
+ width: 11px;
768
+ vertical-align: top;
769
+
770
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
771
+ background-repeat: no-repeat;
772
+ background-position: center;
773
+
774
+ border-radius: 3px;
775
+
776
+ border: 1px solid transparent;
777
+ cursor: pointer;
778
+ pointer-events: auto;
779
+ }
780
+
781
+ .ace_custom-widget {
782
+ background: none;
783
+ }
784
+
785
+ .ace_folding-enabled .ace_fold-widget {
786
+ display: inline-block;
787
+ }
788
+
789
+ .ace_fold-widget.ace_end {
790
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
791
+ }
792
+
793
+ .ace_fold-widget.ace_closed {
794
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
795
+ }
796
+
797
+ .ace_fold-widget:hover {
798
+ border: 1px solid rgba(0, 0, 0, 0.3);
799
+ background-color: rgba(255, 255, 255, 0.2);
800
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
801
+ }
802
+
803
+ .ace_fold-widget:active {
804
+ border: 1px solid rgba(0, 0, 0, 0.4);
805
+ background-color: rgba(0, 0, 0, 0.05);
806
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
807
+ }
808
+ /**
809
+ * Dark version for fold widgets
810
+ */
811
+ .ace_dark .ace_fold-widget {
812
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
813
+ }
814
+ .ace_dark .ace_fold-widget.ace_end {
815
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
816
+ }
817
+ .ace_dark .ace_fold-widget.ace_closed {
818
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
819
+ }
820
+ .ace_dark .ace_fold-widget:hover {
821
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
822
+ background-color: rgba(255, 255, 255, 0.1);
823
+ }
824
+ .ace_dark .ace_fold-widget:active {
825
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
826
+ }
827
+
828
+ .ace_inline_button {
829
+ border: 1px solid lightgray;
830
+ display: inline-block;
831
+ margin: -1px 8px;
832
+ padding: 0 5px;
833
+ pointer-events: auto;
834
+ cursor: pointer;
835
+ }
836
+ .ace_inline_button:hover {
837
+ border-color: gray;
838
+ background: rgba(200,200,200,0.2);
839
+ display: inline-block;
840
+ pointer-events: auto;
841
+ }
842
+
843
+ .ace_fold-widget.ace_invalid {
844
+ background-color: #FFB4B4;
845
+ border-color: #DE5555;
846
+ }
847
+
848
+ .ace_fade-fold-widgets .ace_fold-widget {
849
+ transition: opacity 0.4s ease 0.05s;
850
+ opacity: 0;
851
+ }
852
+
853
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
854
+ transition: opacity 0.05s ease 0.05s;
855
+ opacity:1;
856
+ }
857
+
858
+ .ace_underline {
859
+ text-decoration: underline;
860
+ }
861
+
862
+ .ace_bold {
863
+ font-weight: bold;
864
+ }
865
+
866
+ .ace_nobold .ace_bold {
867
+ font-weight: normal;
868
+ }
869
+
870
+ .ace_italic {
871
+ font-style: italic;
872
+ }
873
+
874
+
875
+ .ace_error-marker {
876
+ background-color: rgba(255, 0, 0,0.2);
877
+ position: absolute;
878
+ z-index: 9;
879
+ }
880
+
881
+ .ace_highlight-marker {
882
+ background-color: rgba(255, 255, 0,0.2);
883
+ position: absolute;
884
+ z-index: 8;
885
+ }
886
+
887
+ .ace_mobile-menu {
888
+ position: absolute;
889
+ line-height: 1.5;
890
+ border-radius: 4px;
891
+ -ms-user-select: none;
892
+ -moz-user-select: none;
893
+ -webkit-user-select: none;
894
+ user-select: none;
895
+ background: white;
896
+ box-shadow: 1px 3px 2px grey;
897
+ border: 1px solid #dcdcdc;
898
+ color: black;
899
+ }
900
+ .ace_dark > .ace_mobile-menu {
901
+ background: #333;
902
+ color: #ccc;
903
+ box-shadow: 1px 3px 2px grey;
904
+ border: 1px solid #444;
905
+
906
+ }
907
+ .ace_mobile-button {
908
+ padding: 2px;
909
+ cursor: pointer;
910
+ overflow: hidden;
911
+ }
912
+ .ace_mobile-button:hover {
913
+ background-color: #eee;
914
+ opacity:1;
915
+ }
916
+ .ace_mobile-button:active {
917
+ background-color: #ddd;
918
+ }
919
+
920
+ .ace_placeholder {
921
+ position: relative;
922
+ font-family: arial;
923
+ transform: scale(0.9);
924
+ transform-origin: left;
925
+ white-space: pre;
926
+ opacity: 0.7;
927
+ margin: 0 10px;
928
+ z-index: 1;
929
+ }
930
+
931
+ .ace_ghost_text {
932
+ opacity: 0.5;
933
+ font-style: italic;
934
+ }
935
+
936
+ .ace_ghost_text_container > div {
937
+ white-space: pre;
938
+ }
939
+
940
+ .ghost_text_line_wrapped::after {
941
+ content: "↩";
942
+ position: absolute;
943
+ }
944
+
945
+ .ace_lineWidgetContainer.ace_ghost_text {
946
+ margin: 0px 4px
947
+ }
948
+
949
+ .ace_screenreader-only {
950
+ position:absolute;
951
+ left:-10000px;
952
+ top:auto;
953
+ width:1px;
954
+ height:1px;
955
+ overflow:hidden;
956
+ }
957
+
958
+ .ace_hidden_token {
959
+ display: none;
960
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(k,M,F){var v=k("../lib/dom"),f=k("../lib/oop"),g=k("../lib/event_emitter").EventEmitter,a=function(){function l(r,n){this.renderer=n,this.pixelRatio=1,this.maxHeight=n.layerConfig.maxHeight,this.lineHeight=n.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,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)"},this.setScrollBarV(r)}return l.prototype.$createCanvas=function(){this.canvas=v.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},l.prototype.setScrollBarV=function(r){this.$createCanvas(),this.scrollbarV=r,r.element.appendChild(this.canvas),this.setDimensions()},l.prototype.$updateDecorators=function(r){if(typeof this.canvas.getContext!="function")return;var n=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(r);var i=this.canvas.getContext("2d");function t($,m){return $.priority<m.priority?-1:$.priority>m.priority?1:0}var e=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),e){var o={info:1,warning:2,error:3};e.forEach(function($){$.priority=o[$.type]||null}),e=e.sort(t);for(var s=0;s<e.length;s++){var c=e[s].row,h=this.getVerticalOffsetForRow(c),y=h+this.lineHeight,w=Math.round(this.heightRatio*h),p=Math.round(this.heightRatio*y),u=Math.round((w+p)/2),C=p-u;C<this.halfMinDecorationHeight&&(C=this.halfMinDecorationHeight),u-C<0&&(u=C),u+C>this.canvasHeight&&(u=this.canvasHeight-C);var _=u-C,A=u+C,x=A-_;i.fillStyle=n[e[s].type]||null,i.fillRect(0,_,Math.round(this.oneZoneWidth-1),x)}}var E=this.renderer.session.selection.getCursor();if(E){var S=Math.round(this.getVerticalOffsetForRow(E.row)*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,S,this.canvasWidth,2)}},l.prototype.getVerticalOffsetForRow=function(r){r=r|0;var n=this.renderer.session.documentToScreenRow(r,0)*this.lineHeight;return n},l.prototype.setDimensions=function(r){r=r||this.renderer.layerConfig,this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},l.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},l.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},l}();f.implement(a.prototype,g),M.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,M,F){var v=k("./lib/oop"),f=k("./lib/dom"),g=k("./lib/lang"),a=k("./config"),l=k("./layer/gutter").Gutter,r=k("./layer/marker").Marker,n=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,h=k("./layer/font_metrics").FontMetrics,y=k("./lib/event_emitter").EventEmitter,w=k("./css/editor-css"),p=k("./layer/decorators").Decorator,u=k("./lib/useragent"),C=k("./layer/text_util").isTextToken;f.importCssString(w,"ace_editor.css",!1);var _=function(){function A(x,E){var S=this;this.container=x||f.createElement("div"),f.addCssClass(this.container,"ace_editor"),f.HI_DPI&&f.addCssClass(this.container,"ace_hidpi"),this.setTheme(E),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=f.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=f.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=f.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new l(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var $=this.$textLayer=new n(this.content);this.canvas=$.element,this.$markerFront=new r(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(m){S.$scrollAnimation||S.session.setScrollTop(m.data-S.scrollMargin.top)}),this.scrollBarH.on("scroll",function(m){S.$scrollAnimation||S.session.setScrollLeft(m.data-S.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new h(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(m){S.updateCharacterSize(),S.onResize(!0,S.gutterWidth,S.$size.width,S.$size.height),S._signal("changeCharacterSize",m)}),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=!u.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 A.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(),f.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},A.prototype.setSession=function(x){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=x,x&&this.scrollMargin.top&&x.getScrollTop()<=0&&x.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(x),this.$markerBack.setSession(x),this.$markerFront.setSession(x),this.$gutterLayer.setSession(x),this.$textLayer.setSession(x),x&&(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))},A.prototype.updateLines=function(x,E,S){if(E===void 0&&(E=1/0),this.$changedLines?(this.$changedLines.firstRow>x&&(this.$changedLines.firstRow=x),this.$changedLines.lastRow<E&&(this.$changedLines.lastRow=E)):this.$changedLines={firstRow:x,lastRow:E},this.$changedLines.lastRow<this.layerConfig.firstRow)if(S)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},A.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},A.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},A.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},A.prototype.updateFull=function(x){x?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},A.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},A.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},A.prototype.onResize=function(x,E,S,$){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=x?1:0;var m=this.container;$||($=m.clientHeight||m.scrollHeight),!$&&this.$maxLines&&this.lineHeight>1&&(!m.style.height||m.style.height=="0px")&&(m.style.height="1px",$=m.clientHeight||m.scrollHeight),S||(S=m.clientWidth||m.scrollWidth);var d=this.$updateCachedSize(x,E,S,$);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!S&&!$)return this.resizing=0;x&&(this.$gutterLayer.$padding=null),x?this.$renderChanges(d|this.$changes,!0):this.$loop.schedule(d|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},A.prototype.$updateCachedSize=function(x,E,S,$){$-=this.$extraHeight||0;var m=0,d=this.$size,b={width:d.width,height:d.height,scrollerHeight:d.scrollerHeight,scrollerWidth:d.scrollerWidth};if($&&(x||d.height!=$)&&(d.height=$,m|=this.CHANGE_SIZE,d.scrollerHeight=d.height,this.$horizScroll&&(d.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(d.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",m=m|this.CHANGE_SCROLL),S&&(x||d.width!=S)){m|=this.CHANGE_SIZE,d.width=S,E==null&&(E=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=E,f.setStyle(this.scrollBarH.element.style,"left",E+"px"),f.setStyle(this.scroller.style,"left",E+this.margin.left+"px"),d.scrollerWidth=Math.max(0,S-E-this.scrollBarV.getWidth()-this.margin.h),f.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";f.setStyle(this.scrollBarH.element.style,"right",L),f.setStyle(this.scroller.style,"right",L),f.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(d.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||x)&&(m|=this.CHANGE_FULL)}return d.$dirty=!S||!$,m&&this._signal("resize",b),m},A.prototype.onGutterResize=function(x){var E=this.$showGutter?x:0;E!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,E,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()},A.prototype.adjustWrapLimit=function(){var x=this.$size.scrollerWidth-this.$padding*2,E=Math.floor(x/this.characterWidth);return this.session.adjustWrapLimit(E,this.$showPrintMargin&&this.$printMarginColumn)},A.prototype.setAnimatedScroll=function(x){this.setOption("animatedScroll",x)},A.prototype.getAnimatedScroll=function(){return this.$animatedScroll},A.prototype.setShowInvisibles=function(x){this.setOption("showInvisibles",x),this.session.$bidiHandler.setShowInvisibles(x)},A.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},A.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},A.prototype.setDisplayIndentGuides=function(x){this.setOption("displayIndentGuides",x)},A.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},A.prototype.setHighlightIndentGuides=function(x){this.setOption("highlightIndentGuides",x)},A.prototype.setShowPrintMargin=function(x){this.setOption("showPrintMargin",x)},A.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},A.prototype.setPrintMarginColumn=function(x){this.setOption("printMarginColumn",x)},A.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},A.prototype.getShowGutter=function(){return this.getOption("showGutter")},A.prototype.setShowGutter=function(x){return this.setOption("showGutter",x)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.setFadeFoldWidgets=function(x){this.setOption("fadeFoldWidgets",x)},A.prototype.setHighlightGutterLine=function(x){this.setOption("highlightGutterLine",x)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var x=f.createElement("div");x.className="ace_layer ace_print-margin-layer",this.$printMarginEl=f.createElement("div"),this.$printMarginEl.className="ace_print-margin",x.appendChild(this.$printMarginEl),this.content.insertBefore(x,this.content.firstChild)}var E=this.$printMarginEl.style;E.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",E.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},A.prototype.getContainerElement=function(){return this.container},A.prototype.getMouseEventTarget=function(){return this.scroller},A.prototype.getTextAreaContainer=function(){return this.container},A.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var x=this.textarea.style,E=this.$composition;if(!this.$keepTextAreaAtCursor&&!E){f.translate(this.textarea,-100,0);return}var S=this.$cursorLayer.$pixelPos;if(S){E&&E.markerRange&&(S=this.$cursorLayer.getPixelPosition(E.markerRange.start,!0));var $=this.layerConfig,m=S.top,d=S.left;m-=$.offset;var b=E&&E.useTextareaForIME||u.isMobile?this.lineHeight:1;if(m<0||m>$.height-b){f.translate(this.textarea,0,0);return}var L=1,T=this.$size.height-b;if(!E)m+=this.lineHeight;else if(E.useTextareaForIME){var R=this.textarea.value;L=this.characterWidth*this.session.$getStringScreenWidth(R)[0]}else m+=this.lineHeight+2;d-=this.scrollLeft,d>this.$size.scrollerWidth-L&&(d=this.$size.scrollerWidth-L),d+=this.gutterWidth+this.margin.left,f.setStyle(x,"height",b+"px"),f.setStyle(x,"width",L+"px"),f.translate(this.textarea,Math.min(d,this.$size.scrollerWidth-L),Math.min(m,T))}}},A.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},A.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},A.prototype.getLastFullyVisibleRow=function(){var x=this.layerConfig,E=x.lastRow,S=this.session.documentToScreenRow(E,0)*x.lineHeight;return S-this.session.getScrollTop()>x.height-x.lineHeight?E-1:E},A.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},A.prototype.setPadding=function(x){this.$padding=x,this.$textLayer.setPadding(x),this.$cursorLayer.setPadding(x),this.$markerFront.setPadding(x),this.$markerBack.setPadding(x),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},A.prototype.setScrollMargin=function(x,E,S,$){var m=this.scrollMargin;m.top=x|0,m.bottom=E|0,m.right=$|0,m.left=S|0,m.v=m.top+m.bottom,m.h=m.left+m.right,m.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-m.top),this.updateFull()},A.prototype.setMargin=function(x,E,S,$){var m=this.margin;m.top=x|0,m.bottom=E|0,m.right=$|0,m.left=S|0,m.v=m.top+m.bottom,m.h=m.left+m.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},A.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},A.prototype.setHScrollBarAlwaysVisible=function(x){this.setOption("hScrollBarAlwaysVisible",x)},A.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},A.prototype.setVScrollBarAlwaysVisible=function(x){this.setOption("vScrollBarAlwaysVisible",x)},A.prototype.$updateScrollBarV=function(){var x=this.layerConfig.maxHeight,E=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(x-=(E-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>x-E&&(x=this.scrollTop+E,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(x+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},A.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},A.prototype.freeze=function(){this.$frozen=!0},A.prototype.unfreeze=function(){this.$frozen=!1},A.prototype.$renderChanges=function(x,E){if(this.$changes&&(x|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!x&&!E){this.$changes|=x;return}if(this.$size.$dirty)return this.$changes|=x,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",x),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var S=this.layerConfig;if(x&this.CHANGE_FULL||x&this.CHANGE_SIZE||x&this.CHANGE_TEXT||x&this.CHANGE_LINES||x&this.CHANGE_SCROLL||x&this.CHANGE_H_SCROLL){if(x|=this.$computeLayerConfig()|this.$loop.clear(),S.firstRow!=this.layerConfig.firstRow&&S.firstRowScreen==this.layerConfig.firstRowScreen){var $=this.scrollTop+(S.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;$>0&&(this.scrollTop=$,x=x|this.CHANGE_SCROLL,x|=this.$computeLayerConfig()|this.$loop.clear())}S=this.layerConfig,this.$updateScrollBarV(),x&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),f.translate(this.content,-this.scrollLeft,-S.offset);var m=S.width+2*this.$padding+"px",d=S.minHeight+"px";f.setStyle(this.content.style,"width",m),f.setStyle(this.content.style,"height",d)}if(x&this.CHANGE_H_SCROLL&&(f.translate(this.content,-this.scrollLeft,-S.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),x&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",x);return}if(x&this.CHANGE_SCROLL){this.$changedLines=null,x&this.CHANGE_TEXT||x&this.CHANGE_LINES?this.$textLayer.update(S):this.$textLayer.scrollLines(S),this.$showGutter&&(x&this.CHANGE_GUTTER||x&this.CHANGE_LINES?this.$gutterLayer.update(S):this.$gutterLayer.scrollLines(S)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",x);return}x&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):x&this.CHANGE_LINES?((this.$updateLines()||x&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):x&this.CHANGE_TEXT||x&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):x&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)),x&this.CHANGE_CURSOR&&(this.$cursorLayer.update(S),this.$moveTextAreaToCursor()),x&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(S),x&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(S),this._signal("afterRender",x)},A.prototype.$autosize=function(){var x=this.session.getScreenLength()*this.lineHeight,E=this.$maxLines*this.lineHeight,S=Math.min(E,Math.max((this.$minLines||1)*this.lineHeight,x))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(S+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&S>this.$maxPixelHeight&&(S=this.$maxPixelHeight);var $=S<=2*this.lineHeight,m=!$&&x>E;if(S!=this.desiredHeight||this.$size.height!=this.desiredHeight||m!=this.$vScroll){m!=this.$vScroll&&(this.$vScroll=m,this.scrollBarV.setVisible(m));var d=this.container.clientWidth;this.container.style.height=S+"px",this.$updateCachedSize(!0,this.$gutterWidth,d,S),this.desiredHeight=S,this._signal("autosize")}},A.prototype.$computeLayerConfig=function(){var x=this.session,E=this.$size,S=E.height<=2*this.lineHeight,$=this.session.getScreenLength(),m=$*this.lineHeight,d=this.$getLongestLine(),b=!S&&(this.$hScrollBarAlwaysVisible||E.scrollerWidth-d-2*this.$padding<0),L=this.$horizScroll!==b;L&&(this.$horizScroll=b,this.scrollBarH.setVisible(b));var T=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),S=E.height<=2*this.lineHeight);var R=E.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(E.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;m+=I;var D=this.scrollMargin;this.session.setScrollTop(Math.max(-D.top,Math.min(this.scrollTop,m-E.scrollerHeight+D.bottom))),this.session.setScrollLeft(Math.max(-D.left,Math.min(this.scrollLeft,d+2*this.$padding-E.scrollerWidth+D.right)));var z=!S&&(this.$vScrollBarAlwaysVisible||E.scrollerHeight-m+I<0||this.scrollTop>D.top),N=T!==z;N&&(this.$vScroll=z,this.scrollBarV.setVisible(z));var B=this.scrollTop%this.lineHeight,W=Math.ceil(R/this.lineHeight)-1,j=Math.max(0,Math.round((this.scrollTop-B)/this.lineHeight)),G=j+W,V,X,Y=this.lineHeight;j=x.screenToDocumentRow(j,0);var J=x.getFoldLine(j);J&&(j=J.start.row),V=x.documentToScreenRow(j,0),X=x.getRowLength(j)*Y,G=Math.min(x.screenToDocumentRow(G,0),x.getLength()-1),R=E.scrollerHeight+x.getRowLength(G)*Y+X,B=this.scrollTop-V*Y,B<0&&V>0&&(V=Math.max(0,V+Math.floor(B/Y)),B=this.scrollTop-V*Y);var ne=0;return(this.layerConfig.width!=d||L)&&(ne=this.CHANGE_H_SCROLL),(L||N)&&(ne|=this.$updateCachedSize(!0,this.gutterWidth,E.width,E.height),this._signal("scrollbarVisibilityChanged"),N&&(d=this.$getLongestLine())),this.layerConfig={width:d,padding:this.$padding,firstRow:j,firstRowScreen:V,lastRow:G,lineHeight:Y,characterWidth:this.characterWidth,minHeight:R,maxHeight:m,offset:B,gutterOffset:Y?Math.max(0,Math.ceil((B+E.height-E.scrollerHeight)/Y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(d-this.$padding),ne},A.prototype.$updateLines=function(){if(this.$changedLines){var x=this.$changedLines.firstRow,E=this.$changedLines.lastRow;this.$changedLines=null;var S=this.layerConfig;if(!(x>S.lastRow+1)&&!(E<S.firstRow)){if(E===1/0){this.$showGutter&&this.$gutterLayer.update(S),this.$textLayer.update(S);return}return this.$textLayer.updateLines(S,x,E),!0}}},A.prototype.$getLongestLine=function(){var x=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(x+=1),this.$textLayer&&x>this.$textLayer.MAX_LINE_LENGTH&&(x=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(x*this.characterWidth))},A.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},A.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},A.prototype.addGutterDecoration=function(x,E){this.$gutterLayer.addGutterDecoration(x,E)},A.prototype.removeGutterDecoration=function(x,E){this.$gutterLayer.removeGutterDecoration(x,E)},A.prototype.updateBreakpoints=function(x){this._rows=x,this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.setAnnotations=function(x){this.$gutterLayer.setAnnotations(x),this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},A.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},A.prototype.showCursor=function(){this.$cursorLayer.showCursor()},A.prototype.scrollSelectionIntoView=function(x,E,S){this.scrollCursorIntoView(x,S),this.scrollCursorIntoView(E,S)},A.prototype.scrollCursorIntoView=function(x,E,S){if(this.$size.scrollerHeight!==0){var $=this.$cursorLayer.getPixelPosition(x),m=$.left,d=$.top,b=S&&S.top||0,L=S&&S.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var T=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;T+b>d?(E&&T+b>d+this.lineHeight&&(d-=E*this.$size.scrollerHeight),d===0&&(d=-this.scrollMargin.top),this.session.setScrollTop(d)):T+this.$size.scrollerHeight-L<d+this.lineHeight&&(E&&T+this.$size.scrollerHeight-L<d-this.lineHeight&&(d+=E*this.$size.scrollerHeight),this.session.setScrollTop(d+this.lineHeight+L-this.$size.scrollerHeight));var R=this.scrollLeft,I=2*this.layerConfig.characterWidth;m-I<R?(m-=I,m<this.$padding+I&&(m=-this.scrollMargin.left),this.session.setScrollLeft(m)):(m+=I,R+this.$size.scrollerWidth<m+this.characterWidth?this.session.setScrollLeft(Math.round(m+this.characterWidth-this.$size.scrollerWidth)):R<=this.$padding&&m-R<this.characterWidth&&this.session.setScrollLeft(0))}},A.prototype.getScrollTop=function(){return this.session.getScrollTop()},A.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},A.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},A.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},A.prototype.scrollToRow=function(x){this.session.setScrollTop(x*this.lineHeight)},A.prototype.alignCursor=function(x,E){typeof x=="number"&&(x={row:x,column:0});var S=this.$cursorLayer.getPixelPosition(x),$=this.$size.scrollerHeight-this.lineHeight,m=S.top-$*(E||0);return this.session.setScrollTop(m),m},A.prototype.$calcSteps=function(x,E){var S=0,$=this.STEPS,m=[],d=function(b,L,T){return T*(Math.pow(b-1,3)+1)+L};for(S=0;S<$;++S)m.push(d(S/this.STEPS,x,E-x));return m},A.prototype.scrollToLine=function(x,E,S,$){var m=this.$cursorLayer.getPixelPosition({row:x,column:0}),d=m.top;E&&(d-=this.$size.scrollerHeight/2);var b=this.scrollTop;this.session.setScrollTop(d),S!==!1&&this.animateScrolling(b,$)},A.prototype.animateScrolling=function(x,E){var S=this.scrollTop;if(!this.$animatedScroll)return;var $=this;if(x==S)return;if(this.$scrollAnimation){var m=this.$scrollAnimation.steps;if(m.length&&(x=m[0],x==S))return}var d=$.$calcSteps(x,S);this.$scrollAnimation={from:x,to:S,steps:d},clearInterval(this.$timer),$.session.setScrollTop(d.shift()),$.session.$scrollTop=S;function b(){$.$timer=clearInterval($.$timer),$.$scrollAnimation=null,$.$stopAnimation=!1,E&&E()}this.$timer=setInterval(function(){if($.$stopAnimation){b();return}if(!$.session)return clearInterval($.$timer);d.length?($.session.setScrollTop(d.shift()),$.session.$scrollTop=S):S!=null?($.session.$scrollTop=-1,$.session.setScrollTop(S),S=null):b()},10)},A.prototype.scrollToY=function(x){this.scrollTop!==x&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=x)},A.prototype.scrollToX=function(x){this.scrollLeft!==x&&(this.scrollLeft=x),this.$loop.schedule(this.CHANGE_H_SCROLL)},A.prototype.scrollTo=function(x,E){this.session.setScrollTop(E),this.session.setScrollLeft(x)},A.prototype.scrollBy=function(x,E){E&&this.session.setScrollTop(this.session.getScrollTop()+E),x&&this.session.setScrollLeft(this.session.getScrollLeft()+x)},A.prototype.isScrollableBy=function(x,E){if(E<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||E>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||x<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||x>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},A.prototype.pixelToScreenCoordinates=function(x,E){var S;if(this.$hasCssTransforms){S={top:0,left:0};var $=this.$fontMetrics.transformCoordinates([x,E]);x=$[1]-this.gutterWidth-this.margin.left,E=$[0]}else S=this.scroller.getBoundingClientRect();var m=x+this.scrollLeft-S.left-this.$padding,d=m/this.characterWidth,b=Math.floor((E+this.scrollTop-S.top)/this.lineHeight),L=this.$blockCursor?Math.floor(d):Math.round(d);return{row:b,column:L,side:d-L>0?1:-1,offsetX:m}},A.prototype.screenToTextCoordinates=function(x,E){var S;if(this.$hasCssTransforms){S={top:0,left:0};var $=this.$fontMetrics.transformCoordinates([x,E]);x=$[1]-this.gutterWidth-this.margin.left,E=$[0]}else S=this.scroller.getBoundingClientRect();var m=x+this.scrollLeft-S.left-this.$padding,d=m/this.characterWidth,b=this.$blockCursor?Math.floor(d):Math.round(d),L=Math.floor((E+this.scrollTop-S.top)/this.lineHeight);return this.session.screenToDocumentPosition(L,Math.max(b,0),m)},A.prototype.textToScreenCoordinates=function(x,E){var S=this.scroller.getBoundingClientRect(),$=this.session.documentToScreenPosition(x,E),m=this.$padding+(this.session.$bidiHandler.isBidiRow($.row,x)?this.session.$bidiHandler.getPosLeft($.column):Math.round($.column*this.characterWidth)),d=$.row*this.lineHeight;return{pageX:S.left+m-this.scrollLeft,pageY:S.top+d-this.scrollTop}},A.prototype.visualizeFocus=function(){f.addCssClass(this.container,"ace_focus")},A.prototype.visualizeBlur=function(){f.removeCssClass(this.container,"ace_focus")},A.prototype.showComposition=function(x){this.$composition=x,x.cssText||(x.cssText=this.textarea.style.cssText),x.useTextareaForIME==null&&(x.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(f.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):x.markerId=this.session.addMarker(x.markerRange,"ace_composition_marker","text")},A.prototype.setCompositionText=function(x){var E=this.session.selection.cursor;this.addToken(x,"composition_placeholder",E.row,E.column),this.$moveTextAreaToCursor()},A.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),f.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var x=this.session.selection.cursor;this.removeExtraToken(x.row,x.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},A.prototype.setGhostText=function(x,E){var S=this.session.selection.cursor,$=E||{row:S.row,column:S.column};this.removeGhostText();var m=this.$calculateWrappedTextChunks(x,$);this.addToken(m[0].text,"ghost_text",$.row,$.column),this.$ghostText={text:x,position:{row:$.row,column:$.column}};var d=f.createElement("div");if(m.length>1){var b=this.hideTokensAfterPosition($.row,$.column),L;m.slice(1).forEach(function(N){var B=f.createElement("div"),W=f.createElement("span");W.className="ace_ghost_text",N.wrapped&&(B.className="ghost_text_line_wrapped"),N.text.length===0&&(N.text=" "),W.appendChild(f.createTextNode(N.text)),B.appendChild(W),d.appendChild(B),L=B}),b.forEach(function(N){var B=f.createElement("span");C(N.type)||(B.className="ace_"+N.type.replace(/\./g," ace_")),B.appendChild(f.createTextNode(N.value)),L.appendChild(B)}),this.$ghostTextWidget={el:d,row:$.row,column:$.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var T=this.$cursorLayer.getPixelPosition($,!0),R=this.container,I=R.getBoundingClientRect().height,D=m.length*this.lineHeight,z=D<I-T.top;if(z)return;D<I?this.scrollBy(0,(m.length-1)*this.lineHeight):this.scrollToRow($.row)}},A.prototype.$calculateWrappedTextChunks=function(x,E){var S=this.$size.scrollerWidth-this.$padding*2,$=Math.floor(S/this.characterWidth)-2;$=$<=0?60:$;for(var m=x.split(/\r?\n/),d=[],b=0;b<m.length;b++){var L=this.session.$getDisplayTokens(m[b],E.column),T=this.session.$computeWrapSplits(L,$,this.session.$tabSize);if(T.length>0){var R=0;T.push(m[b].length);for(var I=0;I<T.length;I++){var D=m[b].slice(R,T[I]);d.push({text:D,wrapped:!0}),R=T[I]}}else d.push({text:m[b],wrapped:!1})}return d},A.prototype.removeGhostText=function(){if(this.$ghostText){var x=this.$ghostText.position;this.removeExtraToken(x.row,x.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},A.prototype.addToken=function(x,E,S,$){var m=this.session;m.bgTokenizer.lines[S]=null;var d={type:E,value:x},b=m.getTokens(S);if($==null||!b.length)b.push(d);else for(var L=0,T=0;T<b.length;T++){var R=b[T];if(L+=R.value.length,$<=L){var I=R.value.length-(L-$),D=R.value.slice(0,I),z=R.value.slice(I);b.splice(T,1,{type:R.type,value:D},d,{type:R.type,value:z});break}}this.updateLines(S,S)},A.prototype.hideTokensAfterPosition=function(x,E){for(var S=this.session.getTokens(x),$=0,m=!1,d=[],b=0;b<S.length;b++){var L=S[b];if($+=L.value.length,L.type!=="ghost_text"){if(m){d.push({type:L.type,value:L.value}),L.type="hidden_token";continue}$===E&&(m=!0)}}return this.updateLines(x,x),d},A.prototype.removeExtraToken=function(x,E){this.session.bgTokenizer.lines[x]=null,this.updateLines(x,x)},A.prototype.setTheme=function(x,E){var S=this;if(this.$themeId=x,S._dispatchEvent("themeChange",{theme:x}),!x||typeof x=="string"){var $=x||this.$options.theme.initialValue;a.loadModule(["theme",$],m)}else m(x);function m(d){if(S.$themeId!=x)return E&&E();if(!d||!d.cssClass)throw new Error("couldn't load module "+x+" or it didn't call define");d.$id&&(S.$themeId=d.$id),f.importCssString(d.cssText,d.cssClass,S.container),S.theme&&f.removeCssClass(S.container,S.theme.cssClass);var b="padding"in d?d.padding:"padding"in(S.theme||{})?4:S.$padding;S.$padding&&b!=S.$padding&&S.setPadding(b),S.$theme=d.cssClass,S.theme=d,f.addCssClass(S.container,d.cssClass),f.setCssClass(S.container,"ace_dark",d.isDark),S.$size&&(S.$size.width=0,S.$updateSizeAsync()),S._dispatchEvent("themeLoaded",{theme:d}),E&&E(),u.isSafari&&S.scroller&&(S.scroller.style.background="red",S.scroller.style.background="")}},A.prototype.getTheme=function(){return this.$themeId},A.prototype.setStyle=function(x,E){f.setCssClass(this.container,x,E!==!1)},A.prototype.unsetStyle=function(x){f.removeCssClass(this.container,x)},A.prototype.setCursorStyle=function(x){f.setStyle(this.scroller.style,"cursor",x)},A.prototype.setMouseCursor=function(x){f.setStyle(this.scroller.style,"cursor",x)},A.prototype.attachToShadowRoot=function(){f.importCssString(w,"ace_editor.css",this.container)},A.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},A.prototype.$updateCustomScrollbar=function(x){var E=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),x===!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(S){E.$scrollAnimation||E.session.setScrollTop(S.data-E.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(S){E.$scrollAnimation||E.session.setScrollLeft(S.data-E.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(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(S){E.$scrollAnimation||E.session.setScrollTop(S.data-E.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(S){E.$scrollAnimation||E.session.setScrollLeft(S.data-E.scrollMargin.left)}))},A.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var x=this;this.$resizeTimer=g.delayedCall(function(){x.destroyed||x.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(E){var S=E[0].contentRect.width,$=E[0].contentRect.height;Math.abs(x.$size.width-S)>1||Math.abs(x.$size.height-$)>1?x.$resizeTimer.delay():x.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},A}();_.prototype.CHANGE_CURSOR=1,_.prototype.CHANGE_MARKER=2,_.prototype.CHANGE_GUTTER=4,_.prototype.CHANGE_SCROLL=8,_.prototype.CHANGE_LINES=16,_.prototype.CHANGE_TEXT=32,_.prototype.CHANGE_SIZE=64,_.prototype.CHANGE_MARKER_BACK=128,_.prototype.CHANGE_MARKER_FRONT=256,_.prototype.CHANGE_FULL=512,_.prototype.CHANGE_H_SCROLL=1024,_.prototype.$changes=0,_.prototype.$padding=null,_.prototype.$frozen=!1,_.prototype.STEPS=8,v.implement(_.prototype,y),a.defineOptions(_.prototype,"renderer",{useResizeObserver:{set:function(A){!A&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):A&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(A){this.$textLayer.setShowInvisibles(A)&&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(A){typeof A=="number"&&(this.$printMarginColumn=A),this.$showPrintMargin=!!A,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(A){this.$gutter.style.display=A?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(A){this.$gutterLayer.$useSvgGutterIcons=A},initialValue:!1},showFoldedAnnotations:{set:function(A){this.$gutterLayer.$showFoldedAnnotations=A},initialValue:!1},fadeFoldWidgets:{set:function(A){f.setCssClass(this.$gutter,"ace_fade-fold-widgets",A)},initialValue:!1},showFoldWidgets:{set:function(A){this.$gutterLayer.setShowFoldWidgets(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(A){this.$textLayer.setDisplayIndentGuides(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(A){this.$textLayer.setHighlightIndentGuides(A)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(A){this.$gutterLayer.setHighlightGutterLine(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(A){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(A){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(A){typeof A=="number"&&(A=A+"px"),this.container.style.fontSize=A,this.updateFontSize()},initialValue:12},fontFamily:{set:function(A){this.container.style.fontFamily=A,this.updateFontSize()}},maxLines:{set:function(A){this.updateFull()}},minLines:{set:function(A){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(A){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(A){A=+A||0,this.$scrollPastEnd!=A&&(this.$scrollPastEnd=A,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(A){this.$gutterLayer.$fixedWidth=!!A,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(A){this.$updateCustomScrollbar(A)},initialValue:!1},theme:{set:function(A){this.setTheme(A)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!u.isMobile&&!u.isIE}}),M.VirtualRenderer=_}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(k,M,F){var v=k("../lib/oop"),f=k("../lib/net"),g=k("../lib/event_emitter").EventEmitter,a=k("../config");function l(t){var e="importScripts('"+f.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 r(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=l(t),o=window.URL||window.webkitURL,s=o.createObjectURL(e);return new Worker(s)}return new Worker(t)}var n=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(){v.implement(this,g),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 h=this.$normalizePath;s=s||h(k.toUrl("ace/worker/worker.js",null,"_"));var y={};t.forEach(function(w){y[w]=h(k.toUrl(w,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(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 f.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(n.prototype);var i=function(t,e,o){var s=null,c=!1,h=Object.create(g),y=[],w=new n({messageBuffer:y,terminate:function(){},postMessage:function(u){y.push(u),s&&(c?setTimeout(p):p())}});w.setEmitSync=function(u){c=u};var p=function(){var u=y.shift();u.command?s[u.command].apply(s,u.args):u.event&&h._signal(u.event,u.data)};return h.postMessage=function(u){w.onMessage({data:u})},h.callback=function(u,C){this.postMessage({type:"call",id:C,data:u})},h.emit=function(u,C){this.postMessage({type:"event",name:u,data:C})},a.loadModule(["worker",e],function(u){for(s=new u[o](h);y.length;)p()}),w};M.UIWorkerClient=i,M.WorkerClient=n,M.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(k,M,F){var v=k("./range").Range,f=k("./lib/event_emitter").EventEmitter,g=k("./lib/oop"),a=function(){function l(r,n,i,t,e,o){var s=this;this.length=n,this.session=r,this.doc=r.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=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=c.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return l.prototype.setup=function(){var r=this,n=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=n.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=i.addMarker(new v(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var o=n.createAnchor(e.row,e.column);o.$insertRight=!0,o.detach(),r.others.push(o)}),i.setUndoSelect(!1)},l.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,n=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=r.addMarker(new v(i.row,i.column,i.row,i.column+n.length),n.othersClass,null,!1)})}},l.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},l.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var n=r;if(n.start.row===n.end.row&&n.start.row===this.pos.row){this.$updating=!0;var i=r.action==="insert"?n.end.column-n.start.column:n.start.column-n.end.column,t=n.start.column>=this.pos.column&&n.start.column<=this.pos.column+this.length+1,e=n.start.column-this.pos.column;if(this.updateAnchors(r),t&&(this.length+=i),t&&!this.session.$fromUndo){if(r.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,r.lines)}else if(r.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 v(c.row,c.column,c.row,c.column-i))}}this.$updating=!1,this.updateMarkers()}},l.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var n=this.others.length;n--;)this.others[n].onChange(r);this.updateMarkers()},l.prototype.updateMarkers=function(){if(!this.$updating){var r=this,n=this.session,i=function(e,o){n.removeMarker(e.markerId),e.markerId=n.addMarker(new v(e.row,e.column,e.row,e.column+r.length),o,null,!1)};i(this.pos,this.mainClass);for(var t=this.others.length;t--;)i(this.others[t],this.othersClass)}},l.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var n=this.session.selection.getCursor();n.row===this.pos.row&&n.column>=this.pos.column&&n.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},l.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},l.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),n=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,i=0;i<n;i++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},l}();g.implement(a.prototype,f),M.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(k,M,F){var v=k("../lib/event"),f=k("../lib/useragent");function g(l,r){return l.row==r.row&&l.column==r.column}function a(l){var r=l.domEvent,n=r.altKey,i=r.shiftKey,t=r.ctrlKey,e=l.getAccelKey(),o=l.getButton();if(t&&f.isMac&&(o=r.button),l.editor.inMultiSelectMode&&o==2){l.editor.textInput.onContextMenu(l.domEvent);return}if(!t&&!n&&!e){o===0&&l.editor.inMultiSelectMode&&l.editor.exitMultiSelectMode();return}if(o===0){var s=l.editor,c=s.selection,h=s.inMultiSelectMode,y=l.getDocumentPosition(),w=c.getCursor(),p=l.inSelection()||c.isEmpty()&&g(y,w),u=l.x,C=l.y,_=function(D){u=D.clientX,C=D.clientY},A=s.session,x=s.renderer.pixelToScreenCoordinates(u,C),E=x,S;if(s.$mouseHandler.$enableJumpToDef)t&&n||e&&n?S=i?"block":"add":n&&s.$blockSelectEnabled&&(S="block");else if(e&&!n){if(S="add",!h&&i)return}else n&&s.$blockSelectEnabled&&(S="block");if(S&&f.isMac&&r.ctrlKey&&s.$mouseHandler.cancelContextMenu(),S=="add"){if(!h&&p)return;if(!h){var $=c.toOrientedRange();s.addSelectionMarker($)}var m=c.rangeList.rangeAtPoint(y);s.inVirtualSelectionMode=!0,i&&(m=null,$=c.ranges[0]||$,s.removeSelectionMarker($)),s.once("mouseup",function(){var D=c.toOrientedRange();m&&D.isEmpty()&&g(m.cursor,D.cursor)?c.substractPoint(D.cursor):(i?c.substractPoint($.cursor):$&&(s.removeSelectionMarker($),c.addRange($)),c.addRange(D)),s.inVirtualSelectionMode=!1})}else if(S=="block"){l.stop(),s.inVirtualSelectionMode=!0;var d,b=[],L=function(){var D=s.renderer.pixelToScreenCoordinates(u,C),z=A.screenToDocumentPosition(D.row,D.column,D.offsetX);g(E,D)&&g(z,c.lead)||(E=D,s.selection.moveToPosition(z),s.renderer.scrollCursorIntoView(),s.removeSelectionMarkers(b),b=c.rectangularRangeBlock(E,x),s.$mouseHandler.$clickSelection&&b.length==1&&b[0].isEmpty()&&(b[0]=s.$mouseHandler.$clickSelection.clone()),b.forEach(s.addSelectionMarker,s),s.updateSelectionMarkers())};h&&!e?c.toSingleRange():!h&&e&&(d=c.toOrientedRange(),s.addSelectionMarker(d)),i?x=A.documentToScreenPosition(c.lead):c.moveToPosition(y),E={row:-1,column:-1};var T=function(D){L(),clearInterval(I),s.removeSelectionMarkers(b),b.length||(b=[c.toOrientedRange()]),d&&(s.removeSelectionMarker(d),c.toSingleRange(d));for(var z=0;z<b.length;z++)c.addRange(b[z]);s.inVirtualSelectionMode=!1,s.$mouseHandler.$clickSelection=null},R=L;v.capture(s.container,_,T);var I=setInterval(function(){R()},20);return l.preventDefault()}}}M.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(k,M,F){M.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(f){f.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(f){f.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(f){f.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(f){f.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(f){f.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(f){f.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(f){f.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(f){f.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(f){f.multiSelect.rangeCount>1?f.multiSelect.joinSelections():f.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(f){f.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(f){f.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(f){f.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],M.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(f){f.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(f){return f&&f.inMultiSelectMode}}];var v=k("../keyboard/hash_handler").HashHandler;M.keyboardHandler=new v(M.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,M,F){var v=k("./range_list").RangeList,f=k("./range").Range,g=k("./selection").Selection,a=k("./mouse/multi_select_handler").onMouseDown,l=k("./lib/event"),r=k("./lib/lang"),n=k("./commands/multi_select_commands");M.commands=n.defaultCommands.concat(n.multiSelectCommands);var i=k("./search").Search,t=new i;function e(w,p,u){return t.$options.wrap=!0,t.$options.needle=p,t.$options.backwards=u==-1,t.find(w)}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(w,p){if(w){if(!this.inMultiSelectMode&&this.rangeCount===0){var u=this.toOrientedRange();if(this.rangeList.add(u),this.rangeList.add(w),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),p||this.fromOrientedRange(w);this.rangeList.removeAll(),this.rangeList.add(u),this.$onAddRange(u)}w.cursor||(w.cursor=w.end);var C=this.rangeList.add(w);return this.$onAddRange(w),C.length&&this.$onRemoveRange(C),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),p||this.fromOrientedRange(w)}},this.toSingleRange=function(w){w=w||this.ranges[0];var p=this.rangeList.removeAll();p.length&&this.$onRemoveRange(p),w&&this.fromOrientedRange(w)},this.substractPoint=function(w){var p=this.rangeList.substractPoint(w);if(p)return this.$onRemoveRange(p),p[0]},this.mergeOverlappingRanges=function(){var w=this.rangeList.merge();w.length&&this.$onRemoveRange(w)},this.$onAddRange=function(w){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(w),this._signal("addRange",{range:w})},this.$onRemoveRange=function(w){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var p=this.rangeList.ranges.pop();w.push(p),this.rangeCount=0}for(var u=w.length;u--;){var C=this.ranges.indexOf(w[u]);this.ranges.splice(C,1)}this._signal("removeRange",{ranges:w}),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 v,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var w=this.ranges.length?this.ranges:[this.getRange()],p=[],u=0;u<w.length;u++){var C=w[u],_=C.start.row,A=C.end.row;if(_===A)p.push(C.clone());else{for(p.push(new f(_,C.start.column,_,this.session.getLine(_).length));++_<A;)p.push(this.getLineRange(_,!0));p.push(new f(A,0,A,C.end.column))}u==0&&!this.isBackwards()&&(p=p.reverse())}this.toSingleRange();for(var u=p.length;u--;)this.addRange(p[u])},this.joinSelections=function(){var w=this.rangeList.ranges,p=w[w.length-1],u=f.fromPoints(w[0].start,p.end);this.toSingleRange(),this.setSelectionRange(u,p.cursor==p.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var w=this.rangeList.ranges,p=w[w.length-1],u=f.fromPoints(w[0].start,p.end);this.toSingleRange(),this.setSelectionRange(u,p.cursor==p.start)}else{var C=this.session.documentToScreenPosition(this.cursor),_=this.session.documentToScreenPosition(this.anchor),A=this.rectangularRangeBlock(C,_);A.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(w,p,u){var C=[],_=w.column<p.column;if(_)var A=w.column,x=p.column,E=w.offsetX,S=p.offsetX;else var A=p.column,x=w.column,E=p.offsetX,S=w.offsetX;var $=w.row<p.row;if($)var m=w.row,d=p.row;else var m=p.row,d=w.row;A<0&&(A=0),m<0&&(m=0),m==d&&(u=!0);for(var b,L=m;L<=d;L++){var T=f.fromPoints(this.session.screenToDocumentPosition(L,A,E),this.session.screenToDocumentPosition(L,x,S));if(T.isEmpty()){if(b&&c(T.end,b))break;b=T.end}T.cursor=_?T.start:T.end,C.push(T)}if($&&C.reverse(),!u){for(var R=C.length-1;C[R].isEmpty()&&R>0;)R--;if(R>0)for(var I=0;C[I].isEmpty();)I++;for(var D=R;D>=I;D--)C[D].isEmpty()&&C.splice(D,1)}return C}}).call(g.prototype);var s=k("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(w){w.cursor||(w.cursor=w.end);var p=this.getSelectionStyle();return w.marker=this.session.addMarker(w,"ace_selection",p),this.session.$selectionMarkers.push(w),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,w},this.removeSelectionMarker=function(w){if(w.marker){this.session.removeMarker(w.marker);var p=this.session.$selectionMarkers.indexOf(w);p!=-1&&this.session.$selectionMarkers.splice(p,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(w){for(var p=this.session.$selectionMarkers,u=w.length;u--;){var C=w[u];if(C.marker){this.session.removeMarker(C.marker);var _=p.indexOf(C);_!=-1&&p.splice(_,1)}}this.session.selectionMarkerCount=p.length},this.$onAddRange=function(w){this.addSelectionMarker(w.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(w){this.removeSelectionMarkers(w.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(w){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(n.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(w){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(n.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(w){var p=w.command,u=w.editor;if(u.multiSelect){if(p.multiSelectAction)p.multiSelectAction=="forEach"?C=u.forEachSelection(p,w.args):p.multiSelectAction=="forEachLine"?C=u.forEachSelection(p,w.args,!0):p.multiSelectAction=="single"?(u.exitMultiSelectMode(),C=p.exec(u,w.args||{})):C=p.multiSelectAction(u,w.args||{});else{var C=p.exec(u,w.args||{});u.multiSelect.addRange(u.multiSelect.toOrientedRange()),u.multiSelect.mergeOverlappingRanges()}return C}},this.forEachSelection=function(w,p,u){if(!this.inVirtualSelectionMode){var C=u&&u.keepOrder,_=u==!0||u&&u.$byLines,A=this.session,x=this.selection,E=x.rangeList,S=(C?x:E).ranges,$;if(!S.length)return w.exec?w.exec(this,p||{}):w(this,p||{});var m=x._eventRegistry;x._eventRegistry={};var d=new g(A);this.inVirtualSelectionMode=!0;for(var b=S.length;b--;){if(_)for(;b>0&&S[b].start.row==S[b-1].end.row;)b--;d.fromOrientedRange(S[b]),d.index=b,this.selection=A.selection=d;var L=w.exec?w.exec(this,p||{}):w(this,p||{});!$&&L!==void 0&&($=L),d.toOrientedRange(S[b])}d.detach(),this.selection=A.selection=x,this.inVirtualSelectionMode=!1,x._eventRegistry=m,x.mergeOverlappingRanges(),x.ranges[0]&&x.fromOrientedRange(x.ranges[0]);var T=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),T&&T.from==T.to&&this.renderer.animateScrolling(T.from),$}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var w="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var p=this.multiSelect.rangeList.ranges,u=[],C=0;C<p.length;C++)u.push(this.session.getTextRange(p[C]));var _=this.session.getDocument().getNewLineCharacter();w=u.join(_),w.length==(u.length-1)*_.length&&(w="")}else this.selection.isEmpty()||(w=this.session.getTextRange(this.getSelectionRange()));return w},this.$checkMultiselectChange=function(w,p){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var u=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&p==this.multiSelect.anchor)return;var C=p==this.multiSelect.anchor?u.cursor==u.start?u.end:u.start:u.cursor;C.row!=p.row||this.session.$clipPositionToDocument(C.row,C.column).column!=p.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(w,p,u){if(p=p||{},p.needle=w||p.needle,p.needle==null){var C=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();p.needle=this.session.getTextRange(C)}this.$search.set(p);var _=this.$search.findAll(this.session);if(!_.length)return 0;var A=this.multiSelect;u||A.toSingleRange(_[0]);for(var x=_.length;x--;)A.addRange(_[x],!0);return C&&A.rangeList.rangeAtPoint(C.start)&&A.addRange(C,!0),_.length},this.selectMoreLines=function(w,p){var u=this.selection.toOrientedRange(),C=u.cursor==u.end,_=this.session.documentToScreenPosition(u.cursor);this.selection.$desiredColumn&&(_.column=this.selection.$desiredColumn);var A=this.session.screenToDocumentPosition(_.row+w,_.column);if(u.isEmpty())var E=A;else var x=this.session.documentToScreenPosition(C?u.end:u.start),E=this.session.screenToDocumentPosition(x.row+w,x.column);if(C){var S=f.fromPoints(A,E);S.cursor=S.start}else{var S=f.fromPoints(E,A);S.cursor=S.end}if(S.desiredColumn=_.column,!this.selection.inMultiSelectMode)this.selection.addRange(u);else if(p)var $=u.cursor;this.selection.addRange(S),$&&this.selection.substractPoint($)},this.transposeSelections=function(w){for(var p=this.session,u=p.multiSelect,C=u.ranges,_=C.length;_--;){var A=C[_];if(A.isEmpty()){var x=p.getWordRange(A.start.row,A.start.column);A.start.row=x.start.row,A.start.column=x.start.column,A.end.row=x.end.row,A.end.column=x.end.column}}u.mergeOverlappingRanges();for(var E=[],_=C.length;_--;){var A=C[_];E.unshift(p.getTextRange(A))}w<0?E.unshift(E.pop()):E.push(E.shift());for(var _=C.length;_--;){var A=C[_],S=A.clone();p.replace(A,E[_]),A.start.row=S.start.row,A.start.column=S.start.column}u.fromOrientedRange(u.ranges[0])},this.selectMore=function(w,p,u){var C=this.session,_=C.multiSelect,A=_.toOrientedRange();if(!(A.isEmpty()&&(A=C.getWordRange(A.start.row,A.start.column),A.cursor=w==-1?A.start:A.end,this.multiSelect.addRange(A),u))){var x=C.getTextRange(A),E=e(C,x,w);E&&(E.cursor=w==-1?E.start:E.end,this.session.unfold(E),this.multiSelect.addRange(E),this.renderer.scrollCursorIntoView(null,.5)),p&&this.multiSelect.substractPoint(A.cursor)}},this.alignCursors=function(){var w=this.session,p=w.multiSelect,u=p.ranges,C=-1,_=u.filter(function(R){if(R.cursor.row==C)return!0;C=R.cursor.row});if(!u.length||_.length==u.length-1){var A=this.selection.getRange(),x=A.start.row,E=A.end.row,S=x==E;if(S){var $=this.session.getLength(),m;do m=this.session.getLine(E);while(/[=:]/.test(m)&&++E<$);do m=this.session.getLine(x);while(/[=:]/.test(m)&&--x>0);x<0&&(x=0),E>=$&&(E=$-1)}var d=this.session.removeFullLines(x,E);d=this.$reAlignText(d,S),this.session.insert({row:x,column:0},d.join(`
961
+ `)+`
962
+ `),S||(A.start.column=0,A.end.column=d[d.length-1].length),this.selection.setRange(A)}else{_.forEach(function(R){p.substractPoint(R.cursor)});var b=0,L=1/0,T=u.map(function(R){var I=R.cursor,D=w.getLine(I.row),z=D.substr(I.column).search(/\S/g);return z==-1&&(z=0),I.column>b&&(b=I.column),z<L&&(L=z),z});u.forEach(function(R,I){var D=R.cursor,z=b-D.column,N=T[I]-L;z>N?w.insert(D,r.stringRepeat(" ",z-N)):w.remove(new f(D.row,D.column,D.row,D.column-z+N)),R.start.column=R.end.column=b,R.start.row=R.end.row=D.row,R.cursor=R.end}),p.fromOrientedRange(u[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(w,p){var u=!0,C=!0,_,A,x;return w.map(function(d){var b=d.match(/(\s*)(.*?)(\s*)([=:].*)/);return b?_==null?(_=b[1].length,A=b[2].length,x=b[3].length,b):(_+A+x!=b[1].length+b[2].length+b[3].length&&(C=!1),_!=b[1].length&&(u=!1),_>b[1].length&&(_=b[1].length),A<b[2].length&&(A=b[2].length),x>b[3].length&&(x=b[3].length),b):[d]}).map(p?S:u?C?$:S:m);function E(d){return r.stringRepeat(" ",d)}function S(d){return d[2]?E(_)+d[2]+E(A-d[2].length+x)+d[4].replace(/^([=:])\s+/,"$1 "):d[0]}function $(d){return d[2]?E(_+A-d[2].length)+d[2]+E(x)+d[4].replace(/^([=:])\s+/,"$1 "):d[0]}function m(d){return d[2]?E(_)+d[2]+E(x)+d[4].replace(/^([=:])\s+/,"$1 "):d[0]}}}).call(s.prototype);function c(w,p){return w.row==p.row&&w.column==p.column}M.onSessionChange=function(w){var p=w.session;p&&!p.multiSelect&&(p.$selectionMarkers=[],p.selection.$initRangeList(),p.multiSelect=p.selection),this.multiSelect=p&&p.multiSelect;var u=w.oldSession;u&&(u.multiSelect.off("addRange",this.$onAddRange),u.multiSelect.off("removeRange",this.$onRemoveRange),u.multiSelect.off("multiSelect",this.$onMultiSelect),u.multiSelect.off("singleSelect",this.$onSingleSelect),u.multiSelect.lead.off("change",this.$checkMultiselectChange),u.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 h(w){w.$multiselectOnSessionChange||(w.$onAddRange=w.$onAddRange.bind(w),w.$onRemoveRange=w.$onRemoveRange.bind(w),w.$onMultiSelect=w.$onMultiSelect.bind(w),w.$onSingleSelect=w.$onSingleSelect.bind(w),w.$multiselectOnSessionChange=M.onSessionChange.bind(w),w.$checkMultiselectChange=w.$checkMultiselectChange.bind(w),w.$multiselectOnSessionChange(w),w.on("changeSession",w.$multiselectOnSessionChange),w.on("mousedown",a),w.commands.addCommands(n.defaultCommands),y(w))}function y(w){if(!w.textInput)return;var p=w.textInput.getElement(),u=!1;l.addListener(p,"keydown",function(_){var A=_.keyCode==18&&!(_.ctrlKey||_.shiftKey||_.metaKey);w.$blockSelectEnabled&&A?u||(w.renderer.setMouseCursor("crosshair"),u=!0):u&&C()},w),l.addListener(p,"keyup",C,w),l.addListener(p,"blur",C,w);function C(_){u&&(w.renderer.setMouseCursor(""),u=!1)}}M.MultiSelect=h,k("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(w){h(this),w?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(w){this.$blockSelectEnabled=w},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(k,M,F){var v=k("../../range").Range,f=M.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(g,a,l){var r=g.getLine(l);return this.foldingStartMarker.test(r)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(g,a,l){return null},this.indentationBlock=function(g,a,l){var r=/\S/,n=g.getLine(a),i=n.search(r);if(i!=-1){for(var t=l||n.length,e=g.getLength(),o=a,s=a;++a<e;){var c=g.getLine(a).search(r);if(c!=-1){if(c<=i){var h=g.getTokenAt(a,0);if(!h||h.type!=="string")break}s=a}}if(s>o){var y=g.getLine(s).length;return new v(o,t,s,y)}}},this.openingBracketBlock=function(g,a,l,r,n){var i={row:l,column:r+1},t=g.$findClosingBracket(a,i,n);if(t){var e=g.foldWidgets[t.row];return e==null&&(e=g.getFoldWidget(t.row)),e=="start"&&t.row>i.row&&(t.row--,t.column=g.getLine(t.row).length),v.fromPoints(i,t)}},this.closingBracketBlock=function(g,a,l,r,n){var i={row:l,column:r},t=g.$findOpeningBracket(a,i);if(t)return t.column++,i.column--,v.fromPoints(t,i)}}).call(f.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(k,M,F){var v=k("../lib/dom"),f=k("../range").Range,g=k("../config").nls;function a(r,n,i){for(var t=0,e=r.length-1;t<=e;){var o=t+e>>1,s=i(n,r[o]);if(s>0)t=o+1;else if(s<0)e=o-1;else return o}return-(t+1)}function l(r,n,i){var t=r.getAnnotations().sort(f.comparePoints);if(t.length){var e=a(t,{row:n,column:-1},f.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===n){do o=t[e+=i];while(o&&o.row===n);if(!o)return t.slice()}var s=[];n=o.row;do s[i<0?"unshift":"push"](o),o=t[e+=i];while(o&&o.row==n);return s.length&&s}}}M.showErrorMarker=function(r,n){var i=r.session,t=r.getCursorPosition(),e=t.row,o=i.widgetManager.getWidgetsAtRow(e).filter(function(_){return _.type=="errorMarker"})[0];o?o.destroy():e-=n;var s=l(i,e,n),c;if(s){var h=s[0];t.column=(h.pos&&typeof h.column!="number"?h.pos.sc:h.column)||0,t.row=h.row,c=r.renderer.$gutterLayer.$annotations[t.row]}else{if(o)return;c={displayText:[g("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(t.row),r.selection.moveToPosition(t);var y={row:t.row,fixedWidth:!0,coverGutter:!0,el:v.createElement("div"),type:"errorMarker"},w=y.el.appendChild(v.createElement("div")),p=y.el.appendChild(v.createElement("div"));p.className="error_widget_arrow "+c.className;var u=r.renderer.$cursorLayer.getPixelPosition(t).left;p.style.left=u+r.renderer.gutterWidth-5+"px",y.el.className="error_widget_wrapper",w.className="error_widget "+c.className,c.displayText.forEach(function(_,A){w.appendChild(v.createTextNode(_)),A<c.displayText.length-1&&w.appendChild(v.createElement("br"))}),w.appendChild(v.createElement("div"));var C=function(_,A,x){if(A===0&&(x==="esc"||x==="return"))return y.destroy(),{command:"null"}};y.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(C),i.widgetManager.removeLineWidget(y),r.off("changeSelection",y.destroy),r.off("changeSession",y.destroy),r.off("mouseup",y.destroy),r.off("change",y.destroy))},r.keyBinding.addKeyboardHandler(C),r.on("changeSelection",y.destroy),r.on("changeSession",y.destroy),r.on("mouseup",y.destroy),r.on("change",y.destroy),r.session.widgetManager.addLineWidget(y),y.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:y.el.offsetHeight})},v.importCssString(`
963
+ .error_widget_wrapper {
964
+ background: inherit;
965
+ color: inherit;
966
+ border:none
967
+ }
968
+ .error_widget {
969
+ border-top: solid 2px;
970
+ border-bottom: solid 2px;
971
+ margin: 5px 0;
972
+ padding: 10px 40px;
973
+ white-space: pre-wrap;
974
+ }
975
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
976
+ border-color: #ff5a5a
977
+ }
978
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
979
+ border-color: #F1D817
980
+ }
981
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
982
+ border-color: #5a5a5a
983
+ }
984
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
985
+ border-color: #5aaa5a
986
+ }
987
+ .error_widget_arrow {
988
+ position: absolute;
989
+ border: solid 5px;
990
+ border-top-color: transparent!important;
991
+ border-right-color: transparent!important;
992
+ border-left-color: transparent!important;
993
+ top: -5px;
994
+ }
995
+ `,"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,M,F){k("./loader_build")(M);var v=k("./lib/dom"),f=k("./range").Range,g=k("./editor").Editor,a=k("./edit_session").EditSession,l=k("./undomanager").UndoManager,r=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"),M.config=k("./config"),M.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 g)return i.env.editor;var o="";if(i&&/input|textarea/i.test(i.tagName)){var s=i;o=s.value,i=v.createElement("pre"),s.parentNode.replaceChild(i,s)}else i&&(o=i.textContent,i.innerHTML="");var c=M.createEditSession(o),h=new g(new r(i),c,t),y={document:c,editor:h,onResize:h.resize.bind(h,null)};return s&&(y.textarea=s),h.on("destroy",function(){y.editor.container.env=null}),h.container.env=h.env=y,h},M.createEditSession=function(i,t){var e=new a(i,t);return e.setUndoManager(new l),e},M.Range=f,M.Editor=g,M.EditSession=a,M.UndoManager=l,M.VirtualRenderer=r;var n=M.config.version;M.version=n}),function(){ace.require(["ace/ace"],function(k){k&&(k.config.init(!0),k.define=ace.define);var M=function(){return this}();!M&&typeof window<"u"&&(M=window),!M&&typeof self<"u"&&(M=self),M.ace||(M.ace=k);for(var F in k)k.hasOwnProperty(F)&&(M.ace[F]=k[F]);M.ace.default=M.ace,ee&&(ee.exports=M.ace)})}()}($t)),$t.exports}var St={exports:{}},Ct,Vt;function fi(){if(Vt)return Ct;Vt=1;var ee="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ct=ee,Ct}var At,Gt;function gi(){if(Gt)return At;Gt=1;var ee=fi();function H(){}function k(){}return k.resetWarningCache=H,At=function(){function M(f,g,a,l,r,n){if(n!==ee){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}M.isRequired=M;function F(){return M}var v={array:M,bigint:M,bool:M,func:M,number:M,object:M,string:M,symbol:M,any:M,arrayOf:F,element:M,elementType:M,instanceOf:F,node:M,objectOf:F,oneOf:F,oneOfType:F,shape:F,exact:F,checkPropTypes:k,resetWarningCache:H};return v.PropTypes=v,v},At}var Kt;function Rt(){return Kt||(Kt=1,St.exports=gi()()),St.exports}var Ze={exports:{}};Ze.exports;var Yt;function hn(){return Yt||(Yt=1,function(ee,H){var k=200,M="__lodash_hash_undefined__",F=1,v=2,f=9007199254740991,g="[object Arguments]",a="[object Array]",l="[object AsyncFunction]",r="[object Boolean]",n="[object Date]",i="[object Error]",t="[object Function]",e="[object GeneratorFunction]",o="[object Map]",s="[object Number]",c="[object Null]",h="[object Object]",y="[object Promise]",w="[object Proxy]",p="[object RegExp]",u="[object Set]",C="[object String]",_="[object Symbol]",A="[object Undefined]",x="[object WeakMap]",E="[object ArrayBuffer]",S="[object DataView]",$="[object Float32Array]",m="[object Float64Array]",d="[object Int8Array]",b="[object Int16Array]",L="[object Int32Array]",T="[object Uint8Array]",R="[object Uint8ClampedArray]",I="[object Uint16Array]",D="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,N=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,W={};W[$]=W[m]=W[d]=W[b]=W[L]=W[T]=W[R]=W[I]=W[D]=!0,W[g]=W[a]=W[E]=W[r]=W[S]=W[n]=W[i]=W[t]=W[o]=W[s]=W[h]=W[p]=W[u]=W[C]=W[x]=!1;var j=typeof be=="object"&&be&&be.Object===Object&&be,G=typeof self=="object"&&self&&self.Object===Object&&self,V=j||G||Function("return this")(),X=H&&!H.nodeType&&H,Y=X&&!0&&ee&&!ee.nodeType&&ee,J=Y&&Y.exports===X,ne=J&&j.process,se=function(){try{return ne&&ne.binding&&ne.binding("util")}catch{}}(),ae=se&&se.isTypedArray;function re(O,P){for(var K=-1,Z=O==null?0:O.length,oe=0,te=[];++K<Z;){var ce=O[K];P(ce,K,O)&&(te[oe++]=ce)}return te}function fe(O,P){for(var K=-1,Z=P.length,oe=O.length;++K<Z;)O[oe+K]=P[K];return O}function Fe(O,P){for(var K=-1,Z=O==null?0:O.length;++K<Z;)if(P(O[K],K,O))return!0;return!1}function Ce(O,P){for(var K=-1,Z=Array(O);++K<O;)Z[K]=P(K);return Z}function We(O){return function(P){return O(P)}}function Je(O,P){return O.has(P)}function ct(O,P){return O==null?void 0:O[P]}function ht(O){var P=-1,K=Array(O.size);return O.forEach(function(Z,oe){K[++P]=[oe,Z]}),K}function ut(O,P){return function(K){return O(P(K))}}function dt(O){var P=-1,K=Array(O.size);return O.forEach(function(Z){K[++P]=Z}),K}var ft=Array.prototype,gt=Function.prototype,Ae=Object.prototype,ze=V["__core-js_shared__"],je=gt.toString,pe=Ae.hasOwnProperty,Ue=function(){var O=/[^.]+$/.exec(ze&&ze.keys&&ze.keys.IE_PROTO||"");return O?"Symbol(src)_1."+O:""}(),qe=Ae.toString,Ve=RegExp("^"+je.call(pe).replace(z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),et=J?V.Buffer:void 0,Be=V.Symbol,U=V.Uint8Array,Q=Ae.propertyIsEnumerable,q=ft.splice,ie=Be?Be.toStringTag:void 0,Me=Object.getOwnPropertySymbols,Re=et?et.isBuffer:void 0,tt=ut(Object.keys,Object),pt=Pe(V,"DataView"),Ge=Pe(V,"Map"),mt=Pe(V,"Promise"),vt=Pe(V,"Set"),yt=Pe(V,"WeakMap"),Ke=Pe(Object,"create"),fn=De(pt),gn=De(Ge),pn=De(mt),mn=De(vt),vn=De(yt),It=Be?Be.prototype:void 0,wt=It?It.valueOf:void 0;function Ie(O){var P=-1,K=O==null?0:O.length;for(this.clear();++P<K;){var Z=O[P];this.set(Z[0],Z[1])}}function yn(){this.__data__=Ke?Ke(null):{},this.size=0}function wn(O){var P=this.has(O)&&delete this.__data__[O];return this.size-=P?1:0,P}function bn(O){var P=this.__data__;if(Ke){var K=P[O];return K===M?void 0:K}return pe.call(P,O)?P[O]:void 0}function $n(O){var P=this.__data__;return Ke?P[O]!==void 0:pe.call(P,O)}function Sn(O,P){var K=this.__data__;return this.size+=this.has(O)?0:1,K[O]=Ke&&P===void 0?M:P,this}Ie.prototype.clear=yn,Ie.prototype.delete=wn,Ie.prototype.get=bn,Ie.prototype.has=$n,Ie.prototype.set=Sn;function $e(O){var P=-1,K=O==null?0:O.length;for(this.clear();++P<K;){var Z=O[P];this.set(Z[0],Z[1])}}function Cn(){this.__data__=[],this.size=0}function An(O){var P=this.__data__,K=it(P,O);if(K<0)return!1;var Z=P.length-1;return K==Z?P.pop():q.call(P,K,1),--this.size,!0}function Mn(O){var P=this.__data__,K=it(P,O);return K<0?void 0:P[K][1]}function xn(O){return it(this.__data__,O)>-1}function _n(O,P){var K=this.__data__,Z=it(K,O);return Z<0?(++this.size,K.push([O,P])):K[Z][1]=P,this}$e.prototype.clear=Cn,$e.prototype.delete=An,$e.prototype.get=Mn,$e.prototype.has=xn,$e.prototype.set=_n;function Oe(O){var P=-1,K=O==null?0:O.length;for(this.clear();++P<K;){var Z=O[P];this.set(Z[0],Z[1])}}function kn(){this.size=0,this.__data__={hash:new Ie,map:new(Ge||$e),string:new Ie}}function Ln(O){var P=rt(this,O).delete(O);return this.size-=P?1:0,P}function Tn(O){return rt(this,O).get(O)}function En(O){return rt(this,O).has(O)}function Rn(O,P){var K=rt(this,O),Z=K.size;return K.set(O,P),this.size+=K.size==Z?0:1,this}Oe.prototype.clear=kn,Oe.prototype.delete=Ln,Oe.prototype.get=Tn,Oe.prototype.has=En,Oe.prototype.set=Rn;function nt(O){var P=-1,K=O==null?0:O.length;for(this.__data__=new Oe;++P<K;)this.add(O[P])}function In(O){return this.__data__.set(O,M),this}function On(O){return this.__data__.has(O)}nt.prototype.add=nt.prototype.push=In,nt.prototype.has=On;function xe(O){var P=this.__data__=new $e(O);this.size=P.size}function Dn(){this.__data__=new $e,this.size=0}function Nn(O){var P=this.__data__,K=P.delete(O);return this.size=P.size,K}function Fn(O){return this.__data__.get(O)}function Wn(O){return this.__data__.has(O)}function Bn(O,P){var K=this.__data__;if(K instanceof $e){var Z=K.__data__;if(!Ge||Z.length<k-1)return Z.push([O,P]),this.size=++K.size,this;K=this.__data__=new Oe(Z)}return K.set(O,P),this.size=K.size,this}xe.prototype.clear=Dn,xe.prototype.delete=Nn,xe.prototype.get=Fn,xe.prototype.has=Wn,xe.prototype.set=Bn;function Pn(O,P){var K=ot(O),Z=!K&&ti(O),oe=!K&&!Z&&bt(O),te=!K&&!Z&&!oe&&zt(O),ce=K||Z||oe||te,he=ce?Ce(O.length,String):[],ue=he.length;for(var le in O)pe.call(O,le)&&!(ce&&(le=="length"||oe&&(le=="offset"||le=="parent")||te&&(le=="buffer"||le=="byteLength"||le=="byteOffset")||Xn(le,ue)))&&he.push(le);return he}function it(O,P){for(var K=O.length;K--;)if(Wt(O[K][0],P))return K;return-1}function Hn(O,P,K){var Z=P(O);return ot(O)?Z:fe(Z,K(O))}function Ye(O){return O==null?O===void 0?A:c:ie&&ie in Object(O)?Yn(O):ei(O)}function Ot(O){return Qe(O)&&Ye(O)==g}function Dt(O,P,K,Z,oe){return O===P?!0:O==null||P==null||!Qe(O)&&!Qe(P)?O!==O&&P!==P:zn(O,P,K,Z,Dt,oe)}function zn(O,P,K,Z,oe,te){var ce=ot(O),he=ot(P),ue=ce?a:_e(O),le=he?a:_e(P);ue=ue==g?h:ue,le=le==g?h:le;var ge=ue==h,ye=le==h,de=ue==le;if(de&&bt(O)){if(!bt(P))return!1;ce=!0,ge=!1}if(de&&!ge)return te||(te=new xe),ce||zt(O)?Nt(O,P,K,Z,oe,te):Gn(O,P,ue,K,Z,oe,te);if(!(K&F)){var me=ge&&pe.call(O,"__wrapped__"),ve=ye&&pe.call(P,"__wrapped__");if(me||ve){var ke=me?O.value():O,Se=ve?P.value():P;return te||(te=new xe),oe(ke,Se,K,Z,te)}}return de?(te||(te=new xe),Kn(O,P,K,Z,oe,te)):!1}function jn(O){if(!Ht(O)||Jn(O))return!1;var P=Bt(O)?Ve:N;return P.test(De(O))}function Un(O){return Qe(O)&&Pt(O.length)&&!!W[Ye(O)]}function Vn(O){if(!qn(O))return tt(O);var P=[];for(var K in Object(O))pe.call(O,K)&&K!="constructor"&&P.push(K);return P}function Nt(O,P,K,Z,oe,te){var ce=K&F,he=O.length,ue=P.length;if(he!=ue&&!(ce&&ue>he))return!1;var le=te.get(O);if(le&&te.get(P))return le==P;var ge=-1,ye=!0,de=K&v?new nt:void 0;for(te.set(O,P),te.set(P,O);++ge<he;){var me=O[ge],ve=P[ge];if(Z)var ke=ce?Z(ve,me,ge,P,O,te):Z(me,ve,ge,O,P,te);if(ke!==void 0){if(ke)continue;ye=!1;break}if(de){if(!Fe(P,function(Se,Ne){if(!Je(de,Ne)&&(me===Se||oe(me,Se,K,Z,te)))return de.push(Ne)})){ye=!1;break}}else if(!(me===ve||oe(me,ve,K,Z,te))){ye=!1;break}}return te.delete(O),te.delete(P),ye}function Gn(O,P,K,Z,oe,te,ce){switch(K){case S:if(O.byteLength!=P.byteLength||O.byteOffset!=P.byteOffset)return!1;O=O.buffer,P=P.buffer;case E:return!(O.byteLength!=P.byteLength||!te(new U(O),new U(P)));case r:case n:case s:return Wt(+O,+P);case i:return O.name==P.name&&O.message==P.message;case p:case C:return O==P+"";case o:var he=ht;case u:var ue=Z&F;if(he||(he=dt),O.size!=P.size&&!ue)return!1;var le=ce.get(O);if(le)return le==P;Z|=v,ce.set(O,P);var ge=Nt(he(O),he(P),Z,oe,te,ce);return ce.delete(O),ge;case _:if(wt)return wt.call(O)==wt.call(P)}return!1}function Kn(O,P,K,Z,oe,te){var ce=K&F,he=Ft(O),ue=he.length,le=Ft(P),ge=le.length;if(ue!=ge&&!ce)return!1;for(var ye=ue;ye--;){var de=he[ye];if(!(ce?de in P:pe.call(P,de)))return!1}var me=te.get(O);if(me&&te.get(P))return me==P;var ve=!0;te.set(O,P),te.set(P,O);for(var ke=ce;++ye<ue;){de=he[ye];var Se=O[de],Ne=P[de];if(Z)var jt=ce?Z(Ne,Se,de,P,O,te):Z(Se,Ne,de,O,P,te);if(!(jt===void 0?Se===Ne||oe(Se,Ne,K,Z,te):jt)){ve=!1;break}ke||(ke=de=="constructor")}if(ve&&!ke){var st=O.constructor,at=P.constructor;st!=at&&"constructor"in O&&"constructor"in P&&!(typeof st=="function"&&st instanceof st&&typeof at=="function"&&at instanceof at)&&(ve=!1)}return te.delete(O),te.delete(P),ve}function Ft(O){return Hn(O,ri,Qn)}function rt(O,P){var K=O.__data__;return Zn(P)?K[typeof P=="string"?"string":"hash"]:K.map}function Pe(O,P){var K=ct(O,P);return jn(K)?K:void 0}function Yn(O){var P=pe.call(O,ie),K=O[ie];try{O[ie]=void 0;var Z=!0}catch{}var oe=qe.call(O);return Z&&(P?O[ie]=K:delete O[ie]),oe}var Qn=Me?function(O){return O==null?[]:(O=Object(O),re(Me(O),function(P){return Q.call(O,P)}))}:oi,_e=Ye;(pt&&_e(new pt(new ArrayBuffer(1)))!=S||Ge&&_e(new Ge)!=o||mt&&_e(mt.resolve())!=y||vt&&_e(new vt)!=u||yt&&_e(new yt)!=x)&&(_e=function(O){var P=Ye(O),K=P==h?O.constructor:void 0,Z=K?De(K):"";if(Z)switch(Z){case fn:return S;case gn:return o;case pn:return y;case mn:return u;case vn:return x}return P});function Xn(O,P){return P=P??f,!!P&&(typeof O=="number"||B.test(O))&&O>-1&&O%1==0&&O<P}function Zn(O){var P=typeof O;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?O!=="__proto__":O===null}function Jn(O){return!!Ue&&Ue in O}function qn(O){var P=O&&O.constructor,K=typeof P=="function"&&P.prototype||Ae;return O===K}function ei(O){return qe.call(O)}function De(O){if(O!=null){try{return je.call(O)}catch{}try{return O+""}catch{}}return""}function Wt(O,P){return O===P||O!==O&&P!==P}var ti=Ot(function(){return arguments}())?Ot:function(O){return Qe(O)&&pe.call(O,"callee")&&!Q.call(O,"callee")},ot=Array.isArray;function ni(O){return O!=null&&Pt(O.length)&&!Bt(O)}var bt=Re||si;function ii(O,P){return Dt(O,P)}function Bt(O){if(!Ht(O))return!1;var P=Ye(O);return P==t||P==e||P==l||P==w}function Pt(O){return typeof O=="number"&&O>-1&&O%1==0&&O<=f}function Ht(O){var P=typeof O;return O!=null&&(P=="object"||P=="function")}function Qe(O){return O!=null&&typeof O=="object"}var zt=ae?We(ae):Un;function ri(O){return ni(O)?Pn(O):Vn(O)}function oi(){return[]}function si(){return!1}ee.exports=ii}(Ze,Ze.exports)),Ze.exports}var we={},Qt;function un(){if(Qt)return we;Qt=1,Object.defineProperty(we,"__esModule",{value:!0}),we.getAceInstance=we.debounce=we.editorEvents=we.editorOptions=void 0;var ee=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];we.editorOptions=ee;var H=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];we.editorEvents=H;var k=function(){var F;return typeof window>"u"?(be.window={},F=lt(),delete be.window):window.ace?(F=window.ace,F.acequire=window.ace.require||window.ace.acequire):F=lt(),F};we.getAceInstance=k;var M=function(F,v){var f=null;return function(){var g=this,a=arguments;clearTimeout(f),f=setTimeout(function(){F.apply(g,a)},v)}};return we.debounce=M,we}var Xt;function pi(){if(Xt)return Te;Xt=1;var ee=Te&&Te.__extends||function(){var l=function(r,n){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,t){i.__proto__=t}||function(i,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(i[e]=t[e])},l(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");l(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),H=Te&&Te.__assign||function(){return H=Object.assign||function(l){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(l[t]=r[t])}return l},H.apply(this,arguments)};Object.defineProperty(Te,"__esModule",{value:!0});var k=lt(),M=Rt(),F=Et(),v=hn(),f=un(),g=(0,f.getAceInstance)(),a=function(l){ee(r,l);function r(n){var i=l.call(this,n)||this;return f.editorEvents.forEach(function(t){i[t]=i[t].bind(i)}),i.debounce=f.debounce,i}return r.prototype.isInShadow=function(n){for(var i=n&&n.parentNode;i;){if(i.toString()==="[object ShadowRoot]")return!0;i=i.parentNode}return!1},r.prototype.componentDidMount=function(){var n=this,i=this.props,t=i.className,e=i.onBeforeLoad,o=i.onValidate,s=i.mode,c=i.focus,h=i.theme,y=i.fontSize,w=i.lineHeight,p=i.value,u=i.defaultValue,C=i.showGutter,_=i.wrapEnabled,A=i.showPrintMargin,x=i.scrollMargin,E=x===void 0?[0,0,0,0]:x,S=i.keyboardHandler,$=i.onLoad,m=i.commands,d=i.annotations,b=i.markers,L=i.placeholder;this.editor=g.edit(this.refEditor),e&&e(g);for(var T=Object.keys(this.props.editorProps),R=0;R<T.length;R++)this.editor[T[R]]=this.props.editorProps[T[R]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(E[0],E[1],E[2],E[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof s=="string"?"ace/mode/".concat(s):s),h&&h!==""&&this.editor.setTheme("ace/theme/".concat(h)),this.editor.setFontSize(typeof y=="number"?"".concat(y,"px"):y),w&&(this.editor.container.style.lineHeight=typeof w=="number"?"".concat(w,"px"):"".concat(w),this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(u||p||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(C),this.editor.getSession().setUseWrapMode(_),this.editor.setShowPrintMargin(A),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),L&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),o&&this.editor.getSession().on("changeAnnotation",function(){var D=n.editor.getSession().getAnnotations();n.props.onValidate(D)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(d||[]),b&&b.length>0&&this.handleMarkers(b);var I=this.editor.$options;f.editorOptions.forEach(function(D){I.hasOwnProperty(D)?n.editor.setOption(D,n.props[D]):n.props[D]&&console.warn("ReactAce: editor option ".concat(D," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(m)&&m.forEach(function(D){typeof D.exec=="string"?n.editor.commands.bindKey(D.bindKey,D.exec):n.editor.commands.addCommand(D)}),S&&this.editor.setKeyboardHandler("ace/keyboard/"+S),t&&(this.refEditor.className+=" "+t),$&&$(this.editor),this.editor.resize(),c&&this.editor.focus()},r.prototype.componentDidUpdate=function(n){for(var i=n,t=this.props,e=0;e<f.editorOptions.length;e++){var o=f.editorOptions[e];t[o]!==i[o]&&this.editor.setOption(o,t[o])}if(t.className!==i.className){var s=this.refEditor.className,c=s.trim().split(" "),h=i.className.trim().split(" ");h.forEach(function(p){var u=c.indexOf(p);c.splice(u,1)}),this.refEditor.className=" "+t.className+" "+c.join(" ")}var y=this.editor&&t.value!=null&&this.editor.getValue()!==t.value;if(y){this.silent=!0;var w=this.editor.session.selection.toJSON();this.editor.setValue(t.value,t.cursorStart),this.editor.session.selection.fromJSON(w),this.silent=!1}t.placeholder!==i.placeholder&&this.updatePlaceholder(),t.mode!==i.mode&&this.editor.getSession().setMode(typeof t.mode=="string"?"ace/mode/".concat(t.mode):t.mode),t.theme!==i.theme&&this.editor.setTheme("ace/theme/"+t.theme),t.keyboardHandler!==i.keyboardHandler&&(t.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+t.keyboardHandler):this.editor.setKeyboardHandler(null)),t.fontSize!==i.fontSize&&this.editor.setFontSize(typeof t.fontSize=="number"?"".concat(t.fontSize,"px"):t.fontSize),t.lineHeight!==i.lineHeight&&(this.editor.container.style.lineHeight=typeof t.lineHeight=="number"?"".concat(t.lineHeight,"px"):t.lineHeight,this.editor.renderer.updateFontSize()),t.wrapEnabled!==i.wrapEnabled&&this.editor.getSession().setUseWrapMode(t.wrapEnabled),t.showPrintMargin!==i.showPrintMargin&&this.editor.setShowPrintMargin(t.showPrintMargin),t.showGutter!==i.showGutter&&this.editor.renderer.setShowGutter(t.showGutter),v(t.setOptions,i.setOptions)||this.handleOptions(t),(y||!v(t.annotations,i.annotations))&&this.editor.getSession().setAnnotations(t.annotations||[]),!v(t.markers,i.markers)&&Array.isArray(t.markers)&&this.handleMarkers(t.markers),v(t.scrollMargin,i.scrollMargin)||this.handleScrollMargins(t.scrollMargin),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!n.focus&&this.editor.focus()},r.prototype.handleScrollMargins=function(n){n===void 0&&(n=[0,0,0,0]),this.editor.renderer.setScrollMargin(n[0],n[1],n[2],n[3])},r.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},r.prototype.onChange=function(n){if(this.editor&&this.props.onChange&&!this.silent){var i=this.editor.getValue();this.props.onChange(i,n)}},r.prototype.onSelectionChange=function(n){if(this.props.onSelectionChange){var i=this.editor.getSelection();this.props.onSelectionChange(i,n)}},r.prototype.onCursorChange=function(n){if(this.props.onCursorChange){var i=this.editor.getSelection();this.props.onCursorChange(i,n)}},r.prototype.onInput=function(n){this.props.onInput&&this.props.onInput(n),this.props.placeholder&&this.updatePlaceholder()},r.prototype.onFocus=function(n){this.props.onFocus&&this.props.onFocus(n,this.editor)},r.prototype.onBlur=function(n){this.props.onBlur&&this.props.onBlur(n,this.editor)},r.prototype.onCopy=function(n){var i=n.text;this.props.onCopy&&this.props.onCopy(i)},r.prototype.onPaste=function(n){var i=n.text;this.props.onPaste&&this.props.onPaste(i)},r.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},r.prototype.handleOptions=function(n){for(var i=Object.keys(n.setOptions),t=0;t<i.length;t++)this.editor.setOption(i[t],n.setOptions[i[t]])},r.prototype.handleMarkers=function(n){var i=this,t=this.editor.getSession().getMarkers(!0);for(var e in t)t.hasOwnProperty(e)&&this.editor.getSession().removeMarker(t[e].id);t=this.editor.getSession().getMarkers(!1);for(var e in t)t.hasOwnProperty(e)&&t[e].clazz!=="ace_active-line"&&t[e].clazz!=="ace_selected-word"&&this.editor.getSession().removeMarker(t[e].id);n.forEach(function(o){var s=o.startRow,c=o.startCol,h=o.endRow,y=o.endCol,w=o.className,p=o.type,u=o.inFront,C=u===void 0?!1:u,_=new k.Range(s,c,h,y);i.editor.getSession().addMarker(_,w,p,C)})},r.prototype.updatePlaceholder=function(){var n=this.editor,i=this.props.placeholder,t=!n.session.getValue().length,e=n.renderer.placeholderNode;!t&&e?(n.renderer.scroller.removeChild(n.renderer.placeholderNode),n.renderer.placeholderNode=null):t&&!e?(e=n.renderer.placeholderNode=document.createElement("div"),e.textContent=i||"",e.className="ace_comment ace_placeholder",e.style.padding="0 9px",e.style.position="absolute",e.style.zIndex="3",n.renderer.scroller.appendChild(e)):t&&e&&(e.textContent=i)},r.prototype.updateRef=function(n){this.refEditor=n},r.prototype.render=function(){var n=this.props,i=n.name,t=n.width,e=n.height,o=n.style,s=H({width:t,height:e},o);return F.createElement("div",{ref:this.updateRef,id:i,style:s})},r.propTypes={mode:M.oneOfType([M.string,M.object]),focus:M.bool,theme:M.string,name:M.string,className:M.string,height:M.string,width:M.string,fontSize:M.oneOfType([M.number,M.string]),lineHeight:M.oneOfType([M.number,M.string]),showGutter:M.bool,onChange:M.func,onCopy:M.func,onPaste:M.func,onFocus:M.func,onInput:M.func,onBlur:M.func,onScroll:M.func,value:M.string,defaultValue:M.string,onLoad:M.func,onSelectionChange:M.func,onCursorChange:M.func,onBeforeLoad:M.func,onValidate:M.func,minLines:M.number,maxLines:M.number,readOnly:M.bool,highlightActiveLine:M.bool,tabSize:M.number,showPrintMargin:M.bool,cursorStart:M.number,debounceChangePeriod:M.number,editorProps:M.object,setOptions:M.object,style:M.object,scrollMargin:M.array,annotations:M.array,markers:M.array,keyboardHandler:M.string,wrapEnabled:M.bool,enableSnippets:M.bool,enableBasicAutocompletion:M.oneOfType([M.bool,M.array]),enableLiveAutocompletion:M.oneOfType([M.bool,M.array]),navigateToFileEnd:M.bool,commands:M.array,placeholder:M.string},r.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},r}(F.Component);return Te.default=a,Te}var He={},Ee={},Mt={exports:{}},Zt;function mi(){return Zt||(Zt=1,function(ee,H){ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(k,M,F){var v=k("./lib/oop");k("./lib/lang");var f=k("./lib/event_emitter").EventEmitter,g=k("./editor").Editor,a=k("./virtual_renderer").VirtualRenderer,l=k("./edit_session").EditSession,r;r=function(n,i,t){this.BELOW=1,this.BESIDE=0,this.$container=n,this.$theme=i,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(t||1),this.$cEditor=this.$editors[0],this.on("focus",(function(e){this.$cEditor=e}).bind(this))},(function(){v.implement(this,f),this.$createEditor=function(){var n=document.createElement("div");n.className=this.$editorCSS,n.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(n);var i=new g(new a(n,this.$theme));return i.on("focus",(function(){this._emit("focus",i)}).bind(this)),this.$editors.push(i),i.setFontSize(this.$fontSize),i},this.setSplits=function(n){var i;if(n<1)throw"The number of splits have to be > 0!";if(n!=this.$splits){if(n>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<n;)i=this.$editors[this.$splits],this.$container.appendChild(i.container),i.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<n;)this.$createEditor(),this.$splits++}else for(;this.$splits>n;)i=this.$editors[this.$splits-1],this.$container.removeChild(i.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(n){return this.$editors[n]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(n){this.$editors.forEach(function(i){i.setTheme(n)})},this.setKeyboardHandler=function(n){this.$editors.forEach(function(i){i.setKeyboardHandler(n)})},this.forEach=function(n,i){this.$editors.forEach(n,i)},this.$fontSize="",this.setFontSize=function(n){this.$fontSize=n,this.forEach(function(i){i.setFontSize(n)})},this.$cloneSession=function(n){var i=new l(n.getDocument(),n.getMode()),t=n.getUndoManager();return i.setUndoManager(t),i.setTabSize(n.getTabSize()),i.setUseSoftTabs(n.getUseSoftTabs()),i.setOverwrite(n.getOverwrite()),i.setBreakpoints(n.getBreakpoints()),i.setUseWrapMode(n.getUseWrapMode()),i.setUseWorker(n.getUseWorker()),i.setWrapLimitRange(n.$wrapLimitRange.min,n.$wrapLimitRange.max),i.$foldData=n.$cloneFoldData(),i},this.setSession=function(n,i){var t;i==null?t=this.$cEditor:t=this.$editors[i];var e=this.$editors.some(function(o){return o.session===n});return e&&(n=this.$cloneSession(n)),t.setSession(n),n},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(n){this.$orientation!=n&&(this.$orientation=n,this.resize())},this.resize=function(){var n=this.$container.clientWidth,i=this.$container.clientHeight,t;if(this.$orientation==this.BESIDE)for(var e=n/this.$splits,o=0;o<this.$splits;o++)t=this.$editors[o],t.container.style.width=e+"px",t.container.style.top="0px",t.container.style.left=o*e+"px",t.container.style.height=i+"px",t.resize();else for(var s=i/this.$splits,o=0;o<this.$splits;o++)t=this.$editors[o],t.container.style.width=n+"px",t.container.style.top=o*s+"px",t.container.style.left="0px",t.container.style.height=s+"px",t.resize()}}).call(r.prototype),M.Split=r}),ace.define("ace/ext/split",["require","exports","module","ace/ext/split","ace/split"],function(k,M,F){F.exports=k("../split")}),function(){ace.require(["ace/ext/split"],function(k){ee&&(ee.exports=k)})}()}(Mt)),Mt.exports}var xt,Jt;function vi(){if(Jt)return xt;Jt=1;var ee="Expected a function",H="__lodash_hash_undefined__",k="[object Function]",M="[object GeneratorFunction]",F="[object Symbol]",v=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,f=/^\w*$/,g=/^\./,a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/[\\^$.*+?()[\]{}|]/g,r=/\\(\\)?/g,n=/^\[object .+?Constructor\]$/,i=typeof be=="object"&&be&&be.Object===Object&&be,t=typeof self=="object"&&self&&self.Object===Object&&self,e=i||t||Function("return this")();function o(U,Q){return U==null?void 0:U[Q]}function s(U){var Q=!1;if(U!=null&&typeof U.toString!="function")try{Q=!!(U+"")}catch{}return Q}var c=Array.prototype,h=Function.prototype,y=Object.prototype,w=e["__core-js_shared__"],p=function(){var U=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),u=h.toString,C=y.hasOwnProperty,_=y.toString,A=RegExp("^"+u.call(C).replace(l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=e.Symbol,E=c.splice,S=Je(e,"Map"),$=Je(Object,"create"),m=x?x.prototype:void 0,d=m?m.toString:void 0;function b(U){var Q=-1,q=U?U.length:0;for(this.clear();++Q<q;){var ie=U[Q];this.set(ie[0],ie[1])}}function L(){this.__data__=$?$(null):{}}function T(U){return this.has(U)&&delete this.__data__[U]}function R(U){var Q=this.__data__;if($){var q=Q[U];return q===H?void 0:q}return C.call(Q,U)?Q[U]:void 0}function I(U){var Q=this.__data__;return $?Q[U]!==void 0:C.call(Q,U)}function D(U,Q){var q=this.__data__;return q[U]=$&&Q===void 0?H:Q,this}b.prototype.clear=L,b.prototype.delete=T,b.prototype.get=R,b.prototype.has=I,b.prototype.set=D;function z(U){var Q=-1,q=U?U.length:0;for(this.clear();++Q<q;){var ie=U[Q];this.set(ie[0],ie[1])}}function N(){this.__data__=[]}function B(U){var Q=this.__data__,q=ae(Q,U);if(q<0)return!1;var ie=Q.length-1;return q==ie?Q.pop():E.call(Q,q,1),!0}function W(U){var Q=this.__data__,q=ae(Q,U);return q<0?void 0:Q[q][1]}function j(U){return ae(this.__data__,U)>-1}function G(U,Q){var q=this.__data__,ie=ae(q,U);return ie<0?q.push([U,Q]):q[ie][1]=Q,this}z.prototype.clear=N,z.prototype.delete=B,z.prototype.get=W,z.prototype.has=j,z.prototype.set=G;function V(U){var Q=-1,q=U?U.length:0;for(this.clear();++Q<q;){var ie=U[Q];this.set(ie[0],ie[1])}}function X(){this.__data__={hash:new b,map:new(S||z),string:new b}}function Y(U){return We(this,U).delete(U)}function J(U){return We(this,U).get(U)}function ne(U){return We(this,U).has(U)}function se(U,Q){return We(this,U).set(U,Q),this}V.prototype.clear=X,V.prototype.delete=Y,V.prototype.get=J,V.prototype.has=ne,V.prototype.set=se;function ae(U,Q){for(var q=U.length;q--;)if(ze(U[q][0],Q))return q;return-1}function re(U,Q){Q=ct(Q,U)?[Q]:Ce(Q);for(var q=0,ie=Q.length;U!=null&&q<ie;)U=U[ft(Q[q++])];return q&&q==ie?U:void 0}function fe(U){if(!Ue(U)||ut(U))return!1;var Q=pe(U)||s(U)?A:n;return Q.test(gt(U))}function Fe(U){if(typeof U=="string")return U;if(Ve(U))return d?d.call(U):"";var Q=U+"";return Q=="0"&&1/U==-1/0?"-0":Q}function Ce(U){return je(U)?U:dt(U)}function We(U,Q){var q=U.__data__;return ht(Q)?q[typeof Q=="string"?"string":"hash"]:q.map}function Je(U,Q){var q=o(U,Q);return fe(q)?q:void 0}function ct(U,Q){if(je(U))return!1;var q=typeof U;return q=="number"||q=="symbol"||q=="boolean"||U==null||Ve(U)?!0:f.test(U)||!v.test(U)||Q!=null&&U in Object(Q)}function ht(U){var Q=typeof U;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?U!=="__proto__":U===null}function ut(U){return!!p&&p in U}var dt=Ae(function(U){U=et(U);var Q=[];return g.test(U)&&Q.push(""),U.replace(a,function(q,ie,Me,Re){Q.push(Me?Re.replace(r,"$1"):ie||q)}),Q});function ft(U){if(typeof U=="string"||Ve(U))return U;var Q=U+"";return Q=="0"&&1/U==-1/0?"-0":Q}function gt(U){if(U!=null){try{return u.call(U)}catch{}try{return U+""}catch{}}return""}function Ae(U,Q){if(typeof U!="function"||Q&&typeof Q!="function")throw new TypeError(ee);var q=function(){var ie=arguments,Me=Q?Q.apply(this,ie):ie[0],Re=q.cache;if(Re.has(Me))return Re.get(Me);var tt=U.apply(this,ie);return q.cache=Re.set(Me,tt),tt};return q.cache=new(Ae.Cache||V),q}Ae.Cache=V;function ze(U,Q){return U===Q||U!==U&&Q!==Q}var je=Array.isArray;function pe(U){var Q=Ue(U)?_.call(U):"";return Q==k||Q==M}function Ue(U){var Q=typeof U;return!!U&&(Q=="object"||Q=="function")}function qe(U){return!!U&&typeof U=="object"}function Ve(U){return typeof U=="symbol"||qe(U)&&_.call(U)==F}function et(U){return U==null?"":Fe(U)}function Be(U,Q,q){var ie=U==null?void 0:re(U,Q);return ie===void 0?q:ie}return xt=Be,xt}var qt;function dn(){if(qt)return Ee;qt=1;var ee=Ee&&Ee.__extends||function(){var n=function(i,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s])},n(i,t)};return function(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(i,t);function e(){this.constructor=i}i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),H=Ee&&Ee.__assign||function(){return H=Object.assign||function(n){for(var i,t=1,e=arguments.length;t<e;t++){i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},H.apply(this,arguments)};Object.defineProperty(Ee,"__esModule",{value:!0});var k=un(),M=(0,k.getAceInstance)(),F=lt(),v=mi(),f=Rt(),g=Et(),a=hn(),l=vi(),r=function(n){ee(i,n);function i(t){var e=n.call(this,t)||this;return k.editorEvents.forEach(function(o){e[o]=e[o].bind(e)}),e.debounce=k.debounce,e}return i.prototype.isInShadow=function(t){for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},i.prototype.componentDidMount=function(){var t=this,e=this.props,o=e.className,s=e.onBeforeLoad,c=e.mode,h=e.focus,y=e.theme,w=e.fontSize,p=e.value,u=e.defaultValue,C=e.cursorStart,_=e.showGutter,A=e.wrapEnabled,x=e.showPrintMargin,E=e.scrollMargin,S=E===void 0?[0,0,0,0]:E,$=e.keyboardHandler,m=e.onLoad,d=e.commands,b=e.annotations,L=e.markers,T=e.splits;this.editor=M.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(y)),s&&s(M);var R=Object.keys(this.props.editorProps),I=new v.Split(this.editor.container,"ace/theme/".concat(y),T);this.editor.env.split=I,this.splitEditor=I.getEditor(0),this.split=I,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var D=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),I.forEach(function(N,B){for(var W=0;W<R.length;W++)N[R[W]]=t.props.editorProps[R[W]];var j=l(u,B),G=l(p,B,"");N.session.setUndoManager(new M.UndoManager),N.setTheme("ace/theme/".concat(y)),N.renderer.setScrollMargin(S[0],S[1],S[2],S[3]),N.getSession().setMode("ace/mode/".concat(c)),N.setFontSize(w),N.renderer.setShowGutter(_),N.getSession().setUseWrapMode(A),N.setShowPrintMargin(x),N.on("focus",t.onFocus),N.on("blur",t.onBlur),N.on("input",t.onInput),N.on("copy",t.onCopy),N.on("paste",t.onPaste),N.on("change",t.onChange),N.getSession().selection.on("changeSelection",t.onSelectionChange),N.getSession().selection.on("changeCursor",t.onCursorChange),N.session.on("changeScrollTop",t.onScroll),N.setValue(j===void 0?G:j,C);var V=l(b,B,[]),X=l(L,B,[]);N.getSession().setAnnotations(V),X&&X.length>0&&t.handleMarkers(X,N);for(var W=0;W<k.editorOptions.length;W++){var Y=k.editorOptions[W];D.hasOwnProperty(Y)?N.setOption(Y,t.props[Y]):t.props[Y]&&console.warn("ReaceAce: editor option ".concat(Y," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}t.handleOptions(t.props,N),Array.isArray(d)&&d.forEach(function(J){typeof J.exec=="string"?N.commands.bindKey(J.bindKey,J.exec):N.commands.addCommand(J)}),$&&N.setKeyboardHandler("ace/keyboard/"+$)}),o&&(this.refEditor.className+=" "+o),h&&this.splitEditor.focus();var z=this.editor.env.split;z.setOrientation(this.props.orientation==="below"?z.BELOW:z.BESIDE),z.resize(!0),m&&m(z)},i.prototype.componentDidUpdate=function(t){var e=this,o=t,s=this.props,c=this.editor.env.split;if(s.splits!==o.splits&&c.setSplits(s.splits),s.orientation!==o.orientation&&c.setOrientation(s.orientation==="below"?c.BELOW:c.BESIDE),c.forEach(function(p,u){s.mode!==o.mode&&p.getSession().setMode("ace/mode/"+s.mode),s.keyboardHandler!==o.keyboardHandler&&(s.keyboardHandler?p.setKeyboardHandler("ace/keyboard/"+s.keyboardHandler):p.setKeyboardHandler(null)),s.fontSize!==o.fontSize&&p.setFontSize(s.fontSize),s.wrapEnabled!==o.wrapEnabled&&p.getSession().setUseWrapMode(s.wrapEnabled),s.showPrintMargin!==o.showPrintMargin&&p.setShowPrintMargin(s.showPrintMargin),s.showGutter!==o.showGutter&&p.renderer.setShowGutter(s.showGutter);for(var C=0;C<k.editorOptions.length;C++){var _=k.editorOptions[C];s[_]!==o[_]&&p.setOption(_,s[_])}a(s.setOptions,o.setOptions)||e.handleOptions(s,p);var A=l(s.value,u,"");if(p.getValue()!==A){e.silent=!0;var x=p.session.selection.toJSON();p.setValue(A,s.cursorStart),p.session.selection.fromJSON(x),e.silent=!1}var E=l(s.annotations,u,[]),S=l(o.annotations,u,[]);a(E,S)||p.getSession().setAnnotations(E);var $=l(s.markers,u,[]),m=l(o.markers,u,[]);!a($,m)&&Array.isArray($)&&e.handleMarkers($,p)}),s.className!==o.className){var h=this.refEditor.className,y=h.trim().split(" "),w=o.className.trim().split(" ");w.forEach(function(p){var u=y.indexOf(p);y.splice(u,1)}),this.refEditor.className=" "+s.className+" "+y.join(" ")}s.theme!==o.theme&&c.setTheme("ace/theme/"+s.theme),s.focus&&!o.focus&&this.splitEditor.focus(),(s.height!==this.props.height||s.width!==this.props.width)&&this.editor.resize()},i.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},i.prototype.onChange=function(t){if(this.props.onChange&&!this.silent){var e=[];this.editor.env.split.forEach(function(o){e.push(o.getValue())}),this.props.onChange(e,t)}},i.prototype.onSelectionChange=function(t){if(this.props.onSelectionChange){var e=[];this.editor.env.split.forEach(function(o){e.push(o.getSelection())}),this.props.onSelectionChange(e,t)}},i.prototype.onCursorChange=function(t){if(this.props.onCursorChange){var e=[];this.editor.env.split.forEach(function(o){e.push(o.getSelection())}),this.props.onCursorChange(e,t)}},i.prototype.onFocus=function(t){this.props.onFocus&&this.props.onFocus(t)},i.prototype.onInput=function(t){this.props.onInput&&this.props.onInput(t)},i.prototype.onBlur=function(t){this.props.onBlur&&this.props.onBlur(t)},i.prototype.onCopy=function(t){this.props.onCopy&&this.props.onCopy(t)},i.prototype.onPaste=function(t){this.props.onPaste&&this.props.onPaste(t)},i.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},i.prototype.handleOptions=function(t,e){for(var o=Object.keys(t.setOptions),s=0;s<o.length;s++)e.setOption(o[s],t.setOptions[o[s]])},i.prototype.handleMarkers=function(t,e){var o=e.getSession().getMarkers(!0);for(var s in o)o.hasOwnProperty(s)&&e.getSession().removeMarker(o[s].id);o=e.getSession().getMarkers(!1);for(var s in o)o.hasOwnProperty(s)&&e.getSession().removeMarker(o[s].id);t.forEach(function(c){var h=c.startRow,y=c.startCol,w=c.endRow,p=c.endCol,u=c.className,C=c.type,_=c.inFront,A=_===void 0?!1:_,x=new F.Range(h,y,w,p);e.getSession().addMarker(x,u,C,A)})},i.prototype.updateRef=function(t){this.refEditor=t},i.prototype.render=function(){var t=this.props,e=t.name,o=t.width,s=t.height,c=t.style,h=H({width:o,height:s},c);return g.createElement("div",{ref:this.updateRef,id:e,style:h})},i.propTypes={className:f.string,debounceChangePeriod:f.number,defaultValue:f.arrayOf(f.string),focus:f.bool,fontSize:f.oneOfType([f.number,f.string]),height:f.string,mode:f.string,name:f.string,onBlur:f.func,onChange:f.func,onCopy:f.func,onFocus:f.func,onInput:f.func,onLoad:f.func,onPaste:f.func,onScroll:f.func,orientation:f.string,showGutter:f.bool,splits:f.number,theme:f.string,value:f.arrayOf(f.string),width:f.string,onSelectionChange:f.func,onCursorChange:f.func,onBeforeLoad:f.func,minLines:f.number,maxLines:f.number,readOnly:f.bool,highlightActiveLine:f.bool,tabSize:f.number,showPrintMargin:f.bool,cursorStart:f.number,editorProps:f.object,setOptions:f.object,style:f.object,scrollMargin:f.array,annotations:f.array,markers:f.array,keyboardHandler:f.string,wrapEnabled:f.bool,enableBasicAutocompletion:f.oneOfType([f.bool,f.array]),enableLiveAutocompletion:f.oneOfType([f.bool,f.array]),commands:f.array},i.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},i}(g.Component);return Ee.default=r,Ee}var _t={exports:{}},en;function yi(){return en||(en=1,function(ee){var H=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},k=-1,M=1,F=0;H.Diff=function(v,f){return[v,f]},H.prototype.diff_main=function(v,f,g,a){typeof a>"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var l=a;if(v==null||f==null)throw new Error("Null input. (diff_main)");if(v==f)return v?[new H.Diff(F,v)]:[];typeof g>"u"&&(g=!0);var r=g,n=this.diff_commonPrefix(v,f),i=v.substring(0,n);v=v.substring(n),f=f.substring(n),n=this.diff_commonSuffix(v,f);var t=v.substring(v.length-n);v=v.substring(0,v.length-n),f=f.substring(0,f.length-n);var e=this.diff_compute_(v,f,r,l);return i&&e.unshift(new H.Diff(F,i)),t&&e.push(new H.Diff(F,t)),this.diff_cleanupMerge(e),e},H.prototype.diff_compute_=function(v,f,g,a){var l;if(!v)return[new H.Diff(M,f)];if(!f)return[new H.Diff(k,v)];var r=v.length>f.length?v:f,n=v.length>f.length?f:v,i=r.indexOf(n);if(i!=-1)return l=[new H.Diff(M,r.substring(0,i)),new H.Diff(F,n),new H.Diff(M,r.substring(i+n.length))],v.length>f.length&&(l[0][0]=l[2][0]=k),l;if(n.length==1)return[new H.Diff(k,v),new H.Diff(M,f)];var t=this.diff_halfMatch_(v,f);if(t){var e=t[0],o=t[1],s=t[2],c=t[3],h=t[4],y=this.diff_main(e,s,g,a),w=this.diff_main(o,c,g,a);return y.concat([new H.Diff(F,h)],w)}return g&&v.length>100&&f.length>100?this.diff_lineMode_(v,f,a):this.diff_bisect_(v,f,a)},H.prototype.diff_lineMode_=function(v,f,g){var a=this.diff_linesToChars_(v,f);v=a.chars1,f=a.chars2;var l=a.lineArray,r=this.diff_main(v,f,!1,g);this.diff_charsToLines_(r,l),this.diff_cleanupSemantic(r),r.push(new H.Diff(F,""));for(var n=0,i=0,t=0,e="",o="";n<r.length;){switch(r[n][0]){case M:t++,o+=r[n][1];break;case k:i++,e+=r[n][1];break;case F:if(i>=1&&t>=1){r.splice(n-i-t,i+t),n=n-i-t;for(var s=this.diff_main(e,o,!1,g),c=s.length-1;c>=0;c--)r.splice(n,0,s[c]);n=n+s.length}t=0,i=0,e="",o="";break}n++}return r.pop(),r},H.prototype.diff_bisect_=function(v,f,g){for(var a=v.length,l=f.length,r=Math.ceil((a+l)/2),n=r,i=2*r,t=new Array(i),e=new Array(i),o=0;o<i;o++)t[o]=-1,e[o]=-1;t[n+1]=0,e[n+1]=0;for(var s=a-l,c=s%2!=0,h=0,y=0,w=0,p=0,u=0;u<r&&!(new Date().getTime()>g);u++){for(var C=-u+h;C<=u-y;C+=2){var _=n+C,A;C==-u||C!=u&&t[_-1]<t[_+1]?A=t[_+1]:A=t[_-1]+1;for(var x=A-C;A<a&&x<l&&v.charAt(A)==f.charAt(x);)A++,x++;if(t[_]=A,A>a)y+=2;else if(x>l)h+=2;else if(c){var E=n+s-C;if(E>=0&&E<i&&e[E]!=-1){var S=a-e[E];if(A>=S)return this.diff_bisectSplit_(v,f,A,x,g)}}}for(var $=-u+w;$<=u-p;$+=2){var E=n+$,S;$==-u||$!=u&&e[E-1]<e[E+1]?S=e[E+1]:S=e[E-1]+1;for(var m=S-$;S<a&&m<l&&v.charAt(a-S-1)==f.charAt(l-m-1);)S++,m++;if(e[E]=S,S>a)p+=2;else if(m>l)w+=2;else if(!c){var _=n+s-$;if(_>=0&&_<i&&t[_]!=-1){var A=t[_],x=n+A-_;if(S=a-S,A>=S)return this.diff_bisectSplit_(v,f,A,x,g)}}}}return[new H.Diff(k,v),new H.Diff(M,f)]},H.prototype.diff_bisectSplit_=function(v,f,g,a,l){var r=v.substring(0,g),n=f.substring(0,a),i=v.substring(g),t=f.substring(a),e=this.diff_main(r,n,!1,l),o=this.diff_main(i,t,!1,l);return e.concat(o)},H.prototype.diff_linesToChars_=function(v,f){var g=[],a={};g[0]="";function l(t){for(var e="",o=0,s=-1,c=g.length;s<t.length-1;){s=t.indexOf(`
996
+ `,o),s==-1&&(s=t.length-1);var h=t.substring(o,s+1);(a.hasOwnProperty?a.hasOwnProperty(h):a[h]!==void 0)?e+=String.fromCharCode(a[h]):(c==r&&(h=t.substring(o),s=t.length),e+=String.fromCharCode(c),a[h]=c,g[c++]=h),o=s+1}return e}var r=4e4,n=l(v);r=65535;var i=l(f);return{chars1:n,chars2:i,lineArray:g}},H.prototype.diff_charsToLines_=function(v,f){for(var g=0;g<v.length;g++){for(var a=v[g][1],l=[],r=0;r<a.length;r++)l[r]=f[a.charCodeAt(r)];v[g][1]=l.join("")}},H.prototype.diff_commonPrefix=function(v,f){if(!v||!f||v.charAt(0)!=f.charAt(0))return 0;for(var g=0,a=Math.min(v.length,f.length),l=a,r=0;g<l;)v.substring(r,l)==f.substring(r,l)?(g=l,r=g):a=l,l=Math.floor((a-g)/2+g);return l},H.prototype.diff_commonSuffix=function(v,f){if(!v||!f||v.charAt(v.length-1)!=f.charAt(f.length-1))return 0;for(var g=0,a=Math.min(v.length,f.length),l=a,r=0;g<l;)v.substring(v.length-l,v.length-r)==f.substring(f.length-l,f.length-r)?(g=l,r=g):a=l,l=Math.floor((a-g)/2+g);return l},H.prototype.diff_commonOverlap_=function(v,f){var g=v.length,a=f.length;if(g==0||a==0)return 0;g>a?v=v.substring(g-a):g<a&&(f=f.substring(0,g));var l=Math.min(g,a);if(v==f)return l;for(var r=0,n=1;;){var i=v.substring(l-n),t=f.indexOf(i);if(t==-1)return r;n+=t,(t==0||v.substring(l-n)==f.substring(0,n))&&(r=n,n++)}},H.prototype.diff_halfMatch_=function(v,f){if(this.Diff_Timeout<=0)return null;var g=v.length>f.length?v:f,a=v.length>f.length?f:v;if(g.length<4||a.length*2<g.length)return null;var l=this;function r(y,w,p){for(var u=y.substring(p,p+Math.floor(y.length/4)),C=-1,_="",A,x,E,S;(C=w.indexOf(u,C+1))!=-1;){var $=l.diff_commonPrefix(y.substring(p),w.substring(C)),m=l.diff_commonSuffix(y.substring(0,p),w.substring(0,C));_.length<m+$&&(_=w.substring(C-m,C)+w.substring(C,C+$),A=y.substring(0,p-m),x=y.substring(p+$),E=w.substring(0,C-m),S=w.substring(C+$))}return _.length*2>=y.length?[A,x,E,S,_]:null}var n=r(g,a,Math.ceil(g.length/4)),i=r(g,a,Math.ceil(g.length/2)),t;if(!n&&!i)return null;i?n?t=n[4].length>i[4].length?n:i:t=i:t=n;var e,o,s,c;v.length>f.length?(e=t[0],o=t[1],s=t[2],c=t[3]):(s=t[0],c=t[1],e=t[2],o=t[3]);var h=t[4];return[e,o,s,c,h]},H.prototype.diff_cleanupSemantic=function(v){for(var f=!1,g=[],a=0,l=null,r=0,n=0,i=0,t=0,e=0;r<v.length;)v[r][0]==F?(g[a++]=r,n=t,i=e,t=0,e=0,l=v[r][1]):(v[r][0]==M?t+=v[r][1].length:e+=v[r][1].length,l&&l.length<=Math.max(n,i)&&l.length<=Math.max(t,e)&&(v.splice(g[a-1],0,new H.Diff(k,l)),v[g[a-1]+1][0]=M,a--,a--,r=a>0?g[a-1]:-1,n=0,i=0,t=0,e=0,l=null,f=!0)),r++;for(f&&this.diff_cleanupMerge(v),this.diff_cleanupSemanticLossless(v),r=1;r<v.length;){if(v[r-1][0]==k&&v[r][0]==M){var o=v[r-1][1],s=v[r][1],c=this.diff_commonOverlap_(o,s),h=this.diff_commonOverlap_(s,o);c>=h?(c>=o.length/2||c>=s.length/2)&&(v.splice(r,0,new H.Diff(F,s.substring(0,c))),v[r-1][1]=o.substring(0,o.length-c),v[r+1][1]=s.substring(c),r++):(h>=o.length/2||h>=s.length/2)&&(v.splice(r,0,new H.Diff(F,o.substring(0,h))),v[r-1][0]=M,v[r-1][1]=s.substring(0,s.length-h),v[r+1][0]=k,v[r+1][1]=o.substring(h),r++),r++}r++}},H.prototype.diff_cleanupSemanticLossless=function(v){function f(h,y){if(!h||!y)return 6;var w=h.charAt(h.length-1),p=y.charAt(0),u=w.match(H.nonAlphaNumericRegex_),C=p.match(H.nonAlphaNumericRegex_),_=u&&w.match(H.whitespaceRegex_),A=C&&p.match(H.whitespaceRegex_),x=_&&w.match(H.linebreakRegex_),E=A&&p.match(H.linebreakRegex_),S=x&&h.match(H.blanklineEndRegex_),$=E&&y.match(H.blanklineStartRegex_);return S||$?5:x||E?4:u&&!_&&A?3:_||A?2:u||C?1:0}for(var g=1;g<v.length-1;){if(v[g-1][0]==F&&v[g+1][0]==F){var a=v[g-1][1],l=v[g][1],r=v[g+1][1],n=this.diff_commonSuffix(a,l);if(n){var i=l.substring(l.length-n);a=a.substring(0,a.length-n),l=i+l.substring(0,l.length-n),r=i+r}for(var t=a,e=l,o=r,s=f(a,l)+f(l,r);l.charAt(0)===r.charAt(0);){a+=l.charAt(0),l=l.substring(1)+r.charAt(0),r=r.substring(1);var c=f(a,l)+f(l,r);c>=s&&(s=c,t=a,e=l,o=r)}v[g-1][1]!=t&&(t?v[g-1][1]=t:(v.splice(g-1,1),g--),v[g][1]=e,o?v[g+1][1]=o:(v.splice(g+1,1),g--))}g++}},H.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,H.whitespaceRegex_=/\s/,H.linebreakRegex_=/[\r\n]/,H.blanklineEndRegex_=/\n\r?\n$/,H.blanklineStartRegex_=/^\r?\n\r?\n/,H.prototype.diff_cleanupEfficiency=function(v){for(var f=!1,g=[],a=0,l=null,r=0,n=!1,i=!1,t=!1,e=!1;r<v.length;)v[r][0]==F?(v[r][1].length<this.Diff_EditCost&&(t||e)?(g[a++]=r,n=t,i=e,l=v[r][1]):(a=0,l=null),t=e=!1):(v[r][0]==k?e=!0:t=!0,l&&(n&&i&&t&&e||l.length<this.Diff_EditCost/2&&n+i+t+e==3)&&(v.splice(g[a-1],0,new H.Diff(k,l)),v[g[a-1]+1][0]=M,a--,l=null,n&&i?(t=e=!0,a=0):(a--,r=a>0?g[a-1]:-1,t=e=!1),f=!0)),r++;f&&this.diff_cleanupMerge(v)},H.prototype.diff_cleanupMerge=function(v){v.push(new H.Diff(F,""));for(var f=0,g=0,a=0,l="",r="",n;f<v.length;)switch(v[f][0]){case M:a++,r+=v[f][1],f++;break;case k:g++,l+=v[f][1],f++;break;case F:g+a>1?(g!==0&&a!==0&&(n=this.diff_commonPrefix(r,l),n!==0&&(f-g-a>0&&v[f-g-a-1][0]==F?v[f-g-a-1][1]+=r.substring(0,n):(v.splice(0,0,new H.Diff(F,r.substring(0,n))),f++),r=r.substring(n),l=l.substring(n)),n=this.diff_commonSuffix(r,l),n!==0&&(v[f][1]=r.substring(r.length-n)+v[f][1],r=r.substring(0,r.length-n),l=l.substring(0,l.length-n))),f-=g+a,v.splice(f,g+a),l.length&&(v.splice(f,0,new H.Diff(k,l)),f++),r.length&&(v.splice(f,0,new H.Diff(M,r)),f++),f++):f!==0&&v[f-1][0]==F?(v[f-1][1]+=v[f][1],v.splice(f,1)):f++,a=0,g=0,l="",r="";break}v[v.length-1][1]===""&&v.pop();var i=!1;for(f=1;f<v.length-1;)v[f-1][0]==F&&v[f+1][0]==F&&(v[f][1].substring(v[f][1].length-v[f-1][1].length)==v[f-1][1]?(v[f][1]=v[f-1][1]+v[f][1].substring(0,v[f][1].length-v[f-1][1].length),v[f+1][1]=v[f-1][1]+v[f+1][1],v.splice(f-1,1),i=!0):v[f][1].substring(0,v[f+1][1].length)==v[f+1][1]&&(v[f-1][1]+=v[f+1][1],v[f][1]=v[f][1].substring(v[f+1][1].length)+v[f+1][1],v.splice(f+1,1),i=!0)),f++;i&&this.diff_cleanupMerge(v)},H.prototype.diff_xIndex=function(v,f){var g=0,a=0,l=0,r=0,n;for(n=0;n<v.length&&(v[n][0]!==M&&(g+=v[n][1].length),v[n][0]!==k&&(a+=v[n][1].length),!(g>f));n++)l=g,r=a;return v.length!=n&&v[n][0]===k?r:r+(f-l)},H.prototype.diff_prettyHtml=function(v){for(var f=[],g=/&/g,a=/</g,l=/>/g,r=/\n/g,n=0;n<v.length;n++){var i=v[n][0],t=v[n][1],e=t.replace(g,"&amp;").replace(a,"&lt;").replace(l,"&gt;").replace(r,"&para;<br>");switch(i){case M:f[n]='<ins style="background:#e6ffe6;">'+e+"</ins>";break;case k:f[n]='<del style="background:#ffe6e6;">'+e+"</del>";break;case F:f[n]="<span>"+e+"</span>";break}}return f.join("")},H.prototype.diff_text1=function(v){for(var f=[],g=0;g<v.length;g++)v[g][0]!==M&&(f[g]=v[g][1]);return f.join("")},H.prototype.diff_text2=function(v){for(var f=[],g=0;g<v.length;g++)v[g][0]!==k&&(f[g]=v[g][1]);return f.join("")},H.prototype.diff_levenshtein=function(v){for(var f=0,g=0,a=0,l=0;l<v.length;l++){var r=v[l][0],n=v[l][1];switch(r){case M:g+=n.length;break;case k:a+=n.length;break;case F:f+=Math.max(g,a),g=0,a=0;break}}return f+=Math.max(g,a),f},H.prototype.diff_toDelta=function(v){for(var f=[],g=0;g<v.length;g++)switch(v[g][0]){case M:f[g]="+"+encodeURI(v[g][1]);break;case k:f[g]="-"+v[g][1].length;break;case F:f[g]="="+v[g][1].length;break}return f.join(" ").replace(/%20/g," ")},H.prototype.diff_fromDelta=function(v,f){for(var g=[],a=0,l=0,r=f.split(/\t/g),n=0;n<r.length;n++){var i=r[n].substring(1);switch(r[n].charAt(0)){case"+":try{g[a++]=new H.Diff(M,decodeURI(i))}catch{throw new Error("Illegal escape in diff_fromDelta: "+i)}break;case"-":case"=":var t=parseInt(i,10);if(isNaN(t)||t<0)throw new Error("Invalid number in diff_fromDelta: "+i);var e=v.substring(l,l+=t);r[n].charAt(0)=="="?g[a++]=new H.Diff(F,e):g[a++]=new H.Diff(k,e);break;default:if(r[n])throw new Error("Invalid diff operation in diff_fromDelta: "+r[n])}}if(l!=v.length)throw new Error("Delta length ("+l+") does not equal source text length ("+v.length+").");return g},H.prototype.match_main=function(v,f,g){if(v==null||f==null||g==null)throw new Error("Null input. (match_main)");return g=Math.max(0,Math.min(g,v.length)),v==f?0:v.length?v.substring(g,g+f.length)==f?g:this.match_bitap_(v,f,g):-1},H.prototype.match_bitap_=function(v,f,g){if(f.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(f),l=this;function r(A,x){var E=A/f.length,S=Math.abs(g-x);return l.Match_Distance?E+S/l.Match_Distance:S?1:E}var n=this.Match_Threshold,i=v.indexOf(f,g);i!=-1&&(n=Math.min(r(0,i),n),i=v.lastIndexOf(f,g+f.length),i!=-1&&(n=Math.min(r(0,i),n)));var t=1<<f.length-1;i=-1;for(var e,o,s=f.length+v.length,c,h=0;h<f.length;h++){for(e=0,o=s;e<o;)r(h,g+o)<=n?e=o:s=o,o=Math.floor((s-e)/2+e);s=o;var y=Math.max(1,g-o+1),w=Math.min(g+o,v.length)+f.length,p=Array(w+2);p[w+1]=(1<<h)-1;for(var u=w;u>=y;u--){var C=a[v.charAt(u-1)];if(h===0?p[u]=(p[u+1]<<1|1)&C:p[u]=(p[u+1]<<1|1)&C|((c[u+1]|c[u])<<1|1)|c[u+1],p[u]&t){var _=r(h,u-1);if(_<=n)if(n=_,i=u-1,i>g)y=Math.max(1,2*g-i);else break}}if(r(h+1,g)>n)break;c=p}return i},H.prototype.match_alphabet_=function(v){for(var f={},g=0;g<v.length;g++)f[v.charAt(g)]=0;for(var g=0;g<v.length;g++)f[v.charAt(g)]|=1<<v.length-g-1;return f},H.prototype.patch_addContext_=function(v,f){if(f.length!=0){if(v.start2===null)throw Error("patch not initialized");for(var g=f.substring(v.start2,v.start2+v.length1),a=0;f.indexOf(g)!=f.lastIndexOf(g)&&g.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)a+=this.Patch_Margin,g=f.substring(v.start2-a,v.start2+v.length1+a);a+=this.Patch_Margin;var l=f.substring(v.start2-a,v.start2);l&&v.diffs.unshift(new H.Diff(F,l));var r=f.substring(v.start2+v.length1,v.start2+v.length1+a);r&&v.diffs.push(new H.Diff(F,r)),v.start1-=l.length,v.start2-=l.length,v.length1+=l.length+r.length,v.length2+=l.length+r.length}},H.prototype.patch_make=function(v,f,g){var a,l;if(typeof v=="string"&&typeof f=="string"&&typeof g>"u")a=v,l=this.diff_main(a,f,!0),l.length>2&&(this.diff_cleanupSemantic(l),this.diff_cleanupEfficiency(l));else if(v&&typeof v=="object"&&typeof f>"u"&&typeof g>"u")l=v,a=this.diff_text1(l);else if(typeof v=="string"&&f&&typeof f=="object"&&typeof g>"u")a=v,l=f;else if(typeof v=="string"&&typeof f=="string"&&g&&typeof g=="object")a=v,l=g;else throw new Error("Unknown call format to patch_make.");if(l.length===0)return[];for(var r=[],n=new H.patch_obj,i=0,t=0,e=0,o=a,s=a,c=0;c<l.length;c++){var h=l[c][0],y=l[c][1];switch(!i&&h!==F&&(n.start1=t,n.start2=e),h){case M:n.diffs[i++]=l[c],n.length2+=y.length,s=s.substring(0,e)+y+s.substring(e);break;case k:n.length1+=y.length,n.diffs[i++]=l[c],s=s.substring(0,e)+s.substring(e+y.length);break;case F:y.length<=2*this.Patch_Margin&&i&&l.length!=c+1?(n.diffs[i++]=l[c],n.length1+=y.length,n.length2+=y.length):y.length>=2*this.Patch_Margin&&i&&(this.patch_addContext_(n,o),r.push(n),n=new H.patch_obj,i=0,o=s,t=e);break}h!==M&&(t+=y.length),h!==k&&(e+=y.length)}return i&&(this.patch_addContext_(n,o),r.push(n)),r},H.prototype.patch_deepCopy=function(v){for(var f=[],g=0;g<v.length;g++){var a=v[g],l=new H.patch_obj;l.diffs=[];for(var r=0;r<a.diffs.length;r++)l.diffs[r]=new H.Diff(a.diffs[r][0],a.diffs[r][1]);l.start1=a.start1,l.start2=a.start2,l.length1=a.length1,l.length2=a.length2,f[g]=l}return f},H.prototype.patch_apply=function(v,f){if(v.length==0)return[f,[]];v=this.patch_deepCopy(v);var g=this.patch_addPadding(v);f=g+f+g,this.patch_splitMax(v);for(var a=0,l=[],r=0;r<v.length;r++){var n=v[r].start2+a,i=this.diff_text1(v[r].diffs),t,e=-1;if(i.length>this.Match_MaxBits?(t=this.match_main(f,i.substring(0,this.Match_MaxBits),n),t!=-1&&(e=this.match_main(f,i.substring(i.length-this.Match_MaxBits),n+i.length-this.Match_MaxBits),(e==-1||t>=e)&&(t=-1))):t=this.match_main(f,i,n),t==-1)l[r]=!1,a-=v[r].length2-v[r].length1;else{l[r]=!0,a=t-n;var o;if(e==-1?o=f.substring(t,t+i.length):o=f.substring(t,e+this.Match_MaxBits),i==o)f=f.substring(0,t)+this.diff_text2(v[r].diffs)+f.substring(t+i.length);else{var s=this.diff_main(i,o,!1);if(i.length>this.Match_MaxBits&&this.diff_levenshtein(s)/i.length>this.Patch_DeleteThreshold)l[r]=!1;else{this.diff_cleanupSemanticLossless(s);for(var c=0,h,y=0;y<v[r].diffs.length;y++){var w=v[r].diffs[y];w[0]!==F&&(h=this.diff_xIndex(s,c)),w[0]===M?f=f.substring(0,t+h)+w[1]+f.substring(t+h):w[0]===k&&(f=f.substring(0,t+h)+f.substring(t+this.diff_xIndex(s,c+w[1].length))),w[0]!==k&&(c+=w[1].length)}}}}}return f=f.substring(g.length,f.length-g.length),[f,l]},H.prototype.patch_addPadding=function(v){for(var f=this.Patch_Margin,g="",a=1;a<=f;a++)g+=String.fromCharCode(a);for(var a=0;a<v.length;a++)v[a].start1+=f,v[a].start2+=f;var l=v[0],r=l.diffs;if(r.length==0||r[0][0]!=F)r.unshift(new H.Diff(F,g)),l.start1-=f,l.start2-=f,l.length1+=f,l.length2+=f;else if(f>r[0][1].length){var n=f-r[0][1].length;r[0][1]=g.substring(r[0][1].length)+r[0][1],l.start1-=n,l.start2-=n,l.length1+=n,l.length2+=n}if(l=v[v.length-1],r=l.diffs,r.length==0||r[r.length-1][0]!=F)r.push(new H.Diff(F,g)),l.length1+=f,l.length2+=f;else if(f>r[r.length-1][1].length){var n=f-r[r.length-1][1].length;r[r.length-1][1]+=g.substring(0,n),l.length1+=n,l.length2+=n}return g},H.prototype.patch_splitMax=function(v){for(var f=this.Match_MaxBits,g=0;g<v.length;g++)if(!(v[g].length1<=f)){var a=v[g];v.splice(g--,1);for(var l=a.start1,r=a.start2,n="";a.diffs.length!==0;){var i=new H.patch_obj,t=!0;for(i.start1=l-n.length,i.start2=r-n.length,n!==""&&(i.length1=i.length2=n.length,i.diffs.push(new H.Diff(F,n)));a.diffs.length!==0&&i.length1<f-this.Patch_Margin;){var e=a.diffs[0][0],o=a.diffs[0][1];e===M?(i.length2+=o.length,r+=o.length,i.diffs.push(a.diffs.shift()),t=!1):e===k&&i.diffs.length==1&&i.diffs[0][0]==F&&o.length>2*f?(i.length1+=o.length,l+=o.length,t=!1,i.diffs.push(new H.Diff(e,o)),a.diffs.shift()):(o=o.substring(0,f-i.length1-this.Patch_Margin),i.length1+=o.length,l+=o.length,e===F?(i.length2+=o.length,r+=o.length):t=!1,i.diffs.push(new H.Diff(e,o)),o==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(o.length))}n=this.diff_text2(i.diffs),n=n.substring(n.length-this.Patch_Margin);var s=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);s!==""&&(i.length1+=s.length,i.length2+=s.length,i.diffs.length!==0&&i.diffs[i.diffs.length-1][0]===F?i.diffs[i.diffs.length-1][1]+=s:i.diffs.push(new H.Diff(F,s))),t||v.splice(++g,0,i)}}},H.prototype.patch_toText=function(v){for(var f=[],g=0;g<v.length;g++)f[g]=v[g];return f.join("")},H.prototype.patch_fromText=function(v){var f=[];if(!v)return f;for(var g=v.split(`
997
+ `),a=0,l=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;a<g.length;){var r=g[a].match(l);if(!r)throw new Error("Invalid patch string: "+g[a]);var n=new H.patch_obj;for(f.push(n),n.start1=parseInt(r[1],10),r[2]===""?(n.start1--,n.length1=1):r[2]=="0"?n.length1=0:(n.start1--,n.length1=parseInt(r[2],10)),n.start2=parseInt(r[3],10),r[4]===""?(n.start2--,n.length2=1):r[4]=="0"?n.length2=0:(n.start2--,n.length2=parseInt(r[4],10)),a++;a<g.length;){var i=g[a].charAt(0);try{var t=decodeURI(g[a].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+t)}if(i=="-")n.diffs.push(new H.Diff(k,t));else if(i=="+")n.diffs.push(new H.Diff(M,t));else if(i==" ")n.diffs.push(new H.Diff(F,t));else{if(i=="@")break;if(i!=="")throw new Error('Invalid patch mode "'+i+'" in: '+t)}a++}}return f},H.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},H.patch_obj.prototype.toString=function(){var v,f;this.length1===0?v=this.start1+",0":this.length1==1?v=this.start1+1:v=this.start1+1+","+this.length1,this.length2===0?f=this.start2+",0":this.length2==1?f=this.start2+1:f=this.start2+1+","+this.length2;for(var g=["@@ -"+v+" +"+f+` @@
998
+ `],a,l=0;l<this.diffs.length;l++){switch(this.diffs[l][0]){case M:a="+";break;case k:a="-";break;case F:a=" ";break}g[l+1]=a+encodeURI(this.diffs[l][1])+`
999
+ `}return g.join("").replace(/%20/g," ")},ee.exports=H,ee.exports.diff_match_patch=H,ee.exports.DIFF_DELETE=k,ee.exports.DIFF_INSERT=M,ee.exports.DIFF_EQUAL=F}(_t)),_t.exports}var tn;function wi(){if(tn)return He;tn=1;var ee=He&&He.__extends||function(){var f=function(g,a){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,r){l.__proto__=r}||function(l,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(l[n]=r[n])},f(g,a)};return function(g,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");f(g,a);function l(){this.constructor=g}g.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();Object.defineProperty(He,"__esModule",{value:!0});var H=Rt(),k=Et(),M=dn(),F=yi(),v=function(f){ee(g,f);function g(a){var l=f.call(this,a)||this;return l.state={value:l.props.value},l.onChange=l.onChange.bind(l),l.diff=l.diff.bind(l),l}return g.prototype.componentDidUpdate=function(){var a=this.props.value;a!==this.state.value&&this.setState({value:a})},g.prototype.onChange=function(a){this.setState({value:a}),this.props.onChange&&this.props.onChange(a)},g.prototype.diff=function(){var a=new F,l=this.state.value[0],r=this.state.value[1];if(l.length===0&&r.length===0)return[];var n=a.diff_main(l,r);a.diff_cleanupSemantic(n);var i=this.generateDiffedLines(n),t=this.setCodeMarkers(i);return t},g.prototype.generateDiffedLines=function(a){var l={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1},r={left:[],right:[]},n={left:1,right:1};return a.forEach(function(i){var t=i[0],e=i[1],o=e.split(`
1000
+ `).length-1;if(e.length!==0){var s=e[0],c=e[e.length-1],h=0;switch(t){case l.DIFF_EQUAL:n.left+=o,n.right+=o;break;case l.DIFF_DELETE:s===`
1001
+ `&&(n.left++,o--),h=o,h===0&&r.right.push({startLine:n.right,endLine:n.right}),c===`
1002
+ `&&(h-=1),r.left.push({startLine:n.left,endLine:n.left+h}),n.left+=o;break;case l.DIFF_INSERT:s===`
1003
+ `&&(n.right++,o--),h=o,h===0&&r.left.push({startLine:n.left,endLine:n.left}),c===`
1004
+ `&&(h-=1),r.right.push({startLine:n.right,endLine:n.right+h}),n.right+=o;break;default:throw new Error("Diff type was not defined.")}}}),r},g.prototype.setCodeMarkers=function(a){a===void 0&&(a={left:[],right:[]});for(var l=[],r={left:[],right:[]},n=0;n<a.left.length;n++){var i={startRow:a.left[n].startLine-1,endRow:a.left[n].endLine,type:"text",className:"codeMarker"};r.left.push(i)}for(var n=0;n<a.right.length;n++){var i={startRow:a.right[n].startLine-1,endRow:a.right[n].endLine,type:"text",className:"codeMarker"};r.right.push(i)}return l[0]=r.left,l[1]=r.right,l},g.prototype.render=function(){var a=this.diff();return k.createElement(M.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:a})},g.propTypes={cursorStart:H.number,editorProps:H.object,enableBasicAutocompletion:H.bool,enableLiveAutocompletion:H.bool,focus:H.bool,fontSize:H.number,height:H.string,highlightActiveLine:H.bool,maxLines:H.number,minLines:H.number,mode:H.string,name:H.string,className:H.string,onLoad:H.func,onPaste:H.func,onScroll:H.func,onChange:H.func,orientation:H.string,readOnly:H.bool,scrollMargin:H.array,setOptions:H.object,showGutter:H.bool,showPrintMargin:H.bool,splits:H.number,style:H.object,tabSize:H.number,theme:H.string,value:H.array,width:H.string,wrapEnabled:H.bool},g.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},g}(k.Component);return He.default=v,He}var nn;function bi(){if(nn)return Le;nn=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.diff=Le.split=void 0;var ee=pi(),H=wi();Le.diff=H.default;var k=dn();return Le.split=k.default,Le.default=ee.default,Le}var $i=bi();const Ti=ai($i);var kt={exports:{}},rn;function Si(){return rn||(rn=1,function(ee,H){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(k,M,F){var v=k("../lib/oop"),f=k("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},g.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};v.inherits(g,f),g.getTagRule=function(a){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},g.getStartRule=function(a){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:a}},g.getEndRule=function(a){return{token:"comment.doc",regex:"\\*\\/",next:a}},M.JsDocCommentHighlightRules=g}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(k,M,F){var v=k("../lib/oop"),f=k("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=k("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",l=function(i){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},e=this.createKeywordMapper(t,"identifier"),o="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",c="(function)(\\s*)(\\*?)",h={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[f.getStartRule("doc-start"),n("no_regex"),h,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)"+c+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)"+c+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+c+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+o+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:e,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:c+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[f.getStartRule("doc-start"),n("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[n("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!i||!i.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(y,w,p){if(this.next=y=="{"?this.nextState:"",y=="{"&&p.length)p.unshift("start",w);else if(y=="}"&&p.length&&(p.shift(),this.next=p.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return y=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!i||i.jsx!=!1)&&r.call(this)),this.embedRules(f,"doc-",[f.getEndRule("no_regex")]),this.normalizeRules()};v.inherits(l,g);function r(){var i=a.replace("\\d","\\d\\-"),t={onMatch:function(o,s,c){var h=o.charAt(1)=="/"?2:1;return h==1?(s!=this.nextState?c.unshift(this.next,this.nextState,0):c.unshift(this.next),c[2]++):h==2&&s==this.nextState&&(c[1]--,(!c[1]||c[1]<0)&&(c.shift(),c.shift())),[{type:"meta.tag.punctuation."+(h==1?"":"end-")+"tag-open.xml",value:o.slice(0,h)},{type:"meta.tag.tag-name.xml",value:o.substr(h)}]},regex:"</?(?:"+i+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var e={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[e,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(o,s,c){return s==c[0]&&c.shift(),o.length==2&&(c[0]==this.nextState&&c[1]--,(!c[1]||c[1]<0)&&c.splice(0,2)),this.next=c[0]||"start",[{type:this.token,value:o}]},nextState:"jsx"},e,n("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:i},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function n(i){return[{token:"comment",regex:/\/\*/,next:[f.getTagRule(),{token:"comment",regex:"\\*\\/",next:i||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[f.getTagRule(),{token:"comment",regex:"$|^",next:i||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}M.JavaScriptHighlightRules=l}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(k,M,F){var v=k("../range").Range,f=function(){};(function(){this.checkOutdent=function(g,a){return/^\s+$/.test(g)?/^\s*\}/.test(a):!1},this.autoOutdent=function(g,a){var l=g.getLine(a),r=l.match(/^(\s*\})/);if(!r)return 0;var n=r[1].length,i=g.findMatchingBracket({row:a,column:n});if(!i||i.row==a)return 0;var t=this.$getIndent(g.getLine(i.row));g.replace(new v(a,0,a,n-1),t)},this.$getIndent=function(g){return g.match(/^\s*/)[0]}}).call(f.prototype),M.MatchingBraceOutdent=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(k,M,F){var v=k("../../lib/oop"),f=k("../behaviour").Behaviour,g=k("../../token_iterator").TokenIterator;function a(r,n){return r&&r.type.lastIndexOf(n+".xml")>-1}var l=function(){this.add("string_dquotes","insertion",function(r,n,i,t,e){if(e=='"'||e=="'"){var o=e,s=t.doc.getTextRange(i.getSelectionRange());if(s!==""&&s!=="'"&&s!='"'&&i.getWrapBehavioursEnabled())return{text:o+s+o,selection:!1};var c=i.getCursorPosition(),h=t.doc.getLine(c.row),y=h.substring(c.column,c.column+1),w=new g(t,c.row,c.column),p=w.getCurrentToken();if(y==o&&(a(p,"attribute-value")||a(p,"string")))return{text:"",selection:[1,1]};if(p||(p=w.stepBackward()),!p)return;for(;a(p,"tag-whitespace")||a(p,"whitespace");)p=w.stepBackward();var u=!y||y.match(/\s/);if(a(p,"attribute-equals")&&(u||y==">")||a(p,"decl-attribute-equals")&&(u||y=="?"))return{text:o+o,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(r,n,i,t,e){var o=t.doc.getTextRange(e);if(!e.isMultiLine()&&(o=='"'||o=="'")){var s=t.doc.getLine(e.start.row),c=s.substring(e.start.column+1,e.start.column+2);if(c==o)return e.end.column++,e}}),this.add("autoclosing","insertion",function(r,n,i,t,e){if(e==">"){var o=i.getSelectionRange().start,s=new g(t,o.row,o.column),c=s.getCurrentToken()||s.stepBackward();if(!c||!(a(c,"tag-name")||a(c,"tag-whitespace")||a(c,"attribute-name")||a(c,"attribute-equals")||a(c,"attribute-value"))||a(c,"reference.attribute-value"))return;if(a(c,"attribute-value")){var h=s.getCurrentTokenColumn()+c.value.length;if(o.column<h)return;if(o.column==h){var y=s.stepForward();if(y&&a(y,"attribute-value"))return;s.stepBackward()}}if(/^\s*>/.test(t.getLine(o.row).slice(o.column)))return;for(;!a(c,"tag-name");)if(c=s.stepBackward(),c.value=="<"){c=s.stepForward();break}var w=s.getCurrentTokenRow(),p=s.getCurrentTokenColumn();if(a(s.stepBackward(),"end-tag-open"))return;var u=c.value;return w==o.row&&(u=u.substring(0,o.column-p)),this.voidElements&&this.voidElements.hasOwnProperty(u.toLowerCase())?void 0:{text:"></"+u+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(r,n,i,t,e){if(e==`
1005
+ `){var o=i.getCursorPosition(),s=t.getLine(o.row),c=new g(t,o.row,o.column),h=c.getCurrentToken();if(a(h,"")&&h.type.indexOf("tag-close")!==-1){if(h.value=="/>")return;for(;h&&h.type.indexOf("tag-name")===-1;)h=c.stepBackward();if(!h)return;var y=h.value,w=c.getCurrentTokenRow();if(h=c.stepBackward(),!h||h.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[y]||!this.voidElements){var p=t.getTokenAt(o.row,o.column+1),s=t.getLine(w),u=this.$getIndent(s),C=u+t.getTabString();return p&&p.value==="</"?{text:`
1006
+ `+C+`
1007
+ `+u,selection:[1,C.length,1,C.length]}:{text:`
1008
+ `+C}}}}})};v.inherits(l,f),M.XmlBehaviour=l}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(k,M,F){var v=k("../../lib/oop"),f=k("../../token_iterator").TokenIterator,g=k("../behaviour/cstyle").CstyleBehaviour,a=k("../behaviour/xml").XmlBehaviour,l=function(){var r=new a({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(r),this.inherit(g),this.add("autoclosing-fragment","insertion",function(n,i,t,e,o){if(o==">"){var s=t.getSelectionRange().start,c=new f(e,s.row,s.column),h=c.getCurrentToken()||c.stepBackward();if(!h)return;if(h.value=="<")return{text:"></>",selection:[1,1]}}})};v.inherits(l,g),M.JavaScriptBehaviour=l}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(k,M,F){var v=k("../../lib/oop"),f=k("../../range").Range,g=k("./fold_mode").FoldMode,a=M.FoldMode=function(n,i){g.call(this),this.voidElements=n||{},this.optionalEndTags=v.mixin({},this.voidElements),i&&v.mixin(this.optionalEndTags,i)};v.inherits(a,g);var l=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function r(n,i){return n&&n.type&&n.type.lastIndexOf(i+".xml")>-1}(function(){this.getFoldWidget=function(n,i,t){var e=this._getFirstTagInLine(n,t);return e?e.closing||!e.tagName&&e.selfClosing?i==="markbeginend"?"end":"":!e.tagName||e.selfClosing||this.voidElements.hasOwnProperty(e.tagName.toLowerCase())||this._findEndTagInLine(n,t,e.tagName,e.end.column)?"":"start":this.getCommentFoldWidget(n,t)},this.getCommentFoldWidget=function(n,i){return/comment/.test(n.getState(i))&&/<!-/.test(n.getLine(i))?"start":""},this._getFirstTagInLine=function(n,i){for(var t=n.getTokens(i),e=new l,o=0;o<t.length;o++){var s=t[o];if(r(s,"tag-open")){if(e.end.column=e.start.column+s.value.length,e.closing=r(s,"end-tag-open"),s=t[++o],!s)return null;if(e.tagName=s.value,s.value===""){if(s=t[++o],!s)return null;e.tagName=s.value}for(e.end.column+=s.value.length,o++;o<t.length;o++)if(s=t[o],e.end.column+=s.value.length,r(s,"tag-close")){e.selfClosing=s.value=="/>";break}return e}else if(r(s,"tag-close"))return e.selfClosing=s.value=="/>",e;e.start.column+=s.value.length}return null},this._findEndTagInLine=function(n,i,t,e){for(var o=n.getTokens(i),s=0,c=0;c<o.length;c++){var h=o[c];if(s+=h.value.length,!(s<e-1)&&r(h,"end-tag-open")&&(h=o[c+1],r(h,"tag-name")&&h.value===""&&(h=o[c+2]),h&&h.value==t))return!0}return!1},this.getFoldWidgetRange=function(n,i,t){var e=this._getFirstTagInLine(n,t);if(!e)return this.getCommentFoldWidget(n,t)&&n.getCommentFoldRange(t,n.getLine(t).length);var o=n.getMatchingTags({row:t,column:0});if(o)return new f(o.openTag.end.row,o.openTag.end.column,o.closeTag.start.row,o.closeTag.start.column)}}).call(a.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(k,M,F){var v=k("../../lib/oop"),f=k("../../range").Range,g=k("./fold_mode").FoldMode,a=M.FoldMode=function(l){l&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+l.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+l.end)))};v.inherits(a,g),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(l,r,n){var i=l.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var t=this._getFoldWidgetBase(l,r,n);return!t&&this.startRegionRe.test(i)?"start":t},this.getFoldWidgetRange=function(l,r,n,i){var t=l.getLine(n);if(this.startRegionRe.test(t))return this.getCommentRegionBlock(l,t,n);var s=t.match(this.foldingStartMarker);if(s){var e=s.index;if(s[1])return this.openingBracketBlock(l,s[1],n,e);var o=l.getCommentFoldRange(n,e+s[0].length,1);return o&&!o.isMultiLine()&&(i?o=this.getSectionRange(l,n):r!="all"&&(o=null)),o}if(r!=="markbegin"){var s=t.match(this.foldingStopMarker);if(s){var e=s.index+s[0].length;return s[1]?this.closingBracketBlock(l,s[1],n,e):l.getCommentFoldRange(n,e,-1)}}},this.getSectionRange=function(l,r){var n=l.getLine(r),i=n.search(/\S/),t=r,e=n.length;r=r+1;for(var o=r,s=l.getLength();++r<s;){n=l.getLine(r);var c=n.search(/\S/);if(c!==-1){if(i>c)break;var h=this.getFoldWidgetRange(l,"all",r);if(h){if(h.start.row<=t)break;if(h.isMultiLine())r=h.end.row;else if(i==c)break}o=r}}return new f(t,e,o,l.getLine(o).length)},this.getCommentRegionBlock=function(l,r,n){for(var i=r.search(/\s*$/),t=l.getLength(),e=n,o=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,s=1;++n<t;){r=l.getLine(n);var c=o.exec(r);if(c&&(c[1]?s--:s++,!s))break}var h=n;if(h>e)return new f(e,i,h,r.length)}}).call(a.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(k,M,F){var v=k("../../lib/oop"),f=k("./xml").FoldMode,g=k("./cstyle").FoldMode,a=M.FoldMode=function(l){l&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+l.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+l.end))),this.xmlFoldMode=new f};v.inherits(a,g),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(l,r,n){var i=this.getFoldWidgetBase(l,r,n);return i||this.xmlFoldMode.getFoldWidget(l,r,n)},this.getFoldWidgetRange=function(l,r,n,i){var t=this.getFoldWidgetRangeBase(l,r,n,i);return t||this.xmlFoldMode.getFoldWidgetRange(l,r,n)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(k,M,F){var v=k("../lib/oop"),f=k("./text").Mode,g=k("./javascript_highlight_rules").JavaScriptHighlightRules,a=k("./matching_brace_outdent").MatchingBraceOutdent,l=k("../worker/worker_client").WorkerClient,r=k("./behaviour/javascript").JavaScriptBehaviour,n=k("./folding/javascript").FoldMode,i=function(){this.HighlightRules=g,this.$outdent=new a,this.$behaviour=new r,this.foldingRules=new n};v.inherits(i,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(t,e,o){var s=this.$getIndent(e),c=this.getTokenizer().getLineTokens(e,t),h=c.tokens,y=c.state;if(h.length&&h[h.length-1].type=="comment")return s;if(t=="start"||t=="no_regex"){var w=e.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(s+=o)}else if(t=="doc-start"&&(y=="start"||y=="no_regex"))return"";return s},this.checkOutdent=function(t,e,o){return this.$outdent.checkOutdent(e,o)},this.autoOutdent=function(t,e,o){this.$outdent.autoOutdent(e,o)},this.createWorker=function(t){var e=new l(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return e.attachToDocument(t.getDocument()),e.on("annotate",function(o){t.setAnnotations(o.data)}),e.on("terminate",function(){t.clearAnnotations()}),e},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(i.prototype),M.Mode=i}),function(){ace.require(["ace/mode/javascript"],function(k){ee&&(ee.exports=k)})}()}(kt)),kt.exports}Si();var Lt={exports:{}},on;function Ci(){return on||(on=1,function(ee,H){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(k,M,F){var v=k("../lib/oop"),f=k("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};v.inherits(g,f),M.JsonHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(k,M,F){var v=k("../range").Range,f=function(){};(function(){this.checkOutdent=function(g,a){return/^\s+$/.test(g)?/^\s*\}/.test(a):!1},this.autoOutdent=function(g,a){var l=g.getLine(a),r=l.match(/^(\s*\})/);if(!r)return 0;var n=r[1].length,i=g.findMatchingBracket({row:a,column:n});if(!i||i.row==a)return 0;var t=this.$getIndent(g.getLine(i.row));g.replace(new v(a,0,a,n-1),t)},this.$getIndent=function(g){return g.match(/^\s*/)[0]}}).call(f.prototype),M.MatchingBraceOutdent=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(k,M,F){var v=k("../../lib/oop"),f=k("../../range").Range,g=k("./fold_mode").FoldMode,a=M.FoldMode=function(l){l&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+l.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+l.end)))};v.inherits(a,g),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(l,r,n){var i=l.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var t=this._getFoldWidgetBase(l,r,n);return!t&&this.startRegionRe.test(i)?"start":t},this.getFoldWidgetRange=function(l,r,n,i){var t=l.getLine(n);if(this.startRegionRe.test(t))return this.getCommentRegionBlock(l,t,n);var s=t.match(this.foldingStartMarker);if(s){var e=s.index;if(s[1])return this.openingBracketBlock(l,s[1],n,e);var o=l.getCommentFoldRange(n,e+s[0].length,1);return o&&!o.isMultiLine()&&(i?o=this.getSectionRange(l,n):r!="all"&&(o=null)),o}if(r!=="markbegin"){var s=t.match(this.foldingStopMarker);if(s){var e=s.index+s[0].length;return s[1]?this.closingBracketBlock(l,s[1],n,e):l.getCommentFoldRange(n,e,-1)}}},this.getSectionRange=function(l,r){var n=l.getLine(r),i=n.search(/\S/),t=r,e=n.length;r=r+1;for(var o=r,s=l.getLength();++r<s;){n=l.getLine(r);var c=n.search(/\S/);if(c!==-1){if(i>c)break;var h=this.getFoldWidgetRange(l,"all",r);if(h){if(h.start.row<=t)break;if(h.isMultiLine())r=h.end.row;else if(i==c)break}o=r}}return new f(t,e,o,l.getLine(o).length)},this.getCommentRegionBlock=function(l,r,n){for(var i=r.search(/\s*$/),t=l.getLength(),e=n,o=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,s=1;++n<t;){r=l.getLine(n);var c=o.exec(r);if(c&&(c[1]?s--:s++,!s))break}var h=n;if(h>e)return new f(e,i,h,r.length)}}).call(a.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(k,M,F){var v=k("../lib/oop"),f=k("./text").Mode,g=k("./json_highlight_rules").JsonHighlightRules,a=k("./matching_brace_outdent").MatchingBraceOutdent,l=k("./folding/cstyle").FoldMode,r=k("../worker/worker_client").WorkerClient,n=function(){this.HighlightRules=g,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new l};v.inherits(n,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(i,t,e){var o=this.$getIndent(t);if(i=="start"){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(o+=e)}return o},this.checkOutdent=function(i,t,e){return this.$outdent.checkOutdent(t,e)},this.autoOutdent=function(i,t,e){this.$outdent.autoOutdent(t,e)},this.createWorker=function(i){var t=new r(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(i.getDocument()),t.on("annotate",function(e){i.setAnnotations(e.data)}),t.on("terminate",function(){i.clearAnnotations()}),t},this.$id="ace/mode/json"}).call(n.prototype),M.Mode=n}),function(){ace.require(["ace/mode/json"],function(k){ee&&(ee.exports=k)})}()}(Lt)),Lt.exports}Ci();var Tt={exports:{}},sn;function Ai(){return sn||(sn=1,function(ee,H){ace.define("ace/theme/monokai-css",["require","exports","module"],function(k,M,F){F.exports=`.ace-monokai .ace_gutter {
1009
+ background: #2F3129;
1010
+ color: #8F908A
1011
+ }
1012
+
1013
+ .ace-monokai .ace_print-margin {
1014
+ width: 1px;
1015
+ background: #555651
1016
+ }
1017
+
1018
+ .ace-monokai {
1019
+ background-color: #272822;
1020
+ color: #F8F8F2
1021
+ }
1022
+
1023
+ .ace-monokai .ace_cursor {
1024
+ color: #F8F8F0
1025
+ }
1026
+
1027
+ .ace-monokai .ace_marker-layer .ace_selection {
1028
+ background: #49483E
1029
+ }
1030
+
1031
+ .ace-monokai.ace_multiselect .ace_selection.ace_start {
1032
+ box-shadow: 0 0 3px 0px #272822;
1033
+ }
1034
+
1035
+ .ace-monokai .ace_marker-layer .ace_step {
1036
+ background: rgb(102, 82, 0)
1037
+ }
1038
+
1039
+ .ace-monokai .ace_marker-layer .ace_bracket {
1040
+ margin: -1px 0 0 -1px;
1041
+ border: 1px solid #49483E
1042
+ }
1043
+
1044
+ .ace-monokai .ace_marker-layer .ace_active-line {
1045
+ background: #202020
1046
+ }
1047
+
1048
+ .ace-monokai .ace_gutter-active-line {
1049
+ background-color: #272727
1050
+ }
1051
+
1052
+ .ace-monokai .ace_marker-layer .ace_selected-word {
1053
+ border: 1px solid #49483E
1054
+ }
1055
+
1056
+ .ace-monokai .ace_invisible {
1057
+ color: #52524d
1058
+ }
1059
+
1060
+ .ace-monokai .ace_entity.ace_name.ace_tag,
1061
+ .ace-monokai .ace_keyword,
1062
+ .ace-monokai .ace_meta.ace_tag,
1063
+ .ace-monokai .ace_storage {
1064
+ color: #F92672
1065
+ }
1066
+
1067
+ .ace-monokai .ace_punctuation,
1068
+ .ace-monokai .ace_punctuation.ace_tag {
1069
+ color: #fff
1070
+ }
1071
+
1072
+ .ace-monokai .ace_constant.ace_character,
1073
+ .ace-monokai .ace_constant.ace_language,
1074
+ .ace-monokai .ace_constant.ace_numeric,
1075
+ .ace-monokai .ace_constant.ace_other {
1076
+ color: #AE81FF
1077
+ }
1078
+
1079
+ .ace-monokai .ace_invalid {
1080
+ color: #F8F8F0;
1081
+ background-color: #F92672
1082
+ }
1083
+
1084
+ .ace-monokai .ace_invalid.ace_deprecated {
1085
+ color: #F8F8F0;
1086
+ background-color: #AE81FF
1087
+ }
1088
+
1089
+ .ace-monokai .ace_support.ace_constant,
1090
+ .ace-monokai .ace_support.ace_function {
1091
+ color: #66D9EF
1092
+ }
1093
+
1094
+ .ace-monokai .ace_fold {
1095
+ background-color: #A6E22E;
1096
+ border-color: #F8F8F2
1097
+ }
1098
+
1099
+ .ace-monokai .ace_storage.ace_type,
1100
+ .ace-monokai .ace_support.ace_class,
1101
+ .ace-monokai .ace_support.ace_type {
1102
+ font-style: italic;
1103
+ color: #66D9EF
1104
+ }
1105
+
1106
+ .ace-monokai .ace_entity.ace_name.ace_function,
1107
+ .ace-monokai .ace_entity.ace_other,
1108
+ .ace-monokai .ace_entity.ace_other.ace_attribute-name,
1109
+ .ace-monokai .ace_variable {
1110
+ color: #A6E22E
1111
+ }
1112
+
1113
+ .ace-monokai .ace_variable.ace_parameter {
1114
+ font-style: italic;
1115
+ color: #FD971F
1116
+ }
1117
+
1118
+ .ace-monokai .ace_string {
1119
+ color: #E6DB74
1120
+ }
1121
+
1122
+ .ace-monokai .ace_comment {
1123
+ color: #75715E
1124
+ }
1125
+
1126
+ .ace-monokai .ace_indent-guide {
1127
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y
1128
+ }
1129
+
1130
+ .ace-monokai .ace_indent-guide-active {
1131
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1132
+ }
1133
+ `}),ace.define("ace/theme/monokai",["require","exports","module","ace/theme/monokai-css","ace/lib/dom"],function(k,M,F){M.isDark=!0,M.cssClass="ace-monokai",M.cssText=k("./monokai-css");var v=k("../lib/dom");v.importCssString(M.cssText,M.cssClass,!1)}),function(){ace.require(["ace/theme/monokai"],function(k){ee&&(ee.exports=k)})}()}(Tt)),Tt.exports}Ai();const Mi=li("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Ei({className:ee,variant:H,...k}){return ln.jsx("div",{"data-slot":"alert",role:"alert",className:cn(Mi({variant:H}),ee),...k})}function Ri({className:ee,...H}){return ln.jsx("div",{"data-slot":"alert-description",className:cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",ee),...H})}export{Ti as A,_i as C,ki as G,Ei as a,Ri as b,Li as g};