@openc3/vue-common 7.0.0-rc2 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/dist/{ArrayWidget-D0_mEwbG.cjs → ArrayWidget-BsAUsmBz.cjs} +2 -2
  2. package/dist/{ArrayWidget-D0_mEwbG.cjs.map → ArrayWidget-BsAUsmBz.cjs.map} +1 -1
  3. package/dist/{ArrayWidget-BfXFA16h.js → ArrayWidget-D2UrA5Db.js} +4 -4
  4. package/dist/{ArrayWidget-BfXFA16h.js.map → ArrayWidget-D2UrA5Db.js.map} +1 -1
  5. package/dist/{ArrayplotWidget-CrkUt8nf.js → ArrayplotWidget-CDNRxI2F.js} +3 -3
  6. package/dist/{ArrayplotWidget-CrkUt8nf.js.map → ArrayplotWidget-CDNRxI2F.js.map} +1 -1
  7. package/dist/{ArrayplotWidget-ixbndTIr.cjs → ArrayplotWidget-ChHMy5_L.cjs} +2 -2
  8. package/dist/{ArrayplotWidget-ixbndTIr.cjs.map → ArrayplotWidget-ChHMy5_L.cjs.map} +1 -1
  9. package/dist/{BarColumn-D5XXk4Pw.cjs → BarColumn-e-sSkSvE.cjs} +2 -2
  10. package/dist/BarColumn-e-sSkSvE.cjs.map +1 -0
  11. package/dist/{BarColumn-CB-tgZUT.js → BarColumn-nSFR2LZF.js} +6 -6
  12. package/dist/BarColumn-nSFR2LZF.js.map +1 -0
  13. package/dist/{BlockWidget-76H_uaBo.js → BlockWidget-C-WB0Q2m.js} +4 -4
  14. package/dist/{BlockWidget-76H_uaBo.js.map → BlockWidget-C-WB0Q2m.js.map} +1 -1
  15. package/dist/{BlockWidget-w3lmbO_0.cjs → BlockWidget-DJpyQiec.cjs} +2 -2
  16. package/dist/{BlockWidget-w3lmbO_0.cjs.map → BlockWidget-DJpyQiec.cjs.map} +1 -1
  17. package/dist/{ButtonWidget-CL09OQq_.js → ButtonWidget-rS7sVb7m.js} +14 -14
  18. package/dist/{ButtonWidget-CL09OQq_.js.map → ButtonWidget-rS7sVb7m.js.map} +1 -1
  19. package/dist/{ButtonWidget-MeyUohLj.cjs → ButtonWidget-rkOE5b8G.cjs} +3 -3
  20. package/dist/{ButtonWidget-MeyUohLj.cjs.map → ButtonWidget-rkOE5b8G.cjs.map} +1 -1
  21. package/dist/{CanvasWidget-DN04dkIP.js → CanvasWidget-DuWolVCW.js} +2 -2
  22. package/dist/{CanvasWidget-DN04dkIP.js.map → CanvasWidget-DuWolVCW.js.map} +1 -1
  23. package/dist/{CanvasWidget-DFwpzAHp.cjs → CanvasWidget-Dv7_QUJY.cjs} +2 -2
  24. package/dist/{CanvasWidget-DFwpzAHp.cjs.map → CanvasWidget-Dv7_QUJY.cjs.map} +1 -1
  25. package/dist/{CanvasdotWidget-DD5jlEoi.js → CanvasdotWidget-B42YizA1.js} +2 -2
  26. package/dist/{CanvasdotWidget-DD5jlEoi.js.map → CanvasdotWidget-B42YizA1.js.map} +1 -1
  27. package/dist/{CanvasdotWidget-BC_P3TrQ.cjs → CanvasdotWidget-E1OgFBVZ.cjs} +2 -2
  28. package/dist/{CanvasdotWidget-BC_P3TrQ.cjs.map → CanvasdotWidget-E1OgFBVZ.cjs.map} +1 -1
  29. package/dist/{CanvasimageWidget-BGC5DEyb.js → CanvasimageWidget-DMHdDTSs.js} +3 -3
  30. package/dist/{CanvasimageWidget-BGC5DEyb.js.map → CanvasimageWidget-DMHdDTSs.js.map} +1 -1
  31. package/dist/{CanvasimageWidget-Ba8CzBeA.cjs → CanvasimageWidget-ysw78z4C.cjs} +2 -2
  32. package/dist/{CanvasimageWidget-Ba8CzBeA.cjs.map → CanvasimageWidget-ysw78z4C.cjs.map} +1 -1
  33. package/dist/{CanvasimagevalueWidget-C4V30F-k.cjs → CanvasimagevalueWidget-Bc-VYXe7.cjs} +2 -2
  34. package/dist/{CanvasimagevalueWidget-C4V30F-k.cjs.map → CanvasimagevalueWidget-Bc-VYXe7.cjs.map} +1 -1
  35. package/dist/{CanvasimagevalueWidget-BP7cAs0Z.js → CanvasimagevalueWidget-ns-5S1HA.js} +3 -3
  36. package/dist/{CanvasimagevalueWidget-BP7cAs0Z.js.map → CanvasimagevalueWidget-ns-5S1HA.js.map} +1 -1
  37. package/dist/{CanvaslabelWidget-7kIhAM0A.cjs → CanvaslabelWidget-6h59qJY8.cjs} +2 -2
  38. package/dist/{CanvaslabelWidget-7kIhAM0A.cjs.map → CanvaslabelWidget-6h59qJY8.cjs.map} +1 -1
  39. package/dist/{CanvaslabelWidget-Cl--mh6r.js → CanvaslabelWidget-DElES3gU.js} +2 -2
  40. package/dist/{CanvaslabelWidget-Cl--mh6r.js.map → CanvaslabelWidget-DElES3gU.js.map} +1 -1
  41. package/dist/{CanvaslabelvalueWidget-CgYr_qcI.js → CanvaslabelvalueWidget-B2B5KlUm.js} +2 -2
  42. package/dist/{CanvaslabelvalueWidget-CgYr_qcI.js.map → CanvaslabelvalueWidget-B2B5KlUm.js.map} +1 -1
  43. package/dist/{CanvaslabelvalueWidget-SbtBYdGj.cjs → CanvaslabelvalueWidget-BLIgF8xi.cjs} +2 -2
  44. package/dist/{CanvaslabelvalueWidget-SbtBYdGj.cjs.map → CanvaslabelvalueWidget-BLIgF8xi.cjs.map} +1 -1
  45. package/dist/{CanvaslineWidget-CKBFMLKb.cjs → CanvaslineWidget-CxZGCwVF.cjs} +2 -2
  46. package/dist/{CanvaslineWidget-CKBFMLKb.cjs.map → CanvaslineWidget-CxZGCwVF.cjs.map} +1 -1
  47. package/dist/{CanvaslineWidget-BygI_uzn.js → CanvaslineWidget-DaHxgGyM.js} +2 -2
  48. package/dist/{CanvaslineWidget-BygI_uzn.js.map → CanvaslineWidget-DaHxgGyM.js.map} +1 -1
  49. package/dist/{CanvaslinevalueWidget-Bsg-kroQ.cjs → CanvaslinevalueWidget-BljeuN4S.cjs} +2 -2
  50. package/dist/{CanvaslinevalueWidget-Bsg-kroQ.cjs.map → CanvaslinevalueWidget-BljeuN4S.cjs.map} +1 -1
  51. package/dist/{CanvaslinevalueWidget-ChL9-ZOz.js → CanvaslinevalueWidget-CrtDsSOP.js} +2 -2
  52. package/dist/{CanvaslinevalueWidget-ChL9-ZOz.js.map → CanvaslinevalueWidget-CrtDsSOP.js.map} +1 -1
  53. package/dist/{CheckbuttonWidget-Cxj4agsS.js → CheckbuttonWidget-BK4SgIu7.js} +2 -2
  54. package/dist/{CheckbuttonWidget-Cxj4agsS.js.map → CheckbuttonWidget-BK4SgIu7.js.map} +1 -1
  55. package/dist/{CheckbuttonWidget-xjIBJ8JT.cjs → CheckbuttonWidget-By46VH2e.cjs} +2 -2
  56. package/dist/{CheckbuttonWidget-xjIBJ8JT.cjs.map → CheckbuttonWidget-By46VH2e.cjs.map} +1 -1
  57. package/dist/{ClassificationBanners-Ag0cW8Wi.cjs → ClassificationBanners-CHQX3t7t.cjs} +2 -2
  58. package/dist/{ClassificationBanners-Ag0cW8Wi.cjs.map → ClassificationBanners-CHQX3t7t.cjs.map} +1 -1
  59. package/dist/{ClassificationBanners-BEBrvuzq.js → ClassificationBanners-DGl2HUKd.js} +2 -2
  60. package/dist/{ClassificationBanners-BEBrvuzq.js.map → ClassificationBanners-DGl2HUKd.js.map} +1 -1
  61. package/dist/{ComboboxWidget-CLVDTsRT.cjs → ComboboxWidget-CHFTOmhZ.cjs} +2 -2
  62. package/dist/{ComboboxWidget-CLVDTsRT.cjs.map → ComboboxWidget-CHFTOmhZ.cjs.map} +1 -1
  63. package/dist/{ComboboxWidget-DXlOmRS6.js → ComboboxWidget-CciRWuKq.js} +2 -2
  64. package/dist/{ComboboxWidget-DXlOmRS6.js.map → ComboboxWidget-CciRWuKq.js.map} +1 -1
  65. package/dist/{CriticalCmdDialog-De7KJBQR.cjs → CriticalCmdDialog-BWrwpTNK.cjs} +2 -2
  66. package/dist/{CriticalCmdDialog-De7KJBQR.cjs.map → CriticalCmdDialog-BWrwpTNK.cjs.map} +1 -1
  67. package/dist/{CriticalCmdDialog-DTok3HnF.js → CriticalCmdDialog-C5EZDRSZ.js} +3 -3
  68. package/dist/{CriticalCmdDialog-DTok3HnF.js.map → CriticalCmdDialog-C5EZDRSZ.js.map} +1 -1
  69. package/dist/{DateWidget-DCebkHzD.cjs → DateWidget-Bb6juAYs.cjs} +2 -2
  70. package/dist/{DateWidget-DCebkHzD.cjs.map → DateWidget-Bb6juAYs.cjs.map} +1 -1
  71. package/dist/{DateWidget-CYPRbvuk.js → DateWidget-DwgQ3Jik.js} +2 -2
  72. package/dist/{DateWidget-CYPRbvuk.js.map → DateWidget-DwgQ3Jik.js.map} +1 -1
  73. package/dist/{DetailsDialog-BI3oNhTn.js → DetailsDialog-CspQjoR5.js} +160 -141
  74. package/dist/DetailsDialog-CspQjoR5.js.map +1 -0
  75. package/dist/DetailsDialog-D_my0nhs.cjs +2 -0
  76. package/dist/DetailsDialog-D_my0nhs.cjs.map +1 -0
  77. package/dist/{EventListDialog-BMw8Gl-0.js → EventListDialog-DL2HHNQG.js} +19 -16
  78. package/dist/EventListDialog-DL2HHNQG.js.map +1 -0
  79. package/dist/EventListDialog-DO32zY2U.cjs +2 -0
  80. package/dist/EventListDialog-DO32zY2U.cjs.map +1 -0
  81. package/dist/{FilechecksumWidget-C6duPUFo.js → FilechecksumWidget-BS281Q0h.js} +19 -19
  82. package/dist/{FilechecksumWidget-C6duPUFo.js.map → FilechecksumWidget-BS281Q0h.js.map} +1 -1
  83. package/dist/{FilechecksumWidget-ccksLFy0.cjs → FilechecksumWidget-DMpuLZJ5.cjs} +2 -2
  84. package/dist/{FilechecksumWidget-ccksLFy0.cjs.map → FilechecksumWidget-DMpuLZJ5.cjs.map} +1 -1
  85. package/dist/{FiledisplayWidget-Cu1sQoZu.cjs → FiledisplayWidget-BoD7LuLP.cjs} +2 -2
  86. package/dist/{FiledisplayWidget-Cu1sQoZu.cjs.map → FiledisplayWidget-BoD7LuLP.cjs.map} +1 -1
  87. package/dist/{FiledisplayWidget-Cu2tLm6D.js → FiledisplayWidget-C9YdXDdv.js} +4 -4
  88. package/dist/{FiledisplayWidget-Cu2tLm6D.js.map → FiledisplayWidget-C9YdXDdv.js.map} +1 -1
  89. package/dist/FormatvalueWidget-DfvTVSs-.cjs +2 -0
  90. package/dist/{FormatvalueWidget-npk9X-15.cjs.map → FormatvalueWidget-DfvTVSs-.cjs.map} +1 -1
  91. package/dist/{FormatvalueWidget-I_0Qa6C6.js → FormatvalueWidget-dfmQfrNA.js} +13 -11
  92. package/dist/{FormatvalueWidget-I_0Qa6C6.js.map → FormatvalueWidget-dfmQfrNA.js.map} +1 -1
  93. package/dist/{Graph-BdLZrFnQ.js → Graph-BTtGIbYG.js} +389 -335
  94. package/dist/Graph-BTtGIbYG.js.map +1 -0
  95. package/dist/Graph-Cy2LrwoK.cjs +2 -0
  96. package/dist/Graph-Cy2LrwoK.cjs.map +1 -0
  97. package/dist/{GraphWidget-BvEeKc4C.js → GraphWidget-CWJ4Yb26.js} +2 -2
  98. package/dist/{GraphWidget-BvEeKc4C.js.map → GraphWidget-CWJ4Yb26.js.map} +1 -1
  99. package/dist/{GraphWidget-D3bjqKwr.cjs → GraphWidget-XjxjI3og.cjs} +2 -2
  100. package/dist/{GraphWidget-D3bjqKwr.cjs.map → GraphWidget-XjxjI3og.cjs.map} +1 -1
  101. package/dist/{HorizontalWidget-D83EJ_-6.cjs → HorizontalWidget-BeW4b13V.cjs} +2 -2
  102. package/dist/{HorizontalWidget-D83EJ_-6.cjs.map → HorizontalWidget-BeW4b13V.cjs.map} +1 -1
  103. package/dist/{HorizontalWidget-BtdfnZMK.js → HorizontalWidget-DFAqF95S.js} +2 -2
  104. package/dist/{HorizontalWidget-BtdfnZMK.js.map → HorizontalWidget-DFAqF95S.js.map} +1 -1
  105. package/dist/{HorizontalboxWidget-BsXYMyz7.js → HorizontalboxWidget-CL1xEhDj.js} +5 -5
  106. package/dist/{HorizontalboxWidget-BsXYMyz7.js.map → HorizontalboxWidget-CL1xEhDj.js.map} +1 -1
  107. package/dist/{HorizontalboxWidget-CEIySQlg.cjs → HorizontalboxWidget-DdPv_6qb.cjs} +2 -2
  108. package/dist/{HorizontalboxWidget-CEIySQlg.cjs.map → HorizontalboxWidget-DdPv_6qb.cjs.map} +1 -1
  109. package/dist/{HorizontallineWidget-B-SvqwyU.cjs → HorizontallineWidget-BdWOnioI.cjs} +2 -2
  110. package/dist/{HorizontallineWidget-B-SvqwyU.cjs.map → HorizontallineWidget-BdWOnioI.cjs.map} +1 -1
  111. package/dist/{HorizontallineWidget-DCfxLDB6.js → HorizontallineWidget-DPiADCAy.js} +2 -2
  112. package/dist/{HorizontallineWidget-DCfxLDB6.js.map → HorizontallineWidget-DPiADCAy.js.map} +1 -1
  113. package/dist/{IframeWidget-xzoq2o7Z.js → IframeWidget-BsDu4b17.js} +2 -2
  114. package/dist/{IframeWidget-xzoq2o7Z.js.map → IframeWidget-BsDu4b17.js.map} +1 -1
  115. package/dist/{IframeWidget-c-9N6GGF.cjs → IframeWidget-Z12pG6JT.cjs} +2 -2
  116. package/dist/{IframeWidget-c-9N6GGF.cjs.map → IframeWidget-Z12pG6JT.cjs.map} +1 -1
  117. package/dist/{ImageLoader-Cj6nNt7z.js → ImageLoader-CT4rnwWn.js} +2 -2
  118. package/dist/{ImageLoader-Cj6nNt7z.js.map → ImageLoader-CT4rnwWn.js.map} +1 -1
  119. package/dist/{ImageLoader-DfFljBse.cjs → ImageLoader-CZ0Wx_Ua.cjs} +2 -2
  120. package/dist/{ImageLoader-DfFljBse.cjs.map → ImageLoader-CZ0Wx_Ua.cjs.map} +1 -1
  121. package/dist/{ImageviewerWidget-Cajx4RLs.js → ImageviewerWidget-BQbrz2WL.js} +2 -2
  122. package/dist/{ImageviewerWidget-Cajx4RLs.js.map → ImageviewerWidget-BQbrz2WL.js.map} +1 -1
  123. package/dist/{ImageviewerWidget-ClWuV9To.cjs → ImageviewerWidget-CtJzQn0e.cjs} +2 -2
  124. package/dist/{ImageviewerWidget-ClWuV9To.cjs.map → ImageviewerWidget-CtJzQn0e.cjs.map} +1 -1
  125. package/dist/{InterfacesTab-wj7bhYZ0.cjs → InterfacesTab-A0g0y1n1.cjs} +2 -2
  126. package/dist/{InterfacesTab-wj7bhYZ0.cjs.map → InterfacesTab-A0g0y1n1.cjs.map} +1 -1
  127. package/dist/{InterfacesTab-CWxzXFzp.js → InterfacesTab-COKNyeUu.js} +5 -5
  128. package/dist/{InterfacesTab-CWxzXFzp.js.map → InterfacesTab-COKNyeUu.js.map} +1 -1
  129. package/dist/{LabelWidget-BADrtfQr.js → LabelWidget-D5-IFUYW.js} +2 -2
  130. package/dist/{LabelWidget-BADrtfQr.js.map → LabelWidget-D5-IFUYW.js.map} +1 -1
  131. package/dist/{LabelWidget-Ce37S_Fm.cjs → LabelWidget-rH3SsItK.cjs} +2 -2
  132. package/dist/{LabelWidget-Ce37S_Fm.cjs.map → LabelWidget-rH3SsItK.cjs.map} +1 -1
  133. package/dist/{LabelledWidget-spC_mMaz.cjs → LabelledWidget-Bca_qNSP.cjs} +2 -2
  134. package/dist/{LabelledWidget-spC_mMaz.cjs.map → LabelledWidget-Bca_qNSP.cjs.map} +1 -1
  135. package/dist/{LabelledWidget-DJfuld1A.js → LabelledWidget-Dt9miRtB.js} +4 -4
  136. package/dist/{LabelledWidget-DJfuld1A.js.map → LabelledWidget-Dt9miRtB.js.map} +1 -1
  137. package/dist/{LabelprogressbarWidget-Dua-yQPl.js → LabelprogressbarWidget-BNFgTq4D.js} +4 -4
  138. package/dist/{LabelprogressbarWidget-Dua-yQPl.js.map → LabelprogressbarWidget-BNFgTq4D.js.map} +1 -1
  139. package/dist/{LabelprogressbarWidget-CKPuMKh0.cjs → LabelprogressbarWidget-hyK9Vqsl.cjs} +2 -2
  140. package/dist/{LabelprogressbarWidget-CKPuMKh0.cjs.map → LabelprogressbarWidget-hyK9Vqsl.cjs.map} +1 -1
  141. package/dist/{LabelsparklineWidget-eKiHy9w4.js → LabelsparklineWidget-BByxev6X.js} +4 -4
  142. package/dist/{LabelsparklineWidget-eKiHy9w4.js.map → LabelsparklineWidget-BByxev6X.js.map} +1 -1
  143. package/dist/{LabelsparklineWidget-Cx3t3YKW.cjs → LabelsparklineWidget-BxkxEVwQ.cjs} +2 -2
  144. package/dist/{LabelsparklineWidget-Cx3t3YKW.cjs.map → LabelsparklineWidget-BxkxEVwQ.cjs.map} +1 -1
  145. package/dist/{LabelvalueWidget-BUB3KJDX.js → LabelvalueWidget-BM6L9bVw.js} +4 -4
  146. package/dist/{LabelvalueWidget-BUB3KJDX.js.map → LabelvalueWidget-BM6L9bVw.js.map} +1 -1
  147. package/dist/{LabelvalueWidget-DoOlcQVx.cjs → LabelvalueWidget-DEGmbKMG.cjs} +2 -2
  148. package/dist/{LabelvalueWidget-DoOlcQVx.cjs.map → LabelvalueWidget-DEGmbKMG.cjs.map} +1 -1
  149. package/dist/{LabelvaluedescWidget-cE1Vk7vq.cjs → LabelvaluedescWidget-B7bGqqeO.cjs} +2 -2
  150. package/dist/{LabelvaluedescWidget-cE1Vk7vq.cjs.map → LabelvaluedescWidget-B7bGqqeO.cjs.map} +1 -1
  151. package/dist/{LabelvaluedescWidget-CjvG_UpY.js → LabelvaluedescWidget-DeBRjYXs.js} +5 -5
  152. package/dist/{LabelvaluedescWidget-CjvG_UpY.js.map → LabelvaluedescWidget-DeBRjYXs.js.map} +1 -1
  153. package/dist/{LabelvaluelimitsbarWidget-CtMQd5KQ.js → LabelvaluelimitsbarWidget-CqV0-c3G.js} +4 -4
  154. package/dist/{LabelvaluelimitsbarWidget-CtMQd5KQ.js.map → LabelvaluelimitsbarWidget-CqV0-c3G.js.map} +1 -1
  155. package/dist/{LabelvaluelimitsbarWidget-DpneFMil.cjs → LabelvaluelimitsbarWidget-DzEc9ZZr.cjs} +2 -2
  156. package/dist/{LabelvaluelimitsbarWidget-DpneFMil.cjs.map → LabelvaluelimitsbarWidget-DzEc9ZZr.cjs.map} +1 -1
  157. package/dist/{LabelvaluelimitscolumnWidget-DPeXqlfx.js → LabelvaluelimitscolumnWidget-Bz0PKTIV.js} +5 -5
  158. package/dist/{LabelvaluelimitscolumnWidget-DPeXqlfx.js.map → LabelvaluelimitscolumnWidget-Bz0PKTIV.js.map} +1 -1
  159. package/dist/{LabelvaluelimitscolumnWidget-B1nC50lt.cjs → LabelvaluelimitscolumnWidget-C0-v0q7a.cjs} +2 -2
  160. package/dist/{LabelvaluelimitscolumnWidget-B1nC50lt.cjs.map → LabelvaluelimitscolumnWidget-C0-v0q7a.cjs.map} +1 -1
  161. package/dist/{LabelvaluerangebarWidget-uglFf01b.cjs → LabelvaluerangebarWidget-CWhsb5gm.cjs} +2 -2
  162. package/dist/{LabelvaluerangebarWidget-uglFf01b.cjs.map → LabelvaluerangebarWidget-CWhsb5gm.cjs.map} +1 -1
  163. package/dist/{LabelvaluerangebarWidget-Bsndqu5o.js → LabelvaluerangebarWidget-DKuAJHLm.js} +4 -4
  164. package/dist/{LabelvaluerangebarWidget-Bsndqu5o.js.map → LabelvaluerangebarWidget-DKuAJHLm.js.map} +1 -1
  165. package/dist/{Layout-CpqPTtxp.js → Layout-LSeXBY_W.js} +2 -2
  166. package/dist/{Layout-CpqPTtxp.js.map → Layout-LSeXBY_W.js.map} +1 -1
  167. package/dist/{Layout-BJWisBf5.cjs → Layout-QcVHlWPp.cjs} +2 -2
  168. package/dist/{Layout-BJWisBf5.cjs.map → Layout-QcVHlWPp.cjs.map} +1 -1
  169. package/dist/{LedWidget-Cps5RaQ9.js → LedWidget-CH4Il9R7.js} +4 -4
  170. package/dist/{LedWidget-Cps5RaQ9.js.map → LedWidget-CH4Il9R7.js.map} +1 -1
  171. package/dist/{LedWidget-DjLL2qYw.cjs → LedWidget-CJwBssHl.cjs} +2 -2
  172. package/dist/{LedWidget-DjLL2qYw.cjs.map → LedWidget-CJwBssHl.cjs.map} +1 -1
  173. package/dist/{LimitsBar-CxTRY26H.cjs → LimitsBar-B0O6RMrG.cjs} +2 -2
  174. package/dist/{LimitsBar-CxTRY26H.cjs.map → LimitsBar-B0O6RMrG.cjs.map} +1 -1
  175. package/dist/{LimitsBar-CmUsJfsd.js → LimitsBar-BelAQFD0.js} +2 -2
  176. package/dist/{LimitsBar-CmUsJfsd.js.map → LimitsBar-BelAQFD0.js.map} +1 -1
  177. package/dist/LimitsColor-5sx13hYN.cjs +2 -0
  178. package/dist/LimitsColor-5sx13hYN.cjs.map +1 -0
  179. package/dist/LimitsColor-CBcpB-la.js +43 -0
  180. package/dist/LimitsColor-CBcpB-la.js.map +1 -0
  181. package/dist/{LimitsbarWidget-BGmYIhDO.cjs → LimitsbarWidget--AwjBbtb.cjs} +2 -2
  182. package/dist/{LimitsbarWidget-BGmYIhDO.cjs.map → LimitsbarWidget--AwjBbtb.cjs.map} +1 -1
  183. package/dist/{LimitsbarWidget-DU8L1muK.js → LimitsbarWidget-PkPqlyxL.js} +3 -3
  184. package/dist/{LimitsbarWidget-DU8L1muK.js.map → LimitsbarWidget-PkPqlyxL.js.map} +1 -1
  185. package/dist/LimitscolorWidget-1D2myv8a.cjs +2 -0
  186. package/dist/LimitscolorWidget-1D2myv8a.cjs.map +1 -0
  187. package/dist/LimitscolorWidget-BlA15g4A.js +179 -0
  188. package/dist/LimitscolorWidget-BlA15g4A.js.map +1 -0
  189. package/dist/{LimitscolumnWidget-DlMHRwh3.js → LimitscolumnWidget-PT917BA0.js} +2 -2
  190. package/dist/{LimitscolumnWidget-DlMHRwh3.js.map → LimitscolumnWidget-PT917BA0.js.map} +1 -1
  191. package/dist/{LimitscolumnWidget-D4XsdyiO.cjs → LimitscolumnWidget-_QPf3cUQ.cjs} +2 -2
  192. package/dist/{LimitscolumnWidget-D4XsdyiO.cjs.map → LimitscolumnWidget-_QPf3cUQ.cjs.map} +1 -1
  193. package/dist/{LinegraphWidget-C5o9B_PX.js → LinegraphWidget-BW7kS_6G.js} +4 -4
  194. package/dist/{LinegraphWidget-C5o9B_PX.js.map → LinegraphWidget-BW7kS_6G.js.map} +1 -1
  195. package/dist/{LinegraphWidget-DNLFkuva.cjs → LinegraphWidget-DfXd3959.cjs} +2 -2
  196. package/dist/{LinegraphWidget-DNLFkuva.cjs.map → LinegraphWidget-DfXd3959.cjs.map} +1 -1
  197. package/dist/{MatrixbycolumnsWidget-sXRvVukg.js → MatrixbycolumnsWidget-BGNsZvjv.js} +3 -3
  198. package/dist/{MatrixbycolumnsWidget-sXRvVukg.js.map → MatrixbycolumnsWidget-BGNsZvjv.js.map} +1 -1
  199. package/dist/{MatrixbycolumnsWidget-BX001JXC.cjs → MatrixbycolumnsWidget-oRYGFSEt.cjs} +2 -2
  200. package/dist/{MatrixbycolumnsWidget-BX001JXC.cjs.map → MatrixbycolumnsWidget-oRYGFSEt.cjs.map} +1 -1
  201. package/dist/{MicroservicesTab-h-myrNWR.js → MicroservicesTab-CiEGGavF.js} +3 -3
  202. package/dist/{MicroservicesTab-h-myrNWR.js.map → MicroservicesTab-CiEGGavF.js.map} +1 -1
  203. package/dist/{MicroservicesTab-a-glK9U3.cjs → MicroservicesTab-DvDK2hPW.cjs} +3 -3
  204. package/dist/{MicroservicesTab-a-glK9U3.cjs.map → MicroservicesTab-DvDK2hPW.cjs.map} +1 -1
  205. package/dist/{OpenC3TimePicker-DJFOQgY_.js → OpenC3TimePicker-CkaALgy9.js} +2 -2
  206. package/dist/{OpenC3TimePicker-DJFOQgY_.js.map → OpenC3TimePicker-CkaALgy9.js.map} +1 -1
  207. package/dist/{OpenC3TimePicker-D8a4_nHu.cjs → OpenC3TimePicker-bbdbKTv_.cjs} +2 -2
  208. package/dist/{OpenC3TimePicker-D8a4_nHu.cjs.map → OpenC3TimePicker-bbdbKTv_.cjs.map} +1 -1
  209. package/dist/{Openc3Screen-B2IwESpD.js → Openc3Screen-BnM1bNOB.js} +71 -72
  210. package/dist/{Openc3Screen-B2IwESpD.js.map → Openc3Screen-BnM1bNOB.js.map} +1 -1
  211. package/dist/{Openc3Screen-ERXOSMh1.cjs → Openc3Screen-DoOAFAlJ.cjs} +5 -5
  212. package/dist/{Openc3Screen-ERXOSMh1.cjs.map → Openc3Screen-DoOAFAlJ.cjs.map} +1 -1
  213. package/dist/{OutputDialog-JHy7LBTb.js → OutputDialog-BY-TZNRl.js} +4 -4
  214. package/dist/{OutputDialog-JHy7LBTb.js.map → OutputDialog-BY-TZNRl.js.map} +1 -1
  215. package/dist/{OutputDialog-CP7FRxxv.cjs → OutputDialog-R3Xj3_yw.cjs} +2 -2
  216. package/dist/{OutputDialog-CP7FRxxv.cjs.map → OutputDialog-R3Xj3_yw.cjs.map} +1 -1
  217. package/dist/PackagesTab-2Mu7yvxU.cjs +2 -0
  218. package/dist/{PackagesTab-ONxpjnC_.cjs.map → PackagesTab-2Mu7yvxU.cjs.map} +1 -1
  219. package/dist/{PackagesTab-CfCLRhzT.js → PackagesTab-DGrqIo_Z.js} +10 -10
  220. package/dist/{PackagesTab-CfCLRhzT.js.map → PackagesTab-DGrqIo_Z.js.map} +1 -1
  221. package/dist/PluginsTab-BXjVe_81.js +1740 -0
  222. package/dist/PluginsTab-BXjVe_81.js.map +1 -0
  223. package/dist/PluginsTab-R6i60Pih.cjs +6 -0
  224. package/dist/PluginsTab-R6i60Pih.cjs.map +1 -0
  225. package/dist/{ProgressbarWidget-C1Q4Gt5Q.js → ProgressbarWidget-Cy_ad8mb.js} +2 -2
  226. package/dist/{ProgressbarWidget-C1Q4Gt5Q.js.map → ProgressbarWidget-Cy_ad8mb.js.map} +1 -1
  227. package/dist/{ProgressbarWidget-C0tMl_LR.cjs → ProgressbarWidget-XAy4iHgC.cjs} +2 -2
  228. package/dist/{ProgressbarWidget-C0tMl_LR.cjs.map → ProgressbarWidget-XAy4iHgC.cjs.map} +1 -1
  229. package/dist/{RadiobuttonWidget-Dhcet_r5.js → RadiobuttonWidget-aJBIz45y.js} +2 -2
  230. package/dist/{RadiobuttonWidget-Dhcet_r5.js.map → RadiobuttonWidget-aJBIz45y.js.map} +1 -1
  231. package/dist/{RadiobuttonWidget-SqDhREzf.cjs → RadiobuttonWidget-fAqkUUTb.cjs} +2 -2
  232. package/dist/{RadiobuttonWidget-SqDhREzf.cjs.map → RadiobuttonWidget-fAqkUUTb.cjs.map} +1 -1
  233. package/dist/{RadiogroupWidget-DI1D1BRJ.cjs → RadiogroupWidget-BuYMyBQd.cjs} +2 -2
  234. package/dist/{RadiogroupWidget-DI1D1BRJ.cjs.map → RadiogroupWidget-BuYMyBQd.cjs.map} +1 -1
  235. package/dist/{RadiogroupWidget-CjrXZjdl.js → RadiogroupWidget-DNRlJnPE.js} +2 -2
  236. package/dist/{RadiogroupWidget-CjrXZjdl.js.map → RadiogroupWidget-DNRlJnPE.js.map} +1 -1
  237. package/dist/{RangebarWidget-14uZ2825.cjs → RangebarWidget-gcukfXnM.cjs} +2 -2
  238. package/dist/RangebarWidget-gcukfXnM.cjs.map +1 -0
  239. package/dist/{RangebarWidget-C461bAvq.js → RangebarWidget-h4YItqPF.js} +8 -8
  240. package/dist/RangebarWidget-h4YItqPF.js.map +1 -0
  241. package/dist/{RedisTab-IeIY08Nw.cjs → RedisTab-0V8f-hs1.cjs} +2 -2
  242. package/dist/{RedisTab-IeIY08Nw.cjs.map → RedisTab-0V8f-hs1.cjs.map} +1 -1
  243. package/dist/{RedisTab-BiflYEPO.js → RedisTab-BmZWA0OG.js} +15 -15
  244. package/dist/{RedisTab-BiflYEPO.js.map → RedisTab-BmZWA0OG.js.map} +1 -1
  245. package/dist/{RollupWidget-kmBW8757.js → RollupWidget-CnxDQRQ0.js} +2 -2
  246. package/dist/{RollupWidget-kmBW8757.js.map → RollupWidget-CnxDQRQ0.js.map} +1 -1
  247. package/dist/{RollupWidget-CI3lSfnk.cjs → RollupWidget-ZerASRD3.cjs} +2 -2
  248. package/dist/{RollupWidget-CI3lSfnk.cjs.map → RollupWidget-ZerASRD3.cjs.map} +1 -1
  249. package/dist/{RoutersTab-CZB-Jj_D.cjs → RoutersTab-CY-SmZd4.cjs} +2 -2
  250. package/dist/{RoutersTab-CZB-Jj_D.cjs.map → RoutersTab-CY-SmZd4.cjs.map} +1 -1
  251. package/dist/{RoutersTab-Dpg6xwE9.js → RoutersTab-Db28gKLP.js} +3 -3
  252. package/dist/{RoutersTab-Dpg6xwE9.js.map → RoutersTab-Db28gKLP.js.map} +1 -1
  253. package/dist/{ScriptChooser-BLsPk7_c.js → ScriptChooser-Bl0wisob.js} +182 -128
  254. package/dist/ScriptChooser-Bl0wisob.js.map +1 -0
  255. package/dist/ScriptChooser-CI4lAYZ1.cjs +2 -0
  256. package/dist/ScriptChooser-CI4lAYZ1.cjs.map +1 -0
  257. package/dist/{ScrollwindowWidget-B-ogJ1hO.cjs → ScrollwindowWidget-BJkQ5uX_.cjs} +2 -2
  258. package/dist/{ScrollwindowWidget-B-ogJ1hO.cjs.map → ScrollwindowWidget-BJkQ5uX_.cjs.map} +1 -1
  259. package/dist/{ScrollwindowWidget-DqexVHaY.js → ScrollwindowWidget-DFkTJ2Ue.js} +2 -2
  260. package/dist/{ScrollwindowWidget-DqexVHaY.js.map → ScrollwindowWidget-DFkTJ2Ue.js.map} +1 -1
  261. package/dist/{SecretsTab-LyEVxDfM.cjs → SecretsTab-B8YTrfQ2.cjs} +2 -2
  262. package/dist/{SecretsTab-LyEVxDfM.cjs.map → SecretsTab-B8YTrfQ2.cjs.map} +1 -1
  263. package/dist/{SecretsTab-CqloYezi.js → SecretsTab-DTdVLi0I.js} +4 -4
  264. package/dist/{SecretsTab-CqloYezi.js.map → SecretsTab-DTdVLi0I.js.map} +1 -1
  265. package/dist/{SettingsTab-DN8wG7j8.js → SettingsTab-CnybxvVj.js} +152 -139
  266. package/dist/SettingsTab-CnybxvVj.js.map +1 -0
  267. package/dist/SettingsTab-_SJLhuk0.cjs +3 -0
  268. package/dist/SettingsTab-_SJLhuk0.cjs.map +1 -0
  269. package/dist/{SignalWidget-CBpKkkdh.cjs → SignalWidget-DC7-NIOj.cjs} +2 -2
  270. package/dist/{SignalWidget-CBpKkkdh.cjs.map → SignalWidget-DC7-NIOj.cjs.map} +1 -1
  271. package/dist/{SignalWidget-DHGdWn0D.js → SignalWidget-jYpXSIfD.js} +2 -2
  272. package/dist/{SignalWidget-DHGdWn0D.js.map → SignalWidget-jYpXSIfD.js.map} +1 -1
  273. package/dist/{SimpleTextDialog-CK4Tl4hP.cjs → SimpleTextDialog-DLdHGmmb.cjs} +2 -2
  274. package/dist/{SimpleTextDialog-CK4Tl4hP.cjs.map → SimpleTextDialog-DLdHGmmb.cjs.map} +1 -1
  275. package/dist/{SimpleTextDialog-CP0v1gSj.js → SimpleTextDialog-Dd3BoNG-.js} +2 -2
  276. package/dist/{SimpleTextDialog-CP0v1gSj.js.map → SimpleTextDialog-Dd3BoNG-.js.map} +1 -1
  277. package/dist/{SpacerWidget-DjPk3E9O.cjs → SpacerWidget-BwwxG8k3.cjs} +2 -2
  278. package/dist/{SpacerWidget-DjPk3E9O.cjs.map → SpacerWidget-BwwxG8k3.cjs.map} +1 -1
  279. package/dist/{SpacerWidget-DzUeDtYi.js → SpacerWidget-CUqvml6o.js} +2 -2
  280. package/dist/{SpacerWidget-DzUeDtYi.js.map → SpacerWidget-CUqvml6o.js.map} +1 -1
  281. package/dist/{SparklineWidget-rqphJPpw.cjs → SparklineWidget-05TlKC-x.cjs} +2 -2
  282. package/dist/{SparklineWidget-rqphJPpw.cjs.map → SparklineWidget-05TlKC-x.cjs.map} +1 -1
  283. package/dist/{SparklineWidget-BfUk2lrY.js → SparklineWidget-CVf1TtjV.js} +4 -4
  284. package/dist/{SparklineWidget-BfUk2lrY.js.map → SparklineWidget-CVf1TtjV.js.map} +1 -1
  285. package/dist/{TabbookWidget-CJqXi4kG.js → TabbookWidget-CTUEpDnn.js} +2 -2
  286. package/dist/{TabbookWidget-CJqXi4kG.js.map → TabbookWidget-CTUEpDnn.js.map} +1 -1
  287. package/dist/{TabbookWidget-DMtbO8Lj.cjs → TabbookWidget-oZre4A6Y.cjs} +2 -2
  288. package/dist/{TabbookWidget-DMtbO8Lj.cjs.map → TabbookWidget-oZre4A6Y.cjs.map} +1 -1
  289. package/dist/TargetPacketItemChooser-BvXBVNLj.cjs +2 -0
  290. package/dist/TargetPacketItemChooser-BvXBVNLj.cjs.map +1 -0
  291. package/dist/{TargetPacketItemChooser-DUODHxax.js → TargetPacketItemChooser-CS2Vvi2U.js} +22 -22
  292. package/dist/TargetPacketItemChooser-CS2Vvi2U.js.map +1 -0
  293. package/dist/{TargetsTab-BxVAyeCA.cjs → TargetsTab-Bc7-iav6.cjs} +2 -2
  294. package/dist/{TargetsTab-BxVAyeCA.cjs.map → TargetsTab-Bc7-iav6.cjs.map} +1 -1
  295. package/dist/{TargetsTab-CG8KNOmE.js → TargetsTab-CGv0GwAF.js} +12 -12
  296. package/dist/{TargetsTab-CG8KNOmE.js.map → TargetsTab-CGv0GwAF.js.map} +1 -1
  297. package/dist/{TextboxWidget-BEgAKlC8.js → TextboxWidget-B0Y1W7GP.js} +4 -4
  298. package/dist/{TextboxWidget-BEgAKlC8.js.map → TextboxWidget-B0Y1W7GP.js.map} +1 -1
  299. package/dist/{TextboxWidget-DVg3_YDk.cjs → TextboxWidget-qSbx4xxD.cjs} +2 -2
  300. package/dist/{TextboxWidget-DVg3_YDk.cjs.map → TextboxWidget-qSbx4xxD.cjs.map} +1 -1
  301. package/dist/{TextfieldWidget-C84uT4WC.js → TextfieldWidget-B8TAf9oU.js} +2 -2
  302. package/dist/{TextfieldWidget-C84uT4WC.js.map → TextfieldWidget-B8TAf9oU.js.map} +1 -1
  303. package/dist/{TextfieldWidget-BJpj8zB4.cjs → TextfieldWidget-cCG7BQ25.cjs} +2 -2
  304. package/dist/{TextfieldWidget-BJpj8zB4.cjs.map → TextfieldWidget-cCG7BQ25.cjs.map} +1 -1
  305. package/dist/{TimeWidget-f5fOoYyh.cjs → TimeWidget-DNkhFoZO.cjs} +2 -2
  306. package/dist/{TimeWidget-f5fOoYyh.cjs.map → TimeWidget-DNkhFoZO.cjs.map} +1 -1
  307. package/dist/{TimeWidget-B1C7VXsk.js → TimeWidget-DewVXks0.js} +3 -3
  308. package/dist/{TimeWidget-B1C7VXsk.js.map → TimeWidget-DewVXks0.js.map} +1 -1
  309. package/dist/{TitleWidget-NPq7zAwI.js → TitleWidget-BAq2LGJF.js} +2 -2
  310. package/dist/{TitleWidget-NPq7zAwI.js.map → TitleWidget-BAq2LGJF.js.map} +1 -1
  311. package/dist/{TitleWidget-nTDE0RIC.cjs → TitleWidget-ChGb6BJW.cjs} +2 -2
  312. package/dist/{TitleWidget-nTDE0RIC.cjs.map → TitleWidget-ChGb6BJW.cjs.map} +1 -1
  313. package/dist/ToolsTab-CB_6hFQF.cjs +2 -0
  314. package/dist/ToolsTab-CB_6hFQF.cjs.map +1 -0
  315. package/dist/{ToolsTab-jE3-AcI0.js → ToolsTab-USmbUvDq.js} +247 -231
  316. package/dist/ToolsTab-USmbUvDq.js.map +1 -0
  317. package/dist/{TopBar-knn2yGed.js → TopBar-B4RDkLs-.js} +2 -2
  318. package/dist/{TopBar-knn2yGed.js.map → TopBar-B4RDkLs-.js.map} +1 -1
  319. package/dist/{TopBar-CnMJSCD4.cjs → TopBar-DzL3L4ih.cjs} +2 -2
  320. package/dist/{TopBar-CnMJSCD4.cjs.map → TopBar-DzL3L4ih.cjs.map} +1 -1
  321. package/dist/TsdbTab-0aYlysh5.js +125 -0
  322. package/dist/TsdbTab-0aYlysh5.js.map +1 -0
  323. package/dist/TsdbTab-H64XGfOO.cjs +2 -0
  324. package/dist/TsdbTab-H64XGfOO.cjs.map +1 -0
  325. package/dist/{UpgradeToEnterpriseDialog-Cs663G4x.cjs → UpgradeToEnterpriseDialog-BBRXrLrL.cjs} +2 -2
  326. package/dist/{UpgradeToEnterpriseDialog-Cs663G4x.cjs.map → UpgradeToEnterpriseDialog-BBRXrLrL.cjs.map} +1 -1
  327. package/dist/{UpgradeToEnterpriseDialog-BwWDur-C.js → UpgradeToEnterpriseDialog-DTmnp8xy.js} +2 -2
  328. package/dist/{UpgradeToEnterpriseDialog-BwWDur-C.js.map → UpgradeToEnterpriseDialog-DTmnp8xy.js.map} +1 -1
  329. package/dist/{UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-B75KLE6R.js → UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-CDTSzdb-.js} +3790 -3699
  330. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-CDTSzdb-.js.map +1 -0
  331. package/dist/{UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-BBqfsHYh.cjs → UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-MfH160rD.cjs} +29 -29
  332. package/dist/{UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-BBqfsHYh.cjs.map → UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-MfH160rD.cjs.map} +1 -1
  333. package/dist/VWidget-0KwtSssI.js +191 -0
  334. package/dist/VWidget-0KwtSssI.js.map +1 -0
  335. package/dist/VWidget-SWmlQP30.cjs +2 -0
  336. package/dist/VWidget-SWmlQP30.cjs.map +1 -0
  337. package/dist/{ValueWidget-CpygRYKj.js → ValueWidget-BGNqaaRs.js} +4 -4
  338. package/dist/{ValueWidget-CpygRYKj.js.map → ValueWidget-BGNqaaRs.js.map} +1 -1
  339. package/dist/{ValueWidget-Bzds4cWd.cjs → ValueWidget-BfxZq1LD.cjs} +2 -2
  340. package/dist/{ValueWidget-Bzds4cWd.cjs.map → ValueWidget-BfxZq1LD.cjs.map} +1 -1
  341. package/dist/{ValuelimitsbarWidget-CROYfqTR.js → ValuelimitsbarWidget-B6mH4PdF.js} +4 -4
  342. package/dist/{ValuelimitsbarWidget-CROYfqTR.js.map → ValuelimitsbarWidget-B6mH4PdF.js.map} +1 -1
  343. package/dist/{ValuelimitsbarWidget-CeA4_9vz.cjs → ValuelimitsbarWidget-m5fBewLy.cjs} +2 -2
  344. package/dist/{ValuelimitsbarWidget-CeA4_9vz.cjs.map → ValuelimitsbarWidget-m5fBewLy.cjs.map} +1 -1
  345. package/dist/{ValuelimitscolumnWidget-Vn80PsIX.cjs → ValuelimitscolumnWidget-D_5XZhiD.cjs} +2 -2
  346. package/dist/{ValuelimitscolumnWidget-Vn80PsIX.cjs.map → ValuelimitscolumnWidget-D_5XZhiD.cjs.map} +1 -1
  347. package/dist/{ValuelimitscolumnWidget-PCaulvxr.js → ValuelimitscolumnWidget-DlX90_-6.js} +4 -4
  348. package/dist/{ValuelimitscolumnWidget-PCaulvxr.js.map → ValuelimitscolumnWidget-DlX90_-6.js.map} +1 -1
  349. package/dist/{ValuerangebarWidget-DjFTQ2yf.cjs → ValuerangebarWidget-C3XFFRhf.cjs} +2 -2
  350. package/dist/{ValuerangebarWidget-DjFTQ2yf.cjs.map → ValuerangebarWidget-C3XFFRhf.cjs.map} +1 -1
  351. package/dist/{ValuerangebarWidget-Bn9vuPz4.js → ValuerangebarWidget-C9xyLOJO.js} +4 -4
  352. package/dist/{ValuerangebarWidget-Bn9vuPz4.js.map → ValuerangebarWidget-C9xyLOJO.js.map} +1 -1
  353. package/dist/{VerticalWidget-CW7HqXPz.js → VerticalWidget-0UbbE2g3.js} +2 -2
  354. package/dist/{VerticalWidget-CW7HqXPz.js.map → VerticalWidget-0UbbE2g3.js.map} +1 -1
  355. package/dist/{VerticalWidget-Cw5zklAW.cjs → VerticalWidget-D-U8cue6.cjs} +2 -2
  356. package/dist/{VerticalWidget-Cw5zklAW.cjs.map → VerticalWidget-D-U8cue6.cjs.map} +1 -1
  357. package/dist/{VerticalboxWidget-CLuqkhUX.cjs → VerticalboxWidget-C4nkJhEd.cjs} +2 -2
  358. package/dist/{VerticalboxWidget-CLuqkhUX.cjs.map → VerticalboxWidget-C4nkJhEd.cjs.map} +1 -1
  359. package/dist/{VerticalboxWidget-D12SNEH1.js → VerticalboxWidget-efbeOAKE.js} +5 -5
  360. package/dist/{VerticalboxWidget-D12SNEH1.js.map → VerticalboxWidget-efbeOAKE.js.map} +1 -1
  361. package/dist/{Widget-Cj7mgG8B.js → Widget-CGePksBA.js} +2 -2
  362. package/dist/{Widget-Cj7mgG8B.js.map → Widget-CGePksBA.js.map} +1 -1
  363. package/dist/{Widget-C5yVe7V0.cjs → Widget-D0drYWOT.cjs} +2 -2
  364. package/dist/{Widget-C5yVe7V0.cjs.map → Widget-D0drYWOT.cjs.map} +1 -1
  365. package/dist/components.cjs +2 -2
  366. package/dist/components.cjs.map +1 -1
  367. package/dist/components.js +23 -23
  368. package/dist/components.js.map +1 -1
  369. package/dist/index-BJrYCoCB.js +2550 -0
  370. package/dist/index-BJrYCoCB.js.map +1 -0
  371. package/dist/index-C7Uj4U87.js +1883 -0
  372. package/dist/index-C7Uj4U87.js.map +1 -0
  373. package/dist/index-Cmp6oZpm.cjs +7 -0
  374. package/dist/index-Cmp6oZpm.cjs.map +1 -0
  375. package/dist/index-DqKiZufS.cjs +7 -0
  376. package/dist/index-DqKiZufS.cjs.map +1 -0
  377. package/dist/plugins.cjs +2 -2
  378. package/dist/plugins.cjs.map +1 -1
  379. package/dist/plugins.js +27 -27
  380. package/dist/plugins.js.map +1 -1
  381. package/dist/purify.es-4pyphLiB.cjs +3 -0
  382. package/dist/purify.es-4pyphLiB.cjs.map +1 -0
  383. package/dist/{purify.es-DcWaZU6I.js → purify.es-BPDBzHtc.js} +115 -115
  384. package/dist/purify.es-BPDBzHtc.js.map +1 -0
  385. package/dist/{settings-DRbrVc8H.js → settings-CjmDHCpE.js} +2 -2
  386. package/dist/{settings-DRbrVc8H.js.map → settings-CjmDHCpE.js.map} +1 -1
  387. package/dist/{settings-BAxfkWAJ.cjs → settings-l1j_GGzu.cjs} +2 -2
  388. package/dist/{settings-BAxfkWAJ.cjs.map → settings-l1j_GGzu.cjs.map} +1 -1
  389. package/dist/tools/admin.cjs +1 -6
  390. package/dist/tools/admin.cjs.map +1 -1
  391. package/dist/tools/admin.js +6 -2788
  392. package/dist/tools/admin.js.map +1 -1
  393. package/dist/tools/base.cjs +1 -1
  394. package/dist/tools/base.cjs.map +1 -1
  395. package/dist/tools/base.js +110 -89
  396. package/dist/tools/base.js.map +1 -1
  397. package/dist/tools/calendar.cjs +1 -1
  398. package/dist/tools/calendar.js +1 -1
  399. package/dist/tools/scriptrunner.cjs +8 -8
  400. package/dist/tools/scriptrunner.cjs.map +1 -1
  401. package/dist/tools/scriptrunner.js +1478 -1070
  402. package/dist/tools/scriptrunner.js.map +1 -1
  403. package/dist/vue-common.css +1 -1
  404. package/dist/widgets.cjs +1 -1
  405. package/dist/widgets.js +73 -70
  406. package/dist/widgets.js.map +1 -1
  407. package/package.json +12 -12
  408. package/dist/BarColumn-CB-tgZUT.js.map +0 -1
  409. package/dist/BarColumn-D5XXk4Pw.cjs.map +0 -1
  410. package/dist/DetailsDialog-BI3oNhTn.js.map +0 -1
  411. package/dist/DetailsDialog-fCmZJxvS.cjs +0 -2
  412. package/dist/DetailsDialog-fCmZJxvS.cjs.map +0 -1
  413. package/dist/EventListDialog-BMw8Gl-0.js.map +0 -1
  414. package/dist/EventListDialog-Dn5Kb-n3.cjs +0 -2
  415. package/dist/EventListDialog-Dn5Kb-n3.cjs.map +0 -1
  416. package/dist/FormatvalueWidget-npk9X-15.cjs +0 -2
  417. package/dist/Graph-B2Riixiv.cjs +0 -2
  418. package/dist/Graph-B2Riixiv.cjs.map +0 -1
  419. package/dist/Graph-BdLZrFnQ.js.map +0 -1
  420. package/dist/LimitscolorWidget-CdXYGMdR.cjs +0 -2
  421. package/dist/LimitscolorWidget-CdXYGMdR.cjs.map +0 -1
  422. package/dist/LimitscolorWidget-DRUPC2IF.js +0 -159
  423. package/dist/LimitscolorWidget-DRUPC2IF.js.map +0 -1
  424. package/dist/PackagesTab-ONxpjnC_.cjs +0 -2
  425. package/dist/PluginsTab-BQ0LCHQp.js +0 -1561
  426. package/dist/PluginsTab-BQ0LCHQp.js.map +0 -1
  427. package/dist/PluginsTab-crv4-PWb.cjs +0 -6
  428. package/dist/PluginsTab-crv4-PWb.cjs.map +0 -1
  429. package/dist/RangebarWidget-14uZ2825.cjs.map +0 -1
  430. package/dist/RangebarWidget-C461bAvq.js.map +0 -1
  431. package/dist/ScriptChooser-B6bc-chN.cjs +0 -2
  432. package/dist/ScriptChooser-B6bc-chN.cjs.map +0 -1
  433. package/dist/ScriptChooser-BLsPk7_c.js.map +0 -1
  434. package/dist/SettingsTab-CfJUZWp0.cjs +0 -3
  435. package/dist/SettingsTab-CfJUZWp0.cjs.map +0 -1
  436. package/dist/SettingsTab-DN8wG7j8.js.map +0 -1
  437. package/dist/TargetPacketItemChooser-B8TPlfAu.cjs +0 -2
  438. package/dist/TargetPacketItemChooser-B8TPlfAu.cjs.map +0 -1
  439. package/dist/TargetPacketItemChooser-DUODHxax.js.map +0 -1
  440. package/dist/ToolsTab-DXN-84u5.cjs +0 -2
  441. package/dist/ToolsTab-DXN-84u5.cjs.map +0 -1
  442. package/dist/ToolsTab-jE3-AcI0.js.map +0 -1
  443. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-B75KLE6R.js.map +0 -1
  444. package/dist/VWidget-BU-OM9DB.js +0 -190
  445. package/dist/VWidget-BU-OM9DB.js.map +0 -1
  446. package/dist/VWidget-HIRYll0F.cjs +0 -2
  447. package/dist/VWidget-HIRYll0F.cjs.map +0 -1
  448. package/dist/index-Cq7Gm1QU.cjs +0 -7
  449. package/dist/index-Cq7Gm1QU.cjs.map +0 -1
  450. package/dist/index-D3xlpZgv.js +0 -1794
  451. package/dist/index-D3xlpZgv.js.map +0 -1
  452. package/dist/purify.es-B336bjAn.cjs +0 -3
  453. package/dist/purify.es-B336bjAn.cjs.map +0 -1
  454. package/dist/purify.es-DcWaZU6I.js.map +0 -1
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-BBqfsHYh.cjs"),e=require("vue"),L=require("../CustomIcon-8F08upeg.cjs"),ve=require("../timeFilters-CRNRsUsb.cjs");require("../store-CiS35N-w.cjs");require("single-spa");const me=require("../OutputDialog-CP7FRxxv.cjs"),$=require("../format-DOZQNf-X.cjs"),we=require("../index-Cq7Gm1QU.cjs"),_e=require("../useContainerHeight-BEd4f2Lr.cjs"),J=require("../TopBar-CnMJSCD4.cjs"),pe=require("../ScriptChooser-B6bc-chN.cjs"),Ce=require("../fileIcon-BduOQcTc.cjs"),be=require("../CriticalCmdDialog-De7KJBQR.cjs"),F=require("../Openc3Screen-ERXOSMh1.cjs"),xe=require("../SimpleTextDialog-CK4Tl4hP.cjs"),ke=require("../ClassificationBanners-Ag0cW8Wi.cjs");require("../purify.es-B336bjAn.cjs");const Ve=require("../EventListDialog-Dn5Kb-n3.cjs"),ce=i=>{const t="(^|[{\\(\\s])",s="((\\s.+)|(\\(.+\\)))";return new RegExp(`${t}${i}${s}`)},ye=/\{/,Ne=/['"],\s?['"]/;class Se{constructor(){this.api=new V.pi,this.targets={},this.api.get_target_names().then(t=>{t.forEach(s=>{this.targets[s]={cmd:null,tlm:null}})}),this.cmdKeywordExpressions=[],F.getKeywords("cmd").then(t=>{this.cmdKeywordExpressions=t.data.map(ce)}),this.tlmKeywordExpressions=[],F.getKeywords("tlm").then(t=>{this.tlmKeywordExpressions=t.data.map(ce)})}async checkText(t){const{linesToCheck:s,linesToSkip:r}=t.split(`
2
- `).reduce((n,a,p)=>{if(a=a.trim(),a.match(/^#/))return n;const c=a.match(/^([^#'"]*(?:(?:"[^"]*"|'[^']*')[^#'"]*)*)(#.*)$/),g=c?c[1].trim():a,_=this.cmdKeywordExpressions.reduce((E,R)=>E||g.match(R),null),C=this.tlmKeywordExpressions.reduce((E,R)=>E||g.match(R),null);if(!_&&!C)return n;const x=(_||C)[2];if(!x)return n;const k=x.match(/[\(\s)]/);if(!k)return n;let S=x.substring(k.index+1).replace(/\)+.*$/,"");if(S.match(ye))return n.linesToSkip.push(p+1),n;const w=!!S.match(Ne);if(!w){const E=S.match(/^['"]/);if(E){const R=E[0],M=S.indexOf(R,1);M>0&&(S=S.substring(1,M))}}const T=S.split(w?",":" ");if(T.length<2)return n;const B={target:T[0],packet:T[1]};if(C)B.item=T[2];else{const E=T.slice(2);w?B.params=E.map(R=>R.split("=>")[0]):B.params=E.filter((R,M)=>M%2)}for(const E in B)typeof B[E]=="string"?B[E]=B[E].replace(/['"]/g,"").trim():B[E]=B[E].map(R=>R.replace(/['"]/g,"").trim());return n.linesToCheck.push({line:a,mnemonic:B,lineNumber:p+1}),n},{linesToCheck:[],linesToSkip:[]}),o=await this._checkLines(s);return{skipped:r.sort(),problems:o.sort((n,a)=>n.lineNumber-a.lineNumber)}}async _checkLines(t){const s=[],r=F.groupBy(t,o=>o.mnemonic.target);for(const o in r){if(!this.targets[o]){for(const a of r[o])s.push({...a,error:`Target "${o}" does not exist.`});continue}const n=F.groupBy(r[o],a=>a.mnemonic.packet);for(const a in n)for(const p of n[a]){const c=p.mnemonic.item?"tlm":"cmd";if(!this.targets[o][c]){const _=p.mnemonic.item?"get_all_tlm":"get_all_cmds",C=await this.api[_](o);this.targets[o][c]=C.reduce((v,x)=>(v[x.packet_name]=x.items.map(k=>k.name),v),{})}const g=this.targets[o][c][a];if(!g){s.push({...p,error:`${c==="tlm"?"Packet":"Command"} "${o} ${a}" does not exist.`});continue}if(p.mnemonic.item){if(!g.some(_=>_===p.mnemonic.item)){s.push({...p,error:`Item "${o} ${a} ${p.mnemonic.item}" does not exist.`});continue}}else for(const _ of p.mnemonic.params)if(!g.some(C=>C===_)){s.push({...p,error:`Command "${o} ${a}" param "${_}" does not exist.`});continue}}}return s}}const Ee={components:{OutputDialog:me.OutputDialog},mixins:[ve.TimeFilters],props:{tabId:{type:Number,default:null},curTab:{type:Number,default:null},connectInNewTab:Boolean},emits:["disconnect","close"],data(){return{api:null,timeZone:"local",activeTab:"completed",downloadScript:null,refreshTimer:null,runningSearch:"",runningScripts:[],runningTotal:0,runningLoading:!1,runningPage:1,runningItemsPerPage:10,runningHeaders:[{title:"Connect",key:"connect",sortable:!1,filterable:!1},{title:"Id",key:"name"},{title:"User",key:"user_display"},{title:"Filename",key:"filename"},{title:"Start Time",key:"start_time_formatted"},{title:"Duration",key:"duration"},{title:"State",key:"state"},{title:"Stop",key:"stop",sortable:!1,filterable:!1}],completedSearch:"",completedScripts:[],completedTotal:0,completedLoading:!1,completedPage:1,completedItemsPerPage:10,completedHeaders:[{title:"Id",key:"name"},{title:"User",key:"user_display"},{title:"Filename",key:"filename"},{title:"Start Time",key:"start_time_formatted"},{title:"Duration",key:"duration"},{title:"State",key:"state"},{title:"Log",key:"log",sortable:!1,filterable:!1},{title:"Report",key:"report",sortable:!1,filterable:!1}],showDialog:!1,dialogName:"",dialogContent:"",dialogFilename:""}},watch:{activeTab(i){i==="running"?this.getRunningScripts():i==="completed"&&this.getCompletedScripts()}},created(){this.api=new V.pi,this.api.get_setting("time_zone").then(i=>{i&&(this.timeZone=i)}).catch(i=>{}),this.getRunningScripts(),this.getCompletedScripts(),this.refreshTimer=setInterval(()=>{this.activeTab==="running"&&this.getRunningScripts()},5e3)},beforeUnmount(){this.refreshTimer&&clearInterval(this.refreshTimer)},methods:{getRunningScripts:function(){this.runningLoading=!0;const i=(this.runningPage-1)*this.runningItemsPerPage;V.li.get(`/script-api/running-script?scope=DEFAULT&offset=${i}&limit=${this.runningItemsPerPage}`).then(t=>{const s=t.data.items||[],r=new Date;s.forEach(o=>{if(o.user_display=`${o.user_full_name} (${o.username})`,o.start_time){const n=new Date(o.start_time),a=r-n;if(o.start_time_formatted=this.formatDateTimeHMS(n,this.timeZone),a<0)o.duration="N/A";else if(a<1e3)o.duration="< 1s";else if(a<6e4)o.duration=`${Math.round(a/1e3)}s`;else if(a<36e5){const p=Math.floor(a/6e4),c=Math.round(a%6e4/1e3);o.duration=`${p}m ${c}s`}else{const p=Math.floor(a/36e5),c=Math.floor(a%36e5/6e4),g=Math.round(a%6e4/1e3);o.duration=`${p}h ${c}m ${g}s`}}else o.duration="N/A"}),this.runningScripts=s,this.runningTotal=t.data.total||s.length,this.runningLoading=!1}).catch(t=>{this.runningLoading=!1,this.$notify.caution({title:"Error Loading Running Scripts",body:t.message})})},updateRunningPage:function(i){this.runningPage=i,this.getRunningScripts()},updateRunningItemsPerPage:function(i){this.runningItemsPerPage=i,this.runningPage=1,this.getRunningScripts()},getCompletedScripts:function(){this.completedLoading=!0;const i=(this.completedPage-1)*this.completedItemsPerPage;V.li.get(`/script-api/completed-scripts?scope=DEFAULT&offset=${i}&limit=${this.completedItemsPerPage}`).then(t=>{const s=t.data.items||[];s.forEach(r=>{if(r.user_display=`${r.user_full_name} (${r.username})`,r.start_time&&r.end_time){const o=new Date(r.start_time),a=new Date(r.end_time)-o;if(r.start_time_formatted=this.formatDateTimeHMS(o,this.timeZone),a<0)r.duration="N/A";else if(a<1e3)r.duration="< 1s";else if(a<6e4)r.duration=`${Math.round(a/1e3)}s`;else if(a<36e5){const p=Math.floor(a/6e4),c=Math.round(a%6e4/1e3);r.duration=`${p}m ${c}s`}else{const p=Math.floor(a/36e5),c=Math.floor(a%36e5/6e4),g=Math.round(a%6e4/1e3);r.duration=`${p}h ${c}m ${g}s`}}else r.duration="N/A"}),this.completedScripts=s,this.completedTotal=t.data.total||s.length,this.completedLoading=!1}).catch(t=>{this.completedLoading=!1,this.$notify.caution({title:"Error Loading Completed Scripts",body:t.message})})},updateCompletedPage:function(i){this.completedPage=i,this.getCompletedScripts()},updateCompletedItemsPerPage:function(i){this.completedItemsPerPage=i,this.completedPage=1,this.getCompletedScripts()},showScript:function(i){this.dialogContent=JSON.stringify(i,null,2),this.dialogName="Script: "+i.name,this.dialogFilename="",this.showDialog=!0},connectScript:function(i){this.$emit("disconnect");const t={name:"ScriptRunner",params:{id:i.name}};if(this.connectInNewTab){let{href:s}=this.$router.resolve(t);window.open(s,"_blank")}else this.$router.push(t),this.$emit("close")},deleteScript:function(i){this.$dialog.confirm(`Are you sure you want to stop script: ${i.name} ${i.filename}?
3
- `,{okText:"Stop",cancelText:"Cancel"}).then(t=>V.li.post(`/script-api/running-script/${i.name}/delete`)).then(t=>{this.$notify.normal({body:`Stopped script: ${i.name} ${i.filename}`}),this.getRunningScripts()}).catch(t=>{t!==!0&&this.$notify.caution({body:`Failed to stop script: ${i.name} ${i.filename}`})})},viewScriptLog:function(i,t){let s=null;t==="report"?(this.dialogName="Report",s=i.report):(this.dialogName="Log",s=i.log),V.li.get(`/openc3-api/storage/download_file/${encodeURIComponent(s)}?bucket=OPENC3_LOGS_BUCKET`).then(r=>{const o=s.split("/");this.dialogFilename=o[o.length-1],this.dialogContent=window.atob(r.data.contents),this.showDialog=!0})},downloadScriptLog:function(i,t,s="text"){let r=null;t==="report"?(this.dialogName="Report",r=i.report):(this.dialogName="Log",r=i.log),this.downloadScript=i,s==="ctrf"&&t==="report"?V.li.get(`/openc3-api/storage/download_file/${encodeURIComponent(r)}?bucket=OPENC3_LOGS_BUCKET&format=ctrf`).then(o=>{const n=new Blob([window.atob(o.data.contents)],{type:"application/json"}),a=document.createElement("a");a.href=URL.createObjectURL(n),a.setAttribute("download",o.data.filename),a.click(),this.downloadScript=null}).catch(()=>{this.$notify.caution({title:`Unable to download log ${r}`,body:`You may be able to download this log manually from the 'logs' bucket at ${r}`}),this.downloadScript=null}):V.li.get(`/openc3-api/storage/download/${encodeURIComponent(r)}?bucket=OPENC3_LOGS_BUCKET`).then(o=>{const n=r.split("/"),a=n[n.length-1],p=document.createElement("a");p.href=o.data.url,p.setAttribute("download",a),p.click(),this.downloadScript=null}).catch(()=>{this.$notify.caution({title:`Unable to download log ${r}`,body:`You may be able to download this log manually from the 'logs' bucket at ${r}`}),this.downloadScript=null})}}},Te={key:0},Be={key:1};function Re(i,t,s,r,o,n){const a=e.resolveComponent("v-tab"),p=e.resolveComponent("v-tabs"),c=e.resolveComponent("v-spacer"),g=e.resolveComponent("v-btn"),_=e.resolveComponent("v-text-field"),C=e.resolveComponent("v-row"),v=e.resolveComponent("v-card-title"),x=e.resolveComponent("v-icon"),k=e.resolveComponent("v-data-table-server"),S=e.resolveComponent("v-window-item"),w=e.resolveComponent("v-list-item-title"),T=e.resolveComponent("v-list-item"),B=e.resolveComponent("v-list"),E=e.resolveComponent("v-menu"),R=e.resolveComponent("v-window"),M=e.resolveComponent("v-card"),H=e.resolveComponent("output-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(M,{flat:"",class:"tab-card"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:o.activeTab,"onUpdate:modelValue":t[0]||(t[0]=N=>o.activeTab=N),"bg-color":"var(--color-background-base-default)"},{default:e.withCtx(()=>[e.createVNode(a,{value:"running"},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("Running Scripts",-1)])]),_:1}),e.createVNode(a,{value:"completed"},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode("Completed Scripts",-1)])]),_:1})]),_:1},8,["modelValue"]),e.createVNode(R,{modelValue:o.activeTab,"onUpdate:modelValue":t[3]||(t[3]=N=>o.activeTab=N)},{default:e.withCtx(()=>[e.createVNode(S,{value:"running"},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(C,{dense:""},{default:e.withCtx(()=>[e.createVNode(c),e.createVNode(g,{class:"mr-3",color:"primary",onClick:n.getRunningScripts},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode("Refresh",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{modelValue:o.runningSearch,"onUpdate:modelValue":t[1]||(t[1]=N=>o.runningSearch=N),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"running-search",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(k,{headers:o.runningHeaders,items:o.runningScripts,"items-length":o.runningTotal,loading:o.runningLoading,search:o.runningSearch,density:"compact","data-test":"running-scripts","items-per-page":o.runningItemsPerPage,page:o.runningPage,"items-per-page-options":[10,25,50],class:"script-table","onUpdate:page":n.updateRunningPage,"onUpdate:itemsPerPage":n.updateRunningItemsPerPage},{"item.name":e.withCtx(({item:N})=>[e.createVNode(g,{color:"primary",density:"comfortable",onClick:D=>n.showScript(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.name),1)]),_:2},1032,["onClick"])]),"item.connect":e.withCtx(({item:N})=>[e.createVNode(g,{color:"primary",onClick:D=>n.connectScript(N)},{default:e.withCtx(()=>[t[10]||(t[10]=e.createElementVNode("span",null,"Connect",-1)),e.withDirectives(e.createVNode(x,{end:""},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createTextVNode(" mdi-open-in-new ",-1)])]),_:1},512),[[e.vShow,s.connectInNewTab]])]),_:1},8,["onClick"])]),"item.stop":e.withCtx(({item:N})=>[e.createVNode(g,{color:"primary",onClick:D=>n.deleteScript(N)},{default:e.withCtx(()=>[t[12]||(t[12]=e.createElementVNode("span",null,"Stop",-1)),e.createVNode(x,{end:""},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createTextVNode(" mdi-close-circle-outline ",-1)])]),_:1})]),_:1},8,["onClick"])]),_:1},8,["headers","items","items-length","loading","search","items-per-page","page","onUpdate:page","onUpdate:itemsPerPage"])]),_:1}),e.createVNode(S,{value:"completed"},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(C,{dense:""},{default:e.withCtx(()=>[e.createVNode(c),e.createVNode(g,{class:"mr-3",color:"primary",onClick:n.getCompletedScripts},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("Refresh",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{modelValue:o.completedSearch,"onUpdate:modelValue":t[2]||(t[2]=N=>o.completedSearch=N),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(k,{headers:o.completedHeaders,items:o.completedScripts,"items-length":o.completedTotal,loading:o.completedLoading,search:o.completedSearch,density:"compact","data-test":"completed-scripts","items-per-page":o.completedItemsPerPage,page:o.completedPage,"items-per-page-options":[10,25,50],class:"script-table","onUpdate:page":n.updateCompletedPage,"onUpdate:itemsPerPage":n.updateCompletedItemsPerPage},{"item.name":e.withCtx(({item:N})=>[e.createVNode(g,{color:"primary",density:"comfortable",onClick:D=>n.showScript(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.name),1)]),_:2},1032,["onClick"])]),"item.log":e.withCtx(({item:N})=>[e.createVNode(g,{color:"primary",density:"comfortable",icon:"mdi-eye",onClick:D=>n.viewScriptLog(N,"log")},null,8,["onClick"]),e.createVNode(g,{color:"primary",density:"comfortable",icon:"mdi-file-download-outline",disabled:o.downloadScript,loading:o.downloadScript&&o.downloadScript.name===N.name,onClick:D=>n.downloadScriptLog(N,"log")},null,8,["disabled","loading","onClick"])]),"item.report":e.withCtx(({item:N})=>[N.report?(e.openBlock(),e.createElementBlock("div",Be,[e.createVNode(g,{color:"primary",density:"comfortable",icon:"mdi-eye",onClick:D=>n.viewScriptLog(N,"report")},null,8,["onClick"]),e.createVNode(E,null,{activator:e.withCtx(({props:D})=>[e.createVNode(g,e.mergeProps({color:"primary",density:"comfortable",icon:"mdi-file-download-outline",disabled:o.downloadScript,loading:o.downloadScript&&o.downloadScript.name===N.name},D),null,16,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(()=>[e.createVNode(T,{onClick:D=>n.downloadScriptLog(N,"report","text")},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode("Download as Text",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(T,{onClick:D=>n.downloadScriptLog(N,"report","ctrf")},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[...t[16]||(t[16]=[e.createTextVNode("Download as CTRF",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)])):(e.openBlock(),e.createElementBlock("div",Te,[...t[14]||(t[14]=[e.createElementVNode("span",null,"N/A",-1)])]))]),_:1},8,["headers","items","items-length","loading","search","items-per-page","page","onUpdate:page","onUpdate:itemsPerPage"])]),_:1})]),_:1},8,["modelValue"])]),_:1}),o.showDialog?(e.openBlock(),e.createBlock(H,{key:0,modelValue:o.showDialog,"onUpdate:modelValue":t[4]||(t[4]=N=>o.showDialog=N),content:o.dialogContent,type:"Script",name:o.dialogName,filename:o.dialogFilename,onSubmit:t[5]||(t[5]=N=>o.showDialog=!1)},null,8,["modelValue","content","name","filename"])):e.createCommentVNode("",!0)])}const he=L._export_sfc(Ee,[["render",Re]]),Oe={props:{modelValue:{type:Array,required:!0}},emits:["sort","update:modelValue"],data(){return{search:"",headers:[{title:"Message",value:"message",sortable:!1}],messageOrderOptions:["Newest on Top","Newest on Bottom"],messageOrder:"Newest on Top"}},computed:{messages:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},watch:{messageOrder:function(i,t){this.$emit("sort",i)}},methods:{messageClass(i){return i.match(/(CHECK|WAIT): .*(success|was within range.*) with value/)?"openc3-green":i.match(/(CHECK|WAIT): .*(failed|failed to be within range.*) with value/)?"openc3-red":""},downloadLog(){const i=this.messages.map(r=>r.message).join(`
4
- `),t=new Blob([i],{type:"text/plain"}),s=document.createElement("a");s.href=URL.createObjectURL(t),s.setAttribute("download",$.format(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_sr_message_log.txt"),s.click()},clearLog:function(){this.$dialog.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}).then(i=>{this.messages=[]}).catch(function(i){})}}};function Me(i,t,s,r,o,n){const a=e.resolveComponent("v-btn"),p=e.resolveComponent("v-spacer"),c=e.resolveComponent("v-select"),g=e.resolveComponent("v-text-field"),_=e.resolveComponent("v-card-title"),C=e.resolveComponent("v-data-table"),v=e.resolveComponent("v-card-text"),x=e.resolveComponent("v-card");return e.openBlock(),e.createBlock(x,{class:"d-flex flex-column h-100"},{default:e.withCtx(()=>[e.createVNode(_,{class:"d-flex align-center"},{default:e.withCtx(()=>[e.createVNode(a,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-log","aria-label":"Download Log",onClick:n.downloadLog},null,8,["onClick"]),t[2]||(t[2]=e.createTextVNode(" Script Messages ",-1)),e.createVNode(p),e.createVNode(c,{modelValue:o.messageOrder,"onUpdate:modelValue":t[0]||(t[0]=k=>o.messageOrder=k),density:"compact","hide-details":"",variant:"outlined",items:o.messageOrderOptions,class:"mr-2",style:{"max-width":"200px"},"data-test":"message-order"},null,8,["modelValue","items"]),e.createVNode(p),e.createVNode(g,{modelValue:o.search,"onUpdate:modelValue":t[1]||(t[1]=k=>o.search=k),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search","data-test":"search-messages"},null,8,["modelValue"]),e.createVNode(a,{class:"mx-2",icon:"mdi-delete-sweep",variant:"text",density:"compact","data-test":"clear-log","aria-label":"Clear Log",onClick:n.clearLog},null,8,["onClick"])]),_:1}),e.createVNode(v,{class:"overflow-auto"},{default:e.withCtx(()=>[e.createVNode(C,{id:"script-log-messages",headers:o.headers,items:n.messages,search:o.search,"items-per-page":-1,"hide-default-footer":"",density:"compact","data-test":"output-messages"},{"item.message":e.withCtx(({item:k})=>[e.createElementVNode("div",{class:e.normalizeClass(n.messageClass(k.message))},e.toDisplayString(k.message),3)]),_:1},8,["headers","items","search"])]),_:1})]),_:1})}const fe=L._export_sfc(Oe,[["render",Me]]),De={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(i,{emit:t}){const s=t,r=i,o=e.useSlots(),n=e.ref([]),a=e.computed(()=>n.value.reduce((l,u)=>(l[~~u.id]=u)&&l,{})),p=e.computed(()=>n.value.length),c=e.ref(null),g=e.ref(!1),_=e.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),C=e.ref({splitter:null,timeoutId:null}),v=e.computed(()=>({[`splitpanes splitpanes--${r.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":_.value.dragging})),x=()=>{document.addEventListener("mousemove",w,{passive:!1}),document.addEventListener("mouseup",T),"ontouchstart"in window&&(document.addEventListener("touchmove",w,{passive:!1}),document.addEventListener("touchend",T))},k=()=>{document.removeEventListener("mousemove",w,{passive:!1}),document.removeEventListener("mouseup",T),"ontouchstart"in window&&(document.removeEventListener("touchmove",w,{passive:!1}),document.removeEventListener("touchend",T))},S=(l,u)=>{const f=l.target.closest(".splitpanes__splitter");if(f){const{left:m,top:h}=f.getBoundingClientRect(),{clientX:b,clientY:y}="ontouchstart"in window&&l.touches?l.touches[0]:l;_.value.cursorOffset=r.horizontal?y-h:b-m}x(),_.value.mouseDown=!0,_.value.activeSplitter=u},w=l=>{_.value.mouseDown&&(l.preventDefault(),_.value.dragging=!0,requestAnimationFrame(()=>{N(M(l)),I("resize",{event:l},!0)}))},T=l=>{_.value.dragging&&(window.getSelection().removeAllRanges(),I("resized",{event:l},!0)),_.value.mouseDown=!1,_.value.activeSplitter=null,setTimeout(()=>{_.value.dragging=!1,k()},100)},B=(l,u)=>{"ontouchstart"in window&&(l.preventDefault(),C.value.splitter===u?(clearTimeout(C.value.timeoutId),C.value.timeoutId=null,E(l,u),C.value.splitter=null):(C.value.splitter=u,C.value.timeoutId=setTimeout(()=>C.value.splitter=null,500))),_.value.dragging||I("splitter-click",{event:l,index:u},!0)},E=(l,u)=>{if(I("splitter-dblclick",{event:l,index:u},!0),r.maximizePanes){let f=0;n.value=n.value.map((m,h)=>(m.size=h===u?m.max:m.min,h!==u&&(f+=m.min),m)),n.value[u].size-=f,I("pane-maximize",{event:l,index:u,pane:n.value[u]}),I("resized",{event:l,index:u},!0)}},R=(l,u)=>{I("pane-click",{event:l,index:a.value[u].index,pane:a.value[u]})},M=l=>{const u=c.value.getBoundingClientRect(),{clientX:f,clientY:m}="ontouchstart"in window&&l.touches?l.touches[0]:l;return{x:f-(r.horizontal?0:_.value.cursorOffset)-u.left,y:m-(r.horizontal?_.value.cursorOffset:0)-u.top}},H=l=>{l=l[r.horizontal?"y":"x"];const u=c.value[r.horizontal?"clientHeight":"clientWidth"];return r.rtl&&!r.horizontal&&(l=u-l),l*100/u},N=l=>{const u=_.value.activeSplitter;let f={prevPanesSize:G(u),nextPanesSize:A(u),prevReachedMinPanes:0,nextReachedMinPanes:0};const m=0+(r.pushOtherPanes?0:f.prevPanesSize),h=100-(r.pushOtherPanes?0:f.nextPanesSize),b=Math.max(Math.min(H(l),h),m);let y=[u,u+1],O=n.value[y[0]]||null,U=n.value[y[1]]||null;const d=O.max<100&&b>=O.max+f.prevPanesSize,P=U.max<100&&b<=100-(U.max+A(u+1));if(d||P){d?(O.size=O.max,U.size=Math.max(100-O.max-f.prevPanesSize-f.nextPanesSize,0)):(O.size=Math.max(100-U.max-f.prevPanesSize-A(u+1),0),U.size=U.max);return}if(r.pushOtherPanes){const de=D(f,b);if(!de)return;({sums:f,panesToResize:y}=de),O=n.value[y[0]]||null,U=n.value[y[1]]||null}O!==null&&(O.size=Math.min(Math.max(b-f.prevPanesSize-f.prevReachedMinPanes,O.min),O.max)),U!==null&&(U.size=Math.min(Math.max(100-b-f.nextPanesSize-f.nextReachedMinPanes,U.min),U.max))},D=(l,u)=>{const f=_.value.activeSplitter,m=[f,f+1];return u<l.prevPanesSize+n.value[m[0]].min&&(m[0]=ee(f).index,l.prevReachedMinPanes=0,m[0]<f&&n.value.forEach((h,b)=>{b>m[0]&&b<=f&&(h.size=h.min,l.prevReachedMinPanes+=h.min)}),l.prevPanesSize=G(m[0]),m[0]===void 0)?(l.prevReachedMinPanes=0,n.value[0].size=n.value[0].min,n.value.forEach((h,b)=>{b>0&&b<=f&&(h.size=h.min,l.prevReachedMinPanes+=h.min)}),n.value[m[1]].size=100-l.prevReachedMinPanes-n.value[0].min-l.prevPanesSize-l.nextPanesSize,null):u>100-l.nextPanesSize-n.value[m[1]].min&&(m[1]=Z(f).index,l.nextReachedMinPanes=0,m[1]>f+1&&n.value.forEach((h,b)=>{b>f&&b<m[1]&&(h.size=h.min,l.nextReachedMinPanes+=h.min)}),l.nextPanesSize=A(m[1]-1),m[1]===void 0)?(l.nextReachedMinPanes=0,n.value.forEach((h,b)=>{b<p.value-1&&b>=f+1&&(h.size=h.min,l.nextReachedMinPanes+=h.min)}),n.value[m[0]].size=100-l.prevPanesSize-A(m[0]-1),null):{sums:l,panesToResize:m}},G=l=>n.value.reduce((u,f,m)=>u+(m<l?f.size:0),0),A=l=>n.value.reduce((u,f,m)=>u+(m>l+1?f.size:0),0),ee=l=>[...n.value].reverse().find(u=>u.index<l&&u.size>u.min)||{},Z=l=>n.value.find(u=>u.index>l+1&&u.size>u.min)||{},te=()=>{var l;const u=Array.from(((l=c.value)==null?void 0:l.children)||[]);for(const f of u){const m=f.classList.contains("splitpanes__pane"),h=f.classList.contains("splitpanes__splitter");!m&&!h&&(f.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},K=(l,u,f=!1)=>{const m=l-1,h=document.createElement("div");h.classList.add("splitpanes__splitter"),f||(h.onmousedown=b=>S(b,m),typeof window<"u"&&"ontouchstart"in window&&(h.ontouchstart=b=>S(b,m)),h.onclick=b=>B(b,m+1)),h.ondblclick=b=>E(b,m+1),u.parentNode.insertBefore(h,u)},X=l=>{l.onmousedown=void 0,l.onclick=void 0,l.ondblclick=void 0,l.remove()},q=()=>{var l;const u=Array.from(((l=c.value)==null?void 0:l.children)||[]);for(const m of u)m.className.includes("splitpanes__splitter")&&X(m);let f=0;for(const m of u)m.className.includes("splitpanes__pane")&&(!f&&r.firstSplitter?K(f,m,!0):f&&K(f,m),f++)},Q=({uid:l,...u})=>{const f=a.value[l];for(const[m,h]of Object.entries(u))f[m]=h},ie=l=>{var u;let f=-1;Array.from(((u=c.value)==null?void 0:u.children)||[]).some(m=>(m.className.includes("splitpanes__pane")&&f++,m.isSameNode(l.el))),n.value.splice(f,0,{...l,index:f}),n.value.forEach((m,h)=>m.index=h),g.value&&e.nextTick(()=>{q(),j({addedPane:n.value[f]}),I("pane-add",{pane:n.value[f]})})},oe=l=>{const u=n.value.findIndex(m=>m.id===l);n.value[u].el=null;const f=n.value.splice(u,1)[0];n.value.forEach((m,h)=>m.index=h),e.nextTick(()=>{q(),I("pane-remove",{pane:f}),j({removedPane:{...f}})})},j=(l={})=>{!l.addedPane&&!l.removedPane?se():n.value.some(u=>u.givenSize!==null||u.min||u.max<100)?re(l):ne(),g.value&&I("resized")},ne=()=>{const l=100/p.value;let u=0;const f=[],m=[];for(const h of n.value)h.size=Math.max(Math.min(l,h.max),h.min),u-=h.size,h.size>=h.max&&f.push(h.id),h.size<=h.min&&m.push(h.id);u>.1&&W(u,f,m)},se=()=>{let l=100;const u=[],f=[];let m=0;for(const b of n.value)l-=b.size,b.givenSize!==null&&m++,b.size>=b.max&&u.push(b.id),b.size<=b.min&&f.push(b.id);let h=100;if(l>.1){for(const b of n.value)b.givenSize===null&&(b.size=Math.max(Math.min(l/(p.value-m),b.max),b.min)),h-=b.size;h>.1&&W(h,u,f)}},re=({addedPane:l,removedPane:u}={})=>{let f=100/p.value,m=0;const h=[],b=[];(l?.givenSize??null)!==null&&(f=(100-l.givenSize)/(p.value-1));for(const y of n.value)m-=y.size,y.size>=y.max&&h.push(y.id),y.size<=y.min&&b.push(y.id);if(!(Math.abs(m)<.1)){for(const y of n.value)l?.givenSize!==null&&l?.id===y.id||(y.size=Math.max(Math.min(f,y.max),y.min)),m-=y.size,y.size>=y.max&&h.push(y.id),y.size<=y.min&&b.push(y.id);m>.1&&W(m,h,b)}},W=(l,u,f)=>{let m;l>0?m=l/(p.value-u.length):m=l/(p.value-f.length),n.value.forEach((h,b)=>{if(l>0&&!u.includes(h.id)){const y=Math.max(Math.min(h.size+m,h.max),h.min),O=y-h.size;l-=O,h.size=y}else if(!f.includes(h.id)){const y=Math.max(Math.min(h.size+m,h.max),h.min),O=y-h.size;l-=O,h.size=y}}),Math.abs(l)>.1&&e.nextTick(()=>{g.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},I=(l,u=void 0,f=!1)=>{const m=u?.index??_.value.activeSplitter??null;s(l,{...u,...m!==null&&{index:m},...f&&m!==null&&{prevPane:n.value[m-(r.firstSplitter?1:0)],nextPane:n.value[m+(r.firstSplitter?0:1)]},panes:n.value.map(h=>({min:h.min,max:h.max,size:h.size}))})};e.watch(()=>r.firstSplitter,()=>q()),e.onMounted(()=>{te(),q(),j(),I("ready"),g.value=!0}),e.onBeforeUnmount(()=>g.value=!1);const le=()=>{var l;return e.h("div",{ref:c,class:v.value},(l=o.default)==null?void 0:l.call(o))};return e.provide("panes",n),e.provide("indexedPanes",a),e.provide("horizontal",e.computed(()=>r.horizontal)),e.provide("requestUpdate",Q),e.provide("onPaneAdd",ie),e.provide("onPaneRemove",oe),e.provide("onPaneClick",R),(l,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le)))}},Ie={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(i){var t;const s=i,r=e.inject("requestUpdate"),o=e.inject("onPaneAdd"),n=e.inject("horizontal"),a=e.inject("onPaneRemove"),p=e.inject("onPaneClick"),c=(t=e.getCurrentInstance())==null?void 0:t.uid,g=e.inject("indexedPanes"),_=e.computed(()=>g.value[c]),C=e.ref(null),v=e.computed(()=>{const w=isNaN(s.size)||s.size===void 0?0:parseFloat(s.size);return Math.max(Math.min(w,k.value),x.value)}),x=e.computed(()=>{const w=parseFloat(s.minSize);return isNaN(w)?0:w}),k=e.computed(()=>{const w=parseFloat(s.maxSize);return isNaN(w)?100:w}),S=e.computed(()=>{var w;return`${n.value?"height":"width"}: ${(w=_.value)==null?void 0:w.size}%`});return e.watch(()=>v.value,w=>r({uid:c,size:w})),e.watch(()=>x.value,w=>r({uid:c,min:w})),e.watch(()=>k.value,w=>r({uid:c,max:w})),e.onMounted(()=>{o({id:c,el:C.value,min:x.value,max:k.value,givenSize:s.size===void 0?null:v.value,size:v.value})}),e.onBeforeUnmount(()=>a(c)),(w,T)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"paneEl",ref:C,class:"splitpanes__pane",onClick:T[0]||(T[0]=B=>e.unref(p)(B,w._.uid)),style:e.normalizeStyle(S.value)},[e.renderSlot(w.$slots,"default")],4))}},Ue={props:{question:{type:String,required:!0},default:{type:String,default:null},password:{type:Boolean,default:!1},answerRequired:{type:Boolean,default:!0},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{inputValue:"",valid:!1,rules:[i=>!!i||"Required"]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},created(){this.default&&(this.valid=!0,this.inputValue=this.default),this.answerRequired===!1&&(this.valid=!0,this.rules=[i=>!0])},methods:{submitHandler:function(){this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","Cancel")}}},Pe={class:"pa-2"},ze={class:"question"};function Le(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-text-field"),g=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-btn"),C=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-form"),x=e.resolveComponent("v-card"),k=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(k,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=S=>n.show=S),persistent:"",width:"600",onKeydown:e.withKeys(n.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(v,{modelValue:o.valid,"onUpdate:modelValue":t[1]||(t[1]=S=>o.valid=S),onSubmit:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),t[3]||(t[3]=e.createElementVNode("span",null," User Input Required ",-1)),e.createVNode(a)]),_:1}),e.createElementVNode("div",Pe,[e.createVNode(g,null,{default:e.withCtx(()=>[e.createElementVNode("div",ze,e.toDisplayString(s.question),1),e.createVNode(c,{modelValue:o.inputValue,"onUpdate:modelValue":t[0]||(t[0]=S=>o.inputValue=S),autofocus:"","data-test":"ask-value-input",type:s.password?"password":"text",rules:o.rules},null,8,["modelValue","type","rules"])]),_:1})]),e.createVNode(C,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(_,{variant:"outlined","data-test":"ask-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{variant:"flat",type:"submit","data-test":"ask-ok",disabled:!o.valid,onClick:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue","onKeydown"])}const Fe=L._export_sfc(Ue,[["render",Le],["__scopeId","data-v-47105fc8"]]),Ae={props:{title:{type:String,required:!0},message:{type:String,default:null},filter:{type:String,default:"*"},multiple:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{inputValue:null,valid:null,rules:[i=>this.multiple?i.length!=0||"Required":!!i||"Required"]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},methods:{submitHandler:function(){Array.isArray(this.inputValue)||(this.inputValue=[this.inputValue]),this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","Cancel")}}},He={class:"pa-2"},qe={class:"text-h6"},Ge=["textContent"];function Ke(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-row"),g=e.resolveComponent("v-file-input"),_=e.resolveComponent("v-card-text"),C=e.resolveComponent("v-btn"),v=e.resolveComponent("v-card-actions"),x=e.resolveComponent("v-form"),k=e.resolveComponent("v-card"),S=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(S,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=w=>n.show=w),persistent:"",width:"600",onKeydown:e.withKeys(n.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(x,{modelValue:o.valid,"onUpdate:modelValue":t[1]||(t[1]=w=>o.valid=w),onSubmit:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),t[3]||(t[3]=e.createElementVNode("span",null," File Dialog ",-1)),e.createVNode(a)]),_:1}),e.createElementVNode("div",He,[e.createVNode(_,null,{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createElementVNode("span",qe,e.toDisplayString(s.title),1)]),_:1}),s.message?(e.openBlock(),e.createBlock(c,{key:0},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"ma-3",style:{"white-space":"pre-line"},textContent:e.toDisplayString(s.message)},null,8,Ge)]),_:1})):e.createCommentVNode("",!0),e.createVNode(c,{class:"my-1"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:o.inputValue,"onUpdate:modelValue":t[0]||(t[0]=w=>o.inputValue=w),label:"Choose File",rules:o.rules,autofocus:"","data-test":"file-input",accept:s.filter,"small-chips":"",multiple:s.multiple},null,8,["modelValue","rules","accept","multiple"])]),_:1})]),_:1})]),e.createVNode(v,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(C,{variant:"outlined","data-test":"file-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(C,{variant:"flat",type:"submit","data-test":"file-ok",disabled:!o.valid,onClick:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue","onKeydown"])}const je=L._export_sfc(Ae,[["render",Ke],["__scopeId","data-v-c5884e8c"]]),We={props:{modelValue:{type:Boolean,required:!0},title:{type:String,required:!0},text:{type:String,required:!0},width:{type:String,required:!0}},emits:["update:modelValue"],computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},methods:{}},Je=["textContent"],Ye={class:"pa-2"},Ze=["textContent"];function Xe(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-row"),g=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-btn"),C=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-card"),x=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(x,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=k=>n.show=k),width:s.width},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),e.createElementVNode("span",{style:{"white-space":"pre"},textContent:e.toDisplayString(s.title)},null,8,Je),e.createVNode(a)]),_:1}),e.createElementVNode("div",Ye,[e.createVNode(g,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.text,(k,S)=>(e.openBlock(),e.createBlock(c,{key:S,"no-gutters":""},{default:e.withCtx(()=>[e.createElementVNode("span",{style:{"white-space":"pre"},textContent:e.toDisplayString(k)},null,8,Ze)]),_:2},1024))),128))]),_:1})]),e.createVNode(C,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(_,{variant:"flat",onClick:t[0]||(t[0]=k=>n.show=!n.show)},{default:e.withCtx(()=>[...t[2]||(t[2]=[e.createTextVNode(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}const Qe=L._export_sfc(We,[["render",Xe]]),$e={components:{},props:{modelValue:{type:Boolean,required:!0}},emits:["update:modelValue"],data(){return{api:null,overrides:[],search:"",headers:[{text:"Target",value:"target_name"},{text:"Packet",value:"packet_name"},{text:"Item",value:"item_name"},{text:"Type",value:"value_type"},{text:"Value",value:"value"},{text:"Delete",value:"delete"}]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},created:function(){this.api=new V.pi,this.getOverrides()},methods:{getOverrides:function(){this.api.get_overrides().then(i=>{this.overrides=i})},clearOverrides:function(){const i=[...new Map(this.overrides.map(t=>[`${t.target_name}__${t.packet_name}__${t.item_name}`,t])).values()];for(let t of i)this.api.normalize_tlm(t.target_name,t.packet_name,t.item_name,"ALL").then(s=>{this.overrides=[]})},deleteOverride:function(i){this.api.normalize_tlm(i.target_name,i.packet_name,i.item_name,i.value_type).then(t=>{let s=this.overrides.indexOf(i);this.overrides.splice(s,1)})}}},et={class:"pa-2"};function tt(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-btn"),g=e.resolveComponent("v-text-field"),_=e.resolveComponent("v-row"),C=e.resolveComponent("v-data-table"),v=e.resolveComponent("v-card-text"),x=e.resolveComponent("v-card-actions"),k=e.resolveComponent("v-card"),S=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(S,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=w=>n.show=w),width:"1000"},{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),t[3]||(t[3]=e.createElementVNode("span",null,"Overrides",-1)),e.createVNode(a)]),_:1}),e.createElementVNode("div",et,[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(_,{class:"ma-1"},{default:e.withCtx(()=>[e.createVNode(c,{color:"primary","data-test":"overrides-dialog-clear-all",onClick:n.clearOverrides},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Clear All Overrides ",-1)])]),_:1},8,["onClick"]),e.createVNode(a),e.createVNode(g,{modelValue:o.search,"onUpdate:modelValue":t[0]||(t[0]=w=>o.search=w),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1}),e.createVNode(C,{headers:o.headers,items:o.overrides,search:o.search,"items-per-page-options":[100],"multi-sort":"",density:"compact"},{"item.delete":e.withCtx(({item:w})=>[e.createVNode(c,{icon:"mdi-delete",variant:"text","aria-label":"Delete Override",onClick:T=>n.deleteOverride(w)},null,8,["onClick"])]),_:1},8,["headers","items","search"])]),_:1})]),e.createVNode(x,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(c,{variant:"flat","data-test":"overrides-dialog-ok",onClick:t[1]||(t[1]=w=>n.show=!n.show)},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const it=L._export_sfc($e,[["render",tt]]),ot={props:{title:{type:String,default:"Prompt Dialog"},subtitle:{type:String,default:""},message:{type:String,required:!0},details:{type:String,default:""},buttons:{type:Array,default:()=>[]},layout:{type:String,default:"horizontal"},multiple:{type:Boolean,default:!1,required:!1},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{selectOkDisabled:!0,selectedItem:null}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}},layoutClass(){let i="px-2 d-flex align-start";return this.layout==="vertical"?`${i} flex-column prompt-buttons-vertical`:`${i} flex-row flex-wrap prompt-buttons-horizontal`}},methods:{submitWrapper:function(i){this.selectedItem=i,this.submitHandler()},submitHandler:function(){this.$emit("response",this.selectedItem)},cancelHandler:function(){this.$emit("response","Cancel")}}},nt=["textContent"],st={class:"pa-2",style:{"max-height":"60vh",overflow:"auto"}},rt=["textContent"],lt=["textContent"],at={key:0},dt={key:1};function ct(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-card-subtitle"),g=e.resolveComponent("v-row"),_=e.resolveComponent("v-card-text"),C=e.resolveComponent("v-select"),v=e.resolveComponent("v-btn"),x=e.resolveComponent("v-card-actions"),k=e.resolveComponent("v-card"),S=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(S,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=w=>n.show=w),persistent:"",scrollable:"",width:"600",onKeydown:e.withKeys(n.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),e.createElementVNode("span",{class:"text",textContent:e.toDisplayString(s.title)},null,8,nt),e.createVNode(a)]),_:1}),e.createElementVNode("div",st,[e.createVNode(_,{class:"text"},{default:e.withCtx(()=>[s.subtitle?(e.openBlock(),e.createBlock(g,{key:0},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.subtitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(g,{class:"mt-1"},{default:e.withCtx(()=>[e.createElementVNode("span",{textContent:e.toDisplayString(s.message)},null,8,rt)]),_:1}),s.details?(e.openBlock(),e.createBlock(g,{key:1,class:"mt-1"},{default:e.withCtx(()=>[e.createElementVNode("span",{textContent:e.toDisplayString(s.details)},null,8,lt)]),_:1})):e.createCommentVNode("",!0)]),_:1})]),s.layout==="combo"?(e.openBlock(),e.createElementBlock("div",at,[e.createVNode(g,{class:"ma-2"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:o.selectedItem,"onUpdate:modelValue":[t[0]||(t[0]=w=>o.selectedItem=w),t[1]||(t[1]=w=>o.selectOkDisabled=!1)],label:"Select",color:"secondary",class:"ma-1","data-test":"prompt-select",items:s.buttons,multiple:s.multiple===!0},null,8,["modelValue","items","multiple"])]),_:1}),e.createVNode(x,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(v,{variant:"outlined","data-test":"prompt-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(v,{variant:"flat","data-test":"prompt-ok",disabled:o.selectOkDisabled,onClick:n.submitHandler},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})])):(e.openBlock(),e.createElementBlock("div",dt,[e.createVNode(x,{class:e.normalizeClass(n.layoutClass)},{default:e.withCtx(()=>[s.layout!=="vertical"?(e.openBlock(),e.createBlock(a,{key:0})):e.createCommentVNode("",!0),e.createVNode(v,{variant:"outlined","data-test":"prompt-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.buttons,(w,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createVNode(v,{variant:"flat","data-test":`prompt-${w.text}`,onClick:B=>n.submitWrapper(w.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.text),1)]),_:2},1032,["data-test","onClick"])]))),128))]),_:1},8,["class"])]))]),_:1})]),_:1},8,["modelValue","onKeydown"])}const ut=L._export_sfc(ot,[["render",ct],["__scopeId","data-v-186e96ad"]]),mt={components:{},props:{modelValue:{type:Boolean,required:!0},text:{type:String,required:!0}},emits:["update:modelValue"],computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},mounted(){setTimeout(()=>{this.$refs.okButton.$el.focus()})},methods:{downloadResults(){const i=new Blob([this.text],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.setAttribute("download",$.format(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_suite_results.txt"),t.click()}}},pt={class:"pa-2"};function ht(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-textarea"),g=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-btn"),C=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-card"),x=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(x,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=k=>n.show=k),scrollable:"",width:"800"},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),t[2]||(t[2]=e.createElementVNode("span",null," Script Results ",-1)),e.createVNode(a)]),_:1}),e.createElementVNode("div",pt,[e.createVNode(g,{style:{width:"100%","max-height":"80vh",overflow:"auto"}},{default:e.withCtx(()=>[e.createVNode(c,{readonly:"","hide-details":"",density:"compact","auto-grow":"","model-value":s.text},null,8,["model-value"])]),_:1})]),e.createVNode(C,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(_,{variant:"outlined",onClick:n.downloadResults},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode(" Download ",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{ref:"okButton",variant:"flat",onClick:t[0]||(t[0]=k=>n.show=!n.show)},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Ok ",-1)])]),_:1},512)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ft=L._export_sfc(mt,[["render",ht]]),gt={components:{EnvironmentChooser:pe.EnvironmentChooser},props:{modelValue:{type:Boolean,required:!0},inputEnvironment:{type:Array,required:!0}},emits:["update:modelValue","environment"],data(){return{selected:[]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},mounted:function(){this.loadEnvironment()},methods:{loadEnvironment:function(){this.selected=[...this.inputEnvironment]},updateEnvironment:function(){this.$emit("environment",this.selected),this.show=!this.show},cancel:function(){this.show=!this.show}}},vt={class:"pa-2"};function wt(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("environment-chooser"),g=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-btn"),C=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-card"),x=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(x,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=k=>n.show=k),persistent:"",width:"600",onKeydown:e.withKeys(n.cancel,["esc"])},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),t[2]||(t[2]=e.createElementVNode("span",null,"Script Environment Variables",-1)),e.createVNode(a)]),_:1}),e.createElementVNode("div",vt,[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(c,{modelValue:o.selected,"onUpdate:modelValue":t[0]||(t[0]=k=>o.selected=k)},null,8,["modelValue"])]),_:1})]),e.createVNode(C,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(_,{variant:"outlined","data-test":"environment-dialog-cancel",onClick:n.cancel},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{variant:"flat","data-test":"environment-dialog-save",disabled:!!i.inputError,onClick:n.updateEnvironment},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Save ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const _t=L._export_sfc(gt,[["render",wt]]),Ct={props:{suiteMap:{type:Object,required:!0},disableButtons:{type:Boolean,required:!0},filename:{type:String,required:!0}},emits:["button","loaded"],data(){return{suites:[],groups:[],scripts:[],suite:"",group:"",script:"",options:["pauseOnError","manual","continueAfterError"],userInfo:{}}},computed:{checkedManualTooltip(){return this.filename.endsWith(".py")?"Checked sets the RunningScript.manual variable to True":"Checked sets the $manual variable to true"},uncheckedManualTooltip(){return this.filename.endsWith(".py")?"Unchecked sets the RunningScript.manual variable to False":"Unchecked sets the $manual variable to false"},setupSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].setup)},teardownSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].teardown)},setupGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].setup)},teardownGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].teardown)},scriptNames(){return this.scripts.map(i=>({title:i.replace(/^(script_|test_)/,""),value:i}))}},watch:{suiteMap:{handler:function(i,t){this.updateSuiteMap()},deep:!0}},created(){this.userInfo=JSON.parse(localStorage.script_runner__userinfo),this.initSuites(),this.$emit("loaded")},methods:{updateSuiteMap(){this.suites=Object.keys(this.suiteMap),this.suiteMap[this.suite]==null||this.suiteMap[this.suite].groups[this.group]==null?this.initSuites():(this.groups=Object.keys(this.suiteMap[this.suite].groups),this.scripts=this.suiteMap[this.suite].groups[this.group].scripts)},initSuites(){this.suites=Object.keys(this.suiteMap),this.suiteChanged(this.suites[0])},suiteChanged(i){!i||this.suiteMap[i]==null||(this.suite=i,this.group="",this.script="",this.groups=Object.keys(this.suiteMap[i].groups),this.groupChanged(this.groups[0]))},groupChanged(i){!i||this.suiteMap[this.suite]==null||this.suiteMap[this.suite].groups[i]==null||(this.group=i,this.script="",this.scripts=this.suiteMap[this.suite].groups[i].scripts,this.scriptChanged(this.scripts[0]))},scriptChanged(i){this.script=i}}},bt={id:"tr-container"};function xt(i,t,s,r,o,n){const a=e.resolveComponent("v-checkbox"),p=e.resolveComponent("v-tooltip"),c=e.resolveComponent("v-col"),g=e.resolveComponent("v-row"),_=e.resolveComponent("v-select"),C=e.resolveComponent("v-btn");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",bt,[e.createVNode(g,{"no-gutters":"",align:"center"},{default:e.withCtx(()=>[e.createVNode(c,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[0]||(t[0]=x=>o.options=x),label:"Pause on Error",value:"pauseOnError","hide-details":"","data-test":"pause-on-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[16]||(t[16]=e.createElementVNode("span",null,[e.createTextVNode(" Checked pauses the script when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked continues without user interaction ")],-1))]),_:1})]),_:1}),e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[1]||(t[1]=x=>o.options=x),label:"Manual",value:"manual","hide-details":"","data-test":"manual"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(n.checkedManualTooltip),1),t[17]||(t[17]=e.createElementVNode("br",null,null,-1)),e.createTextVNode(" "+e.toDisplayString(n.uncheckedManualTooltip),1)])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(c,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(c,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:o.suite,"onUpdate:modelValue":[t[2]||(t[2]=v=>o.suite=v),n.suiteChanged],label:"Suite:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:o.suites,"data-test":"select-suite"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),e.createVNode(c,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(C,{color:"primary",class:"mr-2",disabled:s.disableButtons||!o.userInfo.execute,"data-test":"start-suite",onClick:t[3]||(t[3]=v=>i.$emit("button",{method:"start",suite:o.suite,options:o.options}))},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(C,{color:"primary",class:"mr-2","data-test":"setup-suite",disabled:s.disableButtons||!n.setupSuiteEnabled||!o.userInfo.execute,onClick:t[4]||(t[4]=v=>i.$emit("button",{method:"setup",suite:o.suite,options:o.options}))},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode(" Setup ",-1)])]),_:1},8,["disabled"]),e.createVNode(C,{color:"primary","data-test":"teardown-suite",disabled:s.disableButtons||!n.teardownSuiteEnabled||!o.userInfo.execute,onClick:t[5]||(t[5]=v=>i.$emit("button",{method:"teardown",suite:o.suite,options:o.options}))},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode(" Teardown ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[6]||(t[6]=x=>o.options=x),label:"Continue after Error",value:"continueAfterError","hide-details":"","data-test":"continue-after-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[21]||(t[21]=e.createElementVNode("span",null,[e.createTextVNode(" Checked allows the script to continue when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked forces the current script to end ")],-1))]),_:1})]),_:1}),e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[7]||(t[7]=x=>o.options=x),label:"Loop",value:"loop","hide-details":"","data-test":"loop"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[22]||(t[22]=e.createElementVNode("span",null,[e.createTextVNode(" Checked continuously executes until explicitly stopped"),e.createElementVNode("br"),e.createTextVNode(" Unchecked executes only the started script(s) ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(c,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(c,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:o.group,"onUpdate:modelValue":[t[8]||(t[8]=v=>o.group=v),n.groupChanged],label:"Group:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:o.groups,"data-test":"select-group"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),e.createVNode(c,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(C,{color:"primary",class:"mr-2",disabled:s.disableButtons||!o.userInfo.execute,"data-test":"start-group",onClick:t[9]||(t[9]=v=>i.$emit("button",{method:"start",suite:o.suite,group:o.group,options:o.options}))},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(C,{color:"primary",class:"mr-2","data-test":"setup-group",disabled:s.disableButtons||!n.setupGroupEnabled||!o.userInfo.execute,onClick:t[10]||(t[10]=v=>i.$emit("button",{method:"setup",suite:o.suite,group:o.group,options:o.options}))},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode(" Setup ",-1)])]),_:1},8,["disabled"]),e.createVNode(C,{color:"primary","data-test":"teardown-group",disabled:s.disableButtons||!n.teardownGroupEnabled||!o.userInfo.execute,onClick:t[11]||(t[11]=v=>i.$emit("button",{method:"teardown",suite:o.suite,group:o.group,options:o.options}))},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode(" Teardown ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[12]||(t[12]=x=>o.options=x),label:"Abort after Error",value:"abortAfterError","hide-details":"","data-test":"abort-after-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[26]||(t[26]=e.createElementVNode("span",null,[e.createTextVNode(" Checked stops additional script execution when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked allows additional scripts to execute ")],-1))]),_:1})]),_:1}),e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[13]||(t[13]=x=>o.options=x),disabled:!o.options.includes("loop"),label:"Break Loop on Error",value:"breakLoopOnError","hide-details":"","data-test":"break-loop-on-error"},null,8,["modelValue","disabled"])],16)]),default:e.withCtx(()=>[t[27]||(t[27]=e.createElementVNode("span",null,[e.createTextVNode(" Checked breaks the loop option when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked allows the loop to run continuously"),e.createElementVNode("br"),e.createTextVNode(" Note: Abort after Error still breaks the loop ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(c,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(c,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:o.script,"onUpdate:modelValue":[t[14]||(t[14]=v=>o.script=v),n.scriptChanged],label:"Script:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:n.scriptNames,"item-title":"title","item-value":"value","data-test":"select-script"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),e.createVNode(c,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(C,{color:"primary",class:"mr-2",disabled:s.disableButtons||!o.userInfo.execute,"data-test":"start-script",onClick:t[15]||(t[15]=v=>i.$emit("button",{method:"start",suite:o.suite,group:o.group,script:o.script,options:o.options}))},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(C,{color:"primary",class:"mr-2 invisible"},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode(" Setup ",-1)])]),_:1}),e.createVNode(C,{color:"primary",class:"invisible"},{default:e.withCtx(()=>[...t[30]||(t[30]=[e.createTextVNode(" Teardown ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])])}const ge=L._export_sfc(Ct,[["render",xt],["__scopeId","data-v-70eb4a37"]]);class kt{#e;#t;#i;#o;#n;constructor(t,{pattern:s,text:r,type:o}){this.#e=`regexAnnotator-${Math.floor(Math.random()*1e7)}`,this.#t=t,this.#i=s,this.#o=r,this.#n=o}refresh=()=>{const t=this.#t.session;this.#a(t);const s={lines:t.doc.$lines,action:"insert",start:{row:0},end:{row:t.doc.$lines.length}};this.annotate(s,t)};annotate=(t,s)=>{if(t.lines.length>1)switch(t.action){case"insert":this.#r(s,t.start.row,t.lines.length-1);break;case"remove":this.#r(s,t.start.row+1,-t.lines.length+1);break}for(let r=t.start.row;r<=t.end.row;r++){let o=s.doc.$lines[r]?.match(this.#i)?.index;o!==void 0?(o!==0&&(o+=1),this.#l(s,{row:r,column:o,text:this.#o,type:this.#n,openc3Id:this.#e})):t.action==="remove"&&this.#s(s,r)}};#l=(t,s)=>{this.#s(t,s.row),t.setAnnotations([...t.getAnnotations(),s])};#s=(t,s)=>{t.setAnnotations(t.getAnnotations().filter(r=>r.openc3Id!==this.#e||r.row!==s))};#r=(t,s,r)=>{t.setAnnotations(t.getAnnotations().map(o=>(o.row>s&&(o.row+=r),o)))};#a=t=>{t.setAnnotations(t.getAnnotations().filter(s=>s.openc3Id!==this.#e))}}class Vt extends kt{constructor(t){const s="(^|[{\\s])",r="sleep",o="[\\(\\s]";super(t,{pattern:new RegExp(`${s}${r}${o}`),text:"Use `wait` instead of `sleep` in OpenC3 scripts",type:"warning"})}}const ue="__TEMP__",z="<Untitled>",ae="Start",yt="Go",Y="Pause",Nt="Retry",St={components:{FileOpenSaveDialog:F.FileOpenSaveDialog,Openc3Screen:F.Openc3Screen,EnvironmentDialog:F.EnvironmentDialog,Splitpanes:De,Pane:Ie,TopBar:J.TopBar,AskDialog:Fe,FileDialog:je,InformationDialog:Qe,EventListDialog:Ve.EventListDialog,OverridesDialog:it,PromptDialog:ut,ResultsDialog:ft,ScriptEnvironmentDialog:_t,SimpleTextDialog:xe.SimpleTextDialog,SuiteRunner:ge,RunningScripts:he,ScriptLogMessages:fe,CriticalCmdDialog:be.CriticalCmdDialog,CommandEditor:pe.CommandEditor},mixins:[me.AceEditorModes,ke._sfc_main],beforeRouteUpdate:function(i,t,s){i.params.id?this.tryLoadRunningScript(i.params.id).then(s):s()},props:{inline:{type:Boolean,default:!1},body:{type:String,default:null},initialFilename:{type:String,default:null}},emits:["alert","script-id"],setup(){return{containerHeight:_e.useContainerHeight()}},data(){return{title:"Script Runner",suiteRunner:!1,disableSuiteButtons:!1,suiteMap:{},filenameSelect:null,currentFilename:null,showSave:!1,showAlert:!1,alertType:null,alertText:"",state:null,scriptId:null,startOrGoButton:ae,startOrGoDisabled:!1,envDisabled:!1,pauseOrRetryButton:Y,pauseOrRetryDisabled:!1,stopDisabled:!1,showEnvironment:!1,showDebug:!1,debug:"",debugHistory:[],debugHistoryIndex:0,showDisconnect:!1,files:{},breakpoints:{},enableStackTraces:!1,filename:z,readOnlyUser:!1,executeUser:!0,saveAllowed:!0,tempFilename:null,fileModified:"",fileOpen:!1,lockedBy:null,showEditingToast:!1,showSaveAs:!1,areYouSure:!1,subscription:null,cable:null,fatal:!1,updateInterval:null,receivedEvents:[],messages:[],messagesNewestOnTop:!0,inlineTab:"script",maxArrayLength:200,Range:ace.require("ace/range").Range,ask:{show:!1,question:"",default:null,password:!1,answerRequired:!0,callback:()=>{}},file:{show:!1,message:"",directory:null,filter:"*",multiple:!1,callback:()=>{}},prompt:{show:!1,title:"",subtitle:"",message:"",details:"",buttons:null,layout:"horizontal",callback:()=>{}},information:{show:!1,title:"",text:[],width:"600"},inputMetadata:{show:!1,events:[],callback:()=>{}},results:{show:!1,text:""},scriptEnvironment:{show:!1,env:[]},showSuiteError:!1,suiteError:"",executeSelectionMenu:!1,menuX:0,menuY:0,mnemonicChecker:new Se,showScripts:!1,showOverrides:!1,overridesCount:0,commandEditor:{show:!1,targetName:null,commandName:null,dialogError:null,cmdString:null,isEditing:!1,editLine:null},currentLineHasCommand:!1,activePromptId:"",api:null,timeZone:"local",screens:[],screenKeywords:null,idCounter:0,updateCounter:0,recent:[],waitingInterval:null,waitingTime:0,waitingStart:0,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1,editorBoxSize:50}},computed:{stateTimer:function(){return this.state==="waiting"||this.state==="paused"?`${this.state} ${this.waitingTime}s`:this.state==="completed_errors"?"completed":this.state},stateColorClass:function(){return this.state==="error"||this.state==="crashed"||this.state==="killed"?"script-state-red":this.state==="completed_errors"?"script-state-orange":this.state==="completed"?"script-state-green":""},fileList:function(){const i=Object.keys(this.files);return i.push(this.fullFilename),[...new Set(i)]},environmentModified:function(){return this.scriptEnvironment.env.length>0},isLocked:function(){return!!this.lockedBy},fullFilename:function(){return this.currentFilename?this.currentFilename:this.filename===z?z:`${this.filename} ${this.fileModified}`.trim()},filenameOrBlank:function(){return this.filename===z?"":this.filename},menus:function(){return[{label:"File",items:[{label:"New File",icon:"mdi-file-plus",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.newFileWithConfirm()}},{label:"New Suite",icon:"mdi-file-document-plus",disabled:this.scriptId||this.readOnlyUser,subMenu:[{label:"Ruby",icon:"mdi-language-ruby",command:()=>{this.newRubyTestSuite()}},{label:"Python",icon:"mdi-language-python",command:()=>{this.newPythonTestSuite()}}]},{label:"Open File",icon:"mdi-folder-open",disabled:this.scriptId,command:()=>{this.openFileWithConfirm()}},{label:"Open Recent",icon:"mdi-folder-open",disabled:this.scriptId,subMenu:this.recent},{divider:!0},{label:"Save File",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveFile()}},{label:"Save As...",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveAs()}},{divider:!0},{label:"Download",icon:"mdi-cloud-download",disabled:this.scriptId,command:()=>{this.download()}},{divider:!0},{label:"Delete File",icon:"mdi-delete",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.delete()}}]},{label:"Edit",items:[{label:"Find",icon:"mdi-magnify",command:()=>{this.editor.execCommand("find")}},{label:"Replace",icon:"mdi-find-replace",disabled:this.scriptId,command:()=>{this.editor.execCommand("replace")}},{label:"Set Line Delay",icon:"mdi-invoice-text-clock",disabled:this.scriptId,command:()=>{this.$dialog.open({title:"Info",text:"You can set the line delay in seconds using the api method set_line_delay().<br/><br/>The default line delay is 0.1 seconds between lines. Adding set_line_delay(0) to the top of your script will execute the script at maximum speed. However, this can make it difficult to see and pause the script. Executing set_line_delay(1) will cause a 1 second delay between lines.",okText:"OK",okClass:"primary",validateText:null,cancelText:null,html:!0})}}]},{label:"Script",items:[{label:"Execution Status",icon:"mdi-run",command:()=>{this.showScripts=!0}},{divider:!0},{label:"Global Environment",icon:"mdi-library",disabled:this.scriptId,command:()=>{this.showEnvironment=!this.showEnvironment}},{label:"Metadata",icon:"mdi-calendar",disabled:this.scriptId,command:()=>{this.inputMetadata.callback=()=>{},this.showMetadata()}},{label:"Overrides",icon:"mdi-swap-horizontal",command:()=>{this.showOverrides=!0}},{divider:!0},{label:"Syntax Check",icon:"mdi-file-check",disabled:this.scriptId,command:()=>{this.syntaxCheck()}},{label:"Mnemonic Check",icon:"mdi-spellcheck",disabled:this.scriptId,command:()=>{this.checkMnemonics()}},{label:"Instrumented Script",icon:"mdi-code-braces-box",disabled:this.scriptId,command:()=>{this.showInstrumented()}},{label:"Call Stack",icon:"mdi-format-list-numbered",disabled:!this.scriptId,command:()=>{this.showCallStack()}},{divider:!0},{label:"Toggle Debug",icon:"mdi-bug",command:()=>{this.toggleDebug()}},{label:"Toggle Disconnect",icon:"mdi-connection",disabled:this.scriptId,command:()=>{this.toggleDisconnect()}},{label:"Enable Stack Traces",checkbox:!0,checked:this.enableStackTraces,disabled:this.scriptId,command:()=>{this.enableStackTraces=!this.enableStackTraces}},{divider:!0},{label:"Delete All Breakpoints",icon:"mdi-delete-circle-outline",disabled:this.scriptId,command:()=>{this.deleteAllBreakpoints()}}]}]}},watch:{isLocked:function(i){this.showEditingToast=i,this.suiteRunner||(this.startOrGoDisabled=i),this.readOnlyUser==!1&&i==!1&&!this.inline?this.editor.setReadOnly(i):this.editor.setReadOnly(!0)},fullFilename:function(i){this.filenameSelect=i,this.inline||(i===z?localStorage.removeItem("script_runner__filename"):localStorage.script_runner__filename=i)},readOnlyUser:function(i){this.editor&&(i?(this.editor.setReadOnly(!0),this.editor.renderer.$cursorLayer.element.style.display="none"):(this.inline||this.editor.setReadOnly(!1),this.editor.renderer.$cursorLayer.element.style.display=null))},showOverrides:function(i,t){t&&!i&&this.updateOverridesCount()}},created:async function(){this.api=new V.pi,this.api.ensure_offline_access(),this.api.get_setting("time_zone").then(s=>{s&&(this.timeZone=s)}).catch(s=>{}),this.updateOverridesCount(),this.NEW_FILENAME=z;let i=OpenC3Auth.user(),t=OpenC3Auth.userroles();this.readOnlyUser=!0,this.executeUser=!1;for(let s of t)s!="viewer"&&(s=="admin"||s=="operator"?(this.readOnlyUser=!1,this.executeUser=!0):s=="runner"?this.executeUser=!0:await V.li.get(`/openc3-api/roles/${s}`).then(r=>{r.data!==null&&r.data.permissions!==void 0&&(r.data.permissions.some(o=>o.permission=="script_edit")&&(this.readOnlyUser=!1),r.data.permissions.some(o=>o.permission=="script_run")&&(this.executeUser=!0))}));if(this.inline||(localStorage.script_runner__userinfo=JSON.stringify({name:i.preferred_username,readOnly:this.readOnlyUser,execute:this.executeUser})),this.readOnlyUser==!0){this.alertType="info";let s=`User ${i.preferred_username} is read only`;this.executeUser&&(s+=" but can execute scripts"),this.alertText=s,this.showAlert=!0}V.li.get("/openc3-api/autocomplete/keywords/screen").then(s=>{this.screenKeywords=s.data}),this.inline&&(this.readOnly=!0)},mounted:async function(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const i=this.buildRubyMode(),t=this.buildPythonMode();this.rubyMode=new i,this.pythonMode=new t,J.AceEditorUtils.getDefaultScriptingLanguage()==="python"?this.editor.session.setMode(this.pythonMode):this.editor.session.setMode(this.rubyMode),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new F.CmdCompleter,new F.TlmCompleter],this.editor.setHighlightActiveLine(!1),J.AceEditorUtils.applyVimModeIfEnabled(this.editor,{saveFn:this.saveFile}),this.editor.focus(),this.editor.on("guttermousedown",this.toggleBreakpoint),this.editor.session.on("tokenizerUpdate",this.onChange),(this.readOnlyUser||this.inline)&&(this.editor.setReadOnly(!0),this.editor.renderer.$cursorLayer.element.style.display="none");const r=new Vt(this.editor);this.editor.session.on("change",(o,n)=>{r.annotate(o,n),this.updateBreakpoints(o,n)}),this.editor.container.addEventListener("resize",this.doResize),this.editor.container.addEventListener("keydown",this.keydown),this.cable=new V.di("/script-api/cable"),!this.inline&&localStorage.script_runner__recent&&(this.recent=JSON.parse(localStorage.script_runner__recent),this.recent=this.recent.map(o=>({...o,command:async n=>{this.filename=n.label,await this.reloadFile()}}))),this.inline?this.body&&(this.editor.setValue(this.body),this.editor.clearSelection(),this.initialFilename&&(this.filename=this.initialFilename)):this.$route.query?.file?(this.filename=this.$route.query.file,await this.reloadFile()):this.$route.params?.id?await this.tryLoadRunningScript(this.$route.params.id):(this.scriptId=sessionStorage.getItem("script_runner__script_id"),this.scriptId?await this.tryLoadRunningScript(this.scriptId):localStorage.script_runner__filename&&(this.filename=localStorage.script_runner__filename,await this.reloadFile(!1))),this.updateInterval=setInterval(async()=>{this.processReceived()},100)},beforeUnmount(){this.scriptId&&!this.inline&&sessionStorage.setItem("script_runner__script_id",this.scriptId),this.editor.destroy(),this.editor.container.remove()},unmounted(){this.unlockFile(),this.updateInterval!=null&&clearInterval(this.updateInterval),this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.cable.disconnect()},methods:{updateOverridesCount:function(){this.api.get_overrides().then(i=>{this.overridesCount=i.length})},toggleVimMode(){J.AceEditorUtils.toggleVimMode(this.editor)},openCommandEditor(){this.executeSelectionMenu=!1;const i=this.editor.getCursorPosition(),t=this.editor.session.getLine(i.row);if(this.currentLineHasCommand){const s=this.parseCommandFromLine(t);this.commandEditor.cmdString=s,this.commandEditor.isEditing=!0,this.commandEditor.editLine=i.row}else this.commandEditor.cmdString=null,this.commandEditor.isEditing=!1,this.commandEditor.editLine=null;this.commandEditor.show=!0,this.commandEditor.dialogError=null},insertCommand(i){let t="";try{t=this.$refs.commandEditor.getCmdString();let s=t.split(" ");this.commandEditor.targetName=s[0],this.commandEditor.commandName=s[1]}catch(s){this.commandEditor.dialogError=s.message||"Please fix command parameters";return}if(this.commandEditor.isEditing&&this.commandEditor.editLine!==null){const s=this.editor.session.getLine(this.commandEditor.editLine),r=s.match(/^\s*/)[0],o=s.match(/\s+#.*$/),n=o?o[0]:"",a=`${r}cmd("${t}")${n}`,p=this.Range;this.editor.session.replace(new p(this.commandEditor.editLine,0,this.commandEditor.editLine,s.length),a)}else{const s=this.editor.getCursorPosition();this.editor.session.insert(s,`cmd("${t}")
5
- `)}this.fileModified=!0,this.commandEditor.show=!1},closeCommandDialog:function(){this.commandEditor.show=!1},doResize(){this.editor.resize()},scriptDisconnect(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0},showMetadata(){V.li.get("/openc3-api/metadata").then(i=>{this.inputMetadata.events=i.data.map(t=>({name:"Metadata",start:new Date(t.start*1e3),end:new Date(t.start*1e3),color:t.color,type:t.type,timed:!0,metadata:t})),this.inputMetadata.show=!0})},messageSortOrder(i){i==="Newest on Top"&&this.messagesNewestOnTop===!1?(this.messagesNewestOnTop=!0,this.messages.reverse()):i==="Newest on Bottom"&&this.messagesNewestOnTop===!0&&(this.messagesNewestOnTop=!1,this.messages.reverse())},fileNameChanged(i){i=i.split("*")[0],this.editor.setValue(this.files[i].content),this.restoreBreakpoints(i),this.editor.clearSelection(),this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(this.files[i].lineNo-1,0,this.files[i].lineNo-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(this.files[i].lineNo)},tryLoadRunningScript:function(i){return V.li.get(`/script-api/running-script/${i}`).then(t=>{if(t.data){let s=t.data.state;s!=="completed"&&s!=="completed_errors"&&s!=="stopped"&&s!=="crashed"&&s!=="killed"?(this.filename=t.data.filename,this.tryLoadSuites(t),this.initScriptStart(),this.scriptStart(i)):(this.$notify.caution({title:`Script ${i} has already completed`,body:"Check the Completed Scripts below ..."}),this.scriptComplete(),this.showScripts=!0)}else throw new Error(`Unable to load state for running script ${i}`)}).catch(t=>{this.$notify.caution({title:`Running Script ${i} not found`,body:"Check the Completed Scripts below ..."}),this.scriptComplete(),this.showScripts=!0})},tryLoadSuites:function(i){i.data.suites&&(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(i.data.suites)),this.doResize()},showExecuteSelectionMenu:function(i){this.menuX=i.pageX,this.menuY=i.pageY;const t=this.editor.getCursorPosition(),s=this.editor.session.getLine(t.row);this.currentLineHasCommand=this.isCommandLine(s),this.executeSelectionMenu=!0},isCommandLine:function(i){const t=i.trim();return/^\s*cmd(_\w+)?\s*\(/.test(t)},parseCommandFromLine:function(i){const t=i.match(/cmd(_\w+)?\s*\(\s*["'](.+?)["']\s*\)/);return t?t[2]:null},runFromCursor:function(){const i=this.editor.getCursorPosition().row+1;this.scriptId?V.li.post(`/script-api/running-script/${this.scriptId}/executewhilepaused`,{data:{args:[this.filenameSelect,i]}}):this.start(null,null,i)},executeSelection:function(){const i=this.editor.getSelectionRange();let t=i.start.row+1,s=i.end.row+1;i.end.column===0&&(s-=1),this.scriptId?V.li.post(`/script-api/running-script/${this.scriptId}/executewhilepaused`,{data:{args:[this.filenameSelect,t,s]}}):this.start(null,null,t,s)},clearBreakpoints:function(){this.editor.session.clearBreakpoints()},toggleBreakpoint:function(i){if(!this.scriptId){const t=i.getDocumentPosition().row;i.editor.session.getBreakpoints(t,0)[t]?i.editor.session.clearBreakpoint(t):i.editor.session.setBreakpoint(t)}},updateBreakpoints:function(i,t){if(i.lines.length<=1)return;const s=this.getBreakpointRows(t).filter(n=>i.start.column===0&&n===i.start.row||n>i.start.row);let r=[],o=0;switch(i.action){case"insert":o=i.lines.length-1,s.reverse();break;case"remove":o=-i.lines.length+1,r=[...Array(i.lines.length).keys()].map(n=>n+i.start.row);break}s.forEach(n=>{t.clearBreakpoint(n),r.includes(n)||t.setBreakpoint(n+o)})},getBreakpointRows:function(i=this.editor.session){return i.getBreakpoints().map((t,s)=>t&&s).filter(Number.isInteger)},restoreBreakpoints:function(i){this.clearBreakpoints(),this.breakpoints[i]?.forEach(t=>{this.editor.session.setBreakpoint(t)})},deleteAllBreakpoints:function(){this.$dialog.confirm("Permanently delete all breakpoints for ALL scripts?",{okText:"Delete",cancelText:"Cancel"}).then(i=>V.li.delete("/script-api/breakpoints/delete/all")).then(i=>{this.clearBreakpoints()})},suiteRunnerButton(i){this.startOrGoButton===ae?this.start(i,"suiteRunner"):this.go(i,"suiteRunner")},async keydown(i){this.scriptId||this.editor.getReadOnly()===!0||(i.metaKey||i.ctrlKey)&&i.keyCode===83&&(i.shiftKey?(i.preventDefault(),this.saveAs()):(i.preventDefault(),await this.saveFile()))},onChange(i){this.scriptId||this.editor.getReadOnly()===!0||(this.editor.session.getUndoManager().canUndo()?this.fileModified="*":this.fileModified="")},checkMnemonics:function(){let i=this.filename;this.filename!==z&&(i.endsWith(".rb")||i.endsWith(".py")||V.li.post(`/script-api/scripts/${this.filename}/mnemonics`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(t=>{let s="";s+=`<strong>${t.data.title}</strong><br/><br/>`,s+=JSON.parse(t.data.description),this.$dialog.alert(s.trim(),{html:!0})})),this.mnemonicChecker.checkText(this.editor.getValue()).then(({skipped:t,problems:s})=>{let r="";if(s.length){const o=s.map(n=>`${n.lineNumber}: ${n.error}`).join("<br/>");r+=`<strong>The following lines have problems:</strong><br/>${o}<br/><br/>`}t.length&&(r+="<strong>Mnemonics with string interpolation were not checked.</strong>"),r===""&&(r="<strong>Everything looks good!</strong>"),this.$dialog.alert(r.trim(),{html:!0})})},initScriptStart(){this.disableSuiteButtons=!0,this.startOrGoDisabled=!0,this.envDisabled=!0,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0,this.state="Connecting...",this.startOrGoButton=yt,this.editor.setReadOnly(!0)},scriptStart(i){this.$emit("script-id",i),this.scriptId=i,this.cable.createSubscription("RunningScriptChannel",window.openc3Scope,{received:t=>this.received(t)},{id:this.scriptId}).then(t=>{this.subscription=t})},async scriptComplete(){this.scriptId=null,sessionStorage.removeItem("script_runner__script_id"),this.currentFilename=null,this.files={},this.subscription&&(await this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0,await this.reloadFile(),this.editor.session.getUndoManager().reset(),this.readOnlyUser==!1&&!this.inline&&this.editor.setReadOnly(!1),this.disableSuiteButtons=!1,this.startOrGoButton=ae,this.pauseOrRetryButton=Y,this.startOrGoDisabled=this.suiteRunner,this.envDisabled=!1,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0,this.updateOverridesCount()},environmentHandler:function(i){this.scriptEnvironment.env=i},startHandler:function(){this.start()},async start(i=null,t=null,s=null,r=null){this.initScriptStart(),await this.saveFile("start"),this.saveAllowed=!1;let o=this.filename;this.filename===z&&(o=this.tempFilename);let n=`/script-api/scripts/${o}/run`;this.showDisconnect&&(n+="/disconnect");let a=this.scriptEnvironment.env;this.enableStackTraces&&(a=a.concat({key:"OPENC3_FULL_BACKTRACE",value:"1"}));let p={environment:a};t&&(p.suiteRunner=i),s!==null&&(p.line_no=s),r!==null&&(p.end_line_no=r),V.li.post(n,{data:p}).then(c=>{this.scriptStart(c.data)}).catch(c=>{this.scriptComplete()})},go(){this.filenameSelect=this.currentFilename,this.fileNameChanged(this.currentFilename),V.li.post(`/script-api/running-script/${this.scriptId}/go`)},pauseOrRetry(){this.pauseOrRetryButton===Y?V.li.post(`/script-api/running-script/${this.scriptId}/pause`):(this.pauseOrRetryButton=Y,V.li.post(`/script-api/running-script/${this.scriptId}/retry`))},stop(){V.li.post(`/script-api/running-script/${this.scriptId}/stop`)},step(){V.li.post(`/script-api/running-script/${this.scriptId}/step`)},handleWaiting(){if(this.state!=="waiting"&&this.state!=="paused")this.clearWaiting();else if(this.waitingInterval!==null)return;this.waitingStart=Date.now(),this.waitingInterval=setInterval(()=>{this.waitingTime=Math.round((Date.now()-this.waitingStart)/1e3)},1e3)},clearWaiting(){this.waitingTime=0,clearInterval(this.waitingInterval),this.waitingInterval=null},processLine(i){i.filename&&i.filename!==this.currentFilename&&(this.files[i.filename]?(this.currentFilename=i.filename,this.editor.setValue(this.files[i.filename].content),this.restoreBreakpoints(i.filename),this.editor.clearSelection()):(this.files[i.filename]={content:"",lineNo:0},V.li.get(`/script-api/scripts/${i.filename}`).then(s=>{this.files[i.filename]={content:s.data.contents,lineNo:0},this.breakpoints[i.filename]=s.data.breakpoints,this.restoreBreakpoints(i.filename),this.currentFilename=null}).catch(s=>{this.files[i.filename]=null}))),this.state=i.state;const t=this.editor.session.getMarkers();switch(this.state){case"running":this.handleWaiting(),this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1,this.stopDisabled=!1,this.pauseOrRetryButton=Y,this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(i.line_no-1,0,i.line_no-1,1),"runningMarker","fullLine"),this.editor.gotoLine(i.line_no),this.files[i.filename].lineNo=i.line_no;break;case"error":this.pauseOrRetryButton=Nt;case"spawning":case"init":case"paused":case"waiting":case"breakpoint":if(this.handleWaiting(),this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1,this.stopDisabled=!1,Object.keys(t).filter(r=>t[r].clazz===`${this.state}Marker`).length===0){this.removeAllMarkers();let r=i.line_no>0?i.line_no:1;this.editor.session.addMarker(new this.Range(r-1,0,r-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(r),i.filename&&(this.files[i.filename].lineNo=r)}break;case"completed":case"completed_errors":case"stopped":case"crashed":case"killed":this.removeAllMarkers();break}},processReceived(){let i=0;for(let t of this.receivedEvents){i+=1;let s=0;switch(t.type){case"file":this.files[t.filename]={content:t.text,lineNo:0},this.breakpoints[t.filename]=t.breakpoints,this.currentFilename===t.filename&&this.restoreBreakpoints(t.filename);break;case"line":this.processLine(t);break;case"output":let r=t.line;r==null?r="":typeof r=="object"?r=JSON.stringify(r):r=String(r);for(const p of r.split(`
6
- `))p&&(this.messagesNewestOnTop?this.messages.unshift({message:p}):this.messages.push({message:p}));for(;this.messages.length>this.maxArrayLength;)this.messages.pop();break;case"script":this.handleScript(t);break;case"report":this.results.text=t.report,this.results.show=!0;break;case"complete":t.report&&(this.results.text=t.report,this.results.show=!0),this.removeAllMarkers(),this.scriptComplete();break;case"step":this.showDebug=!0;break;case"screen":let o=!1,n={};for(screen of this.screens){if(screen.target==t.target_name&&screen.screen==t.screen_name){n=screen,o=!0;break}s+=1}n.target=t.target_name,n.screen=t.screen_name,n.definition=t.definition,t.x?n.left=t.x:n.left=0,t.y?n.top=t.y:n.top=0,n.count=this.updateCounter++,o?this.screens[s]=n:(n.id=this.idCounter++,this.screens[this.screens.length]=n);break;case"clearscreen":for(screen of this.screens){if(screen.target==t.target_name&&screen.screen==t.screen_name){this.screens.splice(s,1);break}s+=1}break;case"clearallscreens":this.screens=[];break;case"downloadfile":const a=document.createElement("a");a.href=window.location.origin+t.url,a.setAttribute("download",t.filename),a.click();break;case"opentab":window.open(t.url,"_blank");break}}this.receivedEvents.splice(0,i)},received(i){this.cable.recordPing(),this.receivedEvents.push(i)},promptDialogCallback(i){this.prompt.show=!1,V.li.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.prompt.method,answer:i,prompt_id:this.activePromptId,multiple:this.prompt.multiple}})},handleScript(i){if(i.prompt_complete){this.activePromptId="",this.prompt.show=!1,this.ask.show=!1;return}switch(this.activePromptId=i.prompt_id,this.prompt.method=i.method,this.prompt.layout="horizontal",this.prompt.title="Prompt",this.prompt.subtitle="",this.prompt.details="",this.prompt.buttons=[],this.prompt.multiple=null,i.method){case"ask":case"ask_string":this.ask.default=null,this.ask.answerRequired=!0,this.ask.password=!1,this.ask.question=i.args[0],i.args[1]&&i.args[1]!==!0&&i.args[1]!==!1?this.ask.default=i.args[1].toString():i.args[1]===!0&&(this.ask.answerRequired=!1),i.args[2]===!0&&(this.ask.password=!0),this.ask.callback=t=>{this.ask.show=!1,this.ask.password?V.li.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:i.method,password:t,prompt_id:this.activePromptId}}):V.li.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:i.method,answer:t,prompt_id:this.activePromptId}})},this.ask.show=!0;break;case"prompt_for_hazardous":this.prompt.title="Hazardous Command",this.prompt.message=`Warning: Command ${i.args[0]} ${i.args[1]} is Hazardous. `,i.args[2]&&(this.prompt.message+=i.args[2]+" "),this.prompt.message+="Send?",this.prompt.buttons=[{text:"Send",value:"Send"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"prompt_for_critical_cmd":this.criticalCmdUuid=i.args[0],this.criticalCmdString=i.args[5],this.criticalCmdUser=i.args[1],this.displayCriticalCmd=!0;break;case"prompt":i.kwargs&&i.kwargs.informative&&(this.prompt.subtitle=i.kwargs.informative),i.kwargs&&i.kwargs.details&&(this.prompt.details=i.kwargs.details),this.prompt.message=i.args[0],this.prompt.buttons=[{text:"Ok",value:"Ok"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"combo_box":i.kwargs&&i.kwargs.informative&&(this.prompt.subtitle=i.kwargs.informative),i.kwargs&&i.kwargs.details&&(this.prompt.details=i.kwargs.details),i.kwargs&&i.kwargs.multiple&&(this.prompt.multiple=!0),this.prompt.message=i.args[0],i.args.slice(1).forEach(t=>{this.prompt.buttons.push({title:t,value:t})}),this.prompt.layout="combo",this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"message_box":case"vertical_message_box":i.kwargs&&i.kwargs.informative&&(this.prompt.subtitle=i.kwargs.informative),i.kwargs&&i.kwargs.details&&(this.prompt.details=i.kwargs.details),this.prompt.message=i.args[0],i.args.slice(1).forEach(t=>{this.prompt.buttons.push({text:t,value:t})}),i.method.includes("vertical")&&(this.prompt.layout="vertical"),this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"backtrace":this.information.title="Call Stack",this.information.text=i.args,this.information.show=!0,this.information.width="600";break;case"metadata_input":this.inputMetadata.callback=t=>{this.inputMetadata.show=!1,V.li.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:i.method,answer:t,prompt_id:this.activePromptId}})},this.showMetadata();break;case"open_file_dialog":case"open_files_dialog":this.file.title=i.args[0],this.file.message=i.args[1],i.kwargs&&i.kwargs.filter&&(this.file.filter=i.kwargs.filter),i.method=="open_files_dialog"&&(this.file.multiple=!0),this.file.show=!0;break}},async fileDialogCallback(i){let t="Cancel",s=[];i!="Cancel"&&(t=[],i.forEach(r=>{t.push(r.name),s.push(V.li.get(`/openc3-api/storage/upload/${encodeURIComponent(`${window.openc3Scope}/tmp/${r.name}`)}?bucket=OPENC3_CONFIG_BUCKET`).then(o=>{s.push(we.axios({...o.data,data:r}))}))})),Promise.all(s).then(r=>{V.li.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.file.multiple?"open_files_dialog":"open_file_dialog",answer:t,prompt_id:this.activePromptId}}).then(o=>{this.file.show=!1})})},setError(i){this.alertType="error",this.alertText=`Error: ${i}`,this.showAlert=!0},async confirmUnsavedChanges(){return this.fileModified==="*"?await this.$dialog.confirm("You have unsaved changes. Are you sure you want to continue?",{okText:"Continue",cancelText:"Cancel"}):!0},async newFileWithConfirm(){await this.confirmUnsavedChanges()&&this.newFile()},newFile(){this.unlockFile(),this.filename=z,this.currentFilename=null,this.tempFilename=null,this.files={},this.editor.session.setValue(""),this.saveAllowed=!0,this.fileModified="",this.suiteRunner=!1,this.startOrGoDisabled=!1,this.envDisabled=!1,this.inline||(this.$router.replace({name:"ScriptRunner"}).catch(i=>{}),document.title="Script Runner"),this.doResize()},async newRubyTestSuite(){await this.confirmUnsavedChanges()&&(this.newFile(),this.editor.session.setValue(`require 'openc3/script/suite.rb'
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-MfH160rD.cjs"),e=require("vue"),z=require("../CustomIcon-8F08upeg.cjs"),ve=require("../timeFilters-CRNRsUsb.cjs");require("../store-CiS35N-w.cjs");require("single-spa");const me=require("../OutputDialog-R3Xj3_yw.cjs"),ee=require("../format-DOZQNf-X.cjs"),we=require("../index-DqKiZufS.cjs"),_e=require("../useContainerHeight-BEd4f2Lr.cjs"),J=require("../TopBar-DzL3L4ih.cjs"),pe=require("../ScriptChooser-CI4lAYZ1.cjs"),Ce=require("../fileIcon-BduOQcTc.cjs"),be=require("../CriticalCmdDialog-BWrwpTNK.cjs"),A=require("../Openc3Screen-DoOAFAlJ.cjs"),ke=require("../SimpleTextDialog-DLdHGmmb.cjs"),xe=require("../ClassificationBanners-CHQX3t7t.cjs");require("../purify.es-4pyphLiB.cjs");const Ve=require("../EventListDialog-DO32zY2U.cjs"),ce=i=>{const t="(^|[{\\(\\s])",s="((\\s.+)|(\\(.+\\)))";return new RegExp(`${t}${i}${s}`)},ye=/\{/,Ne=/['"],\s?['"]/;class Se{constructor(){this.api=new V.yi,this.targets={},this.api.get_target_names().then(t=>{t.forEach(s=>{this.targets[s]={cmd:null,tlm:null}})}),this.cmdKeywordExpressions=[],A.getKeywords("cmd").then(t=>{this.cmdKeywordExpressions=t.data.map(ce)}),this.tlmKeywordExpressions=[],A.getKeywords("tlm").then(t=>{this.tlmKeywordExpressions=t.data.map(ce)})}async checkText(t){const{linesToCheck:s,linesToSkip:l}=t.split(`
2
+ `).reduce((n,r,m)=>{if(r=r.trim(),r.match(/^#/))return n;const d=r.match(/^([^#'"]*(?:(?:"[^"]*"|'[^']*')[^#'"]*)*)(#.*)$/),g=d?d[1].trim():r,w=this.cmdKeywordExpressions.reduce((B,R)=>B||g.match(R),null),_=this.tlmKeywordExpressions.reduce((B,R)=>B||g.match(R),null);if(!w&&!_)return n;const b=(w||_)[2];if(!b)return n;const k=b.match(/[\(\s)]/);if(!k)return n;let S=b.substring(k.index+1).replace(/\)+.*$/,"");if(S.match(ye))return n.linesToSkip.push(m+1),n;const C=!!S.match(Ne);if(!C){const B=S.match(/^['"]/);if(B){const R=B[0],M=S.indexOf(R,1);M>0&&(S=S.substring(1,M))}}const O=S.split(C?",":" ");if(O.length<2)return n;const N={target:O[0],packet:O[1]};if(_)N.item=O[2];else{const B=O.slice(2);C?N.params=B.map(R=>R.split("=>")[0]):N.params=B.filter((R,M)=>M%2)}for(const B in N)typeof N[B]=="string"?N[B]=N[B].replace(/['"]/g,"").trim():N[B]=N[B].map(R=>R.replace(/['"]/g,"").trim());return n.linesToCheck.push({line:r,mnemonic:N,lineNumber:m+1}),n},{linesToCheck:[],linesToSkip:[]}),o=await this._checkLines(s);return{skipped:l.sort(),problems:o.sort((n,r)=>n.lineNumber-r.lineNumber)}}async _checkLines(t){const s=[],l=A.groupBy(t,o=>o.mnemonic.target);for(const o in l){if(!this.targets[o]){for(const r of l[o])s.push({...r,error:`Target "${o}" does not exist.`});continue}const n=A.groupBy(l[o],r=>r.mnemonic.packet);for(const r in n)for(const m of n[r]){const d=m.mnemonic.item?"tlm":"cmd";if(!this.targets[o][d]){const w=m.mnemonic.item?"get_all_tlm":"get_all_cmds",_=await this.api[w](o);this.targets[o][d]=_.reduce((v,b)=>(v[b.packet_name]=b.items.map(k=>k.name),v),{})}const g=this.targets[o][d][r];if(!g){s.push({...m,error:`${d==="tlm"?"Packet":"Command"} "${o} ${r}" does not exist.`});continue}if(m.mnemonic.item){if(!g.some(w=>w===m.mnemonic.item)){s.push({...m,error:`Item "${o} ${r} ${m.mnemonic.item}" does not exist.`});continue}}else for(const w of m.mnemonic.params)if(!g.some(_=>_===w)){s.push({...m,error:`Command "${o} ${r}" param "${w}" does not exist.`});continue}}}return s}}const Ee={components:{OutputDialog:me.OutputDialog},mixins:[ve.TimeFilters],props:{tabId:{type:Number,default:null},curTab:{type:Number,default:null},connectInNewTab:Boolean},emits:["disconnect","close"],data(){return{api:null,timeZone:"local",activeTab:"completed",downloadScript:null,refreshTimer:null,runningSearch:"",runningScripts:[],runningTotal:0,runningLoading:!1,runningPage:1,runningItemsPerPage:10,runningHeaders:[{title:"Connect",key:"connect",sortable:!1,filterable:!1},{title:"Id",key:"name"},{title:"User",key:"user_display"},{title:"Filename",key:"filename"},{title:"Start Time",key:"start_time_formatted"},{title:"Duration",key:"duration"},{title:"State",key:"state"},{title:"Stop",key:"stop",sortable:!1,filterable:!1}],completedSearch:"",completedScripts:[],completedTotal:0,completedLoading:!1,completedPage:1,completedItemsPerPage:10,completedHeaders:[{title:"Id",key:"name"},{title:"User",key:"user_display"},{title:"Filename",key:"filename"},{title:"Start Time",key:"start_time_formatted"},{title:"Duration",key:"duration"},{title:"State",key:"state"},{title:"Log",key:"log",sortable:!1,filterable:!1},{title:"Report",key:"report",sortable:!1,filterable:!1}],showDialog:!1,dialogName:"",dialogContent:"",dialogFilename:""}},watch:{activeTab(i){i==="running"?this.getRunningScripts():i==="completed"&&this.getCompletedScripts()}},created(){this.api=new V.yi,this.api.get_setting("time_zone").then(i=>{i&&(this.timeZone=i)}).catch(i=>{}),this.getRunningScripts(),this.getCompletedScripts(),this.refreshTimer=setInterval(()=>{this.activeTab==="running"&&this.getRunningScripts()},5e3)},beforeUnmount(){this.refreshTimer&&clearInterval(this.refreshTimer)},methods:{getRunningScripts:function(){this.runningLoading=!0;const i=(this.runningPage-1)*this.runningItemsPerPage;V.Fr.get(`/script-api/running-script?scope=DEFAULT&offset=${i}&limit=${this.runningItemsPerPage}`).then(t=>{const s=t.data.items||[],l=new Date;s.forEach(o=>{if(o.user_display=`${o.user_full_name} (${o.username})`,o.start_time){const n=new Date(o.start_time),r=l-n;if(o.start_time_formatted=this.formatDateTimeHMS(n,this.timeZone),r<0)o.duration="N/A";else if(r<1e3)o.duration="< 1s";else if(r<6e4)o.duration=`${Math.round(r/1e3)}s`;else if(r<36e5){const m=Math.floor(r/6e4),d=Math.round(r%6e4/1e3);o.duration=`${m}m ${d}s`}else{const m=Math.floor(r/36e5),d=Math.floor(r%36e5/6e4),g=Math.round(r%6e4/1e3);o.duration=`${m}h ${d}m ${g}s`}}else o.duration="N/A"}),this.runningScripts=s,this.runningTotal=t.data.total||s.length,this.runningLoading=!1}).catch(t=>{this.runningLoading=!1,this.$notify.caution({title:"Error Loading Running Scripts",body:t.message})})},updateRunningPage:function(i){this.runningPage=i,this.getRunningScripts()},updateRunningItemsPerPage:function(i){this.runningItemsPerPage=i,this.runningPage=1,this.getRunningScripts()},getCompletedScripts:function(){this.completedLoading=!0;const i=(this.completedPage-1)*this.completedItemsPerPage;V.Fr.get(`/script-api/completed-scripts?scope=DEFAULT&offset=${i}&limit=${this.completedItemsPerPage}`).then(t=>{const s=t.data.items||[];s.forEach(l=>{if(l.user_display=`${l.user_full_name} (${l.username})`,l.start_time&&l.end_time){const o=new Date(l.start_time),r=new Date(l.end_time)-o;if(l.start_time_formatted=this.formatDateTimeHMS(o,this.timeZone),r<0)l.duration="N/A";else if(r<1e3)l.duration="< 1s";else if(r<6e4)l.duration=`${Math.round(r/1e3)}s`;else if(r<36e5){const m=Math.floor(r/6e4),d=Math.round(r%6e4/1e3);l.duration=`${m}m ${d}s`}else{const m=Math.floor(r/36e5),d=Math.floor(r%36e5/6e4),g=Math.round(r%6e4/1e3);l.duration=`${m}h ${d}m ${g}s`}}else l.duration="N/A"}),this.completedScripts=s,this.completedTotal=t.data.total||s.length,this.completedLoading=!1}).catch(t=>{this.completedLoading=!1,this.$notify.caution({title:"Error Loading Completed Scripts",body:t.message})})},updateCompletedPage:function(i){this.completedPage=i,this.getCompletedScripts()},updateCompletedItemsPerPage:function(i){this.completedItemsPerPage=i,this.completedPage=1,this.getCompletedScripts()},showScript:function(i){this.dialogContent=JSON.stringify(i,null,2),this.dialogName="Script: "+i.name,this.dialogFilename="",this.showDialog=!0},connectScript:function(i){this.$emit("disconnect");const t={name:"ScriptRunner",params:{id:i.name}};if(this.connectInNewTab){let{href:s}=this.$router.resolve(t);window.open(s,"_blank")}else this.$router.push(t),this.$emit("close")},deleteScript:function(i){this.$dialog.confirm(`Are you sure you want to stop script: ${i.name} ${i.filename}?
3
+ `,{okText:"Stop",cancelText:"Cancel"}).then(t=>V.Fr.post(`/script-api/running-script/${i.name}/delete`)).then(t=>{this.$notify.normal({body:`Stopped script: ${i.name} ${i.filename}`}),this.getRunningScripts()}).catch(t=>{t!==!0&&this.$notify.caution({body:`Failed to stop script: ${i.name} ${i.filename}`})})},viewScriptLog:function(i,t){let s=null;t==="report"?(this.dialogName="Report",s=i.report):(this.dialogName="Log",s=i.log),V.Fr.get(`/openc3-api/storage/download_file/${encodeURIComponent(s)}?bucket=OPENC3_LOGS_BUCKET`).then(l=>{const o=s.split("/");this.dialogFilename=o[o.length-1],this.dialogContent=window.atob(l.data.contents),this.showDialog=!0})},downloadScriptLog:function(i,t,s="text"){let l=null;t==="report"?(this.dialogName="Report",l=i.report):(this.dialogName="Log",l=i.log),this.downloadScript=i,s==="ctrf"&&t==="report"?V.Fr.get(`/openc3-api/storage/download_file/${encodeURIComponent(l)}?bucket=OPENC3_LOGS_BUCKET&format=ctrf`).then(o=>{const n=new Blob([window.atob(o.data.contents)],{type:"application/json"}),r=document.createElement("a");r.href=URL.createObjectURL(n),r.setAttribute("download",o.data.filename),r.click(),this.downloadScript=null}).catch(()=>{this.$notify.caution({title:`Unable to download log ${l}`,body:`You may be able to download this log manually from the 'logs' bucket at ${l}`}),this.downloadScript=null}):V.Fr.get(`/openc3-api/storage/download/${encodeURIComponent(l)}?bucket=OPENC3_LOGS_BUCKET`).then(o=>{const n=l.split("/"),r=n[n.length-1],m=document.createElement("a");m.href=o.data.url,m.setAttribute("download",r),m.click(),this.downloadScript=null}).catch(()=>{this.$notify.caution({title:`Unable to download log ${l}`,body:`You may be able to download this log manually from the 'logs' bucket at ${l}`}),this.downloadScript=null})}}},Be={key:0},Te={key:1};function Oe(i,t,s,l,o,n){const r=e.resolveComponent("v-tab"),m=e.resolveComponent("v-tabs"),d=e.resolveComponent("v-spacer"),g=e.resolveComponent("v-btn"),w=e.resolveComponent("v-text-field"),_=e.resolveComponent("v-row"),v=e.resolveComponent("v-card-title"),b=e.resolveComponent("v-icon"),k=e.resolveComponent("v-data-table-server"),S=e.resolveComponent("v-window-item"),C=e.resolveComponent("v-list-item-title"),O=e.resolveComponent("v-list-item"),N=e.resolveComponent("v-list"),B=e.resolveComponent("v-menu"),R=e.resolveComponent("v-window"),M=e.resolveComponent("v-card"),T=e.resolveComponent("output-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(M,{flat:"",class:"tab-card"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:o.activeTab,"onUpdate:modelValue":t[0]||(t[0]=y=>o.activeTab=y),"bg-color":"var(--color-background-base-default)"},{default:e.withCtx(()=>[e.createVNode(r,{value:"running"},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("Running Scripts",-1)])]),_:1}),e.createVNode(r,{value:"completed"},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode("Completed Scripts",-1)])]),_:1})]),_:1},8,["modelValue"]),e.createVNode(R,{modelValue:o.activeTab,"onUpdate:modelValue":t[3]||(t[3]=y=>o.activeTab=y)},{default:e.withCtx(()=>[e.createVNode(S,{value:"running"},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(_,{dense:""},{default:e.withCtx(()=>[e.createVNode(d),e.createVNode(g,{class:"mr-3",color:"primary",onClick:n.getRunningScripts},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode("Refresh",-1)])]),_:1},8,["onClick"]),e.createVNode(w,{modelValue:o.runningSearch,"onUpdate:modelValue":t[1]||(t[1]=y=>o.runningSearch=y),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"running-search",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(k,{headers:o.runningHeaders,items:o.runningScripts,"items-length":o.runningTotal,loading:o.runningLoading,search:o.runningSearch,density:"compact","data-test":"running-scripts","items-per-page":o.runningItemsPerPage,page:o.runningPage,"items-per-page-options":[10,25,50],class:"script-table","onUpdate:page":n.updateRunningPage,"onUpdate:itemsPerPage":n.updateRunningItemsPerPage},{"item.name":e.withCtx(({item:y})=>[e.createVNode(g,{color:"primary",density:"comfortable",onClick:F=>n.showScript(y)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.name),1)]),_:2},1032,["onClick"])]),"item.connect":e.withCtx(({item:y})=>[e.createVNode(g,{color:"primary",onClick:F=>n.connectScript(y)},{default:e.withCtx(()=>[t[10]||(t[10]=e.createElementVNode("span",null,"Connect",-1)),e.withDirectives(e.createVNode(b,{end:""},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createTextVNode(" mdi-open-in-new ",-1)])]),_:1},512),[[e.vShow,s.connectInNewTab]])]),_:1},8,["onClick"])]),"item.stop":e.withCtx(({item:y})=>[e.createVNode(g,{color:"primary",onClick:F=>n.deleteScript(y)},{default:e.withCtx(()=>[t[12]||(t[12]=e.createElementVNode("span",null,"Stop",-1)),e.createVNode(b,{end:""},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createTextVNode(" mdi-close-circle-outline ",-1)])]),_:1})]),_:1},8,["onClick"])]),_:1},8,["headers","items","items-length","loading","search","items-per-page","page","onUpdate:page","onUpdate:itemsPerPage"])]),_:1}),e.createVNode(S,{value:"completed"},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(_,{dense:""},{default:e.withCtx(()=>[e.createVNode(d),e.createVNode(g,{class:"mr-3",color:"primary",onClick:n.getCompletedScripts},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("Refresh",-1)])]),_:1},8,["onClick"]),e.createVNode(w,{modelValue:o.completedSearch,"onUpdate:modelValue":t[2]||(t[2]=y=>o.completedSearch=y),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(k,{headers:o.completedHeaders,items:o.completedScripts,"items-length":o.completedTotal,loading:o.completedLoading,search:o.completedSearch,density:"compact","data-test":"completed-scripts","items-per-page":o.completedItemsPerPage,page:o.completedPage,"items-per-page-options":[10,25,50],class:"script-table","onUpdate:page":n.updateCompletedPage,"onUpdate:itemsPerPage":n.updateCompletedItemsPerPage},{"item.name":e.withCtx(({item:y})=>[e.createVNode(g,{color:"primary",density:"comfortable",onClick:F=>n.showScript(y)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.name),1)]),_:2},1032,["onClick"])]),"item.log":e.withCtx(({item:y})=>[e.createVNode(g,{color:"primary",density:"comfortable",icon:"mdi-eye",onClick:F=>n.viewScriptLog(y,"log")},null,8,["onClick"]),e.createVNode(g,{color:"primary",density:"comfortable",icon:"mdi-file-download-outline",disabled:o.downloadScript,loading:o.downloadScript&&o.downloadScript.name===y.name,onClick:F=>n.downloadScriptLog(y,"log")},null,8,["disabled","loading","onClick"])]),"item.report":e.withCtx(({item:y})=>[y.report?(e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(g,{color:"primary",density:"comfortable",icon:"mdi-eye",onClick:F=>n.viewScriptLog(y,"report")},null,8,["onClick"]),e.createVNode(B,null,{activator:e.withCtx(({props:F})=>[e.createVNode(g,e.mergeProps({color:"primary",density:"comfortable",icon:"mdi-file-download-outline",disabled:o.downloadScript,loading:o.downloadScript&&o.downloadScript.name===y.name},F),null,16,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(O,{onClick:F=>n.downloadScriptLog(y,"report","text")},{default:e.withCtx(()=>[e.createVNode(C,null,{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode("Download as Text",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(O,{onClick:F=>n.downloadScriptLog(y,"report","ctrf")},{default:e.withCtx(()=>[e.createVNode(C,null,{default:e.withCtx(()=>[...t[16]||(t[16]=[e.createTextVNode("Download as CTRF",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)])):(e.openBlock(),e.createElementBlock("div",Be,[...t[14]||(t[14]=[e.createElementVNode("span",null,"N/A",-1)])]))]),_:1},8,["headers","items","items-length","loading","search","items-per-page","page","onUpdate:page","onUpdate:itemsPerPage"])]),_:1})]),_:1},8,["modelValue"])]),_:1}),o.showDialog?(e.openBlock(),e.createBlock(T,{key:0,modelValue:o.showDialog,"onUpdate:modelValue":t[4]||(t[4]=y=>o.showDialog=y),content:o.dialogContent,type:"Script",name:o.dialogName,filename:o.dialogFilename,onSubmit:t[5]||(t[5]=y=>o.showDialog=!1)},null,8,["modelValue","content","name","filename"])):e.createCommentVNode("",!0)])}const he=z._export_sfc(Ee,[["render",Oe]]),Re={props:{modelValue:{type:Array,required:!0}},emits:["sort","update:modelValue"],data(){return{search:"",headers:[{title:"Message",value:"message",sortable:!1}],messageOrderOptions:["Newest on Top","Newest on Bottom"],messageOrder:"Newest on Top"}},computed:{messages:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},watch:{messageOrder:function(i,t){this.$emit("sort",i)}},methods:{messageClass(i){return i.match(/(CHECK|WAIT): .*(success|was within range.*) with value/)?"openc3-green":i.match(/(CHECK|WAIT): .*(failed|failed to be within range.*) with value/)?"openc3-red":""},downloadLog(){const i=this.messages.map(l=>l.message).join(`
4
+ `),t=new Blob([i],{type:"text/plain"}),s=document.createElement("a");s.href=URL.createObjectURL(t),s.setAttribute("download",ee.format(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_sr_message_log.txt"),s.click()},clearLog:function(){this.$dialog.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}).then(i=>{this.messages=[]}).catch(function(i){})}}};function Me(i,t,s,l,o,n){const r=e.resolveComponent("v-btn"),m=e.resolveComponent("v-spacer"),d=e.resolveComponent("v-select"),g=e.resolveComponent("v-text-field"),w=e.resolveComponent("v-card-title"),_=e.resolveComponent("v-data-table"),v=e.resolveComponent("v-card-text"),b=e.resolveComponent("v-card");return e.openBlock(),e.createBlock(b,{class:"d-flex flex-column h-100"},{default:e.withCtx(()=>[e.createVNode(w,{class:"d-flex align-center"},{default:e.withCtx(()=>[e.createVNode(r,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-log","aria-label":"Download Log",onClick:n.downloadLog},null,8,["onClick"]),t[2]||(t[2]=e.createTextVNode(" Script Messages ",-1)),e.createVNode(m),e.createVNode(d,{modelValue:o.messageOrder,"onUpdate:modelValue":t[0]||(t[0]=k=>o.messageOrder=k),density:"compact","hide-details":"",variant:"outlined",items:o.messageOrderOptions,class:"mr-2",style:{"max-width":"200px"},"data-test":"message-order"},null,8,["modelValue","items"]),e.createVNode(m),e.createVNode(g,{modelValue:o.search,"onUpdate:modelValue":t[1]||(t[1]=k=>o.search=k),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search","data-test":"search-messages"},null,8,["modelValue"]),e.createVNode(r,{class:"mx-2",icon:"mdi-delete-sweep",variant:"text",density:"compact","data-test":"clear-log","aria-label":"Clear Log",onClick:n.clearLog},null,8,["onClick"])]),_:1}),e.createVNode(v,{class:"overflow-auto"},{default:e.withCtx(()=>[e.createVNode(_,{id:"script-log-messages",headers:o.headers,items:n.messages,search:o.search,"items-per-page":-1,"hide-default-footer":"",density:"compact","data-test":"output-messages"},{"item.message":e.withCtx(({item:k})=>[e.createElementVNode("div",{class:e.normalizeClass(n.messageClass(k.message))},e.toDisplayString(k.message),3)]),_:1},8,["headers","items","search"])]),_:1})]),_:1})}const fe=z._export_sfc(Re,[["render",Me]]),De={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(i,{emit:t}){const s=t,l=i,o=e.useSlots(),n=e.ref([]),r=e.computed(()=>n.value.reduce((a,u)=>(a[~~u.id]=u)&&a,{})),m=e.computed(()=>n.value.length),d=e.ref(null),g=e.ref(!1),w=e.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),_=e.ref({splitter:null,timeoutId:null}),v=e.computed(()=>({[`splitpanes splitpanes--${l.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":w.value.dragging})),b=()=>{document.addEventListener("mousemove",C,{passive:!1}),document.addEventListener("mouseup",O),"ontouchstart"in window&&(document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",O))},k=()=>{document.removeEventListener("mousemove",C,{passive:!1}),document.removeEventListener("mouseup",O),"ontouchstart"in window&&(document.removeEventListener("touchmove",C,{passive:!1}),document.removeEventListener("touchend",O))},S=(a,u)=>{const f=a.target.closest(".splitpanes__splitter");if(f){const{left:p,top:h}=f.getBoundingClientRect(),{clientX:x,clientY:E}="ontouchstart"in window&&a.touches?a.touches[0]:a;w.value.cursorOffset=l.horizontal?E-h:x-p}b(),w.value.mouseDown=!0,w.value.activeSplitter=u},C=a=>{w.value.mouseDown&&(a.preventDefault(),w.value.dragging=!0,requestAnimationFrame(()=>{y(M(a)),I("resize",{event:a},!0)}))},O=a=>{w.value.dragging&&(window.getSelection().removeAllRanges(),I("resized",{event:a},!0)),w.value.mouseDown=!1,w.value.activeSplitter=null,setTimeout(()=>{w.value.dragging=!1,k()},100)},N=(a,u)=>{"ontouchstart"in window&&(a.preventDefault(),_.value.splitter===u?(clearTimeout(_.value.timeoutId),_.value.timeoutId=null,B(a,u),_.value.splitter=null):(_.value.splitter=u,_.value.timeoutId=setTimeout(()=>_.value.splitter=null,500))),w.value.dragging||I("splitter-click",{event:a,index:u},!0)},B=(a,u)=>{if(I("splitter-dblclick",{event:a,index:u},!0),l.maximizePanes){let f=0;n.value=n.value.map((p,h)=>(p.size=h===u?p.max:p.min,h!==u&&(f+=p.min),p)),n.value[u].size-=f,I("pane-maximize",{event:a,index:u,pane:n.value[u]}),I("resized",{event:a,index:u},!0)}},R=(a,u)=>{I("pane-click",{event:a,index:r.value[u].index,pane:r.value[u]})},M=a=>{const u=d.value.getBoundingClientRect(),{clientX:f,clientY:p}="ontouchstart"in window&&a.touches?a.touches[0]:a;return{x:f-(l.horizontal?0:w.value.cursorOffset)-u.left,y:p-(l.horizontal?w.value.cursorOffset:0)-u.top}},T=a=>{a=a[l.horizontal?"y":"x"];const u=d.value[l.horizontal?"clientHeight":"clientWidth"];return l.rtl&&!l.horizontal&&(a=u-a),a*100/u},y=a=>{const u=w.value.activeSplitter;let f={prevPanesSize:G(u),nextPanesSize:H(u),prevReachedMinPanes:0,nextReachedMinPanes:0};const p=0+(l.pushOtherPanes?0:f.prevPanesSize),h=100-(l.pushOtherPanes?0:f.nextPanesSize),x=Math.max(Math.min(T(a),h),p);let E=[u,u+1],D=n.value[E[0]]||null,U=n.value[E[1]]||null;const $=D.max<100&&x>=D.max+f.prevPanesSize,c=U.max<100&&x<=100-(U.max+H(u+1));if($||c){$?(D.size=D.max,U.size=Math.max(100-D.max-f.prevPanesSize-f.nextPanesSize,0)):(D.size=Math.max(100-U.max-f.prevPanesSize-H(u+1),0),U.size=U.max);return}if(l.pushOtherPanes){const P=F(f,x);if(!P)return;({sums:f,panesToResize:E}=P),D=n.value[E[0]]||null,U=n.value[E[1]]||null}D!==null&&(D.size=Math.min(Math.max(x-f.prevPanesSize-f.prevReachedMinPanes,D.min),D.max)),U!==null&&(U.size=Math.min(Math.max(100-x-f.nextPanesSize-f.nextReachedMinPanes,U.min),U.max))},F=(a,u)=>{const f=w.value.activeSplitter,p=[f,f+1];return u<a.prevPanesSize+n.value[p[0]].min&&(p[0]=te(f).index,a.prevReachedMinPanes=0,p[0]<f&&n.value.forEach((h,x)=>{x>p[0]&&x<=f&&(h.size=h.min,a.prevReachedMinPanes+=h.min)}),a.prevPanesSize=G(p[0]),p[0]===void 0)?(a.prevReachedMinPanes=0,n.value[0].size=n.value[0].min,n.value.forEach((h,x)=>{x>0&&x<=f&&(h.size=h.min,a.prevReachedMinPanes+=h.min)}),n.value[p[1]].size=100-a.prevReachedMinPanes-n.value[0].min-a.prevPanesSize-a.nextPanesSize,null):u>100-a.nextPanesSize-n.value[p[1]].min&&(p[1]=Z(f).index,a.nextReachedMinPanes=0,p[1]>f+1&&n.value.forEach((h,x)=>{x>f&&x<p[1]&&(h.size=h.min,a.nextReachedMinPanes+=h.min)}),a.nextPanesSize=H(p[1]-1),p[1]===void 0)?(a.nextReachedMinPanes=0,n.value.forEach((h,x)=>{x<m.value-1&&x>=f+1&&(h.size=h.min,a.nextReachedMinPanes+=h.min)}),n.value[p[0]].size=100-a.prevPanesSize-H(p[0]-1),null):{sums:a,panesToResize:p}},G=a=>n.value.reduce((u,f,p)=>u+(p<a?f.size:0),0),H=a=>n.value.reduce((u,f,p)=>u+(p>a+1?f.size:0),0),te=a=>[...n.value].reverse().find(u=>u.index<a&&u.size>u.min)||{},Z=a=>n.value.find(u=>u.index>a+1&&u.size>u.min)||{},ie=()=>{var a;const u=Array.from(((a=d.value)==null?void 0:a.children)||[]);for(const f of u){const p=f.classList.contains("splitpanes__pane"),h=f.classList.contains("splitpanes__splitter");!p&&!h&&(f.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},K=(a,u,f=!1)=>{const p=a-1,h=document.createElement("div");h.classList.add("splitpanes__splitter"),f||(h.onmousedown=x=>S(x,p),typeof window<"u"&&"ontouchstart"in window&&(h.ontouchstart=x=>S(x,p)),h.onclick=x=>N(x,p+1)),h.ondblclick=x=>B(x,p+1),u.parentNode.insertBefore(h,u)},X=a=>{a.onmousedown=void 0,a.onclick=void 0,a.ondblclick=void 0,a.remove()},q=()=>{var a;const u=Array.from(((a=d.value)==null?void 0:a.children)||[]);for(const p of u)p.className.includes("splitpanes__splitter")&&X(p);let f=0;for(const p of u)p.className.includes("splitpanes__pane")&&(!f&&l.firstSplitter?K(f,p,!0):f&&K(f,p),f++)},Q=({uid:a,...u})=>{const f=r.value[a];for(const[p,h]of Object.entries(u))f[p]=h},oe=a=>{var u;let f=-1;Array.from(((u=d.value)==null?void 0:u.children)||[]).some(p=>(p.className.includes("splitpanes__pane")&&f++,p.isSameNode(a.el))),n.value.splice(f,0,{...a,index:f}),n.value.forEach((p,h)=>p.index=h),g.value&&e.nextTick(()=>{q(),j({addedPane:n.value[f]}),I("pane-add",{pane:n.value[f]})})},ne=a=>{const u=n.value.findIndex(p=>p.id===a);n.value[u].el=null;const f=n.value.splice(u,1)[0];n.value.forEach((p,h)=>p.index=h),e.nextTick(()=>{q(),I("pane-remove",{pane:f}),j({removedPane:{...f}})})},j=(a={})=>{!a.addedPane&&!a.removedPane?le():n.value.some(u=>u.givenSize!==null||u.min||u.max<100)?re(a):se(),g.value&&I("resized")},se=()=>{const a=100/m.value;let u=0;const f=[],p=[];for(const h of n.value)h.size=Math.max(Math.min(a,h.max),h.min),u-=h.size,h.size>=h.max&&f.push(h.id),h.size<=h.min&&p.push(h.id);u>.1&&W(u,f,p)},le=()=>{let a=100;const u=[],f=[];let p=0;for(const x of n.value)a-=x.size,x.givenSize!==null&&p++,x.size>=x.max&&u.push(x.id),x.size<=x.min&&f.push(x.id);let h=100;if(a>.1){for(const x of n.value)x.givenSize===null&&(x.size=Math.max(Math.min(a/(m.value-p),x.max),x.min)),h-=x.size;h>.1&&W(h,u,f)}},re=({addedPane:a,removedPane:u}={})=>{let f=100/m.value,p=0;const h=[],x=[];(a?.givenSize??null)!==null&&(f=(100-a.givenSize)/(m.value-1));for(const E of n.value)p-=E.size,E.size>=E.max&&h.push(E.id),E.size<=E.min&&x.push(E.id);if(!(Math.abs(p)<.1)){for(const E of n.value)a?.givenSize!==null&&a?.id===E.id||(E.size=Math.max(Math.min(f,E.max),E.min)),p-=E.size,E.size>=E.max&&h.push(E.id),E.size<=E.min&&x.push(E.id);p>.1&&W(p,h,x)}},W=(a,u,f)=>{let p;a>0?p=a/(m.value-u.length):p=a/(m.value-f.length),n.value.forEach((h,x)=>{if(a>0&&!u.includes(h.id)){const E=Math.max(Math.min(h.size+p,h.max),h.min),D=E-h.size;a-=D,h.size=E}else if(!f.includes(h.id)){const E=Math.max(Math.min(h.size+p,h.max),h.min),D=E-h.size;a-=D,h.size=E}}),Math.abs(a)>.1&&e.nextTick(()=>{g.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},I=(a,u=void 0,f=!1)=>{const p=u?.index??w.value.activeSplitter??null;s(a,{...u,...p!==null&&{index:p},...f&&p!==null&&{prevPane:n.value[p-(l.firstSplitter?1:0)],nextPane:n.value[p+(l.firstSplitter?0:1)]},panes:n.value.map(h=>({min:h.min,max:h.max,size:h.size}))})};e.watch(()=>l.firstSplitter,()=>q()),e.onMounted(()=>{ie(),q(),j(),I("ready"),g.value=!0}),e.onBeforeUnmount(()=>g.value=!1);const ae=()=>{var a;return e.h("div",{ref:d,class:v.value},(a=o.default)==null?void 0:a.call(o))};return e.provide("panes",n),e.provide("indexedPanes",r),e.provide("horizontal",e.computed(()=>l.horizontal)),e.provide("requestUpdate",Q),e.provide("onPaneAdd",oe),e.provide("onPaneRemove",ne),e.provide("onPaneClick",R),(a,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ae)))}},Fe={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(i){var t;const s=i,l=e.inject("requestUpdate"),o=e.inject("onPaneAdd"),n=e.inject("horizontal"),r=e.inject("onPaneRemove"),m=e.inject("onPaneClick"),d=(t=e.getCurrentInstance())==null?void 0:t.uid,g=e.inject("indexedPanes"),w=e.computed(()=>g.value[d]),_=e.ref(null),v=e.computed(()=>{const C=isNaN(s.size)||s.size===void 0?0:parseFloat(s.size);return Math.max(Math.min(C,k.value),b.value)}),b=e.computed(()=>{const C=parseFloat(s.minSize);return isNaN(C)?0:C}),k=e.computed(()=>{const C=parseFloat(s.maxSize);return isNaN(C)?100:C}),S=e.computed(()=>{var C;return`${n.value?"height":"width"}: ${(C=w.value)==null?void 0:C.size}%`});return e.watch(()=>v.value,C=>l({uid:d,size:C})),e.watch(()=>b.value,C=>l({uid:d,min:C})),e.watch(()=>k.value,C=>l({uid:d,max:C})),e.onMounted(()=>{o({id:d,el:_.value,min:b.value,max:k.value,givenSize:s.size===void 0?null:v.value,size:v.value})}),e.onBeforeUnmount(()=>r(d)),(C,O)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"paneEl",ref:_,class:"splitpanes__pane",onClick:O[0]||(O[0]=N=>e.unref(m)(N,C._.uid)),style:e.normalizeStyle(S.value)},[e.renderSlot(C.$slots,"default")],4))}},Ie={props:{question:{type:String,required:!0},default:{type:String,default:null},password:{type:Boolean,default:!1},answerRequired:{type:Boolean,default:!0},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{inputValue:"",valid:!1,rules:[i=>!!i||"Required"]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},created(){this.default&&(this.valid=!0,this.inputValue=this.default),this.answerRequired===!1&&(this.valid=!0,this.rules=[i=>!0])},methods:{submitHandler:function(){this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","COSMOS__CANCEL")}}},Ue={class:"pa-2"},Pe={class:"question"};function ze(i,t,s,l,o,n){const r=e.resolveComponent("v-spacer"),m=e.resolveComponent("v-toolbar"),d=e.resolveComponent("v-text-field"),g=e.resolveComponent("v-card-text"),w=e.resolveComponent("v-btn"),_=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-form"),b=e.resolveComponent("v-card"),k=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(k,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=S=>n.show=S),persistent:"",width:"600",onKeydown:e.withKeys(n.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(b,null,{default:e.withCtx(()=>[e.createVNode(v,{modelValue:o.valid,"onUpdate:modelValue":t[1]||(t[1]=S=>o.valid=S),onSubmit:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[e.createVNode(m,{height:"24"},{default:e.withCtx(()=>[e.createVNode(r),t[3]||(t[3]=e.createElementVNode("span",null," User Input Required ",-1)),e.createVNode(r)]),_:1}),e.createElementVNode("div",Ue,[e.createVNode(g,null,{default:e.withCtx(()=>[e.createElementVNode("div",Pe,e.toDisplayString(s.question),1),e.createVNode(d,{modelValue:o.inputValue,"onUpdate:modelValue":t[0]||(t[0]=S=>o.inputValue=S),autofocus:"","data-test":"ask-value-input",type:s.password?"password":"text",rules:o.rules},null,8,["modelValue","type","rules"])]),_:1})]),e.createVNode(_,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(r),e.createVNode(w,{variant:"outlined","data-test":"ask-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(w,{variant:"flat",type:"submit","data-test":"ask-ok",disabled:!o.valid,onClick:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue","onKeydown"])}const Le=z._export_sfc(Ie,[["render",ze],["__scopeId","data-v-3093db63"]]),Ae={props:{title:{type:String,required:!0},message:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{buckets:[],selectedBucket:null,path:"",files:[],selectedFile:null,search:"",loading:!1}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}},breadcrumbPath(){if(!this.path)return[];const i=this.path.split("/").filter(t=>!!t);return i.map((t,s)=>({name:t,path:i.slice(0,s+1).join("/")+"/"}))},filteredFiles(){if(!this.search)return this.files;const i=this.search.toLowerCase();return this.files.filter(t=>t.name.toLowerCase().includes(i))}},created(){V.Fr.get("/openc3-api/storage/buckets").then(i=>{this.buckets=i.data})},methods:{formatSize(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`},selectBucket(i){this.selectedBucket=i,this.path="",this.selectedFile=null,this.updateFiles()},backArrow(){if(this.path==="")return;const i=this.path.split("/");this.path=i.slice(0,-2).join("/"),this.path&&(this.path+="/"),this.selectedFile=null,this.updateFiles()},gotoPath(i){this.path=i,this.selectedFile=null,this.updateFiles()},itemClick(i){i.icon==="mdi-folder"?(this.path+=`${i.name}/`,this.selectedFile=null,this.updateFiles()):this.selectedFile=i.name},itemDblClick(i){i.icon==="mdi-file"&&(this.selectedFile=i.name,this.submitHandler())},updateFiles(){this.loading=!0;const i=this.selectedBucket.toUpperCase();V.Fr.get(`/openc3-api/storage/files/OPENC3_${i}_BUCKET/${this.path}`).then(t=>{this.files=t.data[0].map(s=>({name:s,icon:"mdi-folder"})),this.files=this.files.concat(t.data[1].map(s=>({name:s.name,icon:"mdi-file",size:s.size}))),this.loading=!1}).catch(()=>{this.files=[],this.loading=!1})},submitHandler(){this.$emit("response",{bucket:`OPENC3_${this.selectedBucket.toUpperCase()}_BUCKET`,path:`${this.path}${this.selectedFile}`,filename:this.selectedFile})},cancelHandler(){this.$emit("response","COSMOS__CANCEL")}}},He={class:"pa-2"},qe={class:"text-h6"},Ge=["textContent"],Ke={class:"ma-2",style:{"font-size":"0.875rem"},"data-test":"bucket-path"},je=["onClick"],We={class:"text-caption"};function Je(i,t,s,l,o,n){const r=e.resolveComponent("v-spacer"),m=e.resolveComponent("v-toolbar"),d=e.resolveComponent("v-row"),g=e.resolveComponent("v-icon"),w=e.resolveComponent("v-chip"),_=e.resolveComponent("v-btn"),v=e.resolveComponent("v-text-field"),b=e.resolveComponent("v-progress-circular"),k=e.resolveComponent("v-list-item"),S=e.resolveComponent("v-list-item-title"),C=e.resolveComponent("v-list"),O=e.resolveComponent("v-col"),N=e.resolveComponent("v-card-text"),B=e.resolveComponent("v-card-actions"),R=e.resolveComponent("v-card"),M=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(M,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=T=>n.show=T),persistent:"",width:"800",onKeydown:e.withKeys(n.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(R,null,{default:e.withCtx(()=>[e.createVNode(m,{height:"24"},{default:e.withCtx(()=>[e.createVNode(r),t[2]||(t[2]=e.createElementVNode("span",null," Bucket Dialog ",-1)),e.createVNode(r)]),_:1}),e.createElementVNode("div",He,[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.createElementVNode("span",qe,e.toDisplayString(s.title),1)]),_:1}),s.message?(e.openBlock(),e.createBlock(d,{key:0},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"ma-3",style:{"white-space":"pre-line"},textContent:e.toDisplayString(s.message)},null,8,Ge)]),_:1})):e.createCommentVNode("",!0),e.createVNode(d,{class:"my-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.buckets,(T,y)=>(e.openBlock(),e.createBlock(w,{key:y,variant:o.selectedBucket===T?"elevated":"outlined",color:"primary",class:"ma-2","data-test":"bucket-chip",onClick:e.withModifiers(F=>n.selectBucket(T),["stop"])},{default:e.withCtx(()=>[e.createVNode(g,{start:""},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode("mdi-bucket",-1)])]),_:1}),e.createTextVNode(" "+e.toDisplayString(T),1)]),_:2},1032,["variant","onClick"]))),128))]),_:1}),o.selectedBucket?(e.openBlock(),e.createBlock(d,{key:1,class:"my-1"},{default:e.withCtx(()=>[e.createVNode(O,{class:"pa-0"},{default:e.withCtx(()=>[e.createVNode(d,{class:"ma-0 align-center",style:{"background-color":"var(--color-background-surface-header)"}},{default:e.withCtx(()=>[e.createVNode(_,{icon:"mdi-chevron-left-box-outline",variant:"text",density:"compact",class:"ml-2","data-test":"bucket-nav-back","aria-label":"Navigate Back",onClick:e.withModifiers(n.backArrow,["stop"])},null,8,["onClick"]),e.createElementVNode("div",Ke,[e.createTextVNode(e.toDisplayString(o.selectedBucket)+"/",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.breadcrumbPath,(T,y)=>(e.openBlock(),e.createElementBlock("span",{key:y},[e.createElementVNode("a",{style:{cursor:"pointer"},onClick:e.withModifiers(F=>n.gotoPath(T.path),["prevent"])},e.toDisplayString(T.name),9,je),t[4]||(t[4]=e.createTextVNode("/",-1))]))),128))])]),_:1}),e.createVNode(v,{modelValue:o.search,"onUpdate:modelValue":t[0]||(t[0]=T=>o.search=T),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"mx-2 mt-2","data-test":"bucket-search"},null,8,["modelValue"]),e.createVNode(C,{density:"compact",class:"bucket-file-list","data-test":"bucket-file-list"},{default:e.withCtx(()=>[o.loading?(e.openBlock(),e.createBlock(k,{key:0},{default:e.withCtx(()=>[e.createVNode(b,{indeterminate:"",size:"20",class:"mr-2"}),t[5]||(t[5]=e.createTextVNode(" Loading... ",-1))]),_:1})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.filteredFiles,T=>(e.openBlock(),e.createBlock(k,{key:T.name,class:e.normalizeClass({"selected-file":o.selectedFile===T.name&&T.icon==="mdi-file"}),"data-test":`bucket-item-${T.name}`,onClick:y=>n.itemClick(T),onDblclick:y=>n.itemDblClick(T)},e.createSlots({prepend:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.icon),1)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.name),1)]),_:2},1024)]),_:2},[T.size?{name:"append",fn:e.withCtx(()=>[e.createElementVNode("span",We,e.toDisplayString(n.formatSize(T.size)),1)]),key:"0"}:void 0]),1032,["class","data-test","onClick","onDblclick"]))),128)),!o.loading&&n.filteredFiles.length===0?(e.openBlock(),e.createBlock(k,{key:1},{default:e.withCtx(()=>[e.createVNode(S,{class:"text-caption text-grey"},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode(" No files found ",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(B,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(r),e.createVNode(_,{variant:"outlined","data-test":"bucket-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{variant:"flat","data-test":"bucket-ok",disabled:!o.selectedFile,onClick:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const Ye=z._export_sfc(Ae,[["render",Je],["__scopeId","data-v-16b638bb"]]),Ze={props:{title:{type:String,required:!0},message:{type:String,default:null},filter:{type:String,default:"*"},multiple:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{inputValue:null,valid:null,rules:[i=>this.multiple?i.length!=0||"Required":!!i||"Required"]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},methods:{submitHandler:function(){Array.isArray(this.inputValue)||(this.inputValue=[this.inputValue]),this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","COSMOS__CANCEL")}}},Xe={class:"pa-2"},Qe={class:"text-h6"},$e=["textContent"];function et(i,t,s,l,o,n){const r=e.resolveComponent("v-spacer"),m=e.resolveComponent("v-toolbar"),d=e.resolveComponent("v-row"),g=e.resolveComponent("v-file-input"),w=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-btn"),v=e.resolveComponent("v-card-actions"),b=e.resolveComponent("v-form"),k=e.resolveComponent("v-card"),S=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(S,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=C=>n.show=C),persistent:"",width:"600",onKeydown:e.withKeys(n.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(b,{modelValue:o.valid,"onUpdate:modelValue":t[1]||(t[1]=C=>o.valid=C),onSubmit:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[e.createVNode(m,{height:"24"},{default:e.withCtx(()=>[e.createVNode(r),t[3]||(t[3]=e.createElementVNode("span",null," File Dialog ",-1)),e.createVNode(r)]),_:1}),e.createElementVNode("div",Xe,[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.createElementVNode("span",Qe,e.toDisplayString(s.title),1)]),_:1}),s.message?(e.openBlock(),e.createBlock(d,{key:0},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"ma-3",style:{"white-space":"pre-line"},textContent:e.toDisplayString(s.message)},null,8,$e)]),_:1})):e.createCommentVNode("",!0),e.createVNode(d,{class:"my-1"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:o.inputValue,"onUpdate:modelValue":t[0]||(t[0]=C=>o.inputValue=C),label:"Choose File",rules:o.rules,autofocus:"","data-test":"file-input",accept:s.filter,"small-chips":"",multiple:s.multiple},null,8,["modelValue","rules","accept","multiple"])]),_:1})]),_:1})]),e.createVNode(v,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(r),e.createVNode(_,{variant:"outlined","data-test":"file-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{variant:"flat",type:"submit","data-test":"file-ok",disabled:!o.valid,onClick:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue","onKeydown"])}const tt=z._export_sfc(Ze,[["render",et],["__scopeId","data-v-50ca18be"]]),it={props:{modelValue:{type:Boolean,required:!0},title:{type:String,required:!0},text:{type:String,required:!0},width:{type:String,required:!0}},emits:["update:modelValue"],computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},methods:{}},ot=["textContent"],nt={class:"pa-2"},st=["textContent"];function lt(i,t,s,l,o,n){const r=e.resolveComponent("v-spacer"),m=e.resolveComponent("v-toolbar"),d=e.resolveComponent("v-row"),g=e.resolveComponent("v-card-text"),w=e.resolveComponent("v-btn"),_=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-card"),b=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(b,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=k=>n.show=k),width:s.width},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(m,{height:"24"},{default:e.withCtx(()=>[e.createVNode(r),e.createElementVNode("span",{style:{"white-space":"pre"},textContent:e.toDisplayString(s.title)},null,8,ot),e.createVNode(r)]),_:1}),e.createElementVNode("div",nt,[e.createVNode(g,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.text,(k,S)=>(e.openBlock(),e.createBlock(d,{key:S,"no-gutters":""},{default:e.withCtx(()=>[e.createElementVNode("span",{style:{"white-space":"pre"},textContent:e.toDisplayString(k)},null,8,st)]),_:2},1024))),128))]),_:1})]),e.createVNode(_,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(r),e.createVNode(w,{variant:"flat",onClick:t[0]||(t[0]=k=>n.show=!n.show)},{default:e.withCtx(()=>[...t[2]||(t[2]=[e.createTextVNode(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}const rt=z._export_sfc(it,[["render",lt]]),at={components:{},props:{modelValue:{type:Boolean,required:!0}},emits:["update:modelValue"],data(){return{api:null,overrides:[],search:"",headers:[{text:"Target",value:"target_name"},{text:"Packet",value:"packet_name"},{text:"Item",value:"item_name"},{text:"Type",value:"value_type"},{text:"Value",value:"value"},{text:"Delete",value:"delete"}]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},created:function(){this.api=new V.yi,this.getOverrides()},methods:{getOverrides:function(){this.api.get_overrides().then(i=>{this.overrides=i})},clearOverrides:function(){const i=[...new Map(this.overrides.map(t=>[`${t.target_name}__${t.packet_name}__${t.item_name}`,t])).values()];for(let t of i)this.api.normalize_tlm(t.target_name,t.packet_name,t.item_name,"ALL").then(s=>{this.overrides=[]})},deleteOverride:function(i){this.api.normalize_tlm(i.target_name,i.packet_name,i.item_name,i.value_type).then(t=>{let s=this.overrides.indexOf(i);this.overrides.splice(s,1)})}}},dt={class:"pa-2"};function ct(i,t,s,l,o,n){const r=e.resolveComponent("v-spacer"),m=e.resolveComponent("v-toolbar"),d=e.resolveComponent("v-btn"),g=e.resolveComponent("v-text-field"),w=e.resolveComponent("v-row"),_=e.resolveComponent("v-data-table"),v=e.resolveComponent("v-card-text"),b=e.resolveComponent("v-card-actions"),k=e.resolveComponent("v-card"),S=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(S,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=C=>n.show=C),width:"1000"},{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(m,{height:"24"},{default:e.withCtx(()=>[e.createVNode(r),t[3]||(t[3]=e.createElementVNode("span",null,"Overrides",-1)),e.createVNode(r)]),_:1}),e.createElementVNode("div",dt,[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(w,{class:"ma-1"},{default:e.withCtx(()=>[e.createVNode(d,{color:"primary","data-test":"overrides-dialog-clear-all",onClick:n.clearOverrides},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Clear All Overrides ",-1)])]),_:1},8,["onClick"]),e.createVNode(r),e.createVNode(g,{modelValue:o.search,"onUpdate:modelValue":t[0]||(t[0]=C=>o.search=C),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1}),e.createVNode(_,{headers:o.headers,items:o.overrides,search:o.search,"items-per-page-options":[100],"multi-sort":"",density:"compact"},{"item.delete":e.withCtx(({item:C})=>[e.createVNode(d,{icon:"mdi-delete",variant:"text","aria-label":"Delete Override",onClick:O=>n.deleteOverride(C)},null,8,["onClick"])]),_:1},8,["headers","items","search"])]),_:1})]),e.createVNode(b,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(r),e.createVNode(d,{variant:"flat","data-test":"overrides-dialog-ok",onClick:t[1]||(t[1]=C=>n.show=!n.show)},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ut=z._export_sfc(at,[["render",ct]]),mt={props:{title:{type:String,default:"Prompt Dialog"},subtitle:{type:String,default:""},message:{type:String,required:!0},details:{type:String,default:""},buttons:{type:Array,default:()=>[]},layout:{type:String,default:"horizontal"},multiple:{type:Boolean,default:!1,required:!1},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{selectOkDisabled:!0,selectedItem:null,checkedItems:[]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}},layoutClass(){let i="px-2 d-flex align-start";return this.layout==="vertical"?`${i} flex-column prompt-buttons-vertical`:`${i} flex-row flex-wrap prompt-buttons-horizontal`}},methods:{submitWrapper:function(i){this.selectedItem=i,this.submitHandler()},submitHandler:function(){this.$emit("response",this.selectedItem)},submitChecked:function(){this.$emit("response",this.checkedItems)},cancelHandler:function(){this.$emit("response","COSMOS__CANCEL")}}},pt=["textContent"],ht={class:"pa-2",style:{"max-height":"60vh",overflow:"auto"}},ft=["textContent"],gt=["textContent"],vt={key:0},wt={key:1},_t={key:2};function Ct(i,t,s,l,o,n){const r=e.resolveComponent("v-spacer"),m=e.resolveComponent("v-toolbar"),d=e.resolveComponent("v-card-subtitle"),g=e.resolveComponent("v-row"),w=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-select"),v=e.resolveComponent("v-btn"),b=e.resolveComponent("v-card-actions"),k=e.resolveComponent("v-checkbox"),S=e.resolveComponent("v-col"),C=e.resolveComponent("v-card"),O=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(O,{modelValue:n.show,"onUpdate:modelValue":t[3]||(t[3]=N=>n.show=N),persistent:"",scrollable:"",width:"600",onKeydown:e.withKeys(n.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(m,{height:"24"},{default:e.withCtx(()=>[e.createVNode(r),e.createElementVNode("span",{class:"text",textContent:e.toDisplayString(s.title)},null,8,pt),e.createVNode(r)]),_:1}),e.createElementVNode("div",ht,[e.createVNode(w,{class:"text"},{default:e.withCtx(()=>[s.subtitle?(e.openBlock(),e.createBlock(g,{key:0,class:"mb-2"},{default:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.subtitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(g,{class:"mt-1"},{default:e.withCtx(()=>[e.createElementVNode("span",{textContent:e.toDisplayString(s.message)},null,8,ft)]),_:1}),s.details?(e.openBlock(),e.createBlock(g,{key:1,class:"mt-3"},{default:e.withCtx(()=>[e.createElementVNode("span",{textContent:e.toDisplayString(s.details)},null,8,gt)]),_:1})):e.createCommentVNode("",!0)]),_:1})]),s.layout==="combo"?(e.openBlock(),e.createElementBlock("div",vt,[e.createVNode(g,{class:"ma-2"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:o.selectedItem,"onUpdate:modelValue":[t[0]||(t[0]=N=>o.selectedItem=N),t[1]||(t[1]=N=>o.selectOkDisabled=!1)],label:"Select",color:"secondary",class:"ma-1","data-test":"prompt-select",items:s.buttons,multiple:s.multiple===!0},null,8,["modelValue","items","multiple"])]),_:1}),e.createVNode(b,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(r),e.createVNode(v,{variant:"outlined","data-test":"prompt-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(v,{variant:"flat","data-test":"prompt-ok",disabled:o.selectOkDisabled,onClick:n.submitHandler},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})])):s.layout==="check"?(e.openBlock(),e.createElementBlock("div",wt,[e.createVNode(g,{class:"ma-2"},{default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.buttons,(N,B)=>(e.openBlock(),e.createBlock(k,{key:B,modelValue:o.checkedItems,"onUpdate:modelValue":t[2]||(t[2]=R=>o.checkedItems=R),label:N.title,value:N.value,color:"secondary",density:"compact","hide-details":"","data-test":`prompt-check-${N.value}`},null,8,["modelValue","label","value","data-test"]))),128))]),_:1})]),_:1}),e.createVNode(b,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(r),e.createVNode(v,{variant:"outlined","data-test":"prompt-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(v,{variant:"flat","data-test":"prompt-ok",disabled:o.checkedItems.length===0,onClick:n.submitChecked},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})])):(e.openBlock(),e.createElementBlock("div",_t,[e.createVNode(b,{class:e.normalizeClass(n.layoutClass)},{default:e.withCtx(()=>[s.layout!=="vertical"?(e.openBlock(),e.createBlock(r,{key:0})):e.createCommentVNode("",!0),e.createVNode(v,{variant:"outlined","data-test":"prompt-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.buttons,(N,B)=>(e.openBlock(),e.createElementBlock("div",{key:B},[e.createVNode(v,{variant:"flat","data-test":`prompt-${N.text}`,onClick:R=>n.submitWrapper(N.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.text),1)]),_:2},1032,["data-test","onClick"])]))),128))]),_:1},8,["class"])]))]),_:1})]),_:1},8,["modelValue","onKeydown"])}const bt=z._export_sfc(mt,[["render",Ct],["__scopeId","data-v-32c3a92d"]]),kt={components:{},props:{modelValue:{type:Boolean,required:!0},text:{type:String,required:!0}},emits:["update:modelValue"],computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},mounted(){setTimeout(()=>{this.$refs.okButton.$el.focus()})},methods:{downloadResults(){const i=new Blob([this.text],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.setAttribute("download",ee.format(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_suite_results.txt"),t.click()}}},xt={class:"pa-2"};function Vt(i,t,s,l,o,n){const r=e.resolveComponent("v-spacer"),m=e.resolveComponent("v-toolbar"),d=e.resolveComponent("v-textarea"),g=e.resolveComponent("v-card-text"),w=e.resolveComponent("v-btn"),_=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-card"),b=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(b,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=k=>n.show=k),scrollable:"",width:"800"},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(m,{height:"24"},{default:e.withCtx(()=>[e.createVNode(r),t[2]||(t[2]=e.createElementVNode("span",null," Script Results ",-1)),e.createVNode(r)]),_:1}),e.createElementVNode("div",xt,[e.createVNode(g,{style:{width:"100%","max-height":"80vh",overflow:"auto"}},{default:e.withCtx(()=>[e.createVNode(d,{readonly:"","hide-details":"",density:"compact","auto-grow":"","model-value":s.text},null,8,["model-value"])]),_:1})]),e.createVNode(_,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(r),e.createVNode(w,{variant:"outlined",onClick:n.downloadResults},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode(" Download ",-1)])]),_:1},8,["onClick"]),e.createVNode(w,{ref:"okButton",variant:"flat",onClick:t[0]||(t[0]=k=>n.show=!n.show)},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Ok ",-1)])]),_:1},512)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const yt=z._export_sfc(kt,[["render",Vt]]),Nt={components:{EnvironmentChooser:pe.EnvironmentChooser},props:{modelValue:{type:Boolean,required:!0},inputEnvironment:{type:Array,required:!0}},emits:["update:modelValue","environment"],data(){return{selected:[]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},mounted:function(){this.loadEnvironment()},methods:{loadEnvironment:function(){this.selected=[...this.inputEnvironment]},updateEnvironment:function(){this.$emit("environment",this.selected),this.show=!this.show},cancel:function(){this.show=!this.show}}},St={class:"pa-2"};function Et(i,t,s,l,o,n){const r=e.resolveComponent("v-spacer"),m=e.resolveComponent("v-toolbar"),d=e.resolveComponent("environment-chooser"),g=e.resolveComponent("v-card-text"),w=e.resolveComponent("v-btn"),_=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-card"),b=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(b,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=k=>n.show=k),persistent:"",width:"600",onKeydown:e.withKeys(n.cancel,["esc"])},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(m,{height:"24"},{default:e.withCtx(()=>[e.createVNode(r),t[2]||(t[2]=e.createElementVNode("span",null,"Script Environment Variables",-1)),e.createVNode(r)]),_:1}),e.createElementVNode("div",St,[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.selected,"onUpdate:modelValue":t[0]||(t[0]=k=>o.selected=k)},null,8,["modelValue"])]),_:1})]),e.createVNode(_,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(r),e.createVNode(w,{variant:"outlined","data-test":"environment-dialog-cancel",onClick:n.cancel},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(w,{variant:"flat","data-test":"environment-dialog-save",disabled:!!i.inputError,onClick:n.updateEnvironment},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Save ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const Bt=z._export_sfc(Nt,[["render",Et]]),Tt={props:{suiteMap:{type:Object,required:!0},disableButtons:{type:Boolean,required:!0},filename:{type:String,required:!0}},emits:["button","loaded"],data(){return{suites:[],groups:[],scripts:[],suite:"",group:"",script:"",options:["pauseOnError","manual","continueAfterError"],userInfo:{}}},computed:{checkedManualTooltip(){return this.filename.endsWith(".py")?"Checked sets the RunningScript.manual variable to True":"Checked sets the $manual variable to true"},uncheckedManualTooltip(){return this.filename.endsWith(".py")?"Unchecked sets the RunningScript.manual variable to False":"Unchecked sets the $manual variable to false"},setupSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].setup)},teardownSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].teardown)},setupGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].setup)},teardownGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].teardown)},scriptNames(){return this.scripts.map(i=>({title:i.replace(/^(script_|test_)/,""),value:i}))}},watch:{suiteMap:{handler:function(i,t){this.updateSuiteMap()},deep:!0}},created(){this.userInfo=JSON.parse(localStorage.script_runner__userinfo),this.initSuites(),this.$emit("loaded")},methods:{updateSuiteMap(){this.suites=Object.keys(this.suiteMap),this.suiteMap[this.suite]==null||this.suiteMap[this.suite].groups[this.group]==null?this.initSuites():(this.groups=Object.keys(this.suiteMap[this.suite].groups),this.scripts=this.suiteMap[this.suite].groups[this.group].scripts)},initSuites(){this.suites=Object.keys(this.suiteMap),this.suiteChanged(this.suites[0])},suiteChanged(i){!i||this.suiteMap[i]==null||(this.suite=i,this.group="",this.script="",this.groups=Object.keys(this.suiteMap[i].groups),this.groupChanged(this.groups[0]))},groupChanged(i){!i||this.suiteMap[this.suite]==null||this.suiteMap[this.suite].groups[i]==null||(this.group=i,this.script="",this.scripts=this.suiteMap[this.suite].groups[i].scripts,this.scriptChanged(this.scripts[0]))},scriptChanged(i){this.script=i}}},Ot={id:"tr-container"};function Rt(i,t,s,l,o,n){const r=e.resolveComponent("v-checkbox"),m=e.resolveComponent("v-tooltip"),d=e.resolveComponent("v-col"),g=e.resolveComponent("v-row"),w=e.resolveComponent("v-select"),_=e.resolveComponent("v-btn");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Ot,[e.createVNode(g,{"no-gutters":"",align:"center"},{default:e.withCtx(()=>[e.createVNode(d,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(d,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(m,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(r,{modelValue:o.options,"onUpdate:modelValue":t[0]||(t[0]=b=>o.options=b),label:"Pause on Error",value:"pauseOnError","hide-details":"","data-test":"pause-on-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[16]||(t[16]=e.createElementVNode("span",null,[e.createTextVNode(" Checked pauses the script when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked continues without user interaction ")],-1))]),_:1})]),_:1}),e.createVNode(d,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(m,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(r,{modelValue:o.options,"onUpdate:modelValue":t[1]||(t[1]=b=>o.options=b),label:"Manual",value:"manual","hide-details":"","data-test":"manual"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(n.checkedManualTooltip),1),t[17]||(t[17]=e.createElementVNode("br",null,null,-1)),e.createTextVNode(" "+e.toDisplayString(n.uncheckedManualTooltip),1)])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(d,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(d,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:o.suite,"onUpdate:modelValue":[t[2]||(t[2]=v=>o.suite=v),n.suiteChanged],label:"Suite:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:o.suites,"data-test":"select-suite"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),e.createVNode(d,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(_,{color:"primary",class:"mr-2",disabled:s.disableButtons||!o.userInfo.execute,"data-test":"start-suite",onClick:t[3]||(t[3]=v=>i.$emit("button",{method:"start",suite:o.suite,options:o.options}))},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(_,{color:"primary",class:"mr-2","data-test":"setup-suite",disabled:s.disableButtons||!n.setupSuiteEnabled||!o.userInfo.execute,onClick:t[4]||(t[4]=v=>i.$emit("button",{method:"setup",suite:o.suite,options:o.options}))},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode(" Setup ",-1)])]),_:1},8,["disabled"]),e.createVNode(_,{color:"primary","data-test":"teardown-suite",disabled:s.disableButtons||!n.teardownSuiteEnabled||!o.userInfo.execute,onClick:t[5]||(t[5]=v=>i.$emit("button",{method:"teardown",suite:o.suite,options:o.options}))},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode(" Teardown ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(d,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(d,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(m,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(r,{modelValue:o.options,"onUpdate:modelValue":t[6]||(t[6]=b=>o.options=b),label:"Continue after Error",value:"continueAfterError","hide-details":"","data-test":"continue-after-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[21]||(t[21]=e.createElementVNode("span",null,[e.createTextVNode(" Checked allows the script to continue when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked forces the current script to end ")],-1))]),_:1})]),_:1}),e.createVNode(d,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(m,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(r,{modelValue:o.options,"onUpdate:modelValue":t[7]||(t[7]=b=>o.options=b),label:"Loop",value:"loop","hide-details":"","data-test":"loop"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[22]||(t[22]=e.createElementVNode("span",null,[e.createTextVNode(" Checked continuously executes until explicitly stopped"),e.createElementVNode("br"),e.createTextVNode(" Unchecked executes only the started script(s) ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(d,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(d,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:o.group,"onUpdate:modelValue":[t[8]||(t[8]=v=>o.group=v),n.groupChanged],label:"Group:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:o.groups,"data-test":"select-group"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),e.createVNode(d,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(_,{color:"primary",class:"mr-2",disabled:s.disableButtons||!o.userInfo.execute,"data-test":"start-group",onClick:t[9]||(t[9]=v=>i.$emit("button",{method:"start",suite:o.suite,group:o.group,options:o.options}))},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(_,{color:"primary",class:"mr-2","data-test":"setup-group",disabled:s.disableButtons||!n.setupGroupEnabled||!o.userInfo.execute,onClick:t[10]||(t[10]=v=>i.$emit("button",{method:"setup",suite:o.suite,group:o.group,options:o.options}))},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode(" Setup ",-1)])]),_:1},8,["disabled"]),e.createVNode(_,{color:"primary","data-test":"teardown-group",disabled:s.disableButtons||!n.teardownGroupEnabled||!o.userInfo.execute,onClick:t[11]||(t[11]=v=>i.$emit("button",{method:"teardown",suite:o.suite,group:o.group,options:o.options}))},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode(" Teardown ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(d,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(d,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(m,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(r,{modelValue:o.options,"onUpdate:modelValue":t[12]||(t[12]=b=>o.options=b),label:"Abort after Error",value:"abortAfterError","hide-details":"","data-test":"abort-after-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[26]||(t[26]=e.createElementVNode("span",null,[e.createTextVNode(" Checked stops additional script execution when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked allows additional scripts to execute ")],-1))]),_:1})]),_:1}),e.createVNode(d,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(m,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(r,{modelValue:o.options,"onUpdate:modelValue":t[13]||(t[13]=b=>o.options=b),disabled:!o.options.includes("loop"),label:"Break Loop on Error",value:"breakLoopOnError","hide-details":"","data-test":"break-loop-on-error"},null,8,["modelValue","disabled"])],16)]),default:e.withCtx(()=>[t[27]||(t[27]=e.createElementVNode("span",null,[e.createTextVNode(" Checked breaks the loop option when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked allows the loop to run continuously"),e.createElementVNode("br"),e.createTextVNode(" Note: Abort after Error still breaks the loop ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(d,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(d,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:o.script,"onUpdate:modelValue":[t[14]||(t[14]=v=>o.script=v),n.scriptChanged],label:"Script:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:n.scriptNames,"item-title":"title","item-value":"value","data-test":"select-script"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),e.createVNode(d,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(_,{color:"primary",class:"mr-2",disabled:s.disableButtons||!o.userInfo.execute,"data-test":"start-script",onClick:t[15]||(t[15]=v=>i.$emit("button",{method:"start",suite:o.suite,group:o.group,script:o.script,options:o.options}))},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(_,{color:"primary",class:"mr-2 invisible"},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode(" Setup ",-1)])]),_:1}),e.createVNode(_,{color:"primary",class:"invisible"},{default:e.withCtx(()=>[...t[30]||(t[30]=[e.createTextVNode(" Teardown ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])])}const ge=z._export_sfc(Tt,[["render",Rt],["__scopeId","data-v-70eb4a37"]]);class Mt{#e;#t;#i;#o;#n;constructor(t,{pattern:s,text:l,type:o}){this.#e=`regexAnnotator-${Math.floor(Math.random()*1e7)}`,this.#t=t,this.#i=s,this.#o=l,this.#n=o}refresh=()=>{const t=this.#t.session;this.#a(t);const s={lines:t.doc.$lines,action:"insert",start:{row:0},end:{row:t.doc.$lines.length}};this.annotate(s,t)};annotate=(t,s)=>{if(t.lines.length>1)switch(t.action){case"insert":this.#l(s,t.start.row,t.lines.length-1);break;case"remove":this.#l(s,t.start.row+1,-t.lines.length+1);break}for(let l=t.start.row;l<=t.end.row;l++){let o=s.doc.$lines[l]?.match(this.#i)?.index;o!==void 0?(o!==0&&(o+=1),this.#r(s,{row:l,column:o,text:this.#o,type:this.#n,openc3Id:this.#e})):t.action==="remove"&&this.#s(s,l)}};#r=(t,s)=>{this.#s(t,s.row),t.setAnnotations([...t.getAnnotations(),s])};#s=(t,s)=>{t.setAnnotations(t.getAnnotations().filter(l=>l.openc3Id!==this.#e||l.row!==s))};#l=(t,s,l)=>{t.setAnnotations(t.getAnnotations().map(o=>(o.row>s&&(o.row+=l),o)))};#a=t=>{t.setAnnotations(t.getAnnotations().filter(s=>s.openc3Id!==this.#e))}}class Dt extends Mt{constructor(t){const s="(^|[{\\s])",l="sleep",o="[\\(\\s]";super(t,{pattern:new RegExp(`${s}${l}${o}`),text:"Use `wait` instead of `sleep` in OpenC3 scripts",type:"warning"})}}const ue="__TEMP__",L="<Untitled>",de="Start",Ft="Go",Y="Pause",It="Retry",Ut={components:{FileOpenSaveDialog:A.FileOpenSaveDialog,Openc3Screen:A.Openc3Screen,EnvironmentDialog:A.EnvironmentDialog,Splitpanes:De,Pane:Fe,TopBar:J.TopBar,AskDialog:Le,BucketDialog:Ye,FileDialog:tt,InformationDialog:rt,EventListDialog:Ve.EventListDialog,OverridesDialog:ut,PromptDialog:bt,ResultsDialog:yt,ScriptEnvironmentDialog:Bt,SimpleTextDialog:ke.SimpleTextDialog,SuiteRunner:ge,RunningScripts:he,ScriptLogMessages:fe,CriticalCmdDialog:be.CriticalCmdDialog,CommandEditor:pe.CommandEditor},mixins:[me.AceEditorModes,xe._sfc_main],beforeRouteUpdate:function(i,t,s){i.params.id?this.tryLoadRunningScript(i.params.id).then(s):s()},props:{inline:{type:Boolean,default:!1},body:{type:String,default:null},initialFilename:{type:String,default:null}},emits:["alert","script-id"],setup(){return{containerHeight:_e.useContainerHeight()}},data(){return{title:"Script Runner",suiteRunner:!1,disableSuiteButtons:!1,suiteMap:{},filenameSelect:null,currentFilename:null,showSave:!1,showAlert:!1,alertType:null,alertText:"",state:null,scriptId:null,startOrGoButton:de,startOrGoDisabled:!1,envDisabled:!1,pauseOrRetryButton:Y,pauseOrRetryDisabled:!1,stopDisabled:!1,showEnvironment:!1,showDebug:!1,debug:"",debugHistory:[],debugHistoryIndex:0,showDisconnect:!1,files:{},breakpoints:{},enableStackTraces:!1,filename:L,readOnlyUser:!1,executeUser:!0,saveAllowed:!0,tempFilename:null,fileModified:"",fileOpen:!1,lockedBy:null,showEditingToast:!1,showSaveAs:!1,areYouSure:!1,subscription:null,cable:null,fatal:!1,updateInterval:null,receivedEvents:[],messages:[],messagesNewestOnTop:!0,inlineTab:"script",maxArrayLength:200,Range:ace.require("ace/range").Range,ask:{show:!1,question:"",default:null,password:!1,answerRequired:!0,callback:()=>{}},file:{show:!1,message:"",directory:null,filter:"*",multiple:!1,callback:()=>{}},bucket:{show:!1,title:"",message:""},prompt:{show:!1,title:"",subtitle:"",message:"",details:"",buttons:null,layout:"horizontal",callback:()=>{}},information:{show:!1,title:"",text:[],width:"600"},inputMetadata:{show:!1,events:[],callback:()=>{}},results:{show:!1,text:""},scriptEnvironment:{show:!1,env:[]},showSuiteError:!1,suiteError:"",executeSelectionMenu:!1,menuX:0,menuY:0,mnemonicChecker:new Se,showScripts:!1,showOverrides:!1,overridesCount:0,commandEditor:{show:!1,targetName:null,commandName:null,dialogError:null,cmdString:null,isEditing:!1,editLine:null},currentLineHasCommand:!1,activePromptId:"",api:null,timeZone:"local",screens:[],screenKeywords:null,idCounter:0,updateCounter:0,recent:[],waitingInterval:null,waitingTime:0,waitingStart:0,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1,editorBoxSize:50}},computed:{stateTimer:function(){return this.state==="waiting"||this.state==="paused"?`${this.state} ${this.waitingTime}s`:this.state==="completed_errors"?"completed":this.state},stateColorClass:function(){return this.state==="error"||this.state==="crashed"||this.state==="killed"?"script-state-red":this.state==="completed_errors"?"script-state-orange":this.state==="completed"?"script-state-green":""},fileList:function(){const i=Object.keys(this.files);return i.push(this.fullFilename),[...new Set(i)]},environmentModified:function(){return this.scriptEnvironment.env.length>0},isLocked:function(){return!!this.lockedBy},fullFilename:function(){return this.currentFilename?this.currentFilename:this.filename===L?L:`${this.filename} ${this.fileModified}`.trim()},filenameOrBlank:function(){return this.filename===L?"":this.filename},menus:function(){return[{label:"File",items:[{label:"New File",icon:"mdi-file-plus",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.newFileWithConfirm()}},{label:"New Suite",icon:"mdi-file-document-plus",disabled:this.scriptId||this.readOnlyUser,subMenu:[{label:"Ruby",icon:"mdi-language-ruby",command:()=>{this.newRubyTestSuite()}},{label:"Python",icon:"mdi-language-python",command:()=>{this.newPythonTestSuite()}}]},{label:"Open File",icon:"mdi-folder-open",disabled:this.scriptId,command:()=>{this.openFileWithConfirm()}},{label:"Open Recent",icon:"mdi-folder-open",disabled:this.scriptId,subMenu:this.recent},{divider:!0},{label:"Save File",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveFile()}},{label:"Save As...",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveAs()}},{divider:!0},{label:"Download",icon:"mdi-cloud-download",disabled:this.scriptId,command:()=>{this.download()}},{divider:!0},{label:"Delete File",icon:"mdi-delete",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.delete()}}]},{label:"Edit",items:[{label:"Find",icon:"mdi-magnify",command:()=>{this.editor.execCommand("find")}},{label:"Replace",icon:"mdi-find-replace",disabled:this.scriptId,command:()=>{this.editor.execCommand("replace")}},{label:"Set Line Delay",icon:"mdi-invoice-text-clock",disabled:this.scriptId,command:()=>{this.$dialog.open({title:"Info",text:"You can set the line delay in seconds using the api method set_line_delay().<br/><br/>The default line delay is 0.1 seconds between lines. Adding set_line_delay(0) to the top of your script will execute the script at maximum speed. However, this can make it difficult to see and pause the script. Executing set_line_delay(1) will cause a 1 second delay between lines.",okText:"OK",okClass:"primary",validateText:null,cancelText:null,html:!0})}}]},{label:"Script",items:[{label:"Execution Status",icon:"mdi-run",command:()=>{this.showScripts=!0}},{divider:!0},{label:"Global Environment",icon:"mdi-library",disabled:this.scriptId,command:()=>{this.showEnvironment=!this.showEnvironment}},{label:"Metadata",icon:"mdi-calendar",disabled:this.scriptId,command:()=>{this.inputMetadata.callback=()=>{},this.showMetadata()}},{label:"Overrides",icon:"mdi-swap-horizontal",command:()=>{this.showOverrides=!0}},{divider:!0},{label:"Syntax Check",icon:"mdi-file-check",disabled:this.scriptId,command:()=>{this.syntaxCheck()}},{label:"Mnemonic Check",icon:"mdi-spellcheck",disabled:this.scriptId,command:()=>{this.checkMnemonics()}},{label:"Instrumented Script",icon:"mdi-code-braces-box",disabled:this.scriptId,command:()=>{this.showInstrumented()}},{label:"Call Stack",icon:"mdi-format-list-numbered",disabled:!this.scriptId,command:()=>{this.showCallStack()}},{divider:!0},{label:"Toggle Debug",icon:"mdi-bug",command:()=>{this.toggleDebug()}},{label:"Toggle Disconnect",icon:"mdi-connection",disabled:this.scriptId,command:()=>{this.toggleDisconnect()}},{label:"Enable Stack Traces",checkbox:!0,checked:this.enableStackTraces,disabled:this.scriptId,command:()=>{this.enableStackTraces=!this.enableStackTraces}},{divider:!0},{label:"Delete All Breakpoints",icon:"mdi-delete-circle-outline",disabled:this.scriptId,command:()=>{this.deleteAllBreakpoints()}}]}]}},watch:{isLocked:function(i){this.showEditingToast=i,this.suiteRunner||(this.startOrGoDisabled=i),this.readOnlyUser==!1&&i==!1&&!this.inline?this.editor.setReadOnly(i):this.editor.setReadOnly(!0)},fullFilename:function(i){this.filenameSelect=i,this.inline||(i===L?localStorage.removeItem("script_runner__filename"):localStorage.script_runner__filename=i)},readOnlyUser:function(i){this.editor&&(i?(this.editor.setReadOnly(!0),this.editor.renderer.$cursorLayer.element.style.display="none"):(this.inline||this.editor.setReadOnly(!1),this.editor.renderer.$cursorLayer.element.style.display=null))},showOverrides:function(i,t){t&&!i&&this.updateOverridesCount()}},created:async function(){this.api=new V.yi,this.api.ensure_offline_access(),this.api.get_setting("time_zone").then(s=>{s&&(this.timeZone=s)}).catch(s=>{}),this.updateOverridesCount(),this.NEW_FILENAME=L;let i=OpenC3Auth.user(),t=OpenC3Auth.userroles();this.readOnlyUser=!0,this.executeUser=!1;for(let s of t)s!="viewer"&&(s=="admin"||s=="operator"?(this.readOnlyUser=!1,this.executeUser=!0):s=="runner"?this.executeUser=!0:await V.Fr.get(`/openc3-api/roles/${s}`).then(l=>{l.data!==null&&l.data.permissions!==void 0&&(l.data.permissions.some(o=>o.permission=="script_edit")&&(this.readOnlyUser=!1),l.data.permissions.some(o=>o.permission=="script_run")&&(this.executeUser=!0))}));if(this.inline||(localStorage.script_runner__userinfo=JSON.stringify({name:i.preferred_username,readOnly:this.readOnlyUser,execute:this.executeUser})),this.readOnlyUser==!0){this.alertType="info";let s=`User ${i.preferred_username} is read only`;this.executeUser&&(s+=" but can execute scripts"),this.alertText=s,this.showAlert=!0}V.Fr.get("/openc3-api/autocomplete/keywords/screen").then(s=>{this.screenKeywords=s.data}),this.inline&&(this.readOnly=!0)},mounted:async function(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const i=this.buildRubyMode(),t=this.buildPythonMode();this.rubyMode=new i,this.pythonMode=new t,J.AceEditorUtils.getDefaultScriptingLanguage()==="python"?this.editor.session.setMode(this.pythonMode):this.editor.session.setMode(this.rubyMode),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new A.CmdCompleter,new A.TlmCompleter],this.editor.setHighlightActiveLine(!1),J.AceEditorUtils.applyVimModeIfEnabled(this.editor,{saveFn:this.saveFile}),this.editor.focus(),this.editor.on("guttermousedown",this.toggleBreakpoint),this.editor.session.on("tokenizerUpdate",this.onChange),(this.readOnlyUser||this.inline)&&(this.editor.setReadOnly(!0),this.editor.renderer.$cursorLayer.element.style.display="none");const l=new Dt(this.editor);this.editor.session.on("change",(o,n)=>{l.annotate(o,n),this.updateBreakpoints(o,n)}),this.editor.container.addEventListener("resize",this.doResize),this.editor.container.addEventListener("keydown",this.keydown),this.cable=new V.bi("/script-api/cable"),!this.inline&&localStorage.script_runner__recent&&(this.recent=JSON.parse(localStorage.script_runner__recent),this.recent=this.recent.map(o=>({...o,command:async n=>{this.filename=n.label,await this.reloadFile()}}))),this.inline?this.body&&(this.editor.setValue(this.body),this.editor.clearSelection(),this.initialFilename&&(this.filename=this.initialFilename)):this.$route.query?.file?(this.filename=this.$route.query.file,await this.reloadFile()):this.$route.params?.id?await this.tryLoadRunningScript(this.$route.params.id):(this.scriptId=sessionStorage.getItem("script_runner__script_id"),this.scriptId?await this.tryLoadRunningScript(this.scriptId):localStorage.script_runner__filename&&(this.filename=localStorage.script_runner__filename,await this.reloadFile(!1))),this.updateInterval=setInterval(async()=>{this.processReceived()},100)},beforeUnmount(){this.scriptId&&!this.inline&&sessionStorage.setItem("script_runner__script_id",this.scriptId),this.editor.destroy(),this.editor.container.remove()},unmounted(){this.unlockFile(),this.updateInterval!=null&&clearInterval(this.updateInterval),this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.cable.disconnect()},methods:{updateOverridesCount:function(){this.api.get_overrides().then(i=>{this.overridesCount=i.length})},toggleVimMode(){J.AceEditorUtils.toggleVimMode(this.editor)},openCommandEditor(){this.executeSelectionMenu=!1;const i=this.editor.getCursorPosition(),t=this.editor.session.getLine(i.row);if(this.currentLineHasCommand){const s=this.parseCommandFromLine(t);this.commandEditor.cmdString=s,this.commandEditor.isEditing=!0,this.commandEditor.editLine=i.row}else this.commandEditor.cmdString=null,this.commandEditor.isEditing=!1,this.commandEditor.editLine=null;this.commandEditor.show=!0,this.commandEditor.dialogError=null},insertCommand(i){let t="";try{t=this.$refs.commandEditor.getCmdString();let s=t.split(" ");this.commandEditor.targetName=s[0],this.commandEditor.commandName=s[1]}catch(s){this.commandEditor.dialogError=s.message||"Please fix command parameters";return}if(this.commandEditor.isEditing&&this.commandEditor.editLine!==null){const s=this.editor.session.getLine(this.commandEditor.editLine),l=s.match(/^\s*/)[0],o=s.match(/\s+#.*$/),n=o?o[0]:"",r=`${l}cmd("${t}")${n}`,m=this.Range;this.editor.session.replace(new m(this.commandEditor.editLine,0,this.commandEditor.editLine,s.length),r)}else{const s=this.editor.getCursorPosition();this.editor.session.insert(s,`cmd("${t}")
5
+ `)}this.fileModified=!0,this.commandEditor.show=!1},closeCommandDialog:function(){this.commandEditor.show=!1},doResize(){this.editor.resize()},scriptDisconnect(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0},showMetadata(){V.Fr.get("/openc3-api/metadata").then(i=>{this.inputMetadata.events=i.data.map(t=>({name:"Metadata",start:new Date(t.start*1e3),end:new Date(t.start*1e3),color:t.color,type:t.type,timed:!0,metadata:t})),this.inputMetadata.show=!0})},messageSortOrder(i){i==="Newest on Top"&&this.messagesNewestOnTop===!1?(this.messagesNewestOnTop=!0,this.messages.reverse()):i==="Newest on Bottom"&&this.messagesNewestOnTop===!0&&(this.messagesNewestOnTop=!1,this.messages.reverse())},fileNameChanged(i){i=i.split("*")[0],this.editor.setValue(this.files[i].content),this.restoreBreakpoints(i),this.editor.clearSelection(),this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(this.files[i].lineNo-1,0,this.files[i].lineNo-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(this.files[i].lineNo)},tryLoadRunningScript:function(i){return V.Fr.get(`/script-api/running-script/${i}`).then(t=>{if(t.data){let s=t.data.state;s!=="completed"&&s!=="completed_errors"&&s!=="stopped"&&s!=="crashed"&&s!=="killed"?(this.filename=t.data.filename,this.tryLoadSuites(t),this.initScriptStart(),this.scriptStart(i)):(this.$notify.caution({title:`Script ${i} has already completed`,body:"Check the Completed Scripts below ..."}),this.scriptComplete(),this.showScripts=!0)}else throw new Error(`Unable to load state for running script ${i}`)}).catch(t=>{this.$notify.caution({title:`Running Script ${i} not found`,body:"Check the Completed Scripts below ..."}),this.scriptComplete(),this.showScripts=!0})},tryLoadSuites:function(i){i.data.suites&&(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(i.data.suites)),this.doResize()},showExecuteSelectionMenu:function(i){this.menuX=i.pageX,this.menuY=i.pageY;const t=this.editor.getCursorPosition(),s=this.editor.session.getLine(t.row);this.currentLineHasCommand=this.isCommandLine(s),this.executeSelectionMenu=!0},isCommandLine:function(i){const t=i.trim();return/^\s*cmd(_\w+)?\s*\(/.test(t)},parseCommandFromLine:function(i){const t=i.match(/cmd(_\w+)?\s*\(\s*["'](.+?)["']\s*\)/);return t?t[2]:null},runFromCursor:function(){const i=this.editor.getCursorPosition().row+1;this.scriptId?V.Fr.post(`/script-api/running-script/${this.scriptId}/executewhilepaused`,{data:{args:[this.filenameSelect,i]}}):this.start(null,null,i)},executeSelection:function(){const i=this.editor.getSelectionRange();let t=i.start.row+1,s=i.end.row+1;i.end.column===0&&(s-=1),this.scriptId?V.Fr.post(`/script-api/running-script/${this.scriptId}/executewhilepaused`,{data:{args:[this.filenameSelect,t,s]}}):this.start(null,null,t,s)},clearBreakpoints:function(){this.editor.session.clearBreakpoints()},toggleBreakpoint:function(i){if(!this.scriptId){const t=i.getDocumentPosition().row;i.editor.session.getBreakpoints(t,0)[t]?i.editor.session.clearBreakpoint(t):i.editor.session.setBreakpoint(t)}},updateBreakpoints:function(i,t){if(i.lines.length<=1)return;const s=this.getBreakpointRows(t).filter(n=>i.start.column===0&&n===i.start.row||n>i.start.row);let l=[],o=0;switch(i.action){case"insert":o=i.lines.length-1,s.reverse();break;case"remove":o=-i.lines.length+1,l=[...Array(i.lines.length).keys()].map(n=>n+i.start.row);break}s.forEach(n=>{t.clearBreakpoint(n),l.includes(n)||t.setBreakpoint(n+o)})},getBreakpointRows:function(i=this.editor.session){return i.getBreakpoints().map((t,s)=>t&&s).filter(Number.isInteger)},restoreBreakpoints:function(i){this.clearBreakpoints(),this.breakpoints[i]?.forEach(t=>{this.editor.session.setBreakpoint(t)})},deleteAllBreakpoints:function(){this.$dialog.confirm("Permanently delete all breakpoints for ALL scripts?",{okText:"Delete",cancelText:"Cancel"}).then(i=>V.Fr.delete("/script-api/breakpoints/delete/all")).then(i=>{this.clearBreakpoints()})},suiteRunnerButton(i){this.startOrGoButton===de?this.start(i,"suiteRunner"):this.go(i,"suiteRunner")},async keydown(i){this.scriptId||this.editor.getReadOnly()===!0||(i.metaKey||i.ctrlKey)&&i.keyCode===83&&(i.shiftKey?(i.preventDefault(),this.saveAs()):(i.preventDefault(),await this.saveFile()))},onChange(i){this.scriptId||this.editor.getReadOnly()===!0||(this.editor.session.getUndoManager().canUndo()?this.fileModified="*":this.fileModified="")},checkMnemonics:function(){let i=this.filename;this.filename!==L&&(i.endsWith(".rb")||i.endsWith(".py")||V.Fr.post(`/script-api/scripts/${this.filename}/mnemonics`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(t=>{let s="";s+=`<strong>${t.data.title}</strong><br/><br/>`,s+=JSON.parse(t.data.description),this.$dialog.alert(s.trim(),{html:!0})})),this.mnemonicChecker.checkText(this.editor.getValue()).then(({skipped:t,problems:s})=>{let l="";if(s.length){const o=s.map(n=>`${n.lineNumber}: ${n.error}`).join("<br/>");l+=`<strong>The following lines have problems:</strong><br/>${o}<br/><br/>`}t.length&&(l+="<strong>Mnemonics with string interpolation were not checked.</strong>"),l===""&&(l="<strong>Everything looks good!</strong>"),this.$dialog.alert(l.trim(),{html:!0})})},initScriptStart(){this.disableSuiteButtons=!0,this.startOrGoDisabled=!0,this.envDisabled=!0,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0,this.state="Connecting...",this.startOrGoButton=Ft,this.editor.setReadOnly(!0)},scriptStart(i){this.$emit("script-id",i),this.scriptId=i,this.cable.createSubscription("RunningScriptChannel",window.openc3Scope,{received:t=>this.received(t)},{id:this.scriptId}).then(t=>{this.subscription=t})},async scriptComplete(){this.subscription&&(await this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0,await this.reloadFile(),this.editor.session.getUndoManager().reset(),this.readOnlyUser==!1&&!this.inline&&this.editor.setReadOnly(!1),this.scriptId=null,sessionStorage.removeItem("script_runner__script_id"),this.disableSuiteButtons=!1,this.startOrGoButton=de,this.pauseOrRetryButton=Y,this.startOrGoDisabled=this.suiteRunner,this.envDisabled=!1,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0,this.updateOverridesCount()},environmentHandler:function(i){this.scriptEnvironment.env=i},startHandler:function(){this.start()},async start(i=null,t=null,s=null,l=null){this.initScriptStart(),await this.saveFile("start"),this.saveAllowed=!1;let o=this.filename;this.filename===L&&(o=this.tempFilename);let n=`/script-api/scripts/${o}/run`;this.showDisconnect&&(n+="/disconnect");let r=this.scriptEnvironment.env;this.enableStackTraces&&(r=r.concat({key:"OPENC3_FULL_BACKTRACE",value:"1"}));let m={environment:r};t&&(m.suiteRunner=i),s!==null&&(m.line_no=s),l!==null&&(m.end_line_no=l),V.Fr.post(n,{data:m}).then(d=>{this.scriptStart(d.data)}).catch(d=>{this.scriptComplete()})},go(){this.filenameSelect=this.currentFilename,this.fileNameChanged(this.currentFilename),V.Fr.post(`/script-api/running-script/${this.scriptId}/go`)},pauseOrRetry(){this.pauseOrRetryButton===Y?V.Fr.post(`/script-api/running-script/${this.scriptId}/pause`):(this.pauseOrRetryButton=Y,V.Fr.post(`/script-api/running-script/${this.scriptId}/retry`))},stop(){V.Fr.post(`/script-api/running-script/${this.scriptId}/stop`)},step(){V.Fr.post(`/script-api/running-script/${this.scriptId}/step`)},handleWaiting(){if(this.state!=="waiting"&&this.state!=="paused")this.clearWaiting();else if(this.waitingInterval!==null)return;this.waitingStart=Date.now(),this.waitingInterval=setInterval(()=>{this.waitingTime=Math.round((Date.now()-this.waitingStart)/1e3)},1e3)},clearWaiting(){this.waitingTime=0,clearInterval(this.waitingInterval),this.waitingInterval=null},processLine(i){i.filename&&i.filename!==this.currentFilename&&(this.files[i.filename]?(this.currentFilename=i.filename,this.editor.setValue(this.files[i.filename].content),this.restoreBreakpoints(i.filename),this.editor.clearSelection()):(this.files[i.filename]={content:"",lineNo:0},V.Fr.get(`/script-api/scripts/${i.filename}`).then(s=>{this.files[i.filename]={content:s.data.contents,lineNo:0},this.breakpoints[i.filename]=s.data.breakpoints,this.restoreBreakpoints(i.filename),this.currentFilename=null}).catch(s=>{this.files[i.filename]=null}))),this.state=i.state;const t=this.editor.session.getMarkers();switch(this.state){case"running":this.handleWaiting(),this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1,this.stopDisabled=!1,this.pauseOrRetryButton=Y,this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(i.line_no-1,0,i.line_no-1,1),"runningMarker","fullLine"),this.editor.gotoLine(i.line_no),this.files[i.filename].lineNo=i.line_no;break;case"error":this.pauseOrRetryButton=It;case"spawning":case"init":case"paused":case"waiting":case"breakpoint":if(this.handleWaiting(),this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1,this.stopDisabled=!1,Object.keys(t).filter(l=>t[l].clazz===`${this.state}Marker`).length===0){this.removeAllMarkers();let l=i.line_no>0?i.line_no:1;this.editor.session.addMarker(new this.Range(l-1,0,l-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(l),i.filename&&(this.files[i.filename].lineNo=l)}break;case"completed":case"completed_errors":case"stopped":case"crashed":case"killed":this.removeAllMarkers();break}},processReceived(){let i=0;for(let t of this.receivedEvents){i+=1;let s=0;switch(t.type){case"file":this.files[t.filename]={content:t.text,lineNo:0},this.breakpoints[t.filename]=t.breakpoints,this.currentFilename===t.filename&&this.restoreBreakpoints(t.filename);break;case"line":this.processLine(t);break;case"output":let l=t.line;l==null?l="":typeof l=="object"?l=JSON.stringify(l):l=String(l);for(const m of l.split(`
6
+ `))m&&(this.messagesNewestOnTop?this.messages.unshift({message:m}):this.messages.push({message:m}));for(;this.messages.length>this.maxArrayLength;)this.messages.pop();break;case"script":this.handleScript(t);break;case"report":this.results.text=t.report,this.results.show=!0;break;case"complete":t.report&&(this.results.text=t.report,this.results.show=!0),this.removeAllMarkers(),this.scriptComplete();break;case"step":this.showDebug=!0;break;case"screen":let o=!1,n={};for(screen of this.screens){if(screen.target==t.target_name&&screen.screen==t.screen_name){n=screen,o=!0;break}s+=1}n.target=t.target_name,n.screen=t.screen_name,n.definition=t.definition,t.x?n.left=t.x:n.left=0,t.y?n.top=t.y:n.top=0,n.count=this.updateCounter++,o?this.screens[s]=n:(n.id=this.idCounter++,this.screens[this.screens.length]=n);break;case"clearscreen":for(screen of this.screens){if(screen.target==t.target_name&&screen.screen==t.screen_name){this.screens.splice(s,1);break}s+=1}break;case"clearallscreens":this.screens=[];break;case"downloadfile":const r=document.createElement("a");r.href=window.location.origin+t.url,r.setAttribute("download",t.filename),r.click();break;case"opentab":window.open(t.url,"_blank");break}}this.receivedEvents.splice(0,i)},received(i){this.cable.recordPing(),this.receivedEvents.push(i)},promptDialogCallback(i){this.prompt.show=!1,V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.prompt.method,answer:i,prompt_id:this.activePromptId,multiple:this.prompt.multiple}})},handleScript(i){if(i.prompt_complete){this.activePromptId="",this.prompt.show=!1,this.ask.show=!1,this.file.show=!1,this.bucket.show=!1;return}switch(this.activePromptId=i.prompt_id,this.prompt.method=i.method,this.prompt.layout="horizontal",this.prompt.title="Prompt",this.prompt.subtitle="",this.prompt.details="",this.prompt.buttons=[],this.prompt.multiple=null,i.method){case"ask":case"ask_string":this.ask.default=null,this.ask.answerRequired=!0,this.ask.password=!1,this.ask.question=i.args[0],i.args[1]&&i.args[1]!==!0&&i.args[1]!==!1?this.ask.default=i.args[1].toString():i.args[1]===!0&&(this.ask.answerRequired=!1),i.args[2]===!0&&(this.ask.password=!0),this.ask.callback=t=>{this.ask.show=!1,this.ask.password?V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:i.method,password:t,prompt_id:this.activePromptId}}):V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:i.method,answer:t,prompt_id:this.activePromptId}})},this.ask.show=!0;break;case"prompt_for_hazardous":this.prompt.title="Hazardous Command",this.prompt.message=`Warning: Command ${i.args[0]} ${i.args[1]} is Hazardous. `,i.args[2]&&(this.prompt.message+=i.args[2]+" "),this.prompt.message+="Send?",this.prompt.buttons=[{text:"Send",value:"Send"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"prompt_for_critical_cmd":this.criticalCmdUuid=i.args[0],this.criticalCmdString=i.args[5],this.criticalCmdUser=i.args[1],this.displayCriticalCmd=!0;break;case"prompt":i.kwargs&&i.kwargs.informative&&(this.prompt.subtitle=i.kwargs.informative),i.kwargs&&i.kwargs.details&&(this.prompt.details=i.kwargs.details),this.prompt.message=i.args[0],this.prompt.buttons=[{text:"Ok",value:"Ok"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"combo_box":case"check_box":i.kwargs&&i.kwargs.informative&&(this.prompt.subtitle=i.kwargs.informative),i.kwargs&&i.kwargs.details&&(this.prompt.details=i.kwargs.details),(i.method==="check_box"||i.kwargs&&i.kwargs.multiple)&&(this.prompt.multiple=!0),this.prompt.message=i.args[0],i.args.slice(1).forEach(t=>{this.prompt.buttons.push({title:t,value:t})}),this.prompt.layout=i.method.split("_")[0],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"message_box":case"vertical_message_box":i.kwargs&&i.kwargs.informative&&(this.prompt.subtitle=i.kwargs.informative),i.kwargs&&i.kwargs.details&&(this.prompt.details=i.kwargs.details),this.prompt.message=i.args[0],i.args.slice(1).forEach(t=>{this.prompt.buttons.push({text:t,value:t})}),i.method.includes("vertical")&&(this.prompt.layout="vertical"),this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"backtrace":this.information.title="Call Stack",this.information.text=i.args,this.information.show=!0,this.information.width="600";break;case"metadata_input":this.inputMetadata.callback=t=>{this.inputMetadata.show=!1,V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:i.method,answer:t,prompt_id:this.activePromptId}})},this.showMetadata();break;case"open_bucket_dialog":this.bucket.title=i.args[0],this.bucket.message=i.args[1],this.bucket.show=!0;break;case"open_file_dialog":case"open_files_dialog":this.file.title=i.args[0],this.file.message=i.args[1],i.kwargs&&i.kwargs.filter&&(this.file.filter=i.kwargs.filter),i.method=="open_files_dialog"&&(this.file.multiple=!0),this.file.show=!0;break}},async fileDialogCallback(i){let t="COSMOS__CANCEL",s=[];i!="COSMOS__CANCEL"&&(t=[],i.forEach(l=>{t.push(l.name),s.push(V.Fr.get(`/openc3-api/storage/upload/${encodeURIComponent(`${window.openc3Scope}/tmp/${l.name}`)}?bucket=OPENC3_CONFIG_BUCKET`).then(o=>{s.push(we.axios({...o.data,data:l}))}))})),Promise.all(s).then(l=>{V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.file.multiple?"open_files_dialog":"open_file_dialog",answer:t,prompt_id:this.activePromptId}}),this.file.show=!1})},bucketDialogCallback(i){this.bucket.show=!1,V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:"open_bucket_dialog",answer:i,prompt_id:this.activePromptId}})},setError(i){this.alertType="error",this.alertText=`Error: ${i}`,this.showAlert=!0},async confirmUnsavedChanges(){return this.fileModified==="*"?await this.$dialog.confirm("You have unsaved changes. Are you sure you want to continue?",{okText:"Continue",cancelText:"Cancel"}):!0},async newFileWithConfirm(){await this.confirmUnsavedChanges()&&this.newFile()},newFile(){this.unlockFile(),this.filename=L,this.currentFilename=null,this.tempFilename=null,this.files={},this.editor.session.setValue(""),this.saveAllowed=!0,this.fileModified="",this.suiteRunner=!1,this.startOrGoDisabled=!1,this.envDisabled=!1,this.inline||(this.$router.replace({name:"ScriptRunner"}).catch(i=>{}),document.title="Script Runner"),this.doResize()},async newRubyTestSuite(){await this.confirmUnsavedChanges()&&(this.newFile(),this.editor.session.setValue(`require 'openc3/script/suite.rb'
7
7
 
8
8
  # Group class name should indicate what the scripts are testing
9
9
  class Power < OpenC3::Group
@@ -81,6 +81,6 @@ class TestSuite(Suite):
81
81
  # Run when Suite Teardown button is pressed
82
82
  # Run after all groups when Suite Start is pressed
83
83
  pass
84
- `),await this.saveFile("auto"))},addToRecent(i){let t=this.recent.findIndex(s=>s.label===i);t!==-1&&this.recent.splice(t,1),this.recent.unshift({label:i,icon:Ce.fileIcon(i),command:async s=>{await this.confirmUnsavedChanges()&&(this.filename=s.label,await this.reloadFile())}}),this.recent.length>8&&this.recent.pop(),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent))},removeFromRecent(i){this.recent=this.recent.filter(t=>t.label!==i),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent),localStorage.script_runner__filename===i&&localStorage.removeItem("script_runner__filename"))},async openFileWithConfirm(){await this.confirmUnsavedChanges()&&this.openFile()},openFile(){this.fileOpen=!0},async reloadFile(i=!0){this.saveAllowed=!1,this.startOrGoDisabled=!0,await V.li.get(`/script-api/scripts/${this.filename}`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(t=>{const s={name:this.filename,contents:t.data.contents};t.data.suites&&(s.suites=JSON.parse(t.data.suites)),t.data.error&&(s.error=t.data.error),t.data.success&&(s.success=t.data.success);const r=t.data.locked,o=t.data.breakpoints;this.setFile({file:s,locked:r,breakpoints:o},!0),this.saveAllowed=!0}).catch(t=>{i===!0&&this.$notify.caution({title:"File Open Error",body:`Failed to open ${this.filename} due to ${t}`}),this.removeFromRecent(this.filename),this.newFile()})},setFile({file:i,locked:t,breakpoints:s},r=!1){this.files={};let o=i.name.split("*")[0];if(r===!1&&this.filename!==o&&(this.unlockFile(),this.lockedBy=t),this.filename=o,!this.inline){this.$router.replace({name:"ScriptRunner",query:{file:this.filename}}).catch(a=>{});let n=this.filename.split("/");document.title=`${n.pop()} (${n.join("/")})`}this.filename.split(".").pop()==="py"?this.editor.session.setMode(this.pythonMode):this.editor.session.setMode(this.rubyMode),this.currentFilename=null,this.editor.session.setValue(i.contents),this.breakpoints[this.filename]=s,this.restoreBreakpoints(this.filename),this.fileModified="",this.envDisabled=!1,this.addToRecent(this.filename),i.suites?(this.suiteRunner=!0,this.suiteMap=i.suites,this.startOrGoDisabled=!0):(this.suiteRunner=!1,this.startOrGoDisabled=!1),i.error&&(this.suiteError=i.error,this.showSuiteError=!0),this.disableSuiteButtons=i.success==!1,this.doResize()},clearTemp(){this.recent=this.recent.filter(i=>!i.label.includes("__TEMP__")),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent))},detectLanguage(){let i=new RegExp("^\\s*(require|load|puts) "),t=new RegExp("^\\s*(import|from) "),s=new RegExp("^\\s*end\\s*$"),r=new RegExp("^\\s*(if|def|while|else|elif|class).*:\\s*$"),o=/\(f"/,n=/\(.*\w+:\s+.+\)(?!:)$/,p=this.editor.getValue().split(`
85
- `);for(let c of p){if(c.match(i))return"ruby";if(c.match(t))return"python";if(c.match(s))return"ruby";if(c.match(r)||c.match(o))return"python";if(c.match(n))return"ruby"}return"unknown"},async saveFile(i="menu"){if(!this.readOnlyUser)if(this.saveAllowed){const t=this.getBreakpointRows();if(this.filename===z){if(i==="menu"){this.saveAs();return}else if(this.tempFilename===null){let s=this.detectLanguage();s==="unknown"&&(s=J.AceEditorUtils.getDefaultScriptingLanguage());const r=crypto.randomUUID().split("-")[0];if(s==="ruby")this.tempFilename=ue+"/"+$.format(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+"_"+r+"_temp.rb";else if(s==="python")this.tempFilename=ue+"/"+$.format(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+"_"+r+"_temp.py";else return;this.filename=this.tempFilename,this.addToRecent(this.filename)}}this.showSave=!0,await V.li.post(`/script-api/scripts/${this.filename}`,{data:{text:this.editor.getValue(),breakpoints:t}}).then(s=>{s.status==200?(s.data.suites?(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(s.data.suites)):(this.startOrGoDisabled=!1,this.suiteRunner=!1,this.suiteMap={}),s.data.error&&(this.suiteError=s.data.error,this.showSuiteError=!0),this.fileModified="",setTimeout(()=>{this.showSave=!1},2e3)):(this.showSave=!1,this.alertType="error",this.alertText=`Error saving file. Code: ${s.status} Text: ${s.statusText}`,this.showAlert=!0),this.lockFile(),this.doResize()}).catch(({response:s})=>{this.showSave=!1,s.status==422?(this.alertType="error",this.alertText=s.data.suites):(this.alertType="error",this.alertText=`Error saving file. Code: ${s.status} Text: ${s.statusText}`),this.showAlert=!0})}else this.setError("Attempt to save file when not allowed")},saveAs(){this.showSaveAs=!0},async saveAsFilename(i){this.filename=i.split("*")[0],this.currentFilename=null,this.tempFilename&&(V.li.post(`/script-api/scripts/${this.tempFilename}/delete`),this.tempFilename=null),await this.saveFile("menu")},delete(){let i=this.filename;this.tempFilename&&(i=this.tempFilename),this.$dialog.confirm(`Permanently delete file: ${i}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>V.li.post(`/script-api/scripts/${i}/delete`,{data:{}})).then(t=>{this.removeFromRecent(i),this.newFile()}).catch(t=>{if(t!==!0){const s={text:`Failed Multi-Delete. ${t}`,type:"error"};this.$emit("alert",s)}})},download(){const i=new Blob([this.editor.getValue()],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.setAttribute("download",this.filename),t.click()},syntaxCheck(){V.li.post(`/script-api/scripts/${this.filename}/syntax`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(i=>{this.information.title=i.data.title,this.information.text=JSON.parse(i.data.description),this.information.show=!0,this.information.width="600"})},showInstrumented(){V.li.post(`/script-api/scripts/${this.filename}/instrumented`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(i=>{this.information.title=i.data.title,this.information.text=JSON.parse(i.data.description),this.information.show=!0,this.information.width="90vw"})},showCallStack(){V.li.post(`/script-api/running-script/${this.scriptId}/backtrace`)},toggleDebug(){this.showDebug=!this.showDebug,this.showDebug&&this.$nextTick(()=>{this.$refs.debug.focus()})},toggleDisconnect(){this.showDisconnect=!this.showDisconnect},debugKeydown(i){i.key==="Escape"?(this.debug="",this.debugHistoryIndex=this.debugHistory.length):i.key==="Enter"?(this.debugHistory.push(this.debug),this.debugHistoryIndex=this.debugHistory.length,V.li.post(`/script-api/running-script/${this.scriptId}/debug`,{data:{args:this.debug}}),this.debug=""):i.key==="ArrowUp"?(this.debugHistoryIndex-=1,this.debugHistoryIndex<0&&(this.debugHistoryIndex=this.debugHistory.length-1),this.debug=this.debugHistory[this.debugHistoryIndex],i.preventDefault()):i.key==="ArrowDown"&&(this.debugHistoryIndex+=1,this.debugHistoryIndex>=this.debugHistory.length&&(this.debugHistoryIndex=0),this.debug=this.debugHistory[this.debugHistoryIndex])},removeAllMarkers:function(){const i=this.editor.session.getMarkers();Object.keys(i).filter(t=>i[t].type==="fullLine").forEach(t=>this.editor.session.removeMarker(t))},confirmLocalUnlock:function(){this.$dialog.confirm("Are you sure you want to unlock this script for editing? If another user is editing this script, your changes might conflict with each other.",{okText:"Force Unlock",cancelText:"Cancel"}).then(()=>(this.lockedBy=null,this.lockFile()))},lockFile:function(){if(!this.readOnlyUser)return V.li.post(`/script-api/scripts/${this.filename}/lock`)},unlockFile:function(){this.filename!==z&&!this.readOnly&&!this.readOnlyUser&&V.li.post(`/script-api/scripts/${this.filename}/unlock`)},backToNewScript:async function(){this.scriptDisconnect(),this.removeAllMarkers(),await this.scriptComplete(),this.newFile()},screenId(i){return"scriptRunnerScreen"+i},closeScreen(i){let t=0;for(screen of this.screens){if(screen.id==i){this.screens.splice(t,1);break}t+=1}}}},Et={class:"grid"},Tt=["id"],Bt={class:"item-content"},Rt={id:"sr-controls"},Ot={class:"d-flex align-center mr-1"},Mt={key:0},Dt={key:1},It={key:2,style:{width:"40px",height:"40px"},class:"mx-2"},Ut={key:3},Pt={key:4},zt={key:0,id:"debug",class:"pa-0"},Lt={key:1,style:{"background-color":"var(--color-background-base-default)",margin:"0px",padding:"0px"}},Ft={key:0},At={key:1},Ht={style:{height:"200px",overflow:"hidden"}},qt={key:0,class:"error-message"},Gt={class:"flex-grow-1"};function Kt(i,t,s,r,o,n){const a=e.resolveComponent("top-bar"),p=e.resolveComponent("v-icon"),c=e.resolveComponent("v-btn"),g=e.resolveComponent("v-snackbar"),_=e.resolveComponent("openc3-screen"),C=e.resolveComponent("suite-runner"),v=e.resolveComponent("v-tooltip"),x=e.resolveComponent("v-select"),k=e.resolveComponent("v-text-field"),S=e.resolveComponent("v-progress-circular"),w=e.resolveComponent("v-spacer"),T=e.resolveComponent("v-badge"),B=e.resolveComponent("v-row"),E=e.resolveComponent("v-card-text"),R=e.resolveComponent("v-card"),M=e.resolveComponent("v-list-item"),H=e.resolveComponent("v-divider"),N=e.resolveComponent("v-list"),D=e.resolveComponent("v-menu"),G=e.resolveComponent("pane"),A=e.resolveComponent("script-log-messages"),ee=e.resolveComponent("splitpanes"),Z=e.resolveComponent("v-tab"),te=e.resolveComponent("v-tabs"),K=e.resolveComponent("v-col"),X=e.resolveComponent("v-tabs-window-item"),q=e.resolveComponent("v-tabs-window"),Q=e.resolveComponent("file-open-save-dialog"),ie=e.resolveComponent("environment-dialog"),oe=e.resolveComponent("ask-dialog"),j=e.resolveComponent("file-dialog"),ne=e.resolveComponent("information-dialog"),se=e.resolveComponent("event-list-dialog"),re=e.resolveComponent("overrides-dialog"),W=e.resolveComponent("prompt-dialog"),I=e.resolveComponent("results-dialog"),le=e.resolveComponent("script-environment-dialog"),l=e.resolveComponent("simple-text-dialog"),u=e.resolveComponent("critical-cmd-dialog"),f=e.resolveComponent("v-card-title"),m=e.resolveComponent("command-editor"),h=e.resolveComponent("v-card-actions"),b=e.resolveComponent("v-dialog"),y=e.resolveComponent("running-scripts"),O=e.resolveComponent("v-sheet"),U=e.resolveComponent("v-bottom-sheet");return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.inline?(e.openBlock(),e.createElementBlock("div",Lt,[e.createVNode(B,{"no-gutters":"",justify:"right"},{default:e.withCtx(()=>[e.createVNode(te,{modelValue:o.inlineTab,"onUpdate:modelValue":t[16]||(t[16]=d=>o.inlineTab=d),density:"compact"},{default:e.withCtx(()=>[e.createVNode(Z,{value:"script",text:"Script","data-test":"script-tab"}),e.createVNode(Z,{value:"messages",text:"Messages","data-test":"messages-tab"})]),_:1},8,["modelValue"]),e.createVNode(v,{location:"bottom",text:o.filenameSelect,disabled:!o.filenameSelect||o.filenameSelect.length<=45},{activator:e.withCtx(({props:d})=>[e.createElementVNode("div",e.mergeProps(d,{style:{width:"32rem"}}),[e.createVNode(x,{id:"inline-filename",modelValue:o.filenameSelect,"onUpdate:modelValue":[t[17]||(t[17]=P=>o.filenameSelect=P),n.fileNameChanged],items:n.fileList,disabled:n.fileList.length<=1,label:"Filename","data-test":"filename",density:"compact",variant:"outlined","hide-details":""},null,8,["modelValue","items","disabled","onUpdate:modelValue"])],16)]),_:1},8,["text","disabled"]),e.createVNode(k,{modelValue:o.scriptId,"onUpdate:modelValue":t[18]||(t[18]=d=>o.scriptId=d),label:"Script ID","data-test":"id",class:"shrink ml-2 script-state",style:{"max-width":"100px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue"]),e.createVNode(k,{modelValue:n.stateTimer,"onUpdate:modelValue":t[19]||(t[19]=d=>n.stateTimer=d),label:"Script State","data-test":"state",class:e.normalizeClass(["shrink","ml-2","script-state",n.stateColorClass]),style:{"max-width":"120px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue","class"]),o.state==="Connecting..."?(e.openBlock(),e.createBlock(S,{key:0,size:40,class:"mx-2",indeterminate:"",color:"primary"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(q,{modelValue:o.inlineTab,"onUpdate:modelValue":t[22]||(t[22]=d=>o.inlineTab=d)},{default:e.withCtx(()=>[e.createVNode(X,{value:"script"},{default:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(()=>[e.createVNode(K,{class:"v-col-10",style:{margin:"15px 0px 0px 0px",padding:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("pre",{ref:"editor",class:"editor",style:{height:"200px"},onContextmenu:t[20]||(t[20]=e.withModifiers((...d)=>n.showExecuteSelectionMenu&&n.showExecuteSelectionMenu(...d),["prevent"]))},null,544)]),_:1}),e.createVNode(K,{class:"v-col-2",style:{display:"flex","justify-content":"center","align-items":"center","background-color":"var(--color-background-surface-default)"}},{default:e.withCtx(()=>[o.startOrGoButton==="Start"?(e.openBlock(),e.createElementBlock("div",Ft,[e.createVNode(c,{class:"mx-1",color:"primary",text:"Start","data-test":"start-button",disabled:o.startOrGoDisabled||!o.executeUser,hidden:o.suiteRunner,onClick:n.startHandler},null,8,["disabled","hidden","onClick"])])):(e.openBlock(),e.createElementBlock("div",At,[e.createVNode(c,{color:"primary",class:"ma-2",text:"Go",disabled:o.startOrGoDisabled,"data-test":"go-button",onClick:n.go},null,8,["disabled","onClick"]),e.createVNode(c,{color:"primary",class:"ma-2",text:o.pauseOrRetryButton,disabled:o.pauseOrRetryDisabled,"data-test":"pause-retry-button",onClick:n.pauseOrRetry},null,8,["text","disabled","onClick"]),e.createVNode(c,{color:"primary",class:"ma-2",text:"Stop","data-test":"stop-button",disabled:o.stopDisabled,onClick:n.stop},null,8,["disabled","onClick"])]))]),_:1})]),_:1})]),_:1}),e.createVNode(X,{value:"messages"},{default:e.withCtx(()=>[e.createElementVNode("div",Ht,[e.createVNode(A,{modelValue:o.messages,"onUpdate:modelValue":t[21]||(t[21]=d=>o.messages=d),"newest-on-top":o.messagesNewestOnTop,onMessageOrderChanged:i.messageOrderChanged},null,8,["modelValue","newest-on-top","onMessageOrderChanged"])])]),_:1})]),_:1},8,["modelValue"])])):(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-flex flex-column overflow-hidden",style:e.normalizeStyle({height:r.containerHeight})},[e.createVNode(a,{menus:n.menus,title:o.title},null,8,["menus","title"]),e.createVNode(g,{modelValue:o.showAlert,"onUpdate:modelValue":t[1]||(t[1]=d=>o.showAlert=d),absolute:"",color:o.alertType,timeout:3e3,class:"apply-top",style:e.normalizeStyle(i.classificationStyles)},{actions:e.withCtx(({attrs:d})=>[e.createVNode(c,e.mergeProps({variant:"text",text:"Close"},d,{onClick:t[0]||(t[0]=P=>o.showAlert=!1)}),null,16)]),default:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createTextVNode(" mdi-"+e.toDisplayString(o.alertType),1)]),_:1}),e.createTextVNode(" "+e.toDisplayString(o.alertText)+" ",1)]),_:1},8,["modelValue","color","style"]),e.createVNode(g,{modelValue:o.showEditingToast,"onUpdate:modelValue":t[3]||(t[3]=d=>o.showEditingToast=d),absolute:"",class:"apply-top",style:e.normalizeStyle(i.classificationStyles),timeout:-1,color:"orange"},{actions:e.withCtx(({attrs:d})=>[e.createVNode(c,e.mergeProps({variant:"text"},d,{color:"danger",text:"Unlock","data-test":"unlock-button",onClick:n.confirmLocalUnlock}),null,16,["onClick"]),e.createVNode(c,e.mergeProps({variant:"text",text:"Dismiss"},d,{onClick:t[2]||(t[2]=()=>{o.showEditingToast=!1})}),null,16)]),default:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[...t[48]||(t[48]=[e.createTextVNode(" mdi-pencil-off ",-1)])]),_:1}),e.createTextVNode(" "+e.toDisplayString(o.lockedBy)+" is editing this script. Editor is in read-only mode ",1)]),_:1},8,["modelValue","style"]),e.createElementVNode("div",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.screens,d=>(e.openBlock(),e.createElementBlock("div",{id:n.screenId(d.id),key:d.id,ref_for:!0,ref:"gridItem",class:"item"},[e.createElementVNode("div",Bt,[e.createVNode(_,{target:d.target,screen:d.screen,definition:d.definition,keywords:o.screenKeywords,"initial-floated":!0,"initial-top":d.top,"initial-left":d.left,"initial-z":3,"min-z":3,"fix-floated":!0,count:d.count,onCloseScreen:P=>n.closeScreen(d.id),onDeleteScreen:P=>n.closeScreen(d.id)},null,8,["target","screen","definition","keywords","initial-top","initial-left","count","onCloseScreen","onDeleteScreen"])])],8,Tt))),128))]),e.createVNode(R,{class:"flex-shrink-0"},{default:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[o.suiteRunner?(e.openBlock(),e.createBlock(C,{key:0,class:"suite-runner","suite-map":o.suiteMap,"disable-buttons":o.disableSuiteButtons,filename:n.fullFilename,onButton:n.suiteRunnerButton,onLoaded:n.doResize},null,8,["suite-map","disable-buttons","filename","onButton","onLoaded"])):e.createCommentVNode("",!0),e.createElementVNode("div",Rt,[e.createVNode(B,{"no-gutters":"",justify:"space-between"},{default:e.withCtx(()=>[o.showDisconnect?(e.openBlock(),e.createBlock(p,{key:0,class:"mt-2",color:"red"},{default:e.withCtx(()=>[...t[49]||(t[49]=[e.createTextVNode(" mdi-connection ",-1)])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",Ot,[e.createVNode(v,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:d})=>[o.scriptId?(e.openBlock(),e.createBlock(c,e.mergeProps({key:1},d,{icon:"mdi-arrow-left",variant:"text",density:"compact",onClick:n.backToNewScript}),null,16,["onClick"])):(e.openBlock(),e.createBlock(c,e.mergeProps({key:0},d,{icon:"mdi-cached",variant:"text",density:"compact",disabled:o.filename===i.NEW_FILENAME,"aria-label":"Reload File",onClick:n.reloadFile}),null,16,["disabled","onClick"]))]),default:e.withCtx(()=>[o.scriptId?(e.openBlock(),e.createElementBlock("span",Dt," Back to New Script ")):(e.openBlock(),e.createElementBlock("span",Mt," Reload File "))]),_:1})]),e.createVNode(v,{location:"bottom",text:o.filenameSelect,disabled:!o.filenameSelect||o.filenameSelect.length<=45},{activator:e.withCtx(({props:d})=>[e.createElementVNode("div",e.mergeProps(d,{style:{width:"32rem"}}),[e.createVNode(x,{id:"filename",modelValue:o.filenameSelect,"onUpdate:modelValue":[t[4]||(t[4]=P=>o.filenameSelect=P),n.fileNameChanged],items:n.fileList,disabled:n.fileList.length<=1,label:"Filename","data-test":"filename",density:"compact",variant:"outlined","hide-details":""},null,8,["modelValue","items","disabled","onUpdate:modelValue"])],16)]),_:1},8,["text","disabled"]),e.createVNode(k,{modelValue:o.scriptId,"onUpdate:modelValue":t[5]||(t[5]=d=>o.scriptId=d),label:"Script ID","data-test":"id",class:"shrink ml-2 script-state",style:{"max-width":"100px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue"]),e.createVNode(k,{modelValue:n.stateTimer,"onUpdate:modelValue":t[6]||(t[6]=d=>n.stateTimer=d),label:"Script State","data-test":"state",class:e.normalizeClass(["shrink","ml-2","script-state",n.stateColorClass]),style:{"max-width":"120px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue","class"]),o.state==="Connecting..."?(e.openBlock(),e.createBlock(S,{key:1,size:40,class:"mx-2",indeterminate:"",color:"primary"})):(e.openBlock(),e.createElementBlock("div",It)),e.createVNode(w),o.startOrGoButton==="Start"?(e.openBlock(),e.createElementBlock("div",Ut,[o.overridesCount>0?(e.openBlock(),e.createBlock(v,{key:0,"open-delay":600,location:"top"},{activator:e.withCtx(({props:d})=>[e.createVNode(c,e.mergeProps(d,{class:"mr-4",icon:"",variant:"text",density:"compact","data-test":"tlm-override-button","aria-label":"TLM Overrides",onClick:t[7]||(t[7]=P=>o.showOverrides=!o.showOverrides)}),{default:e.withCtx(()=>[e.createVNode(T,{content:o.overridesCount>99?"99+":o.overridesCount,floating:"",color:"primary"},{default:e.withCtx(()=>[e.createVNode(p,{icon:"mdi-application-cog-outline"})]),_:1},8,["content"])]),_:1},16)]),default:e.withCtx(()=>[e.createElementVNode("span",null," TLM Overrides ("+e.toDisplayString(o.overridesCount)+") ",1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(v,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:d})=>[e.createVNode(c,e.mergeProps(d,{class:"mr-2",icon:"",variant:"text",density:"compact",disabled:o.envDisabled,"data-test":"env-button","aria-label":"Script Environment",onClick:t[9]||(t[9]=P=>o.scriptEnvironment.show=!o.scriptEnvironment.show)}),{default:e.withCtx(()=>[e.createVNode(T,{modelValue:n.environmentModified,"onUpdate:modelValue":t[8]||(t[8]=P=>n.environmentModified=P),floating:"",dot:""},{default:e.withCtx(()=>[e.createVNode(p,{icon:"mdi-application-variable"})]),_:1},8,["modelValue"])]),_:1},16,["disabled"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,[t[50]||(t[50]=e.createTextVNode(" Script Environment ",-1)),n.environmentModified?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" (modified) ")],64)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(c,{class:"mx-1",color:"primary",text:"Start","data-test":"start-button",disabled:o.startOrGoDisabled||!o.executeUser,hidden:o.suiteRunner,onClick:n.startHandler},null,8,["disabled","hidden","onClick"])])):(e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(c,{color:"primary",class:"mr-2",text:"Go",disabled:o.startOrGoDisabled,"data-test":"go-button",onClick:n.go},null,8,["disabled","onClick"]),e.createVNode(c,{color:"primary",class:"mr-2",text:o.pauseOrRetryButton,disabled:o.pauseOrRetryDisabled,"data-test":"pause-retry-button",onClick:n.pauseOrRetry},null,8,["text","disabled","onClick"]),e.createVNode(c,{color:"primary",text:"Stop","data-test":"stop-button",disabled:o.stopDisabled,onClick:n.stop},null,8,["disabled","onClick"])]))]),_:1})])]),_:1})]),_:1}),e.createVNode(ee,{horizontal:"",class:"flex-grow-1 overflow-hidden",onResize:t[15]||(t[15]=({prevPane:d})=>o.editorBoxSize=d.size)},{default:e.withCtx(()=>[e.createVNode(G,{class:"editorbox",size:o.editorBoxSize},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:o.showSave,"onUpdate:modelValue":t[10]||(t[10]=d=>o.showSave=d),absolute:"",location:"right",timeout:-1,class:"saving apply-top",style:e.normalizeStyle(i.classificationStyles)},{default:e.withCtx(()=>[...t[51]||(t[51]=[e.createTextVNode(" Saving... ",-1)])]),_:1},8,["modelValue","style"]),e.createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:t[11]||(t[11]=e.withModifiers((...d)=>n.showExecuteSelectionMenu&&n.showExecuteSelectionMenu(...d),["prevent"]))},null,544),e.createVNode(D,{modelValue:o.executeSelectionMenu,"onUpdate:modelValue":t[12]||(t[12]=d=>o.executeSelectionMenu=d),target:[o.menuX,o.menuY]},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(M,{title:o.currentLineHasCommand?"Edit Command":"Insert Command",onClick:n.openCommandEditor},null,8,["title","onClick"]),e.createVNode(H),e.createVNode(M,{title:"Execute Selection",onClick:n.executeSelection},null,8,["onClick"]),o.scriptId?(e.openBlock(),e.createBlock(M,{key:0,title:"Goto Line",onClick:n.runFromCursor},null,8,["onClick"])):e.createCommentVNode("",!0),o.scriptId?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M,{key:1,title:"Run From Line",onClick:n.runFromCursor},null,8,["onClick"])),o.scriptId?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M,{key:2,title:"Clear Local Breakpoints",onClick:n.clearBreakpoints},null,8,["onClick"])),e.createVNode(H),e.createVNode(M,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:n.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1},8,["size"]),e.createVNode(G,{id:"messages",class:"mt-2",size:100-o.editorBoxSize},{default:e.withCtx(()=>[o.showDebug?(e.openBlock(),e.createElementBlock("div",zt,[e.createVNode(B,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{color:"primary",style:{width:"100px"},class:"mr-4",text:"Step","append-icon":"mdi-step-forward",disabled:!o.scriptId,"data-test":"step-button",onClick:n.step},null,8,["disabled","onClick"]),e.createVNode(k,{ref:"debug",modelValue:o.debug,"onUpdate:modelValue":t[13]||(t[13]=d=>o.debug=d),class:"mb-2",variant:"outlined",density:"compact","hide-details":"",label:"Debug","data-test":"debug-text",onKeydown:n.debugKeydown},null,8,["modelValue","onKeydown"])]),_:1})])):e.createCommentVNode("",!0),e.createVNode(A,{id:"log-messages",modelValue:o.messages,"onUpdate:modelValue":t[14]||(t[14]=d=>o.messages=d),onSort:n.messageSortOrder},null,8,["modelValue","onSort"])]),_:1},8,["size"])]),_:1})],4)),o.fileOpen?(e.openBlock(),e.createBlock(Q,{key:2,modelValue:o.fileOpen,"onUpdate:modelValue":t[23]||(t[23]=d=>o.fileOpen=d),type:"open","api-url":"/script-api/scripts",onFile:t[24]||(t[24]=d=>n.setFile(d)),onError:t[25]||(t[25]=d=>n.setError(d)),onClearTemp:t[26]||(t[26]=d=>n.clearTemp(d))},null,8,["modelValue"])):e.createCommentVNode("",!0),o.showSaveAs?(e.openBlock(),e.createBlock(Q,{key:3,modelValue:o.showSaveAs,"onUpdate:modelValue":t[27]||(t[27]=d=>o.showSaveAs=d),type:"save","api-url":"/script-api/scripts","require-target-parent-dir":"","input-filename":n.filenameOrBlank,onFilename:t[28]||(t[28]=d=>n.saveAsFilename(d)),onError:t[29]||(t[29]=d=>n.setError(d)),onClearTemp:t[30]||(t[30]=d=>n.clearTemp(d))},null,8,["modelValue","input-filename"])):e.createCommentVNode("",!0),o.showEnvironment?(e.openBlock(),e.createBlock(ie,{key:4,modelValue:o.showEnvironment,"onUpdate:modelValue":t[31]||(t[31]=d=>o.showEnvironment=d)},null,8,["modelValue"])):e.createCommentVNode("",!0),o.ask.show?(e.openBlock(),e.createBlock(oe,{key:5,modelValue:o.ask.show,"onUpdate:modelValue":t[32]||(t[32]=d=>o.ask.show=d),question:o.ask.question,default:o.ask.default,password:o.ask.password,"answer-required":o.ask.answerRequired,onResponse:o.ask.callback},null,8,["modelValue","question","default","password","answer-required","onResponse"])):e.createCommentVNode("",!0),o.file.show?(e.openBlock(),e.createBlock(j,{key:6,modelValue:o.file.show,"onUpdate:modelValue":t[33]||(t[33]=d=>o.file.show=d),title:o.file.title,message:o.file.message,multiple:o.file.multiple,filter:o.file.filter,onResponse:n.fileDialogCallback},null,8,["modelValue","title","message","multiple","filter","onResponse"])):e.createCommentVNode("",!0),o.information.show?(e.openBlock(),e.createBlock(ne,{key:7,modelValue:o.information.show,"onUpdate:modelValue":t[34]||(t[34]=d=>o.information.show=d),title:o.information.title,text:o.information.text,width:o.information.width},null,8,["modelValue","title","text","width"])):e.createCommentVNode("",!0),o.inputMetadata.show?(e.openBlock(),e.createBlock(se,{key:8,modelValue:o.inputMetadata.show,"onUpdate:modelValue":t[35]||(t[35]=d=>o.inputMetadata.show=d),events:o.inputMetadata.events,"time-zone":o.timeZone,"new-metadata":"",onClose:o.inputMetadata.callback},null,8,["modelValue","events","time-zone","onClose"])):e.createCommentVNode("",!0),o.showOverrides?(e.openBlock(),e.createBlock(re,{key:9,modelValue:o.showOverrides,"onUpdate:modelValue":t[36]||(t[36]=d=>o.showOverrides=d)},null,8,["modelValue"])):e.createCommentVNode("",!0),o.prompt.show?(e.openBlock(),e.createBlock(W,{key:10,modelValue:o.prompt.show,"onUpdate:modelValue":t[37]||(t[37]=d=>o.prompt.show=d),title:o.prompt.title,subtitle:o.prompt.subtitle,message:o.prompt.message,details:o.prompt.details,buttons:o.prompt.buttons,layout:o.prompt.layout,multiple:o.prompt.multiple,onResponse:o.prompt.callback},null,8,["modelValue","title","subtitle","message","details","buttons","layout","multiple","onResponse"])):e.createCommentVNode("",!0),o.results.show?(e.openBlock(),e.createBlock(I,{key:11,modelValue:o.results.show,"onUpdate:modelValue":t[38]||(t[38]=d=>o.results.show=d),text:o.results.text},null,8,["modelValue","text"])):e.createCommentVNode("",!0),o.scriptEnvironment.show?(e.openBlock(),e.createBlock(le,{key:12,modelValue:o.scriptEnvironment.show,"onUpdate:modelValue":t[39]||(t[39]=d=>o.scriptEnvironment.show=d),"input-environment":o.scriptEnvironment.env,onEnvironment:n.environmentHandler},null,8,["modelValue","input-environment","onEnvironment"])):e.createCommentVNode("",!0),e.createVNode(l,{modelValue:o.showSuiteError,"onUpdate:modelValue":t[40]||(t[40]=d=>o.showSuiteError=d),title:"Suite Analysis Error",text:o.suiteError,width:1e3},null,8,["modelValue","text"]),e.createVNode(u,{modelValue:o.displayCriticalCmd,"onUpdate:modelValue":t[41]||(t[41]=d=>o.displayCriticalCmd=d),uuid:o.criticalCmdUuid,"cmd-string":o.criticalCmdString,"cmd-user":o.criticalCmdUser,persistent:!0,onStatus:n.promptDialogCallback},null,8,["modelValue","uuid","cmd-string","cmd-user","onStatus"]),e.createVNode(b,{modelValue:o.commandEditor.show,"onUpdate:modelValue":t[45]||(t[45]=d=>o.commandEditor.show=d),"max-width":"1200",persistent:"",scrollable:"",onKeydown:e.withKeys(n.closeCommandDialog,["esc"])},{default:e.withCtx(()=>[e.createVNode(R,null,{default:e.withCtx(()=>[e.createVNode(f,{class:"d-flex align-center"},{default:e.withCtx(()=>[t[52]||(t[52]=e.createElementVNode("span",null,"Insert Command",-1)),e.createVNode(w),e.createVNode(c,{icon:"mdi-close",variant:"text",onClick:n.closeCommandDialog},null,8,["onClick"])]),_:1}),e.createVNode(E,{class:"pa-0"},{default:e.withCtx(()=>[o.commandEditor.dialogError?(e.openBlock(),e.createElementBlock("div",qt,[e.createVNode(p,{class:"mr-2",color:"error"},{default:e.withCtx(()=>[...t[53]||(t[53]=[e.createTextVNode("mdi-alert-circle",-1)])]),_:1}),e.createElementVNode("span",Gt,e.toDisplayString(o.commandEditor.dialogError),1),e.createVNode(c,{icon:"mdi-close",size:"small",variant:"text",color:"error",class:"ml-2",onClick:t[42]||(t[42]=d=>o.commandEditor.dialogError=null)})])):e.createCommentVNode("",!0),e.createVNode(m,{ref:"commandEditor","initial-target-name":o.commandEditor.targetName,"initial-packet-name":o.commandEditor.packetName,"cmd-string":o.commandEditor.cmdString,"send-disabled":!1,"show-command-button":!1,onBuildCmd:t[43]||(t[43]=d=>n.insertCommand(d))},null,8,["initial-target-name","initial-packet-name","cmd-string"])]),_:1}),e.createVNode(h,null,{default:e.withCtx(()=>[e.createVNode(w),e.createVNode(c,{variant:"outlined",onClick:n.closeCommandDialog},{default:e.withCtx(()=>[...t[54]||(t[54]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(c,{color:"primary",variant:"flat",onClick:t[44]||(t[44]=d=>n.insertCommand())},{default:e.withCtx(()=>[...t[55]||(t[55]=[e.createTextVNode(" Insert Command ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),e.createVNode(U,{modelValue:o.showScripts,"onUpdate:modelValue":t[47]||(t[47]=d=>o.showScripts=d)},{default:e.withCtx(()=>[e.createVNode(O,{class:"pb-11 pt-5 px-5"},{default:e.withCtx(()=>[o.showScripts?(e.openBlock(),e.createBlock(y,{key:0,"connect-in-new-tab":!!o.fileModified,onDisconnect:n.scriptDisconnect,onClose:t[46]||(t[46]=()=>{o.showScripts=!1})},null,8,["connect-in-new-tab","onDisconnect"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue"])],64)}const jt=L._export_sfc(St,[["render",Kt],["__scopeId","data-v-3b75c5b6"]]);exports.RunningScripts=he;exports.ScriptLogMessages=fe;exports.ScriptRunner=jt;exports.SuiteRunner=ge;
84
+ `),await this.saveFile("auto"))},addToRecent(i){let t=this.recent.findIndex(s=>s.label===i);t!==-1&&this.recent.splice(t,1),this.recent.unshift({label:i,icon:Ce.fileIcon(i),command:async s=>{await this.confirmUnsavedChanges()&&(this.filename=s.label,await this.reloadFile())}}),this.recent.length>8&&this.recent.pop(),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent))},removeFromRecent(i){this.recent=this.recent.filter(t=>t.label!==i),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent),localStorage.script_runner__filename===i&&localStorage.removeItem("script_runner__filename"))},async openFileWithConfirm(){await this.confirmUnsavedChanges()&&this.openFile()},openFile(){this.fileOpen=!0},async reloadFile(i=!0){this.saveAllowed=!1,this.startOrGoDisabled=!0,await V.Fr.get(`/script-api/scripts/${this.filename}`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(t=>{const s={name:this.filename,contents:t.data.contents};t.data.suites&&(s.suites=JSON.parse(t.data.suites)),t.data.error&&(s.error=t.data.error),t.data.success&&(s.success=t.data.success);const l=t.data.locked,o=t.data.breakpoints;this.setFile({file:s,locked:l,breakpoints:o},!0),this.saveAllowed=!0}).catch(t=>{i===!0&&this.$notify.caution({title:"File Open Error",body:`Failed to open ${this.filename} due to ${t}`}),this.removeFromRecent(this.filename),this.newFile()})},setFile({file:i,locked:t,breakpoints:s},l=!1){this.files={};let o=i.name.split("*")[0];if(l===!1&&this.filename!==o&&(this.unlockFile(),this.lockedBy=t),this.filename=o,!this.inline){this.$router.replace({name:"ScriptRunner",query:{file:this.filename}}).catch(r=>{});let n=this.filename.split("/");document.title=`${n.pop()} (${n.join("/")})`}this.filename.split(".").pop()==="py"?this.editor.session.setMode(this.pythonMode):this.editor.session.setMode(this.rubyMode),this.currentFilename=null,this.editor.session.setValue(i.contents),this.breakpoints[this.filename]=s,this.restoreBreakpoints(this.filename),this.fileModified="",this.envDisabled=!1,this.addToRecent(this.filename),i.suites?(this.suiteRunner=!0,this.suiteMap=i.suites,this.startOrGoDisabled=!0):(this.suiteRunner=!1,this.startOrGoDisabled=!1),i.error&&(this.suiteError=i.error,this.showSuiteError=!0),this.disableSuiteButtons=i.success==!1,this.doResize()},clearTemp(){this.recent=this.recent.filter(i=>!i.label.includes("__TEMP__")),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent))},detectLanguage(){let i=new RegExp("^\\s*(require|load|puts) "),t=new RegExp("^\\s*(import|from) "),s=new RegExp("^\\s*end\\s*$"),l=new RegExp("^\\s*(if|def|while|else|elif|class).*:\\s*$"),o=/\(f"/,n=/\(.*\w+:\s+.+\)(?!:)$/,m=this.editor.getValue().split(`
85
+ `);for(let d of m){if(d.match(i))return"ruby";if(d.match(t))return"python";if(d.match(s))return"ruby";if(d.match(l)||d.match(o))return"python";if(d.match(n))return"ruby"}return"unknown"},async saveFile(i="menu"){if(!this.readOnlyUser)if(this.saveAllowed){const t=this.getBreakpointRows();if(this.filename===L){if(i==="menu"){this.saveAs();return}else if(this.tempFilename===null){let s=this.detectLanguage();s==="unknown"&&(s=J.AceEditorUtils.getDefaultScriptingLanguage());const l=crypto.randomUUID().split("-")[0];if(s==="ruby")this.tempFilename=ue+"/"+ee.format(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+"_"+l+"_temp.rb";else if(s==="python")this.tempFilename=ue+"/"+ee.format(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+"_"+l+"_temp.py";else return;this.filename=this.tempFilename,this.addToRecent(this.filename)}}this.showSave=!0,await V.Fr.post(`/script-api/scripts/${this.filename}`,{data:{text:this.editor.getValue(),breakpoints:t}}).then(s=>{s.status==200?(s.data.suites?(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(s.data.suites)):(this.startOrGoDisabled=!1,this.suiteRunner=!1,this.suiteMap={}),s.data.error&&(this.suiteError=s.data.error,this.showSuiteError=!0),this.fileModified="",setTimeout(()=>{this.showSave=!1},2e3)):(this.showSave=!1,this.alertType="error",this.alertText=`Error saving file. Code: ${s.status} Text: ${s.statusText}`,this.showAlert=!0),this.lockFile(),this.doResize()}).catch(({response:s})=>{this.showSave=!1,s.status==422?(this.alertType="error",this.alertText=s.data.suites):(this.alertType="error",this.alertText=`Error saving file. Code: ${s.status} Text: ${s.statusText}`),this.showAlert=!0})}else this.setError("Attempt to save file when not allowed")},saveAs(){this.showSaveAs=!0},async saveAsFilename(i){this.filename=i.split("*")[0],this.currentFilename=null,this.tempFilename&&(V.Fr.post(`/script-api/scripts/${this.tempFilename}/delete`),this.tempFilename=null),await this.saveFile("menu")},delete(){let i=this.filename;this.tempFilename&&(i=this.tempFilename),this.$dialog.confirm(`Permanently delete file: ${i}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>V.Fr.post(`/script-api/scripts/${i}/delete`,{data:{}})).then(t=>{this.removeFromRecent(i),this.newFile()}).catch(t=>{if(t!==!0){const s={text:`Failed Multi-Delete. ${t}`,type:"error"};this.$emit("alert",s)}})},download(){const i=new Blob([this.editor.getValue()],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.setAttribute("download",this.filename),t.click()},syntaxCheck(){V.Fr.post(`/script-api/scripts/${this.filename}/syntax`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(i=>{this.information.title=i.data.title,this.information.text=JSON.parse(i.data.description),this.information.show=!0,this.information.width="600"})},showInstrumented(){V.Fr.post(`/script-api/scripts/${this.filename}/instrumented`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(i=>{this.information.title=i.data.title,this.information.text=JSON.parse(i.data.description),this.information.show=!0,this.information.width="90vw"})},showCallStack(){V.Fr.post(`/script-api/running-script/${this.scriptId}/backtrace`)},toggleDebug(){this.showDebug=!this.showDebug,this.showDebug&&this.$nextTick(()=>{this.$refs.debug.focus()})},toggleDisconnect(){this.showDisconnect=!this.showDisconnect},debugKeydown(i){i.key==="Escape"?(this.debug="",this.debugHistoryIndex=this.debugHistory.length):i.key==="Enter"?(this.debugHistory.push(this.debug),this.debugHistoryIndex=this.debugHistory.length,V.Fr.post(`/script-api/running-script/${this.scriptId}/debug`,{data:{args:this.debug}}),this.debug=""):i.key==="ArrowUp"?(this.debugHistoryIndex-=1,this.debugHistoryIndex<0&&(this.debugHistoryIndex=this.debugHistory.length-1),this.debug=this.debugHistory[this.debugHistoryIndex],i.preventDefault()):i.key==="ArrowDown"&&(this.debugHistoryIndex+=1,this.debugHistoryIndex>=this.debugHistory.length&&(this.debugHistoryIndex=0),this.debug=this.debugHistory[this.debugHistoryIndex])},removeAllMarkers:function(){const i=this.editor.session.getMarkers();Object.keys(i).filter(t=>i[t].type==="fullLine").forEach(t=>this.editor.session.removeMarker(t))},confirmLocalUnlock:function(){this.$dialog.confirm("Are you sure you want to unlock this script for editing? If another user is editing this script, your changes might conflict with each other.",{okText:"Force Unlock",cancelText:"Cancel"}).then(()=>(this.lockedBy=null,this.lockFile()))},lockFile:function(){if(!this.readOnlyUser)return V.Fr.post(`/script-api/scripts/${this.filename}/lock`)},unlockFile:function(){this.filename!==L&&!this.readOnly&&!this.readOnlyUser&&V.Fr.post(`/script-api/scripts/${this.filename}/unlock`)},backToNewScript:async function(){this.scriptDisconnect(),this.removeAllMarkers(),await this.scriptComplete(),this.newFile()},screenId(i){return"scriptRunnerScreen"+i},closeScreen(i){let t=0;for(screen of this.screens){if(screen.id==i){this.screens.splice(t,1);break}t+=1}}}},Pt={class:"grid"},zt=["id"],Lt={class:"item-content"},At={id:"sr-controls"},Ht={class:"d-flex align-center mr-1"},qt={key:0},Gt={key:1},Kt={key:2,style:{width:"40px",height:"40px"},class:"mx-2"},jt={key:3},Wt={key:4},Jt={key:0,id:"debug",class:"pa-0"},Yt={key:1,style:{"background-color":"var(--color-background-base-default)",margin:"0px",padding:"0px"}},Zt={key:0},Xt={key:1},Qt={style:{height:"200px",overflow:"hidden"}},$t={key:0,class:"error-message"},ei={class:"flex-grow-1"};function ti(i,t,s,l,o,n){const r=e.resolveComponent("top-bar"),m=e.resolveComponent("v-icon"),d=e.resolveComponent("v-btn"),g=e.resolveComponent("v-snackbar"),w=e.resolveComponent("openc3-screen"),_=e.resolveComponent("suite-runner"),v=e.resolveComponent("v-tooltip"),b=e.resolveComponent("v-select"),k=e.resolveComponent("v-text-field"),S=e.resolveComponent("v-progress-circular"),C=e.resolveComponent("v-spacer"),O=e.resolveComponent("v-badge"),N=e.resolveComponent("v-row"),B=e.resolveComponent("v-card-text"),R=e.resolveComponent("v-card"),M=e.resolveComponent("v-list-item"),T=e.resolveComponent("v-divider"),y=e.resolveComponent("v-list"),F=e.resolveComponent("v-menu"),G=e.resolveComponent("pane"),H=e.resolveComponent("script-log-messages"),te=e.resolveComponent("splitpanes"),Z=e.resolveComponent("v-tab"),ie=e.resolveComponent("v-tabs"),K=e.resolveComponent("v-col"),X=e.resolveComponent("v-tabs-window-item"),q=e.resolveComponent("v-tabs-window"),Q=e.resolveComponent("file-open-save-dialog"),oe=e.resolveComponent("environment-dialog"),ne=e.resolveComponent("ask-dialog"),j=e.resolveComponent("file-dialog"),se=e.resolveComponent("bucket-dialog"),le=e.resolveComponent("information-dialog"),re=e.resolveComponent("event-list-dialog"),W=e.resolveComponent("overrides-dialog"),I=e.resolveComponent("prompt-dialog"),ae=e.resolveComponent("results-dialog"),a=e.resolveComponent("script-environment-dialog"),u=e.resolveComponent("simple-text-dialog"),f=e.resolveComponent("critical-cmd-dialog"),p=e.resolveComponent("v-card-title"),h=e.resolveComponent("command-editor"),x=e.resolveComponent("v-card-actions"),E=e.resolveComponent("v-dialog"),D=e.resolveComponent("running-scripts"),U=e.resolveComponent("v-sheet"),$=e.resolveComponent("v-bottom-sheet");return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.inline?(e.openBlock(),e.createElementBlock("div",Yt,[e.createVNode(N,{"no-gutters":"",justify:"right"},{default:e.withCtx(()=>[e.createVNode(ie,{modelValue:o.inlineTab,"onUpdate:modelValue":t[16]||(t[16]=c=>o.inlineTab=c),density:"compact"},{default:e.withCtx(()=>[e.createVNode(Z,{value:"script",text:"Script","data-test":"script-tab"}),e.createVNode(Z,{value:"messages",text:"Messages","data-test":"messages-tab"})]),_:1},8,["modelValue"]),e.createVNode(v,{location:"bottom",text:o.filenameSelect,disabled:!o.filenameSelect||o.filenameSelect.length<=45},{activator:e.withCtx(({props:c})=>[e.createElementVNode("div",e.mergeProps(c,{style:{width:"32rem"}}),[e.createVNode(b,{id:"inline-filename",modelValue:o.filenameSelect,"onUpdate:modelValue":[t[17]||(t[17]=P=>o.filenameSelect=P),n.fileNameChanged],items:n.fileList,disabled:n.fileList.length<=1,label:"Filename","data-test":"filename",density:"compact",variant:"outlined","hide-details":""},null,8,["modelValue","items","disabled","onUpdate:modelValue"])],16)]),_:1},8,["text","disabled"]),e.createVNode(k,{modelValue:o.scriptId,"onUpdate:modelValue":t[18]||(t[18]=c=>o.scriptId=c),label:"Script ID","data-test":"id",class:"shrink ml-2 script-state",style:{"max-width":"100px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue"]),e.createVNode(k,{modelValue:n.stateTimer,"onUpdate:modelValue":t[19]||(t[19]=c=>n.stateTimer=c),label:"Script State","data-test":"state",class:e.normalizeClass(["shrink","ml-2","script-state",n.stateColorClass]),style:{"max-width":"120px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue","class"]),o.state==="Connecting..."?(e.openBlock(),e.createBlock(S,{key:0,size:40,class:"mx-2",indeterminate:"",color:"primary"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(q,{modelValue:o.inlineTab,"onUpdate:modelValue":t[22]||(t[22]=c=>o.inlineTab=c)},{default:e.withCtx(()=>[e.createVNode(X,{value:"script"},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(K,{class:"v-col-10",style:{margin:"15px 0px 0px 0px",padding:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("pre",{ref:"editor",class:"editor",style:{height:"200px"},onContextmenu:t[20]||(t[20]=e.withModifiers((...c)=>n.showExecuteSelectionMenu&&n.showExecuteSelectionMenu(...c),["prevent"]))},null,544)]),_:1}),e.createVNode(K,{class:"v-col-2",style:{display:"flex","justify-content":"center","align-items":"center","background-color":"var(--color-background-surface-default)"}},{default:e.withCtx(()=>[o.startOrGoButton==="Start"?(e.openBlock(),e.createElementBlock("div",Zt,[e.createVNode(d,{class:"mx-1",color:"primary",text:"Start","data-test":"start-button",disabled:o.startOrGoDisabled||!o.executeUser,hidden:o.suiteRunner,onClick:n.startHandler},null,8,["disabled","hidden","onClick"])])):(e.openBlock(),e.createElementBlock("div",Xt,[e.createVNode(d,{color:"primary",class:"ma-2",text:"Go",disabled:o.startOrGoDisabled,"data-test":"go-button",onClick:n.go},null,8,["disabled","onClick"]),e.createVNode(d,{color:"primary",class:"ma-2",text:o.pauseOrRetryButton,disabled:o.pauseOrRetryDisabled,"data-test":"pause-retry-button",onClick:n.pauseOrRetry},null,8,["text","disabled","onClick"]),e.createVNode(d,{color:"primary",class:"ma-2",text:"Stop","data-test":"stop-button",disabled:o.stopDisabled,onClick:n.stop},null,8,["disabled","onClick"])]))]),_:1})]),_:1})]),_:1}),e.createVNode(X,{value:"messages"},{default:e.withCtx(()=>[e.createElementVNode("div",Qt,[e.createVNode(H,{modelValue:o.messages,"onUpdate:modelValue":t[21]||(t[21]=c=>o.messages=c),"newest-on-top":o.messagesNewestOnTop,onMessageOrderChanged:i.messageOrderChanged},null,8,["modelValue","newest-on-top","onMessageOrderChanged"])])]),_:1})]),_:1},8,["modelValue"])])):(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-flex flex-column overflow-hidden",style:e.normalizeStyle({height:l.containerHeight})},[e.createVNode(r,{menus:n.menus,title:o.title},null,8,["menus","title"]),e.createVNode(g,{modelValue:o.showAlert,"onUpdate:modelValue":t[1]||(t[1]=c=>o.showAlert=c),absolute:"",color:o.alertType,timeout:3e3,class:"apply-top",style:e.normalizeStyle(i.classificationStyles)},{actions:e.withCtx(({attrs:c})=>[e.createVNode(d,e.mergeProps({variant:"text",text:"Close"},c,{onClick:t[0]||(t[0]=P=>o.showAlert=!1)}),null,16)]),default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(" mdi-"+e.toDisplayString(o.alertType),1)]),_:1}),e.createTextVNode(" "+e.toDisplayString(o.alertText)+" ",1)]),_:1},8,["modelValue","color","style"]),e.createVNode(g,{modelValue:o.showEditingToast,"onUpdate:modelValue":t[3]||(t[3]=c=>o.showEditingToast=c),absolute:"",class:"apply-top",style:e.normalizeStyle(i.classificationStyles),timeout:-1,color:"orange"},{actions:e.withCtx(({attrs:c})=>[e.createVNode(d,e.mergeProps({variant:"text"},c,{color:"danger",text:"Unlock","data-test":"unlock-button",onClick:n.confirmLocalUnlock}),null,16,["onClick"]),e.createVNode(d,e.mergeProps({variant:"text",text:"Dismiss"},c,{onClick:t[2]||(t[2]=()=>{o.showEditingToast=!1})}),null,16)]),default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[...t[49]||(t[49]=[e.createTextVNode(" mdi-pencil-off ",-1)])]),_:1}),e.createTextVNode(" "+e.toDisplayString(o.lockedBy)+" is editing this script. Editor is in read-only mode ",1)]),_:1},8,["modelValue","style"]),e.createElementVNode("div",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.screens,c=>(e.openBlock(),e.createElementBlock("div",{id:n.screenId(c.id),key:c.id,ref_for:!0,ref:"gridItem",class:"item"},[e.createElementVNode("div",Lt,[e.createVNode(w,{target:c.target,screen:c.screen,definition:c.definition,keywords:o.screenKeywords,"initial-floated":!0,"initial-top":c.top,"initial-left":c.left,"initial-z":3,"min-z":3,"fix-floated":!0,count:c.count,onCloseScreen:P=>n.closeScreen(c.id),onDeleteScreen:P=>n.closeScreen(c.id)},null,8,["target","screen","definition","keywords","initial-top","initial-left","count","onCloseScreen","onDeleteScreen"])])],8,zt))),128))]),e.createVNode(R,{class:"flex-shrink-0"},{default:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(()=>[o.suiteRunner?(e.openBlock(),e.createBlock(_,{key:0,class:"suite-runner","suite-map":o.suiteMap,"disable-buttons":o.disableSuiteButtons,filename:n.fullFilename,onButton:n.suiteRunnerButton,onLoaded:n.doResize},null,8,["suite-map","disable-buttons","filename","onButton","onLoaded"])):e.createCommentVNode("",!0),e.createElementVNode("div",At,[e.createVNode(N,{"no-gutters":"",justify:"space-between"},{default:e.withCtx(()=>[o.showDisconnect?(e.openBlock(),e.createBlock(m,{key:0,class:"mt-2",color:"red"},{default:e.withCtx(()=>[...t[50]||(t[50]=[e.createTextVNode(" mdi-connection ",-1)])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",Ht,[e.createVNode(v,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:c})=>[o.scriptId?(e.openBlock(),e.createBlock(d,e.mergeProps({key:1},c,{icon:"mdi-arrow-left",variant:"text",density:"compact",onClick:n.backToNewScript}),null,16,["onClick"])):(e.openBlock(),e.createBlock(d,e.mergeProps({key:0},c,{icon:"mdi-cached",variant:"text",density:"compact",disabled:o.filename===i.NEW_FILENAME,"aria-label":"Reload File",onClick:n.reloadFile}),null,16,["disabled","onClick"]))]),default:e.withCtx(()=>[o.scriptId?(e.openBlock(),e.createElementBlock("span",Gt," Back to New Script ")):(e.openBlock(),e.createElementBlock("span",qt," Reload File "))]),_:1})]),e.createVNode(v,{location:"bottom",text:o.filenameSelect,disabled:!o.filenameSelect||o.filenameSelect.length<=45},{activator:e.withCtx(({props:c})=>[e.createElementVNode("div",e.mergeProps(c,{style:{width:"32rem"}}),[e.createVNode(b,{id:"filename",modelValue:o.filenameSelect,"onUpdate:modelValue":[t[4]||(t[4]=P=>o.filenameSelect=P),n.fileNameChanged],items:n.fileList,disabled:n.fileList.length<=1,label:"Filename","data-test":"filename",density:"compact",variant:"outlined","hide-details":""},null,8,["modelValue","items","disabled","onUpdate:modelValue"])],16)]),_:1},8,["text","disabled"]),e.createVNode(k,{modelValue:o.scriptId,"onUpdate:modelValue":t[5]||(t[5]=c=>o.scriptId=c),label:"Script ID","data-test":"id",class:"shrink ml-2 script-state",style:{"max-width":"100px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue"]),e.createVNode(k,{modelValue:n.stateTimer,"onUpdate:modelValue":t[6]||(t[6]=c=>n.stateTimer=c),label:"Script State","data-test":"state",class:e.normalizeClass(["shrink","ml-2","script-state",n.stateColorClass]),style:{"max-width":"120px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue","class"]),o.state==="Connecting..."?(e.openBlock(),e.createBlock(S,{key:1,size:40,class:"mx-2",indeterminate:"",color:"primary"})):(e.openBlock(),e.createElementBlock("div",Kt)),e.createVNode(C),o.startOrGoButton==="Start"?(e.openBlock(),e.createElementBlock("div",jt,[o.overridesCount>0?(e.openBlock(),e.createBlock(v,{key:0,"open-delay":600,location:"top"},{activator:e.withCtx(({props:c})=>[e.createVNode(d,e.mergeProps(c,{class:"mr-4",icon:"",variant:"text",density:"compact","data-test":"tlm-override-button","aria-label":"TLM Overrides",onClick:t[7]||(t[7]=P=>o.showOverrides=!o.showOverrides)}),{default:e.withCtx(()=>[e.createVNode(O,{content:o.overridesCount>99?"99+":o.overridesCount,floating:"",color:"primary"},{default:e.withCtx(()=>[e.createVNode(m,{icon:"mdi-application-cog-outline"})]),_:1},8,["content"])]),_:1},16)]),default:e.withCtx(()=>[e.createElementVNode("span",null," TLM Overrides ("+e.toDisplayString(o.overridesCount)+") ",1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(v,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:c})=>[e.createVNode(d,e.mergeProps(c,{class:"mr-2",icon:"",variant:"text",density:"compact",disabled:o.envDisabled,"data-test":"env-button","aria-label":"Script Environment",onClick:t[9]||(t[9]=P=>o.scriptEnvironment.show=!o.scriptEnvironment.show)}),{default:e.withCtx(()=>[e.createVNode(O,{modelValue:n.environmentModified,"onUpdate:modelValue":t[8]||(t[8]=P=>n.environmentModified=P),floating:"",dot:""},{default:e.withCtx(()=>[e.createVNode(m,{icon:"mdi-application-variable"})]),_:1},8,["modelValue"])]),_:1},16,["disabled"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,[t[51]||(t[51]=e.createTextVNode(" Script Environment ",-1)),n.environmentModified?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" (modified) ")],64)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(d,{class:"mx-1",color:"primary",text:"Start","data-test":"start-button",disabled:o.startOrGoDisabled||!o.executeUser,hidden:o.suiteRunner,onClick:n.startHandler},null,8,["disabled","hidden","onClick"])])):(e.openBlock(),e.createElementBlock("div",Wt,[e.createVNode(d,{color:"primary",class:"mr-2",text:"Go",disabled:o.startOrGoDisabled,"data-test":"go-button",onClick:n.go},null,8,["disabled","onClick"]),e.createVNode(d,{color:"primary",class:"mr-2",text:o.pauseOrRetryButton,disabled:o.pauseOrRetryDisabled,"data-test":"pause-retry-button",onClick:n.pauseOrRetry},null,8,["text","disabled","onClick"]),e.createVNode(d,{color:"primary",text:"Stop","data-test":"stop-button",disabled:o.stopDisabled,onClick:n.stop},null,8,["disabled","onClick"])]))]),_:1})])]),_:1})]),_:1}),e.createVNode(te,{horizontal:"",class:"flex-grow-1 overflow-hidden",onResize:t[15]||(t[15]=({prevPane:c})=>o.editorBoxSize=c.size)},{default:e.withCtx(()=>[e.createVNode(G,{class:"editorbox",size:o.editorBoxSize},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:o.showSave,"onUpdate:modelValue":t[10]||(t[10]=c=>o.showSave=c),absolute:"",location:"right",timeout:-1,class:"saving apply-top",style:e.normalizeStyle(i.classificationStyles)},{default:e.withCtx(()=>[...t[52]||(t[52]=[e.createTextVNode(" Saving... ",-1)])]),_:1},8,["modelValue","style"]),e.createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:t[11]||(t[11]=e.withModifiers((...c)=>n.showExecuteSelectionMenu&&n.showExecuteSelectionMenu(...c),["prevent"]))},null,544),e.createVNode(F,{modelValue:o.executeSelectionMenu,"onUpdate:modelValue":t[12]||(t[12]=c=>o.executeSelectionMenu=c),target:[o.menuX,o.menuY]},{default:e.withCtx(()=>[e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode(M,{title:o.currentLineHasCommand?"Edit Command":"Insert Command",onClick:n.openCommandEditor},null,8,["title","onClick"]),e.createVNode(T),e.createVNode(M,{title:"Execute Selection",onClick:n.executeSelection},null,8,["onClick"]),o.scriptId?(e.openBlock(),e.createBlock(M,{key:0,title:"Goto Line",onClick:n.runFromCursor},null,8,["onClick"])):e.createCommentVNode("",!0),o.scriptId?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M,{key:1,title:"Run From Line",onClick:n.runFromCursor},null,8,["onClick"])),o.scriptId?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M,{key:2,title:"Clear Local Breakpoints",onClick:n.clearBreakpoints},null,8,["onClick"])),e.createVNode(T),e.createVNode(M,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:n.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1},8,["size"]),e.createVNode(G,{id:"messages",class:"mt-2",size:100-o.editorBoxSize},{default:e.withCtx(()=>[o.showDebug?(e.openBlock(),e.createElementBlock("div",Jt,[e.createVNode(N,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(d,{color:"primary",style:{width:"100px"},class:"mr-4",text:"Step","append-icon":"mdi-step-forward",disabled:!o.scriptId,"data-test":"step-button",onClick:n.step},null,8,["disabled","onClick"]),e.createVNode(k,{ref:"debug",modelValue:o.debug,"onUpdate:modelValue":t[13]||(t[13]=c=>o.debug=c),class:"mb-2",variant:"outlined",density:"compact","hide-details":"",label:"Debug","data-test":"debug-text",onKeydown:n.debugKeydown},null,8,["modelValue","onKeydown"])]),_:1})])):e.createCommentVNode("",!0),e.createVNode(H,{id:"log-messages",modelValue:o.messages,"onUpdate:modelValue":t[14]||(t[14]=c=>o.messages=c),onSort:n.messageSortOrder},null,8,["modelValue","onSort"])]),_:1},8,["size"])]),_:1})],4)),o.fileOpen?(e.openBlock(),e.createBlock(Q,{key:2,modelValue:o.fileOpen,"onUpdate:modelValue":t[23]||(t[23]=c=>o.fileOpen=c),type:"open","api-url":"/script-api/scripts",onFile:t[24]||(t[24]=c=>n.setFile(c)),onError:t[25]||(t[25]=c=>n.setError(c)),onClearTemp:t[26]||(t[26]=c=>n.clearTemp(c))},null,8,["modelValue"])):e.createCommentVNode("",!0),o.showSaveAs?(e.openBlock(),e.createBlock(Q,{key:3,modelValue:o.showSaveAs,"onUpdate:modelValue":t[27]||(t[27]=c=>o.showSaveAs=c),type:"save","api-url":"/script-api/scripts","require-target-parent-dir":"","input-filename":n.filenameOrBlank,onFilename:t[28]||(t[28]=c=>n.saveAsFilename(c)),onError:t[29]||(t[29]=c=>n.setError(c)),onClearTemp:t[30]||(t[30]=c=>n.clearTemp(c))},null,8,["modelValue","input-filename"])):e.createCommentVNode("",!0),o.showEnvironment?(e.openBlock(),e.createBlock(oe,{key:4,modelValue:o.showEnvironment,"onUpdate:modelValue":t[31]||(t[31]=c=>o.showEnvironment=c)},null,8,["modelValue"])):e.createCommentVNode("",!0),o.ask.show?(e.openBlock(),e.createBlock(ne,{key:5,modelValue:o.ask.show,"onUpdate:modelValue":t[32]||(t[32]=c=>o.ask.show=c),question:o.ask.question,default:o.ask.default,password:o.ask.password,"answer-required":o.ask.answerRequired,onResponse:o.ask.callback},null,8,["modelValue","question","default","password","answer-required","onResponse"])):e.createCommentVNode("",!0),o.file.show?(e.openBlock(),e.createBlock(j,{key:6,modelValue:o.file.show,"onUpdate:modelValue":t[33]||(t[33]=c=>o.file.show=c),title:o.file.title,message:o.file.message,multiple:o.file.multiple,filter:o.file.filter,onResponse:n.fileDialogCallback},null,8,["modelValue","title","message","multiple","filter","onResponse"])):e.createCommentVNode("",!0),o.bucket.show?(e.openBlock(),e.createBlock(se,{key:7,modelValue:o.bucket.show,"onUpdate:modelValue":t[34]||(t[34]=c=>o.bucket.show=c),title:o.bucket.title,message:o.bucket.message,onResponse:n.bucketDialogCallback},null,8,["modelValue","title","message","onResponse"])):e.createCommentVNode("",!0),o.information.show?(e.openBlock(),e.createBlock(le,{key:8,modelValue:o.information.show,"onUpdate:modelValue":t[35]||(t[35]=c=>o.information.show=c),title:o.information.title,text:o.information.text,width:o.information.width},null,8,["modelValue","title","text","width"])):e.createCommentVNode("",!0),o.inputMetadata.show?(e.openBlock(),e.createBlock(re,{key:9,modelValue:o.inputMetadata.show,"onUpdate:modelValue":t[36]||(t[36]=c=>o.inputMetadata.show=c),events:o.inputMetadata.events,"time-zone":o.timeZone,"new-metadata":"",onClose:o.inputMetadata.callback},null,8,["modelValue","events","time-zone","onClose"])):e.createCommentVNode("",!0),o.showOverrides?(e.openBlock(),e.createBlock(W,{key:10,modelValue:o.showOverrides,"onUpdate:modelValue":t[37]||(t[37]=c=>o.showOverrides=c)},null,8,["modelValue"])):e.createCommentVNode("",!0),o.prompt.show?(e.openBlock(),e.createBlock(I,{key:11,modelValue:o.prompt.show,"onUpdate:modelValue":t[38]||(t[38]=c=>o.prompt.show=c),title:o.prompt.title,subtitle:o.prompt.subtitle,message:o.prompt.message,details:o.prompt.details,buttons:o.prompt.buttons,layout:o.prompt.layout,multiple:o.prompt.multiple,onResponse:o.prompt.callback},null,8,["modelValue","title","subtitle","message","details","buttons","layout","multiple","onResponse"])):e.createCommentVNode("",!0),o.results.show?(e.openBlock(),e.createBlock(ae,{key:12,modelValue:o.results.show,"onUpdate:modelValue":t[39]||(t[39]=c=>o.results.show=c),text:o.results.text},null,8,["modelValue","text"])):e.createCommentVNode("",!0),o.scriptEnvironment.show?(e.openBlock(),e.createBlock(a,{key:13,modelValue:o.scriptEnvironment.show,"onUpdate:modelValue":t[40]||(t[40]=c=>o.scriptEnvironment.show=c),"input-environment":o.scriptEnvironment.env,onEnvironment:n.environmentHandler},null,8,["modelValue","input-environment","onEnvironment"])):e.createCommentVNode("",!0),e.createVNode(u,{modelValue:o.showSuiteError,"onUpdate:modelValue":t[41]||(t[41]=c=>o.showSuiteError=c),title:"Suite Analysis Error",text:o.suiteError,width:1e3},null,8,["modelValue","text"]),e.createVNode(f,{modelValue:o.displayCriticalCmd,"onUpdate:modelValue":t[42]||(t[42]=c=>o.displayCriticalCmd=c),uuid:o.criticalCmdUuid,"cmd-string":o.criticalCmdString,"cmd-user":o.criticalCmdUser,persistent:!0,onStatus:n.promptDialogCallback},null,8,["modelValue","uuid","cmd-string","cmd-user","onStatus"]),e.createVNode(E,{modelValue:o.commandEditor.show,"onUpdate:modelValue":t[46]||(t[46]=c=>o.commandEditor.show=c),"max-width":"1200",persistent:"",scrollable:"",onKeydown:e.withKeys(n.closeCommandDialog,["esc"])},{default:e.withCtx(()=>[e.createVNode(R,null,{default:e.withCtx(()=>[e.createVNode(p,{class:"d-flex align-center"},{default:e.withCtx(()=>[t[53]||(t[53]=e.createElementVNode("span",null,"Insert Command",-1)),e.createVNode(C),e.createVNode(d,{icon:"mdi-close",variant:"text",onClick:n.closeCommandDialog},null,8,["onClick"])]),_:1}),e.createVNode(B,{class:"pa-0"},{default:e.withCtx(()=>[o.commandEditor.dialogError?(e.openBlock(),e.createElementBlock("div",$t,[e.createVNode(m,{class:"mr-2",color:"error"},{default:e.withCtx(()=>[...t[54]||(t[54]=[e.createTextVNode("mdi-alert-circle",-1)])]),_:1}),e.createElementVNode("span",ei,e.toDisplayString(o.commandEditor.dialogError),1),e.createVNode(d,{icon:"mdi-close",size:"small",variant:"text",color:"error",class:"ml-2",onClick:t[43]||(t[43]=c=>o.commandEditor.dialogError=null)})])):e.createCommentVNode("",!0),e.createVNode(h,{ref:"commandEditor","initial-target-name":o.commandEditor.targetName,"initial-packet-name":o.commandEditor.packetName,"cmd-string":o.commandEditor.cmdString,"send-disabled":!1,"show-command-button":!1,onBuildCmd:t[44]||(t[44]=c=>n.insertCommand(c))},null,8,["initial-target-name","initial-packet-name","cmd-string"])]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(C),e.createVNode(d,{variant:"outlined",onClick:n.closeCommandDialog},{default:e.withCtx(()=>[...t[55]||(t[55]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(d,{color:"primary",variant:"flat",onClick:t[45]||(t[45]=c=>n.insertCommand())},{default:e.withCtx(()=>[...t[56]||(t[56]=[e.createTextVNode(" Insert Command ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),e.createVNode($,{modelValue:o.showScripts,"onUpdate:modelValue":t[48]||(t[48]=c=>o.showScripts=c)},{default:e.withCtx(()=>[e.createVNode(U,{class:"pb-11 pt-5 px-5"},{default:e.withCtx(()=>[o.showScripts?(e.openBlock(),e.createBlock(D,{key:0,"connect-in-new-tab":!!o.fileModified,onDisconnect:n.scriptDisconnect,onClose:t[47]||(t[47]=()=>{o.showScripts=!1})},null,8,["connect-in-new-tab","onDisconnect"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue"])],64)}const ii=z._export_sfc(Ut,[["render",ti],["__scopeId","data-v-2d948023"]]);exports.RunningScripts=he;exports.ScriptLogMessages=fe;exports.ScriptRunner=ii;exports.SuiteRunner=ge;
86
86
  //# sourceMappingURL=scriptrunner.cjs.map