openc3-cosmos-tool-tlmviewer 6.8.1 → 6.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/tlmviewer/ArrayWidget-DLfNWDzN-c2e457258b747b19a985.js +2 -0
- data/tools/tlmviewer/ArrayplotWidget-CoRsUxHG-68f03cb78271c8d5c075.js +1 -0
- data/tools/tlmviewer/BarColumn-DHP-zQ4R-89f419653d7a14e93e00.js +1 -0
- data/tools/tlmviewer/BlockWidget-BmHSFvOq-febe345e2a5c7c7eabb8.js +2 -0
- data/tools/tlmviewer/ButtonWidget-C3ZWRjZZ-2b5395f6b0d61f36ebfa.js +2 -0
- data/tools/tlmviewer/CanvasWidget-CL-XzPF4-555728917956f9d9590a.js +1 -0
- data/tools/tlmviewer/CanvasdotWidget-D8Y9DgVE-3edd447ed68c9539c385.js +1 -0
- data/tools/tlmviewer/CanvasimageWidget-DHSGK_tD-3d25f777ae9047e6a817.js +1 -0
- data/tools/tlmviewer/CanvasimagevalueWidget-Btt_fQfC-d49c940a58a8249c7729.js +1 -0
- data/tools/tlmviewer/CanvaslabelWidget-BF_8RTjv-285fbaf87eea8c84dfe2.js +1 -0
- data/tools/tlmviewer/CanvaslabelvalueWidget-scbwaujI-3686de903828d9737481.js +1 -0
- data/tools/tlmviewer/CanvaslineWidget-gRvm_-TT-2d5c890e88d3d906345a.js +1 -0
- data/tools/tlmviewer/CanvaslinevalueWidget-CljziRek-6be716cdb6b895742553.js +1 -0
- data/tools/tlmviewer/CheckbuttonWidget-BOabI_jE-850b19845bcfd0dbaad5.js +1 -0
- data/tools/tlmviewer/ComboboxWidget-BLXNYFiY-f76e3c16198d6dd0f720.js +1 -0
- data/tools/tlmviewer/DateWidget-BTqLCtLS-6b9ecba6ce5f08bdc04d.js +1 -0
- data/tools/tlmviewer/DetailsDialog-BNCS3QAe-24e1df788a7ea4e717c2.js +1 -0
- data/tools/tlmviewer/DynamicWidget-CfMtj7H8-61ad56610ffdfbd54843.js +1 -0
- data/tools/tlmviewer/FormatvalueWidget-CLYx8qbg-102aeaac1fa2841b215f.js +1 -0
- data/tools/tlmviewer/Graph-BliBYJxD-8cbac835bd4120c02a9f.js +1 -0
- data/tools/tlmviewer/GraphWidget-Cb6Ozf54-b287b67159e80eb66c32.js +1 -0
- data/tools/tlmviewer/HorizontalWidget-AY2M01qP-ed9fce1ffefae6d89505.js +1 -0
- data/tools/tlmviewer/HorizontalboxWidget-2MEKvq_C-7275002bbf513c06420c.js +1 -0
- data/tools/tlmviewer/HorizontallineWidget-DgpOPA7q-3bce63164071e8315cd4.js +1 -0
- data/tools/tlmviewer/IframeWidget-UKKUl7k5-abad5206aa83aa3180ab.js +1 -0
- data/tools/tlmviewer/ImageLoader-C-CIL4YD-3cead3b67cbaa83b7169.js +1 -0
- data/tools/tlmviewer/ImageviewerWidget-DhuQH5Io-e19da1c822b5dc6d3766.js +1 -0
- data/tools/tlmviewer/LabelWidget-SO9zqcNN-d7f870b85b1d11d8dda8.js +1 -0
- data/tools/tlmviewer/LabelledWidget-DWoM5AJ5-dc33e3cb58cddff20c47.js +1 -0
- data/tools/tlmviewer/LabelprogressbarWidget-D3vnkvQZ-a273446e23822ae39c5e.js +1 -0
- data/tools/tlmviewer/LabelsparklineWidget-DO0T-Jot-78689031224ffc4f2f84.js +1 -0
- data/tools/tlmviewer/LabelvalueWidget-B6BbNFnk-c6f6158fdab1a4827991.js +1 -0
- data/tools/tlmviewer/LabelvaluedescWidget-CxfL-H9C-7c581540b34cd3801eaf.js +1 -0
- data/tools/tlmviewer/LabelvaluelimitsbarWidget-BT5k9mHv-508a0dbfc5b96e4547f5.js +1 -0
- data/tools/tlmviewer/LabelvaluelimitscolumnWidget-DUbmxh4p-3e5d03fac703dc10f4d7.js +1 -0
- data/tools/tlmviewer/LabelvaluerangebarWidget-DexAc2UB-eac267b099c92fc346ab.js +1 -0
- data/tools/tlmviewer/Layout-Dd6dRf3R-b728ae855a72ee3a6f88.js +1 -0
- data/tools/tlmviewer/LedWidget-D1RwHb_V-8d1ba86bac93200321d5.js +1 -0
- data/tools/tlmviewer/LimitsbarWidget-ClOmoV50-1e29d233031f9cda7d1c.js +1 -0
- data/tools/tlmviewer/LimitscolorWidget-CBUoEYKp-dabd1e90e1c965a8ec0b.js +1 -0
- data/tools/tlmviewer/LimitscolumnWidget-hsHkmY-_-bee4ce8a52c9b9b1bb40.js +1 -0
- data/tools/tlmviewer/LinegraphWidget-CXrKtxOo-a0d534070921ad322098.js +1 -0
- data/tools/tlmviewer/MatrixbycolumnsWidget-CsogVU9c-6d78593c792549900f43.js +1 -0
- data/tools/tlmviewer/ProgressbarWidget-CO6CEkxP-ff67d476dbceb502ac3e.js +1 -0
- data/tools/tlmviewer/RadiobuttonWidget-DrxUclws-7eee2376690fe40824a3.js +1 -0
- data/tools/tlmviewer/RadiogroupWidget-DN9C38cg-aa785639e5f326965c5a.js +1 -0
- data/tools/tlmviewer/RangebarWidget-5uQTfLMP-e99b7be3b16891e1dc82.js +1 -0
- data/tools/tlmviewer/RollupWidget-B0DCULnu-3f84b47dce13f7146ca7.js +1 -0
- data/tools/tlmviewer/ScrollwindowWidget-BOkZQgtf-31847a9f7a452b6be6d7.js +1 -0
- data/tools/tlmviewer/SignalWidget-Cis0Xkea-d9c36113dd2823fb96fe.js +1 -0
- data/tools/tlmviewer/SpacerWidget-CLcqC2Qk-ead77c271d5c154af8bb.js +1 -0
- data/tools/tlmviewer/SparklineWidget-CTp83eZ--b6dafe8dfd08bace917a.js +1 -0
- data/tools/tlmviewer/TabbookWidget-uucd-zsX-161716d9178a4fa5e913.js +1 -0
- data/tools/tlmviewer/TextboxWidget-C2n38ti5-b2fd892231875cabd3b6.js +1 -0
- data/tools/tlmviewer/TextfieldWidget--HTv9ddk-aa20bd71c7697dfd0228.js +1 -0
- data/tools/tlmviewer/TimeWidget-CPNVZaUM-cc58a9ad433746241d04.js +1 -0
- data/tools/tlmviewer/TitleWidget-Cp0cb6V8-691339e154868f06e9f2.js +1 -0
- data/tools/tlmviewer/TlmViewer-3c27570303ac666f19f1.js +36 -0
- data/tools/tlmviewer/VWidget-DQGJRgAk-27921a1de1d83689ad21.js +1 -0
- data/tools/tlmviewer/ValueWidget-Bk1RFjks-5b3d6b75ae32e7000bc0.js +1 -0
- data/tools/tlmviewer/ValuelimitsbarWidget-C0HIBYh2-58d8af8375803d496be4.js +1 -0
- data/tools/tlmviewer/ValuelimitscolumnWidget-BTT90uyX-d2b27c4e49cbecf95fa7.js +1 -0
- data/tools/tlmviewer/ValuerangebarWidget-CcQw_XK9-b4a3435f42aab27bbc10.js +1 -0
- data/tools/tlmviewer/VerticalWidget-CNtFQv3R-89bf2620fced1fe99924.js +1 -0
- data/tools/tlmviewer/VerticalboxWidget-Yxmz1SnU-f0e1193ac16ad5dfa754.js +1 -0
- data/tools/tlmviewer/Widget-LsyjS7ZS-9ca8d29f10dcb40e96a7.js +1 -0
- data/tools/tlmviewer/main-f08069f808acae6d42ff.js +1505 -0
- data/tools/tlmviewer/main.js +1 -1
- metadata +69 -69
- data/tools/tlmviewer/ArrayWidget-FGjLmPfG-33c4b50ca43c63f5be92.js +0 -2
- data/tools/tlmviewer/ArrayplotWidget-Cfo18TYm-e11fc006545355920625.js +0 -1
- data/tools/tlmviewer/BarColumn-BuJ6MTYG-61ddf5a5c098a056f820.js +0 -1
- data/tools/tlmviewer/BlockWidget-B_JwY8-N-5b31c605726e23d767b8.js +0 -2
- data/tools/tlmviewer/ButtonWidget-Cd4M3aBD-e11204e2446175cfb86f.js +0 -2
- data/tools/tlmviewer/CanvasWidget-CpKdOgTG-8ca53fdc524882c78723.js +0 -1
- data/tools/tlmviewer/CanvasdotWidget-zYbI5LAw-b32c8d94146d2aa09d75.js +0 -1
- data/tools/tlmviewer/CanvasimageWidget--ORQEPj6-3ef2ce7db1a63e58f33c.js +0 -1
- data/tools/tlmviewer/CanvasimagevalueWidget-CtAtYHRm-33314cc825d95fdfca3e.js +0 -1
- data/tools/tlmviewer/CanvaslabelWidget-DWoROb6o-bf7949692a86616fbec1.js +0 -1
- data/tools/tlmviewer/CanvaslabelvalueWidget-A4UbtwEc-663e040405f84ba375d2.js +0 -1
- data/tools/tlmviewer/CanvaslineWidget-BBGi0nrb-47962e92ceab57678ac8.js +0 -1
- data/tools/tlmviewer/CanvaslinevalueWidget-C_9OkL7f-92266638a0db16ed53d0.js +0 -1
- data/tools/tlmviewer/CheckbuttonWidget-CTJg8Ypg-92089616f65896fbe08b.js +0 -1
- data/tools/tlmviewer/ComboboxWidget-DWiMZZk8-ec1217981f8ce99a69ea.js +0 -1
- data/tools/tlmviewer/DateWidget-C7GSh68_-b5d7eee657007fccfa38.js +0 -1
- data/tools/tlmviewer/DetailsDialog-B2l0BNc2-38716dc7bc1a06181b5a.js +0 -1
- data/tools/tlmviewer/DynamicWidget-CfMtj7H8-c1f5923973de526a2cf7.js +0 -1
- data/tools/tlmviewer/FormatvalueWidget-CZJdsUAq-d189466ad3093a8e1256.js +0 -1
- data/tools/tlmviewer/Graph-DZBpdSgR-b28b113a90a8fa1410fb.js +0 -1
- data/tools/tlmviewer/GraphWidget-CHm4bhMI-13fb42cb25edd202eca2.js +0 -1
- data/tools/tlmviewer/HorizontalWidget-B2skpV1m-33838f6c4aa71f934a05.js +0 -1
- data/tools/tlmviewer/HorizontalboxWidget-BI0WZP5M-33780761348689976ac7.js +0 -1
- data/tools/tlmviewer/HorizontallineWidget-AmxVeXcU-529c8226299bda8f66ff.js +0 -1
- data/tools/tlmviewer/IframeWidget-DcqRMhyW-3d0a0315290a915aff87.js +0 -1
- data/tools/tlmviewer/ImageLoader-ly4zoGpO-b732431f8982ac8655f1.js +0 -1
- data/tools/tlmviewer/ImageviewerWidget-cmDHcmW4-4d682f449773d8077acf.js +0 -1
- data/tools/tlmviewer/LabelWidget-Bemw8Erq-c12821218a1198d5ea4f.js +0 -1
- data/tools/tlmviewer/LabelledWidget-Cb7EvtUG-675787601404cb44ddb8.js +0 -1
- data/tools/tlmviewer/LabelprogressbarWidget-qYgrGqLY-06186176f5d5b43bc367.js +0 -1
- data/tools/tlmviewer/LabelsparklineWidget-CMklq9-f-164e9b776da269c98d3c.js +0 -1
- data/tools/tlmviewer/LabelvalueWidget-NjCMgiYL-7fd671ef62b455cd1329.js +0 -1
- data/tools/tlmviewer/LabelvaluedescWidget-Dflulqm7-358e189b4f638da09fff.js +0 -1
- data/tools/tlmviewer/LabelvaluelimitsbarWidget-M34NDk2S-4657c6d796896cfa18a2.js +0 -1
- data/tools/tlmviewer/LabelvaluelimitscolumnWidget-Cchaw_-k-99ab2c9d9aff72cf52b7.js +0 -1
- data/tools/tlmviewer/LabelvaluerangebarWidget-7pEykAm3-605d89aee8cae2019daf.js +0 -1
- data/tools/tlmviewer/Layout-BNvQKlyy-3342d811b75af8760a44.js +0 -1
- data/tools/tlmviewer/LedWidget-_EA7ZKM8-ba153c0fbe194920f15a.js +0 -1
- data/tools/tlmviewer/LimitsbarWidget-DdoQf46y-8fa79adc9de697482ea4.js +0 -1
- data/tools/tlmviewer/LimitscolorWidget-Cv0umnVo-2dec851202bcb16a7665.js +0 -1
- data/tools/tlmviewer/LimitscolumnWidget-CnCQtxim-7b960b8954d35c205e16.js +0 -1
- data/tools/tlmviewer/LinegraphWidget-ekyQoR7x-91742c882576af8717c7.js +0 -1
- data/tools/tlmviewer/MatrixbycolumnsWidget-IBUcGNF7-40981954e6f5a5eb7c59.js +0 -1
- data/tools/tlmviewer/ProgressbarWidget-CnveFZVh-559642d924b69c09fb5a.js +0 -1
- data/tools/tlmviewer/RadiobuttonWidget-hWLrCb8W-41fbc2841eb00ec4f7d1.js +0 -1
- data/tools/tlmviewer/RadiogroupWidget-DK1fphkh-cb969ee4b1f3bd4cfef0.js +0 -1
- data/tools/tlmviewer/RangebarWidget-vspY8CGV-fa098f3cde349443390a.js +0 -1
- data/tools/tlmviewer/RollupWidget-07pNcXQV-50843a7d170ac1d09de0.js +0 -1
- data/tools/tlmviewer/ScrollwindowWidget-BcbyrYUo-5fc7c51bc14d5188ba75.js +0 -1
- data/tools/tlmviewer/SignalWidget-BDp5sUHj-bdaf37bf14e92e28906a.js +0 -1
- data/tools/tlmviewer/SpacerWidget-DcOnQ1yI-4190925734745dfb8c64.js +0 -1
- data/tools/tlmviewer/SparklineWidget-CVglnlAm-bbf8a335acef6e7a1187.js +0 -1
- data/tools/tlmviewer/TabbookWidget-p51Oa7Ru-afb4768cad876ed479d6.js +0 -1
- data/tools/tlmviewer/TextboxWidget-DM-XX97e-13b2fc8c1769315924a5.js +0 -1
- data/tools/tlmviewer/TextfieldWidget-7cYHAgH8-229a48787531f8a8a3ab.js +0 -1
- data/tools/tlmviewer/TimeWidget-EvQJyu6x-3f89b0019445be1a6783.js +0 -1
- data/tools/tlmviewer/TitleWidget-6ddfJuqd-c44df75b38ff8ee1a0f2.js +0 -1
- data/tools/tlmviewer/TlmViewer-ccfa0c0f5907066b3ce8.js +0 -36
- data/tools/tlmviewer/VWidget-P-X9ffkl-54f1ab70a097e57bdae1.js +0 -1
- data/tools/tlmviewer/ValueWidget-DAUGuQ9f-9656e0646dfd84ed1011.js +0 -1
- data/tools/tlmviewer/ValuelimitsbarWidget-DmLUXw0I-f3924d7447adfbee5bb3.js +0 -1
- data/tools/tlmviewer/ValuelimitscolumnWidget-DDmo8wHJ-a3eb193e8390f0c53347.js +0 -1
- data/tools/tlmviewer/ValuerangebarWidget-CbzWSWq3-2bf7ca373a4ce5945172.js +0 -1
- data/tools/tlmviewer/VerticalWidget-BuKinn_c-303c1d6ad6902a435cf0.js +0 -1
- data/tools/tlmviewer/VerticalboxWidget-C0zD5h0O-280d62e5499a89b0c4ae.js +0 -1
- data/tools/tlmviewer/Widget-BIXl-Pk5-b44cd0166c185fc6b31c.js +0 -1
- data/tools/tlmviewer/main-30d09f99602bb7f91da2.js +0 -1504
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./VWidget-DQGJRgAk-27921a1de1d83689ad21.js","vue","./main-f08069f808acae6d42ff.js","./Widget-LsyjS7ZS-9ca8d29f10dcb40e96a7.js","vue-router","single-spa","vuex","vuetify"],function(o,d){"use strict";var l,n,r,a,s,i;return{setters:[t=>{l=t.h},t=>{n=t.resolveComponent,r=t.createBlock,a=t.openBlock,s=t.normalizeStyle},t=>{i=t.d},null,null,null,null,null],execute:function(){const t={mixins:[l],props:{value:{default:null}},data:function(){return{item:null,oneBar:30,twoBar:60,threeBar:90}},computed:{displayedIcon:function(){let e="mdi-signal-cellular-outline";return this._value>=this.oneBar&&(e="mdi-signal-cellular-1"),this._value>=this.twoBar&&(e="mdi-signal-cellular-2"),this._value>=this.threeBar&&(e="mdi-signal-cellular-3"),e}},created(){this.appliedSettings.forEach(e=>{switch(e[0].toUpperCase()){case"SCREEN":this.screenTarget=e[1],this.screenName=e[2];break;case"VALUES":this.oneBar=parseFloat(e[1]),this.twoBar=parseFloat(e[2]),this.threeBar=parseFloat(e[3]);break}})},methods:{getType(){let e="CONVERTED";return this.parameters[3]=="RAW"&&(e="RAW"),e},clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}};function u(e,m,g,v,B,c){const h=n("v-btn");return a(),r(h,{icon:c.displayedIcon,variant:"text",style:s(e.computedStyle),"aria-label":"Signal Strength",onClick:c.clickHandler},null,8,["icon","style","onClick"])}const p=o("default",i(t,[["render",u]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-9ca8d29f10dcb40e96a7.js","vue","./main-f08069f808acae6d42ff.js","vue-router","single-spa","vuex","vuetify"],function(l,o){"use strict";var t,s,n,i,r;return{setters:[e=>{t=e.o},e=>{s=e.createElementBlock,n=e.openBlock,i=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:function(){const e={mixins:[t],created(){this.parameters[0]!==void 0&&this.appliedSettings.push(["WIDTH",this.parameters[0]]),this.parameters[1]!==void 0&&this.appliedSettings.push(["HEIGHT",this.parameters[1]])}};function u(a,p,d,m,h,v){return n(),s("div",{style:i(a.computedStyle)},null,4)}const c=l("default",r(e,[["render",u]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./GraphWidget-Cb6Ozf54-b287b67159e80eb66c32.js","./main-f08069f808acae6d42ff.js","vue","./Graph-BliBYJxD-8cbac835bd4120c02a9f.js","single-spa","./Widget-LsyjS7ZS-9ca8d29f10dcb40e96a7.js","vue-router","vuex","vuetify"],function(l,c){"use strict";var i,s,n,r,a,d,o;return{setters:[e=>{i=e.M},e=>{s=e.d},e=>{n=e.resolveComponent,r=e.createBlock,a=e.openBlock,d=e.normalizeStyle},e=>{o=e.S},null,null,null,null,null],execute:function(){const e={components:{Graph:o},mixins:[i],data:function(){return{secondsGraphed:300,pointsSaved:300,pointsGraphed:300,size:{height:30,width:130}}}};function p(t,g,m,v,S,f){const h=n("graph");return a(),r(h,{ref:"graph"+t.id,id:t.id,state:t.state,"selected-graph-id":t.id,startTime:t.startTime,"seconds-graphed":t.secondsGraphed,"points-saved":t.pointsSaved,"points-graphed":t.pointsGraphed,"initial-items":t.items,height:t.size.height,width:t.size.width,style:d(t.computedStyle),sparkline:""},null,8,["id","state","selected-graph-id","startTime","seconds-graphed","points-saved","points-graphed","initial-items","height","width","style"])}const u=l("default",s(e,[["render",p]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Layout-Dd6dRf3R-b728ae855a72ee3a6f88.js","vue","./main-f08069f808acae6d42ff.js","./Widget-LsyjS7ZS-9ca8d29f10dcb40e96a7.js","vue-router","single-spa","vuex","vuetify"],function(k,_){"use strict";var p,l,s,r,g,v,i,u,c,o,y,f,w,b,V;return{setters:[e=>{p=e.r},e=>{l=e.resolveComponent,s=e.createElementBlock,r=e.openBlock,g=e.createVNode,v=e.normalizeStyle,i=e.withCtx,u=e.Fragment,c=e.renderList,o=e.createBlock,y=e.createTextVNode,f=e.toDisplayString,w=e.resolveDynamicComponent,b=e.mergeProps},e=>{V=e.d},null,null,null,null,null],execute:function(){const e={mixins:[p],data:function(){return{curTab:null}},watch:{curTab:function(){this.$emit("min-max-screen")}}};function S(t,m,D,L,h,j){const T=l("v-tab"),x=l("v-tabs"),B=l("v-window-item"),C=l("v-window");return r(),s("div",null,[g(x,{modelValue:t.curTab,"onUpdate:modelValue":m[0]||(m[0]=a=>t.curTab=a),style:v(t.computedStyle)},{default:i(()=>[(r(!0),s(u,null,c(t.widgets,(a,d)=>(r(),o(T,{key:d},{default:i(()=>[y(f(a.parameters[0]),1)]),_:2},1024))),128))]),_:1},8,["modelValue","style"]),g(C,{modelValue:t.curTab,"onUpdate:modelValue":m[1]||(m[1]=a=>t.curTab=a)},{default:i(()=>[(r(!0),s(u,null,c(t.widgets,(a,d)=>(r(),o(B,{key:d},{default:i(()=>[(r(!0),s(u,null,c(a.widgets,(n,N)=>(r(),o(w(n.type),b({ref_for:!0},t.listeners,{key:`${d}-${N}`,target:n.target,parameters:n.parameters,settings:n.settings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,widgets:n.widgets,name:n.name,line:n.line,"line-number":n.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))]),_:2},1024))),128))]),_:1},8,["modelValue"])])}const z=k("default",V(e,[["render",S]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./main-f08069f808acae6d42ff.js","vue","./DetailsDialog-BNCS3QAe-24e1df788a7ea4e717c2.js","single-spa","./VWidget-DQGJRgAk-27921a1de1d83689ad21.js","vue-router","vuex","vuetify","./Widget-LsyjS7ZS-9ca8d29f10dcb40e96a7.js"],function(w,T){"use strict";var c,a,o,s,n,u,d,l,m,h,g,p,v,x,y,f;return{setters:[e=>{c=e.d},e=>{a=e.resolveComponent,o=e.createElementBlock,s=e.openBlock,n=e.createVNode,u=e.normalizeStyle,d=e.normalizeClass,l=e.withCtx,m=e.Fragment,h=e.renderList,g=e.createBlock,p=e.withModifiers,v=e.createTextVNode,x=e.toDisplayString},e=>{y=e.P},null,e=>{f=e.h},null,null,null,null],execute:function(){const e={components:{DetailsDialog:y},data:function(){return{width:200,height:200}},mixins:[f],computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height)},methods:{getType:function(){let t="CONVERTED";return this.parameters[5]&&(t=this.parameters[5]),t}}},C={class:"textbox-widget-container"};function k(t,r,E,L,F,S){const V=a("v-textarea"),D=a("v-list-item-title"),B=a("v-list-item"),_=a("v-list"),N=a("v-menu"),z=a("details-dialog");return s(),o("div",C,[n(V,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":t._value,class:d(t.valueClass),style:u([t.computedStyle,S.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),n(N,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=i=>t.contextMenuShown=i),target:[t.x,t.y]},{default:l(()=>[n(_,null,{default:l(()=>[(s(!0),o(m,null,h(t.contextMenuOptions,(i,M)=>(s(),g(B,{key:M,onClick:p(i.action,["stop"])},{default:l(()=>[n(D,null,{default:l(()=>[v(x(i.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),n(z,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=i=>t.viewDetails=i)},null,8,["target-name","packet-name","item-name","modelValue"])])}const j=w("default",c(e,[["render",k],["__scopeId","data-v-10f560aa"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-9ca8d29f10dcb40e96a7.js","vue","./main-f08069f808acae6d42ff.js","vue-router","single-spa","vuex","vuetify"],function(i,h){"use strict";var t,l,n,s,a,o;return{setters:[e=>{t=e.o},e=>{l=e.resolveComponent,n=e.createBlock,s=e.openBlock,a=e.normalizeStyle},e=>{o=e.d},null,null,null,null],execute:function(){const e={mixins:[t],data(){return{value:null}},created(){this.setWidth(this.parameters[0],"ch",12),this.parameters[1]&&(this.value=this.parameters[1])},methods:{text(){return this.value}}};function c(d,r,y,f,u,S){const m=l("v-text-field");return s(),n(m,{variant:"solo",density:"compact","single-line":"","hide-no-data":"","hide-details":"",modelValue:u.value,"onUpdate:modelValue":r[0]||(r[0]=v=>u.value=v),style:a(d.computedStyle)},null,8,["modelValue","style"])}const p=i("default",o(e,[["render",c]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-9ca8d29f10dcb40e96a7.js","./main-f08069f808acae6d42ff.js","vue","vue-router","single-spa","vuex","vuetify"],function(m,y){"use strict";var l,i,n,a,r,s,o;return{setters:[e=>{l=e.o},e=>{i=e.d,n=e.a},e=>{a=e.resolveComponent,r=e.createBlock,s=e.openBlock,o=e.normalizeStyle},null,null,null,null],execute:function(){const e={mixins:[l,n],data(){return{label:"Time",timeValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.timeValue=this.formatTimeHMS(new Date,this.screenTimeZone)},methods:{text(){return this.timeValue},time(){return this.timeValue}}};function c(d,u,f,v,t,S){const h=a("v-text-field");return s(),r(h,{modelValue:t.timeValue,"onUpdate:modelValue":u[0]||(u[0]=p=>t.timeValue=p),label:t.label,style:o(d.computedStyle),type:"time","hide-details":""},null,8,["modelValue","label","style"])}const V=m("default",i(e,[["render",c]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-9ca8d29f10dcb40e96a7.js","vue","./main-f08069f808acae6d42ff.js","vue-router","single-spa","vuex","vuetify"],function(a,m){"use strict";var t,r,n,l,s,o;return{setters:[e=>{t=e.o},e=>{r=e.createElementBlock,n=e.openBlock,l=e.normalizeStyle,s=e.toDisplayString},e=>{o=e.d},null,null,null,null],execute:function(){const e={mixins:[t],computed:{labelText(){return this.parameters[0]}},created(){if(this.parameters.length<1)throw new Error("Not enough parameters for TITLE.")}};function i(c,y,d,f,x,u){return n(),r("div",{class:"text-h5 text-center pa-1 mt-1 label",style:l(c.computedStyle)},s(u.labelText),5)}const p=a("default",o(e,[["render",i]]))}}});
|
@@ -0,0 +1,36 @@
|
|
1
|
+
System.register(["./main-f08069f808acae6d42ff.js","vue","vue-router","single-spa","vuex","vuetify"],function(ks,Vc){"use strict";var wt,Qi,Et,fi,er,tr,it,_i,ir,rr,nr,sr,T,F,R,or,b,x,G,Q,ee,we,Pe,q,Me,pi,K,kt,xt,Tt,At,Dt,ar;return{setters:[M=>{wt=M.d,Qi=M.z,Et=M.N,fi=M.W,er=M.P,tr=M.R,it=M.w,_i=M._,ir=M.p,rr=M.a,nr=M.b,sr=M.g},M=>{T=M.resolveComponent,F=M.createBlock,R=M.openBlock,or=M.Teleport,b=M.createVNode,x=M.withCtx,G=M.createElementVNode,Q=M.toDisplayString,ee=M.createElementBlock,we=M.Fragment,Pe=M.renderList,q=M.createTextVNode,Me=M.mergeProps,pi=M.createSlots,K=M.createCommentVNode,kt=M.normalizeStyle,xt=M.withDirectives,Tt=M.vShow,At=M.normalizeProps,Dt=M.guardReactiveProps,ar=M.withModifiers},null,null,null,null],execute:function(){var M=document.createElement("style");M.textContent=`.v-alert[data-v-65de44e6]{margin-bottom:0}.playback[data-v-821ac045]{text-align:center;color:#000;font-weight:700;background-color:#ff8c00}.v-application[data-v-821ac045]{margin-bottom:120px}.v-expansion-panel-text .container[data-v-821ac045]{margin:0}.v-expansion-panel-title[data-v-821ac045]{min-height:10px;padding:5px}.grid[data-v-821ac045]{position:relative}.item[data-v-821ac045]{position:absolute;display:block;margin:5px;z-index:1}.item.muuri-item-dragging[data-v-821ac045]{z-index:3}.item.muuri-item-releasing[data-v-821ac045]{z-index:2}.item.muuri-item-hidden[data-v-821ac045]{z-index:0}.item-content[data-v-821ac045]{position:relative;cursor:pointer;border-radius:6px}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(M);const lr="openc3-ace-vim-mode-enabled",mi="ace/keyboard/vim",cr="openc3-ace-default-scripting-language",hr={isVimModeEnabled(){return localStorage.getItem(lr)==="true"},setVimMode(e){localStorage.setItem(lr,JSON.stringify(!!e))},toggleVimMode(e){this.isVimModeEnabled()?(e.setKeyboardHandler(null),this.setVimMode(!1)):(e.setKeyboardHandler(mi),this.setVimMode(!0)),e.focus()},applyVimModeIfEnabled(e,{saveFn:t}={}){this.isVimModeEnabled()?(e.setKeyboardHandler(mi),ace.config.loadModule(mi,i=>{i.CodeMirror.Vim.defineEx("write","w",r=>{typeof t=="function"?t():r.ace.execCommand("save")})})):e.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(cr)||"python"},setDefaultScriptingLanguage(e){(e==="ruby"||e==="python")&&localStorage.setItem(cr,e)}},xs={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()},subMenuClick(e){e.command(e),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},Ts={class:"app-title mr-2"};function As(e,t,i,r,n,s){const o=T("v-col"),a=T("v-row"),l=T("v-icon"),c=T("v-btn"),h=T("v-divider"),d=T("v-list-item-title"),y=T("v-list-item"),f=T("v-list"),g=T("v-menu"),u=T("v-radio"),p=T("v-list-item-action"),w=T("v-radio-group"),v=T("v-checkbox");return R(),F(or,{to:"#openc3-menu"},[b(a,{"no-gutters":""},{default:x(()=>[b(o,{"align-self":"end"},{default:x(()=>[G("span",Ts,Q(i.title),1)]),_:1})]),_:1}),b(a,{dense:"",class:"flex-nowrap"},{default:x(()=>[(R(!0),ee(we,null,Pe(i.menus,(E,k)=>(R(),F(g,{ref_for:!0,ref:"topmenu",key:k},{activator:x(({props:m})=>[b(c,Me({ref_for:!0},m,{variant:"outlined",class:"mx-1 menu-button",text:E.label,"data-test":s.formatDT(`${i.title} ${E.label}`)}),{append:x(()=>[b(l,{class:"menu-button-icon"},{default:x(()=>[...t[0]||(t[0]=[q(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:x(()=>[b(f,null,{default:x(()=>[(R(!0),ee(we,null,Pe(E.items,(m,D)=>(R(),ee(we,null,[m.divider?(R(),F(h,{key:D+"-divider"})):m.subMenu&&m.subMenu.length>0?(R(),ee("div",{key:D+"-submenu"},[(R(),F(g,{"open-on-hover":"",location:"right",key:D},{activator:x(({props:L})=>[(R(),F(y,Me({ref_for:!0},L,{disabled:m.disabled,key:D}),pi({append:x(()=>[b(l,null,{default:x(()=>[...t[1]||(t[1]=[q(" mdi-chevron-right ",-1)])]),_:1})]),default:x(()=>[!m.radio&&!m.checkbox?(R(),F(d,{key:0,style:kt("cursor: pointer;"+(m.disabled?"opacity: 0.2":""))},{default:x(()=>[q(Q(m.label),1)]),_:2},1032,["style"])):K("",!0)]),_:2},[m.icon?{name:"prepend",fn:x(()=>[b(l,{disabled:m.disabled},{default:x(()=>[q(Q(m.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:x(()=>[b(f,null,{default:x(()=>[(R(!0),ee(we,null,Pe(m.subMenu,(L,X)=>(R(),F(y,{key:X,"prepend-icon":L.icon,onClick:P=>s.subMenuClick(L)},{default:x(()=>[b(d,null,{default:x(()=>[q(Q(L.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):m.radioGroup?(R(),F(w,{"model-value":m.value,"onUpdate:modelValue":m.command,key:D+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:x(()=>[(R(!0),ee(we,null,Pe(m.choices,(L,X)=>(R(),F(y,{key:X+"-choice"},{default:x(()=>[b(p,{class:"list-action"},{default:x(()=>[b(u,{color:"secondary",label:L.label,value:L.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(R(),F(y,{onClick:L=>m.command(m),disabled:m.disabled,"data-test":s.formatDT(`${i.title} ${E.label} ${m.label}`),key:D+"-list"},pi({default:x(()=>[m.checkbox?(R(),F(p,{key:0,class:"list-action"},{default:x(()=>[b(v,{modelValue:m.checked,"onUpdate:modelValue":L=>m.checked=L,label:m.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):K("",!0),!m.radio&&!m.checkbox?(R(),F(d,{key:1,style:kt("cursor: pointer;"+(m.disabled?"opacity: 0.2":""))},{default:x(()=>[q(Q(m.label),1)]),_:2},1032,["style"])):K("",!0)]),_:2},[m.icon?{name:"prepend",fn:x(()=>[b(l,{icon:m.icon,disabled:m.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const Ds=wt(xs,[["render",As],["__scopeId","data-v-4d454b93"]]);class Cs{constructor(){Et.get("/openc3-api/autocomplete/data/screen").then(t=>{this.autocompleteData=t.data}),this.api=new fi}async getCompletions(t,i,r,n,s){let o=i.getLine(r.row).slice(0,r.column).trimStart().split(/ (?![^<]*>)/),a=this.autocompleteData;o.length>1&&(a=a.find(h=>h.caption===o[0]));let l={},c=!0;if(a&&a.params){a.params.length==o.length-1&&(c=!1);let h=a.params[o.length-2];if(h["Target name"])a=(await this.api.get_target_names()).reduce((d,y)=>(d[y]=1,d),{});else if(h["Packet name"]){let d=o[o.length-2];a=(await this.api.get_all_tlm(d)).reduce((y,f)=>(y[f.packet_name]=f.description,y),{})}else if(h["Item name"]){let d=o[o.length-3],y=o[o.length-2];a=(await this.api.get_tlm(d,y)).items.reduce((f,g)=>(f[g.name]=g.description,f),{})}else a=h;l=Object.keys(a||{}).map(d=>{let y={value:d+(c?" ":""),command:c&&"startAutocomplete"};return typeof a[d]=="string"&&(y.meta=a[d]),y})}else l=a;s(null,l)}}const Rs={props:{modelValue:Boolean,target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},errors:{type:Array,default:()=>[]}},emits:["cancel","delete","save","update:modelValue"],data(){return{file:null,docsKeyword:"",contextMenu:!1,menuX:0,menuY:0}},computed:{editErrors:function(){if(this.definition===""&&!this.file)return["Input can not be blank."];if(this.errors.length!==0){let e=new Set,t=[];const i=this.errors.toSorted((r,n)=>r.lineNumber-n.lineNumber);for(const r of i){let n=`At ${r.lineNumber}: (${r.line}) ${r.message}.`;r.usage&&(n+=` Usage: ${r.usage}`),t.push(n),e.add(r.message)}return t}return[]},show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},mounted:function(){this.editor=it.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const e=this.buildScreenMode();this.editor.session.setMode(new e),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 Cs],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.definition),this.editor.clearSelection(),hr.applyVimModeIfEnabled(this.editor),this.editor.focus()},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{toggleVimMode:function(){hr.toggleVimMode(this.editor)},showContextMenu:function(e){this.menuX=e.pageX,this.menuY=e.pageY;let t=this.editor.getCursorPosition(),i=this.editor.session.getTokenAt(t.row,t.column);if(i){let r=i.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},buildScreenMode(){let e=it.require("ace/lib/oop"),t=it.require("ace/mode/text_highlight_rules").TextHighlightRules,i=this.keywords.join("|"),r=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"\\b\\d+(?:\\.\\d+)?\\b"},{token:"keyword",regex:new RegExp(`^\\s*(${i})\\b`)}]},this.normalizeRules()};e.inherits(r,t);let n=function(){this.HighlightRules=r},s=it.require("ace/mode/text").Mode;return e.inherits(n,s),(function(){this.$id="ace/mode/openc3"}).call(n.prototype),n},downloadScreen:function(){const e=new Blob([this.editor.getValue()],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(e),t.setAttribute("download",`${this.screen.toLowerCase()}.txt`),t.click()},loadFile:function(){const e=new FileReader;e.readAsText(this.file);const t=this;e.onload=function(){t.editor.setValue(e.result),t.file=null}},deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(e=>{this.$emit("delete")})}}},Is=["textContent"];function Os(e,t,i,r,n,s){const o=T("v-btn"),a=T("v-spacer"),l=T("v-toolbar"),c=T("v-row"),h=T("v-file-input"),d=T("v-list-item-title"),y=T("v-list-item"),f=T("v-divider"),g=T("v-list"),u=T("v-menu"),p=T("v-card-text"),w=T("v-card"),v=T("v-dialog");return R(),F(v,{modelValue:s.show,"onUpdate:modelValue":t[5]||(t[5]=E=>s.show=E),persistent:"",width:"75vw"},{default:x(()=>[b(w,null,{default:x(()=>[b(l,{height:"24"},{default:x(()=>[b(o,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:s.deleteScreen},null,8,["onClick"]),b(a),G("span",null," Edit Screen: "+Q(i.target)+" "+Q(i.screen),1),b(a),b(o,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-screen-icon",onClick:s.downloadScreen},null,8,["onClick"])]),_:1}),b(p,{style:{"max-height":"90vh"}},{default:x(()=>[b(c,{class:"mt-3"},{default:x(()=>[...t[6]||(t[6]=[q(" Upload a screen file. ",-1)])]),_:1}),b(c,{"no-gutters":"",align:"center"},{default:x(()=>[b(o,{disabled:!n.file,color:"primary",class:"mr-3","data-test":"edit-screen-load",onClick:s.loadFile},{default:x(()=>[...t[7]||(t[7]=[q(" Load ",-1)])]),_:1},8,["disabled","onClick"]),b(h,{modelValue:n.file,"onUpdate:modelValue":t[0]||(t[0]=E=>n.file=E),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file."},null,8,["modelValue"])]),_:1}),b(c,{class:"mb-2"},{default:x(()=>[...t[8]||(t[8]=[q(" Edit the screen definition. ",-1)])]),_:1}),b(c,{class:"mb-2"},{default:x(()=>[G("pre",{ref:"editor",class:"editor",onContextmenu:t[1]||(t[1]=ar((...E)=>s.showContextMenu&&s.showContextMenu(...E),["prevent"]))},null,544),b(u,{modelValue:n.contextMenu,"onUpdate:modelValue":t[2]||(t[2]=E=>n.contextMenu=E),target:[n.menuX,n.menuY]},{default:x(()=>[b(g,null,{default:x(()=>[b(y,{link:""},{default:x(()=>[b(d,{onClick:s.openDocumentation},{default:x(()=>[q(Q(n.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),b(f),b(y,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:s.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),b(c,{style:{"max-height":"120px","overflow-y":"auto"}},{default:x(()=>[(R(!0),ee(we,null,Pe(s.editErrors,(E,k)=>(R(),ee("div",{key:k},[G("span",{class:"text-red",textContent:Q(E)},null,8,Is)]))),128))]),_:1}),b(c,{class:"mt-5"},{default:x(()=>[t[11]||(t[11]=G("span",null," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)),b(a),b(o,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:t[3]||(t[3]=E=>e.$emit("cancel"))},{default:x(()=>[...t[9]||(t[9]=[q(" Cancel ",-1)])]),_:1}),b(o,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:t[4]||(t[4]=E=>e.$emit("save",e.editor.getValue()))},{default:x(()=>[...t[10]||(t[10]=[q(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Ls=wt(Rs,[["render",Os],["__scopeId","data-v-65b25a74"]]),gi=20,Ns={components:{EditScreenDialog:Ls},mixins:[Qi],props:{target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},initialFloated:{type:Boolean,default:!1},initialTop:{type:Number,default:0},initialLeft:{type:Number,default:0},initialZ:{type:Number,default:0},minZ:{type:Number,default:0},fixFloated:{type:Boolean,default:!1},count:{type:Number,default:0},showClose:{type:Boolean,default:!0},timeZone:{type:String,default:"local"},inline:{type:Boolean,default:!1},playbackMode:{type:String,default:"realtime"},playbackDateTime:{type:Date,default:null}},emits:["close-screen","delete-screen","drag-screen","edit-screen","float-screen","min-max-screen","unfloat-screen"],data(){return{api:null,backup:"",currentDefinition:this.definition,editDialog:!1,expand:!0,configParser:null,currentLayout:null,layoutStack:[],namedWidgets:{},dynamicWidgets:[],width:null,height:null,staleTime:30,cacheTimeout:.1,globalSettings:[],substitute:!1,original_target_name:null,force_substitute:!1,pollingPeriod:1,errors:[],errorDialog:!1,screenKey:null,dragX:0,dragY:0,floated:this.initialFloated,top:this.initialTop,left:this.initialLeft,zIndex:this.initialZ,changeCounter:0,screenItems:[],actualScreenItems:[],screenValues:{},updateCounter:0,updater:null,screenId:tr.uniqueId("openc3-screen_"),tlmAvailableTimeout:null}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let e=new Set,t="";for(const i of this.errors){if(e.has(i.message))continue;let r=`${i.time}: (${i.type}) ${i.message}
|
3
|
+
`;t+=r,e.add(i.message)}return t}return null},computedStyle(){var e;let t={};const i=this.width||((e=this.$refs.bar)==null?void 0:e.clientWidth);return this.floated&&(t.position="absolute",t.top=this.top+"px",t.left=this.left+"px",t.width=i+"px"),t}},watch:{count:{handler(e,t){this.currentDefinition=this.definition,this.rerender()}},playbackDateTime:{handler(e,t){this.playbackMode==="playback"&&e&&this.update()}},playbackMode:{handler(e,t){e==="realtime"?this.updateRefreshInterval():(clearInterval(this.updater),this.updater=null)}}},errorCaptured(e,t,i){return this.errors.length<gi&&(e.usage?this.errors.push({type:"usage",message:e.message,usage:e.usage,line:e.line,lineNumber:e.lineNumber,time:new Date().getTime()}):this.errors.push({type:"error",message:e,time:new Date().getTime()})),!1},created(){this.api=new fi,this.configParser=new er,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){this.playbackMode==="realtime"&&this.updateRefreshInterval(),this.floated&&(this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null),this.tlmAvailableTimeout!=null&&(clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=null)},methods:{open(e,t){this.$parent.showScreen(e,t)},close(e,t){this.$parent.closeScreenByName(e,t)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[]},updateRefreshInterval:function(){let e=this.pollingPeriod*1e3;this.updater&&clearInterval(this.updater),this.updater=setInterval(()=>{this.update()},e)},parseDefinition:function(){if(this.clearErrors(),this.screenItems=[],this.namedWidgets={},this.layoutStack=[],this.dynamicWidgets=[],this.layoutStack.push({type:"VerticalWidget",parameters:[],widgets:[]}),this.currentLayout=this.layoutStack[this.layoutStack.length-1],this.configParser.parse_string(this.currentDefinition,"",!1,!0,(e,t,i,r)=>{if(e)switch(e){case"SCREEN":this.configParser.verify_num_parameters(3,4,`${e} <Width or AUTO> <Height or AUTO> <Polling Period>`),this.width=parseInt(t[0]),this.height=parseInt(t[1]),this.pollingPeriod=parseFloat(t[2]);break;case"END":this.configParser.verify_num_parameters(0,0,`${e}`),this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":this.configParser.verify_num_parameters(1,1,`${e} <Time (s)>`),this.staleTime=parseInt(t[0]);break;case"SUBSETTING":this.configParser.verify_num_parameters(3,null,`${e} <Index> <Widget Type> <Widget Settings...>`),t[1]==="RAW"&&(t[1]="RAW__"+t[2].toLowerCase());case"SETTING":this.configParser.verify_num_parameters(2,null,`${e} <Widget Type> <Widget Settings...>`),t[0]==="RAW"&&(t[0]="RAW__"+t[1].toLowerCase()),(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(t);break;case"GLOBAL_SUBSETTING":this.configParser.verify_num_parameters(3,null,`${e} <Index> <Widget Type> <Widget Settings...>`),t[2]==="RAW"&&(t[2]="RAW__"+t[3].toLowerCase());case"GLOBAL_SETTING":this.configParser.verify_num_parameters(2,null,`${e} <Widget Type> <Widget Settings...>`),t[1]==="RAW"&&(t[1]="RAW__"+t[2].toLowerCase()),this.globalSettings.push(t);break;default:this.processWidget(e,t,i,r);break}}),typeof this.layoutStack[0]>"u"){let e=[],t=[];for(const i of this.dynamicWidgets)e.push(i.name),t.push(i.lineNumber);this.errors.length<gi&&this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${e.join(",")}?`,lineNumber:t.join(","),time:new Date().getTime()}),this.layoutStack[0]={type:"VerticalWidget",parameters:[],widgets:[]}}else this.applyGlobalSettings(this.layoutStack[0].widgets)},openEdit:function(){this.backup=this.currentDefinition.repeat(1),this.editDialog=!0},upScreen:function(){this.zIndex+=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},downScreen:function(){this.zIndex>this.minZ&&(this.zIndex-=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex]))},floatScreen:function(){if(this.floated)this.$refs.bar.onmousedown=null,this.$refs.bar.parentElement.parentElement.style="z-index: 0",this.floated=!1,this.$emit("unfloat-screen",[this.floated,this.top,this.left,this.zIndex]);else{let e=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),t=this.$refs.bar.getBoundingClientRect();this.top=t.top-e.top-5,this.left=t.left-e.left-5,this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.floated=!0,this.$emit("float-screen",[this.floated,this.top,this.left,this.zIndex])}},dragMouseDown:function(e){e=e||window.event,e.preventDefault(),this.dragX=e.clientX,this.dragY=e.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag:function(e){e=e||window.event,e.preventDefault();let t=this.dragX-e.clientX,i=this.dragY-e.clientY;this.dragX=e.clientX,this.dragY=e.clientY,this.top=this.$refs.bar.offsetTop-i,this.left=this.$refs.bar.offsetLeft-t,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},closeDragElement:function(){document.onmouseup=null,document.onmousemove=null},rerender:function(){this.parseDefinition(),this.updateRefreshInterval(),this.screenKey=Math.floor(Math.random()*1e6),this.$nextTick(function(){this.clearErrors(),this.$emit("edit-screen")})},cancelEdit:function(){this.file=null,this.editDialog=!1,this.currentDefinition=this.backup,this.rerender()},saveEdit:function(e){this.editDialog=!1,this.currentDefinition=e,this.rerender(),this.$nextTick(function(){Et.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0)})},deleteScreen:function(){this.editDialog=!1,Et.delete(`/openc3-api/screen/${this.target}/${this.screen}`).then(e=>{this.$emit("delete-screen")})},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(e,t,i,r){let n=null;e==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${e} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),n=t[0].toUpperCase(),e=t[1].toUpperCase(),t=t.slice(2,t.length));const s=e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()+"Widget";let o=[];if(o.push(["__SCREEN_ID__",this.screenId]),n!==null&&o.push(["NAMED_WIDGET",n]),e==="VERTICAL"||e==="VERTICALBOX"||e==="HORIZONTAL"||e==="HORIZONTALBOX"||e==="MATRIXBYCOLUMNS"||e==="TABBOOK"||e==="TABITEM"||e==="CANVAS"||e==="RADIOGROUP"||e==="SCROLLWINDOW"){const a={type:s,parameters:t,settings:o,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(a),this.currentLayout.widgets.push(a),this.currentLayout=a}else if(this.$options.components[s])this.currentLayout.widgets.push({type:s,target:this.target,parameters:t,settings:o,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:i,lineNumber:r});else{let a={type:"DynamicWidget",target:this.target,parameters:t,settings:o,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:s,line:i,lineNumber:r};this.currentLayout.widgets.push(a),this.dynamicWidgets.push(a)}},applyGlobalSettings:function(e){e.forEach(t=>{this.globalSettings.forEach(i=>{t.type.toLowerCase()===i[0].toLowerCase()+"widget"&&(t.settings.find(r=>r[0]===i[1])||t.settings.push(i.slice(1)))}),t.widgets&&this.applyGlobalSettings(t.widgets)})},update:function(){let e=this.playbackMode==="playback"?this.playbackDateTime:null;this.actualScreenItems.length!==0&&this.api.get_tlm_values(this.actualScreenItems,this.staleTime,this.cacheTimeout,e).then(t=>{t&&t.length>0&&this.updateValues(t)}).catch(t=>{let i=JSON.stringify(t,null,2);this.errors.find(r=>r.message===i)||this.errors.length<gi&&this.errors.push({type:"error",message:i,time:new Date().getTime()})})},updateValues:function(e){if(this.updateCounter+=1,e.length!=this.screenItems.length||e.length!=this.actualScreenItems.length)console.log(`get_tlm_values mismatch: data.length: ${e.length}, screenItems.length: ${this.screenItems.length}, actualScreenItems.length: ${this.actualScreenItems.length}`,JSON.stringify(e),JSON.stringify(this.screenItems),JSON.stringify(this.actualScreenItems));else for(let t=0;t<e.length;t++)e[t].push(this.updateCounter),this.screenValues[this.screenItems[t]]=e[t]},debouncedUpdateTlmAvailable:function(){this.tlmAvailableTimeout!=null&&clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=setTimeout(()=>{this.api.get_tlm_available(this.screenItems).then(e=>{if(this.actualScreenItems=e,this.screenItems.length!=e.length)console.log("Error getting tlm available",this.screenItems,this.actualScreenItems);else for(let t=0;t<this.actualScreenItems.length;t++)if(this.actualScreenItems[t]===null){const i=this.screenItems[t].split("__"),r=this.currentDefinition.split(`
|
4
|
+
`),n=r.findIndex(s=>s.includes(i[0])&&s.includes(i[1])&&s.includes(i[2]))+1;n>0?this.errors.push({type:"usage",message:`Null for ${i.join(" ")}! Does it exist?`,line:r[n-1],lineNumber:n,time:new Date().getTime()}):this.errors.push({type:"error",message:`Null for ${i.join(" ")}! Does it exist?`,time:new Date().getTime()})}}).catch(e=>{console.log("Error getting tlm available",e),this.actualScreenItems=this.screenItems}),this.tlmAvailableTimeout=null},100)},addItem:function(e){this.screenItems.push(e),this.screenValues[e]=[null,null,0],this.debouncedUpdateTlmAvailable()},deleteItem:function(e){let t=this.screenItems.indexOf(e);this.screenItems.splice(t,1),this.debouncedUpdateTlmAvailable()}}},Ps={ref:"screen",class:"pa-1",style:{position:"relative"}},Ms={key:1,class:"pa-1",style:{position:"relative"}};function Vs(e,t,i,r,n,s){const o=T("v-btn"),a=T("v-tooltip"),l=T("v-spacer"),c=T("v-toolbar"),h=T("v-overlay"),d=T("vertical-widget"),y=T("v-expand-transition"),f=T("v-card"),g=T("edit-screen-dialog"),u=T("v-textarea"),p=T("v-card-actions"),w=T("v-dialog");return R(),ee("div",{ref:"bar",style:kt(s.computedStyle)},[i.inline?K("",!0):(R(),F(f,{key:0,"min-height":n.height,"min-width":n.width,style:{cursor:"default"}},{default:x(()=>[b(c,{height:"24"},{default:x(()=>[xt(b(o,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:t[0]||(t[0]=()=>{n.errorDialog=!0})},null,512),[[Tt,n.errors.length!==0]]),b(o,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:s.openEdit},null,8,["onClick"]),i.fixFloated?K("",!0):(R(),F(a,{key:0,"open-delay":600,location:"top"},{activator:x(({props:v})=>[G("div",At(Dt(v)),[b(o,{icon:n.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text",density:"compact","data-test":"float-screen-icon","aria-label":n.floated?"Unfloat Screen":"Float Screen",onClick:s.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:x(()=>[G("span",null,Q(n.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),n.floated?(R(),F(a,{key:1,"open-delay":600,location:"top"},{activator:x(({props:v})=>[G("div",At(Dt(v)),[b(o,{icon:"mdi-arrow-up",variant:"text",density:"compact","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:s.upScreen},null,8,["onClick"])],16)]),default:x(()=>[t[6]||(t[6]=G("span",null," Move Screen Up ",-1))]),_:1})):K("",!0),n.floated&&n.zIndex>i.minZ?(R(),F(a,{key:2,"open-delay":600,location:"top"},{activator:x(({props:v})=>[G("div",At(Dt(v)),[b(o,{icon:"mdi-arrow-down",variant:"text",density:"compact","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:s.downScreen},null,8,["onClick"])],16)]),default:x(()=>[t[7]||(t[7]=G("span",null," Move Screen Down ",-1))]),_:1})):K("",!0),b(l),G("span",null,Q(i.target)+" "+Q(i.screen),1),b(l),n.expand?(R(),F(o,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:s.minMaxTransition},null,8,["onClick"])):(R(),F(o,{key:4,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:s.minMaxTransition},null,8,["onClick"])),i.showClose?(R(),F(o,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:t[1]||(t[1]=v=>e.$emit("close-screen"))})):K("",!0)]),_:1}),n.editDialog?K("",!0):(R(),F(y,{key:0},{default:x(()=>[xt(G("div",Ps,[b(h,{style:{"pointer-events":"none"},"model-value":n.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),(R(),F(d,{key:n.screenKey,widgets:n.layoutStack[0].widgets,"screen-values":n.screenValues,"screen-time-zone":i.timeZone,onAddItem:s.addItem,onDeleteItem:s.deleteItem,onOpen:s.open,onClose:s.close,onCloseAll:s.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))],512),[[Tt,n.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),i.inline?(R(),ee("div",Ms,[b(h,{style:{"pointer-events":"none"},"model-value":n.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),xt(b(o,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:t[2]||(t[2]=()=>{n.errorDialog=!0})},null,512),[[Tt,n.errors.length!==0]]),(R(),F(d,{key:n.screenKey,widgets:n.layoutStack[0].widgets,"screen-values":n.screenValues,"screen-time-zone":i.timeZone,onAddItem:s.addItem,onDeleteItem:s.deleteItem,onOpen:s.open,onClose:s.close,onCloseAll:s.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))])):K("",!0),n.editDialog?(R(),F(g,{key:2,modelValue:n.editDialog,"onUpdate:modelValue":t[3]||(t[3]=v=>n.editDialog=v),target:i.target,screen:i.screen,definition:n.currentDefinition,keywords:i.keywords,errors:n.errors,onSave:s.saveEdit,onCancel:s.cancelEdit,onDelete:s.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):K("",!0),b(w,{modelValue:n.errorDialog,"onUpdate:modelValue":t[5]||(t[5]=v=>n.errorDialog=v),width:"60vw"},{default:x(()=>[b(c,{height:"24"},{default:x(()=>[b(l),G("span",null," Screen: "+Q(i.target)+" "+Q(i.screen)+" Errors ",1),b(l)]),_:1}),b(f,null,{default:x(()=>[b(u,{class:"errors",readonly:"",rows:"13","model-value":s.error},null,8,["model-value"]),b(p,{class:"pb-5"},{default:x(()=>[b(l),b(o,{variant:"outlined",class:"mr-2",onClick:s.clearErrors},{default:x(()=>[...t[8]||(t[8]=[q(" Clear Errors ",-1)])]),_:1},8,["onClick"]),b(o,{variant:"flat",class:"mr-2",onClick:t[4]||(t[4]=v=>n.errorDialog=!1)},{default:x(()=>[...t[9]||(t[9]=[q(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],4)}const Bs=wt(Ns,[["render",Vs],["__scopeId","data-v-95e4a143"]]);/**
|
5
|
+
* Muuri v0.9.5
|
6
|
+
* https://muuri.dev/
|
7
|
+
* Copyright (c) 2015-present, Haltu Oy
|
8
|
+
* Released under the MIT license
|
9
|
+
* https://github.com/haltu/muuri/blob/master/LICENSE.md
|
10
|
+
* @license MIT
|
11
|
+
*
|
12
|
+
* Muuri Packer
|
13
|
+
* Copyright (c) 2016-present, Niklas Rämö <inramo@gmail.com>
|
14
|
+
* @license MIT
|
15
|
+
*
|
16
|
+
* Muuri Ticker / Muuri Emitter / Muuri Dragger
|
17
|
+
* Copyright (c) 2018-present, Niklas Rämö <inramo@gmail.com>
|
18
|
+
* @license MIT
|
19
|
+
*
|
20
|
+
* Muuri AutoScroller
|
21
|
+
* Copyright (c) 2019-present, Niklas Rämö <inramo@gmail.com>
|
22
|
+
* @license MIT
|
23
|
+
*/var Ct={},Ve=typeof Map=="function"?new Map:null,ge="swap",Be="move",Us="synchronize",De="layoutStart",ur="layoutEnd",dr="layoutAbort",fr="add",_r="remove",Fs="showStart",js="showEnd",rt="hideStart",Xs="hideEnd",pr="filter",mr="sort",Rt="move",It="send",Ce="beforeSend",Ot="receive",Lt="beforeReceive",Ys="dragInit",qs="dragStart",Hs="dragMove",zs="dragScroll",Ws="dragEnd",$s="dragReleaseStart",nt="dragReleaseEnd",Gs="destroy",gr="ontouchstart"in window,vi=!!window.PointerEvent,yi=!!window.navigator.msPointerEnabled,Ks=16777216;function de(){this._events={},this._queue=[],this._counter=0,this._clearOnEmit=!1}de.prototype.on=function(e,t){if(!this._events||!e||!t)return this;var i=this._events[e];return i||(i=this._events[e]=[]),i.push(t),this},de.prototype.off=function(e,t){if(!this._events||!e||!t)return this;var i=this._events[e];if(!i||!i.length)return this;for(var r;(r=i.indexOf(t))!==-1;)i.splice(r,1);return this},de.prototype.clear=function(e){if(!this._events||!e)return this;var t=this._events[e];return t&&(t.length=0,delete this._events[e]),this},de.prototype.emit=function(e){if(!this._events||!e)return this._clearOnEmit=!1,this;var t=this._events[e];if(!t||!t.length)return this._clearOnEmit=!1,this;var i=this._queue,r=i.length,n=arguments.length-1,s;n>3&&(s=[],s.push.apply(s,arguments),s.shift()),i.push.apply(i,t),this._clearOnEmit&&(t.length=0,this._clearOnEmit=!1),++this._counter;for(var o=r,a=i.length;o<a;o++)if(n===0?i[o]():n===1?i[o](arguments[1]):n===2?i[o](arguments[1],arguments[2]):n===3?i[o](arguments[1],arguments[2],arguments[3]):i[o].apply(null,s),!this._events)return this;return--this._counter,this._counter||(i.length=0),this},de.prototype.burst=function(){return this._events?(this._clearOnEmit=!0,this.emit.apply(this,arguments),this):this},de.prototype.countListeners=function(e){if(!this._events)return 0;var t=this._events[e];return t?t.length:0},de.prototype.destroy=function(){return this._events?(this._queue.length=this._counter=0,this._events=null,this):this};var Nt=vi?"pointerout":yi?"MSPointerOut":"",Js=100;function Re(e){Nt&&(this._dragger=e,this._timeout=null,this._outEvent=null,this._isActive=!1,this._addBehaviour=this._addBehaviour.bind(this),this._removeBehaviour=this._removeBehaviour.bind(this),this._onTimeout=this._onTimeout.bind(this),this._resetData=this._resetData.bind(this),this._onStart=this._onStart.bind(this),this._onOut=this._onOut.bind(this),this._dragger.on("start",this._onStart))}Re.prototype._addBehaviour=function(){this._isActive||(this._isActive=!0,this._dragger.on("move",this._resetData),this._dragger.on("cancel",this._removeBehaviour),this._dragger.on("end",this._removeBehaviour),window.addEventListener(Nt,this._onOut))},Re.prototype._removeBehaviour=function(){this._isActive&&(this._dragger.off("move",this._resetData),this._dragger.off("cancel",this._removeBehaviour),this._dragger.off("end",this._removeBehaviour),window.removeEventListener(Nt,this._onOut),this._resetData(),this._isActive=!1)},Re.prototype._resetData=function(){window.clearTimeout(this._timeout),this._timeout=null,this._outEvent=null},Re.prototype._onStart=function(e){e.pointerType!=="mouse"&&this._addBehaviour()},Re.prototype._onOut=function(e){this._dragger._getTrackedTouch(e)&&(this._resetData(),this._outEvent=e,this._timeout=window.setTimeout(this._onTimeout,Js))},Re.prototype._onTimeout=function(){var e=this._outEvent;this._resetData(),this._dragger.isActive()&&this._dragger._onCancel(e)},Re.prototype.destroy=function(){Nt&&(this._dragger.off("start",this._onStart),this._removeBehaviour())};var bi=["","webkit","moz","ms","o","Webkit","Moz","MS","O"],vr={};function Pt(e,t){var i=vr[t]||"";if(i)return i;for(var r=t[0].toUpperCase()+t.slice(1),n=0;n<bi.length;){if(i=bi[n]?bi[n]+r:t,i in e)return vr[t]=i,i;++n}return""}function yr(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch{}return e}var Mt=window.navigator.userAgent.toLowerCase(),Zs=Mt.indexOf("edge")>-1,Qs=Mt.indexOf("trident")>-1,eo=Mt.indexOf("firefox")>-1,to=Mt.indexOf("android")>-1,Ie=yr()?{passive:!0}:!1,br="touchAction",Vt=Pt(document.documentElement.style,br),io="auto";function S(e,t){this._element=e,this._emitter=new de,this._isDestroyed=!1,this._cssProps={},this._touchAction="",this._isActive=!1,this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._onStart=this._onStart.bind(this),this._onMove=this._onMove.bind(this),this._onCancel=this._onCancel.bind(this),this._onEnd=this._onEnd.bind(this),this._edgeHack=null,(Zs||Qs)&&(vi||yi)&&(this._edgeHack=new Re(this)),this.setCssProps(t),this._touchAction||this.setTouchAction(io),e.addEventListener("dragstart",S._preventDefault,!1),e.addEventListener(S._inputEvents.start,this._onStart,Ie)}S._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},S._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},S._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},S._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},S._inputEvents=function(){return gr?S._touchEvents:vi?S._pointerEvents:yi?S._msPointerEvents:S._mouseEvents}(),S._emitter=new de,S._emitterEvents={start:"start",move:"move",end:"end",cancel:"cancel"},S._activeInstances=[],S._preventDefault=function(e){e.preventDefault&&e.cancelable!==!1&&e.preventDefault()},S._activateInstance=function(e){var t=S._activeInstances.indexOf(e);t>-1||(S._activeInstances.push(e),S._emitter.on(S._emitterEvents.move,e._onMove),S._emitter.on(S._emitterEvents.cancel,e._onCancel),S._emitter.on(S._emitterEvents.end,e._onEnd),S._activeInstances.length===1&&S._bindListeners())},S._deactivateInstance=function(e){var t=S._activeInstances.indexOf(e);t!==-1&&(S._activeInstances.splice(t,1),S._emitter.off(S._emitterEvents.move,e._onMove),S._emitter.off(S._emitterEvents.cancel,e._onCancel),S._emitter.off(S._emitterEvents.end,e._onEnd),S._activeInstances.length||S._unbindListeners())},S._bindListeners=function(){window.addEventListener(S._inputEvents.move,S._onMove,Ie),window.addEventListener(S._inputEvents.end,S._onEnd,Ie),S._inputEvents.cancel&&window.addEventListener(S._inputEvents.cancel,S._onCancel,Ie)},S._unbindListeners=function(){window.removeEventListener(S._inputEvents.move,S._onMove,Ie),window.removeEventListener(S._inputEvents.end,S._onEnd,Ie),S._inputEvents.cancel&&window.removeEventListener(S._inputEvents.cancel,S._onCancel,Ie)},S._getEventPointerId=function(e){return typeof e.pointerId=="number"?e.pointerId:e.changedTouches?e.changedTouches[0]?e.changedTouches[0].identifier:null:1},S._getTouchById=function(e,t){if(typeof e.pointerId=="number")return e.pointerId===t?e:null;if(e.changedTouches){for(var i=0;i<e.changedTouches.length;i++)if(e.changedTouches[i].identifier===t)return e.changedTouches[i];return null}return e},S._onMove=function(e){S._emitter.emit(S._emitterEvents.move,e)},S._onCancel=function(e){S._emitter.emit(S._emitterEvents.cancel,e)},S._onEnd=function(e){S._emitter.emit(S._emitterEvents.end,e)},S.prototype._reset=function(){this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._isActive=!1,S._deactivateInstance(this)},S.prototype._createEvent=function(e,t){var i=this._getTrackedTouch(t);return{type:e,srcEvent:t,distance:this.getDistance(),deltaX:this.getDeltaX(),deltaY:this.getDeltaY(),deltaTime:e===S._emitterEvents.start?0:this.getDeltaTime(),isFirst:e===S._emitterEvents.start,isFinal:e===S._emitterEvents.end||e===S._emitterEvents.cancel,pointerType:t.pointerType||(t.touches?"touch":"mouse"),identifier:this._pointerId,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY,pageX:i.pageX,pageY:i.pageY,target:i.target}},S.prototype._emit=function(e,t){this._emitter.emit(e,this._createEvent(e,t))},S.prototype._getTrackedTouch=function(e){return this._pointerId===null?null:S._getTouchById(e,this._pointerId)},S.prototype._onStart=function(e){if(!this._isDestroyed&&this._pointerId===null&&(this._pointerId=S._getEventPointerId(e),this._pointerId!==null)){var t=this._getTrackedTouch(e);this._startX=this._currentX=t.clientX,this._startY=this._currentY=t.clientY,this._startTime=Date.now(),this._isActive=!0,this._emit(S._emitterEvents.start,e),this._isActive&&S._activateInstance(this)}},S.prototype._onMove=function(e){var t=this._getTrackedTouch(e);t&&(this._currentX=t.clientX,this._currentY=t.clientY,this._emit(S._emitterEvents.move,e))},S.prototype._onCancel=function(e){this._getTrackedTouch(e)&&(this._emit(S._emitterEvents.cancel,e),this._reset())},S.prototype._onEnd=function(e){this._getTrackedTouch(e)&&(this._emit(S._emitterEvents.end,e),this._reset())},S.prototype.isActive=function(){return this._isActive},S.prototype.setTouchAction=function(e){this._touchAction=e,Vt&&(this._cssProps[Vt]="",this._element.style[Vt]=e),gr&&(this._element.removeEventListener(S._touchEvents.start,S._preventDefault,!0),(this._element.style[Vt]!==e||eo&&to)&&this._element.addEventListener(S._touchEvents.start,S._preventDefault,!0))},S.prototype.setCssProps=function(e){if(e){var t=this._cssProps,i=this._element,r,n;for(r in t)i.style[r]=t[r],delete t[r];for(r in e)if(e[r]){if(r===br){this.setTouchAction(e[r]);continue}n=Pt(i.style,r),n&&(t[n]="",i.style[n]=e[r])}}},S.prototype.getDeltaX=function(){return this._currentX-this._startX},S.prototype.getDeltaY=function(){return this._currentY-this._startY},S.prototype.getDistance=function(){var e=this.getDeltaX(),t=this.getDeltaY();return Math.sqrt(e*e+t*t)},S.prototype.getDeltaTime=function(){return this._startTime?Date.now()-this._startTime:0},S.prototype.on=function(e,t){this._emitter.on(e,t)},S.prototype.off=function(e,t){this._emitter.off(e,t)},S.prototype.destroy=function(){if(!this._isDestroyed){var e=this._element;this._edgeHack&&this._edgeHack.destroy(),this._reset(),this._emitter.destroy(),e.removeEventListener(S._inputEvents.start,this._onStart,Ie),e.removeEventListener("dragstart",S._preventDefault,!1),e.removeEventListener(S._touchEvents.start,S._preventDefault,!0);for(var t in this._cssProps)e.style[t]=this._cssProps[t],delete this._cssProps[t];this._element=null,this._isDestroyed=!0}};var ro=1e3/60,no=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return this.setTimeout(function(){e(Date.now())},ro)}).bind(window);function Bt(e){this._nextStep=null,this._lanes=[],this._stepQueue=[],this._stepCallbacks={},this._step=this._step.bind(this);for(var t=0;t<e;t++)this._lanes.push(new Si)}Bt.prototype._step=function(e){var t=this._lanes,i=this._stepQueue,r=this._stepCallbacks,n,s,o,a,l,c;for(this._nextStep=null,n=0;n<t.length;n++){for(a=t[n].queue,l=t[n].callbacks,c=t[n].indices,s=0;s<a.length;s++)o=a[s],o&&(i.push(o),r[o]=l[o],delete l[o],delete c[o]);a.length=0}for(n=0;n<i.length;n++)o=i[n],r[o]&&r[o](e),delete r[o];i.length=0},Bt.prototype.add=function(e,t,i){this._lanes[e].add(t,i),this._nextStep||(this._nextStep=no(this._step))},Bt.prototype.remove=function(e,t){this._lanes[e].remove(t)};function Si(){this.queue=[],this.indices={},this.callbacks={}}Si.prototype.add=function(e,t){var i=this.indices[e];i!==void 0&&(this.queue[i]=void 0),this.queue.push(e),this.callbacks[e]=t,this.indices[e]=this.queue.length-1},Si.prototype.remove=function(e){var t=this.indices[e];t!==void 0&&(this.queue[t]=void 0,delete this.callbacks[e],delete this.indices[e])};var Sr="layoutRead",wr="layoutWrite",Er="visibilityRead",kr="visibilityWrite",xr="dragStartRead",Tr="dragStartWrite",Ar="dragMoveRead",Dr="dragMoveWrite",Cr="dragScrollRead",Rr="dragScrollWrite",Ir="dragSortRead",Or="placeholderLayoutRead",Lr="placeholderLayoutWrite",Nr="placeholderResizeWrite",Pr="autoScrollRead",Mr="autoScrollWrite",Vr="debounceRead",te=0,Br=1,ie=2,V=new Bt(3);function so(e,t,i){V.add(te,Sr+e,t),V.add(ie,wr+e,i)}function Ur(e){V.remove(te,Sr+e),V.remove(ie,wr+e)}function oo(e,t,i){V.add(te,Er+e,t),V.add(ie,kr+e,i)}function Fr(e){V.remove(te,Er+e),V.remove(ie,kr+e)}function ao(e,t,i){V.add(te,xr+e,t),V.add(ie,Tr+e,i)}function jr(e){V.remove(te,xr+e),V.remove(ie,Tr+e)}function lo(e,t,i){V.add(te,Ar+e,t),V.add(ie,Dr+e,i)}function Xr(e){V.remove(te,Ar+e),V.remove(ie,Dr+e)}function co(e,t,i){V.add(te,Cr+e,t),V.add(ie,Rr+e,i)}function Yr(e){V.remove(te,Cr+e),V.remove(ie,Rr+e)}function Ut(e,t){V.add(Br,Ir+e,t)}function ho(e){V.remove(Br,Ir+e)}function uo(e,t,i){V.add(te,Or+e,t),V.add(ie,Lr+e,i)}function qr(e){V.remove(te,Or+e),V.remove(ie,Lr+e)}function fo(e,t){V.add(ie,Nr+e,t)}function _o(e){V.remove(ie,Nr+e)}function Hr(e,t){V.add(te,Pr,e),V.add(ie,Mr,t)}function po(){V.remove(te,Pr),V.remove(ie,Mr)}function mo(e,t){V.add(te,Vr+e,t)}function go(e){V.remove(te,Vr+e)}var z=1,J=2,He=4,wi=8,st=z|wi,ot=z|He,at=J|wi,Ft=J|He,vo="function";function N(e){return typeof e===vo}var jt=typeof WeakMap=="function"?new WeakMap:null;function oe(e,t){var i=jt&&jt.get(e);return i||(i=window.getComputedStyle(e,null),jt&&jt.set(e,i)),i.getPropertyValue(t)}function fe(e,t){return parseFloat(oe(e,t))||0}var Ue=document.documentElement,yo=document.body,Xt={value:0,offset:0};function zr(e){return e===window||e===Ue||e===yo?window:e}function lt(e){return e===window?e.pageXOffset:e.scrollLeft}function ct(e){return e===window?e.pageYOffset:e.scrollTop}function Wr(e){return e===window?Ue.scrollWidth-Ue.clientWidth:e.scrollWidth-e.clientWidth}function $r(e){return e===window?Ue.scrollHeight-Ue.clientHeight:e.scrollHeight-e.clientHeight}function Gr(e,t){if(t=t||{},e===window)t.width=Ue.clientWidth,t.height=Ue.clientHeight,t.left=0,t.right=t.width,t.top=0,t.bottom=t.height;else{var i=e.getBoundingClientRect(),r=e.clientLeft||fe(e,"border-left-width"),n=e.clientTop||fe(e,"border-top-width");t.width=e.clientWidth,t.height=e.clientHeight,t.left=i.left+r,t.right=t.left+t.width,t.top=i.top+n,t.bottom=t.top+t.height}return t}function ht(e){return e._drag._getGrid()._settings.dragAutoScroll}function bo(e){e._drag&&e._drag._prepareScroll()}function So(e){if(!(!e._drag||!e._isActive)){var t=e._drag;t._scrollDiffX=t._scrollDiffY=0,e._setTranslate(t._left,t._top)}}function Ei(e,t,i,r){return Xt.value=Math.min(r/2,e),Xt.offset=Math.max(0,i+Xt.value*2+r*t-r)/2,Xt}function Ee(){this.reset()}Ee.prototype.reset=function(){this.isActive&&this.onStop(),this.item=null,this.element=null,this.isActive=!1,this.isEnding=!1,this.direction=null,this.value=null,this.maxValue=0,this.threshold=0,this.distance=0,this.speed=0,this.duration=0,this.action=null},Ee.prototype.hasReachedEnd=function(){return He&this.direction?this.value>=this.maxValue:this.value<=0},Ee.prototype.computeCurrentScrollValue=function(){return this.value===null?z&this.direction?lt(this.element):ct(this.element):Math.max(0,Math.min(this.value,this.maxValue))},Ee.prototype.computeNextScrollValue=function(e){var t=this.speed*(e/1e3),i=He&this.direction?this.value+t:this.value-t;return Math.max(0,Math.min(i,this.maxValue))},Ee.prototype.computeSpeed=function(){var e={direction:null,threshold:0,distance:0,value:0,maxValue:0,deltaTime:0,duration:0,isEnding:!1};return function(t){var i=this.item,r=ht(i).speed;return N(r)?(e.direction=this.direction,e.threshold=this.threshold,e.distance=this.distance,e.value=this.value,e.maxValue=this.maxValue,e.duration=this.duration,e.speed=this.speed,e.deltaTime=t,e.isEnding=this.isEnding,r(i,this.element,e)):r}}(),Ee.prototype.tick=function(e){return this.isActive||(this.isActive=!0,this.onStart()),this.value=this.computeCurrentScrollValue(),this.speed=this.computeSpeed(e),this.value=this.computeNextScrollValue(e),this.duration+=e,this.value},Ee.prototype.onStart=function(){var e=this.item,t=ht(e).onStart;N(t)&&t(e,this.element,this.direction)},Ee.prototype.onStop=function(){var e=this.item,t=ht(e).onStop;N(t)&&t(e,this.element,this.direction),e._drag&&e._drag.sort()};function ze(){this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0}ze.prototype.reset=function(){this.requestX&&(this.requestX.action=null),this.requestY&&(this.requestY.action=null),this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0},ze.prototype.addRequest=function(e){z&e.direction?(this.removeRequest(this.requestX),this.requestX=e):(this.removeRequest(this.requestY),this.requestY=e),e.action=this},ze.prototype.removeRequest=function(e){e&&(this.requestX===e?(this.requestX=null,e.action=null):this.requestY===e&&(this.requestY=null,e.action=null))},ze.prototype.computeScrollValues=function(){this.scrollLeft=this.requestX?this.requestX.value:lt(this.element),this.scrollTop=this.requestY?this.requestY.value:ct(this.element)},ze.prototype.scroll=function(){var e=this.element;e&&(e.scrollTo?e.scrollTo(this.scrollLeft,this.scrollTop):(e.scrollLeft=this.scrollLeft,e.scrollTop=this.scrollTop))};function ut(e,t){this.pool=[],this.createItem=e,this.releaseItem=t}ut.prototype.pick=function(){return this.pool.pop()||this.createItem()},ut.prototype.release=function(e){this.releaseItem(e),this.pool.indexOf(e)===-1&&this.pool.push(e)},ut.prototype.reset=function(){this.pool.length=0};function wo(e,t){return!(e.left+e.width<=t.left||t.left+t.width<=e.left||e.top+e.height<=t.top||t.top+t.height<=e.top)}function Eo(e,t){if(!wo(e,t))return 0;var i=Math.min(e.left+e.width,t.left+t.width)-Math.max(e.left,t.left),r=Math.min(e.top+e.height,t.top+t.height)-Math.max(e.top,t.top);return i*r}function Yt(e,t){var i=Eo(e,t);if(!i)return 0;var r=Math.min(e.width,t.width)*Math.min(e.height,t.height);return i/r*100}var Kr={width:0,height:0,left:0,right:0,top:0,bottom:0},Jr={width:0,height:0,left:0,right:0,top:0,bottom:0};function B(){this._isDestroyed=!1,this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,this._items=[],this._actions=[],this._requests={},this._requests[z]={},this._requests[J]={},this._requestOverlapCheck={},this._dragPositions={},this._dragDirections={},this._overlapCheckInterval=150,this._requestPool=new ut(function(){return new Ee},function(e){e.reset()}),this._actionPool=new ut(function(){return new ze},function(e){e.reset()}),this._readTick=this._readTick.bind(this),this._writeTick=this._writeTick.bind(this)}B.AXIS_X=z,B.AXIS_Y=J,B.FORWARD=He,B.BACKWARD=wi,B.LEFT=st,B.RIGHT=ot,B.UP=at,B.DOWN=Ft,B.smoothSpeed=function(e,t,i){return function(r,n,s){var o=0;if(!s.isEnding)if(s.threshold>0){var a=s.threshold-Math.max(0,s.distance);o=e/s.threshold*a}else o=e;var l=s.speed,c=o;return l===o?c:l<o?(c=l+t*(s.deltaTime/1e3),Math.min(o,c)):(c=l-i*(s.deltaTime/1e3),Math.max(o,c))}},B.pointerHandle=function(e){var t={left:0,top:0,width:0,height:0},i=e||1;return function(r,n,s,o,a,l,c){return t.left=l-i*.5,t.top=c-i*.5,t.width=i,t.height=i,t}},B.prototype._readTick=function(e){this._isDestroyed||(e&&this._tickTime?(this._tickDeltaTime=e-this._tickTime,this._tickTime=e,this._updateRequests(),this._updateActions()):(this._tickTime=e,this._tickDeltaTime=0))},B.prototype._writeTick=function(){this._isDestroyed||(this._applyActions(),Hr(this._readTick,this._writeTick))},B.prototype._startTicking=function(){this._isTicking=!0,Hr(this._readTick,this._writeTick)},B.prototype._stopTicking=function(){this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,po()},B.prototype._getItemHandleRect=function(e,t,i){var r=e._drag;if(t){var n=r._dragMoveEvent||r._dragStartEvent,s=t(e,r._clientX,r._clientY,e._width,e._height,n.clientX,n.clientY);i.left=s.left,i.top=s.top,i.width=s.width,i.height=s.height}else i.left=r._clientX,i.top=r._clientY,i.width=e._width,i.height=e._height;return i.right=i.left+i.width,i.bottom=i.top+i.height,i},B.prototype._requestItemScroll=function(e,t,i,r,n,s,o){var a=this._requests[t],l=a[e._id];l?(l.element!==i||l.direction!==r)&&l.reset():l=this._requestPool.pick(),l.item=e,l.element=i,l.direction=r,l.threshold=n,l.distance=s,l.maxValue=o,a[e._id]=l},B.prototype._cancelItemScroll=function(e,t){var i=this._requests[t],r=i[e._id];r&&(r.action&&r.action.removeRequest(r),this._requestPool.release(r),delete i[e._id])},B.prototype._checkItemOverlap=function(e,t,i){var r=ht(e),n=N(r.targets)?r.targets(e):r.targets,s=r.threshold,o=r.safeZone;if(!n||!n.length){t&&this._cancelItemScroll(e,z),i&&this._cancelItemScroll(e,J);return}var a=this._dragDirections[e._id],l=a[0],c=a[1];if(!l&&!c){t&&this._cancelItemScroll(e,z),i&&this._cancelItemScroll(e,J);return}for(var h=this._getItemHandleRect(e,r.handle,Kr),d=Jr,y=null,f=null,g=!0,u=!0,p=0,w=0,v=null,E=null,k=0,m=0,D=0,L=null,X=-1/0,P=0,ce=0,j=null,$=0,Y=0,A=null,U=-1/0,ue=0,Z=0,Ae=null,ui=0,me=0,Se=0;Se<n.length;Se++)y=n[Se],g=t&&l&&y.axis!==J,u=i&&c&&y.axis!==z,w=y.priority||0,!((!g||w<X)&&(!u||w<U))&&(f=zr(y.element||y),m=g?Wr(f):-1,D=u?$r(f):-1,!(!m&&!D)&&(d=Gr(f,d),p=Yt(h,d),!(p<=0)&&(g&&w>=X&&m>0&&(w>X||p>ce)&&(E=null,v=Ei(typeof y.threshold=="number"?y.threshold:s,o,h.width,d.width),l===ot?(k=d.right+v.offset-h.right,k<=v.value&<(f)<m&&(E=ot)):l===st&&(k=h.left-(d.left-v.offset),k<=v.value&<(f)>0&&(E=st)),E!==null&&(L=f,X=w,P=v.value,ce=p,j=E,$=k,Y=m)),u&&w>=U&&D>0&&(w>U||p>Z)&&(E=null,v=Ei(typeof y.threshold=="number"?y.threshold:s,o,h.height,d.height),c===Ft?(k=d.bottom+v.offset-h.bottom,k<=v.value&&ct(f)<D&&(E=Ft)):c===at&&(k=h.top-(d.top-v.offset),k<=v.value&&ct(f)>0&&(E=at)),E!==null&&(A=f,U=w,ue=v.value,Z=p,Ae=E,ui=k,me=D)))));t&&(L?this._requestItemScroll(e,z,L,j,P,$,Y):this._cancelItemScroll(e,z)),i&&(A?this._requestItemScroll(e,J,A,Ae,ue,ui,me):this._cancelItemScroll(e,J))},B.prototype._updateScrollRequest=function(e){for(var t=e.item,i=ht(t),r=N(i.targets)?i.targets(t):i.targets,n=r&&r.length||0,s=i.threshold,o=i.safeZone,a=this._getItemHandleRect(t,i.handle,Kr),l=Jr,c=null,h=null,d=!1,y=null,f=null,g=null,u=null,p=null,w=null,v=0;v<n;v++)if(c=r[v],h=zr(c.element||c),h===e.element){if(d=!!(z&e.direction),d){if(c.axis===J)continue}else if(c.axis===z)continue;if(p=d?Wr(h):$r(h),p<=0||(l=Gr(h,l),y=Yt(a,l),y<=0)||(f=Ei(typeof c.threshold=="number"?c.threshold:s,o,d?a.width:a.height,d?l.width:l.height),e.direction===st?g=a.left-(l.left-f.offset):e.direction===ot?g=l.right+f.offset-a.right:e.direction===at?g=a.top-(l.top-f.offset):g=l.bottom+f.offset-a.bottom,g>f.value)||(u=d?lt(h):ct(h),w=He&e.direction?u>=p:u<=0,w))break;return e.maxValue=p,e.threshold=f.value,e.distance=g,e.isEnding=!1,!0}return i.smoothStop===!0&&e.speed>0?(w===null&&(w=e.hasReachedEnd()),e.isEnding=!w):e.isEnding=!1,e.isEnding},B.prototype._updateRequests=function(){for(var e=this._items,t=this._requests[z],i=this._requests[J],r,n,s,o,a,l,c,h=0;h<e.length;h++)r=e[h],o=this._requestOverlapCheck[r._id],a=o>0&&this._tickTime-o>this._overlapCheckInterval,l=!0,n=t[r._id],n&&n.isActive&&(l=!this._updateScrollRequest(n),l&&(a=!0,this._cancelItemScroll(r,z))),c=!0,s=i[r._id],s&&s.isActive&&(c=!this._updateScrollRequest(s),c&&(a=!0,this._cancelItemScroll(r,J))),a&&(this._requestOverlapCheck[r._id]=0,this._checkItemOverlap(r,l,c))},B.prototype._requestAction=function(e,t){for(var i=this._actions,r=t===z,n=null,s=0;s<i.length;s++){if(n=i[s],e.element!==n.element){n=null;continue}if(r?n.requestX:n.requestY){this._cancelItemScroll(e.item,t);return}break}n||(n=this._actionPool.pick()),n.element=e.element,n.addRequest(e),e.tick(this._tickDeltaTime),i.push(n)},B.prototype._updateActions=function(){var e=this._items,t=this._requests,i=this._actions,r,n,s,o;for(o=0;o<e.length;o++)r=e[o]._id,n=t[z][r],s=t[J][r],n&&this._requestAction(n,z),s&&this._requestAction(s,J);for(o=0;o<i.length;o++)i[o].computeScrollValues()},B.prototype._applyActions=function(){var e=this._actions,t=this._items,i;if(e.length){for(i=0;i<e.length;i++)e[i].scroll(),this._actionPool.release(e[i]);for(e.length=0,i=0;i<t.length;i++)bo(t[i]);for(i=0;i<t.length;i++)So(t[i])}},B.prototype._updateDragDirection=function(e){var t=this._dragPositions[e._id],i=this._dragDirections[e._id],r=e._drag._left,n=e._drag._top;if(t.length){var s=t[0],o=t[1];i[0]=r>s?ot:r<s?st:i[0]||0,i[1]=n>o?Ft:n<o?at:i[1]||0}t[0]=r,t[1]=n},B.prototype.addItem=function(e){if(!this._isDestroyed){var t=this._items.indexOf(e);t===-1&&(this._items.push(e),this._requestOverlapCheck[e._id]=this._tickTime,this._dragDirections[e._id]=[0,0],this._dragPositions[e._id]=[],this._isTicking||this._startTicking())}},B.prototype.updateItem=function(e){this._isDestroyed||this._dragDirections[e._id]&&(this._updateDragDirection(e),this._requestOverlapCheck[e._id]||(this._requestOverlapCheck[e._id]=this._tickTime))},B.prototype.removeItem=function(e){if(!this._isDestroyed){var t=this._items.indexOf(e);if(t!==-1){var i=e._id,r=this._requests[z][i];r&&(this._cancelItemScroll(e,z),delete this._requests[z][i]);var n=this._requests[J][i];n&&(this._cancelItemScroll(e,J),delete this._requests[J][i]),delete this._requestOverlapCheck[i],delete this._dragPositions[i],delete this._dragDirections[i],this._items.splice(t,1),this._isTicking&&!this._items.length&&this._stopTicking()}}},B.prototype.isItemScrollingX=function(e){var t=this._requests[z][e._id];return!!(t&&t.isActive)},B.prototype.isItemScrollingY=function(e){var t=this._requests[J][e._id];return!!(t&&t.isActive)},B.prototype.isItemScrolling=function(e){return this.isItemScrollingX(e)||this.isItemScrollingY(e)},B.prototype.destroy=function(){if(!this._isDestroyed){for(var e=this._items.slice(0),t=0;t<e.length;t++)this.removeItem(e[t]);this._actions.length=0,this._requestPool.reset(),this._actionPool.reset(),this._isDestroyed=!0}};var We=window.Element.prototype,ko=We.matches||We.matchesSelector||We.webkitMatchesSelector||We.mozMatchesSelector||We.msMatchesSelector||We.oMatchesSelector||function(){return!1};function qt(e,t){return ko.call(e,t)}function he(e,t){t&&(e.classList?e.classList.add(t):qt(e,"."+t)||(e.className+=" "+t))}var Zr=[],xo="number";function ki(e,t,i){var r=typeof i===xo?i:-1;r<0&&(r=e.length-r+1),e.splice.apply(e,Zr.concat(r,0,t)),Zr.length=0}function $e(e,t,i){var r=Math.max(0,e.length-1+(i||0));return t>r?r:t<0?Math.max(r+t+1,0):t}function Qr(e,t,i){if(!(e.length<2)){var r=$e(e,t),n=$e(e,i);r!==n&&e.splice(n,0,e.splice(r,1)[0])}}function en(e,t,i){if(!(e.length<2)){var r=$e(e,t),n=$e(e,i),s;r!==n&&(s=e[r],e[r]=e[n],e[n]=s)}}var ve=Pt(document.documentElement.style,"transform")||"transform",To=/([A-Z])/g,Ao=/^(webkit-|moz-|ms-|o-)/,Do=/^(-m-s-)/;function xi(e){var t=e.replace(To,"-$1").toLowerCase();return t=t.replace(Ao,"-$1"),t=t.replace(Do,"-ms-"),t}var tn=xi(ve),Co="none",Ro="inline",Io="none",Oo="display";function Lo(e){var t=oe(e,tn);if(!t||t===Co)return!1;var i=oe(e,Oo);return!(i===Ro||i===Io)}function Ti(e){for(var t=document,i=e||t;i&&i!==t&&oe(i,"position")==="static"&&!Lo(i);)i=i.parentElement||t;return i}var Ai={},Di={},Fe={};function rn(e,t){var i=t||{},r;return i.left=0,i.top=0,e===document||(i.left=window.pageXOffset||0,i.top=window.pageYOffset||0,e.self===window.self)||(r=e.getBoundingClientRect(),i.left+=r.left,i.top+=r.top,i.left+=fe(e,"border-left-width"),i.top+=fe(e,"border-top-width")),i}function Ge(e,t,i){return Fe.left=0,Fe.top=0,e===t||i&&(e=Ti(e),t=Ti(t),e===t)||(rn(e,Ai),rn(t,Di),Fe.left=Di.left-Ai.left,Fe.top=Di.top-Ai.top),Fe}function Ci(e){return e==="auto"||e==="scroll"||e==="overlay"}function No(e){return Ci(oe(e,"overflow"))||Ci(oe(e,"overflow-x"))||Ci(oe(e,"overflow-y"))}function nn(e,t){for(t=t||[];e&&e!==document;){if(e.getRootNode&&e instanceof DocumentFragment){e=e.getRootNode().host;continue}No(e)&&t.push(e),e=e.parentNode}return t.push(window),t}var Ke={},Po="none",Mo=/^matrix3d/,Vo=/([^,]*,){4}/,Bo=/([^,]*,){12}/,Uo=/[^,]*,/;function ke(e){Ke.x=0,Ke.y=0;var t=oe(e,tn);if(!t||t===Po)return Ke;var i=Mo.test(t),r=t.replace(i?Bo:Vo,""),n=r.replace(Uo,"");return Ke.x=parseFloat(r)||0,Ke.y=parseFloat(n)||0,Ke}function re(e,t){t&&(e.classList?e.classList.remove(t):qt(e,"."+t)&&(e.className=(" "+e.className+" ").replace(" "+t+" "," ").trim()))}var Fo=/^(iPad|iPhone|iPod)/.test(window.navigator.platform)||/^Mac/.test(window.navigator.platform)&&window.navigator.maxTouchPoints>1,Ht=0,Ri=1,zt=2,sn=yr()?{passive:!0}:!1;function C(e){var t=e._element,i=e.getGrid(),r=i._settings;this._item=e,this._gridId=i._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=N(r.dragStartPredicate)?r.dragStartPredicate:C.defaultStartPredicate,this._startPredicateState=Ht,this._startPredicateResult=void 0,this._isSortNeeded=!1,this._sortTimer=void 0,this._blockedSortIndex=null,this._sortX1=0,this._sortX2=0,this._sortY1=0,this._sortY2=0,this._reset(),this._preStartCheck=this._preStartCheck.bind(this),this._preEndCheck=this._preEndCheck.bind(this),this._onScroll=this._onScroll.bind(this),this._prepareStart=this._prepareStart.bind(this),this._applyStart=this._applyStart.bind(this),this._prepareMove=this._prepareMove.bind(this),this._applyMove=this._applyMove.bind(this),this._prepareScroll=this._prepareScroll.bind(this),this._applyScroll=this._applyScroll.bind(this),this._handleSort=this._handleSort.bind(this),this._handleSortDelayed=this._handleSortDelayed.bind(this),this._handle=r.dragHandle&&t.querySelector(r.dragHandle)||t,this._dragger=new S(this._handle,r.dragCssProps),this._dragger.on("start",this._preStartCheck),this._dragger.on("move",this._preStartCheck),this._dragger.on("cancel",this._preEndCheck),this._dragger.on("end",this._preEndCheck)}C.autoScroller=new B,C.defaultStartPredicate=function(e,t,i){var r=e._drag;if(t.isFirst&&t.srcEvent.button||!Fo&&t.isFirst&&t.srcEvent.isTrusted===!0&&t.srcEvent.defaultPrevented===!1&&t.srcEvent.cancelable===!1)return!1;if(t.isFinal){r._finishStartPredicate(t);return}var n=r._startPredicateData;if(!n){var s=i||r._getGrid()._settings.dragStartPredicate||{};r._startPredicateData=n={distance:Math.max(s.distance,0)||0,delay:Math.max(s.delay,0)||0}}return n.delay&&(n.event=t,n.delayTimer||(n.delayTimer=window.setTimeout(function(){n.delay=0,r._resolveStartPredicate(n.event)&&(r._forceResolveStartPredicate(n.event),r._resetStartPredicate())},n.delay))),r._resolveStartPredicate(t)},C.defaultSortPredicate=function(){var e={},t={},i={},r=[],n=1,s=100;function o(a,l,c){var h=null,d=l._settings.dragSort,y=-1,f,g,u,p,w,v,E,k,m,D;if(d===!0?(r[0]=l,g=r):N(d)&&(g=d.call(l,a)),!g||!Array.isArray(g)||!g.length)return h;for(D=0;D<g.length;D++)if(u=g[D],!u._isDestroyed){for(u._updateBoundingRect(),v=Math.max(0,u._left),E=Math.max(0,u._top),k=Math.min(window.innerWidth,u._right),m=Math.min(window.innerHeight,u._bottom),p=u._element.parentNode;p&&p!==document&&p!==document.documentElement&&p!==document.body;){if(p.getRootNode&&p instanceof DocumentFragment){p=p.getRootNode().host;continue}if(oe(p,"overflow")!=="visible"&&(w=p.getBoundingClientRect(),v=Math.max(v,w.left),E=Math.max(E,w.top),k=Math.min(k,w.right),m=Math.min(m,w.bottom)),oe(p,"position")==="fixed")break;p=p.parentNode}v>=k||E>=m||(t.left=v,t.top=E,t.width=k-v,t.height=m-E,f=Yt(e,t),f>c&&f>y&&(y=f,h=u))}return r.length=0,h}return function(a,l){var c=a._drag,h=c._getGrid(),d=l&&typeof l.threshold=="number"?l.threshold:50,y=l&&l.action===ge?ge:Be,f=l&&l.migrateAction===ge?ge:Be;d=Math.min(Math.max(d,n),s),e.width=a._width,e.height=a._height,e.left=c._clientX,e.top=c._clientY;var g=o(a,h,d);if(!g)return null;var u=a.getGrid()!==g,p=0,w=0,v=0,E=-1,k=!1,m,D,L;for(g===h?(e.left=c._gridX+a._marginLeft,e.top=c._gridY+a._marginTop):(g._updateBorders(1,0,1,0),p=g._left+g._borderLeft,w=g._top+g._borderTop),L=0;L<g._items.length;L++)m=g._items[L],!(!m._isActive||m===a)&&(k=!0,t.width=m._width,t.height=m._height,t.left=m._left+m._marginLeft+p,t.top=m._top+m._marginTop+w,D=Yt(e,t),D>v&&(E=L,v=D));return u&&v<d&&(E=k?E:0,v=d),v>=d?(i.grid=g,i.index=E,i.action=u?f:y,i):null}}(),C.prototype.stop=function(){if(this._isActive){if(this._isMigrating){this._finishMigration();return}var e=this._item,t=e._id;if(C.autoScroller.removeItem(e),jr(t),Xr(t),Yr(t),this._cancelSort(),this._isStarted){this._unbindScrollListeners();var i=e._element,r=this._getGrid(),n=r._settings.itemDraggingClass;i.parentNode!==r._element&&(r._element.appendChild(i),e._setTranslate(this._gridX,this._gridY),n&&i.clientWidth),re(i,n)}this._reset()}},C.prototype.sort=function(e){var t=this._item;this._isActive&&t._isActive&&this._dragMoveEvent&&(e===!0?this._handleSort():Ut(t._id,this._handleSort))},C.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._dragger.destroy(),C.autoScroller.removeItem(this._item),this._isDestroyed=!0)},C.prototype._getGrid=function(){return Ct[this._gridId]||null},C.prototype._reset=function(){this._isActive=!1,this._isStarted=!1,this._container=null,this._containingBlock=null,this._dragStartEvent=null,this._dragMoveEvent=null,this._dragPrevMoveEvent=null,this._scrollEvent=null,this._scrollers=[],this._left=0,this._top=0,this._gridX=0,this._gridY=0,this._clientX=0,this._clientY=0,this._scrollDiffX=0,this._scrollDiffY=0,this._moveDiffX=0,this._moveDiffY=0,this._containerDiffX=0,this._containerDiffY=0},C.prototype._bindScrollListeners=function(){var e=this._getGrid()._element,t=this._container,i=this._scrollers,r,n;if(i.length=0,nn(this._item._element.parentNode,i),t!==e)for(r=[],nn(e,r),n=0;n<r.length;n++)i.indexOf(r[n])<0&&i.push(r[n]);for(n=0;n<i.length;n++)i[n].addEventListener("scroll",this._onScroll,sn)},C.prototype._unbindScrollListeners=function(){var e=this._scrollers,t;for(t=0;t<e.length;t++)e[t].removeEventListener("scroll",this._onScroll,sn);e.length=0},C.prototype._resolveStartPredicate=function(e){var t=this._startPredicateData;if(!(e.distance<t.distance||t.delay))return this._resetStartPredicate(),!0},C.prototype._forceResolveStartPredicate=function(e){!this._isDestroyed&&this._startPredicateState===Ri&&(this._startPredicateState=zt,this._onStart(e))},C.prototype._finishStartPredicate=function(e){var t=this._item._element,i=Math.abs(e.deltaX)<2&&Math.abs(e.deltaY)<2&&e.deltaTime<200;this._resetStartPredicate(),i&&jo(t)},C.prototype._resetHeuristics=function(e,t){this._blockedSortIndex=null,this._sortX1=this._sortX2=e,this._sortY1=this._sortY2=t},C.prototype._checkHeuristics=function(e,t){var i=this._getGrid()._settings.dragSortHeuristics,r=i.minDragDistance;if(r<=0)return this._blockedSortIndex=null,!0;var n=e-this._sortX2,s=t-this._sortY2,o=r>3&&i.minBounceBackAngle>0;if(o||(this._blockedSortIndex=null),Math.abs(n)>r||Math.abs(s)>r){if(o){var a=Math.atan2(n,s),l=Math.atan2(this._sortX2-this._sortX1,this._sortY2-this._sortY1),c=Math.atan2(Math.sin(a-l),Math.cos(a-l));Math.abs(c)>i.minBounceBackAngle&&(this._blockedSortIndex=null)}return this._sortX1=this._sortX2,this._sortY1=this._sortY2,this._sortX2=e,this._sortY2=t,!0}return!1},C.prototype._resetStartPredicate=function(){var e=this._startPredicateData;e&&(e.delayTimer&&(e.delayTimer=window.clearTimeout(e.delayTimer)),this._startPredicateData=null)},C.prototype._handleSort=function(){if(this._isActive){var e=this._getGrid()._settings;if(!e.dragSort||!e.dragAutoScroll.sortDuringScroll&&C.autoScroller.isItemScrolling(this._item)){this._sortX1=this._sortX2=this._gridX,this._sortY1=this._sortY2=this._gridY,this._isSortNeeded=!0,this._sortTimer!==void 0&&(this._sortTimer=window.clearTimeout(this._sortTimer));return}var t=this._checkHeuristics(this._gridX,this._gridY);if(!(!this._isSortNeeded&&!t)){var i=e.dragSortHeuristics.sortInterval;i<=0||this._isSortNeeded?(this._isSortNeeded=!1,this._sortTimer!==void 0&&(this._sortTimer=window.clearTimeout(this._sortTimer)),this._checkOverlap()):this._sortTimer===void 0&&(this._sortTimer=window.setTimeout(this._handleSortDelayed,i))}}},C.prototype._handleSortDelayed=function(){this._isSortNeeded=!0,this._sortTimer=void 0,Ut(this._item._id,this._handleSort)},C.prototype._cancelSort=function(){this._isSortNeeded=!1,this._sortTimer!==void 0&&(this._sortTimer=window.clearTimeout(this._sortTimer)),ho(this._item._id)},C.prototype._finishSort=function(){var e=this._getGrid()._settings.dragSort,t=e&&(this._isSortNeeded||this._sortTimer!==void 0);this._cancelSort(),t&&this._checkOverlap()},C.prototype._checkOverlap=function(){if(this._isActive){var e=this._item,t=this._getGrid()._settings,i,r,n,s,o,a,l,c;N(t.dragSortPredicate)?i=t.dragSortPredicate(e,this._dragMoveEvent):i=C.defaultSortPredicate(e,t.dragSortPredicate),!(!i||typeof i.index!="number")&&(l=i.action===ge?ge:Be,r=e.getGrid(),s=i.grid||r,c=r!==s,n=r._items.indexOf(e),o=$e(s._items,i.index,c&&l===Be?1:0),!(!c&&o===this._blockedSortIndex)&&(c?(this._blockedSortIndex=null,a=s._items[o],r._hasListeners(Ce)&&r._emit(Ce,{item:e,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),s._hasListeners(Lt)&&s._emit(Lt,{item:e,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),e._gridId=s._id,this._isMigrating=e._gridId!==this._gridId,r._items.splice(n,1),ki(s._items,e,o),e._sortData=null,r._hasListeners(It)&&r._emit(It,{item:e,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),s._hasListeners(Ot)&&s._emit(Ot,{item:e,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),l===ge&&a&&a.isActive()&&s._items.indexOf(a)>-1&&s.send(a,r,n,{appendTo:this._container||document.body,layoutSender:!1,layoutReceiver:!1}),r.layout(),s.layout()):n!==o&&(this._blockedSortIndex=n,(l===ge?en:Qr)(r._items,n,o),r._hasListeners(Rt)&&r._emit(Rt,{item:e,fromIndex:n,toIndex:o,action:l}),r.layout())))}},C.prototype._finishMigration=function(){var e=this._item,t=e._dragRelease,i=e._element,r=e._isActive,n=e.getGrid(),s=n._element,o=n._settings,a=o.dragContainer||s,l=this._getGrid()._settings,c=i.parentNode,h=r?l.itemVisibleClass:l.itemHiddenClass,d=r?o.itemVisibleClass:o.itemHiddenClass,y,f;this._isMigrating=!1,this.destroy(),l.itemClass!==o.itemClass&&(re(i,l.itemClass),he(i,o.itemClass)),h!==d&&(re(i,h),he(i,d)),a!==c&&(a.appendChild(i),f=Ge(c,a,!0),y=ke(i),y.x-=f.left,y.y-=f.top),e._refreshDimensions(),f=Ge(a,s,!0),t._containerDiffX=f.left,t._containerDiffY=f.top,e._drag=o.dragEnabled?new C(e):null,a!==c&&e._setTranslate(y.x,y.y),e._visibility.setStyles(r?o.visibleStyles:o.hiddenStyles),t.start()},C.prototype._preStartCheck=function(e){this._startPredicateState===Ht&&(this._startPredicateState=Ri),this._startPredicateState===Ri?(this._startPredicateResult=this._startPredicate(this._item,e),this._startPredicateResult===!0?(this._startPredicateState=zt,this._onStart(e)):this._startPredicateResult===!1&&(this._resetStartPredicate(e),this._dragger._reset(),this._startPredicateState=Ht)):this._startPredicateState===zt&&this._isActive&&this._onMove(e)},C.prototype._preEndCheck=function(e){var t=this._startPredicateState===zt;this._startPredicate(this._item,e),this._startPredicateState=Ht,!(!t||!this._isActive)&&(this._isStarted?this._onEnd(e):this.stop())},C.prototype._onStart=function(e){var t=this._item;t._isActive&&(this._isActive=!0,this._dragStartEvent=e,C.autoScroller.addItem(t),ao(t._id,this._prepareStart,this._applyStart))},C.prototype._prepareStart=function(){if(this._isActive){var e=this._item;if(e._isActive){var t=e._element,i=this._getGrid(),r=i._settings,n=i._element,s=r.dragContainer||n,o=Ti(s),a=ke(t),l=t.getBoundingClientRect(),c=s!==n;if(this._container=s,this._containingBlock=o,this._clientX=l.left,this._clientY=l.top,this._left=this._gridX=a.x,this._top=this._gridY=a.y,this._scrollDiffX=this._scrollDiffY=0,this._moveDiffX=this._moveDiffY=0,this._resetHeuristics(this._gridX,this._gridY),c){var h=Ge(o,n);this._containerDiffX=h.left,this._containerDiffY=h.top}}}},C.prototype._applyStart=function(){if(this._isActive){var e=this._item;if(e._isActive){var t=this._getGrid(),i=e._element,r=e._dragRelease,n=e._migrate,s=this._container!==t._element;e.isPositioning()&&e._layout.stop(!0,this._left,this._top),n._isActive&&(this._left-=n._containerDiffX,this._top-=n._containerDiffY,this._gridX-=n._containerDiffX,this._gridY-=n._containerDiffY,n.stop(!0,this._left,this._top)),e.isReleasing()&&r._reset(),t._settings.dragPlaceholder.enabled&&e._dragPlaceholder.create(),this._isStarted=!0,t._emit(Ys,e,this._dragStartEvent),s&&(i.parentNode===this._container?(this._gridX-=this._containerDiffX,this._gridY-=this._containerDiffY):(this._left+=this._containerDiffX,this._top+=this._containerDiffY,this._container.appendChild(i),e._setTranslate(this._left,this._top))),he(i,t._settings.itemDraggingClass),this._bindScrollListeners(),t._emit(qs,e,this._dragStartEvent)}}},C.prototype._onMove=function(e){var t=this._item;if(!t._isActive){this.stop();return}this._dragMoveEvent=e,lo(t._id,this._prepareMove,this._applyMove),Ut(t._id,this._handleSort)},C.prototype._prepareMove=function(){if(this._isActive){var e=this._item;if(e._isActive){var t=this._getGrid()._settings,i=t.dragAxis,r=this._dragMoveEvent,n=this._dragPrevMoveEvent||this._dragStartEvent||r;if(i!=="y"){var s=r.clientX-n.clientX;this._left=this._left-this._moveDiffX+s,this._gridX=this._gridX-this._moveDiffX+s,this._clientX=this._clientX-this._moveDiffX+s,this._moveDiffX=s}if(i!=="x"){var o=r.clientY-n.clientY;this._top=this._top-this._moveDiffY+o,this._gridY=this._gridY-this._moveDiffY+o,this._clientY=this._clientY-this._moveDiffY+o,this._moveDiffY=o}this._dragPrevMoveEvent=r}}},C.prototype._applyMove=function(){if(this._isActive){var e=this._item;e._isActive&&(this._moveDiffX=this._moveDiffY=0,e._setTranslate(this._left,this._top),this._getGrid()._emit(Hs,e,this._dragMoveEvent),C.autoScroller.updateItem(e))}},C.prototype._onScroll=function(e){var t=this._item;if(!t._isActive){this.stop();return}this._scrollEvent=e,co(t._id,this._prepareScroll,this._applyScroll),Ut(t._id,this._handleSort)},C.prototype._prepareScroll=function(){if(this._isActive){var e=this._item;if(e._isActive){var t=e._element,i=this._getGrid(),r=i._element,n=t.getBoundingClientRect();if(this._container!==r){var s=Ge(this._containingBlock,r);this._containerDiffX=s.left,this._containerDiffY=s.top}var o=this._clientX-this._moveDiffX-n.left;this._left=this._left-this._scrollDiffX+o,this._scrollDiffX=o;var a=this._clientY-this._moveDiffY-n.top;this._top=this._top-this._scrollDiffY+a,this._scrollDiffY=a,this._gridX=this._left-this._containerDiffX,this._gridY=this._top-this._containerDiffY}}},C.prototype._applyScroll=function(){if(this._isActive){var e=this._item;e._isActive&&(this._scrollDiffX=this._scrollDiffY=0,e._setTranslate(this._left,this._top),this._getGrid()._emit(zs,e,this._scrollEvent))}},C.prototype._onEnd=function(e){var t=this._item,i=t._element,r=this._getGrid(),n=r._settings,s=t._dragRelease;if(!t._isActive){this.stop();return}jr(t._id),Xr(t._id),Yr(t._id),this._finishSort(),this._unbindScrollListeners(),s._containerDiffX=this._containerDiffX,s._containerDiffY=this._containerDiffY,this._reset(),re(i,n.itemDraggingClass),C.autoScroller.removeItem(t),r._emit(Ws,t,e),this._isMigrating?this._finishMigration():s.start()};function jo(e){if(e.tagName.toLowerCase()==="a"){var t=e.getAttribute("href");if(t){var i=e.getAttribute("target");i&&i!=="_self"?window.open(t,i):window.location.href=t}}}function on(e,t){var i={},r,n;if(Array.isArray(t))for(n=0;n<t.length;n++)r=t[n],i[r]=oe(e,xi(r));else for(r in t)i[r]=oe(e,xi(r));return i}var Xo=/^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/,an={};function Yo(e){var t=an[e];return t||(t=e.replace(Xo,""),t!==e&&(t=t[0].toLowerCase()+t.slice(1)),an[e]=t,t)}var qo="[native code]";function Ho(e){var t=window.Symbol;return!!(e&&N(t)&&N(t.toString)&&t(e).toString().indexOf(qo)>-1)}function Je(e,t){for(var i in t)e.style[i]=t[i]}var zo=!!(Element&&N(Element.prototype.animate)),ln=!!(Element&&Ho(Element.prototype.animate));function ye(e){this._element=e,this._animation=null,this._duration=0,this._easing="",this._callback=null,this._props=[],this._values=[],this._isDestroyed=!1,this._onFinish=this._onFinish.bind(this)}ye.prototype.start=function(e,t,i){if(!this._isDestroyed){var r=this._element,n=i||{};if(!zo){Je(r,t),this._callback=N(n.onFinish)?n.onFinish:null,this._onFinish();return}var s=this._animation,o=this._props,a=this._values,l=n.duration||300,c=n.easing||"ease",h=!1,d,y,f;if(s&&(y=0,(l!==this._duration||c!==this._easing)&&(h=!0),!h)){for(d in t)if(++y,f=o.indexOf(d),f===-1||t[d]!==a[f]){h=!0;break}y!==o.length&&(h=!0)}if(h&&s.cancel(),this._callback=N(n.onFinish)?n.onFinish:null,!(s&&!h)){o.length=a.length=0;for(d in t)o.push(d),a.push(t[d]);this._duration=l,this._easing=c,this._animation=r.animate([cn(e,ln),cn(t,ln)],{duration:l,easing:c}),this._animation.onfinish=this._onFinish,Je(r,t)}}},ye.prototype.stop=function(){this._isDestroyed||!this._animation||(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},ye.prototype.getCurrentStyles=function(){return on(element,currentProps)},ye.prototype.isAnimating=function(){return!!this._animation},ye.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},ye.prototype._onFinish=function(){var e=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,e&&e()};function cn(e,t){var i={};for(var r in e)i[t?r:Yo(r)]=e[r];return i}function Oe(e,t){return"translateX("+e+"px) translateY("+t+"px)"}function ne(e){this._item=e,this._animation=new ye,this._element=null,this._className="",this._didMigrate=!1,this._resetAfterLayout=!1,this._left=0,this._top=0,this._transX=0,this._transY=0,this._nextTransX=0,this._nextTransY=0,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this),this._updateDimensions=this._updateDimensions.bind(this),this._onLayoutStart=this._onLayoutStart.bind(this),this._onLayoutEnd=this._onLayoutEnd.bind(this),this._onReleaseEnd=this._onReleaseEnd.bind(this),this._onMigrate=this._onMigrate.bind(this),this._onHide=this._onHide.bind(this)}ne.prototype._updateDimensions=function(){this.isActive()&&Je(this._element,{width:this._item._width+"px",height:this._item._height+"px"})},ne.prototype._onLayoutStart=function(e,t){var i=this._item;if(e.indexOf(i)===-1){this.reset();return}var r=i._left,n=i._top,s=this._left,o=this._top;if(this._left=r,this._top=n,!(!t&&!this._didMigrate&&s===r&&o===n)){var a=r+i._marginLeft,l=n+i._marginTop,c=i.getGrid(),h=!t&&c._settings.layoutDuration>0;if(!h||this._didMigrate){qr(i._id),this._element.style[ve]=Oe(a,l),this._animation.stop(),this._didMigrate&&(c.getElement().appendChild(this._element),this._didMigrate=!1);return}this._nextTransX=a,this._nextTransY=l,uo(i._id,this._setupAnimation,this._startAnimation)}},ne.prototype._setupAnimation=function(){if(this.isActive()){var e=ke(this._element);this._transX=e.x,this._transY=e.y}},ne.prototype._startAnimation=function(){if(this.isActive()){var e=this._animation,t=this._transX,i=this._transY,r=this._nextTransX,n=this._nextTransY;if(t===r&&i===n){e.isAnimating()&&(this._element.style[ve]=Oe(r,n),e.stop());return}var s=this._item.getGrid()._settings,o={},a={};o[ve]=Oe(t,i),a[ve]=Oe(r,n),e.start(o,a,{duration:s.layoutDuration,easing:s.layoutEasing,onFinish:this._onLayoutEnd})}},ne.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},ne.prototype._onReleaseEnd=function(e){if(e._id===this._item._id){if(!this._animation.isAnimating()){this.reset();return}this._resetAfterLayout=!0}},ne.prototype._onMigrate=function(e){if(e.item===this._item){var t=this._item.getGrid(),i=e.toGrid;t.off(nt,this._onReleaseEnd),t.off(De,this._onLayoutStart),t.off(Ce,this._onMigrate),t.off(rt,this._onHide),i.on(nt,this._onReleaseEnd),i.on(De,this._onLayoutStart),i.on(Ce,this._onMigrate),i.on(rt,this._onHide),this._didMigrate=!0}},ne.prototype._onHide=function(e){e.indexOf(this._item)>-1&&this.reset()},ne.prototype.create=function(){if(this.isActive()){this._resetAfterLayout=!1;return}var e=this._item,t=e.getGrid(),i=t._settings,r=this._animation;this._left=e._left,this._top=e._top;var n;N(i.dragPlaceholder.createElement)?n=i.dragPlaceholder.createElement(e):n=document.createElement("div"),this._element=n,r._element=n,this._className=i.itemPlaceholderClass||"",this._className&&he(n,this._className),Je(n,{position:"absolute",left:"0px",top:"0px",width:e._width+"px",height:e._height+"px"}),n.style[ve]=Oe(e._left+e._marginLeft,e._top+e._marginTop),t.on(De,this._onLayoutStart),t.on(nt,this._onReleaseEnd),t.on(Ce,this._onMigrate),t.on(rt,this._onHide),N(i.dragPlaceholder.onCreate)&&i.dragPlaceholder.onCreate(e,n),t.getElement().appendChild(n)},ne.prototype.reset=function(){if(this.isActive()){var e=this._element,t=this._item,i=t.getGrid(),r=i._settings,n=this._animation;this._resetAfterLayout=!1,qr(t._id),_o(t._id),n.stop(),n._element=null,i.off(nt,this._onReleaseEnd),i.off(De,this._onLayoutStart),i.off(Ce,this._onMigrate),i.off(rt,this._onHide),this._className&&(re(e,this._className),this._className=""),e.parentNode.removeChild(e),this._element=null,N(r.dragPlaceholder.onRemove)&&r.dragPlaceholder.onRemove(t,e)}},ne.prototype.isActive=function(){return!!this._element},ne.prototype.getElement=function(){return this._element},ne.prototype.updateDimensions=function(){this.isActive()&&fo(this._item._id,this._updateDimensions)},ne.prototype.destroy=function(){this.reset(),this._animation.destroy(),this._item=this._animation=null};function Le(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}Le.prototype.start=function(){if(!(this._isDestroyed||this._isActive)){var e=this._item,t=e.getGrid(),i=t._settings;this._isActive=!0,he(e._element,i.itemReleasingClass),i.dragRelease.useDragContainer||this._placeToGrid(),t._emit($s,e),t._nextLayoutData||e._layout.start(!1)}},Le.prototype.stop=function(e,t,i){if(!(this._isDestroyed||!this._isActive)){var r=this._item,n=r.getGrid();!e&&(t===void 0||i===void 0)&&(t=r._left,i=r._top);var s=this._placeToGrid(t,i);this._reset(s),e||n._emit(nt,r)}},Le.prototype.isJustReleased=function(){return this._isActive&&this._isPositioningStarted===!1},Le.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},Le.prototype._placeToGrid=function(e,t){if(!this._isDestroyed){var i=this._item,r=i._element,n=i.getGrid()._element,s=!1;if(r.parentNode!==n){if(e===void 0||t===void 0){var o=ke(r);e=o.x-this._containerDiffX,t=o.y-this._containerDiffY}n.appendChild(r),i._setTranslate(e,t),s=!0}return this._containerDiffX=0,this._containerDiffY=0,s}},Le.prototype._reset=function(e){if(!this._isDestroyed){var t=this._item,i=t.getGrid()._settings.itemReleasingClass;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,i&&(e&&t._element.clientWidth,re(t._element,i))}};var hn=2;function xe(e){var t=e._element,i=t.style;this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isInterrupted=!1,this._currentStyles={},this._targetStyles={},this._nextLeft=0,this._nextTop=0,this._offsetLeft=0,this._offsetTop=0,this._skipNextAnimation=!1,this._animOptions={onFinish:this._finish.bind(this),duration:0,easing:0},i.left="0px",i.top="0px",e._setTranslate(0,0),this._animation=new ye(t),this._queue="layout-"+e._id,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}xe.prototype.start=function(e,t){if(!this._isDestroyed){var i=this._item,r=i._dragRelease,n=i.getGrid()._settings,s=this._isActive,o=r.isJustReleased(),a=o?n.dragRelease.duration:n.layoutDuration,l=o?n.dragRelease.easing:n.layoutEasing,c=!e&&!this._skipNextAnimation&&a>0;if(s&&(Ur(i._id),i._emitter.burst(this._queue,!0,i)),o&&(r._isPositioningStarted=!0),N(t)&&i._emitter.on(this._queue,t),this._skipNextAnimation=!1,!c){this._updateOffsets(),i._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),this._finish();return}this._animation.isAnimating()&&(this._animation._animation.onfinish=null),this._isActive=!0,this._animOptions.easing=l,this._animOptions.duration=a,this._isInterrupted=s,so(i._id,this._setupAnimation,this._startAnimation)}},xe.prototype.stop=function(e,t,i){if(!(this._isDestroyed||!this._isActive)){var r=this._item;if(Ur(r._id),this._animation.isAnimating()){if(t===void 0||i===void 0){var n=ke(r._element);t=n.x,i=n.y}r._setTranslate(t,i),this._animation.stop()}re(r._element,r.getGrid()._settings.itemPositioningClass),this._isActive=!1,e&&r._emitter.burst(this._queue,!0,r)}},xe.prototype.destroy=function(){if(!this._isDestroyed){var e=this._item._element.style;this.stop(!0,0,0),this._item._emitter.clear(this._queue),this._animation.destroy(),e[ve]="",e.left="",e.top="",this._item=null,this._currentStyles=null,this._targetStyles=null,this._animOptions=null,this._isDestroyed=!0}},xe.prototype._updateOffsets=function(){if(!this._isDestroyed){var e=this._item,t=e._migrate,i=e._dragRelease;this._offsetLeft=i._isActive?i._containerDiffX:t._isActive?t._containerDiffX:0,this._offsetTop=i._isActive?i._containerDiffY:t._isActive?t._containerDiffY:0,this._nextLeft=this._item._left+this._offsetLeft,this._nextTop=this._item._top+this._offsetTop}},xe.prototype._finish=function(){if(!this._isDestroyed){var e=this._item,t=e._migrate,i=e._dragRelease;e._tX=this._nextLeft,e._tY=this._nextTop,this._isActive&&(this._isActive=!1,re(e._element,e.getGrid()._settings.itemPositioningClass)),i._isActive&&i.stop(),t._isActive&&t.stop(),e._emitter.burst(this._queue,!1,e)}},xe.prototype._setupAnimation=function(){var e=this._item;if(e._tX===void 0||e._tY===void 0){var t=ke(e._element);e._tX=t.x,e._tY=t.y}},xe.prototype._startAnimation=function(){var e=this._item,t=e.getGrid()._settings,i=this._animOptions.duration<=0;this._updateOffsets();var r=Math.abs(e._left-(e._tX-this._offsetLeft)),n=Math.abs(e._top-(e._tY-this._offsetTop));if(i||r<hn&&n<hn){(r||n||this._isInterrupted)&&e._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),this._finish();return}this._isInterrupted||he(e._element,t.itemPositioningClass),this._currentStyles[ve]=Oe(e._tX,e._tY),this._targetStyles[ve]=Oe(this._nextLeft,this._nextTop),e._tX=e._tY=void 0,this._animation.start(this._currentStyles,this._targetStyles,this._animOptions)};function dt(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}dt.prototype.start=function(e,t,i){if(!this._isDestroyed){var r=this._item,n=r._element,s=r.isActive(),o=r.isVisible(),a=r.getGrid(),l=a._settings,c=e._settings,h=e._element,d=e._items,y=a._items.indexOf(r),f=i||document.body,g,u,p,w,v,E,k,m,D,L;if(typeof t=="number")g=$e(d,t,1);else{if(u=e.getItem(t),!u)return;g=d.indexOf(u)}(r.isPositioning()||this._isActive||r.isReleasing())&&(E=ke(n),k=E.x,m=E.y),r.isPositioning()&&r._layout.stop(!0,k,m),this._isActive&&(k-=this._containerDiffX,m-=this._containerDiffY,this.stop(!0,k,m)),r.isReleasing()&&(k-=r._dragRelease._containerDiffX,m-=r._dragRelease._containerDiffY,r._dragRelease.stop(!0,k,m)),r._visibility.stop(!0),r._drag&&r._drag.destroy(),a._hasListeners(Ce)&&a._emit(Ce,{item:r,fromGrid:a,fromIndex:y,toGrid:e,toIndex:g}),e._hasListeners(Lt)&&e._emit(Lt,{item:r,fromGrid:a,fromIndex:y,toGrid:e,toIndex:g}),l.itemClass!==c.itemClass&&(re(n,l.itemClass),he(n,c.itemClass)),D=o?l.itemVisibleClass:l.itemHiddenClass,L=o?c.itemVisibleClass:c.itemHiddenClass,D!==L&&(re(n,D),he(n,L)),a._items.splice(y,1),ki(d,r,g),r._gridId=e._id,s?(p=n.parentNode,f!==p&&(f.appendChild(n),w=Ge(f,p,!0),E||(E=ke(n),k=E.x,m=E.y),r._setTranslate(k+w.left,m+w.top))):h.appendChild(n),r._visibility.setStyles(o?c.visibleStyles:c.hiddenStyles),s&&(v=Ge(f,h,!0)),r._refreshDimensions(),r._sortData=null,r._drag=c.dragEnabled?new C(r):null,s?(this._isActive=!0,this._container=f,this._containerDiffX=v.left,this._containerDiffY=v.top):(this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0),a._hasListeners(It)&&a._emit(It,{item:r,fromGrid:a,fromIndex:y,toGrid:e,toIndex:g}),e._hasListeners(Ot)&&e._emit(Ot,{item:r,fromGrid:a,fromIndex:y,toGrid:e,toIndex:g})}},dt.prototype.stop=function(e,t,i){if(!(this._isDestroyed||!this._isActive)){var r=this._item,n=r._element,s=r.getGrid(),o=s._element,a;this._container!==o&&((t===void 0||i===void 0)&&(e?(a=ke(n),t=a.x-this._containerDiffX,i=a.y-this._containerDiffY):(t=r._left,i=r._top)),o.appendChild(n),r._setTranslate(t,i)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0}},dt.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)};function _e(e){var t=e._isActive,i=e._element,r=i.children[0],n=e.getGrid()._settings;if(!r)throw new Error("No valid child element found within item element.");this._item=e,this._isDestroyed=!1,this._isHidden=!t,this._isHiding=!1,this._isShowing=!1,this._childElement=r,this._currentStyleProps=[],this._animation=new ye(r),this._queue="visibility-"+e._id,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),i.style.display=t?"":"none",he(i,t?n.itemVisibleClass:n.itemHiddenClass),this.setStyles(t?n.visibleStyles:n.hiddenStyles)}_e.prototype.show=function(e,t){if(!this._isDestroyed){var i=this._item,r=i._element,n=N(t)?t:null,s=i.getGrid(),o=s._settings;if(!this._isShowing&&!this._isHidden){n&&n(!1,i);return}if(this._isShowing&&!e){n&&i._emitter.on(this._queue,n);return}this._isShowing||(i._emitter.burst(this._queue,!0,i),re(r,o.itemHiddenClass),he(r,o.itemVisibleClass),this._isHiding||(r.style.display="")),n&&i._emitter.on(this._queue,n),this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,e,this._finishShow)}},_e.prototype.hide=function(e,t){if(!this._isDestroyed){var i=this._item,r=i._element,n=N(t)?t:null,s=i.getGrid(),o=s._settings;if(!this._isHiding&&this._isHidden){n&&n(!1,i);return}if(this._isHiding&&!e){n&&i._emitter.on(this._queue,n);return}this._isHiding||(i._emitter.burst(this._queue,!0,i),he(r,o.itemHiddenClass),re(r,o.itemVisibleClass)),n&&i._emitter.on(this._queue,n),this._isHidden=this._isHiding=!0,this._isShowing=!1,this._startAnimation(!1,e,this._finishHide)}},_e.prototype.stop=function(e){if(!this._isDestroyed&&!(!this._isHiding&&!this._isShowing)){var t=this._item;Fr(t._id),this._animation.stop(),e&&t._emitter.burst(this._queue,!0,t)}},_e.prototype.setStyles=function(e){var t=this._childElement,i=this._currentStyleProps;this._removeCurrentStyles();for(var r in e)i.push(r),t.style[r]=e[r]},_e.prototype.destroy=function(){if(!this._isDestroyed){var e=this._item,t=e._element,i=e.getGrid(),r=i._settings;this.stop(!0),e._emitter.clear(this._queue),this._animation.destroy(),this._removeCurrentStyles(),re(t,r.itemVisibleClass),re(t,r.itemHiddenClass),t.style.display="",this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0}},_e.prototype._startAnimation=function(e,t,i){if(!this._isDestroyed){var r=this._item,n=this._animation,s=this._childElement,o=r.getGrid()._settings,a=e?o.visibleStyles:o.hiddenStyles,l=e?o.showDuration:o.hideDuration,c=e?o.showEasing:o.hideEasing,h=t||l<=0,d;if(!a){i&&i();return}if(Fr(r._id),h){Je(s,a),n.stop(),i&&i();return}n.isAnimating()&&(n._animation.onfinish=null),oo(r._id,function(){d=on(s,a)},function(){n.start(d,a,{duration:l,easing:c,onFinish:i})})}},_e.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._item._emitter.burst(this._queue,!1,this._item))},_e.prototype._finishHide=function(){if(this._isHidden){var e=this._item;this._isHiding=!1,e._layout.stop(!0,0,0),e._element.style.display="none",e._emitter.burst(this._queue,!1,e)}},_e.prototype._removeCurrentStyles=function(){for(var e=this._childElement,t=this._currentStyleProps,i=0;i<t.length;i++)e.style[t[i]]="";t.length=0};var Wo=0;function un(){return++Wo}function H(e,t,i){var r=e._settings;if(Ve){if(Ve.has(t))throw new Error("You can only create one Muuri Item per element!");Ve.set(t,this)}this._id=un(),this._gridId=e._id,this._element=t,this._isDestroyed=!1,this._left=0,this._top=0,this._width=0,this._height=0,this._marginLeft=0,this._marginRight=0,this._marginTop=0,this._marginBottom=0,this._tX=void 0,this._tY=void 0,this._sortData=null,this._emitter=new de,t.parentNode!==e._element&&e._element.appendChild(t),he(t,r.itemClass),typeof i!="boolean"&&(i=oe(t,"display")!=="none"),this._isActive=i,this._visibility=new _e(this),this._layout=new xe(this),this._migrate=new dt(this),this._drag=r.dragEnabled?new C(this):null,this._dragRelease=new Le(this),this._dragPlaceholder=new ne(this)}H.prototype.getGrid=function(){return Ct[this._gridId]},H.prototype.getElement=function(){return this._element},H.prototype.getWidth=function(){return this._width},H.prototype.getHeight=function(){return this._height},H.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},H.prototype.getPosition=function(){return{left:this._left,top:this._top}},H.prototype.isActive=function(){return this._isActive},H.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},H.prototype.isShowing=function(){return!!(this._visibility&&this._visibility._isShowing)},H.prototype.isHiding=function(){return!!(this._visibility&&this._visibility._isHiding)},H.prototype.isPositioning=function(){return!!(this._layout&&this._layout._isActive)},H.prototype.isDragging=function(){return!!(this._drag&&this._drag._isActive)},H.prototype.isReleasing=function(){return!!(this._dragRelease&&this._dragRelease._isActive)},H.prototype.isDestroyed=function(){return this._isDestroyed},H.prototype._refreshDimensions=function(e){if(!this._isDestroyed&&!(e!==!0&&this._visibility._isHidden)){var t=this._element,i=this._dragPlaceholder,r=t.getBoundingClientRect();this._width=r.width,this._height=r.height,this._marginLeft=Math.max(0,fe(t,"margin-left")),this._marginRight=Math.max(0,fe(t,"margin-right")),this._marginTop=Math.max(0,fe(t,"margin-top")),this._marginBottom=Math.max(0,fe(t,"margin-bottom")),i&&i.updateDimensions()}},H.prototype._refreshSortData=function(){if(!this._isDestroyed){var e=this._sortData={},t=this.getGrid()._settings.sortData,i;for(i in t)e[i]=t[i](this,this._element)}},H.prototype._addToLayout=function(e,t){this._isActive!==!0&&(this._isActive=!0,this._left=e||0,this._top=t||0)},H.prototype._removeFromLayout=function(){this._isActive!==!1&&(this._isActive=!1,this._left=0,this._top=0)},H.prototype._canSkipLayout=function(e,t){return this._left===e&&this._top===t&&!this._migrate._isActive&&!this._layout._skipNextAnimation&&!this._dragRelease.isJustReleased()},H.prototype._setTranslate=function(e,t){return this._tX===e&&this._tY===t?!1:(this._tX=e,this._tY=t,this._element.style[ve]=Oe(e,t),!0)},H.prototype._destroy=function(e){if(!this._isDestroyed){var t=this._element,i=this.getGrid(),r=i._settings;this._dragPlaceholder.destroy(),this._dragRelease.destroy(),this._migrate.destroy(),this._layout.destroy(),this._visibility.destroy(),this._drag&&this._drag.destroy(),this._emitter.destroy(),re(t,r.itemClass),e&&t.parentNode.removeChild(t),Ve&&Ve.delete(t),this._isActive=!1,this._isDestroyed=!0}};function dn(e){var t=1,i=2,r=4,n=8,s=16,o=.001,a=.5;function l(u){return((u*1e3+.5<<0)/10<<0)/100}function c(){this.currentRects=[],this.nextRects=[],this.rectTarget={},this.rectStore=[],this.slotSizes=[],this.rectId=0,this.slotIndex=-1,this.slotData={left:0,top:0,width:0,height:0},this.sortRectsLeftTop=this.sortRectsLeftTop.bind(this),this.sortRectsTopLeft=this.sortRectsTopLeft.bind(this)}if(c.prototype.computeLayout=function(u,p){var w=u.items,v=u.slots,E=!!(p&t),k=!!(p&i),m=!!(p&r),D=!!(p&n),L=!!(p&s),X=typeof w[0]=="number",P,ce,j,$,Y,A;if(!w.length)return u;for(ce=X?2:1,P=0;P<w.length;P+=ce)X?($=w[P],Y=w[P+1]):(j=w[P],$=j._width+j._marginLeft+j._marginRight,Y=j._height+j._marginTop+j._marginBottom),L&&($=l($),Y=l(Y)),A=this.computeNextSlot(u,$,Y,E,k),k?A.left+A.width>u.width&&(u.width=A.left+A.width):A.top+A.height>u.height&&(u.height=A.top+A.height),v[++this.slotIndex]=A.left,v[++this.slotIndex]=A.top,(m||D)&&this.slotSizes.push(A.width,A.height);if(m)for(P=0;P<v.length;P+=2)v[P]=u.width-(v[P]+this.slotSizes[P]);if(D)for(P=1;P<v.length;P+=2)v[P]=u.height-(v[P]+this.slotSizes[P]);return this.slotSizes.length=0,this.currentRects.length=0,this.nextRects.length=0,this.rectStore.length=0,this.rectId=0,this.slotIndex=-1,u},c.prototype.computeNextSlot=function(u,p,w,v,E){var k=this.slotData,m=this.currentRects,D=this.nextRects,L=!1,X,P,ce,j,$;for(D.length=0,k.left=null,k.top=null,k.width=p,k.height=w,j=0;j<m.length;j++)if(P=m[j],!!P&&(X=this.getRect(P),k.width<=X.width+o&&k.height<=X.height+o)){k.left=X.left,k.top=X.top;break}if(k.left===null&&(E?(k.left=u.width,k.top=0):(k.left=0,k.top=u.height),v||(L=!0)),!E&&k.top+k.height>u.height+o&&(k.left>a&&D.push(this.addRect(0,u.height,k.left,1/0)),k.left+k.width<u.width-a&&D.push(this.addRect(k.left+k.width,u.height,u.width-k.left-k.width,1/0)),u.height=k.top+k.height),E&&k.left+k.width>u.width+o&&(k.top>a&&D.push(this.addRect(u.width,0,1/0,k.top)),k.top+k.height<u.height-a&&D.push(this.addRect(u.width,k.top+k.height,1/0,u.height-k.top-k.height)),u.width=k.left+k.width),!L){for(v&&(j=0);j<m.length;j++)if(P=m[j],!!P)for(X=this.getRect(P),ce=this.splitRect(X,k),$=0;$<ce.length;$++)P=ce[$],X=this.getRect(P),(E?X.left+o<u.width-o:X.top+o<u.height-o)&&D.push(P)}return D.length>1&&this.purgeRects(D).sort(E?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=D,this.nextRects=m,k},c.prototype.addRect=function(u,p,w,v){var E=++this.rectId;return this.rectStore[E]=u||0,this.rectStore[++this.rectId]=p||0,this.rectStore[++this.rectId]=w||0,this.rectStore[++this.rectId]=v||0,E},c.prototype.getRect=function(u,p){return p||(p=this.rectTarget),p.left=this.rectStore[u]||0,p.top=this.rectStore[++u]||0,p.width=this.rectStore[++u]||0,p.height=this.rectStore[++u]||0,p},c.prototype.splitRect=function(){var u=[],p=0,w=0;return function(v,E){return u.length=0,v.left+v.width<=E.left+o||E.left+E.width<=v.left+o||v.top+v.height<=E.top+o||E.top+E.height<=v.top+o?(u.push(this.addRect(v.left,v.top,v.width,v.height)),u):(p=E.left-v.left,p>=a&&u.push(this.addRect(v.left,v.top,p,v.height)),p=v.left+v.width-(E.left+E.width),p>=a&&u.push(this.addRect(E.left+E.width,v.top,p,v.height)),w=E.top-v.top,w>=a&&u.push(this.addRect(v.left,v.top,v.width,w)),w=v.top+v.height-(E.top+E.height),w>=a&&u.push(this.addRect(v.left,E.top+E.height,v.width,w)),u)}}(),c.prototype.isRectAWithinRectB=function(u,p){return u.left+o>=p.left&&u.top+o>=p.top&&u.left+u.width-o<=p.left+p.width&&u.top+u.height-o<=p.top+p.height},c.prototype.purgeRects=function(){var u={},p={};return function(w){for(var v=w.length,E;v--;)if(E=w.length,!!w[v]){for(this.getRect(w[v],u);E--;)if(!(!w[E]||v===E)&&(this.getRect(w[E],p),this.isRectAWithinRectB(u,p))){w[v]=0;break}}return w}}(),c.prototype.sortRectsTopLeft=function(){var u={},p={};return function(w,v){return this.getRect(w,u),this.getRect(v,p),u.top<p.top&&u.top+o<p.top?-1:u.top>p.top&&u.top-o>p.top?1:u.left<p.left&&u.left+o<p.left?-1:u.left>p.left&&u.left-o>p.left?1:0}}(),c.prototype.sortRectsLeftTop=function(){var u={},p={};return function(w,v){return this.getRect(w,u),this.getRect(v,p),u.left<p.left&&u.left+o<p.left?-1:u.left>p.left&&u.left-o<p.left?1:u.top<p.top&&u.top+o<p.top?-1:u.top>p.top&&u.top-o>p.top?1:0}}(),e){var h=1,d=2,y=3,f=4,g=new c;self.onmessage=function(u){var p=new Float32Array(u.data),w=p.subarray(f,p.length),v=new Float32Array(w.length),E=p[y],k={items:w,slots:v,width:p[h],height:p[d]};g.computeLayout(k,E),p[h]=k.width,p[d]=k.height,p.set(k.slots,f),postMessage(p.buffer,[p.buffer])}}return c}var fn=dn(),Ze=null,Wt=[];function $o(e,t){var i=[];if(e>0){Ze||(Ze=URL.createObjectURL(new Blob(["("+dn.toString()+")(true)"],{type:"application/javascript"})));for(var r=0,n;r<e;r++)n=new Worker(Ze),t&&(n.onmessage=t),i.push(n),Wt.push(n)}return i}function Go(e){for(var t,i,r=0;r<e.length;r++)t=e[r],t.onmessage=null,t.onerror=null,t.onmessageerror=null,t.terminate(),i=Wt.indexOf(t),i>-1&&Wt.splice(i,1);Ze&&!Wt.length&&(URL.revokeObjectURL(Ze),Ze=null)}function Ko(){return!!(window.Worker&&window.URL&&window.Blob)}var _n=1,$t=2,pn=4,mn=8,gn=16,vn=0,yn=1,bn=2,Jo=3,Ii=4;function Te(e,t){if(this._options=0,this._processor=null,this._layoutQueue=[],this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={},this._workers=[],this._onWorkerMessage=this._onWorkerMessage.bind(this),this.setOptions(t),e=typeof e=="number"?Math.max(0,e):0,e&&Ko())try{this._workers=$o(e,this._onWorkerMessage)}catch{this._processor=new fn}else this._processor=new fn}Te.prototype._sendToWorker=function(){if(!(!this._layoutQueue.length||!this._workers.length)){var e=this._layoutQueue.shift(),t=this._workers.pop(),i=this._layoutWorkerData[e];delete this._layoutWorkerData[e],this._layoutWorkers[e]=t,t.postMessage(i.buffer,[i.buffer])}},Te.prototype._onWorkerMessage=function(e){var t=new Float32Array(e.data),i=t[vn],r=this._layouts[i],n=this._layoutCallbacks[i],s=this._layoutWorkers[i];r&&delete this._layouts[i],n&&delete this._layoutCallbacks[i],s&&delete this._layoutWorkers[i],r&&n&&(r.width=t[yn],r.height=t[bn],r.slots=t.subarray(Ii,t.length),this._finalizeLayout(r),n(r)),s&&(this._workers.push(s),this._sendToWorker())},Te.prototype._finalizeLayout=function(e){var t=e._grid,i=e._settings&$t,r=t._boxSizing==="border-box";return delete e._grid,delete e._settings,e.styles={},i?e.styles.width=(r?e.width+t._borderLeft+t._borderRight:e.width)+"px":e.styles.height=(r?e.height+t._borderTop+t._borderBottom:e.height)+"px",e},Te.prototype.setOptions=function(e){if(e){var t;typeof e.fillGaps=="boolean"?t=e.fillGaps?_n:0:t=this._options&_n;var i;typeof e.horizontal=="boolean"?i=e.horizontal?$t:0:i=this._options&$t;var r;typeof e.alignRight=="boolean"?r=e.alignRight?pn:0:r=this._options&pn;var n;typeof e.alignBottom=="boolean"?n=e.alignBottom?mn:0:n=this._options&mn;var s;typeof e.rounding=="boolean"?s=e.rounding?gn:0:s=this._options&gn,this._options=t|i|r|n|s}},Te.prototype.createLayout=function(e,t,i,r,n,s){if(this._layouts[t])throw new Error("A layout with the provided id is currently being processed.");var o=this._options&$t,a={id:t,items:i,slots:null,width:o?0:r,height:o?n:0,_grid:e,_settings:this._options};if(!i.length){a.slots=[],this._finalizeLayout(a),s(a);return}if(this._processor){a.slots=window.Float32Array?new Float32Array(i.length*2):new Array(i.length*2),this._processor.computeLayout(a,a._settings),this._finalizeLayout(a),s(a);return}var l=new Float32Array(Ii+i.length*2);l[vn]=t,l[yn]=a.width,l[bn]=a.height,l[Jo]=a._settings;var c,h,d;for(c=0,h=Ii-1,d;c<i.length;c++)d=i[c],l[++h]=d._width+d._marginLeft+d._marginRight,l[++h]=d._height+d._marginTop+d._marginBottom;return this._layoutQueue.push(t),this._layouts[t]=a,this._layoutCallbacks[t]=s,this._layoutWorkerData[t]=l,this._sendToWorker(),this.cancelLayout.bind(this,t)},Te.prototype.cancelLayout=function(e){var t=this._layouts[e];if(t&&(delete this._layouts[e],delete this._layoutCallbacks[e],this._layoutWorkerData[e])){delete this._layoutWorkerData[e];var i=this._layoutQueue.indexOf(e);i>-1&&this._layoutQueue.splice(i,1)}},Te.prototype.destroy=function(){for(var e in this._layoutWorkers)this._workers.push(this._layoutWorkers[e]);Go(this._workers),this._workers.length=0,this._layoutQueue.length=0,this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={}};var Zo=0;function Qo(e,t){var i=++Zo,r=0,n=0,s=!1,o=function(a){s||(n&&(r-=a-n),n=a,r>0?mo(i,o):(r=n=0,e()))};return function(a){if(!s){if(t<=0){a!==!0&&e();return}if(a===!0){s=!0,r=n=0,o=void 0,go(i);return}r<=0?(r=t,o(0)):r=t}}}var ea="[object HTMLCollection]",ta="[object NodeList]";function Oi(e){var t=Object.prototype.toString.call(e);return t===ea||t===ta}var ia="object",ra="[object Object]",na=Object.prototype.toString;function Sn(e){return typeof e===ia&&na.call(e)===ra}function sa(){}function oa(e){return Oi(e)?Array.prototype.slice.call(e):Array.prototype.concat(e)}var wn="number",Gt="string",Ne="instant",Li=0;function I(e,t){typeof e===Gt&&(e=document.querySelector(e));var i=e.getRootNode?e.getRootNode({composed:!0})===document:document.body.contains(e);if(!i||e===document.documentElement)throw new Error("Container element must be an existing DOM element.");var r=aa(I.defaultOptions,t);r.visibleStyles=En(r.visibleStyles),r.hiddenStyles=En(r.hiddenStyles),N(r.dragSort)||(r.dragSort=!!r.dragSort),this._id=un(),this._element=e,this._settings=r,this._isDestroyed=!1,this._items=[],this._layout={id:0,items:[],slots:[]},this._isLayoutFinished=!0,this._nextLayoutData=null,this._emitter=new de,this._onLayoutDataReceived=this._onLayoutDataReceived.bind(this),Ct[this._id]=this,he(e,r.containerClass),ca(this,r.layoutOnResize),this.add(la(e,r.items),{layout:!1}),r.layoutOnInit&&this.layout(!0)}I.Item=H,I.ItemLayout=xe,I.ItemVisibility=_e,I.ItemMigrate=dt,I.ItemDrag=C,I.ItemDragRelease=Le,I.ItemDragPlaceholder=ne,I.Emitter=de,I.Animator=ye,I.Dragger=S,I.Packer=Te,I.AutoScroller=B,I.defaultPacker=new Te(2),I.defaultOptions={items:"*",showDuration:300,showEasing:"ease",hideDuration:300,hideEasing:"ease",visibleStyles:{opacity:"1",transform:"scale(1)"},hiddenStyles:{opacity:"0",transform:"scale(0.5)"},layout:{fillGaps:!1,horizontal:!1,alignRight:!1,alignBottom:!1,rounding:!1},layoutOnResize:150,layoutOnInit:!0,layoutDuration:300,layoutEasing:"ease",sortData:null,dragEnabled:!1,dragContainer:null,dragHandle:null,dragStartPredicate:{distance:0,delay:0},dragAxis:"xy",dragSort:!0,dragSortHeuristics:{sortInterval:100,minDragDistance:10,minBounceBackAngle:1},dragSortPredicate:{threshold:50,action:Be,migrateAction:Be},dragRelease:{duration:300,easing:"ease",useDragContainer:!0},dragCssProps:{touchAction:"none",userSelect:"none",userDrag:"none",tapHighlightColor:"rgba(0, 0, 0, 0)",touchCallout:"none",contentZooming:"none"},dragPlaceholder:{enabled:!1,createElement:null,onCreate:null,onRemove:null},dragAutoScroll:{targets:[],handle:null,threshold:50,safeZone:.2,speed:B.smoothSpeed(1e3,2e3,2500),sortDuringScroll:!0,smoothStop:!1,onStart:null,onStop:null},containerClass:"muuri",itemClass:"muuri-item",itemVisibleClass:"muuri-item-shown",itemHiddenClass:"muuri-item-hidden",itemPositioningClass:"muuri-item-positioning",itemDraggingClass:"muuri-item-dragging",itemReleasingClass:"muuri-item-releasing",itemPlaceholderClass:"muuri-item-placeholder"},I.prototype.on=function(e,t){return this._emitter.on(e,t),this},I.prototype.off=function(e,t){return this._emitter.off(e,t),this},I.prototype.getElement=function(){return this._element},I.prototype.getItem=function(e){if(this._isDestroyed||!e&&e!==0)return null;if(typeof e===wn)return this._items[e>-1?e:this._items.length+e]||null;if(e instanceof H)return e._gridId===this._id?e:null;if(Ve){var t=Ve.get(e);return t&&t._gridId===this._id?t:null}else for(var i=0;i<this._items.length;i++)if(this._items[i]._element===e)return this._items[i];return null},I.prototype.getItems=function(e){if(this._isDestroyed||e===void 0)return this._items.slice(0);var t=[],i,r;if(Array.isArray(e)||Oi(e))for(i=0;i<e.length;i++)r=this.getItem(e[i]),r&&t.push(r);else r=this.getItem(e),r&&t.push(r);return t},I.prototype.refreshItems=function(e,t){if(this._isDestroyed)return this;var i=e||this._items,r,n,s,o;if(t===!0)for(o=[],r=0;r<i.length;r++)n=i[r],!n.isVisible()&&!n.isHiding()&&(s=n.getElement().style,s.visibility="hidden",s.display="",o.push(s));for(r=0;r<i.length;r++)i[r]._refreshDimensions(t);if(t===!0){for(r=0;r<o.length;r++)s=o[r],s.visibility="",s.display="none";o.length=0}return this},I.prototype.refreshSortData=function(e){if(this._isDestroyed)return this;for(var t=e||this._items,i=0;i<t.length;i++)t[i]._refreshSortData();return this},I.prototype.synchronize=function(){if(this._isDestroyed)return this;var e=this._items;if(!e.length)return this;for(var t,i,r=0;r<e.length;r++)i=e[r]._element,i.parentNode===this._element&&(t=t||document.createDocumentFragment(),t.appendChild(i));return t?(this._element.appendChild(t),this._emit(Us),this):this},I.prototype.layout=function(e,t){if(this._isDestroyed)return this;var i=this._nextLayoutData;i&&N(i.cancel)&&i.cancel(),Li=Li%Ks+1;var r=Li;this._nextLayoutData={id:r,instant:e,onFinish:t,cancel:null};for(var n=this._items,s=[],o=0;o<n.length;o++)n[o]._isActive&&s.push(n[o]);this._refreshDimensions();var a=this._width-this._borderLeft-this._borderRight,l=this._height-this._borderTop-this._borderBottom,c=this._settings.layout,h;return N(c)?h=c(this,r,s,a,l,this._onLayoutDataReceived):(I.defaultPacker.setOptions(c),h=I.defaultPacker.createLayout(this,r,s,a,l,this._onLayoutDataReceived)),N(h)&&this._nextLayoutData&&this._nextLayoutData.id===r&&(this._nextLayoutData.cancel=h),this},I.prototype.add=function(e,t){if(this._isDestroyed||!e)return[];var i=oa(e);if(!i.length)return i;var r=t||{},n=r.layout?r.layout:r.layout===void 0,s=this._items,o=!1,a,l,c,h;for(h=0;h<i.length;h++)l=i[h],l.parentNode!==this._element&&(a=a||document.createDocumentFragment(),a.appendChild(l));for(a&&this._element.appendChild(a),h=0;h<i.length;h++)l=i[h],c=i[h]=new H(this,l,r.active),c._isActive&&(o=!0,c._layout._skipNextAnimation=!0);for(h=0;h<i.length;h++)c=i[h],c._refreshDimensions(),c._refreshSortData();return ki(s,i,r.index),this._hasListeners(fr)&&this._emit(fr,i.slice(0)),o&&n&&this.layout(n===Ne,N(n)?n:void 0),i},I.prototype.remove=function(e,t){if(this._isDestroyed||!e.length)return[];var i=t||{},r=i.layout?i.layout:i.layout===void 0,n=!1,s=this.getItems(),o=[],a=[],l,c,h;for(h=0;h<e.length;h++)c=e[h],!c._isDestroyed&&(l=this._items.indexOf(c),l!==-1&&(c._isActive&&(n=!0),o.push(c),a.push(s.indexOf(c)),c._destroy(i.removeElements),this._items.splice(l,1)));return this._hasListeners(_r)&&this._emit(_r,o.slice(0),a),n&&r&&this.layout(r===Ne,N(r)?r:void 0),o},I.prototype.show=function(e,t){return!this._isDestroyed&&e.length&&this._setItemsVisibility(e,!0,t),this},I.prototype.hide=function(e,t){return!this._isDestroyed&&e.length&&this._setItemsVisibility(e,!1,t),this},I.prototype.filter=function(e,t){if(this._isDestroyed||!this._items.length)return this;var i=[],r=[],n=typeof e===Gt,s=N(e),o=t||{},a=o.instant===!0,l=o.syncWithLayout,c=o.layout?o.layout:o.layout===void 0,h=N(o.onFinish)?o.onFinish:null,d=-1,y=sa,f,g;if(h&&(y=function(){++d&&h(i.slice(0),r.slice(0))}),s||n)for(g=0;g<this._items.length;g++)f=this._items[g],(s?e(f):qt(f._element,e))?i.push(f):r.push(f);return i.length?this.show(i,{instant:a,syncWithLayout:l,onFinish:y,layout:!1}):y(),r.length?this.hide(r,{instant:a,syncWithLayout:l,onFinish:y,layout:!1}):y(),(i.length||r.length)&&(this._hasListeners(pr)&&this._emit(pr,i.slice(0),r.slice(0)),c&&this.layout(c===Ne,N(c)?c:void 0)),this},I.prototype.sort=function(){var e,t,i,r;function n(o,a){for(var l=0,c,h,d,y,f=0;f<e.length;f++)if(c=e[f][0],h=e[f][1],d=(o._sortData?o:o._refreshSortData())._sortData[c],y=(a._sortData?a:a._refreshSortData())._sortData[c],h==="desc"||!h&&t?l=y<d?-1:y>d?1:0:l=d<y?-1:d>y?1:0,l)return l;return l||(r||(r=kn(i)),l=t?Kt(r,a,o):Kt(r,o,a)),l}function s(o,a){var l=t?-e(o,a):e(o,a);return l||(r||(r=kn(i)),l=t?Kt(r,a,o):Kt(r,o,a)),l}return function(o,a){if(this._isDestroyed||this._items.length<2)return this;var l=this._items,c=a||{},h=c.layout?c.layout:c.layout===void 0;if(t=!!c.descending,i=l.slice(0),r=null,N(o))e=o,l.sort(s);else if(typeof o===Gt)e=o.trim().split(" ").filter(function(d){return d}).map(function(d){return d.split(":")}),l.sort(n);else if(Array.isArray(o))l.length=0,l.push.apply(l,o);else throw e=t=i=r=null,new Error("Invalid comparer argument provided.");return this._hasListeners(mr)&&this._emit(mr,l.slice(0),i),h&&this.layout(h===Ne,N(h)?h:void 0),e=t=i=r=null,this}}(),I.prototype.move=function(e,t,i){if(this._isDestroyed||this._items.length<2)return this;var r=this._items,n=i||{},s=n.layout?n.layout:n.layout===void 0,o=n.action===ge,a=o?ge:Be,l=this.getItem(e),c=this.getItem(t),h,d;return l&&c&&l!==c&&(h=r.indexOf(l),d=r.indexOf(c),o?en(r,h,d):Qr(r,h,d),this._hasListeners(Rt)&&this._emit(Rt,{item:l,fromIndex:h,toIndex:d,action:a}),s&&this.layout(s===Ne,N(s)?s:void 0)),this},I.prototype.send=function(e,t,i,r){if(this._isDestroyed||t._isDestroyed||this===t)return this;if(e=this.getItem(e),!e)return this;var n=r||{},s=n.appendTo||document.body,o=n.layoutSender?n.layoutSender:n.layoutSender===void 0,a=n.layoutReceiver?n.layoutReceiver:n.layoutReceiver===void 0;return e._migrate.start(t,i,s),e._migrate._isActive&&e._isActive&&(o&&this.layout(o===Ne,N(o)?o:void 0),a&&t.layout(a===Ne,N(a)?a:void 0)),this},I.prototype.destroy=function(e){if(this._isDestroyed)return this;var t=this._element,i=this._items.slice(0),r=this._layout&&this._layout.styles||{},n,s;for(ha(this),n=0;n<i.length;n++)i[n]._destroy(e);this._items.length=0,re(t,this._settings.containerClass);for(s in r)t.style[s]="";return this._emit(Gs),this._emitter.destroy(),delete Ct[this._id],this._isDestroyed=!0,this},I.prototype._emit=function(){this._isDestroyed||this._emitter.emit.apply(this._emitter,arguments)},I.prototype._hasListeners=function(e){return this._isDestroyed?!1:this._emitter.countListeners(e)>0},I.prototype._updateBoundingRect=function(){var e=this._element,t=e.getBoundingClientRect();this._width=t.width,this._height=t.height,this._left=t.left,this._top=t.top,this._right=t.right,this._bottom=t.bottom},I.prototype._updateBorders=function(e,t,i,r){var n=this._element;e&&(this._borderLeft=fe(n,"border-left-width")),t&&(this._borderRight=fe(n,"border-right-width")),i&&(this._borderTop=fe(n,"border-top-width")),r&&(this._borderBottom=fe(n,"border-bottom-width"))},I.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1),this._boxSizing=oe(this._element,"box-sizing")},I.prototype._onLayoutDataReceived=function(){var e=[];return function(t){if(!(this._isDestroyed||!this._nextLayoutData||this._nextLayoutData.id!==t.id)){var i=this,r=this._nextLayoutData.instant,n=this._nextLayoutData.onFinish,s=t.items.length,o=s,a,l,c,h;for(this._nextLayoutData=null,!this._isLayoutFinished&&this._hasListeners(dr)&&this._emit(dr,this._layout.items.slice(0)),this._layout=t,e.length=0,h=0;h<s;h++){if(a=t.items[h],!a){--o;continue}if(l=t.slots[h*2],c=t.slots[h*2+1],a._canSkipLayout(l,c)){--o;continue}a._left=l,a._top=c,a.isActive()&&!a.isDragging()?e.push(a):--o}if(t.styles&&Je(this._element,t.styles),!(this._hasListeners(De)&&(this._emit(De,t.items.slice(0),r===!0),this._layout.id!==t.id))){var d=function(){if(!(--o>0)){var y=i._layout.id!==t.id,f=N(r)?r:n;y||(i._isLayoutFinished=!0),N(f)&&f(t.items.slice(0),y),!y&&i._hasListeners(ur)&&i._emit(ur,t.items.slice(0))}};if(!e.length)return d(),this;for(this._isLayoutFinished=!1,h=0;h<e.length&&this._layout.id===t.id;h++)e[h]._layout.start(r===!0,d);return this._layout.id===t.id&&(e.length=0),this}}}}(),I.prototype._setItemsVisibility=function(e,t,i){var r=this,n=e.slice(0),s=i||{},o=s.instant===!0,a=s.onFinish,l=s.layout?s.layout:s.layout===void 0,c=n.length,h=t?Fs:rt,d=t?js:Xs,y=t?"show":"hide",f=!1,g=[],u=[],p,w;if(!c){N(a)&&a(n);return}for(w=0;w<n.length;w++)p=n[w],(t&&!p._isActive||!t&&p._isActive)&&(f=!0),p._layout._skipNextAnimation=!!(t&&!p._isActive),t&&p._visibility._isHidden&&u.push(p),t?p._addToLayout():p._removeFromLayout();u.length&&(this.refreshItems(u,!0),u.length=0);function v(){for(f&&s.syncWithLayout!==!1&&r.off(De,v),r._hasListeners(h)&&r._emit(h,n.slice(0)),w=0;w<n.length;w++){if(n[w]._gridId!==r._id){--c<1&&(N(a)&&a(g.slice(0)),r._hasListeners(d)&&r._emit(d,g.slice(0)));continue}n[w]._visibility[y](o,function(E,k){E||g.push(k),--c<1&&(N(a)&&a(g.slice(0)),r._hasListeners(d)&&r._emit(d,g.slice(0)))})}}f&&s.syncWithLayout!==!1?this.on(De,v):v(),f&&l&&this.layout(l===Ne,N(l)?l:void 0)};function aa(e,t){var i=ft({},e);return t&&(i=ft(i,t)),t&&t.visibleStyles?i.visibleStyles=t.visibleStyles:e&&e.visibleStyles&&(i.visibleStyles=e.visibleStyles),t&&t.hiddenStyles?i.hiddenStyles=t.hiddenStyles:e&&e.hiddenStyles&&(i.hiddenStyles=e.hiddenStyles),i}function ft(e,t){var i=Object.keys(t),r=i.length,n,s,o;for(o=0;o<r;o++){if(s=i[o],n=Sn(t[s]),Sn(e[s])&&n){e[s]=ft(ft({},e[s]),t[s]);continue}if(n){e[s]=ft({},t[s]);continue}if(Array.isArray(t[s])){e[s]=t[s].slice(0);continue}e[s]=t[s]}return e}function la(e,t){if(t==="*")return e.children;if(typeof t===Gt){for(var i=[],r=e.children,n=0;n<r.length;n++)qt(r[n],t)&&i.push(r[n]);return i}return Array.isArray(t)||Oi(t)?t:[]}function ca(e,t){typeof t!==wn&&(t=t===!0?0:-1),t>=0&&(e._resizeHandler=Qo(function(){e.refreshItems().layout()},t),window.addEventListener("resize",e._resizeHandler))}function ha(e){e._resizeHandler&&(e._resizeHandler(!0),window.removeEventListener("resize",e._resizeHandler),e._resizeHandler=null)}function En(e){var t={},i=document.documentElement.style,r,n;for(r in e)e[r]&&(n=Pt(i,r),n&&(t[n]=e[r]));return t}function kn(e){for(var t={},i=0;i<e.length;i++)t[e[i]._id]=i;return t}function Kt(e,t,i){var r=e[t._id],n=e[i._id];return r-n}var ua=Object.defineProperty,da=(e,t,i)=>t in e?ua(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Jt=(e,t,i)=>da(e,typeof t!="symbol"?t+"":t,i);function xn(e,t){return function(){return e.apply(t,arguments)}}const{toString:fa}=Object.prototype,{getPrototypeOf:Ni}=Object,{iterator:Zt,toStringTag:Tn}=Symbol,Qt=(e=>t=>{const i=fa.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),pe=e=>(e=e.toLowerCase(),t=>Qt(t)===e),ei=e=>t=>typeof t===e,{isArray:Qe}=Array,et=ei("undefined");function _t(e){return e!==null&&!et(e)&&e.constructor!==null&&!et(e.constructor)&&ae(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const An=pe("ArrayBuffer");function _a(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&An(e.buffer),t}const pa=ei("string"),ae=ei("function"),Dn=ei("number"),pt=e=>e!==null&&typeof e=="object",ma=e=>e===!0||e===!1,ti=e=>{if(Qt(e)!=="object")return!1;const t=Ni(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Tn in e)&&!(Zt in e)},ga=e=>{if(!pt(e)||_t(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},va=pe("Date"),ya=pe("File"),ba=pe("Blob"),Sa=pe("FileList"),wa=e=>pt(e)&&ae(e.pipe),Ea=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ae(e.append)&&((t=Qt(e))==="formdata"||t==="object"&&ae(e.toString)&&e.toString()==="[object FormData]"))},ka=pe("URLSearchParams"),[xa,Ta,Aa,Da]=["ReadableStream","Request","Response","Headers"].map(pe),Ca=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function mt(e,t,{allOwnKeys:i=!1}={}){if(e===null||typeof e>"u")return;let r,n;if(typeof e!="object"&&(e=[e]),Qe(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{if(_t(e))return;const s=i?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function Cn(e,t){if(_t(e))return null;t=t.toLowerCase();const i=Object.keys(e);let r=i.length,n;for(;r-- >0;)if(n=i[r],t===n.toLowerCase())return n;return null}const je=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rn=e=>!et(e)&&e!==je;function Pi(){const{caseless:e,skipUndefined:t}=Rn(this)&&this||{},i={},r=(n,s)=>{const o=e&&Cn(i,s)||s;ti(i[o])&&ti(n)?i[o]=Pi(i[o],n):ti(n)?i[o]=Pi({},n):Qe(n)?i[o]=n.slice():(!t||!et(n))&&(i[o]=n)};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&mt(arguments[n],r);return i}const Ra=(e,t,i,{allOwnKeys:r}={})=>(mt(t,(n,s)=>{i&&ae(n)?e[s]=xn(n,i):e[s]=n},{allOwnKeys:r}),e),Ia=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Oa=(e,t,i,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},La=(e,t,i,r)=>{let n,s,o;const a={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),s=n.length;s-- >0;)o=n[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=i!==!1&&Ni(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},Na=(e,t,i)=>{e=String(e),(i===void 0||i>e.length)&&(i=e.length),i-=t.length;const r=e.indexOf(t,i);return r!==-1&&r===i},Pa=e=>{if(!e)return null;if(Qe(e))return e;let t=e.length;if(!Dn(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},Ma=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ni(Uint8Array)),Va=(e,t)=>{const i=(e&&e[Zt]).call(e);let r;for(;(r=i.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},Ba=(e,t)=>{let i;const r=[];for(;(i=e.exec(t))!==null;)r.push(i);return r},Ua=pe("HTMLFormElement"),Fa=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,r){return i.toUpperCase()+r}),In=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),ja=pe("RegExp"),On=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),r={};mt(i,(n,s)=>{let o;(o=t(n,s,e))!==!1&&(r[s]=o||n)}),Object.defineProperties(e,r)},Xa=e=>{On(e,(t,i)=>{if(ae(e)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const r=e[i];if(ae(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},Ya=(e,t)=>{const i={},r=n=>{n.forEach(s=>{i[s]=!0})};return Qe(e)?r(e):r(String(e).split(t)),i},qa=()=>{},Ha=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function za(e){return!!(e&&ae(e.append)&&e[Tn]==="FormData"&&e[Zt])}const Wa=e=>{const t=new Array(10),i=(r,n)=>{if(pt(r)){if(t.indexOf(r)>=0)return;if(_t(r))return r;if(!("toJSON"in r)){t[n]=r;const s=Qe(r)?[]:{};return mt(r,(o,a)=>{const l=i(o,n+1);!et(l)&&(s[a]=l)}),t[n]=void 0,s}}return r};return i(e,0)},$a=pe("AsyncFunction"),Ga=e=>e&&(pt(e)||ae(e))&&ae(e.then)&&ae(e.catch),Ln=((e,t)=>e?setImmediate:t?((i,r)=>(je.addEventListener("message",({source:n,data:s})=>{n===je&&s===i&&r.length&&r.shift()()},!1),n=>{r.push(n),je.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",ae(je.postMessage)),Ka=typeof queueMicrotask<"u"?queueMicrotask.bind(je):typeof process<"u"&&process.nextTick||Ln,Ja=e=>e!=null&&ae(e[Zt]),_={isArray:Qe,isArrayBuffer:An,isBuffer:_t,isFormData:Ea,isArrayBufferView:_a,isString:pa,isNumber:Dn,isBoolean:ma,isObject:pt,isPlainObject:ti,isEmptyObject:ga,isReadableStream:xa,isRequest:Ta,isResponse:Aa,isHeaders:Da,isUndefined:et,isDate:va,isFile:ya,isBlob:ba,isRegExp:ja,isFunction:ae,isStream:wa,isURLSearchParams:ka,isTypedArray:Ma,isFileList:Sa,forEach:mt,merge:Pi,extend:Ra,trim:Ca,stripBOM:Ia,inherits:Oa,toFlatObject:La,kindOf:Qt,kindOfTest:pe,endsWith:Na,toArray:Pa,forEachEntry:Va,matchAll:Ba,isHTMLForm:Ua,hasOwnProperty:In,hasOwnProp:In,reduceDescriptors:On,freezeMethods:Xa,toObjectSet:Ya,toCamelCase:Fa,noop:qa,toFiniteNumber:Ha,findKey:Cn,global:je,isContextDefined:Rn,isSpecCompliantForm:za,toJSONObject:Wa,isAsyncFn:$a,isThenable:Ga,setImmediate:Ln,asap:Ka,isIterable:Ja};function O(e,t,i,r,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),r&&(this.request=r),n&&(this.response=n,this.status=n.status?n.status:null)}_.inherits(O,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 Nn=O.prototype,Pn={};["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(e=>{Pn[e]={value:e}}),Object.defineProperties(O,Pn),Object.defineProperty(Nn,"isAxiosError",{value:!0}),O.from=(e,t,i,r,n,s)=>{const o=Object.create(Nn);_.toFlatObject(e,o,function(c){return c!==Error.prototype},c=>c!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return O.call(o,a,l,i,r,n),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};const Za=null;function Mi(e){return _.isPlainObject(e)||_.isArray(e)}function Mn(e){return _.endsWith(e,"[]")?e.slice(0,-2):e}function Vn(e,t,i){return e?e.concat(t).map(function(r,n){return r=Mn(r),!i&&n?"["+r+"]":r}).join(i?".":""):t}function Qa(e){return _.isArray(e)&&!e.some(Mi)}const el=_.toFlatObject(_,{},null,function(e){return/^is[A-Z]/.test(e)});function ii(e,t,i){if(!_.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,i=_.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,g){return!_.isUndefined(g[f])});const r=i.metaTokens,n=i.visitor||c,s=i.dots,o=i.indexes,a=(i.Blob||typeof Blob<"u"&&Blob)&&_.isSpecCompliantForm(t);if(!_.isFunction(n))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(_.isDate(f))return f.toISOString();if(_.isBoolean(f))return f.toString();if(!a&&_.isBlob(f))throw new O("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(f)||_.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function c(f,g,u){let p=f;if(f&&!u&&typeof f=="object"){if(_.endsWith(g,"{}"))g=r?g:g.slice(0,-2),f=JSON.stringify(f);else if(_.isArray(f)&&Qa(f)||(_.isFileList(f)||_.endsWith(g,"[]"))&&(p=_.toArray(f)))return g=Mn(g),p.forEach(function(w,v){!(_.isUndefined(w)||w===null)&&t.append(o===!0?Vn([g],v,s):o===null?g:g+"[]",l(w))}),!1}return Mi(f)?!0:(t.append(Vn(u,g,s),l(f)),!1)}const h=[],d=Object.assign(el,{defaultVisitor:c,convertValue:l,isVisitable:Mi});function y(f,g){if(!_.isUndefined(f)){if(h.indexOf(f)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(f),_.forEach(f,function(u,p){(!(_.isUndefined(u)||u===null)&&n.call(t,u,_.isString(p)?p.trim():p,g,d))===!0&&y(u,g?g.concat(p):[p])}),h.pop()}}if(!_.isObject(e))throw new TypeError("data must be an object");return y(e),t}function Bn(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Vi(e,t){this._pairs=[],e&&ii(e,this,t)}const Un=Vi.prototype;Un.append=function(e,t){this._pairs.push([e,t])},Un.toString=function(e){const t=e?function(i){return e.call(this,i,Bn)}:Bn;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function tl(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Fn(e,t,i){if(!t)return e;const r=i&&i.encode||tl;_.isFunction(i)&&(i={serialize:i});const n=i&&i.serialize;let s;if(n?s=n(t,i):s=_.isURLSearchParams(t)?t.toString():new Vi(t,i).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class jn{constructor(){this.handlers=[]}use(t,i,r){return this.handlers.push({fulfilled:t,rejected:i,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Xn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},il=typeof URLSearchParams<"u"?URLSearchParams:Vi,rl=typeof FormData<"u"?FormData:null,nl=typeof Blob<"u"?Blob:null,sl={isBrowser:!0,classes:{URLSearchParams:il,FormData:rl,Blob:nl},protocols:["http","https","file","blob","url","data"]},Bi=typeof window<"u"&&typeof document<"u",Ui=typeof navigator=="object"&&navigator||void 0,ol=Bi&&(!Ui||["ReactNative","NativeScript","NS"].indexOf(Ui.product)<0),al=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ll=Bi&&window.location.href||"http://localhost",cl=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bi,hasStandardBrowserEnv:ol,hasStandardBrowserWebWorkerEnv:al,navigator:Ui,origin:ll},Symbol.toStringTag,{value:"Module"})),se={...cl,...sl};function hl(e,t){return ii(e,new se.classes.URLSearchParams,{visitor:function(i,r,n,s){return se.isNode&&_.isBuffer(i)?(this.append(r,i.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function ul(e){return _.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dl(e){const t={},i=Object.keys(e);let r;const n=i.length;let s;for(r=0;r<n;r++)s=i[r],t[s]=e[s];return t}function Yn(e){function t(i,r,n,s){let o=i[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=i.length;return o=!o&&_.isArray(n)?n.length:o,l?(_.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a):((!n[o]||!_.isObject(n[o]))&&(n[o]=[]),t(i,r,n[o],s)&&_.isArray(n[o])&&(n[o]=dl(n[o])),!a)}if(_.isFormData(e)&&_.isFunction(e.entries)){const i={};return _.forEachEntry(e,(r,n)=>{t(ul(r),n,i,0)}),i}return null}function fl(e,t,i){if(_.isString(e))try{return(t||JSON.parse)(e),_.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(i||JSON.stringify)(e)}const gt={transitional:Xn,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",r=i.indexOf("application/json")>-1,n=_.isObject(e);if(n&&_.isHTMLForm(e)&&(e=new FormData(e)),_.isFormData(e))return r?JSON.stringify(Yn(e)):e;if(_.isArrayBuffer(e)||_.isBuffer(e)||_.isStream(e)||_.isFile(e)||_.isBlob(e)||_.isReadableStream(e))return e;if(_.isArrayBufferView(e))return e.buffer;if(_.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(n){if(i.indexOf("application/x-www-form-urlencoded")>-1)return hl(e,this.formSerializer).toString();if((s=_.isFileList(e))||i.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return ii(s?{"files[]":e}:e,o&&new o,this.formSerializer)}}return n||r?(t.setContentType("application/json",!1),fl(e)):e}],transformResponse:[function(e){const t=this.transitional||gt.transitional,i=t&&t.forcedJSONParsing,r=this.responseType==="json";if(_.isResponse(e)||_.isReadableStream(e))return e;if(e&&_.isString(e)&&(i&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(s){if(n)throw s.name==="SyntaxError"?O.from(s,O.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:se.classes.FormData,Blob:se.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch"],e=>{gt.headers[e]={}});const _l=_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pl=e=>{const t={};let i,r,n;return e&&e.split(`
|
24
|
+
`).forEach(function(s){n=s.indexOf(":"),i=s.substring(0,n).trim().toLowerCase(),r=s.substring(n+1).trim(),!(!i||t[i]&&_l[i])&&(i==="set-cookie"?t[i]?t[i].push(r):t[i]=[r]:t[i]=t[i]?t[i]+", "+r:r)}),t},qn=Symbol("internals");function vt(e){return e&&String(e).trim().toLowerCase()}function ri(e){return e===!1||e==null?e:_.isArray(e)?e.map(ri):String(e)}function ml(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=i.exec(e);)t[r[1]]=r[2];return t}const gl=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fi(e,t,i,r,n){if(_.isFunction(r))return r.call(this,t,i);if(n&&(t=i),!!_.isString(t)){if(_.isString(r))return t.indexOf(r)!==-1;if(_.isRegExp(r))return r.test(t)}}function vl(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,r)=>i.toUpperCase()+r)}function yl(e,t){const i=_.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+i,{value:function(n,s,o){return this[r].call(this,t,n,s,o)},configurable:!0})})}let le=class{constructor(e){e&&this.set(e)}set(e,t,i){const r=this;function n(o,a,l){const c=vt(a);if(!c)throw new Error("header name must be a non-empty string");const h=_.findKey(r,c);(!h||r[h]===void 0||l===!0||l===void 0&&r[h]!==!1)&&(r[h||a]=ri(o))}const s=(o,a)=>_.forEach(o,(l,c)=>n(l,c,a));if(_.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(_.isString(e)&&(e=e.trim())&&!gl(e))s(pl(e),t);else if(_.isObject(e)&&_.isIterable(e)){let o={},a,l;for(const c of e){if(!_.isArray(c))throw TypeError("Object iterator must return a key-value pair");o[l=c[0]]=(a=o[l])?_.isArray(a)?[...a,c[1]]:[a,c[1]]:c[1]}s(o,t)}else e!=null&&n(t,e,i);return this}get(e,t){if(e=vt(e),e){const i=_.findKey(this,e);if(i){const r=this[i];if(!t)return r;if(t===!0)return ml(r);if(_.isFunction(t))return t.call(this,r,i);if(_.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=vt(e),e){const i=_.findKey(this,e);return!!(i&&this[i]!==void 0&&(!t||Fi(this,this[i],i,t)))}return!1}delete(e,t){const i=this;let r=!1;function n(s){if(s=vt(s),s){const o=_.findKey(i,s);o&&(!t||Fi(i,i[o],o,t))&&(delete i[o],r=!0)}}return _.isArray(e)?e.forEach(n):n(e),r}clear(e){const t=Object.keys(this);let i=t.length,r=!1;for(;i--;){const n=t[i];(!e||Fi(this,this[n],n,e,!0))&&(delete this[n],r=!0)}return r}normalize(e){const t=this,i={};return _.forEach(this,(r,n)=>{const s=_.findKey(i,n);if(s){t[s]=ri(r),delete t[n];return}const o=e?vl(n):String(n).trim();o!==n&&delete t[n],t[o]=ri(r),i[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return _.forEach(this,(i,r)=>{i!=null&&i!==!1&&(t[r]=e&&_.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
25
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(r=>i.set(r)),i}static accessor(e){const t=(this[qn]=this[qn]={accessors:{}}).accessors,i=this.prototype;function r(n){const s=vt(n);t[s]||(yl(i,n),t[s]=!0)}return _.isArray(e)?e.forEach(r):r(e),this}};le.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_.reduceDescriptors(le.prototype,({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[i]=r}}}),_.freezeMethods(le);function ji(e,t){const i=this||gt,r=t||i,n=le.from(r.headers);let s=r.data;return _.forEach(e,function(o){s=o.call(i,s,n.normalize(),t?t.status:void 0)}),n.normalize(),s}function Hn(e){return!!(e&&e.__CANCEL__)}function tt(e,t,i){O.call(this,e??"canceled",O.ERR_CANCELED,t,i),this.name="CanceledError"}_.inherits(tt,O,{__CANCEL__:!0});function zn(e,t,i){const r=i.config.validateStatus;!i.status||!r||r(i.status)?e(i):t(new O("Request failed with status code "+i.status,[O.ERR_BAD_REQUEST,O.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function bl(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Sl(e,t){e=e||10;const i=new Array(e),r=new Array(e);let n=0,s=0,o;return t=t!==void 0?t:1e3,function(a){const l=Date.now(),c=r[s];o||(o=l),i[n]=a,r[n]=l;let h=s,d=0;for(;h!==n;)d+=i[h++],h=h%e;if(n=(n+1)%e,n===s&&(s=(s+1)%e),l-o<t)return;const y=c&&l-c;return y?Math.round(d*1e3/y):void 0}}function wl(e,t){let i=0,r=1e3/t,n,s;const o=(a,l=Date.now())=>{i=l,n=null,s&&(clearTimeout(s),s=null),e(...a)};return[(...a)=>{const l=Date.now(),c=l-i;c>=r?o(a,l):(n=a,s||(s=setTimeout(()=>{s=null,o(n)},r-c)))},()=>n&&o(n)]}const ni=(e,t,i=3)=>{let r=0;const n=Sl(50,250);return wl(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=n(l),h=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&h?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},i)},Wn=(e,t)=>{const i=e!=null;return[r=>t[0]({lengthComputable:i,total:e,loaded:r}),t[1]]},$n=e=>(...t)=>_.asap(()=>e(...t)),El=se.hasStandardBrowserEnv?((e,t)=>i=>(i=new URL(i,se.origin),e.protocol===i.protocol&&e.host===i.host&&(t||e.port===i.port)))(new URL(se.origin),se.navigator&&/(msie|trident)/i.test(se.navigator.userAgent)):()=>!0,kl=se.hasStandardBrowserEnv?{write(e,t,i,r,n,s){const o=[e+"="+encodeURIComponent(t)];_.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),_.isString(r)&&o.push("path="+r),_.isString(n)&&o.push("domain="+n),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function xl(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Tl(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Gn(e,t,i){let r=!xl(t);return e&&(r||i==!1)?Tl(e,t):t}const Kn=e=>e instanceof le?{...e}:e;function Xe(e,t){t=t||{};const i={};function r(c,h,d,y){return _.isPlainObject(c)&&_.isPlainObject(h)?_.merge.call({caseless:y},c,h):_.isPlainObject(h)?_.merge({},h):_.isArray(h)?h.slice():h}function n(c,h,d,y){if(_.isUndefined(h)){if(!_.isUndefined(c))return r(void 0,c,d,y)}else return r(c,h,d,y)}function s(c,h){if(!_.isUndefined(h))return r(void 0,h)}function o(c,h){if(_.isUndefined(h)){if(!_.isUndefined(c))return r(void 0,c)}else return r(void 0,h)}function a(c,h,d){if(d in t)return r(c,h);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,h,d)=>n(Kn(c),Kn(h),d,!0)};return _.forEach(Object.keys({...e,...t}),function(c){const h=l[c]||n,d=h(e[c],t[c],c);_.isUndefined(d)&&h!==a||(i[c]=d)}),i}const Jn=e=>{const t=Xe({},e);let{data:i,withXSRFToken:r,xsrfHeaderName:n,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=le.from(o),t.url=Fn(Gn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),_.isFormData(i)){if(se.hasStandardBrowserEnv||se.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(_.isFunction(i.getHeaders)){const l=i.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([h,d])=>{c.includes(h.toLowerCase())&&o.set(h,d)})}}if(se.hasStandardBrowserEnv&&(r&&_.isFunction(r)&&(r=r(t)),r||r!==!1&&El(t.url))){const l=n&&s&&kl.read(s);l&&o.set(n,l)}return t},Al=typeof XMLHttpRequest<"u",Dl=Al&&function(e){return new Promise(function(t,i){const r=Jn(e);let n=r.data;const s=le.from(r.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:l}=r,c,h,d,y,f;function g(){y&&y(),f&&f(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function p(){if(!u)return;const v=le.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!o||o==="text"||o==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:v,config:e,request:u};zn(function(k){t(k),g()},function(k){i(k),g()},E),u=null}"onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(p)},u.onabort=function(){u&&(i(new O("Request aborted",O.ECONNABORTED,e,u)),u=null)},u.onerror=function(v){const E=v&&v.message?v.message:"Network Error",k=new O(E,O.ERR_NETWORK,e,u);k.event=v||null,i(k),u=null},u.ontimeout=function(){let v=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Xn;r.timeoutErrorMessage&&(v=r.timeoutErrorMessage),i(new O(v,E.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,e,u)),u=null},n===void 0&&s.setContentType(null),"setRequestHeader"in u&&_.forEach(s.toJSON(),function(v,E){u.setRequestHeader(E,v)}),_.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),o&&o!=="json"&&(u.responseType=r.responseType),l&&([d,f]=ni(l,!0),u.addEventListener("progress",d)),a&&u.upload&&([h,y]=ni(a),u.upload.addEventListener("progress",h),u.upload.addEventListener("loadend",y)),(r.cancelToken||r.signal)&&(c=v=>{u&&(i(!v||v.type?new tt(null,e,u):v),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const w=bl(r.url);if(w&&se.protocols.indexOf(w)===-1){i(new O("Unsupported protocol "+w+":",O.ERR_BAD_REQUEST,e));return}u.send(n||null)})},Cl=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let r=new AbortController,n;const s=function(c){if(!n){n=!0,a();const h=c instanceof Error?c:this.reason;r.abort(h instanceof O?h:new tt(h instanceof Error?h.message:h))}};let o=t&&setTimeout(()=>{o=null,s(new O(`timeout ${t} of ms exceeded`,O.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>_.asap(a),l}},Rl=function*(e,t){let i=e.byteLength;if(i<t){yield e;return}let r=0,n;for(;r<i;)n=r+t,yield e.slice(r,n),r=n},Il=async function*(e,t){for await(const i of Ol(e))yield*Rl(i,t)},Ol=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:i,value:r}=await t.read();if(i)break;yield r}}finally{await t.cancel()}},Zn=(e,t,i,r)=>{const n=Il(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:h}=await n.next();if(c){a(),l.close();return}let d=h.byteLength;if(i){let y=s+=d;i(y)}l.enqueue(new Uint8Array(h))}catch(c){throw a(c),c}},cancel(l){return a(l),n.return()}},{highWaterMark:2})},Qn=64*1024,{isFunction:si}=_,es=(({fetch:e,Request:t,Response:i})=>({fetch:e,Request:t,Response:i}))(_.global),{ReadableStream:ts,TextEncoder:is}=_.global,rs=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ll=e=>{const{fetch:t,Request:i,Response:r}=Object.assign({},es,e),n=si(t),s=si(i),o=si(r);if(!n)return!1;const a=n&&si(ts),l=n&&(typeof is=="function"?(g=>u=>g.encode(u))(new is):async g=>new Uint8Array(await new i(g).arrayBuffer())),c=s&&a&&rs(()=>{let g=!1;const u=new i(se.origin,{body:new ts,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!u}),h=o&&a&&rs(()=>_.isReadableStream(new r("").body)),d={stream:h&&(g=>g.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!d[g]&&(d[g]=(u,p)=>{let w=u&&u[g];if(w)return w.call(u);throw new O(`Response type '${g}' is not supported`,O.ERR_NOT_SUPPORT,p)})});const y=async g=>{if(g==null)return 0;if(_.isBlob(g))return g.size;if(_.isSpecCompliantForm(g))return(await new i(se.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(_.isArrayBufferView(g)||_.isArrayBuffer(g))return g.byteLength;if(_.isURLSearchParams(g)&&(g=g+""),_.isString(g))return(await l(g)).byteLength},f=async(g,u)=>_.toFiniteNumber(g.getContentLength())??y(u);return async g=>{let{url:u,method:p,data:w,signal:v,cancelToken:E,timeout:k,onDownloadProgress:m,onUploadProgress:D,responseType:L,headers:X,withCredentials:P="same-origin",fetchOptions:ce}=Jn(g);L=L?(L+"").toLowerCase():"text";let j=Cl([v,E&&E.toAbortSignal()],k),$=null;const Y=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let A;try{if(D&&c&&p!=="get"&&p!=="head"&&(A=await f(X,w))!==0){let me=new i(u,{method:"POST",body:w,duplex:"half"}),Se;if(_.isFormData(w)&&(Se=me.headers.get("content-type"))&&X.setContentType(Se),me.body){const[Zi,di]=Wn(A,ni($n(D)));w=Zn(me.body,Qn,Zi,di)}}_.isString(P)||(P=P?"include":"omit");const U=s&&"credentials"in i.prototype,ue={...ce,signal:j,method:p.toUpperCase(),headers:X.normalize().toJSON(),body:w,duplex:"half",credentials:U?P:void 0};$=s&&new i(u,ue);let Z=await(s?t($,ce):t(u,ue));const Ae=h&&(L==="stream"||L==="response");if(h&&(m||Ae&&Y)){const me={};["status","statusText","headers"].forEach(ws=>{me[ws]=Z[ws]});const Se=_.toFiniteNumber(Z.headers.get("content-length")),[Zi,di]=m&&Wn(Se,ni($n(m),!0))||[];Z=new r(Zn(Z.body,Qn,Zi,()=>{di&&di(),Y&&Y()}),me)}L=L||"text";let ui=await d[_.findKey(d,L)||"text"](Z,g);return!Ae&&Y&&Y(),await new Promise((me,Se)=>{zn(me,Se,{data:ui,headers:le.from(Z.headers),status:Z.status,statusText:Z.statusText,config:g,request:$})})}catch(U){throw Y&&Y(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new O("Network Error",O.ERR_NETWORK,g,$),{cause:U.cause||U}):O.from(U,U&&U.code,g,$)}}},Nl=new Map,ns=e=>{let t=_.merge.call({skipUndefined:!0},es,e?e.env:null);const{fetch:i,Request:r,Response:n}=t,s=[r,n,i];let o=s.length,a=o,l,c,h=Nl;for(;a--;)l=s[a],c=h.get(l),c===void 0&&h.set(l,c=a?new Map:Ll(t)),h=c;return c};ns();const Xi={http:Za,xhr:Dl,fetch:{get:ns}};_.forEach(Xi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ss=e=>`- ${e}`,Pl=e=>_.isFunction(e)||e===null||e===!1,os={getAdapter:(e,t)=>{e=_.isArray(e)?e:[e];const{length:i}=e;let r,n;const s={};for(let o=0;o<i;o++){r=e[o];let a;if(n=r,!Pl(r)&&(n=Xi[(a=String(r)).toLowerCase()],n===void 0))throw new O(`Unknown adapter '${a}'`);if(n&&(_.isFunction(n)||(n=n.get(t))))break;s[a||"#"+o]=n}if(!n){const o=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=i?o.length>1?`since :
|
26
|
+
`+o.map(ss).join(`
|
27
|
+
`):" "+ss(o[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:Xi};function Yi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tt(null,e)}function as(e){return Yi(e),e.headers=le.from(e.headers),e.data=ji.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),os.getAdapter(e.adapter||gt.adapter,e)(e).then(function(t){return Yi(e),t.data=ji.call(e,e.transformResponse,t),t.headers=le.from(t.headers),t},function(t){return Hn(t)||(Yi(e),t&&t.response&&(t.response.data=ji.call(e,e.transformResponse,t.response),t.response.headers=le.from(t.response.headers))),Promise.reject(t)})}const ls="1.12.0",oi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{oi[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const cs={};oi.transitional=function(e,t,i){function r(n,s){return"[Axios v"+ls+"] Transitional option '"+n+"'"+s+(i?". "+i:"")}return(n,s,o)=>{if(e===!1)throw new O(r(s," has been removed"+(t?" in "+t:"")),O.ERR_DEPRECATED);return t&&!cs[s]&&(cs[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(n,s,o):!0}},oi.spelling=function(e){return(t,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};function Ml(e,t,i){if(typeof e!="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let n=r.length;for(;n-- >0;){const s=r[n],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new O("option "+s+" must be "+l,O.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new O("Unknown option "+s,O.ERR_BAD_OPTION)}}const ai={assertOptions:Ml,validators:oi},be=ai.validators;let Ye=class{constructor(e){this.defaults=e||{},this.interceptors={request:new jn,response:new jn}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const n=r.stack?r.stack.replace(/^.+\n/,""):"";try{i.stack?n&&!String(i.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
28
|
+
`+n):i.stack=n}catch{}}throw i}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Xe(this.defaults,t);const{transitional:i,paramsSerializer:r,headers:n}=t;i!==void 0&&ai.assertOptions(i,{silentJSONParsing:be.transitional(be.boolean),forcedJSONParsing:be.transitional(be.boolean),clarifyTimeoutError:be.transitional(be.boolean)},!1),r!=null&&(_.isFunction(r)?t.paramsSerializer={serialize:r}:ai.assertOptions(r,{encode:be.function,serialize:be.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ai.assertOptions(t,{baseUrl:be.spelling("baseURL"),withXsrfToken:be.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=n&&_.merge(n.common,n[t.method]);n&&_.forEach(["delete","get","head","post","put","patch","common"],f=>{delete n[f]}),t.headers=le.concat(s,n);const o=[];let a=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(t)===!1||(a=a&&f.synchronous,o.unshift(f.fulfilled,f.rejected))});const l=[];this.interceptors.response.forEach(function(f){l.push(f.fulfilled,f.rejected)});let c,h=0,d;if(!a){const f=[as.bind(this),void 0];for(f.unshift(...o),f.push(...l),d=f.length,c=Promise.resolve(t);h<d;)c=c.then(f[h++],f[h++]);return c}d=o.length;let y=t;for(h=0;h<d;){const f=o[h++],g=o[h++];try{y=f(y)}catch(u){g.call(this,u);break}}try{c=as.call(this,y)}catch(f){return Promise.reject(f)}for(h=0,d=l.length;h<d;)c=c.then(l[h++],l[h++]);return c}getUri(e){e=Xe(this.defaults,e);const t=Gn(e.baseURL,e.url,e.allowAbsoluteUrls);return Fn(t,e.params,e.paramsSerializer)}};_.forEach(["delete","get","head","options"],function(e){Ye.prototype[e]=function(t,i){return this.request(Xe(i||{},{method:e,url:t,data:(i||{}).data}))}}),_.forEach(["post","put","patch"],function(e){function t(i){return function(r,n,s){return this.request(Xe(s||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ye.prototype[e]=t(),Ye.prototype[e+"Form"]=t(!0)});let Vl=class Es{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(n){i=n});const r=this;this.promise.then(n=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](n);r._listeners=null}),this.promise.then=n=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(n);return o.cancel=function(){r.unsubscribe(s)},o},t(function(n,s,o){r.reason||(r.reason=new tt(n,s,o),i(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const t=new AbortController,i=r=>{t.abort(r)};return this.subscribe(i),t.signal.unsubscribe=()=>this.unsubscribe(i),t.signal}static source(){let t;return{token:new Es(function(i){t=i}),cancel:t}}};function Bl(e){return function(t){return e.apply(null,t)}}function Ul(e){return _.isObject(e)&&e.isAxiosError===!0}const qi={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(qi).forEach(([e,t])=>{qi[t]=e});function hs(e){const t=new Ye(e),i=xn(Ye.prototype.request,t);return _.extend(i,Ye.prototype,t,{allOwnKeys:!0}),_.extend(i,t,null,{allOwnKeys:!0}),i.create=function(r){return hs(Xe(e,r))},i}const W=hs(gt);W.Axios=Ye,W.CanceledError=tt,W.CancelToken=Vl,W.isCancel=Hn,W.VERSION=ls,W.toFormData=ii,W.AxiosError=O,W.Cancel=W.CanceledError,W.all=function(e){return Promise.all(e)},W.spread=Bl,W.isAxiosError=Ul,W.mergeConfig=Xe,W.AxiosHeaders=le,W.formToJSON=e=>Yn(_.isHTMLForm(e)?new FormData(e):e),W.getAdapter=os.getAdapter,W.HttpStatusCode=qi,W.default=W;const{Axios:Bc,AxiosError:Uc,CanceledError:Fc,isCancel:jc,CancelToken:Xc,VERSION:Yc,all:qc,Cancel:Hc,isAxiosError:zc,spread:Wc,toFormData:$c,AxiosHeaders:Gc,HttpStatusCode:Kc,formToJSON:Jc,getAdapter:Zc,mergeConfig:Qc}=W,Hi=W.create({baseURL:location.origin,timeout:6e4,params:{}});Hi.interceptors.response.use(e=>e,e=>{var t,i,r,n,s,o,a,l,c,h,d;if(e.response){if(e.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(g){g&&OpenC3Auth.setTokens()}),e.response.config.headers["Ignore-Errors"]&&e.response.config.headers["Ignore-Errors"].includes(e.response.status.toString()))return Promise.reject(e);let y=`HTTP ${e.response.status} - `;(t=e.response)!=null&&t.statusText&&(y+=`${e.response.statusText} `),(r=(i=e.response)==null?void 0:i.config)!=null&&r.data&&(y+=`${e.response.config.data} `),(s=(n=e.response)==null?void 0:n.data)!=null&&s.message?y+=`${e.response.data.message}`:(a=(o=e.response)==null?void 0:o.data)!=null&&a.exception?y+=`${e.response.data.exception}`:(h=(c=(l=e.response)==null?void 0:l.data)==null?void 0:c.error)!=null&&h.message?(e.response.data.error.class&&(y+=`${e.response.data.error.class} `),y+=`${e.response.data.error.message}`):y+=`${(d=e.response)==null?void 0:d.data}`;const{$cosmosNotify:f}=window;throw f&&f.serious({title:"Network error",body:y}),e}else throw e});const li=async function(e,t,{data:i,params:r={},headers:n,noAuth:s=!1,noScope:o=!1,onUploadProgress:a=!1}={}){if(!s){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}n.Authorization=localStorage.openc3Token}return n.manual=!0,!o&&!r.scope&&(r.scope=window.openc3Scope),Hi({method:e,url:t,data:i,params:r,headers:n,onUploadProgress:a})},zi={Accept:"application/json"},us={...zi,"Content-Type":"application/json"},yt={get:function(e,{params:t,headers:i=zi,noScope:r,noAuth:n,onUploadProgress:s}={}){return li("get",e,{params:t,headers:i,noScope:r,noAuth:n,onUploadProgress:s})},put:function(e,{data:t,params:i,headers:r=us,noScope:n,noAuth:s,onUploadProgress:o}={}){return li("put",e,{data:t,params:i,headers:r,noScope:n,noAuth:s,onUploadProgress:o})},post:function(e,{data:t,params:i,headers:r=us,noScope:n,noAuth:s,onUploadProgress:o}={}){return li("post",e,{data:t,params:i,headers:r,noScope:n,noAuth:s,onUploadProgress:o})},delete:function(e,{params:t,headers:i=zi,noScope:r,noAuth:n,onUploadProgress:s}={}){return li("delete",e,{params:t,headers:i,noScope:r,noAuth:n,onUploadProgress:s})}};let Fl=()=>({emit(e,...t){for(let i=this.events[e]||[],r=0,n=i.length;r<n;r++)i[r](...t)},events:{},on(e,t){var i;return((i=this.events)[e]||(i[e]=[])).push(t),()=>{var r;this.events[e]=(r=this.events[e])==null?void 0:r.filter(n=>t!==n)}}});class jl extends Error{constructor(t,i){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=i,this.name="ReasonError"}}function Xl(e){return e?`{${Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>{let i=JSON.stringify(e[t]);return`${JSON.stringify(t)}:${i}`}).join(",")}}`:""}class Yl{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,i){if(!this._info)return this._info={id:t,info:i},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((i,{id:r,info:n})=>(i[r]=n,i),{})}}const qe=Symbol("state");class ds{constructor(t={}){this.emitter=Fl(),this.params=Object.freeze(t),this.presence=new Yl(this),this.initialConnect=!0,this[qe]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Xl({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[qe]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[qe]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[qe]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[qe]="connected";let t=!0,i=!0;this.initialConnect=!1,this.emit("connect",{reconnect:i,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[qe]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[qe]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,i){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,i)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(i){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",i)}}receive(t,i){this.emit("message",t,i)}on(t,i){return this.emitter.on(t,i)}once(t,i){let r=this.emitter.on(t,(...n)=>{r(),i(...n)});return r}emit(t,...i){return this.emitter.emit(t,...i)}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((t,i)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(n=>n()),t()})),r.push(this.on("close",n=>{r.forEach(s=>s()),i(n||new jl("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class ql extends ds{constructor(t,i){super(i),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}Jt(ql,"identifier","__ghost__");const Hl="$pubsub";class zl extends ds{async perform(t,i){if(t.startsWith("$"))return super.perform(t,i);throw Error("not implemented")}}Jt(zl,"identifier",Hl);function bt(e){return Wl.test(e)}const Wl=/^-?[0-9]+$/;function fs(e){return $l.test(e)}const $l=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function _s(e,t){if(bt(e))return Number.isSafeInteger(Number.parseInt(e,10));const i=Number.parseFloat(e),r=String(i);if(e===r)return!0;const n=ps(e),s=ps(r);return!!(n===s||(t==null?void 0:t.approx)===!0&&!bt(e)&&s.length>=14&&n.startsWith(s.substring(0,14)))}let St=function(e){return e.underflow="underflow",e.overflow="overflow",e.truncate_integer="truncate_integer",e.truncate_float="truncate_float",e}({});function Gl(e){if(_s(e,{approx:!1}))return;if(bt(e))return St.truncate_integer;const t=Number.parseFloat(e);return Number.isFinite(t)?t===0?St.underflow:St.truncate_float:St.overflow}function ps(e){const{start:t,end:i}=Kl(e),r=e.substring(t,i),n=r.indexOf(".");return n===-1?r:r.substring(0,n)+r.substring(n+1)}function Kl(e){let t=0;for(e[0]==="-"&&t++;e[t]==="0"||e[t]===".";)t++;let i=e.lastIndexOf("e");for(i===-1&&(i=e.lastIndexOf("E")),i===-1&&(i=e.length);(e[i-1]==="0"||e[i-1]===".")&&i>t;)i--;return{start:t,end:i}}class Jl{constructor(t){if(Jt(this,"isLosslessNumber",!0),!fs(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=Gl(this.value);if(t===void 0||t===St.truncate_float)return Number.parseFloat(this.value);if(bt(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function Zl(e){return e&&typeof e=="object"&&e.isLosslessNumber||!1}function Ql(e){return new Jl(e)}function ec(e,t){return Wi({"":e},"",e,t)}function Wi(e,t,i,r){return Array.isArray(i)?r.call(e,t,ic(i,r)):i&&typeof i=="object"&&!Zl(i)?r.call(e,t,tc(i,r)):r.call(e,t,i)}function tc(e,t){for(const i of Object.keys(e)){const r=Wi(e,i,e[i],t);r!==void 0?e[i]=r:delete e[i]}return e}function ic(e,t){for(let i=0;i<e.length;i++)e[i]=Wi(e,String(i),e[i],t);return e}function rc(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ql,r=0;const n=a();return g(n),p(),t?ec(n,t):n;function s(){if(e.charCodeAt(r)===cc){r++,c();const A={};let U=!0;for(;r<e.length&&e.charCodeAt(r)!==gs;){U?U=!1:(y(),c());const ue=r,Z=h();if(Z===void 0){E();return}c(),f();const Ae=a();if(Ae===void 0){P();return}Object.prototype.hasOwnProperty.call(A,Z)&&!$i(Ae,A[Z])&&k(Z,ue+1),A[Z]=Ae}return e.charCodeAt(r)!==gs&&m(),r++,A}}function o(){if(e.charCodeAt(r)===hc){r++,c();const A=[];let U=!0;for(;r<e.length&&e.charCodeAt(r)!==vs;){U?U=!1:y();const ue=a();u(ue),A.push(ue)}return e.charCodeAt(r)!==vs&&D(),r++,A}}function a(){c();const A=h()??d()??s()??o()??l("true",!0)??l("false",!1)??l("null",null);return c(),A}function l(A,U){if(e.slice(r,r+A.length)===A)return r+=A.length,U}function c(){for(;nc(e.charCodeAt(r));)r++}function h(){if(e.charCodeAt(r)===Gi){r++;let A="";for(;r<e.length&&e.charCodeAt(r)!==Gi;){if(e.charCodeAt(r)===lc){const U=e[r+1],ue=ac[U];ue!==void 0?(A+=ue,r++):U==="u"?ci(e.charCodeAt(r+2))&&ci(e.charCodeAt(r+3))&&ci(e.charCodeAt(r+4))&&ci(e.charCodeAt(r+5))?(A+=String.fromCharCode(Number.parseInt(e.slice(r+2,r+6),16)),r+=5):ce(r):X(r)}else oc(e.charCodeAt(r))?A+=e[r]:L(e[r]);r++}return v(),r++,A}}function d(){const A=r;if(e.charCodeAt(r)===ys&&(r++,w(A)),e.charCodeAt(r)===Ki)r++;else if(sc(e.charCodeAt(r)))for(r++;hi(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===vc)for(r++,w(A);hi(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Ec||e.charCodeAt(r)===wc)for(r++,(e.charCodeAt(r)===ys||e.charCodeAt(r)===pc)&&r++,w(A);hi(e.charCodeAt(r));)r++;if(r>A)return i(e.slice(A,r))}function y(){if(e.charCodeAt(r)!==gc)throw new SyntaxError(`Comma ',' expected after value ${Y()}`);r++}function f(){if(e.charCodeAt(r)!==yc)throw new SyntaxError(`Colon ':' expected after property name ${Y()}`);r++}function g(A){if(A===void 0)throw new SyntaxError(`JSON value expected ${Y()}`)}function u(A){if(A===void 0)throw new SyntaxError(`Array item expected ${Y()}`)}function p(){if(r<e.length)throw new SyntaxError(`Expected end of input ${Y()}`)}function w(A){if(!hi(e.charCodeAt(r))){const U=e.slice(A,r);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${Y()}`)}}function v(){if(e.charCodeAt(r)!==Gi)throw new SyntaxError(`End of string '"' expected ${Y()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${Y()}`)}function k(A,U){throw new SyntaxError(`Duplicate key '${A}' encountered at position ${U}`)}function m(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${Y()}`)}function D(){throw new SyntaxError(`Array item or end of array ']' expected ${Y()}`)}function L(A){throw new SyntaxError(`Invalid character '${A}' ${j()}`)}function X(A){const U=e.slice(A,A+2);throw new SyntaxError(`Invalid escape character '${U}' ${j()}`)}function P(){throw new SyntaxError(`Object value expected after ':' ${j()}`)}function ce(A){const U=e.slice(A,A+6);throw new SyntaxError(`Invalid unicode character '${U}' ${j()}`)}function j(){return`at position ${r}`}function $(){return r<e.length?`but got '${e[r]}'`:"but reached end of input"}function Y(){return`${$()} ${j()}`}}function nc(e){return e===uc||e===dc||e===fc||e===_c}function ci(e){return e>=Ki&&e<=Ji||e>=bc&&e<=kc||e>=Sc&&e<=xc}function hi(e){return e>=Ki&&e<=Ji}function sc(e){return e>=mc&&e<=Ji}function oc(e){return e>=32&&e<=1114111}function $i(e,t){return e===t?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((i,r)=>$i(i,t[r])):ms(e)&&ms(t)?[...new Set([...Object.keys(e),...Object.keys(t)])].every(i=>$i(e[i],t[i])):!1}function ms(e){return typeof e=="object"&&e!==null}const ac={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
29
|
+
`,r:"\r",t:" "},lc=92,cc=123,gs=125,hc=91,vs=93,uc=32,dc=10,fc=9,_c=13,Gi=34,pc=43,ys=45,Ki=48,mc=49,Ji=57,gc=44,vc=46,yc=58,bc=65,Sc=97,wc=69,Ec=101,kc=70,xc=102;function bs(e,t,i,r){return n(e);function n(l,c){if(Array.isArray(r)){const h=r.find(d=>d.test(l));if(h){const d=h.stringify(l);if(typeof d!="string"||!fs(d))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${d})`);return d}}if(typeof l=="boolean"||typeof l=="number"||typeof l=="string"||l===null||l instanceof Date||l instanceof Boolean||l instanceof Number||l instanceof String)return JSON.stringify(l);if(l!=null&&l.isLosslessNumber||typeof l=="bigint")return l.toString();if(Array.isArray(l))return s(l);if(l&&typeof l=="object")return o(l)}function s(l,c){if(l.length===0)return"[]";let h="[";for(let d=0;d<l.length;d++){const y=l[d];typeof y<"u"&&typeof y!="function"?h+=n(y):h+="null",d<l.length-1&&(h+=",")}return h+="]",h}function o(l,c){if(typeof l.toJSON=="function")return bs(l.toJSON(),t,i,void 0);const h=Array.isArray(t)?t.map(String):Object.keys(l);if(h.length===0)return"{}";let d=!0,y="{";for(const f of h){const g=l[f];if(a(f,g)){d?d=!1:y+=",";const u=JSON.stringify(f);y+=`${u}:`,y+=n(g)}}return y+="}",y}function a(l,c){return typeof c<"u"&&typeof c!="function"&&typeof c!="symbol"}}function Tc(e){return bt(e)&&!_s(e)?BigInt(e):parseFloat(e)}class Ss{constructor(){Jt(this,"id",1)}async exec(t,i,r={},n={},s=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,n.manual=!0,(await Hi.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:i,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...n},timeout:s,transformRequest:[(o,a)=>bs(o)],transformResponse:[o=>rc(o,void 0,Tc)]})).data.result}catch(o){let a=new Error;throw o.response?(a.name=o.response.data.error.data.class,a.message=o.response.data.error.data.message,a.object=o.response.data.error):o.request?(a.name="Request error",a.message="Request error, no response received"):a=o,a}}decode_openc3_type(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(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(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,i,r,n,s){return this.exec("map_target_to_interface",[t,i],{cmd_only:r,tlm_only:n,unmap_old:s})}unmap_target_from_interface(t,i,r,n){return this.exec("unmap_target_from_interface",[t,i],{cmd_only:r,tlm_only:n})}connect_interface(t,...i){return i.length>0?this.exec("connect_interface",[t,...i]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,i,...r){return this.exec("interface_cmd",[t,i,...r])}interface_target_enable(t,i,r=!1,n=!1){return this.exec("interface_target_enable",[t,i],{cmd_only:r,tlm_only:n})}interface_target_disable(t,i,r=!1,n=!1){return this.exec("interface_target_disable",[t,i],{cmd_only:r,tlm_only:n})}interface_details(t){return this.exec("interface_details",[t])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(t,i,r,n,s){return this.exec("map_target_to_router",[t,i],{cmd_only:r,tlm_only:n,unmap_old:s})}unmap_target_from_router(t,i,r,n){return this.exec("unmap_target_from_router",[t,i],{cmd_only:r,tlm_only:n})}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}router_target_enable(t,i,r=!1,n=!1){return this.exec("router_target_enable",[t,i],{cmd_only:r,tlm_only:n})}router_target_disable(t,i,r=!1,n=!1){return this.exec("router_target_disable",[t,i],{cmd_only:r,tlm_only:n})}router_details(t){return this.exec("router_details",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,i,r){return this.exec("get_item",[t,i,r])}get_param(t,i,r){return this.exec("get_param",[t,i,r])}get_parameter(t,i,r){return this.exec("get_param",[t,i,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,i){return this.exec("get_tlm",[t,i])}get_telemetry(t,i){return this.exec("get_tlm",[t,i])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,i=!1){return this.exec("get_all_tlm_names",[t],{hidden:i})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,i,r,n=30){const s=await this.exec("get_tlm_packet",[t,i],{type:r,stale_time:n});if(s!=null){let o=s.length,a=null;for(let l=0;l<o;l++)a=this.decode_openc3_type(s[l][1]),a!==null&&(s[l][1]=a)}return s}get_packet_derived_items(t,i){return this.exec("get_packet_derived_items",[t,i])}get_tlm_buffer(t,i){return this.exec("get_tlm_buffer",[t,i])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,i=30,r=null,n=null,s=null){let o={stale_time:i};r!==null&&(o.cache_timeout=r),n!==null&&(o.start_time=n.toISOString()),s!==null&&(o.end_time=s.toISOString());const a=await this.exec("get_tlm_values",[t],o,{},1e4);if(a&&a.length>0){let l=a[0].length,c=null;for(let h=0;h<l;h++)c=this.decode_openc3_type(a[0][h]),c!==null&&(a[0][h]=c)}return a}get_limits(t,i,r){return this.exec("get_limits",[t,i,r])}async tlm(t,i,r,n="CONVERTED"){let s=null;if(i===void 0)s=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(i))s=await this.exec("tlm",[t],{type:i});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${i}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else s=await this.exec("tlm",[t,i,r],{type:n});let o=this.decode_openc3_type(s);return o!==null&&(s=o),s}async inject_tlm(t,i,r=null,n="CONVERTED"){await this.exec("inject_tlm",[t,i,r],{type:n})}set_tlm(t,i,r,n){return this.exec("set_tlm",[t,i,r],{type:n})}override_tlm(t,i,r,n){return this.exec("override_tlm",[t,i,r],{type:n})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,i,r,n){return this.exec("normalize_tlm",[t,i,r],{type:n})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,i=!1){return this.exec("get_all_cmd_names",[t],{hidden:i})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,i){return this.exec("get_cmd",[t,i])}get_command(t,i){return this.exec("get_cmd",[t,i])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,i,r,n="CONVERTED"){return this.exec("get_cmd_value",[t,i,r,n])}get_cmd_buffer(t,i){return this.exec("get_cmd_buffer",[t,i])}_cmd(t,i,r,n,s,o={}){let a=null;for(let l in n)Object.prototype.hasOwnProperty.call(n,l)&&(a=this.encode_openc3_type(n[l]),a!==null&&(n[l]=a));return this.exec(t,[i,r,n],o,s)}get_cmd_hazardous(t,i,r,n={}){return i===void 0?this.exec("get_cmd_hazardous",t,{},n):this._cmd("get_cmd_hazardous",t,i,r,n)}cmd(t,i,r,n={},s={}){return i===void 0?this.exec("cmd",t,{},n):this._cmd("cmd",t,i,r,n,s)}cmd_no_range_check(t,i,r,n={},s={}){return i===void 0?this.exec("cmd_no_range_check",t,{},n,s):this._cmd("cmd_no_range_check",t,i,r,n,s)}cmd_raw(t,i,r,n={},s={}){return i===void 0?this.exec("cmd_raw",t,{},n,s):this._cmd("cmd_raw",t,i,r,n,s)}cmd_raw_no_range_check(t,i,r,n={},s={}){return i===void 0?this.exec("cmd_raw_no_range_check",t,{},n,s):this._cmd("cmd_raw_no_range_check",t,i,r,n,s)}cmd_no_hazardous_check(t,i,r,n={},s={}){return i===void 0?this.exec("cmd_no_hazardous_check",t,{},n,s):this._cmd("cmd_no_hazardous_check",t,i,r,n,s)}cmd_no_checks(t,i,r,n={},s={}){return i===void 0?this.exec("cmd_no_checks",t,{},n,s):this._cmd("cmd_no_checks",t,i,r,n,s)}cmd_raw_no_hazardous_check(t,i,r,n={},s={}){return i===void 0?this.exec("cmd_raw_no_hazardous_check",t,{},n,s):this._cmd("cmd_raw_no_hazardous_check",t,i,r,n,s)}cmd_raw_no_checks(t,i,r,n={},s={}){return i===void 0?this.exec("cmd_raw_no_checks",t,{},n,s):this._cmd("cmd_raw_no_checks",t,i,r,n,s)}build_cmd(t,i,r,n={},s={}){return i===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,i,r,n,s)}build_command(t,i,r,n={},s={}){return i===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,i,r,n,s)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(t,i){return this.exec("send_raw",[t,i])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,i){return this.exec("load_config",[t,i])}save_config(t,i,r){return this.exec("save_config",[t,i,r])}delete_config(t,i){return this.exec("delete_config",[t,i])}enable_limits(t,i,r){return this.exec("enable_limits",[t,i,r])}disable_limits(t,i,r){return this.exec("disable_limits",[t,i,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t,i){return this.exec("get_setting",[t],i)}get_settings(t,i){return this.exec("get_settings",t,i)}set_setting(t,i){return this.exec("set_setting",[t,i])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(t,i){return this.exec("set_setting",[t,i])}get_metrics(){return this.exec("get_metrics",[])}async hashString(t){if(window.isSecureContext){const i=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",i),n=new Uint8Array(r);return Array.from(n).map(s=>s.toString(16).padStart(2,"0")).join("")}}}const Ac={props:{modelValue:Boolean,target:{type:String},screens:{type:Object}},data(){return{api:null,targets:[],newScreenSaving:!1,newScreenName:"",duplicateScreenAlert:!1,packetNames:[],selectedTarget:"",selectedPacketName:"",rules:{required:e=>!!e||"Required."}}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},existingScreens(){return this.screens[this.selectedTarget]?this.screens[this.selectedTarget].join(", "):"None"}},watch:{selectedPacketName:function(e){e==="BLANK"?(this.newScreenName="",this.duplicateScreenAlert=!1):(this.newScreenName=e.toLowerCase(),this.screens[this.selectedTarget]&&this.screens[this.selectedTarget].indexOf(this.newScreenName.toUpperCase())!==-1?this.duplicateScreenAlert=!0:this.duplicateScreenAlert=!1)},newScreenName:function(e){this.screens[this.selectedTarget]&&this.screens[this.selectedTarget].indexOf(e.toUpperCase())!==-1?this.duplicateScreenAlert=!0:this.duplicateScreenAlert=!1}},created(){this.api=new Ss,this.duplicateScreenAlert=!1,this.newScreenSaving=!1,this.selectedTarget=this.target,this.api.get_target_names({params:{scope:window.openc3Scope}}).then(e=>{this.targets=e.filter(t=>t!=="UNKNOWN")}),this.targetSelect(this.selectedTarget)},methods:{targetSelect(e){this.selectedTarget=e,this.api.get_all_tlm_names(this.selectedTarget).then(t=>{this.packetNames=t.map(i=>({label:i,value:i})),this.packetNames.unshift({label:"[ BLANK ]",value:"BLANK"})})},newScreenKeyup(e){e.key==="Enter"&&this.saveNewScreen()},saveNewScreen(){this.duplicateScreenAlert||this.newScreenName===""||(this.newScreenSaving=!0,this.$emit("success",this.newScreenName.toUpperCase(),this.selectedPacketName,this.selectedTarget))}}},Dc={key:0,class:"pl-2"};function Cc(e,t,i,r,n,s){const o=T("v-spacer"),a=T("v-btn"),l=T("v-toolbar"),c=T("v-alert"),h=T("v-col"),d=T("v-row"),y=T("v-select"),f=T("v-autocomplete"),g=T("v-text-field"),u=T("v-progress-circular"),p=T("v-card-text"),w=T("v-divider"),v=T("v-card-actions"),E=T("v-card"),k=T("v-dialog");return R(),F(k,{modelValue:s.show,"onUpdate:modelValue":t[7]||(t[7]=m=>s.show=m),width:"600"},{default:x(()=>[b(E,null,{default:x(()=>[b(l,{height:"24"},{default:x(()=>[b(o),t[8]||(t[8]=G("span",null,"Create New Screen",-1)),b(o),b(a,{icon:"mdi-close-box",variant:"text",density:"compact","data-test":"new-screen-close-icon",onClick:t[0]||(t[0]=m=>s.show=!1)})]),_:1}),b(p,null,{default:x(()=>[b(c,{modelValue:n.duplicateScreenAlert,"onUpdate:modelValue":t[1]||(t[1]=m=>n.duplicateScreenAlert=m),type:"error",closable:"",density:"compact"},{default:x(()=>[q(" Screen "+Q(n.newScreenName.toUpperCase())+" already exists! ",1)]),_:1},8,["modelValue"]),b(d,{class:"pt-3"},{default:x(()=>[b(h,null,{default:x(()=>[...t[9]||(t[9]=[q(" Screens must belong to a target. Select a target: ",-1)])]),_:1})]),_:1}),b(d,{dense:""},{default:x(()=>[b(h,null,{default:x(()=>[b(y,{modelValue:n.selectedTarget,"onUpdate:modelValue":[t[2]||(t[2]=m=>n.selectedTarget=m),s.targetSelect],label:"Select Target",items:n.targets,"item-title":"label","item-value":"value"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1})]),_:1}),b(d,{dense:""},{default:x(()=>[b(h,null,{default:x(()=>[...t[10]||(t[10]=[q(" Screens can be auto-generated based on an existing Packet. This creates a LABELVALUE line for every item in the packet. The screen can then be edited and customized. ",-1)])]),_:1})]),_:1}),b(d,{dense:""},{default:x(()=>[b(h,null,{default:x(()=>[...t[11]||(t[11]=[q(" Leave this blank to start with a blank screen. ",-1)])]),_:1})]),_:1}),b(d,{dense:""},{default:x(()=>[b(h,null,{default:x(()=>[b(f,{modelValue:n.selectedPacketName,"onUpdate:modelValue":t[3]||(t[3]=m=>n.selectedPacketName=m),label:"New screen packet","hide-details":"",density:"compact",items:n.packetNames,"item-title":"label","item-value":"value","data-test":"new-screen-packet"},null,8,["modelValue","items"])]),_:1})]),_:1}),b(d,{dense:""},{default:x(()=>[b(h,null,{default:x(()=>[b(g,{modelValue:n.newScreenName,"onUpdate:modelValue":t[4]||(t[4]=m=>n.newScreenName=m),flat:"",autofocus:"",clearable:"",label:"Screen Name (without .txt)",rules:[n.rules.required],"data-test":"new-screen-name",onKeyup:t[5]||(t[5]=m=>s.newScreenKeyup(m))},null,8,["modelValue","rules"]),n.newScreenSaving?(R(),ee("div",Dc,[b(u,{indeterminate:"",color:"primary"})])):K("",!0)]),_:1})]),_:1})]),_:1}),b(w),b(v,{class:"px-2"},{default:x(()=>[b(o),b(a,{variant:"outlined",onClick:t[6]||(t[6]=m=>s.show=!1)},{default:x(()=>[...t[12]||(t[12]=[q(" Cancel ",-1)])]),_:1}),b(a,{variant:"flat",onClick:s.saveNewScreen},{default:x(()=>[...t[13]||(t[13]=[q(" Save ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Rc={components:{TopBar:Ds,Openc3Screen:Bs,NewScreenDialog:_i(Ac,[["render",Cc],["__scopeId","data-v-65de44e6"]]),OpenConfigDialog:sr,SaveConfigDialog:nr},mixins:[ir,rr],data(){return{title:"Telemetry Viewer",panel:0,counter:0,definitions:[],screens:{},selectedTarget:"",selectedScreen:"",newScreenDialog:!1,grid:null,api:null,timeZone:null,keywords:[],configKey:"telemetry_viewer",openConfig:!1,saveConfig:!1,playbackAvailable:!1,playbackStep:1,playbackSkip:10,playbackDate:"",playbackTime:"",playbackDateTime:null,playbackMode:"realtime",playbackTimer:null,playbackPlaying:!1}},computed:{menus:function(){return[{label:"File",items:[{label:"Playback Mode",checkbox:!0,checked:this.playbackMode==="playback",disabled:this.playbackAvailable===!1,command:()=>{this.playbackMode=this.playbackMode==="playback"?"realtime":"playback"}},{divider:!0},{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.panel=0,this.closeAll(),this.resetConfigBase()}}]}]},currentConfig:function(){return this.definitions.map(e=>({screen:e.screen,target:e.target,floated:e.floated,top:e.top,left:e.left,zIndex:e.zIndex}))}},watch:{definitions:{handler:function(){this.saveDefaultConfig(this.currentConfig)},deep:!0},playbackMode:function(e){if(this.$store.commit("playback",{playbackMode:this.playbackMode,playbackDateTime:this.playbackDateTime,playbackStep:this.playbackStep}),e==="playback"){let t=new Date-36e5;this.playbackDate=this.formatDate(t,this.timeZone),this.playbackTime=this.formatTime(t,this.timeZone)}else this.playbackPause()},playbackDateTime:function(){this.$store.commit("playback",{playbackMode:this.playbackMode,playbackDateTime:this.playbackDateTime,playbackStep:this.playbackStep}),this.playbackDateTime&&(this.playbackDateTime>new Date?this.playbackPause():(this.playbackDate=this.formatDate(this.playbackDateTime,this.timeZone),this.playbackTime=this.formatTime(this.playbackDateTime,this.timeZone)))},playbackStep:function(){this.$store.commit("playback",{playbackMode:this.playbackMode,playbackDateTime:this.playbackDateTime,playbackStep:this.playbackStep}),localStorage[`${this.configKey}__step`]=this.playbackStep},playbackSkip:function(){localStorage[`${this.configKey}__skip`]=this.playbackSkip},playbackDate:function(){localStorage[`${this.configKey}__date`]=this.playbackDate},playbackTime:function(){localStorage[`${this.configKey}__time`]=this.playbackTime}},created(){this.api=new Ss,this.api.ensure_offline_access(),this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{}),yt.get("/openc3-api/tsdb",{headers:{"Ignore-Errors":"404"}}).then(e=>{this.playbackAvailable=!0}).catch(e=>{this.playbackAvailable=!1}),yt.get("/openc3-api/screens").then(e=>{if(e.data.forEach(t=>{let i=t.split("/");this.screens[i[0]]===void 0&&(this.screens[i[0]]=[]),this.screens[i[0]].push(i[2].split(".")[0].toUpperCase())}),this.selectedTarget=Object.keys(this.screens)[0],this.selectedScreen=this.screens[this.selectedTarget][0],this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else if(this.$route.params.target&&this.$route.params.screen)this.targetSelect(this.$route.params.target.toUpperCase()),this.screenSelect(this.$route.params.screen.toUpperCase());else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(this.loadDefaultConfig())}}),yt.get("/openc3-api/autocomplete/keywords/screen").then(e=>{this.keywords=e.data}),localStorage[`${this.configKey}__step`]&&(this.playbackStep=localStorage[`${this.configKey}__step`]),localStorage[`${this.configKey}__skip`]&&(this.playbackSkip=localStorage[`${this.configKey}__skip`]),localStorage[`${this.configKey}__date`]&&(this.playbackDate=localStorage[`${this.configKey}__date`]),localStorage[`${this.configKey}__time`]&&(this.playbackTime=localStorage[`${this.configKey}__time`])},mounted(){this.grid=new I(".grid",{dragEnabled:!0,dragHandle:".v-toolbar"}),this.grid.on("dragEnd",this.refreshLayout)},beforeUnmount(){this.playbackTimer&&clearInterval(this.playbackTimer)},methods:{targetSelect(e){this.selectedTarget=e,this.selectedScreen=this.screens[e][0]},screenSelect(e){e&&(this.selectedScreen=e,this.showScreen(this.selectedTarget,this.selectedScreen))},newScreen(){this.newScreenDialog=!0},async saveNewScreen(e,t,i){let r=`SCREEN AUTO AUTO 1.0
|
30
|
+
`;t&&t!=="BLANK"?(r+=`
|
31
|
+
VERTICAL
|
32
|
+
`,await this.api.get_tlm(i,t).then(n=>{n.items.forEach(s=>{r+=` LABELVALUE ${i} ${t} ${s.name}
|
33
|
+
`}),r+=`END
|
34
|
+
`})):r+=`
|
35
|
+
LABEL NEW
|
36
|
+
`,yt.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:i,screen:e,text:r}}).then(n=>{this.newScreenDialog=!1,this.screens[i]===void 0&&(this.screens[i]=[]),this.screens[i].push(e),this.screens[i].sort(),this.selectedTarget=i,this.selectedScreen=e,this.showScreen(i,e)})},showScreen(e,t){this.definitions.find(r=>r.target==e&&r.screen==t)||this.loadScreen(e,t).then(r=>{this.pushScreen({id:this.counter++,target:e,screen:t,definition:r.data,floated:!1,top:0,left:0,zIndex:0})})},loadScreen(e,t){return yt.get("/openc3-api/screen/"+e+"/"+t,{headers:{Accept:"text/plain"}})},pushScreen(e){this.definitions.push(e),this.$nextTick(function(){if(!e.floated){let t=this.grid.add(this.$refs.gridItem[this.$refs.gridItem.length-1],{active:!1});this.grid.show(t),this.grid.refreshItems().layout()}})},closeScreenByName(e,t){const i=this.definitions.find(r=>r.target==e&&r.screen==t);i&&this.closeScreen(i.id)},closeAll(){for(const e of this.definitions)this.closeScreen(e.id)},closeScreen(e){let t=this.grid.getItems([document.getElementById(this.screenId(e))]);this.grid.remove(t),this.grid.refreshItems().layout(),this.definitions=this.definitions.filter((i,r,n)=>i.id!=e)},deleteScreen(e){this.closeScreen(e.id);let t=this.screens[e.target].indexOf(e.screen);t!==-1&&(this.screens[e.target].splice(t,1),this.screens[e.target].length===0&&this.$delete(this.screens,e.target))},floatScreen(e,t,i,r,n){e.floated=t,e.top=i,e.left=r,e.zIndex=n;let s=this.grid.getItems([document.getElementById(this.screenId(e.id))]);this.grid.remove(s),this.grid.refreshItems().layout()},unfloatScreen(e,t,i,r,n){e.floated=t,e.top=i,e.left=r,e.zIndex=n;let s=[document.getElementById(this.screenId(e.id))];this.grid.add(s),this.grid.refreshItems().layout()},dragScreen(e,t,i,r,n){e.floated=t,e.top=i,e.left=r,e.zIndex=n},refreshLayout(){setTimeout(()=>{this.grid.refreshItems().layout()},600)},screenId(e){return"tlmViewerScreen"+e},loadAll(e,t){Promise.all(t).then(i=>{e.forEach((r,n)=>{const s=i[n];setTimeout(()=>{let o=r.floated;o||(o=!1);let a=r.top||0,l=r.left||0,c=r.zIndex||0;this.pushScreen({id:this.counter++,target:r.target,screen:r.screen,definition:s.data,floated:o,top:a,left:l,zIndex:c})},0)})}).then(()=>{setTimeout(this.refreshLayout,0)})},applyConfig:function(e){this.counter=0,this.definitions=[];const t=e.map(i=>this.loadScreen(i.target,i.screen));this.loadAll(e,t)},openConfiguration:function(e,t=!1){this.openConfigBase(e,t,i=>{this.applyConfig(i)}),this.panel=null},saveConfiguration:function(e){this.saveConfigBase(e,this.currentConfig)},playbackToggle(){this.playbackPlaying?this.playbackPause():this.playbackPlay()},playbackStepBackward(){this.playbackDateTime&&(this.playbackDateTime=new Date(this.playbackDateTime.getTime()-1e3*this.playbackStep))},playbackStepForward(){if(this.playbackDateTime){const e=new Date(this.playbackDateTime.getTime()+1e3*this.playbackStep);e<=new Date&&(this.playbackDateTime=e)}},playbackSkipBackward(){this.playbackDateTime&&(this.playbackDateTime=new Date(this.playbackDateTime.getTime()-1e3*this.playbackSkip))},playbackSkipForward(){if(this.playbackDateTime){const e=new Date(this.playbackDateTime.getTime()+1e3*this.playbackSkip);e<=new Date&&(this.playbackDateTime=e)}},playbackPlay(){this.timeZone==="UTC"?this.playbackDateTime=new Date(`${this.playbackDate}T${this.playbackTime}Z`):this.playbackDateTime=new Date(`${this.playbackDate}T${this.playbackTime}`),this.playbackTimer&&clearInterval(this.playbackTimer),this.playbackTimer=setInterval(()=>{this.playbackDateTime&&(this.playbackDateTime=new Date(this.playbackDateTime.getTime()+1e3*this.playbackStep))},1e3),this.playbackPlaying=!0},playbackPause(){this.playbackTimer&&(clearInterval(this.playbackTimer),this.playbackTimer=null),this.playbackPlaying=!1}}},Ic={key:0,class:"playback"},Oc={class:"pa-4"},Lc={class:"grid"},Nc=["id"],Pc={class:"item-content"};function Mc(e,t,i,r,n,s){const o=T("top-bar"),a=T("v-expansion-panel-title"),l=T("v-autocomplete"),c=T("v-btn"),h=T("v-icon"),d=T("v-row"),y=T("v-text-field"),f=T("v-tooltip"),g=T("v-expansion-panel-text"),u=T("v-expansion-panel"),p=T("v-expansion-panels"),w=T("openc3-screen"),v=T("open-config-dialog"),E=T("save-config-dialog"),k=T("new-screen-dialog");return R(),ee(we,null,[b(o,{title:n.title,menus:s.menus},null,8,["title","menus"]),n.playbackMode==="playback"?(R(),ee("div",Ic,"Playback Mode")):K("",!0),b(p,{modelValue:n.panel,"onUpdate:modelValue":t[8]||(t[8]=m=>n.panel=m),class:"mb-1"},{default:x(()=>[b(u,null,{default:x(()=>[b(a,{class:"pulse-i"}),b(g,null,{default:x(()=>[G("div",Oc,[b(d,{class:"pa-3"},{default:x(()=>[b(l,{modelValue:n.selectedTarget,"onUpdate:modelValue":t[0]||(t[0]=m=>n.selectedTarget=m),class:"mr-4",density:"compact","hide-details":"",variant:"outlined",label:"Select Target",items:Object.keys(n.screens).sort(),"item-title":"label","item-value":"value",style:{"max-width":"300px"},"data-test":"select-target"},null,8,["modelValue","items"]),b(l,{modelValue:n.selectedScreen,"onUpdate:modelValue":[t[1]||(t[1]=m=>n.selectedScreen=m),s.screenSelect],class:"mr-4",density:"compact","hide-details":"",variant:"outlined",label:"Select Screen",items:n.screens[n.selectedTarget],style:{"max-width":"300px"},"data-test":"select-screen"},null,8,["modelValue","items","onUpdate:modelValue"]),b(c,{class:"bg-primary mr-2",disabled:!n.selectedScreen,"data-test":"show-screen",onClick:t[2]||(t[2]=()=>s.showScreen(n.selectedTarget,n.selectedScreen))},{default:x(()=>[...t[13]||(t[13]=[q(" Show ",-1)])]),_:1},8,["disabled"]),b(c,{class:"bg-primary mr-2","data-test":"new-screen",onClick:t[3]||(t[3]=()=>s.newScreen(n.selectedTarget))},{default:x(()=>[t[15]||(t[15]=q(" New Screen ",-1)),b(h,null,{default:x(()=>[...t[14]||(t[14]=[q(" mdi-file-plus",-1)])]),_:1})]),_:1})]),_:1}),n.playbackMode==="playback"?(R(),F(d,{key:0,class:"pa-3"},{default:x(()=>[b(y,{modelValue:n.playbackDate,"onUpdate:modelValue":t[4]||(t[4]=m=>n.playbackDate=m),class:"mr-4",density:"compact","hide-details":"",variant:"outlined",label:"Date",type:"date",style:{"max-width":"200px"},"data-test":"playback-date",disabled:n.playbackPlaying},null,8,["modelValue","disabled"]),b(y,{modelValue:n.playbackTime,"onUpdate:modelValue":t[5]||(t[5]=m=>n.playbackTime=m),class:"mr-4",density:"compact","hide-details":"",variant:"outlined",label:"Time",type:"time",step:"1",style:{"max-width":"200px"},"data-test":"playback-time",disabled:n.playbackPlaying},null,8,["modelValue","disabled"]),b(f,{text:`Skip Backward ${n.playbackSkip} secs`,"open-delay":2e3,location:"top"},{activator:x(({props:m})=>[b(c,Me(m,{icon:"mdi-skip-backward",variant:"text","aria-label":"Skip Backward","data-test":"playback-skip-backward",style:{"margin-top":"-5px"},onClick:s.playbackSkipBackward}),null,16,["onClick"])]),_:1},8,["text"]),b(f,{text:`Step Backward ${n.playbackStep} secs`,"open-delay":2e3,location:"top"},{activator:x(({props:m})=>[b(c,Me(m,{icon:"mdi-step-backward",variant:"text","aria-label":"Step Backward","data-test":"playback-step-backward",style:{"margin-top":"-5px"},onClick:s.playbackStepBackward}),null,16,["onClick"])]),_:1},8,["text"]),b(c,{icon:n.playbackPlaying?"mdi-pause":"mdi-play",variant:"text",class:"bg-primary","aria-label":"Play / Pause",style:{"margin-top":"-5px"},onClick:s.playbackToggle},null,8,["icon","onClick"]),b(f,{text:`Step Forward ${n.playbackStep} secs`,"open-delay":2e3,location:"top"},{activator:x(({props:m})=>[b(c,Me(m,{icon:"mdi-step-forward",variant:"text","aria-label":"Step Forward","data-test":"playback-step-forward",style:{"margin-top":"-5px"},onClick:s.playbackStepForward}),null,16,["onClick"])]),_:1},8,["text"]),b(f,{text:`Skip Forward ${n.playbackSkip} secs`,"open-delay":2e3,location:"top"},{activator:x(({props:m})=>[b(c,Me(m,{icon:"mdi-skip-forward",variant:"text","aria-label":"Skip Forward","data-test":"playback-skip-forward",style:{"margin-top":"-5px"},onClick:s.playbackSkipForward}),null,16,["onClick"])]),_:1},8,["text"]),b(y,{modelValue:n.playbackStep,"onUpdate:modelValue":t[6]||(t[6]=m=>n.playbackStep=m),class:"mr-4 ml-4",density:"compact","hide-details":"",variant:"outlined",label:"Step (Speed)",suffix:"secs",type:"number",step:"1","data-test":"playback-speed",style:{"max-width":"120px"}},null,8,["modelValue"]),b(y,{modelValue:n.playbackSkip,"onUpdate:modelValue":t[7]||(t[7]=m=>n.playbackSkip=m),class:"mr-4",density:"compact","hide-details":"",variant:"outlined",label:"Skip",suffix:"secs",type:"number",step:"1","data-test":"skip",style:{"max-width":"120px"}},null,8,["modelValue"])]),_:1})):K("",!0)])]),_:1})]),_:1})]),_:1},8,["modelValue"]),G("div",Lc,[(R(!0),ee(we,null,Pe(n.definitions,m=>(R(),ee("div",{id:s.screenId(m.id),key:m.id,ref_for:!0,ref:"gridItem",class:"item"},[G("div",Pc,[b(w,{ref_for:!0,ref:`screen-${m.id}`,class:"openc3-screen",target:m.target,screen:m.screen,definition:m.definition,keywords:n.keywords,"initial-floated":m.floated,"initial-top":m.top,"initial-left":m.left,"initial-z":m.zIndex,"time-zone":n.timeZone,"playback-mode":n.playbackMode,"playback-date-time":n.playbackDateTime,onCloseScreen:D=>s.closeScreen(m.id),onMinMaxScreen:s.refreshLayout,onAddNewScreen:t[9]||(t[9]=D=>s.showScreen(...D)),onDeleteScreen:D=>s.deleteScreen(m),onFloatScreen:D=>s.floatScreen(m,...D),onUnfloatScreen:D=>s.unfloatScreen(m,...D),onDragScreen:D=>s.dragScreen(m,...D),onEditScreen:s.refreshLayout},null,8,["target","screen","definition","keywords","initial-floated","initial-top","initial-left","initial-z","time-zone","playback-mode","playback-date-time","onCloseScreen","onMinMaxScreen","onDeleteScreen","onFloatScreen","onUnfloatScreen","onDragScreen","onEditScreen"])])],8,Nc))),128))]),n.openConfig?(R(),F(v,{key:1,modelValue:n.openConfig,"onUpdate:modelValue":t[10]||(t[10]=m=>n.openConfig=m),"config-key":n.configKey,onSuccess:s.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):K("",!0),n.saveConfig?(R(),F(E,{key:2,modelValue:n.saveConfig,"onUpdate:modelValue":t[11]||(t[11]=m=>n.saveConfig=m),"config-key":n.configKey,onSuccess:s.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):K("",!0),n.newScreenDialog?(R(),F(k,{key:3,modelValue:n.newScreenDialog,"onUpdate:modelValue":t[12]||(t[12]=m=>n.newScreenDialog=m),target:n.selectedTarget,screens:n.screens,onSuccess:s.saveNewScreen},null,8,["modelValue","target","screens","onSuccess"])):K("",!0)],64)}const th=ks("default",_i(Rc,[["render",Mc],["__scopeId","data-v-821ac045"]]))}}});
|