openc3-cosmos-tool-dataextractor 6.10.4 → 6.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/tools/dataextractor/ArrayWidget-DuLt8EJf-7ce9fc55314523b8982f.js +2 -0
  3. data/tools/dataextractor/{ArrayplotWidget-DsvOovu9-cae71a1b94599e900be5.js → ArrayplotWidget-Cd-gOSvk-3150777baf3beaf2b47e.js} +1 -1
  4. data/tools/dataextractor/{BarColumn-DHHJBR3V-46bfcdd1b868aec90ca5.js → BarColumn-Dl9qcKah-9d51ff25fa175a6848eb.js} +1 -1
  5. data/tools/dataextractor/BlockWidget-DDV7KBvj-74978b37d5fceaffdc65.js +2 -0
  6. data/tools/dataextractor/{ButtonWidget-zpSJmiQT-3cdbebd0c95fe74c6fed.js → ButtonWidget-DAiwgS-s-111496c77e8a8aebec9f.js} +2 -2
  7. data/tools/dataextractor/{CanvasWidget-DaUB1G9X-e59ca78e6da56a061082.js → CanvasWidget-CBiHxOuV-9ce3213cd1b2f689768f.js} +1 -1
  8. data/tools/dataextractor/CanvasdotWidget-B_iTeu6J-20fe53a3e89a751e6587.js +1 -0
  9. data/tools/dataextractor/{CanvasimageWidget-CFlUUFqr-a895ca9cc3d9cee1e23d.js → CanvasimageWidget-DPME18WO-d80ebea3acf5424bc48e.js} +1 -1
  10. data/tools/dataextractor/{CanvasimagevalueWidget-s4gR3fo5-8c62e8d6362be567898d.js → CanvasimagevalueWidget-Cvjd5N_d-995ae23092dd1a20faaf.js} +1 -1
  11. data/tools/dataextractor/{CanvaslabelWidget-CaOc-lTQ-80bbf76fcf08634a4d3f.js → CanvaslabelWidget-DV9TSYqo-5044efac7e83846ac910.js} +1 -1
  12. data/tools/dataextractor/{CanvaslabelvalueWidget-hqJoPekq-927f7e4946a290758b8b.js → CanvaslabelvalueWidget-CZEuRFgE-c14b57593d5684350ddc.js} +1 -1
  13. data/tools/dataextractor/{CanvaslineWidget-DebP2L43-a008528d4dd073aa4f5b.js → CanvaslineWidget-DX3NwYIu-89b042fc61687f527fb5.js} +1 -1
  14. data/tools/dataextractor/{CanvaslinevalueWidget-BkPG5Vtx-512390727604c4d72a50.js → CanvaslinevalueWidget-zT2i95O2-7e5d523c7a8a9da81b59.js} +1 -1
  15. data/tools/dataextractor/CheckbuttonWidget-D1Oq1A1Y-6813b4f30bd981d17bbf.js +1 -0
  16. data/tools/dataextractor/ComboboxWidget-CaOeC7ES-4f9212e78f33599aa373.js +1 -0
  17. data/tools/dataextractor/DataExtractor-1c81529358de1f6b6e42.js +14 -0
  18. data/tools/dataextractor/{DateWidget-1IZOe50K-1dfd8bef8abf3063d827.js → DateWidget-DHegSO3F-dbf7dd677e2ccaa68d6f.js} +1 -1
  19. data/tools/dataextractor/{DetailsDialog-D-rjL4oc-42527ff3f15896b49ffb.js → DetailsDialog-B9IRpYsU-54f0b77eb818a93bf972.js} +1 -1
  20. data/tools/dataextractor/{DynamicWidget-DEHWYr8i-46b6f8c6d4ac6db30649.js → DynamicWidget-DEHWYr8i-5c10876e2aef8c9420fb.js} +1 -1
  21. data/tools/dataextractor/{FilechecksumWidget-F_FX1Kjx-30c3f25bba0fd0759a34.js → FilechecksumWidget-BlZ_YlAn-4923408f6be2fdbbdeb4.js} +1 -1
  22. data/tools/dataextractor/{FiledisplayWidget-BF3G22jF-2205b350f1620540a8ff.js → FiledisplayWidget-TJ2RL43--694316a75e53e40521dd.js} +1 -1
  23. data/tools/dataextractor/FormatvalueWidget-0S6n-WEr-893bfbca49f6cc89c648.js +1 -0
  24. data/tools/dataextractor/Graph-CXuxaEKD-7ac3991daf23379a3289.js +1 -0
  25. data/tools/dataextractor/{GraphWidget-DRkDn8za-1cadc0976f9566e325d7.js → GraphWidget-CGjfTMGG-6b0ec8f2831381dbd15e.js} +1 -1
  26. data/tools/dataextractor/{HorizontalWidget-DB64wzZB-e2665ea2fa7ba485c122.js → HorizontalWidget-Crp4JtGX-3a768487b2641e6d63c8.js} +1 -1
  27. data/tools/dataextractor/HorizontalboxWidget-DlM7Hoxy-6ce8a250950412149775.js +1 -0
  28. data/tools/dataextractor/HorizontallineWidget-HCZU5Dm--b3b587a2ee70f1e61476.js +1 -0
  29. data/tools/dataextractor/IframeWidget-D3Mqvq2p-b110e57ea4c720a97255.js +1 -0
  30. data/tools/dataextractor/{ImageLoader-B4iBPFyi-63980dd733dd3b1c6768.js → ImageLoader-BbPJF9nD-6b40dac2234846fc58c1.js} +1 -1
  31. data/tools/dataextractor/{ImageviewerWidget-DqV4SClv-f306633521ca9d163b89.js → ImageviewerWidget-Bc8A3xX7-7b3967076456e5d6f246.js} +1 -1
  32. data/tools/dataextractor/{LabelWidget-BDukcPet-31760d000a21f043f804.js → LabelWidget-BV6758n5-30c60066d70db448b497.js} +1 -1
  33. data/tools/dataextractor/LabelledWidget-Dk7399HX-b19dbf60e0c201ea8549.js +1 -0
  34. data/tools/dataextractor/LabelprogressbarWidget-B9ZQxLEG-e740dc0c44f3608dc666.js +1 -0
  35. data/tools/dataextractor/LabelsparklineWidget-CwFa7EJr-175ff86fd54dbba4275e.js +1 -0
  36. data/tools/dataextractor/LabelvalueWidget-DcOqiZea-fe6e91e2787c2e1332ff.js +1 -0
  37. data/tools/dataextractor/{LabelvaluedescWidget-Crb8udVe-9e0215d421c3cd4cb0a0.js → LabelvaluedescWidget-bzML7aS7-8c85376adbe60bf34a40.js} +1 -1
  38. data/tools/dataextractor/LabelvaluelimitsbarWidget-GCgFxc-I-f8ad00b1750b5a297465.js +1 -0
  39. data/tools/dataextractor/LabelvaluelimitscolumnWidget-DuRuNm4g-d78d4dbb14bd3b72b0e5.js +1 -0
  40. data/tools/dataextractor/{LabelvaluerangebarWidget-CjkVDlVJ-3e87ab73208f47528e87.js → LabelvaluerangebarWidget-C32gfNLA-4e76d6286259592a8dc7.js} +1 -1
  41. data/tools/dataextractor/Layout-CYQt4P78-c1bb90f7d472d3285be8.js +1 -0
  42. data/tools/dataextractor/{LedWidget-Bsp1aja--393030ed5a160d853828.js → LedWidget-DcN4UWc9-fbb16afe63315b38c845.js} +1 -1
  43. data/tools/dataextractor/{LimitsBar-IVv8t4FE-8c4464aab7f5c57f839c.js → LimitsBar-CewifD-8-662617dfbc612284ec64.js} +1 -1
  44. data/tools/dataextractor/{LimitsbarWidget-Bo1JAoQp-0d199c342a4173113eeb.js → LimitsbarWidget-Dy-IqgZj-a038ba03660b3eebcf43.js} +1 -1
  45. data/tools/dataextractor/{LimitscolorWidget-Doq8h_g1-fab5ce7ba52f4f843b44.js → LimitscolorWidget-2eLprLL7-8b35354d9ba2fcd1b882.js} +1 -1
  46. data/tools/dataextractor/{LimitscolumnWidget-qasXHN7m-26fe75ce1876c0fff23a.js → LimitscolumnWidget-DlPcKW-r-d09e218e228b24961ae9.js} +1 -1
  47. data/tools/dataextractor/{LinegraphWidget-BNMqcr_r-cb99dd80c8953ea69ba6.js → LinegraphWidget-BFXYdx0Q-37d3976b1bf99538a849.js} +1 -1
  48. data/tools/dataextractor/{MatrixbycolumnsWidget-BlF1CyIT-8ece83d295ac766f5fdc.js → MatrixbycolumnsWidget-BvbEs_NU-bbff76e7e6ea42fc7be0.js} +1 -1
  49. data/tools/dataextractor/OpenC3TimePicker-CFSMcJ1F-4f22af1c033c3b008088.js +1 -0
  50. data/tools/dataextractor/{ProgressbarWidget-DQ80NANH-9fecc0b3bbb5e0110f90.js → ProgressbarWidget-CYQzHmXv-aba7dfe8ef9510720f00.js} +1 -1
  51. data/tools/dataextractor/{RadiobuttonWidget-LD18M4IQ-88d530bbe15b4d4b24eb.js → RadiobuttonWidget-JJC2cnc7-aa05505e943a957006cd.js} +1 -1
  52. data/tools/dataextractor/{RadiogroupWidget-D_pt2MPz-fdd38282ab3f3f6538ec.js → RadiogroupWidget-B-b7D4f4-f9318ecd1f6d9062e090.js} +1 -1
  53. data/tools/dataextractor/{RangebarWidget-DhaWpHjB-7f827ea4b32592166f2e.js → RangebarWidget-nD6qbLmB-b43a7aa26035bd75971e.js} +1 -1
  54. data/tools/dataextractor/{RollupWidget-CMU1-HwL-45e2ca651e4c698b68f3.js → RollupWidget-D80cEXSI-aa04aa4ad10cfe7fed92.js} +1 -1
  55. data/tools/dataextractor/{ScrollwindowWidget-D7Ln-QMq-e50f5afd615e22e0cb4e.js → ScrollwindowWidget-Cun3Vh6z-90d3fc790103fb4b4ef7.js} +1 -1
  56. data/tools/dataextractor/{SignalWidget-PreTg4Mt-fd853433a876369f4dc0.js → SignalWidget-CYsoFQEA-37d10f1075062d4d946f.js} +1 -1
  57. data/tools/dataextractor/SpacerWidget-CrheUKPo-a83d25c0a7ffee576c55.js +1 -0
  58. data/tools/dataextractor/{SparklineWidget-Bb-gCNNt-c75f2105d22c4077be9c.js → SparklineWidget-BxBx5KIx-b7fa0b929aaf4c8bf6f6.js} +1 -1
  59. data/tools/dataextractor/{TabbookWidget-a-LsBhBE-f061d50e234198262752.js → TabbookWidget-Bznl4HVt-82171b343eb1b737b7f0.js} +1 -1
  60. data/tools/dataextractor/{TargetPacketItemChooser-DDqBQTWC-14850752bb987478aae1.js → TargetPacketItemChooser-UsuVtlF--8c9a60d430f541510a7f.js} +1 -1
  61. data/tools/dataextractor/TextboxWidget-CCjkSFMU-f66c901deae7db928f68.js +1 -0
  62. data/tools/dataextractor/TextfieldWidget-D6vtrFO9-cf93ca53cbff600a41df.js +1 -0
  63. data/tools/dataextractor/TimeWidget-Bq_m9VEj-7f53e48b7e06a3dfa812.js +1 -0
  64. data/tools/dataextractor/TitleWidget-CGKBIIjU-6308d255abbe9d0afcd4.js +1 -0
  65. data/tools/dataextractor/VWidget-DaN-EoJP-38b9d9ae4d1d71bde02f.js +1 -0
  66. data/tools/dataextractor/ValueWidget-Dj4GYuSK-d93720fcdd155fa9fdda.js +1 -0
  67. data/tools/dataextractor/ValuelimitsbarWidget-B-IXXtXy-1bda037cc8c8dbf6cfd1.js +1 -0
  68. data/tools/dataextractor/ValuelimitscolumnWidget-B3Xjqz_f-f74adbc1299f0a3a074e.js +1 -0
  69. data/tools/dataextractor/{ValuerangebarWidget-D8hVKp0l-26ef42e5000b3d741af3.js → ValuerangebarWidget-Ct_CvpUg-35b11ada52a2f8527d07.js} +1 -1
  70. data/tools/dataextractor/{VerticalWidget-DMp3DXGa-ec8a8497d466fc81135b.js → VerticalWidget-BlEtS5Bs-7b48e250f021d8bf4dc3.js} +1 -1
  71. data/tools/dataextractor/VerticalboxWidget-rr_GslBl-34bde7f7281fb2e887ed.js +1 -0
  72. data/tools/dataextractor/{Widget-D4rzBHnr-20d97feec6afa1ff041b.js → Widget-DsHcvxJg-11a1df76abff911bf48d.js} +1 -1
  73. data/tools/dataextractor/main-d174cc6c21c521d09209.js +1509 -0
  74. data/tools/dataextractor/main.js +1 -1
  75. metadata +73 -73
  76. data/tools/dataextractor/ArrayWidget-DfiusKpM-a429a5a35aff3aad2072.js +0 -2
  77. data/tools/dataextractor/BlockWidget-BdYXWS_0-a1603263f5ba10e5abb4.js +0 -2
  78. data/tools/dataextractor/CanvasdotWidget-C255aTVc-6ae2f67bee6c22492603.js +0 -1
  79. data/tools/dataextractor/CheckbuttonWidget-eQIcPATf-658fe1be998ed6c15429.js +0 -1
  80. data/tools/dataextractor/ComboboxWidget-B5kzYxFk-5a1a98b7ee3b81eefaaf.js +0 -1
  81. data/tools/dataextractor/DataExtractor-9e315e6ca613394b5f93.js +0 -11
  82. data/tools/dataextractor/FormatvalueWidget-BkF9iiHs-e6ea937daf837a000d48.js +0 -1
  83. data/tools/dataextractor/Graph-C-7C2Jq5-11eb0a8d281ee8b042a8.js +0 -1
  84. data/tools/dataextractor/HorizontalboxWidget-BsHsGlvK-a97546bf1b5df47aed69.js +0 -1
  85. data/tools/dataextractor/HorizontallineWidget-CyiexzIu-ed413bd3a5f83291ff07.js +0 -1
  86. data/tools/dataextractor/IframeWidget-D9Vh0w2c-7148a75b6b5e4e5896b7.js +0 -1
  87. data/tools/dataextractor/LabelledWidget-tVHE426s-21c84a75bf002fb8d01a.js +0 -1
  88. data/tools/dataextractor/LabelprogressbarWidget-CjMDFUUv-f37c673b8b65bfd7a3b0.js +0 -1
  89. data/tools/dataextractor/LabelsparklineWidget-dZl3cGu0-882d20869ccd87b0504a.js +0 -1
  90. data/tools/dataextractor/LabelvalueWidget-UcAc_2Ry-e635b73a24e0fafcb04d.js +0 -1
  91. data/tools/dataextractor/LabelvaluelimitsbarWidget-BZGUQrRt-fadf2a8cad01ed8ced03.js +0 -1
  92. data/tools/dataextractor/LabelvaluelimitscolumnWidget-NNYW2aMO-7ece42105a62cff943f7.js +0 -1
  93. data/tools/dataextractor/Layout-FpBx3iic-ce86a0846f170bb59bb3.js +0 -1
  94. data/tools/dataextractor/OpenC3TimePicker-D-_qqySI-3567ab45a515094ba0d0.js +0 -1
  95. data/tools/dataextractor/SpacerWidget-Chy1NO28-2c01d0a39e58e0f504b4.js +0 -1
  96. data/tools/dataextractor/TextboxWidget-DIHEOldN-d88ae753462abdf03bdb.js +0 -1
  97. data/tools/dataextractor/TextfieldWidget-CIBo7Dau-aeef40d0899e9c0e93b3.js +0 -1
  98. data/tools/dataextractor/TimeWidget-CLuOYfPP-057e06980ffafaf21480.js +0 -1
  99. data/tools/dataextractor/TitleWidget-BTHKLAsb-2d44a428a77f77ff7baa.js +0 -1
  100. data/tools/dataextractor/VWidget-BcwkHuIT-4b2fbda2cd88559aeb5b.js +0 -1
  101. data/tools/dataextractor/ValueWidget-BubIamVx-8b83830f75d379716847.js +0 -1
  102. data/tools/dataextractor/ValuelimitsbarWidget-DKTrV1RT-62e9e609054c8e60d62e.js +0 -1
  103. data/tools/dataextractor/ValuelimitscolumnWidget-D8JIK4Zi-a8c29fba1f90d3ef7b74.js +0 -1
  104. data/tools/dataextractor/VerticalboxWidget-CVf1d_3_-ddc77d1deb5814b78edf.js +0 -1
  105. data/tools/dataextractor/main-5393150a38f7b14176e1.js +0 -1503
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 672c32328463a3cdfcf00ff9dcd3944c2c68a0b0caeb7cee7cdafd7e82fb7aa5
4
- data.tar.gz: 4566a7e5fdbf8abbd7178084d32751e9e59c7c871a07e2e6fecc7cf208df65a3
3
+ metadata.gz: 17eef4648c428591d5857cd157a7ccc1a170a327ca7c56861f229568042166e4
4
+ data.tar.gz: df7131f2346d074d7db5b54623caa2f5bc9beb8079565b1e76639520cb5f4ded
5
5
  SHA512:
