openc3-cosmos-tool-tlmgrapher 5.11.3 → 5.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59ff109d3c4034515d67724f4e55c9e883b3bef809406644028b9e2bcc930eef
4
- data.tar.gz: c1769a11c214115cc60b4bb4e5e99915990fff3dff27fdd6ba4ba5d71b0e380f
3
+ metadata.gz: 3785c4f74c773f3a89df537162759649b83fdb4f5646daa066fba00999cf66ff
4
+ data.tar.gz: 896ba33615e2b08d6b35e96779bc0f59b1fd123a00d85fe7e2759f94cbce9249
5
5
  SHA512:
6
- metadata.gz: defe778c9999dc8a5989cd9674649494f774c044ac468e9d118c2d6ec4c1cc7171d05055b8495703b7be7bfeab04642e127e6b562e224615b2b860da070bc226
7
- data.tar.gz: bddc5e15c63da9802a72107f209a76c9b098731f33a82712176fea93eda8e4ae42bba3b70371f10606a300a9d5c1a0b001bd053277e096234240dd243cac6138
6
+ metadata.gz: 13e99187bf59e2c49ef565f769a34833a6c351456cef0f39d54fbc724a5ac45623ebfbef8d0a2a1f4ab8cf488a5feb5bc791d321bc2d43405499d95095292c4f
7
+ data.tar.gz: b71d41a348bde603a83f9d90f43837305fb093e61035edffe9462f80bf838636494a7f52fd850df50262a9e12ecd84d65bf41f96749f0477ce2a3f9ba9dc486d
@@ -0,0 +1,2 @@
1
+ (self["webpackChunk_openc3_cosmos_tool_tlmgrapher"]=self["webpackChunk_openc3_cosmos_tool_tlmgrapher"]||[]).push([[350],{9350:(e,t,n)=>{"use strict";function i(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/TlmGrapher.vue",t="2359e2d2d3179d085ed77c249df115856a0b40a1",n=new Function("return this")(),s="__coverage__",a={path:"/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/TlmGrapher.vue",statementMap:{0:{start:{line:1,column:13},end:{line:6,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:5,column:1787}},4:{start:{line:1,column:260},end:{line:1,column:273}},5:{start:{line:2,column:20},end:{line:2,column:39}},6:{start:{line:4,column:20},end:{line:4,column:39}},7:{start:{line:5,column:195},end:{line:5,column:973}},8:{start:{line:5,column:732},end:{line:5,column:753}},9:{start:{line:5,column:776},end:{line:5,column:798}},10:{start:{line:5,column:814},end:{line:5,column:826}},11:{start:{line:5,column:842},end:{line:5,column:861}},12:{start:{line:5,column:878},end:{line:5,column:897}},13:{start:{line:5,column:913},end:{line:5,column:937}},14:{start:{line:5,column:1169},end:{line:5,column:1191}},15:{start:{line:5,column:1421},end:{line:5,column:1443}},16:{start:{line:5,column:1721},end:{line:5,column:1747}},17:{start:{line:7,column:22},end:{line:7,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:6,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:244},end:{line:1,column:245}},loc:{start:{line:1,column:259},end:{line:1,column:274}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:1617},end:{line:1,column:1618}},loc:{start:{line:1,column:1623},end:{line:3,column:19}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:3,column:284},end:{line:3,column:285}},loc:{start:{line:3,column:290},end:{line:5,column:19}},line:3},4:{name:"(anonymous_4)",decl:{start:{line:5,column:179},end:{line:5,column:180}},loc:{start:{line:5,column:194},end:{line:5,column:974}},line:5},5:{name:"(anonymous_5)",decl:{start:{line:5,column:726},end:{line:5,column:727}},loc:{start:{line:5,column:732},end:{line:5,column:753}},line:5},6:{name:"(anonymous_6)",decl:{start:{line:5,column:770},end:{line:5,column:771}},loc:{start:{line:5,column:776},end:{line:5,column:798}},line:5},7:{name:"(anonymous_7)",decl:{start:{line:5,column:808},end:{line:5,column:809}},loc:{start:{line:5,column:814},end:{line:5,column:826}},line:5},8:{name:"(anonymous_8)",decl:{start:{line:5,column:835},end:{line:5,column:836}},loc:{start:{line:5,column:842},end:{line:5,column:861}},line:5},9:{name:"(anonymous_9)",decl:{start:{line:5,column:871},end:{line:5,column:872}},loc:{start:{line:5,column:878},end:{line:5,column:897}},line:5},10:{name:"(anonymous_10)",decl:{start:{line:5,column:907},end:{line:5,column:908}},loc:{start:{line:5,column:913},end:{line:5,column:937}},line:5},11:{name:"(anonymous_11)",decl:{start:{line:5,column:1153},end:{line:5,column:1154}},loc:{start:{line:5,column:1168},end:{line:5,column:1192}},line:5},12:{name:"(anonymous_12)",decl:{start:{line:5,column:1405},end:{line:5,column:1406}},loc:{start:{line:5,column:1420},end:{line:5,column:1444}},line:5},13:{name:"(anonymous_13)",decl:{start:{line:5,column:1705},end:{line:5,column:1706}},loc:{start:{line:5,column:1720},end:{line:5,column:1748}},line:5}},branchMap:{0:{loc:{start:{line:5,column:993},end:{line:5,column:1232}},type:"cond-expr",locations:[{start:{line:5,column:1014},end:{line:5,column:1223}},{start:{line:5,column:1224},end:{line:5,column:1232}}],line:5},1:{loc:{start:{line:5,column:1245},end:{line:5,column:1484}},type:"cond-expr",locations:[{start:{line:5,column:1266},end:{line:5,column:1475}},{start:{line:5,column:1476},end:{line:5,column:1484}}],line:5}},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},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},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2359e2d2d3179d085ed77c249df115856a0b40a1"},l=n[s]||(n[s]={});l[e]&&l[e].hash===t||(l[e]=a);var o=l[e];return i=function(){return o},o}n.r(t),n.d(t,{default:()=>Ie}),i(),i().s[0]++;var s=function(){i().f[0]++;var e=(i().s[1]++,this),t=(i().s[2]++,e._self._c);return i().s[3]++,t("div",[t("top-bar",{attrs:{menus:e.menus,title:e.title}}),e._v(" "),t("v-expansion-panels",{staticStyle:{"margin-bottom":"5px"},model:{value:e.panel,callback:function(t){i().f[1]++,i().s[4]++,e.panel=t},expression:"panel"}},[t("v-expansion-panel",[t("v-expansion-panel-header",{staticStyle:{"z-index":"1"}}),e._v(" "),t("v-expansion-panel-content",[t("v-card",[t("div",{directives:[{name:"show",rawName:"v-show",value:null===this.selectedGraphId,expression:"this.selectedGraphId === null"}]},[t("v-row",{staticClass:"my-5"},[t("v-spacer"),e._v(" "),t("span",[e._v("\n Add a graph from the menu bar or select an existing graph to\n continue\n ")]),e._v(" "),t("v-spacer")],1)],1),e._v(" "),t("v-row",{directives:[{name:"show",rawName:"v-show",value:null!==this.selectedGraphId,expression:"this.selectedGraphId !== null"}],staticClass:"px-1",attrs:{justify:"space-between"}},[t("v-col",{staticStyle:{"padding-bottom":"0px"},attrs:{cols:"11"}},[t("target-packet-item-chooser",{attrs:{"initial-target-name":this.$route.params.target,"initial-packet-name":this.$route.params.packet,"initial-item-name":this.$route.params.item,"button-text":"Add Item","choose-item":"","select-types":""},on:{click:e.addItem}})],1),e._v(" "),t("v-col",{attrs:{cols:"1"}},[t("v-btn",{directives:[{name:"show",rawName:"v-show",value:"pause"===e.state,expression:"state === 'pause'"}],staticClass:"pulse",attrs:{color:"primary",fab:"","data-test":"start-graph"},on:{click:()=>{i().f[2]++,i().s[5]++,e.state="start"}}},[t("v-icon",{attrs:{large:""}},[e._v("mdi-play")])],1),e._v(" "),t("v-btn",{directives:[{name:"show",rawName:"v-show",value:"start"===e.state,expression:"state === 'start'"}],attrs:{color:"primary",fab:"","data-test":"pause-graph"},on:{click:()=>{i().f[3]++,i().s[6]++,e.state="pause"}}},[t("v-icon",{attrs:{large:""}},[e._v("mdi-pause")])],1)],1)],1)],1)],1)],1)],1),e._v(" "),t("div",[t("div",{staticClass:"grid"},e._l(e.graphs,(function(n){return i().f[4]++,i().s[7]++,t("div",{key:n,ref:`gridItem${n}`,refInFor:!0,staticClass:"item",attrs:{id:`gridItem${n}`}},[t("div",{staticClass:"item-content"},[t("graph",{ref:`graph${n}`,refInFor:!0,attrs:{id:n,state:e.state,"start-time":e.startTime,"selected-graph-id":e.selectedGraphId,"seconds-graphed":e.settings.secondsGraphed.value,"points-saved":e.settings.pointsSaved.value,"points-graphed":e.settings.pointsGraphed.value,"refresh-interval-ms":e.settings.refreshIntervalMs.value},on:{"close-graph":()=>(i().f[5]++,i().s[8]++,e.closeGraph(n)),"min-max-graph":()=>(i().f[6]++,i().s[9]++,e.minMaxGraph(n)),resize:()=>(i().f[7]++,i().s[10]++,e.resize()),pause:()=>(i().f[8]++,i().s[11]++,e.state="pause"),start:()=>(i().f[9]++,i().s[12]++,e.state="start"),click:()=>(i().f[10]++,i().s[13]++,e.graphSelected(n)),started:e.graphStarted}})],1)])})),0)]),e._v(" "),e.showOpenConfig?(i().b[0][0]++,t("open-config-dialog",{attrs:{configKey:e.configKey},on:{success:e.openConfiguration},model:{value:e.showOpenConfig,callback:function(t){i().f[11]++,i().s[14]++,e.showOpenConfig=t},expression:"showOpenConfig"}})):(i().b[0][1]++,e._e()),e._v(" "),e.showSaveConfig?(i().b[1][0]++,t("save-config-dialog",{attrs:{configKey:e.configKey},on:{success:e.saveConfiguration},model:{value:e.showSaveConfig,callback:function(t){i().f[12]++,i().s[15]++,e.showSaveConfig=t},expression:"showSaveConfig"}})):(i().b[1][1]++,e._e()),e._v(" "),t("settings-dialog",{directives:[{name:"show",rawName:"v-show",value:e.showSettingsDialog,expression:"showSettingsDialog"}],attrs:{settings:e.settings},model:{value:e.showSettingsDialog,callback:function(t){i().f[13]++,i().s[16]++,e.showSettingsDialog=t},expression:"showSettingsDialog"}})],1)},a=(i().s[17]++,[]),l=(n(309),n(4936),n(1531),n(2261)),o=(n(978),n(5984),n(7380),n(527),n(1697),n(9394),n(3438),n(3616),n(5630),n(896),n(4139),n(9644)),r=n.n(o),c=n(4091);const d=new c["default"],u=r().create({baseURL:location.origin,timeout:6e4,params:{}});u.interceptors.response.use((e=>e),(e=>{if(e.response){var t,n,i,s,a;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);let o=`HTTP ${e.response.status} - `;if(null!==(t=e.response)&&void 0!==t&&t.statusText&&(o+=`${e.response.statusText} `),null!==(n=e.response)&&void 0!==n&&null!==(n=n.config)&&void 0!==n&&n.data&&(o+=`${e.response.config.data} `),null!==(i=e.response)&&void 0!==i&&null!==(i=i.data)&&void 0!==i&&i.message)o+=`${e.response.data.message}`;else if(null!==(s=e.response)&&void 0!==s&&null!==(s=s.data)&&void 0!==s&&s.exception)o+=`${e.response.data.exception}`;else if(null!==(a=e.response)&&void 0!==a&&null!==(a=a.data)&&void 0!==a&&null!==(a=a.error)&&void 0!==a&&a.message)e.response.data.error.class&&(o+=`${e.response.data.error.class} `),o+=`${e.response.data.error.message}`;else{var l;o+=`${null===(l=e.response)||void 0===l?void 0:l.data}`}throw d.$notify&&d.$notify.serious({title:"Network error",body:o}),e}throw e}));const m=u;class h{constructor(){(0,l.Z)(this,"id",1)}async exec(e,t,n={},i={},s=6e4){try{let e=await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);e&&OpenC3Auth.setTokens()}catch(l){OpenC3Auth.login()}this.id=this.id+1;try{n["scope"]=window.openc3Scope;const a=await m.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:t,id:this.id,keyword_params:n},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...i},timeout:s});return a.data.result}catch(l){var a=new Error;throw l.response?(a.name=l.response.data.error.data.class,a.message=l.response.data.error.data.message):l.request?(a.name="Request error",a.message="Request error, no response received"):a.name="Unknown error",a}}decode_openc3_type(e){if(null!==e&&"object"===typeof 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}encode_openc3_type(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}ensure_offline_access(){this.offline_access_needed().then((e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then((()=>{delete localStorage.openc3OfflineToken})):OpenC3Auth.getOfflineAccess())}))}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,t){return this.exec("map_target_to_interface",[e,t])}connect_interface(e,...t){return t.length>0?this.exec("connect_interface",[e,...t]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_all_target_info(){return this.exec("get_all_target_info",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,t,n){return this.exec("get_item",[e,t,n])}get_parameter(e,t,n){return this.exec("get_parameter",[e,t,n])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_list(){return this.exec("get_target_list",[])}get_target_names(){return this.exec("get_target_names",[])}get_telemetry(e,t){return this.exec("get_telemetry",[e,t])}get_all_telemetry(e){return this.exec("get_all_telemetry",[e])}get_all_telemetry_names(e){return this.exec("get_all_telemetry_names",[e])}async get_tlm_packet(e,t,n,i=30){const s=await this.exec("get_tlm_packet",[e,t],{type:n,stale_time:i});if(null!=s)for(var a=s.length,l=null,o=0;o<a;o++)l=this.decode_openc3_type(s[o][1]),null!==l&&(s[o][1]=l);return s}get_packet_derived_items(e,t){return this.exec("get_packet_derived_items",[e,t])}get_tlm_buffer(e,t){return this.exec("get_tlm_buffer",[e,t])}async get_tlm_values(e,t=30){const n=await this.exec("get_tlm_values",[e],{stale_time:t},{},1e4);for(var i=n[0].length,s=null,a=0;a<i;a++)s=this.decode_openc3_type(n[0][a]),null!==s&&(n[0][a]=s);return n}get_limits(e,t,n){return this.exec("get_limits",[e,t,n])}async tlm(e,t,n,i="CONVERTED"){let s=null;if(void 0===t)s=await this.exec("tlm",[e]);else if(void 0===n){if(!["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(t)){var a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${t}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}s=await this.exec("tlm",[e],{type:t})}else s=await this.exec("tlm",[e,t,n],{type:i});var l=this.decode_openc3_type(s);return null!==l&&(s=l),s}async inject_tlm(e,t,n=null,i="CONVERTED"){data=await this.exec("inject_tlm",[e,t,n],{type:i})}set_tlm(e,t,n,i){return this.exec("set_tlm",[e,t,n],{type:i})}override_tlm(e,t,n,i){return this.exec("override_tlm",[e,t,n],{type:i})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,t,n,i){return this.exec("normalize_tlm",[e,t,n],{type:i})}get_all_commands(e){return this.exec("get_all_commands",[e])}get_all_command_names(e){return this.exec("get_all_command_names",[e])}get_command(e,t){return this.exec("get_command",[e,t])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,t,n,i="CONVERTED"){return this.exec("get_cmd_value",[e,t,n,i])}get_cmd_buffer(e,t){return this.exec("get_cmd_buffer",[e,t])}_cmd(e,t,n,i,s){var a=null;for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(a=this.encode_openc3_type(i[l]),null!==a&&(i[l]=a));return this.exec(e,[t,n,i],{},s)}get_cmd_hazardous(e,t,n){return void 0===t?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,t,n)}cmd(e,t,n,i={}){return void 0===t?this.exec("cmd",e,{},i):this._cmd("cmd",e,t,n,i)}cmd_no_range_check(e,t,n){return void 0===t?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,t,n)}cmd_raw(e,t,n){return void 0===t?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,t,n)}cmd_raw_no_range_check(e,t,n){return void 0===t?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,t,n)}cmd_no_hazardous_check(e,t,n){return void 0===t?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,t,n)}cmd_no_checks(e,t,n){return void 0===t?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,t,n)}cmd_raw_no_hazardous_check(e,t,n){return void 0===t?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,t,n)}cmd_raw_no_checks(e,t,n){return void 0===t?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,t,n)}build_command(e,t,n){return void 0===t?this.exec("build_command",e):this._cmd("build_command",e,t,n)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,t){return this.exec("send_raw",[e,t])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,t){return this.exec("load_config",[e,t])}save_config(e,t,n){return this.exec("save_config",[e,t,n])}delete_config(e,t){return this.exec("delete_config",[e,t])}enable_limits(e,t,n){return this.exec("enable_limits",[e,t,n])}disable_limits(e,t,n){return this.exec("disable_limits",[e,t,n])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,t){return this.exec("set_setting",[e,t])}save_setting(e,t){return this.exec("save_setting",[e,t])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const t=(new TextEncoder).encode(e),n=await crypto.subtle.digest("SHA-256",t),i=new Uint8Array(n);return Array.from(i).map((e=>e.toString(16).padStart(2,"0"))).join("")}}}const p={data:{configKey:""},methods:{openConfigBase:function(e,t=!1,n=null){localStorage[`lastconfig__${this.configKey}`]=e,(new h).load_config(this.configKey,e).then((i=>{i?(this.$notify.normal({title:"Loading configuration",body:e}),n&&n(JSON.parse(i)),t||this.$router.currentRoute.fullPath.includes(e)||this.$router.push({query:{config:e}}),localStorage[`lastconfig__${this.configKey}`]=e):(this.$notify.caution({title:"Unknown configuration",body:e}),localStorage.removeItem(`lastconfig__${this.configKey}`))})).catch((t=>{t&&this.$notify.serious({title:`Error opening configuration: ${e}`,body:t}),localStorage.removeItem(`lastconfig__${this.configKey}`)}))},saveConfigBase:function(e,t){(new h).save_config(this.configKey,e,JSON.stringify(t)).then((()=>{this.$notify.normal({title:"Saved configuration",body:e}),localStorage[`lastconfig__${this.configKey}`]=e})).catch((t=>{t&&this.$notify.serious({title:`Error saving configuration: ${e}`,body:t}),localStorage.removeItem(`lastconfig__${this.configKey}`)}))},resetConfigBase:function(){localStorage.removeItem(`lastconfig__${this.configKey}`),"/"!==this.$router.currentRoute.fullPath&&this.$router.replace(this.$router.currentRoute.path),this.$router.go()}}};var v=function(){var e=this,t=e._self._c;return t("div",[t("v-card",{nativeOn:{click:function(t){return e.$emit("click")}}},[t("v-system-bar",{directives:[{name:"show",rawName:"v-show",value:!e.hideSystemBar,expression:"!hideSystemBar"}],class:e.selectedGraphId===e.id?"active":"inactive"},[t("div",{directives:[{name:"show",rawName:"v-show",value:0!==e.errors.length,expression:"errors.length !== 0"}],staticClass:"mx-2"},[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[t("div",e._g(e._b({},"div",i,!1),n),[t("v-icon",{attrs:{"data-test":"error-graph-icon"},on:{click:function(t){e.errorDialog=!0}}},[e._v("mdi-alert")])],1)]}}])},[e._v(" "),t("span",[e._v("Errors")])])],1),e._v(" "),t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[t("div",e._g(e._b({},"div",i,!1),n),[t("v-icon",{attrs:{"data-test":"edit-graph-icon"},on:{click:function(t){e.editGraph=!0}}},[e._v("\n mdi-pencil\n ")])],1)]}}])},[e._v(" "),t("span",[e._v(" Edit ")])]),e._v(" "),t("v-spacer"),e._v(" "),t("span",[e._v(e._s(e.title))]),e._v(" "),t("v-spacer"),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}]},[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[t("div",e._g(e._b({},"div",i,!1),n),[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:e.calcFullSize,expression:"calcFullSize"}],attrs:{"data-test":"collapse-all"},on:{click:e.collapseAll}},[e._v("\n mdi-arrow-collapse\n ")]),e._v(" "),t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.calcFullSize,expression:"!calcFullSize"}],attrs:{"data-test":"expand-all"},on:{click:e.expandAll}},[e._v("\n mdi-arrow-expand\n ")])],1)]}}])},[e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:e.calcFullSize,expression:"calcFullSize"}]},[e._v(" Collapse ")]),e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:!e.calcFullSize,expression:"!calcFullSize"}]},[e._v(" Expand ")])])],1),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}]},[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[t("div",e._g(e._b({},"div",i,!1),n),[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:e.fullWidth,expression:"fullWidth"}],attrs:{"data-test":"collapse-width"},on:{click:e.collapseWidth}},[e._v("\n mdi-arrow-collapse-horizontal\n ")]),e._v(" "),t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.fullWidth,expression:"!fullWidth"}],attrs:{"data-test":"expand-width"},on:{click:e.expandWidth}},[e._v("\n mdi-arrow-expand-horizontal\n ")])],1)]}}])},[e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:e.fullWidth,expression:"fullWidth"}]},[e._v(" Collapse Width ")]),e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:!e.fullWidth,expression:"!fullWidth"}]},[e._v(" Expand Width ")])])],1),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}]},[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[t("div",e._g(e._b({},"div",i,!1),n),[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:e.fullHeight,expression:"fullHeight"}],attrs:{"data-test":"collapse-height"},on:{click:e.collapseHeight}},[e._v("\n mdi-arrow-collapse-vertical\n ")]),e._v(" "),t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.fullHeight,expression:"!fullHeight"}],attrs:{"data-test":"expand-height"},on:{click:e.expandHeight}},[e._v("\n mdi-arrow-expand-vertical\n ")])],1)]}}])},[e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:e.fullHeight,expression:"fullHeight"}]},[e._v(" Collapse Height ")]),e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:!e.fullHeight,expression:"!fullHeight"}]},[e._v(" Expand Height ")])])],1),e._v(" "),t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[t("div",e._g(e._b({},"div",i,!1),n),[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}],attrs:{"data-test":"minimize-screen-icon"},on:{click:e.minMaxTransition}},[e._v("\n mdi-window-minimize\n ")]),e._v(" "),t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.expand,expression:"!expand"}],attrs:{"data-test":"maximize-screen-icon"},on:{click:e.minMaxTransition}},[e._v("\n mdi-window-maximize\n ")])],1)]}}])},[e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}]},[e._v(" Minimize ")]),e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:!e.expand,expression:"!expand"}]},[e._v(" Maximize ")])]),e._v(" "),t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[t("div",e._g(e._b({},"div",i,!1),n),[t("v-icon",{attrs:{"data-test":"close-graph-icon"},on:{click:function(t){return e.$emit("close-graph")}}},[e._v("\n mdi-close-box\n ")])],1)]}}])},[e._v(" "),t("span",[e._v(" Close ")])])],1),e._v(" "),t("v-expand-transition",[t("div",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}],ref:"chart",staticClass:"pa-1",attrs:{id:"chart"}},[t("div",{attrs:{id:`chart${e.id}`}}),e._v(" "),t("div",{attrs:{id:"betweenCharts"}}),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.showOverview,expression:"showOverview"}],attrs:{id:`overview${e.id}`}})])])],1),e._v(" "),t("v-dialog",{attrs:{"max-width":"600"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("input")},input:function(t){return e.editGraphClose()}},model:{value:e.editGraph,callback:function(t){e.editGraph=t},expression:"editGraph"}},[t("v-system-bar",[t("v-spacer"),e._v(" "),t("span",[e._v("Edit Graph")]),e._v(" "),t("v-spacer")],1),e._v(" "),t("v-card",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"pb-2",attrs:{label:"Title","hide-details":"","data-test":"edit-graph-title"},model:{value:e.title,callback:function(t){e.title=t},expression:"title"}})],1),e._v(" "),t("v-card-text",{staticClass:"pa-0"},[e._v("\n Select a start date/time for the graph. Leave blank for start now.\n ")]),e._v(" "),t("date-time-chooser",{attrs:{required:!1,"date-label":"Start Date","time-label":"Start Time","date-time":e.graphStartDateTime},on:{"date-time":function(t){e.graphStartDateTime=t}}}),e._v(" "),t("v-card-text",{staticClass:"pa-0"},[e._v("\n Select a end date/time for the graph. Leave blank for continuous\n real-time graphing.\n ")]),e._v(" "),t("date-time-chooser",{attrs:{"date-label":"End Date","time-label":"End Time","date-time":e.graphEndDateTime},on:{"date-time":function(t){e.graphEndDateTime=t}}}),e._v(" "),t("v-row",{attrs:{dense:""}},[t("v-select",{attrs:{label:"Legend Position",items:e.legendPositions,"data-test":"edit-legend-position"},model:{value:e.legendPosition,callback:function(t){e.legendPosition=t},expression:"legendPosition"}})],1),e._v(" "),t("v-card-text",{staticClass:"pa-0"},[e._v(" Optional Y axis settings. ")]),e._v(" "),t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"px-2"},[t("v-text-field",{attrs:{"hide-details":"",label:"Min Y",type:"number","data-test":"graph-min-y"},model:{value:e.graphMinY,callback:function(t){e.graphMinY=t},expression:"graphMinY"}})],1),e._v(" "),t("v-col",{staticClass:"px-2"},[t("v-text-field",{attrs:{"hide-details":"",label:"Max Y",type:"number","data-test":"graph-max-y"},model:{value:e.graphMaxY,callback:function(t){e.graphMaxY=t},expression:"graphMaxY"}})],1)],1),e._v(" "),t("v-data-table",{staticClass:"elevation-1 my-2",attrs:{"item-key":"itemId",headers:e.itemHeaders,items:e.editItems,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},scopedSlots:e._u([{key:"item.actions",fn:function({item:n}){return[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function({on:i,attrs:s}){return[t("div",e._g(e._b({},"div",s,!1),i),[t("v-btn",{attrs:{icon:"","data-test":`delete-item-icon${n.itemId}`},on:{click:()=>e.removeItems([n])}},[t("v-icon",[e._v("mdi-delete")])],1)],1)]}}],null,!0)},[e._v(" "),t("span",[e._v("Remove")])])]}},{key:"no-data",fn:function(){return[t("span",[e._v("Currently no items on this graph")])]},proxy:!0}])}),e._v(" "),t("v-card-actions",[t("v-btn",{attrs:{color:"primary"},on:{click:e.editGraphClose}},[e._v(" Ok ")])],1)],1)],1),e._v(" "),t("v-dialog",{attrs:{"max-width":"600"},model:{value:e.errorDialog,callback:function(t){e.errorDialog=t},expression:"errorDialog"}},[t("v-system-bar",[t("v-spacer"),e._v(" "),t("span",[e._v("Errors")]),e._v(" "),t("v-spacer")],1),e._v(" "),t("v-card",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"pb-2",attrs:{readonly:"","hide-details":"",label:"Graph Title"},model:{value:e.title,callback:function(t){e.title=t},expression:"title"}})],1),e._v(" "),t("v-row",{staticClass:"my-3"},[t("v-textarea",{attrs:{readonly:"",rows:"8",value:e.error}})],1),e._v(" "),t("v-row",[t("v-btn",{attrs:{block:""},on:{click:e.clearErrors}},[e._v(" Clear ")])],1)],1)],1),e._v(" "),e.editGraphMenu?t("v-menu",{attrs:{"position-x":e.editGraphMenuX,"position-y":e.editGraphMenuY,absolute:"","offset-y":""},model:{value:e.editGraphMenu,callback:function(t){e.editGraphMenu=t},expression:"editGraphMenu"}},[t("v-list",[t("v-list-item",{on:{click:function(t){e.editGraph=!0}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v("\n Edit "+e._s(e.title)+"\n ")])],1)],1)],1):e._e(),e._v(" "),e.editItem?t("graph-edit-item-dialog",{attrs:{colors:e.colors,item:e.selectedItem},on:{changeColor:e.changeColor,changeLimits:e.changeLimits,cancel:function(t){e.editItem=!1},close:e.closeEditItem},model:{value:e.editItem,callback:function(t){e.editItem=t},expression:"editItem"}}):e._e(),e._v(" "),e.itemMenu?t("v-menu",{attrs:{"position-x":e.itemMenuX,"position-y":e.itemMenuY,absolute:"","offset-y":""},model:{value:e.itemMenu,callback:function(t){e.itemMenu=t},expression:"itemMenu"}},[t("v-list",{attrs:{nav:"",dense:""}},[t("v-subheader",[e._v("\n "+e._s(e.selectedItem.targetName)+"\n "+e._s(e.selectedItem.packetName)+"\n "+e._s(e.selectedItem.itemName)+"\n ")]),e._v(" "),t("v-list-item",{on:{click:function(t){e.editItem=!0}}},[t("v-list-item-icon",[t("v-icon",[e._v("mdi-pencil")])],1),e._v(" "),t("v-list-item-content",[t("v-list-item-title",[e._v(" Edit ")])],1)],1),e._v(" "),t("v-list-item",{on:{click:function(t){return e.removeItems([e.selectedItem])}}},[t("v-list-item-icon",[t("v-icon",[e._v("mdi-delete")])],1),e._v(" "),t("v-list-item-content",[t("v-list-item-title",[e._v(" Delete ")])],1)],1)],1)],1):e._e(),e._v(" "),e.legendMenu?t("v-menu",{attrs:{"position-x":e.legendMenuX,"position-y":e.legendMenuY,absolute:"","offset-y":""},model:{value:e.legendMenu,callback:function(t){e.legendMenu=t},expression:"legendMenu"}},[t("v-list",[t("v-list-item",{on:{click:function(t){return e.moveLegend("top")}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v("Legend Top")])],1),e._v(" "),t("v-list-item",{on:{click:function(t){return e.moveLegend("bottom")}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v("Legend Bottom")])],1),e._v(" "),t("v-list-item",{on:{click:function(t){return e.moveLegend("left")}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v("Legend Left")])],1),e._v(" "),t("v-list-item",{on:{click:function(t){return e.moveLegend("right")}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v("Legend RIght")])],1)],1)],1):e._e()],1)},g=[],A=(n(5127),n(2464),function(){var e=this,t=e._self._c;return t("div",[t("v-row",[t("v-col",[t("v-menu",{attrs:{"close-on-content-click":"",transition:"scale-transition","offset-y":"","max-width":"290px","min-width":"290px"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("v-text-field",e._g({attrs:{label:e.dateLabel,name:`date${Date.now()}`,rules:e.dateRules,type:"date","data-test":"date-chooser"},model:{value:e.date,callback:function(t){e.date=t},expression:"date"}},n))]}}])})],1),e._v(" "),t("v-col",[t("v-text-field",{attrs:{label:e.timeLabel,name:`time${Date.now()}`,rules:e.timeRules,type:"time",step:"1","data-test":"time-chooser"},on:{change:e.onChange},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}})],1)],1)],1)}),f=[],_=n(1200),y=n(7910),C=n(6700),b=n(3053);const w={props:{required:{type:Boolean,default:!0},dateTime:{type:Number,default:null},dateLabel:{type:String,default:"Date"},timeLabel:{type:String,default:"Time"}},data(){return{date:null,time:null,rules:{required:e=>!!e||"Required",date:e=>{if(!e)return!0;try{return(0,_.Z)((0,y.Z)(e,"yyyy-MM-dd",new Date))||"Invalid date (YYYY-MM-DD)"}catch(t){return"Invalid date (YYYY-MM-DD)"}},time:e=>{if(!e)return!0;try{return(0,_.Z)((0,y.Z)(e,"HH:mm:ss",new Date))||"Invalid time (HH:MM:SS)"}catch(t){return"Invalid time (HH:MM:SS)"}}}}},computed:{dateRules(){let e=[this.rules.date];return(this.time||this.required)&&e.push(this.rules.required),e},timeRules(){let e=[this.rules.time];return(this.date||this.required)&&e.push(this.rules.required),e}},created(){if(this.dateTime){let e=(0,C.Z)(this.dateTime/1e6);this.date=(0,b.Z)(e,"yyyy-MM-dd"),this.time=(0,b.Z)(e,"HH:mm:ss")}},methods:{onChange(){this.date&&this.time?this.$emit("date-time",this.date+" "+this.time):this.$emit("date-time",null)}}},x=w;var k=n(3483),T=(0,k.Z)(x,A,f,!1,null,null,null);const N=T.exports;var I=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{width:"600"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.success()}},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[t("v-card",{staticClass:"pa-3"},[t("v-card-title",{staticClass:"headline"},[e._v("Edit Item")]),e._v(" "),t("v-select",{attrs:{outlined:"","hide-details":"",label:"Value Type",items:e.valueTypes},model:{value:e.editItem.valueType,callback:function(t){e.$set(e.editItem,"valueType",t)},expression:"editItem.valueType"}}),e._v(" "),t("v-select",{attrs:{outlined:"","hide-details":"",label:"Reduction",items:e.reduction},model:{value:e.editItem.reduced,callback:function(t){e.$set(e.editItem,"reduced",t)},expression:"editItem.reduced"}}),e._v(" "),t("v-select",{attrs:{outlined:"","hide-details":"",label:"Reduced Type",items:e.reducedTypes,disabled:"DECOM"===e.currentReduced},model:{value:e.editItem.reducedType,callback:function(t){e.$set(e.editItem,"reducedType",t)},expression:"editItem.reducedType"}}),e._v(" "),t("v-select",{attrs:{outlined:"","hide-details":"",label:"Color",items:e.colors},on:{change:function(t){return e.$emit("changeColor",t)}},model:{value:e.editItem.color,callback:function(t){e.$set(e.editItem,"color",t)},expression:"editItem.color"}}),e._v(" "),e.limitsNames.length>1?t("div",[t("v-select",{attrs:{outlined:"","hide-details":"",label:"Display Limits",items:e.limitsNames},on:{change:function(t){return e.$emit("changeLimits",e.limits[e.limitsName])}},model:{value:e.limitsName,callback:function(t){e.limitsName=t},expression:"limitsName"}}),e._v(" "),t("div",{staticClass:"pa-3"},[e._v(e._s(e.limitsName)+": "+e._s(e.limits[e.limitsName]))])],1):e._e(),e._v(" "),t("v-card-actions",[t("v-spacer"),e._v(" "),t("v-btn",{staticClass:"mx-2",attrs:{outlined:""},on:{click:function(t){return e.$emit("cancel")}}},[e._v(" Cancel ")]),e._v(" "),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary"},on:{click:function(t){return e.$emit("close",e.editItem)}}},[e._v("\n Ok\n ")])],1)],1)],1)},S=[];const M={props:{value:Boolean,item:{type:Object,required:!0},colors:{type:Array,required:!0}},data:function(){return{editItem:null,limitsName:"NONE",limits:{NONE:[]},valueTypes:["CONVERTED","RAW"],reduction:[{text:"NONE",value:"DECOM"},{text:"REDUCED_MINUTE",value:"REDUCED_MINUTE"},{text:"REDUCED_HOUR",value:"REDUCED_HOUR"},{text:"REDUCED_DAY",value:"REDUCED_DAY"}],reducedTypes:["MIN","MAX","AVG","STDDEV"]}},computed:{show:{get(){return this.value},set(e){this.$emit("input",e)}},limitsNames(){return Object.keys(this.limits)}},async created(){this.editItem={...this.item},await this.api,this.api=(new h).get_item(this.item.targetName,this.item.packetName,this.item.itemName).then((e=>{for(const[t,n]of Object.entries(e.limits))Object.keys(n).includes("red_low")&&this.$set(this.limits,t,Object.values(n));this.limitsName=Object.keys(this.limits).find((e=>this.limits[e]+""===this.editItem.limits+""))}))}},D=M;var $=(0,k.Z)(D,I,S,!1,null,null,null);const E=$.exports;var G=n(5685),R=n(6522),O=n.n(R),z=n(7146);z.ju.staleThreshold=10;class P{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&this._cable.disconnect()}createSubscription(e,t,n={},i={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((t=>{if(t&&OpenC3Auth.setTokens(),null==this._cable){let e=this._url+"?scope="+window.openc3Scope+"&authorization="+localStorage.openc3Token;this._cable=z.zD(encodeURI(e))}return this._cable.subscriptions.create({channel:e,...i},n)}))}recordPing(){this._cable.connection.monitor.recordPing()}}n(8514);const L={components:{DateTimeChooser:N,GraphEditItemDialog:E},props:{id:{type:Number,required:!0},selectedGraphId:{type:Number},state:{type:String,required:!0},startTime:{type:Number},secondsGraphed:{type:Number,required:!0},pointsSaved:{type:Number,required:!0},pointsGraphed:{type:Number,required:!0},refreshIntervalMs:{type:Number,default:200},hideSystemBar:{type:Boolean,default:!1},hideOverview:{type:Boolean,default:!1},sparkline:{type:Boolean,default:!1},initialItems:{type:Array},height:{type:Number},width:{type:Number}},data(){return{itemHeaders:[{text:"Target Name",value:"targetName"},{text:"Packet Name",value:"packetName"},{text:"Item Name",value:"itemName"},{text:"Actions",value:"actions",sortable:!1}],active:!0,expand:!0,fullWidth:!0,fullHeight:!0,graph:null,editGraph:!1,editGraphMenu:!1,editGraphMenuX:0,editGraphMenuY:0,editItem:!1,itemMenu:!1,itemMenuX:0,itemMenuY:0,legendMenu:!1,legendMenuX:0,legendMenuY:0,legendPosition:"bottom",legendPositions:["top","bottom","left","right"],selectedItem:null,showOverview:!this.hideOverview,title:"",overview:null,data:[[]],dataChanged:!1,timeout:null,graphMinY:"",graphMaxY:"",graphStartDateTime:null,graphEndDateTime:null,indexes:{},items:this.initialItems||[],limitsValues:[],drawInterval:null,zoomChart:!1,zoomOverview:!1,cable:new P,subscription:null,needToUpdate:!1,errorDialog:!1,errors:[],colorIndex:0,colors:["cornflowerblue","red","lime","darkorange","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white"]}},computed:{calcFullSize:function(){return this.fullWidth||this.fullHeight},editItems:function(){if(!this.items)return[];let e=0;return this.items.map((t=>(e+=1,{...t,itemId:e})))},error:function(){return this.errorDialog&&this.errors.length>0?JSON.stringify(this.errors,null,4):null}},created(){this.title=`Graph ${this.id}`;for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,void 0===t.color&&(t.color=this.colors[this.colorIndex]),this.colorIndex++,this.colorIndex===this.colors.length&&(this.colorIndex=0)},mounted(){const{chartSeries:e,overviewSeries:t}=this.items.reduce(((e,t)=>{const n={spanGaps:!0};return e.chartSeries.push({...n,item:t,label:this.formatLabel(t),stroke:(e,t)=>this.items[t-1].color,value:(e,t)=>"string"===typeof t||isNaN(t)?"NaN":null==t?"--":t.toFixed(2)}),e.overviewSeries.push({...n}),e}),{chartSeries:[],overviewSeries:[]});let n={};if(this.sparkline)this.hideSystemBar=!0,this.hideOverview=!0,this.showOverview=!1,n={width:this.width,height:this.height,pxAlign:!1,cursor:{show:!1},select:{show:!1},legend:{show:!1},scales:{x:{time:!1}},axes:[{show:!1},{show:!1}],series:[{},{stroke:"white"}]},this.graph=new G.Z(n,this.data,document.getElementById(`chart${this.id}`));else{n={...this.getSize("chart"),...this.getScales(),...this.getAxes("chart"),plugins:[this.linesPlugin()],series:[{label:"Time",value:(e,t)=>null==t?"--":(0,b.Z)((0,C.Z)(1e3*t),"yyyy-MM-dd HH:mm:ss")},...e],cursor:{drag:{x:!0,y:!1},sync:{key:"openc3"},bind:{mouseup:(e,t,n)=>t=>{"pause"===this.state&&0===e.select.width&&this.$emit("start"),n(t)}}},hooks:{setScale:[(e,t)=>{if("x"===t&&!this.zoomOverview&&this.overview){this.zoomChart=!0;let t=Math.round(this.overview.valToPos(e.scales.x.min,"x")),n=Math.round(this.overview.valToPos(e.scales.x.max,"x"));this.overview.setSelect({left:t,width:n-t}),this.zoomChart=!1}}],setSelect:[e=>{"start"===this.state&&e.select.width>0&&this.$emit("pause")}],ready:[e=>{let t=e.root.querySelector(".u-over");t.addEventListener("contextmenu",(e=>{e.preventDefault(),this.itemMenu=!1,this.legendMenu=!1,this.editGraphMenuX=e.clientX,this.editGraphMenuY=e.clientY,this.editGraphMenu=!0})),t.addEventListener("mouseenter",(e=>{this.$emit("resize")})),t.addEventListener("mouseleave",(e=>{this.$emit("resize")}));let n=e.root.querySelector(".u-legend");n.addEventListener("contextmenu",(t=>{t.preventDefault(),this.editGraphMenu=!1,this.legendMenu=!1,this.itemMenuX=t.clientX,this.itemMenuY=t.clientY;let i=t.target.closest(".u-series"),s=Array.prototype.slice.call(n.childNodes).indexOf(i),a=e.series[s];a.item?(this.selectedItem=a.item,this.itemMenu=!0):(this.itemMenu=!1,this.legendMenuX=t.clientX,this.legendMenuY=t.clientY,this.legendMenu=!0)}))}]}},this.graph=new G.Z(n,this.data,document.getElementById(`chart${this.id}`));const i={...this.getSize("overview"),...this.getScales(),...this.getAxes("overview"),series:[...t],cursor:{y:!1,points:{show:!1},drag:{setScale:!1,x:!0,y:!1}},legend:{show:!1},hooks:{setSelect:[e=>{if(!this.zoomChart){"start"===this.state&&e.select.width>0&&this.$emit("pause"),this.zoomOverview=!0;let t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");this.graph.setScale("x",{min:t,max:n}),this.zoomOverview=!1}}]}};this.overview=new G.Z(i,this.data,document.getElementById(`overview${this.id}`)),this.moveLegend(this.legendPosition),window.addEventListener("resize",this.handleResize)}"stop"!==this.state&&this.startGraph()},beforeDestroy:function(){this.stopGraph(),this.cable.disconnect(),window.removeEventListener("resize",this.handleResize)},watch:{state:function(e,t){switch(e){case"start":"stop"===t&&this.startGraph();break;case"stop":this.stopGraph();break}},data:function(e,t){this.dataChanged=!0},graphMinY:function(e,t){let n=parseFloat(e);isNaN(n)||(this.graphMinY=n),this.setGraphRange()},graphMaxY:function(e,t){let n=parseFloat(e);isNaN(n)||(this.graphMaxY=n),this.setGraphRange()},graphStartDateTime:function(e,t){this.needToUpdate=!0,e&&"string"===typeof e&&(this.graphStartDateTime=1e6*new Date(this.graphStartDateTime).getTime())},graphEndDateTime:function(e,t){this.needToUpdate=!0,e&&"string"===typeof e&&(this.graphEndDateTime=1e6*new Date(this.graphEndDateTime).getTime())}},methods:{startGraph:function(){this.subscribe(),this.timeout=setTimeout((()=>{this.updateTimeout()}),this.refreshIntervalMs)},stopGraph:function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},updateTimeout:function(){this.updateGraphData(),this.timeout=setTimeout((()=>{this.updateTimeout()}),this.refreshIntervalMs)},updateGraphData:function(){if("pause"===this.state||!this.dataChanged)return;this.graph.setData(this.data),this.overview&&this.overview.setData(this.data);let e=this.data[0][this.data[0].length-1],t=this.data[0][this.data[0].length-this.pointsGraphed],n=this.data[0][0];n<e-this.secondsGraphed&&(n=e-this.secondsGraphed),t>n&&(n=t),this.graph.setScale("x",{min:n,max:e}),this.dataChanged=!1},formatLabel(e){if("CONVERTED"===e.valueType&&"DECOM"===e.reduced)return e.itemName;{let t="";return"CONVERTED"!==e.valueType&&(t+=e.valueType),"DECOM"!==e.reduced&&(""!==t&&(t+=" "),t+=`${e.reduced.split("_")[1]} ${e.reducedType}`),`${e.itemName} (${t})`}},moveLegend:function(e){switch(e){case"bottom":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.remove("top-legend");break;case"top":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("top-legend");break;case"left":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.add("side-legend"),this.graph.root.classList.add("left-legend");break;case"right":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("side-legend");break}this.legendPosition=e,this.resize()},clearErrors:function(){this.errors=[]},editGraphClose:function(){if(this.editGraph=!1,this.needToUpdate){if(null==this.subscription)this.startGraph();else{let e=JSON.parse(JSON.stringify(this.items));this.removeItems(e),setTimeout((()=>{this.addItems(e)}),0)}this.needToUpdate=!1}this.moveLegend(this.legendPosition)},handleResize:function(){this.graph.setSize(this.getSize("chart")),this.overview&&this.overview.setSize(this.getSize("overview"))},resize:function(){this.graph.setSize(this.getSize("chart")),this.overview&&this.overview.setSize(this.getSize("overview")),this.$emit("resize",this.id)},expandAll:function(){this.fullWidth=!0,this.fullHeight=!0,this.resize()},collapseAll:function(){this.fullWidth=!1,this.fullHeight=!1,this.resize()},expandWidth:function(){this.fullWidth=!0,this.resize()},collapseWidth:function(){this.fullWidth=!1,this.resize()},expandHeight:function(){this.fullHeight=!0,this.resize()},collapseHeight:function(){this.fullHeight=!1,this.resize()},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-graph",this.id)},setGraphRange:function(){let e=.1;(this.graphMinY||0===this.graphMinY||this.graphMaxY||0===this.graphMaxY)&&(e=0),this.graph.scales.y.range=(t,n,i)=>{let s=n;(this.graphMinY||0===this.graphMinY)&&(s=this.graphMinY);let a=i;return(this.graphMaxY||0===this.graphMaxY)&&(a=this.graphMaxY),G.Z.rangeNum(s,a,e,!0)}},subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:()=>{this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:(new Date).getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:(new Date).getTime()})}}).then((e=>{this.subscription=e}))},getSize:function(e){const t=document.getElementById("openc3-nav-drawer"),n=t.classList.contains("v-navigation-drawer--open")?t.clientWidth:0;let i=0;if("right"===this.legendPosition||"left"===this.legendPosition){const e=document.getElementsByClassName("u-legend")[0];i=e.clientWidth}const s=Math.max(document.documentElement.clientWidth,window.innerWidth||0)-n-i,a=Math.max(document.documentElement.clientHeight,window.innerHeight||0),l=document.getElementsByClassName("c-chooser")[0];let o=100;"overview"===e?this.fullHeight&&!this.hideOverview?this.showOverview=!0:this.showOverview=!1:l&&(o=a-l.clientHeight-o-190,this.fullHeight||(o=o/2+10));let r=s-60;return this.fullWidth||(r=r/2-10),{width:this.width||r,height:this.height||o}},getScales:function(){return{scales:{x:{range(e,t,n){return null==t?[1566453600,1566497660]:[t,n]}},y:{range(e,t,n){return null==t?[-100,100]:G.Z.rangeNum(t,n,.1,!0)}}}}},getAxes:function(e){let t="rgba(0, 0, 0, .1)",n="black";return this.$vuetify.theme.dark&&(t="rgba(255, 255, 255, .1)",n="white"),{axes:[{stroke:n,grid:{show:!0,stroke:t,width:2}},{size:80,stroke:n,grid:{show:"overview"!==e,stroke:t,width:2}}]}},closeEditItem:function(e){this.editItem=!1,(null!==this.graphEndDateTime&&this.selectedItem!==e||this.selectedItem.valueType!==e.valueType||this.selectedItem.reduced!==e.reduced||this.selectedItem.reducedType!==e.reducedType)&&this.changeItem(e)},changeColor:function(e){let t=this.subscriptionKey(this.selectedItem),n=this.indexes[t];this.items[n-1].color=e,this.selectedItem.color=e,this.graph.root.querySelectorAll(".u-marker")[n].style.borderColor=e},changeLimits:function(e){let t=this.subscriptionKey(this.selectedItem),n=this.indexes[t];this.items[n-1].limits=e,this.selectedItem.limits=e,this.limitsValues=e},linesPlugin:function(){return{hooks:{draw:e=>{const{ctx:t,bbox:n}=e,i=e.valToPos(e.scales.y.min,"y",!0),s=e.valToPos(e.scales.y.max,"y",!0),a=e.valToPos(this.limitsValues[0],"y",!0),l=e.valToPos(this.limitsValues[1],"y",!0),o=e.valToPos(this.limitsValues[2],"y",!0),r=e.valToPos(this.limitsValues[3],"y",!0);if(t.save(),t.beginPath(),t.fillStyle="rgba(255,0,0,0.15)",e.scales.y.min<this.limitsValues[0]){let e=a<s?s:a;t.fillRect(n.left,a,n.width,i-e)}if(e.scales.y.max>this.limitsValues[3]){let e=i<r?i:r;t.fillRect(n.left,s,n.width,e-s)}if(t.fillStyle="rgba(255,255,0,0.15)",e.scales.y.min<this.limitsValues[1]&&e.scales.y.max>this.limitsValues[0]){let e=l<s?s:l;t.fillRect(n.left,e,n.width,a-e)}if(e.scales.y.max>this.limitsValues[2]&&e.scales.y.min<this.limitsValues[3]){let e=i<r?i:r,s=i<o?i:o;t.fillRect(n.left,e,n.width,s-e)}if(t.fillStyle="rgba(0,255,0,0.15)",4===this.limitsValues.length){if(e.scales.y.min<this.limitsValues[2]&&e.scales.y.max>this.limitsValues[1]){let e=o<s?s:o,a=i<l?i:l;t.fillRect(n.left,e,n.width,a-e)}}else{const a=e.valToPos(this.limitsValues[4],"y",!0),r=e.valToPos(this.limitsValues[5],"y",!0);if(e.scales.y.min<this.limitsValues[4]&&e.scales.y.max>this.limitsValues[1]){let e=a<s?s:a;t.fillRect(n.left,e,n.width,l-e)}if(e.scales.y.max>this.limitsValues[5]&&e.scales.y.min<this.limitsValues[2]){let e=i<o?i:o,s=i<r?i:r;t.fillRect(n.left,e,n.width,s-e)}t.fillStyle="rgba(0,0,255,0.15)";let c=r<s?s:r,d=i<a?i:a;t.fillRect(n.left,c,n.width,d-c)}t.stroke(),t.restore()}}}},changeItem:function(e){this.removeItems([this.selectedItem]),this.selectedItem.valueType=e.valueType,this.selectedItem.reduced=e.reduced,this.selectedItem.reducedType=e.reducedType,setTimeout((()=>{this.addItems([this.selectedItem])}),0)},addItems:function(e,t="CONVERTED"){for(const n of e){n.valueType||(n.valueType=t),void 0===n.color&&(n.color=this.colors[this.colorIndex]),void 0===n.limits?n.limits=[]:n.limits.length>0&&(this.limitsValues=n.limits),this.colorIndex++,this.colorIndex===this.colors.length&&(this.colorIndex=0),this.items.push(n);const e=this.data.length;this.graph.addSeries({spanGaps:!0,item:n,label:this.formatLabel(n),stroke:(e,t)=>this.items[t-1].color,value:(e,t)=>"string"===typeof t||isNaN(t)?"NaN":null==t?"--":t.toFixed(2)},e),this.overview&&this.overview.addSeries({spanGaps:!0,stroke:(e,t)=>this.items[t-1].color},e);let i=Array(this.data[0].length);this.data.splice(e,0,i),this.indexes[this.subscriptionKey(n)]=e}this.addItemsToSubscription(e)},addItemsToSubscription:function(e=this.items){let t=this.startTime;this.graphStartDateTime&&(t=this.graphStartDateTime),this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((n=>{n&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:t,end_time:this.graphEndDateTime})}))},removeItems:function(e){this.removeItemsFromSubscription(e);for(const t of e.map(this.subscriptionKey)){const e=this.reorderIndexes(t);this.colors.unshift(this.graph.series[e].stroke),this.items.splice(e-1,1),this.data.splice(e,1),this.graph.delSeries(e),this.graph.setData(this.data),this.overview&&(this.overview.delSeries(e),this.overview.setData(this.data))}1===this.data.length&&(this.data[0]=[],this.graph.setData(this.data),this.overview.setData(this.data))},removeItemsFromSubscription:function(e=this.items){this.subscription&&this.subscription.perform("remove",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey)})},reorderIndexes:function(e){let t=this.indexes[e];for(var n in delete this.indexes[e],this.indexes)this.indexes[n]>t&&(this.indexes[n]-=1);return t},received:function(e){this.cable.recordPing();for(let t=0;t<e.length;t++){let n=e[t].__time/1e9,i=e[0].length;if(0===i||n>e[0][i-1]){for(let e=0;e<this.data.length;e++)this.data[e].push(null);this.set_data_at_index(this.data[0].length-1,n,e[t])}else{let i=O()(this.data[0],n,this.bs_comparator);if(i>=0)this.set_data_at_index(i,n,e[t]);else{let s=-i-1;for(let e=0;e<this.data.length;e++)this.data[e].splice(s,0,null);this.set_data_at_index(s,n,e[t])}}}if(null==this.startTime){let e=1e9*this.data[0][0];this.$emit("started",e)}this.dataChanged=!0},bs_comparator:function(e,t){return e-t},set_data_at_index:function(e,t,n){this.data[0][e]=t;for(const[i,s]of Object.entries(n)){if("time"===i)continue;let t=this.indexes[i];if(t){let n=this.data[t];if(s.raw)n[e]=null;else if("string"===typeof s){if(n[e]=null,!i.includes("__RAW")){for(let e of this.items)if(this.subscriptionKey(e)===i){this.selectedItem=e;break}this.changeItem({valueType:"RAW",reduced:this.selectedItem.reduced,reducedType:this.selectedItem.reducedType})}}else n[e]=s}}},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return"REDUCED_MINUTE"!==e.reduced&&"REDUCED_HOUR"!==e.reduced&&"REDUCED_DAY"!==e.reduced||(t+=`__${e.reducedType}`),t}}},U=L;n(6867),n(1932);var H=(0,k.Z)(U,v,g,!1,null,"ba6b566a",null);const V=H.exports;var Y=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{width:"600"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(t){return t.preventDefault(),e.success.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),e._v(" "),t("span",[e._v("Open Configuration")]),e._v(" "),t("v-spacer")],1),e._v(" "),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("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(t){e.search=t},expression:"search"}})],1),e._v(" "),t("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":(e,t)=>t.select(e)},scopedSlots:e._u([{key:"item.actions",fn:function({item:n}){return[t("v-btn",{staticClass:"mt-1",attrs:{"data-test":"item-delete",icon:""},on:{click:function(t){return e.deleteConfig(n)}}},[t("v-icon",[e._v("mdi-delete")])],1)]}}])}),e._v(" "),t("v-row",{attrs:{dense:""}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:e._s(e.error)}})])],1)]),e._v(" "),t("v-card-actions",[t("v-spacer"),e._v(" "),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"open-config-cancel-btn"},on:{click:e.cancel}},[e._v("\n Cancel\n ")]),e._v(" "),t("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"open-config-submit-btn",disabled:!!e.error},on:{click:function(t){return t.preventDefault(),e.success.apply(null,arguments)}}},[e._v("\n Ok\n ")])],1)],1)])],1)},W=[];const K={props:{configKey:String,value:Boolean},data(){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(){return this.value},set(e){this.$emit("input",e)}}},mounted(){let e=-1;(new h).list_configs(this.configKey).then((t=>{this.configs=t.map((t=>(e+=1,{configId:e,config:t})))})).catch((e=>{this.$emit("warning",`Failed to connect to OpenC3. ${e}`)}))},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){this.$dialog.confirm(`Are you sure you want to delete: ${e.config}`,{okText:"Delete",cancelText:"Cancel"}).then((t=>{this.selectedItem.config===e.config&&(this.selectedItem=null),this.configs.splice(this.configs.indexOf(e),1),(new h).delete_config(this.configKey,e.config),localStorage[`lastconfig__${this.configKey}`]===e.config&&localStorage.removeItem(`lastconfig__${this.configKey}`)})).catch((t=>{t&&this.$emit("warning",`Failed to delete config ${e.config} Error: ${t}`)}))}}},F=K;var B=(0,k.Z)(F,Y,W,!1,null,null,null);const q=B.exports;var Z=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{width:"600"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(t){return t.preventDefault(),e.success.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),e._v(" "),t("span",[e._v("Save Configuration")]),e._v(" "),t("v-spacer")],1),e._v(" "),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("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(t){e.search=t},expression:"search"}})],1),e._v(" "),t("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":(e,t)=>t.select(e)},scopedSlots:e._u([{key:"item.actions",fn:function({item:n}){return[t("v-btn",{staticClass:"mt-1",attrs:{icon:"","data-test":"item-delete"},on:{click:function(t){return e.deleteConfig(n)}}},[t("v-icon",[e._v("mdi-delete")])],1)]}}])}),e._v(" "),t("v-row",{attrs:{dense:""}},[t("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(t){e.configName=t},expression:"configName"}})],1),e._v(" "),t("v-row",{attrs:{dense:""}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:e._s(e.error)}})])],1)]),e._v(" "),t("v-card-actions",[t("v-spacer"),e._v(" "),t("v-btn",{staticClass:"mx-2",attrs:{outlined:""},on:{click:e.cancel}},[e._v(" Cancel ")]),e._v(" "),t("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"save-config-submit-btn",disabled:!!e.error},on:{click:function(t){return t.preventDefault(),e.success.apply(null,arguments)}}},[e._v("\n Ok\n ")])],1)],1)])],1)},X=[];const j={props:{configKey:String,value:Boolean},data(){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(){return this.value},set(e){this.$emit("input",e)}}},mounted(){let e=-1;(new h).list_configs(this.configKey).then((t=>{this.configs=t.map((t=>(e+=1,{configId:e,config:t})))})).catch((e=>{this.$emit("warning",`Failed to connect to OpenC3. ${e}`)}))},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){this.$dialog.confirm(`Are you sure you want to delete: ${e.config}`,{okText:"Delete",cancelText:"Cancel"}).then((t=>{this.configName===e.config&&(this.selectedItem=null,this.configName=""),this.configs.splice(this.configs.indexOf(e.config),1),(new h).delete_config(this.configKey,e.config),localStorage[`lastconfig__${this.configKey}`]===e.config&&localStorage.removeItem(`lastconfig__${this.configKey}`)})).catch((t=>{t&&this.$emit("warning",`Failed to delete config ${e.config} Error: ${t}`)}))}}},J=j;var Q=(0,k.Z)(J,Z,X,!1,null,null,null);const ee=Q.exports;var te=function(){var e=this,t=e._self._c;return t("v-container",{staticClass:"c-chooser px-0"},[t("v-row",[t("v-col",{attrs:{cols:e.colSize,"data-test":"select-target"}},[t("v-autocomplete",{attrs:{label:"Select Target","hide-details":"",dense:"",items:e.targetNames,"item-text":"label","item-value":"value"},on:{change:e.targetNameChanged},model:{value:e.selectedTargetName,callback:function(t){e.selectedTargetName=t},expression:"selectedTargetName"}})],1),e._v(" "),t("v-col",{attrs:{cols:e.colSize,"data-test":"select-packet"}},[t("v-autocomplete",{attrs:{label:"Select Packet","hide-details":"",dense:"",disabled:e.packetsDisabled||e.buttonDisabled,items:e.packetNames,"item-text":"label","item-value":"value"},on:{change:e.packetNameChanged},model:{value:e.selectedPacketName,callback:function(t){e.selectedPacketName=t},expression:"selectedPacketName"}})],1),e._v(" "),e.chooseItem&&!e.buttonDisabled?t("v-col",{attrs:{cols:e.colSize,"data-test":"select-item"}},[t("v-autocomplete",{attrs:{label:"Select Item","hide-details":"",dense:"",disabled:e.itemsDisabled||e.buttonDisabled,items:e.itemNames,"item-text":"label","item-value":"value"},on:{change:function(t){return e.itemNameChanged(t)}},model:{value:e.selectedItemName,callback:function(t){e.selectedItemName=t},expression:"selectedItemName"}})],1):e._e(),e._v(" "),e.buttonText?t("v-col",{attrs:{cols:e.colSize}},[t("v-btn",{attrs:{disabled:e.buttonDisabled,block:"",color:"primary","data-test":"select-send"},on:{click:e.buttonPressed}},[e._v("\n "+e._s(e.actualButtonText)+"\n ")])],1):e._e()],1),e._v(" "),e.selectTypes?t("v-row",[t("v-col",{attrs:{cols:e.colSize,"data-test":"data-type"}},[t("v-autocomplete",{attrs:{label:"Value Type","hide-details":"",dense:"",items:e.valueTypes},model:{value:e.selectedValueType,callback:function(t){e.selectedValueType=t},expression:"selectedValueType"}})],1),e._v(" "),t("v-col",{attrs:{cols:e.colSize,"data-test":"reduced"}},[t("v-autocomplete",{attrs:{label:"Reduced","hide-details":"",dense:"",items:e.reductionModes},model:{value:e.selectedReduced,callback:function(t){e.selectedReduced=t},expression:"selectedReduced"}})],1),e._v(" "),t("v-col",{attrs:{cols:e.colSize,"data-test":"reduced-type"}},[t("v-autocomplete",{attrs:{label:"Reduced Type","hide-details":"",dense:"",disabled:"DECOM"===e.selectedReduced,items:e.reducedTypes},model:{value:e.selectedReducedType,callback:function(t){e.selectedReducedType=t},expression:"selectedReducedType"}})],1),e._v(" "),t("v-col",{attrs:{cols:e.colSize}})],1):e._e(),e._v(" "),t("v-row",{staticClass:"pt-1",attrs:{"no-gutters":""}},[e.hazardous?t("v-col",{staticClass:"openc3-yellow",staticStyle:{"white-space":"pre"},attrs:{cols:e.colSize}},[e._v("Description: "+e._s(e.description)+" (HAZARDOUS)")]):t("v-col",{staticStyle:{"white-space":"pre"},attrs:{cols:e.colSize}},[e._v("Description: "+e._s(e.description)+"\n ")])],1)],1)},ne=[];n(1979);const ie={props:{allowAll:{type:Boolean,default:!1},allowAllTargets:{type:Boolean,default:!1},buttonText:{type:String,default:null},chooseItem:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},initialTargetName:{type:String,default:""},initialPacketName:{type:String,default:""},initialItemName:{type:String,default:""},selectTypes:{type:Boolean,default:!1},mode:{type:String,default:"tlm",validator:e=>["cmd","tlm"].includes(e)},unknown:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}},data(){var e,t,n;return{targetNames:[],selectedTargetName:null===(e=this.initialTargetName)||void 0===e?void 0:e.toUpperCase(),packetNames:[],selectedPacketName:null===(t=this.initialPacketName)||void 0===t?void 0:t.toUpperCase(),itemNames:[],selectedItemName:null===(n=this.initialItemName)||void 0===n?void 0:n.toUpperCase(),valueTypes:["CONVERTED","RAW"],selectedValueType:"CONVERTED",reductionModes:[{text:"NONE",value:"DECOM"},{text:"REDUCED_MINUTE",value:"REDUCED_MINUTE"},{text:"REDUCED_HOUR",value:"REDUCED_HOUR"},{text:"REDUCED_DAY",value:"REDUCED_DAY"}],selectedReduced:"DECOM",reducedTypes:["MIN","MAX","AVG","STDDEV"],selectedReducedType:"AVG",description:"",hazardous:!1,internalDisabled:!1,packetsDisabled:!1,itemsDisabled:!1,api:null,ALL:{label:"[ ALL ]",value:"ALL",description:"ALL"},UNKNOWN:{label:"[ UNKNOWN ]",value:"UNKNOWN",description:"UNKNOWN"}}},created(){this.internalDisabled=!0,this.api=new h,this.api.get_target_names().then((e=>{this.targetNames=e.flatMap((e=>"UNKNOWN"==e?[]:{label:e,value:e})),this.allowAllTargets&&this.targetNames.unshift(this.ALL),this.selectedTargetName||(this.selectedTargetName=this.targetNames[0].value,this.targetNameChanged(this.selectedTargetName)),this.updatePackets(),this.unknown&&this.targetNames.push(this.UNKNOWN)}))},computed:{actualButtonText:function(){return"ALL"===this.selectedPacketName?"Add Target":"ALL"===this.selectedItemName?"Add Packet":this.buttonText},buttonDisabled:function(){return this.disabled||this.internalDisabled},targetChooserStyle:function(){return this.chooseItem||this.buttonText?{width:"25%",float:"left","margin-right":"5px"}:{width:"49%",float:"left"}},packetChooserStyle:function(){return this.chooseItem||this.buttonText?{width:"25%",float:"left","margin-right":"5px"}:{width:"50%",float:"right"}},colSize:function(){return!!this.vertical&&12}},watch:{mode:function(e,t){this.selectedPacketName=null,this.selectedItemName=null,this.updatePackets()}},methods:{updatePackets:function(){if("UNKNOWN"===this.selectedTargetName)return this.packetNames=[this.UNKNOWN],this.selectedPacketName=this.packetNames[0].value,this.packetNameChanged(this.UNKNOWN.value),void(this.description="UNKNOWN");if("ALL"===this.selectedTargetName)return this.packetNames=[this.ALL],this.selectedPacketName=this.packetNames[0].value,this.packetNameChanged(this.ALL.value),void(this.description="ALL");this.internalDisabled=!0;const e="tlm"===this.mode?"get_all_telemetry_names":"get_all_command_names";this.api[e](this.selectedTargetName).then((e=>{this.packetNames=e.map((e=>({label:e,value:e}))),this.allowAll&&this.packetNames.unshift(this.ALL),this.selectedPacketName||(this.selectedPacketName=this.packetNames[0].value),this.packetNameChanged(this.selectedPacketName);this.packetNames.find((e=>e.value===this.selectedPacketName));this.chooseItem&&this.updateItems(),this.internalDisabled=!1}))},updateItems:function(){if("ALL"===this.selectedPacketName)return;this.internalDisabled=!0;const e="tlm"===this.mode?"get_telemetry":"get_command";this.api[e](this.selectedTargetName,this.selectedPacketName).then((e=>{this.itemNames=e.items.map((e=>[{label:e.name,value:e.name,description:e.description}])).reduce(((e,t)=>e.concat(t)),[]),this.allowAll&&this.itemNames.unshift(this.ALL),this.selectedItemName||(this.selectedItemName=this.itemNames[0].value),this.description=this.itemNames[0].description,this.internalDisabled=!1,this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemName,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})}))},targetNameChanged:function(e){this.selectedTargetName=e,this.selectedPacketName="",this.selectedItemName="",this.updatePackets()},packetNameChanged:function(e){if("ALL"===e)this.itemsDisabled=!0,this.internalDisabled=!1;else{this.itemsDisabled=!1;const t=this.packetNames.find((t=>e===t.value));this.selectedPacketName=t.value;const n="tlm"===this.mode?"get_telemetry":"get_command";this.api[n](this.selectedTargetName,this.selectedPacketName).then((e=>{this.description=e.description,this.hazardous=e.hazardous}))}this.chooseItem?this.updateItems():this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemName,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})},itemNameChanged:function(e){const t=this.itemNames.find((t=>e===t.value));this.selectedItemName=t.value,this.description=t.description,this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemName,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})},buttonPressed:function(){"ALL"===this.selectedPacketName?this.allTargetPacketItems():"ALL"===this.selectedItemName?this.allPacketItems():this.chooseItem?this.$emit("click",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemName,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType}):this.$emit("click",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})},allTargetPacketItems:function(){this.packetNames.forEach((e=>{if(e===this.ALL)return;const t="tlm"===this.mode?"get_telemetry":"get_command";this.api[t](this.selectedTargetName,e.value).then((t=>{t.items.forEach((t=>{this.$emit("click",{targetName:this.selectedTargetName,packetName:e.value,itemName:t["name"],valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})}))}))}))},allPacketItems:function(){this.itemNames.forEach((e=>{e!==this.ALL&&this.$emit("click",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:e.value,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})}))}}},se=ie;n(985);var ae=(0,k.Z)(se,te,ne,!1,null,null,null);const le=ae.exports;var oe=function(){var e=this,t=e._self._c;return t("mounting-portal",{attrs:{"mount-to":"#openc3-menu",append:""}},[t("div",{staticClass:"v-toolbar__content"},[e._l(e.menus,(function(n,i){return t("v-menu",{key:i,ref:"topmenu",refInFor:!0,attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:i,attrs:s}){return[t("v-btn",e._g(e._b({staticClass:"mx-1",attrs:{outlined:"","data-test":e.formatDT(`${e.title} ${n.label}`)}},"v-btn",s,!1),i),[t("span",{domProps:{textContent:e._s(n.label)}}),e._v(" "),t("v-icon",{attrs:{right:""}},[e._v(" mdi-menu-down ")])],1)]}}],null,!0)},[e._v(" "),t("v-list",[t("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:n.radioGroup,"hide-details":"",dense:""}},[e._l(n.items,(function(i,s){return[i.divider?t("v-divider",{key:s}):i.subMenu?t("div",{key:s},[t("v-menu",{key:e.k,attrs:{"open-on-hover":"","offset-x":"",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:a}){return[t("v-list-item",e._g(e._b({key:s,attrs:{disabled:i.disabled}},"v-list-item",a,!1),n),[i.icon?t("v-list-item-icon",[t("v-icon",{attrs:{disabled:i.disabled}},[e._v(e._s(i.icon))])],1):e._e(),e._v(" "),i.radio||i.checkbox?e._e():t("v-list-item-title",{style:"cursor: pointer;"+(i.disabled?"opacity: 0.2":"")},[e._v(e._s(i.label)+"\n ")]),e._v(" "),t("v-icon",[e._v(" mdi-chevron-right ")])],1)]}}],null,!0)},[e._v(" "),t("v-list",e._l(i.subMenu,(function(n,i){return t("v-list-item",{key:i,on:{click:function(t){return e.subMenuClick(n)}}},[n.icon?t("v-list-item-icon",[t("v-icon",[e._v(e._s(n.icon))])],1):e._e(),e._v(" "),t("v-list-item-title",[e._v(e._s(n.label))])],1)})),1)],1)],1):t("v-list-item",{key:s,attrs:{disabled:i.disabled,"data-test":e.formatDT(`${e.title} ${n.label} ${i.label}`)},on:{click:function(e){return i.command(i)}}},[i.radio?t("v-list-item-action",[t("v-radio",{attrs:{color:"secondary",label:i.label,value:i.label}})],1):e._e(),e._v(" "),i.checkbox?t("v-list-item-action",[t("v-checkbox",{attrs:{color:"secondary",label:i.label},model:{value:i.checked,callback:function(t){e.$set(i,"checked",t)},expression:"option.checked"}})],1):e._e(),e._v(" "),i.icon?t("v-list-item-icon",[t("v-icon",{attrs:{disabled:i.disabled}},[e._v(e._s(i.icon))])],1):e._e(),e._v(" "),i.radio||i.checkbox?e._e():t("v-list-item-title",{style:"cursor: pointer;"+(i.disabled?"opacity: 0.2":"")},[e._v(e._s(i.label))])],1)]}))],2)],1)],1)})),e._v(" "),t("v-spacer"),e._v(" "),t("v-toolbar-title",[e._v(e._s(e.title))]),e._v(" "),t("v-spacer")],2)])},re=[];n(4597);const ce={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()},subMenuClick(e){e.command(e),this.$refs.topmenu[0].isActive=!1}},mounted(){"COSMOS "===this.title.substring(0,7)?document.title=this.title.substring(7):document.title=this.title}},de=ce;n(2416);var ue=(0,k.Z)(de,oe,re,!1,null,"11569d60",null);const me=ue.exports;var he=n(7955);function pe(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/SettingsDialog.vue",t="643111a82a36afc079839ae910b8bec01c9b2dc9",n=new Function("return this")(),i="__coverage__",s={path:"/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/SettingsDialog.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:854}},4:{start:{line:1,column:153},end:{line:1,column:165}},5:{start:{line:1,column:409},end:{line:1,column:702}},6:{start:{line:1,column:630},end:{line:1,column:666}},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:137},end:{line:1,column:138}},loc:{start:{line:1,column:152},end:{line:1,column:166}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:394},end:{line:1,column:395}},loc:{start:{line:1,column:408},end:{line:1,column:703}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:614},end:{line:1,column:615}},loc:{start:{line:1,column:629},end:{line:1,column:667}},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:"643111a82a36afc079839ae910b8bec01c9b2dc9"},a=n[i]||(n[i]={});a[e]&&a[e].hash===t||(a[e]=s);var l=a[e];return pe=function(){return l},l}pe(),pe().s[0]++;var ve=function(){pe().f[0]++;var e=(pe().s[1]++,this),t=(pe().s[2]++,e._self._c);return pe().s[3]++,t("v-dialog",{attrs:{width:"600"},model:{value:e.show,callback:function(t){pe().f[1]++,pe().s[4]++,e.show=t},expression:"show"}},[t("v-system-bar",[t("v-spacer"),e._v(" "),t("span",[e._v("TlmGrapher Settings")]),e._v(" "),t("v-spacer")],1),e._v(" "),t("v-card",{staticClass:"pa-3"},[t("v-card-text",[e._l(e.settings,(function(n){return pe().f[2]++,pe().s[5]++,t("div",{key:n.title},[t("v-row",{staticClass:"my-5"},[t("v-text-field",{attrs:{"hide-details":"auto",type:"number",rules:n.rules,label:n.title},model:{value:n.value,callback:function(t){pe().f[3]++,pe().s[6]++,e.$set(n,"value",e._n(t))},expression:"item.value"}})],1)],1)})),e._v(" "),t("v-row",[t("span",{staticClass:"red--text"},[e._v("\n Increasing these values may cause issues\n ")])])],2)],1)],1)},ge=(pe().s[7]++,[]);const Ae={Accept:"application/json"};function fe(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/SettingsDialog.vue",t="2a6a925ee2a8659c7b7094fc9861b9d4a25006e7",n=new Function("return this")(),i="__coverage__",s={path:"/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/SettingsDialog.vue",statementMap:{0:{start:{line:13,column:4},end:{line:13,column:13}},1:{start:{line:18,column:8},end:{line:18,column:25}},2:{start:{line:21,column:8},end:{line:21,column:34}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:2},end:{line:12,column:3}},loc:{start:{line:12,column:9},end:{line:14,column:3}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:17,column:6},end:{line:17,column:7}},loc:{start:{line:17,column:12},end:{line:19,column:7}},line:17},2:{name:"(anonymous_2)",decl:{start:{line:20,column:6},end:{line:20,column:7}},loc:{start:{line:20,column:17},end:{line:22,column:7}},line:20}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,sources:["SettingsDialog.vue"],names:[],mappings:";AAqDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"SettingsDialog.vue",sourceRoot:"src/tools/TlmGrapher",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-dialog v-model="show" width="600">\n <v-system-bar>\n <v-spacer />\n <span>TlmGrapher Settings</span>\n <v-spacer />\n </v-system-bar>\n <v-card class="pa-3">\n <v-card-text>\n <div v-for="item in settings" :key="item.title">\n <v-row class="my-5">\n <v-text-field\n hide-details="auto"\n type="number"\n :rules="item.rules"\n :label="item.title"\n v-model.number="item.value"\n />\n </v-row>\n </div>\n <v-row>\n <span class="red--text">\n Increasing these values may cause issues\n </span>\n </v-row>\n </v-card-text>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nimport Api from \'@openc3/tool-common/src/services/api\'\n\nexport default {\n props: {\n settings: {\n type: Object,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n data() {\n return {}\n },\n computed: {\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {},\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2a6a925ee2a8659c7b7094fc9861b9d4a25006e7"},a=n[i]||(n[i]={});a[e]&&a[e].hash===t||(a[e]=s);var l=a[e];return fe=function(){return l},l}fe();const _e={props:{settings:{type:Object,required:!0},value:Boolean},data(){return fe().f[0]++,fe().s[0]++,{}},computed:{show:{get(){return fe().f[1]++,fe().s[1]++,this.value},set(e){fe().f[2]++,fe().s[2]++,this.$emit("input",e)}}},methods:{}},ye=_e;var Ce=(0,k.Z)(ye,ve,ge,!1,null,null,null);const be=Ce.exports;function we(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/TlmGrapher.vue",t="10b47e59ea5646f35aa047fb4f0ebd137a5be955",n=new Function("return this")(),i="__coverage__",s={path:"/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/TlmGrapher.vue",statementMap:{0:{start:{line:12,column:27},end:{line:12,column:30}},1:{start:{line:24,column:4},end:{line:134,column:5}},2:{start:{line:46,column:16},end:{line:46,column:42}},3:{start:{line:53,column:16},end:{line:53,column:42}},4:{start:{line:60,column:16},end:{line:60,column:38}},5:{start:{line:72,column:16},end:{line:72,column:31}},6:{start:{line:82,column:16},end:{line:82,column:36}},7:{start:{line:89,column:16},end:{line:89,column:36}},8:{start:{line:96,column:16},end:{line:96,column:35}},9:{start:{line:106,column:16},end:{line:106,column:46}},10:{start:{line:116,column:29},end:{line:116,column:50}},11:{start:{line:121,column:29},end:{line:121,column:50}},12:{start:{line:126,column:29},end:{line:126,column:50}},13:{start:{line:131,column:29},end:{line:131,column:50}},14:{start:{line:137,column:4},end:{line:142,column:6}},15:{start:{line:145,column:4},end:{line:147,column:6}},16:{start:{line:146,column:6},end:{line:146,column:39}},17:{start:{line:148,column:27},end:{line:148,column:72}},18:{start:{line:150,column:4},end:{line:168,column:5}},19:{start:{line:151,column:6},end:{line:151,column:60}},20:{start:{line:154,column:9},end:{line:168,column:5}},21:{start:{line:159,column:6},end:{line:165,column:8}},22:{start:{line:166,column:11},end:{line:168,column:5}},23:{start:{line:167,column:6},end:{line:167,column:44}},24:{start:{line:172,column:6},end:{line:172,column:31}},25:{start:{line:175,column:6},end:{line:192,column:7}},26:{start:{line:176,column:8},end:{line:191,column:9}},27:{start:{line:184,column:10},end:{line:189,column:12}},28:{start:{line:190,column:10},end:{line:190,column:16}},29:{start:{line:193,column:6},end:{line:193,column:71}},30:{start:{line:194,column:6},end:{line:196,column:7}},31:{start:{line:195,column:8},end:{line:195,column:28}},32:{start:{line:199,column:17},end:{line:199,column:29}},33:{start:{line:200,column:6},end:{line:200,column:26}},34:{start:{line:201,column:6},end:{line:201,column:23}},35:{start:{line:202,column:6},end:{line:211,column:8}},36:{start:{line:203,column:20},end:{line:205,column:10}},37:{start:{line:206,column:8},end:{line:206,column:29}},38:{start:{line:207,column:8},end:{line:207,column:33}},39:{start:{line:208,column:8},end:{line:210,column:30}},40:{start:{line:209,column:10},end:{line:209,column:43}},41:{start:{line:214,column:18},end:{line:214,column:80}},42:{start:{line:215,column:6},end:{line:215,column:29}},43:{start:{line:216,column:6},end:{line:216,column:52}},44:{start:{line:217,column:6},end:{line:217,column:33}},45:{start:{line:219,column:6},end:{line:221,column:7}},46:{start:{line:220,column:8},end:{line:220,column:29}},47:{start:{line:225,column:6},end:{line:227,column:7}},48:{start:{line:226,column:8},end:{line:226,column:30}},49:{start:{line:228,column:6},end:{line:228,column:22}},50:{start:{line:231,column:6},end:{line:231,column:31}},51:{start:{line:232,column:6},end:{line:237,column:7}},52:{start:{line:234,column:10},end:{line:234,column:43}},53:{start:{line:240,column:6},end:{line:245,column:7}},54:{start:{line:242,column:10},end:{line:242,column:43}},55:{start:{line:250,column:6},end:{line:252,column:7}},56:{start:{line:251,column:8},end:{line:251,column:29}},57:{start:{line:255,column:6},end:{line:277,column:8}},58:{start:{line:256,column:8},end:{line:256,column:29}},59:{start:{line:257,column:8},end:{line:257,column:30}},60:{start:{line:258,column:8},end:{line:260,column:9}},61:{start:{line:259,column:10},end:{line:259,column:25}},62:{start:{line:261,column:8},end:{line:261,column:30}},63:{start:{line:262,column:21},end:{line:262,column:25}},64:{start:{line:263,column:8},end:{line:274,column:10}},65:{start:{line:264,column:25},end:{line:264,column:51}},66:{start:{line:265,column:10},end:{line:265,column:38}},67:{start:{line:266,column:10},end:{line:266,column:46}},68:{start:{line:267,column:10},end:{line:267,column:48}},69:{start:{line:268,column:10},end:{line:268,column:46}},70:{start:{line:269,column:10},end:{line:269,column:46}},71:{start:{line:270,column:10},end:{line:270,column:64}},72:{start:{line:271,column:10},end:{line:271,column:60}},73:{start:{line:272,column:10},end:{line:272,column:51}},74:{start:{line:273,column:10},end:{line:273,column:45}},75:{start:{line:275,column:8},end:{line:275,column:28}},76:{start:{line:276,column:8},end:{line:276,column:25}},77:{start:{line:280,column:21},end:{line:295,column:8}},78:{start:{line:282,column:24},end:{line:282,column:67}},79:{start:{line:283,column:25},end:{line:283,column:47}},80:{start:{line:284,column:8},end:{line:294,column:9}},81:{start:{line:296,column:6},end:{line:296,column:39}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:23,column:2},end:{line:23,column:3}},loc:{start:{line:23,column:9},end:{line:135,column:3}},line:23},1:{name:"(anonymous_1)",decl:{start:{line:45,column:23},end:{line:45,column:24}},loc:{start:{line:45,column:29},end:{line:47,column:15}},line:45},2:{name:"(anonymous_2)",decl:{start:{line:52,column:23},end:{line:52,column:24}},loc:{start:{line:52,column:29},end:{line:54,column:15}},line:52},3:{name:"(anonymous_3)",decl:{start:{line:59,column:23},end:{line:59,column:24}},loc:{start:{line:59,column:29},end:{line:61,column:15}},line:59},4:{name:"(anonymous_4)",decl:{start:{line:71,column:23},end:{line:71,column:24}},loc:{start:{line:71,column:29},end:{line:73,column:15}},line:71},5:{name:"(anonymous_5)",decl:{start:{line:81,column:23},end:{line:81,column:24}},loc:{start:{line:81,column:29},end:{line:83,column:15}},line:81},6:{name:"(anonymous_6)",decl:{start:{line:88,column:23},end:{line:88,column:24}},loc:{start:{line:88,column:29},end:{line:90,column:15}},line:88},7:{name:"(anonymous_7)",decl:{start:{line:95,column:23},end:{line:95,column:24}},loc:{start:{line:95,column:29},end:{line:97,column:15}},line:95},8:{name:"(anonymous_8)",decl:{start:{line:105,column:23},end:{line:105,column:24}},loc:{start:{line:105,column:29},end:{line:107,column:15}},line:105},9:{name:"(anonymous_9)",decl:{start:{line:116,column:18},end:{line:116,column:19}},loc:{start:{line:116,column:29},end:{line:116,column:50}},line:116},10:{name:"(anonymous_10)",decl:{start:{line:121,column:18},end:{line:121,column:19}},loc:{start:{line:121,column:29},end:{line:121,column:50}},line:121},11:{name:"(anonymous_11)",decl:{start:{line:126,column:18},end:{line:126,column:19}},loc:{start:{line:126,column:29},end:{line:126,column:50}},line:126},12:{name:"(anonymous_12)",decl:{start:{line:131,column:18},end:{line:131,column:19}},loc:{start:{line:131,column:29},end:{line:131,column:50}},line:131},13:{name:"(anonymous_13)",decl:{start:{line:136,column:11},end:{line:136,column:12}},loc:{start:{line:136,column:23},end:{line:169,column:3}},line:136},14:{name:"(anonymous_14)",decl:{start:{line:145,column:25},end:{line:145,column:26}},loc:{start:{line:145,column:41},end:{line:147,column:5}},line:145},15:{name:"(anonymous_15)",decl:{start:{line:171,column:19},end:{line:171,column:20}},loc:{start:{line:171,column:33},end:{line:173,column:5}},line:171},16:{name:"(anonymous_16)",decl:{start:{line:174,column:13},end:{line:174,column:14}},loc:{start:{line:174,column:54},end:{line:197,column:5}},line:174},17:{name:"(anonymous_17)",decl:{start:{line:198,column:14},end:{line:198,column:15}},loc:{start:{line:198,column:26},end:{line:212,column:5}},line:198},18:{name:"(anonymous_18)",decl:{start:{line:202,column:21},end:{line:202,column:22}},loc:{start:{line:202,column:33},end:{line:211,column:7}},line:202},19:{name:"(anonymous_19)",decl:{start:{line:208,column:19},end:{line:208,column:20}},loc:{start:{line:208,column:25},end:{line:210,column:9}},line:208},20:{name:"(anonymous_20)",decl:{start:{line:213,column:16},end:{line:213,column:17}},loc:{start:{line:213,column:30},end:{line:222,column:5}},line:213},21:{name:"(anonymous_21)",decl:{start:{line:223,column:20},end:{line:223,column:21}},loc:{start:{line:223,column:32},end:{line:229,column:5}},line:223},22:{name:"(anonymous_22)",decl:{start:{line:230,column:17},end:{line:230,column:18}},loc:{start:{line:230,column:31},end:{line:238,column:5}},line:230},23:{name:"(anonymous_23)",decl:{start:{line:233,column:8},end:{line:233,column:9}},loc:{start:{line:233,column:14},end:{line:235,column:9}},line:233},24:{name:"(anonymous_24)",decl:{start:{line:239,column:12},end:{line:239,column:13}},loc:{start:{line:239,column:24},end:{line:246,column:5}},line:239},25:{name:"(anonymous_25)",decl:{start:{line:241,column:8},end:{line:241,column:9}},loc:{start:{line:241,column:14},end:{line:243,column:9}},line:241},26:{name:"(anonymous_26)",decl:{start:{line:247,column:18},end:{line:247,column:19}},loc:{start:{line:247,column:34},end:{line:253,column:5}},line:247},27:{name:"(anonymous_27)",decl:{start:{line:254,column:23},end:{line:254,column:24}},loc:{start:{line:254,column:55},end:{line:278,column:5}},line:254},28:{name:"(anonymous_28)",decl:{start:{line:255,column:40},end:{line:255,column:41}},loc:{start:{line:255,column:58},end:{line:277,column:7}},line:255},29:{name:"(anonymous_29)",decl:{start:{line:263,column:23},end:{line:263,column:24}},loc:{start:{line:263,column:43},end:{line:274,column:9}},line:263},30:{name:"(anonymous_30)",decl:{start:{line:279,column:23},end:{line:279,column:24}},loc:{start:{line:279,column:39},end:{line:297,column:5}},line:279},31:{name:"(anonymous_31)",decl:{start:{line:280,column:46},end:{line:280,column:47}},loc:{start:{line:280,column:56},end:{line:295,column:7}},line:280}},branchMap:{0:{loc:{start:{line:116,column:29},end:{line:116,column:50}},type:"binary-expr",locations:[{start:{line:116,column:29},end:{line:116,column:36}},{start:{line:116,column:40},end:{line:116,column:50}}],line:116},1:{loc:{start:{line:121,column:29},end:{line:121,column:50}},type:"binary-expr",locations:[{start:{line:121,column:29},end:{line:121,column:36}},{start:{line:121,column:40},end:{line:121,column:50}}],line:121},2:{loc:{start:{line:126,column:29},end:{line:126,column:50}},type:"binary-expr",locations:[{start:{line:126,column:29},end:{line:126,column:36}},{start:{line:126,column:40},end:{line:126,column:50}}],line:126},3:{loc:{start:{line:131,column:29},end:{line:131,column:50}},type:"binary-expr",locations:[{start:{line:131,column:29},end:{line:131,column:36}},{start:{line:131,column:40},end:{line:131,column:50}}],line:131},4:{loc:{start:{line:150,column:4},end:{line:168,column:5}},type:"if",locations:[{start:{line:150,column:4},end:{line:168,column:5}},{start:{line:154,column:9},end:{line:168,column:5}}],line:150},5:{loc:{start:{line:150,column:8},end:{line:150,column:53}},type:"binary-expr",locations:[{start:{line:150,column:8},end:{line:150,column:25}},{start:{line:150,column:29},end:{line:150,column:53}}],line:150},6:{loc:{start:{line:154,column:9},end:{line:168,column:5}},type:"if",locations:[{start:{line:154,column:9},end:{line:168,column:5}},{start:{line:166,column:11},end:{line:168,column:5}}],line:154},7:{loc:{start:{line:155,column:6},end:{line:157,column:29}},type:"binary-expr",locations:[{start:{line:155,column:6},end:{line:155,column:31}},{start:{line:156,column:6},end:{line:156,column:31}},{start:{line:157,column:6},end:{line:157,column:29}}],line:155},8:{loc:{start:{line:166,column:11},end:{line:168,column:5}},type:"if",locations:[{start:{line:166,column:11},end:{line:168,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:166},9:{loc:{start:{line:174,column:32},end:{line:174,column:52}},type:"default-arg",locations:[{start:{line:174,column:48},end:{line:174,column:52}}],line:174},10:{loc:{start:{line:176,column:8},end:{line:191,column:9}},type:"if",locations:[{start:{line:176,column:8},end:{line:191,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:176},11:{loc:{start:{line:177,column:10},end:{line:182,column:50}},type:"binary-expr",locations:[{start:{line:177,column:10},end:{line:177,column:48}},{start:{line:178,column:10},end:{line:178,column:48}},{start:{line:179,column:10},end:{line:179,column:44}},{start:{line:180,column:10},end:{line:180,column:46}},{start:{line:181,column:10},end:{line:181,column:42}},{start:{line:182,column:10},end:{line:182,column:50}}],line:177},12:{loc:{start:{line:194,column:6},end:{line:196,column:7}},type:"if",locations:[{start:{line:194,column:6},end:{line:196,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:194},13:{loc:{start:{line:219,column:6},end:{line:221,column:7}},type:"if",locations:[{start:{line:219,column:6},end:{line:221,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:219},14:{loc:{start:{line:250,column:6},end:{line:252,column:7}},type:"if",locations:[{start:{line:250,column:6},end:{line:252,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:250},15:{loc:{start:{line:254,column:39},end:{line:254,column:53}},type:"default-arg",locations:[{start:{line:254,column:48},end:{line:254,column:53}}],line:254}},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},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},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,0],8:[0,0],9:[0],10:[0,0],11:[0,0,0,0,0,0],12:[0,0],13:[0,0],14:[0,0],15:[0]},inputSourceMap:{version:3,sources:["TlmGrapher.vue"],names:[],mappings:";AAmJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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:"TlmGrapher.vue",sourceRoot:"src/tools/TlmGrapher",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-expansion-panels v-model="panel" style="margin-bottom: 5px">\n <v-expansion-panel>\n <v-expansion-panel-header style="z-index: 1"></v-expansion-panel-header>\n <v-expansion-panel-content>\n <v-card>\n <div v-show="this.selectedGraphId === null">\n <v-row class="my-5">\n <v-spacer />\n <span>\n Add a graph from the menu bar or select an existing graph to\n continue\n </span>\n <v-spacer />\n </v-row>\n </div>\n\n <v-row\n class="px-1"\n justify="space-between"\n v-show="this.selectedGraphId !== null"\n >\n <v-col cols="11" style="padding-bottom: 0px">\n <target-packet-item-chooser\n :initial-target-name="this.$route.params.target"\n :initial-packet-name="this.$route.params.packet"\n :initial-item-name="this.$route.params.item"\n @click="addItem"\n button-text="Add Item"\n choose-item\n select-types\n />\n </v-col>\n <v-col cols="1">\n <v-btn\n v-show="state === \'pause\'"\n class="pulse"\n v-on:click="\n () => {\n state = \'start\'\n }\n "\n color="primary"\n fab\n data-test="start-graph"\n >\n <v-icon large>mdi-play</v-icon>\n </v-btn>\n <v-btn\n v-show="state === \'start\'"\n v-on:click="\n () => {\n state = \'pause\'\n }\n "\n color="primary"\n fab\n data-test="pause-graph"\n >\n <v-icon large>mdi-pause</v-icon>\n </v-btn>\n </v-col>\n </v-row>\n </v-card>\n </v-expansion-panel-content>\n </v-expansion-panel>\n </v-expansion-panels>\n <div>\n <div class="grid">\n <div\n class="item"\n v-for="graph in graphs"\n :key="graph"\n :id="`gridItem${graph}`"\n :ref="`gridItem${graph}`"\n >\n <div class="item-content">\n <graph\n :ref="`graph${graph}`"\n :id="graph"\n :state="state"\n :start-time="startTime"\n :selected-graph-id="selectedGraphId"\n :seconds-graphed="settings.secondsGraphed.value"\n :points-saved="settings.pointsSaved.value"\n :points-graphed="settings.pointsGraphed.value"\n :refresh-interval-ms="settings.refreshIntervalMs.value"\n @close-graph="() => closeGraph(graph)"\n @min-max-graph="() => minMaxGraph(graph)"\n @resize="() => resize()"\n @pause="() => (state = \'pause\')"\n @start="() => (state = \'start\')"\n @click="() => graphSelected(graph)"\n @started="graphStarted"\n />\n </div>\n </div>\n </div>\n </div>\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="showOpenConfig"\n v-model="showOpenConfig"\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="showSaveConfig"\n v-model="showSaveConfig"\n :configKey="configKey"\n @success="saveConfiguration"\n />\n \x3c!-- Note we\'re using v-if here so it gets re-created each time and refreshes the list --\x3e\n <settings-dialog\n v-show="showSettingsDialog"\n v-model="showSettingsDialog"\n :settings="settings"\n />\n </div>\n</template>\n\n<script>\nimport Config from \'@openc3/tool-common/src/components/config/Config\'\nimport Graph from \'@openc3/tool-common/src/components/Graph.vue\'\nimport OpenConfigDialog from \'@openc3/tool-common/src/components/config/OpenConfigDialog\'\nimport SaveConfigDialog from \'@openc3/tool-common/src/components/config/SaveConfigDialog\'\nimport TargetPacketItemChooser from \'@openc3/tool-common/src/components/TargetPacketItemChooser\'\nimport TopBar from \'@openc3/tool-common/src/components/TopBar\'\nimport Muuri from \'muuri\'\n\nimport SettingsDialog from \'@/tools/TlmGrapher/SettingsDialog\'\n\nconst MURRI_REFRESH_TIME = 250\nexport default {\n components: {\n Graph,\n OpenConfigDialog,\n SaveConfigDialog,\n SettingsDialog,\n TargetPacketItemChooser,\n TopBar,\n },\n mixins: [Config],\n data() {\n return {\n title: \'COSMOS Telemetry Grapher\',\n configKey: \'telemetry_grapher\',\n showOpenConfig: false,\n showSaveConfig: false,\n showSettingsDialog: false,\n grid: null,\n panel: 0,\n state: \'stop\', // Valid: stop, start, pause\n startTime: null, // Start time in nanoseconds\n // Setup defaults to show an initial graph\n graphs: [0],\n selectedGraphId: 0,\n counter: 1,\n menus: [\n {\n label: \'File\',\n items: [\n {\n label: \'Open Configuration\',\n icon: \'mdi-folder-open\',\n command: () => {\n this.showOpenConfig = true\n },\n },\n {\n label: \'Save Configuration\',\n icon: \'mdi-content-save\',\n command: () => {\n this.showSaveConfig = true\n },\n },\n {\n label: \'Reset Configuration\',\n icon: \'mdi-monitor-shimmer\',\n command: () => {\n this.resetConfigBase()\n },\n },\n ],\n },\n {\n label: \'Graph\',\n items: [\n {\n label: \'Add Graph\',\n icon: \'mdi-plus\',\n command: () => {\n this.addGraph()\n },\n },\n {\n divider: true,\n },\n {\n label: \'Start / Resume\',\n icon: \'mdi-play\',\n command: () => {\n this.state = \'start\'\n },\n },\n {\n label: \'Pause\',\n icon: \'mdi-pause\',\n command: () => {\n this.state = \'pause\'\n },\n },\n {\n label: \'Stop\',\n icon: \'mdi-stop\',\n command: () => {\n this.state = \'stop\'\n },\n },\n {\n divider: true,\n },\n {\n label: \'Settings\',\n icon: \'mdi-cog\',\n command: () => {\n this.showSettingsDialog = true\n },\n },\n ],\n },\n ],\n settings: {\n secondsGraphed: {\n title: \'Seconds Graphed\',\n value: 1000,\n rules: [(value) => !!value || \'Required\'],\n },\n pointsSaved: {\n title: \'Points Saved\',\n value: 1000000,\n rules: [(value) => !!value || \'Required\'],\n },\n pointsGraphed: {\n title: \'Points Graphed\',\n value: 1000,\n rules: [(value) => !!value || \'Required\'],\n },\n refreshIntervalMs: {\n title: \'Refresh Interval Ms\',\n value: 100,\n rules: [(value) => !!value || \'Required\'],\n },\n },\n }\n },\n mounted: function () {\n this.grid = new Muuri(\'.grid\', {\n dragEnabled: true,\n layoutOnResize: true,\n // Only allow drags starting from the v-system-bar title\n dragHandle: \'.v-system-bar\',\n })\n // Sometimes when we move graphs, other graphs become non-interactive\n // This seems to fix that issue\n this.grid.on(\'move\', function (data) {\n data.item.getGrid().synchronize()\n })\n const previousConfig = localStorage[`lastconfig__${this.configKey}`]\n // Called like /tools/tlmgrapher?config=temps\n if (this.$route.query && this.$route.query.config) {\n this.openConfiguration(this.$route.query.config, true) // routed\n }\n // If we\'re passed in the route then manually addItem\n else if (\n this.$route.params.target &&\n this.$route.params.packet &&\n this.$route.params.item\n ) {\n this.addItem({\n targetName: this.$route.params.target.toUpperCase(),\n packetName: this.$route.params.packet.toUpperCase(),\n itemName: this.$route.params.item.toUpperCase(),\n valueType: \'CONVERTED\',\n reduced: \'DECOM\',\n })\n } else if (previousConfig) {\n this.openConfiguration(previousConfig)\n }\n },\n methods: {\n graphSelected: function (id) {\n this.selectedGraphId = id\n },\n addItem: function (newItem, startGraphing = true) {\n for (const item of this.$refs[`graph${this.selectedGraphId}`][0].items) {\n if (\n newItem.targetName === item.targetName &&\n newItem.packetName === item.packetName &&\n newItem.itemName === item.itemName &&\n newItem.valueType === item.valueType &&\n newItem.reduced === item.reduced &&\n newItem.reducedType === item.reducedType\n ) {\n this.$notify.caution({\n title: \'Item Already Exists\',\n body:\n `Item ${newItem.targetName} ${newItem.packetName} ${newItem.itemName} ` +\n `with ${newItem.valueType} ${newItem.reduced} ${newItem.reducedType} already exists!`,\n })\n return\n }\n }\n this.$refs[`graph${this.selectedGraphId}`][0].addItems([newItem])\n if (startGraphing === true) {\n this.state = \'start\'\n }\n },\n addGraph: function () {\n const id = this.counter\n this.graphs.push(id)\n this.counter += 1\n this.$nextTick(function () {\n var items = this.grid.add(this.$refs[`gridItem${id}`], {\n active: false,\n })\n this.grid.show(items)\n this.selectedGraphId = id\n setTimeout(() => {\n this.grid.refreshItems().layout()\n }, MURRI_REFRESH_TIME)\n })\n },\n closeGraph: function (id) {\n var items = this.grid.getItems([document.getElementById(`gridItem${id}`)])\n this.grid.remove(items)\n this.graphs.splice(this.graphs.indexOf(id), 1)\n this.selectedGraphId = null\n // Clear out the startTime if we close all the graphs ... we\'re starting over\n if (this.graphs.length === 0) {\n this.startTime = null\n }\n },\n closeAllGraphs: function () {\n // Make a copy of this.graphs to iterate on since closeGraph modifies in place\n for (let graph of [...this.graphs]) {\n this.closeGraph(graph)\n }\n this.counter = 0\n },\n minMaxGraph: function (id) {\n this.selectedGraphId = id\n setTimeout(\n () => {\n this.grid.refreshItems().layout()\n },\n MURRI_REFRESH_TIME * 2, // Double the time since there is more animation\n )\n },\n resize: function () {\n setTimeout(\n () => {\n this.grid.refreshItems().layout()\n },\n MURRI_REFRESH_TIME * 2, // Double the time since there is more animation\n )\n },\n graphStarted: function (time) {\n // Only set startTime once when notified by the first graph to start\n // This allows us to have a uniform start time on all graphs\n if (this.startTime === null) {\n this.startTime = time\n }\n },\n openConfiguration: function (name, routed = false) {\n this.openConfigBase(name, routed, async (config) => {\n this.closeAllGraphs()\n await this.$nextTick()\n for (let graph of config) {\n this.addGraph()\n }\n await this.$nextTick()\n const that = this\n config.forEach(function (graph, i) {\n let vueGraph = that.$refs[`graph${i}`][0]\n vueGraph.title = graph.title\n vueGraph.fullWidth = graph.fullWidth\n vueGraph.fullHeight = graph.fullHeight\n vueGraph.graphMinX = graph.graphMinX\n vueGraph.graphMaxX = graph.graphMaxX\n vueGraph.graphStartDateTime = graph.graphStartDateTime\n vueGraph.graphEndDateTime = graph.graphEndDateTime\n vueGraph.moveLegend(graph.legendPosition)\n vueGraph.addItems([...graph.items])\n })\n this.state = \'start\'\n this.panel = null // Minimize the expansion panel\n })\n },\n saveConfiguration: function (name) {\n const config = this.grid.getItems().map((item) => {\n // Map the gridItem id to the graph id\n const graphId = `graph${item.getElement().id.substring(8)}`\n const vueGraph = this.$refs[graphId][0]\n return {\n items: vueGraph.items,\n title: vueGraph.title,\n fullWidth: vueGraph.fullWidth,\n fullHeight: vueGraph.fullHeight,\n graphMinX: vueGraph.graphMinX,\n graphMaxX: vueGraph.graphMaxX,\n legendPosition: vueGraph.legendPosition,\n graphStartDateTime: vueGraph.graphStartDateTime,\n graphEndDateTime: vueGraph.graphEndDateTime,\n }\n })\n this.saveConfigBase(name, config)\n },\n },\n}\n<\/script>\n\n<style>\n/* Flash the chevron icon 3 times to let the user know they can minimize the controls */\ni.v-icon.mdi-chevron-down {\n animation: pulse 2s 3;\n}\n@keyframes pulse {\n 0% {\n -webkit-box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);\n }\n 70% {\n -webkit-box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);\n }\n 100% {\n -webkit-box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);\n }\n}\n</style>\n<style lang="scss" scoped>\n.v-expansion-panel-content {\n background-color: var(--v-tertiary-darken2);\n .container {\n margin: 0px;\n }\n}\n.v-expansion-panel-header {\n min-height: 10px;\n padding: 5px;\n background-color: var(--v-tertiary-darken2);\n}\n.v-navigation-drawer {\n z-index: 2;\n}\n.theme--dark.v-navigation-drawer {\n background-color: var(--v-primary-darken2);\n}\n.grid {\n position: relative;\n}\n.item {\n position: absolute;\n z-index: 1;\n}\n.item.muuri-item-dragging {\n z-index: 3;\n}\n.item.muuri-item-releasing {\n z-index: 2;\n}\n.item.muuri-item-hidden {\n z-index: 0;\n}\n.item-content {\n position: relative;\n cursor: pointer;\n border-radius: 6px;\n margin: 5px;\n}\n\n.pulse {\n animation: pulse 1s infinite;\n}\n\n@keyframes pulse {\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.5;\n }\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"10b47e59ea5646f35aa047fb4f0ebd137a5be955"},a=n[i]||(n[i]={});a[e]&&a[e].hash===t||(a[e]=s);var l=a[e];return we=function(){return l},l}we();const xe=(we().s[0]++,250),ke={components:{Graph:V,OpenConfigDialog:q,SaveConfigDialog:ee,SettingsDialog:be,TargetPacketItemChooser:le,TopBar:me},mixins:[p],data(){return we().f[0]++,we().s[1]++,{title:"COSMOS Telemetry Grapher",configKey:"telemetry_grapher",showOpenConfig:!1,showSaveConfig:!1,showSettingsDialog:!1,grid:null,panel:0,state:"stop",startTime:null,graphs:[0],selectedGraphId:0,counter:1,menus:[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{we().f[1]++,we().s[2]++,this.showOpenConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{we().f[2]++,we().s[3]++,this.showSaveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{we().f[3]++,we().s[4]++,this.resetConfigBase()}}]},{label:"Graph",items:[{label:"Add Graph",icon:"mdi-plus",command:()=>{we().f[4]++,we().s[5]++,this.addGraph()}},{divider:!0},{label:"Start / Resume",icon:"mdi-play",command:()=>{we().f[5]++,we().s[6]++,this.state="start"}},{label:"Pause",icon:"mdi-pause",command:()=>{we().f[6]++,we().s[7]++,this.state="pause"}},{label:"Stop",icon:"mdi-stop",command:()=>{we().f[7]++,we().s[8]++,this.state="stop"}},{divider:!0},{label:"Settings",icon:"mdi-cog",command:()=>{we().f[8]++,we().s[9]++,this.showSettingsDialog=!0}}]}],settings:{secondsGraphed:{title:"Seconds Graphed",value:1e3,rules:[e=>(we().f[9]++,we().s[10]++,we().b[0][0]++,!!e||(we().b[0][1]++,"Required"))]},pointsSaved:{title:"Points Saved",value:1e6,rules:[e=>(we().f[10]++,we().s[11]++,we().b[1][0]++,!!e||(we().b[1][1]++,"Required"))]},pointsGraphed:{title:"Points Graphed",value:1e3,rules:[e=>(we().f[11]++,we().s[12]++,we().b[2][0]++,!!e||(we().b[2][1]++,"Required"))]},refreshIntervalMs:{title:"Refresh Interval Ms",value:100,rules:[e=>(we().f[12]++,we().s[13]++,we().b[3][0]++,!!e||(we().b[3][1]++,"Required"))]}}}},mounted:function(){we().f[13]++,we().s[14]++,this.grid=new he.Z(".grid",{dragEnabled:!0,layoutOnResize:!0,dragHandle:".v-system-bar"}),we().s[15]++,this.grid.on("move",(function(e){we().f[14]++,we().s[16]++,e.item.getGrid().synchronize()}));const e=(we().s[17]++,localStorage[`lastconfig__${this.configKey}`]);we().s[18]++,we().b[5][0]++,this.$route.query&&(we().b[5][1]++,this.$route.query.config)?(we().b[4][0]++,we().s[19]++,this.openConfiguration(this.$route.query.config,!0)):(we().b[4][1]++,we().s[20]++,we().b[7][0]++,this.$route.params.target&&(we().b[7][1]++,this.$route.params.packet)&&(we().b[7][2]++,this.$route.params.item)?(we().b[6][0]++,we().s[21]++,this.addItem({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase(),itemName:this.$route.params.item.toUpperCase(),valueType:"CONVERTED",reduced:"DECOM"})):(we().b[6][1]++,we().s[22]++,e?(we().b[8][0]++,we().s[23]++,this.openConfiguration(e)):we().b[8][1]++))},methods:{graphSelected:function(e){we().f[15]++,we().s[24]++,this.selectedGraphId=e},addItem:function(e,t=(we().b[9][0]++,!0)){we().f[16]++,we().s[25]++;for(const n of this.$refs[`graph${this.selectedGraphId}`][0].items){if(we().s[26]++,we().b[11][0]++,e.targetName===n.targetName&&(we().b[11][1]++,e.packetName===n.packetName)&&(we().b[11][2]++,e.itemName===n.itemName)&&(we().b[11][3]++,e.valueType===n.valueType)&&(we().b[11][4]++,e.reduced===n.reduced)&&(we().b[11][5]++,e.reducedType===n.reducedType))return we().b[10][0]++,we().s[27]++,this.$notify.caution({title:"Item Already Exists",body:`Item ${e.targetName} ${e.packetName} ${e.itemName} with ${e.valueType} ${e.reduced} ${e.reducedType} already exists!`}),void we().s[28]++;we().b[10][1]++}we().s[29]++,this.$refs[`graph${this.selectedGraphId}`][0].addItems([e]),we().s[30]++,!0===t?(we().b[12][0]++,we().s[31]++,this.state="start"):we().b[12][1]++},addGraph:function(){we().f[17]++;const e=(we().s[32]++,this.counter);we().s[33]++,this.graphs.push(e),we().s[34]++,this.counter+=1,we().s[35]++,this.$nextTick((function(){we().f[18]++;var t=(we().s[36]++,this.grid.add(this.$refs[`gridItem${e}`],{active:!1}));we().s[37]++,this.grid.show(t),we().s[38]++,this.selectedGraphId=e,we().s[39]++,setTimeout((()=>{we().f[19]++,we().s[40]++,this.grid.refreshItems().layout()}),xe)}))},closeGraph:function(e){we().f[20]++;var t=(we().s[41]++,this.grid.getItems([document.getElementById(`gridItem${e}`)]));we().s[42]++,this.grid.remove(t),we().s[43]++,this.graphs.splice(this.graphs.indexOf(e),1),we().s[44]++,this.selectedGraphId=null,we().s[45]++,0===this.graphs.length?(we().b[13][0]++,we().s[46]++,this.startTime=null):we().b[13][1]++},closeAllGraphs:function(){we().f[21]++,we().s[47]++;for(let e of[...this.graphs])we().s[48]++,this.closeGraph(e);we().s[49]++,this.counter=0},minMaxGraph:function(e){we().f[22]++,we().s[50]++,this.selectedGraphId=e,we().s[51]++,setTimeout((()=>{we().f[23]++,we().s[52]++,this.grid.refreshItems().layout()}),2*xe)},resize:function(){we().f[24]++,we().s[53]++,setTimeout((()=>{we().f[25]++,we().s[54]++,this.grid.refreshItems().layout()}),2*xe)},graphStarted:function(e){we().f[26]++,we().s[55]++,null===this.startTime?(we().b[14][0]++,we().s[56]++,this.startTime=e):we().b[14][1]++},openConfiguration:function(e,t=(we().b[15][0]++,!1)){we().f[27]++,we().s[57]++,this.openConfigBase(e,t,(async e=>{we().f[28]++,we().s[58]++,this.closeAllGraphs(),we().s[59]++,await this.$nextTick(),we().s[60]++;for(let n of e)we().s[61]++,this.addGraph();we().s[62]++,await this.$nextTick();const t=(we().s[63]++,this);we().s[64]++,e.forEach((function(e,n){we().f[29]++;let i=(we().s[65]++,t.$refs[`graph${n}`][0]);we().s[66]++,i.title=e.title,we().s[67]++,i.fullWidth=e.fullWidth,we().s[68]++,i.fullHeight=e.fullHeight,we().s[69]++,i.graphMinX=e.graphMinX,we().s[70]++,i.graphMaxX=e.graphMaxX,we().s[71]++,i.graphStartDateTime=e.graphStartDateTime,we().s[72]++,i.graphEndDateTime=e.graphEndDateTime,we().s[73]++,i.moveLegend(e.legendPosition),we().s[74]++,i.addItems([...e.items])})),we().s[75]++,this.state="start",we().s[76]++,this.panel=null}))},saveConfiguration:function(e){we().f[30]++;const t=(we().s[77]++,this.grid.getItems().map((e=>{we().f[31]++;const t=(we().s[78]++,`graph${e.getElement().id.substring(8)}`),n=(we().s[79]++,this.$refs[t][0]);return we().s[80]++,{items:n.items,title:n.title,fullWidth:n.fullWidth,fullHeight:n.fullHeight,graphMinX:n.graphMinX,graphMaxX:n.graphMaxX,legendPosition:n.legendPosition,graphStartDateTime:n.graphStartDateTime,graphEndDateTime:n.graphEndDateTime}})));we().s[81]++,this.saveConfigBase(e,t)}}},Te=ke;n(5180),n(8011);var Ne=(0,k.Z)(Te,s,a,!1,null,"6db80352",null);const Ie=Ne.exports},4574:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var i=n(9601),s=n.n(i),a=n(2609),l=n.n(a),o=l()(s());o.push([e.id,"i.v-icon.mdi-chevron-down{animation:pulse 2s 3}@keyframes pulse{0%{-webkit-box-shadow:0 0 0 0 hsla(0,0%,100%,.4)}70%{-webkit-box-shadow:0 0 0 10px hsla(0,0%,100%,0)}to{-webkit-box-shadow:0 0 0 0 hsla(0,0%,100%,0)}}",""]);const r=o},9729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var i=n(9601),s=n.n(i),a=n(2609),l=n.n(a),o=l()(s());o.push([e.id,".uplot.side-legend{display:flex;width:auto}.uplot.side-legend .u-wrap{flex:none}.uplot.side-legend .u-legend{text-align:left;margin-left:0;width:220px}.uplot.side-legend .u-legend,.uplot.side-legend .u-legend td,.uplot.side-legend .u-legend th,.uplot.side-legend .u-legend tr{display:revert}.uplot.left-legend .u-legend{order:-1}.uplot.top-legend{display:flex;flex-direction:column}.uplot.top-legend .u-legend{order:-1}",""]);const r=o},8329:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var i=n(9601),s=n.n(i),a=n(2609),l=n.n(a),o=l()(s());o.push([e.id,"#chart[data-v-ba6b566a]{background-color:var(--v-tertiary-darken2)}#chart[data-v-ba6b566a] .u-select{background-color:hsla(0,0%,100%,.07)}",""]);const r=o},2409:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var i=n(9601),s=n.n(i),a=n(2609),l=n.n(a),o=l()(s());o.push([e.id,".row+.row{margin-top:0}",""]);const r=o},7219:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var i=n(9601),s=n.n(i),a=n(2609),l=n.n(a),o=l()(s());o.push([e.id,".v-list[data-v-11569d60] .v-label{margin-left:5px}.v-list-item__icon[data-v-11569d60]{margin-right:15px!important}.v-list-item__title[data-v-11569d60]{color:#fff}",""]);const r=o},8434:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var i=n(9601),s=n.n(i),a=n(2609),l=n.n(a),o=l()(s());o.push([e.id,".v-expansion-panel-content[data-v-6db80352]{background-color:var(--v-tertiary-darken2)}.v-expansion-panel-content .container[data-v-6db80352]{margin:0}.v-expansion-panel-header[data-v-6db80352]{min-height:10px;padding:5px;background-color:var(--v-tertiary-darken2)}.v-navigation-drawer[data-v-6db80352]{z-index:2}.theme--dark.v-navigation-drawer[data-v-6db80352]{background-color:var(--v-primary-darken2)}.grid[data-v-6db80352]{position:relative}.item[data-v-6db80352]{position:absolute;z-index:1}.item.muuri-item-dragging[data-v-6db80352]{z-index:3}.item.muuri-item-releasing[data-v-6db80352]{z-index:2}.item.muuri-item-hidden[data-v-6db80352]{z-index:0}.item-content[data-v-6db80352]{position:relative;cursor:pointer;border-radius:6px;margin:5px}.pulse[data-v-6db80352]{animation:pulse-6db80352 1s infinite}@keyframes pulse-6db80352{0%{opacity:1}50%{opacity:.5}}",""]);const r=o},5180:(e,t,n)=>{var i=n(4574);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var s=n(3514).Z;s("143775ca",i,!0,{sourceMap:!1,shadowMode:!1})},6867:(e,t,n)=>{var i=n(9729);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var s=n(3514).Z;s("28a7f8b1",i,!0,{sourceMap:!1,shadowMode:!1})},1932:(e,t,n)=>{var i=n(8329);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var s=n(3514).Z;s("a3b23cb6",i,!0,{sourceMap:!1,shadowMode:!1})},985:(e,t,n)=>{var i=n(2409);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var s=n(3514).Z;s("a3c4944a",i,!0,{sourceMap:!1,shadowMode:!1})},2416:(e,t,n)=>{var i=n(7219);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var s=n(3514).Z;s("325f248f",i,!0,{sourceMap:!1,shadowMode:!1})},8011:(e,t,n)=>{var i=n(8434);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var s=n(3514).Z;s("3aca134a",i,!0,{sourceMap:!1,shadowMode:!1})}}]);
2
+ //# sourceMappingURL=350.js.map