openc3-cosmos-tool-limitsmonitor 7.2.0 → 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.
- checksums.yaml +4 -4
- data/tools/limitsmonitor/{ArrayWidget-D1PArcGr-400791027cc4d28d3632.js → ArrayWidget-5XQXgMtp-fcce0cf5f6c759f865d5.js} +2 -2
- data/tools/limitsmonitor/{ArrayplotWidget-DPUPy0qM-4986a1ea1ef56e8686fe.js → ArrayplotWidget-pk7OINvA-f4e9b428dc6aec5cf9f2.js} +1 -1
- data/tools/limitsmonitor/{BarColumn-BpdscDQf-35b4ae46ea40ba6eac87.js → BarColumn-JQ552zb0-aae2ad8d5b2e0f4e365a.js} +1 -1
- data/tools/limitsmonitor/BlockWidget-B_5TnoG_-bf834aae199a9b2b514f.js +2 -0
- data/tools/limitsmonitor/ButtonWidget-CiZGNEls-e1ed243c1e07893e0105.js +1 -0
- data/tools/limitsmonitor/CanvasWidget-CzLQAoHY-faa1c97488a411353f87.js +1 -0
- data/tools/limitsmonitor/CanvasdotWidget-CcI1HwAp-3e87015d6824f083174b.js +1 -0
- data/tools/limitsmonitor/{CanvasimageWidget-COv_Qnc8-cf7f9d214091eee59084.js → CanvasimageWidget-CYg1rKr_-a6269d6acf8bd8f9ea84.js} +1 -1
- data/tools/limitsmonitor/{CanvasimagevalueWidget-BhuUqLOo-57f4e73a1af5378d3ab9.js → CanvasimagevalueWidget-e0p2honY-cbadd273933f3e4e095b.js} +1 -1
- data/tools/limitsmonitor/CanvaslabelWidget-CgECf4wH-90c06032af0dfbeffffa.js +1 -0
- data/tools/limitsmonitor/CanvaslabelvalueWidget-bCIPWE4c-6dd9d7cf851187e18414.js +1 -0
- data/tools/limitsmonitor/CanvaslineWidget-Tw1B6RTA-9302d858bc19d6bda595.js +1 -0
- data/tools/limitsmonitor/{CanvaslinevalueWidget-D4eaxWhR-ba03fa3c5c05e50d816e.js → CanvaslinevalueWidget-GvTic9rq-a4a1820aabb941f4100f.js} +1 -1
- data/tools/limitsmonitor/CheckbuttonWidget-DV6xeneq-3cfc04f24018886b17ec.js +1 -0
- data/tools/limitsmonitor/ComboboxWidget-BO31bWzg-69012695cdc93130200e.js +1 -0
- data/tools/limitsmonitor/{DateWidget-DkNWx28s-c034abac0550f0ae841e.js → DateWidget-DYviZFhJ-8de9557099a943d9661b.js} +1 -1
- data/tools/limitsmonitor/{DetailsDialog-F4KgYM6m-99f16b4c0cd103cebe4d.js → DetailsDialog-DHi4t3xd-1ef92e48ab12763f0ab3.js} +1 -1
- data/tools/limitsmonitor/{DynamicWidget-BuSbQVhf-c2433469a74318fe30f3.js → DynamicWidget-BuSbQVhf-c1660eac308a488409c9.js} +1 -1
- data/tools/limitsmonitor/{FilechecksumWidget-DSfNEnDJ-7c61e5ae8d517c5788c9.js → FilechecksumWidget-rJe1KvzY-133133d173807b5584b1.js} +1 -1
- data/tools/limitsmonitor/{FiledisplayWidget-D2cxMmrP-beb14f2cd124fc859fc3.js → FiledisplayWidget-CbTWgtBy-f1ef6e34b0a535af16b7.js} +1 -1
- data/tools/limitsmonitor/{FormatvalueWidget-6-bj_PJO-eaaa207a7419d38e5500.js → FormatvalueWidget-B9Giwzaz-0cd39de110ae59025f08.js} +1 -1
- data/tools/limitsmonitor/Graph-xc7TNnsk-cc150d126b32fc967a14.js +1 -0
- data/tools/limitsmonitor/{GraphWidget-COXK3Dab-e98f9a1c9ba6e83f1aa3.js → GraphWidget-COvVOlEn-8144809d5f19f42688e6.js} +1 -1
- data/tools/limitsmonitor/{HorizontalWidget-C9UFBPsk-615f7e18b2fa8b12cfd4.js → HorizontalWidget-BfdjRLGe-7a92892648718f404fa9.js} +1 -1
- data/tools/limitsmonitor/{HorizontalboxWidget-CWLfmRtr-9feaf86e99b232f286fa.js → HorizontalboxWidget-B1b9uNaB-135d69a074bd69c217e5.js} +1 -1
- data/tools/limitsmonitor/HorizontallineWidget-CHz4o6Gi-f751a8c78408258afd62.js +1 -0
- data/tools/limitsmonitor/{IframeWidget-Bn9eGzrq-9c2f9577a17909e38a53.js → IframeWidget-BCtrIgD1-d330c5b97a267c4e5619.js} +1 -1
- data/tools/limitsmonitor/{ImageLoader-_gAudhVo-62c2ed958eb333a536c1.js → ImageLoader-BzE4VsHW-1e66842934d3193cc27a.js} +1 -1
- data/tools/limitsmonitor/{ImageviewerWidget-BUWhF32Z-512f2ed6139f449f32cf.js → ImageviewerWidget-DKMBE3tQ-5cc438a481e2552f9b77.js} +1 -1
- data/tools/limitsmonitor/{LabelWidget-BhzkN06D-879f024c11b660ee118b.js → LabelWidget-B0nE0ImW-aee175534cb1c8bec80e.js} +1 -1
- data/tools/limitsmonitor/LabelledWidget-DrZHj_lR-9abf2d933313c94b4814.js +1 -0
- data/tools/limitsmonitor/LabelprogressbarWidget-K9NphQp0-99013bd152cb7c606df3.js +1 -0
- data/tools/limitsmonitor/LabelsparklineWidget-cn1OJvL3-5447c7fa5c462af0d14a.js +1 -0
- data/tools/limitsmonitor/LabelvalueWidget-DxJbd9nR-01bda119af8d5f7da497.js +1 -0
- data/tools/limitsmonitor/LabelvaluedescWidget-B-RiUnpl-8149f9b3b532f1e5d199.js +1 -0
- data/tools/limitsmonitor/LabelvaluelimitsbarWidget-BF94rtl8-499084eb5f870112e872.js +1 -0
- data/tools/limitsmonitor/LabelvaluelimitscolumnWidget-UOfPu8D1-8737af506b8ab7faa86d.js +1 -0
- data/tools/limitsmonitor/LabelvaluerangebarWidget-EVON-Tv8-6a1175bc807cc9dc8829.js +1 -0
- data/tools/limitsmonitor/{Layout-CKmC50QZ-73cee80023d9435e11da.js → Layout-BLS4Yi3m-1534ca87ca44f14d75b6.js} +1 -1
- data/tools/limitsmonitor/{LedWidget-D1lmNXpi-88f2a7caf9a460d704bc.js → LedWidget-DqVfh3zJ-675b6694684b66a76bd4.js} +1 -1
- data/tools/limitsmonitor/{LimitsBar-D5IZu7eX-c83defbeb54b6cfc8648.js → LimitsBar-BqpvMpXM-211372e59b3e42b31f9e.js} +1 -1
- data/tools/limitsmonitor/LimitsMonitor-1e732e237c882efb47da.js +11 -0
- data/tools/limitsmonitor/{LimitsbarWidget-VpxQXE-e-1550e0d37fc190f68cb9.js → LimitsbarWidget-rEJIGKCx-19a0e1608f5588e39965.js} +1 -1
- data/tools/limitsmonitor/{LimitscolorWidget-79P41CX7-9563cd9429c444ba0ef4.js → LimitscolorWidget-DVXho9Mm-8bc0d3a41714cb717bf2.js} +1 -1
- data/tools/limitsmonitor/{LimitscolumnWidget-BFDXhJeZ-8998cb2a2a449a5300e6.js → LimitscolumnWidget-DSQAdlZS-dff2613c00d7d1322d15.js} +1 -1
- data/tools/limitsmonitor/LinegraphWidget-CQRwZ0N6-f921447a9c81fe9d82bb.js +1 -0
- data/tools/limitsmonitor/{MatrixbycolumnsWidget--ihvirDP-1aa564b334b2bca31d04.js → MatrixbycolumnsWidget-CJJ7SugT-548bc3e7b0a64b0e132a.js} +1 -1
- data/tools/limitsmonitor/{OpenC3TimePicker-B0lAIU91-0172b8047df53a20c9a8.js → OpenC3TimePicker-Cww9L2Ij-d378db5252fc33c748ce.js} +1 -1
- data/tools/limitsmonitor/{ProgressbarWidget-BIB3r9SL-b22b23a017f8b487b85c.js → ProgressbarWidget-VTd49uhi-0a9168bfe786aa3b811e.js} +1 -1
- data/tools/limitsmonitor/RadiobuttonWidget-DqsantxO-a3816b08503fbdc60a65.js +1 -0
- data/tools/limitsmonitor/{RadiogroupWidget-CciTCv1U-3241ca27dfb3e1b5c81b.js → RadiogroupWidget-Bht6RZPH-71934aa229962fcb51cf.js} +1 -1
- data/tools/limitsmonitor/{RangebarWidget-MPQYi2Km-efdc4e76bc2f89c883e7.js → RangebarWidget-CN11Oqws-a0eaed87ca86fc808a4d.js} +1 -1
- data/tools/limitsmonitor/{RollupWidget-CfjGAhzg-b61c7bfee6725f202c62.js → RollupWidget-cgl9Ghle-37489f8260bb0ab14ec2.js} +1 -1
- data/tools/limitsmonitor/{ScrollwindowWidget-CupaygNN-c0d924e6d0e7b105cb24.js → ScrollwindowWidget-BFK-ihvZ-25b88875e6dc222d54aa.js} +1 -1
- data/tools/limitsmonitor/{SignalWidget-C-qecoTO-e941d3fd1446e9665ce9.js → SignalWidget-Be7Z5pJD-b7b8daceb5b5dbf42005.js} +1 -1
- data/tools/limitsmonitor/SpacerWidget-uKPA-f_0-fefdd95b5999ef1c01ae.js +1 -0
- data/tools/limitsmonitor/SparklineWidget-Wu5iFbly-e22bc010d941da6d3540.js +1 -0
- data/tools/limitsmonitor/TabbookWidget-D3FrIoV4-f5e2e7cd26cd2bb8dbda.js +1 -0
- data/tools/limitsmonitor/TextboxWidget-f6wEcoI0-1523d6d1dc581afd40ad.js +1 -0
- data/tools/limitsmonitor/TextfieldWidget-D72Sey-h-238509d2f8176b71c14d.js +1 -0
- data/tools/limitsmonitor/TimeWidget-BBuxr7Db-ffc52532f67573a816a2.js +1 -0
- data/tools/limitsmonitor/TitleWidget-Dfp5mPH2-c2adf393b12f96f6951c.js +1 -0
- data/tools/limitsmonitor/{VWidget-oMbywhLA-85718f33edeb08e1e150.js → VWidget-5FjwlURU-e6be62bc11c1ee65c211.js} +1 -1
- data/tools/limitsmonitor/ValueWidget-CpptSOvJ-acbc6c94dce9ac279646.js +1 -0
- data/tools/limitsmonitor/ValuelimitsbarWidget-AgeOlPAV-600a3e071c2811ece7fc.js +1 -0
- data/tools/limitsmonitor/{ValuelimitscolumnWidget-BVt6nLXq-4bacf2c800058cbbc5a4.js → ValuelimitscolumnWidget-CfTt7Q8a-b4b88d6fa567c7ee06d0.js} +1 -1
- data/tools/limitsmonitor/ValuerangebarWidget-E3CtttJk-c1ad87ee4f8df1751bde.js +1 -0
- data/tools/limitsmonitor/{VerticalWidget-DlftYBjH-60b9591b4f0a132e1a8d.js → VerticalWidget-B_eheXmK-ced82b4c08aaa2b5caa5.js} +1 -1
- data/tools/limitsmonitor/{VerticalboxWidget-C7RrkfY0-64476f25b5e19b0885b3.js → VerticalboxWidget-Bf8XJiY9-19dc4a21bf8897f7f12e.js} +1 -1
- data/tools/limitsmonitor/{Widget-D_HaosJK-cad59761cc9929d05ed1.js → Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js} +1 -1
- data/tools/limitsmonitor/main-6be3eeb9075feedbbccc.js +1491 -0
- data/tools/limitsmonitor/main.js +1 -1
- metadata +72 -72
- data/tools/limitsmonitor/BlockWidget-_VUsK5T9-39f6af1b633dd73b7a8e.js +0 -2
- data/tools/limitsmonitor/ButtonWidget-DE41o-cg-ab9c3ebc63e47ccacd95.js +0 -2
- data/tools/limitsmonitor/CanvasWidget-BEi8h3Mq-68eeaef2e593064f1b3b.js +0 -1
- data/tools/limitsmonitor/CanvasdotWidget-eZuMgkhL-224b35f28c1cee6bebbf.js +0 -1
- data/tools/limitsmonitor/CanvaslabelWidget-DtvbgeYH-14bc7362569406d89cba.js +0 -1
- data/tools/limitsmonitor/CanvaslabelvalueWidget-C_FRIeNb-7f329899b7a07e1eab53.js +0 -1
- data/tools/limitsmonitor/CanvaslineWidget-D1K_6mAY-5eef588235d49c1c42bf.js +0 -1
- data/tools/limitsmonitor/CheckbuttonWidget-ByxMDkiS-5f430af73175fe5208db.js +0 -1
- data/tools/limitsmonitor/ComboboxWidget-CAGxGv2r-fa7d7728ff40960a0982.js +0 -1
- data/tools/limitsmonitor/Graph-Cz0Ns1FD-458d3b3ff56b7f2f52b7.js +0 -1
- data/tools/limitsmonitor/HorizontallineWidget-DeFkOaYO-e3d95868298c39108931.js +0 -1
- data/tools/limitsmonitor/LabelledWidget-vx8NvW1b-12d933e4ffaff922a2fa.js +0 -1
- data/tools/limitsmonitor/LabelprogressbarWidget-t5PvKuS4-507cc849018fe64d3f60.js +0 -1
- data/tools/limitsmonitor/LabelsparklineWidget-CebbEH-j-3089b18cdd43379df5d5.js +0 -1
- data/tools/limitsmonitor/LabelvalueWidget-Cbs1DBK2-eb95259251a8995558c5.js +0 -1
- data/tools/limitsmonitor/LabelvaluedescWidget-B7OIOGc0-98065da10685719a70dd.js +0 -1
- data/tools/limitsmonitor/LabelvaluelimitsbarWidget-C57kf-oQ-750d1ff4d3d1a9cf8e5f.js +0 -1
- data/tools/limitsmonitor/LabelvaluelimitscolumnWidget-BRlNDEqp-0f4ed467df3ece4ce9f2.js +0 -1
- data/tools/limitsmonitor/LabelvaluerangebarWidget-Pt_evm3v-658526bdbea98aa6336c.js +0 -1
- data/tools/limitsmonitor/LimitsMonitor-01b993d7a53cb284b983.js +0 -11
- data/tools/limitsmonitor/LinegraphWidget-VqkpOlws-2690117b6237093383c2.js +0 -1
- data/tools/limitsmonitor/RadiobuttonWidget-C5rxLM7K-5af958aa675329dfb400.js +0 -1
- data/tools/limitsmonitor/SpacerWidget-VVkOCb6N-03baa51755ea98050c5c.js +0 -1
- data/tools/limitsmonitor/SparklineWidget-Dsmn38z_-d452043105f69b70cde4.js +0 -1
- data/tools/limitsmonitor/TabbookWidget-CXklff-l-44cc5fc242cdae28f3f4.js +0 -1
- data/tools/limitsmonitor/TextboxWidget-CHs2VYIv-440f8fd6a73569d44751.js +0 -1
- data/tools/limitsmonitor/TextfieldWidget-CdANAW-6-2ef5fc5bbe335191148e.js +0 -1
- data/tools/limitsmonitor/TimeWidget-D0xT1wXR-7488c506361e77cf2e85.js +0 -1
- data/tools/limitsmonitor/TitleWidget-68NWCcXB-0f3f4ecc38383459c86a.js +0 -1
- data/tools/limitsmonitor/ValueWidget-B1aGUBP7-0812b73f73dcc59b379a.js +0 -1
- data/tools/limitsmonitor/ValuelimitsbarWidget-B7KcRjLS-a369a1c64f1c06fb65e1.js +0 -1
- data/tools/limitsmonitor/ValuerangebarWidget-uVZEI32U-9ae2932de717a0f1a3a2.js +0 -1
- data/tools/limitsmonitor/main-4c695d77b89b49cc35a4.js +0 -1497
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
System.register(["./main-6be3eeb9075feedbbccc.js","vue","single-spa","./ValueWidget-CpptSOvJ-acbc6c94dce9ac279646.js","./IframeWidget-BCtrIgD1-d330c5b97a267c4e5619.js","./ValuelimitsbarWidget-AgeOlPAV-600a3e071c2811ece7fc.js","vue-router","pinia","vuetify","./DetailsDialog-DHi4t3xd-1ef92e48ab12763f0ab3.js","./LimitsBar-BqpvMpXM-211372e59b3e42b31f9e.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./VWidget-5FjwlURU-e6be62bc11c1ee65c211.js","./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","./LimitsbarWidget-rEJIGKCx-19a0e1608f5588e39965.js","./BarColumn-JQ552zb0-aae2ad8d5b2e0f4e365a.js"],(function(ar,Qo){"use strict";var Tt,nt,qe,it,Lt,Nt,E,A,j,jt,y,b,V,te,G,de,we,Dt,B,Re,Ve,ot,ce,at,Ut,Ft,Bt,$t,qt;return{setters:[k=>{Tt=k.l,nt=k.g,qe=k._,it=k.R,Lt=k.d,Nt=k.b},k=>{E=k.resolveComponent,A=k.openBlock,j=k.createBlock,jt=k.Teleport,y=k.createVNode,b=k.withCtx,V=k.createElementVNode,te=k.toDisplayString,G=k.createElementBlock,de=k.Fragment,we=k.renderList,Dt=k.ref,B=k.createTextVNode,Re=k.mergeProps,Ve=k.createSlots,ot=k.normalizeStyle,ce=k.createCommentVNode,at=k.normalizeClass,Ut=k.normalizeProps,Ft=k.guardReactiveProps,Bt=k.withKeys},null,k=>{$t=k.default},null,k=>{qt=k.default},null,null,null,null,null,null,null,null,null,null],execute:(function(){var k=document.createElement("style");k.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(k);const cr={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(t,{emit:e}){const s=e,r=Dt(!1);function n(){r.value=!1}function o(i){return i.replaceAll(" ","-").toLowerCase()}return(i,a)=>{const l=E("v-icon"),d=E("v-btn"),u=E("v-divider"),h=E("v-list-item-title"),g=E("v-list-item"),w=E("v-list"),x=E("v-menu"),v=E("v-radio"),L=E("v-list-item-action"),f=E("v-radio-group"),_=E("v-checkbox"),S=E("v-tooltip");return A(),j(x,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=p=>r.value=p),"close-on-content-click":!1},{activator:b(({props:p})=>[y(d,Re(p,{variant:"outlined",class:"mx-1 menu-button",text:t.menu.label,"data-test":o(`${t.title} ${t.menu.label}`)}),{append:b(()=>[y(l,{class:"menu-button-icon"},{default:b(()=>[...a[1]||(a[1]=[B(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:b(()=>[y(w,null,{default:b(()=>[(A(!0),G(de,null,we(t.menu.items,(p,I)=>(A(),G(de,null,[p.divider?(A(),j(u,{key:I+"-divider"})):p.subMenu&&p.subMenu.length>0?(A(),G("div",{key:I+"-submenu"},[(A(),j(x,{key:I,"open-on-hover":"",location:"right"},{activator:b(({props:U})=>[(A(),j(g,Re({ref_for:!0},U,{key:I,disabled:p.disabled}),Ve({append:b(()=>[y(l,null,{default:b(()=>[...a[2]||(a[2]=[B(" mdi-chevron-right ",-1)])]),_:1})]),default:b(()=>[!p.radio&&!p.checkbox?(A(),j(h,{key:0,style:ot("cursor: pointer;"+(p.disabled?"opacity: 0.2":""))},{default:b(()=>[B(te(p.label),1)]),_:2},1032,["style"])):ce("",!0)]),_:2},[p.icon?{name:"prepend",fn:b(()=>[y(l,{disabled:p.disabled},{default:b(()=>[B(te(p.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:b(()=>[y(w,null,{default:b(()=>[(A(!0),G(de,null,we(p.subMenu,(U,Y)=>(A(),j(g,{key:Y,"prepend-icon":U.icon,onClick:ne=>s("submenu-click",U)},{default:b(()=>[y(h,null,{default:b(()=>[B(te(U.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):p.radioGroup?(A(),j(f,{key:I+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":p.value,"onUpdate:modelValue":p.command},{default:b(()=>[(A(!0),G(de,null,we(p.choices,(U,Y)=>(A(),j(g,{key:Y+"-choice"},{default:b(()=>[y(L,{class:"list-action"},{default:b(()=>[y(v,{color:"secondary",label:U.label,value:U.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(A(),j(S,{key:I+"-list",disabled:!p.tooltip,text:p.tooltip,location:"right"},{activator:b(({props:U})=>[V("div",Re({ref_for:!0},U),[y(g,{disabled:p.disabled,"data-test":o(`${t.title} ${t.menu.label} ${p.label}`),onClick:()=>{p.command(p),p.checkbox||n()}},Ve({default:b(()=>[p.checkbox?(A(),j(L,{key:0,class:"list-action"},{default:b(()=>[y(_,{modelValue:p.checked,"onUpdate:modelValue":Y=>p.checked=Y,label:p.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):ce("",!0),!p.radio&&!p.checkbox?(A(),j(h,{key:1,style:ot("cursor: pointer;"+(p.disabled?"opacity: 0.2":""))},{default:b(()=>[B(te(p.label),1)]),_:2},1032,["style"])):ce("",!0)]),_:2},[p.icon?{name:"prepend",fn:b(()=>[y(l,{icon:p.icon,disabled:p.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"])],16)]),_:2},1032,["disabled","text"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},lr={components:{TopBarMenu:cr},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}}},ur={class:"app-title mr-2"};function dr(t,e,s,r,n,o){const i=E("v-col"),a=E("v-row"),l=E("TopBarMenu");return A(),j(jt,{to:"#openc3-menu"},[y(a,{"no-gutters":""},{default:b(()=>[y(i,{"align-self":"end"},{default:b(()=>[V("span",ur,te(s.title),1)]),_:1})]),_:1}),y(a,{dense:"",class:"flex-nowrap"},{default:b(()=>[(A(!0),G(de,null,we(s.menus,(d,u)=>(A(),j(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 hr=Tt(lr,[["render",dr],["__scopeId","data-v-f4fb184e"]]),fr="__default",pr={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}${fr}`}},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 Vt(t,e){return function(){return t.apply(e,arguments)}}const{toString:mr}=Object.prototype,{getPrototypeOf:ve}=Object,{iterator:ke,toStringTag:Mt}=Symbol,Me=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),Ae=(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=ve(s)}return!1},gr=(t,e)=>t!=null&&Ae(t,e)?t[e]:void 0,ct=(t=>e=>{const s=mr.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),X=t=>(t=t.toLowerCase(),e=>ct(e)===t),ze=t=>e=>typeof e===t,{isArray:he}=Array,fe=ze("undefined");function Se(t){return t!==null&&!fe(t)&&t.constructor!==null&&!fe(t.constructor)&&K(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const zt=X("ArrayBuffer");function br(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&zt(t.buffer),e}const _r=ze("string"),K=ze("function"),Wt=ze("number"),Ee=t=>t!==null&&typeof t=="object",yr=t=>t===!0||t===!1,We=t=>{if(!Ee(t))return!1;const e=ve(t);return(e===null||e===Object.prototype||ve(e)===null)&&!Ae(t,Mt)&&!Ae(t,ke)},wr=t=>{if(!Ee(t)||Se(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},vr=X("Date"),Sr=X("File"),Er=t=>!!(t&&typeof t.uri<"u"),Or=t=>t&&typeof t.getParts<"u",xr=X("Blob"),Cr=X("FileList"),Rr=X("Set"),kr=t=>Ee(t)&&K(t.pipe);function Ar(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Jt=Ar(),Ht=typeof Jt.FormData<"u"?Jt.FormData:void 0,Ir=t=>{if(!t)return!1;if(Ht&&t instanceof Ht)return!0;const e=ve(t);if(!e||e===Object.prototype||!K(t.append))return!1;const s=ct(t);return s==="formdata"||s==="object"&&K(t.toString)&&t.toString()==="[object FormData]"},Pr=X("URLSearchParams"),[Tr,Lr,Nr,jr]=["ReadableStream","Request","Response","Headers"].map(X),Dr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ie(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 Kt(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 pe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yt=t=>!fe(t)&&t!==pe;function lt(...t){const{caseless:e,skipUndefined:s}=Yt(this)&&this||{},r={},n=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=e&&typeof i=="string"&&Kt(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||!fe(o))&&(r[a]=o)};for(let o=0,i=t.length;o<i;o++){const a=t[o];if(!a||Se(a)||(Ie(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];Kr.call(a,u)&&n(a[u],u)}}return r}const Ur=(t,e,s,{allOwnKeys:r}={})=>(Ie(e,(n,o)=>{s&&K(n)?Object.defineProperty(t,o,{__proto__:null,value:Vt(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),Fr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Br=(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)},$r=(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&&ve(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},qr=(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},Vr=t=>{if(!t)return null;if(he(t))return t;let e=t.length;if(!Wt(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},Mr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ve(Uint8Array)),zr=(t,e)=>{const s=(t&&t[ke]).call(t);let r;for(;(r=s.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},Wr=(t,e)=>{let s;const r=[];for(;(s=t.exec(e))!==null;)r.push(s);return r},Jr=X("HTMLFormElement"),Hr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,r){return s.toUpperCase()+r}),{propertyIsEnumerable:Kr}=Object.prototype,Yr=X("RegExp"),Zt=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),r={};Ie(s,(n,o)=>{let i;(i=e(n,o,t))!==!1&&(r[o]=i||n)}),Object.defineProperties(t,r)},Zr=t=>{Zt(t,(e,s)=>{if(K(t)&&["arguments","caller","callee"].includes(s))return!1;const r=t[s];if(K(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+"'")})}})},Gr=(t,e)=>{const s={},r=n=>{n.forEach(o=>{s[o]=!0})};return he(t)?r(t):r(String(t).split(e)),s},Xr=()=>{},Qr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function en(t){return!!(t&&K(t.append)&&t[Mt]==="FormData"&&t[ke])}const tn=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);let n;if(Rr(r)){n=[];for(const o of r){const i=s(o);!fe(i)&&n.push(i)}}else n=he(r)?[]:{},Ie(r,(o,i)=>{const a=s(o);!fe(a)&&(n[i]=a)});return e.delete(r),n}}return r};return s(t)},sn=X("AsyncFunction"),rn=t=>t&&(Ee(t)||K(t))&&K(t.then)&&K(t.catch),Gt=((t,e)=>t?setImmediate:e?((s,r)=>(pe.addEventListener("message",({source:n,data:o})=>{n===pe&&o===s&&r.length&&r.shift()()},!1),n=>{r.push(n),pe.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",K(pe.postMessage)),nn=typeof queueMicrotask<"u"?queueMicrotask.bind(pe):typeof process<"u"&&process.nextTick||Gt,Xt=t=>t!=null&&K(t[ke]),on=t=>t!=null&&Ae(t,ke)&&Xt(t),c={isArray:he,isArrayBuffer:zt,isBuffer:Se,isFormData:Ir,isArrayBufferView:br,isString:_r,isNumber:Wt,isBoolean:yr,isObject:Ee,isPlainObject:We,isEmptyObject:wr,isReadableStream:Tr,isRequest:Lr,isResponse:Nr,isHeaders:jr,isUndefined:fe,isDate:vr,isFile:Sr,isReactNativeBlob:Er,isReactNative:Or,isBlob:xr,isRegExp:Yr,isFunction:K,isStream:kr,isURLSearchParams:Pr,isTypedArray:Mr,isFileList:Cr,forEach:Ie,merge:lt,extend:Ur,trim:Dr,stripBOM:Fr,inherits:Br,toFlatObject:$r,kindOf:ct,kindOfTest:X,endsWith:qr,toArray:Vr,forEachEntry:zr,matchAll:Wr,isHTMLForm:Jr,hasOwnProperty:Me,hasOwnProp:Me,hasOwnInPrototypeChain:Ae,getSafeProp:gr,reduceDescriptors:Zt,freezeMethods:Zr,toObjectSet:Gr,toCamelCase:Hr,noop:Xr,toFiniteNumber:Qr,findKey:Kt,global:pe,isContextDefined:Yt,isSpecCompliantForm:en,toJSONObject:tn,isAsyncFn:sn,isThenable:rn,setImmediate:Gt,asap:nn,isIterable:Xt,isSafeIterable:on},an=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"]),cn=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();const i=c.hasOwnProp(e,s);!s||i&&c.hasOwnProp(an,s)||(s==="set-cookie"?i?e[s].push(r):e[s]=[r]:e[s]=i?e[s]+", "+r:r)}),e};function ln(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 un=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),dn=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ut(t,e){return c.isArray(t)?t.map(s=>ut(s,e)):ln(String(t).replace(e,""))}const hn=t=>ut(t,un),fn=t=>ut(t,dn);function Qt(t){const e=Object.create(null);return c.forEach(t.toJSON(),(s,r)=>{e[r]=fn(s)}),e}const es=Symbol("internals");function Pe(t){return t&&String(t).trim().toLowerCase()}function Je(t){return t===!1||t==null?t:c.isArray(t)?t.map(Je):hn(String(t))}function pn(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 mn=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function dt(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)}function gn(t){const e=t.length-1;if(e<1||t.charCodeAt(0)!==34||t.charCodeAt(e)!==34)return t;let s="";for(let r=1;r<e;r++){const n=t.charCodeAt(r);if(n===34||n===92&&(r+=1,r>=e))return t;s+=t[r]}return s}function bn(t){const e=Object.create(null),s=String(t);let r=0,n=!1,o=!1;function i(a){const l=dt(s.slice(r,a)),d=l.indexOf("=");if(d<1)return;const u=dt(l.slice(0,d));if(!mn.test(u))return;const h=u.toLowerCase();if(h==="__proto__"||h==="constructor"||h==="prototype")return;const g=dt(l.slice(d+1));e[h]=gn(g)}for(let a=0;a<s.length;a++){const l=s.charCodeAt(a);n?o?o=!1:l===92?o=!0:l===34&&(n=!1):l===34?n=!0:(l===44||l===59)&&(i(a),r=a+1)}return i(s.length),e}const _n=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ht(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 yn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,r)=>s.toUpperCase()+r)}function wn(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 M=class{constructor(t){t&&this.set(t)}set(t,e,s){const r=this;function n(i,a,l){const d=Pe(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())&&!_n(t))o(cn(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=Pe(t),t){const s=c.findKey(this,t);if(s){const r=this[s];if(!e)return r;if(e===!0)return pn(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=Pe(t),t){const s=c.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||ht(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let r=!1;function n(o){if(o=Pe(o),o){const i=c.findKey(s,o);i&&(!e||ht(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||ht(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?yn(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(){const t=this.get("set-cookie");return c.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return bn(t)}static concat(t,...e){const s=new this(t);return e.forEach(r=>s.set(r)),s}static accessor(t){const e=(this[es]=this[es]={accessors:{}}).accessors,s=this.prototype;function r(n){const o=Pe(n);e[o]||(wn(s,n),e[o]=!0)}return c.isArray(t)?t.forEach(r):r(t),this}};M.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(M.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[s]=r}}}),c.freezeMethods(M);const He="[REDACTED ****]";function vn(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 Sn(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 M&&(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)&&vn(o))return r.pop(),o;i=Object.create(null);for(const[a,l]of Object.entries(o)){const d=s.has(a.toLowerCase())?He:n(l);c.isUndefined(d)||(i[a]=d)}}return r.pop(),i};return n(t)}function ts(t){try{return String(t)}catch{return""}}function En(t){return t.errors.map(e=>{try{return e&&e.message?ts(e.message):ts(e)}catch{return""}}).filter(Boolean).join("; ")||t.name||"AggregateError"}let m=class ir extends Error{static from(e,s,r,n,o,i){let a=e.message;!a&&c.isArray(e.errors)&&e.errors.length&&(a=En(e));const l=new ir(a,s||e.code,r,n,o);return Object.defineProperty(l,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),l.name=e.name,e.status!=null&&l.status==null&&(l.status=e.status),i&&Object.assign(l,i),l}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?Sn(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 On=null,ss=100;function ft(t){return c.isPlainObject(t)||c.isArray(t)}function rs(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function pt(t,e,s){return t?t.concat(e).map(function(r,n){return r=rs(r),!s&&n?"["+r+"]":r}).join(s?".":""):e}function xn(t){return c.isArray(t)&&!t.some(ft)}const Cn=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Ke(t,e,s){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=c.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(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?ss: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]);throw new m("Blob is not supported. Use a Buffer instead.",m.ERR_NOT_SUPPORT)}return f}function g(f){if(f>l)throw new m("Object is too deeply nested ("+f+" levels). Max depth: "+l,m.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(f,_){if(l===1/0)return JSON.stringify(f);const S=[];return JSON.stringify(f,function(p,I){if(!c.isObject(I))return I;for(;S.length&&S[S.length-1]!==this;)S.pop();return S.push(I),g(_+S.length-1),I})}function x(f,_,S){let p=f;if(c.isReactNative(e)&&c.isReactNativeBlob(f))return e.append(pt(S,_,o),h(f)),!1;if(f&&!S&&typeof f=="object"){if(c.endsWith(_,"{}"))_=r?_:_.slice(0,-2),f=w(f,1);else if(c.isArray(f)&&xn(f)||(c.isFileList(f)||c.endsWith(_,"[]"))&&(p=c.toArray(f)))return _=rs(_),p.forEach(function(I,U){!(c.isUndefined(I)||I===null)&&e.append(i===!0?pt([_],U,o):i===null?_:_+"[]",h(I))}),!1}return ft(f)?!0:(e.append(pt(S,_,o),h(f)),!1)}const v=Object.assign(Cn,{defaultVisitor:x,convertValue:h,isVisitable:ft});function L(f,_,S=0){if(!c.isUndefined(f)){if(g(S),u.indexOf(f)!==-1)throw new Error("Circular reference detected in "+_.join("."));u.push(f),c.forEach(f,function(p,I){(!(c.isUndefined(p)||p===null)&&n.call(e,p,c.isString(I)?I.trim():I,_,v))===!0&&L(p,_?_.concat(I):[I],S+1)}),u.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return L(t),e}function ns(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(s){return e[s]})}function mt(t,e){this._pairs=[],t&&Ke(t,this,e)}const is=mt.prototype;is.append=function(t,e){this._pairs.push([t,e])},is.toString=function(t){const e=t?s=>t.call(this,s,ns):ns;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function Rn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function os(t,e,s){if(!e)return t;t=t||"";const r=c.isFunction(s)?{serialize:s}:s,n=c.getSafeProp(r,"encode")||Rn,o=c.getSafeProp(r,"serialize");let i;if(o?i=o(e,r):i=c.isURLSearchParams(e)?e.toString():new mt(e,r).toString(n),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class as{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 gt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},kn=typeof URLSearchParams<"u"?URLSearchParams:mt,An=typeof FormData<"u"?FormData:null,In=typeof Blob<"u"?Blob:null,Pn={isBrowser:!0,classes:{URLSearchParams:kn,FormData:An,Blob:In},protocols:["http","https","file","blob","url","data"]},bt=typeof window<"u"&&typeof document<"u",_t=typeof navigator=="object"&&navigator||void 0,Tn=bt&&(!_t||["ReactNative","NativeScript","NS"].indexOf(_t.product)<0),Ln=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Nn=bt&&window.location.href||"http://localhost",jn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bt,hasStandardBrowserEnv:Tn,hasStandardBrowserWebWorkerEnv:Ln,navigator:_t,origin:Nn},Symbol.toStringTag,{value:"Module"})),$={...jn,...Pn};function Dn(t,e){return Ke(t,new $.classes.URLSearchParams,{visitor:function(s,r,n,o){return $.isNode&&c.isBuffer(s)?(this.append(r,s.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}const cs=ss;function ls(t){if(t>cs)throw new m("FormData field is too deeply nested ("+t+" levels). Max depth: "+cs,m.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Un(t){const e=[],s=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=s.exec(t))!==null;)ls(e.length),e.push(r[0]==="[]"?"":r[1]||r[0]);return e}function Fn(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 us(t){function e(s,r,n,o){ls(o);let i=s[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=o>=s.length;return i=!i&&c.isArray(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]=Fn(n[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const s={};return c.forEachEntry(t,(r,n)=>{e(Un(r),n,s,0)}),s}return null}const Oe=(t,e)=>t!=null&&c.hasOwnProp(t,e)?t[e]:void 0;function Bn(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 Te={transitional:gt,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(us(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 Dn(t,i).toString();if((o=c.isFileList(t))||s.indexOf("multipart/form-data")>-1){const a=Oe(this,"env"),l=a&&a.FormData;return Ke(o?{"files[]":t}:t,l&&new l,i)}}return n||r?(e.setContentType("application/json",!1),Bn(t)):t}],transformResponse:[function(t){const e=Oe(this,"transitional")||Te.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:$.classes.FormData,Blob:$.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=>{Te.headers[t]={}});function yt(t,e){const s=this||Te,r=e||s,n=M.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 ds(t){return!!(t&&t.__CANCEL__)}let Le=class extends m{constructor(t,e,s){super(t??"canceled",m.ERR_CANCELED,e,s),this.name="CanceledError",this.__CANCEL__=!0}};function hs(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 $n(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function qn(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 g=d&&l-d;return g?Math.round(h*1e3/g):void 0}}function Vn(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 Ye=(t,e,s=3)=>{let r=0;const n=qn(50,250);return Vn(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=Math.max(0,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)},fs=(t,e)=>{const s=t!=null;return[r=>e[0]({lengthComputable:s,total:t,loaded:r}),e[1]]},ps=(t,e=c.asap)=>(...s)=>e(()=>t(...s)),Mn=$.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,$.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL($.origin),$.navigator&&/(msie|trident)/i.test($.navigator.userAgent)):()=>!0,zn=$.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 Wn(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Jn(t,e){if(!e)return t;let s=t.length;for(;s>0&&t.charCodeAt(s-1)===47;)s--;return t.slice(0,s)+"/"+e.replace(/^\/+/,"")}const Hn=/^https?:(?!\/\/)/i,Kn=/[\t\n\r]/g;function Yn(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function Zn(t){return Yn(t).replace(Kn,"")}function Gn(t){return t&&t.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,s,r="")=>`${s}${r}${He}`)}function Xn(t){const e=t.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${He}@`),s=e.indexOf("#"),r=(s===-1?e:e.slice(0,s)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${He}`);return s===-1?r:`${r}#${Gn(e.slice(s+1))}`}function ms(t,e){if(typeof t=="string"){const s=Zn(t);if(Hn.test(s))throw new m(`Invalid URL ${JSON.stringify(Xn(s))}: missing "//" after protocol`,m.ERR_INVALID_URL,e)}}function gs(t,e,s,r){ms(e,r);let n=!Wn(e);return t&&(n||s===!1)?(ms(t,r),Jn(t,e)):e}const bs=t=>t instanceof M?{...t}:t,Qn=t=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(t).concat(Object.getOwnPropertySymbols(t).filter(e=>Object.getOwnPropertyDescriptor(t,e).enumerable)):Object.keys(t);function me(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,g,w){return c.isPlainObject(u)&&c.isPlainObject(h)?c.merge.call({caseless:w},u,h):c.isPlainObject(h)?c.merge({},h):c.isArray(h)?h.slice():h}function n(u,h,g,w){if(c.isUndefined(h)){if(!c.isUndefined(u))return r(void 0,u,g,w)}else return r(u,h,g,w)}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 g=c.hasOwnProp(t,"transitional")?t.transitional:void 0;if(c.isPlainObject(g)&&c.hasOwnProp(g,u))return g[u]}function l(u,h,g){if(c.hasOwnProp(e,g))return r(u,h);if(c.hasOwnProp(t,g))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,g)=>n(bs(u),bs(h),g,!0)};return c.forEach(Qn({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=c.hasOwnProp(d,u)?d[u]:n,g=c.hasOwnProp(t,u)?t[u]:void 0,w=c.hasOwnProp(e,u)?e[u]:void 0,x=h(g,w,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 ei=["content-type","content-length"];function ti(t,e,s){if(s!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([r,n])=>{ei.includes(r.toLowerCase())&&t.set(r,n)})}const si=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,s)=>String.fromCharCode(parseInt(s,16)));function _s(t){const e=me({},t),s=g=>c.hasOwnProp(e,g)?e[g]: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=M.from(a),e.url=os(gs(d,h,u,e),s("params"),s("paramsSerializer")),l){const g=c.getSafeProp(l,"username")||"",w=c.getSafeProp(l,"password")||"";try{a.set("Authorization","Basic "+btoa(g+":"+(w?si(w):"")))}catch(x){throw m.from(x,m.ERR_BAD_OPTION_VALUE,t)}}if(c.isFormData(r)&&($.hasStandardBrowserEnv||$.hasStandardBrowserWebWorkerEnv||c.isReactNative(r)?a.setContentType(void 0):c.isFunction(r.getHeaders)&&ti(a,r.getHeaders(),s("formDataHeaderPolicy"))),$.hasStandardBrowserEnv&&(c.isFunction(n)&&(n=n(e)),n===!0||n==null&&Mn(e.url))){const g=o&&i&&zn.read(i);g&&a.set(o,g)}return e}const ri=typeof XMLHttpRequest<"u",ni=ri&&function(t){return new Promise(function(e,s){const r=_s(t);let n=r.data;const o=M.from(r.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:l}=r,d,u,h,g,w;function x(){g&&g(),w&&w(),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 L(){if(!v)return;const _=M.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),S={data:!i||i==="text"||i==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:t,request:v};hs(function(p){e(p),x()},function(p){s(p),x()},S),v=null}"onloadend"in v?v.onloadend=L:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(L)},v.onabort=function(){v&&(s(new m("Request aborted",m.ECONNABORTED,t,v)),x(),v=null)},v.onerror=function(_){const S=_&&_.message?_.message:"Network Error",p=new m(S,m.ERR_NETWORK,t,v);p.event=_||null,s(p),x(),v=null},v.ontimeout=function(){let _=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const S=r.transitional||gt;r.timeoutErrorMessage&&(_=r.timeoutErrorMessage),s(new m(_,S.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,t,v)),x(),v=null},n===void 0&&o.setContentType(null),"setRequestHeader"in v&&c.forEach(Qt(o),function(_,S){v.setRequestHeader(S,_)}),c.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),i&&i!=="json"&&(v.responseType=r.responseType),l&&([h,w]=Ye(l,!0),v.addEventListener("progress",h)),a&&v.upload&&([u,g]=Ye(a),v.upload.addEventListener("progress",u),v.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(d=_=>{v&&(s(!_||_.type?new Le(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=$n(r.url);if(f&&!$.protocols.includes(f)){s(new m("Unsupported protocol "+f+":",m.ERR_BAD_REQUEST,t)),x();return}v.send(n||null)})},ii=(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 Le(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=>{if(!r){if(l.aborted){n.call(l);return}l.addEventListener("abort",n,{once:!0})}});const{signal:a}=s;return a.unsubscribe=()=>c.asap(i),a},oi=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},ai=async function*(t,e){for await(const s of ci(t))yield*oi(s,e)},ci=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()}},ys=(t,e,s,r)=>{const n=ai(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 g=o+=h;s(g)}l.enqueue(new Uint8Array(u))}catch(d){throw a(d),d}},cancel(l){return a(l),n.return()}},{highWaterMark:2})},ws=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,vs=(t,e,s)=>e+2<s&&ws(t.charCodeAt(e+1))&&ws(t.charCodeAt(e+2)),Ss=t=>t<=57?t-48:(t&223)-55,li=t=>t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===43||t===47||t===45||t===95,ui=t=>t===9||t===10||t===12||t===13||t===32,di=t=>{const e=Math.floor(t/4),s=t%4;return e*3+(s===2?1:s===3?2:0)},hi=t=>{const e=t.length;let s=0;return e>0&&t.charCodeAt(e-1)===61&&(s++,e>1&&t.charCodeAt(e-2)===61&&s++),Math.floor((e-s)*3/4)},fi=t=>{const e=t.length;let s=0,r=0,n=!1;for(let o=0;o<e;o++){let i=t.charCodeAt(o);if(i===37&&vs(t,o,e)&&(i=Ss(t.charCodeAt(o+1))*16+Ss(t.charCodeAt(o+2)),o+=2),!ui(i)){if(i===61){r++;continue}if(!li(i)||r>0){n=!0;continue}s++}}return n||r>2||r>0&&(s+r)%4!==0||s%4===1?hi(t):di(s)},pi=(t,e)=>{if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const s=t.indexOf(",");if(s<0)return 0;const r=t.slice(5,s),n=t.slice(s+1);if(/;base64/i.test(r))return e(n);let o=0;for(let i=0,a=n.length;i<a;i++){const l=n.charCodeAt(i);if(l===37&&vs(n,i,a))o+=1,i+=2;else if(l<128)o+=1;else if(l<2048)o+=2;else if(l>=55296&&l<=56319&&i+1<a){const d=n.charCodeAt(i+1);d>=56320&&d<=57343?(o+=4,i++):o+=3}else o+=3}return o};function mi(t){const e=typeof t=="string"?t.indexOf("#"):-1;return pi(e===-1?t:t.slice(0,e),fi)}const wt="1.19.0",Es=64*1024,{isFunction:Ze}=c,gi=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,s)=>String.fromCharCode(parseInt(s,16))),Os=t=>{if(!c.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},xs=(t,...e)=>{try{return!!t(...e)}catch{return!1}},bi=t=>{const e=t.indexOf("://");let s=t;return e!==-1&&(s=s.slice(e+3)),s.includes("@")||s.includes(":")},_i=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())),g=l&&u&&xs(()=>{let f=!1;const _=new o($.origin,{body:new s,method:"POST",get duplex(){return f=!0,"half"}}),S=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),f&&!S}),w=d&&u&&xs(()=>c.isReadableStream(new i("").body)),x={stream:w&&(f=>f.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!x[f]&&(x[f]=(_,S)=>{let p=_&&_[f];if(p)return p.call(_);throw new m(`Response type '${f}' is not supported`,m.ERR_NOT_SUPPORT,S)})});const v=async f=>{if(f==null)return 0;if(c.isBlob(f))return f.size;if(c.isSpecCompliantForm(f))return(await new o($.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},L=async(f,_)=>c.toFiniteNumber(f.getContentLength())??v(_);return async f=>{let{url:_,method:S,data:p,signal:I,cancelToken:U,timeout:Y,onDownloadProgress:ne,onUploadProgress:R,responseType:T,headers:q,withCredentials:re="same-origin",fetchOptions:le,maxContentLength:W,maxBodyLength:Ce}=_s(f);const J=c.isNumber(W)&&W>-1,O=c.isNumber(Ce)&&Ce>-1,F=P=>c.hasOwnProp(f,P)?f[P]:void 0;let Q=n||fetch;T=T?(T+"").toLowerCase():"text";let H=ii([I,U&&U.toAbortSignal()],Y),N=null;const ie=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let Fe,Be=null;const er=()=>new m("Request body larger than maxBodyLength limit",m.ERR_BAD_REQUEST,f,N);try{let P;const ee=F("auth");if(ee){const C=c.getSafeProp(ee,"username")||"",Z=c.getSafeProp(ee,"password")||"";P={username:C,password:Z}}if(bi(_)){const C=new URL(_,$.origin);if(!P&&(C.username||C.password)){const Z=Os(C.username),ue=Os(C.password);P={username:Z,password:ue}}(C.username||C.password)&&(C.username="",C.password="",_=C.href)}if(P&&(q.delete("authorization"),q.set("Authorization","Basic "+btoa(gi((P.username||"")+":"+(P.password||""))))),J&&typeof _=="string"&&_.startsWith("data:")&&mi(_)>W)throw new m("maxContentLength size of "+W+" exceeded",m.ERR_BAD_RESPONSE,f,N);if(O&&S!=="get"&&S!=="head"){const C=await v(p);if(typeof C=="number"&&isFinite(C)&&(Fe=C,C>Ce))throw er()}const rt=O&&(c.isReadableStream(p)||c.isStream(p)),tr=(C,Z,ue)=>ys(C,Es,ye=>{if(O&&ye>Ce)throw Be=er();Z&&Z(ye)},ue);if(g&&S!=="get"&&S!=="head"&&(R||rt)){if(Fe=Fe??await L(q,p),Fe!==0||rt){let C=new o(_,{method:"POST",body:p,duplex:"half"}),Z;if(c.isFormData(p)&&(Z=C.headers.get("content-type"))&&q.setContentType(Z),C.body){const[ue,ye]=R&&fs(Fe,Ye(ps(R)))||[];p=tr(C.body,ue,ye)}}}else if(rt&&!l&&u&&S!=="get"&&S!=="head")p=tr(p);else if(rt&&l&&!g&&S!=="get"&&S!=="head")throw new m("Stream request bodies are not supported by the current fetch implementation",m.ERR_NOT_SUPPORT,f,N);c.isString(re)||(re=re?"include":"omit");const Go=l&&"credentials"in o.prototype;if(c.isFormData(p)){const C=q.getContentType();C&&/^multipart\/form-data/i.test(C)&&!/boundary=/i.test(C)&&q.delete("content-type")}q.set("User-Agent","axios/"+wt,!1);const sr={...le,signal:H,method:S.toUpperCase(),headers:Qt(q.normalize()),body:p,duplex:"half",credentials:Go?re:void 0};N=l&&new o(_,sr);let oe=await(l?Q(N,le):Q(_,sr));const rr=M.from(oe.headers);if(J){const C=c.toFiniteNumber(rr.getContentLength());if(C!=null&&C>W)throw new m("maxContentLength size of "+W+" exceeded",m.ERR_BAD_RESPONSE,f,N)}const Pt=w&&(T==="stream"||T==="response");if(w&&oe.body&&(ne||J||Pt&&ie)){const C={};["status","statusText","headers"].forEach($e=>{C[$e]=oe[$e]});const Z=c.toFiniteNumber(rr.getContentLength()),[ue,ye]=ne&&fs(Z,Ye(ps(ne),!0))||[];let nr=0;const Xo=$e=>{if(J&&(nr=$e,nr>W))throw new m("maxContentLength size of "+W+" exceeded",m.ERR_BAD_RESPONSE,f,N);ue&&ue($e)};oe=new i(ys(oe.body,Es,Xo,()=>{ye&&ye(),ie&&ie()}),C)}T=T||"text";let ae=await x[c.findKey(x,T)||"text"](oe,f);if(J&&!w&&!Pt){let C;if(ae!=null&&(typeof ae.byteLength=="number"?C=ae.byteLength:typeof ae.size=="number"?C=ae.size:typeof ae=="string"&&(C=typeof r=="function"?new r().encode(ae).byteLength:ae.length)),typeof C=="number"&&C>W)throw new m("maxContentLength size of "+W+" exceeded",m.ERR_BAD_RESPONSE,f,N)}return!Pt&&ie&&ie(),await new Promise((C,Z)=>{hs(C,Z,{data:ae,headers:M.from(oe.headers),status:oe.status,statusText:oe.statusText,config:f,request:N})})}catch(P){if(ie&&ie(),H&&H.aborted&&H.reason instanceof m){const ee=H.reason;throw ee.config=f,N&&(ee.request=N),P!==ee&&Object.defineProperty(ee,"cause",{__proto__:null,value:P,writable:!0,enumerable:!1,configurable:!0}),ee}if(Be)throw N&&!Be.request&&(Be.request=N),Be;if(P instanceof m)throw N&&!P.request&&(P.request=N),P;if(P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)){const ee=new m("Network Error",m.ERR_NETWORK,f,N,P&&P.response);throw Object.defineProperty(ee,"cause",{__proto__:null,value:P.cause||P,writable:!0,enumerable:!1,configurable:!0}),ee}throw m.from(P,P&&P.code,f,N,P&&P.response)}}},yi=new Map,Cs=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=yi;for(;a--;)l=o[a],d=u.get(l),d===void 0&&u.set(l,d=a?new Map:_i(e)),u=d;return d};Cs();const vt={http:On,xhr:ni,fetch:{get:Cs}};c.forEach(vt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const Rs=t=>`- ${t}`,wi=t=>c.isFunction(t)||t===null||t===!1;function vi(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,!wi(r)&&(n=vt[(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(Rs).join(`
|
|
6
|
+
`):" "+Rs(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 ks={getAdapter:vi,adapters:vt};function St(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Le(null,t)}function Et(t){return St(t),t.headers=M.from(t.headers),t.data=yt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ks.getAdapter(t.adapter||Te.adapter,t)(t).then(function(e){St(t),t.response=e;try{e.data=yt.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=M.from(e.headers),e},function(e){if(!ds(e)&&(St(t),e&&e.response)){t.response=e.response;try{e.response.data=yt.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=M.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 As={};Ge.transitional=function(t,e,s){function r(n,o){return"[Axios v"+wt+"] 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&&!As[o]&&(As[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 Si(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:Si,validators:Ge},z=Xe.validators;let ge=class{constructor(t){this.defaults=t||{},this.interceptors={request:new as,response:new as}}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=me(this.defaults,e);const{transitional:s,paramsSerializer:r,headers:n}=e;s!==void 0&&Xe.assertOptions(s,{silentJSONParsing:z.transitional(z.boolean),forcedJSONParsing:z.transitional(z.boolean),clarifyTimeoutError:z.transitional(z.boolean),legacyInterceptorReqResOrdering:z.transitional(z.boolean),advertiseZstdAcceptEncoding:z.transitional(z.boolean),validateStatusUndefinedResolves:z.transitional(z.boolean)},!1),r!=null&&(c.isFunction(r)?e.paramsSerializer={serialize:r}:Xe.assertOptions(r,{encode:z.function,serialize:z.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Xe.assertOptions(e,{baseUrl:z.spelling("baseURL"),withXsrfToken:z.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"],w=>{delete n[w]}),e.headers=M.concat(o,n);const i=[];let a=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(e)===!1)return;a=a&&w.synchronous;const x=e.transitional||gt;x&&x.legacyInterceptorReqResOrdering?i.unshift(w.fulfilled,w.rejected):i.push(w.fulfilled,w.rejected)});const l=[];this.interceptors.response.forEach(function(w){l.push(w.fulfilled,w.rejected)});let d,u=0,h;if(!a){const w=[Et.bind(this),void 0];for(w.unshift(...i),w.push(...l),h=w.length,d=Promise.resolve(e);u<h;)d=d.then(w[u++],w[u++]);return d}h=i.length;let g=e;for(;u<h;){const w=i[u++],x=i[u++];try{g=w?w(g):g}catch(v){if(!x){d=Promise.reject(v);break}try{const L=x.call(this,v);c.isThenable(L)&&(d=Promise.resolve(L).then(()=>Et.call(this,g)))}catch(L){d=Promise.reject(L)}break}}if(!d)try{d=Et.call(this,g)}catch(w){d=Promise.reject(w)}for(u=0,h=l.length;u<h;)d=d.then(l[u++],l[u++]);return d}getUri(t){t=me(this.defaults,t);const e=gs(t.baseURL,t.url,t.allowAbsoluteUrls,t);return os(e,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){ge.prototype[t]=function(e,s){return this.request(me(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(me(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ge.prototype[t]=e(),t!=="query"&&(ge.prototype[t+"Form"]=e(!0))});let Ei=class or{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 Le(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 or(function(s){e=s}),cancel:e}}};function Oi(t){return function(e){return t.apply(null,e)}}function xi(t){return c.isObject(t)&&t.isAxiosError===!0}const Ot={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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ot).forEach(([t,e])=>{Ot[e]=t});function Is(t){const e=new ge(t),s=Vt(ge.prototype.request,e);return c.extend(s,ge.prototype,e,{allOwnKeys:!0}),c.extend(s,e,null,{allOwnKeys:!0}),s.create=function(r){return Is(me(t,r))},s}const D=Is(Te);D.Axios=ge,D.CanceledError=Le,D.CancelToken=Ei,D.isCancel=ds,D.VERSION=wt,D.toFormData=Ke,D.AxiosError=m,D.Cancel=D.CanceledError,D.all=function(t){return Promise.all(t)},D.spread=Oi,D.isAxiosError=xi,D.mergeConfig=me,D.AxiosHeaders=M,D.formToJSON=t=>us(c.isHTMLForm(t)?new FormData(t):t),D.getAdapter=ks.getAdapter,D.HttpStatusCode=Ot,D.default=D;const{Axios:ea,AxiosError:ta,CanceledError:sa,isCancel:ra,CancelToken:na,VERSION:ia,all:oa,Cancel:aa,isAxiosError:ca,spread:la,toFormData:ua,AxiosHeaders:da,HttpStatusCode:ha,formToJSON:fa,getAdapter:pa,mergeConfig:ma,create:ga}=D,Ps=D.create({baseURL:location.origin,timeout:6e4,params:{}});Ps.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(n){n&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);const e=t.response?.data?.error?.data?.class;if(e==="HazardousError"||e==="CriticalCmdError")return Promise.reject(t);let s=`HTTP ${t.response.status} - `;t.response?.statusText&&(s+=`${t.response.statusText} `),t.response?.config?.data&&(s+=`${t.response.config.data} `),t.response?.data?.message?s+=`${t.response.data.message}`:t.response?.data?.exception?s+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(s+=`${t.response.data.error.class} `),s+=`${t.response.data.error.message}`):s+=`${t.response?.data}`;const{$cosmosNotify:r}=window;throw r&&r.serious({title:"Network error",body:s}),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 Ne extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class xt extends Ne{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class Ci extends Ne{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class se extends Ne{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class Ri extends se{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Ts(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 ki{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 be=Symbol("state");class Ls{constructor(e={}){this.emitter=Qe(),this.params=Object.freeze(e),this.presence=new ki(this),this.initialConnect=!0,this[be]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Ts({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[be]}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[be]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[be]="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[be]="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[be]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[be]="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 Ne("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Ai{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 Ii{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 Ii),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 Ai(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 Ti{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 Ns={debug:0,info:1,warn:2,error:3};class js{constructor(e){this.level=e||"warn"}log(e,s,r){Ns[e]<Ns[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 je extends js{writeLogEntry(){}}class Li{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let Ni=0;class Ds{constructor(e={}){let{logger:s}=e;this.logger=s||new je,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=Ts(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=++Ni;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 Ci(`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 se(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 xt)):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 Us=()=>Date.now()/1e3|0;class ji extends Ds{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=Us()),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=Us()),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 Di extends Ne{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Fs extends Ls{static identifier="__ghost__";constructor(e,s){super(s),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}const Ui="$pubsub";class Bs extends Ls{static identifier=Ui;async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}const _e=Symbol("state");let Fi=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 je,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new Ti(o||{}),this[_e]="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[_e]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[_e]="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[_e]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new se("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[_e]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new se("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 se(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[_e]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof se?t:new se(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[_e]="closed";let s=e||new se("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 Bs({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Bs({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,r;return typeof t=="string"&&(r=t,t=Fs),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 xt&&this.logger.warn("rejected",o),i instanceof se){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 se?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 Di;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 Bi={maxMissingPings:2,maxReconnectAttempts:1/0},xe=()=>Date.now(),$s=(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 qs=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Bi,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 je,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 Ri))}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 $i{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=Qe(),this.unbind=[],this.logger=s.logger||new je}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 qi{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 Vi{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 Mi extends Fs{constructor(e,s,r){super(e,s),this.subscription=new Vi(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 xt?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class zi{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 Mi(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 Wi{constructor(e){this.cable=e,this.subscriptions=new zi(e)}send(e){return this.cable.send(e)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const Vs={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Ji(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},Vs,e);let{protocol:s,websocketImplementation:r,websocketFormat:n,websocketOptions:o,websocketAuthStrategy:i,fallbacks:a,logLevel:l,logger:d,transport:u,encoder:h,lazy:g,monitor:w,pingInterval:x,reconnectStrategy:v,maxMissingPings:L,maxReconnectAttempts:f,subprotocol:_,tokenRefresher:S,historyTimestamp:p,protocolOptions:I,concurrentSubscribes:U,performFailures:Y,transportConfigurator:ne,auth:R}=e;if(d=d||new je(l),typeof s=="string"){_=_||s;let re=s.substring(0,s.lastIndexOf("-")),le=s.substring(s.lastIndexOf("-")+1);if(I=I||{},re==="actioncable-v1")s=new Ds({logger:d,...I});else if(re==="actioncable-v1-ext")s=new ji({logger:d,historyTimestamp:p,...I});else throw Error(`Protocol is not supported yet: ${s}`);if(le==="json")h=h||new Li,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 qi(t,{websocketImplementation:r,websocketOptions:o,subprotocol:_,authStrategy:i,format:n}),a&&(u=new $i([u,...a],{logger:d})),R&&R.token&&u.setToken(R.token,R.param||"jid"),v=v||$s(x),w!==!1&&(w=w||new qs({pingInterval:x,reconnectStrategy:v,maxMissingPings:L,maxReconnectAttempts:f,logger:d}));let T={concurrentSubscribes:U},q=new Fi({protocol:s,transport:u,encoder:h,logger:d,lazy:g,hubOptions:T,performFailures:Y,transportConfigurator:ne});return w&&(w.watch(q),q.monitor=w),S&&Hi(q,async()=>{try{await S(u)}catch(re){return d.error("Failed to refresh authentication token: "+re),!1}return q.connect().catch(()=>{}),!0}),q}function Hi(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 Ki extends js{writeLogEntry(e,s,r){r?console[e](s,r):console[e](s)}}class Yi extends qs{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 se("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",s,!1),window.addEventListener("online",s,!1),window.addEventListener("resume",s,!1),window.addEventListener("freeze",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 Zi=["cable","action-cable"],Gi="/cable",et=(t,e)=>{for(let s of Zi){let r=t.head.querySelector(`meta[name='${s}-${e}']`);if(r)return r.getAttribute("content")}},Ms=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Xi=()=>{if(typeof document<"u"&&document.head){let t=et(document,"url");if(t)return Ms(t)}return Ms(Gi)},Qi=()=>{if(typeof document<"u"&&document.head){let t=et(document,"history-timestamp");if(t)return t|0}},eo=()=>{if(typeof document<"u"&&document.head)return et(document,"token")},to=()=>{if(typeof document<"u"&&document.head)return et(document,"token-param")};function so(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Xi(),e=e||{},e.historyTimestamp||=Qi();let s=eo();if(s){let d=to();e.auth=Object.assign({token:s,param:d},e.auth||{})}e=Object.assign({},Vs,e);let{logLevel:r,logger:n,pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l}=e;return n=e.logger=e.logger||new Ki(r),i=e.reconnectStrategy=e.reconnectStrategy||$s(o),e.monitor!==!1&&(e.monitor=e.monitor||new Yi({pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l,logger:n})),Ji(t,e)}function ro(t,e){let s=so(t,e);return new Wi(s)}class zs{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=ro(i.href)}return this._cable.subscriptions.create({channel:e,token:localStorage.openc3Token,...n},r)})}recordPing(){}}function De(t){return no.test(t)}const no=/^-?[0-9]+$/;function Ws(t){return io.test(t)}const io=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Js(t,e){if(De(t))return Number.isSafeInteger(Number.parseInt(t,10));const s=Number.parseFloat(t),r=String(s);if(t===r)return!0;const n=Hs(t),o=Hs(r);return!!(n===o||e?.approx===!0&&!De(t)&&o.length>=14&&n.startsWith(o.substring(0,14)))}let Ue=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function oo(t){if(Js(t,{approx:!1}))return;if(De(t))return Ue.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Ue.underflow:Ue.truncate_float:Ue.overflow}function Hs(t){const{start:e,end:s}=ao(t),r=t.substring(e,s),n=r.indexOf(".");return n===-1?r:r.substring(0,n)+r.substring(n+1)}function ao(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 co{isLosslessNumber=!0;constructor(e){if(!Ws(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=oo(this.value);if(e===void 0||e===Ue.truncate_float)return Number.parseFloat(this.value);if(De(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 lo(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function uo(t){return new co(t)}function ho(t,e){return Ct({"":t},"",t,e)}function Ct(t,e,s,r){return Array.isArray(s)?r.call(t,e,po(s,r)):s&&typeof s=="object"&&!lo(s)?r.call(t,e,fo(s,r)):r.call(t,e,s)}function fo(t,e){for(const s of Object.keys(t)){const r=Ct(t,s,t[s],e);r!==void 0?t[s]=r:delete t[s]}return t}function po(t,e){for(let s=0;s<t.length;s++)t[s]=Ct(t,String(s),t[s],e);return t}function mo(t,e,s){const r=typeof s=="function"?{parseNumber:s}:s,n=r?.parseNumber??uo,o=r?.onDuplicateKey??Y;let i=0;const a=u();return f(a),S(),e?ho(a,e):a;function l(){if(t.charCodeAt(i)===vo){i++,g();const O={};let F=!0;for(;i<t.length&&t.charCodeAt(i)!==Ys;){F?F=!1:(v(),g());const Q=i,H=w();if(H===void 0){U();return}g(),L();const N=u();if(N===void 0){re();return}if(Object.prototype.hasOwnProperty.call(O,H)&&!Rt(N,O[H])){const ie=o({key:H,position:Q+1,oldValue:O[H],newValue:N});ie!==void 0&&(O[H]=ie)}else O[H]=N}return t.charCodeAt(i)!==Ys&&ne(),i++,O}}function d(){if(t.charCodeAt(i)===So){i++,g();const O=[];let F=!0;for(;i<t.length&&t.charCodeAt(i)!==Zs;){F?F=!1:v();const Q=u();_(Q),O.push(Q)}return t.charCodeAt(i)!==Zs&&R(),i++,O}}function u(){g();const O=w()??x()??l()??d()??h("true",!0)??h("false",!1)??h("null",null);return g(),O}function h(O,F){if(t.slice(i,i+O.length)===O)return i+=O.length,F}function g(){for(;go(t.charCodeAt(i));)i++}function w(){if(t.charCodeAt(i)===kt){i++;let O="";for(;i<t.length&&t.charCodeAt(i)!==kt;){if(t.charCodeAt(i)===wo){const F=t[i+1],Q=yo[F];Q!==void 0?(O+=Q,i++):F==="u"?tt(t.charCodeAt(i+2))&&tt(t.charCodeAt(i+3))&&tt(t.charCodeAt(i+4))&&tt(t.charCodeAt(i+5))?(O+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):le(i):q(i)}else _o(t.charCodeAt(i))?O+=t[i]:T(t[i]);i++}return I(),i++,O}}function x(){const O=i;if(t.charCodeAt(i)===Gs&&(i++,p(O)),t.charCodeAt(i)===At)i++;else if(bo(t.charCodeAt(i)))for(i++;st(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===Io)for(i++,p(O);st(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===jo||t.charCodeAt(i)===No)for(i++,(t.charCodeAt(i)===Gs||t.charCodeAt(i)===Ro)&&i++,p(O);st(t.charCodeAt(i));)i++;if(i>O)return n(t.slice(O,i))}function v(){if(t.charCodeAt(i)!==Ao)throw new SyntaxError(`Comma ',' expected after value ${J()}`);i++}function L(){if(t.charCodeAt(i)!==Po)throw new SyntaxError(`Colon ':' expected after property name ${J()}`);i++}function f(O){if(O===void 0)throw new SyntaxError(`JSON value expected ${J()}`)}function _(O){if(O===void 0)throw new SyntaxError(`Array item expected ${J()}`)}function S(){if(i<t.length)throw new SyntaxError(`Expected end of input ${J()}`)}function p(O){if(!st(t.charCodeAt(i))){const F=t.slice(O,i);throw new SyntaxError(`Invalid number '${F}', expecting a digit ${J()}`)}}function I(){if(t.charCodeAt(i)!==kt)throw new SyntaxError(`End of string '"' expected ${J()}`)}function U(){throw new SyntaxError(`Quoted object key expected ${J()}`)}function Y(O){let{key:F,position:Q}=O;throw new SyntaxError(`Duplicate key '${F}' encountered at position ${Q}`)}function ne(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${J()}`)}function R(){throw new SyntaxError(`Array item or end of array ']' expected ${J()}`)}function T(O){throw new SyntaxError(`Invalid character '${O}' ${W()}`)}function q(O){const F=t.slice(O,O+2);throw new SyntaxError(`Invalid escape character '${F}' ${W()}`)}function re(){throw new SyntaxError(`Object value expected after ':' ${W()}`)}function le(O){const F=t.slice(O,O+6);throw new SyntaxError(`Invalid unicode character '${F}' ${W()}`)}function W(){return`at position ${i}`}function Ce(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function J(){return`${Ce()} ${W()}`}}function go(t){return t===Eo||t===Oo||t===xo||t===Co}function tt(t){return t>=At&&t<=It||t>=To&&t<=Do||t>=Lo&&t<=Uo}function st(t){return t>=At&&t<=It}function bo(t){return t>=ko&&t<=It}function _o(t){return t>=32&&t<=1114111}function Rt(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,r)=>Rt(s,e[r])):Ks(t)&&Ks(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>Rt(t[s],e[s])):!1}function Ks(t){return typeof t=="object"&&t!==null}const yo={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
11
|
+
`,r:"\r",t:" "},wo=92,vo=123,Ys=125,So=91,Zs=93,Eo=32,Oo=10,xo=9,Co=13,kt=34,Ro=43,Gs=45,At=48,ko=49,It=57,Ao=44,Io=46,Po=58,To=65,Lo=97,No=69,jo=101,Do=70,Uo=102;function Xs(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"||!Ws(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 g=l[h];typeof g<"u"&&typeof g!="function"?u+=n(g):u+="null",h<l.length-1&&(u+=",")}return u+="]",u}function i(l,d){if(typeof l.toJSON=="function")return Xs(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,g="{";for(const w of u){const x=l[w];if(a(w,x)){h?h=!1:g+=",";const v=JSON.stringify(w);g+=`${v}:`,g+=n(x)}}return g+="}",g}function a(l,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function Fo(t){return De(t)&&!Js(t)?BigInt(t):parseFloat(t)}class Qs{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 Ps.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)=>Xs(i)],transformResponse:[i=>{try{return mo(i,void 0,Fo)}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 Bo={components:{ValueWidget:$t,ValuelimitsbarWidget:qt},mixins:[it],props:{modelValue:{type:Array,default:()=>[]},timeZone:{type:String,default:"local"}},emits:["update:modelValue"],data(){return{api:null,cable:new zs,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 Qs;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))}}},$o=["status"],qo={key:0},Vo=["status"],Mo={class:"font-weight-black"};function zo(t,e,s,r,n,o){const i=E("v-text-field"),a=E("v-spacer"),l=E("v-list-item"),d=E("v-select"),u=E("v-row"),h=E("valuelimitsbar-widget"),g=E("value-widget"),w=E("v-btn"),x=E("v-icon"),v=E("v-list-item-title"),L=E("v-list"),f=E("v-menu"),_=E("v-data-table"),S=E("v-card"),p=E("v-toolbar"),I=E("v-divider"),U=E("v-card-text"),Y=E("v-card-actions"),ne=E("v-dialog");return A(),G("div",null,[y(S,{class:"pa-5"},{default:b(()=>[y(u,{class:"ma-1"},{default:b(()=>[y(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:b(()=>[V("rux-status",{status:o.astroStatus},null,8,$o)]),key:"0"}:void 0]),1032,["model-value","class"]),y(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"]),y(a),y(d,{modelValue:n.stateFilter,"onUpdate:modelValue":e[0]||(e[0]=R=>n.stateFilter=R),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:b(({index:R})=>[R===0?(A(),G("span",qo,te(n.stateFilter.length)+" selected ",1)):ce("",!0)]),item:b(({props:R,item:T})=>[y(l,Ut(Ft(R)),{prepend:b(()=>[V("rux-status",{status:T.raw.status,class:"mr-2"},null,8,Vo)]),_:2},1040)]),_:1},8,["modelValue","items"]),y(i,{modelValue:n.search,"onUpdate:modelValue":e[1]||(e[1]=R=>n.search=R),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}),y(_,{"items-per-page":n.itemsPerPage,"onUpdate:itemsPerPage":e[2]||(e[2]=R=>n.itemsPerPage=R),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":b(({item:R})=>[B(te(R.timestamp),1)]),"item.value":b(({item:R})=>[R.limits?(A(),j(h,{key:0,parameters:R.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"])):(A(),j(g,{key:1,parameters:R.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":b(({item:R})=>[y(f,null,{activator:b(({props:T})=>[y(w,Re({icon:"mdi-dots-horizontal",variant:"text",density:"compact","aria-label":"Item Options"},T),null,16)]),default:b(()=>[y(L,null,{default:b(()=>[y(l,{onClick:T=>o.ignorePacket(R.key)},{prepend:b(()=>[y(x,null,{default:b(()=>[...e[5]||(e[5]=[B("mdi-close-circle-multiple",-1)])]),_:1})]),default:b(()=>[y(v,null,{default:b(()=>[...e[6]||(e[6]=[B("Ignore Entire Packet",-1)])]),_:1})]),_:1},8,["onClick"]),y(l,{onClick:T=>o.ignoreItem(R.key)},{prepend:b(()=>[y(x,null,{default:b(()=>[...e[7]||(e[7]=[B("mdi-close-circle",-1)])]),_:1})]),default:b(()=>[y(v,null,{default:b(()=>[...e[8]||(e[8]=[B("Ignore Item",-1)])]),_:1})]),_:1},8,["onClick"]),y(l,{onClick:T=>o.removeItem(R.key)},{prepend:b(()=>[y(x,null,{default:b(()=>[...e[9]||(e[9]=[B("mdi-eye-off",-1)])]),_:1})]),default:b(()=>[y(v,null,{default:b(()=>[...e[10]||(e[10]=[B("Temporarily Hide Item",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),"item.limits":b(({item:R})=>[y(a)]),_:1},8,["items-per-page","headers","items","search","custom-filter","row-props"]),e[11]||(e[11]=V("div",{class:"footer"},' Note: Timestamp is "now" for items currently out of limits when the page is loaded. ',-1))]),_:1}),y(ne,{modelValue:n.ignoredItemsDialog,"onUpdate:modelValue":e[4]||(e[4]=R=>n.ignoredItemsDialog=R),"max-width":"600"},{default:b(()=>[y(S,null,{default:b(()=>[y(p,{height:"24"},{default:b(()=>[y(a),e[12]||(e[12]=V("span",null,"Ignored Items",-1)),y(a)]),_:1}),y(U,{class:"mt-2"},{default:b(()=>[V("div",null,[(A(!0),G(de,null,we(o.ignoredFormatted,(R,T)=>(A(),G("div",{key:T},[y(u,{class:"ma-1 align-center"},{default:b(()=>[V("span",Mo,te(R),1),y(a),y(w,{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?(A(),j(I,{key:T})):ce("",!0)]))),128))])]),_:1}),y(Y,{class:"px-2"},{default:b(()=>[y(w,{variant:"outlined",onClick:o.clearAll},{default:b(()=>[...e[13]||(e[13]=[B(" Clear All ",-1)])]),_:1},8,["onClick"]),y(a),y(w,{variant:"flat",onClick:e[3]||(e[3]=R=>n.ignoredItemsDialog=!1)},{default:b(()=>[...e[14]||(e[14]=[B(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const Wo=qe(Bo,[["render",zo],["__scopeId","data-v-b6f77818"]]),Jo={mixins:[it],props:{historyCount:{type:Number,default:1e3},timeZone:{type:String,default:"local"}},data(){return{data:[],cable:new zs,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}}},Ho=["status"];function Ko(t,e,s,r,n,o){const i=E("v-spacer"),a=E("v-text-field"),l=E("v-card-title"),d=E("v-data-table"),u=E("v-card");return A(),j(u,{class:"card-height"},{default:b(()=>[y(l,{class:"d-flex align-center"},{default:b(()=>[e[1]||(e[1]=B(" Limits Events ",-1)),y(i),y(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}),y(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":b(({item:h})=>[V("span",null,te(t.formatNanoseconds(h.time_nsec,s.timeZone)),1)]),"item.level":b(({item:h})=>[V("rux-status",{status:o.getStatus(h.message)},null,8,Ho)]),"item.message":b(({item:h})=>[V("span",{class:at(o.getColorClass(h.message))},te(h.message),3)]),_:1},8,["headers","items","search","height"])]),_:1})}const Yo={components:{LimitsControl:Wo,LimitsEvents:qe(Jo,[["render",Ko],["__scopeId","data-v-192a6dcb"]]),TopBar:hr,OpenConfigDialog:Nt,SaveConfigDialog:Lt},mixins:[pr],data(){return{title:"Limits Monitor",configKey:"limits_monitor",api:new Qs,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 Zo(t,e,s,r,n,o){const i=E("top-bar"),a=E("limits-control"),l=E("limits-events"),d=E("open-config-dialog"),u=E("save-config-dialog"),h=E("v-spacer"),g=E("v-toolbar"),w=E("v-select"),x=E("v-card-text"),v=E("v-btn"),L=E("v-card-actions"),f=E("v-card"),_=E("v-dialog");return A(),G("div",null,[y(i,{menus:n.menus,title:n.title},null,8,["menus","title"]),(A(),j(a,{ref:"control",key:n.renderKey,modelValue:n.ignored,"onUpdate:modelValue":e[0]||(e[0]=S=>n.ignored=S),"time-zone":n.timeZone},null,8,["modelValue","time-zone"])),e[12]||(e[12]=V("div",{style:{height:"15px"}},null,-1)),y(l,{"time-zone":n.timeZone},null,8,["time-zone"]),n.openConfig?(A(),j(d,{key:0,modelValue:n.openConfig,"onUpdate:modelValue":e[1]||(e[1]=S=>n.openConfig=S),"config-key":n.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):ce("",!0),n.saveConfig?(A(),j(u,{key:1,modelValue:n.saveConfig,"onUpdate:modelValue":e[2]||(e[2]=S=>n.saveConfig=S),"config-key":n.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):ce("",!0),y(_,{modelValue:n.limitsSetDialog,"onUpdate:modelValue":e[5]||(e[5]=S=>n.limitsSetDialog=S),"max-width":"650",persistent:"",onKeydown:e[6]||(e[6]=Bt(S=>n.limitsSetDialog=!1,["esc"]))},{default:b(()=>[y(f,null,{default:b(()=>[y(g,{height:"24"},{default:b(()=>[y(h),e[7]||(e[7]=V("span",null,"Change Limits Set",-1)),y(h)]),_:1}),y(x,{class:"mt-6"},{default:b(()=>[e[8]||(e[8]=V("span",{style:{display:"block"}}," The Limits Set is a global option which changes the Limits Set across all tools. ",-1)),e[9]||(e[9]=V("span",{style:{display:"block"}}," NOTE: Changing this option clears the current list and recalculates based on the new set. ",-1)),y(w,{modelValue:n.currentLimitsSet,"onUpdate:modelValue":e[3]||(e[3]=S=>n.currentLimitsSet=S),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}),y(L,{class:"px-2"},{default:b(()=>[y(h),y(v,{variant:"outlined",onClick:e[4]||(e[4]=S=>n.limitsSetDialog=!1)},{default:b(()=>[...e[10]||(e[10]=[B(" Cancel ",-1)])]),_:1}),y(v,{variant:"flat",onClick:o.setLimitsSet},{default:b(()=>[...e[11]||(e[11]=[B(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const _a=ar("default",qe(Yo,[["render",Zo]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./BarColumn-
|
|
1
|
+
System.register(["./BarColumn-JQ552zb0-aae2ad8d5b2e0f4e365a.js","./LimitsBar-BqpvMpXM-211372e59b3e42b31f9e.js","vue","./main-6be3eeb9075feedbbccc.js","./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue-router","pinia","single-spa","vuetify"],(function(a,g){"use strict";var l,s,r,n,o,m,h;return{setters:[e=>{l=e.l},e=>{s=e.x},e=>{r=e.resolveComponent,n=e.openBlock,o=e.createBlock,m=e.createCommentVNode},e=>{h=e.l},null,null,null,null,null],execute:(function(){const e={components:{LimitsBar:s},mixins:[l],data(){return{width:160,height:22}},computed:{limits(){let i=this.limitsSettings[this.selectedLimitsSet];if(i)return i;throw{line:this.line,lineNumber:this.lineNumber,keyword:"LIMITSBAR",parameters:this.parameters,message:"Item has no limits settings",usage:"Only items with limits"}},mergedStyle(){return{...this.cssProps,...this.computedStyle}}},created(){this.verifyNumParams("LIMITSBAR",3,6,"LIMITSBAR <TARGET> <PACKET> <ITEM> <TYPE> <WIDTH> <HEIGHT>")}};function c(i,w,y,B,u,t){const d=r("LimitsBar");return t.limits?(n(),o(d,{key:0,"red-low":t.limits[0],"yellow-low":t.limits[1],"yellow-high":t.limits[2],"red-high":t.limits[3],"green-low":t.limits[4],"green-high":t.limits[5],width:u.width,height:u.height,"computed-style":t.mergedStyle,"hide-tooltip":!!i.tooltipText},null,8,["red-low","yellow-low","yellow-high","red-high","green-low","green-high","width","height","computed-style","hide-tooltip"])):m("",!0)}const p=a("default",h(e,[["render",c]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-6be3eeb9075feedbbccc.js","vue","./DetailsDialog-DHi4t3xd-1ef92e48ab12763f0ab3.js","single-spa","./VWidget-5FjwlURU-e6be62bc11c1ee65c211.js","vue-router","pinia","vuetify","./LimitsBar-BqpvMpXM-211372e59b3e42b31f9e.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js"],(function(V,R){"use strict";var y,i,n,o,c,d,u,h,p,f,C,x,w,g,v,S,M,k,D;return{setters:[e=>{y=e.l},e=>{i=e.resolveComponent,n=e.openBlock,o=e.createElementBlock,c=e.normalizeStyle,d=e.normalizeClass,u=e.createVNode,h=e.createBlock,p=e.withCtx,f=e.createElementVNode,C=e.toDisplayString,x=e.mergeProps,w=e.createCommentVNode,g=e.Fragment,v=e.renderList,S=e.withModifiers,M=e.createTextVNode},e=>{k=e.Z},null,e=>{D=e.T},null,null,null,null,null,null],execute:(function(){const e={components:{DetailsDialog:k},mixins:[D],data(){return{astro:!1,radius:15,fullLabelDisplay:!1,displayLabel:!0,viewDetails:!1,contextMenuShown:!1,x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}},{title:"Graph",action:()=>{window.open("/tools/tlmgrapher/"+encodeURIComponent(this.parameters[0])+"/"+encodeURIComponent(this.parameters[1])+"/"+encodeURIComponent(this.parameters[2])+"/","_blank")}}]}},computed:{labelName(){return this.fullLabelDisplay?[this.parameters[0]+" "+this.parameters[1]+" "+this.parameters[2]]:[this.parameters[2]]},fullName(){return this.parameters[0]+" "+this.parameters[1]+" "+this.parameters[2]},ledClass(){let t=`led align-self-center ${this.limitsColor}`;return this._limitsState==="STALE"&&(t+=" stale"),t},cssProps(){return{"--height":this.radius+"px","--width":this.radius+"px"}},staleClass(){return this._limitsState==="STALE"?"stale":""},myComputedStyle(){const t={...this.computedStyle};return delete t.flex,t}},created(){this.appliedSettings.forEach(t=>{t[0]==="ASTRO"&&(this.astro=t[1]?.toLowerCase()!=="false")}),this.parameters[4]&&(this.radius=Number.parseInt(this.parameters[4])),this.parameters[5]&&(this.parameters[5].toLowerCase()==="true"?this.fullLabelDisplay=!0:this.parameters[5].toLowerCase()==="nil"?this.displayLabel=!1:this.parameters[5].toLowerCase()==="none"&&(this.displayLabel=!1))},methods:{getType(){let t="CONVERTED";return this.parameters[3]&&(t=this.parameters[3]),t},showContextMenu(t){t.preventDefault(),this.contextMenuShown=!1,this.x=t.clientX,this.y=t.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})}}};function N(t,l,z,O,r,s){const L=i("rux-status"),b=i("v-tooltip"),_=i("label-widget"),T=i("v-list-item-title"),B=i("v-list-item"),E=i("v-list"),U=i("v-menu"),j=i("details-dialog");return n(),o("div",{ref:"container",class:"d-flex flex-row",style:c(s.myComputedStyle)},[t.tooltipText?r.astro?(n(),o("div",{key:2,class:d(["astroled align-self-center",s.staleClass]),onContextmenu:l[3]||(l[3]=(...a)=>s.showContextMenu&&s.showContextMenu(...a))},[u(L,{status:t.astroStatus},null,8,["status"])],34)):(n(),o("div",{key:1,class:d(s.ledClass),style:c(s.cssProps),onContextmenu:l[2]||(l[2]=(...a)=>s.showContextMenu&&s.showContextMenu(...a))},null,38)):(n(),h(b,{key:0,"open-delay":600,location:"top"},{activator:p(({props:a})=>[r.astro?(n(),o("div",x({key:1,class:["astroled align-self-center",s.staleClass]},a,{onContextmenu:l[1]||(l[1]=(...m)=>s.showContextMenu&&s.showContextMenu(...m))}),[u(L,{status:t.astroStatus},null,8,["status"])],16)):(n(),o("div",x({key:0,class:s.ledClass,style:s.cssProps},a,{onContextmenu:l[0]||(l[0]=(...m)=>s.showContextMenu&&s.showContextMenu(...m))}),null,16))]),default:p(()=>[f("span",null,C(s.fullName),1)]),_:1})),r.displayLabel?(n(),h(_,{key:3,parameters:s.labelName,settings:t.appliedSettings,style:c(t.computedStyle),"widget-index":1},null,8,["parameters","settings","style"])):w("",!0),u(U,{modelValue:r.contextMenuShown,"onUpdate:modelValue":l[4]||(l[4]=a=>r.contextMenuShown=a),target:[r.x,r.y],style:{"z-index":"3000"}},{default:p(()=>[u(E,null,{default:p(()=>[(n(!0),o(g,null,v(r.contextMenuOptions,(a,m)=>(n(),h(B,{key:m,onClick:S(a.action,["stop"])},{default:p(()=>[u(T,null,{default:p(()=>[M(C(a.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),u(j,{modelValue:r.viewDetails,"onUpdate:modelValue":l[5]||(l[5]=a=>r.viewDetails=a),"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])],4)}const I=V("default",y(e,[["render",N],["__scopeId","data-v-d4f5103d"]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./BarColumn-
|
|
1
|
+
System.register(["./BarColumn-JQ552zb0-aae2ad8d5b2e0f4e365a.js","vue","./main-6be3eeb9075feedbbccc.js","./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue-router","pinia","single-spa","vuetify"],(function(n,v){"use strict";var s,a,l,d,r,h;return{setters:[i=>{s=i.l},i=>{a=i.openBlock,l=i.createElementBlock,d=i.normalizeStyle,r=i.createStaticVNode},i=>{h=i.l},null,null,null,null,null],execute:(function(){const i={mixins:[s],data(){return{width:22,height:120}},computed:{cssProps:function(){if(!this.screenValues[this.valueId])return{};let e=this.screenValues[this.valueId][0],t=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);if(t)return this.calcLimits(t),{"--height":this.height+"px","--width":this.width+"px","--container-width":this.width-5+"px","--position":this.calcPosition(e,t)+"%","--redlow-height":this.redLow+"%","--redhigh-height":this.redHigh+"%","--yellowlow-height":this.yellowLow+"%","--yellowhigh-height":this.yellowHigh+"%","--greenlow-height":this.greenLow+"%","--greenhigh-height":this.greenHigh+"%","--blue-height":this.blue+"%"};throw{line:this.line,lineNumber:this.lineNumber,keyword:"LIMITSCOLUMN",parameters:this.parameters,message:"Item has no limits settings",usage:"Only items with limits"}}},created(){this.verifyNumParams("LIMITSCOLUMN",3,6,"LIMITSCOLUMN <TARGET> <PACKET> <ITEM> <TYPE> <WIDTH> <HEIGHT>")}};function c(e,t,u,g,w,o){return a(),l("div",{class:"limitsbar",style:d([o.cssProps,e.computedStyle])},[...t[0]||(t[0]=[r('<div class="limitsbar__container" data-v-4c4fd53a><div class="limitsbar__redlow" data-v-4c4fd53a></div><div class="limitsbar__redhigh" data-v-4c4fd53a></div><div class="limitsbar__yellowlow" data-v-4c4fd53a></div><div class="limitsbar__yellowhigh" data-v-4c4fd53a></div><div class="limitsbar__greenlow" data-v-4c4fd53a></div><div class="limitsbar__greenhigh" data-v-4c4fd53a></div><div class="limitsbar__blue" data-v-4c4fd53a></div><div class="limitsbar__line" data-v-4c4fd53a></div><div class="limitsbar__arrow" data-v-4c4fd53a></div></div>',1)])],4)}const m=n("default",h(i,[["render",c],["__scopeId","data-v-4c4fd53a"]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./GraphWidget-COvVOlEn-8144809d5f19f42688e6.js","./main-6be3eeb9075feedbbccc.js","vue","./Graph-xc7TNnsk-cc150d126b32fc967a14.js","single-spa","./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue-router","pinia","vuetify","./OpenC3TimePicker-Cww9L2Ij-d378db5252fc33c748ce.js"],(function(p,u){"use strict";var s,n,r,a,o,l,d;return{setters:[t=>{s=t.M},t=>{n=t.l},t=>{r=t.resolveComponent,a=t.openBlock,o=t.createBlock,l=t.normalizeStyle},t=>{d=t.U},null,null,null,null,null,null],execute:(function(){const t={components:{Graph:d},mixins:[s]};function h(e,i,g,v,f,k){const c=r("graph");return a(),o(c,{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 +1 @@
|
|
|
1
|
-
System.register(["./Layout-
|
|
1
|
+
System.register(["./Layout-BLS4Yi3m-1534ca87ca44f14d75b6.js","./main-6be3eeb9075feedbbccc.js","vue","./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue-router","pinia","single-spa","vuetify"],(function(w,z){"use strict";var g,y,v,d,r,s,h,l,o,i,c,f,k,p,u;return{setters:[t=>{g=t.r},t=>{y=t.l,v=t.h},t=>{d=t.resolveComponent,r=t.openBlock,s=t.createElementBlock,h=t.normalizeStyle,l=t.Fragment,o=t.renderList,i=t.createBlock,c=t.withCtx,f=t.createElementVNode,k=t.toDisplayString,p=t.resolveDynamicComponent,u=t.mergeProps},null,null,null,null,null],execute:(function(){const t={mixins:[g],computed:{columns(){return Number.parseInt(this.parameters[0])},widgetChunks(){return v.chunk(this.widgets,this.columns)}},created:function(){if(this.parameters[1]){let n=this.parameters[1];this.widgets.forEach(m=>{m.settings.find(a=>a[0]==="MARGIN"||a[0].startsWith("RAW")&&a[1].toUpperCase().includes("MARGIN"))===void 0&&m.settings.push(["MARGIN",n])})}}};function C(n,m,a,A,D,T){const b=d("v-tooltip");return r(),s("table",{style:h(n.computedStyle),role:"presentation"},[(r(!0),s(l,null,o(T.widgetChunks,(N,S)=>(r(),s("tr",{key:"r"+S},[(r(!0),s(l,null,o(N,(e,B)=>(r(),s("td",{key:"c"+B},[n.getTooltipText(e)?(r(),i(b,{key:0,"open-delay":n.getTooltipDelay(e),location:"top","activator-props":n.getTooltipActivatorProps(e)},{activator:c(({props:x})=>[(r(),i(p(e.type),u({ref_for:!0},{...n.listeners,...x},{target:e.target,parameters:e.parameters,settings:e.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,widgets:e.widgets,name:e.name,line:e.line,"line-number":e.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))]),default:c(()=>[f("span",null,k(n.getTooltipText(e)),1)]),_:2},1032,["open-delay","activator-props"])):(r(),i(p(e.type),u({key:1,ref_for:!0},n.listeners,{target:e.target,parameters:e.parameters,settings:e.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,widgets:e.widgets,name:e.name,line:e.line,"line-number":e.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))]))),128))]))),128))],4)}const E=w("default",y(t,[["render",C]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-6be3eeb9075feedbbccc.js","vue"],(function(F,M){"use strict";var y,V,l,g,S,N,b,v,o,u,p,T;return{setters:[i=>{y=i.g,V=i.l},i=>{l=i.resolveComponent,g=i.openBlock,S=i.createBlock,N=i.withKeys,b=i.normalizeClass,v=i.normalizeStyle,o=i.withCtx,u=i.createVNode,p=i.createTextVNode,T=i.mergeProps}],execute:(function(){const i=new Map,c=new Map;function I(e,t){if(i.has(e))return Promise.resolve(i.get(e));if(!c.has(e)){const a=new y().get_setting(e).then(s=>{const r=s??t;return i.set(e,r),r}).catch(()=>(i.set(e,t),t)).finally(()=>{c.delete(e)});c.set(e,a)}return c.get(e)}function C(e){return i.has(e)?i.get(e):void 0}const k={inheritAttrs:!1,props:{modelValue:{type:String,default:""},label:{type:String,default:"Time"},rules:{type:Array,default:()=>[]},errorMessages:{type:[String,Array],default:()=>[]},hideDetails:{type:[Boolean,String],default:!1},variant:{type:String,default:"filled"},density:{type:String,default:"default"},style:{type:[String,Object],default:""},textFieldClass:{type:String,default:""},dataTest:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","focus"],data(){return{menu:!1,timeFormat:C("time_format")??null,tempTime:null,inputValue:""}},computed:{computedStyle(){return typeof this.style=="string"?this.style:this.style},computedRules(){return this.rules.map(e=>()=>e(this.modelValue))}},watch:{modelValue:{immediate:!0,handler(e){!this.menu&&this.timeFormat!==null&&(this.inputValue=this.formatForDisplay(e))}},inputValue(e){e===""&&this.modelValue!==""&&this.$emit("update:modelValue","")},menu(e){e&&(this.tempTime=this.normalizeTime(this.modelValue)||"00:00:00")},tempTime(e){this.menu&&e&&(this.inputValue=this.formatForDisplay(e))}},async created(){if(this.timeFormat!==null)return;const e=this.inputValue;this.timeFormat=await I("time_format","ampm"),!this.menu&&this.inputValue===e&&(this.inputValue=this.formatForDisplay(this.modelValue))},methods:{formatForDisplay(e){return e?this.timeFormat==="24hr"?e:this.convertTo12Hour(e):""},handleBlur(){const e=this.parseTimeInput(this.inputValue);e?(this.$emit("update:modelValue",e),this.inputValue=this.formatForDisplay(e)):this.inputValue===""?this.$emit("update:modelValue",""):this.inputValue=this.formatForDisplay(this.modelValue)},parseTimeInput(e){if(!e||e.trim()==="")return"";const t=e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);if(t){const s=Number.parseInt(t[1],10),r=Number.parseInt(t[2],10),n=t[3]?Number.parseInt(t[3],10):0;if(s>=0&&s<=23&&r>=0&&r<=59&&n>=0&&n<=59)return`${s.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}const a=e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?\s*(AM|PM|am|pm)$/i);if(a){let s=Number.parseInt(a[1],10);const r=Number.parseInt(a[2],10),n=a[3]?Number.parseInt(a[3],10):0,d=a[4].toUpperCase();if(s>=1&&s<=12&&r>=0&&r<=59&&n>=0&&n<=59)return d==="AM"?s===12&&(s=0):s!==12&&(s+=12),`${s.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}return null},save(){this.$emit("update:modelValue",this.tempTime),this.inputValue=this.formatForDisplay(this.tempTime),this.menu=!1},cancel(){this.tempTime=this.normalizeTime(this.modelValue)||"00:00:00",this.menu=!1},normalizeTime(e){if(!e)return"";const t=e.split(":");if(t.length<2)return e;const a=Number.parseInt(t[0],10),s=Number.parseInt(t[1],10),r=t.length>2?Number.parseInt(t[2],10):0;return Number.isNaN(a)||Number.isNaN(s)||Number.isNaN(r)?"":`${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`},convertTo12Hour(e){if(!e)return"";const t=e.split(":");if(t.length<2)return e;let a=Number.parseInt(t[0],10);const s=Number.parseInt(t[1],10),r=t.length>2?Number.parseInt(t[2],10):0;if(Number.isNaN(a)||Number.isNaN(s)||Number.isNaN(r))return e;const n=a>=12?"PM":"AM";a=a%12,a=a||12;const d=a.toString().padStart(2,"0"),h=s.toString().padStart(2,"0"),f=r.toString().padStart(2,"0");return`${d}:${h}:${f} ${n}`}}};function w(e,t,a,s,r,n){const d=l("v-icon"),h=l("v-time-picker"),f=l("v-spacer"),$=l("v-btn"),_=l("v-card-actions"),x=l("v-card"),B=l("v-menu"),D=l("v-text-field");return g(),S(D,{modelValue:r.inputValue,"onUpdate:modelValue":t[2]||(t[2]=m=>r.inputValue=m),label:a.label,rules:n.computedRules,"error-messages":a.errorMessages,"hide-details":a.hideDetails,variant:a.variant,density:a.density,style:v(n.computedStyle),class:b(a.textFieldClass),disabled:a.disabled,"data-test":a.dataTest,onBlur:n.handleBlur,onFocus:t[3]||(t[3]=m=>e.$emit("focus",m)),onKeydown:N(n.handleBlur,["enter"])},{"prepend-inner":o(()=>[u(B,{modelValue:r.menu,"onUpdate:modelValue":t[1]||(t[1]=m=>r.menu=m),"close-on-content-click":!1,transition:"scale-transition",offset:"16"},{activator:o(({props:m})=>[u(d,T(m,{class:"cursor-pointer"}),{default:o(()=>[...t[4]||(t[4]=[p(" mdi-clock-outline ",-1)])]),_:1},16)]),default:o(()=>[u(x,{class:"time-picker-card"},{default:o(()=>[u(h,{modelValue:r.tempTime,"onUpdate:modelValue":t[0]||(t[0]=m=>r.tempTime=m),format:r.timeFormat,scrollable:"","use-seconds":"","hide-header":""},null,8,["modelValue","format"]),u(_,null,{default:o(()=>[u(f),u($,{variant:"text",onClick:n.cancel},{default:o(()=>[...t[5]||(t[5]=[p("Cancel",-1)])]),_:1},8,["onClick"]),u($,{color:"primary",variant:"text",onClick:n.save},{default:o(()=>[...t[6]||(t[6]=[p("OK",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue","label","rules","error-messages","hide-details","variant","density","style","class","disabled","data-test","onBlur","onKeydown"])}const z=F("w",V(k,[["render",w],["__scopeId","data-v-3a6a70ee"]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue","./main-6be3eeb9075feedbbccc.js","vue-router","pinia","single-spa","vuetify"],(function(u,d){"use strict";var s,a,r,l,i,n;return{setters:[e=>{s=e.f},e=>{a=e.resolveComponent,r=e.openBlock,l=e.createBlock,i=e.normalizeStyle},e=>{n=e.l},null,null,null,null],execute:(function(){const e={mixins:[s],props:{value:{type:[Number,String],default:null}},emits:["addItem","deleteItem"],data:function(){return{valueId:null,scaleFactor:1,width:150}},computed:{_value:function(){let t=this.value;if(t===null){if(!this.screenValues[this.valueId])return 0;t=this.screenValues[this.valueId][0]}return Number.parseInt(Number.parseFloat(t)*this.scaleFactor)}},created:function(){if(this.parameters[3]&&(this.scaleFactor=Number.parseFloat(this.parameters[3])),this.width=this.setWidth(this.parameters[4],"px",this.width),this.value===null){let t="CONVERTED";this.parameters[5]&&(t=this.parameters[5]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)}},unmounted:function(){this.$emit("deleteItem",this.valueId)}};function o(t,p,v,f,I,c){const h=a("rux-progress");return r(),l(h,{value:c._value,class:"progress",style:i(t.computedStyle)},null,8,["value","style"])}const m=u("default",n(e,[["render",o],["__scopeId","data-v-af1daff2"]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue","./main-6be3eeb9075feedbbccc.js","vue-router","pinia","single-spa","vuetify"],(function(s,d){"use strict";var l,t,n,a,r,u;return{setters:[e=>{l=e.f},e=>{t=e.resolveComponent,n=e.openBlock,a=e.createBlock,r=e.normalizeStyle},e=>{u=e.l},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,f,p,b){const v=t("v-radio");return n(),a(v,{"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 +1 @@
|
|
|
1
|
-
System.register(["./Layout-
|
|
1
|
+
System.register(["./Layout-BLS4Yi3m-1534ca87ca44f14d75b6.js","vue","./main-6be3eeb9075feedbbccc.js","./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue-router","pinia","single-spa","vuetify"],(function(h,C){"use strict";var a,l,r,s,i,c,o,m,u,d,p,g;return{setters:[e=>{a=e.r},e=>{l=e.resolveComponent,r=e.openBlock,s=e.createBlock,i=e.normalizeStyle,c=e.withCtx,o=e.createElementBlock,m=e.Fragment,u=e.renderList,d=e.resolveDynamicComponent,p=e.mergeProps},e=>{g=e.l},null,null,null,null,null],execute:(function(){const e={mixins:[a],data(){return{selectedIndex:0}},created(){this.parameters[0]&&(this.selectedIndex=Number.parseInt(this.parameters[0]))},methods:{selected(){return this.selectedIndex}}};function f(n,v,I,S,y,w){const k=l("v-radio-group");return r(),s(k,{modelValue:y.selectedIndex,"onUpdate:modelValue":v[0]||(v[0]=t=>y.selectedIndex=t),"hide-details":"",density:"compact",style:i(n.computedStyle)},{default:c(()=>[(r(!0),o(m,null,u(n.widgets,(t,x)=>(r(),s(d(t.type),p({ref_for:!0},n.listeners,{key:x,value:x,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,name:t.name}),null,16,["value","target","parameters","settings","screen-values","screen-time-zone","name"]))),128))]),_:1},8,["modelValue","style"])}const B=h("default",g(e,[["render",f]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue","./main-6be3eeb9075feedbbccc.js","vue-router","pinia","single-spa","vuetify"],(function(u,m){"use strict";var r,a,n,h,s,l;return{setters:[e=>{r=e.f},e=>{a=e.openBlock,n=e.createElementBlock,h=e.normalizeStyle,s=e.createElementVNode},e=>{l=e.l},null,null,null,null],execute:(function(){const e={mixins:[r],emits:["addItem","deleteItem"],data(){return{width:160,height:22}},computed:{cssProps(){return{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition()+"%"}},min(){return Number.parseInt(this.parameters[3])},max(){return Number.parseInt(this.parameters[4])},range(){return this.max-this.min}},created(){const t=this.parameters[5]?this.parameters[5]:"CONVERTED";this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId),this.width=this.setWidth(this.parameters[6],"px",this.width),this.height=this.setHeight(this.parameters[7],"px",this.height)},unmounted(){this.$emit("deleteItem",this.valueId)},methods:{calcPosition(){if(!this.screenValues[this.valueId])return 0;let t=this.screenValues[this.valueId][0];if(t==null)return 0;if(t.raw)return t.raw==="-Infinity"?0:100;const i=(t-this.min)/this.range*100;return i>100?100:i<0?0:i}}};function c(t,i,p,g,v,d){return a(),n("div",{class:"rangebar",style:h([d.cssProps,t.computedStyle])},[...i[0]||(i[0]=[s("div",{class:"rangebar__container"},[s("div",{class:"rangebar__line"}),s("div",{class:"rangebar__arrow"})],-1)])],4)}const o=u("default",l(e,[["render",c],["__scopeId","data-v-276a618a"]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue","./main-6be3eeb9075feedbbccc.js","vue-router","pinia","single-spa","vuetify"],(function(m,p){"use strict";var l,r,a,c,o,u;return{setters:[t=>{l=t.f},t=>{r=t.resolveComponent,a=t.openBlock,c=t.createBlock,o=t.normalizeStyle},t=>{u=t.l},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 n of this.items){let s=this.screenValues[n][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 n="CONVERTED";e[4]&&(n=e[4]);let s=`${e[1]}__${e[2]}__${e[3]}__${n}`;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,n,s,b,E,i){const d=r("rux-monitoring-icon");return a(),c(d,{class:"rux-icon",style:o([i.pointerStyle,e.computedStyle]),icon:e.icon,status:i.status,label:e.label,sublabel:e.subLabel,onClick:i.clickHandler},null,8,["style","icon","status","label","sublabel","onClick"])}const f=m("default",u(t,[["render",h]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Layout-
|
|
1
|
+
System.register(["./Layout-BLS4Yi3m-1534ca87ca44f14d75b6.js","vue","./main-6be3eeb9075feedbbccc.js","./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue-router","pinia","single-spa","vuetify"],(function(h,S){"use strict";var g,u,r,s,v,l,y,i,o,f,d,c,p,w;return{setters:[t=>{g=t.r},t=>{u=t.resolveComponent,r=t.openBlock,s=t.createElementBlock,v=t.normalizeStyle,l=t.Fragment,y=t.renderList,i=t.createBlock,o=t.withCtx,f=t.createElementVNode,d=t.toDisplayString,c=t.resolveDynamicComponent,p=t.mergeProps},t=>{w=t.l},null,null,null,null,null],execute:(function(){const t={mixins:[g],created:function(){if(this.setHeight(this.parameters[0],"px",200),this.parameters[1]){let n=this.parameters[1];this.widgets.forEach(m=>{m.settings.find(a=>a[0]==="MARGIN"||a[0].startsWith("RAW")&&a[1].toUpperCase().includes("MARGIN"))===void 0&&m.settings.push(["MARGIN",n])})}}};function k(n,m,a,x,z,b){const C=u("v-tooltip");return r(),s("div",{ref:"container",style:v(n.computedStyle),class:"overflow-y-auto"},[(r(!0),s(l,null,y(n.widgets,(e,B)=>(r(),s(l,{key:B},[n.getTooltipText(e)?(r(),i(C,{key:0,"open-delay":n.getTooltipDelay(e),location:"top","activator-props":n.getTooltipActivatorProps(e)},{activator:o(({props:N})=>[(r(),i(c(e.type),p({ref_for:!0},{...n.listeners,...N},{target:e.target,parameters:e.parameters,settings:e.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,widgets:e.widgets,name:e.name,line:e.line,"line-number":e.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))]),default:o(()=>[f("span",null,d(n.getTooltipText(e)),1)]),_:2},1032,["open-delay","activator-props"])):(r(),i(c(e.type),p({key:1,ref_for:!0},n.listeners,{target:e.target,parameters:e.parameters,settings:e.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,widgets:e.widgets,name:e.name,line:e.line,"line-number":e.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))],64))),128))],4)}const T=h("default",w(t,[["render",k]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./VWidget-
|
|
1
|
+
System.register(["./VWidget-5FjwlURU-e6be62bc11c1ee65c211.js","vue","./main-6be3eeb9075feedbbccc.js","./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","vue-router","pinia","single-spa","vuetify"],(function(c,p){"use strict";var l,r,n,a,i,s;return{setters:[t=>{l=t.T},t=>{r=t.resolveComponent,n=t.openBlock,a=t.createBlock,i=t.normalizeStyle},t=>{s=t.l},null,null,null,null,null,null],execute:(function(){const t={mixins:[l],props:{value:{type:[Number,String],default:null}},emits:["open"],data:function(){return{item:null,oneBar:30,twoBar:60,threeBar:90}},computed:{displayedIcon:function(){let e="mdi-signal-cellular-outline";return this._value>=this.oneBar&&(e="mdi-signal-cellular-1"),this._value>=this.twoBar&&(e="mdi-signal-cellular-2"),this._value>=this.threeBar&&(e="mdi-signal-cellular-3"),e}},created(){this.appliedSettings.forEach(e=>{switch(e[0].toUpperCase()){case"SCREEN":this.screenTarget=e[1],this.screenName=e[2];break;case"VALUES":this.oneBar=Number.parseFloat(e[1]),this.twoBar=Number.parseFloat(e[2]),this.threeBar=Number.parseFloat(e[3]);break}})},methods:{getType(){let e="CONVERTED";return this.parameters[3]=="RAW"&&(e="RAW"),e},clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}};function u(e,d,g,B,v,o){const h=r("v-btn");return n(),a(h,{icon:o.displayedIcon,variant:"text",style:i(e.computedStyle),"aria-label":"Signal Strength",onClick:o.clickHandler},null,8,["icon","style","onClick"])}const m=c("default",s(t,[["render",u]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue","./main-6be3eeb9075feedbbccc.js","vue-router","pinia","single-spa","vuetify"],(function(r,o){"use strict";var t,n,i,s,l;return{setters:[e=>{t=e.f},e=>{n=e.openBlock,i=e.createElementBlock,s=e.normalizeStyle},e=>{l=e.l},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,f,h){return n(),i("div",{style:s(u.computedStyle)},null,4)}const c=r("default",l(e,[["render",a]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./GraphWidget-COvVOlEn-8144809d5f19f42688e6.js","./main-6be3eeb9075feedbbccc.js","vue","./Graph-xc7TNnsk-cc150d126b32fc967a14.js","single-spa","./Widget-CSgnvwEG-9b4ea126991b64dfd7d5.js","vue-router","pinia","vuetify","./OpenC3TimePicker-Cww9L2Ij-d378db5252fc33c748ce.js"],(function(o,c){"use strict";var i,s,n,r,a,d,l;return{setters:[e=>{i=e.M},e=>{s=e.l},e=>{n=e.resolveComponent,r=e.openBlock,a=e.createBlock,d=e.normalizeStyle},e=>{l=e.U},null,null,null,null,null,null],execute:(function(){const e={components:{Graph:l},mixins:[i],data:function(){return{secondsGraphed:300,pointsSaved:300,pointsGraphed:300,size:{height:30,width:130}}}};function p(t,g,m,v,f,G){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=o("default",s(e,[["render",p]]))})}}));
|