openc3-cosmos-tool-scriptrunner 6.0.1 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/tools/scriptrunner/ArrayWidget-DzHELdHv-bd5b57cc522931160bc2.js +2 -0
- data/tools/scriptrunner/ArrayplotWidget-BDvziGSm-915929008711aedbf984.js +1 -0
- data/tools/scriptrunner/{BarColumn-Cdu3OoMa-5759d627d12ac570f7c2.js → BarColumn-CNhS2KKq-cc85ebe9261b3c912439.js} +1 -1
- data/tools/scriptrunner/{BlockWidget-PmjzrkXF-66124d27fec936836764.js → BlockWidget-D0On4x3d-ac188ad15f2bf37f9822.js} +2 -2
- data/tools/scriptrunner/{ButtonWidget-nwDlOBJT-74b0307919435ba34bc0.js → ButtonWidget-BOYLHMt4-558b3ecbae193e5100ee.js} +2 -2
- data/tools/scriptrunner/{CanvasWidget-BL8930eT-27842c7c22b339b98e51.js → CanvasWidget-CQIqiLEy-f59e01b75b4649a0585a.js} +1 -1
- data/tools/scriptrunner/CanvasdotWidget-BVWutPMF-ca47ffb289f4bec600ee.js +1 -0
- data/tools/scriptrunner/{CanvasimageWidget-BIw7Wbf2-da3e74a41067206c20c7.js → CanvasimageWidget-ayu_ASKf-260758b12f364754a25b.js} +1 -1
- data/tools/scriptrunner/CanvasimagevalueWidget-mv319g5T-75503494630b9157a8c3.js +1 -0
- data/tools/scriptrunner/CanvaslabelWidget-BNjbXDb8-6566e7eb4fde5b7c9435.js +1 -0
- data/tools/scriptrunner/{CanvaslabelvalueWidget-CI3yYwFs-d47df2b589764613f819.js → CanvaslabelvalueWidget-CrhPwTSP-bf3743f735a2cf971a1f.js} +1 -1
- data/tools/scriptrunner/CanvaslineWidget--HdKH6oO-ed04ffebc222261f8588.js +1 -0
- data/tools/scriptrunner/{CanvaslinevalueWidget-CI-Bbzfi-1411f381997d7567aa3b.js → CanvaslinevalueWidget-CJsuF6RY-b4e7ffa902ac28ef8d98.js} +1 -1
- data/tools/scriptrunner/CheckbuttonWidget-CQ2HlgIk-7124cdcf005c3773ca42.js +1 -0
- data/tools/scriptrunner/ComboboxWidget-BxILACwz-30e588e01424fc2dc93d.js +1 -0
- data/tools/scriptrunner/{CriticalCmdDialog-BjoqcWTu-baf2855f2bf6cdf762fb.js → CriticalCmdDialog-r7_5Z4Du-3fa8d0db2dfc87da12b7.js} +1 -1
- data/tools/scriptrunner/{DateWidget-B5R_9rA8-bf0e9b2c2d844495dd04.js → DateWidget-CIkO0xqH-8543019cc531a9048c3c.js} +1 -1
- data/tools/scriptrunner/{DetailsDialog-DLRMqetn-2b3771b90f4044ac6771.js → DetailsDialog-DyGpm5TP-72d4f28d0ede6777a0a0.js} +1 -1
- data/tools/scriptrunner/{DynamicWidget-m9EliUR2-d64e51887657bfc4d03f.js → DynamicWidget-gFSYxzvT-e32e3fc128199d278de2.js} +1 -1
- data/tools/scriptrunner/{FormatvalueWidget-DZkRJce8-7421198bc6589347b0a4.js → FormatvalueWidget-D8-EO_3E-a5fcfb651097756e7181.js} +1 -1
- data/tools/scriptrunner/Graph-EV7oK3qM-bff6cba1d677f1944661.js +1 -0
- data/tools/scriptrunner/GraphWidget-BTNYbd21-c08678ebe3106387a7d8.js +1 -0
- data/tools/scriptrunner/{HorizontalWidget-CirtfuL8-dc699acf1b526f0a14c4.js → HorizontalWidget-Bp-qtqoh-3c38976aeb066a2ffb2b.js} +1 -1
- data/tools/scriptrunner/{HorizontalboxWidget-CyTDt2nl-4e0a6393e5e21e54b369.js → HorizontalboxWidget-CrJuGY3s-4ffa979416a75c329776.js} +1 -1
- data/tools/scriptrunner/HorizontallineWidget-CbxREBYI-c14183b5ffed9388ece7.js +1 -0
- data/tools/scriptrunner/IframeWidget-DusiWNNj-c87cf1234922b5a77da1.js +1 -0
- data/tools/scriptrunner/ImageLoader-BapCB-Li-cfd3a56a85fcd497bfbb.js +1 -0
- data/tools/scriptrunner/{ImageviewerWidget-DIkmb_C9-57e0b16d4cc3b0795a4e.js → ImageviewerWidget-c0gJ9VDC-c0074846fd82e6b91cbf.js} +1 -1
- data/tools/scriptrunner/{LabelWidget-BDsypYho-82779e87dbb6e157d403.js → LabelWidget-pPgc0ve3-9d3792ed2b2a97f006b4.js} +1 -1
- data/tools/scriptrunner/LabelledWidget-CkNjby55-1e7c9467b6b21c78af4e.js +1 -0
- data/tools/scriptrunner/LabelprogressbarWidget-e2R2yQKw-9c500ac6c19140926177.js +1 -0
- data/tools/scriptrunner/LabelsparklineWidget-D7MQ_oNw-fb2e3da20952b8f733cc.js +1 -0
- data/tools/scriptrunner/LabelvalueWidget-4DShBBvr-42e8bb2a377d7f00b394.js +1 -0
- data/tools/scriptrunner/{LabelvaluedescWidget-CsUP7J4U-6425f7244247c5e8f75b.js → LabelvaluedescWidget-Z1m8Bi6N-b9e3579d7686cb73f514.js} +1 -1
- data/tools/scriptrunner/LabelvaluelimitsbarWidget-DVa-oYxU-87485069a3b0439e9a8a.js +1 -0
- data/tools/scriptrunner/LabelvaluelimitscolumnWidget-DduuX632-c7ddc8d8479888c4d786.js +1 -0
- data/tools/scriptrunner/{LabelvaluerangebarWidget-DpcXhlfF-1b6fdabef37a98d952b9.js → LabelvaluerangebarWidget-BR9vXOlt-72e691b163621ec5a970.js} +1 -1
- data/tools/scriptrunner/{Layout-C1HoM4Kl-d29c2656e1dc91cbadf0.js → Layout-Bk8EGxbP-71878e02c9b3a82f4bb5.js} +1 -1
- data/tools/scriptrunner/LedWidget-f7bf8ls_-4f7e254ee24a5e9308a7.js +1 -0
- data/tools/scriptrunner/{LimitsbarWidget-DXbqsi4J-606f0852c745b1d75a71.js → LimitsbarWidget-B7fHaDcJ-257602c4483aa162c9be.js} +1 -1
- data/tools/scriptrunner/{LimitscolorWidget-Ckmuw0YX-2b83ce7b7afe3b4b87c2.js → LimitscolorWidget-CpC4D_TC-27d3a401ad8b7bacf375.js} +1 -1
- data/tools/scriptrunner/{LimitscolumnWidget-BfY4su5U-f683680d74b03d48214e.js → LimitscolumnWidget-C9FbNC-U-c637fd3b805f1cd45b85.js} +1 -1
- data/tools/scriptrunner/LinegraphWidget-DkWDQ_3K-f6dfc8bc5af54c90273c.js +1 -0
- data/tools/scriptrunner/MatrixbycolumnsWidget-CHJDyYa3-162e42db40abe9ee7f03.js +1 -0
- data/tools/scriptrunner/{ProgressbarWidget-DpA_-vy9-5b5d66bee554250ddd13.js → ProgressbarWidget-CRZDxClT-8329f507143dd929683f.js} +1 -1
- data/tools/scriptrunner/RadiobuttonWidget-BW4yFweH-558d0cd7370539f543aa.js +1 -0
- data/tools/scriptrunner/RadiogroupWidget-_0bVCHjr-ef39d34f2fb249d6f83a.js +1 -0
- data/tools/scriptrunner/{RangebarWidget-DHS7S3vI-831b1aa9bf7ada4c8982.js → RangebarWidget-CEQFiG4l-49a0164fbfb9b91aba74.js} +1 -1
- data/tools/scriptrunner/{RollupWidget-CTk9Kjwr-fee4b52c2d0ac0675fa1.js → RollupWidget-579c7y0R-b0a3f05a713861902939.js} +1 -1
- data/tools/scriptrunner/ScriptRunner-ef0d5cd2f30a4e613b36.js +96 -0
- data/tools/scriptrunner/{ScrollwindowWidget-DD0TOW6s-d21f3e99b6007f66c57a.js → ScrollwindowWidget-Kcre9gM3-5b421f5ff10a6d280099.js} +1 -1
- data/tools/scriptrunner/{SignalWidget-CC33KMTW-25a228f34c6e80a7177b.js → SignalWidget-D55Myd0q-9d23916bf62da5e25988.js} +1 -1
- data/tools/scriptrunner/{SpacerWidget-BnJe_Hq6-37bfb1d7ec6d46304caa.js → SpacerWidget-DBDv_w_s-7ae22dd385e4eb8ec700.js} +1 -1
- data/tools/scriptrunner/SparklineWidget-DJvIL24z-64b9118d240ae40676c5.js +1 -0
- data/tools/scriptrunner/TabbookWidget-DH9DHnp1-d08f3e50f5d6c1c53a85.js +1 -0
- data/tools/scriptrunner/TextboxWidget-DCjIEzJn-45b0dd212b13c593065d.js +1 -0
- data/tools/scriptrunner/{TextfieldWidget-DXSdgqVP-d6bcda166a9140bd23e6.js → TextfieldWidget-BRQ6oPzR-4f700c9286344b791551.js} +1 -1
- data/tools/scriptrunner/{TimeWidget-DvrRaEMz-a98384f80e069ba5d4bd.js → TimeWidget-pXtrK5IC-4b0d76006c3cab0a38e2.js} +1 -1
- data/tools/scriptrunner/{TitleWidget-DqViFQl--df54f3619e4f303b1373.js → TitleWidget-CfAa2SyT-40f799135baf18b758cb.js} +1 -1
- data/tools/scriptrunner/VWidget-CN_afCKJ-813d7e1c3b753ce69205.js +1 -0
- data/tools/scriptrunner/ValueWidget-DIFivXw_-22bb8a3e6928b427cff9.js +1 -0
- data/tools/scriptrunner/ValuelimitsbarWidget-Cb7_SIUF-a4547015ebd91320c15b.js +1 -0
- data/tools/scriptrunner/ValuelimitscolumnWidget-D8bgZ7YP-28f64bf5779cfe12801b.js +1 -0
- data/tools/scriptrunner/{ValuerangebarWidget-B6M02a9d-f4b7a4b9709d461258c0.js → ValuerangebarWidget-VKygtFwP-cd7cb6ff5699196554ad.js} +1 -1
- data/tools/scriptrunner/VerticalWidget-BuvedA_b-888a1d49d68d055de14a.js +1 -0
- data/tools/scriptrunner/{VerticalboxWidget-3a9cVsW--b38be144237c8662c1fd.js → VerticalboxWidget-D_LcL3GF-f6200040da2b2f1c0a2d.js} +1 -1
- data/tools/scriptrunner/{Widget-C4QVI4IH-fe10a78e0f883ba2b0f8.js → Widget-CERFa1CU-aeb83d1feba192aa4ffa.js} +1 -1
- data/tools/scriptrunner/addMonths-BtG7uZLJ-90b93d68de4bd8ca4ae4.js +1 -0
- data/tools/scriptrunner/main-d9ddd98da30dd1e81580.js +1425 -0
- data/tools/scriptrunner/main.js +1 -1
- metadata +71 -69
- data/tools/scriptrunner/ArrayWidget-BTxChSds-b442fb0c83806f2a7155.js +0 -2
- data/tools/scriptrunner/CanvasdotWidget-VCf1fL-G-3222ffa0793edfcc58b9.js +0 -1
- data/tools/scriptrunner/CanvasimagevalueWidget-CE3Dj5bH-402c7188c011ef3c6974.js +0 -1
- data/tools/scriptrunner/CanvaslabelWidget-DWmb356h-45266fb96c5c19e29535.js +0 -1
- data/tools/scriptrunner/CanvaslineWidget-COeapH3P-99c09c560599b697ce65.js +0 -1
- data/tools/scriptrunner/CheckbuttonWidget-BQhggcZ2-2c444bdd2fdec2093442.js +0 -1
- data/tools/scriptrunner/ComboboxWidget-BzsbOv54-625fab6cb3f3fac91459.js +0 -1
- data/tools/scriptrunner/GraphWidget-amwxyH1r-46f252ec6f59cf6dddd0.js +0 -1
- data/tools/scriptrunner/HorizontallineWidget-BdlNB951-6bf4113b8d85559b4492.js +0 -1
- data/tools/scriptrunner/IframeWidget-DnJmCrCA-f3667cd357ba9a81dcc4.js +0 -1
- data/tools/scriptrunner/ImageLoader-CpcR6tPi-c4f247a819912f328147.js +0 -1
- data/tools/scriptrunner/LabelledWidget-DjturGl5-ac54d7a82f0cf056bf05.js +0 -1
- data/tools/scriptrunner/LabelprogressbarWidget-RADJGLj3-ff7bcc6fbf5aed7ad6eb.js +0 -1
- data/tools/scriptrunner/LabelsparklineWidget-BlJoICxu-549dff62b17f07fa1a4d.js +0 -1
- data/tools/scriptrunner/LabelvalueWidget-DVWJqnlY-4b8678af8e6c3843f1af.js +0 -1
- data/tools/scriptrunner/LabelvaluelimitsbarWidget-Blj1QXV8-8cf7ae38507f8066ee5d.js +0 -1
- data/tools/scriptrunner/LabelvaluelimitscolumnWidget-CvCo-uCe-9b7a1a45724b4dabdffb.js +0 -1
- data/tools/scriptrunner/LedWidget-B_K2e5tq-677c4976f93116291b06.js +0 -1
- data/tools/scriptrunner/LinegraphWidget-y-Qy9P0R-c7ed03e2084fae4a0342.js +0 -1
- data/tools/scriptrunner/MatrixbycolumnsWidget-BTBColrs-a5637f85840ad0341e64.js +0 -1
- data/tools/scriptrunner/RadiobuttonWidget-BO8zpgwW-5c50d2cff32ebf5ecae0.js +0 -1
- data/tools/scriptrunner/RadiogroupWidget-Oy7V4S-V-84b6b69f058ff364a77e.js +0 -1
- data/tools/scriptrunner/ScriptRunner-b8a3addf4ef3e33ba3d1.js +0 -96
- data/tools/scriptrunner/SparklineWidget-DMvMQCPm-4332f55116114aa68aef.js +0 -1
- data/tools/scriptrunner/TabbookWidget-B3w0JtWe-a8d257e93d6ef21500c8.js +0 -1
- data/tools/scriptrunner/TextboxWidget-D2f0-eol-bb94d6677ee14cd32fcf.js +0 -1
- data/tools/scriptrunner/VWidget-02CG-3Av-9579e154442a96ddbf76.js +0 -1
- data/tools/scriptrunner/ValueWidget-KLYY8L8U-96ee5f0706e36c6885e6.js +0 -1
- data/tools/scriptrunner/ValuelimitsbarWidget-SR8XNZFB-58ea8b55d6ece94d270a.js +0 -1
- data/tools/scriptrunner/ValuelimitscolumnWidget-xYZSp6YZ-906fdefa13c32c7e4d3c.js +0 -1
- data/tools/scriptrunner/VerticalWidget-z6xUM-ql-6daf5ea34d2f88e2414e.js +0 -1
- data/tools/scriptrunner/addMonths-BdRI44Cs-495ddb75f786e4f5c19b.js +0 -1
- data/tools/scriptrunner/main-26581a6a2cf6f9faf01c.js +0 -1425
@@ -0,0 +1,96 @@
|
|
1
|
+
var xh=Object.defineProperty;var Li=B=>{throw TypeError(B)};var Eh=(B,j,p)=>j in B?xh(B,j,{enumerable:!0,configurable:!0,writable:!0,value:p}):B[j]=p;var Cn=(B,j,p)=>Eh(B,typeof j!="symbol"?j+"":j,p),zi=(B,j,p)=>j.has(B)||Li("Cannot "+p);var ee=(B,j,p)=>(zi(B,j,"read from private field"),p?p.call(B):j.get(B)),be=(B,j,p)=>j.has(B)?Li("Cannot add the same private member more than once"):j instanceof WeakSet?j.add(B):j.set(B,p),ze=(B,j,p,D)=>(zi(B,j,"write to private field"),D?D.call(B,p):j.set(B,p),p);System.register(["vue","./main-d9ddd98da30dd1e81580.js","single-spa","./addMonths-BtG7uZLJ-90b93d68de4bd8ca4ae4.js","./CriticalCmdDialog-r7_5Z4Du-3fa8d0db2dfc87da12b7.js","vue-router","vuex","vuetify"],function(B,j){"use strict";var p,D,k,c,a,v,I,G,J,x,A,te,le,ie,On,Me,L,ut,Tn,Rn,ve,Se,ye,Lt,re,Y,Pn,pe,qe,Be,Dn,An,Mn,Vn,oe,Un,Nn,In,Fn,Ln,zn;return{setters:[M=>{p=M.resolveComponent,D=M.createBlock,k=M.openBlock,c=M.withCtx,a=M.createVNode,v=M.createElementVNode,I=M.toDisplayString,G=M.normalizeProps,J=M.guardReactiveProps,x=M.createTextVNode,A=M.createElementBlock,te=M.Fragment,le=M.renderList,ie=M.mergeProps,On=M.Teleport,Me=M.createSlots,L=M.createCommentVNode,ut=M.normalizeStyle,Tn=M.h,Rn=M.renderSlot,ve=M.withDirectives,Se=M.vShow,ye=M.withModifiers,Lt=M.normalizeClass},M=>{re=M.s,Y=M.d,Pn=M.R,pe=M.M,qe=M.P,Be=M.p,Dn=M.c,An=M.l,Mn=M.z,Vn=M.y,oe=M._,Un=M.j,Nn=M.$,In=M.q,Fn=M.t},null,M=>{Ln=M.M},M=>{zn=M.N},null,null,null],execute:function(){var Ae,it,rt,ot,at,It,lt,ct,Ft;var M=document.createElement("style");M.textContent=`.splitpanes{display:flex;width:100%;height:100%}.splitpanes--vertical{flex-direction:row}.splitpanes--horizontal{flex-direction:column}.splitpanes--dragging *{-webkit-user-select:none;user-select:none}.splitpanes__pane{width:100%;height:100%;overflow:hidden}.splitpanes--vertical .splitpanes__pane{transition:width .2s ease-out}.splitpanes--horizontal .splitpanes__pane{transition:height .2s ease-out}.splitpanes--dragging .splitpanes__pane{transition:none}.splitpanes__splitter{touch-action:none}.splitpanes--vertical>.splitpanes__splitter{min-width:1px;cursor:col-resize}.splitpanes--horizontal>.splitpanes__splitter{min-height:1px;cursor:row-resize}.splitpanes.default-theme .splitpanes__pane{background-color:#f2f2f2}.splitpanes.default-theme .splitpanes__splitter{background-color:#fff;box-sizing:border-box;position:relative;flex-shrink:0}.splitpanes.default-theme .splitpanes__splitter:before,.splitpanes.default-theme .splitpanes__splitter:after{content:"";position:absolute;top:50%;left:50%;background-color:#00000026;transition:background-color .3s}.splitpanes.default-theme .splitpanes__splitter:hover:before,.splitpanes.default-theme .splitpanes__splitter:hover:after{background-color:#00000040}.splitpanes.default-theme .splitpanes__splitter:first-child{cursor:auto}.default-theme.splitpanes .splitpanes .splitpanes__splitter{z-index:1}.default-theme.splitpanes--vertical>.splitpanes__splitter,.default-theme .splitpanes--vertical>.splitpanes__splitter{width:7px;border-left:1px solid #eee;margin-left:-1px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{transform:translateY(-50%);width:1px;height:30px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{margin-left:-2px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{margin-left:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter,.default-theme .splitpanes--horizontal>.splitpanes__splitter{height:7px;border-top:1px solid #eee;margin-top:-1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{transform:translate(-50%);width:30px;height:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{margin-top:-2px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{margin-top:1px}.question[data-v-b44e26bc]{font-size:1rem;white-space:pre-line}.title[data-v-249a9bb3]{font-size:1.125rem;font-weight:700;padding-bottom:5px}.v-card__subtitle[data-v-b04397fe]{padding:0 0 10px}.text[data-v-b04397fe]{font-size:1rem;white-space:pre-line}.invisible[data-v-40a2938d]{visibility:hidden}#tr-container[data-v-40a2938d]{padding:0 0 15px}.v-sheet{background-color:var(--color-background-base-default)}#sr-controls[data-v-415f09d1]{padding:0}.editor[data-v-415f09d1]{height:100%;width:100%;position:relative;font-size:16px}.script-state[data-v-415f09d1] .v-field{background-color:var(--color-background-base-default)}.script-state[data-v-415f09d1] input{text-transform:capitalize}.splitpanes{height:100%}.splitpanes--horizontal>.splitpanes__splitter{min-height:4px;position:relative;top:4px;background-color:gray;width:5%;margin:auto;cursor:row-resize}.runningMarker{position:absolute;background:#00ff0080;z-index:20}.waitingMarker{position:absolute;background:#009b00;z-index:20}.breakpointMarker{position:absolute;border-style:solid;border-color:red;background:#00ff0080;z-index:20}.pausedMarker{position:absolute;background:#008cff80;z-index:20}.errorMarker{position:absolute;background:#ff007780;z-index:20}.fatalMarker{position:absolute;background:#ff000080;z-index:20}.saving{z-index:20;opacity:.35}.ace_gutter{z-index:2}.ace_gutter-cell.ace_breakpoint{border-radius:20px 0 0 20px;box-shadow:0 0 1px 1px red inset}.grid{position:relative}.item{position:absolute;display:block;margin:5px;z-index:1}.item-content{position:relative;cursor:pointer;border-radius:6px}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(M);const qn={data:{configKey:""},methods:{buildLanguageMode(t,e){let n=Y.require("ace/lib/oop"),s=Object.getOwnPropertyNames(Pn.prototype).filter(u=>u!=="constructor").filter(u=>u!=="exec").concat(["check","check_raw","check_formatted","check_with_units","check_exception","check_tolerance","check_expression","wait","wait_tolerance","wait_expression","wait_check","wait_check_tolerance","wait_check_expression","wait_packet","wait_check_packet","disable_instrumentation","set_line_delay","get_line_delay","set_max_output","get_max_output"]),i=new RegExp(`(\\b${s.join("\\b|\\b")}\\b)`),r=function(){t.call(this);for(let u in this.$rules)this.$rules[u].unshift({regex:i,token:"support.function"})};n.inherits(r,t);let o=Y.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,l=Y.require("ace/mode/behaviour/cstyle").CstyleBehaviour;return[n,function(){this.HighlightRules=r,this.$outdent=new o,this.$behaviour=new l,this.foldingRules=new e,this.indentKeywords=this.foldingRules.indentKeywords}]},buildRubyMode(){const[t,e]=this.buildLanguageMode(Y.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,Y.require("ace/mode/folding/ruby").FoldMode);let n=Y.require("ace/mode/ruby").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildPythonMode(){const[t,e]=this.buildLanguageMode(Y.require("ace/mode/python_highlight_rules").PythonHighlightRules,Y.require("ace/mode/folding/pythonic").FoldMode);let n=Y.require("ace/mode/python").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildJsonMode(){const[t,e]=this.buildLanguageMode(Y.require("ace/mode/json_highlight_rules").JsonHighlightRules,Y.require("ace/mode/folding/ruby").FoldMode);let n=Y.require("ace/mode/json").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildMarkdownMode(){const[t,e]=this.buildLanguageMode(Y.require("ace/mode/markdown_highlight_rules").MarkdownHighlightRules,Y.require("ace/mode/folding/markdown").FoldMode);let n=Y.require("ace/mode/markdown").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e}}},ji={props:{content:{type:String,required:!0},type:String,name:String,modelValue:Boolean,filename:{type:String,required:!1}},mixins:[qn],data(){return{editor:null,mode:null}},mounted(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");let t=null;switch(this.filename?this.filename.split(".").pop():"txt"){case"json":const e=this.buildJsonMode();t=new e,this.editor.setOptions({useWorker:!1});case"py":case"pyi":const n=this.buildPythonMode();t=new n;break;case"md":const s=this.buildMarkdownMode();t=new s;break;default:const i=this.buildRubyMode();t=new i;break}this.editor.session.setMode(t),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.content),this.editor.clearSelection(),this.editor.focus(),this.editor.setReadOnly(!0)},beforeUnmount(){this.editor&&this.editor.destroy()},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},title:function(){return`${this.type}: ${this.name}`}},methods:{close:function(){this.show=!this.show},download:function(){const t=new Blob([this.editor.getValue()],{type:"text/plain"});let e=`${this.type.toLowerCase()}_${this.name.toLowerCase()}.json`;this.filename&&(e=this.filename);const n=document.createElement("a");n.href=URL.createObjectURL(t),n.setAttribute("download",e),n.click()}}},$i=["textContent"],Hi={class:"mx-2"},Wi={class:"editor",ref:"editor"};function Gi(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-icon"),u=p("v-tooltip"),d=p("v-toolbar"),h=p("v-card-text"),f=p("v-btn"),g=p("v-card-actions"),b=p("v-card"),y=p("v-dialog");return k(),D(y,{modelValue:r.show,"onUpdate:modelValue":e[1]||(e[1]=m=>r.show=m),width:"85vw"},{default:c(()=>[a(b,null,{default:c(()=>[a(d,{height:"24"},{default:c(()=>[a(o),v("span",{textContent:I(r.title)},null,8,$i),a(o),v("div",Hi,[a(u,{location:"top"},{activator:c(({props:m})=>[v("div",G(J(m)),[a(l,{"data-test":"downloadIcon",onClick:r.download},{default:c(()=>e[2]||(e[2]=[x(" mdi-download ")])),_:1},8,["onClick"])],16)]),default:c(()=>[e[3]||(e[3]=v("span",null," Download ",-1))]),_:1})])]),_:1}),a(h,null,{default:c(()=>[v("pre",Wi,null,512)]),_:1}),a(g,{class:"pr-6 pb-4 pt-0"},{default:c(()=>[a(o),a(f,{variant:"flat",onClick:e[0]||(e[0]=m=>r.show=!r.show)},{default:c(()=>e[4]||(e[4]=[x(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Ji=re(ji,[["render",Gi],["__scopeId","data-v-b0c9f05d"]]),Yi={props:{modelValue:{type:Array,required:!0}},computed:{selected:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{addEnvVar:function(){this.selected.push({key:"",value:""})},delEnvVar:function(t){this.selected.splice(t,1)}}},Ki={scope:"col",class:"text-right"};function Xi(t,e,n,s,i,r){const o=p("v-icon"),l=p("v-tooltip"),u=p("v-text-field"),d=p("v-table");return k(),A("div",null,[a(d,{dense:""},{default:c(()=>[e[6]||(e[6]=v("span",null," Add environment variables (optional)",-1)),v("tbody",null,[v("tr",null,[e[2]||(e[2]=v("th",{scope:"col",class:"text-left"},"Key",-1)),e[3]||(e[3]=v("th",{scope:"col",class:"text-left"},"Value",-1)),v("th",Ki,[a(l,{location:"top"},{activator:c(({props:h})=>[v("div",G(J(h)),[a(o,{"data-test":"new-metadata-icon",onClick:r.addEnvVar},{default:c(()=>e[0]||(e[0]=[x(" mdi-plus ")])),_:1},8,["onClick"])],16)]),default:c(()=>[e[1]||(e[1]=v("span",null," Add Environment ",-1))]),_:1})])]),(k(!0),A(te,null,le(r.selected,(h,f)=>(k(),A("tr",{key:`tr-${f}`},[v("td",null,[a(u,{modelValue:h.key,"onUpdate:modelValue":g=>h.key=g,density:"compact",type:"text",readonly:h.readonly,"data-test":`key-${f}`},null,8,["modelValue","onUpdate:modelValue","readonly","data-test"])]),v("td",null,[a(u,{modelValue:h.value,"onUpdate:modelValue":g=>h.value=g,density:"compact",type:"text",readonly:h.readonly,"data-test":`value-${f}`},null,8,["modelValue","onUpdate:modelValue","readonly","data-test"])]),v("td",null,[a(l,{location:"top"},{activator:c(({props:g})=>[v("div",ie({ref_for:!0},g),[a(o,{"data-test":`remove-env-icon-${f}`,onClick:b=>r.delEnvVar(f)},{default:c(()=>e[4]||(e[4]=[x(" mdi-delete ")])),_:2},1032,["data-test","onClick"])],16)]),default:c(()=>[e[5]||(e[5]=v("span",null," Delete Environment ",-1))]),_:2},1024)])]))),128))])]),_:1})])}const Bn=re(Yi,[["render",Xi]]),Zi={props:{modelValue:String},data(){return{loading:!1,search:"",selected:this.modelValue,scripts:[],items:[]}},created(){this.loading=!0,pe.get("/script-api/scripts").then(t=>{this.scripts=t.data.filter(e=>e.includes(".rb")||e.includes(".py")),this.items=this.scripts}).catch(t=>{this.$emit("error",{type:"error",text:`Failed to connect to OpenC3. ${t}`,error:t})}),this.selected=this.modelValue?this.modelValue:null,this.loading=!1},watch:{selected(t,e){t!==e&&(t.slice(-1)==="*"?this.$emit("file",t.substring(0,t.length-1)):this.$emit("file",t))},search(t){t&&t!==this.selected&&this.querySelections(t)}},methods:{querySelections:function(t){this.loading=!0,setTimeout(()=>{this.items=this.scripts.filter(e=>(e||"").toLowerCase().indexOf((t||"").toLowerCase())>-1),this.loading=!1},500)}}};function Qi(t,e,n,s,i,r){const o=p("v-autocomplete"),l=p("v-row");return k(),A("div",null,[a(l,null,{default:c(()=>[a(o,{modelValue:i.selected,"onUpdate:modelValue":e[0]||(e[0]=u=>i.selected=u),density:"compact",variant:"outlined","hide-no-data":"","hide-details":"",class:"mb-5",label:"Select script",loading:i.loading,items:i.items,search:i.search,"onUpdate:search":e[1]||(e[1]=u=>i.search=u),"data-test":"select-script"},null,8,["modelValue","loading","items","search"])]),_:1})])}const er=re(Zi,[["render",Qi]]),tr={props:{modelValue:Boolean,text:String,title:String,width:{type:Number,default:800}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{download:function(){const t=new Blob([this.text],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",`${this.title}.txt`),e.click()}}},nr={class:"mx-2"},sr={class:"pa-3"},ir={class:"text"};function rr(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-icon"),u=p("v-tooltip"),d=p("v-toolbar"),h=p("v-card-text"),f=p("v-btn"),g=p("v-card-actions"),b=p("v-card"),y=p("v-dialog");return k(),D(y,{modelValue:r.show,"onUpdate:modelValue":e[1]||(e[1]=m=>r.show=m),width:n.width,scrollable:""},{default:c(()=>[a(b,null,{default:c(()=>[a(d,{height:"24"},{default:c(()=>[a(o),v("span",null,I(n.title),1),a(o),v("div",nr,[a(u,{location:"top"},{activator:c(({props:m})=>[v("div",G(J(m)),[a(l,{"data-test":"downloadIcon",onClick:r.download},{default:c(()=>e[2]||(e[2]=[x(" mdi-download ")])),_:1},8,["onClick"])],16)]),default:c(()=>[e[3]||(e[3]=v("span",null," Download ",-1))]),_:1})])]),_:1}),a(h,{style:{"max-height":"80vh"}},{default:c(()=>[v("div",sr,[v("span",ir,I(n.text),1)])]),_:1}),a(g,{class:"px-2"},{default:c(()=>[a(o),a(f,{variant:"flat",onClick:e[0]||(e[0]=m=>r.show=!r.show)},{default:c(()=>e[4]||(e[4]=[x(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}const or=re(tr,[["render",rr],["__scopeId","data-v-a60ace75"]]),ar={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},lr={class:"app-title mr-2"};function cr(t,e,n,s,i,r){const o=p("v-col"),l=p("v-row"),u=p("v-icon"),d=p("v-btn"),h=p("v-divider"),f=p("v-list-item-title"),g=p("v-list-item"),b=p("v-list"),y=p("v-menu"),m=p("v-radio"),S=p("v-list-item-action"),T=p("v-radio-group"),O=p("v-checkbox");return k(),D(On,{to:"#openc3-menu"},[a(l,{"no-gutters":""},{default:c(()=>[a(o,{"align-self":"end"},{default:c(()=>[v("span",lr,I(n.title),1)]),_:1})]),_:1}),a(l,{dense:"",class:"flex-nowrap"},{default:c(()=>[(k(!0),A(te,null,le(n.menus,(P,q)=>(k(),D(y,{ref_for:!0,ref:"topmenu",key:q},{activator:c(({props:E})=>[a(d,ie({ref_for:!0},E,{variant:"outlined",class:"mx-1 menu-button",text:P.label,"data-test":r.formatDT(`${n.title} ${P.label}`)}),{append:c(()=>[a(u,{class:"menu-button-icon"},{default:c(()=>e[0]||(e[0]=[x(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:c(()=>[a(b,null,{default:c(()=>[(k(!0),A(te,null,le(P.items,(E,R)=>(k(),A(te,null,[E.divider?(k(),D(h,{key:R+"-divider"})):E.subMenu&&E.subMenu.length>0?(k(),A("div",{key:R+"-submenu"},[(k(),D(y,{"open-on-hover":"",location:"right",key:R},{activator:c(({props:F})=>[(k(),D(g,ie({ref_for:!0},F,{disabled:E.disabled,key:R}),Me({append:c(()=>[a(u,null,{default:c(()=>e[1]||(e[1]=[x(" mdi-chevron-right ")])),_:1})]),default:c(()=>[!E.radio&&!E.checkbox?(k(),D(f,{key:0,style:ut("cursor: pointer;"+(E.disabled?"opacity: 0.2":""))},{default:c(()=>[x(I(E.label),1)]),_:2},1032,["style"])):L("",!0)]),_:2},[E.icon?{name:"prepend",fn:c(()=>[a(u,{disabled:E.disabled},{default:c(()=>[x(I(E.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:c(()=>[a(b,null,{default:c(()=>[(k(!0),A(te,null,le(E.subMenu,(F,W)=>(k(),D(g,{key:W,"prepend-icon":F.icon,onClick:ae=>r.subMenuClick(F)},{default:c(()=>[a(f,null,{default:c(()=>[x(I(F.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):E.radioGroup?(k(),D(T,{"model-value":E.value,"onUpdate:modelValue":E.command,key:R+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:c(()=>[(k(!0),A(te,null,le(E.choices,(F,W)=>(k(),D(g,{key:W+"-choice"},{default:c(()=>[a(S,{class:"list-action"},{default:c(()=>[a(m,{color:"secondary",label:F.label,value:F.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(k(),D(g,{onClick:F=>E.command(E),disabled:E.disabled,"data-test":r.formatDT(`${n.title} ${P.label} ${E.label}`),key:R+"-list"},Me({default:c(()=>[E.checkbox?(k(),D(S,{key:0,class:"list-action"},{default:c(()=>[a(O,{modelValue:E.checked,"onUpdate:modelValue":F=>E.checked=F,label:E.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):L("",!0),!E.radio&&!E.checkbox?(k(),D(f,{key:1,style:ut("cursor: pointer;"+(E.disabled?"opacity: 0.2":""))},{default:c(()=>[x(I(E.label),1)]),_:2},1032,["style"])):L("",!0)]),_:2},[E.icon?{name:"prepend",fn:c(()=>[a(u,{icon:E.icon,disabled:E.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const ur=re(ar,[["render",cr],["__scopeId","data-v-4d454b93"]]);function jn(t,e){return function(){return t.apply(e,arguments)}}const{toString:dr}=Object.prototype,{getPrototypeOf:zt}=Object,dt=(t=>e=>{const n=dr.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ce=t=>(t=t.toLowerCase(),e=>dt(e)===t),ht=t=>e=>typeof e===t,{isArray:Ve}=Array,je=ht("undefined");function hr(t){return t!==null&&!je(t)&&t.constructor!==null&&!je(t.constructor)&&ne(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const $n=ce("ArrayBuffer");function pr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&$n(t.buffer),e}const mr=ht("string"),ne=ht("function"),Hn=ht("number"),pt=t=>t!==null&&typeof t=="object",fr=t=>t===!0||t===!1,mt=t=>{if(dt(t)!=="object")return!1;const e=zt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},gr=ce("Date"),br=ce("File"),yr=ce("Blob"),wr=ce("FileList"),_r=t=>pt(t)&&ne(t.pipe),vr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ne(t.append)&&((e=dt(t))==="formdata"||e==="object"&&ne(t.toString)&&t.toString()==="[object FormData]"))},Sr=ce("URLSearchParams"),[kr,xr,Er,Cr]=["ReadableStream","Request","Response","Headers"].map(ce),Or=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $e(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,i;if(typeof t!="object"&&(t=[t]),Ve(t))for(s=0,i=t.length;s<i;s++)e.call(null,t[s],s,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),o=r.length;let l;for(s=0;s<o;s++)l=r[s],e.call(null,t[l],l,t)}}function Wn(t,e){e=e.toLowerCase();const n=Object.keys(t);let s=n.length,i;for(;s-- >0;)if(i=n[s],e===i.toLowerCase())return i;return null}const ke=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gn=t=>!je(t)&&t!==ke;function qt(){const{caseless:t}=Gn(this)&&this||{},e={},n=(s,i)=>{const r=t&&Wn(e,i)||i;mt(e[r])&&mt(s)?e[r]=qt(e[r],s):mt(s)?e[r]=qt({},s):Ve(s)?e[r]=s.slice():e[r]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&$e(arguments[s],n);return e}const Tr=(t,e,n,{allOwnKeys:s}={})=>($e(e,(i,r)=>{n&&ne(i)?t[r]=jn(i,n):t[r]=i},{allOwnKeys:s}),t),Rr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Pr=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Dr=(t,e,n,s)=>{let i,r,o;const l={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),r=i.length;r-- >0;)o=i[r],(!s||s(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=n!==!1&&zt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Ar=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},Mr=t=>{if(!t)return null;if(Ve(t))return t;let e=t.length;if(!Hn(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Vr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&zt(Uint8Array)),Ur=(t,e)=>{const s=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=s.next())&&!i.done;){const r=i.value;e.call(t,r[0],r[1])}},Nr=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},Ir=ce("HTMLFormElement"),Fr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,i){return s.toUpperCase()+i}),Jn=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Lr=ce("RegExp"),Yn=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};$e(n,(i,r)=>{let o;(o=e(i,r,t))!==!1&&(s[r]=o||i)}),Object.defineProperties(t,s)},zr=t=>{Yn(t,(e,n)=>{if(ne(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=t[n];if(ne(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},qr=(t,e)=>{const n={},s=i=>{i.forEach(r=>{n[r]=!0})};return Ve(t)?s(t):s(String(t).split(e)),n},Br=()=>{},jr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Bt="abcdefghijklmnopqrstuvwxyz",Kn="0123456789",Xn={DIGIT:Kn,ALPHA:Bt,ALPHA_DIGIT:Bt+Bt.toUpperCase()+Kn},$r=(t=16,e=Xn.ALPHA_DIGIT)=>{let n="";const{length:s}=e;for(;t--;)n+=e[Math.random()*s|0];return n};function Hr(t){return!!(t&&ne(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Wr=t=>{const e=new Array(10),n=(s,i)=>{if(pt(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[i]=s;const r=Ve(s)?[]:{};return $e(s,(o,l)=>{const u=n(o,i+1);!je(u)&&(r[l]=u)}),e[i]=void 0,r}}return s};return n(t,0)},Gr=ce("AsyncFunction"),Jr=t=>t&&(pt(t)||ne(t))&&ne(t.then)&&ne(t.catch),Zn=((t,e)=>t?setImmediate:e?((n,s)=>(ke.addEventListener("message",({source:i,data:r})=>{i===ke&&r===n&&s.length&&s.shift()()},!1),i=>{s.push(i),ke.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ne(ke.postMessage)),Yr=typeof queueMicrotask<"u"?queueMicrotask.bind(ke):typeof process<"u"&&process.nextTick||Zn,w={isArray:Ve,isArrayBuffer:$n,isBuffer:hr,isFormData:vr,isArrayBufferView:pr,isString:mr,isNumber:Hn,isBoolean:fr,isObject:pt,isPlainObject:mt,isReadableStream:kr,isRequest:xr,isResponse:Er,isHeaders:Cr,isUndefined:je,isDate:gr,isFile:br,isBlob:yr,isRegExp:Lr,isFunction:ne,isStream:_r,isURLSearchParams:Sr,isTypedArray:Vr,isFileList:wr,forEach:$e,merge:qt,extend:Tr,trim:Or,stripBOM:Rr,inherits:Pr,toFlatObject:Dr,kindOf:dt,kindOfTest:ce,endsWith:Ar,toArray:Mr,forEachEntry:Ur,matchAll:Nr,isHTMLForm:Ir,hasOwnProperty:Jn,hasOwnProp:Jn,reduceDescriptors:Yn,freezeMethods:zr,toObjectSet:qr,toCamelCase:Fr,noop:Br,toFiniteNumber:jr,findKey:Wn,global:ke,isContextDefined:Gn,ALPHABET:Xn,generateString:$r,isSpecCompliantForm:Hr,toJSONObject:Wr,isAsyncFn:Gr,isThenable:Jr,setImmediate:Zn,asap:Yr};function V(t,e,n,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}w.inherits(V,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:w.toJSONObject(this.config),code:this.code,status:this.status}}});const Qn=V.prototype,es={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{es[t]={value:t}}),Object.defineProperties(V,es),Object.defineProperty(Qn,"isAxiosError",{value:!0}),V.from=(t,e,n,s,i,r)=>{const o=Object.create(Qn);return w.toFlatObject(t,o,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),V.call(o,t.message,e,n,s,i),o.cause=t,o.name=t.name,r&&Object.assign(o,r),o};const Kr=null;function jt(t){return w.isPlainObject(t)||w.isArray(t)}function ts(t){return w.endsWith(t,"[]")?t.slice(0,-2):t}function ns(t,e,n){return t?t.concat(e).map(function(i,r){return i=ts(i),!n&&r?"["+i+"]":i}).join(n?".":""):e}function Xr(t){return w.isArray(t)&&!t.some(jt)}const Zr=w.toFlatObject(w,{},null,function(e){return/^is[A-Z]/.test(e)});function ft(t,e,n){if(!w.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=w.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,S){return!w.isUndefined(S[m])});const s=n.metaTokens,i=n.visitor||h,r=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&w.isSpecCompliantForm(e);if(!w.isFunction(i))throw new TypeError("visitor must be a function");function d(y){if(y===null)return"";if(w.isDate(y))return y.toISOString();if(!u&&w.isBlob(y))throw new V("Blob is not supported. Use a Buffer instead.");return w.isArrayBuffer(y)||w.isTypedArray(y)?u&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function h(y,m,S){let T=y;if(y&&!S&&typeof y=="object"){if(w.endsWith(m,"{}"))m=s?m:m.slice(0,-2),y=JSON.stringify(y);else if(w.isArray(y)&&Xr(y)||(w.isFileList(y)||w.endsWith(m,"[]"))&&(T=w.toArray(y)))return m=ts(m),T.forEach(function(P,q){!(w.isUndefined(P)||P===null)&&e.append(o===!0?ns([m],q,r):o===null?m:m+"[]",d(P))}),!1}return jt(y)?!0:(e.append(ns(S,m,r),d(y)),!1)}const f=[],g=Object.assign(Zr,{defaultVisitor:h,convertValue:d,isVisitable:jt});function b(y,m){if(!w.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(y),w.forEach(y,function(T,O){(!(w.isUndefined(T)||T===null)&&i.call(e,T,w.isString(O)?O.trim():O,m,g))===!0&&b(T,m?m.concat(O):[O])}),f.pop()}}if(!w.isObject(t))throw new TypeError("data must be an object");return b(t),e}function ss(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function $t(t,e){this._pairs=[],t&&ft(t,this,e)}const is=$t.prototype;is.append=function(e,n){this._pairs.push([e,n])},is.toString=function(e){const n=e?function(s){return e.call(this,s,ss)}:ss;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Qr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rs(t,e,n){if(!e)return t;const s=n&&n.encode||Qr;w.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let r;if(i?r=i(e,n):r=w.isURLSearchParams(e)?e.toString():new $t(e,n).toString(s),r){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+r}return t}class os{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){w.forEach(this.handlers,function(s){s!==null&&e(s)})}}const as={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eo={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:$t,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ht=typeof window<"u"&&typeof document<"u",Wt=typeof navigator=="object"&&navigator||void 0,to=Ht&&(!Wt||["ReactNative","NativeScript","NS"].indexOf(Wt.product)<0),no=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",so=Ht&&window.location.href||"http://localhost",K={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ht,hasStandardBrowserEnv:to,hasStandardBrowserWebWorkerEnv:no,navigator:Wt,origin:so},Symbol.toStringTag,{value:"Module"})),...eo};function io(t,e){return ft(t,new K.classes.URLSearchParams,Object.assign({visitor:function(n,s,i,r){return K.isNode&&w.isBuffer(n)?(this.append(s,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function ro(t){return w.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function oo(t){const e={},n=Object.keys(t);let s;const i=n.length;let r;for(s=0;s<i;s++)r=n[s],e[r]=t[r];return e}function ls(t){function e(n,s,i,r){let o=n[r++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),u=r>=n.length;return o=!o&&w.isArray(i)?i.length:o,u?(w.hasOwnProp(i,o)?i[o]=[i[o],s]:i[o]=s,!l):((!i[o]||!w.isObject(i[o]))&&(i[o]=[]),e(n,s,i[o],r)&&w.isArray(i[o])&&(i[o]=oo(i[o])),!l)}if(w.isFormData(t)&&w.isFunction(t.entries)){const n={};return w.forEachEntry(t,(s,i)=>{e(ro(s),i,n,0)}),n}return null}function ao(t,e,n){if(w.isString(t))try{return(e||JSON.parse)(t),w.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const He={transitional:as,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const s=n.getContentType()||"",i=s.indexOf("application/json")>-1,r=w.isObject(e);if(r&&w.isHTMLForm(e)&&(e=new FormData(e)),w.isFormData(e))return i?JSON.stringify(ls(e)):e;if(w.isArrayBuffer(e)||w.isBuffer(e)||w.isStream(e)||w.isFile(e)||w.isBlob(e)||w.isReadableStream(e))return e;if(w.isArrayBufferView(e))return e.buffer;if(w.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return io(e,this.formSerializer).toString();if((l=w.isFileList(e))||s.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return ft(l?{"files[]":e}:e,u&&new u,this.formSerializer)}}return r||i?(n.setContentType("application/json",!1),ao(e)):e}],transformResponse:[function(e){const n=this.transitional||He.transitional,s=n&&n.forcedJSONParsing,i=this.responseType==="json";if(w.isResponse(e)||w.isReadableStream(e))return e;if(e&&w.isString(e)&&(s&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(l){if(o)throw l.name==="SyntaxError"?V.from(l,V.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:K.classes.FormData,Blob:K.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch"],t=>{He.headers[t]={}});const lo=w.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"]),co=t=>{const e={};let n,s,i;return t&&t.split(`
|
3
|
+
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),s=o.substring(i+1).trim(),!(!n||e[n]&&lo[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e},cs=Symbol("internals");function We(t){return t&&String(t).trim().toLowerCase()}function gt(t){return t===!1||t==null?t:w.isArray(t)?t.map(gt):String(t)}function uo(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const ho=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Gt(t,e,n,s,i){if(w.isFunction(s))return s.call(this,e,n);if(i&&(e=n),!!w.isString(e)){if(w.isString(s))return e.indexOf(s)!==-1;if(w.isRegExp(s))return s.test(e)}}function po(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function mo(t,e){const n=w.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{value:function(i,r,o){return this[s].call(this,e,i,r,o)},configurable:!0})})}let Z=class{constructor(e){e&&this.set(e)}set(e,n,s){const i=this;function r(l,u,d){const h=We(u);if(!h)throw new Error("header name must be a non-empty string");const f=w.findKey(i,h);(!f||i[f]===void 0||d===!0||d===void 0&&i[f]!==!1)&&(i[f||u]=gt(l))}const o=(l,u)=>w.forEach(l,(d,h)=>r(d,h,u));if(w.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(w.isString(e)&&(e=e.trim())&&!ho(e))o(co(e),n);else if(w.isHeaders(e))for(const[l,u]of e.entries())r(u,l,s);else e!=null&&r(n,e,s);return this}get(e,n){if(e=We(e),e){const s=w.findKey(this,e);if(s){const i=this[s];if(!n)return i;if(n===!0)return uo(i);if(w.isFunction(n))return n.call(this,i,s);if(w.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=We(e),e){const s=w.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||Gt(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let i=!1;function r(o){if(o=We(o),o){const l=w.findKey(s,o);l&&(!n||Gt(s,s[l],l,n))&&(delete s[l],i=!0)}}return w.isArray(e)?e.forEach(r):r(e),i}clear(e){const n=Object.keys(this);let s=n.length,i=!1;for(;s--;){const r=n[s];(!e||Gt(this,this[r],r,e,!0))&&(delete this[r],i=!0)}return i}normalize(e){const n=this,s={};return w.forEach(this,(i,r)=>{const o=w.findKey(s,r);if(o){n[o]=gt(i),delete n[r];return}const l=e?po(r):String(r).trim();l!==r&&delete n[r],n[l]=gt(i),s[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return w.forEach(this,(s,i)=>{s!=null&&s!==!1&&(n[i]=e&&w.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
4
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(i=>s.set(i)),s}static accessor(e){const s=(this[cs]=this[cs]={accessors:{}}).accessors,i=this.prototype;function r(o){const l=We(o);s[l]||(mo(i,o),s[l]=!0)}return w.isArray(e)?e.forEach(r):r(e),this}};Z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),w.reduceDescriptors(Z.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[n]=s}}}),w.freezeMethods(Z);function Jt(t,e){const n=this||He,s=e||n,i=Z.from(s.headers);let r=s.data;return w.forEach(t,function(l){r=l.call(n,r,i.normalize(),e?e.status:void 0)}),i.normalize(),r}function us(t){return!!(t&&t.__CANCEL__)}function Ue(t,e,n){V.call(this,t??"canceled",V.ERR_CANCELED,e,n),this.name="CanceledError"}w.inherits(Ue,V,{__CANCEL__:!0});function ds(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new V("Request failed with status code "+n.status,[V.ERR_BAD_REQUEST,V.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function fo(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function go(t,e){t=t||10;const n=new Array(t),s=new Array(t);let i=0,r=0,o;return e=e!==void 0?e:1e3,function(u){const d=Date.now(),h=s[r];o||(o=d),n[i]=u,s[i]=d;let f=r,g=0;for(;f!==i;)g+=n[f++],f=f%t;if(i=(i+1)%t,i===r&&(r=(r+1)%t),d-o<e)return;const b=h&&d-h;return b?Math.round(g*1e3/b):void 0}}function bo(t,e){let n=0,s=1e3/e,i,r;const o=(d,h=Date.now())=>{n=h,i=null,r&&(clearTimeout(r),r=null),t.apply(null,d)};return[(...d)=>{const h=Date.now(),f=h-n;f>=s?o(d,h):(i=d,r||(r=setTimeout(()=>{r=null,o(i)},s-f)))},()=>i&&o(i)]}const bt=(t,e,n=3)=>{let s=0;const i=go(50,250);return bo(r=>{const o=r.loaded,l=r.lengthComputable?r.total:void 0,u=o-s,d=i(u),h=o<=l;s=o;const f={loaded:o,total:l,progress:l?o/l:void 0,bytes:u,rate:d||void 0,estimated:d&&l&&h?(l-o)/d:void 0,event:r,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(f)},n)},hs=(t,e)=>{const n=t!=null;return[s=>e[0]({lengthComputable:n,total:t,loaded:s}),e[1]]},ps=t=>(...e)=>w.asap(()=>t(...e)),yo=K.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,K.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(K.origin),K.navigator&&/(msie|trident)/i.test(K.navigator.userAgent)):()=>!0,wo=K.hasStandardBrowserEnv?{write(t,e,n,s,i,r){const o=[t+"="+encodeURIComponent(e)];w.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),w.isString(s)&&o.push("path="+s),w.isString(i)&&o.push("domain="+i),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _o(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function vo(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ms(t,e){return t&&!_o(e)?vo(t,e):e}const fs=t=>t instanceof Z?{...t}:t;function xe(t,e){e=e||{};const n={};function s(d,h,f,g){return w.isPlainObject(d)&&w.isPlainObject(h)?w.merge.call({caseless:g},d,h):w.isPlainObject(h)?w.merge({},h):w.isArray(h)?h.slice():h}function i(d,h,f,g){if(w.isUndefined(h)){if(!w.isUndefined(d))return s(void 0,d,f,g)}else return s(d,h,f,g)}function r(d,h){if(!w.isUndefined(h))return s(void 0,h)}function o(d,h){if(w.isUndefined(h)){if(!w.isUndefined(d))return s(void 0,d)}else return s(void 0,h)}function l(d,h,f){if(f in e)return s(d,h);if(f in t)return s(void 0,d)}const u={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(d,h,f)=>i(fs(d),fs(h),f,!0)};return w.forEach(Object.keys(Object.assign({},t,e)),function(h){const f=u[h]||i,g=f(t[h],e[h],h);w.isUndefined(g)&&f!==l||(n[h]=g)}),n}const gs=t=>{const e=xe({},t);let{data:n,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:l}=e;e.headers=o=Z.from(o),e.url=rs(ms(e.baseURL,e.url),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(w.isFormData(n)){if(K.hasStandardBrowserEnv||K.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[d,...h]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([d||"multipart/form-data",...h].join("; "))}}if(K.hasStandardBrowserEnv&&(s&&w.isFunction(s)&&(s=s(e)),s||s!==!1&&yo(e.url))){const d=i&&r&&wo.read(r);d&&o.set(i,d)}return e},So=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,s){const i=gs(t);let r=i.data;const o=Z.from(i.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:d}=i,h,f,g,b,y;function m(){b&&b(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let S=new XMLHttpRequest;S.open(i.method.toUpperCase(),i.url,!0),S.timeout=i.timeout;function T(){if(!S)return;const P=Z.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:P,config:t,request:S};ds(function(F){n(F),m()},function(F){s(F),m()},E),S=null}"onloadend"in S?S.onloadend=T:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(T)},S.onabort=function(){S&&(s(new V("Request aborted",V.ECONNABORTED,t,S)),S=null)},S.onerror=function(){s(new V("Network Error",V.ERR_NETWORK,t,S)),S=null},S.ontimeout=function(){let q=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||as;i.timeoutErrorMessage&&(q=i.timeoutErrorMessage),s(new V(q,E.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,t,S)),S=null},r===void 0&&o.setContentType(null),"setRequestHeader"in S&&w.forEach(o.toJSON(),function(q,E){S.setRequestHeader(E,q)}),w.isUndefined(i.withCredentials)||(S.withCredentials=!!i.withCredentials),l&&l!=="json"&&(S.responseType=i.responseType),d&&([g,y]=bt(d,!0),S.addEventListener("progress",g)),u&&S.upload&&([f,b]=bt(u),S.upload.addEventListener("progress",f),S.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(h=P=>{S&&(s(!P||P.type?new Ue(null,t,S):P),S.abort(),S=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const O=fo(i.url);if(O&&K.protocols.indexOf(O)===-1){s(new V("Unsupported protocol "+O+":",V.ERR_BAD_REQUEST,t));return}S.send(r||null)})},ko=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let s=new AbortController,i;const r=function(d){if(!i){i=!0,l();const h=d instanceof Error?d:this.reason;s.abort(h instanceof V?h:new Ue(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,r(new V(`timeout ${e} of ms exceeded`,V.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(r):d.removeEventListener("abort",r)}),t=null)};t.forEach(d=>d.addEventListener("abort",r));const{signal:u}=s;return u.unsubscribe=()=>w.asap(l),u}},xo=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let s=0,i;for(;s<n;)i=s+e,yield t.slice(s,i),s=i},Eo=async function*(t,e){for await(const n of Co(t))yield*xo(n,e)},Co=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:s}=await e.read();if(n)break;yield s}}finally{await e.cancel()}},bs=(t,e,n,s)=>{const i=Eo(t,e);let r=0,o,l=u=>{o||(o=!0,s&&s(u))};return new ReadableStream({async pull(u){try{const{done:d,value:h}=await i.next();if(d){l(),u.close();return}let f=h.byteLength;if(n){let g=r+=f;n(g)}u.enqueue(new Uint8Array(h))}catch(d){throw l(d),d}},cancel(u){return l(u),i.return()}},{highWaterMark:2})},yt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ys=yt&&typeof ReadableStream=="function",Oo=yt&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ws=(t,...e)=>{try{return!!t(...e)}catch{return!1}},To=ys&&ws(()=>{let t=!1;const e=new Request(K.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),_s=64*1024,Yt=ys&&ws(()=>w.isReadableStream(new Response("").body)),wt={stream:Yt&&(t=>t.body)};yt&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!wt[e]&&(wt[e]=w.isFunction(t[e])?n=>n[e]():(n,s)=>{throw new V(`Response type '${e}' is not supported`,V.ERR_NOT_SUPPORT,s)})})})(new Response);const Ro=async t=>{if(t==null)return 0;if(w.isBlob(t))return t.size;if(w.isSpecCompliantForm(t))return(await new Request(K.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(w.isArrayBufferView(t)||w.isArrayBuffer(t))return t.byteLength;if(w.isURLSearchParams(t)&&(t=t+""),w.isString(t))return(await Oo(t)).byteLength},Po=async(t,e)=>{const n=w.toFiniteNumber(t.getContentLength());return n??Ro(e)},Kt={http:Kr,xhr:So,fetch:yt&&(async t=>{let{url:e,method:n,data:s,signal:i,cancelToken:r,timeout:o,onDownloadProgress:l,onUploadProgress:u,responseType:d,headers:h,withCredentials:f="same-origin",fetchOptions:g}=gs(t);d=d?(d+"").toLowerCase():"text";let b=ko([i,r&&r.toAbortSignal()],o),y;const m=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let S;try{if(u&&To&&n!=="get"&&n!=="head"&&(S=await Po(h,s))!==0){let E=new Request(e,{method:"POST",body:s,duplex:"half"}),R;if(w.isFormData(s)&&(R=E.headers.get("content-type"))&&h.setContentType(R),E.body){const[F,W]=hs(S,bt(ps(u)));s=bs(E.body,_s,F,W)}}w.isString(f)||(f=f?"include":"omit");const T="credentials"in Request.prototype;y=new Request(e,{...g,signal:b,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:s,duplex:"half",credentials:T?f:void 0});let O=await fetch(y);const P=Yt&&(d==="stream"||d==="response");if(Yt&&(l||P&&m)){const E={};["status","statusText","headers"].forEach(ae=>{E[ae]=O[ae]});const R=w.toFiniteNumber(O.headers.get("content-length")),[F,W]=l&&hs(R,bt(ps(l),!0))||[];O=new Response(bs(O.body,_s,F,()=>{W&&W(),m&&m()}),E)}d=d||"text";let q=await wt[w.findKey(wt,d)||"text"](O,t);return!P&&m&&m(),await new Promise((E,R)=>{ds(E,R,{data:q,headers:Z.from(O.headers),status:O.status,statusText:O.statusText,config:t,request:y})})}catch(T){throw m&&m(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new V("Network Error",V.ERR_NETWORK,t,y),{cause:T.cause||T}):V.from(T,T&&T.code,t,y)}})};w.forEach(Kt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const vs=t=>`- ${t}`,Do=t=>w.isFunction(t)||t===null||t===!1,Ss={getAdapter:t=>{t=w.isArray(t)?t:[t];const{length:e}=t;let n,s;const i={};for(let r=0;r<e;r++){n=t[r];let o;if(s=n,!Do(n)&&(s=Kt[(o=String(n)).toLowerCase()],s===void 0))throw new V(`Unknown adapter '${o}'`);if(s)break;i[o||"#"+r]=s}if(!s){const r=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=e?r.length>1?`since :
|
5
|
+
`+r.map(vs).join(`
|
6
|
+
`):" "+vs(r[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:Kt};function Xt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ue(null,t)}function ks(t){return Xt(t),t.headers=Z.from(t.headers),t.data=Jt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ss.getAdapter(t.adapter||He.adapter)(t).then(function(s){return Xt(t),s.data=Jt.call(t,t.transformResponse,s),s.headers=Z.from(s.headers),s},function(s){return us(s)||(Xt(t),s&&s.response&&(s.response.data=Jt.call(t,t.transformResponse,s.response),s.response.headers=Z.from(s.response.headers))),Promise.reject(s)})}const xs="1.7.9",_t={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{_t[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Es={};_t.transitional=function(e,n,s){function i(r,o){return"[Axios v"+xs+"] Transitional option '"+r+"'"+o+(s?". "+s:"")}return(r,o,l)=>{if(e===!1)throw new V(i(o," has been removed"+(n?" in "+n:"")),V.ERR_DEPRECATED);return n&&!Es[o]&&(Es[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(r,o,l):!0}},_t.spelling=function(e){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function Ao(t,e,n){if(typeof t!="object")throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let i=s.length;for(;i-- >0;){const r=s[i],o=e[r];if(o){const l=t[r],u=l===void 0||o(l,r,t);if(u!==!0)throw new V("option "+r+" must be "+u,V.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new V("Unknown option "+r,V.ERR_BAD_OPTION)}}const vt={assertOptions:Ao,validators:_t},me=vt.validators;let Ee=class{constructor(e){this.defaults=e,this.interceptors={request:new os,response:new os}}async request(e,n){try{return await this._request(e,n)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const r=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?r&&!String(s.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
7
|
+
`+r):s.stack=r}catch{}}throw s}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=xe(this.defaults,n);const{transitional:s,paramsSerializer:i,headers:r}=n;s!==void 0&&vt.assertOptions(s,{silentJSONParsing:me.transitional(me.boolean),forcedJSONParsing:me.transitional(me.boolean),clarifyTimeoutError:me.transitional(me.boolean)},!1),i!=null&&(w.isFunction(i)?n.paramsSerializer={serialize:i}:vt.assertOptions(i,{encode:me.function,serialize:me.function},!0)),vt.assertOptions(n,{baseUrl:me.spelling("baseURL"),withXsrfToken:me.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=r&&w.merge(r.common,r[n.method]);r&&w.forEach(["delete","get","head","post","put","patch","common"],y=>{delete r[y]}),n.headers=Z.concat(o,r);const l=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(u=u&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const d=[];this.interceptors.response.forEach(function(m){d.push(m.fulfilled,m.rejected)});let h,f=0,g;if(!u){const y=[ks.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,d),g=y.length,h=Promise.resolve(n);f<g;)h=h.then(y[f++],y[f++]);return h}g=l.length;let b=n;for(f=0;f<g;){const y=l[f++],m=l[f++];try{b=y(b)}catch(S){m.call(this,S);break}}try{h=ks.call(this,b)}catch(y){return Promise.reject(y)}for(f=0,g=d.length;f<g;)h=h.then(d[f++],d[f++]);return h}getUri(e){e=xe(this.defaults,e);const n=ms(e.baseURL,e.url);return rs(n,e.params,e.paramsSerializer)}};w.forEach(["delete","get","head","options"],function(e){Ee.prototype[e]=function(n,s){return this.request(xe(s||{},{method:e,url:n,data:(s||{}).data}))}}),w.forEach(["post","put","patch"],function(e){function n(s){return function(r,o,l){return this.request(xe(l||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}Ee.prototype[e]=n(),Ee.prototype[e+"Form"]=n(!0)});let Mo=class qi{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const s=this;this.promise.then(i=>{if(!s._listeners)return;let r=s._listeners.length;for(;r-- >0;)s._listeners[r](i);s._listeners=null}),this.promise.then=i=>{let r;const o=new Promise(l=>{s.subscribe(l),r=l}).then(i);return o.cancel=function(){s.unsubscribe(r)},o},e(function(r,o,l){s.reason||(s.reason=new Ue(r,o,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=s=>{e.abort(s)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new qi(function(i){e=i}),cancel:e}}};function Vo(t){return function(n){return t.apply(null,n)}}function Uo(t){return w.isObject(t)&&t.isAxiosError===!0}const Zt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Zt).forEach(([t,e])=>{Zt[e]=t});function Cs(t){const e=new Ee(t),n=jn(Ee.prototype.request,e);return w.extend(n,Ee.prototype,e,{allOwnKeys:!0}),w.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Cs(xe(t,i))},n}const $=Cs(He);$.Axios=Ee,$.CanceledError=Ue,$.CancelToken=Mo,$.isCancel=us,$.VERSION=xs,$.toFormData=ft,$.AxiosError=V,$.Cancel=$.CanceledError,$.all=function(e){return Promise.all(e)},$.spread=Vo,$.isAxiosError=Uo,$.mergeConfig=xe,$.AxiosHeaders=Z,$.formToJSON=t=>ls(w.isHTMLForm(t)?new FormData(t):t),$.getAdapter=Ss.getAdapter,$.HttpStatusCode=Zt,$.default=$;const{Axios:Ah,AxiosError:Mh,CanceledError:Vh,isCancel:Uh,CancelToken:Nh,VERSION:Ih,all:Fh,Cancel:Lh,isAxiosError:zh,spread:qh,toFormData:Bh,AxiosHeaders:jh,HttpStatusCode:$h,formToJSON:Hh,getAdapter:Wh,mergeConfig:Gh}=$,Os=6048e5,No=864e5,Ts=Symbol.for("constructDateFrom");function we(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Ts in t?t[Ts](e):t instanceof Date?new t.constructor(e):new Date(e)}function ue(t,e){return we(e||t,t)}let Io={};function St(){return Io}function Ge(t,e){var l,u,d,h;const n=St(),s=(e==null?void 0:e.weekStartsOn)??((u=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((h=(d=n.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,i=ue(t,e==null?void 0:e.in),r=i.getDay(),o=(r<s?7:0)+r-s;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function kt(t,e){return Ge(t,{...e,weekStartsOn:1})}function Rs(t,e){const n=ue(t,e==null?void 0:e.in),s=n.getFullYear(),i=we(n,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const r=kt(i),o=we(n,0);o.setFullYear(s,0,4),o.setHours(0,0,0,0);const l=kt(o);return n.getTime()>=r.getTime()?s+1:n.getTime()>=l.getTime()?s:s-1}function Ps(t){const e=ue(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function Fo(t,...e){const n=we.bind(null,e.find(s=>typeof s=="object"));return e.map(n)}function Ds(t,e){const n=ue(t,e==null?void 0:e.in);return n.setHours(0,0,0,0),n}function Lo(t,e,n){const[s,i]=Fo(n==null?void 0:n.in,t,e),r=Ds(s),o=Ds(i),l=+r-Ps(r),u=+o-Ps(o);return Math.round((l-u)/No)}function zo(t,e){const n=Rs(t,e),s=we(t,0);return s.setFullYear(n,0,4),s.setHours(0,0,0,0),kt(s)}function qo(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Bo(t){return!(!qo(t)&&typeof t!="number"||isNaN(+ue(t)))}function jo(t,e){const n=ue(t,e==null?void 0:e.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const $o={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ho=(t,e,n)=>{let s;const i=$o[t];return typeof i=="string"?s=i:e===1?s=i.one:s=i.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+s:s+" ago":s};function Qt(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Wo={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Go={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Jo={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Yo={date:Qt({formats:Wo,defaultWidth:"full"}),time:Qt({formats:Go,defaultWidth:"full"}),dateTime:Qt({formats:Jo,defaultWidth:"full"})},Ko={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xo=(t,e,n,s)=>Ko[t];function Je(t){return(e,n)=>{const s=n!=null&&n.context?String(n.context):"standalone";let i;if(s==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,l=n!=null&&n.width?String(n.width):o;i=t.formattingValues[l]||t.formattingValues[o]}else{const o=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;i=t.values[l]||t.values[o]}const r=t.argumentCallback?t.argumentCallback(e):e;return i[r]}}const Zo={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Qo={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ea={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ta={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},na={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},sa={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ia={ordinalNumber:(t,e)=>{const n=Number(t),s=n%100;if(s>20||s<10)switch(s%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Je({values:Zo,defaultWidth:"wide"}),quarter:Je({values:Qo,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Je({values:ea,defaultWidth:"wide"}),day:Je({values:ta,defaultWidth:"wide"}),dayPeriod:Je({values:na,defaultWidth:"wide",formattingValues:sa,defaultFormattingWidth:"wide"})};function Ye(t){return(e,n={})=>{const s=n.width,i=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],r=e.match(i);if(!r)return null;const o=r[0],l=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(l)?oa(l,f=>f.test(o)):ra(l,f=>f.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const h=e.slice(o.length);return{value:d,rest:h}}}function ra(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function oa(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function aa(t){return(e,n={})=>{const s=e.match(t.matchPattern);if(!s)return null;const i=s[0],r=e.match(t.parsePattern);if(!r)return null;let o=t.valueCallback?t.valueCallback(r[0]):r[0];o=n.valueCallback?n.valueCallback(o):o;const l=e.slice(i.length);return{value:o,rest:l}}}const la=/^(\d+)(th|st|nd|rd)?/i,ca=/\d+/i,ua={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},da={any:[/^b/i,/^(a|c)/i]},ha={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pa={any:[/1/i,/2/i,/3/i,/4/i]},ma={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fa={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ga={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ba={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ya={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},wa={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_a={ordinalNumber:aa({matchPattern:la,parsePattern:ca,valueCallback:t=>parseInt(t,10)}),era:Ye({matchPatterns:ua,defaultMatchWidth:"wide",parsePatterns:da,defaultParseWidth:"any"}),quarter:Ye({matchPatterns:ha,defaultMatchWidth:"wide",parsePatterns:pa,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Ye({matchPatterns:ma,defaultMatchWidth:"wide",parsePatterns:fa,defaultParseWidth:"any"}),day:Ye({matchPatterns:ga,defaultMatchWidth:"wide",parsePatterns:ba,defaultParseWidth:"any"}),dayPeriod:Ye({matchPatterns:ya,defaultMatchWidth:"any",parsePatterns:wa,defaultParseWidth:"any"})},va={code:"en-US",formatDistance:Ho,formatLong:Yo,formatRelative:Xo,localize:ia,match:_a,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Sa(t,e){const n=ue(t,e==null?void 0:e.in);return Lo(n,jo(n))+1}function ka(t,e){const n=ue(t,e==null?void 0:e.in),s=+kt(n)-+zo(n);return Math.round(s/Os)+1}function As(t,e){var h,f,g,b;const n=ue(t,e==null?void 0:e.in),s=n.getFullYear(),i=St(),r=(e==null?void 0:e.firstWeekContainsDate)??((f=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((b=(g=i.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)??1,o=we((e==null?void 0:e.in)||t,0);o.setFullYear(s+1,0,r),o.setHours(0,0,0,0);const l=Ge(o,e),u=we((e==null?void 0:e.in)||t,0);u.setFullYear(s,0,r),u.setHours(0,0,0,0);const d=Ge(u,e);return+n>=+l?s+1:+n>=+d?s:s-1}function xa(t,e){var l,u,d,h;const n=St(),s=(e==null?void 0:e.firstWeekContainsDate)??((u=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((h=(d=n.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,i=As(t,e),r=we((e==null?void 0:e.in)||t,0);return r.setFullYear(i,0,s),r.setHours(0,0,0,0),Ge(r,e)}function Ea(t,e){const n=ue(t,e==null?void 0:e.in),s=+Ge(n,e)-+xa(n,e);return Math.round(s/Os)+1}function z(t,e){const n=t<0?"-":"",s=Math.abs(t).toString().padStart(e,"0");return n+s}const _e={y(t,e){const n=t.getFullYear(),s=n>0?n:1-n;return z(e==="yy"?s%100:s,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):z(n+1,2)},d(t,e){return z(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return z(t.getHours()%12||12,e.length)},H(t,e){return z(t.getHours(),e.length)},m(t,e){return z(t.getMinutes(),e.length)},s(t,e){return z(t.getSeconds(),e.length)},S(t,e){const n=e.length,s=t.getMilliseconds(),i=Math.trunc(s*Math.pow(10,n-3));return z(i,e.length)}},Ne={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ms={G:function(t,e,n){const s=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(s,{width:"abbreviated"});case"GGGGG":return n.era(s,{width:"narrow"});case"GGGG":default:return n.era(s,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const s=t.getFullYear(),i=s>0?s:1-s;return n.ordinalNumber(i,{unit:"year"})}return _e.y(t,e)},Y:function(t,e,n,s){const i=As(t,s),r=i>0?i:1-i;if(e==="YY"){const o=r%100;return z(o,2)}return e==="Yo"?n.ordinalNumber(r,{unit:"year"}):z(r,e.length)},R:function(t,e){const n=Rs(t);return z(n,e.length)},u:function(t,e){const n=t.getFullYear();return z(n,e.length)},Q:function(t,e,n){const s=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return z(s,2);case"Qo":return n.ordinalNumber(s,{unit:"quarter"});case"QQQ":return n.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,n){const s=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return z(s,2);case"qo":return n.ordinalNumber(s,{unit:"quarter"});case"qqq":return n.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,n){const s=t.getMonth();switch(e){case"M":case"MM":return _e.M(t,e);case"Mo":return n.ordinalNumber(s+1,{unit:"month"});case"MMM":return n.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,n){const s=t.getMonth();switch(e){case"L":return String(s+1);case"LL":return z(s+1,2);case"Lo":return n.ordinalNumber(s+1,{unit:"month"});case"LLL":return n.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,n,s){const i=Ea(t,s);return e==="wo"?n.ordinalNumber(i,{unit:"week"}):z(i,e.length)},I:function(t,e,n){const s=ka(t);return e==="Io"?n.ordinalNumber(s,{unit:"week"}):z(s,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):_e.d(t,e)},D:function(t,e,n){const s=Sa(t);return e==="Do"?n.ordinalNumber(s,{unit:"dayOfYear"}):z(s,e.length)},E:function(t,e,n){const s=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(s,{width:"short",context:"formatting"});case"EEEE":default:return n.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,n,s){const i=t.getDay(),r=(i-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return z(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,s){const i=t.getDay(),r=(i-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return z(r,e.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){const s=t.getDay(),i=s===0?7:s;switch(e){case"i":return String(i);case"ii":return z(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(s,{width:"short",context:"formatting"});case"iiii":default:return n.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){const s=t.getHours();let i;switch(s===12?i=Ne.noon:s===0?i=Ne.midnight:i=s/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){const s=t.getHours();let i;switch(s>=17?i=Ne.evening:s>=12?i=Ne.afternoon:s>=4?i=Ne.morning:i=Ne.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let s=t.getHours()%12;return s===0&&(s=12),n.ordinalNumber(s,{unit:"hour"})}return _e.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):_e.H(t,e)},K:function(t,e,n){const s=t.getHours()%12;return e==="Ko"?n.ordinalNumber(s,{unit:"hour"}):z(s,e.length)},k:function(t,e,n){let s=t.getHours();return s===0&&(s=24),e==="ko"?n.ordinalNumber(s,{unit:"hour"}):z(s,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):_e.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):_e.s(t,e)},S:function(t,e){return _e.S(t,e)},X:function(t,e,n){const s=t.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return Us(s);case"XXXX":case"XX":return Ce(s);case"XXXXX":case"XXX":default:return Ce(s,":")}},x:function(t,e,n){const s=t.getTimezoneOffset();switch(e){case"x":return Us(s);case"xxxx":case"xx":return Ce(s);case"xxxxx":case"xxx":default:return Ce(s,":")}},O:function(t,e,n){const s=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Vs(s,":");case"OOOO":default:return"GMT"+Ce(s,":")}},z:function(t,e,n){const s=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Vs(s,":");case"zzzz":default:return"GMT"+Ce(s,":")}},t:function(t,e,n){const s=Math.trunc(+t/1e3);return z(s,e.length)},T:function(t,e,n){return z(+t,e.length)}};function Vs(t,e=""){const n=t>0?"-":"+",s=Math.abs(t),i=Math.trunc(s/60),r=s%60;return r===0?n+String(i):n+String(i)+e+z(r,2)}function Us(t,e){return t%60===0?(t>0?"-":"+")+z(Math.abs(t)/60,2):Ce(t,e)}function Ce(t,e=""){const n=t>0?"-":"+",s=Math.abs(t),i=z(Math.trunc(s/60),2),r=z(s%60,2);return n+i+e+r}const Ns=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Is=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ca={p:Is,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],s=n[1],i=n[2];if(!i)return Ns(t,e);let r;switch(s){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;case"PPPP":default:r=e.dateTime({width:"full"});break}return r.replace("{{date}}",Ns(s,e)).replace("{{time}}",Is(i,e))}},Oa=/^D+$/,Ta=/^Y+$/,Ra=["D","DD","YY","YYYY"];function Pa(t){return Oa.test(t)}function Da(t){return Ta.test(t)}function Aa(t,e,n){const s=Ma(t,e,n);if(console.warn(s),Ra.includes(t))throw new RangeError(s)}function Ma(t,e,n){const s=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${s} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Va=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ua=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Na=/^'([^]*?)'?$/,Ia=/''/g,Fa=/[a-zA-Z]/;function Ke(t,e,n){var h,f,g,b;const s=St(),i=s.locale??va,r=s.firstWeekContainsDate??((f=(h=s.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,o=s.weekStartsOn??((b=(g=s.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0,l=ue(t,n==null?void 0:n.in);if(!Bo(l))throw new RangeError("Invalid time value");let u=e.match(Ua).map(y=>{const m=y[0];if(m==="p"||m==="P"){const S=Ca[m];return S(y,i.formatLong)}return y}).join("").match(Va).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const m=y[0];if(m==="'")return{isToken:!1,value:La(y)};if(Ms[m])return{isToken:!0,value:y};if(m.match(Fa))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:y}});i.localize.preprocessor&&(u=i.localize.preprocessor(l,u));const d={firstWeekContainsDate:r,weekStartsOn:o,locale:i};return u.map(y=>{if(!y.isToken)return y.value;const m=y.value;(Da(m)||Pa(m))&&Aa(m,e,String(t));const S=Ms[m[0]];return S(l,m,i.localize,d)}).join("")}function La(t){const e=t.match(Na);return e?e[1].replace(Ia,"'"):t}const za={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((t,e)=>(t[e.id]=e)&&t,{})}},methods:{updatePaneComponents(){this.panes.forEach(t=>{t.update&&t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[t.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(t,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(t,e){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,e),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=e,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[e])},onSplitterDblClick(t,e){let n=0;this.panes=this.panes.map((s,i)=>(s.size=i===e?s.max:s.min,i!==e&&(n+=s.min),s)),this.panes[e].size-=n,this.$emit("pane-maximize",this.panes[e]),this.$emit("resized",this.panes.map(s=>({min:s.min,max:s.max,size:s.size})))},onPaneClick(t,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(t){const e=this.container.getBoundingClientRect(),{clientX:n,clientY:s}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:n-e.left,y:s-e.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=e-t),t*100/e},calculatePanesSize(t){const e=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const s=0+(this.pushOtherPanes?0:n.prevPanesSize),i=100-(this.pushOtherPanes?0:n.nextPanesSize),r=Math.max(Math.min(this.getCurrentDragPercentage(t),i),s);let o=[e,e+1],l=this.panes[o[0]]||null,u=this.panes[o[1]]||null;const d=l.max<100&&r>=l.max+n.prevPanesSize,h=u.max<100&&r<=100-(u.max+this.sumNextPanesSize(e+1));if(d||h){d?(l.size=l.max,u.size=Math.max(100-l.max-n.prevPanesSize-n.nextPanesSize,0)):(l.size=Math.max(100-u.max-n.prevPanesSize-this.sumNextPanesSize(e+1),0),u.size=u.max);return}if(this.pushOtherPanes){const f=this.doPushOtherPanes(n,r);if(!f)return;({sums:n,panesToResize:o}=f),l=this.panes[o[0]]||null,u=this.panes[o[1]]||null}l!==null&&(l.size=Math.min(Math.max(r-n.prevPanesSize-n.prevReachedMinPanes,l.min),l.max)),u!==null&&(u.size=Math.min(Math.max(100-r-n.nextPanesSize-n.nextReachedMinPanes,u.min),u.max))},doPushOtherPanes(t,e){const n=this.touch.activeSplitter,s=[n,n+1];return e<t.prevPanesSize+this.panes[s[0]].min&&(s[0]=this.findPrevExpandedPane(n).index,t.prevReachedMinPanes=0,s[0]<n&&this.panes.forEach((i,r)=>{r>s[0]&&r<=n&&(i.size=i.min,t.prevReachedMinPanes+=i.min)}),t.prevPanesSize=this.sumPrevPanesSize(s[0]),s[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((i,r)=>{r>0&&r<=n&&(i.size=i.min,t.prevReachedMinPanes+=i.min)}),this.panes[s[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):e>100-t.nextPanesSize-this.panes[s[1]].min&&(s[1]=this.findNextExpandedPane(n).index,t.nextReachedMinPanes=0,s[1]>n+1&&this.panes.forEach((i,r)=>{r>n&&r<s[1]&&(i.size=i.min,t.nextReachedMinPanes+=i.min)}),t.nextPanesSize=this.sumNextPanesSize(s[1]-1),s[1]===void 0)?(t.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((i,r)=>{r<this.panesCount-1&&r>=n+1&&(i.size=i.min,t.nextReachedMinPanes+=i.min)}),this.panes[s[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:s}},sumPrevPanesSize(t){return this.panes.reduce((e,n,s)=>e+(s<t?n.size:0),0)},sumNextPanesSize(t){return this.panes.reduce((e,n,s)=>e+(s>t+1?n.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(e=>e.index<t&&e.size>e.min)||{}},findNextExpandedPane(t){return this.panes.find(e=>e.index>t+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const e=t.classList.contains("splitpanes__pane"),n=t.classList.contains("splitpanes__splitter");!e&&!n&&(t.parentNode.removeChild(t),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},addSplitter(t,e,n=!1){const s=t-1,i=document.createElement("div");i.classList.add("splitpanes__splitter"),n||(i.onmousedown=r=>this.onMouseDown(r,s),typeof window<"u"&&"ontouchstart"in window&&(i.ontouchstart=r=>this.onMouseDown(r,s)),i.onclick=r=>this.onSplitterClick(r,s+1)),this.dblClickSplitter&&(i.ondblclick=r=>this.onSplitterDblClick(r,s+1)),e.parentNode.insertBefore(i,e)},removeSplitter(t){t.onmousedown=void 0,t.onclick=void 0,t.ondblclick=void 0,t.parentNode.removeChild(t)},redoSplitters(){const t=Array.from(this.container.children);t.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let e=0;t.forEach(n=>{n.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,n,!0):e&&this.addSplitter(e,n),e++)})},requestUpdate({target:t,...e}){const n=this.indexedPanes[t._.uid];Object.entries(e).forEach(([s,i])=>n[s]=i)},onPaneAdd(t){let e=-1;Array.from(t.$el.parentNode.children).some(i=>(i.className.includes("splitpanes__pane")&&e++,i===t.$el));const n=parseFloat(t.minSize),s=parseFloat(t.maxSize);this.panes.splice(e,0,{id:t._.uid,index:e,min:isNaN(n)?0:n,max:isNaN(s)?100:s,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((i,r)=>i.index=r),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[e]}),this.$emit("pane-add",{index:e,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},onPaneRemove(t){const e=this.panes.findIndex(s=>s.id===t._.uid),n=this.panes.splice(e,1)[0];this.panes.forEach((s,i)=>s.index=i),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:e}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(s=>({min:s.min,max:s.max,size:s.size}))})})},resetPaneSizes(t={}){!t.addedPane&&!t.removedPane?this.initialPanesSizing():this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const t=100/this.panesCount;let e=0;const n=[],s=[];this.panes.forEach(i=>{i.size=Math.max(Math.min(t,i.max),i.min),e-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&s.push(i.id)}),e>.1&&this.readjustSizes(e,n,s)},initialPanesSizing(){let t=100;const e=[],n=[];let s=0;this.panes.forEach(r=>{t-=r.size,r.size!==null&&s++,r.size>=r.max&&e.push(r.id),r.size<=r.min&&n.push(r.id)});let i=100;t>.1&&(this.panes.forEach(r=>{r.size===null&&(r.size=Math.max(Math.min(t/(this.panesCount-s),r.max),r.min)),i-=r.size}),i>.1&&this.readjustSizes(t,e,n))},equalizeAfterAddOrRemove({addedPane:t,removedPane:e}={}){let n=100/this.panesCount,s=0;const i=[],r=[];t&&t.givenSize!==null&&(n=(100-t.givenSize)/(this.panesCount-1)),this.panes.forEach(o=>{s-=o.size,o.size>=o.max&&i.push(o.id),o.size<=o.min&&r.push(o.id)}),!(Math.abs(s)<.1)&&(this.panes.forEach(o=>{t&&t.givenSize!==null&&t.id===o.id||(o.size=Math.max(Math.min(n,o.max),o.min)),s-=o.size,o.size>=o.max&&i.push(o.id),o.size<=o.min&&r.push(o.id)}),s>.1&&this.readjustSizes(s,i,r))},readjustSizes(t,e,n){let s;t>0?s=t/(this.panesCount-e.length):s=t/(this.panesCount-n.length),this.panes.forEach((i,r)=>{if(t>0&&!e.includes(i.id)){const o=Math.max(Math.min(i.size+s,i.max),i.min),l=o-i.size;t-=l,i.size=o}else if(!n.includes(i.id)){const o=Math.max(Math.min(i.size+s,i.max),i.min),l=o-i.size;t-=l,i.size=o}i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.id].size}%`})}),Math.abs(t)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,n)=>{e.ondblclick=t?s=>this.onSplitterDblClick(s,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return Tn("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},qa=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n},Ba={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(t){this.style=t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(t){this.requestUpdate({target:this,size:t})},minSizeNumber(t){this.requestUpdate({target:this,min:t})},maxSizeNumber(t){this.requestUpdate({target:this,max:t})}}};function ja(t,e,n,s,i,r){return k(),A("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=o=>r.onPaneClick(o,t._.uid)),style:ut(t.style)},[Rn(t.$slots,"default")],4)}const $a=qa(Ba,[["render",ja]]);var Ha=Object.defineProperty,Wa=(t,e,n)=>e in t?Ha(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,en=(t,e,n)=>Wa(t,typeof e!="symbol"?e+"":e,n);function Fs(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ga}=Object.prototype,{getPrototypeOf:tn}=Object,xt=(t=>e=>{const n=Ga.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),de=t=>(t=t.toLowerCase(),e=>xt(e)===t),Et=t=>e=>typeof e===t,{isArray:Ie}=Array,Xe=Et("undefined");function Ja(t){return t!==null&&!Xe(t)&&t.constructor!==null&&!Xe(t.constructor)&&se(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ls=de("ArrayBuffer");function Ya(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ls(t.buffer),e}const Ka=Et("string"),se=Et("function"),zs=Et("number"),Ct=t=>t!==null&&typeof t=="object",Xa=t=>t===!0||t===!1,Ot=t=>{if(xt(t)!=="object")return!1;const e=tn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Za=de("Date"),Qa=de("File"),el=de("Blob"),tl=de("FileList"),nl=t=>Ct(t)&&se(t.pipe),sl=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||se(t.append)&&((e=xt(t))==="formdata"||e==="object"&&se(t.toString)&&t.toString()==="[object FormData]"))},il=de("URLSearchParams"),[rl,ol,al,ll]=["ReadableStream","Request","Response","Headers"].map(de),cl=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ze(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,i;if(typeof t!="object"&&(t=[t]),Ie(t))for(s=0,i=t.length;s<i;s++)e.call(null,t[s],s,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),o=r.length;let l;for(s=0;s<o;s++)l=r[s],e.call(null,t[l],l,t)}}function qs(t,e){e=e.toLowerCase();const n=Object.keys(t);let s=n.length,i;for(;s-- >0;)if(i=n[s],e===i.toLowerCase())return i;return null}const Oe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bs=t=>!Xe(t)&&t!==Oe;function nn(){const{caseless:t}=Bs(this)&&this||{},e={},n=(s,i)=>{const r=t&&qs(e,i)||i;Ot(e[r])&&Ot(s)?e[r]=nn(e[r],s):Ot(s)?e[r]=nn({},s):Ie(s)?e[r]=s.slice():e[r]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Ze(arguments[s],n);return e}const ul=(t,e,n,{allOwnKeys:s}={})=>(Ze(e,(i,r)=>{n&&se(i)?t[r]=Fs(i,n):t[r]=i},{allOwnKeys:s}),t),dl=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),hl=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},pl=(t,e,n,s)=>{let i,r,o;const l={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),r=i.length;r-- >0;)o=i[r],(!s||s(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=n!==!1&&tn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},ml=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},fl=t=>{if(!t)return null;if(Ie(t))return t;let e=t.length;if(!zs(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},gl=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&tn(Uint8Array)),bl=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=n.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},yl=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},wl=de("HTMLFormElement"),_l=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,s){return n.toUpperCase()+s}),js=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),vl=de("RegExp"),$s=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};Ze(n,(i,r)=>{let o;(o=e(i,r,t))!==!1&&(s[r]=o||i)}),Object.defineProperties(t,s)},Sl=t=>{$s(t,(e,n)=>{if(se(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=t[n];if(se(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},kl=(t,e)=>{const n={},s=i=>{i.forEach(r=>{n[r]=!0})};return Ie(t)?s(t):s(String(t).split(e)),n},xl=()=>{},El=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,sn="abcdefghijklmnopqrstuvwxyz",Hs="0123456789",Ws={DIGIT:Hs,ALPHA:sn,ALPHA_DIGIT:sn+sn.toUpperCase()+Hs},Cl=(t=16,e=Ws.ALPHA_DIGIT)=>{let n="";const{length:s}=e;for(;t--;)n+=e[Math.random()*s|0];return n};function Ol(t){return!!(t&&se(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Tl=t=>{const e=new Array(10),n=(s,i)=>{if(Ct(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[i]=s;const r=Ie(s)?[]:{};return Ze(s,(o,l)=>{const u=n(o,i+1);!Xe(u)&&(r[l]=u)}),e[i]=void 0,r}}return s};return n(t,0)},Rl=de("AsyncFunction"),Pl=t=>t&&(Ct(t)||se(t))&&se(t.then)&&se(t.catch),Gs=((t,e)=>t?setImmediate:e?((n,s)=>(Oe.addEventListener("message",({source:i,data:r})=>{i===Oe&&r===n&&s.length&&s.shift()()},!1),i=>{s.push(i),Oe.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",se(Oe.postMessage)),Dl=typeof queueMicrotask<"u"?queueMicrotask.bind(Oe):typeof process<"u"&&process.nextTick||Gs,_={isArray:Ie,isArrayBuffer:Ls,isBuffer:Ja,isFormData:sl,isArrayBufferView:Ya,isString:Ka,isNumber:zs,isBoolean:Xa,isObject:Ct,isPlainObject:Ot,isReadableStream:rl,isRequest:ol,isResponse:al,isHeaders:ll,isUndefined:Xe,isDate:Za,isFile:Qa,isBlob:el,isRegExp:vl,isFunction:se,isStream:nl,isURLSearchParams:il,isTypedArray:gl,isFileList:tl,forEach:Ze,merge:nn,extend:ul,trim:cl,stripBOM:dl,inherits:hl,toFlatObject:pl,kindOf:xt,kindOfTest:de,endsWith:ml,toArray:fl,forEachEntry:bl,matchAll:yl,isHTMLForm:wl,hasOwnProperty:js,hasOwnProp:js,reduceDescriptors:$s,freezeMethods:Sl,toObjectSet:kl,toCamelCase:_l,noop:xl,toFiniteNumber:El,findKey:qs,global:Oe,isContextDefined:Bs,ALPHABET:Ws,generateString:Cl,isSpecCompliantForm:Ol,toJSONObject:Tl,isAsyncFn:Rl,isThenable:Pl,setImmediate:Gs,asap:Dl};function U(t,e,n,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}_.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_.toJSONObject(this.config),code:this.code,status:this.status}}});const Js=U.prototype,Ys={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Ys[t]={value:t}}),Object.defineProperties(U,Ys),Object.defineProperty(Js,"isAxiosError",{value:!0}),U.from=(t,e,n,s,i,r)=>{const o=Object.create(Js);return _.toFlatObject(t,o,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),U.call(o,t.message,e,n,s,i),o.cause=t,o.name=t.name,r&&Object.assign(o,r),o};const Al=null;function rn(t){return _.isPlainObject(t)||_.isArray(t)}function Ks(t){return _.endsWith(t,"[]")?t.slice(0,-2):t}function Xs(t,e,n){return t?t.concat(e).map(function(s,i){return s=Ks(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function Ml(t){return _.isArray(t)&&!t.some(rn)}const Vl=_.toFlatObject(_,{},null,function(t){return/^is[A-Z]/.test(t)});function Tt(t,e,n){if(!_.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,y){return!_.isUndefined(y[b])});const s=n.metaTokens,i=n.visitor||d,r=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&_.isSpecCompliantForm(e);if(!_.isFunction(i))throw new TypeError("visitor must be a function");function u(b){if(b===null)return"";if(_.isDate(b))return b.toISOString();if(!l&&_.isBlob(b))throw new U("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(b)||_.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function d(b,y,m){let S=b;if(b&&!m&&typeof b=="object"){if(_.endsWith(y,"{}"))y=s?y:y.slice(0,-2),b=JSON.stringify(b);else if(_.isArray(b)&&Ml(b)||(_.isFileList(b)||_.endsWith(y,"[]"))&&(S=_.toArray(b)))return y=Ks(y),S.forEach(function(T,O){!(_.isUndefined(T)||T===null)&&e.append(o===!0?Xs([y],O,r):o===null?y:y+"[]",u(T))}),!1}return rn(b)?!0:(e.append(Xs(m,y,r),u(b)),!1)}const h=[],f=Object.assign(Vl,{defaultVisitor:d,convertValue:u,isVisitable:rn});function g(b,y){if(!_.isUndefined(b)){if(h.indexOf(b)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(b),_.forEach(b,function(m,S){(!(_.isUndefined(m)||m===null)&&i.call(e,m,_.isString(S)?S.trim():S,y,f))===!0&&g(m,y?y.concat(S):[S])}),h.pop()}}if(!_.isObject(t))throw new TypeError("data must be an object");return g(t),e}function Zs(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function on(t,e){this._pairs=[],t&&Tt(t,this,e)}const Qs=on.prototype;Qs.append=function(t,e){this._pairs.push([t,e])},Qs.toString=function(t){const e=t?function(n){return t.call(this,n,Zs)}:Zs;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Ul(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ei(t,e,n){if(!e)return t;const s=n&&n.encode||Ul;_.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let r;if(i?r=i(e,n):r=_.isURLSearchParams(e)?e.toString():new on(e,n).toString(s),r){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+r}return t}class ti{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_.forEach(this.handlers,function(n){n!==null&&e(n)})}}const ni={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nl=typeof URLSearchParams<"u"?URLSearchParams:on,Il=typeof FormData<"u"?FormData:null,Fl=typeof Blob<"u"?Blob:null,Ll={isBrowser:!0,classes:{URLSearchParams:Nl,FormData:Il,Blob:Fl},protocols:["http","https","file","blob","url","data"]},an=typeof window<"u"&&typeof document<"u",ln=typeof navigator=="object"&&navigator||void 0,zl=an&&(!ln||["ReactNative","NativeScript","NS"].indexOf(ln.product)<0),ql=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Bl=an&&window.location.href||"http://localhost",jl=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:an,hasStandardBrowserEnv:zl,hasStandardBrowserWebWorkerEnv:ql,navigator:ln,origin:Bl},Symbol.toStringTag,{value:"Module"})),X={...jl,...Ll};function $l(t,e){return Tt(t,new X.classes.URLSearchParams,Object.assign({visitor:function(n,s,i,r){return X.isNode&&_.isBuffer(n)?(this.append(s,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function Hl(t){return _.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Wl(t){const e={},n=Object.keys(t);let s;const i=n.length;let r;for(s=0;s<i;s++)r=n[s],e[r]=t[r];return e}function si(t){function e(n,s,i,r){let o=n[r++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),u=r>=n.length;return o=!o&&_.isArray(i)?i.length:o,u?(_.hasOwnProp(i,o)?i[o]=[i[o],s]:i[o]=s,!l):((!i[o]||!_.isObject(i[o]))&&(i[o]=[]),e(n,s,i[o],r)&&_.isArray(i[o])&&(i[o]=Wl(i[o])),!l)}if(_.isFormData(t)&&_.isFunction(t.entries)){const n={};return _.forEachEntry(t,(s,i)=>{e(Hl(s),i,n,0)}),n}return null}function Gl(t,e,n){if(_.isString(t))try{return(e||JSON.parse)(t),_.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const Qe={transitional:ni,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",s=n.indexOf("application/json")>-1,i=_.isObject(t);if(i&&_.isHTMLForm(t)&&(t=new FormData(t)),_.isFormData(t))return s?JSON.stringify(si(t)):t;if(_.isArrayBuffer(t)||_.isBuffer(t)||_.isStream(t)||_.isFile(t)||_.isBlob(t)||_.isReadableStream(t))return t;if(_.isArrayBufferView(t))return t.buffer;if(_.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let r;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return $l(t,this.formSerializer).toString();if((r=_.isFileList(t))||n.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Tt(r?{"files[]":t}:t,o&&new o,this.formSerializer)}}return i||s?(e.setContentType("application/json",!1),Gl(t)):t}],transformResponse:[function(t){const e=this.transitional||Qe.transitional,n=e&&e.forcedJSONParsing,s=this.responseType==="json";if(_.isResponse(t)||_.isReadableStream(t))return t;if(t&&_.isString(t)&&(n&&!this.responseType||s)){const i=!(e&&e.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(r){if(i)throw r.name==="SyntaxError"?U.from(r,U.ERR_BAD_RESPONSE,this,null,this.response):r}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:X.classes.FormData,Blob:X.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch"],t=>{Qe.headers[t]={}});const Jl=_.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"]),Yl=t=>{const e={};let n,s,i;return t&&t.split(`
|
8
|
+
`).forEach(function(r){i=r.indexOf(":"),n=r.substring(0,i).trim().toLowerCase(),s=r.substring(i+1).trim(),!(!n||e[n]&&Jl[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e},ii=Symbol("internals");function et(t){return t&&String(t).trim().toLowerCase()}function Rt(t){return t===!1||t==null?t:_.isArray(t)?t.map(Rt):String(t)}function Kl(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const Xl=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function cn(t,e,n,s,i){if(_.isFunction(s))return s.call(this,e,n);if(i&&(e=n),!!_.isString(e)){if(_.isString(s))return e.indexOf(s)!==-1;if(_.isRegExp(s))return s.test(e)}}function Zl(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function Ql(t,e){const n=_.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{value:function(i,r,o){return this[s].call(this,e,i,r,o)},configurable:!0})})}let Q=class{constructor(t){t&&this.set(t)}set(t,e,n){const s=this;function i(o,l,u){const d=et(l);if(!d)throw new Error("header name must be a non-empty string");const h=_.findKey(s,d);(!h||s[h]===void 0||u===!0||u===void 0&&s[h]!==!1)&&(s[h||l]=Rt(o))}const r=(o,l)=>_.forEach(o,(u,d)=>i(u,d,l));if(_.isPlainObject(t)||t instanceof this.constructor)r(t,e);else if(_.isString(t)&&(t=t.trim())&&!Xl(t))r(Yl(t),e);else if(_.isHeaders(t))for(const[o,l]of t.entries())i(l,o,n);else t!=null&&i(e,t,n);return this}get(t,e){if(t=et(t),t){const n=_.findKey(this,t);if(n){const s=this[n];if(!e)return s;if(e===!0)return Kl(s);if(_.isFunction(e))return e.call(this,s,n);if(_.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=et(t),t){const n=_.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||cn(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let s=!1;function i(r){if(r=et(r),r){const o=_.findKey(n,r);o&&(!e||cn(n,n[o],o,e))&&(delete n[o],s=!0)}}return _.isArray(t)?t.forEach(i):i(t),s}clear(t){const e=Object.keys(this);let n=e.length,s=!1;for(;n--;){const i=e[n];(!t||cn(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const e=this,n={};return _.forEach(this,(s,i)=>{const r=_.findKey(n,i);if(r){e[r]=Rt(s),delete e[i];return}const o=t?Zl(i):String(i).trim();o!==i&&delete e[i],e[o]=Rt(s),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return _.forEach(this,(n,s)=>{n!=null&&n!==!1&&(e[s]=t&&_.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
9
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(s=>n.set(s)),n}static accessor(t){const e=(this[ii]=this[ii]={accessors:{}}).accessors,n=this.prototype;function s(i){const r=et(i);e[r]||(Ql(n,i),e[r]=!0)}return _.isArray(t)?t.forEach(s):s(t),this}};Q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_.reduceDescriptors(Q.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[n]=s}}}),_.freezeMethods(Q);function un(t,e){const n=this||Qe,s=e||n,i=Q.from(s.headers);let r=s.data;return _.forEach(t,function(o){r=o.call(n,r,i.normalize(),e?e.status:void 0)}),i.normalize(),r}function ri(t){return!!(t&&t.__CANCEL__)}function Fe(t,e,n){U.call(this,t??"canceled",U.ERR_CANCELED,e,n),this.name="CanceledError"}_.inherits(Fe,U,{__CANCEL__:!0});function oi(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ec(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function tc(t,e){t=t||10;const n=new Array(t),s=new Array(t);let i=0,r=0,o;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),d=s[r];o||(o=u),n[i]=l,s[i]=u;let h=r,f=0;for(;h!==i;)f+=n[h++],h=h%t;if(i=(i+1)%t,i===r&&(r=(r+1)%t),u-o<e)return;const g=d&&u-d;return g?Math.round(f*1e3/g):void 0}}function nc(t,e){let n=0,s=1e3/e,i,r;const o=(l,u=Date.now())=>{n=u,i=null,r&&(clearTimeout(r),r=null),t.apply(null,l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=s?o(l,u):(i=l,r||(r=setTimeout(()=>{r=null,o(i)},s-d)))},()=>i&&o(i)]}const Pt=(t,e,n=3)=>{let s=0;const i=tc(50,250);return nc(r=>{const o=r.loaded,l=r.lengthComputable?r.total:void 0,u=o-s,d=i(u),h=o<=l;s=o;const f={loaded:o,total:l,progress:l?o/l:void 0,bytes:u,rate:d||void 0,estimated:d&&l&&h?(l-o)/d:void 0,event:r,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(f)},n)},ai=(t,e)=>{const n=t!=null;return[s=>e[0]({lengthComputable:n,total:t,loaded:s}),e[1]]},li=t=>(...e)=>_.asap(()=>t(...e)),sc=X.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,X.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(X.origin),X.navigator&&/(msie|trident)/i.test(X.navigator.userAgent)):()=>!0,ic=X.hasStandardBrowserEnv?{write(t,e,n,s,i,r){const o=[t+"="+encodeURIComponent(e)];_.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),_.isString(s)&&o.push("path="+s),_.isString(i)&&o.push("domain="+i),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function rc(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function oc(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ci(t,e){return t&&!rc(e)?oc(t,e):e}const ui=t=>t instanceof Q?{...t}:t;function Te(t,e){e=e||{};const n={};function s(d,h,f,g){return _.isPlainObject(d)&&_.isPlainObject(h)?_.merge.call({caseless:g},d,h):_.isPlainObject(h)?_.merge({},h):_.isArray(h)?h.slice():h}function i(d,h,f,g){if(_.isUndefined(h)){if(!_.isUndefined(d))return s(void 0,d,f,g)}else return s(d,h,f,g)}function r(d,h){if(!_.isUndefined(h))return s(void 0,h)}function o(d,h){if(_.isUndefined(h)){if(!_.isUndefined(d))return s(void 0,d)}else return s(void 0,h)}function l(d,h,f){if(f in e)return s(d,h);if(f in t)return s(void 0,d)}const u={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(d,h,f)=>i(ui(d),ui(h),f,!0)};return _.forEach(Object.keys(Object.assign({},t,e)),function(d){const h=u[d]||i,f=h(t[d],e[d],d);_.isUndefined(f)&&h!==l||(n[d]=f)}),n}const di=t=>{const e=Te({},t);let{data:n,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:l}=e;e.headers=o=Q.from(o),e.url=ei(ci(e.baseURL,e.url),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(_.isFormData(n)){if(X.hasStandardBrowserEnv||X.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[d,...h]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([d||"multipart/form-data",...h].join("; "))}}if(X.hasStandardBrowserEnv&&(s&&_.isFunction(s)&&(s=s(e)),s||s!==!1&&sc(e.url))){const d=i&&r&&ic.read(r);d&&o.set(i,d)}return e},ac=typeof XMLHttpRequest<"u",lc=ac&&function(t){return new Promise(function(e,n){const s=di(t);let i=s.data;const r=Q.from(s.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:u}=s,d,h,f,g,b;function y(){g&&g(),b&&b(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function S(){if(!m)return;const O=Q.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),P={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:O,config:t,request:m};oi(function(q){e(q),y()},function(q){n(q),y()},P),m=null}"onloadend"in m?m.onloadend=S:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(S)},m.onabort=function(){m&&(n(new U("Request aborted",U.ECONNABORTED,t,m)),m=null)},m.onerror=function(){n(new U("Network Error",U.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let O=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||ni;s.timeoutErrorMessage&&(O=s.timeoutErrorMessage),n(new U(O,P.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,t,m)),m=null},i===void 0&&r.setContentType(null),"setRequestHeader"in m&&_.forEach(r.toJSON(),function(O,P){m.setRequestHeader(P,O)}),_.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),o&&o!=="json"&&(m.responseType=s.responseType),u&&([f,b]=Pt(u,!0),m.addEventListener("progress",f)),l&&m.upload&&([h,g]=Pt(l),m.upload.addEventListener("progress",h),m.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(d=O=>{m&&(n(!O||O.type?new Fe(null,t,m):O),m.abort(),m=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const T=ec(s.url);if(T&&X.protocols.indexOf(T)===-1){n(new U("Unsupported protocol "+T+":",U.ERR_BAD_REQUEST,t));return}m.send(i||null)})},cc=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let s=new AbortController,i;const r=function(d){if(!i){i=!0,l();const h=d instanceof Error?d:this.reason;s.abort(h instanceof U?h:new Fe(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,r(new U(`timeout ${e} of ms exceeded`,U.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(r):d.removeEventListener("abort",r)}),t=null)};t.forEach(d=>d.addEventListener("abort",r));const{signal:u}=s;return u.unsubscribe=()=>_.asap(l),u}},uc=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let s=0,i;for(;s<n;)i=s+e,yield t.slice(s,i),s=i},dc=async function*(t,e){for await(const n of hc(t))yield*uc(n,e)},hc=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:s}=await e.read();if(n)break;yield s}}finally{await e.cancel()}},hi=(t,e,n,s)=>{const i=dc(t,e);let r=0,o,l=u=>{o||(o=!0,s&&s(u))};return new ReadableStream({async pull(u){try{const{done:d,value:h}=await i.next();if(d){l(),u.close();return}let f=h.byteLength;if(n){let g=r+=f;n(g)}u.enqueue(new Uint8Array(h))}catch(d){throw l(d),d}},cancel(u){return l(u),i.return()}},{highWaterMark:2})},Dt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",pi=Dt&&typeof ReadableStream=="function",pc=Dt&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),mi=(t,...e)=>{try{return!!t(...e)}catch{return!1}},mc=pi&&mi(()=>{let t=!1;const e=new Request(X.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),fi=64*1024,dn=pi&&mi(()=>_.isReadableStream(new Response("").body)),At={stream:dn&&(t=>t.body)};Dt&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!At[e]&&(At[e]=_.isFunction(t[e])?n=>n[e]():(n,s)=>{throw new U(`Response type '${e}' is not supported`,U.ERR_NOT_SUPPORT,s)})})})(new Response);const fc=async t=>{if(t==null)return 0;if(_.isBlob(t))return t.size;if(_.isSpecCompliantForm(t))return(await new Request(X.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(_.isArrayBufferView(t)||_.isArrayBuffer(t))return t.byteLength;if(_.isURLSearchParams(t)&&(t=t+""),_.isString(t))return(await pc(t)).byteLength},gc=async(t,e)=>_.toFiniteNumber(t.getContentLength())??fc(e),bc=Dt&&(async t=>{let{url:e,method:n,data:s,signal:i,cancelToken:r,timeout:o,onDownloadProgress:l,onUploadProgress:u,responseType:d,headers:h,withCredentials:f="same-origin",fetchOptions:g}=di(t);d=d?(d+"").toLowerCase():"text";let b=cc([i,r&&r.toAbortSignal()],o),y;const m=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let S;try{if(u&&mc&&n!=="get"&&n!=="head"&&(S=await gc(h,s))!==0){let E=new Request(e,{method:"POST",body:s,duplex:"half"}),R;if(_.isFormData(s)&&(R=E.headers.get("content-type"))&&h.setContentType(R),E.body){const[F,W]=ai(S,Pt(li(u)));s=hi(E.body,fi,F,W)}}_.isString(f)||(f=f?"include":"omit");const T="credentials"in Request.prototype;y=new Request(e,{...g,signal:b,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:s,duplex:"half",credentials:T?f:void 0});let O=await fetch(y);const P=dn&&(d==="stream"||d==="response");if(dn&&(l||P&&m)){const E={};["status","statusText","headers"].forEach(ae=>{E[ae]=O[ae]});const R=_.toFiniteNumber(O.headers.get("content-length")),[F,W]=l&&ai(R,Pt(li(l),!0))||[];O=new Response(hi(O.body,fi,F,()=>{W&&W(),m&&m()}),E)}d=d||"text";let q=await At[_.findKey(At,d)||"text"](O,t);return!P&&m&&m(),await new Promise((E,R)=>{oi(E,R,{data:q,headers:Q.from(O.headers),status:O.status,statusText:O.statusText,config:t,request:y})})}catch(T){throw m&&m(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new U("Network Error",U.ERR_NETWORK,t,y),{cause:T.cause||T}):U.from(T,T&&T.code,t,y)}}),hn={http:Al,xhr:lc,fetch:bc};_.forEach(hn,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const gi=t=>`- ${t}`,yc=t=>_.isFunction(t)||t===null||t===!1,bi={getAdapter:t=>{t=_.isArray(t)?t:[t];const{length:e}=t;let n,s;const i={};for(let r=0;r<e;r++){n=t[r];let o;if(s=n,!yc(n)&&(s=hn[(o=String(n)).toLowerCase()],s===void 0))throw new U(`Unknown adapter '${o}'`);if(s)break;i[o||"#"+r]=s}if(!s){const r=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=e?r.length>1?`since :
|
10
|
+
`+r.map(gi).join(`
|
11
|
+
`):" "+gi(r[0]):"as no adapter specified";throw new U("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:hn};function pn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Fe(null,t)}function yi(t){return pn(t),t.headers=Q.from(t.headers),t.data=un.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),bi.getAdapter(t.adapter||Qe.adapter)(t).then(function(e){return pn(t),e.data=un.call(t,t.transformResponse,e),e.headers=Q.from(e.headers),e},function(e){return ri(e)||(pn(t),e&&e.response&&(e.response.data=un.call(t,t.transformResponse,e.response),e.response.headers=Q.from(e.response.headers))),Promise.reject(e)})}const wi="1.7.9",Mt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Mt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const _i={};Mt.transitional=function(t,e,n){function s(i,r){return"[Axios v"+wi+"] Transitional option '"+i+"'"+r+(n?". "+n:"")}return(i,r,o)=>{if(t===!1)throw new U(s(r," has been removed"+(e?" in "+e:"")),U.ERR_DEPRECATED);return e&&!_i[r]&&(_i[r]=!0,console.warn(s(r," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(i,r,o):!0}},Mt.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function wc(t,e,n){if(typeof t!="object")throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let i=s.length;for(;i-- >0;){const r=s[i],o=e[r];if(o){const l=t[r],u=l===void 0||o(l,r,t);if(u!==!0)throw new U("option "+r+" must be "+u,U.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new U("Unknown option "+r,U.ERR_BAD_OPTION)}}const Vt={assertOptions:wc,validators:Mt},fe=Vt.validators;let Re=class{constructor(t){this.defaults=t,this.interceptors={request:new ti,response:new ti}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
12
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Te(this.defaults,e);const{transitional:n,paramsSerializer:s,headers:i}=e;n!==void 0&&Vt.assertOptions(n,{silentJSONParsing:fe.transitional(fe.boolean),forcedJSONParsing:fe.transitional(fe.boolean),clarifyTimeoutError:fe.transitional(fe.boolean)},!1),s!=null&&(_.isFunction(s)?e.paramsSerializer={serialize:s}:Vt.assertOptions(s,{encode:fe.function,serialize:fe.function},!0)),Vt.assertOptions(e,{baseUrl:fe.spelling("baseURL"),withXsrfToken:fe.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let r=i&&_.merge(i.common,i[e.method]);i&&_.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),e.headers=Q.concat(r,i);const o=[];let l=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(e)===!1||(l=l&&b.synchronous,o.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let d,h=0,f;if(!l){const b=[yi.bind(this),void 0];for(b.unshift.apply(b,o),b.push.apply(b,u),f=b.length,d=Promise.resolve(e);h<f;)d=d.then(b[h++],b[h++]);return d}f=o.length;let g=e;for(h=0;h<f;){const b=o[h++],y=o[h++];try{g=b(g)}catch(m){y.call(this,m);break}}try{d=yi.call(this,g)}catch(b){return Promise.reject(b)}for(h=0,f=u.length;h<f;)d=d.then(u[h++],u[h++]);return d}getUri(t){t=Te(this.defaults,t);const e=ci(t.baseURL,t.url);return ei(e,t.params,t.paramsSerializer)}};_.forEach(["delete","get","head","options"],function(t){Re.prototype[t]=function(e,n){return this.request(Te(n||{},{method:t,url:e,data:(n||{}).data}))}}),_.forEach(["post","put","patch"],function(t){function e(n){return function(s,i,r){return this.request(Te(r||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Re.prototype[t]=e(),Re.prototype[t+"Form"]=e(!0)});let _c=class Bi{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(i=>{if(!s._listeners)return;let r=s._listeners.length;for(;r-- >0;)s._listeners[r](i);s._listeners=null}),this.promise.then=i=>{let r;const o=new Promise(l=>{s.subscribe(l),r=l}).then(i);return o.cancel=function(){s.unsubscribe(r)},o},e(function(i,r,o){s.reason||(s.reason=new Fe(i,r,o),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=s=>{e.abort(s)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Bi(function(n){e=n}),cancel:e}}};function vc(t){return function(e){return t.apply(null,e)}}function Sc(t){return _.isObject(t)&&t.isAxiosError===!0}const mn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mn).forEach(([t,e])=>{mn[e]=t});function vi(t){const e=new Re(t),n=Fs(Re.prototype.request,e);return _.extend(n,Re.prototype,e,{allOwnKeys:!0}),_.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return vi(Te(t,s))},n}const H=vi(Qe);H.Axios=Re,H.CanceledError=Fe,H.CancelToken=_c,H.isCancel=ri,H.VERSION=wi,H.toFormData=Tt,H.AxiosError=U,H.Cancel=H.CanceledError,H.all=function(t){return Promise.all(t)},H.spread=vc,H.isAxiosError=Sc,H.mergeConfig=Te,H.AxiosHeaders=Q,H.formToJSON=t=>si(_.isHTMLForm(t)?new FormData(t):t),H.getAdapter=bi.getAdapter,H.HttpStatusCode=mn,H.default=H;const{Axios:Kh,AxiosError:Xh,CanceledError:Zh,isCancel:Qh,CancelToken:ep,VERSION:tp,all:np,Cancel:sp,isAxiosError:ip,spread:rp,toFormData:op,AxiosHeaders:ap,HttpStatusCode:lp,formToJSON:cp,getAdapter:up,mergeConfig:dp}=H,fn=H.create({baseURL:location.origin,timeout:6e4,params:{}});fn.interceptors.response.use(t=>t,t=>{var e,n,s,i,r,o,l,u,d,h,f;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(y){y&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let g=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(g+=`${t.response.statusText} `),(s=(n=t.response)==null?void 0:n.config)!=null&&s.data&&(g+=`${t.response.config.data} `),(r=(i=t.response)==null?void 0:i.data)!=null&&r.message?g+=`${t.response.data.message}`:(l=(o=t.response)==null?void 0:o.data)!=null&&l.exception?g+=`${t.response.data.exception}`:(h=(d=(u=t.response)==null?void 0:u.data)==null?void 0:d.error)!=null&&h.message?(t.response.data.error.class&&(g+=`${t.response.data.error.class} `),g+=`${t.response.data.error.message}`):g+=`${(f=t.response)==null?void 0:f.data}`;const{$cosmosNotify:b}=window;throw b&&b.serious({title:"Network error",body:g}),t}else throw t});const Ut=async function(t,e,{data:n,params:s={},headers:i,noAuth:r=!1,noScope:o=!1,onUploadProgress:l=!1}={}){if(!r){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}i.Authorization=localStorage.openc3Token}return i.manual=!0,!o&&!s.scope&&(s.scope=window.openc3Scope),fn({method:t,url:e,data:n,params:s,headers:i,onUploadProgress:l})},gn={Accept:"application/json"},Si={...gn,"Content-Type":"application/json"},N={get:function(t,{params:e,headers:n=gn,noScope:s,noAuth:i,onUploadProgress:r}={}){return Ut("get",t,{params:e,headers:n,noScope:s,noAuth:i,onUploadProgress:r})},put:function(t,{data:e,params:n,headers:s=Si,noScope:i,noAuth:r,onUploadProgress:o}={}){return Ut("put",t,{data:e,params:n,headers:s,noScope:i,noAuth:r,onUploadProgress:o})},post:function(t,{data:e,params:n,headers:s=Si,noScope:i,noAuth:r,onUploadProgress:o}={}){return Ut("post",t,{data:e,params:n,headers:s,noScope:i,noAuth:r,onUploadProgress:o})},delete:function(t,{params:e,headers:n=gn,noScope:s,noAuth:i,onUploadProgress:r}={}){return Ut("delete",t,{params:e,headers:n,noScope:s,noAuth:i,onUploadProgress:r})}};let Nt=()=>({emit(t,...e){for(let n=this.events[t]||[],s=0,i=n.length;s<i;s++)n[s](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var s;this.events[t]=(s=this.events[t])==null?void 0:s.filter(i=>e!==i)}}});class tt extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class bn extends tt{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class kc extends tt{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class he extends tt{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class xc extends he{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function ki(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class Ec{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:s,info:i})=>(n[s]=i,n),{})}}const Pe=Symbol("state");let xi=class{constructor(e={}){this.emitter=Nt(),this.params=Object.freeze(e),this.presence=new Ec(this),this.initialConnect=!0,this[Pe]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=ki({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,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,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,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let s=this.receiver?this.receiver.logger:null;s&&s.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let s=this.emitter.on(e,(...i)=>{s(),n(...i)});return s}emit(e,...n){return this.emitter.emit(e,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,n)=>{let s=[()=>delete this._pendingSubscribe];s.push(this.on("connect",()=>{s.forEach(i=>i()),e()})),s.push(this.on("close",i=>{s.forEach(r=>r()),n(i||new tt("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}};class Cc{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(s=>s[e](n[0])):this.channels.forEach(s=>s[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let n,s={promise:new Promise(r=>{n=r}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(s),1),n(s)},canceled:!1,acquired:!1},i=this._pendingTop;return this._pendings.push(s),i&&await i.promise,this.gvl&&await this.gvl.acquire(s,e),s.acquired=!0,s}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class Oc{constructor(){this.queue=[]}async acquire(e,n){n==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class Tc{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new Oc),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:s}){let i=this._subscriptions[e]=new Cc(e);return i.remoteId=this._localToRemote[e],i.subscriber=n,i.unsubscriber=s,i.gvl=this.glv,i}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let s=this.get(e);s&&(s.remoteId=n)}}class Rc{constructor(e={}){this.subscriptions=new Tc(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let s=n.remoteId;s&&delete this._remoteToLocal[s],this.subscriptions.remove(e)}transmit(e,n,s){let i=this._remoteToLocal[e];if(!i){this._pendingMessages.push([e,n,s]);return}let r=this.subscriptions.get(i);r&&r.channels.forEach(o=>{o.receive(n,s)})}notify(e,n,s){let i=this._remoteToLocal[e];if(!i)return;let r=this.subscriptions.get(i);r&&r.channels.forEach(o=>o.emit(n,s))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let n=[];for(let s of this._pendingMessages)s[0]===e?this.transmit(s[0],s[1],s[2]):n.push(s);this._pendingMessages=n}}const Ei={debug:0,info:1,warn:2,error:3};let Ci=class{constructor(e){this.level=e||"warn"}log(e,n,s){Ei[e]<Ei[this.level]||this.writeLogEntry(e,n,s)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}};class nt extends Ci{writeLogEntry(){}}class Pc{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let Dc=0,Oi=class{constructor(e={}){let{logger:n}=e;this.logger=n||new nt,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let s={channel:e};n&&Object.assign(s,n);let i=ki(s);if(this.pendingUnsubscriptions[i]){let o=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${o}`,i),new Promise(l=>{setTimeout(()=>{l(this.subscribe(e,n))},o)})}if(this.pendingSubscriptions[i])return this.logger.warn("subscription is already pending, skipping",i),Promise.reject(Error("Already subscribing"));let r=this.subscribeRetryInterval;return new Promise((o,l)=>{let u=++Dc;this.pendingSubscriptions[i]={resolve:o,reject:l,id:u},this.cable.send(this.buildSubscribeRequest(i)),this.maybeRetrySubscribe(u,i,r)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,s){setTimeout(()=>{let i=this.pendingSubscriptions[n];i&&i.id===e&&(this.logger.warn(`no subscription ack received in ${s}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,s))},s)}maybeExpireSubscribe(e,n,s){setTimeout(()=>{let i=this.pendingSubscriptions[n];i&&i.id===e&&(delete this.pendingSubscriptions[n],i.reject(new kc(`Haven't received subscription ack in ${s*2}ms for ${n}`)))},s)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,n,s){return n==="$whisper"?this.whisper(e,s):(s||(s={}),s.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(s)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:s,message:i,reason:r,reconnect:o}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let l=e.sid;return l&&this.cable.setSessionId(l),this.cable.connected()}if(n==="disconnect"){let l=new he(r);this.reset(l),o===!1?this.cable.closed(l):this.cable.disconnected(l);return}if(n==="confirm_subscription"){let l=this.pendingSubscriptions[s];if(!l){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:s}),this.unsubscribe(s);return}return delete this.pendingSubscriptions[s],l.resolve(s)}if(n==="reject_subscription"){let l=this.pendingSubscriptions[s];return l?(delete this.pendingSubscriptions[s],l.reject(new bn)):this.logger.error("subscription not found",{type:n,identifier:s})}if(i)return{identifier:s,message:i};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const Ti=()=>Date.now()/1e3|0;class Ac extends Oi{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.restoreSince===void 0&&(this.restoreSince=Ti()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:s,message:i}=e;if(n==="disconnect"||n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[s]||(this.subscriptionStreams[s]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=Ti()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",s);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",s);return}if(n==="welcome"){if(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId),e.restored){let r=e.restored_ids||Object.keys(this.subscriptionStreams);for(let o of r)this.cable.send({identifier:o,command:"history",history:this.historyRequestFor(o)}),this.presenceInfo[o]&&this.cable.send({identifier:o,command:"join",presence:this.presenceInfo[o]});return this.cable.restored(r)}return this.cable.connected(this.sessionId)}if(n==="presence"){let r=i.type;if(r==="info"){let o=this.pendingPresence[s];o&&(delete this.pendingPresence[s],o.resolve(i))}else if(r==="error"){let o=this.pendingPresence[s];o&&(delete this.pendingPresence[s],o.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:s,message:i}}if(i){let r=this.trackStreamPosition(s,e.stream_id,e.epoch,e.offset);return{identifier:s,message:i,meta:r}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,s){switch(n){case"$presence:join":return this.join(e,s);case"$presence:leave":return this.leave(e,s);case"$presence:info":return this.presence(e,s)}return super.perform(e,n,s)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),s=this.historyRequestFor(e);s&&(n.history=s,this.pendingHistory[e]=!0);let i=this.presenceInfo[e];return i&&(n.presence=i),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},s=!1;if(this.subscriptionStreams[e])for(let i of this.subscriptionStreams[e]){let r=this.streamsPositions[i];r&&(s=!0,n[i]=r)}if(!(!s&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,s,i){if(!(!n||!s))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:s,offset:i},{stream:n,epoch:s,offset:i}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((s,i)=>{this.pendingPresence[e]={resolve:s,reject:i},this.cable.send({command:"presence",identifier:e,data:n})})}}class Mc extends tt{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class yn extends xi{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}en(yn,"identifier","__ghost__");const Vc="$pubsub";class wn extends xi{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}en(wn,"identifier",Vc);const De=Symbol("state");let Uc=class{constructor({transport:t,protocol:e,encoder:n,logger:s,lazy:i,hubOptions:r,performFailures:o}){this.emitter=Nt(),this.transport=t,this.encoder=n,this.logger=s||new nt,this.protocol=e,this.performFailures=o||"throw",this.protocol.attached(this),this.hub=new Rc(r||{}),this[De]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,i===!1&&this.connect().catch(()=>{})}get state(){return this[De]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();this[De]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[De]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new he("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[De]="connected",this.hub.subscriptions.all().forEach(s=>{t&&s.remoteId&&t.includes(s.remoteId)?s.notify("restored"):(s.notify("disconnected",new he("recovery_failed")),this._resubscribe(s))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new he(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[De]="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 he?t:new he(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[De]="closed";let n=e||new he("cable_closed");this.hub.subscriptions.all().forEach(s=>s.notify("disconnected",n)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:s,identifier:i,message:r,meta:o}=n;s?this.hub.notify(i,s,r):this.hub.transmit(i,r,o)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new wn({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new wn({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,s;return typeof t=="string"&&(s=t,t=yn),n=s?new t(s,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:s=>this._subscribe(s,t.channelId,t.params),unsubscribe:s=>this._unsubscribe(s)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let s=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:s});return}this.logger.debug("acquiring subscribe lock",{identifier:s});let i=await t.acquire("subscribed");if(i.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:s}),i.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:s}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),i.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:s}),i.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:s}),t.notify("connected"),i.release();return}let r={identifier:e,params:n};this.logger.debug("subscribing",r);try{let o=await this.protocol.subscribe(e,n);this.hub.subscribe(s,o),this.logger.debug("subscribed",{...r,remoteId:o}),t.notify("connected")}catch(o){if(o){if(o instanceof bn&&this.logger.warn("rejected",r),o instanceof he){this.logger.debug("disconnected during subscription; will retry on connect",r),i.release();return}this.logger.error("failed to subscribe",{error:o,...r})}t.close(o),this.hub.unsubscribe(s)}i.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let s=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:s}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(s),this.logger.debug("unsubscribed remotely",{id:e})}catch(i){i&&(i instanceof he?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:i}):this.logger.error("unsubscribe failed",{id:e,error:i}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(s){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:s});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new Mc;let s=this.hub.subscriptions.get(t);if(!s)throw Error(`Subscription not found: ${t}`);if(await s.pending("subscribed"),s.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let i=s.remoteId,r={id:i,action:e,payload:n};this.logger.debug("perform",r);try{let o=await this.protocol.perform(i,e,n);return o&&this.logger.debug("perform result",{message:o,request:r}),o}catch(o){throw this.logger.error("perform failed",{error:o,request:r}),o}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...s)=>{n(),e(...s)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(s=>s()),t()})),n.push(this.on("close",s=>{n.forEach(i=>i()),e(s)})),n.push(this.on("disconnect",s=>{n.forEach(i=>i()),e(s)}))}),this._pendingConnect)}};const Nc={maxMissingPings:2,maxReconnectAttempts:1/0},Le=()=>Date.now(),Ri=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:s,maxInterval:i}=e;return n=n||2,s===void 0&&(s=.5),r=>{let o=t*n**r,l=o*n,u=o+(l-o)*Math.random(),d=2*(Math.random()-.5)*s;return u=u*(1+d),i&&i<u&&(u=i),u}};let Pi=class{constructor({pingInterval:e,...n}){if(this.pingInterval=e,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${e}`);if(n=Object.assign({},Nc,n),this.strategy=n.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=n.maxMissingPings,this.maxReconnectAttempts=n.maxReconnectAttempts,this.logger=n.logger||new nt,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Le()}watch(e){this.target=e,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(e=>{this.logger.info("Failed at reconnecting: "+e)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=Le(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Le(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Le(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Le()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(e=>e()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let e=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},e)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let e=Le()-this.pingedAt;e>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${e}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new xc))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let e=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${e}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),e)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class Ic{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Nt(),this.unbind=[],this.logger=n.logger||new nt}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(s){this.logger.debug(`Failed to connect via ${n.displayName()}: ${s.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,n){this.transports.forEach(s=>{s.setParam(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let s=this.emitter.on(e,(...i)=>{s(),n(...i)});return s}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class Fc{constructor(e,n={}){this.url=e;let s=n.websocketImplementation;if(s)this.Impl=s;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Nt();let{format:i,subprotocol:r}=n;this.format=i||"text",this.connectionOptions=n.websocketOptions,this.subprotocol=r}displayName(){return"WebSocket("+this.url+")"}open(){return this.connectionOptions?this.ws=new this.Impl(this.url,this.subprotocol,this.connectionOptions):this.ws=new this.Impl(this.url,this.subprotocol),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,n)=>{let s=[];s.push(this.once("open",()=>{s.forEach(i=>i()),e()})),s.push(this.once("close",()=>{s.forEach(i=>i()),n(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let s=new URL(this.url);s.searchParams.set(e,n);let i=`${s.protocol}//${s.host}${s.pathname}?${s.searchParams}`;this.setURL(i)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,n){return this.emitter.on(e,n)}once(e,n){let s=this.emitter.on(e,(...i)=>{s(),n(...i)});return s}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Di={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Lc(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({},Di,e);let{protocol:n,websocketImplementation:s,websocketFormat:i,websocketOptions:r,fallbacks:o,logLevel:l,logger:u,transport:d,encoder:h,lazy:f,monitor:g,pingInterval:b,reconnectStrategy:y,maxMissingPings:m,maxReconnectAttempts:S,subprotocol:T,tokenRefresher:O,historyTimestamp:P,protocolOptions:q,concurrentSubscribes:E}=e;if(u=u||new nt(l),typeof n=="string"){T=T||n;let W=n.substring(0,n.lastIndexOf("-")),ae=n.substring(n.lastIndexOf("-")+1);if(q=q||{},W==="actioncable-v1")n=new Oi({logger:u,...q});else if(W==="actioncable-v1-ext")n=new Ac({logger:u,historyTimestamp:P,...q});else throw Error(`Protocol is not supported yet: ${n}`);if(ae==="json")h=h||new Pc,i=i||"text";else if(ae==="msgpack"){if(i="binary",!h)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(ae==="protobuf"){if(i=i||"binary",!h)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${n}`)}if(!n)throw Error("Protocol must be specified");d=d||new Fc(t,{websocketImplementation:s,websocketOptions:r,subprotocol:T,format:i}),o&&(d=new Ic([d,...o],{logger:u})),y=y||Ri(b),g!==!1&&(g=g||new Pi({pingInterval:b,reconnectStrategy:y,maxMissingPings:m,maxReconnectAttempts:S,logger:u}));let R={concurrentSubscribes:E},F=new Uc({protocol:n,transport:d,encoder:h,logger:u,lazy:f,hubOptions:R});return g&&(g.watch(F),F.monitor=g),O&&zc(F,async()=>{try{await O(d)}catch(W){return u.error("Failed to refresh authentication token: "+W),!1}return F.connect().catch(()=>{}),!0}),F}function zc(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async s=>{if(s){if(n){t.logger.warn("Token auto-refresh is disabled",s);return}s.reason==="token_expired"&&(n=!0,await e())}})}class qc{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Bc extends yn{constructor(e,n,s){super(e,n),this.subscription=new qc(this),Object.assign(this.subscription,s),this.on("connect",()=>this.subscription.notify("connected")),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",i=>this.subscription.notify("received",i)),this.on("close",i=>{i&&i instanceof bn?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class jc{constructor(e){this.cable=e}create(e,n){let s,i;typeof e=="object"?(s=e.channel,delete e.channel,i=e):(s=e,i={});let r=new Bc(s,i,n);return r.subscription.notify("initialized"),this.cable.subscribe(r),r.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class $c{constructor(e){this.cable=e,this.subscriptions=new jc(e)}}class Hc extends Ci{writeLogEntry(e,n,s){s?console[e](n,s):console[e](n)}}class Wc extends Pi{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},n=i=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:i})},s=()=>this.disconnect(new he("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",s,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!1),window.removeEventListener("freeze",s,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const Gc=["cable","action-cable"],Jc="/cable",Ai=(t,e)=>{for(let n of Gc){let s=t.head.querySelector(`meta[name='${n}-${e}']`);if(s)return s.getAttribute("content")}},Mi=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Yc=()=>{if(typeof document<"u"&&document.head){let t=Ai(document,"url");if(t)return Mi(t)}return Mi(Jc)},Kc=()=>{if(typeof document<"u"&&document.head){let t=Ai(document,"history-timestamp");if(t)return t|0}};function Xc(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Yc(),e=e||{},e.historyTimestamp||(e.historyTimestamp=Kc()),e=Object.assign({},Di,e);let{logLevel:n,logger:s,pingInterval:i,reconnectStrategy:r,maxMissingPings:o,maxReconnectAttempts:l}=e;return s=e.logger=e.logger||new Hc(n),r=e.reconnectStrategy=e.reconnectStrategy||Ri(i),e.monitor!==!1&&(e.monitor=e.monitor||new Wc({pingInterval:i,reconnectStrategy:r,maxMissingPings:o,maxReconnectAttempts:l,logger:s})),Lc(t,e)}function Zc(t,e){let n=Xc(t,e);return new $c(n)}class Qc{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,s={},i={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(r=>{if(r&&OpenC3Auth.setTokens(),this._cable==null){let o=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);o=new URL(o,document.baseURI).href,this._cable=Zc(o)}return this._cable.subscriptions.create({channel:e,...i},s)})}recordPing(){}}class _n{constructor(){en(this,"id",1)}async exec(e,n,s={},i={},r=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return s.scope=window.openc3Scope,i.manual=!0,(await fn.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:s},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...i},timeout:r})).data.result}catch(o){let l=new Error;throw o.response?(l.name=o.response.data.error.data.class,l.message=o.response.data.error.data.message,l.object=o.response.data.error):o.request?(l.name="Request error",l.message="Request error, no response received"):l.name="Unknown error",l}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...s){return this.exec("interface_cmd",[e,n,...s])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,n,s){return this.exec("get_item",[e,n,s])}get_param(e,n,s){return this.exec("get_param",[e,n,s])}get_parameter(e,n,s){return this.exec("get_param",[e,n,s])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}async get_tlm_packet(e,n,s,i=30){const r=await this.exec("get_tlm_packet",[e,n],{type:s,stale_time:i});if(r!=null){let o=r.length,l=null;for(let u=0;u<o;u++)l=this.decode_openc3_type(r[u][1]),l!==null&&(r[u][1]=l)}return r}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}async get_tlm_values(e,n=30,s=null){let i={stale_time:n};s!==null&&(i.cache_timeout=s);const r=await this.exec("get_tlm_values",[e],i,{},1e4);let o=r[0].length,l=null;for(let u=0;u<o;u++)l=this.decode_openc3_type(r[0][u]),l!==null&&(r[0][u]=l);return r}get_limits(e,n,s){return this.exec("get_limits",[e,n,s])}async tlm(e,n,s,i="CONVERTED"){let r=null;if(n===void 0)r=await this.exec("tlm",[e]);else if(s===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))r=await this.exec("tlm",[e],{type:n});else{let l=new Error;throw l.name="TypeError",l.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,l}else r=await this.exec("tlm",[e,n,s],{type:i});let o=this.decode_openc3_type(r);return o!==null&&(r=o),r}async inject_tlm(e,n,s=null,i="CONVERTED"){data=await this.exec("inject_tlm",[e,n,s],{type:i})}set_tlm(e,n,s,i){return this.exec("set_tlm",[e,n,s],{type:i})}override_tlm(e,n,s,i){return this.exec("override_tlm",[e,n,s],{type:i})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,s,i){return this.exec("normalize_tlm",[e,n,s],{type:i})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,s,i="CONVERTED"){return this.exec("get_cmd_value",[e,n,s,i])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,s,i,r){let o=null;for(let l in i)Object.prototype.hasOwnProperty.call(i,l)&&(o=this.encode_openc3_type(i[l]),o!==null&&(i[l]=o));return this.exec(e,[n,s,i],{},r)}get_cmd_hazardous(e,n,s,i={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},i):this._cmd("get_cmd_hazardous",e,n,s,i)}cmd(e,n,s,i={}){return n===void 0?this.exec("cmd",e,{},i):this._cmd("cmd",e,n,s,i)}cmd_no_range_check(e,n,s,i={}){return n===void 0?this.exec("cmd_no_range_check",e,{},i):this._cmd("cmd_no_range_check",e,n,s,i)}cmd_raw(e,n,s,i={}){return n===void 0?this.exec("cmd_raw",e,{},i):this._cmd("cmd_raw",e,n,s,i)}cmd_raw_no_range_check(e,n,s,i={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},i):this._cmd("cmd_raw_no_range_check",e,n,s,i)}cmd_no_hazardous_check(e,n,s,i={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},i):this._cmd("cmd_no_hazardous_check",e,n,s,i)}cmd_no_checks(e,n,s,i={}){return n===void 0?this.exec("cmd_no_checks",e,{},i):this._cmd("cmd_no_checks",e,n,s,i)}cmd_raw_no_hazardous_check(e,n,s,i={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},i):this._cmd("cmd_raw_no_hazardous_check",e,n,s,i)}cmd_raw_no_checks(e,n,s,i={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},i):this._cmd("cmd_raw_no_checks",e,n,s,i)}build_cmd(e,n,s){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,s)}build_command(e,n,s){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,s)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,s){return this.exec("save_config",[e,n,s])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,s){return this.exec("enable_limits",[e,n,s])}disable_limits(e,n,s){return this.exec("disable_limits",[e,n,s])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(s);return Array.from(i).map(r=>r.toString(16).padStart(2,"0")).join("")}}}function eu(t,e,n){const{years:s=0,months:i=0,weeks:r=0,days:o=0,hours:l=0,minutes:u=0,seconds:d=0}=e,h=An(t,void 0),f=i||s?Ln(h,i+s*12):h,g=o||r?Mn(f,o+r*7):f,b=u+l*60,y=(d+b*60)*1e3;return Vn(t,+g+y)}const vn={props:{date:{type:String},time:{type:String},timeZone:{type:String}},data(){return{startDate:"",startTime:"",endDate:"",endTime:""}},methods:{calcStartDateTime:function(){this.date?(this.startDate=this.date,this.endDate=this.date):(this.startDate=Be(new Date,"yyyy-MM-dd"),this.endDate=Be(new Date,"yyyy-MM-dd"));let t=1e3*60*30,e=null;this.time?(e=Dn(this.time,"HH:mm:ss",new Date),e=new Date(Math.floor(e.getTime()/t)*t)):e=new Date(Math.ceil(new Date().getTime()/t)*t),this.startTime=Be(e,"HH:mm:ss"),this.endTime=Be(eu(e,{minutes:30}),"HH:mm:ss")}}},tu={components:{EnvironmentChooser:Bn,ScriptChooser:er},props:{modelValue:Boolean,timelines:{type:Array,required:!0},activity:{type:Object,default:null}},mixins:[vn,qe],data(){return{timeline:null,dialogStep:1,kind:"",types:["COMMAND","SCRIPT","RESERVE"],activityData:"",activityEnvironment:[],rules:{required:t=>!!t||"Required"},recurring:!1,recurringEndDate:null,recurringEndTime:null,frequency:90,timeSpan:"minutes",timeSpans:["minutes","hours","days"]}},mounted:function(){this.updateValues()},computed:{timeError:function(){const t=new Date,e=Date.parse(`${this.startDate}T${this.startTime}`),n=Date.parse(`${this.endDate}T${this.endTime}`);return e===n?"Invalid start, end time. Activity must have different start and end times.":t>e?"Invalid start time. Activity must be in the future.":e>n?"Invalid start time. Activity start before end.":null},typeError:function(){return this.timeline?this.kind!=="RESERVE"&&!this.activityData?"No data is selected or inputted":null:"Activity must have a timeline selected."},timelineNames:function(){return this.timelines.map(t=>t.name)},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{changeKind:function(t){t!==this.kind&&(this.kind=t,this.activityData="")},fileHandler:function(t){this.activityData=t},updateValues:function(){var t;if(this.dialogStep=1,this.activity){this.timeline=this.activity.name;const e=new Date(this.activity.start*1e3),n=new Date(this.activity.stop*1e3);if(this.startDate=this.formatDate(e,this.timeZone),this.startTime=this.formatTimeHMS(e,this.timeZone),this.endDate=this.formatDate(n,this.timeZone),this.endTime=this.formatTimeHMS(n,this.timeZone),this.kind=this.activity.kind.toUpperCase(),this.activityData=this.activity.data[this.activity.kind],this.activityEnvironment=this.activity.data.environment,(t=this.activity.recurring)!=null&&t.uuid){this.recurring=!0;const s=new Date(this.activity.recurring.end*1e3);this.recurringEndDate=this.formatDate(s,this.timeZone),this.recurringEndTime=this.formatTimeHMS(s,this.timeZone),this.frequency=this.activity.recurring.frequency,this.timeSpan=this.activity.recurring.span}}else this.calcStartDateTime(),this.recurringEndDate=this.startDate,this.recurringEndTime=this.startTime,this.kind="",this.activityData="",this.activityEnvironment=[],this.timeline=this.timelineNames[0]},clearHandler:function(){this.show=!this.show},submitHandler(){let t=null,e=null,n=null;this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime).toISOString(),e=new Date(this.endDate+" "+this.endTime).toISOString(),this.recurring&&(n=new Date(this.recurringEndDate+" "+this.recurringEndTime).toISOString())):(t=new Date(this.startDate+" "+this.startTime+"Z").toISOString(),e=new Date(this.endDate+" "+this.endTime+"Z").toISOString(),this.recurring&&(n=new Date(this.recurringEndDate+" "+this.recurringEndTime+"Z").toISOString()));const s=this.kind.toLowerCase();let i={environment:this.activityEnvironment};i[s]=this.activityData;let r={};this.recurring&&(r={frequency:this.frequency,span:this.timeSpan,end:n}),this.activity?pe.put(`/openc3-api/timeline/${this.activity.name}/activity/${this.activity.start}`,{data:{start:t,stop:e,kind:s,data:i,recurring:r}}).then(o=>{const l=this.formatSeconds(new Date(o.data.start*1e3));this.$notify.normal({title:"Updated Activity",body:`${l} (${o.data.start}) on timeline: ${o.data.name}`}),this.$emit("update",o.data),this.show=!this.show}).catch(o=>{this.show=!this.show}):pe.post(`/openc3-api/timeline/${this.timeline}/activities`,{data:{start:t,stop:e,kind:s,data:i,recurring:r}}).then(o=>{const l=this.formatSeconds(new Date(o.data.start*1e3));this.$notify.normal({title:"Created Activity",body:`${l} (${o.data.start}) on timeline: ${o.data.name}`}),this.$emit("update",o.data),this.show=!this.show}).catch(o=>{this.show=!this.show}),this.clearHandler()}}},nu={key:0},su={key:1},iu={class:"pr-2"},ru=["textContent"],ou={class:"pr-2"},au={key:0},lu={key:1,class:"ma-3"},cu={key:2},uu=["textContent"];function du(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-icon"),u=p("v-tooltip"),d=p("v-toolbar"),h=p("v-btn"),f=p("v-row"),g=p("v-select"),b=p("v-text-field"),y=p("v-checkbox"),m=p("v-col"),S=p("v-card-text"),T=p("script-chooser"),O=p("environment-chooser"),P=p("v-stepper"),q=p("v-card"),E=p("v-dialog");return k(),A("div",null,[a(E,{persistent:"",modelValue:r.show,"onUpdate:modelValue":e[15]||(e[15]=R=>r.show=R),width:"600"},{default:c(()=>[a(q,null,{default:c(()=>[a(d,{height:"24"},{default:c(()=>[a(o),n.activity?(k(),A("span",nu,"Edit Activity")):(k(),A("span",su,"Create Activity")),a(o),a(u,{location:"top"},{activator:c(({props:R})=>[v("div",G(J(R)),[a(l,{"data-test":"close-note-icon",onClick:r.clearHandler},{default:c(()=>e[16]||(e[16]=[x(" mdi-close-box ")])),_:1},8,["onClick"])],16)]),default:c(()=>[e[17]||(e[17]=v("span",null," Close ",-1))]),_:1})]),_:1}),a(P,{modelValue:i.dialogStep,"onUpdate:modelValue":e[14]||(e[14]=R=>i.dialogStep=R),editable:"",items:["Activity Times","Activity Type"]},Me({"item.1":c(()=>[a(S,null,{default:c(()=>[v("div",iu,[a(g,{density:"compact","hide-details":"",variant:"outlined",modelValue:i.timeline,"onUpdate:modelValue":e[1]||(e[1]=R=>i.timeline=R),items:r.timelineNames,label:"Timeline","data-test":"activity-select-timeline",class:"pb-2"},null,8,["modelValue","items"]),a(f,{dense:""},{default:c(()=>[a(b,{modelValue:t.startDate,"onUpdate:modelValue":e[2]||(e[2]=R=>t.startDate=R),type:"date",label:"Start Date",class:"mx-1",rules:[i.rules.required],"data-test":"activity-start-date"},null,8,["modelValue","rules"]),a(b,{modelValue:t.startTime,"onUpdate:modelValue":e[3]||(e[3]=R=>t.startTime=R),type:"time",step:"1",label:"Start Time",class:"mx-1",rules:[i.rules.required],"data-test":"activity-start-time"},null,8,["modelValue","rules"])]),_:1}),a(f,{dense:""},{default:c(()=>[a(b,{modelValue:t.endDate,"onUpdate:modelValue":e[4]||(e[4]=R=>t.endDate=R),type:"date",label:"End Date",class:"mx-1",rules:[i.rules.required],"data-test":"activity-end-date"},null,8,["modelValue","rules"]),a(b,{modelValue:t.endTime,"onUpdate:modelValue":e[5]||(e[5]=R=>t.endTime=R),type:"time",step:"1",label:"End Time",class:"mx-1",rules:[i.rules.required],"data-test":"activity-end-time"},null,8,["modelValue","rules"])]),_:1}),a(f,{class:"pl-3"},{default:c(()=>[a(y,{modelValue:i.recurring,"onUpdate:modelValue":e[6]||(e[6]=R=>i.recurring=R),disabled:!!n.activity,label:"Recurring","hide-details":"","data-test":"recurring"},null,8,["modelValue","disabled"])]),_:1}),i.recurring?(k(),D(f,{key:0},{default:c(()=>[a(m,null,{default:c(()=>e[21]||(e[21]=[v("div",{class:"repeat"},"Repeat every",-1)])),_:1}),a(m,null,{default:c(()=>[a(b,{modelValue:i.frequency,"onUpdate:modelValue":e[7]||(e[7]=R=>i.frequency=R),disabled:!!n.activity,density:"compact",variant:"outlined","single-line":"","hide-details":"","data-test":"recurring-frequency"},null,8,["modelValue","disabled"])]),_:1}),a(m,null,{default:c(()=>[a(g,{modelValue:i.timeSpan,"onUpdate:modelValue":e[8]||(e[8]=R=>i.timeSpan=R),disabled:!!n.activity,items:i.timeSpans,style:{},"hide-details":"",density:"compact",variant:"outlined","data-test":"recurring-span"},null,8,["modelValue","disabled","items"])]),_:1})]),_:1})):L("",!0),i.recurring?(k(),D(f,{key:1,style:{"padding-bottom":"10px"}},{default:c(()=>[a(m,null,{default:c(()=>e[22]||(e[22]=[v("div",{class:"repeat"},"Ending",-1)])),_:1}),a(m,null,{default:c(()=>[a(b,{modelValue:i.recurringEndDate,"onUpdate:modelValue":e[9]||(e[9]=R=>i.recurringEndDate=R),type:"date",label:"End Date",class:"mx-1",rules:[i.rules.required],disabled:!!n.activity,"data-test":"recurring-end-date"},null,8,["modelValue","rules","disabled"])]),_:1}),a(m,null,{default:c(()=>[a(b,{modelValue:i.recurringEndTime,"onUpdate:modelValue":e[10]||(e[10]=R=>i.recurringEndTime=R),type:"time",step:"1",label:"End Time",class:"mx-1",rules:[i.rules.required],disabled:!!n.activity,"data-test":"recurring-end-time"},null,8,["modelValue","rules","disabled"])]),_:1})]),_:1})):L("",!0),a(f,null,{default:c(()=>[ve(v("span",{class:"ma-2 text-red",textContent:I(r.timeError)},null,8,ru),[[Se,r.timeError]])]),_:1})])]),_:1})]),"item.2":c(()=>[a(S,null,{default:c(()=>[v("div",ou,[a(g,{density:"compact","hide-details":"",variant:"outlined",modelValue:i.kind,"onUpdate:modelValue":e[11]||(e[11]=R=>i.kind=R),items:i.types,label:"Activity Type","data-test":"activity-select-type",class:"pb-2"},null,8,["modelValue","items"]),i.kind==="COMMAND"?(k(),A("div",au,[a(b,{modelValue:i.activityData,"onUpdate:modelValue":e[12]||(e[12]=R=>i.activityData=R),type:"text",label:"Command Input",placeholder:"INST COLLECT with TYPE 0, DURATION 1, OPCODE 171, TEMP 0",prefix:"cmd('",suffix:"')",hint:"Timeline runs commands with cmd_no_hazardous_check","data-test":"activity-cmd"},null,8,["modelValue"])])):i.kind==="SCRIPT"?(k(),A("div",lu,[a(T,{onFile:r.fileHandler},null,8,["onFile"]),a(O,{modelValue:i.activityEnvironment,"onUpdate:modelValue":e[13]||(e[13]=R=>i.activityEnvironment=R)},null,8,["modelValue"])])):(k(),A("div",cu,e[23]||(e[23]=[v("span",{class:"ma-2"}," No required input ",-1)]))),ve(a(f,{class:"mt-2"},{default:c(()=>[v("span",{class:"ma-2 text-red",textContent:I(r.typeError)},null,8,uu)]),_:1},512),[[Se,r.typeError]])])]),_:1})]),_:2},[i.dialogStep===2?{name:"actions",fn:c(()=>[a(f,{class:"ma-0 px-6 pb-4"},{default:c(()=>[a(h,{onClick:e[0]||(e[0]=()=>i.dialogStep-=1),variant:"text"},{default:c(()=>e[18]||(e[18]=[x(" Previous ")])),_:1}),a(o),a(h,{onClick:r.clearHandler,variant:"outlined",class:"mr-4"},{default:c(()=>e[19]||(e[19]=[x(" Cancel ")])),_:1},8,["onClick"]),a(h,{onClick:ye(r.submitHandler,["prevent"]),type:"submit",color:"primary",disabled:!!t.error},{default:c(()=>e[20]||(e[20]=[x(" Ok ")])),_:1},8,["onClick","disabled"])]),_:1})]),key:"0"}:void 0]),1032,["modelValue"])]),_:1})]),_:1},8,["modelValue"])])}const hu=re(tu,[["render",du],["__scopeId","data-v-9ad41f9b"]]),pu={components:{},props:{modelValue:{type:String,required:!0}},computed:{color:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},swatches:function(){return["#005a8f","#003784","#8F3400","#df1368","#ff5252","#df323b","#9f0010","#2d9437","#004700","#db7200","#802700","#0f2941"]}},methods:{}};function mu(t,e,n,s,i,r){const o=p("v-icon"),l=p("v-list-item"),u=p("v-select");return k(),A("div",null,[a(u,{label:"Color",items:r.swatches,modelValue:r.color,"onUpdate:modelValue":e[0]||(e[0]=d=>r.color=d)},{"prepend-inner":c(()=>[a(o,{color:r.color},{default:c(()=>e[1]||(e[1]=[x(" mdi-square ")])),_:1},8,["color"])]),item:c(({props:d,item:h})=>[a(l,ie(d,{value:h.raw}),{prepend:c(()=>[a(o,{color:h.raw},{default:c(()=>e[2]||(e[2]=[x(" mdi-square ")])),_:2},1032,["color"])]),_:2},1040,["value"])]),_:1},8,["items","modelValue"])])}const Vi=re(pu,[["render",mu]]),fu={methods:{deleteItem(t){let e=null,n="";switch(t.type.toLowerCase()){case"activity":n="activity",e=t.activity.start;break;case"metadata":n="metadata",e=t.metadata.start;break;case"note":n="notes",e=t.note.start;break}this.$dialog.confirm(`Are you sure you want to remove ${t.typeStr} at ${t.startStr}`,{okText:"Delete",cancelText:"Cancel"}).then(()=>pe.delete(`/openc3-api/${n}/${e}`)).then(()=>{this.$emit("delete",t),this.$notify.normal({title:`Deleted ${t.typeStr}`,body:`Deleted ${t.typeStr} at ${t.startStr}`})}).catch(()=>{})}}},gu={components:{},props:{modelValue:{type:Array,required:!0}},data(){return{}},computed:{metadata:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{newMetadata:function(){this.metadata.push({key:"",value:""})},rm:function(t){this.metadata.splice(t,1)}}},bu={scope:"col",class:"text-right"};function yu(t,e,n,s,i,r){const o=p("v-icon"),l=p("v-tooltip"),u=p("v-text-field"),d=p("v-table");return k(),A("div",null,[a(d,{dense:""},{default:c(()=>[v("tbody",null,[v("tr",null,[e[2]||(e[2]=v("th",{scope:"col",class:"text-left"},"Key",-1)),e[3]||(e[3]=v("th",{scope:"col",class:"text-left"},"Value",-1)),v("th",bu,[a(l,{location:"top"},{activator:c(({props:h})=>[v("div",G(J(h)),[a(o,{"data-test":"new-metadata-icon",onClick:r.newMetadata},{default:c(()=>e[0]||(e[0]=[x(" mdi-plus ")])),_:1},8,["onClick"])],16)]),default:c(()=>[e[1]||(e[1]=v("span",null," New Metadata ",-1))]),_:1})])]),(k(!0),A(te,null,le(r.metadata,(h,f)=>(k(),A("tr",{key:`tr-${f}`},[v("td",null,[a(u,{modelValue:h.key,"onUpdate:modelValue":g=>h.key=g,type:"text",density:"compact","data-test":`key-${f}`},null,8,["modelValue","onUpdate:modelValue","data-test"])]),v("td",null,[a(u,{modelValue:h.value,"onUpdate:modelValue":g=>h.value=g,type:"text",density:"compact","data-test":`value-${f}`},null,8,["modelValue","onUpdate:modelValue","data-test"])]),v("td",null,[a(l,{location:"top"},{activator:c(({props:g})=>[v("div",ie({ref_for:!0},g),[a(o,{"data-test":`delete-metadata-icon-${f}`,onClick:b=>r.rm(f)},{default:c(()=>e[4]||(e[4]=[x(" mdi-delete ")])),_:2},1032,["data-test","onClick"])],16)]),default:c(()=>[e[5]||(e[5]=v("span",null," Delete Metadata ",-1))]),_:2},1024)])]))),128))])]),_:1})])}const wu=re(gu,[["render",yu]]),_u={components:{ColorSelectForm:Vi,MetadataInputForm:wu},props:{modelValue:Boolean,metadata:{type:Object,default:null}},mixins:[vn,qe],data(){return{dialogStep:1,color:"#003784",metadataVals:[],rules:{required:t=>!!t||"Required"}}},mounted:function(){this.updateValues()},computed:{typeError:function(){return this.color?this.metadataVals.length<1?"Please enter a value in the metadata table.":this.metadataVals.find(t=>t.key===""||t.value==="")?"Missing or empty key, value in the metadata table.":null:"A color is required."},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{updateValues:function(){if(this.dialogStep=1,this.metadata){const t=new Date(this.metadata.start*1e3);this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone),this.color=this.metadata.color,this.metadataVals=Object.keys(this.metadata.metadata).map(e=>({key:e,value:this.metadata.metadata[e]}))}else this.calcStartDateTime(),this.color="#003784",this.metadataVals=[]},clearHandler:function(){this.show=!this.show},submitHandler(){const t=this.color,e=this.metadataVals.reduce((s,i)=>(s[i.key]=i.value,s),{}),n={color:t,metadata:e};this.timeZone==="local"?n.start=new Date(this.startDate+" "+this.startTime).toISOString():n.start=new Date(this.startDate+" "+this.startTime+"Z").toISOString(),this.metadata?pe.put(`/openc3-api/metadata/${this.metadata.start}`,{data:n}).then(s=>{this.$notify.normal({title:"Updated Metadata",body:`Metadata updated: (${s.data.start})`}),this.$emit("update",s.data),this.show=!this.show}):pe.post("/openc3-api/metadata",{data:n}).then(s=>{this.$notify.normal({title:"Created new Metadata",body:`Metadata: (${s.data.start})`}),this.$emit("update",s.data),this.show=!this.show})}}},vu={key:0},Su={key:1},ku={class:"pa-2"},xu={class:"pa-2"},Eu={style:{"min-height":"200px"}},Cu=["textContent"];function Ou(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-icon"),u=p("v-tooltip"),d=p("v-toolbar"),h=p("v-btn"),f=p("v-row"),g=p("color-select-form"),b=p("v-text-field"),y=p("v-card-text"),m=p("metadata-input-form"),S=p("v-stepper"),T=p("v-card"),O=p("v-dialog");return k(),A("div",null,[a(O,{persistent:"",modelValue:r.show,"onUpdate:modelValue":e[6]||(e[6]=P=>r.show=P),width:"600"},{default:c(()=>[a(T,null,{default:c(()=>[a(d,{height:"24"},{default:c(()=>[a(o),n.metadata?(k(),A("span",vu,"Update Metadata")):(k(),A("span",Su,"Create Metadata")),a(o),a(u,{location:"top"},{activator:c(({props:P})=>[v("div",G(J(P)),[a(l,{"data-test":"close-metadata-icon",onClick:r.clearHandler},{default:c(()=>e[7]||(e[7]=[x(" mdi-close-box ")])),_:1},8,["onClick"])],16)]),default:c(()=>[e[8]||(e[8]=v("span",null,"Close",-1))]),_:1})]),_:1}),a(S,{modelValue:i.dialogStep,"onUpdate:modelValue":e[5]||(e[5]=P=>i.dialogStep=P),editable:"",items:["Metadata Times","Metadata Input"]},Me({"item.1":c(()=>[a(y,null,{default:c(()=>[v("div",ku,[a(g,{modelValue:i.color,"onUpdate:modelValue":e[1]||(e[1]=P=>i.color=P)},null,8,["modelValue"]),a(f,{dense:""},{default:c(()=>[a(b,{modelValue:t.startDate,"onUpdate:modelValue":e[2]||(e[2]=P=>t.startDate=P),type:"date",label:"Start Date",class:"mx-1",rules:[i.rules.required],"data-test":"metadata-start-date"},null,8,["modelValue","rules"]),a(b,{modelValue:t.startTime,"onUpdate:modelValue":e[3]||(e[3]=P=>t.startTime=P),type:"time",step:"1",label:"Start Time",class:"mx-1",rules:[i.rules.required],"data-test":"metadata-start-time"},null,8,["modelValue","rules"])]),_:1})])]),_:1})]),"item.2":c(()=>[a(y,null,{default:c(()=>[v("div",xu,[v("div",Eu,[a(m,{modelValue:i.metadataVals,"onUpdate:modelValue":e[4]||(e[4]=P=>i.metadataVals=P)},null,8,["modelValue"])]),ve(a(f,null,{default:c(()=>[v("span",{class:"ma-2 text-red",textContent:I(r.typeError)},null,8,Cu)]),_:1},512),[[Se,r.typeError]])])]),_:1})]),_:2},[i.dialogStep===2?{name:"actions",fn:c(()=>[a(f,{class:"ma-0 px-6 pb-4"},{default:c(()=>[a(h,{onClick:e[0]||(e[0]=()=>i.dialogStep-=1),variant:"text"},{default:c(()=>e[9]||(e[9]=[x(" Previous ")])),_:1}),a(o),a(h,{onClick:r.clearHandler,variant:"outlined",class:"mr-4"},{default:c(()=>e[10]||(e[10]=[x(" Cancel ")])),_:1},8,["onClick"]),a(h,{onClick:ye(r.submitHandler,["prevent"]),type:"submit",color:"primary",disabled:!!t.error},{default:c(()=>e[11]||(e[11]=[x(" Ok ")])),_:1},8,["onClick","disabled"])]),_:1})]),key:"0"}:void 0]),1032,["modelValue"])]),_:1})]),_:1},8,["modelValue"])])}const Tu=re(_u,[["render",Ou],["__scopeId","data-v-364c2ff6"]]),Ru={components:{ColorSelectForm:Vi},props:{modelValue:Boolean,note:{type:Object}},mixins:[vn,qe],data(){return{dialogStep:1,description:"",color:"#8F3400",rules:{required:t=>!!t||"Required"}}},mounted:function(){this.updateValues()},computed:{timeError:function(){let t,e;return 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")),t===e?"Invalid start, end time. Notes must have different start and end times.":t>e?"Invalid start time. Notes start before end.":null},typeError:function(){return this.color?this.description?null:"A description is required for a valid note.":"A color is required."},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{updateValues:function(){if(this.dialogStep=1,this.note){const t=new Date(this.note.start*1e3);this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone);const e=new Date(this.note.stop*1e3);this.endDate=this.formatDate(e,this.timeZone),this.endTime=this.formatTimeHMS(e,this.timeZone),this.color=this.note.color,this.description=this.note.description}else this.calcStartDateTime(),this.color="#8F3400",this.description=""},clearHandler:function(){this.show=!this.show},submitHandler(){let t,e;this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime).toISOString(),e=new Date(this.endDate+" "+this.endTime).toISOString()):(t=new Date(this.startDate+" "+this.startTime+"Z").toISOString(),e=new Date(this.endDate+" "+this.endTime+"Z").toISOString());const n=this.color,s=this.description;this.note?pe.put(`/openc3-api/notes/${this.note.start}`,{data:{start:t,stop:e,color:n,description:s}}).then(i=>{const r=i.data.description.length>16?`${i.data.description.substring(0,16)}...`:i.data.description;this.$notify.normal({title:"Updated Note",body:`Note updated: (${i.data.start}): "${r}"`}),this.$emit("update",i.data),this.show=!this.show}):pe.post("/openc3-api/notes",{data:{start:t,stop:e,color:n,description:s}}).then(i=>{const r=i.data.description.length>16?`${i.data.description.substring(0,16)}...`:i.data.description;this.$notify.normal({title:"Created new Note",body:`Note: (${i.data.start}) created: "${r}"`}),this.$emit("update",i.data),this.show=!this.show})}}},Pu={key:0},Du={key:1},Au={class:"pa-2"},Mu=["textContent"],Vu={class:"pa-2"},Uu=["textContent"];function Nu(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-icon"),u=p("v-tooltip"),d=p("v-toolbar"),h=p("v-btn"),f=p("v-row"),g=p("v-text-field"),b=p("v-card-text"),y=p("color-select-form"),m=p("v-stepper"),S=p("v-card"),T=p("v-dialog");return k(),A("div",null,[a(T,{persistent:"",modelValue:r.show,"onUpdate:modelValue":e[8]||(e[8]=O=>r.show=O),width:"600"},{default:c(()=>[a(S,null,{default:c(()=>[a(d,{height:"24"},{default:c(()=>[a(o),n.note?(k(),A("span",Pu,"Update Note")):(k(),A("span",Du,"Create Note")),a(o),a(u,{location:"top"},{activator:c(({props:O})=>[v("div",G(J(O)),[a(l,{"data-test":"close-note-icon",onClick:r.clearHandler},{default:c(()=>e[9]||(e[9]=[x(" mdi-close-box ")])),_:1},8,["onClick"])],16)]),default:c(()=>[e[10]||(e[10]=v("span",null," Close ",-1))]),_:1})]),_:1}),a(m,{modelValue:i.dialogStep,"onUpdate:modelValue":e[7]||(e[7]=O=>i.dialogStep=O),editable:"",items:["Note Times","Note Input"]},Me({"item.1":c(()=>[a(b,null,{default:c(()=>[v("div",Au,[a(f,{dense:""},{default:c(()=>[a(g,{modelValue:t.startDate,"onUpdate:modelValue":e[1]||(e[1]=O=>t.startDate=O),type:"date",label:"Start Date",class:"mx-1",rules:[i.rules.required],"data-test":"note-start-date"},null,8,["modelValue","rules"]),a(g,{modelValue:t.startTime,"onUpdate:modelValue":e[2]||(e[2]=O=>t.startTime=O),type:"time",step:"1",label:"Start Time",class:"mx-1",rules:[i.rules.required],"data-test":"note-start-time"},null,8,["modelValue","rules"])]),_:1}),a(f,{dense:""},{default:c(()=>[a(g,{modelValue:t.endDate,"onUpdate:modelValue":e[3]||(e[3]=O=>t.endDate=O),type:"date",label:"End Date",class:"mx-1",rules:[i.rules.required],"data-test":"note-end-date"},null,8,["modelValue","rules"]),a(g,{modelValue:t.endTime,"onUpdate:modelValue":e[4]||(e[4]=O=>t.endTime=O),type:"time",step:"1",label:"End Time",class:"mx-1",rules:[i.rules.required],"data-test":"note-end-time"},null,8,["modelValue","rules"])]),_:1}),a(f,null,{default:c(()=>[ve(v("span",{class:"ma-2 text-red",textContent:I(r.timeError)},null,8,Mu),[[Se,r.timeError]])]),_:1})])]),_:1})]),"item.2":c(()=>[a(b,null,{default:c(()=>[v("div",Vu,[v("div",null,[a(y,{modelValue:i.color,"onUpdate:modelValue":e[5]||(e[5]=O=>i.color=O)},null,8,["modelValue"])]),v("div",null,[a(g,{modelValue:i.description,"onUpdate:modelValue":e[6]||(e[6]=O=>i.description=O),type:"text",label:"Note Description","data-test":"note-description"},null,8,["modelValue"])]),ve(a(f,null,{default:c(()=>[v("span",{class:"ma-2 text-red",textContent:I(r.typeError)},null,8,Uu)]),_:1},512),[[Se,r.typeError]])])]),_:1})]),_:2},[i.dialogStep===2?{name:"actions",fn:c(()=>[a(f,{class:"ma-0 px-6 pb-4"},{default:c(()=>[a(h,{onClick:e[0]||(e[0]=()=>i.dialogStep-=1),variant:"text"},{default:c(()=>e[11]||(e[11]=[x(" Previous ")])),_:1}),a(o),a(h,{onClick:r.clearHandler,variant:"outlined",class:"mr-4"},{default:c(()=>e[12]||(e[12]=[x(" Cancel ")])),_:1},8,["onClick"]),a(h,{onClick:ye(r.submitHandler,["prevent"]),type:"submit",color:"primary",disabled:!!t.error},{default:c(()=>e[13]||(e[13]=[x(" Ok ")])),_:1},8,["onClick","disabled"])]),_:1})]),key:"0"}:void 0]),1032,["modelValue"])]),_:1})]),_:1},8,["modelValue"])])}const Iu=re(Ru,[["render",Nu],["__scopeId","data-v-87960c87"]]),Fu={components:{ActivityCreateDialog:hu,MetadataCreateDialog:Tu,NoteCreateDialog:Iu},mixins:[qe,fu],props:{events:{type:Array,required:!0},modelValue:{type:Boolean,required:!0},timeZone:{type:String,required:!0},types:{type:Array},newMetadata:{type:Boolean,default:!1}},data(){return{search:"",localEvents:[...this.events],eventHeaders:[{title:"Start",key:"start",width:215},{title:"Stop",key:"end",width:215},{title:"Type",key:"type"},{title:"Data",key:"data"},{title:"Actions",key:"actions",sortable:!1}],editActivity:{start:new Date,end:new Date},editMetadata:{start:new Date,end:new Date},editNote:{start:new Date,end:new Date},editIndex:0,showActivityUpdate:!1,showMetadataUpdate:!1,showNoteUpdate:!1,showMetadataCreate:!1}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},created:function(){},methods:{close(){this.$emit("close"),this.show=!1},dataFormat(t){let e=t.name;switch(t.type){case"note":e=t.note.description;break;case"metadata":let n=[];Object.entries(t.metadata.metadata).forEach(([s,i])=>n.push(`${s}: ${i}`)),e=n.join(", ");break}return e},editAction(t){switch(this.editIndex=this.localEvents.findIndex(e=>e.type===t.type&&e.start===t.start),t.type){case"activity":this.editActivity=t.activity,this.showActivityUpdate=!0;break;case"metadata":this.editMetadata=t.metadata,this.showMetadataUpdate=!0;break;case"note":this.editNote=t.note,this.showNoteUpdate=!0;break}},deleteAction(t){let e=this.localEvents.findIndex(r=>r.type===t.type&&r.start===t.start),n=null,s=null,i=null;switch(t.type){case"activity":n=`timeline/${t.activity.name}/activity`,s=t.activity.start,i=t.activity.uuid;break;case"metadata":n="metadata",s=t.metadata.start;break;case"note":n="notes",s=t.note.start;break}this.$dialog.confirm(`Are you sure you want to remove ${t.type} at ${t.start}`,{okText:"Delete",cancelText:"Cancel"}).then(r=>{this.localEvents.splice(e,1);let o=`/openc3-api/${n}/${s}`;return i&&(o+=`/${i}`),pe.delete(o)}).then(r=>{this.$emit("update"),this.$notify.normal({title:`Deleted ${t.type}`,body:`Deleted ${t.type} at ${s}`})}).catch(r=>{})},updateActivity(t){this.$emit("update"),this.localEvents[this.editIndex].activity=t},updateMetadata(t){this.$emit("update"),this.localEvents[this.editIndex].metadata=t},updateNote(t){this.$emit("update"),this.localEvents[this.editIndex].note=t},addMetadata(t){let e={name:"Metadata",start:new Date(t.start*1e3),end:new Date(t.start*1e3),color:t.color,type:t.type,timed:!0,metadata:t};this.localEvents.push(e)}}},Lu={key:0},zu={key:1},qu={key:0},Bu={key:1};function ju(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-icon"),u=p("v-tooltip"),d=p("v-toolbar"),h=p("v-text-field"),f=p("v-row"),g=p("v-card-title"),b=p("v-data-table"),y=p("v-btn"),m=p("v-card-actions"),S=p("v-card"),T=p("v-dialog"),O=p("activity-create-dialog"),P=p("metadata-create-dialog"),q=p("note-create-dialog");return k(),A("div",null,[a(T,{persistent:"",modelValue:r.show,"onUpdate:modelValue":e[2]||(e[2]=E=>r.show=E),width:"80vw"},{default:c(()=>[a(S,null,{default:c(()=>[a(d,{height:"24"},{default:c(()=>[a(o),n.newMetadata?(k(),A("span",Lu,"Metadata")):(k(),A("span",zu,"Events")),a(o),a(u,{location:"top"},{activator:c(({props:E})=>[v("div",G(J(E)),[a(l,{"data-test":"close-metadata-icon",onClick:r.close},{default:c(()=>e[7]||(e[7]=[x(" mdi-close-box ")])),_:1},8,["onClick"])],16)]),default:c(()=>[e[8]||(e[8]=v("span",null,"Close",-1))]),_:1})]),_:1}),a(g,null,{default:c(()=>[a(f,{class:"pa-3"},{default:c(()=>[n.newMetadata?(k(),A("span",qu,"Metadata")):(k(),A("span",Bu,"Events")),a(o),a(h,{modelValue:i.search,"onUpdate:modelValue":e[0]||(e[0]=E=>i.search=E),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1})]),_:1}),a(b,{headers:i.eventHeaders,items:i.localEvents,search:i.search},{"no-data":c(()=>e[9]||(e[9]=[v("span",null," No events ",-1)])),"item.start":c(({item:E})=>[x(I(t.formatDateTime(E.start,n.timeZone)),1)]),"item.end":c(({item:E})=>[x(I(t.formatDateTime(E.end,n.timeZone)),1)]),"item.type":c(({item:E})=>[x(I(E.type.charAt(0).toUpperCase()+E.type.slice(1)),1)]),"item.data":c(({item:E})=>[x(I(r.dataFormat(E)),1)]),"item.actions":c(({item:E})=>[a(l,{size:"small",class:"mr-2",onClick:R=>r.editAction(E),"data-test":"edit-event"},{default:c(()=>e[10]||(e[10]=[x(" mdi-pencil ")])),_:2},1032,["onClick"]),a(l,{size:"small",onClick:R=>r.deleteAction(E),"data-test":"delete-event"},{default:c(()=>e[11]||(e[11]=[x(" mdi-delete ")])),_:2},1032,["onClick"])]),_:1},8,["headers","items","search"]),a(m,{class:"px-2"},{default:c(()=>[a(o),a(y,{variant:"outlined","data-test":"close-event-list",onClick:r.close},{default:c(()=>e[12]||(e[12]=[x(" Close ")])),_:1},8,["onClick"]),n.newMetadata?(k(),D(y,{key:0,variant:"flat","data-test":"new-event",onClick:e[1]||(e[1]=E=>i.showMetadataCreate=!0)},{default:c(()=>e[13]||(e[13]=[x(" New Metadata ")])),_:1})):L("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"]),i.showActivityUpdate?(k(),D(O,{key:0,modelValue:i.showActivityUpdate,"onUpdate:modelValue":e[3]||(e[3]=E=>i.showActivityUpdate=E),activity:i.editActivity,"time-zone":n.timeZone,onUpdate:r.updateActivity},null,8,["modelValue","activity","time-zone","onUpdate"])):L("",!0),i.showMetadataUpdate?(k(),D(P,{key:1,modelValue:i.showMetadataUpdate,"onUpdate:modelValue":e[4]||(e[4]=E=>i.showMetadataUpdate=E),metadata:i.editMetadata,"time-zone":n.timeZone,onUpdate:r.updateMetadata},null,8,["modelValue","metadata","time-zone","onUpdate"])):L("",!0),i.showNoteUpdate?(k(),D(q,{key:2,modelValue:i.showNoteUpdate,"onUpdate:modelValue":e[5]||(e[5]=E=>i.showNoteUpdate=E),note:i.editNote,"time-zone":n.timeZone,onUpdate:r.updateNote},null,8,["modelValue","note","time-zone","onUpdate"])):L("",!0),i.showMetadataCreate?(k(),D(P,{key:3,modelValue:i.showMetadataCreate,"onUpdate:modelValue":e[6]||(e[6]=E=>i.showMetadataCreate=E),"time-zone":n.timeZone,onUpdate:r.addMetadata},null,8,["modelValue","time-zone","onUpdate"])):L("",!0)])}const $u=re(Fu,[["render",ju]]),Hu={props:{question:{type:String,required:!0},default:{type:String,default:null},password:{type:Boolean,default:!1},answerRequired:{type:Boolean,default:!0},modelValue:Boolean},data(){return{inputValue:"",valid:!1,rules:[t=>!!t||"Required"]}},created(){this.default&&(this.valid=!0,this.inputValue=this.default),this.answerRequired===!1&&(this.valid=!0,this.rules=[t=>!0])},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{submitHandler:function(){this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","Cancel")}}},Wu={class:"pa-2"},Gu={class:"question"};function Ju(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-toolbar"),u=p("v-text-field"),d=p("v-card-text"),h=p("v-btn"),f=p("v-card-actions"),g=p("v-form"),b=p("v-card"),y=p("v-dialog");return k(),D(y,{persistent:"",modelValue:r.show,"onUpdate:modelValue":e[2]||(e[2]=m=>r.show=m),width:"600"},{default:c(()=>[a(b,null,{default:c(()=>[a(g,{modelValue:i.valid,"onUpdate:modelValue":e[1]||(e[1]=m=>i.valid=m),onSubmit:ye(r.submitHandler,["prevent"])},{default:c(()=>[a(l,{height:"24"},{default:c(()=>[a(o),e[3]||(e[3]=v("span",null," User Input Required ",-1)),a(o)]),_:1}),v("div",Wu,[a(d,null,{default:c(()=>[v("div",Gu,I(n.question),1),a(u,{modelValue:i.inputValue,"onUpdate:modelValue":e[0]||(e[0]=m=>i.inputValue=m),autofocus:"","data-test":"ask-value-input",type:n.password?"password":"text",rules:i.rules},null,8,["modelValue","type","rules"])]),_:1})]),a(f,{class:"px-2"},{default:c(()=>[a(o),a(h,{onClick:r.cancelHandler,variant:"outlined","data-test":"ask-cancel"},{default:c(()=>e[4]||(e[4]=[x(" Cancel ")])),_:1},8,["onClick"]),a(h,{onClick:ye(r.submitHandler,["prevent"]),variant:"flat",type:"submit","data-test":"ask-ok",disabled:!i.valid},{default:c(()=>e[5]||(e[5]=[x(" Ok ")])),_:1},8,["onClick","disabled"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue"])}const Yu=oe(Hu,[["render",Ju],["__scopeId","data-v-b44e26bc"]]),Ku={props:{title:{type:String,required:!0},message:{type:String,default:null},filter:{type:String,default:"*"},multiple:{type:Boolean,default:!1},modelValue:Boolean},data(){return{inputValue:null,valid:null,fileInputRules:[t=>!!(t!=null&&t.length)||"Required"]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{submitHandler:function(){Array.isArray(this.inputValue)||(this.inputValue=[this.inputValue]),this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","Cancel")}}},Xu={class:"pa-2"},Zu={class:"title"},Qu=["textContent"];function ed(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-toolbar"),u=p("v-row"),d=p("v-file-input"),h=p("v-card-text"),f=p("v-btn"),g=p("v-card-actions"),b=p("v-form"),y=p("v-card"),m=p("v-dialog");return k(),D(m,{persistent:"",modelValue:r.show,"onUpdate:modelValue":e[2]||(e[2]=S=>r.show=S),width:"600"},{default:c(()=>[a(y,null,{default:c(()=>[a(b,{modelValue:i.valid,"onUpdate:modelValue":e[1]||(e[1]=S=>i.valid=S),onSubmit:ye(r.submitHandler,["prevent"])},{default:c(()=>[a(l,{height:"24"},{default:c(()=>[a(o),e[3]||(e[3]=v("span",null," File Dialog ",-1)),a(o)]),_:1}),v("div",Xu,[a(h,null,{default:c(()=>[a(u,null,{default:c(()=>[v("span",Zu,I(n.title),1)]),_:1}),n.message?(k(),D(u,{key:0},{default:c(()=>[v("span",{class:"ma-3",style:{"white-space":"pre-line"},textContent:I(n.message)},null,8,Qu)]),_:1})):L("",!0),a(u,{class:"my-1"},{default:c(()=>[a(d,{label:"Choose File",modelValue:i.inputValue,"onUpdate:modelValue":e[0]||(e[0]=S=>i.inputValue=S),rules:i.fileInputRules,autofocus:"","data-test":"file-input",accept:n.filter,"small-chips":"",multiple:n.multiple},null,8,["modelValue","rules","accept","multiple"])]),_:1})]),_:1})]),a(g,{class:"px-2"},{default:c(()=>[a(o),a(f,{onClick:r.cancelHandler,variant:"outlined","data-test":"file-cancel"},{default:c(()=>e[4]||(e[4]=[x(" Cancel ")])),_:1},8,["onClick"]),a(f,{onClick:ye(r.submitHandler,["prevent"]),variant:"flat",type:"submit","data-test":"file-ok",disabled:!i.valid},{default:c(()=>e[5]||(e[5]=[x(" Ok ")])),_:1},8,["onClick","disabled"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue"])}const td=oe(Ku,[["render",ed],["__scopeId","data-v-249a9bb3"]]),nd={props:{modelValue:{type:Boolean,required:!0},title:{type:String,required:!0},text:{type:String,required:!0},width:{type:String,required:!0}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{}},sd=["textContent"],id={class:"pa-2"},rd=["textContent"];function od(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-toolbar"),u=p("v-row"),d=p("v-card-text"),h=p("v-btn"),f=p("v-card-actions"),g=p("v-card"),b=p("v-dialog");return k(),D(b,{modelValue:r.show,"onUpdate:modelValue":e[1]||(e[1]=y=>r.show=y),width:n.width},{default:c(()=>[a(g,null,{default:c(()=>[a(l,{height:"24"},{default:c(()=>[a(o),v("span",{style:{"white-space":"pre-line"},textContent:I(n.title)},null,8,sd),a(o)]),_:1}),v("div",id,[a(d,null,{default:c(()=>[(k(!0),A(te,null,le(n.text,(y,m)=>(k(),D(u,{"no-gutters":"",key:m},{default:c(()=>[v("span",{style:{"white-space":"pre-line"},textContent:I(y)},null,8,rd)]),_:2},1024))),128))]),_:1})]),a(f,{class:"px-2"},{default:c(()=>[a(o),a(h,{variant:"flat",onClick:e[0]||(e[0]=y=>r.show=!r.show)},{default:c(()=>e[2]||(e[2]=[x(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}const ad=oe(nd,[["render",od]]),ld={components:{},props:{modelValue:{type:Boolean,required:!0}},data(){return{api:null,overrides:[],search:"",headers:[{text:"Target",value:"target_name"},{text:"Packet",value:"packet_name"},{text:"Item",value:"item_name"},{text:"Type",value:"value_type"},{text:"Value",value:"value"},{text:"Delete",value:"delete"}]}},created:function(){this.api=new _n,this.getOverrides()},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{getOverrides:function(){this.api.get_overrides().then(t=>{this.overrides=t})},clearOverrides:function(){const t=[...new Map(this.overrides.map(e=>[`${e.target_name}__${e.packet_name}__${e.item_name}`,e])).values()];for(let e of t)this.api.normalize_tlm(e.target_name,e.packet_name,e.item_name,"ALL").then(n=>{this.overrides=[]})},deleteOverride:function(t){this.api.normalize_tlm(t.target_name,t.packet_name,t.item_name,t.value_type).then(e=>{let n=this.overrides.indexOf(t);this.overrides.splice(n,1)})}}},cd={class:"pa-2"};function ud(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-toolbar"),u=p("v-btn"),d=p("v-text-field"),h=p("v-row"),f=p("v-icon"),g=p("v-tooltip"),b=p("v-data-table"),y=p("v-card-text"),m=p("v-card-actions"),S=p("v-card"),T=p("v-dialog");return k(),D(T,{modelValue:r.show,"onUpdate:modelValue":e[2]||(e[2]=O=>r.show=O),width:"1000"},{default:c(()=>[a(S,null,{default:c(()=>[a(l,{height:"24"},{default:c(()=>[a(o),e[3]||(e[3]=v("span",null,"Overrides",-1)),a(o)]),_:1}),v("div",cd,[a(y,null,{default:c(()=>[a(h,{class:"ma-1"},{default:c(()=>[a(u,{onClick:r.clearOverrides,color:"primary","data-test":"overrides-dialog-clear-all"},{default:c(()=>e[4]||(e[4]=[x(" Clear All Overrides ")])),_:1},8,["onClick"]),a(o),a(d,{modelValue:i.search,"onUpdate:modelValue":e[0]||(e[0]=O=>i.search=O),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1}),a(b,{headers:i.headers,items:i.overrides,search:i.search,"items-per-page-options":[100],"multi-sort":"",density:"compact"},{"item.delete":c(({item:O})=>[a(g,{location:"top"},{activator:c(({props:P})=>[a(f,ie({onClick:q=>r.deleteOverride(O)},P),{default:c(()=>e[5]||(e[5]=[x(" mdi-delete ")])),_:2},1040,["onClick"])]),default:c(()=>[e[6]||(e[6]=v("span",null,"Delete Override",-1))]),_:2},1024)]),_:1},8,["headers","items","search"])]),_:1})]),a(m,{class:"px-2"},{default:c(()=>[a(o),a(u,{variant:"flat",onClick:e[1]||(e[1]=O=>r.show=!r.show),"data-test":"overrides-dialog-ok"},{default:c(()=>e[7]||(e[7]=[x(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const dd=oe(ld,[["render",ud]]),hd={props:{title:{type:String,default:"Prompt Dialog"},subtitle:{type:String,default:""},message:{type:String,required:!0},details:{type:String,default:""},buttons:{type:Array,default:()=>[]},layout:{type:String,default:"horizontal"},multiple:{type:Boolean,default:!1,required:!1},modelValue:Boolean},data(){return{selectOkDisabled:!0,selectedItem:null}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},layoutClass(){let t="px-2 d-flex align-start";return this.layout==="vertical"?`${t} flex-column`:`${t} flex-row`}},methods:{submitWrapper:function(t){this.selectedItem=t,this.submitHandler()},submitHandler:function(){this.$emit("response",this.selectedItem)},cancelHandler:function(){this.$emit("response","Cancel")}}},pd=["textContent"],md={class:"pa-2"},fd=["textContent"],gd=["textContent"],bd={key:0},yd={key:1};function wd(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-toolbar"),u=p("v-card-subtitle"),d=p("v-row"),h=p("v-card-text"),f=p("v-select"),g=p("v-btn"),b=p("v-card-actions"),y=p("v-card"),m=p("v-dialog");return k(),D(m,{persistent:"",modelValue:r.show,"onUpdate:modelValue":e[2]||(e[2]=S=>r.show=S),width:"600"},{default:c(()=>[a(y,null,{default:c(()=>[a(l,{height:"24"},{default:c(()=>[a(o),v("span",{class:"text",textContent:I(n.title)},null,8,pd),a(o)]),_:1}),v("div",md,[a(h,{class:"text"},{default:c(()=>[n.subtitle?(k(),D(d,{key:0},{default:c(()=>[a(u,null,{default:c(()=>[x(I(n.subtitle),1)]),_:1})]),_:1})):L("",!0),a(d,{class:"mt-1"},{default:c(()=>[v("span",{textContent:I(n.message)},null,8,fd)]),_:1}),n.details?(k(),D(d,{key:1,class:"mt-1"},{default:c(()=>[v("span",{textContent:I(n.details)},null,8,gd)]),_:1})):L("",!0)]),_:1})]),n.layout==="combo"?(k(),A("div",bd,[a(d,{class:"ma-2"},{default:c(()=>[a(f,{"onUpdate:modelValue":[e[0]||(e[0]=S=>i.selectOkDisabled=!1),e[1]||(e[1]=S=>i.selectedItem=S)],modelValue:i.selectedItem,label:"Select",color:"secondary",class:"ma-1","data-test":"prompt-select",items:n.buttons,multiple:n.multiple===!0},null,8,["modelValue","items","multiple"])]),_:1}),a(b,{class:"px-2"},{default:c(()=>[a(o),a(g,{onClick:r.cancelHandler,variant:"outlined","data-test":"prompt-cancel"},{default:c(()=>e[3]||(e[3]=[x(" Cancel ")])),_:1},8,["onClick"]),a(g,{variant:"flat",onClick:r.submitHandler,"data-test":"prompt-ok",disabled:i.selectOkDisabled},{default:c(()=>e[4]||(e[4]=[x(" Ok ")])),_:1},8,["onClick","disabled"])]),_:1})])):(k(),A("div",yd,[a(b,{class:Lt(r.layoutClass)},{default:c(()=>[a(o),a(g,{onClick:r.cancelHandler,variant:"outlined","data-test":"prompt-cancel"},{default:c(()=>e[5]||(e[5]=[x(" Cancel ")])),_:1},8,["onClick"]),(k(!0),A(te,null,le(n.buttons,(S,T)=>(k(),A("div",{key:T},[a(g,{variant:"flat",onClick:O=>r.submitWrapper(S.value),"data-test":`prompt-${S.text}`},{default:c(()=>[x(I(S.text),1)]),_:2},1032,["onClick","data-test"])]))),128))]),_:1},8,["class"])]))]),_:1})]),_:1},8,["modelValue"])}const _d=oe(hd,[["render",wd],["__scopeId","data-v-b04397fe"]]),vd={components:{},props:{modelValue:{type:Boolean,required:!0},text:{type:String,required:!0}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted(){setTimeout(()=>{this.$refs.okButton.$el.focus()})},methods:{downloadResults(){const t=new Blob([this.text],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",Ke(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_suite_results.txt"),e.click()}}},Sd={class:"pa-2"};function kd(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-toolbar"),u=p("v-textarea"),d=p("v-card-text"),h=p("v-btn"),f=p("v-card-actions"),g=p("v-card"),b=p("v-dialog");return k(),D(b,{modelValue:r.show,"onUpdate:modelValue":e[1]||(e[1]=y=>r.show=y),scrollable:"",width:"800"},{default:c(()=>[a(g,null,{default:c(()=>[a(l,{height:"24"},{default:c(()=>[a(o),e[2]||(e[2]=v("span",null," Script Results ",-1)),a(o)]),_:1}),v("div",Sd,[a(d,{style:{width:"100%","max-height":"80vh",overflow:"auto"}},{default:c(()=>[a(u,{readonly:"","hide-details":"",density:"compact","auto-grow":"","model-value":n.text},null,8,["model-value"])]),_:1})]),a(f,{class:"px-2"},{default:c(()=>[a(o),a(h,{variant:"outlined",onClick:r.downloadResults},{default:c(()=>e[3]||(e[3]=[x(" Download ")])),_:1},8,["onClick"]),a(h,{variant:"flat",onClick:e[0]||(e[0]=y=>r.show=!r.show),ref:"okButton"},{default:c(()=>e[4]||(e[4]=[x(" Ok ")])),_:1},512)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const xd=oe(vd,[["render",kd]]),Ed={components:{EnvironmentChooser:Bn},props:{modelValue:{type:Boolean,required:!0},inputEnvironment:{type:Array,required:!0}},data(){return{selected:[]}},mounted:function(){this.loadEnvironment()},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{loadEnvironment:function(){this.selected=[...this.inputEnvironment]},updateEnvironment:function(){this.$emit("environment",this.selected),this.show=!this.show},cancel:function(){this.show=!this.show}}},Cd={class:"pa-2"};function Od(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-toolbar"),u=p("environment-chooser"),d=p("v-card-text"),h=p("v-btn"),f=p("v-card-actions"),g=p("v-card"),b=p("v-dialog");return k(),D(b,{modelValue:r.show,"onUpdate:modelValue":e[1]||(e[1]=y=>r.show=y),width:"600"},{default:c(()=>[a(g,null,{default:c(()=>[a(l,{height:"24"},{default:c(()=>[a(o),e[2]||(e[2]=v("span",null,"Script Environment Variables",-1)),a(o)]),_:1}),v("div",Cd,[a(d,null,{default:c(()=>[a(u,{modelValue:i.selected,"onUpdate:modelValue":e[0]||(e[0]=y=>i.selected=y)},null,8,["modelValue"])]),_:1})]),a(f,{class:"px-2"},{default:c(()=>[a(o),a(h,{onClick:r.cancel,variant:"outlined","data-test":"environment-dialog-cancel"},{default:c(()=>e[3]||(e[3]=[x(" Cancel ")])),_:1},8,["onClick"]),a(h,{onClick:r.updateEnvironment,variant:"flat","data-test":"environment-dialog-save",disabled:!!t.inputError},{default:c(()=>e[4]||(e[4]=[x(" Save ")])),_:1},8,["onClick","disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Td=oe(Ed,[["render",Od]]),Rd={props:{suiteMap:{type:Object,required:!0},disableButtons:{type:Boolean,required:!0},filename:{type:String,required:!0}},data(){return{suites:[],groups:[],scripts:[],suite:"",group:"",script:"",options:["pauseOnError","manual","continueAfterError"],userInfo:{}}},computed:{checkedManualTooltip(){return this.filename.endsWith(".py")?"Checked sets the RunningScript.manual variable to True":"Checked sets the $manual variable to true"},uncheckedManualTooltip(){return this.filename.endsWith(".py")?"Unchecked sets the RunningScript.manual variable to False":"Unchecked sets the $manual variable to false"},setupSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].setup)},teardownSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].teardown)},setupGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].setup)},teardownGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].teardown)},scriptNames(){return this.scripts.map(t=>({title:t.replace(/^(script_|test_)/,""),value:t}))}},created(){this.userInfo=JSON.parse(localStorage.script_runner__userinfo),this.initSuites(),this.$emit("loaded")},watch:{suiteMap:{handler:function(t,e){this.updateSuiteMap()},deep:!0}},methods:{updateSuiteMap(){this.suites=Object.keys(this.suiteMap),this.suiteMap[this.suite]==null||this.suiteMap[this.suite].groups[this.group]==null?this.initSuites():(this.groups=Object.keys(this.suiteMap[this.suite].groups),this.scripts=this.suiteMap[this.suite].groups[this.group].scripts)},initSuites(){this.suites=Object.keys(this.suiteMap),this.suiteChanged(this.suites[0])},suiteChanged(t){this.suite=t,this.group="",this.script="",this.groups=Object.keys(this.suiteMap[t].groups),this.groupChanged(this.groups[0])},groupChanged(t){this.group=t,this.script="",this.scripts=this.suiteMap[this.suite].groups[t].scripts,this.scriptChanged(this.scripts[0])},scriptChanged(t){this.script=t}}},Pd={id:"tr-container"};function Dd(t,e,n,s,i,r){const o=p("v-checkbox"),l=p("v-tooltip"),u=p("v-col"),d=p("v-row"),h=p("v-select"),f=p("v-btn");return k(),A("div",null,[v("div",Pd,[a(d,{"no-gutters":"",align:"center"},{default:c(()=>[a(u,{cols:"4"},{default:c(()=>[a(d,{"no-gutters":""},{default:c(()=>[a(u,{cols:"6"},{default:c(()=>[a(l,{location:"top"},{activator:c(({props:g})=>[v("div",G(J(g)),[a(o,{modelValue:i.options,"onUpdate:modelValue":e[0]||(e[0]=b=>i.options=b),label:"Pause on Error",value:"pauseOnError","hide-details":"","data-test":"pause-on-error"},null,8,["modelValue"])],16)]),default:c(()=>[e[16]||(e[16]=v("span",null,[x("Checked pauses the script when an error is encountered"),v("br"),x("Unchecked continues without user interaction")],-1))]),_:1})]),_:1}),a(u,{cols:"6"},{default:c(()=>[a(l,{location:"top"},{activator:c(({props:g})=>[v("div",G(J(g)),[a(o,{modelValue:i.options,"onUpdate:modelValue":e[1]||(e[1]=b=>i.options=b),label:"Manual",value:"manual","hide-details":"","data-test":"manual"},null,8,["modelValue"])],16)]),default:c(()=>[v("span",null,[x(I(r.checkedManualTooltip),1),e[17]||(e[17]=v("br",null,null,-1)),x(I(r.uncheckedManualTooltip),1)])]),_:1})]),_:1})]),_:1})]),_:1}),a(u,{cols:"8"},{default:c(()=>[a(d,{"no-gutters":"",justify:"end"},{default:c(()=>[a(u,{cols:"5"},{default:c(()=>[a(h,{label:"Suite:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined","onUpdate:modelValue":[r.suiteChanged,e[2]||(e[2]=g=>i.suite=g)],items:i.suites,modelValue:i.suite,"data-test":"select-suite"},null,8,["onUpdate:modelValue","items","modelValue"])]),_:1}),a(u,{cols:"auto"},{default:c(()=>[a(f,{color:"primary",class:"mr-2",disabled:n.disableButtons||!i.userInfo.execute,onClick:e[3]||(e[3]=g=>t.$emit("button",{method:"start",suite:i.suite,options:i.options})),"data-test":"start-suite"},{default:c(()=>e[18]||(e[18]=[x(" Start ")])),_:1},8,["disabled"]),a(f,{color:"primary",class:"mr-2",onClick:e[4]||(e[4]=g=>t.$emit("button",{method:"setup",suite:i.suite,options:i.options})),"data-test":"setup-suite",disabled:n.disableButtons||!r.setupSuiteEnabled||!i.userInfo.execute},{default:c(()=>e[19]||(e[19]=[x(" Setup ")])),_:1},8,["disabled"]),a(f,{color:"primary",onClick:e[5]||(e[5]=g=>t.$emit("button",{method:"teardown",suite:i.suite,options:i.options})),"data-test":"teardown-suite",disabled:n.disableButtons||!r.teardownSuiteEnabled||!i.userInfo.execute},{default:c(()=>e[20]||(e[20]=[x(" Teardown ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),a(d,{"no-gutters":""},{default:c(()=>[a(u,{cols:"4"},{default:c(()=>[a(d,{"no-gutters":""},{default:c(()=>[a(u,{cols:"6"},{default:c(()=>[a(l,{location:"top"},{activator:c(({props:g})=>[v("div",G(J(g)),[a(o,{modelValue:i.options,"onUpdate:modelValue":e[6]||(e[6]=b=>i.options=b),label:"Continue after Error",value:"continueAfterError","hide-details":"","data-test":"continue-after-error"},null,8,["modelValue"])],16)]),default:c(()=>[e[21]||(e[21]=v("span",null,[x("Checked allows the script to continue when an error is encountered"),v("br"),x("Unchecked forces the current script to end")],-1))]),_:1})]),_:1}),a(u,{cols:"6"},{default:c(()=>[a(l,{location:"top"},{activator:c(({props:g})=>[v("div",G(J(g)),[a(o,{modelValue:i.options,"onUpdate:modelValue":e[7]||(e[7]=b=>i.options=b),label:"Loop",value:"loop","hide-details":"","data-test":"loop"},null,8,["modelValue"])],16)]),default:c(()=>[e[22]||(e[22]=v("span",null,[x("Checked continuously executes until explicitly stopped"),v("br"),x(" Unchecked executes only the started script(s)")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),a(u,{cols:"8"},{default:c(()=>[a(d,{"no-gutters":"",justify:"end"},{default:c(()=>[a(u,{cols:"5"},{default:c(()=>[a(h,{label:"Group:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined","onUpdate:modelValue":[r.groupChanged,e[8]||(e[8]=g=>i.group=g)],items:i.groups,modelValue:i.group,"data-test":"select-group"},null,8,["onUpdate:modelValue","items","modelValue"])]),_:1}),a(u,{cols:"auto"},{default:c(()=>[a(f,{color:"primary",class:"mr-2",disabled:n.disableButtons||!i.userInfo.execute,onClick:e[9]||(e[9]=g=>t.$emit("button",{method:"start",suite:i.suite,group:i.group,options:i.options})),"data-test":"start-group"},{default:c(()=>e[23]||(e[23]=[x(" Start ")])),_:1},8,["disabled"]),a(f,{color:"primary",class:"mr-2",onClick:e[10]||(e[10]=g=>t.$emit("button",{method:"setup",suite:i.suite,group:i.group,options:i.options})),"data-test":"setup-group",disabled:n.disableButtons||!r.setupGroupEnabled||!i.userInfo.execute},{default:c(()=>e[24]||(e[24]=[x(" Setup ")])),_:1},8,["disabled"]),a(f,{color:"primary",onClick:e[11]||(e[11]=g=>t.$emit("button",{method:"teardown",suite:i.suite,group:i.group,options:i.options})),"data-test":"teardown-group",disabled:n.disableButtons||!r.teardownGroupEnabled||!i.userInfo.execute},{default:c(()=>e[25]||(e[25]=[x(" Teardown ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),a(d,{"no-gutters":""},{default:c(()=>[a(u,{cols:"4"},{default:c(()=>[a(d,{"no-gutters":""},{default:c(()=>[a(u,{cols:"6"},{default:c(()=>[a(l,{location:"top"},{activator:c(({props:g})=>[v("div",G(J(g)),[a(o,{modelValue:i.options,"onUpdate:modelValue":e[12]||(e[12]=b=>i.options=b),label:"Abort after Error",value:"abortAfterError","hide-details":"","data-test":"abort-after-error"},null,8,["modelValue"])],16)]),default:c(()=>[e[26]||(e[26]=v("span",null,[x("Checked stops additional script execution when an error is encountered"),v("br"),x(" Unchecked allows additional scripts to execute")],-1))]),_:1})]),_:1}),a(u,{cols:"6"},{default:c(()=>[a(l,{location:"top"},{activator:c(({props:g})=>[v("div",G(J(g)),[a(o,{disabled:!i.options.includes("loop"),modelValue:i.options,"onUpdate:modelValue":e[13]||(e[13]=b=>i.options=b),label:"Break Loop on Error",value:"breakLoopOnError","hide-details":"","data-test":"break-loop-on-error"},null,8,["disabled","modelValue"])],16)]),default:c(()=>[e[27]||(e[27]=v("span",null,[x("Checked breaks the loop option when an error is encountered"),v("br"),x(" Unchecked allows the loop to run continuously"),v("br"),x(" Note: Abort after Error still breaks the loop")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),a(u,{cols:"8"},{default:c(()=>[a(d,{"no-gutters":"",justify:"end"},{default:c(()=>[a(u,{cols:"5"},{default:c(()=>[a(h,{label:"Script:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined","onUpdate:modelValue":[r.scriptChanged,e[14]||(e[14]=g=>i.script=g)],items:r.scriptNames,"item-title":"title","item-value":"value",modelValue:i.script,"data-test":"select-script"},null,8,["onUpdate:modelValue","items","modelValue"])]),_:1}),a(u,{cols:"auto"},{default:c(()=>[a(f,{color:"primary",class:"mr-2",disabled:n.disableButtons||!i.userInfo.execute,onClick:e[15]||(e[15]=g=>t.$emit("button",{method:"start",suite:i.suite,group:i.group,script:i.script,options:i.options})),"data-test":"start-script"},{default:c(()=>e[28]||(e[28]=[x(" Start ")])),_:1},8,["disabled"]),a(f,{color:"primary",class:"mr-2 invisible"},{default:c(()=>e[29]||(e[29]=[x(" Setup ")])),_:1}),a(f,{color:"primary",class:"invisible"},{default:c(()=>e[30]||(e[30]=[x(" Teardown ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])])}const Ad=oe(Rd,[["render",Dd],["__scopeId","data-v-40a2938d"]]),Md={props:{modelValue:{type:Array,required:!0}},data(){return{search:"",headers:[{title:"Message",value:"message",sortable:!1}],messageOrderOptions:["Newest on Top","Newest on Bottom"],messageOrder:"Newest on Top"}},watch:{messageOrder:function(t,e){this.$emit("sort",t)}},computed:{messages:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{messageClass(t){return t.match(/(CHECK|WAIT): .*(success|was within range.*) with value/)?"openc3-green":t.match(/(CHECK|WAIT): .*(failed|failed to be within range.*) with value/)?"openc3-red":""},downloadLog(){const t=this.messages.map(s=>s.message).join(`
|
13
|
+
`),e=new Blob([t],{type:"text/plain"}),n=document.createElement("a");n.href=URL.createObjectURL(e),n.setAttribute("download",Ke(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_sr_message_log.txt"),n.click()},clearLog:function(){this.$dialog.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}).then(t=>{this.messages=[]}).catch(function(t){})}}};function Vd(t,e,n,s,i,r){const o=p("v-btn"),l=p("v-tooltip"),u=p("v-spacer"),d=p("v-select"),h=p("v-text-field"),f=p("v-row"),g=p("v-card-title"),b=p("v-data-table"),y=p("v-card");return k(),A("div",null,[a(y,null,{default:c(()=>[a(g,null,{default:c(()=>[a(f,{class:"pt-2"},{default:c(()=>[a(l,{location:"top"},{activator:c(({props:m})=>[v("div",G(J(m)),[a(o,{icon:"mdi-download",variant:"text",class:"mx-2","data-test":"download-log",onClick:r.downloadLog},null,8,["onClick"])],16)]),default:c(()=>[e[2]||(e[2]=v("span",null," Download Log ",-1))]),_:1}),e[4]||(e[4]=x(" Script Messages ")),a(u),a(d,{density:"compact","hide-details":"",variant:"outlined",items:i.messageOrderOptions,modelValue:i.messageOrder,"onUpdate:modelValue":e[0]||(e[0]=m=>i.messageOrder=m),class:"mr-2",style:{"max-width":"200px"},"data-test":"message-order"},null,8,["items","modelValue"]),a(u),a(h,{modelValue:i.search,"onUpdate:modelValue":e[1]||(e[1]=m=>i.search=m),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search","data-test":"search-messages"},null,8,["modelValue"]),a(l,{location:"top"},{activator:c(({props:m})=>[v("div",G(J(m)),[a(o,{icon:"mdi-delete",variant:"text",class:"mx-2","data-test":"clear-log",onClick:r.clearLog},null,8,["onClick"])],16)]),default:c(()=>[e[3]||(e[3]=v("span",null," Clear Log ",-1))]),_:1})]),_:1})]),_:1}),a(b,{id:"script-log-messages",style:{overflow:"auto"},headers:i.headers,items:r.messages,search:i.search,"items-per-page":-1,"hide-default-footer":"",density:"compact","data-test":"output-messages"},{"item.message":c(({item:m})=>[v("div",{class:Lt(r.messageClass(m.message))},I(m.message),3)]),_:1},8,["headers","items","search"])]),_:1})])}const Ud=oe(Md,[["render",Vd]]),Sn=t=>N.get(`/openc3-api/autocomplete/keywords/${t}`),Nd=t=>N.get(`/openc3-api/autocomplete/data/${t}`),Ui=(t,e)=>t.reduce((n,s)=>{const i=e(s);return n[i]?n[i].push(s):n[i]=[s],n},{}),Id=t=>{const e="(^|[{\\(\\s])",n=`[\\s\\(]f?['"]`,s="(\\S+\\s?){0,3}";return new RegExp(`${e}${t}${n}${s}$`)};class Ni{constructor(e,n=()=>{},s=()=>{}){this.keywordExpressions=[],this.autocompleteData=[],Sn(e).then(i=>{this.keywordExpressions=i.data.map(Id),s()}),Nd(e).then(i=>{this.autocompleteData=i.data,n()})}getCompletions(e,n,s,i,r){let o=[];const l=n.doc.$lines[s.row].slice(0,s.column);this.keywordExpressions.some(u=>l.match(u))&&(o=this.autocompleteData),r(null,[...o])}}class Fd extends Ni{constructor(){super("cmd")}}class Ld extends Ni{constructor(){super("tlm",()=>{this.groupedPacketData=this.autocompleteData.reduce((e,n)=>{const s=n.caption.match(/\S+\s\S+/)[0],i=n.snippet.replace(`${s} `,""),r={caption:i,snippet:i,meta:"item"};return e[s]?e[s].push(r):e[s]=[r],e},{}),this.packets=Object.keys(this.groupedPacketData).map(e=>({caption:e,snippet:e,meta:"packet"}))})}getCompletions(e,n,s,i,r){let o=[];const l=n.doc.$lines[s.row].slice(0,s.column);if(this.keywordExpressions.some(u=>l.match(u))){const u=Object.keys(this.groupedPacketData).find(d=>l.includes(d));u?o=this.groupedPacketData[u]:o=this.packets}r(null,o)}}const Ii=t=>{const e="(^|[{\\(\\s])",n="((\\s.+)|(\\(.+\\)))";return new RegExp(`${e}${t}${n}`)},zd=/\{/,qd=/['"],\s?['"]/;class Bd{constructor(){this.api=new _n,this.targets={},this.api.get_target_names().then(e=>{e.forEach(n=>{this.targets[n]={cmd:null,tlm:null}})}),this.cmdKeywordExpressions=[],Sn("cmd").then(e=>{this.cmdKeywordExpressions=e.data.map(Ii)}),this.tlmKeywordExpressions=[],Sn("tlm").then(e=>{this.tlmKeywordExpressions=e.data.map(Ii)})}async checkText(e){const{linesToCheck:n,linesToSkip:s}=e.split(`
|
14
|
+
`).reduce((r,o,l)=>{if(o=o.trim(),o.match(/^#/))return r;const u=this.cmdKeywordExpressions.reduce((S,T)=>S||o.match(T),null),d=this.tlmKeywordExpressions.reduce((S,T)=>S||o.match(T),null);if(!u&&!d)return r;let h=u||d,f=h.length;h=h[f-1];const g=h.substring(h.match(/[\(\s)]/).index+1).replace(/\)+.*$/,"");if(g.match(zd))return r.linesToSkip.push(l+1),r;const b=!!g.match(qd),y=g.split(b?",":" ");if(y.length<2)return r;const m={target:y[0],packet:y[1]};if(d)m.item=y[2];else{const S=y.slice(2);b?m.params=S.map(T=>T.split("=>")[0]):m.params=S.filter((T,O)=>O%2)}for(const S in m)typeof m[S]=="string"?m[S]=m[S].replace(/['"]/g,"").trim():m[S]=m[S].map(T=>T.replace(/['"]/g,"").trim());return r.linesToCheck.push({line:o,mnemonic:m,lineNumber:l+1}),r},{linesToCheck:[],linesToSkip:[]}),i=await this._checkLines(n);return{skipped:s.sort(),problems:i.sort((r,o)=>r.lineNumber-o.lineNumber)}}async _checkLines(e){const n=[],s=Ui(e,i=>i.mnemonic.target);for(const i in s){if(!this.targets[i]){for(const o of s[i])n.push({...o,error:`Target "${i}" does not exist.`});continue}const r=Ui(s[i],o=>o.mnemonic.packet);for(const o in r)for(const l of r[o]){const u=l.mnemonic.item?"tlm":"cmd";if(!this.targets[i][u]){const h=l.mnemonic.item?"get_all_tlm":"get_all_cmds",f=await this.api[h](i);this.targets[i][u]=f.reduce((g,b)=>(g[b.packet_name]=b.items.map(y=>y.name),g),{})}const d=this.targets[i][u][o];if(!d){n.push({...l,error:`${u==="tlm"?"Packet":"Command"} "${i} ${o}" does not exist.`});continue}if(l.mnemonic.item){if(!d.some(h=>h===l.mnemonic.item)){n.push({...l,error:`Item "${i} ${o} ${l.mnemonic.item}" does not exist.`});continue}}else for(const h of l.mnemonic.params)if(!d.some(f=>f===h)){n.push({...l,error:`Command "${i} ${o}" param "${h}" does not exist.`});continue}}}return n}}class jd{constructor(e,{pattern:n,text:s,type:i}){be(this,Ae);be(this,it);be(this,rt);be(this,ot);be(this,at);Cn(this,"refresh",()=>{const e=ee(this,it).session;ee(this,Ft).call(this,e);const n={lines:e.doc.$lines,action:"insert",start:{row:0},end:{row:e.doc.$lines.length}};this.annotate(n,e)});Cn(this,"annotate",(e,n)=>{var s,i;if(e.lines.length>1)switch(e.action){case"insert":ee(this,ct).call(this,n,e.start.row,e.lines.length-1);break;case"remove":ee(this,ct).call(this,n,e.start.row+1,-e.lines.length+1);break}for(let r=e.start.row;r<=e.end.row;r++){let o=(i=(s=n.doc.$lines[r])==null?void 0:s.match(ee(this,rt)))==null?void 0:i.index;o!==void 0?(o!==0&&(o+=1),ee(this,It).call(this,n,{row:r,column:o,text:ee(this,ot),type:ee(this,at),openc3Id:ee(this,Ae)})):e.action==="remove"&&ee(this,lt).call(this,n,r)}});be(this,It,(e,n)=>{ee(this,lt).call(this,e,n.row),e.setAnnotations([...e.getAnnotations(),n])});be(this,lt,(e,n)=>{e.setAnnotations(e.getAnnotations().filter(s=>s.openc3Id!==ee(this,Ae)||s.row!==n))});be(this,ct,(e,n,s)=>{e.setAnnotations(e.getAnnotations().map(i=>(i.row>n&&(i.row+=s),i)))});be(this,Ft,e=>{e.setAnnotations(e.getAnnotations().filter(n=>n.openc3Id!==ee(this,Ae)))});ze(this,Ae,`regexAnnotator-${Math.floor(Math.random()*1e7)}`),ze(this,it,e),ze(this,rt,n),ze(this,ot,s),ze(this,at,i)}}Ae=new WeakMap,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,at=new WeakMap,It=new WeakMap,lt=new WeakMap,ct=new WeakMap,Ft=new WeakMap;class $d extends jd{constructor(e){const n="(^|[{\\s])",s="sleep",i="[\\(\\s]";super(e,{pattern:new RegExp(`${n}${s}${i}`),text:"Use `wait` instead of `sleep` in OpenC3 scripts",type:"warning"})}}const Hd={props:{tabId:Number,curTab:Number,connectInNewTab:Boolean},components:{OutputDialog:Ji},data(){return{downloadScript:null,runningSearch:"",runningScripts:[],runningHeaders:[{title:"Connect",key:"connect",sortable:!1,filterable:!1},{title:"Id",key:"id"},{title:"User",key:"user"},{title:"Name",key:"name"},{title:"Start Time",key:"start_time"},{title:"Stop",key:"stop",sortable:!1,filterable:!1},{title:"Force Quit",key:"delete",sortable:!1,filterable:!1}],completedSearch:"",completedScripts:[],completedHeaders:[{title:"Id",value:"id"},{title:"User",value:"user"},{title:"Name",value:"name"},{title:"Start Time",value:"start"},{title:"View",value:"view",sortable:!1,filterable:!1},{title:"Download",key:"download",sortable:!1,filterable:!1}],showDialog:!1,dialogName:"",dialogContent:"",dialogFilename:""}},created(){this.getRunningScripts(),this.getCompletedScripts()},methods:{getRunningScripts:function(){N.get("/script-api/running-script").then(t=>{this.runningScripts=t.data})},getCompletedScripts:function(){N.get("/script-api/completed-scripts").then(t=>{this.completedScripts=t.data})},connectScript:function(t){this.$emit("disconnect");const e={name:"ScriptRunner",params:{id:t.id}};if(this.connectInNewTab){let{href:n}=this.$router.resolve(e);window.open(n,"_blank")}else this.$router.push(e),this.$emit("close")},stopScript:function(t){this.$dialog.confirm(`Are you sure you want to stop script: ${t.id} ${t.name}?`,{okText:"Stop",cancelText:"Cancel"}).then(e=>N.post(`/script-api/running-script/${t.id}/stop`)).then(e=>{this.$notify.normal({body:`Stopped script: ${t.id} ${t.name}`}),this.getRunningScripts()}).catch(e=>{e!==!0&&this.$notify.caution({body:`Failed to stop script: ${t.id} ${t.name}`})})},deleteScript:function(t){this.$dialog.confirm(`Are you sure you want to force quit script: ${t.id} ${t.name}?
|
15
|
+
Did you try to stop the script first to allow the script to stop gracefully?`,{okText:"Force Quit",cancelText:"Cancel"}).then(e=>N.post(`/script-api/running-script/${t.id}/delete`)).then(e=>{this.$notify.normal({body:`Stopped script: ${t.id} ${t.name}`}),this.getRunningScripts()}).catch(e=>{e!==!0&&this.$notify.caution({body:`Failed to stop script: ${t.id} ${t.name}`})})},viewScriptLog:function(t){t.name.includes("(")&&t.name.includes(")")?this.dialogName="Report":this.dialogName="Log",N.get(`/openc3-api/storage/download_file/${encodeURIComponent(t.log)}?bucket=OPENC3_LOGS_BUCKET`).then(e=>{const n=t.log.split("/");this.dialogFilename=n[n.length-1],this.dialogContent=window.atob(e.data.contents),this.showDialog=!0})},downloadScriptLog:function(t){this.downloadScript=t,N.get(`/openc3-api/storage/download/${encodeURIComponent(t.log)}?bucket=OPENC3_LOGS_BUCKET`).then(e=>{const n=t.log.split("/"),s=n[n.length-1],i=document.createElement("a");i.href=e.data.url,i.setAttribute("download",s),i.click(),this.downloadScript=null}).catch(()=>{this.$notify.caution({title:`Unable to download log for ${t.name}`,body:`You may be able to download this log manually from the 'logs' bucket at ${t.log}`})})}}},Wd={key:0},Gd={key:1},Jd={key:0},Yd={key:1};function Kd(t,e,n,s,i,r){const o=p("v-spacer"),l=p("v-btn"),u=p("v-text-field"),d=p("v-row"),h=p("v-card-title"),f=p("v-icon"),g=p("v-data-table"),b=p("v-card"),y=p("output-dialog");return k(),A("div",null,[a(b,{flat:""},{default:c(()=>[a(h,null,{default:c(()=>[a(d,{dense:""},{default:c(()=>[e[5]||(e[5]=v("span",{class:"mr-2"},"Running Scripts",-1)),a(o),a(l,{class:"mr-2",color:"primary",onClick:r.getRunningScripts},{default:c(()=>e[4]||(e[4]=[x("Refresh")])),_:1},8,["onClick"]),a(o),a(u,{modelValue:i.runningSearch,"onUpdate:modelValue":e[0]||(e[0]=m=>i.runningSearch=m),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"running-search"},null,8,["modelValue"])]),_:1})]),_:1}),a(g,{headers:i.runningHeaders,items:i.runningScripts,search:i.runningSearch,density:"compact","data-test":"running-scripts","items-per-page-options":[3],"max-height":"400"},{"item.connect":c(({item:m})=>[a(l,{color:"primary",onClick:S=>r.connectScript(m)},{default:c(()=>[e[7]||(e[7]=v("span",null,"Connect",-1)),ve(a(f,{end:""},{default:c(()=>e[6]||(e[6]=[x(" mdi-open-in-new ")])),_:1},512),[[Se,n.connectInNewTab]])]),_:2},1032,["onClick"])]),"item.stop":c(({item:m})=>[a(l,{color:"primary",onClick:S=>r.stopScript(m)},{default:c(()=>[e[9]||(e[9]=v("span",null,"Stop",-1)),a(f,{end:""},{default:c(()=>e[8]||(e[8]=[x(" mdi-close-circle-outline ")])),_:1})]),_:2},1032,["onClick"])]),"item.delete":c(({item:m})=>[a(l,{color:"primary",onClick:S=>r.deleteScript(m)},{default:c(()=>[e[11]||(e[11]=v("span",null,"Delete",-1)),a(f,{end:""},{default:c(()=>e[10]||(e[10]=[x(" mdi-alert-octagon-outline ")])),_:1})]),_:2},1032,["onClick"])]),_:1},8,["headers","items","search"])]),_:1}),a(b,{flat:""},{default:c(()=>[a(h,null,{default:c(()=>[a(d,{dense:""},{default:c(()=>[e[13]||(e[13]=v("span",{class:"mr-2"},"Completed Scripts",-1)),a(o),a(l,{color:"primary",onClick:r.getCompletedScripts},{default:c(()=>e[12]||(e[12]=[x("Refresh")])),_:1},8,["onClick"]),a(o),a(u,{modelValue:i.completedSearch,"onUpdate:modelValue":e[1]||(e[1]=m=>i.completedSearch=m),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1})]),_:1}),a(g,{headers:i.completedHeaders,items:i.completedScripts,search:i.completedSearch,density:"compact","data-test":"completed-scripts","items-per-page-options":[5]},{"item.view":c(({item:m})=>[a(l,{color:"primary",onClick:S=>r.viewScriptLog(m)},{default:c(()=>[m.name.includes("(")&&m.name.includes(")")?(k(),A("span",Wd," Script Report ")):(k(),A("span",Gd," Script Log ")),a(f,{right:""},{default:c(()=>e[14]||(e[14]=[x(" mdi-eye ")])),_:1})]),_:2},1032,["onClick"])]),"item.download":c(({item:m})=>[a(l,{disabled:i.downloadScript,loading:i.downloadScript&&i.downloadScript.name===m.name,onClick:S=>r.downloadScriptLog(m)},{loader:c(()=>e[16]||(e[16]=[v("span",null," Loading... ",-1)])),default:c(()=>[m.name.includes("(")&&m.name.includes(")")?(k(),A("span",Jd," Script Report ")):(k(),A("span",Yd," Script Log ")),a(f,{end:""},{default:c(()=>e[15]||(e[15]=[x(" mdi-file-download-outline ")])),_:1})]),_:2},1032,["disabled","loading","onClick"])]),_:1},8,["headers","items","search"])]),_:1}),i.showDialog?(k(),D(y,{key:0,content:i.dialogContent,type:"Script",name:i.dialogName,filename:i.dialogFilename,modelValue:i.showDialog,"onUpdate:modelValue":e[2]||(e[2]=m=>i.showDialog=m),onSubmit:e[3]||(e[3]=m=>i.showDialog=!1)},null,8,["content","name","filename","modelValue"])):L("",!0)])}const Xd=oe(Hd,[["render",Kd]]),kn="__TEMP__",ge="<Untitled>",xn="Start",Zd="Go",st="Pause",Qd="Retry",eh={components:{FileOpenSaveDialog:In,Openc3Screen:Nn,EnvironmentDialog:Un,Splitpanes:za,Pane:$a,TopBar:ur,AskDialog:Yu,FileDialog:td,InformationDialog:ad,EventListDialog:$u,OverridesDialog:dd,PromptDialog:_d,ResultsDialog:xd,ScriptEnvironmentDialog:Td,SimpleTextDialog:or,SuiteRunner:Ad,RunningScripts:Xd,ScriptLogMessages:Ud,CriticalCmdDialog:zn},mixins:[qn],data(){return{title:"Script Runner",suiteRunner:!1,disableSuiteButtons:!1,suiteMap:{},filenameSelect:null,currentFilename:null,showSave:!1,showAlert:!1,alertType:null,alertText:"",state:null,scriptId:null,startOrGoButton:xn,startOrGoDisabled:!1,envDisabled:!1,pauseOrRetryButton:st,pauseOrRetryDisabled:!1,stopDisabled:!1,showEnvironment:!1,showDebug:!1,debug:"",debugHistory:[],debugHistoryIndex:0,showDisconnect:!1,files:{},breakpoints:{},enableStackTraces:!1,filename:ge,readOnlyUser:!1,executeUser:!0,saveAllowed:!0,tempFilename:null,fileModified:"",fileOpen:!1,lockedBy:null,showEditingToast:!1,showSaveAs:!1,areYouSure:!1,subscription:null,cable:null,fatal:!1,updateInterval:null,receivedEvents:[],messages:[],messagesNewestOnTop:!0,maxArrayLength:200,Range:ace.require("ace/range").Range,ask:{show:!1,question:"",default:null,password:!1,answerRequired:!0,callback:()=>{}},file:{show:!1,message:"",directory:null,filter:"*",multiple:!1,callback:()=>{}},prompt:{show:!1,title:"",subtitle:"",message:"",details:"",buttons:null,layout:"horizontal",callback:()=>{}},information:{show:!1,title:"",text:[],width:"600"},inputMetadata:{show:!1,events:[],callback:()=>{}},results:{show:!1,text:""},scriptEnvironment:{show:!1,env:[]},showSuiteError:!1,suiteError:"",executeSelectionMenu:!1,menuX:0,menuY:0,mnemonicChecker:new Bd,showScripts:!1,showOverrides:!1,activePromptId:"",api:null,timeZone:"local",screens:[],screenKeywords:null,idCounter:0,updateCounter:0,recent:[],waitingInterval:null,waitingTime:0,waitingStart:0,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{stateTimer:function(){return this.state==="waiting"||this.state==="paused"?`${this.state} ${this.waitingTime}s`:this.state},fileList:function(){const t=Object.keys(this.files);return t.push(this.fullFilename),[...new Set(t)]},environmentIcon:function(){return this.scriptEnvironment.env.length>0?"mdi-bookmark":"mdi-bookmark-outline"},environmentIconColor:function(){return this.scriptEnvironment.env.length>0?"primary":""},isLocked:function(){return!!this.lockedBy},fullFilename:function(){return this.currentFilename?this.currentFilename:this.filename===ge?ge:`${this.filename} ${this.fileModified}`.trim()},filenameOrBlank:function(){return this.filename===ge?"":this.filename},menus:function(){return[{label:"File",items:[{label:"New File",icon:"mdi-file-plus",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.newFile()}},{label:"New Suite",icon:"mdi-file-document-plus",disabled:this.scriptId||this.readOnlyUser,subMenu:[{label:"Ruby",icon:"mdi-language-ruby",command:()=>{this.newRubyTestSuite()}},{label:"Python",icon:"mdi-language-python",command:()=>{this.newPythonTestSuite()}}]},{label:"Open File",icon:"mdi-folder-open",disabled:this.scriptId,command:()=>{this.openFile()}},{label:"Open Recent",icon:"mdi-folder-open",disabled:this.scriptId,subMenu:this.recent},{divider:!0},{label:"Save File",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveFile()}},{label:"Save As...",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveAs()}},{divider:!0},{label:"Download",icon:"mdi-cloud-download",disabled:this.scriptId,command:()=>{this.download()}},{divider:!0},{label:"Delete File",icon:"mdi-delete",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.delete()}}]},{label:"Edit",items:[{label:"Find",icon:"mdi-magnify",command:()=>{this.editor.execCommand("find")}},{label:"Replace",icon:"mdi-find-replace",disabled:this.scriptId,command:()=>{this.editor.execCommand("replace")}},{label:"Set Line Delay",icon:"mdi-invoice-text-clock",disabled:this.scriptId,command:()=>{this.$dialog.open({title:"Info",text:"You can set the line delay in seconds using the api method set_line_delay().<br/><br/>The default line delay is 0.1 seconds between lines. Adding set_line_delay(0) to the top of your script will execute the script at maximum speed. However, this can make it difficult to see and pause the script. Executing set_line_delay(1) will cause a 1 second delay between lines.",okText:"OK",okClass:"primary",validateText:null,cancelText:null,html:!0})}}]},{label:"Script",items:[{label:"Execution Status",icon:"mdi-run",command:()=>{this.showScripts=!0}},{divider:!0},{label:"Global Environment",icon:"mdi-library",disabled:this.scriptId,command:()=>{this.showEnvironment=!this.showEnvironment}},{label:"Metadata",icon:"mdi-calendar",disabled:this.scriptId,command:()=>{this.inputMetadata.callback=()=>{},this.showMetadata()}},{label:"Overrides",icon:"mdi-swap-horizontal",command:()=>{this.showOverrides=!0}},{divider:!0},{label:"Syntax Check",icon:"mdi-file-check",disabled:this.scriptId,command:()=>{this.syntaxCheck()}},{label:"Mnemonic Check",icon:"mdi-spellcheck",disabled:this.scriptId,command:()=>{this.checkMnemonics()}},{label:"Instrumented Script",icon:"mdi-code-braces-box",disabled:this.scriptId,command:()=>{this.showInstrumented()}},{label:"Call Stack",icon:"mdi-format-list-numbered",disabled:!this.scriptId,command:()=>{this.showCallStack()}},{divider:!0},{label:"Toggle Debug",icon:"mdi-bug",command:()=>{this.toggleDebug()}},{label:"Toggle Disconnect",icon:"mdi-connection",disabled:this.scriptId,command:()=>{this.toggleDisconnect()}},{label:"Enable Stack Traces",checkbox:!0,checked:this.enableStackTraces,disabled:this.scriptId,command:()=>{this.enableStackTraces=!this.enableStackTraces}},{divider:!0},{label:"Delete All Breakpoints",icon:"mdi-delete-circle-outline",disabled:this.scriptId,command:()=>{this.deleteAllBreakpoints()}}]}]},executeSelectionMenuItems:function(){return[{label:"Execute selection",command:this.executeSelection},{label:"Run from here",command:this.runFromCursor},{label:"Clear local breakpoints",command:this.clearBreakpoints}]}},watch:{isLocked:function(t){this.showEditingToast=t,this.suiteRunner||(this.startOrGoDisabled=t),this.readOnlyUser==!1&&t==!1?this.editor.setReadOnly(t):this.editor.setReadOnly(!0)},fullFilename:function(t){this.filenameSelect=t,t===ge?localStorage.removeItem("script_runner__filename"):localStorage.script_runner__filename=t}},created:async function(){this.api=new _n,this.api.ensure_offline_access(),this.api.get_setting("time_zone").then(n=>{n&&(this.timeZone=n)}).catch(n=>{}),this.NEW_FILENAME=ge,window.onbeforeunload=this.unlockFile;let t=OpenC3Auth.user(),e=OpenC3Auth.userroles();this.readOnlyUser=!0,this.executeUser=!1;for(let n of e)n!="viewer"&&(n=="admin"||n=="operator"?(this.readOnlyUser=!1,this.executeUser=!0):n=="runner"?this.executeUser=!0:await N.get(`/openc3-api/roles/${n}`).then(s=>{s.data!==null&&s.data.permissions!==void 0&&(s.data.permissions.some(i=>i.permission=="script_edit")&&(this.readOnlyUser=!1),s.data.permissions.some(i=>i.permission=="script_run")&&(this.executeUser=!0))}));if(localStorage.script_runner__userinfo=JSON.stringify({name:t.preferred_username,readOnly:this.readOnlyUser,execute:this.executeUser}),this.readOnlyUser==!0){this.alertType="info";let n=`User ${t.preferred_username} is read only`;this.executeUser&&(n+=" but can execute scripts"),this.alertText=n,this.showAlert=!0}N.get("/openc3-api/autocomplete/keywords/screen").then(n=>{this.screenKeywords=n.data})},mounted:async function(){var s,i;this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const t=this.buildRubyMode(),e=this.buildPythonMode();this.rubyMode=new t,this.pythonMode=new e,this.editor.session.setMode(this.rubyMode),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new Fd,new Ld],this.editor.setHighlightActiveLine(!1),this.editor.focus(),this.editor.on("guttermousedown",this.toggleBreakpoint),this.editor.session.on("tokenizerUpdate",this.onChange),this.readOnlyUser&&(this.editor.setReadOnly(!0),this.editor.renderer.$cursorLayer.element.style.display="none");const n=new $d(this.editor);this.editor.session.on("change",(r,o)=>{n.annotate(r,o),this.updateBreakpoints(r,o)}),this.editor.container.addEventListener("resize",this.doResize),this.editor.container.addEventListener("keydown",this.keydown),window.addEventListener("resize",this.calcHeight),this.calcHeight(),this.cable=new Qc("/script-api/cable"),localStorage.script_runner__recent&&(this.recent=JSON.parse(localStorage.script_runner__recent),this.recent=this.recent.map(r=>({...r,command:async o=>{this.filename=o.label,await this.reloadFile()}}))),(s=this.$route.query)!=null&&s.file?(this.filename=this.$route.query.file,await this.reloadFile()):(i=this.$route.params)!=null&&i.id?await this.tryLoadRunningScript(this.$route.params.id):localStorage.script_runner__filename&&(this.filename=localStorage.script_runner__filename,await this.reloadFile(!1)),this.updateInterval=setInterval(async()=>{this.processReceived()},100)},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},unmounted(){this.unlockFile(),this.updateInterval!=null&&clearInterval(this.updateInterval),this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.cable.disconnect()},beforeRouteUpdate:function(t,e,n){t.params.id?this.tryLoadRunningScript(t.params.id).then(n):n()},methods:{doResize(){this.editor.resize(),this.$nextTick(()=>{this.calcHeight()})},calcHeight(){const t=document.getElementsByClassName("editorbox")[0],e=Math.max(document.documentElement.offsetHeight,window.innerHeight||0);let n=0;t&&(n=t.offsetHeight);let s=0;const i=document.getElementsByClassName("suite-runner")[0];i&&(s=i.offsetHeight);let r=document.getElementById("script-log-messages");r&&(r.style.height=`${e-n-s}px`)},scriptDisconnect(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0},showMetadata(){N.get("/openc3-api/metadata").then(t=>{this.inputMetadata.events=t.data.map(e=>({name:"Metadata",start:new Date(e.start*1e3),end:new Date(e.start*1e3),color:e.color,type:e.type,timed:!0,metadata:e})),this.inputMetadata.show=!0})},messageSortOrder(t){t==="Newest on Top"&&this.messagesNewestOnTop===!1?(this.messagesNewestOnTop=!0,this.messages.reverse()):t==="Newest on Bottom"&&this.messagesNewestOnTop===!0&&(this.messagesNewestOnTop=!1,this.messages.reverse())},fileNameChanged(t){t=t.split("*")[0],this.editor.setValue(this.files[t].content),this.restoreBreakpoints(t),this.editor.clearSelection(),this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(this.files[t].lineNo-1,0,this.files[t].lineNo-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(this.files[t].lineNo)},tryLoadRunningScript:function(t){return N.get("/script-api/running-script").then(e=>{const n=e.data.find(s=>`${s.id}`==`${t}`);n?(this.filename=n.name,this.tryLoadSuites(),this.initScriptStart(),this.scriptStart(n.id)):(this.$notify.caution({title:`Running Script ${t} not found`,body:"Check the Completed Scripts below ..."}),this.showScripts=!0)})},tryLoadSuites:function(){N.get(`/script-api/scripts/${this.filename}`).then(t=>{t.data.suites&&(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(t.data.suites)),t.data.error&&(this.suiteError=t.data.error,this.showSuiteError=!0),this.disableSuiteButtons=t.data.success==!1,this.doResize()})},showExecuteSelectionMenu:function(t){this.menuX=t.pageX,this.menuY=t.pageY,this.executeSelectionMenu=!0},runFromCursor:function(){const t=this.editor.getCursorPosition().row,e=this.editor.session.doc.getLines(t,this.editor.session.doc.getLength()).join(`
|
16
|
+
`),n=this.getBreakpointRows().filter(s=>s>=t).map(s=>s-t);this.executeText(e,n)},executeSelection:function(){const t=this.editor.getSelectedText(),e=this.editor.getSelectionRange(),n=this.getBreakpointRows().filter(s=>s<=e.end.row&&s>=e.start.row).map(s=>s-e.start.row);this.executeText(t,n)},async executeText(t,e=[]){let n=this.fullFilename.split(".").pop();n.includes(" *")&&(n=n.split(" *")[0]),n!=="rb"&&n!=="py"&&(n="rb");const s=kn+"/"+Ke(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+`_temp.${n}`;await N.post(`/script-api/scripts/${s}`,{data:{text:t,breakpoints:e}}).then(i=>{let r=this.scriptEnvironment.env;return this.enableStackTraces&&(r=r.concat({key:"OPENC3_FULL_BACKTRACE",value:"1"})),N.post(`/script-api/scripts/${s}/run`,{data:{environment:r}})}).then(i=>{window.open(`/tools/scriptrunner/${i.data}`)})},clearBreakpoints:function(){this.editor.session.clearBreakpoints()},toggleBreakpoint:function(t){if(!this.scriptId){const e=t.getDocumentPosition().row;t.editor.session.getBreakpoints(e,0)[e]?t.editor.session.clearBreakpoint(e):t.editor.session.setBreakpoint(e)}},updateBreakpoints:function(t,e){if(t.lines.length<=1)return;const n=this.getBreakpointRows(e).filter(r=>t.start.column===0&&r===t.start.row||r>t.start.row);let s=[],i=0;switch(t.action){case"insert":i=t.lines.length-1,n.reverse();break;case"remove":i=-t.lines.length+1,s=[...Array(t.lines.length).keys()].map(r=>r+t.start.row);break}n.forEach(r=>{e.clearBreakpoint(r),s.includes(r)||e.setBreakpoint(r+i)})},getBreakpointRows:function(t=this.editor.session){return t.getBreakpoints().map((e,n)=>e&&n).filter(Number.isInteger)},restoreBreakpoints:function(t){var e;this.clearBreakpoints(),(e=this.breakpoints[t])==null||e.forEach(n=>{this.editor.session.setBreakpoint(n)})},deleteAllBreakpoints:function(){this.$dialog.confirm("Permanently delete all breakpoints for ALL scripts?",{okText:"Delete",cancelText:"Cancel"}).then(t=>N.delete("/script-api/breakpoints/delete/all")).then(t=>{this.clearBreakpoints()})},suiteRunnerButton(t){this.startOrGoButton===xn?this.start(t,"suiteRunner"):this.go(t,"suiteRunner")},async keydown(t){this.scriptId||this.editor.getReadOnly()===!0||(t.metaKey||t.ctrlKey)&&t.keyCode===83&&(t.shiftKey?(t.preventDefault(),this.saveAs()):(t.preventDefault(),await this.saveFile()))},onChange(t){this.scriptId||this.editor.getReadOnly()===!0||(this.editor.session.getUndoManager().canUndo()?this.fileModified="*":this.fileModified="")},checkMnemonics:function(){this.mnemonicChecker.checkText(this.editor.getValue()).then(({skipped:t,problems:e})=>{let n="";if(e.length){const s=e.map(i=>`${i.lineNumber}: ${i.error}`).join("<br/>");n+=`<strong>The following lines have problems:</strong><br/>${s}<br/><br/>`}t.length&&(n+="<strong>Mnemonics with string interpolation were not checked.</strong>"),n===""&&(n="<strong>Everything looks good!</strong>"),this.$dialog.alert(n.trim(),{html:!0})})},initScriptStart(){this.disableSuiteButtons=!0,this.startOrGoDisabled=!0,this.envDisabled=!0,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0,this.state="Connecting...",this.startOrGoButton=Zd,this.editor.setReadOnly(!0)},scriptStart(t){this.scriptId=t,this.cable.createSubscription("RunningScriptChannel",window.openc3Scope,{received:e=>this.received(e)},{id:this.scriptId}).then(e=>{this.subscription=e})},async scriptComplete(){this.state="stopped",this.fatal=!1,this.scriptId=null,this.currentFilename=null,this.files={},this.subscription&&(await this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0,await this.reloadFile(),this.editor.session.getUndoManager().reset(),this.readOnlyUser==!1&&this.editor.setReadOnly(!1),this.disableSuiteButtons=!1,this.startOrGoButton=xn,this.pauseOrRetryButton=st,this.startOrGoDisabled=this.suiteRunner,this.envDisabled=!1,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0},environmentHandler:function(t){this.scriptEnvironment.env=t},startHandler:function(){this.start()},async start(t,e=null){this.initScriptStart(),await this.saveFile("start"),this.saveAllowed=!1;let n=this.filename;this.filename===ge&&(n=this.tempFilename);let s=`/script-api/scripts/${n}/run`;this.showDisconnect&&(s+="/disconnect");let i=this.scriptEnvironment.env;this.enableStackTraces&&(i=i.concat({key:"OPENC3_FULL_BACKTRACE",value:"1"}));let r={environment:i};e&&(r.suiteRunner=t),N.post(s,{data:r}).then(o=>{this.scriptStart(o.data)}).catch(o=>{this.scriptComplete()})},go(){this.filenameSelect=this.currentFilename,this.fileNameChanged(this.currentFilename),N.post(`/script-api/running-script/${this.scriptId}/go`)},pauseOrRetry(){this.pauseOrRetryButton===st?N.post(`/script-api/running-script/${this.scriptId}/pause`):(this.pauseOrRetryButton=st,N.post(`/script-api/running-script/${this.scriptId}/retry`))},stop(){this.fatal?(this.removeAllMarkers(),this.scriptComplete()):N.post(`/script-api/running-script/${this.scriptId}/stop`)},step(){N.post(`/script-api/running-script/${this.scriptId}/step`)},handleWaiting(){if(this.state!=="waiting"&&this.state!=="paused")this.clearWaiting();else if(this.waitingInterval!==null)return;this.waitingStart=Date.now(),this.waitingInterval=setInterval(()=>{this.waitingTime=Math.round((Date.now()-this.waitingStart)/1e3)},1e3)},clearWaiting(){this.waitingTime=0,clearInterval(this.waitingInterval),this.waitingInterval=null},processLine(t){t.filename&&t.filename!==this.currentFilename&&(this.files[t.filename]?(this.currentFilename=t.filename,this.editor.setValue(this.files[t.filename].content),this.restoreBreakpoints(t.filename),this.editor.clearSelection()):(this.files[t.filename]={content:"",lineNo:0},N.get(`/script-api/scripts/${t.filename}`).then(n=>{this.files[t.filename]={content:n.data.contents,lineNo:0},this.breakpoints[t.filename]=n.data.breakpoints,this.restoreBreakpoints(t.filename),this.currentFilename=null}).catch(n=>{this.files[t.filename]=null}))),this.state=t.state;const e=this.editor.session.getMarkers();switch(this.state){case"running":this.handleWaiting(),this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1,this.stopDisabled=!1,this.pauseOrRetryButton=st,this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(t.line_no-1,0,t.line_no-1,1),"runningMarker","fullLine"),this.editor.gotoLine(t.line_no),this.files[t.filename].lineNo=t.line_no;break;case"fatal":this.fatal=!0;case"error":this.pauseOrRetryButton=Qd;case"breakpoint":case"waiting":case"paused":if(this.handleWaiting(),this.state=="fatal"?(this.startOrGoDisabled=!0,this.pauseOrRetryDisabled=!0):(this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1),this.stopDisabled=!1,Object.keys(e).filter(s=>e[s].clazz===`${this.state}Marker`).length===0){this.removeAllMarkers();let s=t.line_no>0?t.line_no:1;this.editor.session.addMarker(new this.Range(s-1,0,s-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(s),t.filename&&(this.files[t.filename].lineNo=s)}break}},processReceived(){let t=0;for(let e of this.receivedEvents){t+=1;let n=0;switch(e.type){case"file":this.files[e.filename]={content:e.text,lineNo:0},this.breakpoints[e.filename]=e.breakpoints,this.currentFilename===e.filename&&this.restoreBreakpoints(e.filename);break;case"line":this.processLine(e);break;case"output":for(const o of e.line.split(`
|
17
|
+
`))o&&(this.messagesNewestOnTop?this.messages.unshift({message:o}):this.messages.push({message:o}));for(;this.messages.length>this.maxArrayLength;)this.messages.pop();break;case"script":this.handleScript(e);break;case"report":this.results.text=e.report,this.results.show=!0;break;case"complete":this.fatal||(this.removeAllMarkers(),this.scriptComplete());break;case"step":this.showDebug=!0;break;case"screen":let s=!1,i={};for(screen of this.screens){if(screen.target==e.target_name&&screen.screen==e.screen_name){i=screen,s=!0;break}n+=1}i.target=e.target_name,i.screen=e.screen_name,i.definition=e.definition,e.x?i.left=e.x:i.left=0,e.y?i.top=e.y:i.top=0,i.count=this.updateCounter++,s?this.screens[n]=i:(i.id=this.idCounter++,this.screens[this.screens.length]=i);break;case"clearscreen":for(screen of this.screens){if(screen.target==e.target_name&&screen.screen==e.screen_name){this.screens.splice(n,1);break}n+=1}break;case"clearallscreens":this.screens=[];break;case"downloadfile":const r=document.createElement("a");r.href=window.location.origin+e.url,r.setAttribute("download",e.filename),r.click();break}}this.receivedEvents.splice(0,t)},received(t){this.cable.recordPing(),this.receivedEvents.push(t)},promptDialogCallback(t){this.prompt.show=!1,N.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.prompt.method,answer:t,prompt_id:this.activePromptId,multiple:this.prompt.multiple}})},handleScript(t){if(t.prompt_complete){this.activePromptId="",this.prompt.show=!1,this.ask.show=!1;return}switch(this.activePromptId=t.prompt_id,this.prompt.method=t.method,this.prompt.layout="horizontal",this.prompt.title="Prompt",this.prompt.subtitle="",this.prompt.details="",this.prompt.buttons=[],this.prompt.multiple=null,t.method){case"ask":case"ask_string":this.ask.default=null,this.ask.answerRequired=!0,this.ask.password=!1,this.ask.question=t.args[0],t.args[1]&&t.args[1]!==!0&&t.args[1]!==!1?this.ask.default=t.args[1].toString():t.args[1]===!0&&(this.ask.answerRequired=!1),t.args[2]===!0&&(this.ask.password=!0),this.ask.callback=e=>{this.ask.show=!1,this.ask.password?N.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:t.method,password:e,prompt_id:this.activePromptId}}):N.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:t.method,answer:e,prompt_id:this.activePromptId}})},this.ask.show=!0;break;case"prompt_for_hazardous":this.prompt.title="Hazardous Command",this.prompt.message=`Warning: Command ${t.args[0]} ${t.args[1]} is Hazardous. `,t.args[2]&&(this.prompt.message+=t.args[2]+" "),this.prompt.message+="Send?",this.prompt.buttons=[{text:"Send",value:"Send"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"prompt_for_critical_cmd":this.criticalCmdUuid=t.args[0],this.criticalCmdString=t.args[5],this.criticalCmdUser=t.args[1],this.displayCriticalCmd=!0;break;case"prompt":t.kwargs&&t.kwargs.informative&&(this.prompt.subtitle=t.kwargs.informative),t.kwargs&&t.kwargs.details&&(this.prompt.details=t.kwargs.details),this.prompt.message=t.args[0],this.prompt.buttons=[{text:"Ok",value:"Ok"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"combo_box":t.kwargs&&t.kwargs.informative&&(this.prompt.subtitle=t.kwargs.informative),t.kwargs&&t.kwargs.details&&(this.prompt.details=t.kwargs.details),t.kwargs&&t.kwargs.multiple&&(this.prompt.multiple=!0),this.prompt.message=t.args[0],t.args.slice(1).forEach(e=>{this.prompt.buttons.push({title:e,value:e})}),this.prompt.layout="combo",this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"message_box":case"vertical_message_box":t.kwargs&&t.kwargs.informative&&(this.prompt.subtitle=t.kwargs.informative),t.kwargs&&t.kwargs.details&&(this.prompt.details=t.kwargs.details),this.prompt.message=t.args[0],t.args.slice(1).forEach(e=>{this.prompt.buttons.push({text:e,value:e})}),t.method.includes("vertical")&&(this.prompt.layout="vertical"),this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"backtrace":this.information.title="Call Stack",this.information.text=t.args,this.information.show=!0,this.information.width="600";break;case"metadata_input":this.inputMetadata.callback=e=>{this.inputMetadata.show=!1,N.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:t.method,answer:e,prompt_id:this.activePromptId}})},this.showMetadata();break;case"open_file_dialog":case"open_files_dialog":this.file.title=t.args[0],this.file.message=t.args[1],t.kwargs&&t.kwargs.filter&&(this.file.filter=t.kwargs.filter),t.method=="open_files_dialog"&&(this.file.multiple=!0),this.file.show=!0;break}},async fileDialogCallback(t){let e="Cancel",n=[];t!="Cancel"&&(e=[],t.forEach(s=>{e.push(s.name),n.push(N.get(`/openc3-api/storage/upload/${encodeURIComponent(`${window.openc3Scope}/tmp/${s.name}`)}?bucket=OPENC3_CONFIG_BUCKET`).then(i=>{n.push($({...i.data,data:s}))}))})),Promise.all(n).then(s=>{N.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.file.multiple?"open_files_dialog":"open_file_dialog",answer:e,prompt_id:this.activePromptId}}).then(i=>{this.file.show=!1})})},setError(t){this.alertType="error",this.alertText=`Error: ${t}`,this.showAlert=!0},newFile(){this.unlockFile(),this.filename=ge,this.currentFilename=null,this.tempFilename=null,this.files={},this.editor.session.setValue(""),this.saveAllowed=!0,this.fileModified="",this.suiteRunner=!1,this.startOrGoDisabled=!1,this.envDisabled=!1,this.$router.replace({name:"ScriptRunner"}).catch(t=>{}),document.title="Script Runner",this.doResize()},async newRubyTestSuite(){this.newFile(),this.editor.session.setValue(`require 'openc3/script/suite.rb'
|
18
|
+
|
19
|
+
# Group class name should indicate what the scripts are testing
|
20
|
+
class Power < OpenC3::Group
|
21
|
+
# Methods beginning with script_ are added to Script dropdown
|
22
|
+
def script_power_on
|
23
|
+
# Using OpenC3::Group.puts adds the output to the Test Report
|
24
|
+
# This can be useful for requirements verification, QA notes, etc
|
25
|
+
OpenC3::Group.puts "Verifying requirement SR-1"
|
26
|
+
configure()
|
27
|
+
end
|
28
|
+
|
29
|
+
# Other methods are not added to Script dropdown
|
30
|
+
def configure
|
31
|
+
end
|
32
|
+
|
33
|
+
def setup
|
34
|
+
# Run when Group Setup button is pressed
|
35
|
+
# Run before all scripts when Group Start is pressed
|
36
|
+
end
|
37
|
+
|
38
|
+
def teardown
|
39
|
+
# Run when Group Teardown button is pressed
|
40
|
+
# Run after all scripts when Group Start is pressed
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
class TestSuite < OpenC3::Suite
|
45
|
+
def initialize
|
46
|
+
add_group('Power')
|
47
|
+
end
|
48
|
+
def setup
|
49
|
+
# Run when Suite Setup button is pressed
|
50
|
+
# Run before all groups when Suite Start is pressed
|
51
|
+
end
|
52
|
+
def teardown
|
53
|
+
# Run when Suite Teardown button is pressed
|
54
|
+
# Run after all groups when Suite Start is pressed
|
55
|
+
end
|
56
|
+
end
|
57
|
+
`),await this.saveFile("auto")},async newPythonTestSuite(){this.newFile(),this.editor.session.setValue(`from openc3.script.suite import Suite, Group
|
58
|
+
|
59
|
+
# Group class name should indicate what the scripts are testing
|
60
|
+
class Power(Group):
|
61
|
+
# Methods beginning with script_ are added to Script dropdown
|
62
|
+
def script_power_on(self):
|
63
|
+
# Using Group.print adds the output to the Test Report
|
64
|
+
# This can be useful for requirements verification, QA notes, etc
|
65
|
+
Group.print("Verifying requirement SR-1")
|
66
|
+
self.configure()
|
67
|
+
|
68
|
+
# Other methods are not added to Script dropdown
|
69
|
+
def configure(self):
|
70
|
+
pass
|
71
|
+
|
72
|
+
def setup(self):
|
73
|
+
# Run when Group Setup button is pressed
|
74
|
+
# Run before all scripts when Group Start is pressed
|
75
|
+
pass
|
76
|
+
|
77
|
+
def teardown(self):
|
78
|
+
# Run when Group Teardown button is pressed
|
79
|
+
# Run after all scripts when Group Start is pressed
|
80
|
+
pass
|
81
|
+
|
82
|
+
class TestSuite(Suite):
|
83
|
+
def __init__(self):
|
84
|
+
self.add_group(Power)
|
85
|
+
|
86
|
+
def setup(self):
|
87
|
+
# Run when Suite Setup button is pressed
|
88
|
+
# Run before all groups when Suite Start is pressed
|
89
|
+
pass
|
90
|
+
|
91
|
+
def teardown(self):
|
92
|
+
# Run when Suite Teardown button is pressed
|
93
|
+
# Run after all groups when Suite Start is pressed
|
94
|
+
pass
|
95
|
+
`),await this.saveFile("auto")},addToRecent(t){let e=this.recent.findIndex(n=>n.label===t);e!==-1&&this.recent.splice(e,1),this.recent.unshift({label:t,icon:Fn(t),command:async n=>{this.filename=n.label,await this.reloadFile()}}),this.recent.length>8&&this.recent.pop(),localStorage.script_runner__recent=JSON.stringify(this.recent)},removeFromRecent(t){this.recent=this.recent.filter(e=>e.label!==t),localStorage.script_runner__recent=JSON.stringify(this.recent),localStorage.script_runner__filename===t&&localStorage.removeItem("script_runner__filename")},openFile(){this.fileOpen=!0},async reloadFile(t=!0){this.saveAllowed=!1,this.startOrGoDisabled=!0,await N.get(`/script-api/scripts/${this.filename}`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(e=>{const n={name:this.filename,contents:e.data.contents};e.data.suites&&(n.suites=JSON.parse(e.data.suites)),e.data.error&&(n.error=e.data.error),e.data.success&&(n.success=e.data.success);const s=e.data.locked,i=e.data.breakpoints;this.setFile({file:n,locked:s,breakpoints:i},!0),this.saveAllowed=!0}).catch(e=>{t===!0&&this.$notify.caution({title:"File Open Error",body:`Failed to open ${this.filename} due to ${e}`}),this.removeFromRecent(this.filename),this.newFile()})},setFile({file:t,locked:e,breakpoints:n},s=!1){this.files={};let i=t.name.split("*")[0];s===!1&&this.filename!==i&&(this.unlockFile(),this.lockedBy=e),this.filename=i,this.$router.replace({name:"ScriptRunner",query:{file:this.filename}}).catch(o=>{});let r=this.filename.split("/");document.title=`${r.pop()} (${r.join("/")})`,this.filename.split(".").pop()==="py"?this.editor.session.setMode(this.pythonMode):this.editor.session.setMode(this.rubyMode),this.currentFilename=null,this.editor.session.setValue(t.contents),this.breakpoints[filename]=n,this.restoreBreakpoints(filename),this.fileModified="",this.envDisabled=!1,this.addToRecent(this.filename),t.suites?(this.suiteRunner=!0,this.suiteMap=t.suites,this.startOrGoDisabled=!0):(this.suiteRunner=!1,this.startOrGoDisabled=!1),t.error&&(this.suiteError=t.error,this.showSuiteError=!0),this.disableSuiteButtons=t.success==!1,this.doResize()},clearTemp(){this.recent=this.recent.filter(t=>!t.label.includes("__TEMP__")),localStorage.script_runner__recent=JSON.stringify(this.recent)},detectLanguage(){let t=new RegExp("^\\s*(require|load|puts) "),e=new RegExp("^\\s*(import|from) "),n=new RegExp("^\\s*end\\s*$"),s=new RegExp("^\\s*(if|def|while|else|elif|class).*:\\s*$"),i=new RegExp('\\(f"'),o=this.editor.getValue().split(`
|
96
|
+
`);for(let l of o){if(l.match(t))return"ruby";if(l.match(e))return"python";if(l.match(n))return"ruby";if(l.match(s)||l.match(i))return"python"}return"unknown"},async saveFile(t="menu"){if(!this.readOnlyUser)if(this.saveAllowed){const e=this.getBreakpointRows();if(this.filename===ge){if(t==="menu"){this.saveAs();return}else if(this.tempFilename===null){let n=this.detectLanguage();if(n==="ruby"||t!=="auto"&&n=="unknown")this.tempFilename=kn+"/"+Ke(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+"_temp.rb";else if(n==="python")this.tempFilename=kn+"/"+Ke(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+"_temp.py";else return;this.filename=this.tempFilename,this.addToRecent(this.filename)}}this.showSave=!0,await N.post(`/script-api/scripts/${this.filename}`,{data:{text:this.editor.getValue(),breakpoints:e}}).then(n=>{n.status==200?(n.data.suites?(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(n.data.suites)):(this.startOrGoDisabled=!1,this.suiteRunner=!1,this.suiteMap={}),n.data.error&&(this.suiteError=n.data.error,this.showSuiteError=!0),this.fileModified="",setTimeout(()=>{this.showSave=!1},2e3)):(this.showSave=!1,this.alertType="error",this.alertText=`Error saving file. Code: ${n.status} Text: ${n.statusText}`,this.showAlert=!0),this.lockFile(),this.doResize()}).catch(({response:n})=>{this.showSave=!1,n.status==422?(this.alertType="error",this.alertText=n.data.suites):(this.alertType="error",this.alertText=`Error saving file. Code: ${n.status} Text: ${n.statusText}`),this.showAlert=!0})}else this.setError("Attempt to save file when not allowed")},saveAs(){this.showSaveAs=!0},async saveAsFilename(t){this.filename=t.split("*")[0],this.currentFilename=null,this.tempFilename&&(N.post(`/script-api/scripts/${this.tempFilename}/delete`),this.tempFilename=null),await this.saveFile("menu")},delete(){let t=this.filename;this.tempFilename&&(t=this.tempFilename),this.$dialog.confirm(`Permanently delete file: ${t}`,{okText:"Delete",cancelText:"Cancel"}).then(e=>N.post(`/script-api/scripts/${t}/delete`,{data:{}})).then(e=>{this.removeFromRecent(t),this.newFile()}).catch(e=>{if(e!==!0){const n={text:`Failed Multi-Delete. ${e}`,type:"error"};this.$emit("alert",n)}})},download(){const t=new Blob([this.editor.getValue()],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",this.filename),e.click()},syntaxCheck(){N.post(`/script-api/scripts/${this.filename}/syntax`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(t=>{this.information.title=t.data.title,this.information.text=JSON.parse(t.data.description),this.information.show=!0,this.information.width="600"})},showInstrumented(){N.post(`/script-api/scripts/${this.filename}/instrumented`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(t=>{this.information.title=t.data.title,this.information.text=JSON.parse(t.data.description),this.information.show=!0,this.information.width="90vw"})},showCallStack(){N.post(`/script-api/running-script/${this.scriptId}/backtrace`)},toggleDebug(){this.showDebug=!this.showDebug,this.showDebug&&this.$nextTick(()=>{this.$refs.debug.focus()})},toggleDisconnect(){this.showDisconnect=!this.showDisconnect},debugKeydown(t){t.key==="Escape"?(this.debug="",this.debugHistoryIndex=this.debugHistory.length):t.key==="Enter"?(this.debugHistory.push(this.debug),this.debugHistoryIndex=this.debugHistory.length,N.post(`/script-api/running-script/${this.scriptId}/debug`,{data:{args:this.debug}}),this.debug=""):t.key==="ArrowUp"?(this.debugHistoryIndex-=1,this.debugHistoryIndex<0&&(this.debugHistoryIndex=this.debugHistory.length-1),this.debug=this.debugHistory[this.debugHistoryIndex],t.preventDefault()):t.key==="ArrowDown"&&(this.debugHistoryIndex+=1,this.debugHistoryIndex>=this.debugHistory.length&&(this.debugHistoryIndex=0),this.debug=this.debugHistory[this.debugHistoryIndex])},removeAllMarkers:function(){const t=this.editor.session.getMarkers();Object.keys(t).filter(e=>t[e].type==="fullLine").forEach(e=>this.editor.session.removeMarker(e))},confirmLocalUnlock:function(){this.$dialog.confirm("Are you sure you want to unlock this script for editing? If another user is editing this script, your changes might conflict with each other.",{okText:"Force Unlock",cancelText:"Cancel"}).then(()=>(this.lockedBy=null,this.lockFile()))},lockFile:function(){if(!this.readOnlyUser)return N.post(`/script-api/scripts/${this.filename}/lock`)},unlockFile:function(){this.filename!==ge&&!this.readOnly&&!this.readOnlyUser&&N.post(`/script-api/scripts/${this.filename}/unlock`)},screenId(t){return"scriptRunnerScreen"+t},closeScreen(t){let e=0;for(screen of this.screens){if(screen.id==t){this.screens.splice(e,1);break}e+=1}}}},th={class:"grid"},nh=["id"],sh={class:"item-content"},ih={id:"sr-controls"},rh={key:2,style:{width:"40px",height:"40px"},class:"ml-2 mr-2"},oh={key:3},ah={key:4},lh={key:0,id:"debug",class:"pa-0"};function ch(t,e,n,s,i,r){const o=p("top-bar"),l=p("v-icon"),u=p("v-btn"),d=p("v-snackbar"),h=p("openc3-screen"),f=p("suite-runner"),g=p("v-tooltip"),b=p("v-select"),y=p("v-text-field"),m=p("v-progress-circular"),S=p("v-spacer"),T=p("v-row"),O=p("v-card"),P=p("v-list-item-title"),q=p("v-list-item"),E=p("v-list"),R=p("v-menu"),F=p("pane"),W=p("script-log-messages"),ae=p("splitpanes"),Fi=p("file-open-save-dialog"),uh=p("environment-dialog"),dh=p("ask-dialog"),hh=p("file-dialog"),ph=p("information-dialog"),mh=p("event-list-dialog"),fh=p("overrides-dialog"),gh=p("prompt-dialog"),bh=p("results-dialog"),yh=p("script-environment-dialog"),wh=p("simple-text-dialog"),_h=p("critical-cmd-dialog"),vh=p("running-scripts"),Sh=p("v-sheet"),kh=p("v-bottom-sheet");return k(),A(te,null,[a(o,{menus:r.menus,title:i.title},null,8,["menus","title"]),a(d,{modelValue:i.showAlert,"onUpdate:modelValue":e[1]||(e[1]=C=>i.showAlert=C),location:"top",color:i.alertType,timeout:3e3},{actions:c(({attrs:C})=>[a(u,ie({variant:"text"},C,{onClick:e[0]||(e[0]=En=>i.showAlert=!1)}),{default:c(()=>e[34]||(e[34]=[x(" Close ")])),_:2},1040)]),default:c(()=>[a(l,null,{default:c(()=>[x(" mdi-"+I(i.alertType),1)]),_:1}),x(" "+I(i.alertText)+" ",1)]),_:1},8,["modelValue","color"]),a(d,{modelValue:i.showEditingToast,"onUpdate:modelValue":e[3]||(e[3]=C=>i.showEditingToast=C),location:"top",timeout:-1,color:"orange"},{actions:c(({attrs:C})=>[a(u,ie({variant:"text"},C,{color:"danger",onClick:r.confirmLocalUnlock,"data-test":"unlock-button"}),{default:c(()=>e[36]||(e[36]=[x(" Unlock ")])),_:2},1040,["onClick"]),a(u,ie({variant:"text"},C,{onClick:e[2]||(e[2]=()=>{i.showEditingToast=!1})}),{default:c(()=>e[37]||(e[37]=[x(" dismiss ")])),_:2},1040)]),default:c(()=>[a(l,null,{default:c(()=>e[35]||(e[35]=[x(" mdi-pencil-off ")])),_:1}),x(" "+I(i.lockedBy)+" is editing this script. Editor is in read-only mode ",1)]),_:1},8,["modelValue"]),v("div",th,[(k(!0),A(te,null,le(i.screens,C=>(k(),A("div",{class:"item",key:C.id,id:r.screenId(C.id),ref_for:!0,ref:"gridItem"},[v("div",sh,[a(h,{target:C.target,screen:C.screen,definition:C.definition,keywords:i.screenKeywords,initialFloated:!0,initialTop:C.top,initialLeft:C.left,initialZ:3,minZ:3,fixFloated:!0,count:C.count,onCloseScreen:En=>r.closeScreen(C.id),onDeleteScreen:En=>r.closeScreen(C.id)},null,8,["target","screen","definition","keywords","initialTop","initialLeft","count","onCloseScreen","onDeleteScreen"])])],8,nh))),128))]),a(O,{style:{padding:"10px"}},{default:c(()=>[i.suiteRunner?(k(),D(f,{key:0,class:"suite-runner","suite-map":i.suiteMap,"disable-buttons":i.disableSuiteButtons,filename:r.fullFilename,onButton:r.suiteRunnerButton,onLoaded:r.doResize},null,8,["suite-map","disable-buttons","filename","onButton","onLoaded"])):L("",!0),v("div",ih,[a(T,{"no-gutters":"",justify:"space-between"},{default:c(()=>[i.showDisconnect?(k(),D(l,{key:0,class:"mt-2",color:"red"},{default:c(()=>e[38]||(e[38]=[x(" mdi-connection ")])),_:1})):L("",!0),a(g,{location:"top"},{activator:c(({props:C})=>[a(u,ie(C,{icon:"mdi-cached",variant:"text",onClick:r.reloadFile,disabled:i.filename===t.NEW_FILENAME}),null,16,["onClick","disabled"])]),default:c(()=>[e[39]||(e[39]=v("span",null," Reload File ",-1))]),_:1}),a(b,{modelValue:i.filenameSelect,"onUpdate:modelValue":[e[4]||(e[4]=C=>i.filenameSelect=C),r.fileNameChanged],items:r.fileList,disabled:r.fileList.length<=1,label:"Filename",id:"filename","data-test":"filename",style:{width:"300px"},density:"compact",variant:"outlined","hide-details":""},null,8,["modelValue","onUpdate:modelValue","items","disabled"]),a(y,{modelValue:i.scriptId,"onUpdate:modelValue":e[5]||(e[5]=C=>i.scriptId=C),label:"Script ID","data-test":"id",class:"shrink ml-2 script-state",style:{"max-width":"100px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue"]),a(y,{modelValue:r.stateTimer,"onUpdate:modelValue":e[6]||(e[6]=C=>r.stateTimer=C),label:"Script State","data-test":"state",class:"shrink ml-2 script-state",style:{"max-width":"120px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue"]),i.state==="Connecting..."?(k(),D(m,{key:1,size:40,class:"ml-2 mr-2",indeterminate:"",color:"primary"})):(k(),A("div",rh)),a(S),i.startOrGoButton==="Start"?(k(),A("div",oh,[a(u,{onClick:r.startHandler,class:"mx-1",color:"primary","data-test":"start-button",disabled:i.startOrGoDisabled||!i.executeUser,hidden:i.suiteRunner},{default:c(()=>e[40]||(e[40]=[v("span",null," Start ",-1)])),_:1},8,["onClick","disabled","hidden"]),a(g,{location:"top"},{activator:c(({props:C})=>[a(u,ie(C,{onClick:e[7]||(e[7]=En=>i.scriptEnvironment.show=!i.scriptEnvironment.show),class:"mx-1","data-test":"env-button",color:r.environmentIconColor,disabled:i.envDisabled}),{default:c(()=>[a(l,null,{default:c(()=>[x(I(r.environmentIcon),1)]),_:1})]),_:2},1040,["color","disabled"])]),default:c(()=>[e[41]||(e[41]=v("span",null,"Script Environment",-1))]),_:1})])):(k(),A("div",ah,[a(u,{onClick:r.go,color:"primary",class:"mr-2",disabled:i.startOrGoDisabled,"data-test":"go-button"},{default:c(()=>e[42]||(e[42]=[x(" Go ")])),_:1},8,["onClick","disabled"]),a(u,{color:"primary",onClick:r.pauseOrRetry,class:"mr-2",disabled:i.pauseOrRetryDisabled,"data-test":"pause-retry-button"},{default:c(()=>[x(I(i.pauseOrRetryButton),1)]),_:1},8,["onClick","disabled"]),a(u,{color:"primary",onClick:r.stop,"data-test":"stop-button",disabled:i.stopDisabled},{default:c(()=>e[43]||(e[43]=[x(" Stop ")])),_:1},8,["onClick","disabled"])]))]),_:1})])]),_:1}),a(ae,{horizontal:"",onResize:r.calcHeight,style:{height:"100%"}},{default:c(()=>[a(F,{class:"editorbox",size:"50"},{default:c(()=>[a(d,{modelValue:i.showSave,"onUpdate:modelValue":e[8]||(e[8]=C=>i.showSave=C),absolute:"",location:"top right",timeout:-1,class:"saving"},{default:c(()=>e[44]||(e[44]=[x(" Saving... ")])),_:1},8,["modelValue"]),v("pre",{ref:"editor",class:"editor",onContextmenu:e[9]||(e[9]=ye((...C)=>r.showExecuteSelectionMenu&&r.showExecuteSelectionMenu(...C),["prevent"]))},null,544),a(R,{modelValue:i.executeSelectionMenu,"onUpdate:modelValue":e[10]||(e[10]=C=>i.executeSelectionMenu=C),target:[i.menuX,i.menuY]},{default:c(()=>[a(E,null,{default:c(()=>[(k(!0),A(te,null,le(r.executeSelectionMenuItems,C=>(k(),D(q,{link:"",key:C.label,disabled:i.scriptId},{default:c(()=>[a(P,{onClick:C.command},{default:c(()=>[x(I(C.label),1)]),_:2},1032,["onClick"])]),_:2},1032,["disabled"]))),128))]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),a(F,{id:"messages",class:"mt-2",ref:"messagesDiv"},{default:c(()=>[i.showDebug?(k(),A("div",lh,[a(T,{"no-gutters":""},{default:c(()=>[a(u,{color:"primary",onClick:r.step,style:{width:"100px"},class:"mr-4",disabled:!i.scriptId,"data-test":"step-button"},{default:c(()=>[e[46]||(e[46]=x(" Step ")),a(l,{end:""},{default:c(()=>e[45]||(e[45]=[x(" mdi-step-forward ")])),_:1})]),_:1},8,["onClick","disabled"]),a(y,{ref:"debug",class:"mb-2",variant:"outlined",density:"compact","hide-details":"",label:"Debug",modelValue:i.debug,"onUpdate:modelValue":e[11]||(e[11]=C=>i.debug=C),onKeydown:r.debugKeydown,"data-test":"debug-text"},null,8,["modelValue","onKeydown"])]),_:1})])):L("",!0),a(W,{id:"log-messages",modelValue:i.messages,"onUpdate:modelValue":e[12]||(e[12]=C=>i.messages=C),onSort:r.messageSortOrder},null,8,["modelValue","onSort"])]),_:1},512)]),_:1},8,["onResize"]),i.fileOpen?(k(),D(Fi,{key:0,modelValue:i.fileOpen,"onUpdate:modelValue":e[13]||(e[13]=C=>i.fileOpen=C),type:"open","api-url":"/script-api/scripts",onFile:e[14]||(e[14]=C=>r.setFile(C)),onError:e[15]||(e[15]=C=>r.setError(C)),onClearTemp:e[16]||(e[16]=C=>r.clearTemp(C))},null,8,["modelValue"])):L("",!0),i.showSaveAs?(k(),D(Fi,{key:1,modelValue:i.showSaveAs,"onUpdate:modelValue":e[17]||(e[17]=C=>i.showSaveAs=C),type:"save","api-url":"/script-api/scripts","require-target-parent-dir":"","input-filename":r.filenameOrBlank,onFilename:e[18]||(e[18]=C=>r.saveAsFilename(C)),onError:e[19]||(e[19]=C=>r.setError(C)),onClearTemp:e[20]||(e[20]=C=>r.clearTemp(C))},null,8,["modelValue","input-filename"])):L("",!0),i.showEnvironment?(k(),D(uh,{key:2,modelValue:i.showEnvironment,"onUpdate:modelValue":e[21]||(e[21]=C=>i.showEnvironment=C)},null,8,["modelValue"])):L("",!0),i.ask.show?(k(),D(dh,{key:3,modelValue:i.ask.show,"onUpdate:modelValue":e[22]||(e[22]=C=>i.ask.show=C),question:i.ask.question,default:i.ask.default,password:i.ask.password,"answer-required":i.ask.answerRequired,onResponse:i.ask.callback},null,8,["modelValue","question","default","password","answer-required","onResponse"])):L("",!0),i.file.show?(k(),D(hh,{key:4,modelValue:i.file.show,"onUpdate:modelValue":e[23]||(e[23]=C=>i.file.show=C),title:i.file.title,message:i.file.message,multiple:i.file.multiple,filter:i.file.filter,onResponse:r.fileDialogCallback},null,8,["modelValue","title","message","multiple","filter","onResponse"])):L("",!0),i.information.show?(k(),D(ph,{key:5,modelValue:i.information.show,"onUpdate:modelValue":e[24]||(e[24]=C=>i.information.show=C),title:i.information.title,text:i.information.text,width:i.information.width},null,8,["modelValue","title","text","width"])):L("",!0),i.inputMetadata.show?(k(),D(mh,{key:6,modelValue:i.inputMetadata.show,"onUpdate:modelValue":e[25]||(e[25]=C=>i.inputMetadata.show=C),events:i.inputMetadata.events,"time-zone":i.timeZone,"new-metadata":"",onClose:i.inputMetadata.callback},null,8,["modelValue","events","time-zone","onClose"])):L("",!0),i.showOverrides?(k(),D(fh,{key:7,modelValue:i.showOverrides,"onUpdate:modelValue":e[26]||(e[26]=C=>i.showOverrides=C)},null,8,["modelValue"])):L("",!0),i.prompt.show?(k(),D(gh,{key:8,modelValue:i.prompt.show,"onUpdate:modelValue":e[27]||(e[27]=C=>i.prompt.show=C),title:i.prompt.title,subtitle:i.prompt.subtitle,message:i.prompt.message,details:i.prompt.details,buttons:i.prompt.buttons,layout:i.prompt.layout,multiple:i.prompt.multiple,onResponse:i.prompt.callback},null,8,["modelValue","title","subtitle","message","details","buttons","layout","multiple","onResponse"])):L("",!0),i.results.show?(k(),D(bh,{key:9,modelValue:i.results.show,"onUpdate:modelValue":e[28]||(e[28]=C=>i.results.show=C),text:i.results.text},null,8,["modelValue","text"])):L("",!0),i.scriptEnvironment.show?(k(),D(yh,{key:10,modelValue:i.scriptEnvironment.show,"onUpdate:modelValue":e[29]||(e[29]=C=>i.scriptEnvironment.show=C),"input-environment":i.scriptEnvironment.env,onEnvironment:r.environmentHandler},null,8,["modelValue","input-environment","onEnvironment"])):L("",!0),a(wh,{modelValue:i.showSuiteError,"onUpdate:modelValue":e[30]||(e[30]=C=>i.showSuiteError=C),title:"Suite Analysis Error",text:i.suiteError,width:1e3},null,8,["modelValue","text"]),a(_h,{uuid:i.criticalCmdUuid,cmdString:i.criticalCmdString,cmdUser:i.criticalCmdUser,persistent:!0,modelValue:i.displayCriticalCmd,"onUpdate:modelValue":e[31]||(e[31]=C=>i.displayCriticalCmd=C),onStatus:r.promptDialogCallback},null,8,["uuid","cmdString","cmdUser","modelValue","onStatus"]),a(kh,{modelValue:i.showScripts,"onUpdate:modelValue":e[33]||(e[33]=C=>i.showScripts=C)},{default:c(()=>[a(Sh,{class:"pb-11 pt-5 px-5"},{default:c(()=>[i.showScripts?(k(),D(vh,{key:0,"connect-in-new-tab":!!i.fileModified,onDisconnect:r.scriptDisconnect,onClose:e[32]||(e[32]=()=>{i.showScripts=!1})},null,8,["connect-in-new-tab","onDisconnect"])):L("",!0)]),_:1})]),_:1},8,["modelValue"])],64)}const hp=B("default",oe(eh,[["render",ch],["__scopeId","data-v-415f09d1"]]))}}});
|