openc3-cosmos-tool-limitsmonitor 7.2.1 → 7.3.0

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 (104) hide show
  1. checksums.yaml +4 -4
  2. data/tools/limitsmonitor/ArrayWidget-5XQXgMtp-fcce0cf5f6c759f865d5.js +2 -0
  3. data/tools/limitsmonitor/{ArrayplotWidget-fdXLhGAl-e3e7143acc3764969eb8.js → ArrayplotWidget-pk7OINvA-f4e9b428dc6aec5cf9f2.js} +1 -1
  4. data/tools/limitsmonitor/{BarColumn-Bb305iCi-79a8ef39781f64eed269.js → BarColumn-JQ552zb0-aae2ad8d5b2e0f4e365a.js} +1 -1
  5. data/tools/limitsmonitor/BlockWidget-B_5TnoG_-bf834aae199a9b2b514f.js +2 -0
  6. data/tools/limitsmonitor/ButtonWidget-CiZGNEls-e1ed243c1e07893e0105.js +1 -0
  7. data/tools/limitsmonitor/{CanvasWidget-BRdVWln5-9f7157d343603431edf8.js → CanvasWidget-CzLQAoHY-faa1c97488a411353f87.js} +1 -1
  8. data/tools/limitsmonitor/CanvasdotWidget-CcI1HwAp-3e87015d6824f083174b.js +1 -0
  9. data/tools/limitsmonitor/{CanvasimageWidget-Czbq1GuF-f539316f0133f2bef6b5.js → CanvasimageWidget-CYg1rKr_-a6269d6acf8bd8f9ea84.js} +1 -1
  10. data/tools/limitsmonitor/{CanvasimagevalueWidget-DKt5JgEt-c5196e1871b66cf9d57c.js → CanvasimagevalueWidget-e0p2honY-cbadd273933f3e4e095b.js} +1 -1
  11. data/tools/limitsmonitor/CanvaslabelWidget-CgECf4wH-90c06032af0dfbeffffa.js +1 -0
  12. data/tools/limitsmonitor/{CanvaslabelvalueWidget-BhzvZVfD-aa0d4185d816f4865b21.js → CanvaslabelvalueWidget-bCIPWE4c-6dd9d7cf851187e18414.js} +1 -1
  13. data/tools/limitsmonitor/CanvaslineWidget-Tw1B6RTA-9302d858bc19d6bda595.js +1 -0
  14. data/tools/limitsmonitor/{CanvaslinevalueWidget-ihI97G8T-6f45568d902f0134ec2d.js → CanvaslinevalueWidget-GvTic9rq-a4a1820aabb941f4100f.js} +1 -1
  15. data/tools/limitsmonitor/CheckbuttonWidget-DV6xeneq-3cfc04f24018886b17ec.js +1 -0
  16. data/tools/limitsmonitor/{ComboboxWidget-CuuvOL9K-862f7959f350ba49cdb0.js → ComboboxWidget-BO31bWzg-69012695cdc93130200e.js} +1 -1
  17. data/tools/limitsmonitor/DateWidget-DYviZFhJ-8de9557099a943d9661b.js +1 -0
  18. data/tools/limitsmonitor/{DetailsDialog-DE7lK17G-9523ea864df66f3e37b8.js → DetailsDialog-DHi4t3xd-1ef92e48ab12763f0ab3.js} +1 -1
  19. data/tools/limitsmonitor/DynamicWidget-BuSbQVhf-c1660eac308a488409c9.js +1 -0
  20. data/tools/limitsmonitor/{FilechecksumWidget-DRnOt_UE-3e9b2eceec5b977e23ef.js → FilechecksumWidget-rJe1KvzY-133133d173807b5584b1.js} +1 -1
  21. data/tools/limitsmonitor/{FiledisplayWidget-26R46EjS-35b87dcf07a7d95cd83e.js → FiledisplayWidget-CbTWgtBy-f1ef6e34b0a535af16b7.js} +1 -1
  22. data/tools/limitsmonitor/{FormatvalueWidget-BxyscMJc-8302b4d5003f49a8185b.js → FormatvalueWidget-B9Giwzaz-0cd39de110ae59025f08.js} +1 -1
  23. data/tools/limitsmonitor/{Graph-BKw7xw1a-820676b2302713d6d67b.js → Graph-xc7TNnsk-cc150d126b32fc967a14.js} +1 -1
  24. data/tools/limitsmonitor/{GraphWidget-Cs9mvqUu-efd9e594ef7300c72bb5.js → GraphWidget-COvVOlEn-8144809d5f19f42688e6.js} +1 -1
  25. data/tools/limitsmonitor/{HorizontalWidget-fWLFj7Kg-43f4c63ce87b9db74f2e.js → HorizontalWidget-BfdjRLGe-7a92892648718f404fa9.js} +1 -1
  26. data/tools/limitsmonitor/{HorizontalboxWidget-DEaXhKEz-8f75b9c9c74784f871f1.js → HorizontalboxWidget-B1b9uNaB-135d69a074bd69c217e5.js} +1 -1
  27. data/tools/limitsmonitor/HorizontallineWidget-CHz4o6Gi-f751a8c78408258afd62.js +1 -0
  28. data/tools/limitsmonitor/{IframeWidget-B143k4lo-769d74848916e51582f6.js → IframeWidget-BCtrIgD1-d330c5b97a267c4e5619.js} +1 -1
  29. data/tools/limitsmonitor/{ImageLoader-BCpmQHIl-3d08c803417ff2eb7efa.js → ImageLoader-BzE4VsHW-1e66842934d3193cc27a.js} +1 -1
  30. data/tools/limitsmonitor/{ImageviewerWidget-CLrvr6dw-a9f4ee5861fddad31f58.js → ImageviewerWidget-DKMBE3tQ-5cc438a481e2552f9b77.js} +1 -1
  31. data/tools/limitsmonitor/{LabelWidget-CA1bTX2B-503a07dc1e92e1246728.js → LabelWidget-B0nE0ImW-aee175534cb1c8bec80e.js} +1 -1
  32. data/tools/limitsmonitor/LabelledWidget-DrZHj_lR-9abf2d933313c94b4814.js +1 -0
  33. data/tools/limitsmonitor/LabelprogressbarWidget-K9NphQp0-99013bd152cb7c606df3.js +1 -0
  34. data/tools/limitsmonitor/{LabelsparklineWidget-B27xXxWg-eba195b7c33281683bc6.js → LabelsparklineWidget-cn1OJvL3-5447c7fa5c462af0d14a.js} +1 -1
  35. data/tools/limitsmonitor/LabelvalueWidget-DxJbd9nR-01bda119af8d5f7da497.js +1 -0
  36. data/tools/limitsmonitor/LabelvaluedescWidget-B-RiUnpl-8149f9b3b532f1e5d199.js +1 -0
  37. data/tools/limitsmonitor/LabelvaluelimitsbarWidget-BF94rtl8-499084eb5f870112e872.js +1 -0
  38. data/tools/limitsmonitor/LabelvaluelimitscolumnWidget-UOfPu8D1-8737af506b8ab7faa86d.js +1 -0
  39. data/tools/limitsmonitor/LabelvaluerangebarWidget-EVON-Tv8-6a1175bc807cc9dc8829.js +1 -0
  40. data/tools/limitsmonitor/{Layout--_zNJWnw-28ebd6fb99cdd03f8b49.js → Layout-BLS4Yi3m-1534ca87ca44f14d75b6.js} +1 -1
  41. data/tools/limitsmonitor/{LedWidget-D2uxHxe3-f3e4a9d7363ac51f7149.js → LedWidget-DqVfh3zJ-675b6694684b66a76bd4.js} +1 -1
  42. data/tools/limitsmonitor/{LimitsBar-DN1s8-MS-87bfe441f506b01bb80c.js → LimitsBar-BqpvMpXM-211372e59b3e42b31f9e.js} +1 -1
  43. data/tools/limitsmonitor/LimitsMonitor-1e732e237c882efb47da.js +11 -0
  44. data/tools/limitsmonitor/{LimitsbarWidget-Cqhh7LKU-a1789aa61517526bcc09.js → LimitsbarWidget-rEJIGKCx-19a0e1608f5588e39965.js} +1 -1
  45. data/tools/limitsmonitor/{LimitscolorWidget-haGB4RbY-2fa17abea5f9c3e98dee.js → LimitscolorWidget-DVXho9Mm-8bc0d3a41714cb717bf2.js} +1 -1
  46. data/tools/limitsmonitor/{LimitscolumnWidget-B1GdmlR_-9822570e890afde24370.js → LimitscolumnWidget-DSQAdlZS-dff2613c00d7d1322d15.js} +1 -1
  47. data/tools/limitsmonitor/LinegraphWidget-CQRwZ0N6-f921447a9c81fe9d82bb.js +1 -0
  48. data/tools/limitsmonitor/{MatrixbycolumnsWidget-coHlLETG-64183bbc0a247f2551a0.js → MatrixbycolumnsWidget-CJJ7SugT-548bc3e7b0a64b0e132a.js} +1 -1
  49. data/tools/limitsmonitor/{OpenC3TimePicker-B8Vu9GBz-2840b980fa4ee81bd205.js → OpenC3TimePicker-Cww9L2Ij-d378db5252fc33c748ce.js} +1 -1
  50. data/tools/limitsmonitor/{ProgressbarWidget-D_yFssIZ-235f413989eea13e8daa.js → ProgressbarWidget-VTd49uhi-0a9168bfe786aa3b811e.js} +1 -1
  51. data/tools/limitsmonitor/RadiobuttonWidget-DqsantxO-a3816b08503fbdc60a65.js +1 -0
  52. data/tools/limitsmonitor/{RadiogroupWidget-2-td69IA-8b8e486e8b57afe77bed.js → RadiogroupWidget-Bht6RZPH-71934aa229962fcb51cf.js} +1 -1
  53. data/tools/limitsmonitor/{RangebarWidget-i2mlnxys-91ae8bee9414bae8709f.js → RangebarWidget-CN11Oqws-a0eaed87ca86fc808a4d.js} +1 -1
  54. data/tools/limitsmonitor/RollupWidget-cgl9Ghle-37489f8260bb0ab14ec2.js +1 -0
  55. data/tools/limitsmonitor/{ScrollwindowWidget-BU1cRpL8-06e05520339b779b4261.js → ScrollwindowWidget-BFK-ihvZ-25b88875e6dc222d54aa.js} +1 -1
  56. data/tools/limitsmonitor/{SignalWidget-hiTkeem9-cee50ed98c4ed879dfe9.js → SignalWidget-Be7Z5pJD-b7b8daceb5b5dbf42005.js} +1 -1
  57. data/tools/limitsmonitor/SpacerWidget-uKPA-f_0-fefdd95b5999ef1c01ae.js +1 -0
  58. data/tools/limitsmonitor/SparklineWidget-Wu5iFbly-e22bc010d941da6d3540.js +1 -0
  59. data/tools/limitsmonitor/{TabbookWidget-CvL3Ozmx-128fcef17ed2c8d7806b.js → TabbookWidget-D3FrIoV4-f5e2e7cd26cd2bb8dbda.js} +1 -1
  60. data/tools/limitsmonitor/TextboxWidget-f6wEcoI0-1523d6d1dc581afd40ad.js +1 -0
  61. data/tools/limitsmonitor/TextfieldWidget-D72Sey-h-238509d2f8176b71c14d.js +1 -0
  62. data/tools/limitsmonitor/TimeWidget-BBuxr7Db-ffc52532f67573a816a2.js +1 -0
  63. data/tools/limitsmonitor/{TitleWidget-CL53vf14-9ea9713e1084b2d6b33f.js → TitleWidget-Dfp5mPH2-c2adf393b12f96f6951c.js} +1 -1
  64. data/tools/limitsmonitor/{VWidget-5qOYva88-45447a85bf7f7f3e4fc1.js → VWidget-5FjwlURU-e6be62bc11c1ee65c211.js} +1 -1
  65. data/tools/limitsmonitor/{ValueWidget-CAkuc_w_-fe817796128b0ef92a25.js → ValueWidget-CpptSOvJ-acbc6c94dce9ac279646.js} +1 -1
  66. data/tools/limitsmonitor/ValuelimitsbarWidget-AgeOlPAV-600a3e071c2811ece7fc.js +1 -0
  67. data/tools/limitsmonitor/ValuelimitscolumnWidget-CfTt7Q8a-b4b88d6fa567c7ee06d0.js +1 -0
  68. data/tools/limitsmonitor/ValuerangebarWidget-E3CtttJk-c1ad87ee4f8df1751bde.js +1 -0
  69. data/tools/limitsmonitor/{VerticalWidget-C6O0dhRU-1613f922f5d22944287f.js → VerticalWidget-B_eheXmK-ced82b4c08aaa2b5caa5.js} +1 -1
  70. data/tools/limitsmonitor/{VerticalboxWidget-B-CoqRJG-2c5328ad7974e365a15e.js → VerticalboxWidget-Bf8XJiY9-19dc4a21bf8897f7f12e.js} +1 -1
  71. data/tools/limitsmonitor/{Widget-CtYQauzA-b426b323af3e6d9eb01f.js → Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js} +1 -1
  72. data/tools/limitsmonitor/main-6be3eeb9075feedbbccc.js +1491 -0
  73. data/tools/limitsmonitor/main.js +1 -1
  74. metadata +72 -72
  75. data/tools/limitsmonitor/ArrayWidget-DMSm_P6c-758cfd44feebfe30b1e9.js +0 -2
  76. data/tools/limitsmonitor/BlockWidget-Do3W6tZh-55e450760dca098564c5.js +0 -2
  77. data/tools/limitsmonitor/ButtonWidget-DukCQt0F-2aab525a982d9af18352.js +0 -2
  78. data/tools/limitsmonitor/CanvasdotWidget-DV8PeDWz-9d294e7129956654497b.js +0 -1
  79. data/tools/limitsmonitor/CanvaslabelWidget-DW2I1ra1-c9c79d00047fa43f8198.js +0 -1
  80. data/tools/limitsmonitor/CanvaslineWidget-DsjY37tp-73c02d7eb6842bf59ee4.js +0 -1
  81. data/tools/limitsmonitor/CheckbuttonWidget-B778Z-Zo-b3ae95bf21ca511e76d5.js +0 -1
  82. data/tools/limitsmonitor/DateWidget-COvQTAeo-2a1d9352dc1f6b2b9134.js +0 -1
  83. data/tools/limitsmonitor/DynamicWidget-BuSbQVhf-0753353d5a9b32ed5e24.js +0 -1
  84. data/tools/limitsmonitor/HorizontallineWidget-Bvu1QP3S-0df33b81905630850ce1.js +0 -1
  85. data/tools/limitsmonitor/LabelledWidget-BDhvr03J-57e6858f8977a2768dc1.js +0 -1
  86. data/tools/limitsmonitor/LabelprogressbarWidget-g7A5CE8S-7d88976db7d6246d16fd.js +0 -1
  87. data/tools/limitsmonitor/LabelvalueWidget-DFn8o6LC-50a9865e818041e5c9a7.js +0 -1
  88. data/tools/limitsmonitor/LabelvaluedescWidget-BQpaxFaB-42c481ec4c983e508ff5.js +0 -1
  89. data/tools/limitsmonitor/LabelvaluelimitsbarWidget-C-z96q8z-262fe4e7c88fcca1a21f.js +0 -1
  90. data/tools/limitsmonitor/LabelvaluelimitscolumnWidget-D2TMEv9O-340d375bcaf134252046.js +0 -1
  91. data/tools/limitsmonitor/LabelvaluerangebarWidget-D99dZCjz-b47dd057dccec53dd507.js +0 -1
  92. data/tools/limitsmonitor/LimitsMonitor-939d997c957d6238d5e8.js +0 -11
  93. data/tools/limitsmonitor/LinegraphWidget-COSOQ0uM-bbe31f4b114886e74712.js +0 -1
  94. data/tools/limitsmonitor/RadiobuttonWidget-DL0jVTcb-ab3f38652aee1be60a35.js +0 -1
  95. data/tools/limitsmonitor/RollupWidget-BEJ2Icg1-7d1e13f221281dda7ce5.js +0 -1
  96. data/tools/limitsmonitor/SpacerWidget-CBmzzS_X-f79cdc38c3247a117577.js +0 -1
  97. data/tools/limitsmonitor/SparklineWidget-CizRh6QR-8f36d6d0d14e9b0f305e.js +0 -1
  98. data/tools/limitsmonitor/TextboxWidget-BtEwXzDO-cbf3f2de95e4c365c5ce.js +0 -1
  99. data/tools/limitsmonitor/TextfieldWidget-BDbb57HP-fd504ea1d7a4d99b047c.js +0 -1
  100. data/tools/limitsmonitor/TimeWidget-DzD8U8l8-8a00005bb155beb80051.js +0 -1
  101. data/tools/limitsmonitor/ValuelimitsbarWidget-Y8sO05E1-d4a8c6bcef04142d2e5f.js +0 -1
  102. data/tools/limitsmonitor/ValuelimitscolumnWidget-iOjB_fCj-2e14a684190dfecbd460.js +0 -1
  103. data/tools/limitsmonitor/ValuerangebarWidget-DsCoeAm6-b6746c170d00d5331090.js +0 -1
  104. data/tools/limitsmonitor/main-3f4adf203e54e3907c1d.js +0 -1497
