openc3-cosmos-tool-limitsmonitor 5.10.0 → 5.10.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
- (self["webpackChunk_openc3_cosmos_tool_limitsmonitor"]=self["webpackChunk_openc3_cosmos_tool_limitsmonitor"]||[]).push([[609],{6609:function(e,n,t){"use strict";function i(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsMonitor.vue",n="be7b5859fd9c9171f0f00cde5deee209412c8774",t=new Function("return this")(),l="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsMonitor.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:1377}},4:{start:{line:1,column:651},end:{line:1,column:675}},5:{start:{line:1,column:819},end:{line:1,column:834}},6:{start:{line:1,column:1094},end:{line:1,column:1112}},7:{start:{line:1,column:1318},end:{line:1,column:1336}},8:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:635},end:{line:1,column:636}},loc:{start:{line:1,column:650},end:{line:1,column:676}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:803},end:{line:1,column:804}},loc:{start:{line:1,column:818},end:{line:1,column:835}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:1078},end:{line:1,column:1079}},loc:{start:{line:1,column:1093},end:{line:1,column:1113}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:1302},end:{line:1,column:1303}},loc:{start:{line:1,column:1317},end:{line:1,column:1337}},line:1}},branchMap:{0:{loc:{start:{line:1,column:926},end:{line:1,column:1149}},type:"cond-expr",locations:[{start:{line:1,column:943},end:{line:1,column:1140}},{start:{line:1,column:1141},end:{line:1,column:1149}}],line:1},1:{loc:{start:{line:1,column:1150},end:{line:1,column:1373}},type:"cond-expr",locations:[{start:{line:1,column:1167},end:{line:1,column:1364}},{start:{line:1,column:1365},end:{line:1,column:1373}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"be7b5859fd9c9171f0f00cde5deee209412c8774"},s=t[l]||(t[l]={});s[e]&&s[e].hash===n||(s[e]=o);var a=s[e];return i=function(){return a},a}t.r(n),t.d(n,{default:function(){return en}}),i(),i().s[0]++;var l=function(){i().f[0]++;var e=(i().s[1]++,this),n=(i().s[2]++,e._self._c);return i().s[3]++,n("div",[n("top-bar",{attrs:{menus:e.menus,title:e.title}}),n("v-card",[n("div",{staticClass:"pa-3"},[n("span",{staticStyle:{display:"block"}},[e._v("The Limits Set is a global option which changes the Limits Set across all tools.")]),n("span",{staticStyle:{display:"block"}},[e._v("NOTE: Changing this option clears the current list and recalculates out of limits based on the new set.")]),n("v-select",{attrs:{label:"Limits Set",items:e.limitsSets,"data-test":"limits-set","hide-details":""},model:{value:e.currentLimitsSet,callback:function(n){i().f[1]++,i().s[4]++,e.currentLimitsSet=n},expression:"currentLimitsSet"}})],1),n("limits-control",{key:e.renderKey,ref:"control",model:{value:e.ignored,callback:function(n){i().f[2]++,i().s[5]++,e.ignored=n},expression:"ignored"}})],1),n("div",{staticStyle:{height:"15px"}}),n("limits-events"),e.openConfig?(i().b[0][0]++,n("open-config-dialog",{attrs:{configKey:e.configKey},on:{success:e.openConfiguration},model:{value:e.openConfig,callback:function(n){i().f[3]++,i().s[6]++,e.openConfig=n},expression:"openConfig"}})):(i().b[0][1]++,e._e()),e.saveConfig?(i().b[1][0]++,n("save-config-dialog",{attrs:{configKey:e.configKey},on:{success:e.saveConfiguration},model:{value:e.saveConfig,callback:function(n){i().f[4]++,i().s[7]++,e.saveConfig=n},expression:"saveConfig"}})):(i().b[1][1]++,e._e())],1)},o=(i().s[8]++,[]);function s(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsControl.vue",n="f1ff7e3a760a8052f85ba268ca4e8e8b188dc566",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsControl.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:2974}},4:{start:{line:1,column:366},end:{line:1,column:1887}},5:{start:{line:1,column:798},end:{line:1,column:1018}},6:{start:{line:1,column:898},end:{line:1,column:931}},7:{start:{line:1,column:1181},end:{line:1,column:1390}},8:{start:{line:1,column:1281},end:{line:1,column:1312}},9:{start:{line:1,column:1544},end:{line:1,column:1748}},10:{start:{line:1,column:1644},end:{line:1,column:1675}},11:{start:{line:1,column:1994},end:{line:1,column:2020}},12:{start:{line:1,column:2260},end:{line:1,column:2688}},13:{start:{line:1,column:2520},end:{line:1,column:2555}},14:{start:{line:1,column:2825},end:{line:1,column:2855}},15:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:345},end:{line:1,column:346}},loc:{start:{line:1,column:365},end:{line:1,column:1888}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:774},end:{line:1,column:775}},loc:{start:{line:1,column:797},end:{line:1,column:1019}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:881},end:{line:1,column:882}},loc:{start:{line:1,column:897},end:{line:1,column:932}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:1157},end:{line:1,column:1158}},loc:{start:{line:1,column:1180},end:{line:1,column:1391}},line:1},5:{name:"(anonymous_5)",decl:{start:{line:1,column:1264},end:{line:1,column:1265}},loc:{start:{line:1,column:1280},end:{line:1,column:1313}},line:1},6:{name:"(anonymous_6)",decl:{start:{line:1,column:1520},end:{line:1,column:1521}},loc:{start:{line:1,column:1543},end:{line:1,column:1749}},line:1},7:{name:"(anonymous_7)",decl:{start:{line:1,column:1627},end:{line:1,column:1628}},loc:{start:{line:1,column:1643},end:{line:1,column:1676}},line:1},8:{name:"(anonymous_8)",decl:{start:{line:1,column:1978},end:{line:1,column:1979}},loc:{start:{line:1,column:1993},end:{line:1,column:2021}},line:1},9:{name:"(anonymous_9)",decl:{start:{line:1,column:2239},end:{line:1,column:2240}},loc:{start:{line:1,column:2259},end:{line:1,column:2689}},line:1},10:{name:"(anonymous_10)",decl:{start:{line:1,column:2503},end:{line:1,column:2504}},loc:{start:{line:1,column:2519},end:{line:1,column:2556}},line:1},11:{name:"(anonymous_11)",decl:{start:{line:1,column:2808},end:{line:1,column:2809}},loc:{start:{line:1,column:2824},end:{line:1,column:2856}},line:1}},branchMap:{0:{loc:{start:{line:1,column:474},end:{line:1,column:682}},type:"cond-expr",locations:[{start:{line:1,column:488},end:{line:1,column:589}},{start:{line:1,column:590},end:{line:1,column:682}}],line:1},1:{loc:{start:{line:1,column:1816},end:{line:1,column:1883}},type:"cond-expr",locations:[{start:{line:1,column:1847},end:{line:1,column:1874}},{start:{line:1,column:1875},end:{line:1,column:1883}}],line:1},2:{loc:{start:{line:1,column:2606},end:{line:1,column:2684}},type:"cond-expr",locations:[{start:{line:1,column:2648},end:{line:1,column:2675}},{start:{line:1,column:2676},end:{line:1,column:2684}}],line:1},3:{loc:{start:{line:1,column:2881},end:{line:1,column:2956}},type:"cond-expr",locations:[{start:{line:1,column:2916},end:{line:1,column:2947}},{start:{line:1,column:2948},end:{line:1,column:2956}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f1ff7e3a760a8052f85ba268ca4e8e8b188dc566"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var a=o[e];return s=function(){return a},a}s(),s().s[0]++;var a=function(){s().f[0]++;var e=(s().s[1]++,this),n=(s().s[2]++,e._self._c);return s().s[3]++,n("div",{staticClass:"pa-3"},[n("v-row",{attrs:{"no-gutters":""}},[n("v-text-field",{class:e.textFieldClass,attrs:{dense:"",outlined:"",readonly:"",label:"Overall Limits State",value:e.overallStateFormatted,"data-test":"overall-state"}})],1),e._l(e.items,(function(t,i){return s().f[1]++,s().s[4]++,n("div",{key:t.key},[n("v-row",{staticClass:"my-0 ml-1 mr-1",attrs:{"data-test":"limits-row"}},[t.limits?(s().b[0][0]++,n("labelvaluelimitsbar-widget",{attrs:{parameters:t.parameters,settings:e.widgetSettings}})):(s().b[0][1]++,n("labelvalue-widget",{attrs:{parameters:t.parameters,settings:e.widgetSettings}})),n("v-spacer"),n("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var l=i.on,o=i.attrs;return s().f[2]++,s().s[5]++,[n("v-btn",e._g(e._b({staticClass:"mr-2",attrs:{icon:""},on:{click:function(n){return s().f[3]++,s().s[6]++,e.ignorePacket(t.key)}}},"v-btn",o,!1),l),[n("v-icon",[e._v(" mdi-close-circle-multiple ")])],1)]}}],null,!0)},[n("span",[e._v("Ignore Entire Packet")])]),n("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var l=i.on,o=i.attrs;return s().f[4]++,s().s[7]++,[n("v-btn",e._g(e._b({staticClass:"mr-2",attrs:{icon:""},on:{click:function(n){return s().f[5]++,s().s[8]++,e.ignoreItem(t.key)}}},"v-btn",o,!1),l),[n("v-icon",[e._v(" mdi-close-circle ")])],1)]}}],null,!0)},[n("span",[e._v("Ignore Item")])]),n("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var l=i.on,o=i.attrs;return s().f[6]++,s().s[9]++,[n("v-btn",e._g(e._b({staticClass:"mr-2",attrs:{icon:""},on:{click:function(n){return s().f[7]++,s().s[10]++,e.removeItem(t.key)}}},"v-btn",o,!1),l),[n("v-icon",[e._v(" mdi-eye-off ")])],1)]}}],null,!0)},[n("span",[e._v("Temporarily Hide Item")])])],1),i<e.items.length-1?(s().b[1][0]++,n("v-divider",{key:i})):(s().b[1][1]++,e._e())],1)})),n("v-dialog",{attrs:{"max-width":"600"},model:{value:e.ignoredItemsDialog,callback:function(n){s().f[8]++,s().s[11]++,e.ignoredItemsDialog=n},expression:"ignoredItemsDialog"}},[n("v-card",[n("v-system-bar",[n("v-spacer"),n("span",[e._v("Ignored Items")]),n("v-spacer")],1),n("v-card-text",[n("div",{staticClass:"my-2"},[e._l(e.ignoredFormatted,(function(t,i){return s().f[9]++,s().s[12]++,n("div",{key:i},[n("v-row",{staticClass:"ma-1"},[n("span",{staticClass:"font-weight-black"},[e._v(" "+e._s(t)+" ")]),n("v-spacer"),n("v-btn",{attrs:{small:"",icon:"","data-test":"remove-ignore-".concat(i)},on:{click:function(n){return s().f[10]++,s().s[13]++,e.restoreItem(t,i)}}},[n("v-icon",[e._v(" mdi-delete ")])],1)],1),i<e.ignoredFormatted.length-1?(s().b[2][0]++,n("v-divider",{key:i})):(s().b[2][1]++,e._e())],1)})),n("v-row",{staticClass:"mt-2"},[n("v-spacer"),n("v-btn",{staticClass:"mx-2",attrs:{color:"primary"},on:{click:function(n){s().f[11]++,s().s[14]++,e.ignoredItemsDialog=!1}}},[e._v(" Ok ")])],1),e.index<e.items.length-1?(s().b[3][0]++,n("v-divider",{key:e.index})):(s().b[3][1]++,e._e())],2)])],1)],1)],2)},c=(s().s[15]++,[]),r=t(7302),u=t(8081),m=(t(3450),t(4769),t(7950),t(4069),t(9228),t(8188),t(9529),t(1235),t(6728),t(2501),t(8178),t(9949),t(4660),t(9805),t(4083),t(6259)),d=t(5789),A=t(6964),h=t(9502),f=t(426),v=t(7871),p=t(2261),g=(t(1372),t(1245),t(3675),t(4898),t(5825),t(7170),t(8857),t(8329),t(6279),t(427),t(171),t(7093),t(1159),t(2516),t(4349),t(5273),t(6729),t(1801),t(574),t(5787),t(9271),t(3160),t(5688),t(3157),t(3333),t(315),t(556),t(2529),t(6943),t(9224),t(1157),t(7233),t(8673),t(5734),t(8233),t(9644)),_=t.n(g),C=t(4091),b=new C["default"],y=_().create({baseURL:location.origin,timeout:6e4,params:{}});y.interceptors.response.use((function(e){return e}),(function(e){if(e.response){var n,t,i,l,o;if(401===e.response.status&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then((function(e){e&&OpenC3Auth.setTokens()})),e.response.headers["ignore-errors"]&&e.response.headers["ignore-errors"].includes(e.response.status.toString()))return Promise.reject(e);var s="HTTP ".concat(e.response.status," - ");if(null!==(n=e.response)&&void 0!==n&&n.statusText&&(s+="".concat(e.response.statusText," ")),null!==(t=e.response)&&void 0!==t&&null!==(t=t.config)&&void 0!==t&&t.data&&(s+="".concat(e.response.config.data," ")),null!==(i=e.response)&&void 0!==i&&null!==(i=i.data)&&void 0!==i&&i.message)s+="".concat(e.response.data.message);else if(null!==(l=e.response)&&void 0!==l&&null!==(l=l.data)&&void 0!==l&&l.exception)s+="".concat(e.response.data.exception);else if(null!==(o=e.response)&&void 0!==o&&null!==(o=o.data)&&void 0!==o&&null!==(o=o.error)&&void 0!==o&&o.message)e.response.data.error.class&&(s+="".concat(e.response.data.error.class," ")),s+="".concat(e.response.data.error.message);else{var a;s+="".concat(null===(a=e.response)||void 0===a?void 0:a.data)}throw b.$notify&&b.$notify.serious({title:"Network error",body:s}),e}throw e}));var w=y,x=function(){function e(){(0,f.Z)(this,e),(0,p.Z)(this,"id",1)}return(0,v.Z)(e,[{key:"exec",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n,t){var i,l,o,s,a,c,r=arguments;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:{},l=r.length>3&&void 0!==r[3]?r[3]:{},o=r.length>4&&void 0!==r[4]?r[4]:6e4,e.prev=3,e.next=6,OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);case 6:s=e.sent,s&&OpenC3Auth.setTokens(),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](3),OpenC3Auth.login();case 13:return this.id=this.id+1,e.prev=14,i["scope"]=window.openc3Scope,e.next=18,w.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:t,id:this.id,keyword_params:i},{headers:(0,A.Z)({Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc"},l),timeout:o});case 18:return a=e.sent,e.abrupt("return",a.data.result);case 22:throw e.prev=22,e.t1=e["catch"](14),c=new Error,e.t1.response?(c.name=e.t1.response.data.error.data.class,c.message=e.t1.response.data.error.data.message):e.t1.request?(c.name="Request error",c.message="Request error, no response received"):c.name="Unknown error",c;case 27:case"end":return e.stop()}}),e,this,[[3,10],[14,22]])})));function n(n,t){return e.apply(this,arguments)}return n}()},{key:"decode_openc3_type",value:function(e){if(null!==e&&"object"===(0,m.Z)(e)&&"Float"==e.json_class&&e.raw){if("NaN"==e.raw)return NaN;if("Infinity"==e.raw)return 1/0;if("-Infinity"==e.raw)return-1/0}return null}},{key:"encode_openc3_type",value:function(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}},{key:"ensure_offline_access",value:function(){var e=this;this.offline_access_needed().then((function(n){n&&(localStorage.openc3OfflineToken?e.set_offline_access(localStorage.openc3OfflineToken).then((function(){delete localStorage.openc3OfflineToken})):OpenC3Auth.getOfflineAccess())}))}},{key:"offline_access_needed",value:function(){return this.exec("offline_access_needed",[])}},{key:"set_offline_access",value:function(e){return this.exec("set_offline_access",[e])}},{key:"get_all_interface_info",value:function(){return this.exec("get_all_interface_info",[])}},{key:"map_target_to_interface",value:function(e,n){return this.exec("map_target_to_interface",[e,n])}},{key:"connect_interface",value:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),i=1;i<n;i++)t[i-1]=arguments[i];return t.length>0?this.exec("connect_interface",[e].concat(t)):this.exec("connect_interface",[e])}},{key:"disconnect_interface",value:function(e){return this.exec("disconnect_interface",[e])}},{key:"get_all_router_info",value:function(){return this.exec("get_all_router_info",[])}},{key:"connect_router",value:function(e){return this.exec("connect_router",[e])}},{key:"disconnect_router",value:function(e){return this.exec("disconnect_router",[e])}},{key:"get_target_interfaces",value:function(){return this.exec("get_target_interfaces",[])}},{key:"get_all_target_info",value:function(){return this.exec("get_all_target_info",[])}},{key:"get_tlm_cnts",value:function(e){return this.exec("get_tlm_cnts",[e])}},{key:"get_item",value:function(e,n,t){return this.exec("get_item",[e,n,t])}},{key:"get_parameter",value:function(e,n,t){return this.exec("get_parameter",[e,n,t])}},{key:"get_all_packet_logger_info",value:function(){return this.exec("get_all_packet_logger_info",[])}},{key:"start_logging",value:function(){return this.exec("start_logging",[])}},{key:"stop_logging",value:function(){return this.exec("stop_logging",[])}},{key:"start_cmd_log",value:function(e){return this.exec("start_cmd_log",[e])}},{key:"start_tlm_log",value:function(e){return this.exec("start_tlm_log",[e])}},{key:"stop_cmd_log",value:function(e){return this.exec("stop_cmd_log",[e])}},{key:"stop_tlm_log",value:function(e){return this.exec("stop_tlm_log",[e])}},{key:"get_server_status",value:function(){return this.exec("get_server_status",[])}},{key:"get_limits_sets",value:function(){return this.exec("get_limits_sets",[])}},{key:"get_limits_set",value:function(){return this.exec("get_limits_set",[])}},{key:"set_limits_set",value:function(e){return this.exec("set_limits_set",[e])}},{key:"get_background_tasks",value:function(){return this.exec("get_background_tasks",[])}},{key:"start_background_task",value:function(e){return this.exec("start_background_task",[e])}},{key:"stop_background_task",value:function(e){return this.exec("stop_background_task",[e])}},{key:"get_target",value:function(e){return this.exec("get_target",[e])}},{key:"get_target_list",value:function(){return this.exec("get_target_list",[])}},{key:"get_target_names",value:function(){return this.exec("get_target_names",[])}},{key:"get_telemetry",value:function(e,n){return this.exec("get_telemetry",[e,n])}},{key:"get_all_telemetry",value:function(e){return this.exec("get_all_telemetry",[e])}},{key:"get_all_telemetry_names",value:function(e){return this.exec("get_all_telemetry_names",[e])}},{key:"get_tlm_packet",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n,t,i){var l,o,s,a,c,r=arguments;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return l=r.length>3&&void 0!==r[3]?r[3]:30,e.next=3,this.exec("get_tlm_packet",[n,t],{type:i,stale_time:l});case 3:if(o=e.sent,null!=o)for(s=o.length,a=null,c=0;c<s;c++)a=this.decode_openc3_type(o[c][1]),null!==a&&(o[c][1]=a);return e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)})));function n(n,t,i){return e.apply(this,arguments)}return n}()},{key:"get_packet_derived_items",value:function(e,n){return this.exec("get_packet_derived_items",[e,n])}},{key:"get_tlm_buffer",value:function(e,n){return this.exec("get_tlm_buffer",[e,n])}},{key:"get_tlm_values",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n){var t,i,l,o,s,a=arguments;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>1&&void 0!==a[1]?a[1]:30,e.next=3,this.exec("get_tlm_values",[n],{stale_time:t},{},1e4);case 3:for(i=e.sent,l=i[0].length,o=null,s=0;s<l;s++)o=this.decode_openc3_type(i[0][s]),null!==o&&(i[0][s]=o);return e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)})));function n(n){return e.apply(this,arguments)}return n}()},{key:"get_limits",value:function(e,n,t){return this.exec("get_limits",[e,n,t])}},{key:"tlm",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n,t,i){var l,o,s,a,c=arguments;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(l=c.length>3&&void 0!==c[3]?c[3]:"CONVERTED",o=null,void 0!==t){e.next=8;break}return e.next=5,this.exec("tlm",[n]);case 5:o=e.sent,e.next=24;break;case 8:if(void 0!==i){e.next=21;break}if(!["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(t)){e.next=15;break}return e.next=12,this.exec("tlm",[n],{type:t});case 12:o=e.sent,e.next=19;break;case 15:throw s=new Error,s.name="TypeError",s.message="Invalid data type ".concat(t,". Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS."),s;case 19:e.next=24;break;case 21:return e.next=23,this.exec("tlm",[n,t,i],{type:l});case 23:o=e.sent;case 24:return a=this.decode_openc3_type(o),null!==a&&(o=a),e.abrupt("return",o);case 27:case"end":return e.stop()}}),e,this)})));function n(n,t,i){return e.apply(this,arguments)}return n}()},{key:"inject_tlm",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n,t){var i,l,o=arguments;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=o.length>2&&void 0!==o[2]?o[2]:null,l=o.length>3&&void 0!==o[3]?o[3]:"CONVERTED",e.next=4,this.exec("inject_tlm",[n,t,i],{type:l});case 4:data=e.sent;case 5:case"end":return e.stop()}}),e,this)})));function n(n,t){return e.apply(this,arguments)}return n}()},{key:"set_tlm",value:function(e,n,t,i){return this.exec("set_tlm",[e,n,t],{type:i})}},{key:"override_tlm",value:function(e,n,t,i){return this.exec("override_tlm",[e,n,t],{type:i})}},{key:"get_overrides",value:function(){return this.exec("get_overrides")}},{key:"normalize_tlm",value:function(e,n,t,i){return this.exec("normalize_tlm",[e,n,t],{type:i})}},{key:"get_all_commands",value:function(e){return this.exec("get_all_commands",[e])}},{key:"get_all_command_names",value:function(e){return this.exec("get_all_command_names",[e])}},{key:"get_command",value:function(e,n){return this.exec("get_command",[e,n])}},{key:"get_cmd_cnts",value:function(e){return this.exec("get_cmd_cnts",[e])}},{key:"get_cmd_value",value:function(e,n,t){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[e,n,t,i])}},{key:"get_cmd_buffer",value:function(e,n){return this.exec("get_cmd_buffer",[e,n])}},{key:"_cmd",value:function(e,n,t,i,l){var o=null;for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(o=this.encode_openc3_type(i[s]),null!==o&&(i[s]=o));return this.exec(e,[n,t,i],{},l)}},{key:"get_cmd_hazardous",value:function(e,n,t){return void 0===n?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,n,t)}},{key:"cmd",value:function(e,n,t){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return void 0===n?this.exec("cmd",e,{},i):this._cmd("cmd",e,n,t,i)}},{key:"cmd_no_range_check",value:function(e,n,t){return void 0===n?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,n,t)}},{key:"cmd_raw",value:function(e,n,t){return void 0===n?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,n,t)}},{key:"cmd_raw_no_range_check",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,n,t)}},{key:"cmd_no_hazardous_check",value:function(e,n,t){return void 0===n?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,n,t)}},{key:"cmd_no_checks",value:function(e,n,t){return void 0===n?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,n,t)}},{key:"cmd_raw_no_hazardous_check",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,n,t)}},{key:"cmd_raw_no_checks",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,n,t)}},{key:"build_command",value:function(e,n,t){return void 0===n?this.exec("build_command",e):this._cmd("build_command",e,n,t)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(e,n){return this.exec("send_raw",[e,n])}},{key:"list_configs",value:function(e){return this.exec("list_configs",[e])}},{key:"load_config",value:function(e,n){return this.exec("load_config",[e,n])}},{key:"save_config",value:function(e,n,t){return this.exec("save_config",[e,n,t])}},{key:"delete_config",value:function(e,n){return this.exec("delete_config",[e,n])}},{key:"enable_limits",value:function(e,n,t){return this.exec("enable_limits",[e,n,t])}},{key:"disable_limits",value:function(e,n,t){return this.exec("disable_limits",[e,n,t])}},{key:"get_out_of_limits",value:function(){return this.exec("get_out_of_limits",[])}},{key:"get_overall_limits_state",value:function(e){return this.exec("get_overall_limits_state",[e])}},{key:"list_settings",value:function(){return this.exec("list_settings",[])}},{key:"get_all_settings",value:function(){return this.exec("get_all_settings",[])}},{key:"get_setting",value:function(e){return this.exec("get_setting",[e])}},{key:"get_settings",value:function(e){return this.exec("get_settings",e)}},{key:"save_setting",value:function(e,n){return this.exec("save_setting",[e,n])}},{key:"get_metrics",value:function(){return this.exec("get_metrics",[])}},{key:"hashString",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n){var t,i,l;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!window.isSecureContext){e.next=7;break}return t=(new TextEncoder).encode(n),e.next=4,crypto.subtle.digest("SHA-256",t);case 4:return i=e.sent,l=new Uint8Array(i),e.abrupt("return",Array.from(l).map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 7:case"end":return e.stop()}}),e)})));function n(n){return e.apply(this,arguments)}return n}()}]),e}(),k=t(7146);k.ju.staleThreshold=10;var S=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/openc3-api/cable";(0,f.Z)(this,e),this._cable=null,this._url=n}return(0,v.Z)(e,[{key:"disconnect",value:function(){this._cable&&this._cable.disconnect()}},{key:"createSubscription",value:function(e,n){var t=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((function(n){if(n&&OpenC3Auth.setTokens(),null==t._cable){var o=t._url+"?scope="+window.openc3Scope+"&authorization="+localStorage.openc3Token;t._cable=k.zD(o)}return t._cable.subscriptions.create((0,A.Z)({channel:e},l),i)}))}},{key:"recordPing",value:function(){this._cable.connection.monitor.recordPing()}}]),e}(),I=t(615),L=function(){var e=this,n=e._self._c;return n("div",{ref:"container",staticClass:"d-flex flex-row",style:e.computedStyle},[n("label-widget",{attrs:{parameters:e.labelName,settings:(0,I.Z)(e.settings),line:e.line,lineNumber:e.lineNumber,"widget-index":0}}),n("value-widget",{attrs:{parameters:e.parameters,settings:(0,I.Z)(e.settings),line:e.line,lineNumber:e.lineNumber,"widget-index":1}})],1)},E=[],N=(t(1939),t(8995),t(1951),t(5940),t(5794),(0,v.Z)((function e(n,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,f.Z)(this,e),this.keyword=n.keyword,this.parameters=n.parameters,this.filename=n.filename,this.line=n.line,this.lineNumber=n.lineNumber,this.message=t,this.usage=i,this.url=l}))),O={props:{widgetIndex:{type:Number,default:null},parameters:{type:Array,default:function(){return[]}},settings:{type:Array,default:function(){return[]}},line:{type:String,default:""},lineNumber:{type:Number,default:0}},data:function(){return{screen:null}},computed:{computedStyle:function(){var e=this,n={};return this.settings.forEach((function(t){var i=parseInt(t[0]);if(null!==e.widgetIndex){if(e.widgetIndex!==i)return;t=t.slice(1)}e.applySetting(n,t)})),void 0===n["width"]&&(n["flex"]="0 10 100%"),n}},created:function(){var e=this;this.settings.forEach((function(n){"__SCREEN__"===n[0]&&(e.screen=n[1])}))},methods:{applySetting:function(e,n){switch(n[0]){case"TEXTALIGN":e["text-align"]=n[1].toLowerCase()+" !important",e["--text-align"]=n[1].toLowerCase();break;case"PADDING":isNaN(Number(n[1]))||(n[1]+="px"),e["padding"]=n[1]+" !important";break;case"MARGIN":isNaN(Number(n[1]))||(n[1]+="px"),e["margin"]=n[1]+" !important";break;case"BACKCOLOR":e["background-color"]=this.getColor(n.slice(1))+" !important";break;case"TEXTCOLOR":e["color"]=this.getColor(n.slice(1))+" !important";break;case"BORDERCOLOR":e["border-width"]="1px!important",e["border-style"]="solid!important",e["border-color"]=this.getColor(n.slice(1))+" !important";break;case"WIDTH":isNaN(Number(n[1]))||(n[1]+="px"),e["width"]=n[1]+" !important";break;case"HEIGHT":isNaN(Number(n[1]))||(n[1]+="px"),e["height"]=n[1]+" !important";break;case"RAW":e[n[1].toLowerCase()]=n[2]+" !important";break}},verifyNumParams:function(e,n,t){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",l={line:this.line,lineNumber:this.lineNumber,keyword:e,parameters:this.parameters},o=1;o<=n;o++)if(void 0===this.parameters[o-1])throw new N(l,"Not enough parameters for ".concat(e,"."),i,"https://openc3.com/docs/v5");if(t&&void 0===!this.parameters[t])throw new N(l,"Too many parameters for ".concat(e,"."),i,"https://openc3.com/docs/v5")},setWidth:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"120",l=null;if(l=null!==this.widgetIndex?this.settings.find((function(e){return parseInt(e[0])===n.widgetIndex&&"WIDTH"===e[1]})):this.settings.find((function(e){return"WIDTH"===e[0]})),l)return l["WIDTH"];if(e){var o=["WIDTH","".concat(e).concat(t)];return null!==this.widgetIndex&&o.unshift(this.widgetIndex),this.settings.push(o),parseInt(e)}var s=["WIDTH","".concat(i).concat(t)];return null!==this.widgetIndex&&s.unshift(this.widgetIndex),this.settings.push(s),parseInt(i)},setHeight:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"20",l=null;if(l=null!==this.widgetIndex?this.settings.find((function(e){return parseInt(e[0])===n.widgetIndex&&"HEIGHT"===e[1]})):this.settings.find((function(e){return"HEIGHT"===e[0]})),l)return l["HEIGHT"];if(e){var o=["HEIGHT","".concat(e).concat(t)];return null!==this.widgetIndex&&o.unshift(this.widgetIndex),this.settings.push(o),parseInt(e)}var s=["HEIGHT","".concat(i).concat(t)];return null!==this.widgetIndex&&s.unshift(this.widgetIndex),this.settings.push(s),parseInt(i)},getColor:function(e){switch(e.length){case 1:return e[0].toLowerCase();case 3:return"rgb(".concat(e[0],",").concat(e[1],",").concat(e[2],")")}}}},T=function(){var e=this,n=e._self._c;return n("div",{staticClass:"pa-1 mt-1 label",style:[e.cssProps,e.computedStyle],attrs:{"data-test":"label"}},[e._v(" "+e._s(e.labelText)+" ")])},M=[],R={mixins:[O],data:function(){return{fontFamily:null,fontSize:null,fontWeight:"normal",fontStyle:"normal"}},computed:{labelText:function(){return this.parameters[0]},cssProps:function(){var e=null;return this.fontSize&&(e=this.fontSize+"px"),{"--font-family":this.fontFamily,"--font-size":e,"--font-weight":this.fontWeight,"--font-style":this.fontStyle}}},created:function(){this.verifyNumParams("LABEL",1,5,"LABEL <Text> <Font Family> <Font Size> <Font Weight> <Font Style>"),this.parameters[1]&&(this.fontFamily=this.parameters[1]),this.parameters[2]&&(this.fontSize=this.parameters[2]),this.parameters[3]&&(this.fontWeight=this.parameters[3]),this.parameters[4]&&(this.fontStyle=this.parameters[4])}},V=R,D=(t(8489),t(3483)),H=(0,D.Z)(V,T,M,!1,null,"19db816e",null),W=H.exports,Z=function(){var e=this,n=e._self._c;return n("div",{staticClass:"value-widget-container",style:[e.computedStyle,e.aging]},[n("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,l=t.attrs;return[n("v-text-field",e._g(e._b({class:e.valueClass,attrs:{solo:"",dense:"",readonly:"","single-line":"","hide-no-data":"","hide-details":"",placeholder:"Value",value:e._value,"data-test":"value"},on:{contextmenu:e.showContextMenu}},"v-text-field",l,!1),i))]}}])},[n("span",[e._v(e._s(e.fullName))])]),n("v-menu",{attrs:{"position-x":e.x,"position-y":e.y,absolute:"","offset-y":""},model:{value:e.contextMenuShown,callback:function(n){e.contextMenuShown=n},expression:"contextMenuShown"}},[n("v-list",e._l(e.contextMenuOptions,(function(t,i){return n("v-list-item",{key:i,on:{click:function(e){return e.stopPropagation(),t.action.apply(null,arguments)}}},[n("v-list-item-title",[e._v(e._s(t.title))])],1)})),1)],1),n("details-dialog",{attrs:{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2]},model:{value:e.viewDetails,callback:function(n){e.viewDetails=n},expression:"viewDetails"}})],1)},F=[],P=(t(6708),t(131),{mixins:[O],props:{value:{default:null},limitsState:{type:String,default:null},counter:{default:null},formatString:null},data:function(){var e=this;return{curValue:null,prevValue:null,grayLevel:80,grayRate:5,valueId:null,colorBlind:!1,viewDetails:!1,contextMenuShown:!1,x:0,y:0,contextMenuOptions:[{title:"Details",action:function(){e.contextMenuShown=!1,e.viewDetails=!0}},{title:"Graph",action:function(){window.open("/tools/tlmgrapher/"+e.parameters[0]+"/"+e.parameters[1]+"/"+e.parameters[2],"_blank")}}]}},watch:{_counter:function(e,n){this.curValue!==this.prevValue?this.grayLevel=80:(this.grayLevel-=this.grayRate,this.grayLevel<30&&(this.grayLevel=30)),this.prevValue=this.curValue}},computed:{_value:function(){return this.curValue=this.value,null===this.curValue&&(this.screen?this.screen.screenValues[this.valueId]&&(this.curValue=this.screen.screenValues[this.valueId][0]):this.curValue=null),this.curValue=this.formatValue(this.curValue),"true"===localStorage.colorblindMode&&""!==this.limitsLetter?"".concat(this.curValue," (").concat(this.limitsLetter,")"):this.curValue},_counter:function(){var e=this.counter;return null===e&&(this.screen?this.screen.screenValues[this.valueId]&&(e=this.screen.screenValues[this.valueId][2]):e=null),e},valueClass:function(){return"value shrink pa-1 openc3-"+this.limitsColor},limitsColor:function(){var e=this.limitsState;if(null===e&&(this.screen?this.screen.screenValues[this.valueId]&&(e=this.screen.screenValues[this.valueId][1]):e=null),null!=e)switch(e){case"GREEN":case"GREEN_HIGH":case"GREEN_LOW":return"green";case"YELLOW":case"YELLOW_HIGH":case"YELLOW_LOW":return"yellow";case"RED":case"RED_HIGH":case"RED_LOW":return"red";case"BLUE":return"blue";case"STALE":return"purple";default:return"white"}return""},limitsLetter:function(){var e=this.limitsState;if(null===e&&(this.screen?this.screen.screenValues[this.valueId]&&(e=this.screen.screenValues[this.valueId][1]):e=null),null!=e){var n=e.charAt(0);return e.endsWith("_LOW")&&(n=n.toLowerCase()),n}return""}},created:function(){null!==this.value&&null!==this.limitsState||(this.valueId="".concat(this.parameters[0],"__").concat(this.parameters[1],"__").concat(this.parameters[2],"__").concat(this.getType()),this.screen&&this.screen.addItem(this.valueId))},destroyed:function(){null!==this.value&&null!==this.limitsState||this.screen&&this.screen.deleteItem(this.valueId)},methods:{getType:function(){var e="WITH_UNITS";return this.parameters[3]&&(e=this.parameters[3]),e},formatValue:function(e){if(e&&"String"===e["json_class"]&&void 0!==e["raw"]){var n=Array.from(e["raw"].slice(0,32),(function(e){return("0"+(255&e).toString(16)).slice(-2)})).join(" ").toUpperCase();return e["raw"].length>32&&(n+="..."),n}if("Array"===Object.prototype.toString.call(e).slice(8,-1)){for(var t="[",i=0;i<e.length;i++)"String"===Object.prototype.toString.call(e[i]).slice(8,-1)?t+='"'+e[i]+'"':t+=e[i],i!=e.length-1&&(t+=", ");return t+="]",t}return"Object"===Object.prototype.toString.call(e).slice(8,-1)?"":this.formatString&&e?sprintf(this.formatString,e):""+e},showContextMenu:function(e){var n=this;e.preventDefault(),this.contextMenuShown=!1,this.x=e.clientX,this.y=e.clientY,this.$nextTick((function(){n.contextMenuShown=!0}))}}}),$=(t(4115),t(634),function(){var e=this,n=e._self._c;return n("v-dialog",{attrs:{width:"600"},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[n("v-card",[n("v-system-bar",[n("v-spacer"),n("span",[e._v(" Details ")]),n("v-spacer")],1),n("v-card-title",[e._v(" "+e._s(e.targetName)+" "+e._s(e.packetName)+" "+e._s(e.itemName)+" ")]),n("v-card-subtitle",[e._v(e._s(e.details.description))]),n("v-card-text",[n("v-container",{attrs:{fluid:""}},["tlm"===e.type?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Item Values")]),n("v-col"),n("v-container",{staticClass:"ml-5 pa-0",attrs:{fluid:""}},[n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v("Raw Value")]),n("v-col",[e._v(e._s(e.rawValue))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v("Converted Value")]),n("v-col",[e._v(e._s(e.convertedValue))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v("Formatted Value")]),n("v-col",[e._v(e._s(e.formattedValue))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v("With Units Value")]),n("v-col",[e._v(e._s(e.unitsValue))])],1)],1)],1):e._e(),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Bit Offset")]),n("v-col",[e._v(e._s(e.details.bit_offset))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Bit Size")]),n("v-col",[e._v(e._s(e.details.bit_size))])],1),e.details.array_size?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Array Size")]),n("v-col",[e._v(e._s(e.details.array_size))])],1):e._e(),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Data Type")]),n("v-col",[e._v(e._s(e.details.data_type))])],1),"cmd"===e.type?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Minimum")]),n("v-col",[e._v(e._s(e.details.minimum))])],1):e._e(),"cmd"===e.type?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Maximum")]),n("v-col",[e._v(e._s(e.details.maximum))])],1):e._e(),"cmd"===e.type?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Default")]),n("v-col",[e._v(e._s(e.details.default))])],1):e._e(),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Format String")]),n("v-col",[e._v(e._s(e.details.format_string))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Read Conversion")]),e.details.read_conversion?n("v-col",[e._v(" Class: "+e._s(e.details.read_conversion.class)+" "),n("br"),e._v(" Params: "+e._s(e.details.read_conversion.params)+" ")]):n("v-col")],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Write Conversion")]),e.details.write_conversion?n("v-col",[e._v(" Class: "+e._s(e.details.write_conversion.class)+" "),n("br"),e._v(" Params: "+e._s(e.details.write_conversion.params)+" ")]):n("v-col")],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Id Value")]),n("v-col",[e._v(e._s(e.details.id_value))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Units Full")]),n("v-col",[e._v(e._s(e.details.units_full))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Units Abbr")]),n("v-col",[e._v(e._s(e.details.units))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Endianness")]),n("v-col",[e._v(e._s(e.details.endianness))])],1),e.details.states?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("States")]),n("v-col"),n("v-container",{staticClass:"ml-5 pa-0",attrs:{fluid:""}},e._l(e.details.states,(function(t,i){return n("v-row",{key:i,attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v(e._s(i))]),n("v-col",[e._v(e._s(t.value))])],1)})),1)],1):n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("States")]),n("v-col",[e._v("None")])],1),e.details.limits?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Limits")]),n("v-col"),n("v-container",{staticClass:"ml-5 pa-0",attrs:{fluid:""}},e._l(e.details.limits,(function(t,i){return n("v-row",{key:i,attrs:{"no-gutters":""}},["enabled"===i?n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v("Enabled")]):e._e(),"enabled"===i?n("v-switch",{attrs:{dense:"","hide-details":""},on:{change:e.changeLimitsEnabled},model:{value:e.details.limits.enabled,callback:function(n){e.$set(e.details.limits,"enabled",n)},expression:"details.limits.enabled"}}):e._e(),"enabled"!==i?n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v(e._s(i))]):e._e(),"enabled"!==i?n("div",[e._v(e._s(e.formatLimit(t)))]):e._e(),n("v-col")],1)})),1)],1):n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Limits")]),n("v-col",[e._v("None")])],1),e.details.meta?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Meta")]),n("v-col"),n("v-container",{staticClass:"ml-5 pa-0",attrs:{fluid:""}},e._l(e.details.meta,(function(t,i){return n("v-row",{key:i,attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v(e._s(i))]),n("v-col",[e._v(e._s(t))])],1)})),1)],1):n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Meta")]),n("v-col",[e._v("None")])],1)],1)],1)],1)],1)}),G=[],K={props:{type:{default:"tlm",validator:function(e){return-1!==["cmd","tlm"].indexOf(e)}},targetName:String,packetName:String,itemName:String,value:Boolean},data:function(){return{details:Object,updater:null,rawValue:null,convertedValue:null,formattedValue:null,unitsValue:null}},computed:{show:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},created:function(){this.api=new x},beforeDestroy:function(){clearInterval(this.updater),this.updater=null},watch:{value:function(e,n){var t=this;e?(this.requestDetails(),"tlm"===this.type&&(this.updater=setInterval((function(){t.api.get_tlm_values(["".concat(t.targetName,"__").concat(t.packetName,"__").concat(t.itemName,"__RAW"),"".concat(t.targetName,"__").concat(t.packetName,"__").concat(t.itemName,"__CONVERTED"),"".concat(t.targetName,"__").concat(t.packetName,"__").concat(t.itemName,"__FORMATTED"),"".concat(t.targetName,"__").concat(t.packetName,"__").concat(t.itemName,"__WITH_UNITS")]).then((function(e){for(var n=0;n<e.length;n++){var i=null;if("String"===e[n][0]["json_class"]&&void 0!==e[n][0]["raw"]?i=e[n][0]["raw"]:"BLOCK"===t.details.data_type&&(i=e[n][0]),null!==i){i=i.slice(0,parseInt(t.details.bit_size)/8);var l=!1;i.length>64&&(l=!0),e[n][0]=Array.from(i.slice(0,64),(function(e){return("0"+(255&e).toString(16)).slice(-2)})).join(" ").toUpperCase(),l&&(e[n][0]+="...")}}t.rawValue=e[0][0],t.convertedValue=e[1][0],t.formattedValue=e[2][0],t.unitsValue=e[3][0]}))}),1e3))):(clearInterval(this.updater),this.updater=null)}},methods:{requestDetails:function(){var e=this;return(0,h.Z)((0,d.Z)().mark((function n(){return(0,d.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if("tlm"!==e.type){n.next=5;break}return n.next=3,e.api.get_item(e.targetName,e.packetName,e.itemName).then((function(n){if(e.details=n,n.limits){var t=!1;n.limits.enabled&&(t=!0,delete n.limits.enabled),e.details.limits=(0,A.Z)({enabled:t},n.limits)}}));case 3:n.next=7;break;case 5:return n.next=7,e.api.get_parameter(e.targetName,e.packetName,e.itemName).then((function(n){e.details=n}));case 7:case"end":return n.stop()}}),n)})))()},changeLimitsEnabled:function(){var e=this;return(0,h.Z)((0,d.Z)().mark((function n(){return(0,d.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!e.details.limits.enabled){n.next=5;break}return n.next=3,e.api.enable_limits(e.targetName,e.packetName,e.itemName);case 3:n.next=7;break;case 5:return n.next=7,e.api.disable_limits(e.targetName,e.packetName,e.itemName);case 7:case"end":return n.stop()}}),n)})))()},formatLimit:function(e){return e.green_low?"RL/"+e.red_low+" YL/"+e.yellow_low+" YH/"+e.yellow_high+" RH/"+e.red_high+" GL/"+e.green_low+" GH/"+e.green_high:e.red_low?"RL/"+e.red_low+" YL/"+e.yellow_low+" YH/"+e.yellow_high+" RH/"+e.red_high:e}}},U=K,B=(t(3270),(0,D.Z)(U,$,G,!1,null,"1e0f0ab0",null)),Y=B.exports,j=4,z={components:{DetailsDialog:Y},mixins:[P],data:function(){return{width:12+j}},computed:{fullName:function(){return this.parameters[0]+" "+this.parameters[1]+" "+this.parameters[2]},aging:function(){return{"--aging":this.grayLevel}}},created:function(){this.verifyNumParams("VALUE",3,3,"VALUE <TARGET> <PACKET> <ITEM>"),this.setWidth(parseInt(this.parameters[4])+j,"ch",this.width)}},q=z,J=(t(19),(0,D.Z)(q,Z,F,!1,null,"2750a386",null)),X=J.exports,Q={mixins:[O],components:{LabelWidget:W,ValueWidget:X},computed:{labelName:function(){return[this.parameters[2]+":"]}}},ee=Q,ne=(0,D.Z)(ee,L,E,!1,null,null,null),te=ne.exports,ie=function(){var e=this,n=e._self._c;return n("div",{ref:"container",staticClass:"d-flex flex-row",style:e.computedStyle},[n("labelvalue-widget",{attrs:{parameters:e.parameters,settings:e.labelValueSettings}}),n("limitsbar-widget",{attrs:{parameters:e.limitsBarParameters,settings:(0,I.Z)(e.settings),"widget-index":2}})],1)},le=[],oe=(t(5342),function(){var e=this,n=e._self._c;return n("div",{staticClass:"limitsbar",style:[e.cssProps,e.computedStyle]},[e._m(0)])}),se=[function(){var e=this,n=e._self._c;return n("div",{staticClass:"limitsbar__container"},[n("div",{staticClass:"limitsbar__redlow"}),n("div",{staticClass:"limitsbar__redhigh"}),n("div",{staticClass:"limitsbar__yellowlow"}),n("div",{staticClass:"limitsbar__yellowhigh"}),n("div",{staticClass:"limitsbar__greenlow"}),n("div",{staticClass:"limitsbar__greenhigh"}),n("div",{staticClass:"limitsbar__blue"}),n("div",{staticClass:"limitsbar__line"}),n("div",{staticClass:"limitsbar__arrow"})])}],ae="DEFAULT",ce={mixins:[O],data:function(){return{width:160,height:22,minValue:null,maxValue:null,scale:0,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:ae,currentSetRefreshInterval:null}},computed:{cssProps:function(){var e=null;this.screen&&(e=this.screen.screenValues[this.valueId][0]);var n=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(n),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(e,n)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:ae}},created:function(){var e=this;this.api=new x,this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then((function(n){e.limitsSettings=n})),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.settings.forEach((function(n){"MIN_VALUE"===n[0]&&(e.minValue=parseInt(n[1])),"MAX_VALUE"===n[0]&&(e.maxValue=parseInt(n[1]))})),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height);var n="CONVERTED";this.parameters[3]&&(n=this.parameters[3]),this.valueId="".concat(this.parameters[0],"__").concat(this.parameters[1],"__").concat(this.parameters[2],"__").concat(n),this.screen&&this.screen.addItem(this.valueId)},destroyed:function(){this.screen&&this.screen.deleteItem(this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits:function(e){this.redLow=10,this.redHigh=10,this.minValue&&(e[0]<=this.minValue&&(e[0]=this.minValue,this.redLow=0),e[1]<=this.minValue&&(e[1]=this.minValue),e[2]<=this.minValue&&(e[2]=this.minValue),e[3]<=this.minValue&&(e[3]=this.minValue),e.length>4&&e[4]<=this.minValue&&(e[4]=this.minValue),e.length>4&&e[5]<=this.minValue&&(e[5]=this.minValue)),this.maxValue&&(e[0]>=this.maxValue&&(e[0]=this.maxValue),e[1]>=this.maxValue&&(e[1]=this.maxValue),e[2]>=this.maxValue&&(e[2]=this.maxValue),e[3]>=this.maxValue&&(e[3]=this.maxValue,this.redHigh=0),e.length>4&&e[4]>=this.maxValue&&(e[4]=this.maxValue),e.length>4&&e[5]>=this.maxValue&&(e[5]=this.maxValue)),e[0]==e[1]&&(this.yellowLow=0),e[2]==e[3]&&(this.yellowHigh=0);var n=80;return 0==this.redLow&&(n+=10),0==this.redHigh&&(n+=10),this.scale=(e[3]-e[0])/n,e},calcPosition:function(e,n){if(null!=e&&n){var t=n[0]-10*this.scale;this.minValue&&this.minValue==n[0]&&(t=n[0]);n[3],this.scale;if(this.maxValue&&this.maxValue==n[3]&&n[3],e.raw)return"-Infinity"===e.raw?0:100;if(e<this.min)return 0;if(e>this.max)return 100;var i=parseInt((e-t)/this.scale);return i>100?100:i<0?0:i}},calcLimits:function(e){e&&(this.yellowLow=Math.round((e[1]-e[0])/this.scale),this.yellowHigh=Math.round((e[3]-e[2])/this.scale),e.length>4?(this.greenLow=Math.round((e[4]-e[1])/this.scale),this.greenHigh=Math.round((e[2]-e[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){var e=this;this.api.get_limits_set().then((function(n){e.currentLimitsSet=n}))}}},re=ce,ue=(t(9731),(0,D.Z)(re,oe,se,!1,null,"344f6330",null)),me=ue.exports,de={mixins:[O],components:{LabelvalueWidget:te,LimitsbarWidget:me},computed:{labelValueSettings:function(){return[].concat((0,I.Z)(this.settings.filter((function(e){return"__SCREEN__"===e[0]}))),(0,I.Z)(this.settings.filter((function(e){return 0===parseInt(e[0])||1===parseInt(e[0])}))))},limitsBarParameters:function(){return[this.parameters[0],this.parameters[1],this.parameters[2],"CONVERTED"]}}},Ae=de,he=(0,D.Z)(Ae,ie,le,!1,null,null,null),fe=he.exports;function ve(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsControl.vue",n="8119b8bdef11ca4d96cf611cbaf0e1f2c2ce616c",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsControl.vue",statementMap:{0:{start:{line:16,column:21},end:{line:16,column:23}},1:{start:{line:20,column:4},end:{line:38,column:5}},2:{start:{line:42,column:6},end:{line:46,column:7}},3:{start:{line:43,column:8},end:{line:43,column:61}},4:{start:{line:45,column:8},end:{line:45,column:17}},5:{start:{line:49,column:6},end:{line:53,column:7}},6:{start:{line:50,column:8},end:{line:50,column:32}},7:{start:{line:52,column:8},end:{line:52,column:58}},8:{start:{line:56,column:6},end:{line:56,column:61}},9:{start:{line:56,column:37},end:{line:56,column:60}},10:{start:{line:60,column:4},end:{line:60,column:30}},11:{start:{line:62,column:4},end:{line:70,column:5}},12:{start:{line:63,column:6},end:{line:69,column:7}},13:{start:{line:65,column:8},end:{line:65,column:35}},14:{start:{line:68,column:8},end:{line:68,column:37}},15:{start:{line:71,column:4},end:{line:71,column:28}},16:{start:{line:73,column:4},end:{line:82,column:8}},17:{start:{line:76,column:10},end:{line:76,column:33}},18:{start:{line:77,column:10},end:{line:77,column:37}},19:{start:{line:81,column:8},end:{line:81,column:52}},20:{start:{line:83,column:4},end:{line:93,column:8}},21:{start:{line:86,column:10},end:{line:86,column:33}},22:{start:{line:87,column:25},end:{line:87,column:41}},23:{start:{line:88,column:10},end:{line:88,column:41}},24:{start:{line:92,column:8},end:{line:92,column:52}},25:{start:{line:96,column:4},end:{line:98,column:12}},26:{start:{line:97,column:6},end:{line:97,column:19}},27:{start:{line:101,column:4},end:{line:104,column:5}},28:{start:{line:102,column:6},end:{line:102,column:33}},29:{start:{line:103,column:6},end:{line:103,column:25}},30:{start:{line:105,column:4},end:{line:107,column:5}},31:{start:{line:106,column:6},end:{line:106,column:43}},32:{start:{line:108,column:4},end:{line:110,column:5}},33:{start:{line:109,column:6},end:{line:109,column:43}},34:{start:{line:111,column:4},end:{line:111,column:27}},35:{start:{line:115,column:6},end:{line:115,column:21}},36:{start:{line:116,column:6},end:{line:116,column:24}},37:{start:{line:118,column:6},end:{line:145,column:8}},38:{start:{line:119,column:8},end:{line:143,column:9}},39:{start:{line:120,column:25},end:{line:120,column:40}},40:{start:{line:122,column:10},end:{line:124,column:11}},41:{start:{line:122,column:45},end:{line:122,column:71}},42:{start:{line:123,column:12},end:{line:123,column:20}},43:{start:{line:126,column:10},end:{line:126,column:38}},44:{start:{line:127,column:25},end:{line:130,column:11}},45:{start:{line:131,column:10},end:{line:133,column:11}},46:{start:{line:132,column:12},end:{line:132,column:40}},47:{start:{line:134,column:10},end:{line:136,column:11}},48:{start:{line:135,column:12},end:{line:135,column:37}},49:{start:{line:137,column:10},end:{line:141,column:11}},50:{start:{line:138,column:12},end:{line:138,column:38}},51:{start:{line:140,column:12},end:{line:140,column:37}},52:{start:{line:142,column:10},end:{line:142,column:35}},53:{start:{line:144,column:8},end:{line:144,column:31}},54:{start:{line:148,column:20},end:{line:148,column:27}},55:{start:{line:149,column:6},end:{line:161,column:7}},56:{start:{line:150,column:8},end:{line:152,column:9}},57:{start:{line:150,column:43},end:{line:150,column:65}},58:{start:{line:151,column:10},end:{line:151,column:18}},59:{start:{line:154,column:8},end:{line:156,column:9}},60:{start:{line:155,column:10},end:{line:155,column:28}},61:{start:{line:157,column:8},end:{line:160,column:9}},62:{start:{line:158,column:10},end:{line:158,column:25}},63:{start:{line:159,column:10},end:{line:159,column:15}},64:{start:{line:162,column:6},end:{line:162,column:33}},65:{start:{line:165,column:50},end:{line:165,column:66}},66:{start:{line:166,column:23},end:{line:166,column:55}},67:{start:{line:167,column:6},end:{line:167,column:35}},68:{start:{line:168,column:6},end:{line:168,column:38}},69:{start:{line:170,column:6},end:{line:178,column:7}},70:{start:{line:171,column:20},end:{line:171,column:80}},71:{start:{line:171,column:54},end:{line:171,column:79}},72:{start:{line:172,column:8},end:{line:177,column:9}},73:{start:{line:173,column:10},end:{line:173,column:15}},74:{start:{line:175,column:27},end:{line:175,column:65}},75:{start:{line:176,column:10},end:{line:176,column:72}},76:{start:{line:179,column:6},end:{line:179,column:29}},77:{start:{line:182,column:6},end:{line:182,column:29}},78:{start:{line:183,column:6},end:{line:183,column:38}},79:{start:{line:184,column:6},end:{line:184,column:27}},80:{start:{line:185,column:6},end:{line:185,column:29}},81:{start:{line:188,column:6},end:{line:188,column:35}},82:{start:{line:189,column:6},end:{line:189,column:26}},83:{start:{line:190,column:6},end:{line:190,column:30}},84:{start:{line:193,column:20},end:{line:195,column:7}},85:{start:{line:194,column:8},end:{line:194,column:32}},86:{start:{line:196,column:6},end:{line:196,column:33}},87:{start:{line:197,column:6},end:{line:197,column:36}},88:{start:{line:200,column:6},end:{line:200,column:39}},89:{start:{line:203,column:6},end:{line:208,column:7}},90:{start:{line:205,column:8},end:{line:207,column:9}},91:{start:{line:206,column:10},end:{line:206,column:34}},92:{start:{line:211,column:6},end:{line:263,column:7}},93:{start:{line:212,column:8},end:{line:212,column:46}},94:{start:{line:216,column:8},end:{line:218,column:9}},95:{start:{line:217,column:10},end:{line:217,column:18}},96:{start:{line:220,column:23},end:{line:220,column:93}},97:{start:{line:221,column:22},end:{line:223,column:9}},98:{start:{line:222,column:10},end:{line:222,column:38}},99:{start:{line:225,column:8},end:{line:229,column:9}},100:{start:{line:226,column:10},end:{line:226,column:75}},101:{start:{line:227,column:10},end:{line:227,column:33}},102:{start:{line:228,column:10},end:{line:228,column:18}},103:{start:{line:231,column:8},end:{line:233,column:9}},104:{start:{line:231,column:43},end:{line:231,column:69}},105:{start:{line:232,column:10},end:{line:232,column:18}},106:{start:{line:235,column:8},end:{line:243,column:9}},107:{start:{line:242,column:10},end:{line:242,column:18}},108:{start:{line:244,column:23},end:{line:251,column:9}},109:{start:{line:252,column:8},end:{line:259,column:9}},110:{start:{line:256,column:10},end:{line:256,column:36}},111:{start:{line:258,column:10},end:{line:258,column:35}},112:{start:{line:260,column:8},end:{line:260,column:70}},113:{start:{line:261,column:8},end:{line:261,column:33}},114:{start:{line:262,column:8},end:{line:262,column:31}},115:{start:{line:266,column:6},end:{line:270,column:7}},116:{start:{line:267,column:8},end:{line:269,column:10}},117:{start:{line:268,column:10},end:{line:268,column:33}},118:{start:{line:273,column:6},end:{line:273,column:29}},119:{start:{line:274,column:6},end:{line:277,column:7}},120:{start:{line:274,column:19},end:{line:274,column:20}},121:{start:{line:275,column:8},end:{line:275,column:42}},122:{start:{line:276,column:8},end:{line:276,column:66}},123:{start:{line:280,column:6},end:{line:280,column:36}},124:{start:{line:281,column:6},end:{line:281,column:58}},125:{start:{line:284,column:18},end:{line:284,column:51}},126:{start:{line:285,column:6},end:{line:285,column:39}},127:{start:{line:290,column:6},end:{line:290,column:36}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:16,column:15},end:{line:16,column:16}},loc:{start:{line:16,column:21},end:{line:16,column:23}},line:16},1:{name:"(anonymous_1)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:9},end:{line:39,column:3}},line:19},2:{name:"(anonymous_2)",decl:{start:{line:41,column:4},end:{line:41,column:5}},loc:{start:{line:41,column:21},end:{line:47,column:5}},line:41},3:{name:"(anonymous_3)",decl:{start:{line:48,column:4},end:{line:48,column:5}},loc:{start:{line:48,column:28},end:{line:54,column:5}},line:48},4:{name:"(anonymous_4)",decl:{start:{line:55,column:4},end:{line:55,column:5}},loc:{start:{line:55,column:23},end:{line:57,column:5}},line:55},5:{name:"(anonymous_5)",decl:{start:{line:56,column:30},end:{line:56,column:31}},loc:{start:{line:56,column:37},end:{line:56,column:60}},line:56},6:{name:"(anonymous_6)",decl:{start:{line:59,column:2},end:{line:59,column:3}},loc:{start:{line:59,column:12},end:{line:94,column:3}},line:59},7:{name:"(anonymous_7)",decl:{start:{line:75,column:18},end:{line:75,column:19}},loc:{start:{line:75,column:30},end:{line:78,column:9}},line:75},8:{name:"(anonymous_8)",decl:{start:{line:80,column:12},end:{line:80,column:13}},loc:{start:{line:80,column:36},end:{line:82,column:7}},line:80},9:{name:"(anonymous_9)",decl:{start:{line:85,column:18},end:{line:85,column:19}},loc:{start:{line:85,column:28},end:{line:89,column:9}},line:85},10:{name:"(anonymous_10)",decl:{start:{line:91,column:12},end:{line:91,column:13}},loc:{start:{line:91,column:36},end:{line:93,column:7}},line:91},11:{name:"(anonymous_11)",decl:{start:{line:95,column:2},end:{line:95,column:3}},loc:{start:{line:95,column:12},end:{line:99,column:3}},line:95},12:{name:"(anonymous_12)",decl:{start:{line:96,column:31},end:{line:96,column:32}},loc:{start:{line:96,column:37},end:{line:98,column:5}},line:96},13:{name:"(anonymous_13)",decl:{start:{line:100,column:2},end:{line:100,column:3}},loc:{start:{line:100,column:14},end:{line:112,column:3}},line:100},14:{name:"(anonymous_14)",decl:{start:{line:114,column:4},end:{line:114,column:5}},loc:{start:{line:114,column:24},end:{line:146,column:5}},line:114},15:{name:"(anonymous_15)",decl:{start:{line:118,column:40},end:{line:118,column:41}},loc:{start:{line:118,column:51},end:{line:145,column:7}},line:118},16:{name:"(anonymous_16)",decl:{start:{line:122,column:32},end:{line:122,column:33}},loc:{start:{line:122,column:45},end:{line:122,column:71}},line:122},17:{name:"(anonymous_17)",decl:{start:{line:147,column:4},end:{line:147,column:5}},loc:{start:{line:147,column:23},end:{line:163,column:5}},line:147},18:{name:"(anonymous_18)",decl:{start:{line:150,column:30},end:{line:150,column:31}},loc:{start:{line:150,column:43},end:{line:150,column:65}},line:150},19:{name:"(anonymous_19)",decl:{start:{line:164,column:4},end:{line:164,column:5}},loc:{start:{line:164,column:33},end:{line:180,column:5}},line:164},20:{name:"(anonymous_20)",decl:{start:{line:171,column:44},end:{line:171,column:45}},loc:{start:{line:171,column:54},end:{line:171,column:79}},line:171},21:{name:"(anonymous_21)",decl:{start:{line:181,column:4},end:{line:181,column:5}},loc:{start:{line:181,column:31},end:{line:186,column:5}},line:181},22:{name:"(anonymous_22)",decl:{start:{line:187,column:4},end:{line:187,column:5}},loc:{start:{line:187,column:29},end:{line:191,column:5}},line:187},23:{name:"(anonymous_23)",decl:{start:{line:192,column:4},end:{line:192,column:5}},loc:{start:{line:192,column:21},end:{line:198,column:5}},line:192},24:{name:"(anonymous_24)",decl:{start:{line:193,column:44},end:{line:193,column:45}},loc:{start:{line:194,column:8},end:{line:194,column:32}},line:194},25:{name:"(anonymous_25)",decl:{start:{line:199,column:4},end:{line:199,column:5}},loc:{start:{line:199,column:20},end:{line:201,column:5}},line:199},26:{name:"(anonymous_26)",decl:{start:{line:202,column:4},end:{line:202,column:5}},loc:{start:{line:202,column:31},end:{line:209,column:5}},line:202},27:{name:"(anonymous_27)",decl:{start:{line:210,column:4},end:{line:210,column:5}},loc:{start:{line:210,column:29},end:{line:264,column:5}},line:210},28:{name:"(anonymous_28)",decl:{start:{line:221,column:46},end:{line:221,column:47}},loc:{start:{line:222,column:10},end:{line:222,column:38}},line:222},29:{name:"(anonymous_29)",decl:{start:{line:231,column:30},end:{line:231,column:31}},loc:{start:{line:231,column:43},end:{line:231,column:69}},line:231},30:{name:"(anonymous_30)",decl:{start:{line:265,column:4},end:{line:265,column:5}},loc:{start:{line:265,column:13},end:{line:271,column:5}},line:265},31:{name:"(anonymous_31)",decl:{start:{line:267,column:55},end:{line:267,column:56}},loc:{start:{line:267,column:65},end:{line:269,column:9}},line:267},32:{name:"(anonymous_32)",decl:{start:{line:272,column:18},end:{line:272,column:19}},loc:{start:{line:272,column:36},end:{line:278,column:5}},line:272},33:{name:"(anonymous_33)",decl:{start:{line:279,column:13},end:{line:279,column:14}},loc:{start:{line:279,column:32},end:{line:282,column:5}},line:279},34:{name:"(anonymous_34)",decl:{start:{line:283,column:16},end:{line:283,column:17}},loc:{start:{line:283,column:35},end:{line:286,column:5}},line:283},35:{name:"(anonymous_35)",decl:{start:{line:289,column:4},end:{line:289,column:5}},loc:{start:{line:289,column:18},end:{line:291,column:5}},line:289}},branchMap:{0:{loc:{start:{line:42,column:6},end:{line:46,column:7}},type:"if",locations:[{start:{line:42,column:6},end:{line:46,column:7}},{start:{line:44,column:13},end:{line:46,column:7}}],line:42},1:{loc:{start:{line:49,column:6},end:{line:53,column:7}},type:"if",locations:[{start:{line:49,column:6},end:{line:53,column:7}},{start:{line:51,column:13},end:{line:53,column:7}}],line:49},2:{loc:{start:{line:63,column:6},end:{line:69,column:7}},type:"if",locations:[{start:{line:63,column:6},end:{line:69,column:7}},{start:{line:66,column:13},end:{line:69,column:7}}],line:63},3:{loc:{start:{line:101,column:4},end:{line:104,column:5}},type:"if",locations:[{start:{line:101,column:4},end:{line:104,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:101},4:{loc:{start:{line:105,column:4},end:{line:107,column:5}},type:"if",locations:[{start:{line:105,column:4},end:{line:107,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:105},5:{loc:{start:{line:108,column:4},end:{line:110,column:5}},type:"if",locations:[{start:{line:108,column:4},end:{line:110,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:108},6:{loc:{start:{line:122,column:10},end:{line:124,column:11}},type:"if",locations:[{start:{line:122,column:10},end:{line:124,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:122},7:{loc:{start:{line:131,column:10},end:{line:133,column:11}},type:"if",locations:[{start:{line:131,column:10},end:{line:133,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:131},8:{loc:{start:{line:131,column:14},end:{line:131,column:71}},type:"binary-expr",locations:[{start:{line:131,column:14},end:{line:131,column:40}},{start:{line:131,column:44},end:{line:131,column:71}}],line:131},9:{loc:{start:{line:134,column:10},end:{line:136,column:11}},type:"if",locations:[{start:{line:134,column:10},end:{line:136,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:134},10:{loc:{start:{line:137,column:10},end:{line:141,column:11}},type:"if",locations:[{start:{line:137,column:10},end:{line:141,column:11}},{start:{line:139,column:17},end:{line:141,column:11}}],line:137},11:{loc:{start:{line:137,column:14},end:{line:137,column:53}},type:"binary-expr",locations:[{start:{line:137,column:14},end:{line:137,column:33}},{start:{line:137,column:37},end:{line:137,column:53}}],line:137},12:{loc:{start:{line:150,column:8},end:{line:152,column:9}},type:"if",locations:[{start:{line:150,column:8},end:{line:152,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:150},13:{loc:{start:{line:154,column:8},end:{line:156,column:9}},type:"if",locations:[{start:{line:154,column:8},end:{line:156,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:154},14:{loc:{start:{line:154,column:12},end:{line:154,column:56}},type:"binary-expr",locations:[{start:{line:154,column:12},end:{line:154,column:35}},{start:{line:154,column:39},end:{line:154,column:56}}],line:154},15:{loc:{start:{line:157,column:8},end:{line:160,column:9}},type:"if",locations:[{start:{line:157,column:8},end:{line:160,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:157},16:{loc:{start:{line:168,column:6},end:{line:168,column:38}},type:"binary-expr",locations:[{start:{line:168,column:6},end:{line:168,column:14}},{start:{line:168,column:18},end:{line:168,column:38}}],line:168},17:{loc:{start:{line:172,column:8},end:{line:177,column:9}},type:"if",locations:[{start:{line:172,column:8},end:{line:177,column:9}},{start:{line:174,column:15},end:{line:177,column:9}}],line:172},18:{loc:{start:{line:183,column:6},end:{line:183,column:38}},type:"binary-expr",locations:[{start:{line:183,column:6},end:{line:183,column:14}},{start:{line:183,column:18},end:{line:183,column:38}}],line:183},19:{loc:{start:{line:205,column:8},end:{line:207,column:9}},type:"if",locations:[{start:{line:205,column:8},end:{line:207,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:205},20:{loc:{start:{line:205,column:12},end:{line:205,column:69}},type:"binary-expr",locations:[{start:{line:205,column:12},end:{line:205,column:39}},{start:{line:205,column:43},end:{line:205,column:69}}],line:205},21:{loc:{start:{line:216,column:8},end:{line:218,column:9}},type:"if",locations:[{start:{line:216,column:8},end:{line:218,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:216},22:{loc:{start:{line:225,column:8},end:{line:229,column:9}},type:"if",locations:[{start:{line:225,column:8},end:{line:229,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:225},23:{loc:{start:{line:231,column:8},end:{line:233,column:9}},type:"if",locations:[{start:{line:231,column:8},end:{line:233,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:231},24:{loc:{start:{line:235,column:8},end:{line:243,column:9}},type:"if",locations:[{start:{line:235,column:8},end:{line:243,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:235},25:{loc:{start:{line:236,column:10},end:{line:240,column:11}},type:"binary-expr",locations:[{start:{line:236,column:10},end:{line:236,column:34}},{start:{line:237,column:10},end:{line:240,column:11}}],line:236},26:{loc:{start:{line:238,column:12},end:{line:239,column:52}},type:"binary-expr",locations:[{start:{line:238,column:12},end:{line:238,column:55}},{start:{line:239,column:12},end:{line:239,column:52}}],line:238},27:{loc:{start:{line:252,column:8},end:{line:259,column:9}},type:"if",locations:[{start:{line:252,column:8},end:{line:259,column:9}},{start:{line:257,column:15},end:{line:259,column:9}}],line:252},28:{loc:{start:{line:253,column:10},end:{line:254,column:43}},type:"binary-expr",locations:[{start:{line:253,column:10},end:{line:253,column:46}},{start:{line:254,column:10},end:{line:254,column:43}}],line:253},29:{loc:{start:{line:266,column:6},end:{line:270,column:7}},type:"if",locations:[{start:{line:266,column:6},end:{line:270,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:266}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0,116:0,117:0,118:0,119:0,120:0,121:0,122:0,123:0,124:0,125:0,126:0,127:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0],27:[0,0],28:[0,0],29:[0,0]},inputSourceMap:{version:3,sources:["LimitsControl.vue"],names:[],mappings:";AA4IA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA",file:"LimitsControl.vue",sourceRoot:"src/tools/LimitsMonitor",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <div class=\"pa-3\">\n <v-row no-gutters>\n <v-text-field\n dense\n outlined\n readonly\n label=\"Overall Limits State\"\n :value=\"overallStateFormatted\"\n :class=\"textFieldClass\"\n data-test=\"overall-state\"\n />\n </v-row>\n\n <div v-for=\"(item, index) in items\" :key=\"item.key\">\n <v-row data-test=\"limits-row\" class=\"my-0 ml-1 mr-1\">\n <labelvaluelimitsbar-widget\n v-if=\"item.limits\"\n :parameters=\"item.parameters\"\n :settings=\"widgetSettings\"\n />\n <labelvalue-widget\n v-else\n :parameters=\"item.parameters\"\n :settings=\"widgetSettings\"\n />\n <v-spacer />\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-btn\n icon\n class=\"mr-2\"\n @click=\"ignorePacket(item.key)\"\n v-bind=\"attrs\"\n v-on=\"on\"\n >\n <v-icon> mdi-close-circle-multiple </v-icon>\n </v-btn>\n </template>\n <span>Ignore Entire Packet</span>\n </v-tooltip>\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-btn\n icon\n class=\"mr-2\"\n @click=\"ignoreItem(item.key)\"\n v-bind=\"attrs\"\n v-on=\"on\"\n >\n <v-icon> mdi-close-circle </v-icon>\n </v-btn>\n </template>\n <span>Ignore Item</span>\n </v-tooltip>\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-btn\n icon\n class=\"mr-2\"\n @click=\"removeItem(item.key)\"\n v-bind=\"attrs\"\n v-on=\"on\"\n >\n <v-icon> mdi-eye-off </v-icon>\n </v-btn>\n </template>\n <span>Temporarily Hide Item</span>\n </v-tooltip>\n </v-row>\n <v-divider v-if=\"index < items.length - 1\" :key=\"index\" />\n </div>\n <v-dialog v-model=\"ignoredItemsDialog\" max-width=\"600\">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span>Ignored Items</span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <div class=\"my-2\">\n <div v-for=\"(item, index) in ignoredFormatted\" :key=\"index\">\n <v-row class=\"ma-1\">\n <span class=\"font-weight-black\"> {{ item }} </span>\n <v-spacer />\n <v-btn\n @click=\"restoreItem(item, index)\"\n small\n icon\n :data-test=\"`remove-ignore-${index}`\"\n >\n <v-icon> mdi-delete </v-icon>\n </v-btn>\n </v-row>\n <v-divider\n v-if=\"index < ignoredFormatted.length - 1\"\n :key=\"index\"\n />\n </div>\n <v-row class=\"mt-2\">\n <v-spacer />\n <v-btn\n @click=\"ignoredItemsDialog = false\"\n class=\"mx-2\"\n color=\"primary\"\n >\n Ok\n </v-btn>\n </v-row>\n <v-divider v-if=\"index < items.length - 1\" :key=\"index\" />\n </div>\n </v-card-text>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { OpenC3Api } from '@openc3/tool-common/src/services/openc3-api'\nimport Cable from '@openc3/tool-common/src/services/cable.js'\nimport LabelvalueWidget from '@openc3/tool-common/src/components/widgets/LabelvalueWidget'\nimport LabelvaluelimitsbarWidget from '@openc3/tool-common/src/components/widgets/LabelvaluelimitsbarWidget'\nimport Vue from 'vue'\n\nexport default {\n components: {\n LabelvalueWidget,\n LabelvaluelimitsbarWidget,\n },\n props: {\n value: {\n type: Array,\n default: () => [],\n },\n },\n data() {\n return {\n api: null,\n cable: new Cable(),\n ignored: [],\n ignoredItemsDialog: false,\n overallState: 'GREEN',\n items: [],\n itemList: [],\n screenItems: [],\n screenValues: {},\n updateCounter: 0,\n widgetSettings: [\n ['WIDTH', '520px'], // Total of three subwidgets\n ['0', 'WIDTH', '180px'],\n ['1', 'WIDTH', '180px'],\n ['2', 'WIDTH', '160px'],\n ['__SCREEN__', this],\n ],\n }\n },\n computed: {\n textFieldClass() {\n if (this.overallState) {\n return `textfield-${this.overallState.toLowerCase()}`\n } else {\n return ''\n }\n },\n overallStateFormatted() {\n if (this.ignored.length === 0) {\n return this.overallState\n } else {\n return `${this.overallState} (Some items ignored)`\n }\n },\n ignoredFormatted() {\n return this.ignored.map((x) => x.split('__').join(' '))\n },\n },\n created() {\n this.api = new OpenC3Api()\n // Value is passed in as the list of ignored items\n for (let item of this.value) {\n if (item.match(/.+__.+__.+/)) {\n // TARGET__PACKET__ITEM\n this.ignoreItem(item, true)\n } else {\n // TARGET__PACKET\n this.ignorePacket(item, true)\n }\n }\n this.updateOutOfLimits()\n\n this.cable\n .createSubscription('LimitsEventsChannel', window.openc3Scope, {\n received: (parsed) => {\n this.cable.recordPing()\n this.handleMessages(parsed)\n },\n })\n .then((limitsSubscription) => {\n this.limitsSubscription = limitsSubscription\n })\n this.cable\n .createSubscription('ConfigEventsChannel', window.openc3Scope, {\n received: (data) => {\n this.cable.recordPing()\n const parsed = JSON.parse(data)\n this.handleConfigEvents(parsed)\n },\n })\n .then((configSubscription) => {\n this.configSubscription = configSubscription\n })\n },\n mounted() {\n this.updater = setInterval(() => {\n this.update()\n }, 1000)\n },\n destroyed() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n if (this.limitsSubscription) {\n this.limitsSubscription.unsubscribe()\n }\n if (this.configSubscription) {\n this.configSubscription.unsubscribe()\n }\n this.cable.disconnect()\n },\n methods: {\n updateOutOfLimits() {\n this.items = []\n this.itemList = []\n\n this.api.get_out_of_limits().then((items) => {\n for (const item of items) {\n let itemName = item.join('__')\n // Skip ignored\n if (this.ignored.find((ignored) => itemName.includes(ignored))) {\n continue\n }\n\n this.itemList.push(itemName)\n let itemInfo = {\n key: item.slice(0, 3).join('__'),\n parameters: item.slice(0, 3),\n }\n if (item[3].includes('YELLOW') && this.overallState !== 'RED') {\n this.overallState = 'YELLOW'\n }\n if (item[3].includes('RED')) {\n this.overallState = 'RED'\n }\n if (item[3] == 'YELLOW' || item[3] == 'RED') {\n itemInfo['limits'] = false\n } else {\n itemInfo['limits'] = true\n }\n this.items.push(itemInfo)\n }\n this.calcOverallState()\n })\n },\n calcOverallState() {\n let overall = 'GREEN'\n for (let item of this.itemList) {\n if (this.ignored.find((ignored) => item.includes(ignored))) {\n continue\n }\n\n if (item.includes('YELLOW') && overall !== 'RED') {\n overall = 'YELLOW'\n }\n if (item.includes('RED')) {\n overall = 'RED'\n break\n }\n }\n this.overallState = overall\n },\n ignorePacket(item, noUpdate) {\n let [target_name, packet_name, item_name] = item.split('__')\n let newIgnored = `${target_name}__${packet_name}`\n this.ignored.push(newIgnored)\n noUpdate || this.updateIgnored()\n\n while (true) {\n let index = this.itemList.findIndex((item) => item.includes(newIgnored))\n if (index === -1) {\n break\n } else {\n let underIndex = this.itemList[index].lastIndexOf('__')\n this.removeItem(this.itemList[index].substring(0, underIndex))\n }\n }\n this.calcOverallState()\n },\n ignoreItem(item, noUpdate) {\n this.ignored.push(item)\n noUpdate || this.updateIgnored()\n this.removeItem(item)\n this.calcOverallState()\n },\n restoreItem(item, index) {\n this.ignored.splice(index, 1)\n this.updateIgnored()\n this.updateOutOfLimits()\n },\n removeItem(item) {\n const index = this.itemList.findIndex((arrayItem) =>\n arrayItem.includes(item)\n )\n this.items.splice(index, 1)\n this.itemList.splice(index, 1)\n },\n updateIgnored() {\n this.$emit('input', this.ignored)\n },\n handleConfigEvents(config) {\n for (let event of config) {\n // When a target is deleted we refresh the list of items\n if (event['kind'] === 'deleted' && event['type'] === 'target') {\n this.updateOutOfLimits()\n }\n }\n },\n handleMessages(messages) {\n for (let message of messages) {\n message = JSON.parse(message['event'])\n\n // We only want to handle LIMITS_CHANGE messages\n // NOTE: The channel also sends LIMITS_SETTINGS and LIMITS_SET messages\n if (message.type != 'LIMITS_CHANGE') {\n continue\n }\n\n let itemName = `${message.target_name}__${message.packet_name}__${message.item_name}`\n const index = this.itemList.findIndex((arrayItem) =>\n arrayItem.includes(itemName)\n )\n // If we find an existing item we update the state and re-calc overall state\n if (index !== -1) {\n this.itemList[index] = `${itemName}__${message.new_limits_state}`\n this.calcOverallState()\n continue\n }\n // Skip ignored items\n if (this.ignored.find((ignored) => itemName.includes(ignored))) {\n continue\n }\n // Only process items who have gone out of limits\n if (\n message.new_limits_state &&\n !(\n message.new_limits_state.includes('YELLOW') ||\n message.new_limits_state.includes('RED')\n )\n ) {\n continue\n }\n let itemInfo = {\n key: itemName,\n parameters: [\n message.target_name,\n message.packet_name,\n message.item_name,\n ],\n }\n if (\n message.new_limits_state == 'YELLOW' ||\n message.new_limits_state == 'RED'\n ) {\n itemInfo['limits'] = false\n } else {\n itemInfo['limits'] = true\n }\n this.itemList.push(`${itemName}__${message.new_limits_state}`)\n this.items.push(itemInfo)\n this.calcOverallState()\n }\n },\n update() {\n if (this.screenItems.length !== 0) {\n this.api.get_tlm_values(this.screenItems).then((data) => {\n this.updateValues(data)\n })\n }\n },\n updateValues: function (values) {\n this.updateCounter += 1\n for (let i = 0; i < values.length; i++) {\n values[i].push(this.updateCounter)\n Vue.set(this.screenValues, this.screenItems[i], values[i])\n }\n },\n addItem: function (valueId) {\n this.screenItems.push(valueId)\n Vue.set(this.screenValues, valueId, [null, null, 0])\n },\n deleteItem: function (valueId) {\n let index = this.screenItems.indexOf(valueId)\n this.screenItems.splice(index, 1)\n },\n\n // Menu options\n showIgnored() {\n this.ignoredItemsDialog = true\n },\n },\n}\n<\/script>\n\n<style scoped>\n/* TODO: Color the border */\n.textfield-green :deep(.v-text-field__slot) input,\n.textfield-green :deep(.v-text-field__slot) label {\n color: rgb(0, 200, 0);\n}\n\n.textfield-yellow :deep(.v-text-field__slot) input,\n.textfield-yellow :deep(.v-text-field__slot) label {\n color: rgb(255, 220, 0);\n}\n\n.textfield-red :deep(.v-text-field__slot) input,\n.textfield-red :deep(.v-text-field__slot) label {\n color: rgb(255, 45, 45);\n}\n</style>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8119b8bdef11ca4d96cf611cbaf0e1f2c2ce616c"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var s=o[e];return ve=function(){return s},s}ve();var pe={components:{LabelvalueWidget:te,LabelvaluelimitsbarWidget:fe},props:{value:{type:Array,default:function(){return ve().f[0]++,ve().s[0]++,[]}}},data:function(){return ve().f[1]++,ve().s[1]++,{api:null,cable:new S,ignored:[],ignoredItemsDialog:!1,overallState:"GREEN",items:[],itemList:[],screenItems:[],screenValues:{},updateCounter:0,widgetSettings:[["WIDTH","520px"],["0","WIDTH","180px"],["1","WIDTH","180px"],["2","WIDTH","160px"],["__SCREEN__",this]]}},computed:{textFieldClass:function(){return ve().f[2]++,ve().s[2]++,this.overallState?(ve().b[0][0]++,ve().s[3]++,"textfield-".concat(this.overallState.toLowerCase())):(ve().b[0][1]++,ve().s[4]++,"")},overallStateFormatted:function(){return ve().f[3]++,ve().s[5]++,0===this.ignored.length?(ve().b[1][0]++,ve().s[6]++,this.overallState):(ve().b[1][1]++,ve().s[7]++,"".concat(this.overallState," (Some items ignored)"))},ignoredFormatted:function(){return ve().f[4]++,ve().s[8]++,this.ignored.map((function(e){return ve().f[5]++,ve().s[9]++,e.split("__").join(" ")}))}},created:function(){var e=this;ve().f[6]++,ve().s[10]++,this.api=new x,ve().s[11]++;var n,t=(0,u.Z)(this.value);try{for(t.s();!(n=t.n()).done;){var i=n.value;ve().s[12]++,i.match(/.+__.+__.+/)?(ve().b[2][0]++,ve().s[13]++,this.ignoreItem(i,!0)):(ve().b[2][1]++,ve().s[14]++,this.ignorePacket(i,!0))}}catch(l){t.e(l)}finally{t.f()}ve().s[15]++,this.updateOutOfLimits(),ve().s[16]++,this.cable.createSubscription("LimitsEventsChannel",window.openc3Scope,{received:function(n){ve().f[7]++,ve().s[17]++,e.cable.recordPing(),ve().s[18]++,e.handleMessages(n)}}).then((function(n){ve().f[8]++,ve().s[19]++,e.limitsSubscription=n})),ve().s[20]++,this.cable.createSubscription("ConfigEventsChannel",window.openc3Scope,{received:function(n){ve().f[9]++,ve().s[21]++,e.cable.recordPing();var t=(ve().s[22]++,JSON.parse(n));ve().s[23]++,e.handleConfigEvents(t)}}).then((function(n){ve().f[10]++,ve().s[24]++,e.configSubscription=n}))},mounted:function(){var e=this;ve().f[11]++,ve().s[25]++,this.updater=setInterval((function(){ve().f[12]++,ve().s[26]++,e.update()}),1e3)},destroyed:function(){ve().f[13]++,ve().s[27]++,null!=this.updater?(ve().b[3][0]++,ve().s[28]++,clearInterval(this.updater),ve().s[29]++,this.updater=null):ve().b[3][1]++,ve().s[30]++,this.limitsSubscription?(ve().b[4][0]++,ve().s[31]++,this.limitsSubscription.unsubscribe()):ve().b[4][1]++,ve().s[32]++,this.configSubscription?(ve().b[5][0]++,ve().s[33]++,this.configSubscription.unsubscribe()):ve().b[5][1]++,ve().s[34]++,this.cable.disconnect()},methods:{updateOutOfLimits:function(){var e=this;ve().f[14]++,ve().s[35]++,this.items=[],ve().s[36]++,this.itemList=[],ve().s[37]++,this.api.get_out_of_limits().then((function(n){ve().f[15]++,ve().s[38]++;var t,i=(0,u.Z)(n);try{var l=function(){var n=t.value,i=(ve().s[39]++,n.join("__"));if(ve().s[40]++,e.ignored.find((function(e){return ve().f[16]++,ve().s[41]++,i.includes(e)})))return ve().b[6][0]++,ve().s[42]++,"continue";ve().b[6][1]++,ve().s[43]++,e.itemList.push(i);var l=(ve().s[44]++,{key:n.slice(0,3).join("__"),parameters:n.slice(0,3)});ve().s[45]++,ve().b[8][0]++,n[3].includes("YELLOW")&&(ve().b[8][1]++,"RED"!==e.overallState)?(ve().b[7][0]++,ve().s[46]++,e.overallState="YELLOW"):ve().b[7][1]++,ve().s[47]++,n[3].includes("RED")?(ve().b[9][0]++,ve().s[48]++,e.overallState="RED"):ve().b[9][1]++,ve().s[49]++,ve().b[11][0]++,"YELLOW"==n[3]||(ve().b[11][1]++,"RED"==n[3])?(ve().b[10][0]++,ve().s[50]++,l["limits"]=!1):(ve().b[10][1]++,ve().s[51]++,l["limits"]=!0),ve().s[52]++,e.items.push(l)};for(i.s();!(t=i.n()).done;)l()}catch(o){i.e(o)}finally{i.f()}ve().s[53]++,e.calcOverallState()}))},calcOverallState:function(){var e=this;ve().f[17]++;var n=(ve().s[54]++,"GREEN");ve().s[55]++;var t,i=(0,u.Z)(this.itemList);try{var l=function(){var i=t.value;return ve().s[56]++,e.ignored.find((function(e){return ve().f[18]++,ve().s[57]++,i.includes(e)}))?(ve().b[12][0]++,ve().s[58]++,"continue"):(ve().b[12][1]++,ve().s[59]++,ve().b[14][0]++,i.includes("YELLOW")&&(ve().b[14][1]++,"RED"!==n)?(ve().b[13][0]++,ve().s[60]++,n="YELLOW"):ve().b[13][1]++,ve().s[61]++,i.includes("RED")?(ve().b[15][0]++,ve().s[62]++,n="RED",ve().s[63]++,"break"):void ve().b[15][1]++)};for(i.s();!(t=i.n()).done;){var o=l();if("continue"!==o&&"break"===o)break}}catch(s){i.e(s)}finally{i.f()}ve().s[64]++,this.overallState=n},ignorePacket:function(e,n){ve().f[19]++;var t=(ve().s[65]++,e.split("__")),i=(0,r.Z)(t,3),l=i[0],o=i[1],s=(i[2],ve().s[66]++,"".concat(l,"__").concat(o));ve().s[67]++,this.ignored.push(s),ve().s[68]++,ve().b[16][0]++,n||(ve().b[16][1]++,this.updateIgnored()),ve().s[69]++;while(1){var a=(ve().s[70]++,this.itemList.findIndex((function(e){return ve().f[20]++,ve().s[71]++,e.includes(s)})));if(ve().s[72]++,-1===a){ve().b[17][0]++,ve().s[73]++;break}ve().b[17][1]++;var c=(ve().s[74]++,this.itemList[a].lastIndexOf("__"));ve().s[75]++,this.removeItem(this.itemList[a].substring(0,c))}ve().s[76]++,this.calcOverallState()},ignoreItem:function(e,n){ve().f[21]++,ve().s[77]++,this.ignored.push(e),ve().s[78]++,ve().b[18][0]++,n||(ve().b[18][1]++,this.updateIgnored()),ve().s[79]++,this.removeItem(e),ve().s[80]++,this.calcOverallState()},restoreItem:function(e,n){ve().f[22]++,ve().s[81]++,this.ignored.splice(n,1),ve().s[82]++,this.updateIgnored(),ve().s[83]++,this.updateOutOfLimits()},removeItem:function(e){ve().f[23]++;var n=(ve().s[84]++,this.itemList.findIndex((function(n){return ve().f[24]++,ve().s[85]++,n.includes(e)})));ve().s[86]++,this.items.splice(n,1),ve().s[87]++,this.itemList.splice(n,1)},updateIgnored:function(){ve().f[25]++,ve().s[88]++,this.$emit("input",this.ignored)},handleConfigEvents:function(e){ve().f[26]++,ve().s[89]++;var n,t=(0,u.Z)(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;ve().s[90]++,ve().b[20][0]++,"deleted"===i["kind"]&&(ve().b[20][1]++,"target"===i["type"])?(ve().b[19][0]++,ve().s[91]++,this.updateOutOfLimits()):ve().b[19][1]++}}catch(l){t.e(l)}finally{t.f()}},handleMessages:function(e){var n=this;ve().f[27]++,ve().s[92]++;var t,i=(0,u.Z)(e);try{var l=function(){var e=t.value;if(ve().s[93]++,e=JSON.parse(e["event"]),ve().s[94]++,"LIMITS_CHANGE"!=e.type)return ve().b[21][0]++,ve().s[95]++,"continue";ve().b[21][1]++;var i=(ve().s[96]++,"".concat(e.target_name,"__").concat(e.packet_name,"__").concat(e.item_name)),l=(ve().s[97]++,n.itemList.findIndex((function(e){return ve().f[28]++,ve().s[98]++,e.includes(i)})));if(ve().s[99]++,-1!==l)return ve().b[22][0]++,ve().s[100]++,n.itemList[l]="".concat(i,"__").concat(e.new_limits_state),ve().s[101]++,n.calcOverallState(),ve().s[102]++,"continue";if(ve().b[22][1]++,ve().s[103]++,n.ignored.find((function(e){return ve().f[29]++,ve().s[104]++,i.includes(e)})))return ve().b[23][0]++,ve().s[105]++,"continue";if(ve().b[23][1]++,ve().s[106]++,ve().b[25][0]++,e.new_limits_state&&(ve().b[25][1]++,ve().b[26][0]++,!e.new_limits_state.includes("YELLOW")&&(ve().b[26][1]++,!e.new_limits_state.includes("RED"))))return ve().b[24][0]++,ve().s[107]++,"continue";ve().b[24][1]++;var o=(ve().s[108]++,{key:i,parameters:[e.target_name,e.packet_name,e.item_name]});ve().s[109]++,ve().b[28][0]++,"YELLOW"==e.new_limits_state||(ve().b[28][1]++,"RED"==e.new_limits_state)?(ve().b[27][0]++,ve().s[110]++,o["limits"]=!1):(ve().b[27][1]++,ve().s[111]++,o["limits"]=!0),ve().s[112]++,n.itemList.push("".concat(i,"__").concat(e.new_limits_state)),ve().s[113]++,n.items.push(o),ve().s[114]++,n.calcOverallState()};for(i.s();!(t=i.n()).done;)l()}catch(o){i.e(o)}finally{i.f()}},update:function(){var e=this;ve().f[30]++,ve().s[115]++,0!==this.screenItems.length?(ve().b[29][0]++,ve().s[116]++,this.api.get_tlm_values(this.screenItems).then((function(n){ve().f[31]++,ve().s[117]++,e.updateValues(n)}))):ve().b[29][1]++},updateValues:function(e){ve().f[32]++,ve().s[118]++,this.updateCounter+=1,ve().s[119]++;for(var n=(ve().s[120]++,0);n<e.length;n++)ve().s[121]++,e[n].push(this.updateCounter),ve().s[122]++,C["default"].set(this.screenValues,this.screenItems[n],e[n])},addItem:function(e){ve().f[33]++,ve().s[123]++,this.screenItems.push(e),ve().s[124]++,C["default"].set(this.screenValues,e,[null,null,0])},deleteItem:function(e){ve().f[34]++;var n=(ve().s[125]++,this.screenItems.indexOf(e));ve().s[126]++,this.screenItems.splice(n,1)},showIgnored:function(){ve().f[35]++,ve().s[127]++,this.ignoredItemsDialog=!0}}},ge=pe,_e=(t(1505),(0,D.Z)(ge,a,c,!1,null,"b0d7e182",null)),Ce=_e.exports;t(4908);function be(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsEvents.vue",n="dec52f586b9dcd514a97f88c7ece2b9ee3364c22",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsEvents.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:889}},4:{start:{line:1,column:326},end:{line:1,column:340}},5:{start:{line:1,column:676},end:{line:1,column:744}},6:{start:{line:1,column:789},end:{line:1,column:879}},7:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:310},end:{line:1,column:311}},loc:{start:{line:1,column:325},end:{line:1,column:341}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:657},end:{line:1,column:658}},loc:{start:{line:1,column:675},end:{line:1,column:745}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:770},end:{line:1,column:771}},loc:{start:{line:1,column:788},end:{line:1,column:880}},line:1}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0,1:0,2:0,3:0},b:{},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"dec52f586b9dcd514a97f88c7ece2b9ee3364c22"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var s=o[e];return be=function(){return s},s}be(),be().s[0]++;var ye=function(){be().f[0]++;var e=(be().s[1]++,this),n=(be().s[2]++,e._self._c);return be().s[3]++,n("v-card",{staticClass:"card-height"},[n("v-card-title",[e._v(" Limits Events "),n("v-spacer"),n("v-text-field",{attrs:{"append-icon":"mdi-magnify",label:"Search","single-line":"","hide-details":""},model:{value:e.search,callback:function(n){be().f[1]++,be().s[4]++,e.search=n},expression:"search"}})],1),n("v-data-table",{attrs:{headers:e.headers,items:e.data,search:e.search,"calculate-widths":"","disable-pagination":"","hide-default-footer":"","multi-sort":"",dense:"",height:e.calcTableHeight(),"data-test":"limits-events"},scopedSlots:e._u([{key:"item.time_nsec",fn:function(t){var i=t.item;return be().f[2]++,be().s[5]++,[n("span",[e._v(e._s(e.formatDate(i.time_nsec)))])]}},{key:"item.message",fn:function(t){var i=t.item;return be().f[3]++,be().s[6]++,[n("span",{class:e.getColorClass(i.message)},[e._v(e._s(i.message))])]}}])})],1)},we=(be().s[7]++,[]),xe=t(7388),ke=t(6700);function Se(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsEvents.vue",n="1b301f55d90ed3de8b10b916e49c59f8aa7c3503",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsEvents.vue",statementMap:{0:{start:{line:13,column:4},end:{line:21,column:5}},1:{start:{line:24,column:4},end:{line:40,column:8}},2:{start:{line:30,column:12},end:{line:30,column:35}},3:{start:{line:31,column:12},end:{line:31,column:39}},4:{start:{line:39,column:8},end:{line:39,column:52}},5:{start:{line:43,column:4},end:{line:45,column:5}},6:{start:{line:44,column:6},end:{line:44,column:43}},7:{start:{line:46,column:4},end:{line:46,column:27}},8:{start:{line:50,column:6},end:{line:53,column:7}},9:{start:{line:50,column:19},end:{line:50,column:20}},10:{start:{line:51,column:20},end:{line:51,column:52}},11:{start:{line:52,column:8},end:{line:52,column:32}},12:{start:{line:54,column:6},end:{line:56,column:7}},13:{start:{line:55,column:8},end:{line:55,column:45}},14:{start:{line:59,column:6},end:{line:62,column:7}},15:{start:{line:65,column:6},end:{line:73,column:7}},16:{start:{line:66,column:8},end:{line:66,column:29}},17:{start:{line:67,column:13},end:{line:73,column:7}},18:{start:{line:68,column:8},end:{line:68,column:30}},19:{start:{line:69,column:13},end:{line:73,column:7}},20:{start:{line:70,column:8},end:{line:70,column:27}},21:{start:{line:71,column:13},end:{line:73,column:7}},22:{start:{line:72,column:8},end:{line:72,column:28}},23:{start:{line:74,column:6},end:{line:78,column:7}},24:{start:{line:75,column:8},end:{line:75,column:29}},25:{start:{line:77,column:8},end:{line:77,column:29}},26:{start:{line:82,column:6},end:{line:82,column:37}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:2},end:{line:12,column:3}},loc:{start:{line:12,column:9},end:{line:22,column:3}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:23,column:2},end:{line:23,column:3}},loc:{start:{line:23,column:12},end:{line:41,column:3}},line:23},2:{name:"(anonymous_2)",decl:{start:{line:29,column:20},end:{line:29,column:21}},loc:{start:{line:29,column:32},end:{line:32,column:11}},line:29},3:{name:"(anonymous_3)",decl:{start:{line:38,column:12},end:{line:38,column:13}},loc:{start:{line:38,column:36},end:{line:40,column:7}},line:38},4:{name:"(anonymous_4)",decl:{start:{line:42,column:2},end:{line:42,column:3}},loc:{start:{line:42,column:14},end:{line:47,column:3}},line:42},5:{name:"(anonymous_5)",decl:{start:{line:49,column:4},end:{line:49,column:5}},loc:{start:{line:49,column:29},end:{line:57,column:5}},line:49},6:{name:"(anonymous_6)",decl:{start:{line:58,column:4},end:{line:58,column:5}},loc:{start:{line:58,column:25},end:{line:63,column:5}},line:58},7:{name:"(anonymous_7)",decl:{start:{line:64,column:4},end:{line:64,column:5}},loc:{start:{line:64,column:27},end:{line:79,column:5}},line:64},8:{name:"(anonymous_8)",decl:{start:{line:80,column:4},end:{line:80,column:5}},loc:{start:{line:80,column:22},end:{line:83,column:5}},line:80}},branchMap:{0:{loc:{start:{line:43,column:4},end:{line:45,column:5}},type:"if",locations:[{start:{line:43,column:4},end:{line:45,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:43},1:{loc:{start:{line:54,column:6},end:{line:56,column:7}},type:"if",locations:[{start:{line:54,column:6},end:{line:56,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:54},2:{loc:{start:{line:65,column:6},end:{line:73,column:7}},type:"if",locations:[{start:{line:65,column:6},end:{line:73,column:7}},{start:{line:67,column:13},end:{line:73,column:7}}],line:65},3:{loc:{start:{line:67,column:13},end:{line:73,column:7}},type:"if",locations:[{start:{line:67,column:13},end:{line:73,column:7}},{start:{line:69,column:13},end:{line:73,column:7}}],line:67},4:{loc:{start:{line:69,column:13},end:{line:73,column:7}},type:"if",locations:[{start:{line:69,column:13},end:{line:73,column:7}},{start:{line:71,column:13},end:{line:73,column:7}}],line:69},5:{loc:{start:{line:71,column:13},end:{line:73,column:7}},type:"if",locations:[{start:{line:71,column:13},end:{line:73,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:71},6:{loc:{start:{line:74,column:6},end:{line:78,column:7}},type:"if",locations:[{start:{line:74,column:6},end:{line:78,column:7}},{start:{line:76,column:13},end:{line:78,column:7}}],line:74}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,sources:["LimitsEvents.vue"],names:[],mappings:";AA0DA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"LimitsEvents.vue",sourceRoot:"src/tools/LimitsMonitor",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <v-card class=\"card-height\">\n <v-card-title>\n Limits Events\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n append-icon=\"mdi-magnify\"\n label=\"Search\"\n single-line\n hide-details\n />\n </v-card-title>\n <v-data-table\n :headers=\"headers\"\n :items=\"data\"\n :search=\"search\"\n calculate-widths\n disable-pagination\n hide-default-footer\n multi-sort\n dense\n :height=\"calcTableHeight()\"\n data-test=\"limits-events\"\n >\n <template v-slot:item.time_nsec=\"{ item }\">\n <span>{{ formatDate(item.time_nsec) }}</span>\n </template>\n <template v-slot:item.message=\"{ item }\">\n <span :class=\"getColorClass(item.message)\">{{ item.message }}</span>\n </template>\n </v-data-table>\n </v-card>\n</template>\n\n<script>\nimport { toDate, format } from 'date-fns'\nimport Cable from '@openc3/tool-common/src/services/cable.js'\n\nexport default {\n props: {\n history_count: {\n type: Number,\n default: 1000,\n },\n },\n data() {\n return {\n data: [],\n cable: new Cable(),\n search: '',\n headers: [\n { text: 'Time', value: 'time_nsec', width: 250 },\n { text: 'Message', value: 'message' },\n ],\n }\n },\n created() {\n this.cable\n .createSubscription(\n 'LimitsEventsChannel',\n window.openc3Scope,\n {\n received: (parsed) => {\n this.cable.recordPing()\n this.handleMessages(parsed)\n },\n },\n {\n history_count: 1000,\n }\n )\n .then((limitsSubscription) => {\n this.limitsSubscription = limitsSubscription\n })\n },\n destroyed() {\n if (this.limitsSubscription) {\n this.limitsSubscription.unsubscribe()\n }\n this.cable.disconnect()\n },\n methods: {\n handleMessages(messages) {\n for (let i = 0; i < messages.length; i++) {\n let event = JSON.parse(messages[i]['event'])\n this.data.unshift(event)\n }\n if (this.data.length > this.history_count) {\n this.data.length = this.history_count\n }\n },\n formatDate(nanoSecs) {\n return format(\n toDate(parseInt(nanoSecs) / 1_000_000),\n 'yyyy-MM-dd HH:mm:ss.SSS'\n )\n },\n getColorClass(message) {\n if (message.includes('GREEN')) {\n return 'openc3-green'\n } else if (message.includes('YELLOW')) {\n return 'openc3-yellow'\n } else if (message.includes('RED')) {\n return 'openc3-red'\n } else if (message.includes('BLUE')) {\n return 'openc3-blue'\n }\n if (this.$vuetify.theme.dark) {\n return 'openc3-white'\n } else {\n return 'openc3-black'\n }\n },\n calcTableHeight() {\n // TODO: 250 is a magic number but seems to work well\n return window.innerHeight - 250\n },\n },\n}\n<\/script>\n\n<style lang=\"scss\" scoped>\n.card-height {\n // TODO: 150 is a magic number but seems to work well\n // Can this be calculated by the size of the table search box?\n height: calc(100vh - 150px);\n}\n</style>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1b301f55d90ed3de8b10b916e49c59f8aa7c3503"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var s=o[e];return Se=function(){return s},s}Se();var Ie={props:{history_count:{type:Number,default:1e3}},data:function(){return Se().f[0]++,Se().s[0]++,{data:[],cable:new S,search:"",headers:[{text:"Time",value:"time_nsec",width:250},{text:"Message",value:"message"}]}},created:function(){var e=this;Se().f[1]++,Se().s[1]++,this.cable.createSubscription("LimitsEventsChannel",window.openc3Scope,{received:function(n){Se().f[2]++,Se().s[2]++,e.cable.recordPing(),Se().s[3]++,e.handleMessages(n)}},{history_count:1e3}).then((function(n){Se().f[3]++,Se().s[4]++,e.limitsSubscription=n}))},destroyed:function(){Se().f[4]++,Se().s[5]++,this.limitsSubscription?(Se().b[0][0]++,Se().s[6]++,this.limitsSubscription.unsubscribe()):Se().b[0][1]++,Se().s[7]++,this.cable.disconnect()},methods:{handleMessages:function(e){Se().f[5]++,Se().s[8]++;for(var n=(Se().s[9]++,0);n<e.length;n++){var t=(Se().s[10]++,JSON.parse(e[n]["event"]));Se().s[11]++,this.data.unshift(t)}Se().s[12]++,this.data.length>this.history_count?(Se().b[1][0]++,Se().s[13]++,this.data.length=this.history_count):Se().b[1][1]++},formatDate:function(e){return Se().f[6]++,Se().s[14]++,(0,xe.Z)((0,ke.Z)(parseInt(e)/1e6),"yyyy-MM-dd HH:mm:ss.SSS")},getColorClass:function(e){return Se().f[7]++,Se().s[15]++,e.includes("GREEN")?(Se().b[2][0]++,Se().s[16]++,"openc3-green"):(Se().b[2][1]++,Se().s[17]++,e.includes("YELLOW")?(Se().b[3][0]++,Se().s[18]++,"openc3-yellow"):(Se().b[3][1]++,Se().s[19]++,e.includes("RED")?(Se().b[4][0]++,Se().s[20]++,"openc3-red"):(Se().b[4][1]++,Se().s[21]++,e.includes("BLUE")?(Se().b[5][0]++,Se().s[22]++,"openc3-blue"):(Se().b[5][1]++,Se().s[23]++,this.$vuetify.theme.dark?(Se().b[6][0]++,Se().s[24]++,"openc3-white"):(Se().b[6][1]++,Se().s[25]++,"openc3-black")))))},calcTableHeight:function(){return Se().f[8]++,Se().s[26]++,window.innerHeight-250}}},Le=Ie,Ee=(t(21),(0,D.Z)(Le,ye,we,!1,null,"3e3badba",null)),Ne=Ee.exports,Oe=function(){var e=this,n=e._self._c;return n("mounting-portal",{attrs:{"mount-to":"#openc3-menu",append:""}},[n("div",{staticClass:"v-toolbar__content"},[e._l(e.menus,(function(t,i){return n("v-menu",{key:i,attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(i){var l=i.on,o=i.attrs;return[n("v-btn",e._g(e._b({staticClass:"mx-1",attrs:{outlined:"","data-test":e.formatDT("".concat(e.title," ").concat(t.label))}},"v-btn",o,!1),l),[n("span",{domProps:{textContent:e._s(t.label)}}),n("v-icon",{attrs:{right:""}},[e._v(" mdi-menu-down ")])],1)]}}],null,!0)},[n("v-list",[n("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:t.radioGroup,"hide-details":"",dense:""}},[e._l(t.items,(function(i,l){return[i.divider?n("v-divider"):n("v-list-item",{key:l,attrs:{disabled:i.disabled,"data-test":e.formatDT("".concat(e.title," ").concat(t.label," ").concat(i.label))},on:{click:function(e){return i.command(i)}}},[i.radio?n("v-list-item-action",[n("v-radio",{attrs:{color:"secondary",label:i.label,value:i.label}})],1):e._e(),i.checkbox?n("v-list-item-action",[n("v-checkbox",{attrs:{color:"secondary",label:i.label},model:{value:i.checked,callback:function(n){e.$set(i,"checked",n)},expression:"option.checked"}})],1):e._e(),i.icon?n("v-list-item-icon",[n("v-icon",{attrs:{disabled:i.disabled}},[e._v(e._s(i.icon))])],1):e._e(),i.radio||i.checkbox?e._e():n("v-list-item-title",{style:"cursor: pointer;"+(i.disabled?"opacity: 0.2":"")},[e._v(e._s(i.label))])],1)]}))],2)],1)],1)})),n("v-spacer"),n("v-toolbar-title",[e._v(e._s(e.title))]),n("v-spacer")],2)])},Te=[],Me=(t(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()}},mounted:function(){"COSMOS "===this.title.substring(0,7)?document.title=this.title.substring(7):document.title=this.title}}),Re=Me,Ve=(t(4888),(0,D.Z)(Re,Oe,Te,!1,null,"2eb37f67",null)),De=Ve.exports,He=(t(6710),{data:{configKey:""},methods:{openConfigBase:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;localStorage["lastconfig__".concat(this.configKey)]=e,(new x).load_config(this.configKey,e).then((function(l){l?(n.$notify.normal({title:"Loading configuration",body:e}),i&&i(JSON.parse(l)),t||n.$router.currentRoute.fullPath.includes(e)||n.$router.push({query:{config:e}}),localStorage["lastconfig__".concat(n.configKey)]=e):(n.$notify.caution({title:"Unknown configuration",body:e}),localStorage.removeItem("lastconfig__".concat(n.configKey)))})).catch((function(t){t&&n.$notify.serious({title:"Error opening configuration: ".concat(e),body:t}),localStorage.removeItem("lastconfig__".concat(n.configKey))}))},saveConfigBase:function(e,n){var t=this;(new x).save_config(this.configKey,e,JSON.stringify(n)).then((function(){t.$notify.normal({title:"Saved configuration",body:e}),localStorage["lastconfig__".concat(t.configKey)]=e})).catch((function(n){n&&t.$notify.serious({title:"Error saving configuration: ".concat(e),body:n}),localStorage.removeItem("lastconfig__".concat(t.configKey))}))},resetConfigBase:function(){localStorage.removeItem("lastconfig__".concat(this.configKey)),"/"!==this.$router.currentRoute.fullPath&&this.$router.replace(this.$router.currentRoute.path),this.$router.go()}}}),We=function(){var e=this,n=e._self._c;return n("v-dialog",{attrs:{width:"600"},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[n("v-card",[n("form",{on:{submit:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[n("v-system-bar",[n("v-spacer"),n("span",[e._v("Open Configuration")]),n("v-spacer")],1),n("v-card-text",[n("div",{staticClass:"pa-3"},[n("v-row",{attrs:{dense:""}},[n("v-text-field",{attrs:{label:"search",type:"text","data-test":"search","prepend-icon":"mdi-magnify","clear-icon":"mdi-close-circle-outline",clearable:"",autofocus:"","single-line":"","hide-details":""},model:{value:e.search,callback:function(n){e.search=n},expression:"search"}})],1),n("v-data-table",{attrs:{"show-select":"","single-select":"","item-key":"configId",search:e.search,headers:e.headers,items:e.configs,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},on:{"item-selected":e.itemSelected,"click:row":function(e,n){return n.select(e)}},scopedSlots:e._u([{key:"item.actions",fn:function(t){var i=t.item;return[n("v-btn",{staticClass:"mt-1",attrs:{"data-test":"item-delete",icon:""},on:{click:function(n){return e.deleteConfig(i)}}},[n("v-icon",[e._v("mdi-delete")])],1)]}}])}),n("v-row",{attrs:{dense:""}},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:e._s(e.error)}})])],1)]),n("v-card-actions",[n("v-spacer"),n("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"open-config-cancel-btn"},on:{click:e.cancel}},[e._v(" Cancel ")]),n("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"open-config-submit-btn",disabled:!!e.error},on:{click:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[e._v(" Ok ")])],1)],1)])],1)},Ze=[],Fe={props:{configKey:String,value:Boolean},data:function(){return{configs:[],headers:[{text:"Configuration",value:"config"},{text:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedItem:null}},computed:{error:function(){return""===this.selectedItem||null===this.selectedItem?"Must select a config":null},show:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},mounted:function(){var e=this,n=-1;(new x).list_configs(this.configKey).then((function(t){e.configs=t.map((function(e){return n+=1,{configId:n,config:e}}))})).catch((function(n){e.$emit("warning","Failed to connect to OpenC3. ".concat(n))}))},methods:{itemSelected:function(e){e.value?this.selectedItem=e.item:this.selectedItem=null},success:function(){this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedItem=null},cancel:function(){this.show=!1,this.search=null,this.selectedItem=null},deleteConfig:function(e){var n=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(e.config),{okText:"Delete",cancelText:"Cancel"}).then((function(t){n.selectedItem.config===e.config&&(n.selectedItem=null),n.configs.splice(n.configs.indexOf(e),1),(new x).delete_config(n.configKey,e.config),localStorage["lastconfig__".concat(n.configKey)]===e.config&&localStorage.removeItem("lastconfig__".concat(n.configKey))})).catch((function(t){t&&n.$emit("warning","Failed to delete config ".concat(e.config," Error: ").concat(t))}))}}},Pe=Fe,$e=(0,D.Z)(Pe,We,Ze,!1,null,null,null),Ge=$e.exports,Ke=function(){var e=this,n=e._self._c;return n("v-dialog",{attrs:{width:"600"},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[n("v-card",[n("form",{on:{submit:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[n("v-system-bar",[n("v-spacer"),n("span",[e._v("Save Configuration")]),n("v-spacer")],1),n("v-card-text",[n("div",{staticClass:"pa-3"},[n("v-row",{attrs:{dense:""}},[n("v-text-field",{attrs:{label:"search",type:"text","data-test":"search","prepend-icon":"mdi-magnify","clear-icon":"mdi-close-circle-outline",clearable:"","single-line":"","hide-details":""},model:{value:e.search,callback:function(n){e.search=n},expression:"search"}})],1),n("v-data-table",{attrs:{"show-select":"","single-select":"","item-key":"configId",search:e.search,headers:e.headers,items:e.configs,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},on:{"item-selected":e.itemSelected,"click:row":function(e,n){return n.select(e)}},scopedSlots:e._u([{key:"item.actions",fn:function(t){var i=t.item;return[n("v-btn",{staticClass:"mt-1",attrs:{icon:"","data-test":"item-delete"},on:{click:function(n){return e.deleteConfig(i)}}},[n("v-icon",[e._v("mdi-delete")])],1)]}}])}),n("v-row",{attrs:{dense:""}},[n("v-text-field",{attrs:{"hide-details":"",autofocus:"",disabled:!!e.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},model:{value:e.configName,callback:function(n){e.configName=n},expression:"configName"}})],1),n("v-row",{attrs:{dense:""}},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:e._s(e.error)}})])],1)]),n("v-card-actions",[n("v-spacer"),n("v-btn",{staticClass:"mx-2",attrs:{outlined:""},on:{click:e.cancel}},[e._v(" Cancel ")]),n("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"save-config-submit-btn",disabled:!!e.error},on:{click:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[e._v(" Ok ")])],1)],1)])],1)},Ue=[],Be={props:{configKey:String,value:Boolean},data:function(){return{configName:"",configs:[],headers:[{text:"Configuration",value:"config"},{text:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedItem:null}},computed:{error:function(){return""===this.configName?"Config must have a name":null},show:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},mounted:function(){var e=this,n=-1;(new x).list_configs(this.configKey).then((function(t){e.configs=t.map((function(e){return n+=1,{configId:n,config:e}}))})).catch((function(n){e.$emit("warning","Failed to connect to OpenC3. ".concat(n))}))},methods:{itemSelected:function(e){e.value?(this.selectedItem=e.item,this.configName=e.item.config):(this.selectedItem=null,this.configName="")},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedItem=null,this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedItem=null,this.configName=""},deleteConfig:function(e){var n=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(e.config),{okText:"Delete",cancelText:"Cancel"}).then((function(t){n.configName===e.config&&(n.selectedItem=null,n.configName=""),n.configs.splice(n.configs.indexOf(e.config),1),(new x).delete_config(n.configKey,e.config),localStorage["lastconfig__".concat(n.configKey)]===e.config&&localStorage.removeItem("lastconfig__".concat(n.configKey))})).catch((function(t){t&&n.$emit("warning","Failed to delete config ".concat(e.config," Error: ").concat(t))}))}}},Ye=Be,je=(0,D.Z)(Ye,Ke,Ue,!1,null,null,null),ze=je.exports;function qe(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsMonitor.vue",n="bfd3211bb2cabf8430515215e77f28c8a2374036",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsMonitor.vue",statementMap:{0:{start:{line:20,column:4},end:{line:69,column:5}},1:{start:{line:39,column:16},end:{line:39,column:48}},2:{start:{line:49,column:16},end:{line:49,column:38}},3:{start:{line:56,column:16},end:{line:56,column:38}},4:{start:{line:63,column:16},end:{line:63,column:38}},5:{start:{line:73,column:6},end:{line:73,column:43}},6:{start:{line:77,column:4},end:{line:79,column:6}},7:{start:{line:78,column:6},end:{line:78,column:28}},8:{start:{line:80,column:4},end:{line:80,column:30}},9:{start:{line:81,column:4},end:{line:84,column:5}},10:{start:{line:87,column:27},end:{line:87,column:72}},11:{start:{line:89,column:4},end:{line:93,column:5}},12:{start:{line:90,column:6},end:{line:90,column:60}},13:{start:{line:91,column:11},end:{line:93,column:5}},14:{start:{line:92,column:6},end:{line:92,column:44}},15:{start:{line:96,column:4},end:{line:96,column:49}},16:{start:{line:100,column:6},end:{line:102,column:8}},17:{start:{line:101,column:8},end:{line:101,column:38}},18:{start:{line:105,column:6},end:{line:105,column:36}},19:{start:{line:106,column:6},end:{line:106,column:22}},20:{start:{line:109,column:6},end:{line:112,column:8}},21:{start:{line:110,column:8},end:{line:110,column:29}},22:{start:{line:111,column:8},end:{line:111,column:24}},23:{start:{line:115,column:6},end:{line:115,column:45}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:9},end:{line:70,column:3}},line:19},1:{name:"(anonymous_1)",decl:{start:{line:38,column:23},end:{line:38,column:24}},loc:{start:{line:38,column:29},end:{line:40,column:15}},line:38},2:{name:"(anonymous_2)",decl:{start:{line:48,column:23},end:{line:48,column:24}},loc:{start:{line:48,column:29},end:{line:50,column:15}},line:48},3:{name:"(anonymous_3)",decl:{start:{line:55,column:23},end:{line:55,column:24}},loc:{start:{line:55,column:29},end:{line:57,column:15}},line:55},4:{name:"(anonymous_4)",decl:{start:{line:62,column:23},end:{line:62,column:24}},loc:{start:{line:62,column:29},end:{line:64,column:15}},line:62},5:{name:"(anonymous_5)",decl:{start:{line:72,column:22},end:{line:72,column:23}},loc:{start:{line:72,column:48},end:{line:74,column:5}},line:72},6:{name:"(anonymous_6)",decl:{start:{line:76,column:2},end:{line:76,column:3}},loc:{start:{line:76,column:12},end:{line:85,column:3}},line:76},7:{name:"(anonymous_7)",decl:{start:{line:77,column:36},end:{line:77,column:37}},loc:{start:{line:77,column:46},end:{line:79,column:5}},line:77},8:{name:"(anonymous_8)",decl:{start:{line:86,column:11},end:{line:86,column:12}},loc:{start:{line:86,column:23},end:{line:94,column:3}},line:86},9:{name:"(anonymous_9)",decl:{start:{line:95,column:13},end:{line:95,column:14}},loc:{start:{line:95,column:25},end:{line:97,column:3}},line:95},10:{name:"(anonymous_10)",decl:{start:{line:99,column:25},end:{line:99,column:26}},loc:{start:{line:99,column:37},end:{line:103,column:5}},line:99},11:{name:"(anonymous_11)",decl:{start:{line:100,column:37},end:{line:100,column:38}},loc:{start:{line:100,column:49},end:{line:102,column:7}},line:100},12:{name:"(anonymous_12)",decl:{start:{line:104,column:4},end:{line:104,column:5}},loc:{start:{line:104,column:24},end:{line:107,column:5}},line:104},13:{name:"(anonymous_13)",decl:{start:{line:108,column:23},end:{line:108,column:24}},loc:{start:{line:108,column:55},end:{line:113,column:5}},line:108},14:{name:"(anonymous_14)",decl:{start:{line:109,column:40},end:{line:109,column:41}},loc:{start:{line:109,column:52},end:{line:112,column:7}},line:109},15:{name:"(anonymous_15)",decl:{start:{line:114,column:23},end:{line:114,column:24}},loc:{start:{line:114,column:39},end:{line:116,column:5}},line:114}},branchMap:{0:{loc:{start:{line:73,column:6},end:{line:73,column:43}},type:"binary-expr",locations:[{start:{line:73,column:6},end:{line:73,column:14}},{start:{line:73,column:18},end:{line:73,column:43}}],line:73},1:{loc:{start:{line:89,column:4},end:{line:93,column:5}},type:"if",locations:[{start:{line:89,column:4},end:{line:93,column:5}},{start:{line:91,column:11},end:{line:93,column:5}}],line:89},2:{loc:{start:{line:89,column:8},end:{line:89,column:53}},type:"binary-expr",locations:[{start:{line:89,column:8},end:{line:89,column:25}},{start:{line:89,column:29},end:{line:89,column:53}}],line:89},3:{loc:{start:{line:91,column:11},end:{line:93,column:5}},type:"if",locations:[{start:{line:91,column:11},end:{line:93,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:91},4:{loc:{start:{line:108,column:39},end:{line:108,column:53}},type:"default-arg",locations:[{start:{line:108,column:48},end:{line:108,column:53}}],line:108}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0]},inputSourceMap:{version:3,sources:["LimitsMonitor.vue"],names:[],mappings:";AAiEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"LimitsMonitor.vue",sourceRoot:"src/tools/LimitsMonitor",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <div>\n <top-bar :menus="menus" :title="title" />\n <v-card>\n <div class="pa-3">\n <span style="display: block"\n >The Limits Set is a global option which changes the Limits Set across\n all tools.</span\n >\n <span style="display: block"\n >NOTE: Changing this option clears the current list and recalculates\n out of limits based on the new set.</span\n >\n <v-select\n label="Limits Set"\n :items="limitsSets"\n v-model="currentLimitsSet"\n data-test="limits-set"\n hide-details\n />\n </div>\n <limits-control ref="control" v-model="ignored" :key="renderKey" />\n </v-card>\n <div style="height: 15px" />\n <limits-events />\n \x3c!-- Note we\'re using v-if here so it gets re-created each time and refreshes the list --\x3e\n <open-config-dialog\n v-if="openConfig"\n v-model="openConfig"\n :configKey="configKey"\n @success="openConfiguration"\n />\n \x3c!-- Note we\'re using v-if here so it gets re-created each time and refreshes the list --\x3e\n <save-config-dialog\n v-if="saveConfig"\n v-model="saveConfig"\n :configKey="configKey"\n @success="saveConfiguration"\n />\n </div>\n</template>\n\n<script>\nimport LimitsControl from \'@/tools/LimitsMonitor/LimitsControl\'\nimport LimitsEvents from \'@/tools/LimitsMonitor/LimitsEvents\'\nimport TopBar from \'@openc3/tool-common/src/components/TopBar\'\nimport Config from \'@openc3/tool-common/src/components/config/Config\'\nimport { OpenC3Api } from \'@openc3/tool-common/src/services/openc3-api\'\nimport OpenConfigDialog from \'@openc3/tool-common/src/components/config/OpenConfigDialog\'\nimport SaveConfigDialog from \'@openc3/tool-common/src/components/config/SaveConfigDialog\'\n\nexport default {\n components: {\n LimitsControl,\n LimitsEvents,\n TopBar,\n OpenConfigDialog,\n SaveConfigDialog,\n },\n mixins: [Config],\n data() {\n return {\n title: \'COSMOS Limits Monitor\',\n configKey: \'limits_monitor\',\n api: new OpenC3Api(),\n renderKey: 0,\n ignored: [],\n openConfig: false,\n saveConfig: false,\n limitsSets: [],\n currentLimitsSet: \'\',\n currentSetRefreshInterval: null,\n menus: [\n {\n label: \'File\',\n items: [\n {\n label: \'Show Ignored\',\n icon: \'mdi-magnify-close\',\n command: () => {\n this.$refs.control.showIgnored()\n },\n },\n {\n divider: true,\n },\n {\n label: \'Open Configuration\',\n icon: \'mdi-folder-open\',\n command: () => {\n this.openConfig = true\n },\n },\n {\n label: \'Save Configuration\',\n icon: \'mdi-content-save\',\n command: () => {\n this.saveConfig = true\n },\n },\n {\n label: \'Reset Configuration\',\n icon: \'mdi-monitor-shimmer\',\n command: () => {\n this.resetConfigBase()\n },\n },\n ],\n },\n ],\n }\n },\n watch: {\n currentLimitsSet: function (newVal, oldVal) {\n !!oldVal && this.limitsChange(newVal)\n },\n },\n created() {\n this.api.get_limits_sets().then((sets) => {\n this.limitsSets = sets\n })\n this.getCurrentLimitsSet()\n this.currentSetRefreshInterval = setInterval(\n this.getCurrentLimitsSet,\n 60 * 1000\n )\n },\n mounted: function () {\n const previousConfig = localStorage[`lastconfig__${this.configKey}`]\n // Called like /tools/limitsmonitor?config=ignored\n if (this.$route.query && this.$route.query.config) {\n this.openConfiguration(this.$route.query.config, true) // routed\n } else if (previousConfig) {\n this.openConfiguration(previousConfig)\n }\n },\n destroyed: function () {\n clearInterval(this.currentSetRefreshInterval)\n },\n methods: {\n getCurrentLimitsSet: function () {\n this.api.get_limits_set().then((result) => {\n this.currentLimitsSet = result\n })\n },\n limitsChange(value) {\n this.api.set_limits_set(value)\n this.renderKey++ // Trigger re-render\n },\n openConfiguration: function (name, routed = false) {\n this.openConfigBase(name, routed, (config) => {\n this.ignored = config\n this.renderKey++ // Trigger re-render\n })\n },\n saveConfiguration: function (name) {\n this.saveConfigBase(name, this.ignored)\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"bfd3211bb2cabf8430515215e77f28c8a2374036"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var s=o[e];return qe=function(){return s},s}qe();var Je={components:{LimitsControl:Ce,LimitsEvents:Ne,TopBar:De,OpenConfigDialog:Ge,SaveConfigDialog:ze},mixins:[He],data:function(){var e=this;return qe().f[0]++,qe().s[0]++,{title:"COSMOS Limits Monitor",configKey:"limits_monitor",api:new x,renderKey:0,ignored:[],openConfig:!1,saveConfig:!1,limitsSets:[],currentLimitsSet:"",currentSetRefreshInterval:null,menus:[{label:"File",items:[{label:"Show Ignored",icon:"mdi-magnify-close",command:function(){qe().f[1]++,qe().s[1]++,e.$refs.control.showIgnored()}},{divider:!0},{label:"Open Configuration",icon:"mdi-folder-open",command:function(){qe().f[2]++,qe().s[2]++,e.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:function(){qe().f[3]++,qe().s[3]++,e.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:function(){qe().f[4]++,qe().s[4]++,e.resetConfigBase()}}]}]}},watch:{currentLimitsSet:function(e,n){qe().f[5]++,qe().s[5]++,qe().b[0][0]++,n&&(qe().b[0][1]++,this.limitsChange(e))}},created:function(){var e=this;qe().f[6]++,qe().s[6]++,this.api.get_limits_sets().then((function(n){qe().f[7]++,qe().s[7]++,e.limitsSets=n})),qe().s[8]++,this.getCurrentLimitsSet(),qe().s[9]++,this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4)},mounted:function(){qe().f[8]++;var e=(qe().s[10]++,localStorage["lastconfig__".concat(this.configKey)]);qe().s[11]++,qe().b[2][0]++,this.$route.query&&(qe().b[2][1]++,this.$route.query.config)?(qe().b[1][0]++,qe().s[12]++,this.openConfiguration(this.$route.query.config,!0)):(qe().b[1][1]++,qe().s[13]++,e?(qe().b[3][0]++,qe().s[14]++,this.openConfiguration(e)):qe().b[3][1]++)},destroyed:function(){qe().f[9]++,qe().s[15]++,clearInterval(this.currentSetRefreshInterval)},methods:{getCurrentLimitsSet:function(){var e=this;qe().f[10]++,qe().s[16]++,this.api.get_limits_set().then((function(n){qe().f[11]++,qe().s[17]++,e.currentLimitsSet=n}))},limitsChange:function(e){qe().f[12]++,qe().s[18]++,this.api.set_limits_set(e),qe().s[19]++,this.renderKey++},openConfiguration:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(qe().b[4][0]++,!1);qe().f[13]++,qe().s[20]++,this.openConfigBase(e,t,(function(e){qe().f[14]++,qe().s[21]++,n.ignored=e,qe().s[22]++,n.renderKey++}))},saveConfiguration:function(e){qe().f[15]++,qe().s[23]++,this.saveConfigBase(e,this.ignored)}}},Xe=Je,Qe=(0,D.Z)(Xe,l,o,!1,null,null,null),en=Qe.exports},6959:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".textfield-green[data-v-b0d7e182] .v-text-field__slot input,.textfield-green[data-v-b0d7e182] .v-text-field__slot label{color:#00c800}.textfield-yellow[data-v-b0d7e182] .v-text-field__slot input,.textfield-yellow[data-v-b0d7e182] .v-text-field__slot label{color:#ffdc00}.textfield-red[data-v-b0d7e182] .v-text-field__slot input,.textfield-red[data-v-b0d7e182] .v-text-field__slot label{color:#ff2d2d}",""]),n["default"]=a},3208:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".label[data-v-1e0f0ab0]{font-weight:700;text-transform:capitalize}[data-v-1e0f0ab0] .v-input--selection-controls{padding:0;margin:0}",""]),n["default"]=a},6294:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".v-list[data-v-2eb37f67] .v-label{margin-left:5px}.v-list-item__icon[data-v-2eb37f67]{margin-right:15px!important}.v-list-item__title[data-v-2eb37f67]{color:#fff}",""]),n["default"]=a},8748:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".label[data-v-19db816e]{font-family:var(--font-family);font-size:var(--font-size);font-weight:var(--font-weight);font-style:var(--font-style)}",""]),n["default"]=a},6934:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".card-height[data-v-3e3badba]{height:calc(100vh - 150px)}",""]),n["default"]=a},642:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".limitsbar[data-v-344f6330]{cursor:default;display:flex;justify-content:center;align-items:center;padding:5px;padding-top:15px;width:var(--width)}.limitsbar__container[data-v-344f6330]{position:relative;flex:1;height:var(--container-height);border:1px solid #000;background-color:#fff}.limitsbar__redlow[data-v-344f6330]{left:0;width:var(--redlow-width)}.limitsbar__redhigh[data-v-344f6330],.limitsbar__redlow[data-v-344f6330]{position:absolute;top:-1px;height:var(--container-height);background-color:#ff2d2d}.limitsbar__redhigh[data-v-344f6330]{right:0;width:var(--redhigh-width)}.limitsbar__yellowlow[data-v-344f6330]{left:var(--redlow-width);width:var(--yellowlow-width)}.limitsbar__yellowhigh[data-v-344f6330],.limitsbar__yellowlow[data-v-344f6330]{position:absolute;top:-1px;height:var(--container-height);background-color:#ffdc00}.limitsbar__yellowhigh[data-v-344f6330]{right:var(--redhigh-width);width:var(--yellowhigh-width)}.limitsbar__greenlow[data-v-344f6330]{left:calc(var(--redlow-width) + var(--yellowlow-width));width:var(--greenlow-width)}.limitsbar__greenhigh[data-v-344f6330],.limitsbar__greenlow[data-v-344f6330]{position:absolute;top:-1px;height:var(--container-height);background-color:#00c800}.limitsbar__greenhigh[data-v-344f6330]{right:calc(var(--redhigh-width) + var(--yellowhigh-width));width:var(--greenhigh-width)}.limitsbar__blue[data-v-344f6330]{top:-1px;left:calc(var(--redlow-width) + var(--yellowlow-width) + var(--greenlow-width));width:var(--blue-width);background-color:#09f}.limitsbar__blue[data-v-344f6330],.limitsbar__line[data-v-344f6330]{position:absolute;height:var(--container-height)}.limitsbar__line[data-v-344f6330]{left:var(--position);width:1px;background-color:gray}.limitsbar__arrow[data-v-344f6330]{position:absolute;top:-5px;left:var(--position);width:0;height:0;-webkit-transform:translateX(-5px);transform:translateX(-5px);border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid gray}",""]),n["default"]=a},5471:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".value-widget-container[data-v-2750a386]{min-height:34px}.value-widget-container[data-v-2750a386] .v-input__slot{background:rgba(var(--aging),var(--aging),var(--aging),1)!important}.value-widget-container[data-v-2750a386] input{text-align:var(--text-align)!important}.value[data-v-2750a386] div{min-height:24px!important;display:flex!important;align-items:center!important}.openc3-green[data-v-2750a386] input{color:#00c800}.openc3-yellow[data-v-2750a386] input{color:#ffdc00}.openc3-red[data-v-2750a386] input{color:#ff2d2d}.openc3-blue[data-v-2750a386] input{color:#09f}.openc3-purple[data-v-2750a386] input{color:#c800c8}.openc3-black[data-v-2750a386] input{color:#000}.openc3-white[data-v-2750a386] input{color:#fff}",""]),n["default"]=a},1505:function(e,n,t){var i=t(6959);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("66ee0da9",i,!0,{sourceMap:!1,shadowMode:!1})},3270:function(e,n,t){var i=t(3208);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("c388abcc",i,!0,{sourceMap:!1,shadowMode:!1})},4888:function(e,n,t){var i=t(6294);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("706a3f6d",i,!0,{sourceMap:!1,shadowMode:!1})},8489:function(e,n,t){var i=t(8748);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("a05f0e64",i,!0,{sourceMap:!1,shadowMode:!1})},21:function(e,n,t){var i=t(6934);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("3c1e7368",i,!0,{sourceMap:!1,shadowMode:!1})},9731:function(e,n,t){var i=t(642);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("6fee9274",i,!0,{sourceMap:!1,shadowMode:!1})},19:function(e,n,t){var i=t(5471);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("c59cda46",i,!0,{sourceMap:!1,shadowMode:!1})}}]);
1
+ (self["webpackChunk_openc3_cosmos_tool_limitsmonitor"]=self["webpackChunk_openc3_cosmos_tool_limitsmonitor"]||[]).push([[609],{6609:function(e,n,t){"use strict";function i(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsMonitor.vue",n="be7b5859fd9c9171f0f00cde5deee209412c8774",t=new Function("return this")(),l="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsMonitor.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:1377}},4:{start:{line:1,column:651},end:{line:1,column:675}},5:{start:{line:1,column:819},end:{line:1,column:834}},6:{start:{line:1,column:1094},end:{line:1,column:1112}},7:{start:{line:1,column:1318},end:{line:1,column:1336}},8:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:635},end:{line:1,column:636}},loc:{start:{line:1,column:650},end:{line:1,column:676}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:803},end:{line:1,column:804}},loc:{start:{line:1,column:818},end:{line:1,column:835}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:1078},end:{line:1,column:1079}},loc:{start:{line:1,column:1093},end:{line:1,column:1113}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:1302},end:{line:1,column:1303}},loc:{start:{line:1,column:1317},end:{line:1,column:1337}},line:1}},branchMap:{0:{loc:{start:{line:1,column:926},end:{line:1,column:1149}},type:"cond-expr",locations:[{start:{line:1,column:943},end:{line:1,column:1140}},{start:{line:1,column:1141},end:{line:1,column:1149}}],line:1},1:{loc:{start:{line:1,column:1150},end:{line:1,column:1373}},type:"cond-expr",locations:[{start:{line:1,column:1167},end:{line:1,column:1364}},{start:{line:1,column:1365},end:{line:1,column:1373}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"be7b5859fd9c9171f0f00cde5deee209412c8774"},s=t[l]||(t[l]={});s[e]&&s[e].hash===n||(s[e]=o);var a=s[e];return i=function(){return a},a}t.r(n),t.d(n,{default:function(){return en}}),i(),i().s[0]++;var l=function(){i().f[0]++;var e=(i().s[1]++,this),n=(i().s[2]++,e._self._c);return i().s[3]++,n("div",[n("top-bar",{attrs:{menus:e.menus,title:e.title}}),n("v-card",[n("div",{staticClass:"pa-3"},[n("span",{staticStyle:{display:"block"}},[e._v("The Limits Set is a global option which changes the Limits Set across all tools.")]),n("span",{staticStyle:{display:"block"}},[e._v("NOTE: Changing this option clears the current list and recalculates out of limits based on the new set.")]),n("v-select",{attrs:{label:"Limits Set",items:e.limitsSets,"data-test":"limits-set","hide-details":""},model:{value:e.currentLimitsSet,callback:function(n){i().f[1]++,i().s[4]++,e.currentLimitsSet=n},expression:"currentLimitsSet"}})],1),n("limits-control",{key:e.renderKey,ref:"control",model:{value:e.ignored,callback:function(n){i().f[2]++,i().s[5]++,e.ignored=n},expression:"ignored"}})],1),n("div",{staticStyle:{height:"15px"}}),n("limits-events"),e.openConfig?(i().b[0][0]++,n("open-config-dialog",{attrs:{configKey:e.configKey},on:{success:e.openConfiguration},model:{value:e.openConfig,callback:function(n){i().f[3]++,i().s[6]++,e.openConfig=n},expression:"openConfig"}})):(i().b[0][1]++,e._e()),e.saveConfig?(i().b[1][0]++,n("save-config-dialog",{attrs:{configKey:e.configKey},on:{success:e.saveConfiguration},model:{value:e.saveConfig,callback:function(n){i().f[4]++,i().s[7]++,e.saveConfig=n},expression:"saveConfig"}})):(i().b[1][1]++,e._e())],1)},o=(i().s[8]++,[]);function s(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsControl.vue",n="f1ff7e3a760a8052f85ba268ca4e8e8b188dc566",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsControl.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:2974}},4:{start:{line:1,column:366},end:{line:1,column:1887}},5:{start:{line:1,column:798},end:{line:1,column:1018}},6:{start:{line:1,column:898},end:{line:1,column:931}},7:{start:{line:1,column:1181},end:{line:1,column:1390}},8:{start:{line:1,column:1281},end:{line:1,column:1312}},9:{start:{line:1,column:1544},end:{line:1,column:1748}},10:{start:{line:1,column:1644},end:{line:1,column:1675}},11:{start:{line:1,column:1994},end:{line:1,column:2020}},12:{start:{line:1,column:2260},end:{line:1,column:2688}},13:{start:{line:1,column:2520},end:{line:1,column:2555}},14:{start:{line:1,column:2825},end:{line:1,column:2855}},15:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:345},end:{line:1,column:346}},loc:{start:{line:1,column:365},end:{line:1,column:1888}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:774},end:{line:1,column:775}},loc:{start:{line:1,column:797},end:{line:1,column:1019}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:881},end:{line:1,column:882}},loc:{start:{line:1,column:897},end:{line:1,column:932}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:1157},end:{line:1,column:1158}},loc:{start:{line:1,column:1180},end:{line:1,column:1391}},line:1},5:{name:"(anonymous_5)",decl:{start:{line:1,column:1264},end:{line:1,column:1265}},loc:{start:{line:1,column:1280},end:{line:1,column:1313}},line:1},6:{name:"(anonymous_6)",decl:{start:{line:1,column:1520},end:{line:1,column:1521}},loc:{start:{line:1,column:1543},end:{line:1,column:1749}},line:1},7:{name:"(anonymous_7)",decl:{start:{line:1,column:1627},end:{line:1,column:1628}},loc:{start:{line:1,column:1643},end:{line:1,column:1676}},line:1},8:{name:"(anonymous_8)",decl:{start:{line:1,column:1978},end:{line:1,column:1979}},loc:{start:{line:1,column:1993},end:{line:1,column:2021}},line:1},9:{name:"(anonymous_9)",decl:{start:{line:1,column:2239},end:{line:1,column:2240}},loc:{start:{line:1,column:2259},end:{line:1,column:2689}},line:1},10:{name:"(anonymous_10)",decl:{start:{line:1,column:2503},end:{line:1,column:2504}},loc:{start:{line:1,column:2519},end:{line:1,column:2556}},line:1},11:{name:"(anonymous_11)",decl:{start:{line:1,column:2808},end:{line:1,column:2809}},loc:{start:{line:1,column:2824},end:{line:1,column:2856}},line:1}},branchMap:{0:{loc:{start:{line:1,column:474},end:{line:1,column:682}},type:"cond-expr",locations:[{start:{line:1,column:488},end:{line:1,column:589}},{start:{line:1,column:590},end:{line:1,column:682}}],line:1},1:{loc:{start:{line:1,column:1816},end:{line:1,column:1883}},type:"cond-expr",locations:[{start:{line:1,column:1847},end:{line:1,column:1874}},{start:{line:1,column:1875},end:{line:1,column:1883}}],line:1},2:{loc:{start:{line:1,column:2606},end:{line:1,column:2684}},type:"cond-expr",locations:[{start:{line:1,column:2648},end:{line:1,column:2675}},{start:{line:1,column:2676},end:{line:1,column:2684}}],line:1},3:{loc:{start:{line:1,column:2881},end:{line:1,column:2956}},type:"cond-expr",locations:[{start:{line:1,column:2916},end:{line:1,column:2947}},{start:{line:1,column:2948},end:{line:1,column:2956}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f1ff7e3a760a8052f85ba268ca4e8e8b188dc566"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var a=o[e];return s=function(){return a},a}s(),s().s[0]++;var a=function(){s().f[0]++;var e=(s().s[1]++,this),n=(s().s[2]++,e._self._c);return s().s[3]++,n("div",{staticClass:"pa-3"},[n("v-row",{attrs:{"no-gutters":""}},[n("v-text-field",{class:e.textFieldClass,attrs:{dense:"",outlined:"",readonly:"",label:"Overall Limits State",value:e.overallStateFormatted,"data-test":"overall-state"}})],1),e._l(e.items,(function(t,i){return s().f[1]++,s().s[4]++,n("div",{key:t.key},[n("v-row",{staticClass:"my-0 ml-1 mr-1",attrs:{"data-test":"limits-row"}},[t.limits?(s().b[0][0]++,n("labelvaluelimitsbar-widget",{attrs:{parameters:t.parameters,settings:e.widgetSettings}})):(s().b[0][1]++,n("labelvalue-widget",{attrs:{parameters:t.parameters,settings:e.widgetSettings}})),n("v-spacer"),n("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var l=i.on,o=i.attrs;return s().f[2]++,s().s[5]++,[n("v-btn",e._g(e._b({staticClass:"mr-2",attrs:{icon:""},on:{click:function(n){return s().f[3]++,s().s[6]++,e.ignorePacket(t.key)}}},"v-btn",o,!1),l),[n("v-icon",[e._v(" mdi-close-circle-multiple ")])],1)]}}],null,!0)},[n("span",[e._v("Ignore Entire Packet")])]),n("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var l=i.on,o=i.attrs;return s().f[4]++,s().s[7]++,[n("v-btn",e._g(e._b({staticClass:"mr-2",attrs:{icon:""},on:{click:function(n){return s().f[5]++,s().s[8]++,e.ignoreItem(t.key)}}},"v-btn",o,!1),l),[n("v-icon",[e._v(" mdi-close-circle ")])],1)]}}],null,!0)},[n("span",[e._v("Ignore Item")])]),n("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var l=i.on,o=i.attrs;return s().f[6]++,s().s[9]++,[n("v-btn",e._g(e._b({staticClass:"mr-2",attrs:{icon:""},on:{click:function(n){return s().f[7]++,s().s[10]++,e.removeItem(t.key)}}},"v-btn",o,!1),l),[n("v-icon",[e._v(" mdi-eye-off ")])],1)]}}],null,!0)},[n("span",[e._v("Temporarily Hide Item")])])],1),i<e.items.length-1?(s().b[1][0]++,n("v-divider",{key:i})):(s().b[1][1]++,e._e())],1)})),n("v-dialog",{attrs:{"max-width":"600"},model:{value:e.ignoredItemsDialog,callback:function(n){s().f[8]++,s().s[11]++,e.ignoredItemsDialog=n},expression:"ignoredItemsDialog"}},[n("v-card",[n("v-system-bar",[n("v-spacer"),n("span",[e._v("Ignored Items")]),n("v-spacer")],1),n("v-card-text",[n("div",{staticClass:"my-2"},[e._l(e.ignoredFormatted,(function(t,i){return s().f[9]++,s().s[12]++,n("div",{key:i},[n("v-row",{staticClass:"ma-1"},[n("span",{staticClass:"font-weight-black"},[e._v(" "+e._s(t)+" ")]),n("v-spacer"),n("v-btn",{attrs:{small:"",icon:"","data-test":"remove-ignore-".concat(i)},on:{click:function(n){return s().f[10]++,s().s[13]++,e.restoreItem(t,i)}}},[n("v-icon",[e._v(" mdi-delete ")])],1)],1),i<e.ignoredFormatted.length-1?(s().b[2][0]++,n("v-divider",{key:i})):(s().b[2][1]++,e._e())],1)})),n("v-row",{staticClass:"mt-2"},[n("v-spacer"),n("v-btn",{staticClass:"mx-2",attrs:{color:"primary"},on:{click:function(n){s().f[11]++,s().s[14]++,e.ignoredItemsDialog=!1}}},[e._v(" Ok ")])],1),e.index<e.items.length-1?(s().b[3][0]++,n("v-divider",{key:e.index})):(s().b[3][1]++,e._e())],2)])],1)],1)],2)},c=(s().s[15]++,[]),r=t(7302),u=t(8081),m=(t(3450),t(4769),t(7950),t(4069),t(9228),t(8188),t(9529),t(1235),t(6728),t(2501),t(8178),t(9949),t(4660),t(9805),t(4083),t(6259)),d=t(5789),A=t(6964),h=t(9502),f=t(426),v=t(7871),p=t(2261),g=(t(1372),t(1245),t(2994),t(3675),t(4898),t(5825),t(7170),t(8857),t(8329),t(6279),t(427),t(171),t(7093),t(1159),t(2516),t(4349),t(5273),t(6729),t(1801),t(574),t(5787),t(9271),t(3160),t(5688),t(3157),t(3333),t(315),t(556),t(2529),t(6943),t(9224),t(1157),t(7233),t(8673),t(5734),t(8233),t(9644)),_=t.n(g),C=t(4091),b=new C["default"],y=_().create({baseURL:location.origin,timeout:6e4,params:{}});y.interceptors.response.use((function(e){return e}),(function(e){if(e.response){var n,t,i,l,o;if(401===e.response.status&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then((function(e){e&&OpenC3Auth.setTokens()})),e.response.headers["ignore-errors"]&&e.response.headers["ignore-errors"].includes(e.response.status.toString()))return Promise.reject(e);var s="HTTP ".concat(e.response.status," - ");if(null!==(n=e.response)&&void 0!==n&&n.statusText&&(s+="".concat(e.response.statusText," ")),null!==(t=e.response)&&void 0!==t&&null!==(t=t.config)&&void 0!==t&&t.data&&(s+="".concat(e.response.config.data," ")),null!==(i=e.response)&&void 0!==i&&null!==(i=i.data)&&void 0!==i&&i.message)s+="".concat(e.response.data.message);else if(null!==(l=e.response)&&void 0!==l&&null!==(l=l.data)&&void 0!==l&&l.exception)s+="".concat(e.response.data.exception);else if(null!==(o=e.response)&&void 0!==o&&null!==(o=o.data)&&void 0!==o&&null!==(o=o.error)&&void 0!==o&&o.message)e.response.data.error.class&&(s+="".concat(e.response.data.error.class," ")),s+="".concat(e.response.data.error.message);else{var a;s+="".concat(null===(a=e.response)||void 0===a?void 0:a.data)}throw b.$notify&&b.$notify.serious({title:"Network error",body:s}),e}throw e}));var w=y,x=function(){function e(){(0,f.Z)(this,e),(0,p.Z)(this,"id",1)}return(0,v.Z)(e,[{key:"exec",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n,t){var i,l,o,s,a,c,r=arguments;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:{},l=r.length>3&&void 0!==r[3]?r[3]:{},o=r.length>4&&void 0!==r[4]?r[4]:6e4,e.prev=3,e.next=6,OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);case 6:s=e.sent,s&&OpenC3Auth.setTokens(),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](3),OpenC3Auth.login();case 13:return this.id=this.id+1,e.prev=14,i["scope"]=window.openc3Scope,e.next=18,w.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:t,id:this.id,keyword_params:i},{headers:(0,A.Z)({Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc"},l),timeout:o});case 18:return a=e.sent,e.abrupt("return",a.data.result);case 22:throw e.prev=22,e.t1=e["catch"](14),c=new Error,e.t1.response?(c.name=e.t1.response.data.error.data.class,c.message=e.t1.response.data.error.data.message):e.t1.request?(c.name="Request error",c.message="Request error, no response received"):c.name="Unknown error",c;case 27:case"end":return e.stop()}}),e,this,[[3,10],[14,22]])})));function n(n,t){return e.apply(this,arguments)}return n}()},{key:"decode_openc3_type",value:function(e){if(null!==e&&"object"===(0,m.Z)(e)&&"Float"==e.json_class&&e.raw){if("NaN"==e.raw)return NaN;if("Infinity"==e.raw)return 1/0;if("-Infinity"==e.raw)return-1/0}return null}},{key:"encode_openc3_type",value:function(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}},{key:"ensure_offline_access",value:function(){var e=this;this.offline_access_needed().then((function(n){n&&(localStorage.openc3OfflineToken?e.set_offline_access(localStorage.openc3OfflineToken).then((function(){delete localStorage.openc3OfflineToken})):OpenC3Auth.getOfflineAccess())}))}},{key:"offline_access_needed",value:function(){return this.exec("offline_access_needed",[])}},{key:"set_offline_access",value:function(e){return this.exec("set_offline_access",[e])}},{key:"get_all_interface_info",value:function(){return this.exec("get_all_interface_info",[])}},{key:"map_target_to_interface",value:function(e,n){return this.exec("map_target_to_interface",[e,n])}},{key:"connect_interface",value:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),i=1;i<n;i++)t[i-1]=arguments[i];return t.length>0?this.exec("connect_interface",[e].concat(t)):this.exec("connect_interface",[e])}},{key:"disconnect_interface",value:function(e){return this.exec("disconnect_interface",[e])}},{key:"get_all_router_info",value:function(){return this.exec("get_all_router_info",[])}},{key:"connect_router",value:function(e){return this.exec("connect_router",[e])}},{key:"disconnect_router",value:function(e){return this.exec("disconnect_router",[e])}},{key:"get_target_interfaces",value:function(){return this.exec("get_target_interfaces",[])}},{key:"get_all_target_info",value:function(){return this.exec("get_all_target_info",[])}},{key:"get_tlm_cnts",value:function(e){return this.exec("get_tlm_cnts",[e])}},{key:"get_item",value:function(e,n,t){return this.exec("get_item",[e,n,t])}},{key:"get_parameter",value:function(e,n,t){return this.exec("get_parameter",[e,n,t])}},{key:"get_all_packet_logger_info",value:function(){return this.exec("get_all_packet_logger_info",[])}},{key:"start_logging",value:function(){return this.exec("start_logging",[])}},{key:"stop_logging",value:function(){return this.exec("stop_logging",[])}},{key:"start_cmd_log",value:function(e){return this.exec("start_cmd_log",[e])}},{key:"start_tlm_log",value:function(e){return this.exec("start_tlm_log",[e])}},{key:"stop_cmd_log",value:function(e){return this.exec("stop_cmd_log",[e])}},{key:"stop_tlm_log",value:function(e){return this.exec("stop_tlm_log",[e])}},{key:"get_server_status",value:function(){return this.exec("get_server_status",[])}},{key:"get_limits_sets",value:function(){return this.exec("get_limits_sets",[])}},{key:"get_limits_set",value:function(){return this.exec("get_limits_set",[])}},{key:"set_limits_set",value:function(e){return this.exec("set_limits_set",[e])}},{key:"get_background_tasks",value:function(){return this.exec("get_background_tasks",[])}},{key:"start_background_task",value:function(e){return this.exec("start_background_task",[e])}},{key:"stop_background_task",value:function(e){return this.exec("stop_background_task",[e])}},{key:"get_target",value:function(e){return this.exec("get_target",[e])}},{key:"get_target_list",value:function(){return this.exec("get_target_list",[])}},{key:"get_target_names",value:function(){return this.exec("get_target_names",[])}},{key:"get_telemetry",value:function(e,n){return this.exec("get_telemetry",[e,n])}},{key:"get_all_telemetry",value:function(e){return this.exec("get_all_telemetry",[e])}},{key:"get_all_telemetry_names",value:function(e){return this.exec("get_all_telemetry_names",[e])}},{key:"get_tlm_packet",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n,t,i){var l,o,s,a,c,r=arguments;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return l=r.length>3&&void 0!==r[3]?r[3]:30,e.next=3,this.exec("get_tlm_packet",[n,t],{type:i,stale_time:l});case 3:if(o=e.sent,null!=o)for(s=o.length,a=null,c=0;c<s;c++)a=this.decode_openc3_type(o[c][1]),null!==a&&(o[c][1]=a);return e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)})));function n(n,t,i){return e.apply(this,arguments)}return n}()},{key:"get_packet_derived_items",value:function(e,n){return this.exec("get_packet_derived_items",[e,n])}},{key:"get_tlm_buffer",value:function(e,n){return this.exec("get_tlm_buffer",[e,n])}},{key:"get_tlm_values",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n){var t,i,l,o,s,a=arguments;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>1&&void 0!==a[1]?a[1]:30,e.next=3,this.exec("get_tlm_values",[n],{stale_time:t},{},1e4);case 3:for(i=e.sent,l=i[0].length,o=null,s=0;s<l;s++)o=this.decode_openc3_type(i[0][s]),null!==o&&(i[0][s]=o);return e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)})));function n(n){return e.apply(this,arguments)}return n}()},{key:"get_limits",value:function(e,n,t){return this.exec("get_limits",[e,n,t])}},{key:"tlm",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n,t,i){var l,o,s,a,c=arguments;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(l=c.length>3&&void 0!==c[3]?c[3]:"CONVERTED",o=null,void 0!==t){e.next=8;break}return e.next=5,this.exec("tlm",[n]);case 5:o=e.sent,e.next=24;break;case 8:if(void 0!==i){e.next=21;break}if(!["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(t)){e.next=15;break}return e.next=12,this.exec("tlm",[n],{type:t});case 12:o=e.sent,e.next=19;break;case 15:throw s=new Error,s.name="TypeError",s.message="Invalid data type ".concat(t,". Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS."),s;case 19:e.next=24;break;case 21:return e.next=23,this.exec("tlm",[n,t,i],{type:l});case 23:o=e.sent;case 24:return a=this.decode_openc3_type(o),null!==a&&(o=a),e.abrupt("return",o);case 27:case"end":return e.stop()}}),e,this)})));function n(n,t,i){return e.apply(this,arguments)}return n}()},{key:"inject_tlm",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n,t){var i,l,o=arguments;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=o.length>2&&void 0!==o[2]?o[2]:null,l=o.length>3&&void 0!==o[3]?o[3]:"CONVERTED",e.next=4,this.exec("inject_tlm",[n,t,i],{type:l});case 4:data=e.sent;case 5:case"end":return e.stop()}}),e,this)})));function n(n,t){return e.apply(this,arguments)}return n}()},{key:"set_tlm",value:function(e,n,t,i){return this.exec("set_tlm",[e,n,t],{type:i})}},{key:"override_tlm",value:function(e,n,t,i){return this.exec("override_tlm",[e,n,t],{type:i})}},{key:"get_overrides",value:function(){return this.exec("get_overrides")}},{key:"normalize_tlm",value:function(e,n,t,i){return this.exec("normalize_tlm",[e,n,t],{type:i})}},{key:"get_all_commands",value:function(e){return this.exec("get_all_commands",[e])}},{key:"get_all_command_names",value:function(e){return this.exec("get_all_command_names",[e])}},{key:"get_command",value:function(e,n){return this.exec("get_command",[e,n])}},{key:"get_cmd_cnts",value:function(e){return this.exec("get_cmd_cnts",[e])}},{key:"get_cmd_value",value:function(e,n,t){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[e,n,t,i])}},{key:"get_cmd_buffer",value:function(e,n){return this.exec("get_cmd_buffer",[e,n])}},{key:"_cmd",value:function(e,n,t,i,l){var o=null;for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(o=this.encode_openc3_type(i[s]),null!==o&&(i[s]=o));return this.exec(e,[n,t,i],{},l)}},{key:"get_cmd_hazardous",value:function(e,n,t){return void 0===n?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,n,t)}},{key:"cmd",value:function(e,n,t){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return void 0===n?this.exec("cmd",e,{},i):this._cmd("cmd",e,n,t,i)}},{key:"cmd_no_range_check",value:function(e,n,t){return void 0===n?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,n,t)}},{key:"cmd_raw",value:function(e,n,t){return void 0===n?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,n,t)}},{key:"cmd_raw_no_range_check",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,n,t)}},{key:"cmd_no_hazardous_check",value:function(e,n,t){return void 0===n?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,n,t)}},{key:"cmd_no_checks",value:function(e,n,t){return void 0===n?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,n,t)}},{key:"cmd_raw_no_hazardous_check",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,n,t)}},{key:"cmd_raw_no_checks",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,n,t)}},{key:"build_command",value:function(e,n,t){return void 0===n?this.exec("build_command",e):this._cmd("build_command",e,n,t)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(e,n){return this.exec("send_raw",[e,n])}},{key:"list_configs",value:function(e){return this.exec("list_configs",[e])}},{key:"load_config",value:function(e,n){return this.exec("load_config",[e,n])}},{key:"save_config",value:function(e,n,t){return this.exec("save_config",[e,n,t])}},{key:"delete_config",value:function(e,n){return this.exec("delete_config",[e,n])}},{key:"enable_limits",value:function(e,n,t){return this.exec("enable_limits",[e,n,t])}},{key:"disable_limits",value:function(e,n,t){return this.exec("disable_limits",[e,n,t])}},{key:"get_out_of_limits",value:function(){return this.exec("get_out_of_limits",[])}},{key:"get_overall_limits_state",value:function(e){return this.exec("get_overall_limits_state",[e])}},{key:"list_settings",value:function(){return this.exec("list_settings",[])}},{key:"get_all_settings",value:function(){return this.exec("get_all_settings",[])}},{key:"get_setting",value:function(e){return this.exec("get_setting",[e])}},{key:"get_settings",value:function(e){return this.exec("get_settings",e)}},{key:"save_setting",value:function(e,n){return this.exec("save_setting",[e,n])}},{key:"get_metrics",value:function(){return this.exec("get_metrics",[])}},{key:"hashString",value:function(){var e=(0,h.Z)((0,d.Z)().mark((function e(n){var t,i,l;return(0,d.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!window.isSecureContext){e.next=7;break}return t=(new TextEncoder).encode(n),e.next=4,crypto.subtle.digest("SHA-256",t);case 4:return i=e.sent,l=new Uint8Array(i),e.abrupt("return",Array.from(l).map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 7:case"end":return e.stop()}}),e)})));function n(n){return e.apply(this,arguments)}return n}()}]),e}(),k=t(7146);k.ju.staleThreshold=10;var S=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/openc3-api/cable";(0,f.Z)(this,e),this._cable=null,this._url=n}return(0,v.Z)(e,[{key:"disconnect",value:function(){this._cable&&this._cable.disconnect()}},{key:"createSubscription",value:function(e,n){var t=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((function(n){if(n&&OpenC3Auth.setTokens(),null==t._cable){var o=t._url+"?scope="+window.openc3Scope+"&authorization="+localStorage.openc3Token;t._cable=k.zD(o)}return t._cable.subscriptions.create((0,A.Z)({channel:e},l),i)}))}},{key:"recordPing",value:function(){this._cable.connection.monitor.recordPing()}}]),e}(),I=t(615),L=function(){var e=this,n=e._self._c;return n("div",{ref:"container",staticClass:"d-flex flex-row",style:e.computedStyle},[n("label-widget",{attrs:{parameters:e.labelName,settings:(0,I.Z)(e.settings),line:e.line,lineNumber:e.lineNumber,"widget-index":0}}),n("value-widget",{attrs:{parameters:e.parameters,settings:(0,I.Z)(e.settings),line:e.line,lineNumber:e.lineNumber,"widget-index":1}})],1)},E=[],N=(t(1939),t(8995),t(1951),t(5940),t(5794),(0,v.Z)((function e(n,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,f.Z)(this,e),this.keyword=n.keyword,this.parameters=n.parameters,this.filename=n.filename,this.line=n.line,this.lineNumber=n.lineNumber,this.message=t,this.usage=i,this.url=l}))),O={props:{widgetIndex:{type:Number,default:null},parameters:{type:Array,default:function(){return[]}},settings:{type:Array,default:function(){return[]}},line:{type:String,default:""},lineNumber:{type:Number,default:0}},data:function(){return{screen:null}},computed:{computedStyle:function(){var e=this,n={};return this.settings.forEach((function(t){var i=parseInt(t[0]);if(null!==e.widgetIndex){if(e.widgetIndex!==i)return;t=t.slice(1)}e.applySetting(n,t)})),void 0===n["width"]&&(n["flex"]="0 10 100%"),n}},created:function(){var e=this;this.settings.forEach((function(n){"__SCREEN__"===n[0]&&(e.screen=n[1])}))},methods:{applySetting:function(e,n){switch(n[0]){case"TEXTALIGN":e["text-align"]=n[1].toLowerCase()+" !important",e["--text-align"]=n[1].toLowerCase();break;case"PADDING":isNaN(Number(n[1]))||(n[1]+="px"),e["padding"]=n[1]+" !important";break;case"MARGIN":isNaN(Number(n[1]))||(n[1]+="px"),e["margin"]=n[1]+" !important";break;case"BACKCOLOR":e["background-color"]=this.getColor(n.slice(1))+" !important";break;case"TEXTCOLOR":e["color"]=this.getColor(n.slice(1))+" !important";break;case"BORDERCOLOR":e["border-width"]="1px!important",e["border-style"]="solid!important",e["border-color"]=this.getColor(n.slice(1))+" !important";break;case"WIDTH":isNaN(Number(n[1]))||(n[1]+="px"),e["width"]=n[1]+" !important";break;case"HEIGHT":isNaN(Number(n[1]))||(n[1]+="px"),e["height"]=n[1]+" !important";break;case"RAW":e[n[1].toLowerCase()]=n[2]+" !important";break}},verifyNumParams:function(e,n,t){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",l={line:this.line,lineNumber:this.lineNumber,keyword:e,parameters:this.parameters},o=1;o<=n;o++)if(void 0===this.parameters[o-1])throw new N(l,"Not enough parameters for ".concat(e,"."),i,"https://openc3.com/docs/v5");if(t&&void 0===!this.parameters[t])throw new N(l,"Too many parameters for ".concat(e,"."),i,"https://openc3.com/docs/v5")},setWidth:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"120",l=null;if(l=null!==this.widgetIndex?this.settings.find((function(e){return parseInt(e[0])===n.widgetIndex&&"WIDTH"===e[1]})):this.settings.find((function(e){return"WIDTH"===e[0]})),l)return l["WIDTH"];if(e){var o=["WIDTH","".concat(e).concat(t)];return null!==this.widgetIndex&&o.unshift(this.widgetIndex),this.settings.push(o),parseInt(e)}var s=["WIDTH","".concat(i).concat(t)];return null!==this.widgetIndex&&s.unshift(this.widgetIndex),this.settings.push(s),parseInt(i)},setHeight:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"20",l=null;if(l=null!==this.widgetIndex?this.settings.find((function(e){return parseInt(e[0])===n.widgetIndex&&"HEIGHT"===e[1]})):this.settings.find((function(e){return"HEIGHT"===e[0]})),l)return l["HEIGHT"];if(e){var o=["HEIGHT","".concat(e).concat(t)];return null!==this.widgetIndex&&o.unshift(this.widgetIndex),this.settings.push(o),parseInt(e)}var s=["HEIGHT","".concat(i).concat(t)];return null!==this.widgetIndex&&s.unshift(this.widgetIndex),this.settings.push(s),parseInt(i)},getColor:function(e){switch(e.length){case 1:return e[0].toLowerCase();case 3:return"rgb(".concat(e[0],",").concat(e[1],",").concat(e[2],")")}}}},T=function(){var e=this,n=e._self._c;return n("div",{staticClass:"pa-1 mt-1 label",style:[e.cssProps,e.computedStyle],attrs:{"data-test":"label"}},[e._v(" "+e._s(e.labelText)+" ")])},M=[],R={mixins:[O],data:function(){return{fontFamily:null,fontSize:null,fontWeight:"normal",fontStyle:"normal"}},computed:{labelText:function(){return this.parameters[0]},cssProps:function(){var e=null;return this.fontSize&&(e=this.fontSize+"px"),{"--font-family":this.fontFamily,"--font-size":e,"--font-weight":this.fontWeight,"--font-style":this.fontStyle}}},created:function(){this.verifyNumParams("LABEL",1,5,"LABEL <Text> <Font Family> <Font Size> <Font Weight> <Font Style>"),this.parameters[1]&&(this.fontFamily=this.parameters[1]),this.parameters[2]&&(this.fontSize=this.parameters[2]),this.parameters[3]&&(this.fontWeight=this.parameters[3]),this.parameters[4]&&(this.fontStyle=this.parameters[4])}},V=R,D=(t(8489),t(3483)),H=(0,D.Z)(V,T,M,!1,null,"19db816e",null),W=H.exports,Z=function(){var e=this,n=e._self._c;return n("div",{staticClass:"value-widget-container",style:[e.computedStyle,e.aging]},[n("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,l=t.attrs;return[n("v-text-field",e._g(e._b({class:e.valueClass,attrs:{solo:"",dense:"",readonly:"","single-line":"","hide-no-data":"","hide-details":"",placeholder:"Value",value:e._value,"data-test":"value"},on:{contextmenu:e.showContextMenu}},"v-text-field",l,!1),i))]}}])},[n("span",[e._v(e._s(e.fullName))])]),n("v-menu",{attrs:{"position-x":e.x,"position-y":e.y,absolute:"","offset-y":""},model:{value:e.contextMenuShown,callback:function(n){e.contextMenuShown=n},expression:"contextMenuShown"}},[n("v-list",e._l(e.contextMenuOptions,(function(t,i){return n("v-list-item",{key:i,on:{click:function(e){return e.stopPropagation(),t.action.apply(null,arguments)}}},[n("v-list-item-title",[e._v(e._s(t.title))])],1)})),1)],1),n("details-dialog",{attrs:{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2]},model:{value:e.viewDetails,callback:function(n){e.viewDetails=n},expression:"viewDetails"}})],1)},F=[],P=(t(6708),t(131),{mixins:[O],props:{value:{default:null},limitsState:{type:String,default:null},counter:{default:null},formatString:null},data:function(){var e=this;return{curValue:null,prevValue:null,grayLevel:80,grayRate:5,valueId:null,colorBlind:!1,viewDetails:!1,contextMenuShown:!1,x:0,y:0,contextMenuOptions:[{title:"Details",action:function(){e.contextMenuShown=!1,e.viewDetails=!0}},{title:"Graph",action:function(){window.open("/tools/tlmgrapher/"+e.parameters[0]+"/"+e.parameters[1]+"/"+e.parameters[2],"_blank")}}]}},watch:{_counter:function(e,n){this.curValue!==this.prevValue?this.grayLevel=80:(this.grayLevel-=this.grayRate,this.grayLevel<30&&(this.grayLevel=30)),this.prevValue=this.curValue}},computed:{_value:function(){return this.curValue=this.value,null===this.curValue&&(this.screen?this.screen.screenValues[this.valueId]&&(this.curValue=this.screen.screenValues[this.valueId][0]):this.curValue=null),this.curValue=this.formatValue(this.curValue),"true"===localStorage.colorblindMode&&""!==this.limitsLetter?"".concat(this.curValue," (").concat(this.limitsLetter,")"):this.curValue},_counter:function(){var e=this.counter;return null===e&&(this.screen?this.screen.screenValues[this.valueId]&&(e=this.screen.screenValues[this.valueId][2]):e=null),e},valueClass:function(){return"value shrink pa-1 openc3-"+this.limitsColor},limitsColor:function(){var e=this.limitsState;if(null===e&&(this.screen?this.screen.screenValues[this.valueId]&&(e=this.screen.screenValues[this.valueId][1]):e=null),null!=e)switch(e){case"GREEN":case"GREEN_HIGH":case"GREEN_LOW":return"green";case"YELLOW":case"YELLOW_HIGH":case"YELLOW_LOW":return"yellow";case"RED":case"RED_HIGH":case"RED_LOW":return"red";case"BLUE":return"blue";case"STALE":return"purple";default:return"white"}return""},limitsLetter:function(){var e=this.limitsState;if(null===e&&(this.screen?this.screen.screenValues[this.valueId]&&(e=this.screen.screenValues[this.valueId][1]):e=null),null!=e){var n=e.charAt(0);return e.endsWith("_LOW")&&(n=n.toLowerCase()),n}return""}},created:function(){null!==this.value&&null!==this.limitsState||(this.valueId="".concat(this.parameters[0],"__").concat(this.parameters[1],"__").concat(this.parameters[2],"__").concat(this.getType()),this.screen&&this.screen.addItem(this.valueId))},destroyed:function(){null!==this.value&&null!==this.limitsState||this.screen&&this.screen.deleteItem(this.valueId)},methods:{getType:function(){var e="WITH_UNITS";return this.parameters[3]&&(e=this.parameters[3]),e},formatValue:function(e){if(e&&"String"===e["json_class"]&&void 0!==e["raw"]){var n=Array.from(e["raw"].slice(0,32),(function(e){return("0"+(255&e).toString(16)).slice(-2)})).join(" ").toUpperCase();return e["raw"].length>32&&(n+="..."),n}if("Array"===Object.prototype.toString.call(e).slice(8,-1)){for(var t="[",i=0;i<e.length;i++)"String"===Object.prototype.toString.call(e[i]).slice(8,-1)?t+='"'+e[i]+'"':t+=e[i],i!=e.length-1&&(t+=", ");return t+="]",t}return"Object"===Object.prototype.toString.call(e).slice(8,-1)?"":this.formatString&&e?sprintf(this.formatString,e):""+e},showContextMenu:function(e){var n=this;e.preventDefault(),this.contextMenuShown=!1,this.x=e.clientX,this.y=e.clientY,this.$nextTick((function(){n.contextMenuShown=!0}))}}}),$=(t(4115),t(634),function(){var e=this,n=e._self._c;return n("v-dialog",{attrs:{width:"600"},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[n("v-card",[n("v-system-bar",[n("v-spacer"),n("span",[e._v(" Details ")]),n("v-spacer")],1),n("v-card-title",[e._v(" "+e._s(e.targetName)+" "+e._s(e.packetName)+" "+e._s(e.itemName)+" ")]),n("v-card-subtitle",[e._v(e._s(e.details.description))]),n("v-card-text",[n("v-container",{attrs:{fluid:""}},["tlm"===e.type?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Item Values")]),n("v-col"),n("v-container",{staticClass:"ml-5 pa-0",attrs:{fluid:""}},[n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v("Raw Value")]),n("v-col",[e._v(e._s(e.rawValue))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v("Converted Value")]),n("v-col",[e._v(e._s(e.convertedValue))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v("Formatted Value")]),n("v-col",[e._v(e._s(e.formattedValue))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v("With Units Value")]),n("v-col",[e._v(e._s(e.unitsValue))])],1)],1)],1):e._e(),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Bit Offset")]),n("v-col",[e._v(e._s(e.details.bit_offset))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Bit Size")]),n("v-col",[e._v(e._s(e.details.bit_size))])],1),e.details.array_size?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Array Size")]),n("v-col",[e._v(e._s(e.details.array_size))])],1):e._e(),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Data Type")]),n("v-col",[e._v(e._s(e.details.data_type))])],1),"cmd"===e.type?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Minimum")]),n("v-col",[e._v(e._s(e.details.minimum))])],1):e._e(),"cmd"===e.type?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Maximum")]),n("v-col",[e._v(e._s(e.details.maximum))])],1):e._e(),"cmd"===e.type?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Default")]),n("v-col",[e._v(e._s(e.details.default))])],1):e._e(),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Format String")]),n("v-col",[e._v(e._s(e.details.format_string))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Read Conversion")]),e.details.read_conversion?n("v-col",[e._v(" Class: "+e._s(e.details.read_conversion.class)+" "),n("br"),e._v(" Params: "+e._s(e.details.read_conversion.params)+" ")]):n("v-col")],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Write Conversion")]),e.details.write_conversion?n("v-col",[e._v(" Class: "+e._s(e.details.write_conversion.class)+" "),n("br"),e._v(" Params: "+e._s(e.details.write_conversion.params)+" ")]):n("v-col")],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Id Value")]),n("v-col",[e._v(e._s(e.details.id_value))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Units Full")]),n("v-col",[e._v(e._s(e.details.units_full))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Units Abbr")]),n("v-col",[e._v(e._s(e.details.units))])],1),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Endianness")]),n("v-col",[e._v(e._s(e.details.endianness))])],1),e.details.states?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("States")]),n("v-col"),n("v-container",{staticClass:"ml-5 pa-0",attrs:{fluid:""}},e._l(e.details.states,(function(t,i){return n("v-row",{key:i,attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v(e._s(i))]),n("v-col",[e._v(e._s(t.value))])],1)})),1)],1):n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("States")]),n("v-col",[e._v("None")])],1),e.details.limits?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Limits")]),n("v-col"),n("v-container",{staticClass:"ml-5 pa-0",attrs:{fluid:""}},e._l(e.details.limits,(function(t,i){return n("v-row",{key:i,attrs:{"no-gutters":""}},["enabled"===i?n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v("Enabled")]):e._e(),"enabled"===i?n("v-switch",{attrs:{dense:"","hide-details":""},on:{change:e.changeLimitsEnabled},model:{value:e.details.limits.enabled,callback:function(n){e.$set(e.details.limits,"enabled",n)},expression:"details.limits.enabled"}}):e._e(),"enabled"!==i?n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v(e._s(i))]):e._e(),"enabled"!==i?n("div",[e._v(e._s(e.formatLimit(t)))]):e._e(),n("v-col")],1)})),1)],1):n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Limits")]),n("v-col",[e._v("None")])],1),e.details.meta?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Meta")]),n("v-col"),n("v-container",{staticClass:"ml-5 pa-0",attrs:{fluid:""}},e._l(e.details.meta,(function(t,i){return n("v-row",{key:i,attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"4"}},[e._v(e._s(i))]),n("v-col",[e._v(e._s(t))])],1)})),1)],1):n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"label",attrs:{cols:"3"}},[e._v("Meta")]),n("v-col",[e._v("None")])],1)],1)],1)],1)],1)}),G=[],K={props:{type:{default:"tlm",validator:function(e){return-1!==["cmd","tlm"].indexOf(e)}},targetName:String,packetName:String,itemName:String,value:Boolean},data:function(){return{details:Object,updater:null,rawValue:null,convertedValue:null,formattedValue:null,unitsValue:null}},computed:{show:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},created:function(){this.api=new x},beforeDestroy:function(){clearInterval(this.updater),this.updater=null},watch:{value:function(e,n){var t=this;e?(this.requestDetails(),"tlm"===this.type&&(this.updater=setInterval((function(){t.api.get_tlm_values(["".concat(t.targetName,"__").concat(t.packetName,"__").concat(t.itemName,"__RAW"),"".concat(t.targetName,"__").concat(t.packetName,"__").concat(t.itemName,"__CONVERTED"),"".concat(t.targetName,"__").concat(t.packetName,"__").concat(t.itemName,"__FORMATTED"),"".concat(t.targetName,"__").concat(t.packetName,"__").concat(t.itemName,"__WITH_UNITS")]).then((function(e){for(var n=0;n<e.length;n++){var i=null;if("String"===e[n][0]["json_class"]&&void 0!==e[n][0]["raw"]?i=e[n][0]["raw"]:"BLOCK"===t.details.data_type&&(i=e[n][0]),null!==i){i=i.slice(0,parseInt(t.details.bit_size)/8);var l=!1;i.length>64&&(l=!0),e[n][0]=Array.from(i.slice(0,64),(function(e){return("0"+(255&e).toString(16)).slice(-2)})).join(" ").toUpperCase(),l&&(e[n][0]+="...")}}t.rawValue=e[0][0],t.convertedValue=e[1][0],t.formattedValue=e[2][0],t.unitsValue=e[3][0]}))}),1e3))):(clearInterval(this.updater),this.updater=null)}},methods:{requestDetails:function(){var e=this;return(0,h.Z)((0,d.Z)().mark((function n(){return(0,d.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if("tlm"!==e.type){n.next=5;break}return n.next=3,e.api.get_item(e.targetName,e.packetName,e.itemName).then((function(n){if(e.details=n,n.limits){var t=!1;n.limits.enabled&&(t=!0,delete n.limits.enabled),e.details.limits=(0,A.Z)({enabled:t},n.limits)}}));case 3:n.next=7;break;case 5:return n.next=7,e.api.get_parameter(e.targetName,e.packetName,e.itemName).then((function(n){e.details=n}));case 7:case"end":return n.stop()}}),n)})))()},changeLimitsEnabled:function(){var e=this;return(0,h.Z)((0,d.Z)().mark((function n(){return(0,d.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!e.details.limits.enabled){n.next=5;break}return n.next=3,e.api.enable_limits(e.targetName,e.packetName,e.itemName);case 3:n.next=7;break;case 5:return n.next=7,e.api.disable_limits(e.targetName,e.packetName,e.itemName);case 7:case"end":return n.stop()}}),n)})))()},formatLimit:function(e){return e.green_low?"RL/"+e.red_low+" YL/"+e.yellow_low+" YH/"+e.yellow_high+" RH/"+e.red_high+" GL/"+e.green_low+" GH/"+e.green_high:e.red_low?"RL/"+e.red_low+" YL/"+e.yellow_low+" YH/"+e.yellow_high+" RH/"+e.red_high:e}}},U=K,B=(t(3270),(0,D.Z)(U,$,G,!1,null,"1e0f0ab0",null)),Y=B.exports,j=4,z={components:{DetailsDialog:Y},mixins:[P],data:function(){return{width:12+j}},computed:{fullName:function(){return this.parameters[0]+" "+this.parameters[1]+" "+this.parameters[2]},aging:function(){return{"--aging":this.grayLevel}}},created:function(){this.verifyNumParams("VALUE",3,3,"VALUE <TARGET> <PACKET> <ITEM>"),this.setWidth(parseInt(this.parameters[4])+j,"ch",this.width)}},q=z,J=(t(19),(0,D.Z)(q,Z,F,!1,null,"2750a386",null)),X=J.exports,Q={mixins:[O],components:{LabelWidget:W,ValueWidget:X},computed:{labelName:function(){return[this.parameters[2]+":"]}}},ee=Q,ne=(0,D.Z)(ee,L,E,!1,null,null,null),te=ne.exports,ie=function(){var e=this,n=e._self._c;return n("div",{ref:"container",staticClass:"d-flex flex-row",style:e.computedStyle},[n("labelvalue-widget",{attrs:{parameters:e.parameters,settings:e.labelValueSettings}}),n("limitsbar-widget",{attrs:{parameters:e.limitsBarParameters,settings:(0,I.Z)(e.settings),"widget-index":2}})],1)},le=[],oe=(t(5342),function(){var e=this,n=e._self._c;return n("div",{staticClass:"limitsbar",style:[e.cssProps,e.computedStyle]},[e._m(0)])}),se=[function(){var e=this,n=e._self._c;return n("div",{staticClass:"limitsbar__container"},[n("div",{staticClass:"limitsbar__redlow"}),n("div",{staticClass:"limitsbar__redhigh"}),n("div",{staticClass:"limitsbar__yellowlow"}),n("div",{staticClass:"limitsbar__yellowhigh"}),n("div",{staticClass:"limitsbar__greenlow"}),n("div",{staticClass:"limitsbar__greenhigh"}),n("div",{staticClass:"limitsbar__blue"}),n("div",{staticClass:"limitsbar__line"}),n("div",{staticClass:"limitsbar__arrow"})])}],ae="DEFAULT",ce={mixins:[O],data:function(){return{width:160,height:22,minValue:null,maxValue:null,scale:0,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:ae,currentSetRefreshInterval:null}},computed:{cssProps:function(){var e=null;this.screen&&(e=this.screen.screenValues[this.valueId][0]);var n=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(n),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(e,n)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:ae}},created:function(){var e=this;this.api=new x,this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then((function(n){e.limitsSettings=n})),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.settings.forEach((function(n){"MIN_VALUE"===n[0]&&(e.minValue=parseInt(n[1])),"MAX_VALUE"===n[0]&&(e.maxValue=parseInt(n[1]))})),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height);var n="CONVERTED";this.parameters[3]&&(n=this.parameters[3]),this.valueId="".concat(this.parameters[0],"__").concat(this.parameters[1],"__").concat(this.parameters[2],"__").concat(n),this.screen&&this.screen.addItem(this.valueId)},destroyed:function(){this.screen&&this.screen.deleteItem(this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits:function(e){this.redLow=10,this.redHigh=10,this.minValue&&(e[0]<=this.minValue&&(e[0]=this.minValue,this.redLow=0),e[1]<=this.minValue&&(e[1]=this.minValue),e[2]<=this.minValue&&(e[2]=this.minValue),e[3]<=this.minValue&&(e[3]=this.minValue),e.length>4&&e[4]<=this.minValue&&(e[4]=this.minValue),e.length>4&&e[5]<=this.minValue&&(e[5]=this.minValue)),this.maxValue&&(e[0]>=this.maxValue&&(e[0]=this.maxValue),e[1]>=this.maxValue&&(e[1]=this.maxValue),e[2]>=this.maxValue&&(e[2]=this.maxValue),e[3]>=this.maxValue&&(e[3]=this.maxValue,this.redHigh=0),e.length>4&&e[4]>=this.maxValue&&(e[4]=this.maxValue),e.length>4&&e[5]>=this.maxValue&&(e[5]=this.maxValue)),e[0]==e[1]&&(this.yellowLow=0),e[2]==e[3]&&(this.yellowHigh=0);var n=80;return 0==this.redLow&&(n+=10),0==this.redHigh&&(n+=10),this.scale=(e[3]-e[0])/n,e},calcPosition:function(e,n){if(null!=e&&n){var t=n[0]-10*this.scale;this.minValue&&this.minValue==n[0]&&(t=n[0]);n[3],this.scale;if(this.maxValue&&this.maxValue==n[3]&&n[3],e.raw)return"-Infinity"===e.raw?0:100;if(e<this.min)return 0;if(e>this.max)return 100;var i=parseInt((e-t)/this.scale);return i>100?100:i<0?0:i}},calcLimits:function(e){e&&(this.yellowLow=Math.round((e[1]-e[0])/this.scale),this.yellowHigh=Math.round((e[3]-e[2])/this.scale),e.length>4?(this.greenLow=Math.round((e[4]-e[1])/this.scale),this.greenHigh=Math.round((e[2]-e[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){var e=this;this.api.get_limits_set().then((function(n){e.currentLimitsSet=n}))}}},re=ce,ue=(t(9731),(0,D.Z)(re,oe,se,!1,null,"344f6330",null)),me=ue.exports,de={mixins:[O],components:{LabelvalueWidget:te,LimitsbarWidget:me},computed:{labelValueSettings:function(){return[].concat((0,I.Z)(this.settings.filter((function(e){return"__SCREEN__"===e[0]}))),(0,I.Z)(this.settings.filter((function(e){return 0===parseInt(e[0])||1===parseInt(e[0])}))))},limitsBarParameters:function(){return[this.parameters[0],this.parameters[1],this.parameters[2],"CONVERTED"]}}},Ae=de,he=(0,D.Z)(Ae,ie,le,!1,null,null,null),fe=he.exports;function ve(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsControl.vue",n="8119b8bdef11ca4d96cf611cbaf0e1f2c2ce616c",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsControl.vue",statementMap:{0:{start:{line:16,column:21},end:{line:16,column:23}},1:{start:{line:20,column:4},end:{line:38,column:5}},2:{start:{line:42,column:6},end:{line:46,column:7}},3:{start:{line:43,column:8},end:{line:43,column:61}},4:{start:{line:45,column:8},end:{line:45,column:17}},5:{start:{line:49,column:6},end:{line:53,column:7}},6:{start:{line:50,column:8},end:{line:50,column:32}},7:{start:{line:52,column:8},end:{line:52,column:58}},8:{start:{line:56,column:6},end:{line:56,column:61}},9:{start:{line:56,column:37},end:{line:56,column:60}},10:{start:{line:60,column:4},end:{line:60,column:30}},11:{start:{line:62,column:4},end:{line:70,column:5}},12:{start:{line:63,column:6},end:{line:69,column:7}},13:{start:{line:65,column:8},end:{line:65,column:35}},14:{start:{line:68,column:8},end:{line:68,column:37}},15:{start:{line:71,column:4},end:{line:71,column:28}},16:{start:{line:73,column:4},end:{line:82,column:8}},17:{start:{line:76,column:10},end:{line:76,column:33}},18:{start:{line:77,column:10},end:{line:77,column:37}},19:{start:{line:81,column:8},end:{line:81,column:52}},20:{start:{line:83,column:4},end:{line:93,column:8}},21:{start:{line:86,column:10},end:{line:86,column:33}},22:{start:{line:87,column:25},end:{line:87,column:41}},23:{start:{line:88,column:10},end:{line:88,column:41}},24:{start:{line:92,column:8},end:{line:92,column:52}},25:{start:{line:96,column:4},end:{line:98,column:12}},26:{start:{line:97,column:6},end:{line:97,column:19}},27:{start:{line:101,column:4},end:{line:104,column:5}},28:{start:{line:102,column:6},end:{line:102,column:33}},29:{start:{line:103,column:6},end:{line:103,column:25}},30:{start:{line:105,column:4},end:{line:107,column:5}},31:{start:{line:106,column:6},end:{line:106,column:43}},32:{start:{line:108,column:4},end:{line:110,column:5}},33:{start:{line:109,column:6},end:{line:109,column:43}},34:{start:{line:111,column:4},end:{line:111,column:27}},35:{start:{line:115,column:6},end:{line:115,column:21}},36:{start:{line:116,column:6},end:{line:116,column:24}},37:{start:{line:118,column:6},end:{line:145,column:8}},38:{start:{line:119,column:8},end:{line:143,column:9}},39:{start:{line:120,column:25},end:{line:120,column:40}},40:{start:{line:122,column:10},end:{line:124,column:11}},41:{start:{line:122,column:45},end:{line:122,column:71}},42:{start:{line:123,column:12},end:{line:123,column:20}},43:{start:{line:126,column:10},end:{line:126,column:38}},44:{start:{line:127,column:25},end:{line:130,column:11}},45:{start:{line:131,column:10},end:{line:133,column:11}},46:{start:{line:132,column:12},end:{line:132,column:40}},47:{start:{line:134,column:10},end:{line:136,column:11}},48:{start:{line:135,column:12},end:{line:135,column:37}},49:{start:{line:137,column:10},end:{line:141,column:11}},50:{start:{line:138,column:12},end:{line:138,column:38}},51:{start:{line:140,column:12},end:{line:140,column:37}},52:{start:{line:142,column:10},end:{line:142,column:35}},53:{start:{line:144,column:8},end:{line:144,column:31}},54:{start:{line:148,column:20},end:{line:148,column:27}},55:{start:{line:149,column:6},end:{line:161,column:7}},56:{start:{line:150,column:8},end:{line:152,column:9}},57:{start:{line:150,column:43},end:{line:150,column:65}},58:{start:{line:151,column:10},end:{line:151,column:18}},59:{start:{line:154,column:8},end:{line:156,column:9}},60:{start:{line:155,column:10},end:{line:155,column:28}},61:{start:{line:157,column:8},end:{line:160,column:9}},62:{start:{line:158,column:10},end:{line:158,column:25}},63:{start:{line:159,column:10},end:{line:159,column:15}},64:{start:{line:162,column:6},end:{line:162,column:33}},65:{start:{line:165,column:50},end:{line:165,column:66}},66:{start:{line:166,column:23},end:{line:166,column:55}},67:{start:{line:167,column:6},end:{line:167,column:35}},68:{start:{line:168,column:6},end:{line:168,column:38}},69:{start:{line:170,column:6},end:{line:178,column:7}},70:{start:{line:171,column:20},end:{line:171,column:80}},71:{start:{line:171,column:54},end:{line:171,column:79}},72:{start:{line:172,column:8},end:{line:177,column:9}},73:{start:{line:173,column:10},end:{line:173,column:15}},74:{start:{line:175,column:27},end:{line:175,column:65}},75:{start:{line:176,column:10},end:{line:176,column:72}},76:{start:{line:179,column:6},end:{line:179,column:29}},77:{start:{line:182,column:6},end:{line:182,column:29}},78:{start:{line:183,column:6},end:{line:183,column:38}},79:{start:{line:184,column:6},end:{line:184,column:27}},80:{start:{line:185,column:6},end:{line:185,column:29}},81:{start:{line:188,column:6},end:{line:188,column:35}},82:{start:{line:189,column:6},end:{line:189,column:26}},83:{start:{line:190,column:6},end:{line:190,column:30}},84:{start:{line:193,column:20},end:{line:195,column:7}},85:{start:{line:194,column:8},end:{line:194,column:32}},86:{start:{line:196,column:6},end:{line:196,column:33}},87:{start:{line:197,column:6},end:{line:197,column:36}},88:{start:{line:200,column:6},end:{line:200,column:39}},89:{start:{line:203,column:6},end:{line:208,column:7}},90:{start:{line:205,column:8},end:{line:207,column:9}},91:{start:{line:206,column:10},end:{line:206,column:34}},92:{start:{line:211,column:6},end:{line:263,column:7}},93:{start:{line:212,column:8},end:{line:212,column:46}},94:{start:{line:216,column:8},end:{line:218,column:9}},95:{start:{line:217,column:10},end:{line:217,column:18}},96:{start:{line:220,column:23},end:{line:220,column:93}},97:{start:{line:221,column:22},end:{line:223,column:9}},98:{start:{line:222,column:10},end:{line:222,column:38}},99:{start:{line:225,column:8},end:{line:229,column:9}},100:{start:{line:226,column:10},end:{line:226,column:75}},101:{start:{line:227,column:10},end:{line:227,column:33}},102:{start:{line:228,column:10},end:{line:228,column:18}},103:{start:{line:231,column:8},end:{line:233,column:9}},104:{start:{line:231,column:43},end:{line:231,column:69}},105:{start:{line:232,column:10},end:{line:232,column:18}},106:{start:{line:235,column:8},end:{line:243,column:9}},107:{start:{line:242,column:10},end:{line:242,column:18}},108:{start:{line:244,column:23},end:{line:251,column:9}},109:{start:{line:252,column:8},end:{line:259,column:9}},110:{start:{line:256,column:10},end:{line:256,column:36}},111:{start:{line:258,column:10},end:{line:258,column:35}},112:{start:{line:260,column:8},end:{line:260,column:70}},113:{start:{line:261,column:8},end:{line:261,column:33}},114:{start:{line:262,column:8},end:{line:262,column:31}},115:{start:{line:266,column:6},end:{line:270,column:7}},116:{start:{line:267,column:8},end:{line:269,column:10}},117:{start:{line:268,column:10},end:{line:268,column:33}},118:{start:{line:273,column:6},end:{line:273,column:29}},119:{start:{line:274,column:6},end:{line:277,column:7}},120:{start:{line:274,column:19},end:{line:274,column:20}},121:{start:{line:275,column:8},end:{line:275,column:42}},122:{start:{line:276,column:8},end:{line:276,column:66}},123:{start:{line:280,column:6},end:{line:280,column:36}},124:{start:{line:281,column:6},end:{line:281,column:58}},125:{start:{line:284,column:18},end:{line:284,column:51}},126:{start:{line:285,column:6},end:{line:285,column:39}},127:{start:{line:290,column:6},end:{line:290,column:36}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:16,column:15},end:{line:16,column:16}},loc:{start:{line:16,column:21},end:{line:16,column:23}},line:16},1:{name:"(anonymous_1)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:9},end:{line:39,column:3}},line:19},2:{name:"(anonymous_2)",decl:{start:{line:41,column:4},end:{line:41,column:5}},loc:{start:{line:41,column:21},end:{line:47,column:5}},line:41},3:{name:"(anonymous_3)",decl:{start:{line:48,column:4},end:{line:48,column:5}},loc:{start:{line:48,column:28},end:{line:54,column:5}},line:48},4:{name:"(anonymous_4)",decl:{start:{line:55,column:4},end:{line:55,column:5}},loc:{start:{line:55,column:23},end:{line:57,column:5}},line:55},5:{name:"(anonymous_5)",decl:{start:{line:56,column:30},end:{line:56,column:31}},loc:{start:{line:56,column:37},end:{line:56,column:60}},line:56},6:{name:"(anonymous_6)",decl:{start:{line:59,column:2},end:{line:59,column:3}},loc:{start:{line:59,column:12},end:{line:94,column:3}},line:59},7:{name:"(anonymous_7)",decl:{start:{line:75,column:18},end:{line:75,column:19}},loc:{start:{line:75,column:30},end:{line:78,column:9}},line:75},8:{name:"(anonymous_8)",decl:{start:{line:80,column:12},end:{line:80,column:13}},loc:{start:{line:80,column:36},end:{line:82,column:7}},line:80},9:{name:"(anonymous_9)",decl:{start:{line:85,column:18},end:{line:85,column:19}},loc:{start:{line:85,column:28},end:{line:89,column:9}},line:85},10:{name:"(anonymous_10)",decl:{start:{line:91,column:12},end:{line:91,column:13}},loc:{start:{line:91,column:36},end:{line:93,column:7}},line:91},11:{name:"(anonymous_11)",decl:{start:{line:95,column:2},end:{line:95,column:3}},loc:{start:{line:95,column:12},end:{line:99,column:3}},line:95},12:{name:"(anonymous_12)",decl:{start:{line:96,column:31},end:{line:96,column:32}},loc:{start:{line:96,column:37},end:{line:98,column:5}},line:96},13:{name:"(anonymous_13)",decl:{start:{line:100,column:2},end:{line:100,column:3}},loc:{start:{line:100,column:14},end:{line:112,column:3}},line:100},14:{name:"(anonymous_14)",decl:{start:{line:114,column:4},end:{line:114,column:5}},loc:{start:{line:114,column:24},end:{line:146,column:5}},line:114},15:{name:"(anonymous_15)",decl:{start:{line:118,column:40},end:{line:118,column:41}},loc:{start:{line:118,column:51},end:{line:145,column:7}},line:118},16:{name:"(anonymous_16)",decl:{start:{line:122,column:32},end:{line:122,column:33}},loc:{start:{line:122,column:45},end:{line:122,column:71}},line:122},17:{name:"(anonymous_17)",decl:{start:{line:147,column:4},end:{line:147,column:5}},loc:{start:{line:147,column:23},end:{line:163,column:5}},line:147},18:{name:"(anonymous_18)",decl:{start:{line:150,column:30},end:{line:150,column:31}},loc:{start:{line:150,column:43},end:{line:150,column:65}},line:150},19:{name:"(anonymous_19)",decl:{start:{line:164,column:4},end:{line:164,column:5}},loc:{start:{line:164,column:33},end:{line:180,column:5}},line:164},20:{name:"(anonymous_20)",decl:{start:{line:171,column:44},end:{line:171,column:45}},loc:{start:{line:171,column:54},end:{line:171,column:79}},line:171},21:{name:"(anonymous_21)",decl:{start:{line:181,column:4},end:{line:181,column:5}},loc:{start:{line:181,column:31},end:{line:186,column:5}},line:181},22:{name:"(anonymous_22)",decl:{start:{line:187,column:4},end:{line:187,column:5}},loc:{start:{line:187,column:29},end:{line:191,column:5}},line:187},23:{name:"(anonymous_23)",decl:{start:{line:192,column:4},end:{line:192,column:5}},loc:{start:{line:192,column:21},end:{line:198,column:5}},line:192},24:{name:"(anonymous_24)",decl:{start:{line:193,column:44},end:{line:193,column:45}},loc:{start:{line:194,column:8},end:{line:194,column:32}},line:194},25:{name:"(anonymous_25)",decl:{start:{line:199,column:4},end:{line:199,column:5}},loc:{start:{line:199,column:20},end:{line:201,column:5}},line:199},26:{name:"(anonymous_26)",decl:{start:{line:202,column:4},end:{line:202,column:5}},loc:{start:{line:202,column:31},end:{line:209,column:5}},line:202},27:{name:"(anonymous_27)",decl:{start:{line:210,column:4},end:{line:210,column:5}},loc:{start:{line:210,column:29},end:{line:264,column:5}},line:210},28:{name:"(anonymous_28)",decl:{start:{line:221,column:46},end:{line:221,column:47}},loc:{start:{line:222,column:10},end:{line:222,column:38}},line:222},29:{name:"(anonymous_29)",decl:{start:{line:231,column:30},end:{line:231,column:31}},loc:{start:{line:231,column:43},end:{line:231,column:69}},line:231},30:{name:"(anonymous_30)",decl:{start:{line:265,column:4},end:{line:265,column:5}},loc:{start:{line:265,column:13},end:{line:271,column:5}},line:265},31:{name:"(anonymous_31)",decl:{start:{line:267,column:55},end:{line:267,column:56}},loc:{start:{line:267,column:65},end:{line:269,column:9}},line:267},32:{name:"(anonymous_32)",decl:{start:{line:272,column:18},end:{line:272,column:19}},loc:{start:{line:272,column:36},end:{line:278,column:5}},line:272},33:{name:"(anonymous_33)",decl:{start:{line:279,column:13},end:{line:279,column:14}},loc:{start:{line:279,column:32},end:{line:282,column:5}},line:279},34:{name:"(anonymous_34)",decl:{start:{line:283,column:16},end:{line:283,column:17}},loc:{start:{line:283,column:35},end:{line:286,column:5}},line:283},35:{name:"(anonymous_35)",decl:{start:{line:289,column:4},end:{line:289,column:5}},loc:{start:{line:289,column:18},end:{line:291,column:5}},line:289}},branchMap:{0:{loc:{start:{line:42,column:6},end:{line:46,column:7}},type:"if",locations:[{start:{line:42,column:6},end:{line:46,column:7}},{start:{line:44,column:13},end:{line:46,column:7}}],line:42},1:{loc:{start:{line:49,column:6},end:{line:53,column:7}},type:"if",locations:[{start:{line:49,column:6},end:{line:53,column:7}},{start:{line:51,column:13},end:{line:53,column:7}}],line:49},2:{loc:{start:{line:63,column:6},end:{line:69,column:7}},type:"if",locations:[{start:{line:63,column:6},end:{line:69,column:7}},{start:{line:66,column:13},end:{line:69,column:7}}],line:63},3:{loc:{start:{line:101,column:4},end:{line:104,column:5}},type:"if",locations:[{start:{line:101,column:4},end:{line:104,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:101},4:{loc:{start:{line:105,column:4},end:{line:107,column:5}},type:"if",locations:[{start:{line:105,column:4},end:{line:107,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:105},5:{loc:{start:{line:108,column:4},end:{line:110,column:5}},type:"if",locations:[{start:{line:108,column:4},end:{line:110,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:108},6:{loc:{start:{line:122,column:10},end:{line:124,column:11}},type:"if",locations:[{start:{line:122,column:10},end:{line:124,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:122},7:{loc:{start:{line:131,column:10},end:{line:133,column:11}},type:"if",locations:[{start:{line:131,column:10},end:{line:133,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:131},8:{loc:{start:{line:131,column:14},end:{line:131,column:71}},type:"binary-expr",locations:[{start:{line:131,column:14},end:{line:131,column:40}},{start:{line:131,column:44},end:{line:131,column:71}}],line:131},9:{loc:{start:{line:134,column:10},end:{line:136,column:11}},type:"if",locations:[{start:{line:134,column:10},end:{line:136,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:134},10:{loc:{start:{line:137,column:10},end:{line:141,column:11}},type:"if",locations:[{start:{line:137,column:10},end:{line:141,column:11}},{start:{line:139,column:17},end:{line:141,column:11}}],line:137},11:{loc:{start:{line:137,column:14},end:{line:137,column:53}},type:"binary-expr",locations:[{start:{line:137,column:14},end:{line:137,column:33}},{start:{line:137,column:37},end:{line:137,column:53}}],line:137},12:{loc:{start:{line:150,column:8},end:{line:152,column:9}},type:"if",locations:[{start:{line:150,column:8},end:{line:152,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:150},13:{loc:{start:{line:154,column:8},end:{line:156,column:9}},type:"if",locations:[{start:{line:154,column:8},end:{line:156,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:154},14:{loc:{start:{line:154,column:12},end:{line:154,column:56}},type:"binary-expr",locations:[{start:{line:154,column:12},end:{line:154,column:35}},{start:{line:154,column:39},end:{line:154,column:56}}],line:154},15:{loc:{start:{line:157,column:8},end:{line:160,column:9}},type:"if",locations:[{start:{line:157,column:8},end:{line:160,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:157},16:{loc:{start:{line:168,column:6},end:{line:168,column:38}},type:"binary-expr",locations:[{start:{line:168,column:6},end:{line:168,column:14}},{start:{line:168,column:18},end:{line:168,column:38}}],line:168},17:{loc:{start:{line:172,column:8},end:{line:177,column:9}},type:"if",locations:[{start:{line:172,column:8},end:{line:177,column:9}},{start:{line:174,column:15},end:{line:177,column:9}}],line:172},18:{loc:{start:{line:183,column:6},end:{line:183,column:38}},type:"binary-expr",locations:[{start:{line:183,column:6},end:{line:183,column:14}},{start:{line:183,column:18},end:{line:183,column:38}}],line:183},19:{loc:{start:{line:205,column:8},end:{line:207,column:9}},type:"if",locations:[{start:{line:205,column:8},end:{line:207,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:205},20:{loc:{start:{line:205,column:12},end:{line:205,column:69}},type:"binary-expr",locations:[{start:{line:205,column:12},end:{line:205,column:39}},{start:{line:205,column:43},end:{line:205,column:69}}],line:205},21:{loc:{start:{line:216,column:8},end:{line:218,column:9}},type:"if",locations:[{start:{line:216,column:8},end:{line:218,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:216},22:{loc:{start:{line:225,column:8},end:{line:229,column:9}},type:"if",locations:[{start:{line:225,column:8},end:{line:229,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:225},23:{loc:{start:{line:231,column:8},end:{line:233,column:9}},type:"if",locations:[{start:{line:231,column:8},end:{line:233,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:231},24:{loc:{start:{line:235,column:8},end:{line:243,column:9}},type:"if",locations:[{start:{line:235,column:8},end:{line:243,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:235},25:{loc:{start:{line:236,column:10},end:{line:240,column:11}},type:"binary-expr",locations:[{start:{line:236,column:10},end:{line:236,column:34}},{start:{line:237,column:10},end:{line:240,column:11}}],line:236},26:{loc:{start:{line:238,column:12},end:{line:239,column:52}},type:"binary-expr",locations:[{start:{line:238,column:12},end:{line:238,column:55}},{start:{line:239,column:12},end:{line:239,column:52}}],line:238},27:{loc:{start:{line:252,column:8},end:{line:259,column:9}},type:"if",locations:[{start:{line:252,column:8},end:{line:259,column:9}},{start:{line:257,column:15},end:{line:259,column:9}}],line:252},28:{loc:{start:{line:253,column:10},end:{line:254,column:43}},type:"binary-expr",locations:[{start:{line:253,column:10},end:{line:253,column:46}},{start:{line:254,column:10},end:{line:254,column:43}}],line:253},29:{loc:{start:{line:266,column:6},end:{line:270,column:7}},type:"if",locations:[{start:{line:266,column:6},end:{line:270,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:266}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0,116:0,117:0,118:0,119:0,120:0,121:0,122:0,123:0,124:0,125:0,126:0,127:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0],27:[0,0],28:[0,0],29:[0,0]},inputSourceMap:{version:3,sources:["LimitsControl.vue"],names:[],mappings:";AA4IA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA",file:"LimitsControl.vue",sourceRoot:"src/tools/LimitsMonitor",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <div class=\"pa-3\">\n <v-row no-gutters>\n <v-text-field\n dense\n outlined\n readonly\n label=\"Overall Limits State\"\n :value=\"overallStateFormatted\"\n :class=\"textFieldClass\"\n data-test=\"overall-state\"\n />\n </v-row>\n\n <div v-for=\"(item, index) in items\" :key=\"item.key\">\n <v-row data-test=\"limits-row\" class=\"my-0 ml-1 mr-1\">\n <labelvaluelimitsbar-widget\n v-if=\"item.limits\"\n :parameters=\"item.parameters\"\n :settings=\"widgetSettings\"\n />\n <labelvalue-widget\n v-else\n :parameters=\"item.parameters\"\n :settings=\"widgetSettings\"\n />\n <v-spacer />\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-btn\n icon\n class=\"mr-2\"\n @click=\"ignorePacket(item.key)\"\n v-bind=\"attrs\"\n v-on=\"on\"\n >\n <v-icon> mdi-close-circle-multiple </v-icon>\n </v-btn>\n </template>\n <span>Ignore Entire Packet</span>\n </v-tooltip>\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-btn\n icon\n class=\"mr-2\"\n @click=\"ignoreItem(item.key)\"\n v-bind=\"attrs\"\n v-on=\"on\"\n >\n <v-icon> mdi-close-circle </v-icon>\n </v-btn>\n </template>\n <span>Ignore Item</span>\n </v-tooltip>\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-btn\n icon\n class=\"mr-2\"\n @click=\"removeItem(item.key)\"\n v-bind=\"attrs\"\n v-on=\"on\"\n >\n <v-icon> mdi-eye-off </v-icon>\n </v-btn>\n </template>\n <span>Temporarily Hide Item</span>\n </v-tooltip>\n </v-row>\n <v-divider v-if=\"index < items.length - 1\" :key=\"index\" />\n </div>\n <v-dialog v-model=\"ignoredItemsDialog\" max-width=\"600\">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span>Ignored Items</span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <div class=\"my-2\">\n <div v-for=\"(item, index) in ignoredFormatted\" :key=\"index\">\n <v-row class=\"ma-1\">\n <span class=\"font-weight-black\"> {{ item }} </span>\n <v-spacer />\n <v-btn\n @click=\"restoreItem(item, index)\"\n small\n icon\n :data-test=\"`remove-ignore-${index}`\"\n >\n <v-icon> mdi-delete </v-icon>\n </v-btn>\n </v-row>\n <v-divider\n v-if=\"index < ignoredFormatted.length - 1\"\n :key=\"index\"\n />\n </div>\n <v-row class=\"mt-2\">\n <v-spacer />\n <v-btn\n @click=\"ignoredItemsDialog = false\"\n class=\"mx-2\"\n color=\"primary\"\n >\n Ok\n </v-btn>\n </v-row>\n <v-divider v-if=\"index < items.length - 1\" :key=\"index\" />\n </div>\n </v-card-text>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { OpenC3Api } from '@openc3/tool-common/src/services/openc3-api'\nimport Cable from '@openc3/tool-common/src/services/cable.js'\nimport LabelvalueWidget from '@openc3/tool-common/src/components/widgets/LabelvalueWidget'\nimport LabelvaluelimitsbarWidget from '@openc3/tool-common/src/components/widgets/LabelvaluelimitsbarWidget'\nimport Vue from 'vue'\n\nexport default {\n components: {\n LabelvalueWidget,\n LabelvaluelimitsbarWidget,\n },\n props: {\n value: {\n type: Array,\n default: () => [],\n },\n },\n data() {\n return {\n api: null,\n cable: new Cable(),\n ignored: [],\n ignoredItemsDialog: false,\n overallState: 'GREEN',\n items: [],\n itemList: [],\n screenItems: [],\n screenValues: {},\n updateCounter: 0,\n widgetSettings: [\n ['WIDTH', '520px'], // Total of three subwidgets\n ['0', 'WIDTH', '180px'],\n ['1', 'WIDTH', '180px'],\n ['2', 'WIDTH', '160px'],\n ['__SCREEN__', this],\n ],\n }\n },\n computed: {\n textFieldClass() {\n if (this.overallState) {\n return `textfield-${this.overallState.toLowerCase()}`\n } else {\n return ''\n }\n },\n overallStateFormatted() {\n if (this.ignored.length === 0) {\n return this.overallState\n } else {\n return `${this.overallState} (Some items ignored)`\n }\n },\n ignoredFormatted() {\n return this.ignored.map((x) => x.split('__').join(' '))\n },\n },\n created() {\n this.api = new OpenC3Api()\n // Value is passed in as the list of ignored items\n for (let item of this.value) {\n if (item.match(/.+__.+__.+/)) {\n // TARGET__PACKET__ITEM\n this.ignoreItem(item, true)\n } else {\n // TARGET__PACKET\n this.ignorePacket(item, true)\n }\n }\n this.updateOutOfLimits()\n\n this.cable\n .createSubscription('LimitsEventsChannel', window.openc3Scope, {\n received: (parsed) => {\n this.cable.recordPing()\n this.handleMessages(parsed)\n },\n })\n .then((limitsSubscription) => {\n this.limitsSubscription = limitsSubscription\n })\n this.cable\n .createSubscription('ConfigEventsChannel', window.openc3Scope, {\n received: (data) => {\n this.cable.recordPing()\n const parsed = JSON.parse(data)\n this.handleConfigEvents(parsed)\n },\n })\n .then((configSubscription) => {\n this.configSubscription = configSubscription\n })\n },\n mounted() {\n this.updater = setInterval(() => {\n this.update()\n }, 1000)\n },\n destroyed() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n if (this.limitsSubscription) {\n this.limitsSubscription.unsubscribe()\n }\n if (this.configSubscription) {\n this.configSubscription.unsubscribe()\n }\n this.cable.disconnect()\n },\n methods: {\n updateOutOfLimits() {\n this.items = []\n this.itemList = []\n\n this.api.get_out_of_limits().then((items) => {\n for (const item of items) {\n let itemName = item.join('__')\n // Skip ignored\n if (this.ignored.find((ignored) => itemName.includes(ignored))) {\n continue\n }\n\n this.itemList.push(itemName)\n let itemInfo = {\n key: item.slice(0, 3).join('__'),\n parameters: item.slice(0, 3),\n }\n if (item[3].includes('YELLOW') && this.overallState !== 'RED') {\n this.overallState = 'YELLOW'\n }\n if (item[3].includes('RED')) {\n this.overallState = 'RED'\n }\n if (item[3] == 'YELLOW' || item[3] == 'RED') {\n itemInfo['limits'] = false\n } else {\n itemInfo['limits'] = true\n }\n this.items.push(itemInfo)\n }\n this.calcOverallState()\n })\n },\n calcOverallState() {\n let overall = 'GREEN'\n for (let item of this.itemList) {\n if (this.ignored.find((ignored) => item.includes(ignored))) {\n continue\n }\n\n if (item.includes('YELLOW') && overall !== 'RED') {\n overall = 'YELLOW'\n }\n if (item.includes('RED')) {\n overall = 'RED'\n break\n }\n }\n this.overallState = overall\n },\n ignorePacket(item, noUpdate) {\n let [target_name, packet_name, item_name] = item.split('__')\n let newIgnored = `${target_name}__${packet_name}`\n this.ignored.push(newIgnored)\n noUpdate || this.updateIgnored()\n\n while (true) {\n let index = this.itemList.findIndex((item) => item.includes(newIgnored))\n if (index === -1) {\n break\n } else {\n let underIndex = this.itemList[index].lastIndexOf('__')\n this.removeItem(this.itemList[index].substring(0, underIndex))\n }\n }\n this.calcOverallState()\n },\n ignoreItem(item, noUpdate) {\n this.ignored.push(item)\n noUpdate || this.updateIgnored()\n this.removeItem(item)\n this.calcOverallState()\n },\n restoreItem(item, index) {\n this.ignored.splice(index, 1)\n this.updateIgnored()\n this.updateOutOfLimits()\n },\n removeItem(item) {\n const index = this.itemList.findIndex((arrayItem) =>\n arrayItem.includes(item)\n )\n this.items.splice(index, 1)\n this.itemList.splice(index, 1)\n },\n updateIgnored() {\n this.$emit('input', this.ignored)\n },\n handleConfigEvents(config) {\n for (let event of config) {\n // When a target is deleted we refresh the list of items\n if (event['kind'] === 'deleted' && event['type'] === 'target') {\n this.updateOutOfLimits()\n }\n }\n },\n handleMessages(messages) {\n for (let message of messages) {\n message = JSON.parse(message['event'])\n\n // We only want to handle LIMITS_CHANGE messages\n // NOTE: The channel also sends LIMITS_SETTINGS and LIMITS_SET messages\n if (message.type != 'LIMITS_CHANGE') {\n continue\n }\n\n let itemName = `${message.target_name}__${message.packet_name}__${message.item_name}`\n const index = this.itemList.findIndex((arrayItem) =>\n arrayItem.includes(itemName)\n )\n // If we find an existing item we update the state and re-calc overall state\n if (index !== -1) {\n this.itemList[index] = `${itemName}__${message.new_limits_state}`\n this.calcOverallState()\n continue\n }\n // Skip ignored items\n if (this.ignored.find((ignored) => itemName.includes(ignored))) {\n continue\n }\n // Only process items who have gone out of limits\n if (\n message.new_limits_state &&\n !(\n message.new_limits_state.includes('YELLOW') ||\n message.new_limits_state.includes('RED')\n )\n ) {\n continue\n }\n let itemInfo = {\n key: itemName,\n parameters: [\n message.target_name,\n message.packet_name,\n message.item_name,\n ],\n }\n if (\n message.new_limits_state == 'YELLOW' ||\n message.new_limits_state == 'RED'\n ) {\n itemInfo['limits'] = false\n } else {\n itemInfo['limits'] = true\n }\n this.itemList.push(`${itemName}__${message.new_limits_state}`)\n this.items.push(itemInfo)\n this.calcOverallState()\n }\n },\n update() {\n if (this.screenItems.length !== 0) {\n this.api.get_tlm_values(this.screenItems).then((data) => {\n this.updateValues(data)\n })\n }\n },\n updateValues: function (values) {\n this.updateCounter += 1\n for (let i = 0; i < values.length; i++) {\n values[i].push(this.updateCounter)\n Vue.set(this.screenValues, this.screenItems[i], values[i])\n }\n },\n addItem: function (valueId) {\n this.screenItems.push(valueId)\n Vue.set(this.screenValues, valueId, [null, null, 0])\n },\n deleteItem: function (valueId) {\n let index = this.screenItems.indexOf(valueId)\n this.screenItems.splice(index, 1)\n },\n\n // Menu options\n showIgnored() {\n this.ignoredItemsDialog = true\n },\n },\n}\n<\/script>\n\n<style scoped>\n/* TODO: Color the border */\n.textfield-green :deep(.v-text-field__slot) input,\n.textfield-green :deep(.v-text-field__slot) label {\n color: rgb(0, 200, 0);\n}\n\n.textfield-yellow :deep(.v-text-field__slot) input,\n.textfield-yellow :deep(.v-text-field__slot) label {\n color: rgb(255, 220, 0);\n}\n\n.textfield-red :deep(.v-text-field__slot) input,\n.textfield-red :deep(.v-text-field__slot) label {\n color: rgb(255, 45, 45);\n}\n</style>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8119b8bdef11ca4d96cf611cbaf0e1f2c2ce616c"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var s=o[e];return ve=function(){return s},s}ve();var pe={components:{LabelvalueWidget:te,LabelvaluelimitsbarWidget:fe},props:{value:{type:Array,default:function(){return ve().f[0]++,ve().s[0]++,[]}}},data:function(){return ve().f[1]++,ve().s[1]++,{api:null,cable:new S,ignored:[],ignoredItemsDialog:!1,overallState:"GREEN",items:[],itemList:[],screenItems:[],screenValues:{},updateCounter:0,widgetSettings:[["WIDTH","520px"],["0","WIDTH","180px"],["1","WIDTH","180px"],["2","WIDTH","160px"],["__SCREEN__",this]]}},computed:{textFieldClass:function(){return ve().f[2]++,ve().s[2]++,this.overallState?(ve().b[0][0]++,ve().s[3]++,"textfield-".concat(this.overallState.toLowerCase())):(ve().b[0][1]++,ve().s[4]++,"")},overallStateFormatted:function(){return ve().f[3]++,ve().s[5]++,0===this.ignored.length?(ve().b[1][0]++,ve().s[6]++,this.overallState):(ve().b[1][1]++,ve().s[7]++,"".concat(this.overallState," (Some items ignored)"))},ignoredFormatted:function(){return ve().f[4]++,ve().s[8]++,this.ignored.map((function(e){return ve().f[5]++,ve().s[9]++,e.split("__").join(" ")}))}},created:function(){var e=this;ve().f[6]++,ve().s[10]++,this.api=new x,ve().s[11]++;var n,t=(0,u.Z)(this.value);try{for(t.s();!(n=t.n()).done;){var i=n.value;ve().s[12]++,i.match(/.+__.+__.+/)?(ve().b[2][0]++,ve().s[13]++,this.ignoreItem(i,!0)):(ve().b[2][1]++,ve().s[14]++,this.ignorePacket(i,!0))}}catch(l){t.e(l)}finally{t.f()}ve().s[15]++,this.updateOutOfLimits(),ve().s[16]++,this.cable.createSubscription("LimitsEventsChannel",window.openc3Scope,{received:function(n){ve().f[7]++,ve().s[17]++,e.cable.recordPing(),ve().s[18]++,e.handleMessages(n)}}).then((function(n){ve().f[8]++,ve().s[19]++,e.limitsSubscription=n})),ve().s[20]++,this.cable.createSubscription("ConfigEventsChannel",window.openc3Scope,{received:function(n){ve().f[9]++,ve().s[21]++,e.cable.recordPing();var t=(ve().s[22]++,JSON.parse(n));ve().s[23]++,e.handleConfigEvents(t)}}).then((function(n){ve().f[10]++,ve().s[24]++,e.configSubscription=n}))},mounted:function(){var e=this;ve().f[11]++,ve().s[25]++,this.updater=setInterval((function(){ve().f[12]++,ve().s[26]++,e.update()}),1e3)},destroyed:function(){ve().f[13]++,ve().s[27]++,null!=this.updater?(ve().b[3][0]++,ve().s[28]++,clearInterval(this.updater),ve().s[29]++,this.updater=null):ve().b[3][1]++,ve().s[30]++,this.limitsSubscription?(ve().b[4][0]++,ve().s[31]++,this.limitsSubscription.unsubscribe()):ve().b[4][1]++,ve().s[32]++,this.configSubscription?(ve().b[5][0]++,ve().s[33]++,this.configSubscription.unsubscribe()):ve().b[5][1]++,ve().s[34]++,this.cable.disconnect()},methods:{updateOutOfLimits:function(){var e=this;ve().f[14]++,ve().s[35]++,this.items=[],ve().s[36]++,this.itemList=[],ve().s[37]++,this.api.get_out_of_limits().then((function(n){ve().f[15]++,ve().s[38]++;var t,i=(0,u.Z)(n);try{var l=function(){var n=t.value,i=(ve().s[39]++,n.join("__"));if(ve().s[40]++,e.ignored.find((function(e){return ve().f[16]++,ve().s[41]++,i.includes(e)})))return ve().b[6][0]++,ve().s[42]++,1;ve().b[6][1]++,ve().s[43]++,e.itemList.push(i);var l=(ve().s[44]++,{key:n.slice(0,3).join("__"),parameters:n.slice(0,3)});ve().s[45]++,ve().b[8][0]++,n[3].includes("YELLOW")&&(ve().b[8][1]++,"RED"!==e.overallState)?(ve().b[7][0]++,ve().s[46]++,e.overallState="YELLOW"):ve().b[7][1]++,ve().s[47]++,n[3].includes("RED")?(ve().b[9][0]++,ve().s[48]++,e.overallState="RED"):ve().b[9][1]++,ve().s[49]++,ve().b[11][0]++,"YELLOW"==n[3]||(ve().b[11][1]++,"RED"==n[3])?(ve().b[10][0]++,ve().s[50]++,l["limits"]=!1):(ve().b[10][1]++,ve().s[51]++,l["limits"]=!0),ve().s[52]++,e.items.push(l)};for(i.s();!(t=i.n()).done;)l()}catch(o){i.e(o)}finally{i.f()}ve().s[53]++,e.calcOverallState()}))},calcOverallState:function(){var e=this;ve().f[17]++;var n=(ve().s[54]++,"GREEN");ve().s[55]++;var t,i=(0,u.Z)(this.itemList);try{var l,o=function(){var i=t.value;return ve().s[56]++,e.ignored.find((function(e){return ve().f[18]++,ve().s[57]++,i.includes(e)}))?(ve().b[12][0]++,ve().s[58]++,0):(ve().b[12][1]++,ve().s[59]++,ve().b[14][0]++,i.includes("YELLOW")&&(ve().b[14][1]++,"RED"!==n)?(ve().b[13][0]++,ve().s[60]++,n="YELLOW"):ve().b[13][1]++,ve().s[61]++,i.includes("RED")?(ve().b[15][0]++,ve().s[62]++,n="RED",ve().s[63]++,1):void ve().b[15][1]++)};for(i.s();!(t=i.n()).done;)if(l=o(),0!==l&&1===l)break}catch(s){i.e(s)}finally{i.f()}ve().s[64]++,this.overallState=n},ignorePacket:function(e,n){ve().f[19]++;var t=(ve().s[65]++,e.split("__")),i=(0,r.Z)(t,3),l=i[0],o=i[1],s=(i[2],ve().s[66]++,"".concat(l,"__").concat(o));ve().s[67]++,this.ignored.push(s),ve().s[68]++,ve().b[16][0]++,n||(ve().b[16][1]++,this.updateIgnored()),ve().s[69]++;while(1){var a=(ve().s[70]++,this.itemList.findIndex((function(e){return ve().f[20]++,ve().s[71]++,e.includes(s)})));if(ve().s[72]++,-1===a){ve().b[17][0]++,ve().s[73]++;break}ve().b[17][1]++;var c=(ve().s[74]++,this.itemList[a].lastIndexOf("__"));ve().s[75]++,this.removeItem(this.itemList[a].substring(0,c))}ve().s[76]++,this.calcOverallState()},ignoreItem:function(e,n){ve().f[21]++,ve().s[77]++,this.ignored.push(e),ve().s[78]++,ve().b[18][0]++,n||(ve().b[18][1]++,this.updateIgnored()),ve().s[79]++,this.removeItem(e),ve().s[80]++,this.calcOverallState()},restoreItem:function(e,n){ve().f[22]++,ve().s[81]++,this.ignored.splice(n,1),ve().s[82]++,this.updateIgnored(),ve().s[83]++,this.updateOutOfLimits()},removeItem:function(e){ve().f[23]++;var n=(ve().s[84]++,this.itemList.findIndex((function(n){return ve().f[24]++,ve().s[85]++,n.includes(e)})));ve().s[86]++,this.items.splice(n,1),ve().s[87]++,this.itemList.splice(n,1)},updateIgnored:function(){ve().f[25]++,ve().s[88]++,this.$emit("input",this.ignored)},handleConfigEvents:function(e){ve().f[26]++,ve().s[89]++;var n,t=(0,u.Z)(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;ve().s[90]++,ve().b[20][0]++,"deleted"===i["kind"]&&(ve().b[20][1]++,"target"===i["type"])?(ve().b[19][0]++,ve().s[91]++,this.updateOutOfLimits()):ve().b[19][1]++}}catch(l){t.e(l)}finally{t.f()}},handleMessages:function(e){var n=this;ve().f[27]++,ve().s[92]++;var t,i=(0,u.Z)(e);try{var l=function(){var e=t.value;if(ve().s[93]++,e=JSON.parse(e["event"]),ve().s[94]++,"LIMITS_CHANGE"!=e.type)return ve().b[21][0]++,ve().s[95]++,0;ve().b[21][1]++;var i=(ve().s[96]++,"".concat(e.target_name,"__").concat(e.packet_name,"__").concat(e.item_name)),l=(ve().s[97]++,n.itemList.findIndex((function(e){return ve().f[28]++,ve().s[98]++,e.includes(i)})));if(ve().s[99]++,-1!==l)return ve().b[22][0]++,ve().s[100]++,n.itemList[l]="".concat(i,"__").concat(e.new_limits_state),ve().s[101]++,n.calcOverallState(),ve().s[102]++,0;if(ve().b[22][1]++,ve().s[103]++,n.ignored.find((function(e){return ve().f[29]++,ve().s[104]++,i.includes(e)})))return ve().b[23][0]++,ve().s[105]++,0;if(ve().b[23][1]++,ve().s[106]++,ve().b[25][0]++,e.new_limits_state&&(ve().b[25][1]++,ve().b[26][0]++,!e.new_limits_state.includes("YELLOW")&&(ve().b[26][1]++,!e.new_limits_state.includes("RED"))))return ve().b[24][0]++,ve().s[107]++,0;ve().b[24][1]++;var o=(ve().s[108]++,{key:i,parameters:[e.target_name,e.packet_name,e.item_name]});ve().s[109]++,ve().b[28][0]++,"YELLOW"==e.new_limits_state||(ve().b[28][1]++,"RED"==e.new_limits_state)?(ve().b[27][0]++,ve().s[110]++,o["limits"]=!1):(ve().b[27][1]++,ve().s[111]++,o["limits"]=!0),ve().s[112]++,n.itemList.push("".concat(i,"__").concat(e.new_limits_state)),ve().s[113]++,n.items.push(o),ve().s[114]++,n.calcOverallState()};for(i.s();!(t=i.n()).done;)l()}catch(o){i.e(o)}finally{i.f()}},update:function(){var e=this;ve().f[30]++,ve().s[115]++,0!==this.screenItems.length?(ve().b[29][0]++,ve().s[116]++,this.api.get_tlm_values(this.screenItems).then((function(n){ve().f[31]++,ve().s[117]++,e.updateValues(n)}))):ve().b[29][1]++},updateValues:function(e){ve().f[32]++,ve().s[118]++,this.updateCounter+=1,ve().s[119]++;for(var n=(ve().s[120]++,0);n<e.length;n++)ve().s[121]++,e[n].push(this.updateCounter),ve().s[122]++,C["default"].set(this.screenValues,this.screenItems[n],e[n])},addItem:function(e){ve().f[33]++,ve().s[123]++,this.screenItems.push(e),ve().s[124]++,C["default"].set(this.screenValues,e,[null,null,0])},deleteItem:function(e){ve().f[34]++;var n=(ve().s[125]++,this.screenItems.indexOf(e));ve().s[126]++,this.screenItems.splice(n,1)},showIgnored:function(){ve().f[35]++,ve().s[127]++,this.ignoredItemsDialog=!0}}},ge=pe,_e=(t(1505),(0,D.Z)(ge,a,c,!1,null,"b0d7e182",null)),Ce=_e.exports;t(4908);function be(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsEvents.vue",n="dec52f586b9dcd514a97f88c7ece2b9ee3364c22",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsEvents.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:889}},4:{start:{line:1,column:326},end:{line:1,column:340}},5:{start:{line:1,column:676},end:{line:1,column:744}},6:{start:{line:1,column:789},end:{line:1,column:879}},7:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:310},end:{line:1,column:311}},loc:{start:{line:1,column:325},end:{line:1,column:341}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:657},end:{line:1,column:658}},loc:{start:{line:1,column:675},end:{line:1,column:745}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:770},end:{line:1,column:771}},loc:{start:{line:1,column:788},end:{line:1,column:880}},line:1}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0,1:0,2:0,3:0},b:{},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"dec52f586b9dcd514a97f88c7ece2b9ee3364c22"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var s=o[e];return be=function(){return s},s}be(),be().s[0]++;var ye=function(){be().f[0]++;var e=(be().s[1]++,this),n=(be().s[2]++,e._self._c);return be().s[3]++,n("v-card",{staticClass:"card-height"},[n("v-card-title",[e._v(" Limits Events "),n("v-spacer"),n("v-text-field",{attrs:{"append-icon":"mdi-magnify",label:"Search","single-line":"","hide-details":""},model:{value:e.search,callback:function(n){be().f[1]++,be().s[4]++,e.search=n},expression:"search"}})],1),n("v-data-table",{attrs:{headers:e.headers,items:e.data,search:e.search,"calculate-widths":"","disable-pagination":"","hide-default-footer":"","multi-sort":"",dense:"",height:e.calcTableHeight(),"data-test":"limits-events"},scopedSlots:e._u([{key:"item.time_nsec",fn:function(t){var i=t.item;return be().f[2]++,be().s[5]++,[n("span",[e._v(e._s(e.formatDate(i.time_nsec)))])]}},{key:"item.message",fn:function(t){var i=t.item;return be().f[3]++,be().s[6]++,[n("span",{class:e.getColorClass(i.message)},[e._v(e._s(i.message))])]}}])})],1)},we=(be().s[7]++,[]),xe=t(7388),ke=t(6700);function Se(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsEvents.vue",n="1b301f55d90ed3de8b10b916e49c59f8aa7c3503",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsEvents.vue",statementMap:{0:{start:{line:13,column:4},end:{line:21,column:5}},1:{start:{line:24,column:4},end:{line:40,column:8}},2:{start:{line:30,column:12},end:{line:30,column:35}},3:{start:{line:31,column:12},end:{line:31,column:39}},4:{start:{line:39,column:8},end:{line:39,column:52}},5:{start:{line:43,column:4},end:{line:45,column:5}},6:{start:{line:44,column:6},end:{line:44,column:43}},7:{start:{line:46,column:4},end:{line:46,column:27}},8:{start:{line:50,column:6},end:{line:53,column:7}},9:{start:{line:50,column:19},end:{line:50,column:20}},10:{start:{line:51,column:20},end:{line:51,column:52}},11:{start:{line:52,column:8},end:{line:52,column:32}},12:{start:{line:54,column:6},end:{line:56,column:7}},13:{start:{line:55,column:8},end:{line:55,column:45}},14:{start:{line:59,column:6},end:{line:62,column:7}},15:{start:{line:65,column:6},end:{line:73,column:7}},16:{start:{line:66,column:8},end:{line:66,column:29}},17:{start:{line:67,column:13},end:{line:73,column:7}},18:{start:{line:68,column:8},end:{line:68,column:30}},19:{start:{line:69,column:13},end:{line:73,column:7}},20:{start:{line:70,column:8},end:{line:70,column:27}},21:{start:{line:71,column:13},end:{line:73,column:7}},22:{start:{line:72,column:8},end:{line:72,column:28}},23:{start:{line:74,column:6},end:{line:78,column:7}},24:{start:{line:75,column:8},end:{line:75,column:29}},25:{start:{line:77,column:8},end:{line:77,column:29}},26:{start:{line:82,column:6},end:{line:82,column:37}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:2},end:{line:12,column:3}},loc:{start:{line:12,column:9},end:{line:22,column:3}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:23,column:2},end:{line:23,column:3}},loc:{start:{line:23,column:12},end:{line:41,column:3}},line:23},2:{name:"(anonymous_2)",decl:{start:{line:29,column:20},end:{line:29,column:21}},loc:{start:{line:29,column:32},end:{line:32,column:11}},line:29},3:{name:"(anonymous_3)",decl:{start:{line:38,column:12},end:{line:38,column:13}},loc:{start:{line:38,column:36},end:{line:40,column:7}},line:38},4:{name:"(anonymous_4)",decl:{start:{line:42,column:2},end:{line:42,column:3}},loc:{start:{line:42,column:14},end:{line:47,column:3}},line:42},5:{name:"(anonymous_5)",decl:{start:{line:49,column:4},end:{line:49,column:5}},loc:{start:{line:49,column:29},end:{line:57,column:5}},line:49},6:{name:"(anonymous_6)",decl:{start:{line:58,column:4},end:{line:58,column:5}},loc:{start:{line:58,column:25},end:{line:63,column:5}},line:58},7:{name:"(anonymous_7)",decl:{start:{line:64,column:4},end:{line:64,column:5}},loc:{start:{line:64,column:27},end:{line:79,column:5}},line:64},8:{name:"(anonymous_8)",decl:{start:{line:80,column:4},end:{line:80,column:5}},loc:{start:{line:80,column:22},end:{line:83,column:5}},line:80}},branchMap:{0:{loc:{start:{line:43,column:4},end:{line:45,column:5}},type:"if",locations:[{start:{line:43,column:4},end:{line:45,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:43},1:{loc:{start:{line:54,column:6},end:{line:56,column:7}},type:"if",locations:[{start:{line:54,column:6},end:{line:56,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:54},2:{loc:{start:{line:65,column:6},end:{line:73,column:7}},type:"if",locations:[{start:{line:65,column:6},end:{line:73,column:7}},{start:{line:67,column:13},end:{line:73,column:7}}],line:65},3:{loc:{start:{line:67,column:13},end:{line:73,column:7}},type:"if",locations:[{start:{line:67,column:13},end:{line:73,column:7}},{start:{line:69,column:13},end:{line:73,column:7}}],line:67},4:{loc:{start:{line:69,column:13},end:{line:73,column:7}},type:"if",locations:[{start:{line:69,column:13},end:{line:73,column:7}},{start:{line:71,column:13},end:{line:73,column:7}}],line:69},5:{loc:{start:{line:71,column:13},end:{line:73,column:7}},type:"if",locations:[{start:{line:71,column:13},end:{line:73,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:71},6:{loc:{start:{line:74,column:6},end:{line:78,column:7}},type:"if",locations:[{start:{line:74,column:6},end:{line:78,column:7}},{start:{line:76,column:13},end:{line:78,column:7}}],line:74}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,sources:["LimitsEvents.vue"],names:[],mappings:";AA0DA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"LimitsEvents.vue",sourceRoot:"src/tools/LimitsMonitor",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <v-card class=\"card-height\">\n <v-card-title>\n Limits Events\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n append-icon=\"mdi-magnify\"\n label=\"Search\"\n single-line\n hide-details\n />\n </v-card-title>\n <v-data-table\n :headers=\"headers\"\n :items=\"data\"\n :search=\"search\"\n calculate-widths\n disable-pagination\n hide-default-footer\n multi-sort\n dense\n :height=\"calcTableHeight()\"\n data-test=\"limits-events\"\n >\n <template v-slot:item.time_nsec=\"{ item }\">\n <span>{{ formatDate(item.time_nsec) }}</span>\n </template>\n <template v-slot:item.message=\"{ item }\">\n <span :class=\"getColorClass(item.message)\">{{ item.message }}</span>\n </template>\n </v-data-table>\n </v-card>\n</template>\n\n<script>\nimport { toDate, format } from 'date-fns'\nimport Cable from '@openc3/tool-common/src/services/cable.js'\n\nexport default {\n props: {\n history_count: {\n type: Number,\n default: 1000,\n },\n },\n data() {\n return {\n data: [],\n cable: new Cable(),\n search: '',\n headers: [\n { text: 'Time', value: 'time_nsec', width: 250 },\n { text: 'Message', value: 'message' },\n ],\n }\n },\n created() {\n this.cable\n .createSubscription(\n 'LimitsEventsChannel',\n window.openc3Scope,\n {\n received: (parsed) => {\n this.cable.recordPing()\n this.handleMessages(parsed)\n },\n },\n {\n history_count: 1000,\n }\n )\n .then((limitsSubscription) => {\n this.limitsSubscription = limitsSubscription\n })\n },\n destroyed() {\n if (this.limitsSubscription) {\n this.limitsSubscription.unsubscribe()\n }\n this.cable.disconnect()\n },\n methods: {\n handleMessages(messages) {\n for (let i = 0; i < messages.length; i++) {\n let event = JSON.parse(messages[i]['event'])\n this.data.unshift(event)\n }\n if (this.data.length > this.history_count) {\n this.data.length = this.history_count\n }\n },\n formatDate(nanoSecs) {\n return format(\n toDate(parseInt(nanoSecs) / 1_000_000),\n 'yyyy-MM-dd HH:mm:ss.SSS'\n )\n },\n getColorClass(message) {\n if (message.includes('GREEN')) {\n return 'openc3-green'\n } else if (message.includes('YELLOW')) {\n return 'openc3-yellow'\n } else if (message.includes('RED')) {\n return 'openc3-red'\n } else if (message.includes('BLUE')) {\n return 'openc3-blue'\n }\n if (this.$vuetify.theme.dark) {\n return 'openc3-white'\n } else {\n return 'openc3-black'\n }\n },\n calcTableHeight() {\n // TODO: 250 is a magic number but seems to work well\n return window.innerHeight - 250\n },\n },\n}\n<\/script>\n\n<style lang=\"scss\" scoped>\n.card-height {\n // TODO: 150 is a magic number but seems to work well\n // Can this be calculated by the size of the table search box?\n height: calc(100vh - 150px);\n}\n</style>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1b301f55d90ed3de8b10b916e49c59f8aa7c3503"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var s=o[e];return Se=function(){return s},s}Se();var Ie={props:{history_count:{type:Number,default:1e3}},data:function(){return Se().f[0]++,Se().s[0]++,{data:[],cable:new S,search:"",headers:[{text:"Time",value:"time_nsec",width:250},{text:"Message",value:"message"}]}},created:function(){var e=this;Se().f[1]++,Se().s[1]++,this.cable.createSubscription("LimitsEventsChannel",window.openc3Scope,{received:function(n){Se().f[2]++,Se().s[2]++,e.cable.recordPing(),Se().s[3]++,e.handleMessages(n)}},{history_count:1e3}).then((function(n){Se().f[3]++,Se().s[4]++,e.limitsSubscription=n}))},destroyed:function(){Se().f[4]++,Se().s[5]++,this.limitsSubscription?(Se().b[0][0]++,Se().s[6]++,this.limitsSubscription.unsubscribe()):Se().b[0][1]++,Se().s[7]++,this.cable.disconnect()},methods:{handleMessages:function(e){Se().f[5]++,Se().s[8]++;for(var n=(Se().s[9]++,0);n<e.length;n++){var t=(Se().s[10]++,JSON.parse(e[n]["event"]));Se().s[11]++,this.data.unshift(t)}Se().s[12]++,this.data.length>this.history_count?(Se().b[1][0]++,Se().s[13]++,this.data.length=this.history_count):Se().b[1][1]++},formatDate:function(e){return Se().f[6]++,Se().s[14]++,(0,xe.Z)((0,ke.Z)(parseInt(e)/1e6),"yyyy-MM-dd HH:mm:ss.SSS")},getColorClass:function(e){return Se().f[7]++,Se().s[15]++,e.includes("GREEN")?(Se().b[2][0]++,Se().s[16]++,"openc3-green"):(Se().b[2][1]++,Se().s[17]++,e.includes("YELLOW")?(Se().b[3][0]++,Se().s[18]++,"openc3-yellow"):(Se().b[3][1]++,Se().s[19]++,e.includes("RED")?(Se().b[4][0]++,Se().s[20]++,"openc3-red"):(Se().b[4][1]++,Se().s[21]++,e.includes("BLUE")?(Se().b[5][0]++,Se().s[22]++,"openc3-blue"):(Se().b[5][1]++,Se().s[23]++,this.$vuetify.theme.dark?(Se().b[6][0]++,Se().s[24]++,"openc3-white"):(Se().b[6][1]++,Se().s[25]++,"openc3-black")))))},calcTableHeight:function(){return Se().f[8]++,Se().s[26]++,window.innerHeight-250}}},Le=Ie,Ee=(t(21),(0,D.Z)(Le,ye,we,!1,null,"3e3badba",null)),Ne=Ee.exports,Oe=function(){var e=this,n=e._self._c;return n("mounting-portal",{attrs:{"mount-to":"#openc3-menu",append:""}},[n("div",{staticClass:"v-toolbar__content"},[e._l(e.menus,(function(t,i){return n("v-menu",{key:i,attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(i){var l=i.on,o=i.attrs;return[n("v-btn",e._g(e._b({staticClass:"mx-1",attrs:{outlined:"","data-test":e.formatDT("".concat(e.title," ").concat(t.label))}},"v-btn",o,!1),l),[n("span",{domProps:{textContent:e._s(t.label)}}),n("v-icon",{attrs:{right:""}},[e._v(" mdi-menu-down ")])],1)]}}],null,!0)},[n("v-list",[n("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:t.radioGroup,"hide-details":"",dense:""}},[e._l(t.items,(function(i,l){return[i.divider?n("v-divider"):n("v-list-item",{key:l,attrs:{disabled:i.disabled,"data-test":e.formatDT("".concat(e.title," ").concat(t.label," ").concat(i.label))},on:{click:function(e){return i.command(i)}}},[i.radio?n("v-list-item-action",[n("v-radio",{attrs:{color:"secondary",label:i.label,value:i.label}})],1):e._e(),i.checkbox?n("v-list-item-action",[n("v-checkbox",{attrs:{color:"secondary",label:i.label},model:{value:i.checked,callback:function(n){e.$set(i,"checked",n)},expression:"option.checked"}})],1):e._e(),i.icon?n("v-list-item-icon",[n("v-icon",{attrs:{disabled:i.disabled}},[e._v(e._s(i.icon))])],1):e._e(),i.radio||i.checkbox?e._e():n("v-list-item-title",{style:"cursor: pointer;"+(i.disabled?"opacity: 0.2":"")},[e._v(e._s(i.label))])],1)]}))],2)],1)],1)})),n("v-spacer"),n("v-toolbar-title",[e._v(e._s(e.title))]),n("v-spacer")],2)])},Te=[],Me=(t(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()}},mounted:function(){"COSMOS "===this.title.substring(0,7)?document.title=this.title.substring(7):document.title=this.title}}),Re=Me,Ve=(t(4888),(0,D.Z)(Re,Oe,Te,!1,null,"2eb37f67",null)),De=Ve.exports,He=(t(6710),{data:{configKey:""},methods:{openConfigBase:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;localStorage["lastconfig__".concat(this.configKey)]=e,(new x).load_config(this.configKey,e).then((function(l){l?(n.$notify.normal({title:"Loading configuration",body:e}),i&&i(JSON.parse(l)),t||n.$router.currentRoute.fullPath.includes(e)||n.$router.push({query:{config:e}}),localStorage["lastconfig__".concat(n.configKey)]=e):(n.$notify.caution({title:"Unknown configuration",body:e}),localStorage.removeItem("lastconfig__".concat(n.configKey)))})).catch((function(t){t&&n.$notify.serious({title:"Error opening configuration: ".concat(e),body:t}),localStorage.removeItem("lastconfig__".concat(n.configKey))}))},saveConfigBase:function(e,n){var t=this;(new x).save_config(this.configKey,e,JSON.stringify(n)).then((function(){t.$notify.normal({title:"Saved configuration",body:e}),localStorage["lastconfig__".concat(t.configKey)]=e})).catch((function(n){n&&t.$notify.serious({title:"Error saving configuration: ".concat(e),body:n}),localStorage.removeItem("lastconfig__".concat(t.configKey))}))},resetConfigBase:function(){localStorage.removeItem("lastconfig__".concat(this.configKey)),"/"!==this.$router.currentRoute.fullPath&&this.$router.replace(this.$router.currentRoute.path),this.$router.go()}}}),We=function(){var e=this,n=e._self._c;return n("v-dialog",{attrs:{width:"600"},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[n("v-card",[n("form",{on:{submit:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[n("v-system-bar",[n("v-spacer"),n("span",[e._v("Open Configuration")]),n("v-spacer")],1),n("v-card-text",[n("div",{staticClass:"pa-3"},[n("v-row",{attrs:{dense:""}},[n("v-text-field",{attrs:{label:"search",type:"text","data-test":"search","prepend-icon":"mdi-magnify","clear-icon":"mdi-close-circle-outline",clearable:"",autofocus:"","single-line":"","hide-details":""},model:{value:e.search,callback:function(n){e.search=n},expression:"search"}})],1),n("v-data-table",{attrs:{"show-select":"","single-select":"","item-key":"configId",search:e.search,headers:e.headers,items:e.configs,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},on:{"item-selected":e.itemSelected,"click:row":function(e,n){return n.select(e)}},scopedSlots:e._u([{key:"item.actions",fn:function(t){var i=t.item;return[n("v-btn",{staticClass:"mt-1",attrs:{"data-test":"item-delete",icon:""},on:{click:function(n){return e.deleteConfig(i)}}},[n("v-icon",[e._v("mdi-delete")])],1)]}}])}),n("v-row",{attrs:{dense:""}},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:e._s(e.error)}})])],1)]),n("v-card-actions",[n("v-spacer"),n("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"open-config-cancel-btn"},on:{click:e.cancel}},[e._v(" Cancel ")]),n("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"open-config-submit-btn",disabled:!!e.error},on:{click:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[e._v(" Ok ")])],1)],1)])],1)},Ze=[],Fe={props:{configKey:String,value:Boolean},data:function(){return{configs:[],headers:[{text:"Configuration",value:"config"},{text:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedItem:null}},computed:{error:function(){return""===this.selectedItem||null===this.selectedItem?"Must select a config":null},show:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},mounted:function(){var e=this,n=-1;(new x).list_configs(this.configKey).then((function(t){e.configs=t.map((function(e){return n+=1,{configId:n,config:e}}))})).catch((function(n){e.$emit("warning","Failed to connect to OpenC3. ".concat(n))}))},methods:{itemSelected:function(e){e.value?this.selectedItem=e.item:this.selectedItem=null},success:function(){this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedItem=null},cancel:function(){this.show=!1,this.search=null,this.selectedItem=null},deleteConfig:function(e){var n=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(e.config),{okText:"Delete",cancelText:"Cancel"}).then((function(t){n.selectedItem.config===e.config&&(n.selectedItem=null),n.configs.splice(n.configs.indexOf(e),1),(new x).delete_config(n.configKey,e.config),localStorage["lastconfig__".concat(n.configKey)]===e.config&&localStorage.removeItem("lastconfig__".concat(n.configKey))})).catch((function(t){t&&n.$emit("warning","Failed to delete config ".concat(e.config," Error: ").concat(t))}))}}},Pe=Fe,$e=(0,D.Z)(Pe,We,Ze,!1,null,null,null),Ge=$e.exports,Ke=function(){var e=this,n=e._self._c;return n("v-dialog",{attrs:{width:"600"},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[n("v-card",[n("form",{on:{submit:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[n("v-system-bar",[n("v-spacer"),n("span",[e._v("Save Configuration")]),n("v-spacer")],1),n("v-card-text",[n("div",{staticClass:"pa-3"},[n("v-row",{attrs:{dense:""}},[n("v-text-field",{attrs:{label:"search",type:"text","data-test":"search","prepend-icon":"mdi-magnify","clear-icon":"mdi-close-circle-outline",clearable:"","single-line":"","hide-details":""},model:{value:e.search,callback:function(n){e.search=n},expression:"search"}})],1),n("v-data-table",{attrs:{"show-select":"","single-select":"","item-key":"configId",search:e.search,headers:e.headers,items:e.configs,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},on:{"item-selected":e.itemSelected,"click:row":function(e,n){return n.select(e)}},scopedSlots:e._u([{key:"item.actions",fn:function(t){var i=t.item;return[n("v-btn",{staticClass:"mt-1",attrs:{icon:"","data-test":"item-delete"},on:{click:function(n){return e.deleteConfig(i)}}},[n("v-icon",[e._v("mdi-delete")])],1)]}}])}),n("v-row",{attrs:{dense:""}},[n("v-text-field",{attrs:{"hide-details":"",autofocus:"",disabled:!!e.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},model:{value:e.configName,callback:function(n){e.configName=n},expression:"configName"}})],1),n("v-row",{attrs:{dense:""}},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:e._s(e.error)}})])],1)]),n("v-card-actions",[n("v-spacer"),n("v-btn",{staticClass:"mx-2",attrs:{outlined:""},on:{click:e.cancel}},[e._v(" Cancel ")]),n("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"save-config-submit-btn",disabled:!!e.error},on:{click:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[e._v(" Ok ")])],1)],1)])],1)},Ue=[],Be={props:{configKey:String,value:Boolean},data:function(){return{configName:"",configs:[],headers:[{text:"Configuration",value:"config"},{text:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedItem:null}},computed:{error:function(){return""===this.configName?"Config must have a name":null},show:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},mounted:function(){var e=this,n=-1;(new x).list_configs(this.configKey).then((function(t){e.configs=t.map((function(e){return n+=1,{configId:n,config:e}}))})).catch((function(n){e.$emit("warning","Failed to connect to OpenC3. ".concat(n))}))},methods:{itemSelected:function(e){e.value?(this.selectedItem=e.item,this.configName=e.item.config):(this.selectedItem=null,this.configName="")},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedItem=null,this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedItem=null,this.configName=""},deleteConfig:function(e){var n=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(e.config),{okText:"Delete",cancelText:"Cancel"}).then((function(t){n.configName===e.config&&(n.selectedItem=null,n.configName=""),n.configs.splice(n.configs.indexOf(e.config),1),(new x).delete_config(n.configKey,e.config),localStorage["lastconfig__".concat(n.configKey)]===e.config&&localStorage.removeItem("lastconfig__".concat(n.configKey))})).catch((function(t){t&&n.$emit("warning","Failed to delete config ".concat(e.config," Error: ").concat(t))}))}}},Ye=Be,je=(0,D.Z)(Ye,Ke,Ue,!1,null,null,null),ze=je.exports;function qe(){var e="/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsMonitor.vue",n="bfd3211bb2cabf8430515215e77f28c8a2374036",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-limitsmonitor/src/tools/LimitsMonitor/LimitsMonitor.vue",statementMap:{0:{start:{line:20,column:4},end:{line:69,column:5}},1:{start:{line:39,column:16},end:{line:39,column:48}},2:{start:{line:49,column:16},end:{line:49,column:38}},3:{start:{line:56,column:16},end:{line:56,column:38}},4:{start:{line:63,column:16},end:{line:63,column:38}},5:{start:{line:73,column:6},end:{line:73,column:43}},6:{start:{line:77,column:4},end:{line:79,column:6}},7:{start:{line:78,column:6},end:{line:78,column:28}},8:{start:{line:80,column:4},end:{line:80,column:30}},9:{start:{line:81,column:4},end:{line:84,column:5}},10:{start:{line:87,column:27},end:{line:87,column:72}},11:{start:{line:89,column:4},end:{line:93,column:5}},12:{start:{line:90,column:6},end:{line:90,column:60}},13:{start:{line:91,column:11},end:{line:93,column:5}},14:{start:{line:92,column:6},end:{line:92,column:44}},15:{start:{line:96,column:4},end:{line:96,column:49}},16:{start:{line:100,column:6},end:{line:102,column:8}},17:{start:{line:101,column:8},end:{line:101,column:38}},18:{start:{line:105,column:6},end:{line:105,column:36}},19:{start:{line:106,column:6},end:{line:106,column:22}},20:{start:{line:109,column:6},end:{line:112,column:8}},21:{start:{line:110,column:8},end:{line:110,column:29}},22:{start:{line:111,column:8},end:{line:111,column:24}},23:{start:{line:115,column:6},end:{line:115,column:45}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:9},end:{line:70,column:3}},line:19},1:{name:"(anonymous_1)",decl:{start:{line:38,column:23},end:{line:38,column:24}},loc:{start:{line:38,column:29},end:{line:40,column:15}},line:38},2:{name:"(anonymous_2)",decl:{start:{line:48,column:23},end:{line:48,column:24}},loc:{start:{line:48,column:29},end:{line:50,column:15}},line:48},3:{name:"(anonymous_3)",decl:{start:{line:55,column:23},end:{line:55,column:24}},loc:{start:{line:55,column:29},end:{line:57,column:15}},line:55},4:{name:"(anonymous_4)",decl:{start:{line:62,column:23},end:{line:62,column:24}},loc:{start:{line:62,column:29},end:{line:64,column:15}},line:62},5:{name:"(anonymous_5)",decl:{start:{line:72,column:22},end:{line:72,column:23}},loc:{start:{line:72,column:48},end:{line:74,column:5}},line:72},6:{name:"(anonymous_6)",decl:{start:{line:76,column:2},end:{line:76,column:3}},loc:{start:{line:76,column:12},end:{line:85,column:3}},line:76},7:{name:"(anonymous_7)",decl:{start:{line:77,column:36},end:{line:77,column:37}},loc:{start:{line:77,column:46},end:{line:79,column:5}},line:77},8:{name:"(anonymous_8)",decl:{start:{line:86,column:11},end:{line:86,column:12}},loc:{start:{line:86,column:23},end:{line:94,column:3}},line:86},9:{name:"(anonymous_9)",decl:{start:{line:95,column:13},end:{line:95,column:14}},loc:{start:{line:95,column:25},end:{line:97,column:3}},line:95},10:{name:"(anonymous_10)",decl:{start:{line:99,column:25},end:{line:99,column:26}},loc:{start:{line:99,column:37},end:{line:103,column:5}},line:99},11:{name:"(anonymous_11)",decl:{start:{line:100,column:37},end:{line:100,column:38}},loc:{start:{line:100,column:49},end:{line:102,column:7}},line:100},12:{name:"(anonymous_12)",decl:{start:{line:104,column:4},end:{line:104,column:5}},loc:{start:{line:104,column:24},end:{line:107,column:5}},line:104},13:{name:"(anonymous_13)",decl:{start:{line:108,column:23},end:{line:108,column:24}},loc:{start:{line:108,column:55},end:{line:113,column:5}},line:108},14:{name:"(anonymous_14)",decl:{start:{line:109,column:40},end:{line:109,column:41}},loc:{start:{line:109,column:52},end:{line:112,column:7}},line:109},15:{name:"(anonymous_15)",decl:{start:{line:114,column:23},end:{line:114,column:24}},loc:{start:{line:114,column:39},end:{line:116,column:5}},line:114}},branchMap:{0:{loc:{start:{line:73,column:6},end:{line:73,column:43}},type:"binary-expr",locations:[{start:{line:73,column:6},end:{line:73,column:14}},{start:{line:73,column:18},end:{line:73,column:43}}],line:73},1:{loc:{start:{line:89,column:4},end:{line:93,column:5}},type:"if",locations:[{start:{line:89,column:4},end:{line:93,column:5}},{start:{line:91,column:11},end:{line:93,column:5}}],line:89},2:{loc:{start:{line:89,column:8},end:{line:89,column:53}},type:"binary-expr",locations:[{start:{line:89,column:8},end:{line:89,column:25}},{start:{line:89,column:29},end:{line:89,column:53}}],line:89},3:{loc:{start:{line:91,column:11},end:{line:93,column:5}},type:"if",locations:[{start:{line:91,column:11},end:{line:93,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:91},4:{loc:{start:{line:108,column:39},end:{line:108,column:53}},type:"default-arg",locations:[{start:{line:108,column:48},end:{line:108,column:53}}],line:108}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0]},inputSourceMap:{version:3,sources:["LimitsMonitor.vue"],names:[],mappings:";AAiEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"LimitsMonitor.vue",sourceRoot:"src/tools/LimitsMonitor",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <div>\n <top-bar :menus="menus" :title="title" />\n <v-card>\n <div class="pa-3">\n <span style="display: block"\n >The Limits Set is a global option which changes the Limits Set across\n all tools.</span\n >\n <span style="display: block"\n >NOTE: Changing this option clears the current list and recalculates\n out of limits based on the new set.</span\n >\n <v-select\n label="Limits Set"\n :items="limitsSets"\n v-model="currentLimitsSet"\n data-test="limits-set"\n hide-details\n />\n </div>\n <limits-control ref="control" v-model="ignored" :key="renderKey" />\n </v-card>\n <div style="height: 15px" />\n <limits-events />\n \x3c!-- Note we\'re using v-if here so it gets re-created each time and refreshes the list --\x3e\n <open-config-dialog\n v-if="openConfig"\n v-model="openConfig"\n :configKey="configKey"\n @success="openConfiguration"\n />\n \x3c!-- Note we\'re using v-if here so it gets re-created each time and refreshes the list --\x3e\n <save-config-dialog\n v-if="saveConfig"\n v-model="saveConfig"\n :configKey="configKey"\n @success="saveConfiguration"\n />\n </div>\n</template>\n\n<script>\nimport LimitsControl from \'@/tools/LimitsMonitor/LimitsControl\'\nimport LimitsEvents from \'@/tools/LimitsMonitor/LimitsEvents\'\nimport TopBar from \'@openc3/tool-common/src/components/TopBar\'\nimport Config from \'@openc3/tool-common/src/components/config/Config\'\nimport { OpenC3Api } from \'@openc3/tool-common/src/services/openc3-api\'\nimport OpenConfigDialog from \'@openc3/tool-common/src/components/config/OpenConfigDialog\'\nimport SaveConfigDialog from \'@openc3/tool-common/src/components/config/SaveConfigDialog\'\n\nexport default {\n components: {\n LimitsControl,\n LimitsEvents,\n TopBar,\n OpenConfigDialog,\n SaveConfigDialog,\n },\n mixins: [Config],\n data() {\n return {\n title: \'COSMOS Limits Monitor\',\n configKey: \'limits_monitor\',\n api: new OpenC3Api(),\n renderKey: 0,\n ignored: [],\n openConfig: false,\n saveConfig: false,\n limitsSets: [],\n currentLimitsSet: \'\',\n currentSetRefreshInterval: null,\n menus: [\n {\n label: \'File\',\n items: [\n {\n label: \'Show Ignored\',\n icon: \'mdi-magnify-close\',\n command: () => {\n this.$refs.control.showIgnored()\n },\n },\n {\n divider: true,\n },\n {\n label: \'Open Configuration\',\n icon: \'mdi-folder-open\',\n command: () => {\n this.openConfig = true\n },\n },\n {\n label: \'Save Configuration\',\n icon: \'mdi-content-save\',\n command: () => {\n this.saveConfig = true\n },\n },\n {\n label: \'Reset Configuration\',\n icon: \'mdi-monitor-shimmer\',\n command: () => {\n this.resetConfigBase()\n },\n },\n ],\n },\n ],\n }\n },\n watch: {\n currentLimitsSet: function (newVal, oldVal) {\n !!oldVal && this.limitsChange(newVal)\n },\n },\n created() {\n this.api.get_limits_sets().then((sets) => {\n this.limitsSets = sets\n })\n this.getCurrentLimitsSet()\n this.currentSetRefreshInterval = setInterval(\n this.getCurrentLimitsSet,\n 60 * 1000\n )\n },\n mounted: function () {\n const previousConfig = localStorage[`lastconfig__${this.configKey}`]\n // Called like /tools/limitsmonitor?config=ignored\n if (this.$route.query && this.$route.query.config) {\n this.openConfiguration(this.$route.query.config, true) // routed\n } else if (previousConfig) {\n this.openConfiguration(previousConfig)\n }\n },\n destroyed: function () {\n clearInterval(this.currentSetRefreshInterval)\n },\n methods: {\n getCurrentLimitsSet: function () {\n this.api.get_limits_set().then((result) => {\n this.currentLimitsSet = result\n })\n },\n limitsChange(value) {\n this.api.set_limits_set(value)\n this.renderKey++ // Trigger re-render\n },\n openConfiguration: function (name, routed = false) {\n this.openConfigBase(name, routed, (config) => {\n this.ignored = config\n this.renderKey++ // Trigger re-render\n })\n },\n saveConfiguration: function (name) {\n this.saveConfigBase(name, this.ignored)\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"bfd3211bb2cabf8430515215e77f28c8a2374036"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var s=o[e];return qe=function(){return s},s}qe();var Je={components:{LimitsControl:Ce,LimitsEvents:Ne,TopBar:De,OpenConfigDialog:Ge,SaveConfigDialog:ze},mixins:[He],data:function(){var e=this;return qe().f[0]++,qe().s[0]++,{title:"COSMOS Limits Monitor",configKey:"limits_monitor",api:new x,renderKey:0,ignored:[],openConfig:!1,saveConfig:!1,limitsSets:[],currentLimitsSet:"",currentSetRefreshInterval:null,menus:[{label:"File",items:[{label:"Show Ignored",icon:"mdi-magnify-close",command:function(){qe().f[1]++,qe().s[1]++,e.$refs.control.showIgnored()}},{divider:!0},{label:"Open Configuration",icon:"mdi-folder-open",command:function(){qe().f[2]++,qe().s[2]++,e.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:function(){qe().f[3]++,qe().s[3]++,e.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:function(){qe().f[4]++,qe().s[4]++,e.resetConfigBase()}}]}]}},watch:{currentLimitsSet:function(e,n){qe().f[5]++,qe().s[5]++,qe().b[0][0]++,n&&(qe().b[0][1]++,this.limitsChange(e))}},created:function(){var e=this;qe().f[6]++,qe().s[6]++,this.api.get_limits_sets().then((function(n){qe().f[7]++,qe().s[7]++,e.limitsSets=n})),qe().s[8]++,this.getCurrentLimitsSet(),qe().s[9]++,this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4)},mounted:function(){qe().f[8]++;var e=(qe().s[10]++,localStorage["lastconfig__".concat(this.configKey)]);qe().s[11]++,qe().b[2][0]++,this.$route.query&&(qe().b[2][1]++,this.$route.query.config)?(qe().b[1][0]++,qe().s[12]++,this.openConfiguration(this.$route.query.config,!0)):(qe().b[1][1]++,qe().s[13]++,e?(qe().b[3][0]++,qe().s[14]++,this.openConfiguration(e)):qe().b[3][1]++)},destroyed:function(){qe().f[9]++,qe().s[15]++,clearInterval(this.currentSetRefreshInterval)},methods:{getCurrentLimitsSet:function(){var e=this;qe().f[10]++,qe().s[16]++,this.api.get_limits_set().then((function(n){qe().f[11]++,qe().s[17]++,e.currentLimitsSet=n}))},limitsChange:function(e){qe().f[12]++,qe().s[18]++,this.api.set_limits_set(e),qe().s[19]++,this.renderKey++},openConfiguration:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(qe().b[4][0]++,!1);qe().f[13]++,qe().s[20]++,this.openConfigBase(e,t,(function(e){qe().f[14]++,qe().s[21]++,n.ignored=e,qe().s[22]++,n.renderKey++}))},saveConfiguration:function(e){qe().f[15]++,qe().s[23]++,this.saveConfigBase(e,this.ignored)}}},Xe=Je,Qe=(0,D.Z)(Xe,l,o,!1,null,null,null),en=Qe.exports},6959:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".textfield-green[data-v-b0d7e182] .v-text-field__slot input,.textfield-green[data-v-b0d7e182] .v-text-field__slot label{color:#00c800}.textfield-yellow[data-v-b0d7e182] .v-text-field__slot input,.textfield-yellow[data-v-b0d7e182] .v-text-field__slot label{color:#ffdc00}.textfield-red[data-v-b0d7e182] .v-text-field__slot input,.textfield-red[data-v-b0d7e182] .v-text-field__slot label{color:#ff2d2d}",""]),n["default"]=a},3208:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".label[data-v-1e0f0ab0]{font-weight:700;text-transform:capitalize}[data-v-1e0f0ab0] .v-input--selection-controls{padding:0;margin:0}",""]),n["default"]=a},6294:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".v-list[data-v-2eb37f67] .v-label{margin-left:5px}.v-list-item__icon[data-v-2eb37f67]{margin-right:15px!important}.v-list-item__title[data-v-2eb37f67]{color:#fff}",""]),n["default"]=a},8748:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".label[data-v-19db816e]{font-family:var(--font-family);font-size:var(--font-size);font-weight:var(--font-weight);font-style:var(--font-style)}",""]),n["default"]=a},6934:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".card-height[data-v-3e3badba]{height:calc(100vh - 150px)}",""]),n["default"]=a},642:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".limitsbar[data-v-344f6330]{cursor:default;display:flex;justify-content:center;align-items:center;padding:5px;padding-top:15px;width:var(--width)}.limitsbar__container[data-v-344f6330]{position:relative;flex:1;height:var(--container-height);border:1px solid #000;background-color:#fff}.limitsbar__redlow[data-v-344f6330]{left:0;width:var(--redlow-width)}.limitsbar__redhigh[data-v-344f6330],.limitsbar__redlow[data-v-344f6330]{position:absolute;top:-1px;height:var(--container-height);background-color:#ff2d2d}.limitsbar__redhigh[data-v-344f6330]{right:0;width:var(--redhigh-width)}.limitsbar__yellowlow[data-v-344f6330]{left:var(--redlow-width);width:var(--yellowlow-width)}.limitsbar__yellowhigh[data-v-344f6330],.limitsbar__yellowlow[data-v-344f6330]{position:absolute;top:-1px;height:var(--container-height);background-color:#ffdc00}.limitsbar__yellowhigh[data-v-344f6330]{right:var(--redhigh-width);width:var(--yellowhigh-width)}.limitsbar__greenlow[data-v-344f6330]{left:calc(var(--redlow-width) + var(--yellowlow-width));width:var(--greenlow-width)}.limitsbar__greenhigh[data-v-344f6330],.limitsbar__greenlow[data-v-344f6330]{position:absolute;top:-1px;height:var(--container-height);background-color:#00c800}.limitsbar__greenhigh[data-v-344f6330]{right:calc(var(--redhigh-width) + var(--yellowhigh-width));width:var(--greenhigh-width)}.limitsbar__blue[data-v-344f6330]{top:-1px;left:calc(var(--redlow-width) + var(--yellowlow-width) + var(--greenlow-width));width:var(--blue-width);background-color:#09f}.limitsbar__blue[data-v-344f6330],.limitsbar__line[data-v-344f6330]{position:absolute;height:var(--container-height)}.limitsbar__line[data-v-344f6330]{left:var(--position);width:1px;background-color:gray}.limitsbar__arrow[data-v-344f6330]{position:absolute;top:-5px;left:var(--position);width:0;height:0;-webkit-transform:translateX(-5px);transform:translateX(-5px);border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid gray}",""]),n["default"]=a},5471:function(e,n,t){"use strict";t.r(n);var i=t(9601),l=t.n(i),o=t(2609),s=t.n(o),a=s()(l());a.push([e.id,".value-widget-container[data-v-2750a386]{min-height:34px}.value-widget-container[data-v-2750a386] .v-input__slot{background:rgba(var(--aging),var(--aging),var(--aging),1)!important}.value-widget-container[data-v-2750a386] input{text-align:var(--text-align)!important}.value[data-v-2750a386] div{min-height:24px!important;display:flex!important;align-items:center!important}.openc3-green[data-v-2750a386] input{color:#00c800}.openc3-yellow[data-v-2750a386] input{color:#ffdc00}.openc3-red[data-v-2750a386] input{color:#ff2d2d}.openc3-blue[data-v-2750a386] input{color:#09f}.openc3-purple[data-v-2750a386] input{color:#c800c8}.openc3-black[data-v-2750a386] input{color:#000}.openc3-white[data-v-2750a386] input{color:#fff}",""]),n["default"]=a},1505:function(e,n,t){var i=t(6959);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("66ee0da9",i,!0,{sourceMap:!1,shadowMode:!1})},3270:function(e,n,t){var i=t(3208);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("c388abcc",i,!0,{sourceMap:!1,shadowMode:!1})},4888:function(e,n,t){var i=t(6294);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("706a3f6d",i,!0,{sourceMap:!1,shadowMode:!1})},8489:function(e,n,t){var i=t(8748);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("a05f0e64",i,!0,{sourceMap:!1,shadowMode:!1})},21:function(e,n,t){var i=t(6934);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("3c1e7368",i,!0,{sourceMap:!1,shadowMode:!1})},9731:function(e,n,t){var i=t(642);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("6fee9274",i,!0,{sourceMap:!1,shadowMode:!1})},19:function(e,n,t){var i=t(5471);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("c59cda46",i,!0,{sourceMap:!1,shadowMode:!1})}}]);
2
2
  //# sourceMappingURL=609.js.map