openc3-cosmos-tool-cmdsender 6.9.2 → 6.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdsender/{ArrayWidget-C59wpWWk-ad3f8edc3a31fc872a34.js → ArrayWidget-DQRQ7dPa-699f8e0c4787f3c994ce.js} +2 -2
  3. data/tools/cmdsender/{ArrayplotWidget-tKqIV461-48ad65598dc61cc7d749.js → ArrayplotWidget-BeSfz3MR-db61e4209adad756dce5.js} +1 -1
  4. data/tools/cmdsender/{BarColumn-CUO9ur6W-8a0a0fbdd77cebc286c3.js → BarColumn-BdIaQfOz-8f7671ac0e3f5d6183a3.js} +1 -1
  5. data/tools/cmdsender/{BlockWidget-BdlMR_1A-55d292146464319013db.js → BlockWidget-DSFKrUxl-98d9df2c999fcb7584dd.js} +2 -2
  6. data/tools/cmdsender/{ButtonWidget-C2JVmh3p-6f91606cfcc237b36347.js → ButtonWidget-CFbjdxSr-2c6c2083a5f26780417c.js} +1 -1
  7. data/tools/cmdsender/{CanvasWidget-BRbdw1fu-9d50b22a897df077fc92.js → CanvasWidget-BloYxuKE-4e0c5fd2b6d87d92b837.js} +1 -1
  8. data/tools/cmdsender/{CanvasdotWidget-C8T_w03p-541ce9ae7057dd8c5032.js → CanvasdotWidget-CZxUOPRd-51a546992689b163471c.js} +1 -1
  9. data/tools/cmdsender/{CanvasimageWidget-C1w2vSsG-569cd64921be8317e52a.js → CanvasimageWidget-ULQq3nqZ-7e43b906bb1ef2545d47.js} +1 -1
  10. data/tools/cmdsender/{CanvasimagevalueWidget-BMv2SmEq-94cc4949a2ffd7b7bedb.js → CanvasimagevalueWidget-jFCVXYhi-8a4246252346a1369e88.js} +1 -1
  11. data/tools/cmdsender/{CanvaslabelWidget-LEBZQ3DR-c98254a2f3597c763c20.js → CanvaslabelWidget-DQhBI1vZ-5f54241892ed0911dfcf.js} +1 -1
  12. data/tools/cmdsender/{CanvaslabelvalueWidget-Q6UdEanF-96a0cd8f9cbf0570935c.js → CanvaslabelvalueWidget-C4REgztL-4c1a8dddf0dc7529c72a.js} +1 -1
  13. data/tools/cmdsender/{CanvaslineWidget-BhvBCDoS-59cfca214be9fbec3697.js → CanvaslineWidget-S4PCEvZM-5dd66fb5b0d7f3529b54.js} +1 -1
  14. data/tools/cmdsender/{CanvaslinevalueWidget-EaASC9TU-aabbf3f9bef97ea9fe1d.js → CanvaslinevalueWidget-597khOSA-2a7b62f150da68e32563.js} +1 -1
  15. data/tools/cmdsender/{CheckbuttonWidget-C3bjQwrp-bf8a8151f1d1dd45988f.js → CheckbuttonWidget-BcblKat3-4d10123493287cc9cf7b.js} +1 -1
  16. data/tools/cmdsender/{ComboboxWidget-CmruSbJy-d3d2f33b82e6918f63cf.js → ComboboxWidget-BMcHS4g5-da7d763151b53d0f27d6.js} +1 -1
  17. data/tools/cmdsender/CommandSender-efbe6a173b982451db6c.js +1127 -0
  18. data/tools/cmdsender/{CriticalCmdDialog-C1ODz6z7-58ccfe6caff0101fba06.js → CriticalCmdDialog-CVLyYtng-1cd647b8d5fa87b133f5.js} +1 -1
  19. data/tools/cmdsender/{DateWidget-CcUxRlJ2-e58a18e5eec10401eb69.js → DateWidget-BpnMzSBn-cc909167ce73916cfb5b.js} +1 -1
  20. data/tools/cmdsender/DetailsDialog-q9piPmHq-b4c281690acabe3abe08.js +1 -0
  21. data/tools/cmdsender/{DynamicWidget-DHL7pbgW-ce073067d27cf213d394.js → DynamicWidget-DHL7pbgW-80ec2521c68c876231a8.js} +1 -1
  22. data/tools/cmdsender/{FormatvalueWidget-Lk5K0wTL-8d1694fd54ca54eba5df.js → FormatvalueWidget-Cm-HmAmw-fa63fd1db75285288ff5.js} +1 -1
  23. data/tools/cmdsender/{Graph-CjEE2WxX-c2d41a08f55d9f253279.js → Graph-BEodMaxQ-883ece99d82821dcc0e5.js} +1 -1
  24. data/tools/cmdsender/{GraphWidget-BaO2FpKo-5c9f3d3896879ecaf522.js → GraphWidget-CAADBFV--18a98ad5d24c5890118c.js} +1 -1
  25. data/tools/cmdsender/{HorizontalWidget-D3Q5IUQg-f5d5c6bbd65136661443.js → HorizontalWidget-NcXIXxh7-cc6eddfd6e233f71348d.js} +1 -1
  26. data/tools/cmdsender/HorizontalboxWidget-CW9XX4uH-78c136a91c395eb8b8a6.js +1 -0
  27. data/tools/cmdsender/{HorizontallineWidget-DZcIetQh-a7a4fe16954b1430ad98.js → HorizontallineWidget-Cu2dDt7k-26eb3c3d93e54011d641.js} +1 -1
  28. data/tools/cmdsender/{IframeWidget-Df7vTYZj-caeb2d5dccd0f63376d3.js → IframeWidget-BBU3MkSq-2cb5fcddc13fa06e3647.js} +1 -1
  29. data/tools/cmdsender/{ImageLoader-DpKY46fX-5e1ff6653e5b6feab1df.js → ImageLoader-XAGgjKkq-78de9948cab2055db528.js} +1 -1
  30. data/tools/cmdsender/{ImageviewerWidget-wHbhv08x-34951dd560eb3cc32a80.js → ImageviewerWidget-UByjeO63-1bce2491dc5e00aeaf8d.js} +1 -1
  31. data/tools/cmdsender/{LabelWidget-BehwzOCR-c57136597e4741fef259.js → LabelWidget-BsOpolUL-e611f08e3ef028a4e187.js} +1 -1
  32. data/tools/cmdsender/{LabelledWidget-DJKR8ikj-8c28d2c4e4b99019efd4.js → LabelledWidget-DVOGpgZ--e8f453f67719bf74923f.js} +1 -1
  33. data/tools/cmdsender/LabelprogressbarWidget-BeE9fDs6-bf6b5645e3e61e4f37c3.js +1 -0
  34. data/tools/cmdsender/LabelsparklineWidget-Bj7trKML-8a16bc2f645d5e57f3b1.js +1 -0
  35. data/tools/cmdsender/LabelvalueWidget-Dwqsh5o2-e633d3d82f8ebae4ed48.js +1 -0
  36. data/tools/cmdsender/{LabelvaluedescWidget-DgNX7tK2-d1d776a85b36c6510ed4.js → LabelvaluedescWidget-Cfu2vuja-8941baffebfc634b1e23.js} +1 -1
  37. data/tools/cmdsender/LabelvaluelimitsbarWidget-DYV68AJ_-f01ee674935744b2bc8a.js +1 -0
  38. data/tools/cmdsender/LabelvaluelimitscolumnWidget-CtaoTixt-9481ec06797add7dd693.js +1 -0
  39. data/tools/cmdsender/{LabelvaluerangebarWidget-CQ0xCUFU-cf35ecd3173e804d161d.js → LabelvaluerangebarWidget-3EaUB6E6-201414f16d5868989c4d.js} +1 -1
  40. data/tools/cmdsender/{Layout-CrCMUbtG-263cb294b8f4f0b20972.js → Layout-DNR3xnku-5db77e3d5c52c35294d3.js} +1 -1
  41. data/tools/cmdsender/{LedWidget-DzQNEDF7-1f006247ef38d5455234.js → LedWidget-Gi6GXtrW-4105eb96888212ff6a48.js} +1 -1
  42. data/tools/cmdsender/{LimitsbarWidget-zkoAz9SQ-82a08bb687294ed8473c.js → LimitsbarWidget-BTZQY9XQ-a0181123f0db2fdd5f33.js} +1 -1
  43. data/tools/cmdsender/{LimitscolorWidget-dez316Rk-2ab66aec984170040751.js → LimitscolorWidget-CFnmvlrA-32edd2dd5f19963059b8.js} +1 -1
  44. data/tools/cmdsender/{LimitscolumnWidget-D-IPNDVg-87f010e56db049a7d6bc.js → LimitscolumnWidget-DSsz36tT-f103d23b66a7fa252c45.js} +1 -1
  45. data/tools/cmdsender/{LinegraphWidget-CicnZgjt-a3c5fbb095f2912f3672.js → LinegraphWidget-CeBijgDo-b9ab00028aae73e40f22.js} +1 -1
  46. data/tools/cmdsender/{MatrixbycolumnsWidget-D3qN6GTr-b0b5a2df84f72fc36089.js → MatrixbycolumnsWidget-DX9uhjAv-8fd69b6bab40478f0e16.js} +1 -1
  47. data/tools/cmdsender/{ProgressbarWidget-CLilcPBe-468e8ceae4bdc13b59bd.js → ProgressbarWidget-DJepvOip-24d343822053d1ab2b5a.js} +1 -1
  48. data/tools/cmdsender/{RadiobuttonWidget-Dsy01RJ--733d34e9ac02af4efced.js → RadiobuttonWidget-4e8ROIfg-975ee6c8b9a55e3b1028.js} +1 -1
  49. data/tools/cmdsender/RadiogroupWidget-CUucj6aT-6c53e9a6c8155e83f947.js +1 -0
  50. data/tools/cmdsender/{RangebarWidget-DhcoIdNf-1c69e2a9e28e5fae8fd8.js → RangebarWidget-Bu4rqlrx-4a71694e157ebada281a.js} +1 -1
  51. data/tools/cmdsender/{RollupWidget-BypuPvE7-9cd207ba005e6bef6d56.js → RollupWidget-ByLvEEau-c0a3d0a26f191d5e213f.js} +1 -1
  52. data/tools/cmdsender/{ScrollwindowWidget-DNQgHoNO-31b268c6e58b90fc17ee.js → ScrollwindowWidget-CXJ9QGN1-95e9947940194c98c955.js} +1 -1
  53. data/tools/cmdsender/{SignalWidget-BHwyScCG-fb08ddcc1c4e52e724a5.js → SignalWidget-qvL2YZJA-7739b490a969610639ea.js} +1 -1
  54. data/tools/cmdsender/{SpacerWidget-CFxXXTm7-a1e7e244045cb087aee4.js → SpacerWidget-CaWx41K7-29b6be6cc322bd4e3aa4.js} +1 -1
  55. data/tools/cmdsender/{SparklineWidget-C0lRpRrp-58129fb3942b5f1ed4b2.js → SparklineWidget-BkNSRypJ-9c1d94241ae70e6c9846.js} +1 -1
  56. data/tools/cmdsender/TabbookWidget-MsrRG1vn-4d269ac5face5e5bd1f9.js +1 -0
  57. data/tools/cmdsender/TargetPacketItemChooser-oSQHf8Ht-7192d1612f8fe086bbf5.js +1 -0
  58. data/tools/cmdsender/{TextboxWidget-DoA2b3YU-aeac8867ebcdb98d8b12.js → TextboxWidget-DbwpPVGB-2a1be2fa122a6cb9683c.js} +1 -1
  59. data/tools/cmdsender/{TextfieldWidget-Dj4DV74o-70ae4e4156c5f1adc4c0.js → TextfieldWidget-DzMlTMYW-41bb3a56bbe69cefaf08.js} +1 -1
  60. data/tools/cmdsender/{TimeWidget-DAQDQ0UM-fa4d902a77f52c4a6592.js → TimeWidget-BHybAfg8-3790dfeb548ead5664c5.js} +1 -1
  61. data/tools/cmdsender/{TitleWidget-Ct0JlY9s-e605e9fc801abdafa17f.js → TitleWidget-DL_sE5YE-34f4ce9102e950fdf255.js} +1 -1
  62. data/tools/cmdsender/VWidget-D06LY-Yc-d698fc3b05f0c1732417.js +1 -0
  63. data/tools/cmdsender/{ValueWidget-QaBYsiZz-d4ae8ba10d289cdbd237.js → ValueWidget-CGT0LV_n-3387717dc96486fb634e.js} +1 -1
  64. data/tools/cmdsender/{ValuelimitsbarWidget-CFToRM7w-5f555298942a08a38065.js → ValuelimitsbarWidget-CmpyPO-1-da29e726ed36f828eb62.js} +1 -1
  65. data/tools/cmdsender/ValuelimitscolumnWidget-jzxrQd-f-f26ba548786f9860fd27.js +1 -0
  66. data/tools/cmdsender/{ValuerangebarWidget-CChK2Lmm-eccd1b9c1492aa5fa4dc.js → ValuerangebarWidget-C8ckuAeh-5fc05ae966ab0f0d0e02.js} +1 -1
  67. data/tools/cmdsender/{VerticalWidget-C8iN5DJK-d70edb3c6377dead1976.js → VerticalWidget-qN82km_m-f95f90cb500d8c09d160.js} +1 -1
  68. data/tools/cmdsender/VerticalboxWidget-CiJZDlHJ-10099596bd15bd20c582.js +1 -0
  69. data/tools/cmdsender/{Widget-Cx1jBJHK-fcffd1a5c97ce4434cea.js → Widget-DXvVFSH5-ae2d2ee57773da92942f.js} +1 -1
  70. data/tools/cmdsender/{main-ca725949e5b295285205.js → main-3c23de0ae474ebedfc99.js} +55 -55
  71. data/tools/cmdsender/main.js +1 -1
  72. metadata +70 -70
  73. data/tools/cmdsender/CommandSender-af37cb2ac42e9e845a72.js +0 -1127
  74. data/tools/cmdsender/DetailsDialog-DxYZre4A-b1dff0fde5a169f9fa77.js +0 -1
  75. data/tools/cmdsender/HorizontalboxWidget-D7bUUqfG-5f4d3f65ff21c06fc7aa.js +0 -1
  76. data/tools/cmdsender/LabelprogressbarWidget-D4Qzq894-350a08013e402f437f81.js +0 -1
  77. data/tools/cmdsender/LabelsparklineWidget-CwCOklZG-99e6ac6ba09011026c8a.js +0 -1
  78. data/tools/cmdsender/LabelvalueWidget-DW8Q7BTX-5a70125a862fbd014d3e.js +0 -1
  79. data/tools/cmdsender/LabelvaluelimitsbarWidget-DAEBW0hU-d4a6567b491ccd15a2c0.js +0 -1
  80. data/tools/cmdsender/LabelvaluelimitscolumnWidget-Dok-of6n-7bb6db9c6618251ea306.js +0 -1
  81. data/tools/cmdsender/RadiogroupWidget-BNcVGNj1-f07f6726b4c763706b8b.js +0 -1
  82. data/tools/cmdsender/TabbookWidget-CeeBOYOt-de01c6ae71daba6bff42.js +0 -1
  83. data/tools/cmdsender/TargetPacketItemChooser-Brm7gfWf-26983e29e3a6eca41a2c.js +0 -1
  84. data/tools/cmdsender/VWidget-A802LGvR-26fa136e33b94f4e0f61.js +0 -1
  85. data/tools/cmdsender/ValuelimitscolumnWidget-BG7naMYx-5394880ba6c143c10f2d.js +0 -1
  86. data/tools/cmdsender/VerticalboxWidget-CXwUSWrP-2c2b736a313f590363ce.js +0 -1
@@ -0,0 +1,1127 @@
1
+ System.register(["./main-3c23de0ae474ebedfc99.js","vue","./TargetPacketItemChooser-oSQHf8Ht-7192d1612f8fe086bbf5.js","./DetailsDialog-q9piPmHq-b4c281690acabe3abe08.js","./CriticalCmdDialog-CVLyYtng-1cd647b8d5fa87b133f5.js","single-spa","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,UA,FA,BA,WA,Ik,bA,_export_sfc,resolveComponent,createBlock,openBlock,Teleport,createVNode,withCtx,createElementVNode,toDisplayString,createElementBlock,Fragment,renderList,ref,createTextVNode,mergeProps,createSlots,createCommentVNode,normalizeStyle,withDirectives,vShow,normalizeProps,guardReactiveProps,withKeys,withModifiers,renderSlot,normalizeClass,U,P$1,N$1;return{setters:[h=>{d=h.d,UA=h.U,FA=h.F,BA=h.B,WA=h.W,Ik=h.I,bA=h.b,_export_sfc=h._},h=>{resolveComponent=h.resolveComponent,createBlock=h.createBlock,openBlock=h.openBlock,Teleport=h.Teleport,createVNode=h.createVNode,withCtx=h.withCtx,createElementVNode=h.createElementVNode,toDisplayString=h.toDisplayString,createElementBlock=h.createElementBlock,Fragment=h.Fragment,renderList=h.renderList,ref=h.ref,createTextVNode=h.createTextVNode,mergeProps=h.mergeProps,createSlots=h.createSlots,createCommentVNode=h.createCommentVNode,normalizeStyle=h.normalizeStyle,withDirectives=h.withDirectives,vShow=h.vShow,normalizeProps=h.normalizeProps,guardReactiveProps=h.guardReactiveProps,withKeys=h.withKeys,withModifiers=h.withModifiers,renderSlot=h.renderSlot,normalizeClass=h.normalizeClass},h=>{U=h.U},h=>{P$1=h.P},h=>{N$1=h.N},null,null,null,null],execute:function(){var __vite_style__=document.createElement("style");__vite_style__.textContent=`.editor[data-v-afca9f0c]{margin-left:30px;height:50px;width:95%;position:relative;font-size:16px}
2
+ /*$vite$:1*/`,document.head.appendChild(__vite_style__);const $="openc3-ace-vim-mode-enabled",C="ace/keyboard/vim",K$1="openc3-ace-default-scripting-language",Z={isVimModeEnabled(){return localStorage.getItem($)==="true"},setVimMode(h){localStorage.setItem($,JSON.stringify(!!h))},toggleVimMode(h){this.isVimModeEnabled()?(h.setKeyboardHandler(null),this.setVimMode(!1)):(h.setKeyboardHandler(C),this.setVimMode(!0)),h.focus()},applyVimModeIfEnabled(h,{saveFn:f}={}){this.isVimModeEnabled()?(h.setKeyboardHandler(C),ace.config.loadModule(C,p=>{p.CodeMirror.Vim.defineEx("write","w",v=>{typeof f=="function"?f():v.ace.execCommand("save")})})):h.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(K$1)||"python"},setDefaultScriptingLanguage(h){(h==="ruby"||h==="python")&&localStorage.setItem(K$1,h)}},q$1={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(h,{emit:f}){const p=f,v=ref(!1);function fe(){v.value=!1}function M(w){return w.replaceAll(" ","-").toLowerCase()}return(w,A)=>{const a=resolveComponent("v-icon"),u=resolveComponent("v-btn"),n=resolveComponent("v-divider"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),i=resolveComponent("v-list"),e=resolveComponent("v-menu"),t=resolveComponent("v-radio"),c=resolveComponent("v-list-item-action"),g=resolveComponent("v-radio-group"),m=resolveComponent("v-checkbox");return openBlock(),createBlock(e,{modelValue:v.value,"onUpdate:modelValue":A[0]||(A[0]=E=>v.value=E),"close-on-content-click":!1},{activator:withCtx(({props:E})=>[createVNode(u,mergeProps(E,{variant:"outlined",class:"mx-1 menu-button",text:h.menu.label,"data-test":M(`${h.title} ${h.menu.label}`)}),{append:withCtx(()=>[createVNode(a,{class:"menu-button-icon"},{default:withCtx(()=>[...A[1]||(A[1]=[createTextVNode(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(h.menu.items,(E,T)=>(openBlock(),createElementBlock(Fragment,null,[E.divider?(openBlock(),createBlock(n,{key:T+"-divider"})):E.subMenu&&E.subMenu.length>0?(openBlock(),createElementBlock("div",{key:T+"-submenu"},[(openBlock(),createBlock(e,{key:T,"open-on-hover":"",location:"right"},{activator:withCtx(({props:x})=>[(openBlock(),createBlock(r,mergeProps({ref_for:!0},x,{key:T,disabled:E.disabled}),createSlots({append:withCtx(()=>[createVNode(a,null,{default:withCtx(()=>[...A[2]||(A[2]=[createTextVNode(" mdi-chevron-right ",-1)])]),_:1})]),default:withCtx(()=>[!E.radio&&!E.checkbox?(openBlock(),createBlock(o,{key:0,style:normalizeStyle("cursor: pointer;"+(E.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(E.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[E.icon?{name:"prepend",fn:withCtx(()=>[createVNode(a,{disabled:E.disabled},{default:withCtx(()=>[createTextVNode(toDisplayString(E.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(E.subMenu,(x,b)=>(openBlock(),createBlock(r,{key:b,"prepend-icon":x.icon,onClick:de=>p("submenu-click",x)},{default:withCtx(()=>[createVNode(o,null,{default:withCtx(()=>[createTextVNode(toDisplayString(x.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):E.radioGroup?(openBlock(),createBlock(g,{key:T+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":E.value,"onUpdate:modelValue":E.command},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(E.choices,(x,b)=>(openBlock(),createBlock(r,{key:b+"-choice"},{default:withCtx(()=>[createVNode(c,{class:"list-action"},{default:withCtx(()=>[createVNode(t,{color:"secondary",label:x.label,value:x.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(openBlock(),createBlock(r,{key:T+"-list",disabled:E.disabled,"data-test":M(`${h.title} ${h.menu.label} ${E.label}`),onClick:()=>{E.command(E),E.checkbox||fe()}},createSlots({default:withCtx(()=>[E.checkbox?(openBlock(),createBlock(c,{key:0,class:"list-action"},{default:withCtx(()=>[createVNode(m,{modelValue:E.checked,"onUpdate:modelValue":x=>E.checked=x,label:E.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):createCommentVNode("",!0),!E.radio&&!E.checkbox?(openBlock(),createBlock(o,{key:1,style:normalizeStyle("cursor: pointer;"+(E.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(E.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[E.icon?{name:"prepend",fn:withCtx(()=>[createVNode(a,{icon:E.icon,disabled:E.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},z$2={components:{TopBarMenu:q$1},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(h){h.command(h),this.$refs.topmenu[0].isActive=!1}}},F$1={class:"app-title mr-2"};function J(h,f,p,v,fe,M){const w=resolveComponent("v-col"),A=resolveComponent("v-row"),a=resolveComponent("TopBarMenu");return openBlock(),createBlock(Teleport,{to:"#openc3-menu"},[createVNode(A,{"no-gutters":""},{default:withCtx(()=>[createVNode(w,{"align-self":"end"},{default:withCtx(()=>[createElementVNode("span",F$1,toDisplayString(p.title),1)]),_:1})]),_:1}),createVNode(A,{dense:"",class:"flex-nowrap"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(p.menus,(u,n)=>(openBlock(),createBlock(a,{key:n+"-top-menu",ref_for:!0,ref:"topmenu",menu:u,title:p.title,onSubmenuClick:M.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const j=d(z$2,[["render",J],["__scopeId","data-v-b6581c4c"]]);let Q$1=class{constructor(){FA.get("/openc3-api/autocomplete/data/screen").then(f=>{this.autocompleteData=f.data}),this.api=new BA}async getCompletions(f,p,v,fe,M){let w=p.getLine(v.row).slice(0,v.column).trimStart().split(/ (?![^<]*>)/),A=this.autocompleteData;w.length>1&&(A=A.find(n=>n.caption===w[0]));let a={},u=!0;if(A&&A.params){A.params.length==w.length-1&&(u=!1);let n=A.params[w.length-2];if(n["Target name"])A=(await this.api.get_target_names()).reduce((o,r)=>(o[r]=1,o),{});else if(n["Packet name"]){let o=w[w.length-2];A=(await this.api.get_all_tlm(o)).reduce((r,i)=>(r[i.packet_name]=i.description,r),{}),A.LATEST="LATEST values from all packets"}else if(n["Item name"]){let o=w[w.length-3],r=w[w.length-2];if(r==="LATEST"){let i=await this.api.get_all_tlm_item_names(o);A={},i.forEach(e=>{A[e]=`LATEST ${e}`})}else A=(await this.api.get_tlm(o,r)).items.reduce((i,e)=>(i[e.name]=e.description,i),{})}else A=n;a=Object.keys(A||{}).map(o=>{let r={value:o+(u?" ":""),command:u&&"startAutocomplete"};return typeof A[o]=="string"&&(r.meta=A[o]),r})}else a=A;M(null,a)}};const ee$1={props:{modelValue:Boolean,target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},errors:{type:Array,default:()=>[]}},emits:["cancel","delete","save","update:modelValue"],data(){return{file:null,docsKeyword:"",contextMenu:!1,menuX:0,menuY:0}},computed:{editErrors:function(){if(this.definition===""&&!this.file)return["Input can not be blank."];if(this.errors.length!==0){let h=new Set,f=[];const p=this.errors.toSorted((v,fe)=>v.lineNumber-fe.lineNumber);for(const v of p){let fe=`At ${v.lineNumber}: (${v.line}) ${v.message}.`;v.usage&&(fe+=` Usage: ${v.usage}`),f.push(fe),h.add(v.message)}return f}return[]},show:{get(){return this.modelValue},set(h){this.$emit("update:modelValue",h)}}},mounted:function(){this.editor=bA.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const h=this.buildScreenMode();this.editor.session.setMode(new h),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new Q$1],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.definition),this.editor.clearSelection(),Z.applyVimModeIfEnabled(this.editor),this.editor.focus()},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{toggleVimMode:function(){Z.toggleVimMode(this.editor)},showContextMenu:function(h){this.menuX=h.pageX,this.menuY=h.pageY;let f=this.editor.getCursorPosition(),p=this.editor.session.getTokenAt(f.row,f.column);if(p){let v=p.value.trim();v.includes(" ")?this.docsKeyword=v.split(" ")[0]:this.docsKeyword=v,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},buildScreenMode(){let h=bA.require("ace/lib/oop"),f=bA.require("ace/mode/text_highlight_rules").TextHighlightRules,p=this.keywords.join("|"),v=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"\\b\\d+(?:\\.\\d+)?\\b"},{token:"keyword",regex:new RegExp(`^\\s*(${p})\\b`)}]},this.normalizeRules()};h.inherits(v,f);let fe=function(){this.HighlightRules=v},M=bA.require("ace/mode/text").Mode;return h.inherits(fe,M),(function(){this.$id="ace/mode/openc3"}).call(fe.prototype),fe},downloadScreen:function(){const h=new Blob([this.editor.getValue()],{type:"text/plain"}),f=document.createElement("a");f.href=URL.createObjectURL(h),f.setAttribute("download",`${this.screen.toLowerCase()}.txt`),f.click()},loadFile:function(){const h=new FileReader;h.readAsText(this.file);const f=this;h.onload=function(){f.editor.setValue(h.result),f.file=null}},deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(h=>{this.$emit("delete")})}}},te$1=["textContent"];function ne$1(h,f,p,v,fe,M){const w=resolveComponent("v-btn"),A=resolveComponent("v-spacer"),a=resolveComponent("v-toolbar"),u=resolveComponent("v-row"),n=resolveComponent("v-file-input"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),i=resolveComponent("v-divider"),e=resolveComponent("v-list"),t=resolveComponent("v-menu"),c=resolveComponent("v-card-text"),g=resolveComponent("v-card"),m=resolveComponent("v-dialog");return openBlock(),createBlock(m,{modelValue:M.show,"onUpdate:modelValue":f[5]||(f[5]=E=>M.show=E),persistent:"",width:"75vw",onKeydown:f[6]||(f[6]=withKeys(E=>h.$emit("cancel"),["esc"]))},{default:withCtx(()=>[createVNode(g,null,{default:withCtx(()=>[createVNode(a,{height:"24"},{default:withCtx(()=>[createVNode(w,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:M.deleteScreen},null,8,["onClick"]),createVNode(A),createElementVNode("span",null," Edit Screen: "+toDisplayString(p.target)+" "+toDisplayString(p.screen),1),createVNode(A),createVNode(w,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-screen-icon",onClick:M.downloadScreen},null,8,["onClick"])]),_:1}),createVNode(c,{style:{"max-height":"90vh"}},{default:withCtx(()=>[createVNode(u,{class:"mt-3"},{default:withCtx(()=>[...f[7]||(f[7]=[createTextVNode(" Upload a screen file. ",-1)])]),_:1}),createVNode(u,{"no-gutters":"",align:"center"},{default:withCtx(()=>[createVNode(w,{disabled:!fe.file,color:"primary",class:"mr-3","data-test":"edit-screen-load",onClick:M.loadFile},{default:withCtx(()=>[...f[8]||(f[8]=[createTextVNode(" Load ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(n,{modelValue:fe.file,"onUpdate:modelValue":f[0]||(f[0]=E=>fe.file=E),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file."},null,8,["modelValue"])]),_:1}),createVNode(u,{class:"mb-2"},{default:withCtx(()=>[...f[9]||(f[9]=[createTextVNode(" Edit the screen definition. ",-1)])]),_:1}),createVNode(u,{class:"mb-2"},{default:withCtx(()=>[createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:f[1]||(f[1]=withModifiers((...E)=>M.showContextMenu&&M.showContextMenu(...E),["prevent"]))},null,544),createVNode(t,{modelValue:fe.contextMenu,"onUpdate:modelValue":f[2]||(f[2]=E=>fe.contextMenu=E),target:[fe.menuX,fe.menuY]},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createVNode(r,{link:""},{default:withCtx(()=>[createVNode(o,{onClick:M.openDocumentation},{default:withCtx(()=>[createTextVNode(toDisplayString(fe.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),createVNode(i),createVNode(r,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:M.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),createVNode(u,{style:{"max-height":"120px","overflow-y":"auto"}},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(M.editErrors,(E,T)=>(openBlock(),createElementBlock("div",{key:T},[createElementVNode("span",{class:"text-red",textContent:toDisplayString(E)},null,8,te$1)]))),128))]),_:1}),createVNode(u,{class:"mt-5"},{default:withCtx(()=>[f[12]||(f[12]=createElementVNode("span",null," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)),createVNode(A),createVNode(w,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:f[3]||(f[3]=E=>h.$emit("cancel"))},{default:withCtx(()=>[...f[10]||(f[10]=[createTextVNode(" Cancel ",-1)])]),_:1}),createVNode(w,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:f[4]||(f[4]=E=>h.$emit("save",h.editor.getValue()))},{default:withCtx(()=>[...f[11]||(f[11]=[createTextVNode(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ie$2=d(ee$1,[["render",ne$1],["__scopeId","data-v-00a228d0"]]),z$1=20,ye$1={components:{EditScreenDialog:ie$2},mixins:[UA],props:{target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},initialFloated:{type:Boolean,default:!1},initialTop:{type:Number,default:0},initialLeft:{type:Number,default:0},initialZ:{type:Number,default:0},minZ:{type:Number,default:0},fixFloated:{type:Boolean,default:!1},count:{type:Number,default:0},showClose:{type:Boolean,default:!0},timeZone:{type:String,default:"local"},inline:{type:Boolean,default:!1},playbackMode:{type:String,default:"realtime"},playbackDateTime:{type:Date,default:null}},emits:["close-screen","delete-screen","drag-screen","edit-screen","float-screen","min-max-screen","unfloat-screen"],data(){return{api:null,backup:"",currentDefinition:this.definition,editDialog:!1,expand:!0,configParser:null,currentLayout:null,layoutStack:[],namedWidgets:{},dynamicWidgets:[],width:null,height:null,staleTime:30,cacheTimeout:.1,globalSettings:[],substitute:!1,original_target_name:null,force_substitute:!1,pollingPeriod:1,errors:[],errorDialog:!1,screenKey:null,dragX:0,dragY:0,floated:this.initialFloated,top:this.initialTop,left:this.initialLeft,zIndex:this.initialZ,changeCounter:0,screenItems:[],actualScreenItems:[],screenValues:{},updateCounter:0,updater:null,screenId:Ik.uniqueId("openc3-screen_"),tlmAvailableTimeout:null}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let h=new Set,f="";for(const p of this.errors){if(h.has(p.message))continue;let v=`${p.time}: (${p.type}) ${p.message}
3
+ `;f+=v,h.add(p.message)}return f}return null},computedStyle(){var h;let f={};const p=this.width||((h=this.$refs.bar)==null?void 0:h.clientWidth);return this.floated&&(f.position="absolute",f.top=this.top+"px",f.left=this.left+"px",f.width=p+"px"),f}},watch:{count:{handler(h,f){this.currentDefinition=this.definition,this.rerender()}},playbackDateTime:{handler(h,f){this.playbackMode==="playback"&&h&&this.update()}},playbackMode:{handler(h,f){h==="realtime"?this.updateRefreshInterval():(clearInterval(this.updater),this.updater=null)}}},errorCaptured(h,f,p){return this.errors.length<z$1&&(h.usage?this.errors.push({type:"usage",message:h.message,usage:h.usage,line:h.line,lineNumber:h.lineNumber,time:new Date().getTime()}):this.errors.push({type:"error",message:h,time:new Date().getTime()})),!1},created(){this.api=new BA,this.configParser=new WA,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){this.playbackMode==="realtime"&&this.updateRefreshInterval(),this.floated&&(this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null),this.tlmAvailableTimeout!=null&&(clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=null)},methods:{open(h,f){this.$parent.showScreen(h,f)},close(h,f){this.$parent.closeScreenByName(h,f)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[]},updateRefreshInterval:function(){let h=this.pollingPeriod*1e3;this.updater&&clearInterval(this.updater),this.updater=setInterval(()=>{this.update()},h)},parseDefinition:function(){if(this.clearErrors(),this.screenItems=[],this.namedWidgets={},this.layoutStack=[],this.dynamicWidgets=[],this.layoutStack.push({type:"VerticalWidget",parameters:[],widgets:[]}),this.currentLayout=this.layoutStack[this.layoutStack.length-1],this.configParser.parse_string(this.currentDefinition,"",!1,!0,(h,f,p,v)=>{if(h)switch(h){case"SCREEN":this.configParser.verify_num_parameters(3,4,`${h} <Width or AUTO> <Height or AUTO> <Polling Period>`),this.width=parseInt(f[0]),this.height=parseInt(f[1]),this.pollingPeriod=parseFloat(f[2]);break;case"END":this.configParser.verify_num_parameters(0,0,`${h}`),this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":this.configParser.verify_num_parameters(1,1,`${h} <Time (s)>`),this.staleTime=parseInt(f[0]);break;case"SUBSETTING":this.configParser.verify_num_parameters(3,null,`${h} <Index> <Widget Type> <Widget Settings...>`),f[1]==="RAW"&&(f[1]="RAW__"+f[2].toLowerCase());case"SETTING":this.configParser.verify_num_parameters(2,null,`${h} <Widget Type> <Widget Settings...>`),f[0]==="RAW"&&(f[0]="RAW__"+f[1].toLowerCase()),(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(f);break;case"GLOBAL_SUBSETTING":this.configParser.verify_num_parameters(3,null,`${h} <Index> <Widget Type> <Widget Settings...>`),f[2]==="RAW"&&(f[2]="RAW__"+f[3].toLowerCase());case"GLOBAL_SETTING":this.configParser.verify_num_parameters(2,null,`${h} <Widget Type> <Widget Settings...>`),f[1]==="RAW"&&(f[1]="RAW__"+f[2].toLowerCase()),this.globalSettings.push(f);break;default:this.processWidget(h,f,p,v);break}}),typeof this.layoutStack[0]>"u"){let h=[],f=[];for(const p of this.dynamicWidgets)h.push(p.name),f.push(p.lineNumber);this.errors.length<z$1&&this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${h.join(",")}?`,lineNumber:f.join(","),time:new Date().getTime()}),this.layoutStack[0]={type:"VerticalWidget",parameters:[],widgets:[]}}else this.applyGlobalSettings(this.layoutStack[0].widgets)},openEdit:function(){this.backup=this.currentDefinition.repeat(1),this.editDialog=!0},upScreen:function(){this.zIndex+=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},downScreen:function(){this.zIndex>this.minZ&&(this.zIndex-=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex]))},floatScreen:function(){if(this.floated)this.$refs.bar.onmousedown=null,this.$refs.bar.parentElement.parentElement.style="z-index: 0",this.floated=!1,this.$emit("unfloat-screen",[this.floated,this.top,this.left,this.zIndex]);else{let h=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),f=this.$refs.bar.getBoundingClientRect();this.top=f.top-h.top-5,this.left=f.left-h.left-5,this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.floated=!0,this.$emit("float-screen",[this.floated,this.top,this.left,this.zIndex])}},dragMouseDown:function(h){h=h||window.event,h.preventDefault(),this.dragX=h.clientX,this.dragY=h.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag:function(h){h=h||window.event,h.preventDefault();let f=this.dragX-h.clientX,p=this.dragY-h.clientY;this.dragX=h.clientX,this.dragY=h.clientY,this.top=this.$refs.bar.offsetTop-p,this.left=this.$refs.bar.offsetLeft-f,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},closeDragElement:function(){document.onmouseup=null,document.onmousemove=null},rerender:function(){this.parseDefinition(),this.updateRefreshInterval(),this.screenKey=Math.floor(Math.random()*1e6),this.$nextTick(function(){this.clearErrors(),this.$emit("edit-screen")})},cancelEdit:function(){this.file=null,this.editDialog=!1,this.currentDefinition=this.backup,this.rerender()},saveEdit:function(h){this.editDialog=!1,this.currentDefinition=h,this.rerender(),this.$nextTick(function(){FA.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0)})},deleteScreen:function(){this.editDialog=!1,FA.delete(`/openc3-api/screen/${this.target}/${this.screen}`).then(h=>{this.$emit("delete-screen")})},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(h,f,p,v){let fe=null;h==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${h} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),fe=f[0].toUpperCase(),h=f[1].toUpperCase(),f=f.slice(2,f.length));const M=h.charAt(0).toUpperCase()+h.slice(1).toLowerCase()+"Widget";let w=[];if(w.push(["__SCREEN_ID__",this.screenId]),fe!==null&&w.push(["NAMED_WIDGET",fe]),h==="VERTICAL"||h==="VERTICALBOX"||h==="HORIZONTAL"||h==="HORIZONTALBOX"||h==="MATRIXBYCOLUMNS"||h==="TABBOOK"||h==="TABITEM"||h==="CANVAS"||h==="RADIOGROUP"||h==="SCROLLWINDOW"){const A={type:M,parameters:f,settings:w,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(A),this.currentLayout.widgets.push(A),this.currentLayout=A}else if(this.$options.components[M])this.currentLayout.widgets.push({type:M,target:this.target,parameters:f,settings:w,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:p,lineNumber:v});else{let A={type:"DynamicWidget",target:this.target,parameters:f,settings:w,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:M,line:p,lineNumber:v};this.currentLayout.widgets.push(A),this.dynamicWidgets.push(A)}},applyGlobalSettings:function(h){h.forEach(f=>{this.globalSettings.forEach(p=>{f.type.toLowerCase()===p[0].toLowerCase()+"widget"&&(f.settings.find(v=>v[0]===p[1])||f.settings.push(p.slice(1)))}),f.widgets&&this.applyGlobalSettings(f.widgets)})},update:function(){let h=this.playbackMode==="playback"?this.playbackDateTime:null;this.actualScreenItems.length!==0&&this.api.get_tlm_values(this.actualScreenItems,this.staleTime,this.cacheTimeout,h).then(f=>{f&&f.length>0&&this.updateValues(f)}).catch(f=>{let p=JSON.stringify(f,null,2);this.errors.find(v=>v.message===p)||this.errors.length<z$1&&this.errors.push({type:"error",message:p,time:new Date().getTime()})})},updateValues:function(h){if(this.updateCounter+=1,h.length!=this.screenItems.length||h.length!=this.actualScreenItems.length)console.log(`get_tlm_values mismatch: data.length: ${h.length}, screenItems.length: ${this.screenItems.length}, actualScreenItems.length: ${this.actualScreenItems.length}`,JSON.stringify(h),JSON.stringify(this.screenItems),JSON.stringify(this.actualScreenItems));else for(let f=0;f<h.length;f++)h[f].push(this.updateCounter),this.screenValues[this.screenItems[f]]=h[f]},debouncedUpdateTlmAvailable:function(){this.tlmAvailableTimeout!=null&&clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=setTimeout(()=>{this.api.get_tlm_available(this.screenItems).then(h=>{if(this.actualScreenItems=h,this.screenItems.length!=h.length)console.log("Error getting tlm available",this.screenItems,this.actualScreenItems);else for(let f=0;f<this.actualScreenItems.length;f++)if(this.actualScreenItems[f]===null){const p=this.screenItems[f].split("__"),v=this.currentDefinition.split(`
4
+ `),fe=v.findIndex(M=>M.includes(p[0])&&M.includes(p[1])&&M.includes(p[2]))+1;fe>0?this.errors.push({type:"usage",message:`Null for ${p.join(" ")}! Does it exist?`,line:v[fe-1],lineNumber:fe,time:new Date().getTime()}):this.errors.push({type:"error",message:`Null for ${p.join(" ")}! Does it exist?`,time:new Date().getTime()})}}).catch(h=>{console.log("Error getting tlm available",h),this.actualScreenItems=this.screenItems}),this.tlmAvailableTimeout=null},100)},addItem:function(h){this.screenItems.push(h),this.screenValues[h]=[null,null,0],this.debouncedUpdateTlmAvailable()},deleteItem:function(h){let f=this.screenItems.indexOf(h);this.screenItems.splice(f,1),this.debouncedUpdateTlmAvailable()}}},_e$1={ref:"screen",class:"pa-1",style:{position:"relative"}},be$1={key:1,class:"pa-1",style:{position:"relative"}};function xe$1(h,f,p,v,fe,M){const w=resolveComponent("v-btn"),A=resolveComponent("v-tooltip"),a=resolveComponent("v-spacer"),u=resolveComponent("v-toolbar"),n=resolveComponent("v-overlay"),o=resolveComponent("vertical-widget"),r=resolveComponent("v-expand-transition"),i=resolveComponent("v-card"),e=resolveComponent("edit-screen-dialog"),t=resolveComponent("v-textarea"),c=resolveComponent("v-card-actions"),g=resolveComponent("v-dialog");return openBlock(),createElementBlock("div",{ref:"bar",style:normalizeStyle(M.computedStyle)},[p.inline?createCommentVNode("",!0):(openBlock(),createBlock(i,{key:0,"min-height":fe.height,"min-width":fe.width,style:{cursor:"default"}},{default:withCtx(()=>[createVNode(u,{height:"24"},{default:withCtx(()=>[withDirectives(createVNode(w,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:f[0]||(f[0]=()=>{fe.errorDialog=!0})},null,512),[[vShow,fe.errors.length!==0]]),createVNode(w,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:M.openEdit},null,8,["onClick"]),p.fixFloated?createCommentVNode("",!0):(openBlock(),createBlock(A,{key:0,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(w,{icon:fe.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text",density:"compact","data-test":"float-screen-icon","aria-label":fe.floated?"Unfloat Screen":"Float Screen",onClick:M.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:withCtx(()=>[createElementVNode("span",null,toDisplayString(fe.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),fe.floated?(openBlock(),createBlock(A,{key:1,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(w,{icon:"mdi-arrow-up",variant:"text",density:"compact","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:M.upScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[f[6]||(f[6]=createElementVNode("span",null," Move Screen Up ",-1))]),_:1})):createCommentVNode("",!0),fe.floated&&fe.zIndex>p.minZ?(openBlock(),createBlock(A,{key:2,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(w,{icon:"mdi-arrow-down",variant:"text",density:"compact","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:M.downScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[f[7]||(f[7]=createElementVNode("span",null," Move Screen Down ",-1))]),_:1})):createCommentVNode("",!0),createVNode(a),createElementVNode("span",null,toDisplayString(p.target)+" "+toDisplayString(p.screen),1),createVNode(a),fe.expand?(openBlock(),createBlock(w,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:M.minMaxTransition},null,8,["onClick"])):(openBlock(),createBlock(w,{key:4,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:M.minMaxTransition},null,8,["onClick"])),p.showClose?(openBlock(),createBlock(w,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:f[1]||(f[1]=m=>h.$emit("close-screen"))})):createCommentVNode("",!0)]),_:1}),fe.editDialog?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[withDirectives(createElementVNode("div",_e$1,[createVNode(n,{style:{"pointer-events":"none"},"model-value":fe.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),(openBlock(),createBlock(o,{key:fe.screenKey,widgets:fe.layoutStack[0].widgets,"screen-values":fe.screenValues,"screen-time-zone":p.timeZone,onAddItem:M.addItem,onDeleteItem:M.deleteItem,onOpen:M.open,onClose:M.close,onCloseAll:M.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))],512),[[vShow,fe.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),p.inline?(openBlock(),createElementBlock("div",be$1,[createVNode(n,{style:{"pointer-events":"none"},"model-value":fe.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),withDirectives(createVNode(w,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:f[2]||(f[2]=()=>{fe.errorDialog=!0})},null,512),[[vShow,fe.errors.length!==0]]),(openBlock(),createBlock(o,{key:fe.screenKey,widgets:fe.layoutStack[0].widgets,"screen-values":fe.screenValues,"screen-time-zone":p.timeZone,onAddItem:M.addItem,onDeleteItem:M.deleteItem,onOpen:M.open,onClose:M.close,onCloseAll:M.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))])):createCommentVNode("",!0),fe.editDialog?(openBlock(),createBlock(e,{key:2,modelValue:fe.editDialog,"onUpdate:modelValue":f[3]||(f[3]=m=>fe.editDialog=m),target:p.target,screen:p.screen,definition:fe.currentDefinition,keywords:p.keywords,errors:fe.errors,onSave:M.saveEdit,onCancel:M.cancelEdit,onDelete:M.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):createCommentVNode("",!0),createVNode(g,{modelValue:fe.errorDialog,"onUpdate:modelValue":f[5]||(f[5]=m=>fe.errorDialog=m),width:"60vw"},{default:withCtx(()=>[createVNode(u,{height:"24"},{default:withCtx(()=>[createVNode(a),createElementVNode("span",null," Screen: "+toDisplayString(p.target)+" "+toDisplayString(p.screen)+" Errors ",1),createVNode(a)]),_:1}),createVNode(i,null,{default:withCtx(()=>[createVNode(t,{class:"errors",readonly:"",rows:"13","model-value":M.error},null,8,["model-value"]),createVNode(c,{class:"pb-5"},{default:withCtx(()=>[createVNode(a),createVNode(w,{variant:"outlined",class:"mr-2",onClick:M.clearErrors},{default:withCtx(()=>[...f[8]||(f[8]=[createTextVNode(" Clear Errors ",-1)])]),_:1},8,["onClick"]),createVNode(w,{variant:"flat",class:"mr-2",onClick:f[4]||(f[4]=m=>fe.errorDialog=!1)},{default:withCtx(()=>[...f[9]||(f[9]=[createTextVNode(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],4)}const Ee$1=d(ye$1,[["render",xe$1],["__scopeId","data-v-dca85517"]]),s={methods:{isFloat(h){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(h)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(h))},isInt(h){return!!(/^\s*[-+]?\d+\s*$/.test(h)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(h))},isArray(h){return/^\s*\[.*\]\s*$/.test(h)},removeQuotes(h){if(h.length<2)return h;let f=h.charAt(0);if(f!=='"'&&f!=="'")return h;let p=h.charAt(h.length-1);return f!==p?h:h.slice(1,-1)},convertToString(h){let f="";if(Object.prototype.toString.call(h).slice(8,-1)==="Array"){let p=h.length;f="[ ";for(let v=0;v<p;v++)Object.prototype.toString.call(h[v]).slice(8,-1)==="String"?f+='"'+h[v]+'"':f+=h[v],v!==p-1&&(f+=", ");f+=" ]"}else if(Object.prototype.toString.call(h).slice(8,-1)==="Object")if(h.json_class==="String"&&h.raw){f="0x";for(let p of h.raw)f+=p.toString(16).padStart(2,"0").toUpperCase()}else h.json_class==="Float"&&h.raw?f=h.raw:f=JSON.stringify(h).replace(/\\n/g,"");else f=String(h);return f}}},F={name:"CommandParameterEditor",mixins:[s],props:{modelValue:{type:[String,Number],default:void 0},states:{type:Object,default:()=>null},statesInHex:{type:Boolean,default:!1}},emits:["update:modelValue"],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(h=>({label:h,...this.states[h]})):null},hazardous(){var h,f;return((f=(h=Object.entries(this.states).find(([p,v])=>v.value===this.modelValue))==null?void 0:h.at(1))==null?void 0:f.hazardous)!==void 0},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},methods:{handleChange(h){this.$emit("update:modelValue",h)}}},q={key:1,class:"d-flex align-center"};function L(h,f,p,v,fe,M){const w=resolveComponent("v-text-field"),A=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[p.states?(openBlock(),createElementBlock("div",q,[createVNode(A,{items:M.stateOptions,"model-value":M.selectValue,"item-title":"label",class:normalizeClass(M.stateClass),"hide-details":"",density:"compact",variant:"outlined",placeholder:"Select...","min-width":"120px","data-test":"cmd-param-select","onUpdate:modelValue":M.handleChange},null,8,["items","model-value","class","onUpdate:modelValue"]),createVNode(w,{"model-value":M.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"])])):(openBlock(),createBlock(w,{key:0,"model-value":M.textFieldValue,"hide-details":"",density:"compact",variant:"filled","data-test":"cmd-param-value","onUpdate:modelValue":M.handleChange},null,8,["model-value","onUpdate:modelValue"]))])}const H$1=d(F,[["render",L],["__scopeId","data-v-b38d5e7f"]]),z={name:"CommandEditor",components:{TargetPacketItemChooser:U,CommandParameterEditor:H$1,DetailsDialog:P$1},mixins:[s],props:{initialTargetName:{type:String,default:null},initialPacketName:{type:String,default:null},cmdString:{type:String,default:null},sendDisabled:{type:Boolean,default:!1},statesInHex:{type:Boolean,default:!1},showIgnoredParams:{type:Boolean,default:!1},cmdRaw:{type:Boolean,default:!1},showCommandButton:{type:Boolean,default:!0},showQueueSelect:{type:Boolean,default:!0}},emits:["command-changed","build-cmd"],data(){return{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"}],api:null,targetName:"",commandName:"",commandDescription:"",ignoredParams:[],computedRows:[],reservedItemNames:["PACKET_TIMESECONDS","PACKET_TIMEFORMATTED","RECEIVED_TIMESECONDS","RECEIVED_TIMEFORMATTED","RECEIVED_COUNT"],contextMenuShown:!1,viewDetails:!1,parameterName:"",x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}}]}},created(){this.api=new BA,this.cmdString?this.processCmdString():(this.targetName=this.initialTargetName,this.commandName=this.initialPacketName,this.updateCmdParams())},methods:{commandChanged(h){(this.targetName!==h.targetName||this.commandName!==h.packetName)&&(this.targetName=h.targetName,this.commandName=h.packetName,this.updateCmdParams()),this.$emit("command-changed",h)},buildCmd(h){this.$emit("build-cmd",h)},showContextMenu(h,f){h.preventDefault(),this.parameterName=f.item.parameter_name,this.contextMenuShown=!1,this.x=h.clientX,this.y=h.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},updateCmdParams(){this.ignoredParams=[],this.computedRows=[],this.targetName&&this.commandName&&this.api.get_target(this.targetName).then(h=>(this.ignoredParams=h.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),h=>{console.error("Error getting ignored parameters:",h)}).then(h=>{h&&(h.items.forEach(f=>{if(!this.reservedItemNames.includes(f.name)&&!f.hidden&&(!this.ignoredParams.includes(f.name)||this.showIgnoredParams)){let p=f.default;!f.states&&f.data_type==="STRING"&&typeof f.default=="string"&&(p=`'${p}'`),f.required&&(p=null),f.format_string&&f.default&&(p=sprintf(f.format_string,f.default)),Object.prototype.toString.call(p).slice(8,-1)==="Object"&&(p=this.convertToString(p));let v="N/A";f.minimum!=null&&f.maximum!=null&&(f.data_type==="FLOAT"&&(f.minimum<-1e6&&(f.minimum=f.minimum.toExponential(3)),f.maximum>1e6&&(f.maximum=f.maximum.toExponential(3))),v=`${f.minimum}..${f.maximum}`),this.computedRows.push({parameter_name:f.name,val:p,states:f.states,description:f.description,range:v,units:f.units,type:f.data_type})}}),this.commandDescription=h.description,this.populateParametersFromParsed())},h=>{console.error("Error getting command parameters:",h)})},triggerUpdateCmdParams(){this.updateCmdParams()},getRows(){return this.computedRows},getCmdString(){let h=`${this.targetName} ${this.commandName}`;if(this.computedRows.length===0)return h;h+=" with";for(const f of this.computedRows){if(f.val===null)throw new Error(`Required parameter ${f.parameter_name} not set`);if(f.val!==null&&f.val!==void 0&&f.val!==""){if(f.states){const v=Object.entries(f.states).find(([,fe])=>fe.value===f.val);if(v){h+=` ${f.parameter_name} '${v[0]}',`;continue}}let p=this.convertToString(f.val);p.includes(" ")&&!this.isArray(p)?h+=` ${f.parameter_name} '${p}',`:h+=` ${f.parameter_name} ${p},`}}return h.slice(0,-1)},parseCmdString(h){const f=h.split(" ");if(f.length<2)return{target:"",command:"",params:{}};if(f.length===2)return{target:f[0],command:f[1],params:{}};if(f[2]!=="with")return{target:"",command:"",params:{}};const p=f[0],v=f[1];let fe={};const M=h.split(" with ")[1];let w=[],A=0,a="";for(let u of M)u==="["?(A++,a+=u):u==="]"?(A--,a+=u):u===","&&A===0?(w.push(a.trim()),a=""):a+=u;a.trim()!==""&&w.push(a.trim());for(let u of w){let n=u.indexOf(" ");if(n>0){let o=u.substring(0,n).trim(),r=u.substring(n+1).trim();fe[o]=r}}return{target:p,command:v,params:fe}},processCmdString(){const h=this.parseCmdString(this.cmdString);h.target&&h.command&&(this.targetName=h.target,this.commandName=h.command,this.parsedParameters=h.params,this.updateCmdParams())},populateParametersFromParsed(){!this.parsedParameters||Object.keys(this.parsedParameters).length===0||this.$nextTick(()=>{setTimeout(()=>{this.computedRows.forEach(h=>{if(this.parsedParameters.hasOwnProperty(h.parameter_name)){const f=this.parsedParameters[h.parameter_name];if(h.states&&typeof f=="string"){const p=Object.keys(h.states).find(v=>v===f||v.toLowerCase()===f.toLowerCase());p?h.val=h.states[p].value:h.val=f}else h.type==="STRING"&&typeof f=="string"?h.val=f.startsWith("'")||f.startsWith('"')?f:`'${f}'`:h.val=f}})},100)})}}},K={style:{padding:"10px"}};function G$1(h,f,p,v,fe,M){const w=resolveComponent("target-packet-item-chooser"),A=resolveComponent("v-spacer"),a=resolveComponent("v-text-field"),u=resolveComponent("v-card-title"),n=resolveComponent("command-parameter-editor"),o=resolveComponent("v-data-table"),r=resolveComponent("v-card"),i=resolveComponent("v-list-item-title"),e=resolveComponent("v-list-item"),t=resolveComponent("v-list"),c=resolveComponent("v-menu"),g=resolveComponent("details-dialog");return openBlock(),createBlock(r,null,{default:withCtx(()=>[createElementVNode("div",K,[createVNode(w,{"initial-target-name":fe.targetName,"initial-packet-name":fe.commandName,disabled:p.sendDisabled,"button-text":p.showCommandButton?"Send":null,"show-queue-select":p.showQueueSelect,mode:"cmd",onOnSet:f[0]||(f[0]=m=>M.commandChanged(m)),onAddItem:f[1]||(f[1]=m=>M.buildCmd(m))},null,8,["initial-target-name","initial-packet-name","disabled","button-text","show-queue-select"])]),fe.computedRows.length!==0?(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[createVNode(u,{class:"d-flex align-center justify-content-space-between"},{default:withCtx(()=>[f[5]||(f[5]=createTextVNode(" Parameters ",-1)),createVNode(A),createVNode(a,{modelValue:fe.search,"onUpdate:modelValue":f[2]||(f[2]=m=>fe.search=m),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),createVNode(o,{headers:fe.headers,items:fe.computedRows,search:fe.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact","onContextmenu:row":M.showContextMenu},{"item.val":withCtx(({item:m})=>[renderSlot(h.$slots,"parameter-editor",{item:m,statesInHex:p.statesInHex},()=>[createVNode(n,{modelValue:m.val,"onUpdate:modelValue":E=>m.val=E,states:m.states,"states-in-hex":p.statesInHex},null,8,["modelValue","onUpdate:modelValue","states","states-in-hex"])])]),_:3},8,["headers","items","search","onContextmenu:row"])]),_:3})):createCommentVNode("",!0),createVNode(c,{modelValue:fe.contextMenuShown,"onUpdate:modelValue":f[3]||(f[3]=m=>fe.contextMenuShown=m),target:[fe.x,fe.y]},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(fe.contextMenuOptions,(m,E)=>(openBlock(),createBlock(e,{key:E,onClick:withModifiers(m.action,["stop"])},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[createTextVNode(toDisplayString(m.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),createVNode(g,{modelValue:fe.viewDetails,"onUpdate:modelValue":f[4]||(f[4]=m=>fe.viewDetails=m),"target-name":fe.targetName,"packet-name":fe.commandName,"item-name":fe.parameterName,type:"cmd"},null,8,["modelValue","target-name","packet-name","item-name"])]),_:3})}const ie$1=d(z,[["render",G$1]]);var ace$1={exports:{}},hasRequiredAce;function requireAce(){return hasRequiredAce||(hasRequiredAce=1,function(h,f){(function(){var p="ace",v=function(){return this}();!v&&typeof window<"u"&&(v=window);var fe=function(n,o,r){if(typeof n!="string"){fe.original?fe.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=o),fe.modules[n]||(fe.payloads[n]=r,fe.modules[n]=null)};fe.modules={},fe.payloads={};var M=function(n,o,r){if(typeof o=="string"){var i=a(n,o);if(i!=null)return r&&r(),i}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var e=[],t=0,c=o.length;t<c;++t){var g=a(n,o[t]);if(g==null&&w.original)return;e.push(g)}return r&&r.apply(null,e)||!0}},w=function(n,o){var r=M("",n,o);return r==null&&w.original?w.original.apply(this,arguments):r},A=function(n,o){if(o.indexOf("!")!==-1){var r=o.split("!");return A(n,r[0])+"!"+A(n,r[1])}if(o.charAt(0)=="."){var i=n.split("/").slice(0,-1).join("/");for(o=i+"/"+o;o.indexOf(".")!==-1&&e!=o;){var e=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},a=function(n,o){o=A(n,o);var r=fe.modules[o];if(!r){if(r=fe.payloads[o],typeof r=="function"){var i={},e={id:o,uri:"",exports:i,packaged:!0},t=function(g,m){return M(o,g,m)},c=r(t,i,e);i=c||e.exports,fe.modules[o]=i,delete fe.payloads[o]}r=fe.modules[o]=i||r}return r};function u(n){var o=v;v[n]||(v[n]={}),o=v[n],(!o.define||!o.define.packaged)&&(fe.original=o.define,o.define=fe,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(w.original=o.require,o.require=w,o.require.packaged=!0)}u(p)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(p,v,fe){function M(w,A,a){Object.defineProperty(w,A,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||M(String.prototype,"startsWith",function(w,A){return A=A||0,this.lastIndexOf(w,A)===A}),String.prototype.endsWith||M(String.prototype,"endsWith",function(w,A){var a=this;(A===void 0||A>a.length)&&(A=a.length),A-=w.length;var u=a.indexOf(w,A);return u!==-1&&u===A}),String.prototype.repeat||M(String.prototype,"repeat",function(w){for(var A="",a=this;w>0;)w&1&&(A+=a),(w>>=1)&&(a+=a);return A}),String.prototype.includes||M(String.prototype,"includes",function(w,A){return this.indexOf(w,A)!=-1}),Object.assign||(Object.assign=function(w){if(w==null)throw new TypeError("Cannot convert undefined or null to object");for(var A=Object(w),a=1;a<arguments.length;a++){var u=arguments[a];u!=null&&Object.keys(u).forEach(function(n){A[n]=u[n]})}return A}),Object.values||(Object.values=function(w){return Object.keys(w).map(function(A){return w[A]})}),Array.prototype.find||M(Array.prototype,"find",function(w){for(var A=this.length,a=arguments[1],u=0;u<A;u++){var n=this[u];if(w.call(a,n,u,this))return n}}),Array.prototype.findIndex||M(Array.prototype,"findIndex",function(w){for(var A=this.length,a=arguments[1],u=0;u<A;u++){var n=this[u];if(w.call(a,n,u,this))return u}}),Array.prototype.includes||M(Array.prototype,"includes",function(w,A){return this.indexOf(w,A)!=-1}),Array.prototype.fill||M(Array.prototype,"fill",function(w){for(var A=this,a=A.length>>>0,u=arguments[1],n=u>>0,o=n<0?Math.max(a+n,0):Math.min(n,a),r=arguments[2],i=r===void 0?a:r>>0,e=i<0?Math.max(a+i,0):Math.min(i,a);o<e;)A[o]=w,o++;return A}),Array.of||M(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(p,v,fe){p("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(p,v,fe){v.deepCopy=function M(w){if(typeof w!="object"||!w)return w;var A;if(Array.isArray(w)){A=[];for(var a=0;a<w.length;a++)A[a]=M(w[a]);return A}if(Object.prototype.toString.call(w)!=="[object Object]")return w;A={};for(var a in w)A[a]=M(w[a]);return A}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(p,v,fe){v.last=function(A){return A[A.length-1]},v.stringReverse=function(A){return A.split("").reverse().join("")},v.stringRepeat=function(A,a){for(var u="";a>0;)a&1&&(u+=A),(a>>=1)&&(A+=A);return u};var M=/^\s\s*/,w=/\s\s*$/;v.stringTrimLeft=function(A){return A.replace(M,"")},v.stringTrimRight=function(A){return A.replace(w,"")},v.copyObject=function(A){var a={};for(var u in A)a[u]=A[u];return a},v.copyArray=function(A){for(var a=[],u=0,n=A.length;u<n;u++)A[u]&&typeof A[u]=="object"?a[u]=this.copyObject(A[u]):a[u]=A[u];return a},v.deepCopy=p("./deep_copy").deepCopy,v.arrayToMap=function(A){for(var a={},u=0;u<A.length;u++)a[A[u]]=1;return a},v.createMap=function(A){var a=Object.create(null);for(var u in A)a[u]=A[u];return a},v.arrayRemove=function(A,a){for(var u=0;u<=A.length;u++)a===A[u]&&A.splice(u,1)},v.escapeRegExp=function(A){return A.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},v.escapeHTML=function(A){return(""+A).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},v.getMatchOffsets=function(A,a){var u=[];return A.replace(a,function(n){u.push({offset:arguments[arguments.length-2],length:n.length})}),u},v.deferredCall=function(A){var a=null,u=function(){a=null,A()},n=function(o){return n.cancel(),a=setTimeout(u,o||0),n};return n.schedule=n,n.call=function(){return this.cancel(),A(),n},n.cancel=function(){return clearTimeout(a),a=null,n},n.isPending=function(){return a},n},v.delayedCall=function(A,a){var u=null,n=function(){u=null,A()},o=function(r){u==null&&(u=setTimeout(n,r||a))};return o.delay=function(r){u&&clearTimeout(u),u=setTimeout(n,r||a)},o.schedule=o,o.call=function(){this.cancel(),A()},o.cancel=function(){u&&clearTimeout(u),u=null},o.isPending=function(){return u},o},v.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},v.skipEmptyMatch=function(A,a,u){return u&&A.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(p,v,fe){v.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},v.getOS=function(){return v.isMac?v.OS.MAC:v.isLinux?v.OS.LINUX:v.OS.WINDOWS};var M=typeof navigator=="object"?navigator:{},w=(/mac|win|linux/i.exec(M.platform)||["other"])[0].toLowerCase(),A=M.userAgent||"",a=M.appName||"";v.isWin=w=="win",v.isMac=w=="mac",v.isLinux=w=="linux",v.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((A.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((A.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),v.isOldIE=v.isIE&&v.isIE<9,v.isGecko=v.isMozilla=A.match(/ Gecko\/\d+/),v.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",v.isWebKit=parseFloat(A.split("WebKit/")[1])||void 0,v.isChrome=parseFloat(A.split(" Chrome/")[1])||void 0,v.isSafari=parseFloat(A.split(" Safari/")[1])&&!v.isChrome||void 0,v.isEdge=parseFloat(A.split(" Edge/")[1])||void 0,v.isAIR=A.indexOf("AdobeAIR")>=0,v.isAndroid=A.indexOf("Android")>=0,v.isChromeOS=A.indexOf(" CrOS ")>=0,v.isIOS=/iPad|iPhone|iPod/.test(A)&&!window.MSStream,v.isIOS&&(v.isMac=!0),v.isMobile=v.isIOS||v.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(p,v,fe){var M=p("./useragent"),w="http://www.w3.org/1999/xhtml";v.buildDom=function r(i,e,t){if(typeof i=="string"&&i){var c=document.createTextNode(i);return e&&e.appendChild(c),c}if(!Array.isArray(i))return i&&i.appendChild&&e&&e.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var g=[],m=0;m<i.length;m++){var E=r(i[m],e,t);E&&g.push(E)}return g}var T=document.createElement(i[0]),x=i[1],b=1;x&&typeof x=="object"&&!Array.isArray(x)&&(b=2);for(var m=b;m<i.length;m++)r(i[m],T,t);return b==2&&Object.keys(x).forEach(function(de){var Te=x[de];de==="class"?T.className=Array.isArray(Te)?Te.join(" "):Te:typeof Te=="function"||de=="value"||de[0]=="$"?T[de]=Te:de==="ref"?t&&(t[Te]=T):de==="style"?typeof Te=="string"&&(T.style.cssText=Te):Te!=null&&T.setAttribute(de,Te)}),e&&e.appendChild(T),T},v.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},v.createElement=function(r,i){return document.createElementNS?document.createElementNS(i||w,r):document.createElement(r)},v.removeChildren=function(r){r.innerHTML=""},v.createTextNode=function(r,i){var e=i?i.ownerDocument:document;return e.createTextNode(r)},v.createFragment=function(r){var i=r?r.ownerDocument:document;return i.createDocumentFragment()},v.hasCssClass=function(r,i){var e=(r.className+"").split(/\s+/g);return e.indexOf(i)!==-1},v.addCssClass=function(r,i){v.hasCssClass(r,i)||(r.className+=" "+i)},v.removeCssClass=function(r,i){for(var e=r.className.split(/\s+/g);;){var t=e.indexOf(i);if(t==-1)break;e.splice(t,1)}r.className=e.join(" ")},v.toggleCssClass=function(r,i){for(var e=r.className.split(/\s+/g),t=!0;;){var c=e.indexOf(i);if(c==-1)break;t=!1,e.splice(c,1)}return t&&e.push(i),r.className=e.join(" "),t},v.setCssClass=function(r,i,e){e?v.addCssClass(r,i):v.removeCssClass(r,i)},v.hasCssString=function(r,i){var e=0,t;if(i=i||document,t=i.querySelectorAll("style")){for(;e<t.length;)if(t[e++].id===r)return!0}},v.removeElementById=function(r,i){i=i||document,i.getElementById(r)&&i.getElementById(r).remove()};var A,a=[];v.useStrictCSP=function(r){A=r,r==!1?u():a||(a=[])};function u(){var r=a;a=null,r&&r.forEach(function(i){n(i[0],i[1])})}function n(r,i,e){if(!(typeof document>"u")){if(a){if(e)u();else if(e===!1)return a.push([r,i])}if(!A){var t=e;!e||!e.getRootNode?t=document:(t=e.getRootNode(),(!t||t==e)&&(t=document));var c=t.ownerDocument||t;if(i&&v.hasCssString(i,t))return null;i&&(r+=`
5
+ /*# sourceURL=ace/css/`+i+" */");var g=v.createElement("style");g.appendChild(c.createTextNode(r)),i&&(g.id=i),t==c&&(t=v.getDocumentHead(c)),t.insertBefore(g,t.firstChild)}}}if(v.importCssString=n,v.importCssStylsheet=function(r,i){v.buildDom(["link",{rel:"stylesheet",href:r}],v.getDocumentHead(i))},v.$fixPositionBug=function(r){var i=r.getBoundingClientRect();if(r.style.left){var e=parseFloat(r.style.left),t=+i.left;Math.abs(e-t)>1&&(r.style.left=2*e-t+"px")}if(r.style.right){var e=parseFloat(r.style.right),t=window.innerWidth-i.right;Math.abs(e-t)>1&&(r.style.right=2*e-t+"px")}if(r.style.top){var e=parseFloat(r.style.top),t=+i.top;Math.abs(e-t)>1&&(r.style.top=2*e-t+"px")}if(r.style.bottom){var e=parseFloat(r.style.bottom),t=window.innerHeight-i.bottom;Math.abs(e-t)>1&&(r.style.bottom=2*e-t+"px")}},v.scrollbarWidth=function(r){var i=v.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var e=v.createElement("ace_outer"),t=e.style;t.position="absolute",t.left="-10000px",t.overflow="hidden",t.width="200px",t.minWidth="0px",t.height="150px",t.display="block",e.appendChild(i);var c=r&&r.documentElement||document&&document.documentElement;if(!c)return 0;c.appendChild(e);var g=i.offsetWidth;t.overflow="scroll";var m=i.offsetWidth;return g===m&&(m=e.clientWidth),c.removeChild(e),g-m},v.computedStyle=function(r,i){return window.getComputedStyle(r,"")||{}},v.setStyle=function(r,i,e){r[i]!==e&&(r[i]=e)},v.HAS_CSS_ANIMATION=!1,v.HAS_CSS_TRANSFORMS=!1,v.HI_DPI=M.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,M.isChromeOS&&(v.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");v.HI_DPI&&o.style.transform!==void 0&&(v.HAS_CSS_TRANSFORMS=!0),!M.isEdge&&typeof o.style.animationName<"u"&&(v.HAS_CSS_ANIMATION=!0),o=null}v.HAS_CSS_TRANSFORMS?v.translate=function(r,i,e){r.style.transform="translate("+Math.round(i)+"px, "+Math.round(e)+"px)"}:v.translate=function(r,i,e){r.style.top=Math.round(e)+"px",r.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(p,v,fe){/*
6
+ * based on code from:
7
+ *
8
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
9
+ * Available via the MIT or new BSD license.
10
+ * see: http://github.com/jrburke/requirejs for details
11
+ */var M=p("./dom");v.get=function(w,A){var a=new XMLHttpRequest;a.open("GET",w,!0),a.onreadystatechange=function(){a.readyState===4&&A(a.responseText)},a.send(null)},v.loadScript=function(w,A){var a=M.getDocumentHead(),u=document.createElement("script");u.src=w,a.appendChild(u),u.onload=u.onreadystatechange=function(n,o){(o||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,o||A())}},v.qualifyURL=function(w){var A=document.createElement("a");return A.href=w,A.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(p,v,fe){v.inherits=function(M,w){M.super_=w,M.prototype=Object.create(w.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}})},v.mixin=function(M,w){for(var A in w)M[A]=w[A];return M},v.implement=function(M,w){v.mixin(M,w)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(p,v,fe){var M={},w=function(){this.propagationStopped=!0},A=function(){this.defaultPrevented=!0};M._emit=M._dispatchEvent=function(a,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[a]||[],o=this._defaultHandlers[a];if(!(!n.length&&!o)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=a),u.stopPropagation||(u.stopPropagation=w),u.preventDefault||(u.preventDefault=A),n=n.slice();for(var r=0;r<n.length&&(n[r](u,this),!u.propagationStopped);r++);if(o&&!u.defaultPrevented)return o(u,this)}},M._signal=function(a,u){var n=(this._eventRegistry||{})[a];if(n){n=n.slice();for(var o=0;o<n.length;o++)n[o](u,this)}},M.once=function(a,u){var n=this;if(this.on(a,function o(){n.off(a,o),u.apply(null,arguments)}),!u)return new Promise(function(o){u=o})},M.setDefaultHandler=function(a,u){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[a]){var o=n[a],r=n._disabled_[a];r||(n._disabled_[a]=r=[]),r.push(o);var i=r.indexOf(u);i!=-1&&r.splice(i,1)}n[a]=u},M.removeDefaultHandler=function(a,u){var n=this._defaultHandlers;if(n){var o=n._disabled_[a];if(n[a]==u)o&&this.setDefaultHandler(a,o.pop());else if(o){var r=o.indexOf(u);r!=-1&&o.splice(r,1)}}},M.on=M.addEventListener=function(a,u,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[a];return o||(o=this._eventRegistry[a]=[]),o.indexOf(u)==-1&&o[n?"unshift":"push"](u),u},M.off=M.removeListener=M.removeEventListener=function(a,u){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[a];if(n){var o=n.indexOf(u);o!==-1&&n.splice(o,1)}},M.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},v.EventEmitter=M}),ace.define("ace/lib/report_error",["require","exports","module"],function(p,v,fe){v.reportError=function(w,A){var a=new Error(w);a.data=A,typeof console=="object"&&console.error&&console.error(a),setTimeout(function(){throw a})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(p,v,fe){var M={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};v.defaultEnglishMessages=M}),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,v,fe){"no use strict";var M=p("./oop"),w=p("./event_emitter").EventEmitter,A=p("./report_error").reportError,a=p("./default_english_messages").defaultEnglishMessages,u={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var c=this.$options;e=Object.keys(c).filter(function(g){return!c[g].hidden})}return e.forEach(function(g){t[g]=this.getOption(g)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var c=this.$options[e];if(!c)return n('misspelled option "'+e+'"');if(c.forwardTo)return this[c.forwardTo]&&this[c.forwardTo].setOption(e,t);c.handlesSet||(this["$"+e]=t),c&&c.set&&c.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:n('misspelled option "'+e+'"')}};function n(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,r,i=function(){function e(){this.$defaultOptions={},o=a,r="dollarSigns"}return e.prototype.defineOptions=function(t,c,g){return t.$options||(this.$defaultOptions[c]=t.$options={}),Object.keys(g).forEach(function(m){var E=g[m];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=m),t.$options[E.name]=E,"initialValue"in E&&(t["$"+E.name]=E.initialValue)}),M.implement(t,u),this},e.prototype.resetOptions=function(t){Object.keys(t.$options).forEach(function(c){var g=t.$options[c];"value"in g&&t.setOption(c,g.value)})},e.prototype.setDefaultValue=function(t,c,g){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][c])break;if(!this.$defaultOptions[t][c])return!1}var m=this.$defaultOptions[t]||(this.$defaultOptions[t]={});m[c]&&(m.forwardTo?this.setDefaultValue(m.forwardTo,c,g):m[c].value=g)},e.prototype.setDefaultValues=function(t,c){Object.keys(c).forEach(function(g){this.setDefaultValue(t,g,c[g])},this)},e.prototype.setMessages=function(t,c){o=t,c&&c.placeholders&&(r=c.placeholders)},e.prototype.nls=function(t,c,g){o[t]||(n("No message found for the key '"+t+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+c+"'."),o[c]||n("No message found for the default string '"+c+"' in the provided messages. Falling back to the default English message."));var m=o[t]||o[c]||c;return g&&(r==="dollarSigns"&&(m=m.replace(/\$(\$|[\d]+)/g,function(E,T){return T=="$"?"$":g[T]})),r==="curlyBrackets"&&(m=m.replace(/\{([^\}]+)\}/g,function(E,T){return g[T]}))),m},e}();i.prototype.warn=n,i.prototype.reportError=A,M.implement(i.prototype,w),v.AppConfig=i}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(p,v,fe){fe.exports=`.ace-tm .ace_gutter {
12
+ background: #f0f0f0;
13
+ color: #333;
14
+ }
15
+
16
+ .ace-tm .ace_print-margin {
17
+ width: 1px;
18
+ background: #e8e8e8;
19
+ }
20
+
21
+ .ace-tm .ace_fold {
22
+ background-color: #6B72E6;
23
+ }
24
+
25
+ .ace-tm {
26
+ background-color: #FFFFFF;
27
+ color: black;
28
+ }
29
+
30
+ .ace-tm .ace_cursor {
31
+ color: black;
32
+ }
33
+
34
+ .ace-tm .ace_invisible {
35
+ color: rgb(191, 191, 191);
36
+ }
37
+
38
+ .ace-tm .ace_storage,
39
+ .ace-tm .ace_keyword {
40
+ color: blue;
41
+ }
42
+
43
+ .ace-tm .ace_constant {
44
+ color: rgb(197, 6, 11);
45
+ }
46
+
47
+ .ace-tm .ace_constant.ace_buildin {
48
+ color: rgb(88, 72, 246);
49
+ }
50
+
51
+ .ace-tm .ace_constant.ace_language {
52
+ color: rgb(88, 92, 246);
53
+ }
54
+
55
+ .ace-tm .ace_constant.ace_library {
56
+ color: rgb(6, 150, 14);
57
+ }
58
+
59
+ .ace-tm .ace_invalid {
60
+ background-color: rgba(255, 0, 0, 0.1);
61
+ color: red;
62
+ }
63
+
64
+ .ace-tm .ace_support.ace_function {
65
+ color: rgb(60, 76, 114);
66
+ }
67
+
68
+ .ace-tm .ace_support.ace_constant {
69
+ color: rgb(6, 150, 14);
70
+ }
71
+
72
+ .ace-tm .ace_support.ace_type,
73
+ .ace-tm .ace_support.ace_class {
74
+ color: rgb(109, 121, 222);
75
+ }
76
+
77
+ .ace-tm .ace_keyword.ace_operator {
78
+ color: rgb(104, 118, 135);
79
+ }
80
+
81
+ .ace-tm .ace_string {
82
+ color: rgb(3, 106, 7);
83
+ }
84
+
85
+ .ace-tm .ace_comment {
86
+ color: rgb(76, 136, 107);
87
+ }
88
+
89
+ .ace-tm .ace_comment.ace_doc {
90
+ color: rgb(0, 102, 255);
91
+ }
92
+
93
+ .ace-tm .ace_comment.ace_doc.ace_tag {
94
+ color: rgb(128, 159, 191);
95
+ }
96
+
97
+ .ace-tm .ace_constant.ace_numeric {
98
+ color: rgb(0, 0, 205);
99
+ }
100
+
101
+ .ace-tm .ace_variable {
102
+ color: rgb(49, 132, 149);
103
+ }
104
+
105
+ .ace-tm .ace_xml-pe {
106
+ color: rgb(104, 104, 91);
107
+ }
108
+
109
+ .ace-tm .ace_entity.ace_name.ace_function {
110
+ color: #0000A2;
111
+ }
112
+
113
+
114
+ .ace-tm .ace_heading {
115
+ color: rgb(12, 7, 255);
116
+ }
117
+
118
+ .ace-tm .ace_list {
119
+ color:rgb(185, 6, 144);
120
+ }
121
+
122
+ .ace-tm .ace_meta.ace_tag {
123
+ color:rgb(0, 22, 142);
124
+ }
125
+
126
+ .ace-tm .ace_string.ace_regex {
127
+ color: rgb(255, 0, 0)
128
+ }
129
+
130
+ .ace-tm .ace_marker-layer .ace_selection {
131
+ background: rgb(181, 213, 255);
132
+ }
133
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
134
+ box-shadow: 0 0 3px 0px white;
135
+ }
136
+ .ace-tm .ace_marker-layer .ace_step {
137
+ background: rgb(252, 255, 0);
138
+ }
139
+
140
+ .ace-tm .ace_marker-layer .ace_stack {
141
+ background: rgb(164, 229, 101);
142
+ }
143
+
144
+ .ace-tm .ace_marker-layer .ace_bracket {
145
+ margin: -1px 0 0 -1px;
146
+ border: 1px solid rgb(192, 192, 192);
147
+ }
148
+
149
+ .ace-tm .ace_marker-layer .ace_active-line {
150
+ background: rgba(0, 0, 0, 0.07);
151
+ }
152
+
153
+ .ace-tm .ace_gutter-active-line {
154
+ background-color : #dcdcdc;
155
+ }
156
+
157
+ .ace-tm .ace_marker-layer .ace_selected-word {
158
+ background: rgb(250, 250, 255);
159
+ border: 1px solid rgb(200, 200, 250);
160
+ }
161
+
162
+ .ace-tm .ace_indent-guide {
163
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
164
+ }
165
+
166
+ .ace-tm .ace_indent-guide-active {
167
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
168
+ }
169
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(p,v,fe){v.isDark=!1,v.cssClass="ace-tm",v.cssText=p("./textmate-css"),v.$id="ace/theme/textmate";var M=p("../lib/dom");M.importCssString(v.cssText,v.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,v,fe){"no use strict";var M=p("./lib/lang"),w=p("./lib/net"),A=p("./lib/dom"),a=p("./lib/app_config").AppConfig;fe.exports=v=new a;var u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};v.get=function(i){if(!u.hasOwnProperty(i))throw new Error("Unknown config key: "+i);return u[i]},v.set=function(i,e){if(u.hasOwnProperty(i))u[i]=e;else if(this.setDefaultValue("",i,e)==!1)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&A.useStrictCSP(e)},v.all=function(){return M.copyObject(u)},v.$modes={},v.moduleUrl=function(i,e){if(u.$moduleUrls[i])return u.$moduleUrls[i];var t=i.split("/");e=e||t[t.length-2]||"";var c=e=="snippets"?"/":"-",g=t[t.length-1];if(e=="worker"&&c=="-"){var m=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");g=g.replace(m,"")}(!g||g==e)&&t.length>1&&(g=t[t.length-2]);var E=u[e+"Path"];return E==null?E=u.basePath:c=="/"&&(e=c=""),E&&E.slice(-1)!="/"&&(E+="/"),E+e+c+g+this.get("suffix")},v.setModuleUrl=function(i,e){return u.$moduleUrls[i]=e};var n=function(i,e){if(i==="ace/theme/textmate"||i==="./theme/textmate")return e(null,p("./theme/textmate"));if(o)return o(i,e);console.error("loader is not configured")},o;v.setLoader=function(i){o=i},v.dynamicModules=Object.create(null),v.$loading={},v.$loaded={},v.loadModule=function(i,e){var t;if(Array.isArray(i))var c=i[0],g=i[1];else if(typeof i=="string")var g=i;var m=function(E){if(E&&!v.$loading[g])return e&&e(E);if(v.$loading[g]||(v.$loading[g]=[]),v.$loading[g].push(e),!(v.$loading[g].length>1)){var T=function(){n(g,function(x,b){b&&(v.$loaded[g]=b),v._emit("load.module",{name:g,module:b});var de=v.$loading[g];v.$loading[g]=null,de.forEach(function(Te){Te&&Te(b)})})};if(!v.get("packaged"))return T();w.loadScript(v.moduleUrl(g,c),T),r()}};if(v.dynamicModules[g])v.dynamicModules[g]().then(function(E){E.default?m(E.default):m(E)});else{try{t=this.$require(g)}catch{}m(t||v.$loaded[g])}},v.$require=function(i){if(typeof fe.require=="function"){var e="require";return fe[e](i)}},v.setModuleLoader=function(i,e){v.dynamicModules[i]=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(){})};v.version="1.43.4"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(p,v,fe){p("./lib/fixoldbrowsers");var M=p("./config");M.setLoader(function(u,n){p([u],function(o){n(null,o)})});var w=function(){return this||typeof window<"u"&&window}();fe.exports=function(u){M.init=A,M.$require=p,u.require=p},A(!0);function A(u){if(!(!w||!w.document)){M.set("packaged",u||p.packaged||fe.packaged||w.define&&(void 0).packaged);var n={},o="",r=document.currentScript||document._currentScript,i=r&&r.ownerDocument||document;r&&r.src&&(o=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=i.getElementsByTagName("script"),t=0;t<e.length;t++){var c=e[t],g=c.src||c.getAttribute("src");if(g){for(var m=c.attributes,E=0,T=m.length;E<T;E++){var x=m[E];x.name.indexOf("data-ace-")===0&&(n[a(x.name.replace(/^data-ace-/,""))]=x.value)}var b=g.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(o=b[1])}}o&&(n.base=n.base||o,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base;for(var de in n)typeof n[de]<"u"&&M.set(de,n[de])}}function a(u){return u.replace(/-(.)/g,function(n,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(p,v,fe){var M=function(){function w(A,a,u,n){this.start={row:A,column:a},this.end={row:u,column:n}}return w.prototype.isEqual=function(A){return this.start.row===A.start.row&&this.end.row===A.end.row&&this.start.column===A.start.column&&this.end.column===A.end.column},w.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},w.prototype.contains=function(A,a){return this.compare(A,a)==0},w.prototype.compareRange=function(A){var a,u=A.end,n=A.start;return a=this.compare(u.row,u.column),a==1?(a=this.compare(n.row,n.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(n.row,n.column),a==-1?-1:a==1?42:0)},w.prototype.comparePoint=function(A){return this.compare(A.row,A.column)},w.prototype.containsRange=function(A){return this.comparePoint(A.start)==0&&this.comparePoint(A.end)==0},w.prototype.intersects=function(A){var a=this.compareRange(A);return a==-1||a==0||a==1},w.prototype.isEnd=function(A,a){return this.end.row==A&&this.end.column==a},w.prototype.isStart=function(A,a){return this.start.row==A&&this.start.column==a},w.prototype.setStart=function(A,a){typeof A=="object"?(this.start.column=A.column,this.start.row=A.row):(this.start.row=A,this.start.column=a)},w.prototype.setEnd=function(A,a){typeof A=="object"?(this.end.column=A.column,this.end.row=A.row):(this.end.row=A,this.end.column=a)},w.prototype.inside=function(A,a){return this.compare(A,a)==0?!(this.isEnd(A,a)||this.isStart(A,a)):!1},w.prototype.insideStart=function(A,a){return this.compare(A,a)==0?!this.isEnd(A,a):!1},w.prototype.insideEnd=function(A,a){return this.compare(A,a)==0?!this.isStart(A,a):!1},w.prototype.compare=function(A,a){return!this.isMultiLine()&&A===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:A<this.start.row?-1:A>this.end.row?1:this.start.row===A?a>=this.start.column?0:-1:this.end.row===A?a<=this.end.column?0:1:0},w.prototype.compareStart=function(A,a){return this.start.row==A&&this.start.column==a?-1:this.compare(A,a)},w.prototype.compareEnd=function(A,a){return this.end.row==A&&this.end.column==a?1:this.compare(A,a)},w.prototype.compareInside=function(A,a){return this.end.row==A&&this.end.column==a?1:this.start.row==A&&this.start.column==a?-1:this.compare(A,a)},w.prototype.clipRows=function(A,a){if(this.end.row>a)var u={row:a+1,column:0};else if(this.end.row<A)var u={row:A,column:0};if(this.start.row>a)var n={row:a+1,column:0};else if(this.start.row<A)var n={row:A,column:0};return w.fromPoints(n||this.start,u||this.end)},w.prototype.extend=function(A,a){var u=this.compare(A,a);if(u==0)return this;if(u==-1)var n={row:A,column:a};else var o={row:A,column:a};return w.fromPoints(n||this.start,o||this.end)},w.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},w.prototype.isMultiLine=function(){return this.start.row!==this.end.row},w.prototype.clone=function(){return w.fromPoints(this.start,this.end)},w.prototype.collapseRows=function(){return this.end.column==0?new w(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new w(this.start.row,0,this.end.row,0)},w.prototype.toScreenRange=function(A){var a=A.documentToScreenPosition(this.start),u=A.documentToScreenPosition(this.end);return new w(a.row,a.column,u.row,u.column)},w.prototype.moveBy=function(A,a){this.start.row+=A,this.start.column+=a,this.end.row+=A,this.end.column+=a},w}();M.fromPoints=function(w,A){return new M(w.row,w.column,A.row,A.column)},M.comparePoints=function(w,A){return w.row-A.row||w.column-A.column},v.Range=M}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(p,v,fe){for(var M=p("./oop"),w={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:"*"}},A={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)A["Digit"+a]=48+a,A["Numpad"+a]=96+a,w.PRINTABLE_KEYS[48+a]=""+a,w.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var u=String.fromCharCode(a+32);A["Key"+u.toUpperCase()]=a,w.PRINTABLE_KEYS[a]=u}for(var a=1;a<13;a++)A["F"+a]=111+a,w.FUNCTION_KEYS[111+a]="F"+a;var n={Shift:16,Control:17,Alt:18,Meta:224};for(var o in n)A[o]=A[o+"Left"]=A[o+"Right"]=n[o];v.$codeToKeyCode=A,w.PRINTABLE_KEYS[173]="-";for(var r in w.FUNCTION_KEYS){var i=w.FUNCTION_KEYS[r].toLowerCase();w[i]=parseInt(r,10)}for(var r in w.PRINTABLE_KEYS){var i=w.PRINTABLE_KEYS[r].toLowerCase();w[i]=parseInt(r,10)}M.mixin(w,w.MODIFIER_KEYS),M.mixin(w,w.PRINTABLE_KEYS),M.mixin(w,w.FUNCTION_KEYS),w.enter=w.return,w.escape=w.esc,w.del=w.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)w.KEY_MODS[t]=e.filter(function(c){return t&w.KEY_MODS[c]}).join("-")+"-"}(),w.KEY_MODS[0]="",w.KEY_MODS[-1]="input-",M.mixin(v,w),v.default=v,v.keyCodeToString=function(e){var t=w[e];return typeof t!="string"&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(p,v,fe){var M=p("./keys"),w=p("./useragent"),A=null,a=0,u;function n(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return u={passive:!1},!0}})}catch{}}function o(){return u==null&&n(),u}function r(E,T,x){this.elem=E,this.type=T,this.callback=x}r.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var i=v.addListener=function(E,T,x,b){E.addEventListener(T,x,o()),b&&b.$toDestroy.push(new r(E,T,x))},e=v.removeListener=function(E,T,x){E.removeEventListener(T,x,o())};v.stopEvent=function(E){return v.stopPropagation(E),v.preventDefault(E),!1},v.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},v.preventDefault=function(E){E.preventDefault&&E.preventDefault()},v.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||w.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},v.capture=function(E,T,x){var b=E&&E.ownerDocument||document;function de(Te){T&&T(Te),x&&x(Te),e(b,"mousemove",T),e(b,"mouseup",de),e(b,"dragstart",de)}return i(b,"mousemove",T),i(b,"mouseup",de),i(b,"dragstart",de),de},v.addMouseWheelListener=function(E,T,x){i(E,"wheel",function(b){var de=.15,Te=b.deltaX||0,he=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=Te*de,b.wheelY=he*de;break;case b.DOM_DELTA_LINE:var Y=15;b.wheelX=Te*Y,b.wheelY=he*Y;break;case b.DOM_DELTA_PAGE:var gt=150;b.wheelX=Te*gt,b.wheelY=he*gt;break}T(b)},x)},v.addMultiMouseDownListener=function(E,T,x,b,de){var Te=0,he,Y,gt,V={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(S){if(v.getButton(S)!==0?Te=0:S.detail>1?(Te++,Te>4&&(Te=1)):Te=1,w.isIE){var y=Math.abs(S.clientX-he)>5||Math.abs(S.clientY-Y)>5;(!gt||y)&&(Te=1),gt&&clearTimeout(gt),gt=setTimeout(function(){gt=null},T[Te-1]||600),Te==1&&(he=S.clientX,Y=S.clientY)}if(S._clicks=Te,x[b]("mousedown",S),Te>4)Te=0;else if(Te>1)return x[b](V[Te],S)}Array.isArray(E)||(E=[E]),E.forEach(function(S){i(S,"mousedown",O,de)})};function t(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}v.getModifierString=function(E){return M.KEY_MODS[t(E)]};function c(E,T,x){var b=t(T);if(!x&&T.code&&(x=M.$codeToKeyCode[T.code]||x),!w.isMac&&A){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(b|=8),A.altGr)if((3&b)!=3)A.altGr=0;else return;if(x===18||x===17){var de=T.location;if(x===17&&de===1)A[x]==1&&(a=T.timeStamp);else if(x===18&&b===3&&de===2){var Te=T.timeStamp-a;Te<50&&(A.altGr=!0)}}}if(x in M.MODIFIER_KEYS&&(x=-1),!(!b&&x===13&&T.location===3&&(E(T,b,-x),T.defaultPrevented))){if(w.isChromeOS&&b&8){if(E(T,b,x),T.defaultPrevented)return;b&=-9}return!b&&!(x in M.FUNCTION_KEYS)&&!(x in M.PRINTABLE_KEYS)?!1:E(T,b,x)}}v.addCommandKeyListener=function(E,T,x){var b=null;i(E,"keydown",function(de){A[de.keyCode]=(A[de.keyCode]||0)+1;var Te=c(T,de,de.keyCode);return b=de.defaultPrevented,Te},x),i(E,"keypress",function(de){b&&(de.ctrlKey||de.altKey||de.shiftKey||de.metaKey)&&(v.stopEvent(de),b=null)},x),i(E,"keyup",function(de){A[de.keyCode]=null},x),A||(g(),i(window,"focus",g))};function g(){A=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!w.isOldIE){var m=1;v.nextTick=function(E,T){T=T||window;var x="zero-timeout-message-"+m++,b=function(de){de.data==x&&(v.stopPropagation(de),e(T,"message",b),E())};i(T,"message",b),T.postMessage(x,"*")}}v.$idleBlocked=!1,v.onIdle=function(E,T){return setTimeout(function x(){v.$idleBlocked?setTimeout(x,100):E()},T)},v.$idleBlockId=null,v.blockIdle=function(E){v.$idleBlockId&&clearTimeout(v.$idleBlockId),v.$idleBlocked=!0,v.$idleBlockId=setTimeout(function(){v.$idleBlocked=!1},E||100)},v.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),v.nextFrame?v.nextFrame=v.nextFrame.bind(window):v.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(p,v,fe){var M;fe.exports={lineMode:!1,pasteCancelled:function(){return M&&M>Date.now()-50?!0:M=!1},cancel:function(){M=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,v,fe){var M=p("../lib/event"),w=p("../config").nls,A=p("../lib/useragent"),a=p("../lib/dom"),u=p("../lib/lang"),n=p("../clipboard"),o=A.isChrome<18,r=A.isIE,i=A.isChrome>63,e=400,t=p("../lib/keys"),c=t.KEY_MODS,g=A.isIOS,m=g?/\s/:/\n/,E=A.isMobile,T=function(){function x(b,de){var Te=this;this.host=de,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",b.insertBefore(this.text,b.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",E||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),M.addListener(this.text,"blur",function(he){Te.ignoreFocusEvents||(de.onBlur(he),Te.$isFocused=!1)},de),M.addListener(this.text,"focus",function(he){if(!Te.ignoreFocusEvents){if(Te.$isFocused=!0,A.isEdge)try{if(!document.hasFocus())return}catch{}de.onFocus(he),A.isEdge?setTimeout(Te.resetSelection.bind(Te)):Te.resetSelection()}},de),this.$focusScroll=!1,de.on("beforeEndOperation",function(){var he=de.curOp,Y=he&&he.command&&he.command.name;if(Y!="insertstring"){var gt=Y&&(he.docChanged||he.selectionChanged);Te.inComposition&&gt&&(Te.lastValue=Te.text.value="",Te.onCompositionEnd()),Te.resetSelection()}}),de.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=g?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&de.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,M.addCommandKeyListener(this.text,function(he,Y,gt){if(!Te.inComposition)return de.onCommandKey(he,Y,gt)},de),M.addListener(this.text,"select",this.onSelect.bind(this),de),M.addListener(this.text,"input",this.onInput.bind(this),de),M.addListener(this.text,"cut",this.onCut.bind(this),de),M.addListener(this.text,"copy",this.onCopy.bind(this),de),M.addListener(this.text,"paste",this.onPaste.bind(this),de),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&M.addListener(b,"keydown",function(he){if(!(A.isMac&&!he.metaKey||!he.ctrlKey))switch(he.keyCode){case 67:Te.onCopy(he);break;case 86:Te.onPaste(he);break;case 88:Te.onCut(he);break}},de),this.syncComposition=u.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),M.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),de),M.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),de),M.addListener(this.text,"keyup",this.onKeyup.bind(this),de),M.addListener(this.text,"keydown",this.syncComposition.bind(this),de),M.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),de),this.closeTimeout,M.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),de),M.addListener(this.text,"mousedown",function(he){he.preventDefault(),Te.onContextMenuClose()},de),M.addListener(de.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),de),M.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),de),g&&this.addIosSelectionHandler(b,de,this.text)}return x.prototype.addIosSelectionHandler=function(b,de,Te){var he=this,Y=null,gt=!1;Te.addEventListener("keydown",function(O){Y&&clearTimeout(Y),gt=!0},!0),Te.addEventListener("keyup",function(O){Y=setTimeout(function(){gt=!1},100)},!0);var V=function(O){if(document.activeElement===Te&&!(gt||he.inComposition||de.$mouseHandler.isMousePressed)&&!he.copied){var S=Te.selectionStart,y=Te.selectionEnd,I=null,ke=0;if(S==0?I=t.up:S==1?I=t.home:y>he.lastSelectionEnd&&he.lastValue[y]==`
170
+ `?I=t.end:S<he.lastSelectionStart&&he.lastValue[S-1]==" "?(I=t.left,ke=c.option):S<he.lastSelectionStart||S==he.lastSelectionStart&&he.lastSelectionEnd!=he.lastSelectionStart&&S==y?I=t.left:y>he.lastSelectionEnd&&he.lastValue.slice(0,y).split(`
171
+ `).length>2?I=t.down:y>he.lastSelectionEnd&&he.lastValue[y-1]==" "?(I=t.right,ke=c.option):(y>he.lastSelectionEnd||y==he.lastSelectionEnd&&he.lastSelectionEnd!=he.lastSelectionStart&&S==y)&&(I=t.right),S!==y&&(ke|=c.shift),I){var Qe=de.onCommandKey({},ke,I);if(!Qe&&de.commands){I=t.keyCodeToString(I);var Je=de.commands.findKeyCommand(ke,I);Je&&de.execCommand(Je)}he.lastSelectionStart=S,he.lastSelectionEnd=y,he.resetSelection("")}}};document.addEventListener("selectionchange",V),de.on("destroy",function(){document.removeEventListener("selectionchange",V)})},x.prototype.onContextMenuClose=function(){var b=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){b.tempStyle&&(b.text.style.cssText=b.tempStyle,b.tempStyle=""),b.host.renderer.$isMousePressed=!1,b.host.renderer.$keepTextAreaAtCursor&&b.host.renderer.$moveTextAreaToCursor()},0)},x.prototype.$onContextMenu=function(b){this.host.textInput.onContextMenu(b),this.onContextMenuClose()},x.prototype.onKeyup=function(b){b.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},x.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},x.prototype.onCompositionStart=function(b){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){b.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var de=this.host.getSelectionRange();de.end.row=de.start.row,de.end.column=de.start.column,this.inComposition.markerRange=de,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},x.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var b=this.text.value;this.sendText(b),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},x.prototype.onCompositionEnd=function(b){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),b&&this.onInput())},x.prototype.onCut=function(b){this.doCopy(b,!0)},x.prototype.onCopy=function(b){this.doCopy(b,!1)},x.prototype.onPaste=function(b){var de=this.handleClipboardData(b);n.pasteCancelled()||(typeof de=="string"?(de&&this.host.onPaste(de,b),A.isIE&&setTimeout(this.resetSelection),M.preventDefault(b)):(this.text.value="",this.pasted=!0))},x.prototype.doCopy=function(b,de){var Te=this,he=this.host.getCopyText();if(!he)return M.preventDefault(b);this.handleClipboardData(b,he)?(g&&(this.resetSelection(he),this.copied=he,setTimeout(function(){Te.copied=!1},10)),de?this.host.onCut():this.host.onCopy(),M.preventDefault(b)):(this.copied=!0,this.text.value=he,this.text.select(),setTimeout(function(){Te.copied=!1,Te.resetSelection(),de?Te.host.onCut():Te.host.onCopy()}))},x.prototype.handleClipboardData=function(b,de,Te){var he=b.clipboardData||window.clipboardData;if(!(!he||o)){var Y=r||Te?"Text":"text/plain";try{return de?he.setData(Y,de)!==!1:he.getData(Y)}catch(gt){if(!Te)return this.handleClipboardData(gt,de,!0)}}},x.prototype.onInput=function(b){if(this.inComposition)return this.onCompositionUpdate();if(b&&b.inputType){if(b.inputType=="historyUndo")return this.host.execCommand("undo");if(b.inputType=="historyRedo")return this.host.execCommand("redo")}var de=this.text.value,Te=this.sendText(de,!0);(de.length>e+100||m.test(Te)||E&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},x.prototype.sendText=function(b,de){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),b&&this.host.onPaste(b),this.pasted=!1,"";for(var Te=this.text.selectionStart,he=this.text.selectionEnd,Y=this.lastSelectionStart,gt=this.lastValue.length-this.lastSelectionEnd,V=b,O=b.length-Te,S=b.length-he,y=0;Y>0&&this.lastValue[y]==b[y];)y++,Y--;for(V=V.slice(y),y=1;gt>0&&this.lastValue.length-y>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-y]==b[b.length-y];)y++,gt--;O-=y-1,S-=y-1;var I=V.length-y+1;if(I<0&&(Y=-I,I=0),V=V.slice(0,I),!de&&!V&&!O&&!Y&&!gt&&!S)return"";this.sendingText=!0;var ke=!1;return A.isAndroid&&V==". "&&(V=" ",ke=!0),V&&!Y&&!gt&&!O&&!S||this.commandMode?this.host.onTextInput(V):this.host.onTextInput(V,{extendLeft:Y,extendRight:gt,restoreStart:O,restoreEnd:S}),this.sendingText=!1,this.lastValue=b,this.lastSelectionStart=Te,this.lastSelectionEnd=he,this.lastRestoreEnd=S,ke?`
172
+ `:V},x.prototype.onSelect=function(b){var de=this;if(!this.inComposition){var Te=function(he){return he.selectionStart===0&&he.selectionEnd>=de.lastValue.length&&he.value===de.lastValue&&de.lastValue&&he.selectionEnd!==de.lastSelectionEnd};this.copied?this.copied=!1:Te(this.text)?(this.host.selectAll(),this.resetSelection()):E&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},x.prototype.$resetSelectionIOS=function(b){if(!(!this.$isFocused||this.copied&&!b||this.sendingText)){b||(b="");var de=`
173
+ ab`+b+`cde fg
174
+ `;de!=this.text.value&&(this.text.value=this.lastValue=de);var Te=4,he=4+(b.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=Te||this.lastSelectionEnd!=he)&&this.text.setSelectionRange(Te,he),this.lastSelectionStart=Te,this.lastSelectionEnd=he}},x.prototype.$resetSelection=function(){var b=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var de=0,Te=0,he="",Y=function(Je,mt){for(var yt=mt,Qt=1;Qt<=Je-b.rowStart&&Qt<2*b.numberOfExtraLines+1;Qt++)yt+=b.host.session.getLine(Je-Qt).length+1;return yt};if(this.host.session){var gt=this.host.selection,V=gt.getRange(),O=gt.cursor.row;O===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):O===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(O<this.rowStart-1||O>this.rowEnd+1)&&(this.rowStart=O>this.numberOfExtraLines?O-this.numberOfExtraLines:0,this.rowEnd=O>this.numberOfExtraLines?O+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var S=[],y=this.rowStart;y<=this.rowEnd;y++)S.push(this.host.session.getLine(y));if(he=S.join(`
175
+ `),de=Y(V.start.row,V.start.column),Te=Y(V.end.row,V.end.column),V.start.row<this.rowStart){var I=this.host.session.getLine(this.rowStart-1);de=V.start.row<this.rowStart-1?0:de,Te+=I.length+1,he=I+`
176
+ `+he}else if(V.end.row>this.rowEnd){var ke=this.host.session.getLine(this.rowEnd+1);Te=V.end.row>this.rowEnd+1?ke.length:V.end.column,Te+=he.length+1,he=he+`
177
+ `+ke}else E&&O>0&&(he=`
178
+ `+he,Te+=1,de+=1);he.length>e&&(de<e&&Te<e?he=he.slice(0,e):(he=`
179
+ `,de==Te?de=Te=0:(de=0,Te=1)));var Qe=he+`
180
+
181
+ `;Qe!=this.lastValue&&(this.text.value=this.lastValue=Qe,this.lastSelectionStart=this.lastSelectionEnd=Qe.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=Te||this.lastSelectionStart!=de||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(de,Te),this.lastSelectionStart=de,this.lastSelectionEnd=Te}catch{}this.inComposition=!1}},x.prototype.setHost=function(b){this.host=b},x.prototype.setNumberOfExtraLines=function(b){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,b<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=b},x.prototype.setAriaLabel=function(){var b="";if(this.host.$textInputAriaLabel&&(b+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var de=this.host.session.selection.cursor.row;b+=w("text-input.aria-label","Cursor at row $0",[de+1])}this.text.setAttribute("aria-label",b)},x.prototype.setAriaOptions=function(b){b.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",b.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",b.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),b.role&&this.text.setAttribute("role",b.role),b.setLabel&&(this.text.setAttribute("aria-roledescription",w("text-input.aria-roledescription","editor")),this.setAriaLabel())},x.prototype.focus=function(){var b=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||i||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var de=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var Te=this.text.getBoundingClientRect().top!=0}catch{return}var he=[];if(Te)for(var Y=this.text.parentElement;Y&&Y.nodeType==1;)he.push(Y),Y.setAttribute("ace_nocontext","true"),!Y.parentElement&&Y.getRootNode?Y=Y.getRootNode().host:Y=Y.parentElement;this.text.focus({preventScroll:!0}),Te&&he.forEach(function(gt){gt.removeAttribute("ace_nocontext")}),setTimeout(function(){b.text.style.position="",b.text.style.top=="0px"&&(b.text.style.top=de)},0)},x.prototype.blur=function(){this.text.blur()},x.prototype.isFocused=function(){return this.$isFocused},x.prototype.setInputHandler=function(b){this.inputHandler=b},x.prototype.getInputHandler=function(){return this.inputHandler},x.prototype.getElement=function(){return this.text},x.prototype.setCommandMode=function(b){this.commandMode=b,this.text.readOnly=!1},x.prototype.setReadOnly=function(b){this.commandMode||(this.text.readOnly=b)},x.prototype.setCopyWithEmptySelection=function(b){},x.prototype.onContextMenu=function(b){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:b}),this.moveToMouse(b,!0)},x.prototype.moveToMouse=function(b,de){var Te=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(de?"z-index:100000;":"")+(A.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var he=this.host.container.getBoundingClientRect(),Y=a.computedStyle(this.host.container),gt=he.top+(parseInt(Y.borderTopWidth)||0),V=he.left+(parseInt(Y.borderLeftWidth)||0),O=he.bottom-gt-this.text.clientHeight-2,S=function(y){a.translate(Te.text,y.clientX-V-2,Math.min(y.clientY-gt-2,O))};S(b),b.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),A.isWin&&M.capture(this.host.container,S,this.onContextMenuClose.bind(this)))},x.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},x}();v.TextInput=T,v.$setUserAgentForTests=function(x,b){E=x,g=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(p,v,fe){var M=p("../lib/useragent"),w=0,A=550,a=function(){function o(r){r.$clickSelection=null;var i=r.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(t){r[t]=this[t]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return o.prototype.onMouseDown=function(r){var i=r.inSelection(),e=r.getDocumentPosition();this.mousedownEvent=r;var t=this.editor,c=r.getButton();if(c!==0){var g=t.getSelectionRange(),m=g.isEmpty();(m||c==1)&&t.selection.moveToPosition(e),c==2&&(t.textInput.onContextMenu(r.domEvent),M.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!t.isFocused()&&(t.focus(),this.$focusTimeout&&!this.$clickSelection&&!t.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(r);return}return this.captureMouse(r),this.startSelect(e,r.domEvent._clicks>1),r.preventDefault()},o.prototype.startSelect=function(r,i){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(r):i||e.selection.moveToPosition(r),i||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var r,i=this.editor,e=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var t=this.$clickSelection.comparePoint(e);if(t==-1)r=this.$clickSelection.end;else if(t==1)r=this.$clickSelection.start;else{var c=n(this.$clickSelection,e,i.session);e=c.cursor,r=c.anchor}i.selection.setSelectionAnchor(r.row,r.column)}i.selection.selectToPosition(e),i.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(r){var i,e=this.editor,t=e.renderer.screenToTextCoordinates(this.x,this.y),c=e.selection[r](t.row,t.column);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(c.start),m=this.$clickSelection.comparePoint(c.end);if(g==-1&&m<=0)i=this.$clickSelection.end,(c.end.row!=t.row||c.end.column!=t.column)&&(t=c.start);else if(m==1&&g>=0)i=this.$clickSelection.start,(c.start.row!=t.row||c.start.column!=t.column)&&(t=c.end);else if(g==-1&&m==1)t=c.end,i=c.start;else{var E=n(this.$clickSelection,t,e.session);t=E.cursor,i=E.anchor}e.selection.setSelectionAnchor(i.row,i.column)}e.selection.selectToPosition(t),e.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var r=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(r>w||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(r){var i=r.getDocumentPosition(),e=this.editor,t=e.session,c=t.getBracketRange(i);c?(c.isEmpty()&&(c.start.column--,c.end.column++),this.setState("select")):(c=e.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=c,this.select()},o.prototype.onTripleClick=function(r){var i=r.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var t=e.getSelectionRange();t.isMultiLine()&&t.contains(i.row,i.column)?(this.$clickSelection=e.selection.getLineRange(t.start.row),this.$clickSelection.end=e.selection.getLineRange(t.end.row).end):this.$clickSelection=e.selection.getLineRange(i.row),this.select()},o.prototype.onQuadClick=function(r){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(r){if(!r.getAccelKey()){r.getShiftKey()&&r.wheelY&&!r.wheelX&&(r.wheelX=r.wheelY,r.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,t=r.domEvent.timeStamp,c=t-e.t,g=c?r.wheelX/c:e.vx,m=c?r.wheelY/c:e.vy;c<A&&(g=(g+e.vx)/2,m=(m+e.vy)/2);var E=Math.abs(g/m),T=!1;if(E>=1&&i.renderer.isScrollableBy(r.wheelX*r.speed,0)&&(T=!0),E<=1&&i.renderer.isScrollableBy(0,r.wheelY*r.speed)&&(T=!0),T)e.allowed=t;else if(t-e.allowed<A){var x=Math.abs(g)<=1.5*Math.abs(e.vx)&&Math.abs(m)<=1.5*Math.abs(e.vy);x?(T=!0,e.allowed=t):e.allowed=0}if(e.t=t,e.vx=g,e.vy=m,T)return i.renderer.scrollBy(r.wheelX*r.speed,r.wheelY*r.speed),r.stop()}},o}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,v.DefaultHandlers=a;function u(o,r,i,e){return Math.sqrt(Math.pow(i-o,2)+Math.pow(e-r,2))}function n(o,r,i){if(o.start.row==o.end.row)var e=2*r.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var e=3*r.column-2*i.getLine(o.start.row).length;else var e=2*r.row-o.start.row-o.end.row;return e<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(p,v,fe){var M=p("../lib/event"),w=p("../lib/useragent"),A=function(){function a(u,n){this.speed,this.wheelX,this.wheelY,this.domEvent=u,this.editor=n,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 a.prototype.stopPropagation=function(){M.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){M.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,n=this.editor.session.documentToScreenRow(u,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return n-o},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,n=u.getSelectionRange();if(n.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=n.contains(o.row,o.column)}return this.$inSelection},a.prototype.getButton=function(){return M.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return w.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();v.MouseEvent=A}),ace.define("ace/lib/scroll",["require","exports","module"],function(p,v,fe){v.preventParentScroll=function(w){w.stopPropagation();var A=w.currentTarget,a=A.scrollHeight>A.clientHeight;a||w.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(p,v,fe){var M=this&&this.__extends||function(){var t=function(c,g){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,E){m.__proto__=E}||function(m,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(m[T]=E[T])},t(c,g)};return function(c,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");t(c,g);function m(){this.constructor=c}c.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),w=this&&this.__values||function(t){var c=typeof Symbol=="function"&&Symbol.iterator,g=c&&t[c],m=0;if(g)return g.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&m>=t.length&&(t=void 0),{value:t&&t[m++],done:!t}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},A=p("./lib/dom");p("./lib/event");var a=p("./range").Range,u=p("./lib/scroll").preventParentScroll,n="ace_tooltip",o=function(){function t(c){this.isOpen=!1,this.$element=null,this.$parentNode=c}return t.prototype.$init=function(){return this.$element=A.createElement("div"),this.$element.className=n,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},t.prototype.getElement=function(){return this.$element||this.$init()},t.prototype.setText=function(c){this.getElement().textContent=c},t.prototype.setHtml=function(c){this.getElement().innerHTML=c},t.prototype.setPosition=function(c,g){this.getElement().style.left=c+"px",this.getElement().style.top=g+"px"},t.prototype.setClassName=function(c){A.addCssClass(this.getElement(),c)},t.prototype.setTheme=function(c){this.theme&&(this.theme.isDark&&A.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&A.removeCssClass(this.getElement(),this.theme.cssClass)),c.isDark&&A.addCssClass(this.getElement(),"ace_dark"),c.cssClass&&A.addCssClass(this.getElement(),c.cssClass),this.theme={isDark:c.isDark,cssClass:c.cssClass}},t.prototype.show=function(c,g,m){c!=null&&this.setText(c),g!=null&&m!=null&&this.setPosition(g,m),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},t.prototype.hide=function(c){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=n,this.isOpen=!1)},t.prototype.getHeight=function(){return this.getElement().offsetHeight},t.prototype.getWidth=function(){return this.getElement().offsetWidth},t.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},t}(),r=function(){function t(){this.popups=[]}return t.prototype.addPopup=function(c){this.popups.push(c),this.updatePopups()},t.prototype.removePopup=function(c){var g=this.popups.indexOf(c);g!==-1&&(this.popups.splice(g,1),this.updatePopups())},t.prototype.updatePopups=function(){var c,g,m,E;this.popups.sort(function(V,O){return O.priority-V.priority});var T=[];try{for(var x=w(this.popups),b=x.next();!b.done;b=x.next()){var de=b.value,Te=!0;try{for(var he=(m=void 0,w(T)),Y=he.next();!Y.done;Y=he.next()){var gt=Y.value;if(this.doPopupsOverlap(gt,de)){Te=!1;break}}}catch(V){m={error:V}}finally{try{Y&&!Y.done&&(E=he.return)&&E.call(he)}finally{if(m)throw m.error}}Te?T.push(de):de.hide()}}catch(V){c={error:V}}finally{try{b&&!b.done&&(g=x.return)&&g.call(x)}finally{if(c)throw c.error}}},t.prototype.doPopupsOverlap=function(c,g){var m=c.getElement().getBoundingClientRect(),E=g.getElement().getBoundingClientRect();return m.left<E.right&&m.right>E.left&&m.top<E.bottom&&m.bottom>E.top},t}(),i=new r;v.popupManager=i,v.Tooltip=o;var e=function(t){M(c,t);function c(g){g===void 0&&(g=document.body);var m=t.call(this,g)||this;m.timeout=void 0,m.lastT=0,m.idleTime=350,m.lastEvent=void 0,m.onMouseOut=m.onMouseOut.bind(m),m.onMouseMove=m.onMouseMove.bind(m),m.waitForHover=m.waitForHover.bind(m),m.hide=m.hide.bind(m);var E=m.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",m.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(m)),E.addEventListener("wheel",u),m}return c.prototype.addToEditor=function(g){g.on("mousemove",this.onMouseMove),g.on("mousedown",this.hide);var m=g.renderer.getMouseEventTarget();m&&typeof m.removeEventListener=="function"&&m.addEventListener("mouseout",this.onMouseOut,!0)},c.prototype.removeFromEditor=function(g){g.off("mousemove",this.onMouseMove),g.off("mousedown",this.hide);var m=g.renderer.getMouseEventTarget();m&&typeof m.removeEventListener=="function"&&m.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},c.prototype.onMouseMove=function(g,m){this.lastEvent=g,this.lastT=Date.now();var E=m.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=g,this.timeout=setTimeout(this.waitForHover,this.idleTime))},c.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var g=Date.now()-this.lastT;if(this.idleTime-g>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-g);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},c.prototype.isOutsideOfText=function(g){var m=g.editor,E=g.getDocumentPosition(),T=m.session.getLine(E.row);if(E.column==T.length){var x=m.renderer.pixelToScreenCoordinates(g.clientX,g.clientY),b=m.session.documentToScreenPosition(E.row,E.column);if(b.column!=x.column||b.row!=x.row)return!0}return!1},c.prototype.setDataProvider=function(g){this.$gatherData=g},c.prototype.showForRange=function(g,m,E,T){if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var x=g.renderer;this.isOpen||(i.addPopup(this),this.$registerCloseEvents(),this.setTheme(x.theme)),this.isOpen=!0,this.range=a.fromPoints(m.start,m.end);var b=x.textToScreenCoordinates(m.start.row,m.start.column),de=x.scroller.getBoundingClientRect();b.pageX<de.left&&(b.pageX=de.left);var Te=this.getElement();Te.innerHTML="",Te.appendChild(E),Te.style.maxHeight="",Te.style.display="block",this.$setPosition(g,b,!0,m),A.$fixPositionBug(Te)}},c.prototype.$setPosition=function(g,m,E,T){var x=10;E&&this.addMarker(T,g.session);var b=g.renderer,de=this.getElement(),Te=de.offsetHeight,he=de.offsetWidth,Y=m.pageY,gt=m.pageX,V=window.innerHeight-Y-b.lineHeight,O=this.$shouldPlaceAbove(Te,Y,V-x);de.style.maxHeight=(O?Y:V)-x+"px",de.style.top=O?"":Y+b.lineHeight+"px",de.style.bottom=O?window.innerHeight-Y+"px":"",de.style.left=Math.min(gt,window.innerWidth-he-x)+"px"},c.prototype.$shouldPlaceAbove=function(g,m,E){return!(m-g<0&&m<E)},c.prototype.addMarker=function(g,m){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=m,this.marker=m&&m.addMarker(g,"ace_highlight-marker","text")},c.prototype.hide=function(g){g&&this.$fromKeyboard&&g.type=="keydown"&&g.code=="Escape"||!g&&document.activeElement==this.getElement()||g&&g.target&&(g.type!="keydown"||g.ctrlKey||g.metaKey)&&this.$element.contains(g.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,i.removePopup(this)))},c.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},c.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},c.prototype.onMouseOut=function(g){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!g.relatedTarget||this.getElement().contains(g.relatedTarget)||g&&g.currentTarget.contains(g.relatedTarget)||g.relatedTarget.classList.contains("ace_content")||this.hide())},c}(o);v.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(p,v,fe){var M=this&&this.__extends||function(){var e=function(t,c){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(g[E]=m[E])},e(t,c)};return function(t,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");e(t,c);function g(){this.constructor=t}t.prototype=c===null?Object.create(c):(g.prototype=c.prototype,new g)}}(),w=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,c=t&&e[t],g=0;if(c)return c.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&g>=e.length&&(e=void 0),{value:e&&e[g++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},A=p("../lib/dom"),a=p("./mouse_event").MouseEvent,u=p("../tooltip").HoverTooltip,n=p("../config").nls,o=p("../range").Range;function r(e){var t=e.editor,c=t.renderer.$gutterLayer;e.$tooltip=new i(t),e.$tooltip.addToEditor(t),e.$tooltip.setDataProvider(function(g,m){var E=g.getDocumentPosition().row;e.$tooltip.showTooltip(E)}),e.editor.setDefaultHandler("guttermousedown",function(g){if(!(!t.isFocused()||g.getButton()!=0)){var m=c.getRegion(g);if(m!="foldWidgets"){var E=g.getDocumentPosition().row,T=t.session.selection;if(g.getShiftKey())T.selectTo(E,0);else{if(g.domEvent.detail==2)return t.selectAll(),g.preventDefault();e.$clickSelection=t.selection.getLineRange(E)}return e.setState("selectByLines"),e.captureMouse(g),g.preventDefault()}}})}v.GutterHandler=r;var i=function(e){M(t,e);function t(c){var g=e.call(this,c.container)||this;g.id="gt"+ ++t.$uid,g.editor=c,g.visibleTooltipRow;var m=g.getElement();return m.setAttribute("role","tooltip"),m.setAttribute("id",g.id),m.style.pointerEvents="auto",g.idleTime=50,g.onDomMouseMove=g.onDomMouseMove.bind(g),g.onDomMouseOut=g.onDomMouseOut.bind(g),g.setClassName("ace_gutter-tooltip"),g}return t.prototype.onDomMouseMove=function(c){var g=new a(c,this.editor);this.onMouseMove(g,this.editor)},t.prototype.onDomMouseOut=function(c){var g=new a(c,this.editor);this.onMouseOut(g)},t.prototype.addToEditor=function(c){var g=c.renderer.$gutter;g.addEventListener("mousemove",this.onDomMouseMove),g.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,c)},t.prototype.removeFromEditor=function(c){var g=c.renderer.$gutter;g.removeEventListener("mousemove",this.onDomMouseMove),g.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,c)},t.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:n("gutter-tooltip.aria-label.error.singular","error"),plural:n("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:n("gutter-tooltip.aria-label.security.singular","security finding"),plural:n("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:n("gutter-tooltip.aria-label.warning.singular","warning"),plural:n("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:n("gutter-tooltip.aria-label.info.singular","information message"),plural:n("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:n("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:n("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(c){var g,m=this.editor.renderer.$gutterLayer,E=m.$annotations[c],T;E?T={displayText:Array.from(E.displayText),type:Array.from(E.type)}:T={displayText:[],type:[]};var x=m.session.getFoldLine(c);if(x&&m.$showFoldedAnnotations){for(var b={error:[],security:[],warning:[],info:[],hint:[]},de={error:1,security:2,warning:3,info:4,hint:5},Te,he=c+1;he<=x.end.row;he++)if(m.$annotations[he])for(var Y=0;Y<m.$annotations[he].text.length;Y++){var gt=m.$annotations[he].type[Y];b[gt].push(m.$annotations[he].text[Y]),(!Te||de[gt]<de[Te])&&(Te=gt)}if(["error","security","warning"].includes(Te)){var V="".concat(t.annotationsToSummaryString(b)," in folded code.");T.displayText.push(V),T.type.push(Te+"_fold")}}if(T.displayText.length===0)return this.hide();for(var O={error:[],security:[],warning:[],info:[],hint:[]},S=m.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",he=0;he<T.displayText.length;he++){var y=A.createElement("span"),I=A.createElement("span");(g=I.classList).add.apply(g,["ace_".concat(T.type[he]),S]),I.setAttribute("aria-label","".concat(t.annotationLabels[T.type[he].replace("_fold","")].singular)),I.setAttribute("role","img"),I.appendChild(A.createTextNode(" ")),y.appendChild(I),y.appendChild(A.createTextNode(T.displayText[he])),y.appendChild(A.createElement("br")),O[T.type[he].replace("_fold","")].push(y)}var ke=A.createElement("span");O.error.forEach(function(mt){return ke.appendChild(mt)}),O.security.forEach(function(mt){return ke.appendChild(mt)}),O.warning.forEach(function(mt){return ke.appendChild(mt)}),O.info.forEach(function(mt){return ke.appendChild(mt)}),O.hint.forEach(function(mt){return ke.appendChild(mt)}),ke.setAttribute("aria-live","polite");var Qe=this.$findLinkedAnnotationNode(c);Qe&&Qe.setAttribute("aria-describedby",this.id);var Je=o.fromPoints({row:c,column:0},{row:c,column:0});this.showForRange(this.editor,Je,ke),this.visibleTooltipRow=c,this.editor._signal("showGutterTooltip",this)},t.prototype.$setPosition=function(c,g,m,E){var T=this.$findCellByRow(E.start.row);if(T){var x=T&&T.element,b=x&&x.querySelector(".ace_gutter_annotation");if(b){var de=b.getBoundingClientRect();if(de){var Te={pageX:de.right,pageY:de.top};return e.prototype.$setPosition.call(this,c,Te,!1,E)}}}},t.prototype.$shouldPlaceAbove=function(c,g,m){return m<c},t.prototype.$findLinkedAnnotationNode=function(c){var g=this.$findCellByRow(c);if(g){var m=g.element;if(m.childNodes.length>2)return m.childNodes[2]}},t.prototype.$findCellByRow=function(c){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(g){return g.row===c})},t.prototype.hide=function(c){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var g=this.$findLinkedAnnotationNode(this.visibleTooltipRow);g&&g.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,c)}},t.annotationsToSummaryString=function(c){var g,m,E=[],T=["error","security","warning","info","hint"];try{for(var x=w(T),b=x.next();!b.done;b=x.next()){var de=b.value;if(c[de].length){var Te=c[de].length===1?t.annotationLabels[de].singular:t.annotationLabels[de].plural;E.push("".concat(c[de].length," ").concat(Te))}}}catch(he){g={error:he}}finally{try{b&&!b.done&&(m=x.return)&&m.call(x)}finally{if(g)throw g.error}}return E.join(", ")},t.prototype.isOutsideOfText=function(c){var g=c.editor,m=g.renderer.$gutter.getBoundingClientRect();return!(c.clientX>=m.left&&c.clientX<=m.right&&c.clientY>=m.top&&c.clientY<=m.bottom)},t}(u);i.$uid=0,v.GutterTooltip=i}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(p,v,fe){var M=p("../lib/dom"),w=p("../lib/event"),A=p("../lib/useragent"),a=200,u=200,n=5;function o(i){var e=i.editor,t=M.createElement("div");t.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",t.textContent=" ";var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach(function(bt){i[bt]=this[bt]},this),e.on("mousedown",this.onMouseDown.bind(i));var g=e.container,m,E,T,x,b,de,Te=0,he,Y,gt,V,O;this.onDragStart=function(bt){if(this.cancelDrag||!g.draggable){var Gt=this;return setTimeout(function(){Gt.startSelect(),Gt.captureMouse(bt)},0),bt.preventDefault()}b=e.getSelectionRange();var Yt=bt.dataTransfer;Yt.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(t),Yt.setDragImage&&Yt.setDragImage(t,0,0),setTimeout(function(){e.container.removeChild(t)}),Yt.clearData(),Yt.setData("Text",e.session.getTextRange()),Y=!0,this.setState("drag")},this.onDragEnd=function(bt){if(g.draggable=!1,Y=!1,this.setState(null),!e.getReadOnly()){var Gt=bt.dataTransfer.dropEffect;!he&&Gt=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(bt){if(!(e.getReadOnly()||!yt(bt.dataTransfer)))return E=bt.clientX,T=bt.clientY,m||ke(),Te++,bt.dataTransfer.dropEffect=he=Qt(bt),w.preventDefault(bt)},this.onDragOver=function(bt){if(!(e.getReadOnly()||!yt(bt.dataTransfer)))return E=bt.clientX,T=bt.clientY,m||(ke(),Te++),Je!==null&&(Je=null),bt.dataTransfer.dropEffect=he=Qt(bt),w.preventDefault(bt)},this.onDragLeave=function(bt){if(Te--,Te<=0&&m)return Qe(),he=null,w.preventDefault(bt)},this.onDrop=function(bt){if(de){var Gt=bt.dataTransfer;if(Y)switch(he){case"move":b.contains(de.row,de.column)?b={start:de,end:de}:b=e.moveText(b,de);break;case"copy":b=e.moveText(b,de,!0);break}else{var Yt=Gt.getData("Text");b={start:de,end:e.session.insert(de,Yt)},e.focus(),he=null}return Qe(),w.preventDefault(bt)}},w.addListener(g,"dragstart",this.onDragStart.bind(i),e),w.addListener(g,"dragend",this.onDragEnd.bind(i),e),w.addListener(g,"dragenter",this.onDragEnter.bind(i),e),w.addListener(g,"dragover",this.onDragOver.bind(i),e),w.addListener(g,"dragleave",this.onDragLeave.bind(i),e),w.addListener(g,"drop",this.onDrop.bind(i),e);function S(bt,Gt){var Yt=Date.now(),Zt=!Gt||bt.row!=Gt.row,Jt=!Gt||bt.column!=Gt.column;if(!V||Zt||Jt)e.moveCursorToPosition(bt),V=Yt,O={x:E,y:T};else{var pi=r(O.x,O.y,E,T);pi>n?V=null:Yt-V>=u&&(e.renderer.scrollCursorIntoView(),V=null)}}function y(bt,Gt){var Yt=Date.now(),Zt=e.renderer.layerConfig.lineHeight,Jt=e.renderer.layerConfig.characterWidth,pi=e.renderer.scroller.getBoundingClientRect(),mi={x:{left:E-pi.left,right:pi.right-E},y:{top:T-pi.top,bottom:pi.bottom-T}},gi=Math.min(mi.x.left,mi.x.right),vi=Math.min(mi.y.top,mi.y.bottom),wi={row:bt.row,column:bt.column};gi/Jt<=2&&(wi.column+=mi.x.left<mi.x.right?-3:2),vi/Zt<=1&&(wi.row+=mi.y.top<mi.y.bottom?-1:1);var Ci=bt.row!=wi.row,$i=bt.column!=wi.column,bi=!Gt||bt.row!=Gt.row;Ci||$i&&!bi?gt?Yt-gt>=a&&e.renderer.scrollCursorIntoView(wi):gt=Yt:gt=null}function I(){var bt=de;de=e.renderer.screenToTextCoordinates(E,T),S(de,bt),y(de,bt)}function ke(){b=e.selection.toOrientedRange(),m=e.session.addMarker(b,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(x),I(),x=setInterval(I,20),Te=0,w.addListener(document,"mousemove",mt)}function Qe(){clearInterval(x),e.session.removeMarker(m),m=null,e.selection.fromOrientedRange(b),e.isFocused()&&!Y&&e.$resetCursorStyle(),b=null,de=null,Te=0,gt=null,V=null,w.removeListener(document,"mousemove",mt)}var Je=null;function mt(){Je==null&&(Je=setTimeout(function(){Je!=null&&m&&Qe()},20))}function yt(bt){var Gt=bt.types;return!Gt||Array.prototype.some.call(Gt,function(Yt){return Yt=="text/plain"||Yt=="Text"})}function Qt(bt){var Gt=["copy","copymove","all","uninitialized"],Yt=["move","copymove","linkmove","all","uninitialized"],Zt=A.isMac?bt.altKey:bt.ctrlKey,Jt="uninitialized";try{Jt=bt.dataTransfer.effectAllowed.toLowerCase()}catch{}var pi="none";return Zt&&Gt.indexOf(Jt)>=0?pi="copy":Yt.indexOf(Jt)>=0?pi="move":Gt.indexOf(Jt)>=0&&(pi="copy"),pi}}(function(){this.dragWait=function(){var i=Date.now()-this.mousedownEvent.time;i>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var i=this.editor.container;i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(i){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor,e=i.container;e.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging");var t=A.isWin?"default":"move";i.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(i){var e=this.editor.container;if(A.isIE&&this.state=="dragReady"){var t=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);t>3&&e.dragDrop()}if(this.state==="dragWait"){var t=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);t>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var e=this.editor,t=i.inSelection(),c=i.getButton(),g=i.domEvent.detail||1;if(g===1&&c===0&&t){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var m=i.domEvent.target||i.domEvent.srcElement;if("unselectable"in m&&(m.unselectable="on"),e.getDragDelay()){if(A.isWebKit){this.cancelDrag=!0;var E=e.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(o.prototype);function r(i,e,t,c){return Math.sqrt(Math.pow(t-i,2)+Math.pow(c-e,2))}v.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(p,v,fe){var M=p("./mouse_event").MouseEvent,w=p("../lib/event"),A=p("../lib/dom");v.addTouchListeners=function(a,u){var n="scroll",o,r,i,e,t,c,g=0,m,E=0,T=0,x=0,b,de;function Te(){var S=window.navigator&&window.navigator.clipboard,y=!1,I=function(){var Je=u.getCopyText(),mt=u.session.getUndoManager().hasUndo();de.replaceChild(A.buildDom(y?["span",!Je&&ke("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],Je&&ke("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],Je&&ke("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],S&&ke("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],mt&&ke("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],ke("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],ke("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),de.firstChild)},ke=function(Je){return u.commands.canExecute(Je,u)},Qe=function(Je){var mt=Je.target.getAttribute("action");if(mt=="more"||!y)return y=!y,I();mt=="paste"?S.readText().then(function(yt){u.execCommand(mt,yt)}):mt&&((mt=="cut"||mt=="copy")&&(S?S.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(mt)),de.firstChild.style.display="none",y=!1,mt!="openCommandPalette"&&u.focus()};de=A.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(Je){n="menu",Je.stopPropagation(),Je.preventDefault(),u.textInput.focus()},ontouchend:function(Je){Je.stopPropagation(),Je.preventDefault(),Qe(Je)},onclick:Qe},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function he(){if(!u.getOption("enableMobileMenu")){de&&Y();return}de||Te();var S=u.selection.cursor,y=u.renderer.textToScreenCoordinates(S.row,S.column),I=u.renderer.textToScreenCoordinates(0,0).pageX,ke=u.renderer.scrollLeft,Qe=u.container.getBoundingClientRect();de.style.top=y.pageY-Qe.top-3+"px",y.pageX-Qe.left<Qe.width-70?(de.style.left="",de.style.right="10px"):(de.style.right="",de.style.left=I+ke-Qe.left+"px"),de.style.display="",de.firstChild.style.display="none",u.on("input",Y)}function Y(S){de&&(de.style.display="none"),u.off("input",Y)}function gt(){t=null,clearTimeout(t);var S=u.selection.getRange(),y=S.contains(m.row,m.column);(S.isEmpty()||!y)&&(u.selection.moveToPosition(m),u.selection.selectWord()),n="wait",he()}function V(){t=null,clearTimeout(t),u.selection.moveToPosition(m);var S=E>=2?u.selection.getLineRange(m.row):u.session.getBracketRange(m);S&&!S.isEmpty()?u.selection.setRange(S):u.selection.selectWord(),n="wait"}w.addListener(a,"contextmenu",function(S){if(b){var y=u.textInput.getElement();y.focus()}},u),w.addListener(a,"touchstart",function(S){var y=S.touches;if(t||y.length>1){clearTimeout(t),t=null,i=-1,n="zoom";return}b=u.$mouseHandler.isMousePressed=!0;var I=u.renderer.layerConfig.lineHeight,ke=u.renderer.layerConfig.lineHeight,Qe=S.timeStamp;e=Qe;var Je=y[0],mt=Je.clientX,yt=Je.clientY;Math.abs(o-mt)+Math.abs(r-yt)>I&&(i=-1),o=S.clientX=mt,r=S.clientY=yt,T=x=0;var Qt=new M(S,u);if(m=Qt.getDocumentPosition(),Qe-i<500&&y.length==1&&!g)E++,S.preventDefault(),S.button=0,V();else{E=0;var bt=u.selection.cursor,Gt=u.selection.isEmpty()?bt:u.selection.anchor,Yt=u.renderer.$cursorLayer.getPixelPosition(bt,!0),Zt=u.renderer.$cursorLayer.getPixelPosition(Gt,!0),Jt=u.renderer.scroller.getBoundingClientRect(),pi=u.renderer.layerConfig.offset,mi=u.renderer.scrollLeft,gi=function(Ci,$i){return Ci=Ci/ke,$i=$i/I-.75,Ci*Ci+$i*$i};if(S.clientX<Jt.left){n="zoom";return}var vi=gi(S.clientX-Jt.left-Yt.left+mi,S.clientY-Jt.top-Yt.top+pi),wi=gi(S.clientX-Jt.left-Zt.left+mi,S.clientY-Jt.top-Zt.top+pi);vi<3.5&&wi<3.5&&(n=vi>wi?"cursor":"anchor"),wi<3.5?n="anchor":vi<3.5?n="cursor":n="scroll",t=setTimeout(gt,450)}i=Qe},u),w.addListener(a,"touchend",function(S){b=u.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),n=="zoom"?(n="",g=0):t?(u.selection.moveToPosition(m),g=0,he()):n=="scroll"?(O(),Y()):he(),clearTimeout(t),t=null},u),w.addListener(a,"touchmove",function(S){t&&(clearTimeout(t),t=null);var y=S.touches;if(!(y.length>1||n=="zoom")){var I=y[0],ke=o-I.clientX,Qe=r-I.clientY;if(n=="wait")if(ke*ke+Qe*Qe>4)n="cursor";else return S.preventDefault();o=I.clientX,r=I.clientY,S.clientX=I.clientX,S.clientY=I.clientY;var Je=S.timeStamp,mt=Je-e;if(e=Je,n=="scroll"){var yt=new M(S,u);yt.speed=1,yt.wheelX=ke,yt.wheelY=Qe,10*Math.abs(ke)<Math.abs(Qe)&&(ke=0),10*Math.abs(Qe)<Math.abs(ke)&&(Qe=0),mt!=0&&(T=ke/mt,x=Qe/mt),u._emit("mousewheel",yt),yt.propagationStopped||(T=x=0)}else{var Qt=new M(S,u),bt=Qt.getDocumentPosition();n=="cursor"?u.selection.moveCursorToPosition(bt):n=="anchor"&&u.selection.setSelectionAnchor(bt.row,bt.column),u.renderer.scrollCursorIntoView(bt),S.preventDefault()}}},u);function O(){g+=60,c=setInterval(function(){g--<=0&&(clearInterval(c),c=null),Math.abs(T)<.01&&(T=0),Math.abs(x)<.01&&(x=0),g<20&&(T=.9*T),g<20&&(x=.9*x);var S=u.session.getScrollTop();u.renderer.scrollBy(10*T,10*x),S==u.session.getScrollTop()&&(g=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,v,fe){var M=p("../lib/event"),w=p("../lib/useragent"),A=p("./default_handlers").DefaultHandlers,a=p("./default_gutter_handler").GutterHandler,u=p("./mouse_event").MouseEvent,n=p("./dragdrop_handler").DragdropHandler,o=p("./touch_handler").addTouchListeners,r=p("../config"),i=function(){function e(t){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var c=this;this.editor=t,new A(this),new a(this),new n(this);var g=function(T){var x=!document.hasFocus||!document.hasFocus()||!t.isFocused()&&document.activeElement==(t.textInput&&t.textInput.getElement());x&&window.focus(),t.focus(),setTimeout(function(){t.isFocused()||t.focus()})},m=t.renderer.getMouseEventTarget();M.addListener(m,"click",this.onMouseEvent.bind(this,"click"),t),M.addListener(m,"mousemove",this.onMouseMove.bind(this,"mousemove"),t),M.addMultiMouseDownListener([m,t.renderer.scrollBarV&&t.renderer.scrollBarV.inner,t.renderer.scrollBarH&&t.renderer.scrollBarH.inner,t.textInput&&t.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",t),M.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel"),t),o(t.container,t);var E=t.renderer.$gutter;M.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),t),M.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),t),M.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),t),M.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),t),M.addListener(m,"mousedown",g,t),M.addListener(E,"mousedown",g,t),w.isIE&&t.renderer.scrollBarV&&(M.addListener(t.renderer.scrollBarV.element,"mousedown",g,t),M.addListener(t.renderer.scrollBarH.element,"mousedown",g,t)),t.on("mousemove",function(T){if(!(c.state||c.$dragDelay||!c.$dragEnabled)){var x=t.renderer.screenToTextCoordinates(T.x,T.y),b=t.session.selection.getRange(),de=t.renderer;!b.isEmpty()&&b.insideStart(x.row,x.column)?de.setCursorStyle("default"):de.setCursorStyle("")}},t)}return e.prototype.onMouseEvent=function(t,c){this.editor.session&&this.editor._emit(t,new u(c,this.editor))},e.prototype.onMouseMove=function(t,c){var g=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!g||!g.length||this.editor._emit(t,new u(c,this.editor))},e.prototype.onMouseWheel=function(t,c){var g=new u(c,this.editor);g.speed=this.$scrollSpeed*2,g.wheelX=c.wheelX,g.wheelY=c.wheelY,this.editor._emit(t,g)},e.prototype.setState=function(t){this.state=t},e.prototype.captureMouse=function(t,c){this.x=t.x,this.y=t.y,this.isMousePressed=!0;var g=this.editor,m=this.editor.renderer;m.$isMousePressed=!0;var E=this,T=!0,x=function(Y){if(Y){if(w.isWebKit&&!Y.which&&E.releaseMouse)return E.releaseMouse();E.x=Y.clientX,E.y=Y.clientY,c&&c(Y),E.mouseEvent=new u(Y,E.editor),E.$mouseMoved=!0}},b=function(Y){g.off("beforeEndOperation",he),T=!1,g.session&&de(),E[E.state+"End"]&&E[E.state+"End"](Y),E.state="",E.isMousePressed=m.$isMousePressed=!1,m.$keepTextAreaAtCursor&&m.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,Y&&E.onMouseEvent("mouseup",Y),g.endOperation()},de=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1},Te=function(){T&&(de(),M.nextFrame(Te))};if(w.isOldIE&&t.domEvent.type=="dblclick")return setTimeout(function(){b(t)});var he=function(Y){E.releaseMouse&&g.curOp.command.name&&g.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};g.on("beforeEndOperation",he),g.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=x,E.releaseMouse=M.capture(this.editor.container,x,b),Te()},e.prototype.cancelContextMenu=function(){var t=(function(c){c&&c.domEvent&&c.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",t),c&&c.domEvent&&M.stopEvent(c.domEvent))}).bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},e}();i.prototype.releaseMouse=null,r.defineOptions(i.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:w.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),v.MouseHandler=i}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(p,v,fe){var M=p("../lib/dom"),w=function(){function A(a){a.on("click",function(u){var n=u.getDocumentPosition(),o=a.session,r=o.getFoldAt(n.row,n.column,1);r&&(u.getAccelKey()?o.removeFold(r):o.expandFold(r),u.stop());var i=u.domEvent&&u.domEvent.target;i&&M.hasCssClass(i,"ace_inline_button")&&M.hasCssClass(i,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(u){var n=a.renderer.$gutterLayer.getRegion(u);if(n=="foldWidgets"){var o=u.getDocumentPosition().row,r=a.session;r.foldWidgets&&r.foldWidgets[o]&&a.session.onFoldWidgetClick(o,u),a.isFocused()||a.focus(),u.stop()}}),a.on("gutterdblclick",function(u){var n=a.renderer.$gutterLayer.getRegion(u);if(n=="foldWidgets"){var o=u.getDocumentPosition().row,r=a.session,i=r.getParentFoldRangeData(o,!0),e=i.range||i.firstRange;if(e){o=e.start.row;var t=r.getFoldAt(o,r.getLine(o).length,1);t?r.removeFold(t):(r.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}u.stop()}})}return A}();v.FoldHandler=w}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(p,v,fe){var M=p("../lib/keys"),w=p("../lib/event"),A=function(){function a(u){this.$editor=u,this.$data={editor:u},this.$handlers=[],this.setDefaultHandler(u.commands)}return a.prototype.setDefaultHandler=function(u){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=u,this.addKeyboardHandler(u,0)},a.prototype.setKeyboardHandler=function(u){var n=this.$handlers;if(n[n.length-1]!=u){for(;n[n.length-1]&&n[n.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(n[n.length-1]);this.addKeyboardHandler(u,1)}},a.prototype.addKeyboardHandler=function(u,n){if(u){typeof u=="function"&&!u.handleKeyboard&&(u.handleKeyboard=u);var o=this.$handlers.indexOf(u);o!=-1&&this.$handlers.splice(o,1),n==null?this.$handlers.push(u):this.$handlers.splice(n,0,u),o==-1&&u.attach&&u.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(u){var n=this.$handlers.indexOf(u);return n==-1?!1:(this.$handlers.splice(n,1),u.detach&&u.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var u=this.$data,n=u.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(n,u)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(u,n,o,r){for(var i,e=!1,t=this.$editor.commands,c=this.$handlers.length;c--&&(i=this.$handlers[c].handleKeyboard(this.$data,u,n,o,r),!(!(!i||!i.command)&&(i.command=="null"?e=!0:e=t.exec(i.command,this.$editor,i.args,r),e&&r&&u!=-1&&i.passEvent!=!0&&i.command.passEvent!=!0&&w.stopEvent(r),e))););return!e&&u==-1&&(i={command:"insertstring"},e=t.exec("insertstring",this.$editor,n)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),e},a.prototype.onCommandKey=function(u,n,o){var r=M.keyCodeToString(o);return this.$callKeyboardHandlers(n,r,o,u)},a.prototype.onTextInput=function(u){return this.$callKeyboardHandlers(-1,u)},a}();v.KeyBinding=A}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(p,v,fe){var M=0,w=0,A=!1,a=!1,u=!1,n=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],o=[[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,i=1,e=0,t=1,c=2,g=3,m=4,E=5,T=6,x=7,b=8,de=9,Te=10,he=11,Y=12,gt=13,V=14,O=15,S=16,y=17,I=18,ke=[I,I,I,I,I,I,I,I,I,T,E,T,b,E,I,I,I,I,I,I,I,I,I,I,I,I,I,I,E,E,E,T,b,m,m,he,he,he,m,m,m,m,m,Te,de,Te,de,de,c,c,c,c,c,c,c,c,c,c,de,m,m,m,m,m,m,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,m,m,m,m,m,m,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,m,m,m,m,I,I,I,I,I,I,E,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,de,m,he,he,he,he,m,m,m,m,e,m,m,I,m,m,he,he,c,c,m,e,m,m,m,c,e,m,m,m,m,m],Qe=[b,b,b,b,b,b,b,b,b,b,b,I,I,I,e,t,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b,E,gt,V,O,S,y,de,he,he,he,he,he,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,de,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b];function Je(bt,Gt,Yt,Zt){var Jt=M?o:n,pi=null,mi=null,gi=null,vi=0,wi=null,Ci=null,$i=-1,bi=null,Si=null,_i=[];if(!Zt)for(bi=0,Zt=[];bi<Yt;bi++)Zt[bi]=Qt(bt[bi]);for(w=M,A=!1,a=!1,u=!1,Si=0;Si<Yt;Si++){if(pi=vi,_i[Si]=mi=yt(bt,Zt,_i,Si),vi=Jt[pi][mi],wi=vi&240,vi&=15,Gt[Si]=gi=Jt[vi][5],wi>0)if(wi==16){for(bi=$i;bi<Si;bi++)Gt[bi]=1;$i=-1}else $i=-1;if(Ci=Jt[vi][6],Ci)$i==-1&&($i=Si);else if($i>-1){for(bi=$i;bi<Si;bi++)Gt[bi]=gi;$i=-1}Zt[Si]==E&&(Gt[Si]=0),w|=gi}if(u){for(bi=0;bi<Yt;bi++)if(Zt[bi]==T){Gt[bi]=M;for(var xi=bi-1;xi>=0&&Zt[xi]==b;xi--)Gt[xi]=M}}}function mt(bt,Gt,Yt){if(!(w<bt)){if(bt==1&&M==i&&!a){Yt.reverse();return}for(var Zt=Yt.length,Jt=0,pi,mi,gi,vi;Jt<Zt;){if(Gt[Jt]>=bt){for(pi=Jt+1;pi<Zt&&Gt[pi]>=bt;)pi++;for(mi=Jt,gi=pi-1;mi<gi;mi++,gi--)vi=Yt[mi],Yt[mi]=Yt[gi],Yt[gi]=vi;Jt=pi}Jt++}}}function yt(bt,Gt,Yt,Zt){var Jt=Gt[Zt],pi,mi,gi,vi;switch(Jt){case e:case t:A=!1;case m:case g:return Jt;case c:return A?g:c;case x:return A=!0,t;case b:return m;case de:return Zt<1||Zt+1>=Gt.length||(pi=Yt[Zt-1])!=c&&pi!=g||(mi=Gt[Zt+1])!=c&&mi!=g?m:(A&&(mi=g),mi==pi?mi:m);case Te:return pi=Zt>0?Yt[Zt-1]:E,pi==c&&Zt+1<Gt.length&&Gt[Zt+1]==c?c:m;case he:if(Zt>0&&Yt[Zt-1]==c)return c;if(A)return m;for(vi=Zt+1,gi=Gt.length;vi<gi&&Gt[vi]==he;)vi++;return vi<gi&&Gt[vi]==c?c:m;case Y:for(gi=Gt.length,vi=Zt+1;vi<gi&&Gt[vi]==Y;)vi++;if(vi<gi){var wi=bt[Zt],Ci=wi>=1425&&wi<=2303||wi==64286;if(pi=Gt[vi],Ci&&(pi==t||pi==x))return t}return Zt<1||(pi=Gt[Zt-1])==E?m:Yt[Zt-1];case E:return A=!1,a=!0,M;case T:return u=!0,m;case gt:case V:case S:case y:case O:A=!1;case I:return m}}function Qt(bt){var Gt=bt.charCodeAt(0),Yt=Gt>>8;return Yt==0?Gt>191?e:ke[Gt]:Yt==5?/[\u0591-\u05f4]/.test(bt)?t:e:Yt==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(bt)?Y:/[\u0660-\u0669\u066b-\u066c]/.test(bt)?g:Gt==1642?he:/[\u06f0-\u06f9]/.test(bt)?c:x:Yt==32&&Gt<=8287?Qe[Gt&255]:Yt==254&&Gt>=65136?x:m}v.L=e,v.R=t,v.EN=c,v.ON_R=3,v.AN=4,v.R_H=5,v.B=6,v.RLE=7,v.DOT="·",v.doBidiReorder=function(bt,Gt,Yt){if(bt.length<2)return{};var Zt=bt.split(""),Jt=new Array(Zt.length),pi=new Array(Zt.length),mi=[];M=Yt?i:r,Je(Zt,mi,Zt.length,Gt);for(var gi=0;gi<Jt.length;Jt[gi]=gi,gi++);mt(2,mi,Jt),mt(1,mi,Jt);for(var gi=0;gi<Jt.length-1;gi++)Gt[gi]===g?mi[gi]=v.AN:mi[gi]===t&&(Gt[gi]>x&&Gt[gi]<gt||Gt[gi]===m||Gt[gi]===I)?mi[gi]=v.ON_R:gi>0&&Zt[gi-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(Zt[gi])&&(mi[gi-1]=mi[gi]=v.R_H,gi++);Zt[Zt.length-1]===v.DOT&&(mi[Zt.length-1]=v.B),Zt[0]==="‫"&&(mi[0]=v.RLE);for(var gi=0;gi<Jt.length;gi++)pi[gi]=mi[Jt[gi]];return{logicalFromVisual:Jt,bidiLevels:pi}},v.hasBidiCharacters=function(bt,Gt){for(var Yt=!1,Zt=0;Zt<bt.length;Zt++)Gt[Zt]=Qt(bt.charAt(Zt)),!Yt&&(Gt[Zt]==t||Gt[Zt]==x||Gt[Zt]==g)&&(Yt=!0);return Yt},v.getVisualFromLogicalIdx=function(bt,Gt){for(var Yt=0;Yt<Gt.logicalFromVisual.length;Yt++)if(Gt.logicalFromVisual[Yt]==bt)return Yt;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(p,v,fe){var M=p("./lib/bidiutil"),w=p("./lib/lang"),A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function u(n){this.session=n,this.bidiMap={},this.currentRow=null,this.bidiUtil=M,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=A.test(n.getValue())}return u.prototype.isBidiRow=function(n,o,r){return this.seenBidi?(n!==this.currentRow&&(this.currentRow=n,this.updateRowLine(o,r),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},u.prototype.onChange=function(n){this.seenBidi?this.currentRow=null:n.action=="insert"&&A.test(n.lines.join(`
182
+ `))&&(this.seenBidi=!0,this.currentRow=null)},u.prototype.getDocumentRow=function(){var n=0,o=this.session.$screenRowCache;if(o.length){var r=this.session.$getRowCacheIndex(o,this.currentRow);r>=0&&(n=this.session.$docRowCache[r])}return n},u.prototype.getSplitIndex=function(){var n=0,o=this.session.$screenRowCache;if(o.length)for(var r,i=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-n>0&&(r=this.session.$getRowCacheIndex(o,this.currentRow-n-1),r===i);)i=r,n++;else n=this.currentRow;return n},u.prototype.updateRowLine=function(n,o){n===void 0&&(n=this.getDocumentRow());var r=n===this.session.getLength()-1,i=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(n),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[n];e&&(o===void 0&&(o=this.getSplitIndex()),o>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[M.L],this.line=o<e.length?this.line.substring(e[o-1],e[o]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[o]),o==e.length&&(this.line+=this.showInvisibles?i:M.DOT))}else this.line+=this.showInvisibles?i:M.DOT;var t=this.session,c=0,g;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(m,E){return m===" "||t.isFullWidth(m.charCodeAt(0))?(g=m===" "?t.getScreenTabSize(E+c):2,c+=g-1,w.stringRepeat(M.DOT,g)):m}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==M.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 n=[];M.hasBidiCharacters(this.line,n)||this.isRtlDir?this.bidiMap=M.doBidiReorder(this.line,n,this.isRtlDir):this.bidiMap={}},u.prototype.markAsDirty=function(){this.currentRow=null},u.prototype.updateCharacterWidths=function(n){if(this.characterWidth!==n.$characterSize.width){this.fontMetrics=n;var o=this.characterWidth=n.$characterSize.width,r=n.$measureCharWidth("ה");this.charWidths[M.L]=this.charWidths[M.EN]=this.charWidths[M.ON_R]=o,this.charWidths[M.R]=this.charWidths[M.AN]=r,this.charWidths[M.R_H]=r*.45,this.charWidths[M.B]=this.charWidths[M.RLE]=0,this.currentRow=null}},u.prototype.setShowInvisibles=function(n){this.showInvisibles=n,this.currentRow=null},u.prototype.setEolChar=function(n){this.EOL=n},u.prototype.setContentWidth=function(n){this.contentWidth=n},u.prototype.isRtlLine=function(n){return this.$isRtl?!0:n!=null?this.session.getLine(n).charAt(0)==this.RLE:this.isRtlDir},u.prototype.setRtlDirection=function(n,o){for(var r=n.getCursorPosition(),i=n.selection.getSelectionAnchor().row;i<=r.row;i++)!o&&n.session.getLine(i).charAt(0)===n.session.$bidiHandler.RLE?n.session.doc.removeInLine(i,0,1):o&&n.session.getLine(i).charAt(0)!==n.session.$bidiHandler.RLE&&n.session.doc.insert({column:0,row:i},n.session.$bidiHandler.RLE)},u.prototype.getPosLeft=function(n){n-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,r=n>o?this.session.getOverwrite()?n:n-1:o,i=M.getVisualFromLogicalIdx(r,this.bidiMap),e=this.bidiMap.bidiLevels,t=0;!this.session.getOverwrite()&&n<=o&&e[i]%2!==0&&i++;for(var c=0;c<i;c++)t+=this.charWidths[e[c]];return!this.session.getOverwrite()&&n>o&&e[i]%2===0&&(t+=this.charWidths[e[i]]),this.wrapIndent&&(t+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(t+=this.rtlLineOffset),t},u.prototype.getSelections=function(n,o){var r=this.bidiMap,i=r.bidiLevels,e,t=[],c=0,g=Math.min(n,o)-this.wrapIndent,m=Math.max(n,o)-this.wrapIndent,E=!1,T=!1,x=0;this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,de=0;de<i.length;de++)b=r.logicalFromVisual[de],e=i[de],E=b>=g&&b<m,E&&!T?x=c:!E&&T&&t.push({left:x,width:c-x}),c+=this.charWidths[e],T=E;if(E&&de===i.length&&t.push({left:x,width:c-x}),this.isRtlDir)for(var Te=0;Te<t.length;Te++)t[Te].left+=this.rtlLineOffset;return t},u.prototype.offsetToCol=function(r){this.isRtlDir&&(r-=this.rtlLineOffset);var o=0,r=Math.max(r,0),i=0,e=0,t=this.bidiMap.bidiLevels,c=this.charWidths[t[e]];for(this.wrapIndent&&(r-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);r>i+c/2;){if(i+=c,e===t.length-1){c=0;break}c=this.charWidths[t[++e]]}return e>0&&t[e-1]%2!==0&&t[e]%2===0?(r<i&&e--,o=this.bidiMap.logicalFromVisual[e]):e>0&&t[e-1]%2===0&&t[e]%2!==0?o=1+(r>i?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===t.length-1&&c===0&&t[e-1]%2===0||!this.isRtlDir&&e===0&&t[e]%2!==0?o=1+this.bidiMap.logicalFromVisual[e]:(e>0&&t[e-1]%2!==0&&c!==0&&e--,o=this.bidiMap.logicalFromVisual[e]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},u}();v.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(p,v,fe){var M=p("./lib/oop"),w=p("./lib/lang"),A=p("./lib/event_emitter").EventEmitter,a=p("./range").Range,u=function(){function n(o){this.session=o,this.doc=o.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(i){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return n.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},n.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},n.prototype.getCursor=function(){return this.lead.getPosition()},n.prototype.setAnchor=function(o,r){this.$isEmpty=!1,this.anchor.setPosition(o,r)},n.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},n.prototype.getSelectionLead=function(){return this.lead.getPosition()},n.prototype.isBackwards=function(){var o=this.anchor,r=this.lead;return o.row>r.row||o.row==r.row&&o.column>r.column},n.prototype.getRange=function(){var o=this.anchor,r=this.lead;return this.$isEmpty?a.fromPoints(r,r):this.isBackwards()?a.fromPoints(r,o):a.fromPoints(o,r)},n.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},n.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},n.prototype.setRange=function(o,r){var i=r?o.end:o.start,e=r?o.start:o.end;this.$setSelection(i.row,i.column,e.row,e.column)},n.prototype.$setSelection=function(o,r,i,e){if(!this.$silent){var t=this.$isEmpty,c=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,r),this.cursor.setPosition(i,e),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||t!=this.$isEmpty||c)&&this._emit("changeSelection")}},n.prototype.$moveSelection=function(o){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),o.call(this)},n.prototype.selectTo=function(o,r){this.$moveSelection(function(){this.moveCursorTo(o,r)})},n.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},n.prototype.moveTo=function(o,r){this.clearSelection(),this.moveCursorTo(o,r)},n.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},n.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},n.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},n.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},n.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},n.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},n.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},n.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},n.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},n.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},n.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},n.prototype.getWordRange=function(o,r){if(typeof r>"u"){var i=o||this.lead;o=i.row,r=i.column}return this.session.getWordRange(o,r)},n.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},n.prototype.selectAWord=function(){var o=this.getCursor(),r=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(r)},n.prototype.getLineRange=function(o,r){var i=typeof o=="number"?o:this.lead.row,e,t=this.session.getFoldLine(i);return t?(i=t.start.row,e=t.end.row):e=i,r===!0?new a(i,0,e,this.session.getLine(e).length):new a(i,0,e+1,0)},n.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},n.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},n.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},n.prototype.wouldMoveIntoSoftTab=function(o,r,i){var e=o.column,t=o.column+r;return i<0&&(e=o.column-r,t=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(e,t).split(" ").length-1==r},n.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),r;if(r=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(r.start.row,r.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},n.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),r;if(r=this.session.getFoldAt(o.row,o.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 i=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},n.prototype.moveCursorLineStart=function(){var o=this.lead.row,r=this.lead.column,i=this.session.documentToScreenRow(o,r),e=this.session.screenToDocumentPosition(i,0),t=this.session.getDisplayLine(o,null,e.row,e.column),c=t.match(/^\s*/);c[0].length!=r&&!this.session.$useEmacsStyleLineStart&&(e.column+=c[0].length),this.moveCursorToPosition(e)},n.prototype.moveCursorLineEnd=function(){var o=this.lead,r=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==r.column){var i=this.session.getLine(r.row);if(r.column==i.length){var e=i.search(/\s+$/);e>0&&(r.column=e)}}this.moveCursorTo(r.row,r.column)},n.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,r=this.doc.getLine(o).length;this.moveCursorTo(o,r)},n.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},n.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,r=this.lead.column,i=this.doc.getLine(o),e=i.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var t=this.session.getFoldAt(o,r,1);if(t){this.moveCursorTo(t.end.row,t.end.column);return}if(this.session.nonTokenRe.exec(e)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=i.substring(r)),r>=i.length){this.moveCursorTo(o,i.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(r+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},n.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,r=this.lead.column,i;if(i=this.session.getFoldAt(o,r,-1)){this.moveCursorTo(i.start.row,i.start.column);return}var e=this.session.getFoldStringAt(o,r,-1);e==null&&(e=this.doc.getLine(o).substring(0,r));var t=w.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(t)&&(r-=this.session.nonTokenRe.lastIndex,t=t.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),r<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(t)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},n.prototype.$shortWordEndIndex=function(o){var r=0,i,e=/\s/,t=this.session.tokenRe;if(t.lastIndex=0,this.session.tokenRe.exec(o))r=this.session.tokenRe.lastIndex;else{for(;(i=o[r])&&e.test(i);)r++;if(r<1){for(t.lastIndex=0;(i=o[r])&&!t.test(i);)if(t.lastIndex=0,r++,e.test(i))if(r>2){r--;break}else{for(;(i=o[r])&&e.test(i);)r++;if(r>2)break}}}return t.lastIndex=0,r},n.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,r=this.lead.column,i=this.doc.getLine(o),e=i.substring(r),t=this.session.getFoldAt(o,r,1);if(t)return this.moveCursorTo(t.end.row,t.end.column);if(r==i.length){var c=this.doc.getLength();do o++,e=this.doc.getLine(o);while(o<c&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),r=0}var g=this.$shortWordEndIndex(e);this.moveCursorTo(o,r+g)},n.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,r=this.lead.column,i;if(i=this.session.getFoldAt(o,r,-1))return this.moveCursorTo(i.start.row,i.start.column);var e=this.session.getLine(o).substring(0,r);if(r===0){do o--,e=this.doc.getLine(o);while(o>0&&/^\s*$/.test(e));r=e.length,/\s+$/.test(e)||(e="")}var t=w.stringReverse(e),c=this.$shortWordEndIndex(t);return this.moveCursorTo(o,r-c)},n.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},n.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},n.prototype.moveCursorBy=function(o,r){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(r===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var t=this.session.lineWidgets[this.lead.row];o<0?o-=t.rowsAbove||0:o>0&&(o+=t.rowCount-(t.rowsAbove||0))}var c=this.session.screenToDocumentPosition(i.row+o,i.column,e);o!==0&&r===0&&c.row===this.lead.row&&(c.column,this.lead.column),this.moveCursorTo(c.row,c.column+r,r===0)},n.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},n.prototype.moveCursorTo=function(o,r,i){var e=this.session.getFoldAt(o,r,1);e&&(o=e.start.row,r=e.start.column),this.$keepDesiredColumnOnChange=!0;var t=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(t.charAt(r))&&t.charAt(r-1)&&(this.lead.row==o&&this.lead.column==r+1?r=r-1:r=r+1),this.lead.setPosition(o,r),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},n.prototype.moveCursorToScreen=function(o,r,i){var e=this.session.screenToDocumentPosition(o,r);this.moveCursorTo(e.row,e.column,i)},n.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},n.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},n.prototype.toOrientedRange=function(o){var r=this.getRange();return o?(o.start.column=r.start.column,o.start.row=r.start.row,o.end.column=r.end.column,o.end.row=r.end.row):o=r,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},n.prototype.getRangeOfMovements=function(o){var r=this.getCursor();try{o(this);var i=this.getCursor();return a.fromPoints(r,i)}catch{return a.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},n.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(r){var i=r.clone();return i.isBackwards=r.cursor==r.start,i});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},n.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var r=o.length;r--;){var i=a.fromPoints(o[r].start,o[r].end);o[r].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},n.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(o[r]))return!1;return!0},n}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,M.implement(u.prototype,A),v.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(p,v,fe){var M=p("./lib/report_error").reportError,w=2e3,A=function(){function a(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var n in this.states){for(var o=this.states[n],r=[],i=0,e=this.matchMappings[n]={defaultToken:"text"},t="g",c=[],g=0;g<o.length;g++){var m=o[g];if(m.defaultToken&&(e.defaultToken=m.defaultToken),m.caseInsensitive&&t.indexOf("i")===-1&&(t+="i"),m.unicode&&t.indexOf("u")===-1&&(t+="u"),m.regex!=null){m.regex instanceof RegExp&&(m.regex=m.regex.toString().slice(1,-1));var E=m.regex,T=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(m.token)?m.token.length==1||T==1?m.token=m.token[0]:T-1!=m.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:m,groupCount:T-1}),m.token=m.token[0]):(m.tokenArray=m.token,m.token=null,m.onMatch=this.$arrayTokens):typeof m.token=="function"&&!m.onMatch&&(T>1?m.onMatch=this.$applyToken:m.onMatch=m.token),T>1&&(/\\\d/.test(m.regex)?E=m.regex.replace(/\\([0-9]+)/g,function(x,b){return"\\"+(parseInt(b,10)+i+1)}):(T=1,E=this.removeCapturingGroups(m.regex)),!m.splitRegex&&typeof m.token!="string"&&c.push(m)),e[i]=g,i+=T,r.push(E),m.onMatch||(m.onMatch=null)}}r.length||(e[0]=0,r.push("$")),c.forEach(function(x){x.splitRegex=this.createSplitterRegexp(x.regex,t)},this),this.regExps[n]=new RegExp("("+r.join(")|(")+")|($)",t)}}return a.prototype.$setMaxTokenCount=function(u){w=u|0},a.prototype.$applyToken=function(u){var n=this.splitRegex.exec(u).slice(1),o=this.token.apply(this,n);if(typeof o=="string")return[{type:o,value:u}];for(var r=[],i=0,e=o.length;i<e;i++)n[i]&&(r[r.length]={type:o[i],value:n[i]});return r},a.prototype.$arrayTokens=function(u){if(!u)return[];var n=this.splitRegex.exec(u);if(!n)return"text";for(var o=[],r=this.tokenArray,i=0,e=r.length;i<e;i++)n[i+1]&&(o[o.length]={type:r[i],value:n[i+1]});return o},a.prototype.removeCapturingGroups=function(u){var n=u.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,r){return r?"(?:":o});return n},a.prototype.createSplitterRegexp=function(u,n){if(u.indexOf("(?=")!=-1){var o=0,r=!1,i={};u.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,c,g,m,E){return r?r=m!="]":m?r=!0:g?(o==i.stack&&(i.end=E+1,i.stack=-1),o--):c&&(o++,c.length!=1&&(i.stack=o,i.start=E)),e}),i.end!=null&&/^\)*$/.test(u.substr(i.end))&&(u=u.substring(0,i.start)+u.substr(i.end))}return u.charAt(0)!="^"&&(u="^"+u),u.charAt(u.length-1)!="$"&&(u+="$"),new RegExp(u,(n||"").replace("g",""))},a.prototype.getLineTokens=function(u,n){if(n&&typeof n!="string"){var o=n.slice(0);n=o[0],n==="#tmp"&&(o.shift(),n=o.shift())}else var o=[];var r=n||"start",i=this.states[r];i||(r="start",i=this.states[r]);var e=this.matchMappings[r],t=this.regExps[r];t.lastIndex=0;for(var c,g=[],m=0,E=0,T={type:null,value:""};c=t.exec(u);){var x=e.defaultToken,b=null,de=c[0],Te=t.lastIndex;if(Te-de.length>m){var he=u.substring(m,Te-de.length);T.type==x?T.value+=he:(T.type&&g.push(T),T={type:x,value:he})}for(var Y=0;Y<c.length-2;Y++)if(c[Y+1]!==void 0){b=i[e[Y]],b.onMatch?x=b.onMatch(de,r,o,u):x=b.token,b.next&&(typeof b.next=="string"?r=b.next:r=b.next(r,o),i=this.states[r],i||(this.reportError("state doesn't exist",r),r="start",i=this.states[r]),e=this.matchMappings[r],m=Te,t=this.regExps[r],t.lastIndex=Te),b.consumeLineEnd&&(m=Te);break}if(de){if(typeof x=="string")(!b||b.merge!==!1)&&T.type===x?T.value+=de:(T.type&&g.push(T),T={type:x,value:de});else if(x){T.type&&g.push(T),T={type:null,value:""};for(var Y=0;Y<x.length;Y++)g.push(x[Y])}}if(m==u.length)break;if(m=Te,E++>w){for(E>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:n,line:u});m<u.length;)T.type&&g.push(T),T={value:u.substring(m,m+=500),type:"overflow"};r="start",o=[];break}}return T.type&&g.push(T),o.length>1&&o[0]!==r&&o.unshift("#tmp",r),{tokens:g,state:o.length?o:r}},a}();A.prototype.reportError=M,v.Tokenizer=A}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(p,v,fe){var M=p("../lib/deep_copy").deepCopy,w;w=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(u,n){if(!n){for(var o in u)this.$rules[o]=u[o];return}for(var o in u){for(var r=u[o],i=0;i<r.length;i++){var e=r[i];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(n)!==0&&(e.next=n+e.next),e.nextState&&e.nextState.indexOf(n)!==0&&(e.nextState=n+e.nextState))}this.$rules[n+o]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(u,n,o,r,i){var e=typeof u=="function"?new u().getRules():u;if(r)for(var t=0;t<r.length;t++)r[t]=n+r[t];else{r=[];for(var c in e)r.push(n+c)}if(this.addRules(e,n),o)for(var g=Array.prototype[i?"push":"unshift"],t=0;t<r.length;t++)g.apply(this.$rules[r[t]],M(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(n)},this.getEmbeds=function(){return this.$embeds};var A=function(u,n){return(u!="start"||n.length)&&n.unshift(this.nextState,u),this.nextState},a=function(u,n){return n.shift(),n.shift()||"start"};this.normalizeRules=function(){var u=0,n=this.$rules;function o(r){var i=n[r];i.processed=!0;for(var e=0;e<i.length;e++){var t=i[e],c=null;Array.isArray(t)&&(c=t,t={}),!t.regex&&t.start&&(t.regex=t.start,t.next||(t.next=[]),t.next.push({defaultToken:t.token},{token:t.token+".end",regex:t.end||t.start,next:"pop"}),t.token=t.token+".start",t.push=!0);var g=t.next||t.push;if(g&&Array.isArray(g)){var m=t.stateName;m||(m=t.token,typeof m!="string"&&(m=m[0]||""),n[m]&&(m+=u++)),n[m]=g,t.next=m,o(m)}else g=="pop"&&(t.next=a);if(t.push&&(t.nextState=t.next||t.push,t.next=A,delete t.push),t.rules)for(var E in t.rules)n[E]?n[E].push&&n[E].push.apply(n[E],t.rules[E]):n[E]=t.rules[E];var T=typeof t=="string"?t:t.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?c=T.map(function(b){return n[b]}):c=n[T]),c){var x=[e,1].concat(c);t.noEscape&&(x=x.filter(function(b){return!b.next})),i.splice.apply(i,x),e--}t.keywordMap&&(t.token=this.createKeywordMapper(t.keywordMap,t.defaultToken||"text",t.caseInsensitive),delete t.defaultToken)}}Object.keys(n).forEach(o,this)},this.createKeywordMapper=function(u,n,o,r){var i=Object.create(null);return this.$keywordList=[],Object.keys(u).forEach(function(e){for(var t=u[e],c=t.split(r||"|"),g=c.length;g--;){var m=c[g];this.$keywordList.push(m),o&&(m=m.toLowerCase()),i[m]=e}},this),u=null,o?function(e){return i[e.toLowerCase()]||n}:function(e){return i[e]||n}},this.getKeywords=function(){return this.$keywords}}).call(w.prototype),v.TextHighlightRules=w}),ace.define("ace/mode/behaviour",["require","exports","module"],function(p,v,fe){var M;M=function(){this.$behaviours={}},(function(){this.add=function(w,A,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[w]:this.$behaviours[w]={}}this.$behaviours[w][A]=a},this.addBehaviours=function(w){for(var A in w)for(var a in w[A])this.add(A,a,w[A][a])},this.remove=function(w){this.$behaviours&&this.$behaviours[w]&&delete this.$behaviours[w]},this.inherit=function(w,A){if(typeof w=="function")var a=new w().getBehaviours(A);else var a=w.getBehaviours(A);this.addBehaviours(a)},this.getBehaviours=function(w){if(w){for(var A={},a=0;a<w.length;a++)this.$behaviours[w[a]]&&(A[w[a]]=this.$behaviours[w[a]]);return A}else return this.$behaviours}}).call(M.prototype),v.Behaviour=M}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(p,v,fe){var M=p("./range").Range,w=function(){function A(a,u,n){this.$session=a,this.$row=u,this.$rowTokens=a.getTokens(u);var o=a.getTokenAt(u,n);this.$tokenIndex=o?o.index:-1}return A.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]},A.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},A.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},A.prototype.getCurrentTokenRow=function(){return this.$row},A.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,u=this.$tokenIndex,n=a[u].start;if(n!==void 0)return n;for(n=0;u>0;)u-=1,n+=a[u].value.length;return n},A.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},A.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new M(this.$row,u,this.$row,u+a.value.length)},A}();v.TokenIterator=w}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(p,v,fe){var M=p("../../lib/oop"),w=p("../behaviour").Behaviour,A=p("../../token_iterator").TokenIterator,a=p("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],n=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,r={},i={'"':'"',"'":"'"},e=function(g){var m=-1;if(g.multiSelect&&(m=g.selection.index,r.rangeCount!=g.multiSelect.rangeCount&&(r={rangeCount:g.multiSelect.rangeCount})),r[m])return o=r[m];o=r[m]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},t=function(g,m,E,T){var x=g.end.row-g.start.row;return{text:E+m+T,selection:[0,g.start.column+1,x,g.end.column+(x?0:1)]}},c;c=function(g){g=g||{},this.add("braces","insertion",function(m,E,T,x,b){var de=T.getCursorPosition(),Te=x.doc.getLine(de.row);if(b=="{"){e(T);var he=T.getSelectionRange(),Y=x.doc.getTextRange(he),gt=x.getTokenAt(de.row,de.column);if(Y!==""&&Y!=="{"&&T.getWrapBehavioursEnabled())return t(he,Y,"{","}");if(gt&&/(?:string)\.quasi|\.xml/.test(gt.type)){var V=[/tag\-(?:open|name)/,/attribute\-name/];return V.some(function(Je){return Je.test(gt.type)})||/(string)\.quasi/.test(gt.type)&&gt.value[de.column-gt.start-1]!=="$"?void 0:(c.recordAutoInsert(T,x,"}"),{text:"{}",selection:[1,1]})}else if(c.isSaneInsertion(T,x))return/[\]\}\)]/.test(Te[de.column])||T.inMultiSelectMode||g.braces?(c.recordAutoInsert(T,x,"}"),{text:"{}",selection:[1,1]}):(c.recordMaybeInsert(T,x,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){e(T);var O=Te.substring(de.column,de.column+1);if(O=="}"){var S=x.$findOpeningBracket("}",{column:de.column+1,row:de.row});if(S!==null&&c.isAutoInsertedClosing(de,Te,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
183
+ `||b==`\r
184
+ `){e(T);var y="";c.isMaybeInsertedClosing(de,Te)&&(y=a.stringRepeat("}",o.maybeInsertedBrackets),c.clearMaybeInsertedClosing());var O=Te.substring(de.column,de.column+1);if(O==="}"){var I=x.findMatchingBracket({row:de.row,column:de.column+1},"}");if(!I)return null;var ke=this.$getIndent(x.getLine(I.row))}else if(y)var ke=this.$getIndent(Te);else{c.clearMaybeInsertedClosing();return}var Qe=ke+x.getTabString();return{text:`
185
+ `+Qe+`
186
+ `+ke+y,selection:[1,Qe.length,1,Qe.length]}}else c.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(m,E,T,x,b){var de=x.doc.getTextRange(b);if(!b.isMultiLine()&&de=="{"){e(T);var Te=x.doc.getLine(b.start.row),he=Te.substring(b.end.column,b.end.column+1);if(he=="}")return b.end.column++,b;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(m,E,T,x,b){if(b=="("){e(T);var de=T.getSelectionRange(),Te=x.doc.getTextRange(de);if(Te!==""&&T.getWrapBehavioursEnabled())return t(de,Te,"(",")");if(c.isSaneInsertion(T,x))return c.recordAutoInsert(T,x,")"),{text:"()",selection:[1,1]}}else if(b==")"){e(T);var he=T.getCursorPosition(),Y=x.doc.getLine(he.row),gt=Y.substring(he.column,he.column+1);if(gt==")"){var V=x.$findOpeningBracket(")",{column:he.column+1,row:he.row});if(V!==null&&c.isAutoInsertedClosing(he,Y,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(m,E,T,x,b){var de=x.doc.getTextRange(b);if(!b.isMultiLine()&&de=="("){e(T);var Te=x.doc.getLine(b.start.row),he=Te.substring(b.start.column+1,b.start.column+2);if(he==")")return b.end.column++,b}}),this.add("brackets","insertion",function(m,E,T,x,b){if(b=="["){e(T);var de=T.getSelectionRange(),Te=x.doc.getTextRange(de);if(Te!==""&&T.getWrapBehavioursEnabled())return t(de,Te,"[","]");if(c.isSaneInsertion(T,x))return c.recordAutoInsert(T,x,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){e(T);var he=T.getCursorPosition(),Y=x.doc.getLine(he.row),gt=Y.substring(he.column,he.column+1);if(gt=="]"){var V=x.$findOpeningBracket("]",{column:he.column+1,row:he.row});if(V!==null&&c.isAutoInsertedClosing(he,Y,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(m,E,T,x,b){var de=x.doc.getTextRange(b);if(!b.isMultiLine()&&de=="["){e(T);var Te=x.doc.getLine(b.start.row),he=Te.substring(b.start.column+1,b.start.column+2);if(he=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(m,E,T,x,b){var de=x.$mode.$quotes||i;if(b.length==1&&de[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;e(T);var Te=b,he=T.getSelectionRange(),Y=x.doc.getTextRange(he);if(Y!==""&&(Y.length!=1||!de[Y])&&T.getWrapBehavioursEnabled())return t(he,Y,Te,Te);if(!Y){var gt=T.getCursorPosition(),V=x.doc.getLine(gt.row),O=V.substring(gt.column-1,gt.column),S=V.substring(gt.column,gt.column+1),y=x.getTokenAt(gt.row,gt.column),I=x.getTokenAt(gt.row,gt.column+1);if(O=="\\"&&y&&/escape/.test(y.type))return null;var ke=y&&/string|escape/.test(y.type),Qe=!I||/string|escape/.test(I.type),Je;if(S==Te)Je=ke!==Qe,Je&&/string\.end/.test(I.type)&&(Je=!1);else{if(ke&&!Qe||ke&&Qe)return null;var mt=x.$mode.tokenRe;mt.lastIndex=0;var yt=mt.test(O);mt.lastIndex=0;var Qt=mt.test(S),bt=x.$mode.$pairQuotesAfter,Gt=bt&&bt[Te]&&bt[Te].test(O);if(!Gt&&yt||Qt||S&&!/[\s;,.})\]\\]/.test(S))return null;var Yt=V[gt.column-2];if(O==Te&&(Yt==Te||mt.test(Yt)))return null;Je=!0}return{text:Je?Te+Te:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(m,E,T,x,b){var de=x.$mode.$quotes||i,Te=x.doc.getTextRange(b);if(!b.isMultiLine()&&de.hasOwnProperty(Te)){e(T);var he=x.doc.getLine(b.start.row),Y=he.substring(b.start.column+1,b.start.column+2);if(Y==Te)return b.end.column++,b}}),g.closeDocComment!==!1&&this.add("doc comment end","insertion",function(m,E,T,x,b){if(m==="doc-start"&&(b===`
187
+ `||b===`\r
188
+ `)&&T.selection.isEmpty()){var de=T.getCursorPosition();if(de.column===0)return;for(var Te=x.doc.getLine(de.row),he=x.doc.getLine(de.row+1),Y=x.getTokens(de.row),gt=0,V=0;V<Y.length;V++){gt+=Y[V].value.length;var O=Y[V];if(gt>=de.column){if(gt===de.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var S=Y[V+1];if(!S||!/\.doc/.test(S.type))return}}var y=de.column-(gt-O.value.length),I=O.value.indexOf("*/"),ke=O.value.indexOf("/**",I>-1?I+2:0);if(ke!==-1&&y>ke&&y<ke+3||I!==-1&&ke!==-1&&y>=I&&y<=ke||!/\.doc/.test(O.type))return;break}}var Qe=this.$getIndent(Te);if(/\s*\*/.test(he))return/^\s*\*/.test(Te)?{text:b+Qe+"* ",selection:[1,2+Qe.length,1,2+Qe.length]}:{text:b+Qe+" * ",selection:[1,3+Qe.length,1,3+Qe.length]};if(/\/\*\*/.test(Te.substring(0,de.column)))return{text:b+Qe+" * "+b+" "+Qe+"*/",selection:[1,4+Qe.length,1,4+Qe.length]}}})},c.isSaneInsertion=function(g,m){var E=g.getCursorPosition(),T=new A(m,E.row,E.column);if(!this.$matchTokenType(T.getCurrentToken()||"text",u)){if(/[)}\]]/.test(g.session.getLine(E.row)[E.column]))return!0;var x=new A(m,E.row,E.column+1);if(!this.$matchTokenType(x.getCurrentToken()||"text",u))return!1}return T.stepForward(),T.getCurrentTokenRow()!==E.row||this.$matchTokenType(T.getCurrentToken()||"text",n)},c.$matchTokenType=function(g,m){return m.indexOf(g.type||g)>-1},c.recordAutoInsert=function(g,m,E){var T=g.getCursorPosition(),x=m.doc.getLine(T.row);this.isAutoInsertedClosing(T,x,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=T.row,o.autoInsertedLineEnd=E+x.substr(T.column),o.autoInsertedBrackets++},c.recordMaybeInsert=function(g,m,E){var T=g.getCursorPosition(),x=m.doc.getLine(T.row);this.isMaybeInsertedClosing(T,x)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=T.row,o.maybeInsertedLineStart=x.substr(0,T.column)+E,o.maybeInsertedLineEnd=x.substr(T.column),o.maybeInsertedBrackets++},c.isAutoInsertedClosing=function(g,m,E){return o.autoInsertedBrackets>0&&g.row===o.autoInsertedRow&&E===o.autoInsertedLineEnd[0]&&m.substr(g.column)===o.autoInsertedLineEnd},c.isMaybeInsertedClosing=function(g,m){return o.maybeInsertedBrackets>0&&g.row===o.maybeInsertedRow&&m.substr(g.column)===o.maybeInsertedLineEnd&&m.substr(0,g.column)==o.maybeInsertedLineStart},c.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},c.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},M.inherits(c,w),v.CstyleBehaviour=c}),ace.define("ace/unicode",["require","exports","module"],function(p,v,fe){for(var M=[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],w=0,A=[],a=0;a<M.length;a+=2)A.push(w+=M[a]),M[a+1]&&A.push(45,w+=M[a+1]);v.wordChars=String.fromCharCode.apply(null,A)}),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,v,fe){var M=p("../config"),w=p("../tokenizer").Tokenizer,A=p("./text_highlight_rules").TextHighlightRules,a=p("./behaviour/cstyle").CstyleBehaviour,u=p("../unicode"),n=p("../lib/lang"),o=p("../token_iterator").TokenIterator,r=p("../range").Range,i;i=function(){this.HighlightRules=A},(function(){this.$defaultBehaviour=new a,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 w(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,c,g){var m=t.doc,E=!0,T=!0,x=1/0,b=t.getTabSize(),de=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var Y=this.lineCommentStart.map(n.escapeRegExp).join("|"),Te=this.lineCommentStart[0];else var Y=n.escapeRegExp(this.lineCommentStart),Te=this.lineCommentStart;Y=new RegExp("^(\\s*)(?:"+Y+") ?"),de=t.getUseSoftTabs();var O=function(Qt,bt){var Gt=Qt.match(Y);if(Gt){var Yt=Gt[1].length,Zt=Gt[0].length;!I(Qt,Yt,Zt)&&Gt[0][Zt-1]==" "&&Zt--,m.removeInLine(bt,Yt,Zt)}},y=Te+" ",V=function(Qt,bt){(!E||/\S/.test(Qt))&&(I(Qt,x,x)?m.insertInLine({row:bt,column:x},y):m.insertInLine({row:bt,column:x},Te))},S=function(Qt,bt){return Y.test(Qt)},I=function(Qt,bt,Gt){for(var Yt=0;bt--&&Qt.charAt(bt)==" ";)Yt++;if(Yt%b!=0)return!1;for(var Yt=0;Qt.charAt(Gt++)==" ";)Yt++;return b>2?Yt%b!=b-1:Yt%b==0}}else{if(!this.blockComment)return!1;var Te=this.blockComment.start,he=this.blockComment.end,Y=new RegExp("^(\\s*)(?:"+n.escapeRegExp(Te)+")"),gt=new RegExp("(?:"+n.escapeRegExp(he)+")\\s*$"),V=function(Je,mt){S(Je,mt)||(!E||/\S/.test(Je))&&(m.insertInLine({row:mt,column:Je.length},he),m.insertInLine({row:mt,column:x},Te))},O=function(Je,mt){var yt;(yt=Je.match(gt))&&m.removeInLine(mt,Je.length-yt[0].length,Je.length),(yt=Je.match(Y))&&m.removeInLine(mt,yt[1].length,yt[0].length)},S=function(Je,mt){if(Y.test(Je))return!0;for(var yt=t.getTokens(mt),Qt=0;Qt<yt.length;Qt++)if(yt[Qt].type==="comment")return!0}}function ke(Je){for(var mt=c;mt<=g;mt++)Je(m.getLine(mt),mt)}var Qe=1/0;ke(function(Je,mt){var yt=Je.search(/\S/);yt!==-1?(yt<x&&(x=yt),T&&!S(Je,mt)&&(T=!1)):Qe>Je.length&&(Qe=Je.length)}),x==1/0&&(x=Qe,E=!1,T=!1),de&&x%b!=0&&(x=Math.floor(x/b)*b),ke(T?O:V)},this.toggleBlockComment=function(e,t,c,g){var m=this.blockComment;if(m){!m.start&&m[0]&&(m=m[0]);var E=new o(t,g.row,g.column),T=E.getCurrentToken();t.selection;var x=t.selection.toOrientedRange(),b,de;if(T&&/comment/.test(T.type)){for(var Te,he;T&&/comment/.test(T.type);){var Y=T.value.indexOf(m.start);if(Y!=-1){var gt=E.getCurrentTokenRow(),V=E.getCurrentTokenColumn()+Y;Te=new r(gt,V,gt,V+m.start.length);break}T=E.stepBackward()}for(var E=new o(t,g.row,g.column),T=E.getCurrentToken();T&&/comment/.test(T.type);){var Y=T.value.indexOf(m.end);if(Y!=-1){var gt=E.getCurrentTokenRow(),V=E.getCurrentTokenColumn()+Y;he=new r(gt,V,gt,V+m.end.length);break}T=E.stepForward()}he&&t.remove(he),Te&&(t.remove(Te),b=Te.start.row,de=-m.start.length)}else de=m.start.length,b=c.start.row,t.insert(c.end,m.end),t.insert(c.start,m.start);x.start.row==b&&(x.start.column+=de),x.end.row==b&&(x.end.column+=de),t.selection.fromOrientedRange(x)}},this.getNextLineIndent=function(e,t,c){return this.$getIndent(t)},this.checkOutdent=function(e,t,c){return!1},this.autoOutdent=function(e,t,c){},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 t in e)if(e[t]){var c=e[t],g=c.prototype.$id,m=M.$modes[g];m||(M.$modes[g]=m=new c),M.$modes[t]||(M.$modes[t]=m),this.$embeds.push(t),this.$modes[t]=m}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],T=function(b){(function(de){var Te=E[b],he=de[Te];de[E[b]]=function(){return this.$delegator(Te,arguments,he)}})(x)},x=this,t=0;t<E.length;t++)T(t)},this.$delegator=function(e,t,c){var g=t[0]||"start";if(typeof g!="string"){if(Array.isArray(g[2])){var m=g[2][g[2].length-1],E=this.$modes[m];if(E)return E[e].apply(E,[g[1]].concat([].slice.call(t,1)))}g=g[0]||"start"}for(var T=0;T<this.$embeds.length;T++)if(this.$modes[this.$embeds[T]]){var x=g.split(this.$embeds[T]);if(!x[0]&&x[1]){t[0]=x[1];var E=this.$modes[this.$embeds[T]];return E[e].apply(E,t)}}var b=c.apply(this,t);return c?b:void 0},this.transformAction=function(e,t,c,g,m){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var T in E)if(E[T][t]){var x=E[T][t].apply(this,arguments);if(x)return x}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,c=[];for(var g in t)for(var m=t[g],E=0,T=m.length;E<T;E++)if(typeof m[E].token=="string")/keyword|support|storage/.test(m[E].token)&&c.push(m[E].regex);else if(typeof m[E].token=="object"){for(var x=0,b=m[E].token.length;x<b;x++)if(/keyword|support|storage/.test(m[E].token[x])){var g=m[E].regex.match(/\(.+?\)/g)[x];c.push(g.substr(1,g.length-2))}}this.completionKeywords=c}return e?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,c,g){var m=this.$keywordList||this.$createKeywordList();return m.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(i.prototype),v.Mode=i}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(p,v,fe){var M=p("./lib/dom"),w=function(){function A(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return A.prototype.getRowLength=function(a){var u;return this.lineWidgets?u=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:u=0,!this.$useWrapMode||!this.$wrapData[a]?1+u:this.$wrapData[a].length+1+u},A.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(u){u&&u.rowCount&&!u.hidden&&(a+=u.rowCount)}),a},A.prototype.$onChangeEditor=function(a){this.attach(a.editor)},A.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},A.prototype.detach=function(a){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 n=this.session.lineWidgets;n&&n.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},A.prototype.updateOnFold=function(a,u){var n=u.lineWidgets;if(!(!n||!a.action)){for(var o=a.data,r=o.start.row,i=o.end.row,e=a.action=="add",t=r+1;t<i;t++)n[t]&&(n[t].hidden=e);n[i]&&(e?n[r]?n[i].hidden=e:n[r]=n[i]:(n[r]==n[i]&&(n[r]=void 0),n[i].hidden=e))}},A.prototype.updateOnChange=function(a){var u=this.session.lineWidgets;if(u){var n=a.start.row,o=a.end.row-n;if(o!==0)if(a.action=="remove"){var r=u.splice(n+1,o);!u[n]&&r[r.length-1]&&(u[n]=r.pop()),r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var i=new Array(o);u[n]&&u[n].column!=null&&a.start.column>u[n].column&&n++,i.unshift(n,0),u.splice.apply(u,i),this.$updateRows()}}},A.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(n,o){if(n)for(u=!1,n.row=o;n.$oldWidget;)n.$oldWidget.row=o,n=n.$oldWidget}),u&&(this.session.lineWidgets=null)}},A.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},A.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=M.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=M.createElement("div"),a.el.textContent=a.text),a.el&&(M.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&M.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var n=this.session.getFoldAt(a.row,0);if(a.$fold=n,n){var o=this.session.lineWidgets;a.row==n.end.row&&!o[n.start.row]?o[n.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},A.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},A.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,n=u&&u[a],o=[];n;)o.push(n),n=n.$oldWidget;return o},A.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},A.prototype.measureWidgets=function(a,u){var n=this.session._changedWidgets,o=u.layerConfig;if(!(!n||!n.length)){for(var r=1/0,i=0;i<n.length;i++){var e=n[i];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/o.characterWidth));var t=e.h/o.lineHeight;e.coverLine&&(t-=this.session.getRowLineCount(e.row),t<0&&(t=0)),e.rowCount!=t&&(e.rowCount=t,e.row<r&&(r=e.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},A.prototype.renderWidgets=function(a,u){var n=u.layerConfig,o=this.session.lineWidgets;if(o){for(var r=Math.min(this.firstRow,n.firstRow),i=Math.max(this.lastRow,n.lastRow,o.length);r>0&&!o[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,u.$cursorLayer.config=n;for(var e=r;e<=i;e++){var t=o[e];if(!(!t||!t.el)){if(t.hidden){t.el.style.top=-100-(t.pixelHeight||0)+"px";continue}t._inDocument||(t._inDocument=!0,u.container.appendChild(t.el));var c=u.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;t.coverLine||(c+=n.lineHeight*this.session.getRowLineCount(t.row)),t.el.style.top=c-n.offset+"px";var g=t.coverGutter?0:u.gutterWidth;t.fixedWidth||(g-=u.scrollLeft),t.el.style.left=g+"px",t.fullWidth&&t.screenWidth&&(t.el.style.minWidth=n.width+2*n.padding+"px"),t.fixedWidth?t.el.style.right=u.scrollBar.getWidth()+"px":t.el.style.right=""}}}},A}();v.LineWidgets=w}),ace.define("ace/apply_delta",["require","exports","module"],function(p,v,fe){v.applyDelta=function(M,w,A){var a=w.start.row,u=w.start.column,n=M[a]||"";switch(w.action){case"insert":var o=w.lines;if(o.length===1)M[a]=n.substring(0,u)+w.lines[0]+n.substring(u);else{var r=[a,1].concat(w.lines);M.splice.apply(M,r),M[a]=n.substring(0,u)+M[a],M[a+w.lines.length-1]+=n.substring(u)}break;case"remove":var i=w.end.column,e=w.end.row;a===e?M[a]=n.substring(0,u)+n.substring(i):M.splice(a,e-a+1,n.substring(0,u)+M[e].substring(i));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(p,v,fe){var M=p("./lib/oop"),w=p("./lib/event_emitter").EventEmitter,A=function(){function n(o,r,i){this.$onChange=this.onChange.bind(this),this.attach(o),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,i)}return n.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},n.prototype.getDocument=function(){return this.document},n.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var r=u(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},n.prototype.setPosition=function(o,r,i){var e;if(i?e={row:o,column:r}:e=this.$clipPositionToDocument(o,r),!(this.row==e.row&&this.column==e.column)){var t={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:t,value:e})}},n.prototype.detach=function(){this.document.off("change",this.$onChange)},n.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},n.prototype.$clipPositionToDocument=function(o,r){var i={};return o>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):o<0?(i.row=0,i.column=0):(i.row=o,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,r))),r<0&&(i.column=0),i},n}();A.prototype.$insertRight=!1,M.implement(A.prototype,w);function a(n,o,r){var i=r?n.column<=o.column:n.column<o.column;return n.row<o.row||n.row==o.row&&i}function u(n,o,r){var i=n.action=="insert",e=(i?1:-1)*(n.end.row-n.start.row),t=(i?1:-1)*(n.end.column-n.start.column),c=n.start,g=i?c:n.end;return a(o,c,r)?{row:o.row,column:o.column}:a(g,o,!r)?{row:o.row+e,column:o.column+(o.row==g.row?t:0)}:{row:c.row,column:c.column}}v.Anchor=A}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(p,v,fe){var M=p("./lib/oop"),w=p("./apply_delta").applyDelta,A=p("./lib/event_emitter").EventEmitter,a=p("./range").Range,u=p("./anchor").Anchor,n=function(){function o(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 o.prototype.setValue=function(r){var i=this.getLength()-1;this.remove(new a(0,0,i,this.getLine(i).length)),this.insert({row:0,column:0},r||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(r,i){return new u(this,r,i)},o.prototype.$detectNewLine=function(r){var i=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=i?i[1]:`
189
+ `,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
190
+ `;case"unix":return`
191
+ `;default:return this.$autoNewLine||`
192
+ `}},o.prototype.setNewLineMode=function(r){this.$newLineMode!==r&&(this.$newLineMode=r,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(r){return r==`\r
193
+ `||r=="\r"||r==`
194
+ `},o.prototype.getLine=function(r){return this.$lines[r]||""},o.prototype.getLines=function(r,i){return this.$lines.slice(r,i+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(r){return this.getLinesForRange(r).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(r){var i;if(r.start.row===r.end.row)i=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{i=this.getLines(r.start.row,r.end.row),i[0]=(i[0]||"").substring(r.start.column);var e=i.length-1;r.end.row-r.start.row==e&&(i[e]=i[e].substring(0,r.end.column))}return i},o.prototype.insertLines=function(r,i){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,i)},o.prototype.removeLines=function(r,i){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,i)},o.prototype.insertNewLine=function(r){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(r,["",""])},o.prototype.insert=function(r,i){return this.getLength()<=1&&this.$detectNewLine(i),this.insertMergedLines(r,this.$split(i))},o.prototype.insertInLine=function(r,i){var e=this.clippedPos(r.row,r.column),t=this.pos(r.row,r.column+i.length);return this.applyDelta({start:e,end:t,action:"insert",lines:[i]},!0),this.clonePos(t)},o.prototype.clippedPos=function(r,i){var e=this.getLength();r===void 0?r=e:r<0?r=0:r>=e&&(r=e-1,i=void 0);var t=this.getLine(r);return i==null&&(i=t.length),i=Math.min(Math.max(i,0),t.length),{row:r,column:i}},o.prototype.clonePos=function(r){return{row:r.row,column:r.column}},o.prototype.pos=function(r,i){return{row:r,column:i}},o.prototype.$clipPosition=function(r){var i=this.getLength();return r.row>=i?(r.row=Math.max(0,i-1),r.column=this.getLine(i-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},o.prototype.insertFullLines=function(r,i){r=Math.min(Math.max(r,0),this.getLength());var e=0;r<this.getLength()?(i=i.concat([""]),e=0):(i=[""].concat(i),r--,e=this.$lines[r].length),this.insertMergedLines({row:r,column:e},i)},o.prototype.insertMergedLines=function(r,i){var e=this.clippedPos(r.row,r.column),t={row:e.row+i.length-1,column:(i.length==1?e.column:0)+i[i.length-1].length};return this.applyDelta({start:e,end:t,action:"insert",lines:i}),this.clonePos(t)},o.prototype.remove=function(r){var i=this.clippedPos(r.start.row,r.start.column),e=this.clippedPos(r.end.row,r.end.column);return this.applyDelta({start:i,end:e,action:"remove",lines:this.getLinesForRange({start:i,end:e})}),this.clonePos(i)},o.prototype.removeInLine=function(r,i,e){var t=this.clippedPos(r,i),c=this.clippedPos(r,e);return this.applyDelta({start:t,end:c,action:"remove",lines:this.getLinesForRange({start:t,end:c})},!0),this.clonePos(t)},o.prototype.removeFullLines=function(r,i){r=Math.min(Math.max(0,r),this.getLength()-1),i=Math.min(Math.max(0,i),this.getLength()-1);var e=i==this.getLength()-1&&r>0,t=i<this.getLength()-1,c=e?r-1:r,g=e?this.getLine(c).length:0,m=t?i+1:i,E=t?0:this.getLine(m).length,T=new a(c,g,m,E),x=this.$lines.slice(r,i+1);return this.applyDelta({start:T.start,end:T.end,action:"remove",lines:this.getLinesForRange(T)}),x},o.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:["",""]})},o.prototype.replace=function(r,i){if(r instanceof a||(r=a.fromPoints(r.start,r.end)),i.length===0&&r.isEmpty())return r.start;if(i==this.getTextRange(r))return r.end;this.remove(r);var e;return i?e=this.insert(r.start,i):e=r.start,e},o.prototype.applyDeltas=function(r){for(var i=0;i<r.length;i++)this.applyDelta(r[i])},o.prototype.revertDeltas=function(r){for(var i=r.length-1;i>=0;i--)this.revertDelta(r[i])},o.prototype.applyDelta=function(r,i){var e=r.action=="insert";(e?r.lines.length<=1&&!r.lines[0]:!a.comparePoints(r.start,r.end))||(e&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(w(this.$lines,r,i),this._signal("change",r)))},o.prototype.$safeApplyDelta=function(r){var i=this.$lines.length;(r.action=="remove"&&r.start.row<i&&r.end.row<i||r.action=="insert"&&r.start.row<=i)&&this.applyDelta(r)},o.prototype.$splitAndapplyLargeDelta=function(r,i){for(var e=r.lines,t=e.length-i+1,c=r.start.row,g=r.start.column,m=0,E=0;m<t;m=E){E+=i-1;var T=e.slice(m,E);T.push(""),this.applyDelta({start:this.pos(c+m,g),end:this.pos(c+E,g=0),action:r.action,lines:T},!0)}r.lines=e.slice(m),r.start.row=c+m,r.start.column=g,this.applyDelta(r,!0)},o.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()})},o.prototype.indexToPosition=function(r,i){for(var e=this.$lines||this.getAllLines(),t=this.getNewLineCharacter().length,c=i||0,g=e.length;c<g;c++)if(r-=e[c].length+t,r<0)return{row:c,column:r+e[c].length+t};return{row:g-1,column:r+e[g-1].length+t}},o.prototype.positionToIndex=function(r,i){for(var e=this.$lines||this.getAllLines(),t=this.getNewLineCharacter().length,c=0,g=Math.min(r.row,e.length),m=i||0;m<g;++m)c+=e[m].length+t;return c+r.column},o.prototype.$split=function(r){return r.split(/\r\n|\r|\n/)},o}();n.prototype.$autoNewLine="",n.prototype.$newLineMode="auto",M.implement(n.prototype,A),v.Document=n}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(p,v,fe){var M=p("./lib/oop"),w=p("./lib/event_emitter").EventEmitter,A=function(){function a(u,n){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=u;var o=this;this.$worker=function(){if(o.running){for(var r=new Date,i=o.currentLine,e=-1,t=o.doc,c=i;o.lines[i];)i++;var g=t.getLength(),m=0;for(o.running=!1;i<g;){o.$tokenizeRow(i),e=i;do i++;while(o.lines[i]);if(m++,m%5===0&&new Date-r>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=i,e==-1&&(e=i),c<=e&&o.fireUpdateEvent(c,e)}}}return a.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(u,n){var o={first:u,last:n};this._signal("update",{data:o})},a.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)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(u){var n=u.start.row,o=u.end.row-n;if(o===0)this.lines[n]=null;else if(u.action=="remove")this.lines.splice(n,o+1,null),this.states.splice(n,o+1,null);else{var r=Array(o+1);r.unshift(n,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},a.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},a.prototype.$tokenizeRow=function(u){var n=this.doc.getLine(u),o=this.states[u-1],r=this.tokenizer.getLineTokens(n,o,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},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();M.implement(A.prototype,w),v.BackgroundTokenizer=A}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(p,v,fe){var M=p("./lib/lang"),w=p("./range").Range,A=function(){function a(u,n,o){o===void 0&&(o="text"),this.setRegexp(u),this.clazz=n,this.type=o,this.docLen=0}return a.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},a.prototype.update=function(u,n,o,r){if(this.regExp){for(var i=r.firstRow,e=r.lastRow,t={},c=o.$editor&&o.$editor.$search,g=c&&c.$isMultilineSearch(o.$editor.getLastSearchOptions()),m=i;m<=e;m++){var E=this.cache[m];if(E==null||o.getValue().length!=this.docLen){if(g){E=[];var T=c.$multiLineForward(o,this.regExp,m,e);if(T){var x=T.endRow<=e?T.endRow-1:e;x>m&&(m=x),E.push(new w(T.startRow,T.startCol,T.endRow,T.endCol))}E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES))}else E=M.getMatchOffsets(o.getLine(m),this.regExp),E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES)),E=E.map(function(he){return new w(m,he.offset,m,he.offset+he.length)});this.cache[m]=E.length?E:""}if(E.length!==0)for(var b=E.length;b--;){var de=E[b].toScreenRange(o),Te=de.toString();t[Te]||(t[Te]=!0,n.drawSingleLineMarker(u,de,this.clazz,r))}}this.docLen=o.getValue().length}},a}();A.prototype.MAX_RANGES=500,v.SearchHighlight=A}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(p,v,fe){var M=function(){function x(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return x.prototype.addSession=function(b){this.$session=b},x.prototype.add=function(b,de,Te){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),de===!1||!this.lastDeltas){this.lastDeltas=[];var he=this.$undoStack.length;he>this.$undoDepth-1&&this.$undoStack.splice(0,he-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),b.id=this.$rev=++this.$maxRev}(b.action=="remove"||b.action=="insert")&&(this.$lastDelta=b),this.lastDeltas.push(b)}},x.prototype.addSelection=function(b,de){this.selections.push({value:b,rev:de||this.$rev})},x.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},x.prototype.markIgnored=function(b,de){de==null&&(de=this.$rev+1);for(var Te=this.$undoStack,he=Te.length;he--;){var Y=Te[he][0];if(Y.id<=b)break;Y.id<de&&(Y.ignore=!0)}this.lastDeltas=null},x.prototype.getSelection=function(b,de){for(var Te=this.selections,he=Te.length;he--;){var Y=Te[he];if(Y.rev<b)return de&&(Y=Te[he+1]),Y}},x.prototype.getRevision=function(){return this.$rev},x.prototype.getDeltas=function(b,de){de==null&&(de=this.$rev+1);for(var Te=this.$undoStack,he=null,Y=0,gt=Te.length;gt--;){var V=Te[gt][0];if(V.id<de&&!he&&(he=gt+1),V.id<=b){Y=gt+1;break}}return Te.slice(Y,he)},x.prototype.getChangedRanges=function(b,de){de==null&&(de=this.$rev+1)},x.prototype.getChangedLines=function(b,de){de==null&&(de=this.$rev+1)},x.prototype.undo=function(b,de){this.lastDeltas=null;var Te=this.$undoStack;if(w(Te,Te.length)){b||(b=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var he=Te.pop(),Y=null;return he&&(Y=b.undoChanges(he,de),this.$redoStack.push(he),this.$syncRev()),this.$fromUndo=!1,Y}},x.prototype.redo=function(b,de){if(this.lastDeltas=null,b||(b=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var Te=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);T(this.$redoStack,Te),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(gt){gt[0].id=++this.$maxRev},this)}var he=this.$redoStack.pop(),Y=null;return he&&(Y=b.redoChanges(he,de),this.$undoStack.push(he),this.$syncRev()),this.$fromUndo=!1,Y},x.prototype.$syncRev=function(){var b=this.$undoStack,de=b[b.length-1],Te=de&&de[0].id||0;this.$redoStackBaseRev=Te,this.$rev=Te},x.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=[]},x.prototype.canUndo=function(){return this.$undoStack.length>0},x.prototype.canRedo=function(){return this.$redoStack.length>0},x.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},x.prototype.isAtBookmark=function(){return this.$rev===this.mark},x.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},x.prototype.fromJSON=function(b){this.reset(),this.$undoStack=b.$undoStack,this.$redoStack=b.$redoStack},x.prototype.$prettyPrint=function(b){return b?o(b):o(this.$undoStack)+`
195
+ ---
196
+ `+o(this.$redoStack)},x}();M.prototype.hasUndo=M.prototype.canUndo,M.prototype.hasRedo=M.prototype.canRedo,M.prototype.isClean=M.prototype.isAtBookmark,M.prototype.markClean=M.prototype.bookmark;function w(x,b){for(var de=b;de--;){var Te=x[de];if(Te&&!Te[0].ignore){for(;de<b-1;){var he=e(x[de],x[de+1]);x[de]=he[0],x[de+1]=he[1],de++}return!0}}}var A=p("./range").Range,a=A.comparePoints;A.comparePoints;function u(x){return{row:x.row,column:x.column}}function n(x){return{start:u(x.start),end:u(x.end),action:x.action,lines:x.lines.slice()}}function o(x){if(x=x||this,Array.isArray(x))return x.map(o).join(`
197
+ `);var b="";return x.action?(b=x.action=="insert"?"+":"-",b+="["+x.lines+"]"):x.value&&(Array.isArray(x.value)?b=x.value.map(r).join(`
198
+ `):b=r(x.value)),x.start&&(b+=r(x)),(x.id||x.rev)&&(b+=" ("+(x.id||x.rev)+")"),b}function r(x){return x.start.row+":"+x.start.column+"=>"+x.end.row+":"+x.end.column}function i(x,b){var de=x.action=="insert",Te=b.action=="insert";if(de&&Te)if(a(b.start,x.end)>=0)c(b,x,-1);else if(a(b.start,x.start)<=0)c(x,b,1);else return null;else if(de&&!Te)if(a(b.start,x.end)>=0)c(b,x,-1);else if(a(b.end,x.start)<=0)c(x,b,-1);else return null;else if(!de&&Te)if(a(b.start,x.start)>=0)c(b,x,1);else if(a(b.start,x.start)<=0)c(x,b,1);else return null;else if(!de&&!Te)if(a(b.start,x.start)>=0)c(b,x,1);else if(a(b.end,x.start)<=0)c(x,b,-1);else return null;return[b,x]}function e(x,b){for(var de=x.length;de--;)for(var Te=0;Te<b.length;Te++)if(!i(x[de],b[Te])){for(;de<x.length;){for(;Te--;)i(b[Te],x[de]);Te=b.length,de++}return[x,b]}return x.selectionBefore=b.selectionBefore=x.selectionAfter=b.selectionAfter=null,[b,x]}function t(x,b){var de=x.action=="insert",Te=b.action=="insert";if(de&&Te)a(x.start,b.start)<0?c(b,x,1):c(x,b,1);else if(de&&!Te)a(x.start,b.end)>=0?c(x,b,-1):(a(x.start,b.start)<=0||c(x,A.fromPoints(b.start,x.start),-1),c(b,x,1));else if(!de&&Te)a(b.start,x.end)>=0?c(b,x,-1):(a(b.start,x.start)<=0||c(b,A.fromPoints(x.start,b.start),-1),c(x,b,1));else if(!de&&!Te)if(a(b.start,x.end)>=0)c(b,x,-1);else if(a(b.end,x.start)<=0)c(x,b,-1);else{var he,Y;return a(x.start,b.start)<0&&(he=x,x=m(x,b.start)),a(x.end,b.end)>0&&(Y=m(x,b.end)),g(b.end,x.start,x.end,-1),Y&&!he&&(x.lines=Y.lines,x.start=Y.start,x.end=Y.end,Y=x),[b,he,Y].filter(Boolean)}return[b,x]}function c(x,b,de){g(x.start,b.start,b.end,de),g(x.end,b.start,b.end,de)}function g(x,b,de,Te){x.row==(Te==1?b:de).row&&(x.column+=Te*(de.column-b.column)),x.row+=Te*(de.row-b.row)}function m(x,b){var de=x.lines,Te=x.end;x.end=u(b);var he=x.end.row-x.start.row,Y=de.splice(he,de.length),gt=he?b.column:b.column-x.start.column;de.push(Y[0].substring(0,gt)),Y[0]=Y[0].substr(gt);var V={start:u(b),end:Te,lines:Y,action:x.action};return V}function E(x,b){b=n(b);for(var de=x.length;de--;){for(var Te=x[de],he=0;he<Te.length;he++){var Y=Te[he],gt=t(Y,b);b=gt[0],gt.length!=2&&(gt[2]?(Te.splice(he+1,1,gt[1],gt[2]),he++):gt[1]||(Te.splice(he,1),he--))}Te.length||x.splice(de,1)}return x}function T(x,b){for(var de=0;de<b.length;de++)for(var Te=b[de],he=0;he<Te.length;he++)E(x,Te[he])}v.UndoManager=M}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(p,v,fe){var M=p("../range").Range,w=function(){function A(a,u){this.foldData=a,Array.isArray(u)?this.folds=u:u=this.folds=[u];var n=u[u.length-1];this.range=new M(u[0].start.row,u[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return A.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(u){u.start.row+=a,u.end.row+=a})},A.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(u,n){return-u.range.compareEnd(n.start.row,n.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},A.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},A.prototype.walk=function(a,u,n){var o=0,r=this.folds,i,e,t,c=!0;u==null&&(u=this.end.row,n=this.end.column);for(var g=0;g<r.length;g++){if(i=r[g],e=i.range.compareStart(u,n),e==-1){a(null,u,n,o,c);return}if(t=a(null,i.start.row,i.start.column,o,c),t=!t&&a(i.placeholder,i.start.row,i.start.column,o),t||e===0)return;c=!i.sameRow,o=i.end.column}a(null,u,n,o,c)},A.prototype.getNextFoldTo=function(a,u){for(var n,o,r=0;r<this.folds.length;r++){if(n=this.folds[r],o=n.range.compareEnd(a,u),o==-1)return{fold:n,kind:"after"};if(o===0)return{fold:n,kind:"inside"}}return null},A.prototype.addRemoveChars=function(a,u,n){var o=this.getNextFoldTo(a,u),r,i;if(o){if(r=o.fold,o.kind=="inside"&&r.start.column!=u&&r.start.row!=a)window.console&&window.console.log(a,u,r);else if(r.start.row==a){i=this.folds;var e=i.indexOf(r);for(e===0&&(this.start.column+=n),e;e<i.length;e++){if(r=i[e],r.start.column+=n,!r.sameRow)return;r.end.column+=n}this.end.column+=n}}},A.prototype.split=function(a,u){var n=this.getNextFoldTo(a,u);if(!n||n.kind=="inside")return null;var o=n.fold,r=this.folds,i=this.foldData,e=r.indexOf(o),t=r[e-1];this.end.row=t.end.row,this.end.column=t.end.column,r=r.splice(e,r.length-e);var c=new A(i,r);return i.splice(i.indexOf(this)+1,0,c),c},A.prototype.merge=function(a){for(var u=a.folds,n=0;n<u.length;n++)this.addFold(u[n]);var o=this.foldData;o.splice(o.indexOf(a),1)},A.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(u){a.push(" "+u.toString())}),a.push("]"),a.join(`
199
+ `)},A.prototype.idxToPosition=function(a){for(var u=0,n=0;n<this.folds.length;n++){var o=this.folds[n];if(a-=o.start.column-u,a<0)return{row:o.start.row,column:o.start.column+a};if(a-=o.placeholder.length,a<0)return o.start;u=o.end.column}return{row:this.end.row,column:this.end.column+a}},A}();v.FoldLine=w}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(p,v,fe){var M=p("./range").Range,w=M.comparePoints,A=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(u,n,o){for(var r=this.ranges,i=o||0;i<r.length;i++){var e=r[i],t=w(u,e.end);if(!(t>0)){var c=w(u,e.start);return t===0?n&&c!==0?-i-2:i:c>0||c===0&&!n?i:-i-1}}return-i-1},a.prototype.add=function(u){var n=!u.isEmpty(),o=this.pointIndex(u.start,n);o<0&&(o=-o-1);var r=this.pointIndex(u.end,n,o);return r<0?r=-r-1:r++,this.ranges.splice(o,r-o,u)},a.prototype.addList=function(u){for(var n=[],o=u.length;o--;)n.push.apply(n,this.add(u[o]));return n},a.prototype.substractPoint=function(u){var n=this.pointIndex(u);if(n>=0)return this.ranges.splice(n,1)},a.prototype.merge=function(){var u=[],n=this.ranges;n=n.sort(function(t,c){return w(t.start,c.start)});for(var o=n[0],r,i=1;i<n.length;i++){r=o,o=n[i];var e=w(r.end,o.start);e<0||e==0&&!r.isEmpty()&&!o.isEmpty()||(w(r.end,o.end)<0&&(r.end.row=o.end.row,r.end.column=o.end.column),n.splice(i,1),u.push(o),o=r,i--)}return this.ranges=n,u},a.prototype.contains=function(u,n){return this.pointIndex({row:u,column:n})>=0},a.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},a.prototype.rangeAtPoint=function(u){var n=this.pointIndex(u);if(n>=0)return this.ranges[n]},a.prototype.clipRows=function(u,n){var o=this.ranges;if(o[0].start.row>n||o[o.length-1].start.row<u)return[];var r=this.pointIndex({row:u,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:n,column:0},r);i<0&&(i=-i-1);for(var e=[],t=r;t<i;t++)e.push(o[t]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(u){this.session&&this.detach(),this.session=u,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(u){for(var n=u.start,o=u.end,r=n.row,i=o.row,e=this.ranges,t=0,c=e.length;t<c;t++){var g=e[t];if(g.end.row>=r)break}if(u.action=="insert")for(var m=i-r,E=-n.column+o.column;t<c;t++){var g=e[t];if(g.start.row>r)break;if(g.start.row==r&&g.start.column>=n.column&&(g.start.column==n.column&&this.$bias<=0||(g.start.column+=E,g.start.row+=m)),g.end.row==r&&g.end.column>=n.column){if(g.end.column==n.column&&this.$bias<0)continue;g.end.column==n.column&&E>0&&t<c-1&&g.end.column>g.start.column&&g.end.column==e[t+1].start.column&&(g.end.column-=E),g.end.column+=E,g.end.row+=m}}else for(var m=r-i,E=n.column-o.column;t<c;t++){var g=e[t];if(g.start.row>i)break;g.end.row<i&&(r<g.end.row||r==g.end.row&&n.column<g.end.column)?(g.end.row=r,g.end.column=n.column):g.end.row==i?g.end.column<=o.column?(m||g.end.column>n.column)&&(g.end.column=n.column,g.end.row=n.row):(g.end.column+=E,g.end.row+=m):g.end.row>i&&(g.end.row+=m),g.start.row<i&&(r<g.start.row||r==g.start.row&&n.column<g.start.column)?(g.start.row=r,g.start.column=n.column):g.start.row==i?g.start.column<=o.column?(m||g.start.column>n.column)&&(g.start.column=n.column,g.start.row=n.row):(g.start.column+=E,g.start.row+=m):g.start.row>i&&(g.start.row+=m)}if(m!=0&&t<c)for(;t<c;t++){var g=e[t];g.start.row+=m,g.end.row+=m}},a}();A.prototype.comparePoints=w,v.RangeList=A}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(p,v,fe){var M=this&&this.__extends||function(){var r=function(i,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,c){t.__proto__=c}||function(t,c){for(var g in c)Object.prototype.hasOwnProperty.call(c,g)&&(t[g]=c[g])},r(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),w=p("../range_list").RangeList,A=function(r){M(i,r);function i(e,t){var c=r.call(this)||this;return c.foldLine=null,c.placeholder=t,c.range=e,c.start=e.start,c.end=e.end,c.sameRow=e.start.row==e.end.row,c.subFolds=c.ranges=[],c}return i.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},i.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},i.prototype.clone=function(){var e=this.range.clone(),t=new i(e,this.placeholder);return this.subFolds.forEach(function(c){t.subFolds.push(c.clone())}),t.collapseChildren=this.collapseChildren,t},i.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){u(e,this.start);for(var E=e.start.row,T=e.start.column,t=0,c=-1;t<this.subFolds.length&&(c=this.subFolds[t].range.compare(E,T),c==1);t++);var g=this.subFolds[t],m=0;if(c==0){if(g.range.containsRange(e))return g.addSubFold(e);m=1}for(var E=e.range.end.row,T=e.range.end.column,x=t,c=-1;x<this.subFolds.length&&(c=this.subFolds[x].range.compare(E,T),c==1);x++);c==0&&x++;for(var b=this.subFolds.splice(t,x-t,e),de=c==0?b.length-1:b.length,Te=m;Te<de;Te++)e.addSubFold(b[Te]);return e.setFoldLine(this.foldLine),e}},i.prototype.restoreRange=function(e){return o(e,this.start)},i}(w);function a(r,i){r.row-=i.row,r.row==0&&(r.column-=i.column)}function u(r,i){a(r.start,i),a(r.end,i)}function n(r,i){r.row==0&&(r.column+=i.column),r.row+=i.row}function o(r,i){n(r.start,i),n(r.end,i)}v.Fold=A}),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,v,fe){var M=p("../range").Range,w=p("./fold_line").FoldLine,A=p("./fold").Fold,a=p("../token_iterator").TokenIterator,u=p("../mouse/mouse_event").MouseEvent;function n(){this.getFoldAt=function(o,r,i){var e=this.getFoldLine(o);if(!e)return null;for(var t=e.folds,c=0;c<t.length;c++){var g=t[c].range;if(g.contains(o,r)){if(i==1&&g.isEnd(o,r)&&!g.isEmpty())continue;if(i==-1&&g.isStart(o,r)&&!g.isEmpty())continue;return t[c]}}},this.getFoldsInRange=function(o){var r=o.start,i=o.end,e=this.$foldData,t=[];r.column+=1,i.column-=1;for(var c=0;c<e.length;c++){var g=e[c].range.compareRange(o);if(g!=2){if(g==-2)break;for(var m=e[c].folds,E=0;E<m.length;E++){var T=m[E];if(g=T.range.compareRange(o),g==-2)break;if(g==2)continue;if(g==42)break;t.push(T)}}}return r.column-=1,i.column+=1,t},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var r=[];o.forEach(function(i){r=r.concat(this.getFoldsInRange(i))},this)}else var r=this.getFoldsInRange(o);return r},this.getAllFolds=function(){for(var o=[],r=this.$foldData,i=0;i<r.length;i++)for(var e=0;e<r[i].folds.length;e++)o.push(r[i].folds[e]);return o},this.getFoldStringAt=function(o,r,i,e){if(e=e||this.getFoldLine(o),!e)return null;for(var t={end:{column:0}},c,g,m=0;m<e.folds.length;m++){g=e.folds[m];var E=g.range.compareEnd(o,r);if(E==-1){c=this.getLine(g.start.row).substring(t.end.column,g.start.column);break}else if(E===0)return null;t=g}return c||(c=this.getLine(g.start.row).substring(t.end.column)),i==-1?c.substring(0,r-t.end.column):i==1?c.substring(r-t.end.column):c},this.getFoldLine=function(o,r){var i=this.$foldData,e=0;for(r&&(e=i.indexOf(r)),e==-1&&(e=0),e;e<i.length;e++){var t=i[e];if(t.start.row<=o&&t.end.row>=o)return t;if(t.end.row>o)return null}return null},this.getNextFoldLine=function(o,r){var i=this.$foldData,e=0;for(r&&(e=i.indexOf(r)),e==-1&&(e=0),e;e<i.length;e++){var t=i[e];if(t.end.row>=o)return t}return null},this.getFoldedRowCount=function(o,r){for(var i=this.$foldData,e=r-o+1,t=0;t<i.length;t++){var c=i[t],g=c.end.row,m=c.start.row;if(g>=r){m<r&&(m>=o?e-=r-m:e=0);break}else g>=o&&(m>=o?e-=g-m:e-=g-o+1)}return e},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(r,i){return r.start.row-i.start.row}),o},this.addFold=function(o,r){var i=this.$foldData,e=!1,t;o instanceof A?t=o:(t=new A(r,o),t.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(t.range);var c=t.start.row,g=t.start.column,m=t.end.row,E=t.end.column,T=this.getFoldAt(c,g,1),x=this.getFoldAt(m,E,-1);if(T&&x==T)return T.addSubFold(t);T&&!T.range.isStart(c,g)&&this.removeFold(T),x&&!x.range.isEnd(m,E)&&this.removeFold(x);var b=this.getFoldsInRange(t.range);b.length>0&&(this.removeFolds(b),t.collapseChildren||b.forEach(function(Y){t.addSubFold(Y)}));for(var de=0;de<i.length;de++){var Te=i[de];if(m==Te.start.row){Te.addFold(t),e=!0;break}else if(c==Te.end.row){if(Te.addFold(t),e=!0,!t.sameRow){var he=i[de+1];if(he&&he.start.row==m){Te.merge(he);break}}break}else if(m<=Te.start.row)break}return e||(Te=this.$addFoldLine(new w(this.$foldData,t))),this.$useWrapMode?this.$updateWrapData(Te.start.row,Te.start.row):this.$updateRowLengthCache(Te.start.row,Te.start.row),this.$modified=!0,this._signal("changeFold",{data:t,action:"add"}),t},this.addFolds=function(o){o.forEach(function(r){this.addFold(r)},this)},this.removeFold=function(o){var r=o.foldLine,i=r.start.row,e=r.end.row,t=this.$foldData,c=r.folds;if(c.length==1)t.splice(t.indexOf(r),1);else if(r.range.isEnd(o.end.row,o.end.column))c.pop(),r.end.row=c[c.length-1].end.row,r.end.column=c[c.length-1].end.column;else if(r.range.isStart(o.start.row,o.start.column))c.shift(),r.start.row=c[0].start.row,r.start.column=c[0].start.column;else if(o.sameRow)c.splice(c.indexOf(o),1);else{var g=r.split(o.start.row,o.start.column);c=g.folds,c.shift(),g.start.row=c[0].start.row,g.start.column=c[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,e):this.$updateRowLengthCache(i,e)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var r=[],i=0;i<o.length;i++)r.push(o[i]);r.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(r){o.restoreRange(r),this.addFold(r)},this),o.collapseChildren>0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(r){this.expandFold(r)},this)},this.unfold=function(o,r){var i,e;if(o==null)i=new M(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof o=="number")i=new M(o,0,o,this.getLine(o).length);else if("row"in o)i=M.fromPoints(o,o);else{if(Array.isArray(o))return e=[],o.forEach(function(c){e=e.concat(this.unfold(c))},this),e;i=o}e=this.getFoldsInRangeList(i);for(var t=e;e.length==1&&M.comparePoints(e[0].start,i.start)<0&&M.comparePoints(e[0].end,i.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(i);if(r!=!1?this.removeFolds(e):this.expandFolds(e),t.length)return t},this.isRowFolded=function(o,r){return!!this.getFoldLine(o,r)},this.getRowFoldEnd=function(o,r){var i=this.getFoldLine(o,r);return i?i.end.row:o},this.getRowFoldStart=function(o,r){var i=this.getFoldLine(o,r);return i?i.start.row:o},this.getFoldDisplayLine=function(o,r,i,e,t){e==null&&(e=o.start.row),t==null&&(t=0),r==null&&(r=o.end.row),i==null&&(i=this.getLine(r).length);var c=this.doc,g="";return o.walk(function(m,E,T,x){if(!(E<e)){if(E==e){if(T<t)return;x=Math.max(t,x)}m!=null?g+=m:g+=c.getLine(E).substring(x,T)}},r,i),g},this.getDisplayLine=function(o,r,i,e){var t=this.getFoldLine(o);if(t)return this.getFoldDisplayLine(t,o,r,i,e);var c;return c=this.doc.getLine(o),c.substring(e||0,r||c.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(r){var i=r.folds.map(function(e){return e.clone()});return new w(o,i)}),o},this.toggleFold=function(o){var r=this.selection,i=r.getRange(),e,t;if(i.isEmpty()){var c=i.start;if(e=this.getFoldAt(c.row,c.column),e){this.expandFold(e);return}else if(o){var g=this.getFoldLine(c.row);g&&this.expandFolds(g.folds);return}else(t=this.findMatchingBracket(c))?i.comparePoint(t)==1?i.end=t:(i.start=t,i.start.column++,i.end.column--):(t=this.findMatchingBracket({row:c.row,column:c.column+1}))?(i.comparePoint(t)==1?i.end=t:i.start=t,i.start.column++):i=this.getCommentFoldRange(c.row,c.column)||i}else{var m=this.getFoldsInRange(i);if(o&&m.length){this.expandFolds(m);return}else m.length==1&&(e=m[0])}if(e||(e=this.getFoldAt(i.start.row,i.start.column)),e&&e.range.toString()==i.toString()){this.expandFold(e);return}var E="...";if(!i.isMultiLine()){if(E=this.getTextRange(i),E.length<4)return;E=E.trim().substring(0,2)+".."}this.addFold(E,i)},this.getCommentFoldRange=function(o,r,i){var e=new a(this,o,r),t=e.getCurrentToken(),c=t&&t.type;if(t&&/^comment|string/.test(c)){c=c.match(/comment|string/)[0],c=="comment"&&(c+="|doc-start|\\.doc");var g=new RegExp(c),m=new M;if(i!=1){do t=e.stepBackward();while(t&&g.test(t.type));t=e.stepForward()}m.start.row=e.getCurrentTokenRow(),m.start.column=e.getCurrentTokenColumn()+t.value.length,e=new a(this,o,r);var E=this.getState(e.$row);if(i!=-1){var T=-1;do if(t=e.stepForward(),T==-1){var x=this.getState(e.$row);E.toString()!==x.toString()&&(T=e.$row)}else if(e.$row>T)break;while(t&&g.test(t.type));t=e.stepBackward()}else t=e.getCurrentToken();return m.end.row=e.getCurrentTokenRow(),m.end.column=e.getCurrentTokenColumn(),m.start.row==m.end.row&&m.start.column>m.end.column?void 0:m}},this.foldAll=function(o,r,i,e){i==null&&(i=1e5);var t=this.foldWidgets;if(t){r=r||this.getLength(),o=o||0;for(var c=o;c<r;c++)if(t[c]==null&&(t[c]=this.getFoldWidget(c)),t[c]=="start"&&!(e&&!e(c))){var g=this.getFoldWidgetRange(c);g&&g.isMultiLine()&&g.end.row<=r&&g.start.row>=o&&(c=g.end.row,g.collapseChildren=i,this.addFold("...",g))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(r){for(var i=o.getTokens(r),e=0;e<i.length;e++){var t=i[e];if(!(t.type=="text"&&/^\s+$/.test(t.value)))return!!/comment/.test(t.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var r=this.$foldMode;this.$setFolding(null),this.$setFolding(r)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,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(o,r){var i=this.foldWidgets;if(!i||r&&i[o])return{};for(var e=o-1,t;e>=0;){var c=i[e];if(c==null&&(c=i[e]=this.getFoldWidget(e)),c=="start"){var g=this.getFoldWidgetRange(e);if(t||(t=g),g&&g.end.row>=o)break}e--}return{range:e!==-1&&g,firstRange:t}},this.onFoldWidgetClick=function(o,r){r instanceof u&&(r=r.domEvent);var i={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},e=this.$toggleFoldWidget(o,i);if(!e){var t=r.target||r.srcElement;t&&/ace_fold-widget/.test(t.className)&&(t.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,r){if(this.getFoldWidget){var i=this.getFoldWidget(o),e=this.getLine(o),t=i==="end"?-1:1,c=this.getFoldAt(o,t===-1?0:e.length,t);if(c)return r.children||r.all?this.removeFold(c):this.expandFold(c),c;var g=this.getFoldWidgetRange(o,!0);if(g&&!g.isMultiLine()&&(c=this.getFoldAt(g.start.row,g.start.column,1),c&&g.isEqual(c.range)))return this.removeFold(c),c;if(r.siblings){var m=this.getParentFoldRangeData(o);if(m.range)var E=m.range.start.row+1,T=m.range.end.row;this.foldAll(E,T,r.all?1e4:0)}else r.children?(T=g?g.end.row:this.getLength(),this.foldAll(o+1,T,r.all?1e4:0)):g&&(r.all&&(g.collapseChildren=1e4),this.addFold("...",g));return g}},this.toggleFoldWidget=function(o){var r=this.selection.getCursor().row;r=this.getRowFoldStart(r);var i=this.$toggleFoldWidget(r,{});if(!i){var e=this.getParentFoldRangeData(r,!0);if(i=e.range||e.firstRange,i){r=i.start.row;var t=this.getFoldAt(r,this.getLine(r).length,1);t?this.removeFold(t):this.addFold("...",i)}}},this.updateFoldWidgets=function(o){var r=o.start.row,i=o.end.row-r;if(i===0)this.foldWidgets[r]=null;else if(o.action=="remove")this.foldWidgets.splice(r,i+1,null);else{var e=Array(i+1);e.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(o){var r=o.data;r.first!=r.last&&this.foldWidgets.length>r.first&&this.foldWidgets.splice(r.first,this.foldWidgets.length)}}v.Folding=n}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(p,v,fe){var M=p("../token_iterator").TokenIterator,w=p("../range").Range;function A(){this.findMatchingBracket=function(a,u){if(a.column==0)return null;var n=u||this.getLine(a.row).charAt(a.column-1);if(n=="")return null;var o=n.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],a):this.$findOpeningBracket(o[2],a):null},this.getBracketRange=function(a){var u=this.getLine(a.row),n=!0,o,r=u.charAt(a.column-1),i=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(i||(r=u.charAt(a.column),a={row:a.row,column:a.column+1},i=r&&r.match(/([\(\[\{])|([\)\]\}])/),n=!1),!i)return null;if(i[1]){var e=this.$findClosingBracket(i[1],a);if(!e)return null;o=w.fromPoints(a,e),n||(o.end.column++,o.start.column--),o.cursor=o.end}else{var e=this.$findOpeningBracket(i[2],a);if(!e)return null;o=w.fromPoints(e,a),n||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(a,u){var n=this.getLine(a.row),o=/([\(\[\{])|([\)\]\}])/,r=!u&&n.charAt(a.column-1),i=r&&r.match(o);if(i||(r=(u===void 0||u)&&n.charAt(a.column),a={row:a.row,column:a.column+1},i=r&&r.match(o)),!i)return null;var e=new w(a.row,a.column-1,a.row,a.column),t=i[1]?this.$findClosingBracket(i[1],a):this.$findOpeningBracket(i[2],a);if(!t)return[e];var c=new w(t.row,t.column,t.row,t.column+1);return[e,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,u,n){var o=this.$brackets[a],r=1,i=new M(this,u.row,u.column),e=i.getCurrentToken();if(e||(e=i.stepForward()),!!e){n||(n=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var t=u.column-i.getCurrentTokenColumn()-2,c=e.value;;){for(;t>=0;){var g=c.charAt(t);if(g==o){if(r-=1,r==0)return{row:i.getCurrentTokenRow(),column:t+i.getCurrentTokenColumn()}}else g==a&&(r+=1);t-=1}do e=i.stepBackward();while(e&&!n.test(e.type));if(e==null)break;c=e.value,t=c.length-1}return null}},this.$findClosingBracket=function(a,u,n){var o=this.$brackets[a],r=1,i=new M(this,u.row,u.column),e=i.getCurrentToken();if(e||(e=i.stepForward()),!!e){n||(n=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var t=u.column-i.getCurrentTokenColumn();;){for(var c=e.value,g=c.length;t<g;){var m=c.charAt(t);if(m==o){if(r-=1,r==0)return{row:i.getCurrentTokenRow(),column:t+i.getCurrentTokenColumn()}}else m==a&&(r+=1);t+=1}do e=i.stepForward();while(e&&!n.test(e.type));if(e==null)break;t=0}return null}},this.getMatchingTags=function(a){var u=new M(this,a.row,a.column),n=this.$findTagName(u);if(n){var o=u.stepBackward();return o.value==="<"?this.$findClosingTag(u,n):this.$findOpeningTag(u,n)}},this.$findTagName=function(a){var u=a.getCurrentToken(),n=!1,o=!1;if(u&&u.type.indexOf("tag-name")===-1)do o?u=a.stepBackward():u=a.stepForward(),u&&(u.value==="/>"?o=!0:u.type.indexOf("tag-name")!==-1&&(n=!0));while(u&&!n);return u},this.$findClosingTag=function(a,u){var n,o=u.value,r=u.value,i=0,e=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);u=a.stepForward();var t=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length),c=!1;do{if(n=u,n.type.indexOf("tag-close")!==-1&&!c){var g=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=!0}if(u=a.stepForward(),u){if(u.value===">"&&!c){var g=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=!0}if(u.type.indexOf("tag-name")!==-1){if(o=u.value,r===o){if(n.value==="<")i++;else if(n.value==="</"&&(i--,i<0)){a.stepBackward();var m=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);u=a.stepForward();var E=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=a.stepForward()),u&&u.value===">")var T=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(r===o&&u.value==="/>"&&(i--,i<0))var m=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),E=m,T=E,g=new w(t.end.row,t.end.column,t.end.row,t.end.column+1)}}while(u&&i>=0);if(e&&g&&m&&T&&t&&E)return{openTag:new w(e.start.row,e.start.column,g.end.row,g.end.column),closeTag:new w(m.start.row,m.start.column,T.end.row,T.end.column),openTagName:t,closeTagName:E}},this.$findOpeningTag=function(a,u){var n=a.getCurrentToken(),o=u.value,r=0,i=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),t=e+2,c=new w(i,e,i,t);a.stepForward();var g=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=a.stepForward()),!(!u||u.value!==">")){var m=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(u=n,i=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),t=e+u.value.length,n=a.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(o===u.value)if(n.value==="<"){if(r++,r>0){var E=new w(i,e,i,t),T=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do u=a.stepForward();while(u&&u.value!==">");var x=new w(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else n.value==="</"&&r--}else if(u.value==="/>"){for(var b=0,de=n;de;){if(de.type.indexOf("tag-name")!==-1&&de.value===o){r--;break}else if(de.value==="<")break;de=a.stepBackward(),b++}for(var Te=0;Te<b;Te++)a.stepForward()}}while(n&&r<=0);if(T&&x&&c&&m&&E&&g)return{openTag:new w(T.start.row,T.start.column,x.end.row,x.end.column),closeTag:new w(c.start.row,c.start.column,m.end.row,m.end.column),openTagName:E,closeTagName:g}}}}v.BracketMatch=A}),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,v,fe){var M=p("./lib/oop"),w=p("./lib/lang"),A=p("./bidihandler").BidiHandler,a=p("./config"),u=p("./lib/event_emitter").EventEmitter,n=p("./selection").Selection,o=p("./mode/text").Mode,r=p("./range").Range,i=p("./line_widgets").LineWidgets,e=p("./document").Document,t=p("./background_tokenizer").BackgroundTokenizer,c=p("./search_highlight").SearchHighlight,g=p("./undomanager").UndoManager,m=function(){function V(O,S){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"+ ++V.$uid,this.$foldData.toString=function(){return this.join(`
200
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new t(new o().getTokenizer(),this);var y=this;this.bgTokenizer.on("update",function(I){y._signal("tokenizerUpdate",I)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new e(O)),this.setDocument(O),this.selection=new n(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new A(this),a.resetOptions(this),this.setMode(S),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return V.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=w.delayedCall(this.endOperation.bind(this,!0))},V.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},V.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var S=this.selection.toJSON();this.curOp.selectionAfter=S,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(S),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},V.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},V.prototype.getDocument=function(){return this.doc},Object.defineProperty(V.prototype,"widgetManager",{get:function(){var O=new i(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),V.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var S=this.$docRowCache.length,y=this.$getRowCacheIndex(this.$docRowCache,O)+1;S>y&&(this.$docRowCache.splice(y,S),this.$screenRowCache.splice(y,S))},V.prototype.$getRowCacheIndex=function(O,S){for(var y=0,I=O.length-1;y<=I;){var ke=y+I>>1,Qe=O[ke];if(S>Qe)y=ke+1;else if(S<Qe)I=ke-1;else return ke}return y-1},V.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},V.prototype.onChangeFold=function(O){var S=O.data;this.$resetRowCache(S.start.row)},V.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var S=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(S&&S.length&&(this.$undoManager.add({action:"removeFolds",folds:S},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},V.prototype.onSelectionChange=function(){this._signal("changeSelection")},V.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},V.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var S=new g;S.$undoStack=O.history.undo,S.$redoStack=O.history.redo,S.mark=O.history.mark,S.$rev=O.history.rev;var y=new V(O.value);return O.folds.forEach(function(I){y.addFold("...",r.fromPoints(I.start,I.end))}),y.setAnnotations(O.annotations),y.setBreakpoints(O.breakpoints),y.setMode(O.mode),y.setScrollLeft(O.scrollLeft),y.setScrollTop(O.scrollTop),y.setUndoManager(S),y.selection.fromJSON(O.selection),y},V.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},V.prototype.toString=function(){return this.doc.getValue()},V.prototype.getSelection=function(){return this.selection},V.prototype.getState=function(O){return this.bgTokenizer.getState(O)},V.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},V.prototype.getTokenAt=function(O,S){var y=this.bgTokenizer.getTokens(O),I,ke=0;if(S==null){var Qe=y.length-1;ke=this.getLine(O).length}else for(var Qe=0;Qe<y.length&&(ke+=y[Qe].value.length,!(ke>=S));Qe++);return I=y[Qe],I?(I.index=Qe,I.start=ke-I.value.length,I):null},V.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var S=this;O.addSession(this),this.$syncInformUndoManager=function(){S.$informUndoManager.cancel(),S.mergeUndoDeltas=!1},this.$informUndoManager=w.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},V.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},V.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},V.prototype.getTabString=function(){return this.getUseSoftTabs()?w.stringRepeat(" ",this.getTabSize()):" "},V.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},V.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},V.prototype.setTabSize=function(O){this.setOption("tabSize",O)},V.prototype.getTabSize=function(){return this.$tabSize},V.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},V.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},V.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},V.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},V.prototype.getOverwrite=function(){return this.$overwrite},V.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},V.prototype.addGutterDecoration=function(O,S){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+S,this._signal("changeBreakpoint",{})},V.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},V.prototype.addGutterCustomWidget=function(O,S){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,S)},V.prototype.removeGutterDecoration=function(O,S){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+S,""),this._signal("changeBreakpoint",{})},V.prototype.getBreakpoints=function(){return this.$breakpoints},V.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var S=0;S<O.length;S++)this.$breakpoints[O[S]]="ace_breakpoint";this._signal("changeBreakpoint",{})},V.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},V.prototype.setBreakpoint=function(O,S){S===void 0&&(S="ace_breakpoint"),S?this.$breakpoints[O]=S:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},V.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},V.prototype.addMarker=function(O,S,y,I){var ke=this.$markerId++,Qe={range:O,type:y||"line",renderer:typeof y=="function"?y:null,clazz:S,inFront:!!I,id:ke};return I?(this.$frontMarkers[ke]=Qe,this._signal("changeFrontMarker")):(this.$backMarkers[ke]=Qe,this._signal("changeBackMarker")),ke},V.prototype.addDynamicMarker=function(O,S){if(O.update){var y=this.$markerId++;return O.id=y,O.inFront=!!S,S?(this.$frontMarkers[y]=O,this._signal("changeFrontMarker")):(this.$backMarkers[y]=O,this._signal("changeBackMarker")),O}},V.prototype.removeMarker=function(O){var S=this.$frontMarkers[O]||this.$backMarkers[O];if(S){var y=S.inFront?this.$frontMarkers:this.$backMarkers;delete y[O],this._signal(S.inFront?"changeFrontMarker":"changeBackMarker")}},V.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},V.prototype.highlight=function(O){if(!this.$searchHighlight){var S=new c(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(S)}this.$searchHighlight.setRegexp(O)},V.prototype.highlightLines=function(O,S,y,I){typeof S!="number"&&(y=S,S=O),y||(y="ace_step");var ke=new r(O,0,S,1/0);return ke.id=this.addMarker(ke,y,"fullLine",I),ke},V.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},V.prototype.getAnnotations=function(){return this.$annotations||[]},V.prototype.clearAnnotations=function(){this.setAnnotations([])},V.prototype.$detectNewLine=function(O){var S=O.match(/^.*?(\r?\n)/m);S?this.$autoNewLine=S[1]:this.$autoNewLine=`
201
+ `},V.prototype.getWordRange=function(O,S){var y=this.getLine(O),I=!1;if(S>0&&(I=!!y.charAt(S-1).match(this.tokenRe)),I||(I=!!y.charAt(S).match(this.tokenRe)),I)var ke=this.tokenRe;else if(/^\s+$/.test(y.slice(S-1,S+1)))var ke=/\s/;else var ke=this.nonTokenRe;var Qe=S;if(Qe>0){do Qe--;while(Qe>=0&&y.charAt(Qe).match(ke));Qe++}for(var Je=S;Je<y.length&&y.charAt(Je).match(ke);)Je++;return new r(O,Qe,O,Je)},V.prototype.getAWordRange=function(O,S){for(var y=this.getWordRange(O,S),I=this.getLine(y.end.row);I.charAt(y.end.column).match(/[ \t]/);)y.end.column+=1;return y},V.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},V.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},V.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},V.prototype.getUseWorker=function(){return this.$useWorker},V.prototype.onReloadTokenizer=function(O){var S=O.data;this.bgTokenizer.start(S.first),this._signal("tokenizerUpdate",O)},V.prototype.setMode=function(O,S){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var y=O,I=y.path}else I=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[I]&&!y){this.$onChangeMode(this.$modes[I]),S&&S();return}this.$modeId=I,a.loadModule(["mode",I],(function(ke){if(!this.destroyed){if(this.$modeId!==I)return S&&S();this.$modes[I]&&!y?this.$onChangeMode(this.$modes[I]):ke&&ke.Mode&&(ke=new ke.Mode(y),y||(this.$modes[I]=ke,ke.$id=I),this.$onChangeMode(ke)),S&&S()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},V.prototype.$onChangeMode=function(O,S){if(S||(this.$modeId=O.$id),this.$mode!==O){var y=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var I=O.getTokenizer();if(I.on!==void 0){var ke=this.onReloadTokenizer.bind(this);I.on("update",ke)}this.bgTokenizer.setTokenizer(I),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,S||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:y,mode:O}))}},V.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},V.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){a.warn("Could not load worker",O),this.$worker=null}},V.prototype.getMode=function(){return this.$mode},V.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},V.prototype.getScrollTop=function(){return this.$scrollTop},V.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},V.prototype.getScrollLeft=function(){return this.$scrollLeft},V.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},V.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(S){S&&S.screenWidth>O&&(O=S.screenWidth)}),this.lineWidgetWidth=O},V.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var S=this.doc.getAllLines(),y=this.$rowLengthCache,I=0,ke=0,Qe=this.$foldData[ke],Je=Qe?Qe.start.row:1/0,mt=S.length,yt=0;yt<mt;yt++){if(yt>Je){if(yt=Qe.end.row+1,yt>=mt)break;Qe=this.$foldData[ke++],Je=Qe?Qe.start.row:1/0}y[yt]==null&&(y[yt]=this.$getStringScreenWidth(S[yt])[0]),y[yt]>I&&(I=y[yt])}this.screenWidth=I}},V.prototype.getLine=function(O){return this.doc.getLine(O)},V.prototype.getLines=function(O,S){return this.doc.getLines(O,S)},V.prototype.getLength=function(){return this.doc.getLength()},V.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},V.prototype.insert=function(O,S){return this.doc.insert(O,S)},V.prototype.remove=function(O){return this.doc.remove(O)},V.prototype.removeFullLines=function(O,S){return this.doc.removeFullLines(O,S)},V.prototype.undoChanges=function(O,S){if(O.length){this.$fromUndo=!0;for(var y=O.length-1;y!=-1;y--){var I=O[y];I.action=="insert"||I.action=="remove"?this.doc.revertDelta(I):I.folds&&this.addFolds(I.folds)}!S&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},V.prototype.redoChanges=function(O,S){if(O.length){this.$fromUndo=!0;for(var y=0;y<O.length;y++){var I=O[y];(I.action=="insert"||I.action=="remove")&&this.doc.$safeApplyDelta(I)}!S&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},V.prototype.setUndoSelect=function(O){this.$undoSelect=O},V.prototype.$getUndoSelection=function(O,S){function y(mt){return S?mt.action!=="insert":mt.action==="insert"}for(var I,ke,Qe=0;Qe<O.length;Qe++){var Je=O[Qe];if(Je.start){if(!I){y(Je)?I=r.fromPoints(Je.start,Je.end):I=r.fromPoints(Je.start,Je.start);continue}y(Je)?(ke=Je.start,I.compare(ke.row,ke.column)==-1&&I.setStart(ke),ke=Je.end,I.compare(ke.row,ke.column)==1&&I.setEnd(ke)):(ke=Je.start,I.compare(ke.row,ke.column)==-1&&(I=r.fromPoints(Je.start,Je.start)))}}return I},V.prototype.replace=function(O,S){return this.doc.replace(O,S)},V.prototype.moveText=function(O,S,y){var I=this.getTextRange(O),ke=this.getFoldsInRange(O),Qe=r.fromPoints(S,S);if(!y){this.remove(O);var Je=O.start.row-O.end.row,mt=Je?-O.end.column:O.start.column-O.end.column;mt&&(Qe.start.row==O.end.row&&Qe.start.column>O.end.column&&(Qe.start.column+=mt),Qe.end.row==O.end.row&&Qe.end.column>O.end.column&&(Qe.end.column+=mt)),Je&&Qe.start.row>=O.end.row&&(Qe.start.row+=Je,Qe.end.row+=Je)}if(Qe.end=this.insert(Qe.start,I),ke.length){var yt=O.start,Qt=Qe.start,Je=Qt.row-yt.row,mt=Qt.column-yt.column;this.addFolds(ke.map(function(Yt){return Yt=Yt.clone(),Yt.start.row==yt.row&&(Yt.start.column+=mt),Yt.end.row==yt.row&&(Yt.end.column+=mt),Yt.start.row+=Je,Yt.end.row+=Je,Yt}))}return Qe},V.prototype.indentRows=function(O,S,y){y=y.replace(/\t/g,this.getTabString());for(var I=O;I<=S;I++)this.doc.insertInLine({row:I,column:0},y)},V.prototype.outdentRows=function(O){for(var S=O.collapseRows(),y=new r(0,0,0,0),I=this.getTabSize(),ke=S.start.row;ke<=S.end.row;++ke){var Qe=this.getLine(ke);y.start.row=ke,y.end.row=ke;for(var Je=0;Je<I&&Qe.charAt(Je)==" ";++Je);Je<I&&Qe.charAt(Je)==" "?(y.start.column=Je,y.end.column=Je+1):(y.start.column=0,y.end.column=Je),this.remove(y)}},V.prototype.$moveLines=function(O,S,y){if(O=this.getRowFoldStart(O),S=this.getRowFoldEnd(S),y<0){var I=this.getRowFoldStart(O+y);if(I<0)return 0;var ke=I-O}else if(y>0){var I=this.getRowFoldEnd(S+y);if(I>this.doc.getLength()-1)return 0;var ke=I-S}else{O=this.$clipRowToDocument(O),S=this.$clipRowToDocument(S);var ke=S-O+1}var Qe=new r(O,0,S,Number.MAX_VALUE),Je=this.getFoldsInRange(Qe).map(function(yt){return yt=yt.clone(),yt.start.row+=ke,yt.end.row+=ke,yt}),mt=y==0?this.doc.getLines(O,S):this.doc.removeFullLines(O,S);return this.doc.insertFullLines(O+ke,mt),Je.length&&this.addFolds(Je),ke},V.prototype.moveLinesUp=function(O,S){return this.$moveLines(O,S,-1)},V.prototype.moveLinesDown=function(O,S){return this.$moveLines(O,S,1)},V.prototype.duplicateLines=function(O,S){return this.$moveLines(O,S,0)},V.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},V.prototype.$clipColumnToRow=function(O,S){return S<0?0:Math.min(this.doc.getLine(O).length,S)},V.prototype.$clipPositionToDocument=function(O,S){if(S=Math.max(0,S),O<0)O=0,S=0;else{var y=this.doc.getLength();O>=y?(O=y-1,S=this.doc.getLine(y-1).length):S=Math.min(this.doc.getLine(O).length,S)}return{row:O,column:S}},V.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var S=this.doc.getLength()-1;return O.end.row>S?(O.end.row=S,O.end.column=this.doc.getLine(S).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},V.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var S=this.getLength();this.$wrapData=Array(S),this.$updateWrapData(0,S-1)}this._signal("changeWrapMode")}},V.prototype.getUseWrapMode=function(){return this.$useWrapMode},V.prototype.setWrapLimitRange=function(O,S){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==S)&&(this.$wrapLimitRange={min:O,max:S},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},V.prototype.adjustWrapLimit=function(O,S){var y=this.$wrapLimitRange;y.max<0&&(y={min:S,max:S});var I=this.$constrainWrapLimit(O,y.min,y.max);return I!=this.$wrapLimit&&I>1?(this.$wrapLimit=I,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},V.prototype.$constrainWrapLimit=function(O,S,y){return S&&(O=Math.max(S,O)),y&&(O=Math.min(y,O)),O},V.prototype.getWrapLimit=function(){return this.$wrapLimit},V.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},V.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},V.prototype.$updateInternalDataOnChange=function(O){var S=this.$useWrapMode,y=O.action,I=O.start,ke=O.end,Qe=I.row,Je=ke.row,mt=Je-Qe,yt=null;if(this.$updating=!0,mt!=0)if(y==="remove"){this[S?"$wrapData":"$rowLengthCache"].splice(Qe,mt);var Qt=this.$foldData;yt=this.getFoldsInRange(O),this.removeFolds(yt);var bt=this.getFoldLine(ke.row),Gt=0;if(bt){bt.addRemoveChars(ke.row,ke.column,I.column-ke.column),bt.shiftRow(-mt);var Yt=this.getFoldLine(Qe);Yt&&Yt!==bt&&(Yt.merge(bt),bt=Yt),Gt=Qt.indexOf(bt)+1}for(Gt;Gt<Qt.length;Gt++){var bt=Qt[Gt];bt.start.row>=ke.row&&bt.shiftRow(-mt)}Je=Qe}else{var Zt=Array(mt);Zt.unshift(Qe,0);var Jt=S?this.$wrapData:this.$rowLengthCache;Jt.splice.apply(Jt,Zt);var Qt=this.$foldData,bt=this.getFoldLine(Qe),Gt=0;if(bt){var pi=bt.range.compareInside(I.row,I.column);pi==0?(bt=bt.split(I.row,I.column),bt&&(bt.shiftRow(mt),bt.addRemoveChars(Je,0,ke.column-I.column))):pi==-1&&(bt.addRemoveChars(Qe,0,ke.column-I.column),bt.shiftRow(mt)),Gt=Qt.indexOf(bt)+1}for(Gt;Gt<Qt.length;Gt++){var bt=Qt[Gt];bt.start.row>=Qe&&bt.shiftRow(mt)}}else{mt=Math.abs(O.start.column-O.end.column),y==="remove"&&(yt=this.getFoldsInRange(O),this.removeFolds(yt),mt=-mt);var bt=this.getFoldLine(Qe);bt&&bt.addRemoveChars(Qe,I.column,mt)}return S&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,S?this.$updateWrapData(Qe,Je):this.$updateRowLengthCache(Qe,Je),yt},V.prototype.$updateRowLengthCache=function(O,S){this.$rowLengthCache[O]=null,this.$rowLengthCache[S]=null},V.prototype.$updateWrapData=function(O,S){var y=this.doc.getAllLines(),I=this.getTabSize(),ke=this.$wrapData,Qe=this.$wrapLimit,Je,mt,yt=O;for(S=Math.min(S,y.length-1);yt<=S;)mt=this.getFoldLine(yt,mt),mt?(Je=[],mt.walk((function(Qt,bt,Gt,Yt){var Zt;if(Qt!=null){Zt=this.$getDisplayTokens(Qt,Je.length),Zt[0]=x;for(var Jt=1;Jt<Zt.length;Jt++)Zt[Jt]=b}else Zt=this.$getDisplayTokens(y[bt].substring(Yt,Gt),Je.length);Je=Je.concat(Zt)}).bind(this),mt.end.row,y[mt.end.row].length+1),ke[mt.start.row]=this.$computeWrapSplits(Je,Qe,I),yt=mt.end.row+1):(Je=this.$getDisplayTokens(y[yt]),ke[yt]=this.$computeWrapSplits(Je,Qe,I),yt++)},V.prototype.$computeWrapSplits=function(O,S,y){if(O.length==0)return[];var I=[],ke=O.length,Qe=0,Je=0,mt=this.$wrapAsCode,yt=this.$indentedSoftWrap,Qt=S<=Math.max(2*y,8)||yt===!1?0:Math.floor(S/2);function bt(){var pi=0;if(Qt===0)return pi;if(yt)for(var mi=0;mi<O.length;mi++){var gi=O[mi];if(gi==Te)pi+=1;else if(gi==he)pi+=y;else{if(gi==Y)continue;break}}return mt&&yt!==!1&&(pi+=y),Math.min(pi,Qt)}function Gt(pi){for(var mi=pi-Qe,gi=Qe;gi<pi;gi++){var vi=O[gi];(vi===12||vi===2)&&(mi-=1)}I.length||(Yt=bt(),I.indent=Yt),Je+=mi,I.push(Je),Qe=pi}for(var Yt=0;ke-Qe>S-Yt;){var Zt=Qe+S-Yt;if(O[Zt-1]>=Te&&O[Zt]>=Te){Gt(Zt);continue}if(O[Zt]==x||O[Zt]==b){for(Zt;Zt!=Qe-1&&O[Zt]!=x;Zt--);if(Zt>Qe){Gt(Zt);continue}for(Zt=Qe+S,Zt;Zt<O.length&&O[Zt]==b;Zt++);if(Zt==O.length)break;Gt(Zt);continue}for(var Jt=Math.max(Zt-(S-(S>>2)),Qe-1);Zt>Jt&&O[Zt]<x;)Zt--;if(mt){for(;Zt>Jt&&O[Zt]<x;)Zt--;for(;Zt>Jt&&O[Zt]==de;)Zt--}else for(;Zt>Jt&&O[Zt]<Te;)Zt--;if(Zt>Jt){Gt(++Zt);continue}Zt=Qe+S,O[Zt]==T&&Zt--,Gt(Zt-Yt)}return I},V.prototype.$getDisplayTokens=function(O,S){var y=[],I;S=S||0;for(var ke=0;ke<O.length;ke++){var Qe=O.charCodeAt(ke);if(Qe==9){I=this.getScreenTabSize(y.length+S),y.push(he);for(var Je=1;Je<I;Je++)y.push(Y)}else Qe==32?y.push(Te):Qe>39&&Qe<48||Qe>57&&Qe<64?y.push(de):Qe>=4352&&gt(Qe)?y.push(E,T):y.push(E)}return y},V.prototype.$getStringScreenWidth=function(O,S,y){if(S==0)return[0,0];S==null&&(S=1/0),y=y||0;var I,ke;for(ke=0;ke<O.length&&(I=O.charCodeAt(ke),I==9?y+=this.getScreenTabSize(y):I>=4352&&gt(I)?y+=2:y+=1,!(y>S));ke++);return[y,ke]},V.prototype.getRowLength=function(O){var S=1;return this.lineWidgets&&(S+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?S:this.$wrapData[O].length+S},V.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},V.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var S=this.screenToDocumentPosition(O,Number.MAX_VALUE),y=this.$wrapData[S.row];return y.length&&y[0]<S.column?y.indent:0}else return 0},V.prototype.getScreenLastRowColumn=function(O){var S=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(S.row,S.column)},V.prototype.getDocumentLastRowColumn=function(O,S){var y=this.documentToScreenRow(O,S);return this.getScreenLastRowColumn(y)},V.prototype.getDocumentLastRowColumnPosition=function(O,S){var y=this.documentToScreenRow(O,S);return this.screenToDocumentPosition(y,Number.MAX_VALUE/10)},V.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},V.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},V.prototype.screenToDocumentRow=function(O,S){return this.screenToDocumentPosition(O,S).row},V.prototype.screenToDocumentColumn=function(O,S){return this.screenToDocumentPosition(O,S).column},V.prototype.screenToDocumentPosition=function(O,S,y){if(O<0)return{row:0,column:0};var I,ke=0,Qe=0,Je,mt=0,yt=0,Qt=this.$screenRowCache,bt=this.$getRowCacheIndex(Qt,O),Gt=Qt.length;if(Gt&&bt>=0)var mt=Qt[bt],ke=this.$docRowCache[bt],Yt=O>Qt[Gt-1];else var Yt=!Gt;for(var Zt=this.getLength()-1,Jt=this.getNextFoldLine(ke),pi=Jt?Jt.start.row:1/0;mt<=O&&(yt=this.getRowLength(ke),!(mt+yt>O||ke>=Zt));)mt+=yt,ke++,ke>pi&&(ke=Jt.end.row+1,Jt=this.getNextFoldLine(ke,Jt),pi=Jt?Jt.start.row:1/0),Yt&&(this.$docRowCache.push(ke),this.$screenRowCache.push(mt));if(Jt&&Jt.start.row<=ke)I=this.getFoldDisplayLine(Jt),ke=Jt.start.row;else{if(mt+yt<=O||ke>Zt)return{row:Zt,column:this.getLine(Zt).length};I=this.getLine(ke),Jt=null}var mi=0,gi=Math.floor(O-mt);if(this.$useWrapMode){var vi=this.$wrapData[ke];vi&&(Je=vi[gi],gi>0&&vi.length&&(mi=vi.indent,Qe=vi[gi-1]||vi[vi.length-1],I=I.substring(Qe)))}return y!==void 0&&this.$bidiHandler.isBidiRow(mt+gi,ke,gi)&&(S=this.$bidiHandler.offsetToCol(y)),Qe+=this.$getStringScreenWidth(I,S-mi)[1],this.$useWrapMode&&Qe>=Je&&(Qe=Je-1),Jt?Jt.idxToPosition(Qe):{row:ke,column:Qe}},V.prototype.documentToScreenPosition=function(O,S){if(typeof S>"u")var y=this.$clipPositionToDocument(O.row,O.column);else y=this.$clipPositionToDocument(O,S);O=y.row,S=y.column;var I=0,ke=null,Qe=null;Qe=this.getFoldAt(O,S,1),Qe&&(O=Qe.start.row,S=Qe.start.column);var Je,mt=0,yt=this.$docRowCache,Qt=this.$getRowCacheIndex(yt,O),bt=yt.length;if(bt&&Qt>=0)var mt=yt[Qt],I=this.$screenRowCache[Qt],Gt=O>yt[bt-1];else var Gt=!bt;for(var Yt=this.getNextFoldLine(mt),Zt=Yt?Yt.start.row:1/0;mt<O;){if(mt>=Zt){if(Je=Yt.end.row+1,Je>O)break;Yt=this.getNextFoldLine(Je,Yt),Zt=Yt?Yt.start.row:1/0}else Je=mt+1;I+=this.getRowLength(mt),mt=Je,Gt&&(this.$docRowCache.push(mt),this.$screenRowCache.push(I))}var Jt="";Yt&&mt>=Zt?(Jt=this.getFoldDisplayLine(Yt,O,S),ke=Yt.start.row):(Jt=this.getLine(O).substring(0,S),ke=O);var pi=0;if(this.$useWrapMode){var mi=this.$wrapData[ke];if(mi){for(var gi=0;Jt.length>=mi[gi];)I++,gi++;Jt=Jt.substring(mi[gi-1]||0,Jt.length),pi=gi>0?mi.indent:0}}return this.lineWidgets&&this.lineWidgets[mt]&&this.lineWidgets[mt].rowsAbove&&(I+=this.lineWidgets[mt].rowsAbove),{row:I,column:pi+this.$getStringScreenWidth(Jt)[0]}},V.prototype.documentToScreenColumn=function(O,S){return this.documentToScreenPosition(O,S).column},V.prototype.documentToScreenRow=function(O,S){return this.documentToScreenPosition(O,S).row},V.prototype.getScreenLength=function(){var O=0,S=null;if(this.$useWrapMode)for(var ke=this.$wrapData.length,Qe=0,I=0,S=this.$foldData[I++],Je=S?S.start.row:1/0;Qe<ke;){var mt=this.$wrapData[Qe];O+=mt?mt.length+1:1,Qe++,Qe>Je&&(Qe=S.end.row+1,S=this.$foldData[I++],Je=S?S.start.row:1/0)}else{O=this.getLength();for(var y=this.$foldData,I=0;I<y.length;I++)S=y[I],O-=S.end.row-S.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},V.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(S,y,I){if(y===0)return[0,0];y||(y=1/0),I=I||0;var ke,Qe;for(Qe=0;Qe<S.length&&(ke=S.charAt(Qe),ke===" "?I+=this.getScreenTabSize(I):I+=O.getCharacterWidth(ke),!(I>y));Qe++);return[I,Qe]})},V.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var S=this.getLine(O.row);return S[O.column-1]},V.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()},V}();m.$uid=0,m.prototype.$modes=a.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=gt,M.implement(m.prototype,u);var E=1,T=2,x=3,b=4,de=9,Te=10,he=11,Y=12;function gt(V){return V<4352?!1:V>=4352&&V<=4447||V>=4515&&V<=4519||V>=4602&&V<=4607||V>=9001&&V<=9002||V>=11904&&V<=11929||V>=11931&&V<=12019||V>=12032&&V<=12245||V>=12272&&V<=12283||V>=12288&&V<=12350||V>=12353&&V<=12438||V>=12441&&V<=12543||V>=12549&&V<=12589||V>=12593&&V<=12686||V>=12688&&V<=12730||V>=12736&&V<=12771||V>=12784&&V<=12830||V>=12832&&V<=12871||V>=12880&&V<=13054||V>=13056&&V<=19903||V>=19968&&V<=42124||V>=42128&&V<=42182||V>=43360&&V<=43388||V>=44032&&V<=55203||V>=55216&&V<=55238||V>=55243&&V<=55291||V>=63744&&V<=64255||V>=65040&&V<=65049||V>=65072&&V<=65106||V>=65108&&V<=65126||V>=65128&&V<=65131||V>=65281&&V<=65376||V>=65504&&V<=65510}p("./edit_session/folding").Folding.call(m.prototype),p("./edit_session/bracket_match").BracketMatch.call(m.prototype),a.defineOptions(m.prototype,"session",{wrap:{set:function(V){if(!V||V=="off"?V=!1:V=="free"?V=!0:V=="printMargin"?V=-1:typeof V=="string"&&(V=parseInt(V,10)||!1),this.$wrap!=V)if(this.$wrap=V,!V)this.setUseWrapMode(!1);else{var O=typeof V=="number"?V:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(V){V=V=="auto"?this.$mode.type!="text":V!="text",V!=this.$wrapAsCode&&(this.$wrapAsCode=V,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(V){this.$useWorker=V,this.$stopWorker(),V&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(V){V=parseInt(V),V>0&&this.$tabSize!==V&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=V,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(V){this.setFoldStyle(V)},handlesSet:!0},overwrite:{set:function(V){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(V){this.doc.setNewLineMode(V)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(V){this.setMode(V)},get:function(){return this.$modeId},handlesSet:!0}}),v.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(p,v,fe){var M=p("./lib/lang"),w=p("./lib/oop"),A=p("./range").Range,a=function(){function r(){this.$options={}}return r.prototype.set=function(i){return w.mixin(this.$options,i),this},r.prototype.getOptions=function(){return M.copyObject(this.$options)},r.prototype.setOptions=function(i){this.$options=i},r.prototype.find=function(i){var e=this.$options,t=this.$matchIterator(i,e);if(!t)return!1;var c=null;return t.forEach(function(g,m,E,T){return c=new A(g,m,E,T),m==T&&e.start&&e.start.start&&e.skipCurrent!=!1&&c.isEqual(e.start)?(c=null,!1):!0}),c},r.prototype.findAll=function(i){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var t=e.range,c=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),g=[],m=e.re;if(e.$isMultiLine){var E=m.length,T=c.length-E,x;e:for(var b=m.offset||0;b<=T;b++){for(var de=0;de<E;de++)if(c[b+de].search(m[de])==-1)continue e;var Te=c[b],he=c[b+E-1],Y=Te.length-Te.match(m[0])[0].length,gt=he.match(m[E-1])[0].length;x&&x.end.row===b&&x.end.column>Y||(g.push(x=new A(b,Y,b+E-1,gt)),E>2&&(b=b+E-2))}}else for(var V,O=0;O<c.length;O++)if(this.$isMultilineSearch(e)){var S=c.length-1;if(V=this.$multiLineForward(i,m,O,S),V){var y=V.endRow<=S?V.endRow-1:S;y>O&&(O=y),g.push(new A(V.startRow,V.startCol,V.endRow,V.endCol))}}else{V=M.getMatchOffsets(c[O],m);for(var de=0;de<V.length;de++){var I=V[de];g.push(new A(O,I.offset,O,I.offset+I.length))}}if(t){for(var ke=t.start.column,Qe=t.end.column,O=0,de=g.length-1;O<de&&g[O].start.column<ke&&g[O].start.row==0;)O++;for(var Je=t.end.row-t.start.row;O<de&&g[de].end.column>Qe&&g[de].end.row==Je;)de--;for(g=g.slice(O,de+1),O=0,de=g.length;O<de;O++)g[O].start.row+=t.start.row,g[O].end.row+=t.start.row}return g},r.prototype.parseReplaceString=function(i){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},t="",c=0,g=i.length;c<g;c++){var m=i.charCodeAt(c);if(m===e.Backslash){if(c++,c>=g){t+="\\";break}var E=i.charCodeAt(c);switch(E){case e.Backslash:t+="\\";break;case e.n:t+=`
202
+ `;break;case e.t:t+=" ";break}continue}if(m===e.DollarSign){if(c++,c>=g){t+="$";break}var T=i.charCodeAt(c);if(T===e.DollarSign){t+="$$";continue}if(T===e.Digit0||T===e.Ampersand){t+="$&";continue}if(e.Digit1<=T&&T<=e.Digit9){t+="$"+i[c];continue}}t+=i[c]}return t||i},r.prototype.replace=function(i,e){var t=this.$options,c=this.$assembleRegExp(t);if(t.$isMultiLine)return e;if(c){var g=this.$isMultilineSearch(t);g&&(i=i.replace(/\r\n|\r|\n/g,`
203
+ `));var m=c.exec(i);if(!m||!g&&m[0].length!=i.length)return null;if(e=t.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=i.replace(c,e),t.preserveCase){e=e.split("");for(var E=Math.min(i.length,i.length);E--;){var T=i[E];T&&T.toLowerCase()!=T?e[E]=e[E].toUpperCase():e[E]=e[E].toLowerCase()}e=e.join("")}return e}},r.prototype.$assembleRegExp=function(i,e){if(i.needle instanceof RegExp)return i.re=i.needle;var t=i.needle;if(!i.needle)return i.re=!1;i.regExp||(t=M.escapeRegExp(t));var c=i.caseSensitive?"gm":"gmi";try{new RegExp(t,"u"),i.$supportsUnicodeFlag=!0,c+="u"}catch{i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(t=u(t,i)),i.$isMultiLine=!e&&/[\n\r]/.test(t),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(t,c);try{var g=new RegExp(t,c)}catch{g=!1}return i.re=g},r.prototype.$assembleMultilineRegExp=function(i,e){for(var t=i.replace(/\r\n|\r|\n/g,`$
204
+ ^`).split(`
205
+ `),c=[],g=0;g<t.length;g++)try{c.push(new RegExp(t[g],e))}catch{return!1}return c},r.prototype.$isMultilineSearch=function(i){return i.re&&/\\r\\n|\\r|\\n/.test(i.re.source)&&i.regExp&&!i.$isMultiLine},r.prototype.$multiLineForward=function(i,e,t,c){for(var g,m=o(i,t),E=t;E<=c;){for(var T=0;T<m&&!(E>c);T++){var x=i.getLine(E++);g=g==null?x:g+`
206
+ `+x}var b=e.exec(g);if(e.lastIndex=0,b){var de=g.slice(0,b.index).split(`
207
+ `),Te=b[0].split(`
208
+ `),he=t+de.length-1,Y=de[de.length-1].length,gt=he+Te.length-1,V=Te.length==1?Y+Te[0].length:Te[Te.length-1].length;return{startRow:he,startCol:Y,endRow:gt,endCol:V}}}return null},r.prototype.$multiLineBackward=function(i,e,t,c,g){for(var m,E=o(i,c),T=i.getLine(c).length-t,x=c;x>=g;){for(var b=0;b<E&&x>=g;b++){var de=i.getLine(x--);m=m==null?de:de+`
209
+ `+m}var Te=n(m,e,T);if(Te){var he=m.slice(0,Te.index).split(`
210
+ `),Y=Te[0].split(`
211
+ `),gt=x+he.length,V=he[he.length-1].length,O=gt+Y.length-1,S=Y.length==1?V+Y[0].length:Y[Y.length-1].length;return{startRow:gt,startCol:V,endRow:O,endCol:S}}}return null},r.prototype.$matchIterator=function(i,e){var t=this.$assembleRegExp(e);if(!t)return!1;var c=this.$isMultilineSearch(e),g=this.$multiLineForward,m=this.$multiLineBackward,E=e.backwards==!0,T=e.skipCurrent!=!1,x=t.unicode,b=e.range,de=e.start;de||(de=b?b[E?"end":"start"]:i.selection.getRange()),de.start&&(de=de[T!=E?"end":"start"]);var Te=b?b.start.row:0,he=b?b.end.row:i.getLength()-1;if(E)var Y=function(O){var S=de.row;if(!V(S,de.column,O)){for(S--;S>=Te;S--)if(V(S,Number.MAX_VALUE,O))return;if(e.wrap!=!1){for(S=he,Te=de.row;S>=Te;S--)if(V(S,Number.MAX_VALUE,O))return}}};else var Y=function(S){var y=de.row;if(!V(y,de.column,S)){for(y=y+1;y<=he;y++)if(V(y,0,S))return;if(e.wrap!=!1){for(y=Te,he=de.row;y<=he;y++)if(V(y,0,S))return}}};if(e.$isMultiLine)var gt=t.length,V=function(O,S,y){var I=E?O-gt+1:O;if(!(I<0||I+gt>i.getLength())){var ke=i.getLine(I),Qe=ke.search(t[0]);if(!(!E&&Qe<S||Qe===-1)){for(var Je=1;Je<gt;Je++)if(ke=i.getLine(I+Je),ke.search(t[Je])==-1)return;var mt=ke.match(t[gt-1])[0].length;if(!(E&&mt>S)&&y(I,Qe,I+gt-1,mt))return!0}}};else if(E)var V=function(S,y,I){if(c){var ke=m(i,t,y,S,Te);if(!ke)return!1;if(I(ke.startRow,ke.startCol,ke.endRow,ke.endCol))return!0}else{var Qe=i.getLine(S),Je=[],mt,yt=0;for(t.lastIndex=0;mt=t.exec(Qe);){var Qt=mt[0].length;if(yt=mt.index,!Qt){if(yt>=Qe.length)break;t.lastIndex=yt+=M.skipEmptyMatch(Qe,yt,x)}if(mt.index+Qt>y)break;Je.push(mt.index,Qt)}for(var bt=Je.length-1;bt>=0;bt-=2){var Gt=Je[bt-1],Qt=Je[bt];if(I(S,Gt,S,Gt+Qt))return!0}}};else var V=function(S,y,I){if(t.lastIndex=y,c){var ke=g(i,t,S,he);if(ke){var Qe=ke.endRow<=he?ke.endRow-1:he;Qe>S&&(S=Qe)}if(!ke)return!1;if(I(ke.startRow,ke.startCol,ke.endRow,ke.endCol))return!0}else for(var Je=i.getLine(S),mt,yt;yt=t.exec(Je);){var Qt=yt[0].length;if(mt=yt.index,I(S,mt,S,mt+Qt))return!0;if(!Qt&&(t.lastIndex=mt+=M.skipEmptyMatch(Je,mt,x),mt>=Je.length))return!1}};return{forEach:Y}},r}();function u(r,i){var e=M.supportsLookbehind();function t(E,T){T===void 0&&(T=!0);var x=e&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return x.test(E)||i.regExp?e&&i.$supportsUnicodeFlag?T?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var c=Array.from(r),g=c[0],m=c[c.length-1];return t(g)+r+t(m,!1)}function n(r,i,e){for(var t=null,c=0;c<=r.length;){i.lastIndex=c;var g=i.exec(r);if(!g)break;var m=g.index+g[0].length;if(m>r.length-e)break;(!t||m>t.index+t[0].length)&&(t=g),c=g.index+1}return t}function o(r,i){var e=5e3,t={row:i,column:0},c=r.doc.positionToIndex(t),g=c+e,m=r.doc.indexToPosition(g),E=m.row;return E+1}v.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(p,v,fe){var M=this&&this.__extends||function(){var r=function(i,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,c){t.__proto__=c}||function(t,c){for(var g in c)Object.prototype.hasOwnProperty.call(c,g)&&(t[g]=c[g])},r(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),w=p("../lib/keys"),A=p("../lib/useragent"),a=w.KEY_MODS,u=function(){function r(i,e){this.$init(i,e,!1)}return r.prototype.$init=function(i,e,t){this.platform=e||(A.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=t},r.prototype.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},r.prototype.removeCommand=function(i,e){var t=i&&(typeof i=="string"?i:i.name);i=this.commands[t],e||delete this.commands[t];var c=this.commandKeyBinding;for(var g in c){var m=c[g];if(m==i)delete c[g];else if(Array.isArray(m)){var E=m.indexOf(i);E!=-1&&(m.splice(E,1),m.length==1&&(c[g]=m[0]))}}},r.prototype.bindKey=function(i,e,t){if(typeof i=="object"&&i&&(t==null&&(t=i.position),i=i[this.platform]),!!i){if(typeof e=="function")return this.addCommand({exec:e,bindKey:i,name:e.name||i});i.split("|").forEach(function(c){var g="";if(c.indexOf(" ")!=-1){var m=c.split(/\s+/);c=m.pop(),m.forEach(function(x){var b=this.parseKeys(x),de=a[b.hashId]+b.key;g+=(g?" ":"")+de,this._addCommandToBinding(g,"chainKeys")},this),g+=" "}var E=this.parseKeys(c),T=a[E.hashId]+E.key;this._addCommandToBinding(g+T,e,t)},this)}},r.prototype._addCommandToBinding=function(i,e,t){var c=this.commandKeyBinding,g;if(!e)delete c[i];else if(!c[i]||this.$singleCommand)c[i]=e;else{Array.isArray(c[i])?(g=c[i].indexOf(e))!=-1&&c[i].splice(g,1):c[i]=[c[i]],typeof t!="number"&&(t=n(e));var m=c[i];for(g=0;g<m.length;g++){var E=m[g],T=n(E);if(T>t)break}m.splice(g,0,e)}},r.prototype.addCommands=function(i){i&&Object.keys(i).forEach(function(e){var t=i[e];if(t){if(typeof t=="string")return this.bindKey(t,e);typeof t=="function"&&(t={exec:t}),typeof t=="object"&&(t.name||(t.name=e),this.addCommand(t))}},this)},r.prototype.removeCommands=function(i){Object.keys(i).forEach(function(e){this.removeCommand(i[e])},this)},r.prototype.bindKeys=function(i){Object.keys(i).forEach(function(e){this.bindKey(e,i[e])},this)},r.prototype._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},r.prototype.parseKeys=function(i){var e=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(T){return T}),t=e.pop(),c=w[t];if(w.FUNCTION_KEYS[c])t=w.FUNCTION_KEYS[c].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:t.toUpperCase(),hashId:-1}}else return{key:t,hashId:-1};for(var g=0,m=e.length;m--;){var E=w.KEY_MODS[e[m]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+e[m]+" in "+i),!1;g|=E}return{key:t,hashId:g}},r.prototype.findKeyCommand=function(i,e){var t=a[i]+e;return this.commandKeyBinding[t]},r.prototype.handleKeyboard=function(i,e,t,c){if(!(c<0)){var g=a[e]+t,m=this.commandKeyBinding[g];return i.$keyChain&&(i.$keyChain+=" "+g,m=this.commandKeyBinding[i.$keyChain]||m),m&&(m=="chainKeys"||m[m.length-1]=="chainKeys")?(i.$keyChain=i.$keyChain||g,{command:"null"}):(i.$keyChain&&((!e||e==4)&&t.length==1?i.$keyChain=i.$keyChain.slice(0,-g.length-1):(e==-1||c>0)&&(i.$keyChain="")),{command:m})}},r.prototype.getStatusText=function(i,e){return e.$keyChain||""},r}();function n(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var o=function(r){M(i,r);function i(e,t){var c=r.call(this,e,t)||this;return c.$singleCommand=!0,c}return i}(u);o.call=function(r,i,e){u.prototype.$init.call(r,i,e,!0)},u.call=function(r,i,e){u.prototype.$init.call(r,i,e,!1)},v.HashHandler=o,v.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(p,v,fe){var M=this&&this.__extends||function(){var n=function(o,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,e){i.__proto__=e}||function(i,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(o,r);function i(){this.constructor=o}o.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}(),w=p("../lib/oop"),A=p("../keyboard/hash_handler").MultiHashHandler,a=p("../lib/event_emitter").EventEmitter,u=function(n){M(o,n);function o(r,i){var e=n.call(this,i,r)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(t){return t.args?t.command.exec(t.editor,t.args,t.event,!1):t.command.exec(t.editor,{},t.event,!0)}),e}return o.prototype.exec=function(r,i,e){if(Array.isArray(r)){for(var t=r.length;t--;)if(this.exec(r[t],i,e))return!0;return!1}typeof r=="string"&&(r=this.commands[r]);var c={editor:i,command:r,args:e};return this.canExecute(r,i)?(c.returnValue=this._emit("exec",c),this._signal("afterExec",c),c.returnValue!==!1):(this._signal("commandUnavailable",c),!1)},o.prototype.canExecute=function(r,i){return typeof r=="string"&&(r=this.commands[r]),!(!r||i&&i.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(i))},o.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(i){this.macro.push([i.command,i.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(r){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(r);try{this.$inReplay=!0,this.macro.forEach(function(i){typeof i=="string"?this.exec(i,r):this.exec(i[0],r,i[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(r){return r.map(function(i){return typeof i[0]!="string"&&(i[0]=i[0].name),i[1]||(i=i[0]),i})},o}(A);w.implement(u.prototype,a),v.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(p,v,fe){var M=p("../lib/lang"),w=p("../config"),A=p("../range").Range;function a(n,o){return{win:n,mac:o}}v.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(n){w.loadModule("ace/ext/settings_menu",function(o){o.init(n),n.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(n){w.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(n,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(n){w.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(n,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(n){n.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(n){n.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(n,o){typeof o=="number"&&!isNaN(o)&&n.gotoLine(o),n.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(n){n.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll(),n.session.unfold(n.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(n){n.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(n){w.loadModule("ace/ext/searchbox",function(o){o.Search(n)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(n,o){n.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(n,o){n.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(n,o){n.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(n,o){n.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(n){n.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(n){n.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(n){n.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(n){n.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(n){n.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(n){},readOnly:!0},{name:"cut",description:"Cut",exec:function(n){var o=n.$copyWithEmptySelection&&n.selection.isEmpty(),r=o?n.selection.getLineRange():n.selection.getRange();n._emit("cut",r),r.isEmpty()||n.session.remove(r),n.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(n,o){n.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(n){n.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(n){w.loadModule("ace/ext/searchbox",function(o){o.Search(n,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(n){n.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(n){if(n.selection.isEmpty())n.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(n){n.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(n){var o=n.selection.getRange();o.start.column=0,n.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(n){var o=n.selection.getRange();o.end.column=Number.MAX_VALUE,n.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(n){n.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(n,o){n.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(n,o){n.insert(M.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(n){n.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(n){n.transposeLetters()},multiSelectAction:function(n){n.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(n){n.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var o=n.selection.getRange();o.start.column=o.end.column=0,o.end.row++,n.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(n){n.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(n){for(var o=n.selection.isBackwards(),r=o?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),i=o?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),e=n.session.doc.getLine(r.row).length,t=n.session.doc.getTextRange(n.selection.getRange()),c=t.replace(/\n\s*/," ").length,g=n.session.doc.getLine(r.row),m=r.row+1;m<=i.row+1;m++){var E=M.stringTrimLeft(M.stringTrimRight(n.session.doc.getLine(m)));E.length!==0&&(E=" "+E),g+=E}i.row+1<n.session.doc.getLength()-1&&(g+=n.session.doc.getNewLineCharacter()),n.clearSelection(),n.session.doc.replace(new A(r.row,0,i.row+2,0),g),c>0?(n.selection.moveCursorTo(r.row,r.column),n.selection.selectTo(r.row,r.column+c)):(e=n.session.doc.getLine(r.row).length>e?e+1:e,n.selection.moveCursorTo(r.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(n){var o=n.session.doc.getLength()-1,r=n.session.doc.getLine(o).length,i=n.selection.rangeList.ranges,e=[];i.length<1&&(i=[n.selection.getRange()]);for(var t=0;t<i.length;t++)t==i.length-1&&(i[t].end.row===o&&i[t].end.column===r||e.push(new A(i[t].end.row,i[t].end.column,o,r))),t===0?i[t].start.row===0&&i[t].start.column===0||e.push(new A(0,0,i[t].start.row,i[t].start.column)):e.push(new A(i[t-1].end.row,i[t-1].end.column,i[t].start.row,i[t].start.column));n.exitMultiSelectMode(),n.clearSelection();for(var t=0;t<e.length;t++)n.selection.addRange(e[t],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(n){n.selection.clearSelection(),n.navigateLineEnd(),n.insert(`
212
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(n){n.selection.clearSelection();var o=n.getCursorPosition();n.selection.moveTo(o.row-1,Number.MAX_VALUE),n.insert(`
213
+ `),o.row===0&&n.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(n){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),n.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(n){n.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(n){n.prompt({$type:"modes"})},readOnly:!0}];for(var u=1;u<9;u++)v.commands.push({name:"foldToLevel"+u,description:"Fold To Level "+u,level:u,exec:function(n){n.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(p,v,fe){var M=p("../lib/keys"),w=function(){function a(u){this.editor=u,this.gutterLayer=u.renderer.$gutterLayer,this.element=u.renderer.$gutter,this.lines=u.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return a.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))},a.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))},a.prototype.$onGutterKeyDown=function(u){if(this.annotationTooltip.isOpen){u.preventDefault(),u.keyCode===M.escape&&this.annotationTooltip.hide();return}if(u.target===this.element){if(u.keyCode!=M.enter)return;u.preventDefault();var n=this.editor.getCursorPosition().row;this.editor.isRowVisible(n)||this.editor.scrollToLine(n,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),r=this.$findNearestFoldLaneWidget(o),i=this.$findNearestAnnotation(o);if(!(r===null&&i===null)){var e=this.$findClosestNumber(r,i,o);if(e===r)if(this.activeLane="fold",this.activeRowIndex=r,this.$isCustomWidgetVisible(r)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=i,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(u),setTimeout((function(){this.editor._signal("gutterkeydown",new A(u,this))}).bind(this),10)},a.prototype.$handleGutterKeyboardInteraction=function(u){if(u.keyCode===M.tab){u.preventDefault();return}if(u.keyCode===M.escape){u.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(u.keyCode===M.up){switch(u.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(u.keyCode===M.down){switch(u.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(u.keyCode===M.left){u.preventDefault(),this.$switchLane("annotation");return}if(u.keyCode===M.right){u.preventDefault(),this.$switchLane("fold");return}if(u.keyCode===M.enter||u.keyCode===M.space){switch(u.preventDefault(),this.activeLane){case"fold":var n=this.$rowIndexToRow(this.activeRowIndex),o=this.editor.session.$gutterCustomWidgets[n];if(o)o.callbacks&&o.callbacks.onClick&&o.callbacks.onClick(u,n);else if(this.gutterLayer.session.foldWidgets[n]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),u),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==n&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(n),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},a.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},a.prototype.$isFoldWidgetVisible=function(u){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(u)),o=this.$getFoldWidget(u).style.display!=="none";return n&&o},a.prototype.$isCustomWidgetVisible=function(u){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(u)),o=!!this.$getCustomWidget(u);return n&&o},a.prototype.$isAnnotationVisible=function(u){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(u)),o=this.$getAnnotation(u).style.display!=="none";return n&&o},a.prototype.$getFoldWidget=function(u){var n=this.lines.get(u),o=n.element;return o.childNodes[1]},a.prototype.$getCustomWidget=function(u){var n=this.lines.get(u),o=n.element;return o.childNodes[3]},a.prototype.$getAnnotation=function(u){var n=this.lines.get(u),o=n.element;return o.childNodes[2]},a.prototype.$findNearestFoldLaneWidget=function(u){if(this.$isCustomWidgetVisible(u)||this.$isFoldWidgetVisible(u))return u;for(var n=0;u-n>0||u+n<this.lines.getLength()-1;){if(n++,u-n>=0&&this.$isCustomWidgetVisible(u-n))return u-n;if(u+n<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(u+n))return u+n;if(u-n>=0&&this.$isFoldWidgetVisible(u-n))return u-n;if(u+n<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(u+n))return u+n}return null},a.prototype.$findNearestAnnotation=function(u){if(this.$isAnnotationVisible(u))return u;for(var n=0;u-n>0||u+n<this.lines.getLength()-1;){if(n++,u-n>=0&&this.$isAnnotationVisible(u-n))return u-n;if(u+n<=this.lines.getLength()-1&&this.$isAnnotationVisible(u+n))return u+n}return null},a.prototype.$focusFoldWidget=function(u){if(u!=null){var n=this.$getFoldWidget(u);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},a.prototype.$focusCustomWidget=function(u){if(u!=null){var n=this.$getCustomWidget(u);n&&(n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus())}},a.prototype.$focusAnnotation=function(u){if(u!=null){var n=this.$getAnnotation(u);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},a.prototype.$blurFoldWidget=function(u){var n=this.$getFoldWidget(u);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},a.prototype.$blurCustomWidget=function(u){var n=this.$getCustomWidget(u);n&&(n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur())},a.prototype.$blurAnnotation=function(u){var n=this.$getAnnotation(u);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var u=this.activeRowIndex;u>0;)if(u--,this.$isFoldWidgetVisible(u)||this.$isCustomWidgetVisible(u)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=u,this.$isFoldWidgetVisible(u)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},a.prototype.$moveFoldWidgetDown=function(){for(var u=this.activeRowIndex;u<this.lines.getLength()-1;)if(u++,this.$isFoldWidgetVisible(u)||this.$isCustomWidgetVisible(u)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=u,this.$isFoldWidgetVisible(u)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},a.prototype.$moveAnnotationUp=function(){for(var u=this.activeRowIndex;u>0;)if(u--,this.$isAnnotationVisible(u)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$moveAnnotationDown=function(){for(var u=this.activeRowIndex;u<this.lines.getLength()-1;)if(u++,this.$isAnnotationVisible(u)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$findClosestNumber=function(u,n,o){return u===null?n:n===null||Math.abs(o-u)<=Math.abs(o-n)?u:n},a.prototype.$switchLane=function(u){switch(u){case"annotation":if(this.activeLane==="annotation")break;var n=this.$findNearestAnnotation(this.activeRowIndex);if(n==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=n,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var o=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(o===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$isCustomWidgetVisible(o)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},a.prototype.$rowIndexToRow=function(u){var n=this.lines.get(u);return n?n.row:null},a.prototype.$rowToRowIndex=function(u){for(var n=0;n<this.lines.getLength();n++){var o=this.lines.get(n);if(o.row==u)return n}return null},a}();v.GutterKeyboardHandler=w;var A=function(){function a(u,n){this.gutterKeyboardHandler=n,this.domEvent=u}return a.prototype.getKey=function(){return M.keyCodeToString(this.domEvent.keyCode)},a.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},a.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},a.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},a}();v.GutterKeyboardEvent=A}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(p,v,fe){var M=this&&this.__values||function(S){var y=typeof Symbol=="function"&&Symbol.iterator,I=y&&S[y],ke=0;if(I)return I.call(S);if(S&&typeof S.length=="number")return{next:function(){return S&&ke>=S.length&&(S=void 0),{value:S&&S[ke++],done:!S}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},w=p("./lib/oop"),A=p("./lib/dom"),a=p("./lib/lang"),u=p("./lib/useragent"),n=p("./keyboard/textinput").TextInput,o=p("./mouse/mouse_handler").MouseHandler,r=p("./mouse/fold_handler").FoldHandler,i=p("./keyboard/keybinding").KeyBinding,e=p("./edit_session").EditSession,t=p("./search").Search,c=p("./range").Range,g=p("./lib/event_emitter").EventEmitter,m=p("./commands/command_manager").CommandManager,E=p("./commands/default_commands").commands,T=p("./config"),x=p("./token_iterator").TokenIterator,b=p("./keyboard/gutter_handler").GutterKeyboardHandler,de=p("./config").nls,Te=p("./clipboard"),he=p("./lib/keys"),Y=p("./lib/event"),gt=p("./tooltip").HoverTooltip,V=function(){function S(y,I,ke){this.id="editor"+ ++S.$uid,this.session,this.$toDestroy=[];var Qe=y.getContainerElement();this.container=Qe,this.renderer=y,this.commands=new m(u.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new n(y.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new r(this)),this.keyBinding=new i(this),this.$search=new t().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(Je,mt){mt._$emitInputEvent.schedule(31)}),this.setSession(I||ke&&ke.session||new e("")),T.resetOptions(this),ke&&this.setOptions(ke),T._signal("editor",this)}return S.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},S.prototype.startOperation=function(y){this.session.startOperation(y)},S.prototype.endOperation=function(y){this.session.endOperation(y)},S.prototype.onStartOperation=function(y){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,y||(this.previousCommand=null)},S.prototype.onEndOperation=function(y){if(this.curOp&&this.session){if(y&&y.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var I=this.curOp.command,ke=I&&I.scrollIntoView;if(ke){switch(ke){case"center-animate":ke="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var Qe=this.selection.getRange(),Je=this.renderer.layerConfig;(Qe.start.row>=Je.lastRow||Qe.end.row<=Je.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}ke=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},S.prototype.$historyTracker=function(y){if(this.$mergeUndoDeltas){var I=this.prevOp,ke=this.$mergeableCommands,Qe=I.command&&y.command.name==I.command.name;if(y.command.name=="insertstring"){var Je=y.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),Qe=Qe&&this.mergeNextCommand&&(!/\s/.test(Je)||/\s/.test(I.args)),this.mergeNextCommand=!0}else Qe=Qe&&ke.indexOf(y.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(Qe=!1),Qe?this.session.mergeUndoDeltas=!0:ke.indexOf(y.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},S.prototype.setKeyboardHandler=function(y,I){if(y&&typeof y=="string"&&y!="ace"){this.$keybindingId=y;var ke=this;T.loadModule(["keybinding",y],function(Qe){ke.$keybindingId==y&&ke.keyBinding.setKeyboardHandler(Qe&&Qe.handler),I&&I()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(y),I&&I()},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(y){if(this.session!=y){this.curOp&&this.endOperation(),this.curOp={};var I=this.session;if(I){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 ke=this.session.getSelection();ke.off("changeCursor",this.$onCursorChange),ke.off("changeSelection",this.$onSelectionChange)}this.session=y,y?(this.$onDocumentChange=this.onDocumentChange.bind(this),y.on("change",this.$onDocumentChange),this.renderer.setSession(y),this.$onChangeMode=this.onChangeMode.bind(this),y.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),y.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),y.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),y.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),y.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),y.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=y.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(y)),this._signal("changeSession",{session:y,oldSession:I}),this.curOp=null,I&&I._signal("changeEditor",{oldEditor:this}),I&&(I.$editor=null),y&&y._signal("changeEditor",{editor:this}),y&&(y.$editor=this),y&&!y.destroyed&&y.bgTokenizer.scheduleStart()}},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(y,I){return this.session.doc.setValue(y),I?I==1?this.navigateFileEnd():I==-1&&this.navigateFileStart():this.selectAll(),y},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(y){this.renderer.onResize(y)},S.prototype.setTheme=function(y,I){this.renderer.setTheme(y,I)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(y,I){this.renderer.setStyle(y,I)},S.prototype.unsetStyle=function(y){this.renderer.unsetStyle(y)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||A.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(y){this.setOption("fontSize",y)},S.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var y=this;this.$highlightPending=!0,setTimeout(function(){y.$highlightPending=!1;var I=y.session;if(!(!I||I.destroyed)){I.$bracketHighlight&&(I.$bracketHighlight.markerIds.forEach(function(Yt){I.removeMarker(Yt)}),I.$bracketHighlight=null);var ke=y.getCursorPosition(),Qe=y.getKeyboardHandler(),Je=Qe&&Qe.$getDirectionForHighlight&&Qe.$getDirectionForHighlight(y),mt=I.getMatchingBracketRanges(ke,Je);if(!mt){var yt=new x(I,ke.row,ke.column),Qt=yt.getCurrentToken();if(Qt&&/\b(?:tag-open|tag-name)/.test(Qt.type)){var bt=I.getMatchingTags(ke);bt&&(mt=[bt.openTagName.isEmpty()?bt.openTag:bt.openTagName,bt.closeTagName.isEmpty()?bt.closeTag:bt.closeTagName])}}if(!mt&&I.$mode.getMatching&&(mt=I.$mode.getMatching(y.session)),!mt){y.getHighlightIndentGuides()&&y.renderer.$textLayer.$highlightIndentGuide();return}var Gt="ace_bracket";Array.isArray(mt)?mt.length==1&&(Gt="ace_error_bracket"):mt=[mt],mt.length==2&&(c.comparePoints(mt[0].end,mt[1].start)==0?mt=[c.fromPoints(mt[0].start,mt[1].end)]:c.comparePoints(mt[0].start,mt[1].end)==0&&(mt=[c.fromPoints(mt[1].start,mt[0].end)])),I.$bracketHighlight={ranges:mt,markerIds:mt.map(function(Yt){return I.addMarker(Yt,Gt,"text")})},y.getHighlightIndentGuides()&&y.renderer.$textLayer.$highlightIndentGuide()}},50)}},S.prototype.focus=function(){this.textInput.focus()},S.prototype.isFocused=function(){return this.textInput.isFocused()},S.prototype.blur=function(){this.textInput.blur()},S.prototype.onFocus=function(y){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",y))},S.prototype.onBlur=function(y){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",y))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(y){var I=this.session.$useWrapMode,ke=y.start.row==y.end.row?y.end.row:1/0;this.renderer.updateLines(y.start.row,ke,I),this._signal("change",y),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(y){var I=y.data;this.renderer.updateLines(I.first,I.last)},S.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},S.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},S.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},S.prototype.$updateHighlightActiveLine=function(){var y=this.getSession(),I;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(I=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(I=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(I=!1)),y.$highlightLineMarker&&!I)y.removeMarker(y.$highlightLineMarker.id),y.$highlightLineMarker=null;else if(!y.$highlightLineMarker&&I){var ke=new c(I.row,I.column,I.row,1/0);ke.id=y.addMarker(ke,"ace_active-line","screenLine"),y.$highlightLineMarker=ke}else I&&(y.$highlightLineMarker.start.row=I.row,y.$highlightLineMarker.end.row=I.row,y.$highlightLineMarker.start.column=I.column,y._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(y){var I=this.session;if(I.$selectionMarker&&I.removeMarker(I.$selectionMarker),I.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var ke=this.selection.getRange(),Qe=this.getSelectionStyle();I.$selectionMarker=I.addMarker(ke,"ace_selection",Qe)}var Je=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(Je),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var y=this.session,I=this.getSelectionRange();if(!(I.isEmpty()||I.isMultiLine())){var ke=I.start.column,Qe=I.end.column,Je=y.getLine(I.start.row),mt=Je.substring(ke,Qe);if(!(mt.length>5e3||!/[\w\d]/.test(mt))){var yt=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:mt}),Qt=Je.substring(ke-1,Qe+1);if(yt.test(Qt))return yt}}},S.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},S.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},S.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},S.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},S.prototype.onChangeMode=function(y){this.renderer.updateText(),this._emit("changeMode",y)},S.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},S.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},S.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},S.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},S.prototype.getCopyText=function(){var y=this.getSelectedText(),I=this.session.doc.getNewLineCharacter(),ke=!1;if(!y&&this.$copyWithEmptySelection){ke=!0;for(var Qe=this.selection.getAllRanges(),Je=0;Je<Qe.length;Je++){var mt=Qe[Je];Je&&Qe[Je-1].start.row==mt.start.row||(y+=this.session.getLine(mt.start.row)+I)}}var yt={text:y};return this._signal("copy",yt),Te.lineMode=ke?yt.text:!1,yt.text},S.prototype.onCopy=function(){this.commands.exec("copy",this)},S.prototype.onCut=function(){this.commands.exec("cut",this)},S.prototype.onPaste=function(y,I){var ke={text:y,event:I};this.commands.exec("paste",this,ke)},S.prototype.$handlePaste=function(y){typeof y=="string"&&(y={text:y}),this._signal("paste",y);var I=y.text,ke=I===Te.lineMode,Qe=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)ke?Qe.insert({row:this.selection.lead.row,column:0},I):this.insert(I);else if(ke)this.selection.rangeList.ranges.forEach(function(Gt){Qe.insert({row:Gt.start.row,column:0},I)});else{var Je=I.split(/\r\n|\r|\n/),mt=this.selection.rangeList.ranges,yt=Je.length==2&&(!Je[0]||!Je[1]);if(Je.length!=mt.length||yt)return this.commands.exec("insertstring",this,I);for(var Qt=mt.length;Qt--;){var bt=mt[Qt];bt.isEmpty()||Qe.remove(bt),Qe.insert(bt.start,Je[Qt])}}},S.prototype.execCommand=function(y,I){return this.commands.exec(y,this,I)},S.prototype.insert=function(y,I){var ke=this.session,Qe=ke.getMode(),Je=this.getCursorPosition();if(this.getBehavioursEnabled()&&!I){var mt=Qe.transformAction(ke.getState(Je.row),"insertion",this,ke,y);mt&&(y!==mt.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),y=mt.text)}if(y==" "&&(y=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&y.indexOf(`
214
+ `)==-1){var yt=c.fromPoints(Je,Je);yt.end.column+=y.length,this.session.remove(yt)}}else{var yt=this.getSelectionRange();Je=this.session.remove(yt),this.clearSelection()}if(y==`
215
+ `||y==`\r
216
+ `){var Yt=ke.getLine(Je.row);if(Je.column>Yt.search(/\S|$/)){var Qt=Yt.substr(Je.column).search(/\S|$/);ke.doc.removeInLine(Je.row,Je.column,Je.column+Qt)}}this.clearSelection();var bt=Je.column,Gt=ke.getState(Je.row),Yt=ke.getLine(Je.row),Zt=Qe.checkOutdent(Gt,Yt,y);if(ke.insert(Je,y),mt&&mt.selection&&(mt.selection.length==2?this.selection.setSelectionRange(new c(Je.row,bt+mt.selection[0],Je.row,bt+mt.selection[1])):this.selection.setSelectionRange(new c(Je.row+mt.selection[0],mt.selection[1],Je.row+mt.selection[2],mt.selection[3]))),this.$enableAutoIndent){if(ke.getDocument().isNewLine(y)){var Jt=Qe.getNextLineIndent(Gt,Yt.slice(0,Je.column),ke.getTabString());ke.insert({row:Je.row+1,column:0},Jt)}Zt&&Qe.autoOutdent(Gt,ke,Je.row)}},S.prototype.autoIndent=function(){for(var y=this.session,I=y.getMode(),ke=this.selection.isEmpty()?[new c(0,0,y.doc.getLength()-1,0)]:this.selection.getAllRanges(),Qe="",Je="",mt="",yt=y.getTabString(),Qt=0;Qt<ke.length;Qt++)for(var bt=ke[Qt].start.row,Gt=ke[Qt].end.row,Yt=bt;Yt<=Gt;Yt++){Yt>0&&(Qe=y.getState(Yt-1),Je=y.getLine(Yt-1),mt=I.getNextLineIndent(Qe,Je,yt));var Zt=y.getLine(Yt),Jt=I.$getIndent(Zt);if(mt!==Jt){if(Jt.length>0){var pi=new c(Yt,0,Yt,Jt.length);y.remove(pi)}mt.length>0&&y.insert({row:Yt,column:0},mt)}I.autoOutdent(Qe,y,Yt)}},S.prototype.onTextInput=function(y,I){if(!I)return this.keyBinding.onTextInput(y);this.startOperation({command:{name:"insertstring"}});var ke=this.applyComposition.bind(this,y,I);this.selection.rangeCount?this.forEachSelection(ke):ke(),this.endOperation()},S.prototype.applyComposition=function(y,I){if(I.extendLeft||I.extendRight){var ke=this.selection.getRange();ke.start.column-=I.extendLeft,ke.end.column+=I.extendRight,ke.start.column<0&&(ke.start.row--,ke.start.column+=this.session.getLine(ke.start.row).length+1),this.selection.setRange(ke),!y&&!ke.isEmpty()&&this.remove()}if((y||!this.selection.isEmpty())&&this.insert(y,!0),I.restoreStart||I.restoreEnd){var ke=this.selection.getRange();ke.start.column-=I.restoreStart,ke.end.column-=I.restoreEnd,this.selection.setRange(ke)}},S.prototype.onCommandKey=function(y,I,ke){return this.keyBinding.onCommandKey(y,I,ke)},S.prototype.setOverwrite=function(y){this.session.setOverwrite(y)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(y){this.setOption("scrollSpeed",y)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(y){this.setOption("dragDelay",y)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(y){this.setOption("selectionStyle",y)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(y){this.setOption("highlightActiveLine",y)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(y){this.setOption("highlightGutterLine",y)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(y){this.setOption("highlightSelectedWord",y)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(y){this.renderer.setAnimatedScroll(y)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(y){this.renderer.setShowInvisibles(y)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(y){this.renderer.setDisplayIndentGuides(y)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(y){this.renderer.setHighlightIndentGuides(y)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(y){this.renderer.setShowPrintMargin(y)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(y){this.renderer.setPrintMarginColumn(y)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(y){this.setOption("readOnly",y)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(y){this.setOption("behavioursEnabled",y)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(y){this.setOption("wrapBehavioursEnabled",y)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(y){this.setOption("showFoldWidgets",y)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(y){this.setOption("fadeFoldWidgets",y)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(y){this.selection.isEmpty()&&(y=="left"?this.selection.selectLeft():this.selection.selectRight());var I=this.getSelectionRange();if(this.getBehavioursEnabled()){var ke=this.session,Qe=ke.getState(I.start.row),Je=ke.getMode().transformAction(Qe,"deletion",this,ke,I);if(I.end.column===0){var mt=ke.getTextRange(I);if(mt[mt.length-1]==`
217
+ `){var yt=ke.getLine(I.end.row);/^\s+$/.test(yt)&&(I.end.column=yt.length)}}Je&&(I=Je)}this.session.remove(I),this.clearSelection()},S.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var y=this.getSelectionRange();y.start.column==y.end.column&&y.start.row==y.end.row&&(y.end.column=0,y.end.row++),this.session.remove(y),this.clearSelection()},S.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var y=this.getCursorPosition();this.insert(`
218
+ `),this.moveCursorToPosition(y)},S.prototype.setGhostText=function(y,I){this.renderer.setGhostText(y,I)},S.prototype.removeGhostText=function(){this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var y=this.getCursorPosition(),I=y.column;if(I!==0){var ke=this.session.getLine(y.row),Qe,Je;I<ke.length?(Qe=ke.charAt(I)+ke.charAt(I-1),Je=new c(y.row,I-1,y.row,I+1)):(Qe=ke.charAt(I-1)+ke.charAt(I-2),Je=new c(y.row,I-2,y.row,I)),this.session.replace(Je,Qe),this.session.selection.moveToPosition(Je.end)}}},S.prototype.toLowerCase=function(){var y=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var I=this.getSelectionRange(),ke=this.session.getTextRange(I);this.session.replace(I,ke.toLowerCase()),this.selection.setSelectionRange(y)},S.prototype.toUpperCase=function(){var y=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var I=this.getSelectionRange(),ke=this.session.getTextRange(I);this.session.replace(I,ke.toUpperCase()),this.selection.setSelectionRange(y)},S.prototype.indent=function(){var y=this.session,I=this.getSelectionRange();if(I.start.row<I.end.row){var ke=this.$getSelectedRows();y.indentRows(ke.first,ke.last," ");return}else if(I.start.column<I.end.column){var Qe=y.getTextRange(I);if(!/^\s+$/.test(Qe)){var ke=this.$getSelectedRows();y.indentRows(ke.first,ke.last," ");return}}var Je=y.getLine(I.start.row),mt=I.start,yt=y.getTabSize(),Qt=y.documentToScreenColumn(mt.row,mt.column);if(this.session.getUseSoftTabs())var bt=yt-Qt%yt,Gt=a.stringRepeat(" ",bt);else{for(var bt=Qt%yt;Je[I.start.column-1]==" "&&bt;)I.start.column--,bt--;this.selection.setSelectionRange(I),Gt=" "}return this.insert(Gt)},S.prototype.blockIndent=function(){var y=this.$getSelectedRows();this.session.indentRows(y.first,y.last," ")},S.prototype.blockOutdent=function(){var y=this.session.getSelection();this.session.outdentRows(y.getRange())},S.prototype.sortLines=function(){for(var y=this.$getSelectedRows(),I=this.session,ke=[],Qe=y.first;Qe<=y.last;Qe++)ke.push(I.getLine(Qe));ke.sort(function(yt,Qt){return yt.toLowerCase()<Qt.toLowerCase()?-1:yt.toLowerCase()>Qt.toLowerCase()?1:0});for(var Je=new c(0,0,0,0),Qe=y.first;Qe<=y.last;Qe++){var mt=I.getLine(Qe);Je.start.row=Qe,Je.end.row=Qe,Je.end.column=mt.length,I.replace(Je,ke[Qe-y.first])}},S.prototype.toggleCommentLines=function(){var y=this.session.getState(this.getCursorPosition().row),I=this.$getSelectedRows();this.session.getMode().toggleCommentLines(y,this.session,I.first,I.last)},S.prototype.toggleBlockComment=function(){var y=this.getCursorPosition(),I=this.session.getState(y.row),ke=this.getSelectionRange();this.session.getMode().toggleBlockComment(I,this.session,ke,y)},S.prototype.getNumberAt=function(y,I){var ke=/[\-]?[0-9]+(?:\.[0-9]+)?/g;ke.lastIndex=0;for(var Qe=this.session.getLine(y);ke.lastIndex<I;){var Je=ke.exec(Qe);if(Je.index<=I&&Je.index+Je[0].length>=I){var mt={value:Je[0],start:Je.index,end:Je.index+Je[0].length};return mt}}return null},S.prototype.modifyNumber=function(y){var I=this.selection.getCursor().row,ke=this.selection.getCursor().column,Qe=new c(I,ke-1,I,ke),Je=this.session.getTextRange(Qe);if(!isNaN(parseFloat(Je))&&isFinite(Je)){var mt=this.getNumberAt(I,ke);if(mt){var yt=mt.value.indexOf(".")>=0?mt.start+mt.value.indexOf(".")+1:mt.end,Qt=mt.start+mt.value.length-yt,bt=parseFloat(mt.value);bt*=Math.pow(10,Qt),yt!==mt.end&&ke<yt?y*=Math.pow(10,mt.end-ke-1):y*=Math.pow(10,mt.end-ke),bt+=y,bt/=Math.pow(10,Qt);var Gt=bt.toFixed(Qt),Yt=new c(I,mt.start,I,mt.end);this.session.replace(Yt,Gt),this.moveCursorTo(I,Math.max(mt.start+1,ke+Gt.length-mt.value.length))}}else this.toggleWord()},S.prototype.toggleWord=function(){var y=this.selection.getCursor().row,I=this.selection.getCursor().column;this.selection.selectWord();var ke=this.getSelectedText(),Qe=this.selection.getWordRange().start.column,Je=ke.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),mt=I-Qe-1;mt<0&&(mt=0);var yt=0,Qt=0,bt=this;ke.match(/[A-Za-z0-9_]+/)&&Je.forEach(function(wi,Ci){Qt=yt+wi.length,mt>=yt&&mt<=Qt&&(ke=wi,bt.selection.clearSelection(),bt.moveCursorTo(y,yt+Qe),bt.selection.selectTo(y,Qt+Qe)),yt=Qt});for(var Gt=this.$toggleWordPairs,Yt,Zt=0;Zt<Gt.length;Zt++)for(var Jt=Gt[Zt],pi=0;pi<=1;pi++){var mi=+!pi,gi=ke.match(new RegExp("^\\s?_?("+a.escapeRegExp(Jt[pi])+")\\s?$","i"));if(gi){var vi=ke.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(gi[1])+")($|\\s)","g"));vi&&(Yt=ke.replace(new RegExp(a.escapeRegExp(Jt[pi]),"i"),function(wi){var Ci=Jt[mi];return wi.toUpperCase()==wi?Ci=Ci.toUpperCase():wi.charAt(0).toUpperCase()==wi.charAt(0)&&(Ci=Ci.substr(0,0)+Jt[mi].charAt(0).toUpperCase()+Ci.substr(1)),Ci}),this.insert(Yt),Yt="")}}},S.prototype.findLinkAt=function(y,I){var ke,Qe,Je=this.session.getLine(y),mt=Je.split(/((?:https?|ftp):\/\/[\S]+)/),yt=I;yt<0&&(yt=0);var Qt=0,bt=0,Gt;try{for(var Yt=M(mt),Zt=Yt.next();!Zt.done;Zt=Yt.next()){var Jt=Zt.value;if(bt=Qt+Jt.length,yt>=Qt&&yt<=bt&&Jt.match(/((?:https?|ftp):\/\/[\S]+)/)){Gt=Jt.replace(/[\s:.,'";}\]]+$/,"");break}Qt=bt}}catch(pi){ke={error:pi}}finally{try{Zt&&!Zt.done&&(Qe=Yt.return)&&Qe.call(Yt)}finally{if(ke)throw ke.error}}return Gt},S.prototype.openLink=function(){var y=this.selection.getCursor(),I=this.findLinkAt(y.row,y.column);return I&&window.open(I,"_blank"),I!=null},S.prototype.removeLines=function(){var y=this.$getSelectedRows();this.session.removeFullLines(y.first,y.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var y=this.selection,I=this.session,ke=y.getRange(),Qe=y.isBackwards();if(ke.isEmpty()){var Je=ke.start.row;I.duplicateLines(Je,Je)}else{var mt=Qe?ke.start:ke.end,yt=I.insert(mt,I.getTextRange(ke));ke.start=mt,ke.end=yt,y.setSelectionRange(ke,Qe)}},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(y,I,ke){return this.session.moveText(y,I,ke)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(y,I){var ke,Qe,Je=this.selection;if(!Je.inMultiSelectMode||this.inVirtualSelectionMode){var mt=Je.toOrientedRange();ke=this.$getSelectedRows(mt),Qe=this.session.$moveLines(ke.first,ke.last,I?0:y),I&&y==-1&&(Qe=0),mt.moveBy(Qe,0),Je.fromOrientedRange(mt)}else{var yt=Je.rangeList.ranges;Je.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var Qt=0,bt=0,Gt=yt.length,Yt=0;Yt<Gt;Yt++){var Zt=Yt;yt[Yt].moveBy(Qt,0),ke=this.$getSelectedRows(yt[Yt]);for(var Jt=ke.first,pi=ke.last;++Yt<Gt;){bt&&yt[Yt].moveBy(bt,0);var mi=this.$getSelectedRows(yt[Yt]);if(I&&mi.first!=pi)break;if(!I&&mi.first>pi+1)break;pi=mi.last}for(Yt--,Qt=this.session.$moveLines(Jt,pi,I?0:y),I&&y==-1&&(Zt=Yt+1);Zt<=Yt;)yt[Zt].moveBy(Qt,0),Zt++;I||(Qt=0),bt+=Qt}Je.fromOrientedRange(Je.ranges[0]),Je.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(y){return y=(y||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(y.start.row),last:this.session.getRowFoldEnd(y.end.row)}},S.prototype.onCompositionStart=function(y){this.renderer.showComposition(y)},S.prototype.onCompositionUpdate=function(y){this.renderer.setCompositionText(y)},S.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},S.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},S.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},S.prototype.isRowVisible=function(y){return y>=this.getFirstVisibleRow()&&y<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(y){return y>=this.renderer.getFirstFullyVisibleRow()&&y<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(y,I){var ke=this.renderer,Qe=this.renderer.layerConfig,Je=y*Math.floor(Qe.height/Qe.lineHeight);I===!0?this.selection.$moveSelection(function(){this.moveCursorBy(Je,0)}):I===!1&&(this.selection.moveCursorBy(Je,0),this.selection.clearSelection());var mt=ke.scrollTop;ke.scrollBy(0,Je*Qe.lineHeight),I!=null&&ke.scrollCursorIntoView(null,.5),ke.animateScrolling(mt)},S.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},S.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},S.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},S.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},S.prototype.scrollPageDown=function(){this.$moveByPage(1)},S.prototype.scrollPageUp=function(){this.$moveByPage(-1)},S.prototype.scrollToRow=function(y){this.renderer.scrollToRow(y)},S.prototype.scrollToLine=function(y,I,ke,Qe){this.renderer.scrollToLine(y,I,ke,Qe)},S.prototype.centerSelection=function(){var y=this.getSelectionRange(),I={row:Math.floor(y.start.row+(y.end.row-y.start.row)/2),column:Math.floor(y.start.column+(y.end.column-y.start.column)/2)};this.renderer.alignCursor(I,.5)},S.prototype.getCursorPosition=function(){return this.selection.getCursor()},S.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},S.prototype.getSelectionRange=function(){return this.selection.getRange()},S.prototype.selectAll=function(){this.selection.selectAll()},S.prototype.clearSelection=function(){this.selection.clearSelection()},S.prototype.moveCursorTo=function(y,I){this.selection.moveCursorTo(y,I)},S.prototype.moveCursorToPosition=function(y){this.selection.moveCursorToPosition(y)},S.prototype.jumpToMatching=function(y,I){var ke=this.getCursorPosition(),Qe=new x(this.session,ke.row,ke.column),Je=Qe.getCurrentToken(),mt=0;Je&&Je.type.indexOf("tag-name")!==-1&&(Je=Qe.stepBackward());var yt=Je||Qe.stepForward();if(yt){var Qt,bt=!1,Gt={},Yt=ke.column-yt.start,Zt,Jt={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(yt.value.match(/[{}()\[\]]/g)){for(;Yt<yt.value.length&&!bt;Yt++)if(Jt[yt.value[Yt]])switch(Zt=Jt[yt.value[Yt]]+"."+yt.type.replace("rparen","lparen"),isNaN(Gt[Zt])&&(Gt[Zt]=0),yt.value[Yt]){case"(":case"[":case"{":Gt[Zt]++;break;case")":case"]":case"}":Gt[Zt]--,Gt[Zt]===-1&&(Qt="bracket",bt=!0);break}}else yt.type.indexOf("tag-name")!==-1&&(isNaN(Gt[yt.value])&&(Gt[yt.value]=0),Je.value==="<"&&mt>1?Gt[yt.value]++:Je.value==="</"&&Gt[yt.value]--,Gt[yt.value]===-1&&(Qt="tag",bt=!0));bt||(Je=yt,mt++,yt=Qe.stepForward(),Yt=0)}while(yt&&!bt);if(Qt){var pi,mi;if(Qt==="bracket")pi=this.session.getBracketRange(ke),pi||(pi=new c(Qe.getCurrentTokenRow(),Qe.getCurrentTokenColumn()+Yt-1,Qe.getCurrentTokenRow(),Qe.getCurrentTokenColumn()+Yt-1),mi=pi.start,(I||mi.row===ke.row&&Math.abs(mi.column-ke.column)<2)&&(pi=this.session.getBracketRange(mi)));else if(Qt==="tag"){if(!yt||yt.type.indexOf("tag-name")===-1)return;if(pi=new c(Qe.getCurrentTokenRow(),Qe.getCurrentTokenColumn()-2,Qe.getCurrentTokenRow(),Qe.getCurrentTokenColumn()-2),pi.compare(ke.row,ke.column)===0){var gi=this.session.getMatchingTags(ke);gi&&(gi.openTag.contains(ke.row,ke.column)?(pi=gi.closeTag,mi=pi.start):(pi=gi.openTag,gi.closeTag.start.row===ke.row&&gi.closeTag.start.column===ke.column?mi=pi.end:mi=pi.start))}mi=mi||pi.start}mi=pi&&pi.cursor||mi,mi&&(y?pi&&I?this.selection.setRange(pi):pi&&pi.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(mi.row,mi.column):this.selection.moveTo(mi.row,mi.column))}}},S.prototype.gotoLine=function(y,I,ke){this.selection.clearSelection(),this.session.unfold({row:y-1,column:I||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(y-1,I||0),this.isRowFullyVisible(y-1)||this.scrollToLine(y-1,!0,ke)},S.prototype.navigateTo=function(y,I){this.selection.moveTo(y,I)},S.prototype.navigateUp=function(y){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var I=this.selection.anchor.getPosition();return this.moveCursorToPosition(I)}this.selection.clearSelection(),this.selection.moveCursorBy(-y||-1,0)},S.prototype.navigateDown=function(y){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var I=this.selection.anchor.getPosition();return this.moveCursorToPosition(I)}this.selection.clearSelection(),this.selection.moveCursorBy(y||1,0)},S.prototype.navigateLeft=function(y){if(this.selection.isEmpty())for(y=y||1;y--;)this.selection.moveCursorLeft();else{var I=this.getSelectionRange().start;this.moveCursorToPosition(I)}this.clearSelection()},S.prototype.navigateRight=function(y){if(this.selection.isEmpty())for(y=y||1;y--;)this.selection.moveCursorRight();else{var I=this.getSelectionRange().end;this.moveCursorToPosition(I)}this.clearSelection()},S.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},S.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},S.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},S.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},S.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},S.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},S.prototype.replace=function(y,I){I&&this.$search.set(I);var ke=this.$search.find(this.session),Qe=0;return ke&&(this.$tryReplace(ke,y)&&(Qe=1),this.selection.setSelectionRange(ke),this.renderer.scrollSelectionIntoView(ke.start,ke.end)),Qe},S.prototype.replaceAll=function(y,I){I&&this.$search.set(I);var ke=this.$search.findAll(this.session),Qe=0;if(!ke.length)return Qe;var Je=this.getSelectionRange();this.selection.moveTo(0,0);for(var mt=ke.length-1;mt>=0;--mt)this.$tryReplace(ke[mt],y)&&Qe++;return this.selection.setSelectionRange(Je),Qe},S.prototype.$tryReplace=function(y,I){var ke=this.session.getTextRange(y);return I=this.$search.replace(ke,I),I!==null?(y.end=this.session.replace(y,I),y):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(y,I,ke){I||(I={}),typeof y=="string"||y instanceof RegExp?I.needle=y:typeof y=="object"&&w.mixin(I,y);var Qe=this.selection.getRange();I.needle==null&&(y=this.session.getTextRange(Qe)||this.$search.$options.needle,y||(Qe=this.session.getWordRange(Qe.start.row,Qe.start.column),y=this.session.getTextRange(Qe)),this.$search.set({needle:y})),this.$search.set(I),I.start||this.$search.set({start:Qe});var Je=this.$search.find(this.session);if(I.preventScroll)return Je;if(Je)return this.revealRange(Je,ke),Je;I.backwards?Qe.start=Qe.end:Qe.end=Qe.start,this.selection.setRange(Qe)},S.prototype.findNext=function(y,I){this.find({skipCurrent:!0,backwards:!1},y,I)},S.prototype.findPrevious=function(y,I){this.find(y,{skipCurrent:!0,backwards:!0},I)},S.prototype.revealRange=function(y,I){this.session.unfold(y),this.selection.setSelectionRange(y);var ke=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(y.start,y.end,.5),I!==!1&&this.renderer.animateScrolling(ke)},S.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(y){y.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},S.prototype.setAutoScrollEditorIntoView=function(y){if(y){var I,ke=this,Qe=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var Je=this.$scrollAnchor;Je.style.cssText="position:absolute",this.container.insertBefore(Je,this.container.firstChild);var mt=this.on("changeSelection",function(){Qe=!0}),yt=this.renderer.on("beforeRender",function(){Qe&&(I=ke.renderer.container.getBoundingClientRect())}),Qt=this.renderer.on("afterRender",function(){if(Qe&&I&&(ke.isFocused()||ke.searchBox&&ke.searchBox.isFocused())){var bt=ke.renderer,Gt=bt.$cursorLayer.$pixelPos,Yt=bt.layerConfig,Zt=Gt.top-Yt.offset;Gt.top>=0&&Zt+I.top<0?Qe=!0:Gt.top<Yt.height&&Gt.top+I.top+Yt.lineHeight>window.innerHeight?Qe=!1:Qe=null,Qe!=null&&(Je.style.top=Zt+"px",Je.style.left=Gt.left+"px",Je.style.height=Yt.lineHeight+"px",Je.scrollIntoView(Qe)),Qe=I=null}});this.setAutoScrollEditorIntoView=function(bt){bt||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",mt),this.renderer.off("afterRender",Qt),this.renderer.off("beforeRender",yt))}}},S.prototype.$resetCursorStyle=function(){var y=this.$cursorStyle||"ace",I=this.renderer.$cursorLayer;I&&(I.setSmoothBlinking(/smooth/.test(y)),I.isBlinking=!this.$readOnly&&y!="wide",A.setCssClass(I.element,"ace_slim-cursors",/slim/.test(y)))},S.prototype.prompt=function(y,I,ke){var Qe=this;T.loadModule("ace/ext/prompt",function(Je){Je.prompt(Qe,y,I,ke)})},S}();V.$uid=0,V.prototype.curOp=null,V.prototype.prevOp={},V.prototype.$mergeableCommands=["backspace","del","insertstring"],V.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"],["&&","||"],["==","!="]],w.implement(V.prototype,g),T.defineOptions(V.prototype,"editor",{selectionStyle:{set:function(S){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:S})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(S){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(S){var y=this;if(this.textInput.setReadOnly(S),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(ke){var Qe=!1;if(ke&&ke.type=="keydown"){if(ke&&ke.key&&!ke.ctrlKey&&!ke.metaKey&&(ke.key==" "&&ke.preventDefault(),Qe=ke.key.length==1),!Qe)return}else ke&&ke.type!=="exec"&&(Qe=!0);if(Qe){y.hoverTooltip||(y.hoverTooltip=new gt);var Je=A.createElement("div");Je.textContent=de("editor.tooltip.disable-editing","Editing is disabled"),y.hoverTooltip.isOpen||y.hoverTooltip.showForRange(y,y.getSelectionRange(),Je)}else y.hoverTooltip&&y.hoverTooltip.isOpen&&y.hoverTooltip.hide()});var I=this.textInput.getElement();S?(Y.addListener(I,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(Y.removeListener(I,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(S){this.textInput.setCopyWithEmptySelection(S)},initialValue:!1},cursorStyle:{set:function(S){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(S){this.setAutoScrollEditorIntoView(S)}},keyboardHandler:{set:function(S){this.setKeyboardHandler(S)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(S){this.session.setValue(S)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(S){this.setSession(S)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(S){this.renderer.$gutterLayer.setShowLineNumbers(S),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),S&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(S){this.$showLineNumbers&&S?O.attach(this):O.detach(this)}},placeholder:{set:function(S){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var y=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(y&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),A.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!y&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),A.addCssClass(this.container,"ace_hasPlaceholder");var I=A.createElement("div");I.className="ace_placeholder",I.textContent=this.$placeholder||"",this.renderer.placeholderNode=I,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!y&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(S){var y={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(Qe){Qe.blur(),Qe.renderer.scroller.focus()},readOnly:!0},I=function(Qe){if(Qe.target==this.renderer.scroller&&Qe.keyCode===he.enter){Qe.preventDefault();var Je=this.getCursorPosition().row;this.isRowVisible(Je)||this.scrollToLine(Je,!0,!0),this.focus()}},ke;S?(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",de("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",de("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",I.bind(this)),this.commands.addCommand(y),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",de("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",de("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),ke||(ke=new b(this)),ke.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",I.bind(this)),this.commands.removeCommand(y),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),ke&&ke.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(S){this.$textInputAriaLabel=S},initialValue:""},enableMobileMenu:{set:function(S){this.$enableMobileMenu=S},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",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(S,y){return(Math.abs(S.selection.lead.row-y)||y+1+(y<9?"·":""))+""},getWidth:function(S,y,I){return Math.max(y.toString().length,(I.lastRow+1).toString().length,2)*I.characterWidth},update:function(S,y){y.renderer.$loop.schedule(y.renderer.CHANGE_GUTTER)},attach:function(S){S.renderer.$gutterLayer.$renderer=this,S.on("changeSelection",this.update),this.update(null,S)},detach:function(S){S.renderer.$gutterLayer.$renderer==this&&(S.renderer.$gutterLayer.$renderer=null),S.off("changeSelection",this.update),this.update(null,S)}};v.Editor=V}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(p,v,fe){var M=p("../lib/dom"),w=function(){function A(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return A.prototype.moveContainer=function(a){M.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},A.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},A.prototype.computeLineTop=function(a,u,n){var o=u.firstRowScreen*u.lineHeight,r=Math.floor(o/this.canvasHeight),i=n.documentToScreenRow(a,0)*u.lineHeight;return i-r*this.canvasHeight},A.prototype.computeLineHeight=function(a,u,n){return u.lineHeight*n.getRowLineCount(a)},A.prototype.getLength=function(){return this.cells.length},A.prototype.get=function(a){return this.cells[a]},A.prototype.shift=function(){this.$cacheCell(this.cells.shift())},A.prototype.pop=function(){this.$cacheCell(this.cells.pop())},A.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=M.createFragment(this.element),n=0;n<a.length;n++)u.appendChild(a[n].element);this.element.appendChild(u)}else this.cells.push(a),this.element.appendChild(a.element)},A.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var u=M.createFragment(this.element),n=0;n<a.length;n++)u.appendChild(a[n].element);this.element.firstChild?this.element.insertBefore(u,this.element.firstChild):this.element.appendChild(u)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},A.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},A.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},A.prototype.createCell=function(a,u,n,o){var r=this.cellCache.pop();if(!r){var i=M.createElement("div");o&&o(i),this.element.appendChild(i),r={element:i,text:"",row:a}}return r.row=a,r},A}();v.Lines=w}),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,v,fe){var M=p("../lib/dom"),w=p("../lib/oop"),A=p("../lib/lang"),a=p("../lib/event_emitter").EventEmitter,u=p("./lines").Lines,n=p("../config").nls,o=function(){function i(e){this.$showCursorMarker=null,this.element=M.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 i.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},i.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},i.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},i.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var c=e[t],g=c.row,m=this.$annotations[g];m||(m=this.$annotations[g]={text:[],type:[],displayText:[]});var E=c.text,T=c.text,x=c.type;E=E?A.escapeHTML(E):c.html||"",T=T||c.html||"",m.text.indexOf(E)===-1&&(m.text.push(E),m.type.push(x),m.displayText.push(T));var b=c.className;b?m.className=b:x==="error"?m.className=" ace_error":x==="security"&&!/\bace_error\b/.test(m.className)?m.className=" ace_security":x==="warning"&&!/\bace_(error|security)\b/.test(m.className)?m.className=" ace_warning":x==="info"&&!m.className?m.className=" ace_info":x==="hint"&&!m.className&&(m.className=" ace_hint")}},i.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,c=e.end.row-t;if(c!==0)if(e.action=="remove")this.$annotations.splice(t,c+1,null);else{var g=new Array(c+1);g.unshift(t,1),this.$annotations.splice.apply(this.$annotations,g)}}},i.prototype.update=function(e){this.config=e;var t=this.session,c=e.firstRow,g=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=g,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var m=t.getNextFoldLine(c),E=m?m.start.row:1/0,T=null,x=-1,b=c;;){if(b>E&&(b=m.end.row+1,m=t.getNextFoldLine(b,m),E=m?m.start.row:1/0),b>g){for(;this.$lines.getLength()>x+1;)this.$lines.pop();break}T=this.$lines.get(++x),T?T.row=b:(T=this.$lines.createCell(b,e,this.session,r),this.$lines.push(T)),this.$renderCell(T,e,m,b),b++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},i.prototype.$updateGutterWidth=function(e){var t=this.session,c=t.gutterRenderer||this.$renderer,g=t.$firstLineNumber,m=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(m=t.getLength()+g-1);var E=c?c.getWidth(t,m,e):m.toString().length*e.characterWidth,T=this.$padding||this.$computePadding();E+=T.left+T.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},i.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},i.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!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 t=this.$lines.cells;this.$cursorCell=null;for(var c=0;c<t.length;c++){var g=t[c];if(g.row>=this.$cursorRow){if(g.row>this.$cursorRow){var m=this.session.getFoldLine(this.$cursorRow);if(c>0&&m&&m.start.row==t[c-1].row)g=t[c-1];else break}g.element.className="ace_gutter-active-line "+g.element.className,this.$cursorCell=g;break}}}}},i.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=M.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var t=e.selection.cursor,c=this.config,g=this.$lines,m=c.firstRowScreen*c.lineHeight,E=Math.floor(m/g.canvasHeight),T=e.documentToScreenRow(t)*c.lineHeight,x=T-E*g.canvasHeight;M.setStyle(this.$highlightElement.style,"height",c.lineHeight+"px"),M.setStyle(this.$highlightElement.style,"top",x+"px")}},i.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var c=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),g=this.oldLastRow;if(this.oldLastRow=c,!t||g<e.firstRow)return this.update(e);if(c<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var m=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);m>0;m--)this.$lines.shift();if(g>c)for(var m=this.session.getFoldedRowCount(c+1,g);m>0;m--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),c>g&&this.$lines.push(this.$renderLines(e,g+1,c)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},i.prototype.$renderLines=function(e,t,c){for(var g=[],m=t,E=this.session.getNextFoldLine(m),T=E?E.start.row:1/0;m>T&&(m=E.end.row+1,E=this.session.getNextFoldLine(m,E),T=E?E.start.row:1/0),!(m>c);){var x=this.$lines.createCell(m,e,this.session,r);this.$renderCell(x,e,E,m),g.push(x),m++}return g},i.prototype.$renderCell=function(e,t,c,g){var m=e.element,E=this.session,T=m.childNodes[0],x=m.childNodes[1],b=m.childNodes[2],de=m.childNodes[3],Te=b.firstChild,he=E.$firstLineNumber,Y=E.$breakpoints,gt=E.$decorations,V=E.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&E.foldWidgets,S=c?c.start.row:Number.MAX_VALUE,y=t.lineHeight+"px",I=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",ke=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",Qe=(V?V.getText(E,g):g+he).toString();if(this.$highlightGutterLine&&(g==this.$cursorRow||c&&g<this.$cursorRow&&g>=S&&this.$cursorRow<=c.end.row)&&(I+="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)),Y[g]&&(I+=Y[g]),gt[g]&&(I+=gt[g]),this.$annotations[g]&&g!==S&&(I+=this.$annotations[g].className),O){var Je=O[g];Je==null&&(Je=O[g]=E.getFoldWidget(g))}if(Je){var mt="ace_fold-widget ace_"+Je,yt=Je=="start"&&g==S&&g<c.end.row;if(yt){mt+=" ace_closed";for(var Qt="",bt=!1,Gt=g+1;Gt<=c.end.row;Gt++)if(this.$annotations[Gt]){if(this.$annotations[Gt].className===" ace_error"){bt=!0,Qt=" ace_error_fold";break}this.$annotations[Gt].className===" ace_security"?(bt=!0,Qt=" ace_security_fold"):this.$annotations[Gt].className===" ace_warning"&&Qt!==" ace_security_fold"&&(bt=!0,Qt=" ace_warning_fold")}I+=Qt}else mt+=" ace_open";x.className!=mt&&(x.className=mt),M.setStyle(x.style,"height",y),M.setStyle(x.style,"display","inline-block"),x.setAttribute("role","button"),x.setAttribute("tabindex","-1");var Yt=E.getFoldWidgetRange(g);Yt?x.setAttribute("aria-label",n("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[Yt.start.row+1,Yt.end.row+1])):c?x.setAttribute("aria-label",n("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[c.start.row+1,c.end.row+1])):x.setAttribute("aria-label",n("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[g+1])),yt?(x.setAttribute("aria-expanded","false"),x.setAttribute("title",n("gutter.code-folding.closed.title","Unfold code"))):(x.setAttribute("aria-expanded","true"),x.setAttribute("title",n("gutter.code-folding.open.title","Fold code")))}else x&&(M.setStyle(x.style,"display","none"),x.setAttribute("tabindex","0"),x.removeAttribute("role"),x.removeAttribute("aria-label"));var Zt=this.session.$gutterCustomWidgets[g];if(Zt?this.$addCustomWidget(g,Zt,e):de&&this.$removeCustomWidget(g,e),bt&&this.$showFoldedAnnotations){b.className="ace_gutter_annotation",Te.className=ke,Te.className+=Qt,M.setStyle(Te.style,"height",y),M.setStyle(b.style,"display","block"),M.setStyle(b.style,"height",y);var Jt;switch(Qt){case" ace_error_fold":Jt=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[Qe]);break;case" ace_security_fold":Jt=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[Qe]);break;case" ace_warning_fold":Jt=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[Qe]);break}b.setAttribute("aria-label",Jt),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else if(this.$annotations[g]){b.className="ace_gutter_annotation",Te.className=ke,this.$useSvgGutterIcons?Te.className+=this.$annotations[g].className:m.classList.add(this.$annotations[g].className.replace(" ","")),M.setStyle(Te.style,"height",y),M.setStyle(b.style,"display","block"),M.setStyle(b.style,"height",y);var Jt;switch(this.$annotations[g].className){case" ace_error":Jt=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[Qe]);break;case" ace_security":Jt=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[Qe]);break;case" ace_warning":Jt=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[Qe]);break;case" ace_info":Jt=n("gutter.annotation.aria-label.info","Info, read annotations row $0",[Qe]);break;case" ace_hint":Jt=n("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[Qe]);break}b.setAttribute("aria-label",Jt),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else M.setStyle(b.style,"display","none"),b.removeAttribute("aria-label"),b.removeAttribute("role"),b.setAttribute("tabindex","0");return Qe!==T.data&&(T.data=Qe),m.className!=I&&(m.className=I),M.setStyle(e.element.style,"height",this.$lines.computeLineHeight(g,t,E)+"px"),M.setStyle(e.element.style,"top",this.$lines.computeLineTop(g,t,E)+"px"),e.text=Qe,b.style.display==="none"&&x.style.display==="none"&&!Zt?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},i.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},i.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},i.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},i.prototype.setShowFoldWidgets=function(e){e?M.addCssClass(this.element,"ace_folding-enabled"):M.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},i.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},i.prototype.$hideFoldWidget=function(e,t){var c=t||this.$getGutterCell(e);if(c&&c.element){var g=c.element.childNodes[1];g&&M.setStyle(g.style,"display","none")}},i.prototype.$showFoldWidget=function(e,t){var c=t||this.$getGutterCell(e);if(c&&c.element){var g=c.element.childNodes[1];g&&this.session.foldWidgets&&this.session.foldWidgets[c.row]&&M.setStyle(g.style,"display","inline-block")}},i.prototype.$getGutterCell=function(e){var t=this.$lines.cells,c=0,g=t.length-1;if(!(e<t[0].row||e>t[g].row)){for(;c<=g;){var m=Math.floor((c+g)/2),E=t[m];if(E.row>e)g=m-1;else if(E.row<e)c=m+1;else return E}return E}},i.prototype.$addCustomWidget=function(e,t,c){var g=t.className,m=t.label,E=t.title,T=t.callbacks;this.session.$gutterCustomWidgets[e]={className:g,label:m,title:E,callbacks:T},this.$hideFoldWidget(e,c);var x=c||this.$getGutterCell(e);if(x&&x.element){var b=x.element.querySelector(".ace_custom-widget");b&&b.remove(),b=M.createElement("span"),b.className="ace_custom-widget ".concat(g),b.setAttribute("tabindex","-1"),b.setAttribute("role","button"),b.setAttribute("aria-label",m),b.setAttribute("title",E),M.setStyle(b.style,"display","inline-block"),M.setStyle(b.style,"height","inherit"),T&&T.onClick&&b.addEventListener("click",function(de){T.onClick(de,e),de.stopPropagation()}),x.element.appendChild(b)}},i.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var c=t||this.$getGutterCell(e);if(c&&c.element){var g=c.element.querySelector(".ace_custom-widget");g&&c.element.removeChild(g)}},i.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=M.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},i.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),c=this.element.getBoundingClientRect();if(e.x<t.left+c.left)return"markers";if(this.$showFoldWidgets&&e.x>c.right-t.right)return"foldWidgets"},i}();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer=void 0,o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,w.implement(o.prototype,a);function r(i){var e=document.createTextNode("");i.appendChild(e);var t=M.createElement("span");i.appendChild(t);var c=M.createElement("span");i.appendChild(c);var g=M.createElement("span");return c.appendChild(g),i}v.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(p,v,fe){var M=p("../range").Range,w=p("../lib/dom"),A=function(){function u(n){this.element=w.createElement("div"),this.element.className="ace_layer ace_marker-layer",n.appendChild(this.element)}return u.prototype.setPadding=function(n){this.$padding=n},u.prototype.setSession=function(n){this.session=n},u.prototype.setMarkers=function(n){this.markers=n},u.prototype.elt=function(n,o){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=o,r.className=n},u.prototype.update=function(n){if(n){this.config=n,this.i=0;var o;for(var r in this.markers){var i=this.markers[r];if(!i.range){i.update(o,this,this.session,n);continue}var e=i.range.clipRows(n.firstRow,n.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),i.renderer){var t=this.$getTop(e.start.row,n),c=this.$padding+e.start.column*n.characterWidth;i.renderer(o,e,c,t,n)}else i.type=="fullLine"?this.drawFullLineMarker(o,e,i.clazz,n):i.type=="screenLine"?this.drawScreenLineMarker(o,e,i.clazz,n):e.isMultiLine()?i.type=="text"?this.drawTextMarker(o,e,i.clazz,n):this.drawMultiLineMarker(o,e,i.clazz,n):this.drawSingleLineMarker(o,e,i.clazz+" ace_start ace_br15",n)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},u.prototype.$getTop=function(n,o){return(n-o.firstRowScreen)*o.lineHeight},u.prototype.drawTextMarker=function(n,o,r,i,e){for(var t=this.session,c=o.start.row,g=o.end.row,m=c,E=0,T=0,x=t.getScreenLastRowColumn(m),b=new M(m,o.start.column,m,T);m<=g;m++)b.start.row=b.end.row=m,b.start.column=m==c?o.start.column:t.getRowWrapIndent(m),b.end.column=x,E=T,T=x,x=m+1<g?t.getScreenLastRowColumn(m+1):m==g?0:o.end.column,this.drawSingleLineMarker(n,b,r+(m==c?" ace_start":"")+" ace_br"+a(m==c||m==c+1&&o.start.column,E<T,T>x,m==g),i,m==g?0:1,e)},u.prototype.drawMultiLineMarker=function(n,o,r,i,e){var t=this.$padding,c=i.lineHeight,g=this.$getTop(o.start.row,i),m=t+o.start.column*i.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var E=o.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(n,E,r+" ace_br1 ace_start",i,null,e)}else this.elt(r+" ace_br1 ace_start","height:"+c+"px;right:"+t+"px;top:"+g+"px;left:"+m+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var E=o.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(n,E,r+" ace_br12",i,null,e)}else{g=this.$getTop(o.end.row,i);var T=o.end.column*i.characterWidth;this.elt(r+" ace_br12","height:"+c+"px;width:"+T+"px;top:"+g+"px;left:"+t+"px;"+(e||""))}if(c=(o.end.row-o.start.row-1)*i.lineHeight,!(c<=0)){g=this.$getTop(o.start.row+1,i);var x=(o.start.column?1:0)|(o.end.column?0:8);this.elt(r+(x?" ace_br"+x:""),"height:"+c+"px;right:"+t+"px;top:"+g+"px;left:"+t+"px;"+(e||""))}},u.prototype.drawSingleLineMarker=function(n,o,r,i,e,t){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(n,o,r,i,e,t);var c=i.lineHeight,g=(o.end.column+(e||0)-o.start.column)*i.characterWidth,m=this.$getTop(o.start.row,i),E=this.$padding+o.start.column*i.characterWidth;this.elt(r,"height:"+c+"px;width:"+g+"px;top:"+m+"px;left:"+E+"px;"+(t||""))},u.prototype.drawBidiSingleLineMarker=function(n,o,r,i,e,t){var c=i.lineHeight,g=this.$getTop(o.start.row,i),m=this.$padding,E=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);E.forEach(function(T){this.elt(r,"height:"+c+"px;width:"+(T.width+(e||0))+"px;top:"+g+"px;left:"+(m+T.left)+"px;"+(t||""))},this)},u.prototype.drawFullLineMarker=function(n,o,r,i,e){var t=this.$getTop(o.start.row,i),c=i.lineHeight;o.start.row!=o.end.row&&(c+=this.$getTop(o.end.row,i)-t),this.elt(r,"height:"+c+"px;top:"+t+"px;left:0;right:0;"+(e||""))},u.prototype.drawScreenLineMarker=function(n,o,r,i,e){var t=this.$getTop(o.start.row,i),c=i.lineHeight;this.elt(r,"height:"+c+"px;top:"+t+"px;left:0;right:0;"+(e||""))},u}();A.prototype.$padding=0;function a(u,n,o,r){return(u?1:0)|(n?2:0)|(o?4:0)|(r?8:0)}v.Marker=A}),ace.define("ace/layer/text_util",["require","exports","module"],function(p,v,fe){var M=new Set(["text","rparen","lparen"]);v.isTextToken=function(w){return M.has(w)}}),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,v,fe){var M=p("../lib/oop"),w=p("../lib/dom"),A=p("../lib/lang"),a=p("./lines").Lines,u=p("../lib/event_emitter").EventEmitter,n=p("../config").nls,o=p("./text_util").isTextToken,r=function(){function i(e){this.dom=w,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return i.prototype.$updateEolChar=function(){var e=this.session.doc,t=e.getNewLineCharacter()==`
219
+ `&&e.getNewLineMode()!="windows",c=t?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=c)return this.EOL_CHAR=c,!0},i.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},i.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},i.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},i.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(t){this._signal("changeCharacterSize",t)}).bind(this)),this.$pollSizeChanges()},i.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},i.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},i.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},i.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)},i.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},i.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},i.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],c=1;c<e+1;c++)if(this.showTabs){var g=this.dom.createElement("span");g.className="ace_invisible ace_invisible_tab",g.textContent=A.stringRepeat(this.TAB_CHAR,c),t.push(g)}else t.push(this.dom.createTextNode(A.stringRepeat(" ",c),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var m="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",T=this.showSpaces?A.stringRepeat(this.SPACE_CHAR,this.tabSize):A.stringRepeat(" ",this.tabSize),x=this.showTabs?" ace_invisible ace_invisible_tab":"",b=this.showTabs?A.stringRepeat(this.TAB_CHAR,this.tabSize):T,g=this.dom.createElement("span");g.className=m+E,g.textContent=T,this.$tabStrings[" "]=g;var g=this.dom.createElement("span");g.className=m+x,g.textContent=b,this.$tabStrings[" "]=g}},i.prototype.updateLines=function(e,t,c){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var g=Math.max(t,e.firstRow),m=Math.min(c,e.lastRow),E=this.element.childNodes,T=0,b=e.firstRow;b<g;b++){var de=this.session.getFoldLine(b);if(de)if(de.containsRow(g)){g=de.start.row;break}else b=de.end.row;T++}for(var x=!1,b=g,de=this.session.getNextFoldLine(b),Te=de?de.start.row:1/0;b>Te&&(b=de.end.row+1,de=this.session.getNextFoldLine(b,de),Te=de?de.start.row:1/0),!(b>m);){var he=E[T++];if(he){this.dom.removeChildren(he),this.$renderLine(he,b,b==Te?de:!1),x&&(he.style.top=this.$lines.computeLineTop(b,e,this.session)+"px");var Y=e.lineHeight*this.session.getRowLength(b)+"px";he.style.height!=Y&&(x=!0,he.style.height=Y)}b++}if(x)for(;T<this.$lines.cells.length;){var gt=this.$lines.cells[T++];gt.element.style.top=this.$lines.computeLineTop(gt.row,e,this.session)+"px"}},i.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var c=e.lastRow,g=t?t.lastRow:-1;if(!t||g<e.firstRow)return this.update(e);if(c<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var m=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);m>0;m--)this.$lines.shift();if(t.lastRow>e.lastRow)for(var m=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);m>0;m--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},i.prototype.$renderLinesFragment=function(e,t,c){for(var g=[],m=t,E=this.session.getNextFoldLine(m),T=E?E.start.row:1/0;m>T&&(m=E.end.row+1,E=this.session.getNextFoldLine(m,E),T=E?E.start.row:1/0),!(m>c);){var x=this.$lines.createCell(m,e,this.session),b=x.element;this.dom.removeChildren(b),w.setStyle(b.style,"height",this.$lines.computeLineHeight(m,e,this.session)+"px"),w.setStyle(b.style,"top",this.$lines.computeLineTop(m,e,this.session)+"px"),this.$renderLine(b,m,m==T?E:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",g.push(x),m++}return g},i.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,c=e.lastRow,g=this.$lines;g.getLength();)g.pop();g.push(this.$renderLinesFragment(e,t,c))},i.prototype.$renderToken=function(e,t,c,g){for(var m=this,E=/(\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,T=this.dom.createFragment(this.element),x,b=0;x=E.exec(g);){var de=x[1],Te=x[2],he=x[3],Y=x[4],gt=x[5];if(!(!m.showSpaces&&Te)){var V=b!=x.index?g.slice(b,x.index):"";if(b=x.index+x[0].length,V&&T.appendChild(this.dom.createTextNode(V,this.element)),de){var O=m.session.getScreenTabSize(t+x.index),S=m.$tabStrings[O].cloneNode(!0);S.charCount=1,T.appendChild(S),t+=O-1}else if(Te)if(m.showSpaces){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_space",y.textContent=A.stringRepeat(m.SPACE_CHAR,Te.length),T.appendChild(y)}else T.appendChild(this.dom.createTextNode(Te,this.element));else if(he){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_space ace_invalid",y.textContent=A.stringRepeat(m.SPACE_CHAR,he.length),T.appendChild(y)}else if(Y){t+=1;var y=this.dom.createElement("span");y.style.width=m.config.characterWidth*2+"px",y.className=m.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",y.textContent=m.showSpaces?m.SPACE_CHAR:Y,T.appendChild(y)}else if(gt){t+=1;var y=this.dom.createElement("span");y.style.width=m.config.characterWidth*2+"px",y.className="ace_cjk",y.textContent=gt,T.appendChild(y)}}}if(T.appendChild(this.dom.createTextNode(b?g.slice(b):g,this.element)),o(c.type))e.appendChild(T);else{var I="ace_"+c.type.replace(/\./g," ace_"),y=this.dom.createElement("span");c.type=="fold"&&(y.style.width=c.value.length*this.config.characterWidth+"px",y.setAttribute("title",n("inline-fold.closed.title","Unfold code"))),y.className=I,y.appendChild(T),e.appendChild(y)}return t+g.length},i.prototype.renderIndentGuide=function(e,t,c){var g=t.search(this.$indentGuideRe);if(g<=0||g>=c)return t;if(t[0]==" "){g-=g%this.tabSize;for(var m=g/this.tabSize,E=0;E<m;E++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(g)}else if(t[0]==" "){for(var E=0;E<g;E++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(g)}return this.$highlightIndentGuide(),t},i.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 t=this.session.selection.getCursor(),c=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,g=Math.floor(c/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:g,start:t.row};var m=this.session.$bracketHighlight;if(m){for(var E=this.session.$bracketHighlight.ranges,T=0;T<E.length;T++)if(t.row!==E[T].start.row){this.$highlightIndentGuideMarker.end=E[T].start.row+1,t.row>E[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[t.row]!==""&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=t.row+1;T<e.length;T++){var x=e[T],b=/^\s*/.exec(x)[0].length;if(x!==""&&(this.$highlightIndentGuideMarker.end=T,b<=c))break}}this.$renderHighlightIndentGuide()}}},i.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),t=0;t<e.length;t++)e[t].classList.remove("ace_indent-guide-active")},i.prototype.$setIndentGuideActive=function(e,t){var c=this.session.doc.getLine(e.row);if(c!==""){var g=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)g=e.element.childNodes[0];else return;var m=g.childNodes;if(m){var E=m[t-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},i.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(t!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var c=0;c<e.length;c++){var g=e[c];if(this.$highlightIndentGuideMarker.end&&g.row>=this.$highlightIndentGuideMarker.start+1){if(g.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(g,t)}}else for(var c=e.length-1;c>=0;c--){var g=e[c];if(this.$highlightIndentGuideMarker.end&&g.row<this.$highlightIndentGuideMarker.start){if(g.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(g,t)}}}},i.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},i.prototype.$renderWrappedLine=function(e,t,c){var g=0,m=0,E=c[0],T=0,x=this.$createLineElement();e.appendChild(x);for(var b=0;b<t.length;b++){var de=t[b],Te=de.value;if(b==0&&this.displayIndentGuides){if(g=Te.length,Te=this.renderIndentGuide(x,Te,E),!Te)continue;g-=Te.length}if(g+Te.length<E)T=this.$renderToken(x,T,de,Te),g+=Te.length;else{for(;g+Te.length>=E;){T=this.$renderToken(x,T,de,Te.substring(0,E-g)),Te=Te.substring(E-g),g=E,x=this.$createLineElement(),e.appendChild(x);var he=this.dom.createTextNode(A.stringRepeat(" ",c.indent),this.element);he.charCount=0,x.appendChild(he),m++,T=0,E=c[m]||Number.MAX_VALUE}Te.length!=0&&(g+=Te.length,T=this.$renderToken(x,T,de,Te))}}c[c.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(x,T,null,"",!0)},i.prototype.$renderSimpleLine=function(e,t){for(var c=0,g=0;g<t.length;g++){var m=t[g],E=m.value;if(!(g==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(e,E),!E))){if(c+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,c,m,E);c=this.$renderToken(e,c,m,E)}}},i.prototype.$renderOverflowMessage=function(e,t,c,g,m){c&&this.$renderToken(e,t,c,g.slice(0,this.MAX_LINE_LENGTH-t));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=m?"<hide>":"<click to see more...>",e.appendChild(E)},i.prototype.$renderLine=function(e,t,c){if(!c&&c!=!1&&(c=this.session.getFoldLine(t)),c)var g=this.$getFoldLineTokens(t,c);else var g=this.session.getTokens(t);var m=e;if(g.length){var E=this.session.getRowSplitData(t);if(E&&E.length){this.$renderWrappedLine(e,g,E);var m=e.lastChild}else{var m=e;this.$useLineGroups()&&(m=this.$createLineElement(),e.appendChild(m)),this.$renderSimpleLine(m,g)}}else this.$useLineGroups()&&(m=this.$createLineElement(),e.appendChild(m));if(this.showEOL&&m){c&&(t=c.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,m.appendChild(T)}},i.prototype.$getFoldLineTokens=function(e,t){var c=this.session,g=[];function m(T,x,b){for(var de=0,Te=0;Te+T[de].value.length<x;)if(Te+=T[de].value.length,de++,de==T.length)return;if(Te!=x){var he=T[de].value.substring(x-Te);he.length>b-x&&(he=he.substring(0,b-x)),g.push({type:T[de].type,value:he}),Te=x+he.length,de+=1}for(;Te<b&&de<T.length;){var he=T[de].value;he.length+Te>b?g.push({type:T[de].type,value:he.substring(0,b-Te)}):g.push(T[de]),Te+=he.length,de+=1}}var E=c.getTokens(e);return t.walk(function(T,x,b,de,Te){T!=null?g.push({type:"fold",value:T}):(Te&&(E=c.getTokens(x)),E.length&&m(E,de,b))},t.end.row,this.session.getLine(t.end.row).length),g},i.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},i}();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,M.implement(r.prototype,u),v.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(p,v,fe){var M=p("../lib/dom"),w=function(){function A(a){this.element=M.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),M.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return A.prototype.$updateOpacity=function(a){for(var u=this.cursors,n=u.length;n--;)M.setStyle(u[n].style,"opacity",a?"":"0")},A.prototype.$startCssAnimation=function(){for(var a=this.cursors,u=a.length;u--;)a[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&M.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},A.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,M.removeCssClass(this.element,"ace_animate-blinking")},A.prototype.setPadding=function(a){this.$padding=a},A.prototype.setSession=function(a){this.session=a},A.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},A.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},A.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,M.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},A.prototype.addCursor=function(){var a=M.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},A.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},A.prototype.hideCursor=function(){this.isVisible=!1,M.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},A.prototype.showCursor=function(){this.isVisible=!0,M.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},A.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,M.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&M.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),M.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),u()},this.blinkInterval),u()}},A.prototype.getPixelPosition=function(a,u){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(a),o=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,a.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),r=(n.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:r}},A.prototype.isCursorInView=function(a,u){return a.top>=0&&a.top<u.maxHeight},A.prototype.update=function(a){this.config=a;var u=this.session.$selectionMarkers,n=0,o=0;(u===void 0||u.length===0)&&(u=[{cursor:null}]);for(var n=0,r=u.length;n<r;n++){var i=this.getPixelPosition(u[n].cursor,!0);if(!((i.top>a.height+a.offset||i.top<0)&&n>1)){var e=this.cursors[o++]||this.addCursor(),t=e.style;this.drawCursor?this.drawCursor(e,i,a,u[n],this.session):this.isCursorInView(i,a)?(M.setStyle(t,"display","block"),M.translate(e,i.left,i.top),M.setStyle(t,"width",Math.round(a.characterWidth)+"px"),M.setStyle(t,"height",a.lineHeight+"px")):M.setStyle(t,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=i,this.restartTimer()},A.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?M.addCssClass(this.element,"ace_overwrite-cursors"):M.removeCssClass(this.element,"ace_overwrite-cursors"))},A.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},A}();w.prototype.$padding=0,w.prototype.drawCursor=null,v.Cursor=w}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(p,v,fe){var M=this&&this.__extends||function(){var e=function(t,c){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(g[E]=m[E])},e(t,c)};return function(t,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");e(t,c);function g(){this.constructor=t}t.prototype=c===null?Object.create(c):(g.prototype=c.prototype,new g)}}(),w=p("./lib/oop"),A=p("./lib/dom"),a=p("./lib/event"),u=p("./lib/event_emitter").EventEmitter,n=32768,o=function(){function e(t,c){this.element=A.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+c,this.inner=A.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1},e}();w.implement(o.prototype,u);var r=function(e){M(t,e);function t(c,g){var m=e.call(this,c,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,g.$scrollbarWidth=m.width=A.scrollbarWidth(c.ownerDocument),m.inner.style.width=m.element.style.width=(m.width||15)+5+"px",m.$minWidth=0,m}return t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var c=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-c)/(this.coeff-c)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(c){this.element.style.height=c+"px"},t.prototype.setScrollHeight=function(c){this.scrollHeight=c,c>n?(this.coeff=n/c,c=n):this.coeff!=1&&(this.coeff=1),this.inner.style.height=c+"px"},t.prototype.setScrollTop=function(c){this.scrollTop!=c&&(this.skipEvent=!0,this.scrollTop=c,this.element.scrollTop=c*this.coeff)},t}(o);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var i=function(e){M(t,e);function t(c,g){var m=e.call(this,c,"-h")||this;return m.scrollLeft=0,m.height=g.$scrollbarWidth,m.inner.style.height=m.element.style.height=(m.height||15)+5+"px",m}return t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(c){this.element.style.width=c+"px"},t.prototype.setInnerWidth=function(c){this.inner.style.width=c+"px"},t.prototype.setScrollWidth=function(c){this.inner.style.width=c+"px"},t.prototype.setScrollLeft=function(c){this.scrollLeft!=c&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=c)},t}(o);v.ScrollBar=r,v.ScrollBarV=r,v.ScrollBarH=i,v.VScrollBar=r,v.HScrollBar=i}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(p,v,fe){var M=this&&this.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,g){c.__proto__=g}||function(c,g){for(var m in g)Object.prototype.hasOwnProperty.call(g,m)&&(c[m]=g[m])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function c(){this.constructor=e}e.prototype=t===null?Object.create(t):(c.prototype=t.prototype,new c)}}(),w=p("./lib/oop"),A=p("./lib/dom"),a=p("./lib/event"),u=p("./lib/event_emitter").EventEmitter;A.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
220
+ position: absolute;
221
+ background: rgba(128, 128, 128, 0.6);
222
+ -moz-box-sizing: border-box;
223
+ box-sizing: border-box;
224
+ border: 1px solid #bbb;
225
+ border-radius: 2px;
226
+ z-index: 8;
227
+ }
228
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
229
+ position: absolute;
230
+ z-index: 6;
231
+ background: none;
232
+ overflow: hidden!important;
233
+ }
234
+ .ace_editor>.ace_sb-v {
235
+ z-index: 6;
236
+ right: 0;
237
+ top: 0;
238
+ width: 12px;
239
+ }
240
+ .ace_editor>.ace_sb-v div {
241
+ z-index: 8;
242
+ right: 0;
243
+ width: 100%;
244
+ }
245
+ .ace_editor>.ace_sb-h {
246
+ bottom: 0;
247
+ left: 0;
248
+ height: 12px;
249
+ }
250
+ .ace_editor>.ace_sb-h div {
251
+ bottom: 0;
252
+ height: 100%;
253
+ }
254
+ .ace_editor>.ace_sb_grabbed {
255
+ z-index: 8;
256
+ background: #000;
257
+ }`,"ace_scrollbar.css",!1);var n=function(){function i(e,t){this.element=A.createElement("div"),this.element.className="ace_sb"+t,this.inner=A.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return i.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},i}();w.implement(n.prototype,u);var o=function(i){M(e,i);function e(t,c){var g=i.call(this,t,"-v")||this;return g.scrollTop=0,g.scrollHeight=0,g.parent=t,g.width=g.VScrollWidth,g.renderer=c,g.inner.style.width=g.element.style.width=(g.width||15)+"px",g.$minWidth=0,g}return e.prototype.onMouseDown=function(t,c){if(t==="mousedown"&&!(a.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var g=this,m=c.clientY,E=function(Y){m=Y.clientY},T=function(){clearInterval(Te)},x=c.clientY,b=this.thumbTop,de=function(){if(m!==void 0){var Y=g.scrollTopFromThumbTop(b+m-x);Y!==g.scrollTop&&g._emit("scroll",{data:Y})}};a.capture(this.inner,E,T);var Te=setInterval(de,20);return a.preventDefault(c)}var he=c.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(he)}),a.preventDefault(c)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(t){var c=t*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return c=c>>0,c<0?c=0:c>this.pageHeight-this.viewHeight&&(c=this.pageHeight-this.viewHeight),c},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(t){this.height=Math.max(0,t),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(t,c){this.pageHeight===t&&!c||(this.pageHeight=t,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(t){this.scrollTop=t,t<0&&(t=0),this.thumbTop=t*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(n);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var r=function(i){M(e,i);function e(t,c){var g=i.call(this,t,"-h")||this;return g.scrollLeft=0,g.scrollWidth=0,g.height=g.HScrollHeight,g.inner.style.height=g.element.style.height=(g.height||12)+"px",g.renderer=c,g}return e.prototype.onMouseDown=function(t,c){if(t==="mousedown"&&!(a.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var g=this,m=c.clientX,E=function(Y){m=Y.clientX},T=function(){clearInterval(Te)},x=c.clientX,b=this.thumbLeft,de=function(){if(m!==void 0){var Y=g.scrollLeftFromThumbLeft(b+m-x);Y!==g.scrollLeft&&g._emit("scroll",{data:Y})}};a.capture(this.inner,E,T);var Te=setInterval(de,20);return a.preventDefault(c)}var he=c.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(he)}),a.preventDefault(c)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(t){var c=t*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return c=c>>0,c<0?c=0:c>this.pageWidth-this.viewWidth&&(c=this.pageWidth-this.viewWidth),c},e.prototype.setWidth=function(t){this.width=Math.max(0,t),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(t,c){this.pageWidth===t&&!c||(this.pageWidth=t,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(t){this.scrollLeft=t,t<0&&(t=0),this.thumbLeft=t*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(n);r.prototype.setInnerWidth=r.prototype.setScrollWidth,v.ScrollBar=o,v.ScrollBarV=o,v.ScrollBarH=r,v.VScrollBar=o,v.HScrollBar=r}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(p,v,fe){var M=p("./lib/event"),w=function(){function A(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var n=this;this._flush=function(o){n.pending=!1;var r=n.changes;if(r&&(M.blockIdle(100),n.changes=0,n.onRender(r)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return A.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(M.nextFrame(this._flush),this.pending=!0)},A.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},A}();v.RenderLoop=w}),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,v,fe){var M=p("../lib/oop"),w=p("../lib/dom"),A=p("../lib/lang"),a=p("../lib/event"),u=p("../lib/useragent"),n=p("../lib/event_emitter").EventEmitter,o=512,r=typeof ResizeObserver=="function",i=200,e=function(){function t(c){this.el=w.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=w.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=w.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),c.appendChild(this.el),this.$measureNode.textContent=A.stringRepeat("X",o),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return t.prototype.$setMeasureNodeStyles=function(c,g){c.width=c.height="auto",c.left=c.top="0px",c.visibility="hidden",c.position="absolute",c.whiteSpace="pre",u.isIE<8?c["font-family"]="inherit":c.font="inherit",c.overflow=g?"hidden":"visible"},t.prototype.checkForSizeChanges=function(c){if(c===void 0&&(c=this.$measureSizes()),c&&(this.$characterSize.width!==c.width||this.$characterSize.height!==c.height)){this.$measureNode.style.fontWeight="bold";var g=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=c,this.charSizes=Object.create(null),this.allowBoldFonts=g&&g.width===c.width&&g.height===c.height,this._emit("changeCharacterSize",{data:c})}},t.prototype.$addObserver=function(){var c=this;this.$observer=new window.ResizeObserver(function(g){c.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},t.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var c=this;return this.$pollSizeChangesTimer=a.onIdle(function g(){c.checkForSizeChanges(),a.onIdle(g,500)},500)},t.prototype.setPolling=function(c){c?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},t.prototype.$measureSizes=function(c){var g={height:(c||this.$measureNode).clientHeight,width:(c||this.$measureNode).clientWidth/o};return g.width===0||g.height===0?null:g},t.prototype.$measureCharWidth=function(c){this.$main.textContent=A.stringRepeat(c,o);var g=this.$main.getBoundingClientRect();return g.width/o},t.prototype.getCharacterWidth=function(c){var g=this.charSizes[c];return g===void 0&&(g=this.charSizes[c]=this.$measureCharWidth(c)/this.$characterSize.width),g},t.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},t.prototype.$getZoom=function(c){return!c||!c.parentElement?1:(Number(window.getComputedStyle(c).zoom)||1)*this.$getZoom(c.parentElement)},t.prototype.$initTransformMeasureNodes=function(){var c=function(g,m){return["div",{style:"position: absolute;top:"+g+"px;left:"+m+"px;"}]};this.els=w.buildDom([c(0,0),c(i,0),c(0,i),c(i,i)],this.el)},t.prototype.transformCoordinates=function(c,g){if(c){var m=this.$getZoom(this.el);c=b(1/m,c)}function E(mt,yt,Qt){var bt=mt[1]*yt[0]-mt[0]*yt[1];return[(-yt[1]*Qt[0]+yt[0]*Qt[1])/bt,(+mt[1]*Qt[0]-mt[0]*Qt[1])/bt]}function T(mt,yt){return[mt[0]-yt[0],mt[1]-yt[1]]}function x(mt,yt){return[mt[0]+yt[0],mt[1]+yt[1]]}function b(mt,yt){return[mt*yt[0],mt*yt[1]]}this.els||this.$initTransformMeasureNodes();function de(mt){var yt=mt.getBoundingClientRect();return[yt.left,yt.top]}var Te=de(this.els[0]),he=de(this.els[1]),Y=de(this.els[2]),gt=de(this.els[3]),V=E(T(gt,he),T(gt,Y),T(x(he,Y),x(gt,Te))),O=b(1+V[0],T(he,Te)),S=b(1+V[1],T(Y,Te));if(g){var y=g,I=V[0]*y[0]/i+V[1]*y[1]/i+1,ke=x(b(y[0],O),b(y[1],S));return x(b(1/I/i,ke),Te)}var Qe=T(c,Te),Je=E(T(O,b(V[0],Qe)),T(S,b(V[1],Qe)),Qe);return b(i,Je)},t}();e.prototype.$characterSize={width:0,height:0},M.implement(e.prototype,n),v.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(p,v,fe){fe.exports=`
258
+ .ace_br1 {border-top-left-radius : 3px;}
259
+ .ace_br2 {border-top-right-radius : 3px;}
260
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
261
+ .ace_br4 {border-bottom-right-radius: 3px;}
262
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
263
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
264
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
265
+ .ace_br8 {border-bottom-left-radius : 3px;}
266
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
267
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
268
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
269
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
271
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
272
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
273
+
274
+
275
+ .ace_editor {
276
+ position: relative;
277
+ overflow: hidden;
278
+ padding: 0;
279
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
280
+ direction: ltr;
281
+ text-align: left;
282
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
283
+ forced-color-adjust: none;
284
+ }
285
+
286
+ .ace_scroller {
287
+ position: absolute;
288
+ overflow: hidden;
289
+ top: 0;
290
+ bottom: 0;
291
+ background-color: inherit;
292
+ -ms-user-select: none;
293
+ -moz-user-select: none;
294
+ -webkit-user-select: none;
295
+ user-select: none;
296
+ cursor: text;
297
+ }
298
+
299
+ .ace_content {
300
+ position: absolute;
301
+ box-sizing: border-box;
302
+ min-width: 100%;
303
+ contain: style size layout;
304
+ font-variant-ligatures: no-common-ligatures;
305
+ }
306
+ .ace_invisible {
307
+ font-variant-ligatures: none;
308
+ }
309
+
310
+ .ace_keyboard-focus:focus {
311
+ box-shadow: inset 0 0 0 2px #5E9ED6;
312
+ outline: none;
313
+ }
314
+
315
+ .ace_dragging .ace_scroller:before{
316
+ position: absolute;
317
+ top: 0;
318
+ left: 0;
319
+ right: 0;
320
+ bottom: 0;
321
+ content: '';
322
+ background: rgba(250, 250, 250, 0.01);
323
+ z-index: 1000;
324
+ }
325
+ .ace_dragging.ace_dark .ace_scroller:before{
326
+ background: rgba(0, 0, 0, 0.01);
327
+ }
328
+
329
+ .ace_gutter {
330
+ position: absolute;
331
+ overflow : hidden;
332
+ width: auto;
333
+ top: 0;
334
+ bottom: 0;
335
+ left: 0;
336
+ cursor: default;
337
+ z-index: 4;
338
+ -ms-user-select: none;
339
+ -moz-user-select: none;
340
+ -webkit-user-select: none;
341
+ user-select: none;
342
+ contain: style size layout;
343
+ }
344
+
345
+ .ace_gutter-active-line {
346
+ position: absolute;
347
+ left: 0;
348
+ right: 0;
349
+ }
350
+
351
+ .ace_scroller.ace_scroll-left:after {
352
+ content: "";
353
+ position: absolute;
354
+ top: 0;
355
+ right: 0;
356
+ bottom: 0;
357
+ left: 0;
358
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
359
+ pointer-events: none;
360
+ }
361
+
362
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
363
+ position: absolute;
364
+ top: 0;
365
+ left: 0;
366
+ right: 0;
367
+ padding-left: 19px;
368
+ padding-right: 6px;
369
+ background-repeat: no-repeat;
370
+ }
371
+
372
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
373
+ margin-left: -14px;
374
+ float: left;
375
+ }
376
+
377
+ .ace_gutter-cell .ace_gutter_annotation {
378
+ margin-left: -19px;
379
+ float: left;
380
+ }
381
+
382
+ .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 {
383
+ 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==");
384
+ background-repeat: no-repeat;
385
+ background-position: 2px center;
386
+ }
387
+
388
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
389
+ 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==");
390
+ background-repeat: no-repeat;
391
+ background-position: 2px center;
392
+ }
393
+
394
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
395
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
396
+ background-repeat: no-repeat;
397
+ background-position: 2px center;
398
+ }
399
+
400
+ .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 {
401
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
402
+ }
403
+
404
+ .ace_icon_svg.ace_error {
405
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
406
+ background-color: crimson;
407
+ }
408
+ .ace_icon_svg.ace_security {
409
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
410
+ background-color: crimson;
411
+ }
412
+ .ace_icon_svg.ace_warning {
413
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
414
+ background-color: darkorange;
415
+ }
416
+ .ace_icon_svg.ace_info {
417
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
418
+ background-color: royalblue;
419
+ }
420
+ .ace_icon_svg.ace_hint {
421
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
422
+ background-color: silver;
423
+ }
424
+
425
+ .ace_icon_svg.ace_error_fold {
426
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
427
+ background-color: crimson;
428
+ }
429
+ .ace_icon_svg.ace_security_fold {
430
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
431
+ background-color: crimson;
432
+ }
433
+ .ace_icon_svg.ace_warning_fold {
434
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
435
+ background-color: darkorange;
436
+ }
437
+
438
+ .ace_scrollbar {
439
+ contain: strict;
440
+ position: absolute;
441
+ right: 0;
442
+ bottom: 0;
443
+ z-index: 6;
444
+ }
445
+
446
+ .ace_scrollbar-inner {
447
+ position: absolute;
448
+ cursor: text;
449
+ left: 0;
450
+ top: 0;
451
+ }
452
+
453
+ .ace_scrollbar-v{
454
+ overflow-x: hidden;
455
+ overflow-y: scroll;
456
+ top: 0;
457
+ }
458
+
459
+ .ace_scrollbar-h {
460
+ overflow-x: scroll;
461
+ overflow-y: hidden;
462
+ left: 0;
463
+ }
464
+
465
+ .ace_print-margin {
466
+ position: absolute;
467
+ height: 100%;
468
+ }
469
+
470
+ .ace_text-input {
471
+ position: absolute;
472
+ z-index: 0;
473
+ width: 0.5em;
474
+ height: 1em;
475
+ opacity: 0;
476
+ background: transparent;
477
+ -moz-appearance: none;
478
+ appearance: none;
479
+ border: none;
480
+ resize: none;
481
+ outline: none;
482
+ overflow: hidden;
483
+ font: inherit;
484
+ padding: 0 1px;
485
+ margin: 0 -1px;
486
+ contain: strict;
487
+ -ms-user-select: text;
488
+ -moz-user-select: text;
489
+ -webkit-user-select: text;
490
+ user-select: text;
491
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
492
+ white-space: pre!important;
493
+ }
494
+ .ace_text-input.ace_composition {
495
+ background: transparent;
496
+ color: inherit;
497
+ z-index: 1000;
498
+ opacity: 1;
499
+ }
500
+ .ace_composition_placeholder { color: transparent }
501
+ .ace_composition_marker {
502
+ border-bottom: 1px solid;
503
+ position: absolute;
504
+ border-radius: 0;
505
+ margin-top: 1px;
506
+ }
507
+
508
+ [ace_nocontext=true] {
509
+ transform: none!important;
510
+ filter: none!important;
511
+ clip-path: none!important;
512
+ mask : none!important;
513
+ contain: none!important;
514
+ perspective: none!important;
515
+ mix-blend-mode: initial!important;
516
+ z-index: auto;
517
+ }
518
+
519
+ .ace_layer {
520
+ z-index: 1;
521
+ position: absolute;
522
+ overflow: hidden;
523
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
524
+ word-wrap: normal;
525
+ white-space: pre;
526
+ height: 100%;
527
+ width: 100%;
528
+ box-sizing: border-box;
529
+ /* setting pointer-events: auto; on node under the mouse, which changes
530
+ during scroll, will break mouse wheel scrolling in Safari */
531
+ pointer-events: none;
532
+ }
533
+
534
+ .ace_gutter-layer {
535
+ position: relative;
536
+ width: auto;
537
+ text-align: right;
538
+ pointer-events: auto;
539
+ height: 1000000px;
540
+ contain: style size layout;
541
+ }
542
+
543
+ .ace_text-layer {
544
+ font: inherit !important;
545
+ position: absolute;
546
+ height: 1000000px;
547
+ width: 1000000px;
548
+ contain: style size layout;
549
+ }
550
+
551
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
552
+ contain: style size layout;
553
+ position: absolute;
554
+ top: 0;
555
+ left: 0;
556
+ right: 0;
557
+ }
558
+
559
+ .ace_hidpi .ace_text-layer,
560
+ .ace_hidpi .ace_gutter-layer,
561
+ .ace_hidpi .ace_content,
562
+ .ace_hidpi .ace_gutter {
563
+ contain: strict;
564
+ }
565
+ .ace_hidpi .ace_text-layer > .ace_line,
566
+ .ace_hidpi .ace_text-layer > .ace_line_group {
567
+ contain: strict;
568
+ }
569
+
570
+ .ace_cjk {
571
+ display: inline-block;
572
+ text-align: center;
573
+ }
574
+
575
+ .ace_cursor-layer {
576
+ z-index: 4;
577
+ }
578
+
579
+ .ace_cursor {
580
+ z-index: 4;
581
+ position: absolute;
582
+ box-sizing: border-box;
583
+ border-left: 2px solid;
584
+ /* workaround for smooth cursor repaintng whole screen in chrome */
585
+ transform: translatez(0);
586
+ }
587
+
588
+ .ace_multiselect .ace_cursor {
589
+ border-left-width: 1px;
590
+ }
591
+
592
+ .ace_slim-cursors .ace_cursor {
593
+ border-left-width: 1px;
594
+ }
595
+
596
+ .ace_overwrite-cursors .ace_cursor {
597
+ border-left-width: 0;
598
+ border-bottom: 1px solid;
599
+ }
600
+
601
+ .ace_hidden-cursors .ace_cursor {
602
+ opacity: 0.2;
603
+ }
604
+
605
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
606
+ opacity: 0;
607
+ }
608
+
609
+ .ace_smooth-blinking .ace_cursor {
610
+ transition: opacity 0.18s;
611
+ }
612
+
613
+ .ace_animate-blinking .ace_cursor {
614
+ animation-duration: 1000ms;
615
+ animation-timing-function: step-end;
616
+ animation-name: blink-ace-animate;
617
+ animation-iteration-count: infinite;
618
+ }
619
+
620
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
621
+ animation-duration: 1000ms;
622
+ animation-timing-function: ease-in-out;
623
+ animation-name: blink-ace-animate-smooth;
624
+ }
625
+
626
+ @keyframes blink-ace-animate {
627
+ from, to { opacity: 1; }
628
+ 60% { opacity: 0; }
629
+ }
630
+
631
+ @keyframes blink-ace-animate-smooth {
632
+ from, to { opacity: 1; }
633
+ 45% { opacity: 1; }
634
+ 60% { opacity: 0; }
635
+ 85% { opacity: 0; }
636
+ }
637
+
638
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
639
+ position: absolute;
640
+ z-index: 3;
641
+ }
642
+
643
+ .ace_marker-layer .ace_selection {
644
+ position: absolute;
645
+ z-index: 5;
646
+ }
647
+
648
+ .ace_marker-layer .ace_bracket {
649
+ position: absolute;
650
+ z-index: 6;
651
+ }
652
+
653
+ .ace_marker-layer .ace_error_bracket {
654
+ position: absolute;
655
+ border-bottom: 1px solid #DE5555;
656
+ border-radius: 0;
657
+ }
658
+
659
+ .ace_marker-layer .ace_active-line {
660
+ position: absolute;
661
+ z-index: 2;
662
+ }
663
+
664
+ .ace_marker-layer .ace_selected-word {
665
+ position: absolute;
666
+ z-index: 4;
667
+ box-sizing: border-box;
668
+ }
669
+
670
+ .ace_line .ace_fold {
671
+ box-sizing: border-box;
672
+
673
+ display: inline-block;
674
+ height: 11px;
675
+ margin-top: -2px;
676
+ vertical-align: middle;
677
+
678
+ background-image:
679
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
680
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
681
+ background-repeat: no-repeat, repeat-x;
682
+ background-position: center center, top left;
683
+ color: transparent;
684
+
685
+ border: 1px solid black;
686
+ border-radius: 2px;
687
+
688
+ cursor: pointer;
689
+ pointer-events: auto;
690
+ }
691
+
692
+ .ace_dark .ace_fold {
693
+ }
694
+
695
+ .ace_fold:hover{
696
+ background-image:
697
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
698
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
699
+ }
700
+
701
+ .ace_tooltip {
702
+ background-color: #f5f5f5;
703
+ border: 1px solid gray;
704
+ border-radius: 1px;
705
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
706
+ color: black;
707
+ padding: 3px 4px;
708
+ position: fixed;
709
+ z-index: 999999;
710
+ box-sizing: border-box;
711
+ cursor: default;
712
+ white-space: pre-wrap;
713
+ word-wrap: break-word;
714
+ line-height: normal;
715
+ font-style: normal;
716
+ font-weight: normal;
717
+ letter-spacing: normal;
718
+ pointer-events: none;
719
+ overflow: auto;
720
+ max-width: min(33em, 66vw);
721
+ overscroll-behavior: contain;
722
+ }
723
+ .ace_tooltip pre {
724
+ white-space: pre-wrap;
725
+ }
726
+
727
+ .ace_tooltip.ace_dark {
728
+ background-color: #636363;
729
+ color: #fff;
730
+ }
731
+
732
+ .ace_tooltip:focus {
733
+ outline: 1px solid #5E9ED6;
734
+ }
735
+
736
+ .ace_icon {
737
+ display: inline-block;
738
+ width: 18px;
739
+ vertical-align: top;
740
+ }
741
+
742
+ .ace_icon_svg {
743
+ display: inline-block;
744
+ width: 12px;
745
+ vertical-align: top;
746
+ -webkit-mask-repeat: no-repeat;
747
+ -webkit-mask-size: 12px;
748
+ -webkit-mask-position: center;
749
+ }
750
+
751
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
752
+ padding-right: 13px;
753
+ }
754
+
755
+ .ace_fold-widget, .ace_custom-widget {
756
+ box-sizing: border-box;
757
+
758
+ margin: 0 -12px 0 1px;
759
+ display: none;
760
+ width: 11px;
761
+ vertical-align: top;
762
+
763
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
764
+ background-repeat: no-repeat;
765
+ background-position: center;
766
+
767
+ border-radius: 3px;
768
+
769
+ border: 1px solid transparent;
770
+ cursor: pointer;
771
+ pointer-events: auto;
772
+ }
773
+
774
+ .ace_custom-widget {
775
+ background: none;
776
+ }
777
+
778
+ .ace_folding-enabled .ace_fold-widget {
779
+ display: inline-block;
780
+ }
781
+
782
+ .ace_fold-widget.ace_end {
783
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
784
+ }
785
+
786
+ .ace_fold-widget.ace_closed {
787
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
788
+ }
789
+
790
+ .ace_fold-widget:hover {
791
+ border: 1px solid rgba(0, 0, 0, 0.3);
792
+ background-color: rgba(255, 255, 255, 0.2);
793
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
794
+ }
795
+
796
+ .ace_fold-widget:active {
797
+ border: 1px solid rgba(0, 0, 0, 0.4);
798
+ background-color: rgba(0, 0, 0, 0.05);
799
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
800
+ }
801
+ /**
802
+ * Dark version for fold widgets
803
+ */
804
+ .ace_dark .ace_fold-widget {
805
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
806
+ }
807
+ .ace_dark .ace_fold-widget.ace_end {
808
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
809
+ }
810
+ .ace_dark .ace_fold-widget.ace_closed {
811
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
812
+ }
813
+ .ace_dark .ace_fold-widget:hover {
814
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
815
+ background-color: rgba(255, 255, 255, 0.1);
816
+ }
817
+ .ace_dark .ace_fold-widget:active {
818
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
819
+ }
820
+
821
+ .ace_inline_button {
822
+ border: 1px solid lightgray;
823
+ display: inline-block;
824
+ margin: -1px 8px;
825
+ padding: 0 5px;
826
+ pointer-events: auto;
827
+ cursor: pointer;
828
+ }
829
+ .ace_inline_button:hover {
830
+ border-color: gray;
831
+ background: rgba(200,200,200,0.2);
832
+ display: inline-block;
833
+ pointer-events: auto;
834
+ }
835
+
836
+ .ace_fold-widget.ace_invalid {
837
+ background-color: #FFB4B4;
838
+ border-color: #DE5555;
839
+ }
840
+
841
+ .ace_fade-fold-widgets .ace_fold-widget {
842
+ transition: opacity 0.4s ease 0.05s;
843
+ opacity: 0;
844
+ }
845
+
846
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
847
+ transition: opacity 0.05s ease 0.05s;
848
+ opacity:1;
849
+ }
850
+
851
+ .ace_underline {
852
+ text-decoration: underline;
853
+ }
854
+
855
+ .ace_bold {
856
+ font-weight: bold;
857
+ }
858
+
859
+ .ace_nobold .ace_bold {
860
+ font-weight: normal;
861
+ }
862
+
863
+ .ace_italic {
864
+ font-style: italic;
865
+ }
866
+
867
+
868
+ .ace_error-marker {
869
+ background-color: rgba(255, 0, 0,0.2);
870
+ position: absolute;
871
+ z-index: 9;
872
+ }
873
+
874
+ .ace_highlight-marker {
875
+ background-color: rgba(255, 255, 0,0.2);
876
+ position: absolute;
877
+ z-index: 8;
878
+ }
879
+
880
+ .ace_mobile-menu {
881
+ position: absolute;
882
+ line-height: 1.5;
883
+ border-radius: 4px;
884
+ -ms-user-select: none;
885
+ -moz-user-select: none;
886
+ -webkit-user-select: none;
887
+ user-select: none;
888
+ background: white;
889
+ box-shadow: 1px 3px 2px grey;
890
+ border: 1px solid #dcdcdc;
891
+ color: black;
892
+ }
893
+ .ace_dark > .ace_mobile-menu {
894
+ background: #333;
895
+ color: #ccc;
896
+ box-shadow: 1px 3px 2px grey;
897
+ border: 1px solid #444;
898
+
899
+ }
900
+ .ace_mobile-button {
901
+ padding: 2px;
902
+ cursor: pointer;
903
+ overflow: hidden;
904
+ }
905
+ .ace_mobile-button:hover {
906
+ background-color: #eee;
907
+ opacity:1;
908
+ }
909
+ .ace_mobile-button:active {
910
+ background-color: #ddd;
911
+ }
912
+
913
+ .ace_placeholder {
914
+ position: relative;
915
+ font-family: arial;
916
+ transform: scale(0.9);
917
+ transform-origin: left;
918
+ white-space: pre;
919
+ opacity: 0.7;
920
+ margin: 0 10px;
921
+ z-index: 1;
922
+ }
923
+
924
+ .ace_ghost_text {
925
+ opacity: 0.5;
926
+ font-style: italic;
927
+ }
928
+
929
+ .ace_ghost_text_container > div {
930
+ white-space: pre;
931
+ }
932
+
933
+ .ghost_text_line_wrapped::after {
934
+ content: "↩";
935
+ position: absolute;
936
+ }
937
+
938
+ .ace_lineWidgetContainer.ace_ghost_text {
939
+ margin: 0px 4px
940
+ }
941
+
942
+ .ace_screenreader-only {
943
+ position:absolute;
944
+ left:-10000px;
945
+ top:auto;
946
+ width:1px;
947
+ height:1px;
948
+ overflow:hidden;
949
+ }
950
+
951
+ .ace_hidden_token {
952
+ display: none;
953
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(p,v,fe){var M=p("../lib/dom"),w=p("../lib/oop"),A=p("../lib/event_emitter").EventEmitter,a=function(){function u(n,o){this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(n)}return u.prototype.$createCanvas=function(){this.canvas=M.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},u.prototype.setScrollBarV=function(n){this.$createCanvas(),this.scrollbarV=n,n.element.appendChild(this.canvas),this.setDimensions()},u.prototype.$updateDecorators=function(n){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(n);var r=this.canvas.getContext("2d");function i(O,S){return O.priority<S.priority?-1:O.priority>S.priority?1:0}var e=this.renderer.session.$annotations;if(r.clearRect(0,0,this.canvas.width,this.canvas.height),e){var t={info:1,warning:2,error:3};e.forEach(function(O){O.priority=t[O.type]||null}),e=e.sort(i);for(var c=0;c<e.length;c++){var g=e[c].row,m=this.getVerticalOffsetForRow(g),E=m+this.lineHeight,T=Math.round(this.heightRatio*m),x=Math.round(this.heightRatio*E),b=Math.round((T+x)/2),de=x-b;de<this.halfMinDecorationHeight&&(de=this.halfMinDecorationHeight),b-de<0&&(b=de),b+de>this.canvasHeight&&(b=this.canvasHeight-de);var Te=b-de,he=b+de,Y=he-Te;r.fillStyle=o[e[c].type]||null,r.fillRect(0,Te,Math.round(this.oneZoneWidth-1),Y)}}var gt=this.renderer.session.selection.getCursor();if(gt){var V=Math.round(this.getVerticalOffsetForRow(gt.row)*this.heightRatio);r.fillStyle="rgba(0, 0, 0, 0.5)",r.fillRect(0,V,this.canvasWidth,2)}},u.prototype.getVerticalOffsetForRow=function(n){n=n|0;var o=this.renderer.session.documentToScreenRow(n,0)*this.lineHeight;return o},u.prototype.setDimensions=function(n){n=n||this.renderer.layerConfig,this.maxHeight=n.maxHeight,this.lineHeight=n.lineHeight,this.canvasHeight=n.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},u.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},u.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},u}();w.implement(a.prototype,A),v.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(p,v,fe){var M=p("./lib/oop"),w=p("./lib/dom"),A=p("./lib/lang"),a=p("./config"),u=p("./layer/gutter").Gutter,n=p("./layer/marker").Marker,o=p("./layer/text").Text,r=p("./layer/cursor").Cursor,i=p("./scrollbar").HScrollBar,e=p("./scrollbar").VScrollBar,t=p("./scrollbar_custom").HScrollBar,c=p("./scrollbar_custom").VScrollBar,g=p("./renderloop").RenderLoop,m=p("./layer/font_metrics").FontMetrics,E=p("./lib/event_emitter").EventEmitter,T=p("./css/editor-css"),x=p("./layer/decorators").Decorator,b=p("./lib/useragent"),de=p("./layer/text_util").isTextToken;w.importCssString(T,"ace_editor.css",!1);var Te=function(){function he(Y,gt){var V=this;this.container=Y||w.createElement("div"),w.addCssClass(this.container,"ace_editor"),w.HI_DPI&&w.addCssClass(this.container,"ace_hidpi"),this.setTheme(gt),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=w.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=w.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=w.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 n(this.content);var O=this.$textLayer=new o(this.content);this.canvas=O.element,this.$markerFront=new n(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 i(this.container,this),this.scrollBarV.on("scroll",function(S){V.$scrollAnimation||V.session.setScrollTop(S.data-V.scrollMargin.top)}),this.scrollBarH.on("scroll",function(S){V.$scrollAnimation||V.session.setScrollLeft(S.data-V.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(S){V.updateCharacterSize(),V.onResize(!0,V.gutterWidth,V.$size.width,V.$size.height),V._signal("changeCharacterSize",S)}),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=!b.isIOS,this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return he.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(),w.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},he.prototype.setSession=function(Y){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=Y,Y&&this.scrollMargin.top&&Y.getScrollTop()<=0&&Y.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(Y),this.$markerBack.setSession(Y),this.$markerFront.setSession(Y),this.$gutterLayer.setSession(Y),this.$textLayer.setSession(Y),Y&&(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))},he.prototype.updateLines=function(Y,gt,V){if(gt===void 0&&(gt=1/0),this.$changedLines?(this.$changedLines.firstRow>Y&&(this.$changedLines.firstRow=Y),this.$changedLines.lastRow<gt&&(this.$changedLines.lastRow=gt)):this.$changedLines={firstRow:Y,lastRow:gt},this.$changedLines.lastRow<this.layerConfig.firstRow)if(V)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},he.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},he.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},he.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},he.prototype.updateFull=function(Y){Y?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},he.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},he.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},he.prototype.onResize=function(Y,gt,V,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=Y?1:0;var S=this.container;O||(O=S.clientHeight||S.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!S.style.height||S.style.height=="0px")&&(S.style.height="1px",O=S.clientHeight||S.scrollHeight),V||(V=S.clientWidth||S.scrollWidth);var y=this.$updateCachedSize(Y,gt,V,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!V&&!O)return this.resizing=0;Y&&(this.$gutterLayer.$padding=null),Y?this.$renderChanges(y|this.$changes,!0):this.$loop.schedule(y|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},he.prototype.$updateCachedSize=function(Y,gt,V,O){O-=this.$extraHeight||0;var S=0,y=this.$size,I={width:y.width,height:y.height,scrollerHeight:y.scrollerHeight,scrollerWidth:y.scrollerWidth};if(O&&(Y||y.height!=O)&&(y.height=O,S|=this.CHANGE_SIZE,y.scrollerHeight=y.height,this.$horizScroll&&(y.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(y.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",S=S|this.CHANGE_SCROLL),V&&(Y||y.width!=V)){S|=this.CHANGE_SIZE,y.width=V,gt==null&&(gt=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=gt,w.setStyle(this.scrollBarH.element.style,"left",gt+"px"),w.setStyle(this.scroller.style,"left",gt+this.margin.left+"px"),y.scrollerWidth=Math.max(0,V-gt-this.scrollBarV.getWidth()-this.margin.h),w.setStyle(this.$gutter.style,"left",this.margin.left+"px");var ke=this.scrollBarV.getWidth()+"px";w.setStyle(this.scrollBarH.element.style,"right",ke),w.setStyle(this.scroller.style,"right",ke),w.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(y.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||Y)&&(S|=this.CHANGE_FULL)}return y.$dirty=!V||!O,S&&this._signal("resize",I),S},he.prototype.onGutterResize=function(Y){var gt=this.$showGutter?Y:0;gt!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,gt,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()},he.prototype.adjustWrapLimit=function(){var Y=this.$size.scrollerWidth-this.$padding*2,gt=Math.floor(Y/this.characterWidth);return this.session.adjustWrapLimit(gt,this.$showPrintMargin&&this.$printMarginColumn)},he.prototype.setAnimatedScroll=function(Y){this.setOption("animatedScroll",Y)},he.prototype.getAnimatedScroll=function(){return this.$animatedScroll},he.prototype.setShowInvisibles=function(Y){this.setOption("showInvisibles",Y),this.session.$bidiHandler.setShowInvisibles(Y)},he.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},he.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},he.prototype.setDisplayIndentGuides=function(Y){this.setOption("displayIndentGuides",Y)},he.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},he.prototype.setHighlightIndentGuides=function(Y){this.setOption("highlightIndentGuides",Y)},he.prototype.setShowPrintMargin=function(Y){this.setOption("showPrintMargin",Y)},he.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},he.prototype.setPrintMarginColumn=function(Y){this.setOption("printMarginColumn",Y)},he.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},he.prototype.getShowGutter=function(){return this.getOption("showGutter")},he.prototype.setShowGutter=function(Y){return this.setOption("showGutter",Y)},he.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},he.prototype.setFadeFoldWidgets=function(Y){this.setOption("fadeFoldWidgets",Y)},he.prototype.setHighlightGutterLine=function(Y){this.setOption("highlightGutterLine",Y)},he.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},he.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var Y=w.createElement("div");Y.className="ace_layer ace_print-margin-layer",this.$printMarginEl=w.createElement("div"),this.$printMarginEl.className="ace_print-margin",Y.appendChild(this.$printMarginEl),this.content.insertBefore(Y,this.content.firstChild)}var gt=this.$printMarginEl.style;gt.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",gt.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},he.prototype.getContainerElement=function(){return this.container},he.prototype.getMouseEventTarget=function(){return this.scroller},he.prototype.getTextAreaContainer=function(){return this.container},he.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var Y=this.textarea.style,gt=this.$composition;if(!this.$keepTextAreaAtCursor&&!gt){w.translate(this.textarea,-100,0);return}var V=this.$cursorLayer.$pixelPos;if(V){gt&&gt.markerRange&&(V=this.$cursorLayer.getPixelPosition(gt.markerRange.start,!0));var O=this.layerConfig,S=V.top,y=V.left;S-=O.offset;var I=gt&&gt.useTextareaForIME||b.isMobile?this.lineHeight:1;if(S<0||S>O.height-I){w.translate(this.textarea,0,0);return}var ke=1,Qe=this.$size.height-I;if(!gt)S+=this.lineHeight;else if(gt.useTextareaForIME){var Je=this.textarea.value;ke=this.characterWidth*this.session.$getStringScreenWidth(Je)[0]}else S+=this.lineHeight+2;y-=this.scrollLeft,y>this.$size.scrollerWidth-ke&&(y=this.$size.scrollerWidth-ke),y+=this.gutterWidth+this.margin.left,w.setStyle(Y,"height",I+"px"),w.setStyle(Y,"width",ke+"px"),w.translate(this.textarea,Math.min(y,this.$size.scrollerWidth-ke),Math.min(S,Qe))}}},he.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},he.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},he.prototype.getLastFullyVisibleRow=function(){var Y=this.layerConfig,gt=Y.lastRow,V=this.session.documentToScreenRow(gt,0)*Y.lineHeight;return V-this.session.getScrollTop()>Y.height-Y.lineHeight?gt-1:gt},he.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},he.prototype.setPadding=function(Y){this.$padding=Y,this.$textLayer.setPadding(Y),this.$cursorLayer.setPadding(Y),this.$markerFront.setPadding(Y),this.$markerBack.setPadding(Y),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},he.prototype.setScrollMargin=function(Y,gt,V,O){var S=this.scrollMargin;S.top=Y|0,S.bottom=gt|0,S.right=O|0,S.left=V|0,S.v=S.top+S.bottom,S.h=S.left+S.right,S.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-S.top),this.updateFull()},he.prototype.setMargin=function(Y,gt,V,O){var S=this.margin;S.top=Y|0,S.bottom=gt|0,S.right=O|0,S.left=V|0,S.v=S.top+S.bottom,S.h=S.left+S.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},he.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},he.prototype.setHScrollBarAlwaysVisible=function(Y){this.setOption("hScrollBarAlwaysVisible",Y)},he.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},he.prototype.setVScrollBarAlwaysVisible=function(Y){this.setOption("vScrollBarAlwaysVisible",Y)},he.prototype.$updateScrollBarV=function(){var Y=this.layerConfig.maxHeight,gt=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(Y-=(gt-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>Y-gt&&(Y=this.scrollTop+gt,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(Y+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},he.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},he.prototype.freeze=function(){this.$frozen=!0},he.prototype.unfreeze=function(){this.$frozen=!1},he.prototype.$renderChanges=function(Y,gt){if(this.$changes&&(Y|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!Y&&!gt){this.$changes|=Y;return}if(this.$size.$dirty)return this.$changes|=Y,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",Y),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var V=this.layerConfig;if(Y&this.CHANGE_FULL||Y&this.CHANGE_SIZE||Y&this.CHANGE_TEXT||Y&this.CHANGE_LINES||Y&this.CHANGE_SCROLL||Y&this.CHANGE_H_SCROLL){if(Y|=this.$computeLayerConfig()|this.$loop.clear(),V.firstRow!=this.layerConfig.firstRow&&V.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(V.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,Y=Y|this.CHANGE_SCROLL,Y|=this.$computeLayerConfig()|this.$loop.clear())}V=this.layerConfig,this.$updateScrollBarV(),Y&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),w.translate(this.content,-this.scrollLeft,-V.offset);var S=V.width+2*this.$padding+"px",y=V.minHeight+"px";w.setStyle(this.content.style,"width",S),w.setStyle(this.content.style,"height",y)}if(Y&this.CHANGE_H_SCROLL&&(w.translate(this.content,-this.scrollLeft,-V.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),Y&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(V),this.$showGutter&&this.$gutterLayer.update(V),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V),this.$markerBack.update(V),this.$markerFront.update(V),this.$cursorLayer.update(V),this.$moveTextAreaToCursor(),this._signal("afterRender",Y);return}if(Y&this.CHANGE_SCROLL){this.$changedLines=null,Y&this.CHANGE_TEXT||Y&this.CHANGE_LINES?this.$textLayer.update(V):this.$textLayer.scrollLines(V),this.$showGutter&&(Y&this.CHANGE_GUTTER||Y&this.CHANGE_LINES?this.$gutterLayer.update(V):this.$gutterLayer.scrollLines(V)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V),this.$markerBack.update(V),this.$markerFront.update(V),this.$cursorLayer.update(V),this.$moveTextAreaToCursor(),this._signal("afterRender",Y);return}Y&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(V),this.$showGutter&&this.$gutterLayer.update(V),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V)):Y&this.CHANGE_LINES?((this.$updateLines()||Y&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(V),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V)):Y&this.CHANGE_TEXT||Y&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(V),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V)):Y&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(V),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V)),Y&this.CHANGE_CURSOR&&(this.$cursorLayer.update(V),this.$moveTextAreaToCursor()),Y&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(V),Y&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(V),this._signal("afterRender",Y)},he.prototype.$autosize=function(){var Y=this.session.getScreenLength()*this.lineHeight,gt=this.$maxLines*this.lineHeight,V=Math.min(gt,Math.max((this.$minLines||1)*this.lineHeight,Y))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(V+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&V>this.$maxPixelHeight&&(V=this.$maxPixelHeight);var O=V<=2*this.lineHeight,S=!O&&Y>gt;if(V!=this.desiredHeight||this.$size.height!=this.desiredHeight||S!=this.$vScroll){S!=this.$vScroll&&(this.$vScroll=S,this.scrollBarV.setVisible(S));var y=this.container.clientWidth;this.container.style.height=V+"px",this.$updateCachedSize(!0,this.$gutterWidth,y,V),this.desiredHeight=V,this._signal("autosize")}},he.prototype.$computeLayerConfig=function(){var Y=this.session,gt=this.$size,V=gt.height<=2*this.lineHeight,O=this.session.getScreenLength(),S=O*this.lineHeight,y=this.$getLongestLine(),I=!V&&(this.$hScrollBarAlwaysVisible||gt.scrollerWidth-y-2*this.$padding<0),ke=this.$horizScroll!==I;ke&&(this.$horizScroll=I,this.scrollBarH.setVisible(I));var Qe=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),V=gt.height<=2*this.lineHeight);var Je=gt.scrollerHeight+this.lineHeight,mt=!this.$maxLines&&this.$scrollPastEnd?(gt.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;S+=mt;var yt=this.scrollMargin;this.session.setScrollTop(Math.max(-yt.top,Math.min(this.scrollTop,S-gt.scrollerHeight+yt.bottom))),this.session.setScrollLeft(Math.max(-yt.left,Math.min(this.scrollLeft,y+2*this.$padding-gt.scrollerWidth+yt.right)));var Qt=!V&&(this.$vScrollBarAlwaysVisible||gt.scrollerHeight-S+mt<0||this.scrollTop>yt.top),bt=Qe!==Qt;bt&&(this.$vScroll=Qt,this.scrollBarV.setVisible(Qt));var Gt=this.scrollTop%this.lineHeight,Yt=Math.ceil(Je/this.lineHeight)-1,Zt=Math.max(0,Math.round((this.scrollTop-Gt)/this.lineHeight)),Jt=Zt+Yt,pi,mi,gi=this.lineHeight;Zt=Y.screenToDocumentRow(Zt,0);var vi=Y.getFoldLine(Zt);vi&&(Zt=vi.start.row),pi=Y.documentToScreenRow(Zt,0),mi=Y.getRowLength(Zt)*gi,Jt=Math.min(Y.screenToDocumentRow(Jt,0),Y.getLength()-1),Je=gt.scrollerHeight+Y.getRowLength(Jt)*gi+mi,Gt=this.scrollTop-pi*gi,Gt<0&&pi>0&&(pi=Math.max(0,pi+Math.floor(Gt/gi)),Gt=this.scrollTop-pi*gi);var wi=0;return(this.layerConfig.width!=y||ke)&&(wi=this.CHANGE_H_SCROLL),(ke||bt)&&(wi|=this.$updateCachedSize(!0,this.gutterWidth,gt.width,gt.height),this._signal("scrollbarVisibilityChanged"),bt&&(y=this.$getLongestLine())),this.layerConfig={width:y,padding:this.$padding,firstRow:Zt,firstRowScreen:pi,lastRow:Jt,lineHeight:gi,characterWidth:this.characterWidth,minHeight:Je,maxHeight:S,offset:Gt,gutterOffset:gi?Math.max(0,Math.ceil((Gt+gt.height-gt.scrollerHeight)/gi)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(y-this.$padding),wi},he.prototype.$updateLines=function(){if(this.$changedLines){var Y=this.$changedLines.firstRow,gt=this.$changedLines.lastRow;this.$changedLines=null;var V=this.layerConfig;if(!(Y>V.lastRow+1)&&!(gt<V.firstRow)){if(gt===1/0){this.$showGutter&&this.$gutterLayer.update(V),this.$textLayer.update(V);return}return this.$textLayer.updateLines(V,Y,gt),!0}}},he.prototype.$getLongestLine=function(){var Y=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(Y+=1),this.$textLayer&&Y>this.$textLayer.MAX_LINE_LENGTH&&(Y=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(Y*this.characterWidth))},he.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},he.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},he.prototype.addGutterDecoration=function(Y,gt){this.$gutterLayer.addGutterDecoration(Y,gt)},he.prototype.removeGutterDecoration=function(Y,gt){this.$gutterLayer.removeGutterDecoration(Y,gt)},he.prototype.updateBreakpoints=function(Y){this._rows=Y,this.$loop.schedule(this.CHANGE_GUTTER)},he.prototype.setAnnotations=function(Y){this.$gutterLayer.setAnnotations(Y),this.$loop.schedule(this.CHANGE_GUTTER)},he.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},he.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},he.prototype.showCursor=function(){this.$cursorLayer.showCursor()},he.prototype.scrollSelectionIntoView=function(Y,gt,V){this.scrollCursorIntoView(Y,V),this.scrollCursorIntoView(gt,V)},he.prototype.scrollCursorIntoView=function(Y,gt,V){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(Y),S=O.left,y=O.top,I=V&&V.top||0,ke=V&&V.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var Qe=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;Qe+I>y?(gt&&Qe+I>y+this.lineHeight&&(y-=gt*this.$size.scrollerHeight),y===0&&(y=-this.scrollMargin.top),this.session.setScrollTop(y)):Qe+this.$size.scrollerHeight-ke<y+this.lineHeight&&(gt&&Qe+this.$size.scrollerHeight-ke<y-this.lineHeight&&(y+=gt*this.$size.scrollerHeight),this.session.setScrollTop(y+this.lineHeight+ke-this.$size.scrollerHeight));var Je=this.scrollLeft,mt=2*this.layerConfig.characterWidth;S-mt<Je?(S-=mt,S<this.$padding+mt&&(S=-this.scrollMargin.left),this.session.setScrollLeft(S)):(S+=mt,Je+this.$size.scrollerWidth<S+this.characterWidth?this.session.setScrollLeft(Math.round(S+this.characterWidth-this.$size.scrollerWidth)):Je<=this.$padding&&S-Je<this.characterWidth&&this.session.setScrollLeft(0))}},he.prototype.getScrollTop=function(){return this.session.getScrollTop()},he.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},he.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},he.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},he.prototype.scrollToRow=function(Y){this.session.setScrollTop(Y*this.lineHeight)},he.prototype.alignCursor=function(Y,gt){typeof Y=="number"&&(Y={row:Y,column:0});var V=this.$cursorLayer.getPixelPosition(Y),O=this.$size.scrollerHeight-this.lineHeight,S=V.top-O*(gt||0);return this.session.setScrollTop(S),S},he.prototype.$calcSteps=function(Y,gt){var V=0,O=this.STEPS,S=[],y=function(I,ke,Qe){return Qe*(Math.pow(I-1,3)+1)+ke};for(V=0;V<O;++V)S.push(y(V/this.STEPS,Y,gt-Y));return S},he.prototype.scrollToLine=function(Y,gt,V,O){var S=this.$cursorLayer.getPixelPosition({row:Y,column:0}),y=S.top;gt&&(y-=this.$size.scrollerHeight/2);var I=this.scrollTop;this.session.setScrollTop(y),V!==!1&&this.animateScrolling(I,O)},he.prototype.animateScrolling=function(Y,gt){var V=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(Y==V)return;if(this.$scrollAnimation){var S=this.$scrollAnimation.steps;if(S.length&&(Y=S[0],Y==V))return}var y=O.$calcSteps(Y,V);this.$scrollAnimation={from:Y,to:V,steps:y},clearInterval(this.$timer),O.session.setScrollTop(y.shift()),O.session.$scrollTop=V;function I(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,gt&&gt()}this.$timer=setInterval(function(){if(O.$stopAnimation){I();return}if(!O.session)return clearInterval(O.$timer);y.length?(O.session.setScrollTop(y.shift()),O.session.$scrollTop=V):V!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(V),V=null):I()},10)},he.prototype.scrollToY=function(Y){this.scrollTop!==Y&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=Y)},he.prototype.scrollToX=function(Y){this.scrollLeft!==Y&&(this.scrollLeft=Y),this.$loop.schedule(this.CHANGE_H_SCROLL)},he.prototype.scrollTo=function(Y,gt){this.session.setScrollTop(gt),this.session.setScrollLeft(Y)},he.prototype.scrollBy=function(Y,gt){gt&&this.session.setScrollTop(this.session.getScrollTop()+gt),Y&&this.session.setScrollLeft(this.session.getScrollLeft()+Y)},he.prototype.isScrollableBy=function(Y,gt){if(gt<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||gt>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||Y<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||Y>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},he.prototype.pixelToScreenCoordinates=function(Y,gt){var V;if(this.$hasCssTransforms){V={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([Y,gt]);Y=O[1]-this.gutterWidth-this.margin.left,gt=O[0]}else V=this.scroller.getBoundingClientRect();var S=Y+this.scrollLeft-V.left-this.$padding,y=S/this.characterWidth,I=Math.floor((gt+this.scrollTop-V.top)/this.lineHeight),ke=this.$blockCursor?Math.floor(y):Math.round(y);return{row:I,column:ke,side:y-ke>0?1:-1,offsetX:S}},he.prototype.screenToTextCoordinates=function(Y,gt){var V;if(this.$hasCssTransforms){V={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([Y,gt]);Y=O[1]-this.gutterWidth-this.margin.left,gt=O[0]}else V=this.scroller.getBoundingClientRect();var S=Y+this.scrollLeft-V.left-this.$padding,y=S/this.characterWidth,I=this.$blockCursor?Math.floor(y):Math.round(y),ke=Math.floor((gt+this.scrollTop-V.top)/this.lineHeight);return this.session.screenToDocumentPosition(ke,Math.max(I,0),S)},he.prototype.textToScreenCoordinates=function(Y,gt){var V=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(Y,gt),S=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,Y)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),y=O.row*this.lineHeight;return{pageX:V.left+S-this.scrollLeft,pageY:V.top+y-this.scrollTop}},he.prototype.visualizeFocus=function(){w.addCssClass(this.container,"ace_focus")},he.prototype.visualizeBlur=function(){w.removeCssClass(this.container,"ace_focus")},he.prototype.showComposition=function(Y){this.$composition=Y,Y.cssText||(Y.cssText=this.textarea.style.cssText),Y.useTextareaForIME==null&&(Y.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(w.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):Y.markerId=this.session.addMarker(Y.markerRange,"ace_composition_marker","text")},he.prototype.setCompositionText=function(Y){var gt=this.session.selection.cursor;this.addToken(Y,"composition_placeholder",gt.row,gt.column),this.$moveTextAreaToCursor()},he.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),w.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var Y=this.session.selection.cursor;this.removeExtraToken(Y.row,Y.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},he.prototype.setGhostText=function(Y,gt){var V=this.session.selection.cursor,O=gt||{row:V.row,column:V.column};this.removeGhostText();var S=this.$calculateWrappedTextChunks(Y,O);this.addToken(S[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:Y,position:{row:O.row,column:O.column}};var y=w.createElement("div");if(S.length>1){var I=this.hideTokensAfterPosition(O.row,O.column),ke;S.slice(1).forEach(function(bt){var Gt=w.createElement("div"),Yt=w.createElement("span");Yt.className="ace_ghost_text",bt.wrapped&&(Gt.className="ghost_text_line_wrapped"),bt.text.length===0&&(bt.text=" "),Yt.appendChild(w.createTextNode(bt.text)),Gt.appendChild(Yt),y.appendChild(Gt),ke=Gt}),I.forEach(function(bt){var Gt=w.createElement("span");de(bt.type)||(Gt.className="ace_"+bt.type.replace(/\./g," ace_")),Gt.appendChild(w.createTextNode(bt.value)),ke.appendChild(Gt)}),this.$ghostTextWidget={el:y,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var Qe=this.$cursorLayer.getPixelPosition(O,!0),Je=this.container,mt=Je.getBoundingClientRect().height,yt=S.length*this.lineHeight,Qt=yt<mt-Qe.top;if(Qt)return;yt<mt?this.scrollBy(0,(S.length-1)*this.lineHeight):this.scrollToRow(O.row)}},he.prototype.$calculateWrappedTextChunks=function(Y,gt){var V=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(V/this.characterWidth)-2;O=O<=0?60:O;for(var S=Y.split(/\r?\n/),y=[],I=0;I<S.length;I++){var ke=this.session.$getDisplayTokens(S[I],gt.column),Qe=this.session.$computeWrapSplits(ke,O,this.session.$tabSize);if(Qe.length>0){var Je=0;Qe.push(S[I].length);for(var mt=0;mt<Qe.length;mt++){var yt=S[I].slice(Je,Qe[mt]);y.push({text:yt,wrapped:!0}),Je=Qe[mt]}}else y.push({text:S[I],wrapped:!1})}return y},he.prototype.removeGhostText=function(){if(this.$ghostText){var Y=this.$ghostText.position;this.removeExtraToken(Y.row,Y.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},he.prototype.addToken=function(Y,gt,V,O){var S=this.session;S.bgTokenizer.lines[V]=null;var y={type:gt,value:Y},I=S.getTokens(V);if(O==null||!I.length)I.push(y);else for(var ke=0,Qe=0;Qe<I.length;Qe++){var Je=I[Qe];if(ke+=Je.value.length,O<=ke){var mt=Je.value.length-(ke-O),yt=Je.value.slice(0,mt),Qt=Je.value.slice(mt);I.splice(Qe,1,{type:Je.type,value:yt},y,{type:Je.type,value:Qt});break}}this.updateLines(V,V)},he.prototype.hideTokensAfterPosition=function(Y,gt){for(var V=this.session.getTokens(Y),O=0,S=!1,y=[],I=0;I<V.length;I++){var ke=V[I];if(O+=ke.value.length,ke.type!=="ghost_text"){if(S){y.push({type:ke.type,value:ke.value}),ke.type="hidden_token";continue}O===gt&&(S=!0)}}return this.updateLines(Y,Y),y},he.prototype.removeExtraToken=function(Y,gt){this.session.bgTokenizer.lines[Y]=null,this.updateLines(Y,Y)},he.prototype.setTheme=function(Y,gt){var V=this;if(this.$themeId=Y,V._dispatchEvent("themeChange",{theme:Y}),!Y||typeof Y=="string"){var O=Y||this.$options.theme.initialValue;a.loadModule(["theme",O],S)}else S(Y);function S(y){if(V.$themeId!=Y)return gt&&gt();if(!y||!y.cssClass)throw new Error("couldn't load module "+Y+" or it didn't call define");y.$id&&(V.$themeId=y.$id),w.importCssString(y.cssText,y.cssClass,V.container),V.theme&&w.removeCssClass(V.container,V.theme.cssClass);var I="padding"in y?y.padding:"padding"in(V.theme||{})?4:V.$padding;if(V.$padding&&I!=V.$padding&&V.setPadding(I),V.$gutterLayer){var ke=y.$showGutterCursorMarker;ke&&!V.$gutterLayer.$showCursorMarker?V.$gutterLayer.$showCursorMarker="theme":!ke&&V.$gutterLayer.$showCursorMarker=="theme"&&(V.$gutterLayer.$showCursorMarker=null)}V.$theme=y.cssClass,V.theme=y,w.addCssClass(V.container,y.cssClass),w.setCssClass(V.container,"ace_dark",y.isDark),V.$size&&(V.$size.width=0,V.$updateSizeAsync()),V._dispatchEvent("themeLoaded",{theme:y}),gt&&gt(),b.isSafari&&V.scroller&&(V.scroller.style.background="red",V.scroller.style.background="")}},he.prototype.getTheme=function(){return this.$themeId},he.prototype.setStyle=function(Y,gt){w.setCssClass(this.container,Y,gt!==!1)},he.prototype.unsetStyle=function(Y){w.removeCssClass(this.container,Y)},he.prototype.setCursorStyle=function(Y){w.setStyle(this.scroller.style,"cursor",Y)},he.prototype.setMouseCursor=function(Y){w.setStyle(this.scroller.style,"cursor",Y)},he.prototype.attachToShadowRoot=function(){w.importCssString(T,"ace_editor.css",this.container)},he.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},he.prototype.$updateCustomScrollbar=function(Y){var gt=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),Y===!0?(this.scrollBarV=new c(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(V){gt.$scrollAnimation||gt.session.setScrollTop(V.data-gt.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(V){gt.$scrollAnimation||gt.session.setScrollLeft(V.data-gt.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new x(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.addEventListener("scroll",function(V){gt.$scrollAnimation||gt.session.setScrollTop(V.data-gt.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(V){gt.$scrollAnimation||gt.session.setScrollLeft(V.data-gt.scrollMargin.left)}))},he.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var Y=this;this.$resizeTimer=A.delayedCall(function(){Y.destroyed||Y.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(gt){var V=gt[0].contentRect.width,O=gt[0].contentRect.height;Math.abs(Y.$size.width-V)>1||Math.abs(Y.$size.height-O)>1?Y.$resizeTimer.delay():Y.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},he}();Te.prototype.CHANGE_CURSOR=1,Te.prototype.CHANGE_MARKER=2,Te.prototype.CHANGE_GUTTER=4,Te.prototype.CHANGE_SCROLL=8,Te.prototype.CHANGE_LINES=16,Te.prototype.CHANGE_TEXT=32,Te.prototype.CHANGE_SIZE=64,Te.prototype.CHANGE_MARKER_BACK=128,Te.prototype.CHANGE_MARKER_FRONT=256,Te.prototype.CHANGE_FULL=512,Te.prototype.CHANGE_H_SCROLL=1024,Te.prototype.$changes=0,Te.prototype.$padding=null,Te.prototype.$frozen=!1,Te.prototype.STEPS=8,M.implement(Te.prototype,E),a.defineOptions(Te.prototype,"renderer",{useResizeObserver:{set:function(he){!he&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):he&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(he){this.$textLayer.setShowInvisibles(he)&&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(he){typeof he=="number"&&(this.$printMarginColumn=he),this.$showPrintMargin=!!he,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(he){this.$gutter.style.display=he?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(he){this.$gutterLayer.$useSvgGutterIcons=he},initialValue:!1},showFoldedAnnotations:{set:function(he){this.$gutterLayer.$showFoldedAnnotations=he},initialValue:!1},fadeFoldWidgets:{set:function(he){w.setCssClass(this.$gutter,"ace_fade-fold-widgets",he)},initialValue:!1},showFoldWidgets:{set:function(he){this.$gutterLayer.setShowFoldWidgets(he),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(he){this.$textLayer.setDisplayIndentGuides(he)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(he){this.$textLayer.setHighlightIndentGuides(he)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(he){this.$gutterLayer.setHighlightGutterLine(he),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(he){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(he){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(he){typeof he=="number"&&(he=he+"px"),this.container.style.fontSize=he,this.updateFontSize()},initialValue:12},fontFamily:{set:function(he){this.container.style.fontFamily=he,this.updateFontSize()}},maxLines:{set:function(he){this.updateFull()}},minLines:{set:function(he){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(he){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(he){he=+he||0,this.$scrollPastEnd!=he&&(this.$scrollPastEnd=he,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(he){this.$gutterLayer.$fixedWidth=!!he,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(he){this.$updateCustomScrollbar(he)},initialValue:!1},theme:{set:function(he){this.setTheme(he)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),v.VirtualRenderer=Te}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(p,v,fe){var M=p("../lib/oop"),w=p("../lib/net"),A=p("../lib/event_emitter").EventEmitter,a=p("../config");function u(i){var e="importScripts('"+w.qualifyURL(i)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var t=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,c=new t;return c.append(e),c.getBlob("application/javascript")}}function n(i){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=u(i),t=window.URL||window.webkitURL,c=t.createObjectURL(e);return new Worker(c)}return new Worker(i)}var o=function(i){i.postMessage||(i=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=i,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(){M.implement(this,A),this.$createWorkerFromOldConfig=function(i,e,t,c,g){if(p.nameToUrl&&!p.toUrl&&(p.toUrl=p.nameToUrl),a.get("packaged")||!p.toUrl)c=c||a.moduleUrl(e,"worker");else{var m=this.$normalizePath;c=c||m(p.toUrl("ace/worker/worker.js",null,"_"));var E={};i.forEach(function(T){E[T]=m(p.toUrl(T,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=n(c),g&&this.send("importScripts",g),this.$worker.postMessage({init:!0,tlns:E,module:e,classname:t}),this.$worker},this.onMessage=function(i){var e=i.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var t=this.callbacks[e.id];t&&(t(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(i){window.console&&console.error&&console.error(i)},this.$normalizePath=function(i){return w.qualifyURL(i)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(i){i.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(i,e){this.$worker.postMessage({command:i,args:e})},this.call=function(i,e,t){if(t){var c=this.callbackId++;this.callbacks[c]=t,e.push(c)}this.send(i,e)},this.emit=function(i,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:i,data:{data:e.data}})}catch(t){console.error(t.stack)}},this.attachToDocument=function(i){this.$doc&&this.terminate(),this.$doc=i,this.call("setValue",[i.getValue()]),i.on("change",this.changeListener,!0)},this.changeListener=function(i){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),i.action=="insert"?this.deltaQueue.push(i.start,i.lines):this.deltaQueue.push(i.start,i.end)},this.$sendDeltaQueue=function(){var i=this.deltaQueue;i&&(this.deltaQueue=null,i.length>50&&i.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:i}))}}).call(o.prototype);var r=function(i,e,t){var c=null,g=!1,m=Object.create(A),E=[],T=new o({messageBuffer:E,terminate:function(){},postMessage:function(b){E.push(b),c&&(g?setTimeout(x):x())}});T.setEmitSync=function(b){g=b};var x=function(){var b=E.shift();b.command?c[b.command].apply(c,b.args):b.event&&m._signal(b.event,b.data)};return m.postMessage=function(b){T.onMessage({data:b})},m.callback=function(b,de){this.postMessage({type:"call",id:de,data:b})},m.emit=function(b,de){this.postMessage({type:"event",name:b,data:de})},a.loadModule(["worker",e],function(b){for(c=new b[t](m);E.length;)x()}),T};v.UIWorkerClient=r,v.WorkerClient=o,v.createWorker=n}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(p,v,fe){var M=p("./range").Range,w=p("./lib/event_emitter").EventEmitter,A=p("./lib/oop"),a=function(){function u(n,o,r,i,e,t){var c=this;this.length=o,this.session=n,this.doc=n.getDocument(),this.mainClass=e,this.othersClass=t,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){c.onCursorChange()})},this.$pos=r;var g=n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=g.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var n=this,o=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=r.addMarker(new M(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var t=o.createAnchor(e.row,e.column);t.$insertRight=!0,t.detach(),n.others.push(t)}),r.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var n=this.session,o=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=n.addMarker(new M(r.row,r.column,r.row,r.column+o.length),o.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n<this.others.length;n++)this.session.removeMarker(this.others[n].markerId)}},u.prototype.onUpdate=function(n){if(this.$updating)return this.updateAnchors(n);var o=n;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var r=n.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,i=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,e=o.start.column-this.pos.column;if(this.updateAnchors(n),i&&(this.length+=r),i&&!this.session.$fromUndo){if(n.action==="insert")for(var t=this.others.length-1;t>=0;t--){var c=this.others[t],g={row:c.row,column:c.column+e};this.doc.insertMergedLines(g,n.lines)}else if(n.action==="remove")for(var t=this.others.length-1;t>=0;t--){var c=this.others[t],g={row:c.row,column:c.column+e};this.doc.remove(new M(g.row,g.column,g.row,g.column-r))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(n){this.pos.onChange(n);for(var o=this.others.length;o--;)this.others[o].onChange(n);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var n=this,o=this.session,r=function(e,t){o.removeMarker(e.markerId),e.markerId=o.addMarker(new M(e.row,e.column,e.row,e.column+n.length),t,null,!1)};r(this.pos,this.mainClass);for(var i=this.others.length;i--;)r(this.others[i],this.othersClass)}},u.prototype.onCursorChange=function(n){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n))}},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 n=this.session.getUndoManager(),o=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,r=0;r<o;r++)n.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},u}();A.implement(a.prototype,w),v.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(p,v,fe){var M=p("../lib/event"),w=p("../lib/useragent");function A(u,n){return u.row==n.row&&u.column==n.column}function a(u){var n=u.domEvent,o=n.altKey,r=n.shiftKey,i=n.ctrlKey,e=u.getAccelKey(),t=u.getButton();if(i&&w.isMac&&(t=n.button),u.editor.inMultiSelectMode&&t==2){u.editor.textInput.onContextMenu(u.domEvent);return}if(!i&&!o&&!e){t===0&&u.editor.inMultiSelectMode&&u.editor.exitMultiSelectMode();return}if(t===0){var c=u.editor,g=c.selection,m=c.inMultiSelectMode,E=u.getDocumentPosition(),T=g.getCursor(),x=u.inSelection()||g.isEmpty()&&A(E,T),b=u.x,de=u.y,Te=function(yt){b=yt.clientX,de=yt.clientY},he=c.session,Y=c.renderer.pixelToScreenCoordinates(b,de),gt=Y,V;if(c.$mouseHandler.$enableJumpToDef)i&&o||e&&o?V=r?"block":"add":o&&c.$blockSelectEnabled&&(V="block");else if(e&&!o){if(V="add",!m&&r)return}else o&&c.$blockSelectEnabled&&(V="block");if(V&&w.isMac&&n.ctrlKey&&c.$mouseHandler.cancelContextMenu(),V=="add"){if(!m&&x)return;if(!m){var O=g.toOrientedRange();c.addSelectionMarker(O)}var S=g.rangeList.rangeAtPoint(E);c.inVirtualSelectionMode=!0,r&&(S=null,O=g.ranges[0]||O,c.removeSelectionMarker(O)),c.once("mouseup",function(){var yt=g.toOrientedRange();S&&yt.isEmpty()&&A(S.cursor,yt.cursor)?g.substractPoint(yt.cursor):(r?g.substractPoint(O.cursor):O&&(c.removeSelectionMarker(O),g.addRange(O)),g.addRange(yt)),c.inVirtualSelectionMode=!1})}else if(V=="block"){u.stop(),c.inVirtualSelectionMode=!0;var y,I=[],ke=function(){var yt=c.renderer.pixelToScreenCoordinates(b,de),Qt=he.screenToDocumentPosition(yt.row,yt.column,yt.offsetX);A(gt,yt)&&A(Qt,g.lead)||(gt=yt,c.selection.moveToPosition(Qt),c.renderer.scrollCursorIntoView(),c.removeSelectionMarkers(I),I=g.rectangularRangeBlock(gt,Y),c.$mouseHandler.$clickSelection&&I.length==1&&I[0].isEmpty()&&(I[0]=c.$mouseHandler.$clickSelection.clone()),I.forEach(c.addSelectionMarker,c),c.updateSelectionMarkers())};m&&!e?g.toSingleRange():!m&&e&&(y=g.toOrientedRange(),c.addSelectionMarker(y)),r?Y=he.documentToScreenPosition(g.lead):g.moveToPosition(E),gt={row:-1,column:-1};var Qe=function(yt){ke(),clearInterval(mt),c.removeSelectionMarkers(I),I.length||(I=[g.toOrientedRange()]),y&&(c.removeSelectionMarker(y),g.toSingleRange(y));for(var Qt=0;Qt<I.length;Qt++)g.addRange(I[Qt]);c.inVirtualSelectionMode=!1,c.$mouseHandler.$clickSelection=null},Je=ke;M.capture(c.container,Te,Qe);var mt=setInterval(function(){Je()},20);return u.preventDefault()}}}v.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(p,v,fe){v.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(w){w.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(w){w.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(w){w.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(w){w.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(w){w.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(w){w.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(w){w.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(w){w.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(w){w.multiSelect.rangeCount>1?w.multiSelect.joinSelections():w.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(w){w.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(w){w.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(w){w.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],v.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(w){w.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(w){return w&&w.inMultiSelectMode}}];var M=p("../keyboard/hash_handler").HashHandler;v.keyboardHandler=new M(v.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,v,fe){var M=p("./range_list").RangeList,w=p("./range").Range,A=p("./selection").Selection,a=p("./mouse/multi_select_handler").onMouseDown,u=p("./lib/event"),n=p("./lib/lang"),o=p("./commands/multi_select_commands");v.commands=o.defaultCommands.concat(o.multiSelectCommands);var r=p("./search").Search,i=new r;function e(T,x,b){return i.$options.wrap=!0,i.$options.needle=x,i.$options.backwards=b==-1,i.find(T)}var t=p("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(t.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(T,x){if(T){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(T),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),x||this.fromOrientedRange(T);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}T.cursor||(T.cursor=T.end);var de=this.rangeList.add(T);return this.$onAddRange(T),de.length&&this.$onRemoveRange(de),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),x||this.fromOrientedRange(T)}},this.toSingleRange=function(T){T=T||this.ranges[0];var x=this.rangeList.removeAll();x.length&&this.$onRemoveRange(x),T&&this.fromOrientedRange(T)},this.substractPoint=function(T){var x=this.rangeList.substractPoint(T);if(x)return this.$onRemoveRange(x),x[0]},this.mergeOverlappingRanges=function(){var T=this.rangeList.merge();T.length&&this.$onRemoveRange(T)},this.$onAddRange=function(T){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(T),this._signal("addRange",{range:T})},this.$onRemoveRange=function(T){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var x=this.rangeList.ranges.pop();T.push(x),this.rangeCount=0}for(var b=T.length;b--;){var de=this.ranges.indexOf(T[b]);this.ranges.splice(de,1)}this._signal("removeRange",{ranges:T}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),x=x||this.ranges[0],x&&!x.isEqual(this.getRange())&&this.fromOrientedRange(x)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new M,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var T=this.ranges.length?this.ranges:[this.getRange()],x=[],b=0;b<T.length;b++){var de=T[b],Te=de.start.row,he=de.end.row;if(Te===he)x.push(de.clone());else{for(x.push(new w(Te,de.start.column,Te,this.session.getLine(Te).length));++Te<he;)x.push(this.getLineRange(Te,!0));x.push(new w(he,0,he,de.end.column))}b==0&&!this.isBackwards()&&(x=x.reverse())}this.toSingleRange();for(var b=x.length;b--;)this.addRange(x[b])},this.joinSelections=function(){var T=this.rangeList.ranges,x=T[T.length-1],b=w.fromPoints(T[0].start,x.end);this.toSingleRange(),this.setSelectionRange(b,x.cursor==x.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var T=this.rangeList.ranges,x=T[T.length-1],b=w.fromPoints(T[0].start,x.end);this.toSingleRange(),this.setSelectionRange(b,x.cursor==x.start)}else{var de=this.session.documentToScreenPosition(this.cursor),Te=this.session.documentToScreenPosition(this.anchor),he=this.rectangularRangeBlock(de,Te);he.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(T,x,b){var de=[],Te=T.column<x.column;if(Te)var he=T.column,Y=x.column,gt=T.offsetX,V=x.offsetX;else var he=x.column,Y=T.column,gt=x.offsetX,V=T.offsetX;var O=T.row<x.row;if(O)var S=T.row,y=x.row;else var S=x.row,y=T.row;he<0&&(he=0),S<0&&(S=0),S==y&&(b=!0);for(var I,ke=S;ke<=y;ke++){var Qe=w.fromPoints(this.session.screenToDocumentPosition(ke,he,gt),this.session.screenToDocumentPosition(ke,Y,V));if(Qe.isEmpty()){if(I&&g(Qe.end,I))break;I=Qe.end}Qe.cursor=Te?Qe.start:Qe.end,de.push(Qe)}if(O&&de.reverse(),!b){for(var Je=de.length-1;de[Je].isEmpty()&&Je>0;)Je--;if(Je>0)for(var mt=0;de[mt].isEmpty();)mt++;for(var yt=Je;yt>=mt;yt--)de[yt].isEmpty()&&de.splice(yt,1)}return de}}).call(A.prototype);var c=p("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(T){T.cursor||(T.cursor=T.end);var x=this.getSelectionStyle();return T.marker=this.session.addMarker(T,"ace_selection",x),this.session.$selectionMarkers.push(T),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,T},this.removeSelectionMarker=function(T){if(T.marker){this.session.removeMarker(T.marker);var x=this.session.$selectionMarkers.indexOf(T);x!=-1&&this.session.$selectionMarkers.splice(x,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(T){for(var x=this.session.$selectionMarkers,b=T.length;b--;){var de=T[b];if(de.marker){this.session.removeMarker(de.marker);var Te=x.indexOf(de);Te!=-1&&x.splice(Te,1)}}this.session.selectionMarkerCount=x.length},this.$onAddRange=function(T){this.addSelectionMarker(T.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(T){this.removeSelectionMarkers(T.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(T){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(T){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(T){var x=T.command,b=T.editor;if(b.multiSelect){if(x.multiSelectAction)x.multiSelectAction=="forEach"?de=b.forEachSelection(x,T.args):x.multiSelectAction=="forEachLine"?de=b.forEachSelection(x,T.args,!0):x.multiSelectAction=="single"?(b.exitMultiSelectMode(),de=x.exec(b,T.args||{})):de=x.multiSelectAction(b,T.args||{});else{var de=x.exec(b,T.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return de}},this.forEachSelection=function(T,x,b){if(!this.inVirtualSelectionMode){var de=b&&b.keepOrder,Te=b==!0||b&&b.$byLines,he=this.session,Y=this.selection,gt=Y.rangeList,V=(de?Y:gt).ranges,O;if(!V.length)return T.exec?T.exec(this,x||{}):T(this,x||{});var S=Y._eventRegistry;Y._eventRegistry={};var y=new A(he);this.inVirtualSelectionMode=!0;for(var I=V.length;I--;){if(Te)for(;I>0&&V[I].start.row==V[I-1].end.row;)I--;y.fromOrientedRange(V[I]),y.index=I,this.selection=he.selection=y;var ke=T.exec?T.exec(this,x||{}):T(this,x||{});!O&&ke!==void 0&&(O=ke),y.toOrientedRange(V[I])}y.detach(),this.selection=he.selection=Y,this.inVirtualSelectionMode=!1,Y._eventRegistry=S,Y.mergeOverlappingRanges(),Y.ranges[0]&&Y.fromOrientedRange(Y.ranges[0]);var Qe=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),Qe&&Qe.from==Qe.to&&this.renderer.animateScrolling(Qe.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var T="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var x=this.multiSelect.rangeList.ranges,b=[],de=0;de<x.length;de++)b.push(this.session.getTextRange(x[de]));var Te=this.session.getDocument().getNewLineCharacter();T=b.join(Te),T.length==(b.length-1)*Te.length&&(T="")}else this.selection.isEmpty()||(T=this.session.getTextRange(this.getSelectionRange()));return T},this.$checkMultiselectChange=function(T,x){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&x==this.multiSelect.anchor)return;var de=x==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;de.row!=x.row||this.session.$clipPositionToDocument(de.row,de.column).column!=x.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(T,x,b){if(x=x||{},x.needle=T||x.needle,x.needle==null){var de=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();x.needle=this.session.getTextRange(de)}this.$search.set(x);var Te=this.$search.findAll(this.session);if(!Te.length)return 0;var he=this.multiSelect;b||he.toSingleRange(Te[0]);for(var Y=Te.length;Y--;)he.addRange(Te[Y],!0);return de&&he.rangeList.rangeAtPoint(de.start)&&he.addRange(de,!0),Te.length},this.selectMoreLines=function(T,x){var b=this.selection.toOrientedRange(),de=b.cursor==b.end,Te=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(Te.column=this.selection.$desiredColumn);var he=this.session.screenToDocumentPosition(Te.row+T,Te.column);if(b.isEmpty())var gt=he;else var Y=this.session.documentToScreenPosition(de?b.end:b.start),gt=this.session.screenToDocumentPosition(Y.row+T,Y.column);if(de){var V=w.fromPoints(he,gt);V.cursor=V.start}else{var V=w.fromPoints(gt,he);V.cursor=V.end}if(V.desiredColumn=Te.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(x)var O=b.cursor;this.selection.addRange(V),O&&this.selection.substractPoint(O)},this.transposeSelections=function(T){for(var x=this.session,b=x.multiSelect,de=b.ranges,Te=de.length;Te--;){var he=de[Te];if(he.isEmpty()){var Y=x.getWordRange(he.start.row,he.start.column);he.start.row=Y.start.row,he.start.column=Y.start.column,he.end.row=Y.end.row,he.end.column=Y.end.column}}b.mergeOverlappingRanges();for(var gt=[],Te=de.length;Te--;){var he=de[Te];gt.unshift(x.getTextRange(he))}T<0?gt.unshift(gt.pop()):gt.push(gt.shift());for(var Te=de.length;Te--;){var he=de[Te],V=he.clone();x.replace(he,gt[Te]),he.start.row=V.start.row,he.start.column=V.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(T,x,b){var de=this.session,Te=de.multiSelect,he=Te.toOrientedRange();if(!(he.isEmpty()&&(he=de.getWordRange(he.start.row,he.start.column),he.cursor=T==-1?he.start:he.end,this.multiSelect.addRange(he),b))){var Y=de.getTextRange(he),gt=e(de,Y,T);gt&&(gt.cursor=T==-1?gt.start:gt.end,this.session.unfold(gt),this.multiSelect.addRange(gt),this.renderer.scrollCursorIntoView(null,.5)),x&&this.multiSelect.substractPoint(he.cursor)}},this.alignCursors=function(){var T=this.session,x=T.multiSelect,b=x.ranges,de=-1,Te=b.filter(function(Je){if(Je.cursor.row==de)return!0;de=Je.cursor.row});if(!b.length||Te.length==b.length-1){var he=this.selection.getRange(),Y=he.start.row,gt=he.end.row,V=Y==gt;if(V){var O=this.session.getLength(),S;do S=this.session.getLine(gt);while(/[=:]/.test(S)&&++gt<O);do S=this.session.getLine(Y);while(/[=:]/.test(S)&&--Y>0);Y<0&&(Y=0),gt>=O&&(gt=O-1)}var y=this.session.removeFullLines(Y,gt);y=this.$reAlignText(y,V),this.session.insert({row:Y,column:0},y.join(`
954
+ `)+`
955
+ `),V||(he.start.column=0,he.end.column=y[y.length-1].length),this.selection.setRange(he)}else{Te.forEach(function(Je){x.substractPoint(Je.cursor)});var I=0,ke=1/0,Qe=b.map(function(Je){var mt=Je.cursor,yt=T.getLine(mt.row),Qt=yt.substr(mt.column).search(/\S/g);return Qt==-1&&(Qt=0),mt.column>I&&(I=mt.column),Qt<ke&&(ke=Qt),Qt});b.forEach(function(Je,mt){var yt=Je.cursor,Qt=I-yt.column,bt=Qe[mt]-ke;Qt>bt?T.insert(yt,n.stringRepeat(" ",Qt-bt)):T.remove(new w(yt.row,yt.column,yt.row,yt.column-Qt+bt)),Je.start.column=Je.end.column=I,Je.start.row=Je.end.row=yt.row,Je.cursor=Je.end}),x.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(T,x){var b=!0,de=!0,Te,he,Y;return T.map(function(y){var I=y.match(/(\s*)(.*?)(\s*)([=:].*)/);return I?Te==null?(Te=I[1].length,he=I[2].length,Y=I[3].length,I):(Te+he+Y!=I[1].length+I[2].length+I[3].length&&(de=!1),Te!=I[1].length&&(b=!1),Te>I[1].length&&(Te=I[1].length),he<I[2].length&&(he=I[2].length),Y>I[3].length&&(Y=I[3].length),I):[y]}).map(x?V:b?de?O:V:S);function gt(y){return n.stringRepeat(" ",y)}function V(y){return y[2]?gt(Te)+y[2]+gt(he-y[2].length+Y)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}function O(y){return y[2]?gt(Te+he-y[2].length)+y[2]+gt(Y)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}function S(y){return y[2]?gt(Te)+y[2]+gt(Y)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}}}).call(c.prototype);function g(T,x){return T.row==x.row&&T.column==x.column}v.onSessionChange=function(T){var x=T.session;x&&!x.multiSelect&&(x.$selectionMarkers=[],x.selection.$initRangeList(),x.multiSelect=x.selection),this.multiSelect=x&&x.multiSelect;var b=T.oldSession;b&&(b.multiSelect.off("addRange",this.$onAddRange),b.multiSelect.off("removeRange",this.$onRemoveRange),b.multiSelect.off("multiSelect",this.$onMultiSelect),b.multiSelect.off("singleSelect",this.$onSingleSelect),b.multiSelect.lead.off("change",this.$checkMultiselectChange),b.multiSelect.anchor.off("change",this.$checkMultiselectChange)),x&&(x.multiSelect.on("addRange",this.$onAddRange),x.multiSelect.on("removeRange",this.$onRemoveRange),x.multiSelect.on("multiSelect",this.$onMultiSelect),x.multiSelect.on("singleSelect",this.$onSingleSelect),x.multiSelect.lead.on("change",this.$checkMultiselectChange),x.multiSelect.anchor.on("change",this.$checkMultiselectChange)),x&&this.inMultiSelectMode!=x.selection.inMultiSelectMode&&(x.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function m(T){T.$multiselectOnSessionChange||(T.$onAddRange=T.$onAddRange.bind(T),T.$onRemoveRange=T.$onRemoveRange.bind(T),T.$onMultiSelect=T.$onMultiSelect.bind(T),T.$onSingleSelect=T.$onSingleSelect.bind(T),T.$multiselectOnSessionChange=v.onSessionChange.bind(T),T.$checkMultiselectChange=T.$checkMultiselectChange.bind(T),T.$multiselectOnSessionChange(T),T.on("changeSession",T.$multiselectOnSessionChange),T.on("mousedown",a),T.commands.addCommands(o.defaultCommands),E(T))}function E(T){if(!T.textInput)return;var x=T.textInput.getElement(),b=!1;u.addListener(x,"keydown",function(Te){var he=Te.keyCode==18&&!(Te.ctrlKey||Te.shiftKey||Te.metaKey);T.$blockSelectEnabled&&he?b||(T.renderer.setMouseCursor("crosshair"),b=!0):b&&de()},T),u.addListener(x,"keyup",de,T),u.addListener(x,"blur",de,T);function de(Te){b&&(T.renderer.setMouseCursor(""),b=!1)}}v.MultiSelect=m,p("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(T){m(this),T?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(T){this.$blockSelectEnabled=T},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(p,v,fe){var M=p("../../range").Range,w=v.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(A,a,u){var n=A.getLine(u);return this.foldingStartMarker.test(n)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(A,a,u){return null},this.indentationBlock=function(A,a,u){var n=/\S/,o=A.getLine(a),r=o.search(n);if(r!=-1){for(var i=u||o.length,e=A.getLength(),t=a,c=a;++a<e;){var g=A.getLine(a).search(n);if(g!=-1){if(g<=r){var m=A.getTokenAt(a,0);if(!m||m.type!=="string")break}c=a}}if(c>t){var E=A.getLine(c).length;return new M(t,i,c,E)}}},this.openingBracketBlock=function(A,a,u,n,o){var r={row:u,column:n+1},i=A.$findClosingBracket(a,r,o);if(i){var e=A.foldWidgets[i.row];return e==null&&(e=A.getFoldWidget(i.row)),e=="start"&&i.row>r.row&&(i.row--,i.column=A.getLine(i.row).length),M.fromPoints(r,i)}},this.closingBracketBlock=function(A,a,u,n,o){var r={row:u,column:n},i=A.$findOpeningBracket(a,r);if(i)return i.column++,r.column--,M.fromPoints(i,r)}}).call(w.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(p,v,fe){var M=p("../lib/dom"),w=p("../range").Range,A=p("../config").nls;function a(n,o,r){for(var i=0,e=n.length-1;i<=e;){var t=i+e>>1,c=r(o,n[t]);if(c>0)i=t+1;else if(c<0)e=t-1;else return t}return-(i+1)}function u(n,o,r){var i=n.getAnnotations().sort(w.comparePoints);if(i.length){var e=a(i,{row:o,column:-1},w.comparePoints);e<0&&(e=-e-1),e>=i.length?e=r>0?0:i.length-1:e===0&&r<0&&(e=i.length-1);var t=i[e];if(!(!t||!r)){if(t.row===o){do t=i[e+=r];while(t&&t.row===o);if(!t)return i.slice()}var c=[];o=t.row;do c[r<0?"unshift":"push"](t),t=i[e+=r];while(t&&t.row==o);return c.length&&c}}}v.showErrorMarker=function(n,o){var r=n.session,i=n.getCursorPosition(),e=i.row,t=r.widgetManager.getWidgetsAtRow(e).filter(function(Te){return Te.type=="errorMarker"})[0];t?t.destroy():e-=o;var c=u(r,e,o),g;if(c){var m=c[0];i.column=(m.pos&&typeof m.column!="number"?m.pos.sc:m.column)||0,i.row=m.row,g=n.renderer.$gutterLayer.$annotations[i.row]}else{if(t)return;g={displayText:[A("error-marker.good-state","Looks good!")],className:"ace_ok"}}n.session.unfold(i.row),n.selection.moveToPosition(i);var E={row:i.row,fixedWidth:!0,coverGutter:!0,el:M.createElement("div"),type:"errorMarker"},T=E.el.appendChild(M.createElement("div")),x=E.el.appendChild(M.createElement("div"));x.className="error_widget_arrow "+g.className;var b=n.renderer.$cursorLayer.getPixelPosition(i).left;x.style.left=b+n.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",T.className="error_widget "+g.className,g.displayText.forEach(function(Te,he){T.appendChild(M.createTextNode(Te)),he<g.displayText.length-1&&T.appendChild(M.createElement("br"))}),T.appendChild(M.createElement("div"));var de=function(Te,he,Y){if(he===0&&(Y==="esc"||Y==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(de),r.widgetManager.removeLineWidget(E),n.off("changeSelection",E.destroy),n.off("changeSession",E.destroy),n.off("mouseup",E.destroy),n.off("change",E.destroy))},n.keyBinding.addKeyboardHandler(de),n.on("changeSelection",E.destroy),n.on("changeSession",E.destroy),n.on("mouseup",E.destroy),n.on("change",E.destroy),n.session.widgetManager.addLineWidget(E),E.el.onmousedown=n.focus.bind(n),n.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},M.importCssString(`
956
+ .error_widget_wrapper {
957
+ background: inherit;
958
+ color: inherit;
959
+ border:none
960
+ }
961
+ .error_widget {
962
+ border-top: solid 2px;
963
+ border-bottom: solid 2px;
964
+ margin: 5px 0;
965
+ padding: 10px 40px;
966
+ white-space: pre-wrap;
967
+ }
968
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
969
+ border-color: #ff5a5a
970
+ }
971
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
972
+ border-color: #F1D817
973
+ }
974
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
975
+ border-color: #5a5a5a
976
+ }
977
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
978
+ border-color: #5aaa5a
979
+ }
980
+ .error_widget_arrow {
981
+ position: absolute;
982
+ border: solid 5px;
983
+ border-top-color: transparent!important;
984
+ border-right-color: transparent!important;
985
+ border-left-color: transparent!important;
986
+ top: -5px;
987
+ }
988
+ `,"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,v,fe){p("./loader_build")(v);var M=p("./lib/dom"),w=p("./range").Range,A=p("./editor").Editor,a=p("./edit_session").EditSession,u=p("./undomanager").UndoManager,n=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"),v.config=p("./config"),v.edit=function(r,i){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 A)return r.env.editor;var t="";if(r&&/input|textarea/i.test(r.tagName)){var c=r;t=c.value,r=M.createElement("pre"),c.parentNode.replaceChild(r,c)}else r&&(t=r.textContent,r.innerHTML="");var g=v.createEditSession(t),m=new A(new n(r),g,i),E={document:g,editor:m,onResize:m.resize.bind(m,null)};return c&&(E.textarea=c),m.on("destroy",function(){E.editor.container.env=null}),m.container.env=m.env=E,m},v.createEditSession=function(r,i){var e=new a(r,i);return e.setUndoManager(new u),e},v.Range=w,v.Editor=A,v.EditSession=a,v.UndoManager=u,v.VirtualRenderer=n;var o=v.config.version;v.version=o}),function(){ace.require(["ace/ace"],function(p){p&&(p.config.init(!0),p.define=ace.define);var v=function(){return this}();!v&&typeof window<"u"&&(v=window),!v&&typeof self<"u"&&(v=self),v.ace||(v.ace=p);for(var fe in p)p.hasOwnProperty(fe)&&(v.ace[fe]=p[fe]);v.ace.default=v.ace,h&&(h.exports=v.ace)})}()}(ace$1)),ace$1.exports}var aceExports=requireAce(),modeRuby={exports:{}},hasRequiredModeRuby;function requireModeRuby(){return hasRequiredModeRuby||(hasRequiredModeRuby=1,function(h,f){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(p,v,fe){var M=p("../lib/oop"),w=p("./text_highlight_rules").TextHighlightRules,A=v.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};v.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},v.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},v.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var a=v.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=v.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},n=v.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},o=v.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},r=v.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},i=v.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},e=v.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},t=v.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},c=function(){var g="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",m="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",E="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",T="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",x=this.$keywords=this.createKeywordMapper({keyword:m,"constant.language":E,"variable.language":T,"support.function":g,"invalid.deprecated":"debugger"},"identifier"),b=`\\\\(?: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})*})`,de={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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:b},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:b},{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(Te,he,Y){Y.length&&(Y=[]);var gt=Te[Te.length-1];return Y.unshift(gt,he),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(Te,he,Y){Y.length&&(Y=[]);var gt=Te[Te.length-1];return Y.unshift(gt,he),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(Te,he,Y){Y.length&&(Y=[]);var gt=Te[Te.length-1];return Y.unshift(gt,he),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(Te,he,Y){Y.length&&(Y=[]);var gt=Te[Te.length-1];return Y.unshift(gt,he),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(Te,he,Y){Y.length&&(Y=[]);var gt=Te[Te.length-1];return Y.unshift(gt,he),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},t,{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\\?(?:"+b+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},r,i,A,a,e,u,n,o,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:x,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(Te,he,Y){var gt=Te[2]=="-"||Te[2]=="~"?"indentedHeredoc":"heredoc",V=Te.split(this.splitRegex);return Y.push(gt,V[3]),[{type:"constant",value:V[1]},{type:"string",value:V[2]},{type:"support.class",value:V[3]},{type:"string",value:V[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(Te,he,Y){return Te===Y[1]?(Y.shift(),Y.shift(),this.next=Y[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(Te,he,Y){return Te===Y[1]?(Y.shift(),Y.shift(),this.next=Y[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(Te,he){return he[0]==="heredoc"||he[0]==="indentedHeredoc"?he[0]:Te}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(Te,he,Y){return this.next="",Te=="}"&&Y.length>1&&Y[1]!="start"&&(Y.shift(),this.next=Y.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(Te,he,Y){return Y.length&&Te===Y[0]?(Y.unshift(Te,he),this.token):"string"}},{token:"constant.language.escape",regex:b},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(Te,he,Y){return Y.length&&Te===de[Y[0]]?(Y.shift(),this.next=Y.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(Te,he,Y){return Y.length&&Te===Y[0]?(Y.unshift(Te,he),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(Te,he,Y){return Y.length&&Te===de[Y[0]]?(Y.shift(),this.next=Y.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Te,he,Y){return Y.length&&Te===Y[0]?(Y.unshift(Te,he),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(Te,he,Y){return Y.length&&Te===de[Y[0]]?(Y.shift(),this.next=Y.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Te,he,Y){return Y.length&&Te===Y[0]?(Y.unshift(Te,he),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:b},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(Te,he,Y){return Y.length&&Te===de[Y[0]]?(Y.shift(),this.next=Y.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(Te,he,Y){return Y.length&&Te===Y[0]?(Y.unshift(Te,he),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(Te,he,Y){return Y.length&&Te[0]===de[Y[0]]?(Y.shift(),this.next=Y.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()};M.inherits(c,w),v.RubyHighlightRules=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(p,v,fe){var M=p("../range").Range,w=function(){};(function(){this.checkOutdent=function(A,a){return/^\s+$/.test(A)?/^\s*\}/.test(a):!1},this.autoOutdent=function(A,a){var u=A.getLine(a),n=u.match(/^(\s*\})/);if(!n)return 0;var o=n[1].length,r=A.findMatchingBracket({row:a,column:o});if(!r||r.row==a)return 0;var i=this.$getIndent(A.getLine(r.row));A.replace(new M(a,0,a,o-1),i)},this.$getIndent=function(A){return A.match(/^\s*/)[0]}}).call(w.prototype),v.MatchingBraceOutdent=w}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(p,v,fe){var M=p("../../lib/oop"),w=p("./fold_mode").FoldMode,A=p("../../range").Range,a=p("../../token_iterator").TokenIterator,u=v.FoldMode=function(){};M.inherits(u,w),(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(n,o,r){var i=n.getLine(r),e=this.foldingStartMarker.test(i),t=this.foldingStopMarker.test(i);if(e&&!t){var c=i.match(this.foldingStartMarker);if(c[1]){if((c[1]=="if"||c[1]=="else"||c[1]=="while"||c[1]=="until"||c[1]=="unless")&&(c[1]=="else"&&/^\s*else\s*$/.test(i)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(i)===!1)||c[1]=="when"&&/\sthen\s/.test(i)===!0)return;if(n.getTokenAt(r,c.index+2).type==="keyword")return"start"}else if(!c[3]||n.getTokenAt(r,c.index+1).type==="comment.multiline")return"start"}if(o!="markbeginend"||!t||e&&t)return"";var c=i.match(this.foldingStopMarker);if(c[3]==="end"){if(n.getTokenAt(r,c.index+1).type==="keyword")return"end"}else if(!c[1]||n.getTokenAt(r,c.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(n,o,r){var i=n.doc.getLine(r),e=this.foldingStartMarker.exec(i);if(e)return e[1]||e[3]?this.rubyBlock(n,r,e.index+2):this.openingBracketBlock(n,"{",r,e.index);var e=this.foldingStopMarker.exec(i);if(e)return e[3]==="end"&&n.getTokenAt(r,e.index+1).type==="keyword"?this.rubyBlock(n,r,e.index+1):e[1]==="=end"&&n.getTokenAt(r,e.index+1).type==="comment.multiline"?this.rubyBlock(n,r,e.index+1):this.closingBracketBlock(n,"}",r,e.index+e[0].length)},this.rubyBlock=function(n,V,r,i){var e=new a(n,V,r),t=e.getCurrentToken();if(!(!t||t.type!="keyword"&&t.type!="comment.multiline")){var c=t.value,g=n.getLine(V);switch(t.value){case"if":case"unless":case"while":case"until":var m=new RegExp("^\\s*"+t.value);if(!m.test(g))return;var E=this.indentKeywords[c];break;case"when":if(/\sthen\s/.test(g))return;case"elsif":case"rescue":case"ensure":var E=1;break;case"else":var m=new RegExp("^\\s*"+t.value+"\\s*$");if(!m.test(g))return;var E=1;break;default:var E=this.indentKeywords[c]}var T=[c];if(E){var x=E===-1?n.getLine(V-1).length:n.getLine(V).length,b=V,de=[];if(de.push(e.getCurrentTokenRange()),e.step=E===-1?e.stepBackward:e.stepForward,t.type=="comment.multiline"){for(;t=e.step();)if(t.type==="comment.multiline"){if(E==1){if(x=6,t.value=="=end")break}else if(t.value=="=begin")break}}else for(;t=e.step();){var Te=!1;if(t.type==="keyword"){var he=E*this.indentKeywords[t.value];switch(g=n.getLine(e.getCurrentTokenRow()),t.value){case"do":for(var Y=e.$tokenIndex-1;Y>=0;Y--){var gt=e.$rowTokens[Y];if(gt&&(gt.value=="while"||gt.value=="until"||gt.value=="for")){he=0;break}}break;case"else":var m=new RegExp("^\\s*"+t.value+"\\s*$");(!m.test(g)||c=="case")&&(he=0,Te=!0);break;case"if":case"unless":case"while":case"until":var m=new RegExp("^\\s*"+t.value);m.test(g)||(he=0,Te=!0);break;case"when":(/\sthen\s/.test(g)||c=="case")&&(he=0,Te=!0)}if(he>0)T.unshift(t.value);else if(he<=0&&Te===!1){if(T.shift(),!T.length&&((c=="while"||c=="until"||c=="for")&&t.value!="do"||t.value=="do"&&E==-1&&he!=0||t.value!="do"))break;he===0&&T.unshift(t.value)}}}if(!t)return null;if(i)return de.push(e.getCurrentTokenRange()),de;var V=e.getCurrentTokenRow();if(E===-1){if(t.type==="comment.multiline")var O=6;else var O=n.getLine(V).length;return new A(V,O,b-1,x)}return new A(b,x,V-1,n.getLine(V-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,v,fe){var M=p("../lib/oop"),w=p("./text").Mode,A=p("./ruby_highlight_rules").RubyHighlightRules,a=p("./matching_brace_outdent").MatchingBraceOutdent,u=p("../range").Range,n=p("./folding/ruby").FoldMode,o=function(){this.HighlightRules=A,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new n,this.indentKeywords=this.foldingRules.indentKeywords};M.inherits(o,w),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(r,i,e){var t=this.$getIndent(i),c=this.getTokenizer().getLineTokens(i,r),g=c.tokens;if(g.length&&g[g.length-1].type=="comment")return t;if(r=="start"){var m=i.match(/^.*[\{\(\[]\s*$/),E=i.match(/^\s*(class|def|module)\s.*$/),T=i.match(/.*do(\s*|\s+\|.*\|\s*)$/),x=i.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(m||E||T||x)&&(t+=e)}return t},this.checkOutdent=function(r,i,e){return/^\s+(end|else|rescue|ensure)$/.test(i+e)||this.$outdent.checkOutdent(i,e)},this.autoOutdent=function(r,i,e){var t=i.getLine(e);if(/}/.test(t))return this.$outdent.autoOutdent(i,e);var c=this.$getIndent(t),g=i.getLine(e-1),m=this.$getIndent(g),E=i.getTabString();m.length<=c.length&&c.slice(-E.length)==E&&i.remove(new u(e,c.length-E.length,e,c.length))},this.getMatching=function(r,i,e){if(i==null){var t=r.selection.lead;e=t.column,i=t.row}var c=r.getTokenAt(i,e);if(c&&c.value in this.indentKeywords)return this.foldingRules.rubyBlock(r,i,e,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(o.prototype),v.Mode=o}),function(){ace.require(["ace/mode/ruby"],function(p){h&&(h.exports=p)})}()}(modeRuby)),modeRuby.exports}requireModeRuby();var themeTwilight={exports:{}},hasRequiredThemeTwilight;function requireThemeTwilight(){return hasRequiredThemeTwilight||(hasRequiredThemeTwilight=1,function(h,f){ace.define("ace/theme/twilight-css",["require","exports","module"],function(p,v,fe){fe.exports=`.ace-twilight .ace_gutter {
989
+ background: #232323;
990
+ color: #E2E2E2
991
+ }
992
+
993
+ .ace-twilight .ace_print-margin {
994
+ width: 1px;
995
+ background: #232323
996
+ }
997
+
998
+ .ace-twilight {
999
+ background-color: #141414;
1000
+ color: #F8F8F8
1001
+ }
1002
+
1003
+ .ace-twilight .ace_cursor {
1004
+ color: #A7A7A7
1005
+ }
1006
+
1007
+ .ace-twilight .ace_marker-layer .ace_selection {
1008
+ background: rgba(221, 240, 255, 0.20)
1009
+ }
1010
+
1011
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1012
+ box-shadow: 0 0 3px 0px #141414;
1013
+ }
1014
+
1015
+ .ace-twilight .ace_marker-layer .ace_step {
1016
+ background: rgb(102, 82, 0)
1017
+ }
1018
+
1019
+ .ace-twilight .ace_marker-layer .ace_bracket {
1020
+ margin: -1px 0 0 -1px;
1021
+ border: 1px solid rgba(255, 255, 255, 0.25)
1022
+ }
1023
+
1024
+ .ace-twilight .ace_marker-layer .ace_active-line {
1025
+ background: rgba(255, 255, 255, 0.031)
1026
+ }
1027
+
1028
+ .ace-twilight .ace_gutter-active-line {
1029
+ background-color: rgba(255, 255, 255, 0.031)
1030
+ }
1031
+
1032
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1033
+ border: 1px solid rgba(221, 240, 255, 0.20)
1034
+ }
1035
+
1036
+ .ace-twilight .ace_invisible {
1037
+ color: rgba(255, 255, 255, 0.25)
1038
+ }
1039
+
1040
+ .ace-twilight .ace_keyword,
1041
+ .ace-twilight .ace_meta {
1042
+ color: #CDA869
1043
+ }
1044
+
1045
+ .ace-twilight .ace_constant,
1046
+ .ace-twilight .ace_constant.ace_character,
1047
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1048
+ .ace-twilight .ace_constant.ace_other,
1049
+ .ace-twilight .ace_heading,
1050
+ .ace-twilight .ace_markup.ace_heading,
1051
+ .ace-twilight .ace_support.ace_constant {
1052
+ color: #CF6A4C
1053
+ }
1054
+
1055
+ .ace-twilight .ace_invalid.ace_illegal {
1056
+ color: #F8F8F8;
1057
+ background-color: rgba(86, 45, 86, 0.75)
1058
+ }
1059
+
1060
+ .ace-twilight .ace_invalid.ace_deprecated {
1061
+ text-decoration: underline;
1062
+ font-style: italic;
1063
+ color: #D2A8A1
1064
+ }
1065
+
1066
+ .ace-twilight .ace_support {
1067
+ color: #9B859D
1068
+ }
1069
+
1070
+ .ace-twilight .ace_fold {
1071
+ background-color: #AC885B;
1072
+ border-color: #F8F8F8
1073
+ }
1074
+
1075
+ .ace-twilight .ace_support.ace_function {
1076
+ color: #DAD085
1077
+ }
1078
+
1079
+ .ace-twilight .ace_list,
1080
+ .ace-twilight .ace_markup.ace_list,
1081
+ .ace-twilight .ace_storage {
1082
+ color: #F9EE98
1083
+ }
1084
+
1085
+ .ace-twilight .ace_entity.ace_name.ace_function,
1086
+ .ace-twilight .ace_meta.ace_tag {
1087
+ color: #AC885B
1088
+ }
1089
+
1090
+ .ace-twilight .ace_string {
1091
+ color: #8F9D6A
1092
+ }
1093
+
1094
+ .ace-twilight .ace_string.ace_regexp {
1095
+ color: #E9C062
1096
+ }
1097
+
1098
+ .ace-twilight .ace_comment {
1099
+ font-style: italic;
1100
+ color: #5F5A60
1101
+ }
1102
+
1103
+ .ace-twilight .ace_variable {
1104
+ color: #7587A6
1105
+ }
1106
+
1107
+ .ace-twilight .ace_xml-pe {
1108
+ color: #494949
1109
+ }
1110
+
1111
+ .ace-twilight .ace_indent-guide {
1112
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1113
+ }
1114
+
1115
+ .ace-twilight .ace_indent-guide-active {
1116
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1117
+ }
1118
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(p,v,fe){v.isDark=!0,v.cssClass="ace-twilight",v.cssText=p("./twilight-css");var M=p("../lib/dom");M.importCssString(v.cssText,v.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(p){h&&(h.exports=p)})}()}(themeTwilight)),themeTwilight.exports}requireThemeTwilight();var rn=Object.defineProperty,on=(h,f,p)=>f in h?rn(h,f,{enumerable:!0,configurable:!0,writable:!0,value:p}):h[f]=p,D=(h,f,p)=>on(h,typeof f!="symbol"?f+"":f,p);function At(h,f){return function(){return h.apply(f,arguments)}}const{toString:cn}=Object.prototype,{getPrototypeOf:Be}=Object,{iterator:Ee,toStringTag:Rt}=Symbol,xe=(h=>f=>{const p=cn.call(f);return h[p]||(h[p]=p.slice(8,-1).toLowerCase())})(Object.create(null)),B=h=>(h=h.toLowerCase(),f=>xe(f)===h),Ae=h=>f=>typeof f===h,{isArray:te}=Array,ee=Ae("undefined");function oe(h){return h!==null&&!ee(h)&&h.constructor!==null&&!ee(h.constructor)&&N(h.constructor.isBuffer)&&h.constructor.isBuffer(h)}const Ot=B("ArrayBuffer");function an(h){let f;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?f=ArrayBuffer.isView(h):f=h&&h.buffer&&Ot(h.buffer),f}const ln=Ae("string"),N=Ae("function"),Ct=Ae("number"),ce=h=>h!==null&&typeof h=="object",un=h=>h===!0||h===!1,ye=h=>{if(xe(h)!=="object")return!1;const f=Be(h);return(f===null||f===Object.prototype||Object.getPrototypeOf(f)===null)&&!(Rt in h)&&!(Ee in h)},hn=h=>{if(!ce(h)||oe(h))return!1;try{return Object.keys(h).length===0&&Object.getPrototypeOf(h)===Object.prototype}catch{return!1}},dn=B("Date"),fn=B("File"),pn=B("Blob"),mn=B("FileList"),gn=h=>ce(h)&&N(h.pipe),bn=h=>{let f;return h&&(typeof FormData=="function"&&h instanceof FormData||N(h.append)&&((f=xe(h))==="formdata"||f==="object"&&N(h.toString)&&h.toString()==="[object FormData]"))},yn=B("URLSearchParams"),[_n,wn,Sn,En]=["ReadableStream","Request","Response","Headers"].map(B),xn=h=>h.trim?h.trim():h.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ae(h,f,{allOwnKeys:p=!1}={}){if(h===null||typeof h>"u")return;let v,fe;if(typeof h!="object"&&(h=[h]),te(h))for(v=0,fe=h.length;v<fe;v++)f.call(null,h[v],v,h);else{if(oe(h))return;const M=p?Object.getOwnPropertyNames(h):Object.keys(h),w=M.length;let A;for(v=0;v<w;v++)A=M[v],f.call(null,h[A],A,h)}}function Tt(h,f){if(oe(h))return null;f=f.toLowerCase();const p=Object.keys(h);let v=p.length,fe;for(;v-- >0;)if(fe=p[v],f===fe.toLowerCase())return fe;return null}const X=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,kt=h=>!ee(h)&&h!==X;function $e(){const{caseless:h,skipUndefined:f}=kt(this)&&this||{},p={},v=(fe,M)=>{const w=h&&Tt(p,M)||M;ye(p[w])&&ye(fe)?p[w]=$e(p[w],fe):ye(fe)?p[w]=$e({},fe):te(fe)?p[w]=fe.slice():(!f||!ee(fe))&&(p[w]=fe)};for(let fe=0,M=arguments.length;fe<M;fe++)arguments[fe]&&ae(arguments[fe],v);return p}const An=(h,f,p,{allOwnKeys:v}={})=>(ae(f,(fe,M)=>{p&&N(fe)?h[M]=At(fe,p):h[M]=fe},{allOwnKeys:v}),h),Rn=h=>(h.charCodeAt(0)===65279&&(h=h.slice(1)),h),On=(h,f,p,v)=>{h.prototype=Object.create(f.prototype,v),h.prototype.constructor=h,Object.defineProperty(h,"super",{value:f.prototype}),p&&Object.assign(h.prototype,p)},Cn=(h,f,p,v)=>{let fe,M,w;const A={};if(f=f||{},h==null)return f;do{for(fe=Object.getOwnPropertyNames(h),M=fe.length;M-- >0;)w=fe[M],(!v||v(w,h,f))&&!A[w]&&(f[w]=h[w],A[w]=!0);h=p!==!1&&Be(h)}while(h&&(!p||p(h,f))&&h!==Object.prototype);return f},Tn=(h,f,p)=>{h=String(h),(p===void 0||p>h.length)&&(p=h.length),p-=f.length;const v=h.indexOf(f,p);return v!==-1&&v===p},kn=h=>{if(!h)return null;if(te(h))return h;let f=h.length;if(!Ct(f))return null;const p=new Array(f);for(;f-- >0;)p[f]=h[f];return p},Nn=(h=>f=>h&&f instanceof h)(typeof Uint8Array<"u"&&Be(Uint8Array)),Pn=(h,f)=>{const p=(h&&h[Ee]).call(h);let v;for(;(v=p.next())&&!v.done;){const fe=v.value;f.call(h,fe[0],fe[1])}},In=(h,f)=>{let p;const v=[];for(;(p=h.exec(f))!==null;)v.push(p);return v},Ln=B("HTMLFormElement"),$n=h=>h.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(f,p,v){return p.toUpperCase()+v}),Ze=(({hasOwnProperty:h})=>(f,p)=>h.call(f,p))(Object.prototype),Fn=B("RegExp"),Nt=(h,f)=>{const p=Object.getOwnPropertyDescriptors(h),v={};ae(p,(fe,M)=>{let w;(w=f(fe,M,h))!==!1&&(v[M]=w||fe)}),Object.defineProperties(h,v)},vn=h=>{Nt(h,(f,p)=>{if(N(h)&&["arguments","caller","callee"].indexOf(p)!==-1)return!1;const v=h[p];if(N(v)){if(f.enumerable=!1,"writable"in f){f.writable=!1;return}f.set||(f.set=()=>{throw Error("Can not rewrite read-only method '"+p+"'")})}})},jn=(h,f)=>{const p={},v=fe=>{fe.forEach(M=>{p[M]=!0})};return te(h)?v(h):v(String(h).split(f)),p},Un=()=>{},Dn=(h,f)=>h!=null&&Number.isFinite(h=+h)?h:f;function qn(h){return!!(h&&N(h.append)&&h[Rt]==="FormData"&&h[Ee])}const Bn=h=>{const f=new Array(10),p=(v,fe)=>{if(ce(v)){if(f.indexOf(v)>=0)return;if(oe(v))return v;if(!("toJSON"in v)){f[fe]=v;const M=te(v)?[]:{};return ae(v,(w,A)=>{const a=p(w,fe+1);!ee(a)&&(M[A]=a)}),f[fe]=void 0,M}}return v};return p(h,0)},Mn=B("AsyncFunction"),Hn=h=>h&&(ce(h)||N(h))&&N(h.then)&&N(h.catch),Pt=((h,f)=>h?setImmediate:f?((p,v)=>(X.addEventListener("message",({source:fe,data:M})=>{fe===X&&M===p&&v.length&&v.shift()()},!1),fe=>{v.push(fe),X.postMessage(p,"*")}))(`axios@${Math.random()}`,[]):p=>setTimeout(p))(typeof setImmediate=="function",N(X.postMessage)),zn=typeof queueMicrotask<"u"?queueMicrotask.bind(X):typeof process<"u"&&process.nextTick||Pt,Vn=h=>h!=null&&N(h[Ee]),l={isArray:te,isArrayBuffer:Ot,isBuffer:oe,isFormData:bn,isArrayBufferView:an,isString:ln,isNumber:Ct,isBoolean:un,isObject:ce,isPlainObject:ye,isEmptyObject:hn,isReadableStream:_n,isRequest:wn,isResponse:Sn,isHeaders:En,isUndefined:ee,isDate:dn,isFile:fn,isBlob:pn,isRegExp:Fn,isFunction:N,isStream:gn,isURLSearchParams:yn,isTypedArray:Nn,isFileList:mn,forEach:ae,merge:$e,extend:An,trim:xn,stripBOM:Rn,inherits:On,toFlatObject:Cn,kindOf:xe,kindOfTest:B,endsWith:Tn,toArray:kn,forEachEntry:Pn,matchAll:In,isHTMLForm:Ln,hasOwnProperty:Ze,hasOwnProp:Ze,reduceDescriptors:Nt,freezeMethods:vn,toObjectSet:jn,toCamelCase:$n,noop:Un,toFiniteNumber:Dn,findKey:Tt,global:X,isContextDefined:kt,isSpecCompliantForm:qn,toJSONObject:Bn,isAsyncFn:Mn,isThenable:Hn,setImmediate:Pt,asap:zn,isIterable:Vn};function _(h,f,p,v,fe){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=h,this.name="AxiosError",f&&(this.code=f),p&&(this.config=p),v&&(this.request=v),fe&&(this.response=fe,this.status=fe.status?fe.status:null)}l.inherits(_,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:l.toJSONObject(this.config),code:this.code,status:this.status}}});const It=_.prototype,Lt={};["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(h=>{Lt[h]={value:h}}),Object.defineProperties(_,Lt),Object.defineProperty(It,"isAxiosError",{value:!0}),_.from=(h,f,p,v,fe,M)=>{const w=Object.create(It);l.toFlatObject(h,w,function(u){return u!==Error.prototype},u=>u!=="isAxiosError");const A=h&&h.message?h.message:"Error",a=f==null&&h?h.code:f;return _.call(w,A,a,p,v,fe),h&&w.cause==null&&Object.defineProperty(w,"cause",{value:h,configurable:!0}),w.name=h&&h.name||"Error",M&&Object.assign(w,M),w};const Jn=null;function Fe(h){return l.isPlainObject(h)||l.isArray(h)}function $t(h){return l.endsWith(h,"[]")?h.slice(0,-2):h}function Ye(h,f,p){return h?h.concat(f).map(function(v,fe){return v=$t(v),!p&&fe?"["+v+"]":v}).join(p?".":""):f}function Wn(h){return l.isArray(h)&&!h.some(Fe)}const Kn=l.toFlatObject(l,{},null,function(h){return/^is[A-Z]/.test(h)});function Re(h,f,p){if(!l.isObject(h))throw new TypeError("target must be an object");f=f||new FormData,p=l.toFlatObject(p,{metaTokens:!0,dots:!1,indexes:!1},!1,function(i,e){return!l.isUndefined(e[i])});const v=p.metaTokens,fe=p.visitor||u,M=p.dots,w=p.indexes,A=(p.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(f);if(!l.isFunction(fe))throw new TypeError("visitor must be a function");function a(i){if(i===null)return"";if(l.isDate(i))return i.toISOString();if(l.isBoolean(i))return i.toString();if(!A&&l.isBlob(i))throw new _("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(i)||l.isTypedArray(i)?A&&typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function u(i,e,t){let c=i;if(i&&!t&&typeof i=="object"){if(l.endsWith(e,"{}"))e=v?e:e.slice(0,-2),i=JSON.stringify(i);else if(l.isArray(i)&&Wn(i)||(l.isFileList(i)||l.endsWith(e,"[]"))&&(c=l.toArray(i)))return e=$t(e),c.forEach(function(g,m){!(l.isUndefined(g)||g===null)&&f.append(w===!0?Ye([e],m,M):w===null?e:e+"[]",a(g))}),!1}return Fe(i)?!0:(f.append(Ye(t,e,M),a(i)),!1)}const n=[],o=Object.assign(Kn,{defaultVisitor:u,convertValue:a,isVisitable:Fe});function r(i,e){if(!l.isUndefined(i)){if(n.indexOf(i)!==-1)throw Error("Circular reference detected in "+e.join("."));n.push(i),l.forEach(i,function(t,c){(!(l.isUndefined(t)||t===null)&&fe.call(f,t,l.isString(c)?c.trim():c,e,o))===!0&&r(t,e?e.concat(c):[c])}),n.pop()}}if(!l.isObject(h))throw new TypeError("data must be an object");return r(h),f}function et(h){const f={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(h).replace(/[!'()~]|%20|%00/g,function(p){return f[p]})}function Me(h,f){this._pairs=[],h&&Re(h,this,f)}const Ft=Me.prototype;Ft.append=function(h,f){this._pairs.push([h,f])},Ft.toString=function(h){const f=h?function(p){return h.call(this,p,et)}:et;return this._pairs.map(function(p){return f(p[0])+"="+f(p[1])},"").join("&")};function Xn(h){return encodeURIComponent(h).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function vt(h,f,p){if(!f)return h;const v=p&&p.encode||Xn;l.isFunction(p)&&(p={serialize:p});const fe=p&&p.serialize;let M;if(fe?M=fe(f,p):M=l.isURLSearchParams(f)?f.toString():new Me(f,p).toString(v),M){const w=h.indexOf("#");w!==-1&&(h=h.slice(0,w)),h+=(h.indexOf("?")===-1?"?":"&")+M}return h}class tt{constructor(){this.handlers=[]}use(f,p,v){return this.handlers.push({fulfilled:f,rejected:p,synchronous:v?v.synchronous:!1,runWhen:v?v.runWhen:null}),this.handlers.length-1}eject(f){this.handlers[f]&&(this.handlers[f]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(f){l.forEach(this.handlers,function(p){p!==null&&f(p)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Gn=typeof URLSearchParams<"u"?URLSearchParams:Me,Qn=typeof FormData<"u"?FormData:null,Zn=typeof Blob<"u"?Blob:null,Yn={isBrowser:!0,classes:{URLSearchParams:Gn,FormData:Qn,Blob:Zn},protocols:["http","https","file","blob","url","data"]},He=typeof window<"u"&&typeof document<"u",ve=typeof navigator=="object"&&navigator||void 0,es=He&&(!ve||["ReactNative","NativeScript","NS"].indexOf(ve.product)<0),ts=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ns=He&&window.location.href||"http://localhost",ss=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:es,hasStandardBrowserWebWorkerEnv:ts,navigator:ve,origin:ns},Symbol.toStringTag,{value:"Module"})),k={...ss,...Yn};function rs(h,f){return Re(h,new k.classes.URLSearchParams,{visitor:function(p,v,fe,M){return k.isNode&&l.isBuffer(p)?(this.append(v,p.toString("base64")),!1):M.defaultVisitor.apply(this,arguments)},...f})}function is(h){return l.matchAll(/\w+|\[(\w*)]/g,h).map(f=>f[0]==="[]"?"":f[1]||f[0])}function os(h){const f={},p=Object.keys(h);let v;const fe=p.length;let M;for(v=0;v<fe;v++)M=p[v],f[M]=h[M];return f}function Ut(h){function f(p,v,fe,M){let w=p[M++];if(w==="__proto__")return!0;const A=Number.isFinite(+w),a=M>=p.length;return w=!w&&l.isArray(fe)?fe.length:w,a?(l.hasOwnProp(fe,w)?fe[w]=[fe[w],v]:fe[w]=v,!A):((!fe[w]||!l.isObject(fe[w]))&&(fe[w]=[]),f(p,v,fe[w],M)&&l.isArray(fe[w])&&(fe[w]=os(fe[w])),!A)}if(l.isFormData(h)&&l.isFunction(h.entries)){const p={};return l.forEachEntry(h,(v,fe)=>{f(is(v),fe,p,0)}),p}return null}function cs(h,f,p){if(l.isString(h))try{return(f||JSON.parse)(h),l.trim(h)}catch(v){if(v.name!=="SyntaxError")throw v}return(p||JSON.stringify)(h)}const le={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function(h,f){const p=f.getContentType()||"",v=p.indexOf("application/json")>-1,fe=l.isObject(h);if(fe&&l.isHTMLForm(h)&&(h=new FormData(h)),l.isFormData(h))return v?JSON.stringify(Ut(h)):h;if(l.isArrayBuffer(h)||l.isBuffer(h)||l.isStream(h)||l.isFile(h)||l.isBlob(h)||l.isReadableStream(h))return h;if(l.isArrayBufferView(h))return h.buffer;if(l.isURLSearchParams(h))return f.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),h.toString();let M;if(fe){if(p.indexOf("application/x-www-form-urlencoded")>-1)return rs(h,this.formSerializer).toString();if((M=l.isFileList(h))||p.indexOf("multipart/form-data")>-1){const w=this.env&&this.env.FormData;return Re(M?{"files[]":h}:h,w&&new w,this.formSerializer)}}return fe||v?(f.setContentType("application/json",!1),cs(h)):h}],transformResponse:[function(h){const f=this.transitional||le.transitional,p=f&&f.forcedJSONParsing,v=this.responseType==="json";if(l.isResponse(h)||l.isReadableStream(h))return h;if(h&&l.isString(h)&&(p&&!this.responseType||v)){const fe=!(f&&f.silentJSONParsing)&&v;try{return JSON.parse(h,this.parseReviver)}catch(M){if(fe)throw M.name==="SyntaxError"?_.from(M,_.ERR_BAD_RESPONSE,this,null,this.response):M}}return h}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:k.classes.FormData,Blob:k.classes.Blob},validateStatus:function(h){return h>=200&&h<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],h=>{le.headers[h]={}});const as=l.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"]),ls=h=>{const f={};let p,v,fe;return h&&h.split(`
1119
+ `).forEach(function(M){fe=M.indexOf(":"),p=M.substring(0,fe).trim().toLowerCase(),v=M.substring(fe+1).trim(),!(!p||f[p]&&as[p])&&(p==="set-cookie"?f[p]?f[p].push(v):f[p]=[v]:f[p]=f[p]?f[p]+", "+v:v)}),f},nt=Symbol("internals");function se(h){return h&&String(h).trim().toLowerCase()}function _e(h){return h===!1||h==null?h:l.isArray(h)?h.map(_e):String(h)}function us(h){const f=Object.create(null),p=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let v;for(;v=p.exec(h);)f[v[1]]=v[2];return f}const hs=h=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(h.trim());function Ne(h,f,p,v,fe){if(l.isFunction(v))return v.call(this,f,p);if(fe&&(f=p),!!l.isString(f)){if(l.isString(v))return f.indexOf(v)!==-1;if(l.isRegExp(v))return v.test(f)}}function ds(h){return h.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(f,p,v)=>p.toUpperCase()+v)}function fs(h,f){const p=l.toCamelCase(" "+f);["get","set","has"].forEach(v=>{Object.defineProperty(h,v+p,{value:function(fe,M,w){return this[v].call(this,f,fe,M,w)},configurable:!0})})}let P=class{constructor(h){h&&this.set(h)}set(h,f,p){const v=this;function fe(w,A,a){const u=se(A);if(!u)throw new Error("header name must be a non-empty string");const n=l.findKey(v,u);(!n||v[n]===void 0||a===!0||a===void 0&&v[n]!==!1)&&(v[n||A]=_e(w))}const M=(w,A)=>l.forEach(w,(a,u)=>fe(a,u,A));if(l.isPlainObject(h)||h instanceof this.constructor)M(h,f);else if(l.isString(h)&&(h=h.trim())&&!hs(h))M(ls(h),f);else if(l.isObject(h)&&l.isIterable(h)){let w={},A,a;for(const u of h){if(!l.isArray(u))throw TypeError("Object iterator must return a key-value pair");w[a=u[0]]=(A=w[a])?l.isArray(A)?[...A,u[1]]:[A,u[1]]:u[1]}M(w,f)}else h!=null&&fe(f,h,p);return this}get(h,f){if(h=se(h),h){const p=l.findKey(this,h);if(p){const v=this[p];if(!f)return v;if(f===!0)return us(v);if(l.isFunction(f))return f.call(this,v,p);if(l.isRegExp(f))return f.exec(v);throw new TypeError("parser must be boolean|regexp|function")}}}has(h,f){if(h=se(h),h){const p=l.findKey(this,h);return!!(p&&this[p]!==void 0&&(!f||Ne(this,this[p],p,f)))}return!1}delete(h,f){const p=this;let v=!1;function fe(M){if(M=se(M),M){const w=l.findKey(p,M);w&&(!f||Ne(p,p[w],w,f))&&(delete p[w],v=!0)}}return l.isArray(h)?h.forEach(fe):fe(h),v}clear(h){const f=Object.keys(this);let p=f.length,v=!1;for(;p--;){const fe=f[p];(!h||Ne(this,this[fe],fe,h,!0))&&(delete this[fe],v=!0)}return v}normalize(h){const f=this,p={};return l.forEach(this,(v,fe)=>{const M=l.findKey(p,fe);if(M){f[M]=_e(v),delete f[fe];return}const w=h?ds(fe):String(fe).trim();w!==fe&&delete f[fe],f[w]=_e(v),p[w]=!0}),this}concat(...h){return this.constructor.concat(this,...h)}toJSON(h){const f=Object.create(null);return l.forEach(this,(p,v)=>{p!=null&&p!==!1&&(f[v]=h&&l.isArray(p)?p.join(", "):p)}),f}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([h,f])=>h+": "+f).join(`
1120
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(h){return h instanceof this?h:new this(h)}static concat(h,...f){const p=new this(h);return f.forEach(v=>p.set(v)),p}static accessor(h){const f=(this[nt]=this[nt]={accessors:{}}).accessors,p=this.prototype;function v(fe){const M=se(fe);f[M]||(fs(p,fe),f[M]=!0)}return l.isArray(h)?h.forEach(v):v(h),this}};P.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(P.prototype,({value:h},f)=>{let p=f[0].toUpperCase()+f.slice(1);return{get:()=>h,set(v){this[p]=v}}}),l.freezeMethods(P);function Pe(h,f){const p=this||le,v=f||p,fe=P.from(v.headers);let M=v.data;return l.forEach(h,function(w){M=w.call(p,M,fe.normalize(),f?f.status:void 0)}),fe.normalize(),M}function Dt(h){return!!(h&&h.__CANCEL__)}function ne(h,f,p){_.call(this,h??"canceled",_.ERR_CANCELED,f,p),this.name="CanceledError"}l.inherits(ne,_,{__CANCEL__:!0});function qt(h,f,p){const v=p.config.validateStatus;!p.status||!v||v(p.status)?h(p):f(new _("Request failed with status code "+p.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(p.status/100)-4],p.config,p.request,p))}function ps(h){const f=/^([-+\w]{1,25})(:?\/\/|:)/.exec(h);return f&&f[1]||""}function ms(h,f){h=h||10;const p=new Array(h),v=new Array(h);let fe=0,M=0,w;return f=f!==void 0?f:1e3,function(A){const a=Date.now(),u=v[M];w||(w=a),p[fe]=A,v[fe]=a;let n=M,o=0;for(;n!==fe;)o+=p[n++],n=n%h;if(fe=(fe+1)%h,fe===M&&(M=(M+1)%h),a-w<f)return;const r=u&&a-u;return r?Math.round(o*1e3/r):void 0}}function gs(h,f){let p=0,v=1e3/f,fe,M;const w=(A,a=Date.now())=>{p=a,fe=null,M&&(clearTimeout(M),M=null),h(...A)};return[(...A)=>{const a=Date.now(),u=a-p;u>=v?w(A,a):(fe=A,M||(M=setTimeout(()=>{M=null,w(fe)},v-u)))},()=>fe&&w(fe)]}const Se=(h,f,p=3)=>{let v=0;const fe=ms(50,250);return gs(M=>{const w=M.loaded,A=M.lengthComputable?M.total:void 0,a=w-v,u=fe(a),n=w<=A;v=w;const o={loaded:w,total:A,progress:A?w/A:void 0,bytes:a,rate:u||void 0,estimated:u&&A&&n?(A-w)/u:void 0,event:M,lengthComputable:A!=null,[f?"download":"upload"]:!0};h(o)},p)},st=(h,f)=>{const p=h!=null;return[v=>f[0]({lengthComputable:p,total:h,loaded:v}),f[1]]},rt=h=>(...f)=>l.asap(()=>h(...f)),bs=k.hasStandardBrowserEnv?((h,f)=>p=>(p=new URL(p,k.origin),h.protocol===p.protocol&&h.host===p.host&&(f||h.port===p.port)))(new URL(k.origin),k.navigator&&/(msie|trident)/i.test(k.navigator.userAgent)):()=>!0,ys=k.hasStandardBrowserEnv?{write(h,f,p,v,fe,M,w){if(typeof document>"u")return;const A=[`${h}=${encodeURIComponent(f)}`];l.isNumber(p)&&A.push(`expires=${new Date(p).toUTCString()}`),l.isString(v)&&A.push(`path=${v}`),l.isString(fe)&&A.push(`domain=${fe}`),M===!0&&A.push("secure"),l.isString(w)&&A.push(`SameSite=${w}`),document.cookie=A.join("; ")},read(h){if(typeof document>"u")return null;const f=document.cookie.match(new RegExp("(?:^|; )"+h+"=([^;]*)"));return f?decodeURIComponent(f[1]):null},remove(h){this.write(h,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _s(h){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(h)}function ws(h,f){return f?h.replace(/\/?\/$/,"")+"/"+f.replace(/^\/+/,""):h}function Bt(h,f,p){let v=!_s(f);return h&&(v||p==!1)?ws(h,f):f}const it=h=>h instanceof P?{...h}:h;function Q(h,f){f=f||{};const p={};function v(u,n,o,r){return l.isPlainObject(u)&&l.isPlainObject(n)?l.merge.call({caseless:r},u,n):l.isPlainObject(n)?l.merge({},n):l.isArray(n)?n.slice():n}function fe(u,n,o,r){if(l.isUndefined(n)){if(!l.isUndefined(u))return v(void 0,u,o,r)}else return v(u,n,o,r)}function M(u,n){if(!l.isUndefined(n))return v(void 0,n)}function w(u,n){if(l.isUndefined(n)){if(!l.isUndefined(u))return v(void 0,u)}else return v(void 0,n)}function A(u,n,o){if(o in f)return v(u,n);if(o in h)return v(void 0,u)}const a={url:M,method:M,data:M,baseURL:w,transformRequest:w,transformResponse:w,paramsSerializer:w,timeout:w,timeoutMessage:w,withCredentials:w,withXSRFToken:w,adapter:w,responseType:w,xsrfCookieName:w,xsrfHeaderName:w,onUploadProgress:w,onDownloadProgress:w,decompress:w,maxContentLength:w,maxBodyLength:w,beforeRedirect:w,transport:w,httpAgent:w,httpsAgent:w,cancelToken:w,socketPath:w,responseEncoding:w,validateStatus:A,headers:(u,n,o)=>fe(it(u),it(n),o,!0)};return l.forEach(Object.keys({...h,...f}),function(u){const n=a[u]||fe,o=n(h[u],f[u],u);l.isUndefined(o)&&n!==A||(p[u]=o)}),p}const Mt=h=>{const f=Q({},h);let{data:p,withXSRFToken:v,xsrfHeaderName:fe,xsrfCookieName:M,headers:w,auth:A}=f;if(f.headers=w=P.from(w),f.url=vt(Bt(f.baseURL,f.url,f.allowAbsoluteUrls),h.params,h.paramsSerializer),A&&w.set("Authorization","Basic "+btoa((A.username||"")+":"+(A.password?unescape(encodeURIComponent(A.password)):""))),l.isFormData(p)){if(k.hasStandardBrowserEnv||k.hasStandardBrowserWebWorkerEnv)w.setContentType(void 0);else if(l.isFunction(p.getHeaders)){const a=p.getHeaders(),u=["content-type","content-length"];Object.entries(a).forEach(([n,o])=>{u.includes(n.toLowerCase())&&w.set(n,o)})}}if(k.hasStandardBrowserEnv&&(v&&l.isFunction(v)&&(v=v(f)),v||v!==!1&&bs(f.url))){const a=fe&&M&&ys.read(M);a&&w.set(fe,a)}return f},Ss=typeof XMLHttpRequest<"u",Es=Ss&&function(h){return new Promise(function(f,p){const v=Mt(h);let fe=v.data;const M=P.from(v.headers).normalize();let{responseType:w,onUploadProgress:A,onDownloadProgress:a}=v,u,n,o,r,i;function e(){r&&r(),i&&i(),v.cancelToken&&v.cancelToken.unsubscribe(u),v.signal&&v.signal.removeEventListener("abort",u)}let t=new XMLHttpRequest;t.open(v.method.toUpperCase(),v.url,!0),t.timeout=v.timeout;function c(){if(!t)return;const m=P.from("getAllResponseHeaders"in t&&t.getAllResponseHeaders()),E={data:!w||w==="text"||w==="json"?t.responseText:t.response,status:t.status,statusText:t.statusText,headers:m,config:h,request:t};qt(function(T){f(T),e()},function(T){p(T),e()},E),t=null}"onloadend"in t?t.onloadend=c:t.onreadystatechange=function(){!t||t.readyState!==4||t.status===0&&!(t.responseURL&&t.responseURL.indexOf("file:")===0)||setTimeout(c)},t.onabort=function(){t&&(p(new _("Request aborted",_.ECONNABORTED,h,t)),t=null)},t.onerror=function(m){const E=m&&m.message?m.message:"Network Error",T=new _(E,_.ERR_NETWORK,h,t);T.event=m||null,p(T),t=null},t.ontimeout=function(){let m=v.timeout?"timeout of "+v.timeout+"ms exceeded":"timeout exceeded";const E=v.transitional||jt;v.timeoutErrorMessage&&(m=v.timeoutErrorMessage),p(new _(m,E.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,h,t)),t=null},fe===void 0&&M.setContentType(null),"setRequestHeader"in t&&l.forEach(M.toJSON(),function(m,E){t.setRequestHeader(E,m)}),l.isUndefined(v.withCredentials)||(t.withCredentials=!!v.withCredentials),w&&w!=="json"&&(t.responseType=v.responseType),a&&([o,i]=Se(a,!0),t.addEventListener("progress",o)),A&&t.upload&&([n,r]=Se(A),t.upload.addEventListener("progress",n),t.upload.addEventListener("loadend",r)),(v.cancelToken||v.signal)&&(u=m=>{t&&(p(!m||m.type?new ne(null,h,t):m),t.abort(),t=null)},v.cancelToken&&v.cancelToken.subscribe(u),v.signal&&(v.signal.aborted?u():v.signal.addEventListener("abort",u)));const g=ps(v.url);if(g&&k.protocols.indexOf(g)===-1){p(new _("Unsupported protocol "+g+":",_.ERR_BAD_REQUEST,h));return}t.send(fe||null)})},xs=(h,f)=>{const{length:p}=h=h?h.filter(Boolean):[];if(f||p){let v=new AbortController,fe;const M=function(u){if(!fe){fe=!0,A();const n=u instanceof Error?u:this.reason;v.abort(n instanceof _?n:new ne(n instanceof Error?n.message:n))}};let w=f&&setTimeout(()=>{w=null,M(new _(`timeout ${f} of ms exceeded`,_.ETIMEDOUT))},f);const A=()=>{h&&(w&&clearTimeout(w),w=null,h.forEach(u=>{u.unsubscribe?u.unsubscribe(M):u.removeEventListener("abort",M)}),h=null)};h.forEach(u=>u.addEventListener("abort",M));const{signal:a}=v;return a.unsubscribe=()=>l.asap(A),a}},As=function*(h,f){let p=h.byteLength;if(p<f){yield h;return}let v=0,fe;for(;v<p;)fe=v+f,yield h.slice(v,fe),v=fe},Rs=async function*(h,f){for await(const p of Os(h))yield*As(p,f)},Os=async function*(h){if(h[Symbol.asyncIterator]){yield*h;return}const f=h.getReader();try{for(;;){const{done:p,value:v}=await f.read();if(p)break;yield v}}finally{await f.cancel()}},ot=(h,f,p,v)=>{const fe=Rs(h,f);let M=0,w,A=a=>{w||(w=!0,v&&v(a))};return new ReadableStream({async pull(a){try{const{done:u,value:n}=await fe.next();if(u){A(),a.close();return}let o=n.byteLength;if(p){let r=M+=o;p(r)}a.enqueue(new Uint8Array(n))}catch(u){throw A(u),u}},cancel(a){return A(a),fe.return()}},{highWaterMark:2})},ct=64*1024,{isFunction:pe}=l,Cs=(({Request:h,Response:f})=>({Request:h,Response:f}))(l.global),{ReadableStream:at,TextEncoder:lt}=l.global,ut=(h,...f)=>{try{return!!h(...f)}catch{return!1}},Ts=h=>{h=l.merge.call({skipUndefined:!0},Cs,h);const{fetch:f,Request:p,Response:v}=h,fe=f?pe(f):typeof fetch=="function",M=pe(p),w=pe(v);if(!fe)return!1;const A=fe&&pe(at),a=fe&&(typeof lt=="function"?(e=>t=>e.encode(t))(new lt):async e=>new Uint8Array(await new p(e).arrayBuffer())),u=M&&A&&ut(()=>{let e=!1;const t=new p(k.origin,{body:new at,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),n=w&&A&&ut(()=>l.isReadableStream(new v("").body)),o={stream:n&&(e=>e.body)};fe&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!o[e]&&(o[e]=(t,c)=>{let g=t&&t[e];if(g)return g.call(t);throw new _(`Response type '${e}' is not supported`,_.ERR_NOT_SUPPORT,c)})});const r=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new p(k.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(l.isArrayBufferView(e)||l.isArrayBuffer(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await a(e)).byteLength},i=async(e,t)=>l.toFiniteNumber(e.getContentLength())??r(t);return async e=>{let{url:t,method:c,data:g,signal:m,cancelToken:E,timeout:T,onDownloadProgress:x,onUploadProgress:b,responseType:de,headers:Te,withCredentials:he="same-origin",fetchOptions:Y}=Mt(e),gt=f||fetch;de=de?(de+"").toLowerCase():"text";let V=xs([m,E&&E.toAbortSignal()],T),O=null;const S=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let y;try{if(b&&u&&c!=="get"&&c!=="head"&&(y=await i(Te,g))!==0){let yt=new p(t,{method:"POST",body:g,duplex:"half"}),Qt;if(l.isFormData(g)&&(Qt=yt.headers.get("content-type"))&&Te.setContentType(Qt),yt.body){const[bt,Gt]=st(y,Se(rt(b)));g=ot(yt.body,ct,bt,Gt)}}l.isString(he)||(he=he?"include":"omit");const I=M&&"credentials"in p.prototype,ke={...Y,signal:V,method:c.toUpperCase(),headers:Te.normalize().toJSON(),body:g,duplex:"half",credentials:I?he:void 0};O=M&&new p(t,ke);let Qe=await(M?gt(O,Y):gt(t,ke));const Je=n&&(de==="stream"||de==="response");if(n&&(x||Je&&S)){const yt={};["status","statusText","headers"].forEach(Yt=>{yt[Yt]=Qe[Yt]});const Qt=l.toFiniteNumber(Qe.headers.get("content-length")),[bt,Gt]=x&&st(Qt,Se(rt(x),!0))||[];Qe=new v(ot(Qe.body,ct,bt,()=>{Gt&&Gt(),S&&S()}),yt)}de=de||"text";let mt=await o[l.findKey(o,de)||"text"](Qe,e);return!Je&&S&&S(),await new Promise((yt,Qt)=>{qt(yt,Qt,{data:mt,headers:P.from(Qe.headers),status:Qe.status,statusText:Qe.statusText,config:e,request:O})})}catch(I){throw S&&S(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new _("Network Error",_.ERR_NETWORK,e,O),{cause:I.cause||I}):_.from(I,I&&I.code,e,O)}}},ks=new Map,Ht=h=>{let f=h&&h.env||{};const{fetch:p,Request:v,Response:fe}=f,M=[v,fe,p];let w=M.length,A=w,a,u,n=ks;for(;A--;)a=M[A],u=n.get(a),u===void 0&&n.set(a,u=A?new Map:Ts(f)),n=u;return u};Ht();const ze={http:Jn,xhr:Es,fetch:{get:Ht}};l.forEach(ze,(h,f)=>{if(h){try{Object.defineProperty(h,"name",{value:f})}catch{}Object.defineProperty(h,"adapterName",{value:f})}});const ht=h=>`- ${h}`,Ns=h=>l.isFunction(h)||h===null||h===!1;function Ps(h,f){h=l.isArray(h)?h:[h];const{length:p}=h;let v,fe;const M={};for(let w=0;w<p;w++){v=h[w];let A;if(fe=v,!Ns(v)&&(fe=ze[(A=String(v)).toLowerCase()],fe===void 0))throw new _(`Unknown adapter '${A}'`);if(fe&&(l.isFunction(fe)||(fe=fe.get(f))))break;M[A||"#"+w]=fe}if(!fe){const w=Object.entries(M).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let A=p?w.length>1?`since :
1121
+ `+w.map(ht).join(`
1122
+ `):" "+ht(w[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+A,"ERR_NOT_SUPPORT")}return fe}const zt={getAdapter:Ps,adapters:ze};function Ie(h){if(h.cancelToken&&h.cancelToken.throwIfRequested(),h.signal&&h.signal.aborted)throw new ne(null,h)}function dt(h){return Ie(h),h.headers=P.from(h.headers),h.data=Pe.call(h,h.transformRequest),["post","put","patch"].indexOf(h.method)!==-1&&h.headers.setContentType("application/x-www-form-urlencoded",!1),zt.getAdapter(h.adapter||le.adapter,h)(h).then(function(f){return Ie(h),f.data=Pe.call(h,h.transformResponse,f),f.headers=P.from(f.headers),f},function(f){return Dt(f)||(Ie(h),f&&f.response&&(f.response.data=Pe.call(h,h.transformResponse,f.response),f.response.headers=P.from(f.response.headers))),Promise.reject(f)})}const Vt="1.13.2",Oe={};["object","boolean","number","function","string","symbol"].forEach((h,f)=>{Oe[h]=function(p){return typeof p===h||"a"+(f<1?"n ":" ")+h}});const ft={};Oe.transitional=function(h,f,p){function v(fe,M){return"[Axios v"+Vt+"] Transitional option '"+fe+"'"+M+(p?". "+p:"")}return(fe,M,w)=>{if(h===!1)throw new _(v(M," has been removed"+(f?" in "+f:"")),_.ERR_DEPRECATED);return f&&!ft[M]&&(ft[M]=!0,console.warn(v(M," has been deprecated since v"+f+" and will be removed in the near future"))),h?h(fe,M,w):!0}},Oe.spelling=function(h){return(f,p)=>(console.warn(`${p} is likely a misspelling of ${h}`),!0)};function Is(h,f,p){if(typeof h!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const v=Object.keys(h);let fe=v.length;for(;fe-- >0;){const M=v[fe],w=f[M];if(w){const A=h[M],a=A===void 0||w(A,M,h);if(a!==!0)throw new _("option "+M+" must be "+a,_.ERR_BAD_OPTION_VALUE);continue}if(p!==!0)throw new _("Unknown option "+M,_.ERR_BAD_OPTION)}}const we={assertOptions:Is,validators:Oe},H=we.validators;let G=class{constructor(h){this.defaults=h||{},this.interceptors={request:new tt,response:new tt}}async request(h,f){try{return await this._request(h,f)}catch(p){if(p instanceof Error){let v={};Error.captureStackTrace?Error.captureStackTrace(v):v=new Error;const fe=v.stack?v.stack.replace(/^.+\n/,""):"";try{p.stack?fe&&!String(p.stack).endsWith(fe.replace(/^.+\n.+\n/,""))&&(p.stack+=`
1123
+ `+fe):p.stack=fe}catch{}}throw p}}_request(h,f){typeof h=="string"?(f=f||{},f.url=h):f=h||{},f=Q(this.defaults,f);const{transitional:p,paramsSerializer:v,headers:fe}=f;p!==void 0&&we.assertOptions(p,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),v!=null&&(l.isFunction(v)?f.paramsSerializer={serialize:v}:we.assertOptions(v,{encode:H.function,serialize:H.function},!0)),f.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?f.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:f.allowAbsoluteUrls=!0),we.assertOptions(f,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),f.method=(f.method||this.defaults.method||"get").toLowerCase();let M=fe&&l.merge(fe.common,fe[f.method]);fe&&l.forEach(["delete","get","head","post","put","patch","common"],i=>{delete fe[i]}),f.headers=P.concat(M,fe);const w=[];let A=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(f)===!1||(A=A&&i.synchronous,w.unshift(i.fulfilled,i.rejected))});const a=[];this.interceptors.response.forEach(function(i){a.push(i.fulfilled,i.rejected)});let u,n=0,o;if(!A){const i=[dt.bind(this),void 0];for(i.unshift(...w),i.push(...a),o=i.length,u=Promise.resolve(f);n<o;)u=u.then(i[n++],i[n++]);return u}o=w.length;let r=f;for(;n<o;){const i=w[n++],e=w[n++];try{r=i(r)}catch(t){e.call(this,t);break}}try{u=dt.call(this,r)}catch(i){return Promise.reject(i)}for(n=0,o=a.length;n<o;)u=u.then(a[n++],a[n++]);return u}getUri(h){h=Q(this.defaults,h);const f=Bt(h.baseURL,h.url,h.allowAbsoluteUrls);return vt(f,h.params,h.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(h){G.prototype[h]=function(f,p){return this.request(Q(p||{},{method:h,url:f,data:(p||{}).data}))}}),l.forEach(["post","put","patch"],function(h){function f(p){return function(v,fe,M){return this.request(Q(M||{},{method:h,headers:p?{"Content-Type":"multipart/form-data"}:{},url:v,data:fe}))}}G.prototype[h]=f(),G.prototype[h+"Form"]=f(!0)});let Ls=class Ai{constructor(f){if(typeof f!="function")throw new TypeError("executor must be a function.");let p;this.promise=new Promise(function(fe){p=fe});const v=this;this.promise.then(fe=>{if(!v._listeners)return;let M=v._listeners.length;for(;M-- >0;)v._listeners[M](fe);v._listeners=null}),this.promise.then=fe=>{let M;const w=new Promise(A=>{v.subscribe(A),M=A}).then(fe);return w.cancel=function(){v.unsubscribe(M)},w},f(function(fe,M,w){v.reason||(v.reason=new ne(fe,M,w),p(v.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(f){if(this.reason){f(this.reason);return}this._listeners?this._listeners.push(f):this._listeners=[f]}unsubscribe(f){if(!this._listeners)return;const p=this._listeners.indexOf(f);p!==-1&&this._listeners.splice(p,1)}toAbortSignal(){const f=new AbortController,p=v=>{f.abort(v)};return this.subscribe(p),f.signal.unsubscribe=()=>this.unsubscribe(p),f.signal}static source(){let f;return{token:new Ai(function(p){f=p}),cancel:f}}};function $s(h){return function(f){return h.apply(null,f)}}function Fs(h){return l.isObject(h)&&h.isAxiosError===!0}const je={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(je).forEach(([h,f])=>{je[f]=h});function Wt(h){const f=new G(h),p=At(G.prototype.request,f);return l.extend(p,G.prototype,f,{allOwnKeys:!0}),l.extend(p,f,null,{allOwnKeys:!0}),p.create=function(v){return Wt(Q(h,v))},p}const R=Wt(le);R.Axios=G,R.CanceledError=ne,R.CancelToken=Ls,R.isCancel=Dt,R.VERSION=Vt,R.toFormData=Re,R.AxiosError=_,R.Cancel=R.CanceledError,R.all=function(h){return Promise.all(h)},R.spread=$s,R.isAxiosError=Fs,R.mergeConfig=Q,R.AxiosHeaders=P,R.formToJSON=h=>Ut(l.isHTMLForm(h)?new FormData(h):h),R.getAdapter=zt.getAdapter,R.HttpStatusCode=je,R.default=R;const{Axios:Qr,AxiosError:Zr,CanceledError:Yr,isCancel:ei,CancelToken:ti,VERSION:ni,all:si,Cancel:ri,isAxiosError:ii,spread:oi,toFormData:ci,AxiosHeaders:ai,HttpStatusCode:li,formToJSON:ui,getAdapter:hi,mergeConfig:di}=R,Ve=R.create({baseURL:location.origin,timeout:6e4,params:{}});Ve.interceptors.response.use(h=>h,h=>{var f,p,v,fe,M,w,A,a,u,n,o;if(h.response){if(h.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(e){e&&OpenC3Auth.setTokens()}),h.response.config.headers["Ignore-Errors"]&&h.response.config.headers["Ignore-Errors"].includes(h.response.status.toString()))return Promise.reject(h);let r=`HTTP ${h.response.status} - `;(f=h.response)!=null&&f.statusText&&(r+=`${h.response.statusText} `),(v=(p=h.response)==null?void 0:p.config)!=null&&v.data&&(r+=`${h.response.config.data} `),(M=(fe=h.response)==null?void 0:fe.data)!=null&&M.message?r+=`${h.response.data.message}`:(A=(w=h.response)==null?void 0:w.data)!=null&&A.exception?r+=`${h.response.data.exception}`:(n=(u=(a=h.response)==null?void 0:a.data)==null?void 0:u.error)!=null&&n.message?(h.response.data.error.class&&(r+=`${h.response.data.error.class} `),r+=`${h.response.data.error.message}`):r+=`${(o=h.response)==null?void 0:o.data}`;const{$cosmosNotify:i}=window;throw i&&i.serious({title:"Network error",body:r}),h}else throw h});const me=async function(h,f,{data:p,params:v={},headers:fe,noAuth:M=!1,noScope:w=!1,onUploadProgress:A=!1}={}){if(!M){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}fe.Authorization=localStorage.openc3Token}return fe.manual=!0,!w&&!v.scope&&(v.scope=window.openc3Scope),Ve({method:h,url:f,data:p,params:v,headers:fe,onUploadProgress:A})},Ue={Accept:"application/json"},pt={...Ue,"Content-Type":"application/json"},fi={get:function(h,{params:f,headers:p=Ue,noScope:v,noAuth:fe,onUploadProgress:M}={}){return me("get",h,{params:f,headers:p,noScope:v,noAuth:fe,onUploadProgress:M})},put:function(h,{data:f,params:p,headers:v=pt,noScope:fe,noAuth:M,onUploadProgress:w}={}){return me("put",h,{data:f,params:p,headers:v,noScope:fe,noAuth:M,onUploadProgress:w})},post:function(h,{data:f,params:p,headers:v=pt,noScope:fe,noAuth:M,onUploadProgress:w}={}){return me("post",h,{data:f,params:p,headers:v,noScope:fe,noAuth:M,onUploadProgress:w})},delete:function(h,{params:f,headers:p=Ue,noScope:v,noAuth:fe,onUploadProgress:M}={}){return me("delete",h,{params:f,headers:p,noScope:v,noAuth:fe,onUploadProgress:M})}};let Ce=()=>({emit(h,...f){for(let p=this.events[h]||[],v=0,fe=p.length;v<fe;v++)p[v](...f)},events:{},on(h,f){var p;return((p=this.events)[h]||(p[h]=[])).push(f),()=>{var v;this.events[h]=(v=this.events[h])==null?void 0:v.filter(fe=>f!==fe)}}});class ue extends Error{constructor(f,p){f instanceof Error?(super(f.message),this.cause=f):super(f),this.reason=p,this.name="ReasonError"}}function Kt(h){return h?`{${Object.keys(h).sort().filter(f=>h[f]!==void 0).map(f=>{let p=JSON.stringify(h[f]);return`${JSON.stringify(f)}:${p}`}).join(",")}}`:""}class Us{constructor(f){this.channel=f,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",f=>{if(f.type==="info"){this._state||(this._state=this.stateFromInfo(f));return}this._state&&(f.type==="join"?this._state[f.id]=f.info:f.type==="leave"&&delete this._state[f.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(f=>f()),this.listeners.length=0}async join(f,p){if(!this._info)return this._info={id:f,info:p},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let f=await this.channel.perform("$presence:leave");return delete this._info,f}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let f=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(f),this._state}finally{delete this._promise}}stateFromInfo(f){return f.records.reduce((p,{id:v,info:fe})=>(p[v]=fe,p),{})}}const W=Symbol("state");class Xt{constructor(f={}){this.emitter=Ce(),this.params=Object.freeze(f),this.presence=new Us(this),this.initialConnect=!0,this[W]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Kt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[W]}attached(f){if(this.receiver){if(this.receiver!==f)throw Error("Already connected to a different receiver");return!1}return this.receiver=f,!0}connecting(){this[W]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[W]="connected";let f=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:f})):this.emit("connect",{reconnect:!0,restored:f})}restored(){if(this.state==="connected")throw Error("Already connected");this[W]="connected";let f=!0,p=!0;this.initialConnect=!1,this.emit("connect",{reconnect:p,restored:f})}disconnected(f){this.state==="disconnected"||this.state==="closed"||(this[W]="disconnected",this.presence.reset(),this.emit("disconnect",f))}closed(f){this.state!=="closed"&&(this[W]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",f))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(f,p){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,f,p)}async send(f){return this.perform(void 0,f)}async whisper(f){try{await this.perform("$whisper",f)}catch(p){let v=this.receiver?this.receiver.logger:null;v&&v.warn("whisper failed: ",p)}}receive(f,p){this.emit("message",f,p)}on(f,p){return this.emitter.on(f,p)}once(f,p){let v=this.emitter.on(f,(...fe)=>{v(),p(...fe)});return v}emit(f,...p){return this.emitter.emit(f,...p)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((f,p)=>{let v=[()=>delete this._pendingSubscribe];v.push(this.on("connect",()=>{v.forEach(fe=>fe()),f()})),v.push(this.on("close",fe=>{v.forEach(M=>M()),p(fe||new ue("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class We extends Xt{constructor(f,p){super(p),this.channelId=f}set channelId(f){this._channelId=f}get channelId(){return this._channelId}}D(We,"identifier","__ghost__");const Ws="$pubsub";class De extends Xt{async perform(f,p){if(f.startsWith("$"))return super.perform(f,p);throw Error("not implemented")}}D(De,"identifier",Ws);function ie(h){return pr.test(h)}const pr=/^-?[0-9]+$/;function tn(h){return mr.test(h)}const mr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function nn(h,f){if(ie(h))return Number.isSafeInteger(Number.parseInt(h,10));const p=Number.parseFloat(h),v=String(p);if(h===v)return!0;const fe=_t(h),M=_t(v);return!!(fe===M||(f==null?void 0:f.approx)===!0&&!ie(h)&&M.length>=14&&fe.startsWith(M.substring(0,14)))}let re=function(h){return h.underflow="underflow",h.overflow="overflow",h.truncate_integer="truncate_integer",h.truncate_float="truncate_float",h}({});function gr(h){if(nn(h,{approx:!1}))return;if(ie(h))return re.truncate_integer;const f=Number.parseFloat(h);return Number.isFinite(f)?f===0?re.underflow:re.truncate_float:re.overflow}function _t(h){const{start:f,end:p}=br(h),v=h.substring(f,p),fe=v.indexOf(".");return fe===-1?v:v.substring(0,fe)+v.substring(fe+1)}function br(h){let f=0;for(h[0]==="-"&&f++;h[f]==="0"||h[f]===".";)f++;let p=h.lastIndexOf("e");for(p===-1&&(p=h.lastIndexOf("E")),p===-1&&(p=h.length);(h[p-1]==="0"||h[p-1]===".")&&p>f;)p--;return{start:f,end:p}}class yr{constructor(f){if(D(this,"isLosslessNumber",!0),!tn(f))throw new Error(`Invalid number (value: "${f}")`);this.value=f}valueOf(){const f=gr(this.value);if(f===void 0||f===re.truncate_float)return Number.parseFloat(this.value);if(ie(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${f} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function _r(h){return h&&typeof h=="object"&&h.isLosslessNumber||!1}function wr(h){return new yr(h)}function Sr(h,f){return Ke({"":h},"",h,f)}function Ke(h,f,p,v){return Array.isArray(p)?v.call(h,f,xr(p,v)):p&&typeof p=="object"&&!_r(p)?v.call(h,f,Er(p,v)):v.call(h,f,p)}function Er(h,f){for(const p of Object.keys(h)){const v=Ke(h,p,h[p],f);v!==void 0?h[p]=v:delete h[p]}return h}function xr(h,f){for(let p=0;p<h.length;p++)h[p]=Ke(h,String(p),h[p],f);return h}function Ar(h,f,p){const v=typeof p=="function"?{parseNumber:p}:p,fe=(v==null?void 0:v.parseNumber)??wr,M=(v==null?void 0:v.onDuplicateKey)??de;let w=0;const A=n();return g(A),E(),f?Sr(A,f):A;function a(){if(h.charCodeAt(w)===Nr){w++,r();const ke={};let Qe=!0;for(;w<h.length&&h.charCodeAt(w)!==St;){Qe?Qe=!1:(t(),r());const Je=w,mt=i();if(mt===void 0){b();return}r(),c();const yt=n();if(yt===void 0){V();return}if(Object.prototype.hasOwnProperty.call(ke,mt)&&!qe(yt,ke[mt])){const Qt=M({key:mt,position:Je+1,oldValue:ke[mt],newValue:yt});Qt!==void 0&&(ke[mt]=Qt)}else ke[mt]=yt}return h.charCodeAt(w)!==St&&Te(),w++,ke}}function u(){if(h.charCodeAt(w)===Pr){w++,r();const ke=[];let Qe=!0;for(;w<h.length&&h.charCodeAt(w)!==Et;){Qe?Qe=!1:t();const Je=n();m(Je),ke.push(Je)}return h.charCodeAt(w)!==Et&&he(),w++,ke}}function n(){r();const ke=i()??e()??a()??u()??o("true",!0)??o("false",!1)??o("null",null);return r(),ke}function o(ke,Qe){if(h.slice(w,w+ke.length)===ke)return w+=ke.length,Qe}function r(){for(;Rr(h.charCodeAt(w));)w++}function i(){if(h.charCodeAt(w)===Le){w++;let ke="";for(;w<h.length&&h.charCodeAt(w)!==Le;){if(h.charCodeAt(w)===kr){const Qe=h[w+1],Je=Tr[Qe];Je!==void 0?(ke+=Je,w++):Qe==="u"?ge(h.charCodeAt(w+2))&&ge(h.charCodeAt(w+3))&&ge(h.charCodeAt(w+4))&&ge(h.charCodeAt(w+5))?(ke+=String.fromCharCode(Number.parseInt(h.slice(w+2,w+6),16)),w+=5):O(w):gt(w)}else Cr(h.charCodeAt(w))?ke+=h[w]:Y(h[w]);w++}return x(),w++,ke}}function e(){const ke=w;if(h.charCodeAt(w)===xt&&(w++,T(ke)),h.charCodeAt(w)===Xe)w++;else if(Or(h.charCodeAt(w)))for(w++;be(h.charCodeAt(w));)w++;if(h.charCodeAt(w)===Dr)for(w++,T(ke);be(h.charCodeAt(w));)w++;if(h.charCodeAt(w)===zr||h.charCodeAt(w)===Hr)for(w++,(h.charCodeAt(w)===xt||h.charCodeAt(w)===vr)&&w++,T(ke);be(h.charCodeAt(w));)w++;if(w>ke)return fe(h.slice(ke,w))}function t(){if(h.charCodeAt(w)!==Ur)throw new SyntaxError(`Comma ',' expected after value ${I()}`);w++}function c(){if(h.charCodeAt(w)!==qr)throw new SyntaxError(`Colon ':' expected after property name ${I()}`);w++}function g(ke){if(ke===void 0)throw new SyntaxError(`JSON value expected ${I()}`)}function m(ke){if(ke===void 0)throw new SyntaxError(`Array item expected ${I()}`)}function E(){if(w<h.length)throw new SyntaxError(`Expected end of input ${I()}`)}function T(ke){if(!be(h.charCodeAt(w))){const Qe=h.slice(ke,w);throw new SyntaxError(`Invalid number '${Qe}', expecting a digit ${I()}`)}}function x(){if(h.charCodeAt(w)!==Le)throw new SyntaxError(`End of string '"' expected ${I()}`)}function b(){throw new SyntaxError(`Quoted object key expected ${I()}`)}function de(ke){let{key:Qe,position:Je}=ke;throw new SyntaxError(`Duplicate key '${Qe}' encountered at position ${Je}`)}function Te(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${I()}`)}function he(){throw new SyntaxError(`Array item or end of array ']' expected ${I()}`)}function Y(ke){throw new SyntaxError(`Invalid character '${ke}' ${S()}`)}function gt(ke){const Qe=h.slice(ke,ke+2);throw new SyntaxError(`Invalid escape character '${Qe}' ${S()}`)}function V(){throw new SyntaxError(`Object value expected after ':' ${S()}`)}function O(ke){const Qe=h.slice(ke,ke+6);throw new SyntaxError(`Invalid unicode character '${Qe}' ${S()}`)}function S(){return`at position ${w}`}function y(){return w<h.length?`but got '${h[w]}'`:"but reached end of input"}function I(){return`${y()} ${S()}`}}function Rr(h){return h===Ir||h===Lr||h===$r||h===Fr}function ge(h){return h>=Xe&&h<=Ge||h>=Br&&h<=Vr||h>=Mr&&h<=Jr}function be(h){return h>=Xe&&h<=Ge}function Or(h){return h>=jr&&h<=Ge}function Cr(h){return h>=32&&h<=1114111}function qe(h,f){return h===f?!0:Array.isArray(h)&&Array.isArray(f)?h.length===f.length&&h.every((p,v)=>qe(p,f[v])):wt(h)&&wt(f)?[...new Set([...Object.keys(h),...Object.keys(f)])].every(p=>qe(h[p],f[p])):!1}function wt(h){return typeof h=="object"&&h!==null}const Tr={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1124
+ `,r:"\r",t:" "},kr=92,Nr=123,St=125,Pr=91,Et=93,Ir=32,Lr=10,$r=9,Fr=13,Le=34,vr=43,xt=45,Xe=48,jr=49,Ge=57,Ur=44,Dr=46,qr=58,Br=65,Mr=97,Hr=69,zr=101,Vr=70,Jr=102;function sn(h,f,p,v){return fe(h);function fe(a,u){if(Array.isArray(v)){const n=v.find(o=>o.test(a));if(n){const o=n.stringify(a);if(typeof o!="string"||!tn(o))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${o})`);return o}}if(typeof a=="boolean"||typeof a=="number"||typeof a=="string"||a===null||a instanceof Date||a instanceof Boolean||a instanceof Number||a instanceof String)return JSON.stringify(a);if(a!=null&&a.isLosslessNumber||typeof a=="bigint")return a.toString();if(Array.isArray(a))return M(a);if(a&&typeof a=="object")return w(a)}function M(a,u){if(a.length===0)return"[]";let n="[";for(let o=0;o<a.length;o++){const r=a[o];typeof r<"u"&&typeof r!="function"?n+=fe(r):n+="null",o<a.length-1&&(n+=",")}return n+="]",n}function w(a,u){if(typeof a.toJSON=="function")return sn(a.toJSON(),f,p,void 0);const n=Array.isArray(f)?f.map(String):Object.keys(a);if(n.length===0)return"{}";let o=!0,r="{";for(const i of n){const e=a[i];if(A(i,e)){o?o=!1:r+=",";const t=JSON.stringify(i);r+=`${t}:`,r+=fe(e)}}return r+="}",r}function A(a,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function Wr(h){return ie(h)&&!nn(h)?BigInt(h):parseFloat(h)}class yi{constructor(){D(this,"id",1)}async exec(f,p,v={},fe={},M=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return v.scope=window.openc3Scope,fe.manual=!0,(await Ve.post("/openc3-api/api",{jsonrpc:"2.0",method:f,params:p,id:this.id,keyword_params:v},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...fe},timeout:M,transformRequest:[(w,A)=>sn(w)],transformResponse:[w=>Ar(w,void 0,Wr)]})).data.result}catch(w){let A=new Error;throw w.response?(A.name=w.response.data.error.data.class,A.message=w.response.data.error.data.message,A.object=w.response.data.error):w.request?(A.name="Request error",A.message="Request error, no response received"):A=w,A}}decode_openc3_type(f){if(f!==null&&typeof f=="object"&&f.json_class=="Float"&&f.raw){if(f.raw=="NaN")return NaN;if(f.raw=="Infinity")return 1/0;if(f.raw=="-Infinity")return-1/0}return null}encode_openc3_type(f){return Number.isNaN(f)?{json_class:"Float",raw:"NaN"}:f==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:f==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(f=>{f&&(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(f){return this.exec("set_offline_access",[f])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(f,p,v,fe,M){return this.exec("map_target_to_interface",[f,p],{cmd_only:v,tlm_only:fe,unmap_old:M})}unmap_target_from_interface(f,p,v,fe){return this.exec("unmap_target_from_interface",[f,p],{cmd_only:v,tlm_only:fe})}connect_interface(f,...p){return p.length>0?this.exec("connect_interface",[f,...p]):this.exec("connect_interface",[f])}disconnect_interface(f){return this.exec("disconnect_interface",[f])}interface_cmd(f,p,...v){return this.exec("interface_cmd",[f,p,...v])}interface_target_enable(f,p,v=!1,fe=!1){return this.exec("interface_target_enable",[f,p],{cmd_only:v,tlm_only:fe})}interface_target_disable(f,p,v=!1,fe=!1){return this.exec("interface_target_disable",[f,p],{cmd_only:v,tlm_only:fe})}interface_details(f){return this.exec("interface_details",[f])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(f,p,v,fe,M){return this.exec("map_target_to_router",[f,p],{cmd_only:v,tlm_only:fe,unmap_old:M})}unmap_target_from_router(f,p,v,fe){return this.exec("unmap_target_from_router",[f,p],{cmd_only:v,tlm_only:fe})}connect_router(f){return this.exec("connect_router",[f])}disconnect_router(f){return this.exec("disconnect_router",[f])}router_target_enable(f,p,v=!1,fe=!1){return this.exec("router_target_enable",[f,p],{cmd_only:v,tlm_only:fe})}router_target_disable(f,p,v=!1,fe=!1){return this.exec("router_target_disable",[f,p],{cmd_only:v,tlm_only:fe})}router_details(f){return this.exec("router_details",[f])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(f){return this.exec("get_tlm_cnts",[f])}get_item(f,p,v){return this.exec("get_item",[f,p,v])}get_param(f,p,v){return this.exec("get_param",[f,p,v])}get_parameter(f,p,v){return this.exec("get_param",[f,p,v])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(f){return this.exec("set_limits_set",[f])}get_target(f){return this.exec("get_target",[f])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(f,p){return this.exec("get_tlm",[f,p])}get_telemetry(f,p){return this.exec("get_tlm",[f,p])}get_all_tlm(f){return this.exec("get_all_tlm",[f])}get_all_telemetry(f){return this.exec("get_all_tlm",[f])}get_all_tlm_names(f,p=!1){return this.exec("get_all_tlm_names",[f],{hidden:p})}get_all_telemetry_names(f){return this.exec("get_all_tlm_names",[f])}get_all_tlm_item_names(f){return this.exec("get_all_tlm_item_names",[f])}async get_tlm_packet(f,p,v,fe=30){const M=await this.exec("get_tlm_packet",[f,p],{type:v,stale_time:fe});if(M!=null){let w=M.length,A=null;for(let a=0;a<w;a++)A=this.decode_openc3_type(M[a][1]),A!==null&&(M[a][1]=A)}return M}get_packet_derived_items(f,p){return this.exec("get_packet_derived_items",[f,p])}get_tlm_buffer(f,p){return this.exec("get_tlm_buffer",[f,p])}get_tlm_available(f){return this.exec("get_tlm_available",[f])}async get_tlm_values(f,p=30,v=null,fe=null,M=null){let w={stale_time:p};v!==null&&(w.cache_timeout=v),fe!==null&&(w.start_time=fe.toISOString()),M!==null&&(w.end_time=M.toISOString());const A=await this.exec("get_tlm_values",[f],w,{},1e4);if(A&&A.length>0){let a=A.length,u=null;for(let n=0;n<a;n++)u=this.decode_openc3_type(A[n][0]),u!==null&&(A[n][0]=u)}return A}get_limits(f,p,v){return this.exec("get_limits",[f,p,v])}async tlm(f,p,v,fe="CONVERTED"){let M=null;if(p===void 0)M=await this.exec("tlm",[f]);else if(v===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(p))M=await this.exec("tlm",[f],{type:p});else{let A=new Error;throw A.name="TypeError",A.message=`Invalid data type ${p}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,A}else M=await this.exec("tlm",[f,p,v],{type:fe});let w=this.decode_openc3_type(M);return w!==null&&(M=w),M}async inject_tlm(f,p,v=null,fe="CONVERTED"){await this.exec("inject_tlm",[f,p,v],{type:fe})}set_tlm(f,p,v,fe){return this.exec("set_tlm",[f,p,v],{type:fe})}override_tlm(f,p,v,fe){return this.exec("override_tlm",[f,p,v],{type:fe})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(f,p,v,fe){return this.exec("normalize_tlm",[f,p,v],{type:fe})}get_all_cmds(f){return this.exec("get_all_cmds",[f])}get_all_commands(f){return this.exec("get_all_cmds",[f])}get_all_cmd_names(f,p=!1){return this.exec("get_all_cmd_names",[f],{hidden:p})}get_all_command_names(f){return this.exec("get_all_cmd_names",[f])}get_cmd(f,p){return this.exec("get_cmd",[f,p])}get_command(f,p){return this.exec("get_cmd",[f,p])}get_cmd_cnts(f){return this.exec("get_cmd_cnts",[f])}get_cmd_value(f,p,v,fe="CONVERTED"){return this.exec("get_cmd_value",[f,p,v,fe])}get_cmd_buffer(f,p){return this.exec("get_cmd_buffer",[f,p])}_cmd(f,p,v,fe,M,w={}){let A=null;for(let a in fe)Object.prototype.hasOwnProperty.call(fe,a)&&(A=this.encode_openc3_type(fe[a]),A!==null&&(fe[a]=A));return this.exec(f,[p,v,fe],w,M)}get_cmd_hazardous(f,p,v,fe={}){return p===void 0?this.exec("get_cmd_hazardous",f,{},fe):this._cmd("get_cmd_hazardous",f,p,v,fe)}cmd(f,p,v,fe={},M={}){return p===void 0?this.exec("cmd",f,M,fe):this._cmd("cmd",f,p,v,fe,M)}cmd_no_range_check(f,p,v,fe={},M={}){return p===void 0?this.exec("cmd_no_range_check",f,M,fe):this._cmd("cmd_no_range_check",f,p,v,fe,M)}cmd_raw(f,p,v,fe={},M={}){return p===void 0?this.exec("cmd_raw",f,M,fe):this._cmd("cmd_raw",f,p,v,fe,M)}cmd_raw_no_range_check(f,p,v,fe={},M={}){return p===void 0?this.exec("cmd_raw_no_range_check",f,M,fe):this._cmd("cmd_raw_no_range_check",f,p,v,fe,M)}cmd_no_hazardous_check(f,p,v,fe={},M={}){return p===void 0?this.exec("cmd_no_hazardous_check",f,M,fe):this._cmd("cmd_no_hazardous_check",f,p,v,fe,M)}cmd_no_checks(f,p,v,fe={},M={}){return p===void 0?this.exec("cmd_no_checks",f,M,fe):this._cmd("cmd_no_checks",f,p,v,fe,M)}cmd_raw_no_hazardous_check(f,p,v,fe={},M={}){return p===void 0?this.exec("cmd_raw_no_hazardous_check",f,M,fe):this._cmd("cmd_raw_no_hazardous_check",f,p,v,fe,M)}cmd_raw_no_checks(f,p,v,fe={},M={}){return p===void 0?this.exec("cmd_raw_no_checks",f,M,fe):this._cmd("cmd_raw_no_checks",f,p,v,fe,M)}build_cmd(f,p,v,fe={},M={}){return p===void 0?this.exec("build_cmd",f,M,fe):this._cmd("build_cmd",f,p,v,fe,M)}build_command(f,p,v,fe={},M={}){return p===void 0?this.exec("build_cmd",f,M,fe):this._cmd("build_cmd",f,p,v,fe,M)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(f,p){return this.exec("send_raw",[f,p])}list_configs(f){return this.exec("list_configs",[f])}load_config(f,p){return this.exec("load_config",[f,p])}save_config(f,p,v){return this.exec("save_config",[f,p,v])}delete_config(f,p){return this.exec("delete_config",[f,p])}enable_limits(f,p,v){return this.exec("enable_limits",[f,p,v])}disable_limits(f,p,v){return this.exec("disable_limits",[f,p,v])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(f){return this.exec("get_overall_limits_state",[f])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(f,p){return this.exec("get_setting",[f],p)}get_settings(f,p){return this.exec("get_settings",f,p)}set_setting(f,p){return this.exec("set_setting",[f,p])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(f,p){return this.exec("set_setting",[f,p])}get_metrics(){return this.exec("get_metrics",[])}async hashString(f){if(window.isSecureContext){const p=new TextEncoder().encode(f),v=await crypto.subtle.digest("SHA-256",p),fe=new Uint8Array(v);return Array.from(fe).map(M=>M.toString(16).padStart(2,"0")).join("")}}}const _sfc_main={components:{CriticalCmdDialog:N$1,CommandEditor:ie$1,TopBar:j,Openc3Screen:Ee$1},mixins:[s],data(){return{title:"Command Sender",editor:null,targetName:"",commandName:"",commandDescription:"",paramList:"",queueName:null,validateParameter:null,lastTargetName:"",lastCommandName:"",lastParamList:"",lastQueueName:null,ignoreRangeChecks:!1,statesInHex:!1,showIgnoredParams:!1,cmdRaw:!1,disableCommandValidation:!1,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,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.$refs.commandEditor.triggerUpdateCmdParams()}},{label:"Disable Parameter Conversions",checkbox:!0,checked:this.cmdRaw,command:()=>{this.cmdRaw=!this.cmdRaw.checked}},{label:"Disable Command Validation",checkbox:!0,checked:this.disableCommandValidation,command:()=>{this.disableCommandValidation=!this.disableCommandValidation}}]}]}},created(){this.api=new yi,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),fi.get("/openc3-api/autocomplete/keywords/screen").then(h=>{this.keywords=h.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",h=>{if(h.key==="Enter"){h.preventDefault();let f=this.editor.session.getLine(this.editor.getCursorPosition().row);if(f==="")return;this.queueName=null;const p=f.match(/,\s*queue(?::|\s*=)\s*(?:"([^"]+)"|([f|F]alse))/);p&&(p[1]?this.queueName=p[1]:this.queueName=!1,f=f.replace(/,\s*queue(?::|\s*=)\s*(?:"([^"]+)"|([f|F]alse))/,"")),this.validateParameter=null;const v=f.match(/,\s*validate(?::|\s*=)\s*(false|true)/i);v&&(this.validateParameter=v[1],f=f.replace(/,\s*validate(?::|\s*=)\s*(false|true)/i,""));let fe=f.indexOf('"'),M=f.lastIndexOf('"');f=f.substr(fe+1,M-fe-1),this.sendCmd(f)}})},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{convertToValue(param){if(param.val!==void 0&&param.states&&!this.cmdRaw)return Object.keys(param.states).find(h=>param.states[h].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 h=upcaseStr.slice(2);h.length%2!==0&&(h="0"+h);let f={json_class:"String",raw:[]};for(let p=0;p<h.length;p+=2){let v=h.charAt(p)+h.charAt(p+1);f.raw.push(parseInt(v,16))}return f}else return upcaseStr==="INFINITY"?1/0:upcaseStr==="-INFINITY"?-1/0:upcaseStr==="NAN"?NaN:this.isFloat(str)?parseFloat(str):this.isInt(str)?Number.isSafeInteger(Number(str))?parseInt(str):BigInt(str):this.isArray(str)?eval(str):str}else return quotesRemoved},commandChanged(h){(this.targetName!==h.targetName||this.commandName!==h.packetName)&&(this.targetName=h.targetName,this.commandName=h.packetName,this.updateScreenInfo(),this.targetName&&this.commandName?this.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(f=>{}):this.$router.replace({name:"CommandSender"}).catch(f=>{})),h.queueName!==void 0&&(this.queueName=h.queueName)},updateScreenInfo(){this.targetName&&this.commandName?this.api.get_cmd(this.targetName,this.commandName).then(h=>{if(h.screen)this.loadScreen(h.screen[0],h.screen[1]).then(f=>{this.screenTarget=h.screen[0],this.screenName=h.screen[1],this.screenDefinition=f.data,this.screenCount+=1});else{if(h.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let f=`SCREEN AUTO AUTO 1.0
1125
+ `;for(const p of h.related_items)f+=`LABELVALUE '${p[0]}' '${p[1]}' '${p[2]}' WITH_UNITS 20
1126
+ `;this.screenDefinition=f}else this.screenTarget=null,this.screenName=null,this.screenDefinition=null;this.screenCount+=1}},h=>{this.displayError("getting command for screen info",h)}):(this.screenTarget=null,this.screenName=null,this.screenDefinition=null,this.screenCount+=1)},createParamList(){let h={};for(const f of this.$refs.commandEditor.getRows())h[f.parameter_name]=this.convertToValue(f);return h},buildCmd(){this.sendCmd(this.targetName,this.commandName,this.createParamList())},sendCmd(h,f,p){this.lastTargetName=h,this.lastCommandName=f,this.lastParamList=p,this.lastQueueName=this.queueName,this.sendDisabled=!0;let v=!1,fe="";this.api.get_cmd_hazardous(h,f,p).then(M=>{if(v=M,v)f===void 0?this.hazardousCommand=h.split(" ").slice(0,2).join(" "):this.hazardousCommand=`${h} ${f}`,this.displaySendHazardous=!0;else{let w,A={};this.validateParameter!==null?A.validate=this.validateParameter.toLowerCase()==="true":this.disableCommandValidation&&(A.validate=!1),this.queueName!==null&&(A.queue=this.queueName),this.cmdRaw?this.ignoreRangeChecks?(fe="cmd_raw_no_range_check",w=this.api.cmd_raw_no_range_check(h,f,p,{"Ignore-Errors":"428"},A)):(fe="cmd_raw",w=this.api.cmd_raw(h,f,p,{"Ignore-Errors":"428 500"},A)):this.ignoreRangeChecks?(fe="cmd_no_range_check",w=this.api.cmd_no_range_check(h,f,p,{"Ignore-Errors":"428"},A)):(fe="cmd",w=this.api.cmd(h,f,p,{"Ignore-Errors":"428 500"},A)),w.then(a=>{this.processCmdResponse(!0,h,f,fe,a)},a=>{this.processCmdResponse(!1,h,f,fe,a)})}},M=>{this.processCmdResponse(!1,h,f,fe,M)})},sendHazardousCmd(){this.displaySendHazardous=!1;let h="",f="",p={};this.validateParameter!==null?p.validate=this.validateParameter.toLowerCase()==="true":this.disableCommandValidation&&(p.validate=!1),this.lastQueueName!==null&&(p.queue=this.lastQueueName),this.cmdRaw?this.ignoreRangeChecks?(f="cmd_raw_no_range_check",h=this.api.cmd_raw_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"},p)):(f="cmd_raw",h=this.api.cmd_raw_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"},p)):this.ignoreRangeChecks?(f="cmd_no_range_check",h=this.api.cmd_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"},p)):(f="cmd",h=this.api.cmd_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"},p)),h.then(v=>{this.processCmdResponse(!0,this.lastTargetName,this.lastCommandName,f,v)},v=>{this.processCmdResponse(!1,this.lastTargetName,this.lastCommandName,f,v)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdResponse(h,f,p,v,fe){p===void 0&&([f,p]=f.split(" ").slice(0,2));let M="";if(h){M=`${v}("${fe.target_name} ${fe.cmd_name}`;let w=Object.keys(fe.cmd_params);if(w.length>0){M+=" with ";for(let a=0;a<w.length;a++){let u=w[a],n="";fe.obfuscated_items.includes(u)?n="*****":n=this.convertToString(fe.cmd_params[u]),typeof fe.cmd_params[u]=="string"&&n.charAt(0)!=="'"&&n.charAt(0)!=='"'&&(n=`'${n}'`),M+=u+" "+n,a<w.length-1&&(M+=", ")}}let A=[];if(this.lastQueueName!==null&&(Z.getDefaultScriptingLanguage()==="python"?this.lastQueueName===!1?A.push("queue=False"):A.push(`queue="${this.lastQueueName}"`):this.lastQueueName===!1?A.push("queue: false"):A.push(`queue: "${this.lastQueueName}"`)),this.disableCommandValidation||this.validateParameter!==null){const a=Z.getDefaultScriptingLanguage();this.validateParameter!==null?a==="python"?A.push(`validate=${this.validateParameter}`):A.push(`validate: ${this.validateParameter}`):a==="python"?A.push("validate=False"):A.push("validate: false")}if(A.length>0?M+='", '+A.join(", ")+")":M+='")',!this.history.includes(M)){let a=M;this.history.length!==0&&(a+=`
1127
+ ${this.history}`),this.editor.setValue(a),this.editor.moveCursorTo(0,0)}if(M+=" sent.",this.status.includes(M)){let a=this.status.split("sent.");if(a[1].includes("(")){let u=parseInt(a[1].substr(2,a[1].indexOf(")")-2));M=a[0]+"sent. ("+(u+1)+")"}else M+=" (2)"}this.status=M}else{let w="sending "+f+" "+p;this.displayError(w,fe,!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(h,f,p=!1){this.status=`Error ${h} due to ${f.name}`,f.message&&f.message!==""&&(this.status+=": ",this.status+=f.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),p&&(f.message.includes("CriticalCmdError")?(this.criticalCmdUuid=f.object.data.instance_variables["@uuid"],this.criticalCmdString=f.object.data.instance_variables["@command"].cmd_string,this.criticalCmdUser=f.object.data.instance_variables["@command"].username,this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(h,f){return fi.get("/openc3-api/screen/"+h+"/"+f,{headers:{Accept:"text/plain"}})},cancelRawCmd(){this.displaySendRaw=!1,this.status="Raw command not sent"}}},_hoisted_1={ref:"editor",class:"editor","data-test":"sender-history"},_hoisted_2={class:"mx-1"},_hoisted_3=["textContent"],_hoisted_4={class:"openc3-yellow"},_hoisted_5={class:"mx-1"};function _sfc_render(h,f,p,v,fe,M){const w=resolveComponent("top-bar"),A=resolveComponent("command-editor"),a=resolveComponent("v-card"),u=resolveComponent("v-col"),n=resolveComponent("v-btn"),o=resolveComponent("v-tooltip"),r=resolveComponent("v-row"),i=resolveComponent("v-card-subtitle"),e=resolveComponent("openc3-screen"),t=resolveComponent("critical-cmd-dialog"),c=resolveComponent("v-spacer"),g=resolveComponent("v-toolbar"),m=resolveComponent("v-card-text"),E=resolveComponent("v-dialog"),T=resolveComponent("v-card-actions"),x=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[createVNode(w,{menus:M.menus,title:fe.title},null,8,["menus","title"]),createVNode(A,{ref:"commandEditor","initial-target-name":h.$route.params.target,"initial-packet-name":h.$route.params.packet,"send-disabled":fe.sendDisabled,"states-in-hex":fe.statesInHex,"show-ignored-params":fe.showIgnoredParams,"cmd-raw":fe.cmdRaw,onCommandChanged:f[0]||(f[0]=b=>M.commandChanged(b)),onBuildCmd:f[1]||(f[1]=b=>M.buildCmd(b))},null,8,["initial-target-name","initial-packet-name","send-disabled","states-in-hex","show-ignored-params","cmd-raw"]),createVNode(a,{class:"pa-3"},{default:withCtx(()=>[createTextVNode("Status: "+toDisplayString(fe.status),1)]),_:1}),f[22]||(f[22]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(r,{"no-gutters":""},{default:withCtx(()=>[createVNode(u,{class:"pr-4"},{default:withCtx(()=>[createVNode(a,{class:"pb-2"},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[createVNode(r,null,{default:withCtx(()=>[createVNode(u,{class:"pt-6"},{default:withCtx(()=>[...f[9]||(f[9]=[createTextVNode(" Editable Command History: (Pressing Enter on the line re-executes the command) ",-1)])]),_:1}),createVNode(u,null,{default:withCtx(()=>[createVNode(o,{"open-delay":600,location:"top"},{activator:withCtx(({props:b})=>[createElementVNode("div",mergeProps(b,{class:"float-right"}),[createVNode(n,{icon:"mdi-delete-sweep",variant:"text","data-test":"clear-history",onClick:M.clearHistory},null,8,["onClick"])],16)]),default:withCtx(()=>[f[10]||(f[10]=createElementVNode("span",null," Clear History ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),createVNode(r,{"no-gutters":"",class:"mt-2 mb-2"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[createElementVNode("pre",_hoisted_1,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),fe.screenDefinition?(openBlock(),createBlock(u,{key:0,md:"auto"},{default:withCtx(()=>[createVNode(e,{target:fe.screenTarget,screen:fe.screenName,definition:fe.screenDefinition,keywords:fe.keywords,count:fe.screenCount,"show-close":!1},null,8,["target","screen","definition","keywords","count"])]),_:1})):createCommentVNode("",!0)]),_:1}),f[23]||(f[23]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(t,{modelValue:fe.displayCriticalCmd,"onUpdate:modelValue":f[2]||(f[2]=b=>fe.displayCriticalCmd=b),uuid:fe.criticalCmdUuid,"cmd-string":fe.criticalCmdString,"cmd-user":fe.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"]),createVNode(E,{modelValue:fe.displayErrorDialog,"onUpdate:modelValue":f[4]||(f[4]=b=>fe.displayErrorDialog=b),"max-width":"600"},{default:withCtx(()=>[createVNode(a,null,{default:withCtx(()=>[createVNode(g,{height:"24"},{default:withCtx(()=>[createVNode(c),f[11]||(f[11]=createElementVNode("span",null," Error ",-1)),createVNode(c)]),_:1}),createVNode(m,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_2,[createVNode(r,{class:"my-2"},{default:withCtx(()=>[createVNode(m,null,{default:withCtx(()=>[createElementVNode("span",{textContent:toDisplayString(fe.status)},null,8,_hoisted_3)]),_:1})]),_:1}),createVNode(r,null,{default:withCtx(()=>[createVNode(c),createVNode(n,{color:"primary","data-test":"error-dialog-ok",onClick:f[3]||(f[3]=b=>fe.displayErrorDialog=!1)},{default:withCtx(()=>[...f[12]||(f[12]=[createTextVNode(" Ok ",-1)])]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(E,{modelValue:fe.displaySendHazardous,"onUpdate:modelValue":f[5]||(f[5]=b=>fe.displaySendHazardous=b),"max-width":"600",persistent:"",onKeydown:withKeys(M.cancelHazardousCmd,["esc"])},{default:withCtx(()=>[createVNode(a,null,{default:withCtx(()=>[createVNode(g,{height:"24"},{default:withCtx(()=>[createVNode(c),f[13]||(f[13]=createElementVNode("span",null," Hazardous Warning ",-1)),createVNode(c)]),_:1}),createVNode(m,{class:"mt-6"},{default:withCtx(()=>[createTextVNode(" Warning: Command "+toDisplayString(fe.hazardousCommand)+" is Hazardous. Send? ",1),f[14]||(f[14]=createElementVNode("br",null,null,-1)),createElementVNode("span",_hoisted_4," Description: "+toDisplayString(fe.commandDescription),1)]),_:1}),createVNode(T,{class:"px-2"},{default:withCtx(()=>[createVNode(c),createVNode(n,{variant:"outlined",onClick:M.cancelHazardousCmd},{default:withCtx(()=>[...f[15]||(f[15]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(n,{variant:"flat",onClick:M.sendHazardousCmd},{default:withCtx(()=>[...f[16]||(f[16]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),createVNode(E,{modelValue:fe.displaySendRaw,"onUpdate:modelValue":f[8]||(f[8]=b=>fe.displaySendRaw=b),"max-width":"600",persistent:"",onKeydown:withKeys(M.cancelRawCmd,["esc"])},{default:withCtx(()=>[createVNode(a,null,{default:withCtx(()=>[createVNode(g,{height:"24"},{default:withCtx(()=>[createVNode(c),f[17]||(f[17]=createElementVNode("span",null," Send Raw ",-1)),createVNode(c)]),_:1}),createVNode(m,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_5,[createVNode(r,{class:"my-2"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[...f[18]||(f[18]=[createTextVNode("Interface:",-1)])]),_:1}),createVNode(u,null,{default:withCtx(()=>[createVNode(x,{modelValue:fe.selectedInterface,"onUpdate:modelValue":f[6]||(f[6]=b=>fe.selectedInterface=b),variant:"solo","hide-details":"",density:"compact",items:fe.interfaces,"item-title":"label","item-value":"value"},null,8,["modelValue","items"])]),_:1})]),_:1}),createVNode(r,{"no-gutters":""},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[...f[19]||(f[19]=[createTextVNode("Filename:",-1)])]),_:1}),createVNode(u,null,{default:withCtx(()=>[createElementVNode("input",{type:"file",onChange:f[7]||(f[7]=b=>h.selectRawCmdFile(b))},null,32)]),_:1})]),_:1}),createVNode(r,null,{default:withCtx(()=>[createVNode(c),createVNode(n,{variant:"outlined","data-test":"raw-cancel",onClick:M.cancelRawCmd},{default:withCtx(()=>[...f[20]||(f[20]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(n,{class:"bg-primary","data-test":"raw-ok",onClick:h.sendRawCmd},{default:withCtx(()=>[...f[21]||(f[21]=[createTextVNode(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])])}const CommandSender=exports("default",_export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-afca9f0c"]]))}}});