openc3-cosmos-tool-dataextractor 6.0.0 → 6.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/tools/dataextractor/ArrayWidget-DBpEoQ1y-1c0b61d5aa91fcdccd47.js +2 -0
- data/tools/dataextractor/BarColumn-B6tCmNJm-6a949f6a26b37b195a7f.js +1 -0
- data/tools/dataextractor/BlockWidget-Bmi0UcUW-2ecaaec709c8f96e50c3.js +2 -0
- data/tools/dataextractor/ButtonWidget-CHrHS_Bw-fb33e464b92e99d7088a.js +2 -0
- data/tools/dataextractor/CanvasWidget-BqdyLbQz-a6307c239d854ea24c12.js +1 -0
- data/tools/dataextractor/CanvasdotWidget-YYwca104-eaddbe7e07d47fdd9ceb.js +1 -0
- data/tools/dataextractor/CanvasimageWidget-BrYlPQCf-aa35419e31ba5c4a8c59.js +1 -0
- data/tools/dataextractor/CanvasimagevalueWidget-HnEOXmZy-5f4a8e64639ec1e9d09e.js +1 -0
- data/tools/dataextractor/CanvaslabelWidget-BfMHNei--56787479f6430aec4563.js +1 -0
- data/tools/dataextractor/CanvaslabelvalueWidget-0zRDJav3-6e35ee7976f9a1810aab.js +1 -0
- data/tools/dataextractor/CanvaslineWidget-BmOwJP_G-9aafd363ce9369484ed0.js +1 -0
- data/tools/dataextractor/CanvaslinevalueWidget-H3L1aUKM-e0588c9e703be02e94f1.js +1 -0
- data/tools/dataextractor/CheckbuttonWidget-BnT9X7wE-2db801bd269382b7d7fc.js +1 -0
- data/tools/dataextractor/ComboboxWidget-BykAAoxH-940db69dc812c271778d.js +1 -0
- data/tools/dataextractor/DataExtractor-d79b9c10bf6e7cad9e7a.js +10 -0
- data/tools/dataextractor/DateWidget-FtYD86xW-565045cc12f1d3e5cb17.js +1 -0
- data/tools/dataextractor/{DetailsDialog-EWjtBjle-4959df7550629e2cbb07.js → DetailsDialog-DiVcC3Fg-487ebbee41c3e5252082.js} +1 -1
- data/tools/dataextractor/DynamicWidget-m9EliUR2-1c3200485aaa974e6fd1.js +1 -0
- data/tools/dataextractor/FormatvalueWidget-OykwwCrw-d47fb6e27f3ff1b378cd.js +1 -0
- data/tools/dataextractor/GraphWidget-BohHW-97-4cf819901d3dfd16cfbf.js +1 -0
- data/tools/dataextractor/HorizontalWidget-B7YdcFVN-dba3e24e89fce8121643.js +1 -0
- data/tools/dataextractor/HorizontalboxWidget-D-kCNwI3-a2d0d73ec7d97fd7a333.js +1 -0
- data/tools/dataextractor/HorizontallineWidget-BdlNB951-9a8865ddf3fc0386af74.js +1 -0
- data/tools/dataextractor/IframeWidget-0C7GYEVc-e7ba031909460f5acbe7.js +1 -0
- data/tools/dataextractor/{ImageLoader-CDLQopxJ-29103b1b0c576f78771b.js → ImageLoader-y6fAZe9P-c20cfe51413bd1cebe0b.js} +1 -1
- data/tools/dataextractor/ImageviewerWidget-B4HbUIfR-85bbceb204b4b453860b.js +1 -0
- data/tools/dataextractor/LabelWidget-D1JhQAzR-ce20e60fbbbe57e4bd55.js +1 -0
- data/tools/dataextractor/LabelledWidget-C2VGJ5OJ-74e2097e134d5c35bfbf.js +1 -0
- data/tools/dataextractor/LabelprogressbarWidget-DN0cAeLK-7afdf9d9d638e3d758e5.js +1 -0
- data/tools/dataextractor/LabelsparklineWidget--sxBENxs-1e3fadbb4231d6122c4b.js +1 -0
- data/tools/dataextractor/LabelvalueWidget-BWpP5KX6-4c01c369a8b114772197.js +1 -0
- data/tools/dataextractor/LabelvaluedescWidget-DtJwggDu-7c25c7ebc0757057fc77.js +1 -0
- data/tools/dataextractor/LabelvaluelimitsbarWidget-Bj6UVK-5-fc03971a7f003e2468b5.js +1 -0
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-BVcEEcUx-aeeceaba68b98bbec596.js +1 -0
- data/tools/dataextractor/LabelvaluerangebarWidget-DCJ42bmf-f6bc0f83a35f89e00c36.js +1 -0
- data/tools/dataextractor/{Layout-klOVw-YN-1974f92641167d7b8e95.js → Layout-D4YBjuWs-9760d49d47be7ac41a9f.js} +1 -1
- data/tools/dataextractor/LedWidget-hN9JHxjr-aa126047636e683a64d5.js +1 -0
- data/tools/dataextractor/LimitsbarWidget-D-wfz_St-b9383b82d644fa7cb98d.js +1 -0
- data/tools/dataextractor/LimitscolorWidget-B0AVGdkz-25d41627ca4119391a27.js +1 -0
- data/tools/dataextractor/LimitscolumnWidget-Dt5ce4hN-ee0ad52298811b3b08e9.js +1 -0
- data/tools/dataextractor/LinegraphWidget-CTjtvtPd-d67446b7ee79a8be6c08.js +1 -0
- data/tools/dataextractor/MatrixbycolumnsWidget-wLx4NvXV-845a8aeaf520b2ffd03d.js +1 -0
- data/tools/dataextractor/ProgressbarWidget-B7l0BBiX-fa52db0d6d1744d9de05.js +1 -0
- data/tools/dataextractor/RadiobuttonWidget-B032jKIw-2ec3d31ede2fbcaa126c.js +1 -0
- data/tools/dataextractor/RadiogroupWidget-Busjqikr-4ec7aac22cfe367897c7.js +1 -0
- data/tools/dataextractor/RangebarWidget-DbYrwEfC-daea125f7589b80838f3.js +1 -0
- data/tools/dataextractor/RollupWidget-rKxLXuCv-317598f5fa8e45ef1b44.js +1 -0
- data/tools/dataextractor/ScrollwindowWidget-D4NKIzQO-cf26c4fc496bc4018b51.js +1 -0
- data/tools/dataextractor/SignalWidget-h-oivReC-955e32f809ab1c371826.js +1 -0
- data/tools/dataextractor/SpacerWidget-BSy9eOlB-c89463d660f2d3683033.js +1 -0
- data/tools/dataextractor/SparklineWidget-C9vdxar--27b1f5fc7cd1b1f0de22.js +1 -0
- data/tools/dataextractor/TabbookWidget-DTFTKURm-4b23ee161c660f030255.js +1 -0
- data/tools/dataextractor/TextboxWidget-BZyYHmBq-31c2410278a883f5a0e9.js +1 -0
- data/tools/dataextractor/TextfieldWidget-aVRdXRsT-24938d63f287872f1830.js +1 -0
- data/tools/dataextractor/TimeWidget-BE2rtMxg-38e9bf584b6d8c4f5012.js +1 -0
- data/tools/dataextractor/TitleWidget-BB29MZb2-6bef4ca9b93f1c41c208.js +1 -0
- data/tools/dataextractor/{VWidget-Dmqf_jKM-b33df5cdf8ac7206fb15.js → VWidget-CGdM4sTw-729e8b3fcd6166b783f1.js} +1 -1
- data/tools/dataextractor/ValueWidget-h3905woQ-181f3cb5fa186ab9aaab.js +1 -0
- data/tools/dataextractor/ValuelimitsbarWidget-LMXYjWtS-b5b6df51ba804638df3d.js +1 -0
- data/tools/dataextractor/ValuelimitscolumnWidget-gA3ZcfAT-fe271b28898c0abf8bf1.js +1 -0
- data/tools/dataextractor/ValuerangebarWidget-DwZ9KQ0O-ad198b8a9de3a696ca72.js +1 -0
- data/tools/dataextractor/VerticalWidget-DziyURNu-3e67ee4f4de9fd1df20f.js +1 -0
- data/tools/dataextractor/VerticalboxWidget-OcoZBsFU-1a3baa11d1f3bca90fca.js +1 -0
- data/tools/dataextractor/{Widget-orNSvnOh-677c5b6b99d215d82fc9.js → Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js} +1 -1
- data/tools/dataextractor/{main-7f7c9aca4eba3a2f66c5.js → main-80e32c674d54e3083df2.js} +75 -75
- data/tools/dataextractor/main.js +1 -1
- metadata +67 -67
- data/tools/dataextractor/ArrayWidget-By62tXtU-d6845ec502f643cd0d62.js +0 -2
- data/tools/dataextractor/BarColumn-Dm3D1Lhp-f0369ef4eca12f640724.js +0 -1
- data/tools/dataextractor/BlockWidget-CrT45ode-9d92843b01fe56492ce3.js +0 -2
- data/tools/dataextractor/ButtonWidget-CKyBBv6m-692383150f66b24960b7.js +0 -2
- data/tools/dataextractor/CanvasWidget-PqkppHC7-07bb703e9c4596b68aac.js +0 -1
- data/tools/dataextractor/CanvasdotWidget-BUbJgM2d-6f36957b25f169ab1052.js +0 -1
- data/tools/dataextractor/CanvasimageWidget-DPVBY7mi-cb0f31ef7ab254b09998.js +0 -1
- data/tools/dataextractor/CanvasimagevalueWidget-GX37zzNc-15f47f132697297a9901.js +0 -1
- data/tools/dataextractor/CanvaslabelWidget-P2_Y6Edw-b091e01360466b348770.js +0 -1
- data/tools/dataextractor/CanvaslabelvalueWidget-Cuas1i9P-1c9cee705d71b085a8f0.js +0 -1
- data/tools/dataextractor/CanvaslineWidget-BYOYgPya-e7ae21b1484fe8846e31.js +0 -1
- data/tools/dataextractor/CanvaslinevalueWidget-3cVJMFo7-fbedaef931d92580dd05.js +0 -1
- data/tools/dataextractor/CheckbuttonWidget-B3wgSMuB-cd29644d171404fdbbfb.js +0 -1
- data/tools/dataextractor/ComboboxWidget-Dzr4Scvf-5fb4b8b08c687bc69e58.js +0 -1
- data/tools/dataextractor/DataExtractor-c83fcc2fe07fbcb12e97.js +0 -10
- data/tools/dataextractor/DateWidget-BWh76Ibb-e4448eb5b8bed813a6dc.js +0 -1
- data/tools/dataextractor/DynamicWidget-m9EliUR2-f8e2433988dfe6da3de5.js +0 -1
- data/tools/dataextractor/FormatvalueWidget-Rk0_eeIm-47f003ee2ce746467c62.js +0 -1
- data/tools/dataextractor/GraphWidget-LqekkNDr-a33b6700fffda5a502f8.js +0 -1
- data/tools/dataextractor/HorizontalWidget-BcfJ24Zn-d39077d8732466d83fc0.js +0 -1
- data/tools/dataextractor/HorizontalboxWidget-CQy1Hv9E-45cbe66fdaee91096aa5.js +0 -1
- data/tools/dataextractor/HorizontallineWidget-BdlNB951-d6a2205172ed8aed7db7.js +0 -1
- data/tools/dataextractor/IframeWidget-BBaDrRLo-417449df3e2a304cfb0d.js +0 -1
- data/tools/dataextractor/ImageviewerWidget-BgO3Pq6I-ac8a5a32f0e70cd2e5a1.js +0 -1
- data/tools/dataextractor/LabelWidget-B_C6lKOE-7aa5bb7216abe13fcff5.js +0 -1
- data/tools/dataextractor/LabelledWidget-B_UGivhr-a4311c5f8b934ba586d3.js +0 -1
- data/tools/dataextractor/LabelprogressbarWidget-BJWCmsYC-40a1e1356a78a16233d7.js +0 -1
- data/tools/dataextractor/LabelsparklineWidget-DILCIh3q-10dfc940c64e34c3fcaf.js +0 -1
- data/tools/dataextractor/LabelvalueWidget-CCZd1NXE-481b5281aeb008279269.js +0 -1
- data/tools/dataextractor/LabelvaluedescWidget-Bsllq8W6-23f88e26ddd53c9e17b7.js +0 -1
- data/tools/dataextractor/LabelvaluelimitsbarWidget-BV-cfaD--d84e73eedbe80dbf3019.js +0 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-DwA0eRBw-11161768847dd43855f8.js +0 -1
- data/tools/dataextractor/LabelvaluerangebarWidget-3GDJz3dj-fbb3fa26a918a7f073e3.js +0 -1
- data/tools/dataextractor/LedWidget-BAt02s0J-1e648734371fac134070.js +0 -1
- data/tools/dataextractor/LimitsbarWidget-JJiyzZjb-64aa530491d109c1cd3b.js +0 -1
- data/tools/dataextractor/LimitscolorWidget-CYzXKbYd-61530465c235da60d06f.js +0 -1
- data/tools/dataextractor/LimitscolumnWidget-Cd76tBo7-8192fb1faefcebe57823.js +0 -1
- data/tools/dataextractor/LinegraphWidget-DWRtO6Ej-d922a15778db3c407847.js +0 -1
- data/tools/dataextractor/MatrixbycolumnsWidget-cwsyjNV2-15735a2a30dcf1dd8d28.js +0 -1
- data/tools/dataextractor/ProgressbarWidget-CYDziFej-3df56853fcd680dafcac.js +0 -1
- data/tools/dataextractor/RadiobuttonWidget-U6jcQZoD-434daaf8ae9a0e1f88ed.js +0 -1
- data/tools/dataextractor/RadiogroupWidget-HTPJnsB0-3d008b8507fde7bd42e1.js +0 -1
- data/tools/dataextractor/RangebarWidget-DW0FJK6y-ffc19171bd5db093deb0.js +0 -1
- data/tools/dataextractor/RollupWidget-B2qrx55f-1ebbd4b3e7ba9dee2a48.js +0 -1
- data/tools/dataextractor/ScrollwindowWidget-CwIDxgO6-9e218b9b089b09a8d2e4.js +0 -1
- data/tools/dataextractor/SignalWidget-Bosa3AbW-5986f5c1a1f6d0641207.js +0 -1
- data/tools/dataextractor/SpacerWidget-DYAlt5mt-78646eff352e062d5f7a.js +0 -1
- data/tools/dataextractor/SparklineWidget-CDrVXOFV-3add0cda4b1aedf9ba24.js +0 -1
- data/tools/dataextractor/TabbookWidget-DDdlzCkv-1bbcc52667948f2ced8f.js +0 -1
- data/tools/dataextractor/TextboxWidget-5euFelEq-a2346a29a1c30a3f5e48.js +0 -1
- data/tools/dataextractor/TextfieldWidget-BFripYeh-fdea7de50a8fb607e99e.js +0 -1
- data/tools/dataextractor/TimeWidget-BBSbsUYJ-309dbc7d277a70f657c9.js +0 -1
- data/tools/dataextractor/TitleWidget-p8cjo-Bs-a3c049216296a7da2718.js +0 -1
- data/tools/dataextractor/ValueWidget-CZh7JWwT-501802abd1cf8ad961b2.js +0 -1
- data/tools/dataextractor/ValuelimitsbarWidget-DU7ybswC-a0fd4af721f9bcc8f015.js +0 -1
- data/tools/dataextractor/ValuelimitscolumnWidget-DMw-h5jM-8d1c94d463c1ca596668.js +0 -1
- data/tools/dataextractor/ValuerangebarWidget-DPpofDpA-84b2c9ecc7460ad486a2.js +0 -1
- data/tools/dataextractor/VerticalWidget-Ch7VAEmz-9d848c3462a57112128c.js +0 -1
- data/tools/dataextractor/VerticalboxWidget-DYx-TFT4-77f85836c826af360fe4.js +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8085f5a82386cd9dad79555062081d246ac5a2c7302e3d5e326e9c48c8410f3d
|
4
|
+
data.tar.gz: 15a80dee208f212533efcdea8e90afdbb6ae37f3feb133aef8891caa12e67aa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39e4e589525e518eb707bda50e49f9dd4536f7e5a0ef7cca63dedadecf46d4e19f0d7ed736b7faa4fb28dd4746e645e85ea3cbe89f52f61e8e82b40abf4020c6
|
7
|
+
data.tar.gz: e9997f1111418aabecb67c39caa9e958e0c0968cc3bf10d65e78c1f448c4933548bd4d9629974272a785c173e9c7228fa922b7e8bbaa61ec97970de479f00e08
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./main-80e32c674d54e3083df2.js","vue","./DetailsDialog-DiVcC3Fg-487ebbee41c3e5252082.js","single-spa","./VWidget-CGdM4sTw-729e8b3fcd6166b783f1.js","vue-router","vuex","vuetify","./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js"],function(S,T){"use strict";var h,a,u,c,i,d,p,l,g,f,v,w,y,x,C,V;return{setters:[t=>{h=t.s},t=>{a=t.resolveComponent,u=t.openBlock,c=t.createElementBlock,i=t.createVNode,d=t.normalizeClass,p=t.normalizeStyle,l=t.withCtx,g=t.Fragment,f=t.renderList,v=t.createBlock,w=t.withModifiers,y=t.createTextVNode,x=t.toDisplayString},t=>{C=t.P},null,t=>{V=t.L},null,null,null,null],execute:function(){const t={components:{DetailsDialog:C},data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},mixins:[V],computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){var r;let s="",k=" ",D=`
|
2
|
+
`,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?s+=sprintf(this.formatter,m):s+=m,o+=1,o%this.itemsPerRow===0?(o=0,s+=D):s+=k;return s.trim()}else return e}}},_={class:"array-widget-container"};function B(e,r,s,k,D,o){const m=a("v-textarea"),M=a("v-list-item-title"),z=a("v-list-item"),L=a("v-list"),E=a("v-menu"),N=a("details-dialog");return u(),c("div",_,[i(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:d(e.valueClass),style:p([e.computedStyle,o.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),i(E,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:l(()=>[i(L,null,{default:l(()=>[(u(!0),c(g,null,f(e.contextMenuOptions,(n,P)=>(u(),v(z,{key:P,onClick:w(n.action,["stop"])},{default:l(()=>[i(M,null,{default:l(()=>[y(x(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(N,{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2],modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>e.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const j=S("default",h(t,[["render",B],["__scopeId","data-v-62b9e9e1"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","./main-80e32c674d54e3083df2.js"],function(a,n){"use strict";var h,l;return{setters:[s=>{h=s.o},s=>{l=s.F}],execute:function(){const s=a("l",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new l,this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then(t=>{this.limitsSettings=t}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(t=>{t[0]==="MIN_VALUE"&&(this.minValue=parseInt(t[1])),t[0]==="MAX_VALUE"&&(this.maxValue=parseInt(t[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(!t||!i)return;let r=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(r=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const e=parseInt((t-r)/this.scale);return e>100?100:e<0?0:e}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})}}});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./main-80e32c674d54e3083df2.js","vue","./DetailsDialog-DiVcC3Fg-487ebbee41c3e5252082.js","single-spa","./VWidget-CGdM4sTw-729e8b3fcd6166b783f1.js","vue-router","vuex","vuetify","./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js"],function(S,L){"use strict";var u,a,h,m,s,p,g,o,w,f,v,x,y,C,V,k;return{setters:[e=>{u=e.s},e=>{a=e.resolveComponent,h=e.openBlock,m=e.createElementBlock,s=e.createVNode,p=e.normalizeClass,g=e.normalizeStyle,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,x=e.withModifiers,y=e.createTextVNode,C=e.toDisplayString},e=>{V=e.P},null,e=>{k=e.L},null,null,null,null],execute:function(){const e={components:{DetailsDialog:V},data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},mixins:[k],computed:{aging(){return{"--aging":this.grayLevel}},rows:function(){return(this.height-16)/24}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.bytesPerWord=parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=parseInt(this.parameters[7])),this.parameters[8]&&(this.addrFormat=this.parameters[8])},methods:{getType:function(){let t="RAW";return this.parameters[9]&&(t=this.parameters[9]),t},formatValue:function(t){let r="";if(t&&t.raw){let D=" ",P=`
|
2
|
+
`,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=d),r+=sprintf(this.formatter,c),i+=1,i%d===0?(i=0,r+=P):i%this.bytesPerWord===0&&(r+=D)}else r=t;return r}}},M={class:"block-widget-container"};function W(t,r,D,P,i,l){const d=a("v-textarea"),c=a("v-list-item-title"),_=a("v-list-item"),F=a("v-list"),B=a("v-menu"),b=a("details-dialog");return h(),m("div",M,[s(d,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:p(t.valueClass),style:g([t.computedStyle,l.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(B,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(F,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,z)=>(h(),v(_,{key:z,onClick:x(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[y(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(b,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const N=S("default",u(e,[["render",W],["__scopeId","data-v-4d4589c2"]]))}}});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./main-80e32c674d54e3083df2.js","vue","single-spa","./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var s,Ik,S$1,Fk,resolveComponent,openBlock,createBlock,withCtx,createVNode,createElementVNode,createTextVNode,toDisplayString,createCommentVNode,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{s=e.s,Ik=e.I,S$1=e.S,Fk=e.F},e=>{resolveComponent=e.resolveComponent,openBlock=e.openBlock,createBlock=e.createBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,createCommentVNode=e.createCommentVNode,withModifiers=e.withModifiers,createElementBlock=e.createElementBlock,normalizeStyle=e.normalizeStyle},null,e=>{o=e.o},null,null,null],execute:function(){const S={props:{uuid:String,cmdUser:String,cmdString:String,persistent:{type:Boolean,default:!1},modelValue:Boolean},data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},watch:{modelValue:function(e,t){e?(Ik.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(r=>{r.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?Ik.get("/openc3-api/criticalcmd/status/"+this.uuid).then(r=>{r.data.status!=="WAITING"&&(this.$emit("status",r.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},methods:{async approve(){if(this.canApprove)await Ik.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();S$1.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(t=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(t=>{this.error=!0,t.response?this.errorText=t.response.data.message:this.errorText=t.message})}},async reject(){if(this.canApprove)await Ik.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();(await S$1.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await S$1.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function E(e,t,r,p,a,l){const c=resolveComponent("v-spacer"),V=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),n=resolveComponent("v-row"),h=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),f=resolveComponent("v-container"),v=resolveComponent("v-card-text"),u=resolveComponent("v-card"),w=resolveComponent("v-dialog");return openBlock(),createBlock(w,{persistent:r.persistent,modelValue:l.show,"onUpdate:modelValue":t[3]||(t[3]=d=>l.show=d),width:"600"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[createVNode(V,{height:"24"},{default:withCtx(()=>[createVNode(c),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(c)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createVNode(f,{fluid:""},{default:withCtx(()=>[createVNode(m,{type:"error",modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=d=>a.error=d),dismissible:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(n,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(r.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(n,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(r.cmdString),1)]),_:1}),createVNode(n,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(r.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(n,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=d=>a.username=d),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(n,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=d=>a.password=d),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(n,{class:"pt-2"},{default:withCtx(()=>[createVNode(c),createVNode(C,{type:"submit",onClick:withModifiers(l.reject,["prevent"]),class:"mx-2",color:"secondary",outlined:"",disabled:l.disableButtons,"data-test":"reject"},{default:withCtx(()=>t[5]||(t[5]=[createTextVNode(" Reject ")])),_:1},8,["onClick","disabled"]),createVNode(C,{type:"submit",onClick:withModifiers(l.approve,["prevent"]),class:"mx-2",color:"primary",disabled:l.disableButtons,"data-test":"approve"},{default:withCtx(()=>t[6]||(t[6]=[createTextVNode(" Approve ")])),_:1},8,["onClick","disabled"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["persistent","modelValue"])}const N=s(S,[["render",E],["__scopeId","data-v-edfbf188"]]),_sfc_main={mixins:[o],components:{CriticalCmdDialog:N},data(){return{api:null,displaySendHazardous:!1,lastCmd:"",criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{buttonText(){return this.parameters[0]},eval(){return this.parameters[1]}},created(){this.api=new Fk},methods:{async onClick(){const lines=this.eval.split(";;"),self=this,screen=this.screen,screenValues=this.screenValues,screenTimeZone=this.screenTimeZone,api=this.api,runScript=this.runScript;(self||screen||screenValues||screenTimeZone||api||runScript)&&this.$nextTick(()=>{});for(let i=0;i<lines.length;i++)try{const result=eval(lines[i].trim());result instanceof Promise&&await result}catch(e){if(e.message.includes("CriticalCmdError"))this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0;else if(e.message.includes("is Hazardous"))for(this.lastCmd=e.message.split(`
|
2
|
+
`).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,r={}){let p=[];for(const a in r)p.push({key:a,value:r[a],readonly:!1});Ik.post(`/script-api/scripts/${e}/run`,{data:{environment:p}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,r,p,a,l){const c=resolveComponent("v-btn"),V=resolveComponent("v-card-title"),m=resolveComponent("v-row"),n=resolveComponent("v-spacer"),h=resolveComponent("v-card-text"),C=resolveComponent("v-card"),f=resolveComponent("v-dialog"),v=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(c,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:l.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(l.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(f,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=u=>a.displaySendHazardous=u),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(V,null,{default:withCtx(()=>t[2]||(t[2]=[createTextVNode("Hazardous")])),_:1}),createVNode(h,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(m,{class:"my-2"},{default:withCtx(()=>t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])),_:1}),createVNode(m,null,{default:withCtx(()=>[createVNode(n),createVNode(c,{onClick:l.cancelHazardousCmd,variant:"outlined"},{default:withCtx(()=>t[4]||(t[4]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(c,{onClick:l.sendHazardousCmd,class:"bg-primary mx-1"},{default:withCtx(()=>t[5]||(t[5]=[createTextVNode(" Send ")])),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(v,{uuid:a.criticalCmdUuid,cmdString:a.criticalCmdString,cmdUser:a.criticalCmdUser,modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=u=>a.displayCriticalCmd=u)},null,8,["uuid","cmdString","cmdUser","modelValue"])])}const ButtonWidget=exports("default",s(_sfc_main,[["render",_sfc_render]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Layout-D4YBjuWs-9760d49d47be7ac41a9f.js","vue","./main-80e32c674d54e3083df2.js","./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue-router","single-spa","vuex","vuetify"],function(p,f){"use strict";var i,n,s,a,l,c,u,m,o;return{setters:[e=>{i=e.r},e=>{n=e.openBlock,s=e.createElementBlock,a=e.Fragment,l=e.renderList,c=e.createBlock,u=e.resolveDynamicComponent,m=e.mergeProps},e=>{o=e.s},null,null,null,null,null],execute:function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},h=["width","height"];function d(r,k,y,B,x,g){return n(),s("svg",{id:"canvas",width:g.width,height:g.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),m({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,h)}const w=p("default",o(e,[["render",d],["__scopeId","data-v-47bdfc3c"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(c,a){"use strict";var t,l,n,s;return{setters:[e=>{t=e.o},e=>{l=e.openBlock,n=e.createElementBlock},e=>{s=e.s},null,null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(r,m,f,p,x,v){return l(),n("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const o=c("default",s(e,[["render",i]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","./ImageLoader-y6fAZe9P-c20cfe51413bd1cebe0b.js","vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(o,d){"use strict";var s,i,n,a,l,c,h;return{setters:[e=>{s=e.o},e=>{i=e.s},e=>{n=e.openBlock,a=e.createElementBlock,l=e.normalizeStyle,c=e.createCommentVNode},e=>{h=e.s},null,null,null,null],execute:function(){const e={mixins:[s,i],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function g(t,m,y,k,x,r){return t.imageUrl?(n(),a("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:l(r.pointerStyle),onClick:m[0]||(m[0]=(...p)=>r.clickHandler&&r.clickHandler(...p))},null,12,u)):c("",!0)}const f=o("default",h(e,[["render",g]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","./ImageLoader-y6fAZe9P-c20cfe51413bd1cebe0b.js","vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(v,S){"use strict";var m,d,l,n,g,o,h,u,c,f,p;return{setters:[t=>{m=t.o},t=>{d=t.s},t=>{l=t.openBlock,n=t.createElementBlock,g=t.Fragment,o=t.renderList,h=t.withDirectives,u=t.normalizeStyle,c=t.vShow,f=t.createCommentVNode},t=>{p=t.s},null,null,null,null],execute:function(){const t={mixins:[m,d],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(r=>r.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const r=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let i=e[2];return i.startsWith("http")||(i=await this.getPresignedUrl(i)),{url:i,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(r).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let i=this.parameters[4];i.startsWith("http")?this.defaultImage={...e,url:i}:this.getPresignedUrl(i).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},I=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(r,e,i,y,N,a){return l(),n("g",null,[(l(!0),n(g,null,o(r.images,s=>h((l(),n("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,I)),[[c,s.value==a.selectedValue]])),128)),r.defaultImage?h((l(),n("image",{key:0,href:r.defaultImage.url,x:r.defaultImage.x,y:r.defaultImage.y,width:r.defaultImage.width,height:r.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):f("",!0)])}const $=v("default",p(t,[["render",k]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(o,m){"use strict";var r,l,n,s,i;return{setters:[e=>{r=e.o},e=>{l=e.openBlock,n=e.createElementBlock,s=e.toDisplayString},e=>{i=e.s},null,null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,y,g,c){return l(),n("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const p=o("default",i(e,[["render",u]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(u,p){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.o},e=>{a=e.openBlock,i=e.createElementBlock,l=e.toDisplayString},e=>{n=e.s},null,null,null,null],execute:function(){const e={mixins:[s],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId][0]},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},o=["x","y","font-size","fill"];function m(t,h,d,f,v,r){return a(),i("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,o)}const c=u("default",n(e,[["render",m]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var s,l,n,a,c;return{setters:[e=>{s=e.o},e=>{l=e.openBlock,n=e.createElementBlock,a=e.normalizeStyle},e=>{c=e.s},null,null,null,null],execute:function(){const e={mixins:[s],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},u=["x1","y1","x2","y2"];function o(t,r,x,k,f,m){return l(),n("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(u,o){"use strict";var a,r,l,i,n;return{setters:[t=>{a=t.o},t=>{r=t.openBlock,l=t.createElementBlock,i=t.normalizeStyle},t=>{n=t.s},null,null,null,null],execute:function(){const t={mixins:[a],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let s=1;return this.parameters[7]&&(s=this.parameters[7]),"stroke:"+e+";stroke-width:"+s}},created(){this.appliedSettings.forEach(s=>{s[0]==="VALUE_EQ"&&(this.valueMap[s[1]]=s[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},m=["x1","y1","x2","y2"];function c(e,s,d,v,y,h){return r(),l("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(h.calcStyle)},null,12,m)}const p=u("default",n(t,[["render",c]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(c,h){"use strict";var t,s,a,n,o,r;return{setters:[e=>{t=e.o},e=>{s=e.resolveComponent,a=e.openBlock,n=e.createBlock,o=e.normalizeStyle},e=>{r=e.s},null,null,null,null],execute:function(){const e={mixins:[t],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function i(m,u,k,y,l,b){const d=s("v-checkbox");return a(),n(d,{"hide-details":"",density:"compact",label:l.label,modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),style:o(m.computedStyle)},null,8,["label","modelValue","style"])}const p=c("default",r(e,[["render",i]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,n,o,r,u;return{setters:[e=>{l=e.o},e=>{s=e.resolveComponent,n=e.openBlock,o=e.createBlock,r=e.normalizeStyle},e=>{u=e.s},null,null,null,null],execute:function(){const e={mixins:[l],data(){return{items:[],value:null}},created(){this.value=this.parameters[0],this.items=this.parameters},methods:{text(){return this.value}}};function c(m,a,h,f,t,x){const v=s("v-select");return n(),o(v,{"hide-details":"",density:"compact",variant:"outlined",items:t.items,modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=d=>t.value=d),style:r(m.computedStyle)},null,8,["items","modelValue","style"])}const y=i("default",u(e,[["render",c]]))}}});
|
@@ -0,0 +1,10 @@
|
|
1
|
+
System.register(["./main-80e32c674d54e3083df2.js","vue","vue-router","single-spa","vuex","vuetify"],function(Vt,Fi){"use strict";var qe,He,ze,We,Ke,$e,Je,v,R,U,Ge,d,f,z,q,W,Z,te,K,N,Se,Ee,X,Ze,Ce;return{setters:[O=>{qe=O.s,He=O._,ze=O.X,We=O.Y,Ke=O.e,$e=O.Z,Je=O.P},O=>{v=O.resolveComponent,R=O.openBlock,U=O.createBlock,Ge=O.Teleport,d=O.createVNode,f=O.withCtx,z=O.createElementVNode,q=O.toDisplayString,W=O.createElementBlock,Z=O.Fragment,te=O.renderList,K=O.mergeProps,N=O.createTextVNode,Se=O.createSlots,Ee=O.normalizeStyle,X=O.createCommentVNode,Ze=O.withModifiers,Ce=O.withKeys},null,null,null,null],execute:function(){var O=document.createElement("style");O.textContent=`.title-font[data-v-ad4c3d44]{font-size:1.125rem}.v-progress-linear__determinate[data-v-ad4c3d44]{transition:none!important}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(O);const Ft={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},Lt={class:"app-title mr-2"};function Bt(t,e,n,i,s,r){const o=v("v-col"),l=v("v-row"),u=v("v-icon"),c=v("v-btn"),h=v("v-divider"),_=v("v-list-item-title"),w=v("v-list-item"),g=v("v-list"),p=v("v-menu"),m=v("v-radio"),S=v("v-list-item-action"),E=v("v-radio-group"),C=v("v-checkbox");return R(),U(Ge,{to:"#openc3-menu"},[d(l,{"no-gutters":""},{default:f(()=>[d(o,{"align-self":"end"},{default:f(()=>[z("span",Lt,q(n.title),1)]),_:1})]),_:1}),d(l,{dense:"",class:"flex-nowrap"},{default:f(()=>[(R(!0),W(Z,null,te(n.menus,(D,F)=>(R(),U(p,{ref_for:!0,ref:"topmenu",key:F},{activator:f(({props:b})=>[d(c,K({ref_for:!0},b,{variant:"outlined",class:"mx-1 menu-button",text:D.label,"data-test":r.formatDT(`${n.title} ${D.label}`)}),{append:f(()=>[d(u,{class:"menu-button-icon"},{default:f(()=>e[0]||(e[0]=[N(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:f(()=>[d(g,null,{default:f(()=>[(R(!0),W(Z,null,te(D.items,(b,P)=>(R(),W(Z,null,[b.divider?(R(),U(h,{key:P+"-divider"})):b.subMenu&&b.subMenu.length>0?(R(),W("div",{key:P+"-submenu"},[(R(),U(p,{"open-on-hover":"",location:"right",key:P},{activator:f(({props:k})=>[(R(),U(w,K({ref_for:!0},k,{disabled:b.disabled,key:P}),Se({append:f(()=>[d(u,null,{default:f(()=>e[1]||(e[1]=[N(" mdi-chevron-right ")])),_:1})]),default:f(()=>[!b.radio&&!b.checkbox?(R(),U(_,{key:0,style:Ee("cursor: pointer;"+(b.disabled?"opacity: 0.2":""))},{default:f(()=>[N(q(b.label),1)]),_:2},1032,["style"])):X("",!0)]),_:2},[b.icon?{name:"prepend",fn:f(()=>[d(u,{disabled:b.disabled},{default:f(()=>[N(q(b.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:f(()=>[d(g,null,{default:f(()=>[(R(!0),W(Z,null,te(b.subMenu,(k,L)=>(R(),U(w,{key:L,"prepend-icon":k.icon,onClick:ee=>r.subMenuClick(k)},{default:f(()=>[d(_,null,{default:f(()=>[N(q(k.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):b.radioGroup?(R(),U(E,{"model-value":b.value,"onUpdate:modelValue":b.command,key:P+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:f(()=>[(R(!0),W(Z,null,te(b.choices,(k,L)=>(R(),U(w,{key:L+"-choice"},{default:f(()=>[d(S,{class:"list-action"},{default:f(()=>[d(m,{color:"secondary",label:k.label,value:k.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(R(),U(w,{onClick:k=>b.command(b),disabled:b.disabled,"data-test":r.formatDT(`${n.title} ${D.label} ${b.label}`),key:P+"-list"},Se({default:f(()=>[b.checkbox?(R(),U(S,{key:0,class:"list-action"},{default:f(()=>[d(C,{modelValue:b.checked,"onUpdate:modelValue":k=>b.checked=k,label:b.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):X("",!0),!b.radio&&!b.checkbox?(R(),U(_,{key:1,style:Ee("cursor: pointer;"+(b.disabled?"opacity: 0.2":""))},{default:f(()=>[N(q(b.label),1)]),_:2},1032,["style"])):X("",!0)]),_:2},[b.icon?{name:"prepend",fn:f(()=>[d(u,{icon:b.icon,disabled:b.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const qt=qe(Ft,[["render",Bt],["__scopeId","data-v-4d454b93"]]);var Ht=Object.defineProperty,zt=(t,e,n)=>e in t?Ht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wt=(t,e,n)=>zt(t,e+"",n);function Xe(t,e){return function(){return t.apply(e,arguments)}}const{toString:Kt}=Object.prototype,{getPrototypeOf:Oe}=Object,le=(t=>e=>{const n=Kt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),B=t=>(t=t.toLowerCase(),e=>le(e)===t),ce=t=>e=>typeof e===t,{isArray:Y}=Array,ne=ce("undefined");function $t(t){return t!==null&&!ne(t)&&t.constructor!==null&&!ne(t.constructor)&&V(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ye=B("ArrayBuffer");function Jt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ye(t.buffer),e}const Gt=ce("string"),V=ce("function"),Qe=ce("number"),ue=t=>t!==null&&typeof t=="object",Zt=t=>t===!0||t===!1,de=t=>{if(le(t)!=="object")return!1;const e=Oe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Xt=B("Date"),Yt=B("File"),Qt=B("Blob"),en=B("FileList"),tn=t=>ue(t)&&V(t.pipe),nn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||V(t.append)&&((e=le(t))==="formdata"||e==="object"&&V(t.toString)&&t.toString()==="[object FormData]"))},sn=B("URLSearchParams"),[rn,on,an,ln]=["ReadableStream","Request","Response","Headers"].map(B),cn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,s;if(typeof t!="object"&&(t=[t]),Y(t))for(i=0,s=t.length;i<s;i++)e.call(null,t[i],i,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),o=r.length;let l;for(i=0;i<o;i++)l=r[i],e.call(null,t[l],l,t)}}function et(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,s;for(;i-- >0;)if(s=n[i],e===s.toLowerCase())return s;return null}const $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tt=t=>!ne(t)&&t!==$;function xe(){const{caseless:t}=tt(this)&&this||{},e={},n=(i,s)=>{const r=t&&et(e,s)||s;de(e[r])&&de(i)?e[r]=xe(e[r],i):de(i)?e[r]=xe({},i):Y(i)?e[r]=i.slice():e[r]=i};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&ie(arguments[i],n);return e}const un=(t,e,n,{allOwnKeys:i}={})=>(ie(e,(s,r)=>{n&&V(s)?t[r]=Xe(s,n):t[r]=s},{allOwnKeys:i}),t),dn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),fn=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},hn=(t,e,n,i)=>{let s,r,o;const l={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),r=s.length;r-- >0;)o=s[r],(!i||i(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=n!==!1&&Oe(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},mn=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},pn=t=>{if(!t)return null;if(Y(t))return t;let e=t.length;if(!Qe(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},gn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Oe(Uint8Array)),_n=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},bn=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},yn=B("HTMLFormElement"),wn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),nt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Tn=B("RegExp"),it=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};ie(n,(s,r)=>{let o;(o=e(s,r,t))!==!1&&(i[r]=o||s)}),Object.defineProperties(t,i)},vn=t=>{it(t,(e,n)=>{if(V(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(V(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Sn=(t,e)=>{const n={},i=s=>{s.forEach(r=>{n[r]=!0})};return Y(t)?i(t):i(String(t).split(e)),n},En=()=>{},Cn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Re="abcdefghijklmnopqrstuvwxyz",st="0123456789",rt={DIGIT:st,ALPHA:Re,ALPHA_DIGIT:Re+Re.toUpperCase()+st},On=(t=16,e=rt.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n};function xn(t){return!!(t&&V(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Rn=t=>{const e=new Array(10),n=(i,s)=>{if(ue(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[s]=i;const r=Y(i)?[]:{};return ie(i,(o,l)=>{const u=n(o,s+1);!ne(u)&&(r[l]=u)}),e[s]=void 0,r}}return i};return n(t,0)},An=B("AsyncFunction"),Dn=t=>t&&(ue(t)||V(t))&&V(t.then)&&V(t.catch),ot=((t,e)=>t?setImmediate:e?((n,i)=>($.addEventListener("message",({source:s,data:r})=>{s===$&&r===n&&i.length&&i.shift()()},!1),s=>{i.push(s),$.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",V($.postMessage)),kn=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||ot,a={isArray:Y,isArrayBuffer:Ye,isBuffer:$t,isFormData:nn,isArrayBufferView:Jt,isString:Gt,isNumber:Qe,isBoolean:Zt,isObject:ue,isPlainObject:de,isReadableStream:rn,isRequest:on,isResponse:an,isHeaders:ln,isUndefined:ne,isDate:Xt,isFile:Yt,isBlob:Qt,isRegExp:Tn,isFunction:V,isStream:tn,isURLSearchParams:sn,isTypedArray:gn,isFileList:en,forEach:ie,merge:xe,extend:un,trim:cn,stripBOM:dn,inherits:fn,toFlatObject:hn,kindOf:le,kindOfTest:B,endsWith:mn,toArray:pn,forEachEntry:_n,matchAll:bn,isHTMLForm:yn,hasOwnProperty:nt,hasOwnProp:nt,reduceDescriptors:it,freezeMethods:vn,toObjectSet:Sn,toCamelCase:wn,noop:En,toFiniteNumber:Cn,findKey:et,global:$,isContextDefined:tt,ALPHABET:rt,generateString:On,isSpecCompliantForm:xn,toJSONObject:Rn,isAsyncFn:An,isThenable:Dn,setImmediate:ot,asap:kn};function T(t,e,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(T,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const at=T.prototype,lt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{lt[t]={value:t}}),Object.defineProperties(T,lt),Object.defineProperty(at,"isAxiosError",{value:!0}),T.from=(t,e,n,i,s,r)=>{const o=Object.create(at);return a.toFlatObject(t,o,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),T.call(o,t.message,e,n,i,s),o.cause=t,o.name=t.name,r&&Object.assign(o,r),o};const Nn=null;function Ae(t){return a.isPlainObject(t)||a.isArray(t)}function ct(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function ut(t,e,n){return t?t.concat(e).map(function(i,s){return i=ct(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function Pn(t){return a.isArray(t)&&!t.some(Ae)}const jn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function fe(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,p){return!a.isUndefined(p[g])});const i=n.metaTokens,s=n.visitor||c,r=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(a.isDate(g))return g.toISOString();if(!l&&a.isBlob(g))throw new T("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(g)||a.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,p,m){let S=g;if(g&&!m&&typeof g=="object"){if(a.endsWith(p,"{}"))p=i?p:p.slice(0,-2),g=JSON.stringify(g);else if(a.isArray(g)&&Pn(g)||(a.isFileList(g)||a.endsWith(p,"[]"))&&(S=a.toArray(g)))return p=ct(p),S.forEach(function(E,C){!(a.isUndefined(E)||E===null)&&e.append(o===!0?ut([p],C,r):o===null?p:p+"[]",u(E))}),!1}return Ae(g)?!0:(e.append(ut(m,p,r),u(g)),!1)}const h=[],_=Object.assign(jn,{defaultVisitor:c,convertValue:u,isVisitable:Ae});function w(g,p){if(!a.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(g),a.forEach(g,function(m,S){(!(a.isUndefined(m)||m===null)&&s.call(e,m,a.isString(S)?S.trim():S,p,_))===!0&&w(m,p?p.concat(S):[S])}),h.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return w(t),e}function dt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function De(t,e){this._pairs=[],t&&fe(t,this,e)}const ft=De.prototype;ft.append=function(t,e){this._pairs.push([t,e])},ft.toString=function(t){const e=t?function(n){return t.call(this,n,dt)}:dt;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Un(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ht(t,e,n){if(!e)return t;const i=n&&n.encode||Un;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let r;if(s?r=s(e,n):r=a.isURLSearchParams(e)?e.toString():new De(e,n).toString(i),r){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+r}return t}class mt{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(n){n!==null&&e(n)})}}const pt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mn=typeof URLSearchParams<"u"?URLSearchParams:De,In=typeof FormData<"u"?FormData:null,Vn=typeof Blob<"u"?Blob:null,Fn={isBrowser:!0,classes:{URLSearchParams:Mn,FormData:In,Blob:Vn},protocols:["http","https","file","blob","url","data"]},ke=typeof window<"u"&&typeof document<"u",Ne=typeof navigator=="object"&&navigator||void 0,Ln=ke&&(!Ne||["ReactNative","NativeScript","NS"].indexOf(Ne.product)<0),Bn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qn=ke&&window.location.href||"http://localhost",Hn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ke,hasStandardBrowserEnv:Ln,hasStandardBrowserWebWorkerEnv:Bn,navigator:Ne,origin:qn},Symbol.toStringTag,{value:"Module"})),j={...Hn,...Fn};function zn(t,e){return fe(t,new j.classes.URLSearchParams,Object.assign({visitor:function(n,i,s,r){return j.isNode&&a.isBuffer(n)?(this.append(i,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function Wn(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Kn(t){const e={},n=Object.keys(t);let i;const s=n.length;let r;for(i=0;i<s;i++)r=n[i],e[r]=t[r];return e}function gt(t){function e(n,i,s,r){let o=n[r++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),u=r>=n.length;return o=!o&&a.isArray(s)?s.length:o,u?(a.hasOwnProp(s,o)?s[o]=[s[o],i]:s[o]=i,!l):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),e(n,i,s[o],r)&&a.isArray(s[o])&&(s[o]=Kn(s[o])),!l)}if(a.isFormData(t)&&a.isFunction(t.entries)){const n={};return a.forEachEntry(t,(i,s)=>{e(Wn(i),s,n,0)}),n}return null}function $n(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(0,JSON.stringify)(t)}const se={transitional:pt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,s=a.isObject(t);if(s&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return i?JSON.stringify(gt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let r;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return zn(t,this.formSerializer).toString();if((r=a.isFileList(t))||n.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return fe(r?{"files[]":t}:t,o&&new o,this.formSerializer)}}return s||i?(e.setContentType("application/json",!1),$n(t)):t}],transformResponse:[function(t){const e=this.transitional||se.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(n&&!this.responseType||i)){const s=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(r){if(s)throw r.name==="SyntaxError"?T.from(r,T.ERR_BAD_RESPONSE,this,null,this.response):r}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:j.classes.FormData,Blob:j.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{se.headers[t]={}});const Jn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gn=t=>{const e={};let n,i,s;return t&&t.split(`
|
3
|
+
`).forEach(function(r){s=r.indexOf(":"),n=r.substring(0,s).trim().toLowerCase(),i=r.substring(s+1).trim(),!(!n||e[n]&&Jn[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},_t=Symbol("internals");function re(t){return t&&String(t).trim().toLowerCase()}function he(t){return t===!1||t==null?t:a.isArray(t)?t.map(he):String(t)}function Zn(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const Xn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Pe(t,e,n,i,s){if(a.isFunction(i))return i.call(this,e,n);if(s&&(e=n),!!a.isString(e)){if(a.isString(i))return e.indexOf(i)!==-1;if(a.isRegExp(i))return i.test(e)}}function Yn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function Qn(t,e){const n=a.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(s,r,o){return this[i].call(this,e,s,r,o)},configurable:!0})})}class M{constructor(e){e&&this.set(e)}set(e,n,i){const s=this;function r(l,u,c){const h=re(u);if(!h)throw new Error("header name must be a non-empty string");const _=a.findKey(s,h);(!_||s[_]===void 0||c===!0||c===void 0&&s[_]!==!1)&&(s[_||u]=he(l))}const o=(l,u)=>a.forEach(l,(c,h)=>r(c,h,u));if(a.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(a.isString(e)&&(e=e.trim())&&!Xn(e))o(Gn(e),n);else if(a.isHeaders(e))for(const[l,u]of e.entries())r(u,l,i);else e!=null&&r(n,e,i);return this}get(e,n){if(e=re(e),e){const i=a.findKey(this,e);if(i){const s=this[i];if(!n)return s;if(n===!0)return Zn(s);if(a.isFunction(n))return n.call(this,s,i);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=re(e),e){const i=a.findKey(this,e);return!!(i&&this[i]!==void 0&&(!n||Pe(this,this[i],i,n)))}return!1}delete(e,n){const i=this;let s=!1;function r(o){if(o=re(o),o){const l=a.findKey(i,o);l&&(!n||Pe(i,i[l],l,n))&&(delete i[l],s=!0)}}return a.isArray(e)?e.forEach(r):r(e),s}clear(e){const n=Object.keys(this);let i=n.length,s=!1;for(;i--;){const r=n[i];(!e||Pe(this,this[r],r,e,!0))&&(delete this[r],s=!0)}return s}normalize(e){const n=this,i={};return a.forEach(this,(s,r)=>{const o=a.findKey(i,r);if(o){n[o]=he(s),delete n[r];return}const l=e?Yn(r):String(r).trim();l!==r&&delete n[r],n[l]=he(s),i[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return a.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=e&&a.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
4
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(s=>i.set(s)),i}static accessor(e){const n=(this[_t]=this[_t]={accessors:{}}).accessors,i=this.prototype;function s(r){const o=re(r);n[o]||(Qn(i,r),n[o]=!0)}return a.isArray(e)?e.forEach(s):s(e),this}}M.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(M.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}}),a.freezeMethods(M);function je(t,e){const n=this||se,i=e||n,s=M.from(i.headers);let r=i.data;return a.forEach(t,function(o){r=o.call(n,r,s.normalize(),e?e.status:void 0)}),s.normalize(),r}function bt(t){return!!(t&&t.__CANCEL__)}function Q(t,e,n){T.call(this,t??"canceled",T.ERR_CANCELED,e,n),this.name="CanceledError"}a.inherits(Q,T,{__CANCEL__:!0});function yt(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new T("Request failed with status code "+n.status,[T.ERR_BAD_REQUEST,T.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ei(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ti(t,e){t=t||10;const n=new Array(t),i=new Array(t);let s=0,r=0,o;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=i[r];o||(o=u),n[s]=l,i[s]=u;let h=r,_=0;for(;h!==s;)_+=n[h++],h=h%t;if(s=(s+1)%t,s===r&&(r=(r+1)%t),u-o<e)return;const w=c&&u-c;return w?Math.round(_*1e3/w):void 0}}function ni(t,e){let n=0,i=1e3/e,s,r;const o=(l,u=Date.now())=>{n=u,s=null,r&&(clearTimeout(r),r=null),t.apply(null,l)};return[(...l)=>{const u=Date.now(),c=u-n;c>=i?o(l,u):(s=l,r||(r=setTimeout(()=>{r=null,o(s)},i-c)))},()=>s&&o(s)]}const me=(t,e,n=3)=>{let i=0;const s=ti(50,250);return ni(r=>{const o=r.loaded,l=r.lengthComputable?r.total:void 0,u=o-i,c=s(u),h=o<=l;i=o;const _={loaded:o,total:l,progress:l?o/l:void 0,bytes:u,rate:c||void 0,estimated:c&&l&&h?(l-o)/c:void 0,event:r,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(_)},n)},wt=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Tt=t=>(...e)=>a.asap(()=>t(...e)),ii=j.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,j.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(j.origin),j.navigator&&/(msie|trident)/i.test(j.navigator.userAgent)):()=>!0,si=j.hasStandardBrowserEnv?{write(t,e,n,i,s,r){const o=[t+"="+encodeURIComponent(e)];a.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),a.isString(i)&&o.push("path="+i),a.isString(s)&&o.push("domain="+s),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ri(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function oi(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function vt(t,e){return t&&!ri(e)?oi(t,e):e}const St=t=>t instanceof M?{...t}:t;function J(t,e){e=e||{};const n={};function i(c,h,_,w){return a.isPlainObject(c)&&a.isPlainObject(h)?a.merge.call({caseless:w},c,h):a.isPlainObject(h)?a.merge({},h):a.isArray(h)?h.slice():h}function s(c,h,_,w){if(a.isUndefined(h)){if(!a.isUndefined(c))return i(void 0,c,_,w)}else return i(c,h,_,w)}function r(c,h){if(!a.isUndefined(h))return i(void 0,h)}function o(c,h){if(a.isUndefined(h)){if(!a.isUndefined(c))return i(void 0,c)}else return i(void 0,h)}function l(c,h,_){if(_ in e)return i(c,h);if(_ in t)return i(void 0,c)}const u={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(c,h,_)=>s(St(c),St(h),_,!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(c){const h=u[c]||s,_=h(t[c],e[c],c);a.isUndefined(_)&&h!==l||(n[c]=_)}),n}const Et=t=>{const e=J({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:r,headers:o,auth:l}=e;e.headers=o=M.from(o),e.url=ht(vt(e.baseURL,e.url),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(a.isFormData(n)){if(j.hasStandardBrowserEnv||j.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[c,...h]=u?u.split(";").map(_=>_.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...h].join("; "))}}if(j.hasStandardBrowserEnv&&(i&&a.isFunction(i)&&(i=i(e)),i||i!==!1&&ii(e.url))){const c=s&&r&&si.read(r);c&&o.set(s,c)}return e},ai=typeof XMLHttpRequest<"u",li=ai&&function(t){return new Promise(function(e,n){const i=Et(t);let s=i.data;const r=M.from(i.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:u}=i,c,h,_,w,g;function p(){w&&w(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function S(){if(!m)return;const C=M.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),D={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:C,config:t,request:m};yt(function(F){e(F),p()},function(F){n(F),p()},D),m=null}"onloadend"in m?m.onloadend=S:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(S)},m.onabort=function(){m&&(n(new T("Request aborted",T.ECONNABORTED,t,m)),m=null)},m.onerror=function(){n(new T("Network Error",T.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const D=i.transitional||pt;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),n(new T(C,D.clarifyTimeoutError?T.ETIMEDOUT:T.ECONNABORTED,t,m)),m=null},s===void 0&&r.setContentType(null),"setRequestHeader"in m&&a.forEach(r.toJSON(),function(C,D){m.setRequestHeader(D,C)}),a.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),o&&o!=="json"&&(m.responseType=i.responseType),u&&([_,g]=me(u,!0),m.addEventListener("progress",_)),l&&m.upload&&([h,w]=me(l),m.upload.addEventListener("progress",h),m.upload.addEventListener("loadend",w)),(i.cancelToken||i.signal)&&(c=C=>{m&&(n(!C||C.type?new Q(null,t,m):C),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const E=ei(i.url);if(E&&j.protocols.indexOf(E)===-1){n(new T("Unsupported protocol "+E+":",T.ERR_BAD_REQUEST,t));return}m.send(s||null)})},ci=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,s;const r=function(c){if(!s){s=!0,l();const h=c instanceof Error?c:this.reason;i.abort(h instanceof T?h:new Q(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,r(new T(`timeout ${e} of ms exceeded`,T.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),t=null)};t.forEach(c=>c.addEventListener("abort",r));const{signal:u}=i;return u.unsubscribe=()=>a.asap(l),u}},ui=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,s;for(;i<n;)s=i+e,yield t.slice(i,s),i=s},di=async function*(t,e){for await(const n of fi(t))yield*ui(n,e)},fi=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},Ct=(t,e,n,i)=>{const s=di(t,e);let r=0,o,l=u=>{o||(o=!0,i&&i(u))};return new ReadableStream({async pull(u){try{const{done:c,value:h}=await s.next();if(c){l(),u.close();return}let _=h.byteLength;if(n){let w=r+=_;n(w)}u.enqueue(new Uint8Array(h))}catch(c){throw l(c),c}},cancel(u){return l(u),s.return()}},{highWaterMark:2})},pe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ot=pe&&typeof ReadableStream=="function",hi=pe&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),xt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},mi=Ot&&xt(()=>{let t=!1;const e=new Request(j.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Rt=64*1024,Ue=Ot&&xt(()=>a.isReadableStream(new Response("").body)),ge={stream:Ue&&(t=>t.body)};pe&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ge[e]&&(ge[e]=a.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new T(`Response type '${e}' is not supported`,T.ERR_NOT_SUPPORT,i)})})})(new Response);const pi=async t=>{if(t==null)return 0;if(a.isBlob(t))return t.size;if(a.isSpecCompliantForm(t))return(await new Request(j.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(a.isArrayBufferView(t)||a.isArrayBuffer(t))return t.byteLength;if(a.isURLSearchParams(t)&&(t=t+""),a.isString(t))return(await hi(t)).byteLength},gi=async(t,e)=>a.toFiniteNumber(t.getContentLength())??pi(e),_i=pe&&(async t=>{let{url:e,method:n,data:i,signal:s,cancelToken:r,timeout:o,onDownloadProgress:l,onUploadProgress:u,responseType:c,headers:h,withCredentials:_="same-origin",fetchOptions:w}=Et(t);c=c?(c+"").toLowerCase():"text";let g=ci([s,r&&r.toAbortSignal()],o),p;const m=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let S;try{if(u&&mi&&n!=="get"&&n!=="head"&&(S=await gi(h,i))!==0){let b=new Request(e,{method:"POST",body:i,duplex:"half"}),P;if(a.isFormData(i)&&(P=b.headers.get("content-type"))&&h.setContentType(P),b.body){const[k,L]=wt(S,me(Tt(u)));i=Ct(b.body,Rt,k,L)}}a.isString(_)||(_=_?"include":"omit");const E="credentials"in Request.prototype;p=new Request(e,{...w,signal:g,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:i,duplex:"half",credentials:E?_:void 0});let C=await fetch(p);const D=Ue&&(c==="stream"||c==="response");if(Ue&&(l||D&&m)){const b={};["status","statusText","headers"].forEach(ee=>{b[ee]=C[ee]});const P=a.toFiniteNumber(C.headers.get("content-length")),[k,L]=l&&wt(P,me(Tt(l),!0))||[];C=new Response(Ct(C.body,Rt,k,()=>{L&&L(),m&&m()}),b)}c=c||"text";let F=await ge[a.findKey(ge,c)||"text"](C,t);return!D&&m&&m(),await new Promise((b,P)=>{yt(b,P,{data:F,headers:M.from(C.headers),status:C.status,statusText:C.statusText,config:t,request:p})})}catch(E){throw m&&m(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new T("Network Error",T.ERR_NETWORK,t,p),{cause:E.cause||E}):T.from(E,E&&E.code,t,p)}}),Me={http:Nn,xhr:li,fetch:_i};a.forEach(Me,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const At=t=>`- ${t}`,bi=t=>a.isFunction(t)||t===null||t===!1,Dt={getAdapter:t=>{t=a.isArray(t)?t:[t];const{length:e}=t;let n,i;const s={};for(let r=0;r<e;r++){n=t[r];let o;if(i=n,!bi(n)&&(i=Me[(o=String(n)).toLowerCase()],i===void 0))throw new T(`Unknown adapter '${o}'`);if(i)break;s[o||"#"+r]=i}if(!i){const r=Object.entries(s).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=e?r.length>1?`since :
|
5
|
+
`+r.map(At).join(`
|
6
|
+
`):" "+At(r[0]):"as no adapter specified";throw new T("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:Me};function Ie(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Q(null,t)}function kt(t){return Ie(t),t.headers=M.from(t.headers),t.data=je.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Dt.getAdapter(t.adapter||se.adapter)(t).then(function(e){return Ie(t),e.data=je.call(t,t.transformResponse,e),e.headers=M.from(e.headers),e},function(e){return bt(e)||(Ie(t),e&&e.response&&(e.response.data=je.call(t,t.transformResponse,e.response),e.response.headers=M.from(e.response.headers))),Promise.reject(e)})}const Nt="1.7.9",_e={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{_e[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Pt={};_e.transitional=function(t,e,n){function i(s,r){return"[Axios v"+Nt+"] Transitional option '"+s+"'"+r+(n?". "+n:"")}return(s,r,o)=>{if(t===!1)throw new T(i(r," has been removed"+(e?" in "+e:"")),T.ERR_DEPRECATED);return e&&!Pt[r]&&(Pt[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(s,r,o):!0}},_e.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function yi(t,e,n){if(typeof t!="object")throw new T("options must be an object",T.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let s=i.length;for(;s-- >0;){const r=i[s],o=e[r];if(o){const l=t[r],u=l===void 0||o(l,r,t);if(u!==!0)throw new T("option "+r+" must be "+u,T.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new T("Unknown option "+r,T.ERR_BAD_OPTION)}}const be={assertOptions:yi,validators:_e},H=be.validators;class G{constructor(e){this.defaults=e,this.interceptors={request:new mt,response:new mt}}async request(e,n){try{return await this._request(e,n)}catch(i){if(i instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const r=s.stack?s.stack.replace(/^.+\n/,""):"";try{i.stack?r&&!String(i.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
7
|
+
`+r):i.stack=r}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=J(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:r}=n;i!==void 0&&be.assertOptions(i,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:be.assertOptions(s,{encode:H.function,serialize:H.function},!0)),be.assertOptions(n,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=r&&a.merge(r.common,r[n.method]);r&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),n.headers=M.concat(o,r);const l=[];let u=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(u=u&&p.synchronous,l.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let h,_=0,w;if(!u){const p=[kt.bind(this),void 0];for(p.unshift.apply(p,l),p.push.apply(p,c),w=p.length,h=Promise.resolve(n);_<w;)h=h.then(p[_++],p[_++]);return h}w=l.length;let g=n;for(_=0;_<w;){const p=l[_++],m=l[_++];try{g=p(g)}catch(S){m.call(this,S);break}}try{h=kt.call(this,g)}catch(p){return Promise.reject(p)}for(_=0,w=c.length;_<w;)h=h.then(c[_++],c[_++]);return h}getUri(e){e=J(this.defaults,e);const n=vt(e.baseURL,e.url);return ht(n,e.params,e.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){G.prototype[t]=function(e,n){return this.request(J(n||{},{method:t,url:e,data:(n||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function e(n){return function(i,s,r){return this.request(J(r||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}G.prototype[t]=e(),G.prototype[t+"Form"]=e(!0)});class Ve{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const i=this;this.promise.then(s=>{if(!i._listeners)return;let r=i._listeners.length;for(;r-- >0;)i._listeners[r](s);i._listeners=null}),this.promise.then=s=>{let r;const o=new Promise(l=>{i.subscribe(l),r=l}).then(s);return o.cancel=function(){i.unsubscribe(r)},o},e(function(s,r,o){i.reason||(i.reason=new Q(s,r,o),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Ve(function(n){e=n}),cancel:e}}}function wi(t){return function(e){return t.apply(null,e)}}function Ti(t){return a.isObject(t)&&t.isAxiosError===!0}const Fe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fe).forEach(([t,e])=>{Fe[e]=t});function jt(t){const e=new G(t),n=Xe(G.prototype.request,e);return a.extend(n,G.prototype,e,{allOwnKeys:!0}),a.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return jt(J(t,i))},n}const A=jt(se);A.Axios=G,A.CanceledError=Q,A.CancelToken=Ve,A.isCancel=bt,A.VERSION=Nt,A.toFormData=fe,A.AxiosError=T,A.Cancel=A.CanceledError,A.all=function(t){return Promise.all(t)},A.spread=wi,A.isAxiosError=Ti,A.mergeConfig=J,A.AxiosHeaders=M,A.formToJSON=t=>gt(a.isHTMLForm(t)?new FormData(t):t),A.getAdapter=Dt.getAdapter,A.HttpStatusCode=Fe,A.default=A;const Ut=A.create({baseURL:location.origin,timeout:6e4,params:{}});Ut.interceptors.response.use(t=>t,t=>{var e,n,i,s,r,o,l,u,c,h,_;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(p){p&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let w=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(w+=`${t.response.statusText} `),(i=(n=t.response)==null?void 0:n.config)!=null&&i.data&&(w+=`${t.response.config.data} `),(r=(s=t.response)==null?void 0:s.data)!=null&&r.message?w+=`${t.response.data.message}`:(l=(o=t.response)==null?void 0:o.data)!=null&&l.exception?w+=`${t.response.data.exception}`:(h=(c=(u=t.response)==null?void 0:u.data)==null?void 0:c.error)!=null&&h.message?(t.response.data.error.class&&(w+=`${t.response.data.error.class} `),w+=`${t.response.data.error.message}`):w+=`${(_=t.response)==null?void 0:_.data}`;const{$cosmosNotify:g}=window;throw g&&g.serious({title:"Network error",body:w}),t}else throw t});var ye={logger:typeof console<"u"?console:void 0,WebSocket:typeof WebSocket<"u"?WebSocket:void 0},x={log(...t){this.enabled&&(t.push(Date.now()),ye.logger.log("[ActionCable]",...t))}};const oe=()=>new Date().getTime(),we=t=>(oe()-t)/1e3;class Te{constructor(e){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=e,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=oe(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),x.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=oe(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),x.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=oe()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,x.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=oe(),x.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout(()=>{this.reconnectIfStale(),this.poll()},this.getPollInterval())}getPollInterval(){const{staleThreshold:e,reconnectionBackoffRate:n}=this.constructor,i=Math.pow(1+n,Math.min(this.reconnectAttempts,10)),s=(this.reconnectAttempts===0?1:n)*Math.random();return e*1e3*i*(1+s)}reconnectIfStale(){this.connectionIsStale()&&(x.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${we(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?x.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${we(this.disconnectedAt)} s`):(x.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return we(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&we(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){document.visibilityState==="visible"&&setTimeout(()=>{(this.connectionIsStale()||!this.connection.isOpen())&&(x.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())},200)}}Te.staleThreshold=6,Te.reconnectionBackoffRate=.15;var Mt={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart",remote:"remote"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:ae,protocols:Le}=Mt,vi=Le.slice(0,Le.length-1),It=[].indexOf;class Be{constructor(e){this.open=this.open.bind(this),this.consumer=e,this.subscriptions=this.consumer.subscriptions,this.monitor=new Te(this),this.disconnected=!0}send(e){return this.isOpen()?(this.webSocket.send(JSON.stringify(e)),!0):!1}open(){if(this.isActive())return x.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1;{const e=[...Le,...this.consumer.subprotocols||[]];return x.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${e}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new ye.WebSocket(this.consumer.url,e),this.installEventHandlers(),this.monitor.start(),!0}}close({allowReconnect:e}={allowReconnect:!0}){if(e||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(x.log(`Reopening WebSocket, current state is ${this.getState()}`),this.isActive())try{return this.close()}catch(e){x.log("Failed to reopen WebSocket",e)}finally{x.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}else return this.open()}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}triedToReconnect(){return this.monitor.reconnectAttempts>0}isProtocolSupported(){return It.call(vi,this.getProtocol())>=0}isState(...e){return It.call(e,this.getState())>=0}getState(){if(this.webSocket){for(let e in ye.WebSocket)if(ye.WebSocket[e]===this.webSocket.readyState)return e.toLowerCase()}return null}installEventHandlers(){for(let e in this.events){const n=this.events[e].bind(this);this.webSocket[`on${e}`]=n}}uninstallEventHandlers(){for(let e in this.events)this.webSocket[`on${e}`]=function(){}}}Be.reopenDelay=500,Be.prototype.events={message(t){if(!this.isProtocolSupported())return;const{identifier:e,message:n,reason:i,reconnect:s,type:r}=JSON.parse(t.data);switch(r){case ae.welcome:return this.triedToReconnect()&&(this.reconnectAttempted=!0),this.monitor.recordConnect(),this.subscriptions.reload();case ae.disconnect:return x.log(`Disconnecting. Reason: ${i}`),this.close({allowReconnect:s});case ae.ping:return this.monitor.recordPing();case ae.confirmation:return this.subscriptions.confirmSubscription(e),this.reconnectAttempted?(this.reconnectAttempted=!1,this.subscriptions.notify(e,"connected",{reconnected:!0})):this.subscriptions.notify(e,"connected",{reconnected:!1});case ae.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",n)}},open(){if(x.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return x.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(t){if(x.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){x.log("WebSocket onerror event")}};const Si=function(t,e){if(e!=null)for(let n in e){const i=e[n];t[n]=i}return t};class Ei{constructor(e,n={},i){this.consumer=e,this.identifier=JSON.stringify(n),Si(this,i)}perform(e,n={}){return n.action=e,this.send(n)}send(e){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(e)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class Ci{constructor(e){this.subscriptions=e,this.pendingSubscriptions=[]}guarantee(e){this.pendingSubscriptions.indexOf(e)==-1?(x.log(`SubscriptionGuarantor guaranteeing ${e.identifier}`),this.pendingSubscriptions.push(e)):x.log(`SubscriptionGuarantor already guaranteeing ${e.identifier}`),this.startGuaranteeing()}forget(e){x.log(`SubscriptionGuarantor forgetting ${e.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter(n=>n!==e)}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout(()=>{this.subscriptions&&typeof this.subscriptions.subscribe=="function"&&this.pendingSubscriptions.map(e=>{x.log(`SubscriptionGuarantor resubscribing ${e.identifier}`),this.subscriptions.subscribe(e)})},500)}}class Oi{constructor(e){this.consumer=e,this.guarantor=new Ci(this),this.subscriptions=[]}create(e,n){const i=e,s=typeof i=="object"?i:{channel:i},r=new Ei(this.consumer,s,n);return this.add(r)}add(e){return this.subscriptions.push(e),this.consumer.ensureActiveConnection(),this.notify(e,"initialized"),this.subscribe(e),e}remove(e){return this.forget(e),this.findAll(e.identifier).length||this.sendCommand(e,"unsubscribe"),e}reject(e){return this.findAll(e).map(n=>(this.forget(n),this.notify(n,"rejected"),n))}forget(e){return this.guarantor.forget(e),this.subscriptions=this.subscriptions.filter(n=>n!==e),e}findAll(e){return this.subscriptions.filter(n=>n.identifier===e)}reload(){return this.subscriptions.map(e=>this.subscribe(e))}notifyAll(e,...n){return this.subscriptions.map(i=>this.notify(i,e,...n))}notify(e,n,...i){let s;return typeof e=="string"?s=this.findAll(e):s=[e],s.map(r=>typeof r[n]=="function"?r[n](...i):void 0)}subscribe(e){this.sendCommand(e,"subscribe")&&this.guarantor.guarantee(e)}confirmSubscription(e){x.log(`Subscription confirmed ${e}`),this.findAll(e).map(n=>this.guarantor.forget(n))}sendCommand(e,n){const{identifier:i}=e;return this.consumer.send({command:n,identifier:i})}}class xi{constructor(e){this._url=e,this.subscriptions=new Oi(this),this.connection=new Be(this),this.subprotocols=[]}get url(){return Ri(this._url)}send(e){return this.connection.send(e)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}addSubProtocol(e){this.subprotocols=[...this.subprotocols,e]}}function Ri(t){if(typeof t=="function"&&(t=t()),t&&!/^wss?:/i.test(t)){const e=document.createElement("a");return e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}else return t}function Ai(t=Di("url")||Mt.default_mount_path){return new xi(t)}function Di(t){const e=document.head.querySelector(`meta[name='action-cable-${t}']`);if(e)return e.getAttribute("content")}Te.staleThreshold=10;class ki{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&this._cable.disconnect()}createSubscription(e,n,i={},s={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(r=>{if(r&&OpenC3Auth.setTokens(),this._cable==null){let o=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);this._cable=Ai(o)}return this._cable.subscriptions.create({channel:e,...s},i)})}recordPing(){this._cable.connection.monitor.recordPing()}}class Ni{constructor(){Wt(this,"id",1)}async exec(e,n,i={},s={},r=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return i.scope=window.openc3Scope,s.manual=!0,(await Ut.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:i},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...s},timeout:r})).data.result}catch(o){let l=new Error;throw o.response?(l.name=o.response.data.error.data.class,l.message=o.response.data.error.data.message,l.object=o.response.data.error):o.request?(l.name="Request error",l.message="Request error, no response received"):l.name="Unknown error",l}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")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,...i){return this.exec("interface_cmd",[e,n,...i])}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_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,n,i){return this.exec("get_item",[e,n,i])}get_param(e,n,i){return this.exec("get_param",[e,n,i])}get_parameter(e,n,i){return this.exec("get_param",[e,n,i])}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_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[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_tlm_names",[e])}async get_tlm_packet(e,n,i,s=30){const r=await this.exec("get_tlm_packet",[e,n],{type:i,stale_time:s});if(r!=null){let o=r.length,l=null;for(let u=0;u<o;u++)l=this.decode_openc3_type(r[u][1]),l!==null&&(r[u][1]=l)}return r}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,i=null){let s={stale_time:n};i!==null&&(s.cache_timeout=i);const r=await this.exec("get_tlm_values",[e],s,{},1e4);let o=r[0].length,l=null;for(let u=0;u<o;u++)l=this.decode_openc3_type(r[0][u]),l!==null&&(r[0][u]=l);return r}get_limits(e,n,i){return this.exec("get_limits",[e,n,i])}async tlm(e,n,i,s="CONVERTED"){let r=null;if(n===void 0)r=await this.exec("tlm",[e]);else if(i===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))r=await this.exec("tlm",[e],{type:n});else{let l=new Error;throw l.name="TypeError",l.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,l}else r=await this.exec("tlm",[e,n,i],{type:s});let o=this.decode_openc3_type(r);return o!==null&&(r=o),r}async inject_tlm(e,n,i=null,s="CONVERTED"){data=await this.exec("inject_tlm",[e,n,i],{type:s})}set_tlm(e,n,i,s){return this.exec("set_tlm",[e,n,i],{type:s})}override_tlm(e,n,i,s){return this.exec("override_tlm",[e,n,i],{type:s})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,i,s){return this.exec("normalize_tlm",[e,n,i],{type:s})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[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_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,i,s="CONVERTED"){return this.exec("get_cmd_value",[e,n,i,s])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,i,s,r){let o=null;for(let l in s)Object.prototype.hasOwnProperty.call(s,l)&&(o=this.encode_openc3_type(s[l]),o!==null&&(s[l]=o));return this.exec(e,[n,i,s],{},r)}get_cmd_hazardous(e,n,i,s={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},s):this._cmd("get_cmd_hazardous",e,n,i,s)}cmd(e,n,i,s={}){return n===void 0?this.exec("cmd",e,{},s):this._cmd("cmd",e,n,i,s)}cmd_no_range_check(e,n,i,s={}){return n===void 0?this.exec("cmd_no_range_check",e,{},s):this._cmd("cmd_no_range_check",e,n,i,s)}cmd_raw(e,n,i,s={}){return n===void 0?this.exec("cmd_raw",e,{},s):this._cmd("cmd_raw",e,n,i,s)}cmd_raw_no_range_check(e,n,i,s={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},s):this._cmd("cmd_raw_no_range_check",e,n,i,s)}cmd_no_hazardous_check(e,n,i,s={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},s):this._cmd("cmd_no_hazardous_check",e,n,i,s)}cmd_no_checks(e,n,i,s={}){return n===void 0?this.exec("cmd_no_checks",e,{},s):this._cmd("cmd_no_checks",e,n,i,s)}cmd_raw_no_hazardous_check(e,n,i,s={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},s):this._cmd("cmd_raw_no_hazardous_check",e,n,i,s)}cmd_raw_no_checks(e,n,i,s={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},s):this._cmd("cmd_raw_no_checks",e,n,i,s)}build_cmd(e,n,i){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,i)}build_command(e,n,i){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,i)}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,i){return this.exec("save_config",[e,n,i])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,i){return this.exec("enable_limits",[e,n,i])}disable_limits(e,n,i){return this.exec("disable_limits",[e,n,i])}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("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(i);return Array.from(s).map(r=>r.toString(16).padStart(2,"0")).join("")}}}let ve=[];const Pi={components:{OpenConfigDialog:ze,SaveConfigDialog:We,TargetPacketItemChooser:Ke,TopBar:qt},mixins:[$e,Je],data(){return{title:"Data Extractor",configKey:"data_extractor",openConfig:!1,saveConfig:!1,api:null,timeZone:"local",progress:0,packetsReceived:0,totalPacketsReceived:0,itemsReceived:0,totalItemsReceived:0,processButtonText:"Process",todaysDate:null,startDate:null,startTime:null,endTime:null,endDate:null,startDateTime:null,endDateTime:null,startDateTimeFilename:"",rules:{required:t=>!!t||"Required"},cmdOrTlm:"tlm",items:[],search:"",headers:[{title:"Target",value:"targetName"},{title:"Packet",value:"packetName"},{title:"Item",value:"itemName"},{title:"Mode",value:"mode"},{title:"ValueType",value:"valueType"},{title:"ReducedType",value:"reducedType"},{title:"Edit",value:"edit"},{title:"Delete",value:"delete"}],itemsPerPage:20,columnMap:{},delimiter:",",columnMode:"normal",fileCount:0,skipIgnored:!0,fillDown:!1,matlabHeader:!1,uniqueOnly:!1,keyMap:{},modes:["DECOM","REDUCED_MINUTE","REDUCED_HOUR","REDUCED_DAY"],valueTypes:["CONVERTED","RAW","FORMATTED","WITH_UNITS"],reducedTypes:["SAMPLE","MIN","MAX","AVG","STDDEV"],editAll:!1,allItemMode:"DECOM",allItemValueType:"CONVERTED",allItemReducedType:"SAMPLE",cable:new ki,subscription:null}},watch:{delimiter:function(){this.saveDefaultConfig(this.currentConfig)},fillDown:function(){this.saveDefaultConfig(this.currentConfig)},matlabHeader:function(){this.saveDefaultConfig(this.currentConfig)},uniqueOnly:function(){this.saveDefaultConfig(this.currentConfig)},columnNode:function(){this.saveDefaultConfig(this.currentConfig)},cmdOrTlm:function(){this.items.length===0?this.saveDefaultConfig(this.currentConfig):this.items=[]},items:{handler:function(){this.saveDefaultConfig(this.currentConfig)},deep:!0},itemsPerPage:function(){this.saveDefaultConfig(this.currentConfig)}},computed:{menus:function(){return[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.resetConfig(),this.resetConfigBase()}},{divider:!0},{radioGroup:!0,value:this.delimiter,command:t=>{this.delimiter=t},choices:[{label:"Comma Delimited",value:","},{label:"Tab Delimited",value:" "}]}]},{label:"Mode",items:[{label:"Fill Down",checkbox:!0,checked:this.fillDown,command:()=>{this.fillDown=!this.fillDown}},{label:"Matlab Header",checkbox:!0,checked:this.matlabHeader,command:t=>{this.matlabHeader=!this.matlabHeader}},{label:"Unique Only",checkbox:!0,checked:this.uniqueOnly,command:t=>{this.uniqueOnly=!this.uniqueOnly}},{divider:!0},{radioGroup:!0,value:this.columnMode,command:t=>{this.columnMode=t},choices:[{label:"Normal Columns",value:"normal"},{label:"Full Column Names",value:"full"}]}]}]},currentConfig:function(){return{delimiter:this.delimiter,fillDown:this.fillDown,matlabHeader:this.matlabHeader,uniqueOnly:this.uniqueOnly,columnMode:this.columnMode,cmdOrTlm:this.cmdOrTlm,items:this.items,itemsPerPage:this.itemsPerPage}}},async created(){this.api=new Ni,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{});let t=new Date;this.todaysDate=this.formatDate(t,this.timeZone),this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone)},mounted:function(){if(this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(t)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{resetConfig:function(){this.delimiter=",",this.fillDown=!1,this.matlabHeader=!1,this.uniqueOnly=!1,this.columnMode="normal";let t=new Date;this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone),this.cmdOrTlm="tlm",this.items=[],this.itemsPerPage=20,this.applyConfig(this.currentConfig)},applyConfig:function(t){this.delimiter=t.delimiter||",",this.menus[0].radioGroup=this.delimiter===","?"Comma Delimited":"Tab Delimited",this.fillDown=t.fillDown,this.menus[1].items[0].checked=this.fillDown||!1,this.matlabHeader=t.matlabHeader,this.menus[1].items[1].checked=this.matlabHeader||!1,this.uniqueOnly=t.uniqueOnly,this.menus[1].items[2].checked=this.uniqueOnly||!1,this.columnMode=t.columnMode,this.menus[1].radioGroup=this.columnMode==="normal"?"Normal Columns":"Full Column Names",this.cmdOrTlm=t.cmdOrTlm,this.items=t.items,this.itemsPerPage=t.itemsPerPage},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,n=>{this.applyConfig(n),this.startDate=n.startDate,this.startTime=n.startTime,this.endTime=n.endTime,this.endDate=n.endDate,this.saveDefaultConfig(this.currentConfig)})},saveConfiguration:function(t){let e=this.currentConfig;e.startDate=this.startDate,e.startTime=this.startTime,e.endTime=this.endTime,e.endDate=this.endDate,this.saveConfigBase(t,e)},addItem:function(t){for(const e of this.items)if(e.itemName===t.itemName&&e.packetName===t.packetName&&e.targetName===t.targetName&&e.valueType==="CONVERTED"&&e.reducedType==="SAMPLE"&&e.mode==="DECOM"){this.$notify.caution({body:"This item has already been added!"});return}t.cmdOrTlm=this.cmdOrTlm.toUpperCase(),t.edit=!1,t.valueType="CONVERTED",t.reducedType="SAMPLE",t.mode="DECOM",this.items.push(t)},deleteItem:function(t){let e=this.items.indexOf(t);this.items.splice(e,1)},deleteAll:function(){this.items=[]},editAllItems:function(){this.editAll=!1;for(let t of this.items)t.mode=this.allItemMode,t.valueType=this.allItemValueType,t.reducedType=this.allItemReducedType},getItemLabel:function(t){let e=[`${t.targetName} - ${t.packetName} - ${t.itemName}`];return t.mode!=="DECOM"&&e.push(`{ ${t.mode} }`),t.valueType!=="CONVERTED"&&e.push(`( ${t.valueType} )`),t.reducedType!=="SAMPLE"&&e.push(`[ ${t.reducedType} ]`),e.join(" ")},setTimestamps:function(){this.startDateTimeFilename=this.startDate+"_"+this.startTime,this.startDateTimeFilename=this.startDateTimeFilename.replace(/(:|-|\.)\s*/g,"_");let t,e;try{this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime),e=new Date(this.endDate+" "+this.endTime)):(t=new Date(this.startDate+" "+this.startTime+"Z"),e=new Date(this.endDate+" "+this.endTime+"Z"),this.startDateTimeFilename+="_UTC")}catch{return}this.startDateTime=t.getTime()*1e6,this.endDateTime=e.getTime()*1e6},processItems:function(){if(this.processButtonText==="Cancel"){this.finished();return}if(this.setTimestamps(),!this.startDateTime||!this.endDateTime){this.$notify.caution({body:"Invalid date/time selected!"});return}if(this.startDateTime===this.endDateTime){this.$notify.caution({body:"Start date/time is equal to end date/time!"});return}if(this.endDateTime-this.startDateTime<0){this.$notify.caution({body:"Start date/time is greater then end date/time!"});return}new Date(this.endDateTime/1e6)>Date.now()&&this.$notify.caution({title:"Note",body:`End date/time is greater than current date/time. Data will
|
8
|
+
continue to stream in real-time until
|
9
|
+
${new Date(this.endDateTime/1e6).toISOString()} is reached.`}),this.progress=0,this.processButtonText="Cancel",this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>this.onConnected(),disconnected:()=>{this.$notify.caution({body:"OpenC3 backend connection disconnected."})},rejected:()=>{this.$notify.caution({body:"OpenC3 backend connection rejected."})}}).then(t=>{this.subscription=t})},resetAllVars:function(){this.fileCount=0,this.totalPacketsReceived=0,this.totalItemsReceived=0,this.columnHeaders=[],this.columnMap={},this.keyMap={},this.resetPerFileVars()},resetPerFileVars:function(){ve=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,n)=>{let i=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(i=i+"__"+e.reducedType);let s=String(n);this.keyMap[s]=i,t.push([i,s])}),OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(e=>{e&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t,start_time:this.startDateTime,end_time:this.endDateTime})})},received:function(t){if(this.cable.recordPing(),t.error){this.$notify.serious({body:t.error});return}if(this.packetsReceived+=t.length,this.totalPacketsReceived+=t.length,t.length>0){let e=new Set;for(let s of t){let r=Object.keys(s);r.forEach(e.add,e),this.itemsReceived+=r.length-2,this.totalItemsReceived+=r.length-2}e.delete("__type"),e.delete("__time"),this.buildHeaders([...e]),ve.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET")),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e];const[n,i,s,r,o,l,u]=e.split("__");let c=o;this.columnMode==="full"&&(c=s+" "+r+" "+o),n&&n!=="DECOM"&&(c=c+" {"+n+"}"),l&&l!=="CONVERTED"&&(c=c+" ("+l+")"),u&&(c=c+" ["+u+"]"),this.columnHeaders.push(c)})},createFile:async function(){let t=ve.flat(),e=this.columnHeaders,n=this.columnMap,i=[];this.resetPerFileVars();let s="";this.matlabHeader&&(s+="% "),s+=e.join(this.delimiter),i.push(s),await this.yieldToMain(),t.sort((g,p)=>g.__time-p.__time),await this.yieldToMain();let r=[],o=[],l=null,u=0;for(let g of t){let p=!1;this.fillDown&&l?o=[...l]:o=[];let m="";if(Object.keys(g).forEach(S=>{if(S.slice(0,2)==="__")return;m=S;let E=n[S];if(typeof g[S]=="object")if(g[S]===null)o[E]="";else if(Array.isArray(g[S]))o[E]='"['+g[S]+']"';else{let C=g[S].raw;if(Array.isArray(C)){let D="";C.forEach(F=>{D+=F.toString(16)}),o[E]=D}else o[E]="'"+C+"'"}else o[E]=g[S];this.uniqueOnly&&r[E]!==o[E]&&(p=!0),r[E]=o[E]}),this.fillDown&&(l=[...o]),!this.uniqueOnly||p){if(this.columnMode==="normal"){m=this.keyMap[m];const[S,E,C,D,F,b,P]=m.split("__");o[0]=new Date(g.__time/1e6).toISOString(),o[1]=C,o[2]=D}i.push(o.join(this.delimiter))}u+=1,u%1e3==0&&await this.yieldToMain()}let c=".csv",h="text/csv";this.delimiter===" "&&(c=".txt",h="text/tab-separated-values"),await this.yieldToMain();const _=new Blob([i.join(`
|
10
|
+
`)],{type:h});await this.yieldToMain();const w=document.createElement("a");w.href=URL.createObjectURL(_),w.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+c),w.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),ve.length!==0)await this.createFile();else if(this.fileCount===0){let t=new Date(this.startDateTime/1e6).toISOString(),e=new Date(this.endDateTime/1e6).toISOString();this.$notify.caution({body:`No data found for the items in the requested time range of ${t} to ${e}`})}this.progress=100,this.processButtonText="Process"}}};function ji(t,e,n,i,s,r){const o=v("top-bar"),l=v("v-text-field"),u=v("v-col"),c=v("v-row"),h=v("v-radio"),_=v("v-radio-group"),w=v("target-packet-item-chooser"),g=v("v-container"),p=v("v-progress-circular"),m=v("v-spacer"),S=v("v-btn"),E=v("v-tooltip"),C=v("v-toolbar"),D=v("v-card-title"),F=v("v-icon"),b=v("v-select"),P=v("v-card-text"),k=v("v-card-actions"),L=v("v-card"),ee=v("v-dialog"),Ui=v("v-data-table"),Mi=v("open-config-dialog"),Ii=v("save-config-dialog");return R(),W("div",null,[d(o,{menus:r.menus,title:s.title},null,8,["menus","title"]),d(L,null,{default:f(()=>[d(g,null,{default:f(()=>[d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(l,{modelValue:s.startDate,"onUpdate:modelValue":e[0]||(e[0]=y=>s.startDate=y),label:"Start Date",type:"date",max:s.todaysDate,rules:[s.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),d(u,null,{default:f(()=>[d(l,{modelValue:s.startTime,"onUpdate:modelValue":e[1]||(e[1]=y=>s.startTime=y),label:"Start Time",type:"time",step:"1",rules:[s.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),d(u,null,{default:f(()=>[d(l,{modelValue:s.endDate,"onUpdate:modelValue":e[2]||(e[2]=y=>s.endDate=y),label:"End Date",type:"date",max:s.todaysDate,rules:[s.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),d(u,null,{default:f(()=>[d(l,{modelValue:s.endTime,"onUpdate:modelValue":e[3]||(e[3]=y=>s.endTime=y),label:"End Time",type:"time",step:"1",rules:[s.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),d(c,{"no-gutters":""},{default:f(()=>[d(u,null,{default:f(()=>[d(_,{modelValue:s.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=y=>s.cmdOrTlm=y),inline:"","hide-details":"",class:"mt-0"},{default:f(()=>[d(h,{label:"Command",value:"cmd","data-test":"cmd-radio"}),d(h,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(w,{onAddItem:e[5]||(e[5]=y=>r.addItem(y)),"button-text":"Add Item",mode:s.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":""},null,8,["mode"])]),_:1})]),_:1})]),_:1}),d(C,{class:"pl-3"},{default:f(()=>[d(p,{"model-value":s.progress},null,8,["model-value"]),N(" Processed: "+q(s.totalPacketsReceived)+" packets, "+q(s.totalItemsReceived)+" items ",1),d(m),d(S,{class:"bg-primary",onClick:r.processItems,disabled:s.items.length<1},{default:f(()=>[N(q(s.processButtonText),1)]),_:1},8,["onClick","disabled"]),d(m),d(E,{location:"top"},{activator:f(({props:y})=>[d(S,K({icon:"mdi-pencil",variant:"text",onClick:e[6]||(e[6]=I=>s.editAll=!0)},y,{disabled:s.items.length<1,"data-test":"editAll"}),null,16,["disabled"])]),default:f(()=>[e[18]||(e[18]=z("span",null," Edit All Items ",-1))]),_:1}),d(E,{location:"top"},{activator:f(({props:y})=>[d(S,K({icon:"mdi-delete",variant:"text",onClick:r.deleteAll},y,{disabled:s.items.length<1,"data-test":"delete-all"}),null,16,["onClick","disabled"])]),default:f(()=>[e[19]||(e[19]=z("span",null,"Delete All Items",-1))]),_:1})]),_:1}),d(L,{width:"100%"},{default:f(()=>[d(D,null,{default:f(()=>[e[20]||(e[20]=N(" Items ")),d(m),d(l,{modelValue:s.search,"onUpdate:modelValue":e[7]||(e[7]=y=>s.search=y),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),d(Ui,{headers:s.headers,items:s.items,search:s.search,"items-per-page":s.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=y=>s.itemsPerPage=y),"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":f(({item:y})=>[d(E,{location:"top"},{activator:f(({props:I})=>[d(F,K({onClick:Ze(Vi=>y.edit=!0,["stop"])},I,{"data-test":"edit-row"}),{default:f(()=>e[21]||(e[21]=[N(" mdi-pencil ")])),_:2},1040,["onClick"])]),default:f(()=>[e[22]||(e[22]=z("span",null,"Edit Item",-1))]),_:2},1024),d(ee,{modelValue:y.edit,"onUpdate:modelValue":I=>y.edit=I,onKeydown:Ce(I=>y.edit=!1,["esc"]),"max-width":"600"},{default:f(()=>[d(L,null,{default:f(()=>[d(C,{height:"24"},{default:f(()=>[d(m),e[23]||(e[23]=z("span",null," DataExtractor: Edit Item Mode ",-1)),d(m)]),_:1}),d(P,null,{default:f(()=>[d(c,{class:"mt-3 title-font"},{default:f(()=>[d(u,null,{default:f(()=>[N(q(r.getItemLabel(y)),1)]),_:2},1024)]),_:2},1024),d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(b,{"hide-details":"",items:s.modes,label:"Mode",variant:"outlined",modelValue:y.mode,"onUpdate:modelValue":I=>y.mode=I},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024),d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(b,{"hide-details":"",items:s.valueTypes,label:"Value Type",variant:"outlined",modelValue:y.valueType,"onUpdate:modelValue":I=>y.valueType=I},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024),d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(b,{"hide-details":"",items:s.reducedTypes,label:"Reduced Type",variant:"outlined",modelValue:y.reducedType,"onUpdate:modelValue":I=>y.reducedType=I},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:2},1024),d(k,{class:"px-2"},{default:f(()=>[d(m),d(S,{variant:"flat",onClick:I=>y.edit=!1},{default:f(()=>e[24]||(e[24]=[N(" Close ")])),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":f(({item:y})=>[d(E,{location:"top"},{activator:f(({props:I})=>[d(F,K({onClick:Vi=>r.deleteItem(y)},I,{"data-test":"delete-row"}),{default:f(()=>e[25]||(e[25]=[N(" mdi-delete ")])),_:2},1040,["onClick"])]),default:f(()=>[e[26]||(e[26]=z("span",null," Delete Item ",-1))]),_:2},1024)]),_:1},8,["headers","items","search","items-per-page"])]),_:1})]),_:1}),d(ee,{modelValue:s.editAll,"onUpdate:modelValue":e[14]||(e[14]=y=>s.editAll=y),onKeydown:e[15]||(e[15]=Ce(y=>s.editAll=!s.editAll,["esc"])),"max-width":"600"},{default:f(()=>[d(L,null,{default:f(()=>[d(C,{height:"24"},{default:f(()=>[d(m),e[27]||(e[27]=z("span",null," DataExtractor: Edit All Items",-1)),d(m)]),_:1}),d(P,null,{default:f(()=>[d(c,{class:"mt-3"},{default:f(()=>[d(u,null,{default:f(()=>e[28]||(e[28]=[N(" This will change all items to the following data type! ")])),_:1})]),_:1}),d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(b,{"hide-details":"",items:s.modes,label:"Mode",variant:"outlined",modelValue:s.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=y=>s.allItemMode=y)},null,8,["items","modelValue"])]),_:1})]),_:1}),d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(b,{"hide-details":"",items:s.valueTypes,label:"Value Type",variant:"outlined",modelValue:s.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=y=>s.allItemValueType=y)},null,8,["items","modelValue"])]),_:1})]),_:1}),d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(b,{"hide-details":"",items:s.reducedTypes,label:"Reduced Type",variant:"outlined",modelValue:s.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=y=>s.allItemReducedType=y)},null,8,["items","modelValue"])]),_:1})]),_:1})]),_:1}),d(k,{class:"px-2"},{default:f(()=>[d(m),d(S,{variant:"outlined",onClick:e[12]||(e[12]=y=>s.editAll=!s.editAll)},{default:f(()=>e[29]||(e[29]=[N(" Cancel ")])),_:1}),d(S,{variant:"flat",disabled:!s.allItemValueType,onClick:e[13]||(e[13]=y=>r.editAllItems())},{default:f(()=>e[30]||(e[30]=[N(" Ok ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),s.openConfig?(R(),U(Mi,{key:0,modelValue:s.openConfig,"onUpdate:modelValue":e[16]||(e[16]=y=>s.openConfig=y),configKey:s.configKey,onSuccess:r.openConfiguration},null,8,["modelValue","configKey","onSuccess"])):X("",!0),s.saveConfig?(R(),U(Ii,{key:1,modelValue:s.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=y=>s.saveConfig=y),configKey:s.configKey,onSuccess:r.saveConfiguration},null,8,["modelValue","configKey","onSuccess"])):X("",!0)])}const Li=Vt("default",He(Pi,[["render",ji],["__scopeId","data-v-ad4c3d44"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","./main-80e32c674d54e3083df2.js","vue","vue-router","single-spa","vuex","vuetify"],function(d,V){"use strict";var l,a,n,s,r,u,o;return{setters:[e=>{l=e.o},e=>{a=e.s,n=e.P},e=>{s=e.resolveComponent,r=e.openBlock,u=e.createBlock,o=e.normalizeStyle},null,null,null,null],execute:function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(m,i,v,y,t,x){const h=s("v-text-field");return r(),u(h,{modelValue:t.dateValue,"onUpdate:modelValue":i[0]||(i[0]=p=>t.dateValue=p),label:t.label,style:o(m.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const f=d("default",a(e,[["render",c]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./main-7f7c9aca4eba3a2f66c5.js","vue"],function(C,P){"use strict";var V,L,m,r,o,e,t,k,s,d,h,g,v,w;return{setters:[c=>{V=c.s,L=c.W},c=>{m=c.resolveComponent,r=c.openBlock,o=c.createBlock,e=c.withCtx,t=c.createVNode,k=c.createElementVNode,s=c.createTextVNode,d=c.toDisplayString,h=c.createCommentVNode,g=c.createElementBlock,v=c.Fragment,w=c.renderList}],execute:function(){const c={props:{type:{default:"tlm",validator:function(n){return["cmd","tlm"].indexOf(n)!==-1}},targetName:String,packetName:String,itemName:String,modelValue:Boolean},data(){return{details:Object,updater:null,rawValue:null,convertedValue:null,formattedValue:null,unitsValue:null}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},created(){this.api=new L},beforeUnmount(){clearInterval(this.updater),this.updater=null},watch:{modelValue:function(n,a){n?(this.requestDetails(),this.type==="tlm"&&(this.updater=setInterval(()=>{this.api.get_tlm_values([`${this.targetName}__${this.packetName}__${this.itemName}__RAW`,`${this.targetName}__${this.packetName}__${this.itemName}__CONVERTED`,`${this.targetName}__${this.packetName}__${this.itemName}__FORMATTED`,`${this.targetName}__${this.packetName}__${this.itemName}__WITH_UNITS`]).then(_=>{for(let p of _){let i=null;if(p[0].json_class==="String"&&p[0].raw!==void 0?i=p[0].raw:this.details.data_type==="BLOCK"&&(i=p[0]),i!==null){i=i.slice(0,parseInt(this.details.bit_size)/8);let y=!1;i.length>64&&(y=!0),p[0]=Array.from(i.slice(0,64),function(N){return N===" "?"20":("0"+(N&255).toString(16)).slice(-2)}).join(" ").toUpperCase(),y&&(p[0]+="...")}}this.details.data_type.includes("INT")&&!this.details.array_size?this.rawValue=`${_[0][0]} (0x${_[0][0].toString(16).toUpperCase()})`:this.rawValue=_[0][0],this.convertedValue=_[1][0],this.formattedValue=_[2][0],this.unitsValue=_[3][0]})},1e3))):(clearInterval(this.updater),this.updater=null)}},methods:{hasLimits(n){let a=!1;return n.limits.DEFAULT&&(a=!0),n.states&&Object.getOwnPropertyNames(n.states).forEach(_=>{n.states[_].color&&(a=!0)}),a},async requestDetails(){this.type==="tlm"?await this.api.get_item(this.targetName,this.packetName,this.itemName).then(n=>{this.details=n,this.hasLimits(n)||(this.details.limits=null)}):await this.api.get_parameter(this.targetName,this.packetName,this.itemName).then(n=>{this.details=n})},async changeLimitsEnabled(){this.details.limits.enabled?await this.api.enable_limits(this.targetName,this.packetName,this.itemName):await this.api.disable_limits(this.targetName,this.packetName,this.itemName)},formatLimit(n){return n.hasOwnProperty("green_low")?"RL/"+n.red_low+" YL/"+n.yellow_low+" YH/"+n.yellow_high+" RH/"+n.red_high+" GL/"+n.green_low+" GH/"+n.green_high:n.hasOwnProperty("red_low")?"RL/"+n.red_low+" YL/"+n.yellow_low+" YH/"+n.yellow_high+" RH/"+n.red_high:n}}},S={key:5},$={key:7},E={key:3},x={key:9};function B(n,a,_,p,i,y){const N=m("v-spacer"),D=m("v-toolbar"),T=m("v-card-title"),U=m("v-card-subtitle"),l=m("v-col"),u=m("v-row"),I=m("v-switch"),O=m("v-container"),R=m("v-card-text"),z=m("v-card"),F=m("v-dialog");return r(),o(F,{modelValue:y.show,"onUpdate:modelValue":a[1]||(a[1]=b=>y.show=b),width:"700"},{default:e(()=>[t(z,null,{default:e(()=>[t(D,{height:24},{default:e(()=>[t(N),a[2]||(a[2]=k("span",null," Details ",-1)),t(N)]),_:1}),t(T,null,{default:e(()=>[s(d(_.targetName)+" "+d(_.packetName)+" "+d(_.itemName),1)]),_:1}),t(U,null,{default:e(()=>[s(d(i.details.description),1)]),_:1}),t(R,null,{default:e(()=>[t(O,{fluid:""},{default:e(()=>[_.type==="tlm"?(r(),o(u,{key:0,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[3]||(a[3]=[s("Item Values")])),_:1}),t(l)]),_:1})):h("",!0),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>a[4]||(a[4]=[s("Raw Value")])),_:1}),t(l,null,{default:e(()=>[s(d(i.rawValue),1)]),_:1})]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>a[5]||(a[5]=[s("Converted Value")])),_:1}),t(l,null,{default:e(()=>[s(d(i.convertedValue),1)]),_:1})]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>a[6]||(a[6]=[s("Formatted Value")])),_:1}),t(l,null,{default:e(()=>[s(d(i.formattedValue),1)]),_:1})]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>a[7]||(a[7]=[s("With Units Value")])),_:1}),t(l,null,{default:e(()=>[s(d(i.unitsValue),1)]),_:1})]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[8]||(a[8]=[s("Bit Offset")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.bit_offset),1)]),_:1})]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[9]||(a[9]=[s("Bit Size")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.bit_size),1)]),_:1})]),_:1}),i.details.array_size?(r(),o(u,{key:1,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[10]||(a[10]=[s("Array Size")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.array_size),1)]),_:1})]),_:1})):h("",!0),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[11]||(a[11]=[s("Data Type")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.data_type),1)]),_:1})]),_:1}),_.type==="cmd"?(r(),o(u,{key:2,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[12]||(a[12]=[s("Minimum")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.minimum),1)]),_:1})]),_:1})):h("",!0),_.type==="cmd"?(r(),o(u,{key:3,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[13]||(a[13]=[s("Maximum")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.maximum),1)]),_:1})]),_:1})):h("",!0),_.type==="cmd"?(r(),o(u,{key:4,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[14]||(a[14]=[s("Default")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.default),1)]),_:1})]),_:1})):h("",!0),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[15]||(a[15]=[s("Format String")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.format_string),1)]),_:1})]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[16]||(a[16]=[s("Read Conversion")])),_:1}),i.details.read_conversion?(r(),o(l,{key:0},{default:e(()=>[s(" Class: "+d(i.details.read_conversion.class)+" ",1),a[17]||(a[17]=k("br",null,null,-1)),s(" Params: "+d(i.details.read_conversion.params),1)]),_:1})):(r(),o(l,{key:1}))]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[18]||(a[18]=[s("Write Conversion")])),_:1}),i.details.write_conversion?(r(),o(l,{key:0},{default:e(()=>[s(" Class: "+d(i.details.write_conversion.class)+" ",1),a[19]||(a[19]=k("br",null,null,-1)),s(" Params: "+d(i.details.write_conversion.params),1)]),_:1})):(r(),o(l,{key:1}))]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[20]||(a[20]=[s("Id Value")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.id_value),1)]),_:1})]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[21]||(a[21]=[s("Units Full")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.units_full),1)]),_:1})]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[22]||(a[22]=[s("Units Abbr")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.units),1)]),_:1})]),_:1}),t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[23]||(a[23]=[s("Endianness")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.endianness),1)]),_:1})]),_:1}),i.details.states?(r(),g("div",S,[t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[24]||(a[24]=[s("States")])),_:1}),t(l)]),_:1}),(r(!0),g(v,null,w(i.details.states,(b,f)=>(r(),o(u,{"no-gutters":"",key:f},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024),t(l,null,{default:e(()=>[s(d(b.value),1)]),_:2},1024)]),_:2},1024))),128))])):(r(),o(u,{key:6,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[25]||(a[25]=[s("States")])),_:1}),t(l,null,{default:e(()=>a[26]||(a[26]=[s("None")])),_:1})]),_:1})),i.details.limits?(r(),g("div",$,[t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[27]||(a[27]=[s("Limits")])),_:1}),t(l)]),_:1}),(r(!0),g(v,null,w(i.details.limits,(b,f)=>(r(),o(u,{"no-gutters":"",key:f},{default:e(()=>[t(l,{cols:"1"}),f==="enabled"?(r(),o(l,{key:0,cols:"4",class:"label"},{default:e(()=>a[28]||(a[28]=[s("Enabled")])),_:1})):h("",!0),f==="enabled"?(r(),o(I,{key:1,modelValue:i.details.limits.enabled,"onUpdate:modelValue":[a[0]||(a[0]=A=>i.details.limits.enabled=A),y.changeLimitsEnabled],density:"compact",color:"primary",class:"compact-switch","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])):h("",!0),f!=="enabled"?(r(),o(l,{key:2,cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024)):h("",!0),f!=="enabled"?(r(),g("div",E,d(y.formatLimit(b)),1)):h("",!0),t(l)]),_:2},1024))),128))])):(r(),o(u,{key:8,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[29]||(a[29]=[s("Limits")])),_:1}),t(l,null,{default:e(()=>a[30]||(a[30]=[s("None")])),_:1})]),_:1})),i.details.meta?(r(),g("div",x,[t(u,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[31]||(a[31]=[s("Meta")])),_:1}),t(l)]),_:1}),(r(!0),g(v,null,w(i.details.meta,(b,f)=>(r(),o(u,{"no-gutters":"",key:f},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024),t(l,null,{default:e(()=>[s(d(b.join(", ")),1)]),_:2},1024)]),_:2},1024))),128))])):(r(),o(u,{key:10,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[32]||(a[32]=[s("Meta")])),_:1}),t(l,null,{default:e(()=>a[33]||(a[33]=[s("None")])),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const j=C("P",V(c,[["render",B],["__scopeId","data-v-785491ee"]]))}}});
|
1
|
+
System.register(["./main-80e32c674d54e3083df2.js","vue"],function(C,P){"use strict";var V,L,m,r,o,e,t,k,s,d,h,g,v,w;return{setters:[c=>{V=c.s,L=c.F},c=>{m=c.resolveComponent,r=c.openBlock,o=c.createBlock,e=c.withCtx,t=c.createVNode,k=c.createElementVNode,s=c.createTextVNode,d=c.toDisplayString,h=c.createCommentVNode,g=c.createElementBlock,v=c.Fragment,w=c.renderList}],execute:function(){const c={props:{type:{default:"tlm",validator:function(u){return["cmd","tlm"].indexOf(u)!==-1}},targetName:String,packetName:String,itemName:String,modelValue:Boolean},data(){return{details:Object,updater:null,rawValue:null,convertedValue:null,formattedValue:null,unitsValue:null}},computed:{show:{get(){return this.modelValue},set(u){this.$emit("update:modelValue",u)}}},created(){this.api=new L},beforeUnmount(){clearInterval(this.updater),this.updater=null},watch:{modelValue:function(u,a){u?(this.requestDetails(),this.type==="tlm"&&(this.updater=setInterval(()=>{this.api.get_tlm_values([`${this.targetName}__${this.packetName}__${this.itemName}__RAW`,`${this.targetName}__${this.packetName}__${this.itemName}__CONVERTED`,`${this.targetName}__${this.packetName}__${this.itemName}__FORMATTED`,`${this.targetName}__${this.packetName}__${this.itemName}__WITH_UNITS`]).then(_=>{for(let p of _){let i=null;if(p[0].json_class==="String"&&p[0].raw!==void 0?i=p[0].raw:this.details.data_type==="BLOCK"&&(i=p[0]),i!==null){i=i.slice(0,parseInt(this.details.bit_size)/8);let y=!1;i.length>64&&(y=!0),p[0]=Array.from(i.slice(0,64),function(N){return N===" "?"20":("0"+(N&255).toString(16)).slice(-2)}).join(" ").toUpperCase(),y&&(p[0]+="...")}}this.details.data_type.includes("INT")&&!this.details.array_size?this.rawValue=`${_[0][0]} (0x${_[0][0].toString(16).toUpperCase()})`:this.rawValue=_[0][0],this.convertedValue=_[1][0],this.formattedValue=_[2][0],this.unitsValue=_[3][0]})},1e3))):(clearInterval(this.updater),this.updater=null)}},methods:{hasLimits(u){let a=!1;return u.limits.DEFAULT&&(a=!0),u.states&&Object.getOwnPropertyNames(u.states).forEach(_=>{u.states[_].color&&(a=!0)}),a},async requestDetails(){this.type==="tlm"?await this.api.get_item(this.targetName,this.packetName,this.itemName).then(u=>{this.details=u,this.hasLimits(u)||(this.details.limits=null)}):await this.api.get_parameter(this.targetName,this.packetName,this.itemName).then(u=>{this.details=u})},async changeLimitsEnabled(){this.details.limits.enabled?await this.api.enable_limits(this.targetName,this.packetName,this.itemName):await this.api.disable_limits(this.targetName,this.packetName,this.itemName)},formatLimit(u){return u.hasOwnProperty("green_low")?"RL/"+u.red_low+" YL/"+u.yellow_low+" YH/"+u.yellow_high+" RH/"+u.red_high+" GL/"+u.green_low+" GH/"+u.green_high:u.hasOwnProperty("red_low")?"RL/"+u.red_low+" YL/"+u.yellow_low+" YH/"+u.yellow_high+" RH/"+u.red_high:u}}},S={key:5},$={key:7},E={key:3},x={key:9};function B(u,a,_,p,i,y){const N=m("v-spacer"),D=m("v-toolbar"),T=m("v-card-title"),U=m("v-card-subtitle"),l=m("v-col"),n=m("v-row"),F=m("v-switch"),I=m("v-container"),O=m("v-card-text"),R=m("v-card"),z=m("v-dialog");return r(),o(z,{modelValue:y.show,"onUpdate:modelValue":a[1]||(a[1]=b=>y.show=b),width:"700"},{default:e(()=>[t(R,null,{default:e(()=>[t(D,{height:24},{default:e(()=>[t(N),a[2]||(a[2]=k("span",null," Details ",-1)),t(N)]),_:1}),t(T,null,{default:e(()=>[s(d(_.targetName)+" "+d(_.packetName)+" "+d(_.itemName),1)]),_:1}),t(U,null,{default:e(()=>[s(d(i.details.description),1)]),_:1}),t(O,null,{default:e(()=>[t(I,{fluid:""},{default:e(()=>[_.type==="tlm"?(r(),o(n,{key:0,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[3]||(a[3]=[s("Item Values")])),_:1}),t(l)]),_:1})):h("",!0),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>a[4]||(a[4]=[s("Raw Value")])),_:1}),t(l,null,{default:e(()=>[s(d(i.rawValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>a[5]||(a[5]=[s("Converted Value")])),_:1}),t(l,null,{default:e(()=>[s(d(i.convertedValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>a[6]||(a[6]=[s("Formatted Value")])),_:1}),t(l,null,{default:e(()=>[s(d(i.formattedValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>a[7]||(a[7]=[s("With Units Value")])),_:1}),t(l,null,{default:e(()=>[s(d(i.unitsValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[8]||(a[8]=[s("Bit Offset")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.bit_offset),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[9]||(a[9]=[s("Bit Size")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.bit_size),1)]),_:1})]),_:1}),i.details.array_size?(r(),o(n,{key:1,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[10]||(a[10]=[s("Array Size")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.array_size),1)]),_:1})]),_:1})):h("",!0),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[11]||(a[11]=[s("Data Type")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.data_type),1)]),_:1})]),_:1}),_.type==="cmd"?(r(),o(n,{key:2,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[12]||(a[12]=[s("Minimum")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.minimum),1)]),_:1})]),_:1})):h("",!0),_.type==="cmd"?(r(),o(n,{key:3,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[13]||(a[13]=[s("Maximum")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.maximum),1)]),_:1})]),_:1})):h("",!0),_.type==="cmd"?(r(),o(n,{key:4,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[14]||(a[14]=[s("Default")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.default),1)]),_:1})]),_:1})):h("",!0),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[15]||(a[15]=[s("Format String")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.format_string),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[16]||(a[16]=[s("Read Conversion")])),_:1}),i.details.read_conversion?(r(),o(l,{key:0},{default:e(()=>[s(" Class: "+d(i.details.read_conversion.class)+" ",1),a[17]||(a[17]=k("br",null,null,-1)),s(" Params: "+d(i.details.read_conversion.params),1)]),_:1})):(r(),o(l,{key:1}))]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[18]||(a[18]=[s("Write Conversion")])),_:1}),i.details.write_conversion?(r(),o(l,{key:0},{default:e(()=>[s(" Class: "+d(i.details.write_conversion.class)+" ",1),a[19]||(a[19]=k("br",null,null,-1)),s(" Params: "+d(i.details.write_conversion.params),1)]),_:1})):(r(),o(l,{key:1}))]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[20]||(a[20]=[s("Id Value")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.id_value),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[21]||(a[21]=[s("Units Full")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.units_full),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[22]||(a[22]=[s("Units Abbr")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.units),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[23]||(a[23]=[s("Endianness")])),_:1}),t(l,null,{default:e(()=>[s(d(i.details.endianness),1)]),_:1})]),_:1}),i.details.states?(r(),g("div",S,[t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[24]||(a[24]=[s("States")])),_:1}),t(l)]),_:1}),(r(!0),g(v,null,w(i.details.states,(b,f)=>(r(),o(n,{"no-gutters":"",key:f},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024),t(l,null,{default:e(()=>[s(d(b.value),1)]),_:2},1024)]),_:2},1024))),128))])):(r(),o(n,{key:6,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[25]||(a[25]=[s("States")])),_:1}),t(l,null,{default:e(()=>a[26]||(a[26]=[s("None")])),_:1})]),_:1})),i.details.limits?(r(),g("div",$,[t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[27]||(a[27]=[s("Limits")])),_:1}),t(l)]),_:1}),(r(!0),g(v,null,w(i.details.limits,(b,f)=>(r(),o(n,{"no-gutters":"",key:f},{default:e(()=>[t(l,{cols:"1"}),f==="enabled"?(r(),o(l,{key:0,cols:"4",class:"label"},{default:e(()=>a[28]||(a[28]=[s("Enabled")])),_:1})):h("",!0),f==="enabled"?(r(),o(F,{key:1,modelValue:i.details.limits.enabled,"onUpdate:modelValue":[a[0]||(a[0]=A=>i.details.limits.enabled=A),y.changeLimitsEnabled],density:"compact",color:"primary",class:"compact-switch","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])):h("",!0),f!=="enabled"?(r(),o(l,{key:2,cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024)):h("",!0),f!=="enabled"?(r(),g("div",E,d(y.formatLimit(b)),1)):h("",!0),t(l)]),_:2},1024))),128))])):(r(),o(n,{key:8,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[29]||(a[29]=[s("Limits")])),_:1}),t(l,null,{default:e(()=>a[30]||(a[30]=[s("None")])),_:1})]),_:1})),i.details.meta?(r(),g("div",x,[t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[31]||(a[31]=[s("Meta")])),_:1}),t(l)]),_:1}),(r(!0),g(v,null,w(i.details.meta,(b,f)=>(r(),o(n,{"no-gutters":"",key:f},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024),t(l,null,{default:e(()=>[s(d(b.join(", ")),1)]),_:2},1024)]),_:2},1024))),128))])):(r(),o(n,{key:10,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>a[32]||(a[32]=[s("Meta")])),_:1}),t(l,null,{default:e(()=>a[33]||(a[33]=[s("None")])),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const j=C("P",V(c,[["render",B],["__scopeId","data-v-785491ee"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(a,p){"use strict";var t,n,r,o,i,s;return{setters:[e=>{t=e.openBlock,n=e.createBlock,r=e.resolveDynamicComponent,o=e.normalizeProps,i=e.guardReactiveProps},e=>{s=e.s},null,null,null,null],execute:function(){const e={data(){return{widgetType:null}},props:{name:{default:null}},computed:{url:function(){return`${window.location.origin}/tools/widgets/${this.name}/${this.name}.umd.min.js`}},async mounted(){try{this.widgetType=await System.import(this.url)}catch{throw new Error(`Unknown widget: ${this.name}`)}}};function l(u,d,w,g,c,y){return t(),n(r(c.widgetType),o(i({...u.$props,...u.$attrs})),null,16)}const m=a("default",s(e,[["render",l]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","./ValueWidget-h3905woQ-181f3cb5fa186ab9aaab.js","vue","./main-80e32c674d54e3083df2.js","./DetailsDialog-DiVcC3Fg-487ebbee41c3e5252082.js","single-spa","./VWidget-CGdM4sTw-729e8b3fcd6166b783f1.js","vue-router","vuex","vuetify"],function(m,f){"use strict";var s,r,n,a,l,i,o,c,u;return{setters:[e=>{s=e.o},e=>{r=e.default},e=>{n=e.resolveComponent,a=e.openBlock,l=e.createElementBlock,i=e.normalizeStyle,o=e.createVNode,c=e.mergeProps},e=>{u=e.s},null,null,null,null,null,null],execute:function(){const e={mixins:[s],components:{ValueWidget:r},computed:{getParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[4]]}},created(){this.setWidth(this.parameters[5],"ch",12)}};function p(t,h,y,V,x,g){const d=n("value-widget");return a(),l("div",{ref:"container",class:"d-flex flex-row",style:i(t.computedStyle)},[o(d,c(t.$attrs,{parameters:g.getParameters,settings:t.appliedSettings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"format-string":t.parameters[3]}),null,16,["parameters","settings","screen-values","screen-time-zone","format-string"])],4)}const v=m("default",u(e,[["render",p]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./main-80e32c674d54e3083df2.js","vue","./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js"],function(j,Se){"use strict";var L,B,J,M,Q,Z,P,R,ee,H,te,u,w,Y,ie,a,l,I,ae,b,T,m,N,S,x,E,se,le,q,re,oe,ne;return{setters:[c=>{L=c.s,B=c.P,J=c.O,M=c.$,Q=c.b,Z=c.c,P=c.d,R=c.l,ee=c.F,H=c.y,te=c.z},c=>{u=c.resolveComponent,w=c.openBlock,Y=c.createElementBlock,ie=c.withModifiers,a=c.createVNode,l=c.withCtx,I=c.withDirectives,ae=c.normalizeClass,b=c.createElementVNode,T=c.mergeProps,m=c.createTextVNode,N=c.vShow,S=c.toDisplayString,x=c.createBlock,E=c.createCommentVNode,se=c.normalizeProps,le=c.guardReactiveProps,q=c.withKeys,re=c.Fragment,oe=c.renderList},c=>{ne=c.o}],execute:function(){const c={props:{modelValue:Boolean,title:{type:String,required:!0},legendPosition:{type:String,required:!0},items:{type:Array,required:!0},graphMinY:{type:Number},graphMaxY:{type:Number},lines:{type:Array,required:!0},colors:{type:Array,required:!0},startDateTime:{type:Number},endDateTime:{type:Number},timeZone:{type:String,required:!0}},mixins:[B],data:function(){return{tab:0,graph:{},legendPositions:["top","bottom","left","right"],startDate:null,startTime:null,endDate:null,endTime:null,lineHeaders:[{title:"Y Value",value:"yValue"},{title:"Color",value:"color"},{title:"Actions",value:"actions",sortable:!1}],itemHeaders:[{title:"Target Name",value:"targetName"},{title:"Packet Name",value:"packetName"},{title:"Item Name",value:"itemName"},{title:"Actions",value:"actions",sortable:!1}],rules:{date:t=>{if(!t)return!0;try{return Z(P(t,"yyyy-MM-dd",new Date))||"Invalid date (YYYY-MM-DD)"}catch{return"Invalid date (YYYY-MM-DD)"}},time:t=>{if(!t)return!0;try{return Z(P(t,"HH:mm:ss",new Date))||"Invalid time (HH:MM:SS)"}catch{return"Invalid time (HH:MM:SS)"}}}}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},editItems:function(){if(!this.items)return[];let t=0;return this.items.map(e=>(t+=1,{...e,itemId:t}))}},created(){if(this.graph={title:this.title,legendPosition:this.legendPosition,items:this.items,graphMinY:this.graphMinY,graphMaxY:this.graphMaxY,lines:[...this.lines]},this.startDateTime){let t=R(this.startDateTime/1e6);this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone)}else{let t=new Date-36e5;this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone)}if(this.endDateTime){let t=R(this.endDateTime/1e6);this.endDate=this.formatDate(t,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone)}},methods:{closeOk(){this.startDate&&this.startTime?this.graph.startDateTime=this.startDate+" "+this.startTime:this.graph.startDateTime=null,this.endDate&&this.endTime?this.graph.endDateTime=this.endDate+" "+this.endTime:this.graph.endDateTime=null,this.$emit("ok",this.graph)},addLine(){this.graph.lines.push({yValue:0,color:"white"})},removeLine(t){let e=this.graph.lines.indexOf(t);this.graph.lines.splice(e,1)}}},de={class:"edit-box"},he={class:"edit-box"},ue={class:"edit-box"},me={class:"edit-box"};function ce(t,e,i,n,s,r){const d=u("v-spacer"),o=u("v-toolbar"),v=u("v-tab"),p=u("v-tabs"),y=u("v-text-field"),D=u("v-card-text"),_=u("v-col"),k=u("v-select"),f=u("v-row"),G=u("v-tabs-window-item"),z=u("v-btn"),A=u("v-list-item"),V=u("v-icon"),C=u("v-tooltip"),$=u("v-list"),U=u("v-data-table"),F=u("v-tabs-window"),K=u("v-card-actions"),h=u("v-card"),W=u("v-dialog");return w(),x(W,{modelValue:r.show,"onUpdate:modelValue":e[12]||(e[12]=g=>r.show=g),onKeydown:e[13]||(e[13]=q(g=>t.$emit("cancel"),["esc"])),"max-width":"700"},{default:l(()=>[a(o,{height:"24"},{default:l(()=>[a(d),e[14]||(e[14]=b("span",null," Edit Graph ",-1)),a(d)]),_:1}),a(h,{class:"pa-3"},{default:l(()=>[a(p,{modelValue:t.tab,"onUpdate:modelValue":e[0]||(e[0]=g=>t.tab=g),class:"ml-3"},{default:l(()=>[a(v,{value:"0"},{default:l(()=>e[15]||(e[15]=[m(" Settings ")])),_:1}),a(v,{value:"1"},{default:l(()=>e[16]||(e[16]=[m(" Scale / Lines ")])),_:1}),a(v,{value:"2"},{default:l(()=>e[17]||(e[17]=[m(" Items ")])),_:1})]),_:1},8,["modelValue"]),a(F,{modelValue:t.tab,"onUpdate:modelValue":e[10]||(e[10]=g=>t.tab=g)},{default:l(()=>[a(G,{value:"0",eager:""},{default:l(()=>[b("div",de,[a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(D,{class:"pa-0"},{default:l(()=>[a(y,{class:"pb-2",label:"Title",modelValue:t.graph.title,"onUpdate:modelValue":e[1]||(e[1]=g=>t.graph.title=g),"hide-details":""},null,8,["modelValue"])]),_:1})]),_:1}),a(_,null,{default:l(()=>[a(k,{label:"Legend Position","hide-details":"",items:t.legendPositions,modelValue:t.graph.legendPosition,"onUpdate:modelValue":e[2]||(e[2]=g=>t.graph.legendPosition=g),style:{"max-width":"280px"}},null,8,["items","modelValue"])]),_:1})]),_:1})]),b("div",he,[a(D,{class:"pa-0"},{default:l(()=>e[18]||(e[18]=[m(" Select a start date/time for the graph. Leave blank for start now. ")])),_:1}),a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(y,{label:"Start Date",name:`date${Date.now()}`,rules:[t.rules.date],modelValue:t.startDate,"onUpdate:modelValue":e[3]||(e[3]=g=>t.startDate=g),type:"date"},null,8,["name","rules","modelValue"])]),_:1}),a(_,null,{default:l(()=>[a(y,{label:"Start Time",name:`time${Date.now()}`,rules:[t.rules.time],modelValue:t.startTime,"onUpdate:modelValue":e[4]||(e[4]=g=>t.startTime=g),type:"time",step:"1"},null,8,["name","rules","modelValue"])]),_:1})]),_:1}),a(D,{class:"pa-0"},{default:l(()=>e[19]||(e[19]=[m(" Select a end date/time for the graph. Leave blank for continuous real-time graphing. ")])),_:1}),a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(y,{label:"End Date",name:`date${Date.now()}`,rules:[t.rules.date],modelValue:t.endDate,"onUpdate:modelValue":e[5]||(e[5]=g=>t.endDate=g),type:"date"},null,8,["name","rules","modelValue"])]),_:1}),a(_,null,{default:l(()=>[a(y,{label:"End Time",name:`time${Date.now()}`,rules:[t.rules.time],modelValue:t.endTime,"onUpdate:modelValue":e[6]||(e[6]=g=>t.endTime=g),type:"time",step:"1"},null,8,["name","rules","modelValue"])]),_:1})]),_:1})])]),_:1}),a(G,{value:"1",eager:""},{default:l(()=>[b("div",ue,[a(D,{class:"pa-0"},{default:l(()=>e[20]||(e[20]=[m(" Set a min or max Y value to override automatic scaling ")])),_:1}),a(f,{dense:""},{default:l(()=>[a(_,{class:"px-2"},{default:l(()=>[a(y,{"hide-details":"",label:"Min Y Axis (Optional)",modelValue:t.graph.graphMinY,"onUpdate:modelValue":e[7]||(e[7]=g=>t.graph.graphMinY=g),type:"number"},null,8,["modelValue"])]),_:1}),a(_,{class:"px-2"},{default:l(()=>[a(y,{"hide-details":"",label:"Max Y Axis (Optional)",modelValue:t.graph.graphMaxY,"onUpdate:modelValue":e[8]||(e[8]=g=>t.graph.graphMaxY=g),type:"number"},null,8,["modelValue"])]),_:1})]),_:1})]),b("div",me,[a($,{density:"compact",class:"horizontal-lines"},{default:l(()=>[a(A,null,{default:l(()=>[e[22]||(e[22]=b("span",{style:{"padding-top":"5px"}}," Add horizontal lines to the graph ",-1)),a(d),a(z,{onClick:e[9]||(e[9]=g=>r.addLine())},{default:l(()=>e[21]||(e[21]=[m(" New Line ")])),_:1})]),_:1}),(w(!0),Y(re,null,oe(t.graph.lines,(g,X)=>(w(),x(A,{key:X,value:g,color:"primary"},{default:l(()=>[a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(y,{label:"Y Value",modelValue:g.yValue,"onUpdate:modelValue":O=>g.yValue=O},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),a(_,null,{default:l(()=>[a(k,{label:"Color","hide-details":"",items:i.colors,modelValue:g.color,"onUpdate:modelValue":O=>g.color=O},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024),a(_,null,{default:l(()=>[a(C,{text:"Remove",location:"top"},{activator:l(({props:O})=>[a(V,T({ref_for:!0},O,{style:{padding:"30px"},onClick:Ye=>r.removeLine(g)}),{default:l(()=>e[23]||(e[23]=[m("mdi-delete")])),_:2},1040,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1})])]),_:1}),a(G,{value:"2",eager:""},{default:l(()=>[a(U,{"item-key":"itemId",class:"elevation-1 my-2","data-test":"edit-graph-items",headers:t.itemHeaders,items:r.editItems,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},{"item.actions":l(({item:g})=>[a(C,{text:"Remove",location:"top"},{activator:l(({props:X})=>[a(V,T(X,{onClick:O=>t.$emit("remove",g)}),{default:l(()=>e[24]||(e[24]=[m(" mdi-delete ")])),_:2},1040,["onClick"])]),_:2},1024)]),"no-data":l(()=>e[25]||(e[25]=[b("span",null," Currently no items on this graph ",-1)])),_:1},8,["headers","items"])]),_:1})]),_:1},8,["modelValue"]),a(K,{class:"px-2"},{default:l(()=>[a(d),a(z,{variant:"outlined",onClick:e[11]||(e[11]=g=>t.$emit("cancel"))},{default:l(()=>e[26]||(e[26]=[m(" Cancel ")])),_:1}),a(z,{variant:"flat",onClick:r.closeOk},{default:l(()=>e[27]||(e[27]=[m(" Ok ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const pe=L(c,[["render",ce]]),ge={props:{modelValue:Boolean,item:{type:Object,required:!0},colors:{type:Array,required:!0}},data:function(){return{editItem:null,limitsName:"NONE",limits:{NONE:[]},valueTypes:["CONVERTED","RAW"],reduction:[{title:"NONE",value:"DECOM"},{title:"REDUCED_MINUTE",value:"REDUCED_MINUTE"},{title:"REDUCED_HOUR",value:"REDUCED_HOUR"},{title:"REDUCED_DAY",value:"REDUCED_DAY"}],reducedTypes:["MIN","MAX","AVG","STDDEV"]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},limitsNames(){return Object.keys(this.limits)}},async created(){this.editItem={...this.item},new ee().get_item(this.item.targetName,this.item.packetName,this.item.itemName).then(t=>{for(const[e,i]of Object.entries(t.limits))Object.keys(i).includes("red_low")&&(this.limits[e]=Object.values(i));this.limitsName=Object.keys(this.limits).find(e=>this.limits[e]+""==this.editItem.limits+"")})}},fe={key:0},ve={class:"pa-3"};function ye(t,e,i,n,s,r){const d=u("v-card-title"),o=u("v-select"),v=u("v-card-text"),p=u("v-spacer"),y=u("v-btn"),D=u("v-card-actions"),_=u("v-card"),k=u("v-dialog");return w(),x(k,{modelValue:r.show,"onUpdate:modelValue":e[9]||(e[9]=f=>r.show=f),width:"400",onKeydown:e[10]||(e[10]=q(f=>t.success(),["enter"]))},{default:l(()=>[a(_,null,{default:l(()=>[a(d,{class:"mb-2"},{default:l(()=>e[11]||(e[11]=[m("Edit Item")])),_:1}),a(v,null,{default:l(()=>[a(o,{variant:"outlined","hide-details":"",label:"Value Type",items:t.valueTypes,modelValue:t.editItem.valueType,"onUpdate:modelValue":e[0]||(e[0]=f=>t.editItem.valueType=f),class:"mb-2"},null,8,["items","modelValue"]),a(o,{variant:"outlined","hide-details":"",label:"Reduction",items:t.reduction,modelValue:t.editItem.reduced,"onUpdate:modelValue":e[1]||(e[1]=f=>t.editItem.reduced=f),class:"mb-2"},null,8,["items","modelValue"]),a(o,{variant:"outlined","hide-details":"",label:"Reduced Type",items:t.reducedTypes,disabled:t.editItem.reduced==="DECOM",modelValue:t.editItem.reducedType,"onUpdate:modelValue":e[2]||(e[2]=f=>t.editItem.reducedType=f),class:"mb-2"},null,8,["items","disabled","modelValue"]),a(o,{variant:"outlined","hide-details":"",label:"Color",items:i.colors,modelValue:t.editItem.color,"onUpdate:modelValue":[e[3]||(e[3]=f=>t.editItem.color=f),e[4]||(e[4]=f=>t.$emit("changeColor",f))],class:"mb-2"},null,8,["items","modelValue"]),r.limitsNames.length>1?(w(),Y("div",fe,[a(o,{variant:"outlined","hide-details":"",label:"Display Limits",items:r.limitsNames,modelValue:t.limitsName,"onUpdate:modelValue":[e[5]||(e[5]=f=>t.limitsName=f),e[6]||(e[6]=f=>t.$emit("changeLimits",t.limits[t.limitsName]))]},null,8,["items","modelValue"]),b("div",ve,S(t.limitsName)+": "+S(t.limits[t.limitsName]),1)])):E("",!0)]),_:1}),a(D,{class:"px-2"},{default:l(()=>[a(p),a(y,{variant:"outlined",onClick:e[7]||(e[7]=f=>t.$emit("cancel"))},{default:l(()=>e[12]||(e[12]=[m(" Cancel ")])),_:1}),a(y,{variant:"flat",onClick:e[8]||(e[8]=f=>t.$emit("close",t.editItem))},{default:l(()=>e[13]||(e[13]=[m(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const we=L(ge,[["render",ye]]),be={components:{GraphEditDialog:pe,GraphEditItemDialog:we},props:{id:{type:Number,required:!0},selectedGraphId:{type:Number},state:{type:String,required:!0},startTime:{type:Number},secondsGraphed:{type:Number,required:!0},pointsSaved:{type:Number,required:!0},pointsGraphed:{type:Number,required:!0},refreshIntervalMs:{type:Number,default:200},hideToolbar:{type:Boolean,default:!1},hideOverview:{type:Boolean,default:!1},sparkline:{type:Boolean,default:!1},initialItems:{type:Array},height:{type:Number},width:{type:Number},timeZone:{type:String,default:"local"}},mixins:[B],data(){return{lines:[],active:!0,expand:!0,fullWidth:!0,fullHeight:!0,graph:null,editGraph:!1,editGraphMenu:!1,editGraphMenuX:0,editGraphMenuY:0,editItem:!1,itemMenu:!1,itemMenuX:0,itemMenuY:0,legendMenu:!1,legendMenuX:0,legendMenuY:0,legendPosition:"bottom",selectedItem:null,hideToolbarData:this.hideToolbar,showOverview:!this.hideOverview,hideOverviewData:this.hideOverview,title:"",overview:null,data:[[]],dataChanged:!1,timeout:null,graphMinY:null,graphMaxY:null,graphStartDateTime:null,graphEndDateTime:null,indexes:{},items:this.initialItems||[],limitsValues:[],drawInterval:null,zoomChart:!1,zoomOverview:!1,cable:new J,subscription:null,needToUpdate:!1,errorDialog:!1,errors:[],colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{calcFullSize:function(){return this.fullWidth||this.fullHeight},error:function(){return this.errorDialog&&this.errors.length>0?JSON.stringify(this.errors,null,4):null}},created(){this.title=`Graph ${this.id}`;for(const[t,e]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(e)]=t+1,e.color===void 0&&(e.color=this.colors[this.colorIndex]),this.colorIndex++,this.colorIndex===this.colors.length&&(this.colorIndex=0)},mounted(){const{chartSeries:t,overviewSeries:e}=this.items.reduce((n,s)=>{const r={spanGaps:!0};return n.chartSeries.push({...r,item:s,label:this.formatLabel(s),stroke:(d,o)=>this.items[o-1].color,width:2,value:(d,o)=>typeof o=="string"||isNaN(o)?"NaN":o==null?"--":o.toFixed(3)}),n.overviewSeries.push({...r}),n},{chartSeries:[],overviewSeries:[]});let i={};if(this.sparkline)this.hideToolbarData=!0,this.hideOverviewData=!0,this.showOverview=!1,i={width:this.width,height:this.height,pxAlign:!1,cursor:{show:!1},select:{show:!1},legend:{show:!1},scales:{x:{time:!1}},axes:[{show:!1},{show:!1}],series:[{},{stroke:"white"}]},this.graph=new M(i,this.data,document.getElementById(`chart${this.id}`));else{let n=Intl.DateTimeFormat().resolvedOptions().timeZone;this.timeZone&&this.timeZone!=="local"&&(n=this.timeZone),i={...this.getSize("chart"),...this.getScales(),...this.getAxes("chart"),plugins:[this.linesPlugin()],tzDate:r=>M.tzDate(new Date(r*1e3),n),series:[{label:"Time",value:(r,d)=>d==null?"--":this.formatSeconds(d,this.timeZone)},...t],cursor:{drag:{x:!0,y:!1},sync:{key:"openc3"},bind:{mouseup:(r,d,o)=>v=>{this.state==="pause"&&r.select.width===0&&this.$emit("start"),o(v)}}},hooks:{setScale:[(r,d)=>{if(d==="x"&&!this.zoomOverview&&this.overview){this.zoomChart=!0;let o=Math.round(this.overview.valToPos(r.scales.x.min,"x")),v=Math.round(this.overview.valToPos(r.scales.x.max,"x"));this.overview.setSelect({left:o,width:v-o}),this.zoomChart=!1}}],setSelect:[r=>{this.state==="start"&&r.select.width>0&&this.$emit("pause")}],ready:[r=>{r.root.querySelector(".u-over").addEventListener("contextmenu",o=>{o.preventDefault(),this.itemMenu=!1,this.legendMenu=!1,this.editGraphMenuX=o.clientX,this.editGraphMenuY=o.clientY,this.editGraphMenu=!0});let d=r.root.querySelector(".u-legend");d.addEventListener("contextmenu",o=>{o.preventDefault(),this.editGraphMenu=!1,this.legendMenu=!1,this.itemMenuX=o.clientX,this.itemMenuY=o.clientY;let v=o.target.closest(".u-series"),p=Array.prototype.slice.call(d.childNodes[0].childNodes).indexOf(v),y=r.series[p];y.item?(this.selectedItem=y.item,this.itemMenu=!0):(this.itemMenu=!1,this.legendMenuX=o.clientX,this.legendMenuY=o.clientY,this.legendMenu=!0)}),d.querySelector("tbody").appendChild(this.$refs.info)}]}},this.graph=new M(i,this.data,document.getElementById(`chart${this.id}`));const s={...this.getSize("overview"),...this.getScales(),...this.getAxes("overview"),tzDate:r=>M.tzDate(new Date(r*1e3),n),series:[...e],cursor:{y:!1,drag:{setScale:!1,x:!0,y:!1}},legend:{show:!1},hooks:{setSelect:[r=>{if(!this.zoomChart){this.state==="start"&&r.select.width>0&&this.$emit("pause"),this.zoomOverview=!0;let d=r.posToVal(r.select.left,"x"),o=r.posToVal(r.select.left+r.select.width,"x");this.graph.setScale("x",{min:d,max:o}),this.zoomOverview=!1}}]}};this.overview=new M(s,this.data,document.getElementById(`overview${this.id}`)),this.moveLegend(this.legendPosition),window.addEventListener("resize",this.resize)}this.state!=="stop"&&this.startGraph()},beforeUnmount:function(){this.stopGraph(),this.cable.disconnect(),window.removeEventListener("resize",this.resize)},watch:{state:function(t,e){switch(t){case"start":e==="stop"&&this.startGraph();break;case"stop":this.stopGraph();break}},data:function(t,e){this.dataChanged=!0},graphMinY:function(t,e){let i=parseFloat(t);isNaN(i)||(this.graphMinY=i),this.setGraphRange()},graphMaxY:function(t,e){let i=parseFloat(t);isNaN(i)||(this.graphMaxY=i),this.setGraphRange()},graphStartDateTime:function(t,e){t&&typeof t=="string"?(this.graphStartDateTime=this.parseDateTime(this.graphStartDateTime,this.timeZone)*1e6,this.graphStartDateTime!==e&&(this.needToUpdate=!0)):t===null&&e&&(this.graphStartDateTime=null,this.needToUpdate=!0)},graphEndDateTime:function(t,e){t&&typeof t=="string"?(this.graphEndDateTime=this.parseDateTime(this.graphEndDateTime,this.timeZone)*1e6,this.graphEndDateTime!==e&&(this.needToUpdate=!0)):t===null&&e&&(this.graphEndDateTime=null,this.needToUpdate=!0)}},methods:{startGraph:function(){this.subscribe(),this.timeout=setTimeout(()=>{this.updateTimeout()},this.refreshIntervalMs)},stopGraph:function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},updateTimeout:function(){this.updateGraphData(),this.timeout=setTimeout(()=>{this.updateTimeout()},this.refreshIntervalMs)},updateGraphData:function(){if(this.state==="pause"||!this.dataChanged)return;this.graph.setData(this.data),this.overview&&this.overview.setData(this.data);let t=this.data[0][this.data[0].length-1],e=this.data[0][this.data[0].length-this.pointsGraphed],i=this.data[0][0];i<t-this.secondsGraphed&&(i=t-this.secondsGraphed),e>i&&(i=e),this.graph.setScale("x",{min:i,max:t}),this.dataChanged=!1},formatLabel(t){if(t.valueType==="CONVERTED"&&t.reduced==="DECOM")return t.itemName;{let e="";return t.valueType!=="CONVERTED"&&(e+=t.valueType),t.reduced!=="DECOM"&&(e!==""&&(e+=" "),e+=`${t.reduced.split("_")[1]} ${t.reducedType}`),`${t.itemName} (${e})`}},moveLegend:function(t){switch(t){case"bottom":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.remove("top-legend");break;case"top":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("top-legend");break;case"left":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.add("side-legend"),this.graph.root.classList.add("left-legend");break;case"right":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("side-legend");break}this.legendPosition=t,this.resize()},clearErrors:function(){this.errors=[]},editGraphClose:function(t){this.editGraph=!1,this.title=t.title,this.legendPosition=t.legendPosition,this.graphMinY=t.graphMinY,this.graphMaxY=t.graphMaxY,this.lines=[...t.lines],this.graphStartDateTime=t.startDateTime,this.graphEndDateTime=t.endDateTime,this.$nextTick(()=>{if(this.needToUpdate){if(this.subscription==null)this.startGraph();else{let e=JSON.parse(JSON.stringify(this.items));this.removeItems(e),setTimeout(()=>{this.addItems(e)},0)}this.needToUpdate=!1}}),this.moveLegend(this.legendPosition),this.$emit("edit")},resize:function(){this.graph.setSize(this.getSize("chart")),this.overview&&this.overview.setSize(this.getSize("overview")),this.$emit("resize",this.id)},expandAll:function(){this.fullWidth=!0,this.fullHeight=!0,this.resize()},collapseAll:function(){this.fullWidth=!1,this.fullHeight=!1,this.resize()},expandWidth:function(){this.fullWidth=!0,this.resize()},collapseWidth:function(){this.fullWidth=!1,this.resize()},expandHeight:function(){this.fullHeight=!0,this.resize()},collapseHeight:function(){this.fullHeight=!1,this.resize()},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-graph",this.id)},setGraphRange:function(){let t=.1;(this.graphMinY||this.graphMinY===0||this.graphMaxY||this.graphMaxY===0)&&(t=0),this.graph.scales.y.range=(e,i,n)=>{let s=i;(this.graphMinY||this.graphMinY===0)&&(s=this.graphMinY);let r=n;return(this.graphMaxY||this.graphMaxY===0)&&(r=this.graphMaxY),M.rangeNum(s,r,t,!0)}},subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:()=>{this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(t=>{this.subscription=t})},getSize:function(t){let e=0;const i=document.getElementById("openc3-nav-drawer");i&&(e=i.classList.contains("v-navigation-drawer--active")?i.clientWidth:0);let n=0;(this.legendPosition==="right"||this.legendPosition==="left")&&(n=document.getElementsByClassName("u-legend")[0].clientWidth);const s=Math.max(document.documentElement.clientWidth,window.innerWidth||0)-e-n,r=Math.max(document.documentElement.clientHeight,window.innerHeight||0),d=document.getElementsByClassName("v-expansion-panel")[0];let o=100;t==="overview"?this.fullHeight&&!this.hideOverviewData?this.showOverview=!0:this.showOverview=!1:(o=r-d.clientHeight-o-250,this.fullHeight||(o=o/2+10));let v=s-68;return this.fullWidth||(v=v/2-10),{width:this.width||v,height:this.height||o}},getScales:function(){return{scales:{x:{range(t,e,i){return e==null?[1566453600,1566497660]:[e,i]}},y:{range(t,e,i){return e==null?[-100,100]:M.rangeNum(e,i,.1,!0)}}}}},getAxes:function(t){let e="rgba(255, 255, 255, .1)",i="white";return{axes:[{stroke:i,grid:{show:!0,stroke:e,width:2}},{size:80,stroke:i,grid:{show:t!=="overview",stroke:e,width:2},values(n,s){return(s.some(r=>r>=1e7)||s.every(r=>r<.01))&&(s=s.map(r=>r.toExponential(3))),s}}]}},closeEditItem:function(t){this.editItem=!1,(this.graphEndDateTime!==null&&this.selectedItem!==t||this.selectedItem.valueType!==t.valueType||this.selectedItem.reduced!==t.reduced||this.selectedItem.reducedType!==t.reducedType)&&this.changeItem(t)},changeColor:function(t){let e=this.subscriptionKey(this.selectedItem),i=this.indexes[e];this.items[i-1].color=t,this.selectedItem.color=t,this.graph.root.querySelectorAll(".u-marker")[i].style.borderColor=t},changeLimits:function(t){let e=this.subscriptionKey(this.selectedItem),i=this.indexes[e];this.items[i-1].limits=t,this.selectedItem.limits=t,this.limitsValues=t},linesPlugin:function(){return{hooks:{draw:t=>{const{ctx:e,bbox:i}=t,n=t.valToPos(t.scales.y.min,"y",!0),s=t.valToPos(t.scales.y.max,"y",!0),r=t.valToPos(this.limitsValues[0],"y",!0),d=t.valToPos(this.limitsValues[1],"y",!0),o=t.valToPos(this.limitsValues[2],"y",!0),v=t.valToPos(this.limitsValues[3],"y",!0);if(this.lines.forEach(p=>{t.scales.y.min<=p.yValue&&p.yValue<=t.scales.y.max&&(e.save(),e.beginPath(),e.strokeStyle=p.color,e.lineWidth=2,e.moveTo(i.left,t.valToPos(p.yValue,"y",!0)),e.lineTo(i.left+i.width,t.valToPos(p.yValue,"y",!0)),e.stroke(),e.restore())}),e.save(),e.beginPath(),e.fillStyle="rgba(255,0,0,0.15)",t.scales.y.min<this.limitsValues[0]){let p=r<s?s:r;e.fillRect(i.left,r,i.width,n-p)}if(t.scales.y.max>this.limitsValues[3]){let p=n<v?n:v;e.fillRect(i.left,s,i.width,p-s)}if(e.fillStyle="rgba(255,255,0,0.15)",t.scales.y.min<this.limitsValues[1]&&t.scales.y.max>this.limitsValues[0]){let p=d<s?s:d;e.fillRect(i.left,p,i.width,r-p)}if(t.scales.y.max>this.limitsValues[2]&&t.scales.y.min<this.limitsValues[3]){let p=n<v?n:v,y=n<o?n:o;e.fillRect(i.left,p,i.width,y-p)}if(e.fillStyle="rgba(0,255,0,0.15)",this.limitsValues.length===4){if(t.scales.y.min<this.limitsValues[2]&&t.scales.y.max>this.limitsValues[1]){let p=o<s?s:o,y=n<d?n:d;e.fillRect(i.left,p,i.width,y-p)}}else{const p=t.valToPos(this.limitsValues[4],"y",!0),y=t.valToPos(this.limitsValues[5],"y",!0);if(t.scales.y.min<this.limitsValues[4]&&t.scales.y.max>this.limitsValues[1]){let k=p<s?s:p;e.fillRect(i.left,k,i.width,d-k)}if(t.scales.y.max>this.limitsValues[5]&&t.scales.y.min<this.limitsValues[2]){let k=n<o?n:o,f=n<y?n:y;e.fillRect(i.left,k,i.width,f-k)}e.fillStyle="rgba(0,0,255,0.15)";let D=y<s?s:y,_=n<p?n:p;e.fillRect(i.left,D,i.width,_-D)}e.stroke(),e.restore()}}}},changeItem:function(t){this.removeItems([this.selectedItem]),this.selectedItem.valueType=t.valueType,this.selectedItem.reduced=t.reduced,this.selectedItem.reducedType=t.reducedType,setTimeout(()=>{this.addItems([this.selectedItem])},0)},addItems:function(t,e="CONVERTED"){t.forEach(i=>{i.valueType||(i.valueType=e),i.color||(i.color=this.colors[this.colorIndex]),i.limits||(i.limits=[]),i.limits.length>0&&(this.limitsValues=i.limits),this.colorIndex=(this.colorIndex+1)%this.colors.length,this.items.push(i);const n=this.data.length;this.graph.addSeries(this.createSeriesConfig(i),n),this.overview&&this.overview.addSeries(this.createOverviewSeriesConfig(),n),this.data.splice(n,0,Array(this.data[0].length)),this.indexes[this.subscriptionKey(i)]=n}),this.updateColorIndex(t),this.addItemsToSubscription(t),this.$emit("resize"),this.$emit("edit")},createSeriesConfig:function(t){return{spanGaps:!0,item:t,label:this.formatLabel(t),stroke:(e,i)=>this.items[i-1].color,width:2,value:(e,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":Math.abs(i)<.01&&i!==0||Math.abs(i)>=1e7?i.toExponential(6):i.toFixed(6)}},createOverviewSeriesConfig:function(){return{spanGaps:!0,stroke:(t,e)=>this.items[e-1].color}},updateColorIndex:function(t){const e=t[t.length-1];if(e){const i=this.colors.indexOf(e.color);i!==-1&&(this.colorIndex=(i+1)%this.colors.length)}},addItemsToSubscription:function(t=this.items){let e=this.startTime;this.graphStartDateTime&&(e=this.graphStartDateTime),this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(i=>{i&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t.map(this.subscriptionKey),start_time:e,end_time:this.graphEndDateTime})})},clearAllData:function(){this.data[0]=[],this.clearData(this.items)},clearData:function(t){for(const e of t.map(this.subscriptionKey)){let i=this.indexes[e];this.data[i]=Array(this.data[0].length).fill(null),this.graph.setData(this.data),this.overview&&this.overview.setData(this.data)}this.data.length===2&&(this.data[0]=[],this.graph.setData(this.data),this.overview.setData(this.data))},removeItems:function(t){this.removeItemsFromSubscription(t);for(const e of t.map(this.subscriptionKey)){const i=this.reorderIndexes(e);this.items.splice(i-1,1),this.data.splice(i,1),this.graph.delSeries(i),this.graph.setData(this.data),this.overview&&(this.overview.delSeries(i),this.overview.setData(this.data))}this.data.length===1&&(this.data[0]=[],this.graph.setData(this.data),this.overview.setData(this.data)),this.$emit("resize"),this.$emit("edit")},removeItemsFromSubscription:function(t=this.items){this.subscription&&this.subscription.perform("remove",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t.map(this.subscriptionKey)})},reorderIndexes:function(t){let e=this.indexes[t];delete this.indexes[t];for(let i in this.indexes)this.indexes[i]>e&&(this.indexes[i]-=1);return e},received:function(t){this.cable.recordPing();for(let e=0;e<t.length;e++){let i=t[e].__time/1e9,n=t[0].length;if(n===0||i>t[0][n-1]){for(let s=0;s<this.data.length;s++)this.data[s].push(null);this.set_data_at_index(this.data[0].length-1,i,t[e])}else{let s=Q(this.data[0],i,this.bs_comparator);if(s>=0)this.set_data_at_index(s,i,t[e]);else{let r=-s-1;for(let d=0;d<this.data.length;d++)this.data[d].splice(r,0,null);this.set_data_at_index(r,i,t[e])}}}if(this.startTime==null&&this.data[0][0]){let e=this.data[0][0]*1e9;this.$emit("started",e)}this.dataChanged=!0},bs_comparator:function(t,e){return t-e},set_data_at_index:function(t,e,i){this.data[0][t]=e;for(const[n,s]of Object.entries(i)){if(n==="time")continue;let r=this.indexes[n];if(r){let d=this.data[r];if(s!=null&&s.raw)d[t]=null;else if(typeof s=="string"){if(d[t]=null,!n.includes("__RAW")){for(let o of this.items)if(this.subscriptionKey(o)===n){this.selectedItem=o;break}this.changeItem({valueType:"RAW",reduced:this.selectedItem.reduced,reducedType:this.selectedItem.reducedType})}}else d[t]=s}}},subscriptionKey:function(t){let e=`${t.reduced}__TLM__${t.targetName}__${t.packetName}__${t.itemName}__${t.valueType}`;return(t.reduced==="REDUCED_MINUTE"||t.reduced==="REDUCED_HOUR"||t.reduced==="REDUCED_DAY")&&(e+=`__${t.reducedType}`),e}}},_e={class:"mx-2"},xe={class:"pa-1",id:"chart",ref:"chart"},Te=["id"],De=["id"],ke={key:5,class:"u-series",ref:"info"};function Ve(t,e,i,n,s,r){const d=u("v-icon"),o=u("v-tooltip"),v=u("v-spacer"),p=u("v-toolbar"),y=u("v-expand-transition"),D=u("v-card"),_=u("graph-edit-dialog"),k=u("v-text-field"),f=u("v-row"),G=u("v-textarea"),z=u("v-btn"),A=u("v-dialog"),V=u("v-list-item-title"),C=u("v-list-item"),$=u("v-list"),U=u("v-menu"),F=u("graph-edit-item-dialog"),K=u("v-list-subheader");return w(),Y("div",{onClick:e[21]||(e[21]=ie(h=>t.$emit("click"),["prevent"]))},[a(D,null,{default:l(()=>[I(a(p,{height:"24",class:ae(["pl-2 pr-2",i.selectedGraphId===i.id?"active":""])},{default:l(()=>[I(b("div",_e,[a(o,{text:"Errors",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:e[0]||(e[0]=W=>s.errorDialog=!0)}),{default:l(()=>e[22]||(e[22]=[m(" mdi-alert ")])),_:2},1040)]),_:1})],512),[[N,s.errors.length!==0]]),a(o,{text:"Edit",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:e[1]||(e[1]=W=>s.editGraph=!0),"data-test":"edit-graph-icon"}),{default:l(()=>e[23]||(e[23]=[m(" mdi-pencil ")])),_:2},1040)]),_:1}),a(v),b("span",null,S(s.title),1),a(v),I(b("div",null,[r.calcFullSize?(w(),x(o,{key:0,text:"Collapse",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.collapseAll,"data-test":"collapse-all"}),{default:l(()=>e[24]||(e[24]=[m(" mdi-arrow-collapse ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Expand",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.expandAll,"data-test":"expand-all"}),{default:l(()=>e[25]||(e[25]=[m(" mdi-arrow-expand ")])),_:2},1040,["onClick"])]),_:1}))],512),[[N,s.expand]]),I(b("div",null,[s.fullWidth?(w(),x(o,{key:0,text:"Collapse Width",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.collapseWidth,"data-test":"collapse-width"}),{default:l(()=>e[26]||(e[26]=[m(" mdi-arrow-collapse-horizontal ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Expand Width",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.expandWidth,"data-test":"expand-width"}),{default:l(()=>e[27]||(e[27]=[m(" mdi-arrow-expand-horizontal ")])),_:2},1040,["onClick"])]),_:1}))],512),[[N,s.expand]]),I(b("div",null,[s.fullHeight?(w(),x(o,{key:0,text:"Collapse Height",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.collapseHeight,"data-test":"collapse-height"}),{default:l(()=>e[28]||(e[28]=[m(" mdi-arrow-collapse-vertical ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Expand Height",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.expandHeight,"data-test":"expand-height"}),{default:l(()=>e[29]||(e[29]=[m(" mdi-arrow-expand-vertical ")])),_:2},1040,["onClick"])]),_:1}))],512),[[N,s.expand]]),s.expand?(w(),x(o,{key:0,text:"Minimize",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.minMaxTransition,"data-test":"minimize-screen-icon"}),{default:l(()=>e[30]||(e[30]=[m(" mdi-window-minimize ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Maximize",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.minMaxTransition,"data-test":"maximize-screen-icon"}),{default:l(()=>e[31]||(e[31]=[m(" mdi-window-maximize ")])),_:2},1040,["onClick"])]),_:1})),a(o,{text:"Close",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:e[2]||(e[2]=W=>t.$emit("close-graph")),"data-test":"close-graph-icon"}),{default:l(()=>e[32]||(e[32]=[m(" mdi-close-box ")])),_:2},1040)]),_:1})]),_:1},8,["class"]),[[N,!s.hideToolbarData]]),a(y,null,{default:l(()=>[I(b("div",xe,[b("div",{id:`chart${i.id}`},null,8,Te),e[33]||(e[33]=b("div",{id:"betweenCharts"},null,-1)),I(b("div",{id:`overview${i.id}`},null,8,De),[[N,s.showOverview]])],512),[[N,s.expand]])]),_:1})]),_:1}),s.editGraph?(w(),x(_,{key:0,modelValue:s.editGraph,"onUpdate:modelValue":e[3]||(e[3]=h=>s.editGraph=h),title:s.title,"legend-position":s.legendPosition,items:s.items,"graph-min-y":s.graphMinY,"graph-max-y":s.graphMaxY,lines:s.lines,colors:s.colors,"start-date-time":s.graphStartDateTime,"end-date-time":s.graphEndDateTime,"time-zone":i.timeZone,onRemove:e[4]||(e[4]=h=>r.removeItems([h])),onOk:r.editGraphClose,onCancel:e[5]||(e[5]=h=>s.editGraph=!1)},null,8,["modelValue","title","legend-position","items","graph-min-y","graph-max-y","lines","colors","start-date-time","end-date-time","time-zone","onOk"])):E("",!0),a(A,{modelValue:s.errorDialog,"onUpdate:modelValue":e[7]||(e[7]=h=>s.errorDialog=h),"max-width":"600"},{default:l(()=>[a(p,{height:"24"},{default:l(()=>[a(v),e[34]||(e[34]=b("span",null," Errors ",-1)),a(v)]),_:1}),a(D,{class:"pa-3"},{default:l(()=>[a(f,{dense:""},{default:l(()=>[a(k,{readonly:"","hide-details":"",modelValue:s.title,"onUpdate:modelValue":e[6]||(e[6]=h=>s.title=h),class:"pb-2",label:"Graph Title"},null,8,["modelValue"])]),_:1}),a(f,{class:"my-3"},{default:l(()=>[a(G,{readonly:"",rows:"8",value:r.error},null,8,["value"])]),_:1}),a(f,null,{default:l(()=>[a(z,{block:"",onClick:r.clearErrors},{default:l(()=>e[35]||(e[35]=[m(" Clear ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),s.editGraphMenu?(w(),x(U,{key:1,modelValue:s.editGraphMenu,"onUpdate:modelValue":e[9]||(e[9]=h=>s.editGraphMenu=h),target:[s.editGraphMenuX,s.editGraphMenuY],absolute:"","offset-y":""},{default:l(()=>[a($,null,{default:l(()=>[a(C,{onClick:e[8]||(e[8]=h=>s.editGraph=!0)},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>[m(" Edit "+S(s.title),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):E("",!0),s.editItem?(w(),x(F,{key:2,modelValue:s.editItem,"onUpdate:modelValue":e[10]||(e[10]=h=>s.editItem=h),colors:s.colors,item:s.selectedItem,onChangeColor:r.changeColor,onChangeLimits:r.changeLimits,onCancel:e[11]||(e[11]=h=>s.editItem=!1),onClose:r.closeEditItem},null,8,["modelValue","colors","item","onChangeColor","onChangeLimits","onClose"])):E("",!0),s.itemMenu?(w(),x(U,{key:3,modelValue:s.itemMenu,"onUpdate:modelValue":e[15]||(e[15]=h=>s.itemMenu=h),target:[s.itemMenuX,s.itemMenuY],absolute:"","offset-y":""},{default:l(()=>[a($,{nav:"",density:"compact"},{default:l(()=>[a(K,null,{default:l(()=>[m(S(s.selectedItem.targetName)+" "+S(s.selectedItem.packetName)+" "+S(s.selectedItem.itemName),1)]),_:1}),a(C,{onClick:e[12]||(e[12]=h=>s.editItem=!0)},{prepend:l(()=>[a(d,{icon:"mdi-pencil"})]),default:l(()=>[a(V,null,{default:l(()=>e[36]||(e[36]=[m(" Edit ")])),_:1})]),_:1}),a(C,{onClick:e[13]||(e[13]=h=>r.clearData([s.selectedItem]))},{prepend:l(()=>[a(d,{icon:"mdi-eraser"})]),default:l(()=>[a(V,null,{default:l(()=>e[37]||(e[37]=[m(" Clear ")])),_:1})]),_:1}),a(C,{onClick:e[14]||(e[14]=h=>r.removeItems([s.selectedItem]))},{prepend:l(()=>[a(d,{icon:"mdi-delete"})]),default:l(()=>[a(V,null,{default:l(()=>e[38]||(e[38]=[m(" Delete ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):E("",!0),s.legendMenu?(w(),x(U,{key:4,modelValue:s.legendMenu,"onUpdate:modelValue":e[20]||(e[20]=h=>s.legendMenu=h),target:[s.legendMenuX,s.legendMenuY],absolute:"","offset-y":""},{default:l(()=>[a($,null,{default:l(()=>[a(C,{onClick:e[16]||(e[16]=h=>r.moveLegend("top"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[39]||(e[39]=[m(" Legend Top ")])),_:1})]),_:1}),a(C,{onClick:e[17]||(e[17]=h=>r.moveLegend("bottom"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[40]||(e[40]=[m(" Legend Bottom ")])),_:1})]),_:1}),a(C,{onClick:e[18]||(e[18]=h=>r.moveLegend("left"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[41]||(e[41]=[m(" Legend Left ")])),_:1})]),_:1}),a(C,{onClick:e[19]||(e[19]=h=>r.moveLegend("right"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[42]||(e[42]=[m(" Legend RIght ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):E("",!0),i.sparkline?E("",!0):(w(),Y("div",ke,[a(o,{text:"Click item to toggle, Right click to edit",location:"top"},{activator:l(({props:h})=>[a(d,se(le(h)),{default:l(()=>e[43]||(e[43]=[m(" mdi-information-variant-circle ")])),_:2},1040)]),_:1})],512))])}const Ee=j("S",L(be,[["render",Ve],["__scopeId","data-v-485a5da2"]]));function Ce(t,e,i){const n=R(t,void 0);if(isNaN(e))return H(t,NaN);if(!e)return n;const s=n.getDate(),r=H(t,n.getTime());r.setMonth(n.getMonth()+e+1,0);const d=r.getDate();return s>=d?r:(n.setFullYear(r.getFullYear(),r.getMonth(),s),n)}function Me(t,e,i){return te(t,-e,i)}function Ie(t,e,i){return Ce(t,-e)}function Ne(t,e,i){const{years:n=0,months:s=0,weeks:r=0,days:d=0,hours:o=0,minutes:v=0,seconds:p=0}=e,y=Ie(t,s+n*12),D=Me(y,d+r*7,i),_=v+o*60,k=(p+_*60)*1e3;return H(t,+D-k)}const Oe=j("_",{mixins:[ne],data:function(){return{id:Math.floor(Math.random()*1e11),state:"start",items:[{targetName:this.parameters[0],packetName:this.parameters[1],itemName:this.parameters[2],valueType:this.parameters[3]||"CONVERTED",reduced:this.parameters[4]||"DECOM",reducedType:this.parameters[5]||null}],startTime:null,secondsGraphed:3600,pointsSaved:3600,pointsGraphed:3600,size:{height:300,width:400}}},created:function(){this.appliedSettings.forEach(t=>{switch(t[0]){case"ITEM":this.items.push({targetName:t[1],packetName:t[2],itemName:t[3],valueType:t[4]||"CONVERTED",reduced:t[5]||"DECOM",reducedType:t[6]||null});case"STARTTIME":let e=P(t[1],"yyyy/MM/dd HH:mm:ss",new Date);this.startTime=e.getTime()*1e6;break;case"HISTORY":let i=parseInt(t[1].slice(0,t[1].length-1)),n=null,s=1;switch(t[1][t[1].length-1]){case"d":n="days",s=3600*24;break;case"h":n="hours",s=3600;break;case"m":n="minutes",s=60;break;case"s":n="seconds";break;default:throw new Error(`Unknown time suffix: ${t[1]}!`)}let r={};r[n]=i,this.startTime=Ne(new Date,r).getTime()*1e6,i*s>this.secondsGraphed&&(this.secondsGraphed=i*s),i*s>this.pointsSaved&&(this.pointsSaved=i*s),i*s>this.pointsGraphed&&(this.pointsGraphed=i*s);break;case"SECONDSGRAPHED":this.secondsGraphed=parseInt(t[1]);break;case"POINTSSAVED":this.pointsSaved=parseInt(t[1]);break;case"POINTSGRAPHED":this.pointsGraphed=parseInt(t[1]);break;case"SIZE":this.size.width=parseInt(t[1]),this.size.height=parseInt(t[2]);break}}),this.items=this.items.map(t=>{let e=t.itemName;if(t.itemName.includes("[["))t.itemName=t.itemName.replace("[[","[").replace("]]","]"),e=t.itemName;else if(t.itemName.includes("[")){let i=t.itemName.match(/\[(\d+)\]/);this.arrayIndex=parseInt(i[1]),e=t.itemName.replace(i[0],"")}return this.$emit("addItem",`${t.targetName}__${t.packetName}__${e}__${t.valueType}`,!0),t})},destroyed(){this.items.map(t=>this.$emit("deleteItem",`${t.targetName}__${t.packetName}__${t.itemName}__${t.valueType}`))}})}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Layout-D4YBjuWs-9760d49d47be7ac41a9f.js","vue","./main-80e32c674d54e3083df2.js","./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue-router","single-spa","vuex","vuetify"],function(d,k){"use strict";var a,s,i,c,o,u,m,g,p,f;return{setters:[e=>{a=e.r},e=>{s=e.openBlock,i=e.createElementBlock,c=e.normalizeStyle,o=e.Fragment,u=e.renderList,m=e.createBlock,g=e.resolveDynamicComponent,p=e.mergeProps},e=>{f=e.s},null,null,null,null,null],execute:function(){const e={mixins:[a],created:function(){if(this.parameters[0]){let n=this.parameters[0];this.widgets.forEach(l=>{l.settings.find(r=>r[0]==="MARGIN"||r[0]==="RAW"&&r[1].toUpperCase().includes("MARGIN"))===void 0&&l.settings.push(["MARGIN",n])})}}};function y(n,l,r,h,w,x){return s(),i("div",{ref:"container",class:"d-flex flex-row",style:c(n.computedStyle)},[(s(!0),i(o,null,u(n.widgets,(t,v)=>(s(),m(g(t.type),p({ref_for:!0},n.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],4)}const B=d("default",f(e,[["render",y]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./HorizontalWidget-B7YdcFVN-dba3e24e89fce8121643.js","./Layout-D4YBjuWs-9760d49d47be7ac41a9f.js","vue","./main-80e32c674d54e3083df2.js","./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue-router","single-spa","vuex","vuetify"],function(m,f){"use strict";var r,i,n,l,o,s,a,c,u,p,d,g;return{setters:[e=>{r=e.default},e=>{i=e.r},e=>{n=e.resolveComponent,l=e.openBlock,o=e.createElementBlock,s=e.createVNode,a=e.normalizeStyle,c=e.withCtx,u=e.createTextVNode,p=e.toDisplayString,d=e.mergeProps},e=>{g=e.s},null,null,null,null,null],execute:function(){const e={mixins:[i],components:{HorizontalWidget:r}};function v(t,w,S,B,N,V){const y=n("v-banner"),x=n("horizontal-widget");return l(),o("div",null,[s(y,{class:"boxbanner",style:a(t.computedStyle),"single-line":""},{default:c(()=>[u(p(t.parameters[0]),1)]),_:1},8,["style"]),s(x,d(t.listeners,{parameters:t.parameters.slice(1),settings:t.appliedSettings,widgets:t.widgets,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"screen-id":t.screenId}),null,16,["parameters","settings","widgets","screen-values","screen-time-zone","screen-id"])])}const z=m("default",g(e,[["render",v],["__scopeId","data-v-e9e6c14b"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(l,c){"use strict";var n,t,u;return{setters:[e=>{n=e.openBlock,t=e.createElementBlock},e=>{u=e.s},null,null,null,null],execute:function(){const e={};function r(o,i){return n(),t("hr")}const s=l("default",u(e,[["render",r]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js","vue","./main-80e32c674d54e3083df2.js","vue-router","single-spa","vuex","vuetify"],function(y,b){"use strict";var o,g,m,p,R;return{setters:[r=>{o=r.o},r=>{g=r.openBlock,m=r.createElementBlock,p=r.normalizeStyle},r=>{R=r.s},null,null,null,null],execute:function(){var r={},t={},d;function U(){return d||(d=1,Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|:)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"),t}var f;function _(){if(f)return r;f=1,Object.defineProperty(r,"__esModule",{value:!0}),r.sanitizeUrl=void 0;var e=U();function x(i){return e.relativeFirstCharacters.indexOf(i[0])>-1}function v(i){var l=i.replace(e.ctrlCharactersRegex,"");return l.replace(e.htmlEntitiesRegex,function(n,a){return String.fromCharCode(a)})}function C(i){return URL.canParse(i)}function h(i){try{return decodeURIComponent(i)}catch{return i}}function w(i){if(!i)return e.BLANK_URL;var l,n=h(i.trim());do n=v(n).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),n=h(n),l=n.match(e.ctrlCharactersRegex)||n.match(e.htmlEntitiesRegex)||n.match(e.htmlCtrlEntityRegex)||n.match(e.whitespaceEscapeCharsRegex);while(l&&l.length>0);var a=n;if(!a)return e.BLANK_URL;if(x(a))return a;var E=a.trimStart(),L=E.match(e.urlSchemeRegex);if(!L)return a;var s=L[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(s))return e.BLANK_URL;var u=E.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return u;if(s==="http:"||s==="https:"){if(!C(u))return e.BLANK_URL;var c=new URL(u);return c.protocol=c.protocol.toLowerCase(),c.hostname=c.hostname.toLowerCase(),c.toString()}return u}return r.sanitizeUrl=w,r}var B=_();const F={mixins:[o],data:function(){return{width:800,height:600,url:B.sanitizeUrl(this.parameters[0])}},created:function(){this.setWidth(this.parameters[1],"px",this.width),this.setHeight(this.parameters[2],"px",this.height)}},S=["src","width","height"];function N(e,x,v,C,h,w){return g(),m("iframe",{title:"IFrameWidget",src:e.url,width:e.width,height:e.height,style:p(e.computedStyle)},null,12,S)}const A=y("default",R(F,[["render",N]]))}}});
|