openc3-cosmos-tool-dataextractor 6.0.2 → 6.1.0
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-DzHELdHv-911dfe4a06bae2114173.js +2 -0
- data/tools/dataextractor/ArrayplotWidget-BDvziGSm-311b349e088569ec033f.js +1 -0
- data/tools/dataextractor/{BarColumn-B6tCmNJm-6a949f6a26b37b195a7f.js → BarColumn-CNhS2KKq-7463acb9af16efe470c2.js} +1 -1
- data/tools/dataextractor/BlockWidget-D0On4x3d-e07912d2465b215269c6.js +2 -0
- data/tools/dataextractor/{ButtonWidget-CHrHS_Bw-fb33e464b92e99d7088a.js → ButtonWidget-BOYLHMt4-1cdba96e41e4c1009074.js} +2 -2
- data/tools/dataextractor/CanvasWidget-CQIqiLEy-b8424d05341c1a0e4bc4.js +1 -0
- data/tools/dataextractor/CanvasdotWidget-BVWutPMF-473ac4fb912bbb2a59d9.js +1 -0
- data/tools/dataextractor/{CanvasimageWidget-BrYlPQCf-aa35419e31ba5c4a8c59.js → CanvasimageWidget-ayu_ASKf-15c32118f7bc9d3a0a7b.js} +1 -1
- data/tools/dataextractor/{CanvasimagevalueWidget-HnEOXmZy-5f4a8e64639ec1e9d09e.js → CanvasimagevalueWidget-mv319g5T-6e4204b5dd56d34564b0.js} +1 -1
- data/tools/dataextractor/CanvaslabelWidget-BNjbXDb8-b182cd3e07602bae5a58.js +1 -0
- data/tools/dataextractor/{CanvaslabelvalueWidget-0zRDJav3-6e35ee7976f9a1810aab.js → CanvaslabelvalueWidget-CrhPwTSP-9d2934d1834fb2334739.js} +1 -1
- data/tools/dataextractor/CanvaslineWidget--HdKH6oO-cc3532892560737b6a17.js +1 -0
- data/tools/dataextractor/CanvaslinevalueWidget-CJsuF6RY-18cc08e6a7534a02deb9.js +1 -0
- data/tools/dataextractor/CheckbuttonWidget-CQ2HlgIk-994685eb1f1cde17571d.js +1 -0
- data/tools/dataextractor/ComboboxWidget-BxILACwz-764a03e09de9ff2597c8.js +1 -0
- data/tools/dataextractor/DataExtractor-f00fad6da69a5009c850.js +10 -0
- data/tools/dataextractor/{DateWidget-FtYD86xW-565045cc12f1d3e5cb17.js → DateWidget-CIkO0xqH-fbd4bf6f640e67db3dc3.js} +1 -1
- data/tools/dataextractor/{DetailsDialog-DiVcC3Fg-487ebbee41c3e5252082.js → DetailsDialog-DyGpm5TP-268553abdce61faccf38.js} +1 -1
- data/tools/dataextractor/{DynamicWidget-m9EliUR2-1c3200485aaa974e6fd1.js → DynamicWidget-gFSYxzvT-c0fc6591fc63c7f9df1a.js} +1 -1
- data/tools/dataextractor/{FormatvalueWidget-OykwwCrw-d47fb6e27f3ff1b378cd.js → FormatvalueWidget-D8-EO_3E-38caa46d184c7cf14f57.js} +1 -1
- data/tools/dataextractor/Graph-EV7oK3qM-cead834890227a79d91f.js +1 -0
- data/tools/dataextractor/GraphWidget-BTNYbd21-2b9b1a56b2124096228f.js +1 -0
- data/tools/dataextractor/{HorizontalWidget-B7YdcFVN-dba3e24e89fce8121643.js → HorizontalWidget-Bp-qtqoh-7aa6def2672970cf843c.js} +1 -1
- data/tools/dataextractor/HorizontalboxWidget-CrJuGY3s-ba68f8fe3a645a10aed6.js +1 -0
- data/tools/dataextractor/HorizontallineWidget-CbxREBYI-ef76ec5724b1f7283601.js +1 -0
- data/tools/dataextractor/{IframeWidget-0C7GYEVc-e7ba031909460f5acbe7.js → IframeWidget-DusiWNNj-d4926021068476421885.js} +1 -1
- data/tools/dataextractor/ImageLoader-BapCB-Li-2655302822aa2f65d5d1.js +1 -0
- data/tools/dataextractor/{ImageviewerWidget-B4HbUIfR-85bbceb204b4b453860b.js → ImageviewerWidget-c0gJ9VDC-f2768ba5d4da12e13ba6.js} +1 -1
- data/tools/dataextractor/{LabelWidget-D1JhQAzR-ce20e60fbbbe57e4bd55.js → LabelWidget-pPgc0ve3-dd9449fc4b942c9ab9cb.js} +1 -1
- data/tools/dataextractor/{LabelledWidget-C2VGJ5OJ-74e2097e134d5c35bfbf.js → LabelledWidget-CkNjby55-a2c6e56599eb94dd6f56.js} +1 -1
- data/tools/dataextractor/{LabelprogressbarWidget-DN0cAeLK-7afdf9d9d638e3d758e5.js → LabelprogressbarWidget-e2R2yQKw-5fe5fadf25f87376ea6c.js} +1 -1
- data/tools/dataextractor/LabelsparklineWidget-D7MQ_oNw-f1c7cad178ef8b563e50.js +1 -0
- data/tools/dataextractor/LabelvalueWidget-4DShBBvr-de19f28bffa85063ffab.js +1 -0
- data/tools/dataextractor/{LabelvaluedescWidget-DtJwggDu-7c25c7ebc0757057fc77.js → LabelvaluedescWidget-Z1m8Bi6N-39e4801961ae325804d1.js} +1 -1
- data/tools/dataextractor/LabelvaluelimitsbarWidget-DVa-oYxU-32a33d0ade68f808cfe4.js +1 -0
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-DduuX632-93cde440bbc0f0d9fff8.js +1 -0
- data/tools/dataextractor/{LabelvaluerangebarWidget-DCJ42bmf-f6bc0f83a35f89e00c36.js → LabelvaluerangebarWidget-BR9vXOlt-70907955b185db896911.js} +1 -1
- data/tools/dataextractor/{Layout-D4YBjuWs-9760d49d47be7ac41a9f.js → Layout-Bk8EGxbP-a8ea9b6bff58d1b7adc0.js} +1 -1
- data/tools/dataextractor/LedWidget-f7bf8ls_-e7dd70ceeecf0fac67f0.js +1 -0
- data/tools/dataextractor/{LimitsbarWidget-D-wfz_St-b9383b82d644fa7cb98d.js → LimitsbarWidget-B7fHaDcJ-99972269ce14d774ff03.js} +1 -1
- data/tools/dataextractor/{LimitscolorWidget-B0AVGdkz-25d41627ca4119391a27.js → LimitscolorWidget-CpC4D_TC-fa82b45c590e3b16e151.js} +1 -1
- data/tools/dataextractor/{LimitscolumnWidget-Dt5ce4hN-ee0ad52298811b3b08e9.js → LimitscolumnWidget-C9FbNC-U-c18d984e3a5f62c62c23.js} +1 -1
- data/tools/dataextractor/LinegraphWidget-DkWDQ_3K-2d27a9558dfbcbad7cbe.js +1 -0
- data/tools/dataextractor/{MatrixbycolumnsWidget-wLx4NvXV-845a8aeaf520b2ffd03d.js → MatrixbycolumnsWidget-CHJDyYa3-d658d6f02f6c3eaed1ba.js} +1 -1
- data/tools/dataextractor/{ProgressbarWidget-B7l0BBiX-fa52db0d6d1744d9de05.js → ProgressbarWidget-CRZDxClT-b2a8ea62290c8cafd9dc.js} +1 -1
- data/tools/dataextractor/RadiobuttonWidget-BW4yFweH-829f30046aa140e860f9.js +1 -0
- data/tools/dataextractor/{RadiogroupWidget-Busjqikr-4ec7aac22cfe367897c7.js → RadiogroupWidget-_0bVCHjr-9dd9ec69cb715cbb4237.js} +1 -1
- data/tools/dataextractor/{RangebarWidget-DbYrwEfC-daea125f7589b80838f3.js → RangebarWidget-CEQFiG4l-4d77edcc7070c3611377.js} +1 -1
- data/tools/dataextractor/{RollupWidget-rKxLXuCv-317598f5fa8e45ef1b44.js → RollupWidget-579c7y0R-6630ef0c66f4dffcde30.js} +1 -1
- data/tools/dataextractor/ScrollwindowWidget-Kcre9gM3-b8fd13204cfd030b34fc.js +1 -0
- data/tools/dataextractor/{SignalWidget-h-oivReC-955e32f809ab1c371826.js → SignalWidget-D55Myd0q-a97089b594010b664f64.js} +1 -1
- data/tools/dataextractor/{SpacerWidget-BSy9eOlB-c89463d660f2d3683033.js → SpacerWidget-DBDv_w_s-4627fe745c5301bb67b4.js} +1 -1
- data/tools/dataextractor/SparklineWidget-DJvIL24z-f5f3e210d2fbd8007981.js +1 -0
- data/tools/dataextractor/TabbookWidget-DH9DHnp1-de9198a833efa5c639a9.js +1 -0
- data/tools/dataextractor/TextboxWidget-DCjIEzJn-307c27ce19ab06bdc8e9.js +1 -0
- data/tools/dataextractor/{TextfieldWidget-aVRdXRsT-24938d63f287872f1830.js → TextfieldWidget-BRQ6oPzR-0523addc458821342e27.js} +1 -1
- data/tools/dataextractor/{TimeWidget-BE2rtMxg-38e9bf584b6d8c4f5012.js → TimeWidget-pXtrK5IC-41576741cf272f4f129c.js} +1 -1
- data/tools/dataextractor/TitleWidget-CfAa2SyT-c7c1593de7b74fc64020.js +1 -0
- data/tools/dataextractor/VWidget-CN_afCKJ-83650d219e432104ed67.js +1 -0
- data/tools/dataextractor/ValueWidget-DIFivXw_-bef0458b0f71aac8244b.js +1 -0
- data/tools/dataextractor/ValuelimitsbarWidget-Cb7_SIUF-c6f8b83c92cb449d0b31.js +1 -0
- data/tools/dataextractor/ValuelimitscolumnWidget-D8bgZ7YP-356c6698b02fac230775.js +1 -0
- data/tools/dataextractor/ValuerangebarWidget-VKygtFwP-2c522439ff6cb1c69d76.js +1 -0
- data/tools/dataextractor/{VerticalWidget-DziyURNu-3e67ee4f4de9fd1df20f.js → VerticalWidget-BuvedA_b-df5ccf5192e336f567ad.js} +1 -1
- data/tools/dataextractor/VerticalboxWidget-D_LcL3GF-94e3daa45026f8c811c8.js +1 -0
- data/tools/dataextractor/{Widget-C7ms_xDE-a17eef2ddcd666c67dc7.js → Widget-CERFa1CU-dbdc97f7724eeef5b94c.js} +1 -1
- data/tools/dataextractor/main-86c9719144ea13616cad.js +1420 -0
- data/tools/dataextractor/main.js +1 -1
- metadata +69 -67
- data/tools/dataextractor/ArrayWidget-DBpEoQ1y-1c0b61d5aa91fcdccd47.js +0 -2
- data/tools/dataextractor/BlockWidget-Bmi0UcUW-2ecaaec709c8f96e50c3.js +0 -2
- data/tools/dataextractor/CanvasWidget-BqdyLbQz-a6307c239d854ea24c12.js +0 -1
- data/tools/dataextractor/CanvasdotWidget-YYwca104-eaddbe7e07d47fdd9ceb.js +0 -1
- data/tools/dataextractor/CanvaslabelWidget-BfMHNei--56787479f6430aec4563.js +0 -1
- data/tools/dataextractor/CanvaslineWidget-BmOwJP_G-9aafd363ce9369484ed0.js +0 -1
- data/tools/dataextractor/CanvaslinevalueWidget-H3L1aUKM-e0588c9e703be02e94f1.js +0 -1
- data/tools/dataextractor/CheckbuttonWidget-BnT9X7wE-2db801bd269382b7d7fc.js +0 -1
- data/tools/dataextractor/ComboboxWidget-BykAAoxH-940db69dc812c271778d.js +0 -1
- data/tools/dataextractor/DataExtractor-d79b9c10bf6e7cad9e7a.js +0 -10
- data/tools/dataextractor/GraphWidget-BohHW-97-4cf819901d3dfd16cfbf.js +0 -1
- data/tools/dataextractor/HorizontalboxWidget-D-kCNwI3-a2d0d73ec7d97fd7a333.js +0 -1
- data/tools/dataextractor/HorizontallineWidget-BdlNB951-9a8865ddf3fc0386af74.js +0 -1
- data/tools/dataextractor/ImageLoader-y6fAZe9P-c20cfe51413bd1cebe0b.js +0 -1
- data/tools/dataextractor/LabelsparklineWidget--sxBENxs-1e3fadbb4231d6122c4b.js +0 -1
- data/tools/dataextractor/LabelvalueWidget-BWpP5KX6-4c01c369a8b114772197.js +0 -1
- data/tools/dataextractor/LabelvaluelimitsbarWidget-Bj6UVK-5-fc03971a7f003e2468b5.js +0 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-BVcEEcUx-aeeceaba68b98bbec596.js +0 -1
- data/tools/dataextractor/LedWidget-hN9JHxjr-aa126047636e683a64d5.js +0 -1
- data/tools/dataextractor/LinegraphWidget-CTjtvtPd-d67446b7ee79a8be6c08.js +0 -1
- data/tools/dataextractor/RadiobuttonWidget-B032jKIw-2ec3d31ede2fbcaa126c.js +0 -1
- data/tools/dataextractor/ScrollwindowWidget-D4NKIzQO-cf26c4fc496bc4018b51.js +0 -1
- data/tools/dataextractor/SparklineWidget-C9vdxar--27b1f5fc7cd1b1f0de22.js +0 -1
- data/tools/dataextractor/TabbookWidget-DTFTKURm-4b23ee161c660f030255.js +0 -1
- data/tools/dataextractor/TextboxWidget-BZyYHmBq-31c2410278a883f5a0e9.js +0 -1
- data/tools/dataextractor/TitleWidget-BB29MZb2-6bef4ca9b93f1c41c208.js +0 -1
- data/tools/dataextractor/VWidget-CGdM4sTw-729e8b3fcd6166b783f1.js +0 -1
- data/tools/dataextractor/ValueWidget-h3905woQ-181f3cb5fa186ab9aaab.js +0 -1
- data/tools/dataextractor/ValuelimitsbarWidget-LMXYjWtS-b5b6df51ba804638df3d.js +0 -1
- data/tools/dataextractor/ValuelimitscolumnWidget-gA3ZcfAT-fe271b28898c0abf8bf1.js +0 -1
- data/tools/dataextractor/ValuerangebarWidget-DwZ9KQ0O-ad198b8a9de3a696ca72.js +0 -1
- data/tools/dataextractor/VerticalboxWidget-OcoZBsFU-1a3baa11d1f3bca90fca.js +0 -1
- data/tools/dataextractor/main-80e32c674d54e3083df2.js +0 -1420
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 722b38675c746c526c33d439ab4c46994b3c458dab870d526bbb91d4b9eb24df
|
4
|
+
data.tar.gz: 8b1734234eaa17bc10a6f89be887e56c38f9530970da7373f3d1eafd2653af53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a706a4a89dfdb55c50814575f0156842c2743ea8964882eadf91b642a9a9e6f90c63040707c7f0084adf6d56111a2e9fb1db75ecf907e832a0b99f7dc3b5afc
|
7
|
+
data.tar.gz: 3948bb1b7e9d5d799c8767aca7365ffacee7cdfe8d09e34ca6b60f6c195b11f52c5dec611b2e34b73fe188c93494112ea238a55ec9b0509239871dc52d36f188
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./main-86c9719144ea13616cad.js","vue","./DetailsDialog-DyGpm5TP-268553abdce61faccf38.js","single-spa","./VWidget-CN_afCKJ-83650d219e432104ed67.js","vue-router","vuex","vuetify","./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js"],function(_,R){"use strict";var h,a,c,u,i,d,p,l,g,f,v,w,y,C,x,V;return{setters:[t=>{h=t.s},t=>{a=t.resolveComponent,c=t.createElementBlock,u=t.openBlock,i=t.createVNode,d=t.normalizeStyle,p=t.normalizeClass,l=t.withCtx,g=t.Fragment,f=t.renderList,v=t.createBlock,w=t.withModifiers,y=t.createTextVNode,C=t.toDisplayString},t=>{x=t.P},null,t=>{V=t.L},null,null,null,null],execute:function(){const t={components:{DetailsDialog:x},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 n="",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"?n+=sprintf(this.formatter,m):n+=m,o+=1,o%this.itemsPerRow===0?(o=0,n+=D):n+=k;return n.trim()}else return e}}},S={class:"array-widget-container"};function B(e,r,n,k,D,o){const m=a("v-textarea"),z=a("v-list-item-title"),L=a("v-list-item"),M=a("v-list"),N=a("v-menu"),P=a("details-dialog");return u(),c("div",S,[i(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:p(e.valueClass),style:d([e.computedStyle,o.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),i(N,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=s=>e.contextMenuShown=s),target:[e.x,e.y]},{default:l(()=>[i(M,null,{default:l(()=>[(u(!0),c(g,null,f(e.contextMenuOptions,(s,E)=>(u(),v(L,{key:E,onClick:w(s.action,["stop"])},{default:l(()=>[i(z,null,{default:l(()=>[y(C(s.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(P,{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2],modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=s=>e.viewDetails=s)},null,8,["target-name","packet-name","item-name","modelValue"])])}const T=_("default",h(t,[["render",B],["__scopeId","data-v-62b9e9e1"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./main-86c9719144ea13616cad.js","./GraphWidget-BTNYbd21-2b9b1a56b2124096228f.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js"],function(m,_){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.s,l=s.A,h=s.L},s=>{d=s._},s=>{u=s.createElementBlock,p=s.openBlock},null,null,null,null,null],execute:function(){const s={data:function(){return{items:[],indexes:{},data:[[]],cable:new h,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},mixins:[d],created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:parseFloat(e[1]),step:parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return p(),u("div",{class:"pa-1",id:`chart${e.id}`},null,8,b)}const k=m("default",c(s,[["render",g]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-
|
1
|
+
System.register(["./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","./main-86c9719144ea13616cad.js"],function(a,n){"use strict";var h,l;return{setters:[s=>{h=s.o},s=>{l=s.R}],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-86c9719144ea13616cad.js","vue","./DetailsDialog-DyGpm5TP-268553abdce61faccf38.js","single-spa","./VWidget-CN_afCKJ-83650d219e432104ed67.js","vue-router","vuex","vuetify","./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js"],function(S,b){"use strict";var u,r,m,h,s,p,g,o,w,f,v,y,x,C,k,V;return{setters:[e=>{u=e.s},e=>{r=e.resolveComponent,m=e.createElementBlock,h=e.openBlock,s=e.createVNode,p=e.normalizeStyle,g=e.normalizeClass,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,y=e.withModifiers,x=e.createTextVNode,C=e.toDisplayString},e=>{k=e.P},null,e=>{V=e.L},null,null,null,null],execute:function(){const e={components:{DetailsDialog:k},data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},mixins:[V],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 a="";if(t&&t.raw){let P=" ",D=`
|
2
|
+
`,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(a+=sprintf(this.addrFormat,l),l+=d),a+=sprintf(this.formatter,c),i+=1,i%d===0?(i=0,a+=D):i%this.bytesPerWord===0&&(a+=P)}else a=t;return a}}},_={class:"block-widget-container"};function W(t,a,P,D,i,l){const d=r("v-textarea"),c=r("v-list-item-title"),F=r("v-list-item"),M=r("v-list"),B=r("v-menu"),N=r("details-dialog");return h(),m("div",_,[s(d,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:g(t.valueClass),style:p([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":a[0]||(a[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(M,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,R)=>(h(),v(F,{key:R,onClick:y(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[x(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(N,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":a[1]||(a[1]=n=>t.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const z=S("default",u(e,[["render",W],["__scopeId","data-v-4d4589c2"]]))}}});
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["./main-
|
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});
|
1
|
+
System.register(["./main-86c9719144ea13616cad.js","vue","single-spa","./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var s,E$1,MC,RC,resolveComponent,createBlock,openBlock,withCtx,createVNode,createElementVNode,createCommentVNode,createTextVNode,toDisplayString,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{s=e.s,E$1=e.E,MC=e.M,RC=e.R},e=>{resolveComponent=e.resolveComponent,createBlock=e.createBlock,openBlock=e.openBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createCommentVNode=e.createCommentVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,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?(MC.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(r=>{r.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?MC.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 MC.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();E$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 MC.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 E$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 E$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 RC},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});MC.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-Bk8EGxbP-a8ea9b6bff58d1b7adc0.js","vue","./main-86c9719144ea13616cad.js","./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","vue-router","single-spa","vuex","vuetify"],function(p,f){"use strict";var i,s,n,a,l,c,u,o,g;return{setters:[e=>{i=e.r},e=>{s=e.createElementBlock,n=e.openBlock,a=e.Fragment,l=e.renderList,c=e.createBlock,u=e.resolveDynamicComponent,o=e.mergeProps},e=>{g=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,w,y,B,b,m){return n(),s("svg",{id:"canvas",width:m.width,height:m.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),o({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 k=p("default",g(e,[["render",d],["__scopeId","data-v-47bdfc3c"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","vue","./main-86c9719144ea13616cad.js","vue-router","single-spa","vuex","vuetify"],function(s,i){"use strict";var t,l,n,c;return{setters:[e=>{t=e.o},e=>{l=e.createElementBlock,n=e.openBlock},e=>{c=e.s},null,null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function a(r,m,f,p,v,x){return n(),l("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const o=s("default",c(e,[["render",a]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-
|
1
|
+
System.register(["./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","./ImageLoader-BapCB-Li-2655302822aa2f65d5d1.js","vue","./main-86c9719144ea13616cad.js","vue-router","single-spa","vuex","vuetify"],function(m,d){"use strict";var s,i,n,a,l,c,h;return{setters:[e=>{s=e.o},e=>{i=e.s},e=>{n=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},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 p(t,o,y,k,N,r){return t.imageUrl?(l(),n("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:c(r.pointerStyle),onClick:o[0]||(o[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,u)):a("",!0)}const f=m("default",h(e,[["render",p]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-
|
1
|
+
System.register(["./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","./ImageLoader-BapCB-Li-2655302822aa2f65d5d1.js","vue","./main-86c9719144ea13616cad.js","vue-router","single-spa","vuex","vuetify"],function(v,S){"use strict";var m,d,l,n,h,g,o,p,u,c,f;return{setters:[t=>{m=t.o},t=>{d=t.s},t=>{l=t.createElementBlock,n=t.openBlock,h=t.withDirectives,g=t.createCommentVNode,o=t.Fragment,p=t.renderList,u=t.normalizeStyle,c=t.vShow},t=>{f=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,C,a){return n(),l("g",null,[(n(!0),l(o,null,p(r.images,s=>h((n(),l("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((n(),l("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]]):g("",!0)])}const $=v("default",f(t,[["render",k]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","vue","./main-86c9719144ea13616cad.js","vue-router","single-spa","vuex","vuetify"],function(a,p){"use strict";var r,l,n,s,i;return{setters:[e=>{r=e.o},e=>{l=e.createElementBlock,n=e.openBlock,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"}}},o=["x","y","fill"];function u(t,f,x,y,g,c){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,o)}const m=a("default",i(e,[["render",u]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-
|
1
|
+
System.register(["./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","vue","./main-86c9719144ea13616cad.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.createElementBlock,i=e.openBlock,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 i(),a("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-CERFa1CU-dbdc97f7724eeef5b94c.js","vue","./main-86c9719144ea13616cad.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,a,n,c;return{setters:[e=>{l=e.o},e=>{s=e.createElementBlock,a=e.openBlock,n=e.normalizeStyle},e=>{c=e.s},null,null,null,null],execute:function(){const e={mixins:[l],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,k,x,f,m){return a(),s("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:n(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","vue","./main-86c9719144ea13616cad.js","vue-router","single-spa","vuex","vuetify"],function(u,o){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.o},t=>{r=t.createElementBlock,l=t.openBlock,i=t.normalizeStyle},t=>{n=t.s},null,null,null,null],execute:function(){const t={mixins:[s],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[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)}},c=["x1","y1","x2","y2"];function m(e,a,d,v,y,h){return l(),r("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(h.calcStyle)},null,12,c)}const p=u("default",n(t,[["render",m]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","vue","./main-86c9719144ea13616cad.js","vue-router","single-spa","vuex","vuetify"],function(c,h){"use strict";var t,a,n,s,o,r;return{setters:[e=>{t=e.o},e=>{a=e.resolveComponent,n=e.createBlock,s=e.openBlock,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(d,u,k,y,l,b){const m=a("v-checkbox");return s(),n(m,{"hide-details":"",density:"compact",label:l.label,modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),style:o(d.computedStyle)},null,8,["label","modelValue","style"])}const p=c("default",r(e,[["render",i]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","vue","./main-86c9719144ea13616cad.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,n,a,o,r;return{setters:[e=>{l=e.o},e=>{s=e.resolveComponent,n=e.createBlock,a=e.openBlock,o=e.normalizeStyle},e=>{r=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,u,h,f,t,k){const v=s("v-select");return a(),n(v,{"hide-details":"",density:"compact",variant:"outlined",items:t.items,modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=d=>t.value=d),style:o(m.computedStyle)},null,8,["items","modelValue","style"])}const y=i("default",r(e,[["render",c]]))}}});
|
@@ -0,0 +1,10 @@
|
|
1
|
+
System.register(["./main-86c9719144ea13616cad.js","vue","vue-router","single-spa","vuex","vuetify"],function(Zt,_s){"use strict";var ze,$e,We,Ke,Je,Ge,Ze,E,U,O,Xe,d,f,$,B,W,Q,se,N,K,Se,ee,xe,Ye,Ce;return{setters:[C=>{ze=C.s,$e=C._,We=C.H,Ke=C.P,Je=C.e,Ge=C.Y,Ze=C.X},C=>{E=C.resolveComponent,U=C.createBlock,O=C.openBlock,Xe=C.Teleport,d=C.createVNode,f=C.withCtx,$=C.createElementVNode,B=C.toDisplayString,W=C.createElementBlock,Q=C.Fragment,se=C.renderList,N=C.createTextVNode,K=C.mergeProps,Se=C.createSlots,ee=C.createCommentVNode,xe=C.normalizeStyle,Ye=C.withModifiers,Ce=C.withKeys},null,null,null,null],execute:function(){var C=document.createElement("style");C.textContent=`.title-font[data-v-fe8f606e]{font-size:1.125rem}.v-progress-linear__determinate[data-v-fe8f606e]{transition:none!important}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(C);const Xt={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}},Yt={class:"app-title mr-2"};function Qt(t,e,n,i,s,r){const o=E("v-col"),a=E("v-row"),u=E("v-icon"),c=E("v-btn"),h=E("v-divider"),b=E("v-list-item-title"),_=E("v-list-item"),m=E("v-list"),w=E("v-menu"),p=E("v-radio"),S=E("v-list-item-action"),T=E("v-radio-group"),x=E("v-checkbox");return O(),U(Xe,{to:"#openc3-menu"},[d(a,{"no-gutters":""},{default:f(()=>[d(o,{"align-self":"end"},{default:f(()=>[$("span",Yt,B(n.title),1)]),_:1})]),_:1}),d(a,{dense:"",class:"flex-nowrap"},{default:f(()=>[(O(!0),W(Q,null,se(n.menus,(k,P)=>(O(),U(w,{ref_for:!0,ref:"topmenu",key:P},{activator:f(({props:g})=>[d(c,K({ref_for:!0},g,{variant:"outlined",class:"mx-1 menu-button",text:k.label,"data-test":r.formatDT(`${n.title} ${k.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(m,null,{default:f(()=>[(O(!0),W(Q,null,se(k.items,(g,A)=>(O(),W(Q,null,[g.divider?(O(),U(h,{key:A+"-divider"})):g.subMenu&&g.subMenu.length>0?(O(),W("div",{key:A+"-submenu"},[(O(),U(w,{"open-on-hover":"",location:"right",key:A},{activator:f(({props:R})=>[(O(),U(_,K({ref_for:!0},R,{disabled:g.disabled,key:A}),Se({append:f(()=>[d(u,null,{default:f(()=>e[1]||(e[1]=[N(" mdi-chevron-right ")])),_:1})]),default:f(()=>[!g.radio&&!g.checkbox?(O(),U(b,{key:0,style:xe("cursor: pointer;"+(g.disabled?"opacity: 0.2":""))},{default:f(()=>[N(B(g.label),1)]),_:2},1032,["style"])):ee("",!0)]),_:2},[g.icon?{name:"prepend",fn:f(()=>[d(u,{disabled:g.disabled},{default:f(()=>[N(B(g.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:f(()=>[d(m,null,{default:f(()=>[(O(!0),W(Q,null,se(g.subMenu,(R,I)=>(O(),U(_,{key:I,"prepend-icon":R.icon,onClick:z=>r.subMenuClick(R)},{default:f(()=>[d(b,null,{default:f(()=>[N(B(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):g.radioGroup?(O(),U(T,{"model-value":g.value,"onUpdate:modelValue":g.command,key:A+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:f(()=>[(O(!0),W(Q,null,se(g.choices,(R,I)=>(O(),U(_,{key:I+"-choice"},{default:f(()=>[d(S,{class:"list-action"},{default:f(()=>[d(p,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(O(),U(_,{onClick:R=>g.command(g),disabled:g.disabled,"data-test":r.formatDT(`${n.title} ${k.label} ${g.label}`),key:A+"-list"},Se({default:f(()=>[g.checkbox?(O(),U(S,{key:0,class:"list-action"},{default:f(()=>[d(x,{modelValue:g.checked,"onUpdate:modelValue":R=>g.checked=R,label:g.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):ee("",!0),!g.radio&&!g.checkbox?(O(),U(b,{key:1,style:xe("cursor: pointer;"+(g.disabled?"opacity: 0.2":""))},{default:f(()=>[N(B(g.label),1)]),_:2},1032,["style"])):ee("",!0)]),_:2},[g.icon?{name:"prepend",fn:f(()=>[d(u,{icon:g.icon,disabled:g.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const en=ze(Xt,[["render",Qt],["__scopeId","data-v-4d454b93"]]);var tn=Object.defineProperty,nn=(t,e,n)=>e in t?tn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Re=(t,e,n)=>nn(t,typeof e!="symbol"?e+"":e,n);function Qe(t,e){return function(){return t.apply(e,arguments)}}const{toString:sn}=Object.prototype,{getPrototypeOf:Oe}=Object,de=(t=>e=>{const n=sn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),V=t=>(t=t.toLowerCase(),e=>de(e)===t),he=t=>e=>typeof e===t,{isArray:te}=Array,re=he("undefined");function rn(t){return t!==null&&!re(t)&&t.constructor!==null&&!re(t.constructor)&&F(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const et=V("ArrayBuffer");function on(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&et(t.buffer),e}const an=he("string"),F=he("function"),tt=he("number"),fe=t=>t!==null&&typeof t=="object",ln=t=>t===!0||t===!1,me=t=>{if(de(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)},cn=V("Date"),un=V("File"),dn=V("Blob"),hn=V("FileList"),fn=t=>fe(t)&&F(t.pipe),mn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||F(t.append)&&((e=de(t))==="formdata"||e==="object"&&F(t.toString)&&t.toString()==="[object FormData]"))},pn=V("URLSearchParams"),[gn,bn,_n,yn]=["ReadableStream","Request","Response","Headers"].map(V),wn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oe(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,s;if(typeof t!="object"&&(t=[t]),te(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 a;for(i=0;i<o;i++)a=r[i],e.call(null,t[a],a,t)}}function nt(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 J=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,it=t=>!re(t)&&t!==J;function ke(){const{caseless:t}=it(this)&&this||{},e={},n=(i,s)=>{const r=t&&nt(e,s)||s;me(e[r])&&me(i)?e[r]=ke(e[r],i):me(i)?e[r]=ke({},i):te(i)?e[r]=i.slice():e[r]=i};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&oe(arguments[i],n);return e}const vn=(t,e,n,{allOwnKeys:i}={})=>(oe(e,(s,r)=>{n&&F(s)?t[r]=Qe(s,n):t[r]=s},{allOwnKeys:i}),t),Tn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),En=(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)},Sn=(t,e,n,i)=>{let s,r,o;const a={};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))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&Oe(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},xn=(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},Cn=t=>{if(!t)return null;if(te(t))return t;let e=t.length;if(!tt(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Rn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Oe(Uint8Array)),On=(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])}},kn=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},Dn=V("HTMLFormElement"),An=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),st=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Pn=V("RegExp"),rt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};oe(n,(s,r)=>{let o;(o=e(s,r,t))!==!1&&(i[r]=o||s)}),Object.defineProperties(t,i)},In=t=>{rt(t,(e,n)=>{if(F(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(F(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+"'")})}})},Nn=(t,e)=>{const n={},i=s=>{s.forEach(r=>{n[r]=!0})};return te(t)?i(t):i(String(t).split(e)),n},jn=()=>{},Un=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,De="abcdefghijklmnopqrstuvwxyz",ot="0123456789",at={DIGIT:ot,ALPHA:De,ALPHA_DIGIT:De+De.toUpperCase()+ot},Ln=(t=16,e=at.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n};function Mn(t){return!!(t&&F(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Fn=t=>{const e=new Array(10),n=(i,s)=>{if(fe(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[s]=i;const r=te(i)?[]:{};return oe(i,(o,a)=>{const u=n(o,s+1);!re(u)&&(r[a]=u)}),e[s]=void 0,r}}return i};return n(t,0)},Vn=V("AsyncFunction"),qn=t=>t&&(fe(t)||F(t))&&F(t.then)&&F(t.catch),lt=((t,e)=>t?setImmediate:e?((n,i)=>(J.addEventListener("message",({source:s,data:r})=>{s===J&&r===n&&i.length&&i.shift()()},!1),s=>{i.push(s),J.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",F(J.postMessage)),Bn=typeof queueMicrotask<"u"?queueMicrotask.bind(J):typeof process<"u"&&process.nextTick||lt,l={isArray:te,isArrayBuffer:et,isBuffer:rn,isFormData:mn,isArrayBufferView:on,isString:an,isNumber:tt,isBoolean:ln,isObject:fe,isPlainObject:me,isReadableStream:gn,isRequest:bn,isResponse:_n,isHeaders:yn,isUndefined:re,isDate:cn,isFile:un,isBlob:dn,isRegExp:Pn,isFunction:F,isStream:fn,isURLSearchParams:pn,isTypedArray:Rn,isFileList:hn,forEach:oe,merge:ke,extend:vn,trim:wn,stripBOM:Tn,inherits:En,toFlatObject:Sn,kindOf:de,kindOfTest:V,endsWith:xn,toArray:Cn,forEachEntry:On,matchAll:kn,isHTMLForm:Dn,hasOwnProperty:st,hasOwnProp:st,reduceDescriptors:rt,freezeMethods:In,toObjectSet:Nn,toCamelCase:An,noop:jn,toFiniteNumber:Un,findKey:nt,global:J,isContextDefined:it,ALPHABET:at,generateString:Ln,isSpecCompliantForm:Mn,toJSONObject:Fn,isAsyncFn:Vn,isThenable:qn,setImmediate:lt,asap:Bn};function v(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)}l.inherits(v,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:l.toJSONObject(this.config),code:this.code,status:this.status}}});const ct=v.prototype,ut={};["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=>{ut[t]={value:t}}),Object.defineProperties(v,ut),Object.defineProperty(ct,"isAxiosError",{value:!0}),v.from=(t,e,n,i,s,r)=>{const o=Object.create(ct);return l.toFlatObject(t,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),v.call(o,t.message,e,n,i,s),o.cause=t,o.name=t.name,r&&Object.assign(o,r),o};const Hn=null;function Ae(t){return l.isPlainObject(t)||l.isArray(t)}function dt(t){return l.endsWith(t,"[]")?t.slice(0,-2):t}function ht(t,e,n){return t?t.concat(e).map(function(i,s){return i=dt(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function zn(t){return l.isArray(t)&&!t.some(Ae)}const $n=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function pe(t,e,n){if(!l.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,w){return!l.isUndefined(w[m])});const i=n.metaTokens,s=n.visitor||c,r=n.dots,o=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(e);if(!l.isFunction(s))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(l.isDate(m))return m.toISOString();if(!a&&l.isBlob(m))throw new v("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(m)||l.isTypedArray(m)?a&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,w,p){let S=m;if(m&&!p&&typeof m=="object"){if(l.endsWith(w,"{}"))w=i?w:w.slice(0,-2),m=JSON.stringify(m);else if(l.isArray(m)&&zn(m)||(l.isFileList(m)||l.endsWith(w,"[]"))&&(S=l.toArray(m)))return w=dt(w),S.forEach(function(T,x){!(l.isUndefined(T)||T===null)&&e.append(o===!0?ht([w],x,r):o===null?w:w+"[]",u(T))}),!1}return Ae(m)?!0:(e.append(ht(p,w,r),u(m)),!1)}const h=[],b=Object.assign($n,{defaultVisitor:c,convertValue:u,isVisitable:Ae});function _(m,w){if(!l.isUndefined(m)){if(h.indexOf(m)!==-1)throw Error("Circular reference detected in "+w.join("."));h.push(m),l.forEach(m,function(p,S){(!(l.isUndefined(p)||p===null)&&s.call(e,p,l.isString(S)?S.trim():S,w,b))===!0&&_(p,w?w.concat(S):[S])}),h.pop()}}if(!l.isObject(t))throw new TypeError("data must be an object");return _(t),e}function ft(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Pe(t,e){this._pairs=[],t&&pe(t,this,e)}const mt=Pe.prototype;mt.append=function(t,e){this._pairs.push([t,e])},mt.toString=function(t){const e=t?function(n){return t.call(this,n,ft)}:ft;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Wn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pt(t,e,n){if(!e)return t;const i=n&&n.encode||Wn;l.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let r;if(s?r=s(e,n):r=l.isURLSearchParams(e)?e.toString():new Pe(e,n).toString(i),r){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+r}return t}class gt{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){l.forEach(this.handlers,function(n){n!==null&&e(n)})}}const bt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Kn=typeof URLSearchParams<"u"?URLSearchParams:Pe,Jn=typeof FormData<"u"?FormData:null,Gn=typeof Blob<"u"?Blob:null,Zn={isBrowser:!0,classes:{URLSearchParams:Kn,FormData:Jn,Blob:Gn},protocols:["http","https","file","blob","url","data"]},Ie=typeof window<"u"&&typeof document<"u",Ne=typeof navigator=="object"&&navigator||void 0,Xn=Ie&&(!Ne||["ReactNative","NativeScript","NS"].indexOf(Ne.product)<0),Yn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Qn=Ie&&window.location.href||"http://localhost",ei=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ie,hasStandardBrowserEnv:Xn,hasStandardBrowserWebWorkerEnv:Yn,navigator:Ne,origin:Qn},Symbol.toStringTag,{value:"Module"})),j={...ei,...Zn};function ti(t,e){return pe(t,new j.classes.URLSearchParams,Object.assign({visitor:function(n,i,s,r){return j.isNode&&l.isBuffer(n)?(this.append(i,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function ni(t){return l.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ii(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 _t(t){function e(n,i,s,r){let o=n[r++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),u=r>=n.length;return o=!o&&l.isArray(s)?s.length:o,u?(l.hasOwnProp(s,o)?s[o]=[s[o],i]:s[o]=i,!a):((!s[o]||!l.isObject(s[o]))&&(s[o]=[]),e(n,i,s[o],r)&&l.isArray(s[o])&&(s[o]=ii(s[o])),!a)}if(l.isFormData(t)&&l.isFunction(t.entries)){const n={};return l.forEachEntry(t,(i,s)=>{e(ni(i),s,n,0)}),n}return null}function si(t,e,n){if(l.isString(t))try{return(e||JSON.parse)(t),l.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const ae={transitional:bt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,s=l.isObject(t);if(s&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return i?JSON.stringify(_t(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.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 ti(t,this.formSerializer).toString();if((r=l.isFileList(t))||n.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return pe(r?{"files[]":t}:t,o&&new o,this.formSerializer)}}return s||i?(e.setContentType("application/json",!1),si(t)):t}],transformResponse:[function(t){const e=this.transitional||ae.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.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"?v.from(r,v.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}}};l.forEach(["delete","get","head","post","put","patch"],t=>{ae.headers[t]={}});const ri=l.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"]),oi=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]&&ri[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},yt=Symbol("internals");function le(t){return t&&String(t).trim().toLowerCase()}function ge(t){return t===!1||t==null?t:l.isArray(t)?t.map(ge):String(t)}function ai(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 li=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function je(t,e,n,i,s){if(l.isFunction(i))return i.call(this,e,n);if(s&&(e=n),!!l.isString(e)){if(l.isString(i))return e.indexOf(i)!==-1;if(l.isRegExp(i))return i.test(e)}}function ci(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function ui(t,e){const n=l.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})})}let L=class{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function s(o,a,u){const c=le(a);if(!c)throw new Error("header name must be a non-empty string");const h=l.findKey(i,c);(!h||i[h]===void 0||u===!0||u===void 0&&i[h]!==!1)&&(i[h||a]=ge(o))}const r=(o,a)=>l.forEach(o,(u,c)=>s(u,c,a));if(l.isPlainObject(t)||t instanceof this.constructor)r(t,e);else if(l.isString(t)&&(t=t.trim())&&!li(t))r(oi(t),e);else if(l.isHeaders(t))for(const[o,a]of t.entries())s(a,o,n);else t!=null&&s(e,t,n);return this}get(t,e){if(t=le(t),t){const n=l.findKey(this,t);if(n){const i=this[n];if(!e)return i;if(e===!0)return ai(i);if(l.isFunction(e))return e.call(this,i,n);if(l.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=le(t),t){const n=l.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||je(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let i=!1;function s(r){if(r=le(r),r){const o=l.findKey(n,r);o&&(!e||je(n,n[o],o,e))&&(delete n[o],i=!0)}}return l.isArray(t)?t.forEach(s):s(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const s=e[n];(!t||je(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const e=this,n={};return l.forEach(this,(i,s)=>{const r=l.findKey(n,s);if(r){e[r]=ge(i),delete e[s];return}const o=t?ci(s):String(s).trim();o!==s&&delete e[s],e[o]=ge(i),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return l.forEach(this,(n,i)=>{n!=null&&n!==!1&&(e[i]=t&&l.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
4
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const e=(this[yt]=this[yt]={accessors:{}}).accessors,n=this.prototype;function i(s){const r=le(s);e[r]||(ui(n,s),e[r]=!0)}return l.isArray(t)?t.forEach(i):i(t),this}};L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(L.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}}),l.freezeMethods(L);function Ue(t,e){const n=this||ae,i=e||n,s=L.from(i.headers);let r=i.data;return l.forEach(t,function(o){r=o.call(n,r,s.normalize(),e?e.status:void 0)}),s.normalize(),r}function wt(t){return!!(t&&t.__CANCEL__)}function ne(t,e,n){v.call(this,t??"canceled",v.ERR_CANCELED,e,n),this.name="CanceledError"}l.inherits(ne,v,{__CANCEL__:!0});function vt(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new v("Request failed with status code "+n.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function di(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function hi(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(a){const u=Date.now(),c=i[r];o||(o=u),n[s]=a,i[s]=u;let h=r,b=0;for(;h!==s;)b+=n[h++],h=h%t;if(s=(s+1)%t,s===r&&(r=(r+1)%t),u-o<e)return;const _=c&&u-c;return _?Math.round(b*1e3/_):void 0}}function fi(t,e){let n=0,i=1e3/e,s,r;const o=(a,u=Date.now())=>{n=u,s=null,r&&(clearTimeout(r),r=null),t.apply(null,a)};return[(...a)=>{const u=Date.now(),c=u-n;c>=i?o(a,u):(s=a,r||(r=setTimeout(()=>{r=null,o(s)},i-c)))},()=>s&&o(s)]}const be=(t,e,n=3)=>{let i=0;const s=hi(50,250);return fi(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,u=o-i,c=s(u),h=o<=a;i=o;const b={loaded:o,total:a,progress:a?o/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a&&h?(a-o)/c:void 0,event:r,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(b)},n)},Tt=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Et=t=>(...e)=>l.asap(()=>t(...e)),mi=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,pi=j.hasStandardBrowserEnv?{write(t,e,n,i,s,r){const o=[t+"="+encodeURIComponent(e)];l.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),l.isString(i)&&o.push("path="+i),l.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 gi(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function bi(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function St(t,e){return t&&!gi(e)?bi(t,e):e}const xt=t=>t instanceof L?{...t}:t;function G(t,e){e=e||{};const n={};function i(c,h,b,_){return l.isPlainObject(c)&&l.isPlainObject(h)?l.merge.call({caseless:_},c,h):l.isPlainObject(h)?l.merge({},h):l.isArray(h)?h.slice():h}function s(c,h,b,_){if(l.isUndefined(h)){if(!l.isUndefined(c))return i(void 0,c,b,_)}else return i(c,h,b,_)}function r(c,h){if(!l.isUndefined(h))return i(void 0,h)}function o(c,h){if(l.isUndefined(h)){if(!l.isUndefined(c))return i(void 0,c)}else return i(void 0,h)}function a(c,h,b){if(b in e)return i(c,h);if(b 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:a,headers:(c,h,b)=>s(xt(c),xt(h),b,!0)};return l.forEach(Object.keys(Object.assign({},t,e)),function(c){const h=u[c]||s,b=h(t[c],e[c],c);l.isUndefined(b)&&h!==a||(n[c]=b)}),n}const Ct=t=>{const e=G({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:r,headers:o,auth:a}=e;e.headers=o=L.from(o),e.url=pt(St(e.baseURL,e.url),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(l.isFormData(n)){if(j.hasStandardBrowserEnv||j.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[c,...h]=u?u.split(";").map(b=>b.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...h].join("; "))}}if(j.hasStandardBrowserEnv&&(i&&l.isFunction(i)&&(i=i(e)),i||i!==!1&&mi(e.url))){const c=s&&r&&pi.read(r);c&&o.set(s,c)}return e},_i=typeof XMLHttpRequest<"u",yi=_i&&function(t){return new Promise(function(e,n){const i=Ct(t);let s=i.data;const r=L.from(i.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:u}=i,c,h,b,_,m;function w(){_&&_(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(i.method.toUpperCase(),i.url,!0),p.timeout=i.timeout;function S(){if(!p)return;const x=L.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),k={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:x,config:t,request:p};vt(function(P){e(P),w()},function(P){n(P),w()},k),p=null}"onloadend"in p?p.onloadend=S:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(S)},p.onabort=function(){p&&(n(new v("Request aborted",v.ECONNABORTED,t,p)),p=null)},p.onerror=function(){n(new v("Network Error",v.ERR_NETWORK,t,p)),p=null},p.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const k=i.transitional||bt;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),n(new v(x,k.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,t,p)),p=null},s===void 0&&r.setContentType(null),"setRequestHeader"in p&&l.forEach(r.toJSON(),function(x,k){p.setRequestHeader(k,x)}),l.isUndefined(i.withCredentials)||(p.withCredentials=!!i.withCredentials),o&&o!=="json"&&(p.responseType=i.responseType),u&&([b,m]=be(u,!0),p.addEventListener("progress",b)),a&&p.upload&&([h,_]=be(a),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",_)),(i.cancelToken||i.signal)&&(c=x=>{p&&(n(!x||x.type?new ne(null,t,p):x),p.abort(),p=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const T=di(i.url);if(T&&j.protocols.indexOf(T)===-1){n(new v("Unsupported protocol "+T+":",v.ERR_BAD_REQUEST,t));return}p.send(s||null)})},wi=(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,a();const h=c instanceof Error?c:this.reason;i.abort(h instanceof v?h:new ne(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,r(new v(`timeout ${e} of ms exceeded`,v.ETIMEDOUT))},e);const a=()=>{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=()=>l.asap(a),u}},vi=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},Ti=async function*(t,e){for await(const n of Ei(t))yield*vi(n,e)},Ei=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()}},Rt=(t,e,n,i)=>{const s=Ti(t,e);let r=0,o,a=u=>{o||(o=!0,i&&i(u))};return new ReadableStream({async pull(u){try{const{done:c,value:h}=await s.next();if(c){a(),u.close();return}let b=h.byteLength;if(n){let _=r+=b;n(_)}u.enqueue(new Uint8Array(h))}catch(c){throw a(c),c}},cancel(u){return a(u),s.return()}},{highWaterMark:2})},_e=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ot=_e&&typeof ReadableStream=="function",Si=_e&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),kt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},xi=Ot&&kt(()=>{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}),Dt=64*1024,Le=Ot&&kt(()=>l.isReadableStream(new Response("").body)),ye={stream:Le&&(t=>t.body)};_e&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ye[e]&&(ye[e]=l.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new v(`Response type '${e}' is not supported`,v.ERR_NOT_SUPPORT,i)})})})(new Response);const Ci=async t=>{if(t==null)return 0;if(l.isBlob(t))return t.size;if(l.isSpecCompliantForm(t))return(await new Request(j.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(l.isArrayBufferView(t)||l.isArrayBuffer(t))return t.byteLength;if(l.isURLSearchParams(t)&&(t=t+""),l.isString(t))return(await Si(t)).byteLength},Ri=async(t,e)=>l.toFiniteNumber(t.getContentLength())??Ci(e),Oi=_e&&(async t=>{let{url:e,method:n,data:i,signal:s,cancelToken:r,timeout:o,onDownloadProgress:a,onUploadProgress:u,responseType:c,headers:h,withCredentials:b="same-origin",fetchOptions:_}=Ct(t);c=c?(c+"").toLowerCase():"text";let m=wi([s,r&&r.toAbortSignal()],o),w;const p=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let S;try{if(u&&xi&&n!=="get"&&n!=="head"&&(S=await Ri(h,i))!==0){let g=new Request(e,{method:"POST",body:i,duplex:"half"}),A;if(l.isFormData(i)&&(A=g.headers.get("content-type"))&&h.setContentType(A),g.body){const[R,I]=Tt(S,be(Et(u)));i=Rt(g.body,Dt,R,I)}}l.isString(b)||(b=b?"include":"omit");const T="credentials"in Request.prototype;w=new Request(e,{..._,signal:m,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:i,duplex:"half",credentials:T?b:void 0});let x=await fetch(w);const k=Le&&(c==="stream"||c==="response");if(Le&&(a||k&&p)){const g={};["status","statusText","headers"].forEach(z=>{g[z]=x[z]});const A=l.toFiniteNumber(x.headers.get("content-length")),[R,I]=a&&Tt(A,be(Et(a),!0))||[];x=new Response(Rt(x.body,Dt,R,()=>{I&&I(),p&&p()}),g)}c=c||"text";let P=await ye[l.findKey(ye,c)||"text"](x,t);return!k&&p&&p(),await new Promise((g,A)=>{vt(g,A,{data:P,headers:L.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:w})})}catch(T){throw p&&p(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,t,w),{cause:T.cause||T}):v.from(T,T&&T.code,t,w)}}),Me={http:Hn,xhr:yi,fetch:Oi};l.forEach(Me,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const At=t=>`- ${t}`,ki=t=>l.isFunction(t)||t===null||t===!1,Pt={getAdapter:t=>{t=l.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,!ki(n)&&(i=Me[(o=String(n)).toLowerCase()],i===void 0))throw new v(`Unknown adapter '${o}'`);if(i)break;s[o||"#"+r]=i}if(!i){const r=Object.entries(s).map(([a,u])=>`adapter ${a} `+(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 v("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:Me};function Fe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ne(null,t)}function It(t){return Fe(t),t.headers=L.from(t.headers),t.data=Ue.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Pt.getAdapter(t.adapter||ae.adapter)(t).then(function(e){return Fe(t),e.data=Ue.call(t,t.transformResponse,e),e.headers=L.from(e.headers),e},function(e){return wt(e)||(Fe(t),e&&e.response&&(e.response.data=Ue.call(t,t.transformResponse,e.response),e.response.headers=L.from(e.response.headers))),Promise.reject(e)})}const Nt="1.7.9",we={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{we[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const jt={};we.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 v(i(r," has been removed"+(e?" in "+e:"")),v.ERR_DEPRECATED);return e&&!jt[r]&&(jt[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}},we.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Di(t,e,n){if(typeof t!="object")throw new v("options must be an object",v.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 a=t[r],u=a===void 0||o(a,r,t);if(u!==!0)throw new v("option "+r+" must be "+u,v.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new v("Unknown option "+r,v.ERR_BAD_OPTION)}}const ve={assertOptions:Di,validators:we},H=ve.validators;let Z=class{constructor(t){this.defaults=t,this.interceptors={request:new gt,response:new gt}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
7
|
+
`+s):n.stack=s}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=G(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:s}=e;n!==void 0&&ve.assertOptions(n,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),i!=null&&(l.isFunction(i)?e.paramsSerializer={serialize:i}:ve.assertOptions(i,{encode:H.function,serialize:H.function},!0)),ve.assertOptions(e,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let r=s&&l.merge(s.common,s[e.method]);s&&l.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),e.headers=L.concat(r,s);const o=[];let a=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(a=a&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,h=0,b;if(!a){const m=[It.bind(this),void 0];for(m.unshift.apply(m,o),m.push.apply(m,u),b=m.length,c=Promise.resolve(e);h<b;)c=c.then(m[h++],m[h++]);return c}b=o.length;let _=e;for(h=0;h<b;){const m=o[h++],w=o[h++];try{_=m(_)}catch(p){w.call(this,p);break}}try{c=It.call(this,_)}catch(m){return Promise.reject(m)}for(h=0,b=u.length;h<b;)c=c.then(u[h++],u[h++]);return c}getUri(t){t=G(this.defaults,t);const e=St(t.baseURL,t.url);return pt(e,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){Z.prototype[t]=function(e,n){return this.request(G(n||{},{method:t,url:e,data:(n||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function e(n){return function(i,s,r){return this.request(G(r||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Z.prototype[t]=e(),Z.prototype[t+"Form"]=e(!0)});let Ai=class Gt{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(a=>{i.subscribe(a),r=a}).then(s);return o.cancel=function(){i.unsubscribe(r)},o},e(function(s,r,o){i.reason||(i.reason=new ne(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 Gt(function(n){e=n}),cancel:e}}};function Pi(t){return function(e){return t.apply(null,e)}}function Ii(t){return l.isObject(t)&&t.isAxiosError===!0}const Ve={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(Ve).forEach(([t,e])=>{Ve[e]=t});function Ut(t){const e=new Z(t),n=Qe(Z.prototype.request,e);return l.extend(n,Z.prototype,e,{allOwnKeys:!0}),l.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Ut(G(t,i))},n}const D=Ut(ae);D.Axios=Z,D.CanceledError=ne,D.CancelToken=Ai,D.isCancel=wt,D.VERSION=Nt,D.toFormData=pe,D.AxiosError=v,D.Cancel=D.CanceledError,D.all=function(t){return Promise.all(t)},D.spread=Pi,D.isAxiosError=Ii,D.mergeConfig=G,D.AxiosHeaders=L,D.formToJSON=t=>_t(l.isHTMLForm(t)?new FormData(t):t),D.getAdapter=Pt.getAdapter,D.HttpStatusCode=Ve,D.default=D;const{Axios:ys,AxiosError:ws,CanceledError:vs,isCancel:Ts,CancelToken:Es,VERSION:Ss,all:xs,Cancel:Cs,isAxiosError:Rs,spread:Os,toFormData:ks,AxiosHeaders:Ds,HttpStatusCode:As,formToJSON:Ps,getAdapter:Is,mergeConfig:Ns}=D,Lt=D.create({baseURL:location.origin,timeout:6e4,params:{}});Lt.interceptors.response.use(t=>t,t=>{var e,n,i,s,r,o,a,u,c,h,b;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(w){w&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let _=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(_+=`${t.response.statusText} `),(i=(n=t.response)==null?void 0:n.config)!=null&&i.data&&(_+=`${t.response.config.data} `),(r=(s=t.response)==null?void 0:s.data)!=null&&r.message?_+=`${t.response.data.message}`:(a=(o=t.response)==null?void 0:o.data)!=null&&a.exception?_+=`${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&&(_+=`${t.response.data.error.class} `),_+=`${t.response.data.error.message}`):_+=`${(b=t.response)==null?void 0:b.data}`;const{$cosmosNotify:m}=window;throw m&&m.serious({title:"Network error",body:_}),t}else throw t});let Te=()=>({emit(t,...e){for(let n=this.events[t]||[],i=0,s=n.length;i<s;i++)n[i](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var i;this.events[t]=(i=this.events[t])==null?void 0:i.filter(s=>e!==s)}}});class ce extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class qe extends ce{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class Ni extends ce{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class q extends ce{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class ji extends q{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Mt(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class Ui{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:i,info:s})=>(n[i]=s,n),{})}}const X=Symbol("state");class Ft{constructor(e={}){this.emitter=Te(),this.params=Object.freeze(e),this.presence=new Ui(this),this.initialConnect=!0,this[X]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Mt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[X]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[X]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[X]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[X]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[X]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[X]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let i=this.receiver?this.receiver.logger:null;i&&i.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let i=this.emitter.on(e,(...s)=>{i(),n(...s)});return i}emit(e,...n){return this.emitter.emit(e,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,n)=>{let i=[()=>delete this._pendingSubscribe];i.push(this.on("connect",()=>{i.forEach(s=>s()),e()})),i.push(this.on("close",s=>{i.forEach(r=>r()),n(s||new ce("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Li{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(i=>i[e](n[0])):this.channels.forEach(i=>i[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let n,i={promise:new Promise(r=>{n=r}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(i),1),n(i)},canceled:!1,acquired:!1},s=this._pendingTop;return this._pendings.push(i),s&&await s.promise,this.gvl&&await this.gvl.acquire(i,e),i.acquired=!0,i}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class Mi{constructor(){this.queue=[]}async acquire(e,n){n==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class Fi{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new Mi),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:i}){let s=this._subscriptions[e]=new Li(e);return s.remoteId=this._localToRemote[e],s.subscriber=n,s.unsubscriber=i,s.gvl=this.glv,s}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let i=this.get(e);i&&(i.remoteId=n)}}class Vi{constructor(e={}){this.subscriptions=new Fi(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let i=n.remoteId;i&&delete this._remoteToLocal[i],this.subscriptions.remove(e)}transmit(e,n,i){let s=this._remoteToLocal[e];if(!s){this._pendingMessages.push([e,n,i]);return}let r=this.subscriptions.get(s);r&&r.channels.forEach(o=>{o.receive(n,i)})}notify(e,n,i){let s=this._remoteToLocal[e];if(!s)return;let r=this.subscriptions.get(s);r&&r.channels.forEach(o=>o.emit(n,i))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let n=[];for(let i of this._pendingMessages)i[0]===e?this.transmit(i[0],i[1],i[2]):n.push(i);this._pendingMessages=n}}const Vt={debug:0,info:1,warn:2,error:3};class qt{constructor(e){this.level=e||"warn"}log(e,n,i){Vt[e]<Vt[this.level]||this.writeLogEntry(e,n,i)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class ue extends qt{writeLogEntry(){}}class qi{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let Bi=0;class Bt{constructor(e={}){let{logger:n}=e;this.logger=n||new ue,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let i={channel:e};n&&Object.assign(i,n);let s=Mt(i);if(this.pendingUnsubscriptions[s]){let o=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${o}`,s),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,n))},o)})}if(this.pendingSubscriptions[s])return this.logger.warn("subscription is already pending, skipping",s),Promise.reject(Error("Already subscribing"));let r=this.subscribeRetryInterval;return new Promise((o,a)=>{let u=++Bi;this.pendingSubscriptions[s]={resolve:o,reject:a,id:u},this.cable.send(this.buildSubscribeRequest(s)),this.maybeRetrySubscribe(u,s,r)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,i){setTimeout(()=>{let s=this.pendingSubscriptions[n];s&&s.id===e&&(this.logger.warn(`no subscription ack received in ${i}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,i))},i)}maybeExpireSubscribe(e,n,i){setTimeout(()=>{let s=this.pendingSubscriptions[n];s&&s.id===e&&(delete this.pendingSubscriptions[n],s.reject(new Ni(`Haven't received subscription ack in ${i*2}ms for ${n}`)))},i)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,n,i){return n==="$whisper"?this.whisper(e,i):(i||(i={}),i.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(i)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:i,message:s,reason:r,reconnect:o}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(n==="disconnect"){let a=new q(r);this.reset(a),o===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(n==="confirm_subscription"){let a=this.pendingSubscriptions[i];if(!a){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:i}),this.unsubscribe(i);return}return delete this.pendingSubscriptions[i],a.resolve(i)}if(n==="reject_subscription"){let a=this.pendingSubscriptions[i];return a?(delete this.pendingSubscriptions[i],a.reject(new qe)):this.logger.error("subscription not found",{type:n,identifier:i})}if(s)return{identifier:i,message:s};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Ht=()=>Date.now()/1e3|0;class Hi extends Bt{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.restoreSince===void 0&&(this.restoreSince=Ht()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:i,message:s}=e;if(n==="disconnect"||n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[i]||(this.subscriptionStreams[i]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=Ht()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",i);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",i);return}if(n==="welcome"){if(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId),e.restored){let r=e.restored_ids||Object.keys(this.subscriptionStreams);for(let o of r)this.cable.send({identifier:o,command:"history",history:this.historyRequestFor(o)}),this.presenceInfo[o]&&this.cable.send({identifier:o,command:"join",presence:this.presenceInfo[o]});return this.cable.restored(r)}return this.cable.connected(this.sessionId)}if(n==="presence"){let r=s.type;if(r==="info"){let o=this.pendingPresence[i];o&&(delete this.pendingPresence[i],o.resolve(s))}else if(r==="error"){let o=this.pendingPresence[i];o&&(delete this.pendingPresence[i],o.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:i,message:s}}if(s){let r=this.trackStreamPosition(i,e.stream_id,e.epoch,e.offset);return{identifier:i,message:s,meta:r}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,i){switch(n){case"$presence:join":return this.join(e,i);case"$presence:leave":return this.leave(e,i);case"$presence:info":return this.presence(e,i)}return super.perform(e,n,i)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),i=this.historyRequestFor(e);i&&(n.history=i,this.pendingHistory[e]=!0);let s=this.presenceInfo[e];return s&&(n.presence=s),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},i=!1;if(this.subscriptionStreams[e])for(let s of this.subscriptionStreams[e]){let r=this.streamsPositions[s];r&&(i=!0,n[s]=r)}if(!(!i&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,i,s){if(!(!n||!i))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:i,offset:s},{stream:n,epoch:i,offset:s}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((i,s)=>{this.pendingPresence[e]={resolve:i,reject:s},this.cable.send({command:"presence",identifier:e,data:n})})}}class zi extends ce{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Be extends Ft{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}Re(Be,"identifier","__ghost__");const $i="$pubsub";class He extends Ft{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}Re(He,"identifier",$i);const Y=Symbol("state");let Wi=class{constructor({transport:t,protocol:e,encoder:n,logger:i,lazy:s,hubOptions:r,performFailures:o}){this.emitter=Te(),this.transport=t,this.encoder=n,this.logger=i||new ue,this.protocol=e,this.performFailures=o||"throw",this.protocol.attached(this),this.hub=new Vi(r||{}),this[Y]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,s===!1&&this.connect().catch(()=>{})}get state(){return this[Y]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();this[Y]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Y]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new q("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[Y]="connected",this.hub.subscriptions.all().forEach(i=>{t&&i.remoteId&&t.includes(i.remoteId)?i.notify("restored"):(i.notify("disconnected",new q("recovery_failed")),this._resubscribe(i))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new q(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[Y]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof q?t:new q(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[Y]="closed";let n=e||new q("cable_closed");this.hub.subscriptions.all().forEach(i=>i.notify("disconnected",n)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:i,identifier:s,message:r,meta:o}=n;i?this.hub.notify(s,i,r):this.hub.transmit(s,r,o)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new He({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new He({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,i;return typeof t=="string"&&(i=t,t=Be),n=i?new t(i,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:i=>this._subscribe(i,t.channelId,t.params),unsubscribe:i=>this._unsubscribe(i)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let i=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:i});return}this.logger.debug("acquiring subscribe lock",{identifier:i});let s=await t.acquire("subscribed");if(s.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:i}),s.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:i}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),s.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:i}),s.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:i}),t.notify("connected"),s.release();return}let r={identifier:e,params:n};this.logger.debug("subscribing",r);try{let o=await this.protocol.subscribe(e,n);this.hub.subscribe(i,o),this.logger.debug("subscribed",{...r,remoteId:o}),t.notify("connected")}catch(o){if(o){if(o instanceof qe&&this.logger.warn("rejected",r),o instanceof q){this.logger.debug("disconnected during subscription; will retry on connect",r),s.release();return}this.logger.error("failed to subscribe",{error:o,...r})}t.close(o),this.hub.unsubscribe(i)}s.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let i=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:i}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(i),this.logger.debug("unsubscribed remotely",{id:e})}catch(s){s&&(s instanceof q?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:s}):this.logger.error("unsubscribe failed",{id:e,error:s}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(i){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:i});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new zi;let i=this.hub.subscriptions.get(t);if(!i)throw Error(`Subscription not found: ${t}`);if(await i.pending("subscribed"),i.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let s=i.remoteId,r={id:s,action:e,payload:n};this.logger.debug("perform",r);try{let o=await this.protocol.perform(s,e,n);return o&&this.logger.debug("perform result",{message:o,request:r}),o}catch(o){throw this.logger.error("perform failed",{error:o,request:r}),o}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...i)=>{n(),e(...i)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(i=>i()),t()})),n.push(this.on("close",i=>{n.forEach(s=>s()),e(i)})),n.push(this.on("disconnect",i=>{n.forEach(s=>s()),e(i)}))}),this._pendingConnect)}};const Ki={maxMissingPings:2,maxReconnectAttempts:1/0},ie=()=>Date.now(),zt=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:i,maxInterval:s}=e;return n=n||2,i===void 0&&(i=.5),r=>{let o=t*n**r,a=o*n,u=o+(a-o)*Math.random(),c=2*(Math.random()-.5)*i;return u=u*(1+c),s&&s<u&&(u=s),u}};let $t=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Ki,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new ue,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ie()}watch(t){this.target=t,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=ie(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ie(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ie(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ie()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=ie()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new ji))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class Ji{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Te(),this.unbind=[],this.logger=n.logger||new ue}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(i){this.logger.debug(`Failed to connect via ${n.displayName()}: ${i.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,n){this.transports.forEach(i=>{i.setParam(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let i=this.emitter.on(e,(...s)=>{i(),n(...s)});return i}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class Gi{constructor(e,n={}){this.url=e;let i=n.websocketImplementation;if(i)this.Impl=i;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Te();let{format:s,subprotocol:r}=n;this.format=s||"text",this.connectionOptions=n.websocketOptions,this.subprotocol=r}displayName(){return"WebSocket("+this.url+")"}open(){return this.connectionOptions?this.ws=new this.Impl(this.url,this.subprotocol,this.connectionOptions):this.ws=new this.Impl(this.url,this.subprotocol),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,n)=>{let i=[];i.push(this.once("open",()=>{i.forEach(s=>s()),e()})),i.push(this.once("close",()=>{i.forEach(s=>s()),n(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let i=new URL(this.url);i.searchParams.set(e,n);let s=`${i.protocol}//${i.host}${i.pathname}?${i.searchParams}`;this.setURL(s)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,n){return this.emitter.on(e,n)}once(e,n){let i=this.emitter.on(e,(...s)=>{i(),n(...s)});return i}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Wt={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Zi(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},Wt,e);let{protocol:n,websocketImplementation:i,websocketFormat:s,websocketOptions:r,fallbacks:o,logLevel:a,logger:u,transport:c,encoder:h,lazy:b,monitor:_,pingInterval:m,reconnectStrategy:w,maxMissingPings:p,maxReconnectAttempts:S,subprotocol:T,tokenRefresher:x,historyTimestamp:k,protocolOptions:P,concurrentSubscribes:g}=e;if(u=u||new ue(a),typeof n=="string"){T=T||n;let I=n.substring(0,n.lastIndexOf("-")),z=n.substring(n.lastIndexOf("-")+1);if(P=P||{},I==="actioncable-v1")n=new Bt({logger:u,...P});else if(I==="actioncable-v1-ext")n=new Hi({logger:u,historyTimestamp:k,...P});else throw Error(`Protocol is not supported yet: ${n}`);if(z==="json")h=h||new qi,s=s||"text";else if(z==="msgpack"){if(s="binary",!h)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(z==="protobuf"){if(s=s||"binary",!h)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${n}`)}if(!n)throw Error("Protocol must be specified");c=c||new Gi(t,{websocketImplementation:i,websocketOptions:r,subprotocol:T,format:s}),o&&(c=new Ji([c,...o],{logger:u})),w=w||zt(m),_!==!1&&(_=_||new $t({pingInterval:m,reconnectStrategy:w,maxMissingPings:p,maxReconnectAttempts:S,logger:u}));let A={concurrentSubscribes:g},R=new Wi({protocol:n,transport:c,encoder:h,logger:u,lazy:b,hubOptions:A});return _&&(_.watch(R),R.monitor=_),x&&Xi(R,async()=>{try{await x(c)}catch(I){return u.error("Failed to refresh authentication token: "+I),!1}return R.connect().catch(()=>{}),!0}),R}function Xi(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async i=>{if(i){if(n){t.logger.warn("Token auto-refresh is disabled",i);return}i.reason==="token_expired"&&(n=!0,await e())}})}class Yi{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Qi extends Be{constructor(e,n,i){super(e,n),this.subscription=new Yi(this),Object.assign(this.subscription,i),this.on("connect",()=>this.subscription.notify("connected")),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",s=>this.subscription.notify("received",s)),this.on("close",s=>{s&&s instanceof qe?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class es{constructor(e){this.cable=e}create(e,n){let i,s;typeof e=="object"?(i=e.channel,delete e.channel,s=e):(i=e,s={});let r=new Qi(i,s,n);return r.subscription.notify("initialized"),this.cable.subscribe(r),r.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class ts{constructor(e){this.cable=e,this.subscriptions=new es(e)}}class ns extends qt{writeLogEntry(e,n,i){i?console[e](n,i):console[e](n)}}class is extends $t{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},n=s=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:s})},i=()=>this.disconnect(new q("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",i,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!1),window.removeEventListener("freeze",i,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const ss=["cable","action-cable"],rs="/cable",Kt=(t,e)=>{for(let n of ss){let i=t.head.querySelector(`meta[name='${n}-${e}']`);if(i)return i.getAttribute("content")}},Jt=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,os=()=>{if(typeof document<"u"&&document.head){let t=Kt(document,"url");if(t)return Jt(t)}return Jt(rs)},as=()=>{if(typeof document<"u"&&document.head){let t=Kt(document,"history-timestamp");if(t)return t|0}};function ls(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||os(),e=e||{},e.historyTimestamp||(e.historyTimestamp=as()),e=Object.assign({},Wt,e);let{logLevel:n,logger:i,pingInterval:s,reconnectStrategy:r,maxMissingPings:o,maxReconnectAttempts:a}=e;return i=e.logger=e.logger||new ns(n),r=e.reconnectStrategy=e.reconnectStrategy||zt(s),e.monitor!==!1&&(e.monitor=e.monitor||new is({pingInterval:s,reconnectStrategy:r,maxMissingPings:o,maxReconnectAttempts:a,logger:i})),Zi(t,e)}function cs(t,e){let n=ls(t,e);return new ts(n)}class us{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}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);o=new URL(o,document.baseURI).href,this._cable=cs(o)}return this._cable.subscriptions.create({channel:e,...s},i)})}recordPing(){}}class ds{constructor(){Re(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 Lt.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 a=new Error;throw o.response?(a.name=o.response.data.error.data.class,a.message=o.response.data.error.data.message,a.object=o.response.data.error):o.request?(a.name="Request error",a.message="Request error, no response received"):a.name="Unknown error",a}}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,a=null;for(let u=0;u<o;u++)a=this.decode_openc3_type(r[u][1]),a!==null&&(r[u][1]=a)}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,a=null;for(let u=0;u<o;u++)a=this.decode_openc3_type(r[0][u]),a!==null&&(r[0][u]=a);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 a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}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 a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o=this.encode_openc3_type(s[a]),o!==null&&(s[a]=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])}update_news(){return this.exec("update_news",[])}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 Ee=[];const hs={components:{OpenConfigDialog:Ze,SaveConfigDialog:Ge,TargetPacketItemChooser:Je,TopBar:en},mixins:[We,Ke],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 us,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 ds,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:t=>{t.allowReconnect&&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(){Ee=[],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]),Ee.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,a,u]=e.split("__");let c=o;this.columnMode==="full"&&(c=s+" "+r+" "+o),n&&n!=="DECOM"&&(c=c+" {"+n+"}"),a&&a!=="CONVERTED"&&(c=c+" ("+a+")"),u&&(c=c+" ["+u+"]"),this.columnHeaders.push(c)})},createFile:async function(){let t=Ee.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((m,w)=>m.__time-w.__time),await this.yieldToMain();let r=[],o=[],a=null,u=0;for(let m of t){let w=!1;this.fillDown&&a?o=[...a]:o=[];let p="";if(Object.keys(m).forEach(S=>{if(S.slice(0,2)==="__")return;p=S;let T=n[S];if(typeof m[S]=="object")if(m[S]===null)o[T]="";else if(Array.isArray(m[S]))o[T]='"['+m[S]+']"';else{let x=m[S].raw;if(Array.isArray(x)){let k="";x.forEach(P=>{k+=P.toString(16)}),o[T]=k}else o[T]="'"+x+"'"}else o[T]=m[S];this.uniqueOnly&&r[T]!==o[T]&&(w=!0),r[T]=o[T]}),this.fillDown&&(a=[...o]),!this.uniqueOnly||w){if(this.columnMode==="normal"){p=this.keyMap[p];const[S,T,x,k,P,g,A]=p.split("__");o[0]=new Date(m.__time/1e6).toISOString(),o[1]=x,o[2]=k}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 b=new Blob([i.join(`
|
10
|
+
`)],{type:h});await this.yieldToMain();const _=document.createElement("a");_.href=URL.createObjectURL(b),_.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+c),_.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),Ee.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 fs(t,e,n,i,s,r){const o=E("top-bar"),a=E("v-text-field"),u=E("v-col"),c=E("v-row"),h=E("v-radio"),b=E("v-radio-group"),_=E("target-packet-item-chooser"),m=E("v-container"),w=E("v-progress-circular"),p=E("v-spacer"),S=E("v-btn"),T=E("v-tooltip"),x=E("v-toolbar"),k=E("v-card-title"),P=E("v-icon"),g=E("v-select"),A=E("v-card-text"),R=E("v-card-actions"),I=E("v-card"),z=E("v-dialog"),ms=E("v-data-table"),ps=E("open-config-dialog"),gs=E("save-config-dialog");return O(),W("div",null,[d(o,{menus:r.menus,title:s.title},null,8,["menus","title"]),d(I,null,{default:f(()=>[d(m,null,{default:f(()=>[d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(a,{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(a,{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(a,{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(a,{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(b,{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(_,{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(x,{class:"pl-3"},{default:f(()=>[d(w,{"model-value":s.progress},null,8,["model-value"]),N(" Processed: "+B(s.totalPacketsReceived)+" packets, "+B(s.totalItemsReceived)+" items ",1),d(p),d(S,{class:"bg-primary",onClick:r.processItems,disabled:s.items.length<1},{default:f(()=>[N(B(s.processButtonText),1)]),_:1},8,["onClick","disabled"]),d(p),d(T,{location:"top"},{activator:f(({props:y})=>[d(S,K({icon:"mdi-pencil",variant:"text",onClick:e[6]||(e[6]=M=>s.editAll=!0)},y,{disabled:s.items.length<1,"data-test":"editAll"}),null,16,["disabled"])]),default:f(()=>[e[18]||(e[18]=$("span",null," Edit All Items ",-1))]),_:1}),d(T,{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]=$("span",null,"Delete All Items",-1))]),_:1})]),_:1}),d(I,{width:"100%"},{default:f(()=>[d(k,null,{default:f(()=>[e[20]||(e[20]=N(" Items ")),d(p),d(a,{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(ms,{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(T,{location:"top"},{activator:f(({props:M})=>[d(P,K({onClick:Ye(bs=>y.edit=!0,["stop"])},M,{"data-test":"edit-row"}),{default:f(()=>e[21]||(e[21]=[N(" mdi-pencil ")])),_:2},1040,["onClick"])]),default:f(()=>[e[22]||(e[22]=$("span",null,"Edit Item",-1))]),_:2},1024),d(z,{modelValue:y.edit,"onUpdate:modelValue":M=>y.edit=M,onKeydown:Ce(M=>y.edit=!1,["esc"]),"max-width":"600"},{default:f(()=>[d(I,null,{default:f(()=>[d(x,{height:"24"},{default:f(()=>[d(p),e[23]||(e[23]=$("span",null," DataExtractor: Edit Item Mode ",-1)),d(p)]),_:1}),d(A,null,{default:f(()=>[d(c,{class:"mt-3 title-font"},{default:f(()=>[d(u,null,{default:f(()=>[N(B(r.getItemLabel(y)),1)]),_:2},1024)]),_:2},1024),d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(g,{"hide-details":"",items:s.modes,label:"Mode",variant:"outlined",modelValue:y.mode,"onUpdate:modelValue":M=>y.mode=M},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024),d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(g,{"hide-details":"",items:s.valueTypes,label:"Value Type",variant:"outlined",modelValue:y.valueType,"onUpdate:modelValue":M=>y.valueType=M},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024),d(c,null,{default:f(()=>[d(u,null,{default:f(()=>[d(g,{"hide-details":"",items:s.reducedTypes,label:"Reduced Type",variant:"outlined",modelValue:y.reducedType,"onUpdate:modelValue":M=>y.reducedType=M},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:2},1024),d(R,{class:"px-2"},{default:f(()=>[d(p),d(S,{variant:"flat",onClick:M=>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(T,{location:"top"},{activator:f(({props:M})=>[d(P,K({onClick:bs=>r.deleteItem(y)},M,{"data-test":"delete-row"}),{default:f(()=>e[25]||(e[25]=[N(" mdi-delete ")])),_:2},1040,["onClick"])]),default:f(()=>[e[26]||(e[26]=$("span",null," Delete Item ",-1))]),_:2},1024)]),_:1},8,["headers","items","search","items-per-page"])]),_:1})]),_:1}),d(z,{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(I,null,{default:f(()=>[d(x,{height:"24"},{default:f(()=>[d(p),e[27]||(e[27]=$("span",null," DataExtractor: Edit All Items",-1)),d(p)]),_:1}),d(A,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(g,{"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(g,{"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(g,{"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(R,{class:"px-2"},{default:f(()=>[d(p),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?(O(),U(ps,{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"])):ee("",!0),s.saveConfig?(O(),U(gs,{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"])):ee("",!0)])}const js=Zt("default",$e(hs,[["render",fs],["__scopeId","data-v-fe8f606e"]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-
|
1
|
+
System.register(["./Widget-CERFa1CU-dbdc97f7724eeef5b94c.js","./main-86c9719144ea13616cad.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.createBlock,u=e.openBlock,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,b){const h=s("v-text-field");return u(),r(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-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"]]))}}});
|
1
|
+
System.register(["./main-86c9719144ea13616cad.js","vue"],function(C,P){"use strict";var V,L,m,o,r,e,t,k,s,d,h,g,v,w;return{setters:[c=>{V=c.s,L=c.R},c=>{m=c.resolveComponent,o=c.createBlock,r=c.openBlock,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},R={key:9};function x(u,a,_,p,i,y){const N=m("v-spacer"),B=m("v-toolbar"),D=m("v-card-title"),T=m("v-card-subtitle"),l=m("v-col"),n=m("v-row"),U=m("v-switch"),I=m("v-container"),O=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(B,{height:24},{default:e(()=>[t(N),a[2]||(a[2]=k("span",null," Details ",-1)),t(N)]),_:1}),t(D,null,{default:e(()=>[s(d(_.targetName)+" "+d(_.packetName)+" "+d(_.itemName),1)]),_:1}),t(T,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(U,{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",R,[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",x],["__scopeId","data-v-785491ee"]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["vue","./main-
|
1
|
+
System.register(["vue","./main-86c9719144ea13616cad.js","vue-router","single-spa","vuex","vuetify"],function(a,p){"use strict";var t,n,r,o,i,s;return{setters:[e=>{t=e.createBlock,n=e.openBlock,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 n(),t(r(c.widgetType),o(i({...u.$props,...u.$attrs})),null,16)}const m=a("default",s(e,[["render",l]]))}}});
|