openc3-cosmos-tool-dataextractor 7.2.0 → 7.2.1

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 (98) hide show
  1. checksums.yaml +4 -4
  2. data/tools/dataextractor/{ArrayWidget-D1PArcGr-c8c751af5b0b3e9d923d.js → ArrayWidget-DMSm_P6c-19f1858ee6a13de9bf65.js} +2 -2
  3. data/tools/dataextractor/{ArrayplotWidget-DPUPy0qM-b7c3bff83bf418fe0a6f.js → ArrayplotWidget-fdXLhGAl-ca7f994f090988e914c8.js} +1 -1
  4. data/tools/dataextractor/{BarColumn-BpdscDQf-fbde67bf62fa06314272.js → BarColumn-Bb305iCi-f1224abcf7699dc826e3.js} +1 -1
  5. data/tools/dataextractor/{BlockWidget-_VUsK5T9-e9ea12442411c894a337.js → BlockWidget-Do3W6tZh-c79dad057dea57df3581.js} +2 -2
  6. data/tools/dataextractor/{ButtonWidget-DE41o-cg-c0cf6714bdd559938c90.js → ButtonWidget-DukCQt0F-75f7d67cab4acc035985.js} +2 -2
  7. data/tools/dataextractor/CanvasWidget-BRdVWln5-5e4c8e688cfa5fe95acd.js +1 -0
  8. data/tools/dataextractor/CanvasdotWidget-DV8PeDWz-12373bd14eefae124803.js +1 -0
  9. data/tools/dataextractor/{CanvasimageWidget-COv_Qnc8-b3b91fba8876839ea74b.js → CanvasimageWidget-Czbq1GuF-28a339483f5dcfeacf7d.js} +1 -1
  10. data/tools/dataextractor/{CanvasimagevalueWidget-BhuUqLOo-6673175b5d15945d1698.js → CanvasimagevalueWidget-DKt5JgEt-8087cbd51a64393ab57c.js} +1 -1
  11. data/tools/dataextractor/CanvaslabelWidget-DW2I1ra1-a20ab54851ccc0e680d8.js +1 -0
  12. data/tools/dataextractor/CanvaslabelvalueWidget-BhzvZVfD-9d04bfc299b1b7b03b05.js +1 -0
  13. data/tools/dataextractor/{CanvaslineWidget-D1K_6mAY-aaa1cc8b5c1e016e8324.js → CanvaslineWidget-DsjY37tp-2a922b5bf7fc4d42a3d5.js} +1 -1
  14. data/tools/dataextractor/{CanvaslinevalueWidget-D4eaxWhR-363e4bb482ba7a73ba6a.js → CanvaslinevalueWidget-ihI97G8T-0aa86f239b1df4ce71c2.js} +1 -1
  15. data/tools/dataextractor/CheckbuttonWidget-B778Z-Zo-3c791dca02c3936e0b25.js +1 -0
  16. data/tools/dataextractor/ComboboxWidget-CuuvOL9K-affe23635b117e6bc374.js +1 -0
  17. data/tools/dataextractor/DataExtractor-ecbc6958d7725d01074e.js +14 -0
  18. data/tools/dataextractor/{DateWidget-DkNWx28s-b13f63213d6b9fcb175d.js → DateWidget-COvQTAeo-ae696b8d9cd7d4f41eeb.js} +1 -1
  19. data/tools/dataextractor/{DetailsDialog-F4KgYM6m-127f043574676725c73b.js → DetailsDialog-DE7lK17G-1e75cb2f380dac93676b.js} +1 -1
  20. data/tools/dataextractor/{DynamicWidget-BuSbQVhf-55ea1ee13a3afafb3570.js → DynamicWidget-BuSbQVhf-11c0fdcda694b70ffdf1.js} +1 -1
  21. data/tools/dataextractor/{FilechecksumWidget-DSfNEnDJ-4e730e295b0b0aa7d9ad.js → FilechecksumWidget-DRnOt_UE-8ab6316e47a7e4460011.js} +1 -1
  22. data/tools/dataextractor/{FiledisplayWidget-D2cxMmrP-a05420f106f98fc9a1c3.js → FiledisplayWidget-26R46EjS-ab352e1a0376aa273ae1.js} +1 -1
  23. data/tools/dataextractor/{FormatvalueWidget-6-bj_PJO-19133d9392f2b921ec6c.js → FormatvalueWidget-BxyscMJc-1d1dd3dbcd57dcebb5da.js} +1 -1
  24. data/tools/dataextractor/Graph-BKw7xw1a-94374e992fe69736cba0.js +1 -0
  25. data/tools/dataextractor/{GraphWidget-COXK3Dab-68ed5db39c484c79cd9a.js → GraphWidget-Cs9mvqUu-e364a861890ec3c70c87.js} +1 -1
  26. data/tools/dataextractor/{HorizontalWidget-C9UFBPsk-0c0dd37a884935f911ad.js → HorizontalWidget-fWLFj7Kg-47230760109921a0e2f4.js} +1 -1
  27. data/tools/dataextractor/{HorizontalboxWidget-CWLfmRtr-37ef9ec7d67d226af1c4.js → HorizontalboxWidget-DEaXhKEz-a2e1ef1853068ba40a36.js} +1 -1
  28. data/tools/dataextractor/HorizontallineWidget-Bvu1QP3S-cdb87f14bcec81154e7f.js +1 -0
  29. data/tools/dataextractor/{IframeWidget-Bn9eGzrq-4d363d16eda9121de56f.js → IframeWidget-B143k4lo-a67734e034639b7d5f7d.js} +1 -1
  30. data/tools/dataextractor/{ImageLoader-_gAudhVo-3d11a63f5ef7091755dc.js → ImageLoader-BCpmQHIl-1b4a6c662d8e85c5ce0a.js} +1 -1
  31. data/tools/dataextractor/{ImageviewerWidget-BUWhF32Z-8968c211affb8ae31358.js → ImageviewerWidget-CLrvr6dw-e1097e682e69575c97ca.js} +1 -1
  32. data/tools/dataextractor/{LabelWidget-BhzkN06D-82e78a304e7976c050e7.js → LabelWidget-CA1bTX2B-ff3f23281a310d9eace2.js} +1 -1
  33. data/tools/dataextractor/{LabelledWidget-vx8NvW1b-2f85e885d9b34bfa9b83.js → LabelledWidget-BDhvr03J-e4ce54b64d90297ded22.js} +1 -1
  34. data/tools/dataextractor/{LabelprogressbarWidget-t5PvKuS4-5368a53a7909f0a6a0ca.js → LabelprogressbarWidget-g7A5CE8S-c0b36cf5c5d8711f457e.js} +1 -1
  35. data/tools/dataextractor/LabelsparklineWidget-B27xXxWg-cfb3c075c2cb9a8ce462.js +1 -0
  36. data/tools/dataextractor/{LabelvalueWidget-Cbs1DBK2-37a6959ba720e2fb2607.js → LabelvalueWidget-DFn8o6LC-687a3bf9c5d428cd2585.js} +1 -1
  37. data/tools/dataextractor/{LabelvaluedescWidget-B7OIOGc0-4e187a1ca9ccebd898ec.js → LabelvaluedescWidget-BQpaxFaB-1915c5f5304c605ff6dd.js} +1 -1
  38. data/tools/dataextractor/LabelvaluelimitsbarWidget-C-z96q8z-e64aaad23f4619fb0b50.js +1 -0
  39. data/tools/dataextractor/LabelvaluelimitscolumnWidget-D2TMEv9O-edb28559a45b6f01620c.js +1 -0
  40. data/tools/dataextractor/{LabelvaluerangebarWidget-Pt_evm3v-7cff22dc6c8171a0737f.js → LabelvaluerangebarWidget-D99dZCjz-c719440b25b0ec7ddb3e.js} +1 -1
  41. data/tools/dataextractor/{Layout-CKmC50QZ-7c09657f848d6bec97ad.js → Layout--_zNJWnw-16921ce6aa9987c9960c.js} +1 -1
  42. data/tools/dataextractor/{LedWidget-D1lmNXpi-c9ddb6bb20c6b65e8752.js → LedWidget-D2uxHxe3-03a4a2857e454290287b.js} +1 -1
  43. data/tools/dataextractor/{LimitsBar-D5IZu7eX-f245aa3388489b985719.js → LimitsBar-DN1s8-MS-d2e697ee1f1bfe976c50.js} +1 -1
  44. data/tools/dataextractor/{LimitsbarWidget-VpxQXE-e-92655885f9c8ff8dd67a.js → LimitsbarWidget-Cqhh7LKU-ccc71a429a6945ec17b1.js} +1 -1
  45. data/tools/dataextractor/{LimitscolorWidget-79P41CX7-17bfc98cd285ef8d5cf0.js → LimitscolorWidget-haGB4RbY-dd10c0c2fd74edf3cbb4.js} +1 -1
  46. data/tools/dataextractor/{LimitscolumnWidget-BFDXhJeZ-543fc43f72002343d7bb.js → LimitscolumnWidget-B1GdmlR_-4217c9643c68bb15b2c8.js} +1 -1
  47. data/tools/dataextractor/LinegraphWidget-COSOQ0uM-f3f0eab3aa42a20898f7.js +1 -0
  48. data/tools/dataextractor/{MatrixbycolumnsWidget--ihvirDP-8fe2c21364aff79528e9.js → MatrixbycolumnsWidget-coHlLETG-9080f0a4a1802713a578.js} +1 -1
  49. data/tools/dataextractor/{OpenC3TimePicker-B0lAIU91-dbee395a71067b34188a.js → OpenC3TimePicker-B8Vu9GBz-850d7e68786e24a785f4.js} +1 -1
  50. data/tools/dataextractor/{ProgressbarWidget-BIB3r9SL-04bfb4d921751b068806.js → ProgressbarWidget-D_yFssIZ-6d0b35abe5abf920de7d.js} +1 -1
  51. data/tools/dataextractor/{RadiobuttonWidget-C5rxLM7K-41dd5ecc6efc1f7ec023.js → RadiobuttonWidget-DL0jVTcb-d6c1c630c14b8b073e08.js} +1 -1
  52. data/tools/dataextractor/{RadiogroupWidget-CciTCv1U-5447f0a20fd31cb84781.js → RadiogroupWidget-2-td69IA-3a65d1201a6083911e89.js} +1 -1
  53. data/tools/dataextractor/{RangebarWidget-MPQYi2Km-2d0bc2f6ae59f1fc6cb2.js → RangebarWidget-i2mlnxys-7d3ca7c8ee813c1f6962.js} +1 -1
  54. data/tools/dataextractor/{RollupWidget-CfjGAhzg-d61d2e69d0dfb53f8d5a.js → RollupWidget-BEJ2Icg1-f6816b7e9c02859805d9.js} +1 -1
  55. data/tools/dataextractor/{ScrollwindowWidget-CupaygNN-f0bc8971fbeb2f3b7ac6.js → ScrollwindowWidget-BU1cRpL8-cc865bceb29a42f3cb67.js} +1 -1
  56. data/tools/dataextractor/{SignalWidget-C-qecoTO-ac5acb141c44fbe8bd3b.js → SignalWidget-hiTkeem9-d5ce6a16e1bcbe600a2d.js} +1 -1
  57. data/tools/dataextractor/SpacerWidget-CBmzzS_X-116a6cbfeede00839de4.js +1 -0
  58. data/tools/dataextractor/SparklineWidget-CizRh6QR-2528b021c316211a6607.js +1 -0
  59. data/tools/dataextractor/{TabbookWidget-CXklff-l-f8d84ac5de477b47cc89.js → TabbookWidget-CvL3Ozmx-2af2452e7a6f0134efd6.js} +1 -1
  60. data/tools/dataextractor/TargetPacketItemChooser-wISd7chF-a0464b042415727a9e4d.js +1 -0
  61. data/tools/dataextractor/TextboxWidget-BtEwXzDO-1aa024ed1232214c7c15.js +1 -0
  62. data/tools/dataextractor/TextfieldWidget-BDbb57HP-e348e171a603406fe35c.js +1 -0
  63. data/tools/dataextractor/TimeWidget-DzD8U8l8-1d1a4c276a1cf44f37d6.js +1 -0
  64. data/tools/dataextractor/TitleWidget-CL53vf14-91c497b397abb22b827b.js +1 -0
  65. data/tools/dataextractor/{VWidget-oMbywhLA-48cc5e9eee33d428a035.js → VWidget-5qOYva88-12e30dc2b776a8df555a.js} +1 -1
  66. data/tools/dataextractor/ValueWidget-CAkuc_w_-2b53466b187c41951b84.js +1 -0
  67. data/tools/dataextractor/ValuelimitsbarWidget-Y8sO05E1-6797dae9b2e397329889.js +1 -0
  68. data/tools/dataextractor/{ValuelimitscolumnWidget-BVt6nLXq-c3953d4f07717ac68634.js → ValuelimitscolumnWidget-iOjB_fCj-84b309ce08d933339ecb.js} +1 -1
  69. data/tools/dataextractor/{ValuerangebarWidget-uVZEI32U-2e888511354ce5936843.js → ValuerangebarWidget-DsCoeAm6-f3471be58343d9255a74.js} +1 -1
  70. data/tools/dataextractor/{VerticalWidget-DlftYBjH-6dab9f0f52b2711f6b3f.js → VerticalWidget-C6O0dhRU-f289529c1be404532d60.js} +1 -1
  71. data/tools/dataextractor/{VerticalboxWidget-C7RrkfY0-2a1e515b69dfc37fd4b3.js → VerticalboxWidget-B-CoqRJG-2d90f8f9d16cb9d3e870.js} +1 -1
  72. data/tools/dataextractor/{Widget-D_HaosJK-3aa019608f819cd93c9a.js → Widget-CtYQauzA-76c2f5fd2351d284a46d.js} +1 -1
  73. data/tools/dataextractor/main-41bf9e8be1fa8f271a59.js +1497 -0
  74. data/tools/dataextractor/main.js +1 -1
  75. metadata +73 -73
  76. data/tools/dataextractor/CanvasWidget-BEi8h3Mq-93b602cbc1f1c3f8a989.js +0 -1
  77. data/tools/dataextractor/CanvasdotWidget-eZuMgkhL-d2239b9c5db9ac121539.js +0 -1
  78. data/tools/dataextractor/CanvaslabelWidget-DtvbgeYH-65b35c16cb83363efca3.js +0 -1
  79. data/tools/dataextractor/CanvaslabelvalueWidget-C_FRIeNb-127a95383fbb9d362d05.js +0 -1
  80. data/tools/dataextractor/CheckbuttonWidget-ByxMDkiS-1d4c199071fc6e719a35.js +0 -1
  81. data/tools/dataextractor/ComboboxWidget-CAGxGv2r-770ba10af28e2ff80127.js +0 -1
  82. data/tools/dataextractor/DataExtractor-2097e7e5aaf43aad6f8b.js +0 -14
  83. data/tools/dataextractor/Graph-Cz0Ns1FD-6ad9d5afe0b9679348e6.js +0 -1
  84. data/tools/dataextractor/HorizontallineWidget-DeFkOaYO-4210d0981cf03ed31819.js +0 -1
  85. data/tools/dataextractor/LabelsparklineWidget-CebbEH-j-967cb6f44c6c55eaf6e2.js +0 -1
  86. data/tools/dataextractor/LabelvaluelimitsbarWidget-C57kf-oQ-91c29b441f80779ffdf4.js +0 -1
  87. data/tools/dataextractor/LabelvaluelimitscolumnWidget-BRlNDEqp-4560f2046838b297f8b9.js +0 -1
  88. data/tools/dataextractor/LinegraphWidget-VqkpOlws-1b6eb0d902a3b0577bb7.js +0 -1
  89. data/tools/dataextractor/SpacerWidget-VVkOCb6N-ec90981ae0ee78718da0.js +0 -1
  90. data/tools/dataextractor/SparklineWidget-Dsmn38z_-0e974d1a6820c9766d5e.js +0 -1
  91. data/tools/dataextractor/TargetPacketItemChooser-DDHuygCl-d58eaf885223711090d4.js +0 -1
  92. data/tools/dataextractor/TextboxWidget-CHs2VYIv-0afd03dec5b9e1bcf5d5.js +0 -1
  93. data/tools/dataextractor/TextfieldWidget-CdANAW-6-abb82a45c67e54365c38.js +0 -1
  94. data/tools/dataextractor/TimeWidget-D0xT1wXR-42543ac5f61f9caf689c.js +0 -1
  95. data/tools/dataextractor/TitleWidget-68NWCcXB-f800dbc154a0b790db80.js +0 -1
  96. data/tools/dataextractor/ValueWidget-B1aGUBP7-09e3a422caa4029a7a89.js +0 -1
  97. data/tools/dataextractor/ValuelimitsbarWidget-B7KcRjLS-89060ce240e589231a32.js +0 -1
  98. data/tools/dataextractor/main-07b38629281328ace40e.js +0 -1497
