openc3-cosmos-tool-tablemanager 5.18.0 → 5.20.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: 4cb25f9f1a0807f8d7e8375d73ec7d6c7b9eb9f97d47f9240544ffccb92331db
4
- data.tar.gz: 2b93dfcf28f15f86106531d3872ddd858112c481bd42109166f2554a27af2dc0
3
+ metadata.gz: 50dabe8effa94cfd24adef284a9282896a74ba8ceadf47740353ccede9298f95
4
+ data.tar.gz: 1c5d58cc39d1eda28222d55a28ae2f9f26fdb9caa84dbf8aeec608024515f257
5
5
  SHA512:
6
- metadata.gz: da90dc948f48327daa1d9fbd4672421c01ff8f548647c72c96ffdb1ae350f1b287a30dcc0f4575316625666c5de3c2466d80cbbbae999d358e2bf1ecd642b1ca
7
- data.tar.gz: f9c83db09fc654fa04a4c7613b6e7559febf27a0983f6da1e347a0b782022586383bc492437c3ed698c110a645723d46d8fd1a879931764500c30a2737501978
6
+ metadata.gz: 1bb924ef31413b6363ceaed60402cd0da1d32e934f6e47d8178c74a89c77fb342721390057a82106373fb9676b96404539a12421017ce44b8b9902e7ca4ba5eb
7
+ data.tar.gz: 90cf2610b310f1854da5499ad54ed47cc0e5dc1d7975b8f9de2c6affc0d71590971699cd14e29144116310b91b4925eb1d352b66f01cffd460db3c7f15c007af
@@ -0,0 +1,2 @@
1
+ (self["webpackChunk_openc3_cosmos_tool_tablemanager"]=self["webpackChunk_openc3_cosmos_tool_tablemanager"]||[]).push([[173],{8173:(e,n,t)=>{"use strict";function l(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableManager.vue",n="37987b31697651d2d9dd2ba75a01b8e72633cbc3",t=new Function("return this")(),i="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableManager.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:2484}},4:{start:{line:1,column:270},end:{line:3,column:74}},5:{start:{line:2,column:12},end:{line:2,column:41}},6:{start:{line:3,column:141},end:{line:3,column:166}},7:{start:{line:3,column:559},end:{line:3,column:576}},8:{start:{line:3,column:935},end:{line:3,column:955}},9:{start:{line:3,column:1287},end:{line:3,column:1313}},10:{start:{line:3,column:1706},end:{line:3,column:1737}},11:{start:{line:3,column:2041},end:{line:3,column:2076}},12:{start:{line:3,column:2370},end:{line:3,column:2401}},13:{start:{line:3,column:2716},end:{line:3,column:2735}},14:{start:{line:3,column:3052},end:{line:3,column:3073}},15:{start:{line:3,column:3357},end:{line:3,column:3638}},16:{start:{line:3,column:3575},end:{line:3,column:3599}},17:{start:{line:3,column:4092},end:{line:3,column:4106}},18:{start:{line:3,column:4211},end:{line:3,column:4225}},19:{start:{line:3,column:4291},end:{line:3,column:4374}},20:{start:{line:3,column:4462},end:{line:3,column:4476}},21:{start:{line:3,column:4542},end:{line:5,column:1555}},22:{start:{line:5,column:139},end:{line:5,column:269}},23:{start:{line:5,column:231},end:{line:5,column:264}},24:{start:{line:5,column:324},end:{line:5,column:1519}},25:{start:{line:5,column:646},end:{line:5,column:683}},26:{start:{line:5,column:996},end:{line:5,column:1037}},27:{start:{line:5,column:1340},end:{line:5,column:1377}},28:{start:{line:5,column:1701},end:{line:5,column:1727}},29:{start:{line:5,column:1754},end:{line:5,column:1781}},30:{start:{line:5,column:1837},end:{line:5,column:1853}},31:{start:{line:5,column:2092},end:{line:5,column:2125}},32:{start:{line:5,column:2152},end:{line:5,column:2179}},33:{start:{line:5,column:2237},end:{line:5,column:2255}},34:{start:{line:5,column:2436},end:{line:5,column:2453}},35:{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:250},end:{line:1,column:251}},loc:{start:{line:1,column:269},end:{line:3,column:75}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:517},end:{line:1,column:518}},loc:{start:{line:1,column:523},end:{line:3,column:11}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:3,column:125},end:{line:3,column:126}},loc:{start:{line:3,column:140},end:{line:3,column:167}},line:3},4:{name:"(anonymous_4)",decl:{start:{line:3,column:543},end:{line:3,column:544}},loc:{start:{line:3,column:558},end:{line:3,column:577}},line:3},5:{name:"(anonymous_5)",decl:{start:{line:3,column:919},end:{line:3,column:920}},loc:{start:{line:3,column:934},end:{line:3,column:956}},line:3},6:{name:"(anonymous_6)",decl:{start:{line:3,column:1271},end:{line:3,column:1272}},loc:{start:{line:3,column:1286},end:{line:3,column:1314}},line:3},7:{name:"(anonymous_7)",decl:{start:{line:3,column:1689},end:{line:3,column:1690}},loc:{start:{line:3,column:1705},end:{line:3,column:1738}},line:3},8:{name:"(anonymous_8)",decl:{start:{line:3,column:2024},end:{line:3,column:2025}},loc:{start:{line:3,column:2040},end:{line:3,column:2077}},line:3},9:{name:"(anonymous_9)",decl:{start:{line:3,column:2353},end:{line:3,column:2354}},loc:{start:{line:3,column:2369},end:{line:3,column:2402}},line:3},10:{name:"(anonymous_10)",decl:{start:{line:3,column:2699},end:{line:3,column:2700}},loc:{start:{line:3,column:2715},end:{line:3,column:2736}},line:3},11:{name:"(anonymous_11)",decl:{start:{line:3,column:3035},end:{line:3,column:3036}},loc:{start:{line:3,column:3051},end:{line:3,column:3074}},line:3},12:{name:"(anonymous_12)",decl:{start:{line:3,column:3333},end:{line:3,column:3334}},loc:{start:{line:3,column:3356},end:{line:3,column:3639}},line:3},13:{name:"(anonymous_13)",decl:{start:{line:3,column:3559},end:{line:3,column:3560}},loc:{start:{line:3,column:3574},end:{line:3,column:3600}},line:3},14:{name:"(anonymous_14)",decl:{start:{line:3,column:4076},end:{line:3,column:4077}},loc:{start:{line:3,column:4091},end:{line:3,column:4107}},line:3},15:{name:"(anonymous_15)",decl:{start:{line:3,column:4195},end:{line:3,column:4196}},loc:{start:{line:3,column:4210},end:{line:3,column:4226}},line:3},16:{name:"(anonymous_16)",decl:{start:{line:3,column:4269},end:{line:3,column:4270}},loc:{start:{line:3,column:4290},end:{line:3,column:4375}},line:3},17:{name:"(anonymous_17)",decl:{start:{line:3,column:4446},end:{line:3,column:4447}},loc:{start:{line:3,column:4461},end:{line:3,column:4477}},line:3},18:{name:"(anonymous_18)",decl:{start:{line:3,column:4520},end:{line:3,column:4521}},loc:{start:{line:3,column:4541},end:{line:5,column:1556}},line:3},19:{name:"(anonymous_19)",decl:{start:{line:5,column:120},end:{line:5,column:121}},loc:{start:{line:5,column:138},end:{line:5,column:270}},line:5},20:{name:"(anonymous_20)",decl:{start:{line:5,column:214},end:{line:5,column:215}},loc:{start:{line:5,column:230},end:{line:5,column:265}},line:5},21:{name:"(anonymous_21)",decl:{start:{line:5,column:313},end:{line:5,column:314}},loc:{start:{line:5,column:323},end:{line:5,column:1520}},line:5},22:{name:"(anonymous_22)",decl:{start:{line:5,column:629},end:{line:5,column:630}},loc:{start:{line:5,column:645},end:{line:5,column:684}},line:5},23:{name:"(anonymous_23)",decl:{start:{line:5,column:979},end:{line:5,column:980}},loc:{start:{line:5,column:995},end:{line:5,column:1038}},line:5},24:{name:"(anonymous_24)",decl:{start:{line:5,column:1323},end:{line:5,column:1324}},loc:{start:{line:5,column:1339},end:{line:5,column:1378}},line:5},25:{name:"(anonymous_25)",decl:{start:{line:5,column:1684},end:{line:5,column:1685}},loc:{start:{line:5,column:1700},end:{line:5,column:1728}},line:5},26:{name:"(anonymous_26)",decl:{start:{line:5,column:1737},end:{line:5,column:1738}},loc:{start:{line:5,column:1753},end:{line:5,column:1782}},line:5},27:{name:"(anonymous_27)",decl:{start:{line:5,column:1821},end:{line:5,column:1822}},loc:{start:{line:5,column:1836},end:{line:5,column:1854}},line:5},28:{name:"(anonymous_28)",decl:{start:{line:5,column:2075},end:{line:5,column:2076}},loc:{start:{line:5,column:2091},end:{line:5,column:2126}},line:5},29:{name:"(anonymous_29)",decl:{start:{line:5,column:2135},end:{line:5,column:2136}},loc:{start:{line:5,column:2151},end:{line:5,column:2180}},line:5},30:{name:"(anonymous_30)",decl:{start:{line:5,column:2221},end:{line:5,column:2222}},loc:{start:{line:5,column:2236},end:{line:5,column:2256}},line:5},31:{name:"(anonymous_31)",decl:{start:{line:5,column:2420},end:{line:5,column:2421}},loc:{start:{line:5,column:2435},end:{line:5,column:2454}},line:5}},branchMap:{0:{loc:{start:{line:5,column:272},end:{line:5,column:1537}},type:"cond-expr",locations:[{start:{line:5,column:296},end:{line:5,column:1532}},{start:{line:5,column:1533},end:{line:5,column:1537}}],line:5},1:{loc:{start:{line:5,column:1577},end:{line:5,column:1888}},type:"cond-expr",locations:[{start:{line:5,column:1592},end:{line:5,column:1879}},{start:{line:5,column:1880},end:{line:5,column:1888}}],line:5},2:{loc:{start:{line:5,column:1901},end:{line:5,column:2292}},type:"cond-expr",locations:[{start:{line:5,column:1918},end:{line:5,column:2283}},{start:{line:5,column:2284},end:{line:5,column:2292}}],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,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},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]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"37987b31697651d2d9dd2ba75a01b8e72633cbc3"},a=t[i]||(t[i]={});a[e]&&a[e].hash===n||(a[e]=o);var s=a[e];return l=function(){return s},s}t.r(n),t.d(n,{default:()=>pe}),l(),l().s[0]++;var i=function(){l().f[0]++;var e=(l().s[1]++,this),n=(l().s[2]++,e._self._c);return l().s[3]++,n("div",[n("top-bar",{attrs:{menus:e.menus,title:e.title}}),e._v(" "),n("v-snackbar",{attrs:{top:"",timeout:-1,color:"orange"},scopedSlots:e._u([{key:"action",fn:function({attrs:t}){return l().f[1]++,l().s[4]++,[n("v-btn",e._b({attrs:{text:"",color:"danger","data-test":"unlock-button"},on:{click:e.confirmLocalUnlock}},"v-btn",t,!1),[e._v("\n Unlock\n ")]),e._v(" "),n("v-btn",e._b({attrs:{text:""},on:{click:()=>{l().f[2]++,l().s[5]++,e.showReadOnlyToast=!1}}},"v-btn",t,!1),[e._v("\n dismiss\n ")])]}}]),model:{value:e.showReadOnlyToast,callback:function(n){l().f[3]++,l().s[6]++,e.showReadOnlyToast=n},expression:"showReadOnlyToast"}},[n("v-icon",[e._v(" mdi-pencil-off ")]),e._v("\n "+e._s(e.lockedBy)+" is editing this script. Editor is in read-only mode\n ")],1),e._v(" "),n("v-file-input",{ref:"fileInput",staticStyle:{position:"fixed",top:"-100%"},attrs:{"show-size":"",accept:".bin","data-test":"file-input"},model:{value:e.fileInput,callback:function(n){l().f[4]++,l().s[7]++,e.fileInput=n},expression:"fileInput"}}),e._v(" "),n("v-card",[n("v-card-text",[n("v-row",{attrs:{dense:""}},[n("v-col",{attrs:{cols:"6"}},[n("v-text-field",{staticClass:"filename",attrs:{outlined:"",dense:"",readonly:"","hide-details":"",label:"Filename",id:"filename","data-test":"filename"},model:{value:e.fullFilename,callback:function(n){l().f[5]++,l().s[8]++,e.fullFilename=n},expression:"fullFilename"}})],1),e._v(" "),n("v-col",{attrs:{cols:"6"}},[n("v-text-field",{staticClass:"filename",attrs:{outlined:"",dense:"",readonly:"","hide-details":"",label:"Definition",id:"definition-filename","data-test":"definition-filename"},model:{value:e.definitionFilename,callback:function(n){l().f[6]++,l().s[9]++,e.definitionFilename=n},expression:"definitionFilename"}})],1)],1),e._v(" "),n("v-row",{attrs:{dense:""}},[n("v-col",{staticClass:"mr-auto",attrs:{cols:"auto"}},[n("span",{staticClass:"text-body-1 ma-2"},[e._v("File Download:")]),e._v(" "),n("v-btn",{staticClass:"mr-3",attrs:{dense:"",color:"primary",disabled:""==e.filename,"data-test":"download-file-binary"},on:{click:function(n){return l().f[7]++,l().s[10]++,e.downloadBinary(null)}}},[e._v("\n Binary\n "),n("v-icon",{attrs:{right:"",dark:""}},[e._v(" mdi-file-code ")])],1),e._v(" "),n("v-btn",{staticClass:"mr-3",attrs:{dense:"",color:"primary",disabled:""==e.filename,"data-test":"download-file-definition"},on:{click:function(n){return l().f[8]++,l().s[11]++,e.downloadDefinition(null)}}},[e._v("\n Definition\n "),n("v-icon",{attrs:{right:"",dark:""}},[e._v(" mdi-file-document-edit ")])],1),e._v(" "),n("v-btn",{attrs:{dense:"",color:"primary",disabled:""==e.filename,"data-test":"download-file-report"},on:{click:function(n){return l().f[9]++,l().s[12]++,e.downloadReport(null)}}},[e._v("\n Report\n "),n("v-icon",{attrs:{right:"",dark:""}},[e._v(" mdi-file-document ")])],1)],1),e._v(" "),n("v-col",{attrs:{cols:"auto"}},[n("v-btn",{attrs:{dense:"",color:"primary",disabled:!e.uploadScript,"data-test":"upload-file"},on:{click:function(n){return l().f[10]++,l().s[13]++,e.upload()}}},[e._v("\n Upload\n "),n("v-icon",{attrs:{right:"",dark:""}},[e._v(" mdi-file-upload ")])],1)],1),e._v(" "),n("v-col",{attrs:{cols:"auto"}},[n("v-btn",{attrs:{dense:"",color:"primary",disabled:!e.downloadScript,"data-test":"download-file"},on:{click:function(n){return l().f[11]++,l().s[14]++,e.download()}}},[e._v("\n Download\n "),n("v-icon",{attrs:{right:"",dark:""}},[e._v(" mdi-file-download ")])],1)],1),e._v(" "),n("v-col",{attrs:{cols:"auto"}},[n("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:t,attrs:i}){return l().f[12]++,l().s[15]++,[n("span",e._g(e._b({},"span",i,!1),t),[n("v-checkbox",{staticClass:"shrink mt-0",attrs:{label:"B/G","data-test":"upload-background"},model:{value:e.scriptBackground,callback:function(n){l().f[13]++,l().s[16]++,e.scriptBackground=n},expression:"scriptBackground"}})],1)]}}])},[e._v(" "),n("span",[e._v("Run upload download scripts in the background")])])],1)],1)],1),e._v(" "),n("v-card-title",{staticStyle:{"padding-top":"0px"}},[e._v("\n Items\n "),n("v-spacer"),e._v(" "),n("v-text-field",{staticClass:"search",attrs:{label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",outlined:"",dense:"","single-line":"","hide-details":""},model:{value:e.search,callback:function(n){l().f[14]++,l().s[17]++,e.search=n},expression:"search"}})],1),e._v(" "),n("v-tabs",{model:{value:e.curTab,callback:function(n){l().f[15]++,l().s[18]++,e.curTab=n},expression:"curTab"}},e._l(e.tables,(function(t,i){return l().f[16]++,l().s[19]++,n("v-tab",{key:i},[e._v("\n "+e._s(t.name)+"\n ")])})),1),e._v(" "),n("v-tabs-items",{model:{value:e.curTab,callback:function(n){l().f[17]++,l().s[20]++,e.curTab=n},expression:"curTab"}},e._l(e.tables,(function(t,i){return l().f[18]++,l().s[21]++,n("v-tab-item",{key:`${e.filename}${i}`},[n("v-data-table",{attrs:{headers:t.headers,items:t.rows,search:e.search,"items-per-page":20,"footer-props":{itemsPerPageOptions:[10,20,50,100,-1]},"calculate-widths":"","multi-sort":"",dense:"","data-test":t.name},scopedSlots:e._u([{key:"item",fn:function({item:t}){return l().f[19]++,l().s[22]++,[n("table-row",{key:t[0].name,attrs:{items:t},on:{change:function(n){return l().f[20]++,l().s[23]++,e.onChange(t,n)}}})]}},e.tables.length>1?(l().b[0][0]++,{key:"footer",fn:function(){return l().f[21]++,l().s[24]++,[n("div",{staticClass:"ma-3",staticStyle:{position:"absolute"}},[n("span",{staticClass:"text-body-1 mr-3"},[e._v("Table Download:")]),e._v(" "),n("v-btn",{staticClass:"mr-3",attrs:{dense:"",color:"primary",disabled:""==e.filename,"data-test":"download-table-binary"},on:{click:function(n){return l().f[22]++,l().s[25]++,e.downloadBinary(t.name)}}},[e._v("\n Binary\n "),n("v-icon",{attrs:{right:"",dark:""}},[e._v(" mdi-file-code ")])],1),e._v(" "),n("v-btn",{staticClass:"mr-3",attrs:{dense:"",color:"primary",disabled:""==e.filename,"data-test":"download-table-definition"},on:{click:function(n){return l().f[23]++,l().s[26]++,e.downloadDefinition(t.name)}}},[e._v("\n Definition\n "),n("v-icon",{attrs:{right:"",dark:""}},[e._v(" mdi-file-document-edit ")])],1),e._v(" "),n("v-btn",{attrs:{dense:"",color:"primary",disabled:""==e.filename,"data-test":"download-table-report"},on:{click:function(n){return l().f[24]++,l().s[27]++,e.downloadReport(t.name)}}},[e._v("\n Report\n "),n("v-icon",{attrs:{right:"",dark:""}},[e._v(" mdi-file-document ")])],1)],1)]},proxy:!0}):(l().b[0][1]++,null)],null,!0)})],1)})),1)],1),e._v(" "),e.fileOpen?(l().b[1][0]++,n("file-open-save-dialog",{attrs:{type:"open","api-url":"/openc3-api/tables"},on:{file:function(n){return l().f[25]++,l().s[28]++,e.setFile(n)},error:function(n){return l().f[26]++,l().s[29]++,e.setError(n)}},model:{value:e.fileOpen,callback:function(n){l().f[27]++,l().s[30]++,e.fileOpen=n},expression:"fileOpen"}})):(l().b[1][1]++,e._e()),e._v(" "),e.showSaveAs?(l().b[2][0]++,n("file-open-save-dialog",{attrs:{type:"save","require-target-parent-dir":"","api-url":"/openc3-api/tables","input-filename":e.filename},on:{filename:function(n){return l().f[28]++,l().s[31]++,e.saveAsFilename(n)},error:function(n){return l().f[29]++,l().s[32]++,e.setError(n)}},model:{value:e.showSaveAs,callback:function(n){l().f[30]++,l().s[33]++,e.showSaveAs=n},expression:"showSaveAs"}})):(l().b[2][1]++,e._e()),e._v(" "),n("simple-text-dialog",{attrs:{title:e.errorTitle,text:e.errorText},model:{value:e.showError,callback:function(n){l().f[31]++,l().s[34]++,e.showError=n},expression:"showError"}})],1)},o=(l().s[35]++,[]),a=(t(2482),t(7067),t(4147),t(4293),t(2682),t(785),t(8357),t(6196),t(821),t(6554),t(8472),t(7404),t(5803),t(3912),t(7182),t(3165),t(4541),t(4397),t(1412),t(1883),t(7905),t(3816)),s=t(1649);const c=new s["default"],r=a.A.create({baseURL:location.origin,timeout:6e4,params:{}});r.interceptors.response.use((e=>e),(e=>{if(e.response){if(401===e.response.status&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then((function(e){e&&OpenC3Auth.setTokens()})),e.response.config.headers["Ignore-Errors"]&&e.response.config.headers["Ignore-Errors"].includes(e.response.status.toString()))return Promise.reject(e);let n=`HTTP ${e.response.status} - `;throw e.response?.statusText&&(n+=`${e.response.statusText} `),e.response?.config?.data&&(n+=`${e.response.config.data} `),e.response?.data?.message?n+=`${e.response.data.message}`:e.response?.data?.exception?n+=`${e.response.data.exception}`:e.response?.data?.error?.message?(e.response.data.error.class&&(n+=`${e.response.data.error.class} `),n+=`${e.response.data.error.message}`):n+=`${e.response?.data}`,c.$notify&&c.$notify.serious({title:"Network error",body:n}),e}throw e}));const u=r,m=async function(e,n,{data:t,params:l={},headers:i,noAuth:o=!1,noScope:a=!1,onUploadProgress:s=!1}={}){if(!o){try{let e=await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);e&&OpenC3Auth.setTokens()}catch(c){OpenC3Auth.login()}i["Authorization"]=localStorage.openc3Token}return i["manual"]=!0,a||l["scope"]||(l["scope"]=window.openc3Scope),u({method:e,url:n,data:t,params:l,headers:i,onUploadProgress:s})},d={Accept:"application/json"},A={...d,"Content-Type":"application/json"},h={get:function(e,{params:n,headers:t=d,noScope:l,noAuth:i,onUploadProgress:o}={}){return m("get",e,{params:n,headers:t,noScope:l,noAuth:i,onUploadProgress:o})},put:function(e,{data:n,params:t,headers:l=A,noScope:i,noAuth:o,onUploadProgress:a}={}){return m("put",e,{data:n,params:t,headers:l,noScope:i,noAuth:o,onUploadProgress:a})},post:function(e,{data:n,params:t,headers:l=A,noScope:i,noAuth:o,onUploadProgress:a}={}){return m("post",e,{data:n,params:t,headers:l,noScope:i,noAuth:o,onUploadProgress:a})},delete:function(e,{params:n,headers:t=d,noScope:l,noAuth:i,onUploadProgress:o}={}){return m("delete",e,{params:n,headers:t,noScope:l,noAuth:i,onUploadProgress:o})}};var p=t(814);t(7107);class f{constructor(){(0,p.A)(this,"id",1)}async exec(e,n,t={},l={},i=6e4){try{let e=await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);e&&OpenC3Auth.setTokens()}catch(o){OpenC3Auth.login()}this.id=this.id+1;try{t["scope"]=window.openc3Scope,l["manual"]=!0;const o=await u.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:t},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...l},timeout:i});return o.data.result}catch(o){let e=new Error;throw o.response?(e.name=o.response.data.error.data.class,e.message=o.response.data.error.data.message,e.object=o.response.data.error):o.request?(e.name="Request error",e.message="Request error, no response received"):e.name="Unknown error",e}}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,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...t){return this.exec("interface_cmd",[e,n,...t])}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,n,t){return this.exec("get_item",[e,n,t])}get_param(e,n,t){return this.exec("get_param",[e,n,t])}get_parameter(e,n,t){return this.exec("get_parameter",[e,n,t])}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_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_list",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_telemetry",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_telemetry",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_telemetry_names",[e])}async get_tlm_packet(e,n,t,l=30){const i=await this.exec("get_tlm_packet",[e,n],{type:t,stale_time:l});if(null!=i){let e=i.length,n=null;for(let t=0;t<e;t++)n=this.decode_openc3_type(i[t][1]),null!==n&&(i[t][1]=n)}return i}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}async get_tlm_values(e,n=30,t=null){let l={stale_time:n};null!==t&&(l["cache_timeout"]=t);const i=await this.exec("get_tlm_values",[e],l,{},1e4);let o=i[0].length,a=null;for(let s=0;s<o;s++)a=this.decode_openc3_type(i[0][s]),null!==a&&(i[0][s]=a);return i}get_limits(e,n,t){return this.exec("get_limits",[e,n,t])}async tlm(e,n,t,l="CONVERTED"){let i=null;if(void 0===n)i=await this.exec("tlm",[e]);else if(void 0===t){if(!["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n)){let e=new Error;throw e.name="TypeError",e.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,e}i=await this.exec("tlm",[e],{type:n})}else i=await this.exec("tlm",[e,n,t],{type:l});let o=this.decode_openc3_type(i);return null!==o&&(i=o),i}async inject_tlm(e,n,t=null,l="CONVERTED"){data=await this.exec("inject_tlm",[e,n,t],{type:l})}set_tlm(e,n,t,l){return this.exec("set_tlm",[e,n,t],{type:l})}override_tlm(e,n,t,l){return this.exec("override_tlm",[e,n,t],{type:l})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,t,l){return this.exec("normalize_tlm",[e,n,t],{type:l})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_commands",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_command_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_command",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,t,l="CONVERTED"){return this.exec("get_cmd_value",[e,n,t,l])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,t,l,i){let o=null;for(let a in l)Object.prototype.hasOwnProperty.call(l,a)&&(o=this.encode_openc3_type(l[a]),null!==o&&(l[a]=o));return this.exec(e,[n,t,l],{},i)}get_cmd_hazardous(e,n,t,l={}){return void 0===n?this.exec("get_cmd_hazardous",e,{},l):this._cmd("get_cmd_hazardous",e,n,t,l)}cmd(e,n,t,l={}){return void 0===n?this.exec("cmd",e,{},l):this._cmd("cmd",e,n,t,l)}cmd_no_range_check(e,n,t,l={}){return void 0===n?this.exec("cmd_no_range_check",e,{},l):this._cmd("cmd_no_range_check",e,n,t,l)}cmd_raw(e,n,t,l={}){return void 0===n?this.exec("cmd_raw",e,{},l):this._cmd("cmd_raw",e,n,t,l)}cmd_raw_no_range_check(e,n,t,l={}){return void 0===n?this.exec("cmd_raw_no_range_check",e,{},l):this._cmd("cmd_raw_no_range_check",e,n,t,l)}cmd_no_hazardous_check(e,n,t,l={}){return void 0===n?this.exec("cmd_no_hazardous_check",e,{},l):this._cmd("cmd_no_hazardous_check",e,n,t,l)}cmd_no_checks(e,n,t,l={}){return void 0===n?this.exec("cmd_no_checks",e,{},l):this._cmd("cmd_no_checks",e,n,t,l)}cmd_raw_no_hazardous_check(e,n,t,l={}){return void 0===n?this.exec("cmd_raw_no_hazardous_check",e,{},l):this._cmd("cmd_raw_no_hazardous_check",e,n,t,l)}cmd_raw_no_checks(e,n,t,l={}){return void 0===n?this.exec("cmd_raw_no_checks",e,{},l):this._cmd("cmd_raw_no_checks",e,n,t,l)}build_cmd(e,n,t){return void 0===n?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,t)}build_command(e,n,t){return void 0===n?this.exec("build_command",e):this._cmd("build_command",e,n,t)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,t){return this.exec("save_config",[e,n,t])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,t){return this.exec("enable_limits",[e,n,t])}disable_limits(e,n,t){return this.exec("disable_limits",[e,n,t])}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,n){return this.exec("set_setting",[e,n])}save_setting(e,n){return this.exec("save_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=(new TextEncoder).encode(e),t=await crypto.subtle.digest("SHA-256",n),l=new Uint8Array(t);return Array.from(l).map((e=>e.toString(16).padStart(2,"0"))).join("")}}}var C=function(){var e=this,n=e._self._c;return n("mounting-portal",{attrs:{"mount-to":"#openc3-menu",append:""}},[n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{attrs:{"align-self":"end"}},[n("span",{staticClass:"app-title mr-2"},[e._v(e._s(e.title))])])],1),e._v(" "),n("v-row",{staticClass:"flex-nowrap",attrs:{dense:""}},e._l(e.menus,(function(t,l){return n("v-menu",{key:l,ref:"topmenu",refInFor:!0,attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:l,attrs:i}){return[n("v-btn",e._g(e._b({staticClass:"mx-1 menu-button",attrs:{outlined:"","data-test":e.formatDT(`${e.title} ${t.label}`)}},"v-btn",i,!1),l),[n("span",{domProps:{textContent:e._s(t.label)}}),e._v(" "),n("v-icon",{staticClass:"myicon",attrs:{right:""}},[e._v(" mdi-menu-down ")])],1)]}}],null,!0)},[e._v(" "),n("v-list",[n("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:t.radioGroup,"hide-details":"",dense:""}},[e._l(t.items,(function(l,i){return[l.divider?n("v-divider",{key:i}):l.subMenu&&l.subMenu.length>0?n("div",{key:i},[n("v-menu",{key:e.k,attrs:{"open-on-hover":"","offset-x":"",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:t,attrs:o}){return[n("v-list-item",e._g(e._b({key:i,attrs:{disabled:l.disabled}},"v-list-item",o,!1),t),[l.icon?n("v-list-item-icon",[n("v-icon",{attrs:{disabled:l.disabled}},[e._v(e._s(l.icon))])],1):e._e(),e._v(" "),l.radio||l.checkbox?e._e():n("v-list-item-title",{style:"cursor: pointer;"+(l.disabled?"opacity: 0.2":"")},[e._v(e._s(l.label)+"\n ")]),e._v(" "),n("v-icon",[e._v(" mdi-chevron-right ")])],1)]}}],null,!0)},[e._v(" "),n("v-list",e._l(l.subMenu,(function(t,l){return n("v-list-item",{key:l,on:{click:function(n){return e.subMenuClick(t)}}},[t.icon?n("v-list-item-icon",[n("v-icon",[e._v(e._s(t.icon))])],1):e._e(),e._v(" "),n("v-list-item-title",[e._v(e._s(t.label))])],1)})),1)],1)],1):n("v-list-item",{key:i,attrs:{disabled:l.disabled,"data-test":e.formatDT(`${e.title} ${t.label} ${l.label}`)},on:{click:function(e){return l.command(l)}}},[l.radio?n("v-list-item-action",{staticClass:"list-action"},[n("v-radio",{attrs:{color:"secondary",label:l.label,value:l.label}})],1):e._e(),e._v(" "),l.checkbox?n("v-list-item-action",{staticClass:"list-action"},[n("v-checkbox",{attrs:{color:"secondary",label:l.label},model:{value:l.checked,callback:function(n){e.$set(l,"checked",n)},expression:"option.checked"}})],1):e._e(),e._v(" "),l.icon?n("v-list-item-icon",[n("v-icon",{attrs:{disabled:l.disabled}},[e._v(e._s(l.icon))])],1):e._e(),e._v(" "),l.radio||l.checkbox?e._e():n("v-list-item-title",{style:"cursor: pointer;"+(l.disabled?"opacity: 0.2":"")},[e._v(e._s(l.label))])],1)]}))],2)],1)],1)})),1)],1)},v=[];t(8715);const b={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(){document.title=this.title}},_=b;t(5699);var g=t(2401),y=(0,g.A)(_,C,v,!1,null,"0af23388",null);const w=y.exports;function x(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableRow.vue",n="d6483a73b9f2632c05a91d1b0a510f084ba890ed",t=new Function("return this")(),l="__coverage__",i={path:"/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableRow.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:465}},4:{start:{line:1,column:327},end:{line:1,column:459}},5:{start:{line:1,column:415},end:{line:1,column:455}},6:{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:306},end:{line:1,column:307}},loc:{start:{line:1,column:326},end:{line:1,column:460}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:398},end:{line:1,column:399}},loc:{start:{line:1,column:414},end:{line:1,column:456}},line:1}},branchMap:{0:{loc:{start:{line:1,column:165},end:{line:1,column:270}},type:"cond-expr",locations:[{start:{line:1,column:186},end:{line:1,column:261}},{start:{line:1,column:262},end:{line:1,column:270}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0},b:{0:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d6483a73b9f2632c05a91d1b0a510f084ba890ed"},o=t[l]||(t[l]={});o[e]&&o[e].hash===n||(o[e]=i);var a=o[e];return x=function(){return a},a}x(),x().s[0]++;var k=function(){x().f[0]++;var e=(x().s[1]++,this),n=(x().s[2]++,e._self._c);return x().s[3]++,n("tr",[n("td",{staticClass:"text-start"},[e._v(e._s(e.dataItems[0].index))]),e._v(" "),e.oneDimensional?(x().b[0][0]++,n("td",{staticClass:"text-start"},[e._v(e._s(e.dataItems[0].name))])):(x().b[0][1]++,e._e()),e._v(" "),e._l(e.dataItems,(function(t,l){return x().f[1]++,x().s[4]++,n("table-item",{key:t.name,attrs:{item:t},on:{change:function(n){return x().f[2]++,x().s[5]++,e.onChange(t,l,n)}}})}))],2)},T=(x().s[6]++,[]);function I(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableItem.vue",n="86b1ee3ff4e79544de8135ed3bbadcb494baa7db",t=new Function("return this")(),l="__coverage__",i={path:"/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableItem.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:889}},4:{start:{line:1,column:303},end:{line:1,column:321}},5:{start:{line:1,column:598},end:{line:1,column:616}},6:{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:287},end:{line:1,column:288}},loc:{start:{line:1,column:302},end:{line:1,column:322}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:582},end:{line:1,column:583}},loc:{start:{line:1,column:597},end:{line:1,column:617}},line:1}},branchMap:{0:{loc:{start:{line:1,column:76},end:{line:1,column:885}},type:"cond-expr",locations:[{start:{line:1,column:93},end:{line:1,column:349}},{start:{line:1,column:350},end:{line:1,column:885}}],line:1},1:{loc:{start:{line:1,column:350},end:{line:1,column:885}},type:"cond-expr",locations:[{start:{line:1,column:372},end:{line:1,column:644}},{start:{line:1,column:645},end:{line:1,column:885}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"86b1ee3ff4e79544de8135ed3bbadcb494baa7db"},o=t[l]||(t[l]={});o[e]&&o[e].hash===n||(o[e]=i);var a=o[e];return I=function(){return a},a}I(),I().s[0]++;var S=function(){I().f[0]++;var e=(I().s[1]++,this),n=(I().s[2]++,e._self._c);return I().s[3]++,n("td",[e.isCheckbox?(I().b[0][0]++,n("v-checkbox",{attrs:{dense:"","hide-details":"",disabled:!e.dataItem.editable,"data-test":"table-item-checkbox"},on:{change:e.checkboxChange},model:{value:e.checkValue,callback:function(n){I().f[1]++,I().s[4]++,e.checkValue=n},expression:"checkValue"}})):(I().b[0][1]++,e.dataItem.states?(I().b[1][0]++,n("v-select",{attrs:{dense:"","hide-details":"",items:e.itemStates,disabled:!e.dataItem.editable,"data-test":"table-item-select"},on:{change:e.stateChange},model:{value:e.stateValue,callback:function(n){I().f[2]++,I().s[5]++,e.stateValue=n},expression:"stateValue"}})):(I().b[1][1]++,n("v-text-field",{attrs:{solo:"",dense:"","single-line":"","hide-no-data":"","hide-details":"",value:e.format(e.dataItem.value),disabled:!e.dataItem.editable,"data-test":"table-item-text-field"},on:{change:e.textChange}})))],1)},F=(I().s[6]++,[]),D=(t(9375),t(4183)),$=t(5475),E=t(5179),O=t(8967);const N="yyyy-MM-dd",R="HH:mm:ss.SSS",M="HH:mm:ss",L=`${N} ${R}`,B={methods:{parseDateTime(e,n){return e.includes(" ")&&(e=e.replace(" ","T")),n&&"UTC"===n&&(e+="Z"),Date.parse(e)},formatUtcToLocal(e,n){return n&&"local"!==n?(0,D.GP)(e,L):(0,D.GP)((0,$.Y)(e,e.getTimezoneOffset()),L)},formatDateTime(e,n){return n&&"local"!==n?(0,O.qD)(e,n,L):(0,D.GP)(e,L)},formatDate:function(e,n){return n&&"local"!==n?(0,O.qD)(e,this.timeZone,N):(0,D.GP)(e,N)},formatTime:function(e,n,t=R){return n&&"local"!==n?(0,O.qD)(e,this.timeZone,t):(0,D.GP)(e,t)},formatTimeHMS:function(e,n){return this.formatTime(e,n,M)},formatTimestamp(e,n){return this.formatDateTime((0,E.H)(e),n)},formatSeconds(e,n){return this.formatDateTime(new Date(1e3*e),n)},formatNanoseconds(e,n){return this.formatDateTime(new Date(parseInt(e)/1e6),n)}}};t(7534);class U{constructor(e,n,t="",l=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=n,this.usage=t,this.url=l}}const j={props:{widgetIndex:{type:Number,default:null},parameters:{type:Array,default:()=>[]},settings:{type:Array,default:()=>[]},line:{type:String,default:""},lineNumber:{type:Number,default:0}},data(){return{screen:null,style:{}}},computed:{computedStyle(){return this.settings.forEach((e=>{const n=parseInt(e[0]);if(null!==this.widgetIndex){if(this.widgetIndex!==n)return;e=e.slice(1)}this.applySetting(this.style,e)})),void 0===this.style["width"]&&(this.style["flex"]="0 10 100%"),this.style}},created(){this.settings.forEach((e=>{"__SCREEN__"===e[0]&&(this.screen=e[1])})),this.settings=this.settings.map((e=>{const n=parseInt(e[0]);return isNaN(n)||null===this.widgetIndex?e:this.widgetIndex===n?e.slice(1):void 0})).filter((e=>void 0!==e))},methods:{applySetting(e,n){switch(n[0]){case"TEXTALIGN":e["text-align"]=n[1].toLowerCase()+" !important",e["--text-align"]=n[1].toLowerCase();break;case"PADDING":isNaN(Number(n[1]))||(n[1]+="px"),e["padding"]=n[1]+" !important";break;case"MARGIN":isNaN(Number(n[1]))||(n[1]+="px"),e["margin"]=n[1]+" !important";break;case"BACKCOLOR":e["background-color"]=this.getColor(n.slice(1))+" !important";break;case"TEXTCOLOR":e["color"]=this.getColor(n.slice(1))+" !important";break;case"BORDERCOLOR":e["border-width"]="1px!important",e["border-style"]="solid!important",e["border-color"]=this.getColor(n.slice(1))+" !important";break;case"WIDTH":isNaN(Number(n[1]))||(n[1]+="px"),e["width"]=n[1]+" !important";break;case"HEIGHT":isNaN(Number(n[1]))||(n[1]+="px"),e["height"]=n[1]+" !important";break;case"RAW":e[n[1].toLowerCase()]=n[2]+" !important";break}},verifyNumParams(e,n,t,l=""){let i={line:this.line,lineNumber:this.lineNumber,keyword:e,parameters:this.parameters};for(let o=1;o<=n;o++)if(void 0===this.parameters[o-1])throw new U(i,`Not enough parameters for ${e}.`,l,"https://docs.openc3.com/docs/configuration");if(null!==t&&this.parameters.length>t)throw new U(i,`Too many parameters for ${e}.`,l,"https://docs.openc3.com/docs/configuration")},setWidth(e,n="px",t="120"){let l=null;if(l=null!==this.widgetIndex?this.settings.find((e=>parseInt(e[0])===this.widgetIndex&&"WIDTH"===e[1])):this.settings.find((e=>"WIDTH"===e[0])),l)return l["WIDTH"];if(e){let t=["WIDTH",`${e}${n}`];return null!==this.widgetIndex&&t.unshift(this.widgetIndex),this.settings.push(t),parseInt(e)}{let e=["WIDTH",`${t}${n}`];return null!==this.widgetIndex&&e.unshift(this.widgetIndex),this.settings.push(e),parseInt(t)}},setHeight(e,n="px",t="20"){let l=null;if(l=null!==this.widgetIndex?this.settings.find((e=>parseInt(e[0])===this.widgetIndex&&"HEIGHT"===e[1])):this.settings.find((e=>"HEIGHT"===e[0])),l)return l["HEIGHT"];if(e){let t=["HEIGHT",`${e}${n}`];return null!==this.widgetIndex&&t.unshift(this.widgetIndex),this.settings.push(t),parseInt(e)}{let e=["HEIGHT",`${t}${n}`];return null!==this.widgetIndex&&e.unshift(this.widgetIndex),this.settings.push(e),parseInt(t)}},getColor(e){switch(e.length){case 1:return e[0].toLowerCase();case 3:return`rgb(${e[0]},${e[1]},${e[2]})`}}}};t(9471);const V={mixins:[j,B],props:{value:{default:null},limitsState:{type:String,default:null},counter:{default:null},formatString:null,timeZone:{type:String,default:"local"}},data(){return{curValue:null,prevValue:null,grayLevel:80,grayRate:5,valueId:null,arrayIndex:null,viewDetails:!1,contextMenuShown:!1,x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}},{title:"Graph",action:()=>{window.open("/tools/tlmgrapher/"+this.parameters[0]+"/"+this.parameters[1]+"/"+this.parameters[2],"_blank")}}]}},watch:{_counter:function(e,n){this.curValue!==this.prevValue?this.grayLevel=80:(this.grayLevel-=this.grayRate,this.grayLevel<30&&(this.grayLevel=30)),this.prevValue=this.curValue}},computed:{_value:function(){return this.curValue=this.value,null===this.curValue&&(this.screen?this.screen.screenValues[this.valueId]&&(null!==this.arrayIndex&&this.screen.screenValues[this.valueId][0]?this.curValue=this.screen.screenValues[this.valueId][0][this.arrayIndex]:this.curValue=this.screen.screenValues[this.valueId][0]):this.curValue=null),this.curValue=this.formatValue(this.curValue),this.curValue},_limitsState:function(){let e=this.limitsState;return null===e&&(this.screen?this.screen.screenValues[this.valueId]&&(e=this.screen.screenValues[this.valueId][1]):e=null),e},_counter:function(){let e=this.counter;return null===e&&(this.screen?this.screen.screenValues[this.valueId]&&(e=this.screen.screenValues[this.valueId][2]):e=null),e},valueClass:function(){return"value shrink pa-1 openc3-"+this.limitsColor},astroIcon(){switch(this.limitsColor){case"green":return"$vuetify.icons.astro-status-normal";case"yellow":return"$vuetify.icons.astro-status-caution";case"red":return"$vuetify.icons.astro-status-critical";case"blue":return"$vuetify.icons.astro-status-standby";default:return null}},limitsColor(){let e=this._limitsState;if(null!=e)switch(e){case"GREEN":case"GREEN_HIGH":case"GREEN_LOW":return"green";case"YELLOW":case"YELLOW_HIGH":case"YELLOW_LOW":return"yellow";case"RED":case"RED_HIGH":case"RED_LOW":return"red";case"BLUE":return"blue";case"STALE":return"purple";default:return"white"}return""},limitsLetter(){let e=this._limitsState;if(null!=e){let n=e.charAt(0);return e.endsWith("_LOW")&&(n=n.toLowerCase()),n}return""}},created(){if(null===this.value||null===this.limitsState){if(this.parameters[2].includes("[["))this.parameters[2]=this.parameters[2].replace("[[","[").replace("]]","]");else if(this.parameters[2].includes("[")){let e=this.parameters[2].match(/\[(\d+)\]/);this.arrayIndex=parseInt(e[1]),this.parameters[2]=this.parameters[2].replace(e[0],"")}this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.getType()}`,this.screen&&(this.screen.addItem(this.valueId),this.timeZone=this.screen.timeZone)}},destroyed(){null!==this.value&&null!==this.limitsState||this.screen&&this.screen.deleteItem(this.valueId)},methods:{getType(){let e="WITH_UNITS";return this.parameters[3]&&(e=this.parameters[3]),e},formatValue(e){if(e&&this.valueId&&(this.valueId.includes("PACKET_TIMEFORMATTED")||this.valueId.includes("RECEIVED_TIMEFORMATTED")))return e=e.replaceAll("/","-"),this.formatUtcToLocal(new Date(e),this.timeZone);if(e&&"String"===e["json_class"]&&void 0!==e["raw"]){let n=Array.from(e["raw"].slice(0,32),(function(e){return("0"+(255&e).toString(16)).slice(-2)})).join(" ").toUpperCase();return e["raw"].length>32&&(n+="..."),n}if("Array"===Object.prototype.toString.call(e).slice(8,-1)){let n="[";for(let t=0;t<e.length;t++)"String"===Object.prototype.toString.call(e[t]).slice(8,-1)?n+='"'+e[t]+'"':n+=e[t],t!=e.length-1&&(n+=", ");return n+="]",n}return"Object"===Object.prototype.toString.call(e).slice(8,-1)?"":this.formatString&&e?sprintf(this.formatString,e):""+e},showContextMenu(e){e.preventDefault(),this.contextMenuShown=!1,this.x=e.clientX,this.y=e.clientY,this.$nextTick((()=>{this.contextMenuShown=!0}))}}};function P(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableItem.vue",n="0ec880861e0f3788974502cd7d40ee06bbe0c0df",t=new Function("return this")(),l="__coverage__",i={path:"/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableItem.vue",statementMap:{0:{start:{line:13,column:4},end:{line:17,column:5}},1:{start:{line:20,column:4},end:{line:22,column:5}},2:{start:{line:21,column:6},end:{line:21,column:65}},3:{start:{line:23,column:4},end:{line:25,column:5}},4:{start:{line:24,column:6},end:{line:24,column:45}},5:{start:{line:29,column:19},end:{line:29,column:23}},6:{start:{line:30,column:6},end:{line:38,column:7}},7:{start:{line:31,column:8},end:{line:35,column:9}},8:{start:{line:32,column:10},end:{line:34,column:11}},9:{start:{line:33,column:12},end:{line:33,column:26}},10:{start:{line:37,column:8},end:{line:37,column:22}},11:{start:{line:39,column:6},end:{line:39,column:19}},12:{start:{line:42,column:19},end:{line:42,column:21}},13:{start:{line:43,column:6},end:{line:45,column:7}},14:{start:{line:44,column:8},end:{line:44,column:49}},15:{start:{line:46,column:6},end:{line:46,column:19}},16:{start:{line:51,column:6},end:{line:55,column:7}},17:{start:{line:52,column:8},end:{line:52,column:39}},18:{start:{line:54,column:8},end:{line:54,column:41}},19:{start:{line:59,column:18},end:{line:61,column:7}},20:{start:{line:60,column:17},end:{line:60,column:62}},21:{start:{line:62,column:6},end:{line:62,column:33}},22:{start:{line:66,column:6},end:{line:66,column:33}},23:{start:{line:67,column:6},end:{line:67,column:47}},24:{start:{line:70,column:6},end:{line:76,column:7}},25:{start:{line:75,column:8},end:{line:75,column:38}},26:{start:{line:77,column:6},end:{line:77,column:36}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:2},end:{line:12,column:3}},loc:{start:{line:12,column:9},end:{line:18,column:3}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:12},end:{line:26,column:3}},line:19},2:{name:"(anonymous_2)",decl:{start:{line:28,column:16},end:{line:28,column:17}},loc:{start:{line:28,column:28},end:{line:40,column:5}},line:28},3:{name:"(anonymous_3)",decl:{start:{line:41,column:16},end:{line:41,column:17}},loc:{start:{line:41,column:28},end:{line:47,column:5}},line:41},4:{name:"(anonymous_4)",decl:{start:{line:50,column:20},end:{line:50,column:21}},loc:{start:{line:50,column:32},end:{line:56,column:5}},line:50},5:{name:"(anonymous_5)",decl:{start:{line:57,column:17},end:{line:57,column:18}},loc:{start:{line:57,column:29},end:{line:63,column:5}},line:57},6:{name:"(anonymous_6)",decl:{start:{line:60,column:8},end:{line:60,column:9}},loc:{start:{line:60,column:17},end:{line:60,column:62}},line:60},7:{name:"(anonymous_7)",decl:{start:{line:64,column:16},end:{line:64,column:17}},loc:{start:{line:64,column:33},end:{line:68,column:5}},line:64},8:{name:"(anonymous_8)",decl:{start:{line:69,column:12},end:{line:69,column:13}},loc:{start:{line:69,column:29},end:{line:78,column:5}},line:69}},branchMap:{0:{loc:{start:{line:20,column:4},end:{line:22,column:5}},type:"if",locations:[{start:{line:20,column:4},end:{line:22,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:20},1:{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},2:{loc:{start:{line:30,column:6},end:{line:38,column:7}},type:"if",locations:[{start:{line:30,column:6},end:{line:38,column:7}},{start:{line:36,column:13},end:{line:38,column:7}}],line:30},3:{loc:{start:{line:32,column:10},end:{line:34,column:11}},type:"if",locations:[{start:{line:32,column:10},end:{line:34,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:32},4:{loc:{start:{line:32,column:14},end:{line:32,column:58}},type:"binary-expr",locations:[{start:{line:32,column:14},end:{line:32,column:33}},{start:{line:32,column:37},end:{line:32,column:58}}],line:32},5:{loc:{start:{line:51,column:6},end:{line:55,column:7}},type:"if",locations:[{start:{line:51,column:6},end:{line:55,column:7}},{start:{line:53,column:13},end:{line:55,column:7}}],line:51},6:{loc:{start:{line:70,column:6},end:{line:76,column:7}},type:"if",locations:[{start:{line:70,column:6},end:{line:76,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:70},7:{loc:{start:{line:71,column:8},end:{line:73,column:34}},type:"binary-expr",locations:[{start:{line:71,column:8},end:{line:71,column:13}},{start:{line:72,column:8},end:{line:72,column:40}},{start:{line:73,column:8},end:{line:73,column:34}}],line:71}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0,0]},inputSourceMap:{version:3,sources:["TableItem.vue"],names:[],mappings:";AA2DA;;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",file:"TableItem.vue",sourceRoot:"src/tools/TableManager",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 <td>\n <v-checkbox\n v-if="isCheckbox"\n dense\n hide-details\n v-model="checkValue"\n @change="checkboxChange"\n :disabled="!dataItem.editable"\n data-test="table-item-checkbox"\n />\n <v-select\n v-else-if="dataItem.states"\n dense\n hide-details\n v-model="stateValue"\n @change="stateChange"\n :items="itemStates"\n :disabled="!dataItem.editable"\n data-test="table-item-select"\n />\n <v-text-field\n v-else\n solo\n dense\n single-line\n hide-no-data\n hide-details\n @change="textChange"\n :value="format(dataItem.value)"\n :disabled="!dataItem.editable"\n data-test="table-item-text-field"\n />\n </td>\n</template>\n\n<script>\nimport VWidget from \'@openc3/tool-common/src/components/widgets/VWidget\'\n\nexport default {\n mixins: [VWidget],\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n dataItem: this.item,\n stateValue: null,\n checkValue: false,\n }\n },\n created() {\n if (this.dataItem.states) {\n this.stateValue = this.dataItem.states[this.dataItem.value]\n }\n if (this.isCheckbox) {\n this.checkValue = this.stateValue === 1\n }\n },\n computed: {\n isCheckbox: function () {\n let result = true\n if (this.dataItem.states) {\n for (const state of Object.keys(this.dataItem.states)) {\n if (state !== \'CHECKED\' && state !== \'UNCHECKED\') {\n result = false\n }\n }\n } else {\n result = false\n }\n return result\n },\n itemStates: function () {\n let result = []\n for (const [text, value] of Object.entries(this.dataItem.states)) {\n result.push({ text: text, value: value })\n }\n return result\n },\n },\n methods: {\n checkboxChange: function () {\n if (this.checkValue) {\n this.$emit(\'change\', \'CHECKED\')\n } else {\n this.$emit(\'change\', \'UNCHECKED\')\n }\n },\n stateChange: function () {\n // Lookup the state key that corresponds to the value\n let state = Object.keys(this.dataItem.states).find(\n (key) => this.dataItem.states[key] === this.stateValue,\n )\n this.$emit(\'change\', state)\n },\n textChange: function (value) {\n // Set the value since we\'re not using v-model on the textfield\n this.dataItem.value = value\n this.$emit(\'change\', this.dataItem.value)\n },\n format: function (value) {\n if (\n value &&\n value[\'json_class\'] === \'String\' &&\n value[\'raw\'] !== undefined\n ) {\n this.dataItem.editable = false\n }\n return this.formatValue(value)\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"0ec880861e0f3788974502cd7d40ee06bbe0c0df"},o=t[l]||(t[l]={});o[e]&&o[e].hash===n||(o[e]=i);var a=o[e];return P=function(){return a},a}P();const H={mixins:[V],props:{item:{type:Object,required:!0}},data(){return P().f[0]++,P().s[0]++,{dataItem:this.item,stateValue:null,checkValue:!1}},created(){P().f[1]++,P().s[1]++,this.dataItem.states?(P().b[0][0]++,P().s[2]++,this.stateValue=this.dataItem.states[this.dataItem.value]):P().b[0][1]++,P().s[3]++,this.isCheckbox?(P().b[1][0]++,P().s[4]++,this.checkValue=1===this.stateValue):P().b[1][1]++},computed:{isCheckbox:function(){P().f[2]++;let e=(P().s[5]++,!0);if(P().s[6]++,this.dataItem.states){P().b[2][0]++,P().s[7]++;for(const n of Object.keys(this.dataItem.states))P().s[8]++,P().b[4][0]++,"CHECKED"!==n&&(P().b[4][1]++,"UNCHECKED"!==n)?(P().b[3][0]++,P().s[9]++,e=!1):P().b[3][1]++}else P().b[2][1]++,P().s[10]++,e=!1;return P().s[11]++,e},itemStates:function(){P().f[3]++;let e=(P().s[12]++,[]);P().s[13]++;for(const[n,t]of Object.entries(this.dataItem.states))P().s[14]++,e.push({text:n,value:t});return P().s[15]++,e}},methods:{checkboxChange:function(){P().f[4]++,P().s[16]++,this.checkValue?(P().b[5][0]++,P().s[17]++,this.$emit("change","CHECKED")):(P().b[5][1]++,P().s[18]++,this.$emit("change","UNCHECKED"))},stateChange:function(){P().f[5]++;let e=(P().s[19]++,Object.keys(this.dataItem.states).find((e=>(P().f[6]++,P().s[20]++,this.dataItem.states[e]===this.stateValue))));P().s[21]++,this.$emit("change",e)},textChange:function(e){P().f[7]++,P().s[22]++,this.dataItem.value=e,P().s[23]++,this.$emit("change",this.dataItem.value)},format:function(e){return P().f[8]++,P().s[24]++,P().b[7][0]++,e&&(P().b[7][1]++,"String"===e["json_class"])&&(P().b[7][2]++,void 0!==e["raw"])?(P().b[6][0]++,P().s[25]++,this.dataItem.editable=!1):P().b[6][1]++,P().s[26]++,this.formatValue(e)}}},G=H;var W=(0,g.A)(G,S,F,!1,null,null,null);const z=W.exports;function Y(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableRow.vue",n="d5ee65eecafcdffede0f4e34800830241d4417a7",t=new Function("return this")(),l="__coverage__",i={path:"/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableRow.vue",statementMap:{0:{start:{line:15,column:4},end:{line:17,column:5}},1:{start:{line:21,column:6},end:{line:25,column:7}},2:{start:{line:22,column:8},end:{line:22,column:19}},3:{start:{line:24,column:8},end:{line:24,column:20}},4:{start:{line:30,column:6},end:{line:30,column:58}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:9},end:{line:18,column:3}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:20,column:4},end:{line:20,column:5}},loc:{start:{line:20,column:21},end:{line:26,column:5}},line:20},2:{name:"(anonymous_2)",decl:{start:{line:29,column:14},end:{line:29,column:15}},loc:{start:{line:29,column:44},end:{line:31,column:5}},line:29}},branchMap:{0:{loc:{start:{line:21,column:6},end:{line:25,column:7}},type:"if",locations:[{start:{line:21,column:6},end:{line:25,column:7}},{start:{line:23,column:13},end:{line:25,column:7}}],line:21}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["TableRow.vue"],names:[],mappings:";AAoCA;;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",file:"TableRow.vue",sourceRoot:"src/tools/TableManager",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 <tr>\n <td class="text-start">{{ dataItems[0].index }}</td>\n <td class="text-start" v-if="oneDimensional">{{ dataItems[0].name }}</td>\n <table-item\n v-for="(item, index) in dataItems"\n :key="item.name"\n :item="item"\n @change="onChange(item, index, $event)"\n />\n </tr>\n</template>\n\n<script>\nimport TableItem from \'@/tools/TableManager/TableItem\'\n\nexport default {\n components: {\n TableItem,\n },\n props: {\n items: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n dataItems: this.items,\n }\n },\n computed: {\n oneDimensional() {\n if (this.dataItems.length === 1) {\n return true\n } else {\n return false\n }\n },\n },\n methods: {\n onChange: function (item, index, event) {\n this.$emit(\'change\', { index: index, event: event })\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d5ee65eecafcdffede0f4e34800830241d4417a7"},o=t[l]||(t[l]={});o[e]&&o[e].hash===n||(o[e]=i);var a=o[e];return Y=function(){return a},a}Y();const q={components:{TableItem:z},props:{items:{type:Object,required:!0}},data(){return Y().f[0]++,Y().s[0]++,{dataItems:this.items}},computed:{oneDimensional(){return Y().f[1]++,Y().s[1]++,1===this.dataItems.length?(Y().b[0][0]++,Y().s[2]++,!0):(Y().b[0][1]++,Y().s[3]++,!1)}},methods:{onChange:function(e,n,t){Y().f[2]++,Y().s[4]++,this.$emit("change",{index:n,event:t})}}},K=q;var Z=(0,g.A)(K,k,T,!1,null,null,null);const X=Z.exports;var J=function(){var e=this,n=e._self._c;return n("v-dialog",{attrs:{width:"600",scrollable:""},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.success()}},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[n("v-card",[n("v-overlay",{attrs:{value:e.loading}},[n("v-progress-circular",{attrs:{indeterminate:"",absolute:"",size:"64"}})],1),e._v(" "),n("form",{on:{submit:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[n("v-system-bar",[n("v-spacer"),e._v(" "),n("span",[e._v(" "+e._s(e.title)+" ")]),e._v(" "),n("v-spacer")],1),e._v(" "),n("v-card-text",[n("div",{staticClass:"pa-3"},[n("v-row",[e._v(e._s(e.helpText)+" ")]),e._v(" "),n("v-row",{staticClass:"mt-5",attrs:{dense:""}},[n("v-text-field",{attrs:{flat:"",autofocus:"","solo-inverted":"","hide-details":"",clearable:"",label:"Search","prepend-inner-icon":"mdi-magnify",outlined:"",dense:"","data-test":"file-open-save-search"},on:{input:e.handleSearch},model:{value:e.search,callback:function(n){e.search=n},expression:"search"}})],1),e._v(" "),n("v-row",{staticClass:"mt-2",attrs:{dense:""}},[n("v-treeview",{ref:"tree",staticStyle:{width:"100%","max-height":"60vh",overflow:"auto"},attrs:{dense:"",activatable:"","return-object":"",items:e.items,search:e.search,"open-on-click":"open"===e.type},on:{"update:active":e.activeFile},scopedSlots:e._u([{key:"prepend",fn:function({item:t,open:l}){return[t.file?n("v-icon",[e._v(" "+e._s(e.calcIcon(t.name))+" ")]):n("v-icon",[e._v("\n "+e._s(l?"mdi-folder-open":"mdi-folder")+"\n ")])]}},{key:"append",fn:function({item:t}){return["__TEMP__"===t.name?n("v-btn",{attrs:{icon:""},on:{click:e.deleteTemp}},[n("v-icon",[e._v(" mdi-delete ")])],1):e._e()]}}]),model:{value:e.tree,callback:function(n){e.tree=n},expression:"tree"}})],1),e._v(" "),n("v-row",{staticClass:"my-2"},[n("v-text-field",{attrs:{"hide-details":"",label:"Filename","data-test":"file-open-save-filename",disabled:"open"===e.type},model:{value:e.selectedFile,callback:function(n){e.selectedFile=n},expression:"selectedFile"}})],1),e._v(" "),n("v-row",{attrs:{dense:""}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"my-2 red--text",staticStyle:{"white-space":"pre-line"}},[e._v("\n "+e._s(e.error)+"\n ")])]),e._v(" "),n("v-row",{staticClass:"mt-2"},[n("v-spacer"),e._v(" "),n("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"file-open-save-cancel-btn",disabled:e.disableButtons},on:{click:function(n){e.show=!1}}},[e._v("\n Cancel\n ")]),e._v(" "),n("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"file-open-save-submit-btn",disabled:e.disableButtons||!!e.error},on:{click:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[e._v("\n "+e._s(e.submit)+"\n ")])],1)],1)])],1)],1)],1)},Q=[];const ee=function(e){if(e&&e.includes(".")){let n=e.split(".").pop();if("py"===n)return"mdi-language-python";if("rb"===n)return"mdi-language-ruby";if("js"===n)return"mdi-language-javascript";if("csv"===n)return"mdi-file-delimited";if("txt"===n)return"mdi-file-document";if("png"===n||"gif"===n||"jpg"===n)return"mdi-file-image"}return"mdi-file"},ne={props:{type:{type:String,required:!0,validator:function(e){return-1!==["open","save"].indexOf(e)}},apiUrl:String,requireTargetParentDir:Boolean,inputFilename:String,value:Boolean},data(){return{tree:[],items:[],id:1,search:null,selectedFile:null,disableButtons:!1,targets:[],loading:!0}},computed:{show:{get(){return this.value},set(e){this.$emit("input",e)}},title:function(){return"open"===this.type?"File Open":"File Save As..."},submit:function(){return"open"===this.type?"OPEN":"SAVE"},helpText:function(){return"open"===this.type?"Click on folders to open them and then click a file to select it before clicking Open. Use the search box to filter the results.":"Click on the folder to save into. Then complete the filename path with the desired name. Use the search box to filter the results."},error:function(){if(""===this.selectedFile||null===this.selectedFile)return"No file selected must select a file";if(!this.selectedFile.match(this.validFilenameRegex)||this.selectedFile.match(/\.\.|\/\/|\.\/|\/\./)){let e=`${this.selectedFile} is not a valid filename. Must `;return this.requireTargetParentDir&&(e+="be in a target directory and "),e+="only contain alphanumeric characters (including !-_.*) and a valid extension.\n\nFor example: TGT1/procedures/test.py or TGT2/lib/inst.rb",e}if("save"===this.type&&this.selectedFile.match(/\*$/)){let e=`${this.selectedFile} is not a valid filename. Must not end in '*'.`;return e}return null},validFilenameRegex:function(){const e="0-9a-zA-Z",n=`${e}\\/\\!\\-\\_\\.\\*\\'\\(\\)`;let t=`[${n}]+\\.[${e}]+`;if(this.requireTargetParentDir){const e=`(${this.targets.join("|")})`;t=`\\/?${e}\\/${t}`}return new RegExp(t)}},created(){this.loadFiles(),this.requireTargetParentDir&&h.get("/openc3-api/targets").then((e=>{this.targets=e.data,this.targets.push("__TEMP__")}))},methods:{calcIcon:function(e){return ee(e)},loadFiles:function(){h.get(this.apiUrl).then((e=>{this.items=[],this.id=1;for(let n of e.data)this.filepath=n,this.insertFile(this.items,1,n),this.id++;this.inputFilename&&(this.selectedFile=this.inputFilename),this.loading=!1})).catch((e=>{this.$emit("error",`Failed to connect to OpenC3. ${e}`)}))},clear:function(){this.show=!1,this.overwrite=!1,this.disableButtons=!1},handleSearch:function(e){e?this.$refs.tree.updateAll(!0):this.$refs.tree.updateAll(!1)},activeFile:function(e){0===e.length?this.selectedFile=null:this.selectedFile=e[0].path},exists:function(e,n){let t=!1;for(let l of e){if(l.path===n)return!0;if(l.path.length>1&&"*"===l.path[l.path.length-1]&&l.path.slice(0,l.path.length-1)===n)return!0;l.children&&(t=t||this.exists(l.children,n))}return t},success:function(){null!==this.selectedFile&&null===this.error&&("open"===this.type?this.openSuccess():this.saveSuccess())},deleteTemp:function(){this.$dialog.confirm("Are you sure you want to delete all the temporary files?",{okText:"Delete",cancelText:"Cancel"}).then((e=>h.delete("/script-api/scripts/temp_files"))).then((e=>{this.$emit("clear-temp"),this.loadFiles()})).catch((e=>{this.$notify.serious({title:"Error",body:`Failed to remove script temporary files due to ${e}`})}))},openSuccess:function(){this.disableButtons=!0,h.get(`${this.apiUrl}/${this.selectedFile}`).then((e=>{const n={name:this.selectedFile,contents:e.data.contents};e.data.suites&&(n["suites"]=JSON.parse(e.data.suites)),e.data.error&&(n["error"]=e.data.error),e.data.success&&(n["success"]=e.data.success);const t=e.data.locked,l=e.data.breakpoints;this.$emit("file",{file:n,locked:t,breakpoints:l}),this.clear()})).catch((e=>{this.$emit("error",`Failed to open ${this.selectedFile}. ${e}`),this.clear()}))},saveSuccess:function(){const e=this.exists(this.items,this.selectedFile);e?this.$dialog.confirm(`Are you sure you want to overwrite: ${this.selectedFile}`,{okText:"Overwrite",cancelText:"Cancel"}).then((e=>{this.$emit("filename",this.selectedFile),this.clear()})).catch((e=>{})):(this.$emit("filename",this.selectedFile),this.clear())},insertFile:function(e,n,t){var l=t.split("/");if(1===l.length)return e.push({id:this.id,name:l[0],file:"ruby",path:this.filepath}),void this.id++;const i=e.findIndex((e=>e.name===l[0]));-1===i?(e.push({id:this.id,name:l[0],children:[],path:this.filepath.split("/").slice(0,n).join("/")}),this.id++,this.insertFile(e[e.length-1].children,n+1,l.slice(1).join("/"))):this.insertFile(e[i].children,n+1,l.slice(1).join("/"))}}},te=ne;var le=(0,g.A)(te,J,Q,!1,null,null,null);const ie=le.exports;var oe=function(){var e=this,n=e._self._c;return n("v-dialog",{attrs:{width:e.width},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[n("v-card",[n("v-system-bar",[n("v-spacer"),e._v(" "),n("span",[e._v(" "+e._s(e.title)+" ")]),e._v(" "),n("v-spacer"),e._v(" "),n("div",{staticClass:"mx-2"},[n("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function({on:t,attrs:l}){return[n("div",e._g(e._b({},"div",l,!1),t),[n("v-icon",{attrs:{"data-test":"downloadIcon"},on:{click:e.download}},[e._v("\n mdi-download\n ")])],1)]}}])},[e._v(" "),n("span",[e._v(" Download ")])])],1)],1),e._v(" "),n("v-card-text",[n("div",{staticClass:"pa-3"},[n("span",{staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(e.text))])])]),e._v(" "),n("v-card-actions",[n("v-spacer"),e._v(" "),n("v-btn",{staticClass:"mx-2",attrs:{color:"primary"},on:{click:function(n){e.show=!e.show}}},[e._v(" Ok ")])],1)],1)],1)},ae=[];const se={props:{value:Boolean,text:String,title:String,width:800},computed:{show:{get(){return this.value},set(e){this.$emit("input",e)}}},methods:{download:function(){const e=new Blob([this.text],{type:"text/plain"}),n=document.createElement("a");n.href=URL.createObjectURL(e),n.setAttribute("download",`${this.title}.txt`),n.click()}}},ce=se;var re=(0,g.A)(ce,oe,ae,!1,null,null,null);const ue=re.exports;function me(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableManager.vue",n="1c9ff4b4e6ce23acb876b467386a825c47fd776b",t=new Function("return this")(),l="__coverage__",i={path:"/openc3/plugins/packages/openc3-cosmos-tool-tablemanager/src/tools/TableManager/TableManager.vue",statementMap:{0:{start:{line:17,column:4},end:{line:39,column:5}},1:{start:{line:43,column:6},end:{line:43,column:28}},2:{start:{line:46,column:6},end:{line:46,column:59}},3:{start:{line:49,column:6},end:{line:106,column:7}},4:{start:{line:57,column:16},end:{line:57,column:30}},5:{start:{line:64,column:16},end:{line:64,column:31}},6:{start:{line:74,column:16},end:{line:74,column:31}},7:{start:{line:81,column:16},end:{line:81,column:29}},8:{start:{line:101,column:16},end:{line:101,column:29}},9:{start:{line:113,column:8},end:{line:113,column:77}},10:{start:{line:115,column:8},end:{line:115,column:79}},11:{start:{line:117,column:6},end:{line:142,column:10}},12:{start:{line:125,column:10},end:{line:125,column:44}},13:{start:{line:129,column:10},end:{line:141,column:14}},14:{start:{line:137,column:14},end:{line:137,column:48}},15:{start:{line:140,column:14},end:{line:140,column:38}},16:{start:{line:144,column:6},end:{line:169,column:10}},17:{start:{line:152,column:10},end:{line:152,column:48}},18:{start:{line:156,column:10},end:{line:168,column:14}},19:{start:{line:164,column:14},end:{line:164,column:52}},20:{start:{line:167,column:14},end:{line:167,column:40}},21:{start:{line:174,column:4},end:{line:174,column:30}},22:{start:{line:175,column:4},end:{line:175,column:36}},23:{start:{line:180,column:6},end:{line:180,column:28}},24:{start:{line:181,column:6},end:{line:181,column:25}},25:{start:{line:182,column:6},end:{line:182,column:26}},26:{start:{line:185,column:6},end:{line:185,column:26}},27:{start:{line:190,column:6},end:{line:204,column:7}},28:{start:{line:191,column:8},end:{line:196,column:9}},29:{start:{line:192,column:10},end:{line:192,column:40}},30:{start:{line:193,column:10},end:{line:193,column:30}},31:{start:{line:195,column:10},end:{line:195,column:39}},32:{start:{line:198,column:8},end:{line:198,column:25}},33:{start:{line:200,column:8},end:{line:200,column:47}},34:{start:{line:201,column:8},end:{line:201,column:30}},35:{start:{line:202,column:8},end:{line:202,column:30}},36:{start:{line:203,column:8},end:{line:203,column:28}},37:{start:{line:208,column:6},end:{line:208,column:31}},38:{start:{line:209,column:6},end:{line:209,column:40}},39:{start:{line:210,column:6},end:{line:210,column:44}},40:{start:{line:211,column:6},end:{line:211,column:27}},41:{start:{line:215,column:6},end:{line:215,column:26}},42:{start:{line:217,column:23},end:{line:217,column:37}},43:{start:{line:218,column:6},end:{line:218,column:46}},44:{start:{line:219,column:6},end:{line:219,column:60}},45:{start:{line:220,column:6},end:{line:220,column:60}},46:{start:{line:221,column:6},end:{line:236,column:10}},47:{start:{line:226,column:10},end:{line:226,column:32}},48:{start:{line:227,column:10},end:{line:229,column:18}},49:{start:{line:228,column:12},end:{line:228,column:33}},50:{start:{line:232,column:10},end:{line:232,column:31}},51:{start:{line:233,column:10},end:{line:233,column:40}},52:{start:{line:234,column:10},end:{line:234,column:48}},53:{start:{line:235,column:10},end:{line:235,column:31}},54:{start:{line:237,column:6},end:{line:237,column:21}},55:{start:{line:240,column:6},end:{line:240,column:28}},56:{start:{line:243,column:6},end:{line:248,column:7}},57:{start:{line:245,column:10},end:{line:245,column:34}},58:{start:{line:246,column:10},end:{line:246,column:53}},59:{start:{line:251,column:6},end:{line:270,column:7}},60:{start:{line:252,column:8},end:{line:269,column:12}},61:{start:{line:258,column:12},end:{line:260,column:14}},62:{start:{line:263,column:12},end:{line:263,column:28}},63:{start:{line:264,column:12},end:{line:264,column:30}},64:{start:{line:265,column:12},end:{line:265,column:40}},65:{start:{line:273,column:23},end:{line:273,column:37}},66:{start:{line:274,column:6},end:{line:274,column:46}},67:{start:{line:275,column:6},end:{line:275,column:60}},68:{start:{line:276,column:6},end:{line:278,column:7}},69:{start:{line:277,column:8},end:{line:277,column:43}},70:{start:{line:279,column:6},end:{line:300,column:8}},71:{start:{line:284,column:28},end:{line:284,column:63}},72:{start:{line:286,column:27},end:{line:286,column:61}},73:{start:{line:288,column:8},end:{line:290,column:9}},74:{start:{line:288,column:21},end:{line:288,column:22}},75:{start:{line:289,column:10},end:{line:289,column:51}},76:{start:{line:292,column:21},end:{line:294,column:10}},77:{start:{line:296,column:21},end:{line:296,column:48}},78:{start:{line:297,column:8},end:{line:297,column:45}},79:{start:{line:298,column:8},end:{line:298,column:61}},80:{start:{line:299,column:8},end:{line:299,column:20}},81:{start:{line:303,column:23},end:{line:303,column:37}},82:{start:{line:304,column:6},end:{line:304,column:60}},83:{start:{line:305,column:6},end:{line:307,column:7}},84:{start:{line:306,column:8},end:{line:306,column:43}},85:{start:{line:308,column:6},end:{line:320,column:8}},86:{start:{line:312,column:21},end:{line:314,column:10}},87:{start:{line:316,column:21},end:{line:316,column:48}},88:{start:{line:317,column:8},end:{line:317,column:45}},89:{start:{line:318,column:8},end:{line:318,column:61}},90:{start:{line:319,column:8},end:{line:319,column:20}},91:{start:{line:323,column:23},end:{line:323,column:37}},92:{start:{line:324,column:6},end:{line:324,column:46}},93:{start:{line:325,column:6},end:{line:325,column:60}},94:{start:{line:326,column:6},end:{line:328,column:7}},95:{start:{line:327,column:8},end:{line:327,column:43}},96:{start:{line:329,column:6},end:{line:344,column:8}},97:{start:{line:334,column:10},end:{line:335,column:54}},98:{start:{line:336,column:21},end:{line:338,column:10}},99:{start:{line:340,column:21},end:{line:340,column:48}},100:{start:{line:341,column:8},end:{line:341,column:45}},101:{start:{line:342,column:8},end:{line:342,column:61}},102:{start:{line:343,column:8},end:{line:343,column:20}},103:{start:{line:347,column:6},end:{line:355,column:8}},104:{start:{line:352,column:8},end:{line:354,column:9}},105:{start:{line:353,column:10},end:{line:353,column:71}},106:{start:{line:358,column:6},end:{line:379,column:29}},107:{start:{line:369,column:10},end:{line:377,column:12}},108:{start:{line:374,column:12},end:{line:376,column:13}},109:{start:{line:375,column:14},end:{line:375,column:75}},110:{start:{line:393,column:6},end:{line:405,column:10}},111:{start:{line:403,column:10},end:{line:403,column:30}},112:{start:{line:404,column:10},end:{line:404,column:32}},113:{start:{line:408,column:6},end:{line:408,column:65}},114:{start:{line:411,column:6},end:{line:413,column:7}},115:{start:{line:412,column:8},end:{line:412,column:62}},116:{start:{line:416,column:6},end:{line:421,column:7}},117:{start:{line:418,column:8},end:{line:420,column:38}},118:{start:{line:422,column:6},end:{line:422,column:22}},119:{start:{line:423,column:23},end:{line:423,column:37}},120:{start:{line:424,column:6},end:{line:424,column:46}},121:{start:{line:425,column:6},end:{line:425,column:55}},122:{start:{line:426,column:6},end:{line:483,column:10}},123:{start:{line:434,column:10},end:{line:434,column:60}},124:{start:{line:435,column:10},end:{line:461,column:12}},125:{start:{line:436,column:12},end:{line:460,column:13}},126:{start:{line:440,column:31},end:{line:443,column:17}},127:{start:{line:444,column:16},end:{line:458,column:17}},128:{start:{line:447,column:18},end:{line:450,column:19}},129:{start:{line:454,column:18},end:{line:457,column:19}},130:{start:{line:463,column:10},end:{line:468,column:11}},131:{start:{line:464,column:12},end:{line:467,column:14}},132:{start:{line:471,column:10},end:{line:482,column:11}},133:{start:{line:472,column:12},end:{line:475,column:14}},134:{start:{line:476,column:12},end:{line:476,column:32}},135:{start:{line:478,column:12},end:{line:481,column:14}},136:{start:{line:486,column:23},end:{line:486,column:37}},137:{start:{line:487,column:6},end:{line:487,column:45}},138:{start:{line:488,column:6},end:{line:494,column:8}},139:{start:{line:492,column:8},end:{line:492,column:46}},140:{start:{line:493,column:8},end:{line:493,column:36}},141:{start:{line:497,column:6},end:{line:497,column:29}},142:{start:{line:498,column:6},end:{line:498,column:31}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:16,column:2},end:{line:16,column:3}},loc:{start:{line:16,column:9},end:{line:40,column:3}},line:16},1:{name:"(anonymous_1)",decl:{start:{line:42,column:14},end:{line:42,column:15}},loc:{start:{line:42,column:26},end:{line:44,column:5}},line:42},2:{name:"(anonymous_2)",decl:{start:{line:45,column:4},end:{line:45,column:5}},loc:{start:{line:45,column:19},end:{line:47,column:5}},line:45},3:{name:"(anonymous_3)",decl:{start:{line:48,column:11},end:{line:48,column:12}},loc:{start:{line:48,column:23},end:{line:107,column:5}},line:48},4:{name:"(anonymous_4)",decl:{start:{line:56,column:23},end:{line:56,column:24}},loc:{start:{line:56,column:29},end:{line:58,column:15}},line:56},5:{name:"(anonymous_5)",decl:{start:{line:63,column:23},end:{line:63,column:24}},loc:{start:{line:63,column:29},end:{line:65,column:15}},line:63},6:{name:"(anonymous_6)",decl:{start:{line:73,column:23},end:{line:73,column:24}},loc:{start:{line:73,column:29},end:{line:75,column:15}},line:73},7:{name:"(anonymous_7)",decl:{start:{line:80,column:23},end:{line:80,column:24}},loc:{start:{line:80,column:29},end:{line:82,column:15}},line:80},8:{name:"(anonymous_8)",decl:{start:{line:100,column:23},end:{line:100,column:24}},loc:{start:{line:100,column:29},end:{line:102,column:15}},line:100},9:{name:"(anonymous_9)",decl:{start:{line:111,column:14},end:{line:111,column:15}},loc:{start:{line:111,column:29},end:{line:170,column:5}},line:111},10:{name:"(anonymous_10)",decl:{start:{line:124,column:14},end:{line:124,column:15}},loc:{start:{line:124,column:28},end:{line:126,column:9}},line:124},11:{name:"(anonymous_11)",decl:{start:{line:127,column:15},end:{line:127,column:16}},loc:{start:{line:127,column:26},end:{line:142,column:9}},line:127},12:{name:"(anonymous_12)",decl:{start:{line:136,column:18},end:{line:136,column:19}},loc:{start:{line:136,column:32},end:{line:138,column:13}},line:136},13:{name:"(anonymous_13)",decl:{start:{line:139,column:19},end:{line:139,column:20}},loc:{start:{line:139,column:30},end:{line:141,column:13}},line:139},14:{name:"(anonymous_14)",decl:{start:{line:151,column:14},end:{line:151,column:15}},loc:{start:{line:151,column:28},end:{line:153,column:9}},line:151},15:{name:"(anonymous_15)",decl:{start:{line:154,column:15},end:{line:154,column:16}},loc:{start:{line:154,column:26},end:{line:169,column:9}},line:154},16:{name:"(anonymous_16)",decl:{start:{line:163,column:18},end:{line:163,column:19}},loc:{start:{line:163,column:32},end:{line:165,column:13}},line:163},17:{name:"(anonymous_17)",decl:{start:{line:166,column:19},end:{line:166,column:20}},loc:{start:{line:166,column:30},end:{line:168,column:13}},line:166},18:{name:"(anonymous_18)",decl:{start:{line:172,column:2},end:{line:172,column:3}},loc:{start:{line:172,column:12},end:{line:176,column:3}},line:172},19:{name:"(anonymous_19)",decl:{start:{line:179,column:13},end:{line:179,column:14}},loc:{start:{line:179,column:25},end:{line:183,column:5}},line:179},20:{name:"(anonymous_20)",decl:{start:{line:184,column:14},end:{line:184,column:15}},loc:{start:{line:184,column:26},end:{line:186,column:5}},line:184},21:{name:"(anonymous_21)",decl:{start:{line:188,column:13},end:{line:188,column:14}},loc:{start:{line:188,column:41},end:{line:205,column:5}},line:188},22:{name:"(anonymous_22)",decl:{start:{line:207,column:4},end:{line:207,column:5}},loc:{start:{line:207,column:20},end:{line:212,column:5}},line:207},23:{name:"(anonymous_23)",decl:{start:{line:213,column:14},end:{line:213,column:15}},loc:{start:{line:213,column:26},end:{line:238,column:5}},line:213},24:{name:"(anonymous_24)",decl:{start:{line:225,column:14},end:{line:225,column:15}},loc:{start:{line:225,column:28},end:{line:230,column:9}},line:225},25:{name:"(anonymous_25)",decl:{start:{line:227,column:21},end:{line:227,column:22}},loc:{start:{line:227,column:27},end:{line:229,column:11}},line:227},26:{name:"(anonymous_26)",decl:{start:{line:231,column:15},end:{line:231,column:16}},loc:{start:{line:231,column:33},end:{line:236,column:9}},line:231},27:{name:"(anonymous_27)",decl:{start:{line:239,column:12},end:{line:239,column:13}},loc:{start:{line:239,column:24},end:{line:241,column:5}},line:239},28:{name:"(anonymous_28)",decl:{start:{line:242,column:20},end:{line:242,column:21}},loc:{start:{line:242,column:40},end:{line:249,column:5}},line:242},29:{name:"(anonymous_29)",decl:{start:{line:244,column:8},end:{line:244,column:9}},loc:{start:{line:244,column:22},end:{line:247,column:9}},line:244},30:{name:"(anonymous_30)",decl:{start:{line:250,column:12},end:{line:250,column:13}},loc:{start:{line:250,column:24},end:{line:271,column:5}},line:250},31:{name:"(anonymous_31)",decl:{start:{line:257,column:16},end:{line:257,column:17}},loc:{start:{line:257,column:28},end:{line:261,column:11}},line:257},32:{name:"(anonymous_32)",decl:{start:{line:262,column:16},end:{line:262,column:17}},loc:{start:{line:262,column:30},end:{line:266,column:11}},line:262},33:{name:"(anonymous_33)",decl:{start:{line:267,column:17},end:{line:267,column:18}},loc:{start:{line:267,column:28},end:{line:269,column:11}},line:267},34:{name:"(anonymous_34)",decl:{start:{line:272,column:20},end:{line:272,column:21}},loc:{start:{line:272,column:48},end:{line:301,column:5}},line:272},35:{name:"(anonymous_35)",decl:{start:{line:282,column:14},end:{line:282,column:15}},loc:{start:{line:282,column:28},end:{line:300,column:7}},line:282},36:{name:"(anonymous_36)",decl:{start:{line:302,column:24},end:{line:302,column:25}},loc:{start:{line:302,column:52},end:{line:321,column:5}},line:302},37:{name:"(anonymous_37)",decl:{start:{line:311,column:14},end:{line:311,column:15}},loc:{start:{line:311,column:28},end:{line:320,column:7}},line:311},38:{name:"(anonymous_38)",decl:{start:{line:322,column:20},end:{line:322,column:21}},loc:{start:{line:322,column:48},end:{line:345,column:5}},line:322},39:{name:"(anonymous_39)",decl:{start:{line:332,column:14},end:{line:332,column:15}},loc:{start:{line:332,column:28},end:{line:344,column:7}},line:332},40:{name:"(anonymous_40)",decl:{start:{line:346,column:4},end:{line:346,column:5}},loc:{start:{line:346,column:13},end:{line:356,column:5}},line:346},41:{name:"(anonymous_41)",decl:{start:{line:351,column:14},end:{line:351,column:15}},loc:{start:{line:351,column:28},end:{line:355,column:7}},line:351},42:{name:"(anonymous_42)",decl:{start:{line:357,column:4},end:{line:357,column:5}},loc:{start:{line:357,column:15},end:{line:380,column:5}},line:357},43:{name:"(anonymous_43)",decl:{start:{line:368,column:14},end:{line:368,column:15}},loc:{start:{line:368,column:20},end:{line:378,column:9}},line:368},44:{name:"(anonymous_44)",decl:{start:{line:373,column:18},end:{line:373,column:19}},loc:{start:{line:373,column:32},end:{line:377,column:11}},line:373},45:{name:"(anonymous_45)",decl:{start:{line:379,column:15},end:{line:379,column:16}},loc:{start:{line:379,column:26},end:{line:379,column:28}},line:379},46:{name:"(anonymous_46)",decl:{start:{line:392,column:24},end:{line:392,column:25}},loc:{start:{line:392,column:36},end:{line:406,column:5}},line:392},47:{name:"(anonymous_47)",decl:{start:{line:402,column:14},end:{line:402,column:15}},loc:{start:{line:402,column:20},end:{line:405,column:9}},line:402},48:{name:"(anonymous_48)",decl:{start:{line:407,column:14},end:{line:407,column:15}},loc:{start:{line:407,column:26},end:{line:409,column:5}},line:407},49:{name:"(anonymous_49)",decl:{start:{line:410,column:16},end:{line:410,column:17}},loc:{start:{line:410,column:28},end:{line:414,column:5}},line:410},50:{name:"(anonymous_50)",decl:{start:{line:415,column:19},end:{line:415,column:20}},loc:{start:{line:415,column:56},end:{line:484,column:5}},line:415},51:{name:"(anonymous_51)",decl:{start:{line:430,column:14},end:{line:430,column:15}},loc:{start:{line:430,column:28},end:{line:469,column:9}},line:430},52:{name:"(anonymous_52)",decl:{start:{line:435,column:49},end:{line:435,column:50}},loc:{start:{line:435,column:60},end:{line:461,column:11}},line:435},53:{name:"(anonymous_53)",decl:{start:{line:439,column:41},end:{line:439,column:42}},loc:{start:{line:439,column:54},end:{line:459,column:15}},line:439},54:{name:"(anonymous_54)",decl:{start:{line:470,column:15},end:{line:470,column:16}},loc:{start:{line:470,column:26},end:{line:483,column:9}},line:470},55:{name:"(anonymous_55)",decl:{start:{line:485,column:20},end:{line:485,column:21}},loc:{start:{line:485,column:40},end:{line:495,column:5}},line:485},56:{name:"(anonymous_56)",decl:{start:{line:491,column:14},end:{line:491,column:15}},loc:{start:{line:491,column:28},end:{line:494,column:7}},line:491},57:{name:"(anonymous_57)",decl:{start:{line:496,column:14},end:{line:496,column:15}},loc:{start:{line:496,column:48},end:{line:499,column:5}},line:496}},branchMap:{0:{loc:{start:{line:190,column:6},end:{line:204,column:7}},type:"if",locations:[{start:{line:190,column:6},end:{line:204,column:7}},{start:{line:197,column:13},end:{line:204,column:7}}],line:190},1:{loc:{start:{line:191,column:8},end:{line:196,column:9}},type:"if",locations:[{start:{line:191,column:8},end:{line:196,column:9}},{start:{line:194,column:15},end:{line:196,column:9}}],line:191},2:{loc:{start:{line:251,column:6},end:{line:270,column:7}},type:"if",locations:[{start:{line:251,column:6},end:{line:270,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:251},3:{loc:{start:{line:272,column:30},end:{line:272,column:46}},type:"default-arg",locations:[{start:{line:272,column:42},end:{line:272,column:46}}],line:272},4:{loc:{start:{line:276,column:6},end:{line:278,column:7}},type:"if",locations:[{start:{line:276,column:6},end:{line:278,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:276},5:{loc:{start:{line:302,column:34},end:{line:302,column:50}},type:"default-arg",locations:[{start:{line:302,column:46},end:{line:302,column:50}}],line:302},6:{loc:{start:{line:305,column:6},end:{line:307,column:7}},type:"if",locations:[{start:{line:305,column:6},end:{line:307,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:305},7:{loc:{start:{line:322,column:30},end:{line:322,column:46}},type:"default-arg",locations:[{start:{line:322,column:42},end:{line:322,column:46}}],line:322},8:{loc:{start:{line:326,column:6},end:{line:328,column:7}},type:"if",locations:[{start:{line:326,column:6},end:{line:328,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:326},9:{loc:{start:{line:352,column:8},end:{line:354,column:9}},type:"if",locations:[{start:{line:352,column:8},end:{line:354,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:352},10:{loc:{start:{line:374,column:12},end:{line:376,column:13}},type:"if",locations:[{start:{line:374,column:12},end:{line:376,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:374},11:{loc:{start:{line:411,column:6},end:{line:413,column:7}},type:"if",locations:[{start:{line:411,column:6},end:{line:413,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:411},12:{loc:{start:{line:411,column:10},end:{line:411,column:48}},type:"binary-expr",locations:[{start:{line:411,column:10},end:{line:411,column:30}},{start:{line:411,column:34},end:{line:411,column:48}}],line:411},13:{loc:{start:{line:415,column:29},end:{line:415,column:54}},type:"default-arg",locations:[{start:{line:415,column:50},end:{line:415,column:54}}],line:415},14:{loc:{start:{line:416,column:6},end:{line:421,column:7}},type:"if",locations:[{start:{line:416,column:6},end:{line:421,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:416},15:{loc:{start:{line:444,column:16},end:{line:458,column:17}},type:"if",locations:[{start:{line:444,column:16},end:{line:458,column:17}},{start:{line:451,column:23},end:{line:458,column:17}}],line:444},16:{loc:{start:{line:463,column:10},end:{line:468,column:11}},type:"if",locations:[{start:{line:463,column:10},end:{line:468,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:463},17:{loc:{start:{line:471,column:10},end:{line:482,column:11}},type:"if",locations:[{start:{line:471,column:10},end:{line:482,column:11}},{start:{line:477,column:17},end:{line:482,column:11}}],line:471}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0,116:0,117:0,118:0,119:0,120:0,121:0,122:0,123:0,124:0,125:0,126:0,127:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:0,136:0,137:0,138:0,139:0,140:0,141:0,142:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,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},b:{0:[0,0],1:[0,0],2:[0,0],3:[0],4:[0,0],5:[0],6:[0,0],7:[0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0],14:[0,0],15:[0,0],16:[0,0],17:[0,0]},inputSourceMap:{version:3,sources:["TableManager.vue"],names:[],mappings:";AAuRA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"TableManager.vue",sourceRoot:"src/tools/TableManager",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 2023, 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-snackbar v-model=\"showReadOnlyToast\" top :timeout=\"-1\" color=\"orange\">\n <v-icon> mdi-pencil-off </v-icon>\n {{ lockedBy }} is editing this script. Editor is in read-only mode\n <template v-slot:action=\"{ attrs }\">\n <v-btn\n text\n v-bind=\"attrs\"\n color=\"danger\"\n @click=\"confirmLocalUnlock\"\n data-test=\"unlock-button\"\n >\n Unlock\n </v-btn>\n <v-btn\n text\n v-bind=\"attrs\"\n @click=\"\n () => {\n showReadOnlyToast = false\n }\n \"\n >\n dismiss\n </v-btn>\n </template>\n </v-snackbar>\n <v-file-input\n show-size\n v-model=\"fileInput\"\n ref=\"fileInput\"\n accept=\".bin\"\n data-test=\"file-input\"\n style=\"position: fixed; top: -100%\"\n />\n <v-card>\n <v-card-text>\n <v-row dense>\n <v-col cols=\"6\">\n <v-text-field\n outlined\n dense\n readonly\n hide-details\n label=\"Filename\"\n v-model=\"fullFilename\"\n id=\"filename\"\n class=\"filename\"\n data-test=\"filename\"\n />\n </v-col>\n <v-col cols=\"6\">\n <v-text-field\n outlined\n dense\n readonly\n hide-details\n label=\"Definition\"\n v-model=\"definitionFilename\"\n id=\"definition-filename\"\n class=\"filename\"\n data-test=\"definition-filename\"\n />\n </v-col>\n </v-row>\n <v-row dense>\n <v-col cols=\"auto\" class=\"mr-auto\">\n <span class=\"text-body-1 ma-2\">File Download:</span>\n <v-btn\n dense\n color=\"primary\"\n class=\"mr-3\"\n @click=\"downloadBinary(null)\"\n :disabled=\"filename == ''\"\n data-test=\"download-file-binary\"\n >\n Binary\n <v-icon right dark> mdi-file-code </v-icon>\n </v-btn>\n <v-btn\n dense\n color=\"primary\"\n class=\"mr-3\"\n @click=\"downloadDefinition(null)\"\n :disabled=\"filename == ''\"\n data-test=\"download-file-definition\"\n >\n Definition\n <v-icon right dark> mdi-file-document-edit </v-icon>\n </v-btn>\n <v-btn\n dense\n color=\"primary\"\n @click=\"downloadReport(null)\"\n :disabled=\"filename == ''\"\n data-test=\"download-file-report\"\n >\n Report\n <v-icon right dark> mdi-file-document </v-icon>\n </v-btn>\n </v-col>\n <v-col cols=\"auto\">\n <v-btn\n dense\n color=\"primary\"\n @click=\"upload()\"\n :disabled=\"!uploadScript\"\n data-test=\"upload-file\"\n >\n Upload\n <v-icon right dark> mdi-file-upload </v-icon>\n </v-btn>\n </v-col>\n <v-col cols=\"auto\">\n <v-btn\n dense\n color=\"primary\"\n @click=\"download()\"\n :disabled=\"!downloadScript\"\n data-test=\"download-file\"\n >\n Download\n <v-icon right dark> mdi-file-download </v-icon>\n </v-btn>\n </v-col>\n <v-col cols=\"auto\">\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <span v-bind=\"attrs\" v-on=\"on\">\n <v-checkbox\n v-model=\"scriptBackground\"\n label=\"B/G\"\n class=\"shrink mt-0\"\n data-test=\"upload-background\"\n />\n </span>\n </template>\n <span>Run upload download scripts in the background</span>\n </v-tooltip>\n </v-col>\n </v-row>\n </v-card-text>\n <v-card-title style=\"padding-top: 0px\">\n Items\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n label=\"Search\"\n prepend-inner-icon=\"mdi-magnify\"\n clearable\n outlined\n dense\n single-line\n hide-details\n class=\"search\"\n />\n </v-card-title>\n <v-tabs v-model=\"curTab\">\n <v-tab v-for=\"(table, index) in tables\" :key=\"index\">\n {{ table.name }}\n </v-tab>\n </v-tabs>\n <v-tabs-items v-model=\"curTab\">\n <v-tab-item\n v-for=\"(table, index) in tables\"\n :key=\"`${filename}${index}`\"\n >\n <v-data-table\n :headers=\"table.headers\"\n :items=\"table.rows\"\n :search=\"search\"\n :items-per-page=\"20\"\n :footer-props=\"{\n itemsPerPageOptions: [10, 20, 50, 100, -1],\n }\"\n calculate-widths\n multi-sort\n dense\n :data-test=\"table.name\"\n >\n <template v-slot:item=\"{ item }\">\n <table-row\n :items=\"item\"\n :key=\"item[0].name\"\n @change=\"onChange(item, $event)\"\n />\n </template>\n <template v-slot:footer v-if=\"tables.length > 1\">\n <div style=\"position: absolute\" class=\"ma-3\">\n <span class=\"text-body-1 mr-3\">Table Download:</span>\n <v-btn\n dense\n color=\"primary\"\n class=\"mr-3\"\n @click=\"downloadBinary(table.name)\"\n :disabled=\"filename == ''\"\n data-test=\"download-table-binary\"\n >\n Binary\n <v-icon right dark> mdi-file-code </v-icon>\n </v-btn>\n <v-btn\n dense\n color=\"primary\"\n class=\"mr-3\"\n @click=\"downloadDefinition(table.name)\"\n :disabled=\"filename == ''\"\n data-test=\"download-table-definition\"\n >\n Definition\n <v-icon right dark> mdi-file-document-edit </v-icon>\n </v-btn>\n <v-btn\n dense\n color=\"primary\"\n @click=\"downloadReport(table.name)\"\n :disabled=\"filename == ''\"\n data-test=\"download-table-report\"\n >\n Report\n <v-icon right dark> mdi-file-document </v-icon>\n </v-btn>\n </div>\n </template>\n </v-data-table>\n </v-tab-item>\n </v-tabs-items>\n </v-card>\n <file-open-save-dialog\n v-if=\"fileOpen\"\n v-model=\"fileOpen\"\n type=\"open\"\n api-url=\"/openc3-api/tables\"\n @file=\"setFile($event)\"\n @error=\"setError($event)\"\n />\n <file-open-save-dialog\n v-if=\"showSaveAs\"\n v-model=\"showSaveAs\"\n type=\"save\"\n require-target-parent-dir\n api-url=\"/openc3-api/tables\"\n :input-filename=\"filename\"\n @filename=\"saveAsFilename($event)\"\n @error=\"setError($event)\"\n />\n <simple-text-dialog\n v-model=\"showError\"\n :title=\"errorTitle\"\n :text=\"errorText\"\n />\n </div>\n</template>\n\n<script>\nimport Api from '@openc3/tool-common/src/services/api'\nimport { OpenC3Api } from '@openc3/tool-common/src/services/openc3-api'\nimport TopBar from '@openc3/tool-common/src/components/TopBar'\nimport TableRow from '@/tools/TableManager/TableRow'\nimport FileOpenSaveDialog from '@openc3/tool-common/src/components/FileOpenSaveDialog'\nimport SimpleTextDialog from '@openc3/tool-common/src/components/SimpleTextDialog'\n\nexport default {\n components: {\n TopBar,\n TableRow,\n FileOpenSaveDialog,\n SimpleTextDialog,\n },\n data() {\n return {\n title: 'Table Manager',\n search: '',\n curTab: null,\n tables: [],\n api: null,\n definition: null,\n fileInput: '',\n definitionFilename: '',\n fileNew: false,\n filename: '',\n fileModified: '',\n lockedBy: null,\n fileOpen: false,\n showSave: false,\n showSaveAs: false,\n showError: false,\n errorTitle: '',\n errorText: '',\n uploadScript: null,\n downloadScript: null,\n scriptBackground: true,\n }\n },\n computed: {\n readOnly: function () {\n return !!this.lockedBy\n },\n fullFilename() {\n return `${this.filename} ${this.fileModified}`.trim()\n },\n menus: function () {\n return [\n {\n label: 'File',\n items: [\n {\n label: 'New File',\n icon: 'mdi-file-plus',\n command: () => {\n this.newFile()\n },\n },\n {\n label: 'Open File',\n icon: 'mdi-folder-open',\n command: () => {\n this.openFile()\n },\n },\n {\n divider: true,\n },\n {\n label: 'Save File',\n icon: 'mdi-content-save',\n command: () => {\n this.saveFile()\n },\n },\n {\n label: 'Save As...',\n icon: 'mdi-content-save',\n command: () => {\n this.saveAs()\n },\n },\n {\n divider: true,\n },\n // {\n // label: 'Load Binary',\n // icon: 'mdi-cloud-upload',\n // command: () => {\n // this.loadBinary()\n // },\n // },\n // {\n // divider: true,\n // },\n {\n label: 'Delete File',\n icon: 'mdi-delete',\n command: () => {\n this.delete()\n },\n },\n ],\n },\n ]\n },\n },\n watch: {\n // Every time the filename changes we figure out if there is an associated upload & download script\n filename: function (val) {\n let upload =\n this.filename.split('/').slice(0, 2).join('/') + '/procedures/upload'\n let download =\n this.filename.split('/').slice(0, 2).join('/') + '/procedures/download'\n // First try Ruby\n Api.get(`/openc3-api/tables/${upload}.rb`, {\n headers: {\n Accept: 'application/json',\n // Since we're just checking for existence, 404 is possible so ignore it\n 'Ignore-Errors': '404',\n },\n })\n .then((response) => {\n this.uploadScript = `${upload}.rb`\n })\n .catch((error) => {\n // Now try python\n Api.get(`/openc3-api/tables/${upload}.py`, {\n headers: {\n Accept: 'application/json',\n // Since we're just checking for existence, 404 is possible so ignore it\n 'Ignore-Errors': '404',\n },\n })\n .then((response) => {\n this.uploadScript = `${upload}.py`\n })\n .catch((error) => {\n this.uploadScript = null\n })\n })\n // First check Ruby\n Api.get(`/openc3-api/tables/${download}.rb`, {\n headers: {\n Accept: 'application/json',\n // Since we're just checking for existence, 404 is possible so ignore it\n 'Ignore-Errors': '404',\n },\n })\n .then((response) => {\n this.downloadScript = `${download}.rb`\n })\n .catch((error) => {\n // Now try python\n Api.get(`/openc3-api/tables/${download}.py`, {\n headers: {\n Accept: 'application/json',\n // Since we're just checking for existence, 404 is possible so ignore it\n 'Ignore-Errors': '404',\n },\n })\n .then((response) => {\n this.downloadScript = `${download}.py`\n })\n .catch((error) => {\n this.downloadScript = null\n })\n })\n },\n },\n created() {\n // Ensure Offline Access Is Setup For the Current User\n this.api = new OpenC3Api()\n this.api.ensure_offline_access()\n },\n methods: {\n // File menu actions\n newFile: function () {\n this.fileModified = ''\n this.fileNew = true\n this.fileOpen = true\n },\n openFile: function () {\n this.fileOpen = true\n },\n // Called by the FileOpenDialog to set the file contents\n setFile: function ({ file, locked }) {\n // They opened a definition file so create a new binary\n if (file.name.includes('.txt')) {\n if (this.fileNew) {\n this.buildNewBinary(file.name)\n this.fileNew = false\n } else {\n this.getDefinition(file.name)\n }\n } else {\n this.unlockFile() // first unlock what was just being edited\n // Split off the ' *' which indicates a file is modified on the server\n this.filename = file.name.split('*')[0]\n this.fileModified = ''\n this.lockedBy = locked\n this.getDefinition()\n }\n },\n // Called by the FileOpenSaveDialog on error\n setError(event) {\n this.errorTitle = 'Error'\n this.errorText = `Error: ${event}`\n this.errorText = response.data.message\n this.showError = true\n },\n saveFile: function () {\n // Save a file by posting the new contents\n this.showSave = true\n\n const formData = new FormData()\n formData.append('binary', this.filename)\n formData.append('definition', this.definitionFilename)\n formData.append('tables', JSON.stringify(this.tables))\n Api.post(`/openc3-api/tables/${this.filename}`, {\n data: formData,\n headers: { 'Content-Type': 'multipart/form-data' },\n })\n .then((response) => {\n this.fileModified = ''\n setTimeout(() => {\n this.showSave = false\n }, 2000)\n })\n .catch(({ response }) => {\n this.showSave = false\n this.errorTitle = 'Save Error'\n this.errorText = response.data.message\n this.showError = true\n })\n this.lockFile() // Ensure this file is locked for editing\n },\n saveAs: function () {\n this.showSaveAs = true\n },\n saveAsFilename: function (filename) {\n Api.put(`/openc3-api/tables/${this.filename}/save-as/${filename}`).then(\n (response) => {\n this.filename = filename\n this.getDefinition(this.definitionFilename)\n },\n )\n },\n delete: function () {\n if (this.filename !== '') {\n this.$dialog\n .confirm(`Permanently delete file: ${this.filename}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then((dialog) => {\n return Api.delete(`/openc3-api/tables/${this.filename}`, {\n data: {},\n })\n })\n .then((response) => {\n this.tables = []\n this.filename = ''\n this.definitionFilename = ''\n })\n .catch((error) => {\n // TODO: It returns true on cancel?\n })\n }\n },\n downloadBinary: function (tableName = null) {\n const formData = new FormData()\n formData.append('binary', this.filename)\n formData.append('definition', this.definitionFilename)\n if (tableName !== null) {\n formData.append('table', tableName)\n }\n Api.post(`/openc3-api/tables/binary`, {\n data: formData,\n headers: { 'Content-Type': 'multipart/form-data' },\n }).then((response) => {\n // Decode Base64 string\n const decodedData = window.atob(response.data.contents)\n // Create UNIT8ARRAY of size same as row data length\n const uInt8Array = new Uint8Array(decodedData.length)\n // Insert all character code into uInt8Array\n for (let i = 0; i < decodedData.length; ++i) {\n uInt8Array[i] = decodedData.charCodeAt(i)\n }\n // Return BLOB image after conversion\n const blob = new Blob([uInt8Array], {\n type: 'application/octet-stream',\n })\n // Make a link and then 'click' on it to start the download\n const link = document.createElement('a')\n link.href = URL.createObjectURL(blob)\n link.setAttribute('download', response.data.filename)\n link.click()\n })\n },\n downloadDefinition: function (tableName = null) {\n const formData = new FormData()\n formData.append('definition', this.definitionFilename)\n if (tableName !== null) {\n formData.append('table', tableName)\n }\n Api.post(`/openc3-api/tables/definition`, {\n data: formData,\n headers: { 'Content-Type': 'multipart/form-data' },\n }).then((response) => {\n const blob = new Blob([response.data.contents], {\n type: 'text/plain',\n })\n // Make a link and then 'click' on it to start the download\n const link = document.createElement('a')\n link.href = URL.createObjectURL(blob)\n link.setAttribute('download', response.data.filename)\n link.click()\n })\n },\n downloadReport: function (tableName = null) {\n const formData = new FormData()\n formData.append('binary', this.filename)\n formData.append('definition', this.definitionFilename)\n if (tableName !== null) {\n formData.append('table', tableName)\n }\n Api.post(`/openc3-api/tables/report`, {\n data: formData,\n headers: { 'Content-Type': 'multipart/form-data' },\n }).then((response) => {\n const header =\n `Binary: ${this.filename}\\n` +\n `Definition: ${this.definitionFilename}\\n\\n`\n const blob = new Blob([header, response.data.contents], {\n type: 'text/plain',\n })\n // Make a link and then 'click' on it to start the download\n const link = document.createElement('a')\n link.href = URL.createObjectURL(blob)\n link.setAttribute('download', response.data.filename)\n link.click()\n })\n },\n upload() {\n Api.post(`/script-api/scripts/${this.uploadScript}/run`, {\n data: {\n environment: [{ key: 'TBL_FILENAME', value: this.filename }],\n },\n }).then((response) => {\n if (this.scriptBackground !== true) {\n window.open(`/tools/scriptrunner/${response.data}`, '_blank')\n }\n })\n },\n download() {\n this.$dialog\n .confirm(\n `Are you sure you want to overwrite ${this.filename}? ` +\n 'You can Save As to create a new file and then Download to preserve the existing file. ' +\n 'Note: Once the download completes you will need to re-open the file to see changes.',\n {\n okText: 'Download (Overwrite!)',\n cancelText: 'Cancel',\n },\n )\n .then(() => {\n Api.post(`/script-api/scripts/${this.downloadScript}/run`, {\n data: {\n environment: [{ key: 'TBL_FILENAME', value: this.filename }],\n },\n }).then((response) => {\n if (this.scriptBackground !== true) {\n window.open(`/tools/scriptrunner/${response.data}`, '_blank')\n }\n })\n })\n .catch((error) => {}) // Cancel, do nothing\n },\n // TODO: Need to load to tmp dir or something before we can saveAs to rename\n // async loadBinary() {\n // this.fileInput = ''\n // this.$refs.fileInput.$refs.input.click()\n // // Wait for the file to be set by the dialog so upload works\n // while (this.fileInput === '') {\n // await new Promise((resolve) => setTimeout(resolve, 500))\n // }\n // this.filename = this.fileInput.name\n // this.saveAs()\n // },\n confirmLocalUnlock: function () {\n this.$dialog\n .confirm(\n 'Are you sure you want to unlock this file for editing? ' +\n 'If another user is editing this file, your changes might conflict with each other.',\n {\n okText: 'Force Unlock',\n cancelText: 'Cancel',\n },\n )\n .then(() => {\n this.lockedBy = null\n return this.lockFile() // Re-lock it as this user so it's locked for anyone else who opens it\n })\n },\n lockFile: function () {\n return Api.post(`/openc3-api/tables/${this.filename}/lock`)\n },\n unlockFile: function () {\n if (this.filename !== '' && !this.readOnly) {\n Api.post(`/openc3-api/tables/${this.filename}/unlock`)\n }\n },\n getDefinition: function (definitionFilename = null) {\n if (!definitionFilename) {\n // Create a notional definition filename based on the binary\n definitionFilename = this.filename\n .replace('/bin/', '/config/')\n .replace('.bin', '_def.txt')\n }\n this.tables = [] // Clear so table is re-rendered\n const formData = new FormData()\n formData.append('binary', this.filename)\n formData.append('definition', definitionFilename)\n Api.post(`/openc3-api/tables/load`, {\n data: formData,\n headers: { 'Content-Type': 'multipart/form-data' },\n })\n .then((response) => {\n // Set the definition as actually loaded. The backend\n // checks what we sent and does a lookup to return\n // something close if it can't find an exact match.\n this.definitionFilename = response.data.definition\n this.tables = response.data.tables.map((table) => {\n return {\n ...table,\n // Build up the headers for proper searching\n headers: table.headers.map((text, i) => {\n const header = {\n text,\n filterable: text !== 'INDEX',\n }\n if (table.numColumns === 1) {\n // In the 1D table the searchable value is the first value in the row\n // Note the names in 1D are INDEX, NAME, VALUE\n return {\n ...header,\n value: `[0].${text.toLowerCase()}`,\n }\n } else {\n // In the 2D table the searchable value is always in the value attribute\n // of the current column item\n return {\n ...header,\n value: `[${i}].value`,\n }\n }\n }),\n }\n })\n\n if (response.data['errors']) {\n this.$notify.caution({\n title: 'Warning',\n body: response.data['errors'],\n })\n }\n })\n .catch((error) => {\n if (error.response.status == 404) {\n this.$notify.normal({\n title: 'Definition File Not Found',\n body: `Definition file ${definitionFilename} not found. Please select definition file.`,\n })\n this.fileOpen = true\n } else {\n this.$notify.serious({\n title: 'Error',\n body: `Error loading due to ${error.response.statusText}. Status: ${error.response.status}`,\n })\n }\n })\n },\n buildNewBinary: function (filename) {\n const formData = new FormData()\n formData.append('definition', filename)\n Api.post(`/openc3-api/tables/generate`, {\n data: formData,\n headers: { 'Content-Type': 'multipart/form-data' },\n }).then((response) => {\n this.filename = response.data.filename\n this.getDefinition(filename)\n })\n },\n onChange: function (item, { index, event }) {\n this.fileModified = '*'\n item[index].value = event\n },\n },\n}\n<\/script>\n<style scoped>\n.filename {\n background-color: var(--color-background-base-default);\n}\n</style>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1c9ff4b4e6ce23acb876b467386a825c47fd776b"},o=t[l]||(t[l]={});o[e]&&o[e].hash===n||(o[e]=i);var a=o[e];return me=function(){return a},a}me();const de={components:{TopBar:w,TableRow:X,FileOpenSaveDialog:ie,SimpleTextDialog:ue},data(){return me().f[0]++,me().s[0]++,{title:"Table Manager",search:"",curTab:null,tables:[],api:null,definition:null,fileInput:"",definitionFilename:"",fileNew:!1,filename:"",fileModified:"",lockedBy:null,fileOpen:!1,showSave:!1,showSaveAs:!1,showError:!1,errorTitle:"",errorText:"",uploadScript:null,downloadScript:null,scriptBackground:!0}},computed:{readOnly:function(){return me().f[1]++,me().s[1]++,!!this.lockedBy},fullFilename(){return me().f[2]++,me().s[2]++,`${this.filename} ${this.fileModified}`.trim()},menus:function(){return me().f[3]++,me().s[3]++,[{label:"File",items:[{label:"New File",icon:"mdi-file-plus",command:()=>{me().f[4]++,me().s[4]++,this.newFile()}},{label:"Open File",icon:"mdi-folder-open",command:()=>{me().f[5]++,me().s[5]++,this.openFile()}},{divider:!0},{label:"Save File",icon:"mdi-content-save",command:()=>{me().f[6]++,me().s[6]++,this.saveFile()}},{label:"Save As...",icon:"mdi-content-save",command:()=>{me().f[7]++,me().s[7]++,this.saveAs()}},{divider:!0},{label:"Delete File",icon:"mdi-delete",command:()=>{me().f[8]++,me().s[8]++,this.delete()}}]}]}},watch:{filename:function(e){me().f[9]++;let n=(me().s[9]++,this.filename.split("/").slice(0,2).join("/")+"/procedures/upload"),t=(me().s[10]++,this.filename.split("/").slice(0,2).join("/")+"/procedures/download");me().s[11]++,h.get(`/openc3-api/tables/${n}.rb`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then((e=>{me().f[10]++,me().s[12]++,this.uploadScript=`${n}.rb`})).catch((e=>{me().f[11]++,me().s[13]++,h.get(`/openc3-api/tables/${n}.py`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then((e=>{me().f[12]++,me().s[14]++,this.uploadScript=`${n}.py`})).catch((e=>{me().f[13]++,me().s[15]++,this.uploadScript=null}))})),me().s[16]++,h.get(`/openc3-api/tables/${t}.rb`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then((e=>{me().f[14]++,me().s[17]++,this.downloadScript=`${t}.rb`})).catch((e=>{me().f[15]++,me().s[18]++,h.get(`/openc3-api/tables/${t}.py`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then((e=>{me().f[16]++,me().s[19]++,this.downloadScript=`${t}.py`})).catch((e=>{me().f[17]++,me().s[20]++,this.downloadScript=null}))}))}},created(){me().f[18]++,me().s[21]++,this.api=new f,me().s[22]++,this.api.ensure_offline_access()},methods:{newFile:function(){me().f[19]++,me().s[23]++,this.fileModified="",me().s[24]++,this.fileNew=!0,me().s[25]++,this.fileOpen=!0},openFile:function(){me().f[20]++,me().s[26]++,this.fileOpen=!0},setFile:function({file:e,locked:n}){me().f[21]++,me().s[27]++,e.name.includes(".txt")?(me().b[0][0]++,me().s[28]++,this.fileNew?(me().b[1][0]++,me().s[29]++,this.buildNewBinary(e.name),me().s[30]++,this.fileNew=!1):(me().b[1][1]++,me().s[31]++,this.getDefinition(e.name))):(me().b[0][1]++,me().s[32]++,this.unlockFile(),me().s[33]++,this.filename=e.name.split("*")[0],me().s[34]++,this.fileModified="",me().s[35]++,this.lockedBy=n,me().s[36]++,this.getDefinition())},setError(e){me().f[22]++,me().s[37]++,this.errorTitle="Error",me().s[38]++,this.errorText=`Error: ${e}`,me().s[39]++,this.errorText=response.data.message,me().s[40]++,this.showError=!0},saveFile:function(){me().f[23]++,me().s[41]++,this.showSave=!0;const e=(me().s[42]++,new FormData);me().s[43]++,e.append("binary",this.filename),me().s[44]++,e.append("definition",this.definitionFilename),me().s[45]++,e.append("tables",JSON.stringify(this.tables)),me().s[46]++,h.post(`/openc3-api/tables/${this.filename}`,{data:e,headers:{"Content-Type":"multipart/form-data"}}).then((e=>{me().f[24]++,me().s[47]++,this.fileModified="",me().s[48]++,setTimeout((()=>{me().f[25]++,me().s[49]++,this.showSave=!1}),2e3)})).catch((({response:e})=>{me().f[26]++,me().s[50]++,this.showSave=!1,me().s[51]++,this.errorTitle="Save Error",me().s[52]++,this.errorText=e.data.message,me().s[53]++,this.showError=!0})),me().s[54]++,this.lockFile()},saveAs:function(){me().f[27]++,me().s[55]++,this.showSaveAs=!0},saveAsFilename:function(e){me().f[28]++,me().s[56]++,h.put(`/openc3-api/tables/${this.filename}/save-as/${e}`).then((n=>{me().f[29]++,me().s[57]++,this.filename=e,me().s[58]++,this.getDefinition(this.definitionFilename)}))},delete:function(){me().f[30]++,me().s[59]++,""!==this.filename?(me().b[2][0]++,me().s[60]++,this.$dialog.confirm(`Permanently delete file: ${this.filename}`,{okText:"Delete",cancelText:"Cancel"}).then((e=>(me().f[31]++,me().s[61]++,h.delete(`/openc3-api/tables/${this.filename}`,{data:{}})))).then((e=>{me().f[32]++,me().s[62]++,this.tables=[],me().s[63]++,this.filename="",me().s[64]++,this.definitionFilename=""})).catch((e=>{me().f[33]++}))):me().b[2][1]++},downloadBinary:function(e=(me().b[3][0]++,null)){me().f[34]++;const n=(me().s[65]++,new FormData);me().s[66]++,n.append("binary",this.filename),me().s[67]++,n.append("definition",this.definitionFilename),me().s[68]++,null!==e?(me().b[4][0]++,me().s[69]++,n.append("table",e)):me().b[4][1]++,me().s[70]++,h.post("/openc3-api/tables/binary",{data:n,headers:{"Content-Type":"multipart/form-data"}}).then((e=>{me().f[35]++;const n=(me().s[71]++,window.atob(e.data.contents)),t=(me().s[72]++,new Uint8Array(n.length));me().s[73]++;for(let o=(me().s[74]++,0);o<n.length;++o)me().s[75]++,t[o]=n.charCodeAt(o);const l=(me().s[76]++,new Blob([t],{type:"application/octet-stream"})),i=(me().s[77]++,document.createElement("a"));me().s[78]++,i.href=URL.createObjectURL(l),me().s[79]++,i.setAttribute("download",e.data.filename),me().s[80]++,i.click()}))},downloadDefinition:function(e=(me().b[5][0]++,null)){me().f[36]++;const n=(me().s[81]++,new FormData);me().s[82]++,n.append("definition",this.definitionFilename),me().s[83]++,null!==e?(me().b[6][0]++,me().s[84]++,n.append("table",e)):me().b[6][1]++,me().s[85]++,h.post("/openc3-api/tables/definition",{data:n,headers:{"Content-Type":"multipart/form-data"}}).then((e=>{me().f[37]++;const n=(me().s[86]++,new Blob([e.data.contents],{type:"text/plain"})),t=(me().s[87]++,document.createElement("a"));me().s[88]++,t.href=URL.createObjectURL(n),me().s[89]++,t.setAttribute("download",e.data.filename),me().s[90]++,t.click()}))},downloadReport:function(e=(me().b[7][0]++,null)){me().f[38]++;const n=(me().s[91]++,new FormData);me().s[92]++,n.append("binary",this.filename),me().s[93]++,n.append("definition",this.definitionFilename),me().s[94]++,null!==e?(me().b[8][0]++,me().s[95]++,n.append("table",e)):me().b[8][1]++,me().s[96]++,h.post("/openc3-api/tables/report",{data:n,headers:{"Content-Type":"multipart/form-data"}}).then((e=>{me().f[39]++;const n=(me().s[97]++,`Binary: ${this.filename}\nDefinition: ${this.definitionFilename}\n\n`),t=(me().s[98]++,new Blob([n,e.data.contents],{type:"text/plain"})),l=(me().s[99]++,document.createElement("a"));me().s[100]++,l.href=URL.createObjectURL(t),me().s[101]++,l.setAttribute("download",e.data.filename),me().s[102]++,l.click()}))},upload(){me().f[40]++,me().s[103]++,h.post(`/script-api/scripts/${this.uploadScript}/run`,{data:{environment:[{key:"TBL_FILENAME",value:this.filename}]}}).then((e=>{me().f[41]++,me().s[104]++,!0!==this.scriptBackground?(me().b[9][0]++,me().s[105]++,window.open(`/tools/scriptrunner/${e.data}`,"_blank")):me().b[9][1]++}))},download(){me().f[42]++,me().s[106]++,this.$dialog.confirm(`Are you sure you want to overwrite ${this.filename}? You can Save As to create a new file and then Download to preserve the existing file. Note: Once the download completes you will need to re-open the file to see changes.`,{okText:"Download (Overwrite!)",cancelText:"Cancel"}).then((()=>{me().f[43]++,me().s[107]++,h.post(`/script-api/scripts/${this.downloadScript}/run`,{data:{environment:[{key:"TBL_FILENAME",value:this.filename}]}}).then((e=>{me().f[44]++,me().s[108]++,!0!==this.scriptBackground?(me().b[10][0]++,me().s[109]++,window.open(`/tools/scriptrunner/${e.data}`,"_blank")):me().b[10][1]++}))})).catch((e=>{me().f[45]++}))},confirmLocalUnlock:function(){me().f[46]++,me().s[110]++,this.$dialog.confirm("Are you sure you want to unlock this file for editing? If another user is editing this file, your changes might conflict with each other.",{okText:"Force Unlock",cancelText:"Cancel"}).then((()=>(me().f[47]++,me().s[111]++,this.lockedBy=null,me().s[112]++,this.lockFile())))},lockFile:function(){return me().f[48]++,me().s[113]++,h.post(`/openc3-api/tables/${this.filename}/lock`)},unlockFile:function(){me().f[49]++,me().s[114]++,me().b[12][0]++,""===this.filename||(me().b[12][1]++,this.readOnly)?me().b[11][1]++:(me().b[11][0]++,me().s[115]++,h.post(`/openc3-api/tables/${this.filename}/unlock`))},getDefinition:function(e=(me().b[13][0]++,null)){me().f[50]++,me().s[116]++,e?me().b[14][1]++:(me().b[14][0]++,me().s[117]++,e=this.filename.replace("/bin/","/config/").replace(".bin","_def.txt")),me().s[118]++,this.tables=[];const n=(me().s[119]++,new FormData);me().s[120]++,n.append("binary",this.filename),me().s[121]++,n.append("definition",e),me().s[122]++,h.post("/openc3-api/tables/load",{data:n,headers:{"Content-Type":"multipart/form-data"}}).then((e=>{me().f[51]++,me().s[123]++,this.definitionFilename=e.data.definition,me().s[124]++,this.tables=e.data.tables.map((e=>(me().f[52]++,me().s[125]++,{...e,headers:e.headers.map(((n,t)=>{me().f[53]++;const l=(me().s[126]++,{text:n,filterable:"INDEX"!==n});return me().s[127]++,1===e.numColumns?(me().b[15][0]++,me().s[128]++,{...l,value:`[0].${n.toLowerCase()}`}):(me().b[15][1]++,me().s[129]++,{...l,value:`[${t}].value`})}))}))),me().s[130]++,e.data["errors"]?(me().b[16][0]++,me().s[131]++,this.$notify.caution({title:"Warning",body:e.data["errors"]})):me().b[16][1]++})).catch((n=>{me().f[54]++,me().s[132]++,404==n.response.status?(me().b[17][0]++,me().s[133]++,this.$notify.normal({title:"Definition File Not Found",body:`Definition file ${e} not found. Please select definition file.`}),me().s[134]++,this.fileOpen=!0):(me().b[17][1]++,me().s[135]++,this.$notify.serious({title:"Error",body:`Error loading due to ${n.response.statusText}. Status: ${n.response.status}`}))}))},buildNewBinary:function(e){me().f[55]++;const n=(me().s[136]++,new FormData);me().s[137]++,n.append("definition",e),me().s[138]++,h.post("/openc3-api/tables/generate",{data:n,headers:{"Content-Type":"multipart/form-data"}}).then((n=>{me().f[56]++,me().s[139]++,this.filename=n.data.filename,me().s[140]++,this.getDefinition(e)}))},onChange:function(e,{index:n,event:t}){me().f[57]++,me().s[141]++,this.fileModified="*",me().s[142]++,e[n].value=t}}},Ae=de;t(7270);var he=(0,g.A)(Ae,i,o,!1,null,"4e8e2697",null);const pe=he.exports},4974:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>c});var l=t(6758),i=t.n(l),o=t(935),a=t.n(o),s=a()(i());s.push([e.id,".filename[data-v-4e8e2697]{background-color:var(--color-background-base-default)}",""]);const c=s},4203:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>c});var l=t(6758),i=t.n(l),o=t(935),a=t.n(o),s=a()(i());s.push([e.id,".app-title[data-v-0af23388]{font-size:2rem}.menu-button[data-v-0af23388]{border-color:var(--color-border-interactive-muted)!important;background-color:var(--color-background-base-default)!important;padding-right:3px!important}span.v-btn__content span[data-v-0af23388]{padding-right:5px}.list-action[data-v-0af23388] label{color:#fff;padding-left:10px}.myicon[data-v-0af23388]{background-color:var(--color-background-surface-selected);border:1px solid currentColor;border-radius:3px;height:36px!important;width:36px!important}.v-list[data-v-0af23388] .v-label{margin-left:5px}.v-list-item__icon[data-v-0af23388]{margin-right:15px!important}.v-list-item__title[data-v-0af23388]{color:#fff}",""]);const c=s},7270:(e,n,t)=>{var l=t(4974);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[e.id,l,""]]),l.locals&&(e.exports=l.locals);var i=t(4825).A;i("370d98b4",l,!0,{sourceMap:!1,shadowMode:!1})},5699:(e,n,t)=>{var l=t(4203);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[e.id,l,""]]),l.locals&&(e.exports=l.locals);var i=t(4825).A;i("7f447726",l,!0,{sourceMap:!1,shadowMode:!1})}}]);
2
+ //# sourceMappingURL=173.js.map