@@ -1,11 +0,0 @@
1
- System.register(["./main-3f4adf203e54e3907c1d.js","vue","single-spa","./ValueWidget-CAkuc_w_-fe817796128b0ef92a25.js","./IframeWidget-B143k4lo-769d74848916e51582f6.js","./ValuelimitsbarWidget-Y8sO05E1-d4a8c6bcef04142d2e5f.js","vue-router","pinia","vuetify","./DetailsDialog-DE7lK17G-9523ea864df66f3e37b8.js","./LimitsBar-DN1s8-MS-87bfe441f506b01bb80c.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./VWidget-5qOYva88-45447a85bf7f7f3e4fc1.js","./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","./LimitsbarWidget-Cqhh7LKU-a1789aa61517526bcc09.js","./BarColumn-Bb305iCi-79a8ef39781f64eed269.js"],(function(sr,Do){"use strict";var It,nt,qe,it,Pt,Tt,S,I,N,Lt,w,g,J,Q,Z,de,ye,Nt,U,$e,Ve,ot,ae,at,jt,Dt,Ut,Ft,Bt;return{setters:[A=>{It=A.i,nt=A.F,qe=A._,it=A.R,Pt=A.a,Tt=A.k},A=>{S=A.resolveComponent,I=A.openBlock,N=A.createBlock,Lt=A.Teleport,w=A.createVNode,g=A.withCtx,J=A.createElementVNode,Q=A.toDisplayString,Z=A.createElementBlock,de=A.Fragment,ye=A.renderList,Nt=A.ref,U=A.createTextVNode,$e=A.mergeProps,Ve=A.createSlots,ot=A.normalizeStyle,ae=A.createCommentVNode,at=A.normalizeClass,jt=A.normalizeProps,Dt=A.guardReactiveProps,Ut=A.withKeys},null,A=>{Ft=A.default},null,A=>{Bt=A.default},null,null,null,null,null,null,null,null,null,null],execute:(function(){var A=document.createElement("style");A.textContent=`.footer[data-v-b6f77818]{padding-top:5px}.v-input[data-v-b6f77818]{background-color:var(--color-background-base-default)}.textfield-green[data-v-b6f77818]{color:#00c800}.textfield-yellow[data-v-b6f77818]{color:#ffdc00}.textfield-red[data-v-b6f77818]{color:#ff2d2d}.limits-table[data-v-b6f77818]{margin-top:5px;margin-bottom:10px}.limits-table[data-v-b6f77818] th{font-weight:700;background-color:var(--color-background-base-default)}.limits-table[data-v-b6f77818] .state-filtered-row{display:none}.card-height[data-v-192a6dcb]{height:calc(100vh - 150px)}
2
- /*$vite$:1*/`,document.head.appendChild(A);const rr={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(t,{emit:e}){const s=e,r=Nt(!1);function n(){r.value=!1}function o(i){return i.replaceAll(" ","-").toLowerCase()}return(i,a)=>{const l=S("v-icon"),d=S("v-btn"),u=S("v-divider"),h=S("v-list-item-title"),b=S("v-list-item"),y=S("v-list"),x=S("v-menu"),v=S("v-radio"),F=S("v-list-item-action"),f=S("v-radio-group"),_=S("v-checkbox");return I(),N(x,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=p=>r.value=p),"close-on-content-click":!1},{activator:g(({props:p})=>[w(d,$e(p,{variant:"outlined",class:"mx-1 menu-button",text:t.menu.label,"data-test":o(`${t.title} ${t.menu.label}`)}),{append:g(()=>[w(l,{class:"menu-button-icon"},{default:g(()=>[...a[1]||(a[1]=[U(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:g(()=>[w(y,null,{default:g(()=>[(I(!0),Z(de,null,ye(t.menu.items,(p,O)=>(I(),Z(de,null,[p.divider?(I(),N(u,{key:O+"-divider"})):p.subMenu&&p.subMenu.length>0?(I(),Z("div",{key:O+"-submenu"},[(I(),N(x,{key:O,"open-on-hover":"",location:"right"},{activator:g(({props:R})=>[(I(),N(b,$e({ref_for:!0},R,{key:O,disabled:p.disabled}),Ve({append:g(()=>[w(l,null,{default:g(()=>[...a[2]||(a[2]=[U(" mdi-chevron-right ",-1)])]),_:1})]),default:g(()=>[!p.radio&&!p.checkbox?(I(),N(h,{key:0,style:ot("cursor: pointer;"+(p.disabled?"opacity: 0.2":""))},{default:g(()=>[U(Q(p.label),1)]),_:2},1032,["style"])):ae("",!0)]),_:2},[p.icon?{name:"prepend",fn:g(()=>[w(l,{disabled:p.disabled},{default:g(()=>[U(Q(p.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:g(()=>[w(y,null,{default:g(()=>[(I(!0),Z(de,null,ye(p.subMenu,(R,K)=>(I(),N(b,{key:K,"prepend-icon":R.icon,onClick:ce=>s("submenu-click",R)},{default:g(()=>[w(h,null,{default:g(()=>[U(Q(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):p.radioGroup?(I(),N(f,{key:O+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":p.value,"onUpdate:modelValue":p.command},{default:g(()=>[(I(!0),Z(de,null,ye(p.choices,(R,K)=>(I(),N(b,{key:K+"-choice"},{default:g(()=>[w(F,{class:"list-action"},{default:g(()=>[w(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"])):(I(),N(b,{key:O+"-list",disabled:p.disabled,"data-test":o(`${t.title} ${t.menu.label} ${p.label}`),onClick:()=>{p.command(p),p.checkbox||n()}},Ve({default:g(()=>[p.checkbox?(I(),N(F,{key:0,class:"list-action"},{default:g(()=>[w(_,{modelValue:p.checked,"onUpdate:modelValue":R=>p.checked=R,label:p.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):ae("",!0),!p.radio&&!p.checkbox?(I(),N(h,{key:1,style:ot("cursor: pointer;"+(p.disabled?"opacity: 0.2":""))},{default:g(()=>[U(Q(p.label),1)]),_:2},1032,["style"])):ae("",!0)]),_:2},[p.icon?{name:"prepend",fn:g(()=>[w(l,{icon:p.icon,disabled:p.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},nr={components:{TopBarMenu:rr},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}}},ir={class:"app-title mr-2"};function or(t,e,s,r,n,o){const i=S("v-col"),a=S("v-row"),l=S("TopBarMenu");return I(),N(Lt,{to:"#openc3-menu"},[w(a,{"no-gutters":""},{default:g(()=>[w(i,{"align-self":"end"},{default:g(()=>[J("span",ir,Q(s.title),1)]),_:1})]),_:1}),w(a,{dense:"",class:"flex-nowrap"},{default:g(()=>[(I(!0),Z(de,null,ye(s.menus,(d,u)=>(I(),N(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 ar=It(nr,[["render",or],["__scopeId","data-v-f4fb184e"]]),cr="__default",lr={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}${cr}`}},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(r=>{r?(this.$notify.normal({title:"Loading configuration",body:t}),s&&s(JSON.parse(r)),e||this.$route.fullPath.includes(t)||this.$router.push({query:{config:t}})):this.$notify.caution({title:"Unknown configuration",body:t})}).catch(r=>{r&&this.$notify.serious({title:`Error opening configuration: ${t}`,body:r})})},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 qt(t,e){return function(){return t.apply(e,arguments)}}const{toString:ur}=Object.prototype,{getPrototypeOf:we}=Object,{iterator:Re,toStringTag:$t}=Symbol,Me=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),ke=(t,e)=>{let s=t;const r=[];for(;s!=null&&s!==Object.prototype;){if(r.indexOf(s)!==-1)return!1;if(r.push(s),Me(s,e))return!0;s=we(s)}return!1},dr=(t,e)=>t!=null&&ke(t,e)?t[e]:void 0,ct=(t=>e=>{const s=ur.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),ee=t=>(t=t.toLowerCase(),e=>ct(e)===t),ze=t=>e=>typeof e===t,{isArray:he}=Array,ve=ze("undefined");function Se(t){return t!==null&&!ve(t)&&t.constructor!==null&&!ve(t.constructor)&&H(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Vt=ee("ArrayBuffer");function hr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Vt(t.buffer),e}const fr=ze("string"),H=ze("function"),Mt=ze("number"),Ee=t=>t!==null&&typeof t=="object",pr=t=>t===!0||t===!1,We=t=>{if(!Ee(t))return!1;const e=we(t);return(e===null||e===Object.prototype||we(e)===null)&&!ke(t,$t)&&!ke(t,Re)},mr=t=>{if(!Ee(t)||Se(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},gr=ee("Date"),br=ee("File"),_r=t=>!!(t&&typeof t.uri<"u"),yr=t=>t&&typeof t.getParts<"u",wr=ee("Blob"),vr=ee("FileList"),Sr=t=>Ee(t)&&H(t.pipe);function Er(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const zt=Er(),Wt=typeof zt.FormData<"u"?zt.FormData:void 0,Or=t=>{if(!t)return!1;if(Wt&&t instanceof Wt)return!0;const e=we(t);if(!e||e===Object.prototype||!H(t.append))return!1;const s=ct(t);return s==="formdata"||s==="object"&&H(t.toString)&&t.toString()==="[object FormData]"},xr=ee("URLSearchParams"),[Cr,Rr,kr,Ar]=["ReadableStream","Request","Response","Headers"].map(ee),Ir=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ae(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let r,n;if(typeof t!="object"&&(t=[t]),he(t))for(r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else{if(Se(t))return;const o=s?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function Jt(t,e){if(Se(t))return null;e=e.toLowerCase();const s=Object.keys(t);let r=s.length,n;for(;r-- >0;)if(n=s[r],e===n.toLowerCase())return n;return null}const fe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ht=t=>!ve(t)&&t!==fe;function lt(...t){const{caseless:e,skipUndefined:s}=Ht(this)&&this||{},r={},n=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=e&&typeof i=="string"&&Jt(r,i)||i,l=Me(r,a)?r[a]:void 0;We(l)&&We(o)?r[a]=lt(l,o):We(o)?r[a]=lt({},o):he(o)?r[a]=o.slice():(!s||!ve(o))&&(r[a]=o)};for(let o=0,i=t.length;o<i;o++){const a=t[o];if(!a||Se(a)||(Ae(a,n),typeof a!="object"||he(a)))continue;const l=Object.getOwnPropertySymbols(a);for(let d=0;d<l.length;d++){const u=l[d];Vr.call(a,u)&&n(a[u],u)}}return r}const Pr=(t,e,s,{allOwnKeys:r}={})=>(Ae(e,(n,o)=>{s&&H(n)?Object.defineProperty(t,o,{__proto__:null,value:qt(n,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),Tr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Lr=(t,e,s,r)=>{t.prototype=Object.create(e.prototype,r),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)},Nr=(t,e,s,r)=>{let n,o,i;const a={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),o=n.length;o-- >0;)i=n[o],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=s!==!1&&we(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},jr=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const r=t.indexOf(e,s);return r!==-1&&r===s},Dr=t=>{if(!t)return null;if(he(t))return t;let e=t.length;if(!Mt(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},Ur=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&we(Uint8Array)),Fr=(t,e)=>{const s=(t&&t[Re]).call(t);let r;for(;(r=s.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},Br=(t,e)=>{let s;const r=[];for(;(s=t.exec(e))!==null;)r.push(s);return r},qr=ee("HTMLFormElement"),$r=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,r){return s.toUpperCase()+r}),{propertyIsEnumerable:Vr}=Object.prototype,Mr=ee("RegExp"),Kt=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),r={};Ae(s,(n,o)=>{let i;(i=e(n,o,t))!==!1&&(r[o]=i||n)}),Object.defineProperties(t,r)},zr=t=>{Kt(t,(e,s)=>{if(H(t)&&["arguments","caller","callee"].includes(s))return!1;const r=t[s];if(H(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Wr=(t,e)=>{const s={},r=n=>{n.forEach(o=>{s[o]=!0})};return he(t)?r(t):r(String(t).split(e)),s},Jr=()=>{},Hr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Kr(t){return!!(t&&H(t.append)&&t[$t]==="FormData"&&t[Re])}const Yr=t=>{const e=new WeakSet,s=r=>{if(Ee(r)){if(e.has(r))return;if(Se(r))return r;if(!("toJSON"in r)){e.add(r);const n=he(r)?[]:{};return Ae(r,(o,i)=>{const a=s(o);!ve(a)&&(n[i]=a)}),e.delete(r),n}}return r};return s(t)},Zr=ee("AsyncFunction"),Gr=t=>t&&(Ee(t)||H(t))&&H(t.then)&&H(t.catch),Yt=((t,e)=>t?setImmediate:e?((s,r)=>(fe.addEventListener("message",({source:n,data:o})=>{n===fe&&o===s&&r.length&&r.shift()()},!1),n=>{r.push(n),fe.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",H(fe.postMessage)),Xr=typeof queueMicrotask<"u"?queueMicrotask.bind(fe):typeof process<"u"&&process.nextTick||Yt,Zt=t=>t!=null&&H(t[Re]),Qr=t=>t!=null&&ke(t,Re)&&Zt(t),c={isArray:he,isArrayBuffer:Vt,isBuffer:Se,isFormData:Or,isArrayBufferView:hr,isString:fr,isNumber:Mt,isBoolean:pr,isObject:Ee,isPlainObject:We,isEmptyObject:mr,isReadableStream:Cr,isRequest:Rr,isResponse:kr,isHeaders:Ar,isUndefined:ve,isDate:gr,isFile:br,isReactNativeBlob:_r,isReactNative:yr,isBlob:wr,isRegExp:Mr,isFunction:H,isStream:Sr,isURLSearchParams:xr,isTypedArray:Ur,isFileList:vr,forEach:Ae,merge:lt,extend:Pr,trim:Ir,stripBOM:Tr,inherits:Lr,toFlatObject:Nr,kindOf:ct,kindOfTest:ee,endsWith:jr,toArray:Dr,forEachEntry:Fr,matchAll:Br,isHTMLForm:qr,hasOwnProperty:Me,hasOwnProp:Me,hasOwnInPrototypeChain:ke,getSafeProp:dr,reduceDescriptors:Kt,freezeMethods:zr,toObjectSet:Wr,toCamelCase:$r,noop:Jr,toFiniteNumber:Hr,findKey:Jt,global:fe,isContextDefined:Ht,isSpecCompliantForm:Kr,toJSONObject:Yr,isAsyncFn:Zr,isThenable:Gr,setImmediate:Yt,asap:Xr,isIterable:Zt,isSafeIterable:Qr},en=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"]),tn=t=>{const e={};let s,r,n;return t&&t.split(`
3
- `).forEach(function(o){n=o.indexOf(":"),s=o.substring(0,n).trim().toLowerCase(),r=o.substring(n+1).trim(),!(!s||e[s]&&en[s])&&(s==="set-cookie"?e[s]?e[s].push(r):e[s]=[r]:e[s]=e[s]?e[s]+", "+r:r)}),e};function sn(t){let e=0,s=t.length;for(;e<s;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;s>e;){const r=t.charCodeAt(s-1);if(r!==9&&r!==32)break;s-=1}return e===0&&s===t.length?t:t.slice(e,s)}const rn=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),nn=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ut(t,e){return c.isArray(t)?t.map(s=>ut(s,e)):sn(String(t).replace(e,""))}const on=t=>ut(t,rn),an=t=>ut(t,nn);function Gt(t){const e=Object.create(null);return c.forEach(t.toJSON(),(s,r)=>{e[r]=an(s)}),e}const Xt=Symbol("internals");function Ie(t){return t&&String(t).trim().toLowerCase()}function Je(t){return t===!1||t==null?t:c.isArray(t)?t.map(Je):on(String(t))}function cn(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=s.exec(t);)e[r[1]]=r[2];return e}const ln=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function dt(t,e,s,r,n){if(c.isFunction(r))return r.call(this,e,s);if(n&&(e=s),!!c.isString(e)){if(c.isString(r))return e.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(e)}}function un(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,r)=>s.toUpperCase()+r)}function dn(t,e){const s=c.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+s,{__proto__:null,value:function(n,o,i){return this[r].call(this,e,n,o,i)},configurable:!0})})}let $=class{constructor(t){t&&this.set(t)}set(t,e,s){const r=this;function n(i,a,l){const d=Ie(a);if(!d)return;const u=c.findKey(r,d);(!u||r[u]===void 0||l===!0||l===void 0&&r[u]!==!1)&&(r[u||a]=Je(i))}const o=(i,a)=>c.forEach(i,(l,d)=>n(l,d,a));if(c.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(c.isString(t)&&(t=t.trim())&&!ln(t))o(tn(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&&n(e,t,s);return this}get(t,e){if(t=Ie(t),t){const s=c.findKey(this,t);if(s){const r=this[s];if(!e)return r;if(e===!0)return cn(r);if(c.isFunction(e))return e.call(this,r,s);if(c.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ie(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 r=!1;function n(o){if(o=Ie(o),o){const i=c.findKey(s,o);i&&(!e||dt(s,s[i],i,e))&&(delete s[i],r=!0)}}return c.isArray(t)?t.forEach(n):n(t),r}clear(t){const e=Object.keys(this);let s=e.length,r=!1;for(;s--;){const n=e[s];(!t||dt(this,this[n],n,t,!0))&&(delete this[n],r=!0)}return r}normalize(t){const e=this,s={};return c.forEach(this,(r,n)=>{const o=c.findKey(s,n);if(o){e[o]=Je(r),delete e[n];return}const i=t?un(n):String(n).trim();i!==n&&delete e[n],e[i]=Je(r),s[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return c.forEach(this,(s,r)=>{s!=null&&s!==!1&&(e[r]=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(r=>s.set(r)),s}static accessor(t){const e=(this[Xt]=this[Xt]={accessors:{}}).accessors,s=this.prototype;function r(n){const o=Ie(n);e[o]||(dn(s,n),e[o]=!0)}return c.isArray(t)?t.forEach(r):r(t),this}};$.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors($.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[s]=r}}}),c.freezeMethods($);const hn="[REDACTED ****]";function fn(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 pn(t,e){const s=new Set(e.map(o=>String(o).toLowerCase())),r=[],n=o=>{if(o===null||typeof o!="object"||c.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof $&&(o=o.toJSON()),r.push(o);let i;if(c.isArray(o))i=[],o.forEach((a,l)=>{const d=n(a);c.isUndefined(d)||(i[l]=d)});else{if(!c.isPlainObject(o)&&fn(o))return r.pop(),o;i=Object.create(null);for(const[a,l]of Object.entries(o)){const d=s.has(a.toLowerCase())?hn:n(l);c.isUndefined(d)||(i[a]=d)}}return r.pop(),i};return n(t)}let m=class er extends Error{static from(e,s,r,n,o,i){const a=new er(e.message,s||e.code,r,n,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,r,n,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),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,s=e&&c.hasOwnProp(e,"redact")?e.redact:void 0,r=c.isArray(s)&&s.length>0?pn(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:r,code:this.code,status:this.status}}};m.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",m.ERR_BAD_OPTION="ERR_BAD_OPTION",m.ECONNABORTED="ECONNABORTED",m.ETIMEDOUT="ETIMEDOUT",m.ECONNREFUSED="ECONNREFUSED",m.ERR_NETWORK="ERR_NETWORK",m.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",m.ERR_DEPRECATED="ERR_DEPRECATED",m.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",m.ERR_BAD_REQUEST="ERR_BAD_REQUEST",m.ERR_CANCELED="ERR_CANCELED",m.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",m.ERR_INVALID_URL="ERR_INVALID_URL",m.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const mn=null,Qt=100;function ht(t){return c.isPlainObject(t)||c.isArray(t)}function es(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function ft(t,e,s){return t?t.concat(e).map(function(r,n){return r=es(r),!s&&n?"["+r+"]":r}).join(s?".":""):e}function gn(t){return c.isArray(t)&&!t.some(ht)}const bn=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function He(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(f,_){return!c.isUndefined(_[f])});const r=s.metaTokens,n=s.visitor||x,o=s.dots,i=s.indexes,a=s.Blob||typeof Blob<"u"&&Blob,l=s.maxDepth===void 0?Qt:s.maxDepth,d=a&&c.isSpecCompliantForm(e),u=[];if(!c.isFunction(n))throw new TypeError("visitor must be a function");function h(f){if(f===null)return"";if(c.isDate(f))return f.toISOString();if(c.isBoolean(f))return f.toString();if(!d&&c.isBlob(f))throw new m("Blob is not supported. Use a Buffer instead.");if(c.isArrayBuffer(f)||c.isTypedArray(f)){if(d&&typeof a=="function")return new a([f]);if(typeof Buffer<"u")return Buffer.from(f);throw new m("Blob is not supported. Use a Buffer instead.",m.ERR_NOT_SUPPORT)}return f}function b(f){if(f>l)throw new m("Object is too deeply nested ("+f+" levels). Max depth: "+l,m.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(f,_){if(l===1/0)return JSON.stringify(f);const p=[];return JSON.stringify(f,function(O,R){if(!c.isObject(R))return R;for(;p.length&&p[p.length-1]!==this;)p.pop();return p.push(R),b(_+p.length-1),R})}function x(f,_,p){let O=f;if(c.isReactNative(e)&&c.isReactNativeBlob(f))return e.append(ft(p,_,o),h(f)),!1;if(f&&!p&&typeof f=="object"){if(c.endsWith(_,"{}"))_=r?_:_.slice(0,-2),f=y(f,1);else if(c.isArray(f)&&gn(f)||(c.isFileList(f)||c.endsWith(_,"[]"))&&(O=c.toArray(f)))return _=es(_),O.forEach(function(R,K){!(c.isUndefined(R)||R===null)&&e.append(i===!0?ft([_],K,o):i===null?_:_+"[]",h(R))}),!1}return ht(f)?!0:(e.append(ft(p,_,o),h(f)),!1)}const v=Object.assign(bn,{defaultVisitor:x,convertValue:h,isVisitable:ht});function F(f,_,p=0){if(!c.isUndefined(f)){if(b(p),u.indexOf(f)!==-1)throw new Error("Circular reference detected in "+_.join("."));u.push(f),c.forEach(f,function(O,R){(!(c.isUndefined(O)||O===null)&&n.call(e,O,c.isString(R)?R.trim():R,_,v))===!0&&F(O,_?_.concat(R):[R],p+1)}),u.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return F(t),e}function ts(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&&He(t,this,e)}const ss=pt.prototype;ss.append=function(t,e){this._pairs.push([t,e])},ss.toString=function(t){const e=t?s=>t.call(this,s,ts):ts;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function _n(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rs(t,e,s){if(!e)return t;t=t||"";const r=c.isFunction(s)?{serialize:s}:s,n=c.getSafeProp(r,"encode")||_n,o=c.getSafeProp(r,"serialize");let i;if(o?i=o(e,r):i=c.isURLSearchParams(e)?e.toString():new pt(e,r).toString(n),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class ns{constructor(){this.handlers=[]}use(e,s,r){return this.handlers.push({fulfilled:e,rejected:s,synchronous:r?r.synchronous:!1,runWhen:r?r.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},yn=typeof URLSearchParams<"u"?URLSearchParams:pt,wn=typeof FormData<"u"?FormData:null,vn=typeof Blob<"u"?Blob:null,Sn={isBrowser:!0,classes:{URLSearchParams:yn,FormData:wn,Blob:vn},protocols:["http","https","file","blob","url","data"]},gt=typeof window<"u"&&typeof document<"u",bt=typeof navigator=="object"&&navigator||void 0,En=gt&&(!bt||["ReactNative","NativeScript","NS"].indexOf(bt.product)<0),On=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xn=gt&&window.location.href||"http://localhost",Cn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gt,hasStandardBrowserEnv:En,hasStandardBrowserWebWorkerEnv:On,navigator:bt,origin:xn},Symbol.toStringTag,{value:"Module"})),B={...Cn,...Sn};function Rn(t,e){return He(t,new B.classes.URLSearchParams,{visitor:function(s,r,n,o){return B.isNode&&c.isBuffer(s)?(this.append(r,s.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}const is=Qt;function os(t){if(t>is)throw new m("FormData field is too deeply nested ("+t+" levels). Max depth: "+is,m.ERR_FORM_DATA_DEPTH_EXCEEDED)}function kn(t){const e=[],s=/\w+|\[(\w*)]/g;let r;for(;(r=s.exec(t))!==null;)os(e.length),e.push(r[0]==="[]"?"":r[1]||r[0]);return e}function An(t){const e={},s=Object.keys(t);let r;const n=s.length;let o;for(r=0;r<n;r++)o=s[r],e[o]=t[o];return e}function as(t){function e(s,r,n,o){os(o);let i=s[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=o>=s.length;return i=!i&&c.isArray(n)?n.length:i,l?(c.hasOwnProp(n,i)?n[i]=c.isArray(n[i])?n[i].concat(r):[n[i],r]:n[i]=r,!a):((!c.hasOwnProp(n,i)||!c.isObject(n[i]))&&(n[i]=[]),e(s,r,n[i],o)&&c.isArray(n[i])&&(n[i]=An(n[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const s={};return c.forEachEntry(t,(r,n)=>{e(kn(r),n,s,0)}),s}return null}const Oe=(t,e)=>t!=null&&c.hasOwnProp(t,e)?t[e]:void 0;function In(t,e,s){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(s||JSON.stringify)(t)}const Pe={transitional:mt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",r=s.indexOf("application/json")>-1,n=c.isObject(t);if(n&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return r?JSON.stringify(as(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(n){const i=Oe(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return Rn(t,i).toString();if((o=c.isFileList(t))||s.indexOf("multipart/form-data")>-1){const a=Oe(this,"env"),l=a&&a.FormData;return He(o?{"files[]":t}:t,l&&new l,i)}}return n||r?(e.setContentType("application/json",!1),In(t)):t}],transformResponse:[function(t){const e=Oe(this,"transitional")||Pe.transitional,s=e&&e.forcedJSONParsing,r=Oe(this,"responseType"),n=r==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(s&&!r||n)){const o=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,Oe(this,"parseReviver"))}catch(i){if(o)throw i.name==="SyntaxError"?m.from(i,m.ERR_BAD_RESPONSE,this,null,Oe(this,"response")):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.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=>{Pe.headers[t]={}});function _t(t,e){const s=this||Pe,r=e||s,n=$.from(r.headers);let o=r.data;return c.forEach(t,function(i){o=i.call(s,o,n.normalize(),e?e.status:void 0)}),n.normalize(),o}function cs(t){return!!(t&&t.__CANCEL__)}let Te=class extends m{constructor(t,e,s){super(t??"canceled",m.ERR_CANCELED,e,s),this.name="CanceledError",this.__CANCEL__=!0}};function ls(t,e,s){const r=s.config.validateStatus;!s.status||!r||r(s.status)?t(s):e(new m("Request failed with status code "+s.status,s.status>=400&&s.status<500?m.ERR_BAD_REQUEST:m.ERR_BAD_RESPONSE,s.config,s.request,s))}function Pn(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function Tn(t,e){t=t||10;const s=new Array(t),r=new Array(t);let n=0,o=0,i;return e=e!==void 0?e:1e3,function(a){const l=Date.now(),d=r[o];i||(i=l),s[n]=a,r[n]=l;let u=o,h=0;for(;u!==n;)h+=s[u++],u=u%t;if(n=(n+1)%t,n===o&&(o=(o+1)%t),l-i<e)return;const b=d&&l-d;return b?Math.round(h*1e3/b):void 0}}function Ln(t,e){let s=0,r=1e3/e,n,o;const i=(a,l=Date.now())=>{s=l,n=null,o&&(clearTimeout(o),o=null),t(...a)};return[(...a)=>{const l=Date.now(),d=l-s;d>=r?i(a,l):(n=a,o||(o=setTimeout(()=>{o=null,i(n)},r-d)))},()=>n&&i(n)]}const Ke=(t,e,s=3)=>{let r=0;const n=Tn(50,250);return Ln(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-r),u=n(d);r=Math.max(r,l);const h={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(h)},s)},us=(t,e)=>{const s=t!=null;return[r=>e[0]({lengthComputable:s,total:t,loaded:r}),e[1]]},ds=t=>(...e)=>c.asap(()=>t(...e)),Nn=B.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,B.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0,jn=B.hasStandardBrowserEnv?{write(t,e,s,r,n,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(n)&&a.push(`domain=${n}`),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 r=e[s].replace(/^\s+/,""),n=r.indexOf("=");if(n!==-1&&r.slice(0,n)===t)try{return decodeURIComponent(r.slice(n+1))}catch{return r.slice(n+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Dn(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Un(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}const Fn=/^https?:(?!\/\/)/i,Bn=/[\t\n\r]/g;function qn(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function $n(t){return qn(t).replace(Bn,"")}function hs(t,e){if(typeof t=="string"&&Fn.test($n(t)))throw new m('Invalid URL: missing "//" after protocol',m.ERR_INVALID_URL,e)}function fs(t,e,s,r){hs(e,r);let n=!Dn(e);return t&&(n||s===!1)?(hs(t,r),Un(t,e)):e}const ps=t=>t instanceof $?{...t}:t;function pe(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 r(u,h,b,y){return c.isPlainObject(u)&&c.isPlainObject(h)?c.merge.call({caseless:y},u,h):c.isPlainObject(h)?c.merge({},h):c.isArray(h)?h.slice():h}function n(u,h,b,y){if(c.isUndefined(h)){if(!c.isUndefined(u))return r(void 0,u,b,y)}else return r(u,h,b,y)}function o(u,h){if(!c.isUndefined(h))return r(void 0,h)}function i(u,h){if(c.isUndefined(h)){if(!c.isUndefined(u))return r(void 0,u)}else return r(void 0,h)}function a(u){const h=c.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!c.isUndefined(h))if(c.isPlainObject(h)){if(c.hasOwnProp(h,u))return h[u]}else return;const b=c.hasOwnProp(t,"transitional")?t.transitional:void 0;if(c.isPlainObject(b)&&c.hasOwnProp(b,u))return b[u]}function l(u,h,b){if(c.hasOwnProp(e,b))return r(u,h);if(c.hasOwnProp(t,b))return r(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,h,b)=>n(ps(u),ps(h),b,!0)};return c.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=c.hasOwnProp(d,u)?d[u]:n,b=c.hasOwnProp(t,u)?t[u]:void 0,y=c.hasOwnProp(e,u)?e[u]:void 0,x=h(b,y,u);c.isUndefined(x)&&h!==l||(s[u]=x)}),c.hasOwnProp(e,"validateStatus")&&c.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(c.hasOwnProp(t,"validateStatus")?s.validateStatus=r(void 0,t.validateStatus):delete s.validateStatus),s}const Vn=["content-type","content-length"];function Mn(t,e,s){if(s!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([r,n])=>{Vn.includes(r.toLowerCase())&&t.set(r,n)})}const zn=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,s)=>String.fromCharCode(parseInt(s,16)));function ms(t){const e=pe({},t),s=b=>c.hasOwnProp(e,b)?e[b]:void 0,r=s("data");let n=s("withXSRFToken");const o=s("xsrfHeaderName"),i=s("xsrfCookieName");let a=s("headers");const l=s("auth"),d=s("baseURL"),u=s("allowAbsoluteUrls"),h=s("url");if(e.headers=a=$.from(a),e.url=rs(fs(d,h,u,e),s("params"),s("paramsSerializer")),l){const b=c.getSafeProp(l,"username")||"",y=c.getSafeProp(l,"password")||"";try{a.set("Authorization","Basic "+btoa(b+":"+(y?zn(y):"")))}catch(x){throw m.from(x,m.ERR_BAD_OPTION_VALUE,t)}}if(c.isFormData(r)&&(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv||c.isReactNative(r)?a.setContentType(void 0):c.isFunction(r.getHeaders)&&Mn(a,r.getHeaders(),s("formDataHeaderPolicy"))),B.hasStandardBrowserEnv&&(c.isFunction(n)&&(n=n(e)),n===!0||n==null&&Nn(e.url))){const b=o&&i&&jn.read(i);b&&a.set(o,b)}return e}const Wn=typeof XMLHttpRequest<"u",Jn=Wn&&function(t){return new Promise(function(e,s){const r=ms(t);let n=r.data;const o=$.from(r.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:l}=r,d,u,h,b,y;function x(){b&&b(),y&&y(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function F(){if(!v)return;const _=$.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),p={data:!i||i==="text"||i==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:t,request:v};ls(function(O){e(O),x()},function(O){s(O),x()},p),v=null}"onloadend"in v?v.onloadend=F:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(F)},v.onabort=function(){v&&(s(new m("Request aborted",m.ECONNABORTED,t,v)),x(),v=null)},v.onerror=function(_){const p=_&&_.message?_.message:"Network Error",O=new m(p,m.ERR_NETWORK,t,v);O.event=_||null,s(O),x(),v=null},v.ontimeout=function(){let _=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const p=r.transitional||mt;r.timeoutErrorMessage&&(_=r.timeoutErrorMessage),s(new m(_,p.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,t,v)),x(),v=null},n===void 0&&o.setContentType(null),"setRequestHeader"in v&&c.forEach(Gt(o),function(_,p){v.setRequestHeader(p,_)}),c.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),i&&i!=="json"&&(v.responseType=r.responseType),l&&([h,y]=Ke(l,!0),v.addEventListener("progress",h)),a&&v.upload&&([u,b]=Ke(a),v.upload.addEventListener("progress",u),v.upload.addEventListener("loadend",b)),(r.cancelToken||r.signal)&&(d=_=>{v&&(s(!_||_.type?new Te(null,t,v):_),v.abort(),x(),v=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const f=Pn(r.url);if(f&&!B.protocols.includes(f)){s(new m("Unsupported protocol "+f+":",m.ERR_BAD_REQUEST,t)),x();return}v.send(n||null)})},Hn=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const s=new AbortController;let r=!1;const n=function(l){if(!r){r=!0,i();const d=l instanceof Error?l:this.reason;s.abort(d instanceof m?d:new Te(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,n(new m(`timeout of ${e}ms exceeded`,m.ETIMEDOUT))},e);const i=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(n):l.removeEventListener("abort",n)}),t=null)};t.forEach(l=>l.addEventListener("abort",n,{once:!0}));const{signal:a}=s;return a.unsubscribe=()=>c.asap(i),a},Kn=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let r=0,n;for(;r<s;)n=r+e,yield t.slice(r,n),r=n},Yn=async function*(t,e){for await(const s of Zn(t))yield*Kn(s,e)},Zn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:r}=await e.read();if(s)break;yield r}}finally{await e.cancel()}},gs=(t,e,s,r)=>{const n=Yn(t,e);let o=0,i,a=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:d,value:u}=await n.next();if(d){a(),l.close();return}let h=u.byteLength;if(s){let b=o+=h;s(b)}l.enqueue(new Uint8Array(u))}catch(d){throw a(d),d}},cancel(l){return a(l),n.return()}},{highWaterMark:2})},Ye=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,Gn=(t,e,s)=>e+2<s&&Ye(t.charCodeAt(e+1))&&Ye(t.charCodeAt(e+2));function Xn(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),r=t.slice(e+1);if(/;base64/i.test(s)){let o=r.length;const i=r.length;for(let h=0;h<i;h++)if(r.charCodeAt(h)===37&&h+2<i){const b=r.charCodeAt(h+1),y=r.charCodeAt(h+2);Ye(b)&&Ye(y)&&(o-=2,h+=2)}let a=0,l=i-1;const d=h=>h>=2&&r.charCodeAt(h-2)===37&&r.charCodeAt(h-1)===51&&(r.charCodeAt(h)===68||r.charCodeAt(h)===100);l>=0&&(r.charCodeAt(l)===61?(a++,l--):d(l)&&(a++,l-=3)),a===1&&l>=0&&(r.charCodeAt(l)===61||d(l))&&a++;const u=Math.floor(o/4)*3-(a||0);return u>0?u:0}let n=0;for(let o=0,i=r.length;o<i;o++){const a=r.charCodeAt(o);if(a===37&&Gn(r,o,i))n+=1,o+=2;else if(a<128)n+=1;else if(a<2048)n+=2;else if(a>=55296&&a<=56319&&o+1<i){const l=r.charCodeAt(o+1);l>=56320&&l<=57343?(n+=4,o++):n+=3}else n+=3}return n}const yt="1.18.1",bs=64*1024,{isFunction:Ze}=c,Qn=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,s)=>String.fromCharCode(parseInt(s,16))),_s=t=>{if(!c.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},ys=(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:r}=e;t=c.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:n,Request:o,Response:i}=t,a=n?Ze(n):typeof fetch=="function",l=Ze(o),d=Ze(i);if(!a)return!1;const u=a&&Ze(s),h=a&&(typeof r=="function"?(f=>_=>f.encode(_))(new r):async f=>new Uint8Array(await new o(f).arrayBuffer())),b=l&&u&&ys(()=>{let f=!1;const _=new o(B.origin,{body:new s,method:"POST",get duplex(){return f=!0,"half"}}),p=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),f&&!p}),y=d&&u&&ys(()=>c.isReadableStream(new i("").body)),x={stream:y&&(f=>f.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!x[f]&&(x[f]=(_,p)=>{let O=_&&_[f];if(O)return O.call(_);throw new m(`Response type '${f}' is not supported`,m.ERR_NOT_SUPPORT,p)})});const v=async f=>{if(f==null)return 0;if(c.isBlob(f))return f.size;if(c.isSpecCompliantForm(f))return(await new o(B.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(c.isArrayBufferView(f)||c.isArrayBuffer(f))return f.byteLength;if(c.isURLSearchParams(f)&&(f=f+""),c.isString(f))return(await h(f)).byteLength},F=async(f,_)=>c.toFiniteNumber(f.getContentLength())??v(_);return async f=>{let{url:_,method:p,data:O,signal:R,cancelToken:K,timeout:ce,onDownloadProgress:ne,onUploadProgress:k,responseType:T,headers:q,withCredentials:se="same-origin",fetchOptions:le,maxContentLength:M,maxBodyLength:Ce}=ms(f);const z=c.isNumber(M)&&M>-1,E=c.isNumber(Ce)&&Ce>-1,D=P=>c.hasOwnProp(f,P)?f[P]:void 0;let G=n||fetch;T=T?(T+"").toLowerCase():"text";let W=Hn([R,K&&K.toAbortSignal()],ce),L=null;const re=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let Ue,Fe=null;const Ys=()=>new m("Request body larger than maxBodyLength limit",m.ERR_BAD_REQUEST,f,L);try{let P;const X=D("auth");if(X){const C=c.getSafeProp(X,"username")||"",Y=c.getSafeProp(X,"password")||"";P={username:C,password:Y}}if(ei(_)){const C=new URL(_,B.origin);if(!P&&(C.username||C.password)){const Y=_s(C.username),ue=_s(C.password);P={username:Y,password:ue}}(C.username||C.password)&&(C.username="",C.password="",_=C.href)}if(P&&(q.delete("authorization"),q.set("Authorization","Basic "+btoa(Qn((P.username||"")+":"+(P.password||""))))),z&&typeof _=="string"&&_.startsWith("data:")&&Xn(_)>M)throw new m("maxContentLength size of "+M+" exceeded",m.ERR_BAD_RESPONSE,f,L);if(E&&p!=="get"&&p!=="head"){const C=await v(O);if(typeof C=="number"&&isFinite(C)&&(Ue=C,C>Ce))throw Ys()}const rt=E&&(c.isReadableStream(O)||c.isStream(O)),Zs=(C,Y,ue)=>gs(C,bs,_e=>{if(E&&_e>Ce)throw Fe=Ys();Y&&Y(_e)},ue);if(b&&p!=="get"&&p!=="head"&&(k||rt)){if(Ue=Ue??await F(q,O),Ue!==0||rt){let C=new o(_,{method:"POST",body:O,duplex:"half"}),Y;if(c.isFormData(O)&&(Y=C.headers.get("content-type"))&&q.setContentType(Y),C.body){const[ue,_e]=k&&us(Ue,Ke(ds(k)))||[];O=Zs(C.body,ue,_e)}}}else if(rt&&!l&&u&&p!=="get"&&p!=="head")O=Zs(O);else if(rt&&l&&!b&&p!=="get"&&p!=="head")throw new m("Stream request bodies are not supported by the current fetch implementation",m.ERR_NOT_SUPPORT,f,L);c.isString(se)||(se=se?"include":"omit");const No=l&&"credentials"in o.prototype;if(c.isFormData(O)){const C=q.getContentType();C&&/^multipart\/form-data/i.test(C)&&!/boundary=/i.test(C)&&q.delete("content-type")}q.set("User-Agent","axios/"+yt,!1);const Gs={...le,signal:W,method:p.toUpperCase(),headers:Gt(q.normalize()),body:O,duplex:"half",credentials:No?se:void 0};L=l&&new o(_,Gs);let ie=await(l?G(L,le):G(_,Gs));const Xs=$.from(ie.headers);if(z){const C=c.toFiniteNumber(Xs.getContentLength());if(C!=null&&C>M)throw new m("maxContentLength size of "+M+" exceeded",m.ERR_BAD_RESPONSE,f,L)}const At=y&&(T==="stream"||T==="response");if(y&&ie.body&&(ne||z||At&&re)){const C={};["status","statusText","headers"].forEach(Be=>{C[Be]=ie[Be]});const Y=c.toFiniteNumber(Xs.getContentLength()),[ue,_e]=ne&&us(Y,Ke(ds(ne),!0))||[];let Qs=0;const jo=Be=>{if(z&&(Qs=Be,Qs>M))throw new m("maxContentLength size of "+M+" exceeded",m.ERR_BAD_RESPONSE,f,L);ue&&ue(Be)};ie=new i(gs(ie.body,bs,jo,()=>{_e&&_e(),re&&re()}),C)}T=T||"text";let oe=await x[c.findKey(x,T)||"text"](ie,f);if(z&&!y&&!At){let C;if(oe!=null&&(typeof oe.byteLength=="number"?C=oe.byteLength:typeof oe.size=="number"?C=oe.size:typeof oe=="string"&&(C=typeof r=="function"?new r().encode(oe).byteLength:oe.length)),typeof C=="number"&&C>M)throw new m("maxContentLength size of "+M+" exceeded",m.ERR_BAD_RESPONSE,f,L)}return!At&&re&&re(),await new Promise((C,Y)=>{ls(C,Y,{data:oe,headers:$.from(ie.headers),status:ie.status,statusText:ie.statusText,config:f,request:L})})}catch(P){if(re&&re(),W&&W.aborted&&W.reason instanceof m){const X=W.reason;throw X.config=f,L&&(X.request=L),P!==X&&Object.defineProperty(X,"cause",{__proto__:null,value:P,writable:!0,enumerable:!1,configurable:!0}),X}if(Fe)throw L&&!Fe.request&&(Fe.request=L),Fe;if(P instanceof m)throw L&&!P.request&&(P.request=L),P;if(P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)){const X=new m("Network Error",m.ERR_NETWORK,f,L,P&&P.response);throw Object.defineProperty(X,"cause",{__proto__:null,value:P.cause||P,writable:!0,enumerable:!1,configurable:!0}),X}throw m.from(P,P&&P.code,f,L,P&&P.response)}}},si=new Map,ws=t=>{let e=t&&t.env||{};const{fetch:s,Request:r,Response:n}=e,o=[r,n,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};ws();const wt={http:mn,xhr:Jn,fetch:{get:ws}};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 vs=t=>`- ${t}`,ri=t=>c.isFunction(t)||t===null||t===!1;function ni(t,e){t=c.isArray(t)?t:[t];const{length:s}=t;let r,n;const o={};for(let i=0;i<s;i++){r=t[i];let a;if(n=r,!ri(r)&&(n=wt[(a=String(r)).toLowerCase()],n===void 0))throw new m(`Unknown adapter '${a}'`);if(n&&(c.isFunction(n)||(n=n.get(e))))break;o[a||"#"+i]=n}if(!n){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(vs).join(`
6
- `):" "+vs(i[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+a,m.ERR_NOT_SUPPORT)}return n}const Ss={getAdapter:ni,adapters:wt};function vt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Te(null,t)}function Es(t){return vt(t),t.headers=$.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),Ss.getAdapter(t.adapter||Pe.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=$.from(e.headers),e},function(e){if(!cs(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=$.from(e.response.headers)}return Promise.reject(e)})}const Ge={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ge[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Os={};Ge.transitional=function(t,e,s){function r(n,o){return"[Axios v"+yt+"] Transitional option '"+n+"'"+o+(s?". "+s:"")}return(n,o,i)=>{if(t===!1)throw new m(r(o," has been removed"+(e?" in "+e:"")),m.ERR_DEPRECATED);return e&&!Os[o]&&(Os[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(n,o,i):!0}},Ge.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 m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let n=r.length;for(;n-- >0;){const o=r[n],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 m("option "+o+" must be "+l,m.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new m("Unknown option "+o,m.ERR_BAD_OPTION)}}const Xe={assertOptions:ii,validators:Ge},V=Xe.validators;let me=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ns,response:new ns}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const n=(()=>{if(!r.stack)return"";const o=r.stack.indexOf(`
7
- `);return o===-1?"":r.stack.slice(o+1)})();try{if(!s.stack)s.stack=n;else if(n){const o=n.indexOf(`
8
- `),i=o===-1?-1:n.indexOf(`
9
- `,o+1),a=i===-1?"":n.slice(i+1);String(s.stack).endsWith(a)||(s.stack+=`
10
- `+n)}}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=pe(this.defaults,e);const{transitional:s,paramsSerializer:r,headers:n}=e;s!==void 0&&Xe.assertOptions(s,{silentJSONParsing:V.transitional(V.boolean),forcedJSONParsing:V.transitional(V.boolean),clarifyTimeoutError:V.transitional(V.boolean),legacyInterceptorReqResOrdering:V.transitional(V.boolean),advertiseZstdAcceptEncoding:V.transitional(V.boolean),validateStatusUndefinedResolves:V.transitional(V.boolean)},!1),r!=null&&(c.isFunction(r)?e.paramsSerializer={serialize:r}:Xe.assertOptions(r,{encode:V.function,serialize:V.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Xe.assertOptions(e,{baseUrl:V.spelling("baseURL"),withXsrfToken:V.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=n&&c.merge(n.common,n[e.method]);n&&c.forEach(["delete","get","head","post","put","patch","query","common"],y=>{delete n[y]}),e.headers=$.concat(o,n);const i=[];let a=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(e)===!1)return;a=a&&y.synchronous;const x=e.transitional||mt;x&&x.legacyInterceptorReqResOrdering?i.unshift(y.fulfilled,y.rejected):i.push(y.fulfilled,y.rejected)});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let d,u=0,h;if(!a){const y=[Es.bind(this),void 0];for(y.unshift(...i),y.push(...l),h=y.length,d=Promise.resolve(e);u<h;)d=d.then(y[u++],y[u++]);return d}h=i.length;let b=e;for(;u<h;){const y=i[u++],x=i[u++];try{b=y(b)}catch(v){x.call(this,v);break}}try{d=Es.call(this,b)}catch(y){return Promise.reject(y)}for(u=0,h=l.length;u<h;)d=d.then(l[u++],l[u++]);return d}getUri(t){t=pe(this.defaults,t);const e=fs(t.baseURL,t.url,t.allowAbsoluteUrls,t);return rs(e,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){me.prototype[t]=function(e,s){return this.request(pe(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(r,n,o){return this.request(pe(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}me.prototype[t]=e(),t!=="query"&&(me.prototype[t+"Form"]=e(!0))});let oi=class tr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(n){s=n});const r=this;this.promise.then(n=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](n);r._listeners=null}),this.promise.then=n=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(n);return i.cancel=function(){r.unsubscribe(o)},i},e(function(n,o,i){r.reason||(r.reason=new Te(n,o,i),s(r.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=r=>{e.abort(r)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new tr(function(s){e=s}),cancel:e}}};function ai(t){return function(e){return t.apply(null,e)}}function ci(t){return c.isObject(t)&&t.isAxiosError===!0}const St={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(St).forEach(([t,e])=>{St[e]=t});function xs(t){const e=new me(t),s=qt(me.prototype.request,e);return c.extend(s,me.prototype,e,{allOwnKeys:!0}),c.extend(s,e,null,{allOwnKeys:!0}),s.create=function(r){return xs(pe(t,r))},s}const j=xs(Pe);j.Axios=me,j.CanceledError=Te,j.CancelToken=oi,j.isCancel=cs,j.VERSION=yt,j.toFormData=He,j.AxiosError=m,j.Cancel=j.CanceledError,j.all=function(t){return Promise.all(t)},j.spread=ai,j.isAxiosError=ci,j.mergeConfig=pe,j.AxiosHeaders=$,j.formToJSON=t=>as(c.isHTMLForm(t)?new FormData(t):t),j.getAdapter=Ss.getAdapter,j.HttpStatusCode=St,j.default=j;const{Axios:Uo,AxiosError:Fo,CanceledError:Bo,isCancel:qo,CancelToken:$o,VERSION:Vo,all:Mo,Cancel:zo,isAxiosError:Wo,spread:Jo,toFormData:Ho,AxiosHeaders:Ko,HttpStatusCode:Yo,formToJSON:Zo,getAdapter:Go,mergeConfig:Xo,create:Qo}=j,Cs=j.create({baseURL:location.origin,timeout:6e4,params:{}});Cs.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&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});let Qe=()=>({emit(t,...e){for(let s=this.events[t]||[],r=0,n=s.length;r<n;r++)s[r](...e)},events:{},on(t,e){return(this.events[t]||=[]).push(e),()=>{this.events[t]=this.events[t]?.filter(s=>e!==s)}}});class Le extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class Et extends Le{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class li extends Le{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class te extends Le{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class ui extends te{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Rs(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 di{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:r,info:n})=>(s[r]=n,s),{})}}const ge=Symbol("state");class ks{constructor(e={}){this.emitter=Qe(),this.params=Object.freeze(e),this.presence=new di(this),this.initialConnect=!0,this[ge]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Rs({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ge]}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[ge]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ge]="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[ge]="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[ge]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ge]="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 r=this.receiver?this.receiver.logger:null;r&&r.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 r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}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 r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(n=>n()),e()})),r.push(this.on("close",n=>{r.forEach(o=>o()),s(n||new Le("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class hi{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(r=>r[e](s[0])):this.channels.forEach(r=>r[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,r={promise:new Promise(o=>{s=o}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),s(r)},canceled:!1,acquired:!1},n=this._pendingTop;return this._pendings.push(r),n&&await n.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}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 fi{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 pi{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new fi),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:s,unsubscribe:r}){let n=this._subscriptions[e]=new hi(e);return n.remoteId=this._localToRemote[e],n.subscriber=s,n.unsubscriber=r,n.gvl=this.glv,n}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,s){this._localToRemote[e]=s;let r=this.get(e);r&&(r.remoteId=s)}}class mi{constructor(e={}){this.subscriptions=new pi(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 r=s.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,s,r){let n=this._remoteToLocal[e];if(!n){this._pendingMessages.push([e,s,r]);return}let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>{i.receive(s,r)})}notify(e,s,r){let n=this._remoteToLocal[e];if(!n)return;let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>i.emit(s,r))}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 r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):s.push(r);this._pendingMessages=s}}const As={debug:0,info:1,warn:2,error:3};class Is{constructor(e){this.level=e||"warn"}log(e,s,r){As[e]<As[this.level]||this.writeLogEntry(e,s,r)}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 Is{writeLogEntry(){}}class gi{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let bi=0;class Ps{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 r={channel:e};s&&Object.assign(r,s);let n=Rs(r);if(this.pendingUnsubscriptions[n]){let i=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${i}`,n),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,s))},i)})}if(this.pendingSubscriptions[n])return this.logger.warn("subscription is already pending, skipping",n),Promise.reject(Error("Already subscribing"));let o=this.subscribeRetryInterval;return new Promise((i,a)=>{let l=++bi;this.pendingSubscriptions[n]={resolve:i,reject:a,id:l},this.cable.send(this.buildSubscribeRequest(n)),this.maybeRetrySubscribe(l,n,o)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,s,r){setTimeout(()=>{let n=this.pendingSubscriptions[s];n&&n.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,s),this.cable.send(this.buildSubscribeRequest(s)),this.maybeExpireSubscribe(e,s,r))},r)}maybeExpireSubscribe(e,s,r){setTimeout(()=>{let n=this.pendingSubscriptions[s];n&&n.id===e&&(delete this.pendingSubscriptions[s],n.reject(new li(`Haven't received subscription ack in ${r*2}ms for ${s}`)))},r)}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,r){return s==="$whisper"?this.whisper(e,r):(r||(r={}),r.action||=s,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),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:r,message:n,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 te(o);this.reset(a),i===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(s==="confirm_subscription"){let a=this.pendingSubscriptions[r];if(!a){this.logger.error("subscription not found, unsubscribing",{type:s,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],a.resolve(r)}if(s==="reject_subscription"){let a=this.pendingSubscriptions[r];return a?(delete this.pendingSubscriptions[r],a.reject(new Et)):this.logger.error("subscription not found",{type:s,identifier:r})}if(n)return{identifier:r,message:n};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 Ts=()=>Date.now()/1e3|0;class _i extends Ps{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=Ts()),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:r,message:n}=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[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(s==="ping")return this.restoreSince&&(this.restoreSince=Ts()),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",r);return}if(s==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);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=n.type;if(o==="info"){let i=this.pendingPresence[r];i&&(delete this.pendingPresence[r],i.resolve(n))}else if(o==="error"){let i=this.pendingPresence[r];i&&(delete this.pendingPresence[r],i.reject(new Error("failed to retrieve presence")))}return{type:s,identifier:r,message:n}}if(n){let o=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:n,meta:o}}this.logger.warn(`unknown message type: ${s}`,{message:e})}perform(e,s,r){switch(s){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,s,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let s=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(s.history=r,this.pendingHistory[e]=!0);let n=this.presenceInfo[e];return n&&(s.presence=n),s}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let s={},r=!1;if(this.subscriptionStreams[e])for(let n of this.subscriptionStreams[e]){let o=this.streamsPositions[n];o&&(r=!0,s[n]=o)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:s}}trackStreamPosition(e,s,r,n){if(!(!s||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(s),this.streamsPositions[s]={epoch:r,offset:n},{stream:s,epoch:r,offset:n}}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((r,n)=>{this.pendingPresence[e]={resolve:r,reject:n},this.cable.send({command:"presence",identifier:e,data:s})})}}class yi extends Le{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Ls 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 wi="$pubsub";class Ns extends ks{static identifier=wi;async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}const be=Symbol("state");let vi=class{constructor({transport:t,protocol:e,encoder:s,logger:r,lazy:n,hubOptions:o,performFailures:i,transportConfigurator:a}){this.emitter=Qe(),this.transport=t,this.encoder=s,this.logger=r||new Ne,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new mi(o||{}),this[be]="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,n===!1&&this.connect().catch(()=>{})}get state(){return this[be]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[be]="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[be]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new te("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[be]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new te("recovery_failed")),this._resubscribe(r))});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 te(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[be]="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 te?t:new te(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[be]="closed";let s=e||new te("cable_closed");this.hub.subscriptions.all().forEach(r=>r.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:r,identifier:n,message:o,meta:i}=s;r?this.hub.notify(n,r,o):this.hub.transmit(n,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 Ns({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Ns({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,r;return typeof t=="string"&&(r=t,t=Ls),s=r?new t(r,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:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});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 r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let n=await t.acquire("subscribed");if(n.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),n.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),n.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),n.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),n.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(r,i),this.logger.debug("subscribed",{...o,remoteId:i}),t.notify("connected")}catch(i){if(i){if(i instanceof Et&&this.logger.warn("rejected",o),i instanceof te){this.logger.debug("disconnected during subscription; will retry on connect",o),n.release();return}this.logger.error("failed to subscribe",{error:i,...o})}t.close(i),this.hub.unsubscribe(r)}n.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 r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),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(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(n){n&&(n instanceof te?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:n}):this.logger.error("unsubscribe failed",{id:e,error:n}))}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(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,s){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new yi;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let n=r.remoteId,o={id:n,action:e,payload:s};this.logger.debug("perform",o);try{let i=await this.protocol.perform(n,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,(...r)=>{s(),e(...r)});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(r=>r()),t()})),s.push(this.on("close",r=>{s.forEach(n=>n()),e(r)})),s.push(this.on("disconnect",r=>{s.forEach(n=>n()),e(r)}))}),this._pendingConnect)}};const Si={maxMissingPings:2,maxReconnectAttempts:1/0},xe=()=>Date.now(),js=(t,e)=>{e=e||{};let{backoffRate:s,jitterRatio:r,maxInterval:n}=e;return s=s||2,r===void 0&&(r=.5),o=>{let i=t*s**o,a=i*s,l=i+(a-i)*Math.random(),d=2*(Math.random()-.5)*r;return l=l*(1+d),n&&n<l&&(l=n),l}};let Ds=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=xe()}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=xe(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=xe(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=xe(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=xe()})),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=xe()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new ui))}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 Ei{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=Qe(),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(r){this.logger.debug(`Failed to connect via ${s.displayName()}: ${r.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(r=>{r.setParam(e,s)})}setToken(e,s){this.transports.forEach(r=>{r.setToken(e,s)})}on(e,s){return this.emitter.on(e,s)}once(e,s){let r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}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 Oi{constructor(e,s={}){this.url=e;let r=s.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Qe();let{format:n,subprotocol:o,authStrategy:i}=s;this.format=n||"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,r)=>{let n=[];n.push(this.once("open",()=>{n.forEach(o=>o()),s()})),n.push(this.once("close",()=>{n.forEach(o=>o()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,s){let r=new URL(this.url);r.searchParams.set(e,s);let n=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(n)}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 r=`x-${s}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(n=>n.toLowerCase()===r)||r,this.connectionOptions.headers[r]=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 r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}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 xi{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 Ci extends Ls{constructor(e,s,r){super(e,s),this.subscription=new xi(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:n})=>this.subscription.notify("connected",{reconnected:n})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",n=>this.subscription.notify("received",n)),this.on("close",n=>{n&&n instanceof Et?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Ri{constructor(e){this.cable=e}create(e,s){let r,n;typeof e=="object"?(r=e.channel,delete e.channel,n=e):(r=e,n={});let o=new Ci(r,n,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 ki{constructor(e){this.cable=e,this.subscriptions=new Ri(e)}send(e){return this.cable.send(e)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const Us={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Ai(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({},Us,e);let{protocol:s,websocketImplementation:r,websocketFormat:n,websocketOptions:o,websocketAuthStrategy:i,fallbacks:a,logLevel:l,logger:d,transport:u,encoder:h,lazy:b,monitor:y,pingInterval:x,reconnectStrategy:v,maxMissingPings:F,maxReconnectAttempts:f,subprotocol:_,tokenRefresher:p,historyTimestamp:O,protocolOptions:R,concurrentSubscribes:K,performFailures:ce,transportConfigurator:ne,auth:k}=e;if(d=d||new Ne(l),typeof s=="string"){_=_||s;let se=s.substring(0,s.lastIndexOf("-")),le=s.substring(s.lastIndexOf("-")+1);if(R=R||{},se==="actioncable-v1")s=new Ps({logger:d,...R});else if(se==="actioncable-v1-ext")s=new _i({logger:d,historyTimestamp:O,...R});else throw Error(`Protocol is not supported yet: ${s}`);if(le==="json")h=h||new gi,n=n||"text";else if(le==="msgpack"){if(n="binary",!h)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(le==="protobuf"){if(n=n||"binary",!h)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${s}`)}if(!s)throw Error("Protocol must be specified");u=u||new Oi(t,{websocketImplementation:r,websocketOptions:o,subprotocol:_,authStrategy:i,format:n}),a&&(u=new Ei([u,...a],{logger:d})),k&&k.token&&u.setToken(k.token,k.param||"jid"),v=v||js(x),y!==!1&&(y=y||new Ds({pingInterval:x,reconnectStrategy:v,maxMissingPings:F,maxReconnectAttempts:f,logger:d}));let T={concurrentSubscribes:K},q=new vi({protocol:s,transport:u,encoder:h,logger:d,lazy:b,hubOptions:T,performFailures:ce,transportConfigurator:ne});return y&&(y.watch(q),q.monitor=y),p&&Ii(q,async()=>{try{await p(u)}catch(se){return d.error("Failed to refresh authentication token: "+se),!1}return q.connect().catch(()=>{}),!0}),q}function Ii(t,e){let s=!1;t.on("connect",()=>s=!1),t.on("close",async r=>{if(r){if(s){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(s=!0,await e())}})}class Pi extends Is{writeLogEntry(e,s,r){r?console[e](s,r):console[e](s)}}class Ti extends Ds{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=n=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:n})},r=()=>this.disconnect(new te("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",r,!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",r,!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 Li=["cable","action-cable"],Ni="/cable",et=(t,e)=>{for(let s of Li){let r=t.head.querySelector(`meta[name='${s}-${e}']`);if(r)return r.getAttribute("content")}},Fs=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,ji=()=>{if(typeof document<"u"&&document.head){let t=et(document,"url");if(t)return Fs(t)}return Fs(Ni)},Di=()=>{if(typeof document<"u"&&document.head){let t=et(document,"history-timestamp");if(t)return t|0}},Ui=()=>{if(typeof document<"u"&&document.head)return et(document,"token")},Fi=()=>{if(typeof document<"u"&&document.head)return et(document,"token-param")};function Bi(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||ji(),e=e||{},e.historyTimestamp||=Di();let s=Ui();if(s){let d=Fi();e.auth=Object.assign({token:s,param:d},e.auth||{})}e=Object.assign({},Us,e);let{logLevel:r,logger:n,pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l}=e;return n=e.logger=e.logger||new Pi(r),i=e.reconnectStrategy=e.reconnectStrategy||js(o),e.monitor!==!1&&(e.monitor=e.monitor||new Ti({pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l,logger:n})),Ai(t,e)}function qi(t,e){let s=Bi(t,e);return new ki(s)}class Bs{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,s,r={},n={}){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,...n},r)})}recordPing(){}}function je(t){return $i.test(t)}const $i=/^-?[0-9]+$/;function qs(t){return Vi.test(t)}const Vi=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function $s(t,e){if(je(t))return Number.isSafeInteger(Number.parseInt(t,10));const s=Number.parseFloat(t),r=String(s);if(t===r)return!0;const n=Vs(t),o=Vs(r);return!!(n===o||e?.approx===!0&&!je(t)&&o.length>=14&&n.startsWith(o.substring(0,14)))}let De=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function Mi(t){if($s(t,{approx:!1}))return;if(je(t))return De.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?De.underflow:De.truncate_float:De.overflow}function Vs(t){const{start:e,end:s}=zi(t),r=t.substring(e,s),n=r.indexOf(".");return n===-1?r:r.substring(0,n)+r.substring(n+1)}function zi(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 Wi{isLosslessNumber=!0;constructor(e){if(!qs(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Mi(this.value);if(e===void 0||e===De.truncate_float)return Number.parseFloat(this.value);if(je(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 Ji(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function Hi(t){return new Wi(t)}function Ki(t,e){return Ot({"":t},"",t,e)}function Ot(t,e,s,r){return Array.isArray(s)?r.call(t,e,Zi(s,r)):s&&typeof s=="object"&&!Ji(s)?r.call(t,e,Yi(s,r)):r.call(t,e,s)}function Yi(t,e){for(const s of Object.keys(t)){const r=Ot(t,s,t[s],e);r!==void 0?t[s]=r:delete t[s]}return t}function Zi(t,e){for(let s=0;s<t.length;s++)t[s]=Ot(t,String(s),t[s],e);return t}function Gi(t,e,s){const r=typeof s=="function"?{parseNumber:s}:s,n=r?.parseNumber??Hi,o=r?.onDuplicateKey??ce;let i=0;const a=u();return f(a),p(),e?Ki(a,e):a;function l(){if(t.charCodeAt(i)===ro){i++,b();const E={};let D=!0;for(;i<t.length&&t.charCodeAt(i)!==zs;){D?D=!1:(v(),b());const G=i,W=y();if(W===void 0){K();return}b(),F();const L=u();if(L===void 0){se();return}if(Object.prototype.hasOwnProperty.call(E,W)&&!xt(L,E[W])){const re=o({key:W,position:G+1,oldValue:E[W],newValue:L});re!==void 0&&(E[W]=re)}else E[W]=L}return t.charCodeAt(i)!==zs&&ne(),i++,E}}function d(){if(t.charCodeAt(i)===no){i++,b();const E=[];let D=!0;for(;i<t.length&&t.charCodeAt(i)!==Ws;){D?D=!1:v();const G=u();_(G),E.push(G)}return t.charCodeAt(i)!==Ws&&k(),i++,E}}function u(){b();const E=y()??x()??l()??d()??h("true",!0)??h("false",!1)??h("null",null);return b(),E}function h(E,D){if(t.slice(i,i+E.length)===E)return i+=E.length,D}function b(){for(;Xi(t.charCodeAt(i));)i++}function y(){if(t.charCodeAt(i)===Ct){i++;let E="";for(;i<t.length&&t.charCodeAt(i)!==Ct;){if(t.charCodeAt(i)===so){const D=t[i+1],G=to[D];G!==void 0?(E+=G,i++):D==="u"?tt(t.charCodeAt(i+2))&&tt(t.charCodeAt(i+3))&&tt(t.charCodeAt(i+4))&&tt(t.charCodeAt(i+5))?(E+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):le(i):q(i)}else eo(t.charCodeAt(i))?E+=t[i]:T(t[i]);i++}return R(),i++,E}}function x(){const E=i;if(t.charCodeAt(i)===Js&&(i++,O(E)),t.charCodeAt(i)===Rt)i++;else if(Qi(t.charCodeAt(i)))for(i++;st(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===fo)for(i++,O(E);st(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===_o||t.charCodeAt(i)===bo)for(i++,(t.charCodeAt(i)===Js||t.charCodeAt(i)===lo)&&i++,O(E);st(t.charCodeAt(i));)i++;if(i>E)return n(t.slice(E,i))}function v(){if(t.charCodeAt(i)!==ho)throw new SyntaxError(`Comma ',' expected after value ${z()}`);i++}function F(){if(t.charCodeAt(i)!==po)throw new SyntaxError(`Colon ':' expected after property name ${z()}`);i++}function f(E){if(E===void 0)throw new SyntaxError(`JSON value expected ${z()}`)}function _(E){if(E===void 0)throw new SyntaxError(`Array item expected ${z()}`)}function p(){if(i<t.length)throw new SyntaxError(`Expected end of input ${z()}`)}function O(E){if(!st(t.charCodeAt(i))){const D=t.slice(E,i);throw new SyntaxError(`Invalid number '${D}', expecting a digit ${z()}`)}}function R(){if(t.charCodeAt(i)!==Ct)throw new SyntaxError(`End of string '"' expected ${z()}`)}function K(){throw new SyntaxError(`Quoted object key expected ${z()}`)}function ce(E){let{key:D,position:G}=E;throw new SyntaxError(`Duplicate key '${D}' encountered at position ${G}`)}function ne(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${z()}`)}function k(){throw new SyntaxError(`Array item or end of array ']' expected ${z()}`)}function T(E){throw new SyntaxError(`Invalid character '${E}' ${M()}`)}function q(E){const D=t.slice(E,E+2);throw new SyntaxError(`Invalid escape character '${D}' ${M()}`)}function se(){throw new SyntaxError(`Object value expected after ':' ${M()}`)}function le(E){const D=t.slice(E,E+6);throw new SyntaxError(`Invalid unicode character '${D}' ${M()}`)}function M(){return`at position ${i}`}function Ce(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function z(){return`${Ce()} ${M()}`}}function Xi(t){return t===io||t===oo||t===ao||t===co}function tt(t){return t>=Rt&&t<=kt||t>=mo&&t<=yo||t>=go&&t<=wo}function st(t){return t>=Rt&&t<=kt}function Qi(t){return t>=uo&&t<=kt}function eo(t){return t>=32&&t<=1114111}function xt(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,r)=>xt(s,e[r])):Ms(t)&&Ms(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>xt(t[s],e[s])):!1}function Ms(t){return typeof t=="object"&&t!==null}const to={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
11
- `,r:"\r",t:" "},so=92,ro=123,zs=125,no=91,Ws=93,io=32,oo=10,ao=9,co=13,Ct=34,lo=43,Js=45,Rt=48,uo=49,kt=57,ho=44,fo=46,po=58,mo=65,go=97,bo=69,_o=101,yo=70,wo=102;function Hs(t,e,s,r){return n(t);function n(l,d){if(Array.isArray(r)){const u=r.find(h=>h.test(l));if(u){const h=u.stringify(l);if(typeof h!="string"||!qs(h))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${h})`);return h}}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 h=0;h<l.length;h++){const b=l[h];typeof b<"u"&&typeof b!="function"?u+=n(b):u+="null",h<l.length-1&&(u+=",")}return u+="]",u}function i(l,d){if(typeof l.toJSON=="function")return Hs(l.toJSON(),e,s,void 0);const u=Array.isArray(e)?e.map(String):Object.keys(l);if(u.length===0)return"{}";let h=!0,b="{";for(const y of u){const x=l[y];if(a(y,x)){h?h=!1:b+=",";const v=JSON.stringify(y);b+=`${v}:`,b+=n(x)}}return b+="}",b}function a(l,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function vo(t){return je(t)&&!$s(t)?BigInt(t):parseFloat(t)}class Ks{id=1;constructor(){}async exec(e,s,r={},n={},o=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,n.manual=!0,(await Cs.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:s,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...n},timeout:o,transformRequest:[(i,a)=>Hs(i)],transformResponse:[i=>{try{return Gi(i,void 0,vo)}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,r,n,o){return this.exec("map_target_to_interface",[e,s],{cmd_only:r,tlm_only:n,unmap_old:o})}unmap_target_from_interface(e,s,r,n){return this.exec("unmap_target_from_interface",[e,s],{cmd_only:r,tlm_only:n})}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,...r){return this.exec("interface_cmd",[e,s,...r])}interface_target_enable(e,s,r=!1,n=!1){return this.exec("interface_target_enable",[e,s],{cmd_only:r,tlm_only:n})}interface_target_disable(e,s,r=!1,n=!1){return this.exec("interface_target_disable",[e,s],{cmd_only:r,tlm_only:n})}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,r,n,o){return this.exec("map_target_to_router",[e,s],{cmd_only:r,tlm_only:n,unmap_old:o})}unmap_target_from_router(e,s,r,n){return this.exec("unmap_target_from_router",[e,s],{cmd_only:r,tlm_only:n})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,s,r=!1,n=!1){return this.exec("router_target_enable",[e,s],{cmd_only:r,tlm_only:n})}router_target_disable(e,s,r=!1,n=!1){return this.exec("router_target_disable",[e,s],{cmd_only:r,tlm_only:n})}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,r){return this.exec("get_item",[e,s,r])}get_param(e,s,r){return this.exec("get_param",[e,s,r])}get_parameter(e,s,r){return this.exec("get_param",[e,s,r])}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,r,n=30){const o=await this.exec("get_tlm_packet",[e,s],{type:r,stale_time:n});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,r=null,n=null,o=null){let i={stale_time:s};r!==null&&(i.cache_timeout=r),n!==null&&(i.start_time=n.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,r){return this.exec("get_limits",[e,s,r])}async tlm(e,s,r,n="CONVERTED"){let o=null;if(s===void 0)o=await this.exec("tlm",[e]);else if(r===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,r],{type:n});let i=this.decode_openc3_type(o);return i!==null&&(o=i),o}async inject_tlm(e,s,r=null,n="CONVERTED",o=!1){await this.exec("inject_tlm",[e,s,r],{type:n,stored:o})}set_tlm(e,s,r,n){return this.exec("set_tlm",[e,s,r],{type:n})}override_tlm(e,s,r,n){return this.exec("override_tlm",[e,s,r],{type:n})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,s,r,n){return this.exec("normalize_tlm",[e,s,r],{type:n})}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,r,n="CONVERTED"){return this.exec("get_cmd_value",[e,s,r,n])}get_cmd_buffer(e,s){return this.exec("get_cmd_buffer",[e,s])}_cmd(e,s,r,n,o,i={}){let a=null;for(let l in n)Object.prototype.hasOwnProperty.call(n,l)&&(a=this.encode_openc3_type(n[l]),a!==null&&(n[l]=a));return this.exec(e,[s,r,n],i,o)}get_cmd_hazardous(e,s,r,n={}){return s===void 0?this.exec("get_cmd_hazardous",e,{},n):this._cmd("get_cmd_hazardous",e,s,r,n)}cmd(e,s,r,n={},o={}){return s===void 0?this.exec("cmd",e,o,n):this._cmd("cmd",e,s,r,n,o)}cmd_no_range_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_range_check",e,o,n):this._cmd("cmd_no_range_check",e,s,r,n,o)}cmd_raw(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw",e,o,n):this._cmd("cmd_raw",e,s,r,n,o)}cmd_raw_no_range_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_range_check",e,o,n):this._cmd("cmd_raw_no_range_check",e,s,r,n,o)}cmd_no_hazardous_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_hazardous_check",e,o,n):this._cmd("cmd_no_hazardous_check",e,s,r,n,o)}cmd_no_checks(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_checks",e,o,n):this._cmd("cmd_no_checks",e,s,r,n,o)}cmd_raw_no_hazardous_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_hazardous_check",e,o,n):this._cmd("cmd_raw_no_hazardous_check",e,s,r,n,o)}cmd_raw_no_checks(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_checks",e,o,n):this._cmd("cmd_raw_no_checks",e,s,r,n,o)}build_cmd(e,s,r,n={},o={}){return s===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,s,r,n,o)}build_command(e,s,r,n={},o={}){return s===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,s,r,n,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,r){return this.exec("save_config",[e,s,r])}delete_config(e,s){return this.exec("delete_config",[e,s])}enable_limits(e,s,r){return this.exec("enable_limits",[e,s,r])}disable_limits(e,s,r){return this.exec("disable_limits",[e,s,r])}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),r=await crypto.subtle.digest("SHA-256",s),n=new Uint8Array(r);return Array.from(n).map(o=>o.toString(16).padStart(2,"0")).join("")}}}const So={components:{ValueWidget:Ft,ValuelimitsbarWidget:Bt},mixins:[it],props:{modelValue:{type:Array,default:()=>[]},timeZone:{type:String,default:"local"}},emits:["update:modelValue"],data(){return{api:null,cable:new Bs,ignored:[],ignoredItemsDialog:!1,overallState:"GREEN",currentLimitsSet:"",items:[],itemList:[],screenItems:[],availableItems:[],screenValues:{},updateCounter:0,itemsPerPage:25,search:"",stateFilter:[],stateFilterOptions:[{value:"RED",label:"Critical",status:"critical"},{value:"YELLOW",label:"Caution",status:"caution"},{value:"GREEN",label:"Normal",status:"normal"},{value:"BLUE",label:"Standby",status:"standby"}],headers:[{title:"Timestamp",key:"timestamp",width:"130px",sortable:!0,nowrap:!0},{title:"Item",key:"item",value:t=>t.parameters[2],sortable:!0,minWidth:"100px",width:"200px",maxWidth:"410px"},{title:"Value",key:"value",width:"380px",sortable:!1},{title:"Controls",key:"actions",width:"80px",sortable:!1},{title:"",key:"limits",sortable:!1}],valueLimitsBarWidgetSettings:[["WIDTH","380px"],["0","WIDTH","200px"],["1","WIDTH","180px"]],valueWidgetSettings:[["WIDTH","200px"]]}},computed:{textFieldClass(){return this.overallState?`textfield-${this.overallState.toLowerCase()}`:""},overallStateFormatted(){return this.ignored.length===0?this.overallState:`${this.overallState} (Some items ignored)`},ignoredFormatted(){return this.ignored.map(t=>t.split("__").join(" "))},astroStatus(){switch(this.overallState){case"GREEN":return"normal";case"YELLOW":return"caution";case"RED":return"critical";case"BLUE":return"standby";default:return null}}},created(){this.api=new Ks;for(let t of this.modelValue)t.match(/.+__.+__.+/)?this.ignoreItem(t,!0):this.ignorePacket(t,!0);this.updateOutOfLimits(),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,10*1e3),this.cable.createSubscription("LimitsEventsChannel",window.openc3Scope,{received:t=>{this.cable.recordPing(),this.handleMessages(t)}}).then(t=>{this.limitsSubscription=t}),this.cable.createSubscription("ConfigEventsChannel",window.openc3Scope,{received:t=>{this.cable.recordPing();const e=JSON.parse(t);this.handleConfigEvents(e)}}).then(t=>{this.configSubscription=t})},mounted(){this.updater=setInterval(()=>{this.update()},1e3)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null),this.limitsSubscription&&this.limitsSubscription.unsubscribe(),this.configSubscription&&this.configSubscription.unsubscribe(),this.cable.disconnect()},methods:{rowProps({item:t}){return this.stateFilter.length>0&&!this.stateFilter.some(e=>t.limitsState?.includes(e))?{class:"state-filtered-row"}:{}},escapeBrackets(t){return t.includes("[")?t.replace(/\[/g,"[[").replace(/\]/g,"]]"):t},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})},updateOutOfLimits(){this.items=[],this.itemList=[],this.api.get_out_of_limits().then(t=>{for(const e of t){let s=e.join("__");if(this.ignored.find(n=>s.includes(n)))continue;this.itemList.push(s);let r={key:e.slice(0,3).join("__"),parameters:[e[0],e[1],this.escapeBrackets(e[2])],timestamp:this.formatDateTime(new Date,this.timeZone),limitsState:e[3]};e[3].includes("YELLOW")&&this.overallState!=="RED"&&(this.overallState="YELLOW"),e[3].includes("RED")&&(this.overallState="RED"),e[3]=="YELLOW"||e[3]=="RED"?r.limits=!1:r.limits=!0,this.items.push(r)}this.calcOverallState()})},calcOverallState(){let t="GREEN";for(let e of this.itemList)if(!this.ignored.find(s=>e.includes(s))&&(e.includes("YELLOW")&&t!=="RED"&&(t="YELLOW"),e.includes("RED"))){t="RED";break}this.overallState=t},ignorePacket(t,e){let[s,r,n]=t.split("__"),o=`${s}__${r}`;for(this.ignored.push(o),e||this.updateIgnored();;){let i=this.itemList.findIndex(a=>a.includes(o));if(i===-1)break;{let a=this.itemList[i].lastIndexOf("__");this.removeItem(this.itemList[i].substring(0,a))}}this.calcOverallState()},ignoreItem(t,e){this.ignored.push(t),e||this.updateIgnored(),this.removeItem(t),this.calcOverallState()},restoreItem(t){this.ignored.splice(t,1),this.updateIgnored(),this.updateOutOfLimits()},removeItem(t){const e=this.itemList.findIndex(s=>s.includes(t));this.items.splice(e,1),this.itemList.splice(e,1)},clearAll(){this.ignored=[],this.updateIgnored(),this.updateOutOfLimits()},updateIgnored(){this.$emit("update:modelValue",this.ignored)},handleConfigEvents(t){for(let e of t)e.kind==="deleted"&&e.type==="target"&&this.updateOutOfLimits()},handleMessages(t){for(let e of t){let s=JSON.parse(e.event);if(s.type!="LIMITS_CHANGE"||s.suppress_stored)continue;let r=`${s.target_name}__${s.packet_name}__${s.item_name}`;const n=this.itemList.findIndex(i=>i.includes(r));if(n!==-1){this.itemList[n]=`${r}__${s.new_limits_state}`,this.items[n].limitsState=s.new_limits_state,this.calcOverallState();continue}if(this.ignored.find(i=>r.includes(i))||s.new_limits_state&&!(s.new_limits_state.includes("YELLOW")||s.new_limits_state.includes("RED")))continue;let o={key:r,timestamp:this.formatNanoseconds(s.time_nsec,this.timeZone),parameters:[s.target_name,s.packet_name,this.escapeBrackets(s.item_name)],limitsState:s.new_limits_state};s.new_limits_state=="YELLOW"||s.new_limits_state=="RED"?o.limits=!1:o.limits=!0,this.itemList.push(`${r}__${s.new_limits_state}`),this.items.push(o),this.calcOverallState()}},update(){this.availableItems.length!==0&&this.api.get_tlm_values(this.availableItems).then(t=>{this.updateValues(t)})},updateValues:function(t){this.updateCounter+=1;for(let e=0;e<t.length;e++)t[e].push(this.updateCounter),this.screenValues[this.screenItems[e]]=t[e]},addItem:function(t){this.api.get_tlm_available([t]).then(e=>{this.screenItems.push(t),this.availableItems.push(e[0]),this.screenValues[e[0]]=[null,null,0]})},deleteItem:function(t){let e=this.screenItems.indexOf(t);this.availableItems.splice(e,1),this.screenItems.splice(e,1)},showIgnored(){this.ignoredItemsDialog=!0},customFilter(t,e,s){if(!e||e.trim()==="")return!0;if(e=e.toLowerCase(),s.parameters&&s.parameters.length>0){for(const r of s.parameters)if(r.toLowerCase().includes(e))return!0}return!!(s.timestamp&&s.timestamp.toLowerCase().includes(e)||s.key&&s.key.toLowerCase().includes(e))}}},Eo=["status"],Oo={key:0},xo=["status"],Co={class:"font-weight-black"};function Ro(t,e,s,r,n,o){const i=S("v-text-field"),a=S("v-spacer"),l=S("v-list-item"),d=S("v-select"),u=S("v-row"),h=S("valuelimitsbar-widget"),b=S("value-widget"),y=S("v-btn"),x=S("v-icon"),v=S("v-list-item-title"),F=S("v-list"),f=S("v-menu"),_=S("v-data-table"),p=S("v-card"),O=S("v-toolbar"),R=S("v-divider"),K=S("v-card-text"),ce=S("v-card-actions"),ne=S("v-dialog");return I(),Z("div",null,[w(p,{class:"pa-5"},{default:g(()=>[w(u,{class:"ma-1"},{default:g(()=>[w(i,{density:"compact",variant:"outlined",readonly:"","hide-details":"",label:"Overall Limits State","model-value":o.overallStateFormatted,class:at(o.textFieldClass),style:{"margin-right":"10px","max-width":"280px"},"data-test":"overall-state"},Ve({_:2},[o.astroStatus?{name:"prepend-inner",fn:g(()=>[J("rux-status",{status:o.astroStatus},null,8,Eo)]),key:"0"}:void 0]),1032,["model-value","class"]),w(i,{density:"compact",variant:"outlined",readonly:"","hide-details":"",label:"Current Limits Set","model-value":n.currentLimitsSet,style:{"max-width":"200px"},"data-test":"limits-set"},null,8,["model-value"]),w(a),w(d,{modelValue:n.stateFilter,"onUpdate:modelValue":e[0]||(e[0]=k=>n.stateFilter=k),items:n.stateFilterOptions,"item-title":"label","item-value":"value",label:"Filter by State",multiple:"",clearable:"",variant:"outlined",density:"compact","hide-details":"",class:"mr-2",style:{"max-width":"300px"},"data-test":"state-filter"},{selection:g(({index:k})=>[k===0?(I(),Z("span",Oo,Q(n.stateFilter.length)+" selected ",1)):ae("",!0)]),item:g(({props:k,item:T})=>[w(l,jt(Dt(k)),{prepend:g(()=>[J("rux-status",{status:T.raw.status,class:"mr-2"},null,8,xo)]),_:2},1040)]),_:1},8,["modelValue","items"]),w(i,{modelValue:n.search,"onUpdate:modelValue":e[1]||(e[1]=k=>n.search=k),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"},"data-test":"search"},null,8,["modelValue"])]),_:1}),w(_,{"items-per-page":n.itemsPerPage,"onUpdate:itemsPerPage":e[2]||(e[2]=k=>n.itemsPerPage=k),headers:n.headers,items:n.items,search:n.search,"custom-filter":o.customFilter,"row-props":o.rowProps,"item-value":"key","data-test":"limits-table",class:"limits-table",density:"compact"},{"item.timestamp":g(({item:k})=>[U(Q(k.timestamp),1)]),"item.value":g(({item:k})=>[k.limits?(I(),N(h,{key:0,parameters:k.parameters,settings:n.valueLimitsBarWidgetSettings,"screen-values":n.screenValues,"screen-time-zone":s.timeZone,onAddItem:o.addItem,onDeleteItem:o.deleteItem},null,8,["parameters","settings","screen-values","screen-time-zone","onAddItem","onDeleteItem"])):(I(),N(b,{key:1,parameters:k.parameters,settings:n.valueWidgetSettings,"screen-values":n.screenValues,"screen-time-zone":s.timeZone,onAddItem:o.addItem,onDeleteItem:o.deleteItem},null,8,["parameters","settings","screen-values","screen-time-zone","onAddItem","onDeleteItem"]))]),"item.actions":g(({item:k})=>[w(f,null,{activator:g(({props:T})=>[w(y,$e({icon:"mdi-dots-horizontal",variant:"text",density:"compact","aria-label":"Item Options"},T),null,16)]),default:g(()=>[w(F,null,{default:g(()=>[w(l,{onClick:T=>o.ignorePacket(k.key)},{prepend:g(()=>[w(x,null,{default:g(()=>[...e[5]||(e[5]=[U("mdi-close-circle-multiple",-1)])]),_:1})]),default:g(()=>[w(v,null,{default:g(()=>[...e[6]||(e[6]=[U("Ignore Entire Packet",-1)])]),_:1})]),_:1},8,["onClick"]),w(l,{onClick:T=>o.ignoreItem(k.key)},{prepend:g(()=>[w(x,null,{default:g(()=>[...e[7]||(e[7]=[U("mdi-close-circle",-1)])]),_:1})]),default:g(()=>[w(v,null,{default:g(()=>[...e[8]||(e[8]=[U("Ignore Item",-1)])]),_:1})]),_:1},8,["onClick"]),w(l,{onClick:T=>o.removeItem(k.key)},{prepend:g(()=>[w(x,null,{default:g(()=>[...e[9]||(e[9]=[U("mdi-eye-off",-1)])]),_:1})]),default:g(()=>[w(v,null,{default:g(()=>[...e[10]||(e[10]=[U("Temporarily Hide Item",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),"item.limits":g(({item:k})=>[w(a)]),_:1},8,["items-per-page","headers","items","search","custom-filter","row-props"]),e[11]||(e[11]=J("div",{class:"footer"},' Note: Timestamp is "now" for items currently out of limits when the page is loaded. ',-1))]),_:1}),w(ne,{modelValue:n.ignoredItemsDialog,"onUpdate:modelValue":e[4]||(e[4]=k=>n.ignoredItemsDialog=k),"max-width":"600"},{default:g(()=>[w(p,null,{default:g(()=>[w(O,{height:"24"},{default:g(()=>[w(a),e[12]||(e[12]=J("span",null,"Ignored Items",-1)),w(a)]),_:1}),w(K,{class:"mt-2"},{default:g(()=>[J("div",null,[(I(!0),Z(de,null,ye(o.ignoredFormatted,(k,T)=>(I(),Z("div",{key:T},[w(u,{class:"ma-1 align-center"},{default:g(()=>[J("span",Co,Q(k),1),w(a),w(y,{icon:"mdi-delete",density:"compact",variant:"text","aria-label":"Remove Ignored Item","data-test":`remove-ignore-${T}`,onClick:q=>o.restoreItem(T)},null,8,["data-test","onClick"])]),_:2},1024),T<o.ignoredFormatted.length-1?(I(),N(R,{key:T})):ae("",!0)]))),128))])]),_:1}),w(ce,{class:"px-2"},{default:g(()=>[w(y,{variant:"outlined",onClick:o.clearAll},{default:g(()=>[...e[13]||(e[13]=[U(" Clear All ",-1)])]),_:1},8,["onClick"]),w(a),w(y,{variant:"flat",onClick:e[3]||(e[3]=k=>n.ignoredItemsDialog=!1)},{default:g(()=>[...e[14]||(e[14]=[U(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const ko=qe(So,[["render",Ro],["__scopeId","data-v-b6f77818"]]),Ao={mixins:[it],props:{historyCount:{type:Number,default:1e3},timeZone:{type:String,default:"local"}},data(){return{data:[],cable:new Bs,search:"",headers:[{title:"Time",value:"time_nsec",width:250},{title:"Level",value:"level",sortable:!1},{title:"Message",value:"message"}]}},created(){this.cable.createSubscription("LimitsEventsChannel",window.openc3Scope,{received:t=>{this.cable.recordPing(),this.handleMessages(t)}},{historyCount:1e3}).then(t=>{this.limitsSubscription=t})},unmounted(){this.limitsSubscription&&this.limitsSubscription.unsubscribe(),this.cable.disconnect()},methods:{handleMessages(t){for(let e=0;e<t.length;e++){let s=JSON.parse(t[e].event);this.data.unshift(s)}this.data.length>this.historyCount&&(this.data.length=this.historyCount)},getStatus(t){return t.includes("GREEN")?"normal":t.includes("YELLOW")?"caution":t.includes("RED")?"critical":t.includes("BLUE")?"standby":"off"},getColorClass(t){return t.includes("GREEN")?"openc3-green":t.includes("YELLOW")?"openc3-yellow":t.includes("RED")?"openc3-red":t.includes("BLUE")?"openc3-blue":"openc3-white"},calcTableHeight(){return window.innerHeight-250}}},Io=["status"];function Po(t,e,s,r,n,o){const i=S("v-spacer"),a=S("v-text-field"),l=S("v-card-title"),d=S("v-data-table"),u=S("v-card");return I(),N(u,{class:"card-height"},{default:g(()=>[w(l,{class:"d-flex align-center"},{default:g(()=>[e[1]||(e[1]=U(" Limits Events ",-1)),w(i),w(a,{modelValue:n.search,"onUpdate:modelValue":e[0]||(e[0]=h=>n.search=h),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),w(d,{headers:n.headers,items:n.data,search:n.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact",height:o.calcTableHeight(),hover:"","data-test":"limits-events"},{"item.time_nsec":g(({item:h})=>[J("span",null,Q(t.formatNanoseconds(h.time_nsec,s.timeZone)),1)]),"item.level":g(({item:h})=>[J("rux-status",{status:o.getStatus(h.message)},null,8,Io)]),"item.message":g(({item:h})=>[J("span",{class:at(o.getColorClass(h.message))},Q(h.message),3)]),_:1},8,["headers","items","search","height"])]),_:1})}const To={components:{LimitsControl:ko,LimitsEvents:qe(Ao,[["render",Po],["__scopeId","data-v-192a6dcb"]]),TopBar:ar,OpenConfigDialog:Tt,SaveConfigDialog:Pt},mixins:[lr],data(){return{title:"Limits Monitor",configKey:"limits_monitor",api:new Ks,timeZone:"local",renderKey:0,ignored:[],openConfig:!1,saveConfig:!1,limitsSets:[],currentLimitsSet:null,currentSetRefreshInterval:null,limitsSetDialog:!1,menus:[{label:"File",items:[{label:"Show Ignored",icon:"mdi-magnify-close",command:()=>{this.$refs.control.showIgnored()}},{label:"Change Limits Set",icon:"mdi-swap-horizontal",command:()=>{this.limitsSetDialog=!0}},{divider:!0},{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.ignored=[],this.resetConfigBase(),this.renderKey++}}]}]}},created(){this.api.get_limits_sets().then(t=>{this.limitsSets=t}),this.api.get_setting("time_zone").then(t=>{t&&(this.timeZone=t)}).catch(t=>{})},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.ignored=t,this.renderKey++)}},unmounted:function(){clearInterval(this.currentSetRefreshInterval)},methods:{setLimitsSet:function(){this.api.set_limits_set(this.currentLimitsSet),this.limitsSetDialog=!1,this.renderKey++},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,s=>{this.ignored=s,this.renderKey++})},saveConfiguration:function(t){this.saveConfigBase(t,this.ignored)}}};function Lo(t,e,s,r,n,o){const i=S("top-bar"),a=S("limits-control"),l=S("limits-events"),d=S("open-config-dialog"),u=S("save-config-dialog"),h=S("v-spacer"),b=S("v-toolbar"),y=S("v-select"),x=S("v-card-text"),v=S("v-btn"),F=S("v-card-actions"),f=S("v-card"),_=S("v-dialog");return I(),Z("div",null,[w(i,{menus:n.menus,title:n.title},null,8,["menus","title"]),(I(),N(a,{ref:"control",key:n.renderKey,modelValue:n.ignored,"onUpdate:modelValue":e[0]||(e[0]=p=>n.ignored=p),"time-zone":n.timeZone},null,8,["modelValue","time-zone"])),e[12]||(e[12]=J("div",{style:{height:"15px"}},null,-1)),w(l,{"time-zone":n.timeZone},null,8,["time-zone"]),n.openConfig?(I(),N(d,{key:0,modelValue:n.openConfig,"onUpdate:modelValue":e[1]||(e[1]=p=>n.openConfig=p),"config-key":n.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):ae("",!0),n.saveConfig?(I(),N(u,{key:1,modelValue:n.saveConfig,"onUpdate:modelValue":e[2]||(e[2]=p=>n.saveConfig=p),"config-key":n.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):ae("",!0),w(_,{modelValue:n.limitsSetDialog,"onUpdate:modelValue":e[5]||(e[5]=p=>n.limitsSetDialog=p),"max-width":"650",persistent:"",onKeydown:e[6]||(e[6]=Ut(p=>n.limitsSetDialog=!1,["esc"]))},{default:g(()=>[w(f,null,{default:g(()=>[w(b,{height:"24"},{default:g(()=>[w(h),e[7]||(e[7]=J("span",null,"Change Limits Set",-1)),w(h)]),_:1}),w(x,{class:"mt-6"},{default:g(()=>[e[8]||(e[8]=J("span",{style:{display:"block"}}," The Limits Set is a global option which changes the Limits Set across all tools. ",-1)),e[9]||(e[9]=J("span",{style:{display:"block"}}," NOTE: Changing this option clears the current list and recalculates based on the new set. ",-1)),w(y,{modelValue:n.currentLimitsSet,"onUpdate:modelValue":e[3]||(e[3]=p=>n.currentLimitsSet=p),label:"Limits Set",items:n.limitsSets,density:"compact",variant:"outlined","data-test":"change-limits-set","hide-details":"",class:"mt-3",style:{"max-width":"200px"}},null,8,["modelValue","items"])]),_:1}),w(F,{class:"px-2"},{default:g(()=>[w(h),w(v,{variant:"outlined",onClick:e[4]||(e[4]=p=>n.limitsSetDialog=!1)},{default:g(()=>[...e[10]||(e[10]=[U(" Cancel ",-1)])]),_:1}),w(v,{variant:"flat",onClick:o.setLimitsSet},{default:g(()=>[...e[11]||(e[11]=[U(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const ta=sr("default",qe(To,[["render",Lo]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./GraphWidget-Cs9mvqUu-efd9e594ef7300c72bb5.js","./main-3f4adf203e54e3907c1d.js","vue","./Graph-BKw7xw1a-820676b2302713d6d67b.js","single-spa","./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","vue-router","pinia","vuetify","./OpenC3TimePicker-B8Vu9GBz-2840b980fa4ee81bd205.js"],(function(p,c){"use strict";var s,n,a,r,o,l,d;return{setters:[t=>{s=t.M},t=>{n=t.i},t=>{a=t.resolveComponent,r=t.openBlock,o=t.createBlock,l=t.normalizeStyle},t=>{d=t.Y},null,null,null,null,null,null],execute:(function(){const t={components:{Graph:d},mixins:[s]};function h(e,i,g,v,z,f){const u=a("graph");return r(),o(u,{id:e.id,ref:"graph"+e.id,state:e.state,"selected-graph-id":e.id,"start-time":e.startTime,"seconds-graphed":e.secondsGraphed,"points-saved":e.pointsSaved,"points-graphed":e.pointsGraphed,"initial-items":e.items,height:e.size.height,width:e.size.width,style:l(e.computedStyle),"time-zone":e.screenTimeZone,"hide-toolbar":"","hide-overview":"",onPause:i[0]||(i[0]=()=>e.state="pause"),onStart:i[1]||(i[1]=()=>e.state="start")},null,8,["id","state","selected-graph-id","start-time","seconds-graphed","points-saved","points-graphed","initial-items","height","width","style","time-zone"])}const m=p("default",n(t,[["render",h]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","vue","./main-3f4adf203e54e3907c1d.js","vue-router","pinia","single-spa","vuetify"],(function(s,v){"use strict";var l,t,n,a,r,u;return{setters:[e=>{l=e.h},e=>{t=e.resolveComponent,n=e.openBlock,a=e.createBlock,r=e.normalizeStyle},e=>{u=e.i},null,null,null,null],execute:(function(){const e={mixins:[l],props:{value:{type:Number,default:null}},data(){return{label:"Radio"}},created(){this.label=this.parameters[0]}};function o(i,y,c,b,p,f){const d=t("v-radio");return n(),a(d,{"hide-details":"",dense:"",label:p.label,style:r(i.computedStyle),value:c.value},null,8,["label","style","value"])}const m=s("default",u(e,[["render",o]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","vue","./main-3f4adf203e54e3907c1d.js","vue-router","pinia","single-spa","vuetify"],(function(m,p){"use strict";var l,r,a,c,u,o;return{setters:[t=>{l=t.h},t=>{r=t.resolveComponent,a=t.openBlock,c=t.createBlock,u=t.normalizeStyle},t=>{o=t.i},null,null,null,null],execute:(function(){const t={mixins:[l],props:{value:{type:[Number,String],default:null}},emits:["addItem","deleteItem","open"],data:function(){return{valueId:null,icon:"",label:"",subLabel:"",items:[],screenTarget:null,screenName:null}},computed:{status:function(){let e="off";for(const i of this.items){let s=this.screenValues[i][1];s&&((s.includes("BLUE")||s.includes("GREEN"))&&e!="caution"&&e!="critical"&&(e="normal"),s.includes("YELLOW")&&e!="critical"&&(e="caution"),s.includes("RED")&&(e="critical"))}return e},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.icon=this.parameters[0],this.label=this.parameters[1],this.subLabel=this.parameters[2],this.appliedSettings.forEach(e=>{switch(e[0].toUpperCase()){case"SCREEN":this.screenTarget=e[1],this.screenName=e[2];break;case"TLM":let i="CONVERTED";e[4]&&(i=e[4]);let s=`${e[1]}__${e[2]}__${e[3]}__${i}`;this.items.push(s),this.$emit("addItem",s);break}})},unmounted:function(){this.items.forEach(e=>{this.$emit("deleteItem",e)})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}};function h(e,i,s,f,E,n){const d=r("rux-monitoring-icon");return a(),c(d,{class:"rux-icon",style:u([n.pointerStyle,e.computedStyle]),icon:e.icon,status:n.status,label:e.label,sublabel:e.subLabel,onClick:n.clickHandler},null,8,["style","icon","status","label","sublabel","onClick"])}const b=m("default",o(t,[["render",h]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","vue","./main-3f4adf203e54e3907c1d.js","vue-router","pinia","single-spa","vuetify"],(function(l,o){"use strict";var t,i,n,s,r;return{setters:[e=>{t=e.h},e=>{i=e.openBlock,n=e.createElementBlock,s=e.normalizeStyle},e=>{r=e.i},null,null,null,null],execute:(function(){const e={mixins:[t],created(){this.parameters[0]!==void 0&&this.appliedSettings.push(["WIDTH",this.parameters[0]]),this.parameters[1]!==void 0&&this.appliedSettings.push(["HEIGHT",this.parameters[1]])}};function a(u,p,m,d,h,v){return i(),n("div",{style:s(u.computedStyle)},null,4)}const c=l("default",r(e,[["render",a]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./GraphWidget-Cs9mvqUu-efd9e594ef7300c72bb5.js","./main-3f4adf203e54e3907c1d.js","vue","./Graph-BKw7xw1a-820676b2302713d6d67b.js","single-spa","./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","vue-router","pinia","vuetify","./OpenC3TimePicker-B8Vu9GBz-2840b980fa4ee81bd205.js"],(function(l,c){"use strict";var i,s,n,r,a,d,o;return{setters:[e=>{i=e.M},e=>{s=e.i},e=>{n=e.resolveComponent,r=e.openBlock,a=e.createBlock,d=e.normalizeStyle},e=>{o=e.Y},null,null,null,null,null,null],execute:(function(){const e={components:{Graph:o},mixins:[i],data:function(){return{secondsGraphed:300,pointsSaved:300,pointsGraphed:300,size:{height:30,width:130}}}};function p(t,g,m,v,f,z){const h=n("graph");return r(),a(h,{id:t.id,ref:"graph"+t.id,state:t.state,"selected-graph-id":t.id,"start-time":t.startTime,"seconds-graphed":t.secondsGraphed,"points-saved":t.pointsSaved,"points-graphed":t.pointsGraphed,"initial-items":t.items,height:t.size.height,width:t.size.width,style:d(t.computedStyle),sparkline:""},null,8,["id","state","selected-graph-id","start-time","seconds-graphed","points-saved","points-graphed","initial-items","height","width","style"])}const u=l("default",s(e,[["render",p]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./main-3f4adf203e54e3907c1d.js","vue","./DetailsDialog-DE7lK17G-9523ea864df66f3e37b8.js","single-spa","./VWidget-5qOYva88-45447a85bf7f7f3e4fc1.js","vue-router","pinia","vuetify","./LimitsBar-DN1s8-MS-87bfe441f506b01bb80c.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./Widget-CtYQauzA-b426b323af3e6d9eb01f.js"],(function(y,N){"use strict";var c,a,s,o,n,u,m,l,d,h,p,g,v,x,C,w;return{setters:[e=>{c=e.i},e=>{a=e.resolveComponent,s=e.openBlock,o=e.createElementBlock,n=e.createVNode,u=e.normalizeStyle,m=e.normalizeClass,l=e.withCtx,d=e.Fragment,h=e.renderList,p=e.createBlock,g=e.withModifiers,v=e.createTextVNode,x=e.toDisplayString},e=>{C=e.Z},null,e=>{w=e.T},null,null,null,null,null,null],execute:(function(){const e={components:{DetailsDialog:C},mixins:[w],data:function(){return{width:200,height:200}},computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height)},methods:{getType:function(){let t="CONVERTED";return this.parameters[5]&&(t=this.parameters[5]),t}}},f={class:"textbox-widget-container"};function V(t,r,E,L,O,k){const D=a("v-textarea"),B=a("v-list-item-title"),S=a("v-list-item"),T=a("v-list"),_=a("v-menu"),z=a("details-dialog");return s(),o("div",f,[n(D,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":t._value,class:m(t.valueClass),style:u([t.computedStyle,k.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),n(_,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=i=>t.contextMenuShown=i),target:[t.x,t.y]},{default:l(()=>[n(T,null,{default:l(()=>[(s(!0),o(d,null,h(t.contextMenuOptions,(i,M)=>(s(),p(S,{key:M,onClick:g(i.action,["stop"])},{default:l(()=>[n(B,null,{default:l(()=>[v(x(i.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),n(z,{modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=i=>t.viewDetails=i),"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const j=y("default",c(e,[["render",V],["__scopeId","data-v-ce1e6683"]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","vue","./main-3f4adf203e54e3907c1d.js","vue-router","pinia","single-spa","vuetify"],(function(u,p){"use strict";var t,l,n,a,s,i;return{setters:[e=>{t=e.h},e=>{l=e.resolveComponent,n=e.openBlock,a=e.createBlock,s=e.normalizeStyle},e=>{i=e.i},null,null,null,null],execute:(function(){const e={mixins:[t],data(){return{value:null}},created(){this.setWidth(this.parameters[0],"ch",12),this.parameters[1]&&(this.value=this.parameters[1])},methods:{text(){return this.value}}};function c(d,r,y,f,o,g){const h=l("v-text-field");return n(),a(h,{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=m=>o.value=m),variant:"solo",density:"compact","single-line":"","hide-no-data":"","hide-details":"",style:s(d.computedStyle)},null,8,["modelValue","style"])}const v=u("default",i(e,[["render",c]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","./OpenC3TimePicker-B8Vu9GBz-2840b980fa4ee81bd205.js","./main-3f4adf203e54e3907c1d.js","vue","vue-router","pinia","single-spa","vuetify"],(function(c,f){"use strict";var l,i,n,a,r,s,u,o;return{setters:[e=>{l=e.h},e=>{i=e.w},e=>{n=e.i,a=e.R},e=>{r=e.resolveComponent,s=e.openBlock,u=e.createBlock,o=e.normalizeStyle},null,null,null,null],execute:(function(){const e={components:{OpenC3TimePicker:i},mixins:[l,a],data(){return{label:"Time",timeValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.timeValue=this.formatTimeHMS(new Date,this.screenTimeZone)},methods:{text(){return this.timeValue},time(){return this.timeValue}}};function p(h,m,y,T,t,v){const d=r("OpenC3TimePicker");return s(),u(d,{modelValue:t.timeValue,"onUpdate:modelValue":m[0]||(m[0]=V=>t.timeValue=V),label:t.label,style:o(h.computedStyle),"hide-details":""},null,8,["modelValue","label","style"])}const k=c("default",n(e,[["render",p]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./ValueWidget-CAkuc_w_-fe817796128b0ef92a25.js","./LimitsbarWidget-Cqhh7LKU-a1789aa61517526bcc09.js","./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","vue","./main-3f4adf203e54e3907c1d.js","./DetailsDialog-DE7lK17G-9523ea864df66f3e37b8.js","./LimitsBar-DN1s8-MS-87bfe441f506b01bb80c.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","single-spa","./VWidget-5qOYva88-45447a85bf7f7f3e4fc1.js","vue-router","pinia","vuetify","./BarColumn-Bb305iCi-79a8ef39781f64eed269.js"],(function(g,f){"use strict";var i,r,a,n,u,c,o,s,l,m;return{setters:[e=>{i=e.default},e=>{r=e.default},e=>{a=e.h},e=>{n=e.resolveComponent,u=e.openBlock,c=e.createElementBlock,o=e.normalizeStyle,s=e.createVNode,l=e.mergeProps},e=>{m=e.i},null,null,null,null,null,null,null,null,null],execute:(function(){const e={components:{ValueWidget:i,LimitsbarWidget:r},mixins:[a]};function p(t,j,C,b,w,S){const d=n("value-widget"),v=n("limitsbar-widget");return u(),c("div",{ref:"container",class:"d-flex flex-row",style:o(t.computedStyle)},[s(d,l(t.$attrs,{parameters:t.parameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"widget-index":0}),null,16,["parameters","settings","screen-values","screen-time-zone"]),s(v,l(t.$attrs,{parameters:t.parameters.slice(0,3),settings:[...t.appliedSettings],"screen-values":t.screenValues,"widget-index":1,line:t.line,"line-number":t.lineNumber}),null,16,["parameters","settings","screen-values","line","line-number"])],4)}const B=g("default",m(e,[["render",p]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./ValueWidget-CAkuc_w_-fe817796128b0ef92a25.js","./LimitscolumnWidget-B1GdmlR_-9822570e890afde24370.js","./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","vue","./main-3f4adf203e54e3907c1d.js","./DetailsDialog-DE7lK17G-9523ea864df66f3e37b8.js","./LimitsBar-DN1s8-MS-87bfe441f506b01bb80c.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","single-spa","./VWidget-5qOYva88-45447a85bf7f7f3e4fc1.js","vue-router","pinia","vuetify","./BarColumn-Bb305iCi-79a8ef39781f64eed269.js"],(function(g,B){"use strict";var i,r,a,n,u,o,c,s,l,m;return{setters:[e=>{i=e.default},e=>{r=e.default},e=>{a=e.h},e=>{n=e.resolveComponent,u=e.openBlock,o=e.createElementBlock,c=e.normalizeStyle,s=e.createVNode,l=e.mergeProps},e=>{m=e.i},null,null,null,null,null,null,null,null,null],execute:(function(){const e={components:{ValueWidget:i,LimitscolumnWidget:r},mixins:[a]};function d(t,j,C,V,S,w){const p=n("limitscolumn-widget"),v=n("value-widget");return u(),o("div",{ref:"container",style:c(t.computedStyle)},[s(p,l(t.$attrs,{parameters:t.parameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"widget-index":1,line:t.line,"line-number":t.lineNumber}),null,16,["parameters","settings","screen-values","line","line-number"]),s(v,l(t.$attrs,{parameters:t.parameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"widget-index":0}),null,16,["parameters","settings","screen-values","screen-time-zone"])],4)}const f=g("default",m(e,[["render",d]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./ValueWidget-CAkuc_w_-fe817796128b0ef92a25.js","./RangebarWidget-i2mlnxys-91ae8bee9414bae8709f.js","./Widget-CtYQauzA-b426b323af3e6d9eb01f.js","vue","./main-3f4adf203e54e3907c1d.js","./DetailsDialog-DE7lK17G-9523ea864df66f3e37b8.js","./LimitsBar-DN1s8-MS-87bfe441f506b01bb80c.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","single-spa","./VWidget-5qOYva88-45447a85bf7f7f3e4fc1.js","vue-router","pinia","vuetify"],(function(g,f){"use strict";var n,i,l,r,u,m,o,s,a,p;return{setters:[e=>{n=e.default},e=>{i=e.default},e=>{l=e.h},e=>{r=e.resolveComponent,u=e.openBlock,m=e.createElementBlock,o=e.normalizeStyle,s=e.createVNode,a=e.mergeProps},e=>{p=e.i},null,null,null,null,null,null,null,null],execute:(function(){const e={components:{ValueWidget:n,RangebarWidget:i},mixins:[l],computed:{valueParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[5],this.parameters[6]]},rangeBarParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[3],this.parameters[4],this.parameters[5],this.parameters[7],this.parameters[8]]}}};function d(t,j,S,w,x,c){const h=r("value-widget"),v=r("rangebar-widget");return u(),m("div",{ref:"container",class:"d-flex flex-row",style:o(t.computedStyle)},[s(h,a(t.$attrs,{parameters:c.valueParameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"widget-index":0}),null,16,["parameters","settings","screen-values","screen-time-zone"]),s(v,a(t.$attrs,{parameters:c.rangeBarParameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"widget-index":1}),null,16,["parameters","settings","screen-values"])],4)}const B=g("default",p(e,[["render",d]]))})}}));