openc3-cosmos-tool-cmdsender 5.20.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/plugin.txt +2 -2
  3. data/tools/cmdsender/ArrayWidget-By62tXtU-ef1b996df6e28e34c43b.js +2 -0
  4. data/tools/cmdsender/BarColumn-Dm3D1Lhp-61f707e75a11029c0e9b.js +1 -0
  5. data/tools/cmdsender/BlockWidget-CrT45ode-348c3ddc56416a2146ab.js +2 -0
  6. data/tools/cmdsender/ButtonWidget-CKyBBv6m-6364e961031fb424242e.js +2 -0
  7. data/tools/cmdsender/CanvasWidget-PqkppHC7-fd79bd4b7029026acc5c.js +1 -0
  8. data/tools/cmdsender/CanvasdotWidget-BUbJgM2d-fa194d6394bd024c8c98.js +1 -0
  9. data/tools/cmdsender/CanvasimageWidget-DPVBY7mi-f0142b21f0fd88139b85.js +1 -0
  10. data/tools/cmdsender/CanvasimagevalueWidget-GX37zzNc-62b424af2b9d98e27ca5.js +1 -0
  11. data/tools/cmdsender/CanvaslabelWidget-P2_Y6Edw-b1e977b4b7759d576b2f.js +1 -0
  12. data/tools/cmdsender/CanvaslabelvalueWidget-Cuas1i9P-1d3918f6f84adfff0120.js +1 -0
  13. data/tools/cmdsender/CanvaslineWidget-BYOYgPya-e27cccd187a4ac905e59.js +1 -0
  14. data/tools/cmdsender/CanvaslinevalueWidget-3cVJMFo7-3577f5c9be34f37ff633.js +1 -0
  15. data/tools/cmdsender/CheckbuttonWidget-B3wgSMuB-d628399d9f46a9124cf4.js +1 -0
  16. data/tools/cmdsender/ComboboxWidget-Dzr4Scvf-80abf76befb1d2223300.js +1 -0
  17. data/tools/cmdsender/CommandSender-da769df0c665acc1ae58.js +1109 -0
  18. data/tools/cmdsender/CriticalCmdDialog-BzoO1Mw_-7299829c5253b39104cb.js +1 -0
  19. data/tools/cmdsender/DateWidget-BWh76Ibb-c0656ca3fd2db9656784.js +1 -0
  20. data/tools/cmdsender/DetailsDialog-EWjtBjle-91cf88ec81aca5f7f102.js +1 -0
  21. data/tools/cmdsender/DynamicWidget-m9EliUR2-3ed383238855e9d89b65.js +1 -0
  22. data/tools/cmdsender/FormatvalueWidget-Rk0_eeIm-b88e60c978fbcb4abfc1.js +1 -0
  23. data/tools/cmdsender/GraphWidget-LqekkNDr-2595500f5dc44b5a1fd4.js +1 -0
  24. data/tools/cmdsender/HorizontalWidget-BcfJ24Zn-7df1a9c1a9406fee3bc4.js +1 -0
  25. data/tools/cmdsender/HorizontalboxWidget-CQy1Hv9E-cb7847c9da6a2eb1b325.js +1 -0
  26. data/tools/cmdsender/HorizontallineWidget-BdlNB951-13449b3286fb177db656.js +1 -0
  27. data/tools/cmdsender/IframeWidget-BBaDrRLo-205665c65325fc71e124.js +1 -0
  28. data/tools/cmdsender/ImageLoader-CDLQopxJ-4c3bf06f2394935888d1.js +1 -0
  29. data/tools/cmdsender/ImageviewerWidget-BgO3Pq6I-0883370ad21501128eb7.js +1 -0
  30. data/tools/cmdsender/LabelWidget-B_C6lKOE-19e071c13acf72487206.js +1 -0
  31. data/tools/cmdsender/LabelledWidget-B_UGivhr-69437ddf1d915a331241.js +1 -0
  32. data/tools/cmdsender/LabelprogressbarWidget-BJWCmsYC-302c84efb6e5b94e45ef.js +1 -0
  33. data/tools/cmdsender/LabelsparklineWidget-DILCIh3q-f175d1ebf16bcb26b559.js +1 -0
  34. data/tools/cmdsender/LabelvalueWidget-CCZd1NXE-1e7c14b0cd1e2f34caab.js +1 -0
  35. data/tools/cmdsender/LabelvaluedescWidget-Bsllq8W6-e24fb554e1c7f60256b2.js +1 -0
  36. data/tools/cmdsender/LabelvaluelimitsbarWidget-BV-cfaD--1b7c02f3f4a64d0b20fc.js +1 -0
  37. data/tools/cmdsender/LabelvaluelimitscolumnWidget-DwA0eRBw-a36c733c1a100b9ef2cb.js +1 -0
  38. data/tools/cmdsender/LabelvaluerangebarWidget-3GDJz3dj-5edf485853463cdd7bdc.js +1 -0
  39. data/tools/cmdsender/Layout-klOVw-YN-5258887ddded63d92c90.js +1 -0
  40. data/tools/cmdsender/LedWidget-BAt02s0J-ee955f5837eb08c8c5b8.js +1 -0
  41. data/tools/cmdsender/LimitsbarWidget-JJiyzZjb-deabf599a5f021fb6643.js +1 -0
  42. data/tools/cmdsender/LimitscolorWidget-CYzXKbYd-fc74784cfd9fbce0d9b0.js +1 -0
  43. data/tools/cmdsender/LimitscolumnWidget-Cd76tBo7-5899f502fe0a778ce00f.js +1 -0
  44. data/tools/cmdsender/LinegraphWidget-DWRtO6Ej-2886f1ae49e4fe604ab4.js +1 -0
  45. data/tools/cmdsender/MatrixbycolumnsWidget-cwsyjNV2-fa7489fb9bcce39d54b3.js +1 -0
  46. data/tools/cmdsender/ProgressbarWidget-CYDziFej-78fe983908f2d55b8506.js +1 -0
  47. data/tools/cmdsender/RadiobuttonWidget-U6jcQZoD-28e2f2e59de016f7a467.js +1 -0
  48. data/tools/cmdsender/RadiogroupWidget-HTPJnsB0-673ba05cc1221683c64a.js +1 -0
  49. data/tools/cmdsender/RangebarWidget-DW0FJK6y-15a1d235dab1f5389508.js +1 -0
  50. data/tools/cmdsender/RollupWidget-B2qrx55f-e7877648fd0f7ebeaea7.js +1 -0
  51. data/tools/cmdsender/ScrollwindowWidget-CwIDxgO6-22c14acbcc8ae1aed916.js +1 -0
  52. data/tools/cmdsender/SignalWidget-Bosa3AbW-b3cc82444c17e3494e4d.js +1 -0
  53. data/tools/cmdsender/SpacerWidget-DYAlt5mt-79646b208c68ad086279.js +1 -0
  54. data/tools/cmdsender/SparklineWidget-CDrVXOFV-a2a5cd9bc98f09e6f5c4.js +1 -0
  55. data/tools/cmdsender/TabbookWidget-DDdlzCkv-b28195cb05ace2609c5f.js +1 -0
  56. data/tools/cmdsender/TextboxWidget-5euFelEq-198962282d99de2627fa.js +1 -0
  57. data/tools/cmdsender/TextfieldWidget-BFripYeh-36195e3160240dab144f.js +1 -0
  58. data/tools/cmdsender/TimeWidget-BBSbsUYJ-b8771bc53294d10f60d5.js +1 -0
  59. data/tools/cmdsender/TitleWidget-p8cjo-Bs-2538cd241465b2ac8f9c.js +1 -0
  60. data/tools/cmdsender/VWidget-Dmqf_jKM-4eabf4760e3b6f5e10b6.js +1 -0
  61. data/tools/cmdsender/ValueWidget-CZh7JWwT-67ae55abc70e2d6939b1.js +1 -0
  62. data/tools/cmdsender/ValuelimitsbarWidget-DU7ybswC-fc8834eac88586459180.js +1 -0
  63. data/tools/cmdsender/ValuelimitscolumnWidget-DMw-h5jM-d23e707bc9df0603b509.js +1 -0
  64. data/tools/cmdsender/ValuerangebarWidget-DPpofDpA-6eac85aa54ece67d19f2.js +1 -0
  65. data/tools/cmdsender/VerticalWidget-Ch7VAEmz-eb59265f50227b17e04e.js +1 -0
  66. data/tools/cmdsender/VerticalboxWidget-DYx-TFT4-5edc625784a41f39e567.js +1 -0
  67. data/tools/cmdsender/Widget-orNSvnOh-d8c2fbf4a342bb2dc82a.js +1 -0
  68. data/tools/cmdsender/main-da5f80eb5643ef8690b1.js +1423 -0
  69. data/tools/cmdsender/main.js +1 -0
  70. metadata +69 -11
  71. data/tools/cmdsender/index.html +0 -4
  72. data/tools/cmdsender/js/241.js +0 -2
  73. data/tools/cmdsender/js/241.js.map +0 -1
  74. data/tools/cmdsender/js/272.js +0 -2
  75. data/tools/cmdsender/js/272.js.map +0 -1
  76. data/tools/cmdsender/js/592.js +0 -18
  77. data/tools/cmdsender/js/592.js.map +0 -1
  78. data/tools/cmdsender/js/app.js +0 -2
  79. data/tools/cmdsender/js/app.js.map +0 -1
@@ -0,0 +1,1109 @@
1
+ System.register(["./main-da5f80eb5643ef8690b1.js","vue","./DetailsDialog-EWjtBjle-91cf88ec81aca5f7f102.js","./CriticalCmdDialog-BzoO1Mw_-7299829c5253b39104cb.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var s,_export_sfc,$e$1,Qe$1,resolveComponent,openBlock,createBlock,Teleport,createVNode,withCtx,createElementVNode,toDisplayString,createElementBlock,Fragment,renderList,mergeProps,createTextVNode,createSlots,normalizeStyle,createCommentVNode,normalizeClass,withModifiers,P$1,N;return{setters:[x=>{s=x.s,_export_sfc=x._,$e$1=x.$,Qe$1=x.Q},x=>{resolveComponent=x.resolveComponent,openBlock=x.openBlock,createBlock=x.createBlock,Teleport=x.Teleport,createVNode=x.createVNode,withCtx=x.withCtx,createElementVNode=x.createElementVNode,toDisplayString=x.toDisplayString,createElementBlock=x.createElementBlock,Fragment=x.Fragment,renderList=x.renderList,mergeProps=x.mergeProps,createTextVNode=x.createTextVNode,createSlots=x.createSlots,normalizeStyle=x.normalizeStyle,createCommentVNode=x.createCommentVNode,normalizeClass=x.normalizeClass,withModifiers=x.withModifiers},x=>{P$1=x.P},x=>{N=x.N},null,null,null],execute:function(){var __vite_style__=document.createElement("style");__vite_style__.textContent=`.container[data-v-b19a55d5] .v-select__selections{width:auto}.v-overflow-btn[data-v-b19a55d5]{margin-top:0}.container[data-v-b19a55d5]{padding:0}.hazardous[data-v-b19a55d5] .v-select__selection-text{color:#ffdc00!important}.editor[data-v-dda0eae4]{margin-left:30px;height:50px;width:95%;position:relative;font-size:16px}
2
+ /*$vite$:1*/`,document.head.appendChild(__vite_style__);const I$1={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(x){return x.replaceAll(" ","-").toLowerCase()},subMenuClick(x){x.command(x),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},P={class:"app-title mr-2"},q$1=["textContent"];function H$1(x,b,p,m,Vn,W){const R=resolveComponent("v-col"),M=resolveComponent("v-row"),l=resolveComponent("v-icon"),u=resolveComponent("v-btn"),o=resolveComponent("v-divider"),i=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),t=resolveComponent("v-list"),e=resolveComponent("v-menu"),n=resolveComponent("v-radio"),a=resolveComponent("v-list-item-action"),d=resolveComponent("v-radio-group"),f=resolveComponent("v-checkbox");return openBlock(),createBlock(Teleport,{to:"#openc3-menu"},[createVNode(M,{"no-gutters":""},{default:withCtx(()=>[createVNode(R,{"align-self":"end"},{default:withCtx(()=>[createElementVNode("span",P,toDisplayString(p.title),1)]),_:1})]),_:1}),createVNode(M,{dense:"",class:"flex-nowrap"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(p.menus,(oe,F)=>(openBlock(),createBlock(e,{ref_for:!0,ref:"topmenu",key:F},{activator:withCtx(({props:_})=>[createVNode(u,mergeProps({ref_for:!0},_,{variant:"outlined",class:"mx-1 menu-button","data-test":W.formatDT(`${p.title} ${oe.label}`)}),{default:withCtx(()=>[createElementVNode("span",{textContent:toDisplayString(oe.label)},null,8,q$1),createVNode(l,{class:"myicon",end:""},{default:withCtx(()=>b[0]||(b[0]=[createTextVNode(" mdi-menu-down ")])),_:1})]),_:2},1040,["data-test"])]),default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(oe.items,(_,S)=>(openBlock(),createElementBlock(Fragment,null,[_.divider?(openBlock(),createBlock(o,{key:S+"-divider"})):_.subMenu&&_.subMenu.length>0?(openBlock(),createElementBlock("div",{key:S+"-submenu"},[(openBlock(),createBlock(e,{"open-on-hover":"",location:"right",key:S},{activator:withCtx(({props:xe})=>[(openBlock(),createBlock(r,mergeProps({ref_for:!0},xe,{disabled:_.disabled,key:S}),createSlots({append:withCtx(()=>[createVNode(l,null,{default:withCtx(()=>b[1]||(b[1]=[createTextVNode(" mdi-chevron-right ")])),_:1})]),default:withCtx(()=>[!_.radio&&!_.checkbox?(openBlock(),createBlock(i,{key:0,style:normalizeStyle("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(_.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[_.icon?{name:"prepend",fn:withCtx(()=>[createVNode(l,{disabled:_.disabled},{default:withCtx(()=>[createTextVNode(toDisplayString(_.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(_.subMenu,(xe,He)=>(openBlock(),createBlock(r,{key:He,"prepend-icon":xe.icon,onClick:Ae=>W.subMenuClick(xe)},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[createTextVNode(toDisplayString(xe.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):_.radioGroup?(openBlock(),createBlock(d,{"model-value":_.value,"onUpdate:modelValue":_.command,key:S+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(_.choices,(xe,He)=>(openBlock(),createBlock(r,{key:He+"-choice"},{default:withCtx(()=>[createVNode(a,{class:"list-action"},{default:withCtx(()=>[createVNode(n,{color:"secondary",label:xe.label,value:xe.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(openBlock(),createBlock(r,{onClick:xe=>_.command(_),disabled:_.disabled,"data-test":W.formatDT(`${p.title} ${oe.label} ${_.label}`),key:S+"-list"},createSlots({default:withCtx(()=>[_.checkbox?(openBlock(),createBlock(a,{key:0,class:"list-action"},{default:withCtx(()=>[createVNode(f,{modelValue:_.checked,"onUpdate:modelValue":xe=>_.checked=xe,label:_.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):createCommentVNode("",!0),!_.radio&&!_.checkbox?(openBlock(),createBlock(i,{key:1,style:normalizeStyle("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(_.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[_.icon?{name:"prepend",fn:withCtx(()=>[createVNode(l,{icon:_.icon,disabled:_.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const X$1=s(I$1,[["render",H$1],["__scopeId","data-v-0fdf6c8a"]]);var sprintf$1={},hasRequiredSprintf;function requireSprintf(){return hasRequiredSprintf||(hasRequiredSprintf=1,function(x){(function(){var b={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function p(M){return Vn(R(M),arguments)}function m(M,l){return p.apply(null,[M].concat(l||[]))}function Vn(M,l){var u=1,o=M.length,i,r="",t,e,n,a,d,f,oe,F;for(t=0;t<o;t++)if(typeof M[t]=="string")r+=M[t];else if(typeof M[t]=="object"){if(n=M[t],n.keys)for(i=l[u],e=0;e<n.keys.length;e++){if(i==null)throw new Error(p('[sprintf] Cannot access property "%s" of undefined value "%s"',n.keys[e],n.keys[e-1]));i=i[n.keys[e]]}else n.param_no?i=l[n.param_no]:i=l[u++];if(b.not_type.test(n.type)&&b.not_primitive.test(n.type)&&i instanceof Function&&(i=i()),b.numeric_arg.test(n.type)&&typeof i!="number"&&isNaN(i))throw new TypeError(p("[sprintf] expecting number but found %T",i));switch(b.number.test(n.type)&&(oe=i>=0),n.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,n.width?parseInt(n.width):0);break;case"e":i=n.precision?parseFloat(i).toExponential(n.precision):parseFloat(i).toExponential();break;case"f":i=n.precision?parseFloat(i).toFixed(n.precision):parseFloat(i);break;case"g":i=n.precision?String(Number(i.toPrecision(n.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=n.precision?i.substring(0,n.precision):i;break;case"t":i=String(!!i),i=n.precision?i.substring(0,n.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=n.precision?i.substring(0,n.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=n.precision?i.substring(0,n.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase();break}b.json.test(n.type)?r+=i:(b.number.test(n.type)&&(!oe||n.sign)?(F=oe?"+":"-",i=i.toString().replace(b.sign,"")):F="",d=n.pad_char?n.pad_char==="0"?"0":n.pad_char.charAt(1):" ",f=n.width-(F+i).length,a=n.width&&f>0?d.repeat(f):"",r+=n.align?F+i+a:d==="0"?F+a+i:a+F+i)}return r}var W=Object.create(null);function R(M){if(W[M])return W[M];for(var l=M,u,o=[],i=0;l;){if((u=b.text.exec(l))!==null)o.push(u[0]);else if((u=b.modulo.exec(l))!==null)o.push("%");else if((u=b.placeholder.exec(l))!==null){if(u[2]){i|=1;var r=[],t=u[2],e=[];if((e=b.key.exec(t))!==null)for(r.push(e[1]);(t=t.substring(e[0].length))!=="";)if((e=b.key_access.exec(t))!==null)r.push(e[1]);else if((e=b.index_access.exec(t))!==null)r.push(e[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=r}else i|=2;if(i===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");l=l.substring(u[0].length)}return W[M]=o}x.sprintf=p,x.vsprintf=m,typeof window<"u"&&(window.sprintf=p,window.vsprintf=m)})()}(sprintf$1)),sprintf$1}requireSprintf();var ace$1={exports:{}},hasRequiredAce;function requireAce(){return hasRequiredAce||(hasRequiredAce=1,function(x,b){(function(){var p="ace",m=function(){return this}();!m&&typeof window<"u"&&(m=window);var Vn=function(o,i,r){if(typeof o!="string"){Vn.original?Vn.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=i),Vn.modules[o]||(Vn.payloads[o]=r,Vn.modules[o]=null)};Vn.modules={},Vn.payloads={};var W=function(o,i,r){if(typeof i=="string"){var t=l(o,i);if(t!=null)return r&&r(),t}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var e=[],n=0,a=i.length;n<a;++n){var d=l(o,i[n]);if(d==null&&R.original)return;e.push(d)}return r&&r.apply(null,e)||!0}},R=function(o,i){var r=W("",o,i);return r==null&&R.original?R.original.apply(this,arguments):r},M=function(o,i){if(i.indexOf("!")!==-1){var r=i.split("!");return M(o,r[0])+"!"+M(o,r[1])}if(i.charAt(0)=="."){var t=o.split("/").slice(0,-1).join("/");for(i=t+"/"+i;i.indexOf(".")!==-1&&e!=i;){var e=i;i=i.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},l=function(o,i){i=M(o,i);var r=Vn.modules[i];if(!r){if(r=Vn.payloads[i],typeof r=="function"){var t={},e={id:i,uri:"",exports:t,packaged:!0},n=function(d,f){return W(i,d,f)},a=r(n,t,e);t=a||e.exports,Vn.modules[i]=t,delete Vn.payloads[i]}r=Vn.modules[i]=t||r}return r};function u(o){var i=m;m[o]||(m[o]={}),i=m[o],(!i.define||!i.define.packaged)&&(Vn.original=i.define,i.define=Vn,i.define.packaged=!0),(!i.require||!i.require.packaged)&&(R.original=i.require,i.require=R,i.require.packaged=!0)}u(p)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(p,m,Vn){function W(R,M,l){Object.defineProperty(R,M,{value:l,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||W(String.prototype,"startsWith",function(R,M){return M=M||0,this.lastIndexOf(R,M)===M}),String.prototype.endsWith||W(String.prototype,"endsWith",function(R,M){var l=this;(M===void 0||M>l.length)&&(M=l.length),M-=R.length;var u=l.indexOf(R,M);return u!==-1&&u===M}),String.prototype.repeat||W(String.prototype,"repeat",function(R){for(var M="",l=this;R>0;)R&1&&(M+=l),(R>>=1)&&(l+=l);return M}),String.prototype.includes||W(String.prototype,"includes",function(R,M){return this.indexOf(R,M)!=-1}),Object.assign||(Object.assign=function(R){if(R==null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(R),l=1;l<arguments.length;l++){var u=arguments[l];u!=null&&Object.keys(u).forEach(function(o){M[o]=u[o]})}return M}),Object.values||(Object.values=function(R){return Object.keys(R).map(function(M){return R[M]})}),Array.prototype.find||W(Array.prototype,"find",function(R){for(var M=this.length,l=arguments[1],u=0;u<M;u++){var o=this[u];if(R.call(l,o,u,this))return o}}),Array.prototype.findIndex||W(Array.prototype,"findIndex",function(R){for(var M=this.length,l=arguments[1],u=0;u<M;u++){var o=this[u];if(R.call(l,o,u,this))return u}}),Array.prototype.includes||W(Array.prototype,"includes",function(R,M){return this.indexOf(R,M)!=-1}),Array.prototype.fill||W(Array.prototype,"fill",function(R){for(var M=this,l=M.length>>>0,u=arguments[1],o=u>>0,i=o<0?Math.max(l+o,0):Math.min(o,l),r=arguments[2],t=r===void 0?l:r>>0,e=t<0?Math.max(l+t,0):Math.min(t,l);i<e;)M[i]=R,i++;return M}),Array.of||W(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(p,m,Vn){p("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(p,m,Vn){m.deepCopy=function W(R){if(typeof R!="object"||!R)return R;var M;if(Array.isArray(R)){M=[];for(var l=0;l<R.length;l++)M[l]=W(R[l]);return M}if(Object.prototype.toString.call(R)!=="[object Object]")return R;M={};for(var l in R)M[l]=W(R[l]);return M}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(p,m,Vn){m.last=function(M){return M[M.length-1]},m.stringReverse=function(M){return M.split("").reverse().join("")},m.stringRepeat=function(M,l){for(var u="";l>0;)l&1&&(u+=M),(l>>=1)&&(M+=M);return u};var W=/^\s\s*/,R=/\s\s*$/;m.stringTrimLeft=function(M){return M.replace(W,"")},m.stringTrimRight=function(M){return M.replace(R,"")},m.copyObject=function(M){var l={};for(var u in M)l[u]=M[u];return l},m.copyArray=function(M){for(var l=[],u=0,o=M.length;u<o;u++)M[u]&&typeof M[u]=="object"?l[u]=this.copyObject(M[u]):l[u]=M[u];return l},m.deepCopy=p("./deep_copy").deepCopy,m.arrayToMap=function(M){for(var l={},u=0;u<M.length;u++)l[M[u]]=1;return l},m.createMap=function(M){var l=Object.create(null);for(var u in M)l[u]=M[u];return l},m.arrayRemove=function(M,l){for(var u=0;u<=M.length;u++)l===M[u]&&M.splice(u,1)},m.escapeRegExp=function(M){return M.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},m.escapeHTML=function(M){return(""+M).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},m.getMatchOffsets=function(M,l){var u=[];return M.replace(l,function(o){u.push({offset:arguments[arguments.length-2],length:o.length})}),u},m.deferredCall=function(M){var l=null,u=function(){l=null,M()},o=function(i){return o.cancel(),l=setTimeout(u,i||0),o};return o.schedule=o,o.call=function(){return this.cancel(),M(),o},o.cancel=function(){return clearTimeout(l),l=null,o},o.isPending=function(){return l},o},m.delayedCall=function(M,l){var u=null,o=function(){u=null,M()},i=function(r){u==null&&(u=setTimeout(o,r||l))};return i.delay=function(r){u&&clearTimeout(u),u=setTimeout(o,r||l)},i.schedule=i,i.call=function(){this.cancel(),M()},i.cancel=function(){u&&clearTimeout(u),u=null},i.isPending=function(){return u},i},m.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},m.skipEmptyMatch=function(M,l,u){return u&&M.codePointAt(l)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(p,m,Vn){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 W=typeof navigator=="object"?navigator:{},R=(/mac|win|linux/i.exec(W.platform)||["other"])[0].toLowerCase(),M=W.userAgent||"",l=W.appName||"";m.isWin=R=="win",m.isMac=R=="mac",m.isLinux=R=="linux",m.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((M.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((M.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),m.isOldIE=m.isIE&&m.isIE<9,m.isGecko=m.isMozilla=M.match(/ Gecko\/\d+/),m.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",m.isWebKit=parseFloat(M.split("WebKit/")[1])||void 0,m.isChrome=parseFloat(M.split(" Chrome/")[1])||void 0,m.isSafari=parseFloat(M.split(" Safari/")[1])&&!m.isChrome||void 0,m.isEdge=parseFloat(M.split(" Edge/")[1])||void 0,m.isAIR=M.indexOf("AdobeAIR")>=0,m.isAndroid=M.indexOf("Android")>=0,m.isChromeOS=M.indexOf(" CrOS ")>=0,m.isIOS=/iPad|iPhone|iPod/.test(M)&&!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(p,m,Vn){var W=p("./useragent"),R="http://www.w3.org/1999/xhtml";m.buildDom=function r(t,e,n){if(typeof t=="string"&&t){var a=document.createTextNode(t);return e&&e.appendChild(a),a}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var d=[],f=0;f<t.length;f++){var oe=r(t[f],e,n);oe&&d.push(oe)}return d}var F=document.createElement(t[0]),_=t[1],S=1;_&&typeof _=="object"&&!Array.isArray(_)&&(S=2);for(var f=S;f<t.length;f++)r(t[f],F,n);return S==2&&Object.keys(_).forEach(function(xe){var He=_[xe];xe==="class"?F.className=Array.isArray(He)?He.join(" "):He:typeof He=="function"||xe=="value"||xe[0]=="$"?F[xe]=He:xe==="ref"?n&&(n[He]=F):xe==="style"?typeof He=="string"&&(F.style.cssText=He):He!=null&&F.setAttribute(xe,He)}),e&&e.appendChild(F),F},m.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},m.createElement=function(r,t){return document.createElementNS?document.createElementNS(t||R,r):document.createElement(r)},m.removeChildren=function(r){r.innerHTML=""},m.createTextNode=function(r,t){var e=t?t.ownerDocument:document;return e.createTextNode(r)},m.createFragment=function(r){var t=r?r.ownerDocument:document;return t.createDocumentFragment()},m.hasCssClass=function(r,t){var e=(r.className+"").split(/\s+/g);return e.indexOf(t)!==-1},m.addCssClass=function(r,t){m.hasCssClass(r,t)||(r.className+=" "+t)},m.removeCssClass=function(r,t){for(var e=r.className.split(/\s+/g);;){var n=e.indexOf(t);if(n==-1)break;e.splice(n,1)}r.className=e.join(" ")},m.toggleCssClass=function(r,t){for(var e=r.className.split(/\s+/g),n=!0;;){var a=e.indexOf(t);if(a==-1)break;n=!1,e.splice(a,1)}return n&&e.push(t),r.className=e.join(" "),n},m.setCssClass=function(r,t,e){e?m.addCssClass(r,t):m.removeCssClass(r,t)},m.hasCssString=function(r,t){var e=0,n;if(t=t||document,n=t.querySelectorAll("style")){for(;e<n.length;)if(n[e++].id===r)return!0}},m.removeElementById=function(r,t){t=t||document,t.getElementById(r)&&t.getElementById(r).remove()};var M,l=[];m.useStrictCSP=function(r){M=r,r==!1?u():l||(l=[])};function u(){var r=l;l=null,r&&r.forEach(function(t){o(t[0],t[1])})}function o(r,t,e){if(!(typeof document>"u")){if(l){if(e)u();else if(e===!1)return l.push([r,t])}if(!M){var n=e;!e||!e.getRootNode?n=document:(n=e.getRootNode(),(!n||n==e)&&(n=document));var a=n.ownerDocument||n;if(t&&m.hasCssString(t,n))return null;t&&(r+=`
3
+ /*# sourceURL=ace/css/`+t+" */");var d=m.createElement("style");d.appendChild(a.createTextNode(r)),t&&(d.id=t),n==a&&(n=m.getDocumentHead(a)),n.insertBefore(d,n.firstChild)}}}if(m.importCssString=o,m.importCssStylsheet=function(r,t){m.buildDom(["link",{rel:"stylesheet",href:r}],m.getDocumentHead(t))},m.scrollbarWidth=function(r){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"),n=e.style;n.position="absolute",n.left="-10000px",n.overflow="hidden",n.width="200px",n.minWidth="0px",n.height="150px",n.display="block",e.appendChild(t);var a=r&&r.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(e);var d=t.offsetWidth;n.overflow="scroll";var f=t.offsetWidth;return d===f&&(f=e.clientWidth),a.removeChild(e),d-f},m.computedStyle=function(r,t){return window.getComputedStyle(r,"")||{}},m.setStyle=function(r,t,e){r[t]!==e&&(r[t]=e)},m.HAS_CSS_ANIMATION=!1,m.HAS_CSS_TRANSFORMS=!1,m.HI_DPI=W.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,W.isChromeOS&&(m.HI_DPI=!1),typeof document<"u"){var i=document.createElement("div");m.HI_DPI&&i.style.transform!==void 0&&(m.HAS_CSS_TRANSFORMS=!0),!W.isEdge&&typeof i.style.animationName<"u"&&(m.HAS_CSS_ANIMATION=!0),i=null}m.HAS_CSS_TRANSFORMS?m.translate=function(r,t,e){r.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:m.translate=function(r,t,e){r.style.top=Math.round(e)+"px",r.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(p,m,Vn){/*
4
+ * based on code from:
5
+ *
6
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
7
+ * Available via the MIT or new BSD license.
8
+ * see: http://github.com/jrburke/requirejs for details
9
+ */var W=p("./dom");m.get=function(R,M){var l=new XMLHttpRequest;l.open("GET",R,!0),l.onreadystatechange=function(){l.readyState===4&&M(l.responseText)},l.send(null)},m.loadScript=function(R,M){var l=W.getDocumentHead(),u=document.createElement("script");u.src=R,l.appendChild(u),u.onload=u.onreadystatechange=function(o,i){(i||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,i||M())}},m.qualifyURL=function(R){var M=document.createElement("a");return M.href=R,M.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(p,m,Vn){m.inherits=function(W,R){W.super_=R,W.prototype=Object.create(R.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}})},m.mixin=function(W,R){for(var M in R)W[M]=R[M];return W},m.implement=function(W,R){m.mixin(W,R)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(p,m,Vn){var W={},R=function(){this.propagationStopped=!0},M=function(){this.defaultPrevented=!0};W._emit=W._dispatchEvent=function(l,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[l]||[],i=this._defaultHandlers[l];if(!(!o.length&&!i)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=l),u.stopPropagation||(u.stopPropagation=R),u.preventDefault||(u.preventDefault=M),o=o.slice();for(var r=0;r<o.length&&(o[r](u,this),!u.propagationStopped);r++);if(i&&!u.defaultPrevented)return i(u,this)}},W._signal=function(l,u){var o=(this._eventRegistry||{})[l];if(o){o=o.slice();for(var i=0;i<o.length;i++)o[i](u,this)}},W.once=function(l,u){var o=this;if(this.on(l,function i(){o.off(l,i),u.apply(null,arguments)}),!u)return new Promise(function(i){u=i})},W.setDefaultHandler=function(l,u){var o=this._defaultHandlers;if(o||(o=this._defaultHandlers={_disabled_:{}}),o[l]){var i=o[l],r=o._disabled_[l];r||(o._disabled_[l]=r=[]),r.push(i);var t=r.indexOf(u);t!=-1&&r.splice(t,1)}o[l]=u},W.removeDefaultHandler=function(l,u){var o=this._defaultHandlers;if(o){var i=o._disabled_[l];if(o[l]==u)i&&this.setDefaultHandler(l,i.pop());else if(i){var r=i.indexOf(u);r!=-1&&i.splice(r,1)}}},W.on=W.addEventListener=function(l,u,o){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[l];return i||(i=this._eventRegistry[l]=[]),i.indexOf(u)==-1&&i[o?"unshift":"push"](u),u},W.off=W.removeListener=W.removeEventListener=function(l,u){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[l];if(o){var i=o.indexOf(u);i!==-1&&o.splice(i,1)}},W.removeAllListeners=function(l){l||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[l]=void 0),this._defaultHandlers&&(this._defaultHandlers[l]=void 0)},m.EventEmitter=W}),ace.define("ace/lib/report_error",["require","exports","module"],function(p,m,Vn){m.reportError=function(R,M){var l=new Error(R);l.data=M,typeof console=="object"&&console.error&&console.error(l),setTimeout(function(){throw l})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(p,m,Vn){var W={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions"};m.defaultEnglishMessages=W}),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(p,m,Vn){"no use strict";var W=p("./oop"),R=p("./event_emitter").EventEmitter,M=p("./report_error").reportError,l=p("./default_english_messages").defaultEnglishMessages,u={setOptions:function(e){Object.keys(e).forEach(function(n){this.setOption(n,e[n])},this)},getOptions:function(e){var n={};if(e)Array.isArray(e)||(n=e,e=Object.keys(n));else{var a=this.$options;e=Object.keys(a).filter(function(d){return!a[d].hidden})}return e.forEach(function(d){n[d]=this.getOption(d)},this),n},setOption:function(e,n){if(this["$"+e]!==n){var a=this.$options[e];if(!a)return o('misspelled option "'+e+'"');if(a.forwardTo)return this[a.forwardTo]&&this[a.forwardTo].setOption(e,n);a.handlesSet||(this["$"+e]=n),a&&a.set&&a.set.call(this,n)}},getOption:function(e){var n=this.$options[e];return n?n.forwardTo?this[n.forwardTo]&&this[n.forwardTo].getOption(e):n&&n.get?n.get.call(this):this["$"+e]:o('misspelled option "'+e+'"')}};function o(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var i,r,t=function(){function e(){this.$defaultOptions={},i=l,r="dollarSigns"}return e.prototype.defineOptions=function(n,a,d){return n.$options||(this.$defaultOptions[a]=n.$options={}),Object.keys(d).forEach(function(f){var oe=d[f];typeof oe=="string"&&(oe={forwardTo:oe}),oe.name||(oe.name=f),n.$options[oe.name]=oe,"initialValue"in oe&&(n["$"+oe.name]=oe.initialValue)}),W.implement(n,u),this},e.prototype.resetOptions=function(n){Object.keys(n.$options).forEach(function(a){var d=n.$options[a];"value"in d&&n.setOption(a,d.value)})},e.prototype.setDefaultValue=function(n,a,d){if(!n){for(n in this.$defaultOptions)if(this.$defaultOptions[n][a])break;if(!this.$defaultOptions[n][a])return!1}var f=this.$defaultOptions[n]||(this.$defaultOptions[n]={});f[a]&&(f.forwardTo?this.setDefaultValue(f.forwardTo,a,d):f[a].value=d)},e.prototype.setDefaultValues=function(n,a){Object.keys(a).forEach(function(d){this.setDefaultValue(n,d,a[d])},this)},e.prototype.setMessages=function(n,a){i=n,a&&a.placeholders&&(r=a.placeholders)},e.prototype.nls=function(n,a,d){i[n]||(o("No message found for the key '"+n+"' in messages with id "+i.$id+", trying to find a translation for the default string '"+a+"'."),i[a]||o("No message found for the default string '"+a+"' in the provided messages. Falling back to the default English message."));var f=i[n]||i[a]||a;return d&&(r==="dollarSigns"&&(f=f.replace(/\$(\$|[\d]+)/g,function(oe,F){return F=="$"?"$":d[F]})),r==="curlyBrackets"&&(f=f.replace(/\{([^\}]+)\}/g,function(oe,F){return d[F]}))),f},e}();t.prototype.warn=o,t.prototype.reportError=M,W.implement(t.prototype,R),m.AppConfig=t}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(p,m,Vn){Vn.exports=`.ace-tm .ace_gutter {
10
+ background: #f0f0f0;
11
+ color: #333;
12
+ }
13
+
14
+ .ace-tm .ace_print-margin {
15
+ width: 1px;
16
+ background: #e8e8e8;
17
+ }
18
+
19
+ .ace-tm .ace_fold {
20
+ background-color: #6B72E6;
21
+ }
22
+
23
+ .ace-tm {
24
+ background-color: #FFFFFF;
25
+ color: black;
26
+ }
27
+
28
+ .ace-tm .ace_cursor {
29
+ color: black;
30
+ }
31
+
32
+ .ace-tm .ace_invisible {
33
+ color: rgb(191, 191, 191);
34
+ }
35
+
36
+ .ace-tm .ace_storage,
37
+ .ace-tm .ace_keyword {
38
+ color: blue;
39
+ }
40
+
41
+ .ace-tm .ace_constant {
42
+ color: rgb(197, 6, 11);
43
+ }
44
+
45
+ .ace-tm .ace_constant.ace_buildin {
46
+ color: rgb(88, 72, 246);
47
+ }
48
+
49
+ .ace-tm .ace_constant.ace_language {
50
+ color: rgb(88, 92, 246);
51
+ }
52
+
53
+ .ace-tm .ace_constant.ace_library {
54
+ color: rgb(6, 150, 14);
55
+ }
56
+
57
+ .ace-tm .ace_invalid {
58
+ background-color: rgba(255, 0, 0, 0.1);
59
+ color: red;
60
+ }
61
+
62
+ .ace-tm .ace_support.ace_function {
63
+ color: rgb(60, 76, 114);
64
+ }
65
+
66
+ .ace-tm .ace_support.ace_constant {
67
+ color: rgb(6, 150, 14);
68
+ }
69
+
70
+ .ace-tm .ace_support.ace_type,
71
+ .ace-tm .ace_support.ace_class {
72
+ color: rgb(109, 121, 222);
73
+ }
74
+
75
+ .ace-tm .ace_keyword.ace_operator {
76
+ color: rgb(104, 118, 135);
77
+ }
78
+
79
+ .ace-tm .ace_string {
80
+ color: rgb(3, 106, 7);
81
+ }
82
+
83
+ .ace-tm .ace_comment {
84
+ color: rgb(76, 136, 107);
85
+ }
86
+
87
+ .ace-tm .ace_comment.ace_doc {
88
+ color: rgb(0, 102, 255);
89
+ }
90
+
91
+ .ace-tm .ace_comment.ace_doc.ace_tag {
92
+ color: rgb(128, 159, 191);
93
+ }
94
+
95
+ .ace-tm .ace_constant.ace_numeric {
96
+ color: rgb(0, 0, 205);
97
+ }
98
+
99
+ .ace-tm .ace_variable {
100
+ color: rgb(49, 132, 149);
101
+ }
102
+
103
+ .ace-tm .ace_xml-pe {
104
+ color: rgb(104, 104, 91);
105
+ }
106
+
107
+ .ace-tm .ace_entity.ace_name.ace_function {
108
+ color: #0000A2;
109
+ }
110
+
111
+
112
+ .ace-tm .ace_heading {
113
+ color: rgb(12, 7, 255);
114
+ }
115
+
116
+ .ace-tm .ace_list {
117
+ color:rgb(185, 6, 144);
118
+ }
119
+
120
+ .ace-tm .ace_meta.ace_tag {
121
+ color:rgb(0, 22, 142);
122
+ }
123
+
124
+ .ace-tm .ace_string.ace_regex {
125
+ color: rgb(255, 0, 0)
126
+ }
127
+
128
+ .ace-tm .ace_marker-layer .ace_selection {
129
+ background: rgb(181, 213, 255);
130
+ }
131
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
132
+ box-shadow: 0 0 3px 0px white;
133
+ }
134
+ .ace-tm .ace_marker-layer .ace_step {
135
+ background: rgb(252, 255, 0);
136
+ }
137
+
138
+ .ace-tm .ace_marker-layer .ace_stack {
139
+ background: rgb(164, 229, 101);
140
+ }
141
+
142
+ .ace-tm .ace_marker-layer .ace_bracket {
143
+ margin: -1px 0 0 -1px;
144
+ border: 1px solid rgb(192, 192, 192);
145
+ }
146
+
147
+ .ace-tm .ace_marker-layer .ace_active-line {
148
+ background: rgba(0, 0, 0, 0.07);
149
+ }
150
+
151
+ .ace-tm .ace_gutter-active-line {
152
+ background-color : #dcdcdc;
153
+ }
154
+
155
+ .ace-tm .ace_marker-layer .ace_selected-word {
156
+ background: rgb(250, 250, 255);
157
+ border: 1px solid rgb(200, 200, 250);
158
+ }
159
+
160
+ .ace-tm .ace_indent-guide {
161
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
162
+ }
163
+
164
+ .ace-tm .ace_indent-guide-active {
165
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
166
+ }
167
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(p,m,Vn){m.isDark=!1,m.cssClass="ace-tm",m.cssText=p("./textmate-css"),m.$id="ace/theme/textmate";var W=p("../lib/dom");W.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(p,m,Vn){"no use strict";var W=p("./lib/lang"),R=p("./lib/net"),M=p("./lib/dom"),l=p("./lib/app_config").AppConfig;Vn.exports=m=new l;var u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};m.get=function(t){if(!u.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return u[t]},m.set=function(t,e){if(u.hasOwnProperty(t))u[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&M.useStrictCSP(e)},m.all=function(){return W.copyObject(u)},m.$modes={},m.moduleUrl=function(t,e){if(u.$moduleUrls[t])return u.$moduleUrls[t];var n=t.split("/");e=e||n[n.length-2]||"";var a=e=="snippets"?"/":"-",d=n[n.length-1];if(e=="worker"&&a=="-"){var f=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");d=d.replace(f,"")}(!d||d==e)&&n.length>1&&(d=n[n.length-2]);var oe=u[e+"Path"];return oe==null?oe=u.basePath:a=="/"&&(e=a=""),oe&&oe.slice(-1)!="/"&&(oe+="/"),oe+e+a+d+this.get("suffix")},m.setModuleUrl=function(t,e){return u.$moduleUrls[t]=e};var o=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,p("./theme/textmate"));if(i)return i(t,e);console.error("loader is not configured")},i;m.setLoader=function(t){i=t},m.dynamicModules=Object.create(null),m.$loading={},m.$loaded={},m.loadModule=function(t,e){var n;if(Array.isArray(t))var a=t[0],d=t[1];else if(typeof t=="string")var d=t;var f=function(oe){if(oe&&!m.$loading[d])return e&&e(oe);if(m.$loading[d]||(m.$loading[d]=[]),m.$loading[d].push(e),!(m.$loading[d].length>1)){var F=function(){o(d,function(_,S){S&&(m.$loaded[d]=S),m._emit("load.module",{name:d,module:S});var xe=m.$loading[d];m.$loading[d]=null,xe.forEach(function(He){He&&He(S)})})};if(!m.get("packaged"))return F();R.loadScript(m.moduleUrl(d,a),F),r()}};if(m.dynamicModules[d])m.dynamicModules[d]().then(function(oe){oe.default?f(oe.default):f(oe)});else{try{n=this.$require(d)}catch{}f(n||m.$loaded[d])}},m.$require=function(t){if(typeof Vn.require=="function"){var e="require";return Vn[e](t)}},m.setModuleLoader=function(t,e){m.dynamicModules[t]=e};var r=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$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"),r=function(){})};m.version="1.37.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(p,m,Vn){p("./lib/fixoldbrowsers");var W=p("./config");W.setLoader(function(u,o){p([u],function(i){o(null,i)})});var R=function(){return this||typeof window<"u"&&window}();Vn.exports=function(u){W.init=M,W.$require=p,u.require=p},M(!0);function M(u){if(!(!R||!R.document)){W.set("packaged",u||p.packaged||Vn.packaged||R.define&&(void 0).packaged);var o={},i="",r=document.currentScript||document._currentScript,t=r&&r.ownerDocument||document;r&&r.src&&(i=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),n=0;n<e.length;n++){var a=e[n],d=a.src||a.getAttribute("src");if(d){for(var f=a.attributes,oe=0,F=f.length;oe<F;oe++){var _=f[oe];_.name.indexOf("data-ace-")===0&&(o[l(_.name.replace(/^data-ace-/,""))]=_.value)}var S=d.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);S&&(i=S[1])}}i&&(o.base=o.base||i,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var xe in o)typeof o[xe]<"u"&&W.set(xe,o[xe])}}function l(u){return u.replace(/-(.)/g,function(o,i){return i.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(p,m,Vn){var W=function(){function R(M,l,u,o){this.start={row:M,column:l},this.end={row:u,column:o}}return R.prototype.isEqual=function(M){return this.start.row===M.start.row&&this.end.row===M.end.row&&this.start.column===M.start.column&&this.end.column===M.end.column},R.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},R.prototype.contains=function(M,l){return this.compare(M,l)==0},R.prototype.compareRange=function(M){var l,u=M.end,o=M.start;return l=this.compare(u.row,u.column),l==1?(l=this.compare(o.row,o.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(o.row,o.column),l==-1?-1:l==1?42:0)},R.prototype.comparePoint=function(M){return this.compare(M.row,M.column)},R.prototype.containsRange=function(M){return this.comparePoint(M.start)==0&&this.comparePoint(M.end)==0},R.prototype.intersects=function(M){var l=this.compareRange(M);return l==-1||l==0||l==1},R.prototype.isEnd=function(M,l){return this.end.row==M&&this.end.column==l},R.prototype.isStart=function(M,l){return this.start.row==M&&this.start.column==l},R.prototype.setStart=function(M,l){typeof M=="object"?(this.start.column=M.column,this.start.row=M.row):(this.start.row=M,this.start.column=l)},R.prototype.setEnd=function(M,l){typeof M=="object"?(this.end.column=M.column,this.end.row=M.row):(this.end.row=M,this.end.column=l)},R.prototype.inside=function(M,l){return this.compare(M,l)==0?!(this.isEnd(M,l)||this.isStart(M,l)):!1},R.prototype.insideStart=function(M,l){return this.compare(M,l)==0?!this.isEnd(M,l):!1},R.prototype.insideEnd=function(M,l){return this.compare(M,l)==0?!this.isStart(M,l):!1},R.prototype.compare=function(M,l){return!this.isMultiLine()&&M===this.start.row?l<this.start.column?-1:l>this.end.column?1:0:M<this.start.row?-1:M>this.end.row?1:this.start.row===M?l>=this.start.column?0:-1:this.end.row===M?l<=this.end.column?0:1:0},R.prototype.compareStart=function(M,l){return this.start.row==M&&this.start.column==l?-1:this.compare(M,l)},R.prototype.compareEnd=function(M,l){return this.end.row==M&&this.end.column==l?1:this.compare(M,l)},R.prototype.compareInside=function(M,l){return this.end.row==M&&this.end.column==l?1:this.start.row==M&&this.start.column==l?-1:this.compare(M,l)},R.prototype.clipRows=function(M,l){if(this.end.row>l)var u={row:l+1,column:0};else if(this.end.row<M)var u={row:M,column:0};if(this.start.row>l)var o={row:l+1,column:0};else if(this.start.row<M)var o={row:M,column:0};return R.fromPoints(o||this.start,u||this.end)},R.prototype.extend=function(M,l){var u=this.compare(M,l);if(u==0)return this;if(u==-1)var o={row:M,column:l};else var i={row:M,column:l};return R.fromPoints(o||this.start,i||this.end)},R.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},R.prototype.isMultiLine=function(){return this.start.row!==this.end.row},R.prototype.clone=function(){return R.fromPoints(this.start,this.end)},R.prototype.collapseRows=function(){return this.end.column==0?new R(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new R(this.start.row,0,this.end.row,0)},R.prototype.toScreenRange=function(M){var l=M.documentToScreenPosition(this.start),u=M.documentToScreenPosition(this.end);return new R(l.row,l.column,u.row,u.column)},R.prototype.moveBy=function(M,l){this.start.row+=M,this.start.column+=l,this.end.row+=M,this.end.column+=l},R}();W.fromPoints=function(R,M){return new W(R.row,R.column,M.row,M.column)},W.comparePoints=function(R,M){return R.row-M.row||R.column-M.column},m.Range=W}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(p,m,Vn){for(var W=p("./oop"),R={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:"*"}},M={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},l=0;l<10;l++)M["Digit"+l]=48+l,M["Numpad"+l]=96+l,R.PRINTABLE_KEYS[48+l]=""+l,R.FUNCTION_KEYS[96+l]="Numpad"+l;for(var l=65;l<91;l++){var u=String.fromCharCode(l+32);M["Key"+u.toUpperCase()]=l,R.PRINTABLE_KEYS[l]=u}for(var l=1;l<13;l++)M["F"+l]=111+l,R.FUNCTION_KEYS[111+l]="F"+l;var o={Shift:16,Control:17,Alt:18,Meta:224};for(var i in o)M[i]=M[i+"Left"]=M[i+"Right"]=o[i];m.$codeToKeyCode=M,R.PRINTABLE_KEYS[173]="-";for(var r in R.FUNCTION_KEYS){var t=R.FUNCTION_KEYS[r].toLowerCase();R[t]=parseInt(r,10)}for(var r in R.PRINTABLE_KEYS){var t=R.PRINTABLE_KEYS[r].toLowerCase();R[t]=parseInt(r,10)}W.mixin(R,R.MODIFIER_KEYS),W.mixin(R,R.PRINTABLE_KEYS),W.mixin(R,R.FUNCTION_KEYS),R.enter=R.return,R.escape=R.esc,R.del=R.delete,function(){for(var e=["cmd","ctrl","alt","shift"],n=Math.pow(2,e.length);n--;)R.KEY_MODS[n]=e.filter(function(a){return n&R.KEY_MODS[a]}).join("-")+"-"}(),R.KEY_MODS[0]="",R.KEY_MODS[-1]="input-",W.mixin(m,R),m.default=m,m.keyCodeToString=function(e){var n=R[e];return typeof n!="string"&&(n=String.fromCharCode(e)),n.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(p,m,Vn){var W=p("./keys"),R=p("./useragent"),M=null,l=0,u;function o(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return u={passive:!1},!0}})}catch{}}function i(){return u==null&&o(),u}function r(oe,F,_){this.elem=oe,this.type=F,this.callback=_}r.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=m.addListener=function(oe,F,_,S){oe.addEventListener(F,_,i()),S&&S.$toDestroy.push(new r(oe,F,_))},e=m.removeListener=function(oe,F,_){oe.removeEventListener(F,_,i())};m.stopEvent=function(oe){return m.stopPropagation(oe),m.preventDefault(oe),!1},m.stopPropagation=function(oe){oe.stopPropagation&&oe.stopPropagation()},m.preventDefault=function(oe){oe.preventDefault&&oe.preventDefault()},m.getButton=function(oe){return oe.type=="dblclick"?0:oe.type=="contextmenu"||R.isMac&&oe.ctrlKey&&!oe.altKey&&!oe.shiftKey?2:oe.button},m.capture=function(oe,F,_){var S=oe&&oe.ownerDocument||document;function xe(He){F&&F(He),_&&_(He),e(S,"mousemove",F),e(S,"mouseup",xe),e(S,"dragstart",xe)}return t(S,"mousemove",F),t(S,"mouseup",xe),t(S,"dragstart",xe),xe},m.addMouseWheelListener=function(oe,F,_){t(oe,"wheel",function(S){var xe=.15,He=S.deltaX||0,Ae=S.deltaY||0;switch(S.deltaMode){case S.DOM_DELTA_PIXEL:S.wheelX=He*xe,S.wheelY=Ae*xe;break;case S.DOM_DELTA_LINE:var J=15;S.wheelX=He*J,S.wheelY=Ae*J;break;case S.DOM_DELTA_PAGE:var Kn=150;S.wheelX=He*Kn,S.wheelY=Ae*Kn;break}F(S)},_)},m.addMultiMouseDownListener=function(oe,F,_,S,xe){var He=0,Ae,J,Kn,y={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(w){if(m.getButton(w)!==0?He=0:w.detail>1?(He++,He>4&&(He=1)):He=1,R.isIE){var Q=Math.abs(w.clientX-Ae)>5||Math.abs(w.clientY-J)>5;(!Kn||Q)&&(He=1),Kn&&clearTimeout(Kn),Kn=setTimeout(function(){Kn=null},F[He-1]||600),He==1&&(Ae=w.clientX,J=w.clientY)}if(w._clicks=He,_[S]("mousedown",w),He>4)He=0;else if(He>1)return _[S](y[He],w)}Array.isArray(oe)||(oe=[oe]),oe.forEach(function(w){t(w,"mousedown",h,xe)})};function n(oe){return 0|(oe.ctrlKey?1:0)|(oe.altKey?2:0)|(oe.shiftKey?4:0)|(oe.metaKey?8:0)}m.getModifierString=function(oe){return W.KEY_MODS[n(oe)]};function a(oe,F,_){var S=n(F);if(!_&&F.code&&(_=W.$codeToKeyCode[F.code]||_),!R.isMac&&M){if(F.getModifierState&&(F.getModifierState("OS")||F.getModifierState("Win"))&&(S|=8),M.altGr)if((3&S)!=3)M.altGr=0;else return;if(_===18||_===17){var xe=F.location;if(_===17&&xe===1)M[_]==1&&(l=F.timeStamp);else if(_===18&&S===3&&xe===2){var He=F.timeStamp-l;He<50&&(M.altGr=!0)}}}if(_ in W.MODIFIER_KEYS&&(_=-1),!(!S&&_===13&&F.location===3&&(oe(F,S,-_),F.defaultPrevented))){if(R.isChromeOS&&S&8){if(oe(F,S,_),F.defaultPrevented)return;S&=-9}return!S&&!(_ in W.FUNCTION_KEYS)&&!(_ in W.PRINTABLE_KEYS)?!1:oe(F,S,_)}}m.addCommandKeyListener=function(oe,F,_){var S=null;t(oe,"keydown",function(xe){M[xe.keyCode]=(M[xe.keyCode]||0)+1;var He=a(F,xe,xe.keyCode);return S=xe.defaultPrevented,He},_),t(oe,"keypress",function(xe){S&&(xe.ctrlKey||xe.altKey||xe.shiftKey||xe.metaKey)&&(m.stopEvent(xe),S=null)},_),t(oe,"keyup",function(xe){M[xe.keyCode]=null},_),M||(d(),t(window,"focus",d))};function d(){M=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!R.isOldIE){var f=1;m.nextTick=function(oe,F){F=F||window;var _="zero-timeout-message-"+f++,S=function(xe){xe.data==_&&(m.stopPropagation(xe),e(F,"message",S),oe())};t(F,"message",S),F.postMessage(_,"*")}}m.$idleBlocked=!1,m.onIdle=function(oe,F){return setTimeout(function _(){m.$idleBlocked?setTimeout(_,100):oe()},F)},m.$idleBlockId=null,m.blockIdle=function(oe){m.$idleBlockId&&clearTimeout(m.$idleBlockId),m.$idleBlocked=!0,m.$idleBlockId=setTimeout(function(){m.$idleBlocked=!1},oe||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(oe){setTimeout(oe,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(p,m,Vn){var W;Vn.exports={lineMode:!1,pasteCancelled:function(){return W&&W>Date.now()-50?!0:W=!1},cancel:function(){W=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(p,m,Vn){var W=p("../lib/event"),R=p("../config").nls,M=p("../lib/useragent"),l=p("../lib/dom"),u=p("../lib/lang"),o=p("../clipboard"),i=M.isChrome<18,r=M.isIE,t=M.isChrome>63,e=400,n=p("../lib/keys"),a=n.KEY_MODS,d=M.isIOS,f=d?/\s/:/\n/,oe=M.isMobile,F;F=function(_,S){var xe=l.createElement("textarea");xe.className="ace_text-input",xe.setAttribute("wrap","off"),xe.setAttribute("autocorrect","off"),xe.setAttribute("autocapitalize","off"),xe.setAttribute("spellcheck","false"),xe.style.opacity="0",_.insertBefore(xe,_.firstChild);var He=!1,Ae=!1,J=!1,Kn=!1,y="";oe||(xe.style.fontSize="1px");var h=!1,w=!1,Q="",Me=0,Gn=0,Yn=0,Qn=Number.MAX_SAFE_INTEGER,Zn=Number.MIN_SAFE_INTEGER,Jn=0;try{var ii=document.activeElement===xe}catch{}this.setNumberOfExtraLines=function(ri){if(Qn=Number.MAX_SAFE_INTEGER,Zn=Number.MIN_SAFE_INTEGER,ri<0){Jn=0;return}Jn=ri},this.setAriaLabel=function(){var ri="";if(S.$textInputAriaLabel&&(ri+="".concat(S.$textInputAriaLabel,", ")),S.session){var ci=S.session.selection.cursor.row;ri+=R("text-input.aria-label","Cursor at row $0",[ci+1])}xe.setAttribute("aria-label",ri)},this.setAriaOptions=function(ri){ri.activeDescendant?(xe.setAttribute("aria-haspopup","true"),xe.setAttribute("aria-autocomplete",ri.inline?"both":"list"),xe.setAttribute("aria-activedescendant",ri.activeDescendant)):(xe.setAttribute("aria-haspopup","false"),xe.setAttribute("aria-autocomplete","both"),xe.removeAttribute("aria-activedescendant")),ri.role&&xe.setAttribute("role",ri.role),ri.setLabel&&(xe.setAttribute("aria-roledescription",R("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),W.addListener(xe,"blur",function(ri){w||(S.onBlur(ri),ii=!1)},S),W.addListener(xe,"focus",function(ri){if(!w){if(ii=!0,M.isEdge)try{if(!document.hasFocus())return}catch{}S.onFocus(ri),M.isEdge?setTimeout(ei):ei()}},S),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:S.renderer.enableKeyboardAccessibility}),y||t||this.$focusScroll=="browser")return xe.focus({preventScroll:!0});var ri=xe.style.top;xe.style.position="fixed",xe.style.top="0px";try{var ci=xe.getBoundingClientRect().top!=0}catch{return}var ui=[];if(ci)for(var di=xe.parentElement;di&&di.nodeType==1;)ui.push(di),di.setAttribute("ace_nocontext","true"),!di.parentElement&&di.getRootNode?di=di.getRootNode().host:di=di.parentElement;xe.focus({preventScroll:!0}),ci&&ui.forEach(function(fi){fi.removeAttribute("ace_nocontext")}),setTimeout(function(){xe.style.position="",xe.style.top=="0px"&&(xe.style.top=ri)},0)},this.blur=function(){xe.blur()},this.isFocused=function(){return ii},S.on("beforeEndOperation",function(){var ri=S.curOp,ci=ri&&ri.command&&ri.command.name;if(ci!="insertstring"){var ui=ci&&(ri.docChanged||ri.selectionChanged);J&&ui&&(Q=xe.value="",Ai()),ei()}}),S.on("changeSelection",this.setAriaLabel);var Xn=function(ri,ci){for(var ui=ci,di=1;di<=ri-Qn&&di<2*Jn+1;di++)ui+=S.session.getLine(ri-di).length+1;return ui},ei=d?function(ri){if(!(!ii||He&&!ri||Kn)){ri||(ri="");var ci=`
168
+ ab`+ri+`cde fg
169
+ `;ci!=xe.value&&(xe.value=Q=ci);var ui=4,di=4+(ri.length||(S.selection.isEmpty()?0:1));(Me!=ui||Gn!=di)&&xe.setSelectionRange(ui,di),Me=ui,Gn=di}}:function(){if(!(J||Kn)&&!(!ii&&!ai)){J=!0;var ri=0,ci=0,ui="";if(S.session){var di=S.selection,fi=di.getRange(),yi=di.cursor.row;yi===Zn+1?(Qn=Zn+1,Zn=Qn+2*Jn):yi===Qn-1?(Zn=Qn-1,Qn=Zn-2*Jn):(yi<Qn-1||yi>Zn+1)&&(Qn=yi>Jn?yi-Jn:0,Zn=yi>Jn?yi+Jn:2*Jn);for(var bi=[],wi=Qn;wi<=Zn;wi++)bi.push(S.session.getLine(wi));if(ui=bi.join(`
170
+ `),ri=Xn(fi.start.row,fi.start.column),ci=Xn(fi.end.row,fi.end.column),fi.start.row<Qn){var vi=S.session.getLine(Qn-1);ri=fi.start.row<Qn-1?0:ri,ci+=vi.length+1,ui=vi+`
171
+ `+ui}else if(fi.end.row>Zn){var gi=S.session.getLine(Zn+1);ci=fi.end.row>Zn+1?gi.length:fi.end.column,ci+=ui.length+1,ui=ui+`
172
+ `+gi}else oe&&yi>0&&(ui=`
173
+ `+ui,ci+=1,ri+=1);ui.length>e&&(ri<e&&ci<e?ui=ui.slice(0,e):(ui=`
174
+ `,ri==ci?ri=ci=0:(ri=0,ci=1)));var Si=ui+`
175
+
176
+ `;Si!=Q&&(xe.value=Q=Si,Me=Gn=Si.length)}if(ai&&(Me=xe.selectionStart,Gn=xe.selectionEnd),Gn!=ci||Me!=ri||xe.selectionEnd!=Gn)try{xe.setSelectionRange(ri,ci),Me=ri,Gn=ci}catch{}J=!1}};this.resetSelection=ei,ii&&S.onFocus();var ni=function(ri){return ri.selectionStart===0&&ri.selectionEnd>=Q.length&&ri.value===Q&&Q&&ri.selectionEnd!==Gn},ti=function(ri){J||(He?He=!1:ni(xe)?(S.selectAll(),ei()):oe&&xe.selectionStart!=Me&&ei())},oi=null;this.setInputHandler=function(ri){oi=ri},this.getInputHandler=function(){return oi};var ai=!1,li=function(ri,ci){if(ai&&(ai=!1),Ae)return ei(),ri&&S.onPaste(ri),Ae=!1,"";for(var ui=xe.selectionStart,di=xe.selectionEnd,fi=Me,yi=Q.length-Gn,bi=ri,wi=ri.length-ui,vi=ri.length-di,gi=0;fi>0&&Q[gi]==ri[gi];)gi++,fi--;for(bi=bi.slice(gi),gi=1;yi>0&&Q.length-gi>Me-1&&Q[Q.length-gi]==ri[ri.length-gi];)gi++,yi--;wi-=gi-1,vi-=gi-1;var Si=bi.length-gi+1;if(Si<0&&(fi=-Si,Si=0),bi=bi.slice(0,Si),!ci&&!bi&&!wi&&!fi&&!yi&&!vi)return"";Kn=!0;var ki=!1;return M.isAndroid&&bi==". "&&(bi=" ",ki=!0),bi&&!fi&&!yi&&!wi&&!vi||h?S.onTextInput(bi):S.onTextInput(bi,{extendLeft:fi,extendRight:yi,restoreStart:wi,restoreEnd:vi}),Kn=!1,Q=ri,Me=ui,Gn=di,Yn=vi,ki?`
177
+ `:bi},si=function(ri){if(J)return xi();if(ri&&ri.inputType){if(ri.inputType=="historyUndo")return S.execCommand("undo");if(ri.inputType=="historyRedo")return S.execCommand("redo")}var ci=xe.value,ui=li(ci,!0);(ci.length>e+100||f.test(ui)||oe&&Me<1&&Me==Gn)&&ei()},hi=function(ri,ci,ui){var di=ri.clipboardData||window.clipboardData;if(!(!di||i)){var fi=r||ui?"Text":"text/plain";try{return ci?di.setData(fi,ci)!==!1:di.getData(fi)}catch(yi){if(!ui)return hi(yi,ci,!0)}}},pi=function(ri,ci){var ui=S.getCopyText();if(!ui)return W.preventDefault(ri);hi(ri,ui)?(d&&(ei(ui),He=ui,setTimeout(function(){He=!1},10)),ci?S.onCut():S.onCopy(),W.preventDefault(ri)):(He=!0,xe.value=ui,xe.select(),setTimeout(function(){He=!1,ei(),ci?S.onCut():S.onCopy()}))},$i=function(ri){pi(ri,!0)},Ci=function(ri){pi(ri,!1)},mi=function(ri){var ci=hi(ri);o.pasteCancelled()||(typeof ci=="string"?(ci&&S.onPaste(ci,ri),M.isIE&&setTimeout(ei),W.preventDefault(ri)):(xe.value="",Ae=!0))};W.addCommandKeyListener(xe,function(ri,ci,ui){if(!J)return S.onCommandKey(ri,ci,ui)},S),W.addListener(xe,"select",ti,S),W.addListener(xe,"input",si,S),W.addListener(xe,"cut",$i,S),W.addListener(xe,"copy",Ci,S),W.addListener(xe,"paste",mi,S),(!("oncut"in xe)||!("oncopy"in xe)||!("onpaste"in xe))&&W.addListener(_,"keydown",function(ri){if(!(M.isMac&&!ri.metaKey||!ri.ctrlKey))switch(ri.keyCode){case 67:Ci(ri);break;case 86:mi(ri);break;case 88:$i(ri);break}},S);var _i=function(ri){if(!(J||!S.onCompositionStart||S.$readOnly)&&(J={},!h)){ri.data&&(J.useTextareaForIME=!1),setTimeout(xi,0),S._signal("compositionStart"),S.on("mousedown",Ti);var ci=S.getSelectionRange();ci.end.row=ci.start.row,ci.end.column=ci.start.column,J.markerRange=ci,J.selectionStart=Me,S.onCompositionStart(J),J.useTextareaForIME?(Q=xe.value="",Me=0,Gn=0):(xe.msGetInputContext&&(J.context=xe.msGetInputContext()),xe.getInputContext&&(J.context=xe.getInputContext()))}},xi=function(){if(!(!J||!S.onCompositionUpdate||S.$readOnly)){if(h)return Ti();if(J.useTextareaForIME)S.onCompositionUpdate(xe.value);else{var ri=xe.value;li(ri),J.markerRange&&(J.context&&(J.markerRange.start.column=J.selectionStart=J.context.compositionStartOffset),J.markerRange.end.column=J.markerRange.start.column+Gn-J.selectionStart+Yn)}}},Ai=function(ri){!S.onCompositionEnd||S.$readOnly||(J=!1,S.onCompositionEnd(),S.off("mousedown",Ti),ri&&si())};function Ti(){w=!0,xe.blur(),xe.focus(),w=!1}var Ri=u.delayedCall(xi,50).schedule.bind(null,null);function Ni(ri){ri.keyCode==27&&xe.value.length<xe.selectionStart&&(J||(Q=xe.value),Me=Gn=-1,ei()),Ri()}W.addListener(xe,"compositionstart",_i,S),W.addListener(xe,"compositionupdate",xi,S),W.addListener(xe,"keyup",Ni,S),W.addListener(xe,"keydown",Ri,S),W.addListener(xe,"compositionend",Ai,S),this.getElement=function(){return xe},this.setCommandMode=function(ri){h=ri,xe.readOnly=!1},this.setReadOnly=function(ri){h||(xe.readOnly=ri)},this.setCopyWithEmptySelection=function(ri){},this.onContextMenu=function(ri){ai=!0,ei(),S._emit("nativecontextmenu",{target:S,domEvent:ri}),this.moveToMouse(ri,!0)},this.moveToMouse=function(ri,ci){y||(y=xe.style.cssText),xe.style.cssText=(ci?"z-index:100000;":"")+(M.isIE?"opacity:0.1;":"")+"text-indent: -"+(Me+Gn)*S.renderer.characterWidth*.5+"px;";var ui=S.container.getBoundingClientRect(),di=l.computedStyle(S.container),fi=ui.top+(parseInt(di.borderTopWidth)||0),yi=ui.left+(parseInt(ui.borderLeftWidth)||0),bi=ui.bottom-fi-xe.clientHeight-2,wi=function(vi){l.translate(xe,vi.clientX-yi-2,Math.min(vi.clientY-fi-2,bi))};wi(ri),ri.type=="mousedown"&&(S.renderer.$isMousePressed=!0,clearTimeout(Li),M.isWin&&W.capture(S.container,wi,Mi))},this.onContextMenuClose=Mi;var Li;function Mi(){clearTimeout(Li),Li=setTimeout(function(){y&&(xe.style.cssText=y,y=""),S.renderer.$isMousePressed=!1,S.renderer.$keepTextAreaAtCursor&&S.renderer.$moveTextAreaToCursor()},0)}var Ei=function(ri){S.textInput.onContextMenu(ri),Mi()};W.addListener(xe,"mouseup",Ei,S),W.addListener(xe,"mousedown",function(ri){ri.preventDefault(),Mi()},S),W.addListener(S.renderer.scroller,"contextmenu",Ei,S),W.addListener(xe,"contextmenu",Ei,S),d&&Oi(_,S,xe);function Oi(ri,ci,ui){var di=null,fi=!1;ui.addEventListener("keydown",function(bi){di&&clearTimeout(di),fi=!0},!0),ui.addEventListener("keyup",function(bi){di=setTimeout(function(){fi=!1},100)},!0);var yi=function(bi){if(document.activeElement===ui&&!(fi||J||ci.$mouseHandler.isMousePressed)&&!He){var wi=ui.selectionStart,vi=ui.selectionEnd,gi=null,Si=0;if(wi==0?gi=n.up:wi==1?gi=n.home:vi>Gn&&Q[vi]==`
178
+ `?gi=n.end:wi<Me&&Q[wi-1]==" "?(gi=n.left,Si=a.option):wi<Me||wi==Me&&Gn!=Me&&wi==vi?gi=n.left:vi>Gn&&Q.slice(0,vi).split(`
179
+ `).length>2?gi=n.down:vi>Gn&&Q[vi-1]==" "?(gi=n.right,Si=a.option):(vi>Gn||vi==Gn&&Gn!=Me&&wi==vi)&&(gi=n.right),wi!==vi&&(Si|=a.shift),gi){var ki=ci.onCommandKey({},Si,gi);if(!ki&&ci.commands){gi=n.keyCodeToString(gi);var Ii=ci.commands.findKeyCommand(Si,gi);Ii&&ci.execCommand(Ii)}Me=wi,Gn=vi,ei("")}}};document.addEventListener("selectionchange",yi),ci.on("destroy",function(){document.removeEventListener("selectionchange",yi)})}this.destroy=function(){xe.parentElement&&xe.parentElement.removeChild(xe)}},m.TextInput=F,m.$setUserAgentForTests=function(_,S){oe=_,d=S}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(p,m,Vn){var W=p("../lib/useragent"),R=0,M=550,l=function(){function i(r){r.$clickSelection=null;var t=r.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(n){r[n]=this[n]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return i.prototype.onMouseDown=function(r){var t=r.inSelection(),e=r.getDocumentPosition();this.mousedownEvent=r;var n=this.editor,a=r.getButton();if(a!==0){var d=n.getSelectionRange(),f=d.isEmpty();(f||a==1)&&n.selection.moveToPosition(e),a==2&&(n.textInput.onContextMenu(r.domEvent),W.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!n.isFocused()&&(n.focus(),this.$focusTimeout&&!this.$clickSelection&&!n.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(r);return}return this.captureMouse(r),this.startSelect(e,r.domEvent._clicks>1),r.preventDefault()},i.prototype.startSelect=function(r,t){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(r):t||e.selection.moveToPosition(r),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var r,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(e);if(n==-1)r=this.$clickSelection.end;else if(n==1)r=this.$clickSelection.start;else{var a=o(this.$clickSelection,e);e=a.cursor,r=a.anchor}t.selection.setSelectionAnchor(r.row,r.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(r){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y),a=e.selection[r](n.row,n.column);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(a.start),f=this.$clickSelection.comparePoint(a.end);if(d==-1&&f<=0)t=this.$clickSelection.end,(a.end.row!=n.row||a.end.column!=n.column)&&(n=a.start);else if(f==1&&d>=0)t=this.$clickSelection.start,(a.start.row!=n.row||a.start.column!=n.column)&&(n=a.end);else if(d==-1&&f==1)n=a.end,t=a.start;else{var oe=o(this.$clickSelection,n);n=oe.cursor,t=oe.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var r=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(r>R||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(r){var t=r.getDocumentPosition(),e=this.editor,n=e.session,a=n.getBracketRange(t);a?(a.isEmpty()&&(a.start.column--,a.end.column++),this.setState("select")):(a=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=a,this.select()},i.prototype.onTripleClick=function(r){var t=r.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var n=e.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(n.start.row),this.$clickSelection.end=e.selection.getLineRange(n.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},i.prototype.onQuadClick=function(r){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(r){if(!r.getAccelKey()){r.getShiftKey()&&r.wheelY&&!r.wheelX&&(r.wheelX=r.wheelY,r.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,n=r.domEvent.timeStamp,a=n-e.t,d=a?r.wheelX/a:e.vx,f=a?r.wheelY/a:e.vy;a<M&&(d=(d+e.vx)/2,f=(f+e.vy)/2);var oe=Math.abs(d/f),F=!1;if(oe>=1&&t.renderer.isScrollableBy(r.wheelX*r.speed,0)&&(F=!0),oe<=1&&t.renderer.isScrollableBy(0,r.wheelY*r.speed)&&(F=!0),F)e.allowed=n;else if(n-e.allowed<M){var _=Math.abs(d)<=1.5*Math.abs(e.vx)&&Math.abs(f)<=1.5*Math.abs(e.vy);_?(F=!0,e.allowed=n):e.allowed=0}if(e.t=n,e.vx=d,e.vy=f,F)return t.renderer.scrollBy(r.wheelX*r.speed,r.wheelY*r.speed),r.stop()}},i}();l.prototype.selectEnd=l.prototype.selectByLinesEnd,l.prototype.selectAllEnd=l.prototype.selectByLinesEnd,l.prototype.selectByWordsEnd=l.prototype.selectByLinesEnd,m.DefaultHandlers=l;function u(i,r,t,e){return Math.sqrt(Math.pow(t-i,2)+Math.pow(e-r,2))}function o(i,r){if(i.start.row==i.end.row)var t=2*r.column-i.start.column-i.end.column;else if(i.start.row==i.end.row-1&&!i.start.column&&!i.end.column)var t=r.column-4;else var t=2*r.row-i.start.row-i.end.row;return t<0?{cursor:i.start,anchor:i.end}:{cursor:i.end,anchor:i.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(p,m,Vn){m.preventParentScroll=function(R){R.stopPropagation();var M=R.currentTarget,l=M.scrollHeight>M.clientHeight;l||R.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(p,m,Vn){var W=this&&this.__extends||function(){var n=function(a,d){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,oe){f.__proto__=oe}||function(f,oe){for(var F in oe)Object.prototype.hasOwnProperty.call(oe,F)&&(f[F]=oe[F])},n(a,d)};return function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");n(a,d);function f(){this.constructor=a}a.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}(),R=this&&this.__values||function(n){var a=typeof Symbol=="function"&&Symbol.iterator,d=a&&n[a],f=0;if(d)return d.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&f>=n.length&&(n=void 0),{value:n&&n[f++],done:!n}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},M=p("./lib/dom");p("./lib/event");var l=p("./range").Range,u=p("./lib/scroll").preventParentScroll,o="ace_tooltip",i=function(){function n(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}return n.prototype.$init=function(){return this.$element=M.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},n.prototype.getElement=function(){return this.$element||this.$init()},n.prototype.setText=function(a){this.getElement().textContent=a},n.prototype.setHtml=function(a){this.getElement().innerHTML=a},n.prototype.setPosition=function(a,d){this.getElement().style.left=a+"px",this.getElement().style.top=d+"px"},n.prototype.setClassName=function(a){M.addCssClass(this.getElement(),a)},n.prototype.setTheme=function(a){this.$element.className=o+" "+(a.isDark?"ace_dark ":"")+(a.cssClass||"")},n.prototype.show=function(a,d,f){a!=null&&this.setText(a),d!=null&&f!=null&&this.setPosition(d,f),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},n.prototype.hide=function(a){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},n.prototype.getHeight=function(){return this.getElement().offsetHeight},n.prototype.getWidth=function(){return this.getElement().offsetWidth},n.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},n}(),r=function(){function n(){this.popups=[]}return n.prototype.addPopup=function(a){this.popups.push(a),this.updatePopups()},n.prototype.removePopup=function(a){var d=this.popups.indexOf(a);d!==-1&&(this.popups.splice(d,1),this.updatePopups())},n.prototype.updatePopups=function(){var a,d,f,oe;this.popups.sort(function(y,h){return h.priority-y.priority});var F=[];try{for(var _=R(this.popups),S=_.next();!S.done;S=_.next()){var xe=S.value,He=!0;try{for(var Ae=(f=void 0,R(F)),J=Ae.next();!J.done;J=Ae.next()){var Kn=J.value;if(this.doPopupsOverlap(Kn,xe)){He=!1;break}}}catch(y){f={error:y}}finally{try{J&&!J.done&&(oe=Ae.return)&&oe.call(Ae)}finally{if(f)throw f.error}}He?F.push(xe):xe.hide()}}catch(y){a={error:y}}finally{try{S&&!S.done&&(d=_.return)&&d.call(_)}finally{if(a)throw a.error}}},n.prototype.doPopupsOverlap=function(a,d){var f=a.getElement().getBoundingClientRect(),oe=d.getElement().getBoundingClientRect();return f.left<oe.right&&f.right>oe.left&&f.top<oe.bottom&&f.bottom>oe.top},n}(),t=new r;m.popupManager=t,m.Tooltip=i;var e=function(n){W(a,n);function a(d){d===void 0&&(d=document.body);var f=n.call(this,d)||this;f.timeout=void 0,f.lastT=0,f.idleTime=350,f.lastEvent=void 0,f.onMouseOut=f.onMouseOut.bind(f),f.onMouseMove=f.onMouseMove.bind(f),f.waitForHover=f.waitForHover.bind(f),f.hide=f.hide.bind(f);var oe=f.getElement();return oe.style.whiteSpace="pre-wrap",oe.style.pointerEvents="auto",oe.addEventListener("mouseout",f.onMouseOut),oe.tabIndex=-1,oe.addEventListener("blur",(function(){oe.contains(document.activeElement)||this.hide()}).bind(f)),oe.addEventListener("wheel",u),f}return a.prototype.addToEditor=function(d){d.on("mousemove",this.onMouseMove),d.on("mousedown",this.hide),d.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},a.prototype.removeFromEditor=function(d){d.off("mousemove",this.onMouseMove),d.off("mousedown",this.hide),d.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.onMouseMove=function(d,f){this.lastEvent=d,this.lastT=Date.now();var oe=f.$mouseHandler.isMousePressed;if(this.isOpen){var F=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(F.row,F.column)||oe||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||oe||(this.lastEvent=d,this.timeout=setTimeout(this.waitForHover,this.idleTime))},a.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var d=Date.now()-this.lastT;if(this.idleTime-d>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-d);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},a.prototype.isOutsideOfText=function(d){var f=d.editor,oe=d.getDocumentPosition(),F=f.session.getLine(oe.row);if(oe.column==F.length){var _=f.renderer.pixelToScreenCoordinates(d.clientX,d.clientY),S=f.session.documentToScreenPosition(oe.row,oe.column);if(S.column!=_.column||S.row!=_.row)return!0}return!1},a.prototype.setDataProvider=function(d){this.$gatherData=d},a.prototype.showForRange=function(d,f,oe,F){var _=10;if(!(F&&F!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var S=d.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(S.theme)),this.isOpen=!0,this.addMarker(f,d.session),this.range=l.fromPoints(f.start,f.end);var xe=S.textToScreenCoordinates(f.start.row,f.start.column),He=S.scroller.getBoundingClientRect();xe.pageX<He.left&&(xe.pageX=He.left);var Ae=this.getElement();Ae.innerHTML="",Ae.appendChild(oe),Ae.style.maxHeight="",Ae.style.display="block";var J=Ae.clientHeight,Kn=Ae.clientWidth,y=window.innerHeight-xe.pageY-S.lineHeight,h=!0;xe.pageY-J<0&&xe.pageY<y&&(h=!1),Ae.style.maxHeight=(h?xe.pageY:y)-_+"px",Ae.style.top=h?"":xe.pageY+S.lineHeight+"px",Ae.style.bottom=h?window.innerHeight-xe.pageY+"px":"",Ae.style.left=Math.min(xe.pageX,window.innerWidth-Kn-_)+"px"}},a.prototype.addMarker=function(d,f){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=f,this.marker=f&&f.addMarker(d,"ace_highlight-marker","text")},a.prototype.hide=function(d){!d&&document.activeElement==this.getElement()||d&&d.target&&(d.type!="keydown"||d.ctrlKey||d.metaKey)&&this.$element.contains(d.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)))},a.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},a.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},a.prototype.onMouseOut=function(d){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!d.relatedTarget||this.getElement().contains(d.relatedTarget)||d&&d.currentTarget.contains(d.relatedTarget)||d.relatedTarget.classList.contains("ace_content")||this.hide())},a}(i);m.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"],function(p,m,Vn){var W=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(a[f]=d[f])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function a(){this.constructor=e}e.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),R=this&&this.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],a=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},M=p("../lib/dom"),l=p("../lib/event"),u=p("../tooltip").Tooltip,o=p("../config").nls;p("../lib/lang");function i(t){var e=t.editor,n=e.renderer.$gutterLayer,a=new r(e);t.editor.setDefaultHandler("guttermousedown",function(S){if(!(!e.isFocused()||S.getButton()!=0)){var xe=n.getRegion(S);if(xe!="foldWidgets"){var He=S.getDocumentPosition().row,Ae=e.session.selection;if(S.getShiftKey())Ae.selectTo(He,0);else{if(S.domEvent.detail==2)return e.selectAll(),S.preventDefault();t.$clickSelection=e.selection.getLineRange(He)}return t.setState("selectByLines"),t.captureMouse(S),S.preventDefault()}}});var d,f;function oe(){var S=f.getDocumentPosition().row,xe=e.session.getLength();if(S==xe){var He=e.renderer.pixelToScreenCoordinates(0,f.y).row,Ae=f.$pos;if(He>e.session.documentToScreenRow(Ae.row,Ae.column))return F()}if(a.showTooltip(S),!!a.isOpen)if(e.on("mousewheel",F),t.$tooltipFollowsMouse)_(f);else{var J=f.getGutterRow(),Kn=n.$lines.get(J);if(Kn){var y=Kn.element.querySelector(".ace_gutter_annotation"),h=y.getBoundingClientRect(),w=a.getElement().style;w.left=h.right+"px",w.top=h.bottom+"px"}else _(f)}}function F(){d&&(d=clearTimeout(d)),a.isOpen&&(a.hideTooltip(),e.off("mousewheel",F))}function _(S){a.setPosition(S.x,S.y)}t.editor.setDefaultHandler("guttermousemove",function(S){var xe=S.domEvent.target||S.domEvent.srcElement;if(M.hasCssClass(xe,"ace_fold-widget"))return F();a.isOpen&&t.$tooltipFollowsMouse&&_(S),f=S,!d&&(d=setTimeout(function(){d=null,f&&!t.isMousePressed?oe():F()},50))}),l.addListener(e.renderer.$gutter,"mouseout",function(S){f=null,!(!a.isOpen||d)&&(d=setTimeout(function(){d=null,F()},50))},e),e.on("changeSession",F),e.on("input",F)}m.GutterHandler=i;var r=function(t){W(e,t);function e(n){var a=t.call(this,n.container)||this;return a.editor=n,a}return e.prototype.setPosition=function(n,a){var d=window.innerWidth||document.documentElement.clientWidth,f=window.innerHeight||document.documentElement.clientHeight,oe=this.getWidth(),F=this.getHeight();n+=15,a+=15,n+oe>d&&(n-=n+oe-d),a+F>f&&(a-=20+F),u.prototype.setPosition.call(this,n,a)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(n){var a,d=this.editor.renderer.$gutterLayer,f=d.$annotations[n],oe;f?oe={displayText:Array.from(f.displayText),type:Array.from(f.type)}:oe={displayText:[],type:[]};var F=d.session.getFoldLine(n);if(F&&d.$showFoldedAnnotations){for(var _={error:[],security:[],warning:[],info:[],hint:[]},S={error:1,security:2,warning:3,info:4,hint:5},xe,He=n+1;He<=F.end.row;He++)if(d.$annotations[He])for(var Ae=0;Ae<d.$annotations[He].text.length;Ae++){var J=d.$annotations[He].type[Ae];_[J].push(d.$annotations[He].text[Ae]),(!xe||S[J]<S[xe])&&(xe=J)}if(["error","security","warning"].includes(xe)){var Kn="".concat(e.annotationsToSummaryString(_)," in folded code.");oe.displayText.push(Kn),oe.type.push(xe+"_fold")}}if(oe.displayText.length===0)return this.hide();for(var y={error:[],security:[],warning:[],info:[],hint:[]},h=d.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",He=0;He<oe.displayText.length;He++){var w=M.createElement("span"),Q=M.createElement("span");(a=Q.classList).add.apply(a,["ace_".concat(oe.type[He]),h]),Q.setAttribute("aria-label","".concat(e.annotationLabels[oe.type[He].replace("_fold","")].singular)),Q.setAttribute("role","img"),Q.appendChild(M.createTextNode(" ")),w.appendChild(Q),w.appendChild(M.createTextNode(oe.displayText[He])),w.appendChild(M.createElement("br")),y[oe.type[He].replace("_fold","")].push(w)}var Me=this.getElement();M.removeChildren(Me),y.error.forEach(function(Gn){return Me.appendChild(Gn)}),y.security.forEach(function(Gn){return Me.appendChild(Gn)}),y.warning.forEach(function(Gn){return Me.appendChild(Gn)}),y.info.forEach(function(Gn){return Me.appendChild(Gn)}),y.hint.forEach(function(Gn){return Me.appendChild(Gn)}),Me.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},e.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},e.annotationsToSummaryString=function(n){var a,d,f=[],oe=["error","security","warning","info","hint"];try{for(var F=R(oe),_=F.next();!_.done;_=F.next()){var S=_.value;if(n[S].length){var xe=n[S].length===1?e.annotationLabels[S].singular:e.annotationLabels[S].plural;f.push("".concat(n[S].length," ").concat(xe))}}}catch(He){a={error:He}}finally{try{_&&!_.done&&(d=F.return)&&d.call(F)}finally{if(a)throw a.error}}return f.join(", ")},e}(u);m.GutterTooltip=r}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(p,m,Vn){var W=p("../lib/event"),R=p("../lib/useragent"),M=function(){function l(u,o){this.speed,this.wheelX,this.wheelY,this.domEvent=u,this.editor=o,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return l.prototype.stopPropagation=function(){W.stopPropagation(this.domEvent),this.propagationStopped=!0},l.prototype.preventDefault=function(){W.preventDefault(this.domEvent),this.defaultPrevented=!0},l.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},l.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},l.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(u,0),i=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-i},l.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,o=u.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=o.contains(i.row,i.column)}return this.$inSelection},l.prototype.getButton=function(){return W.getButton(this.domEvent)},l.prototype.getShiftKey=function(){return this.domEvent.shiftKey},l.prototype.getAccelKey=function(){return R.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},l}();m.MouseEvent=M}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(p,m,Vn){var W=p("../lib/dom"),R=p("../lib/event"),M=p("../lib/useragent"),l=200,u=200,o=5;function i(t){var e=t.editor,n=W.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";var a=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];a.forEach(function(Xn){t[Xn]=this[Xn]},this),e.on("mousedown",this.onMouseDown.bind(t));var d=e.container,f,oe,F,_,S,xe,He=0,Ae,J,Kn,y,h;this.onDragStart=function(Xn){if(this.cancelDrag||!d.draggable){var ei=this;return setTimeout(function(){ei.startSelect(),ei.captureMouse(Xn)},0),Xn.preventDefault()}S=e.getSelectionRange();var ni=Xn.dataTransfer;ni.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(n),ni.setDragImage&&ni.setDragImage(n,0,0),setTimeout(function(){e.container.removeChild(n)}),ni.clearData(),ni.setData("Text",e.session.getTextRange()),J=!0,this.setState("drag")},this.onDragEnd=function(Xn){if(d.draggable=!1,J=!1,this.setState(null),!e.getReadOnly()){var ei=Xn.dataTransfer.dropEffect;!Ae&&ei=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(Xn){if(!(e.getReadOnly()||!Jn(Xn.dataTransfer)))return oe=Xn.clientX,F=Xn.clientY,f||Gn(),He++,Xn.dataTransfer.dropEffect=Ae=ii(Xn),R.preventDefault(Xn)},this.onDragOver=function(Xn){if(!(e.getReadOnly()||!Jn(Xn.dataTransfer)))return oe=Xn.clientX,F=Xn.clientY,f||(Gn(),He++),Qn!==null&&(Qn=null),Xn.dataTransfer.dropEffect=Ae=ii(Xn),R.preventDefault(Xn)},this.onDragLeave=function(Xn){if(He--,He<=0&&f)return Yn(),Ae=null,R.preventDefault(Xn)},this.onDrop=function(Xn){if(xe){var ei=Xn.dataTransfer;if(J)switch(Ae){case"move":S.contains(xe.row,xe.column)?S={start:xe,end:xe}:S=e.moveText(S,xe);break;case"copy":S=e.moveText(S,xe,!0);break}else{var ni=ei.getData("Text");S={start:xe,end:e.session.insert(xe,ni)},e.focus(),Ae=null}return Yn(),R.preventDefault(Xn)}},R.addListener(d,"dragstart",this.onDragStart.bind(t),e),R.addListener(d,"dragend",this.onDragEnd.bind(t),e),R.addListener(d,"dragenter",this.onDragEnter.bind(t),e),R.addListener(d,"dragover",this.onDragOver.bind(t),e),R.addListener(d,"dragleave",this.onDragLeave.bind(t),e),R.addListener(d,"drop",this.onDrop.bind(t),e);function w(Xn,ei){var ni=Date.now(),ti=!ei||Xn.row!=ei.row,oi=!ei||Xn.column!=ei.column;if(!y||ti||oi)e.moveCursorToPosition(Xn),y=ni,h={x:oe,y:F};else{var ai=r(h.x,h.y,oe,F);ai>o?y=null:ni-y>=u&&(e.renderer.scrollCursorIntoView(),y=null)}}function Q(Xn,ei){var ni=Date.now(),ti=e.renderer.layerConfig.lineHeight,oi=e.renderer.layerConfig.characterWidth,ai=e.renderer.scroller.getBoundingClientRect(),li={x:{left:oe-ai.left,right:ai.right-oe},y:{top:F-ai.top,bottom:ai.bottom-F}},si=Math.min(li.x.left,li.x.right),hi=Math.min(li.y.top,li.y.bottom),pi={row:Xn.row,column:Xn.column};si/oi<=2&&(pi.column+=li.x.left<li.x.right?-3:2),hi/ti<=1&&(pi.row+=li.y.top<li.y.bottom?-1:1);var $i=Xn.row!=pi.row,Ci=Xn.column!=pi.column,mi=!ei||Xn.row!=ei.row;$i||Ci&&!mi?Kn?ni-Kn>=l&&e.renderer.scrollCursorIntoView(pi):Kn=ni:Kn=null}function Me(){var Xn=xe;xe=e.renderer.screenToTextCoordinates(oe,F),w(xe,Xn),Q(xe,Xn)}function Gn(){S=e.selection.toOrientedRange(),f=e.session.addMarker(S,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),Me(),_=setInterval(Me,20),He=0,R.addListener(document,"mousemove",Zn)}function Yn(){clearInterval(_),e.session.removeMarker(f),f=null,e.selection.fromOrientedRange(S),e.isFocused()&&!J&&e.$resetCursorStyle(),S=null,xe=null,He=0,Kn=null,y=null,R.removeListener(document,"mousemove",Zn)}var Qn=null;function Zn(){Qn==null&&(Qn=setTimeout(function(){Qn!=null&&f&&Yn()},20))}function Jn(Xn){var ei=Xn.types;return!ei||Array.prototype.some.call(ei,function(ni){return ni=="text/plain"||ni=="Text"})}function ii(Xn){var ei=["copy","copymove","all","uninitialized"],ni=["move","copymove","linkmove","all","uninitialized"],ti=M.isMac?Xn.altKey:Xn.ctrlKey,oi="uninitialized";try{oi=Xn.dataTransfer.effectAllowed.toLowerCase()}catch{}var ai="none";return ti&&ei.indexOf(oi)>=0?ai="copy":ni.indexOf(oi)>=0?ai="move":ei.indexOf(oi)>=0&&(ai="copy"),ai}}(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 n=M.isWin?"default":"move";t.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(M.isIE&&this.state=="dragReady"){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if(this.state==="dragWait"){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),a=t.getButton(),d=t.domEvent.detail||1;if(d===1&&a===0&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var f=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),e.getDragDelay()){if(M.isWebKit){this.cancelDrag=!0;var oe=e.container;oe.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(i.prototype);function r(t,e,n,a){return Math.sqrt(Math.pow(n-t,2)+Math.pow(a-e,2))}m.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(p,m,Vn){var W=p("./mouse_event").MouseEvent,R=p("../lib/event"),M=p("../lib/dom");m.addTouchListeners=function(l,u){var o="scroll",i,r,t,e,n,a,d=0,f,oe=0,F=0,_=0,S,xe;function He(){var w=window.navigator&&window.navigator.clipboard,Q=!1,Me=function(){var Qn=u.getCopyText(),Zn=u.session.getUndoManager().hasUndo();xe.replaceChild(M.buildDom(Q?["span",!Qn&&Gn("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],Qn&&Gn("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],Qn&&Gn("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],w&&Gn("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Zn&&Gn("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],Gn("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],Gn("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),xe.firstChild)},Gn=function(Qn){return u.commands.canExecute(Qn,u)},Yn=function(Qn){var Zn=Qn.target.getAttribute("action");if(Zn=="more"||!Q)return Q=!Q,Me();Zn=="paste"?w.readText().then(function(Jn){u.execCommand(Zn,Jn)}):Zn&&((Zn=="cut"||Zn=="copy")&&(w?w.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(Zn)),xe.firstChild.style.display="none",Q=!1,Zn!="openCommandPalette"&&u.focus()};xe=M.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(Qn){o="menu",Qn.stopPropagation(),Qn.preventDefault(),u.textInput.focus()},ontouchend:function(Qn){Qn.stopPropagation(),Qn.preventDefault(),Yn(Qn)},onclick:Yn},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function Ae(){if(!u.getOption("enableMobileMenu")){xe&&J();return}xe||He();var w=u.selection.cursor,Q=u.renderer.textToScreenCoordinates(w.row,w.column),Me=u.renderer.textToScreenCoordinates(0,0).pageX,Gn=u.renderer.scrollLeft,Yn=u.container.getBoundingClientRect();xe.style.top=Q.pageY-Yn.top-3+"px",Q.pageX-Yn.left<Yn.width-70?(xe.style.left="",xe.style.right="10px"):(xe.style.right="",xe.style.left=Me+Gn-Yn.left+"px"),xe.style.display="",xe.firstChild.style.display="none",u.on("input",J)}function J(w){xe&&(xe.style.display="none"),u.off("input",J)}function Kn(){n=null,clearTimeout(n);var w=u.selection.getRange(),Q=w.contains(f.row,f.column);(w.isEmpty()||!Q)&&(u.selection.moveToPosition(f),u.selection.selectWord()),o="wait",Ae()}function y(){n=null,clearTimeout(n),u.selection.moveToPosition(f);var w=oe>=2?u.selection.getLineRange(f.row):u.session.getBracketRange(f);w&&!w.isEmpty()?u.selection.setRange(w):u.selection.selectWord(),o="wait"}R.addListener(l,"contextmenu",function(w){if(S){var Q=u.textInput.getElement();Q.focus()}},u),R.addListener(l,"touchstart",function(w){var Q=w.touches;if(n||Q.length>1){clearTimeout(n),n=null,t=-1,o="zoom";return}S=u.$mouseHandler.isMousePressed=!0;var Me=u.renderer.layerConfig.lineHeight,Gn=u.renderer.layerConfig.lineHeight,Yn=w.timeStamp;e=Yn;var Qn=Q[0],Zn=Qn.clientX,Jn=Qn.clientY;Math.abs(i-Zn)+Math.abs(r-Jn)>Me&&(t=-1),i=w.clientX=Zn,r=w.clientY=Jn,F=_=0;var ii=new W(w,u);if(f=ii.getDocumentPosition(),Yn-t<500&&Q.length==1&&!d)oe++,w.preventDefault(),w.button=0,y();else{oe=0;var Xn=u.selection.cursor,ei=u.selection.isEmpty()?Xn:u.selection.anchor,ni=u.renderer.$cursorLayer.getPixelPosition(Xn,!0),ti=u.renderer.$cursorLayer.getPixelPosition(ei,!0),oi=u.renderer.scroller.getBoundingClientRect(),ai=u.renderer.layerConfig.offset,li=u.renderer.scrollLeft,si=function($i,Ci){return $i=$i/Gn,Ci=Ci/Me-.75,$i*$i+Ci*Ci};if(w.clientX<oi.left){o="zoom";return}var hi=si(w.clientX-oi.left-ni.left+li,w.clientY-oi.top-ni.top+ai),pi=si(w.clientX-oi.left-ti.left+li,w.clientY-oi.top-ti.top+ai);hi<3.5&&pi<3.5&&(o=hi>pi?"cursor":"anchor"),pi<3.5?o="anchor":hi<3.5?o="cursor":o="scroll",n=setTimeout(Kn,450)}t=Yn},u),R.addListener(l,"touchend",function(w){S=u.$mouseHandler.isMousePressed=!1,a&&clearInterval(a),o=="zoom"?(o="",d=0):n?(u.selection.moveToPosition(f),d=0,Ae()):o=="scroll"?(h(),J()):Ae(),clearTimeout(n),n=null},u),R.addListener(l,"touchmove",function(w){n&&(clearTimeout(n),n=null);var Q=w.touches;if(!(Q.length>1||o=="zoom")){var Me=Q[0],Gn=i-Me.clientX,Yn=r-Me.clientY;if(o=="wait")if(Gn*Gn+Yn*Yn>4)o="cursor";else return w.preventDefault();i=Me.clientX,r=Me.clientY,w.clientX=Me.clientX,w.clientY=Me.clientY;var Qn=w.timeStamp,Zn=Qn-e;if(e=Qn,o=="scroll"){var Jn=new W(w,u);Jn.speed=1,Jn.wheelX=Gn,Jn.wheelY=Yn,10*Math.abs(Gn)<Math.abs(Yn)&&(Gn=0),10*Math.abs(Yn)<Math.abs(Gn)&&(Yn=0),Zn!=0&&(F=Gn/Zn,_=Yn/Zn),u._emit("mousewheel",Jn),Jn.propagationStopped||(F=_=0)}else{var ii=new W(w,u),Xn=ii.getDocumentPosition();o=="cursor"?u.selection.moveCursorToPosition(Xn):o=="anchor"&&u.selection.setSelectionAnchor(Xn.row,Xn.column),u.renderer.scrollCursorIntoView(Xn),w.preventDefault()}}},u);function h(){d+=60,a=setInterval(function(){d--<=0&&(clearInterval(a),a=null),Math.abs(F)<.01&&(F=0),Math.abs(_)<.01&&(_=0),d<20&&(F=.9*F),d<20&&(_=.9*_);var w=u.session.getScrollTop();u.renderer.scrollBy(10*F,10*_),w==u.session.getScrollTop()&&(d=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(p,m,Vn){var W=p("../lib/event"),R=p("../lib/useragent"),M=p("./default_handlers").DefaultHandlers,l=p("./default_gutter_handler").GutterHandler,u=p("./mouse_event").MouseEvent,o=p("./dragdrop_handler").DragdropHandler,i=p("./touch_handler").addTouchListeners,r=p("../config"),t=function(){function e(n){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var a=this;this.editor=n,new M(this),new l(this),new o(this);var d=function(F){var _=!document.hasFocus||!document.hasFocus()||!n.isFocused()&&document.activeElement==(n.textInput&&n.textInput.getElement());_&&window.focus(),n.focus(),setTimeout(function(){n.isFocused()||n.focus()})},f=n.renderer.getMouseEventTarget();W.addListener(f,"click",this.onMouseEvent.bind(this,"click"),n),W.addListener(f,"mousemove",this.onMouseMove.bind(this,"mousemove"),n),W.addMultiMouseDownListener([f,n.renderer.scrollBarV&&n.renderer.scrollBarV.inner,n.renderer.scrollBarH&&n.renderer.scrollBarH.inner,n.textInput&&n.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",n),W.addMouseWheelListener(n.container,this.onMouseWheel.bind(this,"mousewheel"),n),i(n.container,n);var oe=n.renderer.$gutter;W.addListener(oe,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),n),W.addListener(oe,"click",this.onMouseEvent.bind(this,"gutterclick"),n),W.addListener(oe,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),n),W.addListener(oe,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),n),W.addListener(f,"mousedown",d,n),W.addListener(oe,"mousedown",d,n),R.isIE&&n.renderer.scrollBarV&&(W.addListener(n.renderer.scrollBarV.element,"mousedown",d,n),W.addListener(n.renderer.scrollBarH.element,"mousedown",d,n)),n.on("mousemove",function(F){if(!(a.state||a.$dragDelay||!a.$dragEnabled)){var _=n.renderer.screenToTextCoordinates(F.x,F.y),S=n.session.selection.getRange(),xe=n.renderer;!S.isEmpty()&&S.insideStart(_.row,_.column)?xe.setCursorStyle("default"):xe.setCursorStyle("")}},n)}return e.prototype.onMouseEvent=function(n,a){this.editor.session&&this.editor._emit(n,new u(a,this.editor))},e.prototype.onMouseMove=function(n,a){var d=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!d||!d.length||this.editor._emit(n,new u(a,this.editor))},e.prototype.onMouseWheel=function(n,a){var d=new u(a,this.editor);d.speed=this.$scrollSpeed*2,d.wheelX=a.wheelX,d.wheelY=a.wheelY,this.editor._emit(n,d)},e.prototype.setState=function(n){this.state=n},e.prototype.captureMouse=function(n,a){this.x=n.x,this.y=n.y,this.isMousePressed=!0;var d=this.editor,f=this.editor.renderer;f.$isMousePressed=!0;var oe=this,F=function(Ae){if(Ae){if(R.isWebKit&&!Ae.which&&oe.releaseMouse)return oe.releaseMouse();oe.x=Ae.clientX,oe.y=Ae.clientY,a&&a(Ae),oe.mouseEvent=new u(Ae,oe.editor),oe.$mouseMoved=!0}},_=function(Ae){d.off("beforeEndOperation",xe),clearInterval(He),d.session&&S(),oe[oe.state+"End"]&&oe[oe.state+"End"](Ae),oe.state="",oe.isMousePressed=f.$isMousePressed=!1,f.$keepTextAreaAtCursor&&f.$moveTextAreaToCursor(),oe.$onCaptureMouseMove=oe.releaseMouse=null,Ae&&oe.onMouseEvent("mouseup",Ae),d.endOperation()},S=function(){oe[oe.state]&&oe[oe.state](),oe.$mouseMoved=!1};if(R.isOldIE&&n.domEvent.type=="dblclick")return setTimeout(function(){_(n)});var xe=function(Ae){oe.releaseMouse&&d.curOp.command.name&&d.curOp.selectionChanged&&(oe[oe.state+"End"]&&oe[oe.state+"End"](),oe.state="",oe.releaseMouse())};d.on("beforeEndOperation",xe),d.startOperation({command:{name:"mouse"}}),oe.$onCaptureMouseMove=F,oe.releaseMouse=W.capture(this.editor.container,F,_);var He=setInterval(S,20)},e.prototype.cancelContextMenu=function(){var n=(function(a){a&&a.domEvent&&a.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",n),a&&a.domEvent&&W.stopEvent(a.domEvent))}).bind(this);setTimeout(n,10),this.editor.on("nativecontextmenu",n)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();t.prototype.releaseMouse=null,r.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:R.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(p,m,Vn){var W=p("../lib/dom"),R=function(){function M(l){l.on("click",function(u){var o=u.getDocumentPosition(),i=l.session,r=i.getFoldAt(o.row,o.column,1);r&&(u.getAccelKey()?i.removeFold(r):i.expandFold(r),u.stop());var t=u.domEvent&&u.domEvent.target;t&&W.hasCssClass(t,"ace_inline_button")&&W.hasCssClass(t,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),l.renderer.scrollCursorIntoView())}),l.on("gutterclick",function(u){var o=l.renderer.$gutterLayer.getRegion(u);if(o=="foldWidgets"){var i=u.getDocumentPosition().row,r=l.session;r.foldWidgets&&r.foldWidgets[i]&&l.session.onFoldWidgetClick(i,u),l.isFocused()||l.focus(),u.stop()}}),l.on("gutterdblclick",function(u){var o=l.renderer.$gutterLayer.getRegion(u);if(o=="foldWidgets"){var i=u.getDocumentPosition().row,r=l.session,t=r.getParentFoldRangeData(i,!0),e=t.range||t.firstRange;if(e){i=e.start.row;var n=r.getFoldAt(i,r.getLine(i).length,1);n?r.removeFold(n):(r.addFold("...",e),l.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}u.stop()}})}return M}();m.FoldHandler=R}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(p,m,Vn){var W=p("../lib/keys"),R=p("../lib/event"),M=function(){function l(u){this.$editor=u,this.$data={editor:u},this.$handlers=[],this.setDefaultHandler(u.commands)}return l.prototype.setDefaultHandler=function(u){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=u,this.addKeyboardHandler(u,0)},l.prototype.setKeyboardHandler=function(u){var o=this.$handlers;if(o[o.length-1]!=u){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(u,1)}},l.prototype.addKeyboardHandler=function(u,o){if(u){typeof u=="function"&&!u.handleKeyboard&&(u.handleKeyboard=u);var i=this.$handlers.indexOf(u);i!=-1&&this.$handlers.splice(i,1),o==null?this.$handlers.push(u):this.$handlers.splice(o,0,u),i==-1&&u.attach&&u.attach(this.$editor)}},l.prototype.removeKeyboardHandler=function(u){var o=this.$handlers.indexOf(u);return o==-1?!1:(this.$handlers.splice(o,1),u.detach&&u.detach(this.$editor),!0)},l.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},l.prototype.getStatusText=function(){var u=this.$data,o=u.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(o,u)||""}).filter(Boolean).join(" ")},l.prototype.$callKeyboardHandlers=function(u,o,i,r){for(var t,e=!1,n=this.$editor.commands,a=this.$handlers.length;a--&&(t=this.$handlers[a].handleKeyboard(this.$data,u,o,i,r),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=n.exec(t.command,this.$editor,t.args,r),e&&r&&u!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&R.stopEvent(r),e))););return!e&&u==-1&&(t={command:"insertstring"},e=n.exec("insertstring",this.$editor,o)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},l.prototype.onCommandKey=function(u,o,i){var r=W.keyCodeToString(i);return this.$callKeyboardHandlers(o,r,i,u)},l.prototype.onTextInput=function(u){return this.$callKeyboardHandlers(-1,u)},l}();m.KeyBinding=M}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(p,m,Vn){var W=0,R=0,M=!1,l=!1,u=!1,o=[[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]],i=[[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]],r=0,t=1,e=0,n=1,a=2,d=3,f=4,oe=5,F=6,_=7,S=8,xe=9,He=10,Ae=11,J=12,Kn=13,y=14,h=15,w=16,Q=17,Me=18,Gn=[Me,Me,Me,Me,Me,Me,Me,Me,Me,F,oe,F,S,oe,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,oe,oe,oe,F,S,f,f,Ae,Ae,Ae,f,f,f,f,f,He,xe,He,xe,xe,a,a,a,a,a,a,a,a,a,a,xe,f,f,f,f,f,f,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,f,f,f,f,f,f,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,f,f,f,f,Me,Me,Me,Me,Me,Me,oe,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,Me,xe,f,Ae,Ae,Ae,Ae,f,f,f,f,e,f,f,Me,f,f,Ae,Ae,a,a,f,e,f,f,f,a,e,f,f,f,f,f],Yn=[S,S,S,S,S,S,S,S,S,S,S,Me,Me,Me,e,n,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,S,oe,Kn,y,h,w,Q,xe,Ae,Ae,Ae,Ae,Ae,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,xe,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,S];function Qn(Xn,ei,ni,ti){var oi=W?i:o,ai=null,li=null,si=null,hi=0,pi=null,$i=null,Ci=-1,mi=null,_i=null,xi=[];if(!ti)for(mi=0,ti=[];mi<ni;mi++)ti[mi]=ii(Xn[mi]);for(R=W,M=!1,l=!1,u=!1,_i=0;_i<ni;_i++){if(ai=hi,xi[_i]=li=Jn(Xn,ti,xi,_i),hi=oi[ai][li],pi=hi&240,hi&=15,ei[_i]=si=oi[hi][5],pi>0)if(pi==16){for(mi=Ci;mi<_i;mi++)ei[mi]=1;Ci=-1}else Ci=-1;if($i=oi[hi][6],$i)Ci==-1&&(Ci=_i);else if(Ci>-1){for(mi=Ci;mi<_i;mi++)ei[mi]=si;Ci=-1}ti[_i]==oe&&(ei[_i]=0),R|=si}if(u){for(mi=0;mi<ni;mi++)if(ti[mi]==F){ei[mi]=W;for(var Ai=mi-1;Ai>=0&&ti[Ai]==S;Ai--)ei[Ai]=W}}}function Zn(Xn,ei,ni){if(!(R<Xn)){if(Xn==1&&W==t&&!l){ni.reverse();return}for(var ti=ni.length,oi=0,ai,li,si,hi;oi<ti;){if(ei[oi]>=Xn){for(ai=oi+1;ai<ti&&ei[ai]>=Xn;)ai++;for(li=oi,si=ai-1;li<si;li++,si--)hi=ni[li],ni[li]=ni[si],ni[si]=hi;oi=ai}oi++}}}function Jn(Xn,ei,ni,ti){var oi=ei[ti],ai,li,si,hi;switch(oi){case e:case n:M=!1;case f:case d:return oi;case a:return M?d:a;case _:return M=!0,n;case S:return f;case xe:return ti<1||ti+1>=ei.length||(ai=ni[ti-1])!=a&&ai!=d||(li=ei[ti+1])!=a&&li!=d?f:(M&&(li=d),li==ai?li:f);case He:return ai=ti>0?ni[ti-1]:oe,ai==a&&ti+1<ei.length&&ei[ti+1]==a?a:f;case Ae:if(ti>0&&ni[ti-1]==a)return a;if(M)return f;for(hi=ti+1,si=ei.length;hi<si&&ei[hi]==Ae;)hi++;return hi<si&&ei[hi]==a?a:f;case J:for(si=ei.length,hi=ti+1;hi<si&&ei[hi]==J;)hi++;if(hi<si){var pi=Xn[ti],$i=pi>=1425&&pi<=2303||pi==64286;if(ai=ei[hi],$i&&(ai==n||ai==_))return n}return ti<1||(ai=ei[ti-1])==oe?f:ni[ti-1];case oe:return M=!1,l=!0,W;case F:return u=!0,f;case Kn:case y:case w:case Q:case h:M=!1;case Me:return f}}function ii(Xn){var ei=Xn.charCodeAt(0),ni=ei>>8;return ni==0?ei>191?e:Gn[ei]:ni==5?/[\u0591-\u05f4]/.test(Xn)?n:e:ni==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(Xn)?J:/[\u0660-\u0669\u066b-\u066c]/.test(Xn)?d:ei==1642?Ae:/[\u06f0-\u06f9]/.test(Xn)?a:_:ni==32&&ei<=8287?Yn[ei&255]:ni==254&&ei>=65136?_:f}m.L=e,m.R=n,m.EN=a,m.ON_R=3,m.AN=4,m.R_H=5,m.B=6,m.RLE=7,m.DOT="·",m.doBidiReorder=function(Xn,ei,ni){if(Xn.length<2)return{};var ti=Xn.split(""),oi=new Array(ti.length),ai=new Array(ti.length),li=[];W=ni?t:r,Qn(ti,li,ti.length,ei);for(var si=0;si<oi.length;oi[si]=si,si++);Zn(2,li,oi),Zn(1,li,oi);for(var si=0;si<oi.length-1;si++)ei[si]===d?li[si]=m.AN:li[si]===n&&(ei[si]>_&&ei[si]<Kn||ei[si]===f||ei[si]===Me)?li[si]=m.ON_R:si>0&&ti[si-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ti[si])&&(li[si-1]=li[si]=m.R_H,si++);ti[ti.length-1]===m.DOT&&(li[ti.length-1]=m.B),ti[0]==="‫"&&(li[0]=m.RLE);for(var si=0;si<oi.length;si++)ai[si]=li[oi[si]];return{logicalFromVisual:oi,bidiLevels:ai}},m.hasBidiCharacters=function(Xn,ei){for(var ni=!1,ti=0;ti<Xn.length;ti++)ei[ti]=ii(Xn.charAt(ti)),!ni&&(ei[ti]==n||ei[ti]==_||ei[ti]==d)&&(ni=!0);return ni},m.getVisualFromLogicalIdx=function(Xn,ei){for(var ni=0;ni<ei.logicalFromVisual.length;ni++)if(ei.logicalFromVisual[ni]==Xn)return ni;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(p,m,Vn){var W=p("./lib/bidiutil"),R=p("./lib/lang"),M=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,l=function(){function u(o){this.session=o,this.bidiMap={},this.currentRow=null,this.bidiUtil=W,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=M.test(o.getValue())}return u.prototype.isBidiRow=function(o,i,r){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(i,r),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},u.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&M.test(o.lines.join(`
180
+ `))&&(this.seenBidi=!0,this.currentRow=null)},u.prototype.getDocumentRow=function(){var o=0,i=this.session.$screenRowCache;if(i.length){var r=this.session.$getRowCacheIndex(i,this.currentRow);r>=0&&(o=this.session.$docRowCache[r])}return o},u.prototype.getSplitIndex=function(){var o=0,i=this.session.$screenRowCache;if(i.length)for(var r,t=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-o>0&&(r=this.session.$getRowCacheIndex(i,this.currentRow-o-1),r===t);)t=r,o++;else o=this.currentRow;return o},u.prototype.updateRowLine=function(o,i){o===void 0&&(o=this.getDocumentRow());var r=o===this.session.getLength()-1,t=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[o];e&&(i===void 0&&(i=this.getSplitIndex()),i>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[W.L],this.line=i<e.length?this.line.substring(e[i-1],e[i]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[i]),i==e.length&&(this.line+=this.showInvisibles?t:W.DOT))}else this.line+=this.showInvisibles?t:W.DOT;var n=this.session,a=0,d;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(f,oe){return f===" "||n.isFullWidth(f.charCodeAt(0))?(d=f===" "?n.getScreenTabSize(oe+a):2,a+=d-1,R.stringRepeat(W.DOT,d)):f}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==W.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},u.prototype.updateBidiMap=function(){var o=[];W.hasBidiCharacters(this.line,o)||this.isRtlDir?this.bidiMap=W.doBidiReorder(this.line,o,this.isRtlDir):this.bidiMap={}},u.prototype.markAsDirty=function(){this.currentRow=null},u.prototype.updateCharacterWidths=function(o){if(this.characterWidth!==o.$characterSize.width){this.fontMetrics=o;var i=this.characterWidth=o.$characterSize.width,r=o.$measureCharWidth("ה");this.charWidths[W.L]=this.charWidths[W.EN]=this.charWidths[W.ON_R]=i,this.charWidths[W.R]=this.charWidths[W.AN]=r,this.charWidths[W.R_H]=r*.45,this.charWidths[W.B]=this.charWidths[W.RLE]=0,this.currentRow=null}},u.prototype.setShowInvisibles=function(o){this.showInvisibles=o,this.currentRow=null},u.prototype.setEolChar=function(o){this.EOL=o},u.prototype.setContentWidth=function(o){this.contentWidth=o},u.prototype.isRtlLine=function(o){return this.$isRtl?!0:o!=null?this.session.getLine(o).charAt(0)==this.RLE:this.isRtlDir},u.prototype.setRtlDirection=function(o,i){for(var r=o.getCursorPosition(),t=o.selection.getSelectionAnchor().row;t<=r.row;t++)!i&&o.session.getLine(t).charAt(0)===o.session.$bidiHandler.RLE?o.session.doc.removeInLine(t,0,1):i&&o.session.getLine(t).charAt(0)!==o.session.$bidiHandler.RLE&&o.session.doc.insert({column:0,row:t},o.session.$bidiHandler.RLE)},u.prototype.getPosLeft=function(o){o-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,r=o>i?this.session.getOverwrite()?o:o-1:i,t=W.getVisualFromLogicalIdx(r,this.bidiMap),e=this.bidiMap.bidiLevels,n=0;!this.session.getOverwrite()&&o<=i&&e[t]%2!==0&&t++;for(var a=0;a<t;a++)n+=this.charWidths[e[a]];return!this.session.getOverwrite()&&o>i&&e[t]%2===0&&(n+=this.charWidths[e[t]]),this.wrapIndent&&(n+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(n+=this.rtlLineOffset),n},u.prototype.getSelections=function(o,i){var r=this.bidiMap,t=r.bidiLevels,e,n=[],a=0,d=Math.min(o,i)-this.wrapIndent,f=Math.max(o,i)-this.wrapIndent,oe=!1,F=!1,_=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var S,xe=0;xe<t.length;xe++)S=r.logicalFromVisual[xe],e=t[xe],oe=S>=d&&S<f,oe&&!F?_=a:!oe&&F&&n.push({left:_,width:a-_}),a+=this.charWidths[e],F=oe;if(oe&&xe===t.length&&n.push({left:_,width:a-_}),this.isRtlDir)for(var He=0;He<n.length;He++)n[He].left+=this.rtlLineOffset;return n},u.prototype.offsetToCol=function(r){this.isRtlDir&&(r-=this.rtlLineOffset);var i=0,r=Math.max(r,0),t=0,e=0,n=this.bidiMap.bidiLevels,a=this.charWidths[n[e]];for(this.wrapIndent&&(r-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);r>t+a/2;){if(t+=a,e===n.length-1){a=0;break}a=this.charWidths[n[++e]]}return e>0&&n[e-1]%2!==0&&n[e]%2===0?(r<t&&e--,i=this.bidiMap.logicalFromVisual[e]):e>0&&n[e-1]%2===0&&n[e]%2!==0?i=1+(r>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===n.length-1&&a===0&&n[e-1]%2===0||!this.isRtlDir&&e===0&&n[e]%2!==0?i=1+this.bidiMap.logicalFromVisual[e]:(e>0&&n[e-1]%2!==0&&a!==0&&e--,i=this.bidiMap.logicalFromVisual[e]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},u}();m.BidiHandler=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(p,m,Vn){var W=p("./lib/oop"),R=p("./lib/lang"),M=p("./lib/event_emitter").EventEmitter,l=p("./range").Range,u=function(){function o(i){this.session=i,this.doc=i.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var r=this;this.cursor.on("change",function(t){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(i,r){this.$isEmpty=!1,this.anchor.setPosition(i,r)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var i=this.anchor,r=this.lead;return i.row>r.row||i.row==r.row&&i.column>r.column},o.prototype.getRange=function(){var i=this.anchor,r=this.lead;return this.$isEmpty?l.fromPoints(r,r):this.isBackwards()?l.fromPoints(r,i):l.fromPoints(i,r)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(i,r){var t=r?i.end:i.start,e=r?i.start:i.end;this.$setSelection(t.row,t.column,e.row,e.column)},o.prototype.$setSelection=function(i,r,t,e){if(!this.$silent){var n=this.$isEmpty,a=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,r),this.cursor.setPosition(t,e),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||n!=this.$isEmpty||a)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(i){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),i.call(this)},o.prototype.selectTo=function(i,r){this.$moveSelection(function(){this.moveCursorTo(i,r)})},o.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},o.prototype.moveTo=function(i,r){this.clearSelection(),this.moveCursorTo(i,r)},o.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(i,r){if(typeof r>"u"){var t=i||this.lead;i=t.row,r=t.column}return this.session.getWordRange(i,r)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var i=this.getCursor(),r=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(r)},o.prototype.getLineRange=function(i,r){var t=typeof i=="number"?i:this.lead.row,e,n=this.session.getFoldLine(t);return n?(t=n.start.row,e=n.end.row):e=t,r===!0?new l(t,0,e,this.session.getLine(e).length):new l(t,0,e+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(i,r,t){var e=i.column,n=i.column+r;return t<0&&(e=i.column-r,n=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(e,n).split(" ").length-1==r},o.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),r;if(r=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(r.start.row,r.start.column);else if(i.column===0)i.row>0&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(i,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),r;if(r=this.session.getFoldAt(i.row,i.column,1))this.moveCursorTo(r.end.row,r.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(),i=this.lead;this.wouldMoveIntoSoftTab(i,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},o.prototype.moveCursorLineStart=function(){var i=this.lead.row,r=this.lead.column,t=this.session.documentToScreenRow(i,r),e=this.session.screenToDocumentPosition(t,0),n=this.session.getDisplayLine(i,null,e.row,e.column),a=n.match(/^\s*/);a[0].length!=r&&!this.session.$useEmacsStyleLineStart&&(e.column+=a[0].length),this.moveCursorToPosition(e)},o.prototype.moveCursorLineEnd=function(){var i=this.lead,r=this.session.getDocumentLastRowColumnPosition(i.row,i.column);if(this.lead.column==r.column){var t=this.session.getLine(r.row);if(r.column==t.length){var e=t.search(/\s+$/);e>0&&(r.column=e)}}this.moveCursorTo(r.row,r.column)},o.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,r=this.doc.getLine(i).length;this.moveCursorTo(i,r)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,r=this.lead.column,t=this.doc.getLine(i),e=t.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var n=this.session.getFoldAt(i,r,1);if(n){this.moveCursorTo(n.end.row,n.end.column);return}if(this.session.nonTokenRe.exec(e)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(r)),r>=t.length){this.moveCursorTo(i,t.length),this.moveCursorRight(),i<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(r+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,r)},o.prototype.moveCursorLongWordLeft=function(){var i=this.lead.row,r=this.lead.column,t;if(t=this.session.getFoldAt(i,r,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(i,r,-1);e==null&&(e=this.doc.getLine(i).substring(0,r));var n=R.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(n)&&(r-=this.session.nonTokenRe.lastIndex,n=n.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),r<=0){this.moveCursorTo(i,0),this.moveCursorLeft(),i>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(n)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,r)},o.prototype.$shortWordEndIndex=function(i){var r=0,t,e=/\s/,n=this.session.tokenRe;if(n.lastIndex=0,this.session.tokenRe.exec(i))r=this.session.tokenRe.lastIndex;else{for(;(t=i[r])&&e.test(t);)r++;if(r<1){for(n.lastIndex=0;(t=i[r])&&!n.test(t);)if(n.lastIndex=0,r++,e.test(t))if(r>2){r--;break}else{for(;(t=i[r])&&e.test(t);)r++;if(r>2)break}}}return n.lastIndex=0,r},o.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,r=this.lead.column,t=this.doc.getLine(i),e=t.substring(r),n=this.session.getFoldAt(i,r,1);if(n)return this.moveCursorTo(n.end.row,n.end.column);if(r==t.length){var a=this.doc.getLength();do i++,e=this.doc.getLine(i);while(i<a&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),r=0}var d=this.$shortWordEndIndex(e);this.moveCursorTo(i,r+d)},o.prototype.moveCursorShortWordLeft=function(){var i=this.lead.row,r=this.lead.column,t;if(t=this.session.getFoldAt(i,r,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(i).substring(0,r);if(r===0){do i--,e=this.doc.getLine(i);while(i>0&&/^\s*$/.test(e));r=e.length,/\s+$/.test(e)||(e="")}var n=R.stringReverse(e),a=this.$shortWordEndIndex(n);return this.moveCursorTo(i,r-a)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(i,r){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(r===0&&(i!==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),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var n=this.session.lineWidgets[this.lead.row];i<0?i-=n.rowsAbove||0:i>0&&(i+=n.rowCount-(n.rowsAbove||0))}var a=this.session.screenToDocumentPosition(t.row+i,t.column,e);i!==0&&r===0&&a.row===this.lead.row&&(a.column,this.lead.column),this.moveCursorTo(a.row,a.column+r,r===0)},o.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},o.prototype.moveCursorTo=function(i,r,t){var e=this.session.getFoldAt(i,r,1);e&&(i=e.start.row,r=e.start.column),this.$keepDesiredColumnOnChange=!0;var n=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(n.charAt(r))&&n.charAt(r-1)&&(this.lead.row==i&&this.lead.column==r+1?r=r-1:r=r+1),this.lead.setPosition(i,r),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(i,r,t){var e=this.session.screenToDocumentPosition(i,r);this.moveCursorTo(e.row,e.column,t)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(i){var r=this.getRange();return i?(i.start.column=r.start.column,i.start.row=r.start.row,i.end.column=r.end.column,i.end.row=r.end.row):i=r,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},o.prototype.getRangeOfMovements=function(i){var r=this.getCursor();try{i(this);var t=this.getCursor();return l.fromPoints(r,t)}catch{return l.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},o.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(r){var t=r.clone();return t.isBackwards=r.cursor==r.start,t});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},o.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var r=i.length;r--;){var t=l.fromPoints(i[r].start,i[r].end);i[r].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},o.prototype.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(i[r]))return!1;return!0},o}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,W.implement(u.prototype,M),m.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(p,m,Vn){var W=p("./lib/report_error").reportError,R=2e3,M=function(){function l(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var o in this.states){for(var i=this.states[o],r=[],t=0,e=this.matchMappings[o]={defaultToken:"text"},n="g",a=[],d=0;d<i.length;d++){var f=i[d];if(f.defaultToken&&(e.defaultToken=f.defaultToken),f.caseInsensitive&&n.indexOf("i")===-1&&(n+="i"),f.unicode&&n.indexOf("u")===-1&&(n+="u"),f.regex!=null){f.regex instanceof RegExp&&(f.regex=f.regex.toString().slice(1,-1));var oe=f.regex,F=new RegExp("(?:("+oe+")|(.))").exec("a").length-2;Array.isArray(f.token)?f.token.length==1||F==1?f.token=f.token[0]:F-1!=f.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:f,groupCount:F-1}),f.token=f.token[0]):(f.tokenArray=f.token,f.token=null,f.onMatch=this.$arrayTokens):typeof f.token=="function"&&!f.onMatch&&(F>1?f.onMatch=this.$applyToken:f.onMatch=f.token),F>1&&(/\\\d/.test(f.regex)?oe=f.regex.replace(/\\([0-9]+)/g,function(_,S){return"\\"+(parseInt(S,10)+t+1)}):(F=1,oe=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&a.push(f)),e[t]=d,t+=F,r.push(oe),f.onMatch||(f.onMatch=null)}}r.length||(e[0]=0,r.push("$")),a.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,n)},this),this.regExps[o]=new RegExp("("+r.join(")|(")+")|($)",n)}}return l.prototype.$setMaxTokenCount=function(u){R=u|0},l.prototype.$applyToken=function(u){var o=this.splitRegex.exec(u).slice(1),i=this.token.apply(this,o);if(typeof i=="string")return[{type:i,value:u}];for(var r=[],t=0,e=i.length;t<e;t++)o[t]&&(r[r.length]={type:i[t],value:o[t]});return r},l.prototype.$arrayTokens=function(u){if(!u)return[];var o=this.splitRegex.exec(u);if(!o)return"text";for(var i=[],r=this.tokenArray,t=0,e=r.length;t<e;t++)o[t+1]&&(i[i.length]={type:r[t],value:o[t+1]});return i},l.prototype.removeCapturingGroups=function(u){var o=u.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(i,r){return r?"(?:":i});return o},l.prototype.createSplitterRegexp=function(u,o){if(u.indexOf("(?=")!=-1){var i=0,r=!1,t={};u.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,n,a,d,f,oe){return r?r=f!="]":f?r=!0:d?(i==t.stack&&(t.end=oe+1,t.stack=-1),i--):a&&(i++,a.length!=1&&(t.stack=i,t.start=oe)),e}),t.end!=null&&/^\)*$/.test(u.substr(t.end))&&(u=u.substring(0,t.start)+u.substr(t.end))}return u.charAt(0)!="^"&&(u="^"+u),u.charAt(u.length-1)!="$"&&(u+="$"),new RegExp(u,(o||"").replace("g",""))},l.prototype.getLineTokens=function(u,o){if(o&&typeof o!="string"){var i=o.slice(0);o=i[0],o==="#tmp"&&(i.shift(),o=i.shift())}else var i=[];var r=o||"start",t=this.states[r];t||(r="start",t=this.states[r]);var e=this.matchMappings[r],n=this.regExps[r];n.lastIndex=0;for(var a,d=[],f=0,oe=0,F={type:null,value:""};a=n.exec(u);){var _=e.defaultToken,S=null,xe=a[0],He=n.lastIndex;if(He-xe.length>f){var Ae=u.substring(f,He-xe.length);F.type==_?F.value+=Ae:(F.type&&d.push(F),F={type:_,value:Ae})}for(var J=0;J<a.length-2;J++)if(a[J+1]!==void 0){S=t[e[J]],S.onMatch?_=S.onMatch(xe,r,i,u):_=S.token,S.next&&(typeof S.next=="string"?r=S.next:r=S.next(r,i),t=this.states[r],t||(this.reportError("state doesn't exist",r),r="start",t=this.states[r]),e=this.matchMappings[r],f=He,n=this.regExps[r],n.lastIndex=He),S.consumeLineEnd&&(f=He);break}if(xe){if(typeof _=="string")(!S||S.merge!==!1)&&F.type===_?F.value+=xe:(F.type&&d.push(F),F={type:_,value:xe});else if(_){F.type&&d.push(F),F={type:null,value:""};for(var J=0;J<_.length;J++)d.push(_[J])}}if(f==u.length)break;if(f=He,oe++>R){for(oe>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:u});f<u.length;)F.type&&d.push(F),F={value:u.substring(f,f+=500),type:"overflow"};r="start",i=[];break}}return F.type&&d.push(F),i.length>1&&i[0]!==r&&i.unshift("#tmp",r),{tokens:d,state:i.length?i:r}},l}();M.prototype.reportError=W,m.Tokenizer=M}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(p,m,Vn){var W=p("../lib/deep_copy").deepCopy,R;R=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(u,o){if(!o){for(var i in u)this.$rules[i]=u[i];return}for(var i in u){for(var r=u[i],t=0;t<r.length;t++){var e=r[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(o)!==0&&(e.next=o+e.next),e.nextState&&e.nextState.indexOf(o)!==0&&(e.nextState=o+e.nextState))}this.$rules[o+i]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(u,o,i,r,t){var e=typeof u=="function"?new u().getRules():u;if(r)for(var n=0;n<r.length;n++)r[n]=o+r[n];else{r=[];for(var a in e)r.push(o+a)}if(this.addRules(e,o),i)for(var d=Array.prototype[t?"push":"unshift"],n=0;n<r.length;n++)d.apply(this.$rules[r[n]],W(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(o)},this.getEmbeds=function(){return this.$embeds};var M=function(u,o){return(u!="start"||o.length)&&o.unshift(this.nextState,u),this.nextState},l=function(u,o){return o.shift(),o.shift()||"start"};this.normalizeRules=function(){var u=0,o=this.$rules;function i(r){var t=o[r];t.processed=!0;for(var e=0;e<t.length;e++){var n=t[e],a=null;Array.isArray(n)&&(a=n,n={}),!n.regex&&n.start&&(n.regex=n.start,n.next||(n.next=[]),n.next.push({defaultToken:n.token},{token:n.token+".end",regex:n.end||n.start,next:"pop"}),n.token=n.token+".start",n.push=!0);var d=n.next||n.push;if(d&&Array.isArray(d)){var f=n.stateName;f||(f=n.token,typeof f!="string"&&(f=f[0]||""),o[f]&&(f+=u++)),o[f]=d,n.next=f,i(f)}else d=="pop"&&(n.next=l);if(n.push&&(n.nextState=n.next||n.push,n.next=M,delete n.push),n.rules)for(var oe in n.rules)o[oe]?o[oe].push&&o[oe].push.apply(o[oe],n.rules[oe]):o[oe]=n.rules[oe];var F=typeof n=="string"?n:n.include;if(F&&(F==="$self"&&(F="start"),Array.isArray(F)?a=F.map(function(S){return o[S]}):a=o[F]),a){var _=[e,1].concat(a);n.noEscape&&(_=_.filter(function(S){return!S.next})),t.splice.apply(t,_),e--}n.keywordMap&&(n.token=this.createKeywordMapper(n.keywordMap,n.defaultToken||"text",n.caseInsensitive),delete n.defaultToken)}}Object.keys(o).forEach(i,this)},this.createKeywordMapper=function(u,o,i,r){var t=Object.create(null);return this.$keywordList=[],Object.keys(u).forEach(function(e){for(var n=u[e],a=n.split(r||"|"),d=a.length;d--;){var f=a[d];this.$keywordList.push(f),i&&(f=f.toLowerCase()),t[f]=e}},this),u=null,i?function(e){return t[e.toLowerCase()]||o}:function(e){return t[e]||o}},this.getKeywords=function(){return this.$keywords}}).call(R.prototype),m.TextHighlightRules=R}),ace.define("ace/mode/behaviour",["require","exports","module"],function(p,m,Vn){var W;W=function(){this.$behaviours={}},(function(){this.add=function(R,M,l){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[R]:this.$behaviours[R]={}}this.$behaviours[R][M]=l},this.addBehaviours=function(R){for(var M in R)for(var l in R[M])this.add(M,l,R[M][l])},this.remove=function(R){this.$behaviours&&this.$behaviours[R]&&delete this.$behaviours[R]},this.inherit=function(R,M){if(typeof R=="function")var l=new R().getBehaviours(M);else var l=R.getBehaviours(M);this.addBehaviours(l)},this.getBehaviours=function(R){if(R){for(var M={},l=0;l<R.length;l++)this.$behaviours[R[l]]&&(M[R[l]]=this.$behaviours[R[l]]);return M}else return this.$behaviours}}).call(W.prototype),m.Behaviour=W}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(p,m,Vn){var W=p("./range").Range,R=function(){function M(l,u,o){this.$session=l,this.$row=u,this.$rowTokens=l.getTokens(u);var i=l.getTokenAt(u,o);this.$tokenIndex=i?i.index:-1}return M.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]},M.prototype.stepForward=function(){this.$tokenIndex+=1;for(var l;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,l||(l=this.$session.getLength()),this.$row>=l)return this.$row=l-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},M.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},M.prototype.getCurrentTokenRow=function(){return this.$row},M.prototype.getCurrentTokenColumn=function(){var l=this.$rowTokens,u=this.$tokenIndex,o=l[u].start;if(o!==void 0)return o;for(o=0;u>0;)u-=1,o+=l[u].value.length;return o},M.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},M.prototype.getCurrentTokenRange=function(){var l=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new W(this.$row,u,this.$row,u+l.value.length)},M}();m.TokenIterator=R}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(p,m,Vn){var W=p("../../lib/oop"),R=p("../behaviour").Behaviour,M=p("../../token_iterator").TokenIterator,l=p("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,r={},t={'"':'"',"'":"'"},e=function(d){var f=-1;if(d.multiSelect&&(f=d.selection.index,r.rangeCount!=d.multiSelect.rangeCount&&(r={rangeCount:d.multiSelect.rangeCount})),r[f])return i=r[f];i=r[f]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},n=function(d,f,oe,F){var _=d.end.row-d.start.row;return{text:oe+f+F,selection:[0,d.start.column+1,_,d.end.column+(_?0:1)]}},a;a=function(d){d=d||{},this.add("braces","insertion",function(f,oe,F,_,S){var xe=F.getCursorPosition(),He=_.doc.getLine(xe.row);if(S=="{"){e(F);var Ae=F.getSelectionRange(),J=_.doc.getTextRange(Ae),Kn=_.getTokenAt(xe.row,xe.column);if(J!==""&&J!=="{"&&F.getWrapBehavioursEnabled())return n(Ae,J,"{","}");if(Kn&&/(?:string)\.quasi|\.xml/.test(Kn.type)){var y=[/tag\-(?:open|name)/,/attribute\-name/];return y.some(function(Qn){return Qn.test(Kn.type)})||/(string)\.quasi/.test(Kn.type)&&Kn.value[xe.column-Kn.start-1]!=="$"?void 0:(a.recordAutoInsert(F,_,"}"),{text:"{}",selection:[1,1]})}else if(a.isSaneInsertion(F,_))return/[\]\}\)]/.test(He[xe.column])||F.inMultiSelectMode||d.braces?(a.recordAutoInsert(F,_,"}"),{text:"{}",selection:[1,1]}):(a.recordMaybeInsert(F,_,"{"),{text:"{",selection:[1,1]})}else if(S=="}"){e(F);var h=He.substring(xe.column,xe.column+1);if(h=="}"){var w=_.$findOpeningBracket("}",{column:xe.column+1,row:xe.row});if(w!==null&&a.isAutoInsertedClosing(xe,He,S))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(S==`
181
+ `||S==`\r
182
+ `){e(F);var Q="";a.isMaybeInsertedClosing(xe,He)&&(Q=l.stringRepeat("}",i.maybeInsertedBrackets),a.clearMaybeInsertedClosing());var h=He.substring(xe.column,xe.column+1);if(h==="}"){var Me=_.findMatchingBracket({row:xe.row,column:xe.column+1},"}");if(!Me)return null;var Gn=this.$getIndent(_.getLine(Me.row))}else if(Q)var Gn=this.$getIndent(He);else{a.clearMaybeInsertedClosing();return}var Yn=Gn+_.getTabString();return{text:`
183
+ `+Yn+`
184
+ `+Gn+Q,selection:[1,Yn.length,1,Yn.length]}}else a.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(f,oe,F,_,S){var xe=_.doc.getTextRange(S);if(!S.isMultiLine()&&xe=="{"){e(F);var He=_.doc.getLine(S.start.row),Ae=He.substring(S.end.column,S.end.column+1);if(Ae=="}")return S.end.column++,S;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(f,oe,F,_,S){if(S=="("){e(F);var xe=F.getSelectionRange(),He=_.doc.getTextRange(xe);if(He!==""&&F.getWrapBehavioursEnabled())return n(xe,He,"(",")");if(a.isSaneInsertion(F,_))return a.recordAutoInsert(F,_,")"),{text:"()",selection:[1,1]}}else if(S==")"){e(F);var Ae=F.getCursorPosition(),J=_.doc.getLine(Ae.row),Kn=J.substring(Ae.column,Ae.column+1);if(Kn==")"){var y=_.$findOpeningBracket(")",{column:Ae.column+1,row:Ae.row});if(y!==null&&a.isAutoInsertedClosing(Ae,J,S))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(f,oe,F,_,S){var xe=_.doc.getTextRange(S);if(!S.isMultiLine()&&xe=="("){e(F);var He=_.doc.getLine(S.start.row),Ae=He.substring(S.start.column+1,S.start.column+2);if(Ae==")")return S.end.column++,S}}),this.add("brackets","insertion",function(f,oe,F,_,S){if(S=="["){e(F);var xe=F.getSelectionRange(),He=_.doc.getTextRange(xe);if(He!==""&&F.getWrapBehavioursEnabled())return n(xe,He,"[","]");if(a.isSaneInsertion(F,_))return a.recordAutoInsert(F,_,"]"),{text:"[]",selection:[1,1]}}else if(S=="]"){e(F);var Ae=F.getCursorPosition(),J=_.doc.getLine(Ae.row),Kn=J.substring(Ae.column,Ae.column+1);if(Kn=="]"){var y=_.$findOpeningBracket("]",{column:Ae.column+1,row:Ae.row});if(y!==null&&a.isAutoInsertedClosing(Ae,J,S))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(f,oe,F,_,S){var xe=_.doc.getTextRange(S);if(!S.isMultiLine()&&xe=="["){e(F);var He=_.doc.getLine(S.start.row),Ae=He.substring(S.start.column+1,S.start.column+2);if(Ae=="]")return S.end.column++,S}}),this.add("string_dquotes","insertion",function(f,oe,F,_,S){var xe=_.$mode.$quotes||t;if(S.length==1&&xe[S]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(S)!=-1)return;e(F);var He=S,Ae=F.getSelectionRange(),J=_.doc.getTextRange(Ae);if(J!==""&&(J.length!=1||!xe[J])&&F.getWrapBehavioursEnabled())return n(Ae,J,He,He);if(!J){var Kn=F.getCursorPosition(),y=_.doc.getLine(Kn.row),h=y.substring(Kn.column-1,Kn.column),w=y.substring(Kn.column,Kn.column+1),Q=_.getTokenAt(Kn.row,Kn.column),Me=_.getTokenAt(Kn.row,Kn.column+1);if(h=="\\"&&Q&&/escape/.test(Q.type))return null;var Gn=Q&&/string|escape/.test(Q.type),Yn=!Me||/string|escape/.test(Me.type),Qn;if(w==He)Qn=Gn!==Yn,Qn&&/string\.end/.test(Me.type)&&(Qn=!1);else{if(Gn&&!Yn||Gn&&Yn)return null;var Zn=_.$mode.tokenRe;Zn.lastIndex=0;var Jn=Zn.test(h);Zn.lastIndex=0;var ii=Zn.test(w),Xn=_.$mode.$pairQuotesAfter,ei=Xn&&Xn[He]&&Xn[He].test(h);if(!ei&&Jn||ii||w&&!/[\s;,.})\]\\]/.test(w))return null;var ni=y[Kn.column-2];if(h==He&&(ni==He||Zn.test(ni)))return null;Qn=!0}return{text:Qn?He+He:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(f,oe,F,_,S){var xe=_.$mode.$quotes||t,He=_.doc.getTextRange(S);if(!S.isMultiLine()&&xe.hasOwnProperty(He)){e(F);var Ae=_.doc.getLine(S.start.row),J=Ae.substring(S.start.column+1,S.start.column+2);if(J==He)return S.end.column++,S}}),d.closeDocComment!==!1&&this.add("doc comment end","insertion",function(f,oe,F,_,S){if(f==="doc-start"&&(S===`
185
+ `||S===`\r
186
+ `)&&F.selection.isEmpty()){var xe=F.getCursorPosition();if(xe.column===0)return;for(var He=_.doc.getLine(xe.row),Ae=_.doc.getLine(xe.row+1),J=_.getTokens(xe.row),Kn=0,y=0;y<J.length;y++){Kn+=J[y].value.length;var h=J[y];if(Kn>=xe.column){if(Kn===xe.column){if(!/\.doc/.test(h.type))return;if(/\*\//.test(h.value)){var w=J[y+1];if(!w||!/\.doc/.test(w.type))return}}var Q=xe.column-(Kn-h.value.length),Me=h.value.indexOf("*/"),Gn=h.value.indexOf("/**",Me>-1?Me+2:0);if(Gn!==-1&&Q>Gn&&Q<Gn+3||Me!==-1&&Gn!==-1&&Q>=Me&&Q<=Gn||!/\.doc/.test(h.type))return;break}}var Yn=this.$getIndent(He);if(/\s*\*/.test(Ae))return/^\s*\*/.test(He)?{text:S+Yn+"* ",selection:[1,2+Yn.length,1,2+Yn.length]}:{text:S+Yn+" * ",selection:[1,3+Yn.length,1,3+Yn.length]};if(/\/\*\*/.test(He.substring(0,xe.column)))return{text:S+Yn+" * "+S+" "+Yn+"*/",selection:[1,4+Yn.length,1,4+Yn.length]}}})},a.isSaneInsertion=function(d,f){var oe=d.getCursorPosition(),F=new M(f,oe.row,oe.column);if(!this.$matchTokenType(F.getCurrentToken()||"text",u)){if(/[)}\]]/.test(d.session.getLine(oe.row)[oe.column]))return!0;var _=new M(f,oe.row,oe.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",u))return!1}return F.stepForward(),F.getCurrentTokenRow()!==oe.row||this.$matchTokenType(F.getCurrentToken()||"text",o)},a.$matchTokenType=function(d,f){return f.indexOf(d.type||d)>-1},a.recordAutoInsert=function(d,f,oe){var F=d.getCursorPosition(),_=f.doc.getLine(F.row);this.isAutoInsertedClosing(F,_,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=F.row,i.autoInsertedLineEnd=oe+_.substr(F.column),i.autoInsertedBrackets++},a.recordMaybeInsert=function(d,f,oe){var F=d.getCursorPosition(),_=f.doc.getLine(F.row);this.isMaybeInsertedClosing(F,_)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=F.row,i.maybeInsertedLineStart=_.substr(0,F.column)+oe,i.maybeInsertedLineEnd=_.substr(F.column),i.maybeInsertedBrackets++},a.isAutoInsertedClosing=function(d,f,oe){return i.autoInsertedBrackets>0&&d.row===i.autoInsertedRow&&oe===i.autoInsertedLineEnd[0]&&f.substr(d.column)===i.autoInsertedLineEnd},a.isMaybeInsertedClosing=function(d,f){return i.maybeInsertedBrackets>0&&d.row===i.maybeInsertedRow&&f.substr(d.column)===i.maybeInsertedLineEnd&&f.substr(0,d.column)==i.maybeInsertedLineStart},a.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},a.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},W.inherits(a,R),m.CstyleBehaviour=a}),ace.define("ace/unicode",["require","exports","module"],function(p,m,Vn){for(var W=[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],R=0,M=[],l=0;l<W.length;l+=2)M.push(R+=W[l]),W[l+1]&&M.push(45,R+=W[l+1]);m.wordChars=String.fromCharCode.apply(null,M)}),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(p,m,Vn){var W=p("../config"),R=p("../tokenizer").Tokenizer,M=p("./text_highlight_rules").TextHighlightRules,l=p("./behaviour/cstyle").CstyleBehaviour,u=p("../unicode"),o=p("../lib/lang"),i=p("../token_iterator").TokenIterator,r=p("../range").Range,t;t=function(){this.HighlightRules=M},(function(){this.$defaultBehaviour=new l,this.tokenRe=new RegExp("^["+u.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+u.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new R(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,n,a,d){var f=n.doc,oe=!0,F=!0,_=1/0,S=n.getTabSize(),xe=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var J=this.lineCommentStart.map(o.escapeRegExp).join("|"),He=this.lineCommentStart[0];else var J=o.escapeRegExp(this.lineCommentStart),He=this.lineCommentStart;J=new RegExp("^(\\s*)(?:"+J+") ?"),xe=n.getUseSoftTabs();var h=function(ii,Xn){var ei=ii.match(J);if(ei){var ni=ei[1].length,ti=ei[0].length;!Me(ii,ni,ti)&&ei[0][ti-1]==" "&&ti--,f.removeInLine(Xn,ni,ti)}},Q=He+" ",y=function(ii,Xn){(!oe||/\S/.test(ii))&&(Me(ii,_,_)?f.insertInLine({row:Xn,column:_},Q):f.insertInLine({row:Xn,column:_},He))},w=function(ii,Xn){return J.test(ii)},Me=function(ii,Xn,ei){for(var ni=0;Xn--&&ii.charAt(Xn)==" ";)ni++;if(ni%S!=0)return!1;for(var ni=0;ii.charAt(ei++)==" ";)ni++;return S>2?ni%S!=S-1:ni%S==0}}else{if(!this.blockComment)return!1;var He=this.blockComment.start,Ae=this.blockComment.end,J=new RegExp("^(\\s*)(?:"+o.escapeRegExp(He)+")"),Kn=new RegExp("(?:"+o.escapeRegExp(Ae)+")\\s*$"),y=function(Qn,Zn){w(Qn,Zn)||(!oe||/\S/.test(Qn))&&(f.insertInLine({row:Zn,column:Qn.length},Ae),f.insertInLine({row:Zn,column:_},He))},h=function(Qn,Zn){var Jn;(Jn=Qn.match(Kn))&&f.removeInLine(Zn,Qn.length-Jn[0].length,Qn.length),(Jn=Qn.match(J))&&f.removeInLine(Zn,Jn[1].length,Jn[0].length)},w=function(Qn,Zn){if(J.test(Qn))return!0;for(var Jn=n.getTokens(Zn),ii=0;ii<Jn.length;ii++)if(Jn[ii].type==="comment")return!0}}function Gn(Qn){for(var Zn=a;Zn<=d;Zn++)Qn(f.getLine(Zn),Zn)}var Yn=1/0;Gn(function(Qn,Zn){var Jn=Qn.search(/\S/);Jn!==-1?(Jn<_&&(_=Jn),F&&!w(Qn,Zn)&&(F=!1)):Yn>Qn.length&&(Yn=Qn.length)}),_==1/0&&(_=Yn,oe=!1,F=!1),xe&&_%S!=0&&(_=Math.floor(_/S)*S),Gn(F?h:y)},this.toggleBlockComment=function(e,n,a,d){var f=this.blockComment;if(f){!f.start&&f[0]&&(f=f[0]);var oe=new i(n,d.row,d.column),F=oe.getCurrentToken();n.selection;var _=n.selection.toOrientedRange(),S,xe;if(F&&/comment/.test(F.type)){for(var He,Ae;F&&/comment/.test(F.type);){var J=F.value.indexOf(f.start);if(J!=-1){var Kn=oe.getCurrentTokenRow(),y=oe.getCurrentTokenColumn()+J;He=new r(Kn,y,Kn,y+f.start.length);break}F=oe.stepBackward()}for(var oe=new i(n,d.row,d.column),F=oe.getCurrentToken();F&&/comment/.test(F.type);){var J=F.value.indexOf(f.end);if(J!=-1){var Kn=oe.getCurrentTokenRow(),y=oe.getCurrentTokenColumn()+J;Ae=new r(Kn,y,Kn,y+f.end.length);break}F=oe.stepForward()}Ae&&n.remove(Ae),He&&(n.remove(He),S=He.start.row,xe=-f.start.length)}else xe=f.start.length,S=a.start.row,n.insert(a.end,f.end),n.insert(a.start,f.start);_.start.row==S&&(_.start.column+=xe),_.end.row==S&&(_.end.column+=xe),n.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(e,n,a){return this.$getIndent(n)},this.checkOutdent=function(e,n,a){return!1},this.autoOutdent=function(e,n,a){},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 n in e)if(e[n]){var a=e[n],d=a.prototype.$id,f=W.$modes[d];f||(W.$modes[d]=f=new a),W.$modes[n]||(W.$modes[n]=f),this.$embeds.push(n),this.$modes[n]=f}for(var oe=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],F=function(S){(function(xe){var He=oe[S],Ae=xe[He];xe[oe[S]]=function(){return this.$delegator(He,arguments,Ae)}})(_)},_=this,n=0;n<oe.length;n++)F(n)},this.$delegator=function(e,n,a){var d=n[0]||"start";if(typeof d!="string"){if(Array.isArray(d[2])){var f=d[2][d[2].length-1],oe=this.$modes[f];if(oe)return oe[e].apply(oe,[d[1]].concat([].slice.call(n,1)))}d=d[0]||"start"}for(var F=0;F<this.$embeds.length;F++)if(this.$modes[this.$embeds[F]]){var _=d.split(this.$embeds[F]);if(!_[0]&&_[1]){n[0]=_[1];var oe=this.$modes[this.$embeds[F]];return oe[e].apply(oe,n)}}var S=a.apply(this,n);return a?S:void 0},this.transformAction=function(e,n,a,d,f){if(this.$behaviour){var oe=this.$behaviour.getBehaviours();for(var F in oe)if(oe[F][n]){var _=oe[F][n].apply(this,arguments);if(_)return _}}},this.getKeywords=function(e){if(!this.completionKeywords){var n=this.$tokenizer.rules,a=[];for(var d in n)for(var f=n[d],oe=0,F=f.length;oe<F;oe++)if(typeof f[oe].token=="string")/keyword|support|storage/.test(f[oe].token)&&a.push(f[oe].regex);else if(typeof f[oe].token=="object"){for(var _=0,S=f[oe].token.length;_<S;_++)if(/keyword|support|storage/.test(f[oe].token[_])){var d=f[oe].regex.match(/\(.+?\)/g)[_];a.push(d.substr(1,d.length-2))}}this.completionKeywords=a}return e?a.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,n,a,d){var f=this.$keywordList||this.$createKeywordList();return f.map(function(oe){return{name:oe,value:oe,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(p,m,Vn){var W=p("./lib/dom"),R=function(){function M(l){this.session=l,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 M.prototype.getRowLength=function(l){var u;return this.lineWidgets?u=this.lineWidgets[l]&&this.lineWidgets[l].rowCount||0:u=0,!this.$useWrapMode||!this.$wrapData[l]?1+u:this.$wrapData[l].length+1+u},M.prototype.$getWidgetScreenLength=function(){var l=0;return this.lineWidgets.forEach(function(u){u&&u.rowCount&&!u.hidden&&(l+=u.rowCount)}),l},M.prototype.$onChangeEditor=function(l){this.attach(l.editor)},M.prototype.attach=function(l){l&&l.widgetManager&&l.widgetManager!=this&&l.widgetManager.detach(),this.editor!=l&&(this.detach(),this.editor=l,l&&(l.widgetManager=this,l.renderer.on("beforeRender",this.measureWidgets),l.renderer.on("afterRender",this.renderWidgets)))},M.prototype.detach=function(l){var u=this.editor;if(u){this.editor=null,u.widgetManager=null,u.renderer.off("beforeRender",this.measureWidgets),u.renderer.off("afterRender",this.renderWidgets);var o=this.session.lineWidgets;o&&o.forEach(function(i){i&&i.el&&i.el.parentNode&&(i._inDocument=!1,i.el.parentNode.removeChild(i.el))})}},M.prototype.updateOnFold=function(l,u){var o=u.lineWidgets;if(!(!o||!l.action)){for(var i=l.data,r=i.start.row,t=i.end.row,e=l.action=="add",n=r+1;n<t;n++)o[n]&&(o[n].hidden=e);o[t]&&(e?o[r]?o[t].hidden=e:o[r]=o[t]:(o[r]==o[t]&&(o[r]=void 0),o[t].hidden=e))}},M.prototype.updateOnChange=function(l){var u=this.session.lineWidgets;if(u){var o=l.start.row,i=l.end.row-o;if(i!==0)if(l.action=="remove"){var r=u.splice(o+1,i);!u[o]&&r[r.length-1]&&(u[o]=r.pop()),r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(i);u[o]&&u[o].column!=null&&l.start.column>u[o].column&&o++,t.unshift(o,0),u.splice.apply(u,t),this.$updateRows()}}},M.prototype.$updateRows=function(){var l=this.session.lineWidgets;if(l){var u=!0;l.forEach(function(o,i){if(o)for(u=!1,o.row=i;o.$oldWidget;)o.$oldWidget.row=i,o=o.$oldWidget}),u&&(this.session.lineWidgets=null)}},M.prototype.$registerLineWidget=function(l){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[l.row];return u&&(l.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[l.row]=l,l},M.prototype.addLineWidget=function(l){if(this.$registerLineWidget(l),l.session=this.session,!this.editor)return l;var u=this.editor.renderer;l.html&&!l.el&&(l.el=W.createElement("div"),l.el.innerHTML=l.html),l.text&&!l.el&&(l.el=W.createElement("div"),l.el.textContent=l.text),l.el&&(W.addCssClass(l.el,"ace_lineWidgetContainer"),l.className&&W.addCssClass(l.el,l.className),l.el.style.position="absolute",l.el.style.zIndex="5",u.container.appendChild(l.el),l._inDocument=!0,l.coverGutter||(l.el.style.zIndex="3"),l.pixelHeight==null&&(l.pixelHeight=l.el.offsetHeight)),l.rowCount==null&&(l.rowCount=l.pixelHeight/u.layerConfig.lineHeight);var o=this.session.getFoldAt(l.row,0);if(l.$fold=o,o){var i=this.session.lineWidgets;l.row==o.end.row&&!i[o.start.row]?i[o.start.row]=l:l.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(l),l},M.prototype.removeLineWidget=function(l){if(l._inDocument=!1,l.session=null,l.el&&l.el.parentNode&&l.el.parentNode.removeChild(l.el),l.editor&&l.editor.destroy)try{l.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[l.row];if(u==l)this.session.lineWidgets[l.row]=l.$oldWidget,l.$oldWidget&&this.onWidgetChanged(l.$oldWidget);else for(;u;){if(u.$oldWidget==l){u.$oldWidget=l.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows()},M.prototype.getWidgetsAtRow=function(l){for(var u=this.session.lineWidgets,o=u&&u[l],i=[];o;)i.push(o),o=o.$oldWidget;return i},M.prototype.onWidgetChanged=function(l){this.session._changedWidgets.push(l),this.editor&&this.editor.renderer.updateFull()},M.prototype.measureWidgets=function(l,u){var o=this.session._changedWidgets,i=u.layerConfig;if(!(!o||!o.length)){for(var r=1/0,t=0;t<o.length;t++){var e=o[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,u.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/i.characterWidth));var n=e.h/i.lineHeight;e.coverLine&&(n-=this.session.getRowLineCount(e.row),n<0&&(n=0)),e.rowCount!=n&&(e.rowCount=n,e.row<r&&(r=e.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},M.prototype.renderWidgets=function(l,u){var o=u.layerConfig,i=this.session.lineWidgets;if(i){for(var r=Math.min(this.firstRow,o.firstRow),t=Math.max(this.lastRow,o.lastRow,i.length);r>0&&!i[r];)r--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,u.$cursorLayer.config=o;for(var e=r;e<=t;e++){var n=i[e];if(!(!n||!n.el)){if(n.hidden){n.el.style.top=-100-(n.pixelHeight||0)+"px";continue}n._inDocument||(n._inDocument=!0,u.container.appendChild(n.el));var a=u.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;n.coverLine||(a+=o.lineHeight*this.session.getRowLineCount(n.row)),n.el.style.top=a-o.offset+"px";var d=n.coverGutter?0:u.gutterWidth;n.fixedWidth||(d-=u.scrollLeft),n.el.style.left=d+"px",n.fullWidth&&n.screenWidth&&(n.el.style.minWidth=o.width+2*o.padding+"px"),n.fixedWidth?n.el.style.right=u.scrollBar.getWidth()+"px":n.el.style.right=""}}}},M}();m.LineWidgets=R}),ace.define("ace/apply_delta",["require","exports","module"],function(p,m,Vn){m.applyDelta=function(W,R,M){var l=R.start.row,u=R.start.column,o=W[l]||"";switch(R.action){case"insert":var i=R.lines;if(i.length===1)W[l]=o.substring(0,u)+R.lines[0]+o.substring(u);else{var r=[l,1].concat(R.lines);W.splice.apply(W,r),W[l]=o.substring(0,u)+W[l],W[l+R.lines.length-1]+=o.substring(u)}break;case"remove":var t=R.end.column,e=R.end.row;l===e?W[l]=o.substring(0,u)+o.substring(t):W.splice(l,e-l+1,o.substring(0,u)+W[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(p,m,Vn){var W=p("./lib/oop"),R=p("./lib/event_emitter").EventEmitter,M=function(){function o(i,r,t){this.$onChange=this.onChange.bind(this),this.attach(i),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,t)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(i){if(!(i.start.row==i.end.row&&i.start.row!=this.row)&&!(i.start.row>this.row)){var r=u(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},o.prototype.setPosition=function(i,r,t){var e;if(t?e={row:i,column:r}:e=this.$clipPositionToDocument(i,r),!(this.row==e.row&&this.column==e.column)){var n={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:n,value:e})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(i,r){var t={};return i>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):i<0?(t.row=0,t.column=0):(t.row=i,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,r))),r<0&&(t.column=0),t},o}();M.prototype.$insertRight=!1,W.implement(M.prototype,R);function l(o,i,r){var t=r?o.column<=i.column:o.column<i.column;return o.row<i.row||o.row==i.row&&t}function u(o,i,r){var t=o.action=="insert",e=(t?1:-1)*(o.end.row-o.start.row),n=(t?1:-1)*(o.end.column-o.start.column),a=o.start,d=t?a:o.end;return l(i,a,r)?{row:i.row,column:i.column}:l(d,i,!r)?{row:i.row+e,column:i.column+(i.row==d.row?n:0)}:{row:a.row,column:a.column}}m.Anchor=M}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(p,m,Vn){var W=p("./lib/oop"),R=p("./apply_delta").applyDelta,M=p("./lib/event_emitter").EventEmitter,l=p("./range").Range,u=p("./anchor").Anchor,o=function(){function i(r){this.$lines=[""],r.length===0?this.$lines=[""]:Array.isArray(r)?this.insertMergedLines({row:0,column:0},r):this.insert({row:0,column:0},r)}return i.prototype.setValue=function(r){var t=this.getLength()-1;this.remove(new l(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},r||"")},i.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},i.prototype.createAnchor=function(r,t){return new u(this,r,t)},i.prototype.$detectNewLine=function(r){var t=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:`
187
+ `,this._signal("changeNewLineMode")},i.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
188
+ `;case"unix":return`
189
+ `;default:return this.$autoNewLine||`
190
+ `}},i.prototype.setNewLineMode=function(r){this.$newLineMode!==r&&(this.$newLineMode=r,this._signal("changeNewLineMode"))},i.prototype.getNewLineMode=function(){return this.$newLineMode},i.prototype.isNewLine=function(r){return r==`\r
191
+ `||r=="\r"||r==`
192
+ `},i.prototype.getLine=function(r){return this.$lines[r]||""},i.prototype.getLines=function(r,t){return this.$lines.slice(r,t+1)},i.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},i.prototype.getLength=function(){return this.$lines.length},i.prototype.getTextRange=function(r){return this.getLinesForRange(r).join(this.getNewLineCharacter())},i.prototype.getLinesForRange=function(r){var t;if(r.start.row===r.end.row)t=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{t=this.getLines(r.start.row,r.end.row),t[0]=(t[0]||"").substring(r.start.column);var e=t.length-1;r.end.row-r.start.row==e&&(t[e]=t[e].substring(0,r.end.column))}return t},i.prototype.insertLines=function(r,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,t)},i.prototype.removeLines=function(r,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,t)},i.prototype.insertNewLine=function(r){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(r,["",""])},i.prototype.insert=function(r,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(r,this.$split(t))},i.prototype.insertInLine=function(r,t){var e=this.clippedPos(r.row,r.column),n=this.pos(r.row,r.column+t.length);return this.applyDelta({start:e,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},i.prototype.clippedPos=function(r,t){var e=this.getLength();r===void 0?r=e:r<0?r=0:r>=e&&(r=e-1,t=void 0);var n=this.getLine(r);return t==null&&(t=n.length),t=Math.min(Math.max(t,0),n.length),{row:r,column:t}},i.prototype.clonePos=function(r){return{row:r.row,column:r.column}},i.prototype.pos=function(r,t){return{row:r,column:t}},i.prototype.$clipPosition=function(r){var t=this.getLength();return r.row>=t?(r.row=Math.max(0,t-1),r.column=this.getLine(t-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},i.prototype.insertFullLines=function(r,t){r=Math.min(Math.max(r,0),this.getLength());var e=0;r<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),r--,e=this.$lines[r].length),this.insertMergedLines({row:r,column:e},t)},i.prototype.insertMergedLines=function(r,t){var e=this.clippedPos(r.row,r.column),n={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:n,action:"insert",lines:t}),this.clonePos(n)},i.prototype.remove=function(r){var t=this.clippedPos(r.start.row,r.start.column),e=this.clippedPos(r.end.row,r.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},i.prototype.removeInLine=function(r,t,e){var n=this.clippedPos(r,t),a=this.clippedPos(r,e);return this.applyDelta({start:n,end:a,action:"remove",lines:this.getLinesForRange({start:n,end:a})},!0),this.clonePos(n)},i.prototype.removeFullLines=function(r,t){r=Math.min(Math.max(0,r),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&r>0,n=t<this.getLength()-1,a=e?r-1:r,d=e?this.getLine(a).length:0,f=n?t+1:t,oe=n?0:this.getLine(f).length,F=new l(a,d,f,oe),_=this.$lines.slice(r,t+1);return this.applyDelta({start:F.start,end:F.end,action:"remove",lines:this.getLinesForRange(F)}),_},i.prototype.removeNewLine=function(r){r<this.getLength()-1&&r>=0&&this.applyDelta({start:this.pos(r,this.getLine(r).length),end:this.pos(r+1,0),action:"remove",lines:["",""]})},i.prototype.replace=function(r,t){if(r instanceof l||(r=l.fromPoints(r.start,r.end)),t.length===0&&r.isEmpty())return r.start;if(t==this.getTextRange(r))return r.end;this.remove(r);var e;return t?e=this.insert(r.start,t):e=r.start,e},i.prototype.applyDeltas=function(r){for(var t=0;t<r.length;t++)this.applyDelta(r[t])},i.prototype.revertDeltas=function(r){for(var t=r.length-1;t>=0;t--)this.revertDelta(r[t])},i.prototype.applyDelta=function(r,t){var e=r.action=="insert";(e?r.lines.length<=1&&!r.lines[0]:!l.comparePoints(r.start,r.end))||(e&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(R(this.$lines,r,t),this._signal("change",r)))},i.prototype.$safeApplyDelta=function(r){var t=this.$lines.length;(r.action=="remove"&&r.start.row<t&&r.end.row<t||r.action=="insert"&&r.start.row<=t)&&this.applyDelta(r)},i.prototype.$splitAndapplyLargeDelta=function(r,t){for(var e=r.lines,n=e.length-t+1,a=r.start.row,d=r.start.column,f=0,oe=0;f<n;f=oe){oe+=t-1;var F=e.slice(f,oe);F.push(""),this.applyDelta({start:this.pos(a+f,d),end:this.pos(a+oe,d=0),action:r.action,lines:F},!0)}r.lines=e.slice(f),r.start.row=a+f,r.start.column=d,this.applyDelta(r,!0)},i.prototype.revertDelta=function(r){this.$safeApplyDelta({start:this.clonePos(r.start),end:this.clonePos(r.end),action:r.action=="insert"?"remove":"insert",lines:r.lines.slice()})},i.prototype.indexToPosition=function(r,t){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,a=t||0,d=e.length;a<d;a++)if(r-=e[a].length+n,r<0)return{row:a,column:r+e[a].length+n};return{row:d-1,column:r+e[d-1].length+n}},i.prototype.positionToIndex=function(r,t){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,a=0,d=Math.min(r.row,e.length),f=t||0;f<d;++f)a+=e[f].length+n;return a+r.column},i.prototype.$split=function(r){return r.split(/\r\n|\r|\n/)},i}();o.prototype.$autoNewLine="",o.prototype.$newLineMode="auto",W.implement(o.prototype,M),m.Document=o}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(p,m,Vn){var W=p("./lib/oop"),R=p("./lib/event_emitter").EventEmitter,M=function(){function l(u,o){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=u;var i=this;this.$worker=function(){if(i.running){for(var r=new Date,t=i.currentLine,e=-1,n=i.doc,a=t;i.lines[t];)t++;var d=n.getLength(),f=0;for(i.running=!1;t<d;){i.$tokenizeRow(t),e=t;do t++;while(i.lines[t]);if(f++,f%5===0&&new Date-r>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,e==-1&&(e=t),a<=e&&i.fireUpdateEvent(a,e)}}}return l.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(u,o){var i={first:u,last:o};this._signal("update",{data:i})},l.prototype.start=function(u){this.currentLine=Math.min(u||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)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(u){var o=u.start.row,i=u.end.row-o;if(i===0)this.lines[o]=null;else if(u.action=="remove")this.lines.splice(o,i+1,null),this.states.splice(o,i+1,null);else{var r=Array(i+1);r.unshift(o,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},l.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},l.prototype.$tokenizeRow=function(u){var o=this.doc.getLine(u),i=this.states[u-1],r=this.tokenizer.getLineTokens(o,i,u);return this.states[u]+""!=r.state+""?(this.states[u]=r.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=r.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l}();W.implement(M.prototype,R),m.BackgroundTokenizer=M}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(p,m,Vn){var W=p("./lib/lang"),R=p("./range").Range,M=function(){function l(u,o,i){i===void 0&&(i="text"),this.setRegexp(u),this.clazz=o,this.type=i}return l.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},l.prototype.update=function(u,o,i,r){if(this.regExp)for(var t=r.firstRow,e=r.lastRow,n={},a=t;a<=e;a++){var d=this.cache[a];d==null&&(d=W.getMatchOffsets(i.getLine(a),this.regExp),d.length>this.MAX_RANGES&&(d=d.slice(0,this.MAX_RANGES)),d=d.map(function(_){return new R(a,_.offset,a,_.offset+_.length)}),this.cache[a]=d.length?d:"");for(var f=d.length;f--;){var oe=d[f].toScreenRange(i),F=oe.toString();n[F]||(n[F]=!0,o.drawSingleLineMarker(u,oe,this.clazz,r))}}},l}();M.prototype.MAX_RANGES=500,m.SearchHighlight=M}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(p,m,Vn){var W=function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(S){this.$session=S},_.prototype.add=function(S,xe,He){if(!this.$fromUndo&&S!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),xe===!1||!this.lastDeltas){this.lastDeltas=[];var Ae=this.$undoStack.length;Ae>this.$undoDepth-1&&this.$undoStack.splice(0,Ae-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),S.id=this.$rev=++this.$maxRev}(S.action=="remove"||S.action=="insert")&&(this.$lastDelta=S),this.lastDeltas.push(S)}},_.prototype.addSelection=function(S,xe){this.selections.push({value:S,rev:xe||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(S,xe){xe==null&&(xe=this.$rev+1);for(var He=this.$undoStack,Ae=He.length;Ae--;){var J=He[Ae][0];if(J.id<=S)break;J.id<xe&&(J.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(S,xe){for(var He=this.selections,Ae=He.length;Ae--;){var J=He[Ae];if(J.rev<S)return xe&&(J=He[Ae+1]),J}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(S,xe){xe==null&&(xe=this.$rev+1);for(var He=this.$undoStack,Ae=null,J=0,Kn=He.length;Kn--;){var y=He[Kn][0];if(y.id<xe&&!Ae&&(Ae=Kn+1),y.id<=S){J=Kn+1;break}}return He.slice(J,Ae)},_.prototype.getChangedRanges=function(S,xe){xe==null&&(xe=this.$rev+1)},_.prototype.getChangedLines=function(S,xe){xe==null&&(xe=this.$rev+1)},_.prototype.undo=function(S,xe){this.lastDeltas=null;var He=this.$undoStack;if(R(He,He.length)){S||(S=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var Ae=He.pop(),J=null;return Ae&&(J=S.undoChanges(Ae,xe),this.$redoStack.push(Ae),this.$syncRev()),this.$fromUndo=!1,J}},_.prototype.redo=function(S,xe){if(this.lastDeltas=null,S||(S=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var He=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);F(this.$redoStack,He),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(Kn){Kn[0].id=++this.$maxRev},this)}var Ae=this.$redoStack.pop(),J=null;return Ae&&(J=S.redoChanges(Ae,xe),this.$undoStack.push(Ae),this.$syncRev()),this.$fromUndo=!1,J},_.prototype.$syncRev=function(){var S=this.$undoStack,xe=S[S.length-1],He=xe&&xe[0].id||0;this.$redoStackBaseRev=He,this.$rev=He},_.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=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(S){S==null&&(S=this.$rev),this.mark=S},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(S){this.reset(),this.$undoStack=S.$undoStack,this.$redoStack=S.$redoStack},_.prototype.$prettyPrint=function(S){return S?i(S):i(this.$undoStack)+`
193
+ ---
194
+ `+i(this.$redoStack)},_}();W.prototype.hasUndo=W.prototype.canUndo,W.prototype.hasRedo=W.prototype.canRedo,W.prototype.isClean=W.prototype.isAtBookmark,W.prototype.markClean=W.prototype.bookmark;function R(_,S){for(var xe=S;xe--;){var He=_[xe];if(He&&!He[0].ignore){for(;xe<S-1;){var Ae=e(_[xe],_[xe+1]);_[xe]=Ae[0],_[xe+1]=Ae[1],xe++}return!0}}}var M=p("./range").Range,l=M.comparePoints;M.comparePoints;function u(_){return{row:_.row,column:_.column}}function o(_){return{start:u(_.start),end:u(_.end),action:_.action,lines:_.lines.slice()}}function i(_){if(_=_||this,Array.isArray(_))return _.map(i).join(`
195
+ `);var S="";return _.action?(S=_.action=="insert"?"+":"-",S+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?S=_.value.map(r).join(`
196
+ `):S=r(_.value)),_.start&&(S+=r(_)),(_.id||_.rev)&&(S+=" ("+(_.id||_.rev)+")"),S}function r(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function t(_,S){var xe=_.action=="insert",He=S.action=="insert";if(xe&&He)if(l(S.start,_.end)>=0)a(S,_,-1);else if(l(S.start,_.start)<=0)a(_,S,1);else return null;else if(xe&&!He)if(l(S.start,_.end)>=0)a(S,_,-1);else if(l(S.end,_.start)<=0)a(_,S,-1);else return null;else if(!xe&&He)if(l(S.start,_.start)>=0)a(S,_,1);else if(l(S.start,_.start)<=0)a(_,S,1);else return null;else if(!xe&&!He)if(l(S.start,_.start)>=0)a(S,_,1);else if(l(S.end,_.start)<=0)a(_,S,-1);else return null;return[S,_]}function e(_,S){for(var xe=_.length;xe--;)for(var He=0;He<S.length;He++)if(!t(_[xe],S[He])){for(;xe<_.length;){for(;He--;)t(S[He],_[xe]);He=S.length,xe++}return[_,S]}return _.selectionBefore=S.selectionBefore=_.selectionAfter=S.selectionAfter=null,[S,_]}function n(_,S){var xe=_.action=="insert",He=S.action=="insert";if(xe&&He)l(_.start,S.start)<0?a(S,_,1):a(_,S,1);else if(xe&&!He)l(_.start,S.end)>=0?a(_,S,-1):(l(_.start,S.start)<=0||a(_,M.fromPoints(S.start,_.start),-1),a(S,_,1));else if(!xe&&He)l(S.start,_.end)>=0?a(S,_,-1):(l(S.start,_.start)<=0||a(S,M.fromPoints(_.start,S.start),-1),a(_,S,1));else if(!xe&&!He)if(l(S.start,_.end)>=0)a(S,_,-1);else if(l(S.end,_.start)<=0)a(_,S,-1);else{var Ae,J;return l(_.start,S.start)<0&&(Ae=_,_=f(_,S.start)),l(_.end,S.end)>0&&(J=f(_,S.end)),d(S.end,_.start,_.end,-1),J&&!Ae&&(_.lines=J.lines,_.start=J.start,_.end=J.end,J=_),[S,Ae,J].filter(Boolean)}return[S,_]}function a(_,S,xe){d(_.start,S.start,S.end,xe),d(_.end,S.start,S.end,xe)}function d(_,S,xe,He){_.row==(He==1?S:xe).row&&(_.column+=He*(xe.column-S.column)),_.row+=He*(xe.row-S.row)}function f(_,S){var xe=_.lines,He=_.end;_.end=u(S);var Ae=_.end.row-_.start.row,J=xe.splice(Ae,xe.length),Kn=Ae?S.column:S.column-_.start.column;xe.push(J[0].substring(0,Kn)),J[0]=J[0].substr(Kn);var y={start:u(S),end:He,lines:J,action:_.action};return y}function oe(_,S){S=o(S);for(var xe=_.length;xe--;){for(var He=_[xe],Ae=0;Ae<He.length;Ae++){var J=He[Ae],Kn=n(J,S);S=Kn[0],Kn.length!=2&&(Kn[2]?(He.splice(Ae+1,1,Kn[1],Kn[2]),Ae++):Kn[1]||(He.splice(Ae,1),Ae--))}He.length||_.splice(xe,1)}return _}function F(_,S){for(var xe=0;xe<S.length;xe++)for(var He=S[xe],Ae=0;Ae<He.length;Ae++)oe(_,He[Ae])}m.UndoManager=W}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(p,m,Vn){var W=p("../range").Range,R=function(){function M(l,u){this.foldData=l,Array.isArray(u)?this.folds=u:u=this.folds=[u];var o=u[u.length-1];this.range=new W(u[0].start.row,u[0].start.column,o.end.row,o.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(i){i.setFoldLine(this)},this)}return M.prototype.shiftRow=function(l){this.start.row+=l,this.end.row+=l,this.folds.forEach(function(u){u.start.row+=l,u.end.row+=l})},M.prototype.addFold=function(l){if(l.sameRow){if(l.start.row<this.startRow||l.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(l),this.folds.sort(function(u,o){return-u.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(l.start.row,l.start.column)>0?(this.end.row=l.end.row,this.end.column=l.end.column):this.range.compareStart(l.end.row,l.end.column)<0&&(this.start.row=l.start.row,this.start.column=l.start.column)}else if(l.start.row==this.end.row)this.folds.push(l),this.end.row=l.end.row,this.end.column=l.end.column;else if(l.end.row==this.start.row)this.folds.unshift(l),this.start.row=l.start.row,this.start.column=l.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");l.foldLine=this},M.prototype.containsRow=function(l){return l>=this.start.row&&l<=this.end.row},M.prototype.walk=function(l,u,o){var i=0,r=this.folds,t,e,n,a=!0;u==null&&(u=this.end.row,o=this.end.column);for(var d=0;d<r.length;d++){if(t=r[d],e=t.range.compareStart(u,o),e==-1){l(null,u,o,i,a);return}if(n=l(null,t.start.row,t.start.column,i,a),n=!n&&l(t.placeholder,t.start.row,t.start.column,i),n||e===0)return;a=!t.sameRow,i=t.end.column}l(null,u,o,i,a)},M.prototype.getNextFoldTo=function(l,u){for(var o,i,r=0;r<this.folds.length;r++){if(o=this.folds[r],i=o.range.compareEnd(l,u),i==-1)return{fold:o,kind:"after"};if(i===0)return{fold:o,kind:"inside"}}return null},M.prototype.addRemoveChars=function(l,u,o){var i=this.getNextFoldTo(l,u),r,t;if(i){if(r=i.fold,i.kind=="inside"&&r.start.column!=u&&r.start.row!=l)window.console&&window.console.log(l,u,r);else if(r.start.row==l){t=this.folds;var e=t.indexOf(r);for(e===0&&(this.start.column+=o),e;e<t.length;e++){if(r=t[e],r.start.column+=o,!r.sameRow)return;r.end.column+=o}this.end.column+=o}}},M.prototype.split=function(l,u){var o=this.getNextFoldTo(l,u);if(!o||o.kind=="inside")return null;var i=o.fold,r=this.folds,t=this.foldData,e=r.indexOf(i),n=r[e-1];this.end.row=n.end.row,this.end.column=n.end.column,r=r.splice(e,r.length-e);var a=new M(t,r);return t.splice(t.indexOf(this)+1,0,a),a},M.prototype.merge=function(l){for(var u=l.folds,o=0;o<u.length;o++)this.addFold(u[o]);var i=this.foldData;i.splice(i.indexOf(l),1)},M.prototype.toString=function(){var l=[this.range.toString()+": ["];return this.folds.forEach(function(u){l.push(" "+u.toString())}),l.push("]"),l.join(`
197
+ `)},M.prototype.idxToPosition=function(l){for(var u=0,o=0;o<this.folds.length;o++){var i=this.folds[o];if(l-=i.start.column-u,l<0)return{row:i.start.row,column:i.start.column+l};if(l-=i.placeholder.length,l<0)return i.start;u=i.end.column}return{row:this.end.row,column:this.end.column+l}},M}();m.FoldLine=R}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(p,m,Vn){var W=p("./range").Range,R=W.comparePoints,M=function(){function l(){this.ranges=[],this.$bias=1}return l.prototype.pointIndex=function(u,o,i){for(var r=this.ranges,t=i||0;t<r.length;t++){var e=r[t],n=R(u,e.end);if(!(n>0)){var a=R(u,e.start);return n===0?o&&a!==0?-t-2:t:a>0||a===0&&!o?t:-t-1}}return-t-1},l.prototype.add=function(u){var o=!u.isEmpty(),i=this.pointIndex(u.start,o);i<0&&(i=-i-1);var r=this.pointIndex(u.end,o,i);return r<0?r=-r-1:r++,this.ranges.splice(i,r-i,u)},l.prototype.addList=function(u){for(var o=[],i=u.length;i--;)o.push.apply(o,this.add(u[i]));return o},l.prototype.substractPoint=function(u){var o=this.pointIndex(u);if(o>=0)return this.ranges.splice(o,1)},l.prototype.merge=function(){var u=[],o=this.ranges;o=o.sort(function(n,a){return R(n.start,a.start)});for(var i=o[0],r,t=1;t<o.length;t++){r=i,i=o[t];var e=R(r.end,i.start);e<0||e==0&&!r.isEmpty()&&!i.isEmpty()||(R(r.end,i.end)<0&&(r.end.row=i.end.row,r.end.column=i.end.column),o.splice(t,1),u.push(i),i=r,t--)}return this.ranges=o,u},l.prototype.contains=function(u,o){return this.pointIndex({row:u,column:o})>=0},l.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},l.prototype.rangeAtPoint=function(u){var o=this.pointIndex(u);if(o>=0)return this.ranges[o]},l.prototype.clipRows=function(u,o){var i=this.ranges;if(i[0].start.row>o||i[i.length-1].start.row<u)return[];var r=this.pointIndex({row:u,column:0});r<0&&(r=-r-1);var t=this.pointIndex({row:o,column:0},r);t<0&&(t=-t-1);for(var e=[],n=r;n<t;n++)e.push(i[n]);return e},l.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},l.prototype.attach=function(u){this.session&&this.detach(),this.session=u,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},l.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},l.prototype.$onChange=function(u){for(var o=u.start,i=u.end,r=o.row,t=i.row,e=this.ranges,n=0,a=e.length;n<a;n++){var d=e[n];if(d.end.row>=r)break}if(u.action=="insert")for(var f=t-r,oe=-o.column+i.column;n<a;n++){var d=e[n];if(d.start.row>r)break;if(d.start.row==r&&d.start.column>=o.column&&(d.start.column==o.column&&this.$bias<=0||(d.start.column+=oe,d.start.row+=f)),d.end.row==r&&d.end.column>=o.column){if(d.end.column==o.column&&this.$bias<0)continue;d.end.column==o.column&&oe>0&&n<a-1&&d.end.column>d.start.column&&d.end.column==e[n+1].start.column&&(d.end.column-=oe),d.end.column+=oe,d.end.row+=f}}else for(var f=r-t,oe=o.column-i.column;n<a;n++){var d=e[n];if(d.start.row>t)break;d.end.row<t&&(r<d.end.row||r==d.end.row&&o.column<d.end.column)?(d.end.row=r,d.end.column=o.column):d.end.row==t?d.end.column<=i.column?(f||d.end.column>o.column)&&(d.end.column=o.column,d.end.row=o.row):(d.end.column+=oe,d.end.row+=f):d.end.row>t&&(d.end.row+=f),d.start.row<t&&(r<d.start.row||r==d.start.row&&o.column<d.start.column)?(d.start.row=r,d.start.column=o.column):d.start.row==t?d.start.column<=i.column?(f||d.start.column>o.column)&&(d.start.column=o.column,d.start.row=o.row):(d.start.column+=oe,d.start.row+=f):d.start.row>t&&(d.start.row+=f)}if(f!=0&&n<a)for(;n<a;n++){var d=e[n];d.start.row+=f,d.end.row+=f}},l}();M.prototype.comparePoints=R,m.RangeList=M}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(p,m,Vn){var W=this&&this.__extends||function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(n[d]=a[d])},r(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");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),R=p("../range_list").RangeList,M=function(r){W(t,r);function t(e,n){var a=r.call(this)||this;return a.foldLine=null,a.placeholder=n,a.range=e,a.start=e.start,a.end=e.end,a.sameRow=e.start.row==e.end.row,a.subFolds=a.ranges=[],a}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(n){n.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),n=new t(e,this.placeholder);return this.subFolds.forEach(function(a){n.subFolds.push(a.clone())}),n.collapseChildren=this.collapseChildren,n},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){u(e,this.start);for(var oe=e.start.row,F=e.start.column,n=0,a=-1;n<this.subFolds.length&&(a=this.subFolds[n].range.compare(oe,F),a==1);n++);var d=this.subFolds[n],f=0;if(a==0){if(d.range.containsRange(e))return d.addSubFold(e);f=1}for(var oe=e.range.end.row,F=e.range.end.column,_=n,a=-1;_<this.subFolds.length&&(a=this.subFolds[_].range.compare(oe,F),a==1);_++);a==0&&_++;for(var S=this.subFolds.splice(n,_-n,e),xe=a==0?S.length-1:S.length,He=f;He<xe;He++)e.addSubFold(S[He]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return i(e,this.start)},t}(R);function l(r,t){r.row-=t.row,r.row==0&&(r.column-=t.column)}function u(r,t){l(r.start,t),l(r.end,t)}function o(r,t){r.row==0&&(r.column+=t.column),r.row+=t.row}function i(r,t){o(r.start,t),o(r.end,t)}m.Fold=M}),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(p,m,Vn){var W=p("../range").Range,R=p("./fold_line").FoldLine,M=p("./fold").Fold,l=p("../token_iterator").TokenIterator,u=p("../mouse/mouse_event").MouseEvent;function o(){this.getFoldAt=function(i,r,t){var e=this.getFoldLine(i);if(!e)return null;for(var n=e.folds,a=0;a<n.length;a++){var d=n[a].range;if(d.contains(i,r)){if(t==1&&d.isEnd(i,r)&&!d.isEmpty())continue;if(t==-1&&d.isStart(i,r)&&!d.isEmpty())continue;return n[a]}}},this.getFoldsInRange=function(i){var r=i.start,t=i.end,e=this.$foldData,n=[];r.column+=1,t.column-=1;for(var a=0;a<e.length;a++){var d=e[a].range.compareRange(i);if(d!=2){if(d==-2)break;for(var f=e[a].folds,oe=0;oe<f.length;oe++){var F=f[oe];if(d=F.range.compareRange(i),d==-2)break;if(d==2)continue;if(d==42)break;n.push(F)}}}return r.column-=1,t.column+=1,n},this.getFoldsInRangeList=function(i){if(Array.isArray(i)){var r=[];i.forEach(function(t){r=r.concat(this.getFoldsInRange(t))},this)}else var r=this.getFoldsInRange(i);return r},this.getAllFolds=function(){for(var i=[],r=this.$foldData,t=0;t<r.length;t++)for(var e=0;e<r[t].folds.length;e++)i.push(r[t].folds[e]);return i},this.getFoldStringAt=function(i,r,t,e){if(e=e||this.getFoldLine(i),!e)return null;for(var n={end:{column:0}},a,d,f=0;f<e.folds.length;f++){d=e.folds[f];var oe=d.range.compareEnd(i,r);if(oe==-1){a=this.getLine(d.start.row).substring(n.end.column,d.start.column);break}else if(oe===0)return null;n=d}return a||(a=this.getLine(d.start.row).substring(n.end.column)),t==-1?a.substring(0,r-n.end.column):t==1?a.substring(r-n.end.column):a},this.getFoldLine=function(i,r){var t=this.$foldData,e=0;for(r&&(e=t.indexOf(r)),e==-1&&(e=0),e;e<t.length;e++){var n=t[e];if(n.start.row<=i&&n.end.row>=i)return n;if(n.end.row>i)return null}return null},this.getNextFoldLine=function(i,r){var t=this.$foldData,e=0;for(r&&(e=t.indexOf(r)),e==-1&&(e=0),e;e<t.length;e++){var n=t[e];if(n.end.row>=i)return n}return null},this.getFoldedRowCount=function(i,r){for(var t=this.$foldData,e=r-i+1,n=0;n<t.length;n++){var a=t[n],d=a.end.row,f=a.start.row;if(d>=r){f<r&&(f>=i?e-=r-f:e=0);break}else d>=i&&(f>=i?e-=d-f:e-=d-i+1)}return e},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(r,t){return r.start.row-t.start.row}),i},this.addFold=function(i,r){var t=this.$foldData,e=!1,n;i instanceof M?n=i:(n=new M(r,i),n.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(n.range);var a=n.start.row,d=n.start.column,f=n.end.row,oe=n.end.column,F=this.getFoldAt(a,d,1),_=this.getFoldAt(f,oe,-1);if(F&&_==F)return F.addSubFold(n);F&&!F.range.isStart(a,d)&&this.removeFold(F),_&&!_.range.isEnd(f,oe)&&this.removeFold(_);var S=this.getFoldsInRange(n.range);S.length>0&&(this.removeFolds(S),n.collapseChildren||S.forEach(function(J){n.addSubFold(J)}));for(var xe=0;xe<t.length;xe++){var He=t[xe];if(f==He.start.row){He.addFold(n),e=!0;break}else if(a==He.end.row){if(He.addFold(n),e=!0,!n.sameRow){var Ae=t[xe+1];if(Ae&&Ae.start.row==f){He.merge(Ae);break}}break}else if(f<=He.start.row)break}return e||(He=this.$addFoldLine(new R(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(He.start.row,He.start.row):this.$updateRowLengthCache(He.start.row,He.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(i){i.forEach(function(r){this.addFold(r)},this)},this.removeFold=function(i){var r=i.foldLine,t=r.start.row,e=r.end.row,n=this.$foldData,a=r.folds;if(a.length==1)n.splice(n.indexOf(r),1);else if(r.range.isEnd(i.end.row,i.end.column))a.pop(),r.end.row=a[a.length-1].end.row,r.end.column=a[a.length-1].end.column;else if(r.range.isStart(i.start.row,i.start.column))a.shift(),r.start.row=a[0].start.row,r.start.column=a[0].start.column;else if(i.sameRow)a.splice(a.indexOf(i),1);else{var d=r.split(i.start.row,i.start.column);a=d.folds,a.shift(),d.start.row=a[0].start.row,d.start.column=a[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:i,action:"remove"})},this.removeFolds=function(i){for(var r=[],t=0;t<i.length;t++)r.push(i[t]);r.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(i){this.removeFold(i),i.subFolds.forEach(function(r){i.restoreRange(r),this.addFold(r)},this),i.collapseChildren>0&&this.foldAll(i.start.row+1,i.end.row,i.collapseChildren-1),i.subFolds=[]},this.expandFolds=function(i){i.forEach(function(r){this.expandFold(r)},this)},this.unfold=function(i,r){var t,e;if(i==null)t=new W(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof i=="number")t=new W(i,0,i,this.getLine(i).length);else if("row"in i)t=W.fromPoints(i,i);else{if(Array.isArray(i))return e=[],i.forEach(function(a){e=e.concat(this.unfold(a))},this),e;t=i}e=this.getFoldsInRangeList(t);for(var n=e;e.length==1&&W.comparePoints(e[0].start,t.start)<0&&W.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(r!=!1?this.removeFolds(e):this.expandFolds(e),n.length)return n},this.isRowFolded=function(i,r){return!!this.getFoldLine(i,r)},this.getRowFoldEnd=function(i,r){var t=this.getFoldLine(i,r);return t?t.end.row:i},this.getRowFoldStart=function(i,r){var t=this.getFoldLine(i,r);return t?t.start.row:i},this.getFoldDisplayLine=function(i,r,t,e,n){e==null&&(e=i.start.row),n==null&&(n=0),r==null&&(r=i.end.row),t==null&&(t=this.getLine(r).length);var a=this.doc,d="";return i.walk(function(f,oe,F,_){if(!(oe<e)){if(oe==e){if(F<n)return;_=Math.max(n,_)}f!=null?d+=f:d+=a.getLine(oe).substring(_,F)}},r,t),d},this.getDisplayLine=function(i,r,t,e){var n=this.getFoldLine(i);if(n)return this.getFoldDisplayLine(n,i,r,t,e);var a;return a=this.doc.getLine(i),a.substring(e||0,r||a.length)},this.$cloneFoldData=function(){var i=[];return i=this.$foldData.map(function(r){var t=r.folds.map(function(e){return e.clone()});return new R(i,t)}),i},this.toggleFold=function(i){var r=this.selection,t=r.getRange(),e,n;if(t.isEmpty()){var a=t.start;if(e=this.getFoldAt(a.row,a.column),e){this.expandFold(e);return}else(n=this.findMatchingBracket(a))?t.comparePoint(n)==1?t.end=n:(t.start=n,t.start.column++,t.end.column--):(n=this.findMatchingBracket({row:a.row,column:a.column+1}))?(t.comparePoint(n)==1?t.end=n:t.start=n,t.start.column++):t=this.getCommentFoldRange(a.row,a.column)||t}else{var d=this.getFoldsInRange(t);if(i&&d.length){this.expandFolds(d);return}else d.length==1&&(e=d[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var f="...";if(!t.isMultiLine()){if(f=this.getTextRange(t),f.length<4)return;f=f.trim().substring(0,2)+".."}this.addFold(f,t)},this.getCommentFoldRange=function(i,r,t){var e=new l(this,i,r),n=e.getCurrentToken(),a=n&&n.type;if(n&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],a=="comment"&&(a+="|doc-start|\\.doc");var d=new RegExp(a),f=new W;if(t!=1){do n=e.stepBackward();while(n&&d.test(n.type));n=e.stepForward()}f.start.row=e.getCurrentTokenRow(),f.start.column=e.getCurrentTokenColumn()+n.value.length,e=new l(this,i,r);var oe=this.getState(e.$row);if(t!=-1){var F=-1;do if(n=e.stepForward(),F==-1){var _=this.getState(e.$row);oe.toString()!==_.toString()&&(F=e.$row)}else if(e.$row>F)break;while(n&&d.test(n.type));n=e.stepBackward()}else n=e.getCurrentToken();return f.end.row=e.getCurrentTokenRow(),f.end.column=e.getCurrentTokenColumn(),f}},this.foldAll=function(i,r,t,e){t==null&&(t=1e5);var n=this.foldWidgets;if(n){r=r||this.getLength(),i=i||0;for(var a=i;a<r;a++)if(n[a]==null&&(n[a]=this.getFoldWidget(a)),n[a]=="start"&&!(e&&!e(a))){var d=this.getFoldWidgetRange(a);d&&d.isMultiLine()&&d.end.row<=r&&d.start.row>=i&&(a=d.end.row,d.collapseChildren=t,this.addFold("...",d))}}},this.foldToLevel=function(i){for(this.foldAll();i-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var i=this;this.foldAll(null,null,null,function(r){for(var t=i.getTokens(r),e=0;e<t.length;e++){var n=t[e];if(!(n.type=="text"&&/^\s+$/.test(n.value)))return!!/comment/.test(n.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(i){if(!this.$foldStyles[i])throw new Error("invalid fold style: "+i+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=i){this.$foldStyle=i,i=="manual"&&this.unfold();var r=this.$foldMode;this.$setFolding(null),this.$setFolding(r)}},this.$setFolding=function(i){if(this.$foldMode!=i){if(this.$foldMode=i,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!i||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=i.getFoldWidget.bind(i,this,this.$foldStyle),this.getFoldWidgetRange=i.getFoldWidgetRange.bind(i,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(i,r){var t=this.foldWidgets;if(!t||r&&t[i])return{};for(var e=i-1,n;e>=0;){var a=t[e];if(a==null&&(a=t[e]=this.getFoldWidget(e)),a=="start"){var d=this.getFoldWidgetRange(e);if(n||(n=d),d&&d.end.row>=i)break}e--}return{range:e!==-1&&d,firstRange:n}},this.onFoldWidgetClick=function(i,r){r instanceof u&&(r=r.domEvent);var t={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},e=this.$toggleFoldWidget(i,t);if(!e){var n=r.target||r.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,r){if(this.getFoldWidget){var t=this.getFoldWidget(i),e=this.getLine(i),n=t==="end"?-1:1,a=this.getFoldAt(i,n===-1?0:e.length,n);if(a)return r.children||r.all?this.removeFold(a):this.expandFold(a),a;var d=this.getFoldWidgetRange(i,!0);if(d&&!d.isMultiLine()&&(a=this.getFoldAt(d.start.row,d.start.column,1),a&&d.isEqual(a.range)))return this.removeFold(a),a;if(r.siblings){var f=this.getParentFoldRangeData(i);if(f.range)var oe=f.range.start.row+1,F=f.range.end.row;this.foldAll(oe,F,r.all?1e4:0)}else r.children?(F=d?d.end.row:this.getLength(),this.foldAll(i+1,F,r.all?1e4:0)):d&&(r.all&&(d.collapseChildren=1e4),this.addFold("...",d));return d}},this.toggleFoldWidget=function(i){var r=this.selection.getCursor().row;r=this.getRowFoldStart(r);var t=this.$toggleFoldWidget(r,{});if(!t){var e=this.getParentFoldRangeData(r,!0);if(t=e.range||e.firstRange,t){r=t.start.row;var n=this.getFoldAt(r,this.getLine(r).length,1);n?this.removeFold(n):this.addFold("...",t)}}},this.updateFoldWidgets=function(i){var r=i.start.row,t=i.end.row-r;if(t===0)this.foldWidgets[r]=null;else if(i.action=="remove")this.foldWidgets.splice(r,t+1,null);else{var e=Array(t+1);e.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(i){var r=i.data;r.first!=r.last&&this.foldWidgets.length>r.first&&this.foldWidgets.splice(r.first,this.foldWidgets.length)}}m.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(p,m,Vn){var W=p("../token_iterator").TokenIterator,R=p("../range").Range;function M(){this.findMatchingBracket=function(l,u){if(l.column==0)return null;var o=u||this.getLine(l.row).charAt(l.column-1);if(o=="")return null;var i=o.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],l):this.$findOpeningBracket(i[2],l):null},this.getBracketRange=function(l){var u=this.getLine(l.row),o=!0,i,r=u.charAt(l.column-1),t=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(t||(r=u.charAt(l.column),l={row:l.row,column:l.column+1},t=r&&r.match(/([\(\[\{])|([\)\]\}])/),o=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],l);if(!e)return null;i=R.fromPoints(l,e),o||(i.end.column++,i.start.column--),i.cursor=i.end}else{var e=this.$findOpeningBracket(t[2],l);if(!e)return null;i=R.fromPoints(e,l),o||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(l,u){var o=this.getLine(l.row),i=/([\(\[\{])|([\)\]\}])/,r=!u&&o.charAt(l.column-1),t=r&&r.match(i);if(t||(r=(u===void 0||u)&&o.charAt(l.column),l={row:l.row,column:l.column+1},t=r&&r.match(i)),!t)return null;var e=new R(l.row,l.column-1,l.row,l.column),n=t[1]?this.$findClosingBracket(t[1],l):this.$findOpeningBracket(t[2],l);if(!n)return[e];var a=new R(n.row,n.column,n.row,n.column+1);return[e,a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(l,u,o){var i=this.$brackets[l],r=1,t=new W(this,u.row,u.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){o||(o=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var n=u.column-t.getCurrentTokenColumn()-2,a=e.value;;){for(;n>=0;){var d=a.charAt(n);if(d==i){if(r-=1,r==0)return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else d==l&&(r+=1);n-=1}do e=t.stepBackward();while(e&&!o.test(e.type));if(e==null)break;a=e.value,n=a.length-1}return null}},this.$findClosingBracket=function(l,u,o){var i=this.$brackets[l],r=1,t=new W(this,u.row,u.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){o||(o=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var n=u.column-t.getCurrentTokenColumn();;){for(var a=e.value,d=a.length;n<d;){var f=a.charAt(n);if(f==i){if(r-=1,r==0)return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else f==l&&(r+=1);n+=1}do e=t.stepForward();while(e&&!o.test(e.type));if(e==null)break;n=0}return null}},this.getMatchingTags=function(l){var u=new W(this,l.row,l.column),o=this.$findTagName(u);if(o){var i=u.stepBackward();return i.value==="<"?this.$findClosingTag(u,o):this.$findOpeningTag(u,o)}},this.$findTagName=function(l){var u=l.getCurrentToken(),o=!1,i=!1;if(u&&u.type.indexOf("tag-name")===-1)do i?u=l.stepBackward():u=l.stepForward(),u&&(u.value==="/>"?i=!0:u.type.indexOf("tag-name")!==-1&&(o=!0));while(u&&!o);return u},this.$findClosingTag=function(l,u){var o,i=u.value,r=u.value,t=0,e=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);u=l.stepForward();var n=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+u.value.length),a=!1;do{if(o=u,o.type.indexOf("tag-close")!==-1&&!a){var d=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);a=!0}if(u=l.stepForward(),u){if(u.value===">"&&!a){var d=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);a=!0}if(u.type.indexOf("tag-name")!==-1){if(i=u.value,r===i){if(o.value==="<")t++;else if(o.value==="</"&&(t--,t<0)){l.stepBackward();var f=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2);u=l.stepForward();var oe=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=l.stepForward()),u&&u.value===">")var F=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);else return}}}else if(r===i&&u.value==="/>"&&(t--,t<0))var f=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2),oe=f,F=oe,d=new R(n.end.row,n.end.column,n.end.row,n.end.column+1)}}while(u&&t>=0);if(e&&d&&f&&F&&n&&oe)return{openTag:new R(e.start.row,e.start.column,d.end.row,d.end.column),closeTag:new R(f.start.row,f.start.column,F.end.row,F.end.column),openTagName:n,closeTagName:oe}},this.$findOpeningTag=function(l,u){var o=l.getCurrentToken(),i=u.value,r=0,t=l.getCurrentTokenRow(),e=l.getCurrentTokenColumn(),n=e+2,a=new R(t,e,t,n);l.stepForward();var d=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=l.stepForward()),!(!u||u.value!==">")){var f=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);l.stepBackward(),l.stepBackward();do if(u=o,t=l.getCurrentTokenRow(),e=l.getCurrentTokenColumn(),n=e+u.value.length,o=l.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(i===u.value)if(o.value==="<"){if(r++,r>0){var oe=new R(t,e,t,n),F=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);do u=l.stepForward();while(u&&u.value!==">");var _=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else o.value==="</"&&r--}else if(u.value==="/>"){for(var S=0,xe=o;xe;){if(xe.type.indexOf("tag-name")!==-1&&xe.value===i){r--;break}else if(xe.value==="<")break;xe=l.stepBackward(),S++}for(var He=0;He<S;He++)l.stepForward()}}while(o&&r<=0);if(F&&_&&a&&f&&oe&&d)return{openTag:new R(F.start.row,F.start.column,_.end.row,_.end.column),closeTag:new R(a.start.row,a.start.column,f.end.row,f.end.column),openTagName:oe,closeTagName:d}}}}m.BracketMatch=M}),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(p,m,Vn){var W=p("./lib/oop"),R=p("./lib/lang"),M=p("./bidihandler").BidiHandler,l=p("./config"),u=p("./lib/event_emitter").EventEmitter,o=p("./selection").Selection,i=p("./mode/text").Mode,r=p("./range").Range,t=p("./line_widgets").LineWidgets,e=p("./document").Document,n=p("./background_tokenizer").BackgroundTokenizer,a=p("./search_highlight").SearchHighlight,d=p("./undomanager").UndoManager,f=function(){function y(h,w){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"+ ++y.$uid,this.$foldData.toString=function(){return this.join(`
198
+ `)},this.bgTokenizer=new n(new i().getTokenizer(),this);var Q=this;this.bgTokenizer.on("update",function(Me){Q._signal("tokenizerUpdate",Me)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof h!="object"||!h.getLine)&&(h=new e(h)),this.setDocument(h),this.selection=new o(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new M(this),l.resetOptions(this),this.setMode(w),l._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return y.prototype.$initOperationListeners=function(){var h=this;this.curOp=null,this.on("change",function(){h.curOp||(h.startOperation(),h.curOp.selectionBefore=h.$lastSel),h.curOp.docChanged=!0},!0),this.on("changeSelection",function(){h.curOp||(h.startOperation(),h.curOp.selectionBefore=h.$lastSel),h.curOp.selectionChanged=!0},!0),this.$operationResetTimer=R.delayedCall(this.endOperation.bind(this,!0))},y.prototype.startOperation=function(h){if(this.curOp){if(!h||this.curOp.command)return;this.prevOp=this.curOp}h||(h={}),this.$operationResetTimer.schedule(),this.curOp={command:h.command||{},args:h.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",h)},y.prototype.endOperation=function(h){if(this.curOp){if(h&&h.returnValue===!1){this.curOp=null,this._signal("endOperation",h);return}if(h==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var w=this.selection.toJSON();this.curOp.selectionAfter=w,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(w),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",h)}},y.prototype.setDocument=function(h){this.doc&&this.doc.off("change",this.$onChange),this.doc=h,h.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},y.prototype.getDocument=function(){return this.doc},Object.defineProperty(y.prototype,"widgetManager",{get:function(){var h=new t(this);return this.widgetManager=h,this.$editor&&h.attach(this.$editor),h},set:function(h){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:h})},enumerable:!1,configurable:!0}),y.prototype.$resetRowCache=function(h){if(!h){this.$docRowCache=[],this.$screenRowCache=[];return}var w=this.$docRowCache.length,Q=this.$getRowCacheIndex(this.$docRowCache,h)+1;w>Q&&(this.$docRowCache.splice(Q,w),this.$screenRowCache.splice(Q,w))},y.prototype.$getRowCacheIndex=function(h,w){for(var Q=0,Me=h.length-1;Q<=Me;){var Gn=Q+Me>>1,Yn=h[Gn];if(w>Yn)Q=Gn+1;else if(w<Yn)Me=Gn-1;else return Gn}return Q-1},y.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},y.prototype.onChangeFold=function(h){var w=h.data;this.$resetRowCache(w.start.row)},y.prototype.onChange=function(h){this.$modified=!0,this.$bidiHandler.onChange(h),this.$resetRowCache(h.start.row);var w=this.$updateInternalDataOnChange(h);!this.$fromUndo&&this.$undoManager&&(w&&w.length&&(this.$undoManager.add({action:"removeFolds",folds:w},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(h,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(h),this._signal("change",h)},y.prototype.onSelectionChange=function(){this._signal("changeSelection")},y.prototype.setValue=function(h){this.doc.setValue(h),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},y.fromJSON=function(h){typeof h=="string"&&(h=JSON.parse(h));var w=new d;w.$undoStack=h.history.undo,w.$redoStack=h.history.redo,w.mark=h.history.mark,w.$rev=h.history.rev;var Q=new y(h.value);return h.folds.forEach(function(Me){Q.addFold("...",r.fromPoints(Me.start,Me.end))}),Q.setAnnotations(h.annotations),Q.setBreakpoints(h.breakpoints),Q.setMode(h.mode),Q.setScrollLeft(h.scrollLeft),Q.setScrollTop(h.scrollTop),Q.setUndoManager(w),Q.selection.fromJSON(h.selection),Q},y.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(h){return h.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},y.prototype.toString=function(){return this.doc.getValue()},y.prototype.getSelection=function(){return this.selection},y.prototype.getState=function(h){return this.bgTokenizer.getState(h)},y.prototype.getTokens=function(h){return this.bgTokenizer.getTokens(h)},y.prototype.getTokenAt=function(h,w){var Q=this.bgTokenizer.getTokens(h),Me,Gn=0;if(w==null){var Yn=Q.length-1;Gn=this.getLine(h).length}else for(var Yn=0;Yn<Q.length&&(Gn+=Q[Yn].value.length,!(Gn>=w));Yn++);return Me=Q[Yn],Me?(Me.index=Yn,Me.start=Gn-Me.value.length,Me):null},y.prototype.setUndoManager=function(h){if(this.$undoManager=h,this.$informUndoManager&&this.$informUndoManager.cancel(),h){var w=this;h.addSession(this),this.$syncInformUndoManager=function(){w.$informUndoManager.cancel(),w.mergeUndoDeltas=!1},this.$informUndoManager=R.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},y.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},y.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},y.prototype.getTabString=function(){return this.getUseSoftTabs()?R.stringRepeat(" ",this.getTabSize()):" "},y.prototype.setUseSoftTabs=function(h){this.setOption("useSoftTabs",h)},y.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},y.prototype.setTabSize=function(h){this.setOption("tabSize",h)},y.prototype.getTabSize=function(){return this.$tabSize},y.prototype.isTabStop=function(h){return this.$useSoftTabs&&h.column%this.$tabSize===0},y.prototype.setNavigateWithinSoftTabs=function(h){this.setOption("navigateWithinSoftTabs",h)},y.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},y.prototype.setOverwrite=function(h){this.setOption("overwrite",h)},y.prototype.getOverwrite=function(){return this.$overwrite},y.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},y.prototype.addGutterDecoration=function(h,w){this.$decorations[h]||(this.$decorations[h]=""),this.$decorations[h]+=" "+w,this._signal("changeBreakpoint",{})},y.prototype.removeGutterDecoration=function(h,w){this.$decorations[h]=(this.$decorations[h]||"").replace(" "+w,""),this._signal("changeBreakpoint",{})},y.prototype.getBreakpoints=function(){return this.$breakpoints},y.prototype.setBreakpoints=function(h){this.$breakpoints=[];for(var w=0;w<h.length;w++)this.$breakpoints[h[w]]="ace_breakpoint";this._signal("changeBreakpoint",{})},y.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},y.prototype.setBreakpoint=function(h,w){w===void 0&&(w="ace_breakpoint"),w?this.$breakpoints[h]=w:delete this.$breakpoints[h],this._signal("changeBreakpoint",{})},y.prototype.clearBreakpoint=function(h){delete this.$breakpoints[h],this._signal("changeBreakpoint",{})},y.prototype.addMarker=function(h,w,Q,Me){var Gn=this.$markerId++,Yn={range:h,type:Q||"line",renderer:typeof Q=="function"?Q:null,clazz:w,inFront:!!Me,id:Gn};return Me?(this.$frontMarkers[Gn]=Yn,this._signal("changeFrontMarker")):(this.$backMarkers[Gn]=Yn,this._signal("changeBackMarker")),Gn},y.prototype.addDynamicMarker=function(h,w){if(h.update){var Q=this.$markerId++;return h.id=Q,h.inFront=!!w,w?(this.$frontMarkers[Q]=h,this._signal("changeFrontMarker")):(this.$backMarkers[Q]=h,this._signal("changeBackMarker")),h}},y.prototype.removeMarker=function(h){var w=this.$frontMarkers[h]||this.$backMarkers[h];if(w){var Q=w.inFront?this.$frontMarkers:this.$backMarkers;delete Q[h],this._signal(w.inFront?"changeFrontMarker":"changeBackMarker")}},y.prototype.getMarkers=function(h){return h?this.$frontMarkers:this.$backMarkers},y.prototype.highlight=function(h){if(!this.$searchHighlight){var w=new a(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(w)}this.$searchHighlight.setRegexp(h)},y.prototype.highlightLines=function(h,w,Q,Me){typeof w!="number"&&(Q=w,w=h),Q||(Q="ace_step");var Gn=new r(h,0,w,1/0);return Gn.id=this.addMarker(Gn,Q,"fullLine",Me),Gn},y.prototype.setAnnotations=function(h){this.$annotations=h,this._signal("changeAnnotation",{})},y.prototype.getAnnotations=function(){return this.$annotations||[]},y.prototype.clearAnnotations=function(){this.setAnnotations([])},y.prototype.$detectNewLine=function(h){var w=h.match(/^.*?(\r?\n)/m);w?this.$autoNewLine=w[1]:this.$autoNewLine=`
199
+ `},y.prototype.getWordRange=function(h,w){var Q=this.getLine(h),Me=!1;if(w>0&&(Me=!!Q.charAt(w-1).match(this.tokenRe)),Me||(Me=!!Q.charAt(w).match(this.tokenRe)),Me)var Gn=this.tokenRe;else if(/^\s+$/.test(Q.slice(w-1,w+1)))var Gn=/\s/;else var Gn=this.nonTokenRe;var Yn=w;if(Yn>0){do Yn--;while(Yn>=0&&Q.charAt(Yn).match(Gn));Yn++}for(var Qn=w;Qn<Q.length&&Q.charAt(Qn).match(Gn);)Qn++;return new r(h,Yn,h,Qn)},y.prototype.getAWordRange=function(h,w){for(var Q=this.getWordRange(h,w),Me=this.getLine(Q.end.row);Me.charAt(Q.end.column).match(/[ \t]/);)Q.end.column+=1;return Q},y.prototype.setNewLineMode=function(h){this.doc.setNewLineMode(h)},y.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},y.prototype.setUseWorker=function(h){this.setOption("useWorker",h)},y.prototype.getUseWorker=function(){return this.$useWorker},y.prototype.onReloadTokenizer=function(h){var w=h.data;this.bgTokenizer.start(w.first),this._signal("tokenizerUpdate",h)},y.prototype.setMode=function(h,w){if(h&&typeof h=="object"){if(h.getTokenizer)return this.$onChangeMode(h);var Q=h,Me=Q.path}else Me=h||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new i),this.$modes[Me]&&!Q){this.$onChangeMode(this.$modes[Me]),w&&w();return}this.$modeId=Me,l.loadModule(["mode",Me],(function(Gn){if(this.$modeId!==Me)return w&&w();this.$modes[Me]&&!Q?this.$onChangeMode(this.$modes[Me]):Gn&&Gn.Mode&&(Gn=new Gn.Mode(Q),Q||(this.$modes[Me]=Gn,Gn.$id=Me),this.$onChangeMode(Gn)),w&&w()}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},y.prototype.$onChangeMode=function(h,w){if(w||(this.$modeId=h.$id),this.$mode!==h){var Q=this.$mode;this.$mode=h,this.$stopWorker(),this.$useWorker&&this.$startWorker();var Me=h.getTokenizer();if(Me.on!==void 0){var Gn=this.onReloadTokenizer.bind(this);Me.on("update",Gn)}this.bgTokenizer.setTokenizer(Me),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=h.tokenRe,this.nonTokenRe=h.nonTokenRe,w||(h.attachToSession&&h.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(h.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:Q,mode:h}))}},y.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},y.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(h){l.warn("Could not load worker",h),this.$worker=null}},y.prototype.getMode=function(){return this.$mode},y.prototype.setScrollTop=function(h){this.$scrollTop===h||isNaN(h)||(this.$scrollTop=h,this._signal("changeScrollTop",h))},y.prototype.getScrollTop=function(){return this.$scrollTop},y.prototype.setScrollLeft=function(h){this.$scrollLeft===h||isNaN(h)||(this.$scrollLeft=h,this._signal("changeScrollLeft",h))},y.prototype.getScrollLeft=function(){return this.$scrollLeft},y.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},y.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var h=0;return this.lineWidgets.forEach(function(w){w&&w.screenWidth>h&&(h=w.screenWidth)}),this.lineWidgetWidth=h},y.prototype.$computeWidth=function(h){if(this.$modified||h){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var w=this.doc.getAllLines(),Q=this.$rowLengthCache,Me=0,Gn=0,Yn=this.$foldData[Gn],Qn=Yn?Yn.start.row:1/0,Zn=w.length,Jn=0;Jn<Zn;Jn++){if(Jn>Qn){if(Jn=Yn.end.row+1,Jn>=Zn)break;Yn=this.$foldData[Gn++],Qn=Yn?Yn.start.row:1/0}Q[Jn]==null&&(Q[Jn]=this.$getStringScreenWidth(w[Jn])[0]),Q[Jn]>Me&&(Me=Q[Jn])}this.screenWidth=Me}},y.prototype.getLine=function(h){return this.doc.getLine(h)},y.prototype.getLines=function(h,w){return this.doc.getLines(h,w)},y.prototype.getLength=function(){return this.doc.getLength()},y.prototype.getTextRange=function(h){return this.doc.getTextRange(h||this.selection.getRange())},y.prototype.insert=function(h,w){return this.doc.insert(h,w)},y.prototype.remove=function(h){return this.doc.remove(h)},y.prototype.removeFullLines=function(h,w){return this.doc.removeFullLines(h,w)},y.prototype.undoChanges=function(h,w){if(h.length){this.$fromUndo=!0;for(var Q=h.length-1;Q!=-1;Q--){var Me=h[Q];Me.action=="insert"||Me.action=="remove"?this.doc.revertDelta(Me):Me.folds&&this.addFolds(Me.folds)}!w&&this.$undoSelect&&(h.selectionBefore?this.selection.fromJSON(h.selectionBefore):this.selection.setRange(this.$getUndoSelection(h,!0))),this.$fromUndo=!1}},y.prototype.redoChanges=function(h,w){if(h.length){this.$fromUndo=!0;for(var Q=0;Q<h.length;Q++){var Me=h[Q];(Me.action=="insert"||Me.action=="remove")&&this.doc.$safeApplyDelta(Me)}!w&&this.$undoSelect&&(h.selectionAfter?this.selection.fromJSON(h.selectionAfter):this.selection.setRange(this.$getUndoSelection(h,!1))),this.$fromUndo=!1}},y.prototype.setUndoSelect=function(h){this.$undoSelect=h},y.prototype.$getUndoSelection=function(h,w){function Q(Zn){return w?Zn.action!=="insert":Zn.action==="insert"}for(var Me,Gn,Yn=0;Yn<h.length;Yn++){var Qn=h[Yn];if(Qn.start){if(!Me){Q(Qn)?Me=r.fromPoints(Qn.start,Qn.end):Me=r.fromPoints(Qn.start,Qn.start);continue}Q(Qn)?(Gn=Qn.start,Me.compare(Gn.row,Gn.column)==-1&&Me.setStart(Gn),Gn=Qn.end,Me.compare(Gn.row,Gn.column)==1&&Me.setEnd(Gn)):(Gn=Qn.start,Me.compare(Gn.row,Gn.column)==-1&&(Me=r.fromPoints(Qn.start,Qn.start)))}}return Me},y.prototype.replace=function(h,w){return this.doc.replace(h,w)},y.prototype.moveText=function(h,w,Q){var Me=this.getTextRange(h),Gn=this.getFoldsInRange(h),Yn=r.fromPoints(w,w);if(!Q){this.remove(h);var Qn=h.start.row-h.end.row,Zn=Qn?-h.end.column:h.start.column-h.end.column;Zn&&(Yn.start.row==h.end.row&&Yn.start.column>h.end.column&&(Yn.start.column+=Zn),Yn.end.row==h.end.row&&Yn.end.column>h.end.column&&(Yn.end.column+=Zn)),Qn&&Yn.start.row>=h.end.row&&(Yn.start.row+=Qn,Yn.end.row+=Qn)}if(Yn.end=this.insert(Yn.start,Me),Gn.length){var Jn=h.start,ii=Yn.start,Qn=ii.row-Jn.row,Zn=ii.column-Jn.column;this.addFolds(Gn.map(function(ni){return ni=ni.clone(),ni.start.row==Jn.row&&(ni.start.column+=Zn),ni.end.row==Jn.row&&(ni.end.column+=Zn),ni.start.row+=Qn,ni.end.row+=Qn,ni}))}return Yn},y.prototype.indentRows=function(h,w,Q){Q=Q.replace(/\t/g,this.getTabString());for(var Me=h;Me<=w;Me++)this.doc.insertInLine({row:Me,column:0},Q)},y.prototype.outdentRows=function(h){for(var w=h.collapseRows(),Q=new r(0,0,0,0),Me=this.getTabSize(),Gn=w.start.row;Gn<=w.end.row;++Gn){var Yn=this.getLine(Gn);Q.start.row=Gn,Q.end.row=Gn;for(var Qn=0;Qn<Me&&Yn.charAt(Qn)==" ";++Qn);Qn<Me&&Yn.charAt(Qn)==" "?(Q.start.column=Qn,Q.end.column=Qn+1):(Q.start.column=0,Q.end.column=Qn),this.remove(Q)}},y.prototype.$moveLines=function(h,w,Q){if(h=this.getRowFoldStart(h),w=this.getRowFoldEnd(w),Q<0){var Me=this.getRowFoldStart(h+Q);if(Me<0)return 0;var Gn=Me-h}else if(Q>0){var Me=this.getRowFoldEnd(w+Q);if(Me>this.doc.getLength()-1)return 0;var Gn=Me-w}else{h=this.$clipRowToDocument(h),w=this.$clipRowToDocument(w);var Gn=w-h+1}var Yn=new r(h,0,w,Number.MAX_VALUE),Qn=this.getFoldsInRange(Yn).map(function(Jn){return Jn=Jn.clone(),Jn.start.row+=Gn,Jn.end.row+=Gn,Jn}),Zn=Q==0?this.doc.getLines(h,w):this.doc.removeFullLines(h,w);return this.doc.insertFullLines(h+Gn,Zn),Qn.length&&this.addFolds(Qn),Gn},y.prototype.moveLinesUp=function(h,w){return this.$moveLines(h,w,-1)},y.prototype.moveLinesDown=function(h,w){return this.$moveLines(h,w,1)},y.prototype.duplicateLines=function(h,w){return this.$moveLines(h,w,0)},y.prototype.$clipRowToDocument=function(h){return Math.max(0,Math.min(h,this.doc.getLength()-1))},y.prototype.$clipColumnToRow=function(h,w){return w<0?0:Math.min(this.doc.getLine(h).length,w)},y.prototype.$clipPositionToDocument=function(h,w){if(w=Math.max(0,w),h<0)h=0,w=0;else{var Q=this.doc.getLength();h>=Q?(h=Q-1,w=this.doc.getLine(Q-1).length):w=Math.min(this.doc.getLine(h).length,w)}return{row:h,column:w}},y.prototype.$clipRangeToDocument=function(h){h.start.row<0?(h.start.row=0,h.start.column=0):h.start.column=this.$clipColumnToRow(h.start.row,h.start.column);var w=this.doc.getLength()-1;return h.end.row>w?(h.end.row=w,h.end.column=this.doc.getLine(w).length):h.end.column=this.$clipColumnToRow(h.end.row,h.end.column),h},y.prototype.setUseWrapMode=function(h){if(h!=this.$useWrapMode){if(this.$useWrapMode=h,this.$modified=!0,this.$resetRowCache(0),h){var w=this.getLength();this.$wrapData=Array(w),this.$updateWrapData(0,w-1)}this._signal("changeWrapMode")}},y.prototype.getUseWrapMode=function(){return this.$useWrapMode},y.prototype.setWrapLimitRange=function(h,w){(this.$wrapLimitRange.min!==h||this.$wrapLimitRange.max!==w)&&(this.$wrapLimitRange={min:h,max:w},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},y.prototype.adjustWrapLimit=function(h,w){var Q=this.$wrapLimitRange;Q.max<0&&(Q={min:w,max:w});var Me=this.$constrainWrapLimit(h,Q.min,Q.max);return Me!=this.$wrapLimit&&Me>1?(this.$wrapLimit=Me,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},y.prototype.$constrainWrapLimit=function(h,w,Q){return w&&(h=Math.max(w,h)),Q&&(h=Math.min(Q,h)),h},y.prototype.getWrapLimit=function(){return this.$wrapLimit},y.prototype.setWrapLimit=function(h){this.setWrapLimitRange(h,h)},y.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},y.prototype.$updateInternalDataOnChange=function(h){var w=this.$useWrapMode,Q=h.action,Me=h.start,Gn=h.end,Yn=Me.row,Qn=Gn.row,Zn=Qn-Yn,Jn=null;if(this.$updating=!0,Zn!=0)if(Q==="remove"){this[w?"$wrapData":"$rowLengthCache"].splice(Yn,Zn);var ii=this.$foldData;Jn=this.getFoldsInRange(h),this.removeFolds(Jn);var Xn=this.getFoldLine(Gn.row),ei=0;if(Xn){Xn.addRemoveChars(Gn.row,Gn.column,Me.column-Gn.column),Xn.shiftRow(-Zn);var ni=this.getFoldLine(Yn);ni&&ni!==Xn&&(ni.merge(Xn),Xn=ni),ei=ii.indexOf(Xn)+1}for(ei;ei<ii.length;ei++){var Xn=ii[ei];Xn.start.row>=Gn.row&&Xn.shiftRow(-Zn)}Qn=Yn}else{var ti=Array(Zn);ti.unshift(Yn,0);var oi=w?this.$wrapData:this.$rowLengthCache;oi.splice.apply(oi,ti);var ii=this.$foldData,Xn=this.getFoldLine(Yn),ei=0;if(Xn){var ai=Xn.range.compareInside(Me.row,Me.column);ai==0?(Xn=Xn.split(Me.row,Me.column),Xn&&(Xn.shiftRow(Zn),Xn.addRemoveChars(Qn,0,Gn.column-Me.column))):ai==-1&&(Xn.addRemoveChars(Yn,0,Gn.column-Me.column),Xn.shiftRow(Zn)),ei=ii.indexOf(Xn)+1}for(ei;ei<ii.length;ei++){var Xn=ii[ei];Xn.start.row>=Yn&&Xn.shiftRow(Zn)}}else{Zn=Math.abs(h.start.column-h.end.column),Q==="remove"&&(Jn=this.getFoldsInRange(h),this.removeFolds(Jn),Zn=-Zn);var Xn=this.getFoldLine(Yn);Xn&&Xn.addRemoveChars(Yn,Me.column,Zn)}return w&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,w?this.$updateWrapData(Yn,Qn):this.$updateRowLengthCache(Yn,Qn),Jn},y.prototype.$updateRowLengthCache=function(h,w){this.$rowLengthCache[h]=null,this.$rowLengthCache[w]=null},y.prototype.$updateWrapData=function(h,w){var Q=this.doc.getAllLines(),Me=this.getTabSize(),Gn=this.$wrapData,Yn=this.$wrapLimit,Qn,Zn,Jn=h;for(w=Math.min(w,Q.length-1);Jn<=w;)Zn=this.getFoldLine(Jn,Zn),Zn?(Qn=[],Zn.walk((function(ii,Xn,ei,ni){var ti;if(ii!=null){ti=this.$getDisplayTokens(ii,Qn.length),ti[0]=_;for(var oi=1;oi<ti.length;oi++)ti[oi]=S}else ti=this.$getDisplayTokens(Q[Xn].substring(ni,ei),Qn.length);Qn=Qn.concat(ti)}).bind(this),Zn.end.row,Q[Zn.end.row].length+1),Gn[Zn.start.row]=this.$computeWrapSplits(Qn,Yn,Me),Jn=Zn.end.row+1):(Qn=this.$getDisplayTokens(Q[Jn]),Gn[Jn]=this.$computeWrapSplits(Qn,Yn,Me),Jn++)},y.prototype.$computeWrapSplits=function(h,w,Q){if(h.length==0)return[];var Me=[],Gn=h.length,Yn=0,Qn=0,Zn=this.$wrapAsCode,Jn=this.$indentedSoftWrap,ii=w<=Math.max(2*Q,8)||Jn===!1?0:Math.floor(w/2);function Xn(){var ai=0;if(ii===0)return ai;if(Jn)for(var li=0;li<h.length;li++){var si=h[li];if(si==He)ai+=1;else if(si==Ae)ai+=Q;else{if(si==J)continue;break}}return Zn&&Jn!==!1&&(ai+=Q),Math.min(ai,ii)}function ei(ai){for(var li=ai-Yn,si=Yn;si<ai;si++){var hi=h[si];(hi===12||hi===2)&&(li-=1)}Me.length||(ni=Xn(),Me.indent=ni),Qn+=li,Me.push(Qn),Yn=ai}for(var ni=0;Gn-Yn>w-ni;){var ti=Yn+w-ni;if(h[ti-1]>=He&&h[ti]>=He){ei(ti);continue}if(h[ti]==_||h[ti]==S){for(ti;ti!=Yn-1&&h[ti]!=_;ti--);if(ti>Yn){ei(ti);continue}for(ti=Yn+w,ti;ti<h.length&&h[ti]==S;ti++);if(ti==h.length)break;ei(ti);continue}for(var oi=Math.max(ti-(w-(w>>2)),Yn-1);ti>oi&&h[ti]<_;)ti--;if(Zn){for(;ti>oi&&h[ti]<_;)ti--;for(;ti>oi&&h[ti]==xe;)ti--}else for(;ti>oi&&h[ti]<He;)ti--;if(ti>oi){ei(++ti);continue}ti=Yn+w,h[ti]==F&&ti--,ei(ti-ni)}return Me},y.prototype.$getDisplayTokens=function(h,w){var Q=[],Me;w=w||0;for(var Gn=0;Gn<h.length;Gn++){var Yn=h.charCodeAt(Gn);if(Yn==9){Me=this.getScreenTabSize(Q.length+w),Q.push(Ae);for(var Qn=1;Qn<Me;Qn++)Q.push(J)}else Yn==32?Q.push(He):Yn>39&&Yn<48||Yn>57&&Yn<64?Q.push(xe):Yn>=4352&&Kn(Yn)?Q.push(oe,F):Q.push(oe)}return Q},y.prototype.$getStringScreenWidth=function(h,w,Q){if(w==0)return[0,0];w==null&&(w=1/0),Q=Q||0;var Me,Gn;for(Gn=0;Gn<h.length&&(Me=h.charCodeAt(Gn),Me==9?Q+=this.getScreenTabSize(Q):Me>=4352&&Kn(Me)?Q+=2:Q+=1,!(Q>w));Gn++);return[Q,Gn]},y.prototype.getRowLength=function(h){var w=1;return this.lineWidgets&&(w+=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0),!this.$useWrapMode||!this.$wrapData[h]?w:this.$wrapData[h].length+w},y.prototype.getRowLineCount=function(h){return!this.$useWrapMode||!this.$wrapData[h]?1:this.$wrapData[h].length+1},y.prototype.getRowWrapIndent=function(h){if(this.$useWrapMode){var w=this.screenToDocumentPosition(h,Number.MAX_VALUE),Q=this.$wrapData[w.row];return Q.length&&Q[0]<w.column?Q.indent:0}else return 0},y.prototype.getScreenLastRowColumn=function(h){var w=this.screenToDocumentPosition(h,Number.MAX_VALUE);return this.documentToScreenColumn(w.row,w.column)},y.prototype.getDocumentLastRowColumn=function(h,w){var Q=this.documentToScreenRow(h,w);return this.getScreenLastRowColumn(Q)},y.prototype.getDocumentLastRowColumnPosition=function(h,w){var Q=this.documentToScreenRow(h,w);return this.screenToDocumentPosition(Q,Number.MAX_VALUE/10)},y.prototype.getRowSplitData=function(h){if(this.$useWrapMode)return this.$wrapData[h]},y.prototype.getScreenTabSize=function(h){return this.$tabSize-(h%this.$tabSize|0)},y.prototype.screenToDocumentRow=function(h,w){return this.screenToDocumentPosition(h,w).row},y.prototype.screenToDocumentColumn=function(h,w){return this.screenToDocumentPosition(h,w).column},y.prototype.screenToDocumentPosition=function(h,w,Q){if(h<0)return{row:0,column:0};var Me,Gn=0,Yn=0,Qn,Zn=0,Jn=0,ii=this.$screenRowCache,Xn=this.$getRowCacheIndex(ii,h),ei=ii.length;if(ei&&Xn>=0)var Zn=ii[Xn],Gn=this.$docRowCache[Xn],ni=h>ii[ei-1];else var ni=!ei;for(var ti=this.getLength()-1,oi=this.getNextFoldLine(Gn),ai=oi?oi.start.row:1/0;Zn<=h&&(Jn=this.getRowLength(Gn),!(Zn+Jn>h||Gn>=ti));)Zn+=Jn,Gn++,Gn>ai&&(Gn=oi.end.row+1,oi=this.getNextFoldLine(Gn,oi),ai=oi?oi.start.row:1/0),ni&&(this.$docRowCache.push(Gn),this.$screenRowCache.push(Zn));if(oi&&oi.start.row<=Gn)Me=this.getFoldDisplayLine(oi),Gn=oi.start.row;else{if(Zn+Jn<=h||Gn>ti)return{row:ti,column:this.getLine(ti).length};Me=this.getLine(Gn),oi=null}var li=0,si=Math.floor(h-Zn);if(this.$useWrapMode){var hi=this.$wrapData[Gn];hi&&(Qn=hi[si],si>0&&hi.length&&(li=hi.indent,Yn=hi[si-1]||hi[hi.length-1],Me=Me.substring(Yn)))}return Q!==void 0&&this.$bidiHandler.isBidiRow(Zn+si,Gn,si)&&(w=this.$bidiHandler.offsetToCol(Q)),Yn+=this.$getStringScreenWidth(Me,w-li)[1],this.$useWrapMode&&Yn>=Qn&&(Yn=Qn-1),oi?oi.idxToPosition(Yn):{row:Gn,column:Yn}},y.prototype.documentToScreenPosition=function(h,w){if(typeof w>"u")var Q=this.$clipPositionToDocument(h.row,h.column);else Q=this.$clipPositionToDocument(h,w);h=Q.row,w=Q.column;var Me=0,Gn=null,Yn=null;Yn=this.getFoldAt(h,w,1),Yn&&(h=Yn.start.row,w=Yn.start.column);var Qn,Zn=0,Jn=this.$docRowCache,ii=this.$getRowCacheIndex(Jn,h),Xn=Jn.length;if(Xn&&ii>=0)var Zn=Jn[ii],Me=this.$screenRowCache[ii],ei=h>Jn[Xn-1];else var ei=!Xn;for(var ni=this.getNextFoldLine(Zn),ti=ni?ni.start.row:1/0;Zn<h;){if(Zn>=ti){if(Qn=ni.end.row+1,Qn>h)break;ni=this.getNextFoldLine(Qn,ni),ti=ni?ni.start.row:1/0}else Qn=Zn+1;Me+=this.getRowLength(Zn),Zn=Qn,ei&&(this.$docRowCache.push(Zn),this.$screenRowCache.push(Me))}var oi="";ni&&Zn>=ti?(oi=this.getFoldDisplayLine(ni,h,w),Gn=ni.start.row):(oi=this.getLine(h).substring(0,w),Gn=h);var ai=0;if(this.$useWrapMode){var li=this.$wrapData[Gn];if(li){for(var si=0;oi.length>=li[si];)Me++,si++;oi=oi.substring(li[si-1]||0,oi.length),ai=si>0?li.indent:0}}return this.lineWidgets&&this.lineWidgets[Zn]&&this.lineWidgets[Zn].rowsAbove&&(Me+=this.lineWidgets[Zn].rowsAbove),{row:Me,column:ai+this.$getStringScreenWidth(oi)[0]}},y.prototype.documentToScreenColumn=function(h,w){return this.documentToScreenPosition(h,w).column},y.prototype.documentToScreenRow=function(h,w){return this.documentToScreenPosition(h,w).row},y.prototype.getScreenLength=function(){var h=0,w=null;if(this.$useWrapMode)for(var Gn=this.$wrapData.length,Yn=0,Me=0,w=this.$foldData[Me++],Qn=w?w.start.row:1/0;Yn<Gn;){var Zn=this.$wrapData[Yn];h+=Zn?Zn.length+1:1,Yn++,Yn>Qn&&(Yn=w.end.row+1,w=this.$foldData[Me++],Qn=w?w.start.row:1/0)}else{h=this.getLength();for(var Q=this.$foldData,Me=0;Me<Q.length;Me++)w=Q[Me],h-=w.end.row-w.start.row}return this.lineWidgets&&(h+=this.$getWidgetScreenLength()),h},y.prototype.$setFontMetrics=function(h){this.$enableVarChar&&(this.$getStringScreenWidth=function(w,Q,Me){if(Q===0)return[0,0];Q||(Q=1/0),Me=Me||0;var Gn,Yn;for(Yn=0;Yn<w.length&&(Gn=w.charAt(Yn),Gn===" "?Me+=this.getScreenTabSize(Me):Me+=h.getCharacterWidth(Gn),!(Me>Q));Yn++);return[Me,Yn]})},y.prototype.getPrecedingCharacter=function(){var h=this.selection.getCursor();if(h.column===0)return h.row===0?"":this.doc.getNewLineCharacter();var w=this.getLine(h.row);return w[h.column-1]},y.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()},y}();f.$uid=0,f.prototype.$modes=l.$modes,f.prototype.getValue=f.prototype.toString,f.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},f.prototype.$overwrite=!1,f.prototype.$mode=null,f.prototype.$modeId=null,f.prototype.$scrollTop=0,f.prototype.$scrollLeft=0,f.prototype.$wrapLimit=80,f.prototype.$useWrapMode=!1,f.prototype.$wrapLimitRange={min:null,max:null},f.prototype.lineWidgets=null,f.prototype.isFullWidth=Kn,W.implement(f.prototype,u);var oe=1,F=2,_=3,S=4,xe=9,He=10,Ae=11,J=12;function Kn(y){return y<4352?!1:y>=4352&&y<=4447||y>=4515&&y<=4519||y>=4602&&y<=4607||y>=9001&&y<=9002||y>=11904&&y<=11929||y>=11931&&y<=12019||y>=12032&&y<=12245||y>=12272&&y<=12283||y>=12288&&y<=12350||y>=12353&&y<=12438||y>=12441&&y<=12543||y>=12549&&y<=12589||y>=12593&&y<=12686||y>=12688&&y<=12730||y>=12736&&y<=12771||y>=12784&&y<=12830||y>=12832&&y<=12871||y>=12880&&y<=13054||y>=13056&&y<=19903||y>=19968&&y<=42124||y>=42128&&y<=42182||y>=43360&&y<=43388||y>=44032&&y<=55203||y>=55216&&y<=55238||y>=55243&&y<=55291||y>=63744&&y<=64255||y>=65040&&y<=65049||y>=65072&&y<=65106||y>=65108&&y<=65126||y>=65128&&y<=65131||y>=65281&&y<=65376||y>=65504&&y<=65510}p("./edit_session/folding").Folding.call(f.prototype),p("./edit_session/bracket_match").BracketMatch.call(f.prototype),l.defineOptions(f.prototype,"session",{wrap:{set:function(y){if(!y||y=="off"?y=!1:y=="free"?y=!0:y=="printMargin"?y=-1:typeof y=="string"&&(y=parseInt(y,10)||!1),this.$wrap!=y)if(this.$wrap=y,!y)this.setUseWrapMode(!1);else{var h=typeof y=="number"?y:null;this.setWrapLimitRange(h,h),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(y){y=y=="auto"?this.$mode.type!="text":y!="text",y!=this.$wrapAsCode&&(this.$wrapAsCode=y,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(y){this.$useWorker=y,this.$stopWorker(),y&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(y){y=parseInt(y),y>0&&this.$tabSize!==y&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=y,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(y){this.setFoldStyle(y)},handlesSet:!0},overwrite:{set:function(y){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(y){this.doc.setNewLineMode(y)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(y){this.setMode(y)},get:function(){return this.$modeId},handlesSet:!0}}),m.EditSession=f}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(p,m,Vn){var W=p("./lib/lang"),R=p("./lib/oop"),M=p("./range").Range,l=function(){function o(){this.$options={}}return o.prototype.set=function(i){return R.mixin(this.$options,i),this},o.prototype.getOptions=function(){return W.copyObject(this.$options)},o.prototype.setOptions=function(i){this.$options=i},o.prototype.find=function(i){var r=this.$options,t=this.$matchIterator(i,r);if(!t)return!1;var e=null;return t.forEach(function(n,a,d,f){return e=new M(n,a,d,f),a==f&&r.start&&r.start.start&&r.skipCurrent!=!1&&e.isEqual(r.start)?(e=null,!1):!0}),e},o.prototype.findAll=function(i){var r=this.$options;if(!r.needle)return[];this.$assembleRegExp(r);var t=r.range,e=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),n=[],a=r.re;if(r.$isMultiLine){var d=a.length,f=e.length-d,oe;e:for(var F=a.offset||0;F<=f;F++){for(var _=0;_<d;_++)if(e[F+_].search(a[_])==-1)continue e;var S=e[F],xe=e[F+d-1],He=S.length-S.match(a[0])[0].length,Ae=xe.match(a[d-1])[0].length;oe&&oe.end.row===F&&oe.end.column>He||(n.push(oe=new M(F,He,F+d-1,Ae)),d>2&&(F=F+d-2))}}else for(var J=0;J<e.length;J++)for(var Kn=W.getMatchOffsets(e[J],a),_=0;_<Kn.length;_++){var y=Kn[_];n.push(new M(J,y.offset,J,y.offset+y.length))}if(t){for(var h=t.start.column,w=t.end.column,J=0,_=n.length-1;J<_&&n[J].start.column<h&&n[J].start.row==0;)J++;for(var Q=t.end.row-t.start.row;J<_&&n[_].end.column>w&&n[_].end.row==Q;)_--;for(n=n.slice(J,_+1),J=0,_=n.length;J<_;J++)n[J].start.row+=t.start.row,n[J].end.row+=t.start.row}return n},o.prototype.replace=function(i,r){var t=this.$options,e=this.$assembleRegExp(t);if(t.$isMultiLine)return r;if(e){var n=e.exec(i);if(!n||n[0].length!=i.length)return null;if(t.regExp||(r=r.replace(/\$/g,"$$$$")),r=i.replace(e,r),t.preserveCase){r=r.split("");for(var a=Math.min(i.length,i.length);a--;){var d=i[a];d&&d.toLowerCase()!=d?r[a]=r[a].toUpperCase():r[a]=r[a].toLowerCase()}r=r.join("")}return r}},o.prototype.$assembleRegExp=function(i,r){if(i.needle instanceof RegExp)return i.re=i.needle;var t=i.needle;if(!i.needle)return i.re=!1;i.regExp||(t=W.escapeRegExp(t));var e=i.caseSensitive?"gm":"gmi";try{new RegExp(t,"u"),i.$supportsUnicodeFlag=!0,e+="u"}catch{i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(t=u(t,i)),i.$isMultiLine=!r&&/[\n\r]/.test(t),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(t,e);try{var n=new RegExp(t,e)}catch{n=!1}return i.re=n},o.prototype.$assembleMultilineRegExp=function(i,r){for(var t=i.replace(/\r\n|\r|\n/g,`$
200
+ ^`).split(`
201
+ `),e=[],n=0;n<t.length;n++)try{e.push(new RegExp(t[n],r))}catch{return!1}return e},o.prototype.$matchIterator=function(i,r){var t=this.$assembleRegExp(r);if(!t)return!1;var e=r.backwards==!0,n=r.skipCurrent!=!1,a=t.unicode,d=r.range,f=r.start;f||(f=d?d[e?"end":"start"]:i.selection.getRange()),f.start&&(f=f[n!=e?"end":"start"]);var oe=d?d.start.row:0,F=d?d.end.row:i.getLength()-1;if(e)var _=function(He){var Ae=f.row;if(!xe(Ae,f.column,He)){for(Ae--;Ae>=oe;Ae--)if(xe(Ae,Number.MAX_VALUE,He))return;if(r.wrap!=!1){for(Ae=F,oe=f.row;Ae>=oe;Ae--)if(xe(Ae,Number.MAX_VALUE,He))return}}};else var _=function(Ae){var J=f.row;if(!xe(J,f.column,Ae)){for(J=J+1;J<=F;J++)if(xe(J,0,Ae))return;if(r.wrap!=!1){for(J=oe,F=f.row;J<=F;J++)if(xe(J,0,Ae))return}}};if(r.$isMultiLine)var S=t.length,xe=function(He,Ae,J){var Kn=e?He-S+1:He;if(!(Kn<0||Kn+S>i.getLength())){var y=i.getLine(Kn),h=y.search(t[0]);if(!(!e&&h<Ae||h===-1)){for(var w=1;w<S;w++)if(y=i.getLine(Kn+w),y.search(t[w])==-1)return;var Q=y.match(t[S-1])[0].length;if(!(e&&Q>Ae)&&J(Kn,h,Kn+S-1,Q))return!0}}};else if(e)var xe=function(Ae,J,Kn){var y=i.getLine(Ae),h=[],w,Q=0;for(t.lastIndex=0;w=t.exec(y);){var Me=w[0].length;if(Q=w.index,!Me){if(Q>=y.length)break;t.lastIndex=Q+=W.skipEmptyMatch(y,Q,a)}if(w.index+Me>J)break;h.push(w.index,Me)}for(var Gn=h.length-1;Gn>=0;Gn-=2){var Yn=h[Gn-1],Me=h[Gn];if(Kn(Ae,Yn,Ae,Yn+Me))return!0}};else var xe=function(Ae,J,Kn){var y=i.getLine(Ae),h,w;for(t.lastIndex=J;w=t.exec(y);){var Q=w[0].length;if(h=w.index,Kn(Ae,h,Ae,h+Q))return!0;if(!Q&&(t.lastIndex=h+=W.skipEmptyMatch(y,h,a),h>=y.length))return!1}};return{forEach:_}},o}();function u(o,i){var r=W.supportsLookbehind();function t(d,f){f===void 0&&(f=!0);var oe=r&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return oe.test(d)||i.regExp?r&&i.$supportsUnicodeFlag?f?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var e=Array.from(o),n=e[0],a=e[e.length-1];return t(n)+o+t(a,!1)}m.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(p,m,Vn){var W=this&&this.__extends||function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(n[d]=a[d])},r(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");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),R=p("../lib/keys"),M=p("../lib/useragent"),l=R.KEY_MODS,u=function(){function r(t,e){this.$init(t,e,!1)}return r.prototype.$init=function(t,e,n){this.platform=e||(M.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=n},r.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},r.prototype.removeCommand=function(t,e){var n=t&&(typeof t=="string"?t:t.name);t=this.commands[n],e||delete this.commands[n];var a=this.commandKeyBinding;for(var d in a){var f=a[d];if(f==t)delete a[d];else if(Array.isArray(f)){var oe=f.indexOf(t);oe!=-1&&(f.splice(oe,1),f.length==1&&(a[d]=f[0]))}}},r.prototype.bindKey=function(t,e,n){if(typeof t=="object"&&t&&(n==null&&(n=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(a){var d="";if(a.indexOf(" ")!=-1){var f=a.split(/\s+/);a=f.pop(),f.forEach(function(_){var S=this.parseKeys(_),xe=l[S.hashId]+S.key;d+=(d?" ":"")+xe,this._addCommandToBinding(d,"chainKeys")},this),d+=" "}var oe=this.parseKeys(a),F=l[oe.hashId]+oe.key;this._addCommandToBinding(d+F,e,n)},this)}},r.prototype._addCommandToBinding=function(t,e,n){var a=this.commandKeyBinding,d;if(!e)delete a[t];else if(!a[t]||this.$singleCommand)a[t]=e;else{Array.isArray(a[t])?(d=a[t].indexOf(e))!=-1&&a[t].splice(d,1):a[t]=[a[t]],typeof n!="number"&&(n=o(e));var f=a[t];for(d=0;d<f.length;d++){var oe=f[d],F=o(oe);if(F>n)break}f.splice(d,0,e)}},r.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var n=t[e];if(n){if(typeof n=="string")return this.bindKey(n,e);typeof n=="function"&&(n={exec:n}),typeof n=="object"&&(n.name||(n.name=e),this.addCommand(n))}},this)},r.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},r.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},r.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},r.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(F){return F}),n=e.pop(),a=R[n];if(R.FUNCTION_KEYS[a])n=R.FUNCTION_KEYS[a].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}else return{key:n,hashId:-1};for(var d=0,f=e.length;f--;){var oe=R.KEY_MODS[e[f]];if(oe==null)return typeof console<"u"&&console.error("invalid modifier "+e[f]+" in "+t),!1;d|=oe}return{key:n,hashId:d}},r.prototype.findKeyCommand=function(t,e){var n=l[t]+e;return this.commandKeyBinding[n]},r.prototype.handleKeyboard=function(t,e,n,a){if(!(a<0)){var d=l[e]+n,f=this.commandKeyBinding[d];return t.$keyChain&&(t.$keyChain+=" "+d,f=this.commandKeyBinding[t.$keyChain]||f),f&&(f=="chainKeys"||f[f.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||d,{command:"null"}):(t.$keyChain&&((!e||e==4)&&n.length==1?t.$keyChain=t.$keyChain.slice(0,-d.length-1):(e==-1||a>0)&&(t.$keyChain="")),{command:f})}},r.prototype.getStatusText=function(t,e){return e.$keyChain||""},r}();function o(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var i=function(r){W(t,r);function t(e,n){var a=r.call(this,e,n)||this;return a.$singleCommand=!0,a}return t}(u);i.call=function(r,t,e){u.prototype.$init.call(r,t,e,!0)},u.call=function(r,t,e){u.prototype.$init.call(r,t,e,!1)},m.HashHandler=i,m.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(p,m,Vn){var W=this&&this.__extends||function(){var o=function(i,r){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(i,r)};return function(i,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");o(i,r);function t(){this.constructor=i}i.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),R=p("../lib/oop"),M=p("../keyboard/hash_handler").MultiHashHandler,l=p("../lib/event_emitter").EventEmitter,u=function(o){W(i,o);function i(r,t){var e=o.call(this,t,r)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(n){return n.args?n.command.exec(n.editor,n.args,n.event,!1):n.command.exec(n.editor,{},n.event,!0)}),e}return i.prototype.exec=function(r,t,e){if(Array.isArray(r)){for(var n=r.length;n--;)if(this.exec(r[n],t,e))return!0;return!1}if(typeof r=="string"&&(r=this.commands[r]),!this.canExecute(r,t))return!1;var a={editor:t,command:r,args:e};return a.returnValue=this._emit("exec",a),this._signal("afterExec",a),a.returnValue!==!1},i.prototype.canExecute=function(r,t){return typeof r=="string"&&(r=this.commands[r]),!(!r||t&&t.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(t))},i.prototype.toggleRecording=function(r){if(!this.$inReplay)return r&&r._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)},i.prototype.replay=function(r){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(r);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,r):this.exec(t[0],r,t[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(r){return r.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},i}(M);R.implement(u.prototype,l),m.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(p,m,Vn){var W=p("../lib/lang"),R=p("../config"),M=p("../range").Range;function l(o,i){return{win:o,mac:i}}m.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(o){R.loadModule("ace/ext/settings_menu",function(i){i.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(o){R.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(o){R.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(o,i){typeof i=="number"&&!isNaN(i)&&o.gotoLine(i),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(o){R.loadModule("ace/ext/searchbox",function(i){i.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(o,i){o.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(o,i){o.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(o,i){o.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(o,i){o.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var i=o.$copyWithEmptySelection&&o.selection.isEmpty(),r=i?o.selection.getLineRange():o.selection.getRange();o._emit("cut",r),r.isEmpty()||o.session.remove(r),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,i){o.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(o){R.loadModule("ace/ext/searchbox",function(i){i.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(o){var i=o.selection.getRange();i.start.column=0,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(o){var i=o.selection.getRange();i.end.column=Number.MAX_VALUE,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,i){o.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,i){o.insert(W.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(o){o.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var i=o.selection.getRange();i.start.column=i.end.column=0,i.end.row++,o.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(o){for(var i=o.selection.isBackwards(),r=i?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),t=i?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),e=o.session.doc.getLine(r.row).length,n=o.session.doc.getTextRange(o.selection.getRange()),a=n.replace(/\n\s*/," ").length,d=o.session.doc.getLine(r.row),f=r.row+1;f<=t.row+1;f++){var oe=W.stringTrimLeft(W.stringTrimRight(o.session.doc.getLine(f)));oe.length!==0&&(oe=" "+oe),d+=oe}t.row+1<o.session.doc.getLength()-1&&(d+=o.session.doc.getNewLineCharacter()),o.clearSelection(),o.session.doc.replace(new M(r.row,0,t.row+2,0),d),a>0?(o.selection.moveCursorTo(r.row,r.column),o.selection.selectTo(r.row,r.column+a)):(e=o.session.doc.getLine(r.row).length>e?e+1:e,o.selection.moveCursorTo(r.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(o){var i=o.session.doc.getLength()-1,r=o.session.doc.getLine(i).length,t=o.selection.rangeList.ranges,e=[];t.length<1&&(t=[o.selection.getRange()]);for(var n=0;n<t.length;n++)n==t.length-1&&(t[n].end.row===i&&t[n].end.column===r||e.push(new M(t[n].end.row,t[n].end.column,i,r))),n===0?t[n].start.row===0&&t[n].start.column===0||e.push(new M(0,0,t[n].start.row,t[n].start.column)):e.push(new M(t[n-1].end.row,t[n-1].end.column,t[n].start.row,t[n].start.column));o.exitMultiSelectMode(),o.clearSelection();for(var n=0;n<e.length;n++)o.selection.addRange(e[n],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(o){o.selection.clearSelection(),o.navigateLineEnd(),o.insert(`
202
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(o){o.selection.clearSelection();var i=o.getCursorPosition();o.selection.moveTo(i.row-1,Number.MAX_VALUE),o.insert(`
203
+ `),i.row===0&&o.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(o){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),o.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:l("F1","F1"),exec:function(o){o.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:l(null,null),exec:function(o){o.prompt({$type:"modes"})},readOnly:!0}];for(var u=1;u<9;u++)m.commands.push({name:"foldToLevel"+u,description:"Fold To Level "+u,level:u,exec:function(o){o.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(p,m,Vn){var W=p("../lib/keys"),R=p("../mouse/default_gutter_handler").GutterTooltip,M=function(){function u(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new R(this.editor)}return u.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))},u.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))},u.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===W.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=W.enter)return;o.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var r=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(r),e=this.$findNearestAnnotation(r);if(!(t===null&&e===null)){if(t===null&&e!==null){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(t!==null&&e===null){this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(e-r)<Math.abs(t-r)){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(o),setTimeout((function(){this.editor._signal("gutterkeydown",new l(o,this))}).bind(this),10)},u.prototype.$handleGutterKeyboardInteraction=function(o){if(o.keyCode===W.tab){o.preventDefault();return}if(o.keyCode===W.escape){o.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(o.keyCode===W.up){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(o.keyCode===W.down){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(o.keyCode===W.left){o.preventDefault(),this.$switchLane("annotation");return}if(o.keyCode===W.right){o.preventDefault(),this.$switchLane("fold");return}if(o.keyCode===W.enter||o.keyCode===W.space){switch(o.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var i=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),o),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==i&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(i),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var r=this.lines.cells[this.activeRowIndex].element.childNodes[2],t=r.getBoundingClientRect(),e=this.annotationTooltip.getElement().style;e.left=t.right+"px",e.top=t.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},u.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},u.prototype.$isFoldWidgetVisible=function(o){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),r=this.$getFoldWidget(o).style.display!=="none";return i&&r},u.prototype.$isAnnotationVisible=function(o){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),r=this.$getAnnotation(o).style.display!=="none";return i&&r},u.prototype.$getFoldWidget=function(o){var i=this.lines.get(o),r=i.element;return r.childNodes[1]},u.prototype.$getAnnotation=function(o){var i=this.lines.get(o),r=i.element;return r.childNodes[2]},u.prototype.$findNearestFoldWidget=function(o){if(this.$isFoldWidgetVisible(o))return o;for(var i=0;o-i>0||o+i<this.lines.getLength()-1;){if(i++,o-i>=0&&this.$isFoldWidgetVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+i))return o+i}return null},u.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var i=0;o-i>0||o+i<this.lines.getLength()-1;){if(i++,o-i>=0&&this.$isAnnotationVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+i))return o+i}return null},u.prototype.$focusFoldWidget=function(o){if(o!=null){var i=this.$getFoldWidget(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},u.prototype.$focusAnnotation=function(o){if(o!=null){var i=this.$getAnnotation(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},u.prototype.$blurFoldWidget=function(o){var i=this.$getFoldWidget(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},u.prototype.$blurAnnotation=function(o){var i=this.$getAnnotation(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveAnnotationUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$switchLane=function(o){switch(o){case"annotation":if(this.activeLane==="annotation")break;var i=this.$findNearestAnnotation(this.activeRowIndex);if(i==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var r=this.$findNearestFoldWidget(this.activeRowIndex);if(r==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);break}},u.prototype.$rowIndexToRow=function(o){var i=this.lines.get(o);return i?i.row:null},u.prototype.$rowToRowIndex=function(o){for(var i=0;i<this.lines.getLength();i++){var r=this.lines.get(i);if(r.row==o)return i}return null},u}();m.GutterKeyboardHandler=M;var l=function(){function u(o,i){this.gutterKeyboardHandler=i,this.domEvent=o}return u.prototype.getKey=function(){return W.keyCodeToString(this.domEvent.keyCode)},u.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},u.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},u.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},u}();m.GutterKeyboardEvent=l}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(p,m,Vn){var W=this&&this.__values||function(y){var h=typeof Symbol=="function"&&Symbol.iterator,w=h&&y[h],Q=0;if(w)return w.call(y);if(y&&typeof y.length=="number")return{next:function(){return y&&Q>=y.length&&(y=void 0),{value:y&&y[Q++],done:!y}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},R=p("./lib/oop"),M=p("./lib/dom"),l=p("./lib/lang"),u=p("./lib/useragent"),o=p("./keyboard/textinput").TextInput,i=p("./mouse/mouse_handler").MouseHandler,r=p("./mouse/fold_handler").FoldHandler,t=p("./keyboard/keybinding").KeyBinding,e=p("./edit_session").EditSession,n=p("./search").Search,a=p("./range").Range,d=p("./lib/event_emitter").EventEmitter,f=p("./commands/command_manager").CommandManager,oe=p("./commands/default_commands").commands,F=p("./config"),_=p("./token_iterator").TokenIterator,S=p("./keyboard/gutter_handler").GutterKeyboardHandler,xe=p("./config").nls,He=p("./clipboard"),Ae=p("./lib/keys"),J=function(){function y(h,w,Q){this.session,this.$toDestroy=[];var Me=h.getContainerElement();this.container=Me,this.renderer=h,this.id="editor"+ ++y.$uid,this.commands=new f(u.isMac?"mac":"win",oe),typeof document=="object"&&(this.textInput=new o(h.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new r(this)),this.keyBinding=new t(this),this.$search=new n().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(Gn,Yn){Yn._$emitInputEvent.schedule(31)}),this.setSession(w||Q&&Q.session||new e("")),F.resetOptions(this),Q&&this.setOptions(Q),F._signal("editor",this)}return y.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},y.prototype.startOperation=function(h){this.session.startOperation(h)},y.prototype.endOperation=function(h){this.session.endOperation(h)},y.prototype.onStartOperation=function(h){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,h||(this.previousCommand=null)},y.prototype.onEndOperation=function(h){if(this.curOp&&this.session){if(h&&h.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var w=this.curOp.command,Q=w&&w.scrollIntoView;if(Q){switch(Q){case"center-animate":Q="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var Me=this.selection.getRange(),Gn=this.renderer.layerConfig;(Me.start.row>=Gn.lastRow||Me.end.row<=Gn.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}Q=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},y.prototype.$historyTracker=function(h){if(this.$mergeUndoDeltas){var w=this.prevOp,Q=this.$mergeableCommands,Me=w.command&&h.command.name==w.command.name;if(h.command.name=="insertstring"){var Gn=h.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),Me=Me&&this.mergeNextCommand&&(!/\s/.test(Gn)||/\s/.test(w.args)),this.mergeNextCommand=!0}else Me=Me&&Q.indexOf(h.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(Me=!1),Me?this.session.mergeUndoDeltas=!0:Q.indexOf(h.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},y.prototype.setKeyboardHandler=function(h,w){if(h&&typeof h=="string"&&h!="ace"){this.$keybindingId=h;var Q=this;F.loadModule(["keybinding",h],function(Me){Q.$keybindingId==h&&Q.keyBinding.setKeyboardHandler(Me&&Me.handler),w&&w()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(h),w&&w()},y.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},y.prototype.setSession=function(h){if(this.session!=h){this.curOp&&this.endOperation(),this.curOp={};var w=this.session;if(w){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 Q=this.session.getSelection();Q.off("changeCursor",this.$onCursorChange),Q.off("changeSelection",this.$onSelectionChange)}this.session=h,h?(this.$onDocumentChange=this.onDocumentChange.bind(this),h.on("change",this.$onDocumentChange),this.renderer.setSession(h),this.$onChangeMode=this.onChangeMode.bind(this),h.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),h.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),h.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),h.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),h.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),h.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=h.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(h)),this._signal("changeSession",{session:h,oldSession:w}),this.curOp=null,w&&w._signal("changeEditor",{oldEditor:this}),w&&(w.$editor=null),h&&h._signal("changeEditor",{editor:this}),h&&(h.$editor=this),h&&!h.destroyed&&h.bgTokenizer.scheduleStart()}},y.prototype.getSession=function(){return this.session},y.prototype.setValue=function(h,w){return this.session.doc.setValue(h),w?w==1?this.navigateFileEnd():w==-1&&this.navigateFileStart():this.selectAll(),h},y.prototype.getValue=function(){return this.session.getValue()},y.prototype.getSelection=function(){return this.selection},y.prototype.resize=function(h){this.renderer.onResize(h)},y.prototype.setTheme=function(h,w){this.renderer.setTheme(h,w)},y.prototype.getTheme=function(){return this.renderer.getTheme()},y.prototype.setStyle=function(h){this.renderer.setStyle(h)},y.prototype.unsetStyle=function(h){this.renderer.unsetStyle(h)},y.prototype.getFontSize=function(){return this.getOption("fontSize")||M.computedStyle(this.container).fontSize},y.prototype.setFontSize=function(h){this.setOption("fontSize",h)},y.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var h=this;this.$highlightPending=!0,setTimeout(function(){h.$highlightPending=!1;var w=h.session;if(!(!w||w.destroyed)){w.$bracketHighlight&&(w.$bracketHighlight.markerIds.forEach(function(Xn){w.removeMarker(Xn)}),w.$bracketHighlight=null);var Q=h.getCursorPosition(),Me=h.getKeyboardHandler(),Gn=Me&&Me.$getDirectionForHighlight&&Me.$getDirectionForHighlight(h),Yn=w.getMatchingBracketRanges(Q,Gn);if(!Yn){var Qn=new _(w,Q.row,Q.column),Zn=Qn.getCurrentToken();if(Zn&&/\b(?:tag-open|tag-name)/.test(Zn.type)){var Jn=w.getMatchingTags(Q);Jn&&(Yn=[Jn.openTagName.isEmpty()?Jn.openTag:Jn.openTagName,Jn.closeTagName.isEmpty()?Jn.closeTag:Jn.closeTagName])}}if(!Yn&&w.$mode.getMatching&&(Yn=w.$mode.getMatching(h.session)),!Yn){h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide();return}var ii="ace_bracket";Array.isArray(Yn)?Yn.length==1&&(ii="ace_error_bracket"):Yn=[Yn],Yn.length==2&&(a.comparePoints(Yn[0].end,Yn[1].start)==0?Yn=[a.fromPoints(Yn[0].start,Yn[1].end)]:a.comparePoints(Yn[0].start,Yn[1].end)==0&&(Yn=[a.fromPoints(Yn[1].start,Yn[0].end)])),w.$bracketHighlight={ranges:Yn,markerIds:Yn.map(function(Xn){return w.addMarker(Xn,ii,"text")})},h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide()}},50)}},y.prototype.focus=function(){this.textInput.focus()},y.prototype.isFocused=function(){return this.textInput.isFocused()},y.prototype.blur=function(){this.textInput.blur()},y.prototype.onFocus=function(h){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",h))},y.prototype.onBlur=function(h){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",h))},y.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},y.prototype.onDocumentChange=function(h){var w=this.session.$useWrapMode,Q=h.start.row==h.end.row?h.end.row:1/0;this.renderer.updateLines(h.start.row,Q,w),this._signal("change",h),this.$cursorChange()},y.prototype.onTokenizerUpdate=function(h){var w=h.data;this.renderer.updateLines(w.first,w.last)},y.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},y.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},y.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},y.prototype.$updateHighlightActiveLine=function(){var h=this.getSession(),w;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(w=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(w=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(w=!1)),h.$highlightLineMarker&&!w)h.removeMarker(h.$highlightLineMarker.id),h.$highlightLineMarker=null;else if(!h.$highlightLineMarker&&w){var Q=new a(w.row,w.column,w.row,1/0);Q.id=h.addMarker(Q,"ace_active-line","screenLine"),h.$highlightLineMarker=Q}else w&&(h.$highlightLineMarker.start.row=w.row,h.$highlightLineMarker.end.row=w.row,h.$highlightLineMarker.start.column=w.column,h._signal("changeBackMarker"))},y.prototype.onSelectionChange=function(h){var w=this.session;if(w.$selectionMarker&&w.removeMarker(w.$selectionMarker),w.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var Q=this.selection.getRange(),Me=this.getSelectionStyle();w.$selectionMarker=w.addMarker(Q,"ace_selection",Me)}var Gn=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(Gn),this._signal("changeSelection")},y.prototype.$getSelectionHighLightRegexp=function(){var h=this.session,w=this.getSelectionRange();if(!(w.isEmpty()||w.isMultiLine())){var Q=w.start.column,Me=w.end.column,Gn=h.getLine(w.start.row),Yn=Gn.substring(Q,Me);if(!(Yn.length>5e3||!/[\w\d]/.test(Yn))){var Qn=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Yn}),Zn=Gn.substring(Q-1,Me+1);if(Qn.test(Zn))return Qn}}},y.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},y.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},y.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},y.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},y.prototype.onChangeMode=function(h){this.renderer.updateText(),this._emit("changeMode",h)},y.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},y.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},y.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},y.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},y.prototype.getCopyText=function(){var h=this.getSelectedText(),w=this.session.doc.getNewLineCharacter(),Q=!1;if(!h&&this.$copyWithEmptySelection){Q=!0;for(var Me=this.selection.getAllRanges(),Gn=0;Gn<Me.length;Gn++){var Yn=Me[Gn];Gn&&Me[Gn-1].start.row==Yn.start.row||(h+=this.session.getLine(Yn.start.row)+w)}}var Qn={text:h};return this._signal("copy",Qn),He.lineMode=Q?Qn.text:!1,Qn.text},y.prototype.onCopy=function(){this.commands.exec("copy",this)},y.prototype.onCut=function(){this.commands.exec("cut",this)},y.prototype.onPaste=function(h,w){var Q={text:h,event:w};this.commands.exec("paste",this,Q)},y.prototype.$handlePaste=function(h){typeof h=="string"&&(h={text:h}),this._signal("paste",h);var w=h.text,Q=w===He.lineMode,Me=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)Q?Me.insert({row:this.selection.lead.row,column:0},w):this.insert(w);else if(Q)this.selection.rangeList.ranges.forEach(function(ii){Me.insert({row:ii.start.row,column:0},w)});else{var Gn=w.split(/\r\n|\r|\n/),Yn=this.selection.rangeList.ranges,Qn=Gn.length==2&&(!Gn[0]||!Gn[1]);if(Gn.length!=Yn.length||Qn)return this.commands.exec("insertstring",this,w);for(var Zn=Yn.length;Zn--;){var Jn=Yn[Zn];Jn.isEmpty()||Me.remove(Jn),Me.insert(Jn.start,Gn[Zn])}}},y.prototype.execCommand=function(h,w){return this.commands.exec(h,this,w)},y.prototype.insert=function(h,w){var Q=this.session,Me=Q.getMode(),Gn=this.getCursorPosition();if(this.getBehavioursEnabled()&&!w){var Yn=Me.transformAction(Q.getState(Gn.row),"insertion",this,Q,h);Yn&&(h!==Yn.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),h=Yn.text)}if(h==" "&&(h=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&h.indexOf(`
204
+ `)==-1){var Qn=a.fromPoints(Gn,Gn);Qn.end.column+=h.length,this.session.remove(Qn)}}else{var Qn=this.getSelectionRange();Gn=this.session.remove(Qn),this.clearSelection()}if(h==`
205
+ `||h==`\r
206
+ `){var Xn=Q.getLine(Gn.row);if(Gn.column>Xn.search(/\S|$/)){var Zn=Xn.substr(Gn.column).search(/\S|$/);Q.doc.removeInLine(Gn.row,Gn.column,Gn.column+Zn)}}this.clearSelection();var Jn=Gn.column,ii=Q.getState(Gn.row),Xn=Q.getLine(Gn.row),ei=Me.checkOutdent(ii,Xn,h);if(Q.insert(Gn,h),Yn&&Yn.selection&&(Yn.selection.length==2?this.selection.setSelectionRange(new a(Gn.row,Jn+Yn.selection[0],Gn.row,Jn+Yn.selection[1])):this.selection.setSelectionRange(new a(Gn.row+Yn.selection[0],Yn.selection[1],Gn.row+Yn.selection[2],Yn.selection[3]))),this.$enableAutoIndent){if(Q.getDocument().isNewLine(h)){var ni=Me.getNextLineIndent(ii,Xn.slice(0,Gn.column),Q.getTabString());Q.insert({row:Gn.row+1,column:0},ni)}ei&&Me.autoOutdent(ii,Q,Gn.row)}},y.prototype.autoIndent=function(){for(var h=this.session,w=h.getMode(),Q=this.selection.isEmpty()?[new a(0,0,h.doc.getLength()-1,0)]:this.selection.getAllRanges(),Me="",Gn="",Yn="",Qn=h.getTabString(),Zn=0;Zn<Q.length;Zn++)for(var Jn=Q[Zn].start.row,ii=Q[Zn].end.row,Xn=Jn;Xn<=ii;Xn++){Xn>0&&(Me=h.getState(Xn-1),Gn=h.getLine(Xn-1),Yn=w.getNextLineIndent(Me,Gn,Qn));var ei=h.getLine(Xn),ni=w.$getIndent(ei);if(Yn!==ni){if(ni.length>0){var ti=new a(Xn,0,Xn,ni.length);h.remove(ti)}Yn.length>0&&h.insert({row:Xn,column:0},Yn)}w.autoOutdent(Me,h,Xn)}},y.prototype.onTextInput=function(h,w){if(!w)return this.keyBinding.onTextInput(h);this.startOperation({command:{name:"insertstring"}});var Q=this.applyComposition.bind(this,h,w);this.selection.rangeCount?this.forEachSelection(Q):Q(),this.endOperation()},y.prototype.applyComposition=function(h,w){if(w.extendLeft||w.extendRight){var Q=this.selection.getRange();Q.start.column-=w.extendLeft,Q.end.column+=w.extendRight,Q.start.column<0&&(Q.start.row--,Q.start.column+=this.session.getLine(Q.start.row).length+1),this.selection.setRange(Q),!h&&!Q.isEmpty()&&this.remove()}if((h||!this.selection.isEmpty())&&this.insert(h,!0),w.restoreStart||w.restoreEnd){var Q=this.selection.getRange();Q.start.column-=w.restoreStart,Q.end.column-=w.restoreEnd,this.selection.setRange(Q)}},y.prototype.onCommandKey=function(h,w,Q){return this.keyBinding.onCommandKey(h,w,Q)},y.prototype.setOverwrite=function(h){this.session.setOverwrite(h)},y.prototype.getOverwrite=function(){return this.session.getOverwrite()},y.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},y.prototype.setScrollSpeed=function(h){this.setOption("scrollSpeed",h)},y.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},y.prototype.setDragDelay=function(h){this.setOption("dragDelay",h)},y.prototype.getDragDelay=function(){return this.getOption("dragDelay")},y.prototype.setSelectionStyle=function(h){this.setOption("selectionStyle",h)},y.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},y.prototype.setHighlightActiveLine=function(h){this.setOption("highlightActiveLine",h)},y.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},y.prototype.setHighlightGutterLine=function(h){this.setOption("highlightGutterLine",h)},y.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},y.prototype.setHighlightSelectedWord=function(h){this.setOption("highlightSelectedWord",h)},y.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},y.prototype.setAnimatedScroll=function(h){this.renderer.setAnimatedScroll(h)},y.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},y.prototype.setShowInvisibles=function(h){this.renderer.setShowInvisibles(h)},y.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},y.prototype.setDisplayIndentGuides=function(h){this.renderer.setDisplayIndentGuides(h)},y.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},y.prototype.setHighlightIndentGuides=function(h){this.renderer.setHighlightIndentGuides(h)},y.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},y.prototype.setShowPrintMargin=function(h){this.renderer.setShowPrintMargin(h)},y.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},y.prototype.setPrintMarginColumn=function(h){this.renderer.setPrintMarginColumn(h)},y.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},y.prototype.setReadOnly=function(h){this.setOption("readOnly",h)},y.prototype.getReadOnly=function(){return this.getOption("readOnly")},y.prototype.setBehavioursEnabled=function(h){this.setOption("behavioursEnabled",h)},y.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},y.prototype.setWrapBehavioursEnabled=function(h){this.setOption("wrapBehavioursEnabled",h)},y.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},y.prototype.setShowFoldWidgets=function(h){this.setOption("showFoldWidgets",h)},y.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},y.prototype.setFadeFoldWidgets=function(h){this.setOption("fadeFoldWidgets",h)},y.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},y.prototype.remove=function(h){this.selection.isEmpty()&&(h=="left"?this.selection.selectLeft():this.selection.selectRight());var w=this.getSelectionRange();if(this.getBehavioursEnabled()){var Q=this.session,Me=Q.getState(w.start.row),Gn=Q.getMode().transformAction(Me,"deletion",this,Q,w);if(w.end.column===0){var Yn=Q.getTextRange(w);if(Yn[Yn.length-1]==`
207
+ `){var Qn=Q.getLine(w.end.row);/^\s+$/.test(Qn)&&(w.end.column=Qn.length)}}Gn&&(w=Gn)}this.session.remove(w),this.clearSelection()},y.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var h=this.getSelectionRange();h.start.column==h.end.column&&h.start.row==h.end.row&&(h.end.column=0,h.end.row++),this.session.remove(h),this.clearSelection()},y.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var h=this.getCursorPosition();this.insert(`
208
+ `),this.moveCursorToPosition(h)},y.prototype.setGhostText=function(h,w){this.renderer.setGhostText(h,w)},y.prototype.removeGhostText=function(){this.renderer.removeGhostText()},y.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var h=this.getCursorPosition(),w=h.column;if(w!==0){var Q=this.session.getLine(h.row),Me,Gn;w<Q.length?(Me=Q.charAt(w)+Q.charAt(w-1),Gn=new a(h.row,w-1,h.row,w+1)):(Me=Q.charAt(w-1)+Q.charAt(w-2),Gn=new a(h.row,w-2,h.row,w)),this.session.replace(Gn,Me),this.session.selection.moveToPosition(Gn.end)}}},y.prototype.toLowerCase=function(){var h=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var w=this.getSelectionRange(),Q=this.session.getTextRange(w);this.session.replace(w,Q.toLowerCase()),this.selection.setSelectionRange(h)},y.prototype.toUpperCase=function(){var h=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var w=this.getSelectionRange(),Q=this.session.getTextRange(w);this.session.replace(w,Q.toUpperCase()),this.selection.setSelectionRange(h)},y.prototype.indent=function(){var h=this.session,w=this.getSelectionRange();if(w.start.row<w.end.row){var Q=this.$getSelectedRows();h.indentRows(Q.first,Q.last," ");return}else if(w.start.column<w.end.column){var Me=h.getTextRange(w);if(!/^\s+$/.test(Me)){var Q=this.$getSelectedRows();h.indentRows(Q.first,Q.last," ");return}}var Gn=h.getLine(w.start.row),Yn=w.start,Qn=h.getTabSize(),Zn=h.documentToScreenColumn(Yn.row,Yn.column);if(this.session.getUseSoftTabs())var Jn=Qn-Zn%Qn,ii=l.stringRepeat(" ",Jn);else{for(var Jn=Zn%Qn;Gn[w.start.column-1]==" "&&Jn;)w.start.column--,Jn--;this.selection.setSelectionRange(w),ii=" "}return this.insert(ii)},y.prototype.blockIndent=function(){var h=this.$getSelectedRows();this.session.indentRows(h.first,h.last," ")},y.prototype.blockOutdent=function(){var h=this.session.getSelection();this.session.outdentRows(h.getRange())},y.prototype.sortLines=function(){for(var h=this.$getSelectedRows(),w=this.session,Q=[],Me=h.first;Me<=h.last;Me++)Q.push(w.getLine(Me));Q.sort(function(Qn,Zn){return Qn.toLowerCase()<Zn.toLowerCase()?-1:Qn.toLowerCase()>Zn.toLowerCase()?1:0});for(var Gn=new a(0,0,0,0),Me=h.first;Me<=h.last;Me++){var Yn=w.getLine(Me);Gn.start.row=Me,Gn.end.row=Me,Gn.end.column=Yn.length,w.replace(Gn,Q[Me-h.first])}},y.prototype.toggleCommentLines=function(){var h=this.session.getState(this.getCursorPosition().row),w=this.$getSelectedRows();this.session.getMode().toggleCommentLines(h,this.session,w.first,w.last)},y.prototype.toggleBlockComment=function(){var h=this.getCursorPosition(),w=this.session.getState(h.row),Q=this.getSelectionRange();this.session.getMode().toggleBlockComment(w,this.session,Q,h)},y.prototype.getNumberAt=function(h,w){var Q=/[\-]?[0-9]+(?:\.[0-9]+)?/g;Q.lastIndex=0;for(var Me=this.session.getLine(h);Q.lastIndex<w;){var Gn=Q.exec(Me);if(Gn.index<=w&&Gn.index+Gn[0].length>=w){var Yn={value:Gn[0],start:Gn.index,end:Gn.index+Gn[0].length};return Yn}}return null},y.prototype.modifyNumber=function(h){var w=this.selection.getCursor().row,Q=this.selection.getCursor().column,Me=new a(w,Q-1,w,Q),Gn=this.session.getTextRange(Me);if(!isNaN(parseFloat(Gn))&&isFinite(Gn)){var Yn=this.getNumberAt(w,Q);if(Yn){var Qn=Yn.value.indexOf(".")>=0?Yn.start+Yn.value.indexOf(".")+1:Yn.end,Zn=Yn.start+Yn.value.length-Qn,Jn=parseFloat(Yn.value);Jn*=Math.pow(10,Zn),Qn!==Yn.end&&Q<Qn?h*=Math.pow(10,Yn.end-Q-1):h*=Math.pow(10,Yn.end-Q),Jn+=h,Jn/=Math.pow(10,Zn);var ii=Jn.toFixed(Zn),Xn=new a(w,Yn.start,w,Yn.end);this.session.replace(Xn,ii),this.moveCursorTo(w,Math.max(Yn.start+1,Q+ii.length-Yn.value.length))}}else this.toggleWord()},y.prototype.toggleWord=function(){var h=this.selection.getCursor().row,w=this.selection.getCursor().column;this.selection.selectWord();var Q=this.getSelectedText(),Me=this.selection.getWordRange().start.column,Gn=Q.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Yn=w-Me-1;Yn<0&&(Yn=0);var Qn=0,Zn=0,Jn=this;Q.match(/[A-Za-z0-9_]+/)&&Gn.forEach(function(si,hi){Zn=Qn+si.length,Yn>=Qn&&Yn<=Zn&&(Q=si,Jn.selection.clearSelection(),Jn.moveCursorTo(h,Qn+Me),Jn.selection.selectTo(h,Zn+Me)),Qn=Zn});for(var ii=this.$toggleWordPairs,Xn,ei=0;ei<ii.length;ei++)for(var ni=ii[ei],ti=0;ti<=1;ti++){var oi=+!ti,ai=Q.match(new RegExp("^\\s?_?("+l.escapeRegExp(ni[ti])+")\\s?$","i"));if(ai){var li=Q.match(new RegExp("([_]|^|\\s)("+l.escapeRegExp(ai[1])+")($|\\s)","g"));li&&(Xn=Q.replace(new RegExp(l.escapeRegExp(ni[ti]),"i"),function(si){var hi=ni[oi];return si.toUpperCase()==si?hi=hi.toUpperCase():si.charAt(0).toUpperCase()==si.charAt(0)&&(hi=hi.substr(0,0)+ni[oi].charAt(0).toUpperCase()+hi.substr(1)),hi}),this.insert(Xn),Xn="")}}},y.prototype.findLinkAt=function(h,w){var Q,Me,Gn=this.session.getLine(h),Yn=Gn.split(/((?:https?|ftp):\/\/[\S]+)/),Qn=w;Qn<0&&(Qn=0);var Zn=0,Jn=0,ii;try{for(var Xn=W(Yn),ei=Xn.next();!ei.done;ei=Xn.next()){var ni=ei.value;if(Jn=Zn+ni.length,Qn>=Zn&&Qn<=Jn&&ni.match(/((?:https?|ftp):\/\/[\S]+)/)){ii=ni.replace(/[\s:.,'";}\]]+$/,"");break}Zn=Jn}}catch(ti){Q={error:ti}}finally{try{ei&&!ei.done&&(Me=Xn.return)&&Me.call(Xn)}finally{if(Q)throw Q.error}}return ii},y.prototype.openLink=function(){var h=this.selection.getCursor(),w=this.findLinkAt(h.row,h.column);return w&&window.open(w,"_blank"),w!=null},y.prototype.removeLines=function(){var h=this.$getSelectedRows();this.session.removeFullLines(h.first,h.last),this.clearSelection()},y.prototype.duplicateSelection=function(){var h=this.selection,w=this.session,Q=h.getRange(),Me=h.isBackwards();if(Q.isEmpty()){var Gn=Q.start.row;w.duplicateLines(Gn,Gn)}else{var Yn=Me?Q.start:Q.end,Qn=w.insert(Yn,w.getTextRange(Q));Q.start=Yn,Q.end=Qn,h.setSelectionRange(Q,Me)}},y.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},y.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},y.prototype.moveText=function(h,w,Q){return this.session.moveText(h,w,Q)},y.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},y.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},y.prototype.$moveLines=function(h,w){var Q,Me,Gn=this.selection;if(!Gn.inMultiSelectMode||this.inVirtualSelectionMode){var Yn=Gn.toOrientedRange();Q=this.$getSelectedRows(Yn),Me=this.session.$moveLines(Q.first,Q.last,w?0:h),w&&h==-1&&(Me=0),Yn.moveBy(Me,0),Gn.fromOrientedRange(Yn)}else{var Qn=Gn.rangeList.ranges;Gn.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var Zn=0,Jn=0,ii=Qn.length,Xn=0;Xn<ii;Xn++){var ei=Xn;Qn[Xn].moveBy(Zn,0),Q=this.$getSelectedRows(Qn[Xn]);for(var ni=Q.first,ti=Q.last;++Xn<ii;){Jn&&Qn[Xn].moveBy(Jn,0);var oi=this.$getSelectedRows(Qn[Xn]);if(w&&oi.first!=ti)break;if(!w&&oi.first>ti+1)break;ti=oi.last}for(Xn--,Zn=this.session.$moveLines(ni,ti,w?0:h),w&&h==-1&&(ei=Xn+1);ei<=Xn;)Qn[ei].moveBy(Zn,0),ei++;w||(Zn=0),Jn+=Zn}Gn.fromOrientedRange(Gn.ranges[0]),Gn.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},y.prototype.$getSelectedRows=function(h){return h=(h||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(h.start.row),last:this.session.getRowFoldEnd(h.end.row)}},y.prototype.onCompositionStart=function(h){this.renderer.showComposition(h)},y.prototype.onCompositionUpdate=function(h){this.renderer.setCompositionText(h)},y.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},y.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},y.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},y.prototype.isRowVisible=function(h){return h>=this.getFirstVisibleRow()&&h<=this.getLastVisibleRow()},y.prototype.isRowFullyVisible=function(h){return h>=this.renderer.getFirstFullyVisibleRow()&&h<=this.renderer.getLastFullyVisibleRow()},y.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},y.prototype.$moveByPage=function(h,w){var Q=this.renderer,Me=this.renderer.layerConfig,Gn=h*Math.floor(Me.height/Me.lineHeight);w===!0?this.selection.$moveSelection(function(){this.moveCursorBy(Gn,0)}):w===!1&&(this.selection.moveCursorBy(Gn,0),this.selection.clearSelection());var Yn=Q.scrollTop;Q.scrollBy(0,Gn*Me.lineHeight),w!=null&&Q.scrollCursorIntoView(null,.5),Q.animateScrolling(Yn)},y.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},y.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},y.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},y.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},y.prototype.scrollPageDown=function(){this.$moveByPage(1)},y.prototype.scrollPageUp=function(){this.$moveByPage(-1)},y.prototype.scrollToRow=function(h){this.renderer.scrollToRow(h)},y.prototype.scrollToLine=function(h,w,Q,Me){this.renderer.scrollToLine(h,w,Q,Me)},y.prototype.centerSelection=function(){var h=this.getSelectionRange(),w={row:Math.floor(h.start.row+(h.end.row-h.start.row)/2),column:Math.floor(h.start.column+(h.end.column-h.start.column)/2)};this.renderer.alignCursor(w,.5)},y.prototype.getCursorPosition=function(){return this.selection.getCursor()},y.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},y.prototype.getSelectionRange=function(){return this.selection.getRange()},y.prototype.selectAll=function(){this.selection.selectAll()},y.prototype.clearSelection=function(){this.selection.clearSelection()},y.prototype.moveCursorTo=function(h,w){this.selection.moveCursorTo(h,w)},y.prototype.moveCursorToPosition=function(h){this.selection.moveCursorToPosition(h)},y.prototype.jumpToMatching=function(h,w){var Q=this.getCursorPosition(),Me=new _(this.session,Q.row,Q.column),Gn=Me.getCurrentToken(),Yn=0;Gn&&Gn.type.indexOf("tag-name")!==-1&&(Gn=Me.stepBackward());var Qn=Gn||Me.stepForward();if(Qn){var Zn,Jn=!1,ii={},Xn=Q.column-Qn.start,ei,ni={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Qn.value.match(/[{}()\[\]]/g)){for(;Xn<Qn.value.length&&!Jn;Xn++)if(ni[Qn.value[Xn]])switch(ei=ni[Qn.value[Xn]]+"."+Qn.type.replace("rparen","lparen"),isNaN(ii[ei])&&(ii[ei]=0),Qn.value[Xn]){case"(":case"[":case"{":ii[ei]++;break;case")":case"]":case"}":ii[ei]--,ii[ei]===-1&&(Zn="bracket",Jn=!0);break}}else Qn.type.indexOf("tag-name")!==-1&&(isNaN(ii[Qn.value])&&(ii[Qn.value]=0),Gn.value==="<"&&Yn>1?ii[Qn.value]++:Gn.value==="</"&&ii[Qn.value]--,ii[Qn.value]===-1&&(Zn="tag",Jn=!0));Jn||(Gn=Qn,Yn++,Qn=Me.stepForward(),Xn=0)}while(Qn&&!Jn);if(Zn){var ti,oi;if(Zn==="bracket")ti=this.session.getBracketRange(Q),ti||(ti=new a(Me.getCurrentTokenRow(),Me.getCurrentTokenColumn()+Xn-1,Me.getCurrentTokenRow(),Me.getCurrentTokenColumn()+Xn-1),oi=ti.start,(w||oi.row===Q.row&&Math.abs(oi.column-Q.column)<2)&&(ti=this.session.getBracketRange(oi)));else if(Zn==="tag"){if(!Qn||Qn.type.indexOf("tag-name")===-1)return;if(ti=new a(Me.getCurrentTokenRow(),Me.getCurrentTokenColumn()-2,Me.getCurrentTokenRow(),Me.getCurrentTokenColumn()-2),ti.compare(Q.row,Q.column)===0){var ai=this.session.getMatchingTags(Q);ai&&(ai.openTag.contains(Q.row,Q.column)?(ti=ai.closeTag,oi=ti.start):(ti=ai.openTag,ai.closeTag.start.row===Q.row&&ai.closeTag.start.column===Q.column?oi=ti.end:oi=ti.start))}oi=oi||ti.start}oi=ti&&ti.cursor||oi,oi&&(h?ti&&w?this.selection.setRange(ti):ti&&ti.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(oi.row,oi.column):this.selection.moveTo(oi.row,oi.column))}}},y.prototype.gotoLine=function(h,w,Q){this.selection.clearSelection(),this.session.unfold({row:h-1,column:w||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(h-1,w||0),this.isRowFullyVisible(h-1)||this.scrollToLine(h-1,!0,Q)},y.prototype.navigateTo=function(h,w){this.selection.moveTo(h,w)},y.prototype.navigateUp=function(h){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var w=this.selection.anchor.getPosition();return this.moveCursorToPosition(w)}this.selection.clearSelection(),this.selection.moveCursorBy(-h||-1,0)},y.prototype.navigateDown=function(h){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var w=this.selection.anchor.getPosition();return this.moveCursorToPosition(w)}this.selection.clearSelection(),this.selection.moveCursorBy(h||1,0)},y.prototype.navigateLeft=function(h){if(this.selection.isEmpty())for(h=h||1;h--;)this.selection.moveCursorLeft();else{var w=this.getSelectionRange().start;this.moveCursorToPosition(w)}this.clearSelection()},y.prototype.navigateRight=function(h){if(this.selection.isEmpty())for(h=h||1;h--;)this.selection.moveCursorRight();else{var w=this.getSelectionRange().end;this.moveCursorToPosition(w)}this.clearSelection()},y.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},y.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},y.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},y.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},y.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},y.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},y.prototype.replace=function(h,w){w&&this.$search.set(w);var Q=this.$search.find(this.session),Me=0;return Q&&(this.$tryReplace(Q,h)&&(Me=1),this.selection.setSelectionRange(Q),this.renderer.scrollSelectionIntoView(Q.start,Q.end)),Me},y.prototype.replaceAll=function(h,w){w&&this.$search.set(w);var Q=this.$search.findAll(this.session),Me=0;if(!Q.length)return Me;var Gn=this.getSelectionRange();this.selection.moveTo(0,0);for(var Yn=Q.length-1;Yn>=0;--Yn)this.$tryReplace(Q[Yn],h)&&Me++;return this.selection.setSelectionRange(Gn),Me},y.prototype.$tryReplace=function(h,w){var Q=this.session.getTextRange(h);return w=this.$search.replace(Q,w),w!==null?(h.end=this.session.replace(h,w),h):null},y.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},y.prototype.find=function(h,w,Q){w||(w={}),typeof h=="string"||h instanceof RegExp?w.needle=h:typeof h=="object"&&R.mixin(w,h);var Me=this.selection.getRange();w.needle==null&&(h=this.session.getTextRange(Me)||this.$search.$options.needle,h||(Me=this.session.getWordRange(Me.start.row,Me.start.column),h=this.session.getTextRange(Me)),this.$search.set({needle:h})),this.$search.set(w),w.start||this.$search.set({start:Me});var Gn=this.$search.find(this.session);if(w.preventScroll)return Gn;if(Gn)return this.revealRange(Gn,Q),Gn;w.backwards?Me.start=Me.end:Me.end=Me.start,this.selection.setRange(Me)},y.prototype.findNext=function(h,w){this.find({skipCurrent:!0,backwards:!1},h,w)},y.prototype.findPrevious=function(h,w){this.find(h,{skipCurrent:!0,backwards:!0},w)},y.prototype.revealRange=function(h,w){this.session.unfold(h),this.selection.setSelectionRange(h);var Q=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(h.start,h.end,.5),w!==!1&&this.renderer.animateScrolling(Q)},y.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},y.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},y.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(h){h.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},y.prototype.setAutoScrollEditorIntoView=function(h){if(h){var w,Q=this,Me=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var Gn=this.$scrollAnchor;Gn.style.cssText="position:absolute",this.container.insertBefore(Gn,this.container.firstChild);var Yn=this.on("changeSelection",function(){Me=!0}),Qn=this.renderer.on("beforeRender",function(){Me&&(w=Q.renderer.container.getBoundingClientRect())}),Zn=this.renderer.on("afterRender",function(){if(Me&&w&&(Q.isFocused()||Q.searchBox&&Q.searchBox.isFocused())){var Jn=Q.renderer,ii=Jn.$cursorLayer.$pixelPos,Xn=Jn.layerConfig,ei=ii.top-Xn.offset;ii.top>=0&&ei+w.top<0?Me=!0:ii.top<Xn.height&&ii.top+w.top+Xn.lineHeight>window.innerHeight?Me=!1:Me=null,Me!=null&&(Gn.style.top=ei+"px",Gn.style.left=ii.left+"px",Gn.style.height=Xn.lineHeight+"px",Gn.scrollIntoView(Me)),Me=w=null}});this.setAutoScrollEditorIntoView=function(Jn){Jn||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Yn),this.renderer.off("afterRender",Zn),this.renderer.off("beforeRender",Qn))}}},y.prototype.$resetCursorStyle=function(){var h=this.$cursorStyle||"ace",w=this.renderer.$cursorLayer;w&&(w.setSmoothBlinking(/smooth/.test(h)),w.isBlinking=!this.$readOnly&&h!="wide",M.setCssClass(w.element,"ace_slim-cursors",/slim/.test(h)))},y.prototype.prompt=function(h,w,Q){var Me=this;F.loadModule("ace/ext/prompt",function(Gn){Gn.prompt(Me,h,w,Q)})},y}();J.$uid=0,J.prototype.curOp=null,J.prototype.prevOp={},J.prototype.$mergeableCommands=["backspace","del","insertstring"],J.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"],["&&","||"],["==","!="]],R.implement(J.prototype,d),F.defineOptions(J.prototype,"editor",{selectionStyle:{set:function(y){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:y})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(y){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(y){this.textInput.setReadOnly(y),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(y){this.textInput.setCopyWithEmptySelection(y)},initialValue:!1},cursorStyle:{set:function(y){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(y){this.setAutoScrollEditorIntoView(y)}},keyboardHandler:{set:function(y){this.setKeyboardHandler(y)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(y){this.session.setValue(y)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(y){this.setSession(y)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(y){this.renderer.$gutterLayer.setShowLineNumbers(y),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),y&&this.$relativeLineNumbers?Kn.attach(this):Kn.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(y){this.$showLineNumbers&&y?Kn.attach(this):Kn.detach(this)}},placeholder:{set:function(y){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var h=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(h&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),M.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!h&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),M.addCssClass(this.container,"ace_hasPlaceholder");var w=M.createElement("div");w.className="ace_placeholder",w.textContent=this.$placeholder||"",this.renderer.placeholderNode=w,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!h&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(y){var h={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(Me){Me.blur(),Me.renderer.scroller.focus()},readOnly:!0},w=function(Me){if(Me.target==this.renderer.scroller&&Me.keyCode===Ae.enter){Me.preventDefault();var Gn=this.getCursorPosition().row;this.isRowVisible(Gn)||this.scrollToLine(Gn,!0,!0),this.focus()}},Q;y?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",xe("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",xe("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",w.bind(this)),this.commands.addCommand(h),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",xe("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",xe("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),Q||(Q=new S(this)),Q.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",w.bind(this)),this.commands.removeCommand(h),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),Q&&Q.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(y){this.$textInputAriaLabel=y},initialValue:""},enableMobileMenu:{set:function(y){this.$enableMobileMenu=y},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 Kn={getText:function(y,h){return(Math.abs(y.selection.lead.row-h)||h+1+(h<9?"·":""))+""},getWidth:function(y,h,w){return Math.max(h.toString().length,(w.lastRow+1).toString().length,2)*w.characterWidth},update:function(y,h){h.renderer.$loop.schedule(h.renderer.CHANGE_GUTTER)},attach:function(y){y.renderer.$gutterLayer.$renderer=this,y.on("changeSelection",this.update),this.update(null,y)},detach:function(y){y.renderer.$gutterLayer.$renderer==this&&(y.renderer.$gutterLayer.$renderer=null),y.off("changeSelection",this.update),this.update(null,y)}};m.Editor=J}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(p,m,Vn){var W=p("../lib/dom"),R=function(){function M(l,u){this.element=l,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return M.prototype.moveContainer=function(l){W.translate(this.element,0,-(l.firstRowScreen*l.lineHeight%this.canvasHeight)-l.offset*this.$offsetCoefficient)},M.prototype.pageChanged=function(l,u){return Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},M.prototype.computeLineTop=function(l,u,o){var i=u.firstRowScreen*u.lineHeight,r=Math.floor(i/this.canvasHeight),t=o.documentToScreenRow(l,0)*u.lineHeight;return t-r*this.canvasHeight},M.prototype.computeLineHeight=function(l,u,o){return u.lineHeight*o.getRowLineCount(l)},M.prototype.getLength=function(){return this.cells.length},M.prototype.get=function(l){return this.cells[l]},M.prototype.shift=function(){this.$cacheCell(this.cells.shift())},M.prototype.pop=function(){this.$cacheCell(this.cells.pop())},M.prototype.push=function(l){if(Array.isArray(l)){this.cells.push.apply(this.cells,l);for(var u=W.createFragment(this.element),o=0;o<l.length;o++)u.appendChild(l[o].element);this.element.appendChild(u)}else this.cells.push(l),this.element.appendChild(l.element)},M.prototype.unshift=function(l){if(Array.isArray(l)){this.cells.unshift.apply(this.cells,l);for(var u=W.createFragment(this.element),o=0;o<l.length;o++)u.appendChild(l[o].element);this.element.firstChild?this.element.insertBefore(u,this.element.firstChild):this.element.appendChild(u)}else this.cells.unshift(l),this.element.insertAdjacentElement("afterbegin",l.element)},M.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},M.prototype.$cacheCell=function(l){l&&(l.element.remove(),this.cellCache.push(l))},M.prototype.createCell=function(l,u,o,i){var r=this.cellCache.pop();if(!r){var t=W.createElement("div");i&&i(t),this.element.appendChild(t),r={element:t,text:"",row:l}}return r.row=l,r},M}();m.Lines=R}),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(p,m,Vn){var W=p("../lib/dom"),R=p("../lib/oop"),M=p("../lib/lang"),l=p("../lib/event_emitter").EventEmitter,u=p("./lines").Lines,o=p("../config").nls,i=function(){function t(e){this.element=W.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 u(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,n){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,n)},t.prototype.removeGutterDecoration=function(e,n){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,n)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var n=0;n<e.length;n++){var a=e[n],d=a.row,f=this.$annotations[d];f||(f=this.$annotations[d]={text:[],type:[],displayText:[]});var oe=a.text,F=a.text,_=a.type;oe=oe?M.escapeHTML(oe):a.html||"",F=F||a.html||"",f.text.indexOf(oe)===-1&&(f.text.push(oe),f.type.push(_),f.displayText.push(F));var S=a.className;S?f.className=S:_==="error"?f.className=" ace_error":_==="security"&&!/\bace_error\b/.test(f.className)?f.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(f.className)?f.className=" ace_warning":_==="info"&&!f.className?f.className=" ace_info":_==="hint"&&!f.className&&(f.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var n=e.start.row,a=e.end.row-n;if(a!==0)if(e.action=="remove")this.$annotations.splice(n,a+1,null);else{var d=new Array(a+1);d.unshift(n,1),this.$annotations.splice.apply(this.$annotations,d)}}},t.prototype.update=function(e){this.config=e;var n=this.session,a=e.firstRow,d=Math.min(e.lastRow+e.gutterOffset,n.getLength()-1);this.oldLastRow=d,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var f=n.getNextFoldLine(a),oe=f?f.start.row:1/0,F=null,_=-1,S=a;;){if(S>oe&&(S=f.end.row+1,f=n.getNextFoldLine(S,f),oe=f?f.start.row:1/0),S>d){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}F=this.$lines.get(++_),F?F.row=S:(F=this.$lines.createCell(S,e,this.session,r),this.$lines.push(F)),this.$renderCell(F,e,f,S),S++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var n=this.session,a=n.gutterRenderer||this.$renderer,d=n.$firstLineNumber,f=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||n.$useWrapMode)&&(f=n.getLength()+d-1);var oe=a?a.getWidth(n,f,e):f.toString().length*e.characterWidth,F=this.$padding||this.$computePadding();oe+=F.left+F.right,oe!==this.gutterWidth&&!isNaN(oe)&&(this.gutterWidth=oe,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",oe))},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 n=this.$lines.cells;this.$cursorCell=null;for(var a=0;a<n.length;a++){var d=n[a];if(d.row>=this.$cursorRow){if(d.row>this.$cursorRow){var f=this.session.getFoldLine(this.$cursorRow);if(a>0&&f&&f.start.row==n[a-1].row)d=n[a-1];else break}d.element.className="ace_gutter-active-line "+d.element.className,this.$cursorCell=d;break}}}}},t.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),d=this.oldLastRow;if(this.oldLastRow=a,!n||d<e.firstRow)return this.update(e);if(a<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var f=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);f>0;f--)this.$lines.shift();if(d>a)for(var f=this.session.getFoldedRowCount(a+1,d);f>0;f--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,n.firstRow-1)),a>d&&this.$lines.push(this.$renderLines(e,d+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,n,a){for(var d=[],f=n,oe=this.session.getNextFoldLine(f),F=oe?oe.start.row:1/0;f>F&&(f=oe.end.row+1,oe=this.session.getNextFoldLine(f,oe),F=oe?oe.start.row:1/0),!(f>a);){var _=this.$lines.createCell(f,e,this.session,r);this.$renderCell(_,e,oe,f),d.push(_),f++}return d},t.prototype.$renderCell=function(e,n,a,d){var f=e.element,oe=this.session,F=f.childNodes[0],_=f.childNodes[1],S=f.childNodes[2],xe=S.firstChild,He=oe.$firstLineNumber,Ae=oe.$breakpoints,J=oe.$decorations,Kn=oe.gutterRenderer||this.$renderer,y=this.$showFoldWidgets&&oe.foldWidgets,h=a?a.start.row:Number.MAX_VALUE,w=n.lineHeight+"px",Q=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",Me=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",Gn=(Kn?Kn.getText(oe,d):d+He).toString();if(this.$highlightGutterLine&&(d==this.$cursorRow||a&&d<this.$cursorRow&&d>=h&&this.$cursorRow<=a.end.row)&&(Q+="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)),Ae[d]&&(Q+=Ae[d]),J[d]&&(Q+=J[d]),this.$annotations[d]&&d!==h&&(Q+=this.$annotations[d].className),y){var Yn=y[d];Yn==null&&(Yn=y[d]=oe.getFoldWidget(d))}if(Yn){var Qn="ace_fold-widget ace_"+Yn,Zn=Yn=="start"&&d==h&&d<a.end.row;if(Zn){Qn+=" ace_closed";for(var Jn="",ii=!1,Xn=d+1;Xn<=a.end.row;Xn++)if(this.$annotations[Xn]){if(this.$annotations[Xn].className===" ace_error"){ii=!0,Jn=" ace_error_fold";break}this.$annotations[Xn].className===" ace_security"?(ii=!0,Jn=" ace_security_fold"):this.$annotations[Xn].className===" ace_warning"&&Jn!==" ace_security_fold"&&(ii=!0,Jn=" ace_warning_fold")}Q+=Jn}else Qn+=" ace_open";_.className!=Qn&&(_.className=Qn),W.setStyle(_.style,"height",w),W.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var ei=oe.getFoldWidgetRange(d);ei?_.setAttribute("aria-label",o("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ei.start.row+1,ei.end.row+1])):a?_.setAttribute("aria-label",o("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[a.start.row+1,a.end.row+1])):_.setAttribute("aria-label",o("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[d+1])),Zn?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",o("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",o("gutter.code-folding.open.title","Fold code")))}else _&&(W.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));if(ii&&this.$showFoldedAnnotations){S.className="ace_gutter_annotation",xe.className=Me,xe.className+=Jn,W.setStyle(xe.style,"height",w),W.setStyle(S.style,"display","block"),W.setStyle(S.style,"height",w);var ni;switch(Jn){case" ace_error_fold":ni=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[Gn]);break;case" ace_security_fold":ni=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[Gn]);break;case" ace_warning_fold":ni=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[Gn]);break}S.setAttribute("aria-label",ni),S.setAttribute("tabindex","-1"),S.setAttribute("role","button")}else if(this.$annotations[d]){S.className="ace_gutter_annotation",xe.className=Me,this.$useSvgGutterIcons?xe.className+=this.$annotations[d].className:f.classList.add(this.$annotations[d].className.replace(" ","")),W.setStyle(xe.style,"height",w),W.setStyle(S.style,"display","block"),W.setStyle(S.style,"height",w);var ni;switch(this.$annotations[d].className){case" ace_error":ni=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[Gn]);break;case" ace_security":ni=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[Gn]);break;case" ace_warning":ni=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[Gn]);break;case" ace_info":ni=o("gutter.annotation.aria-label.info","Info, read annotations row $0",[Gn]);break;case" ace_hint":ni=o("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[Gn]);break}S.setAttribute("aria-label",ni),S.setAttribute("tabindex","-1"),S.setAttribute("role","button")}else W.setStyle(S.style,"display","none"),S.removeAttribute("aria-label"),S.removeAttribute("role"),S.setAttribute("tabindex","0");return Gn!==F.data&&(F.data=Gn),f.className!=Q&&(f.className=Q),W.setStyle(e.element.style,"height",this.$lines.computeLineHeight(d,n,oe)+"px"),W.setStyle(e.element.style,"top",this.$lines.computeLineTop(d,n,oe)+"px"),e.text=Gn,S.style.display==="none"&&_.style.display==="none"?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},t.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},t.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(e){e?W.addCssClass(this.element,"ace_folding-enabled"):W.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=W.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 n=this.$padding||this.$computePadding(),a=this.element.getBoundingClientRect();if(e.x<n.left+a.left)return"markers";if(this.$showFoldWidgets&&e.x>a.right-n.right)return"foldWidgets"},t}();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer="",i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,R.implement(i.prototype,l);function r(t){var e=document.createTextNode("");t.appendChild(e);var n=W.createElement("span");t.appendChild(n);var a=W.createElement("span");t.appendChild(a);var d=W.createElement("span");return a.appendChild(d),t}m.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(p,m,Vn){var W=p("../range").Range,R=p("../lib/dom"),M=function(){function u(o){this.element=R.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return u.prototype.setPadding=function(o){this.$padding=o},u.prototype.setSession=function(o){this.session=o},u.prototype.setMarkers=function(o){this.markers=o},u.prototype.elt=function(o,i){var r=this.i!=-1&&this.element.childNodes[this.i];r?this.i++:(r=document.createElement("div"),this.element.appendChild(r),this.i=-1),r.style.cssText=i,r.className=o},u.prototype.update=function(o){if(o){this.config=o,this.i=0;var i;for(var r in this.markers){var t=this.markers[r];if(!t.range){t.update(i,this,this.session,o);continue}var e=t.range.clipRows(o.firstRow,o.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var n=this.$getTop(e.start.row,o),a=this.$padding+e.start.column*o.characterWidth;t.renderer(i,e,a,n,o)}else t.type=="fullLine"?this.drawFullLineMarker(i,e,t.clazz,o):t.type=="screenLine"?this.drawScreenLineMarker(i,e,t.clazz,o):e.isMultiLine()?t.type=="text"?this.drawTextMarker(i,e,t.clazz,o):this.drawMultiLineMarker(i,e,t.clazz,o):this.drawSingleLineMarker(i,e,t.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},u.prototype.$getTop=function(o,i){return(o-i.firstRowScreen)*i.lineHeight},u.prototype.drawTextMarker=function(o,i,r,t,e){for(var n=this.session,a=i.start.row,d=i.end.row,f=a,oe=0,F=0,_=n.getScreenLastRowColumn(f),S=new W(f,i.start.column,f,F);f<=d;f++)S.start.row=S.end.row=f,S.start.column=f==a?i.start.column:n.getRowWrapIndent(f),S.end.column=_,oe=F,F=_,_=f+1<d?n.getScreenLastRowColumn(f+1):f==d?0:i.end.column,this.drawSingleLineMarker(o,S,r+(f==a?" ace_start":"")+" ace_br"+l(f==a||f==a+1&&i.start.column,oe<F,F>_,f==d),t,f==d?0:1,e)},u.prototype.drawMultiLineMarker=function(o,i,r,t,e){var n=this.$padding,a=t.lineHeight,d=this.$getTop(i.start.row,t),f=n+i.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var oe=i.clone();oe.end.row=oe.start.row,oe.end.column=this.session.getLine(oe.start.row).length,this.drawBidiSingleLineMarker(o,oe,r+" ace_br1 ace_start",t,null,e)}else this.elt(r+" ace_br1 ace_start","height:"+a+"px;right:"+n+"px;top:"+d+"px;left:"+f+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var oe=i.clone();oe.start.row=oe.end.row,oe.start.column=0,this.drawBidiSingleLineMarker(o,oe,r+" ace_br12",t,null,e)}else{d=this.$getTop(i.end.row,t);var F=i.end.column*t.characterWidth;this.elt(r+" ace_br12","height:"+a+"px;width:"+F+"px;top:"+d+"px;left:"+n+"px;"+(e||""))}if(a=(i.end.row-i.start.row-1)*t.lineHeight,!(a<=0)){d=this.$getTop(i.start.row+1,t);var _=(i.start.column?1:0)|(i.end.column?0:8);this.elt(r+(_?" ace_br"+_:""),"height:"+a+"px;right:"+n+"px;top:"+d+"px;left:"+n+"px;"+(e||""))}},u.prototype.drawSingleLineMarker=function(o,i,r,t,e,n){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(o,i,r,t,e,n);var a=t.lineHeight,d=(i.end.column+(e||0)-i.start.column)*t.characterWidth,f=this.$getTop(i.start.row,t),oe=this.$padding+i.start.column*t.characterWidth;this.elt(r,"height:"+a+"px;width:"+d+"px;top:"+f+"px;left:"+oe+"px;"+(n||""))},u.prototype.drawBidiSingleLineMarker=function(o,i,r,t,e,n){var a=t.lineHeight,d=this.$getTop(i.start.row,t),f=this.$padding,oe=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);oe.forEach(function(F){this.elt(r,"height:"+a+"px;width:"+(F.width+(e||0))+"px;top:"+d+"px;left:"+(f+F.left)+"px;"+(n||""))},this)},u.prototype.drawFullLineMarker=function(o,i,r,t,e){var n=this.$getTop(i.start.row,t),a=t.lineHeight;i.start.row!=i.end.row&&(a+=this.$getTop(i.end.row,t)-n),this.elt(r,"height:"+a+"px;top:"+n+"px;left:0;right:0;"+(e||""))},u.prototype.drawScreenLineMarker=function(o,i,r,t,e){var n=this.$getTop(i.start.row,t),a=t.lineHeight;this.elt(r,"height:"+a+"px;top:"+n+"px;left:0;right:0;"+(e||""))},u}();M.prototype.$padding=0;function l(u,o,i,r){return(u?1:0)|(o?2:0)|(i?4:0)|(r?8:0)}m.Marker=M}),ace.define("ace/layer/text_util",["require","exports","module"],function(p,m,Vn){var W=new Set(["text","rparen","lparen"]);m.isTextToken=function(R){return W.has(R)}}),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(p,m,Vn){var W=p("../lib/oop"),R=p("../lib/dom"),M=p("../lib/lang"),l=p("./lines").Lines,u=p("../lib/event_emitter").EventEmitter,o=p("../config").nls,i=p("./text_util").isTextToken,r=function(){function t(e){this.dom=R,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 l(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,n=e.getNewLineCharacter()==`
209
+ `&&e.getNewLineMode()!="windows",a=n?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!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(n){this._signal("changeCharacterSize",n)}).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 n=this.$tabStrings=[0],a=1;a<e+1;a++)if(this.showTabs){var d=this.dom.createElement("span");d.className="ace_invisible ace_invisible_tab",d.textContent=M.stringRepeat(this.TAB_CHAR,a),n.push(d)}else n.push(this.dom.createTextNode(M.stringRepeat(" ",a),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var f="ace_indent-guide",oe=this.showSpaces?" ace_invisible ace_invisible_space":"",F=this.showSpaces?M.stringRepeat(this.SPACE_CHAR,this.tabSize):M.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",S=this.showTabs?M.stringRepeat(this.TAB_CHAR,this.tabSize):F,d=this.dom.createElement("span");d.className=f+oe,d.textContent=F,this.$tabStrings[" "]=d;var d=this.dom.createElement("span");d.className=f+_,d.textContent=S,this.$tabStrings[" "]=d}},t.prototype.updateLines=function(e,n,a){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var d=Math.max(n,e.firstRow),f=Math.min(a,e.lastRow),oe=this.element.childNodes,F=0,S=e.firstRow;S<d;S++){var xe=this.session.getFoldLine(S);if(xe)if(xe.containsRow(d)){d=xe.start.row;break}else S=xe.end.row;F++}for(var _=!1,S=d,xe=this.session.getNextFoldLine(S),He=xe?xe.start.row:1/0;S>He&&(S=xe.end.row+1,xe=this.session.getNextFoldLine(S,xe),He=xe?xe.start.row:1/0),!(S>f);){var Ae=oe[F++];if(Ae){this.dom.removeChildren(Ae),this.$renderLine(Ae,S,S==He?xe:!1),_&&(Ae.style.top=this.$lines.computeLineTop(S,e,this.session)+"px");var J=e.lineHeight*this.session.getRowLength(S)+"px";Ae.style.height!=J&&(_=!0,Ae.style.height=J)}S++}if(_)for(;F<this.$lines.cells.length;){var Kn=this.$lines.cells[F++];Kn.element.style.top=this.$lines.computeLineTop(Kn.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var a=e.lastRow,d=n?n.lastRow:-1;if(!n||d<e.firstRow)return this.update(e);if(a<n.firstRow)return this.update(e);if(!n||n.lastRow<e.firstRow)return this.update(e);if(e.lastRow<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var f=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);f>0;f--)this.$lines.shift();if(n.lastRow>e.lastRow)for(var f=this.session.getFoldedRowCount(e.lastRow+1,n.lastRow);f>0;f--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,n.firstRow-1)),e.lastRow>n.lastRow&&this.$lines.push(this.$renderLinesFragment(e,n.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,n,a){for(var d=[],f=n,oe=this.session.getNextFoldLine(f),F=oe?oe.start.row:1/0;f>F&&(f=oe.end.row+1,oe=this.session.getNextFoldLine(f,oe),F=oe?oe.start.row:1/0),!(f>a);){var _=this.$lines.createCell(f,e,this.session),S=_.element;this.dom.removeChildren(S),R.setStyle(S.style,"height",this.$lines.computeLineHeight(f,e,this.session)+"px"),R.setStyle(S.style,"top",this.$lines.computeLineTop(f,e,this.session)+"px"),this.$renderLine(S,f,f==F?oe:!1),this.$useLineGroups()?S.className="ace_line_group":S.className="ace_line",d.push(_),f++}return d},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var n=e.firstRow,a=e.lastRow,d=this.$lines;d.getLength();)d.pop();d.push(this.$renderLinesFragment(e,n,a))},t.prototype.$renderToken=function(e,n,a,d){for(var f=this,oe=/(\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,F=this.dom.createFragment(this.element),_,S=0;_=oe.exec(d);){var xe=_[1],He=_[2],Ae=_[3],J=_[4],Kn=_[5];if(!(!f.showSpaces&&He)){var y=S!=_.index?d.slice(S,_.index):"";if(S=_.index+_[0].length,y&&F.appendChild(this.dom.createTextNode(y,this.element)),xe){var h=f.session.getScreenTabSize(n+_.index);F.appendChild(f.$tabStrings[h].cloneNode(!0)),n+=h-1}else if(He)if(f.showSpaces){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space",w.textContent=M.stringRepeat(f.SPACE_CHAR,He.length),F.appendChild(w)}else F.appendChild(this.dom.createTextNode(He,this.element));else if(Ae){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space ace_invalid",w.textContent=M.stringRepeat(f.SPACE_CHAR,Ae.length),F.appendChild(w)}else if(J){n+=1;var w=this.dom.createElement("span");w.style.width=f.config.characterWidth*2+"px",w.className=f.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=f.showSpaces?f.SPACE_CHAR:J,F.appendChild(w)}else if(Kn){n+=1;var w=this.dom.createElement("span");w.style.width=f.config.characterWidth*2+"px",w.className="ace_cjk",w.textContent=Kn,F.appendChild(w)}}}if(F.appendChild(this.dom.createTextNode(S?d.slice(S):d,this.element)),i(a.type))e.appendChild(F);else{var Q="ace_"+a.type.replace(/\./g," ace_"),w=this.dom.createElement("span");a.type=="fold"&&(w.style.width=a.value.length*this.config.characterWidth+"px",w.setAttribute("title",o("inline-fold.closed.title","Unfold code"))),w.className=Q,w.appendChild(F),e.appendChild(w)}return n+d.length},t.prototype.renderIndentGuide=function(e,n,a){var d=n.search(this.$indentGuideRe);if(d<=0||d>=a)return n;if(n[0]==" "){d-=d%this.tabSize;for(var f=d/this.tabSize,oe=0;oe<f;oe++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(d)}else if(n[0]==" "){for(var oe=0;oe<d;oe++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(d)}return this.$highlightIndentGuide(),n},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 n=this.session.selection.getCursor(),a=/^\s*/.exec(this.session.doc.getLine(n.row))[0].length,d=Math.floor(a/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:d,start:n.row};var f=this.session.$bracketHighlight;if(f){for(var oe=this.session.$bracketHighlight.ranges,F=0;F<oe.length;F++)if(n.row!==oe[F].start.row){this.$highlightIndentGuideMarker.end=oe[F].start.row,n.row>oe[F].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[n.row]!==""&&n.column===e[n.row].length){this.$highlightIndentGuideMarker.dir=1;for(var F=n.row+1;F<e.length;F++){var _=e[F],S=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=F,S<=a))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,n=0;n<e.length;n++){var a=e[n],d=a.element.childNodes;if(d.length>0){for(var f=0;f<d.length;f++)if(d[f].classList&&d[f].classList.contains("ace_indent-guide-active")){d[f].classList.remove("ace_indent-guide-active");break}}}},t.prototype.$setIndentGuideActive=function(e,n){var a=this.session.doc.getLine(e.row);if(a!==""){var d=e.element.childNodes;if(d){var f=d[n-1];f&&f.classList&&f.classList.contains("ace_indent-guide")&&f.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var n=this.$highlightIndentGuideMarker.indentLevel;if(n!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var a=0;a<e.length;a++){var d=e[a];if(this.$highlightIndentGuideMarker.end&&d.row>=this.$highlightIndentGuideMarker.start+1){if(d.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(d,n)}}else for(var a=e.length-1;a>=0;a--){var d=e[a];if(this.$highlightIndentGuideMarker.end&&d.row<this.$highlightIndentGuideMarker.start){if(d.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(d,n)}}}},t.prototype.$createLineElement=function(e){var n=this.dom.createElement("div");return n.className="ace_line",n.style.height=this.config.lineHeight+"px",n},t.prototype.$renderWrappedLine=function(e,n,a){var d=0,f=0,oe=a[0],F=0,_=this.$createLineElement();e.appendChild(_);for(var S=0;S<n.length;S++){var xe=n[S],He=xe.value;if(S==0&&this.displayIndentGuides){if(d=He.length,He=this.renderIndentGuide(_,He,oe),!He)continue;d-=He.length}if(d+He.length<oe)F=this.$renderToken(_,F,xe,He),d+=He.length;else{for(;d+He.length>=oe;)F=this.$renderToken(_,F,xe,He.substring(0,oe-d)),He=He.substring(oe-d),d=oe,_=this.$createLineElement(),e.appendChild(_),_.appendChild(this.dom.createTextNode(M.stringRepeat(" ",a.indent),this.element)),f++,F=0,oe=a[f]||Number.MAX_VALUE;He.length!=0&&(d+=He.length,F=this.$renderToken(_,F,xe,He))}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,F,null,"",!0)},t.prototype.$renderSimpleLine=function(e,n){for(var a=0,d=0;d<n.length;d++){var f=n[d],oe=f.value;if(!(d==0&&this.displayIndentGuides&&(oe=this.renderIndentGuide(e,oe),!oe))){if(a+oe.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,f,oe);a=this.$renderToken(e,a,f,oe)}}},t.prototype.$renderOverflowMessage=function(e,n,a,d,f){a&&this.$renderToken(e,n,a,d.slice(0,this.MAX_LINE_LENGTH-n));var oe=this.dom.createElement("span");oe.className="ace_inline_button ace_keyword ace_toggle_wrap",oe.textContent=f?"<hide>":"<click to see more...>",e.appendChild(oe)},t.prototype.$renderLine=function(e,n,a){if(!a&&a!=!1&&(a=this.session.getFoldLine(n)),a)var d=this.$getFoldLineTokens(n,a);else var d=this.session.getTokens(n);var f=e;if(d.length){var oe=this.session.getRowSplitData(n);if(oe&&oe.length){this.$renderWrappedLine(e,d,oe);var f=e.lastChild}else{var f=e;this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f)),this.$renderSimpleLine(f,d)}}else this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f));if(this.showEOL&&f){a&&(n=a.end.row);var F=this.dom.createElement("span");F.className="ace_invisible ace_invisible_eol",F.textContent=n==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,f.appendChild(F)}},t.prototype.$getFoldLineTokens=function(e,n){var a=this.session,d=[];function f(F,_,S){for(var xe=0,He=0;He+F[xe].value.length<_;)if(He+=F[xe].value.length,xe++,xe==F.length)return;if(He!=_){var Ae=F[xe].value.substring(_-He);Ae.length>S-_&&(Ae=Ae.substring(0,S-_)),d.push({type:F[xe].type,value:Ae}),He=_+Ae.length,xe+=1}for(;He<S&&xe<F.length;){var Ae=F[xe].value;Ae.length+He>S?d.push({type:F[xe].type,value:Ae.substring(0,S-He)}):d.push(F[xe]),He+=Ae.length,xe+=1}}var oe=a.getTokens(e);return n.walk(function(F,_,S,xe,He){F!=null?d.push({type:"fold",value:F}):(He&&(oe=a.getTokens(_)),oe.length&&f(oe,xe,S))},n.end.row,this.session.getLine(n.end.row).length),d},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();r.prototype.EOF_CHAR="¶",r.prototype.EOL_CHAR_LF="¬",r.prototype.EOL_CHAR_CRLF="¤",r.prototype.EOL_CHAR=r.prototype.EOL_CHAR_LF,r.prototype.TAB_CHAR="—",r.prototype.SPACE_CHAR="·",r.prototype.$padding=0,r.prototype.MAX_LINE_LENGTH=1e4,r.prototype.showInvisibles=!1,r.prototype.showSpaces=!1,r.prototype.showTabs=!1,r.prototype.showEOL=!1,r.prototype.displayIndentGuides=!0,r.prototype.$highlightIndentGuides=!0,r.prototype.$tabStrings=[],r.prototype.destroy={},r.prototype.onChangeTabSize=r.prototype.$computeTabString,W.implement(r.prototype,u),m.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(p,m,Vn){var W=p("../lib/dom"),R=function(){function M(l){this.element=W.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),W.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return M.prototype.$updateOpacity=function(l){for(var u=this.cursors,o=u.length;o--;)W.setStyle(u[o].style,"opacity",l?"":"0")},M.prototype.$startCssAnimation=function(){for(var l=this.cursors,u=l.length;u--;)l[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&W.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},M.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,W.removeCssClass(this.element,"ace_animate-blinking")},M.prototype.setPadding=function(l){this.$padding=l},M.prototype.setSession=function(l){this.session=l},M.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},M.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},M.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,W.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},M.prototype.addCursor=function(){var l=W.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},M.prototype.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},M.prototype.hideCursor=function(){this.isVisible=!1,W.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},M.prototype.showCursor=function(){this.isVisible=!0,W.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},M.prototype.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,W.removeCssClass(this.element,"ace_smooth-blinking")),l(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&W.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),W.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){l(!0),u()},this.blinkInterval),u()}},M.prototype.getPixelPosition=function(l,u){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(l),i=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,l.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),r=(o.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:r}},M.prototype.isCursorInView=function(l,u){return l.top>=0&&l.top<u.maxHeight},M.prototype.update=function(l){this.config=l;var u=this.session.$selectionMarkers,o=0,i=0;(u===void 0||u.length===0)&&(u=[{cursor:null}]);for(var o=0,r=u.length;o<r;o++){var t=this.getPixelPosition(u[o].cursor,!0);if(!((t.top>l.height+l.offset||t.top<0)&&o>1)){var e=this.cursors[i++]||this.addCursor(),n=e.style;this.drawCursor?this.drawCursor(e,t,l,u[o],this.session):this.isCursorInView(t,l)?(W.setStyle(n,"display","block"),W.translate(e,t.left,t.top),W.setStyle(n,"width",Math.round(l.characterWidth)+"px"),W.setStyle(n,"height",l.lineHeight+"px")):W.setStyle(n,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=t,this.restartTimer()},M.prototype.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?W.addCssClass(this.element,"ace_overwrite-cursors"):W.removeCssClass(this.element,"ace_overwrite-cursors"))},M.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},M}();R.prototype.$padding=0,R.prototype.drawCursor=null,m.Cursor=R}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(p,m,Vn){var W=this&&this.__extends||function(){var e=function(n,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var oe in f)Object.prototype.hasOwnProperty.call(f,oe)&&(d[oe]=f[oe])},e(n,a)};return function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(n,a);function d(){this.constructor=n}n.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)}}(),R=p("./lib/oop"),M=p("./lib/dom"),l=p("./lib/event"),u=p("./lib/event_emitter").EventEmitter,o=32768,i=function(){function e(n,a){this.element=M.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+a,this.inner=M.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return e.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},e}();R.implement(i.prototype,u);var r=function(e){W(n,e);function n(a,d){var f=e.call(this,a,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,d.$scrollbarWidth=f.width=M.scrollbarWidth(a.ownerDocument),f.inner.style.width=f.element.style.width=(f.width||15)+5+"px",f.$minWidth=0,f}return n.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var a=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-a)/(this.coeff-a)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(a){this.element.style.height=a+"px"},n.prototype.setScrollHeight=function(a){this.scrollHeight=a,a>o?(this.coeff=o/a,a=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=a+"px"},n.prototype.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=a,this.element.scrollTop=a*this.coeff)},n}(i);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var t=function(e){W(n,e);function n(a,d){var f=e.call(this,a,"-h")||this;return f.scrollLeft=0,f.height=d.$scrollbarWidth,f.inner.style.height=f.element.style.height=(f.height||15)+5+"px",f}return n.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.setWidth=function(a){this.element.style.width=a+"px"},n.prototype.setInnerWidth=function(a){this.inner.style.width=a+"px"},n.prototype.setScrollWidth=function(a){this.inner.style.width=a+"px"},n.prototype.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)},n}(i);m.ScrollBar=r,m.ScrollBarV=r,m.ScrollBarH=t,m.VScrollBar=r,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(p,m,Vn){var W=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(a[f]=d[f])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function a(){this.constructor=e}e.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),R=p("./lib/oop"),M=p("./lib/dom"),l=p("./lib/event"),u=p("./lib/event_emitter").EventEmitter;M.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
210
+ position: absolute;
211
+ background: rgba(128, 128, 128, 0.6);
212
+ -moz-box-sizing: border-box;
213
+ box-sizing: border-box;
214
+ border: 1px solid #bbb;
215
+ border-radius: 2px;
216
+ z-index: 8;
217
+ }
218
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
219
+ position: absolute;
220
+ z-index: 6;
221
+ background: none;
222
+ overflow: hidden!important;
223
+ }
224
+ .ace_editor>.ace_sb-v {
225
+ z-index: 6;
226
+ right: 0;
227
+ top: 0;
228
+ width: 12px;
229
+ }
230
+ .ace_editor>.ace_sb-v div {
231
+ z-index: 8;
232
+ right: 0;
233
+ width: 100%;
234
+ }
235
+ .ace_editor>.ace_sb-h {
236
+ bottom: 0;
237
+ left: 0;
238
+ height: 12px;
239
+ }
240
+ .ace_editor>.ace_sb-h div {
241
+ bottom: 0;
242
+ height: 100%;
243
+ }
244
+ .ace_editor>.ace_sb_grabbed {
245
+ z-index: 8;
246
+ background: #000;
247
+ }`,"ace_scrollbar.css",!1);var o=function(){function t(e,n){this.element=M.createElement("div"),this.element.className="ace_sb"+n,this.inner=M.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,l.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}();R.implement(o.prototype,u);var i=function(t){W(e,t);function e(n,a){var d=t.call(this,n,"-v")||this;return d.scrollTop=0,d.scrollHeight=0,d.parent=n,d.width=d.VScrollWidth,d.renderer=a,d.inner.style.width=d.element.style.width=(d.width||15)+"px",d.$minWidth=0,d}return e.prototype.onMouseDown=function(n,a){if(n==="mousedown"&&!(l.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var d=this,f=a.clientY,oe=function(J){f=J.clientY},F=function(){clearInterval(He)},_=a.clientY,S=this.thumbTop,xe=function(){if(f!==void 0){var J=d.scrollTopFromThumbTop(S+f-_);J!==d.scrollTop&&d._emit("scroll",{data:J})}};l.capture(this.inner,oe,F);var He=setInterval(xe,20);return l.preventDefault(a)}var Ae=a.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(Ae)}),l.preventDefault(a)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(n){var a=n*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return a=a>>0,a<0?a=0:a>this.pageHeight-this.viewHeight&&(a=this.pageHeight-this.viewHeight),a},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(n){this.height=Math.max(0,n),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(n,a){this.pageHeight===n&&!a||(this.pageHeight=n,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(n){this.scrollTop=n,n<0&&(n=0),this.thumbTop=n*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(o);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var r=function(t){W(e,t);function e(n,a){var d=t.call(this,n,"-h")||this;return d.scrollLeft=0,d.scrollWidth=0,d.height=d.HScrollHeight,d.inner.style.height=d.element.style.height=(d.height||12)+"px",d.renderer=a,d}return e.prototype.onMouseDown=function(n,a){if(n==="mousedown"&&!(l.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var d=this,f=a.clientX,oe=function(J){f=J.clientX},F=function(){clearInterval(He)},_=a.clientX,S=this.thumbLeft,xe=function(){if(f!==void 0){var J=d.scrollLeftFromThumbLeft(S+f-_);J!==d.scrollLeft&&d._emit("scroll",{data:J})}};l.capture(this.inner,oe,F);var He=setInterval(xe,20);return l.preventDefault(a)}var Ae=a.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(Ae)}),l.preventDefault(a)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(n){var a=n*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return a=a>>0,a<0?a=0:a>this.pageWidth-this.viewWidth&&(a=this.pageWidth-this.viewWidth),a},e.prototype.setWidth=function(n){this.width=Math.max(0,n),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(n,a){this.pageWidth===n&&!a||(this.pageWidth=n,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(n){this.scrollLeft=n,n<0&&(n=0),this.thumbLeft=n*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(o);r.prototype.setInnerWidth=r.prototype.setScrollWidth,m.ScrollBar=i,m.ScrollBarV=i,m.ScrollBarH=r,m.VScrollBar=i,m.HScrollBar=r}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(p,m,Vn){var W=p("./lib/event"),R=function(){function M(l,u){this.onRender=l,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var o=this;this._flush=function(i){o.pending=!1;var r=o.changes;if(r&&(W.blockIdle(100),o.changes=0,o.onRender(r)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return M.prototype.schedule=function(l){this.changes=this.changes|l,this.changes&&!this.pending&&(W.nextFrame(this._flush),this.pending=!0)},M.prototype.clear=function(l){var u=this.changes;return this.changes=0,u},M}();m.RenderLoop=R}),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(p,m,Vn){var W=p("../lib/oop"),R=p("../lib/dom"),M=p("../lib/lang"),l=p("../lib/event"),u=p("../lib/useragent"),o=p("../lib/event_emitter").EventEmitter,i=512,r=typeof ResizeObserver=="function",t=200,e=function(){function n(a){this.el=R.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=R.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=R.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),this.$measureNode.textContent=M.stringRepeat("X",i),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return n.prototype.$setMeasureNodeStyles=function(a,d){a.width=a.height="auto",a.left=a.top="0px",a.visibility="hidden",a.position="absolute",a.whiteSpace="pre",u.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=d?"hidden":"visible"},n.prototype.checkForSizeChanges=function(a){if(a===void 0&&(a=this.$measureSizes()),a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var d=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=d&&d.width===a.width&&d.height===a.height,this._emit("changeCharacterSize",{data:a})}},n.prototype.$addObserver=function(){var a=this;this.$observer=new window.ResizeObserver(function(d){a.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},n.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var a=this;return this.$pollSizeChangesTimer=l.onIdle(function d(){a.checkForSizeChanges(),l.onIdle(d,500)},500)},n.prototype.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},n.prototype.$measureSizes=function(a){var d={height:(a||this.$measureNode).clientHeight,width:(a||this.$measureNode).clientWidth/i};return d.width===0||d.height===0?null:d},n.prototype.$measureCharWidth=function(a){this.$main.textContent=M.stringRepeat(a,i);var d=this.$main.getBoundingClientRect();return d.width/i},n.prototype.getCharacterWidth=function(a){var d=this.charSizes[a];return d===void 0&&(d=this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),d},n.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},n.prototype.$getZoom=function(a){return!a||!a.parentElement?1:(Number(window.getComputedStyle(a).zoom)||1)*this.$getZoom(a.parentElement)},n.prototype.$initTransformMeasureNodes=function(){var a=function(d,f){return["div",{style:"position: absolute;top:"+d+"px;left:"+f+"px;"}]};this.els=R.buildDom([a(0,0),a(t,0),a(0,t),a(t,t)],this.el)},n.prototype.transformCoordinates=function(a,d){if(a){var f=this.$getZoom(this.el);a=S(1/f,a)}function oe(Zn,Jn,ii){var Xn=Zn[1]*Jn[0]-Zn[0]*Jn[1];return[(-Jn[1]*ii[0]+Jn[0]*ii[1])/Xn,(+Zn[1]*ii[0]-Zn[0]*ii[1])/Xn]}function F(Zn,Jn){return[Zn[0]-Jn[0],Zn[1]-Jn[1]]}function _(Zn,Jn){return[Zn[0]+Jn[0],Zn[1]+Jn[1]]}function S(Zn,Jn){return[Zn*Jn[0],Zn*Jn[1]]}this.els||this.$initTransformMeasureNodes();function xe(Zn){var Jn=Zn.getBoundingClientRect();return[Jn.left,Jn.top]}var He=xe(this.els[0]),Ae=xe(this.els[1]),J=xe(this.els[2]),Kn=xe(this.els[3]),y=oe(F(Kn,Ae),F(Kn,J),F(_(Ae,J),_(Kn,He))),h=S(1+y[0],F(Ae,He)),w=S(1+y[1],F(J,He));if(d){var Q=d,Me=y[0]*Q[0]/t+y[1]*Q[1]/t+1,Gn=_(S(Q[0],h),S(Q[1],w));return _(S(1/Me/t,Gn),He)}var Yn=F(a,He),Qn=oe(F(h,S(y[0],Yn)),F(w,S(y[1],Yn)),Yn);return S(t,Qn)},n}();e.prototype.$characterSize={width:0,height:0},W.implement(e.prototype,o),m.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(p,m,Vn){Vn.exports=`
248
+ .ace_br1 {border-top-left-radius : 3px;}
249
+ .ace_br2 {border-top-right-radius : 3px;}
250
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
251
+ .ace_br4 {border-bottom-right-radius: 3px;}
252
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
253
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
254
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
255
+ .ace_br8 {border-bottom-left-radius : 3px;}
256
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
257
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
258
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
259
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
260
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
261
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
262
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
263
+
264
+
265
+ .ace_editor {
266
+ position: relative;
267
+ overflow: hidden;
268
+ padding: 0;
269
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
270
+ direction: ltr;
271
+ text-align: left;
272
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
273
+ forced-color-adjust: none;
274
+ }
275
+
276
+ .ace_scroller {
277
+ position: absolute;
278
+ overflow: hidden;
279
+ top: 0;
280
+ bottom: 0;
281
+ background-color: inherit;
282
+ -ms-user-select: none;
283
+ -moz-user-select: none;
284
+ -webkit-user-select: none;
285
+ user-select: none;
286
+ cursor: text;
287
+ }
288
+
289
+ .ace_content {
290
+ position: absolute;
291
+ box-sizing: border-box;
292
+ min-width: 100%;
293
+ contain: style size layout;
294
+ font-variant-ligatures: no-common-ligatures;
295
+ }
296
+
297
+ .ace_keyboard-focus:focus {
298
+ box-shadow: inset 0 0 0 2px #5E9ED6;
299
+ outline: none;
300
+ }
301
+
302
+ .ace_dragging .ace_scroller:before{
303
+ position: absolute;
304
+ top: 0;
305
+ left: 0;
306
+ right: 0;
307
+ bottom: 0;
308
+ content: '';
309
+ background: rgba(250, 250, 250, 0.01);
310
+ z-index: 1000;
311
+ }
312
+ .ace_dragging.ace_dark .ace_scroller:before{
313
+ background: rgba(0, 0, 0, 0.01);
314
+ }
315
+
316
+ .ace_gutter {
317
+ position: absolute;
318
+ overflow : hidden;
319
+ width: auto;
320
+ top: 0;
321
+ bottom: 0;
322
+ left: 0;
323
+ cursor: default;
324
+ z-index: 4;
325
+ -ms-user-select: none;
326
+ -moz-user-select: none;
327
+ -webkit-user-select: none;
328
+ user-select: none;
329
+ contain: style size layout;
330
+ }
331
+
332
+ .ace_gutter-active-line {
333
+ position: absolute;
334
+ left: 0;
335
+ right: 0;
336
+ }
337
+
338
+ .ace_scroller.ace_scroll-left:after {
339
+ content: "";
340
+ position: absolute;
341
+ top: 0;
342
+ right: 0;
343
+ bottom: 0;
344
+ left: 0;
345
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
346
+ pointer-events: none;
347
+ }
348
+
349
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
350
+ position: absolute;
351
+ top: 0;
352
+ left: 0;
353
+ right: 0;
354
+ padding-left: 19px;
355
+ padding-right: 6px;
356
+ background-repeat: no-repeat;
357
+ }
358
+
359
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
360
+ margin-left: -14px;
361
+ float: left;
362
+ }
363
+
364
+ .ace_gutter-cell .ace_gutter_annotation {
365
+ margin-left: -19px;
366
+ float: left;
367
+ }
368
+
369
+ .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 {
370
+ 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==");
371
+ background-repeat: no-repeat;
372
+ background-position: 2px center;
373
+ }
374
+
375
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
376
+ 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==");
377
+ background-repeat: no-repeat;
378
+ background-position: 2px center;
379
+ }
380
+
381
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
382
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
383
+ background-repeat: no-repeat;
384
+ background-position: 2px center;
385
+ }
386
+
387
+ .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 {
388
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
389
+ }
390
+
391
+ .ace_icon_svg.ace_error {
392
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
393
+ background-color: crimson;
394
+ }
395
+ .ace_icon_svg.ace_security {
396
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
397
+ background-color: crimson;
398
+ }
399
+ .ace_icon_svg.ace_warning {
400
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
401
+ background-color: darkorange;
402
+ }
403
+ .ace_icon_svg.ace_info {
404
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
405
+ background-color: royalblue;
406
+ }
407
+ .ace_icon_svg.ace_hint {
408
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
409
+ background-color: silver;
410
+ }
411
+
412
+ .ace_icon_svg.ace_error_fold {
413
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
414
+ background-color: crimson;
415
+ }
416
+ .ace_icon_svg.ace_security_fold {
417
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
418
+ background-color: crimson;
419
+ }
420
+ .ace_icon_svg.ace_warning_fold {
421
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
422
+ background-color: darkorange;
423
+ }
424
+
425
+ .ace_scrollbar {
426
+ contain: strict;
427
+ position: absolute;
428
+ right: 0;
429
+ bottom: 0;
430
+ z-index: 6;
431
+ }
432
+
433
+ .ace_scrollbar-inner {
434
+ position: absolute;
435
+ cursor: text;
436
+ left: 0;
437
+ top: 0;
438
+ }
439
+
440
+ .ace_scrollbar-v{
441
+ overflow-x: hidden;
442
+ overflow-y: scroll;
443
+ top: 0;
444
+ }
445
+
446
+ .ace_scrollbar-h {
447
+ overflow-x: scroll;
448
+ overflow-y: hidden;
449
+ left: 0;
450
+ }
451
+
452
+ .ace_print-margin {
453
+ position: absolute;
454
+ height: 100%;
455
+ }
456
+
457
+ .ace_text-input {
458
+ position: absolute;
459
+ z-index: 0;
460
+ width: 0.5em;
461
+ height: 1em;
462
+ opacity: 0;
463
+ background: transparent;
464
+ -moz-appearance: none;
465
+ appearance: none;
466
+ border: none;
467
+ resize: none;
468
+ outline: none;
469
+ overflow: hidden;
470
+ font: inherit;
471
+ padding: 0 1px;
472
+ margin: 0 -1px;
473
+ contain: strict;
474
+ -ms-user-select: text;
475
+ -moz-user-select: text;
476
+ -webkit-user-select: text;
477
+ user-select: text;
478
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
479
+ white-space: pre!important;
480
+ }
481
+ .ace_text-input.ace_composition {
482
+ background: transparent;
483
+ color: inherit;
484
+ z-index: 1000;
485
+ opacity: 1;
486
+ }
487
+ .ace_composition_placeholder { color: transparent }
488
+ .ace_composition_marker {
489
+ border-bottom: 1px solid;
490
+ position: absolute;
491
+ border-radius: 0;
492
+ margin-top: 1px;
493
+ }
494
+
495
+ [ace_nocontext=true] {
496
+ transform: none!important;
497
+ filter: none!important;
498
+ clip-path: none!important;
499
+ mask : none!important;
500
+ contain: none!important;
501
+ perspective: none!important;
502
+ mix-blend-mode: initial!important;
503
+ z-index: auto;
504
+ }
505
+
506
+ .ace_layer {
507
+ z-index: 1;
508
+ position: absolute;
509
+ overflow: hidden;
510
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
511
+ word-wrap: normal;
512
+ white-space: pre;
513
+ height: 100%;
514
+ width: 100%;
515
+ box-sizing: border-box;
516
+ /* setting pointer-events: auto; on node under the mouse, which changes
517
+ during scroll, will break mouse wheel scrolling in Safari */
518
+ pointer-events: none;
519
+ }
520
+
521
+ .ace_gutter-layer {
522
+ position: relative;
523
+ width: auto;
524
+ text-align: right;
525
+ pointer-events: auto;
526
+ height: 1000000px;
527
+ contain: style size layout;
528
+ }
529
+
530
+ .ace_text-layer {
531
+ font: inherit !important;
532
+ position: absolute;
533
+ height: 1000000px;
534
+ width: 1000000px;
535
+ contain: style size layout;
536
+ }
537
+
538
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
539
+ contain: style size layout;
540
+ position: absolute;
541
+ top: 0;
542
+ left: 0;
543
+ right: 0;
544
+ }
545
+
546
+ .ace_hidpi .ace_text-layer,
547
+ .ace_hidpi .ace_gutter-layer,
548
+ .ace_hidpi .ace_content,
549
+ .ace_hidpi .ace_gutter {
550
+ contain: strict;
551
+ }
552
+ .ace_hidpi .ace_text-layer > .ace_line,
553
+ .ace_hidpi .ace_text-layer > .ace_line_group {
554
+ contain: strict;
555
+ }
556
+
557
+ .ace_cjk {
558
+ display: inline-block;
559
+ text-align: center;
560
+ }
561
+
562
+ .ace_cursor-layer {
563
+ z-index: 4;
564
+ }
565
+
566
+ .ace_cursor {
567
+ z-index: 4;
568
+ position: absolute;
569
+ box-sizing: border-box;
570
+ border-left: 2px solid;
571
+ /* workaround for smooth cursor repaintng whole screen in chrome */
572
+ transform: translatez(0);
573
+ }
574
+
575
+ .ace_multiselect .ace_cursor {
576
+ border-left-width: 1px;
577
+ }
578
+
579
+ .ace_slim-cursors .ace_cursor {
580
+ border-left-width: 1px;
581
+ }
582
+
583
+ .ace_overwrite-cursors .ace_cursor {
584
+ border-left-width: 0;
585
+ border-bottom: 1px solid;
586
+ }
587
+
588
+ .ace_hidden-cursors .ace_cursor {
589
+ opacity: 0.2;
590
+ }
591
+
592
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
593
+ opacity: 0;
594
+ }
595
+
596
+ .ace_smooth-blinking .ace_cursor {
597
+ transition: opacity 0.18s;
598
+ }
599
+
600
+ .ace_animate-blinking .ace_cursor {
601
+ animation-duration: 1000ms;
602
+ animation-timing-function: step-end;
603
+ animation-name: blink-ace-animate;
604
+ animation-iteration-count: infinite;
605
+ }
606
+
607
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
608
+ animation-duration: 1000ms;
609
+ animation-timing-function: ease-in-out;
610
+ animation-name: blink-ace-animate-smooth;
611
+ }
612
+
613
+ @keyframes blink-ace-animate {
614
+ from, to { opacity: 1; }
615
+ 60% { opacity: 0; }
616
+ }
617
+
618
+ @keyframes blink-ace-animate-smooth {
619
+ from, to { opacity: 1; }
620
+ 45% { opacity: 1; }
621
+ 60% { opacity: 0; }
622
+ 85% { opacity: 0; }
623
+ }
624
+
625
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
626
+ position: absolute;
627
+ z-index: 3;
628
+ }
629
+
630
+ .ace_marker-layer .ace_selection {
631
+ position: absolute;
632
+ z-index: 5;
633
+ }
634
+
635
+ .ace_marker-layer .ace_bracket {
636
+ position: absolute;
637
+ z-index: 6;
638
+ }
639
+
640
+ .ace_marker-layer .ace_error_bracket {
641
+ position: absolute;
642
+ border-bottom: 1px solid #DE5555;
643
+ border-radius: 0;
644
+ }
645
+
646
+ .ace_marker-layer .ace_active-line {
647
+ position: absolute;
648
+ z-index: 2;
649
+ }
650
+
651
+ .ace_marker-layer .ace_selected-word {
652
+ position: absolute;
653
+ z-index: 4;
654
+ box-sizing: border-box;
655
+ }
656
+
657
+ .ace_line .ace_fold {
658
+ box-sizing: border-box;
659
+
660
+ display: inline-block;
661
+ height: 11px;
662
+ margin-top: -2px;
663
+ vertical-align: middle;
664
+
665
+ background-image:
666
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
667
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
668
+ background-repeat: no-repeat, repeat-x;
669
+ background-position: center center, top left;
670
+ color: transparent;
671
+
672
+ border: 1px solid black;
673
+ border-radius: 2px;
674
+
675
+ cursor: pointer;
676
+ pointer-events: auto;
677
+ }
678
+
679
+ .ace_dark .ace_fold {
680
+ }
681
+
682
+ .ace_fold:hover{
683
+ background-image:
684
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
685
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
686
+ }
687
+
688
+ .ace_tooltip {
689
+ background-color: #f5f5f5;
690
+ border: 1px solid gray;
691
+ border-radius: 1px;
692
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
693
+ color: black;
694
+ max-width: 100%;
695
+ padding: 3px 4px;
696
+ position: fixed;
697
+ z-index: 999999;
698
+ box-sizing: border-box;
699
+ cursor: default;
700
+ white-space: pre-wrap;
701
+ word-wrap: break-word;
702
+ line-height: normal;
703
+ font-style: normal;
704
+ font-weight: normal;
705
+ letter-spacing: normal;
706
+ pointer-events: none;
707
+ overflow: auto;
708
+ max-width: min(60em, 66vw);
709
+ overscroll-behavior: contain;
710
+ }
711
+ .ace_tooltip pre {
712
+ white-space: pre-wrap;
713
+ }
714
+
715
+ .ace_tooltip.ace_dark {
716
+ background-color: #636363;
717
+ color: #fff;
718
+ }
719
+
720
+ .ace_tooltip:focus {
721
+ outline: 1px solid #5E9ED6;
722
+ }
723
+
724
+ .ace_icon {
725
+ display: inline-block;
726
+ width: 18px;
727
+ vertical-align: top;
728
+ }
729
+
730
+ .ace_icon_svg {
731
+ display: inline-block;
732
+ width: 12px;
733
+ vertical-align: top;
734
+ -webkit-mask-repeat: no-repeat;
735
+ -webkit-mask-size: 12px;
736
+ -webkit-mask-position: center;
737
+ }
738
+
739
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
740
+ padding-right: 13px;
741
+ }
742
+
743
+ .ace_fold-widget {
744
+ box-sizing: border-box;
745
+
746
+ margin: 0 -12px 0 1px;
747
+ display: none;
748
+ width: 11px;
749
+ vertical-align: top;
750
+
751
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
752
+ background-repeat: no-repeat;
753
+ background-position: center;
754
+
755
+ border-radius: 3px;
756
+
757
+ border: 1px solid transparent;
758
+ cursor: pointer;
759
+ }
760
+
761
+ .ace_folding-enabled .ace_fold-widget {
762
+ display: inline-block;
763
+ }
764
+
765
+ .ace_fold-widget.ace_end {
766
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
767
+ }
768
+
769
+ .ace_fold-widget.ace_closed {
770
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
771
+ }
772
+
773
+ .ace_fold-widget:hover {
774
+ border: 1px solid rgba(0, 0, 0, 0.3);
775
+ background-color: rgba(255, 255, 255, 0.2);
776
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
777
+ }
778
+
779
+ .ace_fold-widget:active {
780
+ border: 1px solid rgba(0, 0, 0, 0.4);
781
+ background-color: rgba(0, 0, 0, 0.05);
782
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
783
+ }
784
+ /**
785
+ * Dark version for fold widgets
786
+ */
787
+ .ace_dark .ace_fold-widget {
788
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
789
+ }
790
+ .ace_dark .ace_fold-widget.ace_end {
791
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
792
+ }
793
+ .ace_dark .ace_fold-widget.ace_closed {
794
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
795
+ }
796
+ .ace_dark .ace_fold-widget:hover {
797
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
798
+ background-color: rgba(255, 255, 255, 0.1);
799
+ }
800
+ .ace_dark .ace_fold-widget:active {
801
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
802
+ }
803
+
804
+ .ace_inline_button {
805
+ border: 1px solid lightgray;
806
+ display: inline-block;
807
+ margin: -1px 8px;
808
+ padding: 0 5px;
809
+ pointer-events: auto;
810
+ cursor: pointer;
811
+ }
812
+ .ace_inline_button:hover {
813
+ border-color: gray;
814
+ background: rgba(200,200,200,0.2);
815
+ display: inline-block;
816
+ pointer-events: auto;
817
+ }
818
+
819
+ .ace_fold-widget.ace_invalid {
820
+ background-color: #FFB4B4;
821
+ border-color: #DE5555;
822
+ }
823
+
824
+ .ace_fade-fold-widgets .ace_fold-widget {
825
+ transition: opacity 0.4s ease 0.05s;
826
+ opacity: 0;
827
+ }
828
+
829
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
830
+ transition: opacity 0.05s ease 0.05s;
831
+ opacity:1;
832
+ }
833
+
834
+ .ace_underline {
835
+ text-decoration: underline;
836
+ }
837
+
838
+ .ace_bold {
839
+ font-weight: bold;
840
+ }
841
+
842
+ .ace_nobold .ace_bold {
843
+ font-weight: normal;
844
+ }
845
+
846
+ .ace_italic {
847
+ font-style: italic;
848
+ }
849
+
850
+
851
+ .ace_error-marker {
852
+ background-color: rgba(255, 0, 0,0.2);
853
+ position: absolute;
854
+ z-index: 9;
855
+ }
856
+
857
+ .ace_highlight-marker {
858
+ background-color: rgba(255, 255, 0,0.2);
859
+ position: absolute;
860
+ z-index: 8;
861
+ }
862
+
863
+ .ace_mobile-menu {
864
+ position: absolute;
865
+ line-height: 1.5;
866
+ border-radius: 4px;
867
+ -ms-user-select: none;
868
+ -moz-user-select: none;
869
+ -webkit-user-select: none;
870
+ user-select: none;
871
+ background: white;
872
+ box-shadow: 1px 3px 2px grey;
873
+ border: 1px solid #dcdcdc;
874
+ color: black;
875
+ }
876
+ .ace_dark > .ace_mobile-menu {
877
+ background: #333;
878
+ color: #ccc;
879
+ box-shadow: 1px 3px 2px grey;
880
+ border: 1px solid #444;
881
+
882
+ }
883
+ .ace_mobile-button {
884
+ padding: 2px;
885
+ cursor: pointer;
886
+ overflow: hidden;
887
+ }
888
+ .ace_mobile-button:hover {
889
+ background-color: #eee;
890
+ opacity:1;
891
+ }
892
+ .ace_mobile-button:active {
893
+ background-color: #ddd;
894
+ }
895
+
896
+ .ace_placeholder {
897
+ position: relative;
898
+ font-family: arial;
899
+ transform: scale(0.9);
900
+ transform-origin: left;
901
+ white-space: pre;
902
+ opacity: 0.7;
903
+ margin: 0 10px;
904
+ z-index: 1;
905
+ }
906
+
907
+ .ace_ghost_text {
908
+ opacity: 0.5;
909
+ font-style: italic;
910
+ }
911
+
912
+ .ace_ghost_text_container > div {
913
+ white-space: pre;
914
+ }
915
+
916
+ .ghost_text_line_wrapped::after {
917
+ content: "↩";
918
+ position: absolute;
919
+ }
920
+
921
+ .ace_lineWidgetContainer.ace_ghost_text {
922
+ margin: 0px 4px
923
+ }
924
+
925
+ .ace_screenreader-only {
926
+ position:absolute;
927
+ left:-10000px;
928
+ top:auto;
929
+ width:1px;
930
+ height:1px;
931
+ overflow:hidden;
932
+ }
933
+
934
+ .ace_hidden_token {
935
+ display: none;
936
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(p,m,Vn){var W=p("../lib/dom"),R=p("../lib/oop"),M=p("../lib/event_emitter").EventEmitter,l=function(){function u(o,i){this.canvas=W.createElement("canvas"),this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.canvasHeight=o.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=o.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},o.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(o){var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(o){this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height;var r=(o.lastRow+1)*this.lineHeight;r<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var t=this.canvas.getContext("2d");function e(Kn,y){return Kn.priority<y.priority?-1:Kn.priority>y.priority?1:0}var n=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),n){var a={info:1,warning:2,error:3};n.forEach(function(Kn){Kn.priority=a[Kn.type]||null}),n=n.sort(e);for(var d=this.renderer.session.$foldData,f=0;f<n.length;f++){var oe=n[f].row,F=this.compensateFoldRows(oe,d),_=Math.round((oe-F)*this.lineHeight*this.heightRatio),S=Math.round((oe-F)*this.lineHeight*this.heightRatio),xe=Math.round(((oe-F)*this.lineHeight+this.lineHeight)*this.heightRatio),He=xe-S;if(He<this.minDecorationHeight){var Ae=(S+xe)/2|0;Ae<this.halfMinDecorationHeight?Ae=this.halfMinDecorationHeight:Ae+this.halfMinDecorationHeight>this.canvasHeight&&(Ae=this.canvasHeight-this.halfMinDecorationHeight),S=Math.round(Ae-this.halfMinDecorationHeight),xe=Math.round(Ae+this.halfMinDecorationHeight)}t.fillStyle=i[n[f].type]||null,t.fillRect(0,_,this.canvasWidth,xe-S)}}var J=this.renderer.session.selection.getCursor();if(J){var F=this.compensateFoldRows(J.row,d),_=Math.round((J.row-F)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,_,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(o,i){var r=0;if(i&&i.length>0)for(var t=0;t<i.length;t++)o>i[t].start.row&&o<i[t].end.row?r+=o-i[t].start.row:o>=i[t].end.row&&(r+=i[t].end.row-i[t].start.row);return r},u}();R.implement(l.prototype,M),m.Decorator=l}),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(p,m,Vn){var W=p("./lib/oop"),R=p("./lib/dom"),M=p("./lib/lang"),l=p("./config"),u=p("./layer/gutter").Gutter,o=p("./layer/marker").Marker,i=p("./layer/text").Text,r=p("./layer/cursor").Cursor,t=p("./scrollbar").HScrollBar,e=p("./scrollbar").VScrollBar,n=p("./scrollbar_custom").HScrollBar,a=p("./scrollbar_custom").VScrollBar,d=p("./renderloop").RenderLoop,f=p("./layer/font_metrics").FontMetrics,oe=p("./lib/event_emitter").EventEmitter,F=p("./css/editor-css"),_=p("./layer/decorators").Decorator,S=p("./lib/useragent"),xe=p("./layer/text_util").isTextToken;R.importCssString(F,"ace_editor.css",!1);var He=function(){function Ae(J,Kn){var y=this;this.container=J||R.createElement("div"),R.addCssClass(this.container,"ace_editor"),R.HI_DPI&&R.addCssClass(this.container,"ace_hidpi"),this.setTheme(Kn),l.get("useStrictCSP")==null&&l.set("useStrictCSP",!1),this.$gutter=R.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=R.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=R.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var h=this.$textLayer=new i(this.content);this.canvas=h.element,this.$markerFront=new o(this.content),this.$cursorLayer=new r(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(w){y.$scrollAnimation||y.session.setScrollTop(w.data-y.scrollMargin.top)}),this.scrollBarH.on("scroll",function(w){y.$scrollAnimation||y.session.setScrollLeft(w.data-y.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(w){y.updateCharacterSize(),y.onResize(!0,y.gutterWidth,y.$size.width,y.$size.height),y._signal("changeCharacterSize",w)}),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=!S.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}return Ae.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(),R.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},Ae.prototype.setSession=function(J){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=J,J&&this.scrollMargin.top&&J.getScrollTop()<=0&&J.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(J),this.$markerBack.setSession(J),this.$markerFront.setSession(J),this.$gutterLayer.setSession(J),this.$textLayer.setSession(J),J&&(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))},Ae.prototype.updateLines=function(J,Kn,y){if(Kn===void 0&&(Kn=1/0),this.$changedLines?(this.$changedLines.firstRow>J&&(this.$changedLines.firstRow=J),this.$changedLines.lastRow<Kn&&(this.$changedLines.lastRow=Kn)):this.$changedLines={firstRow:J,lastRow:Kn},this.$changedLines.lastRow<this.layerConfig.firstRow)if(y)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},Ae.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},Ae.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},Ae.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},Ae.prototype.updateFull=function(J){J?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},Ae.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},Ae.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},Ae.prototype.onResize=function(J,Kn,y,h){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=J?1:0;var w=this.container;h||(h=w.clientHeight||w.scrollHeight),!h&&this.$maxLines&&this.lineHeight>1&&(!w.style.height||w.style.height=="0px")&&(w.style.height="1px",h=w.clientHeight||w.scrollHeight),y||(y=w.clientWidth||w.scrollWidth);var Q=this.$updateCachedSize(J,Kn,y,h);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!y&&!h)return this.resizing=0;J&&(this.$gutterLayer.$padding=null),J?this.$renderChanges(Q|this.$changes,!0):this.$loop.schedule(Q|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},Ae.prototype.$updateCachedSize=function(J,Kn,y,h){h-=this.$extraHeight||0;var w=0,Q=this.$size,Me={width:Q.width,height:Q.height,scrollerHeight:Q.scrollerHeight,scrollerWidth:Q.scrollerWidth};if(h&&(J||Q.height!=h)&&(Q.height=h,w|=this.CHANGE_SIZE,Q.scrollerHeight=Q.height,this.$horizScroll&&(Q.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(Q.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",w=w|this.CHANGE_SCROLL),y&&(J||Q.width!=y)){w|=this.CHANGE_SIZE,Q.width=y,Kn==null&&(Kn=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=Kn,R.setStyle(this.scrollBarH.element.style,"left",Kn+"px"),R.setStyle(this.scroller.style,"left",Kn+this.margin.left+"px"),Q.scrollerWidth=Math.max(0,y-Kn-this.scrollBarV.getWidth()-this.margin.h),R.setStyle(this.$gutter.style,"left",this.margin.left+"px");var Gn=this.scrollBarV.getWidth()+"px";R.setStyle(this.scrollBarH.element.style,"right",Gn),R.setStyle(this.scroller.style,"right",Gn),R.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(Q.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||J)&&(w|=this.CHANGE_FULL)}return Q.$dirty=!y||!h,w&&this._signal("resize",Me),w},Ae.prototype.onGutterResize=function(J){var Kn=this.$showGutter?J:0;Kn!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,Kn,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()},Ae.prototype.adjustWrapLimit=function(){var J=this.$size.scrollerWidth-this.$padding*2,Kn=Math.floor(J/this.characterWidth);return this.session.adjustWrapLimit(Kn,this.$showPrintMargin&&this.$printMarginColumn)},Ae.prototype.setAnimatedScroll=function(J){this.setOption("animatedScroll",J)},Ae.prototype.getAnimatedScroll=function(){return this.$animatedScroll},Ae.prototype.setShowInvisibles=function(J){this.setOption("showInvisibles",J),this.session.$bidiHandler.setShowInvisibles(J)},Ae.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},Ae.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},Ae.prototype.setDisplayIndentGuides=function(J){this.setOption("displayIndentGuides",J)},Ae.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},Ae.prototype.setHighlightIndentGuides=function(J){this.setOption("highlightIndentGuides",J)},Ae.prototype.setShowPrintMargin=function(J){this.setOption("showPrintMargin",J)},Ae.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},Ae.prototype.setPrintMarginColumn=function(J){this.setOption("printMarginColumn",J)},Ae.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},Ae.prototype.getShowGutter=function(){return this.getOption("showGutter")},Ae.prototype.setShowGutter=function(J){return this.setOption("showGutter",J)},Ae.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},Ae.prototype.setFadeFoldWidgets=function(J){this.setOption("fadeFoldWidgets",J)},Ae.prototype.setHighlightGutterLine=function(J){this.setOption("highlightGutterLine",J)},Ae.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},Ae.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var J=R.createElement("div");J.className="ace_layer ace_print-margin-layer",this.$printMarginEl=R.createElement("div"),this.$printMarginEl.className="ace_print-margin",J.appendChild(this.$printMarginEl),this.content.insertBefore(J,this.content.firstChild)}var Kn=this.$printMarginEl.style;Kn.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",Kn.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},Ae.prototype.getContainerElement=function(){return this.container},Ae.prototype.getMouseEventTarget=function(){return this.scroller},Ae.prototype.getTextAreaContainer=function(){return this.container},Ae.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var J=this.textarea.style,Kn=this.$composition;if(!this.$keepTextAreaAtCursor&&!Kn){R.translate(this.textarea,-100,0);return}var y=this.$cursorLayer.$pixelPos;if(y){Kn&&Kn.markerRange&&(y=this.$cursorLayer.getPixelPosition(Kn.markerRange.start,!0));var h=this.layerConfig,w=y.top,Q=y.left;w-=h.offset;var Me=Kn&&Kn.useTextareaForIME||S.isMobile?this.lineHeight:1;if(w<0||w>h.height-Me){R.translate(this.textarea,0,0);return}var Gn=1,Yn=this.$size.height-Me;if(!Kn)w+=this.lineHeight;else if(Kn.useTextareaForIME){var Qn=this.textarea.value;Gn=this.characterWidth*this.session.$getStringScreenWidth(Qn)[0]}else w+=this.lineHeight+2;Q-=this.scrollLeft,Q>this.$size.scrollerWidth-Gn&&(Q=this.$size.scrollerWidth-Gn),Q+=this.gutterWidth+this.margin.left,R.setStyle(J,"height",Me+"px"),R.setStyle(J,"width",Gn+"px"),R.translate(this.textarea,Math.min(Q,this.$size.scrollerWidth-Gn),Math.min(w,Yn))}}},Ae.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},Ae.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},Ae.prototype.getLastFullyVisibleRow=function(){var J=this.layerConfig,Kn=J.lastRow,y=this.session.documentToScreenRow(Kn,0)*J.lineHeight;return y-this.session.getScrollTop()>J.height-J.lineHeight?Kn-1:Kn},Ae.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},Ae.prototype.setPadding=function(J){this.$padding=J,this.$textLayer.setPadding(J),this.$cursorLayer.setPadding(J),this.$markerFront.setPadding(J),this.$markerBack.setPadding(J),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},Ae.prototype.setScrollMargin=function(J,Kn,y,h){var w=this.scrollMargin;w.top=J|0,w.bottom=Kn|0,w.right=h|0,w.left=y|0,w.v=w.top+w.bottom,w.h=w.left+w.right,w.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-w.top),this.updateFull()},Ae.prototype.setMargin=function(J,Kn,y,h){var w=this.margin;w.top=J|0,w.bottom=Kn|0,w.right=h|0,w.left=y|0,w.v=w.top+w.bottom,w.h=w.left+w.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},Ae.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},Ae.prototype.setHScrollBarAlwaysVisible=function(J){this.setOption("hScrollBarAlwaysVisible",J)},Ae.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},Ae.prototype.setVScrollBarAlwaysVisible=function(J){this.setOption("vScrollBarAlwaysVisible",J)},Ae.prototype.$updateScrollBarV=function(){var J=this.layerConfig.maxHeight,Kn=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(J-=(Kn-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>J-Kn&&(J=this.scrollTop+Kn,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(J+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},Ae.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},Ae.prototype.freeze=function(){this.$frozen=!0},Ae.prototype.unfreeze=function(){this.$frozen=!1},Ae.prototype.$renderChanges=function(J,Kn){if(this.$changes&&(J|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!J&&!Kn){this.$changes|=J;return}if(this.$size.$dirty)return this.$changes|=J,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",J),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var y=this.layerConfig;if(J&this.CHANGE_FULL||J&this.CHANGE_SIZE||J&this.CHANGE_TEXT||J&this.CHANGE_LINES||J&this.CHANGE_SCROLL||J&this.CHANGE_H_SCROLL){if(J|=this.$computeLayerConfig()|this.$loop.clear(),y.firstRow!=this.layerConfig.firstRow&&y.firstRowScreen==this.layerConfig.firstRowScreen){var h=this.scrollTop+(y.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;h>0&&(this.scrollTop=h,J=J|this.CHANGE_SCROLL,J|=this.$computeLayerConfig()|this.$loop.clear())}y=this.layerConfig,this.$updateScrollBarV(),J&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),R.translate(this.content,-this.scrollLeft,-y.offset);var w=y.width+2*this.$padding+"px",Q=y.minHeight+"px";R.setStyle(this.content.style,"width",w),R.setStyle(this.content.style,"height",Q)}if(J&this.CHANGE_H_SCROLL&&(R.translate(this.content,-this.scrollLeft,-y.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),J&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(y),this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y),this.$markerBack.update(y),this.$markerFront.update(y),this.$cursorLayer.update(y),this.$moveTextAreaToCursor(),this._signal("afterRender",J);return}if(J&this.CHANGE_SCROLL){this.$changedLines=null,J&this.CHANGE_TEXT||J&this.CHANGE_LINES?this.$textLayer.update(y):this.$textLayer.scrollLines(y),this.$showGutter&&(J&this.CHANGE_GUTTER||J&this.CHANGE_LINES?this.$gutterLayer.update(y):this.$gutterLayer.scrollLines(y)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y),this.$markerBack.update(y),this.$markerFront.update(y),this.$cursorLayer.update(y),this.$moveTextAreaToCursor(),this._signal("afterRender",J);return}J&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(y),this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):J&this.CHANGE_LINES?((this.$updateLines()||J&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):J&this.CHANGE_TEXT||J&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):J&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)),J&this.CHANGE_CURSOR&&(this.$cursorLayer.update(y),this.$moveTextAreaToCursor()),J&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(y),J&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(y),this._signal("afterRender",J)},Ae.prototype.$autosize=function(){var J=this.session.getScreenLength()*this.lineHeight,Kn=this.$maxLines*this.lineHeight,y=Math.min(Kn,Math.max((this.$minLines||1)*this.lineHeight,J))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(y+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&y>this.$maxPixelHeight&&(y=this.$maxPixelHeight);var h=y<=2*this.lineHeight,w=!h&&J>Kn;if(y!=this.desiredHeight||this.$size.height!=this.desiredHeight||w!=this.$vScroll){w!=this.$vScroll&&(this.$vScroll=w,this.scrollBarV.setVisible(w));var Q=this.container.clientWidth;this.container.style.height=y+"px",this.$updateCachedSize(!0,this.$gutterWidth,Q,y),this.desiredHeight=y,this._signal("autosize")}},Ae.prototype.$computeLayerConfig=function(){var J=this.session,Kn=this.$size,y=Kn.height<=2*this.lineHeight,h=this.session.getScreenLength(),w=h*this.lineHeight,Q=this.$getLongestLine(),Me=!y&&(this.$hScrollBarAlwaysVisible||Kn.scrollerWidth-Q-2*this.$padding<0),Gn=this.$horizScroll!==Me;Gn&&(this.$horizScroll=Me,this.scrollBarH.setVisible(Me));var Yn=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var Qn=Kn.scrollerHeight+this.lineHeight,Zn=!this.$maxLines&&this.$scrollPastEnd?(Kn.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;w+=Zn;var Jn=this.scrollMargin;this.session.setScrollTop(Math.max(-Jn.top,Math.min(this.scrollTop,w-Kn.scrollerHeight+Jn.bottom))),this.session.setScrollLeft(Math.max(-Jn.left,Math.min(this.scrollLeft,Q+2*this.$padding-Kn.scrollerWidth+Jn.right)));var ii=!y&&(this.$vScrollBarAlwaysVisible||Kn.scrollerHeight-w+Zn<0||this.scrollTop>Jn.top),Xn=Yn!==ii;Xn&&(this.$vScroll=ii,this.scrollBarV.setVisible(ii));var ei=this.scrollTop%this.lineHeight,ni=Math.ceil(Qn/this.lineHeight)-1,ti=Math.max(0,Math.round((this.scrollTop-ei)/this.lineHeight)),oi=ti+ni,ai,li,si=this.lineHeight;ti=J.screenToDocumentRow(ti,0);var hi=J.getFoldLine(ti);hi&&(ti=hi.start.row),ai=J.documentToScreenRow(ti,0),li=J.getRowLength(ti)*si,oi=Math.min(J.screenToDocumentRow(oi,0),J.getLength()-1),Qn=Kn.scrollerHeight+J.getRowLength(oi)*si+li,ei=this.scrollTop-ai*si;var pi=0;return(this.layerConfig.width!=Q||Gn)&&(pi=this.CHANGE_H_SCROLL),(Gn||Xn)&&(pi|=this.$updateCachedSize(!0,this.gutterWidth,Kn.width,Kn.height),this._signal("scrollbarVisibilityChanged"),Xn&&(Q=this.$getLongestLine())),this.layerConfig={width:Q,padding:this.$padding,firstRow:ti,firstRowScreen:ai,lastRow:oi,lineHeight:si,characterWidth:this.characterWidth,minHeight:Qn,maxHeight:w,offset:ei,gutterOffset:si?Math.max(0,Math.ceil((ei+Kn.height-Kn.scrollerHeight)/si)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(Q-this.$padding),pi},Ae.prototype.$updateLines=function(){if(this.$changedLines){var J=this.$changedLines.firstRow,Kn=this.$changedLines.lastRow;this.$changedLines=null;var y=this.layerConfig;if(!(J>y.lastRow+1)&&!(Kn<y.firstRow)){if(Kn===1/0){this.$showGutter&&this.$gutterLayer.update(y),this.$textLayer.update(y);return}return this.$textLayer.updateLines(y,J,Kn),!0}}},Ae.prototype.$getLongestLine=function(){var J=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(J+=1),this.$textLayer&&J>this.$textLayer.MAX_LINE_LENGTH&&(J=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(J*this.characterWidth))},Ae.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},Ae.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},Ae.prototype.addGutterDecoration=function(J,Kn){this.$gutterLayer.addGutterDecoration(J,Kn)},Ae.prototype.removeGutterDecoration=function(J,Kn){this.$gutterLayer.removeGutterDecoration(J,Kn)},Ae.prototype.updateBreakpoints=function(J){this._rows=J,this.$loop.schedule(this.CHANGE_GUTTER)},Ae.prototype.setAnnotations=function(J){this.$gutterLayer.setAnnotations(J),this.$loop.schedule(this.CHANGE_GUTTER)},Ae.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},Ae.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},Ae.prototype.showCursor=function(){this.$cursorLayer.showCursor()},Ae.prototype.scrollSelectionIntoView=function(J,Kn,y){this.scrollCursorIntoView(J,y),this.scrollCursorIntoView(Kn,y)},Ae.prototype.scrollCursorIntoView=function(J,Kn,y){if(this.$size.scrollerHeight!==0){var h=this.$cursorLayer.getPixelPosition(J),w=h.left,Q=h.top,Me=y&&y.top||0,Gn=y&&y.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var Yn=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;Yn+Me>Q?(Kn&&Yn+Me>Q+this.lineHeight&&(Q-=Kn*this.$size.scrollerHeight),Q===0&&(Q=-this.scrollMargin.top),this.session.setScrollTop(Q)):Yn+this.$size.scrollerHeight-Gn<Q+this.lineHeight&&(Kn&&Yn+this.$size.scrollerHeight-Gn<Q-this.lineHeight&&(Q+=Kn*this.$size.scrollerHeight),this.session.setScrollTop(Q+this.lineHeight+Gn-this.$size.scrollerHeight));var Qn=this.scrollLeft,Zn=2*this.layerConfig.characterWidth;w-Zn<Qn?(w-=Zn,w<this.$padding+Zn&&(w=-this.scrollMargin.left),this.session.setScrollLeft(w)):(w+=Zn,Qn+this.$size.scrollerWidth<w+this.characterWidth?this.session.setScrollLeft(Math.round(w+this.characterWidth-this.$size.scrollerWidth)):Qn<=this.$padding&&w-Qn<this.characterWidth&&this.session.setScrollLeft(0))}},Ae.prototype.getScrollTop=function(){return this.session.getScrollTop()},Ae.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},Ae.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},Ae.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},Ae.prototype.scrollToRow=function(J){this.session.setScrollTop(J*this.lineHeight)},Ae.prototype.alignCursor=function(J,Kn){typeof J=="number"&&(J={row:J,column:0});var y=this.$cursorLayer.getPixelPosition(J),h=this.$size.scrollerHeight-this.lineHeight,w=y.top-h*(Kn||0);return this.session.setScrollTop(w),w},Ae.prototype.$calcSteps=function(J,Kn){var y=0,h=this.STEPS,w=[],Q=function(Me,Gn,Yn){return Yn*(Math.pow(Me-1,3)+1)+Gn};for(y=0;y<h;++y)w.push(Q(y/this.STEPS,J,Kn-J));return w},Ae.prototype.scrollToLine=function(J,Kn,y,h){var w=this.$cursorLayer.getPixelPosition({row:J,column:0}),Q=w.top;Kn&&(Q-=this.$size.scrollerHeight/2);var Me=this.scrollTop;this.session.setScrollTop(Q),y!==!1&&this.animateScrolling(Me,h)},Ae.prototype.animateScrolling=function(J,Kn){var y=this.scrollTop;if(!this.$animatedScroll)return;var h=this;if(J==y)return;if(this.$scrollAnimation){var w=this.$scrollAnimation.steps;if(w.length&&(J=w[0],J==y))return}var Q=h.$calcSteps(J,y);this.$scrollAnimation={from:J,to:y,steps:Q},clearInterval(this.$timer),h.session.setScrollTop(Q.shift()),h.session.$scrollTop=y;function Me(){h.$timer=clearInterval(h.$timer),h.$scrollAnimation=null,h.$stopAnimation=!1,Kn&&Kn()}this.$timer=setInterval(function(){if(h.$stopAnimation){Me();return}if(!h.session)return clearInterval(h.$timer);Q.length?(h.session.setScrollTop(Q.shift()),h.session.$scrollTop=y):y!=null?(h.session.$scrollTop=-1,h.session.setScrollTop(y),y=null):Me()},10)},Ae.prototype.scrollToY=function(J){this.scrollTop!==J&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=J)},Ae.prototype.scrollToX=function(J){this.scrollLeft!==J&&(this.scrollLeft=J),this.$loop.schedule(this.CHANGE_H_SCROLL)},Ae.prototype.scrollTo=function(J,Kn){this.session.setScrollTop(Kn),this.session.setScrollLeft(J)},Ae.prototype.scrollBy=function(J,Kn){Kn&&this.session.setScrollTop(this.session.getScrollTop()+Kn),J&&this.session.setScrollLeft(this.session.getScrollLeft()+J)},Ae.prototype.isScrollableBy=function(J,Kn){if(Kn<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||Kn>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||J<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||J>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},Ae.prototype.pixelToScreenCoordinates=function(J,Kn){var y;if(this.$hasCssTransforms){y={top:0,left:0};var h=this.$fontMetrics.transformCoordinates([J,Kn]);J=h[1]-this.gutterWidth-this.margin.left,Kn=h[0]}else y=this.scroller.getBoundingClientRect();var w=J+this.scrollLeft-y.left-this.$padding,Q=w/this.characterWidth,Me=Math.floor((Kn+this.scrollTop-y.top)/this.lineHeight),Gn=this.$blockCursor?Math.floor(Q):Math.round(Q);return{row:Me,column:Gn,side:Q-Gn>0?1:-1,offsetX:w}},Ae.prototype.screenToTextCoordinates=function(J,Kn){var y;if(this.$hasCssTransforms){y={top:0,left:0};var h=this.$fontMetrics.transformCoordinates([J,Kn]);J=h[1]-this.gutterWidth-this.margin.left,Kn=h[0]}else y=this.scroller.getBoundingClientRect();var w=J+this.scrollLeft-y.left-this.$padding,Q=w/this.characterWidth,Me=this.$blockCursor?Math.floor(Q):Math.round(Q),Gn=Math.floor((Kn+this.scrollTop-y.top)/this.lineHeight);return this.session.screenToDocumentPosition(Gn,Math.max(Me,0),w)},Ae.prototype.textToScreenCoordinates=function(J,Kn){var y=this.scroller.getBoundingClientRect(),h=this.session.documentToScreenPosition(J,Kn),w=this.$padding+(this.session.$bidiHandler.isBidiRow(h.row,J)?this.session.$bidiHandler.getPosLeft(h.column):Math.round(h.column*this.characterWidth)),Q=h.row*this.lineHeight;return{pageX:y.left+w-this.scrollLeft,pageY:y.top+Q-this.scrollTop}},Ae.prototype.visualizeFocus=function(){R.addCssClass(this.container,"ace_focus")},Ae.prototype.visualizeBlur=function(){R.removeCssClass(this.container,"ace_focus")},Ae.prototype.showComposition=function(J){this.$composition=J,J.cssText||(J.cssText=this.textarea.style.cssText),J.useTextareaForIME==null&&(J.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(R.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):J.markerId=this.session.addMarker(J.markerRange,"ace_composition_marker","text")},Ae.prototype.setCompositionText=function(J){var Kn=this.session.selection.cursor;this.addToken(J,"composition_placeholder",Kn.row,Kn.column),this.$moveTextAreaToCursor()},Ae.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),R.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var J=this.session.selection.cursor;this.removeExtraToken(J.row,J.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},Ae.prototype.setGhostText=function(J,Kn){var y=this.session.selection.cursor,h=Kn||{row:y.row,column:y.column};this.removeGhostText();var w=this.$calculateWrappedTextChunks(J,h);this.addToken(w[0].text,"ghost_text",h.row,h.column),this.$ghostText={text:J,position:{row:h.row,column:h.column}};var Q=R.createElement("div");if(w.length>1){var Me=this.hideTokensAfterPosition(h.row,h.column),Gn;w.slice(1).forEach(function(Xn){var ei=R.createElement("div"),ni=R.createElement("span");ni.className="ace_ghost_text",Xn.wrapped&&(ei.className="ghost_text_line_wrapped"),Xn.text.length===0&&(Xn.text=" "),ni.appendChild(R.createTextNode(Xn.text)),ei.appendChild(ni),Q.appendChild(ei),Gn=ei}),Me.forEach(function(Xn){var ei=R.createElement("span");xe(Xn.type)||(ei.className="ace_"+Xn.type.replace(/\./g," ace_")),ei.appendChild(R.createTextNode(Xn.value)),Gn.appendChild(ei)}),this.$ghostTextWidget={el:Q,row:h.row,column:h.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var Yn=this.$cursorLayer.getPixelPosition(h,!0),Qn=this.container,Zn=Qn.getBoundingClientRect().height,Jn=w.length*this.lineHeight,ii=Jn<Zn-Yn.top;if(ii)return;Jn<Zn?this.scrollBy(0,(w.length-1)*this.lineHeight):this.scrollToRow(h.row)}},Ae.prototype.$calculateWrappedTextChunks=function(J,Kn){var y=this.$size.scrollerWidth-this.$padding*2,h=Math.floor(y/this.characterWidth)-2;h=h<=0?60:h;for(var w=J.split(/\r?\n/),Q=[],Me=0;Me<w.length;Me++){var Gn=this.session.$getDisplayTokens(w[Me],Kn.column),Yn=this.session.$computeWrapSplits(Gn,h,this.session.$tabSize);if(Yn.length>0){var Qn=0;Yn.push(w[Me].length);for(var Zn=0;Zn<Yn.length;Zn++){var Jn=w[Me].slice(Qn,Yn[Zn]);Q.push({text:Jn,wrapped:!0}),Qn=Yn[Zn]}}else Q.push({text:w[Me],wrapped:!1})}return Q},Ae.prototype.removeGhostText=function(){if(this.$ghostText){var J=this.$ghostText.position;this.removeExtraToken(J.row,J.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},Ae.prototype.addToken=function(J,Kn,y,h){var w=this.session;w.bgTokenizer.lines[y]=null;var Q={type:Kn,value:J},Me=w.getTokens(y);if(h==null||!Me.length)Me.push(Q);else for(var Gn=0,Yn=0;Yn<Me.length;Yn++){var Qn=Me[Yn];if(Gn+=Qn.value.length,h<=Gn){var Zn=Qn.value.length-(Gn-h),Jn=Qn.value.slice(0,Zn),ii=Qn.value.slice(Zn);Me.splice(Yn,1,{type:Qn.type,value:Jn},Q,{type:Qn.type,value:ii});break}}this.updateLines(y,y)},Ae.prototype.hideTokensAfterPosition=function(J,Kn){for(var y=this.session.getTokens(J),h=0,w=!1,Q=[],Me=0;Me<y.length;Me++){var Gn=y[Me];if(h+=Gn.value.length,Gn.type!=="ghost_text"){if(w){Q.push({type:Gn.type,value:Gn.value}),Gn.type="hidden_token";continue}h===Kn&&(w=!0)}}return this.updateLines(J,J),Q},Ae.prototype.removeExtraToken=function(J,Kn){this.session.bgTokenizer.lines[J]=null,this.updateLines(J,J)},Ae.prototype.setTheme=function(J,Kn){var y=this;if(this.$themeId=J,y._dispatchEvent("themeChange",{theme:J}),!J||typeof J=="string"){var h=J||this.$options.theme.initialValue;l.loadModule(["theme",h],w)}else w(J);function w(Q){if(y.$themeId!=J)return Kn&&Kn();if(!Q||!Q.cssClass)throw new Error("couldn't load module "+J+" or it didn't call define");Q.$id&&(y.$themeId=Q.$id),R.importCssString(Q.cssText,Q.cssClass,y.container),y.theme&&R.removeCssClass(y.container,y.theme.cssClass);var Me="padding"in Q?Q.padding:"padding"in(y.theme||{})?4:y.$padding;y.$padding&&Me!=y.$padding&&y.setPadding(Me),y.$theme=Q.cssClass,y.theme=Q,R.addCssClass(y.container,Q.cssClass),R.setCssClass(y.container,"ace_dark",Q.isDark),y.$size&&(y.$size.width=0,y.$updateSizeAsync()),y._dispatchEvent("themeLoaded",{theme:Q}),Kn&&Kn(),S.isSafari&&y.scroller&&(y.scroller.style.background="red",y.scroller.style.background="")}},Ae.prototype.getTheme=function(){return this.$themeId},Ae.prototype.setStyle=function(J,Kn){R.setCssClass(this.container,J,Kn!==!1)},Ae.prototype.unsetStyle=function(J){R.removeCssClass(this.container,J)},Ae.prototype.setCursorStyle=function(J){R.setStyle(this.scroller.style,"cursor",J)},Ae.prototype.setMouseCursor=function(J){R.setStyle(this.scroller.style,"cursor",J)},Ae.prototype.attachToShadowRoot=function(){R.importCssString(F,"ace_editor.css",this.container)},Ae.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},Ae.prototype.$updateCustomScrollbar=function(J){var Kn=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,J===!0?(this.scrollBarV=new a(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(y){Kn.$scrollAnimation||Kn.session.setScrollTop(y.data-Kn.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(y){Kn.$scrollAnimation||Kn.session.setScrollLeft(y.data-Kn.scrollMargin.left)}),this.$scrollDecorator=new _(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(y){Kn.$scrollAnimation||Kn.session.setScrollTop(y.data-Kn.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(y){Kn.$scrollAnimation||Kn.session.setScrollLeft(y.data-Kn.scrollMargin.left)}))},Ae.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var J=this;this.$resizeTimer=M.delayedCall(function(){J.destroyed||J.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(Kn){var y=Kn[0].contentRect.width,h=Kn[0].contentRect.height;Math.abs(J.$size.width-y)>1||Math.abs(J.$size.height-h)>1?J.$resizeTimer.delay():J.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},Ae}();He.prototype.CHANGE_CURSOR=1,He.prototype.CHANGE_MARKER=2,He.prototype.CHANGE_GUTTER=4,He.prototype.CHANGE_SCROLL=8,He.prototype.CHANGE_LINES=16,He.prototype.CHANGE_TEXT=32,He.prototype.CHANGE_SIZE=64,He.prototype.CHANGE_MARKER_BACK=128,He.prototype.CHANGE_MARKER_FRONT=256,He.prototype.CHANGE_FULL=512,He.prototype.CHANGE_H_SCROLL=1024,He.prototype.$changes=0,He.prototype.$padding=null,He.prototype.$frozen=!1,He.prototype.STEPS=8,W.implement(He.prototype,oe),l.defineOptions(He.prototype,"renderer",{useResizeObserver:{set:function(Ae){!Ae&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):Ae&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(Ae){this.$textLayer.setShowInvisibles(Ae)&&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(Ae){typeof Ae=="number"&&(this.$printMarginColumn=Ae),this.$showPrintMargin=!!Ae,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(Ae){this.$gutter.style.display=Ae?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(Ae){this.$gutterLayer.$useSvgGutterIcons=Ae},initialValue:!1},showFoldedAnnotations:{set:function(Ae){this.$gutterLayer.$showFoldedAnnotations=Ae},initialValue:!1},fadeFoldWidgets:{set:function(Ae){R.setCssClass(this.$gutter,"ace_fade-fold-widgets",Ae)},initialValue:!1},showFoldWidgets:{set:function(Ae){this.$gutterLayer.setShowFoldWidgets(Ae),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(Ae){this.$textLayer.setDisplayIndentGuides(Ae)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(Ae){this.$textLayer.setHighlightIndentGuides(Ae)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(Ae){this.$gutterLayer.setHighlightGutterLine(Ae),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(Ae){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(Ae){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(Ae){typeof Ae=="number"&&(Ae=Ae+"px"),this.container.style.fontSize=Ae,this.updateFontSize()},initialValue:12},fontFamily:{set:function(Ae){this.container.style.fontFamily=Ae,this.updateFontSize()}},maxLines:{set:function(Ae){this.updateFull()}},minLines:{set:function(Ae){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(Ae){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(Ae){Ae=+Ae||0,this.$scrollPastEnd!=Ae&&(this.$scrollPastEnd=Ae,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(Ae){this.$gutterLayer.$fixedWidth=!!Ae,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(Ae){this.$updateCustomScrollbar(Ae)},initialValue:!1},theme:{set:function(Ae){this.setTheme(Ae)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!S.isMobile&&!S.isIE}}),m.VirtualRenderer=He}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(p,m,Vn){var W=p("../lib/oop"),R=p("../lib/net"),M=p("../lib/event_emitter").EventEmitter,l=p("../config");function u(t){var e="importScripts('"+R.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,a=new n;return a.append(e),a.getBlob("application/javascript")}}function o(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var e=u(t),n=window.URL||window.webkitURL,a=n.createObjectURL(e);return new Worker(a)}return new Worker(t)}var i=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(){W.implement(this,M),this.$createWorkerFromOldConfig=function(t,e,n,a,d){if(p.nameToUrl&&!p.toUrl&&(p.toUrl=p.nameToUrl),l.get("packaged")||!p.toUrl)a=a||l.moduleUrl(e,"worker");else{var f=this.$normalizePath;a=a||f(p.toUrl("ace/worker/worker.js",null,"_"));var oe={};t.forEach(function(F){oe[F]=f(p.toUrl(F,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(a),d&&this.send("importScripts",d),this.$worker.postMessage({init:!0,tlns:oe,module:e,classname:n}),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 n=this.callbacks[e.id];n&&(n(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 R.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,n){if(n){var a=this.callbackId++;this.callbacks[a]=n,e.push(a)}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(n){console.error(n.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(i.prototype);var r=function(t,e,n){var a=null,d=!1,f=Object.create(M),oe=[],F=new i({messageBuffer:oe,terminate:function(){},postMessage:function(S){oe.push(S),a&&(d?setTimeout(_):_())}});F.setEmitSync=function(S){d=S};var _=function(){var S=oe.shift();S.command?a[S.command].apply(a,S.args):S.event&&f._signal(S.event,S.data)};return f.postMessage=function(S){F.onMessage({data:S})},f.callback=function(S,xe){this.postMessage({type:"call",id:xe,data:S})},f.emit=function(S,xe){this.postMessage({type:"event",name:S,data:xe})},l.loadModule(["worker",e],function(S){for(a=new S[n](f);oe.length;)_()}),F};m.UIWorkerClient=r,m.WorkerClient=i,m.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(p,m,Vn){var W=p("./range").Range,R=p("./lib/event_emitter").EventEmitter,M=p("./lib/oop"),l=function(){function u(o,i,r,t,e,n){var a=this;this.length=i,this.session=o,this.doc=o.getDocument(),this.mainClass=e,this.othersClass=n,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=r;var d=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=d.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var o=this,i=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=r.addMarker(new W(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var n=i.createAnchor(e.row,e.column);n.$insertRight=!0,n.detach(),o.others.push(n)}),r.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,i=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=o.addMarker(new W(r.row,r.column,r.row,r.column+i.length),i.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o<this.others.length;o++)this.session.removeMarker(this.others[o].markerId)}},u.prototype.onUpdate=function(o){if(this.$updating)return this.updateAnchors(o);var i=o;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var r=o.action==="insert"?i.end.column-i.start.column:i.start.column-i.end.column,t=i.start.column>=this.pos.column&&i.start.column<=this.pos.column+this.length+1,e=i.start.column-this.pos.column;if(this.updateAnchors(o),t&&(this.length+=r),t&&!this.session.$fromUndo){if(o.action==="insert")for(var n=this.others.length-1;n>=0;n--){var a=this.others[n],d={row:a.row,column:a.column+e};this.doc.insertMergedLines(d,o.lines)}else if(o.action==="remove")for(var n=this.others.length-1;n>=0;n--){var a=this.others[n],d={row:a.row,column:a.column+e};this.doc.remove(new W(d.row,d.column,d.row,d.column-r))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var i=this.others.length;i--;)this.others[i].onChange(o);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var o=this,i=this.session,r=function(e,n){i.removeMarker(e.markerId),e.markerId=i.addMarker(new W(e.row,e.column,e.row,e.column+o.length),n,null,!1)};r(this.pos,this.mainClass);for(var t=this.others.length;t--;)r(this.others[t],this.othersClass)}},u.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},u.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},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),i=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,r=0;r<i;r++)o.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},u}();M.implement(l.prototype,R),m.PlaceHolder=l}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(p,m,Vn){var W=p("../lib/event"),R=p("../lib/useragent");function M(u,o){return u.row==o.row&&u.column==o.column}function l(u){var o=u.domEvent,i=o.altKey,r=o.shiftKey,t=o.ctrlKey,e=u.getAccelKey(),n=u.getButton();if(t&&R.isMac&&(n=o.button),u.editor.inMultiSelectMode&&n==2){u.editor.textInput.onContextMenu(u.domEvent);return}if(!t&&!i&&!e){n===0&&u.editor.inMultiSelectMode&&u.editor.exitMultiSelectMode();return}if(n===0){var a=u.editor,d=a.selection,f=a.inMultiSelectMode,oe=u.getDocumentPosition(),F=d.getCursor(),_=u.inSelection()||d.isEmpty()&&M(oe,F),S=u.x,xe=u.y,He=function(Jn){S=Jn.clientX,xe=Jn.clientY},Ae=a.session,J=a.renderer.pixelToScreenCoordinates(S,xe),Kn=J,y;if(a.$mouseHandler.$enableJumpToDef)t&&i||e&&i?y=r?"block":"add":i&&a.$blockSelectEnabled&&(y="block");else if(e&&!i){if(y="add",!f&&r)return}else i&&a.$blockSelectEnabled&&(y="block");if(y&&R.isMac&&o.ctrlKey&&a.$mouseHandler.cancelContextMenu(),y=="add"){if(!f&&_)return;if(!f){var h=d.toOrientedRange();a.addSelectionMarker(h)}var w=d.rangeList.rangeAtPoint(oe);a.inVirtualSelectionMode=!0,r&&(w=null,h=d.ranges[0]||h,a.removeSelectionMarker(h)),a.once("mouseup",function(){var Jn=d.toOrientedRange();w&&Jn.isEmpty()&&M(w.cursor,Jn.cursor)?d.substractPoint(Jn.cursor):(r?d.substractPoint(h.cursor):h&&(a.removeSelectionMarker(h),d.addRange(h)),d.addRange(Jn)),a.inVirtualSelectionMode=!1})}else if(y=="block"){u.stop(),a.inVirtualSelectionMode=!0;var Q,Me=[],Gn=function(){var Jn=a.renderer.pixelToScreenCoordinates(S,xe),ii=Ae.screenToDocumentPosition(Jn.row,Jn.column,Jn.offsetX);M(Kn,Jn)&&M(ii,d.lead)||(Kn=Jn,a.selection.moveToPosition(ii),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(Me),Me=d.rectangularRangeBlock(Kn,J),a.$mouseHandler.$clickSelection&&Me.length==1&&Me[0].isEmpty()&&(Me[0]=a.$mouseHandler.$clickSelection.clone()),Me.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers())};f&&!e?d.toSingleRange():!f&&e&&(Q=d.toOrientedRange(),a.addSelectionMarker(Q)),r?J=Ae.documentToScreenPosition(d.lead):d.moveToPosition(oe),Kn={row:-1,column:-1};var Yn=function(Jn){Gn(),clearInterval(Zn),a.removeSelectionMarkers(Me),Me.length||(Me=[d.toOrientedRange()]),Q&&(a.removeSelectionMarker(Q),d.toSingleRange(Q));for(var ii=0;ii<Me.length;ii++)d.addRange(Me[ii]);a.inVirtualSelectionMode=!1,a.$mouseHandler.$clickSelection=null},Qn=Gn;W.capture(a.container,He,Yn);var Zn=setInterval(function(){Qn()},20);return u.preventDefault()}}}m.onMouseDown=l}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(p,m,Vn){m.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(R){R.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(R){R.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(R){R.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(R){R.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(R){R.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(R){R.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(R){R.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(R){R.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(R){R.multiSelect.rangeCount>1?R.multiSelect.joinSelections():R.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(R){R.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(R){R.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(R){R.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(R){R.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(R){return R&&R.inMultiSelectMode}}];var W=p("../keyboard/hash_handler").HashHandler;m.keyboardHandler=new W(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(p,m,Vn){var W=p("./range_list").RangeList,R=p("./range").Range,M=p("./selection").Selection,l=p("./mouse/multi_select_handler").onMouseDown,u=p("./lib/event"),o=p("./lib/lang"),i=p("./commands/multi_select_commands");m.commands=i.defaultCommands.concat(i.multiSelectCommands);var r=p("./search").Search,t=new r;function e(F,_,S){return t.$options.wrap=!0,t.$options.needle=_,t.$options.backwards=S==-1,t.find(F)}var n=p("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(n.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(F,_){if(F){if(!this.inMultiSelectMode&&this.rangeCount===0){var S=this.toOrientedRange();if(this.rangeList.add(S),this.rangeList.add(F),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange(F);this.rangeList.removeAll(),this.rangeList.add(S),this.$onAddRange(S)}F.cursor||(F.cursor=F.end);var xe=this.rangeList.add(F);return this.$onAddRange(F),xe.length&&this.$onRemoveRange(xe),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange(F)}},this.toSingleRange=function(F){F=F||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),F&&this.fromOrientedRange(F)},this.substractPoint=function(F){var _=this.rangeList.substractPoint(F);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var F=this.rangeList.merge();F.length&&this.$onRemoveRange(F)},this.$onAddRange=function(F){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(F),this._signal("addRange",{range:F})},this.$onRemoveRange=function(F){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();F.push(_),this.rangeCount=0}for(var S=F.length;S--;){var xe=this.ranges.indexOf(F[S]);this.ranges.splice(xe,1)}this._signal("removeRange",{ranges:F}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new W,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var F=this.ranges.length?this.ranges:[this.getRange()],_=[],S=0;S<F.length;S++){var xe=F[S],He=xe.start.row,Ae=xe.end.row;if(He===Ae)_.push(xe.clone());else{for(_.push(new R(He,xe.start.column,He,this.session.getLine(He).length));++He<Ae;)_.push(this.getLineRange(He,!0));_.push(new R(Ae,0,Ae,xe.end.column))}S==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var S=_.length;S--;)this.addRange(_[S])},this.joinSelections=function(){var F=this.rangeList.ranges,_=F[F.length-1],S=R.fromPoints(F[0].start,_.end);this.toSingleRange(),this.setSelectionRange(S,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var F=this.rangeList.ranges,_=F[F.length-1],S=R.fromPoints(F[0].start,_.end);this.toSingleRange(),this.setSelectionRange(S,_.cursor==_.start)}else{var xe=this.session.documentToScreenPosition(this.cursor),He=this.session.documentToScreenPosition(this.anchor),Ae=this.rectangularRangeBlock(xe,He);Ae.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(F,_,S){var xe=[],He=F.column<_.column;if(He)var Ae=F.column,J=_.column,Kn=F.offsetX,y=_.offsetX;else var Ae=_.column,J=F.column,Kn=_.offsetX,y=F.offsetX;var h=F.row<_.row;if(h)var w=F.row,Q=_.row;else var w=_.row,Q=F.row;Ae<0&&(Ae=0),w<0&&(w=0),w==Q&&(S=!0);for(var Me,Gn=w;Gn<=Q;Gn++){var Yn=R.fromPoints(this.session.screenToDocumentPosition(Gn,Ae,Kn),this.session.screenToDocumentPosition(Gn,J,y));if(Yn.isEmpty()){if(Me&&d(Yn.end,Me))break;Me=Yn.end}Yn.cursor=He?Yn.start:Yn.end,xe.push(Yn)}if(h&&xe.reverse(),!S){for(var Qn=xe.length-1;xe[Qn].isEmpty()&&Qn>0;)Qn--;if(Qn>0)for(var Zn=0;xe[Zn].isEmpty();)Zn++;for(var Jn=Qn;Jn>=Zn;Jn--)xe[Jn].isEmpty()&&xe.splice(Jn,1)}return xe}}).call(M.prototype);var a=p("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(F){F.cursor||(F.cursor=F.end);var _=this.getSelectionStyle();return F.marker=this.session.addMarker(F,"ace_selection",_),this.session.$selectionMarkers.push(F),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,F},this.removeSelectionMarker=function(F){if(F.marker){this.session.removeMarker(F.marker);var _=this.session.$selectionMarkers.indexOf(F);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(F){for(var _=this.session.$selectionMarkers,S=F.length;S--;){var xe=F[S];if(xe.marker){this.session.removeMarker(xe.marker);var He=_.indexOf(xe);He!=-1&&_.splice(He,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function(F){this.addSelectionMarker(F.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(F){this.removeSelectionMarkers(F.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(F){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(F){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(F){var _=F.command,S=F.editor;if(S.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?xe=S.forEachSelection(_,F.args):_.multiSelectAction=="forEachLine"?xe=S.forEachSelection(_,F.args,!0):_.multiSelectAction=="single"?(S.exitMultiSelectMode(),xe=_.exec(S,F.args||{})):xe=_.multiSelectAction(S,F.args||{});else{var xe=_.exec(S,F.args||{});S.multiSelect.addRange(S.multiSelect.toOrientedRange()),S.multiSelect.mergeOverlappingRanges()}return xe}},this.forEachSelection=function(F,_,S){if(!this.inVirtualSelectionMode){var xe=S&&S.keepOrder,He=S==!0||S&&S.$byLines,Ae=this.session,J=this.selection,Kn=J.rangeList,y=(xe?J:Kn).ranges,h;if(!y.length)return F.exec?F.exec(this,_||{}):F(this,_||{});var w=J._eventRegistry;J._eventRegistry={};var Q=new M(Ae);this.inVirtualSelectionMode=!0;for(var Me=y.length;Me--;){if(He)for(;Me>0&&y[Me].start.row==y[Me-1].end.row;)Me--;Q.fromOrientedRange(y[Me]),Q.index=Me,this.selection=Ae.selection=Q;var Gn=F.exec?F.exec(this,_||{}):F(this,_||{});!h&&Gn!==void 0&&(h=Gn),Q.toOrientedRange(y[Me])}Q.detach(),this.selection=Ae.selection=J,this.inVirtualSelectionMode=!1,J._eventRegistry=w,J.mergeOverlappingRanges(),J.ranges[0]&&J.fromOrientedRange(J.ranges[0]);var Yn=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),Yn&&Yn.from==Yn.to&&this.renderer.animateScrolling(Yn.from),h}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var F="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,S=[],xe=0;xe<_.length;xe++)S.push(this.session.getTextRange(_[xe]));var He=this.session.getDocument().getNewLineCharacter();F=S.join(He),F.length==(S.length-1)*He.length&&(F="")}else this.selection.isEmpty()||(F=this.session.getTextRange(this.getSelectionRange()));return F},this.$checkMultiselectChange=function(F,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var S=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var xe=_==this.multiSelect.anchor?S.cursor==S.start?S.end:S.start:S.cursor;xe.row!=_.row||this.session.$clipPositionToDocument(xe.row,xe.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(F,_,S){if(_=_||{},_.needle=F||_.needle,_.needle==null){var xe=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(xe)}this.$search.set(_);var He=this.$search.findAll(this.session);if(!He.length)return 0;var Ae=this.multiSelect;S||Ae.toSingleRange(He[0]);for(var J=He.length;J--;)Ae.addRange(He[J],!0);return xe&&Ae.rangeList.rangeAtPoint(xe.start)&&Ae.addRange(xe,!0),He.length},this.selectMoreLines=function(F,_){var S=this.selection.toOrientedRange(),xe=S.cursor==S.end,He=this.session.documentToScreenPosition(S.cursor);this.selection.$desiredColumn&&(He.column=this.selection.$desiredColumn);var Ae=this.session.screenToDocumentPosition(He.row+F,He.column);if(S.isEmpty())var Kn=Ae;else var J=this.session.documentToScreenPosition(xe?S.end:S.start),Kn=this.session.screenToDocumentPosition(J.row+F,J.column);if(xe){var y=R.fromPoints(Ae,Kn);y.cursor=y.start}else{var y=R.fromPoints(Kn,Ae);y.cursor=y.end}if(y.desiredColumn=He.column,!this.selection.inMultiSelectMode)this.selection.addRange(S);else if(_)var h=S.cursor;this.selection.addRange(y),h&&this.selection.substractPoint(h)},this.transposeSelections=function(F){for(var _=this.session,S=_.multiSelect,xe=S.ranges,He=xe.length;He--;){var Ae=xe[He];if(Ae.isEmpty()){var J=_.getWordRange(Ae.start.row,Ae.start.column);Ae.start.row=J.start.row,Ae.start.column=J.start.column,Ae.end.row=J.end.row,Ae.end.column=J.end.column}}S.mergeOverlappingRanges();for(var Kn=[],He=xe.length;He--;){var Ae=xe[He];Kn.unshift(_.getTextRange(Ae))}F<0?Kn.unshift(Kn.pop()):Kn.push(Kn.shift());for(var He=xe.length;He--;){var Ae=xe[He],y=Ae.clone();_.replace(Ae,Kn[He]),Ae.start.row=y.start.row,Ae.start.column=y.start.column}S.fromOrientedRange(S.ranges[0])},this.selectMore=function(F,_,S){var xe=this.session,He=xe.multiSelect,Ae=He.toOrientedRange();if(!(Ae.isEmpty()&&(Ae=xe.getWordRange(Ae.start.row,Ae.start.column),Ae.cursor=F==-1?Ae.start:Ae.end,this.multiSelect.addRange(Ae),S))){var J=xe.getTextRange(Ae),Kn=e(xe,J,F);Kn&&(Kn.cursor=F==-1?Kn.start:Kn.end,this.session.unfold(Kn),this.multiSelect.addRange(Kn),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(Ae.cursor)}},this.alignCursors=function(){var F=this.session,_=F.multiSelect,S=_.ranges,xe=-1,He=S.filter(function(Qn){if(Qn.cursor.row==xe)return!0;xe=Qn.cursor.row});if(!S.length||He.length==S.length-1){var Ae=this.selection.getRange(),J=Ae.start.row,Kn=Ae.end.row,y=J==Kn;if(y){var h=this.session.getLength(),w;do w=this.session.getLine(Kn);while(/[=:]/.test(w)&&++Kn<h);do w=this.session.getLine(J);while(/[=:]/.test(w)&&--J>0);J<0&&(J=0),Kn>=h&&(Kn=h-1)}var Q=this.session.removeFullLines(J,Kn);Q=this.$reAlignText(Q,y),this.session.insert({row:J,column:0},Q.join(`
937
+ `)+`
938
+ `),y||(Ae.start.column=0,Ae.end.column=Q[Q.length-1].length),this.selection.setRange(Ae)}else{He.forEach(function(Qn){_.substractPoint(Qn.cursor)});var Me=0,Gn=1/0,Yn=S.map(function(Qn){var Zn=Qn.cursor,Jn=F.getLine(Zn.row),ii=Jn.substr(Zn.column).search(/\S/g);return ii==-1&&(ii=0),Zn.column>Me&&(Me=Zn.column),ii<Gn&&(Gn=ii),ii});S.forEach(function(Qn,Zn){var Jn=Qn.cursor,ii=Me-Jn.column,Xn=Yn[Zn]-Gn;ii>Xn?F.insert(Jn,o.stringRepeat(" ",ii-Xn)):F.remove(new R(Jn.row,Jn.column,Jn.row,Jn.column-ii+Xn)),Qn.start.column=Qn.end.column=Me,Qn.start.row=Qn.end.row=Jn.row,Qn.cursor=Qn.end}),_.fromOrientedRange(S[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(F,_){var S=!0,xe=!0,He,Ae,J;return F.map(function(Q){var Me=Q.match(/(\s*)(.*?)(\s*)([=:].*)/);return Me?He==null?(He=Me[1].length,Ae=Me[2].length,J=Me[3].length,Me):(He+Ae+J!=Me[1].length+Me[2].length+Me[3].length&&(xe=!1),He!=Me[1].length&&(S=!1),He>Me[1].length&&(He=Me[1].length),Ae<Me[2].length&&(Ae=Me[2].length),J>Me[3].length&&(J=Me[3].length),Me):[Q]}).map(_?y:S?xe?h:y:w);function Kn(Q){return o.stringRepeat(" ",Q)}function y(Q){return Q[2]?Kn(He)+Q[2]+Kn(Ae-Q[2].length+J)+Q[4].replace(/^([=:])\s+/,"$1 "):Q[0]}function h(Q){return Q[2]?Kn(He+Ae-Q[2].length)+Q[2]+Kn(J)+Q[4].replace(/^([=:])\s+/,"$1 "):Q[0]}function w(Q){return Q[2]?Kn(He)+Q[2]+Kn(J)+Q[4].replace(/^([=:])\s+/,"$1 "):Q[0]}}}).call(a.prototype);function d(F,_){return F.row==_.row&&F.column==_.column}m.onSessionChange=function(F){var _=F.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var S=F.oldSession;S&&(S.multiSelect.off("addRange",this.$onAddRange),S.multiSelect.off("removeRange",this.$onRemoveRange),S.multiSelect.off("multiSelect",this.$onMultiSelect),S.multiSelect.off("singleSelect",this.$onSingleSelect),S.multiSelect.lead.off("change",this.$checkMultiselectChange),S.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function f(F){F.$multiselectOnSessionChange||(F.$onAddRange=F.$onAddRange.bind(F),F.$onRemoveRange=F.$onRemoveRange.bind(F),F.$onMultiSelect=F.$onMultiSelect.bind(F),F.$onSingleSelect=F.$onSingleSelect.bind(F),F.$multiselectOnSessionChange=m.onSessionChange.bind(F),F.$checkMultiselectChange=F.$checkMultiselectChange.bind(F),F.$multiselectOnSessionChange(F),F.on("changeSession",F.$multiselectOnSessionChange),F.on("mousedown",l),F.commands.addCommands(i.defaultCommands),oe(F))}function oe(F){if(!F.textInput)return;var _=F.textInput.getElement(),S=!1;u.addListener(_,"keydown",function(He){var Ae=He.keyCode==18&&!(He.ctrlKey||He.shiftKey||He.metaKey);F.$blockSelectEnabled&&Ae?S||(F.renderer.setMouseCursor("crosshair"),S=!0):S&&xe()},F),u.addListener(_,"keyup",xe,F),u.addListener(_,"blur",xe,F);function xe(He){S&&(F.renderer.setMouseCursor(""),S=!1)}}m.MultiSelect=f,p("./config").defineOptions(a.prototype,"editor",{enableMultiselect:{set:function(F){f(this),F?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function(F){this.$blockSelectEnabled=F},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(p,m,Vn){var W=p("../../range").Range,R=m.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(M,l,u){var o=M.getLine(u);return this.foldingStartMarker.test(o)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(M,l,u){return null},this.indentationBlock=function(M,l,u){var o=/\S/,i=M.getLine(l),r=i.search(o);if(r!=-1){for(var t=u||i.length,e=M.getLength(),n=l,a=l;++l<e;){var d=M.getLine(l).search(o);if(d!=-1){if(d<=r){var f=M.getTokenAt(l,0);if(!f||f.type!=="string")break}a=l}}if(a>n){var oe=M.getLine(a).length;return new W(n,t,a,oe)}}},this.openingBracketBlock=function(M,l,u,o,i){var r={row:u,column:o+1},t=M.$findClosingBracket(l,r,i);if(t){var e=M.foldWidgets[t.row];return e==null&&(e=M.getFoldWidget(t.row)),e=="start"&&t.row>r.row&&(t.row--,t.column=M.getLine(t.row).length),W.fromPoints(r,t)}},this.closingBracketBlock=function(M,l,u,o,i){var r={row:u,column:o},t=M.$findOpeningBracket(l,r);if(t)return t.column++,r.column--,W.fromPoints(t,r)}}).call(R.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(p,m,Vn){var W=p("../lib/dom"),R=p("../range").Range,M=p("../config").nls;function l(o,i,r){for(var t=0,e=o.length-1;t<=e;){var n=t+e>>1,a=r(i,o[n]);if(a>0)t=n+1;else if(a<0)e=n-1;else return n}return-(t+1)}function u(o,i,r){var t=o.getAnnotations().sort(R.comparePoints);if(t.length){var e=l(t,{row:i,column:-1},R.comparePoints);e<0&&(e=-e-1),e>=t.length?e=r>0?0:t.length-1:e===0&&r<0&&(e=t.length-1);var n=t[e];if(!(!n||!r)){if(n.row===i){do n=t[e+=r];while(n&&n.row===i);if(!n)return t.slice()}var a=[];i=n.row;do a[r<0?"unshift":"push"](n),n=t[e+=r];while(n&&n.row==i);return a.length&&a}}}m.showErrorMarker=function(o,i){var r=o.session,t=o.getCursorPosition(),e=t.row,n=r.widgetManager.getWidgetsAtRow(e).filter(function(He){return He.type=="errorMarker"})[0];n?n.destroy():e-=i;var a=u(r,e,i),d;if(a){var f=a[0];t.column=(f.pos&&typeof f.column!="number"?f.pos.sc:f.column)||0,t.row=f.row,d=o.renderer.$gutterLayer.$annotations[t.row]}else{if(n)return;d={displayText:[M("error-marker.good-state","Looks good!")],className:"ace_ok"}}o.session.unfold(t.row),o.selection.moveToPosition(t);var oe={row:t.row,fixedWidth:!0,coverGutter:!0,el:W.createElement("div"),type:"errorMarker"},F=oe.el.appendChild(W.createElement("div")),_=oe.el.appendChild(W.createElement("div"));_.className="error_widget_arrow "+d.className;var S=o.renderer.$cursorLayer.getPixelPosition(t).left;_.style.left=S+o.renderer.gutterWidth-5+"px",oe.el.className="error_widget_wrapper",F.className="error_widget "+d.className,d.displayText.forEach(function(He,Ae){F.appendChild(W.createTextNode(He)),Ae<d.displayText.length-1&&F.appendChild(W.createElement("br"))}),F.appendChild(W.createElement("div"));var xe=function(He,Ae,J){if(Ae===0&&(J==="esc"||J==="return"))return oe.destroy(),{command:"null"}};oe.destroy=function(){o.$mouseHandler.isMousePressed||(o.keyBinding.removeKeyboardHandler(xe),r.widgetManager.removeLineWidget(oe),o.off("changeSelection",oe.destroy),o.off("changeSession",oe.destroy),o.off("mouseup",oe.destroy),o.off("change",oe.destroy))},o.keyBinding.addKeyboardHandler(xe),o.on("changeSelection",oe.destroy),o.on("changeSession",oe.destroy),o.on("mouseup",oe.destroy),o.on("change",oe.destroy),o.session.widgetManager.addLineWidget(oe),oe.el.onmousedown=o.focus.bind(o),o.renderer.scrollCursorIntoView(null,.5,{bottom:oe.el.offsetHeight})},W.importCssString(`
939
+ .error_widget_wrapper {
940
+ background: inherit;
941
+ color: inherit;
942
+ border:none
943
+ }
944
+ .error_widget {
945
+ border-top: solid 2px;
946
+ border-bottom: solid 2px;
947
+ margin: 5px 0;
948
+ padding: 10px 40px;
949
+ white-space: pre-wrap;
950
+ }
951
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
952
+ border-color: #ff5a5a
953
+ }
954
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
955
+ border-color: #F1D817
956
+ }
957
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
958
+ border-color: #5a5a5a
959
+ }
960
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
961
+ border-color: #5aaa5a
962
+ }
963
+ .error_widget_arrow {
964
+ position: absolute;
965
+ border: solid 5px;
966
+ border-top-color: transparent!important;
967
+ border-right-color: transparent!important;
968
+ border-left-color: transparent!important;
969
+ top: -5px;
970
+ }
971
+ `,"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(p,m,Vn){p("./loader_build")(m);var W=p("./lib/dom"),R=p("./range").Range,M=p("./editor").Editor,l=p("./edit_session").EditSession,u=p("./undomanager").UndoManager,o=p("./virtual_renderer").VirtualRenderer;p("./worker/worker_client"),p("./keyboard/hash_handler"),p("./placeholder"),p("./multi_select"),p("./mode/folding/fold_mode"),p("./theme/textmate"),p("./ext/error_marker"),m.config=p("./config"),m.edit=function(r,t){if(typeof r=="string"){var e=r;if(r=document.getElementById(e),!r)throw new Error("ace.edit can't find div #"+e)}if(r&&r.env&&r.env.editor instanceof M)return r.env.editor;var n="";if(r&&/input|textarea/i.test(r.tagName)){var a=r;n=a.value,r=W.createElement("pre"),a.parentNode.replaceChild(r,a)}else r&&(n=r.textContent,r.innerHTML="");var d=m.createEditSession(n),f=new M(new o(r),d,t),oe={document:d,editor:f,onResize:f.resize.bind(f,null)};return a&&(oe.textarea=a),f.on("destroy",function(){oe.editor.container.env=null}),f.container.env=f.env=oe,f},m.createEditSession=function(r,t){var e=new l(r,t);return e.setUndoManager(new u),e},m.Range=R,m.Editor=M,m.EditSession=l,m.UndoManager=u,m.VirtualRenderer=o;var i=m.config.version;m.version=i}),function(){ace.require(["ace/ace"],function(p){p&&(p.config.init(!0),p.define=ace.define);var m=function(){return this}();!m&&typeof window<"u"&&(m=window),!m&&typeof self<"u"&&(m=self),m.ace||(m.ace=p);for(var Vn in p)p.hasOwnProperty(Vn)&&(m.ace[Vn]=p[Vn]);m.ace.default=m.ace,x&&(x.exports=m.ace)})}()}(ace$1)),ace$1.exports}var aceExports=requireAce(),modeRuby={exports:{}},hasRequiredModeRuby;function requireModeRuby(){return hasRequiredModeRuby||(hasRequiredModeRuby=1,function(x,b){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(p,m,Vn){var W=p("../lib/oop"),R=p("./text_highlight_rules").TextHighlightRules,M=m.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};m.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},m.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},m.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var l=m.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=m.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},o=m.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},i=m.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},r=m.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},t=m.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},e=m.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},n=m.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},a=function(){var d="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",f="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",oe="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",F="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:f,"constant.language":oe,"variable.language":F,"support.function":d,"invalid.deprecated":"debugger"},"identifier"),S=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,xe={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:S},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:S},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(He,Ae,J){J.length&&(J=[]);var Kn=He[He.length-1];return J.unshift(Kn,Ae),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(He,Ae,J){J.length&&(J=[]);var Kn=He[He.length-1];return J.unshift(Kn,Ae),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(He,Ae,J){J.length&&(J=[]);var Kn=He[He.length-1];return J.unshift(Kn,Ae),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(He,Ae,J){J.length&&(J=[]);var Kn=He[He.length-1];return J.unshift(Kn,Ae),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(He,Ae,J){J.length&&(J=[]);var Kn=He[He.length-1];return J.unshift(Kn,Ae),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},n,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+S+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},r,t,M,l,e,u,o,i,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(He,Ae,J){var Kn=He[2]=="-"||He[2]=="~"?"indentedHeredoc":"heredoc",y=He.split(this.splitRegex);return J.push(Kn,y[3]),[{type:"constant",value:y[1]},{type:"string",value:y[2]},{type:"support.class",value:y[3]},{type:"string",value:y[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(He,Ae,J){return He===J[1]?(J.shift(),J.shift(),this.next=J[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(He,Ae,J){return He===J[1]?(J.shift(),J.shift(),this.next=J[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(He,Ae){return Ae[0]==="heredoc"||Ae[0]==="indentedHeredoc"?Ae[0]:He}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(He,Ae,J){return this.next="",He=="}"&&J.length>1&&J[1]!="start"&&(J.shift(),this.next=J.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(He,Ae,J){return J.length&&He===J[0]?(J.unshift(He,Ae),this.token):"string"}},{token:"constant.language.escape",regex:S},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(He,Ae,J){return J.length&&He===xe[J[0]]?(J.shift(),this.next=J.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(He,Ae,J){return J.length&&He===J[0]?(J.unshift(He,Ae),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(He,Ae,J){return J.length&&He===xe[J[0]]?(J.shift(),this.next=J.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(He,Ae,J){return J.length&&He===J[0]?(J.unshift(He,Ae),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(He,Ae,J){return J.length&&He===xe[J[0]]?(J.shift(),this.next=J.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(He,Ae,J){return J.length&&He===J[0]?(J.unshift(He,Ae),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:S},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(He,Ae,J){return J.length&&He===xe[J[0]]?(J.shift(),this.next=J.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(He,Ae,J){return J.length&&He===J[0]?(J.unshift(He,Ae),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(He,Ae,J){return J.length&&He[0]===xe[J[0]]?(J.shift(),this.next=J.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};W.inherits(a,R),m.RubyHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(p,m,Vn){var W=p("../range").Range,R=function(){};(function(){this.checkOutdent=function(M,l){return/^\s+$/.test(M)?/^\s*\}/.test(l):!1},this.autoOutdent=function(M,l){var u=M.getLine(l),o=u.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,r=M.findMatchingBracket({row:l,column:i});if(!r||r.row==l)return 0;var t=this.$getIndent(M.getLine(r.row));M.replace(new W(l,0,l,i-1),t)},this.$getIndent=function(M){return M.match(/^\s*/)[0]}}).call(R.prototype),m.MatchingBraceOutdent=R}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(p,m,Vn){var W=p("../../lib/oop"),R=p("./fold_mode").FoldMode,M=p("../../range").Range,l=p("../../token_iterator").TokenIterator,u=m.FoldMode=function(){};W.inherits(u,R),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(o,i,r){var t=o.getLine(r),e=this.foldingStartMarker.test(t),n=this.foldingStopMarker.test(t);if(e&&!n){var a=t.match(this.foldingStartMarker);if(a[1]){if((a[1]=="if"||a[1]=="else"||a[1]=="while"||a[1]=="until"||a[1]=="unless")&&(a[1]=="else"&&/^\s*else\s*$/.test(t)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(t)===!1)||a[1]=="when"&&/\sthen\s/.test(t)===!0)return;if(o.getTokenAt(r,a.index+2).type==="keyword")return"start"}else if(!a[3]||o.getTokenAt(r,a.index+1).type==="comment.multiline")return"start"}if(i!="markbeginend"||!n||e&&n)return"";var a=t.match(this.foldingStopMarker);if(a[3]==="end"){if(o.getTokenAt(r,a.index+1).type==="keyword")return"end"}else if(!a[1]||o.getTokenAt(r,a.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(o,i,r){var t=o.doc.getLine(r),e=this.foldingStartMarker.exec(t);if(e)return e[1]||e[3]?this.rubyBlock(o,r,e.index+2):this.openingBracketBlock(o,"{",r,e.index);var e=this.foldingStopMarker.exec(t);if(e)return e[3]==="end"&&o.getTokenAt(r,e.index+1).type==="keyword"?this.rubyBlock(o,r,e.index+1):e[1]==="=end"&&o.getTokenAt(r,e.index+1).type==="comment.multiline"?this.rubyBlock(o,r,e.index+1):this.closingBracketBlock(o,"}",r,e.index+e[0].length)},this.rubyBlock=function(o,y,r,t){var e=new l(o,y,r),n=e.getCurrentToken();if(!(!n||n.type!="keyword"&&n.type!="comment.multiline")){var a=n.value,d=o.getLine(y);switch(n.value){case"if":case"unless":case"while":case"until":var f=new RegExp("^\\s*"+n.value);if(!f.test(d))return;var oe=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(d))return;case"elsif":case"rescue":case"ensure":var oe=1;break;case"else":var f=new RegExp("^\\s*"+n.value+"\\s*$");if(!f.test(d))return;var oe=1;break;default:var oe=this.indentKeywords[a]}var F=[a];if(oe){var _=oe===-1?o.getLine(y-1).length:o.getLine(y).length,S=y,xe=[];if(xe.push(e.getCurrentTokenRange()),e.step=oe===-1?e.stepBackward:e.stepForward,n.type=="comment.multiline"){for(;n=e.step();)if(n.type==="comment.multiline"){if(oe==1){if(_=6,n.value=="=end")break}else if(n.value=="=begin")break}}else for(;n=e.step();){var He=!1;if(n.type==="keyword"){var Ae=oe*this.indentKeywords[n.value];switch(d=o.getLine(e.getCurrentTokenRow()),n.value){case"do":for(var J=e.$tokenIndex-1;J>=0;J--){var Kn=e.$rowTokens[J];if(Kn&&(Kn.value=="while"||Kn.value=="until"||Kn.value=="for")){Ae=0;break}}break;case"else":var f=new RegExp("^\\s*"+n.value+"\\s*$");(!f.test(d)||a=="case")&&(Ae=0,He=!0);break;case"if":case"unless":case"while":case"until":var f=new RegExp("^\\s*"+n.value);f.test(d)||(Ae=0,He=!0);break;case"when":(/\sthen\s/.test(d)||a=="case")&&(Ae=0,He=!0)}if(Ae>0)F.unshift(n.value);else if(Ae<=0&&He===!1){if(F.shift(),!F.length&&((a=="while"||a=="until"||a=="for")&&n.value!="do"||n.value=="do"&&oe==-1&&Ae!=0||n.value!="do"))break;Ae===0&&F.unshift(n.value)}}}if(!n)return null;if(t)return xe.push(e.getCurrentTokenRange()),xe;var y=e.getCurrentTokenRow();if(oe===-1){if(n.type==="comment.multiline")var h=6;else var h=o.getLine(y).length;return new M(y,h,S-1,_)}return new M(S,_,y-1,o.getLine(y-1).length)}}}}).call(u.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(p,m,Vn){var W=p("../lib/oop"),R=p("./text").Mode,M=p("./ruby_highlight_rules").RubyHighlightRules,l=p("./matching_brace_outdent").MatchingBraceOutdent,u=p("../range").Range,o=p("./folding/ruby").FoldMode,i=function(){this.HighlightRules=M,this.$outdent=new l,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o,this.indentKeywords=this.foldingRules.indentKeywords};W.inherits(i,R),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(r,t,e){var n=this.$getIndent(t),a=this.getTokenizer().getLineTokens(t,r),d=a.tokens;if(d.length&&d[d.length-1].type=="comment")return n;if(r=="start"){var f=t.match(/^.*[\{\(\[]\s*$/),oe=t.match(/^\s*(class|def|module)\s.*$/),F=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(f||oe||F||_)&&(n+=e)}return n},this.checkOutdent=function(r,t,e){return/^\s+(end|else|rescue|ensure)$/.test(t+e)||this.$outdent.checkOutdent(t,e)},this.autoOutdent=function(r,t,e){var n=t.getLine(e);if(/}/.test(n))return this.$outdent.autoOutdent(t,e);var a=this.$getIndent(n),d=t.getLine(e-1),f=this.$getIndent(d),oe=t.getTabString();f.length<=a.length&&a.slice(-oe.length)==oe&&t.remove(new u(e,a.length-oe.length,e,a.length))},this.getMatching=function(r,t,e){if(t==null){var n=r.selection.lead;e=n.column,t=n.row}var a=r.getTokenAt(t,e);if(a&&a.value in this.indentKeywords)return this.foldingRules.rubyBlock(r,t,e,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(i.prototype),m.Mode=i}),function(){ace.require(["ace/mode/ruby"],function(p){x&&(x.exports=p)})}()}(modeRuby)),modeRuby.exports}requireModeRuby();var themeTwilight={exports:{}},hasRequiredThemeTwilight;function requireThemeTwilight(){return hasRequiredThemeTwilight||(hasRequiredThemeTwilight=1,function(x,b){ace.define("ace/theme/twilight-css",["require","exports","module"],function(p,m,Vn){Vn.exports=`.ace-twilight .ace_gutter {
972
+ background: #232323;
973
+ color: #E2E2E2
974
+ }
975
+
976
+ .ace-twilight .ace_print-margin {
977
+ width: 1px;
978
+ background: #232323
979
+ }
980
+
981
+ .ace-twilight {
982
+ background-color: #141414;
983
+ color: #F8F8F8
984
+ }
985
+
986
+ .ace-twilight .ace_cursor {
987
+ color: #A7A7A7
988
+ }
989
+
990
+ .ace-twilight .ace_marker-layer .ace_selection {
991
+ background: rgba(221, 240, 255, 0.20)
992
+ }
993
+
994
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
995
+ box-shadow: 0 0 3px 0px #141414;
996
+ }
997
+
998
+ .ace-twilight .ace_marker-layer .ace_step {
999
+ background: rgb(102, 82, 0)
1000
+ }
1001
+
1002
+ .ace-twilight .ace_marker-layer .ace_bracket {
1003
+ margin: -1px 0 0 -1px;
1004
+ border: 1px solid rgba(255, 255, 255, 0.25)
1005
+ }
1006
+
1007
+ .ace-twilight .ace_marker-layer .ace_active-line {
1008
+ background: rgba(255, 255, 255, 0.031)
1009
+ }
1010
+
1011
+ .ace-twilight .ace_gutter-active-line {
1012
+ background-color: rgba(255, 255, 255, 0.031)
1013
+ }
1014
+
1015
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1016
+ border: 1px solid rgba(221, 240, 255, 0.20)
1017
+ }
1018
+
1019
+ .ace-twilight .ace_invisible {
1020
+ color: rgba(255, 255, 255, 0.25)
1021
+ }
1022
+
1023
+ .ace-twilight .ace_keyword,
1024
+ .ace-twilight .ace_meta {
1025
+ color: #CDA869
1026
+ }
1027
+
1028
+ .ace-twilight .ace_constant,
1029
+ .ace-twilight .ace_constant.ace_character,
1030
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1031
+ .ace-twilight .ace_constant.ace_other,
1032
+ .ace-twilight .ace_heading,
1033
+ .ace-twilight .ace_markup.ace_heading,
1034
+ .ace-twilight .ace_support.ace_constant {
1035
+ color: #CF6A4C
1036
+ }
1037
+
1038
+ .ace-twilight .ace_invalid.ace_illegal {
1039
+ color: #F8F8F8;
1040
+ background-color: rgba(86, 45, 86, 0.75)
1041
+ }
1042
+
1043
+ .ace-twilight .ace_invalid.ace_deprecated {
1044
+ text-decoration: underline;
1045
+ font-style: italic;
1046
+ color: #D2A8A1
1047
+ }
1048
+
1049
+ .ace-twilight .ace_support {
1050
+ color: #9B859D
1051
+ }
1052
+
1053
+ .ace-twilight .ace_fold {
1054
+ background-color: #AC885B;
1055
+ border-color: #F8F8F8
1056
+ }
1057
+
1058
+ .ace-twilight .ace_support.ace_function {
1059
+ color: #DAD085
1060
+ }
1061
+
1062
+ .ace-twilight .ace_list,
1063
+ .ace-twilight .ace_markup.ace_list,
1064
+ .ace-twilight .ace_storage {
1065
+ color: #F9EE98
1066
+ }
1067
+
1068
+ .ace-twilight .ace_entity.ace_name.ace_function,
1069
+ .ace-twilight .ace_meta.ace_tag {
1070
+ color: #AC885B
1071
+ }
1072
+
1073
+ .ace-twilight .ace_string {
1074
+ color: #8F9D6A
1075
+ }
1076
+
1077
+ .ace-twilight .ace_string.ace_regexp {
1078
+ color: #E9C062
1079
+ }
1080
+
1081
+ .ace-twilight .ace_comment {
1082
+ font-style: italic;
1083
+ color: #5F5A60
1084
+ }
1085
+
1086
+ .ace-twilight .ace_variable {
1087
+ color: #7587A6
1088
+ }
1089
+
1090
+ .ace-twilight .ace_xml-pe {
1091
+ color: #494949
1092
+ }
1093
+
1094
+ .ace-twilight .ace_indent-guide {
1095
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1096
+ }
1097
+
1098
+ .ace-twilight .ace_indent-guide-active {
1099
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1100
+ }
1101
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(p,m,Vn){m.isDark=!0,m.cssClass="ace-twilight",m.cssText=p("./twilight-css");var W=p("../lib/dom");W.importCssString(m.cssText,m.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(p){x&&(x.exports=p)})}()}(themeTwilight)),themeTwilight.exports}requireThemeTwilight();var pt=Object.defineProperty,mt=(x,b,p)=>b in x?pt(x,b,{enumerable:!0,configurable:!0,writable:!0,value:p}):x[b]=p,D=(x,b,p)=>mt(x,b+"",p);function $e(x,b){return function(){return x.apply(b,arguments)}}const{toString:gt}=Object.prototype,{getPrototypeOf:ye}=Object,ee=(x=>b=>{const p=gt.call(b);return x[p]||(x[p]=p.slice(8,-1).toLowerCase())})(Object.create(null)),C=x=>(x=x.toLowerCase(),b=>ee(b)===x),te=x=>b=>typeof b===x,{isArray:B}=Array,H=te("undefined");function _t(x){return x!==null&&!H(x)&&x.constructor!==null&&!H(x.constructor)&&O(x.constructor.isBuffer)&&x.constructor.isBuffer(x)}const ze=C("ArrayBuffer");function bt(x){let b;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?b=ArrayBuffer.isView(x):b=x&&x.buffer&&ze(x.buffer),b}const yt=te("string"),O=te("function"),We=te("number"),ne=x=>x!==null&&typeof x=="object",wt=x=>x===!0||x===!1,G=x=>{if(ee(x)!=="object")return!1;const b=ye(x);return(b===null||b===Object.prototype||Object.getPrototypeOf(b)===null)&&!(Symbol.toStringTag in x)&&!(Symbol.iterator in x)},St=C("Date"),Et=C("File"),Rt=C("Blob"),At=C("FileList"),xt=x=>ne(x)&&O(x.pipe),Tt=x=>{let b;return x&&(typeof FormData=="function"&&x instanceof FormData||O(x.append)&&((b=ee(x))==="formdata"||b==="object"&&O(x.toString)&&x.toString()==="[object FormData]"))},Ot=C("URLSearchParams"),[Ct,kt,Nt,Pt]=["ReadableStream","Request","Response","Headers"].map(C),Dt=x=>x.trim?x.trim():x.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $(x,b,{allOwnKeys:p=!1}={}){if(x===null||typeof x>"u")return;let m,Vn;if(typeof x!="object"&&(x=[x]),B(x))for(m=0,Vn=x.length;m<Vn;m++)b.call(null,x[m],m,x);else{const W=p?Object.getOwnPropertyNames(x):Object.keys(x),R=W.length;let M;for(m=0;m<R;m++)M=W[m],b.call(null,x[M],M,x)}}function Ve(x,b){b=b.toLowerCase();const p=Object.keys(x);let m=p.length,Vn;for(;m-- >0;)if(Vn=p[m],b===Vn.toLowerCase())return Vn;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Je=x=>!H(x)&&x!==L;function fe(){const{caseless:x}=Je(this)&&this||{},b={},p=(m,Vn)=>{const W=x&&Ve(b,Vn)||Vn;G(b[W])&&G(m)?b[W]=fe(b[W],m):G(m)?b[W]=fe({},m):B(m)?b[W]=m.slice():b[W]=m};for(let m=0,Vn=arguments.length;m<Vn;m++)arguments[m]&&$(arguments[m],p);return b}const Ft=(x,b,p,{allOwnKeys:m}={})=>($(b,(Vn,W)=>{p&&O(Vn)?x[W]=$e(Vn,p):x[W]=Vn},{allOwnKeys:m}),x),Lt=x=>(x.charCodeAt(0)===65279&&(x=x.slice(1)),x),Ut=(x,b,p,m)=>{x.prototype=Object.create(b.prototype,m),x.prototype.constructor=x,Object.defineProperty(x,"super",{value:b.prototype}),p&&Object.assign(x.prototype,p)},jt=(x,b,p,m)=>{let Vn,W,R;const M={};if(b=b||{},x==null)return b;do{for(Vn=Object.getOwnPropertyNames(x),W=Vn.length;W-- >0;)R=Vn[W],(!m||m(R,x,b))&&!M[R]&&(b[R]=x[R],M[R]=!0);x=p!==!1&&ye(x)}while(x&&(!p||p(x,b))&&x!==Object.prototype);return b},Bt=(x,b,p)=>{x=String(x),(p===void 0||p>x.length)&&(p=x.length),p-=b.length;const m=x.indexOf(b,p);return m!==-1&&m===p},vt=x=>{if(!x)return null;if(B(x))return x;let b=x.length;if(!We(b))return null;const p=new Array(b);for(;b-- >0;)p[b]=x[b];return p},It=(x=>b=>x&&b instanceof x)(typeof Uint8Array<"u"&&ye(Uint8Array)),qt=(x,b)=>{const p=(x&&x[Symbol.iterator]).call(x);let m;for(;(m=p.next())&&!m.done;){const Vn=m.value;b.call(x,Vn[0],Vn[1])}},Mt=(x,b)=>{let p;const m=[];for(;(p=x.exec(b))!==null;)m.push(p);return m},Ht=C("HTMLFormElement"),$t=x=>x.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(b,p,m){return p.toUpperCase()+m}),Te=(({hasOwnProperty:x})=>(b,p)=>x.call(b,p))(Object.prototype),zt=C("RegExp"),Ge=(x,b)=>{const p=Object.getOwnPropertyDescriptors(x),m={};$(p,(Vn,W)=>{let R;(R=b(Vn,W,x))!==!1&&(m[W]=R||Vn)}),Object.defineProperties(x,m)},Wt=x=>{Ge(x,(b,p)=>{if(O(x)&&["arguments","caller","callee"].indexOf(p)!==-1)return!1;const m=x[p];if(O(m)){if(b.enumerable=!1,"writable"in b){b.writable=!1;return}b.set||(b.set=()=>{throw Error("Can not rewrite read-only method '"+p+"'")})}})},Vt=(x,b)=>{const p={},m=Vn=>{Vn.forEach(W=>{p[W]=!0})};return B(x)?m(x):m(String(x).split(b)),p},Jt=()=>{},Gt=(x,b)=>x!=null&&Number.isFinite(x=+x)?x:b,ce="abcdefghijklmnopqrstuvwxyz",Oe="0123456789",Ke={DIGIT:Oe,ALPHA:ce,ALPHA_DIGIT:ce+ce.toUpperCase()+Oe},Kt=(x=16,b=Ke.ALPHA_DIGIT)=>{let p="";const{length:m}=b;for(;x--;)p+=b[Math.random()*m|0];return p};function Xt(x){return!!(x&&O(x.append)&&x[Symbol.toStringTag]==="FormData"&&x[Symbol.iterator])}const Qt=x=>{const b=new Array(10),p=(m,Vn)=>{if(ne(m)){if(b.indexOf(m)>=0)return;if(!("toJSON"in m)){b[Vn]=m;const W=B(m)?[]:{};return $(m,(R,M)=>{const l=p(R,Vn+1);!H(l)&&(W[M]=l)}),b[Vn]=void 0,W}}return m};return p(x,0)},Yt=C("AsyncFunction"),Zt=x=>x&&(ne(x)||O(x))&&O(x.then)&&O(x.catch),Xe=((x,b)=>x?setImmediate:b?((p,m)=>(L.addEventListener("message",({source:Vn,data:W})=>{Vn===L&&W===p&&m.length&&m.shift()()},!1),Vn=>{m.push(Vn),L.postMessage(p,"*")}))(`axios@${Math.random()}`,[]):p=>setTimeout(p))(typeof setImmediate=="function",O(L.postMessage)),en=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Xe,c={isArray:B,isArrayBuffer:ze,isBuffer:_t,isFormData:Tt,isArrayBufferView:bt,isString:yt,isNumber:We,isBoolean:wt,isObject:ne,isPlainObject:G,isReadableStream:Ct,isRequest:kt,isResponse:Nt,isHeaders:Pt,isUndefined:H,isDate:St,isFile:Et,isBlob:Rt,isRegExp:zt,isFunction:O,isStream:xt,isURLSearchParams:Ot,isTypedArray:It,isFileList:At,forEach:$,merge:fe,extend:Ft,trim:Dt,stripBOM:Lt,inherits:Ut,toFlatObject:jt,kindOf:ee,kindOfTest:C,endsWith:Bt,toArray:vt,forEachEntry:qt,matchAll:Mt,isHTMLForm:Ht,hasOwnProperty:Te,hasOwnProp:Te,reduceDescriptors:Ge,freezeMethods:Wt,toObjectSet:Vt,toCamelCase:$t,noop:Jt,toFiniteNumber:Gt,findKey:Ve,global:L,isContextDefined:Je,ALPHABET:Ke,generateString:Kt,isSpecCompliantForm:Xt,toJSONObject:Qt,isAsyncFn:Yt,isThenable:Zt,setImmediate:Xe,asap:en};function g(x,b,p,m,Vn){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=x,this.name="AxiosError",b&&(this.code=b),p&&(this.config=p),m&&(this.request=m),Vn&&(this.response=Vn,this.status=Vn.status?Vn.status:null)}c.inherits(g,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}});const Qe=g.prototype,Ye={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(x=>{Ye[x]={value:x}}),Object.defineProperties(g,Ye),Object.defineProperty(Qe,"isAxiosError",{value:!0}),g.from=(x,b,p,m,Vn,W)=>{const R=Object.create(Qe);return c.toFlatObject(x,R,function(M){return M!==Error.prototype},M=>M!=="isAxiosError"),g.call(R,x.message,b,p,m,Vn),R.cause=x,R.name=x.name,W&&Object.assign(R,W),R};const tn=null;function de(x){return c.isPlainObject(x)||c.isArray(x)}function Ze(x){return c.endsWith(x,"[]")?x.slice(0,-2):x}function Ce(x,b,p){return x?x.concat(b).map(function(m,Vn){return m=Ze(m),!p&&Vn?"["+m+"]":m}).join(p?".":""):b}function nn(x){return c.isArray(x)&&!x.some(de)}const sn=c.toFlatObject(c,{},null,function(x){return/^is[A-Z]/.test(x)});function se(x,b,p){if(!c.isObject(x))throw new TypeError("target must be an object");b=b||new FormData,p=c.toFlatObject(p,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!c.isUndefined(e[t])});const m=p.metaTokens,Vn=p.visitor||u,W=p.dots,R=p.indexes,M=(p.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(b);if(!c.isFunction(Vn))throw new TypeError("visitor must be a function");function l(t){if(t===null)return"";if(c.isDate(t))return t.toISOString();if(!M&&c.isBlob(t))throw new g("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(t)||c.isTypedArray(t)?M&&typeof Blob=="function"?new Blob([t]):Buffer.from(t):t}function u(t,e,n){let a=t;if(t&&!n&&typeof t=="object"){if(c.endsWith(e,"{}"))e=m?e:e.slice(0,-2),t=JSON.stringify(t);else if(c.isArray(t)&&nn(t)||(c.isFileList(t)||c.endsWith(e,"[]"))&&(a=c.toArray(t)))return e=Ze(e),a.forEach(function(d,f){!(c.isUndefined(d)||d===null)&&b.append(R===!0?Ce([e],f,W):R===null?e:e+"[]",l(d))}),!1}return de(t)?!0:(b.append(Ce(n,e,W),l(t)),!1)}const o=[],i=Object.assign(sn,{defaultVisitor:u,convertValue:l,isVisitable:de});function r(t,e){if(!c.isUndefined(t)){if(o.indexOf(t)!==-1)throw Error("Circular reference detected in "+e.join("."));o.push(t),c.forEach(t,function(n,a){(!(c.isUndefined(n)||n===null)&&Vn.call(b,n,c.isString(a)?a.trim():a,e,i))===!0&&r(n,e?e.concat(a):[a])}),o.pop()}}if(!c.isObject(x))throw new TypeError("data must be an object");return r(x),b}function ke(x){const b={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(x).replace(/[!'()~]|%20|%00/g,function(p){return b[p]})}function we(x,b){this._pairs=[],x&&se(x,this,b)}const et=we.prototype;et.append=function(x,b){this._pairs.push([x,b])},et.toString=function(x){const b=x?function(p){return x.call(this,p,ke)}:ke;return this._pairs.map(function(p){return b(p[0])+"="+b(p[1])},"").join("&")};function rn(x){return encodeURIComponent(x).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tt(x,b,p){if(!b)return x;const m=p&&p.encode||rn;c.isFunction(p)&&(p={serialize:p});const Vn=p&&p.serialize;let W;if(Vn?W=Vn(b,p):W=c.isURLSearchParams(b)?b.toString():new we(b,p).toString(m),W){const R=x.indexOf("#");R!==-1&&(x=x.slice(0,R)),x+=(x.indexOf("?")===-1?"?":"&")+W}return x}class Ne{constructor(){this.handlers=[]}use(b,p,m){return this.handlers.push({fulfilled:b,rejected:p,synchronous:m?m.synchronous:!1,runWhen:m?m.runWhen:null}),this.handlers.length-1}eject(b){this.handlers[b]&&(this.handlers[b]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(b){c.forEach(this.handlers,function(p){p!==null&&b(p)})}}const nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},on=typeof URLSearchParams<"u"?URLSearchParams:we,cn=typeof FormData<"u"?FormData:null,an=typeof Blob<"u"?Blob:null,ln={isBrowser:!0,classes:{URLSearchParams:on,FormData:cn,Blob:an},protocols:["http","https","file","blob","url","data"]},Se=typeof window<"u"&&typeof document<"u",he=typeof navigator=="object"&&navigator||void 0,un=Se&&(!he||["ReactNative","NativeScript","NS"].indexOf(he.product)<0),fn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dn=Se&&window.location.href||"http://localhost",hn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Se,hasStandardBrowserEnv:un,hasStandardBrowserWebWorkerEnv:fn,navigator:he,origin:dn},Symbol.toStringTag,{value:"Module"})),A={...hn,...ln};function pn(x,b){return se(x,new A.classes.URLSearchParams,Object.assign({visitor:function(p,m,Vn,W){return A.isNode&&c.isBuffer(p)?(this.append(m,p.toString("base64")),!1):W.defaultVisitor.apply(this,arguments)}},b))}function mn(x){return c.matchAll(/\w+|\[(\w*)]/g,x).map(b=>b[0]==="[]"?"":b[1]||b[0])}function gn(x){const b={},p=Object.keys(x);let m;const Vn=p.length;let W;for(m=0;m<Vn;m++)W=p[m],b[W]=x[W];return b}function st(x){function b(p,m,Vn,W){let R=p[W++];if(R==="__proto__")return!0;const M=Number.isFinite(+R),l=W>=p.length;return R=!R&&c.isArray(Vn)?Vn.length:R,l?(c.hasOwnProp(Vn,R)?Vn[R]=[Vn[R],m]:Vn[R]=m,!M):((!Vn[R]||!c.isObject(Vn[R]))&&(Vn[R]=[]),b(p,m,Vn[R],W)&&c.isArray(Vn[R])&&(Vn[R]=gn(Vn[R])),!M)}if(c.isFormData(x)&&c.isFunction(x.entries)){const p={};return c.forEachEntry(x,(m,Vn)=>{b(mn(m),Vn,p,0)}),p}return null}function _n(x,b,p){if(c.isString(x))try{return(b||JSON.parse)(x),c.trim(x)}catch(m){if(m.name!=="SyntaxError")throw m}return(0,JSON.stringify)(x)}const z={transitional:nt,adapter:["xhr","http","fetch"],transformRequest:[function(x,b){const p=b.getContentType()||"",m=p.indexOf("application/json")>-1,Vn=c.isObject(x);if(Vn&&c.isHTMLForm(x)&&(x=new FormData(x)),c.isFormData(x))return m?JSON.stringify(st(x)):x;if(c.isArrayBuffer(x)||c.isBuffer(x)||c.isStream(x)||c.isFile(x)||c.isBlob(x)||c.isReadableStream(x))return x;if(c.isArrayBufferView(x))return x.buffer;if(c.isURLSearchParams(x))return b.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),x.toString();let W;if(Vn){if(p.indexOf("application/x-www-form-urlencoded")>-1)return pn(x,this.formSerializer).toString();if((W=c.isFileList(x))||p.indexOf("multipart/form-data")>-1){const R=this.env&&this.env.FormData;return se(W?{"files[]":x}:x,R&&new R,this.formSerializer)}}return Vn||m?(b.setContentType("application/json",!1),_n(x)):x}],transformResponse:[function(x){const b=this.transitional||z.transitional,p=b&&b.forcedJSONParsing,m=this.responseType==="json";if(c.isResponse(x)||c.isReadableStream(x))return x;if(x&&c.isString(x)&&(p&&!this.responseType||m)){const Vn=!(b&&b.silentJSONParsing)&&m;try{return JSON.parse(x)}catch(W){if(Vn)throw W.name==="SyntaxError"?g.from(W,g.ERR_BAD_RESPONSE,this,null,this.response):W}}return x}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(x){return x>=200&&x<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],x=>{z.headers[x]={}});const bn=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yn=x=>{const b={};let p,m,Vn;return x&&x.split(`
1102
+ `).forEach(function(W){Vn=W.indexOf(":"),p=W.substring(0,Vn).trim().toLowerCase(),m=W.substring(Vn+1).trim(),!(!p||b[p]&&bn[p])&&(p==="set-cookie"?b[p]?b[p].push(m):b[p]=[m]:b[p]=b[p]?b[p]+", "+m:m)}),b},Pe=Symbol("internals");function I(x){return x&&String(x).trim().toLowerCase()}function K(x){return x===!1||x==null?x:c.isArray(x)?x.map(K):String(x)}function wn(x){const b=Object.create(null),p=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let m;for(;m=p.exec(x);)b[m[1]]=m[2];return b}const Sn=x=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(x.trim());function ae(x,b,p,m,Vn){if(c.isFunction(m))return m.call(this,b,p);if(Vn&&(b=p),!!c.isString(b)){if(c.isString(m))return b.indexOf(m)!==-1;if(c.isRegExp(m))return m.test(b)}}function En(x){return x.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(b,p,m)=>p.toUpperCase()+m)}function Rn(x,b){const p=c.toCamelCase(" "+b);["get","set","has"].forEach(m=>{Object.defineProperty(x,m+p,{value:function(Vn,W,R){return this[m].call(this,b,Vn,W,R)},configurable:!0})})}class T{constructor(b){b&&this.set(b)}set(b,p,m){const Vn=this;function W(M,l,u){const o=I(l);if(!o)throw new Error("header name must be a non-empty string");const i=c.findKey(Vn,o);(!i||Vn[i]===void 0||u===!0||u===void 0&&Vn[i]!==!1)&&(Vn[i||l]=K(M))}const R=(M,l)=>c.forEach(M,(u,o)=>W(u,o,l));if(c.isPlainObject(b)||b instanceof this.constructor)R(b,p);else if(c.isString(b)&&(b=b.trim())&&!Sn(b))R(yn(b),p);else if(c.isHeaders(b))for(const[M,l]of b.entries())W(l,M,m);else b!=null&&W(p,b,m);return this}get(b,p){if(b=I(b),b){const m=c.findKey(this,b);if(m){const Vn=this[m];if(!p)return Vn;if(p===!0)return wn(Vn);if(c.isFunction(p))return p.call(this,Vn,m);if(c.isRegExp(p))return p.exec(Vn);throw new TypeError("parser must be boolean|regexp|function")}}}has(b,p){if(b=I(b),b){const m=c.findKey(this,b);return!!(m&&this[m]!==void 0&&(!p||ae(this,this[m],m,p)))}return!1}delete(b,p){const m=this;let Vn=!1;function W(R){if(R=I(R),R){const M=c.findKey(m,R);M&&(!p||ae(m,m[M],M,p))&&(delete m[M],Vn=!0)}}return c.isArray(b)?b.forEach(W):W(b),Vn}clear(b){const p=Object.keys(this);let m=p.length,Vn=!1;for(;m--;){const W=p[m];(!b||ae(this,this[W],W,b,!0))&&(delete this[W],Vn=!0)}return Vn}normalize(b){const p=this,m={};return c.forEach(this,(Vn,W)=>{const R=c.findKey(m,W);if(R){p[R]=K(Vn),delete p[W];return}const M=b?En(W):String(W).trim();M!==W&&delete p[W],p[M]=K(Vn),m[M]=!0}),this}concat(...b){return this.constructor.concat(this,...b)}toJSON(b){const p=Object.create(null);return c.forEach(this,(m,Vn)=>{m!=null&&m!==!1&&(p[Vn]=b&&c.isArray(m)?m.join(", "):m)}),p}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([b,p])=>b+": "+p).join(`
1103
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(b){return b instanceof this?b:new this(b)}static concat(b,...p){const m=new this(b);return p.forEach(Vn=>m.set(Vn)),m}static accessor(b){const p=(this[Pe]=this[Pe]={accessors:{}}).accessors,m=this.prototype;function Vn(W){const R=I(W);p[R]||(Rn(m,W),p[R]=!0)}return c.isArray(b)?b.forEach(Vn):Vn(b),this}}T.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(T.prototype,({value:x},b)=>{let p=b[0].toUpperCase()+b.slice(1);return{get:()=>x,set(m){this[p]=m}}}),c.freezeMethods(T);function le(x,b){const p=this||z,m=b||p,Vn=T.from(m.headers);let W=m.data;return c.forEach(x,function(R){W=R.call(p,W,Vn.normalize(),b?b.status:void 0)}),Vn.normalize(),W}function rt(x){return!!(x&&x.__CANCEL__)}function v(x,b,p){g.call(this,x??"canceled",g.ERR_CANCELED,b,p),this.name="CanceledError"}c.inherits(v,g,{__CANCEL__:!0});function it(x,b,p){const m=p.config.validateStatus;!p.status||!m||m(p.status)?x(p):b(new g("Request failed with status code "+p.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(p.status/100)-4],p.config,p.request,p))}function An(x){const b=/^([-+\w]{1,25})(:?\/\/|:)/.exec(x);return b&&b[1]||""}function xn(x,b){x=x||10;const p=new Array(x),m=new Array(x);let Vn=0,W=0,R;return b=b!==void 0?b:1e3,function(M){const l=Date.now(),u=m[W];R||(R=l),p[Vn]=M,m[Vn]=l;let o=W,i=0;for(;o!==Vn;)i+=p[o++],o=o%x;if(Vn=(Vn+1)%x,Vn===W&&(W=(W+1)%x),l-R<b)return;const r=u&&l-u;return r?Math.round(i*1e3/r):void 0}}function Tn(x,b){let p=0,m=1e3/b,Vn,W;const R=(M,l=Date.now())=>{p=l,Vn=null,W&&(clearTimeout(W),W=null),x.apply(null,M)};return[(...M)=>{const l=Date.now(),u=l-p;u>=m?R(M,l):(Vn=M,W||(W=setTimeout(()=>{W=null,R(Vn)},m-u)))},()=>Vn&&R(Vn)]}const Y=(x,b,p=3)=>{let m=0;const Vn=xn(50,250);return Tn(W=>{const R=W.loaded,M=W.lengthComputable?W.total:void 0,l=R-m,u=Vn(l),o=R<=M;m=R;const i={loaded:R,total:M,progress:M?R/M:void 0,bytes:l,rate:u||void 0,estimated:u&&M&&o?(M-R)/u:void 0,event:W,lengthComputable:M!=null,[b?"download":"upload"]:!0};x(i)},p)},De=(x,b)=>{const p=x!=null;return[m=>b[0]({lengthComputable:p,total:x,loaded:m}),b[1]]},Fe=x=>(...b)=>c.asap(()=>x(...b)),On=A.hasStandardBrowserEnv?((x,b)=>p=>(p=new URL(p,A.origin),x.protocol===p.protocol&&x.host===p.host&&(b||x.port===p.port)))(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0,Cn=A.hasStandardBrowserEnv?{write(x,b,p,m,Vn,W){const R=[x+"="+encodeURIComponent(b)];c.isNumber(p)&&R.push("expires="+new Date(p).toGMTString()),c.isString(m)&&R.push("path="+m),c.isString(Vn)&&R.push("domain="+Vn),W===!0&&R.push("secure"),document.cookie=R.join("; ")},read(x){const b=document.cookie.match(new RegExp("(^|;\\s*)("+x+")=([^;]*)"));return b?decodeURIComponent(b[3]):null},remove(x){this.write(x,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function kn(x){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(x)}function Nn(x,b){return b?x.replace(/\/?\/$/,"")+"/"+b.replace(/^\/+/,""):x}function ot(x,b){return x&&!kn(b)?Nn(x,b):b}const Le=x=>x instanceof T?{...x}:x;function j(x,b){b=b||{};const p={};function m(u,o,i,r){return c.isPlainObject(u)&&c.isPlainObject(o)?c.merge.call({caseless:r},u,o):c.isPlainObject(o)?c.merge({},o):c.isArray(o)?o.slice():o}function Vn(u,o,i,r){if(c.isUndefined(o)){if(!c.isUndefined(u))return m(void 0,u,i,r)}else return m(u,o,i,r)}function W(u,o){if(!c.isUndefined(o))return m(void 0,o)}function R(u,o){if(c.isUndefined(o)){if(!c.isUndefined(u))return m(void 0,u)}else return m(void 0,o)}function M(u,o,i){if(i in b)return m(u,o);if(i in x)return m(void 0,u)}const l={url:W,method:W,data:W,baseURL:R,transformRequest:R,transformResponse:R,paramsSerializer:R,timeout:R,timeoutMessage:R,withCredentials:R,withXSRFToken:R,adapter:R,responseType:R,xsrfCookieName:R,xsrfHeaderName:R,onUploadProgress:R,onDownloadProgress:R,decompress:R,maxContentLength:R,maxBodyLength:R,beforeRedirect:R,transport:R,httpAgent:R,httpsAgent:R,cancelToken:R,socketPath:R,responseEncoding:R,validateStatus:M,headers:(u,o,i)=>Vn(Le(u),Le(o),i,!0)};return c.forEach(Object.keys(Object.assign({},x,b)),function(u){const o=l[u]||Vn,i=o(x[u],b[u],u);c.isUndefined(i)&&o!==M||(p[u]=i)}),p}const ct=x=>{const b=j({},x);let{data:p,withXSRFToken:m,xsrfHeaderName:Vn,xsrfCookieName:W,headers:R,auth:M}=b;b.headers=R=T.from(R),b.url=tt(ot(b.baseURL,b.url),x.params,x.paramsSerializer),M&&R.set("Authorization","Basic "+btoa((M.username||"")+":"+(M.password?unescape(encodeURIComponent(M.password)):"")));let l;if(c.isFormData(p)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)R.setContentType(void 0);else if((l=R.getContentType())!==!1){const[u,...o]=l?l.split(";").map(i=>i.trim()).filter(Boolean):[];R.setContentType([u||"multipart/form-data",...o].join("; "))}}if(A.hasStandardBrowserEnv&&(m&&c.isFunction(m)&&(m=m(b)),m||m!==!1&&On(b.url))){const u=Vn&&W&&Cn.read(W);u&&R.set(Vn,u)}return b},Pn=typeof XMLHttpRequest<"u",Dn=Pn&&function(x){return new Promise(function(b,p){const m=ct(x);let Vn=m.data;const W=T.from(m.headers).normalize();let{responseType:R,onUploadProgress:M,onDownloadProgress:l}=m,u,o,i,r,t;function e(){r&&r(),t&&t(),m.cancelToken&&m.cancelToken.unsubscribe(u),m.signal&&m.signal.removeEventListener("abort",u)}let n=new XMLHttpRequest;n.open(m.method.toUpperCase(),m.url,!0),n.timeout=m.timeout;function a(){if(!n)return;const f=T.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),oe={data:!R||R==="text"||R==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:f,config:x,request:n};it(function(F){b(F),e()},function(F){p(F),e()},oe),n=null}"onloadend"in n?n.onloadend=a:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(a)},n.onabort=function(){n&&(p(new g("Request aborted",g.ECONNABORTED,x,n)),n=null)},n.onerror=function(){p(new g("Network Error",g.ERR_NETWORK,x,n)),n=null},n.ontimeout=function(){let f=m.timeout?"timeout of "+m.timeout+"ms exceeded":"timeout exceeded";const oe=m.transitional||nt;m.timeoutErrorMessage&&(f=m.timeoutErrorMessage),p(new g(f,oe.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,x,n)),n=null},Vn===void 0&&W.setContentType(null),"setRequestHeader"in n&&c.forEach(W.toJSON(),function(f,oe){n.setRequestHeader(oe,f)}),c.isUndefined(m.withCredentials)||(n.withCredentials=!!m.withCredentials),R&&R!=="json"&&(n.responseType=m.responseType),l&&([i,t]=Y(l,!0),n.addEventListener("progress",i)),M&&n.upload&&([o,r]=Y(M),n.upload.addEventListener("progress",o),n.upload.addEventListener("loadend",r)),(m.cancelToken||m.signal)&&(u=f=>{n&&(p(!f||f.type?new v(null,x,n):f),n.abort(),n=null)},m.cancelToken&&m.cancelToken.subscribe(u),m.signal&&(m.signal.aborted?u():m.signal.addEventListener("abort",u)));const d=An(m.url);if(d&&A.protocols.indexOf(d)===-1){p(new g("Unsupported protocol "+d+":",g.ERR_BAD_REQUEST,x));return}n.send(Vn||null)})},Fn=(x,b)=>{const{length:p}=x=x?x.filter(Boolean):[];if(b||p){let m=new AbortController,Vn;const W=function(u){if(!Vn){Vn=!0,M();const o=u instanceof Error?u:this.reason;m.abort(o instanceof g?o:new v(o instanceof Error?o.message:o))}};let R=b&&setTimeout(()=>{R=null,W(new g(`timeout ${b} of ms exceeded`,g.ETIMEDOUT))},b);const M=()=>{x&&(R&&clearTimeout(R),R=null,x.forEach(u=>{u.unsubscribe?u.unsubscribe(W):u.removeEventListener("abort",W)}),x=null)};x.forEach(u=>u.addEventListener("abort",W));const{signal:l}=m;return l.unsubscribe=()=>c.asap(M),l}},Ln=function*(x,b){let p=x.byteLength;if(p<b){yield x;return}let m=0,Vn;for(;m<p;)Vn=m+b,yield x.slice(m,Vn),m=Vn},Un=async function*(x,b){for await(const p of jn(x))yield*Ln(p,b)},jn=async function*(x){if(x[Symbol.asyncIterator]){yield*x;return}const b=x.getReader();try{for(;;){const{done:p,value:m}=await b.read();if(p)break;yield m}}finally{await b.cancel()}},Ue=(x,b,p,m)=>{const Vn=Un(x,b);let W=0,R,M=l=>{R||(R=!0,m&&m(l))};return new ReadableStream({async pull(l){try{const{done:u,value:o}=await Vn.next();if(u){M(),l.close();return}let i=o.byteLength;if(p){let r=W+=i;p(r)}l.enqueue(new Uint8Array(o))}catch(u){throw M(u),u}},cancel(l){return M(l),Vn.return()}},{highWaterMark:2})},re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",at=re&&typeof ReadableStream=="function",Bn=re&&(typeof TextEncoder=="function"?(x=>b=>x.encode(b))(new TextEncoder):async x=>new Uint8Array(await new Response(x).arrayBuffer())),lt=(x,...b)=>{try{return!!x(...b)}catch{return!1}},vn=at&&lt(()=>{let x=!1;const b=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return x=!0,"half"}}).headers.has("Content-Type");return x&&!b}),je=64*1024,pe=at&&lt(()=>c.isReadableStream(new Response("").body)),Z={stream:pe&&(x=>x.body)};re&&(x=>{["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!Z[b]&&(Z[b]=c.isFunction(x[b])?p=>p[b]():(p,m)=>{throw new g(`Response type '${b}' is not supported`,g.ERR_NOT_SUPPORT,m)})})})(new Response);const In=async x=>{if(x==null)return 0;if(c.isBlob(x))return x.size;if(c.isSpecCompliantForm(x))return(await new Request(A.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(c.isArrayBufferView(x)||c.isArrayBuffer(x))return x.byteLength;if(c.isURLSearchParams(x)&&(x=x+""),c.isString(x))return(await Bn(x)).byteLength},qn=async(x,b)=>c.toFiniteNumber(x.getContentLength())??In(b),Mn=re&&(async x=>{let{url:b,method:p,data:m,signal:Vn,cancelToken:W,timeout:R,onDownloadProgress:M,onUploadProgress:l,responseType:u,headers:o,withCredentials:i="same-origin",fetchOptions:r}=ct(x);u=u?(u+"").toLowerCase():"text";let t=Fn([Vn,W&&W.toAbortSignal()],R),e;const n=t&&t.unsubscribe&&(()=>{t.unsubscribe()});let a;try{if(l&&vn&&p!=="get"&&p!=="head"&&(a=await qn(o,m))!==0){let _=new Request(b,{method:"POST",body:m,duplex:"half"}),S;if(c.isFormData(m)&&(S=_.headers.get("content-type"))&&o.setContentType(S),_.body){const[xe,He]=De(a,Y(Fe(l)));m=Ue(_.body,je,xe,He)}}c.isString(i)||(i=i?"include":"omit");const d="credentials"in Request.prototype;e=new Request(b,{...r,signal:t,method:p.toUpperCase(),headers:o.normalize().toJSON(),body:m,duplex:"half",credentials:d?i:void 0});let f=await fetch(e);const oe=pe&&(u==="stream"||u==="response");if(pe&&(M||oe&&n)){const _={};["status","statusText","headers"].forEach(Ae=>{_[Ae]=f[Ae]});const S=c.toFiniteNumber(f.headers.get("content-length")),[xe,He]=M&&De(S,Y(Fe(M),!0))||[];f=new Response(Ue(f.body,je,xe,()=>{He&&He(),n&&n()}),_)}u=u||"text";let F=await Z[c.findKey(Z,u)||"text"](f,x);return!oe&&n&&n(),await new Promise((_,S)=>{it(_,S,{data:F,headers:T.from(f.headers),status:f.status,statusText:f.statusText,config:x,request:e})})}catch(d){throw n&&n(),d&&d.name==="TypeError"&&/fetch/i.test(d.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,x,e),{cause:d.cause||d}):g.from(d,d&&d.code,x,e)}}),me={http:tn,xhr:Dn,fetch:Mn};c.forEach(me,(x,b)=>{if(x){try{Object.defineProperty(x,"name",{value:b})}catch{}Object.defineProperty(x,"adapterName",{value:b})}});const Be=x=>`- ${x}`,Hn=x=>c.isFunction(x)||x===null||x===!1,ut={getAdapter:x=>{x=c.isArray(x)?x:[x];const{length:b}=x;let p,m;const Vn={};for(let W=0;W<b;W++){p=x[W];let R;if(m=p,!Hn(p)&&(m=me[(R=String(p)).toLowerCase()],m===void 0))throw new g(`Unknown adapter '${R}'`);if(m)break;Vn[R||"#"+W]=m}if(!m){const W=Object.entries(Vn).map(([M,l])=>`adapter ${M} `+(l===!1?"is not supported by the environment":"is not available in the build"));let R=b?W.length>1?`since :
1104
+ `+W.map(Be).join(`
1105
+ `):" "+Be(W[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+R,"ERR_NOT_SUPPORT")}return m},adapters:me};function ue(x){if(x.cancelToken&&x.cancelToken.throwIfRequested(),x.signal&&x.signal.aborted)throw new v(null,x)}function ve(x){return ue(x),x.headers=T.from(x.headers),x.data=le.call(x,x.transformRequest),["post","put","patch"].indexOf(x.method)!==-1&&x.headers.setContentType("application/x-www-form-urlencoded",!1),ut.getAdapter(x.adapter||z.adapter)(x).then(function(b){return ue(x),b.data=le.call(x,x.transformResponse,b),b.headers=T.from(b.headers),b},function(b){return rt(b)||(ue(x),b&&b.response&&(b.response.data=le.call(x,x.transformResponse,b.response),b.response.headers=T.from(b.response.headers))),Promise.reject(b)})}const ft="1.7.9",ie={};["object","boolean","number","function","string","symbol"].forEach((x,b)=>{ie[x]=function(p){return typeof p===x||"a"+(b<1?"n ":" ")+x}});const Ie={};ie.transitional=function(x,b,p){function m(Vn,W){return"[Axios v"+ft+"] Transitional option '"+Vn+"'"+W+(p?". "+p:"")}return(Vn,W,R)=>{if(x===!1)throw new g(m(W," has been removed"+(b?" in "+b:"")),g.ERR_DEPRECATED);return b&&!Ie[W]&&(Ie[W]=!0,console.warn(m(W," has been deprecated since v"+b+" and will be removed in the near future"))),x?x(Vn,W,R):!0}},ie.spelling=function(x){return(b,p)=>(console.warn(`${p} is likely a misspelling of ${x}`),!0)};function $n(x,b,p){if(typeof x!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const m=Object.keys(x);let Vn=m.length;for(;Vn-- >0;){const W=m[Vn],R=b[W];if(R){const M=x[W],l=M===void 0||R(M,W,x);if(l!==!0)throw new g("option "+W+" must be "+l,g.ERR_BAD_OPTION_VALUE);continue}if(p!==!0)throw new g("Unknown option "+W,g.ERR_BAD_OPTION)}}const X={assertOptions:$n,validators:ie},k=X.validators;class U{constructor(b){this.defaults=b,this.interceptors={request:new Ne,response:new Ne}}async request(b,p){try{return await this._request(b,p)}catch(m){if(m instanceof Error){let Vn={};Error.captureStackTrace?Error.captureStackTrace(Vn):Vn=new Error;const W=Vn.stack?Vn.stack.replace(/^.+\n/,""):"";try{m.stack?W&&!String(m.stack).endsWith(W.replace(/^.+\n.+\n/,""))&&(m.stack+=`
1106
+ `+W):m.stack=W}catch{}}throw m}}_request(b,p){typeof b=="string"?(p=p||{},p.url=b):p=b||{},p=j(this.defaults,p);const{transitional:m,paramsSerializer:Vn,headers:W}=p;m!==void 0&&X.assertOptions(m,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),Vn!=null&&(c.isFunction(Vn)?p.paramsSerializer={serialize:Vn}:X.assertOptions(Vn,{encode:k.function,serialize:k.function},!0)),X.assertOptions(p,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),p.method=(p.method||this.defaults.method||"get").toLowerCase();let R=W&&c.merge(W.common,W[p.method]);W&&c.forEach(["delete","get","head","post","put","patch","common"],e=>{delete W[e]}),p.headers=T.concat(R,W);const M=[];let l=!0;this.interceptors.request.forEach(function(e){typeof e.runWhen=="function"&&e.runWhen(p)===!1||(l=l&&e.synchronous,M.unshift(e.fulfilled,e.rejected))});const u=[];this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let o,i=0,r;if(!l){const e=[ve.bind(this),void 0];for(e.unshift.apply(e,M),e.push.apply(e,u),r=e.length,o=Promise.resolve(p);i<r;)o=o.then(e[i++],e[i++]);return o}r=M.length;let t=p;for(i=0;i<r;){const e=M[i++],n=M[i++];try{t=e(t)}catch(a){n.call(this,a);break}}try{o=ve.call(this,t)}catch(e){return Promise.reject(e)}for(i=0,r=u.length;i<r;)o=o.then(u[i++],u[i++]);return o}getUri(b){b=j(this.defaults,b);const p=ot(b.baseURL,b.url);return tt(p,b.params,b.paramsSerializer)}}c.forEach(["delete","get","head","options"],function(x){U.prototype[x]=function(b,p){return this.request(j(p||{},{method:x,url:b,data:(p||{}).data}))}}),c.forEach(["post","put","patch"],function(x){function b(p){return function(m,Vn,W){return this.request(j(W||{},{method:x,headers:p?{"Content-Type":"multipart/form-data"}:{},url:m,data:Vn}))}}U.prototype[x]=b(),U.prototype[x+"Form"]=b(!0)});class Ee{constructor(b){if(typeof b!="function")throw new TypeError("executor must be a function.");let p;this.promise=new Promise(function(Vn){p=Vn});const m=this;this.promise.then(Vn=>{if(!m._listeners)return;let W=m._listeners.length;for(;W-- >0;)m._listeners[W](Vn);m._listeners=null}),this.promise.then=Vn=>{let W;const R=new Promise(M=>{m.subscribe(M),W=M}).then(Vn);return R.cancel=function(){m.unsubscribe(W)},R},b(function(Vn,W,R){m.reason||(m.reason=new v(Vn,W,R),p(m.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(b){if(this.reason){b(this.reason);return}this._listeners?this._listeners.push(b):this._listeners=[b]}unsubscribe(b){if(!this._listeners)return;const p=this._listeners.indexOf(b);p!==-1&&this._listeners.splice(p,1)}toAbortSignal(){const b=new AbortController,p=m=>{b.abort(m)};return this.subscribe(p),b.signal.unsubscribe=()=>this.unsubscribe(p),b.signal}static source(){let b;return{token:new Ee(function(p){b=p}),cancel:b}}}function zn(x){return function(b){return x.apply(null,b)}}function Wn(x){return c.isObject(x)&&x.isAxiosError===!0}const ge={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ge).forEach(([x,b])=>{ge[b]=x});function dt(x){const b=new U(x),p=$e(U.prototype.request,b);return c.extend(p,U.prototype,b,{allOwnKeys:!0}),c.extend(p,b,null,{allOwnKeys:!0}),p.create=function(m){return dt(j(x,m))},p}const E=dt(z);E.Axios=U,E.CanceledError=v,E.CancelToken=Ee,E.isCancel=rt,E.VERSION=ft,E.toFormData=se,E.AxiosError=g,E.Cancel=E.CanceledError,E.all=function(x){return Promise.all(x)},E.spread=zn,E.isAxiosError=Wn,E.mergeConfig=j,E.AxiosHeaders=T,E.formToJSON=x=>st(c.isHTMLForm(x)?new FormData(x):x),E.getAdapter=ut.getAdapter,E.HttpStatusCode=ge,E.default=E;const Re=E.create({baseURL:location.origin,timeout:6e4,params:{}});Re.interceptors.response.use(x=>x,x=>{var b,p,m,Vn,W,R,M,l,u,o,i;if(x.response){if(x.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(e){e&&OpenC3Auth.setTokens()}),x.response.config.headers["Ignore-Errors"]&&x.response.config.headers["Ignore-Errors"].includes(x.response.status.toString()))return Promise.reject(x);let r=`HTTP ${x.response.status} - `;(b=x.response)!=null&&b.statusText&&(r+=`${x.response.statusText} `),(m=(p=x.response)==null?void 0:p.config)!=null&&m.data&&(r+=`${x.response.config.data} `),(W=(Vn=x.response)==null?void 0:Vn.data)!=null&&W.message?r+=`${x.response.data.message}`:(M=(R=x.response)==null?void 0:R.data)!=null&&M.exception?r+=`${x.response.data.exception}`:(o=(u=(l=x.response)==null?void 0:l.data)==null?void 0:u.error)!=null&&o.message?(x.response.data.error.class&&(r+=`${x.response.data.error.class} `),r+=`${x.response.data.error.message}`):r+=`${(i=x.response)==null?void 0:i.data}`;const{$cosmosNotify:t}=window;throw t&&t.serious({title:"Network error",body:r}),x}else throw x});const V=async function(x,b,{data:p,params:m={},headers:Vn,noAuth:W=!1,noScope:R=!1,onUploadProgress:M=!1}={}){if(!W){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}Vn.Authorization=localStorage.openc3Token}return Vn.manual=!0,!R&&!m.scope&&(m.scope=window.openc3Scope),Re({method:x,url:b,data:p,params:m,headers:Vn,onUploadProgress:M})},_e={Accept:"application/json"},qe={..._e,"Content-Type":"application/json"},ns={get:function(x,{params:b,headers:p=_e,noScope:m,noAuth:Vn,onUploadProgress:W}={}){return V("get",x,{params:b,headers:p,noScope:m,noAuth:Vn,onUploadProgress:W})},put:function(x,{data:b,params:p,headers:m=qe,noScope:Vn,noAuth:W,onUploadProgress:R}={}){return V("put",x,{data:b,params:p,headers:m,noScope:Vn,noAuth:W,onUploadProgress:R})},post:function(x,{data:b,params:p,headers:m=qe,noScope:Vn,noAuth:W,onUploadProgress:R}={}){return V("post",x,{data:b,params:p,headers:m,noScope:Vn,noAuth:W,onUploadProgress:R})},delete:function(x,{params:b,headers:p=_e,noScope:m,noAuth:Vn,onUploadProgress:W}={}){return V("delete",x,{params:b,headers:p,noScope:m,noAuth:Vn,onUploadProgress:W})}};var ht={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart",remote:"remote"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:q,protocols:be}=ht;be.slice(0,be.length-1);class is{constructor(){D(this,"id",1)}async exec(b,p,m={},Vn={},W=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return m.scope=window.openc3Scope,Vn.manual=!0,(await Re.post("/openc3-api/api",{jsonrpc:"2.0",method:b,params:p,id:this.id,keyword_params:m},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...Vn},timeout:W})).data.result}catch(R){let M=new Error;throw R.response?(M.name=R.response.data.error.data.class,M.message=R.response.data.error.data.message,M.object=R.response.data.error):R.request?(M.name="Request error",M.message="Request error, no response received"):M.name="Unknown error",M}}decode_openc3_type(b){if(b!==null&&typeof b=="object"&&b.json_class=="Float"&&b.raw){if(b.raw=="NaN")return NaN;if(b.raw=="Infinity")return 1/0;if(b.raw=="-Infinity")return-1/0}return null}encode_openc3_type(b){return Number.isNaN(b)?{json_class:"Float",raw:"NaN"}:b==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:b==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(b=>{b&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(b){return this.exec("set_offline_access",[b])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(b,p){return this.exec("map_target_to_interface",[b,p])}connect_interface(b,...p){return p.length>0?this.exec("connect_interface",[b,...p]):this.exec("connect_interface",[b])}disconnect_interface(b){return this.exec("disconnect_interface",[b])}interface_cmd(b,p,...m){return this.exec("interface_cmd",[b,p,...m])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(b){return this.exec("connect_router",[b])}disconnect_router(b){return this.exec("disconnect_router",[b])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(b){return this.exec("get_tlm_cnts",[b])}get_item(b,p,m){return this.exec("get_item",[b,p,m])}get_param(b,p,m){return this.exec("get_param",[b,p,m])}get_parameter(b,p,m){return this.exec("get_param",[b,p,m])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(b){return this.exec("set_limits_set",[b])}get_target(b){return this.exec("get_target",[b])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(b,p){return this.exec("get_tlm",[b,p])}get_telemetry(b,p){return this.exec("get_tlm",[b,p])}get_all_tlm(b){return this.exec("get_all_tlm",[b])}get_all_telemetry(b){return this.exec("get_all_tlm",[b])}get_all_tlm_names(b,p=!1){return this.exec("get_all_tlm_names",[b],{hidden:p})}get_all_telemetry_names(b){return this.exec("get_all_tlm_names",[b])}async get_tlm_packet(b,p,m,Vn=30){const W=await this.exec("get_tlm_packet",[b,p],{type:m,stale_time:Vn});if(W!=null){let R=W.length,M=null;for(let l=0;l<R;l++)M=this.decode_openc3_type(W[l][1]),M!==null&&(W[l][1]=M)}return W}get_packet_derived_items(b,p){return this.exec("get_packet_derived_items",[b,p])}get_tlm_buffer(b,p){return this.exec("get_tlm_buffer",[b,p])}async get_tlm_values(b,p=30,m=null){let Vn={stale_time:p};m!==null&&(Vn.cache_timeout=m);const W=await this.exec("get_tlm_values",[b],Vn,{},1e4);let R=W[0].length,M=null;for(let l=0;l<R;l++)M=this.decode_openc3_type(W[0][l]),M!==null&&(W[0][l]=M);return W}get_limits(b,p,m){return this.exec("get_limits",[b,p,m])}async tlm(b,p,m,Vn="CONVERTED"){let W=null;if(p===void 0)W=await this.exec("tlm",[b]);else if(m===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(p))W=await this.exec("tlm",[b],{type:p});else{let M=new Error;throw M.name="TypeError",M.message=`Invalid data type ${p}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,M}else W=await this.exec("tlm",[b,p,m],{type:Vn});let R=this.decode_openc3_type(W);return R!==null&&(W=R),W}async inject_tlm(b,p,m=null,Vn="CONVERTED"){data=await this.exec("inject_tlm",[b,p,m],{type:Vn})}set_tlm(b,p,m,Vn){return this.exec("set_tlm",[b,p,m],{type:Vn})}override_tlm(b,p,m,Vn){return this.exec("override_tlm",[b,p,m],{type:Vn})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(b,p,m,Vn){return this.exec("normalize_tlm",[b,p,m],{type:Vn})}get_all_cmds(b){return this.exec("get_all_cmds",[b])}get_all_commands(b){return this.exec("get_all_cmds",[b])}get_all_cmd_names(b,p=!1){return this.exec("get_all_cmd_names",[b],{hidden:p})}get_all_command_names(b){return this.exec("get_all_cmd_names",[b])}get_cmd(b,p){return this.exec("get_cmd",[b,p])}get_command(b,p){return this.exec("get_cmd",[b,p])}get_cmd_cnts(b){return this.exec("get_cmd_cnts",[b])}get_cmd_value(b,p,m,Vn="CONVERTED"){return this.exec("get_cmd_value",[b,p,m,Vn])}get_cmd_buffer(b,p){return this.exec("get_cmd_buffer",[b,p])}_cmd(b,p,m,Vn,W){let R=null;for(let M in Vn)Object.prototype.hasOwnProperty.call(Vn,M)&&(R=this.encode_openc3_type(Vn[M]),R!==null&&(Vn[M]=R));return this.exec(b,[p,m,Vn],{},W)}get_cmd_hazardous(b,p,m,Vn={}){return p===void 0?this.exec("get_cmd_hazardous",b,{},Vn):this._cmd("get_cmd_hazardous",b,p,m,Vn)}cmd(b,p,m,Vn={}){return p===void 0?this.exec("cmd",b,{},Vn):this._cmd("cmd",b,p,m,Vn)}cmd_no_range_check(b,p,m,Vn={}){return p===void 0?this.exec("cmd_no_range_check",b,{},Vn):this._cmd("cmd_no_range_check",b,p,m,Vn)}cmd_raw(b,p,m,Vn={}){return p===void 0?this.exec("cmd_raw",b,{},Vn):this._cmd("cmd_raw",b,p,m,Vn)}cmd_raw_no_range_check(b,p,m,Vn={}){return p===void 0?this.exec("cmd_raw_no_range_check",b,{},Vn):this._cmd("cmd_raw_no_range_check",b,p,m,Vn)}cmd_no_hazardous_check(b,p,m,Vn={}){return p===void 0?this.exec("cmd_no_hazardous_check",b,{},Vn):this._cmd("cmd_no_hazardous_check",b,p,m,Vn)}cmd_no_checks(b,p,m,Vn={}){return p===void 0?this.exec("cmd_no_checks",b,{},Vn):this._cmd("cmd_no_checks",b,p,m,Vn)}cmd_raw_no_hazardous_check(b,p,m,Vn={}){return p===void 0?this.exec("cmd_raw_no_hazardous_check",b,{},Vn):this._cmd("cmd_raw_no_hazardous_check",b,p,m,Vn)}cmd_raw_no_checks(b,p,m,Vn={}){return p===void 0?this.exec("cmd_raw_no_checks",b,{},Vn):this._cmd("cmd_raw_no_checks",b,p,m,Vn)}build_cmd(b,p,m){return p===void 0?this.exec("build_cmd",b):this._cmd("build_cmd",b,p,m)}build_command(b,p,m){return p===void 0?this.exec("build_cmd",b):this._cmd("build_cmd",b,p,m)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(b,p){return this.exec("send_raw",[b,p])}list_configs(b){return this.exec("list_configs",[b])}load_config(b,p){return this.exec("load_config",[b,p])}save_config(b,p,m){return this.exec("save_config",[b,p,m])}delete_config(b,p){return this.exec("delete_config",[b,p])}enable_limits(b,p,m){return this.exec("enable_limits",[b,p,m])}disable_limits(b,p,m){return this.exec("disable_limits",[b,p,m])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(b){return this.exec("get_overall_limits_state",[b])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(b){return this.exec("get_setting",[b])}get_settings(b){return this.exec("get_settings",b)}set_setting(b,p){return this.exec("set_setting",[b,p])}save_setting(b,p){return this.exec("set_setting",[b,p])}get_metrics(){return this.exec("get_metrics",[])}async hashString(b){if(window.isSecureContext){const p=new TextEncoder().encode(b),m=await crypto.subtle.digest("SHA-256",p),Vn=new Uint8Array(m);return Array.from(Vn).map(W=>W.toString(16).padStart(2,"0")).join("")}}}const Utilities={methods:{isFloat(x){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(x)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(x))},isInt(x){return!!(/^\s*[-+]?\d+\s*$/.test(x)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(x))},isArray(x){return!!/^\s*\[.*\]\s*$/.test(x)},removeQuotes(x){if(x.length<2)return x;var b=x.charAt(0);if(b!=='"'&&b!=="'")return x;var p=x.charAt(x.length-1);return b!==p?x:x.slice(1,-1)},convertToString(x){var b=0,p="";if(Object.prototype.toString.call(x).slice(8,-1)==="Array"){var m=x.length;for(p="[ ",b=0;b<m;b++)Object.prototype.toString.call(x[b]).slice(8,-1)==="String"?p+='"'+x[b]+'"':p+=x[b],b!==m-1&&(p+=", ");p+=" ]"}else if(Object.prototype.toString.call(x).slice(8,-1)==="Object")if(x.json_class==="String"&&x.raw)for(p="0x",b=0;b<x.raw.length;b++){var Vn=x.raw[b].toString(16).toUpperCase();Vn.length<2&&(Vn="0"+Vn),p+=Vn}else x.json_class==="Float"&&x.raw&&(p=x.raw);else p=String(x);return p}}},_sfc_main$1={mixins:[Utilities],props:{modelValue:{type:[String,Number],default:void 0},states:{type:Object,default:()=>null},statesInHex:{type:Boolean,default:!1}},computed:{textFieldValue(){return this.convertToString(this.modelValue)},stateValue(){return this.statesInHex?"0x"+this.modelValue.toString(16):this.modelValue},selectValue(){return this.modelValue===""?null:this.modelValue},stateOptions(){return this.states?Object.keys(this.states).map(x=>({label:x,...this.states[x]})):null},hazardous(){var x,b;return((b=(x=Object.entries(this.states).find(([p,m])=>m.value===this.modelValue))==null?void 0:x.at(1))==null?void 0:b.hazardous)!==void 0},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},methods:{handleChange(x){this.$emit("update:modelValue",x)}}},_hoisted_1$1={key:1,class:"d-flex align-center"};function _sfc_render$1(x,b,p,m,Vn,W){const R=resolveComponent("v-text-field"),M=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[p.states?(openBlock(),createElementBlock("div",_hoisted_1$1,[createVNode(M,{items:W.stateOptions,"model-value":W.selectValue,"onUpdate:modelValue":W.handleChange,"item-title":"label",class:normalizeClass(W.stateClass),"hide-details":"",density:"compact",variant:"outlined",placeholder:"Select...","min-width":"120px","data-test":"cmd-param-select"},null,8,["items","model-value","onUpdate:modelValue","class"]),createVNode(R,{"model-value":W.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"])])):(openBlock(),createBlock(R,{key:0,"model-value":W.textFieldValue,"onUpdate:modelValue":W.handleChange,"hide-details":"",density:"compact",variant:"filled","data-test":"cmd-param-value"},null,8,["model-value","onUpdate:modelValue"]))])}const CommandParameterEditor=_export_sfc(_sfc_main$1,[["render",_sfc_render$1],["__scopeId","data-v-b19a55d5"]]),_sfc_main={mixins:[Utilities],components:{DetailsDialog:P$1,CriticalCmdDialog:N,TargetPacketItemChooser:$e$1,CommandParameterEditor,TopBar:X$1,Openc3Screen:Qe$1},data(){return{title:"Command Sender",search:"",headers:[{title:"Name",value:"parameter_name"},{title:"Value or State",value:"val"},{title:"Units",value:"units"},{title:"Range",value:"range"},{title:"Description",value:"description"}],editor:null,targetName:"",commandName:"",paramList:"",lastTargetName:"",lastCommandName:"",lastParamList:"",ignoreRangeChecks:!1,statesInHex:!1,showIgnoredParams:!1,cmdRaw:!1,ignoredParams:[],rows:[],interfaces:[],selectedInterface:"",rawCmdFile:null,status:"",history:"",hazardousCommand:"",displaySendHazardous:!1,displayErrorDialog:!1,displaySendRaw:!1,displayCriticalCmd:!1,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,sendDisabled:!1,api:null,viewDetails:!1,contextMenuShown:!1,parameterName:"",reservedItemNames:[],x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}}],keywords:[],screenTarget:null,screenName:null,screenDefinition:null,screenCount:0}},computed:{menus:function(){return[{label:"Mode",items:[{label:"Ignore Range Checks",checkbox:!0,checked:this.ignoreRangeChecks,command:()=>{this.ignoreRangeChecks=!this.ignoreRangeChecks}},{label:"Display State Values in Hex",checkbox:!0,checked:this.statesInHex,command:()=>{this.statesInHex=!this.statesInHex}},{label:"Show Ignored Parameters",checkbox:!0,checked:this.showIgnoredParams,command:()=>{this.showIgnoredParams=!this.showIgnoredParams,this.updateCmdParams()}},{label:"Disable Parameter Conversions",checkbox:!0,checked:this.cmdRaw,command:()=>{this.cmdRaw=!this.cmdRaw.checked}}]}]}},created(){ns.get("/openc3-api/autocomplete/reserved-item-names").then(x=>{this.reservedItemNames=x.data}),this.api=new is,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),ns.get("/openc3-api/autocomplete/keywords/screen").then(x=>{this.keywords=x.data})},mounted(){this.editor=aceExports.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode("ace/mode/ruby"),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.setHighlightActiveLine(!1),this.editor.setValue(localStorage.command_sender__history),this.history=this.editor.getValue().trim(),this.editor.clearSelection(),this.editor.focus(),this.editor.setAutoScrollEditorIntoView(!0),this.editor.setOption("maxLines",30),this.editor.setOption("minLines",1),this.editor.container.addEventListener("keydown",x=>{if(x.key==="Enter"){x.preventDefault();let b=this.editor.session.getLine(this.editor.getCursorPosition().row);if(b==="")return;let p=b.indexOf('"'),m=b.lastIndexOf('"');b=b.substr(p+1,m-p-1),this.sendCmd(b)}})},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{showContextMenu(x,b){x.preventDefault(),this.parameterName=b.item.parameter_name,this.contextMenuShown=!1,this.x=x.clientX,this.y=x.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},convertToValue(param){if(param.val!==void 0&&param.states&&!this.cmdRaw)return Object.keys(param.states).find(x=>param.states[x].value===param.val);if(typeof param.val!="string")return param.val;let str=param.val,quotesRemoved=this.removeQuotes(str);if(str===quotesRemoved){let upcaseStr=str.toUpperCase();if((param.type==="STRING"||param.type==="BLOCK")&&upcaseStr.startsWith("0X")){let x=upcaseStr.slice(2);x.length%2!==0&&(x="0"+x);let b={json_class:"String",raw:[]};for(let p=0;p<x.length;p+=2){let m=x.charAt(p)+x.charAt(p+1);b.raw.push(parseInt(m,16))}return b}else return upcaseStr==="INFINITY"?1/0:upcaseStr==="-INFINITY"?-1/0:upcaseStr==="NAN"?NaN:this.isFloat(str)?parseFloat(str):this.isInt(str)?parseInt(str):this.isArray(str)?eval(str):str}else return quotesRemoved},commandChanged(x){(this.targetName!==x.targetName||this.commandName!==x.packetName)&&(this.targetName=x.targetName,this.commandName=x.packetName,this.sendDisabled===!1&&this.updateCmdParams(),this.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(b=>{}))},updateCmdParams(){this.sendDisabled=!0,this.ignoredParams=[],this.rows=[],this.api.get_target(this.targetName).then(x=>(this.ignoredParams=x.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),x=>{this.displayError("getting ignored parameters",x),this.sendDisabled=!1}).then(x=>{if(x.items.forEach(b=>{if(!this.reservedItemNames.includes(b.name)&&(!this.ignoredParams.includes(b.name)||this.showIgnoredParams)){let p=b.default;!b.states&&b.data_type==="STRING"&&typeof b.default=="string"&&(p=`'${p}'`),b.required&&(p=""),b.format_string&&(p=sprintf(b.format_string,b.default));let m="N/A";b.minimum!=null&&b.maximum!=null&&(b.data_type==="FLOAT"&&(b.minimum<-1e6&&(b.minimum=b.minimum.toExponential(3)),b.maximum>1e6&&(b.maximum=b.maximum.toExponential(3))),m=`${b.minimum}..${b.maximum}`),this.rows.push({parameter_name:b.name,val:p,states:b.states,description:b.description,range:m,units:b.units,type:b.data_type})}}),x.screen)this.loadScreen(x.screen[0],x.screen[1]).then(b=>{this.screenTarget=x.screen[0],this.screenName=x.screen[1],this.screenDefinition=b.data,this.screenCount+=1});else{if(x.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let b=`SCREEN AUTO AUTO 1.0
1107
+ `;for(const p of x.related_items)b+=`LABELVALUE '${p[0]}' '${p[1]}' '${p[2]}' WITH_UNITS 20
1108
+ `;this.screenDefinition=b}else this.screenTarget=null,this.screenName=null,this.screenDefinition=null;this.screenCount+=1}this.sendDisabled=!1,this.status=""},x=>{this.displayError("getting command parameters",x),this.sendDisabled=!1})},createParamList(){let x={};for(const b of this.rows)x[b.parameter_name]=this.convertToValue(b);return x},buildCmd(){this.sendCmd(this.targetName,this.commandName,this.createParamList())},sendCmd(x,b,p){this.lastTargetName=x,this.lastCommandName=b,this.lastParamList=p,this.sendDisabled=!0;let m=!1,Vn="";this.api.get_cmd_hazardous(x,b,p).then(W=>{if(m=W,m)b===void 0?this.hazardousCommand=x.split(" ").slice(0,2).join(" "):this.hazardousCommand=`${x} ${b}`,this.displaySendHazardous=!0;else{let R;this.cmdRaw?this.ignoreRangeChecks?(Vn="cmd_raw_no_range_check",R=this.api.cmd_raw_no_range_check(x,b,p,{"Ignore-Errors":"428"})):(Vn="cmd_raw",R=this.api.cmd_raw(x,b,p,{"Ignore-Errors":"428 500"})):this.ignoreRangeChecks?(Vn="cmd_no_range_check",R=this.api.cmd_no_range_check(x,b,p,{"Ignore-Errors":"428"})):(Vn="cmd",R=this.api.cmd(x,b,p,{"Ignore-Errors":"428 500"})),R.then(M=>{this.processCmdResponse(!0,x,b,Vn,M)},M=>{this.processCmdResponse(!1,x,b,Vn,M)})}},W=>{this.processCmdResponse(!1,x,b,Vn,W)})},sendHazardousCmd(){this.displaySendHazardous=!1;let x="",b="";this.cmdRaw?this.ignoreRangeChecks?(b="cmd_raw_no_range_check",x=this.api.cmd_raw_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"})):(b="cmd_raw",x=this.api.cmd_raw_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"})):this.ignoreRangeChecks?(b="cmd_no_range_check",x=this.api.cmd_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"})):(b="cmd",x=this.api.cmd_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"})),x.then(p=>{this.processCmdResponse(!0,this.lastTargetName,this.lastCommandName,b,p)},p=>{this.processCmdResponse(!1,this.lastTargetName,this.lastCommandName,b,p)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdResponse(x,b,p,m,Vn){p===void 0&&([b,p]=b.split(" ").slice(0,2));let W="";if(x){W=`${m}("${Vn[0]} ${Vn[1]}`;let R=Object.keys(Vn[2]);if(R.length>0){W+=" with ";for(let M=0;M<R.length;M++){let l=R[M],u=this.convertToString(Vn[2][l]);typeof Vn[2][l]=="string"&&u.charAt(0)!=="'"&&u.charAt(0)!=='"'&&(u=`'${u}'`),W+=l+" "+u,M<R.length-1&&(W+=", ")}}if(W+='")',!this.history.includes(W)){let M=W;this.history.length!==0&&(M+=`
1109
+ ${this.history}`),this.editor.setValue(M),this.editor.moveCursorTo(0,0)}if(W+=" sent.",this.status.includes(W)){let M=this.status.split("sent.");if(M[1].includes("(")){let l=parseInt(M[1].substr(2,M[1].indexOf(")")-2));W=M[0]+"sent. ("+(l+1)+")"}else W+=" (2)"}this.status=W}else{let R="sending "+b+" "+p;this.displayError(R,Vn,!0)}this.history=this.editor.getValue(),localStorage.command_sender__history=this.editor.getValue(),this.sendDisabled=!1},clearHistory(){this.editor.setValue(""),this.history="",localStorage.removeItem("command_sender__history")},displayError(x,b,p=!1){this.status=`Error ${x} due to ${b.name}`,b.message&&b.message!==""&&(this.status+=": ",this.status+=b.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),p&&(b.message.includes("CriticalCmdError")?(this.criticalCmdUuid=b.object.data.instance_variables["@uuid"],this.criticalCmdString=b.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=b.object.data.instance_variables["@username"],this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(x,b){return ns.get("/openc3-api/screen/"+x+"/"+b,{headers:{Accept:"text/plain"}})}}},_hoisted_1={style:{padding:"10px"}},_hoisted_2={class:"pa-3"},_hoisted_3={ref:"editor",class:"editor","data-test":"sender-history"},_hoisted_4={class:"mx-1"},_hoisted_5=["textContent"],_hoisted_6={class:"mx-1"};function _sfc_render(x,b,p,m,Vn,W){const R=resolveComponent("top-bar"),M=resolveComponent("target-packet-item-chooser"),l=resolveComponent("v-spacer"),u=resolveComponent("v-text-field"),o=resolveComponent("v-card-title"),i=resolveComponent("command-parameter-editor"),r=resolveComponent("v-data-table"),t=resolveComponent("v-card"),e=resolveComponent("v-col"),n=resolveComponent("v-btn"),a=resolveComponent("v-tooltip"),d=resolveComponent("v-row"),f=resolveComponent("v-card-subtitle"),oe=resolveComponent("openc3-screen"),F=resolveComponent("v-list-item-title"),_=resolveComponent("v-list-item"),S=resolveComponent("v-list"),xe=resolveComponent("v-menu"),He=resolveComponent("details-dialog"),Ae=resolveComponent("critical-cmd-dialog"),J=resolveComponent("v-toolbar"),Kn=resolveComponent("v-card-text"),y=resolveComponent("v-dialog"),h=resolveComponent("v-card-actions"),w=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[createVNode(R,{menus:W.menus,title:Vn.title},null,8,["menus","title"]),createVNode(t,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(M,{"initial-target-name":this.$route.params.target,"initial-packet-name":this.$route.params.packet,onOnSet:b[0]||(b[0]=Q=>W.commandChanged(Q)),onAddItem:b[1]||(b[1]=Q=>W.buildCmd(Q)),disabled:Vn.sendDisabled,"button-text":"Send",mode:"cmd"},null,8,["initial-target-name","initial-packet-name","disabled"])]),Vn.rows.length!==0?(openBlock(),createBlock(t,{key:0},{default:withCtx(()=>[createVNode(o,{class:"d-flex align-center justify-content-space-between"},{default:withCtx(()=>[b[12]||(b[12]=createTextVNode(" Parameters ")),createVNode(l),createVNode(u,{modelValue:Vn.search,"onUpdate:modelValue":b[2]||(b[2]=Q=>Vn.search=Q),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),createVNode(r,{headers:Vn.headers,items:Vn.rows,search:Vn.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact","onContextmenu:row":W.showContextMenu},{"item.val":withCtx(({item:Q})=>[createVNode(i,{modelValue:Q.val,"onUpdate:modelValue":Me=>Q.val=Me,states:Q.states,"states-in-hex":Vn.statesInHex},null,8,["modelValue","onUpdate:modelValue","states","states-in-hex"])]),_:1},8,["headers","items","search","onContextmenu:row"])]),_:1})):createCommentVNode("",!0),createElementVNode("div",_hoisted_2,"Status: "+toDisplayString(Vn.status),1)]),_:1}),b[25]||(b[25]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(d,{"no-gutters":""},{default:withCtx(()=>[createVNode(e,{class:"pr-4"},{default:withCtx(()=>[createVNode(t,{class:"pb-2"},{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>[createVNode(d,null,{default:withCtx(()=>[createVNode(e,{class:"pt-6"},{default:withCtx(()=>b[13]||(b[13]=[createTextVNode(" Editable Command History: (Pressing Enter on the line re-executes the command) ")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createVNode(a,{location:"top"},{activator:withCtx(({props:Q})=>[createElementVNode("div",mergeProps(Q,{class:"float-right"}),[createVNode(n,{icon:"mdi-delete",variant:"text","data-test":"clear-history",onClick:W.clearHistory},null,8,["onClick"])],16)]),default:withCtx(()=>[b[14]||(b[14]=createElementVNode("span",null," Clear History ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),createVNode(d,{"no-gutters":"",class:"mt-2 mb-2"},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createElementVNode("pre",_hoisted_3,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),Vn.screenDefinition?(openBlock(),createBlock(e,{key:0,md:"auto"},{default:withCtx(()=>[createVNode(oe,{target:Vn.screenTarget,screen:Vn.screenName,definition:Vn.screenDefinition,keywords:Vn.keywords,count:Vn.screenCount,showClose:!1},null,8,["target","screen","definition","keywords","count"])]),_:1})):createCommentVNode("",!0)]),_:1}),b[26]||(b[26]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(xe,{modelValue:Vn.contextMenuShown,"onUpdate:modelValue":b[3]||(b[3]=Q=>Vn.contextMenuShown=Q),target:[Vn.x,Vn.y]},{default:withCtx(()=>[createVNode(S,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(Vn.contextMenuOptions,(Q,Me)=>(openBlock(),createBlock(_,{key:Me,onClick:withModifiers(Q.action,["stop"])},{default:withCtx(()=>[createVNode(F,null,{default:withCtx(()=>[createTextVNode(toDisplayString(Q.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),createVNode(He,{"target-name":Vn.targetName,"packet-name":Vn.commandName,"item-name":Vn.parameterName,type:"cmd",modelValue:Vn.viewDetails,"onUpdate:modelValue":b[4]||(b[4]=Q=>Vn.viewDetails=Q)},null,8,["target-name","packet-name","item-name","modelValue"]),createVNode(Ae,{uuid:Vn.criticalCmdUuid,cmdString:Vn.criticalCmdString,cmdUser:Vn.criticalCmdUser,modelValue:Vn.displayCriticalCmd,"onUpdate:modelValue":b[5]||(b[5]=Q=>Vn.displayCriticalCmd=Q)},null,8,["uuid","cmdString","cmdUser","modelValue"]),createVNode(y,{modelValue:Vn.displayErrorDialog,"onUpdate:modelValue":b[7]||(b[7]=Q=>Vn.displayErrorDialog=Q),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(J,{height:"24"},{default:withCtx(()=>[createVNode(l),b[15]||(b[15]=createElementVNode("span",null," Error ",-1)),createVNode(l)]),_:1}),createVNode(Kn,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_4,[createVNode(d,{class:"my-2"},{default:withCtx(()=>[createVNode(Kn,null,{default:withCtx(()=>[createElementVNode("span",{textContent:toDisplayString(Vn.status)},null,8,_hoisted_5)]),_:1})]),_:1}),createVNode(d,null,{default:withCtx(()=>[createVNode(l),createVNode(n,{onClick:b[6]||(b[6]=Q=>Vn.displayErrorDialog=!1),color:"primary","data-test":"error-dialog-ok"},{default:withCtx(()=>b[16]||(b[16]=[createTextVNode(" Ok ")])),_:1})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(y,{modelValue:Vn.displaySendHazardous,"onUpdate:modelValue":b[8]||(b[8]=Q=>Vn.displaySendHazardous=Q),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(J,{height:"24"},{default:withCtx(()=>[createVNode(l),b[17]||(b[17]=createElementVNode("span",null," Hazardous Warning ",-1)),createVNode(l)]),_:1}),createVNode(Kn,{class:"mt-6"},{default:withCtx(()=>[createTextVNode(" Warning: Command "+toDisplayString(Vn.hazardousCommand)+" is Hazardous. Send? ",1)]),_:1}),createVNode(h,{class:"px-2"},{default:withCtx(()=>[createVNode(l),createVNode(n,{onClick:W.cancelHazardousCmd,variant:"outlined"},{default:withCtx(()=>b[18]||(b[18]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(n,{onClick:W.sendHazardousCmd,variant:"flat"},{default:withCtx(()=>b[19]||(b[19]=[createTextVNode(" Send ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(y,{modelValue:Vn.displaySendRaw,"onUpdate:modelValue":b[11]||(b[11]=Q=>Vn.displaySendRaw=Q),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(J,{height:"24"},{default:withCtx(()=>[createVNode(l),b[20]||(b[20]=createElementVNode("span",null," Send Raw ",-1)),createVNode(l)]),_:1}),createVNode(Kn,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_6,[createVNode(d,{class:"my-2"},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>b[21]||(b[21]=[createTextVNode("Interface:")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createVNode(w,{variant:"solo","hide-details":"",density:"compact",items:Vn.interfaces,"item-title":"label","item-value":"value",modelValue:Vn.selectedInterface,"onUpdate:modelValue":b[9]||(b[9]=Q=>Vn.selectedInterface=Q)},null,8,["items","modelValue"])]),_:1})]),_:1}),createVNode(d,{"no-gutters":""},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>b[22]||(b[22]=[createTextVNode("Filename:")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createElementVNode("input",{type:"file",onChange:b[10]||(b[10]=Q=>x.selectRawCmdFile(Q))},null,32)]),_:1})]),_:1}),createVNode(d,null,{default:withCtx(()=>[createVNode(l),createVNode(n,{onClick:x.cancelRawCmd,variant:"outlined","data-test":"raw-cancel"},{default:withCtx(()=>b[23]||(b[23]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(n,{onClick:x.sendRawCmd,class:"bg-primary","data-test":"raw-ok"},{default:withCtx(()=>b[24]||(b[24]=[createTextVNode(" Ok ")])),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const CommandSender=exports("default",_export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-dda0eae4"]]))}}});