@@ -0,0 +1,14 @@
1
+ System.register(["./main-41bf9e8be1fa8f271a59.js","vue","./TargetPacketItemChooser-wISd7chF-a0464b042415727a9e4d.js","./OpenC3TimePicker-B8Vu9GBz-850d7e68786e24a785f4.js","vue-router","pinia","single-spa","vuetify"],(function(sn,Ao){"use strict";var Dt,nt,Nt,It,jt,Ut,x,D,F,Lt,p,y,Fe,ne,ae,ge,Ce,Mt,J,rt,it,ot,be,Ft,at,Vt,qt;return{setters:[k=>{Dt=k.i,nt=k.F,Nt=k._,It=k.R,jt=k.a,Ut=k.k},k=>{x=k.resolveComponent,D=k.openBlock,F=k.createBlock,Lt=k.Teleport,p=k.createVNode,y=k.withCtx,Fe=k.createElementVNode,ne=k.toDisplayString,ae=k.createElementBlock,ge=k.Fragment,Ce=k.renderList,Mt=k.ref,J=k.createTextVNode,rt=k.mergeProps,it=k.createSlots,ot=k.normalizeStyle,be=k.createCommentVNode,Ft=k.withModifiers,at=k.withKeys},k=>{Vt=k.S},k=>{qt=k.w},null,null,null,null],execute:(function(){var k=document.createElement("style");k.textContent=`.title-font[data-v-eb45238b]{font-size:1.125rem}.v-progress-linear__determinate[data-v-eb45238b]{transition:none!important}
2
+ /*$vite$:1*/`,document.head.appendChild(k);const nn={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(t,{emit:e}){const s=e,n=Mt(!1);function r(){n.value=!1}function o(i){return i.replaceAll(" ","-").toLowerCase()}return(i,a)=>{const l=x("v-icon"),d=x("v-btn"),u=x("v-divider"),f=x("v-list-item-title"),w=x("v-list-item"),g=x("v-list"),C=x("v-menu"),v=x("v-radio"),A=x("v-list-item-action"),h=x("v-radio-group"),b=x("v-checkbox");return D(),F(C,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=m=>n.value=m),"close-on-content-click":!1},{activator:y(({props:m})=>[p(d,rt(m,{variant:"outlined",class:"mx-1 menu-button",text:t.menu.label,"data-test":o(`${t.title} ${t.menu.label}`)}),{append:y(()=>[p(l,{class:"menu-button-icon"},{default:y(()=>[...a[1]||(a[1]=[J(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:y(()=>[p(g,null,{default:y(()=>[(D(!0),ae(ge,null,Ce(t.menu.items,(m,S)=>(D(),ae(ge,null,[m.divider?(D(),F(u,{key:S+"-divider"})):m.subMenu&&m.subMenu.length>0?(D(),ae("div",{key:S+"-submenu"},[(D(),F(C,{key:S,"open-on-hover":"",location:"right"},{activator:y(({props:R})=>[(D(),F(w,rt({ref_for:!0},R,{key:S,disabled:m.disabled}),it({append:y(()=>[p(l,null,{default:y(()=>[...a[2]||(a[2]=[J(" mdi-chevron-right ",-1)])]),_:1})]),default:y(()=>[!m.radio&&!m.checkbox?(D(),F(f,{key:0,style:ot("cursor: pointer;"+(m.disabled?"opacity: 0.2":""))},{default:y(()=>[J(ne(m.label),1)]),_:2},1032,["style"])):be("",!0)]),_:2},[m.icon?{name:"prepend",fn:y(()=>[p(l,{disabled:m.disabled},{default:y(()=>[J(ne(m.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:y(()=>[p(g,null,{default:y(()=>[(D(!0),ae(ge,null,Ce(m.subMenu,(R,B)=>(D(),F(w,{key:B,"prepend-icon":R.icon,onClick:Z=>s("submenu-click",R)},{default:y(()=>[p(f,null,{default:y(()=>[J(ne(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):m.radioGroup?(D(),F(h,{key:S+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":m.value,"onUpdate:modelValue":m.command},{default:y(()=>[(D(!0),ae(ge,null,Ce(m.choices,(R,B)=>(D(),F(w,{key:B+"-choice"},{default:y(()=>[p(A,{class:"list-action"},{default:y(()=>[p(v,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(D(),F(w,{key:S+"-list",disabled:m.disabled,"data-test":o(`${t.title} ${t.menu.label} ${m.label}`),onClick:()=>{m.command(m),m.checkbox||r()}},it({default:y(()=>[m.checkbox?(D(),F(A,{key:0,class:"list-action"},{default:y(()=>[p(b,{modelValue:m.checked,"onUpdate:modelValue":R=>m.checked=R,label:m.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):be("",!0),!m.radio&&!m.checkbox?(D(),F(f,{key:1,style:ot("cursor: pointer;"+(m.disabled?"opacity: 0.2":""))},{default:y(()=>[J(ne(m.label),1)]),_:2},1032,["style"])):be("",!0)]),_:2},[m.icon?{name:"prepend",fn:y(()=>[p(l,{icon:m.icon,disabled:m.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},rn={components:{TopBarMenu:nn},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}}},on={class:"app-title mr-2"};function an(t,e,s,n,r,o){const i=x("v-col"),a=x("v-row"),l=x("TopBarMenu");return D(),F(Lt,{to:"#openc3-menu"},[p(a,{"no-gutters":""},{default:y(()=>[p(i,{"align-self":"end"},{default:y(()=>[Fe("span",on,ne(s.title),1)]),_:1})]),_:1}),p(a,{dense:"",class:"flex-nowrap"},{default:y(()=>[(D(!0),ae(ge,null,Ce(s.menus,(d,u)=>(D(),F(l,{key:u+"-top-menu",ref_for:!0,ref:"topmenu",menu:d,title:s.title,onSubmenuClick:o.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const ln=Dt(rn,[["render",an],["__scopeId","data-v-f4fb184e"]]),cn="__default",un={data:{dontSaveDefaultConfig:!1},created:function(){if(!this.configKey)throw alert("Components using the Config mixin must provide a configKey"),new Error("Components using the Config mixin must provide a configKey")},computed:{storageKey(){return`${this.configKey}${cn}`}},methods:{loadDefaultConfig:function(){const t=localStorage.getItem(this.storageKey);return t?JSON.parse(t):{}},saveDefaultConfig:function(t){this.dontSaveDefaultConfig||localStorage.setItem(this.storageKey,JSON.stringify(t))},openConfigBase:function(t,e=!1,s=null){new nt().load_config(this.configKey,t).then(n=>{n?(this.$notify.normal({title:"Loading configuration",body:t}),s&&s(JSON.parse(n)),e||this.$route.fullPath.includes(t)||this.$router.push({query:{config:t}})):this.$notify.caution({title:"Unknown configuration",body:t})}).catch(n=>{n&&this.$notify.serious({title:`Error opening configuration: ${t}`,body:n})})},saveConfigBase:function(t,e){new nt().save_config(this.configKey,t,JSON.stringify(e)).then(()=>{this.$notify.normal({title:"Saved configuration",body:t})}).catch(s=>{s&&this.$notify.serious({title:`Error saving configuration: ${t}`,body:s})})},resetConfigBase:function(){localStorage.removeItem(this.storageKey);const t={...this.$route.query};delete t.config,this.$router.replace({query:t})}}};function Bt(t,e){return function(){return t.apply(e,arguments)}}const{toString:dn}=Object.prototype,{getPrototypeOf:_e}=Object,{iterator:Te,toStringTag:$t}=Symbol,Ve=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),Re=(t,e)=>{let s=t;const n=[];for(;s!=null&&s!==Object.prototype;){if(n.indexOf(s)!==-1)return!1;if(n.push(s),Ve(s,e))return!0;s=_e(s)}return!1},hn=(t,e)=>t!=null&&Re(t,e)?t[e]:void 0,lt=(t=>e=>{const s=dn.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),te=t=>(t=t.toLowerCase(),e=>lt(e)===t),qe=t=>e=>typeof e===t,{isArray:ce}=Array,ye=qe("undefined");function we(t){return t!==null&&!ye(t)&&t.constructor!==null&&!ye(t.constructor)&&K(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const zt=te("ArrayBuffer");function fn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&zt(t.buffer),e}const pn=qe("string"),K=qe("function"),Ht=qe("number"),ve=t=>t!==null&&typeof t=="object",mn=t=>t===!0||t===!1,Be=t=>{if(!ve(t))return!1;const e=_e(t);return(e===null||e===Object.prototype||_e(e)===null)&&!Re(t,$t)&&!Re(t,Te)},gn=t=>{if(!ve(t)||we(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},bn=te("Date"),_n=te("File"),yn=t=>!!(t&&typeof t.uri<"u"),wn=t=>t&&typeof t.getParts<"u",vn=te("Blob"),En=te("FileList"),Sn=t=>ve(t)&&K(t.pipe);function On(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Wt=On(),Jt=typeof Wt.FormData<"u"?Wt.FormData:void 0,Cn=t=>{if(!t)return!1;if(Jt&&t instanceof Jt)return!0;const e=_e(t);if(!e||e===Object.prototype||!K(t.append))return!1;const s=lt(t);return s==="formdata"||s==="object"&&K(t.toString)&&t.toString()==="[object FormData]"},Tn=te("URLSearchParams"),[Rn,xn,An,kn]=["ReadableStream","Request","Response","Headers"].map(te),Pn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xe(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(we(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 Kt(t,e){if(we(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 ue=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zt=t=>!ye(t)&&t!==ue;function ct(...t){const{caseless:e,skipUndefined:s}=Zt(this)&&this||{},n={},r=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=e&&typeof i=="string"&&Kt(n,i)||i,l=Ve(n,a)?n[a]:void 0;Be(l)&&Be(o)?n[a]=ct(l,o):Be(o)?n[a]=ct({},o):ce(o)?n[a]=o.slice():(!s||!ye(o))&&(n[a]=o)};for(let o=0,i=t.length;o<i;o++){const a=t[o];if(!a||we(a)||(xe(a,r),typeof a!="object"||ce(a)))continue;const l=Object.getOwnPropertySymbols(a);for(let d=0;d<l.length;d++){const u=l[d];$n.call(a,u)&&r(a[u],u)}}return n}const Dn=(t,e,s,{allOwnKeys:n}={})=>(xe(e,(r,o)=>{s&&K(r)?Object.defineProperty(t,o,{__proto__:null,value:Bt(r,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),Nn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),In=(t,e,s,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),s&&Object.assign(t.prototype,s)},jn=(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&&_e(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},Un=(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},Ln=t=>{if(!t)return null;if(ce(t))return t;let e=t.length;if(!Ht(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"&&_e(Uint8Array)),Fn=(t,e)=>{const s=(t&&t[Te]).call(t);let n;for(;(n=s.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},Vn=(t,e)=>{let s;const n=[];for(;(s=t.exec(e))!==null;)n.push(s);return n},qn=te("HTMLFormElement"),Bn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,n){return s.toUpperCase()+n}),{propertyIsEnumerable:$n}=Object.prototype,zn=te("RegExp"),Xt=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),n={};xe(s,(r,o)=>{let i;(i=e(r,o,t))!==!1&&(n[o]=i||r)}),Object.defineProperties(t,n)},Hn=t=>{Xt(t,(e,s)=>{if(K(t)&&["arguments","caller","callee"].includes(s))return!1;const n=t[s];if(K(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+"'")})}})},Wn=(t,e)=>{const s={},n=r=>{r.forEach(o=>{s[o]=!0})};return ce(t)?n(t):n(String(t).split(e)),s},Jn=()=>{},Kn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Zn(t){return!!(t&&K(t.append)&&t[$t]==="FormData"&&t[Te])}const Xn=t=>{const e=new WeakSet,s=n=>{if(ve(n)){if(e.has(n))return;if(we(n))return n;if(!("toJSON"in n)){e.add(n);const r=ce(n)?[]:{};return xe(n,(o,i)=>{const a=s(o);!ye(a)&&(r[i]=a)}),e.delete(n),r}}return n};return s(t)},Gn=te("AsyncFunction"),Qn=t=>t&&(ve(t)||K(t))&&K(t.then)&&K(t.catch),Gt=((t,e)=>t?setImmediate:e?((s,n)=>(ue.addEventListener("message",({source:r,data:o})=>{r===ue&&o===s&&n.length&&n.shift()()},!1),r=>{n.push(r),ue.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",K(ue.postMessage)),Yn=typeof queueMicrotask<"u"?queueMicrotask.bind(ue):typeof process<"u"&&process.nextTick||Gt,Qt=t=>t!=null&&K(t[Te]),er=t=>t!=null&&Re(t,Te)&&Qt(t),c={isArray:ce,isArrayBuffer:zt,isBuffer:we,isFormData:Cn,isArrayBufferView:fn,isString:pn,isNumber:Ht,isBoolean:mn,isObject:ve,isPlainObject:Be,isEmptyObject:gn,isReadableStream:Rn,isRequest:xn,isResponse:An,isHeaders:kn,isUndefined:ye,isDate:bn,isFile:_n,isReactNativeBlob:yn,isReactNative:wn,isBlob:vn,isRegExp:zn,isFunction:K,isStream:Sn,isURLSearchParams:Tn,isTypedArray:Mn,isFileList:En,forEach:xe,merge:ct,extend:Dn,trim:Pn,stripBOM:Nn,inherits:In,toFlatObject:jn,kindOf:lt,kindOfTest:te,endsWith:Un,toArray:Ln,forEachEntry:Fn,matchAll:Vn,isHTMLForm:qn,hasOwnProperty:Ve,hasOwnProp:Ve,hasOwnInPrototypeChain:Re,getSafeProp:hn,reduceDescriptors:Xt,freezeMethods:Hn,toObjectSet:Wn,toCamelCase:Bn,noop:Jn,toFiniteNumber:Kn,findKey:Kt,global:ue,isContextDefined:Zt,isSpecCompliantForm:Zn,toJSONObject:Xn,isAsyncFn:Gn,isThenable:Qn,setImmediate:Gt,asap:Yn,isIterable:Qt,isSafeIterable:er},tr=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"]),sr=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]&&tr[s])&&(s==="set-cookie"?e[s]?e[s].push(n):e[s]=[n]:e[s]=e[s]?e[s]+", "+n:n)}),e};function nr(t){let e=0,s=t.length;for(;e<s;){const n=t.charCodeAt(e);if(n!==9&&n!==32)break;e+=1}for(;s>e;){const n=t.charCodeAt(s-1);if(n!==9&&n!==32)break;s-=1}return e===0&&s===t.length?t:t.slice(e,s)}const rr=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ir=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ut(t,e){return c.isArray(t)?t.map(s=>ut(s,e)):nr(String(t).replace(e,""))}const or=t=>ut(t,rr),ar=t=>ut(t,ir);function Yt(t){const e=Object.create(null);return c.forEach(t.toJSON(),(s,n)=>{e[n]=ar(s)}),e}const es=Symbol("internals");function Ae(t){return t&&String(t).trim().toLowerCase()}function $e(t){return t===!1||t==null?t:c.isArray(t)?t.map($e):or(String(t))}function lr(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 cr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function dt(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 ur(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,n)=>s.toUpperCase()+n)}function dr(t,e){const s=c.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+s,{__proto__:null,value:function(r,o,i){return this[n].call(this,e,r,o,i)},configurable:!0})})}let V=class{constructor(t){t&&this.set(t)}set(t,e,s){const n=this;function r(i,a,l){const d=Ae(a);if(!d)return;const u=c.findKey(n,d);(!u||n[u]===void 0||l===!0||l===void 0&&n[u]!==!1)&&(n[u||a]=$e(i))}const o=(i,a)=>c.forEach(i,(l,d)=>r(l,d,a));if(c.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(c.isString(t)&&(t=t.trim())&&!cr(t))o(sr(t),e);else if(c.isObject(t)&&c.isSafeIterable(t)){let i=Object.create(null),a,l;for(const d of t){if(!c.isArray(d))throw new TypeError("Object iterator must return a key-value pair");l=d[0],c.hasOwnProp(i,l)?(a=i[l],i[l]=c.isArray(a)?[...a,d[1]]:[a,d[1]]):i[l]=d[1]}o(i,e)}else t!=null&&r(e,t,s);return this}get(t,e){if(t=Ae(t),t){const s=c.findKey(this,t);if(s){const n=this[s];if(!e)return n;if(e===!0)return lr(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=Ae(t),t){const s=c.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||dt(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let n=!1;function r(o){if(o=Ae(o),o){const i=c.findKey(s,o);i&&(!e||dt(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||dt(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]=$e(n),delete e[r];return}const i=t?ur(r):String(r).trim();i!==r&&delete e[r],e[i]=$e(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[es]=this[es]={accessors:{}}).accessors,s=this.prototype;function n(r){const o=Ae(r);e[o]||(dr(s,r),e[o]=!0)}return c.isArray(t)?t.forEach(n):n(t),this}};V.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(V.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[s]=n}}}),c.freezeMethods(V);const hr="[REDACTED ****]";function fr(t){if(c.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(c.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function pr(t,e){const s=new Set(e.map(o=>String(o).toLowerCase())),n=[],r=o=>{if(o===null||typeof o!="object"||c.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof V&&(o=o.toJSON()),n.push(o);let i;if(c.isArray(o))i=[],o.forEach((a,l)=>{const d=r(a);c.isUndefined(d)||(i[l]=d)});else{if(!c.isPlainObject(o)&&fr(o))return n.pop(),o;i=Object.create(null);for(const[a,l]of Object.entries(o)){const d=s.has(a.toLowerCase())?hr:r(l);c.isUndefined(d)||(i[a]=d)}}return n.pop(),i};return r(t)}let _=class en extends Error{static from(e,s,n,r,o,i){const a=new en(e.message,s||e.code,n,r,o);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),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",{__proto__:null,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(){const e=this.config,s=e&&c.hasOwnProp(e,"redact")?e.redact:void 0,n=c.isArray(s)&&s.length>0?pr(e,s):c.toJSONObject(e);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:n,code:this.code,status:this.status}}};_.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",_.ERR_BAD_OPTION="ERR_BAD_OPTION",_.ECONNABORTED="ECONNABORTED",_.ETIMEDOUT="ETIMEDOUT",_.ECONNREFUSED="ECONNREFUSED",_.ERR_NETWORK="ERR_NETWORK",_.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",_.ERR_DEPRECATED="ERR_DEPRECATED",_.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",_.ERR_BAD_REQUEST="ERR_BAD_REQUEST",_.ERR_CANCELED="ERR_CANCELED",_.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",_.ERR_INVALID_URL="ERR_INVALID_URL",_.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const mr=null,ts=100;function ht(t){return c.isPlainObject(t)||c.isArray(t)}function ss(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function ft(t,e,s){return t?t.concat(e).map(function(n,r){return n=ss(n),!s&&r?"["+n+"]":n}).join(s?".":""):e}function gr(t){return c.isArray(t)&&!t.some(ht)}const br=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function ze(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(h,b){return!c.isUndefined(b[h])});const n=s.metaTokens,r=s.visitor||C,o=s.dots,i=s.indexes,a=s.Blob||typeof Blob<"u"&&Blob,l=s.maxDepth===void 0?ts:s.maxDepth,d=a&&c.isSpecCompliantForm(e),u=[];if(!c.isFunction(r))throw new TypeError("visitor must be a function");function f(h){if(h===null)return"";if(c.isDate(h))return h.toISOString();if(c.isBoolean(h))return h.toString();if(!d&&c.isBlob(h))throw new _("Blob is not supported. Use a Buffer instead.");if(c.isArrayBuffer(h)||c.isTypedArray(h)){if(d&&typeof a=="function")return new a([h]);if(typeof Buffer<"u")return Buffer.from(h);throw new _("Blob is not supported. Use a Buffer instead.",_.ERR_NOT_SUPPORT)}return h}function w(h){if(h>l)throw new _("Object is too deeply nested ("+h+" levels). Max depth: "+l,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(h,b){if(l===1/0)return JSON.stringify(h);const m=[];return JSON.stringify(h,function(S,R){if(!c.isObject(R))return R;for(;m.length&&m[m.length-1]!==this;)m.pop();return m.push(R),w(b+m.length-1),R})}function C(h,b,m){let S=h;if(c.isReactNative(e)&&c.isReactNativeBlob(h))return e.append(ft(m,b,o),f(h)),!1;if(h&&!m&&typeof h=="object"){if(c.endsWith(b,"{}"))b=n?b:b.slice(0,-2),h=g(h,1);else if(c.isArray(h)&&gr(h)||(c.isFileList(h)||c.endsWith(b,"[]"))&&(S=c.toArray(h)))return b=ss(b),S.forEach(function(R,B){!(c.isUndefined(R)||R===null)&&e.append(i===!0?ft([b],B,o):i===null?b:b+"[]",f(R))}),!1}return ht(h)?!0:(e.append(ft(m,b,o),f(h)),!1)}const v=Object.assign(br,{defaultVisitor:C,convertValue:f,isVisitable:ht});function A(h,b,m=0){if(!c.isUndefined(h)){if(w(m),u.indexOf(h)!==-1)throw new Error("Circular reference detected in "+b.join("."));u.push(h),c.forEach(h,function(S,R){(!(c.isUndefined(S)||S===null)&&r.call(e,S,c.isString(R)?R.trim():R,b,v))===!0&&A(S,b?b.concat(R):[R],m+1)}),u.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return A(t),e}function ns(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(s){return e[s]})}function pt(t,e){this._pairs=[],t&&ze(t,this,e)}const rs=pt.prototype;rs.append=function(t,e){this._pairs.push([t,e])},rs.toString=function(t){const e=t?s=>t.call(this,s,ns):ns;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function _r(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function is(t,e,s){if(!e)return t;t=t||"";const n=c.isFunction(s)?{serialize:s}:s,r=c.getSafeProp(n,"encode")||_r,o=c.getSafeProp(n,"serialize");let i;if(o?i=o(e,n):i=c.isURLSearchParams(e)?e.toString():new pt(e,n).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class os{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 mt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},yr=typeof URLSearchParams<"u"?URLSearchParams:pt,wr=typeof FormData<"u"?FormData:null,vr=typeof Blob<"u"?Blob:null,Er={isBrowser:!0,classes:{URLSearchParams:yr,FormData:wr,Blob:vr},protocols:["http","https","file","blob","url","data"]},gt=typeof window<"u"&&typeof document<"u",bt=typeof navigator=="object"&&navigator||void 0,Sr=gt&&(!bt||["ReactNative","NativeScript","NS"].indexOf(bt.product)<0),Or=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Cr=gt&&window.location.href||"http://localhost",Tr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gt,hasStandardBrowserEnv:Sr,hasStandardBrowserWebWorkerEnv:Or,navigator:bt,origin:Cr},Symbol.toStringTag,{value:"Module"})),M={...Tr,...Er};function Rr(t,e){return ze(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})}const as=ts;function ls(t){if(t>as)throw new _("FormData field is too deeply nested ("+t+" levels). Max depth: "+as,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function xr(t){const e=[],s=/\w+|\[(\w*)]/g;let n;for(;(n=s.exec(t))!==null;)ls(e.length),e.push(n[0]==="[]"?"":n[1]||n[0]);return e}function Ar(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 cs(t){function e(s,n,r,o){ls(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]=c.isArray(r[i])?r[i].concat(n):[r[i],n]:r[i]=n,!a):((!c.hasOwnProp(r,i)||!c.isObject(r[i]))&&(r[i]=[]),e(s,n,r[i],o)&&c.isArray(r[i])&&(r[i]=Ar(r[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const s={};return c.forEachEntry(t,(n,r)=>{e(xr(n),r,s,0)}),s}return null}const Ee=(t,e)=>t!=null&&c.hasOwnProp(t,e)?t[e]:void 0;function kr(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 ke={transitional:mt,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(cs(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){const i=Ee(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return Rr(t,i).toString();if((o=c.isFileList(t))||s.indexOf("multipart/form-data")>-1){const a=Ee(this,"env"),l=a&&a.FormData;return ze(o?{"files[]":t}:t,l&&new l,i)}}return r||n?(e.setContentType("application/json",!1),kr(t)):t}],transformResponse:[function(t){const e=Ee(this,"transitional")||ke.transitional,s=e&&e.forcedJSONParsing,n=Ee(this,"responseType"),r=n==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(s&&!n||r)){const o=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t,Ee(this,"parseReviver"))}catch(i){if(o)throw i.name==="SyntaxError"?_.from(i,_.ERR_BAD_RESPONSE,this,null,Ee(this,"response")):i}}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","query"],t=>{ke.headers[t]={}});function _t(t,e){const s=this||ke,n=e||s,r=V.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 us(t){return!!(t&&t.__CANCEL__)}let Pe=class extends _{constructor(t,e,s){super(t??"canceled",_.ERR_CANCELED,e,s),this.name="CanceledError",this.__CANCEL__=!0}};function ds(t,e,s){const n=s.config.validateStatus;!s.status||!n||n(s.status)?t(s):e(new _("Request failed with status code "+s.status,s.status>=400&&s.status<500?_.ERR_BAD_REQUEST:_.ERR_BAD_RESPONSE,s.config,s.request,s))}function Pr(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function Dr(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(),d=n[o];i||(i=l),s[r]=a,n[r]=l;let u=o,f=0;for(;u!==r;)f+=s[u++],u=u%t;if(r=(r+1)%t,r===o&&(o=(o+1)%t),l-i<e)return;const w=d&&l-d;return w?Math.round(f*1e3/w):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(),d=l-s;d>=n?i(a,l):(r=a,o||(o=setTimeout(()=>{o=null,i(r)},n-d)))},()=>r&&i(r)]}const He=(t,e,s=3)=>{let n=0;const r=Dr(50,250);return Nr(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=a!=null?Math.min(i,a):i,d=Math.max(0,l-n),u=r(d);n=Math.max(n,l);const f={loaded:l,total:a,progress:a?l/a:void 0,bytes:d,rate:u||void 0,estimated:u&&a?(a-l)/u:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},s)},hs=(t,e)=>{const s=t!=null;return[n=>e[0]({lengthComputable:s,total:t,loaded:n}),e[1]]},fs=t=>(...e)=>c.asap(()=>t(...e)),Ir=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,jr=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.split(";");for(let s=0;s<e.length;s++){const n=e[s].replace(/^\s+/,""),r=n.indexOf("=");if(r!==-1&&n.slice(0,r)===t)try{return decodeURIComponent(n.slice(r+1))}catch{return n.slice(r+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ur(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Lr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}const Mr=/^https?:(?!\/\/)/i,Fr=/[\t\n\r]/g;function Vr(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function qr(t){return Vr(t).replace(Fr,"")}function ps(t,e){if(typeof t=="string"&&Mr.test(qr(t)))throw new _('Invalid URL: missing "//" after protocol',_.ERR_INVALID_URL,e)}function ms(t,e,s,n){ps(e,n);let r=!Ur(e);return t&&(r||s===!1)?(ps(t,n),Lr(t,e)):e}const gs=t=>t instanceof V?{...t}:t;function de(t,e){t=t||{},e=e||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(u,f,w,g){return c.isPlainObject(u)&&c.isPlainObject(f)?c.merge.call({caseless:g},u,f):c.isPlainObject(f)?c.merge({},f):c.isArray(f)?f.slice():f}function r(u,f,w,g){if(c.isUndefined(f)){if(!c.isUndefined(u))return n(void 0,u,w,g)}else return n(u,f,w,g)}function o(u,f){if(!c.isUndefined(f))return n(void 0,f)}function i(u,f){if(c.isUndefined(f)){if(!c.isUndefined(u))return n(void 0,u)}else return n(void 0,f)}function a(u){const f=c.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!c.isUndefined(f))if(c.isPlainObject(f)){if(c.hasOwnProp(f,u))return f[u]}else return;const w=c.hasOwnProp(t,"transitional")?t.transitional:void 0;if(c.isPlainObject(w)&&c.hasOwnProp(w,u))return w[u]}function l(u,f,w){if(c.hasOwnProp(e,w))return n(u,f);if(c.hasOwnProp(t,w))return n(void 0,u)}const d={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,allowedSocketPaths:i,responseEncoding:i,validateStatus:l,headers:(u,f,w)=>r(gs(u),gs(f),w,!0)};return c.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const f=c.hasOwnProp(d,u)?d[u]:r,w=c.hasOwnProp(t,u)?t[u]:void 0,g=c.hasOwnProp(e,u)?e[u]:void 0,C=f(w,g,u);c.isUndefined(C)&&f!==l||(s[u]=C)}),c.hasOwnProp(e,"validateStatus")&&c.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(c.hasOwnProp(t,"validateStatus")?s.validateStatus=n(void 0,t.validateStatus):delete s.validateStatus),s}const Br=["content-type","content-length"];function $r(t,e,s){if(s!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([n,r])=>{Br.includes(n.toLowerCase())&&t.set(n,r)})}const zr=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,s)=>String.fromCharCode(parseInt(s,16)));function bs(t){const e=de({},t),s=w=>c.hasOwnProp(e,w)?e[w]:void 0,n=s("data");let r=s("withXSRFToken");const o=s("xsrfHeaderName"),i=s("xsrfCookieName");let a=s("headers");const l=s("auth"),d=s("baseURL"),u=s("allowAbsoluteUrls"),f=s("url");if(e.headers=a=V.from(a),e.url=is(ms(d,f,u,e),s("params"),s("paramsSerializer")),l){const w=c.getSafeProp(l,"username")||"",g=c.getSafeProp(l,"password")||"";try{a.set("Authorization","Basic "+btoa(w+":"+(g?zr(g):"")))}catch(C){throw _.from(C,_.ERR_BAD_OPTION_VALUE,t)}}if(c.isFormData(n)&&(M.hasStandardBrowserEnv||M.hasStandardBrowserWebWorkerEnv||c.isReactNative(n)?a.setContentType(void 0):c.isFunction(n.getHeaders)&&$r(a,n.getHeaders(),s("formDataHeaderPolicy"))),M.hasStandardBrowserEnv&&(c.isFunction(r)&&(r=r(e)),r===!0||r==null&&Ir(e.url))){const w=o&&i&&jr.read(i);w&&a.set(o,w)}return e}const Hr=typeof XMLHttpRequest<"u",Wr=Hr&&function(t){return new Promise(function(e,s){const n=bs(t);let r=n.data;const o=V.from(n.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:l}=n,d,u,f,w,g;function C(){w&&w(),g&&g(),n.cancelToken&&n.cancelToken.unsubscribe(d),n.signal&&n.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(n.method.toUpperCase(),n.url,!0),v.timeout=n.timeout;function A(){if(!v)return;const b=V.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),m={data:!i||i==="text"||i==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:b,config:t,request:v};ds(function(S){e(S),C()},function(S){s(S),C()},m),v=null}"onloadend"in v?v.onloadend=A:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(A)},v.onabort=function(){v&&(s(new _("Request aborted",_.ECONNABORTED,t,v)),C(),v=null)},v.onerror=function(b){const m=b&&b.message?b.message:"Network Error",S=new _(m,_.ERR_NETWORK,t,v);S.event=b||null,s(S),C(),v=null},v.ontimeout=function(){let b=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const m=n.transitional||mt;n.timeoutErrorMessage&&(b=n.timeoutErrorMessage),s(new _(b,m.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,t,v)),C(),v=null},r===void 0&&o.setContentType(null),"setRequestHeader"in v&&c.forEach(Yt(o),function(b,m){v.setRequestHeader(m,b)}),c.isUndefined(n.withCredentials)||(v.withCredentials=!!n.withCredentials),i&&i!=="json"&&(v.responseType=n.responseType),l&&([f,g]=He(l,!0),v.addEventListener("progress",f)),a&&v.upload&&([u,w]=He(a),v.upload.addEventListener("progress",u),v.upload.addEventListener("loadend",w)),(n.cancelToken||n.signal)&&(d=b=>{v&&(s(!b||b.type?new Pe(null,t,v):b),v.abort(),C(),v=null)},n.cancelToken&&n.cancelToken.subscribe(d),n.signal&&(n.signal.aborted?d():n.signal.addEventListener("abort",d)));const h=Pr(n.url);if(h&&!M.protocols.includes(h)){s(new _("Unsupported protocol "+h+":",_.ERR_BAD_REQUEST,t)),C();return}v.send(r||null)})},Jr=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const s=new AbortController;let n=!1;const r=function(l){if(!n){n=!0,i();const d=l instanceof Error?l:this.reason;s.abort(d instanceof _?d:new Pe(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,r(new _(`timeout of ${e}ms exceeded`,_.ETIMEDOUT))},e);const i=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(r):l.removeEventListener("abort",r)}),t=null)};t.forEach(l=>l.addEventListener("abort",r,{once:!0}));const{signal:a}=s;return a.unsubscribe=()=>c.asap(i),a},Kr=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},Zr=async function*(t,e){for await(const s of Xr(t))yield*Kr(s,e)},Xr=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()}},_s=(t,e,s,n)=>{const r=Zr(t,e);let o=0,i,a=l=>{i||(i=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:d,value:u}=await r.next();if(d){a(),l.close();return}let f=u.byteLength;if(s){let w=o+=f;s(w)}l.enqueue(new Uint8Array(u))}catch(d){throw a(d),d}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},We=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,Gr=(t,e,s)=>e+2<s&&We(t.charCodeAt(e+1))&&We(t.charCodeAt(e+2));function Qr(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const e=t.indexOf(",");if(e<0)return 0;const s=t.slice(5,e),n=t.slice(e+1);if(/;base64/i.test(s)){let o=n.length;const i=n.length;for(let f=0;f<i;f++)if(n.charCodeAt(f)===37&&f+2<i){const w=n.charCodeAt(f+1),g=n.charCodeAt(f+2);We(w)&&We(g)&&(o-=2,f+=2)}let a=0,l=i-1;const d=f=>f>=2&&n.charCodeAt(f-2)===37&&n.charCodeAt(f-1)===51&&(n.charCodeAt(f)===68||n.charCodeAt(f)===100);l>=0&&(n.charCodeAt(l)===61?(a++,l--):d(l)&&(a++,l-=3)),a===1&&l>=0&&(n.charCodeAt(l)===61||d(l))&&a++;const u=Math.floor(o/4)*3-(a||0);return u>0?u:0}let r=0;for(let o=0,i=n.length;o<i;o++){const a=n.charCodeAt(o);if(a===37&&Gr(n,o,i))r+=1,o+=2;else if(a<128)r+=1;else if(a<2048)r+=2;else if(a>=55296&&a<=56319&&o+1<i){const l=n.charCodeAt(o+1);l>=56320&&l<=57343?(r+=4,o++):r+=3}else r+=3}return r}const yt="1.18.1",ys=64*1024,{isFunction:Je}=c,Yr=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,s)=>String.fromCharCode(parseInt(s,16))),ws=t=>{if(!c.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},vs=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ei=t=>{const e=t.indexOf("://");let s=t;return e!==-1&&(s=s.slice(e+3)),s.includes("@")||s.includes(":")},ti=t=>{const e=c.global!==void 0&&c.global!==null?c.global:globalThis,{ReadableStream:s,TextEncoder:n}=e;t=c.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:r,Request:o,Response:i}=t,a=r?Je(r):typeof fetch=="function",l=Je(o),d=Je(i);if(!a)return!1;const u=a&&Je(s),f=a&&(typeof n=="function"?(h=>b=>h.encode(b))(new n):async h=>new Uint8Array(await new o(h).arrayBuffer())),w=l&&u&&vs(()=>{let h=!1;const b=new o(M.origin,{body:new s,method:"POST",get duplex(){return h=!0,"half"}}),m=b.headers.has("Content-Type");return b.body!=null&&b.body.cancel(),h&&!m}),g=d&&u&&vs(()=>c.isReadableStream(new i("").body)),C={stream:g&&(h=>h.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!C[h]&&(C[h]=(b,m)=>{let S=b&&b[h];if(S)return S.call(b);throw new _(`Response type '${h}' is not supported`,_.ERR_NOT_SUPPORT,m)})});const v=async h=>{if(h==null)return 0;if(c.isBlob(h))return h.size;if(c.isSpecCompliantForm(h))return(await new o(M.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(c.isArrayBufferView(h)||c.isArrayBuffer(h))return h.byteLength;if(c.isURLSearchParams(h)&&(h=h+""),c.isString(h))return(await f(h)).byteLength},A=async(h,b)=>c.toFiniteNumber(h.getContentLength())??v(b);return async h=>{let{url:b,method:m,data:S,signal:R,cancelToken:B,timeout:Z,onDownloadProgress:Q,onUploadProgress:X,responseType:$,headers:U,withCredentials:E="same-origin",fetchOptions:N,maxContentLength:z,maxBodyLength:Oe}=bs(h);const H=c.isNumber(z)&&z>-1,O=c.isNumber(Oe)&&Oe>-1,L=P=>c.hasOwnProp(h,P)?h[P]:void 0;let Y=r||fetch;$=$?($+"").toLowerCase():"text";let W=Jr([R,B&&B.toAbortSignal()],Z),I=null;const re=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let Ue,Le=null;const Zs=()=>new _("Request body larger than maxBodyLength limit",_.ERR_BAD_REQUEST,h,I);try{let P;const ee=L("auth");if(ee){const T=c.getSafeProp(ee,"username")||"",G=c.getSafeProp(ee,"password")||"";P={username:T,password:G}}if(ei(b)){const T=new URL(b,M.origin);if(!P&&(T.username||T.password)){const G=ws(T.username),le=ws(T.password);P={username:G,password:le}}(T.username||T.password)&&(T.username="",T.password="",b=T.href)}if(P&&(U.delete("authorization"),U.set("Authorization","Basic "+btoa(Yr((P.username||"")+":"+(P.password||""))))),H&&typeof b=="string"&&b.startsWith("data:")&&Qr(b)>z)throw new _("maxContentLength size of "+z+" exceeded",_.ERR_BAD_RESPONSE,h,I);if(O&&m!=="get"&&m!=="head"){const T=await v(S);if(typeof T=="number"&&isFinite(T)&&(Ue=T,T>Oe))throw Zs()}const st=O&&(c.isReadableStream(S)||c.isStream(S)),Xs=(T,G,le)=>_s(T,ys,me=>{if(O&&me>Oe)throw Le=Zs();G&&G(me)},le);if(w&&m!=="get"&&m!=="head"&&(X||st)){if(Ue=Ue??await A(U,S),Ue!==0||st){let T=new o(b,{method:"POST",body:S,duplex:"half"}),G;if(c.isFormData(S)&&(G=T.headers.get("content-type"))&&U.setContentType(G),T.body){const[le,me]=X&&hs(Ue,He(fs(X)))||[];S=Xs(T.body,le,me)}}}else if(st&&!l&&u&&m!=="get"&&m!=="head")S=Xs(S);else if(st&&l&&!w&&m!=="get"&&m!=="head")throw new _("Stream request bodies are not supported by the current fetch implementation",_.ERR_NOT_SUPPORT,h,I);c.isString(E)||(E=E?"include":"omit");const Ro=l&&"credentials"in o.prototype;if(c.isFormData(S)){const T=U.getContentType();T&&/^multipart\/form-data/i.test(T)&&!/boundary=/i.test(T)&&U.delete("content-type")}U.set("User-Agent","axios/"+yt,!1);const Gs={...N,signal:W,method:m.toUpperCase(),headers:Yt(U.normalize()),body:S,duplex:"half",credentials:Ro?E:void 0};I=l&&new o(b,Gs);let ie=await(l?Y(I,N):Y(b,Gs));const Qs=V.from(ie.headers);if(H){const T=c.toFiniteNumber(Qs.getContentLength());if(T!=null&&T>z)throw new _("maxContentLength size of "+z+" exceeded",_.ERR_BAD_RESPONSE,h,I)}const Pt=g&&($==="stream"||$==="response");if(g&&ie.body&&(Q||H||Pt&&re)){const T={};["status","statusText","headers"].forEach(Me=>{T[Me]=ie[Me]});const G=c.toFiniteNumber(Qs.getContentLength()),[le,me]=Q&&hs(G,He(fs(Q),!0))||[];let Ys=0;const xo=Me=>{if(H&&(Ys=Me,Ys>z))throw new _("maxContentLength size of "+z+" exceeded",_.ERR_BAD_RESPONSE,h,I);le&&le(Me)};ie=new i(_s(ie.body,ys,xo,()=>{me&&me(),re&&re()}),T)}$=$||"text";let oe=await C[c.findKey(C,$)||"text"](ie,h);if(H&&!g&&!Pt){let T;if(oe!=null&&(typeof oe.byteLength=="number"?T=oe.byteLength:typeof oe.size=="number"?T=oe.size:typeof oe=="string"&&(T=typeof n=="function"?new n().encode(oe).byteLength:oe.length)),typeof T=="number"&&T>z)throw new _("maxContentLength size of "+z+" exceeded",_.ERR_BAD_RESPONSE,h,I)}return!Pt&&re&&re(),await new Promise((T,G)=>{ds(T,G,{data:oe,headers:V.from(ie.headers),status:ie.status,statusText:ie.statusText,config:h,request:I})})}catch(P){if(re&&re(),W&&W.aborted&&W.reason instanceof _){const ee=W.reason;throw ee.config=h,I&&(ee.request=I),P!==ee&&Object.defineProperty(ee,"cause",{__proto__:null,value:P,writable:!0,enumerable:!1,configurable:!0}),ee}if(Le)throw I&&!Le.request&&(Le.request=I),Le;if(P instanceof _)throw I&&!P.request&&(P.request=I),P;if(P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)){const ee=new _("Network Error",_.ERR_NETWORK,h,I,P&&P.response);throw Object.defineProperty(ee,"cause",{__proto__:null,value:P.cause||P,writable:!0,enumerable:!1,configurable:!0}),ee}throw _.from(P,P&&P.code,h,I,P&&P.response)}}},si=new Map,Es=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,d,u=si;for(;a--;)l=o[a],d=u.get(l),d===void 0&&u.set(l,d=a?new Map:ti(e)),u=d;return d};Es();const wt={http:mr,xhr:Wr,fetch:{get:Es}};c.forEach(wt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const Ss=t=>`- ${t}`,ni=t=>c.isFunction(t)||t===null||t===!1;function ri(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,!ni(n)&&(r=wt[(a=String(n)).toLowerCase()],r===void 0))throw new _(`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,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=s?i.length>1?`since :
5
+ `+i.map(Ss).join(`
6
+ `):" "+Ss(i[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+a,_.ERR_NOT_SUPPORT)}return r}const Os={getAdapter:ri,adapters:wt};function vt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Pe(null,t)}function Cs(t){return vt(t),t.headers=V.from(t.headers),t.data=_t.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Os.getAdapter(t.adapter||ke.adapter,t)(t).then(function(e){vt(t),t.response=e;try{e.data=_t.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=V.from(e.headers),e},function(e){if(!us(e)&&(vt(t),e&&e.response)){t.response=e.response;try{e.response.data=_t.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=V.from(e.response.headers)}return Promise.reject(e)})}const Ke={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ke[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Ts={};Ke.transitional=function(t,e,s){function n(r,o){return"[Axios v"+yt+"] Transitional option '"+r+"'"+o+(s?". "+s:"")}return(r,o,i)=>{if(t===!1)throw new _(n(o," has been removed"+(e?" in "+e:"")),_.ERR_DEPRECATED);return e&&!Ts[o]&&(Ts[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}},Ke.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function ii(t,e,s){if(typeof t!="object"||t===null)throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let r=n.length;for(;r-- >0;){const o=n[r],i=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(i){const a=t[o],l=a===void 0||i(a,o,t);if(l!==!0)throw new _("option "+o+" must be "+l,_.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new _("Unknown option "+o,_.ERR_BAD_OPTION)}}const Ze={assertOptions:ii,validators:Ke},q=Ze.validators;let he=class{constructor(t){this.defaults=t||{},this.interceptors={request:new os,response:new os}}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=de(this.defaults,e);const{transitional:s,paramsSerializer:n,headers:r}=e;s!==void 0&&Ze.assertOptions(s,{silentJSONParsing:q.transitional(q.boolean),forcedJSONParsing:q.transitional(q.boolean),clarifyTimeoutError:q.transitional(q.boolean),legacyInterceptorReqResOrdering:q.transitional(q.boolean),advertiseZstdAcceptEncoding:q.transitional(q.boolean),validateStatusUndefinedResolves:q.transitional(q.boolean)},!1),n!=null&&(c.isFunction(n)?e.paramsSerializer={serialize:n}:Ze.assertOptions(n,{encode:q.function,serialize:q.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ze.assertOptions(e,{baseUrl:q.spelling("baseURL"),withXsrfToken:q.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","query","common"],g=>{delete r[g]}),e.headers=V.concat(o,r);const i=[];let a=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(e)===!1)return;a=a&&g.synchronous;const C=e.transitional||mt;C&&C.legacyInterceptorReqResOrdering?i.unshift(g.fulfilled,g.rejected):i.push(g.fulfilled,g.rejected)});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let d,u=0,f;if(!a){const g=[Cs.bind(this),void 0];for(g.unshift(...i),g.push(...l),f=g.length,d=Promise.resolve(e);u<f;)d=d.then(g[u++],g[u++]);return d}f=i.length;let w=e;for(;u<f;){const g=i[u++],C=i[u++];try{w=g(w)}catch(v){C.call(this,v);break}}try{d=Cs.call(this,w)}catch(g){return Promise.reject(g)}for(u=0,f=l.length;u<f;)d=d.then(l[u++],l[u++]);return d}getUri(t){t=de(this.defaults,t);const e=ms(t.baseURL,t.url,t.allowAbsoluteUrls,t);return is(e,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){he.prototype[t]=function(e,s){return this.request(de(s||{},{method:t,url:e,data:s&&c.hasOwnProp(s,"data")?s.data:void 0}))}}),c.forEach(["post","put","patch","query"],function(t){function e(s){return function(n,r,o){return this.request(de(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}he.prototype[t]=e(),t!=="query"&&(he.prototype[t+"Form"]=e(!0))});let oi=class tn{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 Pe(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 tn(function(s){e=s}),cancel:e}}};function ai(t){return function(e){return t.apply(null,e)}}function li(t){return c.isObject(t)&&t.isAxiosError===!0}const Et={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(Et).forEach(([t,e])=>{Et[e]=t});function Rs(t){const e=new he(t),s=Bt(he.prototype.request,e);return c.extend(s,he.prototype,e,{allOwnKeys:!0}),c.extend(s,e,null,{allOwnKeys:!0}),s.create=function(n){return Rs(de(t,n))},s}const j=Rs(ke);j.Axios=he,j.CanceledError=Pe,j.CancelToken=oi,j.isCancel=us,j.VERSION=yt,j.toFormData=ze,j.AxiosError=_,j.Cancel=j.CanceledError,j.all=function(t){return Promise.all(t)},j.spread=ai,j.isAxiosError=li,j.mergeConfig=de,j.AxiosHeaders=V,j.formToJSON=t=>cs(c.isHTMLForm(t)?new FormData(t):t),j.getAdapter=Os.getAdapter,j.HttpStatusCode=Et,j.default=j;const{Axios:ko,AxiosError:Po,CanceledError:Do,isCancel:No,CancelToken:Io,VERSION:jo,all:Uo,Cancel:Lo,isAxiosError:Mo,spread:Fo,toFormData:Vo,AxiosHeaders:qo,HttpStatusCode:Bo,formToJSON:$o,getAdapter:zo,mergeConfig:Ho,create:Wo}=j,St=j.create({baseURL:location.origin,timeout:6e4,params:{}});St.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(n){n&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let e=`HTTP ${t.response.status} - `;t.response?.statusText&&(e+=`${t.response.statusText} `),t.response?.config?.data&&(e+=`${t.response.config.data} `),t.response?.data?.message?e+=`${t.response.data.message}`:t.response?.data?.exception?e+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(e+=`${t.response.data.error.class} `),e+=`${t.response.data.error.message}`):e+=`${t.response?.data}`;const{$cosmosNotify:s}=window;throw s&&s.serious({title:"Network error",body:e}),t}else throw t});const Xe=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),St({method:t,url:e,data:s,params:n,headers:r,onUploadProgress:a})},Ot={Accept:"application/json"},xs={...Ot,"Content-Type":"application/json"},ci={get:function(t,{params:e,headers:s=Ot,noScope:n,noAuth:r,onUploadProgress:o}={}){return Xe("get",t,{params:e,headers:s,noScope:n,noAuth:r,onUploadProgress:o})},put:function(t,{data:e,params:s,headers:n=xs,noScope:r,noAuth:o,onUploadProgress:i}={}){return Xe("put",t,{data:e,params:s,headers:n,noScope:r,noAuth:o,onUploadProgress:i})},post:function(t,{data:e,params:s,headers:n=xs,noScope:r,noAuth:o,onUploadProgress:i}={}){return Xe("post",t,{data:e,params:s,headers:n,noScope:r,noAuth:o,onUploadProgress:i})},delete:function(t,{params:e,headers:s=Ot,noScope:n,noAuth:r,onUploadProgress:o}={}){return Xe("delete",t,{params:e,headers:s,noScope:n,noAuth:r,onUploadProgress:o})}};let Ge=()=>({emit(t,...e){for(let s=this.events[t]||[],n=0,r=s.length;n<r;n++)s[n](...e)},events:{},on(t,e){return(this.events[t]||=[]).push(e),()=>{this.events[t]=this.events[t]?.filter(s=>e!==s)}}});class De extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class Ct extends De{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class ui extends De{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class se extends De{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class di extends se{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function As(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 hi{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.reduce((s,{id:n,info:r})=>(s[n]=r,s),{})}}const fe=Symbol("state");class ks{constructor(e={}){this.emitter=Ge(),this.params=Object.freeze(e),this.presence=new hi(this),this.initialConnect=!0,this[fe]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=As({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[fe]}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[fe]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[fe]="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[fe]="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[fe]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[fe]="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 De("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class fi{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 pi{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 mi{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new pi),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 fi(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 gi{constructor(e={}){this.subscriptions=new mi(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 Ps={debug:0,info:1,warn:2,error:3};class Ds{constructor(e){this.level=e||"warn"}log(e,s,n){Ps[e]<Ps[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 Ne extends Ds{writeLogEntry(){}}class bi{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let _i=0;class Ns{constructor(e={}){let{logger:s}=e;this.logger=s||new Ne,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=As(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=++_i;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 ui(`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||=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 se(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 Ct)):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 Is=()=>Date.now()/1e3|0;class yi extends Ns{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=Is()),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=Is()),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 wi extends De{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class js extends ks{static identifier="__ghost__";constructor(e,s){super(s),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}const vi="$pubsub";class Us extends ks{static identifier=vi;async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}const pe=Symbol("state");let Ei=class{constructor({transport:t,protocol:e,encoder:s,logger:n,lazy:r,hubOptions:o,performFailures:i,transportConfigurator:a}){this.emitter=Ge(),this.transport=t,this.encoder=s,this.logger=n||new Ne,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new gi(o||{}),this[pe]="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[pe]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[pe]="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[pe]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new se("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[pe]="connected",this.hub.subscriptions.all().forEach(n=>{t&&n.remoteId&&t.includes(n.remoteId)?n.notify("restored"):(n.notify("disconnected",new se("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 se(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[pe]="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 se?t:new se(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[pe]="closed";let s=e||new se("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 Us({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Us({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,n;return typeof t=="string"&&(n=t,t=js),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 Ct&&this.logger.warn("rejected",o),i instanceof se){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 se?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 wi;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 Si={maxMissingPings:2,maxReconnectAttempts:1/0},Se=()=>Date.now(),Ls=(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(),d=2*(Math.random()-.5)*n;return l=l*(1+d),r&&r<l&&(l=r),l}};let Ms=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Si,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 Ne,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Se()}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=Se(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Se(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Se(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Se()})),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=Se()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new di))}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 Oi{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=Ge(),this.unbind=[],this.logger=s.logger||new Ne}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 Ci{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=Ge();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 Ti{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 Ri extends js{constructor(e,s,n){super(e,s),this.subscription=new Ti(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 Ct?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class xi{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 Ri(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 Ai{constructor(e){this.cable=e,this.subscriptions=new xi(e)}send(e){return this.cable.send(e)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const Fs={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function ki(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({},Fs,e);let{protocol:s,websocketImplementation:n,websocketFormat:r,websocketOptions:o,websocketAuthStrategy:i,fallbacks:a,logLevel:l,logger:d,transport:u,encoder:f,lazy:w,monitor:g,pingInterval:C,reconnectStrategy:v,maxMissingPings:A,maxReconnectAttempts:h,subprotocol:b,tokenRefresher:m,historyTimestamp:S,protocolOptions:R,concurrentSubscribes:B,performFailures:Z,transportConfigurator:Q,auth:X}=e;if(d=d||new Ne(l),typeof s=="string"){b=b||s;let E=s.substring(0,s.lastIndexOf("-")),N=s.substring(s.lastIndexOf("-")+1);if(R=R||{},E==="actioncable-v1")s=new Ns({logger:d,...R});else if(E==="actioncable-v1-ext")s=new yi({logger:d,historyTimestamp:S,...R});else throw Error(`Protocol is not supported yet: ${s}`);if(N==="json")f=f||new bi,r=r||"text";else if(N==="msgpack"){if(r="binary",!f)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(N==="protobuf"){if(r=r||"binary",!f)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");u=u||new Ci(t,{websocketImplementation:n,websocketOptions:o,subprotocol:b,authStrategy:i,format:r}),a&&(u=new Oi([u,...a],{logger:d})),X&&X.token&&u.setToken(X.token,X.param||"jid"),v=v||Ls(C),g!==!1&&(g=g||new Ms({pingInterval:C,reconnectStrategy:v,maxMissingPings:A,maxReconnectAttempts:h,logger:d}));let $={concurrentSubscribes:B},U=new Ei({protocol:s,transport:u,encoder:f,logger:d,lazy:w,hubOptions:$,performFailures:Z,transportConfigurator:Q});return g&&(g.watch(U),U.monitor=g),m&&Pi(U,async()=>{try{await m(u)}catch(E){return d.error("Failed to refresh authentication token: "+E),!1}return U.connect().catch(()=>{}),!0}),U}function Pi(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 Di extends Ds{writeLogEntry(e,s,n){n?console[e](s,n):console[e](s)}}class Ni extends Ms{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 se("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 Ii=["cable","action-cable"],ji="/cable",Qe=(t,e)=>{for(let s of Ii){let n=t.head.querySelector(`meta[name='${s}-${e}']`);if(n)return n.getAttribute("content")}},Vs=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Ui=()=>{if(typeof document<"u"&&document.head){let t=Qe(document,"url");if(t)return Vs(t)}return Vs(ji)},Li=()=>{if(typeof document<"u"&&document.head){let t=Qe(document,"history-timestamp");if(t)return t|0}},Mi=()=>{if(typeof document<"u"&&document.head)return Qe(document,"token")},Fi=()=>{if(typeof document<"u"&&document.head)return Qe(document,"token-param")};function Vi(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Ui(),e=e||{},e.historyTimestamp||=Li();let s=Mi();if(s){let d=Fi();e.auth=Object.assign({token:s,param:d},e.auth||{})}e=Object.assign({},Fs,e);let{logLevel:n,logger:r,pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l}=e;return r=e.logger=e.logger||new Di(n),i=e.reconnectStrategy=e.reconnectStrategy||Ls(o),e.monitor!==!1&&(e.monitor=e.monitor||new Ni({pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l,logger:r})),ki(t,e)}function qi(t,e){let s=Vi(t,e);return new Ai(s)}class Bi{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){const i=new URL(this._url,document.baseURI);i.searchParams.set("scope",s),this._cable=qi(i.href)}return this._cable.subscriptions.create({channel:e,token:localStorage.openc3Token,...r},n)})}recordPing(){}}function Ie(t){return $i.test(t)}const $i=/^-?[0-9]+$/;function qs(t){return zi.test(t)}const zi=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Bs(t,e){if(Ie(t))return Number.isSafeInteger(Number.parseInt(t,10));const s=Number.parseFloat(t),n=String(s);if(t===n)return!0;const r=$s(t),o=$s(n);return!!(r===o||e?.approx===!0&&!Ie(t)&&o.length>=14&&r.startsWith(o.substring(0,14)))}let je=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function Hi(t){if(Bs(t,{approx:!1}))return;if(Ie(t))return je.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?je.underflow:je.truncate_float:je.overflow}function $s(t){const{start:e,end:s}=Wi(t),n=t.substring(e,s),r=n.indexOf(".");return r===-1?n:n.substring(0,r)+n.substring(r+1)}function Wi(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 Ji{isLosslessNumber=!0;constructor(e){if(!qs(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Hi(this.value);if(e===void 0||e===je.truncate_float)return Number.parseFloat(this.value);if(Ie(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 Ki(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function Zi(t){return new Ji(t)}function Xi(t,e){return Tt({"":t},"",t,e)}function Tt(t,e,s,n){return Array.isArray(s)?n.call(t,e,Qi(s,n)):s&&typeof s=="object"&&!Ki(s)?n.call(t,e,Gi(s,n)):n.call(t,e,s)}function Gi(t,e){for(const s of Object.keys(t)){const n=Tt(t,s,t[s],e);n!==void 0?t[s]=n:delete t[s]}return t}function Qi(t,e){for(let s=0;s<t.length;s++)t[s]=Tt(t,String(s),t[s],e);return t}function Yi(t,e,s){const n=typeof s=="function"?{parseNumber:s}:s,r=n?.parseNumber??Zi,o=n?.onDuplicateKey??Z;let i=0;const a=u();return h(a),m(),e?Xi(a,e):a;function l(){if(t.charCodeAt(i)===io){i++,w();const O={};let L=!0;for(;i<t.length&&t.charCodeAt(i)!==Hs;){L?L=!1:(v(),w());const Y=i,W=g();if(W===void 0){B();return}w(),A();const I=u();if(I===void 0){E();return}if(Object.prototype.hasOwnProperty.call(O,W)&&!Rt(I,O[W])){const re=o({key:W,position:Y+1,oldValue:O[W],newValue:I});re!==void 0&&(O[W]=re)}else O[W]=I}return t.charCodeAt(i)!==Hs&&Q(),i++,O}}function d(){if(t.charCodeAt(i)===oo){i++,w();const O=[];let L=!0;for(;i<t.length&&t.charCodeAt(i)!==Ws;){L?L=!1:v();const Y=u();b(Y),O.push(Y)}return t.charCodeAt(i)!==Ws&&X(),i++,O}}function u(){w();const O=g()??C()??l()??d()??f("true",!0)??f("false",!1)??f("null",null);return w(),O}function f(O,L){if(t.slice(i,i+O.length)===O)return i+=O.length,L}function w(){for(;eo(t.charCodeAt(i));)i++}function g(){if(t.charCodeAt(i)===xt){i++;let O="";for(;i<t.length&&t.charCodeAt(i)!==xt;){if(t.charCodeAt(i)===ro){const L=t[i+1],Y=no[L];Y!==void 0?(O+=Y,i++):L==="u"?Ye(t.charCodeAt(i+2))&&Ye(t.charCodeAt(i+3))&&Ye(t.charCodeAt(i+4))&&Ye(t.charCodeAt(i+5))?(O+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):N(i):U(i)}else so(t.charCodeAt(i))?O+=t[i]:$(t[i]);i++}return R(),i++,O}}function C(){const O=i;if(t.charCodeAt(i)===Js&&(i++,S(O)),t.charCodeAt(i)===At)i++;else if(to(t.charCodeAt(i)))for(i++;et(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===mo)for(i++,S(O);et(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===wo||t.charCodeAt(i)===yo)for(i++,(t.charCodeAt(i)===Js||t.charCodeAt(i)===ho)&&i++,S(O);et(t.charCodeAt(i));)i++;if(i>O)return r(t.slice(O,i))}function v(){if(t.charCodeAt(i)!==po)throw new SyntaxError(`Comma ',' expected after value ${H()}`);i++}function A(){if(t.charCodeAt(i)!==go)throw new SyntaxError(`Colon ':' expected after property name ${H()}`);i++}function h(O){if(O===void 0)throw new SyntaxError(`JSON value expected ${H()}`)}function b(O){if(O===void 0)throw new SyntaxError(`Array item expected ${H()}`)}function m(){if(i<t.length)throw new SyntaxError(`Expected end of input ${H()}`)}function S(O){if(!et(t.charCodeAt(i))){const L=t.slice(O,i);throw new SyntaxError(`Invalid number '${L}', expecting a digit ${H()}`)}}function R(){if(t.charCodeAt(i)!==xt)throw new SyntaxError(`End of string '"' expected ${H()}`)}function B(){throw new SyntaxError(`Quoted object key expected ${H()}`)}function Z(O){let{key:L,position:Y}=O;throw new SyntaxError(`Duplicate key '${L}' encountered at position ${Y}`)}function Q(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${H()}`)}function X(){throw new SyntaxError(`Array item or end of array ']' expected ${H()}`)}function $(O){throw new SyntaxError(`Invalid character '${O}' ${z()}`)}function U(O){const L=t.slice(O,O+2);throw new SyntaxError(`Invalid escape character '${L}' ${z()}`)}function E(){throw new SyntaxError(`Object value expected after ':' ${z()}`)}function N(O){const L=t.slice(O,O+6);throw new SyntaxError(`Invalid unicode character '${L}' ${z()}`)}function z(){return`at position ${i}`}function Oe(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function H(){return`${Oe()} ${z()}`}}function eo(t){return t===ao||t===lo||t===co||t===uo}function Ye(t){return t>=At&&t<=kt||t>=bo&&t<=vo||t>=_o&&t<=Eo}function et(t){return t>=At&&t<=kt}function to(t){return t>=fo&&t<=kt}function so(t){return t>=32&&t<=1114111}function Rt(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,n)=>Rt(s,e[n])):zs(t)&&zs(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>Rt(t[s],e[s])):!1}function zs(t){return typeof t=="object"&&t!==null}const no={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
11
+ `,r:"\r",t:" "},ro=92,io=123,Hs=125,oo=91,Ws=93,ao=32,lo=10,co=9,uo=13,xt=34,ho=43,Js=45,At=48,fo=49,kt=57,po=44,mo=46,go=58,bo=65,_o=97,yo=69,wo=101,vo=70,Eo=102;function Ks(t,e,s,n){return r(t);function r(l,d){if(Array.isArray(n)){const u=n.find(f=>f.test(l));if(u){const f=u.stringify(l);if(typeof f!="string"||!qs(f))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${f})`);return f}}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?.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,d){if(l.length===0)return"[]";let u="[";for(let f=0;f<l.length;f++){const w=l[f];typeof w<"u"&&typeof w!="function"?u+=r(w):u+="null",f<l.length-1&&(u+=",")}return u+="]",u}function i(l,d){if(typeof l.toJSON=="function")return Ks(l.toJSON(),e,s,void 0);const u=Array.isArray(e)?e.map(String):Object.keys(l);if(u.length===0)return"{}";let f=!0,w="{";for(const g of u){const C=l[g];if(a(g,C)){f?f=!1:w+=",";const v=JSON.stringify(g);w+=`${v}:`,w+=r(C)}}return w+="}",w}function a(l,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function So(t){return Ie(t)&&!Bs(t)?BigInt(t):parseFloat(t)}class Oo{id=1;constructor(){}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 St.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)=>Ks(i)],transformResponse:[i=>{try{return Yi(i,void 0,So)}catch{const a=typeof i=="string"?i.substring(0,200):String(i),l=new Error(`Server returned non-JSON response: ${a}`);throw l.name="ServerError",l}}]})).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])}delete_limits_set(e){return this.exec("delete_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,d=null;for(let u=0;u<l;u++)d=this.decode_openc3_type(a[u][0]),d!==null&&(a[u][0]=d)}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"].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 or FORMATTED.`,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",o=!1){await this.exec("inject_tlm",[e,s,n],{type:r,stored:o})}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",[])}open_tab(e){window.open(e,"_blank")}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 tt=[];const Co={components:{OpenC3TimePicker:qt,OpenConfigDialog:Ut,SaveConfigDialog:jt,TargetPacketItemChooser:Vt,TopBar:ln},mixins:[un,It],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,allowWildcards:!1,keyMap:{},modes:["DECOM","REDUCED_MINUTE","REDUCED_HOUR","REDUCED_DAY"],valueTypes:["CONVERTED","RAW","FORMATTED"],reducedTypes:["SAMPLE","MIN","MAX","AVG","STDDEV"],editAll:!1,allItemMode:"DECOM",allItemValueType:"CONVERTED",allItemReducedType:"SAMPLE",cable:new Bi,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}},{label:"Allow Wildcards",checkbox:!0,checked:this.allowWildcards,command:()=>{this.allowWildcards=!this.allowWildcards}},{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,allowWildcards:this.allowWildcards,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)},allowWildcards: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 Oo,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{}),await ci.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.allowWildcards=!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.allowWildcards=t.allowWildcards,this.menus[1].items[3].checked=this.allowWildcards||!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(){tt=[],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("__")||a==="COSMOS_EXTRA").length;this.itemsReceived+=o.length-i,this.totalItemsReceived+=o.length-i}e.delete("__type"),e.delete("__time"),e.delete("COSMOS_EXTRA"),this.buildHeaders([...e]),tt.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]||e;const[s,n,r,o,i,a,l]=e.split("__");let d=i;this.columnMode==="full"&&(d=r+" "+o+" "+i),s&&s!=="DECOM"&&(d=d+" {"+s+"}"),a&&a!=="CONVERTED"&&(d=d+" ("+a+")"),l&&(d=d+" ["+l+"]"),this.columnHeaders.push(d)})},createFile:async function(){let t=tt.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((g,C)=>g.__time-C.__time),await this.yieldToMain();let o=[],i=[],a=null,l=0;for(let g of t){let C=!1;this.fillDown&&a?i=[...a]:i=[];let v="";if(Object.keys(g).forEach(A=>{if(A.slice(0,2)==="__"||A==="COSMOS_EXTRA")return;v=A;let h=s[A];if(typeof g[A]=="object")if(g[A]===null)i[h]="";else if(Array.isArray(g[A]))i[h]='"['+g[A]+']"';else{let b=g[A].raw;if(Array.isArray(b)){let m="0x";b.forEach(S=>{m+=S.toString(16).padStart(2,"0").toUpperCase()}),i[h]=m}else i[h]="'"+b+"'"}else i[h]=g[A];this.uniqueOnly&&o[h]!==i[h]&&(C=!0),o[h]=i[h]}),this.fillDown&&(a=[...i]),!this.uniqueOnly||C){if(this.columnMode==="normal"){v=this.keyMap[v]||v;const[A,h,b,m,S,R,B]=v.split("__"),Z=BigInt(g.__time),Q=Number(Z/1000000n),X=Number(Z%1000000n),$=new Date(Q).toISOString(),U=String(X).padStart(6,"0");if(i[0]=$.replace(/\.(\d{3})Z$/,(E,N)=>`.${N}${U}Z`),i[1]=b,i[2]=m,this.hasCommands){const E=g.COSMOS_EXTRA?JSON.parse(g.COSMOS_EXTRA):{};i[3]=E?.username||"",this.enterprise&&(i[4]=E?.approver||"")}}n.push(i.join(this.delimiter))}l+=1,l%1e3==0&&await this.yieldToMain()}let d=".csv",u="text/csv";this.delimiter===" "&&(d=".txt",u="text/tab-separated-values"),await this.yieldToMain();const f=new Blob([n.join(`
14
+ `)],{type:u});await this.yieldToMain();const w=document.createElement("a");w.href=URL.createObjectURL(f),w.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+d),w.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),tt.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 To(t,e,s,n,r,o){const i=x("top-bar"),a=x("v-text-field"),l=x("v-col"),d=x("OpenC3TimePicker"),u=x("v-row"),f=x("v-radio"),w=x("v-radio-group"),g=x("target-packet-item-chooser"),C=x("v-container"),v=x("v-progress-circular"),A=x("v-spacer"),h=x("v-btn"),b=x("v-toolbar"),m=x("v-card-title"),S=x("v-select"),R=x("v-card-text"),B=x("v-card-actions"),Z=x("v-card"),Q=x("v-dialog"),X=x("v-data-table"),$=x("open-config-dialog"),U=x("save-config-dialog");return D(),ae("div",null,[p(i,{menus:o.menus,title:r.title},null,8,["menus","title"]),p(Z,null,{default:y(()=>[p(C,null,{default:y(()=>[p(u,null,{default:y(()=>[p(l,null,{default:y(()=>[p(a,{modelValue:r.startDate,"onUpdate:modelValue":e[0]||(e[0]=E=>r.startDate=E),label:"Start Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),p(l,null,{default:y(()=>[p(d,{modelValue:r.startTime,"onUpdate:modelValue":e[1]||(e[1]=E=>r.startTime=E),label:"Start Time",rules:[r.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),p(l,null,{default:y(()=>[p(a,{modelValue:r.endDate,"onUpdate:modelValue":e[2]||(e[2]=E=>r.endDate=E),label:"End Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),p(l,null,{default:y(()=>[p(d,{modelValue:r.endTime,"onUpdate:modelValue":e[3]||(e[3]=E=>r.endTime=E),label:"End Time",rules:[r.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),p(u,{"no-gutters":""},{default:y(()=>[p(l,null,{default:y(()=>[p(w,{modelValue:r.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=E=>r.cmdOrTlm=E),inline:"","hide-details":"",class:"mt-0"},{default:y(()=>[p(f,{label:"Command",value:"cmd","data-test":"cmd-radio"}),p(f,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),p(u,null,{default:y(()=>[p(l,null,{default:y(()=>[p(g,{"button-text":"Add Item",mode:r.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":"","allow-glob":r.allowWildcards,"show-latest":"",onAddItem:e[5]||(e[5]=E=>o.addItem(E))},null,8,["mode","allow-glob"])]),_:1})]),_:1})]),_:1}),p(b,{class:"pl-3"},{default:y(()=>[p(v,{"model-value":r.progress},null,8,["model-value"]),J("   Processed: "+ne(r.totalPacketsReceived)+" packets, "+ne(r.totalItemsReceived)+" items ",1),p(A),p(h,{class:"bg-primary",disabled:r.items.length<1,onClick:o.processItems},{default:y(()=>[J(ne(r.processButtonText),1)]),_:1},8,["disabled","onClick"]),p(A),p(h,{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]=E=>r.editAll=!0)},null,8,["disabled"]),p(h,{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}),p(Z,{width:"100%"},{default:y(()=>[p(m,null,{default:y(()=>[e[18]||(e[18]=J(" Items ",-1)),p(A),p(a,{modelValue:r.search,"onUpdate:modelValue":e[7]||(e[7]=E=>r.search=E),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),p(X,{"items-per-page":r.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=E=>r.itemsPerPage=E),headers:r.headers,items:r.items,search:r.search,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":y(({item:E})=>[p(h,{icon:"mdi-pencil",variant:"text","data-test":"edit-row","aria-label":"Edit Item",onClick:Ft(N=>E.edit=!0,["stop"])},null,8,["onClick"]),p(Q,{modelValue:E.edit,"onUpdate:modelValue":N=>E.edit=N,"max-width":"600",persistent:"",onKeydown:at(N=>E.edit=!1,["esc"])},{default:y(()=>[p(Z,null,{default:y(()=>[p(b,{height:"24"},{default:y(()=>[p(A),e[19]||(e[19]=Fe("span",null," DataExtractor: Edit Item Mode ",-1)),p(A)]),_:1}),p(R,null,{default:y(()=>[p(u,{class:"mt-3 title-font"},{default:y(()=>[p(l,null,{default:y(()=>[J(ne(o.getItemLabel(E)),1)]),_:2},1024)]),_:2},1024),p(u,null,{default:y(()=>[p(l,null,{default:y(()=>[p(S,{modelValue:E.mode,"onUpdate:modelValue":N=>E.mode=N,"hide-details":"",items:r.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),p(u,null,{default:y(()=>[p(l,null,{default:y(()=>[p(S,{modelValue:E.valueType,"onUpdate:modelValue":N=>E.valueType=N,"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),p(u,null,{default:y(()=>[p(l,null,{default:y(()=>[p(S,{modelValue:E.reducedType,"onUpdate:modelValue":N=>E.reducedType=N,"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024)]),_:2},1024),p(B,{class:"px-6 py-3"},{default:y(()=>[p(A),p(h,{variant:"flat",onClick:N=>E.edit=!1},{default:y(()=>[...e[20]||(e[20]=[J(" Close ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":y(({item:E})=>[p(h,{icon:"mdi-delete",variant:"text","data-test":"delete-row","aria-label":"Delete Item",onClick:N=>o.deleteItem(E)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items","search"])]),_:1})]),_:1}),p(Q,{modelValue:r.editAll,"onUpdate:modelValue":e[14]||(e[14]=E=>r.editAll=E),"max-width":"600",persistent:"",onKeydown:e[15]||(e[15]=at(E=>r.editAll=!1,["esc"]))},{default:y(()=>[p(Z,null,{default:y(()=>[p(b,{height:"24"},{default:y(()=>[p(A),e[21]||(e[21]=Fe("span",null," DataExtractor: Edit All Items",-1)),p(A)]),_:1}),p(R,null,{default:y(()=>[p(u,{class:"mt-3"},{default:y(()=>[p(l,null,{default:y(()=>[...e[22]||(e[22]=[J(" This will change all items to the following data type! ",-1)])]),_:1})]),_:1}),p(u,null,{default:y(()=>[p(l,null,{default:y(()=>[p(S,{modelValue:r.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=E=>r.allItemMode=E),"hide-details":"",items:r.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),p(u,null,{default:y(()=>[p(l,null,{default:y(()=>[p(S,{modelValue:r.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=E=>r.allItemValueType=E),"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),p(u,null,{default:y(()=>[p(l,null,{default:y(()=>[p(S,{modelValue:r.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=E=>r.allItemReducedType=E),"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1})]),_:1}),p(B,{class:"px-6 py-3"},{default:y(()=>[p(A),p(h,{variant:"outlined",onClick:e[12]||(e[12]=E=>r.editAll=!1)},{default:y(()=>[...e[23]||(e[23]=[J(" Cancel ",-1)])]),_:1}),p(h,{variant:"flat",disabled:!r.allItemValueType,onClick:e[13]||(e[13]=E=>o.editAllItems())},{default:y(()=>[...e[24]||(e[24]=[J(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),r.openConfig?(D(),F($,{key:0,modelValue:r.openConfig,"onUpdate:modelValue":e[16]||(e[16]=E=>r.openConfig=E),"config-key":r.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):be("",!0),r.saveConfig?(D(),F(U,{key:1,modelValue:r.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=E=>r.saveConfig=E),"config-key":r.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):be("",!0)])}const Jo=sn("default",Nt(Co,[["render",To],["__scopeId","data-v-eb45238b"]]))})}}));
@@ -1 +1 @@
1
- System.register(["./Widget-D_HaosJK-3aa019608f819cd93c9a.js","./main-07b38629281328ace40e.js","vue","vue-router","pinia","single-spa","vuetify"],(function(d,f){"use strict";var l,a,n,r,s,u,i;return{setters:[e=>{l=e.h},e=>{a=e.f,n=e.R},e=>{r=e.resolveComponent,s=e.openBlock,u=e.createBlock,i=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(h,o,v,y,t,b){const m=r("v-text-field");return s(),u(m,{modelValue:t.dateValue,"onUpdate:modelValue":o[0]||(o[0]=p=>t.dateValue=p),label:t.label,style:i(h.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const V=d("default",a(e,[["render",c]]))})}}));
1
+ System.register(["./Widget-CtYQauzA-76c2f5fd2351d284a46d.js","./main-41bf9e8be1fa8f271a59.js","vue","vue-router","pinia","single-spa","vuetify"],(function(d,V){"use strict";var l,a,n,r,s,u,i;return{setters:[e=>{l=e.h},e=>{a=e.i,n=e.R},e=>{r=e.resolveComponent,s=e.openBlock,u=e.createBlock,i=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(h,o,v,y,t,b){const m=r("v-text-field");return s(),u(m,{modelValue:t.dateValue,"onUpdate:modelValue":o[0]||(o[0]=p=>t.dateValue=p),label:t.label,style:i(h.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const f=d("default",a(e,[["render",c]]))})}}));
@@ -1 +1 @@
1
- System.register(["./main-07b38629281328ace40e.js","./LimitsBar-D5IZu7eX-f245aa3388489b985719.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","vue"],(function(D,Z){"use strict";var L,S,x,B,E,h,u,o,e,t,w,s,n,f,N,p,k,V;return{setters:[c=>{L=c.f,S=c.g},c=>{x=c.x},c=>{B=c.a,E=c.r},c=>{h=c.resolveComponent,u=c.openBlock,o=c.createBlock,e=c.withCtx,t=c.createVNode,w=c.createElementVNode,s=c.createTextVNode,n=c.toDisplayString,f=c.createCommentVNode,N=c.normalizeClass,p=c.createElementBlock,k=c.Fragment,V=c.renderList}],execute:(function(){const c={components:{LimitsBar:x},props:{type:{default:"tlm",validator:function(r){return["cmd","tlm"].indexOf(r)!==-1}},targetName:{type:String,default:null},packetName:{type:String,default:null},itemName:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue"],data(){return{details:Object,available:null,updater:null,rawValue:null,convertedValue:null,formattedValue:null,currentLimitsState:null}},computed:{show:{get(){return this.modelValue},set(r){this.$emit("update:modelValue",r)}},limitsColor(){return E(this.currentLimitsState)},astroStatus(){return B(this.limitsColor)},limitsColorClass(){return this.limitsColor?"openc3-"+this.limitsColor:""}},watch:{modelValue:function(r,a){r?(this.requestDetails(),this.type==="tlm"&&(this.updater=setInterval(()=>{this.available&&this.details&&this.api.get_tlm_values(this.available).then(_=>{for(let b of _){let i=null;if(b[0].json_class==="String"&&b[0].raw!==void 0?i=b[0].raw:this.details.data_type==="BLOCK"&&(i=b[0]),i!==null){i=i.slice(0,Number.parseInt(this.details.bit_size)/8);let m=!1;i.length>64&&(m=!0),b[0]=Array.from(i.slice(0,64),function(v){return v===" "?"20":("0"+(v&255).toString(16)).slice(-2)}).join(" ").toUpperCase(),m&&(b[0]+="...")}}this.details.data_type.includes("INT")&&!this.details.array_size?this.rawValue=`${_[0][0]} (0x${_[0][0].toString(16).toUpperCase()})`:this.rawValue=_[0][0],this.convertedValue=_[1][0],this.formattedValue=_[2][0],this.currentLimitsState=_[1][1]})},1e3))):(clearInterval(this.updater),this.updater=null)}},created(){this.api=new S},beforeUnmount(){clearInterval(this.updater),this.updater=null},methods:{hasLimits(r){let a=!1;return r.limits.DEFAULT&&(a=!0),r.states&&Object.getOwnPropertyNames(r.states).forEach(_=>{r.states[_].color&&(a=!0)}),a},async requestDetails(){this.type==="tlm"?this.api.get_tlm_available([`${this.targetName}__${this.packetName}__${this.itemName}__RAW`,`${this.targetName}__${this.packetName}__${this.itemName}__CONVERTED`,`${this.targetName}__${this.packetName}__${this.itemName}__FORMATTED`]).then(r=>{r&&r.length>0&&(this.available=r),this.api.get_item(this.targetName,this.packetName,this.itemName).then(a=>{this.details=a,this.hasLimits(a)||(this.details.limits=null)})}):this.api.get_parameter(this.targetName,this.packetName,this.itemName).then(r=>{this.details=r})},async changeLimitsEnabled(){this.details.limits.enabled?await this.api.enable_limits(this.targetName,this.packetName,this.itemName):await this.api.disable_limits(this.targetName,this.packetName,this.itemName)},formatLimit(r){return r.hasOwnProperty("green_low")?"RL/"+r.red_low+" YL/"+r.yellow_low+" YH/"+r.yellow_high+" RH/"+r.red_high+" GL/"+r.green_low+" GH/"+r.green_high:r.hasOwnProperty("red_low")?"RL/"+r.red_low+" YL/"+r.yellow_low+" YH/"+r.yellow_high+" RH/"+r.red_high:r}}},$={key:5},O={key:7},R={class:"limits-text"},j={key:9};function z(r,a,_,b,i,m){const v=h("v-spacer"),I=h("v-toolbar"),U=h("v-card-title"),T=h("v-card-subtitle"),l=h("v-col"),d=h("v-row"),C=h("rux-status"),F=h("v-switch"),A=h("LimitsBar"),H=h("v-container"),M=h("v-card-text"),P=h("v-card"),Y=h("v-dialog");return u(),o(Y,{modelValue:m.show,"onUpdate:modelValue":a[1]||(a[1]=g=>m.show=g),width:"700"},{default:e(()=>[t(P,null,{default:e(()=>[t(I,{height:24},{default:e(()=>[t(v),a[2]||(a[2]=w("span",null," Details ",-1)),t(v)]),_:1}),t(U,null,{default:e(()=>[s(n(_.targetName)+" "+n(_.packetName)+" "+n(_.itemName),1)]),_:1}),t(T,null,{default:e(()=>[s(n(i.details.description),1)]),_:1}),t(M,null,{default:e(()=>[t(H,{fluid:""},{default:e(()=>[_.type==="tlm"?(u(),o(d,{key:0,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[3]||(a[3]=[s("Item Values",-1)])]),_:1}),t(l)]),_:1})):f("",!0),t(d,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[4]||(a[4]=[s("Raw Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),o(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.rawValue),1)]),_:1},8,["class"])]),_:1}),t(d,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[5]||(a[5]=[s("Converted Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),o(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.convertedValue),1)]),_:1},8,["class"])]),_:1}),t(d,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[6]||(a[6]=[s("Formatted Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),o(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.formattedValue),1)]),_:1},8,["class"])]),_:1}),t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[7]||(a[7]=[s("Bit Offset",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.bit_offset),1)]),_:1})]),_:1}),t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[8]||(a[8]=[s("Bit Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.bit_size),1)]),_:1})]),_:1}),i.details.array_size?(u(),o(d,{key:1,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[9]||(a[9]=[s("Array Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.array_size),1)]),_:1})]),_:1})):f("",!0),t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[10]||(a[10]=[s("Data Type",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.data_type),1)]),_:1})]),_:1}),_.type==="cmd"?(u(),o(d,{key:2,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[11]||(a[11]=[s("Minimum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.minimum),1)]),_:1})]),_:1})):f("",!0),_.type==="cmd"?(u(),o(d,{key:3,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[12]||(a[12]=[s("Maximum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.maximum),1)]),_:1})]),_:1})):f("",!0),_.type==="cmd"?(u(),o(d,{key:4,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[13]||(a[13]=[s("Default",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.default),1)]),_:1})]),_:1})):f("",!0),t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[14]||(a[14]=[s("Format String",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.format_string),1)]),_:1})]),_:1}),t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[15]||(a[15]=[s("Read Conversion",-1)])]),_:1}),i.details.read_conversion?(u(),o(l,{key:0},{default:e(()=>[s(" Class: "+n(i.details.read_conversion.class)+" ",1),a[16]||(a[16]=w("br",null,null,-1)),s(" Params: "+n(i.details.read_conversion.params),1)]),_:1})):(u(),o(l,{key:1}))]),_:1}),t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[17]||(a[17]=[s("Write Conversion",-1)])]),_:1}),i.details.write_conversion?(u(),o(l,{key:0},{default:e(()=>[s(" Class: "+n(i.details.write_conversion.class)+" ",1),a[18]||(a[18]=w("br",null,null,-1)),s(" Params: "+n(i.details.write_conversion.params),1)]),_:1})):(u(),o(l,{key:1}))]),_:1}),t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[19]||(a[19]=[s("Id Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.id_value),1)]),_:1})]),_:1}),t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[20]||(a[20]=[s("Units Full",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.units_full),1)]),_:1})]),_:1}),t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[21]||(a[21]=[s("Units Abbr",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.units),1)]),_:1})]),_:1}),t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[22]||(a[22]=[s("Endianness",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.endianness),1)]),_:1})]),_:1}),i.details.states?(u(),p("div",$,[t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[23]||(a[23]=[s("States",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.states,(g,y)=>(u(),o(d,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024),t(l,null,{default:e(()=>[s(n(g.value),1)]),_:2},1024)]),_:2},1024))),128))])):(u(),o(d,{key:6,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[24]||(a[24]=[s("States",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[25]||(a[25]=[s("None",-1)])]),_:1})]),_:1})),i.details.limits?(u(),p("div",O,[t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[26]||(a[26]=[s("Limits",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.limits,(g,y)=>(u(),o(d,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),y==="enabled"?(u(),o(l,{key:0,cols:"4",class:"label"},{default:e(()=>[...a[27]||(a[27]=[s("Enabled",-1)])]),_:1})):f("",!0),y==="enabled"?(u(),o(F,{key:1,modelValue:i.details.limits.enabled,"onUpdate:modelValue":[a[0]||(a[0]=q=>i.details.limits.enabled=q),m.changeLimitsEnabled],density:"compact",color:"primary",class:"compact-switch","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])):f("",!0),y!=="enabled"?(u(),o(l,{key:2,cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024)):f("",!0),y!=="enabled"?(u(),o(l,{key:3},{default:e(()=>[w("div",R,n(m.formatLimit(g)),1),g.red_low!==void 0?(u(),o(A,{key:0,"red-low":g.red_low,"yellow-low":g.yellow_low,"yellow-high":g.yellow_high,"red-high":g.red_high,"green-low":g.green_low,"green-high":g.green_high,value:i.convertedValue,width:300,height:22},null,8,["red-low","yellow-low","yellow-high","red-high","green-low","green-high","value"])):f("",!0)]),_:2},1024)):f("",!0)]),_:2},1024))),128))])):(u(),o(d,{key:8,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[28]||(a[28]=[s("Limits",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[29]||(a[29]=[s("None",-1)])]),_:1})]),_:1})),i.details.meta?(u(),p("div",j,[t(d,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[30]||(a[30]=[s("Meta",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.meta,(g,y)=>(u(),o(d,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024),t(l,null,{default:e(()=>[s(n(g.join(", ")),1)]),_:2},1024)]),_:2},1024))),128))])):(u(),o(d,{key:10,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[31]||(a[31]=[s("Meta",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[32]||(a[32]=[s("None",-1)])]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const G=D("Z",L(c,[["render",z],["__scopeId","data-v-36b55cdd"]]))})}}));
1
+ System.register(["./main-41bf9e8be1fa8f271a59.js","./LimitsBar-DN1s8-MS-d2e697ee1f1bfe976c50.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","vue"],(function(D,G){"use strict";var S,L,x,B,E,h,u,d,e,t,w,s,n,f,N,p,k,V;return{setters:[c=>{S=c.i,L=c.F},c=>{x=c.x},c=>{B=c.a,E=c.r},c=>{h=c.resolveComponent,u=c.openBlock,d=c.createBlock,e=c.withCtx,t=c.createVNode,w=c.createElementVNode,s=c.createTextVNode,n=c.toDisplayString,f=c.createCommentVNode,N=c.normalizeClass,p=c.createElementBlock,k=c.Fragment,V=c.renderList}],execute:(function(){const c={components:{LimitsBar:x},props:{type:{default:"tlm",validator:function(r){return["cmd","tlm"].indexOf(r)!==-1}},targetName:{type:String,default:null},packetName:{type:String,default:null},itemName:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue"],data(){return{details:Object,available:null,updater:null,rawValue:null,convertedValue:null,formattedValue:null,currentLimitsState:null}},computed:{show:{get(){return this.modelValue},set(r){this.$emit("update:modelValue",r)}},limitsColor(){return E(this.currentLimitsState)},astroStatus(){return B(this.limitsColor)},limitsColorClass(){return this.limitsColor?"openc3-"+this.limitsColor:""}},watch:{modelValue:function(r,a){r?(this.requestDetails(),this.type==="tlm"&&(this.updater=setInterval(()=>{this.available&&this.details&&this.api.get_tlm_values(this.available).then(_=>{for(let b of _){let i=null;if(b[0].json_class==="String"&&b[0].raw!==void 0?i=b[0].raw:this.details.data_type==="BLOCK"&&(i=b[0]),i!==null){i=i.slice(0,Number.parseInt(this.details.bit_size)/8);let m=!1;i.length>64&&(m=!0),b[0]=Array.from(i.slice(0,64),function(v){return v===" "?"20":("0"+(v&255).toString(16)).slice(-2)}).join(" ").toUpperCase(),m&&(b[0]+="...")}}this.details.data_type.includes("INT")&&!this.details.array_size?this.rawValue=`${_[0][0]} (0x${_[0][0].toString(16).toUpperCase()})`:this.rawValue=_[0][0],this.convertedValue=_[1][0],this.formattedValue=_[2][0],this.currentLimitsState=_[1][1]})},1e3))):(clearInterval(this.updater),this.updater=null)}},created(){this.api=new L},beforeUnmount(){clearInterval(this.updater),this.updater=null},methods:{hasLimits(r){let a=!1;return r.limits.DEFAULT&&(a=!0),r.states&&Object.getOwnPropertyNames(r.states).forEach(_=>{r.states[_].color&&(a=!0)}),a},async requestDetails(){this.type==="tlm"?this.api.get_tlm_available([`${this.targetName}__${this.packetName}__${this.itemName}__RAW`,`${this.targetName}__${this.packetName}__${this.itemName}__CONVERTED`,`${this.targetName}__${this.packetName}__${this.itemName}__FORMATTED`]).then(r=>{r&&r.length>0&&(this.available=r),this.api.get_item(this.targetName,this.packetName,this.itemName).then(a=>{this.details=a,this.hasLimits(a)||(this.details.limits=null)})}):this.api.get_parameter(this.targetName,this.packetName,this.itemName).then(r=>{this.details=r})},async changeLimitsEnabled(){this.details.limits.enabled?await this.api.enable_limits(this.targetName,this.packetName,this.itemName):await this.api.disable_limits(this.targetName,this.packetName,this.itemName)},formatLimit(r){return r.hasOwnProperty("green_low")?"RL/"+r.red_low+" YL/"+r.yellow_low+" YH/"+r.yellow_high+" RH/"+r.red_high+" GL/"+r.green_low+" GH/"+r.green_high:r.hasOwnProperty("red_low")?"RL/"+r.red_low+" YL/"+r.yellow_low+" YH/"+r.yellow_high+" RH/"+r.red_high:r}}},$={key:5},O={key:7},R={class:"limits-text"},j={key:9};function z(r,a,_,b,i,m){const v=h("v-spacer"),F=h("v-toolbar"),U=h("v-card-title"),I=h("v-card-subtitle"),l=h("v-col"),o=h("v-row"),C=h("rux-status"),T=h("v-switch"),M=h("LimitsBar"),A=h("v-container"),H=h("v-card-text"),P=h("v-card"),Y=h("v-dialog");return u(),d(Y,{modelValue:m.show,"onUpdate:modelValue":a[1]||(a[1]=g=>m.show=g),width:"700"},{default:e(()=>[t(P,null,{default:e(()=>[t(F,{height:24},{default:e(()=>[t(v),a[2]||(a[2]=w("span",null," Details ",-1)),t(v)]),_:1}),t(U,null,{default:e(()=>[s(n(_.targetName)+" "+n(_.packetName)+" "+n(_.itemName),1)]),_:1}),t(I,null,{default:e(()=>[s(n(i.details.description),1)]),_:1}),t(H,null,{default:e(()=>[t(A,{fluid:""},{default:e(()=>[_.type==="tlm"?(u(),d(o,{key:0,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[3]||(a[3]=[s("Item Values",-1)])]),_:1}),t(l)]),_:1})):f("",!0),t(o,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[4]||(a[4]=[s("Raw Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),d(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.rawValue),1)]),_:1},8,["class"])]),_:1}),t(o,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[5]||(a[5]=[s("Converted Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),d(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.convertedValue),1)]),_:1},8,["class"])]),_:1}),t(o,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[6]||(a[6]=[s("Formatted Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),d(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.formattedValue),1)]),_:1},8,["class"])]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[7]||(a[7]=[s("Bit Offset",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.bit_offset),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[8]||(a[8]=[s("Bit Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.bit_size),1)]),_:1})]),_:1}),i.details.array_size?(u(),d(o,{key:1,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[9]||(a[9]=[s("Array Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.array_size),1)]),_:1})]),_:1})):f("",!0),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[10]||(a[10]=[s("Data Type",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.data_type),1)]),_:1})]),_:1}),_.type==="cmd"?(u(),d(o,{key:2,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[11]||(a[11]=[s("Minimum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.minimum),1)]),_:1})]),_:1})):f("",!0),_.type==="cmd"?(u(),d(o,{key:3,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[12]||(a[12]=[s("Maximum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.maximum),1)]),_:1})]),_:1})):f("",!0),_.type==="cmd"?(u(),d(o,{key:4,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[13]||(a[13]=[s("Default",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.default),1)]),_:1})]),_:1})):f("",!0),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[14]||(a[14]=[s("Format String",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.format_string),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[15]||(a[15]=[s("Read Conversion",-1)])]),_:1}),i.details.read_conversion?(u(),d(l,{key:0},{default:e(()=>[s(" Class: "+n(i.details.read_conversion.class)+" ",1),a[16]||(a[16]=w("br",null,null,-1)),s(" Params: "+n(i.details.read_conversion.params),1)]),_:1})):(u(),d(l,{key:1}))]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[17]||(a[17]=[s("Write Conversion",-1)])]),_:1}),i.details.write_conversion?(u(),d(l,{key:0},{default:e(()=>[s(" Class: "+n(i.details.write_conversion.class)+" ",1),a[18]||(a[18]=w("br",null,null,-1)),s(" Params: "+n(i.details.write_conversion.params),1)]),_:1})):(u(),d(l,{key:1}))]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[19]||(a[19]=[s("Id Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.id_value),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[20]||(a[20]=[s("Units Full",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.units_full),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[21]||(a[21]=[s("Units Abbr",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.units),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[22]||(a[22]=[s("Endianness",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.endianness),1)]),_:1})]),_:1}),i.details.states?(u(),p("div",$,[t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[23]||(a[23]=[s("States",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.states,(g,y)=>(u(),d(o,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024),t(l,null,{default:e(()=>[s(n(g.value),1)]),_:2},1024)]),_:2},1024))),128))])):(u(),d(o,{key:6,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[24]||(a[24]=[s("States",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[25]||(a[25]=[s("None",-1)])]),_:1})]),_:1})),i.details.limits?(u(),p("div",O,[t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[26]||(a[26]=[s("Limits",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.limits,(g,y)=>(u(),d(o,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),y==="enabled"?(u(),d(l,{key:0,cols:"4",class:"label"},{default:e(()=>[...a[27]||(a[27]=[s("Enabled",-1)])]),_:1})):f("",!0),y==="enabled"?(u(),d(T,{key:1,modelValue:i.details.limits.enabled,"onUpdate:modelValue":[a[0]||(a[0]=q=>i.details.limits.enabled=q),m.changeLimitsEnabled],density:"compact",color:"primary",class:"compact-switch","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])):f("",!0),y!=="enabled"?(u(),d(l,{key:2,cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024)):f("",!0),y!=="enabled"?(u(),d(l,{key:3},{default:e(()=>[w("div",R,n(m.formatLimit(g)),1),g.red_low!==void 0?(u(),d(M,{key:0,"red-low":g.red_low,"yellow-low":g.yellow_low,"yellow-high":g.yellow_high,"red-high":g.red_high,"green-low":g.green_low,"green-high":g.green_high,value:i.convertedValue,width:300,height:22},null,8,["red-low","yellow-low","yellow-high","red-high","green-low","green-high","value"])):f("",!0)]),_:2},1024)):f("",!0)]),_:2},1024))),128))])):(u(),d(o,{key:8,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[28]||(a[28]=[s("Limits",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[29]||(a[29]=[s("None",-1)])]),_:1})]),_:1})),i.details.meta?(u(),p("div",j,[t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[30]||(a[30]=[s("Meta",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.meta,(g,y)=>(u(),d(o,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024),t(l,null,{default:e(()=>[s(n(g.join(", ")),1)]),_:2},1024)]),_:2},1024))),128))])):(u(),d(o,{key:10,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[31]||(a[31]=[s("Meta",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[32]||(a[32]=[s("None",-1)])]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const W=D("Z",S(c,[["render",z],["__scopeId","data-v-36b55cdd"]]))})}}));
@@ -1 +1 @@
1
- System.register(["vue","./main-07b38629281328ace40e.js","vue-router","pinia","single-spa","vuetify"],(function(u,p){"use strict";var n,r,o,i,s,a;return{setters:[e=>{n=e.openBlock,r=e.createBlock,o=e.resolveDynamicComponent,i=e.normalizeProps,s=e.guardReactiveProps},e=>{a=e.f},null,null,null,null],execute:(function(){const e={props:{name:{type:String,default:null}},data(){return{widgetType:null}},computed:{url:function(){return`${window.location.origin}/tools/widgets/${this.name}/${this.name}.umd.min.js`}},async mounted(){try{this.widgetType=await System.import(this.url)}catch(t){throw new Error(`Unknown widget: ${this.name}: ${t}`)}}};function l(t,d,g,w,c,y){return n(),r(o(c.widgetType),i(s({...t.$props,...t.$attrs})),null,16)}const m=u("default",a(e,[["render",l]]))})}}));
1
+ System.register(["vue","./main-41bf9e8be1fa8f271a59.js","vue-router","pinia","single-spa","vuetify"],(function(u,p){"use strict";var n,r,i,o,s,a;return{setters:[e=>{n=e.openBlock,r=e.createBlock,i=e.resolveDynamicComponent,o=e.normalizeProps,s=e.guardReactiveProps},e=>{a=e.i},null,null,null,null],execute:(function(){const e={props:{name:{type:String,default:null}},data(){return{widgetType:null}},computed:{url:function(){return`${window.location.origin}/tools/widgets/${this.name}/${this.name}.umd.min.js`}},async mounted(){try{this.widgetType=await System.import(this.url)}catch(t){throw new Error(`Unknown widget: ${this.name}: ${t}`)}}};function l(t,d,g,w,c,y){return n(),r(i(c.widgetType),o(s({...t.$props,...t.$attrs})),null,16)}const m=u("default",a(e,[["render",l]]))})}}));
@@ -1 +1 @@
1
- System.register(["./main-07b38629281328ace40e.js","./Widget-D_HaosJK-3aa019608f819cd93c9a.js","vue","vue-router","pinia","single-spa","vuetify"],(function(S,K){"use strict";var C,g,y,c,u,x,v,i,r,m,n,p,f,w,k,E,_;return{setters:[t=>{C=t.f,g=t.u},t=>{y=t.h},t=>{c=t.resolveComponent,u=t.openBlock,x=t.createBlock,v=t.normalizeStyle,i=t.withCtx,r=t.createVNode,m=t.createElementVNode,n=t.toDisplayString,p=t.createElementBlock,f=t.Fragment,w=t.renderList,k=t.createTextVNode,E=t.normalizeClass,_=t.createCommentVNode},null,null,null,null],execute:(function(){const t={mixins:[y],data(){return{files:[],loading:!1}},computed:{match(){if(this.files.some(s=>s.error))return!1;if(this.files.some(s=>!s.checksum))return null;const e=this.files[0].checksum;return this.files.every(s=>s.checksum===e)},matchStatus(){return{null:{icon:"$info",color:"grey",text:"Comparing..."},true:{icon:"$success",color:"success",text:"Checksums Match"},false:{icon:"$error",color:"error",text:this.files.some(e=>e.error)?"Error loading file(s)":"Checksums Do Not Match"}}[this.match]}},created(){this.files=this.parameters.filter(e=>e).map(e=>({path:e,checksum:null,error:null,copied:!1}))},mounted(){this.files.length&&this.fetchChecksums()},methods:{getDisplayText(e){return e.error?`Error: ${e.error}`:e.checksum?e.checksum:this.loading?"Loading...":"Not loaded"},async computeChecksum(e){const s=new TextEncoder().encode(e),l=await crypto.subtle.digest("SHA-256",s);return Array.from(new Uint8Array(l)).map(o=>o.toString(16).padStart(2,"0")).join("")},async fetchFile(e){const s=window.openc3Scope||"DEFAULT";let l=`${s}/targets_modified/${e}`,o=await g.get(`/openc3-api/storage/download_file/${encodeURIComponent(l)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"},headers:{"Ignore-Errors":"404,500"}}).catch(()=>null);if((!o||o.status===404)&&(l=`${s}/targets/${e}`,o=await g.get(`/openc3-api/storage/download_file/${encodeURIComponent(l)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"}})),o?.data?.contents)return atob(o.data.contents);throw new Error("File not found")},async copyChecksum(e){if(e.checksum)try{await navigator.clipboard.writeText(e.checksum),e.copied=!0,setTimeout(()=>e.copied=!1,2e3)}catch(s){console.error("Failed to copy checksum:",s)}},async fetchChecksums(){this.loading=!0,this.files.forEach(e=>{e.checksum=null,e.error=null}),(await Promise.all(this.files.map(e=>this.fetchFile(e.path).then(s=>this.computeChecksum(s)).catch(s=>({error:s.message||"File not found"}))))).forEach((e,s)=>{e?.error?this.files[s].error=e.error:this.files[s].checksum=e}),this.loading=!1}}},$={class:"text-caption text-medium-emphasis font-weight-regular"},T={class:"text-caption text-medium-emphasis mb-2"},V={class:"ml-1 text-high-emphasis"},z={class:"flex-grow-1 overflow-wrap-anywhere"};function B(e,s,l,o,d,h){const D=c("v-spacer"),b=c("v-btn"),U=c("v-card-title"),F=c("v-divider"),I=c("v-sheet"),L=c("v-chip"),O=c("v-card-text"),A=c("v-card");return u(),x(A,{style:v(e.computedStyle),"min-width":"400"},{default:i(()=>[r(U,{class:"d-flex align-center pa-2"},{default:i(()=>[m("span",$,n(d.files.length===1?"File Checksum":"File Checksum Comparison"),1),r(D),r(b,{size:"x-small",icon:"mdi-refresh",variant:"text",loading:d.loading,onClick:h.fetchChecksums},null,8,["loading","onClick"])]),_:1}),r(F),r(O,{class:"pa-3"},{default:i(()=>[(u(!0),p(f,null,w(d.files,(a,N)=>(u(),p(f,{key:N},[m("div",T,[k(n(d.files.length===1?"File:":`File ${N+1}:`)+" ",1),m("span",V,n(a.path),1)]),r(I,{class:E([a.error?"text-error":"","d-flex align-center ga-2 px-2 py-1 mb-3 rounded text-caption"]),style:{"background-color":"rgba(128, 128, 128, 0.2)"}},{default:i(()=>[m("span",z,n(h.getDisplayText(a)),1),r(b,{icon:a.copied?"$success":"mdi-content-copy",color:a.copied?"success":void 0,disabled:!a.checksum,size:"x-small",variant:"plain",density:"compact",onClick:P=>h.copyChecksum(a)},null,8,["icon","color","disabled","onClick"])]),_:2},1032,["class"])],64))),128)),d.files.length>1?(u(),p(f,{key:0},[r(F,{class:"mb-3"}),r(L,{color:h.matchStatus.color,size:"small",variant:"tonal",label:"","prepend-icon":h.matchStatus.icon},{default:i(()=>[k(n(h.matchStatus.text),1)]),_:1},8,["color","prepend-icon"])],64)):_("",!0)]),_:1})]),_:1},8,["style"])}const j=S("default",C(t,[["render",B],["__scopeId","data-v-5728d932"]]))})}}));
1
+ System.register(["./main-41bf9e8be1fa8f271a59.js","./Widget-CtYQauzA-76c2f5fd2351d284a46d.js","vue","vue-router","pinia","single-spa","vuetify"],(function(S,j){"use strict";var C,g,y,c,u,x,v,i,r,m,n,p,f,w,k,E,b;return{setters:[t=>{C=t.i,g=t.D},t=>{y=t.h},t=>{c=t.resolveComponent,u=t.openBlock,x=t.createBlock,v=t.normalizeStyle,i=t.withCtx,r=t.createVNode,m=t.createElementVNode,n=t.toDisplayString,p=t.createElementBlock,f=t.Fragment,w=t.renderList,k=t.createTextVNode,E=t.normalizeClass,b=t.createCommentVNode},null,null,null,null],execute:(function(){const t={mixins:[y],data(){return{files:[],loading:!1}},computed:{match(){if(this.files.some(s=>s.error))return!1;if(this.files.some(s=>!s.checksum))return null;const e=this.files[0].checksum;return this.files.every(s=>s.checksum===e)},matchStatus(){return{null:{icon:"$info",color:"grey",text:"Comparing..."},true:{icon:"$success",color:"success",text:"Checksums Match"},false:{icon:"$error",color:"error",text:this.files.some(e=>e.error)?"Error loading file(s)":"Checksums Do Not Match"}}[this.match]}},created(){this.files=this.parameters.filter(e=>e).map(e=>({path:e,checksum:null,error:null,copied:!1}))},mounted(){this.files.length&&this.fetchChecksums()},methods:{getDisplayText(e){return e.error?`Error: ${e.error}`:e.checksum?e.checksum:this.loading?"Loading...":"Not loaded"},async computeChecksum(e){const s=new TextEncoder().encode(e),l=await crypto.subtle.digest("SHA-256",s);return Array.from(new Uint8Array(l)).map(o=>o.toString(16).padStart(2,"0")).join("")},async fetchFile(e){const s=window.openc3Scope||"DEFAULT";let l=`${s}/targets_modified/${e}`,o=await g.get(`/openc3-api/storage/download_file/${encodeURIComponent(l)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"},headers:{"Ignore-Errors":"404,500"}}).catch(()=>null);if((!o||o.status===404)&&(l=`${s}/targets/${e}`,o=await g.get(`/openc3-api/storage/download_file/${encodeURIComponent(l)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"}})),o?.data?.contents)return atob(o.data.contents);throw new Error("File not found")},async copyChecksum(e){if(e.checksum)try{await navigator.clipboard.writeText(e.checksum),e.copied=!0,setTimeout(()=>e.copied=!1,2e3)}catch(s){console.error("Failed to copy checksum:",s)}},async fetchChecksums(){this.loading=!0,this.files.forEach(e=>{e.checksum=null,e.error=null}),(await Promise.all(this.files.map(e=>this.fetchFile(e.path).then(s=>this.computeChecksum(s)).catch(s=>({error:s.message||"File not found"}))))).forEach((e,s)=>{e?.error?this.files[s].error=e.error:this.files[s].checksum=e}),this.loading=!1}}},$={class:"text-caption text-medium-emphasis font-weight-regular"},T={class:"text-caption text-medium-emphasis mb-2"},z={class:"ml-1 text-high-emphasis"},D={class:"flex-grow-1 overflow-wrap-anywhere"};function V(e,s,l,o,d,h){const B=c("v-spacer"),_=c("v-btn"),U=c("v-card-title"),F=c("v-divider"),I=c("v-sheet"),A=c("v-chip"),L=c("v-card-text"),O=c("v-card");return u(),x(O,{style:v(e.computedStyle),"min-width":"400"},{default:i(()=>[r(U,{class:"d-flex align-center pa-2"},{default:i(()=>[m("span",$,n(d.files.length===1?"File Checksum":"File Checksum Comparison"),1),r(B),r(_,{size:"x-small",icon:"mdi-refresh",variant:"text",loading:d.loading,onClick:h.fetchChecksums},null,8,["loading","onClick"])]),_:1}),r(F),r(L,{class:"pa-3"},{default:i(()=>[(u(!0),p(f,null,w(d.files,(a,N)=>(u(),p(f,{key:N},[m("div",T,[k(n(d.files.length===1?"File:":`File ${N+1}:`)+" ",1),m("span",z,n(a.path),1)]),r(I,{class:E([a.error?"text-error":"","d-flex align-center ga-2 px-2 py-1 mb-3 rounded text-caption"]),style:{"background-color":"rgba(128, 128, 128, 0.2)"}},{default:i(()=>[m("span",D,n(h.getDisplayText(a)),1),r(_,{icon:a.copied?"$success":"mdi-content-copy",color:a.copied?"success":void 0,disabled:!a.checksum,size:"x-small",variant:"plain",density:"compact",onClick:P=>h.copyChecksum(a)},null,8,["icon","color","disabled","onClick"])]),_:2},1032,["class"])],64))),128)),d.files.length>1?(u(),p(f,{key:0},[r(F,{class:"mb-3"}),r(A,{color:h.matchStatus.color,size:"small",variant:"tonal",label:"","prepend-icon":h.matchStatus.icon},{default:i(()=>[k(n(h.matchStatus.text),1)]),_:1},8,["color","prepend-icon"])],64)):b("",!0)]),_:1})]),_:1},8,["style"])}const K=S("default",C(t,[["render",V],["__scopeId","data-v-5728d932"]]))})}}));
@@ -1 +1 @@
1
- System.register(["./main-07b38629281328ace40e.js","./Widget-D_HaosJK-3aa019608f819cd93c9a.js","vue","vue-router","pinia","single-spa","vuetify"],(function(y,b){"use strict";var d,n,c,f,i,p,u,l,a,s,h,m;return{setters:[t=>{d=t.f,n=t.u,c=t.m},t=>{f=t.h},t=>{i=t.resolveComponent,p=t.openBlock,u=t.createBlock,l=t.normalizeStyle,a=t.withCtx,s=t.createVNode,h=t.createElementVNode,m=t.toDisplayString},null,null,null,null],execute:(function(){const t={mixins:[f],data(){return{filePath:"",fileContent:"Loading...",loading:!1,width:600,height:300,editor:null}},computed:{contentStyle(){return{width:this.width+"px",height:this.height+"px"}},aceMode(){const e=this.filePath.split(".").pop()?.toLowerCase();return{json:"ace/mode/json",rb:"ace/mode/ruby",py:"ace/mode/python",txt:"ace/mode/text"}[e]||"ace/mode/text"}},created(){this.parameters[0]&&(this.filePath=this.parameters[0]),this.parameters[1]&&(this.width=Number.parseInt(this.parameters[1])),this.parameters[2]&&(this.height=Number.parseInt(this.parameters[2]))},mounted(){this.editor=c.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.setReadOnly(!0),this.editor.setShowPrintMargin(!1),this.editor.setHighlightActiveLine(!1),this.editor.renderer.setShowGutter(!1),this.editor.renderer.setScrollMargin(8,8,0,0),this.editor.renderer.setPadding(8),this.editor.setValue(this.fileContent,-1),this.filePath&&this.fetchFile()},beforeUnmount(){this.editor&&(this.editor.destroy(),this.editor.container.remove())},methods:{updateEditor(){this.editor&&(this.editor.session.setMode(this.aceMode),this.editor.setValue(this.fileContent,-1))},async fetchFile(){if(!this.filePath){this.fileContent='Error: No file path specified. Usage: FILEDISPLAY "TARGET/path/to/file.txt"',this.updateEditor();return}this.loading=!0;try{const e=window.openc3Scope||"DEFAULT";let o=`${e}/targets_modified/${this.filePath}`,r=await n.get(`/openc3-api/storage/download_file/${encodeURIComponent(o)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"},headers:{"Ignore-Errors":"404,500"}}).catch(()=>null);(!r||r.status===404)&&(o=`${e}/targets/${this.filePath}`,r=await n.get(`/openc3-api/storage/download_file/${encodeURIComponent(o)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"}})),r?.data?.contents?this.fileContent=atob(r.data.contents):this.fileContent="Error: Could not load file"}catch(e){this.fileContent=`Error: ${e.message||e}`}finally{this.loading=!1,this.updateEditor()}}}},v={class:"text-caption text-medium-emphasis font-weight-regular"};function w(e,o,r,k,g,C){const E=i("v-spacer"),x=i("v-btn"),P=i("v-card-title"),S=i("v-divider"),_=i("v-card-text"),N=i("v-card");return p(),u(N,{style:l(e.computedStyle)},{default:a(()=>[s(P,{class:"d-flex align-center pa-2"},{default:a(()=>[h("span",v,m(g.filePath),1),s(E),s(x,{size:"x-small",icon:"mdi-refresh",variant:"text",loading:g.loading,onClick:C.fetchFile},null,8,["loading","onClick"])]),_:1}),s(S),s(_,{class:"pa-0"},{default:a(()=>[h("div",{ref:"editor",style:l(C.contentStyle)},null,4)]),_:1})]),_:1},8,["style"])}const I=y("default",d(t,[["render",w]]))})}}));
1
+ System.register(["./main-41bf9e8be1fa8f271a59.js","./Widget-CtYQauzA-76c2f5fd2351d284a46d.js","vue","vue-router","pinia","single-spa","vuetify"],(function(y,b){"use strict";var d,n,c,p,i,f,u,l,a,s,h,m;return{setters:[t=>{d=t.i,n=t.D,c=t.m},t=>{p=t.h},t=>{i=t.resolveComponent,f=t.openBlock,u=t.createBlock,l=t.normalizeStyle,a=t.withCtx,s=t.createVNode,h=t.createElementVNode,m=t.toDisplayString},null,null,null,null],execute:(function(){const t={mixins:[p],data(){return{filePath:"",fileContent:"Loading...",loading:!1,width:600,height:300,editor:null}},computed:{contentStyle(){return{width:this.width+"px",height:this.height+"px"}},aceMode(){const e=this.filePath.split(".").pop()?.toLowerCase();return{json:"ace/mode/json",rb:"ace/mode/ruby",py:"ace/mode/python",txt:"ace/mode/text"}[e]||"ace/mode/text"}},created(){this.parameters[0]&&(this.filePath=this.parameters[0]),this.parameters[1]&&(this.width=Number.parseInt(this.parameters[1])),this.parameters[2]&&(this.height=Number.parseInt(this.parameters[2]))},mounted(){this.editor=c.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.setReadOnly(!0),this.editor.setShowPrintMargin(!1),this.editor.setHighlightActiveLine(!1),this.editor.renderer.setShowGutter(!1),this.editor.renderer.setScrollMargin(8,8,0,0),this.editor.renderer.setPadding(8),this.editor.setValue(this.fileContent,-1),this.filePath&&this.fetchFile()},beforeUnmount(){this.editor&&(this.editor.destroy(),this.editor.container.remove())},methods:{updateEditor(){this.editor&&(this.editor.session.setMode(this.aceMode),this.editor.setValue(this.fileContent,-1))},async fetchFile(){if(!this.filePath){this.fileContent='Error: No file path specified. Usage: FILEDISPLAY "TARGET/path/to/file.txt"',this.updateEditor();return}this.loading=!0;try{const e=window.openc3Scope||"DEFAULT";let o=`${e}/targets_modified/${this.filePath}`,r=await n.get(`/openc3-api/storage/download_file/${encodeURIComponent(o)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"},headers:{"Ignore-Errors":"404,500"}}).catch(()=>null);(!r||r.status===404)&&(o=`${e}/targets/${this.filePath}`,r=await n.get(`/openc3-api/storage/download_file/${encodeURIComponent(o)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"}})),r?.data?.contents?this.fileContent=atob(r.data.contents):this.fileContent="Error: Could not load file"}catch(e){this.fileContent=`Error: ${e.message||e}`}finally{this.loading=!1,this.updateEditor()}}}},v={class:"text-caption text-medium-emphasis font-weight-regular"};function w(e,o,r,k,g,C){const E=i("v-spacer"),x=i("v-btn"),P=i("v-card-title"),S=i("v-divider"),N=i("v-card-text"),_=i("v-card");return f(),u(_,{style:l(e.computedStyle)},{default:a(()=>[s(P,{class:"d-flex align-center pa-2"},{default:a(()=>[h("span",v,m(g.filePath),1),s(E),s(x,{size:"x-small",icon:"mdi-refresh",variant:"text",loading:g.loading,onClick:C.fetchFile},null,8,["loading","onClick"])]),_:1}),s(S),s(N,{class:"pa-0"},{default:a(()=>[h("div",{ref:"editor",style:l(C.contentStyle)},null,4)]),_:1})]),_:1},8,["style"])}const I=y("default",d(t,[["render",w]]))})}}));
@@ -1 +1 @@
1
- System.register(["./Widget-D_HaosJK-3aa019608f819cd93c9a.js","./ValueWidget-B1aGUBP7-09e3a422caa4029a7a89.js","vue","./main-07b38629281328ace40e.js","./DetailsDialog-F4KgYM6m-127f043574676725c73b.js","./LimitsBar-D5IZu7eX-f245aa3388489b985719.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","single-spa","./VWidget-oMbywhLA-48cc5e9eee33d428a035.js","vue-router","pinia","vuetify"],(function(u,h){"use strict";var s,r,n,a,i,l,o,c,m;return{setters:[e=>{s=e.h},e=>{r=e.default},e=>{n=e.resolveComponent,a=e.openBlock,i=e.createElementBlock,l=e.normalizeStyle,o=e.createVNode,c=e.mergeProps},e=>{m=e.f},null,null,null,null,null,null,null,null],execute:(function(){const p={components:{ValueWidget:r},mixins:[s],computed:{getParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[4]]}},created(){this.setWidth(Number.parseInt(this.parameters[5])+4,"ch",16);const t=this.parameters[3];t&&/%-?#?\d*[xXo]/.test(t)&&this.appliedSettings.push(["RAW","font-family","monospace"])}};function g(t,B,y,j,S,d){const f=n("value-widget");return a(),i("div",{ref:"container",class:"d-flex flex-row",style:l(t.computedStyle)},[o(f,c(t.$attrs,{parameters:d.getParameters,settings:t.appliedSettings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"format-string":t.parameters[3]}),null,16,["parameters","settings","screen-values","screen-time-zone","format-string"])],4)}const v=u("default",m(p,[["render",g]]))})}}));
1
+ System.register(["./Widget-CtYQauzA-76c2f5fd2351d284a46d.js","./ValueWidget-CAkuc_w_-2b53466b187c41951b84.js","vue","./main-41bf9e8be1fa8f271a59.js","./DetailsDialog-DE7lK17G-1e75cb2f380dac93676b.js","./LimitsBar-DN1s8-MS-d2e697ee1f1bfe976c50.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","single-spa","./VWidget-5qOYva88-12e30dc2b776a8df555a.js","vue-router","pinia","vuetify"],(function(m,h){"use strict";var s,r,n,a,i,l,o,c,u;return{setters:[e=>{s=e.h},e=>{r=e.default},e=>{n=e.resolveComponent,a=e.openBlock,i=e.createElementBlock,l=e.normalizeStyle,o=e.createVNode,c=e.mergeProps},e=>{u=e.i},null,null,null,null,null,null,null,null],execute:(function(){const p={components:{ValueWidget:r},mixins:[s],computed:{getParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[4]]}},created(){this.setWidth(Number.parseInt(this.parameters[5])+4,"ch",16);const t=this.parameters[3];t&&/%-?#?\d*[xXo]/.test(t)&&this.appliedSettings.push(["RAW","font-family","monospace"])}};function g(t,j,y,B,S,d){const f=n("value-widget");return a(),i("div",{ref:"container",class:"d-flex flex-row",style:l(t.computedStyle)},[o(f,c(t.$attrs,{parameters:d.getParameters,settings:t.appliedSettings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"format-string":t.parameters[3]}),null,16,["parameters","settings","screen-values","screen-time-zone","format-string"])],4)}const v=m("default",u(p,[["render",g]]))})}}));