openc3-cosmos-tool-dataextractor 7.2.1 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/dataextractor/ArrayWidget-5XQXgMtp-7aac81e1d2915499d2e7.js +2 -0
- data/tools/dataextractor/{ArrayplotWidget-fdXLhGAl-ca7f994f090988e914c8.js → ArrayplotWidget-pk7OINvA-b0cf9a7e80b2654898de.js} +1 -1
- data/tools/dataextractor/{BarColumn-Bb305iCi-f1224abcf7699dc826e3.js → BarColumn-JQ552zb0-300e9e80c2352ef6c1e1.js} +1 -1
- data/tools/dataextractor/BlockWidget-B_5TnoG_-0f284d2271b50cea0ef2.js +2 -0
- data/tools/dataextractor/ButtonWidget-CiZGNEls-d10656bdba88fcf3076a.js +1 -0
- data/tools/dataextractor/{CanvasWidget-BRdVWln5-5e4c8e688cfa5fe95acd.js → CanvasWidget-CzLQAoHY-7de6cf67a0e63406b0bf.js} +1 -1
- data/tools/dataextractor/CanvasdotWidget-CcI1HwAp-d53431eac7997f41b45e.js +1 -0
- data/tools/dataextractor/{CanvasimageWidget-Czbq1GuF-28a339483f5dcfeacf7d.js → CanvasimageWidget-CYg1rKr_-9556ad19ddad84b30877.js} +1 -1
- data/tools/dataextractor/{CanvasimagevalueWidget-DKt5JgEt-8087cbd51a64393ab57c.js → CanvasimagevalueWidget-e0p2honY-5093617dfdc2332608a0.js} +1 -1
- data/tools/dataextractor/CanvaslabelWidget-CgECf4wH-79ee9b368d94844bedc3.js +1 -0
- data/tools/dataextractor/{CanvaslabelvalueWidget-BhzvZVfD-9d04bfc299b1b7b03b05.js → CanvaslabelvalueWidget-bCIPWE4c-41e2e3cddc94490e3f33.js} +1 -1
- data/tools/dataextractor/CanvaslineWidget-Tw1B6RTA-71f0d7506b20b9443cf3.js +1 -0
- data/tools/dataextractor/{CanvaslinevalueWidget-ihI97G8T-0aa86f239b1df4ce71c2.js → CanvaslinevalueWidget-GvTic9rq-bbf813a8560af4aaa766.js} +1 -1
- data/tools/dataextractor/CheckbuttonWidget-DV6xeneq-7b3445e6ded016751db0.js +1 -0
- data/tools/dataextractor/{ComboboxWidget-CuuvOL9K-affe23635b117e6bc374.js → ComboboxWidget-BO31bWzg-6d16be3ccc9a9b84590e.js} +1 -1
- data/tools/dataextractor/DataExtractor-1dcea669fcbbf77f691e.js +14 -0
- data/tools/dataextractor/DateWidget-DYviZFhJ-4cb47b3a0d0252ffcdb6.js +1 -0
- data/tools/dataextractor/{DetailsDialog-DE7lK17G-1e75cb2f380dac93676b.js → DetailsDialog-DHi4t3xd-5b3cf48c3c16ac38e7ed.js} +1 -1
- data/tools/dataextractor/DynamicWidget-BuSbQVhf-22dd7928163712b3b29a.js +1 -0
- data/tools/dataextractor/{FilechecksumWidget-DRnOt_UE-8ab6316e47a7e4460011.js → FilechecksumWidget-rJe1KvzY-25b5a4f29f07d4e8fe27.js} +1 -1
- data/tools/dataextractor/{FiledisplayWidget-26R46EjS-ab352e1a0376aa273ae1.js → FiledisplayWidget-CbTWgtBy-c58d6900f02129cab1f4.js} +1 -1
- data/tools/dataextractor/{FormatvalueWidget-BxyscMJc-1d1dd3dbcd57dcebb5da.js → FormatvalueWidget-B9Giwzaz-75e389b13ad9cb7a80be.js} +1 -1
- data/tools/dataextractor/{Graph-BKw7xw1a-94374e992fe69736cba0.js → Graph-xc7TNnsk-7223329dd0a56a0fd248.js} +1 -1
- data/tools/dataextractor/{GraphWidget-Cs9mvqUu-e364a861890ec3c70c87.js → GraphWidget-COvVOlEn-acff0889f306153190dc.js} +1 -1
- data/tools/dataextractor/{HorizontalWidget-fWLFj7Kg-47230760109921a0e2f4.js → HorizontalWidget-BfdjRLGe-e811da3e1ccaf4e558f6.js} +1 -1
- data/tools/dataextractor/{HorizontalboxWidget-DEaXhKEz-a2e1ef1853068ba40a36.js → HorizontalboxWidget-B1b9uNaB-40431db49959646ec1a7.js} +1 -1
- data/tools/dataextractor/HorizontallineWidget-CHz4o6Gi-bb7ce64931fe34d8ada5.js +1 -0
- data/tools/dataextractor/{IframeWidget-B143k4lo-a67734e034639b7d5f7d.js → IframeWidget-BCtrIgD1-c431537b943b00020029.js} +1 -1
- data/tools/dataextractor/{ImageLoader-BCpmQHIl-1b4a6c662d8e85c5ce0a.js → ImageLoader-BzE4VsHW-7f507c2dc77edca445e7.js} +1 -1
- data/tools/dataextractor/{ImageviewerWidget-CLrvr6dw-e1097e682e69575c97ca.js → ImageviewerWidget-DKMBE3tQ-27e8c394085f61e22e57.js} +1 -1
- data/tools/dataextractor/{LabelWidget-CA1bTX2B-ff3f23281a310d9eace2.js → LabelWidget-B0nE0ImW-bae334bfa408bc9a3e25.js} +1 -1
- data/tools/dataextractor/LabelledWidget-DrZHj_lR-0047c1000e4b6de8d6d7.js +1 -0
- data/tools/dataextractor/LabelprogressbarWidget-K9NphQp0-6c99faec537f70ccb734.js +1 -0
- data/tools/dataextractor/LabelsparklineWidget-cn1OJvL3-7ca2473272fe8beba866.js +1 -0
- data/tools/dataextractor/LabelvalueWidget-DxJbd9nR-08095e934e33220ddcaa.js +1 -0
- data/tools/dataextractor/LabelvaluedescWidget-B-RiUnpl-403b34fedf41f66816c2.js +1 -0
- data/tools/dataextractor/LabelvaluelimitsbarWidget-BF94rtl8-944376d2abb331f918d3.js +1 -0
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-UOfPu8D1-9d71029920b804c465df.js +1 -0
- data/tools/dataextractor/LabelvaluerangebarWidget-EVON-Tv8-cbc5ca15bc1f0bffed40.js +1 -0
- data/tools/dataextractor/{Layout--_zNJWnw-16921ce6aa9987c9960c.js → Layout-BLS4Yi3m-e04453558611f00f29f8.js} +1 -1
- data/tools/dataextractor/{LedWidget-D2uxHxe3-03a4a2857e454290287b.js → LedWidget-DqVfh3zJ-a875572ec418d20deb3f.js} +1 -1
- data/tools/dataextractor/{LimitsBar-DN1s8-MS-d2e697ee1f1bfe976c50.js → LimitsBar-BqpvMpXM-54bacd107c671dfa2ee4.js} +1 -1
- data/tools/dataextractor/{LimitsbarWidget-Cqhh7LKU-ccc71a429a6945ec17b1.js → LimitsbarWidget-rEJIGKCx-fd5df8d532f64e0e7ae2.js} +1 -1
- data/tools/dataextractor/{LimitscolorWidget-haGB4RbY-dd10c0c2fd74edf3cbb4.js → LimitscolorWidget-DVXho9Mm-325d04303ca967eb6523.js} +1 -1
- data/tools/dataextractor/{LimitscolumnWidget-B1GdmlR_-4217c9643c68bb15b2c8.js → LimitscolumnWidget-DSQAdlZS-9ec5d2dc87e98cb68cd4.js} +1 -1
- data/tools/dataextractor/LinegraphWidget-CQRwZ0N6-ac46e2bd03f321b040a2.js +1 -0
- data/tools/dataextractor/{MatrixbycolumnsWidget-coHlLETG-9080f0a4a1802713a578.js → MatrixbycolumnsWidget-CJJ7SugT-5a8486ccd7d1d1c18b22.js} +1 -1
- data/tools/dataextractor/{OpenC3TimePicker-B8Vu9GBz-850d7e68786e24a785f4.js → OpenC3TimePicker-Cww9L2Ij-12fc1d8098e8469b0e3d.js} +1 -1
- data/tools/dataextractor/{ProgressbarWidget-D_yFssIZ-6d0b35abe5abf920de7d.js → ProgressbarWidget-VTd49uhi-0563146e4674c90bdc78.js} +1 -1
- data/tools/dataextractor/RadiobuttonWidget-DqsantxO-d0e7a9085c698c0779fd.js +1 -0
- data/tools/dataextractor/{RadiogroupWidget-2-td69IA-3a65d1201a6083911e89.js → RadiogroupWidget-Bht6RZPH-ff5113bf0def070eccfe.js} +1 -1
- data/tools/dataextractor/{RangebarWidget-i2mlnxys-7d3ca7c8ee813c1f6962.js → RangebarWidget-CN11Oqws-2006818d09ac490d86c6.js} +1 -1
- data/tools/dataextractor/RollupWidget-cgl9Ghle-f84aecf51332998e40c9.js +1 -0
- data/tools/dataextractor/{ScrollwindowWidget-BU1cRpL8-cc865bceb29a42f3cb67.js → ScrollwindowWidget-BFK-ihvZ-5714f8465f7cb5874698.js} +1 -1
- data/tools/dataextractor/{SignalWidget-hiTkeem9-d5ce6a16e1bcbe600a2d.js → SignalWidget-Be7Z5pJD-ad41db9c6cc6cb065703.js} +1 -1
- data/tools/dataextractor/SpacerWidget-uKPA-f_0-288e8bb428d5fe933f31.js +1 -0
- data/tools/dataextractor/SparklineWidget-Wu5iFbly-dbc418a1272e0ffdb60a.js +1 -0
- data/tools/dataextractor/{TabbookWidget-CvL3Ozmx-2af2452e7a6f0134efd6.js → TabbookWidget-D3FrIoV4-316cae2b8ab892f00330.js} +1 -1
- data/tools/dataextractor/{TargetPacketItemChooser-wISd7chF-a0464b042415727a9e4d.js → TargetPacketItemChooser-DSsSAgva-1f851bc6197dab39aab0.js} +1 -1
- data/tools/dataextractor/TextboxWidget-f6wEcoI0-a7f8386122f8630ebafa.js +1 -0
- data/tools/dataextractor/TextfieldWidget-D72Sey-h-5f3153386a7471a758a1.js +1 -0
- data/tools/dataextractor/TimeWidget-BBuxr7Db-04259fe7378cfda395bb.js +1 -0
- data/tools/dataextractor/{TitleWidget-CL53vf14-91c497b397abb22b827b.js → TitleWidget-Dfp5mPH2-2658efc9057d223632f8.js} +1 -1
- data/tools/dataextractor/{VWidget-5qOYva88-12e30dc2b776a8df555a.js → VWidget-5FjwlURU-da00c9649414f61b4d80.js} +1 -1
- data/tools/dataextractor/{ValueWidget-CAkuc_w_-2b53466b187c41951b84.js → ValueWidget-CpptSOvJ-c5e0c2906ba4e905635c.js} +1 -1
- data/tools/dataextractor/ValuelimitsbarWidget-AgeOlPAV-22b9b33859d89ee88fd8.js +1 -0
- data/tools/dataextractor/ValuelimitscolumnWidget-CfTt7Q8a-ff1483d345ee42bf9b6c.js +1 -0
- data/tools/dataextractor/ValuerangebarWidget-E3CtttJk-f4492236b9d735a3e83d.js +1 -0
- data/tools/dataextractor/{VerticalWidget-C6O0dhRU-f289529c1be404532d60.js → VerticalWidget-B_eheXmK-8c947f2f10d41d366a8e.js} +1 -1
- data/tools/dataextractor/{VerticalboxWidget-B-CoqRJG-2d90f8f9d16cb9d3e870.js → VerticalboxWidget-Bf8XJiY9-e1939d99378c8cb8393a.js} +1 -1
- data/tools/dataextractor/{Widget-CtYQauzA-76c2f5fd2351d284a46d.js → Widget-CSgnvwEG-17306cfd8619455f8409.js} +1 -1
- data/tools/dataextractor/main-0de94ee5dbc38117bb89.js +1491 -0
- data/tools/dataextractor/main.js +1 -1
- metadata +73 -73
- data/tools/dataextractor/ArrayWidget-DMSm_P6c-19f1858ee6a13de9bf65.js +0 -2
- data/tools/dataextractor/BlockWidget-Do3W6tZh-c79dad057dea57df3581.js +0 -2
- data/tools/dataextractor/ButtonWidget-DukCQt0F-75f7d67cab4acc035985.js +0 -2
- data/tools/dataextractor/CanvasdotWidget-DV8PeDWz-12373bd14eefae124803.js +0 -1
- data/tools/dataextractor/CanvaslabelWidget-DW2I1ra1-a20ab54851ccc0e680d8.js +0 -1
- data/tools/dataextractor/CanvaslineWidget-DsjY37tp-2a922b5bf7fc4d42a3d5.js +0 -1
- data/tools/dataextractor/CheckbuttonWidget-B778Z-Zo-3c791dca02c3936e0b25.js +0 -1
- data/tools/dataextractor/DataExtractor-ecbc6958d7725d01074e.js +0 -14
- data/tools/dataextractor/DateWidget-COvQTAeo-ae696b8d9cd7d4f41eeb.js +0 -1
- data/tools/dataextractor/DynamicWidget-BuSbQVhf-11c0fdcda694b70ffdf1.js +0 -1
- data/tools/dataextractor/HorizontallineWidget-Bvu1QP3S-cdb87f14bcec81154e7f.js +0 -1
- data/tools/dataextractor/LabelledWidget-BDhvr03J-e4ce54b64d90297ded22.js +0 -1
- data/tools/dataextractor/LabelprogressbarWidget-g7A5CE8S-c0b36cf5c5d8711f457e.js +0 -1
- data/tools/dataextractor/LabelsparklineWidget-B27xXxWg-cfb3c075c2cb9a8ce462.js +0 -1
- data/tools/dataextractor/LabelvalueWidget-DFn8o6LC-687a3bf9c5d428cd2585.js +0 -1
- data/tools/dataextractor/LabelvaluedescWidget-BQpaxFaB-1915c5f5304c605ff6dd.js +0 -1
- data/tools/dataextractor/LabelvaluelimitsbarWidget-C-z96q8z-e64aaad23f4619fb0b50.js +0 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-D2TMEv9O-edb28559a45b6f01620c.js +0 -1
- data/tools/dataextractor/LabelvaluerangebarWidget-D99dZCjz-c719440b25b0ec7ddb3e.js +0 -1
- data/tools/dataextractor/LinegraphWidget-COSOQ0uM-f3f0eab3aa42a20898f7.js +0 -1
- data/tools/dataextractor/RadiobuttonWidget-DL0jVTcb-d6c1c630c14b8b073e08.js +0 -1
- data/tools/dataextractor/RollupWidget-BEJ2Icg1-f6816b7e9c02859805d9.js +0 -1
- data/tools/dataextractor/SpacerWidget-CBmzzS_X-116a6cbfeede00839de4.js +0 -1
- data/tools/dataextractor/SparklineWidget-CizRh6QR-2528b021c316211a6607.js +0 -1
- data/tools/dataextractor/TextboxWidget-BtEwXzDO-1aa024ed1232214c7c15.js +0 -1
- data/tools/dataextractor/TextfieldWidget-BDbb57HP-e348e171a603406fe35c.js +0 -1
- data/tools/dataextractor/TimeWidget-DzD8U8l8-1d1a4c276a1cf44f37d6.js +0 -1
- data/tools/dataextractor/ValuelimitsbarWidget-Y8sO05E1-6797dae9b2e397329889.js +0 -1
- data/tools/dataextractor/ValuelimitscolumnWidget-iOjB_fCj-84b309ce08d933339ecb.js +0 -1
- data/tools/dataextractor/ValuerangebarWidget-DsCoeAm6-f3471be58343d9255a74.js +0 -1
- data/tools/dataextractor/main-41bf9e8be1fa8f271a59.js +0 -1497
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3e22129381fe3023e0e6284c4c632a3834444d5f11ffc9e00c1a612c6c5d5375
|
|
4
|
+
data.tar.gz: 01c9b20035863ec8bddff14f961742e4b8a7e9a934b490767ac5716d659df121
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e26844bb88327ab81e7d2adb4c37ace14e08171667703002584ea9d4cc5b4240c00d25d1d500b2b7d38669f286bf77a58790c329e81ee6ea30024f5b8ba4f130
|
|
7
|
+
data.tar.gz: 0763a9638575f6f801edb8c894a6bb45bcd5b6df6140618d9487e73dbdfc31865aecfe41406fef674f425ce4d78b1b819ce53225458f7a9e20a84523aed6690b
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./main-0de94ee5dbc38117bb89.js","vue","./DetailsDialog-DHi4t3xd-5b3cf48c3c16ac38e7ed.js","single-spa","./VWidget-5FjwlURU-da00c9649414f61b4d80.js","vue-router","pinia","vuetify","./LimitsBar-BqpvMpXM-54bacd107c671dfa2ee4.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./Widget-CSgnvwEG-17306cfd8619455f8409.js"],(function(B,T){"use strict";var c,i,l,u,r,h,d,s,p,g,f,v,w,y,x,C;return{setters:[t=>{c=t.l},t=>{i=t.resolveComponent,l=t.openBlock,u=t.createElementBlock,r=t.createVNode,h=t.normalizeStyle,d=t.normalizeClass,s=t.withCtx,p=t.Fragment,g=t.renderList,f=t.createBlock,v=t.withModifiers,w=t.createTextVNode,y=t.toDisplayString},t=>{x=t.Z},null,t=>{C=t.T},null,null,null,null,null,null],execute:(function(){const t={components:{DetailsDialog:x},mixins:[C],data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=Number.parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){let a="",V=" ",k=`
|
|
2
|
+
`,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&this.formatter?.toLowerCase()!=="nil"?a+=sprintf(this.formatter,m):a+=m,o+=1,o%this.itemsPerRow===0?(o=0,a+=k):a+=V;return a.trim()}else return e}}},D={class:"array-widget-container"};function S(e,a,V,k,o,m){const M=i("v-textarea"),j=i("v-list-item-title"),_=i("v-list-item"),z=i("v-list"),L=i("v-menu"),N=i("details-dialog");return l(),u("div",D,[r(M,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:d(e.valueClass),style:h([e.computedStyle,m.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),r(L,{modelValue:e.contextMenuShown,"onUpdate:modelValue":a[0]||(a[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:s(()=>[r(z,null,{default:s(()=>[(l(!0),u(p,null,g(e.contextMenuOptions,(n,R)=>(l(),f(_,{key:R,onClick:v(n.action,["stop"])},{default:s(()=>[r(j,null,{default:s(()=>[w(y(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),r(N,{modelValue:e.viewDetails,"onUpdate:modelValue":a[1]||(a[1]=n=>e.viewDetails=n),"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const E=B("default",c(t,[["render",S],["__scopeId","data-v-9da1fd5e"]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-0de94ee5dbc38117bb89.js","./GraphWidget-COvVOlEn-acff0889f306153190dc.js","vue","vue-router","pinia","single-spa","vuetify","./Widget-CSgnvwEG-17306cfd8619455f8409.js"],(function(m,w){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.l,l=s.s,h=s.v},s=>{d=s.M},s=>{u=s.openBlock,p=s.createElementBlock},null,null,null,null,null],execute:(function(){const s={mixins:[d],data:function(){return{items:[],indexes:{},data:[[]],cable:new h,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:Number.parseFloat(e[1]),step:Number.parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||Number.isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&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(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription?.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return u(),p("div",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const k=m("default",c(s,[["render",g]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","./main-0de94ee5dbc38117bb89.js"],(function(a,n){"use strict";var h,l;return{setters:[e=>{h=e.f},e=>{l=e.g}],execute:(function(){const e=a("l",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){if(!this.screenValues[this.valueId])return{};let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new l;const t=this.parseItemName(this.parameters[2]);this.parameters[2]=t.name,this.api.get_limits(this.parameters[0],this.parameters[1],t.name).then(i=>{this.limitsSettings=i}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(i=>{i[0]==="MIN_VALUE"&&(this.minValue=parseInt(i[1])),i[0]==="MAX_VALUE"&&(this.maxValue=parseInt(i[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(t==null||!i)return;let r=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(r=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const s=parseInt((t-r)/this.scale);return s>100?100:s<0?0:s}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})})}}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./main-0de94ee5dbc38117bb89.js","vue","./DetailsDialog-DHi4t3xd-5b3cf48c3c16ac38e7ed.js","single-spa","./VWidget-5FjwlURU-da00c9649414f61b4d80.js","vue-router","pinia","vuetify","./LimitsBar-BqpvMpXM-54bacd107c671dfa2ee4.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./Widget-CSgnvwEG-17306cfd8619455f8409.js"],(function(D,N){"use strict";var u,a,h,d,s,p,g,l,w,f,v,y,x,C,k,V;return{setters:[e=>{u=e.l},e=>{a=e.resolveComponent,h=e.openBlock,d=e.createElementBlock,s=e.createVNode,p=e.normalizeStyle,g=e.normalizeClass,l=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,y=e.withModifiers,x=e.createTextVNode,C=e.toDisplayString},e=>{k=e.Z},null,e=>{V=e.T},null,null,null,null,null,null],execute:(function(){const e={components:{DetailsDialog:k},mixins:[V],data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},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=Number.parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=Number.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 B=" ",S=`
|
|
2
|
+
`,i=0,o=0;const m=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,o),o+=m),r+=sprintf(this.formatter,c),i+=1,i%m===0?(i=0,r+=S):i%this.bytesPerWord===0&&(r+=B)}else r=t;return r}}},M={class:"block-widget-container"};function W(t,r,B,S,i,o){const m=a("v-textarea"),c=a("v-list-item-title"),b=a("v-list-item"),j=a("v-list"),F=a("v-menu"),P=a("details-dialog");return h(),d("div",M,[s(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:o.rows,width:t.width,"model-value":t._value,class:g(t.valueClass),style:p([t.computedStyle,o.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(F,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:l(()=>[s(j,null,{default:l(()=>[(h(!0),d(w,null,f(t.contextMenuOptions,(n,_)=>(h(),v(b,{key:_,onClick:y(n.action,["stop"])},{default:l(()=>[s(c,null,{default:l(()=>[x(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(P,{modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n),"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const R=D("default",u(e,[["render",W],["__scopeId","data-v-fc296592"]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./main-0de94ee5dbc38117bb89.js","vue","single-spa","./Widget-CSgnvwEG-17306cfd8619455f8409.js","vue-router","pinia","vuetify"],(function(Y,pe){"use strict";var B,A,C,O,i,z,H,r,a,j,m,b,N,W,Z,K,G;return{setters:[o=>{B=o.l,A=o.T,C=o.S,O=o.g},o=>{i=o.resolveComponent,z=o.openBlock,H=o.createBlock,r=o.withCtx,a=o.createVNode,j=o.createElementVNode,m=o.createTextVNode,b=o.toDisplayString,N=o.createCommentVNode,W=o.withModifiers,Z=o.createElementBlock,K=o.normalizeStyle},null,o=>{G=o.f},null,null,null],execute:(function(){const o={props:{uuid:{type:String,default:null},cmdUser:{type:String,default:null},cmdString:{type:String,default:null},persistent:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","status"],data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},watch:{modelValue:function(t,e){t?(C.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(n=>{n.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?C.get("/openc3-api/criticalcmd/status/"+this.uuid).then(n=>{n.data.status!=="WAITING"&&(this.$emit("status",n.data.status,this.uuid),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},methods:{async approve(){if(this.canApprove)await C.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(t=>{t.status==200&&(this.$emit("status","APPROVED",this.uuid),this.show=!1,this.error=!1)});else{let t=await this.getKeycloakToken();A.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:t,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(e=>{this.$emit("status","APPROVED",this.uuid),this.show=!1,this.error=!1}).catch(e=>{this.error=!0,e.response?this.errorText=e.response.data.message:this.errorText=e.message})}},async reject(){if(this.canApprove)await C.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(t=>{t.status==200&&(this.$emit("status","REJECTED",this.uuid),this.show=!1,this.error=!1)});else{let t=await this.getKeycloakToken();(await A.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:t,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED",this.uuid),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await A.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function ee(t,e,n,k,s,c){const w=i("v-spacer"),E=i("v-toolbar"),_=i("v-alert"),f=i("v-row"),V=i("v-text-field"),S=i("v-btn"),v=i("v-container"),x=i("v-card-text"),y=i("v-card"),T=i("v-dialog");return z(),H(T,{modelValue:c.show,"onUpdate:modelValue":e[3]||(e[3]=l=>c.show=l),persistent:n.persistent,width:"600"},{default:r(()=>[a(y,null,{default:r(()=>[a(E,{height:"24"},{default:r(()=>[a(w),e[4]||(e[4]=j("span",null," Waiting for Critical Command Approval ",-1)),a(w)]),_:1}),a(x,null,{default:r(()=>[a(v,{fluid:""},{default:r(()=>[a(_,{modelValue:s.error,"onUpdate:modelValue":e[0]||(e[0]=l=>s.error=l),type:"error",closable:""},{default:r(()=>[m(b(s.errorText),1)]),_:1},8,["modelValue"]),a(f,{class:"pt-4",style:{color:"white"}},{default:r(()=>[m("User "+b(n.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),a(f,{class:"pa-4",style:{color:"white"}},{default:r(()=>[m(b(n.cmdString),1)]),_:1}),a(f,{class:"text-subtitle-2"},{default:r(()=>[m("UUID: "+b(n.uuid),1)]),_:1}),s.canApprove?N("",!0):(z(),H(f,{key:0},{default:r(()=>[a(V,{modelValue:s.username,"onUpdate:modelValue":e[1]||(e[1]=l=>s.username=l),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),s.canApprove?N("",!0):(z(),H(f,{key:1},{default:r(()=>[a(V,{modelValue:s.password,"onUpdate:modelValue":e[2]||(e[2]=l=>s.password=l),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),a(f,{class:"pt-2"},{default:r(()=>[a(w),a(S,{type:"submit",class:"mx-2",color:"secondary",variant:"outlined",disabled:c.disableButtons,"data-test":"reject",onClick:W(c.reject,["prevent"])},{default:r(()=>[...e[5]||(e[5]=[m(" Reject ",-1)])]),_:1},8,["disabled","onClick"]),a(S,{type:"submit",class:"mx-2",color:"primary",disabled:c.disableButtons,"data-test":"approve",onClick:W(c.approve,["prevent"])},{default:r(()=>[...e[6]||(e[6]=[m(" Approve ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const te=B(o,[["render",ee],["__scopeId","data-v-fed7ba55"]]),ae="/sandbox.html",J=new Set(["constructor","__proto__","prototype"]),se=new Set(["open","close","closeAll"]),F={cmd:"cmd_no_hazardous_check",cmd_raw:"cmd_raw_no_hazardous_check"};function D(t){try{return structuredClone(t),t}catch{return}}function re(t){const{code:e,api:n,screen:k,runScript:s,setNamedWidgetValue:c,snapshot:w={},screenValues:E={},screenTimeZone:_="local",onHazardous:f,onCritical:V,timeout:S=12e4,signal:v}=t;return new Promise((x,y)=>{const T=()=>{L(y,new DOMException("Button script aborted","AbortError"))},l=document.createElement("iframe");l.setAttribute("sandbox","allow-scripts"),l.setAttribute("aria-hidden","true"),l.style.display="none",l.src=ae;let q=!1,R=null;const P=()=>{R&&(clearTimeout(R),R=null)},I=()=>{P(),R=setTimeout(()=>{L(y,new Error("Button script timed out"))},S)},le=()=>{window.removeEventListener("message",Q),v?.removeEventListener("abort",T),P(),l.remove()},L=(u,p)=>{q||(q=!0,le(),u(p))},M=u=>{l.contentWindow?.postMessage(u,"*")},de=async(u,p)=>{try{return await n[u](...p)}catch(g){const h=g?.message||"";if(h.includes("CriticalCmdError"))throw V?.(g),g;if(h.includes("is Hazardous")&&F[u]){P();const U=await f?.(g);return I(),U?await n[F[u]](...p):void 0}throw g}},ce=async u=>{const{id:p,target:g,method:h,name:U,op:X,args:$=[],value:ue}=u;try{let d;switch(g){case"api":if(typeof h!="string"||J.has(h)||typeof n[h]!="function")throw new Error(`Unknown api method: ${h}`);d=await de(h,$);break;case"screen":if(!se.has(h))throw new Error(`Unknown screen method: ${h}`);d=k[h](...$),d instanceof Promise&&(d=await d);break;case"runScript":d=s(...$),d instanceof Promise&&(d=await d);break;case"alert":d=window.alert(...$);break;case"namedWidget":if(X==="setValue"&&typeof U=="string"&&!J.has(U))c(U,ue);else throw new Error(`Unknown namedWidget op: ${X}`);break;default:throw new Error(`Unknown bridge target: ${g}`)}M({type:"result",id:p,ok:!0,value:D(d)})}catch(d){M({type:"result",id:p,ok:!1,error:{name:d?.name,message:d?.message}})}},Q=u=>{if(u.source!==l.contentWindow)return;const p=u.data;if(!(!p||typeof p!="object"))switch(I(),p.type){case"ready":M({type:"init",code:e,snapshot:D(w)??{},screenValues:D(E)??{},screenTimeZone:_});break;case"call":ce(p);break;case"done":L(x,void 0);break}};if(v){if(v.aborted){T();return}v.addEventListener("abort",T,{once:!0})}window.addEventListener("message",Q),I(),document.body.appendChild(l)})}const oe={components:{CriticalCmdDialog:te},mixins:[G],data(){return{api:null,running:!1,displaySendHazardous:!1,hazardousResolve:null,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1,abortController:null}},computed:{buttonText(){return this.parameters[0]}},created(){this.api=new O},beforeUnmount(){this.abortController?.abort()},methods:{async onClick(){if(!this.running){this.running=!0,this.abortController=new AbortController;try{await re({code:this.parameters[1],api:this.api,screen:this.screen,runScript:this.runScript,setNamedWidgetValue:(t,e)=>this.setNamedWidgetValue(t,e),snapshot:this.namedWidgetsSnapshot(),screenValues:this.screenValues,screenTimeZone:this.screenTimeZone,onHazardous:this.onHazardous,onCritical:this.onCritical,signal:this.abortController.signal})}catch(t){t?.name!=="AbortError"&&console.error(t)}finally{this.running=!1,this.abortController=null,this.displaySendHazardous=!1,this.hazardousResolve=null}}},onHazardous(){return new Promise(t=>{this.hazardousResolve=t,this.displaySendHazardous=!0})},onCritical(t){this.criticalCmdUuid=t.object.data.instance_variables["@uuid"],this.criticalCmdString=t.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=t.object.data.instance_variables["@username"],this.displayCriticalCmd=!0},sendHazardousCmd(){this.displaySendHazardous=!1;const t=this.hazardousResolve;this.hazardousResolve=null,t?.(!0)},cancelHazardousCmd(){this.displaySendHazardous=!1;const t=this.hazardousResolve;this.hazardousResolve=null,t?.(!1)},runScript(t,e=!0,n={}){let k=[];for(const s in n)k.push({key:s,value:n[s],readonly:!1});C.post(`/script-api/scripts/${t}/run`,{data:{environment:k}}).then(s=>{e&&window.open(`/tools/scriptrunner/${s.data}`,"_blank")})}}},ie={class:"mx-1"};function ne(t,e,n,k,s,c){const w=i("v-btn"),E=i("v-card-title"),_=i("v-row"),f=i("v-spacer"),V=i("v-card-text"),S=i("v-card"),v=i("v-dialog"),x=i("critical-cmd-dialog");return z(),Z("div",null,[a(w,{class:"ma-1",color:"primary",style:K(t.computedStyle),loading:s.running,onClick:c.onClick},{default:r(()=>[m(b(c.buttonText),1)]),_:1},8,["style","loading","onClick"]),a(v,{modelValue:s.displaySendHazardous,"onUpdate:modelValue":e[0]||(e[0]=y=>s.displaySendHazardous=y),"max-width":"300"},{default:r(()=>[a(S,null,{default:r(()=>[a(E,null,{default:r(()=>[...e[2]||(e[2]=[m("Hazardous",-1)])]),_:1}),a(V,null,{default:r(()=>[j("div",ie,[a(_,{class:"my-2"},{default:r(()=>[...e[3]||(e[3]=[j("span",null," Warning: Command is Hazardous. Send? ",-1)])]),_:1}),a(_,null,{default:r(()=>[a(f),a(w,{variant:"outlined",onClick:c.cancelHazardousCmd},{default:r(()=>[...e[4]||(e[4]=[m(" Cancel ",-1)])]),_:1},8,["onClick"]),a(w,{class:"bg-primary mx-1",onClick:c.sendHazardousCmd},{default:r(()=>[...e[5]||(e[5]=[m(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),a(x,{modelValue:s.displayCriticalCmd,"onUpdate:modelValue":e[1]||(e[1]=y=>s.displayCriticalCmd=y),uuid:s.criticalCmdUuid,"cmd-string":s.criticalCmdString,"cmd-user":s.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"])])}const me=Y("default",B(oe,[["render",ne]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Layout
|
|
1
|
+
System.register(["./Layout-BLS4Yi3m-e04453558611f00f29f8.js","vue","./main-0de94ee5dbc38117bb89.js","./Widget-CSgnvwEG-17306cfd8619455f8409.js","vue-router","pinia","single-spa","vuetify"],(function(d,w){"use strict";var i,r,s,a,l,c,m,o,u,g;return{setters:[e=>{i=e.r},e=>{r=e.openBlock,s=e.createElementBlock,a=e.normalizeStyle,l=e.Fragment,c=e.renderList,m=e.createBlock,o=e.resolveDynamicComponent,u=e.mergeProps},e=>{g=e.l},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 v(n,k,B,S,L,p){return r(),s("svg",{id:"canvas",width:p.width,height:p.height,style:a(n.computedStyle)},[(r(!0),s(l,null,c(n.widgets,(t,y)=>(r(),m(o(t.type),u({ref_for:!0},n.listeners,{key:y,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],12,h)}const f=d("default",g(e,[["render",v],["__scopeId","data-v-aeda4a44"]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","vue","./main-0de94ee5dbc38117bb89.js","vue-router","pinia","single-spa","vuetify"],(function(s,a){"use strict";var r,t,l,c;return{setters:[e=>{r=e.f},e=>{t=e.openBlock,l=e.createElementBlock},e=>{c=e.l},null,null,null,null],execute:(function(){const e={mixins:[r]},i=["cx","cy","r","fill"];function u(n,f,m,p,v,d){return t(),l("circle",{cx:n.parameters[0],cy:n.parameters[1],r:n.parameters[3],fill:n.parameters[2]},null,8,i)}const o=s("default",c(e,[["render",u]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","./ImageLoader-BzE4VsHW-7f507c2dc77edca445e7.js","vue","./main-0de94ee5dbc38117bb89.js","vue-router","pinia","single-spa","vuetify"],(function(o,d){"use strict";var i,n,s,a,l,c,h;return{setters:[e=>{i=e.f},e=>{n=e.s},e=>{s=e.openBlock,a=e.createElementBlock,l=e.normalizeStyle,c=e.createCommentVNode},e=>{h=e.l},null,null,null,null],execute:(function(){const e={mixins:[i,n],emits:["open"],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function p(t,m,y,k,S,r){return t.imageUrl?(s(),a("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:l(r.pointerStyle),onClick:m[0]||(m[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,u)):c("",!0)}const f=o("default",h(e,[["render",p]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","./ImageLoader-BzE4VsHW-7f507c2dc77edca445e7.js","vue","./main-0de94ee5dbc38117bb89.js","vue-router","pinia","single-spa","vuetify"],(function(I,x){"use strict";var m,d,l,n,g,o,h,u,c,p,f;return{setters:[t=>{m=t.f},t=>{d=t.s},t=>{l=t.openBlock,n=t.createElementBlock,g=t.Fragment,o=t.renderList,h=t.withDirectives,u=t.normalizeStyle,c=t.vShow,p=t.createCommentVNode},t=>{f=t.l},null,null,null,null],execute:(function(){const t={mixins:[m,d],emits:["addItem","deleteItem","open"],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(i=>i.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const i=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let r=e[2];return r.startsWith("http")||(r=await this.getPresignedUrl(r)),{url:r,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(i).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let r=this.parameters[4];r.startsWith("http")?this.defaultImage={...e,url:r}:this.getPresignedUrl(r).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},v=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(i,e,r,y,E,a){return l(),n("g",null,[(l(!0),n(g,null,o(i.images,s=>h((l(),n("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...S)=>a.clickHandler&&a.clickHandler(...S))},null,12,v)),[[c,s.value==a.selectedValue]])),128)),i.defaultImage?h((l(),n("image",{key:0,href:i.defaultImage.url,x:i.defaultImage.x,y:i.defaultImage.y,width:i.defaultImage.width,height:i.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):p("",!0)])}const $=I("default",f(t,[["render",k]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","vue","./main-0de94ee5dbc38117bb89.js","vue-router","pinia","single-spa","vuetify"],(function(u,f){"use strict";var r,n,l,i,s,a;return{setters:[e=>{r=e.f},e=>{n=e.openBlock,l=e.createElementBlock,i=e.normalizeStyle,s=e.toDisplayString},e=>{a=e.l},null,null,null,null],execute:(function(){const e={mixins:[r],computed:{fontSize(){return this.parameters[3]?this.parameters[3]+"px":"12px"},fillColor(){return this.parameters[4]?this.parameters[4]:"black"}}},p=["x","y","font-size","fill"];function c(t,y,S,x,g,o){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],"font-size":o.fontSize,fill:o.fillColor,style:i(t.computedStyle)},s(t.parameters[2]),13,p)}const m=u("default",a(e,[["render",c]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","vue","./main-0de94ee5dbc38117bb89.js","vue-router","pinia","single-spa","vuetify"],(function(m,d){"use strict";var s,a,l,i,n,u;return{setters:[e=>{s=e.f},e=>{a=e.openBlock,l=e.createElementBlock,i=e.normalizeStyle,n=e.toDisplayString},e=>{u=e.l},null,null,null,null],execute:(function(){const e={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:""},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},o=["x","y","font-size","fill"];function p(t,h,f,v,I,r){return a(),l("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor,style:i(t.computedStyle)},n(r._value),13,o)}const c=m("default",u(e,[["render",p]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","vue","./main-0de94ee5dbc38117bb89.js","vue-router","pinia","single-spa","vuetify"],(function(c,p){"use strict";var l,n,a,s,i;return{setters:[e=>{l=e.f},e=>{n=e.openBlock,a=e.createElementBlock,s=e.normalizeStyle},e=>{i=e.l},null,null,null,null],execute:(function(){const e={mixins:[l],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 m(t,r,f,k,d,o){return n(),a("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:s(o.calcStyle)},null,12,u)}const y=c("default",i(e,[["render",m]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","vue","./main-0de94ee5dbc38117bb89.js","vue-router","pinia","single-spa","vuetify"],(function(u,h){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.f},t=>{r=t.openBlock,l=t.createElementBlock,i=t.normalizeStyle},t=>{n=t.l},null,null,null,null],execute:(function(){const t={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[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,a,o,v,y,d){return r(),l("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(d.calcStyle)},null,12,m)}const p=u("default",n(t,[["render",c]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","vue","./main-0de94ee5dbc38117bb89.js","vue-router","pinia","single-spa","vuetify"],(function(i,p){"use strict";var t,n,a,s,r,o;return{setters:[e=>{t=e.f},e=>{n=e.resolveComponent,a=e.openBlock,s=e.createBlock,r=e.normalizeStyle},e=>{o=e.l},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 c(d,u,f,k,l,y){const m=n("v-checkbox");return a(),s(m,{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),"hide-details":"",density:"compact",label:l.label,style:r(d.computedStyle)},null,8,["modelValue","label","style"])}const h=i("default",o(e,[["render",c]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","vue","./main-0de94ee5dbc38117bb89.js","vue-router","pinia","single-spa","vuetify"],(function(o,p){"use strict";var l,n,s,i,a,r;return{setters:[e=>{l=e.f},e=>{n=e.resolveComponent,s=e.openBlock,i=e.createBlock,a=e.normalizeStyle},e=>{r=e.l},null,null,null,null],execute:(function(){const e={mixins:[l],data(){return{items:[],value:null}},created(){this.value=this.parameters[0],this.items=this.parameters},methods:{text(){return this.value}}};function c(m,u,f,h,t,S){const d=n("v-select");return s(),i(d,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=v=>t.value=v),"hide-details":"",density:"compact",variant:"outlined",items:t.items,style:a(m.computedStyle)},null,8,["modelValue","items","style"])}const y=o("default",r(e,[["render",c]]))})}}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
System.register(["./main-0de94ee5dbc38117bb89.js","vue","./TargetPacketItemChooser-DSsSAgva-1f851bc6197dab39aab0.js","./OpenC3TimePicker-Cww9L2Ij-12fc1d8098e8469b0e3d.js","vue-router","pinia","single-spa","vuetify"],(function(ar,Wo){"use strict";var It,nt,jt,Ut,Mt,Lt,x,D,q,Ft,p,y,Ce,re,ae,be,Te,Vt,K,Ve,it,ot,_e,qt,at,$t,Bt;return{setters:[k=>{It=k.l,nt=k.g,jt=k._,Ut=k.R,Mt=k.d,Lt=k.b},k=>{x=k.resolveComponent,D=k.openBlock,q=k.createBlock,Ft=k.Teleport,p=k.createVNode,y=k.withCtx,Ce=k.createElementVNode,re=k.toDisplayString,ae=k.createElementBlock,be=k.Fragment,Te=k.renderList,Vt=k.ref,K=k.createTextVNode,Ve=k.mergeProps,it=k.createSlots,ot=k.normalizeStyle,_e=k.createCommentVNode,qt=k.withModifiers,at=k.withKeys},k=>{$t=k.S},k=>{Bt=k.w},null,null,null,null],execute:(function(){var k=document.createElement("style");k.textContent=`.title-font[data-v-eb45238b]{font-size:1.125rem}.v-progress-linear__determinate[data-v-eb45238b]{transition:none!important}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(k);const cr={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(t,{emit:e}){const s=e,r=Vt(!1);function n(){r.value=!1}function o(i){return i.replaceAll(" ","-").toLowerCase()}return(i,a)=>{const c=x("v-icon"),d=x("v-btn"),u=x("v-divider"),f=x("v-list-item-title"),b=x("v-list-item"),_=x("v-list"),C=x("v-menu"),v=x("v-radio"),T=x("v-list-item-action"),h=x("v-radio-group"),g=x("v-checkbox"),E=x("v-tooltip");return D(),q(C,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=m=>r.value=m),"close-on-content-click":!1},{activator:y(({props:m})=>[p(d,Ve(m,{variant:"outlined",class:"mx-1 menu-button",text:t.menu.label,"data-test":o(`${t.title} ${t.menu.label}`)}),{append:y(()=>[p(c,{class:"menu-button-icon"},{default:y(()=>[...a[1]||(a[1]=[K(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:y(()=>[p(_,null,{default:y(()=>[(D(!0),ae(be,null,Te(t.menu.items,(m,A)=>(D(),ae(be,null,[m.divider?(D(),q(u,{key:A+"-divider"})):m.subMenu&&m.subMenu.length>0?(D(),ae("div",{key:A+"-submenu"},[(D(),q(C,{key:A,"open-on-hover":"",location:"right"},{activator:y(({props:N})=>[(D(),q(b,Ve({ref_for:!0},N,{key:A,disabled:m.disabled}),it({append:y(()=>[p(c,null,{default:y(()=>[...a[2]||(a[2]=[K(" mdi-chevron-right ",-1)])]),_:1})]),default:y(()=>[!m.radio&&!m.checkbox?(D(),q(f,{key:0,style:ot("cursor: pointer;"+(m.disabled?"opacity: 0.2":""))},{default:y(()=>[K(re(m.label),1)]),_:2},1032,["style"])):_e("",!0)]),_:2},[m.icon?{name:"prepend",fn:y(()=>[p(c,{disabled:m.disabled},{default:y(()=>[K(re(m.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:y(()=>[p(_,null,{default:y(()=>[(D(!0),ae(be,null,Te(m.subMenu,(N,F)=>(D(),q(b,{key:F,"prepend-icon":N.icon,onClick:G=>s("submenu-click",N)},{default:y(()=>[p(f,null,{default:y(()=>[K(re(N.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):m.radioGroup?(D(),q(h,{key:A+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":m.value,"onUpdate:modelValue":m.command},{default:y(()=>[(D(!0),ae(be,null,Te(m.choices,(N,F)=>(D(),q(b,{key:F+"-choice"},{default:y(()=>[p(T,{class:"list-action"},{default:y(()=>[p(v,{color:"secondary",label:N.label,value:N.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(D(),q(E,{key:A+"-list",disabled:!m.tooltip,text:m.tooltip,location:"right"},{activator:y(({props:N})=>[Ce("div",Ve({ref_for:!0},N),[p(b,{disabled:m.disabled,"data-test":o(`${t.title} ${t.menu.label} ${m.label}`),onClick:()=>{m.command(m),m.checkbox||n()}},it({default:y(()=>[m.checkbox?(D(),q(T,{key:0,class:"list-action"},{default:y(()=>[p(g,{modelValue:m.checked,"onUpdate:modelValue":F=>m.checked=F,label:m.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):_e("",!0),!m.radio&&!m.checkbox?(D(),q(f,{key:1,style:ot("cursor: pointer;"+(m.disabled?"opacity: 0.2":""))},{default:y(()=>[K(re(m.label),1)]),_:2},1032,["style"])):_e("",!0)]),_:2},[m.icon?{name:"prepend",fn:y(()=>[p(c,{icon:m.icon,disabled:m.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"])],16)]),_:2},1032,["disabled","text"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},lr={components:{TopBarMenu:cr},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}}},ur={class:"app-title mr-2"};function dr(t,e,s,r,n,o){const i=x("v-col"),a=x("v-row"),c=x("TopBarMenu");return D(),q(Ft,{to:"#openc3-menu"},[p(a,{"no-gutters":""},{default:y(()=>[p(i,{"align-self":"end"},{default:y(()=>[Ce("span",ur,re(s.title),1)]),_:1})]),_:1}),p(a,{dense:"",class:"flex-nowrap"},{default:y(()=>[(D(!0),ae(be,null,Te(s.menus,(d,u)=>(D(),q(c,{key:u+"-top-menu",ref_for:!0,ref:"topmenu",menu:d,title:s.title,onSubmenuClick:o.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const hr=It(lr,[["render",dr],["__scopeId","data-v-f4fb184e"]]),fr="__default",pr={data:{dontSaveDefaultConfig:!1},created:function(){if(!this.configKey)throw alert("Components using the Config mixin must provide a configKey"),new Error("Components using the Config mixin must provide a configKey")},computed:{storageKey(){return`${this.configKey}${fr}`}},methods:{loadDefaultConfig:function(){const t=localStorage.getItem(this.storageKey);return t?JSON.parse(t):{}},saveDefaultConfig:function(t){this.dontSaveDefaultConfig||localStorage.setItem(this.storageKey,JSON.stringify(t))},openConfigBase:function(t,e=!1,s=null){new nt().load_config(this.configKey,t).then(r=>{r?(this.$notify.normal({title:"Loading configuration",body:t}),s&&s(JSON.parse(r)),e||this.$route.fullPath.includes(t)||this.$router.push({query:{config:t}})):this.$notify.caution({title:"Unknown configuration",body:t})}).catch(r=>{r&&this.$notify.serious({title:`Error opening configuration: ${t}`,body:r})})},saveConfigBase:function(t,e){new nt().save_config(this.configKey,t,JSON.stringify(e)).then(()=>{this.$notify.normal({title:"Saved configuration",body:t})}).catch(s=>{s&&this.$notify.serious({title:`Error saving configuration: ${t}`,body:s})})},resetConfigBase:function(){localStorage.removeItem(this.storageKey);const t={...this.$route.query};delete t.config,this.$router.replace({query:t})}}};function Ht(t,e){return function(){return t.apply(e,arguments)}}const{toString:mr}=Object.prototype,{getPrototypeOf:ye}=Object,{iterator:Re,toStringTag:zt}=Symbol,qe=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),xe=(t,e)=>{let s=t;const r=[];for(;s!=null&&s!==Object.prototype;){if(r.indexOf(s)!==-1)return!1;if(r.push(s),qe(s,e))return!0;s=ye(s)}return!1},gr=(t,e)=>t!=null&&xe(t,e)?t[e]:void 0,ct=(t=>e=>{const s=mr.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Y=t=>(t=t.toLowerCase(),e=>ct(e)===t),$e=t=>e=>typeof e===t,{isArray:le}=Array,ue=$e("undefined");function we(t){return t!==null&&!ue(t)&&t.constructor!==null&&!ue(t.constructor)&&Z(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Wt=Y("ArrayBuffer");function br(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Wt(t.buffer),e}const _r=$e("string"),Z=$e("function"),Jt=$e("number"),ve=t=>t!==null&&typeof t=="object",yr=t=>t===!0||t===!1,Be=t=>{if(!ve(t))return!1;const e=ye(t);return(e===null||e===Object.prototype||ye(e)===null)&&!xe(t,zt)&&!xe(t,Re)},wr=t=>{if(!ve(t)||we(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},vr=Y("Date"),Sr=Y("File"),Er=t=>!!(t&&typeof t.uri<"u"),Or=t=>t&&typeof t.getParts<"u",Cr=Y("Blob"),Tr=Y("FileList"),Rr=Y("Set"),xr=t=>ve(t)&&Z(t.pipe);function Ar(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Kt=Ar(),Zt=typeof Kt.FormData<"u"?Kt.FormData:void 0,kr=t=>{if(!t)return!1;if(Zt&&t instanceof Zt)return!0;const e=ye(t);if(!e||e===Object.prototype||!Z(t.append))return!1;const s=ct(t);return s==="formdata"||s==="object"&&Z(t.toString)&&t.toString()==="[object FormData]"},Pr=Y("URLSearchParams"),[Dr,Nr,Ir,jr]=["ReadableStream","Request","Response","Headers"].map(Y),Ur=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ae(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let r,n;if(typeof t!="object"&&(t=[t]),le(t))for(r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else{if(we(t))return;const o=s?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function Xt(t,e){if(we(t))return null;e=e.toLowerCase();const s=Object.keys(t);let r=s.length,n;for(;r-- >0;)if(n=s[r],e===n.toLowerCase())return n;return null}const de=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gt=t=>!ue(t)&&t!==de;function lt(...t){const{caseless:e,skipUndefined:s}=Gt(this)&&this||{},r={},n=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=e&&typeof i=="string"&&Xt(r,i)||i,c=qe(r,a)?r[a]:void 0;Be(c)&&Be(o)?r[a]=lt(c,o):Be(o)?r[a]=lt({},o):le(o)?r[a]=o.slice():(!s||!ue(o))&&(r[a]=o)};for(let o=0,i=t.length;o<i;o++){const a=t[o];if(!a||we(a)||(Ae(a,n),typeof a!="object"||le(a)))continue;const c=Object.getOwnPropertySymbols(a);for(let d=0;d<c.length;d++){const u=c[d];Kr.call(a,u)&&n(a[u],u)}}return r}const Mr=(t,e,s,{allOwnKeys:r}={})=>(Ae(e,(n,o)=>{s&&Z(n)?Object.defineProperty(t,o,{__proto__:null,value:Ht(n,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),Lr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Fr=(t,e,s,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),s&&Object.assign(t.prototype,s)},Vr=(t,e,s,r)=>{let n,o,i;const a={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),o=n.length;o-- >0;)i=n[o],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=s!==!1&&ye(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},qr=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const r=t.indexOf(e,s);return r!==-1&&r===s},$r=t=>{if(!t)return null;if(le(t))return t;let e=t.length;if(!Jt(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},Br=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ye(Uint8Array)),Hr=(t,e)=>{const s=(t&&t[Re]).call(t);let r;for(;(r=s.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},zr=(t,e)=>{let s;const r=[];for(;(s=t.exec(e))!==null;)r.push(s);return r},Wr=Y("HTMLFormElement"),Jr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,r){return s.toUpperCase()+r}),{propertyIsEnumerable:Kr}=Object.prototype,Zr=Y("RegExp"),Qt=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),r={};Ae(s,(n,o)=>{let i;(i=e(n,o,t))!==!1&&(r[o]=i||n)}),Object.defineProperties(t,r)},Xr=t=>{Qt(t,(e,s)=>{if(Z(t)&&["arguments","caller","callee"].includes(s))return!1;const r=t[s];if(Z(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Gr=(t,e)=>{const s={},r=n=>{n.forEach(o=>{s[o]=!0})};return le(t)?r(t):r(String(t).split(e)),s},Qr=()=>{},Yr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function en(t){return!!(t&&Z(t.append)&&t[zt]==="FormData"&&t[Re])}const tn=t=>{const e=new WeakSet,s=r=>{if(ve(r)){if(e.has(r))return;if(we(r))return r;if(!("toJSON"in r)){e.add(r);let n;if(Rr(r)){n=[];for(const o of r){const i=s(o);!ue(i)&&n.push(i)}}else n=le(r)?[]:{},Ae(r,(o,i)=>{const a=s(o);!ue(a)&&(n[i]=a)});return e.delete(r),n}}return r};return s(t)},sn=Y("AsyncFunction"),rn=t=>t&&(ve(t)||Z(t))&&Z(t.then)&&Z(t.catch),Yt=((t,e)=>t?setImmediate:e?((s,r)=>(de.addEventListener("message",({source:n,data:o})=>{n===de&&o===s&&r.length&&r.shift()()},!1),n=>{r.push(n),de.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Z(de.postMessage)),nn=typeof queueMicrotask<"u"?queueMicrotask.bind(de):typeof process<"u"&&process.nextTick||Yt,es=t=>t!=null&&Z(t[Re]),on=t=>t!=null&&xe(t,Re)&&es(t),l={isArray:le,isArrayBuffer:Wt,isBuffer:we,isFormData:kr,isArrayBufferView:br,isString:_r,isNumber:Jt,isBoolean:yr,isObject:ve,isPlainObject:Be,isEmptyObject:wr,isReadableStream:Dr,isRequest:Nr,isResponse:Ir,isHeaders:jr,isUndefined:ue,isDate:vr,isFile:Sr,isReactNativeBlob:Er,isReactNative:Or,isBlob:Cr,isRegExp:Zr,isFunction:Z,isStream:xr,isURLSearchParams:Pr,isTypedArray:Br,isFileList:Tr,forEach:Ae,merge:lt,extend:Mr,trim:Ur,stripBOM:Lr,inherits:Fr,toFlatObject:Vr,kindOf:ct,kindOfTest:Y,endsWith:qr,toArray:$r,forEachEntry:Hr,matchAll:zr,isHTMLForm:Wr,hasOwnProperty:qe,hasOwnProp:qe,hasOwnInPrototypeChain:xe,getSafeProp:gr,reduceDescriptors:Qt,freezeMethods:Xr,toObjectSet:Gr,toCamelCase:Jr,noop:Qr,toFiniteNumber:Yr,findKey:Xt,global:de,isContextDefined:Gt,isSpecCompliantForm:en,toJSONObject:tn,isAsyncFn:sn,isThenable:rn,setImmediate:Yt,asap:nn,isIterable:es,isSafeIterable:on},an=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cn=t=>{const e={};let s,r,n;return t&&t.split(`
|
|
3
|
+
`).forEach(function(o){n=o.indexOf(":"),s=o.substring(0,n).trim().toLowerCase(),r=o.substring(n+1).trim();const i=l.hasOwnProp(e,s);!s||i&&l.hasOwnProp(an,s)||(s==="set-cookie"?i?e[s].push(r):e[s]=[r]:e[s]=i?e[s]+", "+r:r)}),e};function ln(t){let e=0,s=t.length;for(;e<s;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;s>e;){const r=t.charCodeAt(s-1);if(r!==9&&r!==32)break;s-=1}return e===0&&s===t.length?t:t.slice(e,s)}const un=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),dn=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ut(t,e){return l.isArray(t)?t.map(s=>ut(s,e)):ln(String(t).replace(e,""))}const hn=t=>ut(t,un),fn=t=>ut(t,dn);function ts(t){const e=Object.create(null);return l.forEach(t.toJSON(),(s,r)=>{e[r]=fn(s)}),e}const ss=Symbol("internals");function ke(t){return t&&String(t).trim().toLowerCase()}function He(t){return t===!1||t==null?t:l.isArray(t)?t.map(He):hn(String(t))}function pn(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=s.exec(t);)e[r[1]]=r[2];return e}const mn=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function dt(t){let e=0,s=t.length;for(;e<s;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;s>e;){const r=t.charCodeAt(s-1);if(r!==9&&r!==32)break;s-=1}return e===0&&s===t.length?t:t.slice(e,s)}function gn(t){const e=t.length-1;if(e<1||t.charCodeAt(0)!==34||t.charCodeAt(e)!==34)return t;let s="";for(let r=1;r<e;r++){const n=t.charCodeAt(r);if(n===34||n===92&&(r+=1,r>=e))return t;s+=t[r]}return s}function bn(t){const e=Object.create(null),s=String(t);let r=0,n=!1,o=!1;function i(a){const c=dt(s.slice(r,a)),d=c.indexOf("=");if(d<1)return;const u=dt(c.slice(0,d));if(!mn.test(u))return;const f=u.toLowerCase();if(f==="__proto__"||f==="constructor"||f==="prototype")return;const b=dt(c.slice(d+1));e[f]=gn(b)}for(let a=0;a<s.length;a++){const c=s.charCodeAt(a);n?o?o=!1:c===92?o=!0:c===34&&(n=!1):c===34?n=!0:(c===44||c===59)&&(i(a),r=a+1)}return i(s.length),e}const _n=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ht(t,e,s,r,n){if(l.isFunction(r))return r.call(this,e,s);if(n&&(e=s),!!l.isString(e)){if(l.isString(r))return e.indexOf(r)!==-1;if(l.isRegExp(r))return r.test(e)}}function yn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,r)=>s.toUpperCase()+r)}function wn(t,e){const s=l.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+s,{__proto__:null,value:function(n,o,i){return this[r].call(this,e,n,o,i)},configurable:!0})})}let $=class{constructor(t){t&&this.set(t)}set(t,e,s){const r=this;function n(i,a,c){const d=ke(a);if(!d)return;const u=l.findKey(r,d);(!u||r[u]===void 0||c===!0||c===void 0&&r[u]!==!1)&&(r[u||a]=He(i))}const o=(i,a)=>l.forEach(i,(c,d)=>n(c,d,a));if(l.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(l.isString(t)&&(t=t.trim())&&!_n(t))o(cn(t),e);else if(l.isObject(t)&&l.isSafeIterable(t)){let i=Object.create(null),a,c;for(const d of t){if(!l.isArray(d))throw new TypeError("Object iterator must return a key-value pair");c=d[0],l.hasOwnProp(i,c)?(a=i[c],i[c]=l.isArray(a)?[...a,d[1]]:[a,d[1]]):i[c]=d[1]}o(i,e)}else t!=null&&n(e,t,s);return this}get(t,e){if(t=ke(t),t){const s=l.findKey(this,t);if(s){const r=this[s];if(!e)return r;if(e===!0)return pn(r);if(l.isFunction(e))return e.call(this,r,s);if(l.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ke(t),t){const s=l.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||ht(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let r=!1;function n(o){if(o=ke(o),o){const i=l.findKey(s,o);i&&(!e||ht(s,s[i],i,e))&&(delete s[i],r=!0)}}return l.isArray(t)?t.forEach(n):n(t),r}clear(t){const e=Object.keys(this);let s=e.length,r=!1;for(;s--;){const n=e[s];(!t||ht(this,this[n],n,t,!0))&&(delete this[n],r=!0)}return r}normalize(t){const e=this,s={};return l.forEach(this,(r,n)=>{const o=l.findKey(s,n);if(o){e[o]=He(r),delete e[n];return}const i=t?yn(n):String(n).trim();i!==n&&delete e[n],e[i]=He(r),s[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return l.forEach(this,(s,r)=>{s!=null&&s!==!1&&(e[r]=t&&l.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
4
|
+
`)}getSetCookie(){const t=this.get("set-cookie");return l.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return bn(t)}static concat(t,...e){const s=new this(t);return e.forEach(r=>s.set(r)),s}static accessor(t){const e=(this[ss]=this[ss]={accessors:{}}).accessors,s=this.prototype;function r(n){const o=ke(n);e[o]||(wn(s,n),e[o]=!0)}return l.isArray(t)?t.forEach(r):r(t),this}};$.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors($.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[s]=r}}}),l.freezeMethods($);const ze="[REDACTED ****]";function vn(t){if(l.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(l.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function Sn(t,e){const s=new Set(e.map(o=>String(o).toLowerCase())),r=[],n=o=>{if(o===null||typeof o!="object"||l.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof $&&(o=o.toJSON()),r.push(o);let i;if(l.isArray(o))i=[],o.forEach((a,c)=>{const d=n(a);l.isUndefined(d)||(i[c]=d)});else{if(!l.isPlainObject(o)&&vn(o))return r.pop(),o;i=Object.create(null);for(const[a,c]of Object.entries(o)){const d=s.has(a.toLowerCase())?ze:n(c);l.isUndefined(d)||(i[a]=d)}}return r.pop(),i};return n(t)}function rs(t){try{return String(t)}catch{return""}}function En(t){return t.errors.map(e=>{try{return e&&e.message?rs(e.message):rs(e)}catch{return""}}).filter(Boolean).join("; ")||t.name||"AggregateError"}let w=class ir extends Error{static from(e,s,r,n,o,i){let a=e.message;!a&&l.isArray(e.errors)&&e.errors.length&&(a=En(e));const c=new ir(a,s||e.code,r,n,o);return Object.defineProperty(c,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),c.name=e.name,e.status!=null&&c.status==null&&(c.status=e.status),i&&Object.assign(c,i),c}constructor(e,s,r,n,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,s=e&&l.hasOwnProp(e,"redact")?e.redact:void 0,r=l.isArray(s)&&s.length>0?Sn(e,s):l.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};w.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",w.ERR_BAD_OPTION="ERR_BAD_OPTION",w.ECONNABORTED="ECONNABORTED",w.ETIMEDOUT="ETIMEDOUT",w.ECONNREFUSED="ECONNREFUSED",w.ERR_NETWORK="ERR_NETWORK",w.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",w.ERR_DEPRECATED="ERR_DEPRECATED",w.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",w.ERR_BAD_REQUEST="ERR_BAD_REQUEST",w.ERR_CANCELED="ERR_CANCELED",w.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",w.ERR_INVALID_URL="ERR_INVALID_URL",w.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const On=null,ns=100;function ft(t){return l.isPlainObject(t)||l.isArray(t)}function is(t){return l.endsWith(t,"[]")?t.slice(0,-2):t}function pt(t,e,s){return t?t.concat(e).map(function(r,n){return r=is(r),!s&&n?"["+r+"]":r}).join(s?".":""):e}function Cn(t){return l.isArray(t)&&!t.some(ft)}const Tn=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function We(t,e,s){if(!l.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=l.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,g){return!l.isUndefined(g[h])});const r=s.metaTokens,n=s.visitor||C,o=s.dots,i=s.indexes,a=s.Blob||typeof Blob<"u"&&Blob,c=s.maxDepth===void 0?ns:s.maxDepth,d=a&&l.isSpecCompliantForm(e),u=[];if(!l.isFunction(n))throw new TypeError("visitor must be a function");function f(h){if(h===null)return"";if(l.isDate(h))return h.toISOString();if(l.isBoolean(h))return h.toString();if(!d&&l.isBlob(h))throw new w("Blob is not supported. Use a Buffer instead.");if(l.isArrayBuffer(h)||l.isTypedArray(h)){if(d&&typeof a=="function")return new a([h]);throw new w("Blob is not supported. Use a Buffer instead.",w.ERR_NOT_SUPPORT)}return h}function b(h){if(h>c)throw new w("Object is too deeply nested ("+h+" levels). Max depth: "+c,w.ERR_FORM_DATA_DEPTH_EXCEEDED)}function _(h,g){if(c===1/0)return JSON.stringify(h);const E=[];return JSON.stringify(h,function(m,A){if(!l.isObject(A))return A;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(A),b(g+E.length-1),A})}function C(h,g,E){let m=h;if(l.isReactNative(e)&&l.isReactNativeBlob(h))return e.append(pt(E,g,o),f(h)),!1;if(h&&!E&&typeof h=="object"){if(l.endsWith(g,"{}"))g=r?g:g.slice(0,-2),h=_(h,1);else if(l.isArray(h)&&Cn(h)||(l.isFileList(h)||l.endsWith(g,"[]"))&&(m=l.toArray(h)))return g=is(g),m.forEach(function(A,N){!(l.isUndefined(A)||A===null)&&e.append(i===!0?pt([g],N,o):i===null?g:g+"[]",f(A))}),!1}return ft(h)?!0:(e.append(pt(E,g,o),f(h)),!1)}const v=Object.assign(Tn,{defaultVisitor:C,convertValue:f,isVisitable:ft});function T(h,g,E=0){if(!l.isUndefined(h)){if(b(E),u.indexOf(h)!==-1)throw new Error("Circular reference detected in "+g.join("."));u.push(h),l.forEach(h,function(m,A){(!(l.isUndefined(m)||m===null)&&n.call(e,m,l.isString(A)?A.trim():A,g,v))===!0&&T(m,g?g.concat(A):[A],E+1)}),u.pop()}}if(!l.isObject(t))throw new TypeError("data must be an object");return T(t),e}function os(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(s){return e[s]})}function mt(t,e){this._pairs=[],t&&We(t,this,e)}const as=mt.prototype;as.append=function(t,e){this._pairs.push([t,e])},as.toString=function(t){const e=t?s=>t.call(this,s,os):os;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function Rn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function cs(t,e,s){if(!e)return t;t=t||"";const r=l.isFunction(s)?{serialize:s}:s,n=l.getSafeProp(r,"encode")||Rn,o=l.getSafeProp(r,"serialize");let i;if(o?i=o(e,r):i=l.isURLSearchParams(e)?e.toString():new mt(e,r).toString(n),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class ls{constructor(){this.handlers=[]}use(e,s,r){return this.handlers.push({fulfilled:e,rejected:s,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){l.forEach(this.handlers,function(s){s!==null&&e(s)})}}const gt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},xn=typeof URLSearchParams<"u"?URLSearchParams:mt,An=typeof FormData<"u"?FormData:null,kn=typeof Blob<"u"?Blob:null,Pn={isBrowser:!0,classes:{URLSearchParams:xn,FormData:An,Blob:kn},protocols:["http","https","file","blob","url","data"]},bt=typeof window<"u"&&typeof document<"u",_t=typeof navigator=="object"&&navigator||void 0,Dn=bt&&(!_t||["ReactNative","NativeScript","NS"].indexOf(_t.product)<0),Nn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",In=bt&&window.location.href||"http://localhost",jn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bt,hasStandardBrowserEnv:Dn,hasStandardBrowserWebWorkerEnv:Nn,navigator:_t,origin:In},Symbol.toStringTag,{value:"Module"})),V={...jn,...Pn};function Un(t,e){return We(t,new V.classes.URLSearchParams,{visitor:function(s,r,n,o){return V.isNode&&l.isBuffer(s)?(this.append(r,s.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}const us=ns;function ds(t){if(t>us)throw new w("FormData field is too deeply nested ("+t+" levels). Max depth: "+us,w.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Mn(t){const e=[],s=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=s.exec(t))!==null;)ds(e.length),e.push(r[0]==="[]"?"":r[1]||r[0]);return e}function Ln(t){const e={},s=Object.keys(t);let r;const n=s.length;let o;for(r=0;r<n;r++)o=s[r],e[o]=t[o];return e}function hs(t){function e(s,r,n,o){ds(o);let i=s[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=o>=s.length;return i=!i&&l.isArray(n)?n.length:i,c?(l.hasOwnProp(n,i)?n[i]=l.isArray(n[i])?n[i].concat(r):[n[i],r]:n[i]=r,!a):((!l.hasOwnProp(n,i)||!l.isObject(n[i]))&&(n[i]=[]),e(s,r,n[i],o)&&l.isArray(n[i])&&(n[i]=Ln(n[i])),!a)}if(l.isFormData(t)&&l.isFunction(t.entries)){const s={};return l.forEachEntry(t,(r,n)=>{e(Mn(r),n,s,0)}),s}return null}const Se=(t,e)=>t!=null&&l.hasOwnProp(t,e)?t[e]:void 0;function Fn(t,e,s){if(l.isString(t))try{return(e||JSON.parse)(t),l.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(s||JSON.stringify)(t)}const Pe={transitional:gt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",r=s.indexOf("application/json")>-1,n=l.isObject(t);if(n&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return r?JSON.stringify(hs(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(n){const i=Se(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return Un(t,i).toString();if((o=l.isFileList(t))||s.indexOf("multipart/form-data")>-1){const a=Se(this,"env"),c=a&&a.FormData;return We(o?{"files[]":t}:t,c&&new c,i)}}return n||r?(e.setContentType("application/json",!1),Fn(t)):t}],transformResponse:[function(t){const e=Se(this,"transitional")||Pe.transitional,s=e&&e.forcedJSONParsing,r=Se(this,"responseType"),n=r==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(s&&!r||n)){const o=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,Se(this,"parseReviver"))}catch(i){if(o)throw i.name==="SyntaxError"?w.from(i,w.ERR_BAD_RESPONSE,this,null,Se(this,"response")):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:V.classes.FormData,Blob:V.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch","query"],t=>{Pe.headers[t]={}});function yt(t,e){const s=this||Pe,r=e||s,n=$.from(r.headers);let o=r.data;return l.forEach(t,function(i){o=i.call(s,o,n.normalize(),e?e.status:void 0)}),n.normalize(),o}function fs(t){return!!(t&&t.__CANCEL__)}let De=class extends w{constructor(t,e,s){super(t??"canceled",w.ERR_CANCELED,e,s),this.name="CanceledError",this.__CANCEL__=!0}};function ps(t,e,s){const r=s.config.validateStatus;!s.status||!r||r(s.status)?t(s):e(new w("Request failed with status code "+s.status,s.status>=400&&s.status<500?w.ERR_BAD_REQUEST:w.ERR_BAD_RESPONSE,s.config,s.request,s))}function Vn(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function qn(t,e){t=t||10;const s=new Array(t),r=new Array(t);let n=0,o=0,i;return e=e!==void 0?e:1e3,function(a){const c=Date.now(),d=r[o];i||(i=c),s[n]=a,r[n]=c;let u=o,f=0;for(;u!==n;)f+=s[u++],u=u%t;if(n=(n+1)%t,n===o&&(o=(o+1)%t),c-i<e)return;const b=d&&c-d;return b?Math.round(f*1e3/b):void 0}}function $n(t,e){let s=0,r=1e3/e,n,o;const i=(a,c=Date.now())=>{s=c,n=null,o&&(clearTimeout(o),o=null),t(...a)};return[(...a)=>{const c=Date.now(),d=c-s;d>=r?i(a,c):(n=a,o||(o=setTimeout(()=>{o=null,i(n)},r-d)))},()=>n&&i(n)]}const Je=(t,e,s=3)=>{let r=0;const n=qn(50,250);return $n(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=Math.max(0,a!=null?Math.min(i,a):i),d=Math.max(0,c-r),u=n(d);r=Math.max(r,c);const f={loaded:c,total:a,progress:a?c/a:void 0,bytes:d,rate:u||void 0,estimated:u&&a?(a-c)/u:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},s)},ms=(t,e)=>{const s=t!=null;return[r=>e[0]({lengthComputable:s,total:t,loaded:r}),e[1]]},gs=(t,e=l.asap)=>(...s)=>e(()=>t(...s)),Bn=V.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,V.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(V.origin),V.navigator&&/(msie|trident)/i.test(V.navigator.userAgent)):()=>!0,Hn=V.hasStandardBrowserEnv?{write(t,e,s,r,n,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];l.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),l.isString(r)&&a.push(`path=${r}`),l.isString(n)&&a.push(`domain=${n}`),o===!0&&a.push("secure"),l.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let s=0;s<e.length;s++){const r=e[s].replace(/^\s+/,""),n=r.indexOf("=");if(n!==-1&&r.slice(0,n)===t)try{return decodeURIComponent(r.slice(n+1))}catch{return r.slice(n+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function zn(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Wn(t,e){if(!e)return t;let s=t.length;for(;s>0&&t.charCodeAt(s-1)===47;)s--;return t.slice(0,s)+"/"+e.replace(/^\/+/,"")}const Jn=/^https?:(?!\/\/)/i,Kn=/[\t\n\r]/g;function Zn(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function Xn(t){return Zn(t).replace(Kn,"")}function Gn(t){return t&&t.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,s,r="")=>`${s}${r}${ze}`)}function Qn(t){const e=t.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${ze}@`),s=e.indexOf("#"),r=(s===-1?e:e.slice(0,s)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${ze}`);return s===-1?r:`${r}#${Gn(e.slice(s+1))}`}function bs(t,e){if(typeof t=="string"){const s=Xn(t);if(Jn.test(s))throw new w(`Invalid URL ${JSON.stringify(Qn(s))}: missing "//" after protocol`,w.ERR_INVALID_URL,e)}}function _s(t,e,s,r){bs(e,r);let n=!zn(e);return t&&(n||s===!1)?(bs(t,r),Wn(t,e)):e}const ys=t=>t instanceof $?{...t}:t,Yn=t=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(t).concat(Object.getOwnPropertySymbols(t).filter(e=>Object.getOwnPropertyDescriptor(t,e).enumerable)):Object.keys(t);function he(t,e){t=t||{},e=e||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,f,b,_){return l.isPlainObject(u)&&l.isPlainObject(f)?l.merge.call({caseless:_},u,f):l.isPlainObject(f)?l.merge({},f):l.isArray(f)?f.slice():f}function n(u,f,b,_){if(l.isUndefined(f)){if(!l.isUndefined(u))return r(void 0,u,b,_)}else return r(u,f,b,_)}function o(u,f){if(!l.isUndefined(f))return r(void 0,f)}function i(u,f){if(l.isUndefined(f)){if(!l.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function a(u){const f=l.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!l.isUndefined(f))if(l.isPlainObject(f)){if(l.hasOwnProp(f,u))return f[u]}else return;const b=l.hasOwnProp(t,"transitional")?t.transitional:void 0;if(l.isPlainObject(b)&&l.hasOwnProp(b,u))return b[u]}function c(u,f,b){if(l.hasOwnProp(e,b))return r(u,f);if(l.hasOwnProp(t,b))return r(void 0,u)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:c,headers:(u,f,b)=>n(ys(u),ys(f),b,!0)};return l.forEach(Yn({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const f=l.hasOwnProp(d,u)?d[u]:n,b=l.hasOwnProp(t,u)?t[u]:void 0,_=l.hasOwnProp(e,u)?e[u]:void 0,C=f(b,_,u);l.isUndefined(C)&&f!==c||(s[u]=C)}),l.hasOwnProp(e,"validateStatus")&&l.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(l.hasOwnProp(t,"validateStatus")?s.validateStatus=r(void 0,t.validateStatus):delete s.validateStatus),s}const ei=["content-type","content-length"];function ti(t,e,s){if(s!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([r,n])=>{ei.includes(r.toLowerCase())&&t.set(r,n)})}const si=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,s)=>String.fromCharCode(parseInt(s,16)));function ws(t){const e=he({},t),s=b=>l.hasOwnProp(e,b)?e[b]:void 0,r=s("data");let n=s("withXSRFToken");const o=s("xsrfHeaderName"),i=s("xsrfCookieName");let a=s("headers");const c=s("auth"),d=s("baseURL"),u=s("allowAbsoluteUrls"),f=s("url");if(e.headers=a=$.from(a),e.url=cs(_s(d,f,u,e),s("params"),s("paramsSerializer")),c){const b=l.getSafeProp(c,"username")||"",_=l.getSafeProp(c,"password")||"";try{a.set("Authorization","Basic "+btoa(b+":"+(_?si(_):"")))}catch(C){throw w.from(C,w.ERR_BAD_OPTION_VALUE,t)}}if(l.isFormData(r)&&(V.hasStandardBrowserEnv||V.hasStandardBrowserWebWorkerEnv||l.isReactNative(r)?a.setContentType(void 0):l.isFunction(r.getHeaders)&&ti(a,r.getHeaders(),s("formDataHeaderPolicy"))),V.hasStandardBrowserEnv&&(l.isFunction(n)&&(n=n(e)),n===!0||n==null&&Bn(e.url))){const b=o&&i&&Hn.read(i);b&&a.set(o,b)}return e}const ri=typeof XMLHttpRequest<"u",ni=ri&&function(t){return new Promise(function(e,s){const r=ws(t);let n=r.data;const o=$.from(r.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:c}=r,d,u,f,b,_;function C(){b&&b(),_&&_(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function T(){if(!v)return;const g=$.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:g,config:t,request:v};ps(function(m){e(m),C()},function(m){s(m),C()},E),v=null}"onloadend"in v?v.onloadend=T:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(T)},v.onabort=function(){v&&(s(new w("Request aborted",w.ECONNABORTED,t,v)),C(),v=null)},v.onerror=function(g){const E=g&&g.message?g.message:"Network Error",m=new w(E,w.ERR_NETWORK,t,v);m.event=g||null,s(m),C(),v=null},v.ontimeout=function(){let g=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||gt;r.timeoutErrorMessage&&(g=r.timeoutErrorMessage),s(new w(g,E.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,t,v)),C(),v=null},n===void 0&&o.setContentType(null),"setRequestHeader"in v&&l.forEach(ts(o),function(g,E){v.setRequestHeader(E,g)}),l.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),i&&i!=="json"&&(v.responseType=r.responseType),c&&([f,_]=Je(c,!0),v.addEventListener("progress",f)),a&&v.upload&&([u,b]=Je(a),v.upload.addEventListener("progress",u),v.upload.addEventListener("loadend",b)),(r.cancelToken||r.signal)&&(d=g=>{v&&(s(!g||g.type?new De(null,t,v):g),v.abort(),C(),v=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const h=Vn(r.url);if(h&&!V.protocols.includes(h)){s(new w("Unsupported protocol "+h+":",w.ERR_BAD_REQUEST,t)),C();return}v.send(n||null)})},ii=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const s=new AbortController;let r=!1;const n=function(c){if(!r){r=!0,i();const d=c instanceof Error?c:this.reason;s.abort(d instanceof w?d:new De(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,n(new w(`timeout of ${e}ms exceeded`,w.ETIMEDOUT))},e);const i=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(n):c.removeEventListener("abort",n)}),t=null)};t.forEach(c=>{if(!r){if(c.aborted){n.call(c);return}c.addEventListener("abort",n,{once:!0})}});const{signal:a}=s;return a.unsubscribe=()=>l.asap(i),a},oi=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let r=0,n;for(;r<s;)n=r+e,yield t.slice(r,n),r=n},ai=async function*(t,e){for await(const s of ci(t))yield*oi(s,e)},ci=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:r}=await e.read();if(s)break;yield r}}finally{await e.cancel()}},vs=(t,e,s,r)=>{const n=ai(t,e);let o=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await n.next();if(d){a(),c.close();return}let f=u.byteLength;if(s){let b=o+=f;s(b)}c.enqueue(new Uint8Array(u))}catch(d){throw a(d),d}},cancel(c){return a(c),n.return()}},{highWaterMark:2})},Ss=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,Es=(t,e,s)=>e+2<s&&Ss(t.charCodeAt(e+1))&&Ss(t.charCodeAt(e+2)),Os=t=>t<=57?t-48:(t&223)-55,li=t=>t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===43||t===47||t===45||t===95,ui=t=>t===9||t===10||t===12||t===13||t===32,di=t=>{const e=Math.floor(t/4),s=t%4;return e*3+(s===2?1:s===3?2:0)},hi=t=>{const e=t.length;let s=0;return e>0&&t.charCodeAt(e-1)===61&&(s++,e>1&&t.charCodeAt(e-2)===61&&s++),Math.floor((e-s)*3/4)},fi=t=>{const e=t.length;let s=0,r=0,n=!1;for(let o=0;o<e;o++){let i=t.charCodeAt(o);if(i===37&&Es(t,o,e)&&(i=Os(t.charCodeAt(o+1))*16+Os(t.charCodeAt(o+2)),o+=2),!ui(i)){if(i===61){r++;continue}if(!li(i)||r>0){n=!0;continue}s++}}return n||r>2||r>0&&(s+r)%4!==0||s%4===1?hi(t):di(s)},pi=(t,e)=>{if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const s=t.indexOf(",");if(s<0)return 0;const r=t.slice(5,s),n=t.slice(s+1);if(/;base64/i.test(r))return e(n);let o=0;for(let i=0,a=n.length;i<a;i++){const c=n.charCodeAt(i);if(c===37&&Es(n,i,a))o+=1,i+=2;else if(c<128)o+=1;else if(c<2048)o+=2;else if(c>=55296&&c<=56319&&i+1<a){const d=n.charCodeAt(i+1);d>=56320&&d<=57343?(o+=4,i++):o+=3}else o+=3}return o};function mi(t){const e=typeof t=="string"?t.indexOf("#"):-1;return pi(e===-1?t:t.slice(0,e),fi)}const wt="1.19.0",Cs=64*1024,{isFunction:Ke}=l,gi=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,s)=>String.fromCharCode(parseInt(s,16))),Ts=t=>{if(!l.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Rs=(t,...e)=>{try{return!!t(...e)}catch{return!1}},bi=t=>{const e=t.indexOf("://");let s=t;return e!==-1&&(s=s.slice(e+3)),s.includes("@")||s.includes(":")},_i=t=>{const e=l.global!==void 0&&l.global!==null?l.global:globalThis,{ReadableStream:s,TextEncoder:r}=e;t=l.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:n,Request:o,Response:i}=t,a=n?Ke(n):typeof fetch=="function",c=Ke(o),d=Ke(i);if(!a)return!1;const u=a&&Ke(s),f=a&&(typeof r=="function"?(h=>g=>h.encode(g))(new r):async h=>new Uint8Array(await new o(h).arrayBuffer())),b=c&&u&&Rs(()=>{let h=!1;const g=new o(V.origin,{body:new s,method:"POST",get duplex(){return h=!0,"half"}}),E=g.headers.has("Content-Type");return g.body!=null&&g.body.cancel(),h&&!E}),_=d&&u&&Rs(()=>l.isReadableStream(new i("").body)),C={stream:_&&(h=>h.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!C[h]&&(C[h]=(g,E)=>{let m=g&&g[h];if(m)return m.call(g);throw new w(`Response type '${h}' is not supported`,w.ERR_NOT_SUPPORT,E)})});const v=async h=>{if(h==null)return 0;if(l.isBlob(h))return h.size;if(l.isSpecCompliantForm(h))return(await new o(V.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(l.isArrayBufferView(h)||l.isArrayBuffer(h))return h.byteLength;if(l.isURLSearchParams(h)&&(h=h+""),l.isString(h))return(await f(h)).byteLength},T=async(h,g)=>l.toFiniteNumber(h.getContentLength())??v(g);return async h=>{let{url:g,method:E,data:m,signal:A,cancelToken:N,timeout:F,onDownloadProgress:G,onUploadProgress:X,responseType:H,headers:M,withCredentials:S="same-origin",fetchOptions:I,maxContentLength:z,maxBodyLength:Oe}=ws(h);const W=l.isNumber(z)&&z>-1,O=l.isNumber(Oe)&&Oe>-1,L=P=>l.hasOwnProp(h,P)?h[P]:void 0;let ee=n||fetch;H=H?(H+"").toLowerCase():"text";let J=ii([A,N&&N.toAbortSignal()],F),j=null;const ne=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let Me,Le=null;const er=()=>new w("Request body larger than maxBodyLength limit",w.ERR_BAD_REQUEST,h,j);try{let P;const te=L("auth");if(te){const R=l.getSafeProp(te,"username")||"",Q=l.getSafeProp(te,"password")||"";P={username:R,password:Q}}if(bi(g)){const R=new URL(g,V.origin);if(!P&&(R.username||R.password)){const Q=Ts(R.username),ce=Ts(R.password);P={username:Q,password:ce}}(R.username||R.password)&&(R.username="",R.password="",g=R.href)}if(P&&(M.delete("authorization"),M.set("Authorization","Basic "+btoa(gi((P.username||"")+":"+(P.password||""))))),W&&typeof g=="string"&&g.startsWith("data:")&&mi(g)>z)throw new w("maxContentLength size of "+z+" exceeded",w.ERR_BAD_RESPONSE,h,j);if(O&&E!=="get"&&E!=="head"){const R=await v(m);if(typeof R=="number"&&isFinite(R)&&(Me=R,R>Oe))throw er()}const rt=O&&(l.isReadableStream(m)||l.isStream(m)),tr=(R,Q,ce)=>vs(R,Cs,ge=>{if(O&&ge>Oe)throw Le=er();Q&&Q(ge)},ce);if(b&&E!=="get"&&E!=="head"&&(X||rt)){if(Me=Me??await T(M,m),Me!==0||rt){let R=new o(g,{method:"POST",body:m,duplex:"half"}),Q;if(l.isFormData(m)&&(Q=R.headers.get("content-type"))&&M.setContentType(Q),R.body){const[ce,ge]=X&&ms(Me,Je(gs(X)))||[];m=tr(R.body,ce,ge)}}}else if(rt&&!c&&u&&E!=="get"&&E!=="head")m=tr(m);else if(rt&&c&&!b&&E!=="get"&&E!=="head")throw new w("Stream request bodies are not supported by the current fetch implementation",w.ERR_NOT_SUPPORT,h,j);l.isString(S)||(S=S?"include":"omit");const Ho=c&&"credentials"in o.prototype;if(l.isFormData(m)){const R=M.getContentType();R&&/^multipart\/form-data/i.test(R)&&!/boundary=/i.test(R)&&M.delete("content-type")}M.set("User-Agent","axios/"+wt,!1);const sr={...I,signal:J,method:E.toUpperCase(),headers:ts(M.normalize()),body:m,duplex:"half",credentials:Ho?S:void 0};j=c&&new o(g,sr);let ie=await(c?ee(j,I):ee(g,sr));const rr=$.from(ie.headers);if(W){const R=l.toFiniteNumber(rr.getContentLength());if(R!=null&&R>z)throw new w("maxContentLength size of "+z+" exceeded",w.ERR_BAD_RESPONSE,h,j)}const Nt=_&&(H==="stream"||H==="response");if(_&&ie.body&&(G||W||Nt&&ne)){const R={};["status","statusText","headers"].forEach(Fe=>{R[Fe]=ie[Fe]});const Q=l.toFiniteNumber(rr.getContentLength()),[ce,ge]=G&&ms(Q,Je(gs(G),!0))||[];let nr=0;const zo=Fe=>{if(W&&(nr=Fe,nr>z))throw new w("maxContentLength size of "+z+" exceeded",w.ERR_BAD_RESPONSE,h,j);ce&&ce(Fe)};ie=new i(vs(ie.body,Cs,zo,()=>{ge&&ge(),ne&&ne()}),R)}H=H||"text";let oe=await C[l.findKey(C,H)||"text"](ie,h);if(W&&!_&&!Nt){let R;if(oe!=null&&(typeof oe.byteLength=="number"?R=oe.byteLength:typeof oe.size=="number"?R=oe.size:typeof oe=="string"&&(R=typeof r=="function"?new r().encode(oe).byteLength:oe.length)),typeof R=="number"&&R>z)throw new w("maxContentLength size of "+z+" exceeded",w.ERR_BAD_RESPONSE,h,j)}return!Nt&&ne&&ne(),await new Promise((R,Q)=>{ps(R,Q,{data:oe,headers:$.from(ie.headers),status:ie.status,statusText:ie.statusText,config:h,request:j})})}catch(P){if(ne&&ne(),J&&J.aborted&&J.reason instanceof w){const te=J.reason;throw te.config=h,j&&(te.request=j),P!==te&&Object.defineProperty(te,"cause",{__proto__:null,value:P,writable:!0,enumerable:!1,configurable:!0}),te}if(Le)throw j&&!Le.request&&(Le.request=j),Le;if(P instanceof w)throw j&&!P.request&&(P.request=j),P;if(P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)){const te=new w("Network Error",w.ERR_NETWORK,h,j,P&&P.response);throw Object.defineProperty(te,"cause",{__proto__:null,value:P.cause||P,writable:!0,enumerable:!1,configurable:!0}),te}throw w.from(P,P&&P.code,h,j,P&&P.response)}}},yi=new Map,xs=t=>{let e=t&&t.env||{};const{fetch:s,Request:r,Response:n}=e,o=[r,n,s];let i=o.length,a=i,c,d,u=yi;for(;a--;)c=o[a],d=u.get(c),d===void 0&&u.set(c,d=a?new Map:_i(e)),u=d;return d};xs();const vt={http:On,xhr:ni,fetch:{get:xs}};l.forEach(vt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const As=t=>`- ${t}`,wi=t=>l.isFunction(t)||t===null||t===!1;function vi(t,e){t=l.isArray(t)?t:[t];const{length:s}=t;let r,n;const o={};for(let i=0;i<s;i++){r=t[i];let a;if(n=r,!wi(r)&&(n=vt[(a=String(r)).toLowerCase()],n===void 0))throw new w(`Unknown adapter '${a}'`);if(n&&(l.isFunction(n)||(n=n.get(e))))break;o[a||"#"+i]=n}if(!n){const i=Object.entries(o).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=s?i.length>1?`since :
|
|
5
|
+
`+i.map(As).join(`
|
|
6
|
+
`):" "+As(i[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+a,w.ERR_NOT_SUPPORT)}return n}const ks={getAdapter:vi,adapters:vt};function St(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new De(null,t)}function Et(t){return St(t),t.headers=$.from(t.headers),t.data=yt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ks.getAdapter(t.adapter||Pe.adapter,t)(t).then(function(e){St(t),t.response=e;try{e.data=yt.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=$.from(e.headers),e},function(e){if(!fs(e)&&(St(t),e&&e.response)){t.response=e.response;try{e.response.data=yt.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=$.from(e.response.headers)}return Promise.reject(e)})}const Ze={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ze[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Ps={};Ze.transitional=function(t,e,s){function r(n,o){return"[Axios v"+wt+"] Transitional option '"+n+"'"+o+(s?". "+s:"")}return(n,o,i)=>{if(t===!1)throw new w(r(o," has been removed"+(e?" in "+e:"")),w.ERR_DEPRECATED);return e&&!Ps[o]&&(Ps[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(n,o,i):!0}},Ze.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function Si(t,e,s){if(typeof t!="object"||t===null)throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let n=r.length;for(;n-- >0;){const o=r[n],i=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(i){const a=t[o],c=a===void 0||i(a,o,t);if(c!==!0)throw new w("option "+o+" must be "+c,w.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new w("Unknown option "+o,w.ERR_BAD_OPTION)}}const Xe={assertOptions:Si,validators:Ze},B=Xe.validators;let fe=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ls,response:new ls}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const n=(()=>{if(!r.stack)return"";const o=r.stack.indexOf(`
|
|
7
|
+
`);return o===-1?"":r.stack.slice(o+1)})();try{if(!s.stack)s.stack=n;else if(n){const o=n.indexOf(`
|
|
8
|
+
`),i=o===-1?-1:n.indexOf(`
|
|
9
|
+
`,o+1),a=i===-1?"":n.slice(i+1);String(s.stack).endsWith(a)||(s.stack+=`
|
|
10
|
+
`+n)}}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=he(this.defaults,e);const{transitional:s,paramsSerializer:r,headers:n}=e;s!==void 0&&Xe.assertOptions(s,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean),legacyInterceptorReqResOrdering:B.transitional(B.boolean),advertiseZstdAcceptEncoding:B.transitional(B.boolean),validateStatusUndefinedResolves:B.transitional(B.boolean)},!1),r!=null&&(l.isFunction(r)?e.paramsSerializer={serialize:r}:Xe.assertOptions(r,{encode:B.function,serialize:B.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Xe.assertOptions(e,{baseUrl:B.spelling("baseURL"),withXsrfToken:B.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=n&&l.merge(n.common,n[e.method]);n&&l.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete n[_]}),e.headers=$.concat(o,n);const i=[];let a=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(e)===!1)return;a=a&&_.synchronous;const C=e.transitional||gt;C&&C.legacyInterceptorReqResOrdering?i.unshift(_.fulfilled,_.rejected):i.push(_.fulfilled,_.rejected)});const c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let d,u=0,f;if(!a){const _=[Et.bind(this),void 0];for(_.unshift(...i),_.push(...c),f=_.length,d=Promise.resolve(e);u<f;)d=d.then(_[u++],_[u++]);return d}f=i.length;let b=e;for(;u<f;){const _=i[u++],C=i[u++];try{b=_?_(b):b}catch(v){if(!C){d=Promise.reject(v);break}try{const T=C.call(this,v);l.isThenable(T)&&(d=Promise.resolve(T).then(()=>Et.call(this,b)))}catch(T){d=Promise.reject(T)}break}}if(!d)try{d=Et.call(this,b)}catch(_){d=Promise.reject(_)}for(u=0,f=c.length;u<f;)d=d.then(c[u++],c[u++]);return d}getUri(t){t=he(this.defaults,t);const e=_s(t.baseURL,t.url,t.allowAbsoluteUrls,t);return cs(e,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){fe.prototype[t]=function(e,s){return this.request(he(s||{},{method:t,url:e,data:s&&l.hasOwnProp(s,"data")?s.data:void 0}))}}),l.forEach(["post","put","patch","query"],function(t){function e(s){return function(r,n,o){return this.request(he(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}fe.prototype[t]=e(),t!=="query"&&(fe.prototype[t+"Form"]=e(!0))});let Ei=class or{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(n){s=n});const r=this;this.promise.then(n=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](n);r._listeners=null}),this.promise.then=n=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(n);return i.cancel=function(){r.unsubscribe(o)},i},e(function(n,o,i){r.reason||(r.reason=new De(n,o,i),s(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=r=>{e.abort(r)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new or(function(s){e=s}),cancel:e}}};function Oi(t){return function(e){return t.apply(null,e)}}function Ci(t){return l.isObject(t)&&t.isAxiosError===!0}const Ot={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ot).forEach(([t,e])=>{Ot[e]=t});function Ds(t){const e=new fe(t),s=Ht(fe.prototype.request,e);return l.extend(s,fe.prototype,e,{allOwnKeys:!0}),l.extend(s,e,null,{allOwnKeys:!0}),s.create=function(r){return Ds(he(t,r))},s}const U=Ds(Pe);U.Axios=fe,U.CanceledError=De,U.CancelToken=Ei,U.isCancel=fs,U.VERSION=wt,U.toFormData=We,U.AxiosError=w,U.Cancel=U.CanceledError,U.all=function(t){return Promise.all(t)},U.spread=Oi,U.isAxiosError=Ci,U.mergeConfig=he,U.AxiosHeaders=$,U.formToJSON=t=>hs(l.isHTMLForm(t)?new FormData(t):t),U.getAdapter=ks.getAdapter,U.HttpStatusCode=Ot,U.default=U;const{Axios:Jo,AxiosError:Ko,CanceledError:Zo,isCancel:Xo,CancelToken:Go,VERSION:Qo,all:Yo,Cancel:ea,isAxiosError:ta,spread:sa,toFormData:ra,AxiosHeaders:na,HttpStatusCode:ia,formToJSON:oa,getAdapter:aa,mergeConfig:ca,create:la}=U,Ct=U.create({baseURL:location.origin,timeout:6e4,params:{}});Ct.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(n){n&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);const e=t.response?.data?.error?.data?.class;if(e==="HazardousError"||e==="CriticalCmdError")return Promise.reject(t);let s=`HTTP ${t.response.status} - `;t.response?.statusText&&(s+=`${t.response.statusText} `),t.response?.config?.data&&(s+=`${t.response.config.data} `),t.response?.data?.message?s+=`${t.response.data.message}`:t.response?.data?.exception?s+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(s+=`${t.response.data.error.class} `),s+=`${t.response.data.error.message}`):s+=`${t.response?.data}`;const{$cosmosNotify:r}=window;throw r&&r.serious({title:"Network error",body:s}),t}else throw t});const Ge=async function(t,e,{data:s,params:r={},headers:n,noAuth:o=!1,noScope:i=!1,onUploadProgress:a=!1,responseType:c}={}){if(!o){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}n.Authorization=localStorage.openc3Token}return n.manual=!0,!i&&!r.scope&&(r.scope=window.openc3Scope),Ct({method:t,url:e,data:s,params:r,headers:n,onUploadProgress:a,responseType:c})},Tt={Accept:"application/json"},Ns={...Tt,"Content-Type":"application/json"},Ti={get:function(t,{params:e,headers:s=Tt,noScope:r,noAuth:n,onUploadProgress:o,responseType:i}={}){return Ge("get",t,{params:e,headers:s,noScope:r,noAuth:n,onUploadProgress:o,responseType:i})},put:function(t,{data:e,params:s,headers:r=Ns,noScope:n,noAuth:o,onUploadProgress:i}={}){return Ge("put",t,{data:e,params:s,headers:r,noScope:n,noAuth:o,onUploadProgress:i})},post:function(t,{data:e,params:s,headers:r=Ns,noScope:n,noAuth:o,onUploadProgress:i,responseType:a}={}){return Ge("post",t,{data:e,params:s,headers:r,noScope:n,noAuth:o,onUploadProgress:i,responseType:a})},delete:function(t,{params:e,headers:s=Tt,noScope:r,noAuth:n,onUploadProgress:o}={}){return Ge("delete",t,{params:e,headers:s,noScope:r,noAuth:n,onUploadProgress:o})}};let Qe=()=>({emit(t,...e){for(let s=this.events[t]||[],r=0,n=s.length;r<n;r++)s[r](...e)},events:{},on(t,e){return(this.events[t]||=[]).push(e),()=>{this.events[t]=this.events[t]?.filter(s=>e!==s)}}});class Ne extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class Rt extends Ne{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class Ri extends Ne{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class se extends Ne{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class xi extends se{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Is(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let s=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${s}`}).join(",")}}`:""}class Ai{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,s){if(!this._info)return this._info={id:String(e),info:s},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((s,{id:r,info:n})=>(s[r]=n,s),{})}}const pe=Symbol("state");class js{constructor(e={}){this.emitter=Qe(),this.params=Object.freeze(e),this.presence=new Ai(this),this.initialConnect=!0,this[pe]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Is({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[pe]}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[pe]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[pe]="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[pe]="connected";let e=!0,s=!0;this.initialConnect=!1,this.emit("connect",{reconnect:s,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[pe]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[pe]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,s){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,s)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(s){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",s)}}receive(e,s){this.emit("message",e,s)}on(e,s){return this.emitter.on(e,s)}once(e,s){let r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}emit(e,...s){return this.emitter.emit(e,...s)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,s)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(n=>n()),e()})),r.push(this.on("close",n=>{r.forEach(o=>o()),s(n||new Ne("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class ki{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let s=this.channels.indexOf(e);s>-1&&this.channels.splice(s,1)}notify(e,...s){this.state=e==="restored"?"connected":e,s.length===1?this.channels.forEach(r=>r[e](s[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let s=this._pendings[0];return!s||s.intent!==e?Promise.resolve():s.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let s,r={promise:new Promise(o=>{s=o}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),s(r)},canceled:!1,acquired:!1},n=this._pendingTop;return this._pendings.push(r),n&&await n.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let s=this._pendingTop;return!s||s.acquired||s.intent!==e?!1:(this._pendings.pop(),s.canceled=!0,!0)}}class Pi{constructor(){this.queue=[]}async acquire(e,s){s==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class Di{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new Pi),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:s,unsubscribe:r}){let n=this._subscriptions[e]=new ki(e);return n.remoteId=this._localToRemote[e],n.subscriber=s,n.unsubscriber=r,n.gvl=this.glv,n}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,s){this._localToRemote[e]=s;let r=this.get(e);r&&(r.remoteId=s)}}class Ni{constructor(e={}){this.subscriptions=new Di(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,s){this._remoteToLocal[s]=e,this.subscriptions.storeRemoteId(e,s),this.flush(s)}unsubscribe(e){let s=this.subscriptions.get(e);if(!s)return;let r=s.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,s,r){let n=this._remoteToLocal[e];if(!n){this._pendingMessages.push([e,s,r]);return}let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>{i.receive(s,r)})}notify(e,s,r){let n=this._remoteToLocal[e];if(!n)return;let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>i.emit(s,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let s=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):s.push(r);this._pendingMessages=s}}const Us={debug:0,info:1,warn:2,error:3};class Ms{constructor(e){this.level=e||"warn"}log(e,s,r){Us[e]<Us[this.level]||this.writeLogEntry(e,s,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,s){this.log("debug",e,s)}info(e,s){this.log("info",e,s)}warn(e,s){this.log("warn",e,s)}error(e,s){this.log("error",e,s)}}class Ie extends Ms{writeLogEntry(){}}class Ii{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let ji=0;class Ls{constructor(e={}){let{logger:s}=e;this.logger=s||new Ie,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,s){let r={channel:e};s&&Object.assign(r,s);let n=Is(r);if(this.pendingUnsubscriptions[n]){let i=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${i}`,n),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,s))},i)})}if(this.pendingSubscriptions[n])return this.logger.warn("subscription is already pending, skipping",n),Promise.reject(Error("Already subscribing"));let o=this.subscribeRetryInterval;return new Promise((i,a)=>{let c=++ji;this.pendingSubscriptions[n]={resolve:i,reject:a,id:c},this.cable.send(this.buildSubscribeRequest(n)),this.maybeRetrySubscribe(c,n,o)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,s,r){setTimeout(()=>{let n=this.pendingSubscriptions[s];n&&n.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,s),this.cable.send(this.buildSubscribeRequest(s)),this.maybeExpireSubscribe(e,s,r))},r)}maybeExpireSubscribe(e,s,r){setTimeout(()=>{let n=this.pendingSubscriptions[s];n&&n.id===e&&(delete this.pendingSubscriptions[s],n.reject(new Ri(`Haven't received subscription ack in ${r*2}ms for ${s}`)))},r)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,s,r){return s==="$whisper"?this.whisper(e,r):(r||(r={}),r.action||=s,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,s){return this.cable.send({command:"whisper",identifier:e,data:s}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:r,message:n,reason:o,reconnect:i}=e;if(s==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(s==="disconnect"){let a=new se(o);this.reset(a),i===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(s==="confirm_subscription"){let a=this.pendingSubscriptions[r];if(!a){this.logger.error("subscription not found, unsubscribing",{type:s,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],a.resolve(r)}if(s==="reject_subscription"){let a=this.pendingSubscriptions[r];return a?(delete this.pendingSubscriptions[r],a.reject(new Rt)):this.logger.error("subscription not found",{type:s,identifier:r})}if(n)return{identifier:r,message:n};this.logger.warn(`unknown message type: ${s}`,{message:e})}reset(e){for(let s in this.pendingSubscriptions)this.pendingSubscriptions[s].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Fs=()=>Date.now()/1e3|0;class Ui extends Ls{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=Fs()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let s in this.pendingPresence)this.pendingPresence[s].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:r,message:n}=e;if(s==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(s==="reject_subscription")return super.receive(e);if(s==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(s==="ping")return this.restoreSince&&(this.restoreSince=Fs()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(s==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(s==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let o=e.restored_ids||Object.keys(this.subscriptionStreams);for(let i of o)this.cable.send({identifier:i,command:"history",history:this.historyRequestFor(i)}),this.presenceInfo[i]&&this.cable.send({identifier:i,command:"join",presence:this.presenceInfo[i]});return this.cable.restored(o)}return this.cable.connected(this.sessionId)}if(s==="presence"){let o=n.type;if(o==="info"){let i=this.pendingPresence[r];i&&(delete this.pendingPresence[r],i.resolve(n))}else if(o==="error"){let i=this.pendingPresence[r];i&&(delete this.pendingPresence[r],i.reject(new Error("failed to retrieve presence")))}return{type:s,identifier:r,message:n}}if(n){let o=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:n,meta:o}}this.logger.warn(`unknown message type: ${s}`,{message:e})}perform(e,s,r){switch(s){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,s,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let s=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(s.history=r,this.pendingHistory[e]=!0);let n=this.presenceInfo[e];return n&&(s.presence=n),s}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let s={},r=!1;if(this.subscriptionStreams[e])for(let n of this.subscriptionStreams[e]){let o=this.streamsPositions[n];o&&(r=!0,s[n]=o)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:s}}trackStreamPosition(e,s,r,n){if(!(!s||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(s),this.streamsPositions[s]={epoch:r,offset:n},{stream:s,epoch:r,offset:n}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,s){return this.presenceInfo[e]=s,this.cable.send({command:"join",identifier:e,presence:s}),Promise.resolve()}async leave(e,s){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:s}),Promise.resolve()}presence(e,s){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,n)=>{this.pendingPresence[e]={resolve:r,reject:n},this.cable.send({command:"presence",identifier:e,data:s})})}}class Mi extends Ne{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Vs extends js{static identifier="__ghost__";constructor(e,s){super(s),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}const Li="$pubsub";class qs extends js{static identifier=Li;async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}const me=Symbol("state");let Fi=class{constructor({transport:t,protocol:e,encoder:s,logger:r,lazy:n,hubOptions:o,performFailures:i,transportConfigurator:a}){this.emitter=Qe(),this.transport=t,this.encoder=s,this.logger=r||new Ie,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new Ni(o||{}),this[me]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=a,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,n===!1&&this.connect().catch(()=>{})}get state(){return this[me]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[me]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(s){this.handleClose(s)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[me]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new se("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[me]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new se("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,s=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:s})}notify(t,e,s){e&&typeof e!="string"&&(s=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:s}):this.emit("info",{type:t,data:s})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new se(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[me]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof se?t:new se(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[me]="closed";let s=e||new se("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",s)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let s=this.protocol.receive(e);if(s){this.logger.debug("processed incoming message",s);let{type:r,identifier:n,message:o,meta:i}=s;r?this.hub.notify(n,r,o):this.hub.transmit(n,o,i)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new qs({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new qs({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,r;return typeof t=="string"&&(r=t,t=Vs),s=r?new t(r,e):new t(e),this.subscribe(s)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let s=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return s.add(t),s.intent==="subscribed"&&s.state==="connected"&&t.connected(),s.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,s){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let n=await t.acquire("subscribed");if(n.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),n.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),n.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),n.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),n.release();return}let o={identifier:e,params:s};this.logger.debug("subscribing",o);try{let i=await this.protocol.subscribe(e,s);this.hub.subscribe(r,i),this.logger.debug("subscribed",{...o,remoteId:i}),t.notify("connected")}catch(i){if(i){if(i instanceof Rt&&this.logger.warn("rejected",o),i instanceof se){this.logger.debug("disconnected during subscription; will retry on connect",o),n.release();return}this.logger.error("failed to subscribe",{error:i,...o})}t.close(i),this.hub.unsubscribe(r)}n.release()}unsubscribe(t){let e=t.identifier,s=this.hub.subscriptions.get(e);if(!s)throw Error(`Subscription not found: ${e}`);s.remove(t),t.closed(),s.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let s=await t.acquire("unsubscribed");if(s.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),s.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),s.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),s.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),s.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(n){n&&(n instanceof se?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:n}):this.logger.error("unsubscribe failed",{id:e,error:n}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",s.release()}async perform(t,e,s){if(this.performFailures==="throw")return this._perform(t,e,s);try{return await this._perform(t,e,s)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,s){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new Mi;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let n=r.remoteId,o={id:n,action:e,payload:s};this.logger.debug("perform",o);try{let i=await this.protocol.perform(n,e,s);return i&&this.logger.debug("perform result",{message:i,request:o}),i}catch(i){throw this.logger.error("perform failed",{error:i,request:o}),i}}on(t,e){return this.emitter.on(t,e)}once(t,e){let s=this.emitter.on(t,(...r)=>{s(),e(...r)});return s}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let s=[()=>delete this._pendingConnect];s.push(this.on("connect",()=>{s.forEach(r=>r()),t()})),s.push(this.on("close",r=>{s.forEach(n=>n()),e(r)})),s.push(this.on("disconnect",r=>{s.forEach(n=>n()),e(r)}))}),this._pendingConnect)}};const Vi={maxMissingPings:2,maxReconnectAttempts:1/0},Ee=()=>Date.now(),$s=(t,e)=>{e=e||{};let{backoffRate:s,jitterRatio:r,maxInterval:n}=e;return s=s||2,r===void 0&&(r=.5),o=>{let i=t*s**o,a=i*s,c=i+(a-i)*Math.random(),d=2*(Math.random()-.5)*r;return c=c*(1+d),n&&n<c&&(c=n),c}};let Bs=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Vi,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new Ie,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Ee()}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=Ee(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Ee(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Ee(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Ee()})),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=Ee()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new xi))}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 qi{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=Qe(),this.unbind=[],this.logger=s.logger||new Ie}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let s=this.transports[e];try{this.transport=s,this.resetListeners(),this.logger.debug(`Trying to connect via ${s.displayName()}`),await s.open(),this.logger.debug(`Connected via ${s.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${s.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,s){this.transports.forEach(r=>{r.setParam(e,s)})}setToken(e,s){this.transports.forEach(r=>{r.setToken(e,s)})}on(e,s){return this.emitter.on(e,s)}once(e,s){let r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class $i{constructor(e,s={}){this.url=e;let r=s.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Qe();let{format:n,subprotocol:o,authStrategy:i}=s;this.format=n||"text",this.connectionOptions=s.websocketOptions,this.authStrategy=i||"param",this.authProtocol="",this.subprotocol=o}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((s,r)=>{let n=[];n.push(this.once("open",()=>{n.forEach(o=>o()),s()})),n.push(this.once("close",()=>{n.forEach(o=>o()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,s){let r=new URL(this.url);r.searchParams.set(e,s);let n=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(n)}setToken(e,s="jid"){if(this.authStrategy==="param")this.setParam(s,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${s}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(n=>n.toLowerCase()===r)||r,this.connectionOptions.headers[r]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,s){return this.emitter.on(e,s)}once(e,s){let r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let s=e.data;this.format==="binary"&&(s=new Uint8Array(s)),this.emitter.emit("data",s)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}class Bi{constructor(e){this.channel=e}notify(e,...s){typeof this[e]=="function"&&this[e](...s)}perform(e,s={}){this.channel.perform(e,s)}send(e){this.channel.send(e)}whisper(e){return this.channel.whisper(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Hi extends Vs{constructor(e,s,r){super(e,s),this.subscription=new Bi(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:n})=>this.subscription.notify("connected",{reconnected:n})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",n=>this.subscription.notify("received",n)),this.on("close",n=>{n&&n instanceof Rt?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class zi{constructor(e){this.cable=e}create(e,s){let r,n;typeof e=="object"?(r=e.channel,delete e.channel,n=e):(r=e,n={});let o=new Hi(r,n,s);return o.subscription.notify("initialized"),this.cable.subscribe(o),o.subscription}findAll(e){return this.cable.hub.channels.filter(s=>s.identifier===e).map(s=>s.subscription)}}class Wi{constructor(e){this.cable=e,this.subscriptions=new zi(e)}send(e){return this.cable.send(e)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const Hs={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Ji(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},Hs,e);let{protocol:s,websocketImplementation:r,websocketFormat:n,websocketOptions:o,websocketAuthStrategy:i,fallbacks:a,logLevel:c,logger:d,transport:u,encoder:f,lazy:b,monitor:_,pingInterval:C,reconnectStrategy:v,maxMissingPings:T,maxReconnectAttempts:h,subprotocol:g,tokenRefresher:E,historyTimestamp:m,protocolOptions:A,concurrentSubscribes:N,performFailures:F,transportConfigurator:G,auth:X}=e;if(d=d||new Ie(c),typeof s=="string"){g=g||s;let S=s.substring(0,s.lastIndexOf("-")),I=s.substring(s.lastIndexOf("-")+1);if(A=A||{},S==="actioncable-v1")s=new Ls({logger:d,...A});else if(S==="actioncable-v1-ext")s=new Ui({logger:d,historyTimestamp:m,...A});else throw Error(`Protocol is not supported yet: ${s}`);if(I==="json")f=f||new Ii,n=n||"text";else if(I==="msgpack"){if(n="binary",!f)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(I==="protobuf"){if(n=n||"binary",!f)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${s}`)}if(!s)throw Error("Protocol must be specified");u=u||new $i(t,{websocketImplementation:r,websocketOptions:o,subprotocol:g,authStrategy:i,format:n}),a&&(u=new qi([u,...a],{logger:d})),X&&X.token&&u.setToken(X.token,X.param||"jid"),v=v||$s(C),_!==!1&&(_=_||new Bs({pingInterval:C,reconnectStrategy:v,maxMissingPings:T,maxReconnectAttempts:h,logger:d}));let H={concurrentSubscribes:N},M=new Fi({protocol:s,transport:u,encoder:f,logger:d,lazy:b,hubOptions:H,performFailures:F,transportConfigurator:G});return _&&(_.watch(M),M.monitor=_),E&&Ki(M,async()=>{try{await E(u)}catch(S){return d.error("Failed to refresh authentication token: "+S),!1}return M.connect().catch(()=>{}),!0}),M}function Ki(t,e){let s=!1;t.on("connect",()=>s=!1),t.on("close",async r=>{if(r){if(s){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(s=!0,await e())}})}class Zi extends Ms{writeLogEntry(e,s,r){r?console[e](s,r):console[e](s)}}class Xi extends Bs{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},s=n=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:n})},r=()=>this.disconnect(new se("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",s,!1),window.addEventListener("online",s,!1),window.addEventListener("resume",s,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",s,!1),window.removeEventListener("online",s,!1),window.removeEventListener("resume",s,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const Gi=["cable","action-cable"],Qi="/cable",Ye=(t,e)=>{for(let s of Gi){let r=t.head.querySelector(`meta[name='${s}-${e}']`);if(r)return r.getAttribute("content")}},zs=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Yi=()=>{if(typeof document<"u"&&document.head){let t=Ye(document,"url");if(t)return zs(t)}return zs(Qi)},eo=()=>{if(typeof document<"u"&&document.head){let t=Ye(document,"history-timestamp");if(t)return t|0}},to=()=>{if(typeof document<"u"&&document.head)return Ye(document,"token")},so=()=>{if(typeof document<"u"&&document.head)return Ye(document,"token-param")};function ro(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Yi(),e=e||{},e.historyTimestamp||=eo();let s=to();if(s){let d=so();e.auth=Object.assign({token:s,param:d},e.auth||{})}e=Object.assign({},Hs,e);let{logLevel:r,logger:n,pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:c}=e;return n=e.logger=e.logger||new Zi(r),i=e.reconnectStrategy=e.reconnectStrategy||$s(o),e.monitor!==!1&&(e.monitor=e.monitor||new Xi({pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:c,logger:n})),Ji(t,e)}function no(t,e){let s=ro(t,e);return new Wi(s)}class io{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,s,r={},n={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(o=>{if(o&&OpenC3Auth.setTokens(),this._cable==null){const i=new URL(this._url,document.baseURI);i.searchParams.set("scope",s),this._cable=no(i.href)}return this._cable.subscriptions.create({channel:e,token:localStorage.openc3Token,...n},r)})}recordPing(){}}function je(t){return oo.test(t)}const oo=/^-?[0-9]+$/;function Ws(t){return ao.test(t)}const ao=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Js(t,e){if(je(t))return Number.isSafeInteger(Number.parseInt(t,10));const s=Number.parseFloat(t),r=String(s);if(t===r)return!0;const n=Ks(t),o=Ks(r);return!!(n===o||e?.approx===!0&&!je(t)&&o.length>=14&&n.startsWith(o.substring(0,14)))}let Ue=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function co(t){if(Js(t,{approx:!1}))return;if(je(t))return Ue.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Ue.underflow:Ue.truncate_float:Ue.overflow}function Ks(t){const{start:e,end:s}=lo(t),r=t.substring(e,s),n=r.indexOf(".");return n===-1?r:r.substring(0,n)+r.substring(n+1)}function lo(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let s=t.lastIndexOf("e");for(s===-1&&(s=t.lastIndexOf("E")),s===-1&&(s=t.length);(t[s-1]==="0"||t[s-1]===".")&&s>e;)s--;return{start:e,end:s}}class uo{isLosslessNumber=!0;constructor(e){if(!Ws(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=co(this.value);if(e===void 0||e===Ue.truncate_float)return Number.parseFloat(this.value);if(je(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function ho(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function fo(t){return new uo(t)}function po(t,e){return xt({"":t},"",t,e)}function xt(t,e,s,r){return Array.isArray(s)?r.call(t,e,go(s,r)):s&&typeof s=="object"&&!ho(s)?r.call(t,e,mo(s,r)):r.call(t,e,s)}function mo(t,e){for(const s of Object.keys(t)){const r=xt(t,s,t[s],e);r!==void 0?t[s]=r:delete t[s]}return t}function go(t,e){for(let s=0;s<t.length;s++)t[s]=xt(t,String(s),t[s],e);return t}function bo(t,e,s){const r=typeof s=="function"?{parseNumber:s}:s,n=r?.parseNumber??fo,o=r?.onDuplicateKey??F;let i=0;const a=u();return h(a),E(),e?po(a,e):a;function c(){if(t.charCodeAt(i)===Eo){i++,b();const O={};let L=!0;for(;i<t.length&&t.charCodeAt(i)!==Xs;){L?L=!1:(v(),b());const ee=i,J=_();if(J===void 0){N();return}b(),T();const j=u();if(j===void 0){S();return}if(Object.prototype.hasOwnProperty.call(O,J)&&!At(j,O[J])){const ne=o({key:J,position:ee+1,oldValue:O[J],newValue:j});ne!==void 0&&(O[J]=ne)}else O[J]=j}return t.charCodeAt(i)!==Xs&&G(),i++,O}}function d(){if(t.charCodeAt(i)===Oo){i++,b();const O=[];let L=!0;for(;i<t.length&&t.charCodeAt(i)!==Gs;){L?L=!1:v();const ee=u();g(ee),O.push(ee)}return t.charCodeAt(i)!==Gs&&X(),i++,O}}function u(){b();const O=_()??C()??c()??d()??f("true",!0)??f("false",!1)??f("null",null);return b(),O}function f(O,L){if(t.slice(i,i+O.length)===O)return i+=O.length,L}function b(){for(;_o(t.charCodeAt(i));)i++}function _(){if(t.charCodeAt(i)===kt){i++;let O="";for(;i<t.length&&t.charCodeAt(i)!==kt;){if(t.charCodeAt(i)===So){const L=t[i+1],ee=vo[L];ee!==void 0?(O+=ee,i++):L==="u"?et(t.charCodeAt(i+2))&&et(t.charCodeAt(i+3))&&et(t.charCodeAt(i+4))&&et(t.charCodeAt(i+5))?(O+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):I(i):M(i)}else wo(t.charCodeAt(i))?O+=t[i]:H(t[i]);i++}return A(),i++,O}}function C(){const O=i;if(t.charCodeAt(i)===Qs&&(i++,m(O)),t.charCodeAt(i)===Pt)i++;else if(yo(t.charCodeAt(i)))for(i++;tt(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===Do)for(i++,m(O);tt(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===Mo||t.charCodeAt(i)===Uo)for(i++,(t.charCodeAt(i)===Qs||t.charCodeAt(i)===Ao)&&i++,m(O);tt(t.charCodeAt(i));)i++;if(i>O)return n(t.slice(O,i))}function v(){if(t.charCodeAt(i)!==Po)throw new SyntaxError(`Comma ',' expected after value ${W()}`);i++}function T(){if(t.charCodeAt(i)!==No)throw new SyntaxError(`Colon ':' expected after property name ${W()}`);i++}function h(O){if(O===void 0)throw new SyntaxError(`JSON value expected ${W()}`)}function g(O){if(O===void 0)throw new SyntaxError(`Array item expected ${W()}`)}function E(){if(i<t.length)throw new SyntaxError(`Expected end of input ${W()}`)}function m(O){if(!tt(t.charCodeAt(i))){const L=t.slice(O,i);throw new SyntaxError(`Invalid number '${L}', expecting a digit ${W()}`)}}function A(){if(t.charCodeAt(i)!==kt)throw new SyntaxError(`End of string '"' expected ${W()}`)}function N(){throw new SyntaxError(`Quoted object key expected ${W()}`)}function F(O){let{key:L,position:ee}=O;throw new SyntaxError(`Duplicate key '${L}' encountered at position ${ee}`)}function G(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${W()}`)}function X(){throw new SyntaxError(`Array item or end of array ']' expected ${W()}`)}function H(O){throw new SyntaxError(`Invalid character '${O}' ${z()}`)}function M(O){const L=t.slice(O,O+2);throw new SyntaxError(`Invalid escape character '${L}' ${z()}`)}function S(){throw new SyntaxError(`Object value expected after ':' ${z()}`)}function I(O){const L=t.slice(O,O+6);throw new SyntaxError(`Invalid unicode character '${L}' ${z()}`)}function z(){return`at position ${i}`}function Oe(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function W(){return`${Oe()} ${z()}`}}function _o(t){return t===Co||t===To||t===Ro||t===xo}function et(t){return t>=Pt&&t<=Dt||t>=Io&&t<=Lo||t>=jo&&t<=Fo}function tt(t){return t>=Pt&&t<=Dt}function yo(t){return t>=ko&&t<=Dt}function wo(t){return t>=32&&t<=1114111}function At(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,r)=>At(s,e[r])):Zs(t)&&Zs(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>At(t[s],e[s])):!1}function Zs(t){return typeof t=="object"&&t!==null}const vo={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
11
|
+
`,r:"\r",t:" "},So=92,Eo=123,Xs=125,Oo=91,Gs=93,Co=32,To=10,Ro=9,xo=13,kt=34,Ao=43,Qs=45,Pt=48,ko=49,Dt=57,Po=44,Do=46,No=58,Io=65,jo=97,Uo=69,Mo=101,Lo=70,Fo=102;function Ys(t,e,s,r){return n(t);function n(c,d){if(Array.isArray(r)){const u=r.find(f=>f.test(c));if(u){const f=u.stringify(c);if(typeof f!="string"||!Ws(f))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${f})`);return f}}if(typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c?.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return o(c);if(c&&typeof c=="object")return i(c)}function o(c,d){if(c.length===0)return"[]";let u="[";for(let f=0;f<c.length;f++){const b=c[f];typeof b<"u"&&typeof b!="function"?u+=n(b):u+="null",f<c.length-1&&(u+=",")}return u+="]",u}function i(c,d){if(typeof c.toJSON=="function")return Ys(c.toJSON(),e,s,void 0);const u=Array.isArray(e)?e.map(String):Object.keys(c);if(u.length===0)return"{}";let f=!0,b="{";for(const _ of u){const C=c[_];if(a(_,C)){f?f=!1:b+=",";const v=JSON.stringify(_);b+=`${v}:`,b+=n(C)}}return b+="}",b}function a(c,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function Vo(t){return je(t)&&!Js(t)?BigInt(t):parseFloat(t)}class qo{id=1;constructor(){}async exec(e,s,r={},n={},o=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,n.manual=!0,(await Ct.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:s,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...n},timeout:o,transformRequest:[(i,a)=>Ys(i)],transformResponse:[i=>{try{return bo(i,void 0,Vo)}catch{const a=typeof i=="string"?i.substring(0,200):String(i),c=new Error(`Server returned non-JSON response: ${a}`);throw c.name="ServerError",c}}]})).data.result}catch(i){let a=new Error;throw i.response?(a.name=i.response.data.error.data.class,a.message=i.response.data.error.data.message,a.object=i.response.data.error):i.request?(a.name="Request error",a.message="Request error, no response received"):a=i,a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,s,r,n,o){return this.exec("map_target_to_interface",[e,s],{cmd_only:r,tlm_only:n,unmap_old:o})}unmap_target_from_interface(e,s,r,n){return this.exec("unmap_target_from_interface",[e,s],{cmd_only:r,tlm_only:n})}connect_interface(e,...s){return s.length>0?this.exec("connect_interface",[e,...s]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,s,...r){return this.exec("interface_cmd",[e,s,...r])}interface_target_enable(e,s,r=!1,n=!1){return this.exec("interface_target_enable",[e,s],{cmd_only:r,tlm_only:n})}interface_target_disable(e,s,r=!1,n=!1){return this.exec("interface_target_disable",[e,s],{cmd_only:r,tlm_only:n})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,s,r,n,o){return this.exec("map_target_to_router",[e,s],{cmd_only:r,tlm_only:n,unmap_old:o})}unmap_target_from_router(e,s,r,n){return this.exec("unmap_target_from_router",[e,s],{cmd_only:r,tlm_only:n})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,s,r=!1,n=!1){return this.exec("router_target_enable",[e,s],{cmd_only:r,tlm_only:n})}router_target_disable(e,s,r=!1,n=!1){return this.exec("router_target_disable",[e,s],{cmd_only:r,tlm_only:n})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,s,r){return this.exec("get_item",[e,s,r])}get_param(e,s,r){return this.exec("get_param",[e,s,r])}get_parameter(e,s,r){return this.exec("get_param",[e,s,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}delete_limits_set(e){return this.exec("delete_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,s){return this.exec("get_tlm",[e,s])}get_telemetry(e,s){return this.exec("get_tlm",[e,s])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,s=!1){return this.exec("get_all_tlm_names",[e],{hidden:s})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,s,r,n=30){const o=await this.exec("get_tlm_packet",[e,s],{type:r,stale_time:n});if(o!=null){let i=o.length,a=null;for(let c=0;c<i;c++)a=this.decode_openc3_type(o[c][1]),a!==null&&(o[c][1]=a)}return o}get_packet_derived_items(e,s){return this.exec("get_packet_derived_items",[e,s])}get_tlm_buffer(e,s){return this.exec("get_tlm_buffer",[e,s])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,s=30,r=null,n=null,o=null){let i={stale_time:s};r!==null&&(i.cache_timeout=r),n!==null&&(i.start_time=n.toISOString()),o!==null&&(i.end_time=o.toISOString());const a=await this.exec("get_tlm_values",[e],i,{},1e4);if(a&&a.length>0){let c=a.length,d=null;for(let u=0;u<c;u++)d=this.decode_openc3_type(a[u][0]),d!==null&&(a[u][0]=d)}return a}get_limits(e,s,r){return this.exec("get_limits",[e,s,r])}async tlm(e,s,r,n="CONVERTED"){let o=null;if(s===void 0)o=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(s))o=await this.exec("tlm",[e],{type:s});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${s}. Valid options are RAW, CONVERTED or FORMATTED.`,a}else o=await this.exec("tlm",[e,s,r],{type:n});let i=this.decode_openc3_type(o);return i!==null&&(o=i),o}async inject_tlm(e,s,r=null,n="CONVERTED",o=!1){await this.exec("inject_tlm",[e,s,r],{type:n,stored:o})}set_tlm(e,s,r,n){return this.exec("set_tlm",[e,s,r],{type:n})}override_tlm(e,s,r,n){return this.exec("override_tlm",[e,s,r],{type:n})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,s,r,n){return this.exec("normalize_tlm",[e,s,r],{type:n})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,s=!1){return this.exec("get_all_cmd_names",[e],{hidden:s})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,s){return this.exec("get_cmd",[e,s])}get_command(e,s){return this.exec("get_cmd",[e,s])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,s,r,n="CONVERTED"){return this.exec("get_cmd_value",[e,s,r,n])}get_cmd_buffer(e,s){return this.exec("get_cmd_buffer",[e,s])}_cmd(e,s,r,n,o,i={}){let a=null;for(let c in n)Object.prototype.hasOwnProperty.call(n,c)&&(a=this.encode_openc3_type(n[c]),a!==null&&(n[c]=a));return this.exec(e,[s,r,n],i,o)}get_cmd_hazardous(e,s,r,n={}){return s===void 0?this.exec("get_cmd_hazardous",e,{},n):this._cmd("get_cmd_hazardous",e,s,r,n)}cmd(e,s,r,n={},o={}){return s===void 0?this.exec("cmd",e,o,n):this._cmd("cmd",e,s,r,n,o)}cmd_no_range_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_range_check",e,o,n):this._cmd("cmd_no_range_check",e,s,r,n,o)}cmd_raw(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw",e,o,n):this._cmd("cmd_raw",e,s,r,n,o)}cmd_raw_no_range_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_range_check",e,o,n):this._cmd("cmd_raw_no_range_check",e,s,r,n,o)}cmd_no_hazardous_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_hazardous_check",e,o,n):this._cmd("cmd_no_hazardous_check",e,s,r,n,o)}cmd_no_checks(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_checks",e,o,n):this._cmd("cmd_no_checks",e,s,r,n,o)}cmd_raw_no_hazardous_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_hazardous_check",e,o,n):this._cmd("cmd_raw_no_hazardous_check",e,s,r,n,o)}cmd_raw_no_checks(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_checks",e,o,n):this._cmd("cmd_raw_no_checks",e,s,r,n,o)}build_cmd(e,s,r,n={},o={}){return s===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,s,r,n,o)}build_command(e,s,r,n={},o={}){return s===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,s,r,n,o)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,s){return this.exec("send_raw",[e,s])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,s){return this.exec("load_config",[e,s])}save_config(e,s,r){return this.exec("save_config",[e,s,r])}delete_config(e,s){return this.exec("delete_config",[e,s])}enable_limits(e,s,r){return this.exec("enable_limits",[e,s,r])}disable_limits(e,s,r){return this.exec("disable_limits",[e,s,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,s){return this.exec("get_setting",[e],s)}get_settings(e,s){return this.exec("get_settings",e,s)}set_setting(e,s){return this.exec("set_setting",[e,s])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,s){return this.exec("set_setting",[e,s])}get_metrics(){return this.exec("get_metrics",[])}open_tab(e){window.open(e,"_blank")}async hashString(e){if(window.isSecureContext){const s=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",s),n=new Uint8Array(r);return Array.from(n).map(o=>o.toString(16).padStart(2,"0")).join("")}}}let st=[];const $o={components:{OpenC3TimePicker:Bt,OpenConfigDialog:Lt,SaveConfigDialog:Mt,TargetPacketItemChooser:$t,TopBar:hr},mixins:[pr,Ut],data(){return{title:"Data Extractor",configKey:"data_extractor",openConfig:!1,saveConfig:!1,api:null,timeZone:"local",progress:0,packetsReceived:0,totalPacketsReceived:0,itemsReceived:0,totalItemsReceived:0,processButtonText:"Process",todaysDate:null,startDate:null,startTime:null,endTime:null,endDate:null,startDateTime:null,endDateTime:null,startDateTimeFilename:"",rules:{required:t=>!!t||"Required"},cmdOrTlm:"tlm",items:[],search:"",headers:[{title:"Target",value:"targetName"},{title:"Packet",value:"packetName"},{title:"Item",value:"itemName"},{title:"Mode",value:"mode"},{title:"ValueType",value:"valueType"},{title:"ReducedType",value:"reducedType"},{title:"Edit",value:"edit"},{title:"Delete",value:"delete"}],itemsPerPage:20,columnMap:{},delimiter:",",columnMode:"normal",fileCount:0,skipIgnored:!0,fillDown:!1,matlabHeader:!1,uniqueOnly:!1,allowWildcards:!1,keyMap:{},modes:["DECOM","REDUCED_MINUTE","REDUCED_HOUR","REDUCED_DAY"],valueTypes:["CONVERTED","RAW","FORMATTED"],reducedTypes:["SAMPLE","MIN","MAX","AVG","STDDEV"],editAll:!1,allItemMode:"DECOM",allItemValueType:"CONVERTED",allItemReducedType:"SAMPLE",cable:new io,subscription:null,enterprise:!1}},computed:{hasCommands:function(){return this.items.some(t=>t.cmdOrTlm==="CMD")},menus:function(){return[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.resetConfig(),this.resetConfigBase()}},{divider:!0},{radioGroup:!0,value:this.delimiter,command:t=>{this.delimiter=t},choices:[{label:"Comma Delimited",value:","},{label:"Tab Delimited",value:" "}]}]},{label:"Mode",items:[{label:"Fill Down",checkbox:!0,checked:this.fillDown,command:()=>{this.fillDown=!this.fillDown}},{label:"Matlab Header",checkbox:!0,checked:this.matlabHeader,command:t=>{this.matlabHeader=!this.matlabHeader}},{label:"Unique Only",checkbox:!0,checked:this.uniqueOnly,command:t=>{this.uniqueOnly=!this.uniqueOnly}},{label:"Allow Wildcards",checkbox:!0,checked:this.allowWildcards,command:()=>{this.allowWildcards=!this.allowWildcards}},{divider:!0},{radioGroup:!0,value:this.columnMode,command:t=>{this.columnMode=t},choices:[{label:"Normal Columns",value:"normal"},{label:"Full Column Names",value:"full"}]}]}]},currentConfig:function(){return{delimiter:this.delimiter,fillDown:this.fillDown,matlabHeader:this.matlabHeader,uniqueOnly:this.uniqueOnly,allowWildcards:this.allowWildcards,columnMode:this.columnMode,cmdOrTlm:this.cmdOrTlm,items:this.items,itemsPerPage:this.itemsPerPage}}},watch:{delimiter:function(){this.saveDefaultConfig(this.currentConfig)},fillDown:function(){this.saveDefaultConfig(this.currentConfig)},matlabHeader:function(){this.saveDefaultConfig(this.currentConfig)},uniqueOnly:function(){this.saveDefaultConfig(this.currentConfig)},allowWildcards:function(){this.saveDefaultConfig(this.currentConfig)},columnNode:function(){this.saveDefaultConfig(this.currentConfig)},cmdOrTlm:function(){this.items.length===0?this.saveDefaultConfig(this.currentConfig):this.items=[]},items:{handler:function(){this.saveDefaultConfig(this.currentConfig)},deep:!0},itemsPerPage:function(){this.saveDefaultConfig(this.currentConfig)}},async created(){this.api=new qo,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{}),await Ti.get("/openc3-api/info").then(e=>{e.data.enterprise&&(this.enterprise=!0)});let t=new Date;this.todaysDate=this.formatDate(t,this.timeZone),this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone)},mounted:function(){if(this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(t)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{resetConfig:function(){this.delimiter=",",this.fillDown=!1,this.matlabHeader=!1,this.uniqueOnly=!1,this.allowWildcards=!1,this.columnMode="normal";let t=new Date;this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone),this.cmdOrTlm="tlm",this.items=[],this.itemsPerPage=20,this.applyConfig(this.currentConfig)},applyConfig:function(t){this.delimiter=t.delimiter||",",this.menus[0].radioGroup=this.delimiter===","?"Comma Delimited":"Tab Delimited",this.fillDown=t.fillDown,this.menus[1].items[0].checked=this.fillDown||!1,this.matlabHeader=t.matlabHeader,this.menus[1].items[1].checked=this.matlabHeader||!1,this.uniqueOnly=t.uniqueOnly,this.menus[1].items[2].checked=this.uniqueOnly||!1,this.allowWildcards=t.allowWildcards,this.menus[1].items[3].checked=this.allowWildcards||!1,this.columnMode=t.columnMode,this.menus[1].radioGroup=this.columnMode==="normal"?"Normal Columns":"Full Column Names",this.cmdOrTlm=t.cmdOrTlm,this.items=t.items,this.itemsPerPage=t.itemsPerPage},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,s=>{this.applyConfig(s),this.startDate=s.startDate,this.startTime=s.startTime,this.endTime=s.endTime,this.endDate=s.endDate,this.saveDefaultConfig(this.currentConfig)})},saveConfiguration:function(t){let e=this.currentConfig;e.startDate=this.startDate,e.startTime=this.startTime,e.endTime=this.endTime,e.endDate=this.endDate,this.saveConfigBase(t,e)},addItem:function(t){for(const e of this.items)if(e.itemName===t.itemName&&e.packetName===t.packetName&&e.targetName===t.targetName&&e.valueType==="CONVERTED"&&e.reducedType==="SAMPLE"&&e.mode==="DECOM"){this.$notify.caution({body:"This item has already been added!"});return}t.cmdOrTlm=this.cmdOrTlm.toUpperCase(),t.edit=!1,t.valueType="CONVERTED",t.reducedType="SAMPLE",t.mode="DECOM",this.items.push(t)},deleteItem:function(t){let e=this.items.indexOf(t);this.items.splice(e,1)},deleteAll:function(){this.items=[]},editAllItems:function(){this.editAll=!1;for(let t of this.items)t.mode=this.allItemMode,t.valueType=this.allItemValueType,t.reducedType=this.allItemReducedType},getItemLabel:function(t){let e=[`${t.targetName} - ${t.packetName} - ${t.itemName}`];return t.mode!=="DECOM"&&e.push(`{ ${t.mode} }`),t.valueType!=="CONVERTED"&&e.push(`( ${t.valueType} )`),t.reducedType!=="SAMPLE"&&e.push(`[ ${t.reducedType} ]`),e.join(" ")},setTimestamps:function(){this.startDateTimeFilename=this.startDate+"_"+this.startTime,this.startDateTimeFilename=this.startDateTimeFilename.replace(/(:|-|\.)\s*/g,"_");let t,e;try{this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime),e=new Date(this.endDate+" "+this.endTime)):(t=new Date(this.startDate+" "+this.startTime+"Z"),e=new Date(this.endDate+" "+this.endTime+"Z"),this.startDateTimeFilename+="_UTC")}catch{return}this.startDateTime=t.getTime()*1e6,this.endDateTime=e.getTime()*1e6},processItems:function(){if(this.processButtonText==="Cancel"){this.finished();return}if(this.setTimestamps(),!this.startDateTime||!this.endDateTime){this.$notify.caution({body:"Invalid date/time selected!"});return}if(this.startDateTime===this.endDateTime){this.$notify.caution({body:"Start date/time is equal to end date/time!"});return}if(this.endDateTime-this.startDateTime<0){this.$notify.caution({body:"Start date/time is greater then end date/time!"});return}new Date(this.endDateTime/1e6)>Date.now()&&this.$notify.caution({title:"Note",body:`End date/time is greater than current date/time. Data will
|
|
12
|
+
continue to stream in real-time until
|
|
13
|
+
${new Date(this.endDateTime/1e6).toISOString()} is reached.`}),this.progress=0,this.processButtonText="Cancel",this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>this.onConnected(),disconnected:t=>{t.allowReconnect&&this.$notify.caution({body:"OpenC3 backend connection disconnected."})},rejected:()=>{this.$notify.caution({body:"OpenC3 backend connection rejected."})}}).then(t=>{this.subscription=t})},resetAllVars:function(){this.fileCount=0,this.totalPacketsReceived=0,this.totalItemsReceived=0,this.columnHeaders=[],this.columnMap={},this.keyMap={},this.resetPerFileVars()},resetPerFileVars:function(){st=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,s)=>{let r=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(r=r+"__"+e.reducedType);let n=String(s);this.keyMap[n]=r,t.push([r,n])}),OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(e=>{e&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t,start_time:this.startDateTime,end_time:this.endDateTime})})},received:function(t){if(this.cable.recordPing(),t.error){this.$notify.serious({body:t.error});return}if(this.packetsReceived+=t.length,this.totalPacketsReceived+=t.length,t.length>0){let e=new Set;for(let n of t){let o=Object.keys(n);o.forEach(e.add,e);let i=o.filter(a=>a.startsWith("__")||a==="COSMOS_EXTRA").length;this.itemsReceived+=o.length-i,this.totalItemsReceived+=o.length-i}e.delete("__type"),e.delete("__time"),e.delete("COSMOS_EXTRA"),this.buildHeaders([...e]),st.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET"),this.hasCommands&&(this.columnHeaders.push("USERNAME"),this.enterprise&&this.columnHeaders.push("APPROVER"))),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e]||e;const[s,r,n,o,i,a,c]=e.split("__");let d=i;this.columnMode==="full"&&(d=n+" "+o+" "+i),s&&s!=="DECOM"&&(d=d+" {"+s+"}"),a&&a!=="CONVERTED"&&(d=d+" ("+a+")"),c&&(d=d+" ["+c+"]"),this.columnHeaders.push(d)})},createFile:async function(){let t=st.flat(),e=this.columnHeaders,s=this.columnMap,r=[];this.resetPerFileVars();let n="";this.matlabHeader&&(n+="% "),n+=e.join(this.delimiter),r.push(n),await this.yieldToMain(),t.sort((_,C)=>_.__time-C.__time),await this.yieldToMain();let o=[],i=[],a=null,c=0;for(let _ of t){let C=!1;this.fillDown&&a?i=[...a]:i=[];let v="";if(Object.keys(_).forEach(T=>{if(T.slice(0,2)==="__"||T==="COSMOS_EXTRA")return;v=T;let h=s[T];if(typeof _[T]=="object")if(_[T]===null)i[h]="";else if(Array.isArray(_[T]))i[h]='"['+_[T]+']"';else{let g=_[T].raw;if(Array.isArray(g)){let E="0x";g.forEach(m=>{E+=m.toString(16).padStart(2,"0").toUpperCase()}),i[h]=E}else i[h]="'"+g+"'"}else i[h]=_[T];this.uniqueOnly&&o[h]!==i[h]&&(C=!0),o[h]=i[h]}),this.fillDown&&(a=[...i]),!this.uniqueOnly||C){if(this.columnMode==="normal"){v=this.keyMap[v]||v;const[T,h,g,E,m,A,N]=v.split("__"),F=BigInt(_.__time),G=Number(F/1000000n),X=Number(F%1000000n),H=new Date(G).toISOString(),M=String(X).padStart(6,"0");if(i[0]=H.replace(/\.(\d{3})Z$/,(S,I)=>`.${I}${M}Z`),i[1]=g,i[2]=E,this.hasCommands){const S=_.COSMOS_EXTRA?JSON.parse(_.COSMOS_EXTRA):{};i[3]=S?.username||"",this.enterprise&&(i[4]=S?.approver||"")}}r.push(i.join(this.delimiter))}c+=1,c%1e3==0&&await this.yieldToMain()}let d=".csv",u="text/csv";this.delimiter===" "&&(d=".txt",u="text/tab-separated-values"),await this.yieldToMain();const f=new Blob([r.join(`
|
|
14
|
+
`)],{type:u});await this.yieldToMain();const b=document.createElement("a");b.href=URL.createObjectURL(f),b.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+d),b.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),st.length!==0)await this.createFile();else if(this.fileCount===0){let t=new Date(this.startDateTime/1e6).toISOString(),e=new Date(this.endDateTime/1e6).toISOString();this.$notify.caution({body:`No data found for the items in the requested time range of ${t} to ${e}`})}this.progress=100,this.processButtonText="Process"}}};function Bo(t,e,s,r,n,o){const i=x("top-bar"),a=x("v-text-field"),c=x("v-col"),d=x("OpenC3TimePicker"),u=x("v-row"),f=x("v-radio"),b=x("v-radio-group"),_=x("target-packet-item-chooser"),C=x("v-container"),v=x("v-progress-circular"),T=x("v-spacer"),h=x("v-btn"),g=x("v-toolbar"),E=x("v-card-title"),m=x("v-select"),A=x("v-card-text"),N=x("v-card-actions"),F=x("v-card"),G=x("v-dialog"),X=x("v-data-table"),H=x("open-config-dialog"),M=x("save-config-dialog");return D(),ae("div",null,[p(i,{menus:o.menus,title:n.title},null,8,["menus","title"]),p(F,null,{default:y(()=>[p(C,null,{default:y(()=>[p(u,null,{default:y(()=>[p(c,null,{default:y(()=>[p(a,{modelValue:n.startDate,"onUpdate:modelValue":e[0]||(e[0]=S=>n.startDate=S),label:"Start Date",type:"date",max:n.todaysDate,rules:[n.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),p(c,null,{default:y(()=>[p(d,{modelValue:n.startTime,"onUpdate:modelValue":e[1]||(e[1]=S=>n.startTime=S),label:"Start Time",rules:[n.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),p(c,null,{default:y(()=>[p(a,{modelValue:n.endDate,"onUpdate:modelValue":e[2]||(e[2]=S=>n.endDate=S),label:"End Date",type:"date",max:n.todaysDate,rules:[n.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),p(c,null,{default:y(()=>[p(d,{modelValue:n.endTime,"onUpdate:modelValue":e[3]||(e[3]=S=>n.endTime=S),label:"End Time",rules:[n.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),p(u,{"no-gutters":""},{default:y(()=>[p(c,null,{default:y(()=>[p(b,{modelValue:n.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=S=>n.cmdOrTlm=S),inline:"","hide-details":"",class:"mt-0"},{default:y(()=>[p(f,{label:"Command",value:"cmd","data-test":"cmd-radio"}),p(f,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),p(u,null,{default:y(()=>[p(c,null,{default:y(()=>[p(_,{"button-text":"Add Item",mode:n.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":"","allow-glob":n.allowWildcards,"show-latest":"",onAddItem:e[5]||(e[5]=S=>o.addItem(S))},null,8,["mode","allow-glob"])]),_:1})]),_:1})]),_:1}),p(g,{class:"pl-3"},{default:y(()=>[p(v,{"model-value":n.progress},null,8,["model-value"]),K(" Processed: "+re(n.totalPacketsReceived)+" packets, "+re(n.totalItemsReceived)+" items ",1),p(T),p(h,{class:"bg-primary",disabled:n.items.length<1,onClick:o.processItems},{default:y(()=>[K(re(n.processButtonText),1)]),_:1},8,["disabled","onClick"]),p(T),p(h,{icon:"mdi-pencil-box-multiple",variant:"text",density:"compact",disabled:n.items.length<1,"data-test":"editAll","aria-label":"Edit All Items",onClick:e[6]||(e[6]=S=>n.editAll=!0)},null,8,["disabled"]),p(h,{icon:"mdi-delete-sweep",variant:"text",density:"compact",disabled:n.items.length<1,"data-test":"delete-all","aria-label":"Delete All Items",onClick:o.deleteAll},null,8,["disabled","onClick"])]),_:1}),p(F,{width:"100%"},{default:y(()=>[p(E,null,{default:y(()=>[e[18]||(e[18]=K(" Items ",-1)),p(T),p(a,{modelValue:n.search,"onUpdate:modelValue":e[7]||(e[7]=S=>n.search=S),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),p(X,{"items-per-page":n.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=S=>n.itemsPerPage=S),headers:n.headers,items:n.items,search:n.search,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":y(({item:S})=>[p(h,{icon:"mdi-pencil",variant:"text","data-test":"edit-row","aria-label":"Edit Item",onClick:qt(I=>S.edit=!0,["stop"])},null,8,["onClick"]),p(G,{modelValue:S.edit,"onUpdate:modelValue":I=>S.edit=I,"max-width":"600",persistent:"",onKeydown:at(I=>S.edit=!1,["esc"])},{default:y(()=>[p(F,null,{default:y(()=>[p(g,{height:"24"},{default:y(()=>[p(T),e[19]||(e[19]=Ce("span",null," DataExtractor: Edit Item Mode ",-1)),p(T)]),_:1}),p(A,null,{default:y(()=>[p(u,{class:"mt-3 title-font"},{default:y(()=>[p(c,null,{default:y(()=>[K(re(o.getItemLabel(S)),1)]),_:2},1024)]),_:2},1024),p(u,null,{default:y(()=>[p(c,null,{default:y(()=>[p(m,{modelValue:S.mode,"onUpdate:modelValue":I=>S.mode=I,"hide-details":"",items:n.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),p(u,null,{default:y(()=>[p(c,null,{default:y(()=>[p(m,{modelValue:S.valueType,"onUpdate:modelValue":I=>S.valueType=I,"hide-details":"",items:n.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),p(u,null,{default:y(()=>[p(c,null,{default:y(()=>[p(m,{modelValue:S.reducedType,"onUpdate:modelValue":I=>S.reducedType=I,"hide-details":"",items:n.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024)]),_:2},1024),p(N,{class:"px-6 py-3"},{default:y(()=>[p(T),p(h,{variant:"flat",onClick:I=>S.edit=!1},{default:y(()=>[...e[20]||(e[20]=[K(" Close ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":y(({item:S})=>[p(h,{icon:"mdi-delete",variant:"text","data-test":"delete-row","aria-label":"Delete Item",onClick:I=>o.deleteItem(S)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items","search"])]),_:1})]),_:1}),p(G,{modelValue:n.editAll,"onUpdate:modelValue":e[14]||(e[14]=S=>n.editAll=S),"max-width":"600",persistent:"",onKeydown:e[15]||(e[15]=at(S=>n.editAll=!1,["esc"]))},{default:y(()=>[p(F,null,{default:y(()=>[p(g,{height:"24"},{default:y(()=>[p(T),e[21]||(e[21]=Ce("span",null," DataExtractor: Edit All Items",-1)),p(T)]),_:1}),p(A,null,{default:y(()=>[p(u,{class:"mt-3"},{default:y(()=>[p(c,null,{default:y(()=>[...e[22]||(e[22]=[K(" This will change all items to the following data type! ",-1)])]),_:1})]),_:1}),p(u,null,{default:y(()=>[p(c,null,{default:y(()=>[p(m,{modelValue:n.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=S=>n.allItemMode=S),"hide-details":"",items:n.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),p(u,null,{default:y(()=>[p(c,null,{default:y(()=>[p(m,{modelValue:n.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=S=>n.allItemValueType=S),"hide-details":"",items:n.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),p(u,null,{default:y(()=>[p(c,null,{default:y(()=>[p(m,{modelValue:n.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=S=>n.allItemReducedType=S),"hide-details":"",items:n.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1})]),_:1}),p(N,{class:"px-6 py-3"},{default:y(()=>[p(T),p(h,{variant:"outlined",onClick:e[12]||(e[12]=S=>n.editAll=!1)},{default:y(()=>[...e[23]||(e[23]=[K(" Cancel ",-1)])]),_:1}),p(h,{variant:"flat",disabled:!n.allItemValueType,onClick:e[13]||(e[13]=S=>o.editAllItems())},{default:y(()=>[...e[24]||(e[24]=[K(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),n.openConfig?(D(),q(H,{key:0,modelValue:n.openConfig,"onUpdate:modelValue":e[16]||(e[16]=S=>n.openConfig=S),"config-key":n.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):_e("",!0),n.saveConfig?(D(),q(M,{key:1,modelValue:n.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=S=>n.saveConfig=S),"config-key":n.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):_e("",!0)])}const ua=ar("default",jt($o,[["render",Bo],["__scopeId","data-v-eb45238b"]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-CSgnvwEG-17306cfd8619455f8409.js","./main-0de94ee5dbc38117bb89.js","vue","vue-router","pinia","single-spa","vuetify"],(function(d,f){"use strict";var l,a,n,r,s,u,i;return{setters:[e=>{l=e.f},e=>{a=e.l,n=e.R},e=>{r=e.resolveComponent,s=e.openBlock,u=e.createBlock,i=e.normalizeStyle},null,null,null,null],execute:(function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(m,o,V,y,t,b){const h=r("v-text-field");return s(),u(h,{modelValue:t.dateValue,"onUpdate:modelValue":o[0]||(o[0]=p=>t.dateValue=p),label:t.label,style:i(m.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const v=d("default",a(e,[["render",c]]))})}}));
|