openc3-cosmos-tool-limitsmonitor 6.9.0 → 6.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/limitsmonitor/{ArrayWidget-DLfNWDzN-bb9bb4d45c95829e1a13.js → ArrayWidget-DLfNWDzN-d11cd234f5f8b1b7d790.js} +1 -1
- data/tools/limitsmonitor/{ArrayplotWidget-CoRsUxHG-52317503b3076cad8e38.js → ArrayplotWidget-CoRsUxHG-f88d130c310ae9866e51.js} +1 -1
- data/tools/limitsmonitor/{BarColumn-DHP-zQ4R-4954e3b29521620e578f.js → BarColumn-DHP-zQ4R-6e0b3b131139b91d2a85.js} +1 -1
- data/tools/limitsmonitor/{BlockWidget-BmHSFvOq-8f5039607f854a7891a4.js → BlockWidget-BmHSFvOq-7e21fcc725f1f1e2270d.js} +1 -1
- data/tools/limitsmonitor/{ButtonWidget-C3ZWRjZZ-7ac5e85c9f9da2701231.js → ButtonWidget-C3ZWRjZZ-1cb3848fa9b471087973.js} +1 -1
- data/tools/limitsmonitor/{CanvasWidget-CL-XzPF4-bc78283bbfa351496b83.js → CanvasWidget-CL-XzPF4-da806034b1d5ca448a27.js} +1 -1
- data/tools/limitsmonitor/{CanvasdotWidget-D8Y9DgVE-6f80b3c2dc8769384272.js → CanvasdotWidget-D8Y9DgVE-af3cfa4d2c3f55e3ec05.js} +1 -1
- data/tools/limitsmonitor/{CanvasimageWidget-DHSGK_tD-7a230c8b67bdbc6ac1c4.js → CanvasimageWidget-DHSGK_tD-8500a2e4f0425e8583fe.js} +1 -1
- data/tools/limitsmonitor/{CanvasimagevalueWidget-Btt_fQfC-7b4d99ef481812852152.js → CanvasimagevalueWidget-Btt_fQfC-cfe49497172099b7db25.js} +1 -1
- data/tools/limitsmonitor/{CanvaslabelWidget-BF_8RTjv-e7f1795f2a561cf7271e.js → CanvaslabelWidget-BF_8RTjv-a46ce47496fcfd8fbd96.js} +1 -1
- data/tools/limitsmonitor/{CanvaslabelvalueWidget-scbwaujI-35061503cbeb918d69da.js → CanvaslabelvalueWidget-scbwaujI-dae61b176404420cfa08.js} +1 -1
- data/tools/limitsmonitor/{CanvaslineWidget-gRvm_-TT-fb7d2e02af64fa119b9b.js → CanvaslineWidget-gRvm_-TT-30d33c6f9244a38e8cca.js} +1 -1
- data/tools/limitsmonitor/{CanvaslinevalueWidget-CljziRek-fe151bbb2f1b7653af7b.js → CanvaslinevalueWidget-CljziRek-9c711d840df6b1101f3b.js} +1 -1
- data/tools/limitsmonitor/{CheckbuttonWidget-BOabI_jE-cc1e069467a8b5c33099.js → CheckbuttonWidget-BOabI_jE-5070fd92e68054ab06b7.js} +1 -1
- data/tools/limitsmonitor/{ComboboxWidget-BLXNYFiY-717cefe729e2e254d079.js → ComboboxWidget-BLXNYFiY-b95b95e38e3cbeda2c3c.js} +1 -1
- data/tools/limitsmonitor/{DateWidget-BTqLCtLS-68eb30d5ba6560c88c82.js → DateWidget-BTqLCtLS-3dbdc743195e6deae43d.js} +1 -1
- data/tools/limitsmonitor/{DetailsDialog-BNCS3QAe-84fa8608e3889bdab1db.js → DetailsDialog-BNCS3QAe-fc12fed7d9114f3ed1de.js} +1 -1
- data/tools/limitsmonitor/{DynamicWidget-CfMtj7H8-9b250ead3abd1589f0c9.js → DynamicWidget-CfMtj7H8-8407ef2d19ba3052bb2a.js} +1 -1
- data/tools/limitsmonitor/{FormatvalueWidget-CLYx8qbg-3f3b0b191472765e8460.js → FormatvalueWidget-CLYx8qbg-19219e544b28391a224d.js} +1 -1
- data/tools/limitsmonitor/{Graph-BliBYJxD-c488ea853f8181ef4e2e.js → Graph-BliBYJxD-7f6c9c848aa2ef960d99.js} +1 -1
- data/tools/limitsmonitor/{GraphWidget-Cb6Ozf54-90c59887027ac502e692.js → GraphWidget-Cb6Ozf54-80fe4556199fdddccbb4.js} +1 -1
- data/tools/limitsmonitor/{HorizontalWidget-AY2M01qP-375f812b5fc161e0b9f7.js → HorizontalWidget-AY2M01qP-c45b1a98bc63a713353d.js} +1 -1
- data/tools/limitsmonitor/{HorizontalboxWidget-2MEKvq_C-3c4168ee164b0f02a881.js → HorizontalboxWidget-2MEKvq_C-d37fa9a5f1983b65f45a.js} +1 -1
- data/tools/limitsmonitor/{HorizontallineWidget-DgpOPA7q-8d214005d3aecac1cc4d.js → HorizontallineWidget-DgpOPA7q-fb1bcb2875a6ebd65684.js} +1 -1
- data/tools/limitsmonitor/{IframeWidget-UKKUl7k5-c6968b2860080a1bbd27.js → IframeWidget-UKKUl7k5-1dd9712547cf1887b96c.js} +1 -1
- data/tools/limitsmonitor/{ImageLoader-C-CIL4YD-15abfd5e710dd2708965.js → ImageLoader-C-CIL4YD-3957754410034d5432c1.js} +1 -1
- data/tools/limitsmonitor/{ImageviewerWidget-DhuQH5Io-5c73d126dedb687e170c.js → ImageviewerWidget-DhuQH5Io-a9bbe826e4806c3c9530.js} +1 -1
- data/tools/limitsmonitor/{LabelWidget-SO9zqcNN-d75de1b72a7f1bc38314.js → LabelWidget-SO9zqcNN-b47b64da51ed40073701.js} +1 -1
- data/tools/limitsmonitor/{LabelledWidget-DWoM5AJ5-7fe19cbd6603532bf1a4.js → LabelledWidget-DWoM5AJ5-15b75eaf5af00a588ba3.js} +1 -1
- data/tools/limitsmonitor/{LabelprogressbarWidget-D3vnkvQZ-ffd9eb320ab8f7837152.js → LabelprogressbarWidget-D3vnkvQZ-442a91247a6e4c8b5924.js} +1 -1
- data/tools/limitsmonitor/{LabelsparklineWidget-DO0T-Jot-b9bde052b98144938cc9.js → LabelsparklineWidget-DO0T-Jot-a38ed93673ac5784f177.js} +1 -1
- data/tools/limitsmonitor/{LabelvalueWidget-B6BbNFnk-55ae5df2d06d588fd696.js → LabelvalueWidget-B6BbNFnk-e15b368094029227d5ba.js} +1 -1
- data/tools/limitsmonitor/{LabelvaluedescWidget-CxfL-H9C-b24866430836edcccd4c.js → LabelvaluedescWidget-CxfL-H9C-9c08dfed4d8450ed545c.js} +1 -1
- data/tools/limitsmonitor/{LabelvaluelimitsbarWidget-BT5k9mHv-816d8cb3d2f97ed27d59.js → LabelvaluelimitsbarWidget-BT5k9mHv-b9e39ddf53509de61019.js} +1 -1
- data/tools/limitsmonitor/{LabelvaluelimitscolumnWidget-DUbmxh4p-b198e38dbcb3744373f3.js → LabelvaluelimitscolumnWidget-DUbmxh4p-df308de6ea20b9ee5a3b.js} +1 -1
- data/tools/limitsmonitor/{LabelvaluerangebarWidget-DexAc2UB-7c994d3664500aaf7b3b.js → LabelvaluerangebarWidget-DexAc2UB-50b0236beee4326e34f3.js} +1 -1
- data/tools/limitsmonitor/{Layout-Dd6dRf3R-525ba1ee557f89be0047.js → Layout-Dd6dRf3R-a27f0c2f43cc14c6d815.js} +1 -1
- data/tools/limitsmonitor/{LedWidget-D1RwHb_V-490e049ab037b324c6c8.js → LedWidget-D1RwHb_V-88bbcc07c8c956d7fbca.js} +1 -1
- data/tools/limitsmonitor/{LimitsMonitor-621360d51f56ca8e82a2.js → LimitsMonitor-14cfaf01cf66ce6c8005.js} +2 -2
- data/tools/limitsmonitor/{LimitsbarWidget-ClOmoV50-e75e9b023f35d83c19ed.js → LimitsbarWidget-ClOmoV50-f8869317d795a70f5c13.js} +1 -1
- data/tools/limitsmonitor/{LimitscolorWidget-CBUoEYKp-6e3d16f417583559c09e.js → LimitscolorWidget-CBUoEYKp-19cd384145790e20282a.js} +1 -1
- data/tools/limitsmonitor/{LimitscolumnWidget-hsHkmY-_-9610b4857fc90788e1e8.js → LimitscolumnWidget-hsHkmY-_-4a3e51b76ccede9aad8f.js} +1 -1
- data/tools/limitsmonitor/{LinegraphWidget-CXrKtxOo-739c8de1957744eab7a2.js → LinegraphWidget-CXrKtxOo-3ea6ca12511bdb5c1a4d.js} +1 -1
- data/tools/limitsmonitor/{MatrixbycolumnsWidget-CsogVU9c-986b61d485a8bfc958be.js → MatrixbycolumnsWidget-CsogVU9c-779a0f9a917855096d61.js} +1 -1
- data/tools/limitsmonitor/{ProgressbarWidget-CO6CEkxP-70f843aa39a434c58996.js → ProgressbarWidget-CO6CEkxP-e3fac45b1a208588a73c.js} +1 -1
- data/tools/limitsmonitor/{RadiobuttonWidget-DrxUclws-a5f1ae2b504074cab4f8.js → RadiobuttonWidget-DrxUclws-f3bb26ebf2240a12e499.js} +1 -1
- data/tools/limitsmonitor/{RadiogroupWidget-DN9C38cg-715963bf1164756f95f6.js → RadiogroupWidget-DN9C38cg-27d1e05776c13156207c.js} +1 -1
- data/tools/limitsmonitor/{RangebarWidget-5uQTfLMP-1103138a40b018023867.js → RangebarWidget-5uQTfLMP-e1025eec88fc3262879f.js} +1 -1
- data/tools/limitsmonitor/{RollupWidget-B0DCULnu-fc4ef5d956e51d657531.js → RollupWidget-B0DCULnu-10ecec37c261544a3f88.js} +1 -1
- data/tools/limitsmonitor/{ScrollwindowWidget-BOkZQgtf-bde13bec2d486120eece.js → ScrollwindowWidget-BOkZQgtf-8019c65edcca688de625.js} +1 -1
- data/tools/limitsmonitor/{SignalWidget-Cis0Xkea-468110acf4ad8753a0e6.js → SignalWidget-Cis0Xkea-725b1003d68bb7d19819.js} +1 -1
- data/tools/limitsmonitor/{SpacerWidget-CLcqC2Qk-7cf1aaae9915b3ba106e.js → SpacerWidget-CLcqC2Qk-242a8d27012e5dc150c5.js} +1 -1
- data/tools/limitsmonitor/{SparklineWidget-CTp83eZ--d6ff1ca824b8619c08b0.js → SparklineWidget-CTp83eZ--a599d013f4e1f56d4e23.js} +1 -1
- data/tools/limitsmonitor/{TabbookWidget-uucd-zsX-82a5ff3773753ec5860d.js → TabbookWidget-uucd-zsX-263febaea0854f4b89bc.js} +1 -1
- data/tools/limitsmonitor/{TextboxWidget-C2n38ti5-87db73ae49dea0632721.js → TextboxWidget-C2n38ti5-d975ac9f7114f208c1e5.js} +1 -1
- data/tools/limitsmonitor/{TextfieldWidget--HTv9ddk-736d447d2857b1d43f6e.js → TextfieldWidget--HTv9ddk-3d1903bca39423b74f2d.js} +1 -1
- data/tools/limitsmonitor/{TimeWidget-CPNVZaUM-fac6a63c3c34d897be15.js → TimeWidget-CPNVZaUM-9ecd844f5798c320f8cf.js} +1 -1
- data/tools/limitsmonitor/{TitleWidget-Cp0cb6V8-b89da31fe039648b2ef3.js → TitleWidget-Cp0cb6V8-805b64dd6a6d9f955420.js} +1 -1
- data/tools/limitsmonitor/{VWidget-DQGJRgAk-c02b2bee30f78d035d0d.js → VWidget-DQGJRgAk-1ba292dc524fc27f96eb.js} +1 -1
- data/tools/limitsmonitor/{ValueWidget-Bk1RFjks-3cb4341dab5acad3e22c.js → ValueWidget-Bk1RFjks-76049f96d7085fdea0e8.js} +1 -1
- data/tools/limitsmonitor/{ValuelimitsbarWidget-C0HIBYh2-397fdbed4456c492080d.js → ValuelimitsbarWidget-C0HIBYh2-b683eb867a376b205a11.js} +1 -1
- data/tools/limitsmonitor/{ValuelimitscolumnWidget-BTT90uyX-cc39c8a9a69e1ab23283.js → ValuelimitscolumnWidget-BTT90uyX-a3f2c739fd290b39de4f.js} +1 -1
- data/tools/limitsmonitor/{ValuerangebarWidget-CcQw_XK9-231683568036e04271b8.js → ValuerangebarWidget-CcQw_XK9-52c5d9d21a6fa23d2330.js} +1 -1
- data/tools/limitsmonitor/{VerticalWidget-CNtFQv3R-674b97c59d634a17fe8c.js → VerticalWidget-CNtFQv3R-a8b856065029ccb47767.js} +1 -1
- data/tools/limitsmonitor/{VerticalboxWidget-Yxmz1SnU-260b19f63148fbe6117d.js → VerticalboxWidget-Yxmz1SnU-22468bb43b376de06b7d.js} +1 -1
- data/tools/limitsmonitor/{Widget-LsyjS7ZS-c729f42039557f34ebed.js → Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js} +1 -1
- data/tools/limitsmonitor/{main-ef3b1ee86d7f38c1c85c.js → main-c4d1c0ebf45a747bb58d.js} +2 -2
- data/tools/limitsmonitor/main.js +1 -1
- metadata +68 -68
@@ -1,8 +1,8 @@
|
|
1
|
-
System.register(["./main-
|
1
|
+
System.register(["./main-c4d1c0ebf45a747bb58d.js","vue","single-spa","./ValueWidget-Bk1RFjks-76049f96d7085fdea0e8.js","./IframeWidget-UKKUl7k5-1dd9712547cf1887b96c.js","./ValuelimitsbarWidget-C0HIBYh2-b683eb867a376b205a11.js","vue-router","vuex","vuetify","./DetailsDialog-BNCS3QAe-fc12fed7d9114f3ed1de.js","./VWidget-DQGJRgAk-1ba292dc524fc27f96eb.js","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","./LimitsbarWidget-ClOmoV50-f8869317d795a70f5c13.js","./BarColumn-DHP-zQ4R-6e0b3b131139b91d2a85.js"],function(Rn,Ts){"use strict";var dt,Ee,Ve,ht,ft,pt,y,P,k,mt,b,g,q,G,H,X,ae,U,xe,Ce,ee,Me,ze,gt,bt;return{setters:[C=>{dt=C.d,Ee=C._,Ve=C.R,ht=C.p,ft=C.a,pt=C.g},C=>{y=C.resolveComponent,P=C.createBlock,k=C.openBlock,mt=C.Teleport,b=C.createVNode,g=C.withCtx,q=C.createElementVNode,G=C.toDisplayString,H=C.createElementBlock,X=C.Fragment,ae=C.renderList,U=C.createTextVNode,xe=C.mergeProps,Ce=C.createSlots,ee=C.createCommentVNode,Me=C.normalizeStyle,ze=C.normalizeClass},null,C=>{gt=C.default},null,C=>{bt=C.default},null,null,null,null,null,null,null,null],execute:function(){var C=document.createElement("style");C.textContent=`.footer[data-v-9fa0ca9a]{padding-top:5px}.v-input[data-v-9fa0ca9a]{background-color:var(--color-background-base-default)}.textfield-green[data-v-9fa0ca9a]{color:#00c800}.textfield-yellow[data-v-9fa0ca9a]{color:#ffdc00}.textfield-red[data-v-9fa0ca9a]{color:#ff2d2d}.limits-table[data-v-9fa0ca9a]{margin-top:5px;margin-bottom:10px}.limits-table[data-v-9fa0ca9a] th{font-weight:700;background-color:var(--color-background-base-default)}.card-height[data-v-3c276116]{height:calc(100vh - 150px)}
|
2
2
|
/*$vite$:1*/`,document.head.appendChild(C);const In={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},An={class:"app-title mr-2"};function Tn(t,e,n,r,i,s){const o=y("v-col"),a=y("v-row"),c=y("v-icon"),u=y("v-btn"),d=y("v-divider"),h=y("v-list-item-title"),_=y("v-list-item"),f=y("v-list"),m=y("v-menu"),p=y("v-radio"),R=y("v-list-item-action"),A=y("v-radio-group"),x=y("v-checkbox");return k(),P(mt,{to:"#openc3-menu"},[b(a,{"no-gutters":""},{default:g(()=>[b(o,{"align-self":"end"},{default:g(()=>[q("span",An,G(n.title),1)]),_:1})]),_:1}),b(a,{dense:"",class:"flex-nowrap"},{default:g(()=>[(k(!0),H(X,null,ae(n.menus,(E,D)=>(k(),P(m,{ref_for:!0,ref:"topmenu",key:D},{activator:g(({props:w})=>[b(u,xe({ref_for:!0},w,{variant:"outlined",class:"mx-1 menu-button",text:E.label,"data-test":s.formatDT(`${n.title} ${E.label}`)}),{append:g(()=>[b(c,{class:"menu-button-icon"},{default:g(()=>[...e[0]||(e[0]=[U(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:g(()=>[b(f,null,{default:g(()=>[(k(!0),H(X,null,ae(E.items,(w,$)=>(k(),H(X,null,[w.divider?(k(),P(d,{key:$+"-divider"})):w.subMenu&&w.subMenu.length>0?(k(),H("div",{key:$+"-submenu"},[(k(),P(m,{"open-on-hover":"",location:"right",key:$},{activator:g(({props:T})=>[(k(),P(_,xe({ref_for:!0},T,{disabled:w.disabled,key:$}),Ce({append:g(()=>[b(c,null,{default:g(()=>[...e[1]||(e[1]=[U(" mdi-chevron-right ",-1)])]),_:1})]),default:g(()=>[!w.radio&&!w.checkbox?(k(),P(h,{key:0,style:Me("cursor: pointer;"+(w.disabled?"opacity: 0.2":""))},{default:g(()=>[U(G(w.label),1)]),_:2},1032,["style"])):ee("",!0)]),_:2},[w.icon?{name:"prepend",fn:g(()=>[b(c,{disabled:w.disabled},{default:g(()=>[U(G(w.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:g(()=>[b(f,null,{default:g(()=>[(k(!0),H(X,null,ae(w.subMenu,(T,O)=>(k(),P(_,{key:O,"prepend-icon":T.icon,onClick:L=>s.subMenuClick(T)},{default:g(()=>[b(h,null,{default:g(()=>[U(G(T.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):w.radioGroup?(k(),P(A,{"model-value":w.value,"onUpdate:modelValue":w.command,key:$+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:g(()=>[(k(!0),H(X,null,ae(w.choices,(T,O)=>(k(),P(_,{key:O+"-choice"},{default:g(()=>[b(R,{class:"list-action"},{default:g(()=>[b(p,{color:"secondary",label:T.label,value:T.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(k(),P(_,{onClick:T=>w.command(w),disabled:w.disabled,"data-test":s.formatDT(`${n.title} ${E.label} ${w.label}`),key:$+"-list"},Ce({default:g(()=>[w.checkbox?(k(),P(R,{key:0,class:"list-action"},{default:g(()=>[b(x,{modelValue:w.checked,"onUpdate:modelValue":T=>w.checked=T,label:w.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):ee("",!0),!w.radio&&!w.checkbox?(k(),P(h,{key:1,style:Me("cursor: pointer;"+(w.disabled?"opacity: 0.2":""))},{default:g(()=>[U(G(w.label),1)]),_:2},1032,["style"])):ee("",!0)]),_:2},[w.icon?{name:"prepend",fn:g(()=>[b(c,{icon:w.icon,disabled:w.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const Ln=dt(In,[["render",Tn],["__scopeId","data-v-4d454b93"]]);var jn=Object.defineProperty,Nn=(t,e,n)=>e in t?jn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oe=(t,e,n)=>Nn(t,typeof e!="symbol"?e+"":e,n);function _t(t,e){return function(){return t.apply(e,arguments)}}const{toString:Pn}=Object.prototype,{getPrototypeOf:We}=Object,{iterator:ke,toStringTag:yt}=Symbol,Re=(t=>e=>{const n=Pn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),J=t=>(t=t.toLowerCase(),e=>Re(e)===t),Ie=t=>e=>typeof e===t,{isArray:ce}=Array,le=Ie("undefined");function pe(t){return t!==null&&!le(t)&&t.constructor!==null&&!le(t.constructor)&&V(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const wt=J("ArrayBuffer");function Un(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&wt(t.buffer),e}const Fn=Ie("string"),V=Ie("function"),vt=Ie("number"),me=t=>t!==null&&typeof t=="object",Dn=t=>t===!0||t===!1,Ae=t=>{if(Re(t)!=="object")return!1;const e=We(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(yt in t)&&!(ke in t)},Bn=t=>{if(!me(t)||pe(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},$n=J("Date"),qn=J("File"),Vn=J("Blob"),Mn=J("FileList"),zn=t=>me(t)&&V(t.pipe),Wn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||V(t.append)&&((e=Re(t))==="formdata"||e==="object"&&V(t.toString)&&t.toString()==="[object FormData]"))},Hn=J("URLSearchParams"),[Jn,Kn,Gn,Yn]=["ReadableStream","Request","Response","Headers"].map(J),Zn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ge(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),ce(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{if(pe(t))return;const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let a;for(r=0;r<o;r++)a=s[r],e.call(null,t[a],a,t)}}function St(t,e){if(pe(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const te=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Et=t=>!le(t)&&t!==te;function He(){const{caseless:t,skipUndefined:e}=Et(this)&&this||{},n={},r=(i,s)=>{const o=t&&St(n,s)||s;Ae(n[o])&&Ae(i)?n[o]=He(n[o],i):Ae(i)?n[o]=He({},i):ce(i)?n[o]=i.slice():(!e||!le(i))&&(n[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&ge(arguments[i],r);return n}const Qn=(t,e,n,{allOwnKeys:r}={})=>(ge(e,(i,s)=>{n&&V(i)?t[s]=_t(i,n):t[s]=i},{allOwnKeys:r}),t),Xn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),er=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},tr=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&We(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},nr=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},rr=t=>{if(!t)return null;if(ce(t))return t;let e=t.length;if(!vt(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},ir=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&We(Uint8Array)),sr=(t,e)=>{const n=(t&&t[ke]).call(t);let r;for(;(r=n.next())&&!r.done;){const i=r.value;e.call(t,i[0],i[1])}},or=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},ar=J("HTMLFormElement"),cr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),xt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),lr=J("RegExp"),Ct=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ge(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},ur=t=>{Ct(t,(e,n)=>{if(V(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(V(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dr=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return ce(t)?r(t):r(String(t).split(e)),n},hr=()=>{},fr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function pr(t){return!!(t&&V(t.append)&&t[yt]==="FormData"&&t[ke])}const mr=t=>{const e=new Array(10),n=(r,i)=>{if(me(r)){if(e.indexOf(r)>=0)return;if(pe(r))return r;if(!("toJSON"in r)){e[i]=r;const s=ce(r)?[]:{};return ge(r,(o,a)=>{const c=n(o,i+1);!le(c)&&(s[a]=c)}),e[i]=void 0,s}}return r};return n(t,0)},gr=J("AsyncFunction"),br=t=>t&&(me(t)||V(t))&&V(t.then)&&V(t.catch),Ot=((t,e)=>t?setImmediate:e?((n,r)=>(te.addEventListener("message",({source:i,data:s})=>{i===te&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),te.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",V(te.postMessage)),_r=typeof queueMicrotask<"u"?queueMicrotask.bind(te):typeof process<"u"&&process.nextTick||Ot,yr=t=>t!=null&&V(t[ke]),l={isArray:ce,isArrayBuffer:wt,isBuffer:pe,isFormData:Wn,isArrayBufferView:Un,isString:Fn,isNumber:vt,isBoolean:Dn,isObject:me,isPlainObject:Ae,isEmptyObject:Bn,isReadableStream:Jn,isRequest:Kn,isResponse:Gn,isHeaders:Yn,isUndefined:le,isDate:$n,isFile:qn,isBlob:Vn,isRegExp:lr,isFunction:V,isStream:zn,isURLSearchParams:Hn,isTypedArray:ir,isFileList:Mn,forEach:ge,merge:He,extend:Qn,trim:Zn,stripBOM:Xn,inherits:er,toFlatObject:tr,kindOf:Re,kindOfTest:J,endsWith:nr,toArray:rr,forEachEntry:sr,matchAll:or,isHTMLForm:ar,hasOwnProperty:xt,hasOwnProp:xt,reduceDescriptors:Ct,freezeMethods:ur,toObjectSet:dr,toCamelCase:cr,noop:hr,toFiniteNumber:fr,findKey:St,global:te,isContextDefined:Et,isSpecCompliantForm:pr,toJSONObject:mr,isAsyncFn:gr,isThenable:br,setImmediate:Ot,asap:_r,isIterable:yr};function S(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}l.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.status}}});const kt=S.prototype,Rt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Rt[t]={value:t}}),Object.defineProperties(S,Rt),Object.defineProperty(kt,"isAxiosError",{value:!0}),S.from=(t,e,n,r,i,s)=>{const o=Object.create(kt);l.toFlatObject(t,o,function(u){return u!==Error.prototype},u=>u!=="isAxiosError");const a=t&&t.message?t.message:"Error",c=e==null&&t?t.code:e;return S.call(o,a,c,n,r,i),t&&o.cause==null&&Object.defineProperty(o,"cause",{value:t,configurable:!0}),o.name=t&&t.name||"Error",s&&Object.assign(o,s),o};const wr=null;function Je(t){return l.isPlainObject(t)||l.isArray(t)}function It(t){return l.endsWith(t,"[]")?t.slice(0,-2):t}function At(t,e,n){return t?t.concat(e).map(function(r,i){return r=It(r),!n&&i?"["+r+"]":r}).join(n?".":""):e}function vr(t){return l.isArray(t)&&!t.some(Je)}const Sr=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function Te(t,e,n){if(!l.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,m){return!l.isUndefined(m[f])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(e);if(!l.isFunction(i))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(l.isDate(f))return f.toISOString();if(l.isBoolean(f))return f.toString();if(!a&&l.isBlob(f))throw new S("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(f)||l.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,p){let R=f;if(f&&!p&&typeof f=="object"){if(l.endsWith(m,"{}"))m=r?m:m.slice(0,-2),f=JSON.stringify(f);else if(l.isArray(f)&&vr(f)||(l.isFileList(f)||l.endsWith(m,"[]"))&&(R=l.toArray(f)))return m=It(m),R.forEach(function(A,x){!(l.isUndefined(A)||A===null)&&e.append(o===!0?At([m],x,s):o===null?m:m+"[]",c(A))}),!1}return Je(f)?!0:(e.append(At(p,m,s),c(f)),!1)}const d=[],h=Object.assign(Sr,{defaultVisitor:u,convertValue:c,isVisitable:Je});function _(f,m){if(!l.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),l.forEach(f,function(p,R){(!(l.isUndefined(p)||p===null)&&i.call(e,p,l.isString(R)?R.trim():R,m,h))===!0&&_(p,m?m.concat(R):[R])}),d.pop()}}if(!l.isObject(t))throw new TypeError("data must be an object");return _(t),e}function Tt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Ke(t,e){this._pairs=[],t&&Te(t,this,e)}const Lt=Ke.prototype;Lt.append=function(t,e){this._pairs.push([t,e])},Lt.toString=function(t){const e=t?function(n){return t.call(this,n,Tt)}:Tt;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Er(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jt(t,e,n){if(!e)return t;const r=n&&n.encode||Er;l.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(e,n):s=l.isURLSearchParams(e)?e.toString():new Ke(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Nt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,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){l.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Pt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xr=typeof URLSearchParams<"u"?URLSearchParams:Ke,Cr=typeof FormData<"u"?FormData:null,Or=typeof Blob<"u"?Blob:null,kr={isBrowser:!0,classes:{URLSearchParams:xr,FormData:Cr,Blob:Or},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",Ye=typeof navigator=="object"&&navigator||void 0,Rr=Ge&&(!Ye||["ReactNative","NativeScript","NS"].indexOf(Ye.product)<0),Ir=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ar=Ge&&window.location.href||"http://localhost",Tr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:Rr,hasStandardBrowserWebWorkerEnv:Ir,navigator:Ye,origin:Ar},Symbol.toStringTag,{value:"Module"})),F={...Tr,...kr};function Lr(t,e){return Te(t,new F.classes.URLSearchParams,{visitor:function(n,r,i,s){return F.isNode&&l.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function jr(t){return l.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Nr(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function Ut(t){function e(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=s>=n.length;return o=!o&&l.isArray(i)?i.length:o,c?(l.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!l.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&l.isArray(i[o])&&(i[o]=Nr(i[o])),!a)}if(l.isFormData(t)&&l.isFunction(t.entries)){const n={};return l.forEachEntry(t,(r,i)=>{e(jr(r),i,n,0)}),n}return null}function Pr(t,e,n){if(l.isString(t))try{return(e||JSON.parse)(t),l.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const be={transitional:Pt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=l.isObject(t);if(i&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return r?JSON.stringify(Ut(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Lr(t,this.formSerializer).toString();if((s=l.isFileList(t))||n.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Te(s?{"files[]":t}:t,o&&new o,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),Pr(t)):t}],transformResponse:[function(t){const e=this.transitional||be.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(n&&!this.responseType||r)){const i=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t,this.parseReviver)}catch(s){if(i)throw s.name==="SyntaxError"?S.from(s,S.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],t=>{be.headers[t]={}});const Ur=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Fr=t=>{const e={};let n,r,i;return t&&t.split(`
|
3
3
|
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&Ur[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Ft=Symbol("internals");function _e(t){return t&&String(t).trim().toLowerCase()}function Le(t){return t===!1||t==null?t:l.isArray(t)?t.map(Le):String(t)}function Dr(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Br=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ze(t,e,n,r,i){if(l.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!l.isString(e)){if(l.isString(r))return e.indexOf(r)!==-1;if(l.isRegExp(r))return r.test(e)}}function $r(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function qr(t,e){const n=l.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}let M=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(o,a,c){const u=_e(a);if(!u)throw new Error("header name must be a non-empty string");const d=l.findKey(r,u);(!d||r[d]===void 0||c===!0||c===void 0&&r[d]!==!1)&&(r[d||a]=Le(o))}const s=(o,a)=>l.forEach(o,(c,u)=>i(c,u,a));if(l.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(l.isString(t)&&(t=t.trim())&&!Br(t))s(Fr(t),e);else if(l.isObject(t)&&l.isIterable(t)){let o={},a,c;for(const u of t){if(!l.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[c=u[0]]=(a=o[c])?l.isArray(a)?[...a,u[1]]:[a,u[1]]:u[1]}s(o,e)}else t!=null&&i(e,t,n);return this}get(t,e){if(t=_e(t),t){const n=l.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return Dr(r);if(l.isFunction(e))return e.call(this,r,n);if(l.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=_e(t),t){const n=l.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||Ze(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function i(s){if(s=_e(s),s){const o=l.findKey(n,s);o&&(!e||Ze(n,n[o],o,e))&&(delete n[o],r=!0)}}return l.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];(!t||Ze(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return l.forEach(this,(r,i)=>{const s=l.findKey(n,i);if(s){e[s]=Le(r),delete e[i];return}const o=t?$r(i):String(i).trim();o!==i&&delete e[i],e[o]=Le(r),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return l.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&l.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
4
4
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[Ft]=this[Ft]={accessors:{}}).accessors,n=this.prototype;function r(i){const s=_e(i);e[s]||(qr(n,i),e[s]=!0)}return l.isArray(t)?t.forEach(r):r(t),this}};M.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(M.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),l.freezeMethods(M);function Qe(t,e){const n=this||be,r=e||n,i=M.from(r.headers);let s=r.data;return l.forEach(t,function(o){s=o.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function Dt(t){return!!(t&&t.__CANCEL__)}function ue(t,e,n){S.call(this,t??"canceled",S.ERR_CANCELED,e,n),this.name="CanceledError"}l.inherits(ue,S,{__CANCEL__:!0});function Bt(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Vr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Mr(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let d=s,h=0;for(;d!==i;)h+=n[d++],d=d%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const _=u&&c-u;return _?Math.round(h*1e3/_):void 0}}function zr(t,e){let n=0,r=1e3/e,i,s;const o=(a,c=Date.now())=>{n=c,i=null,s&&(clearTimeout(s),s=null),t(...a)};return[(...a)=>{const c=Date.now(),u=c-n;u>=r?o(a,c):(i=a,s||(s=setTimeout(()=>{s=null,o(i)},r-u)))},()=>i&&o(i)]}const je=(t,e,n=3)=>{let r=0;const i=Mr(50,250);return zr(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,c=o-r,u=i(c),d=o<=a;r=o;const h={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(h)},n)},$t=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},qt=t=>(...e)=>l.asap(()=>t(...e)),Wr=F.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,F.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,Hr=F.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];l.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),l.isString(r)&&o.push("path="+r),l.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Jr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Kr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Vt(t,e,n){let r=!Jr(e);return t&&(r||n==!1)?Kr(t,e):e}const Mt=t=>t instanceof M?{...t}:t;function ne(t,e){e=e||{};const n={};function r(u,d,h,_){return l.isPlainObject(u)&&l.isPlainObject(d)?l.merge.call({caseless:_},u,d):l.isPlainObject(d)?l.merge({},d):l.isArray(d)?d.slice():d}function i(u,d,h,_){if(l.isUndefined(d)){if(!l.isUndefined(u))return r(void 0,u,h,_)}else return r(u,d,h,_)}function s(u,d){if(!l.isUndefined(d))return r(void 0,d)}function o(u,d){if(l.isUndefined(d)){if(!l.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,h){if(h in e)return r(u,d);if(h in t)return r(void 0,u)}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,d,h)=>i(Mt(u),Mt(d),h,!0)};return l.forEach(Object.keys({...t,...e}),function(u){const d=c[u]||i,h=d(t[u],e[u],u);l.isUndefined(h)&&d!==a||(n[u]=h)}),n}const zt=t=>{const e=ne({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=e;if(e.headers=o=M.from(o),e.url=jt(Vt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),l.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(l.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([d,h])=>{u.includes(d.toLowerCase())&&o.set(d,h)})}}if(F.hasStandardBrowserEnv&&(r&&l.isFunction(r)&&(r=r(e)),r||r!==!1&&Wr(e.url))){const c=i&&s&&Hr.read(s);c&&o.set(i,c)}return e},Gr=typeof XMLHttpRequest<"u",Yr=Gr&&function(t){return new Promise(function(e,n){const r=zt(t);let i=r.data;const s=M.from(r.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:c}=r,u,d,h,_,f;function m(){_&&_(),f&&f(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(r.method.toUpperCase(),r.url,!0),p.timeout=r.timeout;function R(){if(!p)return;const x=M.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),E={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:x,config:t,request:p};Bt(function(D){e(D),m()},function(D){n(D),m()},E),p=null}"onloadend"in p?p.onloadend=R:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(R)},p.onabort=function(){p&&(n(new S("Request aborted",S.ECONNABORTED,t,p)),p=null)},p.onerror=function(x){const E=x&&x.message?x.message:"Network Error",D=new S(E,S.ERR_NETWORK,t,p);D.event=x||null,n(D),p=null},p.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Pt;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),n(new S(x,E.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,t,p)),p=null},i===void 0&&s.setContentType(null),"setRequestHeader"in p&&l.forEach(s.toJSON(),function(x,E){p.setRequestHeader(E,x)}),l.isUndefined(r.withCredentials)||(p.withCredentials=!!r.withCredentials),o&&o!=="json"&&(p.responseType=r.responseType),c&&([h,f]=je(c,!0),p.addEventListener("progress",h)),a&&p.upload&&([d,_]=je(a),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",_)),(r.cancelToken||r.signal)&&(u=x=>{p&&(n(!x||x.type?new ue(null,t,p):x),p.abort(),p=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const A=Vr(r.url);if(A&&F.protocols.indexOf(A)===-1){n(new S("Unsupported protocol "+A+":",S.ERR_BAD_REQUEST,t));return}p.send(i||null)})},Zr=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,a();const d=u instanceof Error?u:this.reason;r.abort(d instanceof S?d:new ue(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,s(new S(`timeout ${e} of ms exceeded`,S.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>l.asap(a),c}},Qr=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},Xr=async function*(t,e){for await(const n of ei(t))yield*Qr(n,e)},ei=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Wt=(t,e,n,r)=>{const i=Xr(t,e);let s=0,o,a=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await i.next();if(u){a(),c.close();return}let h=d.byteLength;if(n){let _=s+=h;n(_)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},Ht=64*1024,{isFunction:Ne}=l,Jt=(({fetch:t,Request:e,Response:n})=>({fetch:t,Request:e,Response:n}))(l.global),{ReadableStream:Kt,TextEncoder:Gt}=l.global,Yt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ti=t=>{const{fetch:e,Request:n,Response:r}=Object.assign({},Jt,t),i=Ne(e),s=Ne(n),o=Ne(r);if(!i)return!1;const a=i&&Ne(Kt),c=i&&(typeof Gt=="function"?(m=>p=>m.encode(p))(new Gt):async m=>new Uint8Array(await new n(m).arrayBuffer())),u=s&&a&&Yt(()=>{let m=!1;const p=new n(F.origin,{body:new Kt,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!p}),d=o&&a&&Yt(()=>l.isReadableStream(new r("").body)),h={stream:d&&(m=>m.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!h[m]&&(h[m]=(p,R)=>{let A=p&&p[m];if(A)return A.call(p);throw new S(`Response type '${m}' is not supported`,S.ERR_NOT_SUPPORT,R)})});const _=async m=>{if(m==null)return 0;if(l.isBlob(m))return m.size;if(l.isSpecCompliantForm(m))return(await new n(F.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(l.isArrayBufferView(m)||l.isArrayBuffer(m))return m.byteLength;if(l.isURLSearchParams(m)&&(m=m+""),l.isString(m))return(await c(m)).byteLength},f=async(m,p)=>l.toFiniteNumber(m.getContentLength())??_(p);return async m=>{let{url:p,method:R,data:A,signal:x,cancelToken:E,timeout:D,onDownloadProgress:w,onUploadProgress:$,responseType:T,headers:O,withCredentials:L="same-origin",fetchOptions:oe}=zt(m);T=T?(T+"").toLowerCase():"text";let B=Zr([x,E&&E.toAbortSignal()],D),W=null;const j=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let v;try{if($&&u&&R!=="get"&&R!=="head"&&(v=await f(O,A))!==0){let Q=new n(p,{method:"POST",body:A,duplex:"half"}),fe;if(l.isFormData(A)&&(fe=Q.headers.get("content-type"))&&O.setContentType(fe),Q.body){const[ut,qe]=$t(v,je(qt($)));A=Wt(Q.body,Ht,ut,qe)}}l.isString(L)||(L=L?"include":"omit");const I=s&&"credentials"in n.prototype,Z={...oe,signal:B,method:R.toUpperCase(),headers:O.normalize().toJSON(),body:A,duplex:"half",credentials:I?L:void 0};W=s&&new n(p,Z);let z=await(s?e(W,oe):e(p,Z));const he=d&&(T==="stream"||T==="response");if(d&&(w||he&&j)){const Q={};["status","statusText","headers"].forEach(On=>{Q[On]=z[On]});const fe=l.toFiniteNumber(z.headers.get("content-length")),[ut,qe]=w&&$t(fe,je(qt(w),!0))||[];z=new r(Wt(z.body,Ht,ut,()=>{qe&&qe(),j&&j()}),Q)}T=T||"text";let As=await h[l.findKey(h,T)||"text"](z,m);return!he&&j&&j(),await new Promise((Q,fe)=>{Bt(Q,fe,{data:As,headers:M.from(z.headers),status:z.status,statusText:z.statusText,config:m,request:W})})}catch(I){throw j&&j(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,m,W),{cause:I.cause||I}):S.from(I,I&&I.code,m,W)}}},ni=new Map,Zt=t=>{let e=l.merge.call({skipUndefined:!0},Jt,t?t.env:null);const{fetch:n,Request:r,Response:i}=e,s=[r,i,n];let o=s.length,a=o,c,u,d=ni;for(;a--;)c=s[a],u=d.get(c),u===void 0&&d.set(c,u=a?new Map:ti(e)),d=u;return u};Zt();const Xe={http:wr,xhr:Yr,fetch:{get:Zt}};l.forEach(Xe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Qt=t=>`- ${t}`,ri=t=>l.isFunction(t)||t===null||t===!1,Xt={getAdapter:(t,e)=>{t=l.isArray(t)?t:[t];const{length:n}=t;let r,i;const s={};for(let o=0;o<n;o++){r=t[o];let a;if(i=r,!ri(r)&&(i=Xe[(a=String(r)).toLowerCase()],i===void 0))throw new S(`Unknown adapter '${a}'`);if(i&&(l.isFunction(i)||(i=i.get(e))))break;s[a||"#"+o]=i}if(!i){const o=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
|
5
5
|
`+o.map(Qt).join(`
|
6
6
|
`):" "+Qt(o[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:Xe};function et(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ue(null,t)}function en(t){return et(t),t.headers=M.from(t.headers),t.data=Qe.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Xt.getAdapter(t.adapter||be.adapter,t)(t).then(function(e){return et(t),e.data=Qe.call(t,t.transformResponse,e),e.headers=M.from(e.headers),e},function(e){return Dt(e)||(et(t),e&&e.response&&(e.response.data=Qe.call(t,t.transformResponse,e.response),e.response.headers=M.from(e.response.headers))),Promise.reject(e)})}const tn="1.12.0",Pe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Pe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const nn={};Pe.transitional=function(t,e,n){function r(i,s){return"[Axios v"+tn+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,o)=>{if(t===!1)throw new S(r(s," has been removed"+(e?" in "+e:"")),S.ERR_DEPRECATED);return e&&!nn[s]&&(nn[s]=!0,console.warn(r(s," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(i,s,o):!0}},Pe.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function ii(t,e,n){if(typeof t!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new S("option "+s+" must be "+c,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+s,S.ERR_BAD_OPTION)}}const Ue={assertOptions:ii,validators:Pe},Y=Ue.validators;let re=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Nt,response:new Nt}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
7
7
|
`+i):n.stack=i}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ne(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;n!==void 0&&Ue.assertOptions(n,{silentJSONParsing:Y.transitional(Y.boolean),forcedJSONParsing:Y.transitional(Y.boolean),clarifyTimeoutError:Y.transitional(Y.boolean)},!1),r!=null&&(l.isFunction(r)?e.paramsSerializer={serialize:r}:Ue.assertOptions(r,{encode:Y.function,serialize:Y.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ue.assertOptions(e,{baseUrl:Y.spelling("baseURL"),withXsrfToken:Y.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=i&&l.merge(i.common,i[e.method]);i&&l.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f]}),e.headers=M.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(e)===!1||(a=a&&f.synchronous,o.unshift(f.fulfilled,f.rejected))});const c=[];this.interceptors.response.forEach(function(f){c.push(f.fulfilled,f.rejected)});let u,d=0,h;if(!a){const f=[en.bind(this),void 0];for(f.unshift(...o),f.push(...c),h=f.length,u=Promise.resolve(e);d<h;)u=u.then(f[d++],f[d++]);return u}h=o.length;let _=e;for(d=0;d<h;){const f=o[d++],m=o[d++];try{_=f(_)}catch(p){m.call(this,p);break}}try{u=en.call(this,_)}catch(f){return Promise.reject(f)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=ne(this.defaults,t);const e=Vt(t.baseURL,t.url,t.allowAbsoluteUrls);return jt(e,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){re.prototype[t]=function(e,n){return this.request(ne(n||{},{method:t,url:e,data:(n||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function e(n){return function(r,i,s){return this.request(ne(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}re.prototype[t]=e(),re.prototype[t+"Form"]=e(!0)});let si=class kn{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(i,s,o){r.reason||(r.reason=new ue(i,s,o),n(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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new kn(function(n){e=n}),cancel:e}}};function oi(t){return function(e){return t.apply(null,e)}}function ai(t){return l.isObject(t)&&t.isAxiosError===!0}const tt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(tt).forEach(([t,e])=>{tt[e]=t});function rn(t){const e=new re(t),n=_t(re.prototype.request,e);return l.extend(n,re.prototype,e,{allOwnKeys:!0}),l.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return rn(ne(t,r))},n}const N=rn(be);N.Axios=re,N.CanceledError=ue,N.CancelToken=si,N.isCancel=Dt,N.VERSION=tn,N.toFormData=Te,N.AxiosError=S,N.Cancel=N.CanceledError,N.all=function(t){return Promise.all(t)},N.spread=oi,N.isAxiosError=ai,N.mergeConfig=ne,N.AxiosHeaders=M,N.formToJSON=t=>Ut(l.isHTMLForm(t)?new FormData(t):t),N.getAdapter=Xt.getAdapter,N.HttpStatusCode=tt,N.default=N;const{Axios:Ls,AxiosError:js,CanceledError:Ns,isCancel:Ps,CancelToken:Us,VERSION:Fs,all:Ds,Cancel:Bs,isAxiosError:$s,spread:qs,toFormData:Vs,AxiosHeaders:Ms,HttpStatusCode:zs,formToJSON:Ws,getAdapter:Hs,mergeConfig:Js}=N,sn=N.create({baseURL:location.origin,timeout:6e4,params:{}});sn.interceptors.response.use(t=>t,t=>{var e,n,r,i,s,o,a,c,u,d,h;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(m){m&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let _=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(_+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(_+=`${t.response.config.data} `),(s=(i=t.response)==null?void 0:i.data)!=null&&s.message?_+=`${t.response.data.message}`:(a=(o=t.response)==null?void 0:o.data)!=null&&a.exception?_+=`${t.response.data.exception}`:(d=(u=(c=t.response)==null?void 0:c.data)==null?void 0:u.error)!=null&&d.message?(t.response.data.error.class&&(_+=`${t.response.data.error.class} `),_+=`${t.response.data.error.message}`):_+=`${(h=t.response)==null?void 0:h.data}`;const{$cosmosNotify:f}=window;throw f&&f.serious({title:"Network error",body:_}),t}else throw t});let Fe=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,i=n.length;r<i;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(i=>e!==i)}}});class ye extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class nt extends ye{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class ci extends ye{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class K extends ye{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class li extends K{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function on(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class ui{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:r,info:i})=>(n[r]=i,n),{})}}const ie=Symbol("state");class an{constructor(e={}){this.emitter=Fe(),this.params=Object.freeze(e),this.presence=new ui(this),this.initialConnect=!0,this[ie]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=on({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ie]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[ie]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ie]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[ie]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ie]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ie]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...i)=>{r(),n(...i)});return r}emit(e,...n){return this.emitter.emit(e,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(i=>i()),e()})),r.push(this.on("close",i=>{r.forEach(s=>s()),n(i||new ye("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class di{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(r=>r[e](n[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let n,r={promise:new Promise(s=>{n=s}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),n(r)},canceled:!1,acquired:!1},i=this._pendingTop;return this._pendings.push(r),i&&await i.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 n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class hi{constructor(){this.queue=[]}async acquire(e,n){n==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class fi{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new hi),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let i=this._subscriptions[e]=new di(e);return i.remoteId=this._localToRemote[e],i.subscriber=n,i.unsubscriber=r,i.gvl=this.glv,i}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let r=this.get(e);r&&(r.remoteId=n)}}class pi{constructor(e={}){this.subscriptions=new fi(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let r=n.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,n,r){let i=this._remoteToLocal[e];if(!i){this._pendingMessages.push([e,n,r]);return}let s=this.subscriptions.get(i);s&&s.channels.forEach(o=>{o.receive(n,r)})}notify(e,n,r){let i=this._remoteToLocal[e];if(!i)return;let s=this.subscriptions.get(i);s&&s.channels.forEach(o=>o.emit(n,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 n=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):n.push(r);this._pendingMessages=n}}const cn={debug:0,info:1,warn:2,error:3};class ln{constructor(e){this.level=e||"warn"}log(e,n,r){cn[e]<cn[this.level]||this.writeLogEntry(e,n,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class we extends ln{writeLogEntry(){}}class mi{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let gi=0;class un{constructor(e={}){let{logger:n}=e;this.logger=n||new we,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let r={channel:e};n&&Object.assign(r,n);let i=on(r);if(this.pendingUnsubscriptions[i]){let o=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${o}`,i),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,n))},o)})}if(this.pendingSubscriptions[i])return this.logger.warn("subscription is already pending, skipping",i),Promise.reject(Error("Already subscribing"));let s=this.subscribeRetryInterval;return new Promise((o,a)=>{let c=++gi;this.pendingSubscriptions[i]={resolve:o,reject:a,id:c},this.cable.send(this.buildSubscribeRequest(i)),this.maybeRetrySubscribe(c,i,s)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let i=this.pendingSubscriptions[n];i&&i.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,r))},r)}maybeExpireSubscribe(e,n,r){setTimeout(()=>{let i=this.pendingSubscriptions[n];i&&i.id===e&&(delete this.pendingSubscriptions[n],i.reject(new ci(`Haven't received subscription ack in ${r*2}ms for ${n}`)))},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,n,r){return n==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:i,reason:s,reconnect:o}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(n==="disconnect"){let a=new K(s);this.reset(a),o===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(n==="confirm_subscription"){let a=this.pendingSubscriptions[r];if(!a){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],a.resolve(r)}if(n==="reject_subscription"){let a=this.pendingSubscriptions[r];return a?(delete this.pendingSubscriptions[r],a.reject(new nt)):this.logger.error("subscription not found",{type:n,identifier:r})}if(i)return{identifier:r,message:i};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const dn=()=>Date.now()/1e3|0;class bi extends un{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=dn()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:i}=e;if(n==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=dn()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(n==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let s=e.restored_ids||Object.keys(this.subscriptionStreams);for(let o of s)this.cable.send({identifier:o,command:"history",history:this.historyRequestFor(o)}),this.presenceInfo[o]&&this.cable.send({identifier:o,command:"join",presence:this.presenceInfo[o]});return this.cable.restored(s)}return this.cable.connected(this.sessionId)}if(n==="presence"){let s=i.type;if(s==="info"){let o=this.pendingPresence[r];o&&(delete this.pendingPresence[r],o.resolve(i))}else if(s==="error"){let o=this.pendingPresence[r];o&&(delete this.pendingPresence[r],o.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:i}}if(i){let s=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:i,meta:s}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,r){switch(n){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,n,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(n.history=r,this.pendingHistory[e]=!0);let i=this.presenceInfo[e];return i&&(n.presence=i),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let i of this.subscriptionStreams[e]){let s=this.streamsPositions[i];s&&(r=!0,n[i]=s)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,i){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:i},{stream:n,epoch:r,offset:i}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,i)=>{this.pendingPresence[e]={resolve:r,reject:i},this.cable.send({command:"presence",identifier:e,data:n})})}}class _i extends ye{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class rt extends an{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}Oe(rt,"identifier","__ghost__");const yi="$pubsub";class it extends an{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}Oe(it,"identifier",yi);const se=Symbol("state");let wi=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:i,hubOptions:s,performFailures:o,transportConfigurator:a}){this.emitter=Fe(),this.transport=t,this.encoder=n,this.logger=r||new we,this.protocol=e,this.performFailures=o||"throw",this.protocol.attached(this),this.hub=new pi(s||{}),this[se]="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,i===!1&&this.connect().catch(()=>{})}get state(){return this[se]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[se]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(n){this.handleClose(n)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[se]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new K("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[se]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new K("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new K(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[se]="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 K?t:new K(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[se]="closed";let n=e||new K("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",n)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:r,identifier:i,message:s,meta:o}=n;r?this.hub.notify(i,r,s):this.hub.transmit(i,s,o)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new it({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new it({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=rt),n=r?new t(r,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let 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 i=await t.acquire("subscribed");if(i.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),i.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),i.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),i.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),i.release();return}let s={identifier:e,params:n};this.logger.debug("subscribing",s);try{let o=await this.protocol.subscribe(e,n);this.hub.subscribe(r,o),this.logger.debug("subscribed",{...s,remoteId:o}),t.notify("connected")}catch(o){if(o){if(o instanceof nt&&this.logger.warn("rejected",s),o instanceof K){this.logger.debug("disconnected during subscription; will retry on connect",s),i.release();return}this.logger.error("failed to subscribe",{error:o,...s})}t.close(o),this.hub.unsubscribe(r)}i.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let 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),n.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(i){i&&(i instanceof K?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:i}):this.logger.error("unsubscribe failed",{id:e,error:i}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new _i;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 i=r.remoteId,s={id:i,action:e,payload:n};this.logger.debug("perform",s);try{let o=await this.protocol.perform(i,e,n);return o&&this.logger.debug("perform result",{message:o,request:s}),o}catch(o){throw this.logger.error("perform failed",{error:o,request:s}),o}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...r)=>{n(),e(...r)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(r=>r()),t()})),n.push(this.on("close",r=>{n.forEach(i=>i()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(i=>i()),e(r)}))}),this._pendingConnect)}};const vi={maxMissingPings:2,maxReconnectAttempts:1/0},de=()=>Date.now(),hn=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:i}=e;return n=n||2,r===void 0&&(r=.5),s=>{let o=t*n**s,a=o*n,c=o+(a-o)*Math.random(),u=2*(Math.random()-.5)*r;return c=c*(1+u),i&&i<c&&(c=i),c}};let fn=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},vi,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new we,this.state="pending_connect",this.attempts=0,this.disconnectedAt=de()}watch(t){this.target=t,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=de(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=de(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=de(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=de()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=de()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new li))}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 Si{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Fe(),this.unbind=[],this.logger=n.logger||new we}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${n.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,n){this.transports.forEach(r=>{r.setParam(e,n)})}setToken(e,n){this.transports.forEach(r=>{r.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...i)=>{r(),n(...i)});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 Ei{constructor(e,n={}){this.url=e;let r=n.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=Fe();let{format:i,subprotocol:s,authStrategy:o}=n;this.format=i||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=o||"param",this.authProtocol="",this.subprotocol=s}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((n,r)=>{let i=[];i.push(this.once("open",()=>{i.forEach(s=>s()),n()})),i.push(this.once("close",()=>{i.forEach(s=>s()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let r=new URL(this.url);r.searchParams.set(e,n);let i=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(i)}setToken(e,n="jid"){if(this.authStrategy==="param")this.setParam(n,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${n}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(i=>i.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,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...i)=>{r(),n(...i)});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 n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const pn={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function xi(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({},pn,e);let{protocol:n,websocketImplementation:r,websocketFormat:i,websocketOptions:s,websocketAuthStrategy:o,fallbacks:a,logLevel:c,logger:u,transport:d,encoder:h,lazy:_,monitor:f,pingInterval:m,reconnectStrategy:p,maxMissingPings:R,maxReconnectAttempts:A,subprotocol:x,tokenRefresher:E,historyTimestamp:D,protocolOptions:w,concurrentSubscribes:$,performFailures:T,transportConfigurator:O,auth:L}=e;if(u=u||new we(c),typeof n=="string"){x=x||n;let W=n.substring(0,n.lastIndexOf("-")),j=n.substring(n.lastIndexOf("-")+1);if(w=w||{},W==="actioncable-v1")n=new un({logger:u,...w});else if(W==="actioncable-v1-ext")n=new bi({logger:u,historyTimestamp:D,...w});else throw Error(`Protocol is not supported yet: ${n}`);if(j==="json")h=h||new mi,i=i||"text";else if(j==="msgpack"){if(i="binary",!h)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(j==="protobuf"){if(i=i||"binary",!h)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${n}`)}if(!n)throw Error("Protocol must be specified");d=d||new Ei(t,{websocketImplementation:r,websocketOptions:s,subprotocol:x,authStrategy:o,format:i}),a&&(d=new Si([d,...a],{logger:u})),L&&L.token&&d.setToken(L.token,L.param||"jid"),p=p||hn(m),f!==!1&&(f=f||new fn({pingInterval:m,reconnectStrategy:p,maxMissingPings:R,maxReconnectAttempts:A,logger:u}));let oe={concurrentSubscribes:$},B=new wi({protocol:n,transport:d,encoder:h,logger:u,lazy:_,hubOptions:oe,performFailures:T,transportConfigurator:O});return f&&(f.watch(B),B.monitor=f),E&&Ci(B,async()=>{try{await E(d)}catch(W){return u.error("Failed to refresh authentication token: "+W),!1}return B.connect().catch(()=>{}),!0}),B}function Ci(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async r=>{if(r){if(n){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(n=!0,await e())}})}class Oi{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class ki extends rt{constructor(e,n,r){super(e,n),this.subscription=new Oi(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:i})=>this.subscription.notify("connected",{reconnected:i})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",i=>this.subscription.notify("received",i)),this.on("close",i=>{i&&i instanceof nt?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Ri{constructor(e){this.cable=e}create(e,n){let r,i;typeof e=="object"?(r=e.channel,delete e.channel,i=e):(r=e,i={});let s=new ki(r,i,n);return s.subscription.notify("initialized"),this.cable.subscribe(s),s.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class Ii{constructor(e){this.cable=e,this.subscriptions=new Ri(e)}}class Ai extends ln{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class Ti extends fn{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},n=i=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:i})},r=()=>this.disconnect(new K("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const Li=["cable","action-cable"],ji="/cable",De=(t,e)=>{for(let n of Li){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},mn=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Ni=()=>{if(typeof document<"u"&&document.head){let t=De(document,"url");if(t)return mn(t)}return mn(ji)},Pi=()=>{if(typeof document<"u"&&document.head){let t=De(document,"history-timestamp");if(t)return t|0}},Ui=()=>{if(typeof document<"u"&&document.head)return De(document,"token")},Fi=()=>{if(typeof document<"u"&&document.head)return De(document,"token-param")};function Di(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Ni(),e=e||{},e.historyTimestamp||(e.historyTimestamp=Pi());let n=Ui();if(n){let u=Fi();e.auth=Object.assign({token:n,param:u},e.auth||{})}e=Object.assign({},pn,e);let{logLevel:r,logger:i,pingInterval:s,reconnectStrategy:o,maxMissingPings:a,maxReconnectAttempts:c}=e;return i=e.logger=e.logger||new Ai(r),o=e.reconnectStrategy=e.reconnectStrategy||hn(s),e.monitor!==!1&&(e.monitor=e.monitor||new Ti({pingInterval:s,reconnectStrategy:o,maxMissingPings:a,maxReconnectAttempts:c,logger:i})),xi(t,e)}function Bi(t,e){let n=Di(t,e);return new Ii(n)}class gn{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,r={},i={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(s=>{if(s&&OpenC3Auth.setTokens(),this._cable==null){let o=this._url+"?scope="+encodeURIComponent(n)+"&authorization="+encodeURIComponent(localStorage.openc3Token);o=new URL(o,document.baseURI).href,this._cable=Bi(o)}return this._cable.subscriptions.create({channel:e,...i},r)})}recordPing(){}}function ve(t){return $i.test(t)}const $i=/^-?[0-9]+$/;function bn(t){return qi.test(t)}const qi=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function _n(t,e){if(ve(t))return Number.isSafeInteger(Number.parseInt(t,10));const n=Number.parseFloat(t),r=String(n);if(t===r)return!0;const i=yn(t),s=yn(r);return!!(i===s||(e==null?void 0:e.approx)===!0&&!ve(t)&&s.length>=14&&i.startsWith(s.substring(0,14)))}let Se=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function Vi(t){if(_n(t,{approx:!1}))return;if(ve(t))return Se.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Se.underflow:Se.truncate_float:Se.overflow}function yn(t){const{start:e,end:n}=Mi(t),r=t.substring(e,n),i=r.indexOf(".");return i===-1?r:r.substring(0,i)+r.substring(i+1)}function Mi(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let n=t.lastIndexOf("e");for(n===-1&&(n=t.lastIndexOf("E")),n===-1&&(n=t.length);(t[n-1]==="0"||t[n-1]===".")&&n>e;)n--;return{start:e,end:n}}class zi{constructor(e){if(Oe(this,"isLosslessNumber",!0),!bn(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Vi(this.value);if(e===void 0||e===Se.truncate_float)return Number.parseFloat(this.value);if(ve(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function Wi(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function Hi(t){return new zi(t)}function Ji(t,e){return st({"":t},"",t,e)}function st(t,e,n,r){return Array.isArray(n)?r.call(t,e,Gi(n,r)):n&&typeof n=="object"&&!Wi(n)?r.call(t,e,Ki(n,r)):r.call(t,e,n)}function Ki(t,e){for(const n of Object.keys(t)){const r=st(t,n,t[n],e);r!==void 0?t[n]=r:delete t[n]}return t}function Gi(t,e){for(let n=0;n<t.length;n++)t[n]=st(t,String(n),t[n],e);return t}function Yi(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hi,r=0;const i=a();return m(i),R(),e?Ji(i,e):i;function s(){if(t.charCodeAt(r)===ns){r++,u();const v={};let I=!0;for(;r<t.length&&t.charCodeAt(r)!==vn;){I?I=!1:(_(),u());const Z=r,z=d();if(z===void 0){E();return}u(),f();const he=a();if(he===void 0){L();return}Object.prototype.hasOwnProperty.call(v,z)&&!ot(he,v[z])&&D(z,Z+1),v[z]=he}return t.charCodeAt(r)!==vn&&w(),r++,v}}function o(){if(t.charCodeAt(r)===rs){r++,u();const v=[];let I=!0;for(;r<t.length&&t.charCodeAt(r)!==Sn;){I?I=!1:_();const Z=a();p(Z),v.push(Z)}return t.charCodeAt(r)!==Sn&&$(),r++,v}}function a(){u();const v=d()??h()??s()??o()??c("true",!0)??c("false",!1)??c("null",null);return u(),v}function c(v,I){if(t.slice(r,r+v.length)===v)return r+=v.length,I}function u(){for(;Zi(t.charCodeAt(r));)r++}function d(){if(t.charCodeAt(r)===at){r++;let v="";for(;r<t.length&&t.charCodeAt(r)!==at;){if(t.charCodeAt(r)===ts){const I=t[r+1],Z=es[I];Z!==void 0?(v+=Z,r++):I==="u"?Be(t.charCodeAt(r+2))&&Be(t.charCodeAt(r+3))&&Be(t.charCodeAt(r+4))&&Be(t.charCodeAt(r+5))?(v+=String.fromCharCode(Number.parseInt(t.slice(r+2,r+6),16)),r+=5):oe(r):O(r)}else Xi(t.charCodeAt(r))?v+=t[r]:T(t[r]);r++}return x(),r++,v}}function h(){const v=r;if(t.charCodeAt(r)===En&&(r++,A(v)),t.charCodeAt(r)===ct)r++;else if(Qi(t.charCodeAt(r)))for(r++;$e(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===ds)for(r++,A(v);$e(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===gs||t.charCodeAt(r)===ms)for(r++,(t.charCodeAt(r)===En||t.charCodeAt(r)===cs)&&r++,A(v);$e(t.charCodeAt(r));)r++;if(r>v)return n(t.slice(v,r))}function _(){if(t.charCodeAt(r)!==us)throw new SyntaxError(`Comma ',' expected after value ${j()}`);r++}function f(){if(t.charCodeAt(r)!==hs)throw new SyntaxError(`Colon ':' expected after property name ${j()}`);r++}function m(v){if(v===void 0)throw new SyntaxError(`JSON value expected ${j()}`)}function p(v){if(v===void 0)throw new SyntaxError(`Array item expected ${j()}`)}function R(){if(r<t.length)throw new SyntaxError(`Expected end of input ${j()}`)}function A(v){if(!$e(t.charCodeAt(r))){const I=t.slice(v,r);throw new SyntaxError(`Invalid number '${I}', expecting a digit ${j()}`)}}function x(){if(t.charCodeAt(r)!==at)throw new SyntaxError(`End of string '"' expected ${j()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${j()}`)}function D(v,I){throw new SyntaxError(`Duplicate key '${v}' encountered at position ${I}`)}function w(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${j()}`)}function $(){throw new SyntaxError(`Array item or end of array ']' expected ${j()}`)}function T(v){throw new SyntaxError(`Invalid character '${v}' ${B()}`)}function O(v){const I=t.slice(v,v+2);throw new SyntaxError(`Invalid escape character '${I}' ${B()}`)}function L(){throw new SyntaxError(`Object value expected after ':' ${B()}`)}function oe(v){const I=t.slice(v,v+6);throw new SyntaxError(`Invalid unicode character '${I}' ${B()}`)}function B(){return`at position ${r}`}function W(){return r<t.length?`but got '${t[r]}'`:"but reached end of input"}function j(){return`${W()} ${B()}`}}function Zi(t){return t===is||t===ss||t===os||t===as}function Be(t){return t>=ct&&t<=lt||t>=fs&&t<=bs||t>=ps&&t<=_s}function $e(t){return t>=ct&&t<=lt}function Qi(t){return t>=ls&&t<=lt}function Xi(t){return t>=32&&t<=1114111}function ot(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>ot(n,e[r])):wn(t)&&wn(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>ot(t[n],e[n])):!1}function wn(t){return typeof t=="object"&&t!==null}const es={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
8
|
-
`,r:"\r",t:" "},ts=92,ns=123,vn=125,rs=91,Sn=93,is=32,ss=10,os=9,as=13,at=34,cs=43,En=45,ct=48,ls=49,lt=57,us=44,ds=46,hs=58,fs=65,ps=97,ms=69,gs=101,bs=70,_s=102;function xn(t,e,n,r){return i(t);function i(c,u){if(Array.isArray(r)){const d=r.find(h=>h.test(c));if(d){const h=d.stringify(c);if(typeof h!="string"||!bn(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 c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c!=null&&c.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return s(c);if(c&&typeof c=="object")return o(c)}function s(c,u){if(c.length===0)return"[]";let d="[";for(let h=0;h<c.length;h++){const _=c[h];typeof _<"u"&&typeof _!="function"?d+=i(_):d+="null",h<c.length-1&&(d+=",")}return d+="]",d}function o(c,u){if(typeof c.toJSON=="function")return xn(c.toJSON(),e,n,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(c);if(d.length===0)return"{}";let h=!0,_="{";for(const f of d){const m=c[f];if(a(f,m)){h?h=!1:_+=",";const p=JSON.stringify(f);_+=`${p}:`,_+=i(m)}}return _+="}",_}function a(c,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function ys(t){return ve(t)&&!_n(t)?BigInt(t):parseFloat(t)}class Cn{constructor(){Oe(this,"id",1)}async exec(e,n,r={},i={},s=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,i.manual=!0,(await sn.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...i},timeout:s,transformRequest:[(o,a)=>xn(o)],transformResponse:[o=>Yi(o,void 0,ys)]})).data.result}catch(o){let a=new Error;throw o.response?(a.name=o.response.data.error.data.class,a.message=o.response.data.error.data.message,a.object=o.response.data.error):o.request?(a.name="Request error",a.message="Request error, no response received"):a=o,a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,n,r,i,s){return this.exec("map_target_to_interface",[e,n],{cmd_only:r,tlm_only:i,unmap_old:s})}unmap_target_from_interface(e,n,r,i){return this.exec("unmap_target_from_interface",[e,n],{cmd_only:r,tlm_only:i})}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}interface_target_enable(e,n,r=!1,i=!1){return this.exec("interface_target_enable",[e,n],{cmd_only:r,tlm_only:i})}interface_target_disable(e,n,r=!1,i=!1){return this.exec("interface_target_disable",[e,n],{cmd_only:r,tlm_only:i})}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,n,r,i,s){return this.exec("map_target_to_router",[e,n],{cmd_only:r,tlm_only:i,unmap_old:s})}unmap_target_from_router(e,n,r,i){return this.exec("unmap_target_from_router",[e,n],{cmd_only:r,tlm_only:i})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,n,r=!1,i=!1){return this.exec("router_target_enable",[e,n],{cmd_only:r,tlm_only:i})}router_target_disable(e,n,r=!1,i=!1){return this.exec("router_target_disable",[e,n],{cmd_only:r,tlm_only:i})}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,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,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])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,n,r,i=30){const s=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:i});if(s!=null){let o=s.length,a=null;for(let c=0;c<o;c++)a=this.decode_openc3_type(s[c][1]),a!==null&&(s[c][1]=a)}return s}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,n=30,r=null,i=null,s=null){let o={stale_time:n};r!==null&&(o.cache_timeout=r),i!==null&&(o.start_time=i.toISOString()),s!==null&&(o.end_time=s.toISOString());const a=await this.exec("get_tlm_values",[e],o,{},1e4);if(a&&a.length>0){let c=a[0].length,u=null;for(let d=0;d<c;d++)u=this.decode_openc3_type(a[0][d]),u!==null&&(a[0][d]=u)}return a}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,i="CONVERTED"){let s=null;if(n===void 0)s=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))s=await this.exec("tlm",[e],{type:n});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else s=await this.exec("tlm",[e,n,r],{type:i});let o=this.decode_openc3_type(s);return o!==null&&(s=o),s}async inject_tlm(e,n,r=null,i="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:i})}set_tlm(e,n,r,i){return this.exec("set_tlm",[e,n,r],{type:i})}override_tlm(e,n,r,i){return this.exec("override_tlm",[e,n,r],{type:i})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,i){return this.exec("normalize_tlm",[e,n,r],{type:i})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,i="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,i])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,i,s,o={}){let a=null;for(let c in i)Object.prototype.hasOwnProperty.call(i,c)&&(a=this.encode_openc3_type(i[c]),a!==null&&(i[c]=a));return this.exec(e,[n,r,i],o,s)}get_cmd_hazardous(e,n,r,i={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},i):this._cmd("get_cmd_hazardous",e,n,r,i)}cmd(e,n,r,i={},s={}){return n===void 0?this.exec("cmd",e,{},i):this._cmd("cmd",e,n,r,i,s)}cmd_no_range_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_range_check",e,{},i,s):this._cmd("cmd_no_range_check",e,n,r,i,s)}cmd_raw(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw",e,{},i,s):this._cmd("cmd_raw",e,n,r,i,s)}cmd_raw_no_range_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},i,s):this._cmd("cmd_raw_no_range_check",e,n,r,i,s)}cmd_no_hazardous_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},i,s):this._cmd("cmd_no_hazardous_check",e,n,r,i,s)}cmd_no_checks(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_checks",e,{},i,s):this._cmd("cmd_no_checks",e,n,r,i,s)}cmd_raw_no_hazardous_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},i,s):this._cmd("cmd_raw_no_hazardous_check",e,n,r,i,s)}cmd_raw_no_checks(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},i,s):this._cmd("cmd_raw_no_checks",e,n,r,i,s)}build_cmd(e,n,r,i={},s={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r,i,s)}build_command(e,n,r,i={},s={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r,i,s)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,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,n){return this.exec("get_setting",[e],n)}get_settings(e,n){return this.exec("get_settings",e,n)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>s.toString(16).padStart(2,"0")).join("")}}}const ws={components:{ValueWidget:gt,ValuelimitsbarWidget:bt},mixins:[Ve],props:{modelValue:{type:Array,default:()=>[]},timeZone:{type:String,default:"local"}},data(){return{api:null,cable:new gn,ignored:[],ignoredItemsDialog:!1,overallState:"GREEN",currentLimitsSet:"",items:[],itemList:[],screenItems:[],screenValues:{},updateCounter:0,itemsPerPage:25,search:"",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:"300px"},{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 Cn;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:{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 n=e.join("__");if(this.ignored.find(i=>n.includes(i)))continue;this.itemList.push(n);let r={key:e.slice(0,3).join("__"),parameters:e.slice(0,3),timestamp:this.formatDateTime(new Date,this.timeZone)};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(n=>e.includes(n))&&(e.includes("YELLOW")&&t!=="RED"&&(t="YELLOW"),e.includes("RED"))){t="RED";break}this.overallState=t},ignorePacket(t,e){let[n,r,i]=t.split("__"),s=`${n}__${r}`;for(this.ignored.push(s),e||this.updateIgnored();;){let o=this.itemList.findIndex(a=>a.includes(s));if(o===-1)break;{let a=this.itemList[o].lastIndexOf("__");this.removeItem(this.itemList[o].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(n=>n.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 n=JSON.parse(e.event);if(n.type!="LIMITS_CHANGE")continue;let r=`${n.target_name}__${n.packet_name}__${n.item_name}`;const i=this.itemList.findIndex(o=>o.includes(r));if(i!==-1){this.itemList[i]=`${r}__${n.new_limits_state}`,this.calcOverallState();continue}if(this.ignored.find(o=>r.includes(o))||n.new_limits_state&&!(n.new_limits_state.includes("YELLOW")||n.new_limits_state.includes("RED")))continue;let s={key:r,timestamp:this.formatNanoseconds(n.time_nsec,this.timeZone),parameters:[n.target_name,n.packet_name,n.item_name]};n.new_limits_state=="YELLOW"||n.new_limits_state=="RED"?s.limits=!1:s.limits=!0,this.itemList.push(`${r}__${n.new_limits_state}`),this.items.push(s),this.calcOverallState()}},update(){this.screenItems.length!==0&&this.api.get_tlm_values(this.screenItems).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.screenItems.push(t),this.screenValues[t]=[null,null,0]},deleteItem:function(t){let e=this.screenItems.indexOf(t);this.screenItems.splice(e,1)},showIgnored(){this.ignoredItemsDialog=!0},customFilter(t,e,n){if(!e||e.trim()==="")return!0;if(e=e.toLowerCase(),n.parameters&&n.parameters.length>0){for(const r of n.parameters)if(r.toLowerCase().includes(e))return!0}return!!(n.timestamp&&n.timestamp.toLowerCase().includes(e)||n.key&&n.key.toLowerCase().includes(e))}}},vs=["status"],Ss={class:"font-weight-black"};function Es(t,e,n,r,i,s){const o=y("v-text-field"),a=y("v-spacer"),c=y("v-row"),u=y("valuelimitsbar-widget"),d=y("value-widget"),h=y("v-btn"),_=y("v-icon"),f=y("v-list-item-title"),m=y("v-list-item"),p=y("v-list"),R=y("v-menu"),A=y("v-data-table"),x=y("v-card"),E=y("v-toolbar"),D=y("v-divider"),w=y("v-card-text"),$=y("v-card-actions"),T=y("v-dialog");return k(),H("div",null,[b(x,{class:"pa-5"},{default:g(()=>[b(c,{class:"ma-1"},{default:g(()=>[b(o,{density:"compact",variant:"outlined",readonly:"","hide-details":"",label:"Overall Limits State","model-value":s.overallStateFormatted,class:ze(s.textFieldClass),style:{"margin-right":"10px","max-width":"280px"},"data-test":"overall-state"},Ce({_:2},[s.astroStatus?{name:"prepend-inner",fn:g(()=>[q("rux-status",{status:s.astroStatus},null,8,vs)]),key:"0"}:void 0]),1032,["model-value","class"]),b(o,{density:"compact",variant:"outlined",readonly:"","hide-details":"",label:"Current Limits Set","model-value":i.currentLimitsSet,style:{"max-width":"200px"},"data-test":"limits-set"},null,8,["model-value"]),b(a),b(o,{modelValue:i.search,"onUpdate:modelValue":e[0]||(e[0]=O=>i.search=O),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}),b(A,{"items-per-page":i.itemsPerPage,"onUpdate:itemsPerPage":e[1]||(e[1]=O=>i.itemsPerPage=O),headers:i.headers,items:i.items,search:i.search,"custom-filter":s.customFilter,"item-value":"key","data-test":"limits-table",class:"limits-table",density:"compact"},{"item.timestamp":g(({item:O})=>[U(G(O.timestamp),1)]),"item.value":g(({item:O})=>[O.limits?(k(),P(u,{key:0,parameters:O.parameters,settings:i.valueLimitsBarWidgetSettings,"screen-values":i.screenValues,"screen-time-zone":n.timeZone,onAddItem:s.addItem,onDeleteItem:s.deleteItem},null,8,["parameters","settings","screen-values","screen-time-zone","onAddItem","onDeleteItem"])):(k(),P(d,{key:1,parameters:O.parameters,settings:i.valueWidgetSettings,"screen-values":i.screenValues,"screen-time-zone":n.timeZone,onAddItem:s.addItem,onDeleteItem:s.deleteItem},null,8,["parameters","settings","screen-values","screen-time-zone","onAddItem","onDeleteItem"]))]),"item.actions":g(({item:O})=>[b(R,null,{activator:g(({props:L})=>[b(h,xe({icon:"mdi-dots-horizontal",variant:"text",density:"compact","aria-label":"Item Options"},L),null,16)]),default:g(()=>[b(p,null,{default:g(()=>[b(m,{onClick:L=>s.ignorePacket(O.key)},{prepend:g(()=>[b(_,null,{default:g(()=>[...e[4]||(e[4]=[U("mdi-close-circle-multiple",-1)])]),_:1})]),default:g(()=>[b(f,null,{default:g(()=>[...e[5]||(e[5]=[U("Ignore Entire Packet",-1)])]),_:1})]),_:1},8,["onClick"]),b(m,{onClick:L=>s.ignoreItem(O.key)},{prepend:g(()=>[b(_,null,{default:g(()=>[...e[6]||(e[6]=[U("mdi-close-circle",-1)])]),_:1})]),default:g(()=>[b(f,null,{default:g(()=>[...e[7]||(e[7]=[U("Ignore Item",-1)])]),_:1})]),_:1},8,["onClick"]),b(m,{onClick:L=>s.removeItem(O.key)},{prepend:g(()=>[b(_,null,{default:g(()=>[...e[8]||(e[8]=[U("mdi-eye-off",-1)])]),_:1})]),default:g(()=>[b(f,null,{default:g(()=>[...e[9]||(e[9]=[U("Temporarily Hide Item",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),"item.limits":g(({item:O})=>[b(a)]),_:1},8,["items-per-page","headers","items","search","custom-filter"]),e[10]||(e[10]=q("div",{class:"footer"},' Note: Timestamp is "now" for items currently out of limits when the page is loaded. ',-1))]),_:1}),b(T,{modelValue:i.ignoredItemsDialog,"onUpdate:modelValue":e[3]||(e[3]=O=>i.ignoredItemsDialog=O),"max-width":"600"},{default:g(()=>[b(x,null,{default:g(()=>[b(E,{height:"24"},{default:g(()=>[b(a),e[11]||(e[11]=q("span",null,"Ignored Items",-1)),b(a)]),_:1}),b(w,{class:"mt-2"},{default:g(()=>[q("div",null,[(k(!0),H(X,null,ae(s.ignoredFormatted,(O,L)=>(k(),H("div",{key:L},[b(c,{class:"ma-1 align-center"},{default:g(()=>[q("span",Ss,G(O),1),b(a),b(h,{icon:"mdi-delete",density:"compact",variant:"text","aria-label":"Remove Ignored Item","data-test":`remove-ignore-${L}`,onClick:oe=>s.restoreItem(L)},null,8,["data-test","onClick"])]),_:2},1024),L<s.ignoredFormatted.length-1?(k(),P(D,{key:L})):ee("",!0)]))),128))])]),_:1}),b($,{class:"px-2"},{default:g(()=>[b(h,{variant:"outlined",onClick:s.clearAll},{default:g(()=>[...e[12]||(e[12]=[U(" Clear All ",-1)])]),_:1},8,["onClick"]),b(a),b(h,{variant:"flat",onClick:e[2]||(e[2]=O=>i.ignoredItemsDialog=!1)},{default:g(()=>[...e[13]||(e[13]=[U(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const xs=Ee(ws,[["render",Es],["__scopeId","data-v-ed7ec5ac"]]),Cs={mixins:[Ve],props:{historyCount:{type:Number,default:1e3},timeZone:{type:String,default:"local"}},data(){return{data:[],cable:new gn,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 n=JSON.parse(t[e].event);this.data.unshift(n)}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}}},Os=["status"];function ks(t,e,n,r,i,s){const o=y("v-spacer"),a=y("v-text-field"),c=y("v-card-title"),u=y("v-data-table"),d=y("v-card");return k(),P(d,{class:"card-height"},{default:g(()=>[b(c,{class:"d-flex align-center"},{default:g(()=>[e[1]||(e[1]=U(" Limits Events ",-1)),b(o),b(a,{modelValue:i.search,"onUpdate:modelValue":e[0]||(e[0]=h=>i.search=h),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),b(u,{headers:i.headers,items:i.data,search:i.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact",height:s.calcTableHeight(),hover:"","data-test":"limits-events"},{"item.time_nsec":g(({item:h})=>[q("span",null,G(t.formatNanoseconds(h.time_nsec,n.timeZone)),1)]),"item.level":g(({item:h})=>[q("rux-status",{status:s.getStatus(h.message)},null,8,Os)]),"item.message":g(({item:h})=>[q("span",{class:ze(s.getColorClass(h.message))},G(h.message),3)]),_:1},8,["headers","items","search","height"])]),_:1})}const Rs={components:{LimitsControl:xs,LimitsEvents:Ee(Cs,[["render",ks],["__scopeId","data-v-3c276116"]]),TopBar:Ln,OpenConfigDialog:pt,SaveConfigDialog:ft},mixins:[ht],data(){return{title:"Limits Monitor",configKey:"limits_monitor",api:new Cn,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,n=>{this.ignored=n,this.renderKey++})},saveConfiguration:function(t){this.saveConfigBase(t,this.ignored)}}};function Is(t,e,n,r,i,s){const o=y("top-bar"),a=y("limits-control"),c=y("limits-events"),u=y("open-config-dialog"),d=y("save-config-dialog"),h=y("v-spacer"),_=y("v-toolbar"),f=y("v-select"),m=y("v-card-text"),p=y("v-btn"),R=y("v-card-actions"),A=y("v-card"),x=y("v-dialog");return k(),H("div",null,[b(o,{menus:i.menus,title:i.title},null,8,["menus","title"]),(k(),P(a,{ref:"control",key:i.renderKey,modelValue:i.ignored,"onUpdate:modelValue":e[0]||(e[0]=E=>i.ignored=E),"time-zone":i.timeZone},null,8,["modelValue","time-zone"])),e[11]||(e[11]=q("div",{style:{height:"15px"}},null,-1)),b(c,{"time-zone":i.timeZone},null,8,["time-zone"]),i.openConfig?(k(),P(u,{key:0,modelValue:i.openConfig,"onUpdate:modelValue":e[1]||(e[1]=E=>i.openConfig=E),"config-key":i.configKey,onSuccess:s.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):ee("",!0),i.saveConfig?(k(),P(d,{key:1,modelValue:i.saveConfig,"onUpdate:modelValue":e[2]||(e[2]=E=>i.saveConfig=E),"config-key":i.configKey,onSuccess:s.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):ee("",!0),b(x,{modelValue:i.limitsSetDialog,"onUpdate:modelValue":e[5]||(e[5]=E=>i.limitsSetDialog=E),"max-width":"650"},{default:g(()=>[b(A,null,{default:g(()=>[b(_,{height:"24"},{default:g(()=>[b(h),e[6]||(e[6]=q("span",null,"Change Limits Set",-1)),b(h)]),_:1}),b(m,{class:"mt-6"},{default:g(()=>[e[7]||(e[7]=q("span",{style:{display:"block"}}," The Limits Set is a global option which changes the Limits Set across all tools. ",-1)),e[8]||(e[8]=q("span",{style:{display:"block"}}," NOTE: Changing this option clears the current list and recalculates based on the new set. ",-1)),b(f,{modelValue:i.currentLimitsSet,"onUpdate:modelValue":e[3]||(e[3]=E=>i.currentLimitsSet=E),label:"Limits Set",items:i.limitsSets,density:"compact",variant:"outlined","data-test":"limits-set","hide-details":"",class:"mt-3",style:{"max-width":"200px"}},null,8,["modelValue","items"])]),_:1}),b(R,{class:"px-2"},{default:g(()=>[b(h),b(p,{variant:"outlined",onClick:e[4]||(e[4]=E=>i.limitsSetDialog=!1)},{default:g(()=>[...e[9]||(e[9]=[U(" Cancel ",-1)])]),_:1}),b(p,{variant:"flat",onClick:s.setLimitsSet},{default:g(()=>[...e[10]||(e[10]=[U(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const Gs=Rn("default",Ee(Rs,[["render",Is]]))}}});
|
8
|
+
`,r:"\r",t:" "},ts=92,ns=123,vn=125,rs=91,Sn=93,is=32,ss=10,os=9,as=13,at=34,cs=43,En=45,ct=48,ls=49,lt=57,us=44,ds=46,hs=58,fs=65,ps=97,ms=69,gs=101,bs=70,_s=102;function xn(t,e,n,r){return i(t);function i(c,u){if(Array.isArray(r)){const d=r.find(h=>h.test(c));if(d){const h=d.stringify(c);if(typeof h!="string"||!bn(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 c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c!=null&&c.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return s(c);if(c&&typeof c=="object")return o(c)}function s(c,u){if(c.length===0)return"[]";let d="[";for(let h=0;h<c.length;h++){const _=c[h];typeof _<"u"&&typeof _!="function"?d+=i(_):d+="null",h<c.length-1&&(d+=",")}return d+="]",d}function o(c,u){if(typeof c.toJSON=="function")return xn(c.toJSON(),e,n,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(c);if(d.length===0)return"{}";let h=!0,_="{";for(const f of d){const m=c[f];if(a(f,m)){h?h=!1:_+=",";const p=JSON.stringify(f);_+=`${p}:`,_+=i(m)}}return _+="}",_}function a(c,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function ys(t){return ve(t)&&!_n(t)?BigInt(t):parseFloat(t)}class Cn{constructor(){Oe(this,"id",1)}async exec(e,n,r={},i={},s=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,i.manual=!0,(await sn.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...i},timeout:s,transformRequest:[(o,a)=>xn(o)],transformResponse:[o=>Yi(o,void 0,ys)]})).data.result}catch(o){let a=new Error;throw o.response?(a.name=o.response.data.error.data.class,a.message=o.response.data.error.data.message,a.object=o.response.data.error):o.request?(a.name="Request error",a.message="Request error, no response received"):a=o,a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,n,r,i,s){return this.exec("map_target_to_interface",[e,n],{cmd_only:r,tlm_only:i,unmap_old:s})}unmap_target_from_interface(e,n,r,i){return this.exec("unmap_target_from_interface",[e,n],{cmd_only:r,tlm_only:i})}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}interface_target_enable(e,n,r=!1,i=!1){return this.exec("interface_target_enable",[e,n],{cmd_only:r,tlm_only:i})}interface_target_disable(e,n,r=!1,i=!1){return this.exec("interface_target_disable",[e,n],{cmd_only:r,tlm_only:i})}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,n,r,i,s){return this.exec("map_target_to_router",[e,n],{cmd_only:r,tlm_only:i,unmap_old:s})}unmap_target_from_router(e,n,r,i){return this.exec("unmap_target_from_router",[e,n],{cmd_only:r,tlm_only:i})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,n,r=!1,i=!1){return this.exec("router_target_enable",[e,n],{cmd_only:r,tlm_only:i})}router_target_disable(e,n,r=!1,i=!1){return this.exec("router_target_disable",[e,n],{cmd_only:r,tlm_only:i})}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,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,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])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,n,r,i=30){const s=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:i});if(s!=null){let o=s.length,a=null;for(let c=0;c<o;c++)a=this.decode_openc3_type(s[c][1]),a!==null&&(s[c][1]=a)}return s}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,n=30,r=null,i=null,s=null){let o={stale_time:n};r!==null&&(o.cache_timeout=r),i!==null&&(o.start_time=i.toISOString()),s!==null&&(o.end_time=s.toISOString());const a=await this.exec("get_tlm_values",[e],o,{},1e4);if(a&&a.length>0){let c=a[0].length,u=null;for(let d=0;d<c;d++)u=this.decode_openc3_type(a[0][d]),u!==null&&(a[0][d]=u)}return a}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,i="CONVERTED"){let s=null;if(n===void 0)s=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))s=await this.exec("tlm",[e],{type:n});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else s=await this.exec("tlm",[e,n,r],{type:i});let o=this.decode_openc3_type(s);return o!==null&&(s=o),s}async inject_tlm(e,n,r=null,i="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:i})}set_tlm(e,n,r,i){return this.exec("set_tlm",[e,n,r],{type:i})}override_tlm(e,n,r,i){return this.exec("override_tlm",[e,n,r],{type:i})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,i){return this.exec("normalize_tlm",[e,n,r],{type:i})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,i="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,i])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,i,s,o={}){let a=null;for(let c in i)Object.prototype.hasOwnProperty.call(i,c)&&(a=this.encode_openc3_type(i[c]),a!==null&&(i[c]=a));return this.exec(e,[n,r,i],o,s)}get_cmd_hazardous(e,n,r,i={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},i):this._cmd("get_cmd_hazardous",e,n,r,i)}cmd(e,n,r,i={},s={}){return n===void 0?this.exec("cmd",e,{},i):this._cmd("cmd",e,n,r,i,s)}cmd_no_range_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_range_check",e,{},i,s):this._cmd("cmd_no_range_check",e,n,r,i,s)}cmd_raw(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw",e,{},i,s):this._cmd("cmd_raw",e,n,r,i,s)}cmd_raw_no_range_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},i,s):this._cmd("cmd_raw_no_range_check",e,n,r,i,s)}cmd_no_hazardous_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},i,s):this._cmd("cmd_no_hazardous_check",e,n,r,i,s)}cmd_no_checks(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_checks",e,{},i,s):this._cmd("cmd_no_checks",e,n,r,i,s)}cmd_raw_no_hazardous_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},i,s):this._cmd("cmd_raw_no_hazardous_check",e,n,r,i,s)}cmd_raw_no_checks(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},i,s):this._cmd("cmd_raw_no_checks",e,n,r,i,s)}build_cmd(e,n,r,i={},s={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r,i,s)}build_command(e,n,r,i={},s={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r,i,s)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,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,n){return this.exec("get_setting",[e],n)}get_settings(e,n){return this.exec("get_settings",e,n)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>s.toString(16).padStart(2,"0")).join("")}}}const ws={components:{ValueWidget:gt,ValuelimitsbarWidget:bt},mixins:[Ve],props:{modelValue:{type:Array,default:()=>[]},timeZone:{type:String,default:"local"}},data(){return{api:null,cable:new gn,ignored:[],ignoredItemsDialog:!1,overallState:"GREEN",currentLimitsSet:"",items:[],itemList:[],screenItems:[],screenValues:{},updateCounter:0,itemsPerPage:25,search:"",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 Cn;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:{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 n=e.join("__");if(this.ignored.find(i=>n.includes(i)))continue;this.itemList.push(n);let r={key:e.slice(0,3).join("__"),parameters:e.slice(0,3),timestamp:this.formatDateTime(new Date,this.timeZone)};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(n=>e.includes(n))&&(e.includes("YELLOW")&&t!=="RED"&&(t="YELLOW"),e.includes("RED"))){t="RED";break}this.overallState=t},ignorePacket(t,e){let[n,r,i]=t.split("__"),s=`${n}__${r}`;for(this.ignored.push(s),e||this.updateIgnored();;){let o=this.itemList.findIndex(a=>a.includes(s));if(o===-1)break;{let a=this.itemList[o].lastIndexOf("__");this.removeItem(this.itemList[o].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(n=>n.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 n=JSON.parse(e.event);if(n.type!="LIMITS_CHANGE")continue;let r=`${n.target_name}__${n.packet_name}__${n.item_name}`;const i=this.itemList.findIndex(o=>o.includes(r));if(i!==-1){this.itemList[i]=`${r}__${n.new_limits_state}`,this.calcOverallState();continue}if(this.ignored.find(o=>r.includes(o))||n.new_limits_state&&!(n.new_limits_state.includes("YELLOW")||n.new_limits_state.includes("RED")))continue;let s={key:r,timestamp:this.formatNanoseconds(n.time_nsec,this.timeZone),parameters:[n.target_name,n.packet_name,n.item_name]};n.new_limits_state=="YELLOW"||n.new_limits_state=="RED"?s.limits=!1:s.limits=!0,this.itemList.push(`${r}__${n.new_limits_state}`),this.items.push(s),this.calcOverallState()}},update(){this.screenItems.length!==0&&this.api.get_tlm_values(this.screenItems).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.screenItems.push(t),this.screenValues[t]=[null,null,0]},deleteItem:function(t){let e=this.screenItems.indexOf(t);this.screenItems.splice(e,1)},showIgnored(){this.ignoredItemsDialog=!0},customFilter(t,e,n){if(!e||e.trim()==="")return!0;if(e=e.toLowerCase(),n.parameters&&n.parameters.length>0){for(const r of n.parameters)if(r.toLowerCase().includes(e))return!0}return!!(n.timestamp&&n.timestamp.toLowerCase().includes(e)||n.key&&n.key.toLowerCase().includes(e))}}},vs=["status"],Ss={class:"font-weight-black"};function Es(t,e,n,r,i,s){const o=y("v-text-field"),a=y("v-spacer"),c=y("v-row"),u=y("valuelimitsbar-widget"),d=y("value-widget"),h=y("v-btn"),_=y("v-icon"),f=y("v-list-item-title"),m=y("v-list-item"),p=y("v-list"),R=y("v-menu"),A=y("v-data-table"),x=y("v-card"),E=y("v-toolbar"),D=y("v-divider"),w=y("v-card-text"),$=y("v-card-actions"),T=y("v-dialog");return k(),H("div",null,[b(x,{class:"pa-5"},{default:g(()=>[b(c,{class:"ma-1"},{default:g(()=>[b(o,{density:"compact",variant:"outlined",readonly:"","hide-details":"",label:"Overall Limits State","model-value":s.overallStateFormatted,class:ze(s.textFieldClass),style:{"margin-right":"10px","max-width":"280px"},"data-test":"overall-state"},Ce({_:2},[s.astroStatus?{name:"prepend-inner",fn:g(()=>[q("rux-status",{status:s.astroStatus},null,8,vs)]),key:"0"}:void 0]),1032,["model-value","class"]),b(o,{density:"compact",variant:"outlined",readonly:"","hide-details":"",label:"Current Limits Set","model-value":i.currentLimitsSet,style:{"max-width":"200px"},"data-test":"limits-set"},null,8,["model-value"]),b(a),b(o,{modelValue:i.search,"onUpdate:modelValue":e[0]||(e[0]=O=>i.search=O),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}),b(A,{"items-per-page":i.itemsPerPage,"onUpdate:itemsPerPage":e[1]||(e[1]=O=>i.itemsPerPage=O),headers:i.headers,items:i.items,search:i.search,"custom-filter":s.customFilter,"item-value":"key","data-test":"limits-table",class:"limits-table",density:"compact"},{"item.timestamp":g(({item:O})=>[U(G(O.timestamp),1)]),"item.value":g(({item:O})=>[O.limits?(k(),P(u,{key:0,parameters:O.parameters,settings:i.valueLimitsBarWidgetSettings,"screen-values":i.screenValues,"screen-time-zone":n.timeZone,onAddItem:s.addItem,onDeleteItem:s.deleteItem},null,8,["parameters","settings","screen-values","screen-time-zone","onAddItem","onDeleteItem"])):(k(),P(d,{key:1,parameters:O.parameters,settings:i.valueWidgetSettings,"screen-values":i.screenValues,"screen-time-zone":n.timeZone,onAddItem:s.addItem,onDeleteItem:s.deleteItem},null,8,["parameters","settings","screen-values","screen-time-zone","onAddItem","onDeleteItem"]))]),"item.actions":g(({item:O})=>[b(R,null,{activator:g(({props:L})=>[b(h,xe({icon:"mdi-dots-horizontal",variant:"text",density:"compact","aria-label":"Item Options"},L),null,16)]),default:g(()=>[b(p,null,{default:g(()=>[b(m,{onClick:L=>s.ignorePacket(O.key)},{prepend:g(()=>[b(_,null,{default:g(()=>[...e[4]||(e[4]=[U("mdi-close-circle-multiple",-1)])]),_:1})]),default:g(()=>[b(f,null,{default:g(()=>[...e[5]||(e[5]=[U("Ignore Entire Packet",-1)])]),_:1})]),_:1},8,["onClick"]),b(m,{onClick:L=>s.ignoreItem(O.key)},{prepend:g(()=>[b(_,null,{default:g(()=>[...e[6]||(e[6]=[U("mdi-close-circle",-1)])]),_:1})]),default:g(()=>[b(f,null,{default:g(()=>[...e[7]||(e[7]=[U("Ignore Item",-1)])]),_:1})]),_:1},8,["onClick"]),b(m,{onClick:L=>s.removeItem(O.key)},{prepend:g(()=>[b(_,null,{default:g(()=>[...e[8]||(e[8]=[U("mdi-eye-off",-1)])]),_:1})]),default:g(()=>[b(f,null,{default:g(()=>[...e[9]||(e[9]=[U("Temporarily Hide Item",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),"item.limits":g(({item:O})=>[b(a)]),_:1},8,["items-per-page","headers","items","search","custom-filter"]),e[10]||(e[10]=q("div",{class:"footer"},' Note: Timestamp is "now" for items currently out of limits when the page is loaded. ',-1))]),_:1}),b(T,{modelValue:i.ignoredItemsDialog,"onUpdate:modelValue":e[3]||(e[3]=O=>i.ignoredItemsDialog=O),"max-width":"600"},{default:g(()=>[b(x,null,{default:g(()=>[b(E,{height:"24"},{default:g(()=>[b(a),e[11]||(e[11]=q("span",null,"Ignored Items",-1)),b(a)]),_:1}),b(w,{class:"mt-2"},{default:g(()=>[q("div",null,[(k(!0),H(X,null,ae(s.ignoredFormatted,(O,L)=>(k(),H("div",{key:L},[b(c,{class:"ma-1 align-center"},{default:g(()=>[q("span",Ss,G(O),1),b(a),b(h,{icon:"mdi-delete",density:"compact",variant:"text","aria-label":"Remove Ignored Item","data-test":`remove-ignore-${L}`,onClick:oe=>s.restoreItem(L)},null,8,["data-test","onClick"])]),_:2},1024),L<s.ignoredFormatted.length-1?(k(),P(D,{key:L})):ee("",!0)]))),128))])]),_:1}),b($,{class:"px-2"},{default:g(()=>[b(h,{variant:"outlined",onClick:s.clearAll},{default:g(()=>[...e[12]||(e[12]=[U(" Clear All ",-1)])]),_:1},8,["onClick"]),b(a),b(h,{variant:"flat",onClick:e[2]||(e[2]=O=>i.ignoredItemsDialog=!1)},{default:g(()=>[...e[13]||(e[13]=[U(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const xs=Ee(ws,[["render",Es],["__scopeId","data-v-9fa0ca9a"]]),Cs={mixins:[Ve],props:{historyCount:{type:Number,default:1e3},timeZone:{type:String,default:"local"}},data(){return{data:[],cable:new gn,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 n=JSON.parse(t[e].event);this.data.unshift(n)}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}}},Os=["status"];function ks(t,e,n,r,i,s){const o=y("v-spacer"),a=y("v-text-field"),c=y("v-card-title"),u=y("v-data-table"),d=y("v-card");return k(),P(d,{class:"card-height"},{default:g(()=>[b(c,{class:"d-flex align-center"},{default:g(()=>[e[1]||(e[1]=U(" Limits Events ",-1)),b(o),b(a,{modelValue:i.search,"onUpdate:modelValue":e[0]||(e[0]=h=>i.search=h),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),b(u,{headers:i.headers,items:i.data,search:i.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact",height:s.calcTableHeight(),hover:"","data-test":"limits-events"},{"item.time_nsec":g(({item:h})=>[q("span",null,G(t.formatNanoseconds(h.time_nsec,n.timeZone)),1)]),"item.level":g(({item:h})=>[q("rux-status",{status:s.getStatus(h.message)},null,8,Os)]),"item.message":g(({item:h})=>[q("span",{class:ze(s.getColorClass(h.message))},G(h.message),3)]),_:1},8,["headers","items","search","height"])]),_:1})}const Rs={components:{LimitsControl:xs,LimitsEvents:Ee(Cs,[["render",ks],["__scopeId","data-v-3c276116"]]),TopBar:Ln,OpenConfigDialog:pt,SaveConfigDialog:ft},mixins:[ht],data(){return{title:"Limits Monitor",configKey:"limits_monitor",api:new Cn,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,n=>{this.ignored=n,this.renderKey++})},saveConfiguration:function(t){this.saveConfigBase(t,this.ignored)}}};function Is(t,e,n,r,i,s){const o=y("top-bar"),a=y("limits-control"),c=y("limits-events"),u=y("open-config-dialog"),d=y("save-config-dialog"),h=y("v-spacer"),_=y("v-toolbar"),f=y("v-select"),m=y("v-card-text"),p=y("v-btn"),R=y("v-card-actions"),A=y("v-card"),x=y("v-dialog");return k(),H("div",null,[b(o,{menus:i.menus,title:i.title},null,8,["menus","title"]),(k(),P(a,{ref:"control",key:i.renderKey,modelValue:i.ignored,"onUpdate:modelValue":e[0]||(e[0]=E=>i.ignored=E),"time-zone":i.timeZone},null,8,["modelValue","time-zone"])),e[11]||(e[11]=q("div",{style:{height:"15px"}},null,-1)),b(c,{"time-zone":i.timeZone},null,8,["time-zone"]),i.openConfig?(k(),P(u,{key:0,modelValue:i.openConfig,"onUpdate:modelValue":e[1]||(e[1]=E=>i.openConfig=E),"config-key":i.configKey,onSuccess:s.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):ee("",!0),i.saveConfig?(k(),P(d,{key:1,modelValue:i.saveConfig,"onUpdate:modelValue":e[2]||(e[2]=E=>i.saveConfig=E),"config-key":i.configKey,onSuccess:s.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):ee("",!0),b(x,{modelValue:i.limitsSetDialog,"onUpdate:modelValue":e[5]||(e[5]=E=>i.limitsSetDialog=E),"max-width":"650"},{default:g(()=>[b(A,null,{default:g(()=>[b(_,{height:"24"},{default:g(()=>[b(h),e[6]||(e[6]=q("span",null,"Change Limits Set",-1)),b(h)]),_:1}),b(m,{class:"mt-6"},{default:g(()=>[e[7]||(e[7]=q("span",{style:{display:"block"}}," The Limits Set is a global option which changes the Limits Set across all tools. ",-1)),e[8]||(e[8]=q("span",{style:{display:"block"}}," NOTE: Changing this option clears the current list and recalculates based on the new set. ",-1)),b(f,{modelValue:i.currentLimitsSet,"onUpdate:modelValue":e[3]||(e[3]=E=>i.currentLimitsSet=E),label:"Limits Set",items:i.limitsSets,density:"compact",variant:"outlined","data-test":"limits-set","hide-details":"",class:"mt-3",style:{"max-width":"200px"}},null,8,["modelValue","items"])]),_:1}),b(R,{class:"px-2"},{default:g(()=>[b(h),b(p,{variant:"outlined",onClick:e[4]||(e[4]=E=>i.limitsSetDialog=!1)},{default:g(()=>[...e[9]||(e[9]=[U(" Cancel ",-1)])]),_:1}),b(p,{variant:"flat",onClick:s.setLimitsSet},{default:g(()=>[...e[10]||(e[10]=[U(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const Gs=Rn("default",Ee(Rs,[["render",Is]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./BarColumn-DHP-zQ4R-
|
1
|
+
System.register(["./BarColumn-DHP-zQ4R-6e0b3b131139b91d2a85.js","vue","./main-c4d1c0ebf45a747bb58d.js","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue-router","single-spa","vuex","vuetify"],function(u,p){"use strict";var l,r,a,n,s,t,o,c,m;return{setters:[i=>{l=i.l},i=>{r=i.resolveComponent,a=i.createBlock,n=i.openBlock,s=i.withCtx,t=i.createElementVNode,o=i.toDisplayString,c=i.mergeProps},i=>{m=i.d},null,null,null,null,null],execute:function(){const i={mixins:[l],data(){return{width:160,height:22}},computed:{limitsRange(){let e=this.limitsSettings[this.selectedLimitsSet];if(e)return e.length===4?`RL/${e[0]} YL/${e[1]} YH/${e[2]} RH/${e[3]}`:`RL/${e[0]} YL/${e[1]} YH/${e[2]} RH/${e[3]} GL/${e[4]} GH/${e[5]}`;throw{line:this.line,lineNumber:this.lineNumber,keyword:"LIMITSBAR",parameters:this.parameters,message:"Item has no limits settings",usage:"Only items with limits"}}},created(){this.verifyNumParams("LIMITSBAR",3,6,"LIMITSBAR <TARGET> <PACKET> <ITEM> <TYPE> <WIDTH> <HEIGHT>")}};function _(e,d,y,w,I,v){const h=r("v-tooltip");return n(),a(h,{"open-delay":600,location:"top"},{activator:s(({props:g})=>[t("div",c({class:"limitsbar",style:[e.cssProps,e.computedStyle]},g),[...d[0]||(d[0]=[t("div",{class:"limitsbar__container"},[t("div",{class:"limitsbar__redlow"}),t("div",{class:"limitsbar__redhigh"}),t("div",{class:"limitsbar__yellowlow"}),t("div",{class:"limitsbar__yellowhigh"}),t("div",{class:"limitsbar__greenlow"}),t("div",{class:"limitsbar__greenhigh"}),t("div",{class:"limitsbar__blue"}),t("div",{class:"limitsbar__line"}),t("div",{class:"limitsbar__arrow"})],-1)])],16)]),default:s(()=>[t("span",null,o(v.limitsRange),1)]),_:1})}const b=u("default",m(i,[["render",_],["__scopeId","data-v-111893ce"]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./VWidget-DQGJRgAk-
|
1
|
+
System.register(["./VWidget-DQGJRgAk-1ba292dc524fc27f96eb.js","vue","./main-c4d1c0ebf45a747bb58d.js","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue-router","single-spa","vuex","vuetify"],function(d,g){"use strict";var l,i,n,a,s,o,p,m,u,c;return{setters:[e=>{l=e.h},e=>{i=e.resolveComponent,n=e.createElementBlock,a=e.openBlock,s=e.normalizeStyle,o=e.createElementVNode,p=e.createBlock,m=e.createCommentVNode,u=e.normalizeClass},e=>{c=e.d},null,null,null,null,null],execute:function(){const e={mixins:[l],data(){return{radius:15,fullLabelDisplay:!1,displayLabel:!0}},created(){this.parameters[4]&&(this.radius=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))},computed:{labelName(){return this.fullLabelDisplay?[this.parameters[0]+" "+this.parameters[1]+" "+this.parameters[2]]:[this.parameters[2]]},cssProps(){return{"--height":this.radius+"px","--width":this.radius+"px"}},myComputedStyle(){return delete this.computedStyle.flex,this.computedStyle}},methods:{getType(){let t="CONVERTED";return this.parameters[3]&&(t=this.parameters[3]),t}}};function h(t,b,L,S,y,r){const f=i("label-widget");return a(),n("div",{ref:"container",class:"d-flex flex-row",style:s(r.myComputedStyle)},[o("div",{class:u(`led align-self-center ${this.limitsColor}`),style:s(r.cssProps)},null,6),y.displayLabel?(a(),p(f,{key:0,parameters:r.labelName,settings:t.appliedSettings,style:s(t.computedStyle),"widget-index":1},null,8,["parameters","settings","style"])):m("",!0)],4)}const C=d("default",c(e,[["render",h],["__scopeId","data-v-b106d59f"]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./BarColumn-DHP-zQ4R-
|
1
|
+
System.register(["./BarColumn-DHP-zQ4R-6e0b3b131139b91d2a85.js","vue","./main-c4d1c0ebf45a747bb58d.js","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue-router","single-spa","vuex","vuetify"],function(n,v){"use strict";var a,s,l,r,h,d;return{setters:[i=>{a=i.l},i=>{s=i.createElementBlock,l=i.openBlock,r=i.normalizeStyle,h=i.createStaticVNode},i=>{d=i.d},null,null,null,null,null],execute:function(){const i={mixins:[a],data(){return{width:22,height:120}},computed:{cssProps:function(){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 o(e,t,g,u,b,c){return l(),s("div",{class:"limitsbar",style:r([c.cssProps,e.computedStyle])},[...t[0]||(t[0]=[h('<div class="limitsbar__container" data-v-a4a8f4ab><div class="limitsbar__redlow" data-v-a4a8f4ab></div><div class="limitsbar__redhigh" data-v-a4a8f4ab></div><div class="limitsbar__yellowlow" data-v-a4a8f4ab></div><div class="limitsbar__yellowhigh" data-v-a4a8f4ab></div><div class="limitsbar__greenlow" data-v-a4a8f4ab></div><div class="limitsbar__greenhigh" data-v-a4a8f4ab></div><div class="limitsbar__blue" data-v-a4a8f4ab></div><div class="limitsbar__line" data-v-a4a8f4ab></div><div class="limitsbar__arrow" data-v-a4a8f4ab></div></div>',1)])],4)}const m=n("default",d(i,[["render",o],["__scopeId","data-v-a4a8f4ab"]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./GraphWidget-Cb6Ozf54-
|
1
|
+
System.register(["./GraphWidget-Cb6Ozf54-80fe4556199fdddccbb4.js","./main-c4d1c0ebf45a747bb58d.js","vue","./Graph-BliBYJxD-7f6c9c848aa2ef960d99.js","single-spa","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue-router","vuex","vuetify"],function(p,u){"use strict";var s,n,r,a,o,l,d;return{setters:[t=>{s=t.M},t=>{n=t.d},t=>{r=t.resolveComponent,a=t.createBlock,o=t.openBlock,l=t.normalizeStyle},t=>{d=t.S},null,null,null,null,null],execute:function(){const t={components:{Graph:d},mixins:[s]};function h(e,i,g,v,S,f){const c=r("graph");return o(),a(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-Dd6dRf3R-
|
1
|
+
System.register(["./Layout-Dd6dRf3R-a27f0c2f43cc14c6d815.js","./main-c4d1c0ebf45a747bb58d.js","vue","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue-router","single-spa","vuex","vuetify"],function(f,C){"use strict";var c,o,m,r,n,g,a,l,p,d,y;return{setters:[e=>{c=e.r},e=>{o=e.d,m=e.I},e=>{r=e.createElementBlock,n=e.openBlock,g=e.normalizeStyle,a=e.Fragment,l=e.renderList,p=e.createBlock,d=e.resolveDynamicComponent,y=e.mergeProps},null,null,null,null,null],execute:function(){const e={mixins:[c],computed:{columns(){return parseInt(this.parameters[0])},widgetChunks(){return m.chunk(this.widgets,this.columns)}},created:function(){if(this.parameters[1]){let s=this.parameters[1];this.widgets.forEach(u=>{u.settings.find(i=>i[0]==="MARGIN"||i[0].startsWith("RAW")&&i[1].toUpperCase().includes("MARGIN"))===void 0&&u.settings.push(["MARGIN",s])})}}};function h(s,u,i,R,S,k){return n(),r("table",{style:g(s.computedStyle),role:"presentation"},[(n(!0),r(a,null,l(k.widgetChunks,(v,w)=>(n(),r("tr",{key:"r"+w},[(n(!0),r(a,null,l(v,(t,B)=>(n(),r("td",{key:"c"+B},[(n(),p(d(t.type),y({ref_for:!0},s.listeners,{target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":s.screenValues,"screen-time-zone":s.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))]))),128))]))),128))],4)}const I=f("default",o(e,[["render",h]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-LsyjS7ZS-
|
1
|
+
System.register(["./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue","./main-c4d1c0ebf45a747bb58d.js","vue-router","single-spa","vuex","vuetify"],function(u,p){"use strict";var s,a,l,r,n,i;return{setters:[e=>{s=e.o},e=>{a=e.resolveComponent,l=e.createBlock,r=e.openBlock,n=e.normalizeStyle},e=>{i=e.d},null,null,null,null],execute:function(){const e={mixins:[s],props:{value:{default:null}},data:function(){return{valueId:null,scaleFactor:1,width:150}},computed:{_value:function(){let t=this.value;return t===null&&(t=this.screenValues[this.valueId][0]),parseInt(parseFloat(t)*this.scaleFactor)}},created:function(){if(this.parameters[3]&&(this.scaleFactor=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,m,v,f,_,c){const h=a("rux-progress");return r(),l(h,{value:c._value,class:"progress",style:n(t.computedStyle)},null,8,["value","style"])}const d=u("default",i(e,[["render",o],["__scopeId","data-v-85bc2857"]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-LsyjS7ZS-
|
1
|
+
System.register(["./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue","./main-c4d1c0ebf45a747bb58d.js","vue-router","single-spa","vuex","vuetify"],function(s,p){"use strict";var l,t,n,r,a,o;return{setters:[e=>{l=e.o},e=>{t=e.resolveComponent,n=e.createBlock,r=e.openBlock,a=e.normalizeStyle},e=>{o=e.d},null,null,null,null],execute:function(){const e={props:{value:{type:Number}},mixins:[l],data(){return{label:"Radio"}},created(){this.label=this.parameters[0]}};function u(i,m,c,b,d,S){const v=t("v-radio");return r(),n(v,{"hide-details":"",dense:"",label:d.label,style:a(i.computedStyle),value:c.value},null,8,["label","style","value"])}const y=s("default",o(e,[["render",u]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Layout-Dd6dRf3R-
|
1
|
+
System.register(["./Layout-Dd6dRf3R-a27f0c2f43cc14c6d815.js","vue","./main-c4d1c0ebf45a747bb58d.js","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue-router","single-spa","vuex","vuetify"],function(f,C){"use strict";var a,l,s,r,c,o,i,u,d,m,p,g;return{setters:[e=>{a=e.r},e=>{l=e.resolveComponent,s=e.createBlock,r=e.openBlock,c=e.normalizeStyle,o=e.withCtx,i=e.createElementBlock,u=e.Fragment,d=e.renderList,m=e.resolveDynamicComponent,p=e.mergeProps},e=>{g=e.d},null,null,null,null,null],execute:function(){const e={mixins:[a],data(){return{selectedIndex:0}},created(){this.parameters[0]&&(this.selectedIndex=parseInt(this.parameters[0]))},methods:{selected(){return this.selectedIndex}}};function h(n,v,B,S,y,j){const k=l("v-radio-group");return r(),s(k,{"hide-details":"",density:"compact",modelValue:y.selectedIndex,"onUpdate:modelValue":v[0]||(v[0]=t=>y.selectedIndex=t),style:c(n.computedStyle)},{default:o(()=>[(r(!0),i(u,null,d(n.widgets,(t,x)=>(r(),s(m(t.type),p({ref_for:!0},n.listeners,{value:x,key: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 I=f("default",g(e,[["render",h]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-LsyjS7ZS-
|
1
|
+
System.register(["./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue","./main-c4d1c0ebf45a747bb58d.js","vue-router","single-spa","vuex","vuetify"],function(c,u){"use strict";var r,a,n,h,i,l;return{setters:[t=>{r=t.o},t=>{a=t.createElementBlock,n=t.openBlock,h=t.normalizeStyle,i=t.createElementVNode},t=>{l=t.d},null,null,null,null],execute:function(){const t={mixins:[r],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 parseInt(this.parameters[3])},max(){return parseInt(this.parameters[4])},range(){return this.max-this.min}},created(){const e=this.parameters[5]?this.parameters[5]:"CONVERTED";this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,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(){let e=this.screenValues[this.valueId][0];if(!e)return 0;if(e.raw)return e.raw==="-Infinity"?0:100;const s=(e-this.min)/this.range*100;return s>100?100:s<0?0:s}}};function o(e,s,p,g,_,d){return n(),a("div",{class:"rangebar",style:h([d.cssProps,e.computedStyle])},[...s[0]||(s[0]=[i("div",{class:"rangebar__container"},[i("div",{class:"rangebar__line"}),i("div",{class:"rangebar__arrow"})],-1)])],4)}const m=c("default",l(t,[["render",o],["__scopeId","data-v-34d37e7c"]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-LsyjS7ZS-
|
1
|
+
System.register(["./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue","./main-c4d1c0ebf45a747bb58d.js","vue-router","single-spa","vuex","vuetify"],function(m,p){"use strict";var i,r,c,a,o,u;return{setters:[t=>{i=t.o},t=>{r=t.resolveComponent,c=t.createBlock,a=t.openBlock,o=t.normalizeStyle},t=>{u=t.d},null,null,null,null],execute:function(){const t={mixins:[i],props:{value:{default:null}},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,l){const d=r("rux-monitoring-icon");return a(),c(d,{class:"rux-icon",style:o([l.pointerStyle,e.computedStyle]),icon:e.icon,status:l.status,label:e.label,sublabel:e.subLabel,onClick:l.clickHandler},null,8,["style","icon","status","label","sublabel","onClick"])}const f=m("default",u(t,[["render",h]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Layout-Dd6dRf3R-
|
1
|
+
System.register(["./Layout-Dd6dRf3R-a27f0c2f43cc14c6d815.js","./VerticalWidget-CNtFQv3R-a8b856065029ccb47767.js","vue","./main-c4d1c0ebf45a747bb58d.js","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue-router","single-spa","vuex","vuetify"],function(v,k){"use strict";var l,c,i,s,o,u,m,g,p,d,f;return{setters:[e=>{l=e.r},e=>{c=e.default},e=>{i=e.createElementBlock,s=e.openBlock,o=e.normalizeStyle,u=e.Fragment,m=e.renderList,g=e.createBlock,p=e.resolveDynamicComponent,d=e.mergeProps},e=>{f=e.d},null,null,null,null,null],execute:function(){const e={components:{VerticalWidget:c},mixins:[l],created:function(){if(this.setHeight(this.parameters[0],"px",200),this.parameters[1]){let n=this.parameters[1];this.widgets.forEach(a=>{a.settings.find(r=>r[0]==="MARGIN"||r[0].startsWith("RAW")&&r[1].toUpperCase().includes("MARGIN"))===void 0&&a.settings.push(["MARGIN",n])})}}};function y(n,a,r,w,B,S){return s(),i("div",{ref:"container",style:o(n.computedStyle),class:"overflow-y-auto"},[(s(!0),i(u,null,m(n.widgets,(t,h)=>(s(),g(p(t.type),d({ref_for:!0},n.listeners,{key:h,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],4)}const R=v("default",f(e,[["render",y]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./VWidget-DQGJRgAk-
|
1
|
+
System.register(["./VWidget-DQGJRgAk-1ba292dc524fc27f96eb.js","vue","./main-c4d1c0ebf45a747bb58d.js","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue-router","single-spa","vuex","vuetify"],function(o,d){"use strict";var l,n,r,a,s,i;return{setters:[t=>{l=t.h},t=>{n=t.resolveComponent,r=t.createBlock,a=t.openBlock,s=t.normalizeStyle},t=>{i=t.d},null,null,null,null,null],execute:function(){const t={mixins:[l],props:{value:{default:null}},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=parseFloat(e[1]),this.twoBar=parseFloat(e[2]),this.threeBar=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,m,g,v,B,c){const h=n("v-btn");return a(),r(h,{icon:c.displayedIcon,variant:"text",style:s(e.computedStyle),"aria-label":"Signal Strength",onClick:c.clickHandler},null,8,["icon","style","onClick"])}const p=o("default",i(t,[["render",u]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-LsyjS7ZS-
|
1
|
+
System.register(["./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue","./main-c4d1c0ebf45a747bb58d.js","vue-router","single-spa","vuex","vuetify"],function(l,o){"use strict";var t,s,n,i,r;return{setters:[e=>{t=e.o},e=>{s=e.createElementBlock,n=e.openBlock,i=e.normalizeStyle},e=>{r=e.d},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 u(a,p,d,m,h,v){return n(),s("div",{style:i(a.computedStyle)},null,4)}const c=l("default",r(e,[["render",u]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./GraphWidget-Cb6Ozf54-
|
1
|
+
System.register(["./GraphWidget-Cb6Ozf54-80fe4556199fdddccbb4.js","./main-c4d1c0ebf45a747bb58d.js","vue","./Graph-BliBYJxD-7f6c9c848aa2ef960d99.js","single-spa","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue-router","vuex","vuetify"],function(l,c){"use strict";var i,s,n,r,a,d,o;return{setters:[e=>{i=e.M},e=>{s=e.d},e=>{n=e.resolveComponent,r=e.createBlock,a=e.openBlock,d=e.normalizeStyle},e=>{o=e.S},null,null,null,null,null],execute:function(){const e={components:{Graph:o},mixins:[i],data:function(){return{secondsGraphed:300,pointsSaved:300,pointsGraphed:300,size:{height:30,width:130}}}};function p(t,g,m,v,S,f){const h=n("graph");return a(),r(h,{ref:"graph"+t.id,id:t.id,state:t.state,"selected-graph-id":t.id,startTime: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","startTime","seconds-graphed","points-saved","points-graphed","initial-items","height","width","style"])}const u=l("default",s(e,[["render",p]]))}}});
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Layout-Dd6dRf3R-
|
1
|
+
System.register(["./Layout-Dd6dRf3R-a27f0c2f43cc14c6d815.js","vue","./main-c4d1c0ebf45a747bb58d.js","./Widget-LsyjS7ZS-2996cffa3dfdd02c8aff.js","vue-router","single-spa","vuex","vuetify"],function(k,_){"use strict";var p,l,s,r,g,v,i,u,c,o,y,f,w,b,V;return{setters:[e=>{p=e.r},e=>{l=e.resolveComponent,s=e.createElementBlock,r=e.openBlock,g=e.createVNode,v=e.normalizeStyle,i=e.withCtx,u=e.Fragment,c=e.renderList,o=e.createBlock,y=e.createTextVNode,f=e.toDisplayString,w=e.resolveDynamicComponent,b=e.mergeProps},e=>{V=e.d},null,null,null,null,null],execute:function(){const e={mixins:[p],data:function(){return{curTab:null}},watch:{curTab:function(){this.$emit("min-max-screen")}}};function S(t,m,D,L,h,j){const T=l("v-tab"),x=l("v-tabs"),B=l("v-window-item"),C=l("v-window");return r(),s("div",null,[g(x,{modelValue:t.curTab,"onUpdate:modelValue":m[0]||(m[0]=a=>t.curTab=a),style:v(t.computedStyle)},{default:i(()=>[(r(!0),s(u,null,c(t.widgets,(a,d)=>(r(),o(T,{key:d},{default:i(()=>[y(f(a.parameters[0]),1)]),_:2},1024))),128))]),_:1},8,["modelValue","style"]),g(C,{modelValue:t.curTab,"onUpdate:modelValue":m[1]||(m[1]=a=>t.curTab=a)},{default:i(()=>[(r(!0),s(u,null,c(t.widgets,(a,d)=>(r(),o(B,{key:d},{default:i(()=>[(r(!0),s(u,null,c(a.widgets,(n,N)=>(r(),o(w(n.type),b({ref_for:!0},t.listeners,{key:`${d}-${N}`,target:n.target,parameters:n.parameters,settings:n.settings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,widgets:n.widgets,name:n.name,line:n.line,"line-number":n.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))]),_:2},1024))),128))]),_:1},8,["modelValue"])])}const z=k("default",V(e,[["render",S]]))}}});
|