openc3-cosmos-tool-cmdtlmserver 6.0.2 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/cmdtlmserver/{ArrayWidget-DBpEoQ1y-84132d15e020efa0adf1.js → ArrayWidget-BxEO5hEG-89ca0a2e546d77657dd9.js} +2 -2
- data/tools/cmdtlmserver/ArrayplotWidget-B_VPoV4v-7b820a5e88bad1425d1c.js +1 -0
- data/tools/cmdtlmserver/{BarColumn-B6tCmNJm-6eff86fdc1e74ef6f1c9.js → BarColumn-C9dkpg2O-7723dc0faa77b237d7f9.js} +1 -1
- data/tools/cmdtlmserver/BlockWidget-CuefOin6-edc80607b7a1d528f5e3.js +2 -0
- data/tools/cmdtlmserver/{ButtonWidget-CHrHS_Bw-70e879d3bbdf933eb10a.js → ButtonWidget-B6HM0Doo-ce7e70aebc6509184e26.js} +2 -2
- data/tools/cmdtlmserver/CanvasWidget-DZQGG-yQ-6864bab874dccb2db67c.js +1 -0
- data/tools/cmdtlmserver/CanvasdotWidget-6wuCSnw_-e0f154be630a0c8394bc.js +1 -0
- data/tools/cmdtlmserver/{CanvasimageWidget-BrYlPQCf-c9b4b7ca9e5b29f12d09.js → CanvasimageWidget-mhcPpAuN-441a8a40b76b47f0e9dd.js} +1 -1
- data/tools/cmdtlmserver/{CanvasimagevalueWidget-HnEOXmZy-5583c55cf5bbdfadba5d.js → CanvasimagevalueWidget-Cx-dH8Gc-c505d808df433d5fd979.js} +1 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-CQZCeohU-85c23c2118739625a3a1.js +1 -0
- data/tools/cmdtlmserver/{CanvaslabelvalueWidget-0zRDJav3-293602564dbb12cd36fd.js → CanvaslabelvalueWidget-CwmYDCjr-aca636f4d86f04fc6120.js} +1 -1
- data/tools/cmdtlmserver/CanvaslineWidget-nTP3fJB4-78e605105cd357f98670.js +1 -0
- data/tools/cmdtlmserver/CanvaslinevalueWidget-C3sJnjLQ-c20af62fc101f2e6d9e7.js +1 -0
- data/tools/cmdtlmserver/CheckbuttonWidget-5-8YDsQL-e19c2b901eae43feeb7c.js +1 -0
- data/tools/cmdtlmserver/{CmdPacketsTab-1174eeae24f567559f43.js → CmdPacketsTab-543bcdcded38905596c1.js} +1 -1
- data/tools/cmdtlmserver/{CmdTlmServer-909a975f2c448b6dfdd9.js → CmdTlmServer-c5e0c27cd668cb4acdd2.js} +2 -2
- data/tools/cmdtlmserver/{ComboboxWidget-BykAAoxH-b67d237b4347e57c1776.js → ComboboxWidget-DzBL8h9f-d1afd3d09dbb57142156.js} +1 -1
- data/tools/cmdtlmserver/{DateWidget-FtYD86xW-eee42f7093a7d5232e7e.js → DateWidget-CW7Od7lB-14c75cebe909660c92a6.js} +1 -1
- data/tools/cmdtlmserver/{DetailsDialog-DiVcC3Fg-926dc00ae99f202f7bbb.js → DetailsDialog-BvbziA7Y-a6d191d4c24ae44227f5.js} +1 -1
- data/tools/cmdtlmserver/{DynamicWidget-m9EliUR2-b792f7d3791995de4557.js → DynamicWidget-gFSYxzvT-5b7c1448f53e03ca3e91.js} +1 -1
- data/tools/cmdtlmserver/{FormatvalueWidget-OykwwCrw-ec440c1e59a54a11e1c0.js → FormatvalueWidget-CGpnTqVH-5a4cac76beeee76398b5.js} +1 -1
- data/tools/cmdtlmserver/Graph-3rkhFP3G-b8db0cdb9ecf80ac5155.js +1 -0
- data/tools/cmdtlmserver/GraphWidget-Dycey-mj-d4aa575ef98087670b47.js +1 -0
- data/tools/cmdtlmserver/{HorizontalWidget-B7YdcFVN-1adf1fbb47940ffc2bbb.js → HorizontalWidget-D31NRWy5-567abe97366db941d1d0.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalboxWidget-D-kCNwI3-d5280f31e632d3a19530.js → HorizontalboxWidget-Br8dSVHD-7c9a14b981c6d7631921.js} +1 -1
- data/tools/cmdtlmserver/HorizontallineWidget-CbxREBYI-cd6486b6aeb6fbdd102b.js +1 -0
- data/tools/cmdtlmserver/IframeWidget-Ctj8OIcG-8eb7274680df97862be9.js +1 -0
- data/tools/cmdtlmserver/ImageLoader-BrNrCBvi-c56dfbfda95fe546284c.js +1 -0
- data/tools/cmdtlmserver/{ImageviewerWidget-B4HbUIfR-cc56d18d351a216f45dc.js → ImageviewerWidget-XrsqxmLo-e5e72a6a85a49cb007ad.js} +1 -1
- data/tools/cmdtlmserver/{InterfacesTab-1a220be708030742672f.js → InterfacesTab-5fe4b0f137ffde75f928.js} +1 -1
- data/tools/cmdtlmserver/{LabelWidget-D1JhQAzR-637ca102152e7cb0159f.js → LabelWidget-t7I87dp7-c8e7d564e904105dba56.js} +1 -1
- data/tools/cmdtlmserver/{LabelledWidget-C2VGJ5OJ-63324f13b32cbd3d1e09.js → LabelledWidget-C7TDf92M-e5c2e34c391a4721e565.js} +1 -1
- data/tools/cmdtlmserver/{LabelprogressbarWidget-DN0cAeLK-9414ccaa3c0bd5213eaf.js → LabelprogressbarWidget-wwLURt1u-c12f252a4577e90e8ba4.js} +1 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-B3awLUyP-dafc251f2886e5de7219.js +1 -0
- data/tools/cmdtlmserver/LabelvalueWidget-Zx_yHCtl-761beda3ba9005900e83.js +1 -0
- data/tools/cmdtlmserver/{LabelvaluedescWidget-DtJwggDu-297f5e4f5cdd4e997a84.js → LabelvaluedescWidget-BBSBh4vI-7930a82f5e07d7ac49ee.js} +1 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-CZueHYWG-24b90c24e80fd1a209b0.js +1 -0
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-BTvzyQMq-8ef478f7a9ed47139a9b.js +1 -0
- data/tools/cmdtlmserver/{LabelvaluerangebarWidget-DCJ42bmf-951b68255fe130b397b4.js → LabelvaluerangebarWidget-BhYTBgDq-f7d7ee8128f9058ef8c3.js} +1 -1
- data/tools/cmdtlmserver/{Layout-D4YBjuWs-d949f0668cb092f7f268.js → Layout-Bh7VzCZd-dcb9c3641454e6c67c47.js} +1 -1
- data/tools/cmdtlmserver/LedWidget-CxJjJBBS-71046e57b3786c5a7889.js +1 -0
- data/tools/cmdtlmserver/{LimitsbarWidget-D-wfz_St-71b4065ff350d86e47f1.js → LimitsbarWidget-Djui0IpK-c1dec25b5074f46c266b.js} +1 -1
- data/tools/cmdtlmserver/LimitscolorWidget-DdmvKzmx-6cf2a6f3dc4493ea0ef5.js +1 -0
- data/tools/cmdtlmserver/{LimitscolumnWidget-Dt5ce4hN-4bf9236958883e049ac5.js → LimitscolumnWidget-Cc19IEjq-bc58d443d9a79a05718e.js} +1 -1
- data/tools/cmdtlmserver/LinegraphWidget-BtieJxeL-be15f3c0e6a500ecc463.js +1 -0
- data/tools/cmdtlmserver/{MatrixbycolumnsWidget-wLx4NvXV-789df70ba148ac45d935.js → MatrixbycolumnsWidget-DnExVRF8-4a69d3f7ece972d3f5e2.js} +1 -1
- data/tools/cmdtlmserver/{ProgressbarWidget-B7l0BBiX-28bb09016921e507b157.js → ProgressbarWidget-DIfqhHRE-aebd8d5a762deda63d9c.js} +1 -1
- data/tools/cmdtlmserver/RadiobuttonWidget-QzIkNP7m-300018a2418b2cbe7f09.js +1 -0
- data/tools/cmdtlmserver/{RadiogroupWidget-Busjqikr-fdbbff7df3b152de9174.js → RadiogroupWidget-Ci9sCX39-db829f94bee5140bb9cc.js} +1 -1
- data/tools/cmdtlmserver/{RangebarWidget-DbYrwEfC-672c02ff8fc7508bbfe0.js → RangebarWidget-CN0YuHqy-9b49a64ed4d1a23e9fa2.js} +1 -1
- data/tools/cmdtlmserver/{RawDialog-3ba881626e2141cf6261.js → RawDialog-2b725610c629b9879bac.js} +3 -3
- data/tools/cmdtlmserver/{RollupWidget-rKxLXuCv-84804fdfa2a67e0c586f.js → RollupWidget-y4jBtJB2-2fa7012d1e3c1cc9a765.js} +1 -1
- data/tools/cmdtlmserver/{RoutersTab-821ac863905d6fc1f0f3.js → RoutersTab-97a4ce9897517bb6bde4.js} +1 -1
- data/tools/cmdtlmserver/{ScrollwindowWidget-D4NKIzQO-e7fc825a7640800925b3.js → ScrollwindowWidget-CBzYk4Y3-48abadd8da946b6c65a5.js} +1 -1
- data/tools/cmdtlmserver/{SignalWidget-h-oivReC-a52944079f1106d5b9e8.js → SignalWidget-DQ5Uc2uV-864549b10d055bc6c168.js} +1 -1
- data/tools/cmdtlmserver/SpacerWidget-6rsc_dSM-4c67a06ee2036a93075a.js +1 -0
- data/tools/cmdtlmserver/SparklineWidget-CZtvu2ss-a652a442fd625a97a9b0.js +1 -0
- data/tools/cmdtlmserver/{StatusTab-4f20ea8483d65cd2f43f.js → StatusTab-ebf6453fac33bf59a564.js} +1 -1
- data/tools/cmdtlmserver/TabbookWidget-DNALU0jl-ae79a3b9beef34b7efde.js +1 -0
- data/tools/cmdtlmserver/{TargetsTab-45e297b994fc5f0d21d0.js → TargetsTab-ae3381cde4d9b22a9272.js} +1 -1
- data/tools/cmdtlmserver/TextboxWidget-5hqPj74D-292f2786815b2027f6e6.js +1 -0
- data/tools/cmdtlmserver/{TextfieldWidget-aVRdXRsT-6158511014a61f90ddea.js → TextfieldWidget-Df0ANSiU-a45885e9c031fa702946.js} +1 -1
- data/tools/cmdtlmserver/TimeWidget-C6XQMUG2-fa62efc8fea7b7a08ccc.js +1 -0
- data/tools/cmdtlmserver/TitleWidget-B9SPUlbW-55092f64413a6ce5551d.js +1 -0
- data/tools/cmdtlmserver/{TlmPacketsTab-b9aab218beb2e197b269.js → TlmPacketsTab-60429ad30f45f45c7ac9.js} +1 -1
- data/tools/cmdtlmserver/{Updater-6f453064b0e1f1f5fb0e.js → Updater-82fa1a354a9721098906.js} +1 -1
- data/tools/cmdtlmserver/VWidget-C4spAawK-e7dee3c34a6d790327ec.js +1 -0
- data/tools/cmdtlmserver/ValueWidget-D4RrYVEK-c90078a7e58747e8aa55.js +1 -0
- data/tools/cmdtlmserver/ValuelimitsbarWidget-Bc9_Vj_f-b088c7ef6cd4bf20f55e.js +1 -0
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-DHKIL7sf-72a766dafcef2f6c4767.js +1 -0
- data/tools/cmdtlmserver/ValuerangebarWidget-CecQRIok-5cef01f82763ccf9350a.js +1 -0
- data/tools/cmdtlmserver/{VerticalWidget-DziyURNu-750d852c42a2d5f2f703.js → VerticalWidget-D8jUFxjS-dc1f1f22baae1b1bf9ee.js} +1 -1
- data/tools/cmdtlmserver/VerticalboxWidget-B4eGUSYH-24dd29d0e54de2ba61eb.js +1 -0
- data/tools/cmdtlmserver/{Widget-C7ms_xDE-bce61b3f1521054f57a4.js → Widget-fRCERxGf-6cf6e886d2d5ee76cfc6.js} +1 -1
- data/tools/cmdtlmserver/main-4bad43bda3e8a8483ba9.js +1423 -0
- data/tools/cmdtlmserver/main.js +1 -1
- data/tools/cmdtlmserver/services-6c036365da68dd4327ff.js +7 -0
- metadata +78 -76
- data/tools/cmdtlmserver/BlockWidget-Bmi0UcUW-c8722bb58622a8814b0b.js +0 -2
- data/tools/cmdtlmserver/CanvasWidget-BqdyLbQz-184dc2d3c4b6c7ab6bf0.js +0 -1
- data/tools/cmdtlmserver/CanvasdotWidget-YYwca104-4fffaf81ed40b0efed4b.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-BfMHNei--81068b9cfc5ea4370382.js +0 -1
- data/tools/cmdtlmserver/CanvaslineWidget-BmOwJP_G-b2f20a0461abbe1c4aec.js +0 -1
- data/tools/cmdtlmserver/CanvaslinevalueWidget-H3L1aUKM-6eb08878d7d5720ce613.js +0 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-BnT9X7wE-5f6d8077e8d80b62862c.js +0 -1
- data/tools/cmdtlmserver/GraphWidget-BohHW-97-79648f0f5f760947a337.js +0 -1
- data/tools/cmdtlmserver/HorizontallineWidget-BdlNB951-97bac9ec958ae9185006.js +0 -1
- data/tools/cmdtlmserver/IframeWidget-0C7GYEVc-7d9db206f561f13924bb.js +0 -1
- data/tools/cmdtlmserver/ImageLoader-y6fAZe9P-32c5109a53a2e67d4546.js +0 -1
- data/tools/cmdtlmserver/LabelsparklineWidget--sxBENxs-9bbfaf33dcea3a9a4163.js +0 -1
- data/tools/cmdtlmserver/LabelvalueWidget-BWpP5KX6-e70143eae4825e3ca295.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-Bj6UVK-5-d0e6cb1105035131b388.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-BVcEEcUx-5ffbd14ed49f43d1a770.js +0 -1
- data/tools/cmdtlmserver/LedWidget-hN9JHxjr-d3630538860ea110829a.js +0 -1
- data/tools/cmdtlmserver/LimitscolorWidget-B0AVGdkz-8af3823cc815001ee996.js +0 -1
- data/tools/cmdtlmserver/LinegraphWidget-CTjtvtPd-3472bcb2292fccce0780.js +0 -1
- data/tools/cmdtlmserver/RadiobuttonWidget-B032jKIw-751b0da1a0eac1f428eb.js +0 -1
- data/tools/cmdtlmserver/SpacerWidget-BSy9eOlB-d21cb40c89cf46239df2.js +0 -1
- data/tools/cmdtlmserver/SparklineWidget-C9vdxar--5fe9233f121a11766f79.js +0 -1
- data/tools/cmdtlmserver/TabbookWidget-DTFTKURm-8a001c50117950e4dff3.js +0 -1
- data/tools/cmdtlmserver/TextboxWidget-BZyYHmBq-69732416c05b62947a52.js +0 -1
- data/tools/cmdtlmserver/TimeWidget-BE2rtMxg-26adb974402be26d1aaf.js +0 -1
- data/tools/cmdtlmserver/TitleWidget-BB29MZb2-2f453a7f1f364727debd.js +0 -1
- data/tools/cmdtlmserver/VWidget-CGdM4sTw-a078921174583b0d9185.js +0 -1
- data/tools/cmdtlmserver/ValueWidget-h3905woQ-9b7964d625c1c99b145b.js +0 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-LMXYjWtS-c85b0d0fb89533be596b.js +0 -1
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-gA3ZcfAT-faa7e73a393653ce138d.js +0 -1
- data/tools/cmdtlmserver/ValuerangebarWidget-DwZ9KQ0O-1b288730ccf9a87d6d8f.js +0 -1
- data/tools/cmdtlmserver/VerticalboxWidget-OcoZBsFU-b0a8579fcda69ee76cfc.js +0 -1
- data/tools/cmdtlmserver/main-fcf5991e219cb9464cd3.js +0 -1422
- data/tools/cmdtlmserver/services-d6821e5ba7167450844f.js +0 -6
data/tools/cmdtlmserver/main.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
System.register(["vue","./main-
|
1
|
+
System.register(["vue","./main-4bad43bda3e8a8483ba9.js","vue-router","single-spa","vuex","vuetify"],function(t,e){"use strict";return{setters:[null,u=>{t({bootstrap:u.b,mount:u.m,unmount:u.u})},null,null,null,null],execute:function(){}}});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
System.register([],function(we,Vn){"use strict";return{execute:function(){var Qt=Object.defineProperty,Yt=(t,e,r)=>e in t?Qt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,se=(t,e,r)=>Yt(t,typeof e!="symbol"?e+"":e,r);function Ve(t,e){return function(){return t.apply(e,arguments)}}const{toString:Zt}=Object.prototype,{getPrototypeOf:ve}=Object,ne=(t=>e=>{const r=Zt.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),k=t=>(t=t.toLowerCase(),e=>ne(e)===t),ie=t=>e=>typeof e===t,{isArray:J}=Array,G=ie("undefined");function er(t){return t!==null&&!G(t)&&t.constructor!==null&&!G(t.constructor)&&T(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ke=k("ArrayBuffer");function tr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ke(t.buffer),e}const rr=ie("string"),T=ie("function"),Ge=ie("number"),oe=t=>t!==null&&typeof t=="object",sr=t=>t===!0||t===!1,ce=t=>{if(ne(t)!=="object")return!1;const e=ve(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},nr=k("Date"),ir=k("File"),or=k("Blob"),cr=k("FileList"),ar=t=>oe(t)&&T(t.pipe),lr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||T(t.append)&&((e=ne(t))==="formdata"||e==="object"&&T(t.toString)&&t.toString()==="[object FormData]"))},ur=k("URLSearchParams"),[hr,dr,fr,pr]=["ReadableStream","Request","Response","Headers"].map(k),gr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function X(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let s,n;if(typeof t!="object"&&(t=[t]),J(t))for(s=0,n=t.length;s<n;s++)e.call(null,t[s],s,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let c;for(s=0;s<o;s++)c=i[s],e.call(null,t[c],c,t)}}function Xe(t,e){e=e.toLowerCase();const r=Object.keys(t);let s=r.length,n;for(;s-- >0;)if(n=r[s],e===n.toLowerCase())return n;return null}const $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qe=t=>!G(t)&&t!==$;function Se(){const{caseless:t}=Qe(this)&&this||{},e={},r=(s,n)=>{const i=t&&Xe(e,n)||n;ce(e[i])&&ce(s)?e[i]=Se(e[i],s):ce(s)?e[i]=Se({},s):J(s)?e[i]=s.slice():e[i]=s};for(let s=0,n=arguments.length;s<n;s++)arguments[s]&&X(arguments[s],r);return e}const mr=(t,e,r,{allOwnKeys:s}={})=>(X(e,(n,i)=>{r&&T(n)?t[i]=Ve(n,r):t[i]=n},{allOwnKeys:s}),t),br=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),yr=(t,e,r,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},_r=(t,e,r,s)=>{let n,i,o;const c={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),i=n.length;i-- >0;)o=n[i],(!s||s(o,t,e))&&!c[o]&&(e[o]=t[o],c[o]=!0);t=r!==!1&&ve(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},wr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const s=t.indexOf(e,r);return s!==-1&&s===r},vr=t=>{if(!t)return null;if(J(t))return t;let e=t.length;if(!Ge(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Sr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ve(Uint8Array)),Er=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const n=s.value;e.call(t,n[0],n[1])}},xr=(t,e)=>{let r;const s=[];for(;(r=t.exec(e))!==null;)s.push(r);return s},Or=k("HTMLFormElement"),Rr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,r,s){return r.toUpperCase()+s}),Ye=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Ar=k("RegExp"),Ze=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),s={};X(r,(n,i)=>{let o;(o=e(n,i,t))!==!1&&(s[i]=o||n)}),Object.defineProperties(t,s)},Tr=t=>{Ze(t,(e,r)=>{if(T(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=t[r];if(T(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Cr=(t,e)=>{const r={},s=n=>{n.forEach(i=>{r[i]=!0})};return J(t)?s(t):s(String(t).split(e)),r},kr=()=>{},Pr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Ee="abcdefghijklmnopqrstuvwxyz",et="0123456789",tt={DIGIT:et,ALPHA:Ee,ALPHA_DIGIT:Ee+Ee.toUpperCase()+et},jr=(t=16,e=tt.ALPHA_DIGIT)=>{let r="";const{length:s}=e;for(;t--;)r+=e[Math.random()*s|0];return r};function Ir(t){return!!(t&&T(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Nr=t=>{const e=new Array(10),r=(s,n)=>{if(oe(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[n]=s;const i=J(s)?[]:{};return X(s,(o,c)=>{const l=r(o,n+1);!G(l)&&(i[c]=l)}),e[n]=void 0,i}}return s};return r(t,0)},Lr=k("AsyncFunction"),Ur=t=>t&&(oe(t)||T(t))&&T(t.then)&&T(t.catch),rt=((t,e)=>t?setImmediate:e?((r,s)=>($.addEventListener("message",({source:n,data:i})=>{n===$&&i===r&&s.length&&s.shift()()},!1),n=>{s.push(n),$.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",T($.postMessage)),Fr=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||rt,a={isArray:J,isArrayBuffer:Ke,isBuffer:er,isFormData:lr,isArrayBufferView:tr,isString:rr,isNumber:Ge,isBoolean:sr,isObject:oe,isPlainObject:ce,isReadableStream:hr,isRequest:dr,isResponse:fr,isHeaders:pr,isUndefined:G,isDate:nr,isFile:ir,isBlob:or,isRegExp:Ar,isFunction:T,isStream:ar,isURLSearchParams:ur,isTypedArray:Sr,isFileList:cr,forEach:X,merge:Se,extend:mr,trim:gr,stripBOM:br,inherits:yr,toFlatObject:_r,kindOf:ne,kindOfTest:k,endsWith:wr,toArray:vr,forEachEntry:Er,matchAll:xr,isHTMLForm:Or,hasOwnProperty:Ye,hasOwnProp:Ye,reduceDescriptors:Ze,freezeMethods:Tr,toObjectSet:Cr,toCamelCase:Rr,noop:kr,toFiniteNumber:Pr,findKey:Xe,global:$,isContextDefined:Qe,ALPHABET:tt,generateString:jr,isSpecCompliantForm:Ir,toJSONObject:Nr,isAsyncFn:Lr,isThenable:Ur,setImmediate:rt,asap:Fr};function m(t,e,r,s,n){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),r&&(this.config=r),s&&(this.request=s),n&&(this.response=n,this.status=n.status?n.status:null)}a.inherits(m,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:a.toJSONObject(this.config),code:this.code,status:this.status}}});const st=m.prototype,nt={};["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=>{nt[t]={value:t}}),Object.defineProperties(m,nt),Object.defineProperty(st,"isAxiosError",{value:!0}),m.from=(t,e,r,s,n,i)=>{const o=Object.create(st);return a.toFlatObject(t,o,function(c){return c!==Error.prototype},c=>c!=="isAxiosError"),m.call(o,t.message,e,r,s,n),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const $r=null;function xe(t){return a.isPlainObject(t)||a.isArray(t)}function it(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function ot(t,e,r){return t?t.concat(e).map(function(s,n){return s=it(s),!r&&n?"["+s+"]":s}).join(r?".":""):e}function qr(t){return a.isArray(t)&&!t.some(xe)}const Dr=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ae(t,e,r){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,y){return!a.isUndefined(y[d])});const s=r.metaTokens,n=r.visitor||u,i=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(n))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(!c&&a.isBlob(d))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?c&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function u(d,y,f){let S=d;if(d&&!f&&typeof d=="object"){if(a.endsWith(y,"{}"))y=s?y:y.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&qr(d)||(a.isFileList(d)||a.endsWith(y,"[]"))&&(S=a.toArray(d)))return y=it(y),S.forEach(function(w,_){!(a.isUndefined(w)||w===null)&&e.append(o===!0?ot([y],_,i):o===null?y:y+"[]",l(w))}),!1}return xe(d)?!0:(e.append(ot(f,y,i),l(d)),!1)}const h=[],p=Object.assign(Dr,{defaultVisitor:u,convertValue:l,isVisitable:xe});function g(d,y){if(!a.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(d),a.forEach(d,function(f,S){(!(a.isUndefined(f)||f===null)&&n.call(e,f,a.isString(S)?S.trim():S,y,p))===!0&&g(f,y?y.concat(S):[S])}),h.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return g(t),e}function ct(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Oe(t,e){this._pairs=[],t&&ae(t,this,e)}const at=Oe.prototype;at.append=function(t,e){this._pairs.push([t,e])},at.toString=function(t){const e=t?function(r){return t.call(this,r,ct)}:ct;return this._pairs.map(function(r){return e(r[0])+"="+e(r[1])},"").join("&")};function Br(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lt(t,e,r){if(!e)return t;const s=r&&r.encode||Br;a.isFunction(r)&&(r={serialize:r});const n=r&&r.serialize;let i;if(n?i=n(e,r):i=a.isURLSearchParams(e)?e.toString():new Oe(e,r).toString(s),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class ut{constructor(){this.handlers=[]}use(e,r,s){return this.handlers.push({fulfilled:e,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(r){r!==null&&e(r)})}}const ht={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mr=typeof URLSearchParams<"u"?URLSearchParams:Oe,zr=typeof FormData<"u"?FormData:null,Hr=typeof Blob<"u"?Blob:null,Jr={isBrowser:!0,classes:{URLSearchParams:Mr,FormData:zr,Blob:Hr},protocols:["http","https","file","blob","url","data"]},Re=typeof window<"u"&&typeof document<"u",Ae=typeof navigator=="object"&&navigator||void 0,Wr=Re&&(!Ae||["ReactNative","NativeScript","NS"].indexOf(Ae.product)<0),Vr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Kr=Re&&window.location.href||"http://localhost",Gr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Re,hasStandardBrowserEnv:Wr,hasStandardBrowserWebWorkerEnv:Vr,navigator:Ae,origin:Kr},Symbol.toStringTag,{value:"Module"})),x={...Gr,...Jr};function Xr(t,e){return ae(t,new x.classes.URLSearchParams,Object.assign({visitor:function(r,s,n,i){return x.isNode&&a.isBuffer(r)?(this.append(s,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Qr(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Yr(t){const e={},r=Object.keys(t);let s;const n=r.length;let i;for(s=0;s<n;s++)i=r[s],e[i]=t[i];return e}function dt(t){function e(r,s,n,i){let o=r[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),l=i>=r.length;return o=!o&&a.isArray(n)?n.length:o,l?(a.hasOwnProp(n,o)?n[o]=[n[o],s]:n[o]=s,!c):((!n[o]||!a.isObject(n[o]))&&(n[o]=[]),e(r,s,n[o],i)&&a.isArray(n[o])&&(n[o]=Yr(n[o])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const r={};return a.forEachEntry(t,(s,n)=>{e(Qr(s),n,r,0)}),r}return null}function Zr(t,e,r){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(t)}const Q={transitional:ht,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",s=r.indexOf("application/json")>-1,n=a.isObject(t);if(n&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(dt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(n){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Xr(t,this.formSerializer).toString();if((i=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return ae(i?{"files[]":t}:t,o&&new o,this.formSerializer)}}return n||s?(e.setContentType("application/json",!1),Zr(t)):t}],transformResponse:[function(t){const e=this.transitional||Q.transitional,r=e&&e.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const n=!(e&&e.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(i){if(n)throw i.name==="SyntaxError"?m.from(i,m.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{Q.headers[t]={}});const es=a.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"]),ts=t=>{const e={};let r,s,n;return t&&t.split(`
|
2
|
+
`).forEach(function(i){n=i.indexOf(":"),r=i.substring(0,n).trim().toLowerCase(),s=i.substring(n+1).trim(),!(!r||e[r]&&es[r])&&(r==="set-cookie"?e[r]?e[r].push(s):e[r]=[s]:e[r]=e[r]?e[r]+", "+s:s)}),e},ft=Symbol("internals");function Y(t){return t&&String(t).trim().toLowerCase()}function le(t){return t===!1||t==null?t:a.isArray(t)?t.map(le):String(t)}function rs(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)e[s[1]]=s[2];return e}const ss=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Te(t,e,r,s,n){if(a.isFunction(s))return s.call(this,e,r);if(n&&(e=r),!!a.isString(e)){if(a.isString(s))return e.indexOf(s)!==-1;if(a.isRegExp(s))return s.test(e)}}function ns(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,s)=>r.toUpperCase()+s)}function is(t,e){const r=a.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+r,{value:function(n,i,o){return this[s].call(this,e,n,i,o)},configurable:!0})})}let R=class{constructor(t){t&&this.set(t)}set(t,e,r){const s=this;function n(o,c,l){const u=Y(c);if(!u)throw new Error("header name must be a non-empty string");const h=a.findKey(s,u);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||c]=le(o))}const i=(o,c)=>a.forEach(o,(l,u)=>n(l,u,c));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(a.isString(t)&&(t=t.trim())&&!ss(t))i(ts(t),e);else if(a.isHeaders(t))for(const[o,c]of t.entries())n(c,o,r);else t!=null&&n(e,t,r);return this}get(t,e){if(t=Y(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!e)return s;if(e===!0)return rs(s);if(a.isFunction(e))return e.call(this,s,r);if(a.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Y(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||Te(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let s=!1;function n(i){if(i=Y(i),i){const o=a.findKey(r,i);o&&(!e||Te(r,r[o],o,e))&&(delete r[o],s=!0)}}return a.isArray(t)?t.forEach(n):n(t),s}clear(t){const e=Object.keys(this);let r=e.length,s=!1;for(;r--;){const n=e[r];(!t||Te(this,this[n],n,t,!0))&&(delete this[n],s=!0)}return s}normalize(t){const e=this,r={};return a.forEach(this,(s,n)=>{const i=a.findKey(r,n);if(i){e[i]=le(s),delete e[n];return}const o=t?ns(n):String(n).trim();o!==n&&delete e[n],e[o]=le(s),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(e[s]=t&&a.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
3
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(s=>r.set(s)),r}static accessor(t){const e=(this[ft]=this[ft]={accessors:{}}).accessors,r=this.prototype;function s(n){const i=Y(n);e[i]||(is(r,n),e[i]=!0)}return a.isArray(t)?t.forEach(s):s(t),this}};R.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(R.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[r]=s}}}),a.freezeMethods(R);function Ce(t,e){const r=this||Q,s=e||r,n=R.from(s.headers);let i=s.data;return a.forEach(t,function(o){i=o.call(r,i,n.normalize(),e?e.status:void 0)}),n.normalize(),i}function pt(t){return!!(t&&t.__CANCEL__)}function W(t,e,r){m.call(this,t??"canceled",m.ERR_CANCELED,e,r),this.name="CanceledError"}a.inherits(W,m,{__CANCEL__:!0});function gt(t,e,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):e(new m("Request failed with status code "+r.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function os(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function cs(t,e){t=t||10;const r=new Array(t),s=new Array(t);let n=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),u=s[i];o||(o=l),r[n]=c,s[n]=l;let h=i,p=0;for(;h!==n;)p+=r[h++],h=h%t;if(n=(n+1)%t,n===i&&(i=(i+1)%t),l-o<e)return;const g=u&&l-u;return g?Math.round(p*1e3/g):void 0}}function as(t,e){let r=0,s=1e3/e,n,i;const o=(c,l=Date.now())=>{r=l,n=null,i&&(clearTimeout(i),i=null),t.apply(null,c)};return[(...c)=>{const l=Date.now(),u=l-r;u>=s?o(c,l):(n=c,i||(i=setTimeout(()=>{i=null,o(n)},s-u)))},()=>n&&o(n)]}const ue=(t,e,r=3)=>{let s=0;const n=cs(50,250);return as(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,l=o-s,u=n(l),h=o<=c;s=o;const p={loaded:o,total:c,progress:c?o/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&h?(c-o)/u:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(p)},r)},mt=(t,e)=>{const r=t!=null;return[s=>e[0]({lengthComputable:r,total:t,loaded:s}),e[1]]},bt=t=>(...e)=>a.asap(()=>t(...e)),ls=x.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,x.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(x.origin),x.navigator&&/(msie|trident)/i.test(x.navigator.userAgent)):()=>!0,us=x.hasStandardBrowserEnv?{write(t,e,r,s,n,i){const o=[t+"="+encodeURIComponent(e)];a.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),a.isString(s)&&o.push("path="+s),a.isString(n)&&o.push("domain="+n),i===!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 hs(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ds(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function yt(t,e){return t&&!hs(e)?ds(t,e):e}const _t=t=>t instanceof R?{...t}:t;function q(t,e){e=e||{};const r={};function s(u,h,p,g){return a.isPlainObject(u)&&a.isPlainObject(h)?a.merge.call({caseless:g},u,h):a.isPlainObject(h)?a.merge({},h):a.isArray(h)?h.slice():h}function n(u,h,p,g){if(a.isUndefined(h)){if(!a.isUndefined(u))return s(void 0,u,p,g)}else return s(u,h,p,g)}function i(u,h){if(!a.isUndefined(h))return s(void 0,h)}function o(u,h){if(a.isUndefined(h)){if(!a.isUndefined(u))return s(void 0,u)}else return s(void 0,h)}function c(u,h,p){if(p in e)return s(u,h);if(p in t)return s(void 0,u)}const l={url:i,method:i,data:i,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:c,headers:(u,h,p)=>n(_t(u),_t(h),p,!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(u){const h=l[u]||n,p=h(t[u],e[u],u);a.isUndefined(p)&&h!==c||(r[u]=p)}),r}const wt=t=>{const e=q({},t);let{data:r,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:i,headers:o,auth:c}=e;e.headers=o=R.from(o),e.url=lt(yt(e.baseURL,e.url),t.params,t.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(a.isFormData(r)){if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...h]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...h].join("; "))}}if(x.hasStandardBrowserEnv&&(s&&a.isFunction(s)&&(s=s(e)),s||s!==!1&&ls(e.url))){const u=n&&i&&us.read(i);u&&o.set(n,u)}return e},fs=typeof XMLHttpRequest<"u",ps=fs&&function(t){return new Promise(function(e,r){const s=wt(t);let n=s.data;const i=R.from(s.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:l}=s,u,h,p,g,d;function y(){g&&g(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout;function S(){if(!f)return;const _=R.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),C={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:_,config:t,request:f};gt(function(L){e(L),y()},function(L){r(L),y()},C),f=null}"onloadend"in f?f.onloadend=S:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(S)},f.onabort=function(){f&&(r(new m("Request aborted",m.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let _=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const C=s.transitional||ht;s.timeoutErrorMessage&&(_=s.timeoutErrorMessage),r(new m(_,C.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,t,f)),f=null},n===void 0&&i.setContentType(null),"setRequestHeader"in f&&a.forEach(i.toJSON(),function(_,C){f.setRequestHeader(C,_)}),a.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),o&&o!=="json"&&(f.responseType=s.responseType),l&&([p,d]=ue(l,!0),f.addEventListener("progress",p)),c&&f.upload&&([h,g]=ue(c),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(u=_=>{f&&(r(!_||_.type?new W(null,t,f):_),f.abort(),f=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const w=os(s.url);if(w&&x.protocols.indexOf(w)===-1){r(new m("Unsupported protocol "+w+":",m.ERR_BAD_REQUEST,t));return}f.send(n||null)})},gs=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let s=new AbortController,n;const i=function(u){if(!n){n=!0,c();const h=u instanceof Error?u:this.reason;s.abort(h instanceof m?h:new W(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,i(new m(`timeout ${e} of ms exceeded`,m.ETIMEDOUT))},e);const c=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));const{signal:l}=s;return l.unsubscribe=()=>a.asap(c),l}},ms=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let s=0,n;for(;s<r;)n=s+e,yield t.slice(s,n),s=n},bs=async function*(t,e){for await(const r of ys(t))yield*ms(r,e)},ys=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)break;yield s}}finally{await e.cancel()}},vt=(t,e,r,s)=>{const n=bs(t,e);let i=0,o,c=l=>{o||(o=!0,s&&s(l))};return new ReadableStream({async pull(l){try{const{done:u,value:h}=await n.next();if(u){c(),l.close();return}let p=h.byteLength;if(r){let g=i+=p;r(g)}l.enqueue(new Uint8Array(h))}catch(u){throw c(u),u}},cancel(l){return c(l),n.return()}},{highWaterMark:2})},he=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",St=he&&typeof ReadableStream=="function",_s=he&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Et=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ws=St&&Et(()=>{let t=!1;const e=new Request(x.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),xt=64*1024,ke=St&&Et(()=>a.isReadableStream(new Response("").body)),de={stream:ke&&(t=>t.body)};he&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!de[e]&&(de[e]=a.isFunction(t[e])?r=>r[e]():(r,s)=>{throw new m(`Response type '${e}' is not supported`,m.ERR_NOT_SUPPORT,s)})})})(new Response);const vs=async t=>{if(t==null)return 0;if(a.isBlob(t))return t.size;if(a.isSpecCompliantForm(t))return(await new Request(x.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(a.isArrayBufferView(t)||a.isArrayBuffer(t))return t.byteLength;if(a.isURLSearchParams(t)&&(t=t+""),a.isString(t))return(await _s(t)).byteLength},Ss=async(t,e)=>a.toFiniteNumber(t.getContentLength())??vs(e),Es=he&&(async t=>{let{url:e,method:r,data:s,signal:n,cancelToken:i,timeout:o,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:h,withCredentials:p="same-origin",fetchOptions:g}=wt(t);u=u?(u+"").toLowerCase():"text";let d=gs([n,i&&i.toAbortSignal()],o),y;const f=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let S;try{if(l&&ws&&r!=="get"&&r!=="head"&&(S=await Ss(h,s))!==0){let O=new Request(e,{method:"POST",body:s,duplex:"half"}),N;if(a.isFormData(s)&&(N=O.headers.get("content-type"))&&h.setContentType(N),O.body){const[z,F]=mt(S,ue(bt(l)));s=vt(O.body,xt,z,F)}}a.isString(p)||(p=p?"include":"omit");const w="credentials"in Request.prototype;y=new Request(e,{...g,signal:d,method:r.toUpperCase(),headers:h.normalize().toJSON(),body:s,duplex:"half",credentials:w?p:void 0});let _=await fetch(y);const C=ke&&(u==="stream"||u==="response");if(ke&&(c||C&&f)){const O={};["status","statusText","headers"].forEach(U=>{O[U]=_[U]});const N=a.toFiniteNumber(_.headers.get("content-length")),[z,F]=c&&mt(N,ue(bt(c),!0))||[];_=new Response(vt(_.body,xt,z,()=>{F&&F(),f&&f()}),O)}u=u||"text";let L=await de[a.findKey(de,u)||"text"](_,t);return!C&&f&&f(),await new Promise((O,N)=>{gt(O,N,{data:L,headers:R.from(_.headers),status:_.status,statusText:_.statusText,config:t,request:y})})}catch(w){throw f&&f(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,t,y),{cause:w.cause||w}):m.from(w,w&&w.code,t,y)}}),Pe={http:$r,xhr:ps,fetch:Es};a.forEach(Pe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ot=t=>`- ${t}`,xs=t=>a.isFunction(t)||t===null||t===!1,Rt={getAdapter:t=>{t=a.isArray(t)?t:[t];const{length:e}=t;let r,s;const n={};for(let i=0;i<e;i++){r=t[i];let o;if(s=r,!xs(r)&&(s=Pe[(o=String(r)).toLowerCase()],s===void 0))throw new m(`Unknown adapter '${o}'`);if(s)break;n[o||"#"+i]=s}if(!s){const i=Object.entries(n).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?i.length>1?`since :
|
4
|
+
`+i.map(Ot).join(`
|
5
|
+
`):" "+Ot(i[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:Pe};function je(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new W(null,t)}function At(t){return je(t),t.headers=R.from(t.headers),t.data=Ce.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Rt.getAdapter(t.adapter||Q.adapter)(t).then(function(e){return je(t),e.data=Ce.call(t,t.transformResponse,e),e.headers=R.from(e.headers),e},function(e){return pt(e)||(je(t),e&&e.response&&(e.response.data=Ce.call(t,t.transformResponse,e.response),e.response.headers=R.from(e.response.headers))),Promise.reject(e)})}const Tt="1.7.9",fe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{fe[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ct={};fe.transitional=function(t,e,r){function s(n,i){return"[Axios v"+Tt+"] Transitional option '"+n+"'"+i+(r?". "+r:"")}return(n,i,o)=>{if(t===!1)throw new m(s(i," has been removed"+(e?" in "+e:"")),m.ERR_DEPRECATED);return e&&!Ct[i]&&(Ct[i]=!0,console.warn(s(i," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(n,i,o):!0}},fe.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Os(t,e,r){if(typeof t!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let n=s.length;for(;n-- >0;){const i=s[n],o=e[i];if(o){const c=t[i],l=c===void 0||o(c,i,t);if(l!==!0)throw new m("option "+i+" must be "+l,m.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new m("Unknown option "+i,m.ERR_BAD_OPTION)}}const pe={assertOptions:Os,validators:fe},I=pe.validators;let D=class{constructor(t){this.defaults=t,this.interceptors={request:new ut,response:new ut}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const n=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?n&&!String(r.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
6
|
+
`+n):r.stack=n}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=q(this.defaults,e);const{transitional:r,paramsSerializer:s,headers:n}=e;r!==void 0&&pe.assertOptions(r,{silentJSONParsing:I.transitional(I.boolean),forcedJSONParsing:I.transitional(I.boolean),clarifyTimeoutError:I.transitional(I.boolean)},!1),s!=null&&(a.isFunction(s)?e.paramsSerializer={serialize:s}:pe.assertOptions(s,{encode:I.function,serialize:I.function},!0)),pe.assertOptions(e,{baseUrl:I.spelling("baseURL"),withXsrfToken:I.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=n&&a.merge(n.common,n[e.method]);n&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete n[d]}),e.headers=R.concat(i,n);const o=[];let c=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(e)===!1||(c=c&&d.synchronous,o.unshift(d.fulfilled,d.rejected))});const l=[];this.interceptors.response.forEach(function(d){l.push(d.fulfilled,d.rejected)});let u,h=0,p;if(!c){const d=[At.bind(this),void 0];for(d.unshift.apply(d,o),d.push.apply(d,l),p=d.length,u=Promise.resolve(e);h<p;)u=u.then(d[h++],d[h++]);return u}p=o.length;let g=e;for(h=0;h<p;){const d=o[h++],y=o[h++];try{g=d(g)}catch(f){y.call(this,f);break}}try{u=At.call(this,g)}catch(d){return Promise.reject(d)}for(h=0,p=l.length;h<p;)u=u.then(l[h++],l[h++]);return u}getUri(t){t=q(this.defaults,t);const e=yt(t.baseURL,t.url);return lt(e,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){D.prototype[t]=function(e,r){return this.request(q(r||{},{method:t,url:e,data:(r||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function e(r){return function(s,n,i){return this.request(q(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:n}))}}D.prototype[t]=e(),D.prototype[t+"Form"]=e(!0)});let Rs=class Xt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(n){r=n});const s=this;this.promise.then(n=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](n);s._listeners=null}),this.promise.then=n=>{let i;const o=new Promise(c=>{s.subscribe(c),i=c}).then(n);return o.cancel=function(){s.unsubscribe(i)},o},e(function(n,i,o){s.reason||(s.reason=new W(n,i,o),r(s.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 r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Xt(function(r){e=r}),cancel:e}}};function As(t){return function(e){return t.apply(null,e)}}function Ts(t){return a.isObject(t)&&t.isAxiosError===!0}const Ie={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(Ie).forEach(([t,e])=>{Ie[e]=t});function kt(t){const e=new D(t),r=Ve(D.prototype.request,e);return a.extend(r,D.prototype,e,{allOwnKeys:!0}),a.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return kt(q(t,s))},r}const v=kt(Q);v.Axios=D,v.CanceledError=W,v.CancelToken=Rs,v.isCancel=pt,v.VERSION=Tt,v.toFormData=ae,v.AxiosError=m,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=As,v.isAxiosError=Ts,v.mergeConfig=q,v.AxiosHeaders=R,v.formToJSON=t=>dt(a.isHTMLForm(t)?new FormData(t):t),v.getAdapter=Rt.getAdapter,v.HttpStatusCode=Ie,v.default=v;const{Axios:Kn,AxiosError:Gn,CanceledError:Xn,isCancel:Qn,CancelToken:Yn,VERSION:Zn,all:ei,Cancel:ti,isAxiosError:ri,spread:si,toFormData:ni,AxiosHeaders:ii,HttpStatusCode:oi,formToJSON:ci,getAdapter:ai,mergeConfig:li}=v,Ne=v.create({baseURL:location.origin,timeout:6e4,params:{}});Ne.interceptors.response.use(t=>t,t=>{var e,r,s,n,i,o,c,l,u,h,p;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(y){y&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let g=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(g+=`${t.response.statusText} `),(s=(r=t.response)==null?void 0:r.config)!=null&&s.data&&(g+=`${t.response.config.data} `),(i=(n=t.response)==null?void 0:n.data)!=null&&i.message?g+=`${t.response.data.message}`:(c=(o=t.response)==null?void 0:o.data)!=null&&c.exception?g+=`${t.response.data.exception}`:(h=(u=(l=t.response)==null?void 0:l.data)==null?void 0:u.error)!=null&&h.message?(t.response.data.error.class&&(g+=`${t.response.data.error.class} `),g+=`${t.response.data.error.message}`):g+=`${(p=t.response)==null?void 0:p.data}`;const{$cosmosNotify:d}=window;throw d&&d.serious({title:"Network error",body:g}),t}else throw t});const ge=async function(t,e,{data:r,params:s={},headers:n,noAuth:i=!1,noScope:o=!1,onUploadProgress:c=!1}={}){if(!i){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}n.Authorization=localStorage.openc3Token}return n.manual=!0,!o&&!s.scope&&(s.scope=window.openc3Scope),Ne({method:t,url:e,data:r,params:s,headers:n,onUploadProgress:c})},Le={Accept:"application/json"},Pt={...Le,"Content-Type":"application/json"},ui=we("u",{get:function(t,{params:e,headers:r=Le,noScope:s,noAuth:n,onUploadProgress:i}={}){return ge("get",t,{params:e,headers:r,noScope:s,noAuth:n,onUploadProgress:i})},put:function(t,{data:e,params:r,headers:s=Pt,noScope:n,noAuth:i,onUploadProgress:o}={}){return ge("put",t,{data:e,params:r,headers:s,noScope:n,noAuth:i,onUploadProgress:o})},post:function(t,{data:e,params:r,headers:s=Pt,noScope:n,noAuth:i,onUploadProgress:o}={}){return ge("post",t,{data:e,params:r,headers:s,noScope:n,noAuth:i,onUploadProgress:o})},delete:function(t,{params:e,headers:r=Le,noScope:s,noAuth:n,onUploadProgress:i}={}){return ge("delete",t,{params:e,headers:r,noScope:s,noAuth:n,onUploadProgress:i})}});let me=()=>({emit(t,...e){for(let r=this.events[t]||[],s=0,n=r.length;s<n;s++)r[s](...e)},events:{},on(t,e){var r;return((r=this.events)[t]||(r[t]=[])).push(e),()=>{var s;this.events[t]=(s=this.events[t])==null?void 0:s.filter(n=>e!==n)}}});class Z extends Error{constructor(e,r){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=r,this.name="ReasonError"}}class Ue extends Z{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class Cs extends Z{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class P extends Z{constructor(e,r){r?super(e,r):super("Disconnected",e),this.name="DisconnectedError"}}class ks extends P{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function jt(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let r=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${r}`}).join(",")}}`:""}class Ps{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,r){if(!this._info)return this._info={id:e,info:r},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((r,{id:s,info:n})=>(r[s]=n,r),{})}}const B=Symbol("state");class It{constructor(e={}){this.emitter=me(),this.params=Object.freeze(e),this.presence=new Ps(this),this.initialConnect=!0,this[B]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=jt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[B]}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[B]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[B]="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[B]="connected";let e=!0,r=!0;this.initialConnect=!1,this.emit("connect",{reconnect:r,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[B]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[B]="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,r){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,r)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(r){let s=this.receiver?this.receiver.logger:null;s&&s.warn("whisper failed: ",r)}}receive(e,r){this.emit("message",e,r)}on(e,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}emit(e,...r){return this.emitter.emit(e,...r)}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,r)=>{let s=[()=>delete this._pendingSubscribe];s.push(this.on("connect",()=>{s.forEach(n=>n()),e()})),s.push(this.on("close",n=>{s.forEach(i=>i()),r(n||new Z("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class js{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 r=this.channels.indexOf(e);r>-1&&this.channels.splice(r,1)}notify(e,...r){this.state=e==="restored"?"connected":e,r.length===1?this.channels.forEach(s=>s[e](r[0])):this.channels.forEach(s=>s[e]())}pending(e){this._checkIntent(e);let r=this._pendings[0];return!r||r.intent!==e?Promise.resolve():r.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 r,s={promise:new Promise(i=>{r=i}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(s),1),r(s)},canceled:!1,acquired:!1},n=this._pendingTop;return this._pendings.push(s),n&&await n.promise,this.gvl&&await this.gvl.acquire(s,e),s.acquired=!0,s}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 r=this._pendingTop;return!r||r.acquired||r.intent!==e?!1:(this._pendings.pop(),r.canceled=!0,!0)}}class Is{constructor(){this.queue=[]}async acquire(e,r){r==="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 Ns{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new Is),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:r,unsubscribe:s}){let n=this._subscriptions[e]=new js(e);return n.remoteId=this._localToRemote[e],n.subscriber=r,n.unsubscriber=s,n.gvl=this.glv,n}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,r){this._localToRemote[e]=r;let s=this.get(e);s&&(s.remoteId=r)}}class Ls{constructor(e={}){this.subscriptions=new Ns(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,r){this._remoteToLocal[r]=e,this.subscriptions.storeRemoteId(e,r),this.flush(r)}unsubscribe(e){let r=this.subscriptions.get(e);if(!r)return;let s=r.remoteId;s&&delete this._remoteToLocal[s],this.subscriptions.remove(e)}transmit(e,r,s){let n=this._remoteToLocal[e];if(!n){this._pendingMessages.push([e,r,s]);return}let i=this.subscriptions.get(n);i&&i.channels.forEach(o=>{o.receive(r,s)})}notify(e,r,s){let n=this._remoteToLocal[e];if(!n)return;let i=this.subscriptions.get(n);i&&i.channels.forEach(o=>o.emit(r,s))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let r=[];for(let s of this._pendingMessages)s[0]===e?this.transmit(s[0],s[1],s[2]):r.push(s);this._pendingMessages=r}}const Nt={debug:0,info:1,warn:2,error:3};class Lt{constructor(e){this.level=e||"warn"}log(e,r,s){Nt[e]<Nt[this.level]||this.writeLogEntry(e,r,s)}writeLogEntry(){throw Error("Not implemented")}debug(e,r){this.log("debug",e,r)}info(e,r){this.log("info",e,r)}warn(e,r){this.log("warn",e,r)}error(e,r){this.log("error",e,r)}}class ee extends Lt{writeLogEntry(){}}class Us{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let Fs=0;class Ut{constructor(e={}){let{logger:r}=e;this.logger=r||new ee,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,r){let s={channel:e};r&&Object.assign(s,r);let n=jt(s);if(this.pendingUnsubscriptions[n]){let o=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${o}`,n),new Promise(c=>{setTimeout(()=>{c(this.subscribe(e,r))},o)})}if(this.pendingSubscriptions[n])return this.logger.warn("subscription is already pending, skipping",n),Promise.reject(Error("Already subscribing"));let i=this.subscribeRetryInterval;return new Promise((o,c)=>{let l=++Fs;this.pendingSubscriptions[n]={resolve:o,reject:c,id:l},this.cable.send(this.buildSubscribeRequest(n)),this.maybeRetrySubscribe(l,n,i)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,r,s){setTimeout(()=>{let n=this.pendingSubscriptions[r];n&&n.id===e&&(this.logger.warn(`no subscription ack received in ${s}ms, retrying subscribe`,r),this.cable.send(this.buildSubscribeRequest(r)),this.maybeExpireSubscribe(e,r,s))},s)}maybeExpireSubscribe(e,r,s){setTimeout(()=>{let n=this.pendingSubscriptions[r];n&&n.id===e&&(delete this.pendingSubscriptions[r],n.reject(new Cs(`Haven't received subscription ack in ${s*2}ms for ${r}`)))},s)}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,r,s){return r==="$whisper"?this.whisper(e,s):(s||(s={}),s.action=r,this.cable.send({command:"message",identifier:e,data:JSON.stringify(s)}),Promise.resolve())}whisper(e,r){return this.cable.send({command:"whisper",identifier:e,data:r}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:r,identifier:s,message:n,reason:i,reconnect:o}=e;if(r==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),r==="welcome"){let c=e.sid;return c&&this.cable.setSessionId(c),this.cable.connected()}if(r==="disconnect"){let c=new P(i);this.reset(c),o===!1?this.cable.closed(c):this.cable.disconnected(c);return}if(r==="confirm_subscription"){let c=this.pendingSubscriptions[s];if(!c){this.logger.error("subscription not found, unsubscribing",{type:r,identifier:s}),this.unsubscribe(s);return}return delete this.pendingSubscriptions[s],c.resolve(s)}if(r==="reject_subscription"){let c=this.pendingSubscriptions[s];return c?(delete this.pendingSubscriptions[s],c.reject(new Ue)):this.logger.error("subscription not found",{type:r,identifier:s})}if(n)return{identifier:s,message:n};this.logger.warn(`unknown message type: ${r}`,{message:e})}reset(e){for(let r in this.pendingSubscriptions)this.pendingSubscriptions[r].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Ft=()=>Date.now()/1e3|0;class $s extends Ut{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.restoreSince===void 0&&(this.restoreSince=Ft()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let r in this.pendingPresence)this.pendingPresence[r].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:r,identifier:s,message:n}=e;if(r==="disconnect"||r==="reject_subscription")return super.receive(e);if(r==="confirm_subscription")return this.subscriptionStreams[s]||(this.subscriptionStreams[s]=new Set),super.receive(e);if(r==="ping")return this.restoreSince&&(this.restoreSince=Ft()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),r==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",s);return}if(r==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",s);return}if(r==="welcome"){if(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId),e.restored){let i=e.restored_ids||Object.keys(this.subscriptionStreams);for(let o of i)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(i)}return this.cable.connected(this.sessionId)}if(r==="presence"){let i=n.type;if(i==="info"){let o=this.pendingPresence[s];o&&(delete this.pendingPresence[s],o.resolve(n))}else if(i==="error"){let o=this.pendingPresence[s];o&&(delete this.pendingPresence[s],o.reject(new Error("failed to retrieve presence")))}return{type:r,identifier:s,message:n}}if(n){let i=this.trackStreamPosition(s,e.stream_id,e.epoch,e.offset);return{identifier:s,message:n,meta:i}}this.logger.warn(`unknown message type: ${r}`,{message:e})}perform(e,r,s){switch(r){case"$presence:join":return this.join(e,s);case"$presence:leave":return this.leave(e,s);case"$presence:info":return this.presence(e,s)}return super.perform(e,r,s)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let r=super.buildSubscribeRequest(e),s=this.historyRequestFor(e);s&&(r.history=s,this.pendingHistory[e]=!0);let n=this.presenceInfo[e];return n&&(r.presence=n),r}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let r={},s=!1;if(this.subscriptionStreams[e])for(let n of this.subscriptionStreams[e]){let i=this.streamsPositions[n];i&&(s=!0,r[n]=i)}if(!(!s&&!this.restoreSince))return{since:this.restoreSince,streams:r}}trackStreamPosition(e,r,s,n){if(!(!r||!s))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(r),this.streamsPositions[r]={epoch:s,offset:n},{stream:r,epoch:s,offset:n}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,r){return this.presenceInfo[e]=r,this.cable.send({command:"join",identifier:e,presence:r}),Promise.resolve()}async leave(e,r){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:r}),Promise.resolve()}presence(e,r){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((s,n)=>{this.pendingPresence[e]={resolve:s,reject:n},this.cable.send({command:"presence",identifier:e,data:r})})}}class qs extends Z{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Fe extends It{constructor(e,r){super(r),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}se(Fe,"identifier","__ghost__");const Ds="$pubsub";class $e extends It{async perform(e,r){if(e.startsWith("$"))return super.perform(e,r);throw Error("not implemented")}}se($e,"identifier",Ds);const M=Symbol("state");let Bs=class{constructor({transport:t,protocol:e,encoder:r,logger:s,lazy:n,hubOptions:i,performFailures:o,transportConfigurator:c}){this.emitter=me(),this.transport=t,this.encoder=r,this.logger=s||new ee,this.protocol=e,this.performFailures=o||"throw",this.protocol.attached(this),this.hub=new Ls(i||{}),this[M]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=c,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,n===!1&&this.connect().catch(()=>{})}get state(){return this[M]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[M]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(r){this.handleClose(r)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[M]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new P("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[M]="connected",this.hub.subscriptions.all().forEach(s=>{t&&s.remoteId&&t.includes(s.remoteId)?s.notify("restored"):(s.notify("disconnected",new P("recovery_failed")),this._resubscribe(s))});let e=!this.initialConnect,r=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:r})}notify(t,e,r){e&&typeof e!="string"&&(r=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:r}):this.emit("info",{type:t,data:r})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new P(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[M]="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 P?t:new P(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[M]="closed";let r=e||new P("cable_closed");this.hub.subscriptions.all().forEach(s=>s.notify("disconnected",r)),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 r=this.protocol.receive(e);if(r){this.logger.debug("processed incoming message",r);let{type:s,identifier:n,message:i,meta:o}=r;s?this.hub.notify(n,s,i):this.hub.transmit(n,i,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 $e({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new $e({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let r,s;return typeof t=="string"&&(s=t,t=Fe),r=s?new t(s,e):new t(e),this.subscribe(r)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let r=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:s=>this._subscribe(s,t.channelId,t.params),unsubscribe:s=>this._unsubscribe(s)});return r.add(t),r.intent==="subscribed"&&r.state==="connected"&&t.connected(),r.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,r){let s=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:s});return}this.logger.debug("acquiring subscribe lock",{identifier:s});let n=await t.acquire("subscribed");if(n.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:s}),n.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:s}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),n.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:s}),n.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:s}),t.notify("connected"),n.release();return}let i={identifier:e,params:r};this.logger.debug("subscribing",i);try{let o=await this.protocol.subscribe(e,r);this.hub.subscribe(s,o),this.logger.debug("subscribed",{...i,remoteId:o}),t.notify("connected")}catch(o){if(o){if(o instanceof Ue&&this.logger.warn("rejected",i),o instanceof P){this.logger.debug("disconnected during subscription; will retry on connect",i),n.release();return}this.logger.error("failed to subscribe",{error:o,...i})}t.close(o),this.hub.unsubscribe(s)}n.release()}unsubscribe(t){let e=t.identifier,r=this.hub.subscriptions.get(e);if(!r)throw Error(`Subscription not found: ${e}`);r.remove(t),t.closed(),r.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let r=await t.acquire("unsubscribed");if(r.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),r.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}),r.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),r.release();return}let s=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:s}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),r.release();return}try{await this.protocol.unsubscribe(s),this.logger.debug("unsubscribed remotely",{id:e})}catch(n){n&&(n instanceof P?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:n}):this.logger.error("unsubscribe failed",{id:e,error:n}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",r.release()}async perform(t,e,r){if(this.performFailures==="throw")return this._perform(t,e,r);try{return await this._perform(t,e,r)}catch(s){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:s});return}}async _perform(t,e,r){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new qs;let s=this.hub.subscriptions.get(t);if(!s)throw Error(`Subscription not found: ${t}`);if(await s.pending("subscribed"),s.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let n=s.remoteId,i={id:n,action:e,payload:r};this.logger.debug("perform",i);try{let o=await this.protocol.perform(n,e,r);return o&&this.logger.debug("perform result",{message:o,request:i}),o}catch(o){throw this.logger.error("perform failed",{error:o,request:i}),o}}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...s)=>{r(),e(...s)});return r}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let r=[()=>delete this._pendingConnect];r.push(this.on("connect",()=>{r.forEach(s=>s()),t()})),r.push(this.on("close",s=>{r.forEach(n=>n()),e(s)})),r.push(this.on("disconnect",s=>{r.forEach(n=>n()),e(s)}))}),this._pendingConnect)}};const Ms={maxMissingPings:2,maxReconnectAttempts:1/0},V=()=>Date.now(),$t=(t,e)=>{e=e||{};let{backoffRate:r,jitterRatio:s,maxInterval:n}=e;return r=r||2,s===void 0&&(s=.5),i=>{let o=t*r**i,c=o*r,l=o+(c-o)*Math.random(),u=2*(Math.random()-.5)*s;return l=l*(1+u),n&&n<l&&(l=n),l}};let qt=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Ms,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 ee,this.state="pending_connect",this.attempts=0,this.disconnectedAt=V()}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=V(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=V(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=V(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=V()})),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=V()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new ks))}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 zs{constructor(e,r={}){this.transports=e,this.transport=null,this.emitter=me(),this.unbind=[],this.logger=r.logger||new ee}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let r=this.transports[e];try{this.transport=r,this.resetListeners(),this.logger.debug(`Trying to connect via ${r.displayName()}`),await r.open(),this.logger.debug(`Connected via ${r.displayName()}`);return}catch(s){this.logger.debug(`Failed to connect via ${r.displayName()}: ${s.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,r){this.transports.forEach(s=>{s.setParam(e,r)})}setToken(e,r){this.transports.forEach(s=>{s.setToken(e,r)})}on(e,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}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 Hs{constructor(e,r={}){this.url=e;let s=r.websocketImplementation;if(s)this.Impl=s;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=me();let{format:n,subprotocol:i,authStrategy:o}=r;this.format=n||"text",this.connectionOptions=r.websocketOptions,this.authStrategy=o||"param",this.authProtocol="",this.subprotocol=i}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((r,s)=>{let n=[];n.push(this.once("open",()=>{n.forEach(i=>i()),r()})),n.push(this.once("close",()=>{n.forEach(i=>i()),s(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,r){let s=new URL(this.url);s.searchParams.set(e,r);let n=`${s.protocol}//${s.host}${s.pathname}?${s.searchParams}`;this.setURL(n)}setToken(e,r="jid"){if(this.authStrategy==="param")this.setParam(r,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let s=`x-${r}`.toLowerCase();s=Object.keys(this.connectionOptions.headers).find(n=>n.toLowerCase()===s)||s,this.connectionOptions.headers[s]=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,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}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 r=e.data;this.format==="binary"&&(r=new Uint8Array(r)),this.emitter.emit("data",r)},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 Dt={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Js(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({},Dt,e);let{protocol:r,websocketImplementation:s,websocketFormat:n,websocketOptions:i,websocketAuthStrategy:o,fallbacks:c,logLevel:l,logger:u,transport:h,encoder:p,lazy:g,monitor:d,pingInterval:y,reconnectStrategy:f,maxMissingPings:S,maxReconnectAttempts:w,subprotocol:_,tokenRefresher:C,historyTimestamp:L,protocolOptions:O,concurrentSubscribes:N,performFailures:z,transportConfigurator:F,auth:U}=e;if(u=u||new ee(l),typeof r=="string"){_=_||r;let K=r.substring(0,r.lastIndexOf("-")),A=r.substring(r.lastIndexOf("-")+1);if(O=O||{},K==="actioncable-v1")r=new Ut({logger:u,...O});else if(K==="actioncable-v1-ext")r=new $s({logger:u,historyTimestamp:L,...O});else throw Error(`Protocol is not supported yet: ${r}`);if(A==="json")p=p||new Us,n=n||"text";else if(A==="msgpack"){if(n="binary",!p)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(A==="protobuf"){if(n=n||"binary",!p)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: ${r}`)}if(!r)throw Error("Protocol must be specified");h=h||new Hs(t,{websocketImplementation:s,websocketOptions:i,subprotocol:_,authStrategy:o,format:n}),c&&(h=new zs([h,...c],{logger:u})),U&&U.token&&h.setToken(U.token,U.param||"jid"),f=f||$t(y),d!==!1&&(d=d||new qt({pingInterval:y,reconnectStrategy:f,maxMissingPings:S,maxReconnectAttempts:w,logger:u}));let Je={concurrentSubscribes:N},j=new Bs({protocol:r,transport:h,encoder:p,logger:u,lazy:g,hubOptions:Je,performFailures:z,transportConfigurator:F});return d&&(d.watch(j),j.monitor=d),C&&Ws(j,async()=>{try{await C(h)}catch(K){return u.error("Failed to refresh authentication token: "+K),!1}return j.connect().catch(()=>{}),!0}),j}function Ws(t,e){let r=!1;t.on("connect",()=>r=!1),t.on("close",async s=>{if(s){if(r){t.logger.warn("Token auto-refresh is disabled",s);return}s.reason==="token_expired"&&(r=!0,await e())}})}class Vs{constructor(e){this.channel=e}notify(e,...r){typeof this[e]=="function"&&this[e](...r)}perform(e,r={}){this.channel.perform(e,r)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Ks extends Fe{constructor(e,r,s){super(e,r),this.subscription=new Vs(this),Object.assign(this.subscription,s),this.on("connect",()=>this.subscription.notify("connected")),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",n=>this.subscription.notify("received",n)),this.on("close",n=>{n&&n instanceof Ue?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Gs{constructor(e){this.cable=e}create(e,r){let s,n;typeof e=="object"?(s=e.channel,delete e.channel,n=e):(s=e,n={});let i=new Ks(s,n,r);return i.subscription.notify("initialized"),this.cable.subscribe(i),i.subscription}findAll(e){return this.cable.hub.channels.filter(r=>r.identifier===e).map(r=>r.subscription)}}class Xs{constructor(e){this.cable=e,this.subscriptions=new Gs(e)}}class Qs extends Lt{writeLogEntry(e,r,s){s?console[e](r,s):console[e](r)}}class Ys extends qt{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")},r=n=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:n})},s=()=>this.disconnect(new P("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",r,!1),window.addEventListener("resume",r,!1),window.addEventListener("freeze",s,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",r,!1),window.removeEventListener("online",r,!1),window.removeEventListener("resume",r,!1),window.removeEventListener("freeze",s,!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 Zs=["cable","action-cable"],en="/cable",be=(t,e)=>{for(let r of Zs){let s=t.head.querySelector(`meta[name='${r}-${e}']`);if(s)return s.getAttribute("content")}},Bt=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,tn=()=>{if(typeof document<"u"&&document.head){let t=be(document,"url");if(t)return Bt(t)}return Bt(en)},rn=()=>{if(typeof document<"u"&&document.head){let t=be(document,"history-timestamp");if(t)return t|0}},sn=()=>{if(typeof document<"u"&&document.head)return be(document,"token")},nn=()=>{if(typeof document<"u"&&document.head)return be(document,"token-param")};function on(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||tn(),e=e||{},e.historyTimestamp||(e.historyTimestamp=rn());let r=sn();if(r){let u=nn();e.auth=Object.assign({token:r,param:u},e.auth||{})}e=Object.assign({},Dt,e);let{logLevel:s,logger:n,pingInterval:i,reconnectStrategy:o,maxMissingPings:c,maxReconnectAttempts:l}=e;return n=e.logger=e.logger||new Qs(s),o=e.reconnectStrategy=e.reconnectStrategy||$t(i),e.monitor!==!1&&(e.monitor=e.monitor||new Ys({pingInterval:i,reconnectStrategy:o,maxMissingPings:c,maxReconnectAttempts:l,logger:n})),Js(t,e)}function cn(t,e){let r=on(t,e);return new Xs(r)}class an{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,r,s={},n={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(i=>{if(i&&OpenC3Auth.setTokens(),this._cable==null){let o=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);o=new URL(o,document.baseURI).href,this._cable=cn(o)}return this._cable.subscriptions.create({channel:e,...n},s)})}recordPing(){}}we("f",an);function qe(t){return ln.test(t)}const ln=/^-?[0-9]+$/;function Mt(t){return un.test(t)}const un=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function zt(t,e){const r=Number.parseFloat(t),s=String(r),n=Ht(t),i=Ht(s);return!!(n===i||(e==null?void 0:e.approx)===!0&&!qe(t)&&i.length>=14&&n.startsWith(i.substring(0,14)))}let te=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function hn(t){if(zt(t,{approx:!1}))return;if(qe(t))return te.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?te.underflow:te.truncate_float:te.overflow}function Ht(t){return t.replace(dn,"").replace(pn,"").replace(gn,"").replace(fn,"")}const dn=/[eE][+-]?\d+$/,fn=/^-?(0*)?/,pn=/\./,gn=/0+$/;class mn{constructor(e){if(se(this,"isLosslessNumber",!0),!Mt(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=hn(this.value);if(e===void 0||e===te.truncate_float)return Number.parseFloat(this.value);if(qe(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 bn(t){return t&&typeof t=="object"&&t.isLosslessNumber===!0||!1}function yn(t){return new mn(t)}function _n(t,e){return De({"":t},"",t,e)}function De(t,e,r,s){return Array.isArray(r)?s.call(t,e,vn(r,s)):r&&typeof r=="object"&&!bn(r)?s.call(t,e,wn(r,s)):s.call(t,e,r)}function wn(t,e){for(const r of Object.keys(t)){const s=De(t,r,t[r],e);s!==void 0?t[r]=s:delete t[r]}return t}function vn(t,e){for(let r=0;r<t.length;r++)t[r]=De(t,String(r),t[r],e);return t}function Sn(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yn,s=0;const n=c();return y(n),S(),e?_n(n,e):n;function i(){if(t.charCodeAt(s)===Tn){s++,u();const b={};let E=!0;for(;s<t.length&&t.charCodeAt(s)!==Wt;){E?E=!1:(g(),u());const H=s,re=h();if(re===void 0){C();return}u(),d();const We=c();if(We===void 0){U();return}Object.prototype.hasOwnProperty.call(b,re)&&!Be(We,b[re])&&L(re,H+1),b[re]=We}return t.charCodeAt(s)!==Wt&&O(),s++,b}}function o(){if(t.charCodeAt(s)===Cn){s++,u();const b=[];let E=!0;for(;s<t.length&&t.charCodeAt(s)!==Vt;){E?E=!1:g();const H=c();f(H),b.push(H)}return t.charCodeAt(s)!==Vt&&N(),s++,b}}function c(){u();const b=h()??p()??i()??o()??l("true",!0)??l("false",!1)??l("null",null);return u(),b}function l(b,E){if(t.slice(s,s+b.length)===b)return s+=b.length,E}function u(){for(;En(t.charCodeAt(s));)s++}function h(){if(t.charCodeAt(s)===Me){s++;let b="";for(;s<t.length&&t.charCodeAt(s)!==Me;){if(t.charCodeAt(s)===An){const E=t[s+1],H=Rn[E];H!==void 0?(b+=H,s++):E==="u"?ye(t.charCodeAt(s+2))&&ye(t.charCodeAt(s+3))&&ye(t.charCodeAt(s+4))&&ye(t.charCodeAt(s+5))?(b+=String.fromCharCode(Number.parseInt(t.slice(s+2,s+6),16)),s+=5):Je(s):F(s)}else On(t.charCodeAt(s))?b+=t[s]:z(t[s]);s++}return _(),s++,b}}function p(){const b=s;if(t.charCodeAt(s)===Kt&&(s++,w(b)),t.charCodeAt(s)===ze)s++;else if(xn(t.charCodeAt(s)))for(s++;_e(t.charCodeAt(s));)s++;if(t.charCodeAt(s)===Fn)for(s++,w(b);_e(t.charCodeAt(s));)s++;if(t.charCodeAt(s)===Mn||t.charCodeAt(s)===Bn)for(s++,(t.charCodeAt(s)===Kt||t.charCodeAt(s)===Nn)&&s++,w(b);_e(t.charCodeAt(s));)s++;if(s>b)return r(t.slice(b,s))}function g(){if(t.charCodeAt(s)!==Un)throw new SyntaxError(`Comma ',' expected after value ${A()}`);s++}function d(){if(t.charCodeAt(s)!==$n)throw new SyntaxError(`Colon ':' expected after property name ${A()}`);s++}function y(b){if(b===void 0)throw new SyntaxError(`JSON value expected ${A()}`)}function f(b){if(b===void 0)throw new SyntaxError(`Array item expected ${A()}`)}function S(){if(s<t.length)throw new SyntaxError(`Expected end of input ${A()}`)}function w(b){if(!_e(t.charCodeAt(s))){const E=t.slice(b,s);throw new SyntaxError(`Invalid number '${E}', expecting a digit ${A()}`)}}function _(){if(t.charCodeAt(s)!==Me)throw new SyntaxError(`End of string '"' expected ${A()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${A()}`)}function L(b,E){throw new SyntaxError(`Duplicate key '${b}' encountered at position ${E}`)}function O(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${A()}`)}function N(){throw new SyntaxError(`Array item or end of array ']' expected ${A()}`)}function z(b){throw new SyntaxError(`Invalid character '${b}' ${j()}`)}function F(b){const E=t.slice(b,b+2);throw new SyntaxError(`Invalid escape character '${E}' ${j()}`)}function U(){throw new SyntaxError(`Object value expected after ':' ${j()}`)}function Je(b){const E=t.slice(b,b+6);throw new SyntaxError(`Invalid unicode character '${E}' ${j()}`)}function j(){return`at position ${s}`}function K(){return s<t.length?`but got '${t[s]}'`:"but reached end of input"}function A(){return`${K()} ${j()}`}}function En(t){return t===kn||t===Pn||t===jn||t===In}function ye(t){return t>=ze&&t<=He||t>=qn&&t<=zn||t>=Dn&&t<=Hn}function _e(t){return t>=ze&&t<=He}function xn(t){return t>=Ln&&t<=He}function On(t){return t>=32&&t<=1114111}function Be(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,s)=>Be(r,e[s])):Jt(t)&&Jt(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(r=>Be(t[r],e[r])):!1}function Jt(t){return typeof t=="object"&&t!==null}const Rn={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
7
|
+
`,r:"\r",t:" "},An=92,Tn=123,Wt=125,Cn=91,Vt=93,kn=32,Pn=10,jn=9,In=13,Me=34,Nn=43,Kt=45,ze=48,Ln=49,He=57,Un=44,Fn=46,$n=58,qn=65,Dn=97,Bn=69,Mn=101,zn=70,Hn=102;function Gt(t,e,r,s){return n(t);function n(l,u){if(Array.isArray(s)){const h=s.find(p=>p.test(l));if(h){const p=h.stringify(l);if(typeof p!="string"||!Mt(p))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${p})`);return p}}if(typeof l=="boolean"||typeof l=="number"||typeof l=="string"||l===null||l instanceof Date||l instanceof Boolean||l instanceof Number||l instanceof String)return JSON.stringify(l);if(l!=null&&l.isLosslessNumber||typeof l=="bigint")return l.toString();if(Array.isArray(l))return i(l);if(l&&typeof l=="object")return o(l)}function i(l,u){if(l.length===0)return"[]";let h="[";for(let p=0;p<l.length;p++){const g=l[p];typeof g<"u"&&typeof g!="function"?h+=n(g):h+="null",p<l.length-1&&(h+=",")}return h+="]",h}function o(l,u){if(typeof l.toJSON=="function")return Gt(l.toJSON(),e,r,void 0);const h=Array.isArray(e)?e.map(String):Object.keys(l);if(h.length===0)return"{}";let p=!0,g="{";for(const d of h){const y=l[d];if(c(d,y)){p?p=!1:g+=",";const f=JSON.stringify(d);g+=`${f}:`,g+=n(y)}}return g+="}",g}function c(l,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function Jn(t){return zt(t)?parseFloat(t):BigInt(t)}class Wn{constructor(){se(this,"id",1)}async exec(e,r,s={},n={},i=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return s.scope=window.openc3Scope,n.manual=!0,(await Ne.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:r,id:this.id,keyword_params:s},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...n},timeout:i,transformRequest:[(o,c)=>Gt(o)],transformResponse:[o=>Sn(o,void 0,Jn)]})).data.result}catch(o){let c=new Error;throw o.response?(c.name=o.response.data.error.data.class,c.message=o.response.data.error.data.message,c.object=o.response.data.error):o.request?(c.name="Request error",c.message="Request error, no response received"):c.name="Unknown error",c}}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,r){return this.exec("map_target_to_interface",[e,r])}connect_interface(e,...r){return r.length>0?this.exec("connect_interface",[e,...r]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,r,...s){return this.exec("interface_cmd",[e,r,...s])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,r,s){return this.exec("get_item",[e,r,s])}get_param(e,r,s){return this.exec("get_param",[e,r,s])}get_parameter(e,r,s){return this.exec("get_param",[e,r,s])}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,r){return this.exec("get_tlm",[e,r])}get_telemetry(e,r){return this.exec("get_tlm",[e,r])}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,r=!1){return this.exec("get_all_tlm_names",[e],{hidden:r})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}async get_tlm_packet(e,r,s,n=30){const i=await this.exec("get_tlm_packet",[e,r],{type:s,stale_time:n});if(i!=null){let o=i.length,c=null;for(let l=0;l<o;l++)c=this.decode_openc3_type(i[l][1]),c!==null&&(i[l][1]=c)}return i}get_packet_derived_items(e,r){return this.exec("get_packet_derived_items",[e,r])}get_tlm_buffer(e,r){return this.exec("get_tlm_buffer",[e,r])}async get_tlm_values(e,r=30,s=null){let n={stale_time:r};s!==null&&(n.cache_timeout=s);const i=await this.exec("get_tlm_values",[e],n,{},1e4);let o=i[0].length,c=null;for(let l=0;l<o;l++)c=this.decode_openc3_type(i[0][l]),c!==null&&(i[0][l]=c);return i}get_limits(e,r,s){return this.exec("get_limits",[e,r,s])}async tlm(e,r,s,n="CONVERTED"){let i=null;if(r===void 0)i=await this.exec("tlm",[e]);else if(s===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(r))i=await this.exec("tlm",[e],{type:r});else{let c=new Error;throw c.name="TypeError",c.message=`Invalid data type ${r}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,c}else i=await this.exec("tlm",[e,r,s],{type:n});let o=this.decode_openc3_type(i);return o!==null&&(i=o),i}async inject_tlm(e,r,s=null,n="CONVERTED"){await this.exec("inject_tlm",[e,r,s],{type:n})}set_tlm(e,r,s,n){return this.exec("set_tlm",[e,r,s],{type:n})}override_tlm(e,r,s,n){return this.exec("override_tlm",[e,r,s],{type:n})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,r,s,n){return this.exec("normalize_tlm",[e,r,s],{type:n})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,r=!1){return this.exec("get_all_cmd_names",[e],{hidden:r})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,r){return this.exec("get_cmd",[e,r])}get_command(e,r){return this.exec("get_cmd",[e,r])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,r,s,n="CONVERTED"){return this.exec("get_cmd_value",[e,r,s,n])}get_cmd_buffer(e,r){return this.exec("get_cmd_buffer",[e,r])}_cmd(e,r,s,n,i){let o=null;for(let c in n)Object.prototype.hasOwnProperty.call(n,c)&&(o=this.encode_openc3_type(n[c]),o!==null&&(n[c]=o));return this.exec(e,[r,s,n],{},i)}get_cmd_hazardous(e,r,s,n={}){return r===void 0?this.exec("get_cmd_hazardous",e,{},n):this._cmd("get_cmd_hazardous",e,r,s,n)}cmd(e,r,s,n={}){return r===void 0?this.exec("cmd",e,{},n):this._cmd("cmd",e,r,s,n)}cmd_no_range_check(e,r,s,n={}){return r===void 0?this.exec("cmd_no_range_check",e,{},n):this._cmd("cmd_no_range_check",e,r,s,n)}cmd_raw(e,r,s,n={}){return r===void 0?this.exec("cmd_raw",e,{},n):this._cmd("cmd_raw",e,r,s,n)}cmd_raw_no_range_check(e,r,s,n={}){return r===void 0?this.exec("cmd_raw_no_range_check",e,{},n):this._cmd("cmd_raw_no_range_check",e,r,s,n)}cmd_no_hazardous_check(e,r,s,n={}){return r===void 0?this.exec("cmd_no_hazardous_check",e,{},n):this._cmd("cmd_no_hazardous_check",e,r,s,n)}cmd_no_checks(e,r,s,n={}){return r===void 0?this.exec("cmd_no_checks",e,{},n):this._cmd("cmd_no_checks",e,r,s,n)}cmd_raw_no_hazardous_check(e,r,s,n={}){return r===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},n):this._cmd("cmd_raw_no_hazardous_check",e,r,s,n)}cmd_raw_no_checks(e,r,s,n={}){return r===void 0?this.exec("cmd_raw_no_checks",e,{},n):this._cmd("cmd_raw_no_checks",e,r,s,n)}build_cmd(e,r,s){return r===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,r,s)}build_command(e,r,s){return r===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,r,s)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,r){return this.exec("send_raw",[e,r])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,r){return this.exec("load_config",[e,r])}save_config(e,r,s){return this.exec("save_config",[e,r,s])}delete_config(e,r){return this.exec("delete_config",[e,r])}enable_limits(e,r,s){return this.exec("enable_limits",[e,r,s])}disable_limits(e,r,s){return this.exec("disable_limits",[e,r,s])}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){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,r){return this.exec("set_setting",[e,r])}update_news(){return this.exec("update_news",[])}save_setting(e,r){return this.exec("set_setting",[e,r])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const r=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",r),n=new Uint8Array(s);return Array.from(n).map(i=>i.toString(16).padStart(2,"0")).join("")}}}we("m",Wn)}}});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openc3-cosmos-tool-cmdtlmserver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0
|
4
|
+
version: 6.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Melton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-01
|
12
|
+
date: 2025-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: " This plugin adds the OpenC3 COSMOS CmdTlmServer Tool\n"
|
15
15
|
email:
|
@@ -23,81 +23,83 @@ files:
|
|
23
23
|
- README.md
|
24
24
|
- Rakefile
|
25
25
|
- plugin.txt
|
26
|
-
- tools/cmdtlmserver/ArrayWidget-
|
27
|
-
- tools/cmdtlmserver/
|
28
|
-
- tools/cmdtlmserver/
|
29
|
-
- tools/cmdtlmserver/
|
30
|
-
- tools/cmdtlmserver/
|
31
|
-
- tools/cmdtlmserver/
|
32
|
-
- tools/cmdtlmserver/
|
33
|
-
- tools/cmdtlmserver/
|
34
|
-
- tools/cmdtlmserver/
|
35
|
-
- tools/cmdtlmserver/
|
36
|
-
- tools/cmdtlmserver/
|
37
|
-
- tools/cmdtlmserver/
|
38
|
-
- tools/cmdtlmserver/
|
39
|
-
- tools/cmdtlmserver/
|
40
|
-
- tools/cmdtlmserver/
|
41
|
-
- tools/cmdtlmserver/
|
42
|
-
- tools/cmdtlmserver/
|
43
|
-
- tools/cmdtlmserver/
|
44
|
-
- tools/cmdtlmserver/
|
45
|
-
- tools/cmdtlmserver/
|
46
|
-
- tools/cmdtlmserver/
|
47
|
-
- tools/cmdtlmserver/
|
48
|
-
- tools/cmdtlmserver/
|
49
|
-
- tools/cmdtlmserver/
|
50
|
-
- tools/cmdtlmserver/
|
51
|
-
- tools/cmdtlmserver/
|
52
|
-
- tools/cmdtlmserver/
|
53
|
-
- tools/cmdtlmserver/
|
54
|
-
- tools/cmdtlmserver/
|
55
|
-
- tools/cmdtlmserver/
|
56
|
-
- tools/cmdtlmserver/
|
57
|
-
- tools/cmdtlmserver/
|
58
|
-
- tools/cmdtlmserver/
|
59
|
-
- tools/cmdtlmserver/
|
60
|
-
- tools/cmdtlmserver/
|
61
|
-
- tools/cmdtlmserver/
|
62
|
-
- tools/cmdtlmserver/
|
63
|
-
- tools/cmdtlmserver/
|
64
|
-
- tools/cmdtlmserver/
|
65
|
-
- tools/cmdtlmserver/
|
66
|
-
- tools/cmdtlmserver/
|
67
|
-
- tools/cmdtlmserver/
|
68
|
-
- tools/cmdtlmserver/
|
69
|
-
- tools/cmdtlmserver/
|
70
|
-
- tools/cmdtlmserver/
|
71
|
-
- tools/cmdtlmserver/
|
72
|
-
- tools/cmdtlmserver/
|
73
|
-
- tools/cmdtlmserver/
|
74
|
-
- tools/cmdtlmserver/
|
75
|
-
- tools/cmdtlmserver/
|
76
|
-
- tools/cmdtlmserver/
|
77
|
-
- tools/cmdtlmserver/
|
78
|
-
- tools/cmdtlmserver/
|
79
|
-
- tools/cmdtlmserver/
|
80
|
-
- tools/cmdtlmserver/
|
81
|
-
- tools/cmdtlmserver/
|
82
|
-
- tools/cmdtlmserver/
|
83
|
-
- tools/cmdtlmserver/
|
84
|
-
- tools/cmdtlmserver/
|
85
|
-
- tools/cmdtlmserver/
|
86
|
-
- tools/cmdtlmserver/
|
87
|
-
- tools/cmdtlmserver/
|
88
|
-
- tools/cmdtlmserver/
|
89
|
-
- tools/cmdtlmserver/
|
90
|
-
- tools/cmdtlmserver/
|
91
|
-
- tools/cmdtlmserver/
|
92
|
-
- tools/cmdtlmserver/
|
93
|
-
- tools/cmdtlmserver/
|
94
|
-
- tools/cmdtlmserver/
|
95
|
-
- tools/cmdtlmserver/
|
96
|
-
- tools/cmdtlmserver/
|
97
|
-
- tools/cmdtlmserver/
|
98
|
-
- tools/cmdtlmserver/
|
26
|
+
- tools/cmdtlmserver/ArrayWidget-BxEO5hEG-89ca0a2e546d77657dd9.js
|
27
|
+
- tools/cmdtlmserver/ArrayplotWidget-B_VPoV4v-7b820a5e88bad1425d1c.js
|
28
|
+
- tools/cmdtlmserver/BarColumn-C9dkpg2O-7723dc0faa77b237d7f9.js
|
29
|
+
- tools/cmdtlmserver/BlockWidget-CuefOin6-edc80607b7a1d528f5e3.js
|
30
|
+
- tools/cmdtlmserver/ButtonWidget-B6HM0Doo-ce7e70aebc6509184e26.js
|
31
|
+
- tools/cmdtlmserver/CanvasWidget-DZQGG-yQ-6864bab874dccb2db67c.js
|
32
|
+
- tools/cmdtlmserver/CanvasdotWidget-6wuCSnw_-e0f154be630a0c8394bc.js
|
33
|
+
- tools/cmdtlmserver/CanvasimageWidget-mhcPpAuN-441a8a40b76b47f0e9dd.js
|
34
|
+
- tools/cmdtlmserver/CanvasimagevalueWidget-Cx-dH8Gc-c505d808df433d5fd979.js
|
35
|
+
- tools/cmdtlmserver/CanvaslabelWidget-CQZCeohU-85c23c2118739625a3a1.js
|
36
|
+
- tools/cmdtlmserver/CanvaslabelvalueWidget-CwmYDCjr-aca636f4d86f04fc6120.js
|
37
|
+
- tools/cmdtlmserver/CanvaslineWidget-nTP3fJB4-78e605105cd357f98670.js
|
38
|
+
- tools/cmdtlmserver/CanvaslinevalueWidget-C3sJnjLQ-c20af62fc101f2e6d9e7.js
|
39
|
+
- tools/cmdtlmserver/CheckbuttonWidget-5-8YDsQL-e19c2b901eae43feeb7c.js
|
40
|
+
- tools/cmdtlmserver/CmdPacketsTab-543bcdcded38905596c1.js
|
41
|
+
- tools/cmdtlmserver/CmdTlmServer-c5e0c27cd668cb4acdd2.js
|
42
|
+
- tools/cmdtlmserver/ComboboxWidget-DzBL8h9f-d1afd3d09dbb57142156.js
|
43
|
+
- tools/cmdtlmserver/DateWidget-CW7Od7lB-14c75cebe909660c92a6.js
|
44
|
+
- tools/cmdtlmserver/DetailsDialog-BvbziA7Y-a6d191d4c24ae44227f5.js
|
45
|
+
- tools/cmdtlmserver/DynamicWidget-gFSYxzvT-5b7c1448f53e03ca3e91.js
|
46
|
+
- tools/cmdtlmserver/FormatvalueWidget-CGpnTqVH-5a4cac76beeee76398b5.js
|
47
|
+
- tools/cmdtlmserver/Graph-3rkhFP3G-b8db0cdb9ecf80ac5155.js
|
48
|
+
- tools/cmdtlmserver/GraphWidget-Dycey-mj-d4aa575ef98087670b47.js
|
49
|
+
- tools/cmdtlmserver/HorizontalWidget-D31NRWy5-567abe97366db941d1d0.js
|
50
|
+
- tools/cmdtlmserver/HorizontalboxWidget-Br8dSVHD-7c9a14b981c6d7631921.js
|
51
|
+
- tools/cmdtlmserver/HorizontallineWidget-CbxREBYI-cd6486b6aeb6fbdd102b.js
|
52
|
+
- tools/cmdtlmserver/IframeWidget-Ctj8OIcG-8eb7274680df97862be9.js
|
53
|
+
- tools/cmdtlmserver/ImageLoader-BrNrCBvi-c56dfbfda95fe546284c.js
|
54
|
+
- tools/cmdtlmserver/ImageviewerWidget-XrsqxmLo-e5e72a6a85a49cb007ad.js
|
55
|
+
- tools/cmdtlmserver/InterfacesTab-5fe4b0f137ffde75f928.js
|
56
|
+
- tools/cmdtlmserver/LabelWidget-t7I87dp7-c8e7d564e904105dba56.js
|
57
|
+
- tools/cmdtlmserver/LabelledWidget-C7TDf92M-e5c2e34c391a4721e565.js
|
58
|
+
- tools/cmdtlmserver/LabelprogressbarWidget-wwLURt1u-c12f252a4577e90e8ba4.js
|
59
|
+
- tools/cmdtlmserver/LabelsparklineWidget-B3awLUyP-dafc251f2886e5de7219.js
|
60
|
+
- tools/cmdtlmserver/LabelvalueWidget-Zx_yHCtl-761beda3ba9005900e83.js
|
61
|
+
- tools/cmdtlmserver/LabelvaluedescWidget-BBSBh4vI-7930a82f5e07d7ac49ee.js
|
62
|
+
- tools/cmdtlmserver/LabelvaluelimitsbarWidget-CZueHYWG-24b90c24e80fd1a209b0.js
|
63
|
+
- tools/cmdtlmserver/LabelvaluelimitscolumnWidget-BTvzyQMq-8ef478f7a9ed47139a9b.js
|
64
|
+
- tools/cmdtlmserver/LabelvaluerangebarWidget-BhYTBgDq-f7d7ee8128f9058ef8c3.js
|
65
|
+
- tools/cmdtlmserver/Layout-Bh7VzCZd-dcb9c3641454e6c67c47.js
|
66
|
+
- tools/cmdtlmserver/LedWidget-CxJjJBBS-71046e57b3786c5a7889.js
|
67
|
+
- tools/cmdtlmserver/LimitsbarWidget-Djui0IpK-c1dec25b5074f46c266b.js
|
68
|
+
- tools/cmdtlmserver/LimitscolorWidget-DdmvKzmx-6cf2a6f3dc4493ea0ef5.js
|
69
|
+
- tools/cmdtlmserver/LimitscolumnWidget-Cc19IEjq-bc58d443d9a79a05718e.js
|
70
|
+
- tools/cmdtlmserver/LinegraphWidget-BtieJxeL-be15f3c0e6a500ecc463.js
|
71
|
+
- tools/cmdtlmserver/MatrixbycolumnsWidget-DnExVRF8-4a69d3f7ece972d3f5e2.js
|
72
|
+
- tools/cmdtlmserver/ProgressbarWidget-DIfqhHRE-aebd8d5a762deda63d9c.js
|
73
|
+
- tools/cmdtlmserver/RadiobuttonWidget-QzIkNP7m-300018a2418b2cbe7f09.js
|
74
|
+
- tools/cmdtlmserver/RadiogroupWidget-Ci9sCX39-db829f94bee5140bb9cc.js
|
75
|
+
- tools/cmdtlmserver/RangebarWidget-CN0YuHqy-9b49a64ed4d1a23e9fa2.js
|
76
|
+
- tools/cmdtlmserver/RawDialog-2b725610c629b9879bac.js
|
77
|
+
- tools/cmdtlmserver/RollupWidget-y4jBtJB2-2fa7012d1e3c1cc9a765.js
|
78
|
+
- tools/cmdtlmserver/RoutersTab-97a4ce9897517bb6bde4.js
|
79
|
+
- tools/cmdtlmserver/ScrollwindowWidget-CBzYk4Y3-48abadd8da946b6c65a5.js
|
80
|
+
- tools/cmdtlmserver/SignalWidget-DQ5Uc2uV-864549b10d055bc6c168.js
|
81
|
+
- tools/cmdtlmserver/SpacerWidget-6rsc_dSM-4c67a06ee2036a93075a.js
|
82
|
+
- tools/cmdtlmserver/SparklineWidget-CZtvu2ss-a652a442fd625a97a9b0.js
|
83
|
+
- tools/cmdtlmserver/StatusTab-ebf6453fac33bf59a564.js
|
84
|
+
- tools/cmdtlmserver/TabbookWidget-DNALU0jl-ae79a3b9beef34b7efde.js
|
85
|
+
- tools/cmdtlmserver/TargetsTab-ae3381cde4d9b22a9272.js
|
86
|
+
- tools/cmdtlmserver/TextboxWidget-5hqPj74D-292f2786815b2027f6e6.js
|
87
|
+
- tools/cmdtlmserver/TextfieldWidget-Df0ANSiU-a45885e9c031fa702946.js
|
88
|
+
- tools/cmdtlmserver/TimeWidget-C6XQMUG2-fa62efc8fea7b7a08ccc.js
|
89
|
+
- tools/cmdtlmserver/TitleWidget-B9SPUlbW-55092f64413a6ce5551d.js
|
90
|
+
- tools/cmdtlmserver/TlmPacketsTab-60429ad30f45f45c7ac9.js
|
91
|
+
- tools/cmdtlmserver/Updater-82fa1a354a9721098906.js
|
92
|
+
- tools/cmdtlmserver/VWidget-C4spAawK-e7dee3c34a6d790327ec.js
|
93
|
+
- tools/cmdtlmserver/ValueWidget-D4RrYVEK-c90078a7e58747e8aa55.js
|
94
|
+
- tools/cmdtlmserver/ValuelimitsbarWidget-Bc9_Vj_f-b088c7ef6cd4bf20f55e.js
|
95
|
+
- tools/cmdtlmserver/ValuelimitscolumnWidget-DHKIL7sf-72a766dafcef2f6c4767.js
|
96
|
+
- tools/cmdtlmserver/ValuerangebarWidget-CecQRIok-5cef01f82763ccf9350a.js
|
97
|
+
- tools/cmdtlmserver/VerticalWidget-D8jUFxjS-dc1f1f22baae1b1bf9ee.js
|
98
|
+
- tools/cmdtlmserver/VerticalboxWidget-B4eGUSYH-24dd29d0e54de2ba61eb.js
|
99
|
+
- tools/cmdtlmserver/Widget-fRCERxGf-6cf6e886d2d5ee76cfc6.js
|
100
|
+
- tools/cmdtlmserver/main-4bad43bda3e8a8483ba9.js
|
99
101
|
- tools/cmdtlmserver/main.js
|
100
|
-
- tools/cmdtlmserver/services-
|
102
|
+
- tools/cmdtlmserver/services-6c036365da68dd4327ff.js
|
101
103
|
homepage: https://github.com/OpenC3/cosmos
|
102
104
|
licenses:
|
103
105
|
- AGPL-3.0-only
|
@@ -1,2 +0,0 @@
|
|
1
|
-
System.register(["./main-fcf5991e219cb9464cd3.js","vue","./DetailsDialog-DiVcC3Fg-926dc00ae99f202f7bbb.js","single-spa","./VWidget-CGdM4sTw-a078921174583b0d9185.js","vue-router","vuex","vuetify","./Widget-C7ms_xDE-bce61b3f1521054f57a4.js"],function(S,L){"use strict";var u,a,h,m,s,p,g,o,w,f,v,x,y,C,V,k;return{setters:[e=>{u=e.s},e=>{a=e.resolveComponent,h=e.openBlock,m=e.createElementBlock,s=e.createVNode,p=e.normalizeClass,g=e.normalizeStyle,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,x=e.withModifiers,y=e.createTextVNode,C=e.toDisplayString},e=>{V=e.P},null,e=>{k=e.L},null,null,null,null],execute:function(){const e={components:{DetailsDialog:V},data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},mixins:[k],computed:{aging(){return{"--aging":this.grayLevel}},rows:function(){return(this.height-16)/24}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.bytesPerWord=parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=parseInt(this.parameters[7])),this.parameters[8]&&(this.addrFormat=this.parameters[8])},methods:{getType:function(){let t="RAW";return this.parameters[9]&&(t=this.parameters[9]),t},formatValue:function(t){let r="";if(t&&t.raw){let D=" ",P=`
|
2
|
-
`,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=d),r+=sprintf(this.formatter,c),i+=1,i%d===0?(i=0,r+=P):i%this.bytesPerWord===0&&(r+=D)}else r=t;return r}}},M={class:"block-widget-container"};function W(t,r,D,P,i,l){const d=a("v-textarea"),c=a("v-list-item-title"),_=a("v-list-item"),F=a("v-list"),B=a("v-menu"),b=a("details-dialog");return h(),m("div",M,[s(d,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:p(t.valueClass),style:g([t.computedStyle,l.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(B,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(F,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,z)=>(h(),v(_,{key:z,onClick:x(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[y(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(b,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const N=S("default",u(e,[["render",W],["__scopeId","data-v-4d4589c2"]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Layout-D4YBjuWs-d949f0668cb092f7f268.js","vue","./main-fcf5991e219cb9464cd3.js","./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue-router","single-spa","vuex","vuetify"],function(p,f){"use strict";var i,n,s,a,l,c,u,m,o;return{setters:[e=>{i=e.r},e=>{n=e.openBlock,s=e.createElementBlock,a=e.Fragment,l=e.renderList,c=e.createBlock,u=e.resolveDynamicComponent,m=e.mergeProps},e=>{o=e.s},null,null,null,null,null],execute:function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},h=["width","height"];function d(r,k,y,B,x,g){return n(),s("svg",{id:"canvas",width:g.width,height:g.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),m({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,h)}const w=p("default",o(e,[["render",d],["__scopeId","data-v-47bdfc3c"]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(c,a){"use strict";var t,l,n,s;return{setters:[e=>{t=e.o},e=>{l=e.openBlock,n=e.createElementBlock},e=>{s=e.s},null,null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(r,m,f,p,x,v){return l(),n("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const o=c("default",s(e,[["render",i]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(o,m){"use strict";var r,l,n,s,i;return{setters:[e=>{r=e.o},e=>{l=e.openBlock,n=e.createElementBlock,s=e.toDisplayString},e=>{i=e.s},null,null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,y,g,c){return l(),n("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const p=o("default",i(e,[["render",u]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var s,l,n,a,c;return{setters:[e=>{s=e.o},e=>{l=e.openBlock,n=e.createElementBlock,a=e.normalizeStyle},e=>{c=e.s},null,null,null,null],execute:function(){const e={mixins:[s],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},u=["x1","y1","x2","y2"];function o(t,r,x,k,f,m){return l(),n("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(u,o){"use strict";var a,r,l,i,n;return{setters:[t=>{a=t.o},t=>{r=t.openBlock,l=t.createElementBlock,i=t.normalizeStyle},t=>{n=t.s},null,null,null,null],execute:function(){const t={mixins:[a],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let s=1;return this.parameters[7]&&(s=this.parameters[7]),"stroke:"+e+";stroke-width:"+s}},created(){this.appliedSettings.forEach(s=>{s[0]==="VALUE_EQ"&&(this.valueMap[s[1]]=s[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},m=["x1","y1","x2","y2"];function c(e,s,d,v,y,h){return r(),l("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(h.calcStyle)},null,12,m)}const p=u("default",n(t,[["render",c]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(c,h){"use strict";var t,s,a,n,o,r;return{setters:[e=>{t=e.o},e=>{s=e.resolveComponent,a=e.openBlock,n=e.createBlock,o=e.normalizeStyle},e=>{r=e.s},null,null,null,null],execute:function(){const e={mixins:[t],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function i(m,u,k,y,l,b){const d=s("v-checkbox");return a(),n(d,{"hide-details":"",density:"compact",label:l.label,modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),style:o(m.computedStyle)},null,8,["label","modelValue","style"])}const p=c("default",r(e,[["render",i]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./main-fcf5991e219cb9464cd3.js","vue","./Widget-C7ms_xDE-bce61b3f1521054f57a4.js"],function(j,Se){"use strict";var L,B,J,M,Q,q,P,R,ee,H,te,u,w,Y,ie,a,l,I,ae,b,T,m,N,S,x,E,se,le,Z,re,oe,ne;return{setters:[c=>{L=c.s,B=c.P,J=c.O,M=c.$,Q=c.b,q=c.c,P=c.d,R=c.l,ee=c.F,H=c.y,te=c.z},c=>{u=c.resolveComponent,w=c.openBlock,Y=c.createElementBlock,ie=c.withModifiers,a=c.createVNode,l=c.withCtx,I=c.withDirectives,ae=c.normalizeClass,b=c.createElementVNode,T=c.mergeProps,m=c.createTextVNode,N=c.vShow,S=c.toDisplayString,x=c.createBlock,E=c.createCommentVNode,se=c.normalizeProps,le=c.guardReactiveProps,Z=c.withKeys,re=c.Fragment,oe=c.renderList},c=>{ne=c.o}],execute:function(){const c={props:{modelValue:Boolean,title:{type:String,required:!0},legendPosition:{type:String,required:!0},items:{type:Array,required:!0},graphMinY:{type:Number},graphMaxY:{type:Number},lines:{type:Array,required:!0},colors:{type:Array,required:!0},startDateTime:{type:Number},endDateTime:{type:Number},timeZone:{type:String,required:!0}},mixins:[B],data:function(){return{tab:0,graph:{},legendPositions:["top","bottom","left","right"],startDate:null,startTime:null,endDate:null,endTime:null,lineHeaders:[{title:"Y Value",value:"yValue"},{title:"Color",value:"color"},{title:"Actions",value:"actions",sortable:!1}],itemHeaders:[{title:"Target Name",value:"targetName"},{title:"Packet Name",value:"packetName"},{title:"Item Name",value:"itemName"},{title:"Actions",value:"actions",sortable:!1}],rules:{date:t=>{if(!t)return!0;try{return q(P(t,"yyyy-MM-dd",new Date))||"Invalid date (YYYY-MM-DD)"}catch{return"Invalid date (YYYY-MM-DD)"}},time:t=>{if(!t)return!0;try{return q(P(t,"HH:mm:ss",new Date))||"Invalid time (HH:MM:SS)"}catch{return"Invalid time (HH:MM:SS)"}}}}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},editItems:function(){if(!this.items)return[];let t=0;return this.items.map(e=>(t+=1,{...e,itemId:t}))}},created(){if(this.graph={title:this.title,legendPosition:this.legendPosition,items:this.items,graphMinY:this.graphMinY,graphMaxY:this.graphMaxY,lines:[...this.lines]},this.startDateTime){let t=R(this.startDateTime/1e6);this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone)}else{let t=new Date-36e5;this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone)}if(this.endDateTime){let t=R(this.endDateTime/1e6);this.endDate=this.formatDate(t,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone)}},methods:{closeOk(){this.startDate&&this.startTime?this.graph.startDateTime=this.startDate+" "+this.startTime:this.graph.startDateTime=null,this.endDate&&this.endTime?this.graph.endDateTime=this.endDate+" "+this.endTime:this.graph.endDateTime=null,this.$emit("ok",this.graph)},addLine(){this.graph.lines.push({yValue:0,color:"white"})},removeLine(t){let e=this.graph.lines.indexOf(t);this.graph.lines.splice(e,1)}}},de={class:"edit-box"},he={class:"edit-box"},ue={class:"edit-box"},me={class:"edit-box"};function ce(t,e,i,n,s,r){const d=u("v-spacer"),o=u("v-toolbar"),v=u("v-tab"),p=u("v-tabs"),y=u("v-text-field"),D=u("v-card-text"),_=u("v-col"),k=u("v-select"),f=u("v-row"),G=u("v-tabs-window-item"),z=u("v-btn"),A=u("v-list-item"),V=u("v-icon"),C=u("v-tooltip"),$=u("v-list"),U=u("v-data-table"),F=u("v-tabs-window"),K=u("v-card-actions"),h=u("v-card"),W=u("v-dialog");return w(),x(W,{modelValue:r.show,"onUpdate:modelValue":e[12]||(e[12]=g=>r.show=g),onKeydown:e[13]||(e[13]=Z(g=>t.$emit("cancel"),["esc"])),"max-width":"700"},{default:l(()=>[a(o,{height:"24"},{default:l(()=>[a(d),e[14]||(e[14]=b("span",null," Edit Graph ",-1)),a(d)]),_:1}),a(h,{class:"pa-3"},{default:l(()=>[a(p,{modelValue:t.tab,"onUpdate:modelValue":e[0]||(e[0]=g=>t.tab=g),class:"ml-3"},{default:l(()=>[a(v,{value:"0"},{default:l(()=>e[15]||(e[15]=[m(" Settings ")])),_:1}),a(v,{value:"1"},{default:l(()=>e[16]||(e[16]=[m(" Scale / Lines ")])),_:1}),a(v,{value:"2"},{default:l(()=>e[17]||(e[17]=[m(" Items ")])),_:1})]),_:1},8,["modelValue"]),a(F,{modelValue:t.tab,"onUpdate:modelValue":e[10]||(e[10]=g=>t.tab=g)},{default:l(()=>[a(G,{value:"0",eager:""},{default:l(()=>[b("div",de,[a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(D,{class:"pa-0"},{default:l(()=>[a(y,{class:"pb-2",label:"Title",modelValue:t.graph.title,"onUpdate:modelValue":e[1]||(e[1]=g=>t.graph.title=g),"hide-details":""},null,8,["modelValue"])]),_:1})]),_:1}),a(_,null,{default:l(()=>[a(k,{label:"Legend Position","hide-details":"",items:t.legendPositions,modelValue:t.graph.legendPosition,"onUpdate:modelValue":e[2]||(e[2]=g=>t.graph.legendPosition=g),style:{"max-width":"280px"}},null,8,["items","modelValue"])]),_:1})]),_:1})]),b("div",he,[a(D,{class:"pa-0"},{default:l(()=>e[18]||(e[18]=[m(" Select a start date/time for the graph. Leave blank for start now. ")])),_:1}),a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(y,{label:"Start Date",name:`date${Date.now()}`,rules:[t.rules.date],modelValue:t.startDate,"onUpdate:modelValue":e[3]||(e[3]=g=>t.startDate=g),type:"date"},null,8,["name","rules","modelValue"])]),_:1}),a(_,null,{default:l(()=>[a(y,{label:"Start Time",name:`time${Date.now()}`,rules:[t.rules.time],modelValue:t.startTime,"onUpdate:modelValue":e[4]||(e[4]=g=>t.startTime=g),type:"time",step:"1"},null,8,["name","rules","modelValue"])]),_:1})]),_:1}),a(D,{class:"pa-0"},{default:l(()=>e[19]||(e[19]=[m(" Select a end date/time for the graph. Leave blank for continuous real-time graphing. ")])),_:1}),a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(y,{label:"End Date",name:`date${Date.now()}`,rules:[t.rules.date],modelValue:t.endDate,"onUpdate:modelValue":e[5]||(e[5]=g=>t.endDate=g),type:"date"},null,8,["name","rules","modelValue"])]),_:1}),a(_,null,{default:l(()=>[a(y,{label:"End Time",name:`time${Date.now()}`,rules:[t.rules.time],modelValue:t.endTime,"onUpdate:modelValue":e[6]||(e[6]=g=>t.endTime=g),type:"time",step:"1"},null,8,["name","rules","modelValue"])]),_:1})]),_:1})])]),_:1}),a(G,{value:"1",eager:""},{default:l(()=>[b("div",ue,[a(D,{class:"pa-0"},{default:l(()=>e[20]||(e[20]=[m(" Set a min or max Y value to override automatic scaling ")])),_:1}),a(f,{dense:""},{default:l(()=>[a(_,{class:"px-2"},{default:l(()=>[a(y,{"hide-details":"",label:"Min Y Axis (Optional)",modelValue:t.graph.graphMinY,"onUpdate:modelValue":e[7]||(e[7]=g=>t.graph.graphMinY=g),type:"number"},null,8,["modelValue"])]),_:1}),a(_,{class:"px-2"},{default:l(()=>[a(y,{"hide-details":"",label:"Max Y Axis (Optional)",modelValue:t.graph.graphMaxY,"onUpdate:modelValue":e[8]||(e[8]=g=>t.graph.graphMaxY=g),type:"number"},null,8,["modelValue"])]),_:1})]),_:1})]),b("div",me,[a($,{density:"compact",class:"horizontal-lines"},{default:l(()=>[a(A,null,{default:l(()=>[e[22]||(e[22]=b("span",{style:{"padding-top":"5px"}}," Add horizontal lines to the graph ",-1)),a(d),a(z,{onClick:e[9]||(e[9]=g=>r.addLine())},{default:l(()=>e[21]||(e[21]=[m(" New Line ")])),_:1})]),_:1}),(w(!0),Y(re,null,oe(t.graph.lines,(g,X)=>(w(),x(A,{key:X,value:g,color:"primary"},{default:l(()=>[a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(y,{label:"Y Value",modelValue:g.yValue,"onUpdate:modelValue":O=>g.yValue=O},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),a(_,null,{default:l(()=>[a(k,{label:"Color","hide-details":"",items:i.colors,modelValue:g.color,"onUpdate:modelValue":O=>g.color=O},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024),a(_,null,{default:l(()=>[a(C,{text:"Remove",location:"top"},{activator:l(({props:O})=>[a(V,T({ref_for:!0},O,{style:{padding:"30px"},onClick:Ye=>r.removeLine(g)}),{default:l(()=>e[23]||(e[23]=[m("mdi-delete")])),_:2},1040,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1})])]),_:1}),a(G,{value:"2",eager:""},{default:l(()=>[a(U,{"item-key":"itemId",class:"elevation-1 my-2","data-test":"edit-graph-items",headers:t.itemHeaders,items:r.editItems,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},{"item.actions":l(({item:g})=>[a(C,{text:"Remove",location:"top"},{activator:l(({props:X})=>[a(V,T(X,{onClick:O=>t.$emit("remove",g)}),{default:l(()=>e[24]||(e[24]=[m(" mdi-delete ")])),_:2},1040,["onClick"])]),_:2},1024)]),"no-data":l(()=>e[25]||(e[25]=[b("span",null," Currently no items on this graph ",-1)])),_:1},8,["headers","items"])]),_:1})]),_:1},8,["modelValue"]),a(K,{class:"px-2"},{default:l(()=>[a(d),a(z,{variant:"outlined",onClick:e[11]||(e[11]=g=>t.$emit("cancel"))},{default:l(()=>e[26]||(e[26]=[m(" Cancel ")])),_:1}),a(z,{variant:"flat",onClick:r.closeOk},{default:l(()=>e[27]||(e[27]=[m(" Ok ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const pe=L(c,[["render",ce]]),ge={props:{modelValue:Boolean,item:{type:Object,required:!0},colors:{type:Array,required:!0}},data:function(){return{editItem:null,limitsName:"NONE",limits:{NONE:[]},valueTypes:["CONVERTED","RAW"],reduction:[{title:"NONE",value:"DECOM"},{title:"REDUCED_MINUTE",value:"REDUCED_MINUTE"},{title:"REDUCED_HOUR",value:"REDUCED_HOUR"},{title:"REDUCED_DAY",value:"REDUCED_DAY"}],reducedTypes:["MIN","MAX","AVG","STDDEV"]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},limitsNames(){return Object.keys(this.limits)}},async created(){this.editItem={...this.item},new ee().get_item(this.item.targetName,this.item.packetName,this.item.itemName).then(t=>{for(const[e,i]of Object.entries(t.limits))Object.keys(i).includes("red_low")&&(this.limits[e]=Object.values(i));this.limitsName=Object.keys(this.limits).find(e=>this.limits[e]+""==this.editItem.limits+"")})}},fe={key:0},ve={class:"pa-3"};function ye(t,e,i,n,s,r){const d=u("v-card-title"),o=u("v-select"),v=u("v-card-text"),p=u("v-spacer"),y=u("v-btn"),D=u("v-card-actions"),_=u("v-card"),k=u("v-dialog");return w(),x(k,{modelValue:r.show,"onUpdate:modelValue":e[9]||(e[9]=f=>r.show=f),width:"400",onKeydown:e[10]||(e[10]=Z(f=>t.success(),["enter"]))},{default:l(()=>[a(_,null,{default:l(()=>[a(d,{class:"mb-2"},{default:l(()=>e[11]||(e[11]=[m("Edit Item")])),_:1}),a(v,null,{default:l(()=>[a(o,{variant:"outlined","hide-details":"",label:"Value Type",items:t.valueTypes,modelValue:t.editItem.valueType,"onUpdate:modelValue":e[0]||(e[0]=f=>t.editItem.valueType=f),class:"mb-2"},null,8,["items","modelValue"]),a(o,{variant:"outlined","hide-details":"",label:"Reduction",items:t.reduction,modelValue:t.editItem.reduced,"onUpdate:modelValue":e[1]||(e[1]=f=>t.editItem.reduced=f),class:"mb-2"},null,8,["items","modelValue"]),a(o,{variant:"outlined","hide-details":"",label:"Reduced Type",items:t.reducedTypes,disabled:t.editItem.reduced==="DECOM",modelValue:t.editItem.reducedType,"onUpdate:modelValue":e[2]||(e[2]=f=>t.editItem.reducedType=f),class:"mb-2"},null,8,["items","disabled","modelValue"]),a(o,{variant:"outlined","hide-details":"",label:"Color",items:i.colors,modelValue:t.editItem.color,"onUpdate:modelValue":[e[3]||(e[3]=f=>t.editItem.color=f),e[4]||(e[4]=f=>t.$emit("changeColor",f))],class:"mb-2"},null,8,["items","modelValue"]),r.limitsNames.length>1?(w(),Y("div",fe,[a(o,{variant:"outlined","hide-details":"",label:"Display Limits",items:r.limitsNames,modelValue:t.limitsName,"onUpdate:modelValue":[e[5]||(e[5]=f=>t.limitsName=f),e[6]||(e[6]=f=>t.$emit("changeLimits",t.limits[t.limitsName]))]},null,8,["items","modelValue"]),b("div",ve,S(t.limitsName)+": "+S(t.limits[t.limitsName]),1)])):E("",!0)]),_:1}),a(D,{class:"px-2"},{default:l(()=>[a(p),a(y,{variant:"outlined",onClick:e[7]||(e[7]=f=>t.$emit("cancel"))},{default:l(()=>e[12]||(e[12]=[m(" Cancel ")])),_:1}),a(y,{variant:"flat",onClick:e[8]||(e[8]=f=>t.$emit("close",t.editItem))},{default:l(()=>e[13]||(e[13]=[m(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const we=L(ge,[["render",ye]]),be={components:{GraphEditDialog:pe,GraphEditItemDialog:we},props:{id:{type:Number,required:!0},selectedGraphId:{type:Number},state:{type:String,required:!0},startTime:{type:Number},secondsGraphed:{type:Number,required:!0},pointsSaved:{type:Number,required:!0},pointsGraphed:{type:Number,required:!0},refreshIntervalMs:{type:Number,default:200},hideToolbar:{type:Boolean,default:!1},hideOverview:{type:Boolean,default:!1},sparkline:{type:Boolean,default:!1},initialItems:{type:Array},height:{type:Number},width:{type:Number},timeZone:{type:String,default:"local"}},mixins:[B],data(){return{lines:[],active:!0,expand:!0,fullWidth:!0,fullHeight:!0,graph:null,editGraph:!1,editGraphMenu:!1,editGraphMenuX:0,editGraphMenuY:0,editItem:!1,itemMenu:!1,itemMenuX:0,itemMenuY:0,legendMenu:!1,legendMenuX:0,legendMenuY:0,legendPosition:"bottom",selectedItem:null,hideToolbarData:this.hideToolbar,showOverview:!this.hideOverview,hideOverviewData:this.hideOverview,title:"",overview:null,data:[[]],dataChanged:!1,timeout:null,graphMinY:null,graphMaxY:null,graphStartDateTime:null,graphEndDateTime:null,indexes:{},items:this.initialItems||[],limitsValues:[],drawInterval:null,zoomChart:!1,zoomOverview:!1,cable:new J,subscription:null,needToUpdate:!1,errorDialog:!1,errors:[],colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{calcFullSize:function(){return this.fullWidth||this.fullHeight},error:function(){return this.errorDialog&&this.errors.length>0?JSON.stringify(this.errors,null,4):null}},created(){this.title=`Graph ${this.id}`;for(const[t,e]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(e)]=t+1,e.color===void 0&&(e.color=this.colors[this.colorIndex]),this.colorIndex++,this.colorIndex===this.colors.length&&(this.colorIndex=0)},mounted(){const{chartSeries:t,overviewSeries:e}=this.items.reduce((n,s)=>{const r={spanGaps:!0};return n.chartSeries.push({...r,item:s,label:this.formatLabel(s),stroke:(d,o)=>this.items[o-1].color,width:2,value:(d,o)=>typeof o=="string"||isNaN(o)?"NaN":o==null?"--":o.toFixed(3)}),n.overviewSeries.push({...r}),n},{chartSeries:[],overviewSeries:[]});let i={};if(this.sparkline)this.hideToolbarData=!0,this.hideOverviewData=!0,this.showOverview=!1,i={width:this.width,height:this.height,pxAlign:!1,cursor:{show:!1},select:{show:!1},legend:{show:!1},scales:{x:{time:!1}},axes:[{show:!1},{show:!1}],series:[{},{stroke:"white"}]},this.graph=new M(i,this.data,document.getElementById(`chart${this.id}`));else{let n=Intl.DateTimeFormat().resolvedOptions().timeZone;this.timeZone&&this.timeZone!=="local"&&(n=this.timeZone),i={...this.getSize("chart"),...this.getScales(),...this.getAxes("chart"),plugins:[this.linesPlugin()],tzDate:r=>M.tzDate(new Date(r*1e3),n),series:[{label:"Time",value:(r,d)=>d==null?"--":this.formatSeconds(d,this.timeZone)},...t],cursor:{drag:{x:!0,y:!1},sync:{key:"openc3"},bind:{mouseup:(r,d,o)=>v=>{this.state==="pause"&&r.select.width===0&&this.$emit("start"),o(v)}}},hooks:{setScale:[(r,d)=>{if(d==="x"&&!this.zoomOverview&&this.overview){this.zoomChart=!0;let o=Math.round(this.overview.valToPos(r.scales.x.min,"x")),v=Math.round(this.overview.valToPos(r.scales.x.max,"x"));this.overview.setSelect({left:o,width:v-o}),this.zoomChart=!1}}],setSelect:[r=>{this.state==="start"&&r.select.width>0&&this.$emit("pause")}],ready:[r=>{r.root.querySelector(".u-over").addEventListener("contextmenu",o=>{o.preventDefault(),this.itemMenu=!1,this.legendMenu=!1,this.editGraphMenuX=o.clientX,this.editGraphMenuY=o.clientY,this.editGraphMenu=!0});let d=r.root.querySelector(".u-legend");d.addEventListener("contextmenu",o=>{o.preventDefault(),this.editGraphMenu=!1,this.legendMenu=!1,this.itemMenuX=o.clientX,this.itemMenuY=o.clientY;let v=o.target.closest(".u-series"),p=Array.prototype.slice.call(d.childNodes[0].childNodes).indexOf(v),y=r.series[p];y.item?(this.selectedItem=y.item,this.itemMenu=!0):(this.itemMenu=!1,this.legendMenuX=o.clientX,this.legendMenuY=o.clientY,this.legendMenu=!0)}),d.querySelector("tbody").appendChild(this.$refs.info)}]}},this.graph=new M(i,this.data,document.getElementById(`chart${this.id}`));const s={...this.getSize("overview"),...this.getScales(),...this.getAxes("overview"),tzDate:r=>M.tzDate(new Date(r*1e3),n),series:[...e],cursor:{y:!1,drag:{setScale:!1,x:!0,y:!1}},legend:{show:!1},hooks:{setSelect:[r=>{if(!this.zoomChart){this.state==="start"&&r.select.width>0&&this.$emit("pause"),this.zoomOverview=!0;let d=r.posToVal(r.select.left,"x"),o=r.posToVal(r.select.left+r.select.width,"x");this.graph.setScale("x",{min:d,max:o}),this.zoomOverview=!1}}]}};this.overview=new M(s,this.data,document.getElementById(`overview${this.id}`)),this.moveLegend(this.legendPosition),window.addEventListener("resize",this.resize)}this.state!=="stop"&&this.startGraph()},beforeUnmount:function(){this.stopGraph(),this.cable.disconnect(),window.removeEventListener("resize",this.resize)},watch:{state:function(t,e){switch(t){case"start":e==="stop"&&this.startGraph();break;case"stop":this.stopGraph();break}},data:function(t,e){this.dataChanged=!0},graphMinY:function(t,e){let i=parseFloat(t);isNaN(i)||(this.graphMinY=i),this.setGraphRange()},graphMaxY:function(t,e){let i=parseFloat(t);isNaN(i)||(this.graphMaxY=i),this.setGraphRange()},graphStartDateTime:function(t,e){t&&typeof t=="string"?(this.graphStartDateTime=this.parseDateTime(this.graphStartDateTime,this.timeZone)*1e6,this.graphStartDateTime!==e&&(this.needToUpdate=!0)):t===null&&e&&(this.graphStartDateTime=null,this.needToUpdate=!0)},graphEndDateTime:function(t,e){t&&typeof t=="string"?(this.graphEndDateTime=this.parseDateTime(this.graphEndDateTime,this.timeZone)*1e6,this.graphEndDateTime!==e&&(this.needToUpdate=!0)):t===null&&e&&(this.graphEndDateTime=null,this.needToUpdate=!0)}},methods:{startGraph:function(){this.subscribe(),this.timeout=setTimeout(()=>{this.updateTimeout()},this.refreshIntervalMs)},stopGraph:function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},updateTimeout:function(){this.updateGraphData(),this.timeout=setTimeout(()=>{this.updateTimeout()},this.refreshIntervalMs)},updateGraphData:function(){if(this.state==="pause"||!this.dataChanged)return;this.graph.setData(this.data),this.overview&&this.overview.setData(this.data);let t=this.data[0][this.data[0].length-1],e=this.data[0][this.data[0].length-this.pointsGraphed],i=this.data[0][0];i<t-this.secondsGraphed&&(i=t-this.secondsGraphed),e>i&&(i=e),this.graph.setScale("x",{min:i,max:t}),this.dataChanged=!1},formatLabel(t){if(t.valueType==="CONVERTED"&&t.reduced==="DECOM")return t.itemName;{let e="";return t.valueType!=="CONVERTED"&&(e+=t.valueType),t.reduced!=="DECOM"&&(e!==""&&(e+=" "),e+=`${t.reduced.split("_")[1]} ${t.reducedType}`),`${t.itemName} (${e})`}},moveLegend:function(t){switch(t){case"bottom":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.remove("top-legend");break;case"top":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("top-legend");break;case"left":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.add("side-legend"),this.graph.root.classList.add("left-legend");break;case"right":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("side-legend");break}this.legendPosition=t,this.resize()},clearErrors:function(){this.errors=[]},editGraphClose:function(t){this.editGraph=!1,this.title=t.title,this.legendPosition=t.legendPosition,this.graphMinY=t.graphMinY,this.graphMaxY=t.graphMaxY,this.lines=[...t.lines],this.graphStartDateTime=t.startDateTime,this.graphEndDateTime=t.endDateTime,this.$nextTick(()=>{if(this.needToUpdate){if(this.subscription==null)this.startGraph();else{let e=JSON.parse(JSON.stringify(this.items));this.removeItems(e),setTimeout(()=>{this.addItems(e)},0)}this.needToUpdate=!1}}),this.moveLegend(this.legendPosition),this.$emit("edit")},resize:function(){this.graph.setSize(this.getSize("chart")),this.overview&&this.overview.setSize(this.getSize("overview")),this.$emit("resize",this.id)},expandAll:function(){this.fullWidth=!0,this.fullHeight=!0,this.resize()},collapseAll:function(){this.fullWidth=!1,this.fullHeight=!1,this.resize()},expandWidth:function(){this.fullWidth=!0,this.resize()},collapseWidth:function(){this.fullWidth=!1,this.resize()},expandHeight:function(){this.fullHeight=!0,this.resize()},collapseHeight:function(){this.fullHeight=!1,this.resize()},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-graph",this.id)},setGraphRange:function(){let t=.1;(this.graphMinY||this.graphMinY===0||this.graphMaxY||this.graphMaxY===0)&&(t=0),this.graph.scales.y.range=(e,i,n)=>{let s=i;(this.graphMinY||this.graphMinY===0)&&(s=this.graphMinY);let r=n;return(this.graphMaxY||this.graphMaxY===0)&&(r=this.graphMaxY),M.rangeNum(s,r,t,!0)}},subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:()=>{this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(t=>{this.subscription=t})},getSize:function(t){let e=0;const i=document.getElementById("openc3-nav-drawer");i&&(e=i.classList.contains("v-navigation-drawer--active")?i.clientWidth:0);let n=0;(this.legendPosition==="right"||this.legendPosition==="left")&&(n=document.getElementsByClassName("u-legend")[0].clientWidth);const s=Math.max(document.documentElement.clientWidth,window.innerWidth||0)-e-n,r=Math.max(document.documentElement.clientHeight,window.innerHeight||0),d=document.getElementsByClassName("v-expansion-panel")[0];let o=100;t==="overview"?this.fullHeight&&!this.hideOverviewData?this.showOverview=!0:this.showOverview=!1:(o=r-d.clientHeight-o-250,this.fullHeight||(o=o/2+10));let v=s-68;return this.fullWidth||(v=v/2-10),{width:this.width||v,height:this.height||o}},getScales:function(){return{scales:{x:{range(t,e,i){return e==null?[1566453600,1566497660]:[e,i]}},y:{range(t,e,i){return e==null?[-100,100]:M.rangeNum(e,i,.1,!0)}}}}},getAxes:function(t){let e="rgba(255, 255, 255, .1)",i="white";return{axes:[{stroke:i,grid:{show:!0,stroke:e,width:2}},{size:80,stroke:i,grid:{show:t!=="overview",stroke:e,width:2},values(n,s){return(s.some(r=>r>=1e7)||s.every(r=>r<.01))&&(s=s.map(r=>r.toExponential(3))),s}}]}},closeEditItem:function(t){this.editItem=!1,(this.graphEndDateTime!==null&&this.selectedItem!==t||this.selectedItem.valueType!==t.valueType||this.selectedItem.reduced!==t.reduced||this.selectedItem.reducedType!==t.reducedType)&&this.changeItem(t)},changeColor:function(t){let e=this.subscriptionKey(this.selectedItem),i=this.indexes[e];this.items[i-1].color=t,this.selectedItem.color=t,this.graph.root.querySelectorAll(".u-marker")[i].style.borderColor=t},changeLimits:function(t){let e=this.subscriptionKey(this.selectedItem),i=this.indexes[e];this.items[i-1].limits=t,this.selectedItem.limits=t,this.limitsValues=t},linesPlugin:function(){return{hooks:{draw:t=>{const{ctx:e,bbox:i}=t,n=t.valToPos(t.scales.y.min,"y",!0),s=t.valToPos(t.scales.y.max,"y",!0),r=t.valToPos(this.limitsValues[0],"y",!0),d=t.valToPos(this.limitsValues[1],"y",!0),o=t.valToPos(this.limitsValues[2],"y",!0),v=t.valToPos(this.limitsValues[3],"y",!0);if(this.lines.forEach(p=>{t.scales.y.min<=p.yValue&&p.yValue<=t.scales.y.max&&(e.save(),e.beginPath(),e.strokeStyle=p.color,e.lineWidth=2,e.moveTo(i.left,t.valToPos(p.yValue,"y",!0)),e.lineTo(i.left+i.width,t.valToPos(p.yValue,"y",!0)),e.stroke(),e.restore())}),e.save(),e.beginPath(),e.fillStyle="rgba(255,0,0,0.15)",t.scales.y.min<this.limitsValues[0]){let p=r<s?s:r;e.fillRect(i.left,r,i.width,n-p)}if(t.scales.y.max>this.limitsValues[3]){let p=n<v?n:v;e.fillRect(i.left,s,i.width,p-s)}if(e.fillStyle="rgba(255,255,0,0.15)",t.scales.y.min<this.limitsValues[1]&&t.scales.y.max>this.limitsValues[0]){let p=d<s?s:d;e.fillRect(i.left,p,i.width,r-p)}if(t.scales.y.max>this.limitsValues[2]&&t.scales.y.min<this.limitsValues[3]){let p=n<v?n:v,y=n<o?n:o;e.fillRect(i.left,p,i.width,y-p)}if(e.fillStyle="rgba(0,255,0,0.15)",this.limitsValues.length===4){if(t.scales.y.min<this.limitsValues[2]&&t.scales.y.max>this.limitsValues[1]){let p=o<s?s:o,y=n<d?n:d;e.fillRect(i.left,p,i.width,y-p)}}else{const p=t.valToPos(this.limitsValues[4],"y",!0),y=t.valToPos(this.limitsValues[5],"y",!0);if(t.scales.y.min<this.limitsValues[4]&&t.scales.y.max>this.limitsValues[1]){let k=p<s?s:p;e.fillRect(i.left,k,i.width,d-k)}if(t.scales.y.max>this.limitsValues[5]&&t.scales.y.min<this.limitsValues[2]){let k=n<o?n:o,f=n<y?n:y;e.fillRect(i.left,k,i.width,f-k)}e.fillStyle="rgba(0,0,255,0.15)";let D=y<s?s:y,_=n<p?n:p;e.fillRect(i.left,D,i.width,_-D)}e.stroke(),e.restore()}}}},changeItem:function(t){this.removeItems([this.selectedItem]),this.selectedItem.valueType=t.valueType,this.selectedItem.reduced=t.reduced,this.selectedItem.reducedType=t.reducedType,setTimeout(()=>{this.addItems([this.selectedItem])},0)},addItems:function(t,e="CONVERTED"){t.forEach(i=>{i.valueType||(i.valueType=e),i.color||(i.color=this.colors[this.colorIndex]),i.limits||(i.limits=[]),i.limits.length>0&&(this.limitsValues=i.limits),this.colorIndex=(this.colorIndex+1)%this.colors.length,this.items.push(i);const n=this.data.length;this.graph.addSeries(this.createSeriesConfig(i),n),this.overview&&this.overview.addSeries(this.createOverviewSeriesConfig(),n),this.data.splice(n,0,Array(this.data[0].length)),this.indexes[this.subscriptionKey(i)]=n}),this.updateColorIndex(t),this.addItemsToSubscription(t),this.$emit("resize"),this.$emit("edit")},createSeriesConfig:function(t){return{spanGaps:!0,item:t,label:this.formatLabel(t),stroke:(e,i)=>this.items[i-1].color,width:2,value:(e,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":Math.abs(i)<.01&&i!==0||Math.abs(i)>=1e7?i.toExponential(6):i.toFixed(6)}},createOverviewSeriesConfig:function(){return{spanGaps:!0,stroke:(t,e)=>this.items[e-1].color}},updateColorIndex:function(t){const e=t[t.length-1];if(e){const i=this.colors.indexOf(e.color);i!==-1&&(this.colorIndex=(i+1)%this.colors.length)}},addItemsToSubscription:function(t=this.items){let e=this.startTime;this.graphStartDateTime&&(e=this.graphStartDateTime),this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(i=>{i&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t.map(this.subscriptionKey),start_time:e,end_time:this.graphEndDateTime})})},clearAllData:function(){this.data[0]=[],this.clearData(this.items)},clearData:function(t){for(const e of t.map(this.subscriptionKey)){let i=this.indexes[e];this.data[i]=Array(this.data[0].length).fill(null),this.graph.setData(this.data),this.overview&&this.overview.setData(this.data)}this.data.length===2&&(this.data[0]=[],this.graph.setData(this.data),this.overview.setData(this.data))},removeItems:function(t){this.removeItemsFromSubscription(t);for(const e of t.map(this.subscriptionKey)){const i=this.reorderIndexes(e);this.items.splice(i-1,1),this.data.splice(i,1),this.graph.delSeries(i),this.graph.setData(this.data),this.overview&&(this.overview.delSeries(i),this.overview.setData(this.data))}this.data.length===1&&(this.data[0]=[],this.graph.setData(this.data),this.overview.setData(this.data)),this.$emit("resize"),this.$emit("edit")},removeItemsFromSubscription:function(t=this.items){this.subscription&&this.subscription.perform("remove",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t.map(this.subscriptionKey)})},reorderIndexes:function(t){let e=this.indexes[t];delete this.indexes[t];for(let i in this.indexes)this.indexes[i]>e&&(this.indexes[i]-=1);return e},received:function(t){this.cable.recordPing();for(let e=0;e<t.length;e++){let i=t[e].__time/1e9,n=t[0].length;if(n===0||i>t[0][n-1]){for(let s=0;s<this.data.length;s++)this.data[s].push(null);this.set_data_at_index(this.data[0].length-1,i,t[e])}else{let s=Q(this.data[0],i,this.bs_comparator);if(s>=0)this.set_data_at_index(s,i,t[e]);else{let r=-s-1;for(let d=0;d<this.data.length;d++)this.data[d].splice(r,0,null);this.set_data_at_index(r,i,t[e])}}}if(this.startTime==null&&this.data[0][0]){let e=this.data[0][0]*1e9;this.$emit("started",e)}this.dataChanged=!0},bs_comparator:function(t,e){return t-e},set_data_at_index:function(t,e,i){this.data[0][t]=e;for(const[n,s]of Object.entries(i)){if(n==="time")continue;let r=this.indexes[n];if(r){let d=this.data[r];if(s!=null&&s.raw)d[t]=null;else if(typeof s=="string"){if(d[t]=null,!n.includes("__RAW")){for(let o of this.items)if(this.subscriptionKey(o)===n){this.selectedItem=o;break}this.changeItem({valueType:"RAW",reduced:this.selectedItem.reduced,reducedType:this.selectedItem.reducedType})}}else d[t]=s}}},subscriptionKey:function(t){let e=`${t.reduced}__TLM__${t.targetName}__${t.packetName}__${t.itemName}__${t.valueType}`;return(t.reduced==="REDUCED_MINUTE"||t.reduced==="REDUCED_HOUR"||t.reduced==="REDUCED_DAY")&&(e+=`__${t.reducedType}`),e}}},_e={class:"mx-2"},xe={class:"pa-1",id:"chart",ref:"chart"},Te=["id"],De=["id"],ke={key:5,class:"u-series",ref:"info"};function Ve(t,e,i,n,s,r){const d=u("v-icon"),o=u("v-tooltip"),v=u("v-spacer"),p=u("v-toolbar"),y=u("v-expand-transition"),D=u("v-card"),_=u("graph-edit-dialog"),k=u("v-text-field"),f=u("v-row"),G=u("v-textarea"),z=u("v-btn"),A=u("v-dialog"),V=u("v-list-item-title"),C=u("v-list-item"),$=u("v-list"),U=u("v-menu"),F=u("graph-edit-item-dialog"),K=u("v-list-subheader");return w(),Y("div",{onClick:e[21]||(e[21]=ie(h=>t.$emit("click"),["prevent"]))},[a(D,null,{default:l(()=>[I(a(p,{height:"24",class:ae(["pl-2 pr-2",i.selectedGraphId===i.id?"active":""])},{default:l(()=>[I(b("div",_e,[a(o,{text:"Errors",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:e[0]||(e[0]=W=>s.errorDialog=!0)}),{default:l(()=>e[22]||(e[22]=[m(" mdi-alert ")])),_:2},1040)]),_:1})],512),[[N,s.errors.length!==0]]),a(o,{text:"Edit",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:e[1]||(e[1]=W=>s.editGraph=!0),"data-test":"edit-graph-icon"}),{default:l(()=>e[23]||(e[23]=[m(" mdi-pencil ")])),_:2},1040)]),_:1}),a(v),b("span",null,S(s.title),1),a(v),I(b("div",null,[r.calcFullSize?(w(),x(o,{key:0,text:"Collapse",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.collapseAll,"data-test":"collapse-all"}),{default:l(()=>e[24]||(e[24]=[m(" mdi-arrow-collapse ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Expand",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.expandAll,"data-test":"expand-all"}),{default:l(()=>e[25]||(e[25]=[m(" mdi-arrow-expand ")])),_:2},1040,["onClick"])]),_:1}))],512),[[N,s.expand]]),I(b("div",null,[s.fullWidth?(w(),x(o,{key:0,text:"Collapse Width",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.collapseWidth,"data-test":"collapse-width"}),{default:l(()=>e[26]||(e[26]=[m(" mdi-arrow-collapse-horizontal ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Expand Width",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.expandWidth,"data-test":"expand-width"}),{default:l(()=>e[27]||(e[27]=[m(" mdi-arrow-expand-horizontal ")])),_:2},1040,["onClick"])]),_:1}))],512),[[N,s.expand]]),I(b("div",null,[s.fullHeight?(w(),x(o,{key:0,text:"Collapse Height",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.collapseHeight,"data-test":"collapse-height"}),{default:l(()=>e[28]||(e[28]=[m(" mdi-arrow-collapse-vertical ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Expand Height",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.expandHeight,"data-test":"expand-height"}),{default:l(()=>e[29]||(e[29]=[m(" mdi-arrow-expand-vertical ")])),_:2},1040,["onClick"])]),_:1}))],512),[[N,s.expand]]),s.expand?(w(),x(o,{key:0,text:"Minimize",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.minMaxTransition,"data-test":"minimize-screen-icon"}),{default:l(()=>e[30]||(e[30]=[m(" mdi-window-minimize ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Maximize",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.minMaxTransition,"data-test":"maximize-screen-icon"}),{default:l(()=>e[31]||(e[31]=[m(" mdi-window-maximize ")])),_:2},1040,["onClick"])]),_:1})),a(o,{text:"Close",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:e[2]||(e[2]=W=>t.$emit("close-graph")),"data-test":"close-graph-icon"}),{default:l(()=>e[32]||(e[32]=[m(" mdi-close-box ")])),_:2},1040)]),_:1})]),_:1},8,["class"]),[[N,!s.hideToolbarData]]),a(y,null,{default:l(()=>[I(b("div",xe,[b("div",{id:`chart${i.id}`},null,8,Te),e[33]||(e[33]=b("div",{id:"betweenCharts"},null,-1)),I(b("div",{id:`overview${i.id}`},null,8,De),[[N,s.showOverview]])],512),[[N,s.expand]])]),_:1})]),_:1}),s.editGraph?(w(),x(_,{key:0,modelValue:s.editGraph,"onUpdate:modelValue":e[3]||(e[3]=h=>s.editGraph=h),title:s.title,"legend-position":s.legendPosition,items:s.items,"graph-min-y":s.graphMinY,"graph-max-y":s.graphMaxY,lines:s.lines,colors:s.colors,"start-date-time":s.graphStartDateTime,"end-date-time":s.graphEndDateTime,"time-zone":i.timeZone,onRemove:e[4]||(e[4]=h=>r.removeItems([h])),onOk:r.editGraphClose,onCancel:e[5]||(e[5]=h=>s.editGraph=!1)},null,8,["modelValue","title","legend-position","items","graph-min-y","graph-max-y","lines","colors","start-date-time","end-date-time","time-zone","onOk"])):E("",!0),a(A,{modelValue:s.errorDialog,"onUpdate:modelValue":e[7]||(e[7]=h=>s.errorDialog=h),"max-width":"600"},{default:l(()=>[a(p,{height:"24"},{default:l(()=>[a(v),e[34]||(e[34]=b("span",null," Errors ",-1)),a(v)]),_:1}),a(D,{class:"pa-3"},{default:l(()=>[a(f,{dense:""},{default:l(()=>[a(k,{readonly:"","hide-details":"",modelValue:s.title,"onUpdate:modelValue":e[6]||(e[6]=h=>s.title=h),class:"pb-2",label:"Graph Title"},null,8,["modelValue"])]),_:1}),a(f,{class:"my-3"},{default:l(()=>[a(G,{readonly:"",rows:"8",value:r.error},null,8,["value"])]),_:1}),a(f,null,{default:l(()=>[a(z,{block:"",onClick:r.clearErrors},{default:l(()=>e[35]||(e[35]=[m(" Clear ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),s.editGraphMenu?(w(),x(U,{key:1,modelValue:s.editGraphMenu,"onUpdate:modelValue":e[9]||(e[9]=h=>s.editGraphMenu=h),target:[s.editGraphMenuX,s.editGraphMenuY],absolute:"","offset-y":""},{default:l(()=>[a($,null,{default:l(()=>[a(C,{onClick:e[8]||(e[8]=h=>s.editGraph=!0)},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>[m(" Edit "+S(s.title),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):E("",!0),s.editItem?(w(),x(F,{key:2,modelValue:s.editItem,"onUpdate:modelValue":e[10]||(e[10]=h=>s.editItem=h),colors:s.colors,item:s.selectedItem,onChangeColor:r.changeColor,onChangeLimits:r.changeLimits,onCancel:e[11]||(e[11]=h=>s.editItem=!1),onClose:r.closeEditItem},null,8,["modelValue","colors","item","onChangeColor","onChangeLimits","onClose"])):E("",!0),s.itemMenu?(w(),x(U,{key:3,modelValue:s.itemMenu,"onUpdate:modelValue":e[15]||(e[15]=h=>s.itemMenu=h),target:[s.itemMenuX,s.itemMenuY],absolute:"","offset-y":""},{default:l(()=>[a($,{nav:"",density:"compact"},{default:l(()=>[a(K,null,{default:l(()=>[m(S(s.selectedItem.targetName)+" "+S(s.selectedItem.packetName)+" "+S(s.selectedItem.itemName),1)]),_:1}),a(C,{onClick:e[12]||(e[12]=h=>s.editItem=!0)},{prepend:l(()=>[a(d,{icon:"mdi-pencil"})]),default:l(()=>[a(V,null,{default:l(()=>e[36]||(e[36]=[m(" Edit ")])),_:1})]),_:1}),a(C,{onClick:e[13]||(e[13]=h=>r.clearData([s.selectedItem]))},{prepend:l(()=>[a(d,{icon:"mdi-eraser"})]),default:l(()=>[a(V,null,{default:l(()=>e[37]||(e[37]=[m(" Clear ")])),_:1})]),_:1}),a(C,{onClick:e[14]||(e[14]=h=>r.removeItems([s.selectedItem]))},{prepend:l(()=>[a(d,{icon:"mdi-delete"})]),default:l(()=>[a(V,null,{default:l(()=>e[38]||(e[38]=[m(" Delete ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):E("",!0),s.legendMenu?(w(),x(U,{key:4,modelValue:s.legendMenu,"onUpdate:modelValue":e[20]||(e[20]=h=>s.legendMenu=h),target:[s.legendMenuX,s.legendMenuY],absolute:"","offset-y":""},{default:l(()=>[a($,null,{default:l(()=>[a(C,{onClick:e[16]||(e[16]=h=>r.moveLegend("top"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[39]||(e[39]=[m(" Legend Top ")])),_:1})]),_:1}),a(C,{onClick:e[17]||(e[17]=h=>r.moveLegend("bottom"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[40]||(e[40]=[m(" Legend Bottom ")])),_:1})]),_:1}),a(C,{onClick:e[18]||(e[18]=h=>r.moveLegend("left"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[41]||(e[41]=[m(" Legend Left ")])),_:1})]),_:1}),a(C,{onClick:e[19]||(e[19]=h=>r.moveLegend("right"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[42]||(e[42]=[m(" Legend RIght ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):E("",!0),i.sparkline?E("",!0):(w(),Y("div",ke,[a(o,{text:"Click item to toggle, Right click to edit",location:"top"},{activator:l(({props:h})=>[a(d,se(le(h)),{default:l(()=>e[43]||(e[43]=[m(" mdi-information-variant-circle ")])),_:2},1040)]),_:1})],512))])}const Ee=j("S",L(be,[["render",Ve],["__scopeId","data-v-485a5da2"]]));function Ce(t,e,i){const n=R(t,void 0);if(isNaN(e))return H(t,NaN);if(!e)return n;const s=n.getDate(),r=H(t,n.getTime());r.setMonth(n.getMonth()+e+1,0);const d=r.getDate();return s>=d?r:(n.setFullYear(r.getFullYear(),r.getMonth(),s),n)}function Me(t,e,i){return te(t,-e,i)}function Ie(t,e,i){return Ce(t,-e)}function Ne(t,e,i){const{years:n=0,months:s=0,weeks:r=0,days:d=0,hours:o=0,minutes:v=0,seconds:p=0}=e,y=Ie(t,s+n*12),D=Me(y,d+r*7,i),_=v+o*60,k=(p+_*60)*1e3;return H(t,+D-k)}const Oe=j("_",{mixins:[ne],data:function(){return{id:Math.floor(Math.random()*1e11),state:"start",items:[{targetName:this.parameters[0],packetName:this.parameters[1],itemName:this.parameters[2],valueType:this.parameters[3]||"CONVERTED",reduced:this.parameters[4]||"DECOM",reducedType:this.parameters[5]||null}],startTime:null,secondsGraphed:3600,pointsSaved:3600,pointsGraphed:3600,size:{height:300,width:400}}},created:function(){this.appliedSettings.forEach(t=>{switch(t[0]){case"ITEM":this.items.push({targetName:t[1],packetName:t[2],itemName:t[3],valueType:t[4]||"CONVERTED",reduced:t[5]||"DECOM",reducedType:t[6]||null});case"STARTTIME":let e=P(t[1],"yyyy/MM/dd HH:mm:ss",new Date);this.startTime=e.getTime()*1e6;break;case"HISTORY":let i=parseInt(t[1].slice(0,t[1].length-1)),n=null,s=1;switch(t[1][t[1].length-1]){case"d":n="days",s=3600*24;break;case"h":n="hours",s=3600;break;case"m":n="minutes",s=60;break;case"s":n="seconds";break;default:throw new Error(`Unknown time suffix: ${t[1]}!`)}let r={};r[n]=i,this.startTime=Ne(new Date,r).getTime()*1e6,i*s>this.secondsGraphed&&(this.secondsGraphed=i*s),i*s>this.pointsSaved&&(this.pointsSaved=i*s),i*s>this.pointsGraphed&&(this.pointsGraphed=i*s);break;case"SECONDSGRAPHED":this.secondsGraphed=parseInt(t[1]);break;case"POINTSSAVED":this.pointsSaved=parseInt(t[1]);break;case"POINTSGRAPHED":this.pointsGraphed=parseInt(t[1]);break;case"SIZE":this.size.width=parseInt(t[1]),this.size.height=parseInt(t[2]);break}}),this.items=this.items.map(t=>{let e=t.itemName;if(t.itemName.includes("[["))t.itemName=t.itemName.replace("[[","[").replace("]]","]"),e=t.itemName;else if(t.itemName.includes("[")){let i=t.itemName.match(/\[(\d+)\]/);this.arrayIndex=parseInt(i[1]),e=t.itemName.replace(i[0],"")}return this.$emit("addItem",`${t.targetName}__${t.packetName}__${e}__${t.valueType}`,!0),t})},destroyed(){this.items.map(t=>this.$emit("deleteItem",`${t.targetName}__${t.packetName}__${t.itemName}__${t.valueType}`))}})}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(l,c){"use strict";var n,t,u;return{setters:[e=>{n=e.openBlock,t=e.createElementBlock},e=>{u=e.s},null,null,null,null],execute:function(){const e={};function r(o,i){return n(),t("hr")}const s=l("default",u(e,[["render",r]]))}}});
|