6
- metadata.gz: ac0f586c3acc7c05f7af629c1b6e87418f25582c19f73ce9b24145edf018ba2d11eef45d34fc4891d84cb25b3ac48772c2c02afae75eaaeedb7100d5fec8d1fa
7
- data.tar.gz: ea834d74a579ded779db3696aeb12b8b941f014f18aabeba3c45b42fc53ee5f0ef3a3071e1802b8fc3782d5803830a60f8aa921378758be4f9ce79aa23368082
6
+ metadata.gz: b5efdb689662cbfc091cc045b445dedeca6d8fa6bfbda119c72ab39b6afbcdbd336f381849cc1d4d1d34672d4e0fa2d587e3929848ad4591899bbe22b6bf6ef0
7
+ data.tar.gz: 43927c29966f2ab5ac440402d230480a98712a9dc8f8562ac0228bd75596f5e6cc0a5987ba64ae9dd1f3e3dabd288e5cf0b2c2ada9943e3dc0685270fe594ecd
@@ -0,0 +1,2 @@
1
+ System.register(["./main-d174cc6c21c521d09209.js","vue","./DetailsDialog-B9IRpYsU-54f0b77eb818a93bf972.js","single-spa","./VWidget-DaN-EoJP-38b9d9ae4d1d71bde02f.js","vue-router","vuex","vuetify","./LimitsBar-CewifD-8-662617dfbc612284ec64.js","./Widget-DsHcvxJg-11a1df76abff911bf48d.js"],function(S,R){"use strict";var h,a,c,u,i,d,p,l,g,f,v,w,y,x,C,V;return{setters:[t=>{h=t.d},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,x=t.toDisplayString},t=>{C=t.q},null,t=>{V=t.S},null,null,null,null,null],execute:function(){const t={components:{DetailsDialog:C},mixins:[V],data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){var r;let s="",D=" ",k=`
2
+ `,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?s+=sprintf(this.formatter,m):s+=m,o+=1,o%this.itemsPerRow===0?(o=0,s+=k):s+=D;return s.trim()}else return e}}},B={class:"array-widget-container"};function _(e,r,s,D,k,o){const m=a("v-textarea"),z=a("v-list-item-title"),M=a("v-list-item"),N=a("v-list"),j=a("v-menu"),E=a("details-dialog");return u(),c("div",B,[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(j,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:l(()=>[i(N,null,{default:l(()=>[(u(!0),c(g,null,f(e.contextMenuOptions,(n,L)=>(u(),v(M,{key:L,onClick:w(n.action,["stop"])},{default:l(()=>[i(z,null,{default:l(()=>[y(x(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(E,{modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>e.viewDetails=n),"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const I=S("default",h(t,[["render",_],["__scopeId","data-v-69b65cde"]]))}}});
@@ -1 +1 @@
1
- System.register(["./main-5393150a38f7b14176e1.js","./GraphWidget-DRkDn8za-1cadc0976f9566e325d7.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-D4rzBHnr-20d97feec6afa1ff041b.js"],function(m,k){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.d,l=s.f,h=s.P},s=>{d=s.M},s=>{u=s.createElementBlock,p=s.openBlock},null,null,null,null,null],execute:function(){const s={mixins:[d],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"]}},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},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()},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",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const w=m("default",c(s,[["render",g]]))}}});
1
+ System.register(["./main-d174cc6c21c521d09209.js","./GraphWidget-CGjfTMGG-6b0ec8f2831381dbd15e.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-DsHcvxJg-11a1df76abff911bf48d.js"],function(m,x){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.d,l=s.c,h=s.G},s=>{d=s.M},s=>{u=s.createElementBlock,p=s.openBlock},null,null,null,null,null],execute:function(){const s={mixins:[d],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"]}},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},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()},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}}},g=["id"];function b(e,t,n,r,i,a){return p(),u("div",{id:`chart${e.id}`,class:"pa-1"},null,8,g)}const k=m("default",c(s,[["render",b]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-D4rzBHnr-20d97feec6afa1ff041b.js","./main-5393150a38f7b14176e1.js"],function(a,n){"use strict";var h,r;return{setters:[e=>{h=e.o},e=>{r=e.B}],execute:function(){const e=a("u",{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 r,this.parameters[2].includes("[[")&&(this.parameters[2]=this.parameters[2].replace("[[","[").replace("]]","]")),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 l=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(l=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 s=parseInt((t-l)/this.scale);return s>100?100:s<0?0:s}},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})}}})}}});
1
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","./main-d174cc6c21c521d09209.js"],function(a,n){"use strict";var h,r;return{setters:[s=>{h=s.o},s=>{r=s.Y}],execute:function(){const s=a("u",{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 r,this.parameters[2].includes("[[")&&(this.parameters[2]=this.parameters[2].replace("[[","[").replace("]]","]")),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 l=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(l=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-l)/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-d174cc6c21c521d09209.js","vue","./DetailsDialog-B9IRpYsU-54f0b77eb818a93bf972.js","single-spa","./VWidget-DaN-EoJP-38b9d9ae4d1d71bde02f.js","vue-router","vuex","vuetify","./LimitsBar-CewifD-8-662617dfbc612284ec64.js","./Widget-DsHcvxJg-11a1df76abff911bf48d.js"],function(B,R){"use strict";var u,r,m,h,s,p,g,o,w,f,v,x,y,C,k,V;return{setters:[e=>{u=e.d},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,x=e.withModifiers,y=e.createTextVNode,C=e.toDisplayString},e=>{k=e.q},null,e=>{V=e.S},null,null,null,null,null],execute:function(){const e={components:{DetailsDialog:k},mixins:[V],data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},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 D=" ",S=`
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+=S):i%this.bytesPerWord===0&&(a+=D)}else a=t;return a}}},P={class:"block-widget-container"};function W(t,a,D,S,i,l){const d=r("v-textarea"),c=r("v-list-item-title"),M=r("v-list-item"),_=r("v-list"),b=r("v-menu"),F=r("details-dialog");return h(),m("div",P,[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(_,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,N)=>(h(),v(M,{key:N,onClick:x(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[y(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(F,{modelValue:t.viewDetails,"onUpdate:modelValue":a[1]||(a[1]=n=>t.viewDetails=n),"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const j=B("default",u(e,[["render",W],["__scopeId","data-v-454d6ab5"]]))}}});
@@ -1,2 +1,2 @@
1
- System.register(["./main-5393150a38f7b14176e1.js","vue","single-spa","./Widget-D4rzBHnr-20d97feec6afa1ff041b.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,w,FA,BA,resolveComponent,createBlock,openBlock,withCtx,createVNode,createElementVNode,createCommentVNode,createTextVNode,toDisplayString,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{d=e.d,w=e.w,FA=e.F,BA=e.B},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:{type:String,default:null},cmdUser:{type:String,default:null},cmdString:{type:String,default:null},persistent:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","status"],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}},watch:{modelValue:function(e,t){e?(FA.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?FA.get("/openc3-api/criticalcmd/status/"+this.uuid).then(s=>{s.data.status!=="WAITING"&&(this.$emit("status",s.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},methods:{async approve(){if(this.canApprove)await FA.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();w.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 FA.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 w.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 w.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,s,p,a,r){const n=resolveComponent("v-spacer"),f=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),l=resolveComponent("v-row"),h=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),v=resolveComponent("v-container"),V=resolveComponent("v-card-text"),u=resolveComponent("v-card"),y=resolveComponent("v-dialog");return openBlock(),createBlock(y,{modelValue:r.show,"onUpdate:modelValue":t[3]||(t[3]=c=>r.show=c),persistent:s.persistent,width:"600"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[createVNode(f,{height:"24"},{default:withCtx(()=>[createVNode(n),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(n)]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(v,{fluid:""},{default:withCtx(()=>[createVNode(m,{modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=c=>a.error=c),type:"error",closable:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(l,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(s.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(l,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(s.cmdString),1)]),_:1}),createVNode(l,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(s.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=c=>a.username=c),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=c=>a.password=c),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(l,{class:"pt-2"},{default:withCtx(()=>[createVNode(n),createVNode(C,{type:"submit",class:"mx-2",color:"secondary",variant:"outlined",disabled:r.disableButtons,"data-test":"reject",onClick:withModifiers(r.reject,["prevent"])},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Reject ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(C,{type:"submit",class:"mx-2",color:"primary",disabled:r.disableButtons,"data-test":"approve",onClick:withModifiers(r.approve,["prevent"])},{default:withCtx(()=>[...t[6]||(t[6]=[createTextVNode(" Approve ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const N=d(S,[["render",E],["__scopeId","data-v-0b6637f7"]]),_sfc_main={components:{CriticalCmdDialog:N},mixins:[o],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 BA},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,s={}){let p=[];for(const a in s)p.push({key:a,value:s[a],readonly:!1});FA.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,s,p,a,r){const n=resolveComponent("v-btn"),f=resolveComponent("v-card-title"),m=resolveComponent("v-row"),l=resolveComponent("v-spacer"),h=resolveComponent("v-card-text"),C=resolveComponent("v-card"),v=resolveComponent("v-dialog"),V=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(n,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:r.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(r.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(v,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=u=>a.displaySendHazardous=u),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>[...t[2]||(t[2]=[createTextVNode("Hazardous",-1)])]),_: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(l),createVNode(n,{variant:"outlined",onClick:r.cancelHazardousCmd},{default:withCtx(()=>[...t[4]||(t[4]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(n,{class:"bg-primary mx-1",onClick:r.sendHazardousCmd},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(V,{modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=u=>a.displayCriticalCmd=u),uuid:a.criticalCmdUuid,"cmd-string":a.criticalCmdString,"cmd-user":a.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))}}});
1
+ System.register(["./main-d174cc6c21c521d09209.js","vue","single-spa","./Widget-DsHcvxJg-11a1df76abff911bf48d.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,R,VA,YA,resolveComponent,createBlock,openBlock,withCtx,createVNode,createElementVNode,createCommentVNode,createTextVNode,toDisplayString,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{d=e.d,R=e.a,VA=e.V,YA=e.Y},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 E={props:{uuid:{type:String,default:null},cmdUser:{type:String,default:null},cmdString:{type:String,default:null},persistent:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","status"],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}},watch:{modelValue:function(e,t){e?(VA.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?VA.get("/openc3-api/criticalcmd/status/"+this.uuid).then(s=>{s.data.status!=="WAITING"&&(this.$emit("status",s.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},methods:{async approve(){if(this.canApprove)await VA.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();R.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 VA.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 R.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 R.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 S(e,t,s,p,a,r){const n=resolveComponent("v-spacer"),V=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),l=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,{modelValue:r.show,"onUpdate:modelValue":t[3]||(t[3]=c=>r.show=c),persistent:s.persistent,width:"600"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[createVNode(V,{height:"24"},{default:withCtx(()=>[createVNode(n),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(n)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createVNode(f,{fluid:""},{default:withCtx(()=>[createVNode(m,{modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=c=>a.error=c),type:"error",closable:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(l,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(s.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(l,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(s.cmdString),1)]),_:1}),createVNode(l,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(s.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=c=>a.username=c),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=c=>a.password=c),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(l,{class:"pt-2"},{default:withCtx(()=>[createVNode(n),createVNode(C,{type:"submit",class:"mx-2",color:"secondary",variant:"outlined",disabled:r.disableButtons,"data-test":"reject",onClick:withModifiers(r.reject,["prevent"])},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Reject ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(C,{type:"submit",class:"mx-2",color:"primary",disabled:r.disableButtons,"data-test":"approve",onClick:withModifiers(r.approve,["prevent"])},{default:withCtx(()=>[...t[6]||(t[6]=[createTextVNode(" Approve ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const N=d(E,[["render",S],["__scopeId","data-v-0b6637f7"]]),_sfc_main={components:{CriticalCmdDialog:N},mixins:[o],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 YA},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,s={}){let p=[];for(const a in s)p.push({key:a,value:s[a],readonly:!1});VA.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,s,p,a,r){const n=resolveComponent("v-btn"),V=resolveComponent("v-card-title"),m=resolveComponent("v-row"),l=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(n,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:r.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(r.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)])]),_: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(l),createVNode(n,{variant:"outlined",onClick:r.cancelHazardousCmd},{default:withCtx(()=>[...t[4]||(t[4]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(n,{class:"bg-primary mx-1",onClick:r.sendHazardousCmd},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(v,{modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=u=>a.displayCriticalCmd=u),uuid:a.criticalCmdUuid,"cmd-string":a.criticalCmdString,"cmd-user":a.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))}}});
@@ -1 +1 @@
1
- System.register(["./Layout-FpBx3iic-ce86a0846f170bb59bb3.js","vue","./main-5393150a38f7b14176e1.js","./Widget-D4rzBHnr-20d97feec6afa1ff041b.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.u},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.d},null,null,null,null,null],execute:function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},d=["width","height"];function h(r,B,k,y,x,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,d)}const w=p("default",g(e,[["render",h],["__scopeId","data-v-16dc7bf8"]]))}}});
1
+ System.register(["./Layout-CYQt4P78-c1bb90f7d472d3285be8.js","vue","./main-d174cc6c21c521d09209.js","./Widget-DsHcvxJg-11a1df76abff911bf48d.js","vue-router","single-spa","vuex","vuetify"],function(p,f){"use strict";var i,s,n,a,l,c,u,g,o;return{setters:[e=>{i=e.u},e=>{s=e.createElementBlock,n=e.openBlock,a=e.Fragment,l=e.renderList,c=e.createBlock,u=e.resolveDynamicComponent,g=e.mergeProps},e=>{o=e.d},null,null,null,null,null],execute:function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},d=["width","height"];function h(r,k,y,x,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),g({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,d)}const w=p("default",o(e,[["render",h],["__scopeId","data-v-16dc7bf8"]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","vue","./main-d174cc6c21c521d09209.js","vue-router","single-spa","vuex","vuetify"],function(s,a){"use strict";var t,l,n,c;return{setters:[e=>{t=e.o},e=>{l=e.createElementBlock,n=e.openBlock},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(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",i]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-D4rzBHnr-20d97feec6afa1ff041b.js","./ImageLoader-B4iBPFyi-63980dd733dd3b1c6768.js","vue","./main-5393150a38f7b14176e1.js","vue-router","single-spa","vuex","vuetify"],function(m,d){"use strict";var i,n,s,a,l,c,h;return{setters:[e=>{i=e.o},e=>{n=e.s},e=>{s=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},e=>{h=e.d},null,null,null,null],execute:function(){const e={mixins:[i,n],emits:["open"],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(),s("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
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","./ImageLoader-BbPJF9nD-6b40dac2234846fc58c1.js","vue","./main-d174cc6c21c521d09209.js","vue-router","single-spa","vuex","vuetify"],function(m,d){"use strict";var n,s,i,a,l,c,h;return{setters:[e=>{n=e.o},e=>{s=e.s},e=>{i=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},e=>{h=e.d},null,null,null,null],execute:function(){const e={mixins:[n,s],emits:["open"],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function g(t,o,y,k,x,r){return t.imageUrl?(l(),i("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]=(...p)=>r.clickHandler&&r.clickHandler(...p))},null,12,u)):a("",!0)}const f=m("default",h(e,[["render",g]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-D4rzBHnr-20d97feec6afa1ff041b.js","./ImageLoader-B4iBPFyi-63980dd733dd3b1c6768.js","vue","./main-5393150a38f7b14176e1.js","vue-router","single-spa","vuex","vuetify"],function(I,S){"use strict";var m,d,l,n,h,o,g,p,u,c,f;return{setters:[t=>{m=t.o},t=>{d=t.s},t=>{l=t.createElementBlock,n=t.openBlock,h=t.withDirectives,o=t.createCommentVNode,g=t.Fragment,p=t.renderList,u=t.normalizeStyle,c=t.vShow},t=>{f=t.d},null,null,null,null],execute:function(){const t={mixins:[m,d],emits:["addItem","deleteItem","open"],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)}}},v=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(r,e,i,y,N,a){return n(),l("g",null,[(n(!0),l(g,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,v)),[[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]]):o("",!0)])}const $=I("default",f(t,[["render",k]]))}}});
1
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","./ImageLoader-BbPJF9nD-6b40dac2234846fc58c1.js","vue","./main-d174cc6c21c521d09209.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.d},null,null,null,null],execute:function(){const t={mixins:[m,d],emits:["addItem","deleteItem","open"],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(r=>r.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const r=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let i=e[2];return i.startsWith("http")||(i=await this.getPresignedUrl(i)),{url:i,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(r).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let i=this.parameters[4];i.startsWith("http")?this.defaultImage={...e,url:i}:this.getPresignedUrl(i).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},I=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(r,e,i,y,N,a){return 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]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-D4rzBHnr-20d97feec6afa1ff041b.js","vue","./main-5393150a38f7b14176e1.js","vue-router","single-spa","vuex","vuetify"],function(o,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.d},null,null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,d,y,c){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const m=o("default",i(e,[["render",u]]))}}});
1
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","vue","./main-d174cc6c21c521d09209.js","vue-router","single-spa","vuex","vuetify"],function(o,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.d},null,null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,d,g,c){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const m=o("default",i(e,[["render",u]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-D4rzBHnr-20d97feec6afa1ff041b.js","vue","./main-5393150a38f7b14176e1.js","vue-router","single-spa","vuex","vuetify"],function(u,d){"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.d},null,null,null,null],execute:function(){const e={mixins:[s],emits:["addItem","deleteItem"],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,c,h,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 p=u("default",n(e,[["render",m]]))}}});
1
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","vue","./main-d174cc6c21c521d09209.js","vue-router","single-spa","vuex","vuetify"],function(u,d){"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.d},null,null,null,null],execute:function(){const e={mixins:[s],emits:["addItem","deleteItem"],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,c,h,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 p=u("default",n(e,[["render",m]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-D4rzBHnr-20d97feec6afa1ff041b.js","vue","./main-5393150a38f7b14176e1.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,n,s,a,c;return{setters:[e=>{l=e.o},e=>{n=e.createElementBlock,s=e.openBlock,a=e.normalizeStyle},e=>{c=e.d},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,d,k,x,m){return s(),n("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))}}});
1
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","vue","./main-d174cc6c21c521d09209.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,n,a,c;return{setters:[e=>{l=e.o},e=>{s=e.createElementBlock,n=e.openBlock,a=e.normalizeStyle},e=>{c=e.d},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,x,d,k,m){return n(),s("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-D4rzBHnr-20d97feec6afa1ff041b.js","vue","./main-5393150a38f7b14176e1.js","vue-router","single-spa","vuex","vuetify"],function(u,h){"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.d},null,null,null,null],execute:function(){const t={mixins:[s],emits:["addItem","deleteItem"],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)}},m=["x1","y1","x2","y2"];function c(e,a,p,v,y,d){return l(),r("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(d.calcStyle)},null,12,m)}const o=u("default",n(t,[["render",c]]))}}});
1
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","vue","./main-d174cc6c21c521d09209.js","vue-router","single-spa","vuex","vuetify"],function(u,h){"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.d},null,null,null,null],execute:function(){const t={mixins:[s],emits:["addItem","deleteItem"],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)}},m=["x1","y1","x2","y2"];function c(e,a,p,v,y,d){return l(),r("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(d.calcStyle)},null,12,m)}const o=u("default",n(t,[["render",c]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","vue","./main-d174cc6c21c521d09209.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.d},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,{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),"hide-details":"",density:"compact",label:l.label,style:o(d.computedStyle)},null,8,["modelValue","label","style"])}const p=c("default",r(e,[["render",i]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","vue","./main-d174cc6c21c521d09209.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,n,o,r,u;return{setters:[e=>{l=e.o},e=>{s=e.resolveComponent,n=e.createBlock,o=e.openBlock,r=e.normalizeStyle},e=>{u=e.d},null,null,null,null],execute:function(){const e={mixins:[l],data(){return{items:[],value:null}},created(){this.value=this.parameters[0],this.items=this.parameters},methods:{text(){return this.value}}};function c(m,a,h,f,t,x){const d=s("v-select");return o(),n(d,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=v=>t.value=v),"hide-details":"",density:"compact",variant:"outlined",items:t.items,style:r(m.computedStyle)},null,8,["modelValue","items","style"])}const y=i("default",u(e,[["render",c]]))}}});
@@ -0,0 +1,14 @@
1
+ System.register(["./main-d174cc6c21c521d09209.js","vue","./TargetPacketItemChooser-UsuVtlF--8c9a60d430f541510a7f.js","./OpenC3TimePicker-CFSMcJ1F-4f22af1c033c3b008088.js","vue-router","single-spa","vuex","vuetify"],function(Ns,Vi){"use strict";var bt,_t,yt,wt,vt,Et,C,U,I,Tt,f,g,Te,X,ee,ae,he,St,F,Be,He,le,ze,Ct,We,xt,Ot;return{setters:[R=>{bt=R.d,_t=R._,yt=R.k,wt=R.R,vt=R.M,Et=R.I},R=>{C=R.resolveComponent,U=R.createBlock,I=R.openBlock,Tt=R.Teleport,f=R.createVNode,g=R.withCtx,Te=R.createElementVNode,X=R.toDisplayString,ee=R.createElementBlock,ae=R.Fragment,he=R.renderList,St=R.ref,F=R.createTextVNode,Be=R.mergeProps,He=R.createSlots,le=R.createCommentVNode,ze=R.normalizeStyle,Ct=R.withModifiers,We=R.withKeys},R=>{xt=R.C},R=>{Ot=R.M},null,null,null,null],execute:function(){var R=document.createElement("style");R.textContent=`.title-font[data-v-2675b2d7]{font-size:1.125rem}.v-progress-linear__determinate[data-v-2675b2d7]{transition:none!important}
2
+ /*$vite$:1*/`,document.head.appendChild(R);const js={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(t,{emit:e}){const s=e,n=St(!1);function r(){n.value=!1}function o(i){return i.replaceAll(" ","-").toLowerCase()}return(i,a)=>{const l=C("v-icon"),u=C("v-btn"),d=C("v-divider"),b=C("v-list-item-title"),y=C("v-list-item"),p=C("v-list"),m=C("v-menu"),h=C("v-radio"),T=C("v-list-item-action"),x=C("v-radio-group"),S=C("v-checkbox");return I(),U(m,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=_=>n.value=_),"close-on-content-click":!1},{activator:g(({props:_})=>[f(u,Be(_,{variant:"outlined",class:"mx-1 menu-button",text:t.menu.label,"data-test":o(`${t.title} ${t.menu.label}`)}),{append:g(()=>[f(l,{class:"menu-button-icon"},{default:g(()=>[...a[1]||(a[1]=[F(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:g(()=>[f(p,null,{default:g(()=>[(I(!0),ee(ae,null,he(t.menu.items,(_,O)=>(I(),ee(ae,null,[_.divider?(I(),U(d,{key:O+"-divider"})):_.subMenu&&_.subMenu.length>0?(I(),ee("div",{key:O+"-submenu"},[(I(),U(m,{key:O,"open-on-hover":"",location:"right"},{activator:g(({props:k})=>[(I(),U(y,Be({ref_for:!0},k,{key:O,disabled:_.disabled}),He({append:g(()=>[f(l,null,{default:g(()=>[...a[2]||(a[2]=[F(" mdi-chevron-right ",-1)])]),_:1})]),default:g(()=>[!_.radio&&!_.checkbox?(I(),U(b,{key:0,style:ze("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:g(()=>[F(X(_.label),1)]),_:2},1032,["style"])):le("",!0)]),_:2},[_.icon?{name:"prepend",fn:g(()=>[f(l,{disabled:_.disabled},{default:g(()=>[F(X(_.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:g(()=>[f(p,null,{default:g(()=>[(I(!0),ee(ae,null,he(_.subMenu,(k,L)=>(I(),U(y,{key:L,"prepend-icon":k.icon,onClick:j=>s("submenu-click",k)},{default:g(()=>[f(b,null,{default:g(()=>[F(X(k.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):_.radioGroup?(I(),U(x,{key:O+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":_.value,"onUpdate:modelValue":_.command},{default:g(()=>[(I(!0),ee(ae,null,he(_.choices,(k,L)=>(I(),U(y,{key:L+"-choice"},{default:g(()=>[f(T,{class:"list-action"},{default:g(()=>[f(h,{color:"secondary",label:k.label,value:k.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(I(),U(y,{key:O+"-list",disabled:_.disabled,"data-test":o(`${t.title} ${t.menu.label} ${_.label}`),onClick:()=>{_.command(_),_.checkbox||r()}},He({default:g(()=>[_.checkbox?(I(),U(T,{key:0,class:"list-action"},{default:g(()=>[f(S,{modelValue:_.checked,"onUpdate:modelValue":k=>_.checked=k,label:_.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):le("",!0),!_.radio&&!_.checkbox?(I(),U(b,{key:1,style:ze("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:g(()=>[F(X(_.label),1)]),_:2},1032,["style"])):le("",!0)]),_:2},[_.icon?{name:"prepend",fn:g(()=>[f(l,{icon:_.icon,disabled:_.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},Us={components:{TopBarMenu:js},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}}},Ms={class:"app-title mr-2"};function Ls(t,e,s,n,r,o){const i=C("v-col"),a=C("v-row"),l=C("TopBarMenu");return I(),U(Tt,{to:"#openc3-menu"},[f(a,{"no-gutters":""},{default:g(()=>[f(i,{"align-self":"end"},{default:g(()=>[Te("span",Ms,X(s.title),1)]),_:1})]),_:1}),f(a,{dense:"",class:"flex-nowrap"},{default:g(()=>[(I(!0),ee(ae,null,he(s.menus,(u,d)=>(I(),U(l,{key:d+"-top-menu",ref_for:!0,ref:"topmenu",menu:u,title:s.title,onSubmenuClick:o.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const Fs=bt(Us,[["render",Ls],["__scopeId","data-v-b6581c4c"]]);var Vs=Object.defineProperty,qs=(t,e,s)=>e in t?Vs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Se=(t,e,s)=>qs(t,typeof e!="symbol"?e+"":e,s);function Rt(t,e){return function(){return t.apply(e,arguments)}}const{toString:$s}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:Ce,toStringTag:kt}=Symbol,xe=(t=>e=>{const s=$s.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),K=t=>(t=t.toLowerCase(),e=>xe(e)===t),Oe=t=>e=>typeof e===t,{isArray:ce}=Array,ue=Oe("undefined");function fe(t){return t!==null&&!ue(t)&&t.constructor!==null&&!ue(t.constructor)&&V(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const At=K("ArrayBuffer");function Bs(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&At(t.buffer),e}const Hs=Oe("string"),V=Oe("function"),Pt=Oe("number"),pe=t=>t!==null&&typeof t=="object",zs=t=>t===!0||t===!1,Re=t=>{if(xe(t)!=="object")return!1;const e=Je(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(kt in t)&&!(Ce in t)},Ws=t=>{if(!pe(t)||fe(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Js=K("Date"),Ks=K("File"),Zs=t=>!!(t&&typeof t.uri<"u"),Gs=t=>t&&typeof t.getParts<"u",Xs=K("Blob"),Qs=K("FileList"),Ys=t=>pe(t)&&V(t.pipe);function en(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const It=en(),Dt=typeof It.FormData<"u"?It.FormData:void 0,tn=t=>{let e;return t&&(Dt&&t instanceof Dt||V(t.append)&&((e=xe(t))==="formdata"||e==="object"&&V(t.toString)&&t.toString()==="[object FormData]"))},sn=K("URLSearchParams"),[nn,rn,on,an]=["ReadableStream","Request","Response","Headers"].map(K),ln=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function me(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let n,r;if(typeof t!="object"&&(t=[t]),ce(t))for(n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else{if(fe(t))return;const o=s?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function Nt(t,e){if(fe(t))return null;e=e.toLowerCase();const s=Object.keys(t);let n=s.length,r;for(;n-- >0;)if(r=s[n],e===r.toLowerCase())return r;return null}const se=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jt=t=>!ue(t)&&t!==se;function Ke(){const{caseless:t,skipUndefined:e}=jt(this)&&this||{},s={},n=(r,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=t&&Nt(s,o)||o;Re(s[i])&&Re(r)?s[i]=Ke(s[i],r):Re(r)?s[i]=Ke({},r):ce(r)?s[i]=r.slice():(!e||!ue(r))&&(s[i]=r)};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&me(arguments[r],n);return s}const cn=(t,e,s,{allOwnKeys:n}={})=>(me(e,(r,o)=>{s&&V(r)?Object.defineProperty(t,o,{value:Rt(r,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),un=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),dn=(t,e,s,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),s&&Object.assign(t.prototype,s)},hn=(t,e,s,n)=>{let r,o,i;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)i=r[o],(!n||n(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=s!==!1&&Je(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},fn=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const n=t.indexOf(e,s);return n!==-1&&n===s},pn=t=>{if(!t)return null;if(ce(t))return t;let e=t.length;if(!Pt(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},mn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Je(Uint8Array)),gn=(t,e)=>{const s=(t&&t[Ce]).call(t);let n;for(;(n=s.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},bn=(t,e)=>{let s;const n=[];for(;(s=t.exec(e))!==null;)n.push(s);return n},_n=K("HTMLFormElement"),yn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,n){return s.toUpperCase()+n}),Ut=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),wn=K("RegExp"),Mt=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),n={};me(s,(r,o)=>{let i;(i=e(r,o,t))!==!1&&(n[o]=i||r)}),Object.defineProperties(t,n)},vn=t=>{Mt(t,(e,s)=>{if(V(t)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const n=t[s];if(V(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},En=(t,e)=>{const s={},n=r=>{r.forEach(o=>{s[o]=!0})};return ce(t)?n(t):n(String(t).split(e)),s},Tn=()=>{},Sn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Cn(t){return!!(t&&V(t.append)&&t[kt]==="FormData"&&t[Ce])}const xn=t=>{const e=new Array(10),s=(n,r)=>{if(pe(n)){if(e.indexOf(n)>=0)return;if(fe(n))return n;if(!("toJSON"in n)){e[r]=n;const o=ce(n)?[]:{};return me(n,(i,a)=>{const l=s(i,r+1);!ue(l)&&(o[a]=l)}),e[r]=void 0,o}}return n};return s(t,0)},On=K("AsyncFunction"),Rn=t=>t&&(pe(t)||V(t))&&V(t.then)&&V(t.catch),Lt=((t,e)=>t?setImmediate:e?((s,n)=>(se.addEventListener("message",({source:r,data:o})=>{r===se&&o===s&&n.length&&n.shift()()},!1),r=>{n.push(r),se.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",V(se.postMessage)),kn=typeof queueMicrotask<"u"?queueMicrotask.bind(se):typeof process<"u"&&process.nextTick||Lt,An=t=>t!=null&&V(t[Ce]),c={isArray:ce,isArrayBuffer:At,isBuffer:fe,isFormData:tn,isArrayBufferView:Bs,isString:Hs,isNumber:Pt,isBoolean:zs,isObject:pe,isPlainObject:Re,isEmptyObject:Ws,isReadableStream:nn,isRequest:rn,isResponse:on,isHeaders:an,isUndefined:ue,isDate:Js,isFile:Ks,isReactNativeBlob:Zs,isReactNative:Gs,isBlob:Xs,isRegExp:wn,isFunction:V,isStream:Ys,isURLSearchParams:sn,isTypedArray:mn,isFileList:Qs,forEach:me,merge:Ke,extend:cn,trim:ln,stripBOM:un,inherits:dn,toFlatObject:hn,kindOf:xe,kindOfTest:K,endsWith:fn,toArray:pn,forEachEntry:gn,matchAll:bn,isHTMLForm:_n,hasOwnProperty:Ut,hasOwnProp:Ut,reduceDescriptors:Mt,freezeMethods:vn,toObjectSet:En,toCamelCase:yn,noop:Tn,toFiniteNumber:Sn,findKey:Nt,global:se,isContextDefined:jt,isSpecCompliantForm:Cn,toJSONObject:xn,isAsyncFn:On,isThenable:Rn,setImmediate:Lt,asap:kn,isIterable:An};let v=class Is extends Error{static from(e,s,n,r,o,i){const a=new Is(e.message,s||e.code,n,r,o);return a.cause=e,a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),i&&Object.assign(a,i),a}constructor(e,s,n,r,o){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){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:c.toJSONObject(this.config),code:this.code,status:this.status}}};v.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",v.ERR_BAD_OPTION="ERR_BAD_OPTION",v.ECONNABORTED="ECONNABORTED",v.ETIMEDOUT="ETIMEDOUT",v.ERR_NETWORK="ERR_NETWORK",v.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",v.ERR_DEPRECATED="ERR_DEPRECATED",v.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",v.ERR_BAD_REQUEST="ERR_BAD_REQUEST",v.ERR_CANCELED="ERR_CANCELED",v.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",v.ERR_INVALID_URL="ERR_INVALID_URL";const Pn=null;function Ze(t){return c.isPlainObject(t)||c.isArray(t)}function Ft(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function Ge(t,e,s){return t?t.concat(e).map(function(n,r){return n=Ft(n),!s&&r?"["+n+"]":n}).join(s?".":""):e}function In(t){return c.isArray(t)&&!t.some(Ze)}const Dn=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function ke(t,e,s){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=c.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,m){return!c.isUndefined(m[p])});const n=s.metaTokens,r=s.visitor||u,o=s.dots,i=s.indexes,a=(s.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(r))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(c.isDate(p))return p.toISOString();if(c.isBoolean(p))return p.toString();if(!a&&c.isBlob(p))throw new v("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(p)||c.isTypedArray(p)?a&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,m,h){let T=p;if(c.isReactNative(e)&&c.isReactNativeBlob(p))return e.append(Ge(h,m,o),l(p)),!1;if(p&&!h&&typeof p=="object"){if(c.endsWith(m,"{}"))m=n?m:m.slice(0,-2),p=JSON.stringify(p);else if(c.isArray(p)&&In(p)||(c.isFileList(p)||c.endsWith(m,"[]"))&&(T=c.toArray(p)))return m=Ft(m),T.forEach(function(x,S){!(c.isUndefined(x)||x===null)&&e.append(i===!0?Ge([m],S,o):i===null?m:m+"[]",l(x))}),!1}return Ze(p)?!0:(e.append(Ge(h,m,o),l(p)),!1)}const d=[],b=Object.assign(Dn,{defaultVisitor:u,convertValue:l,isVisitable:Ze});function y(p,m){if(!c.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(p),c.forEach(p,function(h,T){(!(c.isUndefined(h)||h===null)&&r.call(e,h,c.isString(T)?T.trim():T,m,b))===!0&&y(h,m?m.concat(T):[T])}),d.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return y(t),e}function Vt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Xe(t,e){this._pairs=[],t&&ke(t,this,e)}const qt=Xe.prototype;qt.append=function(t,e){this._pairs.push([t,e])},qt.toString=function(t){const e=t?function(s){return t.call(this,s,Vt)}:Vt;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function Nn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function $t(t,e,s){if(!e)return t;const n=s&&s.encode||Nn,r=c.isFunction(s)?{serialize:s}:s,o=r&&r.serialize;let i;if(o?i=o(e,r):i=c.isURLSearchParams(e)?e.toString():new Xe(e,r).toString(n),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Bt{constructor(){this.handlers=[]}use(e,s,n){return this.handlers.push({fulfilled:e,rejected:s,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(s){s!==null&&e(s)})}}const Qe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},jn=typeof URLSearchParams<"u"?URLSearchParams:Xe,Un=typeof FormData<"u"?FormData:null,Mn=typeof Blob<"u"?Blob:null,Ln={isBrowser:!0,classes:{URLSearchParams:jn,FormData:Un,Blob:Mn},protocols:["http","https","file","blob","url","data"]},Ye=typeof window<"u"&&typeof document<"u",et=typeof navigator=="object"&&navigator||void 0,Fn=Ye&&(!et||["ReactNative","NativeScript","NS"].indexOf(et.product)<0),Vn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qn=Ye&&window.location.href||"http://localhost",$n=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ye,hasStandardBrowserEnv:Fn,hasStandardBrowserWebWorkerEnv:Vn,navigator:et,origin:qn},Symbol.toStringTag,{value:"Module"})),M={...$n,...Ln};function Bn(t,e){return ke(t,new M.classes.URLSearchParams,{visitor:function(s,n,r,o){return M.isNode&&c.isBuffer(s)?(this.append(n,s.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function Hn(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function zn(t){const e={},s=Object.keys(t);let n;const r=s.length;let o;for(n=0;n<r;n++)o=s[n],e[o]=t[o];return e}function Ht(t){function e(s,n,r,o){let i=s[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=o>=s.length;return i=!i&&c.isArray(r)?r.length:i,l?(c.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):((!r[i]||!c.isObject(r[i]))&&(r[i]=[]),e(s,n,r[i],o)&&c.isArray(r[i])&&(r[i]=zn(r[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const s={};return c.forEachEntry(t,(n,r)=>{e(Hn(n),r,s,0)}),s}return null}function Wn(t,e,s){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(s||JSON.stringify)(t)}const ge={transitional:Qe,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",n=s.indexOf("application/json")>-1,r=c.isObject(t);if(r&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return n?JSON.stringify(Ht(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Bn(t,this.formSerializer).toString();if((o=c.isFileList(t))||s.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return ke(o?{"files[]":t}:t,i&&new i,this.formSerializer)}}return r||n?(e.setContentType("application/json",!1),Wn(t)):t}],transformResponse:[function(t){const e=this.transitional||ge.transitional,s=e&&e.forcedJSONParsing,n=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(s&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(o){if(r)throw o.name==="SyntaxError"?v.from(o,v.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:M.classes.FormData,Blob:M.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{ge.headers[t]={}});const Jn=c.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"]),Kn=t=>{const e={};let s,n,r;return t&&t.split(`
3
+ `).forEach(function(o){r=o.indexOf(":"),s=o.substring(0,r).trim().toLowerCase(),n=o.substring(r+1).trim(),!(!s||e[s]&&Jn[s])&&(s==="set-cookie"?e[s]?e[s].push(n):e[s]=[n]:e[s]=e[s]?e[s]+", "+n:n)}),e},zt=Symbol("internals"),Zn=t=>!/[\r\n]/.test(t);function Wt(t,e){if(!(t===!1||t==null)){if(c.isArray(t)){t.forEach(s=>Wt(s,e));return}if(!Zn(String(t)))throw new Error(`Invalid character in header content ["${e}"]`)}}function be(t){return t&&String(t).trim().toLowerCase()}function Gn(t){let e=t.length;for(;e>0;){const s=t.charCodeAt(e-1);if(s!==10&&s!==13)break;e-=1}return e===t.length?t:t.slice(0,e)}function Ae(t){return t===!1||t==null?t:c.isArray(t)?t.map(Ae):Gn(String(t))}function Xn(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=s.exec(t);)e[n[1]]=n[2];return e}const Qn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function tt(t,e,s,n,r){if(c.isFunction(n))return n.call(this,e,s);if(r&&(e=s),!!c.isString(e)){if(c.isString(n))return e.indexOf(n)!==-1;if(c.isRegExp(n))return n.test(e)}}function Yn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,n)=>s.toUpperCase()+n)}function er(t,e){const s=c.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+s,{value:function(r,o,i){return this[n].call(this,e,r,o,i)},configurable:!0})})}let q=class{constructor(t){t&&this.set(t)}set(t,e,s){const n=this;function r(i,a,l){const u=be(a);if(!u)throw new Error("header name must be a non-empty string");const d=c.findKey(n,u);(!d||n[d]===void 0||l===!0||l===void 0&&n[d]!==!1)&&(Wt(i,a),n[d||a]=Ae(i))}const o=(i,a)=>c.forEach(i,(l,u)=>r(l,u,a));if(c.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(c.isString(t)&&(t=t.trim())&&!Qn(t))o(Kn(t),e);else if(c.isObject(t)&&c.isIterable(t)){let i={},a,l;for(const u of t){if(!c.isArray(u))throw TypeError("Object iterator must return a key-value pair");i[l=u[0]]=(a=i[l])?c.isArray(a)?[...a,u[1]]:[a,u[1]]:u[1]}o(i,e)}else t!=null&&r(e,t,s);return this}get(t,e){if(t=be(t),t){const s=c.findKey(this,t);if(s){const n=this[s];if(!e)return n;if(e===!0)return Xn(n);if(c.isFunction(e))return e.call(this,n,s);if(c.isRegExp(e))return e.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=be(t),t){const s=c.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||tt(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let n=!1;function r(o){if(o=be(o),o){const i=c.findKey(s,o);i&&(!e||tt(s,s[i],i,e))&&(delete s[i],n=!0)}}return c.isArray(t)?t.forEach(r):r(t),n}clear(t){const e=Object.keys(this);let s=e.length,n=!1;for(;s--;){const r=e[s];(!t||tt(this,this[r],r,t,!0))&&(delete this[r],n=!0)}return n}normalize(t){const e=this,s={};return c.forEach(this,(n,r)=>{const o=c.findKey(s,r);if(o){e[o]=Ae(n),delete e[r];return}const i=t?Yn(r):String(r).trim();i!==r&&delete e[r],e[i]=Ae(n),s[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return c.forEach(this,(s,n)=>{s!=null&&s!==!1&&(e[n]=t&&c.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(n=>s.set(n)),s}static accessor(t){const e=(this[zt]=this[zt]={accessors:{}}).accessors,s=this.prototype;function n(r){const o=be(r);e[o]||(er(s,r),e[o]=!0)}return c.isArray(t)?t.forEach(n):n(t),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(q.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[s]=n}}}),c.freezeMethods(q);function st(t,e){const s=this||ge,n=e||s,r=q.from(n.headers);let o=n.data;return c.forEach(t,function(i){o=i.call(s,o,r.normalize(),e?e.status:void 0)}),r.normalize(),o}function Jt(t){return!!(t&&t.__CANCEL__)}let _e=class extends v{constructor(t,e,s){super(t??"canceled",v.ERR_CANCELED,e,s),this.name="CanceledError",this.__CANCEL__=!0}};function Kt(t,e,s){const n=s.config.validateStatus;!s.status||!n||n(s.status)?t(s):e(new v("Request failed with status code "+s.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function tr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function sr(t,e){t=t||10;const s=new Array(t),n=new Array(t);let r=0,o=0,i;return e=e!==void 0?e:1e3,function(a){const l=Date.now(),u=n[o];i||(i=l),s[r]=a,n[r]=l;let d=o,b=0;for(;d!==r;)b+=s[d++],d=d%t;if(r=(r+1)%t,r===o&&(o=(o+1)%t),l-i<e)return;const y=u&&l-u;return y?Math.round(b*1e3/y):void 0}}function nr(t,e){let s=0,n=1e3/e,r,o;const i=(a,l=Date.now())=>{s=l,r=null,o&&(clearTimeout(o),o=null),t(...a)};return[(...a)=>{const l=Date.now(),u=l-s;u>=n?i(a,l):(r=a,o||(o=setTimeout(()=>{o=null,i(r)},n-u)))},()=>r&&i(r)]}const Pe=(t,e,s=3)=>{let n=0;const r=sr(50,250);return nr(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=i-n,u=r(l),d=i<=a;n=i;const b={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&d?(a-i)/u:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(b)},s)},Zt=(t,e)=>{const s=t!=null;return[n=>e[0]({lengthComputable:s,total:t,loaded:n}),e[1]]},Gt=t=>(...e)=>c.asap(()=>t(...e)),rr=M.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,M.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(M.origin),M.navigator&&/(msie|trident)/i.test(M.navigator.userAgent)):()=>!0,ir=M.hasStandardBrowserEnv?{write(t,e,s,n,r,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),c.isString(n)&&a.push(`path=${n}`),c.isString(r)&&a.push(`domain=${r}`),o===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function or(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ar(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Xt(t,e,s){let n=!or(e);return t&&(n||s==!1)?ar(t,e):e}const Qt=t=>t instanceof q?{...t}:t;function ne(t,e){e=e||{};const s={};function n(u,d,b,y){return c.isPlainObject(u)&&c.isPlainObject(d)?c.merge.call({caseless:y},u,d):c.isPlainObject(d)?c.merge({},d):c.isArray(d)?d.slice():d}function r(u,d,b,y){if(c.isUndefined(d)){if(!c.isUndefined(u))return n(void 0,u,b,y)}else return n(u,d,b,y)}function o(u,d){if(!c.isUndefined(d))return n(void 0,d)}function i(u,d){if(c.isUndefined(d)){if(!c.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function a(u,d,b){if(b in e)return n(u,d);if(b in t)return n(void 0,u)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,d,b)=>r(Qt(u),Qt(d),b,!0)};return c.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const d=c.hasOwnProp(l,u)?l[u]:r,b=d(t[u],e[u],u);c.isUndefined(b)&&d!==a||(s[u]=b)}),s}const Yt=t=>{const e=ne({},t);let{data:s,withXSRFToken:n,xsrfHeaderName:r,xsrfCookieName:o,headers:i,auth:a}=e;if(e.headers=i=q.from(i),e.url=$t(Xt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(s)){if(M.hasStandardBrowserEnv||M.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(c.isFunction(s.getHeaders)){const l=s.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([d,b])=>{u.includes(d.toLowerCase())&&i.set(d,b)})}}if(M.hasStandardBrowserEnv&&(n&&c.isFunction(n)&&(n=n(e)),n||n!==!1&&rr(e.url))){const l=r&&o&&ir.read(o);l&&i.set(r,l)}return e},lr=typeof XMLHttpRequest<"u",cr=lr&&function(t){return new Promise(function(e,s){const n=Yt(t);let r=n.data;const o=q.from(n.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:l}=n,u,d,b,y,p;function m(){y&&y(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout;function T(){if(!h)return;const S=q.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),_={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:S,config:t,request:h};Kt(function(O){e(O),m()},function(O){s(O),m()},_),h=null}"onloadend"in h?h.onloadend=T:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(T)},h.onabort=function(){h&&(s(new v("Request aborted",v.ECONNABORTED,t,h)),h=null)},h.onerror=function(S){const _=S&&S.message?S.message:"Network Error",O=new v(_,v.ERR_NETWORK,t,h);O.event=S||null,s(O),h=null},h.ontimeout=function(){let S=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const _=n.transitional||Qe;n.timeoutErrorMessage&&(S=n.timeoutErrorMessage),s(new v(S,_.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,t,h)),h=null},r===void 0&&o.setContentType(null),"setRequestHeader"in h&&c.forEach(o.toJSON(),function(S,_){h.setRequestHeader(_,S)}),c.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),i&&i!=="json"&&(h.responseType=n.responseType),l&&([b,p]=Pe(l,!0),h.addEventListener("progress",b)),a&&h.upload&&([d,y]=Pe(a),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",y)),(n.cancelToken||n.signal)&&(u=S=>{h&&(s(!S||S.type?new _e(null,t,h):S),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));const x=tr(n.url);if(x&&M.protocols.indexOf(x)===-1){s(new v("Unsupported protocol "+x+":",v.ERR_BAD_REQUEST,t));return}h.send(r||null)})},ur=(t,e)=>{const{length:s}=t=t?t.filter(Boolean):[];if(e||s){let n=new AbortController,r;const o=function(u){if(!r){r=!0,a();const d=u instanceof Error?u:this.reason;n.abort(d instanceof v?d:new _e(d instanceof Error?d.message:d))}};let i=e&&setTimeout(()=>{i=null,o(new v(`timeout of ${e}ms exceeded`,v.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:l}=n;return l.unsubscribe=()=>c.asap(a),l}},dr=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let n=0,r;for(;n<s;)r=n+e,yield t.slice(n,r),n=r},hr=async function*(t,e){for await(const s of fr(t))yield*dr(s,e)},fr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:n}=await e.read();if(s)break;yield n}}finally{await e.cancel()}},es=(t,e,s,n)=>{const r=hr(t,e);let o=0,i,a=l=>{i||(i=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await r.next();if(u){a(),l.close();return}let b=d.byteLength;if(s){let y=o+=b;s(y)}l.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},ts=64*1024,{isFunction:Ie}=c,pr=(({Request:t,Response:e})=>({Request:t,Response:e}))(c.global),{ReadableStream:ss,TextEncoder:ns}=c.global,rs=(t,...e)=>{try{return!!t(...e)}catch{return!1}},mr=t=>{t=c.merge.call({skipUndefined:!0},pr,t);const{fetch:e,Request:s,Response:n}=t,r=e?Ie(e):typeof fetch=="function",o=Ie(s),i=Ie(n);if(!r)return!1;const a=r&&Ie(ss),l=r&&(typeof ns=="function"?(m=>h=>m.encode(h))(new ns):async m=>new Uint8Array(await new s(m).arrayBuffer())),u=o&&a&&rs(()=>{let m=!1;const h=new ss,T=new s(M.origin,{body:h,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return h.cancel(),m&&!T}),d=i&&a&&rs(()=>c.isReadableStream(new n("").body)),b={stream:d&&(m=>m.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!b[m]&&(b[m]=(h,T)=>{let x=h&&h[m];if(x)return x.call(h);throw new v(`Response type '${m}' is not supported`,v.ERR_NOT_SUPPORT,T)})});const y=async m=>{if(m==null)return 0;if(c.isBlob(m))return m.size;if(c.isSpecCompliantForm(m))return(await new s(M.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(c.isArrayBufferView(m)||c.isArrayBuffer(m))return m.byteLength;if(c.isURLSearchParams(m)&&(m=m+""),c.isString(m))return(await l(m)).byteLength},p=async(m,h)=>c.toFiniteNumber(m.getContentLength())??y(h);return async m=>{let{url:h,method:T,data:x,signal:S,cancelToken:_,timeout:O,onDownloadProgress:k,onUploadProgress:L,responseType:j,headers:G,withCredentials:$="same-origin",fetchOptions:te}=Yt(m),W=e||fetch;j=j?(j+"").toLowerCase():"text";let w=ur([S,_&&_.toAbortSignal()],O),D=null;const B=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let qe;try{if(L&&u&&T!=="get"&&T!=="head"&&(qe=await p(G,x))!==0){let H=new s(h,{method:"POST",body:x,duplex:"half"}),Y;if(c.isFormData(x)&&(Y=H.headers.get("content-type"))&&G.setContentType(Y),H.body){const[gt,$e]=Zt(qe,Pe(Gt(L)));x=es(H.body,ts,gt,$e)}}c.isString($)||($=$?"include":"omit");const P=o&&"credentials"in s.prototype,E={...te,signal:w,method:T.toUpperCase(),headers:G.normalize().toJSON(),body:x,duplex:"half",credentials:P?$:void 0};D=o&&new s(h,E);let A=await(o?W(D,te):W(h,E));const J=d&&(j==="stream"||j==="response");if(d&&(k||J&&B)){const H={};["status","statusText","headers"].forEach(Ps=>{H[Ps]=A[Ps]});const Y=c.toFiniteNumber(A.headers.get("content-length")),[gt,$e]=k&&Zt(Y,Pe(Gt(k),!0))||[];A=new n(es(A.body,ts,gt,()=>{$e&&$e(),B&&B()}),H)}j=j||"text";let Q=await b[c.findKey(b,j)||"text"](A,m);return!J&&B&&B(),await new Promise((H,Y)=>{Kt(H,Y,{data:Q,headers:q.from(A.headers),status:A.status,statusText:A.statusText,config:m,request:D})})}catch(P){throw B&&B(),P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,m,D,P&&P.response),{cause:P.cause||P}):v.from(P,P&&P.code,m,D,P&&P.response)}}},gr=new Map,is=t=>{let e=t&&t.env||{};const{fetch:s,Request:n,Response:r}=e,o=[n,r,s];let i=o.length,a=i,l,u,d=gr;for(;a--;)l=o[a],u=d.get(l),u===void 0&&d.set(l,u=a?new Map:mr(e)),d=u;return u};is();const nt={http:Pn,xhr:cr,fetch:{get:is}};c.forEach(nt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const os=t=>`- ${t}`,br=t=>c.isFunction(t)||t===null||t===!1;function _r(t,e){t=c.isArray(t)?t:[t];const{length:s}=t;let n,r;const o={};for(let i=0;i<s;i++){n=t[i];let a;if(r=n,!br(n)&&(r=nt[(a=String(n)).toLowerCase()],r===void 0))throw new v(`Unknown adapter '${a}'`);if(r&&(c.isFunction(r)||(r=r.get(e))))break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=s?i.length>1?`since :
5
+ `+i.map(os).join(`
6
+ `):" "+os(i[0]):"as no adapter specified";throw new v("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r}const as={getAdapter:_r,adapters:nt};function rt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new _e(null,t)}function ls(t){return rt(t),t.headers=q.from(t.headers),t.data=st.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),as.getAdapter(t.adapter||ge.adapter,t)(t).then(function(e){return rt(t),e.data=st.call(t,t.transformResponse,e),e.headers=q.from(e.headers),e},function(e){return Jt(e)||(rt(t),e&&e.response&&(e.response.data=st.call(t,t.transformResponse,e.response),e.response.headers=q.from(e.response.headers))),Promise.reject(e)})}const cs="1.15.0",De={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{De[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const us={};De.transitional=function(t,e,s){function n(r,o){return"[Axios v"+cs+"] Transitional option '"+r+"'"+o+(s?". "+s:"")}return(r,o,i)=>{if(t===!1)throw new v(n(o," has been removed"+(e?" in "+e:"")),v.ERR_DEPRECATED);return e&&!us[o]&&(us[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,o,i):!0}},De.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function yr(t,e,s){if(typeof t!="object")throw new v("options must be an object",v.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let r=n.length;for(;r-- >0;){const o=n[r],i=e[o];if(i){const a=t[o],l=a===void 0||i(a,o,t);if(l!==!0)throw new v("option "+o+" must be "+l,v.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new v("Unknown option "+o,v.ERR_BAD_OPTION)}}const Ne={assertOptions:yr,validators:De},z=Ne.validators;let re=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Bt,response:new Bt}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const r=(()=>{if(!n.stack)return"";const o=n.stack.indexOf(`
7
+ `);return o===-1?"":n.stack.slice(o+1)})();try{if(!s.stack)s.stack=r;else if(r){const o=r.indexOf(`
8
+ `),i=o===-1?-1:r.indexOf(`
9
+ `,o+1),a=i===-1?"":r.slice(i+1);String(s.stack).endsWith(a)||(s.stack+=`
10
+ `+r)}}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ne(this.defaults,e);const{transitional:s,paramsSerializer:n,headers:r}=e;s!==void 0&&Ne.assertOptions(s,{silentJSONParsing:z.transitional(z.boolean),forcedJSONParsing:z.transitional(z.boolean),clarifyTimeoutError:z.transitional(z.boolean),legacyInterceptorReqResOrdering:z.transitional(z.boolean)},!1),n!=null&&(c.isFunction(n)?e.paramsSerializer={serialize:n}:Ne.assertOptions(n,{encode:z.function,serialize:z.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ne.assertOptions(e,{baseUrl:z.spelling("baseURL"),withXsrfToken:z.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&c.merge(r.common,r[e.method]);r&&c.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),e.headers=q.concat(o,r);const i=[];let a=!0;this.interceptors.request.forEach(function(p){if(typeof p.runWhen=="function"&&p.runWhen(e)===!1)return;a=a&&p.synchronous;const m=e.transitional||Qe;m&&m.legacyInterceptorReqResOrdering?i.unshift(p.fulfilled,p.rejected):i.push(p.fulfilled,p.rejected)});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let u,d=0,b;if(!a){const p=[ls.bind(this),void 0];for(p.unshift(...i),p.push(...l),b=p.length,u=Promise.resolve(e);d<b;)u=u.then(p[d++],p[d++]);return u}b=i.length;let y=e;for(;d<b;){const p=i[d++],m=i[d++];try{y=p(y)}catch(h){m.call(this,h);break}}try{u=ls.call(this,y)}catch(p){return Promise.reject(p)}for(d=0,b=l.length;d<b;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=ne(this.defaults,t);const e=Xt(t.baseURL,t.url,t.allowAbsoluteUrls);return $t(e,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){re.prototype[t]=function(e,s){return this.request(ne(s||{},{method:t,url:e,data:(s||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function e(s){return function(n,r,o){return this.request(ne(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}re.prototype[t]=e(),re.prototype[t+"Form"]=e(!0)});let wr=class Ds{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(r){s=r});const n=this;this.promise.then(r=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](r);n._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(a=>{n.subscribe(a),o=a}).then(r);return i.cancel=function(){n.unsubscribe(o)},i},e(function(r,o,i){n.reason||(n.reason=new _e(r,o,i),s(n.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 s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=n=>{e.abort(n)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new Ds(function(s){e=s}),cancel:e}}};function vr(t){return function(e){return t.apply(null,e)}}function Er(t){return c.isObject(t)&&t.isAxiosError===!0}const it={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(it).forEach(([t,e])=>{it[e]=t});function ds(t){const e=new re(t),s=Rt(re.prototype.request,e);return c.extend(s,re.prototype,e,{allOwnKeys:!0}),c.extend(s,e,null,{allOwnKeys:!0}),s.create=function(n){return ds(ne(t,n))},s}const N=ds(ge);N.Axios=re,N.CanceledError=_e,N.CancelToken=wr,N.isCancel=Jt,N.VERSION=cs,N.toFormData=ke,N.AxiosError=v,N.Cancel=N.CanceledError,N.all=function(t){return Promise.all(t)},N.spread=vr,N.isAxiosError=Er,N.mergeConfig=ne,N.AxiosHeaders=q,N.formToJSON=t=>Ht(c.isHTMLForm(t)?new FormData(t):t),N.getAdapter=as.getAdapter,N.HttpStatusCode=it,N.default=N;const{Axios:qi,AxiosError:$i,CanceledError:Bi,isCancel:Hi,CancelToken:zi,VERSION:Wi,all:Ji,Cancel:Ki,isAxiosError:Zi,spread:Gi,toFormData:Xi,AxiosHeaders:Qi,HttpStatusCode:Yi,formToJSON:eo,getAdapter:to,mergeConfig:so}=N,ot=N.create({baseURL:location.origin,timeout:6e4,params:{}});ot.interceptors.response.use(t=>t,t=>{var e,s,n,r,o,i,a,l,u,d,b;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(m){m&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let y=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(y+=`${t.response.statusText} `),(n=(s=t.response)==null?void 0:s.config)!=null&&n.data&&(y+=`${t.response.config.data} `),(o=(r=t.response)==null?void 0:r.data)!=null&&o.message?y+=`${t.response.data.message}`:(a=(i=t.response)==null?void 0:i.data)!=null&&a.exception?y+=`${t.response.data.exception}`:(d=(u=(l=t.response)==null?void 0:l.data)==null?void 0:u.error)!=null&&d.message?(t.response.data.error.class&&(y+=`${t.response.data.error.class} `),y+=`${t.response.data.error.message}`):y+=`${(b=t.response)==null?void 0:b.data}`;const{$cosmosNotify:p}=window;throw p&&p.serious({title:"Network error",body:y}),t}else throw t});const je=async function(t,e,{data:s,params:n={},headers:r,noAuth:o=!1,noScope:i=!1,onUploadProgress:a=!1}={}){if(!o){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}r.Authorization=localStorage.openc3Token}return r.manual=!0,!i&&!n.scope&&(n.scope=window.openc3Scope),ot({method:t,url:e,data:s,params:n,headers:r,onUploadProgress:a})},at={Accept:"application/json"},hs={...at,"Content-Type":"application/json"},Tr={get:function(t,{params:e,headers:s=at,noScope:n,noAuth:r,onUploadProgress:o}={}){return je("get",t,{params:e,headers:s,noScope:n,noAuth:r,onUploadProgress:o})},put:function(t,{data:e,params:s,headers:n=hs,noScope:r,noAuth:o,onUploadProgress:i}={}){return je("put",t,{data:e,params:s,headers:n,noScope:r,noAuth:o,onUploadProgress:i})},post:function(t,{data:e,params:s,headers:n=hs,noScope:r,noAuth:o,onUploadProgress:i}={}){return je("post",t,{data:e,params:s,headers:n,noScope:r,noAuth:o,onUploadProgress:i})},delete:function(t,{params:e,headers:s=at,noScope:n,noAuth:r,onUploadProgress:o}={}){return je("delete",t,{params:e,headers:s,noScope:n,noAuth:r,onUploadProgress:o})}};let Ue=()=>({emit(t,...e){for(let s=this.events[t]||[],n=0,r=s.length;n<r;n++)s[n](...e)},events:{},on(t,e){var s;return((s=this.events)[t]||(s[t]=[])).push(e),()=>{var n;this.events[t]=(n=this.events[t])==null?void 0:n.filter(r=>e!==r)}}});class ye extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class lt extends ye{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class Sr extends ye{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Z extends ye{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class Cr extends Z{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function fs(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let s=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${s}`}).join(",")}}`:""}class xr{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,s){if(!this._info)return this._info={id:String(e),info:s},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?e.records.reduce((s,{id:n,info:r})=>(s[n]=r,s),{}):{}}}const ie=Symbol("state");class ps{constructor(e={}){this.emitter=Ue(),this.params=Object.freeze(e),this.presence=new xr(this),this.initialConnect=!0,this[ie]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=fs({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ie]}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[ie]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ie]="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[ie]="connected";let e=!0,s=!0;this.initialConnect=!1,this.emit("connect",{reconnect:s,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ie]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ie]="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,s){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,s)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(s){let n=this.receiver?this.receiver.logger:null;n&&n.warn("whisper failed: ",s)}}receive(e,s){this.emit("message",e,s)}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}emit(e,...s){return this.emitter.emit(e,...s)}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,s)=>{let n=[()=>delete this._pendingSubscribe];n.push(this.on("connect",()=>{n.forEach(r=>r()),e()})),n.push(this.on("close",r=>{n.forEach(o=>o()),s(r||new ye("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Or{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 s=this.channels.indexOf(e);s>-1&&this.channels.splice(s,1)}notify(e,...s){this.state=e==="restored"?"connected":e,s.length===1?this.channels.forEach(n=>n[e](s[0])):this.channels.forEach(n=>n[e]())}pending(e){this._checkIntent(e);let s=this._pendings[0];return!s||s.intent!==e?Promise.resolve():s.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 s,n={promise:new Promise(o=>{s=o}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(n),1),s(n)},canceled:!1,acquired:!1},r=this._pendingTop;return this._pendings.push(n),r&&await r.promise,this.gvl&&await this.gvl.acquire(n,e),n.acquired=!0,n}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 s=this._pendingTop;return!s||s.acquired||s.intent!==e?!1:(this._pendings.pop(),s.canceled=!0,!0)}}class Rr{constructor(){this.queue=[]}async acquire(e,s){s==="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 kr{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new Rr),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:s,unsubscribe:n}){let r=this._subscriptions[e]=new Or(e);return r.remoteId=this._localToRemote[e],r.subscriber=s,r.unsubscriber=n,r.gvl=this.glv,r}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,s){this._localToRemote[e]=s;let n=this.get(e);n&&(n.remoteId=s)}}class Ar{constructor(e={}){this.subscriptions=new kr(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,s){this._remoteToLocal[s]=e,this.subscriptions.storeRemoteId(e,s),this.flush(s)}unsubscribe(e){let s=this.subscriptions.get(e);if(!s)return;let n=s.remoteId;n&&delete this._remoteToLocal[n],this.subscriptions.remove(e)}transmit(e,s,n){let r=this._remoteToLocal[e];if(!r){this._pendingMessages.push([e,s,n]);return}let o=this.subscriptions.get(r);o&&o.channels.forEach(i=>{i.receive(s,n)})}notify(e,s,n){let r=this._remoteToLocal[e];if(!r)return;let o=this.subscriptions.get(r);o&&o.channels.forEach(i=>i.emit(s,n))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let s=[];for(let n of this._pendingMessages)n[0]===e?this.transmit(n[0],n[1],n[2]):s.push(n);this._pendingMessages=s}}const ms={debug:0,info:1,warn:2,error:3};class gs{constructor(e){this.level=e||"warn"}log(e,s,n){ms[e]<ms[this.level]||this.writeLogEntry(e,s,n)}writeLogEntry(){throw Error("Not implemented")}debug(e,s){this.log("debug",e,s)}info(e,s){this.log("info",e,s)}warn(e,s){this.log("warn",e,s)}error(e,s){this.log("error",e,s)}}class we extends gs{writeLogEntry(){}}class Pr{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let Ir=0;class bs{constructor(e={}){let{logger:s}=e;this.logger=s||new we,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,s){let n={channel:e};s&&Object.assign(n,s);let r=fs(n);if(this.pendingUnsubscriptions[r]){let i=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${i}`,r),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,s))},i)})}if(this.pendingSubscriptions[r])return this.logger.warn("subscription is already pending, skipping",r),Promise.reject(Error("Already subscribing"));let o=this.subscribeRetryInterval;return new Promise((i,a)=>{let l=++Ir;this.pendingSubscriptions[r]={resolve:i,reject:a,id:l},this.cable.send(this.buildSubscribeRequest(r)),this.maybeRetrySubscribe(l,r,o)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,s,n){setTimeout(()=>{let r=this.pendingSubscriptions[s];r&&r.id===e&&(this.logger.warn(`no subscription ack received in ${n}ms, retrying subscribe`,s),this.cable.send(this.buildSubscribeRequest(s)),this.maybeExpireSubscribe(e,s,n))},n)}maybeExpireSubscribe(e,s,n){setTimeout(()=>{let r=this.pendingSubscriptions[s];r&&r.id===e&&(delete this.pendingSubscriptions[s],r.reject(new Sr(`Haven't received subscription ack in ${n*2}ms for ${s}`)))},n)}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,s,n){return s==="$whisper"?this.whisper(e,n):(n||(n={}),n.action||(n.action=s),this.cable.send({command:"message",identifier:e,data:JSON.stringify(n)}),Promise.resolve())}whisper(e,s){return this.cable.send({command:"whisper",identifier:e,data:s}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:n,message:r,reason:o,reconnect:i}=e;if(s==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(s==="disconnect"){let a=new Z(o);this.reset(a),i===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(s==="confirm_subscription"){let a=this.pendingSubscriptions[n];if(!a){this.logger.error("subscription not found, unsubscribing",{type:s,identifier:n}),this.unsubscribe(n);return}return delete this.pendingSubscriptions[n],a.resolve(n)}if(s==="reject_subscription"){let a=this.pendingSubscriptions[n];return a?(delete this.pendingSubscriptions[n],a.reject(new lt)):this.logger.error("subscription not found",{type:s,identifier:n})}if(r)return{identifier:n,message:r};this.logger.warn(`unknown message type: ${s}`,{message:e})}reset(e){for(let s in this.pendingSubscriptions)this.pendingSubscriptions[s].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const _s=()=>Date.now()/1e3|0;class Dr extends bs{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=_s()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let s in this.pendingPresence)this.pendingPresence[s].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:n,message:r}=e;if(s==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(s==="reject_subscription")return super.receive(e);if(s==="confirm_subscription")return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),super.receive(e);if(s==="ping")return this.restoreSince&&(this.restoreSince=_s()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",n);return}if(s==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",n);return}if(s==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let o=e.restored_ids||Object.keys(this.subscriptionStreams);for(let i of o)this.cable.send({identifier:i,command:"history",history:this.historyRequestFor(i)}),this.presenceInfo[i]&&this.cable.send({identifier:i,command:"join",presence:this.presenceInfo[i]});return this.cable.restored(o)}return this.cable.connected(this.sessionId)}if(s==="presence"){let o=r.type;if(o==="info"){let i=this.pendingPresence[n];i&&(delete this.pendingPresence[n],i.resolve(r))}else if(o==="error"){let i=this.pendingPresence[n];i&&(delete this.pendingPresence[n],i.reject(new Error("failed to retrieve presence")))}return{type:s,identifier:n,message:r}}if(r){let o=this.trackStreamPosition(n,e.stream_id,e.epoch,e.offset);return{identifier:n,message:r,meta:o}}this.logger.warn(`unknown message type: ${s}`,{message:e})}perform(e,s,n){switch(s){case"$presence:join":return this.join(e,n);case"$presence:leave":return this.leave(e,n);case"$presence:info":return this.presence(e,n)}return super.perform(e,s,n)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let s=super.buildSubscribeRequest(e),n=this.historyRequestFor(e);n&&(s.history=n,this.pendingHistory[e]=!0);let r=this.presenceInfo[e];return r&&(s.presence=r),s}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let s={},n=!1;if(this.subscriptionStreams[e])for(let r of this.subscriptionStreams[e]){let o=this.streamsPositions[r];o&&(n=!0,s[r]=o)}if(!(!n&&!this.restoreSince))return{since:this.restoreSince,streams:s}}trackStreamPosition(e,s,n,r){if(!(!s||!n))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(s),this.streamsPositions[s]={epoch:n,offset:r},{stream:s,epoch:n,offset:r}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,s){return this.presenceInfo[e]=s,this.cable.send({command:"join",identifier:e,presence:s}),Promise.resolve()}async leave(e,s){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:s}),Promise.resolve()}presence(e,s){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((n,r)=>{this.pendingPresence[e]={resolve:n,reject:r},this.cable.send({command:"presence",identifier:e,data:s})})}}class Nr extends ye{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class ct extends ps{constructor(e,s){super(s),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}Se(ct,"identifier","__ghost__");const jr="$pubsub";class ut extends ps{async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}Se(ut,"identifier",jr);const oe=Symbol("state");let Ur=class{constructor({transport:t,protocol:e,encoder:s,logger:n,lazy:r,hubOptions:o,performFailures:i,transportConfigurator:a}){this.emitter=Ue(),this.transport=t,this.encoder=s,this.logger=n||new we,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new Ar(o||{}),this[oe]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=a,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,r===!1&&this.connect().catch(()=>{})}get state(){return this[oe]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[oe]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(s){this.handleClose(s)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[oe]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new Z("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[oe]="connected",this.hub.subscriptions.all().forEach(n=>{t&&n.remoteId&&t.includes(n.remoteId)?n.notify("restored"):(n.notify("disconnected",new Z("recovery_failed")),this._resubscribe(n))});let e=!this.initialConnect,s=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:s})}notify(t,e,s){e&&typeof e!="string"&&(s=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:s}):this.emit("info",{type:t,data:s})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new Z(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[oe]="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 Z?t:new Z(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[oe]="closed";let s=e||new Z("cable_closed");this.hub.subscriptions.all().forEach(n=>n.notify("disconnected",s)),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 s=this.protocol.receive(e);if(s){this.logger.debug("processed incoming message",s);let{type:n,identifier:r,message:o,meta:i}=s;n?this.hub.notify(r,n,o):this.hub.transmit(r,o,i)}}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 ut({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new ut({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,n;return typeof t=="string"&&(n=t,t=ct),s=n?new t(n,e):new t(e),this.subscribe(s)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let s=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:n=>this._subscribe(n,t.channelId,t.params),unsubscribe:n=>this._unsubscribe(n)});return s.add(t),s.intent==="subscribed"&&s.state==="connected"&&t.connected(),s.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,s){let n=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:n});return}this.logger.debug("acquiring subscribe lock",{identifier:n});let r=await t.acquire("subscribed");if(r.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:n}),r.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:n}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),r.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:n}),r.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:n}),t.notify("connected"),r.release();return}let o={identifier:e,params:s};this.logger.debug("subscribing",o);try{let i=await this.protocol.subscribe(e,s);this.hub.subscribe(n,i),this.logger.debug("subscribed",{...o,remoteId:i}),t.notify("connected")}catch(i){if(i){if(i instanceof lt&&this.logger.warn("rejected",o),i instanceof Z){this.logger.debug("disconnected during subscription; will retry on connect",o),r.release();return}this.logger.error("failed to subscribe",{error:i,...o})}t.close(i),this.hub.unsubscribe(n)}r.release()}unsubscribe(t){let e=t.identifier,s=this.hub.subscriptions.get(e);if(!s)throw Error(`Subscription not found: ${e}`);s.remove(t),t.closed(),s.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let s=await t.acquire("unsubscribed");if(s.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),s.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}),s.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),s.release();return}let n=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:n}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),s.release();return}try{await this.protocol.unsubscribe(n),this.logger.debug("unsubscribed remotely",{id:e})}catch(r){r&&(r instanceof Z?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:r}):this.logger.error("unsubscribe failed",{id:e,error:r}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",s.release()}async perform(t,e,s){if(this.performFailures==="throw")return this._perform(t,e,s);try{return await this._perform(t,e,s)}catch(n){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:n});return}}async _perform(t,e,s){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new Nr;let n=this.hub.subscriptions.get(t);if(!n)throw Error(`Subscription not found: ${t}`);if(await n.pending("subscribed"),n.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let r=n.remoteId,o={id:r,action:e,payload:s};this.logger.debug("perform",o);try{let i=await this.protocol.perform(r,e,s);return i&&this.logger.debug("perform result",{message:i,request:o}),i}catch(i){throw this.logger.error("perform failed",{error:i,request:o}),i}}on(t,e){return this.emitter.on(t,e)}once(t,e){let s=this.emitter.on(t,(...n)=>{s(),e(...n)});return s}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let s=[()=>delete this._pendingConnect];s.push(this.on("connect",()=>{s.forEach(n=>n()),t()})),s.push(this.on("close",n=>{s.forEach(r=>r()),e(n)})),s.push(this.on("disconnect",n=>{s.forEach(r=>r()),e(n)}))}),this._pendingConnect)}};const Mr={maxMissingPings:2,maxReconnectAttempts:1/0},de=()=>Date.now(),ys=(t,e)=>{e=e||{};let{backoffRate:s,jitterRatio:n,maxInterval:r}=e;return s=s||2,n===void 0&&(n=.5),o=>{let i=t*s**o,a=i*s,l=i+(a-i)*Math.random(),u=2*(Math.random()-.5)*n;return l=l*(1+u),r&&r<l&&(l=r),l}};let ws=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Mr,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 we,this.state="pending_connect",this.attempts=0,this.disconnectedAt=de()}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=de(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=de(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=de(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=de()})),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=de()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new Cr))}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 Lr{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=Ue(),this.unbind=[],this.logger=s.logger||new we}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let s=this.transports[e];try{this.transport=s,this.resetListeners(),this.logger.debug(`Trying to connect via ${s.displayName()}`),await s.open(),this.logger.debug(`Connected via ${s.displayName()}`);return}catch(n){this.logger.debug(`Failed to connect via ${s.displayName()}: ${n.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,s){this.transports.forEach(n=>{n.setParam(e,s)})}setToken(e,s){this.transports.forEach(n=>{n.setToken(e,s)})}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}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 Fr{constructor(e,s={}){this.url=e;let n=s.websocketImplementation;if(n)this.Impl=n;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Ue();let{format:r,subprotocol:o,authStrategy:i}=s;this.format=r||"text",this.connectionOptions=s.websocketOptions,this.authStrategy=i||"param",this.authProtocol="",this.subprotocol=o}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((s,n)=>{let r=[];r.push(this.once("open",()=>{r.forEach(o=>o()),s()})),r.push(this.once("close",()=>{r.forEach(o=>o()),n(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,s){let n=new URL(this.url);n.searchParams.set(e,s);let r=`${n.protocol}//${n.host}${n.pathname}?${n.searchParams}`;this.setURL(r)}setToken(e,s="jid"){if(this.authStrategy==="param")this.setParam(s,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let n=`x-${s}`.toLowerCase();n=Object.keys(this.connectionOptions.headers).find(r=>r.toLowerCase()===n)||n,this.connectionOptions.headers[n]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}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,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}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 s=e.data;this.format==="binary"&&(s=new Uint8Array(s)),this.emitter.emit("data",s)},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")}}class Vr{constructor(e){this.channel=e}notify(e,...s){typeof this[e]=="function"&&this[e](...s)}perform(e,s={}){this.channel.perform(e,s)}send(e){this.channel.send(e)}whisper(e){return this.channel.whisper(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class qr extends ct{constructor(e,s,n){super(e,s),this.subscription=new Vr(this),Object.assign(this.subscription,n),this.on("connect",({reconnect:r})=>this.subscription.notify("connected",{reconnected:r})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",r=>this.subscription.notify("received",r)),this.on("close",r=>{r&&r instanceof lt?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class $r{constructor(e){this.cable=e}create(e,s){let n,r;typeof e=="object"?(n=e.channel,delete e.channel,r=e):(n=e,r={});let o=new qr(n,r,s);return o.subscription.notify("initialized"),this.cable.subscribe(o),o.subscription}findAll(e){return this.cable.hub.channels.filter(s=>s.identifier===e).map(s=>s.subscription)}}class Br{constructor(e){this.cable=e,this.subscriptions=new $r(e)}send(e){return this.cable.send(e)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const vs={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Hr(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({},vs,e);let{protocol:s,websocketImplementation:n,websocketFormat:r,websocketOptions:o,websocketAuthStrategy:i,fallbacks:a,logLevel:l,logger:u,transport:d,encoder:b,lazy:y,monitor:p,pingInterval:m,reconnectStrategy:h,maxMissingPings:T,maxReconnectAttempts:x,subprotocol:S,tokenRefresher:_,historyTimestamp:O,protocolOptions:k,concurrentSubscribes:L,performFailures:j,transportConfigurator:G,auth:$}=e;if(u=u||new we(l),typeof s=="string"){S=S||s;let w=s.substring(0,s.lastIndexOf("-")),D=s.substring(s.lastIndexOf("-")+1);if(k=k||{},w==="actioncable-v1")s=new bs({logger:u,...k});else if(w==="actioncable-v1-ext")s=new Dr({logger:u,historyTimestamp:O,...k});else throw Error(`Protocol is not supported yet: ${s}`);if(D==="json")b=b||new Pr,r=r||"text";else if(D==="msgpack"){if(r="binary",!b)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(D==="protobuf"){if(r=r||"binary",!b)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: ${s}`)}if(!s)throw Error("Protocol must be specified");d=d||new Fr(t,{websocketImplementation:n,websocketOptions:o,subprotocol:S,authStrategy:i,format:r}),a&&(d=new Lr([d,...a],{logger:u})),$&&$.token&&d.setToken($.token,$.param||"jid"),h=h||ys(m),p!==!1&&(p=p||new ws({pingInterval:m,reconnectStrategy:h,maxMissingPings:T,maxReconnectAttempts:x,logger:u}));let te={concurrentSubscribes:L},W=new Ur({protocol:s,transport:d,encoder:b,logger:u,lazy:y,hubOptions:te,performFailures:j,transportConfigurator:G});return p&&(p.watch(W),W.monitor=p),_&&zr(W,async()=>{try{await _(d)}catch(w){return u.error("Failed to refresh authentication token: "+w),!1}return W.connect().catch(()=>{}),!0}),W}function zr(t,e){let s=!1;t.on("connect",()=>s=!1),t.on("close",async n=>{if(n){if(s){t.logger.warn("Token auto-refresh is disabled",n);return}n.reason==="token_expired"&&(s=!0,await e())}})}class Wr extends gs{writeLogEntry(e,s,n){n?console[e](s,n):console[e](s)}}class Jr extends ws{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")},s=r=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:r})},n=()=>this.disconnect(new Z("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",s,!1),window.addEventListener("online",s,!1),window.addEventListener("resume",s,!1),window.addEventListener("freeze",n,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",s,!1),window.removeEventListener("online",s,!1),window.removeEventListener("resume",s,!1),window.removeEventListener("freeze",n,!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 Kr=["cable","action-cable"],Zr="/cable",Me=(t,e)=>{for(let s of Kr){let n=t.head.querySelector(`meta[name='${s}-${e}']`);if(n)return n.getAttribute("content")}},Es=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Gr=()=>{if(typeof document<"u"&&document.head){let t=Me(document,"url");if(t)return Es(t)}return Es(Zr)},Xr=()=>{if(typeof document<"u"&&document.head){let t=Me(document,"history-timestamp");if(t)return t|0}},Qr=()=>{if(typeof document<"u"&&document.head)return Me(document,"token")},Yr=()=>{if(typeof document<"u"&&document.head)return Me(document,"token-param")};function ei(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Gr(),e=e||{},e.historyTimestamp||(e.historyTimestamp=Xr());let s=Qr();if(s){let u=Yr();e.auth=Object.assign({token:s,param:u},e.auth||{})}e=Object.assign({},vs,e);let{logLevel:n,logger:r,pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l}=e;return r=e.logger=e.logger||new Wr(n),i=e.reconnectStrategy=e.reconnectStrategy||ys(o),e.monitor!==!1&&(e.monitor=e.monitor||new Jr({pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l,logger:r})),Hr(t,e)}function ti(t,e){let s=ei(t,e);return new Br(s)}class si{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,s,n={},r={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(o=>{if(o&&OpenC3Auth.setTokens(),this._cable==null){let i=this._url+"?scope="+encodeURIComponent(s)+"&authorization="+encodeURIComponent(localStorage.openc3Token);i=new URL(i,document.baseURI).href,this._cable=ti(i)}return this._cable.subscriptions.create({channel:e,...r},n)})}recordPing(){}}function ve(t){return ni.test(t)}const ni=/^-?[0-9]+$/;function Ts(t){return ri.test(t)}const ri=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Ss(t,e){if(ve(t))return Number.isSafeInteger(Number.parseInt(t,10));const s=Number.parseFloat(t),n=String(s);if(t===n)return!0;const r=Cs(t),o=Cs(n);return!!(r===o||(e==null?void 0:e.approx)===!0&&!ve(t)&&o.length>=14&&r.startsWith(o.substring(0,14)))}let Ee=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function ii(t){if(Ss(t,{approx:!1}))return;if(ve(t))return Ee.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Ee.underflow:Ee.truncate_float:Ee.overflow}function Cs(t){const{start:e,end:s}=oi(t),n=t.substring(e,s),r=n.indexOf(".");return r===-1?n:n.substring(0,r)+n.substring(r+1)}function oi(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let s=t.lastIndexOf("e");for(s===-1&&(s=t.lastIndexOf("E")),s===-1&&(s=t.length);(t[s-1]==="0"||t[s-1]===".")&&s>e;)s--;return{start:e,end:s}}class ai{constructor(e){if(Se(this,"isLosslessNumber",!0),!Ts(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=ii(this.value);if(e===void 0||e===Ee.truncate_float)return Number.parseFloat(this.value);if(ve(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function li(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function ci(t){return new ai(t)}function ui(t,e){return dt({"":t},"",t,e)}function dt(t,e,s,n){return Array.isArray(s)?n.call(t,e,hi(s,n)):s&&typeof s=="object"&&!li(s)?n.call(t,e,di(s,n)):n.call(t,e,s)}function di(t,e){for(const s of Object.keys(t)){const n=dt(t,s,t[s],e);n!==void 0?t[s]=n:delete t[s]}return t}function hi(t,e){for(let s=0;s<t.length;s++)t[s]=dt(t,String(s),t[s],e);return t}function fi(t,e,s){const n=typeof s=="function"?{parseNumber:s}:s,r=(n==null?void 0:n.parseNumber)??ci,o=(n==null?void 0:n.onDuplicateKey)??j;let i=0;const a=d();return x(a),_(),e?ui(a,e):a;function l(){if(t.charCodeAt(i)===yi){i++,y();const E={};let A=!0;for(;i<t.length&&t.charCodeAt(i)!==Os;){A?A=!1:(h(),y());const J=i,Q=p();if(Q===void 0){L();return}y(),T();const H=d();if(H===void 0){w();return}if(Object.prototype.hasOwnProperty.call(E,Q)&&!ht(H,E[Q])){const Y=o({key:Q,position:J+1,oldValue:E[Q],newValue:H});Y!==void 0&&(E[Q]=Y)}else E[Q]=H}return t.charCodeAt(i)!==Os&&G(),i++,E}}function u(){if(t.charCodeAt(i)===wi){i++,y();const E=[];let A=!0;for(;i<t.length&&t.charCodeAt(i)!==Rs;){A?A=!1:h();const J=d();S(J),E.push(J)}return t.charCodeAt(i)!==Rs&&$(),i++,E}}function d(){y();const E=p()??m()??l()??u()??b("true",!0)??b("false",!1)??b("null",null);return y(),E}function b(E,A){if(t.slice(i,i+E.length)===E)return i+=E.length,A}function y(){for(;pi(t.charCodeAt(i));)i++}function p(){if(t.charCodeAt(i)===ft){i++;let E="";for(;i<t.length&&t.charCodeAt(i)!==ft;){if(t.charCodeAt(i)===_i){const A=t[i+1],J=bi[A];J!==void 0?(E+=J,i++):A==="u"?Le(t.charCodeAt(i+2))&&Le(t.charCodeAt(i+3))&&Le(t.charCodeAt(i+4))&&Le(t.charCodeAt(i+5))?(E+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):D(i):W(i)}else gi(t.charCodeAt(i))?E+=t[i]:te(t[i]);i++}return k(),i++,E}}function m(){const E=i;if(t.charCodeAt(i)===ks&&(i++,O(E)),t.charCodeAt(i)===pt)i++;else if(mi(t.charCodeAt(i)))for(i++;Fe(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===Ri)for(i++,O(E);Fe(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===Di||t.charCodeAt(i)===Ii)for(i++,(t.charCodeAt(i)===ks||t.charCodeAt(i)===Ci)&&i++,O(E);Fe(t.charCodeAt(i));)i++;if(i>E)return r(t.slice(E,i))}function h(){if(t.charCodeAt(i)!==Oi)throw new SyntaxError(`Comma ',' expected after value ${P()}`);i++}function T(){if(t.charCodeAt(i)!==ki)throw new SyntaxError(`Colon ':' expected after property name ${P()}`);i++}function x(E){if(E===void 0)throw new SyntaxError(`JSON value expected ${P()}`)}function S(E){if(E===void 0)throw new SyntaxError(`Array item expected ${P()}`)}function _(){if(i<t.length)throw new SyntaxError(`Expected end of input ${P()}`)}function O(E){if(!Fe(t.charCodeAt(i))){const A=t.slice(E,i);throw new SyntaxError(`Invalid number '${A}', expecting a digit ${P()}`)}}function k(){if(t.charCodeAt(i)!==ft)throw new SyntaxError(`End of string '"' expected ${P()}`)}function L(){throw new SyntaxError(`Quoted object key expected ${P()}`)}function j(E){let{key:A,position:J}=E;throw new SyntaxError(`Duplicate key '${A}' encountered at position ${J}`)}function G(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${P()}`)}function $(){throw new SyntaxError(`Array item or end of array ']' expected ${P()}`)}function te(E){throw new SyntaxError(`Invalid character '${E}' ${B()}`)}function W(E){const A=t.slice(E,E+2);throw new SyntaxError(`Invalid escape character '${A}' ${B()}`)}function w(){throw new SyntaxError(`Object value expected after ':' ${B()}`)}function D(E){const A=t.slice(E,E+6);throw new SyntaxError(`Invalid unicode character '${A}' ${B()}`)}function B(){return`at position ${i}`}function qe(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function P(){return`${qe()} ${B()}`}}function pi(t){return t===vi||t===Ei||t===Ti||t===Si}function Le(t){return t>=pt&&t<=mt||t>=Ai&&t<=Ni||t>=Pi&&t<=ji}function Fe(t){return t>=pt&&t<=mt}function mi(t){return t>=xi&&t<=mt}function gi(t){return t>=32&&t<=1114111}function ht(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,n)=>ht(s,e[n])):xs(t)&&xs(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>ht(t[s],e[s])):!1}function xs(t){return typeof t=="object"&&t!==null}const bi={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
11
+ `,r:"\r",t:" "},_i=92,yi=123,Os=125,wi=91,Rs=93,vi=32,Ei=10,Ti=9,Si=13,ft=34,Ci=43,ks=45,pt=48,xi=49,mt=57,Oi=44,Ri=46,ki=58,Ai=65,Pi=97,Ii=69,Di=101,Ni=70,ji=102;function As(t,e,s,n){return r(t);function r(l,u){if(Array.isArray(n)){const d=n.find(b=>b.test(l));if(d){const b=d.stringify(l);if(typeof b!="string"||!Ts(b))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${b})`);return b}}if(typeof l=="boolean"||typeof l=="number"||typeof l=="string"||l===null||l instanceof Date||l instanceof Boolean||l instanceof Number||l instanceof String)return JSON.stringify(l);if(l!=null&&l.isLosslessNumber||typeof l=="bigint")return l.toString();if(Array.isArray(l))return o(l);if(l&&typeof l=="object")return i(l)}function o(l,u){if(l.length===0)return"[]";let d="[";for(let b=0;b<l.length;b++){const y=l[b];typeof y<"u"&&typeof y!="function"?d+=r(y):d+="null",b<l.length-1&&(d+=",")}return d+="]",d}function i(l,u){if(typeof l.toJSON=="function")return As(l.toJSON(),e,s,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(l);if(d.length===0)return"{}";let b=!0,y="{";for(const p of d){const m=l[p];if(a(p,m)){b?b=!1:y+=",";const h=JSON.stringify(p);y+=`${h}:`,y+=r(m)}}return y+="}",y}function a(l,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function Ui(t){return ve(t)&&!Ss(t)?BigInt(t):parseFloat(t)}class Mi{constructor(){Se(this,"id",1)}async exec(e,s,n={},r={},o=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return n.scope=window.openc3Scope,r.manual=!0,(await ot.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:s,id:this.id,keyword_params:n},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...r},timeout:o,transformRequest:[(i,a)=>As(i)],transformResponse:[i=>fi(i,void 0,Ui)]})).data.result}catch(i){let a=new Error;throw i.response?(a.name=i.response.data.error.data.class,a.message=i.response.data.error.data.message,a.object=i.response.data.error):i.request?(a.name="Request error",a.message="Request error, no response received"):a=i,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,s,n,r,o){return this.exec("map_target_to_interface",[e,s],{cmd_only:n,tlm_only:r,unmap_old:o})}unmap_target_from_interface(e,s,n,r){return this.exec("unmap_target_from_interface",[e,s],{cmd_only:n,tlm_only:r})}connect_interface(e,...s){return s.length>0?this.exec("connect_interface",[e,...s]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,s,...n){return this.exec("interface_cmd",[e,s,...n])}interface_target_enable(e,s,n=!1,r=!1){return this.exec("interface_target_enable",[e,s],{cmd_only:n,tlm_only:r})}interface_target_disable(e,s,n=!1,r=!1){return this.exec("interface_target_disable",[e,s],{cmd_only:n,tlm_only:r})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,s,n,r,o){return this.exec("map_target_to_router",[e,s],{cmd_only:n,tlm_only:r,unmap_old:o})}unmap_target_from_router(e,s,n,r){return this.exec("unmap_target_from_router",[e,s],{cmd_only:n,tlm_only:r})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,s,n=!1,r=!1){return this.exec("router_target_enable",[e,s],{cmd_only:n,tlm_only:r})}router_target_disable(e,s,n=!1,r=!1){return this.exec("router_target_disable",[e,s],{cmd_only:n,tlm_only:r})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,s,n){return this.exec("get_item",[e,s,n])}get_param(e,s,n){return this.exec("get_param",[e,s,n])}get_parameter(e,s,n){return this.exec("get_param",[e,s,n])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,s){return this.exec("get_tlm",[e,s])}get_telemetry(e,s){return this.exec("get_tlm",[e,s])}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,s=!1){return this.exec("get_all_tlm_names",[e],{hidden:s})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,s,n,r=30){const o=await this.exec("get_tlm_packet",[e,s],{type:n,stale_time:r});if(o!=null){let i=o.length,a=null;for(let l=0;l<i;l++)a=this.decode_openc3_type(o[l][1]),a!==null&&(o[l][1]=a)}return o}get_packet_derived_items(e,s){return this.exec("get_packet_derived_items",[e,s])}get_tlm_buffer(e,s){return this.exec("get_tlm_buffer",[e,s])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,s=30,n=null,r=null,o=null){let i={stale_time:s};n!==null&&(i.cache_timeout=n),r!==null&&(i.start_time=r.toISOString()),o!==null&&(i.end_time=o.toISOString());const a=await this.exec("get_tlm_values",[e],i,{},1e4);if(a&&a.length>0){let l=a.length,u=null;for(let d=0;d<l;d++)u=this.decode_openc3_type(a[d][0]),u!==null&&(a[d][0]=u)}return a}get_limits(e,s,n){return this.exec("get_limits",[e,s,n])}async tlm(e,s,n,r="CONVERTED"){let o=null;if(s===void 0)o=await this.exec("tlm",[e]);else if(n===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(s))o=await this.exec("tlm",[e],{type:s});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${s}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else o=await this.exec("tlm",[e,s,n],{type:r});let i=this.decode_openc3_type(o);return i!==null&&(o=i),o}async inject_tlm(e,s,n=null,r="CONVERTED"){await this.exec("inject_tlm",[e,s,n],{type:r})}set_tlm(e,s,n,r){return this.exec("set_tlm",[e,s,n],{type:r})}override_tlm(e,s,n,r){return this.exec("override_tlm",[e,s,n],{type:r})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,s,n,r){return this.exec("normalize_tlm",[e,s,n],{type:r})}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,s=!1){return this.exec("get_all_cmd_names",[e],{hidden:s})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,s){return this.exec("get_cmd",[e,s])}get_command(e,s){return this.exec("get_cmd",[e,s])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,s,n,r="CONVERTED"){return this.exec("get_cmd_value",[e,s,n,r])}get_cmd_buffer(e,s){return this.exec("get_cmd_buffer",[e,s])}_cmd(e,s,n,r,o,i={}){let a=null;for(let l in r)Object.prototype.hasOwnProperty.call(r,l)&&(a=this.encode_openc3_type(r[l]),a!==null&&(r[l]=a));return this.exec(e,[s,n,r],i,o)}get_cmd_hazardous(e,s,n,r={}){return s===void 0?this.exec("get_cmd_hazardous",e,{},r):this._cmd("get_cmd_hazardous",e,s,n,r)}cmd(e,s,n,r={},o={}){return s===void 0?this.exec("cmd",e,o,r):this._cmd("cmd",e,s,n,r,o)}cmd_no_range_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_no_range_check",e,o,r):this._cmd("cmd_no_range_check",e,s,n,r,o)}cmd_raw(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw",e,o,r):this._cmd("cmd_raw",e,s,n,r,o)}cmd_raw_no_range_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw_no_range_check",e,o,r):this._cmd("cmd_raw_no_range_check",e,s,n,r,o)}cmd_no_hazardous_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_no_hazardous_check",e,o,r):this._cmd("cmd_no_hazardous_check",e,s,n,r,o)}cmd_no_checks(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_no_checks",e,o,r):this._cmd("cmd_no_checks",e,s,n,r,o)}cmd_raw_no_hazardous_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw_no_hazardous_check",e,o,r):this._cmd("cmd_raw_no_hazardous_check",e,s,n,r,o)}cmd_raw_no_checks(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw_no_checks",e,o,r):this._cmd("cmd_raw_no_checks",e,s,n,r,o)}build_cmd(e,s,n,r={},o={}){return s===void 0?this.exec("build_cmd",e,o,r):this._cmd("build_cmd",e,s,n,r,o)}build_command(e,s,n,r={},o={}){return s===void 0?this.exec("build_cmd",e,o,r):this._cmd("build_cmd",e,s,n,r,o)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,s){return this.exec("send_raw",[e,s])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,s){return this.exec("load_config",[e,s])}save_config(e,s,n){return this.exec("save_config",[e,s,n])}delete_config(e,s){return this.exec("delete_config",[e,s])}enable_limits(e,s,n){return this.exec("enable_limits",[e,s,n])}disable_limits(e,s,n){return this.exec("disable_limits",[e,s,n])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,s){return this.exec("get_setting",[e],s)}get_settings(e,s){return this.exec("get_settings",e,s)}set_setting(e,s){return this.exec("set_setting",[e,s])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,s){return this.exec("set_setting",[e,s])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const s=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",s),r=new Uint8Array(n);return Array.from(r).map(o=>o.toString(16).padStart(2,"0")).join("")}}}let Ve=[];const Li={components:{OpenC3TimePicker:Ot,OpenConfigDialog:Et,SaveConfigDialog:vt,TargetPacketItemChooser:xt,TopBar:Fs},mixins:[yt,wt],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 si,subscription:null,enterprise:!1}},computed:{hasCommands:function(){return this.items.some(t=>t.cmdOrTlm==="CMD")},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}}},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)}},async created(){this.api=new Mi,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{}),await Tr.get("/openc3-api/info").then(e=>{e.data.enterprise&&(this.enterprise=!0)});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,s=>{this.applyConfig(s),this.startDate=s.startDate,this.startTime=s.startTime,this.endTime=s.endTime,this.endDate=s.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
12
+ continue to stream in real-time until
13
+ ${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(){Ve=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,s)=>{let n=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(n=n+"__"+e.reducedType);let r=String(s);this.keyMap[r]=n,t.push([n,r])}),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 r of t){let o=Object.keys(r);o.forEach(e.add,e);let i=o.filter(a=>a.startsWith("__")).length;this.itemsReceived+=o.length-i,this.totalItemsReceived+=o.length-i}e.delete("__type"),e.delete("__time"),e.delete("__extra"),this.buildHeaders([...e]),Ve.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET"),this.hasCommands&&(this.columnHeaders.push("USERNAME"),this.enterprise&&this.columnHeaders.push("APPROVER"))),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e];const[s,n,r,o,i,a,l]=e.split("__");let u=i;this.columnMode==="full"&&(u=r+" "+o+" "+i),s&&s!=="DECOM"&&(u=u+" {"+s+"}"),a&&a!=="CONVERTED"&&(u=u+" ("+a+")"),l&&(u=u+" ["+l+"]"),this.columnHeaders.push(u)})},createFile:async function(){var p,m;let t=Ve.flat(),e=this.columnHeaders,s=this.columnMap,n=[];this.resetPerFileVars();let r="";this.matlabHeader&&(r+="% "),r+=e.join(this.delimiter),n.push(r),await this.yieldToMain(),t.sort((h,T)=>h.__time-T.__time),await this.yieldToMain();let o=[],i=[],a=null,l=0;for(let h of t){let T=!1;this.fillDown&&a?i=[...a]:i=[];let x="";if(Object.keys(h).forEach(S=>{if(S.slice(0,2)==="__")return;x=S;let _=s[S];if(typeof h[S]=="object")if(h[S]===null)i[_]="";else if(Array.isArray(h[S]))i[_]='"['+h[S]+']"';else{let O=h[S].raw;if(Array.isArray(O)){let k="0x";O.forEach(L=>{k+=L.toString(16).padStart(2,"0").toUpperCase()}),i[_]=k}else i[_]="'"+O+"'"}else i[_]=h[S];this.uniqueOnly&&o[_]!==i[_]&&(T=!0),o[_]=i[_]}),this.fillDown&&(a=[...i]),!this.uniqueOnly||T){if(this.columnMode==="normal"){x=this.keyMap[x];const[S,_,O,k,L,j,G]=x.split("__");i[0]=new Date(h.__time/1e6).toISOString(),i[1]=O,i[2]=k,this.hasCommands&&(i[3]=((p=h.__extra)==null?void 0:p.username)||"",this.enterprise&&(i[4]=((m=h.__extra)==null?void 0:m.approver)||""))}n.push(i.join(this.delimiter))}l+=1,l%1e3==0&&await this.yieldToMain()}let u=".csv",d="text/csv";this.delimiter===" "&&(u=".txt",d="text/tab-separated-values"),await this.yieldToMain();const b=new Blob([n.join(`
14
+ `)],{type:d});await this.yieldToMain();const y=document.createElement("a");y.href=URL.createObjectURL(b),y.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+u),y.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),Ve.length!==0)await this.createFile();else if(this.fileCount===0){let t=new Date(this.startDateTime/1e6).toISOString(),e=new Date(this.endDateTime/1e6).toISOString();this.$notify.caution({body:`No data found for the items in the requested time range of ${t} to ${e}`})}this.progress=100,this.processButtonText="Process"}}};function Fi(t,e,s,n,r,o){const i=C("top-bar"),a=C("v-text-field"),l=C("v-col"),u=C("OpenC3TimePicker"),d=C("v-row"),b=C("v-radio"),y=C("v-radio-group"),p=C("target-packet-item-chooser"),m=C("v-container"),h=C("v-progress-circular"),T=C("v-spacer"),x=C("v-btn"),S=C("v-toolbar"),_=C("v-card-title"),O=C("v-select"),k=C("v-card-text"),L=C("v-card-actions"),j=C("v-card"),G=C("v-dialog"),$=C("v-data-table"),te=C("open-config-dialog"),W=C("save-config-dialog");return I(),ee("div",null,[f(i,{menus:o.menus,title:r.title},null,8,["menus","title"]),f(j,null,{default:g(()=>[f(m,null,{default:g(()=>[f(d,null,{default:g(()=>[f(l,null,{default:g(()=>[f(a,{modelValue:r.startDate,"onUpdate:modelValue":e[0]||(e[0]=w=>r.startDate=w),label:"Start Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),f(l,null,{default:g(()=>[f(u,{modelValue:r.startTime,"onUpdate:modelValue":e[1]||(e[1]=w=>r.startTime=w),label:"Start Time",rules:[r.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),f(l,null,{default:g(()=>[f(a,{modelValue:r.endDate,"onUpdate:modelValue":e[2]||(e[2]=w=>r.endDate=w),label:"End Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),f(l,null,{default:g(()=>[f(u,{modelValue:r.endTime,"onUpdate:modelValue":e[3]||(e[3]=w=>r.endTime=w),label:"End Time",rules:[r.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),f(d,{"no-gutters":""},{default:g(()=>[f(l,null,{default:g(()=>[f(y,{modelValue:r.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=w=>r.cmdOrTlm=w),inline:"","hide-details":"",class:"mt-0"},{default:g(()=>[f(b,{label:"Command",value:"cmd","data-test":"cmd-radio"}),f(b,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),f(d,null,{default:g(()=>[f(l,null,{default:g(()=>[f(p,{"button-text":"Add Item",mode:r.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":"",onAddItem:e[5]||(e[5]=w=>o.addItem(w))},null,8,["mode"])]),_:1})]),_:1})]),_:1}),f(S,{class:"pl-3"},{default:g(()=>[f(h,{"model-value":r.progress},null,8,["model-value"]),F("   Processed: "+X(r.totalPacketsReceived)+" packets, "+X(r.totalItemsReceived)+" items ",1),f(T),f(x,{class:"bg-primary",disabled:r.items.length<1,onClick:o.processItems},{default:g(()=>[F(X(r.processButtonText),1)]),_:1},8,["disabled","onClick"]),f(T),f(x,{icon:"mdi-pencil-box-multiple",variant:"text",density:"compact",disabled:r.items.length<1,"data-test":"editAll","aria-label":"Edit All Items",onClick:e[6]||(e[6]=w=>r.editAll=!0)},null,8,["disabled"]),f(x,{icon:"mdi-delete-sweep",variant:"text",density:"compact",disabled:r.items.length<1,"data-test":"delete-all","aria-label":"Delete All Items",onClick:o.deleteAll},null,8,["disabled","onClick"])]),_:1}),f(j,{width:"100%"},{default:g(()=>[f(_,null,{default:g(()=>[e[18]||(e[18]=F(" Items ",-1)),f(T),f(a,{modelValue:r.search,"onUpdate:modelValue":e[7]||(e[7]=w=>r.search=w),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),f($,{"items-per-page":r.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=w=>r.itemsPerPage=w),headers:r.headers,items:r.items,search:r.search,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":g(({item:w})=>[f(x,{icon:"mdi-pencil",variant:"text","data-test":"edit-row","aria-label":"Edit Item",onClick:Ct(D=>w.edit=!0,["stop"])},null,8,["onClick"]),f(G,{modelValue:w.edit,"onUpdate:modelValue":D=>w.edit=D,"max-width":"600",persistent:"",onKeydown:We(D=>w.edit=!1,["esc"])},{default:g(()=>[f(j,null,{default:g(()=>[f(S,{height:"24"},{default:g(()=>[f(T),e[19]||(e[19]=Te("span",null," DataExtractor: Edit Item Mode ",-1)),f(T)]),_:1}),f(k,null,{default:g(()=>[f(d,{class:"mt-3 title-font"},{default:g(()=>[f(l,null,{default:g(()=>[F(X(o.getItemLabel(w)),1)]),_:2},1024)]),_:2},1024),f(d,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:w.mode,"onUpdate:modelValue":D=>w.mode=D,"hide-details":"",items:r.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(d,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:w.valueType,"onUpdate:modelValue":D=>w.valueType=D,"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(d,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:w.reducedType,"onUpdate:modelValue":D=>w.reducedType=D,"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024)]),_:2},1024),f(L,{class:"px-2"},{default:g(()=>[f(T),f(x,{variant:"flat",onClick:D=>w.edit=!1},{default:g(()=>[...e[20]||(e[20]=[F(" Close ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":g(({item:w})=>[f(x,{icon:"mdi-delete",variant:"text","data-test":"delete-row","aria-label":"Delete Item",onClick:D=>o.deleteItem(w)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items","search"])]),_:1})]),_:1}),f(G,{modelValue:r.editAll,"onUpdate:modelValue":e[14]||(e[14]=w=>r.editAll=w),"max-width":"600",persistent:"",onKeydown:e[15]||(e[15]=We(w=>r.editAll=!1,["esc"]))},{default:g(()=>[f(j,null,{default:g(()=>[f(S,{height:"24"},{default:g(()=>[f(T),e[21]||(e[21]=Te("span",null," DataExtractor: Edit All Items",-1)),f(T)]),_:1}),f(k,null,{default:g(()=>[f(d,{class:"mt-3"},{default:g(()=>[f(l,null,{default:g(()=>[...e[22]||(e[22]=[F(" This will change all items to the following data type! ",-1)])]),_:1})]),_:1}),f(d,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:r.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=w=>r.allItemMode=w),"hide-details":"",items:r.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(d,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:r.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=w=>r.allItemValueType=w),"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(d,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:r.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=w=>r.allItemReducedType=w),"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1})]),_:1}),f(L,{class:"px-2"},{default:g(()=>[f(T),f(x,{variant:"outlined",onClick:e[12]||(e[12]=w=>r.editAll=!1)},{default:g(()=>[...e[23]||(e[23]=[F(" Cancel ",-1)])]),_:1}),f(x,{variant:"flat",disabled:!r.allItemValueType,onClick:e[13]||(e[13]=w=>o.editAllItems())},{default:g(()=>[...e[24]||(e[24]=[F(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),r.openConfig?(I(),U(te,{key:0,modelValue:r.openConfig,"onUpdate:modelValue":e[16]||(e[16]=w=>r.openConfig=w),"config-key":r.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):le("",!0),r.saveConfig?(I(),U(W,{key:1,modelValue:r.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=w=>r.saveConfig=w),"config-key":r.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):le("",!0)])}const no=Ns("default",_t(Li,[["render",Fi],["__scopeId","data-v-2675b2d7"]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-D4rzBHnr-20d97feec6afa1ff041b.js","./main-5393150a38f7b14176e1.js","vue","vue-router","single-spa","vuex","vuetify"],function(d,V){"use strict";var l,a,n,r,s,u,o;return{setters:[e=>{l=e.o},e=>{a=e.d,n=e.R},e=>{r=e.resolveComponent,s=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=r("v-text-field");return u(),s(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
+ System.register(["./Widget-DsHcvxJg-11a1df76abff911bf48d.js","./main-d174cc6c21c521d09209.js","vue","vue-router","single-spa","vuex","vuetify"],function(d,v){"use strict";var l,a,n,r,s,u,o;return{setters:[e=>{l=e.o},e=>{a=e.d,n=e.R},e=>{r=e.resolveComponent,s=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,f,y,t,x){const h=r("v-text-field");return u(),s(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 V=d("default",a(e,[["render",c]]))}}});