@openc3/vue-common 6.3.0 → 6.4.1

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 (475) hide show
  1. package/dist/{ArrayWidget-DkjHrXsu.cjs → ArrayWidget-C7qsXQC9.cjs} +2 -2
  2. package/dist/{ArrayWidget-DkjHrXsu.cjs.map → ArrayWidget-C7qsXQC9.cjs.map} +1 -1
  3. package/dist/{ArrayWidget-BbsN1dzF.js → ArrayWidget-CeyoPOhk.js} +4 -4
  4. package/dist/{ArrayWidget-BbsN1dzF.js.map → ArrayWidget-CeyoPOhk.js.map} +1 -1
  5. package/dist/{ArrayplotWidget-CCKEyYIx.js → ArrayplotWidget-BEw4fJPY.js} +3 -3
  6. package/dist/{ArrayplotWidget-CCKEyYIx.js.map → ArrayplotWidget-BEw4fJPY.js.map} +1 -1
  7. package/dist/ArrayplotWidget-S4tyM6zU.cjs +2 -0
  8. package/dist/{ArrayplotWidget-COeaK_Lz.cjs.map → ArrayplotWidget-S4tyM6zU.cjs.map} +1 -1
  9. package/dist/BarColumn-B2FQVNoP.cjs +2 -0
  10. package/dist/{BarColumn-CJLW1nXy.cjs.map → BarColumn-B2FQVNoP.cjs.map} +1 -1
  11. package/dist/{BarColumn-C6p07yWK.js → BarColumn-CIWppEH6.js} +3 -3
  12. package/dist/{BarColumn-C6p07yWK.js.map → BarColumn-CIWppEH6.js.map} +1 -1
  13. package/dist/{BlockWidget-DlCHbqZX.js → BlockWidget-DRtBkPat.js} +4 -4
  14. package/dist/{BlockWidget-DlCHbqZX.js.map → BlockWidget-DRtBkPat.js.map} +1 -1
  15. package/dist/{BlockWidget-BFVYgbd_.cjs → BlockWidget-EZBTae9s.cjs} +2 -2
  16. package/dist/{BlockWidget-BFVYgbd_.cjs.map → BlockWidget-EZBTae9s.cjs.map} +1 -1
  17. package/dist/{ButtonWidget-CtfJzCBR.js → ButtonWidget-4GORf9BG.js} +14 -14
  18. package/dist/{ButtonWidget-CtfJzCBR.js.map → ButtonWidget-4GORf9BG.js.map} +1 -1
  19. package/dist/ButtonWidget-C0UM4M51.cjs +3 -0
  20. package/dist/{ButtonWidget-HN8UHsme.cjs.map → ButtonWidget-C0UM4M51.cjs.map} +1 -1
  21. package/dist/{CanvasWidget-CHmkxxMO.cjs → CanvasWidget-77u4rg8R.cjs} +2 -2
  22. package/dist/{CanvasWidget-CHmkxxMO.cjs.map → CanvasWidget-77u4rg8R.cjs.map} +1 -1
  23. package/dist/{CanvasWidget-CqRlXc4r.js → CanvasWidget-VW1uHIU0.js} +2 -2
  24. package/dist/{CanvasWidget-CqRlXc4r.js.map → CanvasWidget-VW1uHIU0.js.map} +1 -1
  25. package/dist/{CanvasdotWidget-B4bUcKRc.cjs → CanvasdotWidget-B4olJsKr.cjs} +2 -2
  26. package/dist/{CanvasdotWidget-B4bUcKRc.cjs.map → CanvasdotWidget-B4olJsKr.cjs.map} +1 -1
  27. package/dist/{CanvasdotWidget--Xr_KsZs.js → CanvasdotWidget-unc83V9l.js} +2 -2
  28. package/dist/{CanvasdotWidget--Xr_KsZs.js.map → CanvasdotWidget-unc83V9l.js.map} +1 -1
  29. package/dist/{CanvasimageWidget-B5YozXoI.cjs → CanvasimageWidget-BPk3GdGV.cjs} +2 -2
  30. package/dist/{CanvasimageWidget-B5YozXoI.cjs.map → CanvasimageWidget-BPk3GdGV.cjs.map} +1 -1
  31. package/dist/{CanvasimageWidget-BPlj5QYK.js → CanvasimageWidget-CNPV5Ale.js} +3 -3
  32. package/dist/{CanvasimageWidget-BPlj5QYK.js.map → CanvasimageWidget-CNPV5Ale.js.map} +1 -1
  33. package/dist/{CanvasimagevalueWidget-Dx1HnbEw.cjs → CanvasimagevalueWidget-DpPDDitX.cjs} +2 -2
  34. package/dist/{CanvasimagevalueWidget-Dx1HnbEw.cjs.map → CanvasimagevalueWidget-DpPDDitX.cjs.map} +1 -1
  35. package/dist/{CanvasimagevalueWidget-DVFGLt8f.js → CanvasimagevalueWidget-DsQbSZt_.js} +3 -3
  36. package/dist/{CanvasimagevalueWidget-DVFGLt8f.js.map → CanvasimagevalueWidget-DsQbSZt_.js.map} +1 -1
  37. package/dist/{CanvaslabelWidget-CYNqmyP0.js → CanvaslabelWidget-B-5KAkZr.js} +2 -2
  38. package/dist/{CanvaslabelWidget-CYNqmyP0.js.map → CanvaslabelWidget-B-5KAkZr.js.map} +1 -1
  39. package/dist/{CanvaslabelWidget-DgadQD-D.cjs → CanvaslabelWidget-CjKvr47x.cjs} +2 -2
  40. package/dist/{CanvaslabelWidget-DgadQD-D.cjs.map → CanvaslabelWidget-CjKvr47x.cjs.map} +1 -1
  41. package/dist/{CanvaslabelvalueWidget-C3k5gx5c.cjs → CanvaslabelvalueWidget-C0jdjHxr.cjs} +2 -2
  42. package/dist/{CanvaslabelvalueWidget-C3k5gx5c.cjs.map → CanvaslabelvalueWidget-C0jdjHxr.cjs.map} +1 -1
  43. package/dist/{CanvaslabelvalueWidget-B7yIDmsn.js → CanvaslabelvalueWidget-DX-b_55r.js} +2 -2
  44. package/dist/{CanvaslabelvalueWidget-B7yIDmsn.js.map → CanvaslabelvalueWidget-DX-b_55r.js.map} +1 -1
  45. package/dist/{CanvaslineWidget-CYHkes0a.cjs → CanvaslineWidget-C-4EjDkj.cjs} +2 -2
  46. package/dist/{CanvaslineWidget-CYHkes0a.cjs.map → CanvaslineWidget-C-4EjDkj.cjs.map} +1 -1
  47. package/dist/{CanvaslineWidget-BICdxX0Q.js → CanvaslineWidget-DiNWzbpu.js} +2 -2
  48. package/dist/{CanvaslineWidget-BICdxX0Q.js.map → CanvaslineWidget-DiNWzbpu.js.map} +1 -1
  49. package/dist/{CanvaslinevalueWidget-Cq-Ddh0P.js → CanvaslinevalueWidget-Du9pwAN7.js} +2 -2
  50. package/dist/{CanvaslinevalueWidget-Cq-Ddh0P.js.map → CanvaslinevalueWidget-Du9pwAN7.js.map} +1 -1
  51. package/dist/{CanvaslinevalueWidget-5DzhZ22p.cjs → CanvaslinevalueWidget-x81dANpk.cjs} +2 -2
  52. package/dist/{CanvaslinevalueWidget-5DzhZ22p.cjs.map → CanvaslinevalueWidget-x81dANpk.cjs.map} +1 -1
  53. package/dist/{CheckbuttonWidget-B74AWeaW.js → CheckbuttonWidget--QM-segm.js} +2 -2
  54. package/dist/{CheckbuttonWidget-B74AWeaW.js.map → CheckbuttonWidget--QM-segm.js.map} +1 -1
  55. package/dist/{CheckbuttonWidget-BCzsXnIF.cjs → CheckbuttonWidget-LWSGbUuH.cjs} +2 -2
  56. package/dist/{CheckbuttonWidget-BCzsXnIF.cjs.map → CheckbuttonWidget-LWSGbUuH.cjs.map} +1 -1
  57. package/dist/{ComboboxWidget-CtyKbEWb.js → ComboboxWidget-BDpHIcCo.js} +2 -2
  58. package/dist/{ComboboxWidget-CtyKbEWb.js.map → ComboboxWidget-BDpHIcCo.js.map} +1 -1
  59. package/dist/{ComboboxWidget-DQgDyDAC.cjs → ComboboxWidget-DR8EmM6T.cjs} +2 -2
  60. package/dist/{ComboboxWidget-DQgDyDAC.cjs.map → ComboboxWidget-DR8EmM6T.cjs.map} +1 -1
  61. package/dist/CriticalCmdDialog-Ct5WeIW_.cjs +2 -0
  62. package/dist/CriticalCmdDialog-Ct5WeIW_.cjs.map +1 -0
  63. package/dist/{CriticalCmdDialog-DPIZOBeP.js → CriticalCmdDialog-D4-eoA3P.js} +16 -16
  64. package/dist/CriticalCmdDialog-D4-eoA3P.js.map +1 -0
  65. package/dist/{DateWidget-BEVSczU8.js → DateWidget-BCmQNavZ.js} +3 -3
  66. package/dist/{DateWidget-BEVSczU8.js.map → DateWidget-BCmQNavZ.js.map} +1 -1
  67. package/dist/{DateWidget-BB4cIuUS.cjs → DateWidget-CBzHYk5i.cjs} +2 -2
  68. package/dist/{DateWidget-BB4cIuUS.cjs.map → DateWidget-CBzHYk5i.cjs.map} +1 -1
  69. package/dist/{DetailsDialog-DmEC5BTs.js → DetailsDialog-OMd7LWdZ.js} +18 -18
  70. package/dist/DetailsDialog-OMd7LWdZ.js.map +1 -0
  71. package/dist/DetailsDialog-T9G076-B.cjs +2 -0
  72. package/dist/DetailsDialog-T9G076-B.cjs.map +1 -0
  73. package/dist/EventListDialog-COOwwkxk.cjs +2 -0
  74. package/dist/EventListDialog-COOwwkxk.cjs.map +1 -0
  75. package/dist/{EventListDialog-CSMSmCIT.js → EventListDialog-ankpCg-n.js} +520 -593
  76. package/dist/EventListDialog-ankpCg-n.js.map +1 -0
  77. package/dist/FormatvalueWidget-CPn5mDHY.js +48 -0
  78. package/dist/FormatvalueWidget-CPn5mDHY.js.map +1 -0
  79. package/dist/FormatvalueWidget-wjsl4ty0.cjs +2 -0
  80. package/dist/FormatvalueWidget-wjsl4ty0.cjs.map +1 -0
  81. package/dist/Graph-hTOB_jv2.cjs +2 -0
  82. package/dist/Graph-hTOB_jv2.cjs.map +1 -0
  83. package/dist/{Graph-Bgo0cjl3.js → Graph-vUcIyyTp.js} +666 -801
  84. package/dist/Graph-vUcIyyTp.js.map +1 -0
  85. package/dist/{GraphWidget-DurWDmpg.js → GraphWidget-Cl97QQYm.js} +2 -2
  86. package/dist/{GraphWidget-DurWDmpg.js.map → GraphWidget-Cl97QQYm.js.map} +1 -1
  87. package/dist/{GraphWidget-sid4Ws9H.cjs → GraphWidget-D3rDXvA8.cjs} +2 -2
  88. package/dist/{GraphWidget-sid4Ws9H.cjs.map → GraphWidget-D3rDXvA8.cjs.map} +1 -1
  89. package/dist/{HorizontalWidget-_6IR0cR8.cjs → HorizontalWidget-72nrDrwn.cjs} +2 -2
  90. package/dist/{HorizontalWidget-_6IR0cR8.cjs.map → HorizontalWidget-72nrDrwn.cjs.map} +1 -1
  91. package/dist/{HorizontalWidget-Cd_wl1b3.js → HorizontalWidget-CtTkQHl-.js} +2 -2
  92. package/dist/{HorizontalWidget-Cd_wl1b3.js.map → HorizontalWidget-CtTkQHl-.js.map} +1 -1
  93. package/dist/{HorizontalboxWidget-zmnurtv1.cjs → HorizontalboxWidget-C8kuEm-u.cjs} +2 -2
  94. package/dist/{HorizontalboxWidget-zmnurtv1.cjs.map → HorizontalboxWidget-C8kuEm-u.cjs.map} +1 -1
  95. package/dist/{HorizontalboxWidget-BcMTFBU-.js → HorizontalboxWidget-Dn9zVn4r.js} +5 -5
  96. package/dist/{HorizontalboxWidget-BcMTFBU-.js.map → HorizontalboxWidget-Dn9zVn4r.js.map} +1 -1
  97. package/dist/{HorizontallineWidget-CXFqHclf.js → HorizontallineWidget-BBvYWaP7.js} +2 -2
  98. package/dist/{HorizontallineWidget-CXFqHclf.js.map → HorizontallineWidget-BBvYWaP7.js.map} +1 -1
  99. package/dist/{HorizontallineWidget-CM-6WqCj.cjs → HorizontallineWidget-Bs_p5rzY.cjs} +2 -2
  100. package/dist/{HorizontallineWidget-CM-6WqCj.cjs.map → HorizontallineWidget-Bs_p5rzY.cjs.map} +1 -1
  101. package/dist/{IframeWidget-EhncMob0.cjs → IframeWidget-Bhl0G51c.cjs} +2 -2
  102. package/dist/{IframeWidget-EhncMob0.cjs.map → IframeWidget-Bhl0G51c.cjs.map} +1 -1
  103. package/dist/{IframeWidget-BPerHCCa.js → IframeWidget-BmZOip3U.js} +2 -2
  104. package/dist/{IframeWidget-BPerHCCa.js.map → IframeWidget-BmZOip3U.js.map} +1 -1
  105. package/dist/ImageLoader-CXV42ZAx.cjs +2 -0
  106. package/dist/{ImageLoader-cRmBcpU9.cjs.map → ImageLoader-CXV42ZAx.cjs.map} +1 -1
  107. package/dist/{ImageLoader-4N-7Gj61.js → ImageLoader-wYNaGuuz.js} +2 -2
  108. package/dist/{ImageLoader-4N-7Gj61.js.map → ImageLoader-wYNaGuuz.js.map} +1 -1
  109. package/dist/{ImageviewerWidget-Bv3CreXd.cjs → ImageviewerWidget-BAK_GlYK.cjs} +2 -2
  110. package/dist/{ImageviewerWidget-Bv3CreXd.cjs.map → ImageviewerWidget-BAK_GlYK.cjs.map} +1 -1
  111. package/dist/{ImageviewerWidget-Cw_H_HmZ.js → ImageviewerWidget-ByuTqBHq.js} +2 -2
  112. package/dist/{ImageviewerWidget-Cw_H_HmZ.js.map → ImageviewerWidget-ByuTqBHq.js.map} +1 -1
  113. package/dist/InterfacesTab-BbsiYwEX.js +83 -0
  114. package/dist/InterfacesTab-BbsiYwEX.js.map +1 -0
  115. package/dist/InterfacesTab-CnQLkjoz.cjs +2 -0
  116. package/dist/InterfacesTab-CnQLkjoz.cjs.map +1 -0
  117. package/dist/{LabelWidget-mMcf5S8K.cjs → LabelWidget-BP72ze-R.cjs} +2 -2
  118. package/dist/{LabelWidget-mMcf5S8K.cjs.map → LabelWidget-BP72ze-R.cjs.map} +1 -1
  119. package/dist/{LabelWidget-xrmcVeq8.js → LabelWidget-Dmb5F5j-.js} +2 -2
  120. package/dist/{LabelWidget-xrmcVeq8.js.map → LabelWidget-Dmb5F5j-.js.map} +1 -1
  121. package/dist/{LabelledWidget-BoYCuDaH.cjs → LabelledWidget-DIflzlDv.cjs} +2 -2
  122. package/dist/{LabelledWidget-BoYCuDaH.cjs.map → LabelledWidget-DIflzlDv.cjs.map} +1 -1
  123. package/dist/{LabelledWidget-D48QoyMk.js → LabelledWidget-DV1IbbPS.js} +4 -4
  124. package/dist/{LabelledWidget-D48QoyMk.js.map → LabelledWidget-DV1IbbPS.js.map} +1 -1
  125. package/dist/{LabelprogressbarWidget-DiucKsT2.cjs → LabelprogressbarWidget-B18EaMhU.cjs} +2 -2
  126. package/dist/{LabelprogressbarWidget-DiucKsT2.cjs.map → LabelprogressbarWidget-B18EaMhU.cjs.map} +1 -1
  127. package/dist/{LabelprogressbarWidget-C_950t6g.js → LabelprogressbarWidget-BHBDYVZp.js} +4 -4
  128. package/dist/{LabelprogressbarWidget-C_950t6g.js.map → LabelprogressbarWidget-BHBDYVZp.js.map} +1 -1
  129. package/dist/{LabelsparklineWidget-0KXQyPoU.js → LabelsparklineWidget-BaoIdd7s.js} +4 -4
  130. package/dist/{LabelsparklineWidget-0KXQyPoU.js.map → LabelsparklineWidget-BaoIdd7s.js.map} +1 -1
  131. package/dist/{LabelsparklineWidget-A3MTEhQc.cjs → LabelsparklineWidget-Bdft2p6Y.cjs} +2 -2
  132. package/dist/{LabelsparklineWidget-A3MTEhQc.cjs.map → LabelsparklineWidget-Bdft2p6Y.cjs.map} +1 -1
  133. package/dist/{LabelvalueWidget-DnKoz0-N.cjs → LabelvalueWidget-DiqMgePn.cjs} +2 -2
  134. package/dist/{LabelvalueWidget-DnKoz0-N.cjs.map → LabelvalueWidget-DiqMgePn.cjs.map} +1 -1
  135. package/dist/{LabelvalueWidget-CQ06wWDK.js → LabelvalueWidget-wuW55zQP.js} +4 -4
  136. package/dist/{LabelvalueWidget-CQ06wWDK.js.map → LabelvalueWidget-wuW55zQP.js.map} +1 -1
  137. package/dist/{LabelvaluedescWidget-Bo8zT01X.js → LabelvaluedescWidget-BBHwqvj4.js} +9 -9
  138. package/dist/{LabelvaluedescWidget-Bo8zT01X.js.map → LabelvaluedescWidget-BBHwqvj4.js.map} +1 -1
  139. package/dist/LabelvaluedescWidget-fN9XLm-N.cjs +2 -0
  140. package/dist/{LabelvaluedescWidget-I6ljK--Y.cjs.map → LabelvaluedescWidget-fN9XLm-N.cjs.map} +1 -1
  141. package/dist/{LabelvaluelimitsbarWidget-BucTw8Yk.js → LabelvaluelimitsbarWidget-77Rc3lCf.js} +4 -4
  142. package/dist/{LabelvaluelimitsbarWidget-BucTw8Yk.js.map → LabelvaluelimitsbarWidget-77Rc3lCf.js.map} +1 -1
  143. package/dist/{LabelvaluelimitsbarWidget-Cb6i_Ixc.cjs → LabelvaluelimitsbarWidget-Dp5qsue9.cjs} +2 -2
  144. package/dist/{LabelvaluelimitsbarWidget-Cb6i_Ixc.cjs.map → LabelvaluelimitsbarWidget-Dp5qsue9.cjs.map} +1 -1
  145. package/dist/{LabelvaluelimitscolumnWidget-Dflb1hNd.js → LabelvaluelimitscolumnWidget-nounrACl.js} +5 -5
  146. package/dist/{LabelvaluelimitscolumnWidget-Dflb1hNd.js.map → LabelvaluelimitscolumnWidget-nounrACl.js.map} +1 -1
  147. package/dist/{LabelvaluelimitscolumnWidget-ClY5OxUC.cjs → LabelvaluelimitscolumnWidget-uR4QE_cm.cjs} +2 -2
  148. package/dist/{LabelvaluelimitscolumnWidget-ClY5OxUC.cjs.map → LabelvaluelimitscolumnWidget-uR4QE_cm.cjs.map} +1 -1
  149. package/dist/{LabelvaluerangebarWidget-D8cbfXFM.js → LabelvaluerangebarWidget-B83Jj5Q1.js} +4 -4
  150. package/dist/{LabelvaluerangebarWidget-D8cbfXFM.js.map → LabelvaluerangebarWidget-B83Jj5Q1.js.map} +1 -1
  151. package/dist/{LabelvaluerangebarWidget-9S5rVZaS.cjs → LabelvaluerangebarWidget-MVkSnTVH.cjs} +2 -2
  152. package/dist/{LabelvaluerangebarWidget-9S5rVZaS.cjs.map → LabelvaluerangebarWidget-MVkSnTVH.cjs.map} +1 -1
  153. package/dist/{Layout-Tf--nruw.js → Layout-ByQC7nQ3.js} +2 -2
  154. package/dist/{Layout-Tf--nruw.js.map → Layout-ByQC7nQ3.js.map} +1 -1
  155. package/dist/Layout-CFJMHNqy.cjs +2 -0
  156. package/dist/{Layout-DuCYyOw4.cjs.map → Layout-CFJMHNqy.cjs.map} +1 -1
  157. package/dist/{LedWidget-qH_FthkK.js → LedWidget-Cccb8YTk.js} +13 -10
  158. package/dist/LedWidget-Cccb8YTk.js.map +1 -0
  159. package/dist/LedWidget-ghzR6jZJ.cjs +2 -0
  160. package/dist/LedWidget-ghzR6jZJ.cjs.map +1 -0
  161. package/dist/{LimitsbarWidget-B9lAB2RD.js → LimitsbarWidget-D1EBBwX1.js} +10 -7
  162. package/dist/LimitsbarWidget-D1EBBwX1.js.map +1 -0
  163. package/dist/LimitsbarWidget-Dg2_T5OY.cjs +2 -0
  164. package/dist/LimitsbarWidget-Dg2_T5OY.cjs.map +1 -0
  165. package/dist/{LimitscolorWidget-c6Qa6su7.js → LimitscolorWidget--1aPSNVB.js} +2 -2
  166. package/dist/{LimitscolorWidget-c6Qa6su7.js.map → LimitscolorWidget--1aPSNVB.js.map} +1 -1
  167. package/dist/{LimitscolorWidget-DORhDxRo.cjs → LimitscolorWidget-D9mHLFOs.cjs} +2 -2
  168. package/dist/{LimitscolorWidget-DORhDxRo.cjs.map → LimitscolorWidget-D9mHLFOs.cjs.map} +1 -1
  169. package/dist/{LimitscolumnWidget-C9Uyg7Fh.cjs → LimitscolumnWidget-D18x3aW-.cjs} +2 -2
  170. package/dist/{LimitscolumnWidget-C9Uyg7Fh.cjs.map → LimitscolumnWidget-D18x3aW-.cjs.map} +1 -1
  171. package/dist/{LimitscolumnWidget-CcLs_443.js → LimitscolumnWidget-swnMNApm.js} +2 -2
  172. package/dist/{LimitscolumnWidget-CcLs_443.js.map → LimitscolumnWidget-swnMNApm.js.map} +1 -1
  173. package/dist/{LinegraphWidget-BSVYLFo1.js → LinegraphWidget-BbI-wOnq.js} +4 -4
  174. package/dist/{LinegraphWidget-BSVYLFo1.js.map → LinegraphWidget-BbI-wOnq.js.map} +1 -1
  175. package/dist/LinegraphWidget-BdCc6zps.cjs +2 -0
  176. package/dist/{LinegraphWidget-Bf8DIwEn.cjs.map → LinegraphWidget-BdCc6zps.cjs.map} +1 -1
  177. package/dist/{MatrixbycolumnsWidget-DXFpZTre.js → MatrixbycolumnsWidget-Bx2qMr8P.js} +3 -3
  178. package/dist/{MatrixbycolumnsWidget-DXFpZTre.js.map → MatrixbycolumnsWidget-Bx2qMr8P.js.map} +1 -1
  179. package/dist/MatrixbycolumnsWidget-CuhTHsdb.cjs +2 -0
  180. package/dist/{MatrixbycolumnsWidget-DpdFzNeP.cjs.map → MatrixbycolumnsWidget-CuhTHsdb.cjs.map} +1 -1
  181. package/dist/MicroservicesTab-7mVRcHEj.cjs +2 -0
  182. package/dist/MicroservicesTab-7mVRcHEj.cjs.map +1 -0
  183. package/dist/MicroservicesTab-CtI7BEt0.js +219 -0
  184. package/dist/MicroservicesTab-CtI7BEt0.js.map +1 -0
  185. package/dist/Openc3Screen-B4X70CVP.cjs +5 -0
  186. package/dist/Openc3Screen-B4X70CVP.cjs.map +1 -0
  187. package/dist/Openc3Screen-DFYYhHt7.js +1704 -0
  188. package/dist/Openc3Screen-DFYYhHt7.js.map +1 -0
  189. package/dist/{OutputDialog-zVPZiZay.js → OutputDialog-CqD5uI0m.js} +66 -78
  190. package/dist/OutputDialog-CqD5uI0m.js.map +1 -0
  191. package/dist/OutputDialog-Dft9Xm4R.cjs +2 -0
  192. package/dist/OutputDialog-Dft9Xm4R.cjs.map +1 -0
  193. package/dist/PackagesTab-BxP1kiSR.cjs +2 -0
  194. package/dist/PackagesTab-BxP1kiSR.cjs.map +1 -0
  195. package/dist/PackagesTab-DhMk-fi5.js +313 -0
  196. package/dist/PackagesTab-DhMk-fi5.js.map +1 -0
  197. package/dist/PluginsTab-BKJo5vK-.cjs +6 -0
  198. package/dist/PluginsTab-BKJo5vK-.cjs.map +1 -0
  199. package/dist/{PluginsTab-B64OvayB.js → PluginsTab-DxxEqPCA.js} +205 -244
  200. package/dist/PluginsTab-DxxEqPCA.js.map +1 -0
  201. package/dist/{ProgressbarWidget-iYGw8-Dc.js → ProgressbarWidget-7rJeuX6H.js} +2 -2
  202. package/dist/{ProgressbarWidget-iYGw8-Dc.js.map → ProgressbarWidget-7rJeuX6H.js.map} +1 -1
  203. package/dist/{ProgressbarWidget-fGWa6ipm.cjs → ProgressbarWidget-DLvbQ0g-.cjs} +2 -2
  204. package/dist/{ProgressbarWidget-fGWa6ipm.cjs.map → ProgressbarWidget-DLvbQ0g-.cjs.map} +1 -1
  205. package/dist/{RadiobuttonWidget-ZEPJbOp_.cjs → RadiobuttonWidget-C15SchQH.cjs} +2 -2
  206. package/dist/{RadiobuttonWidget-ZEPJbOp_.cjs.map → RadiobuttonWidget-C15SchQH.cjs.map} +1 -1
  207. package/dist/{RadiobuttonWidget-ytmoVZ3u.js → RadiobuttonWidget-DsEw3JiU.js} +2 -2
  208. package/dist/{RadiobuttonWidget-ytmoVZ3u.js.map → RadiobuttonWidget-DsEw3JiU.js.map} +1 -1
  209. package/dist/{RadiogroupWidget-EK4rEGUC.cjs → RadiogroupWidget-BZS_MkSP.cjs} +2 -2
  210. package/dist/{RadiogroupWidget-EK4rEGUC.cjs.map → RadiogroupWidget-BZS_MkSP.cjs.map} +1 -1
  211. package/dist/{RadiogroupWidget-CusMBhKH.js → RadiogroupWidget-DhfbTvQ8.js} +2 -2
  212. package/dist/{RadiogroupWidget-CusMBhKH.js.map → RadiogroupWidget-DhfbTvQ8.js.map} +1 -1
  213. package/dist/{RangebarWidget-D_zGTtCa.js → RangebarWidget-BEGvSL_K.js} +2 -2
  214. package/dist/{RangebarWidget-D_zGTtCa.js.map → RangebarWidget-BEGvSL_K.js.map} +1 -1
  215. package/dist/{RangebarWidget-DwIs-L5k.cjs → RangebarWidget-bBSBfvHk.cjs} +2 -2
  216. package/dist/{RangebarWidget-DwIs-L5k.cjs.map → RangebarWidget-bBSBfvHk.cjs.map} +1 -1
  217. package/dist/{RedisTab-CyPo6ADN.js → RedisTab-Bq8Frctp.js} +13 -13
  218. package/dist/{RedisTab-CyPo6ADN.js.map → RedisTab-Bq8Frctp.js.map} +1 -1
  219. package/dist/RedisTab-CWYntIvy.cjs +2 -0
  220. package/dist/{RedisTab-67UcKoPf.cjs.map → RedisTab-CWYntIvy.cjs.map} +1 -1
  221. package/dist/{RollupWidget-Dolsixyt.js → RollupWidget-BZhspgWd.js} +2 -2
  222. package/dist/{RollupWidget-Dolsixyt.js.map → RollupWidget-BZhspgWd.js.map} +1 -1
  223. package/dist/{RollupWidget-DC3OIP6G.cjs → RollupWidget-BueYskqE.cjs} +2 -2
  224. package/dist/{RollupWidget-DC3OIP6G.cjs.map → RollupWidget-BueYskqE.cjs.map} +1 -1
  225. package/dist/RoutersTab-Bg6dpAXr.js +85 -0
  226. package/dist/RoutersTab-Bg6dpAXr.js.map +1 -0
  227. package/dist/RoutersTab-DOseaOsv.cjs +2 -0
  228. package/dist/RoutersTab-DOseaOsv.cjs.map +1 -0
  229. package/dist/ScriptChooser-CHkObjcT.cjs +2 -0
  230. package/dist/ScriptChooser-CHkObjcT.cjs.map +1 -0
  231. package/dist/ScriptChooser-DBkFAc6E.js +176 -0
  232. package/dist/ScriptChooser-DBkFAc6E.js.map +1 -0
  233. package/dist/{ScrollwindowWidget-BWeqSUPc.cjs → ScrollwindowWidget-CJmuGHai.cjs} +2 -2
  234. package/dist/{ScrollwindowWidget-BWeqSUPc.cjs.map → ScrollwindowWidget-CJmuGHai.cjs.map} +1 -1
  235. package/dist/{ScrollwindowWidget-DV2nZuNi.js → ScrollwindowWidget-qZ3nhhVU.js} +3 -3
  236. package/dist/{ScrollwindowWidget-DV2nZuNi.js.map → ScrollwindowWidget-qZ3nhhVU.js.map} +1 -1
  237. package/dist/SecretsTab-B49h9PhL.cjs +2 -0
  238. package/dist/SecretsTab-B49h9PhL.cjs.map +1 -0
  239. package/dist/{SecretsTab-DVyyyGlG.js → SecretsTab-vdm8oj9_.js} +39 -49
  240. package/dist/SecretsTab-vdm8oj9_.js.map +1 -0
  241. package/dist/{SettingsTab-g29K6FyC.js → SettingsTab-C05e6-Xm.js} +3 -3
  242. package/dist/{SettingsTab-g29K6FyC.js.map → SettingsTab-C05e6-Xm.js.map} +1 -1
  243. package/dist/SettingsTab-fmHVuOps.cjs +3 -0
  244. package/dist/{SettingsTab-B1LvOLG2.cjs.map → SettingsTab-fmHVuOps.cjs.map} +1 -1
  245. package/dist/{SignalWidget-d9-6h85k.js → SignalWidget-Bh14Zrch.js} +16 -18
  246. package/dist/SignalWidget-Bh14Zrch.js.map +1 -0
  247. package/dist/{SignalWidget-RvRwpE8T.cjs → SignalWidget-J3LFoUd-.cjs} +2 -2
  248. package/dist/SignalWidget-J3LFoUd-.cjs.map +1 -0
  249. package/dist/SimpleTextDialog-CSsm9IoB.cjs +2 -0
  250. package/dist/SimpleTextDialog-CSsm9IoB.cjs.map +1 -0
  251. package/dist/SimpleTextDialog-plHG7LGh.js +97 -0
  252. package/dist/SimpleTextDialog-plHG7LGh.js.map +1 -0
  253. package/dist/{SpacerWidget-7_8bpLCb.cjs → SpacerWidget-CzqLoBdY.cjs} +2 -2
  254. package/dist/{SpacerWidget-7_8bpLCb.cjs.map → SpacerWidget-CzqLoBdY.cjs.map} +1 -1
  255. package/dist/{SpacerWidget-BH0p2OLi.js → SpacerWidget-D_NE46jZ.js} +2 -2
  256. package/dist/{SpacerWidget-BH0p2OLi.js.map → SpacerWidget-D_NE46jZ.js.map} +1 -1
  257. package/dist/{SparklineWidget-coxi9r2g.js → SparklineWidget-CJEEJdZ-.js} +4 -4
  258. package/dist/{SparklineWidget-coxi9r2g.js.map → SparklineWidget-CJEEJdZ-.js.map} +1 -1
  259. package/dist/SparklineWidget-DDRhatn7.cjs +2 -0
  260. package/dist/{SparklineWidget-60jVlbHA.cjs.map → SparklineWidget-DDRhatn7.cjs.map} +1 -1
  261. package/dist/{TabbookWidget-B1XKplGH.js → TabbookWidget-C-SU65IF.js} +2 -2
  262. package/dist/{TabbookWidget-B1XKplGH.js.map → TabbookWidget-C-SU65IF.js.map} +1 -1
  263. package/dist/{TabbookWidget-D1CVT9IK.cjs → TabbookWidget-C8k2kKLX.cjs} +2 -2
  264. package/dist/{TabbookWidget-D1CVT9IK.cjs.map → TabbookWidget-C8k2kKLX.cjs.map} +1 -1
  265. package/dist/TargetsTab-DyfyM9sC.js +117 -0
  266. package/dist/TargetsTab-DyfyM9sC.js.map +1 -0
  267. package/dist/TargetsTab-pU_wu9d-.cjs +2 -0
  268. package/dist/TargetsTab-pU_wu9d-.cjs.map +1 -0
  269. package/dist/TextBoxDialog-C60jmnyN.js +98 -0
  270. package/dist/TextBoxDialog-C60jmnyN.js.map +1 -0
  271. package/dist/TextBoxDialog-DWt30tB8.cjs +2 -0
  272. package/dist/TextBoxDialog-DWt30tB8.cjs.map +1 -0
  273. package/dist/TextboxWidget-CRDu77NK.cjs +2 -0
  274. package/dist/{TextboxWidget-BDG4NxRw.cjs.map → TextboxWidget-CRDu77NK.cjs.map} +1 -1
  275. package/dist/{TextboxWidget-C-_M2M4l.js → TextboxWidget-Dn1Ds-b0.js} +4 -4
  276. package/dist/{TextboxWidget-C-_M2M4l.js.map → TextboxWidget-Dn1Ds-b0.js.map} +1 -1
  277. package/dist/{TextfieldWidget-C08N4JE8.js → TextfieldWidget-C0C7NL53.js} +2 -2
  278. package/dist/{TextfieldWidget-C08N4JE8.js.map → TextfieldWidget-C0C7NL53.js.map} +1 -1
  279. package/dist/{TextfieldWidget-BGJv9Lox.cjs → TextfieldWidget-DGdD6b_-.cjs} +2 -2
  280. package/dist/{TextfieldWidget-BGJv9Lox.cjs.map → TextfieldWidget-DGdD6b_-.cjs.map} +1 -1
  281. package/dist/{TimeWidget-DtwdEcFg.js → TimeWidget-AFOTVB4w.js} +3 -3
  282. package/dist/{TimeWidget-DtwdEcFg.js.map → TimeWidget-AFOTVB4w.js.map} +1 -1
  283. package/dist/{TimeWidget-CGCOIouj.cjs → TimeWidget-BlZoS24B.cjs} +2 -2
  284. package/dist/{TimeWidget-CGCOIouj.cjs.map → TimeWidget-BlZoS24B.cjs.map} +1 -1
  285. package/dist/{TitleWidget-CT-aLcNb.js → TitleWidget-CbS_wrQw.js} +2 -2
  286. package/dist/{TitleWidget-CT-aLcNb.js.map → TitleWidget-CbS_wrQw.js.map} +1 -1
  287. package/dist/{TitleWidget-BljFH9RB.cjs → TitleWidget-DDEnHVPP.cjs} +2 -2
  288. package/dist/{TitleWidget-BljFH9RB.cjs.map → TitleWidget-DDEnHVPP.cjs.map} +1 -1
  289. package/dist/ToolsTab-BvpoO0wt.js +1501 -0
  290. package/dist/{ToolsTab-NveeVXz2.js.map → ToolsTab-BvpoO0wt.js.map} +1 -1
  291. package/dist/ToolsTab-DCRNrlhT.cjs +7 -0
  292. package/dist/{ToolsTab-RMTst_Sy.cjs.map → ToolsTab-DCRNrlhT.cjs.map} +1 -1
  293. package/dist/{TopBar-CnJNNJlV.js → TopBar-AjYGyx8W.js} +68 -64
  294. package/dist/TopBar-AjYGyx8W.js.map +1 -0
  295. package/dist/TopBar-vznpQjGN.cjs +2 -0
  296. package/dist/TopBar-vznpQjGN.cjs.map +1 -0
  297. package/dist/UpgradeToEnterpriseDialog-1fVtqbze.cjs +2 -0
  298. package/dist/UpgradeToEnterpriseDialog-1fVtqbze.cjs.map +1 -0
  299. package/dist/UpgradeToEnterpriseDialog-CMVEjihv.js +95 -0
  300. package/dist/UpgradeToEnterpriseDialog-CMVEjihv.js.map +1 -0
  301. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-B98GsSQS.cjs +1497 -0
  302. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-B98GsSQS.cjs.map +1 -0
  303. package/dist/{WidgetComponents-C1lSLZ0I.js → UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-BOiUmW4q.js} +10636 -10597
  304. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-BOiUmW4q.js.map +1 -0
  305. package/dist/{VWidget-DQqb7NVW.js → VWidget-BlF_o-7Z.js} +3 -3
  306. package/dist/{VWidget-DQqb7NVW.js.map → VWidget-BlF_o-7Z.js.map} +1 -1
  307. package/dist/{VWidget-2N2cOosI.cjs → VWidget-CMKh-tv6.cjs} +2 -2
  308. package/dist/{VWidget-2N2cOosI.cjs.map → VWidget-CMKh-tv6.cjs.map} +1 -1
  309. package/dist/{ValueWidget-C6RanBj3.js → ValueWidget-DFUfM5tw.js} +16 -14
  310. package/dist/ValueWidget-DFUfM5tw.js.map +1 -0
  311. package/dist/ValueWidget-K7SCPEB6.cjs +2 -0
  312. package/dist/ValueWidget-K7SCPEB6.cjs.map +1 -0
  313. package/dist/{ValuelimitsbarWidget-B3bvjfxc.js → ValuelimitsbarWidget-CALgABsT.js} +4 -4
  314. package/dist/{ValuelimitsbarWidget-B3bvjfxc.js.map → ValuelimitsbarWidget-CALgABsT.js.map} +1 -1
  315. package/dist/{ValuelimitsbarWidget-C0HROxrb.cjs → ValuelimitsbarWidget-DcY2NV9X.cjs} +2 -2
  316. package/dist/{ValuelimitsbarWidget-C0HROxrb.cjs.map → ValuelimitsbarWidget-DcY2NV9X.cjs.map} +1 -1
  317. package/dist/{ValuelimitscolumnWidget-QvhI6EcE.js → ValuelimitscolumnWidget-Bs91VFLz.js} +4 -4
  318. package/dist/{ValuelimitscolumnWidget-QvhI6EcE.js.map → ValuelimitscolumnWidget-Bs91VFLz.js.map} +1 -1
  319. package/dist/{ValuelimitscolumnWidget-CWvLfg8u.cjs → ValuelimitscolumnWidget-DQKvlGap.cjs} +2 -2
  320. package/dist/{ValuelimitscolumnWidget-CWvLfg8u.cjs.map → ValuelimitscolumnWidget-DQKvlGap.cjs.map} +1 -1
  321. package/dist/{ValuerangebarWidget-Dt3K9BnC.js → ValuerangebarWidget-C7WHyR2h.js} +4 -4
  322. package/dist/{ValuerangebarWidget-Dt3K9BnC.js.map → ValuerangebarWidget-C7WHyR2h.js.map} +1 -1
  323. package/dist/{ValuerangebarWidget-DyN78cQl.cjs → ValuerangebarWidget-DnWuvusw.cjs} +2 -2
  324. package/dist/{ValuerangebarWidget-DyN78cQl.cjs.map → ValuerangebarWidget-DnWuvusw.cjs.map} +1 -1
  325. package/dist/{VerticalWidget-BIIViZgI.js → VerticalWidget-COP5oVCK.js} +2 -2
  326. package/dist/{VerticalWidget-BIIViZgI.js.map → VerticalWidget-COP5oVCK.js.map} +1 -1
  327. package/dist/{VerticalWidget-CFTOu4H8.cjs → VerticalWidget-eMN4dvxL.cjs} +2 -2
  328. package/dist/{VerticalWidget-CFTOu4H8.cjs.map → VerticalWidget-eMN4dvxL.cjs.map} +1 -1
  329. package/dist/{VerticalboxWidget-DY72fLHW.js → VerticalboxWidget-CDPoOx4C.js} +5 -5
  330. package/dist/{VerticalboxWidget-DY72fLHW.js.map → VerticalboxWidget-CDPoOx4C.js.map} +1 -1
  331. package/dist/{VerticalboxWidget-Z8-DWI8t.cjs → VerticalboxWidget-UIBpyEz_.cjs} +2 -2
  332. package/dist/{VerticalboxWidget-Z8-DWI8t.cjs.map → VerticalboxWidget-UIBpyEz_.cjs.map} +1 -1
  333. package/dist/Widget-Cg0pAxSF.cjs +2 -0
  334. package/dist/Widget-Cg0pAxSF.cjs.map +1 -0
  335. package/dist/{Widget-oyqWpFXJ.js → Widget-cmJ76_g1.js} +3 -3
  336. package/dist/Widget-cmJ76_g1.js.map +1 -0
  337. package/dist/components.cjs +3 -3
  338. package/dist/components.cjs.map +1 -1
  339. package/dist/components.js +285 -318
  340. package/dist/components.js.map +1 -1
  341. package/dist/index-DcL65Mqb.cjs +7 -0
  342. package/dist/index-DcL65Mqb.cjs.map +1 -0
  343. package/dist/{index-DwP8ryNM.js → index-qCq0L4jN.js} +332 -323
  344. package/dist/index-qCq0L4jN.js.map +1 -0
  345. package/dist/plugins.cjs +2 -2
  346. package/dist/plugins.cjs.map +1 -1
  347. package/dist/plugins.js +94 -89
  348. package/dist/plugins.js.map +1 -1
  349. package/dist/{timeFilters-CRYpYDdf.js → timeFilters-BKnCM4rv.js} +139 -136
  350. package/dist/{timeFilters-CRYpYDdf.js.map → timeFilters-BKnCM4rv.js.map} +1 -1
  351. package/dist/timeFilters-CJFxfjqN.cjs +2 -0
  352. package/dist/{timeFilters-8SaYvcH0.cjs.map → timeFilters-CJFxfjqN.cjs.map} +1 -1
  353. package/dist/tools/admin.cjs +10 -10
  354. package/dist/tools/admin.cjs.map +1 -1
  355. package/dist/tools/admin.js +380 -406
  356. package/dist/tools/admin.js.map +1 -1
  357. package/dist/tools/base.cjs +1 -1
  358. package/dist/tools/base.cjs.map +1 -1
  359. package/dist/tools/base.js +212 -215
  360. package/dist/tools/base.js.map +1 -1
  361. package/dist/tools/calendar.cjs +1 -1
  362. package/dist/tools/calendar.js +1 -1
  363. package/dist/tools/scriptrunner.cjs +7 -8
  364. package/dist/tools/scriptrunner.cjs.map +1 -1
  365. package/dist/tools/scriptrunner.js +2021 -2011
  366. package/dist/tools/scriptrunner.js.map +1 -1
  367. package/dist/util.cjs +1 -1
  368. package/dist/util.js +1 -1
  369. package/dist/vue-common.css +1 -1
  370. package/dist/widgets.cjs +1 -1
  371. package/dist/widgets.js +63 -63
  372. package/package.json +12 -12
  373. package/dist/ArrayplotWidget-COeaK_Lz.cjs +0 -2
  374. package/dist/BarColumn-CJLW1nXy.cjs +0 -2
  375. package/dist/ButtonWidget-HN8UHsme.cjs +0 -3
  376. package/dist/CriticalCmdDialog-BnxZlt7W.cjs +0 -2
  377. package/dist/CriticalCmdDialog-BnxZlt7W.cjs.map +0 -1
  378. package/dist/CriticalCmdDialog-DPIZOBeP.js.map +0 -1
  379. package/dist/DetailsDialog-DmEC5BTs.js.map +0 -1
  380. package/dist/DetailsDialog-mvxMFmgV.cjs +0 -2
  381. package/dist/DetailsDialog-mvxMFmgV.cjs.map +0 -1
  382. package/dist/EventListDialog-BHZLl28V.cjs +0 -2
  383. package/dist/EventListDialog-BHZLl28V.cjs.map +0 -1
  384. package/dist/EventListDialog-CSMSmCIT.js.map +0 -1
  385. package/dist/FormatvalueWidget-CdjCEAI7.cjs +0 -2
  386. package/dist/FormatvalueWidget-CdjCEAI7.cjs.map +0 -1
  387. package/dist/FormatvalueWidget-DN12xymS.js +0 -44
  388. package/dist/FormatvalueWidget-DN12xymS.js.map +0 -1
  389. package/dist/Graph-Bgo0cjl3.js.map +0 -1
  390. package/dist/Graph-Ujd2yaeI.cjs +0 -2
  391. package/dist/Graph-Ujd2yaeI.cjs.map +0 -1
  392. package/dist/ImageLoader-cRmBcpU9.cjs +0 -2
  393. package/dist/InterfacesTab-B4glsR9Z.js +0 -93
  394. package/dist/InterfacesTab-B4glsR9Z.js.map +0 -1
  395. package/dist/InterfacesTab-Co1Kd6Fa.cjs +0 -2
  396. package/dist/InterfacesTab-Co1Kd6Fa.cjs.map +0 -1
  397. package/dist/LabelvaluedescWidget-I6ljK--Y.cjs +0 -2
  398. package/dist/Layout-DuCYyOw4.cjs +0 -2
  399. package/dist/LedWidget-B2BcwiYF.cjs +0 -2
  400. package/dist/LedWidget-B2BcwiYF.cjs.map +0 -1
  401. package/dist/LedWidget-qH_FthkK.js.map +0 -1
  402. package/dist/LimitsbarWidget-B9lAB2RD.js.map +0 -1
  403. package/dist/LimitsbarWidget-CVCLFIhG.cjs +0 -2
  404. package/dist/LimitsbarWidget-CVCLFIhG.cjs.map +0 -1
  405. package/dist/LinegraphWidget-Bf8DIwEn.cjs +0 -2
  406. package/dist/MatrixbycolumnsWidget-DpdFzNeP.cjs +0 -2
  407. package/dist/MicroservicesTab-B5n-mN8G.cjs +0 -2
  408. package/dist/MicroservicesTab-B5n-mN8G.cjs.map +0 -1
  409. package/dist/MicroservicesTab-mCdS0v39.js +0 -264
  410. package/dist/MicroservicesTab-mCdS0v39.js.map +0 -1
  411. package/dist/Openc3Screen-BYhHaH_I.cjs +0 -5
  412. package/dist/Openc3Screen-BYhHaH_I.cjs.map +0 -1
  413. package/dist/Openc3Screen-Cud0OCFu.js +0 -1789
  414. package/dist/Openc3Screen-Cud0OCFu.js.map +0 -1
  415. package/dist/OutputDialog-DXoL9VPw.cjs +0 -2
  416. package/dist/OutputDialog-DXoL9VPw.cjs.map +0 -1
  417. package/dist/OutputDialog-zVPZiZay.js.map +0 -1
  418. package/dist/PackagesTab-CvT2JyMA.cjs +0 -2
  419. package/dist/PackagesTab-CvT2JyMA.cjs.map +0 -1
  420. package/dist/PackagesTab-SWcXumpK.js +0 -332
  421. package/dist/PackagesTab-SWcXumpK.js.map +0 -1
  422. package/dist/PluginsTab-B64OvayB.js.map +0 -1
  423. package/dist/PluginsTab-CfpwWsqv.cjs +0 -6
  424. package/dist/PluginsTab-CfpwWsqv.cjs.map +0 -1
  425. package/dist/RedisTab-67UcKoPf.cjs +0 -2
  426. package/dist/RoutersTab-BBPlFi_z.cjs +0 -2
  427. package/dist/RoutersTab-BBPlFi_z.cjs.map +0 -1
  428. package/dist/RoutersTab-Cs2dFVNA.js +0 -95
  429. package/dist/RoutersTab-Cs2dFVNA.js.map +0 -1
  430. package/dist/ScriptChooser-EV65rbWx.js +0 -199
  431. package/dist/ScriptChooser-EV65rbWx.js.map +0 -1
  432. package/dist/ScriptChooser-vyZwngrz.cjs +0 -2
  433. package/dist/ScriptChooser-vyZwngrz.cjs.map +0 -1
  434. package/dist/SecretsTab-0IFqUxNJ.cjs +0 -2
  435. package/dist/SecretsTab-0IFqUxNJ.cjs.map +0 -1
  436. package/dist/SecretsTab-DVyyyGlG.js.map +0 -1
  437. package/dist/SettingsTab-B1LvOLG2.cjs +0 -3
  438. package/dist/SignalWidget-RvRwpE8T.cjs.map +0 -1
  439. package/dist/SignalWidget-d9-6h85k.js.map +0 -1
  440. package/dist/SimpleTextDialog-Cpbt7Q-8.cjs +0 -2
  441. package/dist/SimpleTextDialog-Cpbt7Q-8.cjs.map +0 -1
  442. package/dist/SimpleTextDialog-pwN8oRy1.js +0 -107
  443. package/dist/SimpleTextDialog-pwN8oRy1.js.map +0 -1
  444. package/dist/SparklineWidget-60jVlbHA.cjs +0 -2
  445. package/dist/TargetsTab-BkBkXn9A.js +0 -129
  446. package/dist/TargetsTab-BkBkXn9A.js.map +0 -1
  447. package/dist/TargetsTab-C-m26Eqq.cjs +0 -2
  448. package/dist/TargetsTab-C-m26Eqq.cjs.map +0 -1
  449. package/dist/TextBoxDialog-DOJ5d2RM.js +0 -110
  450. package/dist/TextBoxDialog-DOJ5d2RM.js.map +0 -1
  451. package/dist/TextBoxDialog-DfMXg_5C.cjs +0 -2
  452. package/dist/TextBoxDialog-DfMXg_5C.cjs.map +0 -1
  453. package/dist/TextboxWidget-BDG4NxRw.cjs +0 -2
  454. package/dist/ToolsTab-NveeVXz2.js +0 -1521
  455. package/dist/ToolsTab-RMTst_Sy.cjs +0 -7
  456. package/dist/TopBar-CnJNNJlV.js.map +0 -1
  457. package/dist/TopBar-Cnmb6DyC.cjs +0 -2
  458. package/dist/TopBar-Cnmb6DyC.cjs.map +0 -1
  459. package/dist/UpgradeToEnterpriseDialog-BvfgoNB1.js +0 -94
  460. package/dist/UpgradeToEnterpriseDialog-BvfgoNB1.js.map +0 -1
  461. package/dist/UpgradeToEnterpriseDialog-sUipOVpB.cjs +0 -2
  462. package/dist/UpgradeToEnterpriseDialog-sUipOVpB.cjs.map +0 -1
  463. package/dist/ValueWidget-C6RanBj3.js.map +0 -1
  464. package/dist/ValueWidget-Cu7hgKja.cjs +0 -2
  465. package/dist/ValueWidget-Cu7hgKja.cjs.map +0 -1
  466. package/dist/Widget-ChoIB2dd.cjs +0 -2
  467. package/dist/Widget-ChoIB2dd.cjs.map +0 -1
  468. package/dist/Widget-oyqWpFXJ.js.map +0 -1
  469. package/dist/WidgetComponents-C1lSLZ0I.js.map +0 -1
  470. package/dist/WidgetComponents-utpQ592X.cjs +0 -1493
  471. package/dist/WidgetComponents-utpQ592X.cjs.map +0 -1
  472. package/dist/index-BX05anye.cjs +0 -7
  473. package/dist/index-BX05anye.cjs.map +0 -1
  474. package/dist/index-DwP8ryNM.js.map +0 -1
  475. package/dist/timeFilters-8SaYvcH0.cjs +0 -2
@@ -1,1493 +0,0 @@
1
- "use strict";const Be=require("vue"),mx=require("./CustomIcon-Bop2mEnu.cjs"),vx=require("./format-B22VpiOS.cjs");var mo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ja(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var cc={exports:{}},zd;function yx(){return zd||(zd=1,function(c,u){(function(){var e="ace",l=function(){return this}();!l&&typeof window<"u"&&(l=window);var T=function(r,a,o){if(typeof r!="string"){T.original?T.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(o=a),T.modules[r]||(T.payloads[r]=o,T.modules[r]=null)};T.modules={},T.payloads={};var b=function(r,a,o){if(typeof a=="string"){var i=p(r,a);if(i!=null)return o&&o(),i}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var n=[],s=0,h=a.length;s<h;++s){var m=p(r,a[s]);if(m==null&&w.original)return;n.push(m)}return o&&o.apply(null,n)||!0}},w=function(r,a){var o=b("",r,a);return o==null&&w.original?w.original.apply(this,arguments):o},_=function(r,a){if(a.indexOf("!")!==-1){var o=a.split("!");return _(r,o[0])+"!"+_(r,o[1])}if(a.charAt(0)=="."){var i=r.split("/").slice(0,-1).join("/");for(a=i+"/"+a;a.indexOf(".")!==-1&&n!=a;){var n=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},p=function(r,a){a=_(r,a);var o=T.modules[a];if(!o){if(o=T.payloads[a],typeof o=="function"){var i={},n={id:a,uri:"",exports:i,packaged:!0},s=function(m,y){return b(a,m,y)},h=o(s,i,n);i=h||n.exports,T.modules[a]=i,delete T.payloads[a]}o=T.modules[a]=i||o}return o};function g(r){var a=l;l[r]||(l[r]={}),a=l[r],(!a.define||!a.define.packaged)&&(T.original=a.define,a.define=T,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(w.original=a.require,a.require=w,a.require.packaged=!0)}g(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,l,T){function b(w,_,p){Object.defineProperty(w,_,{value:p,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||b(String.prototype,"startsWith",function(w,_){return _=_||0,this.lastIndexOf(w,_)===_}),String.prototype.endsWith||b(String.prototype,"endsWith",function(w,_){var p=this;(_===void 0||_>p.length)&&(_=p.length),_-=w.length;var g=p.indexOf(w,_);return g!==-1&&g===_}),String.prototype.repeat||b(String.prototype,"repeat",function(w){for(var _="",p=this;w>0;)w&1&&(_+=p),(w>>=1)&&(p+=p);return _}),String.prototype.includes||b(String.prototype,"includes",function(w,_){return this.indexOf(w,_)!=-1}),Object.assign||(Object.assign=function(w){if(w==null)throw new TypeError("Cannot convert undefined or null to object");for(var _=Object(w),p=1;p<arguments.length;p++){var g=arguments[p];g!=null&&Object.keys(g).forEach(function(r){_[r]=g[r]})}return _}),Object.values||(Object.values=function(w){return Object.keys(w).map(function(_){return w[_]})}),Array.prototype.find||b(Array.prototype,"find",function(w){for(var _=this.length,p=arguments[1],g=0;g<_;g++){var r=this[g];if(w.call(p,r,g,this))return r}}),Array.prototype.findIndex||b(Array.prototype,"findIndex",function(w){for(var _=this.length,p=arguments[1],g=0;g<_;g++){var r=this[g];if(w.call(p,r,g,this))return g}}),Array.prototype.includes||b(Array.prototype,"includes",function(w,_){return this.indexOf(w,_)!=-1}),Array.prototype.fill||b(Array.prototype,"fill",function(w){for(var _=this,p=_.length>>>0,g=arguments[1],r=g>>0,a=r<0?Math.max(p+r,0):Math.min(r,p),o=arguments[2],i=o===void 0?p:o>>0,n=i<0?Math.max(p+i,0):Math.min(i,p);a<n;)_[a]=w,a++;return _}),Array.of||b(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,l,T){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,l,T){l.deepCopy=function b(w){if(typeof w!="object"||!w)return w;var _;if(Array.isArray(w)){_=[];for(var p=0;p<w.length;p++)_[p]=b(w[p]);return _}if(Object.prototype.toString.call(w)!=="[object Object]")return w;_={};for(var p in w)_[p]=b(w[p]);return _}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,l,T){l.last=function(_){return _[_.length-1]},l.stringReverse=function(_){return _.split("").reverse().join("")},l.stringRepeat=function(_,p){for(var g="";p>0;)p&1&&(g+=_),(p>>=1)&&(_+=_);return g};var b=/^\s\s*/,w=/\s\s*$/;l.stringTrimLeft=function(_){return _.replace(b,"")},l.stringTrimRight=function(_){return _.replace(w,"")},l.copyObject=function(_){var p={};for(var g in _)p[g]=_[g];return p},l.copyArray=function(_){for(var p=[],g=0,r=_.length;g<r;g++)_[g]&&typeof _[g]=="object"?p[g]=this.copyObject(_[g]):p[g]=_[g];return p},l.deepCopy=e("./deep_copy").deepCopy,l.arrayToMap=function(_){for(var p={},g=0;g<_.length;g++)p[_[g]]=1;return p},l.createMap=function(_){var p=Object.create(null);for(var g in _)p[g]=_[g];return p},l.arrayRemove=function(_,p){for(var g=0;g<=_.length;g++)p===_[g]&&_.splice(g,1)},l.escapeRegExp=function(_){return _.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},l.escapeHTML=function(_){return(""+_).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},l.getMatchOffsets=function(_,p){var g=[];return _.replace(p,function(r){g.push({offset:arguments[arguments.length-2],length:r.length})}),g},l.deferredCall=function(_){var p=null,g=function(){p=null,_()},r=function(a){return r.cancel(),p=setTimeout(g,a||0),r};return r.schedule=r,r.call=function(){return this.cancel(),_(),r},r.cancel=function(){return clearTimeout(p),p=null,r},r.isPending=function(){return p},r},l.delayedCall=function(_,p){var g=null,r=function(){g=null,_()},a=function(o){g==null&&(g=setTimeout(r,o||p))};return a.delay=function(o){g&&clearTimeout(g),g=setTimeout(r,o||p)},a.schedule=a,a.call=function(){this.cancel(),_()},a.cancel=function(){g&&clearTimeout(g),g=null},a.isPending=function(){return g},a},l.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},l.skipEmptyMatch=function(_,p,g){return g&&_.codePointAt(p)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,l,T){l.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},l.getOS=function(){return l.isMac?l.OS.MAC:l.isLinux?l.OS.LINUX:l.OS.WINDOWS};var b=typeof navigator=="object"?navigator:{},w=(/mac|win|linux/i.exec(b.platform)||["other"])[0].toLowerCase(),_=b.userAgent||"",p=b.appName||"";l.isWin=w=="win",l.isMac=w=="mac",l.isLinux=w=="linux",l.isIE=p=="Microsoft Internet Explorer"||p.indexOf("MSAppHost")>=0?parseFloat((_.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((_.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),l.isOldIE=l.isIE&&l.isIE<9,l.isGecko=l.isMozilla=_.match(/ Gecko\/\d+/),l.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",l.isWebKit=parseFloat(_.split("WebKit/")[1])||void 0,l.isChrome=parseFloat(_.split(" Chrome/")[1])||void 0,l.isSafari=parseFloat(_.split(" Safari/")[1])&&!l.isChrome||void 0,l.isEdge=parseFloat(_.split(" Edge/")[1])||void 0,l.isAIR=_.indexOf("AdobeAIR")>=0,l.isAndroid=_.indexOf("Android")>=0,l.isChromeOS=_.indexOf(" CrOS ")>=0,l.isIOS=/iPad|iPhone|iPod/.test(_)&&!window.MSStream,l.isIOS&&(l.isMac=!0),l.isMobile=l.isIOS||l.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,l,T){var b=e("./useragent"),w="http://www.w3.org/1999/xhtml";l.buildDom=function o(i,n,s){if(typeof i=="string"&&i){var h=document.createTextNode(i);return n&&n.appendChild(h),h}if(!Array.isArray(i))return i&&i.appendChild&&n&&n.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var m=[],y=0;y<i.length;y++){var R=o(i[y],n,s);R&&m.push(R)}return m}var $=document.createElement(i[0]),C=i[1],v=1;C&&typeof C=="object"&&!Array.isArray(C)&&(v=2);for(var y=v;y<i.length;y++)o(i[y],$,s);return v==2&&Object.keys(C).forEach(function(L){var I=C[L];L==="class"?$.className=Array.isArray(I)?I.join(" "):I:typeof I=="function"||L=="value"||L[0]=="$"?$[L]=I:L==="ref"?s&&(s[I]=$):L==="style"?typeof I=="string"&&($.style.cssText=I):I!=null&&$.setAttribute(L,I)}),n&&n.appendChild($),$},l.getDocumentHead=function(o){return o||(o=document),o.head||o.getElementsByTagName("head")[0]||o.documentElement},l.createElement=function(o,i){return document.createElementNS?document.createElementNS(i||w,o):document.createElement(o)},l.removeChildren=function(o){o.innerHTML=""},l.createTextNode=function(o,i){var n=i?i.ownerDocument:document;return n.createTextNode(o)},l.createFragment=function(o){var i=o?o.ownerDocument:document;return i.createDocumentFragment()},l.hasCssClass=function(o,i){var n=(o.className+"").split(/\s+/g);return n.indexOf(i)!==-1},l.addCssClass=function(o,i){l.hasCssClass(o,i)||(o.className+=" "+i)},l.removeCssClass=function(o,i){for(var n=o.className.split(/\s+/g);;){var s=n.indexOf(i);if(s==-1)break;n.splice(s,1)}o.className=n.join(" ")},l.toggleCssClass=function(o,i){for(var n=o.className.split(/\s+/g),s=!0;;){var h=n.indexOf(i);if(h==-1)break;s=!1,n.splice(h,1)}return s&&n.push(i),o.className=n.join(" "),s},l.setCssClass=function(o,i,n){n?l.addCssClass(o,i):l.removeCssClass(o,i)},l.hasCssString=function(o,i){var n=0,s;if(i=i||document,s=i.querySelectorAll("style")){for(;n<s.length;)if(s[n++].id===o)return!0}},l.removeElementById=function(o,i){i=i||document,i.getElementById(o)&&i.getElementById(o).remove()};var _,p=[];l.useStrictCSP=function(o){_=o,o==!1?g():p||(p=[])};function g(){var o=p;p=null,o&&o.forEach(function(i){r(i[0],i[1])})}function r(o,i,n){if(!(typeof document>"u")){if(p){if(n)g();else if(n===!1)return p.push([o,i])}if(!_){var s=n;!n||!n.getRootNode?s=document:(s=n.getRootNode(),(!s||s==n)&&(s=document));var h=s.ownerDocument||s;if(i&&l.hasCssString(i,s))return null;i&&(o+=`
2
- /*# sourceURL=ace/css/`+i+" */");var m=l.createElement("style");m.appendChild(h.createTextNode(o)),i&&(m.id=i),s==h&&(s=l.getDocumentHead(h)),s.insertBefore(m,s.firstChild)}}}if(l.importCssString=r,l.importCssStylsheet=function(o,i){l.buildDom(["link",{rel:"stylesheet",href:o}],l.getDocumentHead(i))},l.scrollbarWidth=function(o){var i=l.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=l.createElement("ace_outer"),s=n.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",n.appendChild(i);var h=o&&o.documentElement||document&&document.documentElement;if(!h)return 0;h.appendChild(n);var m=i.offsetWidth;s.overflow="scroll";var y=i.offsetWidth;return m===y&&(y=n.clientWidth),h.removeChild(n),m-y},l.computedStyle=function(o,i){return window.getComputedStyle(o,"")||{}},l.setStyle=function(o,i,n){o[i]!==n&&(o[i]=n)},l.HAS_CSS_ANIMATION=!1,l.HAS_CSS_TRANSFORMS=!1,l.HI_DPI=b.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,b.isChromeOS&&(l.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");l.HI_DPI&&a.style.transform!==void 0&&(l.HAS_CSS_TRANSFORMS=!0),!b.isEdge&&typeof a.style.animationName<"u"&&(l.HAS_CSS_ANIMATION=!0),a=null}l.HAS_CSS_TRANSFORMS?l.translate=function(o,i,n){o.style.transform="translate("+Math.round(i)+"px, "+Math.round(n)+"px)"}:l.translate=function(o,i,n){o.style.top=Math.round(n)+"px",o.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,l,T){/*
3
- * based on code from:
4
- *
5
- * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
6
- * Available via the MIT or new BSD license.
7
- * see: http://github.com/jrburke/requirejs for details
8
- */var b=e("./dom");l.get=function(w,_){var p=new XMLHttpRequest;p.open("GET",w,!0),p.onreadystatechange=function(){p.readyState===4&&_(p.responseText)},p.send(null)},l.loadScript=function(w,_){var p=b.getDocumentHead(),g=document.createElement("script");g.src=w,p.appendChild(g),g.onload=g.onreadystatechange=function(r,a){(a||!g.readyState||g.readyState=="loaded"||g.readyState=="complete")&&(g=g.onload=g.onreadystatechange=null,a||_())}},l.qualifyURL=function(w){var _=document.createElement("a");return _.href=w,_.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,l,T){l.inherits=function(b,w){b.super_=w,b.prototype=Object.create(w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}})},l.mixin=function(b,w){for(var _ in w)b[_]=w[_];return b},l.implement=function(b,w){l.mixin(b,w)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,l,T){var b={},w=function(){this.propagationStopped=!0},_=function(){this.defaultPrevented=!0};b._emit=b._dispatchEvent=function(p,g){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[p]||[],a=this._defaultHandlers[p];if(!(!r.length&&!a)){(typeof g!="object"||!g)&&(g={}),g.type||(g.type=p),g.stopPropagation||(g.stopPropagation=w),g.preventDefault||(g.preventDefault=_),r=r.slice();for(var o=0;o<r.length&&(r[o](g,this),!g.propagationStopped);o++);if(a&&!g.defaultPrevented)return a(g,this)}},b._signal=function(p,g){var r=(this._eventRegistry||{})[p];if(r){r=r.slice();for(var a=0;a<r.length;a++)r[a](g,this)}},b.once=function(p,g){var r=this;if(this.on(p,function a(){r.off(p,a),g.apply(null,arguments)}),!g)return new Promise(function(a){g=a})},b.setDefaultHandler=function(p,g){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[p]){var a=r[p],o=r._disabled_[p];o||(r._disabled_[p]=o=[]),o.push(a);var i=o.indexOf(g);i!=-1&&o.splice(i,1)}r[p]=g},b.removeDefaultHandler=function(p,g){var r=this._defaultHandlers;if(r){var a=r._disabled_[p];if(r[p]==g)a&&this.setDefaultHandler(p,a.pop());else if(a){var o=a.indexOf(g);o!=-1&&a.splice(o,1)}}},b.on=b.addEventListener=function(p,g,r){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[p];return a||(a=this._eventRegistry[p]=[]),a.indexOf(g)==-1&&a[r?"unshift":"push"](g),g},b.off=b.removeListener=b.removeEventListener=function(p,g){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[p];if(r){var a=r.indexOf(g);a!==-1&&r.splice(a,1)}},b.removeAllListeners=function(p){p||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[p]=void 0),this._defaultHandlers&&(this._defaultHandlers[p]=void 0)},l.EventEmitter=b}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,l,T){l.reportError=function(w,_){var p=new Error(w);p.data=_,typeof console=="object"&&console.error&&console.error(p),setTimeout(function(){throw p})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,l,T){var b={"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"};l.defaultEnglishMessages=b}),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(e,l,T){"no use strict";var b=e("./oop"),w=e("./event_emitter").EventEmitter,_=e("./report_error").reportError,p=e("./default_english_messages").defaultEnglishMessages,g={setOptions:function(n){Object.keys(n).forEach(function(s){this.setOption(s,n[s])},this)},getOptions:function(n){var s={};if(n)Array.isArray(n)||(s=n,n=Object.keys(s));else{var h=this.$options;n=Object.keys(h).filter(function(m){return!h[m].hidden})}return n.forEach(function(m){s[m]=this.getOption(m)},this),s},setOption:function(n,s){if(this["$"+n]!==s){var h=this.$options[n];if(!h)return r('misspelled option "'+n+'"');if(h.forwardTo)return this[h.forwardTo]&&this[h.forwardTo].setOption(n,s);h.handlesSet||(this["$"+n]=s),h&&h.set&&h.set.call(this,s)}},getOption:function(n){var s=this.$options[n];return s?s.forwardTo?this[s.forwardTo]&&this[s.forwardTo].getOption(n):s&&s.get?s.get.call(this):this["$"+n]:r('misspelled option "'+n+'"')}};function r(n){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,o,i=function(){function n(){this.$defaultOptions={},a=p,o="dollarSigns"}return n.prototype.defineOptions=function(s,h,m){return s.$options||(this.$defaultOptions[h]=s.$options={}),Object.keys(m).forEach(function(y){var R=m[y];typeof R=="string"&&(R={forwardTo:R}),R.name||(R.name=y),s.$options[R.name]=R,"initialValue"in R&&(s["$"+R.name]=R.initialValue)}),b.implement(s,g),this},n.prototype.resetOptions=function(s){Object.keys(s.$options).forEach(function(h){var m=s.$options[h];"value"in m&&s.setOption(h,m.value)})},n.prototype.setDefaultValue=function(s,h,m){if(!s){for(s in this.$defaultOptions)if(this.$defaultOptions[s][h])break;if(!this.$defaultOptions[s][h])return!1}var y=this.$defaultOptions[s]||(this.$defaultOptions[s]={});y[h]&&(y.forwardTo?this.setDefaultValue(y.forwardTo,h,m):y[h].value=m)},n.prototype.setDefaultValues=function(s,h){Object.keys(h).forEach(function(m){this.setDefaultValue(s,m,h[m])},this)},n.prototype.setMessages=function(s,h){a=s,h&&h.placeholders&&(o=h.placeholders)},n.prototype.nls=function(s,h,m){a[s]||(r("No message found for the key '"+s+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+h+"'."),a[h]||r("No message found for the default string '"+h+"' in the provided messages. Falling back to the default English message."));var y=a[s]||a[h]||h;return m&&(o==="dollarSigns"&&(y=y.replace(/\$(\$|[\d]+)/g,function(R,$){return $=="$"?"$":m[$]})),o==="curlyBrackets"&&(y=y.replace(/\{([^\}]+)\}/g,function(R,$){return m[$]}))),y},n}();i.prototype.warn=r,i.prototype.reportError=_,b.implement(i.prototype,w),l.AppConfig=i}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,l,T){T.exports=`.ace-tm .ace_gutter {
9
- background: #f0f0f0;
10
- color: #333;
11
- }
12
-
13
- .ace-tm .ace_print-margin {
14
- width: 1px;
15
- background: #e8e8e8;
16
- }
17
-
18
- .ace-tm .ace_fold {
19
- background-color: #6B72E6;
20
- }
21
-
22
- .ace-tm {
23
- background-color: #FFFFFF;
24
- color: black;
25
- }
26
-
27
- .ace-tm .ace_cursor {
28
- color: black;
29
- }
30
-
31
- .ace-tm .ace_invisible {
32
- color: rgb(191, 191, 191);
33
- }
34
-
35
- .ace-tm .ace_storage,
36
- .ace-tm .ace_keyword {
37
- color: blue;
38
- }
39
-
40
- .ace-tm .ace_constant {
41
- color: rgb(197, 6, 11);
42
- }
43
-
44
- .ace-tm .ace_constant.ace_buildin {
45
- color: rgb(88, 72, 246);
46
- }
47
-
48
- .ace-tm .ace_constant.ace_language {
49
- color: rgb(88, 92, 246);
50
- }
51
-
52
- .ace-tm .ace_constant.ace_library {
53
- color: rgb(6, 150, 14);
54
- }
55
-
56
- .ace-tm .ace_invalid {
57
- background-color: rgba(255, 0, 0, 0.1);
58
- color: red;
59
- }
60
-
61
- .ace-tm .ace_support.ace_function {
62
- color: rgb(60, 76, 114);
63
- }
64
-
65
- .ace-tm .ace_support.ace_constant {
66
- color: rgb(6, 150, 14);
67
- }
68
-
69
- .ace-tm .ace_support.ace_type,
70
- .ace-tm .ace_support.ace_class {
71
- color: rgb(109, 121, 222);
72
- }
73
-
74
- .ace-tm .ace_keyword.ace_operator {
75
- color: rgb(104, 118, 135);
76
- }
77
-
78
- .ace-tm .ace_string {
79
- color: rgb(3, 106, 7);
80
- }
81
-
82
- .ace-tm .ace_comment {
83
- color: rgb(76, 136, 107);
84
- }
85
-
86
- .ace-tm .ace_comment.ace_doc {
87
- color: rgb(0, 102, 255);
88
- }
89
-
90
- .ace-tm .ace_comment.ace_doc.ace_tag {
91
- color: rgb(128, 159, 191);
92
- }
93
-
94
- .ace-tm .ace_constant.ace_numeric {
95
- color: rgb(0, 0, 205);
96
- }
97
-
98
- .ace-tm .ace_variable {
99
- color: rgb(49, 132, 149);
100
- }
101
-
102
- .ace-tm .ace_xml-pe {
103
- color: rgb(104, 104, 91);
104
- }
105
-
106
- .ace-tm .ace_entity.ace_name.ace_function {
107
- color: #0000A2;
108
- }
109
-
110
-
111
- .ace-tm .ace_heading {
112
- color: rgb(12, 7, 255);
113
- }
114
-
115
- .ace-tm .ace_list {
116
- color:rgb(185, 6, 144);
117
- }
118
-
119
- .ace-tm .ace_meta.ace_tag {
120
- color:rgb(0, 22, 142);
121
- }
122
-
123
- .ace-tm .ace_string.ace_regex {
124
- color: rgb(255, 0, 0)
125
- }
126
-
127
- .ace-tm .ace_marker-layer .ace_selection {
128
- background: rgb(181, 213, 255);
129
- }
130
- .ace-tm.ace_multiselect .ace_selection.ace_start {
131
- box-shadow: 0 0 3px 0px white;
132
- }
133
- .ace-tm .ace_marker-layer .ace_step {
134
- background: rgb(252, 255, 0);
135
- }
136
-
137
- .ace-tm .ace_marker-layer .ace_stack {
138
- background: rgb(164, 229, 101);
139
- }
140
-
141
- .ace-tm .ace_marker-layer .ace_bracket {
142
- margin: -1px 0 0 -1px;
143
- border: 1px solid rgb(192, 192, 192);
144
- }
145
-
146
- .ace-tm .ace_marker-layer .ace_active-line {
147
- background: rgba(0, 0, 0, 0.07);
148
- }
149
-
150
- .ace-tm .ace_gutter-active-line {
151
- background-color : #dcdcdc;
152
- }
153
-
154
- .ace-tm .ace_marker-layer .ace_selected-word {
155
- background: rgb(250, 250, 255);
156
- border: 1px solid rgb(200, 200, 250);
157
- }
158
-
159
- .ace-tm .ace_indent-guide {
160
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
161
- }
162
-
163
- .ace-tm .ace_indent-guide-active {
164
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
165
- }
166
- `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,l,T){l.isDark=!1,l.cssClass="ace-tm",l.cssText=e("./textmate-css"),l.$id="ace/theme/textmate";var b=e("../lib/dom");b.importCssString(l.cssText,l.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(e,l,T){"no use strict";var b=e("./lib/lang"),w=e("./lib/net"),_=e("./lib/dom"),p=e("./lib/app_config").AppConfig;T.exports=l=new p;var g={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};l.get=function(i){if(!g.hasOwnProperty(i))throw new Error("Unknown config key: "+i);return g[i]},l.set=function(i,n){if(g.hasOwnProperty(i))g[i]=n;else if(this.setDefaultValue("",i,n)==!1)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&_.useStrictCSP(n)},l.all=function(){return b.copyObject(g)},l.$modes={},l.moduleUrl=function(i,n){if(g.$moduleUrls[i])return g.$moduleUrls[i];var s=i.split("/");n=n||s[s.length-2]||"";var h=n=="snippets"?"/":"-",m=s[s.length-1];if(n=="worker"&&h=="-"){var y=new RegExp("^"+n+"[\\-_]|[\\-_]"+n+"$","g");m=m.replace(y,"")}(!m||m==n)&&s.length>1&&(m=s[s.length-2]);var R=g[n+"Path"];return R==null?R=g.basePath:h=="/"&&(n=h=""),R&&R.slice(-1)!="/"&&(R+="/"),R+n+h+m+this.get("suffix")},l.setModuleUrl=function(i,n){return g.$moduleUrls[i]=n};var r=function(i,n){if(i==="ace/theme/textmate"||i==="./theme/textmate")return n(null,e("./theme/textmate"));if(a)return a(i,n);console.error("loader is not configured")},a;l.setLoader=function(i){a=i},l.dynamicModules=Object.create(null),l.$loading={},l.$loaded={},l.loadModule=function(i,n){var s;if(Array.isArray(i))var h=i[0],m=i[1];else if(typeof i=="string")var m=i;var y=function(R){if(R&&!l.$loading[m])return n&&n(R);if(l.$loading[m]||(l.$loading[m]=[]),l.$loading[m].push(n),!(l.$loading[m].length>1)){var $=function(){r(m,function(C,v){v&&(l.$loaded[m]=v),l._emit("load.module",{name:m,module:v});var L=l.$loading[m];l.$loading[m]=null,L.forEach(function(I){I&&I(v)})})};if(!l.get("packaged"))return $();w.loadScript(l.moduleUrl(m,h),$),o()}};if(l.dynamicModules[m])l.dynamicModules[m]().then(function(R){R.default?y(R.default):y(R)});else{try{s=this.$require(m)}catch{}y(s||l.$loaded[m])}},l.$require=function(i){if(typeof T.require=="function"){var n="require";return T[n](i)}},l.setModuleLoader=function(i,n){l.dynamicModules[i]=n};var o=function(){!g.basePath&&!g.workerPath&&!g.modePath&&!g.themePath&&!Object.keys(g.$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"),o=function(){})};l.version="1.39.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,l,T){e("./lib/fixoldbrowsers");var b=e("./config");b.setLoader(function(g,r){e([g],function(a){r(null,a)})});var w=function(){return this||typeof window<"u"&&window}();T.exports=function(g){b.init=_,b.$require=e,g.require=e},_(!0);function _(g){if(!(!w||!w.document)){b.set("packaged",g||e.packaged||T.packaged||w.define&&(void 0).packaged);var r={},a="",o=document.currentScript||document._currentScript,i=o&&o.ownerDocument||document;o&&o.src&&(a=o.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var n=i.getElementsByTagName("script"),s=0;s<n.length;s++){var h=n[s],m=h.src||h.getAttribute("src");if(m){for(var y=h.attributes,R=0,$=y.length;R<$;R++){var C=y[R];C.name.indexOf("data-ace-")===0&&(r[p(C.name.replace(/^data-ace-/,""))]=C.value)}var v=m.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);v&&(a=v[1])}}a&&(r.base=r.base||a,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var L in r)typeof r[L]<"u"&&b.set(L,r[L])}}function p(g){return g.replace(/-(.)/g,function(r,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,l,T){var b=function(){function w(_,p,g,r){this.start={row:_,column:p},this.end={row:g,column:r}}return w.prototype.isEqual=function(_){return this.start.row===_.start.row&&this.end.row===_.end.row&&this.start.column===_.start.column&&this.end.column===_.end.column},w.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},w.prototype.contains=function(_,p){return this.compare(_,p)==0},w.prototype.compareRange=function(_){var p,g=_.end,r=_.start;return p=this.compare(g.row,g.column),p==1?(p=this.compare(r.row,r.column),p==1?2:p==0?1:0):p==-1?-2:(p=this.compare(r.row,r.column),p==-1?-1:p==1?42:0)},w.prototype.comparePoint=function(_){return this.compare(_.row,_.column)},w.prototype.containsRange=function(_){return this.comparePoint(_.start)==0&&this.comparePoint(_.end)==0},w.prototype.intersects=function(_){var p=this.compareRange(_);return p==-1||p==0||p==1},w.prototype.isEnd=function(_,p){return this.end.row==_&&this.end.column==p},w.prototype.isStart=function(_,p){return this.start.row==_&&this.start.column==p},w.prototype.setStart=function(_,p){typeof _=="object"?(this.start.column=_.column,this.start.row=_.row):(this.start.row=_,this.start.column=p)},w.prototype.setEnd=function(_,p){typeof _=="object"?(this.end.column=_.column,this.end.row=_.row):(this.end.row=_,this.end.column=p)},w.prototype.inside=function(_,p){return this.compare(_,p)==0?!(this.isEnd(_,p)||this.isStart(_,p)):!1},w.prototype.insideStart=function(_,p){return this.compare(_,p)==0?!this.isEnd(_,p):!1},w.prototype.insideEnd=function(_,p){return this.compare(_,p)==0?!this.isStart(_,p):!1},w.prototype.compare=function(_,p){return!this.isMultiLine()&&_===this.start.row?p<this.start.column?-1:p>this.end.column?1:0:_<this.start.row?-1:_>this.end.row?1:this.start.row===_?p>=this.start.column?0:-1:this.end.row===_?p<=this.end.column?0:1:0},w.prototype.compareStart=function(_,p){return this.start.row==_&&this.start.column==p?-1:this.compare(_,p)},w.prototype.compareEnd=function(_,p){return this.end.row==_&&this.end.column==p?1:this.compare(_,p)},w.prototype.compareInside=function(_,p){return this.end.row==_&&this.end.column==p?1:this.start.row==_&&this.start.column==p?-1:this.compare(_,p)},w.prototype.clipRows=function(_,p){if(this.end.row>p)var g={row:p+1,column:0};else if(this.end.row<_)var g={row:_,column:0};if(this.start.row>p)var r={row:p+1,column:0};else if(this.start.row<_)var r={row:_,column:0};return w.fromPoints(r||this.start,g||this.end)},w.prototype.extend=function(_,p){var g=this.compare(_,p);if(g==0)return this;if(g==-1)var r={row:_,column:p};else var a={row:_,column:p};return w.fromPoints(r||this.start,a||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(_){var p=_.documentToScreenPosition(this.start),g=_.documentToScreenPosition(this.end);return new w(p.row,p.column,g.row,g.column)},w.prototype.moveBy=function(_,p){this.start.row+=_,this.start.column+=p,this.end.row+=_,this.end.column+=p},w}();b.fromPoints=function(w,_){return new b(w.row,w.column,_.row,_.column)},b.comparePoints=function(w,_){return w.row-_.row||w.column-_.column},l.Range=b}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,l,T){for(var b=e("./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:"*"}},_={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},p=0;p<10;p++)_["Digit"+p]=48+p,_["Numpad"+p]=96+p,w.PRINTABLE_KEYS[48+p]=""+p,w.FUNCTION_KEYS[96+p]="Numpad"+p;for(var p=65;p<91;p++){var g=String.fromCharCode(p+32);_["Key"+g.toUpperCase()]=p,w.PRINTABLE_KEYS[p]=g}for(var p=1;p<13;p++)_["F"+p]=111+p,w.FUNCTION_KEYS[111+p]="F"+p;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var a in r)_[a]=_[a+"Left"]=_[a+"Right"]=r[a];l.$codeToKeyCode=_,w.PRINTABLE_KEYS[173]="-";for(var o in w.FUNCTION_KEYS){var i=w.FUNCTION_KEYS[o].toLowerCase();w[i]=parseInt(o,10)}for(var o in w.PRINTABLE_KEYS){var i=w.PRINTABLE_KEYS[o].toLowerCase();w[i]=parseInt(o,10)}b.mixin(w,w.MODIFIER_KEYS),b.mixin(w,w.PRINTABLE_KEYS),b.mixin(w,w.FUNCTION_KEYS),w.enter=w.return,w.escape=w.esc,w.del=w.delete,function(){for(var n=["cmd","ctrl","alt","shift"],s=Math.pow(2,n.length);s--;)w.KEY_MODS[s]=n.filter(function(h){return s&w.KEY_MODS[h]}).join("-")+"-"}(),w.KEY_MODS[0]="",w.KEY_MODS[-1]="input-",b.mixin(l,w),l.default=l,l.keyCodeToString=function(n){var s=w[n];return typeof s!="string"&&(s=String.fromCharCode(n)),s.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,l,T){var b=e("./keys"),w=e("./useragent"),_=null,p=0,g;function r(){g=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return g={passive:!1},!0}})}catch{}}function a(){return g==null&&r(),g}function o(R,$,C){this.elem=R,this.type=$,this.callback=C}o.prototype.destroy=function(){n(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var i=l.addListener=function(R,$,C,v){R.addEventListener($,C,a()),v&&v.$toDestroy.push(new o(R,$,C))},n=l.removeListener=function(R,$,C){R.removeEventListener($,C,a())};l.stopEvent=function(R){return l.stopPropagation(R),l.preventDefault(R),!1},l.stopPropagation=function(R){R.stopPropagation&&R.stopPropagation()},l.preventDefault=function(R){R.preventDefault&&R.preventDefault()},l.getButton=function(R){return R.type=="dblclick"?0:R.type=="contextmenu"||w.isMac&&R.ctrlKey&&!R.altKey&&!R.shiftKey?2:R.button},l.capture=function(R,$,C){var v=R&&R.ownerDocument||document;function L(I){$&&$(I),C&&C(I),n(v,"mousemove",$),n(v,"mouseup",L),n(v,"dragstart",L)}return i(v,"mousemove",$),i(v,"mouseup",L),i(v,"dragstart",L),L},l.addMouseWheelListener=function(R,$,C){i(R,"wheel",function(v){var L=.15,I=v.deltaX||0,F=v.deltaY||0;switch(v.deltaMode){case v.DOM_DELTA_PIXEL:v.wheelX=I*L,v.wheelY=F*L;break;case v.DOM_DELTA_LINE:var E=15;v.wheelX=I*E,v.wheelY=F*E;break;case v.DOM_DELTA_PAGE:var U=150;v.wheelX=I*U,v.wheelY=F*U;break}$(v)},C)},l.addMultiMouseDownListener=function(R,$,C,v,L){var I=0,F,E,U,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(S){if(l.getButton(S)!==0?I=0:S.detail>1?(I++,I>4&&(I=1)):I=1,w.isIE){var k=Math.abs(S.clientX-F)>5||Math.abs(S.clientY-E)>5;(!U||k)&&(I=1),U&&clearTimeout(U),U=setTimeout(function(){U=null},$[I-1]||600),I==1&&(F=S.clientX,E=S.clientY)}if(S._clicks=I,C[v]("mousedown",S),I>4)I=0;else if(I>1)return C[v](P[I],S)}Array.isArray(R)||(R=[R]),R.forEach(function(S){i(S,"mousedown",O,L)})};function s(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}l.getModifierString=function(R){return b.KEY_MODS[s(R)]};function h(R,$,C){var v=s($);if(!C&&$.code&&(C=b.$codeToKeyCode[$.code]||C),!w.isMac&&_){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(v|=8),_.altGr)if((3&v)!=3)_.altGr=0;else return;if(C===18||C===17){var L=$.location;if(C===17&&L===1)_[C]==1&&(p=$.timeStamp);else if(C===18&&v===3&&L===2){var I=$.timeStamp-p;I<50&&(_.altGr=!0)}}}if(C in b.MODIFIER_KEYS&&(C=-1),!(!v&&C===13&&$.location===3&&(R($,v,-C),$.defaultPrevented))){if(w.isChromeOS&&v&8){if(R($,v,C),$.defaultPrevented)return;v&=-9}return!v&&!(C in b.FUNCTION_KEYS)&&!(C in b.PRINTABLE_KEYS)?!1:R($,v,C)}}l.addCommandKeyListener=function(R,$,C){var v=null;i(R,"keydown",function(L){_[L.keyCode]=(_[L.keyCode]||0)+1;var I=h($,L,L.keyCode);return v=L.defaultPrevented,I},C),i(R,"keypress",function(L){v&&(L.ctrlKey||L.altKey||L.shiftKey||L.metaKey)&&(l.stopEvent(L),v=null)},C),i(R,"keyup",function(L){_[L.keyCode]=null},C),_||(m(),i(window,"focus",m))};function m(){_=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!w.isOldIE){var y=1;l.nextTick=function(R,$){$=$||window;var C="zero-timeout-message-"+y++,v=function(L){L.data==C&&(l.stopPropagation(L),n($,"message",v),R())};i($,"message",v),$.postMessage(C,"*")}}l.$idleBlocked=!1,l.onIdle=function(R,$){return setTimeout(function C(){l.$idleBlocked?setTimeout(C,100):R()},$)},l.$idleBlockId=null,l.blockIdle=function(R){l.$idleBlockId&&clearTimeout(l.$idleBlockId),l.$idleBlocked=!0,l.$idleBlockId=setTimeout(function(){l.$idleBlocked=!1},R||100)},l.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),l.nextFrame?l.nextFrame=l.nextFrame.bind(window):l.nextFrame=function(R){setTimeout(R,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,l,T){var b;T.exports={lineMode:!1,pasteCancelled:function(){return b&&b>Date.now()-50?!0:b=!1},cancel:function(){b=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(e,l,T){var b=e("../lib/event"),w=e("../config").nls,_=e("../lib/useragent"),p=e("../lib/dom"),g=e("../lib/lang"),r=e("../clipboard"),a=_.isChrome<18,o=_.isIE,i=_.isChrome>63,n=400,s=e("../lib/keys"),h=s.KEY_MODS,m=_.isIOS,y=m?/\s/:/\n/,R=_.isMobile,$;$=function(C,v){var L=p.createElement("textarea");L.className="ace_text-input",L.setAttribute("wrap","off"),L.setAttribute("autocorrect","off"),L.setAttribute("autocapitalize","off"),L.setAttribute("spellcheck","false"),L.style.opacity="0",C.insertBefore(L,C.firstChild);var I=!1,F=!1,E=!1,U=!1,P="";R||(L.style.fontSize="1px");var O=!1,S=!1,k="",N=0,W=0,V=0,G=Number.MAX_SAFE_INTEGER,Q=Number.MIN_SAFE_INTEGER,te=0;try{var he=document.activeElement===L}catch{}this.setNumberOfExtraLines=function(_e){if(G=Number.MAX_SAFE_INTEGER,Q=Number.MIN_SAFE_INTEGER,_e<0){te=0;return}te=_e},this.setAriaLabel=function(){var _e="";if(v.$textInputAriaLabel&&(_e+="".concat(v.$textInputAriaLabel,", ")),v.session){var We=v.session.selection.cursor.row;_e+=w("text-input.aria-label","Cursor at row $0",[We+1])}L.setAttribute("aria-label",_e)},this.setAriaOptions=function(_e){_e.activeDescendant?(L.setAttribute("aria-haspopup","true"),L.setAttribute("aria-autocomplete",_e.inline?"both":"list"),L.setAttribute("aria-activedescendant",_e.activeDescendant)):(L.setAttribute("aria-haspopup","false"),L.setAttribute("aria-autocomplete","both"),L.removeAttribute("aria-activedescendant")),_e.role&&L.setAttribute("role",_e.role),_e.setLabel&&(L.setAttribute("aria-roledescription",w("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),b.addListener(L,"blur",function(_e){S||(v.onBlur(_e),he=!1)},v),b.addListener(L,"focus",function(_e){if(!S){if(he=!0,_.isEdge)try{if(!document.hasFocus())return}catch{}v.onFocus(_e),_.isEdge?setTimeout(ue):ue()}},v),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:v.renderer.enableKeyboardAccessibility}),P||i||this.$focusScroll=="browser")return L.focus({preventScroll:!0});var _e=L.style.top;L.style.position="fixed",L.style.top="0px";try{var We=L.getBoundingClientRect().top!=0}catch{return}var Ye=[];if(We)for(var ct=L.parentElement;ct&&ct.nodeType==1;)Ye.push(ct),ct.setAttribute("ace_nocontext","true"),!ct.parentElement&&ct.getRootNode?ct=ct.getRootNode().host:ct=ct.parentElement;L.focus({preventScroll:!0}),We&&Ye.forEach(function(wt){wt.removeAttribute("ace_nocontext")}),setTimeout(function(){L.style.position="",L.style.top=="0px"&&(L.style.top=_e)},0)},this.blur=function(){L.blur()},this.isFocused=function(){return he},v.on("beforeEndOperation",function(){var _e=v.curOp,We=_e&&_e.command&&_e.command.name;if(We!="insertstring"){var Ye=We&&(_e.docChanged||_e.selectionChanged);E&&Ye&&(k=L.value="",Ht()),ue()}}),v.on("changeSelection",this.setAriaLabel);var ne=function(_e,We){for(var Ye=We,ct=1;ct<=_e-G&&ct<2*te+1;ct++)Ye+=v.session.getLine(_e-ct).length+1;return Ye},ue=m?function(_e){if(!(!he||I&&!_e||U)){_e||(_e="");var We=`
167
- ab`+_e+`cde fg
168
- `;We!=L.value&&(L.value=k=We);var Ye=4,ct=4+(_e.length||(v.selection.isEmpty()?0:1));(N!=Ye||W!=ct)&&L.setSelectionRange(Ye,ct),N=Ye,W=ct}}:function(){if(!(E||U)&&!(!he&&!Ce)){E=!0;var _e=0,We=0,Ye="";if(v.session){var ct=v.selection,wt=ct.getRange(),bt=ct.cursor.row;bt===Q+1?(G=Q+1,Q=G+2*te):bt===G-1?(Q=G-1,G=Q-2*te):(bt<G-1||bt>Q+1)&&(G=bt>te?bt-te:0,Q=bt>te?bt+te:2*te);for(var $t=[],Ct=G;Ct<=Q;Ct++)$t.push(v.session.getLine(Ct));if(Ye=$t.join(`
169
- `),_e=ne(wt.start.row,wt.start.column),We=ne(wt.end.row,wt.end.column),wt.start.row<G){var st=v.session.getLine(G-1);_e=wt.start.row<G-1?0:_e,We+=st.length+1,Ye=st+`
170
- `+Ye}else if(wt.end.row>Q){var gt=v.session.getLine(Q+1);We=wt.end.row>Q+1?gt.length:wt.end.column,We+=Ye.length+1,Ye=Ye+`
171
- `+gt}else R&&bt>0&&(Ye=`
172
- `+Ye,We+=1,_e+=1);Ye.length>n&&(_e<n&&We<n?Ye=Ye.slice(0,n):(Ye=`
173
- `,_e==We?_e=We=0:(_e=0,We=1)));var hn=Ye+`
174
-
175
- `;hn!=k&&(L.value=k=hn,N=W=hn.length)}if(Ce&&(N=L.selectionStart,W=L.selectionEnd),W!=We||N!=_e||L.selectionEnd!=W)try{L.setSelectionRange(_e,We),N=_e,W=We}catch{}E=!1}};this.resetSelection=ue,he&&v.onFocus();var le=function(_e){return _e.selectionStart===0&&_e.selectionEnd>=k.length&&_e.value===k&&k&&_e.selectionEnd!==W},ce=function(_e){E||(I?I=!1:le(L)?(v.selectAll(),ue()):R&&L.selectionStart!=N&&ue())},ve=null;this.setInputHandler=function(_e){ve=_e},this.getInputHandler=function(){return ve};var Ce=!1,$e=function(_e,We){if(Ce&&(Ce=!1),F)return ue(),_e&&v.onPaste(_e),F=!1,"";for(var Ye=L.selectionStart,ct=L.selectionEnd,wt=N,bt=k.length-W,$t=_e,Ct=_e.length-Ye,st=_e.length-ct,gt=0;wt>0&&k[gt]==_e[gt];)gt++,wt--;for($t=$t.slice(gt),gt=1;bt>0&&k.length-gt>N-1&&k[k.length-gt]==_e[_e.length-gt];)gt++,bt--;Ct-=gt-1,st-=gt-1;var hn=$t.length-gt+1;if(hn<0&&(wt=-hn,hn=0),$t=$t.slice(0,hn),!We&&!$t&&!Ct&&!wt&&!bt&&!st)return"";U=!0;var Yn=!1;return _.isAndroid&&$t==". "&&($t=" ",Yn=!0),$t&&!wt&&!bt&&!Ct&&!st||O?v.onTextInput($t):v.onTextInput($t,{extendLeft:wt,extendRight:bt,restoreStart:Ct,restoreEnd:st}),U=!1,k=_e,N=Ye,W=ct,V=st,Yn?`
176
- `:$t},Te=function(_e){if(E)return on();if(_e&&_e.inputType){if(_e.inputType=="historyUndo")return v.execCommand("undo");if(_e.inputType=="historyRedo")return v.execCommand("redo")}var We=L.value,Ye=$e(We,!0);(We.length>n+100||y.test(Ye)||R&&N<1&&N==W)&&ue()},qe=function(_e,We,Ye){var ct=_e.clipboardData||window.clipboardData;if(!(!ct||a)){var wt=o||Ye?"Text":"text/plain";try{return We?ct.setData(wt,We)!==!1:ct.getData(wt)}catch(bt){if(!Ye)return qe(bt,We,!0)}}},Ke=function(_e,We){var Ye=v.getCopyText();if(!Ye)return b.preventDefault(_e);qe(_e,Ye)?(m&&(ue(Ye),I=Ye,setTimeout(function(){I=!1},10)),We?v.onCut():v.onCopy(),b.preventDefault(_e)):(I=!0,L.value=Ye,L.select(),setTimeout(function(){I=!1,ue(),We?v.onCut():v.onCopy()}))},at=function(_e){Ke(_e,!0)},et=function(_e){Ke(_e,!1)},lt=function(_e){var We=qe(_e);r.pasteCancelled()||(typeof We=="string"?(We&&v.onPaste(We,_e),_.isIE&&setTimeout(ue),b.preventDefault(_e)):(L.value="",F=!0))};b.addCommandKeyListener(L,function(_e,We,Ye){if(!E)return v.onCommandKey(_e,We,Ye)},v),b.addListener(L,"select",ce,v),b.addListener(L,"input",Te,v),b.addListener(L,"cut",at,v),b.addListener(L,"copy",et,v),b.addListener(L,"paste",lt,v),(!("oncut"in L)||!("oncopy"in L)||!("onpaste"in L))&&b.addListener(C,"keydown",function(_e){if(!(_.isMac&&!_e.metaKey||!_e.ctrlKey))switch(_e.keyCode){case 67:et(_e);break;case 86:lt(_e);break;case 88:at(_e);break}},v);var jt=function(_e){if(!(E||!v.onCompositionStart||v.$readOnly)&&(E={},!O)){_e.data&&(E.useTextareaForIME=!1),setTimeout(on,0),v._signal("compositionStart"),v.on("mousedown",qn);var We=v.getSelectionRange();We.end.row=We.start.row,We.end.column=We.start.column,E.markerRange=We,E.selectionStart=N,v.onCompositionStart(E),E.useTextareaForIME?(k=L.value="",N=0,W=0):(L.msGetInputContext&&(E.context=L.msGetInputContext()),L.getInputContext&&(E.context=L.getInputContext()))}},on=function(){if(!(!E||!v.onCompositionUpdate||v.$readOnly)){if(O)return qn();if(E.useTextareaForIME)v.onCompositionUpdate(L.value);else{var _e=L.value;$e(_e),E.markerRange&&(E.context&&(E.markerRange.start.column=E.selectionStart=E.context.compositionStartOffset),E.markerRange.end.column=E.markerRange.start.column+W-E.selectionStart+V)}}},Ht=function(_e){!v.onCompositionEnd||v.$readOnly||(E=!1,v.onCompositionEnd(),v.off("mousedown",qn),_e&&Te())};function qn(){S=!0,L.blur(),L.focus(),S=!1}var sn=g.delayedCall(on,50).schedule.bind(null,null);function yn(_e){_e.keyCode==27&&L.value.length<L.selectionStart&&(E||(k=L.value),N=W=-1,ue()),sn()}b.addListener(L,"compositionstart",jt,v),b.addListener(L,"compositionupdate",on,v),b.addListener(L,"keyup",yn,v),b.addListener(L,"keydown",sn,v),b.addListener(L,"compositionend",Ht,v),this.getElement=function(){return L},this.setCommandMode=function(_e){O=_e,L.readOnly=!1},this.setReadOnly=function(_e){O||(L.readOnly=_e)},this.setCopyWithEmptySelection=function(_e){},this.onContextMenu=function(_e){Ce=!0,ue(),v._emit("nativecontextmenu",{target:v,domEvent:_e}),this.moveToMouse(_e,!0)},this.moveToMouse=function(_e,We){P||(P=L.style.cssText),L.style.cssText=(We?"z-index:100000;":"")+(_.isIE?"opacity:0.1;":"")+"text-indent: -"+(N+W)*v.renderer.characterWidth*.5+"px;";var Ye=v.container.getBoundingClientRect(),ct=p.computedStyle(v.container),wt=Ye.top+(parseInt(ct.borderTopWidth)||0),bt=Ye.left+(parseInt(ct.borderLeftWidth)||0),$t=Ye.bottom-wt-L.clientHeight-2,Ct=function(st){p.translate(L,st.clientX-bt-2,Math.min(st.clientY-wt-2,$t))};Ct(_e),_e.type=="mousedown"&&(v.renderer.$isMousePressed=!0,clearTimeout(wn),_.isWin&&b.capture(v.container,Ct,In))},this.onContextMenuClose=In;var wn;function In(){clearTimeout(wn),wn=setTimeout(function(){P&&(L.style.cssText=P,P=""),v.renderer.$isMousePressed=!1,v.renderer.$keepTextAreaAtCursor&&v.renderer.$moveTextAreaToCursor()},0)}var pt=function(_e){v.textInput.onContextMenu(_e),In()};b.addListener(L,"mouseup",pt,v),b.addListener(L,"mousedown",function(_e){_e.preventDefault(),In()},v),b.addListener(v.renderer.scroller,"contextmenu",pt,v),b.addListener(L,"contextmenu",pt,v),m&&Ve(C,v,L);function Ve(_e,We,Ye){var ct=null,wt=!1;Ye.addEventListener("keydown",function($t){ct&&clearTimeout(ct),wt=!0},!0),Ye.addEventListener("keyup",function($t){ct=setTimeout(function(){wt=!1},100)},!0);var bt=function($t){if(document.activeElement===Ye&&!(wt||E||We.$mouseHandler.isMousePressed)&&!I){var Ct=Ye.selectionStart,st=Ye.selectionEnd,gt=null,hn=0;if(Ct==0?gt=s.up:Ct==1?gt=s.home:st>W&&k[st]==`
177
- `?gt=s.end:Ct<N&&k[Ct-1]==" "?(gt=s.left,hn=h.option):Ct<N||Ct==N&&W!=N&&Ct==st?gt=s.left:st>W&&k.slice(0,st).split(`
178
- `).length>2?gt=s.down:st>W&&k[st-1]==" "?(gt=s.right,hn=h.option):(st>W||st==W&&W!=N&&Ct==st)&&(gt=s.right),Ct!==st&&(hn|=h.shift),gt){var Yn=We.onCommandKey({},hn,gt);if(!Yn&&We.commands){gt=s.keyCodeToString(gt);var mi=We.commands.findKeyCommand(hn,gt);mi&&We.execCommand(mi)}N=Ct,W=st,ue("")}}};document.addEventListener("selectionchange",bt),We.on("destroy",function(){document.removeEventListener("selectionchange",bt)})}this.destroy=function(){L.parentElement&&L.parentElement.removeChild(L)}},l.TextInput=$,l.$setUserAgentForTests=function(C,v){R=C,m=v}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,l,T){var b=e("../lib/useragent"),w=0,_=550,p=function(){function a(o){o.$clickSelection=null;var i=o.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(o)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(o)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(o)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(o)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(o));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(s){o[s]=this[s]},this),o.selectByLines=this.extendSelectionBy.bind(o,"getLineRange"),o.selectByWords=this.extendSelectionBy.bind(o,"getWordRange")}return a.prototype.onMouseDown=function(o){var i=o.inSelection(),n=o.getDocumentPosition();this.mousedownEvent=o;var s=this.editor,h=o.getButton();if(h!==0){var m=s.getSelectionRange(),y=m.isEmpty();(y||h==1)&&s.selection.moveToPosition(n),h==2&&(s.textInput.onContextMenu(o.domEvent),b.isMozilla||o.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!s.isFocused()&&(s.focus(),this.$focusTimeout&&!this.$clickSelection&&!s.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(o);return}return this.captureMouse(o),this.startSelect(n,o.domEvent._clicks>1),o.preventDefault()},a.prototype.startSelect=function(o,i){o=o||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(o):i||n.selection.moveToPosition(o),i||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var o,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(n);if(s==-1)o=this.$clickSelection.end;else if(s==1)o=this.$clickSelection.start;else{var h=r(this.$clickSelection,n);n=h.cursor,o=h.anchor}i.selection.setSelectionAnchor(o.row,o.column)}i.selection.selectToPosition(n),i.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(o){var i,n=this.editor,s=n.renderer.screenToTextCoordinates(this.x,this.y),h=n.selection[o](s.row,s.column);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(h.start),y=this.$clickSelection.comparePoint(h.end);if(m==-1&&y<=0)i=this.$clickSelection.end,(h.end.row!=s.row||h.end.column!=s.column)&&(s=h.start);else if(y==1&&m>=0)i=this.$clickSelection.start,(h.start.row!=s.row||h.start.column!=s.column)&&(s=h.end);else if(m==-1&&y==1)s=h.end,i=h.start;else{var R=r(this.$clickSelection,s);s=R.cursor,i=R.anchor}n.selection.setSelectionAnchor(i.row,i.column)}n.selection.selectToPosition(s),n.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var o=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(o>w||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(o){var i=o.getDocumentPosition(),n=this.editor,s=n.session,h=s.getBracketRange(i);h?(h.isEmpty()&&(h.start.column--,h.end.column++),this.setState("select")):(h=n.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=h,this.select()},a.prototype.onTripleClick=function(o){var i=o.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var s=n.getSelectionRange();s.isMultiLine()&&s.contains(i.row,i.column)?(this.$clickSelection=n.selection.getLineRange(s.start.row),this.$clickSelection.end=n.selection.getLineRange(s.end.row).end):this.$clickSelection=n.selection.getLineRange(i.row),this.select()},a.prototype.onQuadClick=function(o){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(o){if(!o.getAccelKey()){o.getShiftKey()&&o.wheelY&&!o.wheelX&&(o.wheelX=o.wheelY,o.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,s=o.domEvent.timeStamp,h=s-n.t,m=h?o.wheelX/h:n.vx,y=h?o.wheelY/h:n.vy;h<_&&(m=(m+n.vx)/2,y=(y+n.vy)/2);var R=Math.abs(m/y),$=!1;if(R>=1&&i.renderer.isScrollableBy(o.wheelX*o.speed,0)&&($=!0),R<=1&&i.renderer.isScrollableBy(0,o.wheelY*o.speed)&&($=!0),$)n.allowed=s;else if(s-n.allowed<_){var C=Math.abs(m)<=1.5*Math.abs(n.vx)&&Math.abs(y)<=1.5*Math.abs(n.vy);C?($=!0,n.allowed=s):n.allowed=0}if(n.t=s,n.vx=m,n.vy=y,$)return i.renderer.scrollBy(o.wheelX*o.speed,o.wheelY*o.speed),o.stop()}},a}();p.prototype.selectEnd=p.prototype.selectByLinesEnd,p.prototype.selectAllEnd=p.prototype.selectByLinesEnd,p.prototype.selectByWordsEnd=p.prototype.selectByLinesEnd,l.DefaultHandlers=p;function g(a,o,i,n){return Math.sqrt(Math.pow(i-a,2)+Math.pow(n-o,2))}function r(a,o){if(a.start.row==a.end.row)var i=2*o.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var i=o.column-4;else var i=2*o.row-a.start.row-a.end.row;return i<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,l,T){l.preventParentScroll=function(w){w.stopPropagation();var _=w.currentTarget,p=_.scrollHeight>_.clientHeight;p||w.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,l,T){var b=this&&this.__extends||function(){var s=function(h,m){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,R){y.__proto__=R}||function(y,R){for(var $ in R)Object.prototype.hasOwnProperty.call(R,$)&&(y[$]=R[$])},s(h,m)};return function(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");s(h,m);function y(){this.constructor=h}h.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}}(),w=this&&this.__values||function(s){var h=typeof Symbol=="function"&&Symbol.iterator,m=h&&s[h],y=0;if(m)return m.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&y>=s.length&&(s=void 0),{value:s&&s[y++],done:!s}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},_=e("./lib/dom");e("./lib/event");var p=e("./range").Range,g=e("./lib/scroll").preventParentScroll,r="ace_tooltip",a=function(){function s(h){this.isOpen=!1,this.$element=null,this.$parentNode=h}return s.prototype.$init=function(){return this.$element=_.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},s.prototype.getElement=function(){return this.$element||this.$init()},s.prototype.setText=function(h){this.getElement().textContent=h},s.prototype.setHtml=function(h){this.getElement().innerHTML=h},s.prototype.setPosition=function(h,m){this.getElement().style.left=h+"px",this.getElement().style.top=m+"px"},s.prototype.setClassName=function(h){_.addCssClass(this.getElement(),h)},s.prototype.setTheme=function(h){this.$element.className=r+" "+(h.isDark?"ace_dark ":"")+(h.cssClass||"")},s.prototype.show=function(h,m,y){h!=null&&this.setText(h),m!=null&&y!=null&&this.setPosition(m,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},s.prototype.hide=function(h){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},s.prototype.getHeight=function(){return this.getElement().offsetHeight},s.prototype.getWidth=function(){return this.getElement().offsetWidth},s.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},s}(),o=function(){function s(){this.popups=[]}return s.prototype.addPopup=function(h){this.popups.push(h),this.updatePopups()},s.prototype.removePopup=function(h){var m=this.popups.indexOf(h);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},s.prototype.updatePopups=function(){var h,m,y,R;this.popups.sort(function(P,O){return O.priority-P.priority});var $=[];try{for(var C=w(this.popups),v=C.next();!v.done;v=C.next()){var L=v.value,I=!0;try{for(var F=(y=void 0,w($)),E=F.next();!E.done;E=F.next()){var U=E.value;if(this.doPopupsOverlap(U,L)){I=!1;break}}}catch(P){y={error:P}}finally{try{E&&!E.done&&(R=F.return)&&R.call(F)}finally{if(y)throw y.error}}I?$.push(L):L.hide()}}catch(P){h={error:P}}finally{try{v&&!v.done&&(m=C.return)&&m.call(C)}finally{if(h)throw h.error}}},s.prototype.doPopupsOverlap=function(h,m){var y=h.getElement().getBoundingClientRect(),R=m.getElement().getBoundingClientRect();return y.left<R.right&&y.right>R.left&&y.top<R.bottom&&y.bottom>R.top},s}(),i=new o;l.popupManager=i,l.Tooltip=a;var n=function(s){b(h,s);function h(m){m===void 0&&(m=document.body);var y=s.call(this,m)||this;y.timeout=void 0,y.lastT=0,y.idleTime=350,y.lastEvent=void 0,y.onMouseOut=y.onMouseOut.bind(y),y.onMouseMove=y.onMouseMove.bind(y),y.waitForHover=y.waitForHover.bind(y),y.hide=y.hide.bind(y);var R=y.getElement();return R.style.whiteSpace="pre-wrap",R.style.pointerEvents="auto",R.addEventListener("mouseout",y.onMouseOut),R.tabIndex=-1,R.addEventListener("blur",(function(){R.contains(document.activeElement)||this.hide()}).bind(y)),R.addEventListener("wheel",g),y}return h.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide),m.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},h.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide),m.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},h.prototype.onMouseMove=function(m,y){this.lastEvent=m,this.lastT=Date.now();var R=y.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},h.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},h.prototype.isOutsideOfText=function(m){var y=m.editor,R=m.getDocumentPosition(),$=y.session.getLine(R.row);if(R.column==$.length){var C=y.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),v=y.session.documentToScreenPosition(R.row,R.column);if(v.column!=C.column||v.row!=C.row)return!0}return!1},h.prototype.setDataProvider=function(m){this.$gatherData=m},h.prototype.showForRange=function(m,y,R,$){var C=10;if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var v=m.renderer;this.isOpen||(i.addPopup(this),this.$registerCloseEvents(),this.setTheme(v.theme)),this.isOpen=!0,this.addMarker(y,m.session),this.range=p.fromPoints(y.start,y.end);var L=v.textToScreenCoordinates(y.start.row,y.start.column),I=v.scroller.getBoundingClientRect();L.pageX<I.left&&(L.pageX=I.left);var F=this.getElement();F.innerHTML="",F.appendChild(R),F.style.maxHeight="",F.style.display="block";var E=F.clientHeight,U=F.clientWidth,P=window.innerHeight-L.pageY-v.lineHeight,O=!0;L.pageY-E<0&&L.pageY<P&&(O=!1),F.style.maxHeight=(O?L.pageY:P)-C+"px",F.style.top=O?"":L.pageY+v.lineHeight+"px",F.style.bottom=O?window.innerHeight-L.pageY+"px":"",F.style.left=Math.min(L.pageX,window.innerWidth-U-C)+"px"}},h.prototype.addMarker=function(m,y){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=y,this.marker=y&&y.addMarker(m,"ace_highlight-marker","text")},h.prototype.hide=function(m){!m&&document.activeElement==this.getElement()||m&&m.target&&(m.type!="keydown"||m.ctrlKey||m.metaKey)&&this.$element.contains(m.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,i.removePopup(this)))},h.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},h.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},h.prototype.onMouseOut=function(m){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!m.relatedTarget||this.getElement().contains(m.relatedTarget)||m&&m.currentTarget.contains(m.relatedTarget)||m.relatedTarget.classList.contains("ace_content")||this.hide())},h}(a);l.HoverTooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,l,T){var b=this&&this.__extends||function(){var s=function(h,m){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,R){y.__proto__=R}||function(y,R){for(var $ in R)Object.prototype.hasOwnProperty.call(R,$)&&(y[$]=R[$])},s(h,m)};return function(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");s(h,m);function y(){this.constructor=h}h.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}}(),w=this&&this.__values||function(s){var h=typeof Symbol=="function"&&Symbol.iterator,m=h&&s[h],y=0;if(m)return m.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&y>=s.length&&(s=void 0),{value:s&&s[y++],done:!s}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},_=e("../lib/dom"),p=e("../lib/event"),g=e("../tooltip").Tooltip,r=e("../config").nls,a=5,o=3;l.GUTTER_TOOLTIP_LEFT_OFFSET=a,l.GUTTER_TOOLTIP_TOP_OFFSET=o;function i(s){var h=s.editor,m=h.renderer.$gutterLayer,y=new n(h,!0);s.editor.setDefaultHandler("guttermousedown",function(I){if(!(!h.isFocused()||I.getButton()!=0)){var F=m.getRegion(I);if(F!="foldWidgets"){var E=I.getDocumentPosition().row,U=h.session.selection;if(I.getShiftKey())U.selectTo(E,0);else{if(I.domEvent.detail==2)return h.selectAll(),I.preventDefault();s.$clickSelection=h.selection.getLineRange(E)}return s.setState("selectByLines"),s.captureMouse(I),I.preventDefault()}}});var R,$;function C(){var I=$.getDocumentPosition().row,F=h.session.getLength();if(I==F){var E=h.renderer.pixelToScreenCoordinates(0,$.y).row,U=$.$pos;if(E>h.session.documentToScreenRow(U.row,U.column))return v()}if(y.showTooltip(I),!!y.isOpen)if(h.on("mousewheel",v),h.on("changeSession",v),window.addEventListener("keydown",v,!0),s.$tooltipFollowsMouse)L($);else{var P=$.getGutterRow(),O=m.$lines.get(P);if(O){var S=O.element.querySelector(".ace_gutter_annotation"),k=S.getBoundingClientRect(),N=y.getElement().style;N.left=k.right-a+"px",N.top=k.bottom-o+"px"}else L($)}}function v(I){I&&I.type==="keydown"&&(I.ctrlKey||I.metaKey)||I&&I.type==="mouseout"&&(!I.relatedTarget||y.getElement().contains(I.relatedTarget))||(R&&(R=clearTimeout(R)),y.isOpen&&(y.hideTooltip(),h.off("mousewheel",v),h.off("changeSession",v),window.removeEventListener("keydown",v,!0)))}function L(I){y.setPosition(I.x,I.y)}s.editor.setDefaultHandler("guttermousemove",function(I){var F=I.domEvent.target||I.domEvent.srcElement;if(_.hasCssClass(F,"ace_fold-widget"))return v();y.isOpen&&s.$tooltipFollowsMouse&&L(I),$=I,!R&&(R=setTimeout(function(){R=null,$&&!s.isMousePressed&&C()},50))}),p.addListener(h.renderer.$gutter,"mouseout",function(I){$=null,y.isOpen&&(R=setTimeout(function(){R=null,v(I)},50))},h)}l.GutterHandler=i;var n=function(s){b(h,s);function h(m,y){y===void 0&&(y=!1);var R=s.call(this,m.container)||this;R.editor=m,R.visibleTooltipRow;var $=R.getElement();return $.setAttribute("role","tooltip"),$.style.pointerEvents="auto",y&&(R.onMouseOut=R.onMouseOut.bind(R),$.addEventListener("mouseout",R.onMouseOut)),R}return h.prototype.onMouseOut=function(m){this.isOpen&&(!m.relatedTarget||this.getElement().contains(m.relatedTarget)||m&&m.currentTarget.contains(m.relatedTarget)||this.hideTooltip())},h.prototype.setPosition=function(m,y){var R=window.innerWidth||document.documentElement.clientWidth,$=window.innerHeight||document.documentElement.clientHeight,C=this.getWidth(),v=this.getHeight();m+=15,y+=15,m+C>R&&(m-=m+C-R),y+v>$&&(y-=20+v),g.prototype.setPosition.call(this,m,y)},Object.defineProperty(h,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),h.prototype.showTooltip=function(m){var y,R=this.editor.renderer.$gutterLayer,$=R.$annotations[m],C;$?C={displayText:Array.from($.displayText),type:Array.from($.type)}:C={displayText:[],type:[]};var v=R.session.getFoldLine(m);if(v&&R.$showFoldedAnnotations){for(var L={error:[],security:[],warning:[],info:[],hint:[]},I={error:1,security:2,warning:3,info:4,hint:5},F,E=m+1;E<=v.end.row;E++)if(R.$annotations[E])for(var U=0;U<R.$annotations[E].text.length;U++){var P=R.$annotations[E].type[U];L[P].push(R.$annotations[E].text[U]),(!F||I[P]<I[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(h.annotationsToSummaryString(L)," in folded code.");C.displayText.push(O),C.type.push(F+"_fold")}}if(C.displayText.length===0)return this.hideTooltip();for(var S={error:[],security:[],warning:[],info:[],hint:[]},k=R.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E<C.displayText.length;E++){var N=_.createElement("span"),W=_.createElement("span");(y=W.classList).add.apply(y,["ace_".concat(C.type[E]),k]),W.setAttribute("aria-label","".concat(h.annotationLabels[C.type[E].replace("_fold","")].singular)),W.setAttribute("role","img"),W.appendChild(_.createTextNode(" ")),N.appendChild(W),N.appendChild(_.createTextNode(C.displayText[E])),N.appendChild(_.createElement("br")),S[C.type[E].replace("_fold","")].push(N)}var V=this.getElement();_.removeChildren(V),S.error.forEach(function(G){return V.appendChild(G)}),S.security.forEach(function(G){return V.appendChild(G)}),S.warning.forEach(function(G){return V.appendChild(G)}),S.info.forEach(function(G){return V.appendChild(G)}),S.hint.forEach(function(G){return V.appendChild(G)}),V.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},h.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},h.annotationsToSummaryString=function(m){var y,R,$=[],C=["error","security","warning","info","hint"];try{for(var v=w(C),L=v.next();!L.done;L=v.next()){var I=L.value;if(m[I].length){var F=m[I].length===1?h.annotationLabels[I].singular:h.annotationLabels[I].plural;$.push("".concat(m[I].length," ").concat(F))}}}catch(E){y={error:E}}finally{try{L&&!L.done&&(R=v.return)&&R.call(v)}finally{if(y)throw y.error}}return $.join(", ")},h}(g);l.GutterTooltip=n}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,l,T){var b=e("../lib/event"),w=e("../lib/useragent"),_=function(){function p(g,r){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=r,this.x=this.clientX=g.clientX,this.y=this.clientY=g.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return p.prototype.stopPropagation=function(){b.stopPropagation(this.domEvent),this.propagationStopped=!0},p.prototype.preventDefault=function(){b.preventDefault(this.domEvent),this.defaultPrevented=!0},p.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},p.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},p.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(g,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-a},p.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,r=g.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=r.contains(a.row,a.column)}return this.$inSelection},p.prototype.getButton=function(){return b.getButton(this.domEvent)},p.prototype.getShiftKey=function(){return this.domEvent.shiftKey},p.prototype.getAccelKey=function(){return w.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},p}();l.MouseEvent=_}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,l,T){var b=e("../lib/dom"),w=e("../lib/event"),_=e("../lib/useragent"),p=200,g=200,r=5;function a(i){var n=i.editor,s=b.createElement("div");s.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",s.textContent=" ";var h=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];h.forEach(function(ne){i[ne]=this[ne]},this),n.on("mousedown",this.onMouseDown.bind(i));var m=n.container,y,R,$,C,v,L,I=0,F,E,U,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!m.draggable){var ue=this;return setTimeout(function(){ue.startSelect(),ue.captureMouse(ne)},0),ne.preventDefault()}v=n.getSelectionRange();var le=ne.dataTransfer;le.effectAllowed=n.getReadOnly()?"copy":"copyMove",n.container.appendChild(s),le.setDragImage&&le.setDragImage(s,0,0),setTimeout(function(){n.container.removeChild(s)}),le.clearData(),le.setData("Text",n.session.getTextRange()),E=!0,this.setState("drag")},this.onDragEnd=function(ne){if(m.draggable=!1,E=!1,this.setState(null),!n.getReadOnly()){var ue=ne.dataTransfer.dropEffect;!F&&ue=="move"&&n.session.remove(n.getSelectionRange()),n.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(n.getReadOnly()||!te(ne.dataTransfer)))return R=ne.clientX,$=ne.clientY,y||W(),I++,ne.dataTransfer.dropEffect=F=he(ne),w.preventDefault(ne)},this.onDragOver=function(ne){if(!(n.getReadOnly()||!te(ne.dataTransfer)))return R=ne.clientX,$=ne.clientY,y||(W(),I++),G!==null&&(G=null),ne.dataTransfer.dropEffect=F=he(ne),w.preventDefault(ne)},this.onDragLeave=function(ne){if(I--,I<=0&&y)return V(),F=null,w.preventDefault(ne)},this.onDrop=function(ne){if(L){var ue=ne.dataTransfer;if(E)switch(F){case"move":v.contains(L.row,L.column)?v={start:L,end:L}:v=n.moveText(v,L);break;case"copy":v=n.moveText(v,L,!0);break}else{var le=ue.getData("Text");v={start:L,end:n.session.insert(L,le)},n.focus(),F=null}return V(),w.preventDefault(ne)}},w.addListener(m,"dragstart",this.onDragStart.bind(i),n),w.addListener(m,"dragend",this.onDragEnd.bind(i),n),w.addListener(m,"dragenter",this.onDragEnter.bind(i),n),w.addListener(m,"dragover",this.onDragOver.bind(i),n),w.addListener(m,"dragleave",this.onDragLeave.bind(i),n),w.addListener(m,"drop",this.onDrop.bind(i),n);function S(ne,ue){var le=Date.now(),ce=!ue||ne.row!=ue.row,ve=!ue||ne.column!=ue.column;if(!P||ce||ve)n.moveCursorToPosition(ne),P=le,O={x:R,y:$};else{var Ce=o(O.x,O.y,R,$);Ce>r?P=null:le-P>=g&&(n.renderer.scrollCursorIntoView(),P=null)}}function k(ne,ue){var le=Date.now(),ce=n.renderer.layerConfig.lineHeight,ve=n.renderer.layerConfig.characterWidth,Ce=n.renderer.scroller.getBoundingClientRect(),$e={x:{left:R-Ce.left,right:Ce.right-R},y:{top:$-Ce.top,bottom:Ce.bottom-$}},Te=Math.min($e.x.left,$e.x.right),qe=Math.min($e.y.top,$e.y.bottom),Ke={row:ne.row,column:ne.column};Te/ve<=2&&(Ke.column+=$e.x.left<$e.x.right?-3:2),qe/ce<=1&&(Ke.row+=$e.y.top<$e.y.bottom?-1:1);var at=ne.row!=Ke.row,et=ne.column!=Ke.column,lt=!ue||ne.row!=ue.row;at||et&&!lt?U?le-U>=p&&n.renderer.scrollCursorIntoView(Ke):U=le:U=null}function N(){var ne=L;L=n.renderer.screenToTextCoordinates(R,$),S(L,ne),k(L,ne)}function W(){v=n.selection.toOrientedRange(),y=n.session.addMarker(v,"ace_selection",n.getSelectionStyle()),n.clearSelection(),n.isFocused()&&n.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),N(),C=setInterval(N,20),I=0,w.addListener(document,"mousemove",Q)}function V(){clearInterval(C),n.session.removeMarker(y),y=null,n.selection.fromOrientedRange(v),n.isFocused()&&!E&&n.$resetCursorStyle(),v=null,L=null,I=0,U=null,P=null,w.removeListener(document,"mousemove",Q)}var G=null;function Q(){G==null&&(G=setTimeout(function(){G!=null&&y&&V()},20))}function te(ne){var ue=ne.types;return!ue||Array.prototype.some.call(ue,function(le){return le=="text/plain"||le=="Text"})}function he(ne){var ue=["copy","copymove","all","uninitialized"],le=["move","copymove","linkmove","all","uninitialized"],ce=_.isMac?ne.altKey:ne.ctrlKey,ve="uninitialized";try{ve=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Ce="none";return ce&&ue.indexOf(ve)>=0?Ce="copy":le.indexOf(ve)>=0?Ce="move":ue.indexOf(ve)>=0&&(Ce="copy"),Ce}}(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,n=i.container;n.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging");var s=_.isWin?"default":"move";i.renderer.setCursorStyle(s),this.setState("dragReady")},this.onMouseDrag=function(i){var n=this.editor.container;if(_.isIE&&this.state=="dragReady"){var s=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>3&&n.dragDrop()}if(this.state==="dragWait"){var s=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>0&&(n.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var n=this.editor,s=i.inSelection(),h=i.getButton(),m=i.domEvent.detail||1;if(m===1&&h===0&&s){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=i.domEvent.target||i.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),n.getDragDelay()){if(_.isWebKit){this.cancelDrag=!0;var R=n.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(a.prototype);function o(i,n,s,h){return Math.sqrt(Math.pow(s-i,2)+Math.pow(h-n,2))}l.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,l,T){var b=e("./mouse_event").MouseEvent,w=e("../lib/event"),_=e("../lib/dom");l.addTouchListeners=function(p,g){var r="scroll",a,o,i,n,s,h,m=0,y,R=0,$=0,C=0,v,L;function I(){var S=window.navigator&&window.navigator.clipboard,k=!1,N=function(){var G=g.getCopyText(),Q=g.session.getUndoManager().hasUndo();L.replaceChild(_.buildDom(k?["span",!G&&W("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],G&&W("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],G&&W("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],S&&W("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Q&&W("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],W("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],W("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),L.firstChild)},W=function(G){return g.commands.canExecute(G,g)},V=function(G){var Q=G.target.getAttribute("action");if(Q=="more"||!k)return k=!k,N();Q=="paste"?S.readText().then(function(te){g.execCommand(Q,te)}):Q&&((Q=="cut"||Q=="copy")&&(S?S.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Q)),L.firstChild.style.display="none",k=!1,Q!="openCommandPalette"&&g.focus()};L=_.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(G){r="menu",G.stopPropagation(),G.preventDefault(),g.textInput.focus()},ontouchend:function(G){G.stopPropagation(),G.preventDefault(),V(G)},onclick:V},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function F(){if(!g.getOption("enableMobileMenu")){L&&E();return}L||I();var S=g.selection.cursor,k=g.renderer.textToScreenCoordinates(S.row,S.column),N=g.renderer.textToScreenCoordinates(0,0).pageX,W=g.renderer.scrollLeft,V=g.container.getBoundingClientRect();L.style.top=k.pageY-V.top-3+"px",k.pageX-V.left<V.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=N+W-V.left+"px"),L.style.display="",L.firstChild.style.display="none",g.on("input",E)}function E(S){L&&(L.style.display="none"),g.off("input",E)}function U(){s=null,clearTimeout(s);var S=g.selection.getRange(),k=S.contains(y.row,y.column);(S.isEmpty()||!k)&&(g.selection.moveToPosition(y),g.selection.selectWord()),r="wait",F()}function P(){s=null,clearTimeout(s),g.selection.moveToPosition(y);var S=R>=2?g.selection.getLineRange(y.row):g.session.getBracketRange(y);S&&!S.isEmpty()?g.selection.setRange(S):g.selection.selectWord(),r="wait"}w.addListener(p,"contextmenu",function(S){if(v){var k=g.textInput.getElement();k.focus()}},g),w.addListener(p,"touchstart",function(S){var k=S.touches;if(s||k.length>1){clearTimeout(s),s=null,i=-1,r="zoom";return}v=g.$mouseHandler.isMousePressed=!0;var N=g.renderer.layerConfig.lineHeight,W=g.renderer.layerConfig.lineHeight,V=S.timeStamp;n=V;var G=k[0],Q=G.clientX,te=G.clientY;Math.abs(a-Q)+Math.abs(o-te)>N&&(i=-1),a=S.clientX=Q,o=S.clientY=te,$=C=0;var he=new b(S,g);if(y=he.getDocumentPosition(),V-i<500&&k.length==1&&!m)R++,S.preventDefault(),S.button=0,P();else{R=0;var ne=g.selection.cursor,ue=g.selection.isEmpty()?ne:g.selection.anchor,le=g.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=g.renderer.$cursorLayer.getPixelPosition(ue,!0),ve=g.renderer.scroller.getBoundingClientRect(),Ce=g.renderer.layerConfig.offset,$e=g.renderer.scrollLeft,Te=function(at,et){return at=at/W,et=et/N-.75,at*at+et*et};if(S.clientX<ve.left){r="zoom";return}var qe=Te(S.clientX-ve.left-le.left+$e,S.clientY-ve.top-le.top+Ce),Ke=Te(S.clientX-ve.left-ce.left+$e,S.clientY-ve.top-ce.top+Ce);qe<3.5&&Ke<3.5&&(r=qe>Ke?"cursor":"anchor"),Ke<3.5?r="anchor":qe<3.5?r="cursor":r="scroll",s=setTimeout(U,450)}i=V},g),w.addListener(p,"touchend",function(S){v=g.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),r=="zoom"?(r="",m=0):s?(g.selection.moveToPosition(y),m=0,F()):r=="scroll"?(O(),E()):F(),clearTimeout(s),s=null},g),w.addListener(p,"touchmove",function(S){s&&(clearTimeout(s),s=null);var k=S.touches;if(!(k.length>1||r=="zoom")){var N=k[0],W=a-N.clientX,V=o-N.clientY;if(r=="wait")if(W*W+V*V>4)r="cursor";else return S.preventDefault();a=N.clientX,o=N.clientY,S.clientX=N.clientX,S.clientY=N.clientY;var G=S.timeStamp,Q=G-n;if(n=G,r=="scroll"){var te=new b(S,g);te.speed=1,te.wheelX=W,te.wheelY=V,10*Math.abs(W)<Math.abs(V)&&(W=0),10*Math.abs(V)<Math.abs(W)&&(V=0),Q!=0&&($=W/Q,C=V/Q),g._emit("mousewheel",te),te.propagationStopped||($=C=0)}else{var he=new b(S,g),ne=he.getDocumentPosition();r=="cursor"?g.selection.moveCursorToPosition(ne):r=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),S.preventDefault()}}},g);function O(){m+=60,h=setInterval(function(){m--<=0&&(clearInterval(h),h=null),Math.abs($)<.01&&($=0),Math.abs(C)<.01&&(C=0),m<20&&($=.9*$),m<20&&(C=.9*C);var S=g.session.getScrollTop();g.renderer.scrollBy(10*$,10*C),S==g.session.getScrollTop()&&(m=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(e,l,T){var b=e("../lib/event"),w=e("../lib/useragent"),_=e("./default_handlers").DefaultHandlers,p=e("./default_gutter_handler").GutterHandler,g=e("./mouse_event").MouseEvent,r=e("./dragdrop_handler").DragdropHandler,a=e("./touch_handler").addTouchListeners,o=e("../config"),i=function(){function n(s){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var h=this;this.editor=s,new _(this),new p(this),new r(this);var m=function($){var C=!document.hasFocus||!document.hasFocus()||!s.isFocused()&&document.activeElement==(s.textInput&&s.textInput.getElement());C&&window.focus(),s.focus(),setTimeout(function(){s.isFocused()||s.focus()})},y=s.renderer.getMouseEventTarget();b.addListener(y,"click",this.onMouseEvent.bind(this,"click"),s),b.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),s),b.addMultiMouseDownListener([y,s.renderer.scrollBarV&&s.renderer.scrollBarV.inner,s.renderer.scrollBarH&&s.renderer.scrollBarH.inner,s.textInput&&s.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",s),b.addMouseWheelListener(s.container,this.onMouseWheel.bind(this,"mousewheel"),s),a(s.container,s);var R=s.renderer.$gutter;b.addListener(R,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),s),b.addListener(R,"click",this.onMouseEvent.bind(this,"gutterclick"),s),b.addListener(R,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),s),b.addListener(R,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),s),b.addListener(y,"mousedown",m,s),b.addListener(R,"mousedown",m,s),w.isIE&&s.renderer.scrollBarV&&(b.addListener(s.renderer.scrollBarV.element,"mousedown",m,s),b.addListener(s.renderer.scrollBarH.element,"mousedown",m,s)),s.on("mousemove",function($){if(!(h.state||h.$dragDelay||!h.$dragEnabled)){var C=s.renderer.screenToTextCoordinates($.x,$.y),v=s.session.selection.getRange(),L=s.renderer;!v.isEmpty()&&v.insideStart(C.row,C.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},s)}return n.prototype.onMouseEvent=function(s,h){this.editor.session&&this.editor._emit(s,new g(h,this.editor))},n.prototype.onMouseMove=function(s,h){var m=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!m||!m.length||this.editor._emit(s,new g(h,this.editor))},n.prototype.onMouseWheel=function(s,h){var m=new g(h,this.editor);m.speed=this.$scrollSpeed*2,m.wheelX=h.wheelX,m.wheelY=h.wheelY,this.editor._emit(s,m)},n.prototype.setState=function(s){this.state=s},n.prototype.captureMouse=function(s,h){this.x=s.x,this.y=s.y,this.isMousePressed=!0;var m=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var R=this,$=function(F){if(F){if(w.isWebKit&&!F.which&&R.releaseMouse)return R.releaseMouse();R.x=F.clientX,R.y=F.clientY,h&&h(F),R.mouseEvent=new g(F,R.editor),R.$mouseMoved=!0}},C=function(F){m.off("beforeEndOperation",L),clearInterval(I),m.session&&v(),R[R.state+"End"]&&R[R.state+"End"](F),R.state="",R.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),R.$onCaptureMouseMove=R.releaseMouse=null,F&&R.onMouseEvent("mouseup",F),m.endOperation()},v=function(){R[R.state]&&R[R.state](),R.$mouseMoved=!1};if(w.isOldIE&&s.domEvent.type=="dblclick")return setTimeout(function(){C(s)});var L=function(F){R.releaseMouse&&m.curOp.command.name&&m.curOp.selectionChanged&&(R[R.state+"End"]&&R[R.state+"End"](),R.state="",R.releaseMouse())};m.on("beforeEndOperation",L),m.startOperation({command:{name:"mouse"}}),R.$onCaptureMouseMove=$,R.releaseMouse=b.capture(this.editor.container,$,C);var I=setInterval(v,20)},n.prototype.cancelContextMenu=function(){var s=(function(h){h&&h.domEvent&&h.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",s),h&&h.domEvent&&b.stopEvent(h.domEvent))}).bind(this);setTimeout(s,10),this.editor.on("nativecontextmenu",s)},n.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},n}();i.prototype.releaseMouse=null,o.defineOptions(i.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:w.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),l.MouseHandler=i}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,l,T){var b=e("../lib/dom"),w=function(){function _(p){p.on("click",function(g){var r=g.getDocumentPosition(),a=p.session,o=a.getFoldAt(r.row,r.column,1);o&&(g.getAccelKey()?a.removeFold(o):a.expandFold(o),g.stop());var i=g.domEvent&&g.domEvent.target;i&&b.hasCssClass(i,"ace_inline_button")&&b.hasCssClass(i,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),p.renderer.scrollCursorIntoView())}),p.on("gutterclick",function(g){var r=p.renderer.$gutterLayer.getRegion(g);if(r=="foldWidgets"){var a=g.getDocumentPosition().row,o=p.session;o.foldWidgets&&o.foldWidgets[a]&&p.session.onFoldWidgetClick(a,g),p.isFocused()||p.focus(),g.stop()}}),p.on("gutterdblclick",function(g){var r=p.renderer.$gutterLayer.getRegion(g);if(r=="foldWidgets"){var a=g.getDocumentPosition().row,o=p.session,i=o.getParentFoldRangeData(a,!0),n=i.range||i.firstRange;if(n){a=n.start.row;var s=o.getFoldAt(a,o.getLine(a).length,1);s?o.removeFold(s):(o.addFold("...",n),p.renderer.scrollCursorIntoView({row:n.start.row,column:0}))}g.stop()}})}return _}();l.FoldHandler=w}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,l,T){var b=e("../lib/keys"),w=e("../lib/event"),_=function(){function p(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return p.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},p.prototype.setKeyboardHandler=function(g){var r=this.$handlers;if(r[r.length-1]!=g){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(g,1)}},p.prototype.addKeyboardHandler=function(g,r){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var a=this.$handlers.indexOf(g);a!=-1&&this.$handlers.splice(a,1),r==null?this.$handlers.push(g):this.$handlers.splice(r,0,g),a==-1&&g.attach&&g.attach(this.$editor)}},p.prototype.removeKeyboardHandler=function(g){var r=this.$handlers.indexOf(g);return r==-1?!1:(this.$handlers.splice(r,1),g.detach&&g.detach(this.$editor),!0)},p.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},p.prototype.getStatusText=function(){var g=this.$data,r=g.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(r,g)||""}).filter(Boolean).join(" ")},p.prototype.$callKeyboardHandlers=function(g,r,a,o){for(var i,n=!1,s=this.$editor.commands,h=this.$handlers.length;h--&&(i=this.$handlers[h].handleKeyboard(this.$data,g,r,a,o),!(!(!i||!i.command)&&(i.command=="null"?n=!0:n=s.exec(i.command,this.$editor,i.args,o),n&&o&&g!=-1&&i.passEvent!=!0&&i.command.passEvent!=!0&&w.stopEvent(o),n))););return!n&&g==-1&&(i={command:"insertstring"},n=s.exec("insertstring",this.$editor,r)),n&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),n},p.prototype.onCommandKey=function(g,r,a){var o=b.keyCodeToString(a);return this.$callKeyboardHandlers(r,o,a,g)},p.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},p}();l.KeyBinding=_}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,l,T){var b=0,w=0,_=!1,p=!1,g=!1,r=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[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]],o=0,i=1,n=0,s=1,h=2,m=3,y=4,R=5,$=6,C=7,v=8,L=9,I=10,F=11,E=12,U=13,P=14,O=15,S=16,k=17,N=18,W=[N,N,N,N,N,N,N,N,N,$,R,$,v,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,R,R,$,v,y,y,F,F,F,y,y,y,y,y,I,L,I,L,L,h,h,h,h,h,h,h,h,h,h,L,y,y,y,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,y,y,y,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,y,y,y,y,N,N,N,N,N,N,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,L,y,F,F,F,F,y,y,y,y,n,y,y,N,y,y,F,F,h,h,y,n,y,y,y,h,n,y,y,y,y,y],V=[v,v,v,v,v,v,v,v,v,v,v,N,N,N,n,s,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,v,R,U,P,O,S,k,L,F,F,F,F,F,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,L,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,v];function G(ne,ue,le,ce){var ve=b?a:r,Ce=null,$e=null,Te=null,qe=0,Ke=null,at=null,et=-1,lt=null,jt=null,on=[];if(!ce)for(lt=0,ce=[];lt<le;lt++)ce[lt]=he(ne[lt]);for(w=b,_=!1,p=!1,g=!1,jt=0;jt<le;jt++){if(Ce=qe,on[jt]=$e=te(ne,ce,on,jt),qe=ve[Ce][$e],Ke=qe&240,qe&=15,ue[jt]=Te=ve[qe][5],Ke>0)if(Ke==16){for(lt=et;lt<jt;lt++)ue[lt]=1;et=-1}else et=-1;if(at=ve[qe][6],at)et==-1&&(et=jt);else if(et>-1){for(lt=et;lt<jt;lt++)ue[lt]=Te;et=-1}ce[jt]==R&&(ue[jt]=0),w|=Te}if(g){for(lt=0;lt<le;lt++)if(ce[lt]==$){ue[lt]=b;for(var Ht=lt-1;Ht>=0&&ce[Ht]==v;Ht--)ue[Ht]=b}}}function Q(ne,ue,le){if(!(w<ne)){if(ne==1&&b==i&&!p){le.reverse();return}for(var ce=le.length,ve=0,Ce,$e,Te,qe;ve<ce;){if(ue[ve]>=ne){for(Ce=ve+1;Ce<ce&&ue[Ce]>=ne;)Ce++;for($e=ve,Te=Ce-1;$e<Te;$e++,Te--)qe=le[$e],le[$e]=le[Te],le[Te]=qe;ve=Ce}ve++}}}function te(ne,ue,le,ce){var ve=ue[ce],Ce,$e,Te,qe;switch(ve){case n:case s:_=!1;case y:case m:return ve;case h:return _?m:h;case C:return _=!0,s;case v:return y;case L:return ce<1||ce+1>=ue.length||(Ce=le[ce-1])!=h&&Ce!=m||($e=ue[ce+1])!=h&&$e!=m?y:(_&&($e=m),$e==Ce?$e:y);case I:return Ce=ce>0?le[ce-1]:R,Ce==h&&ce+1<ue.length&&ue[ce+1]==h?h:y;case F:if(ce>0&&le[ce-1]==h)return h;if(_)return y;for(qe=ce+1,Te=ue.length;qe<Te&&ue[qe]==F;)qe++;return qe<Te&&ue[qe]==h?h:y;case E:for(Te=ue.length,qe=ce+1;qe<Te&&ue[qe]==E;)qe++;if(qe<Te){var Ke=ne[ce],at=Ke>=1425&&Ke<=2303||Ke==64286;if(Ce=ue[qe],at&&(Ce==s||Ce==C))return s}return ce<1||(Ce=ue[ce-1])==R?y:le[ce-1];case R:return _=!1,p=!0,b;case $:return g=!0,y;case U:case P:case S:case k:case O:_=!1;case N:return y}}function he(ne){var ue=ne.charCodeAt(0),le=ue>>8;return le==0?ue>191?n:W[ue]:le==5?/[\u0591-\u05f4]/.test(ne)?s:n:le==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?E:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?m:ue==1642?F:/[\u06f0-\u06f9]/.test(ne)?h:C:le==32&&ue<=8287?V[ue&255]:le==254&&ue>=65136?C:y}l.L=n,l.R=s,l.EN=h,l.ON_R=3,l.AN=4,l.R_H=5,l.B=6,l.RLE=7,l.DOT="·",l.doBidiReorder=function(ne,ue,le){if(ne.length<2)return{};var ce=ne.split(""),ve=new Array(ce.length),Ce=new Array(ce.length),$e=[];b=le?i:o,G(ce,$e,ce.length,ue);for(var Te=0;Te<ve.length;ve[Te]=Te,Te++);Q(2,$e,ve),Q(1,$e,ve);for(var Te=0;Te<ve.length-1;Te++)ue[Te]===m?$e[Te]=l.AN:$e[Te]===s&&(ue[Te]>C&&ue[Te]<U||ue[Te]===y||ue[Te]===N)?$e[Te]=l.ON_R:Te>0&&ce[Te-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Te])&&($e[Te-1]=$e[Te]=l.R_H,Te++);ce[ce.length-1]===l.DOT&&($e[ce.length-1]=l.B),ce[0]==="‫"&&($e[0]=l.RLE);for(var Te=0;Te<ve.length;Te++)Ce[Te]=$e[ve[Te]];return{logicalFromVisual:ve,bidiLevels:Ce}},l.hasBidiCharacters=function(ne,ue){for(var le=!1,ce=0;ce<ne.length;ce++)ue[ce]=he(ne.charAt(ce)),!le&&(ue[ce]==s||ue[ce]==C||ue[ce]==m)&&(le=!0);return le},l.getVisualFromLogicalIdx=function(ne,ue){for(var le=0;le<ue.logicalFromVisual.length;le++)if(ue.logicalFromVisual[le]==ne)return le;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,l,T){var b=e("./lib/bidiutil"),w=e("./lib/lang"),_=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,p=function(){function g(r){this.session=r,this.bidiMap={},this.currentRow=null,this.bidiUtil=b,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=_.test(r.getValue())}return g.prototype.isBidiRow=function(r,a,o){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(a,o),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&_.test(r.lines.join(`
179
- `))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var r=0,a=this.session.$screenRowCache;if(a.length){var o=this.session.$getRowCacheIndex(a,this.currentRow);o>=0&&(r=this.session.$docRowCache[o])}return r},g.prototype.getSplitIndex=function(){var r=0,a=this.session.$screenRowCache;if(a.length)for(var o,i=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-r>0&&(o=this.session.$getRowCacheIndex(a,this.currentRow-r-1),o===i);)i=o,r++;else r=this.currentRow;return r},g.prototype.updateRowLine=function(r,a){r===void 0&&(r=this.getDocumentRow());var o=r===this.session.getLength()-1,i=o?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var n=this.session.$wrapData[r];n&&(a===void 0&&(a=this.getSplitIndex()),a>0&&n.length?(this.wrapIndent=n.indent,this.wrapOffset=this.wrapIndent*this.charWidths[b.L],this.line=a<n.length?this.line.substring(n[a-1],n[a]):this.line.substring(n[n.length-1])):this.line=this.line.substring(0,n[a]),a==n.length&&(this.line+=this.showInvisibles?i:b.DOT))}else this.line+=this.showInvisibles?i:b.DOT;var s=this.session,h=0,m;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(y,R){return y===" "||s.isFullWidth(y.charCodeAt(0))?(m=y===" "?s.getScreenTabSize(R+h):2,h+=m-1,w.stringRepeat(b.DOT,m)):y}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==b.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},g.prototype.updateBidiMap=function(){var r=[];b.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=b.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var a=this.characterWidth=r.$characterSize.width,o=r.$measureCharWidth("ה");this.charWidths[b.L]=this.charWidths[b.EN]=this.charWidths[b.ON_R]=a,this.charWidths[b.R]=this.charWidths[b.AN]=o,this.charWidths[b.R_H]=o*.45,this.charWidths[b.B]=this.charWidths[b.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null},g.prototype.setEolChar=function(r){this.EOL=r},g.prototype.setContentWidth=function(r){this.contentWidth=r},g.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(r,a){for(var o=r.getCursorPosition(),i=r.selection.getSelectionAnchor().row;i<=o.row;i++)!a&&r.session.getLine(i).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(i,0,1):a&&r.session.getLine(i).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:i},r.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(r){r-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,o=r>a?this.session.getOverwrite()?r:r-1:a,i=b.getVisualFromLogicalIdx(o,this.bidiMap),n=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&r<=a&&n[i]%2!==0&&i++;for(var h=0;h<i;h++)s+=this.charWidths[n[h]];return!this.session.getOverwrite()&&r>a&&n[i]%2===0&&(s+=this.charWidths[n[i]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},g.prototype.getSelections=function(r,a){var o=this.bidiMap,i=o.bidiLevels,n,s=[],h=0,m=Math.min(r,a)-this.wrapIndent,y=Math.max(r,a)-this.wrapIndent,R=!1,$=!1,C=0;this.wrapIndent&&(h+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var v,L=0;L<i.length;L++)v=o.logicalFromVisual[L],n=i[L],R=v>=m&&v<y,R&&!$?C=h:!R&&$&&s.push({left:C,width:h-C}),h+=this.charWidths[n],$=R;if(R&&L===i.length&&s.push({left:C,width:h-C}),this.isRtlDir)for(var I=0;I<s.length;I++)s[I].left+=this.rtlLineOffset;return s},g.prototype.offsetToCol=function(o){this.isRtlDir&&(o-=this.rtlLineOffset);var a=0,o=Math.max(o,0),i=0,n=0,s=this.bidiMap.bidiLevels,h=this.charWidths[s[n]];for(this.wrapIndent&&(o-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);o>i+h/2;){if(i+=h,n===s.length-1){h=0;break}h=this.charWidths[s[++n]]}return n>0&&s[n-1]%2!==0&&s[n]%2===0?(o<i&&n--,a=this.bidiMap.logicalFromVisual[n]):n>0&&s[n-1]%2===0&&s[n]%2!==0?a=1+(o>i?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===s.length-1&&h===0&&s[n-1]%2===0||!this.isRtlDir&&n===0&&s[n]%2!==0?a=1+this.bidiMap.logicalFromVisual[n]:(n>0&&s[n-1]%2!==0&&h!==0&&n--,a=this.bidiMap.logicalFromVisual[n]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},g}();l.BidiHandler=p}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,l,T){var b=e("./lib/oop"),w=e("./lib/lang"),_=e("./lib/event_emitter").EventEmitter,p=e("./range").Range,g=function(){function r(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var o=this;this.cursor.on("change",function(i){o.$cursorChanged=!0,o.$silent||o._emit("changeCursor"),!o.$isEmpty&&!o.$silent&&o._emit("changeSelection"),!o.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(o.$desiredColumn=null)}),this.anchor.on("change",function(){o.$anchorChanged=!0,!o.$isEmpty&&!o.$silent&&o._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(a,o){this.$isEmpty=!1,this.anchor.setPosition(a,o)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var a=this.anchor,o=this.lead;return a.row>o.row||a.row==o.row&&a.column>o.column},r.prototype.getRange=function(){var a=this.anchor,o=this.lead;return this.$isEmpty?p.fromPoints(o,o):this.isBackwards()?p.fromPoints(o,a):p.fromPoints(a,o)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(a,o){var i=o?a.end:a.start,n=o?a.start:a.end;this.$setSelection(i.row,i.column,n.row,n.column)},r.prototype.$setSelection=function(a,o,i,n){if(!this.$silent){var s=this.$isEmpty,h=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,o),this.cursor.setPosition(i,n),this.$isEmpty=!p.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||h)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(a){var o=this.lead;this.$isEmpty&&this.setSelectionAnchor(o.row,o.column),a.call(this)},r.prototype.selectTo=function(a,o){this.$moveSelection(function(){this.moveCursorTo(a,o)})},r.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},r.prototype.moveTo=function(a,o){this.clearSelection(),this.moveCursorTo(a,o)},r.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(a,o){if(typeof o>"u"){var i=a||this.lead;a=i.row,o=i.column}return this.session.getWordRange(a,o)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var a=this.getCursor(),o=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(o)},r.prototype.getLineRange=function(a,o){var i=typeof a=="number"?a:this.lead.row,n,s=this.session.getFoldLine(i);return s?(i=s.start.row,n=s.end.row):n=i,o===!0?new p(i,0,n,this.session.getLine(n).length):new p(i,0,n+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(a,o,i){var n=a.column,s=a.column+o;return i<0&&(n=a.column-o,s=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(n,s).split(" ").length-1==o},r.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),o;if(o=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(o.start.row,o.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),o;if(o=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(o.end.row,o.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(),a=this.lead;this.wouldMoveIntoSoftTab(a,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var a=this.lead.row,o=this.lead.column,i=this.session.documentToScreenRow(a,o),n=this.session.screenToDocumentPosition(i,0),s=this.session.getDisplayLine(a,null,n.row,n.column),h=s.match(/^\s*/);h[0].length!=o&&!this.session.$useEmacsStyleLineStart&&(n.column+=h[0].length),this.moveCursorToPosition(n)},r.prototype.moveCursorLineEnd=function(){var a=this.lead,o=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==o.column){var i=this.session.getLine(o.row);if(o.column==i.length){var n=i.search(/\s+$/);n>0&&(o.column=n)}}this.moveCursorTo(o.row,o.column)},r.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,o=this.doc.getLine(a).length;this.moveCursorTo(a,o)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,o=this.lead.column,i=this.doc.getLine(a),n=i.substring(o);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(a,o,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(this.session.nonTokenRe.exec(n)&&(o+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(o)),o>=i.length){this.moveCursorTo(a,i.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(n)&&(o+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,o)},r.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,o=this.lead.column,i;if(i=this.session.getFoldAt(a,o,-1)){this.moveCursorTo(i.start.row,i.start.column);return}var n=this.session.getFoldStringAt(a,o,-1);n==null&&(n=this.doc.getLine(a).substring(0,o));var s=w.stringReverse(n);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(s)&&(o-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),o<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(s)&&(o-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,o)},r.prototype.$shortWordEndIndex=function(a){var o=0,i,n=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(a))o=this.session.tokenRe.lastIndex;else{for(;(i=a[o])&&n.test(i);)o++;if(o<1){for(s.lastIndex=0;(i=a[o])&&!s.test(i);)if(s.lastIndex=0,o++,n.test(i))if(o>2){o--;break}else{for(;(i=a[o])&&n.test(i);)o++;if(o>2)break}}}return s.lastIndex=0,o},r.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,o=this.lead.column,i=this.doc.getLine(a),n=i.substring(o),s=this.session.getFoldAt(a,o,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(o==i.length){var h=this.doc.getLength();do a++,n=this.doc.getLine(a);while(a<h&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),o=0}var m=this.$shortWordEndIndex(n);this.moveCursorTo(a,o+m)},r.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,o=this.lead.column,i;if(i=this.session.getFoldAt(a,o,-1))return this.moveCursorTo(i.start.row,i.start.column);var n=this.session.getLine(a).substring(0,o);if(o===0){do a--,n=this.doc.getLine(a);while(a>0&&/^\s*$/.test(n));o=n.length,/\s+$/.test(n)||(n="")}var s=w.stringReverse(n),h=this.$shortWordEndIndex(s);return this.moveCursorTo(a,o-h)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(a,o){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),n;if(o===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var s=this.session.lineWidgets[this.lead.row];a<0?a-=s.rowsAbove||0:a>0&&(a+=s.rowCount-(s.rowsAbove||0))}var h=this.session.screenToDocumentPosition(i.row+a,i.column,n);a!==0&&o===0&&h.row===this.lead.row&&(h.column,this.lead.column),this.moveCursorTo(h.row,h.column+o,o===0)},r.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},r.prototype.moveCursorTo=function(a,o,i){var n=this.session.getFoldAt(a,o,1);n&&(a=n.start.row,o=n.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(s.charAt(o))&&s.charAt(o-1)&&(this.lead.row==a&&this.lead.column==o+1?o=o-1:o=o+1),this.lead.setPosition(a,o),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(a,o,i){var n=this.session.screenToDocumentPosition(a,o);this.moveCursorTo(n.row,n.column,i)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(a){var o=this.getRange();return a?(a.start.column=o.start.column,a.start.row=o.start.row,a.end.column=o.end.column,a.end.row=o.end.row):a=o,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},r.prototype.getRangeOfMovements=function(a){var o=this.getCursor();try{a(this);var i=this.getCursor();return p.fromPoints(o,i)}catch{return p.fromPoints(o,o)}finally{this.moveCursorToPosition(o)}},r.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(o){var i=o.clone();return i.isBackwards=o.cursor==o.start,i});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},r.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var o=a.length;o--;){var i=p.fromPoints(a[o].start,a[o].end);a[o].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},r.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var o=this.ranges.length;o--;)if(!this.ranges[o].isEqual(a[o]))return!1;return!0},r}();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,b.implement(g.prototype,_),l.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,l,T){var b=e("./lib/report_error").reportError,w=2e3,_=function(){function p(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var r in this.states){for(var a=this.states[r],o=[],i=0,n=this.matchMappings[r]={defaultToken:"text"},s="g",h=[],m=0;m<a.length;m++){var y=a[m];if(y.defaultToken&&(n.defaultToken=y.defaultToken),y.caseInsensitive&&s.indexOf("i")===-1&&(s+="i"),y.unicode&&s.indexOf("u")===-1&&(s+="u"),y.regex!=null){y.regex instanceof RegExp&&(y.regex=y.regex.toString().slice(1,-1));var R=y.regex,$=new RegExp("(?:("+R+")|(.))").exec("a").length-2;Array.isArray(y.token)?y.token.length==1||$==1?y.token=y.token[0]:$-1!=y.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:y,groupCount:$-1}),y.token=y.token[0]):(y.tokenArray=y.token,y.token=null,y.onMatch=this.$arrayTokens):typeof y.token=="function"&&!y.onMatch&&($>1?y.onMatch=this.$applyToken:y.onMatch=y.token),$>1&&(/\\\d/.test(y.regex)?R=y.regex.replace(/\\([0-9]+)/g,function(C,v){return"\\"+(parseInt(v,10)+i+1)}):($=1,R=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&h.push(y)),n[i]=m,i+=$,o.push(R),y.onMatch||(y.onMatch=null)}}o.length||(n[0]=0,o.push("$")),h.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,s)},this),this.regExps[r]=new RegExp("("+o.join(")|(")+")|($)",s)}}return p.prototype.$setMaxTokenCount=function(g){w=g|0},p.prototype.$applyToken=function(g){var r=this.splitRegex.exec(g).slice(1),a=this.token.apply(this,r);if(typeof a=="string")return[{type:a,value:g}];for(var o=[],i=0,n=a.length;i<n;i++)r[i]&&(o[o.length]={type:a[i],value:r[i]});return o},p.prototype.$arrayTokens=function(g){if(!g)return[];var r=this.splitRegex.exec(g);if(!r)return"text";for(var a=[],o=this.tokenArray,i=0,n=o.length;i<n;i++)r[i+1]&&(a[a.length]={type:o[i],value:r[i+1]});return a},p.prototype.removeCapturingGroups=function(g){var r=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,o){return o?"(?:":a});return r},p.prototype.createSplitterRegexp=function(g,r){if(g.indexOf("(?=")!=-1){var a=0,o=!1,i={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(n,s,h,m,y,R){return o?o=y!="]":y?o=!0:m?(a==i.stack&&(i.end=R+1,i.stack=-1),a--):h&&(a++,h.length!=1&&(i.stack=a,i.start=R)),n}),i.end!=null&&/^\)*$/.test(g.substr(i.end))&&(g=g.substring(0,i.start)+g.substr(i.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(r||"").replace("g",""))},p.prototype.getLineTokens=function(g,r){if(r&&typeof r!="string"){var a=r.slice(0);r=a[0],r==="#tmp"&&(a.shift(),r=a.shift())}else var a=[];var o=r||"start",i=this.states[o];i||(o="start",i=this.states[o]);var n=this.matchMappings[o],s=this.regExps[o];s.lastIndex=0;for(var h,m=[],y=0,R=0,$={type:null,value:""};h=s.exec(g);){var C=n.defaultToken,v=null,L=h[0],I=s.lastIndex;if(I-L.length>y){var F=g.substring(y,I-L.length);$.type==C?$.value+=F:($.type&&m.push($),$={type:C,value:F})}for(var E=0;E<h.length-2;E++)if(h[E+1]!==void 0){v=i[n[E]],v.onMatch?C=v.onMatch(L,o,a,g):C=v.token,v.next&&(typeof v.next=="string"?o=v.next:o=v.next(o,a),i=this.states[o],i||(this.reportError("state doesn't exist",o),o="start",i=this.states[o]),n=this.matchMappings[o],y=I,s=this.regExps[o],s.lastIndex=I),v.consumeLineEnd&&(y=I);break}if(L){if(typeof C=="string")(!v||v.merge!==!1)&&$.type===C?$.value+=L:($.type&&m.push($),$={type:C,value:L});else if(C){$.type&&m.push($),$={type:null,value:""};for(var E=0;E<C.length;E++)m.push(C[E])}}if(y==g.length)break;if(y=I,R++>w){for(R>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:g});y<g.length;)$.type&&m.push($),$={value:g.substring(y,y+=500),type:"overflow"};o="start",a=[];break}}return $.type&&m.push($),a.length>1&&a[0]!==o&&a.unshift("#tmp",o),{tokens:m,state:a.length?a:o}},p}();_.prototype.reportError=b,l.Tokenizer=_}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,l,T){var b=e("../lib/deep_copy").deepCopy,w;w=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,r){if(!r){for(var a in g)this.$rules[a]=g[a];return}for(var a in g){for(var o=g[a],i=0;i<o.length;i++){var n=o[i];(n.next||n.onMatch)&&(typeof n.next=="string"&&n.next.indexOf(r)!==0&&(n.next=r+n.next),n.nextState&&n.nextState.indexOf(r)!==0&&(n.nextState=r+n.nextState))}this.$rules[r+a]=o}},this.getRules=function(){return this.$rules},this.embedRules=function(g,r,a,o,i){var n=typeof g=="function"?new g().getRules():g;if(o)for(var s=0;s<o.length;s++)o[s]=r+o[s];else{o=[];for(var h in n)o.push(r+h)}if(this.addRules(n,r),a)for(var m=Array.prototype[i?"push":"unshift"],s=0;s<o.length;s++)m.apply(this.$rules[o[s]],b(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var _=function(g,r){return(g!="start"||r.length)&&r.unshift(this.nextState,g),this.nextState},p=function(g,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var g=0,r=this.$rules;function a(o){var i=r[o];i.processed=!0;for(var n=0;n<i.length;n++){var s=i[n],h=null;Array.isArray(s)&&(h=s,s={}),!s.regex&&s.start&&(s.regex=s.start,s.next||(s.next=[]),s.next.push({defaultToken:s.token},{token:s.token+".end",regex:s.end||s.start,next:"pop"}),s.token=s.token+".start",s.push=!0);var m=s.next||s.push;if(m&&Array.isArray(m)){var y=s.stateName;y||(y=s.token,typeof y!="string"&&(y=y[0]||""),r[y]&&(y+=g++)),r[y]=m,s.next=y,a(y)}else m=="pop"&&(s.next=p);if(s.push&&(s.nextState=s.next||s.push,s.next=_,delete s.push),s.rules)for(var R in s.rules)r[R]?r[R].push&&r[R].push.apply(r[R],s.rules[R]):r[R]=s.rules[R];var $=typeof s=="string"?s:s.include;if($&&($==="$self"&&($="start"),Array.isArray($)?h=$.map(function(v){return r[v]}):h=r[$]),h){var C=[n,1].concat(h);s.noEscape&&(C=C.filter(function(v){return!v.next})),i.splice.apply(i,C),n--}s.keywordMap&&(s.token=this.createKeywordMapper(s.keywordMap,s.defaultToken||"text",s.caseInsensitive),delete s.defaultToken)}}Object.keys(r).forEach(a,this)},this.createKeywordMapper=function(g,r,a,o){var i=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(n){for(var s=g[n],h=s.split(o||"|"),m=h.length;m--;){var y=h[m];this.$keywordList.push(y),a&&(y=y.toLowerCase()),i[y]=n}},this),g=null,a?function(n){return i[n.toLowerCase()]||r}:function(n){return i[n]||r}},this.getKeywords=function(){return this.$keywords}}).call(w.prototype),l.TextHighlightRules=w}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,l,T){var b;b=function(){this.$behaviours={}},(function(){this.add=function(w,_,p){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[w]:this.$behaviours[w]={}}this.$behaviours[w][_]=p},this.addBehaviours=function(w){for(var _ in w)for(var p in w[_])this.add(_,p,w[_][p])},this.remove=function(w){this.$behaviours&&this.$behaviours[w]&&delete this.$behaviours[w]},this.inherit=function(w,_){if(typeof w=="function")var p=new w().getBehaviours(_);else var p=w.getBehaviours(_);this.addBehaviours(p)},this.getBehaviours=function(w){if(w){for(var _={},p=0;p<w.length;p++)this.$behaviours[w[p]]&&(_[w[p]]=this.$behaviours[w[p]]);return _}else return this.$behaviours}}).call(b.prototype),l.Behaviour=b}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,l,T){var b=e("./range").Range,w=function(){function _(p,g,r){this.$session=p,this.$row=g,this.$rowTokens=p.getTokens(g);var a=p.getTokenAt(g,r);this.$tokenIndex=a?a.index:-1}return _.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},_.prototype.stepForward=function(){this.$tokenIndex+=1;for(var p;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,p||(p=this.$session.getLength()),this.$row>=p)return this.$row=p-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},_.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},_.prototype.getCurrentTokenRow=function(){return this.$row},_.prototype.getCurrentTokenColumn=function(){var p=this.$rowTokens,g=this.$tokenIndex,r=p[g].start;if(r!==void 0)return r;for(r=0;g>0;)g-=1,r+=p[g].value.length;return r},_.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},_.prototype.getCurrentTokenRange=function(){var p=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new b(this.$row,g,this.$row,g+p.value.length)},_}();l.TokenIterator=w}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,l,T){var b=e("../../lib/oop"),w=e("../behaviour").Behaviour,_=e("../../token_iterator").TokenIterator,p=e("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,o={},i={'"':'"',"'":"'"},n=function(m){var y=-1;if(m.multiSelect&&(y=m.selection.index,o.rangeCount!=m.multiSelect.rangeCount&&(o={rangeCount:m.multiSelect.rangeCount})),o[y])return a=o[y];a=o[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},s=function(m,y,R,$){var C=m.end.row-m.start.row;return{text:R+y+$,selection:[0,m.start.column+1,C,m.end.column+(C?0:1)]}},h;h=function(m){m=m||{},this.add("braces","insertion",function(y,R,$,C,v){var L=$.getCursorPosition(),I=C.doc.getLine(L.row);if(v=="{"){n($);var F=$.getSelectionRange(),E=C.doc.getTextRange(F),U=C.getTokenAt(L.row,L.column);if(E!==""&&E!=="{"&&$.getWrapBehavioursEnabled())return s(F,E,"{","}");if(U&&/(?:string)\.quasi|\.xml/.test(U.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(G){return G.test(U.type)})||/(string)\.quasi/.test(U.type)&&U.value[L.column-U.start-1]!=="$"?void 0:(h.recordAutoInsert($,C,"}"),{text:"{}",selection:[1,1]})}else if(h.isSaneInsertion($,C))return/[\]\}\)]/.test(I[L.column])||$.inMultiSelectMode||m.braces?(h.recordAutoInsert($,C,"}"),{text:"{}",selection:[1,1]}):(h.recordMaybeInsert($,C,"{"),{text:"{",selection:[1,1]})}else if(v=="}"){n($);var O=I.substring(L.column,L.column+1);if(O=="}"){var S=C.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(S!==null&&h.isAutoInsertedClosing(L,I,v))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(v==`
180
- `||v==`\r
181
- `){n($);var k="";h.isMaybeInsertedClosing(L,I)&&(k=p.stringRepeat("}",a.maybeInsertedBrackets),h.clearMaybeInsertedClosing());var O=I.substring(L.column,L.column+1);if(O==="}"){var N=C.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!N)return null;var W=this.$getIndent(C.getLine(N.row))}else if(k)var W=this.$getIndent(I);else{h.clearMaybeInsertedClosing();return}var V=W+C.getTabString();return{text:`
182
- `+V+`
183
- `+W+k,selection:[1,V.length,1,V.length]}}else h.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,R,$,C,v){var L=C.doc.getTextRange(v);if(!v.isMultiLine()&&L=="{"){n($);var I=C.doc.getLine(v.start.row),F=I.substring(v.end.column,v.end.column+1);if(F=="}")return v.end.column++,v;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,R,$,C,v){if(v=="("){n($);var L=$.getSelectionRange(),I=C.doc.getTextRange(L);if(I!==""&&$.getWrapBehavioursEnabled())return s(L,I,"(",")");if(h.isSaneInsertion($,C))return h.recordAutoInsert($,C,")"),{text:"()",selection:[1,1]}}else if(v==")"){n($);var F=$.getCursorPosition(),E=C.doc.getLine(F.row),U=E.substring(F.column,F.column+1);if(U==")"){var P=C.$findOpeningBracket(")",{column:F.column+1,row:F.row});if(P!==null&&h.isAutoInsertedClosing(F,E,v))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,R,$,C,v){var L=C.doc.getTextRange(v);if(!v.isMultiLine()&&L=="("){n($);var I=C.doc.getLine(v.start.row),F=I.substring(v.start.column+1,v.start.column+2);if(F==")")return v.end.column++,v}}),this.add("brackets","insertion",function(y,R,$,C,v){if(v=="["){n($);var L=$.getSelectionRange(),I=C.doc.getTextRange(L);if(I!==""&&$.getWrapBehavioursEnabled())return s(L,I,"[","]");if(h.isSaneInsertion($,C))return h.recordAutoInsert($,C,"]"),{text:"[]",selection:[1,1]}}else if(v=="]"){n($);var F=$.getCursorPosition(),E=C.doc.getLine(F.row),U=E.substring(F.column,F.column+1);if(U=="]"){var P=C.$findOpeningBracket("]",{column:F.column+1,row:F.row});if(P!==null&&h.isAutoInsertedClosing(F,E,v))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,R,$,C,v){var L=C.doc.getTextRange(v);if(!v.isMultiLine()&&L=="["){n($);var I=C.doc.getLine(v.start.row),F=I.substring(v.start.column+1,v.start.column+2);if(F=="]")return v.end.column++,v}}),this.add("string_dquotes","insertion",function(y,R,$,C,v){var L=C.$mode.$quotes||i;if(v.length==1&&L[v]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(v)!=-1)return;n($);var I=v,F=$.getSelectionRange(),E=C.doc.getTextRange(F);if(E!==""&&(E.length!=1||!L[E])&&$.getWrapBehavioursEnabled())return s(F,E,I,I);if(!E){var U=$.getCursorPosition(),P=C.doc.getLine(U.row),O=P.substring(U.column-1,U.column),S=P.substring(U.column,U.column+1),k=C.getTokenAt(U.row,U.column),N=C.getTokenAt(U.row,U.column+1);if(O=="\\"&&k&&/escape/.test(k.type))return null;var W=k&&/string|escape/.test(k.type),V=!N||/string|escape/.test(N.type),G;if(S==I)G=W!==V,G&&/string\.end/.test(N.type)&&(G=!1);else{if(W&&!V||W&&V)return null;var Q=C.$mode.tokenRe;Q.lastIndex=0;var te=Q.test(O);Q.lastIndex=0;var he=Q.test(S),ne=C.$mode.$pairQuotesAfter,ue=ne&&ne[I]&&ne[I].test(O);if(!ue&&te||he||S&&!/[\s;,.})\]\\]/.test(S))return null;var le=P[U.column-2];if(O==I&&(le==I||Q.test(le)))return null;G=!0}return{text:G?I+I:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,R,$,C,v){var L=C.$mode.$quotes||i,I=C.doc.getTextRange(v);if(!v.isMultiLine()&&L.hasOwnProperty(I)){n($);var F=C.doc.getLine(v.start.row),E=F.substring(v.start.column+1,v.start.column+2);if(E==I)return v.end.column++,v}}),m.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,R,$,C,v){if(y==="doc-start"&&(v===`
184
- `||v===`\r
185
- `)&&$.selection.isEmpty()){var L=$.getCursorPosition();if(L.column===0)return;for(var I=C.doc.getLine(L.row),F=C.doc.getLine(L.row+1),E=C.getTokens(L.row),U=0,P=0;P<E.length;P++){U+=E[P].value.length;var O=E[P];if(U>=L.column){if(U===L.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var S=E[P+1];if(!S||!/\.doc/.test(S.type))return}}var k=L.column-(U-O.value.length),N=O.value.indexOf("*/"),W=O.value.indexOf("/**",N>-1?N+2:0);if(W!==-1&&k>W&&k<W+3||N!==-1&&W!==-1&&k>=N&&k<=W||!/\.doc/.test(O.type))return;break}}var V=this.$getIndent(I);if(/\s*\*/.test(F))return/^\s*\*/.test(I)?{text:v+V+"* ",selection:[1,2+V.length,1,2+V.length]}:{text:v+V+" * ",selection:[1,3+V.length,1,3+V.length]};if(/\/\*\*/.test(I.substring(0,L.column)))return{text:v+V+" * "+v+" "+V+"*/",selection:[1,4+V.length,1,4+V.length]}}})},h.isSaneInsertion=function(m,y){var R=m.getCursorPosition(),$=new _(y,R.row,R.column);if(!this.$matchTokenType($.getCurrentToken()||"text",g)){if(/[)}\]]/.test(m.session.getLine(R.row)[R.column]))return!0;var C=new _(y,R.row,R.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",g))return!1}return $.stepForward(),$.getCurrentTokenRow()!==R.row||this.$matchTokenType($.getCurrentToken()||"text",r)},h.$matchTokenType=function(m,y){return y.indexOf(m.type||m)>-1},h.recordAutoInsert=function(m,y,R){var $=m.getCursorPosition(),C=y.doc.getLine($.row);this.isAutoInsertedClosing($,C,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=$.row,a.autoInsertedLineEnd=R+C.substr($.column),a.autoInsertedBrackets++},h.recordMaybeInsert=function(m,y,R){var $=m.getCursorPosition(),C=y.doc.getLine($.row);this.isMaybeInsertedClosing($,C)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=$.row,a.maybeInsertedLineStart=C.substr(0,$.column)+R,a.maybeInsertedLineEnd=C.substr($.column),a.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(m,y,R){return a.autoInsertedBrackets>0&&m.row===a.autoInsertedRow&&R===a.autoInsertedLineEnd[0]&&y.substr(m.column)===a.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(m,y){return a.maybeInsertedBrackets>0&&m.row===a.maybeInsertedRow&&y.substr(m.column)===a.maybeInsertedLineEnd&&y.substr(0,m.column)==a.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},b.inherits(h,w),l.CstyleBehaviour=h}),ace.define("ace/unicode",["require","exports","module"],function(e,l,T){for(var b=[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,_=[],p=0;p<b.length;p+=2)_.push(w+=b[p]),b[p+1]&&_.push(45,w+=b[p+1]);l.wordChars=String.fromCharCode.apply(null,_)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,l,T){var b=e("../config"),w=e("../tokenizer").Tokenizer,_=e("./text_highlight_rules").TextHighlightRules,p=e("./behaviour/cstyle").CstyleBehaviour,g=e("../unicode"),r=e("../lib/lang"),a=e("../token_iterator").TokenIterator,o=e("../range").Range,i;i=function(){this.HighlightRules=_},(function(){this.$defaultBehaviour=new p,this.tokenRe=new RegExp("^["+g.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.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(n,s,h,m){var y=s.doc,R=!0,$=!0,C=1/0,v=s.getTabSize(),L=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var E=this.lineCommentStart.map(r.escapeRegExp).join("|"),I=this.lineCommentStart[0];else var E=r.escapeRegExp(this.lineCommentStart),I=this.lineCommentStart;E=new RegExp("^(\\s*)(?:"+E+") ?"),L=s.getUseSoftTabs();var O=function(he,ne){var ue=he.match(E);if(ue){var le=ue[1].length,ce=ue[0].length;!N(he,le,ce)&&ue[0][ce-1]==" "&&ce--,y.removeInLine(ne,le,ce)}},k=I+" ",P=function(he,ne){(!R||/\S/.test(he))&&(N(he,C,C)?y.insertInLine({row:ne,column:C},k):y.insertInLine({row:ne,column:C},I))},S=function(he,ne){return E.test(he)},N=function(he,ne,ue){for(var le=0;ne--&&he.charAt(ne)==" ";)le++;if(le%v!=0)return!1;for(var le=0;he.charAt(ue++)==" ";)le++;return v>2?le%v!=v-1:le%v==0}}else{if(!this.blockComment)return!1;var I=this.blockComment.start,F=this.blockComment.end,E=new RegExp("^(\\s*)(?:"+r.escapeRegExp(I)+")"),U=new RegExp("(?:"+r.escapeRegExp(F)+")\\s*$"),P=function(G,Q){S(G,Q)||(!R||/\S/.test(G))&&(y.insertInLine({row:Q,column:G.length},F),y.insertInLine({row:Q,column:C},I))},O=function(G,Q){var te;(te=G.match(U))&&y.removeInLine(Q,G.length-te[0].length,G.length),(te=G.match(E))&&y.removeInLine(Q,te[1].length,te[0].length)},S=function(G,Q){if(E.test(G))return!0;for(var te=s.getTokens(Q),he=0;he<te.length;he++)if(te[he].type==="comment")return!0}}function W(G){for(var Q=h;Q<=m;Q++)G(y.getLine(Q),Q)}var V=1/0;W(function(G,Q){var te=G.search(/\S/);te!==-1?(te<C&&(C=te),$&&!S(G,Q)&&($=!1)):V>G.length&&(V=G.length)}),C==1/0&&(C=V,R=!1,$=!1),L&&C%v!=0&&(C=Math.floor(C/v)*v),W($?O:P)},this.toggleBlockComment=function(n,s,h,m){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var R=new a(s,m.row,m.column),$=R.getCurrentToken();s.selection;var C=s.selection.toOrientedRange(),v,L;if($&&/comment/.test($.type)){for(var I,F;$&&/comment/.test($.type);){var E=$.value.indexOf(y.start);if(E!=-1){var U=R.getCurrentTokenRow(),P=R.getCurrentTokenColumn()+E;I=new o(U,P,U,P+y.start.length);break}$=R.stepBackward()}for(var R=new a(s,m.row,m.column),$=R.getCurrentToken();$&&/comment/.test($.type);){var E=$.value.indexOf(y.end);if(E!=-1){var U=R.getCurrentTokenRow(),P=R.getCurrentTokenColumn()+E;F=new o(U,P,U,P+y.end.length);break}$=R.stepForward()}F&&s.remove(F),I&&(s.remove(I),v=I.start.row,L=-y.start.length)}else L=y.start.length,v=h.start.row,s.insert(h.end,y.end),s.insert(h.start,y.start);C.start.row==v&&(C.start.column+=L),C.end.row==v&&(C.end.column+=L),s.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(n,s,h){return this.$getIndent(s)},this.checkOutdent=function(n,s,h){return!1},this.autoOutdent=function(n,s,h){},this.$getIndent=function(n){return n.match(/^\s*/)[0]},this.createWorker=function(n){return null},this.createModeDelegates=function(n){this.$embeds=[],this.$modes={};for(var s in n)if(n[s]){var h=n[s],m=h.prototype.$id,y=b.$modes[m];y||(b.$modes[m]=y=new h),b.$modes[s]||(b.$modes[s]=y),this.$embeds.push(s),this.$modes[s]=y}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(v){(function(L){var I=R[v],F=L[I];L[R[v]]=function(){return this.$delegator(I,arguments,F)}})(C)},C=this,s=0;s<R.length;s++)$(s)},this.$delegator=function(n,s,h){var m=s[0]||"start";if(typeof m!="string"){if(Array.isArray(m[2])){var y=m[2][m[2].length-1],R=this.$modes[y];if(R)return R[n].apply(R,[m[1]].concat([].slice.call(s,1)))}m=m[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var C=m.split(this.$embeds[$]);if(!C[0]&&C[1]){s[0]=C[1];var R=this.$modes[this.$embeds[$]];return R[n].apply(R,s)}}var v=h.apply(this,s);return h?v:void 0},this.transformAction=function(n,s,h,m,y){if(this.$behaviour){var R=this.$behaviour.getBehaviours();for(var $ in R)if(R[$][s]){var C=R[$][s].apply(this,arguments);if(C)return C}}},this.getKeywords=function(n){if(!this.completionKeywords){var s=this.$tokenizer.rules,h=[];for(var m in s)for(var y=s[m],R=0,$=y.length;R<$;R++)if(typeof y[R].token=="string")/keyword|support|storage/.test(y[R].token)&&h.push(y[R].regex);else if(typeof y[R].token=="object"){for(var C=0,v=y[R].token.length;C<v;C++)if(/keyword|support|storage/.test(y[R].token[C])){var m=y[R].regex.match(/\(.+?\)/g)[C];h.push(m.substr(1,m.length-2))}}this.completionKeywords=h}return n?h.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(n,s,h,m){var y=this.$keywordList||this.$createKeywordList();return y.map(function(R){return{name:R,value:R,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(i.prototype),l.Mode=i}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,l,T){var b=e("./lib/dom"),w=function(){function _(p){this.session=p,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return _.prototype.getRowLength=function(p){var g;return this.lineWidgets?g=this.lineWidgets[p]&&this.lineWidgets[p].rowCount||0:g=0,!this.$useWrapMode||!this.$wrapData[p]?1+g:this.$wrapData[p].length+1+g},_.prototype.$getWidgetScreenLength=function(){var p=0;return this.lineWidgets.forEach(function(g){g&&g.rowCount&&!g.hidden&&(p+=g.rowCount)}),p},_.prototype.$onChangeEditor=function(p){this.attach(p.editor)},_.prototype.attach=function(p){p&&p.widgetManager&&p.widgetManager!=this&&p.widgetManager.detach(),this.editor!=p&&(this.detach(),this.editor=p,p&&(p.widgetManager=this,p.renderer.on("beforeRender",this.measureWidgets),p.renderer.on("afterRender",this.renderWidgets)))},_.prototype.detach=function(p){var g=this.editor;if(g){this.editor=null,g.widgetManager=null,g.renderer.off("beforeRender",this.measureWidgets),g.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},_.prototype.updateOnFold=function(p,g){var r=g.lineWidgets;if(!(!r||!p.action)){for(var a=p.data,o=a.start.row,i=a.end.row,n=p.action=="add",s=o+1;s<i;s++)r[s]&&(r[s].hidden=n);r[i]&&(n?r[o]?r[i].hidden=n:r[o]=r[i]:(r[o]==r[i]&&(r[o]=void 0),r[i].hidden=n))}},_.prototype.updateOnChange=function(p){var g=this.session.lineWidgets;if(g){var r=p.start.row,a=p.end.row-r;if(a!==0)if(p.action=="remove"){var o=g.splice(r+1,a);!g[r]&&o[o.length-1]&&(g[r]=o.pop()),o.forEach(function(n){n&&this.removeLineWidget(n)},this),this.$updateRows()}else{var i=new Array(a);g[r]&&g[r].column!=null&&p.start.column>g[r].column&&r++,i.unshift(r,0),g.splice.apply(g,i),this.$updateRows()}}},_.prototype.$updateRows=function(){var p=this.session.lineWidgets;if(p){var g=!0;p.forEach(function(r,a){if(r)for(g=!1,r.row=a;r.$oldWidget;)r.$oldWidget.row=a,r=r.$oldWidget}),g&&(this.session.lineWidgets=null)}},_.prototype.$registerLineWidget=function(p){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var g=this.session.lineWidgets[p.row];return g&&(p.$oldWidget=g,g.el&&g.el.parentNode&&(g.el.parentNode.removeChild(g.el),g._inDocument=!1)),this.session.lineWidgets[p.row]=p,p},_.prototype.addLineWidget=function(p){if(this.$registerLineWidget(p),p.session=this.session,!this.editor)return p;var g=this.editor.renderer;p.html&&!p.el&&(p.el=b.createElement("div"),p.el.innerHTML=p.html),p.text&&!p.el&&(p.el=b.createElement("div"),p.el.textContent=p.text),p.el&&(b.addCssClass(p.el,"ace_lineWidgetContainer"),p.className&&b.addCssClass(p.el,p.className),p.el.style.position="absolute",p.el.style.zIndex="5",g.container.appendChild(p.el),p._inDocument=!0,p.coverGutter||(p.el.style.zIndex="3"),p.pixelHeight==null&&(p.pixelHeight=p.el.offsetHeight)),p.rowCount==null&&(p.rowCount=p.pixelHeight/g.layerConfig.lineHeight);var r=this.session.getFoldAt(p.row,0);if(p.$fold=r,r){var a=this.session.lineWidgets;p.row==r.end.row&&!a[r.start.row]?a[r.start.row]=p:p.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows(),this.renderWidgets(null,g),this.onWidgetChanged(p),p},_.prototype.removeLineWidget=function(p){if(p._inDocument=!1,p.session=null,p.el&&p.el.parentNode&&p.el.parentNode.removeChild(p.el),p.editor&&p.editor.destroy)try{p.editor.destroy()}catch{}if(this.session.lineWidgets){var g=this.session.lineWidgets[p.row];if(g==p)this.session.lineWidgets[p.row]=p.$oldWidget,p.$oldWidget&&this.onWidgetChanged(p.$oldWidget);else for(;g;){if(g.$oldWidget==p){g.$oldWidget=p.$oldWidget;break}g=g.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows()},_.prototype.getWidgetsAtRow=function(p){for(var g=this.session.lineWidgets,r=g&&g[p],a=[];r;)a.push(r),r=r.$oldWidget;return a},_.prototype.onWidgetChanged=function(p){this.session._changedWidgets.push(p),this.editor&&this.editor.renderer.updateFull()},_.prototype.measureWidgets=function(p,g){var r=this.session._changedWidgets,a=g.layerConfig;if(!(!r||!r.length)){for(var o=1/0,i=0;i<r.length;i++){var n=r[i];if(!(!n||!n.el)&&n.session==this.session){if(!n._inDocument){if(this.session.lineWidgets[n.row]!=n)continue;n._inDocument=!0,g.container.appendChild(n.el)}n.h=n.el.offsetHeight,n.fixedWidth||(n.w=n.el.offsetWidth,n.screenWidth=Math.ceil(n.w/a.characterWidth));var s=n.h/a.lineHeight;n.coverLine&&(s-=this.session.getRowLineCount(n.row),s<0&&(s=0)),n.rowCount!=s&&(n.rowCount=s,n.row<o&&(o=n.row))}}o!=1/0&&(this.session._emit("changeFold",{data:{start:{row:o}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},_.prototype.renderWidgets=function(p,g){var r=g.layerConfig,a=this.session.lineWidgets;if(a){for(var o=Math.min(this.firstRow,r.firstRow),i=Math.max(this.lastRow,r.lastRow,a.length);o>0&&!a[o];)o--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,g.$cursorLayer.config=r;for(var n=o;n<=i;n++){var s=a[n];if(!(!s||!s.el)){if(s.hidden){s.el.style.top=-100-(s.pixelHeight||0)+"px";continue}s._inDocument||(s._inDocument=!0,g.container.appendChild(s.el));var h=g.$cursorLayer.getPixelPosition({row:n,column:0},!0).top;s.coverLine||(h+=r.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=h-r.offset+"px";var m=s.coverGutter?0:g.gutterWidth;s.fixedWidth||(m-=g.scrollLeft),s.el.style.left=m+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=r.width+2*r.padding+"px"),s.fixedWidth?s.el.style.right=g.scrollBar.getWidth()+"px":s.el.style.right=""}}}},_}();l.LineWidgets=w}),ace.define("ace/apply_delta",["require","exports","module"],function(e,l,T){l.applyDelta=function(b,w,_){var p=w.start.row,g=w.start.column,r=b[p]||"";switch(w.action){case"insert":var a=w.lines;if(a.length===1)b[p]=r.substring(0,g)+w.lines[0]+r.substring(g);else{var o=[p,1].concat(w.lines);b.splice.apply(b,o),b[p]=r.substring(0,g)+b[p],b[p+w.lines.length-1]+=r.substring(g)}break;case"remove":var i=w.end.column,n=w.end.row;p===n?b[p]=r.substring(0,g)+r.substring(i):b.splice(p,n-p+1,r.substring(0,g)+b[n].substring(i));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,l,T){var b=e("./lib/oop"),w=e("./lib/event_emitter").EventEmitter,_=function(){function r(a,o,i){this.$onChange=this.onChange.bind(this),this.attach(a),typeof o!="number"?this.setPosition(o.row,o.column):this.setPosition(o,i)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var o=g(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(o.row,o.column,!0)}},r.prototype.setPosition=function(a,o,i){var n;if(i?n={row:a,column:o}:n=this.$clipPositionToDocument(a,o),!(this.row==n.row&&this.column==n.column)){var s={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:s,value:n})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(a,o){var i={};return a>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):a<0?(i.row=0,i.column=0):(i.row=a,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,o))),o<0&&(i.column=0),i},r}();_.prototype.$insertRight=!1,b.implement(_.prototype,w);function p(r,a,o){var i=o?r.column<=a.column:r.column<a.column;return r.row<a.row||r.row==a.row&&i}function g(r,a,o){var i=r.action=="insert",n=(i?1:-1)*(r.end.row-r.start.row),s=(i?1:-1)*(r.end.column-r.start.column),h=r.start,m=i?h:r.end;return p(a,h,o)?{row:a.row,column:a.column}:p(m,a,!o)?{row:a.row+n,column:a.column+(a.row==m.row?s:0)}:{row:h.row,column:h.column}}l.Anchor=_}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,l,T){var b=e("./lib/oop"),w=e("./apply_delta").applyDelta,_=e("./lib/event_emitter").EventEmitter,p=e("./range").Range,g=e("./anchor").Anchor,r=function(){function a(o){this.$lines=[""],o.length===0?this.$lines=[""]:Array.isArray(o)?this.insertMergedLines({row:0,column:0},o):this.insert({row:0,column:0},o)}return a.prototype.setValue=function(o){var i=this.getLength()-1;this.remove(new p(0,0,i,this.getLine(i).length)),this.insert({row:0,column:0},o||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(o,i){return new g(this,o,i)},a.prototype.$detectNewLine=function(o){var i=o.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=i?i[1]:`
186
- `,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
187
- `;case"unix":return`
188
- `;default:return this.$autoNewLine||`
189
- `}},a.prototype.setNewLineMode=function(o){this.$newLineMode!==o&&(this.$newLineMode=o,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(o){return o==`\r
190
- `||o=="\r"||o==`
191
- `},a.prototype.getLine=function(o){return this.$lines[o]||""},a.prototype.getLines=function(o,i){return this.$lines.slice(o,i+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(o){return this.getLinesForRange(o).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(o){var i;if(o.start.row===o.end.row)i=[this.getLine(o.start.row).substring(o.start.column,o.end.column)];else{i=this.getLines(o.start.row,o.end.row),i[0]=(i[0]||"").substring(o.start.column);var n=i.length-1;o.end.row-o.start.row==n&&(i[n]=i[n].substring(0,o.end.column))}return i},a.prototype.insertLines=function(o,i){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(o,i)},a.prototype.removeLines=function(o,i){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(o,i)},a.prototype.insertNewLine=function(o){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(o,["",""])},a.prototype.insert=function(o,i){return this.getLength()<=1&&this.$detectNewLine(i),this.insertMergedLines(o,this.$split(i))},a.prototype.insertInLine=function(o,i){var n=this.clippedPos(o.row,o.column),s=this.pos(o.row,o.column+i.length);return this.applyDelta({start:n,end:s,action:"insert",lines:[i]},!0),this.clonePos(s)},a.prototype.clippedPos=function(o,i){var n=this.getLength();o===void 0?o=n:o<0?o=0:o>=n&&(o=n-1,i=void 0);var s=this.getLine(o);return i==null&&(i=s.length),i=Math.min(Math.max(i,0),s.length),{row:o,column:i}},a.prototype.clonePos=function(o){return{row:o.row,column:o.column}},a.prototype.pos=function(o,i){return{row:o,column:i}},a.prototype.$clipPosition=function(o){var i=this.getLength();return o.row>=i?(o.row=Math.max(0,i-1),o.column=this.getLine(i-1).length):(o.row=Math.max(0,o.row),o.column=Math.min(Math.max(o.column,0),this.getLine(o.row).length)),o},a.prototype.insertFullLines=function(o,i){o=Math.min(Math.max(o,0),this.getLength());var n=0;o<this.getLength()?(i=i.concat([""]),n=0):(i=[""].concat(i),o--,n=this.$lines[o].length),this.insertMergedLines({row:o,column:n},i)},a.prototype.insertMergedLines=function(o,i){var n=this.clippedPos(o.row,o.column),s={row:n.row+i.length-1,column:(i.length==1?n.column:0)+i[i.length-1].length};return this.applyDelta({start:n,end:s,action:"insert",lines:i}),this.clonePos(s)},a.prototype.remove=function(o){var i=this.clippedPos(o.start.row,o.start.column),n=this.clippedPos(o.end.row,o.end.column);return this.applyDelta({start:i,end:n,action:"remove",lines:this.getLinesForRange({start:i,end:n})}),this.clonePos(i)},a.prototype.removeInLine=function(o,i,n){var s=this.clippedPos(o,i),h=this.clippedPos(o,n);return this.applyDelta({start:s,end:h,action:"remove",lines:this.getLinesForRange({start:s,end:h})},!0),this.clonePos(s)},a.prototype.removeFullLines=function(o,i){o=Math.min(Math.max(0,o),this.getLength()-1),i=Math.min(Math.max(0,i),this.getLength()-1);var n=i==this.getLength()-1&&o>0,s=i<this.getLength()-1,h=n?o-1:o,m=n?this.getLine(h).length:0,y=s?i+1:i,R=s?0:this.getLine(y).length,$=new p(h,m,y,R),C=this.$lines.slice(o,i+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),C},a.prototype.removeNewLine=function(o){o<this.getLength()-1&&o>=0&&this.applyDelta({start:this.pos(o,this.getLine(o).length),end:this.pos(o+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(o,i){if(o instanceof p||(o=p.fromPoints(o.start,o.end)),i.length===0&&o.isEmpty())return o.start;if(i==this.getTextRange(o))return o.end;this.remove(o);var n;return i?n=this.insert(o.start,i):n=o.start,n},a.prototype.applyDeltas=function(o){for(var i=0;i<o.length;i++)this.applyDelta(o[i])},a.prototype.revertDeltas=function(o){for(var i=o.length-1;i>=0;i--)this.revertDelta(o[i])},a.prototype.applyDelta=function(o,i){var n=o.action=="insert";(n?o.lines.length<=1&&!o.lines[0]:!p.comparePoints(o.start,o.end))||(n&&o.lines.length>2e4?this.$splitAndapplyLargeDelta(o,2e4):(w(this.$lines,o,i),this._signal("change",o)))},a.prototype.$safeApplyDelta=function(o){var i=this.$lines.length;(o.action=="remove"&&o.start.row<i&&o.end.row<i||o.action=="insert"&&o.start.row<=i)&&this.applyDelta(o)},a.prototype.$splitAndapplyLargeDelta=function(o,i){for(var n=o.lines,s=n.length-i+1,h=o.start.row,m=o.start.column,y=0,R=0;y<s;y=R){R+=i-1;var $=n.slice(y,R);$.push(""),this.applyDelta({start:this.pos(h+y,m),end:this.pos(h+R,m=0),action:o.action,lines:$},!0)}o.lines=n.slice(y),o.start.row=h+y,o.start.column=m,this.applyDelta(o,!0)},a.prototype.revertDelta=function(o){this.$safeApplyDelta({start:this.clonePos(o.start),end:this.clonePos(o.end),action:o.action=="insert"?"remove":"insert",lines:o.lines.slice()})},a.prototype.indexToPosition=function(o,i){for(var n=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,h=i||0,m=n.length;h<m;h++)if(o-=n[h].length+s,o<0)return{row:h,column:o+n[h].length+s};return{row:m-1,column:o+n[m-1].length+s}},a.prototype.positionToIndex=function(o,i){for(var n=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,h=0,m=Math.min(o.row,n.length),y=i||0;y<m;++y)h+=n[y].length+s;return h+o.column},a.prototype.$split=function(o){return o.split(/\r\n|\r|\n/)},a}();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",b.implement(r.prototype,_),l.Document=r}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,l,T){var b=e("./lib/oop"),w=e("./lib/event_emitter").EventEmitter,_=function(){function p(g,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=g;var a=this;this.$worker=function(){if(a.running){for(var o=new Date,i=a.currentLine,n=-1,s=a.doc,h=i;a.lines[i];)i++;var m=s.getLength(),y=0;for(a.running=!1;i<m;){a.$tokenizeRow(i),n=i;do i++;while(a.lines[i]);if(y++,y%5===0&&new Date-o>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=i,n==-1&&(n=i),h<=n&&a.fireUpdateEvent(h,n)}}}return p.prototype.setTokenizer=function(g){this.tokenizer=g,this.lines=[],this.states=[],this.start(0)},p.prototype.setDocument=function(g){this.doc=g,this.lines=[],this.states=[],this.stop()},p.prototype.fireUpdateEvent=function(g,r){var a={first:g,last:r};this._signal("update",{data:a})},p.prototype.start=function(g){this.currentLine=Math.min(g||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)},p.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},p.prototype.$updateOnChange=function(g){var r=g.start.row,a=g.end.row-r;if(a===0)this.lines[r]=null;else if(g.action=="remove")this.lines.splice(r,a+1,null),this.states.splice(r,a+1,null);else{var o=Array(a+1);o.unshift(r,1),this.lines.splice.apply(this.lines,o),this.states.splice.apply(this.states,o)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},p.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},p.prototype.getTokens=function(g){return this.lines[g]||this.$tokenizeRow(g)},p.prototype.getState=function(g){return this.currentLine==g&&this.$tokenizeRow(g),this.states[g]||"start"},p.prototype.$tokenizeRow=function(g){var r=this.doc.getLine(g),a=this.states[g-1],o=this.tokenizer.getLineTokens(r,a,g);return this.states[g]+""!=o.state+""?(this.states[g]=o.state,this.lines[g+1]=null,this.currentLine>g+1&&(this.currentLine=g+1)):this.currentLine==g&&(this.currentLine=g+1),this.lines[g]=o.tokens},p.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},p}();b.implement(_.prototype,w),l.BackgroundTokenizer=_}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,l,T){var b=e("./lib/lang"),w=e("./range").Range,_=function(){function p(g,r,a){a===void 0&&(a="text"),this.setRegexp(g),this.clazz=r,this.type=a,this.docLen=0}return p.prototype.setRegexp=function(g){this.regExp+""!=g+""&&(this.regExp=g,this.cache=[])},p.prototype.update=function(g,r,a,o){if(this.regExp){for(var i=o.firstRow,n=o.lastRow,s={},h=a.$editor.$search,m=h.$isMultilineSearch(a.$editor.getLastSearchOptions()),y=i;y<=n;y++){var R=this.cache[y];if(R==null||a.getValue().length!=this.docLen){if(m){R=[];var $=h.$multiLineForward(a,this.regExp,y,n);if($){var C=$.endRow<=n?$.endRow-1:n;C>y&&(y=C),R.push(new w($.startRow,$.startCol,$.endRow,$.endCol))}R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES))}else R=b.getMatchOffsets(a.getLine(y),this.regExp),R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES)),R=R.map(function(F){return new w(y,F.offset,y,F.offset+F.length)});this.cache[y]=R.length?R:""}if(R.length!==0)for(var v=R.length;v--;){var L=R[v].toScreenRange(a),I=L.toString();s[I]||(s[I]=!0,r.drawSingleLineMarker(g,L,this.clazz,o))}}this.docLen=a.getValue().length}},p}();_.prototype.MAX_RANGES=500,l.SearchHighlight=_}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,l,T){var b=function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(v){this.$session=v},C.prototype.add=function(v,L,I){if(!this.$fromUndo&&v!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),L===!1||!this.lastDeltas){this.lastDeltas=[];var F=this.$undoStack.length;F>this.$undoDepth-1&&this.$undoStack.splice(0,F-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),v.id=this.$rev=++this.$maxRev}(v.action=="remove"||v.action=="insert")&&(this.$lastDelta=v),this.lastDeltas.push(v)}},C.prototype.addSelection=function(v,L){this.selections.push({value:v,rev:L||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(v,L){L==null&&(L=this.$rev+1);for(var I=this.$undoStack,F=I.length;F--;){var E=I[F][0];if(E.id<=v)break;E.id<L&&(E.ignore=!0)}this.lastDeltas=null},C.prototype.getSelection=function(v,L){for(var I=this.selections,F=I.length;F--;){var E=I[F];if(E.rev<v)return L&&(E=I[F+1]),E}},C.prototype.getRevision=function(){return this.$rev},C.prototype.getDeltas=function(v,L){L==null&&(L=this.$rev+1);for(var I=this.$undoStack,F=null,E=0,U=I.length;U--;){var P=I[U][0];if(P.id<L&&!F&&(F=U+1),P.id<=v){E=U+1;break}}return I.slice(E,F)},C.prototype.getChangedRanges=function(v,L){L==null&&(L=this.$rev+1)},C.prototype.getChangedLines=function(v,L){L==null&&(L=this.$rev+1)},C.prototype.undo=function(v,L){this.lastDeltas=null;var I=this.$undoStack;if(w(I,I.length)){v||(v=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var F=I.pop(),E=null;return F&&(E=v.undoChanges(F,L),this.$redoStack.push(F),this.$syncRev()),this.$fromUndo=!1,E}},C.prototype.redo=function(v,L){if(this.lastDeltas=null,v||(v=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var I=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,I),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(U){U[0].id=++this.$maxRev},this)}var F=this.$redoStack.pop(),E=null;return F&&(E=v.redoChanges(F,L),this.$undoStack.push(F),this.$syncRev()),this.$fromUndo=!1,E},C.prototype.$syncRev=function(){var v=this.$undoStack,L=v[v.length-1],I=L&&L[0].id||0;this.$redoStackBaseRev=I,this.$rev=I},C.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=[]},C.prototype.canUndo=function(){return this.$undoStack.length>0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(v){v==null&&(v=this.$rev),this.mark=v},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(v){this.reset(),this.$undoStack=v.$undoStack,this.$redoStack=v.$redoStack},C.prototype.$prettyPrint=function(v){return v?a(v):a(this.$undoStack)+`
192
- ---
193
- `+a(this.$redoStack)},C}();b.prototype.hasUndo=b.prototype.canUndo,b.prototype.hasRedo=b.prototype.canRedo,b.prototype.isClean=b.prototype.isAtBookmark,b.prototype.markClean=b.prototype.bookmark;function w(C,v){for(var L=v;L--;){var I=C[L];if(I&&!I[0].ignore){for(;L<v-1;){var F=n(C[L],C[L+1]);C[L]=F[0],C[L+1]=F[1],L++}return!0}}}var _=e("./range").Range,p=_.comparePoints;_.comparePoints;function g(C){return{row:C.row,column:C.column}}function r(C){return{start:g(C.start),end:g(C.end),action:C.action,lines:C.lines.slice()}}function a(C){if(C=C||this,Array.isArray(C))return C.map(a).join(`
194
- `);var v="";return C.action?(v=C.action=="insert"?"+":"-",v+="["+C.lines+"]"):C.value&&(Array.isArray(C.value)?v=C.value.map(o).join(`
195
- `):v=o(C.value)),C.start&&(v+=o(C)),(C.id||C.rev)&&(v+=" ("+(C.id||C.rev)+")"),v}function o(C){return C.start.row+":"+C.start.column+"=>"+C.end.row+":"+C.end.column}function i(C,v){var L=C.action=="insert",I=v.action=="insert";if(L&&I)if(p(v.start,C.end)>=0)h(v,C,-1);else if(p(v.start,C.start)<=0)h(C,v,1);else return null;else if(L&&!I)if(p(v.start,C.end)>=0)h(v,C,-1);else if(p(v.end,C.start)<=0)h(C,v,-1);else return null;else if(!L&&I)if(p(v.start,C.start)>=0)h(v,C,1);else if(p(v.start,C.start)<=0)h(C,v,1);else return null;else if(!L&&!I)if(p(v.start,C.start)>=0)h(v,C,1);else if(p(v.end,C.start)<=0)h(C,v,-1);else return null;return[v,C]}function n(C,v){for(var L=C.length;L--;)for(var I=0;I<v.length;I++)if(!i(C[L],v[I])){for(;L<C.length;){for(;I--;)i(v[I],C[L]);I=v.length,L++}return[C,v]}return C.selectionBefore=v.selectionBefore=C.selectionAfter=v.selectionAfter=null,[v,C]}function s(C,v){var L=C.action=="insert",I=v.action=="insert";if(L&&I)p(C.start,v.start)<0?h(v,C,1):h(C,v,1);else if(L&&!I)p(C.start,v.end)>=0?h(C,v,-1):(p(C.start,v.start)<=0||h(C,_.fromPoints(v.start,C.start),-1),h(v,C,1));else if(!L&&I)p(v.start,C.end)>=0?h(v,C,-1):(p(v.start,C.start)<=0||h(v,_.fromPoints(C.start,v.start),-1),h(C,v,1));else if(!L&&!I)if(p(v.start,C.end)>=0)h(v,C,-1);else if(p(v.end,C.start)<=0)h(C,v,-1);else{var F,E;return p(C.start,v.start)<0&&(F=C,C=y(C,v.start)),p(C.end,v.end)>0&&(E=y(C,v.end)),m(v.end,C.start,C.end,-1),E&&!F&&(C.lines=E.lines,C.start=E.start,C.end=E.end,E=C),[v,F,E].filter(Boolean)}return[v,C]}function h(C,v,L){m(C.start,v.start,v.end,L),m(C.end,v.start,v.end,L)}function m(C,v,L,I){C.row==(I==1?v:L).row&&(C.column+=I*(L.column-v.column)),C.row+=I*(L.row-v.row)}function y(C,v){var L=C.lines,I=C.end;C.end=g(v);var F=C.end.row-C.start.row,E=L.splice(F,L.length),U=F?v.column:v.column-C.start.column;L.push(E[0].substring(0,U)),E[0]=E[0].substr(U);var P={start:g(v),end:I,lines:E,action:C.action};return P}function R(C,v){v=r(v);for(var L=C.length;L--;){for(var I=C[L],F=0;F<I.length;F++){var E=I[F],U=s(E,v);v=U[0],U.length!=2&&(U[2]?(I.splice(F+1,1,U[1],U[2]),F++):U[1]||(I.splice(F,1),F--))}I.length||C.splice(L,1)}return C}function $(C,v){for(var L=0;L<v.length;L++)for(var I=v[L],F=0;F<I.length;F++)R(C,I[F])}l.UndoManager=b}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,l,T){var b=e("../range").Range,w=function(){function _(p,g){this.foldData=p,Array.isArray(g)?this.folds=g:g=this.folds=[g];var r=g[g.length-1];this.range=new b(g[0].start.row,g[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return _.prototype.shiftRow=function(p){this.start.row+=p,this.end.row+=p,this.folds.forEach(function(g){g.start.row+=p,g.end.row+=p})},_.prototype.addFold=function(p){if(p.sameRow){if(p.start.row<this.startRow||p.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(p),this.folds.sort(function(g,r){return-g.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(p.start.row,p.start.column)>0?(this.end.row=p.end.row,this.end.column=p.end.column):this.range.compareStart(p.end.row,p.end.column)<0&&(this.start.row=p.start.row,this.start.column=p.start.column)}else if(p.start.row==this.end.row)this.folds.push(p),this.end.row=p.end.row,this.end.column=p.end.column;else if(p.end.row==this.start.row)this.folds.unshift(p),this.start.row=p.start.row,this.start.column=p.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");p.foldLine=this},_.prototype.containsRow=function(p){return p>=this.start.row&&p<=this.end.row},_.prototype.walk=function(p,g,r){var a=0,o=this.folds,i,n,s,h=!0;g==null&&(g=this.end.row,r=this.end.column);for(var m=0;m<o.length;m++){if(i=o[m],n=i.range.compareStart(g,r),n==-1){p(null,g,r,a,h);return}if(s=p(null,i.start.row,i.start.column,a,h),s=!s&&p(i.placeholder,i.start.row,i.start.column,a),s||n===0)return;h=!i.sameRow,a=i.end.column}p(null,g,r,a,h)},_.prototype.getNextFoldTo=function(p,g){for(var r,a,o=0;o<this.folds.length;o++){if(r=this.folds[o],a=r.range.compareEnd(p,g),a==-1)return{fold:r,kind:"after"};if(a===0)return{fold:r,kind:"inside"}}return null},_.prototype.addRemoveChars=function(p,g,r){var a=this.getNextFoldTo(p,g),o,i;if(a){if(o=a.fold,a.kind=="inside"&&o.start.column!=g&&o.start.row!=p)window.console&&window.console.log(p,g,o);else if(o.start.row==p){i=this.folds;var n=i.indexOf(o);for(n===0&&(this.start.column+=r),n;n<i.length;n++){if(o=i[n],o.start.column+=r,!o.sameRow)return;o.end.column+=r}this.end.column+=r}}},_.prototype.split=function(p,g){var r=this.getNextFoldTo(p,g);if(!r||r.kind=="inside")return null;var a=r.fold,o=this.folds,i=this.foldData,n=o.indexOf(a),s=o[n-1];this.end.row=s.end.row,this.end.column=s.end.column,o=o.splice(n,o.length-n);var h=new _(i,o);return i.splice(i.indexOf(this)+1,0,h),h},_.prototype.merge=function(p){for(var g=p.folds,r=0;r<g.length;r++)this.addFold(g[r]);var a=this.foldData;a.splice(a.indexOf(p),1)},_.prototype.toString=function(){var p=[this.range.toString()+": ["];return this.folds.forEach(function(g){p.push(" "+g.toString())}),p.push("]"),p.join(`
196
- `)},_.prototype.idxToPosition=function(p){for(var g=0,r=0;r<this.folds.length;r++){var a=this.folds[r];if(p-=a.start.column-g,p<0)return{row:a.start.row,column:a.start.column+p};if(p-=a.placeholder.length,p<0)return a.start;g=a.end.column}return{row:this.end.row,column:this.end.column+p}},_}();l.FoldLine=w}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,l,T){var b=e("./range").Range,w=b.comparePoints,_=function(){function p(){this.ranges=[],this.$bias=1}return p.prototype.pointIndex=function(g,r,a){for(var o=this.ranges,i=a||0;i<o.length;i++){var n=o[i],s=w(g,n.end);if(!(s>0)){var h=w(g,n.start);return s===0?r&&h!==0?-i-2:i:h>0||h===0&&!r?i:-i-1}}return-i-1},p.prototype.add=function(g){var r=!g.isEmpty(),a=this.pointIndex(g.start,r);a<0&&(a=-a-1);var o=this.pointIndex(g.end,r,a);return o<0?o=-o-1:o++,this.ranges.splice(a,o-a,g)},p.prototype.addList=function(g){for(var r=[],a=g.length;a--;)r.push.apply(r,this.add(g[a]));return r},p.prototype.substractPoint=function(g){var r=this.pointIndex(g);if(r>=0)return this.ranges.splice(r,1)},p.prototype.merge=function(){var g=[],r=this.ranges;r=r.sort(function(s,h){return w(s.start,h.start)});for(var a=r[0],o,i=1;i<r.length;i++){o=a,a=r[i];var n=w(o.end,a.start);n<0||n==0&&!o.isEmpty()&&!a.isEmpty()||(w(o.end,a.end)<0&&(o.end.row=a.end.row,o.end.column=a.end.column),r.splice(i,1),g.push(a),a=o,i--)}return this.ranges=r,g},p.prototype.contains=function(g,r){return this.pointIndex({row:g,column:r})>=0},p.prototype.containsPoint=function(g){return this.pointIndex(g)>=0},p.prototype.rangeAtPoint=function(g){var r=this.pointIndex(g);if(r>=0)return this.ranges[r]},p.prototype.clipRows=function(g,r){var a=this.ranges;if(a[0].start.row>r||a[a.length-1].start.row<g)return[];var o=this.pointIndex({row:g,column:0});o<0&&(o=-o-1);var i=this.pointIndex({row:r,column:0},o);i<0&&(i=-i-1);for(var n=[],s=o;s<i;s++)n.push(a[s]);return n},p.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},p.prototype.attach=function(g){this.session&&this.detach(),this.session=g,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},p.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},p.prototype.$onChange=function(g){for(var r=g.start,a=g.end,o=r.row,i=a.row,n=this.ranges,s=0,h=n.length;s<h;s++){var m=n[s];if(m.end.row>=o)break}if(g.action=="insert")for(var y=i-o,R=-r.column+a.column;s<h;s++){var m=n[s];if(m.start.row>o)break;if(m.start.row==o&&m.start.column>=r.column&&(m.start.column==r.column&&this.$bias<=0||(m.start.column+=R,m.start.row+=y)),m.end.row==o&&m.end.column>=r.column){if(m.end.column==r.column&&this.$bias<0)continue;m.end.column==r.column&&R>0&&s<h-1&&m.end.column>m.start.column&&m.end.column==n[s+1].start.column&&(m.end.column-=R),m.end.column+=R,m.end.row+=y}}else for(var y=o-i,R=r.column-a.column;s<h;s++){var m=n[s];if(m.start.row>i)break;m.end.row<i&&(o<m.end.row||o==m.end.row&&r.column<m.end.column)?(m.end.row=o,m.end.column=r.column):m.end.row==i?m.end.column<=a.column?(y||m.end.column>r.column)&&(m.end.column=r.column,m.end.row=r.row):(m.end.column+=R,m.end.row+=y):m.end.row>i&&(m.end.row+=y),m.start.row<i&&(o<m.start.row||o==m.start.row&&r.column<m.start.column)?(m.start.row=o,m.start.column=r.column):m.start.row==i?m.start.column<=a.column?(y||m.start.column>r.column)&&(m.start.column=r.column,m.start.row=r.row):(m.start.column+=R,m.start.row+=y):m.start.row>i&&(m.start.row+=y)}if(y!=0&&s<h)for(;s<h;s++){var m=n[s];m.start.row+=y,m.end.row+=y}},p}();_.prototype.comparePoints=w,l.RangeList=_}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,l,T){var b=this&&this.__extends||function(){var o=function(i,n){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,h){s.__proto__=h}||function(s,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(s[m]=h[m])},o(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");o(i,n);function s(){this.constructor=i}i.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),w=e("../range_list").RangeList,_=function(o){b(i,o);function i(n,s){var h=o.call(this)||this;return h.foldLine=null,h.placeholder=s,h.range=n,h.start=n.start,h.end=n.end,h.sameRow=n.start.row==n.end.row,h.subFolds=h.ranges=[],h}return i.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},i.prototype.setFoldLine=function(n){this.foldLine=n,this.subFolds.forEach(function(s){s.setFoldLine(n)})},i.prototype.clone=function(){var n=this.range.clone(),s=new i(n,this.placeholder);return this.subFolds.forEach(function(h){s.subFolds.push(h.clone())}),s.collapseChildren=this.collapseChildren,s},i.prototype.addSubFold=function(n){if(!this.range.isEqual(n)){g(n,this.start);for(var R=n.start.row,$=n.start.column,s=0,h=-1;s<this.subFolds.length&&(h=this.subFolds[s].range.compare(R,$),h==1);s++);var m=this.subFolds[s],y=0;if(h==0){if(m.range.containsRange(n))return m.addSubFold(n);y=1}for(var R=n.range.end.row,$=n.range.end.column,C=s,h=-1;C<this.subFolds.length&&(h=this.subFolds[C].range.compare(R,$),h==1);C++);h==0&&C++;for(var v=this.subFolds.splice(s,C-s,n),L=h==0?v.length-1:v.length,I=y;I<L;I++)n.addSubFold(v[I]);return n.setFoldLine(this.foldLine),n}},i.prototype.restoreRange=function(n){return a(n,this.start)},i}(w);function p(o,i){o.row-=i.row,o.row==0&&(o.column-=i.column)}function g(o,i){p(o.start,i),p(o.end,i)}function r(o,i){o.row==0&&(o.column+=i.column),o.row+=i.row}function a(o,i){r(o.start,i),r(o.end,i)}l.Fold=_}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(e,l,T){var b=e("../range").Range,w=e("./fold_line").FoldLine,_=e("./fold").Fold,p=e("../token_iterator").TokenIterator,g=e("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(a,o,i){var n=this.getFoldLine(a);if(!n)return null;for(var s=n.folds,h=0;h<s.length;h++){var m=s[h].range;if(m.contains(a,o)){if(i==1&&m.isEnd(a,o)&&!m.isEmpty())continue;if(i==-1&&m.isStart(a,o)&&!m.isEmpty())continue;return s[h]}}},this.getFoldsInRange=function(a){var o=a.start,i=a.end,n=this.$foldData,s=[];o.column+=1,i.column-=1;for(var h=0;h<n.length;h++){var m=n[h].range.compareRange(a);if(m!=2){if(m==-2)break;for(var y=n[h].folds,R=0;R<y.length;R++){var $=y[R];if(m=$.range.compareRange(a),m==-2)break;if(m==2)continue;if(m==42)break;s.push($)}}}return o.column-=1,i.column+=1,s},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var o=[];a.forEach(function(i){o=o.concat(this.getFoldsInRange(i))},this)}else var o=this.getFoldsInRange(a);return o},this.getAllFolds=function(){for(var a=[],o=this.$foldData,i=0;i<o.length;i++)for(var n=0;n<o[i].folds.length;n++)a.push(o[i].folds[n]);return a},this.getFoldStringAt=function(a,o,i,n){if(n=n||this.getFoldLine(a),!n)return null;for(var s={end:{column:0}},h,m,y=0;y<n.folds.length;y++){m=n.folds[y];var R=m.range.compareEnd(a,o);if(R==-1){h=this.getLine(m.start.row).substring(s.end.column,m.start.column);break}else if(R===0)return null;s=m}return h||(h=this.getLine(m.start.row).substring(s.end.column)),i==-1?h.substring(0,o-s.end.column):i==1?h.substring(o-s.end.column):h},this.getFoldLine=function(a,o){var i=this.$foldData,n=0;for(o&&(n=i.indexOf(o)),n==-1&&(n=0),n;n<i.length;n++){var s=i[n];if(s.start.row<=a&&s.end.row>=a)return s;if(s.end.row>a)return null}return null},this.getNextFoldLine=function(a,o){var i=this.$foldData,n=0;for(o&&(n=i.indexOf(o)),n==-1&&(n=0),n;n<i.length;n++){var s=i[n];if(s.end.row>=a)return s}return null},this.getFoldedRowCount=function(a,o){for(var i=this.$foldData,n=o-a+1,s=0;s<i.length;s++){var h=i[s],m=h.end.row,y=h.start.row;if(m>=o){y<o&&(y>=a?n-=o-y:n=0);break}else m>=a&&(y>=a?n-=m-y:n-=m-a+1)}return n},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(o,i){return o.start.row-i.start.row}),a},this.addFold=function(a,o){var i=this.$foldData,n=!1,s;a instanceof _?s=a:(s=new _(o,a),s.collapseChildren=o.collapseChildren),this.$clipRangeToDocument(s.range);var h=s.start.row,m=s.start.column,y=s.end.row,R=s.end.column,$=this.getFoldAt(h,m,1),C=this.getFoldAt(y,R,-1);if($&&C==$)return $.addSubFold(s);$&&!$.range.isStart(h,m)&&this.removeFold($),C&&!C.range.isEnd(y,R)&&this.removeFold(C);var v=this.getFoldsInRange(s.range);v.length>0&&(this.removeFolds(v),s.collapseChildren||v.forEach(function(E){s.addSubFold(E)}));for(var L=0;L<i.length;L++){var I=i[L];if(y==I.start.row){I.addFold(s),n=!0;break}else if(h==I.end.row){if(I.addFold(s),n=!0,!s.sameRow){var F=i[L+1];if(F&&F.start.row==y){I.merge(F);break}}break}else if(y<=I.start.row)break}return n||(I=this.$addFoldLine(new w(this.$foldData,s))),this.$useWrapMode?this.$updateWrapData(I.start.row,I.start.row):this.$updateRowLengthCache(I.start.row,I.start.row),this.$modified=!0,this._signal("changeFold",{data:s,action:"add"}),s},this.addFolds=function(a){a.forEach(function(o){this.addFold(o)},this)},this.removeFold=function(a){var o=a.foldLine,i=o.start.row,n=o.end.row,s=this.$foldData,h=o.folds;if(h.length==1)s.splice(s.indexOf(o),1);else if(o.range.isEnd(a.end.row,a.end.column))h.pop(),o.end.row=h[h.length-1].end.row,o.end.column=h[h.length-1].end.column;else if(o.range.isStart(a.start.row,a.start.column))h.shift(),o.start.row=h[0].start.row,o.start.column=h[0].start.column;else if(a.sameRow)h.splice(h.indexOf(a),1);else{var m=o.split(a.start.row,a.start.column);h=m.folds,h.shift(),m.start.row=h[0].start.row,m.start.column=h[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,n):this.$updateRowLengthCache(i,n)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var o=[],i=0;i<a.length;i++)o.push(a[i]);o.forEach(function(n){this.removeFold(n)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(o){a.restoreRange(o),this.addFold(o)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(o){this.expandFold(o)},this)},this.unfold=function(a,o){var i,n;if(a==null)i=new b(0,0,this.getLength(),0),o==null&&(o=!0);else if(typeof a=="number")i=new b(a,0,a,this.getLine(a).length);else if("row"in a)i=b.fromPoints(a,a);else{if(Array.isArray(a))return n=[],a.forEach(function(h){n=n.concat(this.unfold(h))},this),n;i=a}n=this.getFoldsInRangeList(i);for(var s=n;n.length==1&&b.comparePoints(n[0].start,i.start)<0&&b.comparePoints(n[0].end,i.end)>0;)this.expandFolds(n),n=this.getFoldsInRangeList(i);if(o!=!1?this.removeFolds(n):this.expandFolds(n),s.length)return s},this.isRowFolded=function(a,o){return!!this.getFoldLine(a,o)},this.getRowFoldEnd=function(a,o){var i=this.getFoldLine(a,o);return i?i.end.row:a},this.getRowFoldStart=function(a,o){var i=this.getFoldLine(a,o);return i?i.start.row:a},this.getFoldDisplayLine=function(a,o,i,n,s){n==null&&(n=a.start.row),s==null&&(s=0),o==null&&(o=a.end.row),i==null&&(i=this.getLine(o).length);var h=this.doc,m="";return a.walk(function(y,R,$,C){if(!(R<n)){if(R==n){if($<s)return;C=Math.max(s,C)}y!=null?m+=y:m+=h.getLine(R).substring(C,$)}},o,i),m},this.getDisplayLine=function(a,o,i,n){var s=this.getFoldLine(a);if(s)return this.getFoldDisplayLine(s,a,o,i,n);var h;return h=this.doc.getLine(a),h.substring(n||0,o||h.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(o){var i=o.folds.map(function(n){return n.clone()});return new w(a,i)}),a},this.toggleFold=function(a){var o=this.selection,i=o.getRange(),n,s;if(i.isEmpty()){var h=i.start;if(n=this.getFoldAt(h.row,h.column),n){this.expandFold(n);return}else(s=this.findMatchingBracket(h))?i.comparePoint(s)==1?i.end=s:(i.start=s,i.start.column++,i.end.column--):(s=this.findMatchingBracket({row:h.row,column:h.column+1}))?(i.comparePoint(s)==1?i.end=s:i.start=s,i.start.column++):i=this.getCommentFoldRange(h.row,h.column)||i}else{var m=this.getFoldsInRange(i);if(a&&m.length){this.expandFolds(m);return}else m.length==1&&(n=m[0])}if(n||(n=this.getFoldAt(i.start.row,i.start.column)),n&&n.range.toString()==i.toString()){this.expandFold(n);return}var y="...";if(!i.isMultiLine()){if(y=this.getTextRange(i),y.length<4)return;y=y.trim().substring(0,2)+".."}this.addFold(y,i)},this.getCommentFoldRange=function(a,o,i){var n=new p(this,a,o),s=n.getCurrentToken(),h=s&&s.type;if(s&&/^comment|string/.test(h)){h=h.match(/comment|string/)[0],h=="comment"&&(h+="|doc-start|\\.doc");var m=new RegExp(h),y=new b;if(i!=1){do s=n.stepBackward();while(s&&m.test(s.type));s=n.stepForward()}y.start.row=n.getCurrentTokenRow(),y.start.column=n.getCurrentTokenColumn()+s.value.length,n=new p(this,a,o);var R=this.getState(n.$row);if(i!=-1){var $=-1;do if(s=n.stepForward(),$==-1){var C=this.getState(n.$row);R.toString()!==C.toString()&&($=n.$row)}else if(n.$row>$)break;while(s&&m.test(s.type));s=n.stepBackward()}else s=n.getCurrentToken();return y.end.row=n.getCurrentTokenRow(),y.end.column=n.getCurrentTokenColumn(),y}},this.foldAll=function(a,o,i,n){i==null&&(i=1e5);var s=this.foldWidgets;if(s){o=o||this.getLength(),a=a||0;for(var h=a;h<o;h++)if(s[h]==null&&(s[h]=this.getFoldWidget(h)),s[h]=="start"&&!(n&&!n(h))){var m=this.getFoldWidgetRange(h);m&&m.isMultiLine()&&m.end.row<=o&&m.start.row>=a&&(h=m.end.row,m.collapseChildren=i,this.addFold("...",m))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(o){for(var i=a.getTokens(o),n=0;n<i.length;n++){var s=i[n];if(!(s.type=="text"&&/^\s+$/.test(s.value)))return!!/comment/.test(s.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var o=this.$foldMode;this.$setFolding(null),this.$setFolding(o)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,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(a,o){var i=this.foldWidgets;if(!i||o&&i[a])return{};for(var n=a-1,s;n>=0;){var h=i[n];if(h==null&&(h=i[n]=this.getFoldWidget(n)),h=="start"){var m=this.getFoldWidgetRange(n);if(s||(s=m),m&&m.end.row>=a)break}n--}return{range:n!==-1&&m,firstRange:s}},this.onFoldWidgetClick=function(a,o){o instanceof g&&(o=o.domEvent);var i={children:o.shiftKey,all:o.ctrlKey||o.metaKey,siblings:o.altKey},n=this.$toggleFoldWidget(a,i);if(!n){var s=o.target||o.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,o){if(this.getFoldWidget){var i=this.getFoldWidget(a),n=this.getLine(a),s=i==="end"?-1:1,h=this.getFoldAt(a,s===-1?0:n.length,s);if(h)return o.children||o.all?this.removeFold(h):this.expandFold(h),h;var m=this.getFoldWidgetRange(a,!0);if(m&&!m.isMultiLine()&&(h=this.getFoldAt(m.start.row,m.start.column,1),h&&m.isEqual(h.range)))return this.removeFold(h),h;if(o.siblings){var y=this.getParentFoldRangeData(a);if(y.range)var R=y.range.start.row+1,$=y.range.end.row;this.foldAll(R,$,o.all?1e4:0)}else o.children?($=m?m.end.row:this.getLength(),this.foldAll(a+1,$,o.all?1e4:0)):m&&(o.all&&(m.collapseChildren=1e4),this.addFold("...",m));return m}},this.toggleFoldWidget=function(a){var o=this.selection.getCursor().row;o=this.getRowFoldStart(o);var i=this.$toggleFoldWidget(o,{});if(!i){var n=this.getParentFoldRangeData(o,!0);if(i=n.range||n.firstRange,i){o=i.start.row;var s=this.getFoldAt(o,this.getLine(o).length,1);s?this.removeFold(s):this.addFold("...",i)}}},this.updateFoldWidgets=function(a){var o=a.start.row,i=a.end.row-o;if(i===0)this.foldWidgets[o]=null;else if(a.action=="remove")this.foldWidgets.splice(o,i+1,null);else{var n=Array(i+1);n.unshift(o,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(a){var o=a.data;o.first!=o.last&&this.foldWidgets.length>o.first&&this.foldWidgets.splice(o.first,this.foldWidgets.length)}}l.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,l,T){var b=e("../token_iterator").TokenIterator,w=e("../range").Range;function _(){this.findMatchingBracket=function(p,g){if(p.column==0)return null;var r=g||this.getLine(p.row).charAt(p.column-1);if(r=="")return null;var a=r.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],p):this.$findOpeningBracket(a[2],p):null},this.getBracketRange=function(p){var g=this.getLine(p.row),r=!0,a,o=g.charAt(p.column-1),i=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(i||(o=g.charAt(p.column),p={row:p.row,column:p.column+1},i=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!i)return null;if(i[1]){var n=this.$findClosingBracket(i[1],p);if(!n)return null;a=w.fromPoints(p,n),r||(a.end.column++,a.start.column--),a.cursor=a.end}else{var n=this.$findOpeningBracket(i[2],p);if(!n)return null;a=w.fromPoints(n,p),r||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(p,g){var r=this.getLine(p.row),a=/([\(\[\{])|([\)\]\}])/,o=!g&&r.charAt(p.column-1),i=o&&o.match(a);if(i||(o=(g===void 0||g)&&r.charAt(p.column),p={row:p.row,column:p.column+1},i=o&&o.match(a)),!i)return null;var n=new w(p.row,p.column-1,p.row,p.column),s=i[1]?this.$findClosingBracket(i[1],p):this.$findOpeningBracket(i[2],p);if(!s)return[n];var h=new w(s.row,s.column,s.row,s.column+1);return[n,h]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(p,g,r){var a=this.$brackets[p],o=1,i=new b(this,g.row,g.column),n=i.getCurrentToken();if(n||(n=i.stepForward()),!!n){r||(r=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var s=g.column-i.getCurrentTokenColumn()-2,h=n.value;;){for(;s>=0;){var m=h.charAt(s);if(m==a){if(o-=1,o==0)return{row:i.getCurrentTokenRow(),column:s+i.getCurrentTokenColumn()}}else m==p&&(o+=1);s-=1}do n=i.stepBackward();while(n&&!r.test(n.type));if(n==null)break;h=n.value,s=h.length-1}return null}},this.$findClosingBracket=function(p,g,r){var a=this.$brackets[p],o=1,i=new b(this,g.row,g.column),n=i.getCurrentToken();if(n||(n=i.stepForward()),!!n){r||(r=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var s=g.column-i.getCurrentTokenColumn();;){for(var h=n.value,m=h.length;s<m;){var y=h.charAt(s);if(y==a){if(o-=1,o==0)return{row:i.getCurrentTokenRow(),column:s+i.getCurrentTokenColumn()}}else y==p&&(o+=1);s+=1}do n=i.stepForward();while(n&&!r.test(n.type));if(n==null)break;s=0}return null}},this.getMatchingTags=function(p){var g=new b(this,p.row,p.column),r=this.$findTagName(g);if(r){var a=g.stepBackward();return a.value==="<"?this.$findClosingTag(g,r):this.$findOpeningTag(g,r)}},this.$findTagName=function(p){var g=p.getCurrentToken(),r=!1,a=!1;if(g&&g.type.indexOf("tag-name")===-1)do a?g=p.stepBackward():g=p.stepForward(),g&&(g.value==="/>"?a=!0:g.type.indexOf("tag-name")!==-1&&(r=!0));while(g&&!r);return g},this.$findClosingTag=function(p,g){var r,a=g.value,o=g.value,i=0,n=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);g=p.stepForward();var s=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+g.value.length),h=!1;do{if(r=g,r.type.indexOf("tag-close")!==-1&&!h){var m=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);h=!0}if(g=p.stepForward(),g){if(g.value===">"&&!h){var m=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);h=!0}if(g.type.indexOf("tag-name")!==-1){if(a=g.value,o===a){if(r.value==="<")i++;else if(r.value==="</"&&(i--,i<0)){p.stepBackward();var y=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+2);g=p.stepForward();var R=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=p.stepForward()),g&&g.value===">")var $=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);else return}}}else if(o===a&&g.value==="/>"&&(i--,i<0))var y=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+2),R=y,$=R,m=new w(s.end.row,s.end.column,s.end.row,s.end.column+1)}}while(g&&i>=0);if(n&&m&&y&&$&&s&&R)return{openTag:new w(n.start.row,n.start.column,m.end.row,m.end.column),closeTag:new w(y.start.row,y.start.column,$.end.row,$.end.column),openTagName:s,closeTagName:R}},this.$findOpeningTag=function(p,g){var r=p.getCurrentToken(),a=g.value,o=0,i=p.getCurrentTokenRow(),n=p.getCurrentTokenColumn(),s=n+2,h=new w(i,n,i,s);p.stepForward();var m=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=p.stepForward()),!(!g||g.value!==">")){var y=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);p.stepBackward(),p.stepBackward();do if(g=r,i=p.getCurrentTokenRow(),n=p.getCurrentTokenColumn(),s=n+g.value.length,r=p.stepBackward(),g){if(g.type.indexOf("tag-name")!==-1){if(a===g.value)if(r.value==="<"){if(o++,o>0){var R=new w(i,n,i,s),$=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);do g=p.stepForward();while(g&&g.value!==">");var C=new w(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1)}}else r.value==="</"&&o--}else if(g.value==="/>"){for(var v=0,L=r;L;){if(L.type.indexOf("tag-name")!==-1&&L.value===a){o--;break}else if(L.value==="<")break;L=p.stepBackward(),v++}for(var I=0;I<v;I++)p.stepForward()}}while(r&&o<=0);if($&&C&&h&&y&&R&&m)return{openTag:new w($.start.row,$.start.column,C.end.row,C.end.column),closeTag:new w(h.start.row,h.start.column,y.end.row,y.end.column),openTagName:R,closeTagName:m}}}}l.BracketMatch=_}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,l,T){var b=e("./lib/oop"),w=e("./lib/lang"),_=e("./bidihandler").BidiHandler,p=e("./config"),g=e("./lib/event_emitter").EventEmitter,r=e("./selection").Selection,a=e("./mode/text").Mode,o=e("./range").Range,i=e("./line_widgets").LineWidgets,n=e("./document").Document,s=e("./background_tokenizer").BackgroundTokenizer,h=e("./search_highlight").SearchHighlight,m=e("./undomanager").UndoManager,y=function(){function P(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"+ ++P.$uid,this.$foldData.toString=function(){return this.join(`
197
- `)},this.bgTokenizer=new s(new a().getTokenizer(),this);var k=this;this.bgTokenizer.on("update",function(N){k._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new n(O)),this.setDocument(O),this.selection=new r(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new _(this),p.resetOptions(this),this.setMode(S),p._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return P.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))},P.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)},P.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)}},P.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()},P.prototype.getDocument=function(){return this.doc},Object.defineProperty(P.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}),P.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var S=this.$docRowCache.length,k=this.$getRowCacheIndex(this.$docRowCache,O)+1;S>k&&(this.$docRowCache.splice(k,S),this.$screenRowCache.splice(k,S))},P.prototype.$getRowCacheIndex=function(O,S){for(var k=0,N=O.length-1;k<=N;){var W=k+N>>1,V=O[W];if(S>V)k=W+1;else if(S<V)N=W-1;else return W}return k-1},P.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},P.prototype.onChangeFold=function(O){var S=O.data;this.$resetRowCache(S.start.row)},P.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)},P.prototype.onSelectionChange=function(){this._signal("changeSelection")},P.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},P.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var S=new m;S.$undoStack=O.history.undo,S.$redoStack=O.history.redo,S.mark=O.history.mark,S.$rev=O.history.rev;var k=new P(O.value);return O.folds.forEach(function(N){k.addFold("...",o.fromPoints(N.start,N.end))}),k.setAnnotations(O.annotations),k.setBreakpoints(O.breakpoints),k.setMode(O.mode),k.setScrollLeft(O.scrollLeft),k.setScrollTop(O.scrollTop),k.setUndoManager(S),k.selection.fromJSON(O.selection),k},P.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()}},P.prototype.toString=function(){return this.doc.getValue()},P.prototype.getSelection=function(){return this.selection},P.prototype.getState=function(O){return this.bgTokenizer.getState(O)},P.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},P.prototype.getTokenAt=function(O,S){var k=this.bgTokenizer.getTokens(O),N,W=0;if(S==null){var V=k.length-1;W=this.getLine(O).length}else for(var V=0;V<k.length&&(W+=k[V].value.length,!(W>=S));V++);return N=k[V],N?(N.index=V,N.start=W-N.value.length,N):null},P.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(){}},P.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},P.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},P.prototype.getTabString=function(){return this.getUseSoftTabs()?w.stringRepeat(" ",this.getTabSize()):" "},P.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},P.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},P.prototype.setTabSize=function(O){this.setOption("tabSize",O)},P.prototype.getTabSize=function(){return this.$tabSize},P.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},P.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},P.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},P.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},P.prototype.getOverwrite=function(){return this.$overwrite},P.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},P.prototype.addGutterDecoration=function(O,S){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+S,this._signal("changeBreakpoint",{})},P.prototype.removeGutterDecoration=function(O,S){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+S,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var S=0;S<O.length;S++)this.$breakpoints[O[S]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,S){S===void 0&&(S="ace_breakpoint"),S?this.$breakpoints[O]=S:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(O,S,k,N){var W=this.$markerId++,V={range:O,type:k||"line",renderer:typeof k=="function"?k:null,clazz:S,inFront:!!N,id:W};return N?(this.$frontMarkers[W]=V,this._signal("changeFrontMarker")):(this.$backMarkers[W]=V,this._signal("changeBackMarker")),W},P.prototype.addDynamicMarker=function(O,S){if(O.update){var k=this.$markerId++;return O.id=k,O.inFront=!!S,S?(this.$frontMarkers[k]=O,this._signal("changeFrontMarker")):(this.$backMarkers[k]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var S=this.$frontMarkers[O]||this.$backMarkers[O];if(S){var k=S.inFront?this.$frontMarkers:this.$backMarkers;delete k[O],this._signal(S.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var S=new h(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(S)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,S,k,N){typeof S!="number"&&(k=S,S=O),k||(k="ace_step");var W=new o(O,0,S,1/0);return W.id=this.addMarker(W,k,"fullLine",N),W},P.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},P.prototype.getAnnotations=function(){return this.$annotations||[]},P.prototype.clearAnnotations=function(){this.setAnnotations([])},P.prototype.$detectNewLine=function(O){var S=O.match(/^.*?(\r?\n)/m);S?this.$autoNewLine=S[1]:this.$autoNewLine=`
198
- `},P.prototype.getWordRange=function(O,S){var k=this.getLine(O),N=!1;if(S>0&&(N=!!k.charAt(S-1).match(this.tokenRe)),N||(N=!!k.charAt(S).match(this.tokenRe)),N)var W=this.tokenRe;else if(/^\s+$/.test(k.slice(S-1,S+1)))var W=/\s/;else var W=this.nonTokenRe;var V=S;if(V>0){do V--;while(V>=0&&k.charAt(V).match(W));V++}for(var G=S;G<k.length&&k.charAt(G).match(W);)G++;return new o(O,V,O,G)},P.prototype.getAWordRange=function(O,S){for(var k=this.getWordRange(O,S),N=this.getLine(k.end.row);N.charAt(k.end.column).match(/[ \t]/);)k.end.column+=1;return k},P.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},P.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},P.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},P.prototype.getUseWorker=function(){return this.$useWorker},P.prototype.onReloadTokenizer=function(O){var S=O.data;this.bgTokenizer.start(S.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,S){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var k=O,N=k.path}else N=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[N]&&!k){this.$onChangeMode(this.$modes[N]),S&&S();return}this.$modeId=N,p.loadModule(["mode",N],(function(W){if(!this.destroyed){if(this.$modeId!==N)return S&&S();this.$modes[N]&&!k?this.$onChangeMode(this.$modes[N]):W&&W.Mode&&(W=new W.Mode(k),k||(this.$modes[N]=W,W.$id=N),this.$onChangeMode(W)),S&&S()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,S){if(S||(this.$modeId=O.$id),this.$mode!==O){var k=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=O.getTokenizer();if(N.on!==void 0){var W=this.onReloadTokenizer.bind(this);N.on("update",W)}this.bgTokenizer.setTokenizer(N),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:k,mode:O}))}},P.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},P.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){p.warn("Could not load worker",O),this.$worker=null}},P.prototype.getMode=function(){return this.$mode},P.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},P.prototype.getScrollTop=function(){return this.$scrollTop},P.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},P.prototype.getScrollLeft=function(){return this.$scrollLeft},P.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},P.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},P.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(),k=this.$rowLengthCache,N=0,W=0,V=this.$foldData[W],G=V?V.start.row:1/0,Q=S.length,te=0;te<Q;te++){if(te>G){if(te=V.end.row+1,te>=Q)break;V=this.$foldData[W++],G=V?V.start.row:1/0}k[te]==null&&(k[te]=this.$getStringScreenWidth(S[te])[0]),k[te]>N&&(N=k[te])}this.screenWidth=N}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,S){return this.doc.getLines(O,S)},P.prototype.getLength=function(){return this.doc.getLength()},P.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},P.prototype.insert=function(O,S){return this.doc.insert(O,S)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,S){return this.doc.removeFullLines(O,S)},P.prototype.undoChanges=function(O,S){if(O.length){this.$fromUndo=!0;for(var k=O.length-1;k!=-1;k--){var N=O[k];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!S&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,S){if(O.length){this.$fromUndo=!0;for(var k=0;k<O.length;k++){var N=O[k];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!S&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},P.prototype.setUndoSelect=function(O){this.$undoSelect=O},P.prototype.$getUndoSelection=function(O,S){function k(Q){return S?Q.action!=="insert":Q.action==="insert"}for(var N,W,V=0;V<O.length;V++){var G=O[V];if(G.start){if(!N){k(G)?N=o.fromPoints(G.start,G.end):N=o.fromPoints(G.start,G.start);continue}k(G)?(W=G.start,N.compare(W.row,W.column)==-1&&N.setStart(W),W=G.end,N.compare(W.row,W.column)==1&&N.setEnd(W)):(W=G.start,N.compare(W.row,W.column)==-1&&(N=o.fromPoints(G.start,G.start)))}}return N},P.prototype.replace=function(O,S){return this.doc.replace(O,S)},P.prototype.moveText=function(O,S,k){var N=this.getTextRange(O),W=this.getFoldsInRange(O),V=o.fromPoints(S,S);if(!k){this.remove(O);var G=O.start.row-O.end.row,Q=G?-O.end.column:O.start.column-O.end.column;Q&&(V.start.row==O.end.row&&V.start.column>O.end.column&&(V.start.column+=Q),V.end.row==O.end.row&&V.end.column>O.end.column&&(V.end.column+=Q)),G&&V.start.row>=O.end.row&&(V.start.row+=G,V.end.row+=G)}if(V.end=this.insert(V.start,N),W.length){var te=O.start,he=V.start,G=he.row-te.row,Q=he.column-te.column;this.addFolds(W.map(function(le){return le=le.clone(),le.start.row==te.row&&(le.start.column+=Q),le.end.row==te.row&&(le.end.column+=Q),le.start.row+=G,le.end.row+=G,le}))}return V},P.prototype.indentRows=function(O,S,k){k=k.replace(/\t/g,this.getTabString());for(var N=O;N<=S;N++)this.doc.insertInLine({row:N,column:0},k)},P.prototype.outdentRows=function(O){for(var S=O.collapseRows(),k=new o(0,0,0,0),N=this.getTabSize(),W=S.start.row;W<=S.end.row;++W){var V=this.getLine(W);k.start.row=W,k.end.row=W;for(var G=0;G<N&&V.charAt(G)==" ";++G);G<N&&V.charAt(G)==" "?(k.start.column=G,k.end.column=G+1):(k.start.column=0,k.end.column=G),this.remove(k)}},P.prototype.$moveLines=function(O,S,k){if(O=this.getRowFoldStart(O),S=this.getRowFoldEnd(S),k<0){var N=this.getRowFoldStart(O+k);if(N<0)return 0;var W=N-O}else if(k>0){var N=this.getRowFoldEnd(S+k);if(N>this.doc.getLength()-1)return 0;var W=N-S}else{O=this.$clipRowToDocument(O),S=this.$clipRowToDocument(S);var W=S-O+1}var V=new o(O,0,S,Number.MAX_VALUE),G=this.getFoldsInRange(V).map(function(te){return te=te.clone(),te.start.row+=W,te.end.row+=W,te}),Q=k==0?this.doc.getLines(O,S):this.doc.removeFullLines(O,S);return this.doc.insertFullLines(O+W,Q),G.length&&this.addFolds(G),W},P.prototype.moveLinesUp=function(O,S){return this.$moveLines(O,S,-1)},P.prototype.moveLinesDown=function(O,S){return this.$moveLines(O,S,1)},P.prototype.duplicateLines=function(O,S){return this.$moveLines(O,S,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,S){return S<0?0:Math.min(this.doc.getLine(O).length,S)},P.prototype.$clipPositionToDocument=function(O,S){if(S=Math.max(0,S),O<0)O=0,S=0;else{var k=this.doc.getLength();O>=k?(O=k-1,S=this.doc.getLine(k-1).length):S=Math.min(this.doc.getLine(O).length,S)}return{row:O,column:S}},P.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},P.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")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.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"))},P.prototype.adjustWrapLimit=function(O,S){var k=this.$wrapLimitRange;k.max<0&&(k={min:S,max:S});var N=this.$constrainWrapLimit(O,k.min,k.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},P.prototype.$constrainWrapLimit=function(O,S,k){return S&&(O=Math.max(S,O)),k&&(O=Math.min(k,O)),O},P.prototype.getWrapLimit=function(){return this.$wrapLimit},P.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},P.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},P.prototype.$updateInternalDataOnChange=function(O){var S=this.$useWrapMode,k=O.action,N=O.start,W=O.end,V=N.row,G=W.row,Q=G-V,te=null;if(this.$updating=!0,Q!=0)if(k==="remove"){this[S?"$wrapData":"$rowLengthCache"].splice(V,Q);var he=this.$foldData;te=this.getFoldsInRange(O),this.removeFolds(te);var ne=this.getFoldLine(W.row),ue=0;if(ne){ne.addRemoveChars(W.row,W.column,N.column-W.column),ne.shiftRow(-Q);var le=this.getFoldLine(V);le&&le!==ne&&(le.merge(ne),ne=le),ue=he.indexOf(ne)+1}for(ue;ue<he.length;ue++){var ne=he[ue];ne.start.row>=W.row&&ne.shiftRow(-Q)}G=V}else{var ce=Array(Q);ce.unshift(V,0);var ve=S?this.$wrapData:this.$rowLengthCache;ve.splice.apply(ve,ce);var he=this.$foldData,ne=this.getFoldLine(V),ue=0;if(ne){var Ce=ne.range.compareInside(N.row,N.column);Ce==0?(ne=ne.split(N.row,N.column),ne&&(ne.shiftRow(Q),ne.addRemoveChars(G,0,W.column-N.column))):Ce==-1&&(ne.addRemoveChars(V,0,W.column-N.column),ne.shiftRow(Q)),ue=he.indexOf(ne)+1}for(ue;ue<he.length;ue++){var ne=he[ue];ne.start.row>=V&&ne.shiftRow(Q)}}else{Q=Math.abs(O.start.column-O.end.column),k==="remove"&&(te=this.getFoldsInRange(O),this.removeFolds(te),Q=-Q);var ne=this.getFoldLine(V);ne&&ne.addRemoveChars(V,N.column,Q)}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(V,G):this.$updateRowLengthCache(V,G),te},P.prototype.$updateRowLengthCache=function(O,S){this.$rowLengthCache[O]=null,this.$rowLengthCache[S]=null},P.prototype.$updateWrapData=function(O,S){var k=this.doc.getAllLines(),N=this.getTabSize(),W=this.$wrapData,V=this.$wrapLimit,G,Q,te=O;for(S=Math.min(S,k.length-1);te<=S;)Q=this.getFoldLine(te,Q),Q?(G=[],Q.walk((function(he,ne,ue,le){var ce;if(he!=null){ce=this.$getDisplayTokens(he,G.length),ce[0]=C;for(var ve=1;ve<ce.length;ve++)ce[ve]=v}else ce=this.$getDisplayTokens(k[ne].substring(le,ue),G.length);G=G.concat(ce)}).bind(this),Q.end.row,k[Q.end.row].length+1),W[Q.start.row]=this.$computeWrapSplits(G,V,N),te=Q.end.row+1):(G=this.$getDisplayTokens(k[te]),W[te]=this.$computeWrapSplits(G,V,N),te++)},P.prototype.$computeWrapSplits=function(O,S,k){if(O.length==0)return[];var N=[],W=O.length,V=0,G=0,Q=this.$wrapAsCode,te=this.$indentedSoftWrap,he=S<=Math.max(2*k,8)||te===!1?0:Math.floor(S/2);function ne(){var Ce=0;if(he===0)return Ce;if(te)for(var $e=0;$e<O.length;$e++){var Te=O[$e];if(Te==I)Ce+=1;else if(Te==F)Ce+=k;else{if(Te==E)continue;break}}return Q&&te!==!1&&(Ce+=k),Math.min(Ce,he)}function ue(Ce){for(var $e=Ce-V,Te=V;Te<Ce;Te++){var qe=O[Te];(qe===12||qe===2)&&($e-=1)}N.length||(le=ne(),N.indent=le),G+=$e,N.push(G),V=Ce}for(var le=0;W-V>S-le;){var ce=V+S-le;if(O[ce-1]>=I&&O[ce]>=I){ue(ce);continue}if(O[ce]==C||O[ce]==v){for(ce;ce!=V-1&&O[ce]!=C;ce--);if(ce>V){ue(ce);continue}for(ce=V+S,ce;ce<O.length&&O[ce]==v;ce++);if(ce==O.length)break;ue(ce);continue}for(var ve=Math.max(ce-(S-(S>>2)),V-1);ce>ve&&O[ce]<C;)ce--;if(Q){for(;ce>ve&&O[ce]<C;)ce--;for(;ce>ve&&O[ce]==L;)ce--}else for(;ce>ve&&O[ce]<I;)ce--;if(ce>ve){ue(++ce);continue}ce=V+S,O[ce]==$&&ce--,ue(ce-le)}return N},P.prototype.$getDisplayTokens=function(O,S){var k=[],N;S=S||0;for(var W=0;W<O.length;W++){var V=O.charCodeAt(W);if(V==9){N=this.getScreenTabSize(k.length+S),k.push(F);for(var G=1;G<N;G++)k.push(E)}else V==32?k.push(I):V>39&&V<48||V>57&&V<64?k.push(L):V>=4352&&U(V)?k.push(R,$):k.push(R)}return k},P.prototype.$getStringScreenWidth=function(O,S,k){if(S==0)return[0,0];S==null&&(S=1/0),k=k||0;var N,W;for(W=0;W<O.length&&(N=O.charCodeAt(W),N==9?k+=this.getScreenTabSize(k):N>=4352&&U(N)?k+=2:k+=1,!(k>S));W++);return[k,W]},P.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},P.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},P.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var S=this.screenToDocumentPosition(O,Number.MAX_VALUE),k=this.$wrapData[S.row];return k.length&&k[0]<S.column?k.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var S=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(S.row,S.column)},P.prototype.getDocumentLastRowColumn=function(O,S){var k=this.documentToScreenRow(O,S);return this.getScreenLastRowColumn(k)},P.prototype.getDocumentLastRowColumnPosition=function(O,S){var k=this.documentToScreenRow(O,S);return this.screenToDocumentPosition(k,Number.MAX_VALUE/10)},P.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},P.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},P.prototype.screenToDocumentRow=function(O,S){return this.screenToDocumentPosition(O,S).row},P.prototype.screenToDocumentColumn=function(O,S){return this.screenToDocumentPosition(O,S).column},P.prototype.screenToDocumentPosition=function(O,S,k){if(O<0)return{row:0,column:0};var N,W=0,V=0,G,Q=0,te=0,he=this.$screenRowCache,ne=this.$getRowCacheIndex(he,O),ue=he.length;if(ue&&ne>=0)var Q=he[ne],W=this.$docRowCache[ne],le=O>he[ue-1];else var le=!ue;for(var ce=this.getLength()-1,ve=this.getNextFoldLine(W),Ce=ve?ve.start.row:1/0;Q<=O&&(te=this.getRowLength(W),!(Q+te>O||W>=ce));)Q+=te,W++,W>Ce&&(W=ve.end.row+1,ve=this.getNextFoldLine(W,ve),Ce=ve?ve.start.row:1/0),le&&(this.$docRowCache.push(W),this.$screenRowCache.push(Q));if(ve&&ve.start.row<=W)N=this.getFoldDisplayLine(ve),W=ve.start.row;else{if(Q+te<=O||W>ce)return{row:ce,column:this.getLine(ce).length};N=this.getLine(W),ve=null}var $e=0,Te=Math.floor(O-Q);if(this.$useWrapMode){var qe=this.$wrapData[W];qe&&(G=qe[Te],Te>0&&qe.length&&($e=qe.indent,V=qe[Te-1]||qe[qe.length-1],N=N.substring(V)))}return k!==void 0&&this.$bidiHandler.isBidiRow(Q+Te,W,Te)&&(S=this.$bidiHandler.offsetToCol(k)),V+=this.$getStringScreenWidth(N,S-$e)[1],this.$useWrapMode&&V>=G&&(V=G-1),ve?ve.idxToPosition(V):{row:W,column:V}},P.prototype.documentToScreenPosition=function(O,S){if(typeof S>"u")var k=this.$clipPositionToDocument(O.row,O.column);else k=this.$clipPositionToDocument(O,S);O=k.row,S=k.column;var N=0,W=null,V=null;V=this.getFoldAt(O,S,1),V&&(O=V.start.row,S=V.start.column);var G,Q=0,te=this.$docRowCache,he=this.$getRowCacheIndex(te,O),ne=te.length;if(ne&&he>=0)var Q=te[he],N=this.$screenRowCache[he],ue=O>te[ne-1];else var ue=!ne;for(var le=this.getNextFoldLine(Q),ce=le?le.start.row:1/0;Q<O;){if(Q>=ce){if(G=le.end.row+1,G>O)break;le=this.getNextFoldLine(G,le),ce=le?le.start.row:1/0}else G=Q+1;N+=this.getRowLength(Q),Q=G,ue&&(this.$docRowCache.push(Q),this.$screenRowCache.push(N))}var ve="";le&&Q>=ce?(ve=this.getFoldDisplayLine(le,O,S),W=le.start.row):(ve=this.getLine(O).substring(0,S),W=O);var Ce=0;if(this.$useWrapMode){var $e=this.$wrapData[W];if($e){for(var Te=0;ve.length>=$e[Te];)N++,Te++;ve=ve.substring($e[Te-1]||0,ve.length),Ce=Te>0?$e.indent:0}}return this.lineWidgets&&this.lineWidgets[Q]&&this.lineWidgets[Q].rowsAbove&&(N+=this.lineWidgets[Q].rowsAbove),{row:N,column:Ce+this.$getStringScreenWidth(ve)[0]}},P.prototype.documentToScreenColumn=function(O,S){return this.documentToScreenPosition(O,S).column},P.prototype.documentToScreenRow=function(O,S){return this.documentToScreenPosition(O,S).row},P.prototype.getScreenLength=function(){var O=0,S=null;if(this.$useWrapMode)for(var W=this.$wrapData.length,V=0,N=0,S=this.$foldData[N++],G=S?S.start.row:1/0;V<W;){var Q=this.$wrapData[V];O+=Q?Q.length+1:1,V++,V>G&&(V=S.end.row+1,S=this.$foldData[N++],G=S?S.start.row:1/0)}else{O=this.getLength();for(var k=this.$foldData,N=0;N<k.length;N++)S=k[N],O-=S.end.row-S.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(S,k,N){if(k===0)return[0,0];k||(k=1/0),N=N||0;var W,V;for(V=0;V<S.length&&(W=S.charAt(V),W===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(W),!(N>k));V++);return[N,V]})},P.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]},P.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()},P}();y.$uid=0,y.prototype.$modes=p.$modes,y.prototype.getValue=y.prototype.toString,y.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},y.prototype.$overwrite=!1,y.prototype.$mode=null,y.prototype.$modeId=null,y.prototype.$scrollTop=0,y.prototype.$scrollLeft=0,y.prototype.$wrapLimit=80,y.prototype.$useWrapMode=!1,y.prototype.$wrapLimitRange={min:null,max:null},y.prototype.lineWidgets=null,y.prototype.isFullWidth=U,b.implement(y.prototype,g);var R=1,$=2,C=3,v=4,L=9,I=10,F=11,E=12;function U(P){return P<4352?!1:P>=4352&&P<=4447||P>=4515&&P<=4519||P>=4602&&P<=4607||P>=9001&&P<=9002||P>=11904&&P<=11929||P>=11931&&P<=12019||P>=12032&&P<=12245||P>=12272&&P<=12283||P>=12288&&P<=12350||P>=12353&&P<=12438||P>=12441&&P<=12543||P>=12549&&P<=12589||P>=12593&&P<=12686||P>=12688&&P<=12730||P>=12736&&P<=12771||P>=12784&&P<=12830||P>=12832&&P<=12871||P>=12880&&P<=13054||P>=13056&&P<=19903||P>=19968&&P<=42124||P>=42128&&P<=42182||P>=43360&&P<=43388||P>=44032&&P<=55203||P>=55216&&P<=55238||P>=55243&&P<=55291||P>=63744&&P<=64255||P>=65040&&P<=65049||P>=65072&&P<=65106||P>=65108&&P<=65126||P>=65128&&P<=65131||P>=65281&&P<=65376||P>=65504&&P<=65510}e("./edit_session/folding").Folding.call(y.prototype),e("./edit_session/bracket_match").BracketMatch.call(y.prototype),p.defineOptions(y.prototype,"session",{wrap:{set:function(P){if(!P||P=="off"?P=!1:P=="free"?P=!0:P=="printMargin"?P=-1:typeof P=="string"&&(P=parseInt(P,10)||!1),this.$wrap!=P)if(this.$wrap=P,!P)this.setUseWrapMode(!1);else{var O=typeof P=="number"?P: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(P){P=P=="auto"?this.$mode.type!="text":P!="text",P!=this.$wrapAsCode&&(this.$wrapAsCode=P,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(P){this.$useWorker=P,this.$stopWorker(),P&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(P){P=parseInt(P),P>0&&this.$tabSize!==P&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=P,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(P){this.setFoldStyle(P)},handlesSet:!0},overwrite:{set:function(P){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(P){this.doc.setNewLineMode(P)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(P){this.setMode(P)},get:function(){return this.$modeId},handlesSet:!0}}),l.EditSession=y}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,l,T){var b=e("./lib/lang"),w=e("./lib/oop"),_=e("./range").Range,p=function(){function o(){this.$options={}}return o.prototype.set=function(i){return w.mixin(this.$options,i),this},o.prototype.getOptions=function(){return b.copyObject(this.$options)},o.prototype.setOptions=function(i){this.$options=i},o.prototype.find=function(i){var n=this.$options,s=this.$matchIterator(i,n);if(!s)return!1;var h=null;return s.forEach(function(m,y,R,$){return h=new _(m,y,R,$),y==$&&n.start&&n.start.start&&n.skipCurrent!=!1&&h.isEqual(n.start)?(h=null,!1):!0}),h},o.prototype.findAll=function(i){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var s=n.range,h=s?i.getLines(s.start.row,s.end.row):i.doc.getAllLines(),m=[],y=n.re;if(n.$isMultiLine){var R=y.length,$=h.length-R,C;e:for(var v=y.offset||0;v<=$;v++){for(var L=0;L<R;L++)if(h[v+L].search(y[L])==-1)continue e;var I=h[v],F=h[v+R-1],E=I.length-I.match(y[0])[0].length,U=F.match(y[R-1])[0].length;C&&C.end.row===v&&C.end.column>E||(m.push(C=new _(v,E,v+R-1,U)),R>2&&(v=v+R-2))}}else for(var P,O=0;O<h.length;O++)if(this.$isMultilineSearch(n)){var S=h.length-1;if(P=this.$multiLineForward(i,y,O,S),P){var k=P.endRow<=S?P.endRow-1:S;k>O&&(O=k),m.push(new _(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=b.getMatchOffsets(h[O],y);for(var L=0;L<P.length;L++){var N=P[L];m.push(new _(O,N.offset,O,N.offset+N.length))}}if(s){for(var W=s.start.column,V=s.end.column,O=0,L=m.length-1;O<L&&m[O].start.column<W&&m[O].start.row==0;)O++;for(var G=s.end.row-s.start.row;O<L&&m[L].end.column>V&&m[L].end.row==G;)L--;for(m=m.slice(O,L+1),O=0,L=m.length;O<L;O++)m[O].start.row+=s.start.row,m[O].end.row+=s.start.row}return m},o.prototype.parseReplaceString=function(i){for(var n={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},s="",h=0,m=i.length;h<m;h++){var y=i.charCodeAt(h);if(y===n.Backslash){if(h++,h>=m){s+="\\";break}var R=i.charCodeAt(h);switch(R){case n.Backslash:s+="\\";break;case n.n:s+=`
199
- `;break;case n.t:s+=" ";break}continue}if(y===n.DollarSign){if(h++,h>=m){s+="$";break}var $=i.charCodeAt(h);if($===n.DollarSign){s+="$$";continue}if($===n.Digit0||$===n.Ampersand){s+="$&";continue}if(n.Digit1<=$&&$<=n.Digit9){s+="$"+i[h];continue}}s+=i[h]}return s||i},o.prototype.replace=function(i,n){var s=this.$options,h=this.$assembleRegExp(s);if(s.$isMultiLine)return n;if(h){var m=this.$isMultilineSearch(s);m&&(i=i.replace(/\r\n|\r|\n/g,`
200
- `));var y=h.exec(i);if(!y||!m&&y[0].length!=i.length)return null;if(n=s.regExp?this.parseReplaceString(n):n.replace(/\$/g,"$$$$"),n=i.replace(h,n),s.preserveCase){n=n.split("");for(var R=Math.min(i.length,i.length);R--;){var $=i[R];$&&$.toLowerCase()!=$?n[R]=n[R].toUpperCase():n[R]=n[R].toLowerCase()}n=n.join("")}return n}},o.prototype.$assembleRegExp=function(i,n){if(i.needle instanceof RegExp)return i.re=i.needle;var s=i.needle;if(!i.needle)return i.re=!1;i.regExp||(s=b.escapeRegExp(s));var h=i.caseSensitive?"gm":"gmi";try{new RegExp(s,"u"),i.$supportsUnicodeFlag=!0,h+="u"}catch{i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(s=g(s,i)),i.$isMultiLine=!n&&/[\n\r]/.test(s),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(s,h);try{var m=new RegExp(s,h)}catch{m=!1}return i.re=m},o.prototype.$assembleMultilineRegExp=function(i,n){for(var s=i.replace(/\r\n|\r|\n/g,`$
201
- ^`).split(`
202
- `),h=[],m=0;m<s.length;m++)try{h.push(new RegExp(s[m],n))}catch{return!1}return h},o.prototype.$isMultilineSearch=function(i){return i.re&&/\\r\\n|\\r|\\n/.test(i.re.source)&&i.regExp&&!i.$isMultiLine},o.prototype.$multiLineForward=function(i,n,s,h){for(var m,y=a(i,s),R=s;R<=h;){for(var $=0;$<y&&!(R>h);$++){var C=i.getLine(R++);m=m==null?C:m+`
203
- `+C}var v=n.exec(m);if(n.lastIndex=0,v){var L=m.slice(0,v.index).split(`
204
- `),I=v[0].split(`
205
- `),F=s+L.length-1,E=L[L.length-1].length,U=F+I.length-1,P=I.length==1?E+I[0].length:I[I.length-1].length;return{startRow:F,startCol:E,endRow:U,endCol:P}}}return null},o.prototype.$multiLineBackward=function(i,n,s,h,m){for(var y,R=a(i,h),$=i.getLine(h).length-s,C=h;C>=m;){for(var v=0;v<R&&C>=m;v++){var L=i.getLine(C--);y=y==null?L:L+`
206
- `+y}var I=r(y,n,$);if(I){var F=y.slice(0,I.index).split(`
207
- `),E=I[0].split(`
208
- `),U=C+F.length,P=F[F.length-1].length,O=U+E.length-1,S=E.length==1?P+E[0].length:E[E.length-1].length;return{startRow:U,startCol:P,endRow:O,endCol:S}}}return null},o.prototype.$matchIterator=function(i,n){var s=this.$assembleRegExp(n);if(!s)return!1;var h=this.$isMultilineSearch(n),m=this.$multiLineForward,y=this.$multiLineBackward,R=n.backwards==!0,$=n.skipCurrent!=!1,C=s.unicode,v=n.range,L=n.start;L||(L=v?v[R?"end":"start"]:i.selection.getRange()),L.start&&(L=L[$!=R?"end":"start"]);var I=v?v.start.row:0,F=v?v.end.row:i.getLength()-1;if(R)var E=function(O){var S=L.row;if(!P(S,L.column,O)){for(S--;S>=I;S--)if(P(S,Number.MAX_VALUE,O))return;if(n.wrap!=!1){for(S=F,I=L.row;S>=I;S--)if(P(S,Number.MAX_VALUE,O))return}}};else var E=function(S){var k=L.row;if(!P(k,L.column,S)){for(k=k+1;k<=F;k++)if(P(k,0,S))return;if(n.wrap!=!1){for(k=I,F=L.row;k<=F;k++)if(P(k,0,S))return}}};if(n.$isMultiLine)var U=s.length,P=function(O,S,k){var N=R?O-U+1:O;if(!(N<0||N+U>i.getLength())){var W=i.getLine(N),V=W.search(s[0]);if(!(!R&&V<S||V===-1)){for(var G=1;G<U;G++)if(W=i.getLine(N+G),W.search(s[G])==-1)return;var Q=W.match(s[U-1])[0].length;if(!(R&&Q>S)&&k(N,V,N+U-1,Q))return!0}}};else if(R)var P=function(S,k,N){if(h){var W=y(i,s,k,S,I);if(!W)return!1;if(N(W.startRow,W.startCol,W.endRow,W.endCol))return!0}else{var V=i.getLine(S),G=[],Q,te=0;for(s.lastIndex=0;Q=s.exec(V);){var he=Q[0].length;if(te=Q.index,!he){if(te>=V.length)break;s.lastIndex=te+=b.skipEmptyMatch(V,te,C)}if(Q.index+he>k)break;G.push(Q.index,he)}for(var ne=G.length-1;ne>=0;ne-=2){var ue=G[ne-1],he=G[ne];if(N(S,ue,S,ue+he))return!0}}};else var P=function(S,k,N){if(s.lastIndex=k,h){var W=m(i,s,S,F);if(W){var V=W.endRow<=F?W.endRow-1:F;V>S&&(S=V)}if(!W)return!1;if(N(W.startRow,W.startCol,W.endRow,W.endCol))return!0}else for(var G=i.getLine(S),Q,te;te=s.exec(G);){var he=te[0].length;if(Q=te.index,N(S,Q,S,Q+he))return!0;if(!he&&(s.lastIndex=Q+=b.skipEmptyMatch(G,Q,C),Q>=G.length))return!1}};return{forEach:E}},o}();function g(o,i){var n=b.supportsLookbehind();function s(R,$){$===void 0&&($=!0);var C=n&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test(R)||i.regExp?n&&i.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var h=Array.from(o),m=h[0],y=h[h.length-1];return s(m)+o+s(y,!1)}function r(o,i,n){for(var s=null,h=0;h<=o.length;){i.lastIndex=h;var m=i.exec(o);if(!m)break;var y=m.index+m[0].length;if(y>o.length-n)break;(!s||y>s.index+s[0].length)&&(s=m),h=m.index+1}return s}function a(o,i){var n=5e3,s={row:i,column:0},h=o.doc.positionToIndex(s),m=h+n,y=o.doc.indexToPosition(m),R=y.row;return R+1}l.Search=p}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,l,T){var b=this&&this.__extends||function(){var o=function(i,n){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,h){s.__proto__=h}||function(s,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(s[m]=h[m])},o(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");o(i,n);function s(){this.constructor=i}i.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),w=e("../lib/keys"),_=e("../lib/useragent"),p=w.KEY_MODS,g=function(){function o(i,n){this.$init(i,n,!1)}return o.prototype.$init=function(i,n,s){this.platform=n||(_.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=s},o.prototype.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},o.prototype.removeCommand=function(i,n){var s=i&&(typeof i=="string"?i:i.name);i=this.commands[s],n||delete this.commands[s];var h=this.commandKeyBinding;for(var m in h){var y=h[m];if(y==i)delete h[m];else if(Array.isArray(y)){var R=y.indexOf(i);R!=-1&&(y.splice(R,1),y.length==1&&(h[m]=y[0]))}}},o.prototype.bindKey=function(i,n,s){if(typeof i=="object"&&i&&(s==null&&(s=i.position),i=i[this.platform]),!!i){if(typeof n=="function")return this.addCommand({exec:n,bindKey:i,name:n.name||i});i.split("|").forEach(function(h){var m="";if(h.indexOf(" ")!=-1){var y=h.split(/\s+/);h=y.pop(),y.forEach(function(C){var v=this.parseKeys(C),L=p[v.hashId]+v.key;m+=(m?" ":"")+L,this._addCommandToBinding(m,"chainKeys")},this),m+=" "}var R=this.parseKeys(h),$=p[R.hashId]+R.key;this._addCommandToBinding(m+$,n,s)},this)}},o.prototype._addCommandToBinding=function(i,n,s){var h=this.commandKeyBinding,m;if(!n)delete h[i];else if(!h[i]||this.$singleCommand)h[i]=n;else{Array.isArray(h[i])?(m=h[i].indexOf(n))!=-1&&h[i].splice(m,1):h[i]=[h[i]],typeof s!="number"&&(s=r(n));var y=h[i];for(m=0;m<y.length;m++){var R=y[m],$=r(R);if($>s)break}y.splice(m,0,n)}},o.prototype.addCommands=function(i){i&&Object.keys(i).forEach(function(n){var s=i[n];if(s){if(typeof s=="string")return this.bindKey(s,n);typeof s=="function"&&(s={exec:s}),typeof s=="object"&&(s.name||(s.name=n),this.addCommand(s))}},this)},o.prototype.removeCommands=function(i){Object.keys(i).forEach(function(n){this.removeCommand(i[n])},this)},o.prototype.bindKeys=function(i){Object.keys(i).forEach(function(n){this.bindKey(n,i[n])},this)},o.prototype._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},o.prototype.parseKeys=function(i){var n=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),s=n.pop(),h=w[s];if(w.FUNCTION_KEYS[h])s=w.FUNCTION_KEYS[h].toLowerCase();else if(n.length){if(n.length==1&&n[0]=="shift")return{key:s.toUpperCase(),hashId:-1}}else return{key:s,hashId:-1};for(var m=0,y=n.length;y--;){var R=w.KEY_MODS[n[y]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+n[y]+" in "+i),!1;m|=R}return{key:s,hashId:m}},o.prototype.findKeyCommand=function(i,n){var s=p[i]+n;return this.commandKeyBinding[s]},o.prototype.handleKeyboard=function(i,n,s,h){if(!(h<0)){var m=p[n]+s,y=this.commandKeyBinding[m];return i.$keyChain&&(i.$keyChain+=" "+m,y=this.commandKeyBinding[i.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(i.$keyChain=i.$keyChain||m,{command:"null"}):(i.$keyChain&&((!n||n==4)&&s.length==1?i.$keyChain=i.$keyChain.slice(0,-m.length-1):(n==-1||h>0)&&(i.$keyChain="")),{command:y})}},o.prototype.getStatusText=function(i,n){return n.$keyChain||""},o}();function r(o){return typeof o=="object"&&o.bindKey&&o.bindKey.position||(o.isDefault?-100:0)}var a=function(o){b(i,o);function i(n,s){var h=o.call(this,n,s)||this;return h.$singleCommand=!0,h}return i}(g);a.call=function(o,i,n){g.prototype.$init.call(o,i,n,!0)},g.call=function(o,i,n){g.prototype.$init.call(o,i,n,!1)},l.HashHandler=a,l.MultiHashHandler=g}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,l,T){var b=this&&this.__extends||function(){var r=function(a,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(a,o)};return function(a,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(a,o);function i(){this.constructor=a}a.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}}(),w=e("../lib/oop"),_=e("../keyboard/hash_handler").MultiHashHandler,p=e("../lib/event_emitter").EventEmitter,g=function(r){b(a,r);function a(o,i){var n=r.call(this,i,o)||this;return n.byName=n.commands,n.setDefaultHandler("exec",function(s){return s.args?s.command.exec(s.editor,s.args,s.event,!1):s.command.exec(s.editor,{},s.event,!0)}),n}return a.prototype.exec=function(o,i,n){if(Array.isArray(o)){for(var s=o.length;s--;)if(this.exec(o[s],i,n))return!0;return!1}typeof o=="string"&&(o=this.commands[o]);var h={editor:i,command:o,args:n};return this.canExecute(o,i)?(h.returnValue=this._emit("exec",h),this._signal("afterExec",h),h.returnValue!==!1):(this._signal("commandUnavailable",h),!1)},a.prototype.canExecute=function(o,i){return typeof o=="string"&&(o=this.commands[o]),!(!o||i&&i.$readOnly&&!o.readOnly||this.$checkCommandState!=!1&&o.isAvailable&&!o.isAvailable(i))},a.prototype.toggleRecording=function(o){if(!this.$inReplay)return o&&o._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)},a.prototype.replay=function(o){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(o);try{this.$inReplay=!0,this.macro.forEach(function(i){typeof i=="string"?this.exec(i,o):this.exec(i[0],o,i[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(o){return o.map(function(i){return typeof i[0]!="string"&&(i[0]=i[0].name),i[1]||(i=i[0]),i})},a}(_);w.implement(g.prototype,p),l.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,l,T){var b=e("../lib/lang"),w=e("../config"),_=e("../range").Range;function p(r,a){return{win:r,mac:a}}l.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:p("Ctrl-,","Command-,"),exec:function(r){w.loadModule("ace/ext/settings_menu",function(a){a.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:p("Alt-E","F4"),exec:function(r){w.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:p("Alt-Shift-E","Shift-F4"),exec:function(r){w.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:p("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:p(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:p("Ctrl-L","Command-L"),exec:function(r,a){typeof a=="number"&&!isNaN(a)&&r.gotoLine(a),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:p("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:p("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:p("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:p("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:p(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:p(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:p("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:p("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:p("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:p("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:p("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:p("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:p("Ctrl-F","Command-F"),exec:function(r){w.loadModule("ace/ext/searchbox",function(a){a.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:p("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:p("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:p("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:p("Up","Up|Ctrl-P"),exec:function(r,a){r.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:p("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:p("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:p("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:p("Down","Down|Ctrl-N"),exec:function(r,a){r.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:p("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:p("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:p("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:p("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:p("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:p("Left","Left|Ctrl-B"),exec:function(r,a){r.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:p("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:p("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:p("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:p("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:p("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:p("Right","Right|Ctrl-F"),exec:function(r,a){r.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:p(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:p("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:p(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:p("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:p("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:p("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:p("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:p("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:p("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:p("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:p(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var a=r.$copyWithEmptySelection&&r.selection.isEmpty(),o=a?r.selection.getLineRange():r.selection.getRange();r._emit("cut",o),o.isEmpty()||r.session.remove(o),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,a){r.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:p("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:p("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:p("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:p("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:p("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:p("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:p("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:p("Ctrl-H","Command-Option-F"),exec:function(r){w.loadModule("ace/ext/searchbox",function(a){a.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:p("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:p("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:p("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:p("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:p("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:p("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:p("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:p("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:p("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:p("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:p("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:p("Ctrl-Shift-Backspace",null),exec:function(r){var a=r.selection.getRange();a.start.column=0,r.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:p("Ctrl-Shift-Delete",null),exec:function(r){var a=r.selection.getRange();a.end.column=Number.MAX_VALUE,r.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:p("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:p("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:p("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:p("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:p("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:p("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,a){r.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,a){r.insert(b.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:p(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:p("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:p("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:p("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:p(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:p("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var a=r.selection.getRange();a.start.column=a.end.column=0,a.end.row++,r.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:p("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:p(null,null),exec:function(r){for(var a=r.selection.isBackwards(),o=a?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),i=a?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),n=r.session.doc.getLine(o.row).length,s=r.session.doc.getTextRange(r.selection.getRange()),h=s.replace(/\n\s*/," ").length,m=r.session.doc.getLine(o.row),y=o.row+1;y<=i.row+1;y++){var R=b.stringTrimLeft(b.stringTrimRight(r.session.doc.getLine(y)));R.length!==0&&(R=" "+R),m+=R}i.row+1<r.session.doc.getLength()-1&&(m+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new _(o.row,0,i.row+2,0),m),h>0?(r.selection.moveCursorTo(o.row,o.column),r.selection.selectTo(o.row,o.column+h)):(n=r.session.doc.getLine(o.row).length>n?n+1:n,r.selection.moveCursorTo(o.row,n))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:p(null,null),exec:function(r){var a=r.session.doc.getLength()-1,o=r.session.doc.getLine(a).length,i=r.selection.rangeList.ranges,n=[];i.length<1&&(i=[r.selection.getRange()]);for(var s=0;s<i.length;s++)s==i.length-1&&(i[s].end.row===a&&i[s].end.column===o||n.push(new _(i[s].end.row,i[s].end.column,a,o))),s===0?i[s].start.row===0&&i[s].start.column===0||n.push(new _(0,0,i[s].start.row,i[s].start.column)):n.push(new _(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var s=0;s<n.length;s++)r.selection.addRange(n[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(`
209
- `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var a=r.getCursorPosition();r.selection.moveTo(a.row-1,Number.MAX_VALUE),r.insert(`
210
- `),a.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:p("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:p(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var g=1;g<9;g++)l.commands.push({name:"foldToLevel"+g,description:"Fold To Level "+g,level:g,exec:function(r){r.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,l,T){var b=e("../lib/keys"),w=e("../mouse/default_gutter_handler").GutterTooltip,_=function(){function g(r){this.editor=r,this.gutterLayer=r.renderer.$gutterLayer,this.element=r.renderer.$gutter,this.lines=r.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new w(this.editor)}return g.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))},g.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))},g.prototype.$onGutterKeyDown=function(r){if(this.annotationTooltip.isOpen){r.preventDefault(),r.keyCode===b.escape&&this.annotationTooltip.hideTooltip();return}if(r.target===this.element){if(r.keyCode!=b.enter)return;r.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),i=this.$findNearestFoldWidget(o),n=this.$findNearestAnnotation(o);if(!(i===null&&n===null)){if(i===null&&n!==null){this.activeRowIndex=n,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(i!==null&&n===null){this.activeRowIndex=i,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(n-o)<Math.abs(i-o)){this.activeRowIndex=n,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=i,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(r),setTimeout((function(){this.editor._signal("gutterkeydown",new p(r,this))}).bind(this),10)},g.prototype.$handleGutterKeyboardInteraction=function(r){if(r.keyCode===b.tab){r.preventDefault();return}if(r.keyCode===b.escape){r.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(r.keyCode===b.up){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(r.keyCode===b.down){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(r.keyCode===b.left){r.preventDefault(),this.$switchLane("annotation");return}if(r.keyCode===b.right){r.preventDefault(),this.$switchLane("fold");return}if(r.keyCode===b.enter||r.keyCode===b.space){switch(r.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var a=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),r),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var o=this.lines.cells[this.activeRowIndex].element.childNodes[2],i=o.getBoundingClientRect(),n=this.annotationTooltip.getElement().style;n.left=i.right+"px",n.top=i.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},g.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},g.prototype.$isFoldWidgetVisible=function(r){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),o=this.$getFoldWidget(r).style.display!=="none";return a&&o},g.prototype.$isAnnotationVisible=function(r){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),o=this.$getAnnotation(r).style.display!=="none";return a&&o},g.prototype.$getFoldWidget=function(r){var a=this.lines.get(r),o=a.element;return o.childNodes[1]},g.prototype.$getAnnotation=function(r){var a=this.lines.get(r),o=a.element;return o.childNodes[2]},g.prototype.$findNearestFoldWidget=function(r){if(this.$isFoldWidgetVisible(r))return r;for(var a=0;r-a>0||r+a<this.lines.getLength()-1;){if(a++,r-a>=0&&this.$isFoldWidgetVisible(r-a))return r-a;if(r+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(r+a))return r+a}return null},g.prototype.$findNearestAnnotation=function(r){if(this.$isAnnotationVisible(r))return r;for(var a=0;r-a>0||r+a<this.lines.getLength()-1;){if(a++,r-a>=0&&this.$isAnnotationVisible(r-a))return r-a;if(r+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(r+a))return r+a}return null},g.prototype.$focusFoldWidget=function(r){if(r!=null){var a=this.$getFoldWidget(r);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$focusAnnotation=function(r){if(r!=null){var a=this.$getAnnotation(r);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$blurFoldWidget=function(r){var a=this.$getFoldWidget(r);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$blurAnnotation=function(r){var a=this.$getAnnotation(r);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$moveFoldWidgetUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},g.prototype.$moveFoldWidgetDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},g.prototype.$moveAnnotationUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$moveAnnotationDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$switchLane=function(r){switch(r){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var o=this.$findNearestFoldWidget(this.activeRowIndex);if(o==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);break}},g.prototype.$rowIndexToRow=function(r){var a=this.lines.get(r);return a?a.row:null},g.prototype.$rowToRowIndex=function(r){for(var a=0;a<this.lines.getLength();a++){var o=this.lines.get(a);if(o.row==r)return a}return null},g}();l.GutterKeyboardHandler=_;var p=function(){function g(r,a){this.gutterKeyboardHandler=a,this.domEvent=r}return g.prototype.getKey=function(){return b.keyCodeToString(this.domEvent.keyCode)},g.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},g.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},g.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},g}();l.GutterKeyboardEvent=p}),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(e,l,T){var b=this&&this.__values||function(S){var k=typeof Symbol=="function"&&Symbol.iterator,N=k&&S[k],W=0;if(N)return N.call(S);if(S&&typeof S.length=="number")return{next:function(){return S&&W>=S.length&&(S=void 0),{value:S&&S[W++],done:!S}}};throw new TypeError(k?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("./lib/oop"),_=e("./lib/dom"),p=e("./lib/lang"),g=e("./lib/useragent"),r=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,o=e("./mouse/fold_handler").FoldHandler,i=e("./keyboard/keybinding").KeyBinding,n=e("./edit_session").EditSession,s=e("./search").Search,h=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,y=e("./commands/command_manager").CommandManager,R=e("./commands/default_commands").commands,$=e("./config"),C=e("./token_iterator").TokenIterator,v=e("./keyboard/gutter_handler").GutterKeyboardHandler,L=e("./config").nls,I=e("./clipboard"),F=e("./lib/keys"),E=e("./lib/event"),U=e("./tooltip").HoverTooltip,P=function(){function S(k,N,W){this.session,this.$toDestroy=[];var V=k.getContainerElement();this.container=V,this.renderer=k,this.id="editor"+ ++S.$uid,this.commands=new y(g.isMac?"mac":"win",R),typeof document=="object"&&(this.textInput=new r(k.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new o(this)),this.keyBinding=new i(this),this.$search=new s().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=p.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(G,Q){Q._$emitInputEvent.schedule(31)}),this.setSession(N||W&&W.session||new n("")),$.resetOptions(this),W&&this.setOptions(W),$._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(k){this.session.startOperation(k)},S.prototype.endOperation=function(k){this.session.endOperation(k)},S.prototype.onStartOperation=function(k){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,k||(this.previousCommand=null)},S.prototype.onEndOperation=function(k){if(this.curOp&&this.session){if(k&&k.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,W=N&&N.scrollIntoView;if(W){switch(W){case"center-animate":W="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var V=this.selection.getRange(),G=this.renderer.layerConfig;(V.start.row>=G.lastRow||V.end.row<=G.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}W=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},S.prototype.$historyTracker=function(k){if(this.$mergeUndoDeltas){var N=this.prevOp,W=this.$mergeableCommands,V=N.command&&k.command.name==N.command.name;if(k.command.name=="insertstring"){var G=k.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),V=V&&this.mergeNextCommand&&(!/\s/.test(G)||/\s/.test(N.args)),this.mergeNextCommand=!0}else V=V&&W.indexOf(k.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(V=!1),V?this.session.mergeUndoDeltas=!0:W.indexOf(k.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},S.prototype.setKeyboardHandler=function(k,N){if(k&&typeof k=="string"&&k!="ace"){this.$keybindingId=k;var W=this;$.loadModule(["keybinding",k],function(V){W.$keybindingId==k&&W.keyBinding.setKeyboardHandler(V&&V.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(k),N&&N()},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(k){if(this.session!=k){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){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 W=this.session.getSelection();W.off("changeCursor",this.$onCursorChange),W.off("changeSelection",this.$onSelectionChange)}this.session=k,k?(this.$onDocumentChange=this.onDocumentChange.bind(this),k.on("change",this.$onDocumentChange),this.renderer.setSession(k),this.$onChangeMode=this.onChangeMode.bind(this),k.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),k.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),k.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),k.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),k.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),k.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=k.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(k)),this._signal("changeSession",{session:k,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),k&&k._signal("changeEditor",{editor:this}),k&&(k.$editor=this),k&&!k.destroyed&&k.bgTokenizer.scheduleStart()}},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(k,N){return this.session.doc.setValue(k),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),k},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(k){this.renderer.onResize(k)},S.prototype.setTheme=function(k,N){this.renderer.setTheme(k,N)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(k){this.renderer.setStyle(k)},S.prototype.unsetStyle=function(k){this.renderer.unsetStyle(k)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||_.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(k){this.setOption("fontSize",k)},S.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var k=this;this.$highlightPending=!0,setTimeout(function(){k.$highlightPending=!1;var N=k.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(le){N.removeMarker(le)}),N.$bracketHighlight=null);var W=k.getCursorPosition(),V=k.getKeyboardHandler(),G=V&&V.$getDirectionForHighlight&&V.$getDirectionForHighlight(k),Q=N.getMatchingBracketRanges(W,G);if(!Q){var te=new C(N,W.row,W.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=N.getMatchingTags(W);ne&&(Q=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Q&&N.$mode.getMatching&&(Q=N.$mode.getMatching(k.session)),!Q){k.getHighlightIndentGuides()&&k.renderer.$textLayer.$highlightIndentGuide();return}var ue="ace_bracket";Array.isArray(Q)?Q.length==1&&(ue="ace_error_bracket"):Q=[Q],Q.length==2&&(h.comparePoints(Q[0].end,Q[1].start)==0?Q=[h.fromPoints(Q[0].start,Q[1].end)]:h.comparePoints(Q[0].start,Q[1].end)==0&&(Q=[h.fromPoints(Q[1].start,Q[0].end)])),N.$bracketHighlight={ranges:Q,markerIds:Q.map(function(le){return N.addMarker(le,ue,"text")})},k.getHighlightIndentGuides()&&k.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(k){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",k))},S.prototype.onBlur=function(k){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",k))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(k){var N=this.session.$useWrapMode,W=k.start.row==k.end.row?k.end.row:1/0;this.renderer.updateLines(k.start.row,W,N),this._signal("change",k),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(k){var N=k.data;this.renderer.updateLines(N.first,N.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 k=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),k.$highlightLineMarker&&!N)k.removeMarker(k.$highlightLineMarker.id),k.$highlightLineMarker=null;else if(!k.$highlightLineMarker&&N){var W=new h(N.row,N.column,N.row,1/0);W.id=k.addMarker(W,"ace_active-line","screenLine"),k.$highlightLineMarker=W}else N&&(k.$highlightLineMarker.start.row=N.row,k.$highlightLineMarker.end.row=N.row,k.$highlightLineMarker.start.column=N.column,k._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(k){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var W=this.selection.getRange(),V=this.getSelectionStyle();N.$selectionMarker=N.addMarker(W,"ace_selection",V)}var G=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(G),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var k=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var W=N.start.column,V=N.end.column,G=k.getLine(N.start.row),Q=G.substring(W,V);if(!(Q.length>5e3||!/[\w\d]/.test(Q))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Q}),he=G.substring(W-1,V+1);if(te.test(he))return te}}},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(k){this.renderer.updateText(),this._emit("changeMode",k)},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 k=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),W=!1;if(!k&&this.$copyWithEmptySelection){W=!0;for(var V=this.selection.getAllRanges(),G=0;G<V.length;G++){var Q=V[G];G&&V[G-1].start.row==Q.start.row||(k+=this.session.getLine(Q.start.row)+N)}}var te={text:k};return this._signal("copy",te),I.lineMode=W?te.text:!1,te.text},S.prototype.onCopy=function(){this.commands.exec("copy",this)},S.prototype.onCut=function(){this.commands.exec("cut",this)},S.prototype.onPaste=function(k,N){var W={text:k,event:N};this.commands.exec("paste",this,W)},S.prototype.$handlePaste=function(k){typeof k=="string"&&(k={text:k}),this._signal("paste",k);var N=k.text,W=N===I.lineMode,V=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)W?V.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(W)this.selection.rangeList.ranges.forEach(function(ue){V.insert({row:ue.start.row,column:0},N)});else{var G=N.split(/\r\n|\r|\n/),Q=this.selection.rangeList.ranges,te=G.length==2&&(!G[0]||!G[1]);if(G.length!=Q.length||te)return this.commands.exec("insertstring",this,N);for(var he=Q.length;he--;){var ne=Q[he];ne.isEmpty()||V.remove(ne),V.insert(ne.start,G[he])}}},S.prototype.execCommand=function(k,N){return this.commands.exec(k,this,N)},S.prototype.insert=function(k,N){var W=this.session,V=W.getMode(),G=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var Q=V.transformAction(W.getState(G.row),"insertion",this,W,k);Q&&(k!==Q.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),k=Q.text)}if(k==" "&&(k=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&k.indexOf(`
211
- `)==-1){var te=h.fromPoints(G,G);te.end.column+=k.length,this.session.remove(te)}}else{var te=this.getSelectionRange();G=this.session.remove(te),this.clearSelection()}if(k==`
212
- `||k==`\r
213
- `){var le=W.getLine(G.row);if(G.column>le.search(/\S|$/)){var he=le.substr(G.column).search(/\S|$/);W.doc.removeInLine(G.row,G.column,G.column+he)}}this.clearSelection();var ne=G.column,ue=W.getState(G.row),le=W.getLine(G.row),ce=V.checkOutdent(ue,le,k);if(W.insert(G,k),Q&&Q.selection&&(Q.selection.length==2?this.selection.setSelectionRange(new h(G.row,ne+Q.selection[0],G.row,ne+Q.selection[1])):this.selection.setSelectionRange(new h(G.row+Q.selection[0],Q.selection[1],G.row+Q.selection[2],Q.selection[3]))),this.$enableAutoIndent){if(W.getDocument().isNewLine(k)){var ve=V.getNextLineIndent(ue,le.slice(0,G.column),W.getTabString());W.insert({row:G.row+1,column:0},ve)}ce&&V.autoOutdent(ue,W,G.row)}},S.prototype.autoIndent=function(){for(var k=this.session,N=k.getMode(),W=this.selection.isEmpty()?[new h(0,0,k.doc.getLength()-1,0)]:this.selection.getAllRanges(),V="",G="",Q="",te=k.getTabString(),he=0;he<W.length;he++)for(var ne=W[he].start.row,ue=W[he].end.row,le=ne;le<=ue;le++){le>0&&(V=k.getState(le-1),G=k.getLine(le-1),Q=N.getNextLineIndent(V,G,te));var ce=k.getLine(le),ve=N.$getIndent(ce);if(Q!==ve){if(ve.length>0){var Ce=new h(le,0,le,ve.length);k.remove(Ce)}Q.length>0&&k.insert({row:le,column:0},Q)}N.autoOutdent(V,k,le)}},S.prototype.onTextInput=function(k,N){if(!N)return this.keyBinding.onTextInput(k);this.startOperation({command:{name:"insertstring"}});var W=this.applyComposition.bind(this,k,N);this.selection.rangeCount?this.forEachSelection(W):W(),this.endOperation()},S.prototype.applyComposition=function(k,N){if(N.extendLeft||N.extendRight){var W=this.selection.getRange();W.start.column-=N.extendLeft,W.end.column+=N.extendRight,W.start.column<0&&(W.start.row--,W.start.column+=this.session.getLine(W.start.row).length+1),this.selection.setRange(W),!k&&!W.isEmpty()&&this.remove()}if((k||!this.selection.isEmpty())&&this.insert(k,!0),N.restoreStart||N.restoreEnd){var W=this.selection.getRange();W.start.column-=N.restoreStart,W.end.column-=N.restoreEnd,this.selection.setRange(W)}},S.prototype.onCommandKey=function(k,N,W){return this.keyBinding.onCommandKey(k,N,W)},S.prototype.setOverwrite=function(k){this.session.setOverwrite(k)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(k){this.setOption("scrollSpeed",k)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(k){this.setOption("dragDelay",k)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(k){this.setOption("selectionStyle",k)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(k){this.setOption("highlightActiveLine",k)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(k){this.setOption("highlightSelectedWord",k)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(k){this.renderer.setAnimatedScroll(k)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(k){this.renderer.setShowInvisibles(k)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(k){this.renderer.setDisplayIndentGuides(k)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(k){this.renderer.setHighlightIndentGuides(k)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(k){this.renderer.setShowPrintMargin(k)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(k){this.renderer.setPrintMarginColumn(k)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(k){this.setOption("readOnly",k)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(k){this.setOption("behavioursEnabled",k)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(k){this.setOption("wrapBehavioursEnabled",k)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(k){this.setOption("showFoldWidgets",k)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(k){this.selection.isEmpty()&&(k=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var W=this.session,V=W.getState(N.start.row),G=W.getMode().transformAction(V,"deletion",this,W,N);if(N.end.column===0){var Q=W.getTextRange(N);if(Q[Q.length-1]==`
214
- `){var te=W.getLine(N.end.row);/^\s+$/.test(te)&&(N.end.column=te.length)}}G&&(N=G)}this.session.remove(N),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 k=this.getSelectionRange();k.start.column==k.end.column&&k.start.row==k.end.row&&(k.end.column=0,k.end.row++),this.session.remove(k),this.clearSelection()},S.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var k=this.getCursorPosition();this.insert(`
215
- `),this.moveCursorToPosition(k)},S.prototype.setGhostText=function(k,N){this.renderer.setGhostText(k,N)},S.prototype.removeGhostText=function(){this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var k=this.getCursorPosition(),N=k.column;if(N!==0){var W=this.session.getLine(k.row),V,G;N<W.length?(V=W.charAt(N)+W.charAt(N-1),G=new h(k.row,N-1,k.row,N+1)):(V=W.charAt(N-1)+W.charAt(N-2),G=new h(k.row,N-2,k.row,N)),this.session.replace(G,V),this.session.selection.moveToPosition(G.end)}}},S.prototype.toLowerCase=function(){var k=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),W=this.session.getTextRange(N);this.session.replace(N,W.toLowerCase()),this.selection.setSelectionRange(k)},S.prototype.toUpperCase=function(){var k=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),W=this.session.getTextRange(N);this.session.replace(N,W.toUpperCase()),this.selection.setSelectionRange(k)},S.prototype.indent=function(){var k=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var W=this.$getSelectedRows();k.indentRows(W.first,W.last," ");return}else if(N.start.column<N.end.column){var V=k.getTextRange(N);if(!/^\s+$/.test(V)){var W=this.$getSelectedRows();k.indentRows(W.first,W.last," ");return}}var G=k.getLine(N.start.row),Q=N.start,te=k.getTabSize(),he=k.documentToScreenColumn(Q.row,Q.column);if(this.session.getUseSoftTabs())var ne=te-he%te,ue=p.stringRepeat(" ",ne);else{for(var ne=he%te;G[N.start.column-1]==" "&&ne;)N.start.column--,ne--;this.selection.setSelectionRange(N),ue=" "}return this.insert(ue)},S.prototype.blockIndent=function(){var k=this.$getSelectedRows();this.session.indentRows(k.first,k.last," ")},S.prototype.blockOutdent=function(){var k=this.session.getSelection();this.session.outdentRows(k.getRange())},S.prototype.sortLines=function(){for(var k=this.$getSelectedRows(),N=this.session,W=[],V=k.first;V<=k.last;V++)W.push(N.getLine(V));W.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var G=new h(0,0,0,0),V=k.first;V<=k.last;V++){var Q=N.getLine(V);G.start.row=V,G.end.row=V,G.end.column=Q.length,N.replace(G,W[V-k.first])}},S.prototype.toggleCommentLines=function(){var k=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(k,this.session,N.first,N.last)},S.prototype.toggleBlockComment=function(){var k=this.getCursorPosition(),N=this.session.getState(k.row),W=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,W,k)},S.prototype.getNumberAt=function(k,N){var W=/[\-]?[0-9]+(?:\.[0-9]+)?/g;W.lastIndex=0;for(var V=this.session.getLine(k);W.lastIndex<N;){var G=W.exec(V);if(G.index<=N&&G.index+G[0].length>=N){var Q={value:G[0],start:G.index,end:G.index+G[0].length};return Q}}return null},S.prototype.modifyNumber=function(k){var N=this.selection.getCursor().row,W=this.selection.getCursor().column,V=new h(N,W-1,N,W),G=this.session.getTextRange(V);if(!isNaN(parseFloat(G))&&isFinite(G)){var Q=this.getNumberAt(N,W);if(Q){var te=Q.value.indexOf(".")>=0?Q.start+Q.value.indexOf(".")+1:Q.end,he=Q.start+Q.value.length-te,ne=parseFloat(Q.value);ne*=Math.pow(10,he),te!==Q.end&&W<te?k*=Math.pow(10,Q.end-W-1):k*=Math.pow(10,Q.end-W),ne+=k,ne/=Math.pow(10,he);var ue=ne.toFixed(he),le=new h(N,Q.start,N,Q.end);this.session.replace(le,ue),this.moveCursorTo(N,Math.max(Q.start+1,W+ue.length-Q.value.length))}}else this.toggleWord()},S.prototype.toggleWord=function(){var k=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var W=this.getSelectedText(),V=this.selection.getWordRange().start.column,G=W.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Q=N-V-1;Q<0&&(Q=0);var te=0,he=0,ne=this;W.match(/[A-Za-z0-9_]+/)&&G.forEach(function(Ke,at){he=te+Ke.length,Q>=te&&Q<=he&&(W=Ke,ne.selection.clearSelection(),ne.moveCursorTo(k,te+V),ne.selection.selectTo(k,he+V)),te=he});for(var ue=this.$toggleWordPairs,le,ce=0;ce<ue.length;ce++)for(var ve=ue[ce],Ce=0;Ce<=1;Ce++){var $e=+!Ce,Te=W.match(new RegExp("^\\s?_?("+p.escapeRegExp(ve[Ce])+")\\s?$","i"));if(Te){var qe=W.match(new RegExp("([_]|^|\\s)("+p.escapeRegExp(Te[1])+")($|\\s)","g"));qe&&(le=W.replace(new RegExp(p.escapeRegExp(ve[Ce]),"i"),function(Ke){var at=ve[$e];return Ke.toUpperCase()==Ke?at=at.toUpperCase():Ke.charAt(0).toUpperCase()==Ke.charAt(0)&&(at=at.substr(0,0)+ve[$e].charAt(0).toUpperCase()+at.substr(1)),at}),this.insert(le),le="")}}},S.prototype.findLinkAt=function(k,N){var W,V,G=this.session.getLine(k),Q=G.split(/((?:https?|ftp):\/\/[\S]+)/),te=N;te<0&&(te=0);var he=0,ne=0,ue;try{for(var le=b(Q),ce=le.next();!ce.done;ce=le.next()){var ve=ce.value;if(ne=he+ve.length,te>=he&&te<=ne&&ve.match(/((?:https?|ftp):\/\/[\S]+)/)){ue=ve.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch(Ce){W={error:Ce}}finally{try{ce&&!ce.done&&(V=le.return)&&V.call(le)}finally{if(W)throw W.error}}return ue},S.prototype.openLink=function(){var k=this.selection.getCursor(),N=this.findLinkAt(k.row,k.column);return N&&window.open(N,"_blank"),N!=null},S.prototype.removeLines=function(){var k=this.$getSelectedRows();this.session.removeFullLines(k.first,k.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var k=this.selection,N=this.session,W=k.getRange(),V=k.isBackwards();if(W.isEmpty()){var G=W.start.row;N.duplicateLines(G,G)}else{var Q=V?W.start:W.end,te=N.insert(Q,N.getTextRange(W));W.start=Q,W.end=te,k.setSelectionRange(W,V)}},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(k,N,W){return this.session.moveText(k,N,W)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(k,N){var W,V,G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var Q=G.toOrientedRange();W=this.$getSelectedRows(Q),V=this.session.$moveLines(W.first,W.last,N?0:k),N&&k==-1&&(V=0),Q.moveBy(V,0),G.fromOrientedRange(Q)}else{var te=G.rangeList.ranges;G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,ue=te.length,le=0;le<ue;le++){var ce=le;te[le].moveBy(he,0),W=this.$getSelectedRows(te[le]);for(var ve=W.first,Ce=W.last;++le<ue;){ne&&te[le].moveBy(ne,0);var $e=this.$getSelectedRows(te[le]);if(N&&$e.first!=Ce)break;if(!N&&$e.first>Ce+1)break;Ce=$e.last}for(le--,he=this.session.$moveLines(ve,Ce,N?0:k),N&&k==-1&&(ce=le+1);ce<=le;)te[ce].moveBy(he,0),ce++;N||(he=0),ne+=he}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(k){return k=(k||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(k.start.row),last:this.session.getRowFoldEnd(k.end.row)}},S.prototype.onCompositionStart=function(k){this.renderer.showComposition(k)},S.prototype.onCompositionUpdate=function(k){this.renderer.setCompositionText(k)},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(k){return k>=this.getFirstVisibleRow()&&k<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(k){return k>=this.renderer.getFirstFullyVisibleRow()&&k<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(k,N){var W=this.renderer,V=this.renderer.layerConfig,G=k*Math.floor(V.height/V.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(G,0)}):N===!1&&(this.selection.moveCursorBy(G,0),this.selection.clearSelection());var Q=W.scrollTop;W.scrollBy(0,G*V.lineHeight),N!=null&&W.scrollCursorIntoView(null,.5),W.animateScrolling(Q)},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(k){this.renderer.scrollToRow(k)},S.prototype.scrollToLine=function(k,N,W,V){this.renderer.scrollToLine(k,N,W,V)},S.prototype.centerSelection=function(){var k=this.getSelectionRange(),N={row:Math.floor(k.start.row+(k.end.row-k.start.row)/2),column:Math.floor(k.start.column+(k.end.column-k.start.column)/2)};this.renderer.alignCursor(N,.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(k,N){this.selection.moveCursorTo(k,N)},S.prototype.moveCursorToPosition=function(k){this.selection.moveCursorToPosition(k)},S.prototype.jumpToMatching=function(k,N){var W=this.getCursorPosition(),V=new C(this.session,W.row,W.column),G=V.getCurrentToken(),Q=0;G&&G.type.indexOf("tag-name")!==-1&&(G=V.stepBackward());var te=G||V.stepForward();if(te){var he,ne=!1,ue={},le=W.column-te.start,ce,ve={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;le<te.value.length&&!ne;le++)if(ve[te.value[le]])switch(ce=ve[te.value[le]]+"."+te.type.replace("rparen","lparen"),isNaN(ue[ce])&&(ue[ce]=0),te.value[le]){case"(":case"[":case"{":ue[ce]++;break;case")":case"]":case"}":ue[ce]--,ue[ce]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(ue[te.value])&&(ue[te.value]=0),G.value==="<"&&Q>1?ue[te.value]++:G.value==="</"&&ue[te.value]--,ue[te.value]===-1&&(he="tag",ne=!0));ne||(G=te,Q++,te=V.stepForward(),le=0)}while(te&&!ne);if(he){var Ce,$e;if(he==="bracket")Ce=this.session.getBracketRange(W),Ce||(Ce=new h(V.getCurrentTokenRow(),V.getCurrentTokenColumn()+le-1,V.getCurrentTokenRow(),V.getCurrentTokenColumn()+le-1),$e=Ce.start,(N||$e.row===W.row&&Math.abs($e.column-W.column)<2)&&(Ce=this.session.getBracketRange($e)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(Ce=new h(V.getCurrentTokenRow(),V.getCurrentTokenColumn()-2,V.getCurrentTokenRow(),V.getCurrentTokenColumn()-2),Ce.compare(W.row,W.column)===0){var Te=this.session.getMatchingTags(W);Te&&(Te.openTag.contains(W.row,W.column)?(Ce=Te.closeTag,$e=Ce.start):(Ce=Te.openTag,Te.closeTag.start.row===W.row&&Te.closeTag.start.column===W.column?$e=Ce.end:$e=Ce.start))}$e=$e||Ce.start}$e=Ce&&Ce.cursor||$e,$e&&(k?Ce&&N?this.selection.setRange(Ce):Ce&&Ce.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo($e.row,$e.column):this.selection.moveTo($e.row,$e.column))}}},S.prototype.gotoLine=function(k,N,W){this.selection.clearSelection(),this.session.unfold({row:k-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(k-1,N||0),this.isRowFullyVisible(k-1)||this.scrollToLine(k-1,!0,W)},S.prototype.navigateTo=function(k,N){this.selection.moveTo(k,N)},S.prototype.navigateUp=function(k){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-k||-1,0)},S.prototype.navigateDown=function(k){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(k||1,0)},S.prototype.navigateLeft=function(k){if(this.selection.isEmpty())for(k=k||1;k--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},S.prototype.navigateRight=function(k){if(this.selection.isEmpty())for(k=k||1;k--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}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(k,N){N&&this.$search.set(N);var W=this.$search.find(this.session),V=0;return W&&(this.$tryReplace(W,k)&&(V=1),this.selection.setSelectionRange(W),this.renderer.scrollSelectionIntoView(W.start,W.end)),V},S.prototype.replaceAll=function(k,N){N&&this.$search.set(N);var W=this.$search.findAll(this.session),V=0;if(!W.length)return V;var G=this.getSelectionRange();this.selection.moveTo(0,0);for(var Q=W.length-1;Q>=0;--Q)this.$tryReplace(W[Q],k)&&V++;return this.selection.setSelectionRange(G),V},S.prototype.$tryReplace=function(k,N){var W=this.session.getTextRange(k);return N=this.$search.replace(W,N),N!==null?(k.end=this.session.replace(k,N),k):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(k,N,W){N||(N={}),typeof k=="string"||k instanceof RegExp?N.needle=k:typeof k=="object"&&w.mixin(N,k);var V=this.selection.getRange();N.needle==null&&(k=this.session.getTextRange(V)||this.$search.$options.needle,k||(V=this.session.getWordRange(V.start.row,V.start.column),k=this.session.getTextRange(V)),this.$search.set({needle:k})),this.$search.set(N),N.start||this.$search.set({start:V});var G=this.$search.find(this.session);if(N.preventScroll)return G;if(G)return this.revealRange(G,W),G;N.backwards?V.start=V.end:V.end=V.start,this.selection.setRange(V)},S.prototype.findNext=function(k,N){this.find({skipCurrent:!0,backwards:!1},k,N)},S.prototype.findPrevious=function(k,N){this.find(k,{skipCurrent:!0,backwards:!0},N)},S.prototype.revealRange=function(k,N){this.session.unfold(k),this.selection.setSelectionRange(k);var W=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(k.start,k.end,.5),N!==!1&&this.renderer.animateScrolling(W)},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.$toDestroy&&(this.$toDestroy.forEach(function(k){k.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},S.prototype.setAutoScrollEditorIntoView=function(k){if(k){var N,W=this,V=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var G=this.$scrollAnchor;G.style.cssText="position:absolute",this.container.insertBefore(G,this.container.firstChild);var Q=this.on("changeSelection",function(){V=!0}),te=this.renderer.on("beforeRender",function(){V&&(N=W.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(V&&N&&(W.isFocused()||W.searchBox&&W.searchBox.isFocused())){var ne=W.renderer,ue=ne.$cursorLayer.$pixelPos,le=ne.layerConfig,ce=ue.top-le.offset;ue.top>=0&&ce+N.top<0?V=!0:ue.top<le.height&&ue.top+N.top+le.lineHeight>window.innerHeight?V=!1:V=null,V!=null&&(G.style.top=ce+"px",G.style.left=ue.left+"px",G.style.height=le.lineHeight+"px",G.scrollIntoView(V)),V=N=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Q),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},S.prototype.$resetCursorStyle=function(){var k=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(k)),N.isBlinking=!this.$readOnly&&k!="wide",_.setCssClass(N.element,"ace_slim-cursors",/slim/.test(k)))},S.prototype.prompt=function(k,N,W){var V=this;$.loadModule("ace/ext/prompt",function(G){G.prompt(V,k,N,W)})},S}();P.$uid=0,P.prototype.curOp=null,P.prototype.prevOp={},P.prototype.$mergeableCommands=["backspace","del","insertstring"],P.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(P.prototype,m),$.defineOptions(P.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 k=this;this.textInput.setReadOnly(S),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(W){var V=!1;if(W&&W.type=="keydown"){if(V=W&&W.key&&W.key.length==1&&!W.ctrlKey&&!W.metaKey,!V)return}else W&&W.type!=="exec"&&(V=!0);if(V){k.hoverTooltip||(k.hoverTooltip=new U);var G=_.createElement("div");G.textContent=L("editor.tooltip.disable-editing","Editing is disabled"),k.hoverTooltip.isOpen||k.hoverTooltip.showForRange(k,k.getSelectionRange(),G)}else k.hoverTooltip&&k.hoverTooltip.isOpen&&k.hoverTooltip.hide()});var N=this.textInput.getElement();S?(E.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(E.removeListener(N,"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 k=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(k&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),_.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!k&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),_.addCssClass(this.container,"ace_hasPlaceholder");var N=_.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!k&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(S){var k={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(V){V.blur(),V.renderer.scroller.focus()},readOnly:!0},N=function(V){if(V.target==this.renderer.scroller&&V.keyCode===F.enter){V.preventDefault();var G=this.getCursorPosition().row;this.isRowVisible(G)||this.scrollToLine(G,!0,!0),this.focus()}},W;S?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(g.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",L("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",L("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",N.bind(this)),this.commands.addCommand(k),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",L("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",L("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),W||(W=new v(this)),W.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",N.bind(this)),this.commands.removeCommand(k),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),W&&W.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",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(S,k){return(Math.abs(S.selection.lead.row-k)||k+1+(k<9?"·":""))+""},getWidth:function(S,k,N){return Math.max(k.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(S,k){k.renderer.$loop.schedule(k.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)}};l.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,l,T){var b=e("../lib/dom"),w=function(){function _(p,g){this.element=p,this.canvasHeight=g||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return _.prototype.moveContainer=function(p){b.translate(this.element,0,-(p.firstRowScreen*p.lineHeight%this.canvasHeight)-p.offset*this.$offsetCoefficient)},_.prototype.pageChanged=function(p,g){return Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)!==Math.floor(g.firstRowScreen*g.lineHeight/this.canvasHeight)},_.prototype.computeLineTop=function(p,g,r){var a=g.firstRowScreen*g.lineHeight,o=Math.floor(a/this.canvasHeight),i=r.documentToScreenRow(p,0)*g.lineHeight;return i-o*this.canvasHeight},_.prototype.computeLineHeight=function(p,g,r){return g.lineHeight*r.getRowLineCount(p)},_.prototype.getLength=function(){return this.cells.length},_.prototype.get=function(p){return this.cells[p]},_.prototype.shift=function(){this.$cacheCell(this.cells.shift())},_.prototype.pop=function(){this.$cacheCell(this.cells.pop())},_.prototype.push=function(p){if(Array.isArray(p)){this.cells.push.apply(this.cells,p);for(var g=b.createFragment(this.element),r=0;r<p.length;r++)g.appendChild(p[r].element);this.element.appendChild(g)}else this.cells.push(p),this.element.appendChild(p.element)},_.prototype.unshift=function(p){if(Array.isArray(p)){this.cells.unshift.apply(this.cells,p);for(var g=b.createFragment(this.element),r=0;r<p.length;r++)g.appendChild(p[r].element);this.element.firstChild?this.element.insertBefore(g,this.element.firstChild):this.element.appendChild(g)}else this.cells.unshift(p),this.element.insertAdjacentElement("afterbegin",p.element)},_.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},_.prototype.$cacheCell=function(p){p&&(p.element.remove(),this.cellCache.push(p))},_.prototype.createCell=function(p,g,r,a){var o=this.cellCache.pop();if(!o){var i=b.createElement("div");a&&a(i),this.element.appendChild(i),o={element:i,text:"",row:p}}return o.row=p,o},_}();l.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(e,l,T){var b=e("../lib/dom"),w=e("../lib/oop"),_=e("../lib/lang"),p=e("../lib/event_emitter").EventEmitter,g=e("./lines").Lines,r=e("../config").nls,a=function(){function i(n){this.element=b.createElement("div"),this.element.className="ace_layer ace_gutter-layer",n.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new g(this.element),this.$lines.$offsetCoefficient=1}return i.prototype.setSession=function(n){this.session&&this.session.off("change",this.$updateAnnotations),this.session=n,n&&n.on("change",this.$updateAnnotations)},i.prototype.addGutterDecoration=function(n,s){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(n,s)},i.prototype.removeGutterDecoration=function(n,s){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(n,s)},i.prototype.setAnnotations=function(n){this.$annotations=[];for(var s=0;s<n.length;s++){var h=n[s],m=h.row,y=this.$annotations[m];y||(y=this.$annotations[m]={text:[],type:[],displayText:[]});var R=h.text,$=h.text,C=h.type;R=R?_.escapeHTML(R):h.html||"",$=$||h.html||"",y.text.indexOf(R)===-1&&(y.text.push(R),y.type.push(C),y.displayText.push($));var v=h.className;v?y.className=v:C==="error"?y.className=" ace_error":C==="security"&&!/\bace_error\b/.test(y.className)?y.className=" ace_security":C==="warning"&&!/\bace_(error|security)\b/.test(y.className)?y.className=" ace_warning":C==="info"&&!y.className?y.className=" ace_info":C==="hint"&&!y.className&&(y.className=" ace_hint")}},i.prototype.$updateAnnotations=function(n){if(this.$annotations.length){var s=n.start.row,h=n.end.row-s;if(h!==0)if(n.action=="remove")this.$annotations.splice(s,h+1,null);else{var m=new Array(h+1);m.unshift(s,1),this.$annotations.splice.apply(this.$annotations,m)}}},i.prototype.update=function(n){this.config=n;var s=this.session,h=n.firstRow,m=Math.min(n.lastRow+n.gutterOffset,s.getLength()-1);this.oldLastRow=m,this.config=n,this.$lines.moveContainer(n),this.$updateCursorRow();for(var y=s.getNextFoldLine(h),R=y?y.start.row:1/0,$=null,C=-1,v=h;;){if(v>R&&(v=y.end.row+1,y=s.getNextFoldLine(v,y),R=y?y.start.row:1/0),v>m){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}$=this.$lines.get(++C),$?$.row=v:($=this.$lines.createCell(v,n,this.session,o),this.$lines.push($)),this.$renderCell($,n,y,v),v++}this._signal("afterRender"),this.$updateGutterWidth(n)},i.prototype.$updateGutterWidth=function(n){var s=this.session,h=s.gutterRenderer||this.$renderer,m=s.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||s.$useWrapMode)&&(y=s.getLength()+m-1);var R=h?h.getWidth(s,y,n):y.toString().length*n.characterWidth,$=this.$padding||this.$computePadding();R+=$.left+$.right,R!==this.gutterWidth&&!isNaN(R)&&(this.gutterWidth=R,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",R))},i.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var n=this.session.selection.getCursor();this.$cursorRow!==n.row&&(this.$cursorRow=n.row)}},i.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var n=this.session.selection.cursor.row;if(this.$cursorRow=n,!(this.$cursorCell&&this.$cursorCell.row==n)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var s=this.$lines.cells;this.$cursorCell=null;for(var h=0;h<s.length;h++){var m=s[h];if(m.row>=this.$cursorRow){if(m.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(h>0&&y&&y.start.row==s[h-1].row)m=s[h-1];else break}m.element.className="ace_gutter-active-line "+m.element.className,this.$cursorCell=m;break}}}}},i.prototype.scrollLines=function(n){var s=this.config;if(this.config=n,this.$updateCursorRow(),this.$lines.pageChanged(s,n))return this.update(n);this.$lines.moveContainer(n);var h=Math.min(n.lastRow+n.gutterOffset,this.session.getLength()-1),m=this.oldLastRow;if(this.oldLastRow=h,!s||m<n.firstRow)return this.update(n);if(h<s.firstRow)return this.update(n);if(s.firstRow<n.firstRow)for(var y=this.session.getFoldedRowCount(s.firstRow,n.firstRow-1);y>0;y--)this.$lines.shift();if(m>h)for(var y=this.session.getFoldedRowCount(h+1,m);y>0;y--)this.$lines.pop();n.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLines(n,n.firstRow,s.firstRow-1)),h>m&&this.$lines.push(this.$renderLines(n,m+1,h)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(n)},i.prototype.$renderLines=function(n,s,h){for(var m=[],y=s,R=this.session.getNextFoldLine(y),$=R?R.start.row:1/0;y>$&&(y=R.end.row+1,R=this.session.getNextFoldLine(y,R),$=R?R.start.row:1/0),!(y>h);){var C=this.$lines.createCell(y,n,this.session,o);this.$renderCell(C,n,R,y),m.push(C),y++}return m},i.prototype.$renderCell=function(n,s,h,m){var y=n.element,R=this.session,$=y.childNodes[0],C=y.childNodes[1],v=y.childNodes[2],L=v.firstChild,I=R.$firstLineNumber,F=R.$breakpoints,E=R.$decorations,U=R.gutterRenderer||this.$renderer,P=this.$showFoldWidgets&&R.foldWidgets,O=h?h.start.row:Number.MAX_VALUE,S=s.lineHeight+"px",k=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",N=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",W=(U?U.getText(R,m):m+I).toString();if(this.$highlightGutterLine&&(m==this.$cursorRow||h&&m<this.$cursorRow&&m>=O&&this.$cursorRow<=h.end.row)&&(k+="ace_gutter-active-line ",this.$cursorCell!=n&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=n)),F[m]&&(k+=F[m]),E[m]&&(k+=E[m]),this.$annotations[m]&&m!==O&&(k+=this.$annotations[m].className),P){var V=P[m];V==null&&(V=P[m]=R.getFoldWidget(m))}if(V){var G="ace_fold-widget ace_"+V,Q=V=="start"&&m==O&&m<h.end.row;if(Q){G+=" ace_closed";for(var te="",he=!1,ne=m+1;ne<=h.end.row;ne++)if(this.$annotations[ne]){if(this.$annotations[ne].className===" ace_error"){he=!0,te=" ace_error_fold";break}this.$annotations[ne].className===" ace_security"?(he=!0,te=" ace_security_fold"):this.$annotations[ne].className===" ace_warning"&&te!==" ace_security_fold"&&(he=!0,te=" ace_warning_fold")}k+=te}else G+=" ace_open";C.className!=G&&(C.className=G),b.setStyle(C.style,"height",S),b.setStyle(C.style,"display","inline-block"),C.setAttribute("role","button"),C.setAttribute("tabindex","-1");var ue=R.getFoldWidgetRange(m);ue?C.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.end.row+1])):h?C.setAttribute("aria-label",r("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[h.start.row+1,h.end.row+1])):C.setAttribute("aria-label",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[m+1])),Q?(C.setAttribute("aria-expanded","false"),C.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):(C.setAttribute("aria-expanded","true"),C.setAttribute("title",r("gutter.code-folding.open.title","Fold code")))}else C&&(b.setStyle(C.style,"display","none"),C.setAttribute("tabindex","0"),C.removeAttribute("role"),C.removeAttribute("aria-label"));if(he&&this.$showFoldedAnnotations){v.className="ace_gutter_annotation",L.className=N,L.className+=te,b.setStyle(L.style,"height",S),b.setStyle(v.style,"display","block"),b.setStyle(v.style,"height",S);var le;switch(te){case" ace_error_fold":le=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[W]);break;case" ace_security_fold":le=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[W]);break;case" ace_warning_fold":le=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[W]);break}v.setAttribute("aria-label",le),v.setAttribute("tabindex","-1"),v.setAttribute("role","button")}else if(this.$annotations[m]){v.className="ace_gutter_annotation",L.className=N,this.$useSvgGutterIcons?L.className+=this.$annotations[m].className:y.classList.add(this.$annotations[m].className.replace(" ","")),b.setStyle(L.style,"height",S),b.setStyle(v.style,"display","block"),b.setStyle(v.style,"height",S);var le;switch(this.$annotations[m].className){case" ace_error":le=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[W]);break;case" ace_security":le=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[W]);break;case" ace_warning":le=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[W]);break;case" ace_info":le=r("gutter.annotation.aria-label.info","Info, read annotations row $0",[W]);break;case" ace_hint":le=r("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[W]);break}v.setAttribute("aria-label",le),v.setAttribute("tabindex","-1"),v.setAttribute("role","button")}else b.setStyle(v.style,"display","none"),v.removeAttribute("aria-label"),v.removeAttribute("role"),v.setAttribute("tabindex","0");return W!==$.data&&($.data=W),y.className!=k&&(y.className=k),b.setStyle(n.element.style,"height",this.$lines.computeLineHeight(m,s,R)+"px"),b.setStyle(n.element.style,"top",this.$lines.computeLineTop(m,s,R)+"px"),n.text=W,v.style.display==="none"&&C.style.display==="none"?n.element.setAttribute("aria-hidden",!0):n.element.setAttribute("aria-hidden",!1),n},i.prototype.setHighlightGutterLine=function(n){this.$highlightGutterLine=n},i.prototype.setShowLineNumbers=function(n){this.$renderer=!n&&{getWidth:function(){return 0},getText:function(){return""}}},i.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},i.prototype.setShowFoldWidgets=function(n){n?b.addCssClass(this.element,"ace_folding-enabled"):b.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=n,this.$padding=null},i.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},i.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var n=b.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(n.borderLeftWidth)||0)+(parseInt(n.paddingLeft)||0)+1,this.$padding.right=(parseInt(n.borderRightWidth)||0)+(parseInt(n.paddingRight)||0),this.$padding},i.prototype.getRegion=function(n){var s=this.$padding||this.$computePadding(),h=this.element.getBoundingClientRect();if(n.x<s.left+h.left)return"markers";if(this.$showFoldWidgets&&n.x>h.right-s.right)return"foldWidgets"},i}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,w.implement(a.prototype,p);function o(i){var n=document.createTextNode("");i.appendChild(n);var s=b.createElement("span");i.appendChild(s);var h=b.createElement("span");i.appendChild(h);var m=b.createElement("span");return h.appendChild(m),i}l.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,l,T){var b=e("../range").Range,w=e("../lib/dom"),_=function(){function g(r){this.element=w.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return g.prototype.setPadding=function(r){this.$padding=r},g.prototype.setSession=function(r){this.session=r},g.prototype.setMarkers=function(r){this.markers=r},g.prototype.elt=function(r,a){var o=this.i!=-1&&this.element.childNodes[this.i];o?this.i++:(o=document.createElement("div"),this.element.appendChild(o),this.i=-1),o.style.cssText=a,o.className=r},g.prototype.update=function(r){if(r){this.config=r,this.i=0;var a;for(var o in this.markers){var i=this.markers[o];if(!i.range){i.update(a,this,this.session,r);continue}var n=i.range.clipRows(r.firstRow,r.lastRow);if(!n.isEmpty())if(n=n.toScreenRange(this.session),i.renderer){var s=this.$getTop(n.start.row,r),h=this.$padding+n.start.column*r.characterWidth;i.renderer(a,n,h,s,r)}else i.type=="fullLine"?this.drawFullLineMarker(a,n,i.clazz,r):i.type=="screenLine"?this.drawScreenLineMarker(a,n,i.clazz,r):n.isMultiLine()?i.type=="text"?this.drawTextMarker(a,n,i.clazz,r):this.drawMultiLineMarker(a,n,i.clazz,r):this.drawSingleLineMarker(a,n,i.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},g.prototype.$getTop=function(r,a){return(r-a.firstRowScreen)*a.lineHeight},g.prototype.drawTextMarker=function(r,a,o,i,n){for(var s=this.session,h=a.start.row,m=a.end.row,y=h,R=0,$=0,C=s.getScreenLastRowColumn(y),v=new b(y,a.start.column,y,$);y<=m;y++)v.start.row=v.end.row=y,v.start.column=y==h?a.start.column:s.getRowWrapIndent(y),v.end.column=C,R=$,$=C,C=y+1<m?s.getScreenLastRowColumn(y+1):y==m?0:a.end.column,this.drawSingleLineMarker(r,v,o+(y==h?" ace_start":"")+" ace_br"+p(y==h||y==h+1&&a.start.column,R<$,$>C,y==m),i,y==m?0:1,n)},g.prototype.drawMultiLineMarker=function(r,a,o,i,n){var s=this.$padding,h=i.lineHeight,m=this.$getTop(a.start.row,i),y=s+a.start.column*i.characterWidth;if(n=n||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var R=a.clone();R.end.row=R.start.row,R.end.column=this.session.getLine(R.start.row).length,this.drawBidiSingleLineMarker(r,R,o+" ace_br1 ace_start",i,null,n)}else this.elt(o+" ace_br1 ace_start","height:"+h+"px;right:"+s+"px;top:"+m+"px;left:"+y+"px;"+(n||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var R=a.clone();R.start.row=R.end.row,R.start.column=0,this.drawBidiSingleLineMarker(r,R,o+" ace_br12",i,null,n)}else{m=this.$getTop(a.end.row,i);var $=a.end.column*i.characterWidth;this.elt(o+" ace_br12","height:"+h+"px;width:"+$+"px;top:"+m+"px;left:"+s+"px;"+(n||""))}if(h=(a.end.row-a.start.row-1)*i.lineHeight,!(h<=0)){m=this.$getTop(a.start.row+1,i);var C=(a.start.column?1:0)|(a.end.column?0:8);this.elt(o+(C?" ace_br"+C:""),"height:"+h+"px;right:"+s+"px;top:"+m+"px;left:"+s+"px;"+(n||""))}},g.prototype.drawSingleLineMarker=function(r,a,o,i,n,s){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(r,a,o,i,n,s);var h=i.lineHeight,m=(a.end.column+(n||0)-a.start.column)*i.characterWidth,y=this.$getTop(a.start.row,i),R=this.$padding+a.start.column*i.characterWidth;this.elt(o,"height:"+h+"px;width:"+m+"px;top:"+y+"px;left:"+R+"px;"+(s||""))},g.prototype.drawBidiSingleLineMarker=function(r,a,o,i,n,s){var h=i.lineHeight,m=this.$getTop(a.start.row,i),y=this.$padding,R=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);R.forEach(function($){this.elt(o,"height:"+h+"px;width:"+($.width+(n||0))+"px;top:"+m+"px;left:"+(y+$.left)+"px;"+(s||""))},this)},g.prototype.drawFullLineMarker=function(r,a,o,i,n){var s=this.$getTop(a.start.row,i),h=i.lineHeight;a.start.row!=a.end.row&&(h+=this.$getTop(a.end.row,i)-s),this.elt(o,"height:"+h+"px;top:"+s+"px;left:0;right:0;"+(n||""))},g.prototype.drawScreenLineMarker=function(r,a,o,i,n){var s=this.$getTop(a.start.row,i),h=i.lineHeight;this.elt(o,"height:"+h+"px;top:"+s+"px;left:0;right:0;"+(n||""))},g}();_.prototype.$padding=0;function p(g,r,a,o){return(g?1:0)|(r?2:0)|(a?4:0)|(o?8:0)}l.Marker=_}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,l,T){var b=new Set(["text","rparen","lparen"]);l.isTextToken=function(w){return b.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(e,l,T){var b=e("../lib/oop"),w=e("../lib/dom"),_=e("../lib/lang"),p=e("./lines").Lines,g=e("../lib/event_emitter").EventEmitter,r=e("../config").nls,a=e("./text_util").isTextToken,o=function(){function i(n){this.dom=w,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",n.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new p(this.element)}return i.prototype.$updateEolChar=function(){var n=this.session.doc,s=n.getNewLineCharacter()==`
216
- `&&n.getNewLineMode()!="windows",h=s?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=h)return this.EOL_CHAR=h,!0},i.prototype.setPadding=function(n){this.$padding=n,this.element.style.margin="0 "+n+"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(n){this.$fontMetrics=n,this.$fontMetrics.on("changeCharacterSize",(function(s){this._signal("changeCharacterSize",s)}).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(n){this.session=n,n&&this.$computeTabString()},i.prototype.setShowInvisibles=function(n){return this.showInvisibles==n?!1:(this.showInvisibles=n,typeof n=="string"?(this.showSpaces=/tab/i.test(n),this.showTabs=/space/i.test(n),this.showEOL=/eol/i.test(n)):this.showSpaces=this.showTabs=this.showEOL=n,this.$computeTabString(),!0)},i.prototype.setDisplayIndentGuides=function(n){return this.displayIndentGuides==n?!1:(this.displayIndentGuides=n,this.$computeTabString(),!0)},i.prototype.setHighlightIndentGuides=function(n){return this.$highlightIndentGuides===n?!1:(this.$highlightIndentGuides=n,n)},i.prototype.$computeTabString=function(){var n=this.session.getTabSize();this.tabSize=n;for(var s=this.$tabStrings=[0],h=1;h<n+1;h++)if(this.showTabs){var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_tab",m.textContent=_.stringRepeat(this.TAB_CHAR,h),s.push(m)}else s.push(this.dom.createTextNode(_.stringRepeat(" ",h),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var y="ace_indent-guide",R=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?_.stringRepeat(this.SPACE_CHAR,this.tabSize):_.stringRepeat(" ",this.tabSize),C=this.showTabs?" ace_invisible ace_invisible_tab":"",v=this.showTabs?_.stringRepeat(this.TAB_CHAR,this.tabSize):$,m=this.dom.createElement("span");m.className=y+R,m.textContent=$,this.$tabStrings[" "]=m;var m=this.dom.createElement("span");m.className=y+C,m.textContent=v,this.$tabStrings[" "]=m}},i.prototype.updateLines=function(n,s,h){if(this.config.lastRow!=n.lastRow||this.config.firstRow!=n.firstRow)return this.update(n);this.config=n;for(var m=Math.max(s,n.firstRow),y=Math.min(h,n.lastRow),R=this.element.childNodes,$=0,v=n.firstRow;v<m;v++){var L=this.session.getFoldLine(v);if(L)if(L.containsRow(m)){m=L.start.row;break}else v=L.end.row;$++}for(var C=!1,v=m,L=this.session.getNextFoldLine(v),I=L?L.start.row:1/0;v>I&&(v=L.end.row+1,L=this.session.getNextFoldLine(v,L),I=L?L.start.row:1/0),!(v>y);){var F=R[$++];if(F){this.dom.removeChildren(F),this.$renderLine(F,v,v==I?L:!1),C&&(F.style.top=this.$lines.computeLineTop(v,n,this.session)+"px");var E=n.lineHeight*this.session.getRowLength(v)+"px";F.style.height!=E&&(C=!0,F.style.height=E)}v++}if(C)for(;$<this.$lines.cells.length;){var U=this.$lines.cells[$++];U.element.style.top=this.$lines.computeLineTop(U.row,n,this.session)+"px"}},i.prototype.scrollLines=function(n){var s=this.config;if(this.config=n,this.$lines.pageChanged(s,n))return this.update(n);this.$lines.moveContainer(n);var h=n.lastRow,m=s?s.lastRow:-1;if(!s||m<n.firstRow)return this.update(n);if(h<s.firstRow)return this.update(n);if(!s||s.lastRow<n.firstRow)return this.update(n);if(n.lastRow<s.firstRow)return this.update(n);if(s.firstRow<n.firstRow)for(var y=this.session.getFoldedRowCount(s.firstRow,n.firstRow-1);y>0;y--)this.$lines.shift();if(s.lastRow>n.lastRow)for(var y=this.session.getFoldedRowCount(n.lastRow+1,s.lastRow);y>0;y--)this.$lines.pop();n.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLinesFragment(n,n.firstRow,s.firstRow-1)),n.lastRow>s.lastRow&&this.$lines.push(this.$renderLinesFragment(n,s.lastRow+1,n.lastRow)),this.$highlightIndentGuide()},i.prototype.$renderLinesFragment=function(n,s,h){for(var m=[],y=s,R=this.session.getNextFoldLine(y),$=R?R.start.row:1/0;y>$&&(y=R.end.row+1,R=this.session.getNextFoldLine(y,R),$=R?R.start.row:1/0),!(y>h);){var C=this.$lines.createCell(y,n,this.session),v=C.element;this.dom.removeChildren(v),w.setStyle(v.style,"height",this.$lines.computeLineHeight(y,n,this.session)+"px"),w.setStyle(v.style,"top",this.$lines.computeLineTop(y,n,this.session)+"px"),this.$renderLine(v,y,y==$?R:!1),this.$useLineGroups()?v.className="ace_line_group":v.className="ace_line",m.push(C),y++}return m},i.prototype.update=function(n){this.$lines.moveContainer(n),this.config=n;for(var s=n.firstRow,h=n.lastRow,m=this.$lines;m.getLength();)m.pop();m.push(this.$renderLinesFragment(n,s,h))},i.prototype.$renderToken=function(n,s,h,m){for(var y=this,R=/(\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,$=this.dom.createFragment(this.element),C,v=0;C=R.exec(m);){var L=C[1],I=C[2],F=C[3],E=C[4],U=C[5];if(!(!y.showSpaces&&I)){var P=v!=C.index?m.slice(v,C.index):"";if(v=C.index+C[0].length,P&&$.appendChild(this.dom.createTextNode(P,this.element)),L){var O=y.session.getScreenTabSize(s+C.index);$.appendChild(y.$tabStrings[O].cloneNode(!0)),s+=O-1}else if(I)if(y.showSpaces){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space",S.textContent=_.stringRepeat(y.SPACE_CHAR,I.length),$.appendChild(S)}else $.appendChild(this.dom.createTextNode(I,this.element));else if(F){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space ace_invalid",S.textContent=_.stringRepeat(y.SPACE_CHAR,F.length),$.appendChild(S)}else if(E){s+=1;var S=this.dom.createElement("span");S.style.width=y.config.characterWidth*2+"px",S.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",S.textContent=y.showSpaces?y.SPACE_CHAR:E,$.appendChild(S)}else if(U){s+=1;var S=this.dom.createElement("span");S.style.width=y.config.characterWidth*2+"px",S.className="ace_cjk",S.textContent=U,$.appendChild(S)}}}if($.appendChild(this.dom.createTextNode(v?m.slice(v):m,this.element)),a(h.type))n.appendChild($);else{var k="ace_"+h.type.replace(/\./g," ace_"),S=this.dom.createElement("span");h.type=="fold"&&(S.style.width=h.value.length*this.config.characterWidth+"px",S.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),S.className=k,S.appendChild($),n.appendChild(S)}return s+m.length},i.prototype.renderIndentGuide=function(n,s,h){var m=s.search(this.$indentGuideRe);if(m<=0||m>=h)return s;if(s[0]==" "){m-=m%this.tabSize;for(var y=m/this.tabSize,R=0;R<y;R++)n.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(m)}else if(s[0]==" "){for(var R=0;R<m;R++)n.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(m)}return this.$highlightIndentGuide(),s},i.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var n=this.session.doc.$lines;if(n){var s=this.session.selection.getCursor(),h=/^\s*/.exec(this.session.doc.getLine(s.row))[0].length,m=Math.floor(h/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:m,start:s.row};var y=this.session.$bracketHighlight;if(y){for(var R=this.session.$bracketHighlight.ranges,$=0;$<R.length;$++)if(s.row!==R[$].start.row){this.$highlightIndentGuideMarker.end=R[$].start.row+1,s.row>R[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&n[s.row]!==""&&s.column===n[s.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=s.row+1;$<n.length;$++){var C=n[$],v=/^\s*/.exec(C)[0].length;if(C!==""&&(this.$highlightIndentGuideMarker.end=$,v<=h))break}}this.$renderHighlightIndentGuide()}}},i.prototype.$clearActiveIndentGuide=function(){for(var n=this.element.querySelectorAll(".ace_indent-guide-active"),s=0;s<n.length;s++)n[s].classList.remove("ace_indent-guide-active")},i.prototype.$setIndentGuideActive=function(n,s){var h=this.session.doc.getLine(n.row);if(h!==""){var m=n.element;if(n.element.classList&&n.element.classList.contains("ace_line_group"))if(n.element.childNodes.length>0)m=n.element.childNodes[0];else return;var y=m.childNodes;if(y){var R=y[s-1];R&&R.classList&&R.classList.contains("ace_indent-guide")&&R.classList.add("ace_indent-guide-active")}}},i.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var n=this.$lines.cells;this.$clearActiveIndentGuide();var s=this.$highlightIndentGuideMarker.indentLevel;if(s!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var h=0;h<n.length;h++){var m=n[h];if(this.$highlightIndentGuideMarker.end&&m.row>=this.$highlightIndentGuideMarker.start+1){if(m.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,s)}}else for(var h=n.length-1;h>=0;h--){var m=n[h];if(this.$highlightIndentGuideMarker.end&&m.row<this.$highlightIndentGuideMarker.start){if(m.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,s)}}}},i.prototype.$createLineElement=function(n){var s=this.dom.createElement("div");return s.className="ace_line",s.style.height=this.config.lineHeight+"px",s},i.prototype.$renderWrappedLine=function(n,s,h){var m=0,y=0,R=h[0],$=0,C=this.$createLineElement();n.appendChild(C);for(var v=0;v<s.length;v++){var L=s[v],I=L.value;if(v==0&&this.displayIndentGuides){if(m=I.length,I=this.renderIndentGuide(C,I,R),!I)continue;m-=I.length}if(m+I.length<R)$=this.$renderToken(C,$,L,I),m+=I.length;else{for(;m+I.length>=R;)$=this.$renderToken(C,$,L,I.substring(0,R-m)),I=I.substring(R-m),m=R,C=this.$createLineElement(),n.appendChild(C),C.appendChild(this.dom.createTextNode(_.stringRepeat(" ",h.indent),this.element)),y++,$=0,R=h[y]||Number.MAX_VALUE;I.length!=0&&(m+=I.length,$=this.$renderToken(C,$,L,I))}}h[h.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,$,null,"",!0)},i.prototype.$renderSimpleLine=function(n,s){for(var h=0,m=0;m<s.length;m++){var y=s[m],R=y.value;if(!(m==0&&this.displayIndentGuides&&(R=this.renderIndentGuide(n,R),!R))){if(h+R.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(n,h,y,R);h=this.$renderToken(n,h,y,R)}}},i.prototype.$renderOverflowMessage=function(n,s,h,m,y){h&&this.$renderToken(n,s,h,m.slice(0,this.MAX_LINE_LENGTH-s));var R=this.dom.createElement("span");R.className="ace_inline_button ace_keyword ace_toggle_wrap",R.textContent=y?"<hide>":"<click to see more...>",n.appendChild(R)},i.prototype.$renderLine=function(n,s,h){if(!h&&h!=!1&&(h=this.session.getFoldLine(s)),h)var m=this.$getFoldLineTokens(s,h);else var m=this.session.getTokens(s);var y=n;if(m.length){var R=this.session.getRowSplitData(s);if(R&&R.length){this.$renderWrappedLine(n,m,R);var y=n.lastChild}else{var y=n;this.$useLineGroups()&&(y=this.$createLineElement(),n.appendChild(y)),this.$renderSimpleLine(y,m)}}else this.$useLineGroups()&&(y=this.$createLineElement(),n.appendChild(y));if(this.showEOL&&y){h&&(s=h.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=s==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild($)}},i.prototype.$getFoldLineTokens=function(n,s){var h=this.session,m=[];function y($,C,v){for(var L=0,I=0;I+$[L].value.length<C;)if(I+=$[L].value.length,L++,L==$.length)return;if(I!=C){var F=$[L].value.substring(C-I);F.length>v-C&&(F=F.substring(0,v-C)),m.push({type:$[L].type,value:F}),I=C+F.length,L+=1}for(;I<v&&L<$.length;){var F=$[L].value;F.length+I>v?m.push({type:$[L].type,value:F.substring(0,v-I)}):m.push($[L]),I+=F.length,L+=1}}var R=h.getTokens(n);return s.walk(function($,C,v,L,I){$!=null?m.push({type:"fold",value:$}):(I&&(R=h.getTokens(C)),R.length&&y(R,L,v))},s.end.row,this.session.getLine(s.end.row).length),m},i.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},i}();o.prototype.EOF_CHAR="¶",o.prototype.EOL_CHAR_LF="¬",o.prototype.EOL_CHAR_CRLF="¤",o.prototype.EOL_CHAR=o.prototype.EOL_CHAR_LF,o.prototype.TAB_CHAR="—",o.prototype.SPACE_CHAR="·",o.prototype.$padding=0,o.prototype.MAX_LINE_LENGTH=1e4,o.prototype.showInvisibles=!1,o.prototype.showSpaces=!1,o.prototype.showTabs=!1,o.prototype.showEOL=!1,o.prototype.displayIndentGuides=!0,o.prototype.$highlightIndentGuides=!0,o.prototype.$tabStrings=[],o.prototype.destroy={},o.prototype.onChangeTabSize=o.prototype.$computeTabString,b.implement(o.prototype,g),l.Text=o}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,l,T){var b=e("../lib/dom"),w=function(){function _(p){this.element=b.createElement("div"),this.element.className="ace_layer ace_cursor-layer",p.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),b.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return _.prototype.$updateOpacity=function(p){for(var g=this.cursors,r=g.length;r--;)b.setStyle(g[r].style,"opacity",p?"":"0")},_.prototype.$startCssAnimation=function(){for(var p=this.cursors,g=p.length;g--;)p[g].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&b.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},_.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,b.removeCssClass(this.element,"ace_animate-blinking")},_.prototype.setPadding=function(p){this.$padding=p},_.prototype.setSession=function(p){this.session=p},_.prototype.setBlinking=function(p){p!=this.isBlinking&&(this.isBlinking=p,this.restartTimer())},_.prototype.setBlinkInterval=function(p){p!=this.blinkInterval&&(this.blinkInterval=p,this.restartTimer())},_.prototype.setSmoothBlinking=function(p){p!=this.smoothBlinking&&(this.smoothBlinking=p,b.setCssClass(this.element,"ace_smooth-blinking",p),this.$updateCursors(!0),this.restartTimer())},_.prototype.addCursor=function(){var p=b.createElement("div");return p.className="ace_cursor",this.element.appendChild(p),this.cursors.push(p),p},_.prototype.removeCursor=function(){if(this.cursors.length>1){var p=this.cursors.pop();return p.parentNode.removeChild(p),p}},_.prototype.hideCursor=function(){this.isVisible=!1,b.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},_.prototype.showCursor=function(){this.isVisible=!0,b.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},_.prototype.restartTimer=function(){var p=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,b.removeCssClass(this.element,"ace_smooth-blinking")),p(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&b.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),b.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var g=(function(){this.timeoutId=setTimeout(function(){p(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){p(!0),g()},this.blinkInterval),g()}},_.prototype.getPixelPosition=function(p,g){if(!this.config||!this.session)return{left:0,top:0};p||(p=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(p),a=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,p.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),o=(r.row-(g?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:o}},_.prototype.isCursorInView=function(p,g){return p.top>=0&&p.top<g.maxHeight},_.prototype.update=function(p){this.config=p;var g=this.session.$selectionMarkers,r=0,a=0;(g===void 0||g.length===0)&&(g=[{cursor:null}]);for(var r=0,o=g.length;r<o;r++){var i=this.getPixelPosition(g[r].cursor,!0);if(!((i.top>p.height+p.offset||i.top<0)&&r>1)){var n=this.cursors[a++]||this.addCursor(),s=n.style;this.drawCursor?this.drawCursor(n,i,p,g[r],this.session):this.isCursorInView(i,p)?(b.setStyle(s,"display","block"),b.translate(n,i.left,i.top),b.setStyle(s,"width",Math.round(p.characterWidth)+"px"),b.setStyle(s,"height",p.lineHeight+"px")):b.setStyle(s,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=i,this.restartTimer()},_.prototype.$setOverwrite=function(p){p!=this.overwrite&&(this.overwrite=p,p?b.addCssClass(this.element,"ace_overwrite-cursors"):b.removeCssClass(this.element,"ace_overwrite-cursors"))},_.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},_}();w.prototype.$padding=0,w.prototype.drawCursor=null,l.Cursor=w}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,l,T){var b=this&&this.__extends||function(){var n=function(s,h){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var R in y)Object.prototype.hasOwnProperty.call(y,R)&&(m[R]=y[R])},n(s,h)};return function(s,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");n(s,h);function m(){this.constructor=s}s.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}}(),w=e("./lib/oop"),_=e("./lib/dom"),p=e("./lib/event"),g=e("./lib/event_emitter").EventEmitter,r=32768,a=function(){function n(s,h){this.element=_.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+h,this.inner=_.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addListener(this.element,"scroll",this.onScroll.bind(this)),p.addListener(this.element,"mousedown",p.preventDefault)}return n.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},n}();w.implement(a.prototype,g);var o=function(n){b(s,n);function s(h,m){var y=n.call(this,h,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,m.$scrollbarWidth=y.width=_.scrollbarWidth(h.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return s.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var h=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-h)/(this.coeff-h)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(h){this.element.style.height=h+"px"},s.prototype.setScrollHeight=function(h){this.scrollHeight=h,h>r?(this.coeff=r/h,h=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=h+"px"},s.prototype.setScrollTop=function(h){this.scrollTop!=h&&(this.skipEvent=!0,this.scrollTop=h,this.element.scrollTop=h*this.coeff)},s}(a);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var i=function(n){b(s,n);function s(h,m){var y=n.call(this,h,"-h")||this;return y.scrollLeft=0,y.height=m.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return s.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.setWidth=function(h){this.element.style.width=h+"px"},s.prototype.setInnerWidth=function(h){this.inner.style.width=h+"px"},s.prototype.setScrollWidth=function(h){this.inner.style.width=h+"px"},s.prototype.setScrollLeft=function(h){this.scrollLeft!=h&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=h)},s}(a);l.ScrollBar=o,l.ScrollBarV=o,l.ScrollBarH=i,l.VScrollBar=o,l.HScrollBar=i}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,l,T){var b=this&&this.__extends||function(){var i=function(n,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,m){h.__proto__=m}||function(h,m){for(var y in m)Object.prototype.hasOwnProperty.call(m,y)&&(h[y]=m[y])},i(n,s)};return function(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(n,s);function h(){this.constructor=n}n.prototype=s===null?Object.create(s):(h.prototype=s.prototype,new h)}}(),w=e("./lib/oop"),_=e("./lib/dom"),p=e("./lib/event"),g=e("./lib/event_emitter").EventEmitter;_.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
217
- position: absolute;
218
- background: rgba(128, 128, 128, 0.6);
219
- -moz-box-sizing: border-box;
220
- box-sizing: border-box;
221
- border: 1px solid #bbb;
222
- border-radius: 2px;
223
- z-index: 8;
224
- }
225
- .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
226
- position: absolute;
227
- z-index: 6;
228
- background: none;
229
- overflow: hidden!important;
230
- }
231
- .ace_editor>.ace_sb-v {
232
- z-index: 6;
233
- right: 0;
234
- top: 0;
235
- width: 12px;
236
- }
237
- .ace_editor>.ace_sb-v div {
238
- z-index: 8;
239
- right: 0;
240
- width: 100%;
241
- }
242
- .ace_editor>.ace_sb-h {
243
- bottom: 0;
244
- left: 0;
245
- height: 12px;
246
- }
247
- .ace_editor>.ace_sb-h div {
248
- bottom: 0;
249
- height: 100%;
250
- }
251
- .ace_editor>.ace_sb_grabbed {
252
- z-index: 8;
253
- background: #000;
254
- }`,"ace_scrollbar.css",!1);var r=function(){function i(n,s){this.element=_.createElement("div"),this.element.className="ace_sb"+s,this.inner=_.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return i.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},i}();w.implement(r.prototype,g);var a=function(i){b(n,i);function n(s,h){var m=i.call(this,s,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,m.parent=s,m.width=m.VScrollWidth,m.renderer=h,m.inner.style.width=m.element.style.width=(m.width||15)+"px",m.$minWidth=0,m}return n.prototype.onMouseDown=function(s,h){if(s==="mousedown"&&!(p.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var m=this,y=h.clientY,R=function(E){y=E.clientY},$=function(){clearInterval(I)},C=h.clientY,v=this.thumbTop,L=function(){if(y!==void 0){var E=m.scrollTopFromThumbTop(v+y-C);E!==m.scrollTop&&m._emit("scroll",{data:E})}};p.capture(this.inner,R,$);var I=setInterval(L,20);return p.preventDefault(h)}var F=h.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(F)}),p.preventDefault(h)}},n.prototype.getHeight=function(){return this.height},n.prototype.scrollTopFromThumbTop=function(s){var h=s*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return h=h>>0,h<0?h=0:h>this.pageHeight-this.viewHeight&&(h=this.pageHeight-this.viewHeight),h},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(s){this.height=Math.max(0,s),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},n.prototype.setScrollHeight=function(s,h){this.pageHeight===s&&!h||(this.pageHeight=s,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})))},n.prototype.setScrollTop=function(s){this.scrollTop=s,s<0&&(s=0),this.thumbTop=s*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},n}(r);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var o=function(i){b(n,i);function n(s,h){var m=i.call(this,s,"-h")||this;return m.scrollLeft=0,m.scrollWidth=0,m.height=m.HScrollHeight,m.inner.style.height=m.element.style.height=(m.height||12)+"px",m.renderer=h,m}return n.prototype.onMouseDown=function(s,h){if(s==="mousedown"&&!(p.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var m=this,y=h.clientX,R=function(E){y=E.clientX},$=function(){clearInterval(I)},C=h.clientX,v=this.thumbLeft,L=function(){if(y!==void 0){var E=m.scrollLeftFromThumbLeft(v+y-C);E!==m.scrollLeft&&m._emit("scroll",{data:E})}};p.capture(this.inner,R,$);var I=setInterval(L,20);return p.preventDefault(h)}var F=h.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(F)}),p.preventDefault(h)}},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.scrollLeftFromThumbLeft=function(s){var h=s*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return h=h>>0,h<0?h=0:h>this.pageWidth-this.viewWidth&&(h=this.pageWidth-this.viewWidth),h},n.prototype.setWidth=function(s){this.width=Math.max(0,s),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},n.prototype.setScrollWidth=function(s,h){this.pageWidth===s&&!h||(this.pageWidth=s,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})))},n.prototype.setScrollLeft=function(s){this.scrollLeft=s,s<0&&(s=0),this.thumbLeft=s*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},n}(r);o.prototype.setInnerWidth=o.prototype.setScrollWidth,l.ScrollBar=a,l.ScrollBarV=a,l.ScrollBarH=o,l.VScrollBar=a,l.HScrollBar=o}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,l,T){var b=e("./lib/event"),w=function(){function _(p,g){this.onRender=p,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=g||window;var r=this;this._flush=function(a){r.pending=!1;var o=r.changes;if(o&&(b.blockIdle(100),r.changes=0,r.onRender(o)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return _.prototype.schedule=function(p){this.changes=this.changes|p,this.changes&&!this.pending&&(b.nextFrame(this._flush),this.pending=!0)},_.prototype.clear=function(p){var g=this.changes;return this.changes=0,g},_}();l.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(e,l,T){var b=e("../lib/oop"),w=e("../lib/dom"),_=e("../lib/lang"),p=e("../lib/event"),g=e("../lib/useragent"),r=e("../lib/event_emitter").EventEmitter,a=512,o=typeof ResizeObserver=="function",i=200,n=function(){function s(h){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),h.appendChild(this.el),this.$measureNode.textContent=_.stringRepeat("X",a),this.$characterSize={width:0,height:0},o?this.$addObserver():this.checkForSizeChanges()}return s.prototype.$setMeasureNodeStyles=function(h,m){h.width=h.height="auto",h.left=h.top="0px",h.visibility="hidden",h.position="absolute",h.whiteSpace="pre",g.isIE<8?h["font-family"]="inherit":h.font="inherit",h.overflow=m?"hidden":"visible"},s.prototype.checkForSizeChanges=function(h){if(h===void 0&&(h=this.$measureSizes()),h&&(this.$characterSize.width!==h.width||this.$characterSize.height!==h.height)){this.$measureNode.style.fontWeight="bold";var m=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=h,this.charSizes=Object.create(null),this.allowBoldFonts=m&&m.width===h.width&&m.height===h.height,this._emit("changeCharacterSize",{data:h})}},s.prototype.$addObserver=function(){var h=this;this.$observer=new window.ResizeObserver(function(m){h.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},s.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var h=this;return this.$pollSizeChangesTimer=p.onIdle(function m(){h.checkForSizeChanges(),p.onIdle(m,500)},500)},s.prototype.setPolling=function(h){h?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},s.prototype.$measureSizes=function(h){var m={height:(h||this.$measureNode).clientHeight,width:(h||this.$measureNode).clientWidth/a};return m.width===0||m.height===0?null:m},s.prototype.$measureCharWidth=function(h){this.$main.textContent=_.stringRepeat(h,a);var m=this.$main.getBoundingClientRect();return m.width/a},s.prototype.getCharacterWidth=function(h){var m=this.charSizes[h];return m===void 0&&(m=this.charSizes[h]=this.$measureCharWidth(h)/this.$characterSize.width),m},s.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},s.prototype.$getZoom=function(h){return!h||!h.parentElement?1:(Number(window.getComputedStyle(h).zoom)||1)*this.$getZoom(h.parentElement)},s.prototype.$initTransformMeasureNodes=function(){var h=function(m,y){return["div",{style:"position: absolute;top:"+m+"px;left:"+y+"px;"}]};this.els=w.buildDom([h(0,0),h(i,0),h(0,i),h(i,i)],this.el)},s.prototype.transformCoordinates=function(h,m){if(h){var y=this.$getZoom(this.el);h=v(1/y,h)}function R(Q,te,he){var ne=Q[1]*te[0]-Q[0]*te[1];return[(-te[1]*he[0]+te[0]*he[1])/ne,(+Q[1]*he[0]-Q[0]*he[1])/ne]}function $(Q,te){return[Q[0]-te[0],Q[1]-te[1]]}function C(Q,te){return[Q[0]+te[0],Q[1]+te[1]]}function v(Q,te){return[Q*te[0],Q*te[1]]}this.els||this.$initTransformMeasureNodes();function L(Q){var te=Q.getBoundingClientRect();return[te.left,te.top]}var I=L(this.els[0]),F=L(this.els[1]),E=L(this.els[2]),U=L(this.els[3]),P=R($(U,F),$(U,E),$(C(F,E),C(U,I))),O=v(1+P[0],$(F,I)),S=v(1+P[1],$(E,I));if(m){var k=m,N=P[0]*k[0]/i+P[1]*k[1]/i+1,W=C(v(k[0],O),v(k[1],S));return C(v(1/N/i,W),I)}var V=$(h,I),G=R($(O,v(P[0],V)),$(S,v(P[1],V)),V);return v(i,G)},s}();n.prototype.$characterSize={width:0,height:0},b.implement(n.prototype,r),l.FontMetrics=n}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,l,T){T.exports=`
255
- .ace_br1 {border-top-left-radius : 3px;}
256
- .ace_br2 {border-top-right-radius : 3px;}
257
- .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
258
- .ace_br4 {border-bottom-right-radius: 3px;}
259
- .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
260
- .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
261
- .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
262
- .ace_br8 {border-bottom-left-radius : 3px;}
263
- .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
264
- .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
265
- .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
266
- .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
267
- .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
268
- .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
269
- .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
-
271
-
272
- .ace_editor {
273
- position: relative;
274
- overflow: hidden;
275
- padding: 0;
276
- font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
277
- direction: ltr;
278
- text-align: left;
279
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
280
- forced-color-adjust: none;
281
- }
282
-
283
- .ace_scroller {
284
- position: absolute;
285
- overflow: hidden;
286
- top: 0;
287
- bottom: 0;
288
- background-color: inherit;
289
- -ms-user-select: none;
290
- -moz-user-select: none;
291
- -webkit-user-select: none;
292
- user-select: none;
293
- cursor: text;
294
- }
295
-
296
- .ace_content {
297
- position: absolute;
298
- box-sizing: border-box;
299
- min-width: 100%;
300
- contain: style size layout;
301
- font-variant-ligatures: no-common-ligatures;
302
- }
303
- .ace_invisible {
304
- font-variant-ligatures: none;
305
- }
306
-
307
- .ace_keyboard-focus:focus {
308
- box-shadow: inset 0 0 0 2px #5E9ED6;
309
- outline: none;
310
- }
311
-
312
- .ace_dragging .ace_scroller:before{
313
- position: absolute;
314
- top: 0;
315
- left: 0;
316
- right: 0;
317
- bottom: 0;
318
- content: '';
319
- background: rgba(250, 250, 250, 0.01);
320
- z-index: 1000;
321
- }
322
- .ace_dragging.ace_dark .ace_scroller:before{
323
- background: rgba(0, 0, 0, 0.01);
324
- }
325
-
326
- .ace_gutter {
327
- position: absolute;
328
- overflow : hidden;
329
- width: auto;
330
- top: 0;
331
- bottom: 0;
332
- left: 0;
333
- cursor: default;
334
- z-index: 4;
335
- -ms-user-select: none;
336
- -moz-user-select: none;
337
- -webkit-user-select: none;
338
- user-select: none;
339
- contain: style size layout;
340
- }
341
-
342
- .ace_gutter-active-line {
343
- position: absolute;
344
- left: 0;
345
- right: 0;
346
- }
347
-
348
- .ace_scroller.ace_scroll-left:after {
349
- content: "";
350
- position: absolute;
351
- top: 0;
352
- right: 0;
353
- bottom: 0;
354
- left: 0;
355
- box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
356
- pointer-events: none;
357
- }
358
-
359
- .ace_gutter-cell, .ace_gutter-cell_svg-icons {
360
- position: absolute;
361
- top: 0;
362
- left: 0;
363
- right: 0;
364
- padding-left: 19px;
365
- padding-right: 6px;
366
- background-repeat: no-repeat;
367
- }
368
-
369
- .ace_gutter-cell_svg-icons .ace_gutter_annotation {
370
- margin-left: -14px;
371
- float: left;
372
- }
373
-
374
- .ace_gutter-cell .ace_gutter_annotation {
375
- margin-left: -19px;
376
- float: left;
377
- }
378
-
379
- .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 {
380
- 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==");
381
- background-repeat: no-repeat;
382
- background-position: 2px center;
383
- }
384
-
385
- .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
386
- 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==");
387
- background-repeat: no-repeat;
388
- background-position: 2px center;
389
- }
390
-
391
- .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
392
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
393
- background-repeat: no-repeat;
394
- background-position: 2px center;
395
- }
396
-
397
- .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 {
398
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
399
- }
400
-
401
- .ace_icon_svg.ace_error {
402
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
403
- background-color: crimson;
404
- }
405
- .ace_icon_svg.ace_security {
406
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
407
- background-color: crimson;
408
- }
409
- .ace_icon_svg.ace_warning {
410
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
411
- background-color: darkorange;
412
- }
413
- .ace_icon_svg.ace_info {
414
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
415
- background-color: royalblue;
416
- }
417
- .ace_icon_svg.ace_hint {
418
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
419
- background-color: silver;
420
- }
421
-
422
- .ace_icon_svg.ace_error_fold {
423
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
424
- background-color: crimson;
425
- }
426
- .ace_icon_svg.ace_security_fold {
427
- -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
428
- background-color: crimson;
429
- }
430
- .ace_icon_svg.ace_warning_fold {
431
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
432
- background-color: darkorange;
433
- }
434
-
435
- .ace_scrollbar {
436
- contain: strict;
437
- position: absolute;
438
- right: 0;
439
- bottom: 0;
440
- z-index: 6;
441
- }
442
-
443
- .ace_scrollbar-inner {
444
- position: absolute;
445
- cursor: text;
446
- left: 0;
447
- top: 0;
448
- }
449
-
450
- .ace_scrollbar-v{
451
- overflow-x: hidden;
452
- overflow-y: scroll;
453
- top: 0;
454
- }
455
-
456
- .ace_scrollbar-h {
457
- overflow-x: scroll;
458
- overflow-y: hidden;
459
- left: 0;
460
- }
461
-
462
- .ace_print-margin {
463
- position: absolute;
464
- height: 100%;
465
- }
466
-
467
- .ace_text-input {
468
- position: absolute;
469
- z-index: 0;
470
- width: 0.5em;
471
- height: 1em;
472
- opacity: 0;
473
- background: transparent;
474
- -moz-appearance: none;
475
- appearance: none;
476
- border: none;
477
- resize: none;
478
- outline: none;
479
- overflow: hidden;
480
- font: inherit;
481
- padding: 0 1px;
482
- margin: 0 -1px;
483
- contain: strict;
484
- -ms-user-select: text;
485
- -moz-user-select: text;
486
- -webkit-user-select: text;
487
- user-select: text;
488
- /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
489
- white-space: pre!important;
490
- }
491
- .ace_text-input.ace_composition {
492
- background: transparent;
493
- color: inherit;
494
- z-index: 1000;
495
- opacity: 1;
496
- }
497
- .ace_composition_placeholder { color: transparent }
498
- .ace_composition_marker {
499
- border-bottom: 1px solid;
500
- position: absolute;
501
- border-radius: 0;
502
- margin-top: 1px;
503
- }
504
-
505
- [ace_nocontext=true] {
506
- transform: none!important;
507
- filter: none!important;
508
- clip-path: none!important;
509
- mask : none!important;
510
- contain: none!important;
511
- perspective: none!important;
512
- mix-blend-mode: initial!important;
513
- z-index: auto;
514
- }
515
-
516
- .ace_layer {
517
- z-index: 1;
518
- position: absolute;
519
- overflow: hidden;
520
- /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
521
- word-wrap: normal;
522
- white-space: pre;
523
- height: 100%;
524
- width: 100%;
525
- box-sizing: border-box;
526
- /* setting pointer-events: auto; on node under the mouse, which changes
527
- during scroll, will break mouse wheel scrolling in Safari */
528
- pointer-events: none;
529
- }
530
-
531
- .ace_gutter-layer {
532
- position: relative;
533
- width: auto;
534
- text-align: right;
535
- pointer-events: auto;
536
- height: 1000000px;
537
- contain: style size layout;
538
- }
539
-
540
- .ace_text-layer {
541
- font: inherit !important;
542
- position: absolute;
543
- height: 1000000px;
544
- width: 1000000px;
545
- contain: style size layout;
546
- }
547
-
548
- .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
549
- contain: style size layout;
550
- position: absolute;
551
- top: 0;
552
- left: 0;
553
- right: 0;
554
- }
555
-
556
- .ace_hidpi .ace_text-layer,
557
- .ace_hidpi .ace_gutter-layer,
558
- .ace_hidpi .ace_content,
559
- .ace_hidpi .ace_gutter {
560
- contain: strict;
561
- }
562
- .ace_hidpi .ace_text-layer > .ace_line,
563
- .ace_hidpi .ace_text-layer > .ace_line_group {
564
- contain: strict;
565
- }
566
-
567
- .ace_cjk {
568
- display: inline-block;
569
- text-align: center;
570
- }
571
-
572
- .ace_cursor-layer {
573
- z-index: 4;
574
- }
575
-
576
- .ace_cursor {
577
- z-index: 4;
578
- position: absolute;
579
- box-sizing: border-box;
580
- border-left: 2px solid;
581
- /* workaround for smooth cursor repaintng whole screen in chrome */
582
- transform: translatez(0);
583
- }
584
-
585
- .ace_multiselect .ace_cursor {
586
- border-left-width: 1px;
587
- }
588
-
589
- .ace_slim-cursors .ace_cursor {
590
- border-left-width: 1px;
591
- }
592
-
593
- .ace_overwrite-cursors .ace_cursor {
594
- border-left-width: 0;
595
- border-bottom: 1px solid;
596
- }
597
-
598
- .ace_hidden-cursors .ace_cursor {
599
- opacity: 0.2;
600
- }
601
-
602
- .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
603
- opacity: 0;
604
- }
605
-
606
- .ace_smooth-blinking .ace_cursor {
607
- transition: opacity 0.18s;
608
- }
609
-
610
- .ace_animate-blinking .ace_cursor {
611
- animation-duration: 1000ms;
612
- animation-timing-function: step-end;
613
- animation-name: blink-ace-animate;
614
- animation-iteration-count: infinite;
615
- }
616
-
617
- .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
618
- animation-duration: 1000ms;
619
- animation-timing-function: ease-in-out;
620
- animation-name: blink-ace-animate-smooth;
621
- }
622
-
623
- @keyframes blink-ace-animate {
624
- from, to { opacity: 1; }
625
- 60% { opacity: 0; }
626
- }
627
-
628
- @keyframes blink-ace-animate-smooth {
629
- from, to { opacity: 1; }
630
- 45% { opacity: 1; }
631
- 60% { opacity: 0; }
632
- 85% { opacity: 0; }
633
- }
634
-
635
- .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
636
- position: absolute;
637
- z-index: 3;
638
- }
639
-
640
- .ace_marker-layer .ace_selection {
641
- position: absolute;
642
- z-index: 5;
643
- }
644
-
645
- .ace_marker-layer .ace_bracket {
646
- position: absolute;
647
- z-index: 6;
648
- }
649
-
650
- .ace_marker-layer .ace_error_bracket {
651
- position: absolute;
652
- border-bottom: 1px solid #DE5555;
653
- border-radius: 0;
654
- }
655
-
656
- .ace_marker-layer .ace_active-line {
657
- position: absolute;
658
- z-index: 2;
659
- }
660
-
661
- .ace_marker-layer .ace_selected-word {
662
- position: absolute;
663
- z-index: 4;
664
- box-sizing: border-box;
665
- }
666
-
667
- .ace_line .ace_fold {
668
- box-sizing: border-box;
669
-
670
- display: inline-block;
671
- height: 11px;
672
- margin-top: -2px;
673
- vertical-align: middle;
674
-
675
- background-image:
676
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
677
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
678
- background-repeat: no-repeat, repeat-x;
679
- background-position: center center, top left;
680
- color: transparent;
681
-
682
- border: 1px solid black;
683
- border-radius: 2px;
684
-
685
- cursor: pointer;
686
- pointer-events: auto;
687
- }
688
-
689
- .ace_dark .ace_fold {
690
- }
691
-
692
- .ace_fold:hover{
693
- background-image:
694
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
695
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
696
- }
697
-
698
- .ace_tooltip {
699
- background-color: #f5f5f5;
700
- border: 1px solid gray;
701
- border-radius: 1px;
702
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
703
- color: black;
704
- padding: 3px 4px;
705
- position: fixed;
706
- z-index: 999999;
707
- box-sizing: border-box;
708
- cursor: default;
709
- white-space: pre-wrap;
710
- word-wrap: break-word;
711
- line-height: normal;
712
- font-style: normal;
713
- font-weight: normal;
714
- letter-spacing: normal;
715
- pointer-events: none;
716
- overflow: auto;
717
- max-width: min(33em, 66vw);
718
- overscroll-behavior: contain;
719
- }
720
- .ace_tooltip pre {
721
- white-space: pre-wrap;
722
- }
723
-
724
- .ace_tooltip.ace_dark {
725
- background-color: #636363;
726
- color: #fff;
727
- }
728
-
729
- .ace_tooltip:focus {
730
- outline: 1px solid #5E9ED6;
731
- }
732
-
733
- .ace_icon {
734
- display: inline-block;
735
- width: 18px;
736
- vertical-align: top;
737
- }
738
-
739
- .ace_icon_svg {
740
- display: inline-block;
741
- width: 12px;
742
- vertical-align: top;
743
- -webkit-mask-repeat: no-repeat;
744
- -webkit-mask-size: 12px;
745
- -webkit-mask-position: center;
746
- }
747
-
748
- .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
749
- padding-right: 13px;
750
- }
751
-
752
- .ace_fold-widget {
753
- box-sizing: border-box;
754
-
755
- margin: 0 -12px 0 1px;
756
- display: none;
757
- width: 11px;
758
- vertical-align: top;
759
-
760
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
761
- background-repeat: no-repeat;
762
- background-position: center;
763
-
764
- border-radius: 3px;
765
-
766
- border: 1px solid transparent;
767
- cursor: pointer;
768
- }
769
-
770
- .ace_folding-enabled .ace_fold-widget {
771
- display: inline-block;
772
- }
773
-
774
- .ace_fold-widget.ace_end {
775
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
776
- }
777
-
778
- .ace_fold-widget.ace_closed {
779
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
780
- }
781
-
782
- .ace_fold-widget:hover {
783
- border: 1px solid rgba(0, 0, 0, 0.3);
784
- background-color: rgba(255, 255, 255, 0.2);
785
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
786
- }
787
-
788
- .ace_fold-widget:active {
789
- border: 1px solid rgba(0, 0, 0, 0.4);
790
- background-color: rgba(0, 0, 0, 0.05);
791
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
792
- }
793
- /**
794
- * Dark version for fold widgets
795
- */
796
- .ace_dark .ace_fold-widget {
797
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
798
- }
799
- .ace_dark .ace_fold-widget.ace_end {
800
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
801
- }
802
- .ace_dark .ace_fold-widget.ace_closed {
803
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
804
- }
805
- .ace_dark .ace_fold-widget:hover {
806
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
807
- background-color: rgba(255, 255, 255, 0.1);
808
- }
809
- .ace_dark .ace_fold-widget:active {
810
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
811
- }
812
-
813
- .ace_inline_button {
814
- border: 1px solid lightgray;
815
- display: inline-block;
816
- margin: -1px 8px;
817
- padding: 0 5px;
818
- pointer-events: auto;
819
- cursor: pointer;
820
- }
821
- .ace_inline_button:hover {
822
- border-color: gray;
823
- background: rgba(200,200,200,0.2);
824
- display: inline-block;
825
- pointer-events: auto;
826
- }
827
-
828
- .ace_fold-widget.ace_invalid {
829
- background-color: #FFB4B4;
830
- border-color: #DE5555;
831
- }
832
-
833
- .ace_fade-fold-widgets .ace_fold-widget {
834
- transition: opacity 0.4s ease 0.05s;
835
- opacity: 0;
836
- }
837
-
838
- .ace_fade-fold-widgets:hover .ace_fold-widget {
839
- transition: opacity 0.05s ease 0.05s;
840
- opacity:1;
841
- }
842
-
843
- .ace_underline {
844
- text-decoration: underline;
845
- }
846
-
847
- .ace_bold {
848
- font-weight: bold;
849
- }
850
-
851
- .ace_nobold .ace_bold {
852
- font-weight: normal;
853
- }
854
-
855
- .ace_italic {
856
- font-style: italic;
857
- }
858
-
859
-
860
- .ace_error-marker {
861
- background-color: rgba(255, 0, 0,0.2);
862
- position: absolute;
863
- z-index: 9;
864
- }
865
-
866
- .ace_highlight-marker {
867
- background-color: rgba(255, 255, 0,0.2);
868
- position: absolute;
869
- z-index: 8;
870
- }
871
-
872
- .ace_mobile-menu {
873
- position: absolute;
874
- line-height: 1.5;
875
- border-radius: 4px;
876
- -ms-user-select: none;
877
- -moz-user-select: none;
878
- -webkit-user-select: none;
879
- user-select: none;
880
- background: white;
881
- box-shadow: 1px 3px 2px grey;
882
- border: 1px solid #dcdcdc;
883
- color: black;
884
- }
885
- .ace_dark > .ace_mobile-menu {
886
- background: #333;
887
- color: #ccc;
888
- box-shadow: 1px 3px 2px grey;
889
- border: 1px solid #444;
890
-
891
- }
892
- .ace_mobile-button {
893
- padding: 2px;
894
- cursor: pointer;
895
- overflow: hidden;
896
- }
897
- .ace_mobile-button:hover {
898
- background-color: #eee;
899
- opacity:1;
900
- }
901
- .ace_mobile-button:active {
902
- background-color: #ddd;
903
- }
904
-
905
- .ace_placeholder {
906
- position: relative;
907
- font-family: arial;
908
- transform: scale(0.9);
909
- transform-origin: left;
910
- white-space: pre;
911
- opacity: 0.7;
912
- margin: 0 10px;
913
- z-index: 1;
914
- }
915
-
916
- .ace_ghost_text {
917
- opacity: 0.5;
918
- font-style: italic;
919
- }
920
-
921
- .ace_ghost_text_container > div {
922
- white-space: pre;
923
- }
924
-
925
- .ghost_text_line_wrapped::after {
926
- content: "↩";
927
- position: absolute;
928
- }
929
-
930
- .ace_lineWidgetContainer.ace_ghost_text {
931
- margin: 0px 4px
932
- }
933
-
934
- .ace_screenreader-only {
935
- position:absolute;
936
- left:-10000px;
937
- top:auto;
938
- width:1px;
939
- height:1px;
940
- overflow:hidden;
941
- }
942
-
943
- .ace_hidden_token {
944
- display: none;
945
- }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,l,T){var b=e("../lib/dom"),w=e("../lib/oop"),_=e("../lib/event_emitter").EventEmitter,p=function(){function g(r,a){this.canvas=b.createElement("canvas"),this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.canvasHeight=r.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=r.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},r.element.appendChild(this.canvas)}return g.prototype.$updateDecorators=function(r){var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(r){this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height;var o=(r.lastRow+1)*this.lineHeight;o<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var i=this.canvas.getContext("2d");function n(U,P){return U.priority<P.priority?-1:U.priority>P.priority?1:0}var s=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),s){var h={info:1,warning:2,error:3};s.forEach(function(U){U.priority=h[U.type]||null}),s=s.sort(n);for(var m=this.renderer.session.$foldData,y=0;y<s.length;y++){var R=s[y].row,$=this.compensateFoldRows(R,m),C=Math.round((R-$)*this.lineHeight*this.heightRatio),v=Math.round((R-$)*this.lineHeight*this.heightRatio),L=Math.round(((R-$)*this.lineHeight+this.lineHeight)*this.heightRatio),I=L-v;if(I<this.minDecorationHeight){var F=(v+L)/2|0;F<this.halfMinDecorationHeight?F=this.halfMinDecorationHeight:F+this.halfMinDecorationHeight>this.canvasHeight&&(F=this.canvasHeight-this.halfMinDecorationHeight),v=Math.round(F-this.halfMinDecorationHeight),L=Math.round(F+this.halfMinDecorationHeight)}i.fillStyle=a[s[y].type]||null,i.fillRect(0,C,this.canvasWidth,L-v)}}var E=this.renderer.session.selection.getCursor();if(E){var $=this.compensateFoldRows(E.row,m),C=Math.round((E.row-$)*this.lineHeight*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,C,this.canvasWidth,2)}},g.prototype.compensateFoldRows=function(r,a){var o=0;if(a&&a.length>0)for(var i=0;i<a.length;i++)r>a[i].start.row&&r<a[i].end.row?o+=r-a[i].start.row:r>=a[i].end.row&&(o+=a[i].end.row-a[i].start.row);return o},g}();w.implement(p.prototype,_),l.Decorator=p}),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(e,l,T){var b=e("./lib/oop"),w=e("./lib/dom"),_=e("./lib/lang"),p=e("./config"),g=e("./layer/gutter").Gutter,r=e("./layer/marker").Marker,a=e("./layer/text").Text,o=e("./layer/cursor").Cursor,i=e("./scrollbar").HScrollBar,n=e("./scrollbar").VScrollBar,s=e("./scrollbar_custom").HScrollBar,h=e("./scrollbar_custom").VScrollBar,m=e("./renderloop").RenderLoop,y=e("./layer/font_metrics").FontMetrics,R=e("./lib/event_emitter").EventEmitter,$=e("./css/editor-css"),C=e("./layer/decorators").Decorator,v=e("./lib/useragent"),L=e("./layer/text_util").isTextToken;w.importCssString($,"ace_editor.css",!1);var I=function(){function F(E,U){var P=this;this.container=E||w.createElement("div"),w.addCssClass(this.container,"ace_editor"),w.HI_DPI&&w.addCssClass(this.container,"ace_hidpi"),this.setTheme(U),p.get("useStrictCSP")==null&&p.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 g(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var O=this.$textLayer=new a(this.content);this.canvas=O.element,this.$markerFront=new r(this.content),this.$cursorLayer=new o(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new n(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(S){P.$scrollAnimation||P.session.setScrollTop(S.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(S){P.$scrollAnimation||P.session.setScrollLeft(S.data-P.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(S){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._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=!v.isIOS,this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),p.resetOptions(this),p._signal("renderer",this)}return F.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")},F.prototype.setSession=function(E){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=E,E&&this.scrollMargin.top&&E.getScrollTop()<=0&&E.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(E),this.$markerBack.setSession(E),this.$markerFront.setSession(E),this.$gutterLayer.setSession(E),this.$textLayer.setSession(E),E&&(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))},F.prototype.updateLines=function(E,U,P){if(U===void 0&&(U=1/0),this.$changedLines?(this.$changedLines.firstRow>E&&(this.$changedLines.firstRow=E),this.$changedLines.lastRow<U&&(this.$changedLines.lastRow=U)):this.$changedLines={firstRow:E,lastRow:U},this.$changedLines.lastRow<this.layerConfig.firstRow)if(P)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},F.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},F.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},F.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},F.prototype.updateFull=function(E){E?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},F.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},F.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},F.prototype.onResize=function(E,U,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=E?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),P||(P=S.clientWidth||S.scrollWidth);var k=this.$updateCachedSize(E,U,P,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!O)return this.resizing=0;E&&(this.$gutterLayer.$padding=null),E?this.$renderChanges(k|this.$changes,!0):this.$loop.schedule(k|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},F.prototype.$updateCachedSize=function(E,U,P,O){O-=this.$extraHeight||0;var S=0,k=this.$size,N={width:k.width,height:k.height,scrollerHeight:k.scrollerHeight,scrollerWidth:k.scrollerWidth};if(O&&(E||k.height!=O)&&(k.height=O,S|=this.CHANGE_SIZE,k.scrollerHeight=k.height,this.$horizScroll&&(k.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(k.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",S=S|this.CHANGE_SCROLL),P&&(E||k.width!=P)){S|=this.CHANGE_SIZE,k.width=P,U==null&&(U=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=U,w.setStyle(this.scrollBarH.element.style,"left",U+"px"),w.setStyle(this.scroller.style,"left",U+this.margin.left+"px"),k.scrollerWidth=Math.max(0,P-U-this.scrollBarV.getWidth()-this.margin.h),w.setStyle(this.$gutter.style,"left",this.margin.left+"px");var W=this.scrollBarV.getWidth()+"px";w.setStyle(this.scrollBarH.element.style,"right",W),w.setStyle(this.scroller.style,"right",W),w.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(k.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||E)&&(S|=this.CHANGE_FULL)}return k.$dirty=!P||!O,S&&this._signal("resize",N),S},F.prototype.onGutterResize=function(E){var U=this.$showGutter?E:0;U!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,U,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()},F.prototype.adjustWrapLimit=function(){var E=this.$size.scrollerWidth-this.$padding*2,U=Math.floor(E/this.characterWidth);return this.session.adjustWrapLimit(U,this.$showPrintMargin&&this.$printMarginColumn)},F.prototype.setAnimatedScroll=function(E){this.setOption("animatedScroll",E)},F.prototype.getAnimatedScroll=function(){return this.$animatedScroll},F.prototype.setShowInvisibles=function(E){this.setOption("showInvisibles",E),this.session.$bidiHandler.setShowInvisibles(E)},F.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},F.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},F.prototype.setDisplayIndentGuides=function(E){this.setOption("displayIndentGuides",E)},F.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},F.prototype.setHighlightIndentGuides=function(E){this.setOption("highlightIndentGuides",E)},F.prototype.setShowPrintMargin=function(E){this.setOption("showPrintMargin",E)},F.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},F.prototype.setPrintMarginColumn=function(E){this.setOption("printMarginColumn",E)},F.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},F.prototype.getShowGutter=function(){return this.getOption("showGutter")},F.prototype.setShowGutter=function(E){return this.setOption("showGutter",E)},F.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},F.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},F.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},F.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},F.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var E=w.createElement("div");E.className="ace_layer ace_print-margin-layer",this.$printMarginEl=w.createElement("div"),this.$printMarginEl.className="ace_print-margin",E.appendChild(this.$printMarginEl),this.content.insertBefore(E,this.content.firstChild)}var U=this.$printMarginEl.style;U.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",U.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},F.prototype.getContainerElement=function(){return this.container},F.prototype.getMouseEventTarget=function(){return this.scroller},F.prototype.getTextAreaContainer=function(){return this.container},F.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var E=this.textarea.style,U=this.$composition;if(!this.$keepTextAreaAtCursor&&!U){w.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){U&&U.markerRange&&(P=this.$cursorLayer.getPixelPosition(U.markerRange.start,!0));var O=this.layerConfig,S=P.top,k=P.left;S-=O.offset;var N=U&&U.useTextareaForIME||v.isMobile?this.lineHeight:1;if(S<0||S>O.height-N){w.translate(this.textarea,0,0);return}var W=1,V=this.$size.height-N;if(!U)S+=this.lineHeight;else if(U.useTextareaForIME){var G=this.textarea.value;W=this.characterWidth*this.session.$getStringScreenWidth(G)[0]}else S+=this.lineHeight+2;k-=this.scrollLeft,k>this.$size.scrollerWidth-W&&(k=this.$size.scrollerWidth-W),k+=this.gutterWidth+this.margin.left,w.setStyle(E,"height",N+"px"),w.setStyle(E,"width",W+"px"),w.translate(this.textarea,Math.min(k,this.$size.scrollerWidth-W),Math.min(S,V))}}},F.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},F.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},F.prototype.getLastFullyVisibleRow=function(){var E=this.layerConfig,U=E.lastRow,P=this.session.documentToScreenRow(U,0)*E.lineHeight;return P-this.session.getScrollTop()>E.height-E.lineHeight?U-1:U},F.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},F.prototype.setPadding=function(E){this.$padding=E,this.$textLayer.setPadding(E),this.$cursorLayer.setPadding(E),this.$markerFront.setPadding(E),this.$markerBack.setPadding(E),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},F.prototype.setScrollMargin=function(E,U,P,O){var S=this.scrollMargin;S.top=E|0,S.bottom=U|0,S.right=O|0,S.left=P|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()},F.prototype.setMargin=function(E,U,P,O){var S=this.margin;S.top=E|0,S.bottom=U|0,S.right=O|0,S.left=P|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()},F.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},F.prototype.setHScrollBarAlwaysVisible=function(E){this.setOption("hScrollBarAlwaysVisible",E)},F.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},F.prototype.setVScrollBarAlwaysVisible=function(E){this.setOption("vScrollBarAlwaysVisible",E)},F.prototype.$updateScrollBarV=function(){var E=this.layerConfig.maxHeight,U=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(E-=(U-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>E-U&&(E=this.scrollTop+U,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(E+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},F.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},F.prototype.freeze=function(){this.$frozen=!0},F.prototype.unfreeze=function(){this.$frozen=!1},F.prototype.$renderChanges=function(E,U){if(this.$changes&&(E|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!E&&!U){this.$changes|=E;return}if(this.$size.$dirty)return this.$changes|=E,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",E),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(E&this.CHANGE_FULL||E&this.CHANGE_SIZE||E&this.CHANGE_TEXT||E&this.CHANGE_LINES||E&this.CHANGE_SCROLL||E&this.CHANGE_H_SCROLL){if(E|=this.$computeLayerConfig()|this.$loop.clear(),P.firstRow!=this.layerConfig.firstRow&&P.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,E=E|this.CHANGE_SCROLL,E|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),E&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),w.translate(this.content,-this.scrollLeft,-P.offset);var S=P.width+2*this.$padding+"px",k=P.minHeight+"px";w.setStyle(this.content.style,"width",S),w.setStyle(this.content.style,"height",k)}if(E&this.CHANGE_H_SCROLL&&(w.translate(this.content,-this.scrollLeft,-P.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),E&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}if(E&this.CHANGE_SCROLL){this.$changedLines=null,E&this.CHANGE_TEXT||E&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(E&this.CHANGE_GUTTER||E&this.CHANGE_LINES?this.$gutterLayer.update(P):this.$gutterLayer.scrollLines(P)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}E&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_LINES?((this.$updateLines()||E&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_TEXT||E&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),E&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",E)},F.prototype.$autosize=function(){var E=this.session.getScreenLength()*this.lineHeight,U=this.$maxLines*this.lineHeight,P=Math.min(U,Math.max((this.$minLines||1)*this.lineHeight,E))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(P+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&P>this.$maxPixelHeight&&(P=this.$maxPixelHeight);var O=P<=2*this.lineHeight,S=!O&&E>U;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||S!=this.$vScroll){S!=this.$vScroll&&(this.$vScroll=S,this.scrollBarV.setVisible(S));var k=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,k,P),this.desiredHeight=P,this._signal("autosize")}},F.prototype.$computeLayerConfig=function(){var E=this.session,U=this.$size,P=U.height<=2*this.lineHeight,O=this.session.getScreenLength(),S=O*this.lineHeight,k=this.$getLongestLine(),N=!P&&(this.$hScrollBarAlwaysVisible||U.scrollerWidth-k-2*this.$padding<0),W=this.$horizScroll!==N;W&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var V=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=U.height<=2*this.lineHeight);var G=U.scrollerHeight+this.lineHeight,Q=!this.$maxLines&&this.$scrollPastEnd?(U.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;S+=Q;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,S-U.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,k+2*this.$padding-U.scrollerWidth+te.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||U.scrollerHeight-S+Q<0||this.scrollTop>te.top),ne=V!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var ue=this.scrollTop%this.lineHeight,le=Math.ceil(G/this.lineHeight)-1,ce=Math.max(0,Math.round((this.scrollTop-ue)/this.lineHeight)),ve=ce+le,Ce,$e,Te=this.lineHeight;ce=E.screenToDocumentRow(ce,0);var qe=E.getFoldLine(ce);qe&&(ce=qe.start.row),Ce=E.documentToScreenRow(ce,0),$e=E.getRowLength(ce)*Te,ve=Math.min(E.screenToDocumentRow(ve,0),E.getLength()-1),G=U.scrollerHeight+E.getRowLength(ve)*Te+$e,ue=this.scrollTop-Ce*Te;var Ke=0;return(this.layerConfig.width!=k||W)&&(Ke=this.CHANGE_H_SCROLL),(W||ne)&&(Ke|=this.$updateCachedSize(!0,this.gutterWidth,U.width,U.height),this._signal("scrollbarVisibilityChanged"),ne&&(k=this.$getLongestLine())),this.layerConfig={width:k,padding:this.$padding,firstRow:ce,firstRowScreen:Ce,lastRow:ve,lineHeight:Te,characterWidth:this.characterWidth,minHeight:G,maxHeight:S,offset:ue,gutterOffset:Te?Math.max(0,Math.ceil((ue+U.height-U.scrollerHeight)/Te)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(k-this.$padding),Ke},F.prototype.$updateLines=function(){if(this.$changedLines){var E=this.$changedLines.firstRow,U=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(E>P.lastRow+1)&&!(U<P.firstRow)){if(U===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,E,U),!0}}},F.prototype.$getLongestLine=function(){var E=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(E+=1),this.$textLayer&&E>this.$textLayer.MAX_LINE_LENGTH&&(E=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(E*this.characterWidth))},F.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},F.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},F.prototype.addGutterDecoration=function(E,U){this.$gutterLayer.addGutterDecoration(E,U)},F.prototype.removeGutterDecoration=function(E,U){this.$gutterLayer.removeGutterDecoration(E,U)},F.prototype.updateBreakpoints=function(E){this._rows=E,this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.setAnnotations=function(E){this.$gutterLayer.setAnnotations(E),this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},F.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},F.prototype.showCursor=function(){this.$cursorLayer.showCursor()},F.prototype.scrollSelectionIntoView=function(E,U,P){this.scrollCursorIntoView(E,P),this.scrollCursorIntoView(U,P)},F.prototype.scrollCursorIntoView=function(E,U,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(E),S=O.left,k=O.top,N=P&&P.top||0,W=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var V=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;V+N>k?(U&&V+N>k+this.lineHeight&&(k-=U*this.$size.scrollerHeight),k===0&&(k=-this.scrollMargin.top),this.session.setScrollTop(k)):V+this.$size.scrollerHeight-W<k+this.lineHeight&&(U&&V+this.$size.scrollerHeight-W<k-this.lineHeight&&(k+=U*this.$size.scrollerHeight),this.session.setScrollTop(k+this.lineHeight+W-this.$size.scrollerHeight));var G=this.scrollLeft,Q=2*this.layerConfig.characterWidth;S-Q<G?(S-=Q,S<this.$padding+Q&&(S=-this.scrollMargin.left),this.session.setScrollLeft(S)):(S+=Q,G+this.$size.scrollerWidth<S+this.characterWidth?this.session.setScrollLeft(Math.round(S+this.characterWidth-this.$size.scrollerWidth)):G<=this.$padding&&S-G<this.characterWidth&&this.session.setScrollLeft(0))}},F.prototype.getScrollTop=function(){return this.session.getScrollTop()},F.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},F.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},F.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},F.prototype.scrollToRow=function(E){this.session.setScrollTop(E*this.lineHeight)},F.prototype.alignCursor=function(E,U){typeof E=="number"&&(E={row:E,column:0});var P=this.$cursorLayer.getPixelPosition(E),O=this.$size.scrollerHeight-this.lineHeight,S=P.top-O*(U||0);return this.session.setScrollTop(S),S},F.prototype.$calcSteps=function(E,U){var P=0,O=this.STEPS,S=[],k=function(N,W,V){return V*(Math.pow(N-1,3)+1)+W};for(P=0;P<O;++P)S.push(k(P/this.STEPS,E,U-E));return S},F.prototype.scrollToLine=function(E,U,P,O){var S=this.$cursorLayer.getPixelPosition({row:E,column:0}),k=S.top;U&&(k-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(k),P!==!1&&this.animateScrolling(N,O)},F.prototype.animateScrolling=function(E,U){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(E==P)return;if(this.$scrollAnimation){var S=this.$scrollAnimation.steps;if(S.length&&(E=S[0],E==P))return}var k=O.$calcSteps(E,P);this.$scrollAnimation={from:E,to:P,steps:k},clearInterval(this.$timer),O.session.setScrollTop(k.shift()),O.session.$scrollTop=P;function N(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,U&&U()}this.$timer=setInterval(function(){if(O.$stopAnimation){N();return}if(!O.session)return clearInterval(O.$timer);k.length?(O.session.setScrollTop(k.shift()),O.session.$scrollTop=P):P!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(P),P=null):N()},10)},F.prototype.scrollToY=function(E){this.scrollTop!==E&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=E)},F.prototype.scrollToX=function(E){this.scrollLeft!==E&&(this.scrollLeft=E),this.$loop.schedule(this.CHANGE_H_SCROLL)},F.prototype.scrollTo=function(E,U){this.session.setScrollTop(U),this.session.setScrollLeft(E)},F.prototype.scrollBy=function(E,U){U&&this.session.setScrollTop(this.session.getScrollTop()+U),E&&this.session.setScrollLeft(this.session.getScrollLeft()+E)},F.prototype.isScrollableBy=function(E,U){if(U<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||U>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||E<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||E>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},F.prototype.pixelToScreenCoordinates=function(E,U){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([E,U]);E=O[1]-this.gutterWidth-this.margin.left,U=O[0]}else P=this.scroller.getBoundingClientRect();var S=E+this.scrollLeft-P.left-this.$padding,k=S/this.characterWidth,N=Math.floor((U+this.scrollTop-P.top)/this.lineHeight),W=this.$blockCursor?Math.floor(k):Math.round(k);return{row:N,column:W,side:k-W>0?1:-1,offsetX:S}},F.prototype.screenToTextCoordinates=function(E,U){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([E,U]);E=O[1]-this.gutterWidth-this.margin.left,U=O[0]}else P=this.scroller.getBoundingClientRect();var S=E+this.scrollLeft-P.left-this.$padding,k=S/this.characterWidth,N=this.$blockCursor?Math.floor(k):Math.round(k),W=Math.floor((U+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(W,Math.max(N,0),S)},F.prototype.textToScreenCoordinates=function(E,U){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(E,U),S=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,E)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),k=O.row*this.lineHeight;return{pageX:P.left+S-this.scrollLeft,pageY:P.top+k-this.scrollTop}},F.prototype.visualizeFocus=function(){w.addCssClass(this.container,"ace_focus")},F.prototype.visualizeBlur=function(){w.removeCssClass(this.container,"ace_focus")},F.prototype.showComposition=function(E){this.$composition=E,E.cssText||(E.cssText=this.textarea.style.cssText),E.useTextareaForIME==null&&(E.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(w.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):E.markerId=this.session.addMarker(E.markerRange,"ace_composition_marker","text")},F.prototype.setCompositionText=function(E){var U=this.session.selection.cursor;this.addToken(E,"composition_placeholder",U.row,U.column),this.$moveTextAreaToCursor()},F.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 E=this.session.selection.cursor;this.removeExtraToken(E.row,E.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},F.prototype.setGhostText=function(E,U){var P=this.session.selection.cursor,O=U||{row:P.row,column:P.column};this.removeGhostText();var S=this.$calculateWrappedTextChunks(E,O);this.addToken(S[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:E,position:{row:O.row,column:O.column}};var k=w.createElement("div");if(S.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),W;S.slice(1).forEach(function(ne){var ue=w.createElement("div"),le=w.createElement("span");le.className="ace_ghost_text",ne.wrapped&&(ue.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),le.appendChild(w.createTextNode(ne.text)),ue.appendChild(le),k.appendChild(ue),W=ue}),N.forEach(function(ne){var ue=w.createElement("span");L(ne.type)||(ue.className="ace_"+ne.type.replace(/\./g," ace_")),ue.appendChild(w.createTextNode(ne.value)),W.appendChild(ue)}),this.$ghostTextWidget={el:k,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var V=this.$cursorLayer.getPixelPosition(O,!0),G=this.container,Q=G.getBoundingClientRect().height,te=S.length*this.lineHeight,he=te<Q-V.top;if(he)return;te<Q?this.scrollBy(0,(S.length-1)*this.lineHeight):this.scrollToRow(O.row)}},F.prototype.$calculateWrappedTextChunks=function(E,U){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var S=E.split(/\r?\n/),k=[],N=0;N<S.length;N++){var W=this.session.$getDisplayTokens(S[N],U.column),V=this.session.$computeWrapSplits(W,O,this.session.$tabSize);if(V.length>0){var G=0;V.push(S[N].length);for(var Q=0;Q<V.length;Q++){var te=S[N].slice(G,V[Q]);k.push({text:te,wrapped:!0}),G=V[Q]}}else k.push({text:S[N],wrapped:!1})}return k},F.prototype.removeGhostText=function(){if(this.$ghostText){var E=this.$ghostText.position;this.removeExtraToken(E.row,E.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},F.prototype.addToken=function(E,U,P,O){var S=this.session;S.bgTokenizer.lines[P]=null;var k={type:U,value:E},N=S.getTokens(P);if(O==null||!N.length)N.push(k);else for(var W=0,V=0;V<N.length;V++){var G=N[V];if(W+=G.value.length,O<=W){var Q=G.value.length-(W-O),te=G.value.slice(0,Q),he=G.value.slice(Q);N.splice(V,1,{type:G.type,value:te},k,{type:G.type,value:he});break}}this.updateLines(P,P)},F.prototype.hideTokensAfterPosition=function(E,U){for(var P=this.session.getTokens(E),O=0,S=!1,k=[],N=0;N<P.length;N++){var W=P[N];if(O+=W.value.length,W.type!=="ghost_text"){if(S){k.push({type:W.type,value:W.value}),W.type="hidden_token";continue}O===U&&(S=!0)}}return this.updateLines(E,E),k},F.prototype.removeExtraToken=function(E,U){this.session.bgTokenizer.lines[E]=null,this.updateLines(E,E)},F.prototype.setTheme=function(E,U){var P=this;if(this.$themeId=E,P._dispatchEvent("themeChange",{theme:E}),!E||typeof E=="string"){var O=E||this.$options.theme.initialValue;p.loadModule(["theme",O],S)}else S(E);function S(k){if(P.$themeId!=E)return U&&U();if(!k||!k.cssClass)throw new Error("couldn't load module "+E+" or it didn't call define");k.$id&&(P.$themeId=k.$id),w.importCssString(k.cssText,k.cssClass,P.container),P.theme&&w.removeCssClass(P.container,P.theme.cssClass);var N="padding"in k?k.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&N!=P.$padding&&P.setPadding(N),P.$theme=k.cssClass,P.theme=k,w.addCssClass(P.container,k.cssClass),w.setCssClass(P.container,"ace_dark",k.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:k}),U&&U(),v.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},F.prototype.getTheme=function(){return this.$themeId},F.prototype.setStyle=function(E,U){w.setCssClass(this.container,E,U!==!1)},F.prototype.unsetStyle=function(E){w.removeCssClass(this.container,E)},F.prototype.setCursorStyle=function(E){w.setStyle(this.scroller.style,"cursor",E)},F.prototype.setMouseCursor=function(E){w.setStyle(this.scroller.style,"cursor",E)},F.prototype.attachToShadowRoot=function(){w.importCssString($,"ace_editor.css",this.container)},F.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},F.prototype.$updateCustomScrollbar=function(E){var U=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,E===!0?(this.scrollBarV=new h(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){U.$scrollAnimation||U.session.setScrollTop(P.data-U.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){U.$scrollAnimation||U.session.setScrollLeft(P.data-U.scrollMargin.left)}),this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new n(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){U.$scrollAnimation||U.session.setScrollTop(P.data-U.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){U.$scrollAnimation||U.session.setScrollLeft(P.data-U.scrollMargin.left)}))},F.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var E=this;this.$resizeTimer=_.delayedCall(function(){E.destroyed||E.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(U){var P=U[0].contentRect.width,O=U[0].contentRect.height;Math.abs(E.$size.width-P)>1||Math.abs(E.$size.height-O)>1?E.$resizeTimer.delay():E.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},F}();I.prototype.CHANGE_CURSOR=1,I.prototype.CHANGE_MARKER=2,I.prototype.CHANGE_GUTTER=4,I.prototype.CHANGE_SCROLL=8,I.prototype.CHANGE_LINES=16,I.prototype.CHANGE_TEXT=32,I.prototype.CHANGE_SIZE=64,I.prototype.CHANGE_MARKER_BACK=128,I.prototype.CHANGE_MARKER_FRONT=256,I.prototype.CHANGE_FULL=512,I.prototype.CHANGE_H_SCROLL=1024,I.prototype.$changes=0,I.prototype.$padding=null,I.prototype.$frozen=!1,I.prototype.STEPS=8,b.implement(I.prototype,R),p.defineOptions(I.prototype,"renderer",{useResizeObserver:{set:function(F){!F&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):F&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(F){this.$textLayer.setShowInvisibles(F)&&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(F){typeof F=="number"&&(this.$printMarginColumn=F),this.$showPrintMargin=!!F,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(F){this.$gutter.style.display=F?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(F){this.$gutterLayer.$useSvgGutterIcons=F},initialValue:!1},showFoldedAnnotations:{set:function(F){this.$gutterLayer.$showFoldedAnnotations=F},initialValue:!1},fadeFoldWidgets:{set:function(F){w.setCssClass(this.$gutter,"ace_fade-fold-widgets",F)},initialValue:!1},showFoldWidgets:{set:function(F){this.$gutterLayer.setShowFoldWidgets(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(F){this.$textLayer.setDisplayIndentGuides(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(F){this.$textLayer.setHighlightIndentGuides(F)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(F){this.$gutterLayer.setHighlightGutterLine(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(F){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(F){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(F){typeof F=="number"&&(F=F+"px"),this.container.style.fontSize=F,this.updateFontSize()},initialValue:12},fontFamily:{set:function(F){this.container.style.fontFamily=F,this.updateFontSize()}},maxLines:{set:function(F){this.updateFull()}},minLines:{set:function(F){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(F){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(F){F=+F||0,this.$scrollPastEnd!=F&&(this.$scrollPastEnd=F,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(F){this.$gutterLayer.$fixedWidth=!!F,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(F){this.$updateCustomScrollbar(F)},initialValue:!1},theme:{set:function(F){this.setTheme(F)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!v.isMobile&&!v.isIE}}),l.VirtualRenderer=I}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,l,T){var b=e("../lib/oop"),w=e("../lib/net"),_=e("../lib/event_emitter").EventEmitter,p=e("../config");function g(i){var n="importScripts('"+w.qualifyURL(i)+"');";try{return new Blob([n],{type:"application/javascript"})}catch{var s=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,h=new s;return h.append(n),h.getBlob("application/javascript")}}function r(i){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(p.get("loadWorkerFromBlob")){var n=g(i),s=window.URL||window.webkitURL,h=s.createObjectURL(n);return new Worker(h)}return new Worker(i)}var a=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(){b.implement(this,_),this.$createWorkerFromOldConfig=function(i,n,s,h,m){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),p.get("packaged")||!e.toUrl)h=h||p.moduleUrl(n,"worker");else{var y=this.$normalizePath;h=h||y(e.toUrl("ace/worker/worker.js",null,"_"));var R={};i.forEach(function($){R[$]=y(e.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(h),m&&this.send("importScripts",m),this.$worker.postMessage({init:!0,tlns:R,module:n,classname:s}),this.$worker},this.onMessage=function(i){var n=i.data;switch(n.type){case"event":this._signal(n.name,{data:n.data});break;case"call":var s=this.callbacks[n.id];s&&(s(n.data),delete this.callbacks[n.id]);break;case"error":this.reportError(n.data);break;case"log":window.console&&console.log&&console.log.apply(console,n.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,n){this.$worker.postMessage({command:i,args:n})},this.call=function(i,n,s){if(s){var h=this.callbackId++;this.callbacks[h]=s,n.push(h)}this.send(i,n)},this.emit=function(i,n){try{n.data&&n.data.err&&(n.data.err={message:n.data.err.message,stack:n.data.err.stack,code:n.data.err.code}),this.$worker&&this.$worker.postMessage({event:i,data:{data:n.data}})}catch(s){console.error(s.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(a.prototype);var o=function(i,n,s){var h=null,m=!1,y=Object.create(_),R=[],$=new a({messageBuffer:R,terminate:function(){},postMessage:function(v){R.push(v),h&&(m?setTimeout(C):C())}});$.setEmitSync=function(v){m=v};var C=function(){var v=R.shift();v.command?h[v.command].apply(h,v.args):v.event&&y._signal(v.event,v.data)};return y.postMessage=function(v){$.onMessage({data:v})},y.callback=function(v,L){this.postMessage({type:"call",id:L,data:v})},y.emit=function(v,L){this.postMessage({type:"event",name:v,data:L})},p.loadModule(["worker",n],function(v){for(h=new v[s](y);R.length;)C()}),$};l.UIWorkerClient=o,l.WorkerClient=a,l.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,l,T){var b=e("./range").Range,w=e("./lib/event_emitter").EventEmitter,_=e("./lib/oop"),p=function(){function g(r,a,o,i,n,s){var h=this;this.length=a,this.session=r,this.doc=r.getDocument(),this.mainClass=n,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){h.onCursorChange()})},this.$pos=o;var m=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=m.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return g.prototype.setup=function(){var r=this,a=this.doc,o=this.session;this.selectionBefore=o.selection.toJSON(),o.selection.inMultiSelectMode&&o.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=o.addMarker(new b(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var s=a.createAnchor(n.row,n.column);s.$insertRight=!0,s.detach(),r.others.push(s)}),o.setUndoSelect(!1)},g.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,a=this;this.othersActive=!0,this.others.forEach(function(o){o.markerId=r.addMarker(new b(o.row,o.column,o.row,o.column+a.length),a.othersClass,null,!1)})}},g.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},g.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var a=r;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var o=r.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,i=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,n=a.start.column-this.pos.column;if(this.updateAnchors(r),i&&(this.length+=o),i&&!this.session.$fromUndo){if(r.action==="insert")for(var s=this.others.length-1;s>=0;s--){var h=this.others[s],m={row:h.row,column:h.column+n};this.doc.insertMergedLines(m,r.lines)}else if(r.action==="remove")for(var s=this.others.length-1;s>=0;s--){var h=this.others[s],m={row:h.row,column:h.column+n};this.doc.remove(new b(m.row,m.column,m.row,m.column-o))}}this.$updating=!1,this.updateMarkers()}},g.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var a=this.others.length;a--;)this.others[a].onChange(r);this.updateMarkers()},g.prototype.updateMarkers=function(){if(!this.$updating){var r=this,a=this.session,o=function(n,s){a.removeMarker(n.markerId),n.markerId=a.addMarker(new b(n.row,n.column,n.row,n.column+r.length),s,null,!1)};o(this.pos,this.mainClass);for(var i=this.others.length;i--;)o(this.others[i],this.othersClass)}},g.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},g.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},g.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),a=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,o=0;o<a;o++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},g}();_.implement(p.prototype,w),l.PlaceHolder=p}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,l,T){var b=e("../lib/event"),w=e("../lib/useragent");function _(g,r){return g.row==r.row&&g.column==r.column}function p(g){var r=g.domEvent,a=r.altKey,o=r.shiftKey,i=r.ctrlKey,n=g.getAccelKey(),s=g.getButton();if(i&&w.isMac&&(s=r.button),g.editor.inMultiSelectMode&&s==2){g.editor.textInput.onContextMenu(g.domEvent);return}if(!i&&!a&&!n){s===0&&g.editor.inMultiSelectMode&&g.editor.exitMultiSelectMode();return}if(s===0){var h=g.editor,m=h.selection,y=h.inMultiSelectMode,R=g.getDocumentPosition(),$=m.getCursor(),C=g.inSelection()||m.isEmpty()&&_(R,$),v=g.x,L=g.y,I=function(te){v=te.clientX,L=te.clientY},F=h.session,E=h.renderer.pixelToScreenCoordinates(v,L),U=E,P;if(h.$mouseHandler.$enableJumpToDef)i&&a||n&&a?P=o?"block":"add":a&&h.$blockSelectEnabled&&(P="block");else if(n&&!a){if(P="add",!y&&o)return}else a&&h.$blockSelectEnabled&&(P="block");if(P&&w.isMac&&r.ctrlKey&&h.$mouseHandler.cancelContextMenu(),P=="add"){if(!y&&C)return;if(!y){var O=m.toOrientedRange();h.addSelectionMarker(O)}var S=m.rangeList.rangeAtPoint(R);h.inVirtualSelectionMode=!0,o&&(S=null,O=m.ranges[0]||O,h.removeSelectionMarker(O)),h.once("mouseup",function(){var te=m.toOrientedRange();S&&te.isEmpty()&&_(S.cursor,te.cursor)?m.substractPoint(te.cursor):(o?m.substractPoint(O.cursor):O&&(h.removeSelectionMarker(O),m.addRange(O)),m.addRange(te)),h.inVirtualSelectionMode=!1})}else if(P=="block"){g.stop(),h.inVirtualSelectionMode=!0;var k,N=[],W=function(){var te=h.renderer.pixelToScreenCoordinates(v,L),he=F.screenToDocumentPosition(te.row,te.column,te.offsetX);_(U,te)&&_(he,m.lead)||(U=te,h.selection.moveToPosition(he),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(N),N=m.rectangularRangeBlock(U,E),h.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=h.$mouseHandler.$clickSelection.clone()),N.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};y&&!n?m.toSingleRange():!y&&n&&(k=m.toOrientedRange(),h.addSelectionMarker(k)),o?E=F.documentToScreenPosition(m.lead):m.moveToPosition(R),U={row:-1,column:-1};var V=function(te){W(),clearInterval(Q),h.removeSelectionMarkers(N),N.length||(N=[m.toOrientedRange()]),k&&(h.removeSelectionMarker(k),m.toSingleRange(k));for(var he=0;he<N.length;he++)m.addRange(N[he]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null},G=W;b.capture(h.container,I,V);var Q=setInterval(function(){G()},20);return g.preventDefault()}}}l.onMouseDown=p}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,l,T){l.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}],l.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 b=e("../keyboard/hash_handler").HashHandler;l.keyboardHandler=new b(l.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(e,l,T){var b=e("./range_list").RangeList,w=e("./range").Range,_=e("./selection").Selection,p=e("./mouse/multi_select_handler").onMouseDown,g=e("./lib/event"),r=e("./lib/lang"),a=e("./commands/multi_select_commands");l.commands=a.defaultCommands.concat(a.multiSelectCommands);var o=e("./search").Search,i=new o;function n($,C,v){return i.$options.wrap=!0,i.$options.needle=C,i.$options.backwards=v==-1,i.find($)}var s=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(s.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,C){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var v=this.toOrientedRange();if(this.rangeList.add(v),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(v),this.$onAddRange(v)}$.cursor||($.cursor=$.end);var L=this.rangeList.add($);return this.$onAddRange($),L.length&&this.$onRemoveRange(L),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),$&&this.fromOrientedRange($)},this.substractPoint=function($){var C=this.rangeList.substractPoint($);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();$.push(C),this.rangeCount=0}for(var v=$.length;v--;){var L=this.ranges.indexOf($[v]);this.ranges.splice(L,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new b,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],C=[],v=0;v<$.length;v++){var L=$[v],I=L.start.row,F=L.end.row;if(I===F)C.push(L.clone());else{for(C.push(new w(I,L.start.column,I,this.session.getLine(I).length));++I<F;)C.push(this.getLineRange(I,!0));C.push(new w(F,0,F,L.end.column))}v==0&&!this.isBackwards()&&(C=C.reverse())}this.toSingleRange();for(var v=C.length;v--;)this.addRange(C[v])},this.joinSelections=function(){var $=this.rangeList.ranges,C=$[$.length-1],v=w.fromPoints($[0].start,C.end);this.toSingleRange(),this.setSelectionRange(v,C.cursor==C.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,C=$[$.length-1],v=w.fromPoints($[0].start,C.end);this.toSingleRange(),this.setSelectionRange(v,C.cursor==C.start)}else{var L=this.session.documentToScreenPosition(this.cursor),I=this.session.documentToScreenPosition(this.anchor),F=this.rectangularRangeBlock(L,I);F.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,C,v){var L=[],I=$.column<C.column;if(I)var F=$.column,E=C.column,U=$.offsetX,P=C.offsetX;else var F=C.column,E=$.column,U=C.offsetX,P=$.offsetX;var O=$.row<C.row;if(O)var S=$.row,k=C.row;else var S=C.row,k=$.row;F<0&&(F=0),S<0&&(S=0),S==k&&(v=!0);for(var N,W=S;W<=k;W++){var V=w.fromPoints(this.session.screenToDocumentPosition(W,F,U),this.session.screenToDocumentPosition(W,E,P));if(V.isEmpty()){if(N&&m(V.end,N))break;N=V.end}V.cursor=I?V.start:V.end,L.push(V)}if(O&&L.reverse(),!v){for(var G=L.length-1;L[G].isEmpty()&&G>0;)G--;if(G>0)for(var Q=0;L[Q].isEmpty();)Q++;for(var te=G;te>=Q;te--)L[te].isEmpty()&&L.splice(te,1)}return L}}).call(_.prototype);var h=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var C=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",C),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var C=this.session.$selectionMarkers.indexOf($);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var C=this.session.$selectionMarkers,v=$.length;v--;){var L=$[v];if(L.marker){this.session.removeMarker(L.marker);var I=C.indexOf(L);I!=-1&&C.splice(I,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function($){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var C=$.command,v=$.editor;if(v.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?L=v.forEachSelection(C,$.args):C.multiSelectAction=="forEachLine"?L=v.forEachSelection(C,$.args,!0):C.multiSelectAction=="single"?(v.exitMultiSelectMode(),L=C.exec(v,$.args||{})):L=C.multiSelectAction(v,$.args||{});else{var L=C.exec(v,$.args||{});v.multiSelect.addRange(v.multiSelect.toOrientedRange()),v.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function($,C,v){if(!this.inVirtualSelectionMode){var L=v&&v.keepOrder,I=v==!0||v&&v.$byLines,F=this.session,E=this.selection,U=E.rangeList,P=(L?E:U).ranges,O;if(!P.length)return $.exec?$.exec(this,C||{}):$(this,C||{});var S=E._eventRegistry;E._eventRegistry={};var k=new _(F);this.inVirtualSelectionMode=!0;for(var N=P.length;N--;){if(I)for(;N>0&&P[N].start.row==P[N-1].end.row;)N--;k.fromOrientedRange(P[N]),k.index=N,this.selection=F.selection=k;var W=$.exec?$.exec(this,C||{}):$(this,C||{});!O&&W!==void 0&&(O=W),k.toOrientedRange(P[N])}k.detach(),this.selection=F.selection=E,this.inVirtualSelectionMode=!1,E._eventRegistry=S,E.mergeOverlappingRanges(),E.ranges[0]&&E.fromOrientedRange(E.ranges[0]);var V=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),V&&V.from==V.to&&this.renderer.animateScrolling(V.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,v=[],L=0;L<C.length;L++)v.push(this.session.getTextRange(C[L]));var I=this.session.getDocument().getNewLineCharacter();$=v.join(I),$.length==(v.length-1)*I.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,C){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var v=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&C==this.multiSelect.anchor)return;var L=C==this.multiSelect.anchor?v.cursor==v.start?v.end:v.start:v.cursor;L.row!=C.row||this.session.$clipPositionToDocument(L.row,L.column).column!=C.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,C,v){if(C=C||{},C.needle=$||C.needle,C.needle==null){var L=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();C.needle=this.session.getTextRange(L)}this.$search.set(C);var I=this.$search.findAll(this.session);if(!I.length)return 0;var F=this.multiSelect;v||F.toSingleRange(I[0]);for(var E=I.length;E--;)F.addRange(I[E],!0);return L&&F.rangeList.rangeAtPoint(L.start)&&F.addRange(L,!0),I.length},this.selectMoreLines=function($,C){var v=this.selection.toOrientedRange(),L=v.cursor==v.end,I=this.session.documentToScreenPosition(v.cursor);this.selection.$desiredColumn&&(I.column=this.selection.$desiredColumn);var F=this.session.screenToDocumentPosition(I.row+$,I.column);if(v.isEmpty())var U=F;else var E=this.session.documentToScreenPosition(L?v.end:v.start),U=this.session.screenToDocumentPosition(E.row+$,E.column);if(L){var P=w.fromPoints(F,U);P.cursor=P.start}else{var P=w.fromPoints(U,F);P.cursor=P.end}if(P.desiredColumn=I.column,!this.selection.inMultiSelectMode)this.selection.addRange(v);else if(C)var O=v.cursor;this.selection.addRange(P),O&&this.selection.substractPoint(O)},this.transposeSelections=function($){for(var C=this.session,v=C.multiSelect,L=v.ranges,I=L.length;I--;){var F=L[I];if(F.isEmpty()){var E=C.getWordRange(F.start.row,F.start.column);F.start.row=E.start.row,F.start.column=E.start.column,F.end.row=E.end.row,F.end.column=E.end.column}}v.mergeOverlappingRanges();for(var U=[],I=L.length;I--;){var F=L[I];U.unshift(C.getTextRange(F))}$<0?U.unshift(U.pop()):U.push(U.shift());for(var I=L.length;I--;){var F=L[I],P=F.clone();C.replace(F,U[I]),F.start.row=P.start.row,F.start.column=P.start.column}v.fromOrientedRange(v.ranges[0])},this.selectMore=function($,C,v){var L=this.session,I=L.multiSelect,F=I.toOrientedRange();if(!(F.isEmpty()&&(F=L.getWordRange(F.start.row,F.start.column),F.cursor=$==-1?F.start:F.end,this.multiSelect.addRange(F),v))){var E=L.getTextRange(F),U=n(L,E,$);U&&(U.cursor=$==-1?U.start:U.end,this.session.unfold(U),this.multiSelect.addRange(U),this.renderer.scrollCursorIntoView(null,.5)),C&&this.multiSelect.substractPoint(F.cursor)}},this.alignCursors=function(){var $=this.session,C=$.multiSelect,v=C.ranges,L=-1,I=v.filter(function(G){if(G.cursor.row==L)return!0;L=G.cursor.row});if(!v.length||I.length==v.length-1){var F=this.selection.getRange(),E=F.start.row,U=F.end.row,P=E==U;if(P){var O=this.session.getLength(),S;do S=this.session.getLine(U);while(/[=:]/.test(S)&&++U<O);do S=this.session.getLine(E);while(/[=:]/.test(S)&&--E>0);E<0&&(E=0),U>=O&&(U=O-1)}var k=this.session.removeFullLines(E,U);k=this.$reAlignText(k,P),this.session.insert({row:E,column:0},k.join(`
946
- `)+`
947
- `),P||(F.start.column=0,F.end.column=k[k.length-1].length),this.selection.setRange(F)}else{I.forEach(function(G){C.substractPoint(G.cursor)});var N=0,W=1/0,V=v.map(function(G){var Q=G.cursor,te=$.getLine(Q.row),he=te.substr(Q.column).search(/\S/g);return he==-1&&(he=0),Q.column>N&&(N=Q.column),he<W&&(W=he),he});v.forEach(function(G,Q){var te=G.cursor,he=N-te.column,ne=V[Q]-W;he>ne?$.insert(te,r.stringRepeat(" ",he-ne)):$.remove(new w(te.row,te.column,te.row,te.column-he+ne)),G.start.column=G.end.column=N,G.start.row=G.end.row=te.row,G.cursor=G.end}),C.fromOrientedRange(v[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,C){var v=!0,L=!0,I,F,E;return $.map(function(k){var N=k.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?I==null?(I=N[1].length,F=N[2].length,E=N[3].length,N):(I+F+E!=N[1].length+N[2].length+N[3].length&&(L=!1),I!=N[1].length&&(v=!1),I>N[1].length&&(I=N[1].length),F<N[2].length&&(F=N[2].length),E>N[3].length&&(E=N[3].length),N):[k]}).map(C?P:v?L?O:P:S);function U(k){return r.stringRepeat(" ",k)}function P(k){return k[2]?U(I)+k[2]+U(F-k[2].length+E)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function O(k){return k[2]?U(I+F-k[2].length)+k[2]+U(E)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function S(k){return k[2]?U(I)+k[2]+U(E)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}}}).call(h.prototype);function m($,C){return $.row==C.row&&$.column==C.column}l.onSessionChange=function($){var C=$.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var v=$.oldSession;v&&(v.multiSelect.off("addRange",this.$onAddRange),v.multiSelect.off("removeRange",this.$onRemoveRange),v.multiSelect.off("multiSelect",this.$onMultiSelect),v.multiSelect.off("singleSelect",this.$onSingleSelect),v.multiSelect.lead.off("change",this.$checkMultiselectChange),v.multiSelect.anchor.off("change",this.$checkMultiselectChange)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=l.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",p),$.commands.addCommands(a.defaultCommands),R($))}function R($){if(!$.textInput)return;var C=$.textInput.getElement(),v=!1;g.addListener(C,"keydown",function(I){var F=I.keyCode==18&&!(I.ctrlKey||I.shiftKey||I.metaKey);$.$blockSelectEnabled&&F?v||($.renderer.setMouseCursor("crosshair"),v=!0):v&&L()},$),g.addListener(C,"keyup",L,$),g.addListener(C,"blur",L,$);function L(I){v&&($.renderer.setMouseCursor(""),v=!1)}}l.MultiSelect=y,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function($){y(this),$?this.on("mousedown",p):this.off("mousedown",p)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,l,T){var b=e("../../range").Range,w=l.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(_,p,g){var r=_.getLine(g);return this.foldingStartMarker.test(r)?"start":p=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(_,p,g){return null},this.indentationBlock=function(_,p,g){var r=/\S/,a=_.getLine(p),o=a.search(r);if(o!=-1){for(var i=g||a.length,n=_.getLength(),s=p,h=p;++p<n;){var m=_.getLine(p).search(r);if(m!=-1){if(m<=o){var y=_.getTokenAt(p,0);if(!y||y.type!=="string")break}h=p}}if(h>s){var R=_.getLine(h).length;return new b(s,i,h,R)}}},this.openingBracketBlock=function(_,p,g,r,a){var o={row:g,column:r+1},i=_.$findClosingBracket(p,o,a);if(i){var n=_.foldWidgets[i.row];return n==null&&(n=_.getFoldWidget(i.row)),n=="start"&&i.row>o.row&&(i.row--,i.column=_.getLine(i.row).length),b.fromPoints(o,i)}},this.closingBracketBlock=function(_,p,g,r,a){var o={row:g,column:r},i=_.$findOpeningBracket(p,o);if(i)return i.column++,o.column--,b.fromPoints(i,o)}}).call(w.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,l,T){var b=e("../lib/dom"),w=e("../range").Range,_=e("../config").nls;function p(r,a,o){for(var i=0,n=r.length-1;i<=n;){var s=i+n>>1,h=o(a,r[s]);if(h>0)i=s+1;else if(h<0)n=s-1;else return s}return-(i+1)}function g(r,a,o){var i=r.getAnnotations().sort(w.comparePoints);if(i.length){var n=p(i,{row:a,column:-1},w.comparePoints);n<0&&(n=-n-1),n>=i.length?n=o>0?0:i.length-1:n===0&&o<0&&(n=i.length-1);var s=i[n];if(!(!s||!o)){if(s.row===a){do s=i[n+=o];while(s&&s.row===a);if(!s)return i.slice()}var h=[];a=s.row;do h[o<0?"unshift":"push"](s),s=i[n+=o];while(s&&s.row==a);return h.length&&h}}}l.showErrorMarker=function(r,a){var o=r.session,i=r.getCursorPosition(),n=i.row,s=o.widgetManager.getWidgetsAtRow(n).filter(function(I){return I.type=="errorMarker"})[0];s?s.destroy():n-=a;var h=g(o,n,a),m;if(h){var y=h[0];i.column=(y.pos&&typeof y.column!="number"?y.pos.sc:y.column)||0,i.row=y.row,m=r.renderer.$gutterLayer.$annotations[i.row]}else{if(s)return;m={displayText:[_("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(i.row),r.selection.moveToPosition(i);var R={row:i.row,fixedWidth:!0,coverGutter:!0,el:b.createElement("div"),type:"errorMarker"},$=R.el.appendChild(b.createElement("div")),C=R.el.appendChild(b.createElement("div"));C.className="error_widget_arrow "+m.className;var v=r.renderer.$cursorLayer.getPixelPosition(i).left;C.style.left=v+r.renderer.gutterWidth-5+"px",R.el.className="error_widget_wrapper",$.className="error_widget "+m.className,m.displayText.forEach(function(I,F){$.appendChild(b.createTextNode(I)),F<m.displayText.length-1&&$.appendChild(b.createElement("br"))}),$.appendChild(b.createElement("div"));var L=function(I,F,E){if(F===0&&(E==="esc"||E==="return"))return R.destroy(),{command:"null"}};R.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(L),o.widgetManager.removeLineWidget(R),r.off("changeSelection",R.destroy),r.off("changeSession",R.destroy),r.off("mouseup",R.destroy),r.off("change",R.destroy))},r.keyBinding.addKeyboardHandler(L),r.on("changeSelection",R.destroy),r.on("changeSession",R.destroy),r.on("mouseup",R.destroy),r.on("change",R.destroy),r.session.widgetManager.addLineWidget(R),R.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:R.el.offsetHeight})},b.importCssString(`
948
- .error_widget_wrapper {
949
- background: inherit;
950
- color: inherit;
951
- border:none
952
- }
953
- .error_widget {
954
- border-top: solid 2px;
955
- border-bottom: solid 2px;
956
- margin: 5px 0;
957
- padding: 10px 40px;
958
- white-space: pre-wrap;
959
- }
960
- .error_widget.ace_error, .error_widget_arrow.ace_error{
961
- border-color: #ff5a5a
962
- }
963
- .error_widget.ace_warning, .error_widget_arrow.ace_warning{
964
- border-color: #F1D817
965
- }
966
- .error_widget.ace_info, .error_widget_arrow.ace_info{
967
- border-color: #5a5a5a
968
- }
969
- .error_widget.ace_ok, .error_widget_arrow.ace_ok{
970
- border-color: #5aaa5a
971
- }
972
- .error_widget_arrow {
973
- position: absolute;
974
- border: solid 5px;
975
- border-top-color: transparent!important;
976
- border-right-color: transparent!important;
977
- border-left-color: transparent!important;
978
- top: -5px;
979
- }
980
- `,"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(e,l,T){e("./loader_build")(l);var b=e("./lib/dom"),w=e("./range").Range,_=e("./editor").Editor,p=e("./edit_session").EditSession,g=e("./undomanager").UndoManager,r=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),l.config=e("./config"),l.edit=function(o,i){if(typeof o=="string"){var n=o;if(o=document.getElementById(n),!o)throw new Error("ace.edit can't find div #"+n)}if(o&&o.env&&o.env.editor instanceof _)return o.env.editor;var s="";if(o&&/input|textarea/i.test(o.tagName)){var h=o;s=h.value,o=b.createElement("pre"),h.parentNode.replaceChild(o,h)}else o&&(s=o.textContent,o.innerHTML="");var m=l.createEditSession(s),y=new _(new r(o),m,i),R={document:m,editor:y,onResize:y.resize.bind(y,null)};return h&&(R.textarea=h),y.on("destroy",function(){R.editor.container.env=null}),y.container.env=y.env=R,y},l.createEditSession=function(o,i){var n=new p(o,i);return n.setUndoManager(new g),n},l.Range=w,l.Editor=_,l.EditSession=p,l.UndoManager=g,l.VirtualRenderer=r;var a=l.config.version;l.version=a}),function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var l=function(){return this}();!l&&typeof window<"u"&&(l=window),!l&&typeof self<"u"&&(l=self),l.ace||(l.ace=e);for(var T in e)e.hasOwnProperty(T)&&(l.ace[T]=e[T]);l.ace.default=l.ace,c&&(c.exports=l.ace)})}()}(cc)),cc.exports}var wx=yx(),uc={exports:{}},Ud;function bx(){return Ud||(Ud=1,function(c,u){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,l,T){var b=e("../lib/oop"),w=e("./text_highlight_rules").TextHighlightRules,_=l.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};l.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},l.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},l.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var p=l.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},g=l.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},r=l.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=l.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},o=l.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},i=l.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},n=l.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},s=l.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},h=function(){var m="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",y="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",R="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",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",C=this.$keywords=this.createKeywordMapper({keyword:y,"constant.language":R,"variable.language":$,"support.function":m,"invalid.deprecated":"debugger"},"identifier"),v=`\\\\(?: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})*})`,L={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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:v},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:v},{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(I,F,E){E.length&&(E=[]);var U=I[I.length-1];return E.unshift(U,F),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(I,F,E){E.length&&(E=[]);var U=I[I.length-1];return E.unshift(U,F),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(I,F,E){E.length&&(E=[]);var U=I[I.length-1];return E.unshift(U,F),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(I,F,E){E.length&&(E=[]);var U=I[I.length-1];return E.unshift(U,F),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(I,F,E){E.length&&(E=[]);var U=I[I.length-1];return E.unshift(U,F),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},s,{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\\?(?:"+v+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},o,i,_,p,n,g,r,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:C,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(I,F,E){var U=I[2]=="-"||I[2]=="~"?"indentedHeredoc":"heredoc",P=I.split(this.splitRegex);return E.push(U,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(I,F,E){return I===E[1]?(E.shift(),E.shift(),this.next=E[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(I,F,E){return I===E[1]?(E.shift(),E.shift(),this.next=E[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(I,F){return F[0]==="heredoc"||F[0]==="indentedHeredoc"?F[0]:I}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(I,F,E){return this.next="",I=="}"&&E.length>1&&E[1]!="start"&&(E.shift(),this.next=E.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(I,F,E){return E.length&&I===E[0]?(E.unshift(I,F),this.token):"string"}},{token:"constant.language.escape",regex:v},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(I,F,E){return E.length&&I===L[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(I,F,E){return E.length&&I===E[0]?(E.unshift(I,F),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(I,F,E){return E.length&&I===L[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(I,F,E){return E.length&&I===E[0]?(E.unshift(I,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(I,F,E){return E.length&&I===L[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(I,F,E){return E.length&&I===E[0]?(E.unshift(I,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:v},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(I,F,E){return E.length&&I===L[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(I,F,E){return E.length&&I===E[0]?(E.unshift(I,F),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(I,F,E){return E.length&&I[0]===L[E[0]]?(E.shift(),this.next=E.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()};b.inherits(h,w),l.RubyHighlightRules=h}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,l,T){var b=e("../range").Range,w=function(){};(function(){this.checkOutdent=function(_,p){return/^\s+$/.test(_)?/^\s*\}/.test(p):!1},this.autoOutdent=function(_,p){var g=_.getLine(p),r=g.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,o=_.findMatchingBracket({row:p,column:a});if(!o||o.row==p)return 0;var i=this.$getIndent(_.getLine(o.row));_.replace(new b(p,0,p,a-1),i)},this.$getIndent=function(_){return _.match(/^\s*/)[0]}}).call(w.prototype),l.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(e,l,T){var b=e("../../lib/oop"),w=e("./fold_mode").FoldMode,_=e("../../range").Range,p=e("../../token_iterator").TokenIterator,g=l.FoldMode=function(){};b.inherits(g,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(r,a,o){var i=r.getLine(o),n=this.foldingStartMarker.test(i),s=this.foldingStopMarker.test(i);if(n&&!s){var h=i.match(this.foldingStartMarker);if(h[1]){if((h[1]=="if"||h[1]=="else"||h[1]=="while"||h[1]=="until"||h[1]=="unless")&&(h[1]=="else"&&/^\s*else\s*$/.test(i)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(i)===!1)||h[1]=="when"&&/\sthen\s/.test(i)===!0)return;if(r.getTokenAt(o,h.index+2).type==="keyword")return"start"}else if(!h[3]||r.getTokenAt(o,h.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!s||n&&s)return"";var h=i.match(this.foldingStopMarker);if(h[3]==="end"){if(r.getTokenAt(o,h.index+1).type==="keyword")return"end"}else if(!h[1]||r.getTokenAt(o,h.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(r,a,o){var i=r.doc.getLine(o),n=this.foldingStartMarker.exec(i);if(n)return n[1]||n[3]?this.rubyBlock(r,o,n.index+2):this.openingBracketBlock(r,"{",o,n.index);var n=this.foldingStopMarker.exec(i);if(n)return n[3]==="end"&&r.getTokenAt(o,n.index+1).type==="keyword"?this.rubyBlock(r,o,n.index+1):n[1]==="=end"&&r.getTokenAt(o,n.index+1).type==="comment.multiline"?this.rubyBlock(r,o,n.index+1):this.closingBracketBlock(r,"}",o,n.index+n[0].length)},this.rubyBlock=function(r,P,o,i){var n=new p(r,P,o),s=n.getCurrentToken();if(!(!s||s.type!="keyword"&&s.type!="comment.multiline")){var h=s.value,m=r.getLine(P);switch(s.value){case"if":case"unless":case"while":case"until":var y=new RegExp("^\\s*"+s.value);if(!y.test(m))return;var R=this.indentKeywords[h];break;case"when":if(/\sthen\s/.test(m))return;case"elsif":case"rescue":case"ensure":var R=1;break;case"else":var y=new RegExp("^\\s*"+s.value+"\\s*$");if(!y.test(m))return;var R=1;break;default:var R=this.indentKeywords[h]}var $=[h];if(R){var C=R===-1?r.getLine(P-1).length:r.getLine(P).length,v=P,L=[];if(L.push(n.getCurrentTokenRange()),n.step=R===-1?n.stepBackward:n.stepForward,s.type=="comment.multiline"){for(;s=n.step();)if(s.type==="comment.multiline"){if(R==1){if(C=6,s.value=="=end")break}else if(s.value=="=begin")break}}else for(;s=n.step();){var I=!1;if(s.type==="keyword"){var F=R*this.indentKeywords[s.value];switch(m=r.getLine(n.getCurrentTokenRow()),s.value){case"do":for(var E=n.$tokenIndex-1;E>=0;E--){var U=n.$rowTokens[E];if(U&&(U.value=="while"||U.value=="until"||U.value=="for")){F=0;break}}break;case"else":var y=new RegExp("^\\s*"+s.value+"\\s*$");(!y.test(m)||h=="case")&&(F=0,I=!0);break;case"if":case"unless":case"while":case"until":var y=new RegExp("^\\s*"+s.value);y.test(m)||(F=0,I=!0);break;case"when":(/\sthen\s/.test(m)||h=="case")&&(F=0,I=!0)}if(F>0)$.unshift(s.value);else if(F<=0&&I===!1){if($.shift(),!$.length&&((h=="while"||h=="until"||h=="for")&&s.value!="do"||s.value=="do"&&R==-1&&F!=0||s.value!="do"))break;F===0&&$.unshift(s.value)}}}if(!s)return null;if(i)return L.push(n.getCurrentTokenRange()),L;var P=n.getCurrentTokenRow();if(R===-1){if(s.type==="comment.multiline")var O=6;else var O=r.getLine(P).length;return new _(P,O,v-1,C)}return new _(v,C,P-1,r.getLine(P-1).length)}}}}).call(g.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(e,l,T){var b=e("../lib/oop"),w=e("./text").Mode,_=e("./ruby_highlight_rules").RubyHighlightRules,p=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../range").Range,r=e("./folding/ruby").FoldMode,a=function(){this.HighlightRules=_,this.$outdent=new p,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new r,this.indentKeywords=this.foldingRules.indentKeywords};b.inherits(a,w),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(o,i,n){var s=this.$getIndent(i),h=this.getTokenizer().getLineTokens(i,o),m=h.tokens;if(m.length&&m[m.length-1].type=="comment")return s;if(o=="start"){var y=i.match(/^.*[\{\(\[]\s*$/),R=i.match(/^\s*(class|def|module)\s.*$/),$=i.match(/.*do(\s*|\s+\|.*\|\s*)$/),C=i.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(y||R||$||C)&&(s+=n)}return s},this.checkOutdent=function(o,i,n){return/^\s+(end|else|rescue|ensure)$/.test(i+n)||this.$outdent.checkOutdent(i,n)},this.autoOutdent=function(o,i,n){var s=i.getLine(n);if(/}/.test(s))return this.$outdent.autoOutdent(i,n);var h=this.$getIndent(s),m=i.getLine(n-1),y=this.$getIndent(m),R=i.getTabString();y.length<=h.length&&h.slice(-R.length)==R&&i.remove(new g(n,h.length-R.length,n,h.length))},this.getMatching=function(o,i,n){if(i==null){var s=o.selection.lead;n=s.column,i=s.row}var h=o.getTokenAt(i,n);if(h&&h.value in this.indentKeywords)return this.foldingRules.rubyBlock(o,i,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),l.Mode=a}),function(){ace.require(["ace/mode/ruby"],function(e){c&&(c.exports=e)})}()}(uc)),uc.exports}bx();var hc={exports:{}},Vd;function xx(){return Vd||(Vd=1,function(c,u){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,l,T){var b=e("../lib/oop"),w=e("./text_highlight_rules").TextHighlightRules,_=function(){var p="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",g="True|False|None|NotImplemented|Ellipsis|__debug__",r="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":r,"variable.language":"self|cls","constant.language":g,keyword:p},"identifier"),o="[uU]?",i="[rR]",n="[fF]",s="(?:[rR][fF]|[fF][rR])",h="(?:(?:[1-9]\\d*)|(?:0))",m="(?:0[oO]?[0-7]+)",y="(?:0[xX][\\dA-Fa-f]+)",R="(?:0[bB][01]+)",$="(?:"+h+"|"+m+"|"+y+"|"+R+")",C="(?:[eE][+-]?\\d+)",v="(?:\\.\\d+)",L="(?:\\d+)",I="(?:(?:"+L+"?"+v+")|(?:"+L+"\\.))",F="(?:(?:"+I+"|"+L+")"+C+")",E="(?:"+F+"|"+I+")",U=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:o+'"{3}',next:"qqstring3"},{token:"string",regex:o+'"(?=.)',next:"qqstring"},{token:"string",regex:o+"'{3}",next:"qstring3"},{token:"string",regex:o+"'(?=.)",next:"qstring"},{token:"string",regex:i+'"{3}',next:"rawqqstring3"},{token:"string",regex:i+'"(?=.)',next:"rawqqstring"},{token:"string",regex:i+"'{3}",next:"rawqstring3"},{token:"string",regex:i+"'(?=.)",next:"rawqstring"},{token:"string",regex:n+'"{3}',next:"fqqstring3"},{token:"string",regex:n+'"(?=.)',next:"fqqstring"},{token:"string",regex:n+"'{3}",next:"fqstring3"},{token:"string",regex:n+"'(?=.)",next:"fqstring"},{token:"string",regex:s+'"{3}',next:"rfqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rfqqstring"},{token:"string",regex:s+"'{3}",next:"rfqstring3"},{token:"string",regex:s+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:U},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:U},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:U},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:U},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:U},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:U},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:U},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:U},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+E+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:E},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};b.inherits(_,w),l.PythonHighlightRules=_}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,l,T){var b=e("../../lib/oop"),w=e("./fold_mode").FoldMode,_=l.FoldMode=function(p){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+p+")(?:\\s*)(?:#.*)?$")};b.inherits(_,w),(function(){this.getFoldWidgetRange=function(p,g,r){var a=p.getLine(r),o=a.match(this.foldingStartMarker);if(o)return o[1]?this.openingBracketBlock(p,o[1],r,o.index):o[2]?this.indentationBlock(p,r,o.index+o[2].length):this.indentationBlock(p,r)}}).call(_.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,l,T){var b=e("../lib/oop"),w=e("./text").Mode,_=e("./python_highlight_rules").PythonHighlightRules,p=e("./folding/pythonic").FoldMode,g=e("../range").Range,r=function(){this.HighlightRules=_,this.foldingRules=new p("\\:"),this.$behaviour=this.$defaultBehaviour};b.inherits(r,w),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(o,i,n){var s=this.$getIndent(i),h=this.getTokenizer().getLineTokens(i,o),m=h.tokens;if(m.length&&m[m.length-1].type=="comment")return s;if(o=="start"){var y=i.match(/^.*[\{\(\[:]\s*$/);y&&(s+=n)}return s};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(o,i,n){if(n!==`\r
981
- `&&n!=="\r"&&n!==`
982
- `)return!1;var s=this.getTokenizer().getLineTokens(i.trim(),o).tokens;if(!s)return!1;do var h=s.pop();while(h&&(h.type=="comment"||h.type=="text"&&h.value.match(/^\s+$/)));return h?h.type=="keyword"&&a[h.value]:!1},this.autoOutdent=function(o,i,n){n+=1;var s=this.$getIndent(i.getLine(n)),h=i.getTabString();s.slice(-h.length)==h&&i.remove(new g(n,s.length-h.length,n,s.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(r.prototype),l.Mode=r}),function(){ace.require(["ace/mode/python"],function(e){c&&(c.exports=e)})}()}(hc)),hc.exports}xx();var dc={exports:{}},jd;function kx(){return jd||(jd=1,function(c,u){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,l,T){var b=e("../lib/oop"),w=e("./text_highlight_rules").TextHighlightRules,_=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};b.inherits(_,w),l.JsonHighlightRules=_}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,l,T){var b=e("../range").Range,w=function(){};(function(){this.checkOutdent=function(_,p){return/^\s+$/.test(_)?/^\s*\}/.test(p):!1},this.autoOutdent=function(_,p){var g=_.getLine(p),r=g.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,o=_.findMatchingBracket({row:p,column:a});if(!o||o.row==p)return 0;var i=this.$getIndent(_.getLine(o.row));_.replace(new b(p,0,p,a-1),i)},this.$getIndent=function(_){return _.match(/^\s*/)[0]}}).call(w.prototype),l.MatchingBraceOutdent=w}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,l,T){var b=e("../../lib/oop"),w=e("../../range").Range,_=e("./fold_mode").FoldMode,p=l.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};b.inherits(p,_),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,r,a){var o=g.getLine(a);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var i=this._getFoldWidgetBase(g,r,a);return!i&&this.startRegionRe.test(o)?"start":i},this.getFoldWidgetRange=function(g,r,a,o){var i=g.getLine(a);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(g,i,a);var h=i.match(this.foldingStartMarker);if(h){var n=h.index;if(h[1])return this.openingBracketBlock(g,h[1],a,n);var s=g.getCommentFoldRange(a,n+h[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(g,a):r!="all"&&(s=null)),s}if(r!=="markbegin"){var h=i.match(this.foldingStopMarker);if(h){var n=h.index+h[0].length;return h[1]?this.closingBracketBlock(g,h[1],a,n):g.getCommentFoldRange(a,n,-1)}}},this.getSectionRange=function(g,r){var a=g.getLine(r),o=a.search(/\S/),i=r,n=a.length;r+=1;for(var s=r,h=g.getLength();++r<h;){a=g.getLine(r);var m=a.search(/\S/);if(m!==-1){if(o>m)break;var y=this.getFoldWidgetRange(g,"all",r);if(y){if(y.start.row<=i)break;if(y.isMultiLine())r=y.end.row;else if(o==m)break}s=r}}return new w(i,n,s,g.getLine(s).length)},this.getCommentRegionBlock=function(g,r,a){for(var o=r.search(/\s*$/),i=g.getLength(),n=a,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++a<i;){r=g.getLine(a);var m=s.exec(r);if(m&&(m[1]?h--:h++,!h))break}var y=a;if(y>n)return new w(n,o,y,r.length)}}).call(p.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,l,T){var b=e("../lib/oop"),w=e("./text").Mode,_=e("./json_highlight_rules").JsonHighlightRules,p=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("./folding/cstyle").FoldMode,r=e("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=_,this.$outdent=new p,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};b.inherits(a,w),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,i,n){var s=this.$getIndent(i);if(o=="start"){var h=i.match(/^.*[\{\(\[]\s*$/);h&&(s+=n)}return s},this.checkOutdent=function(o,i,n){return this.$outdent.checkOutdent(i,n)},this.autoOutdent=function(o,i,n){this.$outdent.autoOutdent(i,n)},this.createWorker=function(o){var i=new r(["ace"],"ace/mode/json_worker","JsonWorker");return i.attachToDocument(o.getDocument()),i.on("annotate",function(n){o.setAnnotations(n.data)}),i.on("terminate",function(){o.clearAnnotations()}),i},this.$id="ace/mode/json"}).call(a.prototype),l.Mode=a}),function(){ace.require(["ace/mode/json"],function(e){c&&(c.exports=e)})}()}(dc)),dc.exports}kx();var fc={exports:{}},Kd;function _x(){return Kd||(Kd=1,function(c,u){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,l,T){var b=e("../lib/oop");e("../lib/lang");var w=e("./text_highlight_rules").TextHighlightRules,_=l.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",p=l.supportFunction="rgb|rgba|url|attr|counter|counters",g=l.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",r=l.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",a=l.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",o=l.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",i=l.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",n=l.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",s=function(){var h=this.createKeywordMapper({"support.function":p,"support.constant":g,"support.type":_,"support.constant.color":r,"support.constant.fonts":a},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:o},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+o+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:o},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:i},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:n},{include:"url"},{token:h,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};b.inherits(s,w),l.CssHighlightRules=s}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,l,T){var b=e("../lib/oop"),w=e("./text_highlight_rules").TextHighlightRules,_=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},_.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};b.inherits(_,w),_.getTagRule=function(p){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},_.getStartRule=function(p){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:p}},_.getEndRule=function(p){return{token:"comment.doc",regex:"\\*\\/",next:p}},l.JsDocCommentHighlightRules=_}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,l,T){function b(){var o=r.replace("\\d","\\d\\-"),i={onMatch:function(s,h,m){var y=s.charAt(1)=="/"?2:1;return y==1?(h!=this.nextState?m.unshift(this.next,this.nextState,0):m.unshift(this.next),m[2]++):y==2&&h==this.nextState&&(m[1]--,(!m[1]||m[1]<0)&&(m.shift(),m.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:s.slice(0,y)},{type:"meta.tag.tag-name.xml",value:s.substr(y)}]},regex:"</?(?:"+o+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(i);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,i,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(s,h,m){return h==m[0]&&m.shift(),s.length==2&&(m[0]==this.nextState&&m[1]--,(!m[1]||m[1]<0)&&m.splice(0,2)),this.next=m[0]||"start",[{type:this.token,value:s}]},nextState:"jsx"},n,w("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:o},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},i],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function w(o){return[{token:"comment",regex:/\/\*/,next:[p.getTagRule(),{token:"comment",regex:"\\*\\/",next:o||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[p.getTagRule(),{token:"comment",regex:"$|^",next:o||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var _=e("../lib/oop"),p=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=e("./text_highlight_rules").TextHighlightRules,r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",a=function(o){var i={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(i,"identifier"),s="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",h="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",m="(function)(\\s*)(\\*?)",y={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(i).join("|")+"\\b)"+r+")(\\s*)(\\()"};this.$rules={no_regex:[p.getStartRule("doc-start"),w("no_regex"),y,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)"+m+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)"+m+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+m+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+s+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:r},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:m+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:r},{regex:"",token:"empty",next:"no_regex"}],start:[p.getStartRule("doc-start"),w("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[w("function_arguments"),{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:h},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:h},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!o||!o.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(R,$,C){if(this.next=R=="{"?this.nextState:"",R=="{"&&C.length)C.unshift("start",$);else if(R=="}"&&C.length&&(C.shift(),this.next=C.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return R=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:h},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+r+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!o||o.jsx!=0)&&b.call(this)),this.embedRules(p,"doc-",[p.getEndRule("no_regex")]),this.normalizeRules()};_.inherits(a,g),l.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,l,T){var b=e("../lib/oop"),w=e("./text_highlight_rules").TextHighlightRules,_=function(p){var g="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+g+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:g},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+g+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+g+":)?"+g+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:g},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===_&&this.normalizeRules()};(function(){this.embedTagRules=function(p,g,r){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+r+".tag-name.xml"],regex:"(<)("+r+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:g+"start"}]}),this.$rules[r+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,o,i){return i.splice(0),this.token}}],this.embedRules(p,g,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+r+".tag-name.xml"],regex:"(</)("+r+"(?=\\s|>|$))",next:r+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(w.prototype),b.inherits(_,w),l.XmlHighlightRules=_}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,l,T){var b=e("../lib/oop"),w=e("../lib/lang"),_=e("./css_highlight_rules").CssHighlightRules,p=e("./javascript_highlight_rules").JavaScriptHighlightRules,g=e("./xml_highlight_rules").XmlHighlightRules,r=w.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),a=function(){g.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(o,i){var n=r[i];return["meta.tag.punctuation."+(o=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(_,"css-","style"),this.embedTagRules(new p({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};b.inherits(a,g),l.HtmlHighlightRules=a}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,l,T){var b=e("../config").$modes,w=e("../lib/oop"),_=e("../lib/lang"),p=e("./text_highlight_rules").TextHighlightRules,g=e("./html_highlight_rules").HtmlHighlightRules,r=function(o){return"(?:[^"+_.escapeRegExp(o)+"\\\\]|\\\\.)*"},a=function(){g.call(this);var o={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(n,s,h,m){var y=n.match(/^(\s*)([`~]+)(.*)/),R=/[\w-]+|$/.exec(y[3])[0];return b[R]||(R=""),h.unshift("githubblock",[],[y[1],y[2],R],s),this.token},next:"githubblock"},i=[{token:"support.function",regex:".*",onMatch:function(n,s,h,m){var y=h[1],R=h[2][0],$=h[2][1],C=h[2][2],v=/^(\s*)(`+|~+)\s*$/.exec(n);if(v&&v[1].length<R.length+3&&v[2].length>=$.length&&v[2][0]==$[0])return h.splice(0,3),this.next=h.shift(),this.token;if(this.next="",C&&b[C]){var L=b[C].getTokenizer().getLineTokens(n,y.slice(0));return h[1]=L.state,L.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(n){return"markup.heading."+n.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},o,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+r("]")+")(\\]\\s*\\[)("+r("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+r("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+r('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},o,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:i}),this.normalizeRules()};w.inherits(a,p),l.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,l,T){var b=e("../../lib/oop"),w=e("./fold_mode").FoldMode,_=e("../../range").Range,p=l.FoldMode=function(){};b.inherits(p,w),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,r,a){var o=g.getLine(a);return this.foldingStartMarker.test(o)?o[0]=="`"&&g.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,r,a){function o(I){return R=g.getTokens(I)[0],R&&R.type.lastIndexOf($,0)===0}function i(){var I=R.value[0];return I=="="?6:I=="-"?5:7-R.value.search(/[^#]|$/)}var n=g.getLine(a),s=n.length,h=g.getLength(),m=a,y=a;if(n.match(this.foldingStartMarker)){if(n[0]=="`"){if(g.bgTokenizer.getState(a)!=="start"){for(;++a<h&&(n=g.getLine(a),!(n[0]=="`"&n.substring(0,3)=="```")););return new _(m,s,a,0)}for(;a-- >0&&(n=g.getLine(a),!(n[0]=="`"&n.substring(0,3)=="```")););return new _(a,n.length,m,0)}var R,$="markup.heading";if(o(a)){for(var C=i();++a<h;)if(o(a)){var v=i();if(v>=C)break}if(y=a-(!R||["=","-"].indexOf(R.value[0])==-1?1:2),y>m)for(;y>m&&/^\s*$/.test(g.getLine(y));)y--;if(y>m){var L=g.getLine(y).length;return new _(m,s,y,L)}}}}}).call(p.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,l,T){var b=e("../range").Range,w=function(){};(function(){this.checkOutdent=function(_,p){return/^\s+$/.test(_)?/^\s*\}/.test(p):!1},this.autoOutdent=function(_,p){var g=_.getLine(p),r=g.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,o=_.findMatchingBracket({row:p,column:a});if(!o||o.row==p)return 0;var i=this.$getIndent(_.getLine(o.row));_.replace(new b(p,0,p,a-1),i)},this.$getIndent=function(_){return _.match(/^\s*/)[0]}}).call(w.prototype),l.MatchingBraceOutdent=w}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,l,T){function b(r,a){return r&&r.type.lastIndexOf(a+".xml")>-1}var w=e("../../lib/oop"),_=e("../behaviour").Behaviour,p=e("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(r,a,o,i,n){if(n=='"'||n=="'"){var s=n,h=i.doc.getTextRange(o.getSelectionRange());if(h!==""&&h!=="'"&&h!='"'&&o.getWrapBehavioursEnabled())return{text:s+h+s,selection:!1};var m=o.getCursorPosition(),y=i.doc.getLine(m.row),R=y.substring(m.column,m.column+1),$=new p(i,m.row,m.column),C=$.getCurrentToken();if(R==s&&(b(C,"attribute-value")||b(C,"string")))return{text:"",selection:[1,1]};if(C||(C=$.stepBackward()),!C)return;for(;b(C,"tag-whitespace")||b(C,"whitespace");)C=$.stepBackward();var v=!R||R.match(/\s/);if(b(C,"attribute-equals")&&(v||R==">")||b(C,"decl-attribute-equals")&&(v||R=="?"))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(r,a,o,i,n){var s=i.doc.getTextRange(n);if(!n.isMultiLine()&&(s=='"'||s=="'")){var h=i.doc.getLine(n.start.row),m=h.substring(n.start.column+1,n.start.column+2);if(m==s)return n.end.column++,n}}),this.add("autoclosing","insertion",function(r,a,o,i,n){if(n==">"){var s=o.getSelectionRange().start,h=new p(i,s.row,s.column),m=h.getCurrentToken()||h.stepBackward();if(!m||!(b(m,"tag-name")||b(m,"tag-whitespace")||b(m,"attribute-name")||b(m,"attribute-equals")||b(m,"attribute-value"))||b(m,"reference.attribute-value"))return;if(b(m,"attribute-value")){var y=h.getCurrentTokenColumn()+m.value.length;if(s.column<y)return;if(s.column==y){var R=h.stepForward();if(R&&b(R,"attribute-value"))return;h.stepBackward()}}if(/^\s*>/.test(i.getLine(s.row).slice(s.column)))return;for(;!b(m,"tag-name");)if(m=h.stepBackward(),m.value=="<"){m=h.stepForward();break}var $=h.getCurrentTokenRow(),C=h.getCurrentTokenColumn();if(b(h.stepBackward(),"end-tag-open"))return;var v=m.value;return $==s.row&&(v=v.substring(0,s.column-C)),this.voidElements&&this.voidElements.hasOwnProperty(v.toLowerCase())?void 0:{text:"></"+v+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(r,a,o,i,n){if(n==`
983
- `){var s=o.getCursorPosition(),h=i.getLine(s.row),m=new p(i,s.row,s.column),y=m.getCurrentToken();if(b(y,"")&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=m.stepBackward();if(!y)return;var R=y.value,$=m.getCurrentTokenRow();if(y=m.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[R]||!this.voidElements){var C=i.getTokenAt(s.row,s.column+1),h=i.getLine($),v=this.$getIndent(h),L=v+i.getTabString();return C&&C.value==="</"?{text:`
984
- `+L+`
985
- `+v,selection:[1,L.length,1,L.length]}:{text:`
986
- `+L}}}}})};w.inherits(g,_),l.XmlBehaviour=g}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,l,T){var b=e("../../lib/oop"),w=e("../../token_iterator").TokenIterator,_=e("../behaviour/cstyle").CstyleBehaviour,p=e("../behaviour/xml").XmlBehaviour,g=function(){var r=new p({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(r),this.inherit(_),this.add("autoclosing-fragment","insertion",function(a,o,i,n,s){if(s==">"){var h=i.getSelectionRange().start,m=new w(n,h.row,h.column),y=m.getCurrentToken()||m.stepBackward();if(!y)return;if(y.value=="<")return{text:"></>",selection:[1,1]}}})};b.inherits(g,_),l.JavaScriptBehaviour=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,l,T){function b(a,o){return a&&a.type&&a.type.lastIndexOf(o+".xml")>-1}var w=e("../../lib/oop"),_=e("../../range").Range,p=e("./fold_mode").FoldMode,g=l.FoldMode=function(a,o){p.call(this),this.voidElements=a||{},this.optionalEndTags=w.mixin({},this.voidElements),o&&w.mixin(this.optionalEndTags,o)};w.inherits(g,p);var r=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,o,i){var n=this._getFirstTagInLine(a,i);return n?n.closing||!n.tagName&&n.selfClosing?o==="markbeginend"?"end":"":!n.tagName||n.selfClosing||this.voidElements.hasOwnProperty(n.tagName.toLowerCase())||this._findEndTagInLine(a,i,n.tagName,n.end.column)?"":"start":this.getCommentFoldWidget(a,i)},this.getCommentFoldWidget=function(a,o){return/comment/.test(a.getState(o))&&/<!-/.test(a.getLine(o))?"start":""},this._getFirstTagInLine=function(a,o){for(var i=a.getTokens(o),n=new r,s=0;s<i.length;s++){var h=i[s];if(b(h,"tag-open")){if(n.end.column=n.start.column+h.value.length,n.closing=b(h,"end-tag-open"),h=i[++s],!h)return null;if(n.tagName=h.value,h.value===""){if(h=i[++s],!h)return null;n.tagName=h.value}for(n.end.column+=h.value.length,s++;s<i.length;s++)if(h=i[s],n.end.column+=h.value.length,b(h,"tag-close")){n.selfClosing=h.value=="/>";break}return n}if(b(h,"tag-close"))return n.selfClosing=h.value=="/>",n;n.start.column+=h.value.length}return null},this._findEndTagInLine=function(a,o,i,n){for(var s=a.getTokens(o),h=0,m=0;m<s.length;m++){var y=s[m];if(h+=y.value.length,!(h<n-1)&&b(y,"end-tag-open")&&(y=s[m+1],b(y,"tag-name")&&y.value===""&&(y=s[m+2]),y&&y.value==i))return!0}return!1},this.getFoldWidgetRange=function(a,o,i){var n=this._getFirstTagInLine(a,i);if(!n)return this.getCommentFoldWidget(a,i)&&a.getCommentFoldRange(i,a.getLine(i).length);var s=a.getMatchingTags({row:i,column:0});if(s)return new _(s.openTag.end.row,s.openTag.end.column,s.closeTag.start.row,s.closeTag.start.column)}}).call(g.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,l,T){var b=e("../../lib/oop"),w=e("../../range").Range,_=e("./fold_mode").FoldMode,p=l.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};b.inherits(p,_),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,r,a){var o=g.getLine(a);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var i=this._getFoldWidgetBase(g,r,a);return!i&&this.startRegionRe.test(o)?"start":i},this.getFoldWidgetRange=function(g,r,a,o){var i=g.getLine(a);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(g,i,a);var h=i.match(this.foldingStartMarker);if(h){var n=h.index;if(h[1])return this.openingBracketBlock(g,h[1],a,n);var s=g.getCommentFoldRange(a,n+h[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(g,a):r!="all"&&(s=null)),s}if(r!=="markbegin"){var h=i.match(this.foldingStopMarker);if(h){var n=h.index+h[0].length;return h[1]?this.closingBracketBlock(g,h[1],a,n):g.getCommentFoldRange(a,n,-1)}}},this.getSectionRange=function(g,r){var a=g.getLine(r),o=a.search(/\S/),i=r,n=a.length;r+=1;for(var s=r,h=g.getLength();++r<h;){a=g.getLine(r);var m=a.search(/\S/);if(m!==-1){if(o>m)break;var y=this.getFoldWidgetRange(g,"all",r);if(y){if(y.start.row<=i)break;if(y.isMultiLine())r=y.end.row;else if(o==m)break}s=r}}return new w(i,n,s,g.getLine(s).length)},this.getCommentRegionBlock=function(g,r,a){for(var o=r.search(/\s*$/),i=g.getLength(),n=a,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++a<i;){r=g.getLine(a);var m=s.exec(r);if(m&&(m[1]?h--:h++,!h))break}var y=a;if(y>n)return new w(n,o,y,r.length)}}).call(p.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,l,T){var b=e("../../lib/oop"),w=e("./xml").FoldMode,_=e("./cstyle").FoldMode,p=l.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end))),this.xmlFoldMode=new w};b.inherits(p,_),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,r,a){var o=this.getFoldWidgetBase(g,r,a);return o||this.xmlFoldMode.getFoldWidget(g,r,a)},this.getFoldWidgetRange=function(g,r,a,o){var i=this.getFoldWidgetRangeBase(g,r,a,o);return i||this.xmlFoldMode.getFoldWidgetRange(g,r,a)}}).call(p.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,l,T){var b=e("../lib/oop"),w=e("./text").Mode,_=e("./javascript_highlight_rules").JavaScriptHighlightRules,p=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../worker/worker_client").WorkerClient,r=e("./behaviour/javascript").JavaScriptBehaviour,a=e("./folding/javascript").FoldMode,o=function(){this.HighlightRules=_,this.$outdent=new p,this.$behaviour=new r,this.foldingRules=new a};b.inherits(o,w),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(i,n,s){var h=this.$getIndent(n),m=this.getTokenizer().getLineTokens(n,i),y=m.tokens,R=m.state;if(y.length&&y[y.length-1].type=="comment")return h;if(i=="start"||i=="no_regex"){var $=n.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(h+=s)}else if(i=="doc-start"&&(R=="start"||R=="no_regex"))return"";return h},this.checkOutdent=function(i,n,s){return this.$outdent.checkOutdent(n,s)},this.autoOutdent=function(i,n,s){this.$outdent.autoOutdent(n,s)},this.createWorker=function(i){var n=new g(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return n.attachToDocument(i.getDocument()),n.on("annotate",function(s){i.setAnnotations(s.data)}),n.on("terminate",function(){i.clearAnnotations()}),n},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(o.prototype),l.Mode=o}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,l,T){var b={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},w=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var _=document.createElement("c").style;for(var p in _)if(typeof _[p]=="string"){var g=p.replace(/[A-Z]/g,function(r){return"-"+r.toLowerCase()});b.hasOwnProperty(g)||(b[g]=1)}}this.completionsDefined=!0},this.getCompletions=function(_,p,g,r){if(this.completionsDefined||this.defineCompletions(),_==="ruleset"||p.$mode.$id=="ace/mode/scss"){var a=p.getLine(g.row).substr(0,g.column),o=/\([^)]*$/.test(a);return o&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(_,p,g,r):this.getPropertyCompletions(_,p,g,r,o)}return[]},this.getPropertyCompletions=function(_,p,g,r,a){a=a||!1;var o=Object.keys(b);return o.map(function(i){return{caption:i,snippet:i+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(_,p,g,r){var a=p.getLine(g.row).substr(0,g.column),o=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!o)return[];var i=[];return o in b&&typeof b[o]=="object"&&(i=Object.keys(b[o])),i.map(function(n){return{caption:n,snippet:n,meta:"property value",score:1e6}})}}).call(w.prototype),l.CssCompletions=w}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,l,T){var b=e("../../lib/oop");e("../behaviour").Behaviour;var w=e("./cstyle").CstyleBehaviour,_=e("../../token_iterator").TokenIterator,p=function(){this.inherit(w),this.add("colon","insertion",function(g,r,a,o,i){if(i===":"&&a.selection.isEmpty()){var n=a.getCursorPosition(),s=new _(o,n.row,n.column),h=s.getCurrentToken();if(h&&h.value.match(/\s+/)&&(h=s.stepBackward()),h&&h.type==="support.type"){var m=o.doc.getLine(n.row),y=m.substring(n.column,n.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(m.substring(n.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(g,r,a,o,i){var n=o.doc.getTextRange(i);if(!i.isMultiLine()&&n===":"){var s=a.getCursorPosition(),h=new _(o,s.row,s.column),m=h.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=h.stepBackward()),m&&m.type==="support.type"){var y=o.doc.getLine(i.start.row),R=y.substring(i.end.column,i.end.column+1);if(R===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(g,r,a,o,i){if(i===";"&&a.selection.isEmpty()){var n=a.getCursorPosition(),s=o.doc.getLine(n.row),h=s.substring(n.column,n.column+1);if(h===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(g,r,a,o,i){if(i==="!"&&a.selection.isEmpty()){var n=a.getCursorPosition(),s=o.doc.getLine(n.row);if(/^\s*(;|}|$)/.test(s.substring(n.column)))return{text:"!important",selection:[10,10]}}})};b.inherits(p,w),l.CssBehaviour=p}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,l,T){var b=e("../lib/oop"),w=e("./text").Mode,_=e("./css_highlight_rules").CssHighlightRules,p=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../worker/worker_client").WorkerClient,r=e("./css_completions").CssCompletions,a=e("./behaviour/css").CssBehaviour,o=e("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=_,this.$outdent=new p,this.$behaviour=new a,this.$completer=new r,this.foldingRules=new o};b.inherits(i,w),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(n,s,h){var m=this.$getIndent(s),y=this.getTokenizer().getLineTokens(s,n).tokens;if(y.length&&y[y.length-1].type=="comment")return m;var R=s.match(/^.*\{\s*$/);return R&&(m+=h),m},this.checkOutdent=function(n,s,h){return this.$outdent.checkOutdent(s,h)},this.autoOutdent=function(n,s,h){this.$outdent.autoOutdent(s,h)},this.getCompletions=function(n,s,h,m){return this.$completer.getCompletions(n,s,h,m)},this.createWorker=function(n){var s=new g(["ace"],"ace/mode/css_worker","Worker");return s.attachToDocument(n.getDocument()),s.on("annotate",function(h){n.setAnnotations(h.data)}),s.on("terminate",function(){n.clearAnnotations()}),s},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(i.prototype),l.Mode=i}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,l,T){var b=e("../../lib/oop"),w=e("./fold_mode").FoldMode,_=l.FoldMode=function(p,g){this.defaultMode=p,this.subModes=g};b.inherits(_,w),(function(){this.$getMode=function(p){typeof p!="string"&&(p=p[0]);for(var g in this.subModes)if(p.indexOf(g)===0)return this.subModes[g];return null},this.$tryMode=function(p,g,r,a){var o=this.$getMode(p);return o?o.getFoldWidget(g,r,a):""},this.getFoldWidget=function(p,g,r){return this.$tryMode(p.getState(r-1),p,g,r)||this.$tryMode(p.getState(r),p,g,r)||this.defaultMode.getFoldWidget(p,g,r)},this.getFoldWidgetRange=function(p,g,r){var a=this.$getMode(p.getState(r-1));return(!a||!a.getFoldWidget(p,g,r))&&(a=this.$getMode(p.getState(r))),(!a||!a.getFoldWidget(p,g,r))&&(a=this.defaultMode),a.getFoldWidgetRange(p,g,r)}}).call(_.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,l,T){var b=e("../../lib/oop"),w=e("./mixed").FoldMode,_=e("./xml").FoldMode,p=e("./cstyle").FoldMode,g=l.FoldMode=function(r,a){w.call(this,new _(r,a),{"js-":new p,"css-":new p})};b.inherits(g,w)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,l,T){function b(s,h){return s.type.lastIndexOf(h+".xml")>-1}function w(s,h){for(var m=new p(s,h.row,h.column),y=m.getCurrentToken();y&&!b(y,"tag-name");)y=m.stepBackward();if(y)return y.value}function _(s,h){for(var m=new p(s,h.row,h.column),y=m.getCurrentToken();y&&!b(y,"attribute-name");)y=m.stepBackward();if(y)return y.value}var p=e("../token_iterator").TokenIterator,g=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],r=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=g.concat(r),o={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},i=Object.keys(o),n=function(){};(function(){this.getCompletions=function(s,h,m,y){var R=h.getTokenAt(m.row,m.column);if(!R)return[];if(b(R,"tag-name")||b(R,"tag-open")||b(R,"end-tag-open"))return this.getTagCompletions(s,h,m,y);if(b(R,"tag-whitespace")||b(R,"attribute-name"))return this.getAttributeCompletions(s,h,m,y);if(b(R,"attribute-value"))return this.getAttributeValueCompletions(s,h,m,y);var $=h.getLine(m.row).substr(0,m.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(s,h,m,y):[]},this.getTagCompletions=function(s,h,m,y){return i.map(function(R){return{value:R,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(s,h,m,y){var R=w(h,m);if(!R)return[];var $=a;return R in o&&($=$.concat(Object.keys(o[R]))),$.map(function(C){return{caption:C,snippet:C+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(s,h,m,y){var R=w(h,m),$=_(h,m);if(!R)return[];var C=[];return R in o&&$ in o[R]&&typeof o[R][$]=="object"&&(C=Object.keys(o[R][$])),C.map(function(v){return{caption:v,snippet:v,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(s,h,m,y){var R=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return R.map(function($){return{caption:$,snippet:$,meta:"html entity",score:1e6}})}}).call(n.prototype),l.HtmlCompletions=n}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,l,T){var b=e("../lib/oop"),w=e("../lib/lang"),_=e("./text").Mode,p=e("./javascript").Mode,g=e("./css").Mode,r=e("./html_highlight_rules").HtmlHighlightRules,a=e("./behaviour/xml").XmlBehaviour,o=e("./folding/html").FoldMode,i=e("./html_completions").HtmlCompletions,n=e("../worker/worker_client").WorkerClient,s=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],h=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],m=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=r,this.$behaviour=new a,this.$completer=new i,this.createModeDelegates({"js-":p,"css-":g}),this.foldingRules=new o(this.voidElements,w.arrayToMap(h))};b.inherits(m,_),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=w.arrayToMap(s),this.getNextLineIndent=function(y,R,$){return this.$getIndent(R)},this.checkOutdent=function(y,R,$){return!1},this.getCompletions=function(y,R,$,C){return this.$completer.getCompletions(y,R,$,C)},this.createWorker=function(y){if(this.constructor==m){var R=new n(["ace"],"ace/mode/html_worker","Worker");return R.attachToDocument(y.getDocument()),this.fragmentContext&&R.call("setOptions",[{context:this.fragmentContext}]),R.on("error",function($){y.setAnnotations($.data)}),R.on("terminate",function(){y.clearAnnotations()}),R}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(m.prototype),l.Mode=m}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,l,T){var b=e("../lib/oop"),w=e("./text_highlight_rules").TextHighlightRules,_=l.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",p=l.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",g=function(){var r=this.createKeywordMapper({keyword:_,"support.function.builtin":p,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",o="(?:\\.\\d+)",i="(?:\\d+)",n="(?:(?:"+i+"?"+o+")|(?:"+i+"\\.))",s="(?:(?:"+n+"|"+i+"))",h="(?:"+s+"|"+n+")",m="(?:&"+i+")",y="[a-zA-Z_][a-zA-Z0-9_]*",R="(?:"+y+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",C="(?:"+y+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(v,L,I){var F=v[2]=="-"?"indentedHeredoc":"heredoc",E=v.split(this.splitRegex);return I.push(F,E[4]),[{type:"constant",value:E[1]},{type:"text",value:E[2]},{type:"string",value:E[3]},{type:"support.class",value:E[4]},{type:"string",value:E[5]}]},rules:{heredoc:[{onMatch:function(v,L,I){return v===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(v,L,I){return v===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(v,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:v}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:$},{token:"variable",regex:R},{include:"variables"},{token:"support.function",regex:C},{token:"support.function",regex:m},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:a+"\\b"},{token:r,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};b.inherits(g,w),l.ShHighlightRules=g}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,l,T){var b=e("../lib/oop"),w=e("./text").Mode,_=e("./sh_highlight_rules").ShHighlightRules,p=e("../range").Range,g=e("./folding/cstyle").FoldMode,r=function(){this.HighlightRules=_,this.foldingRules=new g,this.$behaviour=this.$defaultBehaviour};b.inherits(r,w),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(o,i,n){var s=this.$getIndent(i),h=this.getTokenizer().getLineTokens(i,o),m=h.tokens;if(m.length&&m[m.length-1].type=="comment")return s;if(o=="start"){var y=i.match(/^.*[\{\(\[:]\s*$/);y&&(s+=n)}return s};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(o,i,n){if(n!==`\r
987
- `&&n!=="\r"&&n!==`
988
- `)return!1;var s=this.getTokenizer().getLineTokens(i.trim(),o).tokens;if(!s)return!1;do var h=s.pop();while(h&&(h.type=="comment"||h.type=="text"&&h.value.match(/^\s+$/)));return h?h.type=="keyword"&&a[h.value]:!1},this.autoOutdent=function(o,i,n){n+=1;var s=this.$getIndent(i.getLine(n)),h=i.getTabString();s.slice(-h.length)==h&&i.remove(new p(n,s.length-h.length,n,s.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(r.prototype),l.Mode=r}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,l,T){var b=e("../lib/oop"),w=e("../lib/lang"),_=e("./text").Mode,p=e("./xml_highlight_rules").XmlHighlightRules,g=e("./behaviour/xml").XmlBehaviour,r=e("./folding/xml").FoldMode,a=e("../worker/worker_client").WorkerClient,o=function(){this.HighlightRules=p,this.$behaviour=new g,this.foldingRules=new r};b.inherits(o,_),(function(){this.voidElements=w.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(i){var n=new a(["ace"],"ace/mode/xml_worker","Worker");return n.attachToDocument(i.getDocument()),n.on("error",function(s){i.setAnnotations(s.data)}),n.on("terminate",function(){i.clearAnnotations()}),n},this.$id="ace/mode/xml"}).call(o.prototype),l.Mode=o}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,l,T){var b=e("../lib/oop"),w=e("./behaviour/cstyle").CstyleBehaviour,_=e("./text").Mode,p=e("./markdown_highlight_rules").MarkdownHighlightRules,g=e("./folding/markdown").FoldMode,r=function(){this.HighlightRules=p,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new g,this.$behaviour=new w({braces:!0})};b.inherits(r,_),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,o,i){if(a=="listblock"){var n=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(o);if(!n)return"";var s=n[2];return s||(s=parseInt(n[3],10)+1+"."),n[1]+s+n[4]}return this.$getIndent(o)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(r.prototype),l.Mode=r}),function(){ace.require(["ace/mode/markdown"],function(e){c&&(c.exports=e)})}()}(fc)),fc.exports}_x();var pc={exports:{}},Gd;function Sx(){return Gd||(Gd=1,function(c,u){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,l,T){T.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(e,l,T){l.isDark=!0,l.cssClass="ace-twilight",l.cssText=e("./twilight-css");var b=e("../lib/dom");b.importCssString(l.cssText,l.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(e){c&&(c.exports=e)})}()}(pc)),pc.exports}Sx();var gc={exports:{}},qd;function Cx(){return qd||(qd=1,function(c,u){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,l,T){function b(v){var L=new Date().toLocaleString("en-us",v);return L.length==1?"0"+L:L}var w=e("./lib/dom"),_=e("./lib/oop"),p=e("./lib/event_emitter").EventEmitter,g=e("./lib/lang"),r=e("./range").Range,a=e("./range_list").RangeList,o=e("./keyboard/hash_handler").HashHandler,i=e("./tokenizer").Tokenizer,n=e("./clipboard"),s={CURRENT_WORD:function(v){return v.session.getTextRange(v.session.getWordRange())},SELECTION:function(v,L,I){var F=v.session.getTextRange();return I?F.replace(/\n\r?([ \t]*\S)/g,`
1119
- `+I+"$1"):F},CURRENT_LINE:function(v){return v.session.getLine(v.getCursorPosition().row)},PREV_LINE:function(v){return v.session.getLine(v.getCursorPosition().row-1)},LINE_INDEX:function(v){return v.getCursorPosition().row},LINE_NUMBER:function(v){return v.getCursorPosition().row+1},SOFT_TABS:function(v){return v.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(v){return v.session.getTabSize()},CLIPBOARD:function(v){return n.getText&&n.getText()},FILENAME:function(v){return/[^/\\]*$/.exec(this.FILEPATH(v))[0]},FILENAME_BASE:function(v){return/[^/\\]*$/.exec(this.FILEPATH(v))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(v){return this.FILEPATH(v).replace(/[^/\\]*$/,"")},FILEPATH:function(v){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(v){var L=v.session.$mode||{};return L.blockComment&&L.blockComment.start||""},BLOCK_COMMENT_END:function(v){var L=v.session.$mode||{};return L.blockComment&&L.blockComment.end||""},LINE_COMMENT:function(v){var L=v.session.$mode||{};return L.lineCommentStart||""},CURRENT_YEAR:b.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:b.bind(null,{year:"2-digit"}),CURRENT_MONTH:b.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:b.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:b.bind(null,{month:"short"}),CURRENT_DATE:b.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:b.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:b.bind(null,{weekday:"short"}),CURRENT_HOUR:b.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:b.bind(null,{minute:"2-digit"}),CURRENT_SECOND:b.bind(null,{second:"2-digit"})};s.SELECTED_TEXT=s.SELECTION;var h=function(){function v(){this.snippetMap={},this.snippetNameMap={},this.variables=s}return v.prototype.getTokenizer=function(){return v.$tokenizer||this.createTokenizer()},v.prototype.createTokenizer=function(){function L(E){return E=E.substr(1),/^\d+$/.test(E)?[{tabstopId:parseInt(E,10)}]:[{text:E}]}function I(E){return"(?:[^\\\\"+E+"]|\\\\.)"}var F={regex:"/("+I("/")+"+)/",onMatch:function(E,U,P){var O=P[0];return O.fmtString=!0,O.guard=E.slice(1,-1),O.flag="",""},next:"formatString"};return v.$tokenizer=new i({start:[{regex:/\\./,onMatch:function(E,U,P){var O=E[1];return(O=="}"&&P.length||"`$\\".indexOf(O)!=-1)&&(E=O),[E]}},{regex:/}/,onMatch:function(E,U,P){return[P.length?P.shift():E]}},{regex:/\$(?:\d+|\w+)/,onMatch:L},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(E,U,P){var O=L(E.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+I("\\|")+"*\\|",onMatch:function(E,U,P){var O=E.slice(1,-1).replace(/\\[,|\\]|,/g,function(S){return S.length==2?S[1]:"\0"}).split("\0").map(function(S){return{value:S}});return P[0].choices=O,[O[0]]},next:"start"},F,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(E,U,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(E,U,P){var O=E[1];return O=="}"&&P.length||"`$\\".indexOf(O)!=-1?E=O:O=="n"?E=`
1120
- `:O=="t"?E=" ":"ulULE".indexOf(O)!=-1&&(E={changeCase:O,local:O>"a"}),[E]}},{regex:"/\\w*}",onMatch:function(E,U,P){var O=P.shift();return O&&(O.flag=E.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||E]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(E,U,P){return[{text:E.slice(1)}]}},{regex:/\${\w+/,onMatch:function(E,U,P){var O={text:E.slice(2)};return P.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(E,U,P){var O=P.shift();return this.next=O&&O.tabstopId?"start":"",[O||E]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(E,U,P){var O=P[0];return O.formatFunction=E.slice(2,-1),[P.shift()]},next:"formatString"},F,{regex:/:[\?\-+]?/,onMatch:function(E,U,P){E[1]=="+"&&(P[0].ifEnd=P[0]),E[1]=="?"&&(P[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),v.$tokenizer},v.prototype.tokenizeTmSnippet=function(L,I){return this.getTokenizer().getLineTokens(L,I).tokens.map(function(F){return F.value||F})},v.prototype.getVariableValue=function(L,I,F){if(/^\d+$/.test(I))return(this.variables.__||{})[I]||"";if(/^[A-Z]\d+$/.test(I))return(this.variables[I[0]+"__"]||{})[I.substr(1)]||"";if(I=I.replace(/^TM_/,""),!this.variables.hasOwnProperty(I))return"";var E=this.variables[I];return typeof E=="function"&&(E=this.variables[I](L,I,F)),E??""},v.prototype.tmStrFormat=function(L,I,F){if(!I.fmt)return L;var E=I.flag||"",U=I.guard;U=new RegExp(U,E.replace(/[^gim]/g,""));var P=typeof I.fmt=="string"?this.tokenizeTmSnippet(I.fmt,"formatString"):I.fmt,O=this,S=L.replace(U,function(){var k=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(P,F),W="E",V=0;V<N.length;V++){var G=N[V];if(typeof G=="object")if(N[V]="",G.changeCase&&G.local){var Q=N[V+1];Q&&typeof Q=="string"&&(G.changeCase=="u"?N[V]=Q[0].toUpperCase():N[V]=Q[0].toLowerCase(),N[V+1]=Q.substr(1))}else G.changeCase&&(W=G.changeCase);else W=="U"?N[V]=G.toUpperCase():W=="L"&&(N[V]=G.toLowerCase())}return O.variables.__=k,N.join("")});return S},v.prototype.tmFormatFunction=function(L,I,F){return I.formatFunction=="upcase"?L.toUpperCase():I.formatFunction=="downcase"?L.toLowerCase():L},v.prototype.resolveVariables=function(L,I){function F(W){var V=L.indexOf(W,O+1);V!=-1&&(O=V)}for(var E=[],U="",P=!0,O=0;O<L.length;O++){var S=L[O];if(typeof S=="string"){E.push(S),S==`
1121
- `?(P=!0,U=""):P&&(U=/^\t*/.exec(S)[0],P=/\S/.test(S));continue}if(S){if(P=!1,S.fmtString){var k=L.indexOf(S,O+1);k==-1&&(k=L.length),S.fmt=L.slice(O+1,k),O=k}if(S.text){var N=this.getVariableValue(I,S.text,U)+"";S.fmtString&&(N=this.tmStrFormat(N,S,I)),S.formatFunction&&(N=this.tmFormatFunction(N,S,I)),N&&!S.ifEnd?(E.push(N),F(S)):!N&&S.ifEnd&&F(S.ifEnd)}else S.elseEnd?F(S.elseEnd):(S.tabstopId!=null||S.changeCase!=null)&&E.push(S)}}return E},v.prototype.getDisplayTextForSnippet=function(L,I){var F=m.call(this,L,I);return F.text},v.prototype.insertSnippetForSelection=function(L,I,F){F===void 0&&(F={});var E=m.call(this,L,I,F),U=L.getSelectionRange(),P=L.session.replace(U,E.text),O=new y(L),S=L.inVirtualSelectionMode&&L.selection.index;O.addTabstops(E.tabstops,U.start,P,S)},v.prototype.insertSnippet=function(L,I,F){F===void 0&&(F={});var E=this;if(L.inVirtualSelectionMode)return E.insertSnippetForSelection(L,I,F);L.forEachSelection(function(){E.insertSnippetForSelection(L,I,F)},null,{keepOrder:!0}),L.tabstopManager&&L.tabstopManager.tabNext()},v.prototype.$getScope=function(L){var I=L.session.$mode.$id||"";if(I=I.split("/").pop(),I==="html"||I==="php"){I==="php"&&!L.session.$mode.inlinePhp&&(I="html");var F=L.getCursorPosition(),E=L.session.getState(F.row);typeof E=="object"&&(E=E[0]),E.substring&&(E.substring(0,3)=="js-"?I="javascript":E.substring(0,4)=="css-"?I="css":E.substring(0,4)=="php-"&&(I="php"))}return I},v.prototype.getActiveScopes=function(L){var I=this.$getScope(L),F=[I],E=this.snippetMap;return E[I]&&E[I].includeScopes&&F.push.apply(F,E[I].includeScopes),F.push("_"),F},v.prototype.expandWithTab=function(L,I){var F=this,E=L.forEachSelection(function(){return F.expandSnippetForSelection(L,I)},null,{keepOrder:!0});return E&&L.tabstopManager&&L.tabstopManager.tabNext(),E},v.prototype.expandSnippetForSelection=function(L,I){var F=L.getCursorPosition(),E=L.session.getLine(F.row),U=E.substring(0,F.column),P=E.substr(F.column),O=this.snippetMap,S;return this.getActiveScopes(L).some(function(k){var N=O[k];return N&&(S=this.findMatchingSnippet(N,U,P)),!!S},this),S?(I&&I.dryRun||(L.session.doc.removeInLine(F.row,F.column-S.replaceBefore.length,F.column+S.replaceAfter.length),this.variables.M__=S.matchBefore,this.variables.T__=S.matchAfter,this.insertSnippetForSelection(L,S.content),this.variables.M__=this.variables.T__=null),!0):!1},v.prototype.findMatchingSnippet=function(L,I,F){for(var E=L.length;E--;){var U=L[E];if(!(U.startRe&&!U.startRe.test(I))&&!(U.endRe&&!U.endRe.test(F))&&!(!U.startRe&&!U.endRe))return U.matchBefore=U.startRe?U.startRe.exec(I):[""],U.matchAfter=U.endRe?U.endRe.exec(F):[""],U.replaceBefore=U.triggerRe?U.triggerRe.exec(I)[0]:"",U.replaceAfter=U.endTriggerRe?U.endTriggerRe.exec(F)[0]:"",U}},v.prototype.register=function(L,I){function F(k){return k&&!/^\^?\(.*\)\$?$|^\\b$/.test(k)&&(k="(?:"+k+")"),k||""}function E(k,N,W){return k=F(k),N=F(N),k=N+k,k&&k[k.length-1]!="$"&&(k+="$"),new RegExp(k)}function U(k){k.scope||(k.scope=I||"_"),I=k.scope,P[I]||(P[I]=[],O[I]={});var N=O[I];if(k.name){var W=N[k.name];W&&S.unregister(W),N[k.name]=k}P[I].push(k),k.prefix&&(k.tabTrigger=k.prefix),!k.content&&k.body&&(k.content=Array.isArray(k.body)?k.body.join(`
1122
- `):k.body),k.tabTrigger&&!k.trigger&&(!k.guard&&/^\w/.test(k.tabTrigger)&&(k.guard="\\b"),k.trigger=g.escapeRegExp(k.tabTrigger)),!(!k.trigger&&!k.guard&&!k.endTrigger&&!k.endGuard)&&(k.startRe=E(k.trigger,k.guard),k.triggerRe=new RegExp(k.trigger),k.endRe=E(k.endTrigger,k.endGuard),k.endTriggerRe=new RegExp(k.endTrigger))}var P=this.snippetMap,O=this.snippetNameMap,S=this;L||(L=[]),Array.isArray(L)?L.forEach(U):Object.keys(L).forEach(function(k){U(L[k])}),this._signal("registerSnippets",{scope:I})},v.prototype.unregister=function(L,I){function F(P){var O=U[P.scope||I];if(O&&O[P.name]){delete O[P.name];var S=E[P.scope||I],k=S&&S.indexOf(P);k>=0&&S.splice(k,1)}}var E=this.snippetMap,U=this.snippetNameMap;L.content?F(L):Array.isArray(L)&&L.forEach(F)},v.prototype.parseSnippetFile=function(L){L=L.replace(/\r/g,"");for(var I=[],F={},E=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,U;U=E.exec(L);){if(U[1])try{F=JSON.parse(U[1]),I.push(F)}catch{}if(U[4])F.content=U[4].replace(/^\t/gm,""),I.push(F),F={};else{var P=U[2],O=U[3];if(P=="regex"){var S=/\/((?:[^\/\\]|\\.)*)|$/g;F.guard=S.exec(O)[1],F.trigger=S.exec(O)[1],F.endTrigger=S.exec(O)[1],F.endGuard=S.exec(O)[1]}else P=="snippet"?(F.tabTrigger=O.match(/^\S*/)[0],F.name||(F.name=O)):P&&(F[P]=O)}}return I},v.prototype.getSnippetByName=function(L,I){var F=this.snippetNameMap,E;return this.getActiveScopes(I).some(function(U){var P=F[U];return P&&(E=P[L]),!!E},this),E},v}();_.implement(h.prototype,p);var m=function(v,L,I){function F(ce){for(var ve=[],Ce=0;Ce<ce.length;Ce++){var $e=ce[Ce];if(typeof $e=="object"){if(N[$e.tabstopId])continue;var Te=ce.lastIndexOf($e,Ce-1);$e=ve[Te]||{tabstopId:$e.tabstopId}}ve[Ce]=$e}return ve}I===void 0&&(I={});var E=v.getCursorPosition(),U=v.session.getLine(E.row),P=v.session.getTabString(),O=U.match(/^\s*/)[0];E.column<O.length&&(O=O.slice(0,E.column)),L=L.replace(/\r/g,"");var S=this.tokenizeTmSnippet(L);S=this.resolveVariables(S,v),S=S.map(function(ce){return ce==`
1123
- `&&!I.excludeExtraIndent?ce+O:typeof ce=="string"?ce.replace(/\t/g,P):ce});var k=[];S.forEach(function(ce,ve){if(typeof ce=="object"){var Ce=ce.tabstopId,$e=k[Ce];if($e||($e=k[Ce]=[],$e.index=Ce,$e.value="",$e.parents={}),$e.indexOf(ce)===-1){ce.choices&&!$e.choices&&($e.choices=ce.choices),$e.push(ce);var Te=S.indexOf(ce,ve+1);if(Te!==-1){var qe=S.slice(ve+1,Te),Ke=qe.some(function(at){return typeof at=="object"});Ke&&!$e.value?$e.value=qe:qe.length&&(!$e.value||typeof $e.value!="string")&&($e.value=qe.join(""))}}}}),k.forEach(function(ce){ce.length=0});for(var N={},W=0;W<S.length;W++){var V=S[W];if(typeof V=="object"){var G=V.tabstopId,Q=k[G],te=S.indexOf(V,W+1);if(N[G]){N[G]===V&&(delete N[G],Object.keys(N).forEach(function(ce){Q.parents[ce]=!0}));continue}N[G]=V;var he=Q.value;typeof he!="string"?he=F(he):V.fmt&&(he=this.tmStrFormat(he,V,v)),S.splice.apply(S,[W+1,Math.max(0,te-W)].concat(he,V)),Q.indexOf(V)===-1&&Q.push(V)}}var ne=0,ue=0,le="";return S.forEach(function(ce){if(typeof ce=="string"){var ve=ce.split(`
1124
- `);ve.length>1?(ue=ve[ve.length-1].length,ne+=ve.length-1):ue+=ce.length,le+=ce}else ce&&(ce.start?ce.end={row:ne,column:ue}:ce.start={row:ne,column:ue})}),{text:le,tabstops:k,tokens:S}},y=function(){function v(L){if(this.index=0,this.ranges=[],this.tabstops=[],L.tabstopManager)return L.tabstopManager;L.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=g.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(L)}return v.prototype.attach=function(L){this.$openTabstops=null,this.selectedTabstop=null,this.editor=L,this.session=L.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},v.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},v.prototype.onChange=function(L){for(var I=L.action[0]=="r",F=this.selectedTabstop||{},E=F.parents||{},U=this.tabstops.slice(),P=0;P<U.length;P++){var O=U[P],S=O==F||E[O.index];if(O.rangeList.$bias=S?0:1,L.action=="remove"&&O!==F){var k=O.parents&&O.parents[F.index],N=O.rangeList.pointIndex(L.start,k);N=N<0?-N-1:N+1;var W=O.rangeList.pointIndex(L.end,k);W=W<0?-W-1:W-1;for(var V=O.rangeList.ranges.slice(N,W),G=0;G<V.length;G++)this.removeRange(V[G])}O.rangeList.$onChange(L)}var Q=this.session;!this.$inChange&&I&&Q.getLength()==1&&!Q.getValue()&&this.detach()},v.prototype.updateLinkedFields=function(){var L=this.selectedTabstop;if(!(!L||!L.hasLinkedRanges||!L.firstNonLinked)){this.$inChange=!0;for(var I=this.session,F=I.getTextRange(L.firstNonLinked),E=0;E<L.length;E++){var U=L[E];if(U.linked){var P=U.original,O=l.snippetManager.tmStrFormat(F,P,this.editor);I.replace(U,O)}}this.$inChange=!1}},v.prototype.onAfterExec=function(L){L.command&&!L.command.readOnly&&this.updateLinkedFields()},v.prototype.onChangeSelection=function(){if(this.editor){for(var L=this.editor.selection.lead,I=this.editor.selection.anchor,F=this.editor.selection.isEmpty(),E=0;E<this.ranges.length;E++)if(!this.ranges[E].linked){var U=this.ranges[E].contains(L.row,L.column),P=F||this.ranges[E].contains(I.row,I.column);if(U&&P)return}this.detach()}},v.prototype.onChangeSession=function(){this.detach()},v.prototype.tabNext=function(L){var I=this.tabstops.length,F=this.index+(L||1);F=Math.min(Math.max(F,1),I),F==I&&(F=0),this.selectTabstop(F),this.updateTabstopMarkers(),F===0&&this.detach()},v.prototype.selectTabstop=function(L){this.$openTabstops=null;var I=this.tabstops[this.index];if(I&&this.addTabstopMarkers(I),this.index=L,I=this.tabstops[this.index],!(!I||!I.length)){this.selectedTabstop=I;var F=I.firstNonLinked||I;if(I.choices&&(F.cursor=F.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(F);else{var E=this.editor.multiSelect;E.toSingleRange(F);for(var U=0;U<I.length;U++)I.hasLinkedRanges&&I[U].linked||E.addRange(I[U].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},v.prototype.addTabstops=function(L,I,F){var E=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!L[0]){var U=r.fromPoints(F,F);$(U.start,I),$(U.end,I),L[0]=[U],L[0].index=0}var P=this.index,O=[P+1,0],S=this.ranges,k=this.snippetId=(this.snippetId||0)+1;L.forEach(function(N,W){var V=this.$openTabstops[W]||N;V.snippetId=k;for(var G=0;G<N.length;G++){var Q=N[G],te=r.fromPoints(Q.start,Q.end||Q.start);R(te.start,I),R(te.end,I),te.original=Q,te.tabstop=V,S.push(te),V!=N?V.unshift(te):V[G]=te,Q.fmtString||V.firstNonLinked&&E?(te.linked=!0,V.hasLinkedRanges=!0):V.firstNonLinked||(V.firstNonLinked=te)}V.firstNonLinked||(V.hasLinkedRanges=!1),V===N&&(O.push(V),this.$openTabstops[W]=V),this.addTabstopMarkers(V),V.rangeList=V.rangeList||new a,V.rangeList.$bias=0,V.rangeList.addList(V)},this),O.length>2&&(this.tabstops.length&&O.push(O.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,O))},v.prototype.addTabstopMarkers=function(L){var I=this.session;L.forEach(function(F){F.markerId||(F.markerId=I.addMarker(F,"ace_snippet-marker","text"))})},v.prototype.removeTabstopMarkers=function(L){var I=this.session;L.forEach(function(F){I.removeMarker(F.markerId),F.markerId=null})},v.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var L=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&L--,this.tabstops.forEach(function(I){I.snippetId===L?this.addTabstopMarkers(I):this.removeTabstopMarkers(I)},this)}},v.prototype.removeRange=function(L){var I=L.tabstop.indexOf(L);I!=-1&&L.tabstop.splice(I,1),I=this.ranges.indexOf(L),I!=-1&&this.ranges.splice(I,1),I=L.tabstop.rangeList.ranges.indexOf(L),I!=-1&&L.tabstop.splice(I,1),this.session.removeMarker(L.markerId),L.tabstop.length||(I=this.tabstops.indexOf(L.tabstop),I!=-1&&this.tabstops.splice(I,1),this.tabstops.length||this.detach())},v}();y.prototype.keyboardHandler=new o,y.prototype.keyboardHandler.bindKeys({Tab:function(v){l.snippetManager&&l.snippetManager.expandWithTab(v)||(v.tabstopManager.tabNext(1),v.renderer.scrollCursorIntoView())},"Shift-Tab":function(v){v.tabstopManager.tabNext(-1),v.renderer.scrollCursorIntoView()},Esc:function(v){v.tabstopManager.detach()}});var R=function(v,L){v.row==0&&(v.column+=L.column),v.row+=L.row},$=function(v,L){v.row==L.row&&(v.column-=L.column),v.row-=L.row};w.importCssString(`
1125
- .ace_snippet-marker {
1126
- -moz-box-sizing: border-box;
1127
- box-sizing: border-box;
1128
- background: rgba(194, 193, 208, 0.09);
1129
- border: 1px dotted rgba(211, 208, 235, 0.62);
1130
- position: absolute;
1131
- }`,"snippets.css",!1),l.snippetManager=new h;var C=e("./editor").Editor;(function(){this.insertSnippet=function(v,L){return l.snippetManager.insertSnippet(this,v,L)},this.expandSnippet=function(v){return l.snippetManager.expandWithTab(this,v)}}).call(C.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,l,T){var b=e("../virtual_renderer").VirtualRenderer,w=e("../editor").Editor,_=e("../range").Range,p=e("../lib/event"),g=e("../lib/lang"),r=e("../lib/dom"),a=e("../config").nls,o=e("./../lib/useragent"),i=function(R){return"suggest-aria-id:".concat(R)},n=o.isSafari?"menu":"listbox",s=o.isSafari?"menuitem":"option",h=o.isSafari?"aria-current":"aria-selected",m=function(R){var $=new b(R);$.$maxLines=4;var C=new w($);return C.setHighlightActiveLine(!1),C.setShowPrintMargin(!1),C.renderer.setShowGutter(!1),C.renderer.setHighlightGutterLine(!1),C.$mouseHandler.$focusTimeout=0,C.$highlightTagPending=!0,C},y=function(){function R($){var C=r.createElement("div"),v=m(C);$&&$.appendChild(C),C.style.display="none",v.renderer.content.style.cursor="default",v.renderer.setStyle("ace_autocomplete"),v.renderer.$textLayer.element.setAttribute("role",n),v.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),v.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),v.renderer.textarea.setAttribute("aria-hidden","true"),v.setOption("displayIndentGuides",!1),v.setOption("dragDelay",150);var L=function(){};v.focus=L,v.$isFocused=!0,v.renderer.$cursorLayer.restartTimer=L,v.renderer.$cursorLayer.element.style.opacity="0",v.renderer.$maxLines=8,v.renderer.$keepTextAreaAtCursor=!1,v.setHighlightActiveLine(!1),v.session.highlight(""),v.session.$searchHighlight.clazz="ace_highlight-marker",v.on("mousedown",function(S){var k=S.getDocumentPosition();v.selection.moveToPosition(k),E.start.row=E.end.row=k.row,S.stop()});var I,F=new _(-1,0,-1,1/0),E=new _(-1,0,-1,1/0);E.id=v.session.addMarker(E,"ace_active-line","fullLine"),v.setSelectOnHover=function(S){S?F.id&&(v.session.removeMarker(F.id),F.id=null):F.id=v.session.addMarker(F,"ace_line-hover","fullLine")},v.setSelectOnHover(!1),v.on("mousemove",function(S){if(!I){I=S;return}if(!(I.x==S.x&&I.y==S.y)){I=S,I.scrollTop=v.renderer.scrollTop,v.isMouseOver=!0;var k=I.getDocumentPosition().row;F.start.row!=k&&(F.id||v.setRow(k),P(k))}}),v.renderer.on("beforeRender",function(){if(I&&F.start.row!=-1){I.$pos=null;var S=I.getDocumentPosition().row;F.id||v.setRow(S),P(S,!0)}}),v.renderer.on("afterRender",function(){for(var S=v.renderer.$textLayer,k=S.config.firstRow,N=S.config.lastRow;k<=N;k++){var W=S.element.childNodes[k-S.config.firstRow];W.setAttribute("role",s),W.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),W.setAttribute("aria-setsize",v.data.length),W.setAttribute("aria-describedby","doc-tooltip"),W.setAttribute("aria-posinset",k+1);var V=v.getData(k);if(V){var G="".concat(V.caption||V.value).concat(V.meta?", ".concat(V.meta):"");W.setAttribute("aria-label",G)}var Q=W.querySelectorAll(".ace_completion-highlight");Q.forEach(function(te){te.setAttribute("role","mark")})}}),v.renderer.on("afterRender",function(){var S=v.getRow(),k=v.renderer.$textLayer,N=k.element.childNodes[S-k.config.firstRow],W=document.activeElement;if(N!==v.selectedNode&&v.selectedNode&&(r.removeCssClass(v.selectedNode,"ace_selected"),v.selectedNode.removeAttribute(h),v.selectedNode.removeAttribute("id")),W.removeAttribute("aria-activedescendant"),v.selectedNode=N,N){var V=i(S);r.addCssClass(N,"ace_selected"),N.id=V,k.element.setAttribute("aria-activedescendant",V),W.setAttribute("aria-activedescendant",V),N.setAttribute(h,"true")}});var U=function(){P(-1)},P=function(S,k){S!==F.start.row&&(F.start.row=F.end.row=S,k||v.session._emit("changeBackMarker"),v._emit("changeHoverMarker"))};v.getHoveredRow=function(){return F.start.row},p.addListener(v.container,"mouseout",function(){v.isMouseOver=!1,U()}),v.on("hide",U),v.on("changeSelection",U),v.session.doc.getLength=function(){return v.data.length},v.session.doc.getLine=function(S){var k=v.data[S];return typeof k=="string"?k:k&&k.value||""};var O=v.session.bgTokenizer;return O.$tokenizeRow=function(S){function k(ce,ve){ce&&W.push({type:(N.className||"")+(ve||""),value:ce})}var N=v.data[S],W=[];if(!N)return W;typeof N=="string"&&(N={value:N});for(var V=N.caption||N.value||N.name,G=V.toLowerCase(),Q=(v.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Q.length;ne++)if(ne!=he&&(N.matchMask&1<<ne||ne==Q.length)){var ue=Q.slice(he,ne);he=ne;var le=G.indexOf(ue,te);if(le==-1)continue;k(V.slice(te,le),""),te=le+ue.length,k(V.slice(le,te),"completion-highlight")}return k(V.slice(te,V.length),""),W.push({type:"completion-spacer",value:" "}),N.meta&&W.push({type:"completion-meta",value:N.meta}),N.message&&W.push({type:"completion-message",value:N.message}),W},O.$updateOnChange=L,O.start=L,v.session.$computeWidth=function(){return this.screenWidth=0},v.isOpen=!1,v.isTopdown=!1,v.autoSelect=!0,v.filterText="",v.isMouseOver=!1,v.data=[],v.setData=function(S,k){v.filterText=k||"",v.setValue(g.stringRepeat(`
1132
- `,S.length),-1),v.data=S||[],v.setRow(0)},v.getData=function(S){return v.data[S]},v.getRow=function(){return E.start.row},v.setRow=function(S){S=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,S)),E.start.row!=S&&(v.selection.clearSelection(),E.start.row=E.end.row=S||0,v.session._emit("changeBackMarker"),v.moveCursorTo(S||0,0),v.isOpen&&v._signal("select"))},v.on("changeSelection",function(){v.isOpen&&v.setRow(v.selection.lead.row),v.renderer.scrollCursorIntoView()}),v.hide=function(){this.container.style.display="none",v.anchorPos=null,v.anchor=null,v.isOpen&&(v.isOpen=!1,this._signal("hide"))},v.tryShow=function(S,k,N,W){if(!W&&v.isOpen&&v.anchorPos&&v.anchor&&v.anchorPos.top===S.top&&v.anchorPos.left===S.left&&v.anchor===N)return!0;var V=this.container,G=this.renderer.scrollBar.width||10,Q=window.innerHeight-G,te=window.innerWidth-G,he=this.renderer,ne=he.$maxLines*k*1.4,ue={top:0,bottom:0},le=Q-S.top-3*this.$borderSize-k,ce=S.top-3*this.$borderSize;N||(ce<=le||le>=ne?N="bottom":N="top"),N==="top"?(ue.bottom=S.top-this.$borderSize,ue.top=ue.bottom-ne):N==="bottom"&&(ue.top=S.top+k+this.$borderSize,ue.bottom=ue.top+ne);var ve=ue.top>=0&&ue.bottom<=Q;if(!W&&!ve)return!1;ve?he.$maxPixelHeight=null:N==="top"?he.$maxPixelHeight=ce:he.$maxPixelHeight=le,N==="top"?(V.style.top="",V.style.bottom=Q+G-ue.bottom+"px",v.isTopdown=!1):(V.style.top=ue.top+"px",V.style.bottom="",v.isTopdown=!0),V.style.display="";var Ce=S.left;return Ce+V.offsetWidth>te&&(Ce=te-V.offsetWidth),V.style.left=Ce+"px",V.style.right="",v.isOpen||(v.isOpen=!0,this._signal("show"),I=null),v.anchorPos=S,v.anchor=N,!0},v.show=function(S,k,N){this.tryShow(S,k,N?"bottom":void 0,!0)},v.goTo=function(S){var k=this.getRow(),N=this.session.getLength()-1;switch(S){case"up":k=k<=0?N:k-1;break;case"down":k=k>=N?-1:k+1;break;case"start":k=0;break;case"end":k=N}this.setRow(k)},v.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},v.$imageSize=0,v.$borderSize=1,v}return R}();r.importCssString(`
1133
- .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1134
- background-color: #CAD6FA;
1135
- z-index: 1;
1136
- }
1137
- .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1138
- background-color: #3a674e;
1139
- }
1140
- .ace_editor.ace_autocomplete .ace_line-hover {
1141
- border: 1px solid #abbffe;
1142
- margin-top: -1px;
1143
- background: rgba(233,233,253,0.4);
1144
- position: absolute;
1145
- z-index: 2;
1146
- }
1147
- .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1148
- border: 1px solid rgba(109, 150, 13, 0.8);
1149
- background: rgba(58, 103, 78, 0.62);
1150
- }
1151
- .ace_completion-meta {
1152
- opacity: 0.5;
1153
- margin-left: 0.9em;
1154
- }
1155
- .ace_completion-message {
1156
- margin-left: 0.9em;
1157
- color: blue;
1158
- }
1159
- .ace_editor.ace_autocomplete .ace_completion-highlight{
1160
- color: #2d69c7;
1161
- }
1162
- .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1163
- color: #93ca12;
1164
- }
1165
- .ace_editor.ace_autocomplete {
1166
- width: 300px;
1167
- z-index: 200000;
1168
- border: 1px lightgray solid;
1169
- position: fixed;
1170
- box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1171
- line-height: 1.4;
1172
- background: #fefefe;
1173
- color: #111;
1174
- }
1175
- .ace_dark.ace_editor.ace_autocomplete {
1176
- border: 1px #484747 solid;
1177
- box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1178
- line-height: 1.4;
1179
- background: #25282c;
1180
- color: #c1c1c1;
1181
- }
1182
- .ace_autocomplete .ace_text-layer {
1183
- width: calc(100% - 8px);
1184
- }
1185
- .ace_autocomplete .ace_line {
1186
- display: flex;
1187
- align-items: center;
1188
- }
1189
- .ace_autocomplete .ace_line > * {
1190
- min-width: 0;
1191
- flex: 0 0 auto;
1192
- }
1193
- .ace_autocomplete .ace_line .ace_ {
1194
- flex: 0 1 auto;
1195
- overflow: hidden;
1196
- text-overflow: ellipsis;
1197
- }
1198
- .ace_autocomplete .ace_completion-spacer {
1199
- flex: 1;
1200
- }
1201
- .ace_autocomplete.ace_loading:after {
1202
- content: "";
1203
- position: absolute;
1204
- top: 0px;
1205
- height: 2px;
1206
- width: 8%;
1207
- background: blue;
1208
- z-index: 100;
1209
- animation: ace_progress 3s infinite linear;
1210
- animation-delay: 300ms;
1211
- transform: translateX(-100%) scaleX(1);
1212
- }
1213
- @keyframes ace_progress {
1214
- 0% { transform: translateX(-100%) scaleX(1) }
1215
- 50% { transform: translateX(625%) scaleX(2) }
1216
- 100% { transform: translateX(1500%) scaleX(3) }
1217
- }
1218
- @media (prefers-reduced-motion) {
1219
- .ace_autocomplete.ace_loading:after {
1220
- transform: translateX(625%) scaleX(2);
1221
- animation: none;
1222
- }
1223
- }
1224
- `,"autocompletion.css",!1),l.AcePopup=y,l.$singleLineEditor=m,l.getAriaId=i}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,l,T){var b=function(){function w(_){this.editor=_,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return w.prototype.setScreenReaderContent=function(_){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var g=this.popup.getRow(),r=this.popup.renderer.$textLayer,a=r.element.childNodes[g-r.config.firstRow];if(a){for(var o="doc-tooltip ",i=0;i<this._lines.length;i++)o+="ace-inline-screenreader-line-".concat(i," ");a.setAttribute("aria-describedby",o)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=_.split(/\r\n|\r|\n/);var p=this.createCodeBlock();this.screenReaderDiv.appendChild(p)},w.prototype.destroy=function(){this.screenReaderDiv.remove()},w.prototype.createCodeBlock=function(){var _=document.createElement("pre");_.setAttribute("id","ace-inline-screenreader");for(var p=0;p<this._lines.length;p++){var g=document.createElement("code");g.setAttribute("id","ace-inline-screenreader-line-".concat(p));var r=document.createTextNode(this._lines[p]);g.appendChild(r),_.appendChild(g)}return _},w}();l.AceInlineScreenReader=b}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,l,T){var b=e("../snippets").snippetManager,w=e("./inline_screenreader").AceInlineScreenReader,_=function(){function p(){this.editor=null}return p.prototype.show=function(g,r,a){if(a=a||"",g&&this.editor&&this.editor!==g&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!g||!r)return!1;this.inlineScreenReader||(this.inlineScreenReader=new w(g));var o=r.snippet?b.getDisplayTextForSnippet(g,r.snippet):r.value;return r.hideInlinePreview||!o||!o.startsWith(a)?!1:(this.editor=g,this.inlineScreenReader.setScreenReaderContent(o),o=o.slice(a.length),o===""?g.removeGhostText():g.setGhostText(o),!0)},p.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},p.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},p.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},p}();l.AceInline=_}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,l,T){l.parForEach=function(w,_,p){var g=0,r=w.length;r===0&&p();for(var a=0;a<r;a++)_(w[a],function(o,i){g++,g===r&&p(o,i)})};var b=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;l.retrievePrecedingIdentifier=function(w,_,p){p=p||b;for(var g=[],r=_-1;r>=0&&p.test(w[r]);r--)g.push(w[r]);return g.reverse().join("")},l.retrieveFollowingIdentifier=function(w,_,p){p=p||b;for(var g=[],r=_;r<w.length&&p.test(w[r]);r++)g.push(w[r]);return g},l.getCompletionPrefix=function(w){var _=w.getCursorPosition(),p=w.session.getLine(_.row),g;return w.completers.forEach((function(r){r.identifierRegexps&&r.identifierRegexps.forEach((function(a){!g&&a&&(g=this.retrievePrecedingIdentifier(p,_.column,a))}).bind(this))}).bind(this)),g||this.retrievePrecedingIdentifier(p,_.column)},l.triggerAutocomplete=function(w,p){var p=p??w.session.getPrecedingCharacter();return w.completers.some(function(g){if(g.triggerCharacters&&Array.isArray(g.triggerCharacters))return g.triggerCharacters.includes(p)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,l,T){var b=e("./keyboard/hash_handler").HashHandler,w=e("./autocomplete/popup").AcePopup,_=e("./autocomplete/inline").AceInline,p=e("./autocomplete/popup").getAriaId,g=e("./autocomplete/util"),r=e("./lib/lang"),a=e("./lib/dom"),o=e("./snippets").snippetManager,i=e("./config"),n=e("./lib/event"),s=e("./lib/scroll").preventParentScroll,h=function($,C){C.completer&&C.completer.destroy()},m=function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new b,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=r.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=r.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=r.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=r.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=r.delayedCall((function(){var C=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!C||this.editor.completers.length===0||(this.completions=new R($.completionsForLoading),this.openPopup(this.editor,C.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:i.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new w(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(C){this.insertMatch(),C.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),n.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new _,this.inlineRenderer},$.prototype.getPopup=function(){return this.popup||this.$init()},$.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},$.prototype.$seen=function(C){!this.hasSeen.has(C)&&C&&C.completer&&C.completer.onSeen&&typeof C.completer.onSeen=="function"&&(C.completer.onSeen(this.editor,C),this.hasSeen.add(C))},$.prototype.$onPopupChange=function(C){if(this.inlineRenderer&&this.inlineEnabled){var v=C?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(v),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},$.prototype.$updateGhostText=function(C){var v=this.base.row,L=this.base.column,I=this.editor.getCursorPosition().column,F=this.editor.session.getLine(v).slice(L,I);this.inlineRenderer.show(this.editor,C,F)?this.$seen(C):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var C=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var v=this.popup.getFirstVisibleRow();v<=this.popup.getLastVisibleRow();v++){var L=this.popup.getData(v);L&&(!C||L.hideInlinePreview)&&this.$seen(L)}},$.prototype.$onPopupShow=function(C){this.$onPopupChange(C),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},$.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var C=this.editor.container.parentNode,v=[];C;)v.push(C),C.addEventListener("scroll",this.onLayoutChange,{passive:!0}),C=C.parentNode;this.$elements=v}},$.prototype.unObserveLayoutChanges=function(){var C=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(v){v.removeEventListener("scroll",C.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var C=this.editor,v=C.renderer,L=v.layerConfig.lineHeight,I=v.$cursorLayer.getPixelPosition(this.base,!0);I.left-=this.popup.getTextLeftOffset();var F=C.container.getBoundingClientRect();I.top+=F.top-v.layerConfig.offset,I.left+=F.left-C.renderer.scrollLeft,I.left+=v.gutterWidth;var E={top:I.top,left:I.left};v.$ghostText&&v.$ghostTextWidget&&this.base.row===v.$ghostText.position.row&&(E.top+=v.$ghostTextWidget.el.offsetHeight);var U=C.container.getBoundingClientRect().bottom-L,P=U<E.top?{top:U,left:E.left}:E;this.popup.tryShow(P,L,"bottom")||this.popup.tryShow(I,L,"top")||this.popup.show(I,L)},$.prototype.openPopup=function(C,v,L){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var I=this.popup.getRow(),F=this.popup.data[I];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:p(this.popup.getRow()),inline:this.inlineEnabled}),C.keyBinding.addKeyboardHandler(this.keyboardHandler);var E;this.stickySelection&&(E=this.popup.data.indexOf(F)),(!E||E===-1)&&(E=0),this.popup.setRow(this.autoSelect?E:-1),E===I&&F!==this.completions.filtered[E]&&this.$onPopupChange();var U=this.inlineRenderer&&this.inlineEnabled;if(E===I&&U){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}L||(this.popup.setTheme(C.getTheme()),this.popup.setFontSize(C.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},$.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},$.prototype.changeListener=function(C){var v=this.editor.selection.lead;(v.row!=this.base.row||v.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(C){var v=document.activeElement,L=this.editor.textInput.getElement(),I=C.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(C.relatedTarget),F=this.popup&&this.popup.container;v!=L&&v.parentNode!=F&&!I&&v!=this.tooltipNode&&C.relatedTarget!=L&&this.detach()},$.prototype.mousedownListener=function(C){this.detach()},$.prototype.mousewheelListener=function(C){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(C){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(C){this.popup.goTo(C)},$.prototype.insertMatch=function(C,v){if(C||(C=this.popup.getData(this.popup.getRow())),!C)return!1;if(C.value==="")return this.detach();var L=this.completions,I=this.getCompletionProvider().insertMatch(this.editor,C,L.filterText,v);return this.completions==L&&this.detach(),I},$.prototype.showPopup=function(C,v){this.editor&&this.detach(),this.activated=!0,this.editor=C,C.completer!=this&&(C.completer&&C.completer.detach(),C.completer=this),C.on("changeSelection",this.changeListener),C.on("blur",this.blurListener),C.on("mousedown",this.mousedownListener),C.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,v)},$.prototype.getCompletionProvider=function(C){return this.completionProvider||(this.completionProvider=new y(C)),this.completionProvider},$.prototype.gatherCompletions=function(C,v){return this.getCompletionProvider().gatherCompletions(C,v)},$.prototype.updateCompletions=function(C,v){if(C&&this.base&&this.completions){var I=this.editor.getCursorPosition(),F=this.editor.session.getTextRange({start:this.base,end:I});if(F==this.completions.filterText)return;if(this.completions.setFilter(F),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==F&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,F,C);return}if(v&&v.matches){var I=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(I.row,I.column),this.base.$insertRight=!0,this.completions=new R(v.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",C)}var L=this.editor.getSession(),I=this.editor.getCursorPosition(),F=g.getCompletionPrefix(this.editor);this.base=L.doc.createAnchor(I.row,I.column-F.length),this.base.$insertRight=!0;var E={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:F,pos:I}).provideCompletions(this.editor,E,(function(U,P,O){var S=P.filtered,k=g.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!S.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(k)),N){var W=[{caption:N,value:""}];this.completions=new R(W),this.openPopup(this.editor,k,C),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(S.length==1&&S[0].value==k&&!S[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&S.length==1)return this.insertMatch(S[0])}this.completions=!O&&this.showLoadingState?new R($.completionsForLoading.concat(S),P.filterText):P,this.openPopup(this.editor,k,C),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},$.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},$.prototype.updateDocTooltip=function(){var C=this.popup,v=this.completions&&this.completions.filtered,L=v&&(v[C.getHoveredRow()]||v[C.getRow()]),I=null;if(!L||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var F=this.editor.completers.length,E=0;E<F;E++){var U=this.editor.completers[E];if(U.getDocTooltip&&L.completerId===U.id){I=U.getDocTooltip(L);break}}if(!I&&typeof L!="string"&&(I=L),typeof I=="string"&&(I={docText:I}),!I||!I.docHTML&&!I.docText)return this.hideDocTooltip();this.showDocTooltip(I)},$.prototype.showDocTooltip=function(C){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",s));var v=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(v.isDark?"ace_dark ":"")+(v.cssClass||"");var L=this.tooltipNode;C.docHTML?L.innerHTML=C.docHTML:C.docText&&(L.textContent=C.docText),L.parentNode||this.popup.container.appendChild(this.tooltipNode);var I=this.popup,F=I.container.getBoundingClientRect(),E=400,U=300,P=I.renderer.scrollBar.width||10,O=F.left,S=window.innerWidth-F.right-P,k=I.isTopdown?F.top:window.innerHeight-P-F.bottom,N=[Math.min(S/E,1),Math.min(O/E,1),Math.min(k/U*.9)],W=Math.max.apply(Math,N),V=L.style;V.display="block",W==N[0]?(V.left=F.right+1+"px",V.right="",V.maxWidth=E*W+"px",V.top=F.top+"px",V.bottom="",V.maxHeight=Math.min(window.innerHeight-P-F.top,U)+"px"):W==N[1]?(V.right=window.innerWidth-F.left+"px",V.left="",V.maxWidth=E*W+"px",V.top=F.top+"px",V.bottom="",V.maxHeight=Math.min(window.innerHeight-P-F.top,U)+"px"):W==N[2]&&(V.left=window.innerWidth-F.left+"px",V.maxWidth=Math.min(E,window.innerWidth)+"px",I.isTopdown?(V.top=F.bottom+"px",V.left=F.left+"px",V.right="",V.bottom="",V.maxHeight=Math.min(window.innerHeight-P-F.bottom,U)+"px"):(V.top=I.container.offsetTop-L.offsetHeight+"px",V.left=F.left+"px",V.right="",V.bottom="",V.maxHeight=Math.min(I.container.offsetTop,U)+"px"))},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var C=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==C&&this.editor.focus(),this.tooltipNode=null,C.parentNode&&C.parentNode.removeChild(C)}},$.prototype.onTooltipClick=function(C){for(var v=C.target;v&&v!=this.tooltipNode;){if(v.nodeName=="A"&&v.href){v.rel="noreferrer",v.target="_blank";break}v=v.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var C=this.popup.container;C&&C.parentNode&&C.parentNode.removeChild(C)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",h),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(C){return C.completer instanceof $||(C.completer&&(C.completer.destroy(),C.completer=null),i.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),C.completer=$.$sharedInstance):(C.completer=new $,C.once("destroy",h))),C.completer},$}();m.prototype.commands={Up:function($){$.completer.goTo("up")},Down:function($){$.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function($){$.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function($){$.completer.goTo("end")},Esc:function($){$.completer.detach()},Return:function($){return $.completer.insertMatch()},"Shift-Return":function($){$.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function($){var C=$.completer.insertMatch();if(C||$.tabstopManager)return C;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var C=g.getCompletionPrefix($);!C&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},m.startCommand={name:"startAutocomplete",exec:function($,C){var v=m.for($);v.autoInsert=!1,v.autoSelect=!0,v.autoShown=!1,v.showPopup($,C),v.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var y=function(){function $(C){this.initialPosition=C,this.active=!0}return $.prototype.insertByIndex=function(C,v,L){return!this.completions||!this.completions.filtered?!1:this.insertMatch(C,this.completions.filtered[v],L)},$.prototype.insertMatch=function(C,v,L){if(!v)return!1;if(C.startOperation({command:{name:"insertMatch"}}),v.completer&&v.completer.insertMatch)v.completer.insertMatch(C,v);else{if(!this.completions)return!1;var I=this.completions.filterText.length,F=0;if(v.range&&v.range.start.row===v.range.end.row&&(I-=this.initialPosition.prefix.length,I+=this.initialPosition.pos.column-v.range.start.column,F+=v.range.end.column-this.initialPosition.pos.column),I||F){var E;C.selection.getAllRanges?E=C.selection.getAllRanges():E=[C.getSelectionRange()];for(var U=0,P;P=E[U];U++)P.start.column-=I,P.end.column+=F,C.session.remove(P)}v.snippet?o.insertSnippet(C,v.snippet):this.$insertString(C,v),v.completer&&v.completer.onInsert&&typeof v.completer.onInsert=="function"&&v.completer.onInsert(C,v),v.command&&v.command==="startAutocomplete"&&C.execCommand(v.command)}return C.endOperation(),!0},$.prototype.$insertString=function(C,v){var L=v.value||v;C.execCommand("insertstring",L)},$.prototype.gatherCompletions=function(C,v){var L=C.getSession(),I=C.getCursorPosition(),F=g.getCompletionPrefix(C),E=[];this.completers=C.completers;var U=C.completers.length;return C.completers.forEach(function(P,O){P.getCompletions(C,L,I,F,function(S,k){P.hideInlinePreview&&(k=k.map(function(N){return Object.assign(N,{hideInlinePreview:P.hideInlinePreview})})),!S&&k&&(E=E.concat(k)),v(null,{prefix:g.getCompletionPrefix(C),matches:E,finished:--U===0})})}),!0},$.prototype.provideCompletions=function(C,v,L){var I=(function(P){var O=P.prefix,S=P.matches;this.completions=new R(S),v.exactMatch&&(this.completions.exactMatch=!0),v.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(P.finished||this.completions.filtered.length)&&L(null,this.completions,P.finished)}).bind(this),F=!0,E=null;if(this.gatherCompletions(C,(function(P,O){if(this.active){P&&(L(P,[],!0),this.detach());var S=O.prefix;if(S.indexOf(O.prefix)===0){if(F){E=O;return}I(O)}}}).bind(this)),F=!1,E){var U=E;E=null,I(U)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(C){typeof C.cancel=="function"&&C.cancel()})},$}(),R=function(){function $(C,v){this.all=C,this.filtered=C,this.filterText=v||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(C){if(C.length>this.filterText&&C.lastIndexOf(this.filterText,0)===0)var v=this.filtered;else var v=this.all;this.filterText=C,v=this.filterCompletions(v,this.filterText),v=v.sort(function(I,F){return F.exactMatch-I.exactMatch||F.$score-I.$score||(I.caption||I.value).localeCompare(F.caption||F.value)});var L=null;v=v.filter(function(I){var F=I.snippet||I.caption||I.value;return F===L?!1:(L=F,!0)}),this.filtered=v},$.prototype.filterCompletions=function(C,v){var L=[],I=v.toUpperCase(),F=v.toLowerCase();e:for(var E=0,U;U=C[E];E++){if(U.skipFilter){U.$score=U.score,L.push(U);continue}var P=!this.ignoreCaption&&U.caption||U.value||U.snippet;if(P){var O=-1,S=0,k=0,N,W;if(this.exactMatch){if(v!==P.substr(0,v.length))continue e}else{var V=P.toLowerCase().indexOf(F);if(V>-1)k=V;else for(var G=0;G<v.length;G++){var Q=P.indexOf(F[G],O+1),te=P.indexOf(I[G],O+1);if(N=Q>=0&&(te<0||Q<te)?Q:te,N<0)continue e;W=N-O-1,W>0&&(O===-1&&(k+=10),k+=W,S|=1<<G),O=N}}U.matchMask=S,U.exactMatch=k?0:1,U.$score=(U.score||0)-k,L.push(U)}}return L},$}();l.Autocomplete=m,l.CompletionProvider=y,l.FilteredList=R}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,l,T){function b(g,r){var a=g.getTextRange(_.fromPoints({row:0,column:0},r));return a.split(p).length-1}function w(g,r){var a=b(g,r),o=g.getValue().split(p),i=Object.create(null),n=o[a];return o.forEach(function(s,h){if(!(!s||s===n)){var m=Math.abs(a-h),y=o.length-m;i[s]?i[s]=Math.max(y,i[s]):i[s]=y}}),i}var _=e("../range").Range,p=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;l.getCompletions=function(g,r,a,o,i){var n=w(r,a),s=Object.keys(n);i(null,s.map(function(h){return{caption:h,value:h,score:n[h],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,l,T){var b=e("../snippets").snippetManager,w=e("../autocomplete").Autocomplete,_=e("../config"),p=e("../lib/lang"),g=e("../autocomplete/util"),r=e("../autocomplete/text_completer"),a={getCompletions:function(I,F,E,U,P){if(F.$mode.completer)return F.$mode.completer.getCompletions(I,F,E,U,P);var O=I.session.getState(E.row),S=F.$mode.getCompletions(O,F,E,U);S=S.map(function(k){return k.completerId=a.id,k}),P(null,S)},id:"keywordCompleter"},o=function(I){var F={};return I.replace(/\${(\d+)(:(.*?))?}/g,function(E,U,P,O){return F[U]=O||""}).replace(/\$(\d+?)/g,function(E,U){return F[U]})},i={getCompletions:function(I,F,E,U,P){var O=[],S=F.getTokenAt(E.row,E.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?O.push("html-tag"):O=b.getActiveScopes(I);var k=b.snippetMap,N=[];O.forEach(function(W){for(var V=k[W]||[],G=V.length;G--;){var Q=V[G],te=Q.name||Q.tabTrigger;te&&N.push({caption:te,snippet:Q.content,meta:Q.tabTrigger&&!Q.name?Q.tabTrigger+"⇥ ":"snippet",completerId:i.id})}},this),P(null,N)},getDocTooltip:function(I){I.snippet&&!I.docHTML&&(I.docHTML=["<b>",p.escapeHTML(I.caption),"</b>","<hr></hr>",p.escapeHTML(o(I.snippet))].join(""))},id:"snippetCompleter"},n=[i,r,a];l.setCompleters=function(I){n.length=0,I&&n.push.apply(n,I)},l.addCompleter=function(I){n.push(I)},l.textCompleter=r,l.keyWordCompleter=a,l.snippetCompleter=i;var s={name:"expandSnippet",exec:function(I){return b.expandWithTab(I)},bindKey:"Tab"},h=function(I,F){m(F.session.$mode)},m=function(I){typeof I=="string"&&(I=_.$modes[I]),I&&(b.files||(b.files={}),y(I.$id,I.snippetFileId),I.modes&&I.modes.forEach(m))},y=function(I,F){!F||!I||b.files[I]||(b.files[I]={},_.loadModule(F,function(E){E&&(b.files[I]=E,!E.snippets&&E.snippetText&&(E.snippets=b.parseSnippetFile(E.snippetText)),b.register(E.snippets||[],E.scope),E.includeScopes&&(b.snippetMap[E.scope].includeScopes=E.includeScopes,E.includeScopes.forEach(function(U){m("ace/mode/"+U)})))}))},R=function(I){var F=I.editor,E=F.completer&&F.completer.activated;if(I.command.name==="backspace")E&&!g.getCompletionPrefix(F)&&F.completer.detach();else if(I.command.name==="insertstring"&&!E){$=I;var U=I.editor.$liveAutocompletionDelay;U?C.delay(U):v(I)}},$,C=p.delayedCall(function(){v($)},0),v=function(I){var F=I.editor,E=g.getCompletionPrefix(F),U=I.args,P=g.triggerAutocomplete(F,U);if(E&&E.length>=F.$liveAutocompletionThreshold||P){var O=w.for(F);O.autoShown=!0,O.showPopup(F)}},L=e("../editor").Editor;e("../config").defineOptions(L.prototype,"editor",{enableBasicAutocompletion:{set:function(I){I?(this.completers||(this.completers=Array.isArray(I)?I:n),this.commands.addCommand(w.startCommand)):this.commands.removeCommand(w.startCommand)},value:!1},enableLiveAutocompletion:{set:function(I){I?(this.completers||(this.completers=Array.isArray(I)?I:n),this.commands.on("afterExec",R)):this.commands.off("afterExec",R)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(I){I?(this.commands.addCommand(s),this.on("changeMode",h),h(null,this)):(this.commands.removeCommand(s),this.off("changeMode",h))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(e){c&&(c.exports=e)})}()}(gc)),gc.exports}Cx();var mc={exports:{}},Yd;function Ax(){return Yd||(Yd=1,function(c,u){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,l,T){T.exports=`
1225
-
1226
- /* ------------------------------------------------------------------------------------------
1227
- * Editor Search Form
1228
- * --------------------------------------------------------------------------------------- */
1229
- .ace_search {
1230
- background-color: #ddd;
1231
- color: #666;
1232
- border: 1px solid #cbcbcb;
1233
- border-top: 0 none;
1234
- overflow: hidden;
1235
- margin: 0;
1236
- padding: 4px 6px 0 4px;
1237
- position: absolute;
1238
- top: 0;
1239
- z-index: 99;
1240
- white-space: normal;
1241
- }
1242
- .ace_search.left {
1243
- border-left: 0 none;
1244
- border-radius: 0px 0px 5px 0px;
1245
- left: 0;
1246
- }
1247
- .ace_search.right {
1248
- border-radius: 0px 0px 0px 5px;
1249
- border-right: 0 none;
1250
- right: 0;
1251
- }
1252
-
1253
- .ace_search_form, .ace_replace_form {
1254
- margin: 0 20px 4px 0;
1255
- overflow: hidden;
1256
- line-height: 1.9;
1257
- }
1258
- .ace_replace_form {
1259
- margin-right: 0;
1260
- }
1261
- .ace_search_form.ace_nomatch {
1262
- outline: 1px solid red;
1263
- }
1264
-
1265
- .ace_search_field {
1266
- border-radius: 3px 0 0 3px;
1267
- background-color: white;
1268
- color: black;
1269
- border: 1px solid #cbcbcb;
1270
- border-right: 0 none;
1271
- outline: 0;
1272
- padding: 0;
1273
- font-size: inherit;
1274
- margin: 0;
1275
- line-height: inherit;
1276
- padding: 0 6px;
1277
- min-width: 17em;
1278
- vertical-align: top;
1279
- min-height: 1.8em;
1280
- box-sizing: content-box;
1281
- }
1282
- .ace_searchbtn {
1283
- border: 1px solid #cbcbcb;
1284
- line-height: inherit;
1285
- display: inline-block;
1286
- padding: 0 6px;
1287
- background: #fff;
1288
- border-right: 0 none;
1289
- border-left: 1px solid #dcdcdc;
1290
- cursor: pointer;
1291
- margin: 0;
1292
- position: relative;
1293
- color: #666;
1294
- }
1295
- .ace_searchbtn:last-child {
1296
- border-radius: 0 3px 3px 0;
1297
- border-right: 1px solid #cbcbcb;
1298
- }
1299
- .ace_searchbtn:disabled {
1300
- background: none;
1301
- cursor: default;
1302
- }
1303
- .ace_searchbtn:hover {
1304
- background-color: #eef1f6;
1305
- }
1306
- .ace_searchbtn.prev, .ace_searchbtn.next {
1307
- padding: 0px 0.7em
1308
- }
1309
- .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1310
- content: "";
1311
- border: solid 2px #888;
1312
- width: 0.5em;
1313
- height: 0.5em;
1314
- border-width: 2px 0 0 2px;
1315
- display:inline-block;
1316
- transform: rotate(-45deg);
1317
- }
1318
- .ace_searchbtn.next:after {
1319
- border-width: 0 2px 2px 0 ;
1320
- }
1321
- .ace_searchbtn_close {
1322
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1323
- border-radius: 50%;
1324
- border: 0 none;
1325
- color: #656565;
1326
- cursor: pointer;
1327
- font: 16px/16px Arial;
1328
- padding: 0;
1329
- height: 14px;
1330
- width: 14px;
1331
- top: 9px;
1332
- right: 7px;
1333
- position: absolute;
1334
- }
1335
- .ace_searchbtn_close:hover {
1336
- background-color: #656565;
1337
- background-position: 50% 100%;
1338
- color: white;
1339
- }
1340
-
1341
- .ace_button {
1342
- margin-left: 2px;
1343
- cursor: pointer;
1344
- -webkit-user-select: none;
1345
- -moz-user-select: none;
1346
- -o-user-select: none;
1347
- -ms-user-select: none;
1348
- user-select: none;
1349
- overflow: hidden;
1350
- opacity: 0.7;
1351
- border: 1px solid rgba(100,100,100,0.23);
1352
- padding: 1px;
1353
- box-sizing: border-box!important;
1354
- color: black;
1355
- }
1356
-
1357
- .ace_button:hover {
1358
- background-color: #eee;
1359
- opacity:1;
1360
- }
1361
- .ace_button:active {
1362
- background-color: #ddd;
1363
- }
1364
-
1365
- .ace_button.checked {
1366
- border-color: #3399ff;
1367
- opacity:1;
1368
- }
1369
-
1370
- .ace_search_options{
1371
- margin-bottom: 3px;
1372
- text-align: right;
1373
- -webkit-user-select: none;
1374
- -moz-user-select: none;
1375
- -o-user-select: none;
1376
- -ms-user-select: none;
1377
- user-select: none;
1378
- clear: both;
1379
- }
1380
-
1381
- .ace_search_counter {
1382
- float: left;
1383
- font-family: arial;
1384
- padding: 0 8px;
1385
- }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,l,T){var b=e("../lib/dom"),w=e("../lib/lang"),_=e("../lib/event"),p=e("./searchbox-css"),g=e("../keyboard/hash_handler").HashHandler,r=e("../lib/keys"),a=e("../config").nls,o=999;b.importCssString(p,"ace_searchbox",!1);var i=function(){function h(m,y,R){this.activeInput,this.element=b.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:a("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(m),b.importCssString(p,"ace_searchbox",m.container),_.addListener(this.element,"touchstart",function($){$.stopPropagation()},m)}return h.prototype.setEditor=function(m){m.searchBox=this,m.renderer.scroller.appendChild(this.element),this.editor=m},h.prototype.setSession=function(m){this.searchRange=null,this.$syncOptions(!0)},h.prototype.onEditorInput=function(){this.find(!1,!1,!0)},h.prototype.$initElements=function(m){this.searchBox=m.querySelector(".ace_search_form"),this.replaceBox=m.querySelector(".ace_replace_form"),this.searchOption=m.querySelector("[action=searchInSelection]"),this.replaceOption=m.querySelector("[action=toggleReplace]"),this.regExpOption=m.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=m.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=m.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=m.querySelector(".ace_search_counter")},h.prototype.$init=function(){var m=this.element;this.$initElements(m);var y=this;_.addListener(m,"mousedown",function(R){setTimeout(function(){y.activeInput.focus()},0),_.stopPropagation(R)}),_.addListener(m,"click",function(R){var $=R.target||R.srcElement,C=$.getAttribute("action");C&&y[C]?y[C]():y.$searchBarKb.commands[C]&&y.$searchBarKb.commands[C].exec(y),_.stopPropagation(R)}),_.addCommandKeyListener(m,function(R,$,C){var v=r.keyCodeToString(C),L=y.$searchBarKb.findKeyCommand($,v);L&&L.exec&&(L.exec(y),_.stopEvent(R))}),this.$onChange=w.delayedCall(function(){y.find(!1,!1)}),_.addListener(this.searchInput,"input",function(){y.$onChange.schedule(20)}),_.addListener(this.searchInput,"focus",function(){y.activeInput=y.searchInput,y.searchInput.value&&y.highlight()}),_.addListener(this.replaceInput,"focus",function(){y.activeInput=y.replaceInput,y.searchInput.value&&y.highlight()})},h.prototype.setSearchRange=function(m){this.searchRange=m,m?this.searchRangeMarker=this.editor.session.addMarker(m,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},h.prototype.$syncOptions=function(m){b.setCssClass(this.replaceOption,"checked",this.searchRange),b.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",b.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),b.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),b.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var y=this.editor.getReadOnly();this.replaceOption.style.display=y?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!y?"":"none",this.find(!1,!1,m)},h.prototype.highlight=function(m){this.editor.session.highlight(m||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},h.prototype.find=function(m,y,R){var $=this.editor.find(this.searchInput.value,{skipCurrent:m,backwards:y,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:R,range:this.searchRange}),C=!$&&this.searchInput.value;b.setCssClass(this.searchBox,"ace_nomatch",C),this.editor._emit("findSearchBox",{match:!C}),this.highlight(),this.updateCounter()},h.prototype.updateCounter=function(){var m=this.editor,y=m.$search.$options.re,R=y.unicode,$=0,C=0;if(y){var v=this.searchRange?m.session.getTextRange(this.searchRange):m.getValue();m.$search.$isMultilineSearch(m.getLastSearchOptions())&&(v=v.replace(/\r\n|\r|\n/g,`
1386
- `),m.session.doc.$autoNewLine=`
1387
- `);var L=m.session.doc.positionToIndex(m.selection.anchor);this.searchRange&&(L-=m.session.doc.positionToIndex(this.searchRange.start));for(var I=y.lastIndex=0,F;(F=y.exec(v))&&($++,I=F.index,I<=L&&C++,!($>o||!F[0]&&(y.lastIndex=I+=w.skipEmptyMatch(v,I,R),I>=v.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[C,$>o?o+"+":$])},h.prototype.findNext=function(){this.find(!0,!1)},h.prototype.findPrev=function(){this.find(!0,!0)},h.prototype.findAll=function(){var m=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),y=!m&&this.searchInput.value;b.setCssClass(this.searchBox,"ace_nomatch",y),this.editor._emit("findSearchBox",{match:!y}),this.highlight(),this.hide()},h.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},h.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},h.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},h.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},h.prototype.show=function(m,y){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=y,this.editor.$search.$options.regExp&&(m=w.escapeRegExp(m)),m&&(this.searchInput.value=m),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},h.prototype.isFocused=function(){var m=document.activeElement;return m==this.searchInput||m==this.replaceInput},h}(),n=new g;n.bindKeys({"Ctrl-f|Command-f":function(h){var m=h.isReplace=!h.isReplace;h.replaceBox.style.display=m?"":"none",h.replaceOption.checked=!1,h.$syncOptions(),h.searchInput.focus()},"Ctrl-H|Command-Option-F":function(h){h.editor.getReadOnly()||(h.replaceOption.checked=!0,h.$syncOptions(),h.replaceInput.focus())},"Ctrl-G|Command-G":function(h){h.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(h){h.findPrev()},esc:function(h){setTimeout(function(){h.hide()})},Return:function(h){h.activeInput==h.replaceInput&&h.replace(),h.findNext()},"Shift-Return":function(h){h.activeInput==h.replaceInput&&h.replace(),h.findPrev()},"Alt-Return":function(h){h.activeInput==h.replaceInput&&h.replaceAll(),h.findAll()},Tab:function(h){(h.activeInput==h.replaceInput?h.searchInput:h.replaceInput).focus()}}),n.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(h){h.regExpOption.checked=!h.regExpOption.checked,h.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(h){h.caseSensitiveOption.checked=!h.caseSensitiveOption.checked,h.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(h){h.wholeWordOption.checked=!h.wholeWordOption.checked,h.$syncOptions()}},{name:"toggleReplace",exec:function(h){h.replaceOption.checked=!h.replaceOption.checked,h.$syncOptions()}},{name:"searchInSelection",exec:function(h){h.searchOption.checked=!h.searchRange,h.setSearchRange(h.searchOption.checked&&h.editor.getSelectionRange()),h.$syncOptions()}}]);var s=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(h){h.searchBox.hide()}}]);i.prototype.$searchBarKb=n,i.prototype.$closeSearchBarKb=s,l.SearchBox=i,l.Search=function(h,m){var y=h.searchBox||new i(h);y.show(h.session.getTextRange(),m)}}),function(){ace.require(["ace/ext/searchbox"],function(e){c&&(c.exports=e)})}()}(mc)),mc.exports}Ax();var $x=Object.defineProperty,Mx=(c,u,e)=>u in c?$x(c,u,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[u]=e,$r=(c,u,e)=>Mx(c,typeof u!="symbol"?u+"":u,e);function Wp(c,u){return function(){return c.apply(u,arguments)}}const{toString:Tx}=Object.prototype,{getPrototypeOf:Mu}=Object,Xa=(c=>u=>{const e=Tx.call(u);return c[e]||(c[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),gr=c=>(c=c.toLowerCase(),u=>Xa(u)===c),el=c=>u=>typeof u===c,{isArray:vs}=Array,Zs=el("undefined");function Lx(c){return c!==null&&!Zs(c)&&c.constructor!==null&&!Zs(c.constructor)&&Fi(c.constructor.isBuffer)&&c.constructor.isBuffer(c)}const Hp=gr("ArrayBuffer");function Ex(c){let u;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?u=ArrayBuffer.isView(c):u=c&&c.buffer&&Hp(c.buffer),u}const Rx=el("string"),Fi=el("function"),zp=el("number"),tl=c=>c!==null&&typeof c=="object",Ix=c=>c===!0||c===!1,Ua=c=>{if(Xa(c)!=="object")return!1;const u=Mu(c);return(u===null||u===Object.prototype||Object.getPrototypeOf(u)===null)&&!(Symbol.toStringTag in c)&&!(Symbol.iterator in c)},Ox=gr("Date"),Nx=gr("File"),Dx=gr("Blob"),Fx=gr("FileList"),Px=c=>tl(c)&&Fi(c.pipe),Bx=c=>{let u;return c&&(typeof FormData=="function"&&c instanceof FormData||Fi(c.append)&&((u=Xa(c))==="formdata"||u==="object"&&Fi(c.toString)&&c.toString()==="[object FormData]"))},Wx=gr("URLSearchParams"),[Hx,zx,Ux,Vx]=["ReadableStream","Request","Response","Headers"].map(gr),jx=c=>c.trim?c.trim():c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xs(c,u,{allOwnKeys:e=!1}={}){if(c===null||typeof c>"u")return;let l,T;if(typeof c!="object"&&(c=[c]),vs(c))for(l=0,T=c.length;l<T;l++)u.call(null,c[l],l,c);else{const b=e?Object.getOwnPropertyNames(c):Object.keys(c),w=b.length;let _;for(l=0;l<w;l++)_=b[l],u.call(null,c[_],_,c)}}function Up(c,u){u=u.toLowerCase();const e=Object.keys(c);let l=e.length,T;for(;l-- >0;)if(T=e[l],u===T.toLowerCase())return T;return null}const Ho=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vp=c=>!Zs(c)&&c!==Ho;function lu(){const{caseless:c}=Vp(this)&&this||{},u={},e=(l,T)=>{const b=c&&Up(u,T)||T;Ua(u[b])&&Ua(l)?u[b]=lu(u[b],l):Ua(l)?u[b]=lu({},l):vs(l)?u[b]=l.slice():u[b]=l};for(let l=0,T=arguments.length;l<T;l++)arguments[l]&&Xs(arguments[l],e);return u}const Kx=(c,u,e,{allOwnKeys:l}={})=>(Xs(u,(T,b)=>{e&&Fi(T)?c[b]=Wp(T,e):c[b]=T},{allOwnKeys:l}),c),Gx=c=>(c.charCodeAt(0)===65279&&(c=c.slice(1)),c),qx=(c,u,e,l)=>{c.prototype=Object.create(u.prototype,l),c.prototype.constructor=c,Object.defineProperty(c,"super",{value:u.prototype}),e&&Object.assign(c.prototype,e)},Yx=(c,u,e,l)=>{let T,b,w;const _={};if(u=u||{},c==null)return u;do{for(T=Object.getOwnPropertyNames(c),b=T.length;b-- >0;)w=T[b],(!l||l(w,c,u))&&!_[w]&&(u[w]=c[w],_[w]=!0);c=e!==!1&&Mu(c)}while(c&&(!e||e(c,u))&&c!==Object.prototype);return u},Qx=(c,u,e)=>{c=String(c),(e===void 0||e>c.length)&&(e=c.length),e-=u.length;const l=c.indexOf(u,e);return l!==-1&&l===e},Zx=c=>{if(!c)return null;if(vs(c))return c;let u=c.length;if(!zp(u))return null;const e=new Array(u);for(;u-- >0;)e[u]=c[u];return e},Jx=(c=>u=>c&&u instanceof c)(typeof Uint8Array<"u"&&Mu(Uint8Array)),Xx=(c,u)=>{const e=(c&&c[Symbol.iterator]).call(c);let l;for(;(l=e.next())&&!l.done;){const T=l.value;u.call(c,T[0],T[1])}},e1=(c,u)=>{let e;const l=[];for(;(e=c.exec(u))!==null;)l.push(e);return l},t1=gr("HTMLFormElement"),n1=c=>c.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(u,e,l){return e.toUpperCase()+l}),Qd=(({hasOwnProperty:c})=>(u,e)=>c.call(u,e))(Object.prototype),i1=gr("RegExp"),jp=(c,u)=>{const e=Object.getOwnPropertyDescriptors(c),l={};Xs(e,(T,b)=>{let w;(w=u(T,b,c))!==!1&&(l[b]=w||T)}),Object.defineProperties(c,l)},r1=c=>{jp(c,(u,e)=>{if(Fi(c)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const l=c[e];if(Fi(l)){if(u.enumerable=!1,"writable"in u){u.writable=!1;return}u.set||(u.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},o1=(c,u)=>{const e={},l=T=>{T.forEach(b=>{e[b]=!0})};return vs(c)?l(c):l(String(c).split(u)),e},s1=()=>{},a1=(c,u)=>c!=null&&Number.isFinite(c=+c)?c:u;function l1(c){return!!(c&&Fi(c.append)&&c[Symbol.toStringTag]==="FormData"&&c[Symbol.iterator])}const c1=c=>{const u=new Array(10),e=(l,T)=>{if(tl(l)){if(u.indexOf(l)>=0)return;if(!("toJSON"in l)){u[T]=l;const b=vs(l)?[]:{};return Xs(l,(w,_)=>{const p=e(w,T+1);!Zs(p)&&(b[_]=p)}),u[T]=void 0,b}}return l};return e(c,0)},u1=gr("AsyncFunction"),h1=c=>c&&(tl(c)||Fi(c))&&Fi(c.then)&&Fi(c.catch),Kp=((c,u)=>c?setImmediate:u?((e,l)=>(Ho.addEventListener("message",({source:T,data:b})=>{T===Ho&&b===e&&l.length&&l.shift()()},!1),T=>{l.push(T),Ho.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Fi(Ho.postMessage)),d1=typeof queueMicrotask<"u"?queueMicrotask.bind(Ho):typeof process<"u"&&process.nextTick||Kp,Ae={isArray:vs,isArrayBuffer:Hp,isBuffer:Lx,isFormData:Bx,isArrayBufferView:Ex,isString:Rx,isNumber:zp,isBoolean:Ix,isObject:tl,isPlainObject:Ua,isReadableStream:Hx,isRequest:zx,isResponse:Ux,isHeaders:Vx,isUndefined:Zs,isDate:Ox,isFile:Nx,isBlob:Dx,isRegExp:i1,isFunction:Fi,isStream:Px,isURLSearchParams:Wx,isTypedArray:Jx,isFileList:Fx,forEach:Xs,merge:lu,extend:Kx,trim:jx,stripBOM:Gx,inherits:qx,toFlatObject:Yx,kindOf:Xa,kindOfTest:gr,endsWith:Qx,toArray:Zx,forEachEntry:Xx,matchAll:e1,isHTMLForm:t1,hasOwnProperty:Qd,hasOwnProp:Qd,reduceDescriptors:jp,freezeMethods:r1,toObjectSet:o1,toCamelCase:n1,noop:s1,toFiniteNumber:a1,findKey:Up,global:Ho,isContextDefined:Vp,isSpecCompliantForm:l1,toJSONObject:c1,isAsyncFn:u1,isThenable:h1,setImmediate:Kp,asap:d1};function St(c,u,e,l,T){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=c,this.name="AxiosError",u&&(this.code=u),e&&(this.config=e),l&&(this.request=l),T&&(this.response=T,this.status=T.status?T.status:null)}Ae.inherits(St,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:Ae.toJSONObject(this.config),code:this.code,status:this.status}}});const Gp=St.prototype,qp={};["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(c=>{qp[c]={value:c}});Object.defineProperties(St,qp);Object.defineProperty(Gp,"isAxiosError",{value:!0});St.from=(c,u,e,l,T,b)=>{const w=Object.create(Gp);return Ae.toFlatObject(c,w,function(_){return _!==Error.prototype},_=>_!=="isAxiosError"),St.call(w,c.message,u,e,l,T),w.cause=c,w.name=c.name,b&&Object.assign(w,b),w};const f1=null;function cu(c){return Ae.isPlainObject(c)||Ae.isArray(c)}function Yp(c){return Ae.endsWith(c,"[]")?c.slice(0,-2):c}function Zd(c,u,e){return c?c.concat(u).map(function(l,T){return l=Yp(l),!e&&T?"["+l+"]":l}).join(e?".":""):u}function p1(c){return Ae.isArray(c)&&!c.some(cu)}const g1=Ae.toFlatObject(Ae,{},null,function(c){return/^is[A-Z]/.test(c)});function nl(c,u,e){if(!Ae.isObject(c))throw new TypeError("target must be an object");u=u||new FormData,e=Ae.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(i,n){return!Ae.isUndefined(n[i])});const l=e.metaTokens,T=e.visitor||g,b=e.dots,w=e.indexes,_=(e.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(u);if(!Ae.isFunction(T))throw new TypeError("visitor must be a function");function p(i){if(i===null)return"";if(Ae.isDate(i))return i.toISOString();if(!_&&Ae.isBlob(i))throw new St("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(i)||Ae.isTypedArray(i)?_&&typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function g(i,n,s){let h=i;if(i&&!s&&typeof i=="object"){if(Ae.endsWith(n,"{}"))n=l?n:n.slice(0,-2),i=JSON.stringify(i);else if(Ae.isArray(i)&&p1(i)||(Ae.isFileList(i)||Ae.endsWith(n,"[]"))&&(h=Ae.toArray(i)))return n=Yp(n),h.forEach(function(m,y){!(Ae.isUndefined(m)||m===null)&&u.append(w===!0?Zd([n],y,b):w===null?n:n+"[]",p(m))}),!1}return cu(i)?!0:(u.append(Zd(s,n,b),p(i)),!1)}const r=[],a=Object.assign(g1,{defaultVisitor:g,convertValue:p,isVisitable:cu});function o(i,n){if(!Ae.isUndefined(i)){if(r.indexOf(i)!==-1)throw Error("Circular reference detected in "+n.join("."));r.push(i),Ae.forEach(i,function(s,h){(!(Ae.isUndefined(s)||s===null)&&T.call(u,s,Ae.isString(h)?h.trim():h,n,a))===!0&&o(s,n?n.concat(h):[h])}),r.pop()}}if(!Ae.isObject(c))throw new TypeError("data must be an object");return o(c),u}function Jd(c){const u={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(c).replace(/[!'()~]|%20|%00/g,function(e){return u[e]})}function Tu(c,u){this._pairs=[],c&&nl(c,this,u)}const Qp=Tu.prototype;Qp.append=function(c,u){this._pairs.push([c,u])};Qp.toString=function(c){const u=c?function(e){return c.call(this,e,Jd)}:Jd;return this._pairs.map(function(e){return u(e[0])+"="+u(e[1])},"").join("&")};function m1(c){return encodeURIComponent(c).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zp(c,u,e){if(!u)return c;const l=e&&e.encode||m1;Ae.isFunction(e)&&(e={serialize:e});const T=e&&e.serialize;let b;if(T?b=T(u,e):b=Ae.isURLSearchParams(u)?u.toString():new Tu(u,e).toString(l),b){const w=c.indexOf("#");w!==-1&&(c=c.slice(0,w)),c+=(c.indexOf("?")===-1?"?":"&")+b}return c}class Xd{constructor(){this.handlers=[]}use(u,e,l){return this.handlers.push({fulfilled:u,rejected:e,synchronous:l?l.synchronous:!1,runWhen:l?l.runWhen:null}),this.handlers.length-1}eject(u){this.handlers[u]&&(this.handlers[u]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(u){Ae.forEach(this.handlers,function(e){e!==null&&u(e)})}}const Jp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},v1=typeof URLSearchParams<"u"?URLSearchParams:Tu,y1=typeof FormData<"u"?FormData:null,w1=typeof Blob<"u"?Blob:null,b1={isBrowser:!0,classes:{URLSearchParams:v1,FormData:y1,Blob:w1},protocols:["http","https","file","blob","url","data"]},Lu=typeof window<"u"&&typeof document<"u",uu=typeof navigator=="object"&&navigator||void 0,x1=Lu&&(!uu||["ReactNative","NativeScript","NS"].indexOf(uu.product)<0),k1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_1=Lu&&window.location.href||"http://localhost",S1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Lu,hasStandardBrowserEnv:x1,hasStandardBrowserWebWorkerEnv:k1,navigator:uu,origin:_1},Symbol.toStringTag,{value:"Module"})),ai={...S1,...b1};function C1(c,u){return nl(c,new ai.classes.URLSearchParams,Object.assign({visitor:function(e,l,T,b){return ai.isNode&&Ae.isBuffer(e)?(this.append(l,e.toString("base64")),!1):b.defaultVisitor.apply(this,arguments)}},u))}function A1(c){return Ae.matchAll(/\w+|\[(\w*)]/g,c).map(u=>u[0]==="[]"?"":u[1]||u[0])}function $1(c){const u={},e=Object.keys(c);let l;const T=e.length;let b;for(l=0;l<T;l++)b=e[l],u[b]=c[b];return u}function Xp(c){function u(e,l,T,b){let w=e[b++];if(w==="__proto__")return!0;const _=Number.isFinite(+w),p=b>=e.length;return w=!w&&Ae.isArray(T)?T.length:w,p?(Ae.hasOwnProp(T,w)?T[w]=[T[w],l]:T[w]=l,!_):((!T[w]||!Ae.isObject(T[w]))&&(T[w]=[]),u(e,l,T[w],b)&&Ae.isArray(T[w])&&(T[w]=$1(T[w])),!_)}if(Ae.isFormData(c)&&Ae.isFunction(c.entries)){const e={};return Ae.forEachEntry(c,(l,T)=>{u(A1(l),T,e,0)}),e}return null}function M1(c,u,e){if(Ae.isString(c))try{return(u||JSON.parse)(c),Ae.trim(c)}catch(l){if(l.name!=="SyntaxError")throw l}return(e||JSON.stringify)(c)}const ea={transitional:Jp,adapter:["xhr","http","fetch"],transformRequest:[function(c,u){const e=u.getContentType()||"",l=e.indexOf("application/json")>-1,T=Ae.isObject(c);if(T&&Ae.isHTMLForm(c)&&(c=new FormData(c)),Ae.isFormData(c))return l?JSON.stringify(Xp(c)):c;if(Ae.isArrayBuffer(c)||Ae.isBuffer(c)||Ae.isStream(c)||Ae.isFile(c)||Ae.isBlob(c)||Ae.isReadableStream(c))return c;if(Ae.isArrayBufferView(c))return c.buffer;if(Ae.isURLSearchParams(c))return u.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),c.toString();let b;if(T){if(e.indexOf("application/x-www-form-urlencoded")>-1)return C1(c,this.formSerializer).toString();if((b=Ae.isFileList(c))||e.indexOf("multipart/form-data")>-1){const w=this.env&&this.env.FormData;return nl(b?{"files[]":c}:c,w&&new w,this.formSerializer)}}return T||l?(u.setContentType("application/json",!1),M1(c)):c}],transformResponse:[function(c){const u=this.transitional||ea.transitional,e=u&&u.forcedJSONParsing,l=this.responseType==="json";if(Ae.isResponse(c)||Ae.isReadableStream(c))return c;if(c&&Ae.isString(c)&&(e&&!this.responseType||l)){const T=!(u&&u.silentJSONParsing)&&l;try{return JSON.parse(c)}catch(b){if(T)throw b.name==="SyntaxError"?St.from(b,St.ERR_BAD_RESPONSE,this,null,this.response):b}}return c}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ai.classes.FormData,Blob:ai.classes.Blob},validateStatus:function(c){return c>=200&&c<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],c=>{ea.headers[c]={}});const T1=Ae.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"]),L1=c=>{const u={};let e,l,T;return c&&c.split(`
1388
- `).forEach(function(b){T=b.indexOf(":"),e=b.substring(0,T).trim().toLowerCase(),l=b.substring(T+1).trim(),!(!e||u[e]&&T1[e])&&(e==="set-cookie"?u[e]?u[e].push(l):u[e]=[l]:u[e]=u[e]?u[e]+", "+l:l)}),u},ef=Symbol("internals");function Hs(c){return c&&String(c).trim().toLowerCase()}function Va(c){return c===!1||c==null?c:Ae.isArray(c)?c.map(Va):String(c)}function E1(c){const u=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let l;for(;l=e.exec(c);)u[l[1]]=l[2];return u}const R1=c=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(c.trim());function vc(c,u,e,l,T){if(Ae.isFunction(l))return l.call(this,u,e);if(T&&(u=e),!!Ae.isString(u)){if(Ae.isString(l))return u.indexOf(l)!==-1;if(Ae.isRegExp(l))return l.test(u)}}function I1(c){return c.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(u,e,l)=>e.toUpperCase()+l)}function O1(c,u){const e=Ae.toCamelCase(" "+u);["get","set","has"].forEach(l=>{Object.defineProperty(c,l+e,{value:function(T,b,w){return this[l].call(this,u,T,b,w)},configurable:!0})})}let Si=class{constructor(c){c&&this.set(c)}set(c,u,e){const l=this;function T(w,_,p){const g=Hs(_);if(!g)throw new Error("header name must be a non-empty string");const r=Ae.findKey(l,g);(!r||l[r]===void 0||p===!0||p===void 0&&l[r]!==!1)&&(l[r||_]=Va(w))}const b=(w,_)=>Ae.forEach(w,(p,g)=>T(p,g,_));if(Ae.isPlainObject(c)||c instanceof this.constructor)b(c,u);else if(Ae.isString(c)&&(c=c.trim())&&!R1(c))b(L1(c),u);else if(Ae.isHeaders(c))for(const[w,_]of c.entries())T(_,w,e);else c!=null&&T(u,c,e);return this}get(c,u){if(c=Hs(c),c){const e=Ae.findKey(this,c);if(e){const l=this[e];if(!u)return l;if(u===!0)return E1(l);if(Ae.isFunction(u))return u.call(this,l,e);if(Ae.isRegExp(u))return u.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(c,u){if(c=Hs(c),c){const e=Ae.findKey(this,c);return!!(e&&this[e]!==void 0&&(!u||vc(this,this[e],e,u)))}return!1}delete(c,u){const e=this;let l=!1;function T(b){if(b=Hs(b),b){const w=Ae.findKey(e,b);w&&(!u||vc(e,e[w],w,u))&&(delete e[w],l=!0)}}return Ae.isArray(c)?c.forEach(T):T(c),l}clear(c){const u=Object.keys(this);let e=u.length,l=!1;for(;e--;){const T=u[e];(!c||vc(this,this[T],T,c,!0))&&(delete this[T],l=!0)}return l}normalize(c){const u=this,e={};return Ae.forEach(this,(l,T)=>{const b=Ae.findKey(e,T);if(b){u[b]=Va(l),delete u[T];return}const w=c?I1(T):String(T).trim();w!==T&&delete u[T],u[w]=Va(l),e[w]=!0}),this}concat(...c){return this.constructor.concat(this,...c)}toJSON(c){const u=Object.create(null);return Ae.forEach(this,(e,l)=>{e!=null&&e!==!1&&(u[l]=c&&Ae.isArray(e)?e.join(", "):e)}),u}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([c,u])=>c+": "+u).join(`
1389
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(c){return c instanceof this?c:new this(c)}static concat(c,...u){const e=new this(c);return u.forEach(l=>e.set(l)),e}static accessor(c){const u=(this[ef]=this[ef]={accessors:{}}).accessors,e=this.prototype;function l(T){const b=Hs(T);u[b]||(O1(e,T),u[b]=!0)}return Ae.isArray(c)?c.forEach(l):l(c),this}};Si.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ae.reduceDescriptors(Si.prototype,({value:c},u)=>{let e=u[0].toUpperCase()+u.slice(1);return{get:()=>c,set(l){this[e]=l}}});Ae.freezeMethods(Si);function yc(c,u){const e=this||ea,l=u||e,T=Si.from(l.headers);let b=l.data;return Ae.forEach(c,function(w){b=w.call(e,b,T.normalize(),u?u.status:void 0)}),T.normalize(),b}function eg(c){return!!(c&&c.__CANCEL__)}function ys(c,u,e){St.call(this,c??"canceled",St.ERR_CANCELED,u,e),this.name="CanceledError"}Ae.inherits(ys,St,{__CANCEL__:!0});function tg(c,u,e){const l=e.config.validateStatus;!e.status||!l||l(e.status)?c(e):u(new St("Request failed with status code "+e.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function N1(c){const u=/^([-+\w]{1,25})(:?\/\/|:)/.exec(c);return u&&u[1]||""}function D1(c,u){c=c||10;const e=new Array(c),l=new Array(c);let T=0,b=0,w;return u=u!==void 0?u:1e3,function(_){const p=Date.now(),g=l[b];w||(w=p),e[T]=_,l[T]=p;let r=b,a=0;for(;r!==T;)a+=e[r++],r=r%c;if(T=(T+1)%c,T===b&&(b=(b+1)%c),p-w<u)return;const o=g&&p-g;return o?Math.round(a*1e3/o):void 0}}function F1(c,u){let e=0,l=1e3/u,T,b;const w=(_,p=Date.now())=>{e=p,T=null,b&&(clearTimeout(b),b=null),c.apply(null,_)};return[(..._)=>{const p=Date.now(),g=p-e;g>=l?w(_,p):(T=_,b||(b=setTimeout(()=>{b=null,w(T)},l-g)))},()=>T&&w(T)]}const Ga=(c,u,e=3)=>{let l=0;const T=D1(50,250);return F1(b=>{const w=b.loaded,_=b.lengthComputable?b.total:void 0,p=w-l,g=T(p),r=w<=_;l=w;const a={loaded:w,total:_,progress:_?w/_:void 0,bytes:p,rate:g||void 0,estimated:g&&_&&r?(_-w)/g:void 0,event:b,lengthComputable:_!=null,[u?"download":"upload"]:!0};c(a)},e)},tf=(c,u)=>{const e=c!=null;return[l=>u[0]({lengthComputable:e,total:c,loaded:l}),u[1]]},nf=c=>(...u)=>Ae.asap(()=>c(...u)),P1=ai.hasStandardBrowserEnv?((c,u)=>e=>(e=new URL(e,ai.origin),c.protocol===e.protocol&&c.host===e.host&&(u||c.port===e.port)))(new URL(ai.origin),ai.navigator&&/(msie|trident)/i.test(ai.navigator.userAgent)):()=>!0,B1=ai.hasStandardBrowserEnv?{write(c,u,e,l,T,b){const w=[c+"="+encodeURIComponent(u)];Ae.isNumber(e)&&w.push("expires="+new Date(e).toGMTString()),Ae.isString(l)&&w.push("path="+l),Ae.isString(T)&&w.push("domain="+T),b===!0&&w.push("secure"),document.cookie=w.join("; ")},read(c){const u=document.cookie.match(new RegExp("(^|;\\s*)("+c+")=([^;]*)"));return u?decodeURIComponent(u[3]):null},remove(c){this.write(c,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function W1(c){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(c)}function H1(c,u){return u?c.replace(/\/?\/$/,"")+"/"+u.replace(/^\/+/,""):c}function ng(c,u,e){let l=!W1(u);return c&&(l||e==!1)?H1(c,u):u}const rf=c=>c instanceof Si?{...c}:c;function Vo(c,u){u=u||{};const e={};function l(g,r,a,o){return Ae.isPlainObject(g)&&Ae.isPlainObject(r)?Ae.merge.call({caseless:o},g,r):Ae.isPlainObject(r)?Ae.merge({},r):Ae.isArray(r)?r.slice():r}function T(g,r,a,o){if(Ae.isUndefined(r)){if(!Ae.isUndefined(g))return l(void 0,g,a,o)}else return l(g,r,a,o)}function b(g,r){if(!Ae.isUndefined(r))return l(void 0,r)}function w(g,r){if(Ae.isUndefined(r)){if(!Ae.isUndefined(g))return l(void 0,g)}else return l(void 0,r)}function _(g,r,a){if(a in u)return l(g,r);if(a in c)return l(void 0,g)}const p={url:b,method:b,data:b,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:_,headers:(g,r,a)=>T(rf(g),rf(r),a,!0)};return Ae.forEach(Object.keys(Object.assign({},c,u)),function(g){const r=p[g]||T,a=r(c[g],u[g],g);Ae.isUndefined(a)&&r!==_||(e[g]=a)}),e}const ig=c=>{const u=Vo({},c);let{data:e,withXSRFToken:l,xsrfHeaderName:T,xsrfCookieName:b,headers:w,auth:_}=u;u.headers=w=Si.from(w),u.url=Zp(ng(u.baseURL,u.url,u.allowAbsoluteUrls),c.params,c.paramsSerializer),_&&w.set("Authorization","Basic "+btoa((_.username||"")+":"+(_.password?unescape(encodeURIComponent(_.password)):"")));let p;if(Ae.isFormData(e)){if(ai.hasStandardBrowserEnv||ai.hasStandardBrowserWebWorkerEnv)w.setContentType(void 0);else if((p=w.getContentType())!==!1){const[g,...r]=p?p.split(";").map(a=>a.trim()).filter(Boolean):[];w.setContentType([g||"multipart/form-data",...r].join("; "))}}if(ai.hasStandardBrowserEnv&&(l&&Ae.isFunction(l)&&(l=l(u)),l||l!==!1&&P1(u.url))){const g=T&&b&&B1.read(b);g&&w.set(T,g)}return u},z1=typeof XMLHttpRequest<"u",U1=z1&&function(c){return new Promise(function(u,e){const l=ig(c);let T=l.data;const b=Si.from(l.headers).normalize();let{responseType:w,onUploadProgress:_,onDownloadProgress:p}=l,g,r,a,o,i;function n(){o&&o(),i&&i(),l.cancelToken&&l.cancelToken.unsubscribe(g),l.signal&&l.signal.removeEventListener("abort",g)}let s=new XMLHttpRequest;s.open(l.method.toUpperCase(),l.url,!0),s.timeout=l.timeout;function h(){if(!s)return;const y=Si.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),R={data:!w||w==="text"||w==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:y,config:c,request:s};tg(function($){u($),n()},function($){e($),n()},R),s=null}"onloadend"in s?s.onloadend=h:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.indexOf("file:")===0)||setTimeout(h)},s.onabort=function(){s&&(e(new St("Request aborted",St.ECONNABORTED,c,s)),s=null)},s.onerror=function(){e(new St("Network Error",St.ERR_NETWORK,c,s)),s=null},s.ontimeout=function(){let y=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const R=l.transitional||Jp;l.timeoutErrorMessage&&(y=l.timeoutErrorMessage),e(new St(y,R.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,c,s)),s=null},T===void 0&&b.setContentType(null),"setRequestHeader"in s&&Ae.forEach(b.toJSON(),function(y,R){s.setRequestHeader(R,y)}),Ae.isUndefined(l.withCredentials)||(s.withCredentials=!!l.withCredentials),w&&w!=="json"&&(s.responseType=l.responseType),p&&([a,i]=Ga(p,!0),s.addEventListener("progress",a)),_&&s.upload&&([r,o]=Ga(_),s.upload.addEventListener("progress",r),s.upload.addEventListener("loadend",o)),(l.cancelToken||l.signal)&&(g=y=>{s&&(e(!y||y.type?new ys(null,c,s):y),s.abort(),s=null)},l.cancelToken&&l.cancelToken.subscribe(g),l.signal&&(l.signal.aborted?g():l.signal.addEventListener("abort",g)));const m=N1(l.url);if(m&&ai.protocols.indexOf(m)===-1){e(new St("Unsupported protocol "+m+":",St.ERR_BAD_REQUEST,c));return}s.send(T||null)})},V1=(c,u)=>{const{length:e}=c=c?c.filter(Boolean):[];if(u||e){let l=new AbortController,T;const b=function(g){if(!T){T=!0,_();const r=g instanceof Error?g:this.reason;l.abort(r instanceof St?r:new ys(r instanceof Error?r.message:r))}};let w=u&&setTimeout(()=>{w=null,b(new St(`timeout ${u} of ms exceeded`,St.ETIMEDOUT))},u);const _=()=>{c&&(w&&clearTimeout(w),w=null,c.forEach(g=>{g.unsubscribe?g.unsubscribe(b):g.removeEventListener("abort",b)}),c=null)};c.forEach(g=>g.addEventListener("abort",b));const{signal:p}=l;return p.unsubscribe=()=>Ae.asap(_),p}},j1=function*(c,u){let e=c.byteLength;if(e<u){yield c;return}let l=0,T;for(;l<e;)T=l+u,yield c.slice(l,T),l=T},K1=async function*(c,u){for await(const e of G1(c))yield*j1(e,u)},G1=async function*(c){if(c[Symbol.asyncIterator]){yield*c;return}const u=c.getReader();try{for(;;){const{done:e,value:l}=await u.read();if(e)break;yield l}}finally{await u.cancel()}},of=(c,u,e,l)=>{const T=K1(c,u);let b=0,w,_=p=>{w||(w=!0,l&&l(p))};return new ReadableStream({async pull(p){try{const{done:g,value:r}=await T.next();if(g){_(),p.close();return}let a=r.byteLength;if(e){let o=b+=a;e(o)}p.enqueue(new Uint8Array(r))}catch(g){throw _(g),g}},cancel(p){return _(p),T.return()}},{highWaterMark:2})},il=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",rg=il&&typeof ReadableStream=="function",q1=il&&(typeof TextEncoder=="function"?(c=>u=>c.encode(u))(new TextEncoder):async c=>new Uint8Array(await new Response(c).arrayBuffer())),og=(c,...u)=>{try{return!!c(...u)}catch{return!1}},Y1=rg&&og(()=>{let c=!1;const u=new Request(ai.origin,{body:new ReadableStream,method:"POST",get duplex(){return c=!0,"half"}}).headers.has("Content-Type");return c&&!u}),sf=64*1024,hu=rg&&og(()=>Ae.isReadableStream(new Response("").body)),qa={stream:hu&&(c=>c.body)};il&&(c=>{["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!qa[u]&&(qa[u]=Ae.isFunction(c[u])?e=>e[u]():(e,l)=>{throw new St(`Response type '${u}' is not supported`,St.ERR_NOT_SUPPORT,l)})})})(new Response);const Q1=async c=>{if(c==null)return 0;if(Ae.isBlob(c))return c.size;if(Ae.isSpecCompliantForm(c))return(await new Request(ai.origin,{method:"POST",body:c}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(c)||Ae.isArrayBuffer(c))return c.byteLength;if(Ae.isURLSearchParams(c)&&(c=c+""),Ae.isString(c))return(await q1(c)).byteLength},Z1=async(c,u)=>Ae.toFiniteNumber(c.getContentLength())??Q1(u),J1=il&&(async c=>{let{url:u,method:e,data:l,signal:T,cancelToken:b,timeout:w,onDownloadProgress:_,onUploadProgress:p,responseType:g,headers:r,withCredentials:a="same-origin",fetchOptions:o}=ig(c);g=g?(g+"").toLowerCase():"text";let i=V1([T,b&&b.toAbortSignal()],w),n;const s=i&&i.unsubscribe&&(()=>{i.unsubscribe()});let h;try{if(p&&Y1&&e!=="get"&&e!=="head"&&(h=await Z1(r,l))!==0){let C=new Request(u,{method:"POST",body:l,duplex:"half"}),v;if(Ae.isFormData(l)&&(v=C.headers.get("content-type"))&&r.setContentType(v),C.body){const[L,I]=tf(h,Ga(nf(p)));l=of(C.body,sf,L,I)}}Ae.isString(a)||(a=a?"include":"omit");const m="credentials"in Request.prototype;n=new Request(u,{...o,signal:i,method:e.toUpperCase(),headers:r.normalize().toJSON(),body:l,duplex:"half",credentials:m?a:void 0});let y=await fetch(n);const R=hu&&(g==="stream"||g==="response");if(hu&&(_||R&&s)){const C={};["status","statusText","headers"].forEach(F=>{C[F]=y[F]});const v=Ae.toFiniteNumber(y.headers.get("content-length")),[L,I]=_&&tf(v,Ga(nf(_),!0))||[];y=new Response(of(y.body,sf,L,()=>{I&&I(),s&&s()}),C)}g=g||"text";let $=await qa[Ae.findKey(qa,g)||"text"](y,c);return!R&&s&&s(),await new Promise((C,v)=>{tg(C,v,{data:$,headers:Si.from(y.headers),status:y.status,statusText:y.statusText,config:c,request:n})})}catch(m){throw s&&s(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new St("Network Error",St.ERR_NETWORK,c,n),{cause:m.cause||m}):St.from(m,m&&m.code,c,n)}}),du={http:f1,xhr:U1,fetch:J1};Ae.forEach(du,(c,u)=>{if(c){try{Object.defineProperty(c,"name",{value:u})}catch{}Object.defineProperty(c,"adapterName",{value:u})}});const af=c=>`- ${c}`,X1=c=>Ae.isFunction(c)||c===null||c===!1,sg={getAdapter:c=>{c=Ae.isArray(c)?c:[c];const{length:u}=c;let e,l;const T={};for(let b=0;b<u;b++){e=c[b];let w;if(l=e,!X1(e)&&(l=du[(w=String(e)).toLowerCase()],l===void 0))throw new St(`Unknown adapter '${w}'`);if(l)break;T[w||"#"+b]=l}if(!l){const b=Object.entries(T).map(([_,p])=>`adapter ${_} `+(p===!1?"is not supported by the environment":"is not available in the build"));let w=u?b.length>1?`since :
1390
- `+b.map(af).join(`
1391
- `):" "+af(b[0]):"as no adapter specified";throw new St("There is no suitable adapter to dispatch the request "+w,"ERR_NOT_SUPPORT")}return l},adapters:du};function wc(c){if(c.cancelToken&&c.cancelToken.throwIfRequested(),c.signal&&c.signal.aborted)throw new ys(null,c)}function lf(c){return wc(c),c.headers=Si.from(c.headers),c.data=yc.call(c,c.transformRequest),["post","put","patch"].indexOf(c.method)!==-1&&c.headers.setContentType("application/x-www-form-urlencoded",!1),sg.getAdapter(c.adapter||ea.adapter)(c).then(function(u){return wc(c),u.data=yc.call(c,c.transformResponse,u),u.headers=Si.from(u.headers),u},function(u){return eg(u)||(wc(c),u&&u.response&&(u.response.data=yc.call(c,c.transformResponse,u.response),u.response.headers=Si.from(u.response.headers))),Promise.reject(u)})}const ag="1.8.4",rl={};["object","boolean","number","function","string","symbol"].forEach((c,u)=>{rl[c]=function(e){return typeof e===c||"a"+(u<1?"n ":" ")+c}});const cf={};rl.transitional=function(c,u,e){function l(T,b){return"[Axios v"+ag+"] Transitional option '"+T+"'"+b+(e?". "+e:"")}return(T,b,w)=>{if(c===!1)throw new St(l(b," has been removed"+(u?" in "+u:"")),St.ERR_DEPRECATED);return u&&!cf[b]&&(cf[b]=!0,console.warn(l(b," has been deprecated since v"+u+" and will be removed in the near future"))),c?c(T,b,w):!0}};rl.spelling=function(c){return(u,e)=>(console.warn(`${e} is likely a misspelling of ${c}`),!0)};function ek(c,u,e){if(typeof c!="object")throw new St("options must be an object",St.ERR_BAD_OPTION_VALUE);const l=Object.keys(c);let T=l.length;for(;T-- >0;){const b=l[T],w=u[b];if(w){const _=c[b],p=_===void 0||w(_,b,c);if(p!==!0)throw new St("option "+b+" must be "+p,St.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new St("Unknown option "+b,St.ERR_BAD_OPTION)}}const ja={assertOptions:ek,validators:rl},Cr=ja.validators;let zo=class{constructor(c){this.defaults=c,this.interceptors={request:new Xd,response:new Xd}}async request(c,u){try{return await this._request(c,u)}catch(e){if(e instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const T=l.stack?l.stack.replace(/^.+\n/,""):"";try{e.stack?T&&!String(e.stack).endsWith(T.replace(/^.+\n.+\n/,""))&&(e.stack+=`
1392
- `+T):e.stack=T}catch{}}throw e}}_request(c,u){typeof c=="string"?(u=u||{},u.url=c):u=c||{},u=Vo(this.defaults,u);const{transitional:e,paramsSerializer:l,headers:T}=u;e!==void 0&&ja.assertOptions(e,{silentJSONParsing:Cr.transitional(Cr.boolean),forcedJSONParsing:Cr.transitional(Cr.boolean),clarifyTimeoutError:Cr.transitional(Cr.boolean)},!1),l!=null&&(Ae.isFunction(l)?u.paramsSerializer={serialize:l}:ja.assertOptions(l,{encode:Cr.function,serialize:Cr.function},!0)),u.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?u.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:u.allowAbsoluteUrls=!0),ja.assertOptions(u,{baseUrl:Cr.spelling("baseURL"),withXsrfToken:Cr.spelling("withXSRFToken")},!0),u.method=(u.method||this.defaults.method||"get").toLowerCase();let b=T&&Ae.merge(T.common,T[u.method]);T&&Ae.forEach(["delete","get","head","post","put","patch","common"],i=>{delete T[i]}),u.headers=Si.concat(b,T);const w=[];let _=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(u)===!1||(_=_&&i.synchronous,w.unshift(i.fulfilled,i.rejected))});const p=[];this.interceptors.response.forEach(function(i){p.push(i.fulfilled,i.rejected)});let g,r=0,a;if(!_){const i=[lf.bind(this),void 0];for(i.unshift.apply(i,w),i.push.apply(i,p),a=i.length,g=Promise.resolve(u);r<a;)g=g.then(i[r++],i[r++]);return g}a=w.length;let o=u;for(r=0;r<a;){const i=w[r++],n=w[r++];try{o=i(o)}catch(s){n.call(this,s);break}}try{g=lf.call(this,o)}catch(i){return Promise.reject(i)}for(r=0,a=p.length;r<a;)g=g.then(p[r++],p[r++]);return g}getUri(c){c=Vo(this.defaults,c);const u=ng(c.baseURL,c.url,c.allowAbsoluteUrls);return Zp(u,c.params,c.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(c){zo.prototype[c]=function(u,e){return this.request(Vo(e||{},{method:c,url:u,data:(e||{}).data}))}});Ae.forEach(["post","put","patch"],function(c){function u(e){return function(l,T,b){return this.request(Vo(b||{},{method:c,headers:e?{"Content-Type":"multipart/form-data"}:{},url:l,data:T}))}}zo.prototype[c]=u(),zo.prototype[c+"Form"]=u(!0)});let tk=class lg{constructor(u){if(typeof u!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(T){e=T});const l=this;this.promise.then(T=>{if(!l._listeners)return;let b=l._listeners.length;for(;b-- >0;)l._listeners[b](T);l._listeners=null}),this.promise.then=T=>{let b;const w=new Promise(_=>{l.subscribe(_),b=_}).then(T);return w.cancel=function(){l.unsubscribe(b)},w},u(function(T,b,w){l.reason||(l.reason=new ys(T,b,w),e(l.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(u){if(this.reason){u(this.reason);return}this._listeners?this._listeners.push(u):this._listeners=[u]}unsubscribe(u){if(!this._listeners)return;const e=this._listeners.indexOf(u);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const u=new AbortController,e=l=>{u.abort(l)};return this.subscribe(e),u.signal.unsubscribe=()=>this.unsubscribe(e),u.signal}static source(){let u;return{token:new lg(function(e){u=e}),cancel:u}}};function nk(c){return function(u){return c.apply(null,u)}}function ik(c){return Ae.isObject(c)&&c.isAxiosError===!0}const fu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fu).forEach(([c,u])=>{fu[u]=c});function cg(c){const u=new zo(c),e=Wp(zo.prototype.request,u);return Ae.extend(e,zo.prototype,u,{allOwnKeys:!0}),Ae.extend(e,u,null,{allOwnKeys:!0}),e.create=function(l){return cg(Vo(c,l))},e}const Rn=cg(ea);Rn.Axios=zo;Rn.CanceledError=ys;Rn.CancelToken=tk;Rn.isCancel=eg;Rn.VERSION=ag;Rn.toFormData=nl;Rn.AxiosError=St;Rn.Cancel=Rn.CanceledError;Rn.all=function(c){return Promise.all(c)};Rn.spread=nk;Rn.isAxiosError=ik;Rn.mergeConfig=Vo;Rn.AxiosHeaders=Si;Rn.formToJSON=c=>Xp(Ae.isHTMLForm(c)?new FormData(c):c);Rn.getAdapter=sg.getAdapter;Rn.HttpStatusCode=fu;Rn.default=Rn;const{Axios:hA,AxiosError:dA,CanceledError:fA,isCancel:pA,CancelToken:gA,VERSION:mA,all:vA,Cancel:yA,isAxiosError:wA,spread:bA,toFormData:xA,AxiosHeaders:kA,HttpStatusCode:_A,formToJSON:SA,getAdapter:CA,mergeConfig:AA}=Rn,Eu=Rn.create({baseURL:location.origin,timeout:6e4,params:{}});Eu.interceptors.response.use(c=>c,c=>{var u,e,l,T,b,w,_,p,g,r,a;if(c.response){if(c.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(n){n&&OpenC3Auth.setTokens()}),c.response.config.headers["Ignore-Errors"]&&c.response.config.headers["Ignore-Errors"].includes(c.response.status.toString()))return Promise.reject(c);let o=`HTTP ${c.response.status} - `;(u=c.response)!=null&&u.statusText&&(o+=`${c.response.statusText} `),(l=(e=c.response)==null?void 0:e.config)!=null&&l.data&&(o+=`${c.response.config.data} `),(b=(T=c.response)==null?void 0:T.data)!=null&&b.message?o+=`${c.response.data.message}`:(_=(w=c.response)==null?void 0:w.data)!=null&&_.exception?o+=`${c.response.data.exception}`:(r=(g=(p=c.response)==null?void 0:p.data)==null?void 0:g.error)!=null&&r.message?(c.response.data.error.class&&(o+=`${c.response.data.error.class} `),o+=`${c.response.data.error.message}`):o+=`${(a=c.response)==null?void 0:a.data}`;const{$cosmosNotify:i}=window;throw i&&i.serious({title:"Network error",body:o}),c}else throw c});const Fa=async function(c,u,{data:e,params:l={},headers:T,noAuth:b=!1,noScope:w=!1,onUploadProgress:_=!1}={}){if(!b){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}T.Authorization=localStorage.openc3Token}return T.manual=!0,!w&&!l.scope&&(l.scope=window.openc3Scope),Eu({method:c,url:u,data:e,params:l,headers:T,onUploadProgress:_})},pu={Accept:"application/json"},uf={...pu,"Content-Type":"application/json"},rk={get:function(c,{params:u,headers:e=pu,noScope:l,noAuth:T,onUploadProgress:b}={}){return Fa("get",c,{params:u,headers:e,noScope:l,noAuth:T,onUploadProgress:b})},put:function(c,{data:u,params:e,headers:l=uf,noScope:T,noAuth:b,onUploadProgress:w}={}){return Fa("put",c,{data:u,params:e,headers:l,noScope:T,noAuth:b,onUploadProgress:w})},post:function(c,{data:u,params:e,headers:l=uf,noScope:T,noAuth:b,onUploadProgress:w}={}){return Fa("post",c,{data:u,params:e,headers:l,noScope:T,noAuth:b,onUploadProgress:w})},delete:function(c,{params:u,headers:e=pu,noScope:l,noAuth:T,onUploadProgress:b}={}){return Fa("delete",c,{params:u,headers:e,noScope:l,noAuth:T,onUploadProgress:b})}};let ol=()=>({emit(c,...u){for(let e=this.events[c]||[],l=0,T=e.length;l<T;l++)e[l](...u)},events:{},on(c,u){var e;return((e=this.events)[c]||(e[c]=[])).push(u),()=>{var l;this.events[c]=(l=this.events[c])==null?void 0:l.filter(T=>u!==T)}}});class ta extends Error{constructor(u,e){u instanceof Error?(super(u.message),this.cause=u):super(u),this.reason=e,this.name="ReasonError"}}class Ru extends ta{constructor(u){super("Rejected",u),this.name="SubscriptionRejectedError"}}class ok extends ta{constructor(u){super(u||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class dr extends ta{constructor(u,e){e?super(u,e):super("Disconnected",u),this.name="DisconnectedError"}}class sk extends dr{constructor(u){super(u,"stale_connection"),this.name="StaleConnectionError"}}function ug(c){return c?`{${Object.keys(c).sort().filter(u=>c[u]!==void 0).map(u=>{let e=JSON.stringify(c[u]);return`${JSON.stringify(u)}:${e}`}).join(",")}}`:""}class ak{constructor(u){this.channel=u,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",u=>{if(u.type==="info"){this._state||(this._state=this.stateFromInfo(u));return}this._state&&(u.type==="join"?this._state[u.id]=u.info:u.type==="leave"&&delete this._state[u.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(u=>u()),this.listeners.length=0}async join(u,e){if(!this._info)return this._info={id:u,info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let u=await this.channel.perform("$presence:leave");return delete this._info,u}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let u=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(u),this._state}finally{delete this._promise}}stateFromInfo(u){return u.records.reduce((e,{id:l,info:T})=>(e[l]=T,e),{})}}const Do=Symbol("state");class hg{constructor(u={}){this.emitter=ol(),this.params=Object.freeze(u),this.presence=new ak(this),this.initialConnect=!0,this[Do]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=ug({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Do]}attached(u){if(this.receiver){if(this.receiver!==u)throw Error("Already connected to a different receiver");return!1}return this.receiver=u,!0}connecting(){this[Do]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Do]="connected";let u=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:u})):this.emit("connect",{reconnect:!0,restored:u})}restored(){if(this.state==="connected")throw Error("Already connected");this[Do]="connected";let u=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:u})}disconnected(u){this.state==="disconnected"||this.state==="closed"||(this[Do]="disconnected",this.presence.reset(),this.emit("disconnect",u))}closed(u){this.state!=="closed"&&(this[Do]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",u))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(u,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,u,e)}async send(u){return this.perform(void 0,u)}async whisper(u){try{await this.perform("$whisper",u)}catch(e){let l=this.receiver?this.receiver.logger:null;l&&l.warn("whisper failed: ",e)}}receive(u,e){this.emit("message",u,e)}on(u,e){return this.emitter.on(u,e)}once(u,e){let l=this.emitter.on(u,(...T)=>{l(),e(...T)});return l}emit(u,...e){return this.emitter.emit(u,...e)}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((u,e)=>{let l=[()=>delete this._pendingSubscribe];l.push(this.on("connect",()=>{l.forEach(T=>T()),u()})),l.push(this.on("close",T=>{l.forEach(b=>b()),e(T||new ta("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class lk{constructor(u){this.id=u,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(u){this.channels.includes(u)||this.channels.push(u)}remove(u){let e=this.channels.indexOf(u);e>-1&&this.channels.splice(e,1)}notify(u,...e){this.state=u==="restored"?"connected":u,e.length===1?this.channels.forEach(l=>l[u](e[0])):this.channels.forEach(l=>l[u]())}pending(u){this._checkIntent(u);let e=this._pendings[0];return!e||e.intent!==u?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(u){this._checkIntent(u);let e,l={promise:new Promise(b=>{e=b}),intent:u,release:()=>{this._pendings.splice(this._pendings.indexOf(l),1),e(l)},canceled:!1,acquired:!1},T=this._pendingTop;return this._pendings.push(l),T&&await T.promise,this.gvl&&await this.gvl.acquire(l,u),l.acquired=!0,l}close(u){this.disposed=!0,this.intent=void 0,this.notify("closed",u)}_checkIntent(u){if(!(u==="unsubscribed"||u==="subscribed"))throw Error(`Unknown subscription intent: ${u}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(u){let e=this._pendingTop;return!e||e.acquired||e.intent!==u?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class ck{constructor(){this.queue=[]}async acquire(u,e){e==="subscribed"&&(this.queue.push(u.promise.then(()=>{this.queue.splice(this.queue.indexOf(u),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class uk{constructor(u){u.concurrentSubscribes===!1&&(this.glv=new ck),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(u){return this._subscriptions[u]}create(u,{subscribe:e,unsubscribe:l}){let T=this._subscriptions[u]=new lk(u);return T.remoteId=this._localToRemote[u],T.subscriber=e,T.unsubscriber=l,T.gvl=this.glv,T}remove(u){delete this._subscriptions[u],delete this._localToRemote[u]}storeRemoteId(u,e){this._localToRemote[u]=e;let l=this.get(u);l&&(l.remoteId=e)}}class hk{constructor(u={}){this.subscriptions=new uk(u),this._pendingMessages=[],this._remoteToLocal={}}subscribe(u,e){this._remoteToLocal[e]=u,this.subscriptions.storeRemoteId(u,e),this.flush(e)}unsubscribe(u){let e=this.subscriptions.get(u);if(!e)return;let l=e.remoteId;l&&delete this._remoteToLocal[l],this.subscriptions.remove(u)}transmit(u,e,l){let T=this._remoteToLocal[u];if(!T){this._pendingMessages.push([u,e,l]);return}let b=this.subscriptions.get(T);b&&b.channels.forEach(w=>{w.receive(e,l)})}notify(u,e,l){let T=this._remoteToLocal[u];if(!T)return;let b=this.subscriptions.get(T);b&&b.channels.forEach(w=>w.emit(e,l))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(u=>u.channels)}flush(u){let e=[];for(let l of this._pendingMessages)l[0]===u?this.transmit(l[0],l[1],l[2]):e.push(l);this._pendingMessages=e}}const hf={debug:0,info:1,warn:2,error:3};class dg{constructor(u){this.level=u||"warn"}log(u,e,l){hf[u]<hf[this.level]||this.writeLogEntry(u,e,l)}writeLogEntry(){throw Error("Not implemented")}debug(u,e){this.log("debug",u,e)}info(u,e){this.log("info",u,e)}warn(u,e){this.log("warn",u,e)}error(u,e){this.log("error",u,e)}}class na extends dg{writeLogEntry(){}}class dk{encode(u){return JSON.stringify(u)}decode(u){try{return JSON.parse(u)}catch{}}}let fk=0;class fg{constructor(u={}){let{logger:e}=u;this.logger=e||new na,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=u.subscribeCooldownInterval||250,this.subscribeRetryInterval=u.subscribeRetryInterval||5e3}attached(u){this.cable=u}subscribe(u,e){let l={channel:u};e&&Object.assign(l,e);let T=ug(l);if(this.pendingUnsubscriptions[T]){let w=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${w}`,T),new Promise(_=>{setTimeout(()=>{_(this.subscribe(u,e))},w)})}if(this.pendingSubscriptions[T])return this.logger.warn("subscription is already pending, skipping",T),Promise.reject(Error("Already subscribing"));let b=this.subscribeRetryInterval;return new Promise((w,_)=>{let p=++fk;this.pendingSubscriptions[T]={resolve:w,reject:_,id:p},this.cable.send(this.buildSubscribeRequest(T)),this.maybeRetrySubscribe(p,T,b)})}buildSubscribeRequest(u){return{command:"subscribe",identifier:u}}maybeRetrySubscribe(u,e,l){setTimeout(()=>{let T=this.pendingSubscriptions[e];T&&T.id===u&&(this.logger.warn(`no subscription ack received in ${l}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(u,e,l))},l)}maybeExpireSubscribe(u,e,l){setTimeout(()=>{let T=this.pendingSubscriptions[e];T&&T.id===u&&(delete this.pendingSubscriptions[e],T.reject(new ok(`Haven't received subscription ack in ${l*2}ms for ${e}`)))},l)}unsubscribe(u){return this.cable.send({command:"unsubscribe",identifier:u}),this.pendingUnsubscriptions[u]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[u]},this.subscribeCooldownInterval),Promise.resolve()}perform(u,e,l){return e==="$whisper"?this.whisper(u,l):(l||(l={}),l.action=e,this.cable.send({command:"message",identifier:u,data:JSON.stringify(l)}),Promise.resolve())}whisper(u,e){return this.cable.send({command:"whisper",identifier:u,data:e}),Promise.resolve()}receive(u){if(typeof u!="object"){this.logger.error("unsupported message format",{message:u});return}let{type:e,identifier:l,message:T,reason:b,reconnect:w}=u;if(e==="ping")return this.cable.keepalive(u.message);if(this.cable.keepalive(),e==="welcome"){let _=u.sid;return _&&this.cable.setSessionId(_),this.cable.connected()}if(e==="disconnect"){let _=new dr(b);this.reset(_),w===!1?this.cable.closed(_):this.cable.disconnected(_);return}if(e==="confirm_subscription"){let _=this.pendingSubscriptions[l];if(!_){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:l}),this.unsubscribe(l);return}return delete this.pendingSubscriptions[l],_.resolve(l)}if(e==="reject_subscription"){let _=this.pendingSubscriptions[l];return _?(delete this.pendingSubscriptions[l],_.reject(new Ru)):this.logger.error("subscription not found",{type:e,identifier:l})}if(T)return{identifier:l,message:T};this.logger.warn(`unknown message type: ${e}`,{message:u})}reset(u){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(u);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const df=()=>Date.now()/1e3|0;class pk extends fg{constructor(u={}){super(u),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=u.historyTimestamp,this.restoreSince===void 0&&(this.restoreSince=df()),this.sessionId=void 0,this.sendPongs=u.pongs}reset(u){for(let e in this.pendingPresence)this.pendingPresence[e].reject(u);return this.pendingPresence={},super.reset()}receive(u){if(typeof u!="object"){this.logger.error("unsupported message format",{message:u});return}let{type:e,identifier:l,message:T}=u;if(e==="disconnect"||e==="reject_subscription")return super.receive(u);if(e==="confirm_subscription")return this.subscriptionStreams[l]||(this.subscriptionStreams[l]=new Set),super.receive(u);if(e==="ping")return this.restoreSince&&(this.restoreSince=df()),this.sendPongs&&this.sendPong(),this.cable.keepalive(u.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",u),this.cable.notify("history_received",l);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",u),this.cable.notify("history_not_found",l);return}if(e==="welcome"){if(this.sessionId=u.sid,this.sessionId&&this.cable.setSessionId(this.sessionId),u.restored){let b=u.restored_ids||Object.keys(this.subscriptionStreams);for(let w of b)this.cable.send({identifier:w,command:"history",history:this.historyRequestFor(w)}),this.presenceInfo[w]&&this.cable.send({identifier:w,command:"join",presence:this.presenceInfo[w]});return this.cable.restored(b)}return this.cable.connected(this.sessionId)}if(e==="presence"){let b=T.type;if(b==="info"){let w=this.pendingPresence[l];w&&(delete this.pendingPresence[l],w.resolve(T))}else if(b==="error"){let w=this.pendingPresence[l];w&&(delete this.pendingPresence[l],w.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:l,message:T}}if(T){let b=this.trackStreamPosition(l,u.stream_id,u.epoch,u.offset);return{identifier:l,message:T,meta:b}}this.logger.warn(`unknown message type: ${e}`,{message:u})}perform(u,e,l){switch(e){case"$presence:join":return this.join(u,l);case"$presence:leave":return this.leave(u,l);case"$presence:info":return this.presence(u,l)}return super.perform(u,e,l)}unsubscribe(u){return delete this.presenceInfo[u],super.unsubscribe(u)}buildSubscribeRequest(u){let e=super.buildSubscribeRequest(u),l=this.historyRequestFor(u);l&&(e.history=l,this.pendingHistory[u]=!0);let T=this.presenceInfo[u];return T&&(e.presence=T),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(u){let e={},l=!1;if(this.subscriptionStreams[u])for(let T of this.subscriptionStreams[u]){let b=this.streamsPositions[T];b&&(l=!0,e[T]=b)}if(!(!l&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(u,e,l,T){if(!(!e||!l))return this.subscriptionStreams[u]||(this.subscriptionStreams[u]=new Set),this.subscriptionStreams[u].add(e),this.streamsPositions[e]={epoch:l,offset:T},{stream:e,epoch:l,offset:T}}async sendPong(){await new Promise(u=>setTimeout(u,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(u,e){return this.presenceInfo[u]=e,this.cable.send({command:"join",identifier:u,presence:e}),Promise.resolve()}async leave(u,e){return delete this.presenceInfo[u],this.cable.send({command:"leave",identifier:u,presence:e}),Promise.resolve()}presence(u,e){return this.pendingPresence[u]?(this.logger.warn("presence is already pending, skipping",u),Promise.reject(Error("presence request is already pending"))):new Promise((l,T)=>{this.pendingPresence[u]={resolve:l,reject:T},this.cable.send({command:"presence",identifier:u,data:e})})}}class gk extends ta{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Iu extends hg{constructor(u,e){super(e),this.channelId=u}set channelId(u){this._channelId=u}get channelId(){return this._channelId}}$r(Iu,"identifier","__ghost__");const mk="$pubsub";class gu extends hg{async perform(u,e){if(u.startsWith("$"))return super.perform(u,e);throw Error("not implemented")}}$r(gu,"identifier",mk);const Fo=Symbol("state");let vk=class{constructor({transport:c,protocol:u,encoder:e,logger:l,lazy:T,hubOptions:b,performFailures:w,transportConfigurator:_}){this.emitter=ol(),this.transport=c,this.encoder=e,this.logger=l||new na,this.protocol=u,this.performFailures=w||"throw",this.protocol.attached(this),this.hub=new hk(b||{}),this[Fo]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=_,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,T===!1&&this.connect().catch(()=>{})}get state(){return this[Fo]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let c=this.state==="idle";this[Fo]="connecting";let u=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:c}),await this.transport.open()}catch(e){this.handleClose(e)}return u}setSessionId(c){this.sessionId=c,this.transport.setParam("sid",c)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Fo]="connected",this.recovering&&this.hub.subscriptions.all().forEach(u=>u.notify("disconnected",new dr("recovery_failed"))),this.hub.subscriptions.all().forEach(u=>this._resubscribe(u));let c=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:c})):this.emit("connect",{reconnect:!0,restored:c})}restored(c){this.logger.info("connection recovered",{remoteIds:c}),this[Fo]="connected",this.hub.subscriptions.all().forEach(l=>{c&&l.remoteId&&c.includes(l.remoteId)?l.notify("restored"):(l.notify("disconnected",new dr("recovery_failed")),this._resubscribe(l))});let u=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:u,restored:e})}notify(c,u,e){u&&typeof u!="string"&&(e=u,u=void 0),u?this.hub.notify(u,"info",{type:c,data:e}):this.emit("info",{type:c,data:e})}handleClose(c){this.logger.debug("transport closed",{error:c}),this.disconnected(new dr(c,"transport_closed"))}disconnected(c){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:c}),this[Fo]="disconnected",this.recovering=this.protocol.recoverableClosure(c),this.recovering?this.hub.subscriptions.all().forEach(u=>u.notify("connecting")):this.hub.subscriptions.all().forEach(u=>{u.notify("disconnected",c)}),this.protocol.reset(c),this.hub.close(),this.transport.close(),this.emit("disconnect",c))}closed(c){if(this.state==="closed"||this.state==="idle")return;let u;c&&(u=c instanceof dr?c:new dr(c,void 0)),this.logger.info("closed",{reason:c||"user"}),this[Fo]="closed";let e=u||new dr("cable_closed");this.hub.subscriptions.all().forEach(l=>l.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",u)}disconnect(){this.closed()}handleIncoming(c){if(this.state==="closed"||this.state==="idle")return;let u=this.encoder.decode(c);if(u===void 0){this.logger.error("failed to decode message",{message:c});return}this.logger.debug("incoming data",u);let e=this.protocol.receive(u);if(e){this.logger.debug("processed incoming message",e);let{type:l,identifier:T,message:b,meta:w}=e;l?this.hub.notify(T,l,b):this.hub.transmit(T,b,w)}}send(c){if(this.state==="closed")throw Error("Cable is closed");let u=this.encoder.encode(c);if(u===void 0){this.logger.error("failed to encode message",{message:c});return}this.logger.debug("outgoing message",c),this.transport.send(u)}keepalive(c){this.emit("keepalive",c)}streamFrom(c){let u=new gu({stream_name:c});return this.subscribe(u)}streamFromSigned(c){let u=new gu({signed_stream_name:c});return this.subscribe(u)}subscribeTo(c,u){let e,l;return typeof c=="string"&&(l=c,c=Iu),e=l?new c(l,u):new c(u),this.subscribe(e)}subscribe(c){if(!c.attached(this))return c;let u=c.identifier;c.connecting();let e=this.hub.subscriptions.get(u)||this.hub.subscriptions.create(u,{subscribe:l=>this._subscribe(l,c.channelId,c.params),unsubscribe:l=>this._unsubscribe(l)});return e.add(c),e.intent==="subscribed"&&e.state==="connected"&&c.connected(),e.ensureSubscribed(),c}async _resubscribe(c){c.intent!=="subscribed"||!c.channels[0]||(c.notify("connecting"),c.ensureResubscribed())}async _subscribe(c,u,e){let l=c.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:l});return}this.logger.debug("acquiring subscribe lock",{identifier:l});let T=await c.acquire("subscribed");if(T.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:l}),T.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:l}),c.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),T.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:l}),T.release();return}if(c.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:l}),c.notify("connected"),T.release();return}let b={identifier:u,params:e};this.logger.debug("subscribing",b);try{let w=await this.protocol.subscribe(u,e);this.hub.subscribe(l,w),this.logger.debug("subscribed",{...b,remoteId:w}),c.notify("connected")}catch(w){if(w){if(w instanceof Ru&&this.logger.warn("rejected",b),w instanceof dr){this.logger.debug("disconnected during subscription; will retry on connect",b),T.release();return}this.logger.error("failed to subscribe",{error:w,...b})}c.close(w),this.hub.unsubscribe(l)}T.release()}unsubscribe(c){let u=c.identifier,e=this.hub.subscriptions.get(u);if(!e)throw Error(`Subscription not found: ${u}`);e.remove(c),c.closed(),e.maybeUnsubscribe()}async _unsubscribe(c){let u=c.id;this.logger.debug("acquiring unsubscribe lock",{identifier:u});let e=await c.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:u}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:u}),c.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:u,intent:c.intent}),e.release();return}if(c.state==="disconnected"||c.state==="closed"){this.logger.debug(`already ${c.state} connected, skip unsubscribe command`,{identifier:u}),e.release();return}let l=c.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:l}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:u}),c.close(),this.hub.unsubscribe(u),e.release();return}try{await this.protocol.unsubscribe(l),this.logger.debug("unsubscribed remotely",{id:u})}catch(T){T&&(T instanceof dr?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:u,error:T}):this.logger.error("unsubscribe failed",{id:u,error:T}))}c.intent==="unsubscribed"?(c.close(),this.hub.unsubscribe(u)):c.state="closed",e.release()}async perform(c,u,e){if(this.performFailures==="throw")return this._perform(c,u,e);try{return await this._perform(c,u,e)}catch(l){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:l});return}}async _perform(c,u,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new gk;let l=this.hub.subscriptions.get(c);if(!l)throw Error(`Subscription not found: ${c}`);if(await l.pending("subscribed"),l.intent!=="subscribed")throw Error(`Subscription is closed: ${c}`);let T=l.remoteId,b={id:T,action:u,payload:e};this.logger.debug("perform",b);try{let w=await this.protocol.perform(T,u,e);return w&&this.logger.debug("perform result",{message:w,request:b}),w}catch(w){throw this.logger.error("perform failed",{error:w,request:b}),w}}on(c,u){return this.emitter.on(c,u)}once(c,u){let e=this.emitter.on(c,(...l)=>{e(),u(...l)});return e}emit(c,...u){return this.emitter.emit(c,...u)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((c,u)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(l=>l()),c()})),e.push(this.on("close",l=>{e.forEach(T=>T()),u(l)})),e.push(this.on("disconnect",l=>{e.forEach(T=>T()),u(l)}))}),this._pendingConnect)}};const yk={maxMissingPings:2,maxReconnectAttempts:1/0},cs=()=>Date.now(),pg=(c,u)=>{u=u||{};let{backoffRate:e,jitterRatio:l,maxInterval:T}=u;return e=e||2,l===void 0&&(l=.5),b=>{let w=c*e**b,_=w*e,p=w+(_-w)*Math.random(),g=2*(Math.random()-.5)*l;return p=p*(1+g),T&&T<p&&(p=T),p}};let gg=class{constructor({pingInterval:c,...u}){if(this.pingInterval=c,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${c}`);if(u=Object.assign({},yk,u),this.strategy=u.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=u.maxMissingPings,this.maxReconnectAttempts=u.maxReconnectAttempts,this.logger=u.logger||new na,this.state="pending_connect",this.attempts=0,this.disconnectedAt=cs()}watch(c){this.target=c,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(c=>{this.logger.info("Failed at reconnecting: "+c)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=cs(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=cs(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=cs(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=cs()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(c=>c()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let c=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},c)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let c=cs()-this.pingedAt;c>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${c}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new sk))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let c=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${c}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),c)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class wk{constructor(u,e={}){this.transports=u,this.transport=null,this.emitter=ol(),this.unbind=[],this.logger=e.logger||new na}displayName(){return"fallbacked transport"}async open(){for(let u=0;u<this.transports.length;u++){let e=this.transports[u];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(l){this.logger.debug(`Failed to connect via ${e.displayName()}: ${l.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(u){if(!this.transport)throw new Error("No transport is open");this.transport.send(u)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(u,e){this.transports.forEach(l=>{l.setParam(u,e)})}setToken(u,e){this.transports.forEach(l=>{l.setToken(u,e)})}on(u,e){return this.emitter.on(u,e)}once(u,e){let l=this.emitter.on(u,(...T)=>{l(),e(...T)});return l}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(u=>u()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",u=>{this.emitter.emit("data",u)}),this.transport.on("close",u=>{this.emitter.emit("close",u)}),this.transport.on("error",u=>{this.emitter.emit("error",u)}))}}class bk{constructor(u,e={}){this.url=u;let l=e.websocketImplementation;if(l)this.Impl=l;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=ol();let{format:T,subprotocol:b,authStrategy:w}=e;this.format=T||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=w||"param",this.authProtocol="",this.subprotocol=b}displayName(){return"WebSocket("+this.url+")"}open(){let u=this.subprotocol;return this.authStrategy==="sub-protocol"&&(u=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,u,this.connectionOptions):this.ws=new this.Impl(this.url,u),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,l)=>{let T=[];T.push(this.once("open",()=>{T.forEach(b=>b()),e()})),T.push(this.once("close",()=>{T.forEach(b=>b()),l(Error("WS connection closed"))}))})}setURL(u){this.url=u}setParam(u,e){let l=new URL(this.url);l.searchParams.set(u,e);let T=`${l.protocol}//${l.host}${l.pathname}?${l.searchParams}`;this.setURL(T)}setToken(u,e="jid"){if(this.authStrategy==="param")this.setParam(e,u);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let l=`x-${e}`.toLowerCase();l=Object.keys(this.connectionOptions.headers).find(T=>T.toLowerCase()===l)||l,this.connectionOptions.headers[l]=u}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${u}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(u){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(u)}close(){this.ws?this.onclose():this.connected=!1}on(u,e){return this.emitter.on(u,e)}once(u,e){let l=this.emitter.on(u,(...T)=>{l(),e(...T)});return l}initListeners(){this.ws.onerror=u=>{this.connected&&this.emitter.emit("error",u.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=u=>{let e=u.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const mg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function xk(c,u){if(typeof c=="object"&&typeof u>"u"&&(u=c,c=void 0),u=u||{},!c&&!u.transport)throw Error("URL or transport must be specified");u=Object.assign({},mg,u);let{protocol:e,websocketImplementation:l,websocketFormat:T,websocketOptions:b,websocketAuthStrategy:w,fallbacks:_,logLevel:p,logger:g,transport:r,encoder:a,lazy:o,monitor:i,pingInterval:n,reconnectStrategy:s,maxMissingPings:h,maxReconnectAttempts:m,subprotocol:y,tokenRefresher:R,historyTimestamp:$,protocolOptions:C,concurrentSubscribes:v,performFailures:L,transportConfigurator:I,auth:F}=u;if(g=g||new na(p),typeof e=="string"){y=y||e;let P=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(C=C||{},P==="actioncable-v1")e=new fg({logger:g,...C});else if(P==="actioncable-v1-ext")e=new pk({logger:g,historyTimestamp:$,...C});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")a=a||new dk,T=T||"text";else if(O==="msgpack"){if(T="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(T=T||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");r=r||new bk(c,{websocketImplementation:l,websocketOptions:b,subprotocol:y,authStrategy:w,format:T}),_&&(r=new wk([r,..._],{logger:g})),F&&F.token&&r.setToken(F.token,F.param||"jid"),s=s||pg(n),i!==!1&&(i=i||new gg({pingInterval:n,reconnectStrategy:s,maxMissingPings:h,maxReconnectAttempts:m,logger:g}));let E={concurrentSubscribes:v},U=new vk({protocol:e,transport:r,encoder:a,logger:g,lazy:o,hubOptions:E,performFailures:L,transportConfigurator:I});return i&&(i.watch(U),U.monitor=i),R&&kk(U,async()=>{try{await R(r)}catch(P){return g.error("Failed to refresh authentication token: "+P),!1}return U.connect().catch(()=>{}),!0}),U}function kk(c,u){let e=!1;c.on("connect",()=>e=!1),c.on("close",async l=>{if(l){if(e){c.logger.warn("Token auto-refresh is disabled",l);return}l.reason==="token_expired"&&(e=!0,await u())}})}class _k{constructor(u){this.channel=u}notify(u,...e){typeof this[u]=="function"&&this[u](...e)}perform(u,e={}){this.channel.perform(u,e)}send(u){this.channel.send(u)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Sk extends Iu{constructor(u,e,l){super(u,e),this.subscription=new _k(this),Object.assign(this.subscription,l),this.on("connect",({reconnect:T})=>this.subscription.notify("connected",{reconnected:T})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",T=>this.subscription.notify("received",T)),this.on("close",T=>{T&&T instanceof Ru?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Ck{constructor(u){this.cable=u}create(u,e){let l,T;typeof u=="object"?(l=u.channel,delete u.channel,T=u):(l=u,T={});let b=new Sk(l,T,e);return b.subscription.notify("initialized"),this.cable.subscribe(b),b.subscription}findAll(u){return this.cable.hub.channels.filter(e=>e.identifier===u).map(e=>e.subscription)}}class Ak{constructor(u){this.cable=u,this.subscriptions=new Ck(u)}}class $k extends dg{writeLogEntry(u,e,l){l?console[u](e,l):console[u](e)}}class Mk extends gg{watch(u){super.watch(u),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let u=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=T=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:T})},l=()=>this.disconnect(new dr("page_frozen"));document.addEventListener("visibilitychange",u,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",l,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",u,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",l,!1)})}}disconnect(u){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:u.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(u))}}const Tk=["cable","action-cable"],Lk="/cable",sl=(c,u)=>{for(let e of Tk){let l=c.head.querySelector(`meta[name='${e}-${u}']`);if(l)return l.getAttribute("content")}},ff=c=>c.match(/wss?:\/\//)?c:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${c}`:c,Ek=()=>{if(typeof document<"u"&&document.head){let c=sl(document,"url");if(c)return ff(c)}return ff(Lk)},Rk=()=>{if(typeof document<"u"&&document.head){let c=sl(document,"history-timestamp");if(c)return c|0}},Ik=()=>{if(typeof document<"u"&&document.head)return sl(document,"token")},Ok=()=>{if(typeof document<"u"&&document.head)return sl(document,"token-param")};function Nk(c,u){typeof c=="object"&&typeof u>"u"&&(u=c,c=void 0),c=c||Ek(),u=u||{},u.historyTimestamp||(u.historyTimestamp=Rk());let e=Ik();if(e){let g=Ok();u.auth=Object.assign({token:e,param:g},u.auth||{})}u=Object.assign({},mg,u);let{logLevel:l,logger:T,pingInterval:b,reconnectStrategy:w,maxMissingPings:_,maxReconnectAttempts:p}=u;return T=u.logger=u.logger||new $k(l),w=u.reconnectStrategy=u.reconnectStrategy||pg(b),u.monitor!==!1&&(u.monitor=u.monitor||new Mk({pingInterval:b,reconnectStrategy:w,maxMissingPings:_,maxReconnectAttempts:p,logger:T})),xk(c,u)}function Dk(c,u){let e=Nk(c,u);return new Ak(e)}class Fk{constructor(u="/openc3-api/cable"){this._cable=null,this._url=u}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(u,e,l={},T={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(b=>{if(b&&OpenC3Auth.setTokens(),this._cable==null){let w=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);w=new URL(w,document.baseURI).href,this._cable=Dk(w)}return this._cable.subscriptions.create({channel:u,...T},l)})}recordPing(){}}class mu{constructor(u,e,l="",T=""){this.keyword=u.keyword,this.parameters=u.parameters,this.filename=u.filename,this.line=u.line,this.lineNumber=u.lineNumber,this.message=e,this.usage=l,this.url=T}}class Pk{constructor(){$r(this,"keyword",null),$r(this,"parameters",[]),$r(this,"filename",""),$r(this,"line",""),$r(this,"lineNumber",0),$r(this,"url","https://docs.openc3.com/docs/configuration")}verify_num_parameters(u,e,l=""){for(let T=1;T<=u;T++)if(this.parameters[T-1]===void 0)throw new mu(this,`Not enough parameters for ${this.keyword}.`,l,this.url);if(e&&this.parameters[e]!==void 0)throw new mu(this,`Too many parameters for ${this.keyword}.`,l,this.url)}remove_quotes(u){if(u.length<2)return u;let e=u.charAt(0);if(e!=='"'&&e!=="'")return u;let l=u.charAt(u.length-1);return e!==l?u:u.substring(1,u.length-1)}scan_string(u,e){if(!e.global)throw"rx must have 'global' flag set";let l=[];return u.replace(e,function(T){return l.push(T),T}),l}parse_string(u,e,l,T,b){let w=!1;this.line="",this.keyword=null,this.parameters=[],this.filename=e;let _=u.split(`
1393
- `),p=_.length;for(let g=0;g<p;g++){this.lineNumber=g+1;let r=_[g].trim();if(r.length===0){l&&b(null,[],this.line,this.lineNumber);continue}if(w===!0){if(r[0]==="#")continue;r=r.substring(1,r.length)}let a=r.charAt(r.length-1),o=!1;switch(a){case"+":o=!0;case"\\":let m=r.substring(0,r.length-1).trim();this.line+=m.substring(0,m.length-1),o&&(this.line+=`
1394
- `),w=!0;continue;case"&":this.line+=r.substring(0,r.length-1);continue;default:this.line+=r}w=!1;let i=/("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g,n=this.scan_string(this.line,i),s="";if(n.length>0&&(s=s+n[0]),s.length===0||s.charAt(0)==="#"?this.keyword=null:this.keyword=s.toUpperCase(),this.parameters=[],this.keyword===null){l&&b(this.keyword,this.parameters,this.line,this.lineNumber),this.line="";continue}let h=n.length;if(h>1)for(let m=1;m<h;m++){let y=n[m];if(y.length>0&&y.charAt(0)==="#")break;T?this.parameters.push(this.remove_quotes(y)):this.parameters.push(y)}b(this.keyword,this.parameters,this.line,this.lineNumber),this.line=""}}}function Ou(c){return Bk.test(c)}const Bk=/^-?[0-9]+$/;function vg(c){return Wk.test(c)}const Wk=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function yg(c,u){const e=Number.parseFloat(c),l=String(e),T=pf(c),b=pf(l);return!!(T===b||(u==null?void 0:u.approx)===!0&&!Ou(c)&&b.length>=14&&T.startsWith(b.substring(0,14)))}let Vs=function(c){return c.underflow="underflow",c.overflow="overflow",c.truncate_integer="truncate_integer",c.truncate_float="truncate_float",c}({});function Hk(c){if(yg(c,{approx:!1}))return;if(Ou(c))return Vs.truncate_integer;const u=Number.parseFloat(c);return Number.isFinite(u)?u===0?Vs.underflow:Vs.truncate_float:Vs.overflow}function pf(c){return c.replace(zk,"").replace(Vk,"").replace(jk,"").replace(Uk,"")}const zk=/[eE][+-]?\d+$/,Uk=/^-?(0*)?/,Vk=/\./,jk=/0+$/;class Kk{constructor(u){if($r(this,"isLosslessNumber",!0),!vg(u))throw new Error(`Invalid number (value: "${u}")`);this.value=u}valueOf(){const u=Hk(this.value);if(u===void 0||u===Vs.truncate_float)return Number.parseFloat(this.value);if(Ou(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${u} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function Gk(c){return c&&typeof c=="object"&&c.isLosslessNumber===!0||!1}function qk(c){return new Kk(c)}function Yk(c,u){return Nu({"":c},"",c,u)}function Nu(c,u,e,l){return Array.isArray(e)?l.call(c,u,Zk(e,l)):e&&typeof e=="object"&&!Gk(e)?l.call(c,u,Qk(e,l)):l.call(c,u,e)}function Qk(c,u){for(const e of Object.keys(c)){const l=Nu(c,e,c[e],u);l!==void 0?c[e]=l:delete c[e]}return c}function Zk(c,u){for(let e=0;e<c.length;e++)c[e]=Nu(c,String(e),c[e],u);return c}function Jk(c,u){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qk,l=0;const T=_();return n(T),h(),u?Yk(T,u):T;function b(){if(c.charCodeAt(l)===r_){l++,g();const S={};let k=!0;for(;l<c.length&&c.charCodeAt(l)!==mf;){k?k=!1:(o(),g());const N=l,W=r();if(W===void 0){R();return}g(),i();const V=_();if(V===void 0){F();return}Object.prototype.hasOwnProperty.call(S,W)&&!vu(V,S[W])&&$(W,N+1),S[W]=V}return c.charCodeAt(l)!==mf&&C(),l++,S}}function w(){if(c.charCodeAt(l)===o_){l++,g();const S=[];let k=!0;for(;l<c.length&&c.charCodeAt(l)!==vf;){k?k=!1:o();const N=_();s(N),S.push(N)}return c.charCodeAt(l)!==vf&&v(),l++,S}}function _(){g();const S=r()??a()??b()??w()??p("true",!0)??p("false",!1)??p("null",null);return g(),S}function p(S,k){if(c.slice(l,l+S.length)===S)return l+=S.length,k}function g(){for(;Xk(c.charCodeAt(l));)l++}function r(){if(c.charCodeAt(l)===bc){l++;let S="";for(;l<c.length&&c.charCodeAt(l)!==bc;){if(c.charCodeAt(l)===i_){const k=c[l+1],N=n_[k];N!==void 0?(S+=N,l++):k==="u"?Pa(c.charCodeAt(l+2))&&Pa(c.charCodeAt(l+3))&&Pa(c.charCodeAt(l+4))&&Pa(c.charCodeAt(l+5))?(S+=String.fromCharCode(Number.parseInt(c.slice(l+2,l+6),16)),l+=5):E(l):I(l)}else t_(c.charCodeAt(l))?S+=c[l]:L(c[l]);l++}return y(),l++,S}}function a(){const S=l;if(c.charCodeAt(l)===yf&&(l++,m(S)),c.charCodeAt(l)===Du)l++;else if(e_(c.charCodeAt(l)))for(l++;Ba(c.charCodeAt(l));)l++;if(c.charCodeAt(l)===f_)for(l++,m(S);Ba(c.charCodeAt(l));)l++;if(c.charCodeAt(l)===y_||c.charCodeAt(l)===v_)for(l++,(c.charCodeAt(l)===yf||c.charCodeAt(l)===u_)&&l++,m(S);Ba(c.charCodeAt(l));)l++;if(l>S)return e(c.slice(S,l))}function o(){if(c.charCodeAt(l)!==d_)throw new SyntaxError(`Comma ',' expected after value ${O()}`);l++}function i(){if(c.charCodeAt(l)!==p_)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);l++}function n(S){if(S===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function s(S){if(S===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function h(){if(l<c.length)throw new SyntaxError(`Expected end of input ${O()}`)}function m(S){if(!Ba(c.charCodeAt(l))){const k=c.slice(S,l);throw new SyntaxError(`Invalid number '${k}', expecting a digit ${O()}`)}}function y(){if(c.charCodeAt(l)!==bc)throw new SyntaxError(`End of string '"' expected ${O()}`)}function R(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function $(S,k){throw new SyntaxError(`Duplicate key '${S}' encountered at position ${k}`)}function C(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function v(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function L(S){throw new SyntaxError(`Invalid character '${S}' ${U()}`)}function I(S){const k=c.slice(S,S+2);throw new SyntaxError(`Invalid escape character '${k}' ${U()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${U()}`)}function E(S){const k=c.slice(S,S+6);throw new SyntaxError(`Invalid unicode character '${k}' ${U()}`)}function U(){return`at position ${l}`}function P(){return l<c.length?`but got '${c[l]}'`:"but reached end of input"}function O(){return`${P()} ${U()}`}}function Xk(c){return c===s_||c===a_||c===l_||c===c_}function Pa(c){return c>=Du&&c<=Fu||c>=g_&&c<=w_||c>=m_&&c<=b_}function Ba(c){return c>=Du&&c<=Fu}function e_(c){return c>=h_&&c<=Fu}function t_(c){return c>=32&&c<=1114111}function vu(c,u){return c===u?!0:Array.isArray(c)&&Array.isArray(u)?c.length===u.length&&c.every((e,l)=>vu(e,u[l])):gf(c)&&gf(u)?[...new Set([...Object.keys(c),...Object.keys(u)])].every(e=>vu(c[e],u[e])):!1}function gf(c){return typeof c=="object"&&c!==null}const n_={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1395
- `,r:"\r",t:" "},i_=92,r_=123,mf=125,o_=91,vf=93,s_=32,a_=10,l_=9,c_=13,bc=34,u_=43,yf=45,Du=48,h_=49,Fu=57,d_=44,f_=46,p_=58,g_=65,m_=97,v_=69,y_=101,w_=70,b_=102;function wg(c,u,e,l){return b(c);function b(g,r){if(Array.isArray(l)){const a=l.find(o=>o.test(g));if(a){const o=a.stringify(g);if(typeof o!="string"||!vg(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 g=="boolean"||typeof g=="number"||typeof g=="string"||g===null||g instanceof Date||g instanceof Boolean||g instanceof Number||g instanceof String)return JSON.stringify(g);if(g!=null&&g.isLosslessNumber||typeof g=="bigint")return g.toString();if(Array.isArray(g))return w(g);if(g&&typeof g=="object")return _(g)}function w(g,r){if(g.length===0)return"[]";let a="[";for(let o=0;o<g.length;o++){const i=g[o];typeof i<"u"&&typeof i!="function"?a+=b(i):a+="null",o<g.length-1&&(a+=",")}return a+="]",a}function _(g,r){if(typeof g.toJSON=="function")return wg(g.toJSON(),u,e,void 0);const a=Array.isArray(u)?u.map(String):Object.keys(g);if(a.length===0)return"{}";let o=!0,i="{";for(const n of a){const s=g[n];if(p(n,s)){o?o=!1:i+=",";const h=JSON.stringify(n);i+=`${h}:`,i+=b(s)}}return i+="}",i}function p(g,r){return typeof r<"u"&&typeof r!="function"&&typeof r!="symbol"}}function x_(c){return yg(c)?parseFloat(c):BigInt(c)}class k_{constructor(){$r(this,"id",1)}async exec(u,e,l={},T={},b=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return l.scope=window.openc3Scope,T.manual=!0,(await Eu.post("/openc3-api/api",{jsonrpc:"2.0",method:u,params:e,id:this.id,keyword_params:l},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...T},timeout:b,transformRequest:[(w,_)=>wg(w)],transformResponse:[w=>Jk(w,void 0,x_)]})).data.result}catch(w){let _=new Error;throw w.response?(_.name=w.response.data.error.data.class,_.message=w.response.data.error.data.message,_.object=w.response.data.error):w.request?(_.name="Request error",_.message="Request error, no response received"):_.name="Unknown error",_}}decode_openc3_type(u){if(u!==null&&typeof u=="object"&&u.json_class=="Float"&&u.raw){if(u.raw=="NaN")return NaN;if(u.raw=="Infinity")return 1/0;if(u.raw=="-Infinity")return-1/0}return null}encode_openc3_type(u){return Number.isNaN(u)?{json_class:"Float",raw:"NaN"}:u==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:u==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(u=>{u&&(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(u){return this.exec("set_offline_access",[u])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(u,e){return this.exec("map_target_to_interface",[u,e])}connect_interface(u,...e){return e.length>0?this.exec("connect_interface",[u,...e]):this.exec("connect_interface",[u])}disconnect_interface(u){return this.exec("disconnect_interface",[u])}interface_cmd(u,e,...l){return this.exec("interface_cmd",[u,e,...l])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(u){return this.exec("connect_router",[u])}disconnect_router(u){return this.exec("disconnect_router",[u])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(u){return this.exec("get_tlm_cnts",[u])}get_item(u,e,l){return this.exec("get_item",[u,e,l])}get_param(u,e,l){return this.exec("get_param",[u,e,l])}get_parameter(u,e,l){return this.exec("get_param",[u,e,l])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(u){return this.exec("set_limits_set",[u])}get_target(u){return this.exec("get_target",[u])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(u,e){return this.exec("get_tlm",[u,e])}get_telemetry(u,e){return this.exec("get_tlm",[u,e])}get_all_tlm(u){return this.exec("get_all_tlm",[u])}get_all_telemetry(u){return this.exec("get_all_tlm",[u])}get_all_tlm_names(u,e=!1){return this.exec("get_all_tlm_names",[u],{hidden:e})}get_all_telemetry_names(u){return this.exec("get_all_tlm_names",[u])}get_all_tlm_item_names(u){return this.exec("get_all_tlm_item_names",[u])}async get_tlm_packet(u,e,l,T=30){const b=await this.exec("get_tlm_packet",[u,e],{type:l,stale_time:T});if(b!=null){let w=b.length,_=null;for(let p=0;p<w;p++)_=this.decode_openc3_type(b[p][1]),_!==null&&(b[p][1]=_)}return b}get_packet_derived_items(u,e){return this.exec("get_packet_derived_items",[u,e])}get_tlm_buffer(u,e){return this.exec("get_tlm_buffer",[u,e])}async get_tlm_values(u,e=30,l=null){let T={stale_time:e};l!==null&&(T.cache_timeout=l);const b=await this.exec("get_tlm_values",[u],T,{},1e4);let w=b[0].length,_=null;for(let p=0;p<w;p++)_=this.decode_openc3_type(b[0][p]),_!==null&&(b[0][p]=_);return b}get_limits(u,e,l){return this.exec("get_limits",[u,e,l])}async tlm(u,e,l,T="CONVERTED"){let b=null;if(e===void 0)b=await this.exec("tlm",[u]);else if(l===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(e))b=await this.exec("tlm",[u],{type:e});else{let _=new Error;throw _.name="TypeError",_.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,_}else b=await this.exec("tlm",[u,e,l],{type:T});let w=this.decode_openc3_type(b);return w!==null&&(b=w),b}async inject_tlm(u,e,l=null,T="CONVERTED"){await this.exec("inject_tlm",[u,e,l],{type:T})}set_tlm(u,e,l,T){return this.exec("set_tlm",[u,e,l],{type:T})}override_tlm(u,e,l,T){return this.exec("override_tlm",[u,e,l],{type:T})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(u,e,l,T){return this.exec("normalize_tlm",[u,e,l],{type:T})}get_all_cmds(u){return this.exec("get_all_cmds",[u])}get_all_commands(u){return this.exec("get_all_cmds",[u])}get_all_cmd_names(u,e=!1){return this.exec("get_all_cmd_names",[u],{hidden:e})}get_all_command_names(u){return this.exec("get_all_cmd_names",[u])}get_cmd(u,e){return this.exec("get_cmd",[u,e])}get_command(u,e){return this.exec("get_cmd",[u,e])}get_cmd_cnts(u){return this.exec("get_cmd_cnts",[u])}get_cmd_value(u,e,l,T="CONVERTED"){return this.exec("get_cmd_value",[u,e,l,T])}get_cmd_buffer(u,e){return this.exec("get_cmd_buffer",[u,e])}_cmd(u,e,l,T,b){let w=null;for(let _ in T)Object.prototype.hasOwnProperty.call(T,_)&&(w=this.encode_openc3_type(T[_]),w!==null&&(T[_]=w));return this.exec(u,[e,l,T],{},b)}get_cmd_hazardous(u,e,l,T={}){return e===void 0?this.exec("get_cmd_hazardous",u,{},T):this._cmd("get_cmd_hazardous",u,e,l,T)}cmd(u,e,l,T={}){return e===void 0?this.exec("cmd",u,{},T):this._cmd("cmd",u,e,l,T)}cmd_no_range_check(u,e,l,T={}){return e===void 0?this.exec("cmd_no_range_check",u,{},T):this._cmd("cmd_no_range_check",u,e,l,T)}cmd_raw(u,e,l,T={}){return e===void 0?this.exec("cmd_raw",u,{},T):this._cmd("cmd_raw",u,e,l,T)}cmd_raw_no_range_check(u,e,l,T={}){return e===void 0?this.exec("cmd_raw_no_range_check",u,{},T):this._cmd("cmd_raw_no_range_check",u,e,l,T)}cmd_no_hazardous_check(u,e,l,T={}){return e===void 0?this.exec("cmd_no_hazardous_check",u,{},T):this._cmd("cmd_no_hazardous_check",u,e,l,T)}cmd_no_checks(u,e,l,T={}){return e===void 0?this.exec("cmd_no_checks",u,{},T):this._cmd("cmd_no_checks",u,e,l,T)}cmd_raw_no_hazardous_check(u,e,l,T={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",u,{},T):this._cmd("cmd_raw_no_hazardous_check",u,e,l,T)}cmd_raw_no_checks(u,e,l,T={}){return e===void 0?this.exec("cmd_raw_no_checks",u,{},T):this._cmd("cmd_raw_no_checks",u,e,l,T)}build_cmd(u,e,l){return e===void 0?this.exec("build_cmd",u):this._cmd("build_cmd",u,e,l)}build_command(u,e,l){return e===void 0?this.exec("build_cmd",u):this._cmd("build_cmd",u,e,l)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(u,e){return this.exec("send_raw",[u,e])}list_configs(u){return this.exec("list_configs",[u])}load_config(u,e){return this.exec("load_config",[u,e])}save_config(u,e,l){return this.exec("save_config",[u,e,l])}delete_config(u,e){return this.exec("delete_config",[u,e])}enable_limits(u,e,l){return this.exec("enable_limits",[u,e,l])}disable_limits(u,e,l){return this.exec("disable_limits",[u,e,l])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(u){return this.exec("get_overall_limits_state",[u])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(u){return this.exec("get_setting",[u])}get_settings(u){return this.exec("get_settings",u)}set_setting(u,e){return this.exec("set_setting",[u,e])}update_news(){return this.exec("update_news",[])}save_setting(u,e){return this.exec("set_setting",[u,e])}get_metrics(){return this.exec("get_metrics",[])}async hashString(u){if(window.isSecureContext){const e=new TextEncoder().encode(u),l=await crypto.subtle.digest("SHA-256",e),T=new Uint8Array(l);return Array.from(T).map(b=>b.toString(16).padStart(2,"0")).join("")}}}var xc={exports:{}},wf;function __(){return wf||(wf=1,function(c,u){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,l,T){function b(g,r){function a(F,E,U){if(!(F.length<E)){var P=F.slice(0,E),O=F.slice(E),S=/^(?:(\s+)|(\S+)(\s+))/.exec(O),k=/(?:(\s+)|(\s+)(\S+))$/.exec(P),N=0,W=0;if(k&&!k[2]&&(N=E-k[1].length,W=E),S&&!S[2]&&(N||(N=E),W=E+S[1].length),N)return{start:N,end:W};if(k&&k[2]&&k.index>U)return{start:k.index,end:k.index+k[2].length};if(S&&S[2])return N=E+S[2].length,{start:N,end:N+S[3].length}}}for(var o=r.column||g.getOption("printMarginColumn"),i=r.allowMerge!=0,n=Math.min(r.startRow,r.endRow),s=Math.max(r.startRow,r.endRow),h=g.session;n<=s;){var m=h.getLine(n);if(m.length>o){var y=a(m,o,5);if(y){var R=/^\s*/.exec(m)[0];h.replace(new _(n,y.start,n,y.end),`
1396
- `+R)}s++}else if(i&&/\S/.test(m)&&n!=s){var $=h.getLine(n+1);if($&&/\S/.test($)){var C=m.replace(/\s+$/,""),v=$.replace(/^\s+/,""),L=C+" "+v,y=a(L,o,5);if(y&&y.start>C.length||L.length<o){var I=new _(n,C.length,n+1,$.length-v.length);h.replace(I," "),n--,s--}else C.length<m.length&&h.remove(new _(n,C.length,n,m.length))}}n++}}function w(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var r=g.editor,a=r.selection.cursor;if(a.column<=r.renderer.$printMarginColumn)return;var o=r.session.$undoManager.$lastDelta;b(r,{startRow:a.row,endRow:a.row,allowMerge:!1}),o!=r.session.$undoManager.$lastDelta&&r.session.markUndoGroup()}}var _=e("../range").Range,p=e("../editor").Editor;e("../config").defineOptions(p.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",w):this.commands.off("afterExec",w)},value:!1}}),l.hardWrap=b}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,l,T){function b(f){return{row:f.line,column:f.ch}}function w(f){return new Oe(f.row,f.column)}function _(f,A,x){if(A.line===x.line&&A.ch>=x.ch-1){var D=f.getLine(A.line),B=D.charCodeAt(A.ch);55296<=B&&B<=55551&&(x.ch+=1)}return{start:A,end:x}}function p(f){f.setOption("disableInput",!0),f.setOption("showCursorWhenSelecting",!1),Fe.signal(f,"vim-mode-change",{mode:"normal"}),f.on("cursorActivity",to),L(f),Fe.on(f.getInputField(),"paste",r(f))}function g(f){f.setOption("disableInput",!1),f.off("cursorActivity",to),Fe.off(f.getInputField(),"paste",r(f)),f.state.vim=null,Vn&&clearTimeout(Vn)}function r(f){var A=f.state.vim;return A.onPasteFn||(A.onPasteFn=function(){A.insertMode||(f.setCursor(ve(f.getCursor(),0,1)),_n.enterInsertMode(f,{},A))}),A.onPasteFn}function a(f,A){return A>=f.firstLine()&&A<=f.lastLine()}function o(f){return/^[a-z]$/.test(f)}function i(f){return"()[]{}".indexOf(f)!=-1}function n(f){return es.test(f)}function s(f){return Gt.test(f)}function h(f){return/^\s*$/.test(f)}function m(f){return".?!".indexOf(f)!=-1}function y(f,A){for(var x=0;x<A.length;x++)if(A[x]==f)return!0;return!1}function R(f,A,x,D,B){if(A===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(x||(x="string"),Dt[f]={type:x,defaultValue:A,callback:B},D)for(var H=0;H<D.length;H++)Dt[D[H]]=Dt[f];A&&$(f,A)}function $(f,A,x,D){var B=Dt[f];D=D||{};var H=D.scope;if(!B)return new Error("Unknown option: "+f);if(B.type=="boolean"){if(A&&A!==!0)return new Error("Invalid argument: "+f+"="+A);A!==!1&&(A=!0)}B.callback?(H!=="local"&&B.callback(A,void 0),H!=="global"&&x&&B.callback(A,x)):(H!=="local"&&(B.value=B.type=="boolean"?!!A:A),H!=="global"&&x&&(x.state.vim.options[f]={value:A}))}function C(f,A,x){var D=Dt[f];x=x||{};var B=x.scope;if(!D)return new Error("Unknown option: "+f);if(D.callback){var H=A&&D.callback(void 0,A);return B!=="global"&&H!==void 0?H:B!=="local"?D.callback():void 0}var H=B!=="global"&&A&&A.state.vim.options[f];return(H||B!=="local"&&D||{}).value}function v(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=xn()}function L(f){return f.state.vim||(f.state.vim={inputState:new S,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),f.state.vim}function I(){He={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Vi(),macroModeState:new v,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new G({}),searchHistoryController:new Q,exCommandHistoryController:new Q};for(var f in Dt){var A=Dt[f];A.value=A.defaultValue}}function F(f){function A(Y){typeof Y=="string"?cn.value=Y:cn=null}if(f[0]=="<"){var x=f.toLowerCase().slice(1,-1),D=x.split("-");if(x=D.pop()||"",x=="lt")f="<";else if(x=="space")f=" ";else if(x=="cr")f=`
1397
- `;else if(ji[x]){var B=cn.value,H={key:ji[x],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};cn.onKeyDown&&cn.onKeyDown(H,cn.value,A),cn&&cn.onKeyUp&&cn.onKeyUp(H,cn.value,A);return}}if(f==`
1398
- `){var K=cn;cn=null,K.onClose&&K.onClose(K.value)}else cn.value=(cn.value||"")+f}function E(f,A,x){var D=Jt;if(x){if(ci.indexOf(x)!=-1)return;ci.push(x),Jt=x.noremap!=0}try{for(var B=L(f),H=/<(?:[CSMA]-)*\w+>|./gi,K;K=H.exec(A);){var Y=K[0],J=B.insertMode;if(cn){F(Y);continue}var ie=mt.handleKey(f,Y,"mapping");if(!ie&&J&&B.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
1399
- `;else{if(ji.hasOwnProperty(se)){Y=ji[se],io(f,Y);continue}Y=Y[0],H.lastIndex=K.index+1}}f.replaceSelection(Y)}}}finally{if(ci.pop(),Jt=ci.length?D:!1,!ci.length&&cn){var ke=cn;cn=null,ni(f,ke)}}}function U(f,A){var x=f.key;if(!ui[x]){x.length>1&&x[0]=="n"&&(x=x.replace("Numpad","")),x=On[x]||x;var D="";if(f.ctrlKey&&(D+="C-"),f.altKey&&(D+="A-"),f.metaKey&&(D+="M-"),Fe.isMac&&f.altKey&&!f.metaKey&&!f.ctrlKey&&(D=D.slice(2)),(D||x.length>1)&&f.shiftKey&&(D+="S-"),A&&!A.expectLiteralNext&&x.length==1){if(Tn.keymap&&x in Tn.keymap)(Tn.remapCtrl!=0||!D)&&(x=Tn.keymap[x]);else if(x.charCodeAt(0)>255){var B=f.code&&f.code.slice(-1)||"";f.shiftKey||(B=B.toLowerCase()),B&&(x=B)}}return D+=x,D.length>1&&(D="<"+D+">"),D}}function P(f,A){Tn.string!==f&&(Tn=O(f)),Tn.remapCtrl=A}function O(f){function A(D){return D.split(/\\?(.)/).filter(Boolean)}var x={};return f?(f.split(/((?:[^\\,]|\\.)+),/).map(function(D){if(D){var B=D.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var H=A(B[1]),K=A(B[2]);if(H.length!==K.length)return;for(var Y=0;Y<H.length;++Y)x[H[Y]]=K[Y]}else if(B.length==1){var J=A(D);if(J.length%2!==0)return;for(var Y=0;Y<J.length;Y+=2)x[J[Y]]=J[Y+1]}}}),{keymap:x,string:f}):{keymap:x,string:""}}function S(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function k(f,A){f.state.vim.inputState=new S,f.state.vim.expectLiteralNext=!1,Fe.signal(f,"vim-command-done",A)}function N(){this.removed=[],this.inserted=""}function W(f,A,x){this.clear(),this.keyBuffer=[f||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!A,this.blockwise=!!x}function V(f,A){var x=He.registerController.registers;if(!f||f.length!=1)throw Error("Register name must be 1 character");x[f]=A,Kt.push(f)}function G(f){this.registers=f,this.unnamedRegister=f['"']=new W,f["."]=new W,f[":"]=new W,f["/"]=new W,f["+"]=new W}function Q(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(f,A){wi[f]=A}function he(f,A){for(var x=[],D=0;D<A;D++)x.push(f);return x}function ne(f,A){ao[f]=A}function ue(f,A){_n[f]=A}function le(f,A,x){var D=f.state.vim,B=D.insertMode||D.visualMode,H=Math.min(Math.max(f.firstLine(),A.line),f.lastLine()),K=f.getLine(H),Y=K.length-1+ +!!B,J=Math.min(Math.max(0,A.ch),Y),ie=K.charCodeAt(J);if(56320<=ie&&ie<=57343){var se=1;x&&x.line==H&&x.ch>J&&(se=-1),J+=se,J>Y&&(J-=2)}return new Oe(H,J)}function ce(f){var A={};for(var x in f)f.hasOwnProperty(x)&&(A[x]=f[x]);return A}function ve(f,A,x){return typeof A=="object"&&(x=A.ch,A=A.line),new Oe(f.line+A,f.ch+x)}function Ce(f,A,x,D){D.operator&&(x="operatorPending");for(var B,H=[],K=[],Y=Jt?A.length-Dr:0,J=Y;J<A.length;J++){var ie=A[J];x=="insert"&&ie.context!="insert"||ie.context&&ie.context!=x||D.operator&&ie.type=="action"||!(B=$e(f,ie.keys))||(B=="partial"&&H.push(ie),B=="full"&&K.push(ie))}return{partial:H.length&&H,full:K.length&&K}}function $e(f,A){var x=A.slice(-11)=="<character>",D=A.slice(-10)=="<register>";if(x||D){var B=A.length-(x?11:10),H=f.slice(0,B),K=A.slice(0,B);return H==K&&f.length>B?"full":K.indexOf(H)==0?"partial":!1}return f==A?"full":A.indexOf(f)==0?"partial":!1}function Te(f){var A=/^.*(<[^>]+>)$/.exec(f),x=A?A[1]:f.slice(-1);if(x.length>1)switch(x){case"<CR>":x=`
1400
- `;break;case"<Space>":x=" ";break;default:x=""}return x}function qe(f,A,x){return function(){for(var D=0;D<x;D++)A(f)}}function Ke(f){return new Oe(f.line,f.ch)}function at(f,A){return f.ch==A.ch&&f.line==A.line}function et(f,A){return f.line<A.line?!0:f.line==A.line&&f.ch<A.ch}function lt(f,A){return arguments.length>2&&(A=lt.apply(void 0,Array.prototype.slice.call(arguments,1))),et(f,A)?f:A}function jt(f,A){return arguments.length>2&&(A=jt.apply(void 0,Array.prototype.slice.call(arguments,1))),et(f,A)?A:f}function on(f,A,x){var D=et(f,A),B=et(A,x);return D&&B}function Ht(f,A){return f.getLine(A).length}function qn(f){return f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")}function sn(f){return f.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function yn(f,A,x){var D=Ht(f,A),B=new Array(x-D+1).join(" ");f.setCursor(new Oe(A,D)),f.replaceRange(B,f.getCursor())}function wn(f,A){var x=[],D=f.listSelections(),B=Ke(f.clipPos(A)),H=!at(A,B),K=f.getCursor("head"),Y=pt(D,K),J=at(D[Y].head,D[Y].anchor),ie=D.length-1,se=ie-Y>Y?ie:0,ye=D[se].anchor,ke=Math.min(ye.line,B.line),de=Math.max(ye.line,B.line),we=ye.ch,Ie=B.ch,Ee=D[se].head.ch-we,ze=Ie-we;Ee>0&&ze<=0?(we++,H||Ie--):Ee<0&&ze>=0?(we--,J||Ie++):Ee<0&&ze==-1&&(we--,Ie++);for(var nt=ke;nt<=de;nt++){var Xe={anchor:new Oe(nt,we),head:new Oe(nt,Ie)};x.push(Xe)}return f.setSelections(x),A.ch=Ie,ye.ch=we,ye}function In(f,A,x){for(var D=[],B=0;B<x;B++){var H=ve(A,B,0);D.push({anchor:H,head:H})}f.setSelections(D,0)}function pt(f,A,x){for(var D=0;D<f.length;D++){var B=at(f[D].anchor,A),H=at(f[D].head,A);if(B||H)return D}return-1}function Ve(f,A){var x=A.lastSelection,D=function(){var H=f.listSelections(),K=H[0],Y=H[H.length-1],J=et(K.anchor,K.head)?K.anchor:K.head,ie=et(Y.anchor,Y.head)?Y.head:Y.anchor;return[J,ie]},B=function(){var H=f.getCursor(),K=f.getCursor(),Y=x.visualBlock;if(Y){var J=Y.width,ie=Y.height;K=new Oe(H.line+ie,H.ch+J);for(var se=[],ye=H.line;ye<K.line;ye++){var ke=new Oe(ye,H.ch),de=new Oe(ye,K.ch),we={anchor:ke,head:de};se.push(we)}f.setSelections(se)}else{var Ie=x.anchorMark.find(),Ee=x.headMark.find(),ze=Ee.line-Ie.line,nt=Ee.ch-Ie.ch;K={line:K.line+ze,ch:ze?K.ch:nt+K.ch},x.visualLine&&(H=new Oe(H.line,0),K=new Oe(K.line,Ht(f,K.line))),f.setSelection(H,K)}return[H,K]};return A.visualMode?D():B()}function _e(f,A){var x=A.sel.anchor,D=A.sel.head;A.lastPastedText&&(D=f.posFromIndex(f.indexFromPos(x)+A.lastPastedText.length),A.lastPastedText=null),A.lastSelection={anchorMark:f.setBookmark(x),headMark:f.setBookmark(D),anchor:Ke(x),head:Ke(D),visualMode:A.visualMode,visualLine:A.visualLine,visualBlock:A.visualBlock}}function We(f,A,x,D){var B=f.state.vim.sel,H=D?A:B.head,K=D?A:B.anchor,Y;return et(x,A)&&(Y=x,x=A,A=Y),et(H,K)?(H=lt(A,H),K=jt(K,x)):(K=lt(A,K),H=jt(H,x),H=ve(H,0,-1),H.ch==-1&&H.line!=f.firstLine()&&(H=new Oe(H.line-1,Ht(f,H.line-1)))),[K,H]}function Ye(f,A,B){var D=f.state.vim;A=A||D.sel;var B=B||D.visualLine?"line":D.visualBlock?"block":"char",H=ct(f,A,B);f.setSelections(H.ranges,H.primary)}function ct(f,A,x,D){var B=Ke(A.head),H=Ke(A.anchor);if(x=="char"){var K=!D&&!et(A.head,A.anchor)?1:0,Y=et(A.head,A.anchor)?1:0;return B=ve(A.head,0,K),H=ve(A.anchor,0,Y),{ranges:[{anchor:H,head:B}],primary:0}}if(x=="line"){if(et(A.head,A.anchor))B.ch=0,H.ch=Ht(f,H.line);else{H.ch=0;var J=f.lastLine();B.line>J&&(B.line=J),B.ch=Ht(f,B.line)}return{ranges:[{anchor:H,head:B}],primary:0}}if(x=="block"){var ie=Math.min(H.line,B.line),se=H.ch,ye=Math.max(H.line,B.line),ke=B.ch;se<ke?ke+=1:se+=1;for(var de=ye-ie+1,we=B.line==ie?0:de-1,Ie=[],Ee=0;Ee<de;Ee++)Ie.push({anchor:new Oe(ie+Ee,se),head:new Oe(ie+Ee,ke)});return{ranges:Ie,primary:we}}}function wt(f){var A=f.getCursor("head");return f.getSelection().length==1&&(A=lt(A,f.getCursor("anchor"))),A}function bt(f,A){var x=f.state.vim;A!==!1&&f.setCursor(le(f,x.sel.head)),_e(f,x),x.visualMode=!1,x.visualLine=!1,x.visualBlock=!1,x.insertMode||Fe.signal(f,"vim-mode-change",{mode:"normal"})}function $t(f,A,x){var D=f.getRange(A,x);if(/\n\s*$/.test(D)){var B=D.split(`
1401
- `);B.pop();for(var H,H=B.pop();B.length>0&&H&&h(H);H=B.pop())x.line--,x.ch=0;H?(x.line--,x.ch=Ht(f,x.line)):x.ch=0}}function Ct(f,A,x){A.ch=0,x.ch=0,x.line++}function st(f){if(!f)return 0;var A=f.search(/\S/);return A==-1?f.length:A}function gt(f,A,x){var D=A.inclusive,B=A.innerWord,H=A.bigWord,K=A.noSymbol,Y=A.multiline,J=x||wt(f),ie=f.getLine(J.line),se=ie,ye=J.line,ke=ye,de=J.ch,we,Ie=K?Fr[0]:Ui[0];if(B&&/\s/.test(ie.charAt(de)))Ie=function(Xt){return/\s/.test(Xt)};else{for(;!Ie(ie.charAt(de));)if(de++,de>=ie.length){if(!Y)return null;de--,we=Mr(f,J,!0,H,!0);break}H?Ie=Ui[0]:(Ie=Fr[0],Ie(ie.charAt(de))||(Ie=Fr[1]))}for(var Ee=de,ze=de;Ie(ie.charAt(ze))&&ze>=0;)ze--;if(ze++,we)Ee=we.to,ke=we.line,se=f.getLine(ke),!se&&Ee==0&&Ee++;else for(;Ie(ie.charAt(Ee))&&Ee<ie.length;)Ee++;if(D){var nt=Ee,Xe=J.ch<=ze&&/\s/.test(ie.charAt(J.ch));if(!Xe)for(;/\s/.test(se.charAt(Ee))&&Ee<se.length;)Ee++;if(nt==Ee||Xe){for(var Ze=ze;/\s/.test(ie.charAt(ze-1))&&ze>0;)ze--;!ze&&!Xe&&(ze=Ze)}}return{start:new Oe(ye,ze),end:new Oe(ke,Ee)}}function hn(f,A,x){var D=A;if(!Fe.findMatchingTag||!Fe.findEnclosingTag)return{start:D,end:D};var B=Fe.findMatchingTag(f,A)||Fe.findEnclosingTag(f,A);return!B||!B.open||!B.close?{start:D,end:D}:x?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function Yn(f,A,x){at(A,x)||He.jumpList.add(f,A,x)}function mi(f,A){He.lastCharacterSearch.increment=f,He.lastCharacterSearch.forward=A.forward,He.lastCharacterSearch.selectedCharacter=A.selectedCharacter}function tr(f,A,x,D){var B=Ke(f.getCursor()),H=x?1:-1,K=x?f.lineCount():-1,Y=B.ch,J=B.line,ie=f.getLine(J),se={lineText:ie,nextCh:ie.charAt(Y),lastCh:null,index:Y,symb:D,reverseSymb:(x?{")":"(","}":"{"}:{"(":")","{":"}"})[D],forward:x,depth:0,curMoveThrough:!1},ye=Mi[D];if(!ye)return B;var ke=Ti[ye].init,de=Ti[ye].isComplete;for(ke&&ke(se);J!==K&&A;){if(se.index+=H,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(J+=H,se.lineText=f.getLine(J)||"",H>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}de(se)&&(B.line=J,B.ch=se.index,A--)}return se.nextCh||se.curMoveThrough?new Oe(J,se.index):B}function Mr(f,A,x,D,B){var H=A.line,K=A.ch,Y=f.getLine(H),J=x?1:-1,ie=D?Ui:Fr;if(B&&Y==""){if(H+=J,Y=f.getLine(H),!a(f,H))return null;K=x?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:H};for(var se=J>0?Y.length:-1,ye=se,ke=se;K!=se;){for(var de=!1,we=0;we<ie.length&&!de;++we)if(ie[we](Y.charAt(K))){for(ye=K;K!=se&&ie[we](Y.charAt(K));)K+=J;if(ke=K,de=ye!=ke,ye==A.ch&&H==A.line&&ke==ye+J)continue;return{from:Math.min(ye,ke+1),to:Math.max(ye,ke),line:H}}de||(K+=J)}if(H+=J,!a(f,H))return null;Y=f.getLine(H),K=J>0?0:Y.length}}function Qn(f,A,x,D,B,H){var K=Ke(A),Y=[];(D&&!B||!D&&B)&&x++;for(var J=!D||!B,ie=0;ie<x;ie++){var se=Mr(f,A,D,H,J);if(!se){var ye=Ht(f,f.lastLine());Y.push(D?{line:f.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),A=new Oe(se.line,D?se.to-1:se.from)}var ke=Y.length!=x,de=Y[0],we=Y.pop();return D&&!B?(!ke&&(de.from!=K.ch||de.line!=K.line)&&(we=Y.pop()),new Oe(we.line,we.from)):D&&B?new Oe(we.line,we.to-1):!D&&B?(!ke&&(de.to!=K.ch||de.line!=K.line)&&(we=Y.pop()),new Oe(we.line,we.to)):new Oe(we.line,we.from)}function Tr(f,A,x,D,B){var H=A,K=new Oe(H.line+x.repeat-1,1/0),Y=f.clipPos(K);return Y.ch--,B||(D.lastHPos=1/0,D.lastHSPos=f.charCoords(Y,"div").left),K}function Qr(f,A,x,D,B){for(var H=B||f.getCursor(),K=H.ch,Y,J=0;J<A;J++){var ie=f.getLine(H.line);if(Y=_s(K,ie,D,x),Y==-1)return null;K=Y}return new Oe(f.getCursor().line,Y)}function ks(f,A){var x=f.getCursor().line;return le(f,new Oe(x,A-1))}function Ci(f,A,x,D){!y(x,xr)&&!Ut.test(x)||(A.marks[x]&&A.marks[x].clear(),A.marks[x]=f.setBookmark(D))}function _s(f,A,x,D,B){var H;return D?(H=A.indexOf(x,f+1),H!=-1):(H=A.lastIndexOf(x,f-1),H!=-1),H}function yo(f,A,x,D,B){function H(ze){return!/\S/.test(f.getLine(ze))}function K(ze,nt,Xe){return Xe?H(ze)!=H(ze+nt):!H(ze)&&H(ze+nt)}function Y(ze){D=D>0?1:-1;var nt=f.ace.session.getFoldLine(ze);nt&&ze+D>nt.start.row&&ze+D<nt.end.row&&(D=(D>0?nt.end.row:nt.start.row)-ze)}var J=A.line,ie=f.firstLine(),se=f.lastLine(),ye,ke,de=J;if(D){for(;ie<=de&&de<=se&&x>0;)Y(de),K(de,D)&&x--,de+=D;return new Oe(de,0)}var we=f.state.vim;if(we.visualLine&&K(J,1,!0)){var Ie=we.sel.anchor;K(Ie.line,-1,!0)&&(!B||Ie.line!=J)&&(J+=1)}var Ee=H(J);for(de=J;de<=se&&x;de++)K(de,1,!0)&&(!B||H(de)!=Ee)&&x--;for(ke=new Oe(de,0),de>se&&!Ee?Ee=!0:B=!1,de=J;de>ie&&!((!B||H(de)==Ee||de==J)&&K(de,-1,!0));de--);return ye=new Oe(de,0),{start:ye,end:ke}}function Go(f,A,x,D,B){function H(ie){ie.pos+ie.dir<0||ie.pos+ie.dir>=ie.line.length?ie.line=null:ie.pos+=ie.dir}function K(ie,se,ye,ke){var de=ie.getLine(se),we={line:de,ln:se,pos:ye,dir:ke};if(we.line==="")return{ln:we.ln,pos:we.pos};var Ie=we.pos;for(H(we);we.line!==null;){if(Ie=we.pos,m(we.line[we.pos])){if(!B)return{ln:we.ln,pos:we.pos+1};for(H(we);we.line!==null&&h(we.line[we.pos]);)Ie=we.pos,H(we);return{ln:we.ln,pos:Ie+1}}H(we)}return{ln:we.ln,pos:Ie+1}}function Y(ie,se,ye,ke){var de=ie.getLine(se),we={line:de,ln:se,pos:ye,dir:ke};if(we.line==="")return{ln:we.ln,pos:we.pos};var Ie=we.pos;for(H(we);we.line!==null;){if(!h(we.line[we.pos])&&!m(we.line[we.pos]))Ie=we.pos;else if(m(we.line[we.pos]))return B?h(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Ie}:{ln:we.ln,pos:Ie};H(we)}return we.line=de,B&&h(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Ie}}for(var J={ln:A.line,pos:A.ch};x>0;)D<0?J=Y(f,J.ln,J.pos,D):J=K(f,J.ln,J.pos,D),x--;return new Oe(J.ln,J.pos)}function nr(f,A,x,D){function B(J,ie){if(ie.pos+ie.dir<0||ie.pos+ie.dir>=ie.line.length){if(ie.ln+=ie.dir,!a(J,ie.ln)){ie.line=null,ie.ln=null,ie.pos=null;return}ie.line=J.getLine(ie.ln),ie.pos=ie.dir>0?0:ie.line.length-1}else ie.pos+=ie.dir}function H(J,ie,se,ye){var Ee=J.getLine(ie),ke=Ee==="",de={line:Ee,ln:ie,pos:se,dir:ye},we={ln:de.ln,pos:de.pos},Ie=de.line==="";for(B(J,de);de.line!==null;){if(we.ln=de.ln,we.pos=de.pos,de.line===""&&!Ie)return{ln:de.ln,pos:de.pos};if(ke&&de.line!==""&&!h(de.line[de.pos]))return{ln:de.ln,pos:de.pos};m(de.line[de.pos])&&!ke&&(de.pos===de.line.length-1||h(de.line[de.pos+1]))&&(ke=!0),B(J,de)}var Ee=J.getLine(we.ln);we.pos=0;for(var ze=Ee.length-1;ze>=0;--ze)if(!h(Ee[ze])){we.pos=ze;break}return we}function K(J,ie,se,ye){var Ie=J.getLine(ie),ke={line:Ie,ln:ie,pos:se,dir:ye},de={ln:ke.ln,pos:null},we=ke.line==="";for(B(J,ke);ke.line!==null;){if(ke.line===""&&!we)return de.pos!==null?de:{ln:ke.ln,pos:ke.pos};if(!(!m(ke.line[ke.pos])||de.pos===null||ke.ln===de.ln&&ke.pos+1===de.pos))return de;ke.line!==""&&!h(ke.line[ke.pos])&&(we=!1,de={ln:ke.ln,pos:ke.pos}),B(J,ke)}var Ie=J.getLine(de.ln);de.pos=0;for(var Ee=0;Ee<Ie.length;++Ee)if(!h(Ie[Ee])){de.pos=Ee;break}return de}for(var Y={ln:A.line,pos:A.ch};x>0;)D<0?Y=K(f,Y.ln,Y.pos,D):Y=H(f,Y.ln,Y.pos,D),x--;return new Oe(Y.ln,Y.pos)}function $n(f,A,x,D){var B=A,H,K,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[x],J={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[x],ie=f.getLine(B.line).charAt(B.ch),se=ie===J?1:0;if(H=f.scanForBracket(new Oe(B.line,B.ch+se),-1,void 0,{bracketRegex:Y}),K=f.scanForBracket(new Oe(B.line,B.ch+se),1,void 0,{bracketRegex:Y}),!H||!K)return null;if(H=H.pos,K=K.pos,H.line==K.line&&H.ch>K.ch||H.line>K.line){var ye=H;H=K,K=ye}return D?K.ch+=1:H.ch+=1,{start:H,end:K}}function ei(f,A,x,D){var B=Ke(A),H=f.getLine(B.line),K=H.split(""),Y,J,ie,se,ye=K.indexOf(x);if(B.ch<ye)B.ch=ye;else if(ye<B.ch&&K[B.ch]==x){var ke=/string/.test(f.getTokenTypeAt(ve(A,0,1))),de=/string/.test(f.getTokenTypeAt(A)),we=ke&&!de;we||(J=B.ch,--B.ch)}if(K[B.ch]==x&&!J)Y=B.ch+1;else for(ie=B.ch;ie>-1&&!Y;ie--)K[ie]==x&&(Y=ie+1);if(Y&&!J)for(ie=Y,se=K.length;ie<se&&!J;ie++)K[ie]==x&&(J=ie);return!Y||!J?{start:B,end:B}:(D&&(--Y,++J),{start:new Oe(B.line,Y),end:new Oe(B.line,J)})}function ir(){}function gn(f){var A=f.state.vim;return A.searchState_||(A.searchState_=new ir)}function ti(f){return rr(f,"/")}function mr(f){return wo(f,"/")}function rr(f,A){var x=wo(f,A)||[];if(!x.length)return[];var D=[];if(x[0]===0){for(var B=0;B<x.length;B++)typeof x[B]=="number"&&D.push(f.substring(x[B]+1,x[B+1]));return D}}function wo(f,A){A||(A="/");for(var x=!1,D=[],B=0;B<f.length;B++){var H=f.charAt(B);!x&&H==A&&D.push(B),x=!x&&H=="\\"}return D}function qo(f){for(var A="|(){",x="}",D=!1,B=[],H=-1;H<f.length;H++){var K=f.charAt(H)||"",Y=f.charAt(H+1)||"",J=Y&&A.indexOf(Y)!=-1;D?((K!=="\\"||!J)&&B.push(K),D=!1):K==="\\"?(D=!0,Y&&x.indexOf(Y)!=-1&&(J=!0),(!J||Y==="\\")&&B.push(K)):(B.push(K),J&&Y!=="\\"&&B.push("\\"))}return B.join("")}function Ss(f){for(var A=!1,x=[],D=-1;D<f.length;D++){var B=f.charAt(D)||"",H=f.charAt(D+1)||"";Ki[B+H]?(x.push(Ki[B+H]),D++):A?(x.push(B),A=!1):B==="\\"?(A=!0,n(H)||H==="$"?x.push("$"):H!=="/"&&H!=="\\"&&x.push("\\")):(B==="$"&&x.push("$"),x.push(B),H==="/"&&x.push("\\"))}return x.join("")}function Cs(f){for(var A=new Fe.StringStream(f),x=[];!A.eol();){for(;A.peek()&&A.peek()!="\\";)x.push(A.next());var D=!1;for(var B in Un)if(A.match(B,!0)){D=!0,x.push(Un[B]);break}D||x.push(A.next())}return x.join("")}function or(f,A,x){var D=He.registerController.getRegister("/");if(D.setText(f),f instanceof RegExp)return f;var B=mr(f),H,K;if(!B.length)H=f;else{H=f.substring(0,B[0]);var Y=f.substring(B[0]);K=Y.indexOf("i")!=-1}if(!H)return null;C("pcre")||(H=qo(H)),x&&(A=/^[^A-Z]*$/.test(H));var J=new RegExp(H,A||K?"im":"m");return J}function Ai(f){typeof f=="string"&&(f=document.createElement(f));for(var A,x=1;x<arguments.length;x++)if(A=arguments[x])if(typeof A!="object"&&(A=document.createTextNode(A)),A.nodeType)f.appendChild(A);else for(var D in A)Object.prototype.hasOwnProperty.call(A,D)&&(D[0]==="$"?f.style[D.slice(1)]=A[D]:f.setAttribute(D,A[D]));return f}function Nt(f,A){var x=Ai("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},A);f.openNotification?f.openNotification(x,{bottom:!0,duration:5e3}):alert(x.innerText)}function Yo(f,A){return Ai("div",{$display:"flex"},Ai("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},f,Ai("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),A&&Ai("span",{$color:"#888"},A))}function ni(f,A){if(ci.length){A.value||(A.value=""),cn=A;return}var x=Yo(A.prefix,A.desc);if(f.openDialog)f.openDialog(x,A.onClose,{onKeyDown:A.onKeyDown,onKeyUp:A.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:A.value});else{var D="";typeof A.prefix!="string"&&A.prefix&&(D+=A.prefix.textContent),A.desc&&(D+=" "+A.desc),A.onClose(prompt(D,""))}}function Mn(f,A){if(f instanceof RegExp&&A instanceof RegExp){for(var x=["global","multiline","ignoreCase","source"],D=0;D<x.length;D++){var B=x[D];if(f[B]!==A[B])return!1}return!0}return!1}function an(f,A,x,D){if(A){var B=gn(f),H=or(A,!!x,!!D);if(H)return Wi(f,H),Mn(H,B.getQuery())||B.setQuery(H),H}}function bn(f){if(f.source.charAt(0)=="^")var A=!0;return{token:function(x){if(A&&!x.sol()){x.skipToEnd();return}var D=x.match(f,!1);if(D)return D[0].length==0?(x.next(),"searching"):!x.sol()&&(x.backUp(1),!f.exec(x.next()+D[0]))?(x.next(),null):(x.match(f),"searching");for(;!x.eol()&&(x.next(),!x.match(f,!1)););},query:f}}function Wi(f,A){clearTimeout(Vn);var x=gn(f);x.highlightTimeout=Vn,Vn=setTimeout(function(){if(f.state.vim){var D=gn(f);D.highlightTimeout=null;var B=D.getOverlay();(!B||A!=B.query)&&(B&&f.removeOverlay(B),B=bn(A),f.addOverlay(B),f.showMatchesOnScrollbar&&(D.getScrollbarAnnotate()&&D.getScrollbarAnnotate().clear(),D.setScrollbarAnnotate(f.showMatchesOnScrollbar(A))),D.setOverlay(B))}},50)}function ii(f,A,x,D){return D===void 0&&(D=1),f.operation(function(){for(var B=f.getCursor(),H=f.getSearchCursor(x,B),K=0;K<D;K++){var Y=H.find(A);if(K==0&&Y&&at(H.from(),B)){var J=A?H.from():H.to();Y=H.find(A),Y&&!Y[0]&&at(H.from(),J)&&f.getLine(J.line).length==J.ch&&(Y=H.find(A))}if(!Y&&(H=f.getSearchCursor(x,A?new Oe(f.lastLine()):new Oe(f.firstLine(),0)),!H.find(A)))return}return H.from()})}function Hi(f,A,x,D,B){return D===void 0&&(D=1),f.operation(function(){var H=f.getCursor(),K=f.getSearchCursor(x,H),Y=K.find(!A);!B.visualMode&&Y&&at(K.from(),H)&&K.find(!A);for(var J=0;J<D;J++)if(Y=K.find(A),!Y&&(K=f.getSearchCursor(x,A?new Oe(f.lastLine()):new Oe(f.firstLine(),0)),!K.find(A)))return;return[K.from(),K.to()]})}function Zr(f){var A=gn(f);A.highlightTimeout&&(clearTimeout(A.highlightTimeout),A.highlightTimeout=null),f.removeOverlay(gn(f).getOverlay()),A.setOverlay(null),A.getScrollbarAnnotate()&&(A.getScrollbarAnnotate().clear(),A.setScrollbarAnnotate(null))}function bo(f,A,x){return typeof f!="number"&&(f=f.line),A instanceof Array?y(f,A):typeof x=="number"?f>=A&&f<=x:f==A}function vr(f){var A=f.ace.renderer;return{top:A.getFirstFullyVisibleRow(),bottom:A.getLastFullyVisibleRow()}}function vi(f,A,x){if(x=="'"||x=="`")return He.jumpList.find(f,-1)||new Oe(0,0);if(x==".")return Lr(f);var D=A.marks[x];return D&&D.find()}function Lr(f){if(f.getLastEditEnd)return f.getLastEditEnd();for(var A=f.doc.history.done,x=A.length;x--;)if(A[x].changes)return Ke(A[x].changes[0].to)}function Jr(f,A,x,D,B,H,K,Y,J){function ie(){f.operation(function(){for(;!Ie;)se(),ke();de()})}function se(){var Xe=f.getRange(H.from(),H.to()),Ze=Xe.replace(K,Y),Xt=H.to().line;H.replace(Ze),ze=H.to().line,B+=ze-Xt,nt=ze<Xt}function ye(){var Xe=Ee&&Ke(H.to()),Ze=H.findNext();return Ze&&!Ze[0]&&Xe&&at(H.from(),Xe)&&(Ze=H.findNext()),Ze}function ke(){for(;ye()&&bo(H.from(),D,B);)if(!(!x&&H.from().line==ze&&!nt)){f.scrollIntoView(H.from(),30),f.setSelection(H.from(),H.to()),Ee=H.from(),Ie=!1;return}Ie=!0}function de(Xe){if(Xe&&Xe(),f.focus(),Ee){f.setCursor(Ee);var Ze=f.state.vim;Ze.exMode=!1,Ze.lastHPos=Ze.lastHSPos=Ee.ch}J&&J()}function we(Xe,Ze,Xt){Fe.e_stop(Xe);var rt=U(Xe);switch(rt){case"y":se(),ke();break;case"n":ke();break;case"a":var dn=J;J=void 0,f.operation(ie),J=dn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":de(Xt)}return Ie&&de(Xt),!0}f.state.vim.exMode=!0;var Ie=!1,Ee,ze,nt;if(ke(),Ie){Nt(f,"No matches for "+K.source);return}if(!A){ie(),J&&J();return}ni(f,{prefix:Ai("span","replace with ",Ai("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function yi(f,A){var x=f.state.vim,D=He.macroModeState,B=He.registerController.getRegister("."),H=D.isPlaying,K=D.lastInsertModeChanges;H||(f.off("change",Er),x.insertEnd&&x.insertEnd.clear(),x.insertEnd=null,Fe.off(f.getInputField(),"keydown",So)),!H&&x.insertModeRepeat>1&&(Qo(f,x,x.insertModeRepeat-1,!0),x.lastEditInputState.repeatOverride=x.insertModeRepeat),delete x.insertModeRepeat,x.insertMode=!1,A||f.setCursor(f.getCursor().line,f.getCursor().ch-1),f.setOption("keyMap","vim"),f.setOption("disableInput",!0),f.toggleOverwrite(!1),B.setText(K.changes.join("")),Fe.signal(f,"vim-mode-change",{mode:"normal"}),D.isRecording&&Fn(D)}function Xr(f){mn.unshift(f)}function xo(f,A,x,D,B){var H={keys:f,type:A};H[A]=x,H[A+"Args"]=D;for(var K in B)H[K]=B[K];Xr(H)}function ko(f,A,x,D){var B=He.registerController.getRegister(D);if(D==":"){B.keyBuffer[0]&&Jn.processCommand(f,B.keyBuffer[0]),x.isPlaying=!1;return}var H=B.keyBuffer,K=0;x.isPlaying=!0,x.replaySearchQueries=B.searchQueries.slice(0);for(var Y=0;Y<H.length;Y++)for(var J=H[Y],ie,se;J;)if(ie=/<\w+-.+?>|<\w+>|./.exec(J),se=ie[0],J=J.substring(ie.index+se.length),mt.handleKey(f,se,"macro"),A.insertMode){var ye=B.insertModeChanges[K++].changes;He.macroModeState.lastInsertModeChanges.changes=ye,ro(f,ye,1),yi(f)}x.isPlaying=!1}function eo(f,A){if(!f.isPlaying){var x=f.latestRegister,D=He.registerController.getRegister(x);D&&D.pushText(A)}}function Fn(f){if(!f.isPlaying){var A=f.latestRegister,x=He.registerController.getRegister(A);x&&x.pushInsertModeChanges&&x.pushInsertModeChanges(f.lastInsertModeChanges)}}function _o(f,A){if(!f.isPlaying){var x=f.latestRegister,D=He.registerController.getRegister(x);D&&D.pushSearchQuery&&D.pushSearchQuery(A)}}function Er(f,A){var x=He.macroModeState,D=x.lastInsertModeChanges;if(!x.isPlaying)for(var B=f.state.vim;A;){if(D.expectCursorActivityForChange=!0,D.ignoreCount>1)D.ignoreCount--;else if(A.origin=="+input"||A.origin=="paste"||A.origin===void 0){var H=f.listSelections().length;H>1&&(D.ignoreCount=H);var K=A.text.join(`
1402
- `);if(D.maybeReset&&(D.changes=[],D.maybeReset=!1),K)if(f.state.overwrite&&!/\n/.test(K))D.changes.push([K]);else{if(K.length>1){var Y=B&&B.insertEnd&&B.insertEnd.find(),J=f.getCursor();if(Y&&Y.line==J.line){var ie=Y.ch-J.ch;ie>0&&ie<K.length&&(D.changes.push([K,ie]),K="")}}K&&D.changes.push(K)}}A=A.next}}function to(f){var A=f.state.vim;if(A.insertMode){var x=He.macroModeState;if(x.isPlaying)return;var D=x.lastInsertModeChanges;D.expectCursorActivityForChange?D.expectCursorActivityForChange=!1:(D.maybeReset=!0,A.insertEnd&&A.insertEnd.clear(),A.insertEnd=f.setBookmark(f.getCursor(),{insertLeft:!0}))}else f.curOp.isVimOp||no(f,A)}function no(f,A,x){var D=f.getCursor("anchor"),B=f.getCursor("head");if(A.visualMode&&!f.somethingSelected()?bt(f,!1):!A.visualMode&&!A.insertMode&&f.somethingSelected()&&(A.visualMode=!0,A.visualLine=!1,Fe.signal(f,"vim-mode-change",{mode:"visual"})),A.visualMode){var H=et(B,D)?0:-1,K=et(B,D)?-1:0;B=ve(B,0,H),D=ve(D,0,K),A.sel={anchor:D,head:B},Ci(f,A,"<",lt(B,D)),Ci(f,A,">",jt(B,D))}else!A.insertMode&&!x&&(A.lastHPos=f.getCursor().ch)}function yr(f,A){this.keyName=f,this.key=A.key,this.ctrlKey=A.ctrlKey,this.altKey=A.altKey,this.metaKey=A.metaKey,this.shiftKey=A.shiftKey}function So(f){var A=He.macroModeState,x=A.lastInsertModeChanges,D=Fe.keyName?Fe.keyName(f):f.key;D&&(D.indexOf("Delete")!=-1||D.indexOf("Backspace")!=-1)&&(x.maybeReset&&(x.changes=[],x.maybeReset=!1),x.changes.push(new yr(D,f)))}function Qo(f,A,x,D){function B(){Y?kn.processAction(f,A,A.lastEditActionCommand):kn.evalInput(f,A)}function H(se){if(K.lastInsertModeChanges.changes.length>0){se=A.lastEditActionCommand?se:1;var ye=K.lastInsertModeChanges;ro(f,ye.changes,se)}}var K=He.macroModeState;K.isPlaying=!0;var Y=!!A.lastEditActionCommand,J=A.inputState;if(A.inputState=A.lastEditInputState,Y&&A.lastEditActionCommand.interlaceInsertRepeat)for(var ie=0;ie<x;ie++)B(),H(1);else D||B(),H(x);A.inputState=J,A.insertMode&&!D&&yi(f),K.isPlaying=!1}function io(f,A){Fe.lookupKey(A,"vim-insert",function(x){return typeof x=="string"?Fe.commands[x](f):x(f),!0})}function ro(f,A,x){var D=f.getCursor("head"),B=He.macroModeState.lastInsertModeChanges.visualBlock;B&&(In(f,D,B+1),x=f.listSelections().length,f.setCursor(D));for(var H=0;H<x;H++){B&&f.setCursor(ve(D,H,0));for(var K=0;K<A.length;K++){var Y=A[K];if(Y instanceof yr)io(f,Y.keyName);else if(typeof Y=="string")f.replaceSelection(Y);else{var J=f.getCursor(),ie=ve(J,0,Y[0].length-(Y[1]||0));f.replaceRange(Y[0],J,Y[1]?J:ie),f.setCursor(ie)}}}B&&f.setCursor(ve(D,0,1))}function Co(f,A,x,D){A.length>1&&A[0]=="n"&&(A=A.replace("numpad","")),A=ri[A]||A;var B="";if(x.ctrlKey&&(B+="C-"),x.altKey&&(B+="A-"),(B||A.length>1)&&x.shiftKey&&(B+="S-"),D&&!D.expectLiteralNext&&A.length==1){if(Tn.keymap&&A in Tn.keymap)(Tn.remapCtrl!==!1||!B)&&(A=Tn.keymap[A]);else if(A.charCodeAt(0)>255){var H=x.code&&x.code.slice(-1)||"";x.shiftKey||(H=H.toLowerCase()),H&&(A=H)}}return B+=A,B.length>1&&(B="<"+B+">"),B}function oo(f){var A=new f.constructor;return Object.keys(f).forEach(function(x){if(x!="insertEnd"){var D=f[x];Array.isArray(D)?D=D.slice():D&&typeof D=="object"&&D.constructor!=Object&&(D=oo(D)),A[x]=D}}),f.sel&&(A.sel={head:f.sel.head&&Ke(f.sel.head),anchor:f.sel.anchor&&Ke(f.sel.anchor)}),A}function Rr(f,A,x){var D=!1,B=mt.maybeInitVimState_(f),H=B.visualBlock||B.wasInVisualBlock,K=f.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!K?B.wasInVisualBlock=!1:K&&B.visualBlock&&(B.wasInVisualBlock=!0),A=="<Esc>"&&!B.insertMode&&!B.visualMode&&K)f.ace.exitMultiSelectMode();else if(H||!K||f.ace.inVirtualSelectionMode)D=mt.handleKey(f,A,x);else{var Y=oo(B),J=B.inputState.changeQueueList||[];f.operation(function(){f.curOp.isVimOp=!0;var ie=0;f.ace.forEachSelection(function(){var se=f.ace.selection;f.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,f.state.vim.inputState.changeQueue=J[ie];var ye=f.getCursor("head"),ke=f.getCursor("anchor"),de=et(ye,ke)?0:-1,we=et(ye,ke)?-1:0;ye=ve(ye,0,de),ke=ve(ke,0,we),f.state.vim.sel.head=ye,f.state.vim.sel.anchor=ke,D=Li(f,A,x),se.$desiredColumn=f.state.vim.lastHPos==-1?null:f.state.vim.lastHPos,f.ace.inVirtualSelectionMode&&(J[ie]=f.state.vim.inputState.changeQueue),f.virtualSelectionMode()&&(f.state.vim=oo(Y)),ie++}),f.curOp.cursorActivity&&!D&&(f.curOp.cursorActivity=!1),B.status=f.state.vim.status,f.state.vim=B,B.inputState.changeQueueList=J,B.inputState.changeQueue=null},!0)}return D&&!B.visualMode&&!B.insert&&B.visualMode!=f.somethingSelected()&&no(f,B,!0),D}function zi(f,A){A.off("beforeEndOperation",zi);var x=A.state.cm.vimCmd;x&&A.execCommand(x.exec?x:x.name,x.args),A.curOp=A.prevOp}var Pn=e("../range").Range,wr=e("../lib/event_emitter").EventEmitter,sr=e("../lib/dom"),Zo=e("../lib/oop"),As=e("../lib/keys"),Ir=e("../lib/event"),ar=e("../search").Search,Or=e("../lib/useragent"),so=e("../search_highlight").SearchHighlight,Nr=e("../commands/multi_select_commands"),Jo=e("../mode/text").Mode.prototype.tokenRe,br=e("../ext/hardwrap").hardWrap;e("../multi_select");var Fe=function(f){this.ace=f,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};Fe.Pos=function(f,A){if(!(this instanceof Oe))return new Oe(f,A);this.line=f,this.ch=A},Fe.defineOption=function(f,A,x){},Fe.commands={redo:function(f){f.ace.redo()},undo:function(f){f.ace.undo()},newlineAndIndent:function(f){f.ace.insert(`
1403
- `)},goLineLeft:function(f){f.ace.selection.moveCursorLineStart()},goLineRight:function(f){f.ace.selection.moveCursorLineEnd()}},Fe.keyMap={},Fe.addClass=Fe.rmClass=function(){},Fe.e_stop=Fe.e_preventDefault=Ir.stopEvent,Fe.keyName=function(f){var A=As[f.keyCode]||f.key||"";return A.length==1&&(A=A.toUpperCase()),A=Ir.getModifierString(f).replace(/(^|-)\w/g,function(x){return x.toUpperCase()})+A,A},Fe.keyMap.default=function(f){return function(A){var x=A.ace.commands.commandKeyBinding[f.toLowerCase()];return x&&A.ace.execCommand(x)!==!1}},Fe.lookupKey=function f(A,x,D){x||(x="default"),typeof x=="string"&&(x=Fe.keyMap[x]||Fe.keyMap.default);var B=typeof x=="function"?x(A):x[A];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&D(B))return"handled";if(x.fallthrough){if(!Array.isArray(x.fallthrough))return f(A,x.fallthrough,D);for(var H=0;H<x.fallthrough.length;H++){var K=f(A,x.fallthrough[H],D);if(K)return K}}},Fe.findMatchingTag=function(f,A){return f.findMatchingTag(A)},Fe.findEnclosingTag=function(f,A){},Fe.signal=function(f,A,x){return f._signal(A,x)},Fe.on=Ir.addListener,Fe.off=Ir.removeListener,Fe.isWordChar=function(f){return f<""?/^\w$/.test(f):(Jo.lastIndex=0,Jo.test(f))},(function(){Zo.implement(Fe.prototype,wr),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(x){this.$lineHandleChanges&&this.$lineHandleChanges.push(x);var D={text:x.action[0]=="i"?x.lines:[]},B=this.curOp=this.curOp||{};B.changeHandlers||(B.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),B.lastChange?B.lastChange.next=B.lastChange=D:B.lastChange=B.change=D,this.$updateMarkers(x)},this.onSelectionChange=function(){var x=this.curOp=this.curOp||{};x.cursorActivityHandlers||(x.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Nr.keyboardHandler)},this.operation=function(x,D){if(!D&&this.curOp||D&&this.curOp&&this.curOp.force)return x();if((D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var B=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var H=this.curOp=this.curOp||{};this.curOp.force=D;var K=x();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!H.cursorActivity&&!H.lastChange&&B&&(this.ace.prevOp=B)),(D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),K},this.onBeforeEndOperation=function(){var x=this.curOp;x&&(x.change&&this.signal("change",x.change,x),x&&x.cursorActivity&&this.signal("cursorActivity",null,x),this.curOp=null)},this.signal=function(x,D,B){var H=B?B[x+"Handlers"]:(this._eventRegistry||{})[x];if(H){H=H.slice();for(var K=0;K<H.length;K++)H[K](this,D)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(x,D){typeof x=="object"&&(D=x.ch,x=x.line);var B=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:x,column:D}),this.ace.selection.moveTo(x,D),B&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(x){var D=this.ace.selection,B=x=="anchor"?D.isEmpty()?D.lead:D.anchor:x=="head"||!x?D.lead:D.getRange()[x];return w(B)},this.listSelections=function(x){var D=this.ace.multiSelect.rangeList.ranges;return!D.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:D.map(function(B){return{anchor:this.clipPos(w(B.cursor==B.end?B.start:B.end)),head:this.clipPos(w(B.cursor))}},this)},this.setSelections=function(x,D){var B=this.ace.multiSelect,H=x.map(function(ie){var se=b(ie.anchor),ye=b(ie.head),ke=Pn.comparePoints(se,ye)<0?new Pn.fromPoints(se,ye):new Pn.fromPoints(ye,se);return ke.cursor=Pn.comparePoints(ke.start,ye)?ke.end:ke.start,ke});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(H[0]);return}D?H[D]&&H.push(H.splice(D,1)[0]):H=H.reverse(),B.toSingleRange(H[0].clone());for(var K=this.ace.session,Y=0;Y<H.length;Y++){var J=K.$clipRangeToDocument(H[Y]);B.addRange(J)}},this.setSelection=function(x,D,B){var H=this.ace.selection;H.moveTo(x.line,x.ch),H.selectTo(D.line,D.ch),B&&B.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(x){return!this.ace.selection.isEmpty()},this.clipPos=function(x){var D=this.ace.session.$clipPositionToDocument(x.line,x.ch);return w(D)},this.foldCode=function(x){this.ace.session.$toggleFoldWidget(x.line,{})},this.markText=function(x){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(x){var D=x.action=="insert",B=x.start,H=x.end,K=(H.row-B.row)*(D?1:-1),Y=(H.column-B.column)*(D?1:-1);D&&(H=B);for(var J in this.marks){var ie=this.marks[J],se=Pn.comparePoints(ie,B);if(!(se<0)){if(se===0&&D)if(!ie.$insertRight)se=1;else{if(ie.bias!=1){ie.bias=-1;continue}se=1}var ye=D?se:Pn.comparePoints(ie,H);if(ye>0){ie.row+=K,ie.column+=ie.row==H.row?Y:0;continue}!D&&ye<=0&&(ie.row=B.row,ie.column=B.column,ye===0&&(ie.bias=1))}}};var f=function(x,D,B,H){this.cm=x,this.id=D,this.row=B,this.column=H,x.marks[this.id]=this};f.prototype.clear=function(){delete this.cm.marks[this.id]},f.prototype.find=function(){return w(this)},this.setBookmark=function(x,D){var B=new f(this,this.$uid++,x.line,x.ch);return(!D||!D.insertLeft)&&(B.$insertRight=!0),this.marks[B.id]=B,B},this.moveH=function(x,D){if(D=="char"){var B=this.ace.selection;B.clearSelection(),B.moveCursorBy(0,x)}},this.findPosV=function(x,D,B,H){if(B=="page"){var K=this.ace.renderer,Y=K.layerConfig;D*=Math.floor(Y.height/Y.lineHeight),B="line"}if(B=="line"){var J=this.ace.session.documentToScreenPosition(x.line,x.ch);H!=null&&(J.column=H),J.row+=D,J.row=Math.min(Math.max(0,J.row),this.ace.session.getScreenLength()-1);var ie=this.ace.session.screenToDocumentPosition(J.row,J.column);return w(ie)}debugger},this.charCoords=function(x,D){if(D=="div"||!D){var B=this.ace.session.documentToScreenPosition(x.line,x.ch);return{left:B.column,top:B.row}}if(D=="local"){var H=this.ace.renderer,B=this.ace.session.documentToScreenPosition(x.line,x.ch),K=H.layerConfig.lineHeight,Y=H.layerConfig.characterWidth,J=K*B.row;return{left:B.column*Y,top:J,bottom:J+K}}},this.coordsChar=function(x,D){var B=this.ace.renderer;if(D=="local"){var H=Math.max(0,Math.floor(x.top/B.lineHeight)),K=Math.max(0,Math.floor(x.left/B.characterWidth)),Y=B.session.screenToDocumentPosition(H,K);return w(Y)}if(D=="div")throw"not implemented"},this.getSearchCursor=function(x,D,B){var H=!1,K=!1;x instanceof RegExp&&!x.global&&(H=!x.ignoreCase,x=x.source,K=!0),x=="\\n"&&(x=`
1404
- `,K=!1);var Y=new ar;D.ch==null&&(D.ch=Number.MAX_VALUE);var J={row:D.line,column:D.ch},ie=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:x,caseSensitive:H,wrap:!1,backwards:ye,regExp:K,start:se||J});var ke=Y.find(ie.ace.session);return se=ke,se&&[!se.isEmpty()]},from:function(){return se&&w(se.start)},to:function(){return se&&w(se.end)},replace:function(ye){se&&(se.end=ie.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(x,D){var B=this.ace.renderer,H=B.layerConfig,K=H.maxHeight;K-=(B.$size.scrollerHeight-B.lineHeight)*B.$scrollPastEnd,D!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(D,K))),x!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(x,H.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(x,D){if(x){var B=this.ace.renderer,H={top:0,bottom:D};B.scrollCursorIntoView(b(x),B.lineHeight*2/B.$size.scrollerHeight,H)}},this.getLine=function(x){return this.ace.session.getLine(x)},this.getRange=function(x,D){return this.ace.session.getTextRange(new Pn(x.line,x.ch,D.line,D.ch))},this.replaceRange=function(x,D,B){B||(B=D);var H=new Pn(D.line,D.ch,B.line,B.ch);return this.ace.session.$clipRangeToDocument(H),this.ace.session.replace(H,x)},this.replaceSelection=this.replaceSelections=function(x){var D=Array.isArray(x)&&x,B=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(B.getRange(),D?x[0]||"":x);return}B.inVirtualSelectionMode=!0;var H=B.rangeList.ranges;H.length||(H=[this.ace.multiSelect.getRange()]);for(var K=H.length;K--;)this.ace.session.replace(H[K],D?x[K]||"":x);B.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(x){return this.getRange(x.anchor,x.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var A={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(x,D){switch(this.state[x]=D,x){case"indentWithTabs":x=A[x],D=!D;break;case"keyMap":this.state.$keyMap=D;return;default:x=A[x]}x&&this.ace.setOption(x,D)},this.getOption=function(x){var D,B=A[x];switch(B&&(D=this.ace.getOption(B)),x){case"indentWithTabs":return x=A[x],!D;case"keyMap":return this.state.$keyMap||"vim"}return B?D:this.state[x]},this.toggleOverwrite=function(x){return this.state.overwrite=x,this.ace.setOverwrite(x)},this.addOverlay=function(x){if(!this.$searchHighlight||!this.$searchHighlight.session){var D=new so(null,"ace_highlight-marker","text"),B=this.ace.session.addDynamicMarker(D);D.id=B.id,D.session=this.ace.session,D.destroy=function(K){D.session.off("change",D.updateOnChange),D.session.off("changeEditor",D.destroy),D.session.removeMarker(D.id),D.session=null},D.updateOnChange=function(K){var Y=K.start.row;Y==K.end.row?D.cache[Y]=void 0:D.cache.splice(Y,D.cache.length)},D.session.on("changeEditor",D.destroy),D.session.on("change",D.updateOnChange)}var H=new RegExp(x.query.source,"gmi");this.$searchHighlight=x.highlight=D,this.$searchHighlight.setRegexp(H),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(x){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var x=this.ace.renderer,D=x.layerConfig;return{left:x.scrollLeft,top:x.scrollTop,height:D.maxHeight,width:D.width,clientHeight:D.height,clientWidth:D.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(x){return this.ace.setValue(x,-1)},this.getTokenTypeAt=function(x){var D=this.ace.session.getTokenAt(x.line,x.ch);return D&&/comment|string/.test(D.type)?"string":""},this.findMatchingBracket=function(x){var D=this.ace.session.findMatchingBracket(b(x));return{to:D&&w(D)}},this.findMatchingTag=function(x){var D=this.ace.session.getMatchingTags(b(x));if(D)return{open:{from:w(D.openTag.start),to:w(D.openTag.end)},close:{from:w(D.closeTag.start),to:w(D.closeTag.end)}}},this.indentLine=function(x,D){D===!0?this.ace.session.indentRows(x,x," "):D===!1&&this.ace.session.outdentRows(new Pn(x,0,x,0))},this.indexFromPos=function(x){return this.ace.session.doc.positionToIndex(b(x))},this.posFromIndex=function(x){return w(this.ace.session.doc.indexToPosition(x))},this.focus=function(x){return this.ace.textInput.focus()},this.blur=function(x){return this.ace.blur()},this.defaultTextHeight=function(x){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(x,D,B,H){var K=H.bracketRegex.source,Y=/paren|text|operator|tag/;if(D==1)var J=this.ace.session.$findClosingBracket(K.slice(1,2),b(x),Y);else{var J=this.ace.session.$findOpeningBracket(K.slice(-2,-1),{row:x.line,column:x.ch+1},Y);!J&&H.bracketRegex&&H.bracketRegex.test(this.getLine(x.line)[x.ch-1])&&(J={row:x.line,column:x.ch-1})}return J&&{pos:w(J)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(x){if(Fe.commands.hasOwnProperty(x))return Fe.commands[x](this);if(x=="indentAuto")return this.ace.execCommand("autoindent");console.log(x+" is not implemented")},this.getLineNumber=function(x){var D=this.$lineHandleChanges;if(!D)return null;for(var B=x.row,H=0;H<D.length;H++){var K=D[H];if(K.start.row!=K.end.row){if(K.action[0]=="i")K.start.row<B&&(B+=K.end.row-K.start.row);else if(K.start.row<B){if(B<K.end.row||B==K.end.row&&K.start.column>0)return null;B-=K.end.row-K.start.row}}}return B},this.getLineHandle=function(x){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(x),row:x}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var x=this.ace.session.$undoManager;if(x&&x.$lastDelta)return w(x.$lastDelta.end)}}).call(Fe.prototype);var Xo=Fe.StringStream=function(f,A){this.pos=this.start=0,this.string=f,this.tabSize=A||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Xo.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(f){var A=this.string.charAt(this.pos);if(typeof f=="string")var x=A==f;else var x=A&&(f.test?f.test(A):f(A));if(x)return++this.pos,A},eatWhile:function(f){for(var A=this.pos;this.eat(f););return this.pos>A},eatSpace:function(){for(var f=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>f},skipToEnd:function(){this.pos=this.string.length},skipTo:function(f){var A=this.string.indexOf(f,this.pos);if(A>-1)return this.pos=A,!0},backUp:function(f){this.pos-=f},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(f,A,x){if(typeof f!="string"){var D=this.string.slice(this.pos).match(f);return D&&D.index>0?null:(D&&A!==!1&&(this.pos+=D[0].length),D)}var B=function(K){return x?K.toLowerCase():K},H=this.string.substr(this.pos,f.length);if(B(H)==B(f))return A!==!1&&(this.pos+=f.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(f,A){this.lineStart+=f;try{return A()}finally{this.lineStart-=f}}},Fe.defineExtension=function(f,A){Fe.prototype[f]=A},sr.importCssString(`.normal-mode .ace_cursor{
1405
- border: none;
1406
- background-color: rgba(255,0,0,0.5);
1407
- }
1408
- .normal-mode .ace_hidden-cursors .ace_cursor{
1409
- background-color: transparent;
1410
- border: 1px solid red;
1411
- opacity: 0.7
1412
- }
1413
- .ace_dialog {
1414
- position: absolute;
1415
- left: 0; right: 0;
1416
- background: inherit;
1417
- z-index: 15;
1418
- padding: .1em .8em;
1419
- overflow: hidden;
1420
- color: inherit;
1421
- }
1422
- .ace_dialog-top {
1423
- border-bottom: 1px solid #444;
1424
- top: 0;
1425
- }
1426
- .ace_dialog-bottom {
1427
- border-top: 1px solid #444;
1428
- bottom: 0;
1429
- }
1430
- .ace_dialog input {
1431
- border: none;
1432
- outline: none;
1433
- background: transparent;
1434
- width: 20em;
1435
- color: inherit;
1436
- font-family: monospace;
1437
- }`,"vimMode",!1),function(){function f(x,D,B){var H=x.ace.container,K;return K=H.appendChild(document.createElement("div")),B?K.className="ace_dialog ace_dialog-bottom":K.className="ace_dialog ace_dialog-top",typeof D=="string"?K.innerHTML=D:K.appendChild(D),K}function A(x,D){x.state.currentNotificationClose&&x.state.currentNotificationClose(),x.state.currentNotificationClose=D}Fe.defineExtension("openDialog",function(x,D,B){function H(ye){if(typeof ye=="string")ie.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===ie)return;J.state.dialog==K&&(J.state.dialog=null,J.focus()),Y=!0,K.remove(),B.onClose&&B.onClose(K);var ke=J;ke.state.vim&&(ke.state.vim.status=null,ke.ace._signal("changeStatus"),ke.ace.renderer.$loop.schedule(ke.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){B||(B={}),A(this,null);var K=f(this,x,B.bottom),Y=!1,J=this;this.state.dialog=K;var ie=K.getElementsByTagName("input")[0],se;return ie?(B.value&&(ie.value=B.value,B.selectValueOnOpen!==!1&&ie.select()),B.onInput&&Fe.on(ie,"input",function(ye){B.onInput(ye,ie.value,H)}),B.onKeyUp&&Fe.on(ie,"keyup",function(ye){B.onKeyUp(ye,ie.value,H)}),Fe.on(ie,"keydown",function(ye){B&&B.onKeyDown&&B.onKeyDown(ye,ie.value,H)||(ye.keyCode==13&&D(ie.value),(ye.keyCode==27||B.closeOnEnter!==!1&&ye.keyCode==13)&&(Fe.e_stop(ye),H()))}),B.closeOnBlur!==!1&&Fe.on(ie,"blur",H),ie.focus()):(se=K.getElementsByTagName("button")[0])&&(Fe.on(se,"click",function(){H(),J.focus()}),B.closeOnBlur!==!1&&Fe.on(se,"blur",H),se.focus()),H}}),Fe.defineExtension("openNotification",function(x,D){function B(){K||(K=!0,clearTimeout(Y),H.remove())}if(!this.virtualSelectionMode()){A(this,B);var H=f(this,x,D&&D.bottom),K=!1,Y,J=D&&typeof D.duration<"u"?D.duration:5e3;return Fe.on(H,"click",function(ie){Fe.e_preventDefault(ie),B()}),J&&(Y=setTimeout(B,J)),B}})}();var Oe=Fe.Pos,mn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Dr=mn.length,$i=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],Tn=O(""),es=/[\d]/,Fr=[Fe.isWordChar,function(f){return f&&!Fe.isWordChar(f)&&!/\s/.test(f)}],Ui=[function(f){return/\S/.test(f)}],xr=["<",">"],Kt=["-",'"',".",":","_","/","+"],Ut=/^\w$/,Gt;try{Gt=new RegExp("^[\\p{Lu}]$","u")}catch{Gt=/^[A-Z]$/}var Dt={};R("filetype",void 0,"string",["ft"],function(f,A){if(A!==void 0){if(f===void 0){var x=A.getOption("mode");return x=="null"?"":x}var x=f==""?"null":f;A.setOption("mode",x)}}),R("textwidth",80,"number",["tw"],function(f,A){if(A!==void 0){if(f===void 0){var x=A.getOption("textwidth");return x}var D=Math.round(f);D>1&&A.setOption("textwidth",D)}});var Vi=function(){function f(J,ie,se){function ye(Ie){var Ee=++B%D,ze=Y[Ee];ze&&ze.clear(),Y[Ee]=J.setBookmark(Ie)}var ke=B%D,de=Y[ke];if(de){var we=de.find();we&&!at(we,ie)&&ye(ie)}else ye(ie);ye(se),H=B,K=B-D+1,K<0&&(K=0)}function A(J,ie){B+=ie,B>H?B=H:B<K&&(B=K);var se=Y[(D+B)%D];if(se&&!se.find()){var ye=ie>0?1:-1,ke,de=J.getCursor();do if(B+=ye,se=Y[(D+B)%D],se&&(ke=se.find())&&!at(de,ke))break;while(B<H&&B>K)}return se}function x(J,ie){var se=B,ye=A(J,ie);return B=se,ye&&ye.find()}var D=100,B=-1,H=0,K=0,Y=new Array(D);return{cachedCursor:void 0,add:f,find:x,move:A}},xn=function(f){return f?{changes:f.changes,expectCursorActivityForChange:f.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};v.prototype={exitMacroRecordMode:function(){var f=He.macroModeState;f.onRecordingDone&&f.onRecordingDone(),f.onRecordingDone=void 0,f.isRecording=!1},enterMacroRecordMode:function(f,A){var x=He.registerController.getRegister(A);if(x){if(x.clear(),this.latestRegister=A,f.openDialog){var D=Ai("span",{class:"cm-vim-message"},"recording @"+A);this.onRecordingDone=f.openDialog(D,null,{bottom:!0})}this.isRecording=!0}}};var He,ln,mt={enterVimMode:p,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return He.registerController},resetVimGlobalState_:I,getVimGlobalState_:function(){return He},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:yr,map:function(f,A,x){Jn.map(f,A,x)},unmap:function(f,A){return Jn.unmap(f,A)},noremap:function(f,A,x){Jn.map(f,A,x,!0)},mapclear:function(f){var A=mn.length,x=Dr,D=mn.slice(0,A-x);if(mn=mn.slice(A-x),f)for(var B=D.length-1;B>=0;B--){var H=D[B];if(f!==H.context)if(H.context)this._mapCommand(H);else{var K=["normal","insert","visual"];for(var Y in K)if(K[Y]!==f){var J={};for(var ie in H)J[ie]=H[ie];J.context=K[Y],this._mapCommand(J)}}}},langmap:P,vimKeyFromEvent:U,setOption:$,getOption:C,defineOption:R,defineEx:function(f,A,x){if(!A)A=f;else if(f.indexOf(A)!==0)throw new Error('(Vim.defineEx) "'+A+'" is not a prefix of "'+f+'", command not registered');Ao[f]=x,Jn.commandMap_[A]={name:f,shortName:A,type:"api"}},handleKey:function(f,A,x){var D=this.findKey(f,A,x);if(typeof D=="function")return D()},multiSelectHandleKey:Rr,findKey:function(f,A,x){function D(){var ie=He.macroModeState;if(ie.isRecording){if(A=="q")return ie.exitMacroRecordMode(),k(f),!0;x!="mapping"&&eo(ie,A)}}function B(){if(A=="<Esc>"){if(Y.visualMode)bt(f);else{if(!Y.insertMode)return;yi(f)}return k(f),!0}}function H(){if(B())return!0;Y.inputState.keyBuffer.push(A);var ie=Y.inputState.keyBuffer.join(""),se=A.length==1,ye=kn.matchCommand(ie,mn,Y.inputState,"insert"),ke=Y.inputState.changeQueue;if(ye.type=="none")return k(f),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),ln&&window.clearTimeout(ln),ln=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&k(f)},C("insertModeEscKeysTimeout")),se){var de=f.listSelections();(!ke||ke.removed.length!=de.length)&&(ke=Y.inputState.changeQueue=new N),ke.inserted+=A;for(var we=0;we<de.length;we++){var Ie=lt(de[we].anchor,de[we].head),Ee=jt(de[we].anchor,de[we].head),ze=f.getRange(Ie,f.state.overwrite?ve(Ee,0,1):Ee);ke.removed[we]=(ke.removed[we]||"")+ze}}return!se}if(Y.expectLiteralNext=!1,ln&&window.clearTimeout(ln),ye.command&&ke){for(var de=f.listSelections(),we=0;we<de.length;we++){var nt=de[we].head;f.replaceRange(ke.removed[we]||"",ve(nt,0,-ke.inserted.length),nt,"+input")}He.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||k(f),ye.command}function K(){if(D()||B())return!0;Y.inputState.keyBuffer.push(A);var ie=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(ie))return!0;var se=/^(\d*)(.*)$/.exec(ie);if(!se)return k(f),!1;var ye=Y.visualMode?"visual":"normal",ke=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==ke&&(ke=Y.inputState.operatorShortcut);var de=kn.matchCommand(ke,mn,Y.inputState,ye);return de.type=="none"?(k(f),!1):de.type=="partial"?(de.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):de.type=="clear"?(k(f),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(ie),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),de.command)}var Y=L(f),J;return Y.insertMode?J=H():J=K(),J===!1?!Y.insertMode&&A.length===1?function(){return!0}:void 0:J===!0?function(){return!0}:function(){if(!((J.operator||J.isEdit)&&f.getOption("readOnly")))return f.operation(function(){f.curOp.isVimOp=!0;try{J.type=="keyToKey"?E(f,J.toKeys,J):kn.processCommand(f,Y,J)}catch(ie){throw f.state.vim=void 0,L(f),mt.suppressErrorLogging||console.log(ie),ie}return!0})}},handleEx:function(f,A){Jn.processCommand(f,A)},defineMotion:te,defineAction:ue,defineOperator:ne,mapCommand:xo,_mapCommand:Xr,defineRegister:V,exitVisualMode:bt,exitInsertMode:yi},ci=[],Jt=!1,cn,On={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},ui={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},ji={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(On)).forEach(function(f){ji[(On[f]||"").toLowerCase()]=ji[f.toLowerCase()]=f}),R("langmap",void 0,"string",["lmap"],function(f,A){if(f===void 0)return Tn.string;P(f)}),S.prototype.pushRepeatDigit=function(f){this.operator?this.motionRepeat=this.motionRepeat.concat(f):this.prefixRepeat=this.prefixRepeat.concat(f)},S.prototype.getRepeat=function(){var f=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(f=1,this.prefixRepeat.length>0&&(f*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(f*=parseInt(this.motionRepeat.join(""),10))),f},W.prototype={setText:function(f,A,x){this.keyBuffer=[f||""],this.linewise=!!A,this.blockwise=!!x},pushText:function(f,A){A&&(this.linewise||this.keyBuffer.push(`
1438
- `),this.linewise=!0),this.keyBuffer.push(f)},pushInsertModeChanges:function(f){this.insertModeChanges.push(xn(f))},pushSearchQuery:function(f){this.searchQueries.push(f)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},G.prototype={pushText:function(f,A,x,D,B){if(f!=="_"){D&&x.charAt(x.length-1)!==`
1439
- `&&(x+=`
1440
- `);var H=this.isValidRegister(f)?this.getRegister(f):null;if(!H){switch(A){case"yank":this.registers[0]=new W(x,D,B);break;case"delete":case"change":x.indexOf(`
1441
- `)==-1?this.registers["-"]=new W(x,D):(this.shiftNumericRegisters_(),this.registers[1]=new W(x,D))}this.unnamedRegister.setText(x,D,B);return}var K=s(f);K?H.pushText(x,D):H.setText(x,D,B),f==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(x),this.unnamedRegister.setText(H.toString(),D)}},getRegister:function(f){return this.isValidRegister(f)?(f=f.toLowerCase(),this.registers[f]||(this.registers[f]=new W),this.registers[f]):this.unnamedRegister},isValidRegister:function(f){return f&&(y(f,Kt)||Ut.test(f))},shiftNumericRegisters_:function(){for(var f=9;f>=2;f--)this.registers[f]=this.getRegister(""+(f-1))}},Q.prototype={nextMatch:function(f,A){var x=this.historyBuffer,D=A?-1:1;this.initialPrefix===null&&(this.initialPrefix=f);for(var B=this.iterator+D;A?B>=0:B<x.length;B+=D)for(var H=x[B],K=0;K<=H.length;K++)if(this.initialPrefix==H.substring(0,K))return this.iterator=B,H;if(B>=x.length)return this.iterator=x.length,this.initialPrefix;if(B<0)return f},pushInput:function(f){var A=this.historyBuffer.indexOf(f);A>-1&&this.historyBuffer.splice(A,1),f.length&&this.historyBuffer.push(f)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var kn={matchCommand:function(f,A,x,D){var B=Ce(f,A,D,x);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var H,K=0;K<B.full.length;K++){var Y=B.full[K];H||(H=Y)}if(H.keys.slice(-11)=="<character>"||H.keys.slice(-10)=="<register>"){var J=Te(f);if(!J||J.length>1)return{type:"clear"};x.selectedCharacter=J}return{type:"full",command:H}},processCommand:function(f,A,x){switch(A.inputState.repeatOverride=x.repeatOverride,x.type){case"motion":this.processMotion(f,A,x);break;case"operator":this.processOperator(f,A,x);break;case"operatorMotion":this.processOperatorMotion(f,A,x);break;case"action":this.processAction(f,A,x);break;case"search":this.processSearch(f,A,x);break;case"ex":case"keyToEx":this.processEx(f,A,x);break}},processMotion:function(f,A,x){A.inputState.motion=x.motion,A.inputState.motionArgs=ce(x.motionArgs),this.evalInput(f,A)},processOperator:function(f,A,x){var D=A.inputState;if(D.operator){if(D.operator==x.operator){D.motion="expandToLine",D.motionArgs={linewise:!0},this.evalInput(f,A);return}k(f)}D.operator=x.operator,D.operatorArgs=ce(x.operatorArgs),x.keys.length>1&&(D.operatorShortcut=x.keys),x.exitVisualBlock&&(A.visualBlock=!1,Ye(f)),A.visualMode&&this.evalInput(f,A)},processOperatorMotion:function(f,A,x){var D=A.visualMode,B=ce(x.operatorMotionArgs);B&&D&&B.visualLine&&(A.visualLine=!0),this.processOperator(f,A,x),D||this.processMotion(f,A,x)},processAction:function(f,A,x){var D=A.inputState,B=D.getRepeat(),H=!!B,K=ce(x.actionArgs)||{};D.selectedCharacter&&(K.selectedCharacter=D.selectedCharacter),x.operator&&this.processOperator(f,A,x),x.motion&&this.processMotion(f,A,x),(x.motion||x.operator)&&this.evalInput(f,A),K.repeat=B||1,K.repeatIsExplicit=H,K.registerName=D.registerName,k(f),A.lastMotion=null,x.isEdit&&this.recordLastEdit(A,D,x),_n[x.action](f,K,A)},processSearch:function(f,A,x){function D(Ee,ze,nt){He.searchHistoryController.pushInput(Ee),He.searchHistoryController.reset();try{an(f,Ee,ze,nt)}catch{Nt(f,"Invalid regex: "+Ee),k(f);return}kn.processMotion(f,A,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:x.searchArgs.toJumplist}})}function B(Ee){D(Ee,!0,!0);var ze=He.macroModeState;ze.isRecording&&_o(ze,Ee)}function H(Ee,ze,nt){var Xe=U(Ee),Ze,Xt;Xe=="<Up>"||Xe=="<Down>"?(Ze=Xe=="<Up>",Xt=Ee.target?Ee.target.selectionEnd:0,ze=He.searchHistoryController.nextMatch(ze,Ze)||"",nt(ze),Xt&&Ee.target&&(Ee.target.selectionEnd=Ee.target.selectionStart=Math.min(Xt,Ee.target.value.length))):Xe&&Xe!="<Left>"&&Xe!="<Right>"&&He.searchHistoryController.reset();var rt;try{rt=an(f,ze,!0,!0)}catch{}rt?f.scrollIntoView(ii(f,!Y,rt),30):(Zr(f),f.scrollTo(ye.left,ye.top))}function K(Ee,ze,nt){var Xe=U(Ee);Xe=="<Esc>"||Xe=="<C-c>"||Xe=="<C-[>"||Xe=="<BS>"&&ze==""?(He.searchHistoryController.pushInput(ze),He.searchHistoryController.reset(),an(f,se),Zr(f),f.scrollTo(ye.left,ye.top),Fe.e_stop(Ee),k(f),nt(),f.focus()):Xe=="<Up>"||Xe=="<Down>"?Fe.e_stop(Ee):Xe=="<C-u>"&&(Fe.e_stop(Ee),nt(""))}if(f.getSearchCursor){var Y=x.searchArgs.forward,J=x.searchArgs.wholeWordOnly;gn(f).setReversed(!Y);var ie=Y?"/":"?",se=gn(f).getQuery(),ye=f.getScrollInfo();switch(x.searchArgs.querySrc){case"prompt":var ke=He.macroModeState;if(ke.isPlaying){var Ie=ke.replaySearchQueries.shift();D(Ie,!0,!1)}else ni(f,{onClose:B,prefix:ie,desc:"(JavaScript regexp)",onKeyUp:H,onKeyDown:K});break;case"wordUnderCursor":var de=gt(f,{noSymbol:!0}),we=!0;if(de||(de=gt(f,{noSymbol:!1}),we=!1),!de){Nt(f,"No word under cursor"),k(f);return}var Ie=f.getLine(de.start.line).substring(de.start.ch,de.end.ch);we&&J?Ie="\\b"+Ie+"\\b":Ie=sn(Ie),He.jumpList.cachedCursor=f.getCursor(),f.setCursor(de.start),D(Ie,!0,!1)}}},processEx:function(f,A,x){function D(H){He.exCommandHistoryController.pushInput(H),He.exCommandHistoryController.reset(),Jn.processCommand(f,H),f.state.vim&&k(f)}function B(H,K,Y){var J=U(H),ie,se;(J=="<Esc>"||J=="<C-c>"||J=="<C-[>"||J=="<BS>"&&K=="")&&(He.exCommandHistoryController.pushInput(K),He.exCommandHistoryController.reset(),Fe.e_stop(H),k(f),Y(),f.focus()),J=="<Up>"||J=="<Down>"?(Fe.e_stop(H),ie=J=="<Up>",se=H.target?H.target.selectionEnd:0,K=He.exCommandHistoryController.nextMatch(K,ie)||"",Y(K),se&&H.target&&(H.target.selectionEnd=H.target.selectionStart=Math.min(se,H.target.value.length))):J=="<C-u>"?(Fe.e_stop(H),Y("")):J&&J!="<Left>"&&J!="<Right>"&&He.exCommandHistoryController.reset()}x.type=="keyToEx"?Jn.processCommand(f,x.exArgs.input):A.visualMode?ni(f,{onClose:D,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):ni(f,{onClose:D,prefix:":",onKeyDown:B})},evalInput:function(f,A){var x=A.inputState,D=x.motion,B=x.motionArgs||{},H=x.operator,K=x.operatorArgs||{},Y=x.registerName,J=A.sel,ie=Ke(A.visualMode?le(f,J.head):f.getCursor("head")),se=Ke(A.visualMode?le(f,J.anchor):f.getCursor("anchor")),ye=Ke(ie),ke=Ke(se),de,we,Ie;if(H&&this.recordLastEdit(A,x),x.repeatOverride!==void 0?Ie=x.repeatOverride:Ie=x.getRepeat(),Ie>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Ie===0)&&(Ie=1,B.repeatIsExplicit=!1),x.selectedCharacter&&(B.selectedCharacter=K.selectedCharacter=x.selectedCharacter),B.repeat=Ie,k(f),D){var Ee=wi[D](f,ie,B,A,x);if(A.lastMotion=wi[D],!Ee)return;if(B.toJumplist){!H&&f.ace.curOp!=null&&(f.ace.curOp.command.scrollIntoView="center-animate");var ze=He.jumpList,nt=ze.cachedCursor;nt?(Yn(f,nt,Ee),delete ze.cachedCursor):Yn(f,ie,Ee)}Ee instanceof Array?(we=Ee[0],de=Ee[1]):de=Ee,de||(de=Ke(ie)),A.visualMode?((!A.visualBlock||de.ch!==1/0)&&(de=le(f,de,ye)),we&&(we=le(f,we)),we=we||ke,J.anchor=we,J.head=de,Ye(f),Ci(f,A,"<",et(we,de)?we:de),Ci(f,A,">",et(we,de)?de:we)):H||(f.ace.curOp&&(f.ace.curOp.vimDialogScroll="center-animate"),de=le(f,de,ye),f.setCursor(de.line,de.ch))}if(H){if(K.lastSel){we=ke;var Xe=K.lastSel,Ze=Math.abs(Xe.head.line-Xe.anchor.line),Xt=Math.abs(Xe.head.ch-Xe.anchor.ch);Xe.visualLine?de=new Oe(ke.line+Ze,ke.ch):Xe.visualBlock?de=new Oe(ke.line+Ze,ke.ch+Xt):Xe.head.line==Xe.anchor.line?de=new Oe(ke.line,ke.ch+Xt):de=new Oe(ke.line+Ze,ke.ch),A.visualMode=!0,A.visualLine=Xe.visualLine,A.visualBlock=Xe.visualBlock,J=A.sel={anchor:we,head:de},Ye(f)}else A.visualMode&&(K.lastSel={anchor:Ke(J.anchor),head:Ke(J.head),visualBlock:A.visualBlock,visualLine:A.visualLine});var rt,dn,Et,vt,Sn;if(A.visualMode){rt=lt(J.head,J.anchor),dn=jt(J.head,J.anchor),Et=A.visualLine||K.linewise,vt=A.visualBlock?"block":Et?"line":"char";var jn=_(f,rt,dn);if(Sn=ct(f,{anchor:jn.start,head:jn.end},vt),Et){var fn=Sn.ranges;if(vt=="block")for(var j=0;j<fn.length;j++)fn[j].head.ch=Ht(f,fn[j].head.line);else vt=="line"&&(fn[0].head=new Oe(fn[0].head.line+1,0))}}else{if(rt=Ke(we||ke),dn=Ke(de||ye),et(dn,rt)){var Z=rt;rt=dn,dn=Z}Et=B.linewise||K.linewise,Et?Ct(f,rt,dn):B.forward&&$t(f,rt,dn),vt="char";var re=!B.inclusive||Et,jn=_(f,rt,dn);Sn=ct(f,{anchor:jn.start,head:jn.end},vt,re)}f.setSelections(Sn.ranges,Sn.primary),A.lastMotion=null,K.repeat=Ie,K.registerName=Y,K.linewise=Et;var oe=ao[H](f,K,Sn.ranges,ke,de);A.visualMode&&bt(f,oe!=null),oe&&f.setCursor(oe)}},recordLastEdit:function(f,A,x){var D=He.macroModeState;D.isPlaying||(f.lastEditInputState=A,f.lastEditActionCommand=x,D.lastInsertModeChanges.changes=[],D.lastInsertModeChanges.expectCursorActivityForChange=!1,D.lastInsertModeChanges.visualBlock=f.visualBlock?f.sel.head.line-f.sel.anchor.line:0)}},wi={moveToTopLine:function(f,A,x){var D=vr(f).top+x.repeat-1;return new Oe(D,st(f.getLine(D)))},moveToMiddleLine:function(f){var A=vr(f),x=Math.floor((A.top+A.bottom)*.5);return new Oe(x,st(f.getLine(x)))},moveToBottomLine:function(f,A,x){var D=vr(f).bottom-x.repeat+1;return new Oe(D,st(f.getLine(D)))},expandToLine:function(f,A,x){var D=A;return new Oe(D.line+x.repeat-1,1/0)},findNext:function(f,A,x){var D=gn(f),B=D.getQuery();if(B){var H=!x.forward;return H=D.isReversed()?!H:H,Wi(f,B),ii(f,H,B,x.repeat)}},findAndSelectNextInclusive:function(f,A,x,D,B){var H=gn(f),K=H.getQuery();if(K){var Y=!x.forward;Y=H.isReversed()?!Y:Y;var J=Hi(f,Y,K,x.repeat,D);if(J){if(B.operator)return J;var ie=J[0],se=new Oe(J[1].line,J[1].ch-1);if(D.visualMode){(D.visualLine||D.visualBlock)&&(D.visualLine=!1,D.visualBlock=!1,Fe.signal(f,"vim-mode-change",{mode:"visual",subMode:""}));var ye=D.sel.anchor;if(ye)return H.isReversed()?x.forward?[ye,ie]:[ye,se]:x.forward?[ye,se]:[ye,ie]}else D.visualMode=!0,D.visualLine=!1,D.visualBlock=!1,Fe.signal(f,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,ie]:[ie,se]}}},goToMark:function(f,A,x,D){var B=vi(f,D,x.selectedCharacter);return B?x.linewise?{line:B.line,ch:st(f.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(f,A,x,D){if(D.visualBlock&&x.sameLine){var B=D.sel;return[le(f,new Oe(B.anchor.line,B.head.ch)),le(f,new Oe(B.head.line,B.anchor.ch))]}return[D.sel.head,D.sel.anchor]},jumpToMark:function(f,A,x,D){for(var B=A,H=0;H<x.repeat;H++){var K=B;for(var Y in D.marks)if(o(Y)){var J=D.marks[Y].find(),ie=x.forward?et(J,K):et(K,J);if(!ie&&!(x.linewise&&J.line==K.line)){var se=at(K,B),ye=x.forward?on(K,J,B):on(B,J,K);(se||ye)&&(B=J)}}}return x.linewise&&(B=new Oe(B.line,st(f.getLine(B.line)))),B},moveByCharacters:function(f,A,x){var D=A,B=x.repeat,H=x.forward?D.ch+B:D.ch-B;return new Oe(D.line,H)},moveByLines:function(f,A,x,D){var B=A,H=B.ch;switch(D.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:H=D.lastHPos;break;default:D.lastHPos=H}var K=x.repeat+(x.repeatOffset||0),Y=x.forward?B.line+K:B.line-K,J=f.firstLine(),ie=f.lastLine();if(Y<J&&B.line==J)return this.moveToStartOfLine(f,A,x,D);if(Y>ie&&B.line==ie)return Tr(f,A,x,D,!0);var se=f.ace.session.getFoldLine(Y);return se&&(x.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),x.toFirstChar&&(H=st(f.getLine(Y)),D.lastHPos=H),D.lastHSPos=f.charCoords(new Oe(Y,H),"div").left,new Oe(Y,H)},moveByDisplayLines:function(f,A,x,D){var B=A;switch(D.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:D.lastHSPos=f.charCoords(B,"div").left}var H=x.repeat,J=f.findPosV(B,x.forward?H:-H,"line",D.lastHSPos);if(J.hitSide)if(x.forward)var K=f.charCoords(J,"div"),Y={top:K.top+8,left:D.lastHSPos},J=f.coordsChar(Y,"div");else{var ie=f.charCoords(new Oe(f.firstLine(),0),"div");ie.left=D.lastHSPos,J=f.coordsChar(ie,"div")}return D.lastHPos=J.ch,J},moveByPage:function(f,A,x){var D=A,B=x.repeat;return f.findPosV(D,x.forward?B:-B,"page")},moveByParagraph:function(f,A,x){var D=x.forward?1:-1;return yo(f,A,x.repeat,D)},moveBySentence:function(f,A,x){var D=x.forward?1:-1;return nr(f,A,x.repeat,D)},moveByScroll:function(f,A,x,D){var B=f.getScrollInfo(),H=null,K=x.repeat;K||(K=B.clientHeight/(2*f.defaultTextHeight()));var Y=f.charCoords(A,"local");if(x.repeat=K,H=wi.moveByDisplayLines(f,A,x,D),!H)return null;var J=f.charCoords(H,"local");return f.scrollTo(null,B.top+J.top-Y.top),H},moveByWords:function(f,A,x){return Qn(f,A,x.repeat,!!x.forward,!!x.wordEnd,!!x.bigWord)},moveTillCharacter:function(f,A,x){var D=x.repeat,B=Qr(f,D,x.forward,x.selectedCharacter,A),H=x.forward?-1:1;return mi(H,x),B?(B.ch+=H,B):null},moveToCharacter:function(f,A,x){var D=x.repeat;return mi(0,x),Qr(f,D,x.forward,x.selectedCharacter,A)||A},moveToSymbol:function(f,A,x){var D=x.repeat;return tr(f,D,x.forward,x.selectedCharacter)||A},moveToColumn:function(f,A,x,D){var B=x.repeat;return D.lastHPos=B-1,D.lastHSPos=f.charCoords(A,"div").left,ks(f,B)},moveToEol:function(f,A,x,D){return Tr(f,A,x,D,!1)},moveToFirstNonWhiteSpaceCharacter:function(f,A){var x=A;return new Oe(x.line,st(f.getLine(x.line)))},moveToMatchedSymbol:function(f,A){for(var x=A,D=x.line,B=x.ch,H=f.getLine(D),K;B<H.length;B++)if(K=H.charAt(B),K&&i(K)){var Y=f.getTokenTypeAt(new Oe(D,B+1));if(Y!=="string"&&Y!=="comment")break}if(B<H.length){var J=/[<>]/.test(H[B])?/[(){}[\]<>]/:/[(){}[\]]/,ie=f.findMatchingBracket(new Oe(D,B+1),{bracketRegex:J});return ie.to}return x},moveToStartOfLine:function(f,A){return new Oe(A.line,0)},moveToLineOrEdgeOfDocument:function(f,A,x){var D=x.forward?f.lastLine():f.firstLine();return x.repeatIsExplicit&&(D=x.repeat-f.getOption("firstLineNumber")),new Oe(D,st(f.getLine(D)))},moveToStartOfDisplayLine:function(f){return f.execCommand("goLineLeft"),f.getCursor()},moveToEndOfDisplayLine:function(f){f.execCommand("goLineRight");var A=f.getCursor();return A.sticky=="before"&&A.ch--,A},textObjectManipulation:function(f,A,x,D){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},H={"'":!0,'"':!0,"`":!0},K=x.selectedCharacter;K=="b"?K="(":K=="B"&&(K="{");var Y=!x.textObjectInner,J,ie;if(B[K]){if(ie=!0,J=$n(f,A,K,Y),!J){var se=f.getSearchCursor(new RegExp("\\"+K,"g"),A);se.find()&&(J=$n(f,se.from(),K,Y))}}else if(H[K])ie=!0,J=ei(f,A,K,Y);else if(K==="W"||K==="w")for(var ye=x.repeat||1;ye-- >0;){var ke=gt(f,{inclusive:Y,innerWord:!Y,bigWord:K==="W",noSymbol:K==="W",multiline:!0},J&&J.end);ke&&(J||(J=ke),J.end=ke.end)}else if(K==="p")if(J=yo(f,A,x.repeat,0,Y),x.linewise=!0,D.visualMode)D.visualLine||(D.visualLine=!0);else{var de=D.inputState.operatorArgs;de&&(de.linewise=!0),J.end.line--}else if(K==="t")J=hn(f,A,Y);else if(K==="s"){var we=f.getLine(A.line);A.ch>0&&m(we[A.ch])&&(A.ch-=1);var Ie=Go(f,A,x.repeat,1,Y),Ee=Go(f,A,x.repeat,-1,Y);h(f.getLine(Ee.line)[Ee.ch])&&h(f.getLine(Ie.line)[Ie.ch-1])&&(Ee={line:Ee.line,ch:Ee.ch+1}),J={start:Ee,end:Ie}}return J?f.state.vim.visualMode?We(f,J.start,J.end,ie):[J.start,J.end]:null},repeatLastCharacterSearch:function(f,A,x){var D=He.lastCharacterSearch,B=x.repeat,H=x.forward===D.forward,K=(D.increment?1:0)*(H?-1:1);f.moveH(-K,"char"),x.inclusive=!!H;var Y=Qr(f,B,H,D.selectedCharacter);return Y?(Y.ch+=K,Y):(f.moveH(K,"char"),A)}},ao={change:function(f,A,x){var D,B,H=f.state.vim,K=x[0].anchor,Y=x[0].head;if(H.visualMode)if(A.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,f.setSelection(K,Y),B=f.getSelection(),f.replaceSelection(""),D=K;else{B=f.getSelection();var se=he("",x.length);f.replaceSelections(se),D=lt(x[0].head,x[0].anchor)}else{B=f.getRange(K,Y);var J=H.lastEditInputState||{};if(J.motion=="moveByWords"&&!h(B)){var ie=/\s+$/.exec(B);ie&&J.motionArgs&&J.motionArgs.forward&&(Y=ve(Y,0,-ie[0].length),B=B.slice(0,-ie[0].length))}A.linewise&&(K=new Oe(K.line,st(f.getLine(K.line))),Y.line>K.line&&(Y=new Oe(Y.line-1,Number.MAX_VALUE))),f.replaceRange("",K,Y),D=K}He.registerController.pushText(A.registerName,"change",B,A.linewise,x.length>1),_n.enterInsertMode(f,{head:D},f.state.vim)},delete:function(f,A,x){var D,B,H=f.state.vim;if(H.visualBlock){B=f.getSelection();var J=he("",x.length);f.replaceSelections(J),D=lt(x[0].head,x[0].anchor)}else{var K=x[0].anchor,Y=x[0].head;A.linewise&&Y.line!=f.firstLine()&&K.line==f.lastLine()&&K.line==Y.line-1&&(K.line==f.firstLine()?K.ch=0:K=new Oe(K.line-1,Ht(f,K.line-1))),B=f.getRange(K,Y),f.replaceRange("",K,Y),D=K,A.linewise&&(D=wi.moveToFirstNonWhiteSpaceCharacter(f,K))}return He.registerController.pushText(A.registerName,"delete",B,A.linewise,H.visualBlock),le(f,D)},indent:function(f,A,x){var D=f.state.vim,B=D.visualMode?A.repeat:1;if(D.visualBlock){for(var H=f.getOption("tabSize"),K=f.getOption("indentWithTabs")?" ":" ".repeat(H),Y,J=x.length-1;J>=0;J--)if(Y=lt(x[J].anchor,x[J].head),A.indentRight)f.replaceRange(K.repeat(B),Y,Y);else{for(var ie=f.getLine(Y.line),se=0,ye=0;ye<B;ye++){var ke=ie[Y.ch+se];if(ke==" ")se++;else{if(ke!=" ")break;se++;for(var de=1;de<K.length&&(ke=ie[Y.ch+se],ke===" ");de++)se++}}f.replaceRange("",Y,ve(Y,0,se))}return Y}if(f.indentMore)for(var ye=0;ye<B;ye++)A.indentRight?f.indentMore():f.indentLess();else{var we=x[0].anchor.line,Ie=D.visualBlock?x[x.length-1].anchor.line:x[0].head.line;A.linewise&&Ie--;for(var J=we;J<=Ie;J++)for(var ye=0;ye<B;ye++)f.indentLine(J,A.indentRight)}return wi.moveToFirstNonWhiteSpaceCharacter(f,x[0].anchor)},indentAuto:function(f,A,x){return f.execCommand("indentAuto"),wi.moveToFirstNonWhiteSpaceCharacter(f,x[0].anchor)},hardWrap:function(f,A,x,D,B){if(f.hardWrap){var H=x[0].anchor.line,K=x[0].head.line;A.linewise&&K--;var Y=f.hardWrap({from:H,to:K});return Y>H&&A.linewise&&Y--,A.keepCursor?D:new Oe(Y,0)}},changeCase:function(f,A,x,D,B){for(var H=f.getSelections(),K=[],Y=A.toLower,J=0;J<H.length;J++){var ie=H[J],se="";if(Y===!0)se=ie.toLowerCase();else if(Y===!1)se=ie.toUpperCase();else for(var ye=0;ye<ie.length;ye++){var ke=ie.charAt(ye);se+=s(ke)?ke.toLowerCase():ke.toUpperCase()}K.push(se)}return f.replaceSelections(K),A.shouldMoveCursor?B:!f.state.vim.visualMode&&A.linewise&&x[0].anchor.line+1==x[0].head.line?wi.moveToFirstNonWhiteSpaceCharacter(f,D):A.linewise?D:lt(x[0].anchor,x[0].head)},yank:function(f,A,x,D){var B=f.state.vim,H=f.getSelection(),K=B.visualMode?lt(B.sel.anchor,B.sel.head,x[0].head,x[0].anchor):D;return He.registerController.pushText(A.registerName,"yank",H,A.linewise,B.visualBlock),K}},_n={jumpListWalk:function(f,A,x){if(!x.visualMode){var D=A.repeat,B=A.forward,H=He.jumpList,K=H.move(f,B?D:-D),Y=K?K.find():void 0;Y=Y||f.getCursor(),f.setCursor(Y),f.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(f,A,x){if(!x.visualMode){var D=A.repeat||1,B=f.defaultTextHeight(),H=f.getScrollInfo().top,K=B*D,Y=A.forward?H+K:H-K,J=Ke(f.getCursor()),ie=f.charCoords(J,"local");if(A.forward)Y>ie.top?(J.line+=(Y-ie.top)/B,J.line=Math.ceil(J.line),f.setCursor(J),ie=f.charCoords(J,"local"),f.scrollTo(null,ie.top)):f.scrollTo(null,Y);else{var se=Y+f.getScrollInfo().clientHeight;se<ie.bottom?(J.line-=(ie.bottom-se)/B,J.line=Math.floor(J.line),f.setCursor(J),ie=f.charCoords(J,"local"),f.scrollTo(null,ie.bottom-f.getScrollInfo().clientHeight)):f.scrollTo(null,Y)}}},scrollToCursor:function(f,A){var x=f.getCursor().line,D=f.charCoords(new Oe(x,0),"local"),B=f.getScrollInfo().clientHeight,H=D.top;switch(A.position){case"center":H=D.bottom-B/2;break;case"bottom":var K=new Oe(x,f.getLine(x).length-1),Y=f.charCoords(K,"local"),J=Y.bottom-H;H=H-B+J}f.scrollTo(null,H)},replayMacro:function(f,A,x){var D=A.selectedCharacter,B=A.repeat,H=He.macroModeState;for(D=="@"?D=H.latestRegister:H.latestRegister=D;B--;)ko(f,x,H,D)},enterMacroRecordMode:function(f,A){var x=He.macroModeState,D=A.selectedCharacter;He.registerController.isValidRegister(D)&&x.enterMacroRecordMode(f,D)},toggleOverwrite:function(f){f.state.overwrite?(f.toggleOverwrite(!1),f.setOption("keyMap","vim-insert"),Fe.signal(f,"vim-mode-change",{mode:"insert"})):(f.toggleOverwrite(!0),f.setOption("keyMap","vim-replace"),Fe.signal(f,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(f,A,x){if(!f.getOption("readOnly")){x.insertMode=!0,x.insertModeRepeat=A&&A.repeat||1;var D=A?A.insertAt:null,B=x.sel,H=A.head||f.getCursor("head"),K=f.listSelections().length;if(D=="eol")H=new Oe(H.line,Ht(f,H.line));else if(D=="bol")H=new Oe(H.line,0);else if(D=="charAfter"){var Y=_(f,H,ve(H,0,1));H=Y.end}else if(D=="firstNonBlank"){var Y=_(f,H,wi.moveToFirstNonWhiteSpaceCharacter(f,H));H=Y.end}else if(D=="startOfSelectedArea"){if(!x.visualMode)return;x.visualBlock?(H=new Oe(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),K=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?H=B.head:H=new Oe(B.anchor.line,0)}else if(D=="endOfSelectedArea"){if(!x.visualMode)return;x.visualBlock?(H=new Oe(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),K=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?H=ve(B.head,0,1):H=new Oe(B.anchor.line,0)}else if(D=="inplace"){if(x.visualMode)return}else D=="lastEdit"&&(H=Lr(f)||H);f.setOption("disableInput",!1),A&&A.replace?(f.toggleOverwrite(!0),f.setOption("keyMap","vim-replace"),Fe.signal(f,"vim-mode-change",{mode:"replace"})):(f.toggleOverwrite(!1),f.setOption("keyMap","vim-insert"),Fe.signal(f,"vim-mode-change",{mode:"insert"})),He.macroModeState.isPlaying||(f.on("change",Er),x.insertEnd&&x.insertEnd.clear(),x.insertEnd=f.setBookmark(H,{insertLeft:!0}),Fe.on(f.getInputField(),"keydown",So)),x.visualMode&&bt(f),In(f,H,K)}},toggleVisualMode:function(f,A,x){var D=A.repeat,B=f.getCursor(),H;if(x.visualMode)x.visualLine^A.linewise||x.visualBlock^A.blockwise?(x.visualLine=!!A.linewise,x.visualBlock=!!A.blockwise,Fe.signal(f,"vim-mode-change",{mode:"visual",subMode:x.visualLine?"linewise":x.visualBlock?"blockwise":""}),Ye(f)):bt(f);else{x.visualMode=!0,x.visualLine=!!A.linewise,x.visualBlock=!!A.blockwise,H=le(f,new Oe(B.line,B.ch+D-1));var K=_(f,B,H);x.sel={anchor:K.start,head:K.end},Fe.signal(f,"vim-mode-change",{mode:"visual",subMode:x.visualLine?"linewise":x.visualBlock?"blockwise":""}),Ye(f),Ci(f,x,"<",lt(B,H)),Ci(f,x,">",jt(B,H))}},reselectLastSelection:function(f,A,x){var D=x.lastSelection;if(x.visualMode&&_e(f,x),D){var B=D.anchorMark.find(),H=D.headMark.find();if(!B||!H)return;x.sel={anchor:B,head:H},x.visualMode=!0,x.visualLine=D.visualLine,x.visualBlock=D.visualBlock,Ye(f),Ci(f,x,"<",lt(B,H)),Ci(f,x,">",jt(B,H)),Fe.signal(f,"vim-mode-change",{mode:"visual",subMode:x.visualLine?"linewise":x.visualBlock?"blockwise":""})}},joinLines:function(f,A,x){var D,B;if(x.visualMode){if(D=f.getCursor("anchor"),B=f.getCursor("head"),et(B,D)){var H=B;B=D,D=H}B.ch=Ht(f,B.line)-1}else{var K=Math.max(A.repeat,2);D=f.getCursor(),B=le(f,new Oe(D.line+K-1,1/0))}for(var Y=0,J=D.line;J<B.line;J++){Y=Ht(f,D.line);var ie="",se=0;if(!A.keepSpaces){var ye=f.getLine(D.line+1);se=ye.search(/\S/),se==-1?se=ye.length:ie=" "}f.replaceRange(ie,new Oe(D.line,Y),new Oe(D.line+1,se))}var ke=le(f,new Oe(D.line,Y));x.visualMode&&bt(f,!1),f.setCursor(ke)},newLineAndEnterInsertMode:function(f,A,x){x.insertMode=!0;var D=Ke(f.getCursor());if(D.line===f.firstLine()&&!A.after)f.replaceRange(`
1442
- `,new Oe(f.firstLine(),0)),f.setCursor(f.firstLine(),0);else{D.line=A.after?D.line:D.line-1,D.ch=Ht(f,D.line),f.setCursor(D);var B=Fe.commands.newlineAndIndentContinueComment||Fe.commands.newlineAndIndent;B(f)}this.enterInsertMode(f,{repeat:A.repeat},x)},paste:function(f,A,x){var D=this,B=He.registerController.getRegister(A.registerName),H=function(){var K=B.toString();D.continuePaste(f,A,x,K,B)};A.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(K){D.continuePaste(f,A,x,K,B)},function(){H()}):H()},continuePaste:function(f,A,x,de,B){var H=Ke(f.getCursor());if(de){if(A.matchIndent){var K=f.getOption("tabSize"),Y=function(fn){var j=fn.split(" ").length-1,Z=fn.split(" ").length-1;return j*K+Z*1},J=f.getLine(f.getCursor().line),ie=Y(J.match(/^\s*/)[0]),se=de.replace(/\n$/,""),ye=de!==se,ke=Y(de.match(/^\s*/)[0]),de=se.replace(/^\s*/gm,function(fn){var j=ie+(Y(fn)-ke);if(j<0)return"";if(f.getOption("indentWithTabs")){var Z=Math.floor(j/K);return Array(Z+1).join(" ")}return Array(j+1).join(" ")});de+=ye?`
1443
- `:""}if(A.repeat>1)var de=Array(A.repeat+1).join(de);var we=B.linewise,Ie=B.blockwise;if(Ie){de=de.split(`
1444
- `),we&&de.pop();for(var Ee=0;Ee<de.length;Ee++)de[Ee]=de[Ee]==""?" ":de[Ee];H.ch+=A.after?1:0,H.ch=Math.min(Ht(f,H.line),H.ch)}else we?x.visualMode?de=x.visualLine?de.slice(0,-1):`
1445
- `+de.slice(0,de.length-1)+`
1446
- `:A.after?(de=`
1447
- `+de.slice(0,de.length-1),H.ch=Ht(f,H.line)):H.ch=0:H.ch+=A.after?1:0;var ze;if(x.visualMode){x.lastPastedText=de;var nt,Xe=Ve(f,x),Ze=Xe[0],Xt=Xe[1],rt=f.getSelection(),dn=f.listSelections(),Et=new Array(dn.length).join("1").split("1");x.lastSelection&&(nt=x.lastSelection.headMark.find()),He.registerController.unnamedRegister.setText(rt),Ie?(f.replaceSelections(Et),Xt=new Oe(Ze.line+de.length-1,Ze.ch),f.setCursor(Ze),wn(f,Xt),f.replaceSelections(de),ze=Ze):x.visualBlock?(f.replaceSelections(Et),f.setCursor(Ze),f.replaceRange(de,Ze,Ze),ze=Ze):(f.replaceRange(de,Ze,Xt),ze=f.posFromIndex(f.indexFromPos(Ze)+de.length-1)),nt&&(x.lastSelection.headMark=f.setBookmark(nt)),we&&(ze.ch=0)}else if(Ie){f.setCursor(H);for(var Ee=0;Ee<de.length;Ee++){var vt=H.line+Ee;vt>f.lastLine()&&f.replaceRange(`
1448
- `,new Oe(vt,0));var Sn=Ht(f,vt);Sn<H.ch&&yn(f,vt,H.ch)}f.setCursor(H),wn(f,new Oe(H.line+de.length-1,H.ch)),f.replaceSelections(de),ze=H}else if(f.replaceRange(de,H),we){var vt=A.after?H.line+1:H.line;ze=new Oe(vt,st(f.getLine(vt)))}else ze=Ke(H),/\n/.test(de)||(ze.ch+=de.length-(A.after?1:0));x.visualMode&&bt(f,!1),f.setCursor(ze)}},undo:function(f,A){f.operation(function(){qe(f,Fe.commands.undo,A.repeat)(),f.setCursor(le(f,f.getCursor("start")))})},redo:function(f,A){qe(f,Fe.commands.redo,A.repeat)()},setRegister:function(f,A,x){x.inputState.registerName=A.selectedCharacter},insertRegister:function(f,A,x){var D=A.selectedCharacter,B=He.registerController.getRegister(D),H=B&&B.toString();H&&f.replaceSelection(H)},oneNormalCommand:function(f,A,x){yi(f,!0),x.insertModeReturn=!0,Fe.on(f,"vim-command-done",function D(){x.visualMode||(x.insertModeReturn&&(x.insertModeReturn=!1,x.insertMode||_n.enterInsertMode(f,{},x)),Fe.off(f,"vim-command-done",D))})},setMark:function(f,A,x){var D=A.selectedCharacter;Ci(f,x,D,f.getCursor())},replace:function(f,A,x){var D=A.selectedCharacter,B=f.getCursor(),H,K,Y=f.listSelections();if(x.visualMode)B=f.getCursor("start"),K=f.getCursor("end");else{var J=f.getLine(B.line);H=B.ch+A.repeat,H>J.length&&(H=J.length),K=new Oe(B.line,H)}var ie=_(f,B,K);if(B=ie.start,K=ie.end,D==`
1449
- `)x.visualMode||f.replaceRange("",B,K),(Fe.commands.newlineAndIndentContinueComment||Fe.commands.newlineAndIndent)(f);else{var se=f.getRange(B,K);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/[^\n]/g,D),x.visualBlock){var ye=new Array(f.getOption("tabSize")+1).join(" ");se=f.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/\t/g,ye).replace(/[^\n]/g,D).split(`
1450
- `),f.replaceSelections(se)}else f.replaceRange(se,B,K);x.visualMode?(B=et(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,f.setCursor(B),bt(f,!1)):f.setCursor(ve(K,0,-1))}},incrementNumberToken:function(f,A){for(var x=f.getCursor(),D=f.getLine(x.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,H,K,Y,J;(H=B.exec(D))!==null&&(K=H.index,Y=K+H[0].length,!(x.ch<Y)););if(!(!A.backtrack&&Y<=x.ch)&&H){var ie=H[2]||H[4],se=H[3]||H[5],ye=A.increase?1:-1,ke={"0b":2,0:8,"":10,"0x":16}[ie.toLowerCase()],de=parseInt(H[1]+se,ke)+ye*A.repeat;J=de.toString(ke);var we=ie?new Array(se.length-J.length+1+H[1].length).join("0"):"";J.charAt(0)==="-"?J="-"+ie+we+J.substr(1):J=ie+we+J;var Ie=new Oe(x.line,K),Ee=new Oe(x.line,Y);f.replaceRange(J,Ie,Ee),f.setCursor(new Oe(x.line,K+J.length-1))}},repeatLastEdit:function(f,A,x){var D=x.lastEditInputState;if(D){var B=A.repeat;B&&A.repeatIsExplicit?x.lastEditInputState.repeatOverride=B:B=x.lastEditInputState.repeatOverride||B,Qo(f,x,B,!1)}},indent:function(f,A){f.indentLine(f.getCursor().line,A.indentRight)},exitInsertMode:yi},Mi={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Ti={bracket:{isComplete:function(f){if(f.nextCh===f.symb){if(f.depth++,f.depth>=1)return!0}else f.nextCh===f.reverseSymb&&f.depth--;return!1}},section:{init:function(f){f.curMoveThrough=!0,f.symb=(f.forward?"]":"[")===f.symb?"{":"}"},isComplete:function(f){return f.index===0&&f.nextCh===f.symb}},comment:{isComplete:function(f){var A=f.lastCh==="*"&&f.nextCh==="/";return f.lastCh=f.nextCh,A}},method:{init:function(f){f.symb=f.symb==="m"?"{":"}",f.reverseSymb=f.symb==="{"?"}":"{"},isComplete:function(f){return f.nextCh===f.symb}},preprocess:{init:function(f){f.index=0},isComplete:function(f){if(f.nextCh==="#"){var A=f.lineText.match(/^#(\w+)/)[1];if(A==="endif"){if(f.forward&&f.depth===0)return!0;f.depth++}else if(A==="if"){if(!f.forward&&f.depth===0)return!0;f.depth--}if(A==="else"&&f.depth===0)return!0}return!1}}};R("pcre",!0,"boolean"),ir.prototype={getQuery:function(){return He.query},setQuery:function(f){He.query=f},getOverlay:function(){return this.searchOverlay},setOverlay:function(f){this.searchOverlay=f},isReversed:function(){return He.isReversed},setReversed:function(f){He.isReversed=f},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(f){this.annotate=f}};var Ki={"\\n":`
1451
- `,"\\r":"\r","\\t":" "},Un={"\\/":"/","\\\\":"\\","\\n":`
1452
- `,"\\r":"\r","\\t":" ","\\&":"&"},Vn=0,Zn=function(){this.buildCommandMap_()};Zn.prototype={processCommand:function(f,A,x){var D=this;f.operation(function(){f.curOp.isVimOp=!0,D._processCommand(f,A,x)})},_processCommand:function(f,A,x){var D=f.state.vim,B=He.registerController.getRegister(":"),H=B.toString(),K=new Fe.StringStream(A);B.setText(A);var Y=x||{};Y.input=A;try{this.parseInput_(f,K,Y)}catch(se){throw Nt(f,se.toString()),se}D.visualMode&&bt(f);var J,ie;if(!Y.commandName)Y.line!==void 0&&(ie="move");else if(J=this.matchCommand_(Y.commandName),J){if(ie=J.name,J.excludeFromCommandHistory&&B.setText(H),this.parseCommandArgs_(K,Y,J),J.type=="exToKey"){E(f,J.toKeys,J);return}if(J.type=="exToEx"){this.processCommand(f,J.toInput);return}}if(!ie){Nt(f,'Not an editor command ":'+A+'"');return}try{Ao[ie](f,Y),(!J||!J.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Nt(f,se.toString()),se}},parseInput_:function(f,A,x){if(A.eatWhile(":"),A.eat("%")?(x.line=f.firstLine(),x.lineEnd=f.lastLine()):(x.line=this.parseLineSpec_(f,A),x.line!==void 0&&A.eat(",")&&(x.lineEnd=this.parseLineSpec_(f,A))),x.line==null)if(f.state.vim.visualMode){var D=vi(f,f.state.vim,"<");x.selectionLine=D&&D.line,D=vi(f,f.state.vim,">"),x.selectionLineEnd=D&&D.line}else x.selectionLine=f.getCursor().line;else x.selectionLine=x.line,x.selectionLineEnd=x.lineEnd;var B=A.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?x.commandName=B[1]:x.commandName=A.match(/.*/)[0],x},parseLineSpec_:function(f,A){var x=A.match(/^(\d+)/);if(x)return parseInt(x[1],10)-1;switch(A.next()){case".":return this.parseLineSpecOffset_(A,f.getCursor().line);case"$":return this.parseLineSpecOffset_(A,f.lastLine());case"'":var D=A.next(),B=vi(f,f.state.vim,D);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_(A,B.line);case"-":case"+":return A.backUp(1),this.parseLineSpecOffset_(A,f.getCursor().line);default:return A.backUp(1),void 0}},parseLineSpecOffset_:function(f,A){var x=f.match(/^([+-])?(\d+)/);if(x){var D=parseInt(x[2],10);x[1]=="-"?A-=D:A+=D}return A},parseCommandArgs_:function(f,A,x){if(!f.eol()){A.argString=f.match(/.*/)[0];var D=x.argDelimiter||/\s+/,B=qn(A.argString).split(D);B.length&&B[0]&&(A.args=B)}},matchCommand_:function(f){for(var A=f.length;A>0;A--){var x=f.substring(0,A);if(this.commandMap_[x]){var D=this.commandMap_[x];if(D.name.indexOf(f)===0)return D}}return null},buildCommandMap_:function(){this.commandMap_={};for(var f=0;f<$i.length;f++){var A=$i[f],x=A.shortName||A.name;this.commandMap_[x]=A}},map:function(f,A,x,D){if(f!=":"&&f.charAt(0)==":"){if(x)throw Error("Mode not supported for ex mappings");var B=f.substring(1);A!=":"&&A.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:A.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:A,user:!0}}else{var H={keys:f,type:"keyToKey",toKeys:A,noremap:!!D};x&&(H.context=x),mn.unshift(H)}},unmap:function(f,A){if(f!=":"&&f.charAt(0)==":"){if(A)throw Error("Mode not supported for ex mappings");var x=f.substring(1);if(this.commandMap_[x]&&this.commandMap_[x].user)return delete this.commandMap_[x],!0}else for(var D=f,B=0;B<mn.length;B++)if(D==mn[B].keys&&mn[B].context===A)return mn.splice(B,1),!0}};var Ao={colorscheme:function(f,A){if(!A.args||A.args.length<1){Nt(f,f.getOption("theme"));return}f.setOption("theme",A.args[0])},map:function(f,A,x,D){var B=A.args;if(!B||B.length<2){f&&Nt(f,"Invalid mapping: "+A.input);return}Jn.map(B[0],B[1],x,D)},imap:function(f,A){this.map(f,A,"insert")},nmap:function(f,A){this.map(f,A,"normal")},vmap:function(f,A){this.map(f,A,"visual")},omap:function(f,A){this.map(f,A,"operatorPending")},noremap:function(f,A){this.map(f,A,void 0,!0)},inoremap:function(f,A){this.map(f,A,"insert",!0)},nnoremap:function(f,A){this.map(f,A,"normal",!0)},vnoremap:function(f,A){this.map(f,A,"visual",!0)},onoremap:function(f,A){this.map(f,A,"operatorPending",!0)},unmap:function(f,A,x){var D=A.args;(!D||D.length<1||!Jn.unmap(D[0],x))&&f&&Nt(f,"No such mapping: "+A.input)},mapclear:function(f,A){mt.mapclear()},imapclear:function(f,A){mt.mapclear("insert")},nmapclear:function(f,A){mt.mapclear("normal")},vmapclear:function(f,A){mt.mapclear("visual")},omapclear:function(f,A){mt.mapclear("operatorPending")},move:function(f,A){kn.processCommand(f,f.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:A.line+1})},set:function(f,A){var x=A.args,D=A.setCfg||{};if(!x||x.length<1){f&&Nt(f,"Invalid mapping: "+A.input);return}var B=x[0].split("="),H=B[0],K=B[1],Y=!1,J=!1;if(H.charAt(H.length-1)=="?"){if(K)throw Error("Trailing characters: "+A.argString);H=H.substring(0,H.length-1),Y=!0}else H.charAt(H.length-1)=="!"&&(H=H.substring(0,H.length-1),J=!0);K===void 0&&H.substring(0,2)=="no"&&(H=H.substring(2),K=!1);var ie=Dt[H]&&Dt[H].type=="boolean";if(ie&&(J?K=!C(H,f,D):K==null&&(K=!0)),!ie&&K===void 0||Y){var se=C(H,f,D);se instanceof Error?Nt(f,se.message):se===!0||se===!1?Nt(f," "+(se?"":"no")+H):Nt(f," "+H+"="+se)}else{var ye=$(H,K,f,D);ye instanceof Error&&Nt(f,ye.message)}},setlocal:function(f,A){A.setCfg={scope:"local"},this.set(f,A)},setglobal:function(f,A){A.setCfg={scope:"global"},this.set(f,A)},registers:function(f,A){var x=A.args,D=He.registerController.registers,B=`----------Registers----------
1453
-
1454
- `;if(x){var H;x=x.join("");for(var Y=0;Y<x.length;Y++)if(H=x.charAt(Y),!!He.registerController.isValidRegister(H)){var J=D[H]||new W;B+='"'+H+" "+J.toString()+`
1455
- `}}else for(var H in D){var K=D[H].toString();K.length&&(B+='"'+H+" "+K+`
1456
- `)}Nt(f,B)},sort:function(f,A){function x(){if(A.argString){var Et=new Fe.StringStream(A.argString);if(Et.eat("!")&&(H=!0),Et.eol())return;if(!Et.eatSpace())return"Invalid arguments";var vt=Et.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!vt&&!Et.eol())return"Invalid arguments";if(vt[1]){K=vt[1].indexOf("i")!=-1,Y=vt[1].indexOf("u")!=-1;var Sn=vt[1].indexOf("d")!=-1||vt[1].indexOf("n")!=-1&&1,jn=vt[1].indexOf("x")!=-1&&1,fn=vt[1].indexOf("o")!=-1&&1;if(Sn+jn+fn>1)return"Invalid arguments";J=Sn&&"decimal"||jn&&"hex"||fn&&"octal"}vt[2]&&(ie=new RegExp(vt[2].substr(1,vt[2].length-2),K?"i":""))}}function D(Et,vt){if(H){var Sn;Sn=Et,Et=vt,vt=Sn}K&&(Et=Et.toLowerCase(),vt=vt.toLowerCase());var jn=J&&Ee.exec(Et),fn=J&&Ee.exec(vt);return jn?(jn=parseInt((jn[1]+jn[2]).toLowerCase(),ze),fn=parseInt((fn[1]+fn[2]).toLowerCase(),ze),jn-fn):Et<vt?-1:1}function B(Et,vt){if(H){var Sn;Sn=Et,Et=vt,vt=Sn}return K&&(Et[0]=Et[0].toLowerCase(),vt[0]=vt[0].toLowerCase()),Et[0]<vt[0]?-1:1}var H,K,Y,J,ie,se=x();if(se){Nt(f,se+": "+A.argString);return}var ye=A.line||f.firstLine(),ke=A.lineEnd||A.line||f.lastLine();if(ye!=ke){var de=new Oe(ye,0),we=new Oe(ke,Ht(f,ke)),Ie=f.getRange(de,we).split(`
1457
- `),Ee=ie||(J=="decimal"?/(-?)([\d]+)/:J=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:J=="octal"?/([0-7]+)/:null),ze=J=="decimal"?10:J=="hex"?16:J=="octal"?8:null,nt=[],Xe=[];if(J||ie)for(var Ze=0;Ze<Ie.length;Ze++){var Xt=ie?Ie[Ze].match(ie):null;Xt&&Xt[0]!=""?nt.push(Xt):!ie&&Ee.exec(Ie[Ze])?nt.push(Ie[Ze]):Xe.push(Ie[Ze])}else Xe=Ie;if(nt.sort(ie?B:D),ie)for(var Ze=0;Ze<nt.length;Ze++)nt[Ze]=nt[Ze].input;else J||Xe.sort(D);if(Ie=H?nt.concat(Xe):Xe.concat(nt),Y){var rt=Ie,dn;Ie=[];for(var Ze=0;Ze<rt.length;Ze++)rt[Ze]!=dn&&Ie.push(rt[Ze]),dn=rt[Ze]}f.replaceRange(Ie.join(`
1458
- `),de,we)}},vglobal:function(f,A){this.global(f,A)},normal:function(f,A){var x=A.argString;if(x&&x[0]=="!"&&(x=x.slice(1),Jt=!0),x=x.trimStart(),!x){Nt(f,"Argument is required.");return}var D=A.line;if(typeof D=="number")for(var B=isNaN(A.lineEnd)?D:A.lineEnd,H=D;H<=B;H++)f.setCursor(H,0),E(f,A.argString.trimStart()),f.state.vim.insertMode&&yi(f,!0);else E(f,A.argString.trimStart()),f.state.vim.insertMode&&yi(f,!0)},global:function(f,A){var x=A.argString;if(!x){Nt(f,"Regular Expression missing from global");return}var D=A.commandName[0]==="v";x[0]==="!"&&A.commandName[0]==="g"&&(D=!0,x=x.slice(1));var B=A.line!==void 0?A.line:f.firstLine(),H=A.lineEnd||A.line||f.lastLine(),K=ti(x),Y=x,J;if(K.length&&(Y=K[0],J=K.slice(1,K.length).join("/")),Y)try{an(f,Y,!0,!0)}catch{Nt(f,"Invalid regex: "+Y);return}for(var ie=gn(f).getQuery(),se=[],ye=B;ye<=H;ye++){var ke=f.getLine(ye),de=ie.test(ke);de!==D&&se.push(J?f.getLineHandle(ye):ke)}if(!J){Nt(f,se.join(`
1459
- `));return}var we=0,Ie=function(){if(we<se.length){var Ee=se[we++],ze=f.getLineNumber(Ee);if(ze==null){Ie();return}var nt=ze+1+J;Jn.processCommand(f,nt,{callback:Ie})}else f.releaseLineHandles&&f.releaseLineHandles()};Ie()},substitute:function(f,A){if(!f.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var x=A.argString,D=x?rr(x,x[0]):[],B,H="",K,Y,J,ie=!1,se=!1;if(D.length)B=D[0],C("pcre")&&B!==""&&(B=new RegExp(B).source),H=D[1],H!==void 0&&(C("pcre")?H=Cs(H.replace(/([^\\])&/g,"$1$$&")):H=Ss(H),He.lastSubstituteReplacePart=H),K=D[2]?D[2].split(" "):[];else if(x&&x.length){Nt(f,"Substitutions should be of the form :s/pattern/replace/");return}if(K&&(Y=K[0],J=parseInt(K[1]),Y&&(Y.indexOf("c")!=-1&&(ie=!0),Y.indexOf("g")!=-1&&(se=!0),C("pcre")?B=B+"/"+Y:B=B.replace(/\//g,"\\/")+"/"+Y)),B)try{an(f,B,!0,!0)}catch{Nt(f,"Invalid regex: "+B);return}if(H=H||He.lastSubstituteReplacePart,H===void 0){Nt(f,"No previous substitute regular expression");return}var ye=gn(f),ke=ye.getQuery(),de=A.line!==void 0?A.line:f.getCursor().line,we=A.lineEnd||de;de==f.firstLine()&&we==f.lastLine()&&(we=1/0),J&&(de=we,we=de+J-1);var Ie=le(f,new Oe(de,0)),Ee=f.getSearchCursor(ke,Ie);Jr(f,ie,se,de,we,Ee,ke,H,A.callback)},startinsert:function(f,A){E(f,A.argString=="!"?"A":"i",{})},redo:Fe.commands.redo,undo:Fe.commands.undo,write:function(f){Fe.commands.save?Fe.commands.save(f):f.save&&f.save()},nohlsearch:function(f){Zr(f)},yank:function(f){var A=Ke(f.getCursor()),x=A.line,D=f.getLine(x);He.registerController.pushText("0","yank",D,!0,!0)},delete:function(f,A){var x=A.selectionLine,D=isNaN(A.selectionLineEnd)?x:A.selectionLineEnd;ao.delete(f,{linewise:!0},[{anchor:new Oe(x,0),head:new Oe(D+1,0)}])},join:function(f,A){var x=A.selectionLine,D=isNaN(A.selectionLineEnd)?x:A.selectionLineEnd;f.setCursor(new Oe(x,0)),_n.joinLines(f,{repeat:D-x},f.state.vim)},delmarks:function(f,A){if(!A.argString||!qn(A.argString)){Nt(f,"Argument required");return}for(var x=f.state.vim,D=new Fe.StringStream(qn(A.argString));!D.eol();){D.eatSpace();var B=D.pos;if(!D.match(/[a-zA-Z]/,!1)){Nt(f,"Invalid argument: "+A.argString.substring(B));return}var H=D.next();if(D.match("-",!0)){if(!D.match(/[a-zA-Z]/,!1)){Nt(f,"Invalid argument: "+A.argString.substring(B));return}var K=H,Y=D.next();if(!(o(K)&&o(Y)||s(K)&&s(Y))){Nt(f,"Invalid argument: "+K+"-");return}var J=K.charCodeAt(0),ie=Y.charCodeAt(0);if(J>=ie){Nt(f,"Invalid argument: "+A.argString.substring(B));return}for(var se=0;se<=ie-J;se++){var ye=String.fromCharCode(J+se);delete x.marks[ye]}}else delete x.marks[H]}}},Jn=new Zn;R("insertModeEscKeysTimeout",200,"number"),Fe.Vim=mt;var ri={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},Li=mt.handleKey.bind(mt);mt.handleKey=function(f,A,x){return f.operation(function(){return Li(f,A,x)},!0)},I(),l.CodeMirror=Fe;var Ei=mt.maybeInitVimState_;l.handler={$id:"ace/keyboard/vim",drawCursor:function(f,A,x,D,B){var H=this.state.vim||{},K=x.characterWidth,Y=x.lineHeight,J=A.top,ie=A.left;if(!H.insertMode){var se=D.cursor?Pn.comparePoints(D.cursor,D.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!se&&ie>K&&(ie-=K)}!H.insertMode&&H.status&&(Y/=2,J+=Y),sr.translate(f,ie,J),sr.setStyle(f.style,"width",K+"px"),sr.setStyle(f.style,"height",Y+"px")},$getDirectionForHighlight:function(f){var A=f.state.cm,x=Ei(A);if(!x.insertMode)return f.session.selection.isBackwards()||f.session.selection.isEmpty()},handleKeyboard:function(f,A,x,D,B){var H=f.editor,K=H.state.cm,Y=Ei(K);if(D!=-1){if(Y.insertMode||(A==-1?(x.charCodeAt(0)>255&&f.inputKey&&(x=f.inputKey,x&&f.inputHash==4&&(x=x.toUpperCase())),f.inputChar=x):A==4||A==0?f.inputKey==x&&f.inputHash==A&&f.inputChar?(x=f.inputChar,A=-1):(f.inputChar=null,f.inputKey=x,f.inputHash=A):f.inputChar=f.inputKey=null),K.state.overwrite&&Y.insertMode&&x=="backspace"&&A==0)return{command:"gotoleft"};if(x=="c"&&A==1&&!Or.isMac&&H.getCopyText())return H.once("copy",function(){Y.insertMode?H.selection.clearSelection():K.operation(function(){bt(K)})}),{command:"null",passEvent:!0};if(x=="esc"&&!Y.insertMode&&!Y.visualMode&&!K.ace.inMultiSelectMode){var J=gn(K),ie=J.getOverlay();ie&&K.removeOverlay(ie)}if(A==-1||A&1||A===0&&x.length>1){var se=Y.insertMode,ye=Co(A,x,B||{},Y);Y.status==null&&(Y.status="");var ke=Rr(K,ye,"user");return Y=Ei(K),ke&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),K._signal("changeStatus"),!ke&&(A!=-1||se)?void 0:{command:"null",passEvent:!ke}}}},attach:function(f){function A(){var D=Ei(x).insertMode;x.ace.renderer.setStyle("normal-mode",!D),f.textInput.setCommandMode(!D),f.renderer.$keepTextAreaAtCursor=D,f.renderer.$blockCursor=!D}f.state||(f.state={});var x=new Fe(f);f.state.cm=x,f.$vimModeHandler=this,p(x),Ei(x).status=null,x.on("vim-command-done",function(){x.virtualSelectionMode()||(Ei(x).status=null,x.ace._signal("changeStatus"),x.ace.session.markUndoGroup())}),x.on("changeStatus",function(){x.ace.renderer.updateCursor(),x.ace._signal("changeStatus")}),x.on("vim-mode-change",function(){x.virtualSelectionMode()||(A(),x._signal("changeStatus"))}),A(),f.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(x)},detach:function(f){var A=f.state.cm;g(A),A.destroy(),f.state.cm=null,f.$vimModeHandler=null,f.renderer.$cursorLayer.drawCursor=null,f.renderer.setStyle("normal-mode",!1),f.textInput.setCommandMode(!1),f.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(f){var A=f.state.cm,x=Ei(A);if(x.insertMode)return"INSERT";var D="";return x.visualMode&&(D+="VISUAL",x.visualLine&&(D+=" LINE"),x.visualBlock&&(D+=" BLOCK")),x.status&&(D+=(D?" ":"")+x.status),D}},mt.defineOption({name:"wrap",set:function(f,A){A&&A.ace.setOption("wrap",f)},type:"boolean"},!1),mt.defineEx("write","w",function(){console.log(":write is not implemented")}),mn.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),mn.push({keys:"gq",type:"operator",operator:"hardWrap"}),mt.defineOperator("hardWrap",function(f,A,x,D,B){var H=x[0].anchor.line,K=x[0].head.line;return A.linewise&&K--,br(f.ace,{startRow:H,endRow:K}),Oe(K,0)}),R("textwidth",void 0,"number",["tw"],function(f,A){if(A!==void 0){if(f===void 0){var x=A.ace.getOption("printMarginColumn");return x}var D=Math.round(f);D>1&&A.ace.setOption("printMarginColumn",D)}}),_n.aceCommand=function(f,A,x){f.vimCmd=A,f.ace.inVirtualSelectionMode?f.ace.on("beforeEndOperation",zi):zi(null,f.ace)},_n.fold=function(f,A,x){f.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(A.all?2:0)+(A.open?1:0)])},Dr=mn.length,l.handler.defaultKeymap=mn,l.handler.actions=_n,l.Vim=mt}),function(){ace.require(["ace/keyboard/vim"],function(e){c&&(c.exports=e)})}()}(xc)),xc.exports}__();const bg={props:{config:{type:Object},packets:{type:Array}},data:function(){return{currentConfig:{},currentPackets:[],latestData:null}},computed:{hasRaw:function(){for(let c=0;c<this.currentPackets.length;c++)if(this.currentPackets[c].mode==="RAW")return!0;return!1},hasDecom:function(){for(let c=0;c<this.currentPackets.length;c++)if(this.currentPackets[c].mode==="DECOM")return!0;return!1}},watch:{currentConfig:{deep:!0,handler:function(c){this.$emit("config",c)}}},created:function(){this.config&&(this.currentConfig={...this.config}),this.packets&&(this.currentPackets=[...this.packets])},methods:{receive:function(c){this.latestData=c}}};var js={exports:{}};/**
1460
- * @license
1461
- * Lodash <https://lodash.com/>
1462
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1463
- * Released under MIT license <https://lodash.com/license>
1464
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1465
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1466
- */var S_=js.exports,bf;function C_(){return bf||(bf=1,function(c,u){(function(){var e,l="4.17.21",T=200,b="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",w="Expected a function",_="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",g=500,r="__lodash_placeholder__",a=1,o=2,i=4,n=1,s=2,h=1,m=2,y=4,R=8,$=16,C=32,v=64,L=128,I=256,F=512,E=30,U="...",P=800,O=16,S=1,k=2,N=3,W=1/0,V=9007199254740991,G=17976931348623157e292,Q=NaN,te=4294967295,he=te-1,ne=te>>>1,ue=[["ary",L],["bind",h],["bindKey",m],["curry",R],["curryRight",$],["flip",F],["partial",C],["partialRight",v],["rearg",I]],le="[object Arguments]",ce="[object Array]",ve="[object AsyncFunction]",Ce="[object Boolean]",$e="[object Date]",Te="[object DOMException]",qe="[object Error]",Ke="[object Function]",at="[object GeneratorFunction]",et="[object Map]",lt="[object Number]",jt="[object Null]",on="[object Object]",Ht="[object Promise]",qn="[object Proxy]",sn="[object RegExp]",yn="[object Set]",wn="[object String]",In="[object Symbol]",pt="[object Undefined]",Ve="[object WeakMap]",_e="[object WeakSet]",We="[object ArrayBuffer]",Ye="[object DataView]",ct="[object Float32Array]",wt="[object Float64Array]",bt="[object Int8Array]",$t="[object Int16Array]",Ct="[object Int32Array]",st="[object Uint8Array]",gt="[object Uint8ClampedArray]",hn="[object Uint16Array]",Yn="[object Uint32Array]",mi=/\b__p \+= '';/g,tr=/\b(__p \+=) '' \+/g,Mr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qn=/&(?:amp|lt|gt|quot|#39);/g,Tr=/[&<>"']/g,Qr=RegExp(Qn.source),ks=RegExp(Tr.source),Ci=/<%-([\s\S]+?)%>/g,_s=/<%([\s\S]+?)%>/g,yo=/<%=([\s\S]+?)%>/g,Go=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/,$n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ei=/[\\^$.*+?()[\]{}|]/g,ir=RegExp(ei.source),gn=/^\s+/,ti=/\s/,mr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,rr=/\{\n\/\* \[wrapped with (.+)\] \*/,wo=/,? & /,qo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ss=/[()=,{}\[\]\/\s]/,Cs=/\\(\\)?/g,or=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ai=/\w*$/,Nt=/^[-+]0x[0-9a-f]+$/i,Yo=/^0b[01]+$/i,ni=/^\[object .+?Constructor\]$/,Mn=/^0o[0-7]+$/i,an=/^(?:0|[1-9]\d*)$/,bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wi=/($^)/,ii=/['\n\r\u2028\u2029\\]/g,Hi="\\ud800-\\udfff",Zr="\\u0300-\\u036f",bo="\\ufe20-\\ufe2f",vr="\\u20d0-\\u20ff",vi=Zr+bo+vr,Lr="\\u2700-\\u27bf",Jr="a-z\\xdf-\\xf6\\xf8-\\xff",yi="\\xac\\xb1\\xd7\\xf7",Xr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xo="\\u2000-\\u206f",ko=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eo="A-Z\\xc0-\\xd6\\xd8-\\xde",Fn="\\ufe0e\\ufe0f",_o=yi+Xr+xo+ko,Er="['’]",to="["+Hi+"]",no="["+_o+"]",yr="["+vi+"]",So="\\d+",Qo="["+Lr+"]",io="["+Jr+"]",ro="[^"+Hi+_o+So+Lr+Jr+eo+"]",Co="\\ud83c[\\udffb-\\udfff]",oo="(?:"+yr+"|"+Co+")",Rr="[^"+Hi+"]",zi="(?:\\ud83c[\\udde6-\\uddff]){2}",Pn="[\\ud800-\\udbff][\\udc00-\\udfff]",wr="["+eo+"]",sr="\\u200d",Zo="(?:"+io+"|"+ro+")",As="(?:"+wr+"|"+ro+")",Ir="(?:"+Er+"(?:d|ll|m|re|s|t|ve))?",ar="(?:"+Er+"(?:D|LL|M|RE|S|T|VE))?",Or=oo+"?",so="["+Fn+"]?",Nr="(?:"+sr+"(?:"+[Rr,zi,Pn].join("|")+")"+so+Or+")*",Jo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",br="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fe=so+Or+Nr,Xo="(?:"+[Qo,zi,Pn].join("|")+")"+Fe,Oe="(?:"+[Rr+yr+"?",yr,zi,Pn,to].join("|")+")",mn=RegExp(Er,"g"),Dr=RegExp(yr,"g"),$i=RegExp(Co+"(?="+Co+")|"+Oe+Fe,"g"),Tn=RegExp([wr+"?"+io+"+"+Ir+"(?="+[no,wr,"$"].join("|")+")",As+"+"+ar+"(?="+[no,wr+Zo,"$"].join("|")+")",wr+"?"+Zo+"+"+Ir,wr+"+"+ar,br,Jo,So,Xo].join("|"),"g"),es=RegExp("["+sr+Hi+vi+Fn+"]"),Fr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ui=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xr=-1,Kt={};Kt[ct]=Kt[wt]=Kt[bt]=Kt[$t]=Kt[Ct]=Kt[st]=Kt[gt]=Kt[hn]=Kt[Yn]=!0,Kt[le]=Kt[ce]=Kt[We]=Kt[Ce]=Kt[Ye]=Kt[$e]=Kt[qe]=Kt[Ke]=Kt[et]=Kt[lt]=Kt[on]=Kt[sn]=Kt[yn]=Kt[wn]=Kt[Ve]=!1;var Ut={};Ut[le]=Ut[ce]=Ut[We]=Ut[Ye]=Ut[Ce]=Ut[$e]=Ut[ct]=Ut[wt]=Ut[bt]=Ut[$t]=Ut[Ct]=Ut[et]=Ut[lt]=Ut[on]=Ut[sn]=Ut[yn]=Ut[wn]=Ut[In]=Ut[st]=Ut[gt]=Ut[hn]=Ut[Yn]=!0,Ut[qe]=Ut[Ke]=Ut[Ve]=!1;var Gt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Dt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vi={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},xn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,ln=parseInt,mt=typeof mo=="object"&&mo&&mo.Object===Object&&mo,ci=typeof self=="object"&&self&&self.Object===Object&&self,Jt=mt||ci||Function("return this")(),cn=u&&!u.nodeType&&u,On=cn&&!0&&c&&!c.nodeType&&c,ui=On&&On.exports===cn,ji=ui&&mt.process,kn=function(){try{var pe=On&&On.require&&On.require("util").types;return pe||ji&&ji.binding&&ji.binding("util")}catch{}}(),wi=kn&&kn.isArrayBuffer,ao=kn&&kn.isDate,_n=kn&&kn.isMap,Mi=kn&&kn.isRegExp,Ti=kn&&kn.isSet,Ki=kn&&kn.isTypedArray;function Un(pe,Se,xe){switch(xe.length){case 0:return pe.call(Se);case 1:return pe.call(Se,xe[0]);case 2:return pe.call(Se,xe[0],xe[1]);case 3:return pe.call(Se,xe[0],xe[1],xe[2])}return pe.apply(Se,xe)}function Vn(pe,Se,xe,Ue){for(var ot=-1,_t=pe==null?0:pe.length;++ot<_t;){var zt=pe[ot];Se(Ue,zt,xe(zt),pe)}return Ue}function Zn(pe,Se){for(var xe=-1,Ue=pe==null?0:pe.length;++xe<Ue&&Se(pe[xe],xe,pe)!==!1;);return pe}function Ao(pe,Se){for(var xe=pe==null?0:pe.length;xe--&&Se(pe[xe],xe,pe)!==!1;);return pe}function Jn(pe,Se){for(var xe=-1,Ue=pe==null?0:pe.length;++xe<Ue;)if(!Se(pe[xe],xe,pe))return!1;return!0}function ri(pe,Se){for(var xe=-1,Ue=pe==null?0:pe.length,ot=0,_t=[];++xe<Ue;){var zt=pe[xe];Se(zt,xe,pe)&&(_t[ot++]=zt)}return _t}function Li(pe,Se){var xe=pe==null?0:pe.length;return!!xe&&se(pe,Se,0)>-1}function Ei(pe,Se,xe){for(var Ue=-1,ot=pe==null?0:pe.length;++Ue<ot;)if(xe(Se,pe[Ue]))return!0;return!1}function f(pe,Se){for(var xe=-1,Ue=pe==null?0:pe.length,ot=Array(Ue);++xe<Ue;)ot[xe]=Se(pe[xe],xe,pe);return ot}function A(pe,Se){for(var xe=-1,Ue=Se.length,ot=pe.length;++xe<Ue;)pe[ot+xe]=Se[xe];return pe}function x(pe,Se,xe,Ue){var ot=-1,_t=pe==null?0:pe.length;for(Ue&&_t&&(xe=pe[++ot]);++ot<_t;)xe=Se(xe,pe[ot],ot,pe);return xe}function D(pe,Se,xe,Ue){var ot=pe==null?0:pe.length;for(Ue&&ot&&(xe=pe[--ot]);ot--;)xe=Se(xe,pe[ot],ot,pe);return xe}function B(pe,Se){for(var xe=-1,Ue=pe==null?0:pe.length;++xe<Ue;)if(Se(pe[xe],xe,pe))return!0;return!1}var H=we("length");function K(pe){return pe.split("")}function Y(pe){return pe.match(qo)||[]}function J(pe,Se,xe){var Ue;return xe(pe,function(ot,_t,zt){if(Se(ot,_t,zt))return Ue=_t,!1}),Ue}function ie(pe,Se,xe,Ue){for(var ot=pe.length,_t=xe+(Ue?1:-1);Ue?_t--:++_t<ot;)if(Se(pe[_t],_t,pe))return _t;return-1}function se(pe,Se,xe){return Se===Se?Je(pe,Se,xe):ie(pe,ke,xe)}function ye(pe,Se,xe,Ue){for(var ot=xe-1,_t=pe.length;++ot<_t;)if(Ue(pe[ot],Se))return ot;return-1}function ke(pe){return pe!==pe}function de(pe,Se){var xe=pe==null?0:pe.length;return xe?nt(pe,Se)/xe:Q}function we(pe){return function(Se){return Se==null?e:Se[pe]}}function Ie(pe){return function(Se){return pe==null?e:pe[Se]}}function Ee(pe,Se,xe,Ue,ot){return ot(pe,function(_t,zt,Tt){xe=Ue?(Ue=!1,_t):Se(xe,_t,zt,Tt)}),xe}function ze(pe,Se){var xe=pe.length;for(pe.sort(Se);xe--;)pe[xe]=pe[xe].value;return pe}function nt(pe,Se){for(var xe,Ue=-1,ot=pe.length;++Ue<ot;){var _t=Se(pe[Ue]);_t!==e&&(xe=xe===e?_t:xe+_t)}return xe}function Xe(pe,Se){for(var xe=-1,Ue=Array(pe);++xe<pe;)Ue[xe]=Se(xe);return Ue}function Ze(pe,Se){return f(Se,function(xe){return[xe,pe[xe]]})}function Xt(pe){return pe&&pe.slice(0,Mt(pe)+1).replace(gn,"")}function rt(pe){return function(Se){return pe(Se)}}function dn(pe,Se){return f(Se,function(xe){return pe[xe]})}function Et(pe,Se){return pe.has(Se)}function vt(pe,Se){for(var xe=-1,Ue=pe.length;++xe<Ue&&se(Se,pe[xe],0)>-1;);return xe}function Sn(pe,Se){for(var xe=pe.length;xe--&&se(Se,pe[xe],0)>-1;);return xe}function jn(pe,Se){for(var xe=pe.length,Ue=0;xe--;)pe[xe]===Se&&++Ue;return Ue}var fn=Ie(Gt),j=Ie(Dt);function Z(pe){return"\\"+xn[pe]}function re(pe,Se){return pe==null?e:pe[Se]}function oe(pe){return es.test(pe)}function ge(pe){return Fr.test(pe)}function be(pe){for(var Se,xe=[];!(Se=pe.next()).done;)xe.push(Se.value);return xe}function Me(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(Ue,ot){xe[++Se]=[ot,Ue]}),xe}function De(pe,Se){return function(xe){return pe(Se(xe))}}function Pe(pe,Se){for(var xe=-1,Ue=pe.length,ot=0,_t=[];++xe<Ue;){var zt=pe[xe];(zt===Se||zt===r)&&(pe[xe]=r,_t[ot++]=xe)}return _t}function je(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(Ue){xe[++Se]=Ue}),xe}function Qe(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(Ue){xe[++Se]=[Ue,Ue]}),xe}function Je(pe,Se,xe){for(var Ue=xe-1,ot=pe.length;++Ue<ot;)if(pe[Ue]===Se)return Ue;return-1}function yt(pe,Se,xe){for(var Ue=xe+1;Ue--;)if(pe[Ue]===Se)return Ue;return Ue}function It(pe){return oe(pe)?it(pe):H(pe)}function xt(pe){return oe(pe)?tn(pe):K(pe)}function Mt(pe){for(var Se=pe.length;Se--&&ti.test(pe.charAt(Se)););return Se}var ut=Ie(Vi);function it(pe){for(var Se=$i.lastIndex=0;$i.test(pe);)++Se;return Se}function tn(pe){return pe.match($i)||[]}function pn(pe){return pe.match(Tn)||[]}var Nn=function pe(Se){Se=Se==null?Jt:Bt.defaults(Jt.Object(),Se,Bt.pick(Jt,Ui));var xe=Se.Array,Ue=Se.Date,ot=Se.Error,_t=Se.Function,zt=Se.Math,Tt=Se.Object,hi=Se.RegExp,Gi=Se.String,en=Se.TypeError,Kn=xe.prototype,Pr=_t.prototype,Cn=Tt.prototype,$o=Se["__core-js_shared__"],ia=Pr.toString,Zt=Cn.hasOwnProperty,hm=0,Xu=function(){var t=/[^.]+$/.exec($o&&$o.keys&&$o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ra=Cn.toString,dm=ia.call(Tt),fm=Jt._,pm=hi("^"+ia.call(Zt).replace(ei,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oa=ui?Se.Buffer:e,lo=Se.Symbol,sa=Se.Uint8Array,eh=oa?oa.allocUnsafe:e,aa=De(Tt.getPrototypeOf,Tt),th=Tt.create,nh=Cn.propertyIsEnumerable,la=Kn.splice,ih=lo?lo.isConcatSpreadable:e,$s=lo?lo.iterator:e,Mo=lo?lo.toStringTag:e,ca=function(){try{var t=Io(Tt,"defineProperty");return t({},"",{}),t}catch{}}(),gm=Se.clearTimeout!==Jt.clearTimeout&&Se.clearTimeout,mm=Ue&&Ue.now!==Jt.Date.now&&Ue.now,vm=Se.setTimeout!==Jt.setTimeout&&Se.setTimeout,ua=zt.ceil,ha=zt.floor,ml=Tt.getOwnPropertySymbols,ym=oa?oa.isBuffer:e,rh=Se.isFinite,wm=Kn.join,bm=De(Tt.keys,Tt),Bn=zt.max,oi=zt.min,xm=Ue.now,km=Se.parseInt,oh=zt.random,_m=Kn.reverse,vl=Io(Se,"DataView"),Ms=Io(Se,"Map"),yl=Io(Se,"Promise"),ts=Io(Se,"Set"),Ts=Io(Se,"WeakMap"),Ls=Io(Tt,"create"),da=Ts&&new Ts,ns={},Sm=Oo(vl),Cm=Oo(Ms),Am=Oo(yl),$m=Oo(ts),Mm=Oo(Ts),fa=lo?lo.prototype:e,Es=fa?fa.valueOf:e,sh=fa?fa.toString:e;function X(t){if(An(t)&&!kt(t)&&!(t instanceof Ft)){if(t instanceof qi)return t;if(Zt.call(t,"__wrapped__"))return ad(t)}return new qi(t)}var is=function(){function t(){}return function(d){if(!vn(d))return{};if(th)return th(d);t.prototype=d;var M=new t;return t.prototype=e,M}}();function pa(){}function qi(t,d){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!d,this.__index__=0,this.__values__=e}X.templateSettings={escape:Ci,evaluate:_s,interpolate:yo,variable:"",imports:{_:X}},X.prototype=pa.prototype,X.prototype.constructor=X,qi.prototype=is(pa.prototype),qi.prototype.constructor=qi;function Ft(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function Tm(){var t=new Ft(this.__wrapped__);return t.__actions__=bi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=bi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=bi(this.__views__),t}function Lm(){if(this.__filtered__){var t=new Ft(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Em(){var t=this.__wrapped__.value(),d=this.__dir__,M=kt(t),z=d<0,q=M?t.length:0,ee=Uv(0,q,this.__views__),ae=ee.start,fe=ee.end,me=fe-ae,Le=z?fe:ae-1,Re=this.__iteratees__,Ne=Re.length,Ge=0,tt=oi(me,this.__takeCount__);if(!M||!z&&q==me&&tt==me)return Lh(t,this.__actions__);var dt=[];e:for(;me--&&Ge<tt;){Le+=d;for(var Lt=-1,ft=t[Le];++Lt<Ne;){var Ot=Re[Lt],Wt=Ot.iteratee,Oi=Ot.type,pi=Wt(ft);if(Oi==k)ft=pi;else if(!pi){if(Oi==S)continue e;break e}}dt[Ge++]=ft}return dt}Ft.prototype=is(pa.prototype),Ft.prototype.constructor=Ft;function To(t){var d=-1,M=t==null?0:t.length;for(this.clear();++d<M;){var z=t[d];this.set(z[0],z[1])}}function Rm(){this.__data__=Ls?Ls(null):{},this.size=0}function Im(t){var d=this.has(t)&&delete this.__data__[t];return this.size-=d?1:0,d}function Om(t){var d=this.__data__;if(Ls){var M=d[t];return M===p?e:M}return Zt.call(d,t)?d[t]:e}function Nm(t){var d=this.__data__;return Ls?d[t]!==e:Zt.call(d,t)}function Dm(t,d){var M=this.__data__;return this.size+=this.has(t)?0:1,M[t]=Ls&&d===e?p:d,this}To.prototype.clear=Rm,To.prototype.delete=Im,To.prototype.get=Om,To.prototype.has=Nm,To.prototype.set=Dm;function Br(t){var d=-1,M=t==null?0:t.length;for(this.clear();++d<M;){var z=t[d];this.set(z[0],z[1])}}function Fm(){this.__data__=[],this.size=0}function Pm(t){var d=this.__data__,M=ga(d,t);if(M<0)return!1;var z=d.length-1;return M==z?d.pop():la.call(d,M,1),--this.size,!0}function Bm(t){var d=this.__data__,M=ga(d,t);return M<0?e:d[M][1]}function Wm(t){return ga(this.__data__,t)>-1}function Hm(t,d){var M=this.__data__,z=ga(M,t);return z<0?(++this.size,M.push([t,d])):M[z][1]=d,this}Br.prototype.clear=Fm,Br.prototype.delete=Pm,Br.prototype.get=Bm,Br.prototype.has=Wm,Br.prototype.set=Hm;function Wr(t){var d=-1,M=t==null?0:t.length;for(this.clear();++d<M;){var z=t[d];this.set(z[0],z[1])}}function zm(){this.size=0,this.__data__={hash:new To,map:new(Ms||Br),string:new To}}function Um(t){var d=$a(this,t).delete(t);return this.size-=d?1:0,d}function Vm(t){return $a(this,t).get(t)}function jm(t){return $a(this,t).has(t)}function Km(t,d){var M=$a(this,t),z=M.size;return M.set(t,d),this.size+=M.size==z?0:1,this}Wr.prototype.clear=zm,Wr.prototype.delete=Um,Wr.prototype.get=Vm,Wr.prototype.has=jm,Wr.prototype.set=Km;function Lo(t){var d=-1,M=t==null?0:t.length;for(this.__data__=new Wr;++d<M;)this.add(t[d])}function Gm(t){return this.__data__.set(t,p),this}function qm(t){return this.__data__.has(t)}Lo.prototype.add=Lo.prototype.push=Gm,Lo.prototype.has=qm;function lr(t){var d=this.__data__=new Br(t);this.size=d.size}function Ym(){this.__data__=new Br,this.size=0}function Qm(t){var d=this.__data__,M=d.delete(t);return this.size=d.size,M}function Zm(t){return this.__data__.get(t)}function Jm(t){return this.__data__.has(t)}function Xm(t,d){var M=this.__data__;if(M instanceof Br){var z=M.__data__;if(!Ms||z.length<T-1)return z.push([t,d]),this.size=++M.size,this;M=this.__data__=new Wr(z)}return M.set(t,d),this.size=M.size,this}lr.prototype.clear=Ym,lr.prototype.delete=Qm,lr.prototype.get=Zm,lr.prototype.has=Jm,lr.prototype.set=Xm;function ah(t,d){var M=kt(t),z=!M&&No(t),q=!M&&!z&&po(t),ee=!M&&!z&&!q&&as(t),ae=M||z||q||ee,fe=ae?Xe(t.length,Gi):[],me=fe.length;for(var Le in t)(d||Zt.call(t,Le))&&!(ae&&(Le=="length"||q&&(Le=="offset"||Le=="parent")||ee&&(Le=="buffer"||Le=="byteLength"||Le=="byteOffset")||Vr(Le,me)))&&fe.push(Le);return fe}function lh(t){var d=t.length;return d?t[Tl(0,d-1)]:e}function ev(t,d){return Ma(bi(t),Eo(d,0,t.length))}function tv(t){return Ma(bi(t))}function wl(t,d,M){(M!==e&&!cr(t[d],M)||M===e&&!(d in t))&&Hr(t,d,M)}function Rs(t,d,M){var z=t[d];(!(Zt.call(t,d)&&cr(z,M))||M===e&&!(d in t))&&Hr(t,d,M)}function ga(t,d){for(var M=t.length;M--;)if(cr(t[M][0],d))return M;return-1}function nv(t,d,M,z){return co(t,function(q,ee,ae){d(z,q,M(q),ae)}),z}function ch(t,d){return t&&_r(d,Gn(d),t)}function iv(t,d){return t&&_r(d,ki(d),t)}function Hr(t,d,M){d=="__proto__"&&ca?ca(t,d,{configurable:!0,enumerable:!0,value:M,writable:!0}):t[d]=M}function bl(t,d){for(var M=-1,z=d.length,q=xe(z),ee=t==null;++M<z;)q[M]=ee?e:ec(t,d[M]);return q}function Eo(t,d,M){return t===t&&(M!==e&&(t=t<=M?t:M),d!==e&&(t=t>=d?t:d)),t}function Yi(t,d,M,z,q,ee){var ae,fe=d&a,me=d&o,Le=d&i;if(M&&(ae=q?M(t,z,q,ee):M(t)),ae!==e)return ae;if(!vn(t))return t;var Re=kt(t);if(Re){if(ae=jv(t),!fe)return bi(t,ae)}else{var Ne=si(t),Ge=Ne==Ke||Ne==at;if(po(t))return Ih(t,fe);if(Ne==on||Ne==le||Ge&&!q){if(ae=me||Ge?{}:Jh(t),!fe)return me?Ov(t,iv(ae,t)):Iv(t,ch(ae,t))}else{if(!Ut[Ne])return q?t:{};ae=Kv(t,Ne,fe)}}ee||(ee=new lr);var tt=ee.get(t);if(tt)return tt;ee.set(t,ae),$d(t)?t.forEach(function(ft){ae.add(Yi(ft,d,M,ft,t,ee))}):Cd(t)&&t.forEach(function(ft,Ot){ae.set(Ot,Yi(ft,d,M,Ot,t,ee))});var dt=Le?me?Wl:Bl:me?ki:Gn,Lt=Re?e:dt(t);return Zn(Lt||t,function(ft,Ot){Lt&&(Ot=ft,ft=t[Ot]),Rs(ae,Ot,Yi(ft,d,M,Ot,t,ee))}),ae}function rv(t){var d=Gn(t);return function(M){return uh(M,t,d)}}function uh(t,d,M){var z=M.length;if(t==null)return!z;for(t=Tt(t);z--;){var q=M[z],ee=d[q],ae=t[q];if(ae===e&&!(q in t)||!ee(ae))return!1}return!0}function hh(t,d,M){if(typeof t!="function")throw new en(w);return Bs(function(){t.apply(e,M)},d)}function Is(t,d,M,z){var q=-1,ee=Li,ae=!0,fe=t.length,me=[],Le=d.length;if(!fe)return me;M&&(d=f(d,rt(M))),z?(ee=Ei,ae=!1):d.length>=T&&(ee=Et,ae=!1,d=new Lo(d));e:for(;++q<fe;){var Re=t[q],Ne=M==null?Re:M(Re);if(Re=z||Re!==0?Re:0,ae&&Ne===Ne){for(var Ge=Le;Ge--;)if(d[Ge]===Ne)continue e;me.push(Re)}else ee(d,Ne,z)||me.push(Re)}return me}var co=Ph(kr),dh=Ph(kl,!0);function ov(t,d){var M=!0;return co(t,function(z,q,ee){return M=!!d(z,q,ee),M}),M}function ma(t,d,M){for(var z=-1,q=t.length;++z<q;){var ee=t[z],ae=d(ee);if(ae!=null&&(fe===e?ae===ae&&!Ii(ae):M(ae,fe)))var fe=ae,me=ee}return me}function sv(t,d,M,z){var q=t.length;for(M=At(M),M<0&&(M=-M>q?0:q+M),z=z===e||z>q?q:At(z),z<0&&(z+=q),z=M>z?0:Td(z);M<z;)t[M++]=d;return t}function fh(t,d){var M=[];return co(t,function(z,q,ee){d(z,q,ee)&&M.push(z)}),M}function Xn(t,d,M,z,q){var ee=-1,ae=t.length;for(M||(M=qv),q||(q=[]);++ee<ae;){var fe=t[ee];d>0&&M(fe)?d>1?Xn(fe,d-1,M,z,q):A(q,fe):z||(q[q.length]=fe)}return q}var xl=Bh(),ph=Bh(!0);function kr(t,d){return t&&xl(t,d,Gn)}function kl(t,d){return t&&ph(t,d,Gn)}function va(t,d){return ri(d,function(M){return jr(t[M])})}function Ro(t,d){d=ho(d,t);for(var M=0,z=d.length;t!=null&&M<z;)t=t[Sr(d[M++])];return M&&M==z?t:e}function gh(t,d,M){var z=d(t);return kt(t)?z:A(z,M(t))}function di(t){return t==null?t===e?pt:jt:Mo&&Mo in Tt(t)?zv(t):ty(t)}function _l(t,d){return t>d}function av(t,d){return t!=null&&Zt.call(t,d)}function lv(t,d){return t!=null&&d in Tt(t)}function cv(t,d,M){return t>=oi(d,M)&&t<Bn(d,M)}function Sl(t,d,M){for(var z=M?Ei:Li,q=t[0].length,ee=t.length,ae=ee,fe=xe(ee),me=1/0,Le=[];ae--;){var Re=t[ae];ae&&d&&(Re=f(Re,rt(d))),me=oi(Re.length,me),fe[ae]=!M&&(d||q>=120&&Re.length>=120)?new Lo(ae&&Re):e}Re=t[0];var Ne=-1,Ge=fe[0];e:for(;++Ne<q&&Le.length<me;){var tt=Re[Ne],dt=d?d(tt):tt;if(tt=M||tt!==0?tt:0,!(Ge?Et(Ge,dt):z(Le,dt,M))){for(ae=ee;--ae;){var Lt=fe[ae];if(!(Lt?Et(Lt,dt):z(t[ae],dt,M)))continue e}Ge&&Ge.push(dt),Le.push(tt)}}return Le}function uv(t,d,M,z){return kr(t,function(q,ee,ae){d(z,M(q),ee,ae)}),z}function Os(t,d,M){d=ho(d,t),t=nd(t,d);var z=t==null?t:t[Sr(Zi(d))];return z==null?e:Un(z,t,M)}function mh(t){return An(t)&&di(t)==le}function hv(t){return An(t)&&di(t)==We}function dv(t){return An(t)&&di(t)==$e}function Ns(t,d,M,z,q){return t===d?!0:t==null||d==null||!An(t)&&!An(d)?t!==t&&d!==d:fv(t,d,M,z,Ns,q)}function fv(t,d,M,z,q,ee){var ae=kt(t),fe=kt(d),me=ae?ce:si(t),Le=fe?ce:si(d);me=me==le?on:me,Le=Le==le?on:Le;var Re=me==on,Ne=Le==on,Ge=me==Le;if(Ge&&po(t)){if(!po(d))return!1;ae=!0,Re=!1}if(Ge&&!Re)return ee||(ee=new lr),ae||as(t)?Yh(t,d,M,z,q,ee):Wv(t,d,me,M,z,q,ee);if(!(M&n)){var tt=Re&&Zt.call(t,"__wrapped__"),dt=Ne&&Zt.call(d,"__wrapped__");if(tt||dt){var Lt=tt?t.value():t,ft=dt?d.value():d;return ee||(ee=new lr),q(Lt,ft,M,z,ee)}}return Ge?(ee||(ee=new lr),Hv(t,d,M,z,q,ee)):!1}function pv(t){return An(t)&&si(t)==et}function Cl(t,d,M,z){var q=M.length,ee=q,ae=!z;if(t==null)return!ee;for(t=Tt(t);q--;){var fe=M[q];if(ae&&fe[2]?fe[1]!==t[fe[0]]:!(fe[0]in t))return!1}for(;++q<ee;){fe=M[q];var me=fe[0],Le=t[me],Re=fe[1];if(ae&&fe[2]){if(Le===e&&!(me in t))return!1}else{var Ne=new lr;if(z)var Ge=z(Le,Re,me,t,d,Ne);if(!(Ge===e?Ns(Re,Le,n|s,z,Ne):Ge))return!1}}return!0}function vh(t){if(!vn(t)||Qv(t))return!1;var d=jr(t)?pm:ni;return d.test(Oo(t))}function gv(t){return An(t)&&di(t)==sn}function mv(t){return An(t)&&si(t)==yn}function vv(t){return An(t)&&Oa(t.length)&&!!Kt[di(t)]}function yh(t){return typeof t=="function"?t:t==null?_i:typeof t=="object"?kt(t)?xh(t[0],t[1]):bh(t):Wd(t)}function Al(t){if(!Ps(t))return bm(t);var d=[];for(var M in Tt(t))Zt.call(t,M)&&M!="constructor"&&d.push(M);return d}function yv(t){if(!vn(t))return ey(t);var d=Ps(t),M=[];for(var z in t)z=="constructor"&&(d||!Zt.call(t,z))||M.push(z);return M}function $l(t,d){return t<d}function wh(t,d){var M=-1,z=xi(t)?xe(t.length):[];return co(t,function(q,ee,ae){z[++M]=d(q,ee,ae)}),z}function bh(t){var d=zl(t);return d.length==1&&d[0][2]?ed(d[0][0],d[0][1]):function(M){return M===t||Cl(M,t,d)}}function xh(t,d){return Vl(t)&&Xh(d)?ed(Sr(t),d):function(M){var z=ec(M,t);return z===e&&z===d?tc(M,t):Ns(d,z,n|s)}}function ya(t,d,M,z,q){t!==d&&xl(d,function(ee,ae){if(q||(q=new lr),vn(ee))wv(t,d,ae,M,ya,z,q);else{var fe=z?z(Kl(t,ae),ee,ae+"",t,d,q):e;fe===e&&(fe=ee),wl(t,ae,fe)}},ki)}function wv(t,d,M,z,q,ee,ae){var fe=Kl(t,M),me=Kl(d,M),Le=ae.get(me);if(Le){wl(t,M,Le);return}var Re=ee?ee(fe,me,M+"",t,d,ae):e,Ne=Re===e;if(Ne){var Ge=kt(me),tt=!Ge&&po(me),dt=!Ge&&!tt&&as(me);Re=me,Ge||tt||dt?kt(fe)?Re=fe:Ln(fe)?Re=bi(fe):tt?(Ne=!1,Re=Ih(me,!0)):dt?(Ne=!1,Re=Oh(me,!0)):Re=[]:Ws(me)||No(me)?(Re=fe,No(fe)?Re=Ld(fe):(!vn(fe)||jr(fe))&&(Re=Jh(me))):Ne=!1}Ne&&(ae.set(me,Re),q(Re,me,z,ee,ae),ae.delete(me)),wl(t,M,Re)}function kh(t,d){var M=t.length;if(M)return d+=d<0?M:0,Vr(d,M)?t[d]:e}function _h(t,d,M){d.length?d=f(d,function(ee){return kt(ee)?function(ae){return Ro(ae,ee.length===1?ee[0]:ee)}:ee}):d=[_i];var z=-1;d=f(d,rt(ht()));var q=wh(t,function(ee,ae,fe){var me=f(d,function(Le){return Le(ee)});return{criteria:me,index:++z,value:ee}});return ze(q,function(ee,ae){return Rv(ee,ae,M)})}function bv(t,d){return Sh(t,d,function(M,z){return tc(t,z)})}function Sh(t,d,M){for(var z=-1,q=d.length,ee={};++z<q;){var ae=d[z],fe=Ro(t,ae);M(fe,ae)&&Ds(ee,ho(ae,t),fe)}return ee}function xv(t){return function(d){return Ro(d,t)}}function Ml(t,d,M,z){var q=z?ye:se,ee=-1,ae=d.length,fe=t;for(t===d&&(d=bi(d)),M&&(fe=f(t,rt(M)));++ee<ae;)for(var me=0,Le=d[ee],Re=M?M(Le):Le;(me=q(fe,Re,me,z))>-1;)fe!==t&&la.call(fe,me,1),la.call(t,me,1);return t}function Ch(t,d){for(var M=t?d.length:0,z=M-1;M--;){var q=d[M];if(M==z||q!==ee){var ee=q;Vr(q)?la.call(t,q,1):Rl(t,q)}}return t}function Tl(t,d){return t+ha(oh()*(d-t+1))}function kv(t,d,M,z){for(var q=-1,ee=Bn(ua((d-t)/(M||1)),0),ae=xe(ee);ee--;)ae[z?ee:++q]=t,t+=M;return ae}function Ll(t,d){var M="";if(!t||d<1||d>V)return M;do d%2&&(M+=t),d=ha(d/2),d&&(t+=t);while(d);return M}function Rt(t,d){return Gl(td(t,d,_i),t+"")}function _v(t){return lh(ls(t))}function Sv(t,d){var M=ls(t);return Ma(M,Eo(d,0,M.length))}function Ds(t,d,M,z){if(!vn(t))return t;d=ho(d,t);for(var q=-1,ee=d.length,ae=ee-1,fe=t;fe!=null&&++q<ee;){var me=Sr(d[q]),Le=M;if(me==="__proto__"||me==="constructor"||me==="prototype")return t;if(q!=ae){var Re=fe[me];Le=z?z(Re,me,fe):e,Le===e&&(Le=vn(Re)?Re:Vr(d[q+1])?[]:{})}Rs(fe,me,Le),fe=fe[me]}return t}var Ah=da?function(t,d){return da.set(t,d),t}:_i,Cv=ca?function(t,d){return ca(t,"toString",{configurable:!0,enumerable:!1,value:ic(d),writable:!0})}:_i;function Av(t){return Ma(ls(t))}function Qi(t,d,M){var z=-1,q=t.length;d<0&&(d=-d>q?0:q+d),M=M>q?q:M,M<0&&(M+=q),q=d>M?0:M-d>>>0,d>>>=0;for(var ee=xe(q);++z<q;)ee[z]=t[z+d];return ee}function $v(t,d){var M;return co(t,function(z,q,ee){return M=d(z,q,ee),!M}),!!M}function wa(t,d,M){var z=0,q=t==null?z:t.length;if(typeof d=="number"&&d===d&&q<=ne){for(;z<q;){var ee=z+q>>>1,ae=t[ee];ae!==null&&!Ii(ae)&&(M?ae<=d:ae<d)?z=ee+1:q=ee}return q}return El(t,d,_i,M)}function El(t,d,M,z){var q=0,ee=t==null?0:t.length;if(ee===0)return 0;d=M(d);for(var ae=d!==d,fe=d===null,me=Ii(d),Le=d===e;q<ee;){var Re=ha((q+ee)/2),Ne=M(t[Re]),Ge=Ne!==e,tt=Ne===null,dt=Ne===Ne,Lt=Ii(Ne);if(ae)var ft=z||dt;else Le?ft=dt&&(z||Ge):fe?ft=dt&&Ge&&(z||!tt):me?ft=dt&&Ge&&!tt&&(z||!Lt):tt||Lt?ft=!1:ft=z?Ne<=d:Ne<d;ft?q=Re+1:ee=Re}return oi(ee,he)}function $h(t,d){for(var M=-1,z=t.length,q=0,ee=[];++M<z;){var ae=t[M],fe=d?d(ae):ae;if(!M||!cr(fe,me)){var me=fe;ee[q++]=ae===0?0:ae}}return ee}function Mh(t){return typeof t=="number"?t:Ii(t)?Q:+t}function Ri(t){if(typeof t=="string")return t;if(kt(t))return f(t,Ri)+"";if(Ii(t))return sh?sh.call(t):"";var d=t+"";return d=="0"&&1/t==-1/0?"-0":d}function uo(t,d,M){var z=-1,q=Li,ee=t.length,ae=!0,fe=[],me=fe;if(M)ae=!1,q=Ei;else if(ee>=T){var Le=d?null:Pv(t);if(Le)return je(Le);ae=!1,q=Et,me=new Lo}else me=d?[]:fe;e:for(;++z<ee;){var Re=t[z],Ne=d?d(Re):Re;if(Re=M||Re!==0?Re:0,ae&&Ne===Ne){for(var Ge=me.length;Ge--;)if(me[Ge]===Ne)continue e;d&&me.push(Ne),fe.push(Re)}else q(me,Ne,M)||(me!==fe&&me.push(Ne),fe.push(Re))}return fe}function Rl(t,d){return d=ho(d,t),t=nd(t,d),t==null||delete t[Sr(Zi(d))]}function Th(t,d,M,z){return Ds(t,d,M(Ro(t,d)),z)}function ba(t,d,M,z){for(var q=t.length,ee=z?q:-1;(z?ee--:++ee<q)&&d(t[ee],ee,t););return M?Qi(t,z?0:ee,z?ee+1:q):Qi(t,z?ee+1:0,z?q:ee)}function Lh(t,d){var M=t;return M instanceof Ft&&(M=M.value()),x(d,function(z,q){return q.func.apply(q.thisArg,A([z],q.args))},M)}function Il(t,d,M){var z=t.length;if(z<2)return z?uo(t[0]):[];for(var q=-1,ee=xe(z);++q<z;)for(var ae=t[q],fe=-1;++fe<z;)fe!=q&&(ee[q]=Is(ee[q]||ae,t[fe],d,M));return uo(Xn(ee,1),d,M)}function Eh(t,d,M){for(var z=-1,q=t.length,ee=d.length,ae={};++z<q;){var fe=z<ee?d[z]:e;M(ae,t[z],fe)}return ae}function Ol(t){return Ln(t)?t:[]}function Nl(t){return typeof t=="function"?t:_i}function ho(t,d){return kt(t)?t:Vl(t,d)?[t]:sd(Yt(t))}var Mv=Rt;function fo(t,d,M){var z=t.length;return M=M===e?z:M,!d&&M>=z?t:Qi(t,d,M)}var Rh=gm||function(t){return Jt.clearTimeout(t)};function Ih(t,d){if(d)return t.slice();var M=t.length,z=eh?eh(M):new t.constructor(M);return t.copy(z),z}function Dl(t){var d=new t.constructor(t.byteLength);return new sa(d).set(new sa(t)),d}function Tv(t,d){var M=d?Dl(t.buffer):t.buffer;return new t.constructor(M,t.byteOffset,t.byteLength)}function Lv(t){var d=new t.constructor(t.source,Ai.exec(t));return d.lastIndex=t.lastIndex,d}function Ev(t){return Es?Tt(Es.call(t)):{}}function Oh(t,d){var M=d?Dl(t.buffer):t.buffer;return new t.constructor(M,t.byteOffset,t.length)}function Nh(t,d){if(t!==d){var M=t!==e,z=t===null,q=t===t,ee=Ii(t),ae=d!==e,fe=d===null,me=d===d,Le=Ii(d);if(!fe&&!Le&&!ee&&t>d||ee&&ae&&me&&!fe&&!Le||z&&ae&&me||!M&&me||!q)return 1;if(!z&&!ee&&!Le&&t<d||Le&&M&&q&&!z&&!ee||fe&&M&&q||!ae&&q||!me)return-1}return 0}function Rv(t,d,M){for(var z=-1,q=t.criteria,ee=d.criteria,ae=q.length,fe=M.length;++z<ae;){var me=Nh(q[z],ee[z]);if(me){if(z>=fe)return me;var Le=M[z];return me*(Le=="desc"?-1:1)}}return t.index-d.index}function Dh(t,d,M,z){for(var q=-1,ee=t.length,ae=M.length,fe=-1,me=d.length,Le=Bn(ee-ae,0),Re=xe(me+Le),Ne=!z;++fe<me;)Re[fe]=d[fe];for(;++q<ae;)(Ne||q<ee)&&(Re[M[q]]=t[q]);for(;Le--;)Re[fe++]=t[q++];return Re}function Fh(t,d,M,z){for(var q=-1,ee=t.length,ae=-1,fe=M.length,me=-1,Le=d.length,Re=Bn(ee-fe,0),Ne=xe(Re+Le),Ge=!z;++q<Re;)Ne[q]=t[q];for(var tt=q;++me<Le;)Ne[tt+me]=d[me];for(;++ae<fe;)(Ge||q<ee)&&(Ne[tt+M[ae]]=t[q++]);return Ne}function bi(t,d){var M=-1,z=t.length;for(d||(d=xe(z));++M<z;)d[M]=t[M];return d}function _r(t,d,M,z){var q=!M;M||(M={});for(var ee=-1,ae=d.length;++ee<ae;){var fe=d[ee],me=z?z(M[fe],t[fe],fe,M,t):e;me===e&&(me=t[fe]),q?Hr(M,fe,me):Rs(M,fe,me)}return M}function Iv(t,d){return _r(t,Ul(t),d)}function Ov(t,d){return _r(t,Qh(t),d)}function xa(t,d){return function(M,z){var q=kt(M)?Vn:nv,ee=d?d():{};return q(M,t,ht(z,2),ee)}}function rs(t){return Rt(function(d,M){var z=-1,q=M.length,ee=q>1?M[q-1]:e,ae=q>2?M[2]:e;for(ee=t.length>3&&typeof ee=="function"?(q--,ee):e,ae&&fi(M[0],M[1],ae)&&(ee=q<3?e:ee,q=1),d=Tt(d);++z<q;){var fe=M[z];fe&&t(d,fe,z,ee)}return d})}function Ph(t,d){return function(M,z){if(M==null)return M;if(!xi(M))return t(M,z);for(var q=M.length,ee=d?q:-1,ae=Tt(M);(d?ee--:++ee<q)&&z(ae[ee],ee,ae)!==!1;);return M}}function Bh(t){return function(d,M,z){for(var q=-1,ee=Tt(d),ae=z(d),fe=ae.length;fe--;){var me=ae[t?fe:++q];if(M(ee[me],me,ee)===!1)break}return d}}function Nv(t,d,M){var z=d&h,q=Fs(t);function ee(){var ae=this&&this!==Jt&&this instanceof ee?q:t;return ae.apply(z?M:this,arguments)}return ee}function Wh(t){return function(d){d=Yt(d);var M=oe(d)?xt(d):e,z=M?M[0]:d.charAt(0),q=M?fo(M,1).join(""):d.slice(1);return z[t]()+q}}function os(t){return function(d){return x(Pd(Fd(d).replace(mn,"")),t,"")}}function Fs(t){return function(){var d=arguments;switch(d.length){case 0:return new t;case 1:return new t(d[0]);case 2:return new t(d[0],d[1]);case 3:return new t(d[0],d[1],d[2]);case 4:return new t(d[0],d[1],d[2],d[3]);case 5:return new t(d[0],d[1],d[2],d[3],d[4]);case 6:return new t(d[0],d[1],d[2],d[3],d[4],d[5]);case 7:return new t(d[0],d[1],d[2],d[3],d[4],d[5],d[6])}var M=is(t.prototype),z=t.apply(M,d);return vn(z)?z:M}}function Dv(t,d,M){var z=Fs(t);function q(){for(var ee=arguments.length,ae=xe(ee),fe=ee,me=ss(q);fe--;)ae[fe]=arguments[fe];var Le=ee<3&&ae[0]!==me&&ae[ee-1]!==me?[]:Pe(ae,me);if(ee-=Le.length,ee<M)return jh(t,d,ka,q.placeholder,e,ae,Le,e,e,M-ee);var Re=this&&this!==Jt&&this instanceof q?z:t;return Un(Re,this,ae)}return q}function Hh(t){return function(d,M,z){var q=Tt(d);if(!xi(d)){var ee=ht(M,3);d=Gn(d),M=function(fe){return ee(q[fe],fe,q)}}var ae=t(d,M,z);return ae>-1?q[ee?d[ae]:ae]:e}}function zh(t){return Ur(function(d){var M=d.length,z=M,q=qi.prototype.thru;for(t&&d.reverse();z--;){var ee=d[z];if(typeof ee!="function")throw new en(w);if(q&&!ae&&Aa(ee)=="wrapper")var ae=new qi([],!0)}for(z=ae?z:M;++z<M;){ee=d[z];var fe=Aa(ee),me=fe=="wrapper"?Hl(ee):e;me&&jl(me[0])&&me[1]==(L|R|C|I)&&!me[4].length&&me[9]==1?ae=ae[Aa(me[0])].apply(ae,me[3]):ae=ee.length==1&&jl(ee)?ae[fe]():ae.thru(ee)}return function(){var Le=arguments,Re=Le[0];if(ae&&Le.length==1&&kt(Re))return ae.plant(Re).value();for(var Ne=0,Ge=M?d[Ne].apply(this,Le):Re;++Ne<M;)Ge=d[Ne].call(this,Ge);return Ge}})}function ka(t,d,M,z,q,ee,ae,fe,me,Le){var Re=d&L,Ne=d&h,Ge=d&m,tt=d&(R|$),dt=d&F,Lt=Ge?e:Fs(t);function ft(){for(var Ot=arguments.length,Wt=xe(Ot),Oi=Ot;Oi--;)Wt[Oi]=arguments[Oi];if(tt)var pi=ss(ft),Ni=jn(Wt,pi);if(z&&(Wt=Dh(Wt,z,q,tt)),ee&&(Wt=Fh(Wt,ee,ae,tt)),Ot-=Ni,tt&&Ot<Le){var En=Pe(Wt,pi);return jh(t,d,ka,ft.placeholder,M,Wt,En,fe,me,Le-Ot)}var ur=Ne?M:this,Gr=Ge?ur[t]:t;return Ot=Wt.length,fe?Wt=ny(Wt,fe):dt&&Ot>1&&Wt.reverse(),Re&&me<Ot&&(Wt.length=me),this&&this!==Jt&&this instanceof ft&&(Gr=Lt||Fs(Gr)),Gr.apply(ur,Wt)}return ft}function Uh(t,d){return function(M,z){return uv(M,t,d(z),{})}}function _a(t,d){return function(M,z){var q;if(M===e&&z===e)return d;if(M!==e&&(q=M),z!==e){if(q===e)return z;typeof M=="string"||typeof z=="string"?(M=Ri(M),z=Ri(z)):(M=Mh(M),z=Mh(z)),q=t(M,z)}return q}}function Fl(t){return Ur(function(d){return d=f(d,rt(ht())),Rt(function(M){var z=this;return t(d,function(q){return Un(q,z,M)})})})}function Sa(t,d){d=d===e?" ":Ri(d);var M=d.length;if(M<2)return M?Ll(d,t):d;var z=Ll(d,ua(t/It(d)));return oe(d)?fo(xt(z),0,t).join(""):z.slice(0,t)}function Fv(t,d,M,z){var q=d&h,ee=Fs(t);function ae(){for(var fe=-1,me=arguments.length,Le=-1,Re=z.length,Ne=xe(Re+me),Ge=this&&this!==Jt&&this instanceof ae?ee:t;++Le<Re;)Ne[Le]=z[Le];for(;me--;)Ne[Le++]=arguments[++fe];return Un(Ge,q?M:this,Ne)}return ae}function Vh(t){return function(d,M,z){return z&&typeof z!="number"&&fi(d,M,z)&&(M=z=e),d=Kr(d),M===e?(M=d,d=0):M=Kr(M),z=z===e?d<M?1:-1:Kr(z),kv(d,M,z,t)}}function Ca(t){return function(d,M){return typeof d=="string"&&typeof M=="string"||(d=Ji(d),M=Ji(M)),t(d,M)}}function jh(t,d,M,z,q,ee,ae,fe,me,Le){var Re=d&R,Ne=Re?ae:e,Ge=Re?e:ae,tt=Re?ee:e,dt=Re?e:ee;d|=Re?C:v,d&=~(Re?v:C),d&y||(d&=-4);var Lt=[t,d,q,tt,Ne,dt,Ge,fe,me,Le],ft=M.apply(e,Lt);return jl(t)&&id(ft,Lt),ft.placeholder=z,rd(ft,t,d)}function Pl(t){var d=zt[t];return function(M,z){if(M=Ji(M),z=z==null?0:oi(At(z),292),z&&rh(M)){var q=(Yt(M)+"e").split("e"),ee=d(q[0]+"e"+(+q[1]+z));return q=(Yt(ee)+"e").split("e"),+(q[0]+"e"+(+q[1]-z))}return d(M)}}var Pv=ts&&1/je(new ts([,-0]))[1]==W?function(t){return new ts(t)}:sc;function Kh(t){return function(d){var M=si(d);return M==et?Me(d):M==yn?Qe(d):Ze(d,t(d))}}function zr(t,d,M,z,q,ee,ae,fe){var me=d&m;if(!me&&typeof t!="function")throw new en(w);var Le=z?z.length:0;if(Le||(d&=-97,z=q=e),ae=ae===e?ae:Bn(At(ae),0),fe=fe===e?fe:At(fe),Le-=q?q.length:0,d&v){var Re=z,Ne=q;z=q=e}var Ge=me?e:Hl(t),tt=[t,d,M,z,q,Re,Ne,ee,ae,fe];if(Ge&&Xv(tt,Ge),t=tt[0],d=tt[1],M=tt[2],z=tt[3],q=tt[4],fe=tt[9]=tt[9]===e?me?0:t.length:Bn(tt[9]-Le,0),!fe&&d&(R|$)&&(d&=-25),!d||d==h)var dt=Nv(t,d,M);else d==R||d==$?dt=Dv(t,d,fe):(d==C||d==(h|C))&&!q.length?dt=Fv(t,d,M,z):dt=ka.apply(e,tt);var Lt=Ge?Ah:id;return rd(Lt(dt,tt),t,d)}function Gh(t,d,M,z){return t===e||cr(t,Cn[M])&&!Zt.call(z,M)?d:t}function qh(t,d,M,z,q,ee){return vn(t)&&vn(d)&&(ee.set(d,t),ya(t,d,e,qh,ee),ee.delete(d)),t}function Bv(t){return Ws(t)?e:t}function Yh(t,d,M,z,q,ee){var ae=M&n,fe=t.length,me=d.length;if(fe!=me&&!(ae&&me>fe))return!1;var Le=ee.get(t),Re=ee.get(d);if(Le&&Re)return Le==d&&Re==t;var Ne=-1,Ge=!0,tt=M&s?new Lo:e;for(ee.set(t,d),ee.set(d,t);++Ne<fe;){var dt=t[Ne],Lt=d[Ne];if(z)var ft=ae?z(Lt,dt,Ne,d,t,ee):z(dt,Lt,Ne,t,d,ee);if(ft!==e){if(ft)continue;Ge=!1;break}if(tt){if(!B(d,function(Ot,Wt){if(!Et(tt,Wt)&&(dt===Ot||q(dt,Ot,M,z,ee)))return tt.push(Wt)})){Ge=!1;break}}else if(!(dt===Lt||q(dt,Lt,M,z,ee))){Ge=!1;break}}return ee.delete(t),ee.delete(d),Ge}function Wv(t,d,M,z,q,ee,ae){switch(M){case Ye:if(t.byteLength!=d.byteLength||t.byteOffset!=d.byteOffset)return!1;t=t.buffer,d=d.buffer;case We:return!(t.byteLength!=d.byteLength||!ee(new sa(t),new sa(d)));case Ce:case $e:case lt:return cr(+t,+d);case qe:return t.name==d.name&&t.message==d.message;case sn:case wn:return t==d+"";case et:var fe=Me;case yn:var me=z&n;if(fe||(fe=je),t.size!=d.size&&!me)return!1;var Le=ae.get(t);if(Le)return Le==d;z|=s,ae.set(t,d);var Re=Yh(fe(t),fe(d),z,q,ee,ae);return ae.delete(t),Re;case In:if(Es)return Es.call(t)==Es.call(d)}return!1}function Hv(t,d,M,z,q,ee){var ae=M&n,fe=Bl(t),me=fe.length,Le=Bl(d),Re=Le.length;if(me!=Re&&!ae)return!1;for(var Ne=me;Ne--;){var Ge=fe[Ne];if(!(ae?Ge in d:Zt.call(d,Ge)))return!1}var tt=ee.get(t),dt=ee.get(d);if(tt&&dt)return tt==d&&dt==t;var Lt=!0;ee.set(t,d),ee.set(d,t);for(var ft=ae;++Ne<me;){Ge=fe[Ne];var Ot=t[Ge],Wt=d[Ge];if(z)var Oi=ae?z(Wt,Ot,Ge,d,t,ee):z(Ot,Wt,Ge,t,d,ee);if(!(Oi===e?Ot===Wt||q(Ot,Wt,M,z,ee):Oi)){Lt=!1;break}ft||(ft=Ge=="constructor")}if(Lt&&!ft){var pi=t.constructor,Ni=d.constructor;pi!=Ni&&"constructor"in t&&"constructor"in d&&!(typeof pi=="function"&&pi instanceof pi&&typeof Ni=="function"&&Ni instanceof Ni)&&(Lt=!1)}return ee.delete(t),ee.delete(d),Lt}function Ur(t){return Gl(td(t,e,ud),t+"")}function Bl(t){return gh(t,Gn,Ul)}function Wl(t){return gh(t,ki,Qh)}var Hl=da?function(t){return da.get(t)}:sc;function Aa(t){for(var d=t.name+"",M=ns[d],z=Zt.call(ns,d)?M.length:0;z--;){var q=M[z],ee=q.func;if(ee==null||ee==t)return q.name}return d}function ss(t){var d=Zt.call(X,"placeholder")?X:t;return d.placeholder}function ht(){var t=X.iteratee||rc;return t=t===rc?yh:t,arguments.length?t(arguments[0],arguments[1]):t}function $a(t,d){var M=t.__data__;return Yv(d)?M[typeof d=="string"?"string":"hash"]:M.map}function zl(t){for(var d=Gn(t),M=d.length;M--;){var z=d[M],q=t[z];d[M]=[z,q,Xh(q)]}return d}function Io(t,d){var M=re(t,d);return vh(M)?M:e}function zv(t){var d=Zt.call(t,Mo),M=t[Mo];try{t[Mo]=e;var z=!0}catch{}var q=ra.call(t);return z&&(d?t[Mo]=M:delete t[Mo]),q}var Ul=ml?function(t){return t==null?[]:(t=Tt(t),ri(ml(t),function(d){return nh.call(t,d)}))}:ac,Qh=ml?function(t){for(var d=[];t;)A(d,Ul(t)),t=aa(t);return d}:ac,si=di;(vl&&si(new vl(new ArrayBuffer(1)))!=Ye||Ms&&si(new Ms)!=et||yl&&si(yl.resolve())!=Ht||ts&&si(new ts)!=yn||Ts&&si(new Ts)!=Ve)&&(si=function(t){var d=di(t),M=d==on?t.constructor:e,z=M?Oo(M):"";if(z)switch(z){case Sm:return Ye;case Cm:return et;case Am:return Ht;case $m:return yn;case Mm:return Ve}return d});function Uv(t,d,M){for(var z=-1,q=M.length;++z<q;){var ee=M[z],ae=ee.size;switch(ee.type){case"drop":t+=ae;break;case"dropRight":d-=ae;break;case"take":d=oi(d,t+ae);break;case"takeRight":t=Bn(t,d-ae);break}}return{start:t,end:d}}function Vv(t){var d=t.match(rr);return d?d[1].split(wo):[]}function Zh(t,d,M){d=ho(d,t);for(var z=-1,q=d.length,ee=!1;++z<q;){var ae=Sr(d[z]);if(!(ee=t!=null&&M(t,ae)))break;t=t[ae]}return ee||++z!=q?ee:(q=t==null?0:t.length,!!q&&Oa(q)&&Vr(ae,q)&&(kt(t)||No(t)))}function jv(t){var d=t.length,M=new t.constructor(d);return d&&typeof t[0]=="string"&&Zt.call(t,"index")&&(M.index=t.index,M.input=t.input),M}function Jh(t){return typeof t.constructor=="function"&&!Ps(t)?is(aa(t)):{}}function Kv(t,d,M){var z=t.constructor;switch(d){case We:return Dl(t);case Ce:case $e:return new z(+t);case Ye:return Tv(t,M);case ct:case wt:case bt:case $t:case Ct:case st:case gt:case hn:case Yn:return Oh(t,M);case et:return new z;case lt:case wn:return new z(t);case sn:return Lv(t);case yn:return new z;case In:return Ev(t)}}function Gv(t,d){var M=d.length;if(!M)return t;var z=M-1;return d[z]=(M>1?"& ":"")+d[z],d=d.join(M>2?", ":" "),t.replace(mr,`{
1467
- /* [wrapped with `+d+`] */
1468
- `)}function qv(t){return kt(t)||No(t)||!!(ih&&t&&t[ih])}function Vr(t,d){var M=typeof t;return d=d??V,!!d&&(M=="number"||M!="symbol"&&an.test(t))&&t>-1&&t%1==0&&t<d}function fi(t,d,M){if(!vn(M))return!1;var z=typeof d;return(z=="number"?xi(M)&&Vr(d,M.length):z=="string"&&d in M)?cr(M[d],t):!1}function Vl(t,d){if(kt(t))return!1;var M=typeof t;return M=="number"||M=="symbol"||M=="boolean"||t==null||Ii(t)?!0:nr.test(t)||!Go.test(t)||d!=null&&t in Tt(d)}function Yv(t){var d=typeof t;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?t!=="__proto__":t===null}function jl(t){var d=Aa(t),M=X[d];if(typeof M!="function"||!(d in Ft.prototype))return!1;if(t===M)return!0;var z=Hl(M);return!!z&&t===z[0]}function Qv(t){return!!Xu&&Xu in t}var Zv=$o?jr:lc;function Ps(t){var d=t&&t.constructor,M=typeof d=="function"&&d.prototype||Cn;return t===M}function Xh(t){return t===t&&!vn(t)}function ed(t,d){return function(M){return M==null?!1:M[t]===d&&(d!==e||t in Tt(M))}}function Jv(t){var d=Ra(t,function(z){return M.size===g&&M.clear(),z}),M=d.cache;return d}function Xv(t,d){var M=t[1],z=d[1],q=M|z,ee=q<(h|m|L),ae=z==L&&M==R||z==L&&M==I&&t[7].length<=d[8]||z==(L|I)&&d[7].length<=d[8]&&M==R;if(!(ee||ae))return t;z&h&&(t[2]=d[2],q|=M&h?0:y);var fe=d[3];if(fe){var me=t[3];t[3]=me?Dh(me,fe,d[4]):fe,t[4]=me?Pe(t[3],r):d[4]}return fe=d[5],fe&&(me=t[5],t[5]=me?Fh(me,fe,d[6]):fe,t[6]=me?Pe(t[5],r):d[6]),fe=d[7],fe&&(t[7]=fe),z&L&&(t[8]=t[8]==null?d[8]:oi(t[8],d[8])),t[9]==null&&(t[9]=d[9]),t[0]=d[0],t[1]=q,t}function ey(t){var d=[];if(t!=null)for(var M in Tt(t))d.push(M);return d}function ty(t){return ra.call(t)}function td(t,d,M){return d=Bn(d===e?t.length-1:d,0),function(){for(var z=arguments,q=-1,ee=Bn(z.length-d,0),ae=xe(ee);++q<ee;)ae[q]=z[d+q];q=-1;for(var fe=xe(d+1);++q<d;)fe[q]=z[q];return fe[d]=M(ae),Un(t,this,fe)}}function nd(t,d){return d.length<2?t:Ro(t,Qi(d,0,-1))}function ny(t,d){for(var M=t.length,z=oi(d.length,M),q=bi(t);z--;){var ee=d[z];t[z]=Vr(ee,M)?q[ee]:e}return t}function Kl(t,d){if(!(d==="constructor"&&typeof t[d]=="function")&&d!="__proto__")return t[d]}var id=od(Ah),Bs=vm||function(t,d){return Jt.setTimeout(t,d)},Gl=od(Cv);function rd(t,d,M){var z=d+"";return Gl(t,Gv(z,iy(Vv(z),M)))}function od(t){var d=0,M=0;return function(){var z=xm(),q=O-(z-M);if(M=z,q>0){if(++d>=P)return arguments[0]}else d=0;return t.apply(e,arguments)}}function Ma(t,d){var M=-1,z=t.length,q=z-1;for(d=d===e?z:d;++M<d;){var ee=Tl(M,q),ae=t[ee];t[ee]=t[M],t[M]=ae}return t.length=d,t}var sd=Jv(function(t){var d=[];return t.charCodeAt(0)===46&&d.push(""),t.replace($n,function(M,z,q,ee){d.push(q?ee.replace(Cs,"$1"):z||M)}),d});function Sr(t){if(typeof t=="string"||Ii(t))return t;var d=t+"";return d=="0"&&1/t==-1/0?"-0":d}function Oo(t){if(t!=null){try{return ia.call(t)}catch{}try{return t+""}catch{}}return""}function iy(t,d){return Zn(ue,function(M){var z="_."+M[0];d&M[1]&&!Li(t,z)&&t.push(z)}),t.sort()}function ad(t){if(t instanceof Ft)return t.clone();var d=new qi(t.__wrapped__,t.__chain__);return d.__actions__=bi(t.__actions__),d.__index__=t.__index__,d.__values__=t.__values__,d}function ry(t,d,M){(M?fi(t,d,M):d===e)?d=1:d=Bn(At(d),0);var z=t==null?0:t.length;if(!z||d<1)return[];for(var q=0,ee=0,ae=xe(ua(z/d));q<z;)ae[ee++]=Qi(t,q,q+=d);return ae}function oy(t){for(var d=-1,M=t==null?0:t.length,z=0,q=[];++d<M;){var ee=t[d];ee&&(q[z++]=ee)}return q}function sy(){var t=arguments.length;if(!t)return[];for(var d=xe(t-1),M=arguments[0],z=t;z--;)d[z-1]=arguments[z];return A(kt(M)?bi(M):[M],Xn(d,1))}var ay=Rt(function(t,d){return Ln(t)?Is(t,Xn(d,1,Ln,!0)):[]}),ly=Rt(function(t,d){var M=Zi(d);return Ln(M)&&(M=e),Ln(t)?Is(t,Xn(d,1,Ln,!0),ht(M,2)):[]}),cy=Rt(function(t,d){var M=Zi(d);return Ln(M)&&(M=e),Ln(t)?Is(t,Xn(d,1,Ln,!0),e,M):[]});function uy(t,d,M){var z=t==null?0:t.length;return z?(d=M||d===e?1:At(d),Qi(t,d<0?0:d,z)):[]}function hy(t,d,M){var z=t==null?0:t.length;return z?(d=M||d===e?1:At(d),d=z-d,Qi(t,0,d<0?0:d)):[]}function dy(t,d){return t&&t.length?ba(t,ht(d,3),!0,!0):[]}function fy(t,d){return t&&t.length?ba(t,ht(d,3),!0):[]}function py(t,d,M,z){var q=t==null?0:t.length;return q?(M&&typeof M!="number"&&fi(t,d,M)&&(M=0,z=q),sv(t,d,M,z)):[]}function ld(t,d,M){var z=t==null?0:t.length;if(!z)return-1;var q=M==null?0:At(M);return q<0&&(q=Bn(z+q,0)),ie(t,ht(d,3),q)}function cd(t,d,M){var z=t==null?0:t.length;if(!z)return-1;var q=z-1;return M!==e&&(q=At(M),q=M<0?Bn(z+q,0):oi(q,z-1)),ie(t,ht(d,3),q,!0)}function ud(t){var d=t==null?0:t.length;return d?Xn(t,1):[]}function gy(t){var d=t==null?0:t.length;return d?Xn(t,W):[]}function my(t,d){var M=t==null?0:t.length;return M?(d=d===e?1:At(d),Xn(t,d)):[]}function vy(t){for(var d=-1,M=t==null?0:t.length,z={};++d<M;){var q=t[d];z[q[0]]=q[1]}return z}function hd(t){return t&&t.length?t[0]:e}function yy(t,d,M){var z=t==null?0:t.length;if(!z)return-1;var q=M==null?0:At(M);return q<0&&(q=Bn(z+q,0)),se(t,d,q)}function wy(t){var d=t==null?0:t.length;return d?Qi(t,0,-1):[]}var by=Rt(function(t){var d=f(t,Ol);return d.length&&d[0]===t[0]?Sl(d):[]}),xy=Rt(function(t){var d=Zi(t),M=f(t,Ol);return d===Zi(M)?d=e:M.pop(),M.length&&M[0]===t[0]?Sl(M,ht(d,2)):[]}),ky=Rt(function(t){var d=Zi(t),M=f(t,Ol);return d=typeof d=="function"?d:e,d&&M.pop(),M.length&&M[0]===t[0]?Sl(M,e,d):[]});function _y(t,d){return t==null?"":wm.call(t,d)}function Zi(t){var d=t==null?0:t.length;return d?t[d-1]:e}function Sy(t,d,M){var z=t==null?0:t.length;if(!z)return-1;var q=z;return M!==e&&(q=At(M),q=q<0?Bn(z+q,0):oi(q,z-1)),d===d?yt(t,d,q):ie(t,ke,q,!0)}function Cy(t,d){return t&&t.length?kh(t,At(d)):e}var Ay=Rt(dd);function dd(t,d){return t&&t.length&&d&&d.length?Ml(t,d):t}function $y(t,d,M){return t&&t.length&&d&&d.length?Ml(t,d,ht(M,2)):t}function My(t,d,M){return t&&t.length&&d&&d.length?Ml(t,d,e,M):t}var Ty=Ur(function(t,d){var M=t==null?0:t.length,z=bl(t,d);return Ch(t,f(d,function(q){return Vr(q,M)?+q:q}).sort(Nh)),z});function Ly(t,d){var M=[];if(!(t&&t.length))return M;var z=-1,q=[],ee=t.length;for(d=ht(d,3);++z<ee;){var ae=t[z];d(ae,z,t)&&(M.push(ae),q.push(z))}return Ch(t,q),M}function ql(t){return t==null?t:_m.call(t)}function Ey(t,d,M){var z=t==null?0:t.length;return z?(M&&typeof M!="number"&&fi(t,d,M)?(d=0,M=z):(d=d==null?0:At(d),M=M===e?z:At(M)),Qi(t,d,M)):[]}function Ry(t,d){return wa(t,d)}function Iy(t,d,M){return El(t,d,ht(M,2))}function Oy(t,d){var M=t==null?0:t.length;if(M){var z=wa(t,d);if(z<M&&cr(t[z],d))return z}return-1}function Ny(t,d){return wa(t,d,!0)}function Dy(t,d,M){return El(t,d,ht(M,2),!0)}function Fy(t,d){var M=t==null?0:t.length;if(M){var z=wa(t,d,!0)-1;if(cr(t[z],d))return z}return-1}function Py(t){return t&&t.length?$h(t):[]}function By(t,d){return t&&t.length?$h(t,ht(d,2)):[]}function Wy(t){var d=t==null?0:t.length;return d?Qi(t,1,d):[]}function Hy(t,d,M){return t&&t.length?(d=M||d===e?1:At(d),Qi(t,0,d<0?0:d)):[]}function zy(t,d,M){var z=t==null?0:t.length;return z?(d=M||d===e?1:At(d),d=z-d,Qi(t,d<0?0:d,z)):[]}function Uy(t,d){return t&&t.length?ba(t,ht(d,3),!1,!0):[]}function Vy(t,d){return t&&t.length?ba(t,ht(d,3)):[]}var jy=Rt(function(t){return uo(Xn(t,1,Ln,!0))}),Ky=Rt(function(t){var d=Zi(t);return Ln(d)&&(d=e),uo(Xn(t,1,Ln,!0),ht(d,2))}),Gy=Rt(function(t){var d=Zi(t);return d=typeof d=="function"?d:e,uo(Xn(t,1,Ln,!0),e,d)});function qy(t){return t&&t.length?uo(t):[]}function Yy(t,d){return t&&t.length?uo(t,ht(d,2)):[]}function Qy(t,d){return d=typeof d=="function"?d:e,t&&t.length?uo(t,e,d):[]}function Yl(t){if(!(t&&t.length))return[];var d=0;return t=ri(t,function(M){if(Ln(M))return d=Bn(M.length,d),!0}),Xe(d,function(M){return f(t,we(M))})}function fd(t,d){if(!(t&&t.length))return[];var M=Yl(t);return d==null?M:f(M,function(z){return Un(d,e,z)})}var Zy=Rt(function(t,d){return Ln(t)?Is(t,d):[]}),Jy=Rt(function(t){return Il(ri(t,Ln))}),Xy=Rt(function(t){var d=Zi(t);return Ln(d)&&(d=e),Il(ri(t,Ln),ht(d,2))}),ew=Rt(function(t){var d=Zi(t);return d=typeof d=="function"?d:e,Il(ri(t,Ln),e,d)}),tw=Rt(Yl);function nw(t,d){return Eh(t||[],d||[],Rs)}function iw(t,d){return Eh(t||[],d||[],Ds)}var rw=Rt(function(t){var d=t.length,M=d>1?t[d-1]:e;return M=typeof M=="function"?(t.pop(),M):e,fd(t,M)});function pd(t){var d=X(t);return d.__chain__=!0,d}function ow(t,d){return d(t),t}function Ta(t,d){return d(t)}var sw=Ur(function(t){var d=t.length,M=d?t[0]:0,z=this.__wrapped__,q=function(ee){return bl(ee,t)};return d>1||this.__actions__.length||!(z instanceof Ft)||!Vr(M)?this.thru(q):(z=z.slice(M,+M+(d?1:0)),z.__actions__.push({func:Ta,args:[q],thisArg:e}),new qi(z,this.__chain__).thru(function(ee){return d&&!ee.length&&ee.push(e),ee}))});function aw(){return pd(this)}function lw(){return new qi(this.value(),this.__chain__)}function cw(){this.__values__===e&&(this.__values__=Md(this.value()));var t=this.__index__>=this.__values__.length,d=t?e:this.__values__[this.__index__++];return{done:t,value:d}}function uw(){return this}function hw(t){for(var d,M=this;M instanceof pa;){var z=ad(M);z.__index__=0,z.__values__=e,d?q.__wrapped__=z:d=z;var q=z;M=M.__wrapped__}return q.__wrapped__=t,d}function dw(){var t=this.__wrapped__;if(t instanceof Ft){var d=t;return this.__actions__.length&&(d=new Ft(this)),d=d.reverse(),d.__actions__.push({func:Ta,args:[ql],thisArg:e}),new qi(d,this.__chain__)}return this.thru(ql)}function fw(){return Lh(this.__wrapped__,this.__actions__)}var pw=xa(function(t,d,M){Zt.call(t,M)?++t[M]:Hr(t,M,1)});function gw(t,d,M){var z=kt(t)?Jn:ov;return M&&fi(t,d,M)&&(d=e),z(t,ht(d,3))}function mw(t,d){var M=kt(t)?ri:fh;return M(t,ht(d,3))}var vw=Hh(ld),yw=Hh(cd);function ww(t,d){return Xn(La(t,d),1)}function bw(t,d){return Xn(La(t,d),W)}function xw(t,d,M){return M=M===e?1:At(M),Xn(La(t,d),M)}function gd(t,d){var M=kt(t)?Zn:co;return M(t,ht(d,3))}function md(t,d){var M=kt(t)?Ao:dh;return M(t,ht(d,3))}var kw=xa(function(t,d,M){Zt.call(t,M)?t[M].push(d):Hr(t,M,[d])});function _w(t,d,M,z){t=xi(t)?t:ls(t),M=M&&!z?At(M):0;var q=t.length;return M<0&&(M=Bn(q+M,0)),Na(t)?M<=q&&t.indexOf(d,M)>-1:!!q&&se(t,d,M)>-1}var Sw=Rt(function(t,d,M){var z=-1,q=typeof d=="function",ee=xi(t)?xe(t.length):[];return co(t,function(ae){ee[++z]=q?Un(d,ae,M):Os(ae,d,M)}),ee}),Cw=xa(function(t,d,M){Hr(t,M,d)});function La(t,d){var M=kt(t)?f:wh;return M(t,ht(d,3))}function Aw(t,d,M,z){return t==null?[]:(kt(d)||(d=d==null?[]:[d]),M=z?e:M,kt(M)||(M=M==null?[]:[M]),_h(t,d,M))}var $w=xa(function(t,d,M){t[M?0:1].push(d)},function(){return[[],[]]});function Mw(t,d,M){var z=kt(t)?x:Ee,q=arguments.length<3;return z(t,ht(d,4),M,q,co)}function Tw(t,d,M){var z=kt(t)?D:Ee,q=arguments.length<3;return z(t,ht(d,4),M,q,dh)}function Lw(t,d){var M=kt(t)?ri:fh;return M(t,Ia(ht(d,3)))}function Ew(t){var d=kt(t)?lh:_v;return d(t)}function Rw(t,d,M){(M?fi(t,d,M):d===e)?d=1:d=At(d);var z=kt(t)?ev:Sv;return z(t,d)}function Iw(t){var d=kt(t)?tv:Av;return d(t)}function Ow(t){if(t==null)return 0;if(xi(t))return Na(t)?It(t):t.length;var d=si(t);return d==et||d==yn?t.size:Al(t).length}function Nw(t,d,M){var z=kt(t)?B:$v;return M&&fi(t,d,M)&&(d=e),z(t,ht(d,3))}var Dw=Rt(function(t,d){if(t==null)return[];var M=d.length;return M>1&&fi(t,d[0],d[1])?d=[]:M>2&&fi(d[0],d[1],d[2])&&(d=[d[0]]),_h(t,Xn(d,1),[])}),Ea=mm||function(){return Jt.Date.now()};function Fw(t,d){if(typeof d!="function")throw new en(w);return t=At(t),function(){if(--t<1)return d.apply(this,arguments)}}function vd(t,d,M){return d=M?e:d,d=t&&d==null?t.length:d,zr(t,L,e,e,e,e,d)}function yd(t,d){var M;if(typeof d!="function")throw new en(w);return t=At(t),function(){return--t>0&&(M=d.apply(this,arguments)),t<=1&&(d=e),M}}var Ql=Rt(function(t,d,M){var z=h;if(M.length){var q=Pe(M,ss(Ql));z|=C}return zr(t,z,d,M,q)}),wd=Rt(function(t,d,M){var z=h|m;if(M.length){var q=Pe(M,ss(wd));z|=C}return zr(d,z,t,M,q)});function bd(t,d,M){d=M?e:d;var z=zr(t,R,e,e,e,e,e,d);return z.placeholder=bd.placeholder,z}function xd(t,d,M){d=M?e:d;var z=zr(t,$,e,e,e,e,e,d);return z.placeholder=xd.placeholder,z}function kd(t,d,M){var z,q,ee,ae,fe,me,Le=0,Re=!1,Ne=!1,Ge=!0;if(typeof t!="function")throw new en(w);d=Ji(d)||0,vn(M)&&(Re=!!M.leading,Ne="maxWait"in M,ee=Ne?Bn(Ji(M.maxWait)||0,d):ee,Ge="trailing"in M?!!M.trailing:Ge);function tt(En){var ur=z,Gr=q;return z=q=e,Le=En,ae=t.apply(Gr,ur),ae}function dt(En){return Le=En,fe=Bs(Ot,d),Re?tt(En):ae}function Lt(En){var ur=En-me,Gr=En-Le,Hd=d-ur;return Ne?oi(Hd,ee-Gr):Hd}function ft(En){var ur=En-me,Gr=En-Le;return me===e||ur>=d||ur<0||Ne&&Gr>=ee}function Ot(){var En=Ea();if(ft(En))return Wt(En);fe=Bs(Ot,Lt(En))}function Wt(En){return fe=e,Ge&&z?tt(En):(z=q=e,ae)}function Oi(){fe!==e&&Rh(fe),Le=0,z=me=q=fe=e}function pi(){return fe===e?ae:Wt(Ea())}function Ni(){var En=Ea(),ur=ft(En);if(z=arguments,q=this,me=En,ur){if(fe===e)return dt(me);if(Ne)return Rh(fe),fe=Bs(Ot,d),tt(me)}return fe===e&&(fe=Bs(Ot,d)),ae}return Ni.cancel=Oi,Ni.flush=pi,Ni}var Pw=Rt(function(t,d){return hh(t,1,d)}),Bw=Rt(function(t,d,M){return hh(t,Ji(d)||0,M)});function Ww(t){return zr(t,F)}function Ra(t,d){if(typeof t!="function"||d!=null&&typeof d!="function")throw new en(w);var M=function(){var z=arguments,q=d?d.apply(this,z):z[0],ee=M.cache;if(ee.has(q))return ee.get(q);var ae=t.apply(this,z);return M.cache=ee.set(q,ae)||ee,ae};return M.cache=new(Ra.Cache||Wr),M}Ra.Cache=Wr;function Ia(t){if(typeof t!="function")throw new en(w);return function(){var d=arguments;switch(d.length){case 0:return!t.call(this);case 1:return!t.call(this,d[0]);case 2:return!t.call(this,d[0],d[1]);case 3:return!t.call(this,d[0],d[1],d[2])}return!t.apply(this,d)}}function Hw(t){return yd(2,t)}var zw=Mv(function(t,d){d=d.length==1&&kt(d[0])?f(d[0],rt(ht())):f(Xn(d,1),rt(ht()));var M=d.length;return Rt(function(z){for(var q=-1,ee=oi(z.length,M);++q<ee;)z[q]=d[q].call(this,z[q]);return Un(t,this,z)})}),Zl=Rt(function(t,d){var M=Pe(d,ss(Zl));return zr(t,C,e,d,M)}),_d=Rt(function(t,d){var M=Pe(d,ss(_d));return zr(t,v,e,d,M)}),Uw=Ur(function(t,d){return zr(t,I,e,e,e,d)});function Vw(t,d){if(typeof t!="function")throw new en(w);return d=d===e?d:At(d),Rt(t,d)}function jw(t,d){if(typeof t!="function")throw new en(w);return d=d==null?0:Bn(At(d),0),Rt(function(M){var z=M[d],q=fo(M,0,d);return z&&A(q,z),Un(t,this,q)})}function Kw(t,d,M){var z=!0,q=!0;if(typeof t!="function")throw new en(w);return vn(M)&&(z="leading"in M?!!M.leading:z,q="trailing"in M?!!M.trailing:q),kd(t,d,{leading:z,maxWait:d,trailing:q})}function Gw(t){return vd(t,1)}function qw(t,d){return Zl(Nl(d),t)}function Yw(){if(!arguments.length)return[];var t=arguments[0];return kt(t)?t:[t]}function Qw(t){return Yi(t,i)}function Zw(t,d){return d=typeof d=="function"?d:e,Yi(t,i,d)}function Jw(t){return Yi(t,a|i)}function Xw(t,d){return d=typeof d=="function"?d:e,Yi(t,a|i,d)}function eb(t,d){return d==null||uh(t,d,Gn(d))}function cr(t,d){return t===d||t!==t&&d!==d}var tb=Ca(_l),nb=Ca(function(t,d){return t>=d}),No=mh(function(){return arguments}())?mh:function(t){return An(t)&&Zt.call(t,"callee")&&!nh.call(t,"callee")},kt=xe.isArray,ib=wi?rt(wi):hv;function xi(t){return t!=null&&Oa(t.length)&&!jr(t)}function Ln(t){return An(t)&&xi(t)}function rb(t){return t===!0||t===!1||An(t)&&di(t)==Ce}var po=ym||lc,ob=ao?rt(ao):dv;function sb(t){return An(t)&&t.nodeType===1&&!Ws(t)}function ab(t){if(t==null)return!0;if(xi(t)&&(kt(t)||typeof t=="string"||typeof t.splice=="function"||po(t)||as(t)||No(t)))return!t.length;var d=si(t);if(d==et||d==yn)return!t.size;if(Ps(t))return!Al(t).length;for(var M in t)if(Zt.call(t,M))return!1;return!0}function lb(t,d){return Ns(t,d)}function cb(t,d,M){M=typeof M=="function"?M:e;var z=M?M(t,d):e;return z===e?Ns(t,d,e,M):!!z}function Jl(t){if(!An(t))return!1;var d=di(t);return d==qe||d==Te||typeof t.message=="string"&&typeof t.name=="string"&&!Ws(t)}function ub(t){return typeof t=="number"&&rh(t)}function jr(t){if(!vn(t))return!1;var d=di(t);return d==Ke||d==at||d==ve||d==qn}function Sd(t){return typeof t=="number"&&t==At(t)}function Oa(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=V}function vn(t){var d=typeof t;return t!=null&&(d=="object"||d=="function")}function An(t){return t!=null&&typeof t=="object"}var Cd=_n?rt(_n):pv;function hb(t,d){return t===d||Cl(t,d,zl(d))}function db(t,d,M){return M=typeof M=="function"?M:e,Cl(t,d,zl(d),M)}function fb(t){return Ad(t)&&t!=+t}function pb(t){if(Zv(t))throw new ot(b);return vh(t)}function gb(t){return t===null}function mb(t){return t==null}function Ad(t){return typeof t=="number"||An(t)&&di(t)==lt}function Ws(t){if(!An(t)||di(t)!=on)return!1;var d=aa(t);if(d===null)return!0;var M=Zt.call(d,"constructor")&&d.constructor;return typeof M=="function"&&M instanceof M&&ia.call(M)==dm}var Xl=Mi?rt(Mi):gv;function vb(t){return Sd(t)&&t>=-9007199254740991&&t<=V}var $d=Ti?rt(Ti):mv;function Na(t){return typeof t=="string"||!kt(t)&&An(t)&&di(t)==wn}function Ii(t){return typeof t=="symbol"||An(t)&&di(t)==In}var as=Ki?rt(Ki):vv;function yb(t){return t===e}function wb(t){return An(t)&&si(t)==Ve}function bb(t){return An(t)&&di(t)==_e}var xb=Ca($l),kb=Ca(function(t,d){return t<=d});function Md(t){if(!t)return[];if(xi(t))return Na(t)?xt(t):bi(t);if($s&&t[$s])return be(t[$s]());var d=si(t),M=d==et?Me:d==yn?je:ls;return M(t)}function Kr(t){if(!t)return t===0?t:0;if(t=Ji(t),t===W||t===-1/0){var d=t<0?-1:1;return d*G}return t===t?t:0}function At(t){var d=Kr(t),M=d%1;return d===d?M?d-M:d:0}function Td(t){return t?Eo(At(t),0,te):0}function Ji(t){if(typeof t=="number")return t;if(Ii(t))return Q;if(vn(t)){var d=typeof t.valueOf=="function"?t.valueOf():t;t=vn(d)?d+"":d}if(typeof t!="string")return t===0?t:+t;t=Xt(t);var M=Yo.test(t);return M||Mn.test(t)?ln(t.slice(2),M?2:8):Nt.test(t)?Q:+t}function Ld(t){return _r(t,ki(t))}function _b(t){return t?Eo(At(t),-9007199254740991,V):t===0?t:0}function Yt(t){return t==null?"":Ri(t)}var Sb=rs(function(t,d){if(Ps(d)||xi(d)){_r(d,Gn(d),t);return}for(var M in d)Zt.call(d,M)&&Rs(t,M,d[M])}),Ed=rs(function(t,d){_r(d,ki(d),t)}),Da=rs(function(t,d,M,z){_r(d,ki(d),t,z)}),Cb=rs(function(t,d,M,z){_r(d,Gn(d),t,z)}),Ab=Ur(bl);function $b(t,d){var M=is(t);return d==null?M:ch(M,d)}var Mb=Rt(function(t,d){t=Tt(t);var M=-1,z=d.length,q=z>2?d[2]:e;for(q&&fi(d[0],d[1],q)&&(z=1);++M<z;)for(var ee=d[M],ae=ki(ee),fe=-1,me=ae.length;++fe<me;){var Le=ae[fe],Re=t[Le];(Re===e||cr(Re,Cn[Le])&&!Zt.call(t,Le))&&(t[Le]=ee[Le])}return t}),Tb=Rt(function(t){return t.push(e,qh),Un(Rd,e,t)});function Lb(t,d){return J(t,ht(d,3),kr)}function Eb(t,d){return J(t,ht(d,3),kl)}function Rb(t,d){return t==null?t:xl(t,ht(d,3),ki)}function Ib(t,d){return t==null?t:ph(t,ht(d,3),ki)}function Ob(t,d){return t&&kr(t,ht(d,3))}function Nb(t,d){return t&&kl(t,ht(d,3))}function Db(t){return t==null?[]:va(t,Gn(t))}function Fb(t){return t==null?[]:va(t,ki(t))}function ec(t,d,M){var z=t==null?e:Ro(t,d);return z===e?M:z}function Pb(t,d){return t!=null&&Zh(t,d,av)}function tc(t,d){return t!=null&&Zh(t,d,lv)}var Bb=Uh(function(t,d,M){d!=null&&typeof d.toString!="function"&&(d=ra.call(d)),t[d]=M},ic(_i)),Wb=Uh(function(t,d,M){d!=null&&typeof d.toString!="function"&&(d=ra.call(d)),Zt.call(t,d)?t[d].push(M):t[d]=[M]},ht),Hb=Rt(Os);function Gn(t){return xi(t)?ah(t):Al(t)}function ki(t){return xi(t)?ah(t,!0):yv(t)}function zb(t,d){var M={};return d=ht(d,3),kr(t,function(z,q,ee){Hr(M,d(z,q,ee),z)}),M}function Ub(t,d){var M={};return d=ht(d,3),kr(t,function(z,q,ee){Hr(M,q,d(z,q,ee))}),M}var Vb=rs(function(t,d,M){ya(t,d,M)}),Rd=rs(function(t,d,M,z){ya(t,d,M,z)}),jb=Ur(function(t,d){var M={};if(t==null)return M;var z=!1;d=f(d,function(ee){return ee=ho(ee,t),z||(z=ee.length>1),ee}),_r(t,Wl(t),M),z&&(M=Yi(M,a|o|i,Bv));for(var q=d.length;q--;)Rl(M,d[q]);return M});function Kb(t,d){return Id(t,Ia(ht(d)))}var Gb=Ur(function(t,d){return t==null?{}:bv(t,d)});function Id(t,d){if(t==null)return{};var M=f(Wl(t),function(z){return[z]});return d=ht(d),Sh(t,M,function(z,q){return d(z,q[0])})}function qb(t,d,M){d=ho(d,t);var z=-1,q=d.length;for(q||(q=1,t=e);++z<q;){var ee=t==null?e:t[Sr(d[z])];ee===e&&(z=q,ee=M),t=jr(ee)?ee.call(t):ee}return t}function Yb(t,d,M){return t==null?t:Ds(t,d,M)}function Qb(t,d,M,z){return z=typeof z=="function"?z:e,t==null?t:Ds(t,d,M,z)}var Od=Kh(Gn),Nd=Kh(ki);function Zb(t,d,M){var z=kt(t),q=z||po(t)||as(t);if(d=ht(d,4),M==null){var ee=t&&t.constructor;q?M=z?new ee:[]:vn(t)?M=jr(ee)?is(aa(t)):{}:M={}}return(q?Zn:kr)(t,function(ae,fe,me){return d(M,ae,fe,me)}),M}function Jb(t,d){return t==null?!0:Rl(t,d)}function Xb(t,d,M){return t==null?t:Th(t,d,Nl(M))}function e0(t,d,M,z){return z=typeof z=="function"?z:e,t==null?t:Th(t,d,Nl(M),z)}function ls(t){return t==null?[]:dn(t,Gn(t))}function t0(t){return t==null?[]:dn(t,ki(t))}function n0(t,d,M){return M===e&&(M=d,d=e),M!==e&&(M=Ji(M),M=M===M?M:0),d!==e&&(d=Ji(d),d=d===d?d:0),Eo(Ji(t),d,M)}function i0(t,d,M){return d=Kr(d),M===e?(M=d,d=0):M=Kr(M),t=Ji(t),cv(t,d,M)}function r0(t,d,M){if(M&&typeof M!="boolean"&&fi(t,d,M)&&(d=M=e),M===e&&(typeof d=="boolean"?(M=d,d=e):typeof t=="boolean"&&(M=t,t=e)),t===e&&d===e?(t=0,d=1):(t=Kr(t),d===e?(d=t,t=0):d=Kr(d)),t>d){var z=t;t=d,d=z}if(M||t%1||d%1){var q=oh();return oi(t+q*(d-t+He("1e-"+((q+"").length-1))),d)}return Tl(t,d)}var o0=os(function(t,d,M){return d=d.toLowerCase(),t+(M?Dd(d):d)});function Dd(t){return nc(Yt(t).toLowerCase())}function Fd(t){return t=Yt(t),t&&t.replace(bn,fn).replace(Dr,"")}function s0(t,d,M){t=Yt(t),d=Ri(d);var z=t.length;M=M===e?z:Eo(At(M),0,z);var q=M;return M-=d.length,M>=0&&t.slice(M,q)==d}function a0(t){return t=Yt(t),t&&ks.test(t)?t.replace(Tr,j):t}function l0(t){return t=Yt(t),t&&ir.test(t)?t.replace(ei,"\\$&"):t}var c0=os(function(t,d,M){return t+(M?"-":"")+d.toLowerCase()}),u0=os(function(t,d,M){return t+(M?" ":"")+d.toLowerCase()}),h0=Wh("toLowerCase");function d0(t,d,M){t=Yt(t),d=At(d);var z=d?It(t):0;if(!d||z>=d)return t;var q=(d-z)/2;return Sa(ha(q),M)+t+Sa(ua(q),M)}function f0(t,d,M){t=Yt(t),d=At(d);var z=d?It(t):0;return d&&z<d?t+Sa(d-z,M):t}function p0(t,d,M){t=Yt(t),d=At(d);var z=d?It(t):0;return d&&z<d?Sa(d-z,M)+t:t}function g0(t,d,M){return M||d==null?d=0:d&&(d=+d),km(Yt(t).replace(gn,""),d||0)}function m0(t,d,M){return(M?fi(t,d,M):d===e)?d=1:d=At(d),Ll(Yt(t),d)}function v0(){var t=arguments,d=Yt(t[0]);return t.length<3?d:d.replace(t[1],t[2])}var y0=os(function(t,d,M){return t+(M?"_":"")+d.toLowerCase()});function w0(t,d,M){return M&&typeof M!="number"&&fi(t,d,M)&&(d=M=e),M=M===e?te:M>>>0,M?(t=Yt(t),t&&(typeof d=="string"||d!=null&&!Xl(d))&&(d=Ri(d),!d&&oe(t))?fo(xt(t),0,M):t.split(d,M)):[]}var b0=os(function(t,d,M){return t+(M?" ":"")+nc(d)});function x0(t,d,M){return t=Yt(t),M=M==null?0:Eo(At(M),0,t.length),d=Ri(d),t.slice(M,M+d.length)==d}function k0(t,d,M){var z=X.templateSettings;M&&fi(t,d,M)&&(d=e),t=Yt(t),d=Da({},d,z,Gh);var q=Da({},d.imports,z.imports,Gh),ee=Gn(q),ae=dn(q,ee),fe,me,Le=0,Re=d.interpolate||Wi,Ne="__p += '",Ge=hi((d.escape||Wi).source+"|"+Re.source+"|"+(Re===yo?or:Wi).source+"|"+(d.evaluate||Wi).source+"|$","g"),tt="//# sourceURL="+(Zt.call(d,"sourceURL")?(d.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xr+"]")+`
1469
- `;t.replace(Ge,function(ft,Ot,Wt,Oi,pi,Ni){return Wt||(Wt=Oi),Ne+=t.slice(Le,Ni).replace(ii,Z),Ot&&(fe=!0,Ne+=`' +
1470
- __e(`+Ot+`) +
1471
- '`),pi&&(me=!0,Ne+=`';
1472
- `+pi+`;
1473
- __p += '`),Wt&&(Ne+=`' +
1474
- ((__t = (`+Wt+`)) == null ? '' : __t) +
1475
- '`),Le=Ni+ft.length,ft}),Ne+=`';
1476
- `;var dt=Zt.call(d,"variable")&&d.variable;if(!dt)Ne=`with (obj) {
1477
- `+Ne+`
1478
- }
1479
- `;else if(Ss.test(dt))throw new ot(_);Ne=(me?Ne.replace(mi,""):Ne).replace(tr,"$1").replace(Mr,"$1;"),Ne="function("+(dt||"obj")+`) {
1480
- `+(dt?"":`obj || (obj = {});
1481
- `)+"var __t, __p = ''"+(fe?", __e = _.escape":"")+(me?`, __j = Array.prototype.join;
1482
- function print() { __p += __j.call(arguments, '') }
1483
- `:`;
1484
- `)+Ne+`return __p
1485
- }`;var Lt=Bd(function(){return _t(ee,tt+"return "+Ne).apply(e,ae)});if(Lt.source=Ne,Jl(Lt))throw Lt;return Lt}function _0(t){return Yt(t).toLowerCase()}function S0(t){return Yt(t).toUpperCase()}function C0(t,d,M){if(t=Yt(t),t&&(M||d===e))return Xt(t);if(!t||!(d=Ri(d)))return t;var z=xt(t),q=xt(d),ee=vt(z,q),ae=Sn(z,q)+1;return fo(z,ee,ae).join("")}function A0(t,d,M){if(t=Yt(t),t&&(M||d===e))return t.slice(0,Mt(t)+1);if(!t||!(d=Ri(d)))return t;var z=xt(t),q=Sn(z,xt(d))+1;return fo(z,0,q).join("")}function $0(t,d,M){if(t=Yt(t),t&&(M||d===e))return t.replace(gn,"");if(!t||!(d=Ri(d)))return t;var z=xt(t),q=vt(z,xt(d));return fo(z,q).join("")}function M0(t,d){var M=E,z=U;if(vn(d)){var q="separator"in d?d.separator:q;M="length"in d?At(d.length):M,z="omission"in d?Ri(d.omission):z}t=Yt(t);var ee=t.length;if(oe(t)){var ae=xt(t);ee=ae.length}if(M>=ee)return t;var fe=M-It(z);if(fe<1)return z;var me=ae?fo(ae,0,fe).join(""):t.slice(0,fe);if(q===e)return me+z;if(ae&&(fe+=me.length-fe),Xl(q)){if(t.slice(fe).search(q)){var Le,Re=me;for(q.global||(q=hi(q.source,Yt(Ai.exec(q))+"g")),q.lastIndex=0;Le=q.exec(Re);)var Ne=Le.index;me=me.slice(0,Ne===e?fe:Ne)}}else if(t.indexOf(Ri(q),fe)!=fe){var Ge=me.lastIndexOf(q);Ge>-1&&(me=me.slice(0,Ge))}return me+z}function T0(t){return t=Yt(t),t&&Qr.test(t)?t.replace(Qn,ut):t}var L0=os(function(t,d,M){return t+(M?" ":"")+d.toUpperCase()}),nc=Wh("toUpperCase");function Pd(t,d,M){return t=Yt(t),d=M?e:d,d===e?ge(t)?pn(t):Y(t):t.match(d)||[]}var Bd=Rt(function(t,d){try{return Un(t,e,d)}catch(M){return Jl(M)?M:new ot(M)}}),E0=Ur(function(t,d){return Zn(d,function(M){M=Sr(M),Hr(t,M,Ql(t[M],t))}),t});function R0(t){var d=t==null?0:t.length,M=ht();return t=d?f(t,function(z){if(typeof z[1]!="function")throw new en(w);return[M(z[0]),z[1]]}):[],Rt(function(z){for(var q=-1;++q<d;){var ee=t[q];if(Un(ee[0],this,z))return Un(ee[1],this,z)}})}function I0(t){return rv(Yi(t,a))}function ic(t){return function(){return t}}function O0(t,d){return t==null||t!==t?d:t}var N0=zh(),D0=zh(!0);function _i(t){return t}function rc(t){return yh(typeof t=="function"?t:Yi(t,a))}function F0(t){return bh(Yi(t,a))}function P0(t,d){return xh(t,Yi(d,a))}var B0=Rt(function(t,d){return function(M){return Os(M,t,d)}}),W0=Rt(function(t,d){return function(M){return Os(t,M,d)}});function oc(t,d,M){var z=Gn(d),q=va(d,z);M==null&&!(vn(d)&&(q.length||!z.length))&&(M=d,d=t,t=this,q=va(d,Gn(d)));var ee=!(vn(M)&&"chain"in M)||!!M.chain,ae=jr(t);return Zn(q,function(fe){var me=d[fe];t[fe]=me,ae&&(t.prototype[fe]=function(){var Le=this.__chain__;if(ee||Le){var Re=t(this.__wrapped__),Ne=Re.__actions__=bi(this.__actions__);return Ne.push({func:me,args:arguments,thisArg:t}),Re.__chain__=Le,Re}return me.apply(t,A([this.value()],arguments))})}),t}function H0(){return Jt._===this&&(Jt._=fm),this}function sc(){}function z0(t){return t=At(t),Rt(function(d){return kh(d,t)})}var U0=Fl(f),V0=Fl(Jn),j0=Fl(B);function Wd(t){return Vl(t)?we(Sr(t)):xv(t)}function K0(t){return function(d){return t==null?e:Ro(t,d)}}var G0=Vh(),q0=Vh(!0);function ac(){return[]}function lc(){return!1}function Y0(){return{}}function Q0(){return""}function Z0(){return!0}function J0(t,d){if(t=At(t),t<1||t>V)return[];var M=te,z=oi(t,te);d=ht(d),t-=te;for(var q=Xe(z,d);++M<t;)d(M);return q}function X0(t){return kt(t)?f(t,Sr):Ii(t)?[t]:bi(sd(Yt(t)))}function ex(t){var d=++hm;return Yt(t)+d}var tx=_a(function(t,d){return t+d},0),nx=Pl("ceil"),ix=_a(function(t,d){return t/d},1),rx=Pl("floor");function ox(t){return t&&t.length?ma(t,_i,_l):e}function sx(t,d){return t&&t.length?ma(t,ht(d,2),_l):e}function ax(t){return de(t,_i)}function lx(t,d){return de(t,ht(d,2))}function cx(t){return t&&t.length?ma(t,_i,$l):e}function ux(t,d){return t&&t.length?ma(t,ht(d,2),$l):e}var hx=_a(function(t,d){return t*d},1),dx=Pl("round"),fx=_a(function(t,d){return t-d},0);function px(t){return t&&t.length?nt(t,_i):0}function gx(t,d){return t&&t.length?nt(t,ht(d,2)):0}return X.after=Fw,X.ary=vd,X.assign=Sb,X.assignIn=Ed,X.assignInWith=Da,X.assignWith=Cb,X.at=Ab,X.before=yd,X.bind=Ql,X.bindAll=E0,X.bindKey=wd,X.castArray=Yw,X.chain=pd,X.chunk=ry,X.compact=oy,X.concat=sy,X.cond=R0,X.conforms=I0,X.constant=ic,X.countBy=pw,X.create=$b,X.curry=bd,X.curryRight=xd,X.debounce=kd,X.defaults=Mb,X.defaultsDeep=Tb,X.defer=Pw,X.delay=Bw,X.difference=ay,X.differenceBy=ly,X.differenceWith=cy,X.drop=uy,X.dropRight=hy,X.dropRightWhile=dy,X.dropWhile=fy,X.fill=py,X.filter=mw,X.flatMap=ww,X.flatMapDeep=bw,X.flatMapDepth=xw,X.flatten=ud,X.flattenDeep=gy,X.flattenDepth=my,X.flip=Ww,X.flow=N0,X.flowRight=D0,X.fromPairs=vy,X.functions=Db,X.functionsIn=Fb,X.groupBy=kw,X.initial=wy,X.intersection=by,X.intersectionBy=xy,X.intersectionWith=ky,X.invert=Bb,X.invertBy=Wb,X.invokeMap=Sw,X.iteratee=rc,X.keyBy=Cw,X.keys=Gn,X.keysIn=ki,X.map=La,X.mapKeys=zb,X.mapValues=Ub,X.matches=F0,X.matchesProperty=P0,X.memoize=Ra,X.merge=Vb,X.mergeWith=Rd,X.method=B0,X.methodOf=W0,X.mixin=oc,X.negate=Ia,X.nthArg=z0,X.omit=jb,X.omitBy=Kb,X.once=Hw,X.orderBy=Aw,X.over=U0,X.overArgs=zw,X.overEvery=V0,X.overSome=j0,X.partial=Zl,X.partialRight=_d,X.partition=$w,X.pick=Gb,X.pickBy=Id,X.property=Wd,X.propertyOf=K0,X.pull=Ay,X.pullAll=dd,X.pullAllBy=$y,X.pullAllWith=My,X.pullAt=Ty,X.range=G0,X.rangeRight=q0,X.rearg=Uw,X.reject=Lw,X.remove=Ly,X.rest=Vw,X.reverse=ql,X.sampleSize=Rw,X.set=Yb,X.setWith=Qb,X.shuffle=Iw,X.slice=Ey,X.sortBy=Dw,X.sortedUniq=Py,X.sortedUniqBy=By,X.split=w0,X.spread=jw,X.tail=Wy,X.take=Hy,X.takeRight=zy,X.takeRightWhile=Uy,X.takeWhile=Vy,X.tap=ow,X.throttle=Kw,X.thru=Ta,X.toArray=Md,X.toPairs=Od,X.toPairsIn=Nd,X.toPath=X0,X.toPlainObject=Ld,X.transform=Zb,X.unary=Gw,X.union=jy,X.unionBy=Ky,X.unionWith=Gy,X.uniq=qy,X.uniqBy=Yy,X.uniqWith=Qy,X.unset=Jb,X.unzip=Yl,X.unzipWith=fd,X.update=Xb,X.updateWith=e0,X.values=ls,X.valuesIn=t0,X.without=Zy,X.words=Pd,X.wrap=qw,X.xor=Jy,X.xorBy=Xy,X.xorWith=ew,X.zip=tw,X.zipObject=nw,X.zipObjectDeep=iw,X.zipWith=rw,X.entries=Od,X.entriesIn=Nd,X.extend=Ed,X.extendWith=Da,oc(X,X),X.add=tx,X.attempt=Bd,X.camelCase=o0,X.capitalize=Dd,X.ceil=nx,X.clamp=n0,X.clone=Qw,X.cloneDeep=Jw,X.cloneDeepWith=Xw,X.cloneWith=Zw,X.conformsTo=eb,X.deburr=Fd,X.defaultTo=O0,X.divide=ix,X.endsWith=s0,X.eq=cr,X.escape=a0,X.escapeRegExp=l0,X.every=gw,X.find=vw,X.findIndex=ld,X.findKey=Lb,X.findLast=yw,X.findLastIndex=cd,X.findLastKey=Eb,X.floor=rx,X.forEach=gd,X.forEachRight=md,X.forIn=Rb,X.forInRight=Ib,X.forOwn=Ob,X.forOwnRight=Nb,X.get=ec,X.gt=tb,X.gte=nb,X.has=Pb,X.hasIn=tc,X.head=hd,X.identity=_i,X.includes=_w,X.indexOf=yy,X.inRange=i0,X.invoke=Hb,X.isArguments=No,X.isArray=kt,X.isArrayBuffer=ib,X.isArrayLike=xi,X.isArrayLikeObject=Ln,X.isBoolean=rb,X.isBuffer=po,X.isDate=ob,X.isElement=sb,X.isEmpty=ab,X.isEqual=lb,X.isEqualWith=cb,X.isError=Jl,X.isFinite=ub,X.isFunction=jr,X.isInteger=Sd,X.isLength=Oa,X.isMap=Cd,X.isMatch=hb,X.isMatchWith=db,X.isNaN=fb,X.isNative=pb,X.isNil=mb,X.isNull=gb,X.isNumber=Ad,X.isObject=vn,X.isObjectLike=An,X.isPlainObject=Ws,X.isRegExp=Xl,X.isSafeInteger=vb,X.isSet=$d,X.isString=Na,X.isSymbol=Ii,X.isTypedArray=as,X.isUndefined=yb,X.isWeakMap=wb,X.isWeakSet=bb,X.join=_y,X.kebabCase=c0,X.last=Zi,X.lastIndexOf=Sy,X.lowerCase=u0,X.lowerFirst=h0,X.lt=xb,X.lte=kb,X.max=ox,X.maxBy=sx,X.mean=ax,X.meanBy=lx,X.min=cx,X.minBy=ux,X.stubArray=ac,X.stubFalse=lc,X.stubObject=Y0,X.stubString=Q0,X.stubTrue=Z0,X.multiply=hx,X.nth=Cy,X.noConflict=H0,X.noop=sc,X.now=Ea,X.pad=d0,X.padEnd=f0,X.padStart=p0,X.parseInt=g0,X.random=r0,X.reduce=Mw,X.reduceRight=Tw,X.repeat=m0,X.replace=v0,X.result=qb,X.round=dx,X.runInContext=pe,X.sample=Ew,X.size=Ow,X.snakeCase=y0,X.some=Nw,X.sortedIndex=Ry,X.sortedIndexBy=Iy,X.sortedIndexOf=Oy,X.sortedLastIndex=Ny,X.sortedLastIndexBy=Dy,X.sortedLastIndexOf=Fy,X.startCase=b0,X.startsWith=x0,X.subtract=fx,X.sum=px,X.sumBy=gx,X.template=k0,X.times=J0,X.toFinite=Kr,X.toInteger=At,X.toLength=Td,X.toLower=_0,X.toNumber=Ji,X.toSafeInteger=_b,X.toString=Yt,X.toUpper=S0,X.trim=C0,X.trimEnd=A0,X.trimStart=$0,X.truncate=M0,X.unescape=T0,X.uniqueId=ex,X.upperCase=L0,X.upperFirst=nc,X.each=gd,X.eachRight=md,X.first=hd,oc(X,function(){var t={};return kr(X,function(d,M){Zt.call(X.prototype,M)||(t[M]=d)}),t}(),{chain:!1}),X.VERSION=l,Zn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){X[t].placeholder=X}),Zn(["drop","take"],function(t,d){Ft.prototype[t]=function(M){M=M===e?1:Bn(At(M),0);var z=this.__filtered__&&!d?new Ft(this):this.clone();return z.__filtered__?z.__takeCount__=oi(M,z.__takeCount__):z.__views__.push({size:oi(M,te),type:t+(z.__dir__<0?"Right":"")}),z},Ft.prototype[t+"Right"]=function(M){return this.reverse()[t](M).reverse()}}),Zn(["filter","map","takeWhile"],function(t,d){var M=d+1,z=M==S||M==N;Ft.prototype[t]=function(q){var ee=this.clone();return ee.__iteratees__.push({iteratee:ht(q,3),type:M}),ee.__filtered__=ee.__filtered__||z,ee}}),Zn(["head","last"],function(t,d){var M="take"+(d?"Right":"");Ft.prototype[t]=function(){return this[M](1).value()[0]}}),Zn(["initial","tail"],function(t,d){var M="drop"+(d?"":"Right");Ft.prototype[t]=function(){return this.__filtered__?new Ft(this):this[M](1)}}),Ft.prototype.compact=function(){return this.filter(_i)},Ft.prototype.find=function(t){return this.filter(t).head()},Ft.prototype.findLast=function(t){return this.reverse().find(t)},Ft.prototype.invokeMap=Rt(function(t,d){return typeof t=="function"?new Ft(this):this.map(function(M){return Os(M,t,d)})}),Ft.prototype.reject=function(t){return this.filter(Ia(ht(t)))},Ft.prototype.slice=function(t,d){t=At(t);var M=this;return M.__filtered__&&(t>0||d<0)?new Ft(M):(t<0?M=M.takeRight(-t):t&&(M=M.drop(t)),d!==e&&(d=At(d),M=d<0?M.dropRight(-d):M.take(d-t)),M)},Ft.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ft.prototype.toArray=function(){return this.take(te)},kr(Ft.prototype,function(t,d){var M=/^(?:filter|find|map|reject)|While$/.test(d),z=/^(?:head|last)$/.test(d),q=X[z?"take"+(d=="last"?"Right":""):d],ee=z||/^find/.test(d);q&&(X.prototype[d]=function(){var ae=this.__wrapped__,fe=z?[1]:arguments,me=ae instanceof Ft,Le=fe[0],Re=me||kt(ae),Ne=function(Ot){var Wt=q.apply(X,A([Ot],fe));return z&&Ge?Wt[0]:Wt};Re&&M&&typeof Le=="function"&&Le.length!=1&&(me=Re=!1);var Ge=this.__chain__,tt=!!this.__actions__.length,dt=ee&&!Ge,Lt=me&&!tt;if(!ee&&Re){ae=Lt?ae:new Ft(this);var ft=t.apply(ae,fe);return ft.__actions__.push({func:Ta,args:[Ne],thisArg:e}),new qi(ft,Ge)}return dt&&Lt?t.apply(this,fe):(ft=this.thru(Ne),dt?z?ft.value()[0]:ft.value():ft)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(t){var d=Kn[t],M=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",z=/^(?:pop|shift)$/.test(t);X.prototype[t]=function(){var q=arguments;if(z&&!this.__chain__){var ee=this.value();return d.apply(kt(ee)?ee:[],q)}return this[M](function(ae){return d.apply(kt(ae)?ae:[],q)})}}),kr(Ft.prototype,function(t,d){var M=X[d];if(M){var z=M.name+"";Zt.call(ns,z)||(ns[z]=[]),ns[z].push({name:d,func:M})}}),ns[ka(e,m).name]=[{name:"wrapper",func:e}],Ft.prototype.clone=Tm,Ft.prototype.reverse=Lm,Ft.prototype.value=Em,X.prototype.at=sw,X.prototype.chain=aw,X.prototype.commit=lw,X.prototype.next=cw,X.prototype.plant=hw,X.prototype.reverse=dw,X.prototype.toJSON=X.prototype.valueOf=X.prototype.value=fw,X.prototype.first=X.prototype.head,$s&&(X.prototype[$s]=uw),X},Bt=Nn();On?((On.exports=Bt)._=Bt,cn._=Bt):Jt._=Bt}).call(S_)}(js,js.exports)),js.exports}var xg=C_();const kg=Ja(xg),A_={props:["calculatePacketText"],mixins:[bg],data:function(){return{history:[],historyPointer:-1,filterText:null,paused:!1,pausedAt:0,pauseOffset:0,pausedHistory:[],rows:1,textarea:null,displayText:"",rules:{required:c=>!!c||"Required.",min:c=>c>=1||"Minimum: 1",max:c=>parseInt(c)<=this.currentConfig.history||`Maximum: ${this.currentConfig.history}`}}},computed:{allInstantSettings:function(){return`${this.currentConfig.showLineAddress}|${this.currentConfig.showTimestamp}|${this.currentConfig.showAscii}|${this.currentConfig.newestAtTop}|${this.pauseOffset}`},allDebouncedSettings:function(){return`${this.currentConfig.bytesPerLine}|${this.currentConfig.packetsToShow}|${this.filterText}`}},watch:{latestData:function(c){c.forEach(u=>{"buffer"in u&&(u.buffer=atob(u.buffer)),this.historyPointer=++this.historyPointer%this.currentConfig.history,isNaN(this.historyPointer)&&(this.historyPointer=0),this.history[this.historyPointer]=u,this.paused||this.rebuildDisplayText()})},paused:function(c){c?(this.pausedAt=this.historyPointer,this.pausedHistory=this.history.slice()):(this.pauseOffset=0,this.rebuildDisplayText())},allInstantSettings:function(){this.rebuildDisplayText()},allDebouncedSettings:kg.debounce(function(){this.rebuildDisplayText()},300)},created:function(){const c={history:300,showTimestamp:!0,showAscii:!0,showLineAddress:!0,packetsToShow:1,bytesPerLine:16,newestAtTop:!0};this.currentConfig={...c,...this.currentConfig}},methods:{rebuildDisplayText:function(){let c=this.paused?this.pausedHistory:this.history;const u=this.paused?this.pausedAt:this.historyPointer;if(c=c.filter(T=>T).slice(u+1,this.currentConfig.history).concat(c.slice(0,u+1)).map(this.calculatePacketText).map(this.matchesSearch),this.paused){const T=Math.max(c.length+this.pauseOffset,1);c=c.slice(0,T)}const e=Math.max(this.currentConfig.packetsToShow,1);c=c.slice(-e),this.currentConfig.newestAtTop&&(c=c.reverse());let l=`
1486
- `;this.filterText!==null&&(l+=`
1487
- `),this.displayText=c.join(l),this.rows=this.displayText.split(`
1488
- `).length},matchesSearch:function(c){return this.filterText===null?c:c.split(`
1489
- `).filter(u=>u.toLowerCase().includes(this.filterText.toLowerCase())).join(`
1490
- `)},download:function(){const c=new Blob([this.displayText],{type:"text/plain"}),u=document.createElement("a");let e=URL.createObjectURL(c);u.href=e,u.setAttribute("download",`${vx.format(new Date,"yyyy_MM_dd_HH_mm_ss")}.txt`),u.click(),window.URL.revokeObjectURL(e)},pause:function(){this.paused=!0},togglePlayPause:function(){this.paused=!this.paused},stepBackward:function(){this.pause(),this.pauseOffset--},stepForward:function(){this.pause(),this.pauseOffset++}}},$_={class:"pa-2"},M_={class:"text-area-container"},T_={class:"floating-buttons"};function L_(c,u,e,l,T,b){const w=Be.resolveComponent("v-text-field"),_=Be.resolveComponent("v-col"),p=Be.resolveComponent("v-slider"),g=Be.resolveComponent("v-row"),r=Be.resolveComponent("v-textarea"),a=Be.resolveComponent("v-icon"),o=Be.resolveComponent("v-btn"),i=Be.resolveComponent("v-card-title"),n=Be.resolveComponent("v-switch"),s=Be.resolveComponent("v-radio"),h=Be.resolveComponent("v-radio-group"),m=Be.resolveComponent("v-card-text"),y=Be.resolveComponent("v-card"),R=Be.resolveComponent("v-menu");return Be.openBlock(),Be.createElementBlock("div",$_,[Be.createVNode(g,{dense:"",class:"mb-2"},{default:Be.withCtx(()=>[Be.createVNode(_,{cols:"4"},{default:Be.withCtx(()=>[Be.createVNode(w,{modelValue:c.filterText,"onUpdate:modelValue":u[0]||(u[0]=$=>c.filterText=$),label:"Search",class:"search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"history-component-search"},null,8,["modelValue"])]),_:1}),Be.createVNode(_,{cols:"8",class:"mt-1"},{default:Be.withCtx(()=>[Be.createVNode(p,{modelValue:c.pauseOffset,"onUpdate:modelValue":u[1]||(u[1]=$=>c.pauseOffset=$),onMousedown:b.pause,"onClick:prepend":b.stepBackward,"onClick:append":b.stepForward,"prepend-icon":"mdi-step-backward","append-icon":"mdi-step-forward",min:1-c.currentConfig.history,max:0,"hide-details":""},null,8,["modelValue","onMousedown","onClick:prepend","onClick:append","min"])]),_:1})]),_:1}),Be.createVNode(g,{dense:"","no-gutters":""},{default:Be.withCtx(()=>[Be.createVNode(_,null,{default:Be.withCtx(()=>[Be.createElementVNode("div",M_,[Be.createVNode(r,{"model-value":c.displayText,rows:c.rows,"no-resize":"",readonly:"",variant:"solo",flat:"","hide-details":"","data-test":"history-component-text-area"},null,8,["model-value","rows"]),Be.createElementVNode("div",T_,[Be.createVNode(R,{"close-on-content-click":!1,"min-width":700},{activator:Be.withCtx(({props:$})=>[Be.createVNode(o,Be.mergeProps({class:"ml-2",color:"secondary"},$,{icon:"",size:"small","data-test":"history-component-open-settings"}),{default:Be.withCtx(()=>[Be.createVNode(a,null,{default:Be.withCtx(()=>u[9]||(u[9]=[Be.createTextVNode("astro:settings")])),_:1})]),_:2},1040)]),default:Be.withCtx(()=>[Be.createVNode(y,null,{default:Be.withCtx(()=>[Be.createVNode(i,{"data-test":"display-settings-card"},{default:Be.withCtx(()=>u[10]||(u[10]=[Be.createTextVNode(" Display settings ")])),_:1}),Be.createVNode(m,null,{default:Be.withCtx(()=>[Be.createVNode(g,null,{default:Be.withCtx(()=>[Be.createVNode(_,null,{default:Be.withCtx(()=>[Be.createVNode(n,{modelValue:c.currentConfig.showTimestamp,"onUpdate:modelValue":u[2]||(u[2]=$=>c.currentConfig.showTimestamp=$),label:"Show timestamp",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-timestamp"},null,8,["modelValue"]),c.hasRaw?(Be.openBlock(),Be.createBlock(n,{key:0,modelValue:c.currentConfig.showAscii,"onUpdate:modelValue":u[3]||(u[3]=$=>c.currentConfig.showAscii=$),label:"Show ASCII",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-ascii"},null,8,["modelValue"])):Be.createCommentVNode("",!0),c.hasRaw?(Be.openBlock(),Be.createBlock(n,{key:1,modelValue:c.currentConfig.showLineAddress,"onUpdate:modelValue":u[4]||(u[4]=$=>c.currentConfig.showLineAddress=$),label:"Show line address",density:"compact",color:"primary","hide-details":"","data-test":"history-component-settings-show-address"},null,8,["modelValue"])):Be.createCommentVNode("",!0)]),_:1}),Be.createVNode(_,null,{default:Be.withCtx(()=>[Be.createVNode(h,{modelValue:c.currentConfig.newestAtTop,"onUpdate:modelValue":u[5]||(u[5]=$=>c.currentConfig.newestAtTop=$),label:"Print newest to the"},{default:Be.withCtx(()=>[Be.createVNode(s,{label:"Top",value:!0,"data-test":"history-component-settings-newest-top"}),Be.createVNode(s,{label:"Bottom",value:!1,"data-test":"history-component-settings-newest-bottom"})]),_:1},8,["modelValue"])]),_:1}),Be.createVNode(_,null,{default:Be.withCtx(()=>[Be.createVNode(w,{modelValue:c.currentConfig.history,"onUpdate:modelValue":u[6]||(u[6]=$=>c.currentConfig.history=$),label:"History Buffer",type:"number",min:"1","persistent-hint":"",rules:[c.rules.required,c.rules.min],"data-test":"history-component-settings-history"},null,8,["modelValue","rules"]),c.hasRaw?(Be.openBlock(),Be.createBlock(w,{key:0,modelValue:c.currentConfig.bytesPerLine,"onUpdate:modelValue":u[7]||(u[7]=$=>c.currentConfig.bytesPerLine=$),label:"Bytes per line",type:"number",min:"1",rules:[c.rules.required,c.rules.min],"data-test":"history-component-settings-num-bytes"},null,8,["modelValue","rules"])):Be.createCommentVNode("",!0),Be.createVNode(w,{modelValue:c.currentConfig.packetsToShow,"onUpdate:modelValue":u[8]||(u[8]=$=>c.currentConfig.packetsToShow=$),label:"Entries to show",type:"number",min:"1",hint:`Maximum: ${c.currentConfig.history}`,"persistent-hint":"",rules:[c.rules.required,c.rules.min,c.rules.max],"data-test":"history-component-settings-num-packets"},null,8,["modelValue","hint","rules"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),Be.createVNode(o,{class:"ml-2",onClick:b.download,color:"secondary",icon:"",size:"small","data-test":"history-component-download"},{default:Be.withCtx(()=>[Be.createVNode(a,null,{default:Be.withCtx(()=>u[11]||(u[11]=[Be.createTextVNode("mdi-file-download")])),_:1})]),_:1},8,["onClick"]),Be.createVNode(o,{class:Be.normalizeClass(["ml-2",{pulse:c.paused}]),onClick:b.togglePlayPause,color:"primary",icon:"","data-test":"history-component-play-pause"},{default:Be.withCtx(()=>[c.paused?(Be.openBlock(),Be.createBlock(a,{key:0,size:"large"},{default:Be.withCtx(()=>u[12]||(u[12]=[Be.createTextVNode("mdi-play")])),_:1})):(Be.openBlock(),Be.createBlock(a,{key:1,size:"large"},{default:Be.withCtx(()=>u[13]||(u[13]=[Be.createTextVNode("mdi-pause")])),_:1}))]),_:1},8,["class","onClick"])])])]),_:1})]),_:1})])}const E_=mx._export_sfc(A_,[["render",L_],["__scopeId","data-v-90852ac7"]]);var kc={exports:{}},xf;function R_(){return xf||(xf=1,function(c,u){(function(){ace.require(["ace/mode/text"],function(e){c&&(c.exports=e)})})()}(kc)),kc.exports}R_();const I_=!0,zn="u-",O_="uplot",N_=zn+"hz",D_=zn+"vt",F_=zn+"title",P_=zn+"wrap",B_=zn+"under",W_=zn+"over",H_=zn+"axis",Wo=zn+"off",z_=zn+"select",U_=zn+"cursor-x",V_=zn+"cursor-y",j_=zn+"cursor-pt",K_=zn+"legend",G_=zn+"live",q_=zn+"inline",Y_=zn+"series",Q_=zn+"marker",kf=zn+"label",Z_=zn+"value",Ks="width",Gs="height",zs="top",_f="bottom",us="left",_c="right",Pu="#000",Sf=Pu+"0",Sc="mousemove",Cf="mousedown",Cc="mouseup",Af="mouseenter",$f="mouseleave",Mf="dblclick",J_="resize",X_="scroll",Tf="change",Ya="dppxchange",Bu="--",ws=typeof window<"u",yu=ws?document:null,ds=ws?window:null,eS=ws?navigator:null;let qt,Wa;function wu(){let c=devicePixelRatio;qt!=c&&(qt=c,Wa&&xu(Tf,Wa,wu),Wa=matchMedia(`(min-resolution: ${qt-.001}dppx) and (max-resolution: ${qt+.001}dppx)`),Uo(Tf,Wa,wu),ds.dispatchEvent(new CustomEvent(Ya)))}function Di(c,u){if(u!=null){let e=c.classList;!e.contains(u)&&e.add(u)}}function bu(c,u){let e=c.classList;e.contains(u)&&e.remove(u)}function un(c,u,e){c.style[u]=e+"px"}function hr(c,u,e,l){let T=yu.createElement(c);return u!=null&&Di(T,u),e!=null&&e.insertBefore(T,l),T}function Xi(c,u){return hr("div",c,u)}const Lf=new WeakMap;function Ar(c,u,e,l,T){let b="translate("+u+"px,"+e+"px)",w=Lf.get(c);b!=w&&(c.style.transform=b,Lf.set(c,b),u<0||e<0||u>l||e>T?Di(c,Wo):bu(c,Wo))}const Ef=new WeakMap;function Rf(c,u,e){let l=u+e,T=Ef.get(c);l!=T&&(Ef.set(c,l),c.style.background=u,c.style.borderColor=e)}const If=new WeakMap;function Of(c,u,e,l){let T=u+""+e,b=If.get(c);T!=b&&(If.set(c,T),c.style.height=e+"px",c.style.width=u+"px",c.style.marginLeft=l?-u/2+"px":0,c.style.marginTop=l?-e/2+"px":0)}const Wu={passive:!0},tS={...Wu,capture:!0};function Uo(c,u,e,l){u.addEventListener(c,e,l?tS:Wu)}function xu(c,u,e,l){u.removeEventListener(c,e,Wu)}ws&&wu();function fr(c,u,e,l){let T;e=e||0,l=l||u.length-1;let b=l<=2147483647;for(;l-e>1;)T=b?e+l>>1:Pi((e+l)/2),u[T]<c?e=T:l=T;return c-u[e]<=u[l]-c?e:l}function _g(c){return(e,l,T)=>{let b=-1,w=-1;for(let _=l;_<=T;_++)if(c(e[_])){b=_;break}for(let _=T;_>=l;_--)if(c(e[_])){w=_;break}return[b,w]}}const Sg=c=>c!=null,Cg=c=>c!=null&&c>0,al=_g(Sg),nS=_g(Cg);function iS(c,u,e,l=0,T=!1){let b=T?nS:al,w=T?Cg:Sg;[u,e]=b(c,u,e);let _=c[u],p=c[u];if(u>-1)if(l==1)_=c[u],p=c[e];else if(l==-1)_=c[e],p=c[u];else for(let g=u;g<=e;g++){let r=c[g];w(r)&&(r<_?_=r:r>p&&(p=r))}return[_??nn,p??-nn]}function ll(c,u,e,l){let T=Ff(c),b=Ff(u);c==u&&(T==-1?(c*=e,u/=e):(c/=e,u*=e));let w=e==10?qr:Ag,_=T==1?Pi:er,p=b==1?er:Pi,g=_(w(Hn(c))),r=p(w(Hn(u))),a=fs(e,g),o=fs(e,r);return e==10&&(g<0&&(a=rn(a,-g)),r<0&&(o=rn(o,-r))),l||e==2?(c=a*T,u=o*b):(c=Lg(c,a),u=cl(u,o)),[c,u]}function Hu(c,u,e,l){let T=ll(c,u,e,l);return c==0&&(T[0]=0),u==0&&(T[1]=0),T}const zu=.1,Nf={mode:3,pad:zu},Ys={pad:0,soft:null,mode:0},rS={min:Ys,max:Ys};function Qa(c,u,e,l){return ul(e)?Df(c,u,e):(Ys.pad=e,Ys.soft=l?0:null,Ys.mode=l?3:0,Df(c,u,rS))}function Vt(c,u){return c??u}function oS(c,u,e){for(u=Vt(u,0),e=Vt(e,c.length-1);u<=e;){if(c[u]!=null)return!0;u++}return!1}function Df(c,u,e){let l=e.min,T=e.max,b=Vt(l.pad,0),w=Vt(T.pad,0),_=Vt(l.hard,-nn),p=Vt(T.hard,nn),g=Vt(l.soft,nn),r=Vt(T.soft,-nn),a=Vt(l.mode,0),o=Vt(T.mode,0),i=u-c,n=qr(i),s=gi(Hn(c),Hn(u)),h=qr(s),m=Hn(h-n);(i<1e-24||m>10)&&(i=0,(c==0||u==0)&&(i=1e-24,a==2&&g!=nn&&(b=0),o==2&&r!=-nn&&(w=0)));let y=i||s||1e3,R=qr(y),$=fs(10,Pi(R)),C=y*(i==0?c==0?.1:1:b),v=rn(Lg(c-C,$/10),24),L=c>=g&&(a==1||a==3&&v<=g||a==2&&v>=g)?g:nn,I=gi(_,v<L&&c>=L?L:pr(L,v)),F=y*(i==0?u==0?.1:1:w),E=rn(cl(u+F,$/10),24),U=u<=r&&(o==1||o==3&&E>=r||o==2&&E<=r)?r:-nn,P=pr(p,E>U&&u<=U?U:gi(U,E));return I==P&&I==0&&(P=100),[I,P]}const sS=new Intl.NumberFormat(ws?eS.language:"en-US"),Uu=c=>sS.format(c),Bi=Math,Ka=Bi.PI,Hn=Bi.abs,Pi=Bi.floor,Wn=Bi.round,er=Bi.ceil,pr=Bi.min,gi=Bi.max,fs=Bi.pow,Ff=Bi.sign,qr=Bi.log10,Ag=Bi.log2,aS=(c,u=1)=>Bi.sinh(c)*u,Ac=(c,u=1)=>Bi.asinh(c/u),nn=1/0;function Pf(c){return(qr((c^c>>31)-(c>>31))|0)+1}function ku(c,u,e){return pr(gi(c,u),e)}function $g(c){return typeof c=="function"}function Pt(c){return $g(c)?c:()=>c}const lS=()=>{},Mg=c=>c,Tg=(c,u)=>u,cS=c=>null,Bf=c=>!0,Wf=(c,u)=>c==u,uS=/\.\d*?(?=9{6,}|0{6,})/gm,jo=c=>{if(Rg(c)||vo.has(c))return c;const u=`${c}`,e=u.match(uS);if(e==null)return c;let l=e[0].length-1;if(u.indexOf("e-")!=-1){let[T,b]=u.split("e");return+`${jo(T)}e${b}`}return rn(c,l)};function Po(c,u){return jo(rn(jo(c/u))*u)}function cl(c,u){return jo(er(jo(c/u))*u)}function Lg(c,u){return jo(Pi(jo(c/u))*u)}function rn(c,u=0){if(Rg(c))return c;let e=10**u,l=c*e*(1+Number.EPSILON);return Wn(l)/e}const vo=new Map;function Eg(c){return((""+c).split(".")[1]||"").length}function Js(c,u,e,l){let T=[],b=l.map(Eg);for(let w=u;w<e;w++){let _=Hn(w),p=rn(fs(c,w),_);for(let g=0;g<l.length;g++){let r=c==10?+`${l[g]}e${w}`:l[g]*p,a=(w>=0?0:_)+(w>=b[g]?0:b[g]),o=c==10?r:rn(r,a);T.push(o),vo.set(o,a)}}return T}const Qs={},Vu=[],ps=[null,null],go=Array.isArray,Rg=Number.isInteger,hS=c=>c===void 0;function Hf(c){return typeof c=="string"}function ul(c){let u=!1;if(c!=null){let e=c.constructor;u=e==null||e==Object}return u}function dS(c){return c!=null&&typeof c=="object"}const fS=Object.getPrototypeOf(Uint8Array),Ig="__proto__";function gs(c,u=ul){let e;if(go(c)){let l=c.find(T=>T!=null);if(go(l)||u(l)){e=Array(c.length);for(let T=0;T<c.length;T++)e[T]=gs(c[T],u)}else e=c.slice()}else if(c instanceof fS)e=c.slice();else if(u(c)){e={};for(let l in c)l!=Ig&&(e[l]=gs(c[l],u))}else e=c;return e}function Dn(c){let u=arguments;for(let e=1;e<u.length;e++){let l=u[e];for(let T in l)T!=Ig&&(ul(c[T])?Dn(c[T],gs(l[T])):c[T]=gs(l[T]))}return c}const pS=0,gS=1,mS=2;function vS(c,u,e){for(let l=0,T,b=-1;l<u.length;l++){let w=u[l];if(w>b){for(T=w-1;T>=0&&c[T]==null;)c[T--]=null;for(T=w+1;T<e&&c[T]==null;)c[b=T++]=null}}}function yS(c,u){if(xS(c)){let w=c[0].slice();for(let _=1;_<c.length;_++)w.push(...c[_].slice(1));return kS(w[0])||(w=bS(w)),w}let e=new Set;for(let w=0;w<c.length;w++){let p=c[w][0],g=p.length;for(let r=0;r<g;r++)e.add(p[r])}let l=[Array.from(e).sort((w,_)=>w-_)],T=l[0].length,b=new Map;for(let w=0;w<T;w++)b.set(l[0][w],w);for(let w=0;w<c.length;w++){let _=c[w],p=_[0];for(let g=1;g<_.length;g++){let r=_[g],a=Array(T).fill(void 0),o=u?u[w][g]:gS,i=[];for(let n=0;n<r.length;n++){let s=r[n],h=b.get(p[n]);s===null?o!=pS&&(a[h]=s,o==mS&&i.push(h)):a[h]=s}vS(a,i,T),l.push(a)}}return l}const wS=typeof queueMicrotask>"u"?c=>Promise.resolve().then(c):queueMicrotask;function bS(c){let u=c[0],e=u.length,l=Array(e);for(let b=0;b<l.length;b++)l[b]=b;l.sort((b,w)=>u[b]-u[w]);let T=[];for(let b=0;b<c.length;b++){let w=c[b],_=Array(e);for(let p=0;p<e;p++)_[p]=w[l[p]];T.push(_)}return T}function xS(c){let u=c[0][0],e=u.length;for(let l=1;l<c.length;l++){let T=c[l][0];if(T.length!=e)return!1;if(T!=u){for(let b=0;b<e;b++)if(T[b]!=u[b])return!1}}return!0}function kS(c,u=100){const e=c.length;if(e<=1)return!0;let l=0,T=e-1;for(;l<=T&&c[l]==null;)l++;for(;T>=l&&c[T]==null;)T--;if(T<=l)return!0;const b=gi(1,Pi((T-l+1)/u));for(let w=c[l],_=l+b;_<=T;_+=b){const p=c[_];if(p!=null){if(p<=w)return!1;w=p}}return!0}const Og=["January","February","March","April","May","June","July","August","September","October","November","December"],Ng=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Dg(c){return c.slice(0,3)}const _S=Ng.map(Dg),SS=Og.map(Dg),CS={MMMM:Og,MMM:SS,WWWW:Ng,WWW:_S};function Us(c){return(c<10?"0":"")+c}function AS(c){return(c<10?"00":c<100?"0":"")+c}const $S={YYYY:c=>c.getFullYear(),YY:c=>(c.getFullYear()+"").slice(2),MMMM:(c,u)=>u.MMMM[c.getMonth()],MMM:(c,u)=>u.MMM[c.getMonth()],MM:c=>Us(c.getMonth()+1),M:c=>c.getMonth()+1,DD:c=>Us(c.getDate()),D:c=>c.getDate(),WWWW:(c,u)=>u.WWWW[c.getDay()],WWW:(c,u)=>u.WWW[c.getDay()],HH:c=>Us(c.getHours()),H:c=>c.getHours(),h:c=>{let u=c.getHours();return u==0?12:u>12?u-12:u},AA:c=>c.getHours()>=12?"PM":"AM",aa:c=>c.getHours()>=12?"pm":"am",a:c=>c.getHours()>=12?"p":"a",mm:c=>Us(c.getMinutes()),m:c=>c.getMinutes(),ss:c=>Us(c.getSeconds()),s:c=>c.getSeconds(),fff:c=>AS(c.getMilliseconds())};function ju(c,u){u=u||CS;let e=[],l=/\{([a-z]+)\}|[^{]+/gi,T;for(;T=l.exec(c);)e.push(T[0][0]=="{"?$S[T[1]]:T[0]);return b=>{let w="";for(let _=0;_<e.length;_++)w+=typeof e[_]=="string"?e[_]:e[_](b,u);return w}}const MS=new Intl.DateTimeFormat().resolvedOptions().timeZone;function TS(c,u){let e;return u=="UTC"||u=="Etc/UTC"?e=new Date(+c+c.getTimezoneOffset()*6e4):u==MS?e=c:(e=new Date(c.toLocaleString("en-US",{timeZone:u})),e.setMilliseconds(c.getMilliseconds())),e}const Fg=c=>c%1==0,Za=[1,2,2.5,5],LS=Js(10,-32,0,Za),Pg=Js(10,0,32,Za),ES=Pg.filter(Fg),Bo=LS.concat(Pg),Ku=`
1491
- `,Bg="{YYYY}",zf=Ku+Bg,Wg="{M}/{D}",qs=Ku+Wg,Ha=qs+"/{YY}",Hg="{aa}",RS="{h}:{mm}",hs=RS+Hg,Uf=Ku+hs,Vf=":{ss}",Qt=null;function zg(c){let u=c*1e3,e=u*60,l=e*60,T=l*24,b=T*30,w=T*365,p=(c==1?Js(10,0,3,Za).filter(Fg):Js(10,-3,0,Za)).concat([u,u*5,u*10,u*15,u*30,e,e*5,e*10,e*15,e*30,l,l*2,l*3,l*4,l*6,l*8,l*12,T,T*2,T*3,T*4,T*5,T*6,T*7,T*8,T*9,T*10,T*15,b,b*2,b*3,b*4,b*6,w,w*2,w*5,w*10,w*25,w*50,w*100]);const g=[[w,Bg,Qt,Qt,Qt,Qt,Qt,Qt,1],[T*28,"{MMM}",zf,Qt,Qt,Qt,Qt,Qt,1],[T,Wg,zf,Qt,Qt,Qt,Qt,Qt,1],[l,"{h}"+Hg,Ha,Qt,qs,Qt,Qt,Qt,1],[e,hs,Ha,Qt,qs,Qt,Qt,Qt,1],[u,Vf,Ha+" "+hs,Qt,qs+" "+hs,Qt,Uf,Qt,1],[c,Vf+".{fff}",Ha+" "+hs,Qt,qs+" "+hs,Qt,Uf,Qt,1]];function r(a){return(o,i,n,s,h,m)=>{let y=[],R=h>=w,$=h>=b&&h<w,C=a(n),v=rn(C*c,3),L=$c(C.getFullYear(),R?0:C.getMonth(),$||R?1:C.getDate()),I=rn(L*c,3);if($||R){let F=$?h/b:0,E=R?h/w:0,U=v==I?v:rn($c(L.getFullYear()+E,L.getMonth()+F,1)*c,3),P=new Date(Wn(U/c)),O=P.getFullYear(),S=P.getMonth();for(let k=0;U<=s;k++){let N=$c(O+E*k,S+F*k,1),W=N-a(rn(N*c,3));U=rn((+N+W)*c,3),U<=s&&y.push(U)}}else{let F=h>=T?T:h,E=Pi(n)-Pi(v),U=I+E+cl(v-I,F);y.push(U);let P=a(U),O=P.getHours()+P.getMinutes()/e+P.getSeconds()/l,S=h/l,k=o.axes[i]._space,N=m/k;for(;U=rn(U+h,c==1?0:3),!(U>s);)if(S>1){let W=Pi(rn(O+S,6))%24,Q=a(U).getHours()-W;Q>1&&(Q=-1),U-=Q*l,O=(O+S)%24;let te=y[y.length-1];rn((U-te)/h,3)*N>=.7&&y.push(U)}else y.push(U)}return y}}return[p,g,r]}const[IS,OS,NS]=zg(1),[DS,FS,PS]=zg(.001);Js(2,-53,53,[1]);function jf(c,u){return c.map(e=>e.map((l,T)=>T==0||T==8||l==null?l:u(T==1||e[8]==0?l:e[1]+l)))}function Kf(c,u){return(e,l,T,b,w)=>{let _=u.find(n=>w>=n[0])||u[u.length-1],p,g,r,a,o,i;return l.map(n=>{let s=c(n),h=s.getFullYear(),m=s.getMonth(),y=s.getDate(),R=s.getHours(),$=s.getMinutes(),C=s.getSeconds(),v=h!=p&&_[2]||m!=g&&_[3]||y!=r&&_[4]||R!=a&&_[5]||$!=o&&_[6]||C!=i&&_[7]||_[1];return p=h,g=m,r=y,a=R,o=$,i=C,v(s)})}}function BS(c,u){let e=ju(u);return(l,T,b,w,_)=>T.map(p=>e(c(p)))}function $c(c,u,e){return new Date(c,u,e)}function Gf(c,u){return u(c)}const WS="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function qf(c,u){return(e,l,T,b)=>b==null?Bu:u(c(l))}function HS(c,u){let e=c.series[u];return e.width?e.stroke(c,u):e.points.width?e.points.stroke(c,u):null}function zS(c,u){return c.series[u].fill(c,u)}const US={show:!0,live:!0,isolate:!1,mount:lS,markers:{show:!0,width:2,stroke:HS,fill:zS,dash:"solid"},idx:null,idxs:null,values:[]};function VS(c,u){let e=c.cursor.points,l=Xi(),T=e.size(c,u);un(l,Ks,T),un(l,Gs,T);let b=T/-2;un(l,"marginLeft",b),un(l,"marginTop",b);let w=e.width(c,u,T);return w&&un(l,"borderWidth",w),l}function jS(c,u){let e=c.series[u].points;return e._fill||e._stroke}function KS(c,u){let e=c.series[u].points;return e._stroke||e._fill}function GS(c,u){return c.series[u].points.size}const Mc=[0,0];function qS(c,u,e){return Mc[0]=u,Mc[1]=e,Mc}function za(c,u,e,l=!0){return T=>{T.button==0&&(!l||T.target==u)&&e(T)}}function Tc(c,u,e,l=!0){return T=>{(!l||T.target==u)&&e(T)}}const YS={show:!0,x:!0,y:!0,lock:!1,move:qS,points:{one:!1,show:VS,size:GS,width:0,stroke:KS,fill:jS},bind:{mousedown:za,mouseup:za,click:za,dblclick:za,mousemove:Tc,mouseleave:Tc,mouseenter:Tc},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(c,u)=>{u.stopPropagation(),u.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(c,u,e,l,T)=>l-T,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Ug={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Gu=Dn({},Ug,{filter:Tg}),Vg=Dn({},Gu,{size:10}),jg=Dn({},Ug,{show:!1}),qu='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Kg="bold "+qu,Gg=1.5,Yf={show:!0,scale:"x",stroke:Pu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Kg,side:2,grid:Gu,ticks:Vg,border:jg,font:qu,lineGap:Gg,rotate:0},QS="Value",ZS="Time",Qf={show:!0,scale:"x",auto:!1,sorted:1,min:nn,max:-nn,idxs:[]};function JS(c,u,e,l,T){return u.map(b=>b==null?"":Uu(b))}function XS(c,u,e,l,T,b,w){let _=[],p=vo.get(T)||0;e=w?e:rn(cl(e,T),p);for(let g=e;g<=l;g=rn(g+T,p))_.push(Object.is(g,-0)?0:g);return _}function _u(c,u,e,l,T,b,w){const _=[],p=c.scales[c.axes[u].scale].log,g=p==10?qr:Ag,r=Pi(g(e));T=fs(p,r),p==10&&(T=Bo[fr(T,Bo)]);let a=e,o=T*p;p==10&&(o=Bo[fr(o,Bo)]);do _.push(a),a=a+T,p==10&&!vo.has(a)&&(a=rn(a,vo.get(T))),a>=o&&(T=a,o=T*p,p==10&&(o=Bo[fr(o,Bo)]));while(a<=l);return _}function eC(c,u,e,l,T,b,w){let p=c.scales[c.axes[u].scale].asinh,g=l>p?_u(c,u,gi(p,e),l,T):[p],r=l>=0&&e<=0?[0]:[];return(e<-p?_u(c,u,gi(p,-l),-e,T):[p]).reverse().map(o=>-o).concat(r,g)}const qg=/./,tC=/[12357]/,nC=/[125]/,Zf=/1/,Su=(c,u,e,l)=>c.map((T,b)=>u==4&&T==0||b%l==0&&e.test(T.toExponential()[T<0?1:0])?T:null);function iC(c,u,e,l,T){let b=c.axes[e],w=b.scale,_=c.scales[w],p=c.valToPos,g=b._space,r=p(10,w),a=p(9,w)-r>=g?qg:p(7,w)-r>=g?tC:p(5,w)-r>=g?nC:Zf;if(a==Zf){let o=Hn(p(1,w)-r);if(o<g)return Su(u.slice().reverse(),_.distr,a,er(g/o)).reverse()}return Su(u,_.distr,a,1)}function rC(c,u,e,l,T){let b=c.axes[e],w=b.scale,_=b._space,p=c.valToPos,g=Hn(p(1,w)-p(2,w));return g<_?Su(u.slice().reverse(),3,qg,er(_/g)).reverse():u}function oC(c,u,e,l){return l==null?Bu:u==null?"":Uu(u)}const Jf={show:!0,scale:"y",stroke:Pu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Kg,side:3,grid:Gu,ticks:Vg,border:jg,font:qu,lineGap:Gg,rotate:0};function sC(c,u){let e=3+(c||1)*2;return rn(e*u,3)}function aC(c,u){let{scale:e,idxs:l}=c.series[0],T=c._data[0],b=c.valToPos(T[l[0]],e,!0),w=c.valToPos(T[l[1]],e,!0),_=Hn(w-b),p=c.series[u],g=_/(p.points.space*qt);return l[1]-l[0]<=g}const Xf={scale:null,auto:!0,sorted:0,min:nn,max:-nn},Yg=(c,u,e,l,T)=>T,ep={show:!0,auto:!0,sorted:0,gaps:Yg,alpha:1,facets:[Dn({},Xf,{scale:"x"}),Dn({},Xf,{scale:"y"})]},tp={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Yg,alpha:1,points:{show:aC,filter:null},values:null,min:nn,max:-nn,idxs:[],path:null,clip:null};function lC(c,u,e,l,T){return e/10}const Qg={time:I_,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},cC=Dn({},Qg,{time:!1,ori:1}),np={};function Zg(c,u){let e=np[c];return e||(e={key:c,plots:[],sub(l){e.plots.push(l)},unsub(l){e.plots=e.plots.filter(T=>T!=l)},pub(l,T,b,w,_,p,g){for(let r=0;r<e.plots.length;r++)e.plots[r]!=T&&e.plots[r].pub(l,T,b,w,_,p,g)}},c!=null&&(np[c]=e)),e}const ms=1,Cu=2;function Ko(c,u,e){const l=c.mode,T=c.series[u],b=l==2?c._data[u]:c._data,w=c.scales,_=c.bbox;let p=b[0],g=l==2?b[1]:b[u],r=l==2?w[T.facets[0].scale]:w[c.series[0].scale],a=l==2?w[T.facets[1].scale]:w[T.scale],o=_.left,i=_.top,n=_.width,s=_.height,h=c.valToPosH,m=c.valToPosV;return r.ori==0?e(T,p,g,r,a,h,m,o,i,n,s,dl,bs,pl,Xg,tm):e(T,p,g,r,a,m,h,i,o,s,n,fl,xs,Zu,em,nm)}function Yu(c,u){let e=0,l=0,T=Vt(c.bands,Vu);for(let b=0;b<T.length;b++){let w=T[b];w.series[0]==u?e=w.dir:w.series[1]==u&&(w.dir==1?l|=1:l|=2)}return[e,l==1?-1:l==2?1:l==3?2:0]}function uC(c,u,e,l,T){let b=c.mode,w=c.series[u],_=b==2?w.facets[1].scale:w.scale,p=c.scales[_];return T==-1?p.min:T==1?p.max:p.distr==3?p.dir==1?p.min:p.max:0}function Yr(c,u,e,l,T,b){return Ko(c,u,(w,_,p,g,r,a,o,i,n,s,h)=>{let m=w.pxRound;const y=g.dir*(g.ori==0?1:-1),R=g.ori==0?bs:xs;let $,C;y==1?($=e,C=l):($=l,C=e);let v=m(a(_[$],g,s,i)),L=m(o(p[$],r,h,n)),I=m(a(_[C],g,s,i)),F=m(o(b==1?r.max:r.min,r,h,n)),E=new Path2D(T);return R(E,I,F),R(E,v,F),R(E,v,L),E})}function hl(c,u,e,l,T,b){let w=null;if(c.length>0){w=new Path2D;const _=u==0?pl:Zu;let p=e;for(let a=0;a<c.length;a++){let o=c[a];if(o[1]>o[0]){let i=o[0]-p;i>0&&_(w,p,l,i,l+b),p=o[1]}}let g=e+T-p,r=10;g>0&&_(w,p,l-r/2,g,l+b+r)}return w}function hC(c,u,e){let l=c[c.length-1];l&&l[0]==u?l[1]=e:c.push([u,e])}function Qu(c,u,e,l,T,b,w){let _=[],p=c.length;for(let g=T==1?e:l;g>=e&&g<=l;g+=T)if(u[g]===null){let a=g,o=g;if(T==1)for(;++g<=l&&u[g]===null;)o=g;else for(;--g>=e&&u[g]===null;)o=g;let i=b(c[a]),n=o==a?i:b(c[o]),s=a-T;i=w<=0&&s>=0&&s<p?b(c[s]):i;let m=o+T;n=w>=0&&m>=0&&m<p?b(c[m]):n,n>=i&&_.push([i,n])}return _}function ip(c){return c==0?Mg:c==1?Wn:u=>Po(u,c)}function Jg(c){let u=c==0?dl:fl,e=c==0?(T,b,w,_,p,g)=>{T.arcTo(b,w,_,p,g)}:(T,b,w,_,p,g)=>{T.arcTo(w,b,p,_,g)},l=c==0?(T,b,w,_,p)=>{T.rect(b,w,_,p)}:(T,b,w,_,p)=>{T.rect(w,b,p,_)};return(T,b,w,_,p,g=0,r=0)=>{g==0&&r==0?l(T,b,w,_,p):(g=pr(g,_/2,p/2),r=pr(r,_/2,p/2),u(T,b+g,w),e(T,b+_,w,b+_,w+p,g),e(T,b+_,w+p,b,w+p,r),e(T,b,w+p,b,w,r),e(T,b,w,b+_,w,g),T.closePath())}}const dl=(c,u,e)=>{c.moveTo(u,e)},fl=(c,u,e)=>{c.moveTo(e,u)},bs=(c,u,e)=>{c.lineTo(u,e)},xs=(c,u,e)=>{c.lineTo(e,u)},pl=Jg(0),Zu=Jg(1),Xg=(c,u,e,l,T,b)=>{c.arc(u,e,l,T,b)},em=(c,u,e,l,T,b)=>{c.arc(e,u,l,T,b)},tm=(c,u,e,l,T,b,w)=>{c.bezierCurveTo(u,e,l,T,b,w)},nm=(c,u,e,l,T,b,w)=>{c.bezierCurveTo(e,u,T,l,w,b)};function im(c){return(u,e,l,T,b)=>Ko(u,e,(w,_,p,g,r,a,o,i,n,s,h)=>{let{pxRound:m,points:y}=w,R,$;g.ori==0?(R=dl,$=Xg):(R=fl,$=em);const C=rn(y.width*qt,3);let v=(y.size-y.width)/2*qt,L=rn(v*2,3),I=new Path2D,F=new Path2D,{left:E,top:U,width:P,height:O}=u.bbox;pl(F,E-L,U-L,P+L*2,O+L*2);const S=k=>{if(p[k]!=null){let N=m(a(_[k],g,s,i)),W=m(o(p[k],r,h,n));R(I,N+v,W),$(I,N,W,v,0,Ka*2)}};if(b)b.forEach(S);else for(let k=l;k<=T;k++)S(k);return{stroke:C>0?I:null,fill:I,clip:F,flags:ms|Cu}})}function rm(c){return(u,e,l,T,b,w)=>{l!=T&&(b!=l&&w!=l&&c(u,e,l),b!=T&&w!=T&&c(u,e,T),c(u,e,w))}}const dC=rm(bs),fC=rm(xs);function om(c){const u=Vt(c==null?void 0:c.alignGaps,0);return(e,l,T,b)=>Ko(e,l,(w,_,p,g,r,a,o,i,n,s,h)=>{[T,b]=al(p,T,b);let m=w.pxRound,y=O=>m(a(O,g,s,i)),R=O=>m(o(O,r,h,n)),$,C;g.ori==0?($=bs,C=dC):($=xs,C=fC);const v=g.dir*(g.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ms},I=L.stroke;let F=!1;if(b-T>=s*4){let O=ne=>e.posToVal(ne,g.key,!0),S=null,k=null,N,W,V,G=y(_[v==1?T:b]),Q=y(_[T]),te=y(_[b]),he=O(v==1?Q+1:te-1);for(let ne=v==1?T:b;ne>=T&&ne<=b;ne+=v){let ue=_[ne],ce=(v==1?ue<he:ue>he)?G:y(ue),ve=p[ne];ce==G?ve!=null?(W=ve,S==null?($(I,ce,R(W)),N=S=k=W):W<S?S=W:W>k&&(k=W)):ve===null&&(F=!0):(S!=null&&C(I,G,R(S),R(k),R(N),R(W)),ve!=null?(W=ve,$(I,ce,R(W)),S=k=N=W):(S=k=null,ve===null&&(F=!0)),G=ce,he=O(G+v))}S!=null&&S!=k&&V!=G&&C(I,G,R(S),R(k),R(N),R(W))}else for(let O=v==1?T:b;O>=T&&O<=b;O+=v){let S=p[O];S===null?F=!0:S!=null&&$(I,y(_[O]),R(S))}let[U,P]=Yu(e,l);if(w.fill!=null||U!=0){let O=L.fill=new Path2D(I),S=w.fillTo(e,l,w.min,w.max,U),k=R(S),N=y(_[T]),W=y(_[b]);v==-1&&([W,N]=[N,W]),$(O,W,k),$(O,N,k)}if(!w.spanGaps){let O=[];F&&O.push(...Qu(_,p,T,b,v,y,u)),L.gaps=O=w.gaps(e,l,T,b,O),L.clip=hl(O,g.ori,i,n,s,h)}return P!=0&&(L.band=P==2?[Yr(e,l,T,b,I,-1),Yr(e,l,T,b,I,1)]:Yr(e,l,T,b,I,P)),L})}function pC(c){const u=Vt(c.align,1),e=Vt(c.ascDesc,!1),l=Vt(c.alignGaps,0),T=Vt(c.extend,!1);return(b,w,_,p)=>Ko(b,w,(g,r,a,o,i,n,s,h,m,y,R)=>{[_,p]=al(a,_,p);let $=g.pxRound,{left:C,width:v}=b.bbox,L=Q=>$(n(Q,o,y,h)),I=Q=>$(s(Q,i,R,m)),F=o.ori==0?bs:xs;const E={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ms},U=E.stroke,P=o.dir*(o.ori==0?1:-1);let O=I(a[P==1?_:p]),S=L(r[P==1?_:p]),k=S,N=S;T&&u==-1&&(N=C,F(U,N,O)),F(U,S,O);for(let Q=P==1?_:p;Q>=_&&Q<=p;Q+=P){let te=a[Q];if(te==null)continue;let he=L(r[Q]),ne=I(te);u==1?F(U,he,O):F(U,k,ne),F(U,he,ne),O=ne,k=he}let W=k;T&&u==1&&(W=C+v,F(U,W,O));let[V,G]=Yu(b,w);if(g.fill!=null||V!=0){let Q=E.fill=new Path2D(U),te=g.fillTo(b,w,g.min,g.max,V),he=I(te);F(Q,W,he),F(Q,N,he)}if(!g.spanGaps){let Q=[];Q.push(...Qu(r,a,_,p,P,L,l));let te=g.width*qt/2,he=e||u==1?te:-te,ne=e||u==-1?-te:te;Q.forEach(ue=>{ue[0]+=he,ue[1]+=ne}),E.gaps=Q=g.gaps(b,w,_,p,Q),E.clip=hl(Q,o.ori,h,m,y,R)}return G!=0&&(E.band=G==2?[Yr(b,w,_,p,U,-1),Yr(b,w,_,p,U,1)]:Yr(b,w,_,p,U,G)),E})}function rp(c,u,e,l,T,b,w=nn){if(c.length>1){let _=null;for(let p=0,g=1/0;p<c.length;p++)if(u[p]!==void 0){if(_!=null){let r=Hn(c[p]-c[_]);r<g&&(g=r,w=Hn(e(c[p],l,T,b)-e(c[_],l,T,b)))}_=p}}return w}function gC(c){c=c||Qs;const u=Vt(c.size,[.6,nn,1]),e=c.align||0,l=c.gap||0;let T=c.radius;T=T==null?[0,0]:typeof T=="number"?[T,0]:T;const b=Pt(T),w=1-u[0],_=Vt(u[1],nn),p=Vt(u[2],1),g=Vt(c.disp,Qs),r=Vt(c.each,i=>{}),{fill:a,stroke:o}=g;return(i,n,s,h)=>Ko(i,n,(m,y,R,$,C,v,L,I,F,E,U)=>{let P=m.pxRound,O=e,S=l*qt,k=_*qt,N=p*qt,W,V;$.ori==0?[W,V]=b(i,n):[V,W]=b(i,n);const G=$.dir*($.ori==0?1:-1);let Q=$.ori==0?pl:Zu,te=$.ori==0?r:(Ve,_e,We,Ye,ct,wt,bt)=>{r(Ve,_e,We,ct,Ye,bt,wt)},he=Vt(i.bands,Vu).find(Ve=>Ve.series[0]==n),ne=he!=null?he.dir:0,ue=m.fillTo(i,n,m.min,m.max,ne),le=P(L(ue,C,U,F)),ce,ve,Ce,$e=E,Te=P(m.width*qt),qe=!1,Ke=null,at=null,et=null,lt=null;a!=null&&(Te==0||o!=null)&&(qe=!0,Ke=a.values(i,n,s,h),at=new Map,new Set(Ke).forEach(Ve=>{Ve!=null&&at.set(Ve,new Path2D)}),Te>0&&(et=o.values(i,n,s,h),lt=new Map,new Set(et).forEach(Ve=>{Ve!=null&&lt.set(Ve,new Path2D)})));let{x0:jt,size:on}=g;if(jt!=null&&on!=null){O=1,y=jt.values(i,n,s,h),jt.unit==2&&(y=y.map(We=>i.posToVal(I+We*E,$.key,!0)));let Ve=on.values(i,n,s,h);on.unit==2?ve=Ve[0]*E:ve=v(Ve[0],$,E,I)-v(0,$,E,I),$e=rp(y,R,v,$,E,I,$e),Ce=$e-ve+S}else $e=rp(y,R,v,$,E,I,$e),Ce=$e*w+S,ve=$e-Ce;Ce<1&&(Ce=0),Te>=ve/2&&(Te=0),Ce<5&&(P=Mg);let Ht=Ce>0,qn=$e-Ce-(Ht?Te:0);ve=P(ku(qn,N,k)),ce=(O==0?ve/2:O==G?0:ve)-O*G*((O==0?S/2:0)+(Ht?Te/2:0));const sn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},yn=qe?null:new Path2D;let wn=null;if(he!=null)wn=i.data[he.series[1]];else{let{y0:Ve,y1:_e}=g;Ve!=null&&_e!=null&&(R=_e.values(i,n,s,h),wn=Ve.values(i,n,s,h))}let In=W*ve,pt=V*ve;for(let Ve=G==1?s:h;Ve>=s&&Ve<=h;Ve+=G){let _e=R[Ve];if(_e==null)continue;if(wn!=null){let st=wn[Ve]??0;if(_e-st==0)continue;le=L(st,C,U,F)}let We=$.distr!=2||g!=null?y[Ve]:Ve,Ye=v(We,$,E,I),ct=L(Vt(_e,ue),C,U,F),wt=P(Ye-ce),bt=P(gi(ct,le)),$t=P(pr(ct,le)),Ct=bt-$t;if(_e!=null){let st=_e<0?pt:In,gt=_e<0?In:pt;qe?(Te>0&&et[Ve]!=null&&Q(lt.get(et[Ve]),wt,$t+Pi(Te/2),ve,gi(0,Ct-Te),st,gt),Ke[Ve]!=null&&Q(at.get(Ke[Ve]),wt,$t+Pi(Te/2),ve,gi(0,Ct-Te),st,gt)):Q(yn,wt,$t+Pi(Te/2),ve,gi(0,Ct-Te),st,gt),te(i,n,Ve,wt-Te/2,$t,ve+Te,Ct)}}return Te>0?sn.stroke=qe?lt:yn:qe||(sn._fill=m.width==0?m._fill:m._stroke??m._fill,sn.width=0),sn.fill=qe?at:yn,sn})}function mC(c,u){const e=Vt(u==null?void 0:u.alignGaps,0);return(l,T,b,w)=>Ko(l,T,(_,p,g,r,a,o,i,n,s,h,m)=>{[b,w]=al(g,b,w);let y=_.pxRound,R=W=>y(o(W,r,h,n)),$=W=>y(i(W,a,m,s)),C,v,L;r.ori==0?(C=dl,L=bs,v=tm):(C=fl,L=xs,v=nm);const I=r.dir*(r.ori==0?1:-1);let F=R(p[I==1?b:w]),E=F,U=[],P=[];for(let W=I==1?b:w;W>=b&&W<=w;W+=I)if(g[W]!=null){let G=p[W],Q=R(G);U.push(E=Q),P.push($(g[W]))}const O={stroke:c(U,P,C,L,v,y),fill:null,clip:null,band:null,gaps:null,flags:ms},S=O.stroke;let[k,N]=Yu(l,T);if(_.fill!=null||k!=0){let W=O.fill=new Path2D(S),V=_.fillTo(l,T,_.min,_.max,k),G=$(V);L(W,E,G),L(W,F,G)}if(!_.spanGaps){let W=[];W.push(...Qu(p,g,b,w,I,R,e)),O.gaps=W=_.gaps(l,T,b,w,W),O.clip=hl(W,r.ori,n,s,h,m)}return N!=0&&(O.band=N==2?[Yr(l,T,b,w,S,-1),Yr(l,T,b,w,S,1)]:Yr(l,T,b,w,S,N)),O})}function vC(c){return mC(yC,c)}function yC(c,u,e,l,T,b){const w=c.length;if(w<2)return null;const _=new Path2D;if(e(_,c[0],u[0]),w==2)l(_,c[1],u[1]);else{let p=Array(w),g=Array(w-1),r=Array(w-1),a=Array(w-1);for(let o=0;o<w-1;o++)r[o]=u[o+1]-u[o],a[o]=c[o+1]-c[o],g[o]=r[o]/a[o];p[0]=g[0];for(let o=1;o<w-1;o++)g[o]===0||g[o-1]===0||g[o-1]>0!=g[o]>0?p[o]=0:(p[o]=3*(a[o-1]+a[o])/((2*a[o]+a[o-1])/g[o-1]+(a[o]+2*a[o-1])/g[o]),isFinite(p[o])||(p[o]=0));p[w-1]=g[w-2];for(let o=0;o<w-1;o++)T(_,c[o]+a[o]/3,u[o]+p[o]*a[o]/3,c[o+1]-a[o]/3,u[o+1]-p[o+1]*a[o]/3,c[o+1],u[o+1])}return _}const Au=new Set;function op(){for(let c of Au)c.syncRect(!0)}ws&&(Uo(J_,ds,op),Uo(X_,ds,op,!0),Uo(Ya,ds,()=>{li.pxRatio=qt}));const wC=om(),bC=im();function sp(c,u,e,l){return(l?[c[0],c[1]].concat(c.slice(2)):[c[0]].concat(c.slice(1))).map((b,w)=>$u(b,w,u,e))}function xC(c,u){return c.map((e,l)=>l==0?{}:Dn({},u,e))}function $u(c,u,e,l){return Dn({},u==0?e:l,c)}function sm(c,u,e){return u==null?ps:[u,e]}const kC=sm;function _C(c,u,e){return u==null?ps:Qa(u,e,zu,!0)}function am(c,u,e,l){return u==null?ps:ll(u,e,c.scales[l].log,!1)}const SC=am;function lm(c,u,e,l){return u==null?ps:Hu(u,e,c.scales[l].log,!1)}const CC=lm;function AC(c,u,e,l,T){let b=gi(Pf(c),Pf(u)),w=u-c,_=fr(T/l*w,e);do{let p=e[_],g=l*p/w;if(g>=T&&b+(p<5?vo.get(p):0)<=17)return[p,g]}while(++_<e.length);return[0,0]}function ap(c){let u,e;return c=c.replace(/(\d+)px/,(l,T)=>(u=Wn((e=+T)*qt))+"px"),[c,u,e]}function $C(c){c.show&&[c.font,c.labelFont].forEach(u=>{let e=rn(u[2]*qt,1);u[0]=u[0].replace(/[0-9.]+px/,e+"px"),u[1]=e})}function li(c,u,e){const l={mode:Vt(c.mode,1)},T=l.mode;function b(j,Z,re,oe){let ge=Z.valToPct(j);return oe+re*(Z.dir==-1?1-ge:ge)}function w(j,Z,re,oe){let ge=Z.valToPct(j);return oe+re*(Z.dir==-1?ge:1-ge)}function _(j,Z,re,oe){return Z.ori==0?b(j,Z,re,oe):w(j,Z,re,oe)}l.valToPosH=b,l.valToPosV=w;let p=!1;l.status=0;const g=l.root=Xi(O_);if(c.id!=null&&(g.id=c.id),Di(g,c.class),c.title){let j=Xi(F_,g);j.textContent=c.title}const r=hr("canvas"),a=l.ctx=r.getContext("2d"),o=Xi(P_,g);Uo("click",o,j=>{j.target===n&&(Gt!=Ui||Dt!=xr)&&xn.click(l,j)},!0);const i=l.under=Xi(B_,o);o.appendChild(r);const n=l.over=Xi(W_,o);c=gs(c);const s=+Vt(c.pxAlign,1),h=ip(s);(c.plugins||[]).forEach(j=>{j.opts&&(c=j.opts(l,c)||c)});const m=c.ms||.001,y=l.series=T==1?sp(c.series||[],Qf,tp,!1):xC(c.series||[null],ep),R=l.axes=sp(c.axes||[],Yf,Jf,!0),$=l.scales={},C=l.bands=c.bands||[];C.forEach(j=>{j.fill=Pt(j.fill||null),j.dir=Vt(j.dir,-1)});const v=T==2?y[1].facets[0].scale:y[0].scale,L={axes:Ir,series:Qo},I=(c.drawOrder||["axes","series"]).map(j=>L[j]);function F(j){const Z=j.distr==3?re=>qr(re>0?re:j.clamp(l,re,j.min,j.max,j.key)):j.distr==4?re=>Ac(re,j.asinh):j.distr==100?re=>j.fwd(re):re=>re;return re=>{let oe=Z(re),{_min:ge,_max:be}=j,Me=be-ge;return(oe-ge)/Me}}function E(j){let Z=$[j];if(Z==null){let re=(c.scales||Qs)[j]||Qs;if(re.from!=null){E(re.from);let oe=Dn({},$[re.from],re,{key:j});oe.valToPct=F(oe),$[j]=oe}else{Z=$[j]=Dn({},j==v?Qg:cC,re),Z.key=j;let oe=Z.time,ge=Z.range,be=go(ge);if((j!=v||T==2&&!oe)&&(be&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Nf:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Nf:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&ul(ge))){let Me=ge;ge=(De,Pe,je)=>Pe==null?ps:Qa(Pe,je,Me)}Z.range=Pt(ge||(oe?kC:j==v?Z.distr==3?SC:Z.distr==4?CC:sm:Z.distr==3?am:Z.distr==4?lm:_C)),Z.auto=Pt(be?!1:Z.auto),Z.clamp=Pt(Z.clamp||lC),Z._min=Z._max=null,Z.valToPct=F(Z)}}}E("x"),E("y"),T==1&&y.forEach(j=>{E(j.scale)}),R.forEach(j=>{E(j.scale)});for(let j in c.scales)E(j);const U=$[v],P=U.distr;let O,S;U.ori==0?(Di(g,N_),O=b,S=w):(Di(g,D_),O=w,S=b);const k={};for(let j in $){let Z=$[j];(Z.min!=null||Z.max!=null)&&(k[j]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const N=c.tzDate||(j=>new Date(Wn(j/m))),W=c.fmtDate||ju,V=m==1?NS(N):PS(N),G=Kf(N,jf(m==1?OS:FS,W)),Q=qf(N,Gf(WS,W)),te=[],he=l.legend=Dn({},US,c.legend),ne=l.cursor=Dn({},YS,{drag:{y:T==2}},c.cursor),ue=he.show,le=ne.show,ce=he.markers;he.idxs=te,ce.width=Pt(ce.width),ce.dash=Pt(ce.dash),ce.stroke=Pt(ce.stroke),ce.fill=Pt(ce.fill);let ve,Ce,$e,Te=[],qe=[],Ke,at=!1,et={};if(he.live){const j=y[1]?y[1].values:null;at=j!=null,Ke=at?j(l,1,0):{_:0};for(let Z in Ke)et[Z]=Bu}if(ue)if(ve=hr("table",K_,g),$e=hr("tbody",null,ve),he.mount(l,ve),at){Ce=hr("thead",null,ve,$e);let j=hr("tr",null,Ce);hr("th",null,j);for(var lt in Ke)hr("th",kf,j).textContent=lt}else Di(ve,q_),he.live&&Di(ve,G_);const jt={show:!0},on={show:!1};function Ht(j,Z){if(Z==0&&(at||!he.live||T==2))return ps;let re=[],oe=hr("tr",Y_,$e,$e.childNodes[Z]);Di(oe,j.class),j.show||Di(oe,Wo);let ge=hr("th",null,oe);if(ce.show){let De=Xi(Q_,ge);if(Z>0){let Pe=ce.width(l,Z);Pe&&(De.style.border=Pe+"px "+ce.dash(l,Z)+" "+ce.stroke(l,Z)),De.style.background=ce.fill(l,Z)}}let be=Xi(kf,ge);j.label instanceof HTMLElement?be.appendChild(j.label):be.textContent=j.label,Z>0&&(ce.show||(be.style.color=j.width>0?ce.stroke(l,Z):ce.fill(l,Z)),sn("click",ge,De=>{if(ne._lock)return;nr(De);let Pe=y.indexOf(j);if((De.ctrlKey||De.metaKey)!=he.isolate){let je=y.some((Qe,Je)=>Je>0&&Je!=Pe&&Qe.show);y.forEach((Qe,Je)=>{Je>0&&ui(Je,je?Je==Pe?jt:on:jt,!0,rt.setSeries)})}else ui(Pe,{show:!j.show},!0,rt.setSeries)},!1),ir&&sn(Af,ge,De=>{ne._lock||(nr(De),ui(y.indexOf(j),Ki,!0,rt.setSeries))},!1));for(var Me in Ke){let De=hr("td",Z_,oe);De.textContent="--",re.push(De)}return[oe,re]}const qn=new Map;function sn(j,Z,re,oe=!0){const ge=qn.get(Z)||{},be=ne.bind[j](l,Z,re,oe);be&&(Uo(j,Z,ge[j]=be),qn.set(Z,ge))}function yn(j,Z,re){const oe=qn.get(Z)||{};for(let ge in oe)(j==null||ge==j)&&(xu(ge,Z,oe[ge]),delete oe[ge]);j==null&&qn.delete(Z)}let wn=0,In=0,pt=0,Ve=0,_e=0,We=0,Ye=_e,ct=We,wt=pt,bt=Ve,$t=0,Ct=0,st=0,gt=0;l.bbox={};let hn=!1,Yn=!1,mi=!1,tr=!1,Mr=!1,Qn=!1;function Tr(j,Z,re){(re||j!=l.width||Z!=l.height)&&Qr(j,Z),ar(!1),mi=!0,Yn=!0,br()}function Qr(j,Z){l.width=wn=pt=j,l.height=In=Ve=Z,_e=We=0,yo(),Go();let re=l.bbox;$t=re.left=Po(_e*qt,.5),Ct=re.top=Po(We*qt,.5),st=re.width=Po(pt*qt,.5),gt=re.height=Po(Ve*qt,.5)}const ks=3;function Ci(){let j=!1,Z=0;for(;!j;){Z++;let re=Zo(Z),oe=As(Z);j=Z==ks||re&&oe,j||(Qr(l.width,l.height),Yn=!0)}}function _s({width:j,height:Z}){Tr(j,Z)}l.setSize=_s;function yo(){let j=!1,Z=!1,re=!1,oe=!1;R.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:Me,_size:De}=ge,Pe=Me%2,je=ge.label!=null?ge.labelSize:0,Qe=De+je;Qe>0&&(Pe?(pt-=Qe,Me==3?(_e+=Qe,oe=!0):re=!0):(Ve-=Qe,Me==0?(We+=Qe,j=!0):Z=!0))}}),or[0]=j,or[1]=re,or[2]=Z,or[3]=oe,pt-=ni[1]+ni[3],_e+=ni[3],Ve-=ni[2]+ni[0],We+=ni[0]}function Go(){let j=_e+pt,Z=We+Ve,re=_e,oe=We;function ge(be,Me){switch(be){case 1:return j+=Me,j-Me;case 2:return Z+=Me,Z-Me;case 3:return re-=Me,re+Me;case 0:return oe-=Me,oe+Me}}R.forEach((be,Me)=>{if(be.show&&be._show){let De=be.side;be._pos=ge(De,be._size),be.label!=null&&(be._lpos=ge(De,be.labelSize))}})}if(ne.dataIdx==null){let j=ne.hover,Z=j.skip=new Set(j.skip??[]);Z.add(void 0);let re=j.prox=Pt(j.prox),oe=j.bias??(j.bias=0);ne.dataIdx=(ge,be,Me,De)=>{if(be==0)return Me;let Pe=Me,je=re(ge,be,Me,De)??nn,Qe=je>=0&&je<nn,Je=U.ori==0?pt:Ve,yt=ne.left,It=u[0],xt=u[be];if(Z.has(xt[Me])){Pe=null;let Mt=null,ut=null,it;if(oe==0||oe==-1)for(it=Me;Mt==null&&it-- >0;)Z.has(xt[it])||(Mt=it);if(oe==0||oe==1)for(it=Me;ut==null&&it++<xt.length;)Z.has(xt[it])||(ut=it);if(Mt!=null||ut!=null)if(Qe){let tn=Mt==null?-1/0:O(It[Mt],U,Je,0),pn=ut==null?1/0:O(It[ut],U,Je,0),Nn=yt-tn,Bt=pn-yt;Nn<=Bt?Nn<=je&&(Pe=Mt):Bt<=je&&(Pe=ut)}else Pe=ut==null?Mt:Mt==null?ut:Me-Mt<=ut-Me?Mt:ut}else Qe&&Hn(yt-O(It[Me],U,Je,0))>je&&(Pe=null);return Pe}}const nr=j=>{ne.event=j};ne.idxs=te,ne._lock=!1;let $n=ne.points;$n.show=Pt($n.show),$n.size=Pt($n.size),$n.stroke=Pt($n.stroke),$n.width=Pt($n.width),$n.fill=Pt($n.fill);const ei=l.focus=Dn({},c.focus||{alpha:.3},ne.focus),ir=ei.prox>=0,gn=ir&&$n.one;let ti=[],mr=[],rr=[];function wo(j,Z){let re=$n.show(l,Z);if(re instanceof HTMLElement)return Di(re,j_),Di(re,j.class),Ar(re,-10,-10,pt,Ve),n.insertBefore(re,ti[Z]),re}function qo(j,Z){if(T==1||Z>0){let re=T==1&&$[j.scale].time,oe=j.value;j.value=re?Hf(oe)?qf(N,Gf(oe,W)):oe||Q:oe||oC,j.label=j.label||(re?ZS:QS)}if(gn||Z>0){j.width=j.width==null?1:j.width,j.paths=j.paths||wC||cS,j.fillTo=Pt(j.fillTo||uC),j.pxAlign=+Vt(j.pxAlign,s),j.pxRound=ip(j.pxAlign),j.stroke=Pt(j.stroke||null),j.fill=Pt(j.fill||null),j._stroke=j._fill=j._paths=j._focus=null;let re=sC(gi(1,j.width),1),oe=j.points=Dn({},{size:re,width:gi(1,re*.2),stroke:j.stroke,space:re*2,paths:bC,_stroke:null,_fill:null},j.points);oe.show=Pt(oe.show),oe.filter=Pt(oe.filter),oe.fill=Pt(oe.fill),oe.stroke=Pt(oe.stroke),oe.paths=Pt(oe.paths),oe.pxAlign=j.pxAlign}if(ue){let re=Ht(j,Z);Te.splice(Z,0,re[0]),qe.splice(Z,0,re[1]),he.values.push(null)}if(le){te.splice(Z,0,null);let re=null;gn?Z==0&&(re=wo(j,Z)):Z>0&&(re=wo(j,Z)),ti.splice(Z,0,re),mr.splice(Z,0,0),rr.splice(Z,0,0)}Ze("addSeries",Z)}function Ss(j,Z){Z=Z??y.length,j=T==1?$u(j,Z,Qf,tp):$u(j,Z,{},ep),y.splice(Z,0,j),qo(y[Z],Z)}l.addSeries=Ss;function Cs(j){if(y.splice(j,1),ue){he.values.splice(j,1),qe.splice(j,1);let Z=Te.splice(j,1)[0];yn(null,Z.firstChild),Z.remove()}le&&(te.splice(j,1),ti.splice(j,1)[0].remove(),mr.splice(j,1),rr.splice(j,1)),Ze("delSeries",j)}l.delSeries=Cs;const or=[!1,!1,!1,!1];function Ai(j,Z){if(j._show=j.show,j.show){let re=j.side%2,oe=$[j.scale];oe==null&&(j.scale=re?y[1].scale:v,oe=$[j.scale]);let ge=oe.time;j.size=Pt(j.size),j.space=Pt(j.space),j.rotate=Pt(j.rotate),go(j.incrs)&&j.incrs.forEach(Me=>{!vo.has(Me)&&vo.set(Me,Eg(Me))}),j.incrs=Pt(j.incrs||(oe.distr==2?ES:ge?m==1?IS:DS:Bo)),j.splits=Pt(j.splits||(ge&&oe.distr==1?V:oe.distr==3?_u:oe.distr==4?eC:XS)),j.stroke=Pt(j.stroke),j.grid.stroke=Pt(j.grid.stroke),j.ticks.stroke=Pt(j.ticks.stroke),j.border.stroke=Pt(j.border.stroke);let be=j.values;j.values=go(be)&&!go(be[0])?Pt(be):ge?go(be)?Kf(N,jf(be,W)):Hf(be)?BS(N,be):be||G:be||JS,j.filter=Pt(j.filter||(oe.distr>=3&&oe.log==10?iC:oe.distr==3&&oe.log==2?rC:Tg)),j.font=ap(j.font),j.labelFont=ap(j.labelFont),j._size=j.size(l,null,Z,0),j._space=j._rotate=j._incrs=j._found=j._splits=j._values=null,j._size>0&&(or[Z]=!0,j._el=Xi(H_,o))}}function Nt(j,Z,re,oe){let[ge,be,Me,De]=re,Pe=Z%2,je=0;return Pe==0&&(De||be)&&(je=Z==0&&!ge||Z==2&&!Me?Wn(Yf.size/3):0),Pe==1&&(ge||Me)&&(je=Z==1&&!be||Z==3&&!De?Wn(Jf.size/2):0),je}const Yo=l.padding=(c.padding||[Nt,Nt,Nt,Nt]).map(j=>Pt(Vt(j,Nt))),ni=l._padding=Yo.map((j,Z)=>j(l,Z,or,0));let Mn,an=null,bn=null;const Wi=T==1?y[0].idxs:null;let ii=null,Hi=!1;function Zr(j,Z){if(u=j??[],l.data=l._data=u,T==2){Mn=0;for(let re=1;re<y.length;re++)Mn+=u[re][0].length}else{u.length==0&&(l.data=l._data=u=[[]]),ii=u[0],Mn=ii.length;let re=u;if(P==2){re=u.slice();let oe=re[0]=Array(Mn);for(let ge=0;ge<Mn;ge++)oe[ge]=ge}l._data=u=re}if(ar(!0),Ze("setData"),P==2&&(mi=!0),Z!==!1){let re=U;re.auto(l,Hi)?bo():On(v,re.min,re.max),tr=tr||ne.left>=0,Qn=!0,br()}}l.setData=Zr;function bo(){Hi=!0;let j,Z;T==1&&(Mn>0?(an=Wi[0]=0,bn=Wi[1]=Mn-1,j=u[0][an],Z=u[0][bn],P==2?(j=an,Z=bn):j==Z&&(P==3?[j,Z]=ll(j,j,U.log,!1):P==4?[j,Z]=Hu(j,j,U.log,!1):U.time?Z=j+Wn(86400/m):[j,Z]=Qa(j,Z,zu,!0))):(an=Wi[0]=j=null,bn=Wi[1]=Z=null)),On(v,j,Z)}let vr,vi,Lr,Jr,yi,Xr,xo,ko,eo,Fn;function _o(j,Z,re,oe,ge,be){j??(j=Sf),re??(re=Vu),oe??(oe="butt"),ge??(ge=Sf),be??(be="round"),j!=vr&&(a.strokeStyle=vr=j),ge!=vi&&(a.fillStyle=vi=ge),Z!=Lr&&(a.lineWidth=Lr=Z),be!=yi&&(a.lineJoin=yi=be),oe!=Xr&&(a.lineCap=Xr=oe),re!=Jr&&a.setLineDash(Jr=re)}function Er(j,Z,re,oe){Z!=vi&&(a.fillStyle=vi=Z),j!=xo&&(a.font=xo=j),re!=ko&&(a.textAlign=ko=re),oe!=eo&&(a.textBaseline=eo=oe)}function to(j,Z,re,oe,ge=0){if(oe.length>0&&j.auto(l,Hi)&&(Z==null||Z.min==null)){let be=Vt(an,0),Me=Vt(bn,oe.length-1),De=re.min==null?iS(oe,be,Me,ge,j.distr==3):[re.min,re.max];j.min=pr(j.min,re.min=De[0]),j.max=gi(j.max,re.max=De[1])}}const no={min:null,max:null};function yr(){for(let oe in $){let ge=$[oe];k[oe]==null&&(ge.min==null||k[v]!=null&&ge.auto(l,Hi))&&(k[oe]=no)}for(let oe in $){let ge=$[oe];k[oe]==null&&ge.from!=null&&k[ge.from]!=null&&(k[oe]=no)}k[v]!=null&&ar(!0);let j={};for(let oe in k){let ge=k[oe];if(ge!=null){let be=j[oe]=gs($[oe],dS);if(ge.min!=null)Dn(be,ge);else if(oe!=v||T==2)if(Mn==0&&be.from==null){let Me=be.range(l,null,null,oe);be.min=Me[0],be.max=Me[1]}else be.min=nn,be.max=-nn}}if(Mn>0){y.forEach((oe,ge)=>{if(T==1){let be=oe.scale,Me=k[be];if(Me==null)return;let De=j[be];if(ge==0){let Pe=De.range(l,De.min,De.max,be);De.min=Pe[0],De.max=Pe[1],an=fr(De.min,u[0]),bn=fr(De.max,u[0]),bn-an>1&&(u[0][an]<De.min&&an++,u[0][bn]>De.max&&bn--),oe.min=ii[an],oe.max=ii[bn]}else oe.show&&oe.auto&&to(De,Me,oe,u[ge],oe.sorted);oe.idxs[0]=an,oe.idxs[1]=bn}else if(ge>0&&oe.show&&oe.auto){let[be,Me]=oe.facets,De=be.scale,Pe=Me.scale,[je,Qe]=u[ge],Je=j[De],yt=j[Pe];Je!=null&&to(Je,k[De],be,je,be.sorted),yt!=null&&to(yt,k[Pe],Me,Qe,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in j){let ge=j[oe],be=k[oe];if(ge.from==null&&(be==null||be.min==null)){let Me=ge.range(l,ge.min==nn?null:ge.min,ge.max==-nn?null:ge.max,oe);ge.min=Me[0],ge.max=Me[1]}}}for(let oe in j){let ge=j[oe];if(ge.from!=null){let be=j[ge.from];if(be.min==null)ge.min=ge.max=null;else{let Me=ge.range(l,be.min,be.max,oe);ge.min=Me[0],ge.max=Me[1]}}}let Z={},re=!1;for(let oe in j){let ge=j[oe],be=$[oe];if(be.min!=ge.min||be.max!=ge.max){be.min=ge.min,be.max=ge.max;let Me=be.distr;be._min=Me==3?qr(be.min):Me==4?Ac(be.min,be.asinh):Me==100?be.fwd(be.min):be.min,be._max=Me==3?qr(be.max):Me==4?Ac(be.max,be.asinh):Me==100?be.fwd(be.max):be.max,Z[oe]=re=!0}}if(re){y.forEach((oe,ge)=>{T==2?ge>0&&Z.y&&(oe._paths=null):Z[oe.scale]&&(oe._paths=null)});for(let oe in Z)mi=!0,Ze("setScale",oe);le&&ne.left>=0&&(tr=Qn=!0)}for(let oe in k)k[oe]=null}function So(j){let Z=ku(an-1,0,Mn-1),re=ku(bn+1,0,Mn-1);for(;j[Z]==null&&Z>0;)Z--;for(;j[re]==null&&re<Mn-1;)re++;return[Z,re]}function Qo(){if(Mn>0){let j=y.some(Z=>Z._focus)&&Fn!=ei.alpha;j&&(a.globalAlpha=Fn=ei.alpha),y.forEach((Z,re)=>{if(re>0&&Z.show&&(io(re,!1),io(re,!0),Z._paths==null)){let oe=Fn;Fn!=Z.alpha&&(a.globalAlpha=Fn=Z.alpha);let ge=T==2?[0,u[re][0].length-1]:So(u[re]);Z._paths=Z.paths(l,re,ge[0],ge[1]),Fn!=oe&&(a.globalAlpha=Fn=oe)}}),y.forEach((Z,re)=>{if(re>0&&Z.show){let oe=Fn;Fn!=Z.alpha&&(a.globalAlpha=Fn=Z.alpha),Z._paths!=null&&ro(re,!1);{let ge=Z._paths!=null?Z._paths.gaps:null,be=Z.points.show(l,re,an,bn,ge),Me=Z.points.filter(l,re,be,ge);(be||Me)&&(Z.points._paths=Z.points.paths(l,re,an,bn,Me),ro(re,!0))}Fn!=oe&&(a.globalAlpha=Fn=oe),Ze("drawSeries",re)}}),j&&(a.globalAlpha=Fn=1)}}function io(j,Z){let re=Z?y[j].points:y[j];re._stroke=re.stroke(l,j),re._fill=re.fill(l,j)}function ro(j,Z){let re=Z?y[j].points:y[j],{stroke:oe,fill:ge,clip:be,flags:Me,_stroke:De=re._stroke,_fill:Pe=re._fill,_width:je=re.width}=re._paths;je=rn(je*qt,3);let Qe=null,Je=je%2/2;Z&&Pe==null&&(Pe=je>0?"#fff":De);let yt=re.pxAlign==1&&Je>0;if(yt&&a.translate(Je,Je),!Z){let It=$t-je/2,xt=Ct-je/2,Mt=st+je,ut=gt+je;Qe=new Path2D,Qe.rect(It,xt,Mt,ut)}Z?Rr(De,je,re.dash,re.cap,Pe,oe,ge,Me,be):Co(j,De,je,re.dash,re.cap,Pe,oe,ge,Me,Qe,be),yt&&a.translate(-Je,-Je)}function Co(j,Z,re,oe,ge,be,Me,De,Pe,je,Qe){let Je=!1;Pe!=0&&C.forEach((yt,It)=>{if(yt.series[0]==j){let xt=y[yt.series[1]],Mt=u[yt.series[1]],ut=(xt._paths||Qs).band;go(ut)&&(ut=yt.dir==1?ut[0]:ut[1]);let it,tn=null;xt.show&&ut&&oS(Mt,an,bn)?(tn=yt.fill(l,It)||be,it=xt._paths.clip):ut=null,Rr(Z,re,oe,ge,tn,Me,De,Pe,je,Qe,it,ut),Je=!0}}),Je||Rr(Z,re,oe,ge,be,Me,De,Pe,je,Qe)}const oo=ms|Cu;function Rr(j,Z,re,oe,ge,be,Me,De,Pe,je,Qe,Je){_o(j,Z,re,oe,ge),(Pe||je||Je)&&(a.save(),Pe&&a.clip(Pe),je&&a.clip(je)),Je?(De&oo)==oo?(a.clip(Je),Qe&&a.clip(Qe),Pn(ge,Me),zi(j,be,Z)):De&Cu?(Pn(ge,Me),a.clip(Je),zi(j,be,Z)):De&ms&&(a.save(),a.clip(Je),Qe&&a.clip(Qe),Pn(ge,Me),a.restore(),zi(j,be,Z)):(Pn(ge,Me),zi(j,be,Z)),(Pe||je||Je)&&a.restore()}function zi(j,Z,re){re>0&&(Z instanceof Map?Z.forEach((oe,ge)=>{a.strokeStyle=vr=ge,a.stroke(oe)}):Z!=null&&j&&a.stroke(Z))}function Pn(j,Z){Z instanceof Map?Z.forEach((re,oe)=>{a.fillStyle=vi=oe,a.fill(re)}):Z!=null&&j&&a.fill(Z)}function wr(j,Z,re,oe){let ge=R[j],be;if(oe<=0)be=[0,0];else{let Me=ge._space=ge.space(l,j,Z,re,oe),De=ge._incrs=ge.incrs(l,j,Z,re,oe,Me);be=AC(Z,re,De,oe,Me)}return ge._found=be}function sr(j,Z,re,oe,ge,be,Me,De,Pe,je){let Qe=Me%2/2;s==1&&a.translate(Qe,Qe),_o(De,Me,Pe,je,De),a.beginPath();let Je,yt,It,xt,Mt=ge+(oe==0||oe==3?-be:be);re==0?(yt=ge,xt=Mt):(Je=ge,It=Mt);for(let ut=0;ut<j.length;ut++)Z[ut]!=null&&(re==0?Je=It=j[ut]:yt=xt=j[ut],a.moveTo(Je,yt),a.lineTo(It,xt));a.stroke(),s==1&&a.translate(-Qe,-Qe)}function Zo(j){let Z=!0;return R.forEach((re,oe)=>{if(!re.show)return;let ge=$[re.scale];if(ge.min==null){re._show&&(Z=!1,re._show=!1,ar(!1));return}else re._show||(Z=!1,re._show=!0,ar(!1));let be=re.side,Me=be%2,{min:De,max:Pe}=ge,[je,Qe]=wr(oe,De,Pe,Me==0?pt:Ve);if(Qe==0)return;let Je=ge.distr==2,yt=re._splits=re.splits(l,oe,De,Pe,je,Qe,Je),It=ge.distr==2?yt.map(it=>ii[it]):yt,xt=ge.distr==2?ii[yt[1]]-ii[yt[0]]:je,Mt=re._values=re.values(l,re.filter(l,It,oe,Qe,xt),oe,Qe,xt);re._rotate=be==2?re.rotate(l,Mt,oe,Qe):0;let ut=re._size;re._size=er(re.size(l,Mt,oe,j)),ut!=null&&re._size!=ut&&(Z=!1)}),Z}function As(j){let Z=!0;return Yo.forEach((re,oe)=>{let ge=re(l,oe,or,j);ge!=ni[oe]&&(Z=!1),ni[oe]=ge}),Z}function Ir(){for(let j=0;j<R.length;j++){let Z=R[j];if(!Z.show||!Z._show)continue;let re=Z.side,oe=re%2,ge,be,Me=Z.stroke(l,j),De=re==0||re==3?-1:1,[Pe,je]=Z._found;if(Z.label!=null){let en=Z.labelGap*De,Kn=Wn((Z._lpos+en)*qt);Er(Z.labelFont[0],Me,"center",re==2?zs:_f),a.save(),oe==1?(ge=be=0,a.translate(Kn,Wn(Ct+gt/2)),a.rotate((re==3?-Ka:Ka)/2)):(ge=Wn($t+st/2),be=Kn);let Pr=$g(Z.label)?Z.label(l,j,Pe,je):Z.label;a.fillText(Pr,ge,be),a.restore()}if(je==0)continue;let Qe=$[Z.scale],Je=oe==0?st:gt,yt=oe==0?$t:Ct,It=Z._splits,xt=Qe.distr==2?It.map(en=>ii[en]):It,Mt=Qe.distr==2?ii[It[1]]-ii[It[0]]:Pe,ut=Z.ticks,it=Z.border,tn=ut.show?ut.size:0,pn=Wn(tn*qt),Nn=Wn((Z.alignTo==2?Z._size-tn-Z.gap:Z.gap)*qt),Bt=Z._rotate*-Ka/180,pe=h(Z._pos*qt),Se=(pn+Nn)*De,xe=pe+Se;be=oe==0?xe:0,ge=oe==1?xe:0;let Ue=Z.font[0],ot=Z.align==1?us:Z.align==2?_c:Bt>0?us:Bt<0?_c:oe==0?"center":re==3?_c:us,_t=Bt||oe==1?"middle":re==2?zs:_f;Er(Ue,Me,ot,_t);let zt=Z.font[1]*Z.lineGap,Tt=It.map(en=>h(_(en,Qe,Je,yt))),hi=Z._values;for(let en=0;en<hi.length;en++){let Kn=hi[en];if(Kn!=null){oe==0?ge=Tt[en]:be=Tt[en],Kn=""+Kn;let Pr=Kn.indexOf(`
1492
- `)==-1?[Kn]:Kn.split(/\n/gm);for(let Cn=0;Cn<Pr.length;Cn++){let $o=Pr[Cn];Bt?(a.save(),a.translate(ge,be+Cn*zt),a.rotate(Bt),a.fillText($o,0,0),a.restore()):a.fillText($o,ge,be+Cn*zt)}}}ut.show&&sr(Tt,ut.filter(l,xt,j,je,Mt),oe,re,pe,pn,rn(ut.width*qt,3),ut.stroke(l,j),ut.dash,ut.cap);let Gi=Z.grid;Gi.show&&sr(Tt,Gi.filter(l,xt,j,je,Mt),oe,oe==0?2:1,oe==0?Ct:$t,oe==0?gt:st,rn(Gi.width*qt,3),Gi.stroke(l,j),Gi.dash,Gi.cap),it.show&&sr([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?Ct:$t,oe==1?gt:st,rn(it.width*qt,3),it.stroke(l,j),it.dash,it.cap)}Ze("drawAxes")}function ar(j){y.forEach((Z,re)=>{re>0&&(Z._paths=null,j&&(T==1?(Z.min=null,Z.max=null):Z.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Or=!1,so=!1,Nr=[];function Jo(){so=!1;for(let j=0;j<Nr.length;j++)Ze(...Nr[j]);Nr.length=0}function br(){Or||(wS(Xo),Or=!0)}function Fe(j,Z=!1){Or=!0,so=Z,j(l),Xo(),Z&&Nr.length>0&&queueMicrotask(Jo)}l.batch=Fe;function Xo(){if(hn&&(yr(),hn=!1),mi&&(Ci(),mi=!1),Yn){if(un(i,us,_e),un(i,zs,We),un(i,Ks,pt),un(i,Gs,Ve),un(n,us,_e),un(n,zs,We),un(n,Ks,pt),un(n,Gs,Ve),un(o,Ks,wn),un(o,Gs,In),r.width=Wn(wn*qt),r.height=Wn(In*qt),R.forEach(({_el:j,_show:Z,_size:re,_pos:oe,side:ge})=>{if(j!=null)if(Z){let be=ge===3||ge===0?re:0,Me=ge%2==1;un(j,Me?"left":"top",oe-be),un(j,Me?"width":"height",re),un(j,Me?"top":"left",Me?We:_e),un(j,Me?"height":"width",Me?Ve:pt),bu(j,Wo)}else Di(j,Wo)}),vr=vi=Lr=yi=Xr=xo=ko=eo=Jr=null,Fn=1,B(!0),_e!=Ye||We!=ct||pt!=wt||Ve!=bt){ar(!1);let j=pt/wt,Z=Ve/bt;if(le&&!tr&&ne.left>=0){ne.left*=j,ne.top*=Z,$i&&Ar($i,Wn(ne.left),0,pt,Ve),Tn&&Ar(Tn,0,Wn(ne.top),pt,Ve);for(let re=0;re<ti.length;re++){let oe=ti[re];oe!=null&&(mr[re]*=j,rr[re]*=Z,Ar(oe,er(mr[re]),er(rr[re]),pt,Ve))}}if(mt.show&&!Mr&&mt.left>=0&&mt.width>0){mt.left*=j,mt.width*=j,mt.top*=Z,mt.height*=Z;for(let re in Y)un(ci,re,mt[re])}Ye=_e,ct=We,wt=pt,bt=Ve}Ze("setSize"),Yn=!1}wn>0&&In>0&&(a.clearRect(0,0,r.width,r.height),Ze("drawClear"),I.forEach(j=>j()),Ze("draw")),mt.show&&Mr&&(Jt(mt),Mr=!1),le&&tr&&(x(null,!0,!1),tr=!1),he.show&&he.live&&Qn&&(f(),Qn=!1),p||(p=!0,l.status=1,Ze("ready")),Hi=!1,Or=!1}l.redraw=(j,Z)=>{mi=Z||!1,j!==!1?On(v,U.min,U.max):br()};function Oe(j,Z){let re=$[j];if(re.from==null){if(Mn==0){let oe=re.range(l,Z.min,Z.max,j);Z.min=oe[0],Z.max=oe[1]}if(Z.min>Z.max){let oe=Z.min;Z.min=Z.max,Z.max=oe}if(Mn>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;j==v&&re.distr==2&&Mn>0&&(Z.min=fr(Z.min,u[0]),Z.max=fr(Z.max,u[0]),Z.min==Z.max&&Z.max++),k[j]=Z,hn=!0,br()}}l.setScale=Oe;let mn,Dr,$i,Tn,es,Fr,Ui,xr,Kt,Ut,Gt,Dt,Vi=!1;const xn=ne.drag;let He=xn.x,ln=xn.y;le&&(ne.x&&(mn=Xi(U_,n)),ne.y&&(Dr=Xi(V_,n)),U.ori==0?($i=mn,Tn=Dr):($i=Dr,Tn=mn),Gt=ne.left,Dt=ne.top);const mt=l.select=Dn({show:!0,over:!0,left:0,width:0,top:0,height:0},c.select),ci=mt.show?Xi(z_,mt.over?n:i):null;function Jt(j,Z){if(mt.show){for(let re in j)mt[re]=j[re],re in Y&&un(ci,re,j[re]);Z!==!1&&Ze("setSelect")}}l.setSelect=Jt;function cn(j){if(y[j].show)ue&&bu(Te[j],Wo);else if(ue&&Di(Te[j],Wo),le){let re=gn?ti[0]:ti[j];re!=null&&Ar(re,-10,-10,pt,Ve)}}function On(j,Z,re){Oe(j,{min:Z,max:re})}function ui(j,Z,re,oe){Z.focus!=null&&Un(j),Z.show!=null&&y.forEach((ge,be)=>{be>0&&(j==be||j==null)&&(ge.show=Z.show,cn(be),T==2?(On(ge.facets[0].scale,null,null),On(ge.facets[1].scale,null,null)):On(ge.scale,null,null),br())}),re!==!1&&Ze("setSeries",j,Z),oe&&vt("setSeries",l,j,Z)}l.setSeries=ui;function ji(j,Z){Dn(C[j],Z)}function kn(j,Z){j.fill=Pt(j.fill||null),j.dir=Vt(j.dir,-1),Z=Z??C.length,C.splice(Z,0,j)}function wi(j){j==null?C.length=0:C.splice(j,1)}l.addBand=kn,l.setBand=ji,l.delBand=wi;function ao(j,Z){y[j].alpha=Z,le&&ti[j]!=null&&(ti[j].style.opacity=Z),ue&&Te[j]&&(Te[j].style.opacity=Z)}let _n,Mi,Ti;const Ki={focus:!0};function Un(j){if(j!=Ti){let Z=j==null,re=ei.alpha!=1;y.forEach((oe,ge)=>{if(T==1||ge>0){let be=Z||ge==0||ge==j;oe._focus=Z?null:be,re&&ao(ge,be?1:ei.alpha)}}),Ti=j,re&&br()}}ue&&ir&&sn($f,ve,j=>{ne._lock||(nr(j),Ti!=null&&ui(null,Ki,!0,rt.setSeries))});function Vn(j,Z,re){let oe=$[Z];re&&(j=j/qt-(oe.ori==1?We:_e));let ge=pt;oe.ori==1&&(ge=Ve,j=ge-j),oe.dir==-1&&(j=ge-j);let be=oe._min,Me=oe._max,De=j/ge,Pe=be+(Me-be)*De,je=oe.distr;return je==3?fs(10,Pe):je==4?aS(Pe,oe.asinh):je==100?oe.bwd(Pe):Pe}function Zn(j,Z){let re=Vn(j,v,Z);return fr(re,u[0],an,bn)}l.valToIdx=j=>fr(j,u[0]),l.posToIdx=Zn,l.posToVal=Vn,l.valToPos=(j,Z,re)=>$[Z].ori==0?b(j,$[Z],re?st:pt,re?$t:0):w(j,$[Z],re?gt:Ve,re?Ct:0),l.setCursor=(j,Z,re)=>{Gt=j.left,Dt=j.top,x(null,Z,re)};function Ao(j,Z){un(ci,us,mt.left=j),un(ci,Ks,mt.width=Z)}function Jn(j,Z){un(ci,zs,mt.top=j),un(ci,Gs,mt.height=Z)}let ri=U.ori==0?Ao:Jn,Li=U.ori==1?Ao:Jn;function Ei(){if(ue&&he.live)for(let j=T==2?1:0;j<y.length;j++){if(j==0&&at)continue;let Z=he.values[j],re=0;for(let oe in Z)qe[j][re++].firstChild.nodeValue=Z[oe]}}function f(j,Z){if(j!=null&&(j.idxs?j.idxs.forEach((re,oe)=>{te[oe]=re}):hS(j.idx)||te.fill(j.idx),he.idx=te[0]),ue&&he.live){for(let re=0;re<y.length;re++)(re>0||T==1&&!at)&&A(re,te[re]);Ei()}Qn=!1,Z!==!1&&Ze("setLegend")}l.setLegend=f;function A(j,Z){let re=y[j],oe=j==0&&P==2?ii:u[j],ge;at?ge=re.values(l,j,Z)??et:(ge=re.value(l,Z==null?null:oe[Z],j,Z),ge=ge==null?et:{_:ge}),he.values[j]=ge}function x(j,Z,re){Kt=Gt,Ut=Dt,[Gt,Dt]=ne.move(l,Gt,Dt),ne.left=Gt,ne.top=Dt,le&&($i&&Ar($i,Wn(Gt),0,pt,Ve),Tn&&Ar(Tn,0,Wn(Dt),pt,Ve));let oe,ge=an>bn;_n=nn,Mi=null;let be=U.ori==0?pt:Ve,Me=U.ori==1?pt:Ve;if(Gt<0||Mn==0||ge){oe=ne.idx=null;for(let De=0;De<y.length;De++){let Pe=ti[De];Pe!=null&&Ar(Pe,-10,-10,pt,Ve)}ir&&ui(null,Ki,!0,j==null&&rt.setSeries),he.live&&(te.fill(oe),Qn=!0)}else{let De,Pe,je;T==1&&(De=U.ori==0?Gt:Dt,Pe=Vn(De,v),oe=ne.idx=fr(Pe,u[0],an,bn),je=O(u[0][oe],U,be,0));let Qe=-10,Je=-10,yt=0,It=0,xt=!0,Mt="",ut="";for(let it=T==2?1:0;it<y.length;it++){let tn=y[it],pn=te[it],Nn=pn==null?null:T==1?u[it][pn]:u[it][1][pn],Bt=ne.dataIdx(l,it,oe,Pe),pe=Bt==null?null:T==1?u[it][Bt]:u[it][1][Bt];if(Qn=Qn||pe!=Nn||Bt!=pn,te[it]=Bt,it>0&&tn.show){let Se=Bt==null?-10:Bt==oe?je:O(T==1?u[0][Bt]:u[it][0][Bt],U,be,0),xe=pe==null?-10:S(pe,T==1?$[tn.scale]:$[tn.facets[1].scale],Me,0);if(ir&&pe!=null){let Ue=U.ori==1?Gt:Dt,ot=Hn(ei.dist(l,it,Bt,xe,Ue));if(ot<_n){let _t=ei.bias;if(_t!=0){let zt=Vn(Ue,tn.scale),Tt=pe>=0?1:-1,hi=zt>=0?1:-1;hi==Tt&&(hi==1?_t==1?pe>=zt:pe<=zt:_t==1?pe<=zt:pe>=zt)&&(_n=ot,Mi=it)}else _n=ot,Mi=it}}if(Qn||gn){let Ue,ot;U.ori==0?(Ue=Se,ot=xe):(Ue=xe,ot=Se);let _t,zt,Tt,hi,Gi,en,Kn=!0,Pr=$n.bbox;if(Pr!=null){Kn=!1;let Cn=Pr(l,it);Tt=Cn.left,hi=Cn.top,_t=Cn.width,zt=Cn.height}else Tt=Ue,hi=ot,_t=zt=$n.size(l,it);if(en=$n.fill(l,it),Gi=$n.stroke(l,it),gn)it==Mi&&_n<=ei.prox&&(Qe=Tt,Je=hi,yt=_t,It=zt,xt=Kn,Mt=en,ut=Gi);else{let Cn=ti[it];Cn!=null&&(mr[it]=Tt,rr[it]=hi,Of(Cn,_t,zt,Kn),Rf(Cn,en,Gi),Ar(Cn,er(Tt),er(hi),pt,Ve))}}}}if(gn){let it=ei.prox,tn=Ti==null?_n<=it:_n>it||Mi!=Ti;if(Qn||tn){let pn=ti[0];pn!=null&&(mr[0]=Qe,rr[0]=Je,Of(pn,yt,It,xt),Rf(pn,Mt,ut),Ar(pn,er(Qe),er(Je),pt,Ve))}}}if(mt.show&&Vi)if(j!=null){let[De,Pe]=rt.scales,[je,Qe]=rt.match,[Je,yt]=j.cursor.sync.scales,It=j.cursor.drag;if(He=It._x,ln=It._y,He||ln){let{left:xt,top:Mt,width:ut,height:it}=j.select,tn=j.scales[Je].ori,pn=j.posToVal,Nn,Bt,pe,Se,xe,Ue=De!=null&&je(De,Je),ot=Pe!=null&&Qe(Pe,yt);Ue&&He?(tn==0?(Nn=xt,Bt=ut):(Nn=Mt,Bt=it),pe=$[De],Se=O(pn(Nn,Je),pe,be,0),xe=O(pn(Nn+Bt,Je),pe,be,0),ri(pr(Se,xe),Hn(xe-Se))):ri(0,be),ot&&ln?(tn==1?(Nn=xt,Bt=ut):(Nn=Mt,Bt=it),pe=$[Pe],Se=S(pn(Nn,yt),pe,Me,0),xe=S(pn(Nn+Bt,yt),pe,Me,0),Li(pr(Se,xe),Hn(xe-Se))):Li(0,Me)}else J()}else{let De=Hn(Kt-es),Pe=Hn(Ut-Fr);if(U.ori==1){let yt=De;De=Pe,Pe=yt}He=xn.x&&De>=xn.dist,ln=xn.y&&Pe>=xn.dist;let je=xn.uni;je!=null?He&&ln&&(He=De>=je,ln=Pe>=je,!He&&!ln&&(Pe>De?ln=!0:He=!0)):xn.x&&xn.y&&(He||ln)&&(He=ln=!0);let Qe,Je;He&&(U.ori==0?(Qe=Ui,Je=Gt):(Qe=xr,Je=Dt),ri(pr(Qe,Je),Hn(Je-Qe)),ln||Li(0,Me)),ln&&(U.ori==1?(Qe=Ui,Je=Gt):(Qe=xr,Je=Dt),Li(pr(Qe,Je),Hn(Je-Qe)),He||ri(0,be)),!He&&!ln&&(ri(0,0),Li(0,0))}if(xn._x=He,xn._y=ln,j==null){if(re){if(dn!=null){let[De,Pe]=rt.scales;rt.values[0]=De!=null?Vn(U.ori==0?Gt:Dt,De):null,rt.values[1]=Pe!=null?Vn(U.ori==1?Gt:Dt,Pe):null}vt(Sc,l,Gt,Dt,pt,Ve,oe)}if(ir){let De=re&&rt.setSeries,Pe=ei.prox;Ti==null?_n<=Pe&&ui(Mi,Ki,!0,De):_n>Pe?ui(null,Ki,!0,De):Mi!=Ti&&ui(Mi,Ki,!0,De)}}Qn&&(he.idx=oe,f()),Z!==!1&&Ze("setCursor")}let D=null;Object.defineProperty(l,"rect",{get(){return D==null&&B(!1),D}});function B(j=!1){j?D=null:(D=n.getBoundingClientRect(),Ze("syncRect",D))}function H(j,Z,re,oe,ge,be,Me){ne._lock||Vi&&j!=null&&j.movementX==0&&j.movementY==0||(K(j,Z,re,oe,ge,be,Me,!1,j!=null),j!=null?x(null,!0,!0):x(Z,!0,!1))}function K(j,Z,re,oe,ge,be,Me,De,Pe){if(D==null&&B(!1),nr(j),j!=null)re=j.clientX-D.left,oe=j.clientY-D.top;else{if(re<0||oe<0){Gt=-10,Dt=-10;return}let[je,Qe]=rt.scales,Je=Z.cursor.sync,[yt,It]=Je.values,[xt,Mt]=Je.scales,[ut,it]=rt.match,tn=Z.axes[0].side%2==1,pn=U.ori==0?pt:Ve,Nn=U.ori==1?pt:Ve,Bt=tn?be:ge,pe=tn?ge:be,Se=tn?oe:re,xe=tn?re:oe;if(xt!=null?re=ut(je,xt)?_(yt,$[je],pn,0):-10:re=pn*(Se/Bt),Mt!=null?oe=it(Qe,Mt)?_(It,$[Qe],Nn,0):-10:oe=Nn*(xe/pe),U.ori==1){let Ue=re;re=oe,oe=Ue}}Pe&&(Z==null||Z.cursor.event.type==Sc)&&((re<=1||re>=pt-1)&&(re=Po(re,pt)),(oe<=1||oe>=Ve-1)&&(oe=Po(oe,Ve))),De?(es=re,Fr=oe,[Ui,xr]=ne.move(l,re,oe)):(Gt=re,Dt=oe)}const Y={width:0,height:0,left:0,top:0};function J(){Jt(Y,!1)}let ie,se,ye,ke;function de(j,Z,re,oe,ge,be,Me){Vi=!0,He=ln=xn._x=xn._y=!1,K(j,Z,re,oe,ge,be,Me,!0,!1),j!=null&&(sn(Cc,yu,we,!1),vt(Cf,l,Ui,xr,pt,Ve,null));let{left:De,top:Pe,width:je,height:Qe}=mt;ie=De,se=Pe,ye=je,ke=Qe}function we(j,Z,re,oe,ge,be,Me){Vi=xn._x=xn._y=!1,K(j,Z,re,oe,ge,be,Me,!1,!0);let{left:De,top:Pe,width:je,height:Qe}=mt,Je=je>0||Qe>0,yt=ie!=De||se!=Pe||ye!=je||ke!=Qe;if(Je&&yt&&Jt(mt),xn.setScale&&Je&&yt){let It=De,xt=je,Mt=Pe,ut=Qe;if(U.ori==1&&(It=Pe,xt=Qe,Mt=De,ut=je),He&&On(v,Vn(It,v),Vn(It+xt,v)),ln)for(let it in $){let tn=$[it];it!=v&&tn.from==null&&tn.min!=nn&&On(it,Vn(Mt+ut,it),Vn(Mt,it))}J()}else ne.lock&&(ne._lock=!ne._lock,x(Z,!0,j!=null));j!=null&&(yn(Cc,yu),vt(Cc,l,Gt,Dt,pt,Ve,null))}function Ie(j,Z,re,oe,ge,be,Me){if(ne._lock)return;nr(j);let De=Vi;if(Vi){let Pe=!0,je=!0,Qe=10,Je,yt;U.ori==0?(Je=He,yt=ln):(Je=ln,yt=He),Je&&yt&&(Pe=Gt<=Qe||Gt>=pt-Qe,je=Dt<=Qe||Dt>=Ve-Qe),Je&&Pe&&(Gt=Gt<Ui?0:pt),yt&&je&&(Dt=Dt<xr?0:Ve),x(null,!0,!0),Vi=!1}Gt=-10,Dt=-10,te.fill(null),x(null,!0,!0),De&&(Vi=De)}function Ee(j,Z,re,oe,ge,be,Me){ne._lock||(nr(j),bo(),J(),j!=null&&vt(Mf,l,Gt,Dt,pt,Ve,null))}function ze(){R.forEach($C),Tr(l.width,l.height,!0)}Uo(Ya,ds,ze);const nt={};nt.mousedown=de,nt.mousemove=H,nt.mouseup=we,nt.dblclick=Ee,nt.setSeries=(j,Z,re,oe)=>{let ge=rt.match[2];re=ge(l,Z,re),re!=-1&&ui(re,oe,!0,!1)},le&&(sn(Cf,n,de),sn(Sc,n,H),sn(Af,n,j=>{nr(j),B(!1)}),sn($f,n,Ie),sn(Mf,n,Ee),Au.add(l),l.syncRect=B);const Xe=l.hooks=c.hooks||{};function Ze(j,Z,re){so?Nr.push([j,Z,re]):j in Xe&&Xe[j].forEach(oe=>{oe.call(null,l,Z,re)})}(c.plugins||[]).forEach(j=>{for(let Z in j.hooks)Xe[Z]=(Xe[Z]||[]).concat(j.hooks[Z])});const Xt=(j,Z,re)=>re,rt=Dn({key:null,setSeries:!1,filters:{pub:Bf,sub:Bf},scales:[v,y[1]?y[1].scale:null],match:[Wf,Wf,Xt],values:[null,null]},ne.sync);rt.match.length==2&&rt.match.push(Xt),ne.sync=rt;const dn=rt.key,Et=Zg(dn);function vt(j,Z,re,oe,ge,be,Me){rt.filters.pub(j,Z,re,oe,ge,be,Me)&&Et.pub(j,Z,re,oe,ge,be,Me)}Et.sub(l);function Sn(j,Z,re,oe,ge,be,Me){rt.filters.sub(j,Z,re,oe,ge,be,Me)&&nt[j](null,Z,re,oe,ge,be,Me)}l.pub=Sn;function jn(){Et.unsub(l),Au.delete(l),qn.clear(),xu(Ya,ds,ze),g.remove(),ve==null||ve.remove(),Ze("destroy")}l.destroy=jn;function fn(){Ze("init",c,u),Zr(u||c.data,!1),k[v]?Oe(v,k[v]):bo(),Mr=mt.show&&(mt.width>0||mt.height>0),tr=Qn=!0,Tr(c.width,c.height)}return y.forEach(qo),R.forEach(Ai),e?e instanceof HTMLElement?(e.appendChild(g),fn()):e(l,fn):fn(),l}li.assign=Dn;li.fmtNum=Uu;li.rangeNum=Qa;li.rangeLog=ll;li.rangeAsinh=Hu;li.orient=Ko;li.pxRatio=qt;li.join=yS;li.fmtDate=ju,li.tzDate=TS;li.sync=Zg;{li.addGap=hC,li.clipGaps=hl;let c=li.paths={points:im};c.linear=om,c.stepped=pC,c.bars=gC,c.spline=vC}var Lc,lp;function MC(){return lp||(lp=1,Lc=function(c,u,e,l,T){var b,w;if(l===void 0)l=0;else if(l=l|0,l<0||l>=c.length)throw new RangeError("invalid lower bound");if(T===void 0)T=c.length-1;else if(T=T|0,T<l||T>=c.length)throw new RangeError("invalid upper bound");for(;l<=T;)if(b=l+(T-l>>>1),w=+e(c[b],u,b,c),w<0)l=b+1;else if(w>0)T=b-1;else return b;return~l}),Lc}var TC=MC();const LC=Ja(TC);var Ec,cp;function EC(){if(cp)return Ec;cp=1;function c(u,e,l){var T=-1,b=u.length;e<0&&(e=-e>b?0:b+e),l=l>b?b:l,l<0&&(l+=b),b=e>l?0:l-e>>>0,e>>>=0;for(var w=Array(b);++T<b;)w[T]=u[T+e];return w}return Ec=c,Ec}var Rc,up;function RC(){if(up)return Rc;up=1;var c=EC();function u(e,l,T){var b=e.length;return T=T===void 0?b:T,!l&&T>=b?e:c(e,l,T)}return Rc=u,Rc}var Ic,hp;function cm(){if(hp)return Ic;hp=1;var c="\\ud800-\\udfff",u="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",l="\\u20d0-\\u20ff",T=u+e+l,b="\\ufe0e\\ufe0f",w="\\u200d",_=RegExp("["+w+c+T+b+"]");function p(g){return _.test(g)}return Ic=p,Ic}var Oc,dp;function IC(){if(dp)return Oc;dp=1;function c(u){return u.split("")}return Oc=c,Oc}var Nc,fp;function OC(){if(fp)return Nc;fp=1;var c="\\ud800-\\udfff",u="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",l="\\u20d0-\\u20ff",T=u+e+l,b="\\ufe0e\\ufe0f",w="["+c+"]",_="["+T+"]",p="\\ud83c[\\udffb-\\udfff]",g="(?:"+_+"|"+p+")",r="[^"+c+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",i="\\u200d",n=g+"?",s="["+b+"]?",h="(?:"+i+"(?:"+[r,a,o].join("|")+")"+s+n+")*",m=s+n+h,y="(?:"+[r+_+"?",_,a,o,w].join("|")+")",R=RegExp(p+"(?="+p+")|"+y+m,"g");function $(C){return C.match(R)||[]}return Nc=$,Nc}var Dc,pp;function NC(){if(pp)return Dc;pp=1;var c=IC(),u=cm(),e=OC();function l(T){return u(T)?e(T):c(T)}return Dc=l,Dc}var Fc,gp;function DC(){if(gp)return Fc;gp=1;var c=typeof mo=="object"&&mo&&mo.Object===Object&&mo;return Fc=c,Fc}var Pc,mp;function FC(){if(mp)return Pc;mp=1;var c=DC(),u=typeof self=="object"&&self&&self.Object===Object&&self,e=c||u||Function("return this")();return Pc=e,Pc}var Bc,vp;function Ju(){if(vp)return Bc;vp=1;var c=FC(),u=c.Symbol;return Bc=u,Bc}var Wc,yp;function PC(){if(yp)return Wc;yp=1;function c(u,e){for(var l=-1,T=u==null?0:u.length,b=Array(T);++l<T;)b[l]=e(u[l],l,u);return b}return Wc=c,Wc}var Hc,wp;function BC(){if(wp)return Hc;wp=1;var c=Array.isArray;return Hc=c,Hc}var zc,bp;function WC(){if(bp)return zc;bp=1;var c=Ju(),u=Object.prototype,e=u.hasOwnProperty,l=u.toString,T=c?c.toStringTag:void 0;function b(w){var _=e.call(w,T),p=w[T];try{w[T]=void 0;var g=!0}catch{}var r=l.call(w);return g&&(_?w[T]=p:delete w[T]),r}return zc=b,zc}var Uc,xp;function HC(){if(xp)return Uc;xp=1;var c=Object.prototype,u=c.toString;function e(l){return u.call(l)}return Uc=e,Uc}var Vc,kp;function zC(){if(kp)return Vc;kp=1;var c=Ju(),u=WC(),e=HC(),l="[object Null]",T="[object Undefined]",b=c?c.toStringTag:void 0;function w(_){return _==null?_===void 0?T:l:b&&b in Object(_)?u(_):e(_)}return Vc=w,Vc}var jc,_p;function UC(){if(_p)return jc;_p=1;function c(u){return u!=null&&typeof u=="object"}return jc=c,jc}var Kc,Sp;function VC(){if(Sp)return Kc;Sp=1;var c=zC(),u=UC(),e="[object Symbol]";function l(T){return typeof T=="symbol"||u(T)&&c(T)==e}return Kc=l,Kc}var Gc,Cp;function jC(){if(Cp)return Gc;Cp=1;var c=Ju(),u=PC(),e=BC(),l=VC(),T=c?c.prototype:void 0,b=T?T.toString:void 0;function w(_){if(typeof _=="string")return _;if(e(_))return u(_,w)+"";if(l(_))return b?b.call(_):"";var p=_+"";return p=="0"&&1/_==-1/0?"-0":p}return Gc=w,Gc}var qc,Ap;function gl(){if(Ap)return qc;Ap=1;var c=jC();function u(e){return e==null?"":c(e)}return qc=u,qc}var Yc,$p;function KC(){if($p)return Yc;$p=1;var c=RC(),u=cm(),e=NC(),l=gl();function T(b){return function(w){w=l(w);var _=u(w)?e(w):void 0,p=_?_[0]:w.charAt(0),g=_?c(_,1).join(""):w.slice(1);return p[b]()+g}}return Yc=T,Yc}var Qc,Mp;function um(){if(Mp)return Qc;Mp=1;var c=KC(),u=c("toUpperCase");return Qc=u,Qc}var GC=um();const qC=Ja(GC);var Zc,Tp;function YC(){if(Tp)return Zc;Tp=1;var c=gl(),u=um();function e(l){return u(c(l).toLowerCase())}return Zc=e,Zc}var Jc,Lp;function QC(){if(Lp)return Jc;Lp=1;function c(u,e,l,T){var b=-1,w=u==null?0:u.length;for(T&&w&&(l=u[++b]);++b<w;)l=e(l,u[b],b,u);return l}return Jc=c,Jc}var Xc,Ep;function ZC(){if(Ep)return Xc;Ep=1;function c(u){return function(e){return u==null?void 0:u[e]}}return Xc=c,Xc}var eu,Rp;function JC(){if(Rp)return eu;Rp=1;var c=ZC(),u={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=c(u);return eu=e,eu}var tu,Ip;function XC(){if(Ip)return tu;Ip=1;var c=JC(),u=gl(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,l="\\u0300-\\u036f",T="\\ufe20-\\ufe2f",b="\\u20d0-\\u20ff",w=l+T+b,_="["+w+"]",p=RegExp(_,"g");function g(r){return r=u(r),r&&r.replace(e,c).replace(p,"")}return tu=g,tu}var nu,Op;function eA(){if(Op)return nu;Op=1;var c=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function u(e){return e.match(c)||[]}return nu=u,nu}var iu,Np;function tA(){if(Np)return iu;Np=1;var c=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function u(e){return c.test(e)}return iu=u,iu}var ru,Dp;function nA(){if(Dp)return ru;Dp=1;var c="\\ud800-\\udfff",u="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",l="\\u20d0-\\u20ff",T=u+e+l,b="\\u2700-\\u27bf",w="a-z\\xdf-\\xf6\\xf8-\\xff",_="\\xac\\xb1\\xd7\\xf7",p="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",r=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\ufe0e\\ufe0f",i=_+p+g+r,n="['’]",s="["+i+"]",h="["+T+"]",m="\\d+",y="["+b+"]",R="["+w+"]",$="[^"+c+i+m+b+w+a+"]",C="\\ud83c[\\udffb-\\udfff]",v="(?:"+h+"|"+C+")",L="[^"+c+"]",I="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",E="["+a+"]",U="\\u200d",P="(?:"+R+"|"+$+")",O="(?:"+E+"|"+$+")",S="(?:"+n+"(?:d|ll|m|re|s|t|ve))?",k="(?:"+n+"(?:D|LL|M|RE|S|T|VE))?",N=v+"?",W="["+o+"]?",V="(?:"+U+"(?:"+[L,I,F].join("|")+")"+W+N+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Q="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=W+N+V,he="(?:"+[y,I,F].join("|")+")"+te,ne=RegExp([E+"?"+R+"+"+S+"(?="+[s,E,"$"].join("|")+")",O+"+"+k+"(?="+[s,E+P,"$"].join("|")+")",E+"?"+P+"+"+S,E+"+"+k,Q,G,m,he].join("|"),"g");function ue(le){return le.match(ne)||[]}return ru=ue,ru}var ou,Fp;function iA(){if(Fp)return ou;Fp=1;var c=eA(),u=tA(),e=gl(),l=nA();function T(b,w,_){return b=e(b),w=_?void 0:w,w===void 0?u(b)?l(b):c(b):b.match(w)||[]}return ou=T,ou}var su,Pp;function rA(){if(Pp)return su;Pp=1;var c=QC(),u=XC(),e=iA(),l="['’]",T=RegExp(l,"g");function b(w){return function(_){return c(e(u(_).replace(T,"")),w,"")}}return su=b,su}var au,Bp;function oA(){if(Bp)return au;Bp=1;var c=YC(),u=rA(),e=u(function(l,T,b){return T=T.toLowerCase(),l+(b?c(T):T)});return au=e,au}var sA=oA();const aA=Ja(sA),lA=Object.assign({"./ArrayWidget.vue":()=>Promise.resolve().then(()=>require("./ArrayWidget-DkjHrXsu.cjs")),"./ArrayplotWidget.vue":()=>Promise.resolve().then(()=>require("./ArrayplotWidget-COeaK_Lz.cjs")),"./BlockWidget.vue":()=>Promise.resolve().then(()=>require("./BlockWidget-BFVYgbd_.cjs")),"./ButtonWidget.vue":()=>Promise.resolve().then(()=>require("./ButtonWidget-HN8UHsme.cjs")),"./CanvasWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasWidget-CHmkxxMO.cjs")),"./CanvasdotWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasdotWidget-B4bUcKRc.cjs")),"./CanvasimageWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasimageWidget-B5YozXoI.cjs")),"./CanvasimagevalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvasimagevalueWidget-Dx1HnbEw.cjs")),"./CanvaslabelWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslabelWidget-DgadQD-D.cjs")),"./CanvaslabelvalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslabelvalueWidget-C3k5gx5c.cjs")),"./CanvaslineWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslineWidget-CYHkes0a.cjs")),"./CanvaslinevalueWidget.vue":()=>Promise.resolve().then(()=>require("./CanvaslinevalueWidget-5DzhZ22p.cjs")),"./CheckbuttonWidget.vue":()=>Promise.resolve().then(()=>require("./CheckbuttonWidget-BCzsXnIF.cjs")),"./ComboboxWidget.vue":()=>Promise.resolve().then(()=>require("./ComboboxWidget-DQgDyDAC.cjs")),"./DateWidget.vue":()=>Promise.resolve().then(()=>require("./DateWidget-BB4cIuUS.cjs")),"./DynamicWidget.vue":()=>Promise.resolve().then(()=>require("./DynamicWidget-BWEVCUfd.cjs")),"./FormatvalueWidget.vue":()=>Promise.resolve().then(()=>require("./FormatvalueWidget-CdjCEAI7.cjs")),"./HorizontalWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontalWidget-_6IR0cR8.cjs")),"./HorizontalboxWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontalboxWidget-zmnurtv1.cjs")),"./HorizontallineWidget.vue":()=>Promise.resolve().then(()=>require("./HorizontallineWidget-CM-6WqCj.cjs")),"./IframeWidget.vue":()=>Promise.resolve().then(()=>require("./IframeWidget-EhncMob0.cjs")),"./ImageviewerWidget.vue":()=>Promise.resolve().then(()=>require("./ImageviewerWidget-Bv3CreXd.cjs")),"./LabelWidget.vue":()=>Promise.resolve().then(()=>require("./LabelWidget-mMcf5S8K.cjs")),"./LabelledWidget.vue":()=>Promise.resolve().then(()=>require("./LabelledWidget-BoYCuDaH.cjs")),"./LabelprogressbarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelprogressbarWidget-DiucKsT2.cjs")),"./LabelsparklineWidget.vue":()=>Promise.resolve().then(()=>require("./LabelsparklineWidget-A3MTEhQc.cjs")),"./LabelvalueWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvalueWidget-DnKoz0-N.cjs")),"./LabelvaluedescWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluedescWidget-I6ljK--Y.cjs")),"./LabelvaluelimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluelimitsbarWidget-Cb6i_Ixc.cjs")),"./LabelvaluelimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluelimitscolumnWidget-ClY5OxUC.cjs")),"./LabelvaluerangebarWidget.vue":()=>Promise.resolve().then(()=>require("./LabelvaluerangebarWidget-9S5rVZaS.cjs")),"./LedWidget.vue":()=>Promise.resolve().then(()=>require("./LedWidget-B2BcwiYF.cjs")),"./LimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./LimitsbarWidget-CVCLFIhG.cjs")),"./LimitscolorWidget.vue":()=>Promise.resolve().then(()=>require("./LimitscolorWidget-DORhDxRo.cjs")),"./LimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./LimitscolumnWidget-C9Uyg7Fh.cjs")),"./LinegraphWidget.vue":()=>Promise.resolve().then(()=>require("./LinegraphWidget-Bf8DIwEn.cjs")),"./MatrixbycolumnsWidget.vue":()=>Promise.resolve().then(()=>require("./MatrixbycolumnsWidget-DpdFzNeP.cjs")),"./ProgressbarWidget.vue":()=>Promise.resolve().then(()=>require("./ProgressbarWidget-fGWa6ipm.cjs")),"./RadiobuttonWidget.vue":()=>Promise.resolve().then(()=>require("./RadiobuttonWidget-ZEPJbOp_.cjs")),"./RadiogroupWidget.vue":()=>Promise.resolve().then(()=>require("./RadiogroupWidget-EK4rEGUC.cjs")),"./RangebarWidget.vue":()=>Promise.resolve().then(()=>require("./RangebarWidget-DwIs-L5k.cjs")),"./RollupWidget.vue":()=>Promise.resolve().then(()=>require("./RollupWidget-DC3OIP6G.cjs")),"./ScrollwindowWidget.vue":()=>Promise.resolve().then(()=>require("./ScrollwindowWidget-BWeqSUPc.cjs")),"./SignalWidget.vue":()=>Promise.resolve().then(()=>require("./SignalWidget-RvRwpE8T.cjs")),"./SpacerWidget.vue":()=>Promise.resolve().then(()=>require("./SpacerWidget-7_8bpLCb.cjs")),"./SparklineWidget.vue":()=>Promise.resolve().then(()=>require("./SparklineWidget-60jVlbHA.cjs")),"./TabbookWidget.vue":()=>Promise.resolve().then(()=>require("./TabbookWidget-D1CVT9IK.cjs")),"./TextboxWidget.vue":()=>Promise.resolve().then(()=>require("./TextboxWidget-BDG4NxRw.cjs")),"./TextfieldWidget.vue":()=>Promise.resolve().then(()=>require("./TextfieldWidget-BGJv9Lox.cjs")),"./TimeWidget.vue":()=>Promise.resolve().then(()=>require("./TimeWidget-CGCOIouj.cjs")),"./TitleWidget.vue":()=>Promise.resolve().then(()=>require("./TitleWidget-BljFH9RB.cjs")),"./ValueWidget.vue":()=>Promise.resolve().then(()=>require("./ValueWidget-Cu7hgKja.cjs")),"./ValuelimitsbarWidget.vue":()=>Promise.resolve().then(()=>require("./ValuelimitsbarWidget-C0HROxrb.cjs")),"./ValuelimitscolumnWidget.vue":()=>Promise.resolve().then(()=>require("./ValuelimitscolumnWidget-CWvLfg8u.cjs")),"./ValuerangebarWidget.vue":()=>Promise.resolve().then(()=>require("./ValuerangebarWidget-DyN78cQl.cjs")),"./VerticalWidget.vue":()=>Promise.resolve().then(()=>require("./VerticalWidget-CFTOu4H8.cjs")),"./VerticalboxWidget.vue":()=>Promise.resolve().then(()=>require("./VerticalboxWidget-Z8-DWI8t.cjs"))}),cA=Object.entries(lA).reduce((c,[u,e])=>{u=u.split("/").pop();const l=qC(aA(u.replace(/\.\w+$/,"")));return{...c,[l]:Be.defineAsyncComponent(e)}},{}),uA={components:cA};exports.DataViewerComponent=bg;exports.DataViewerHistoryComponent=E_;exports.WidgetComponents=uA;exports._=kg;exports.aceExports=wx;exports.at=mu;exports.bs=LC;exports.hi=k_;exports.li=Fk;exports.lodashExports=xg;exports.oi=rk;exports.uPlot=li;exports.ui=Pk;
1493
- //# sourceMappingURL=WidgetComponents-utpQ592X.cjs.map