openc3-cosmos-tool-tlmgrapher 5.20.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/plugin.txt +1 -1
  3. data/tools/tlmgrapher/ArrayWidget-By62tXtU-ca93d4bccc5ff2fb9f80.js +2 -0
  4. data/tools/tlmgrapher/BarColumn-Dm3D1Lhp-ec78839c989cf756abdd.js +1 -0
  5. data/tools/tlmgrapher/BlockWidget-CrT45ode-7051c6f6ffdd54b49542.js +2 -0
  6. data/tools/tlmgrapher/ButtonWidget-CKyBBv6m-b9aa430850a622afc5b2.js +2 -0
  7. data/tools/tlmgrapher/CanvasWidget-PqkppHC7-563590939356be058598.js +1 -0
  8. data/tools/tlmgrapher/CanvasdotWidget-BUbJgM2d-130530b874c461824f75.js +1 -0
  9. data/tools/tlmgrapher/CanvasimageWidget-DPVBY7mi-5a1aef18c8a552f44568.js +1 -0
  10. data/tools/tlmgrapher/CanvasimagevalueWidget-GX37zzNc-82a9936193f61cc224c7.js +1 -0
  11. data/tools/tlmgrapher/CanvaslabelWidget-P2_Y6Edw-51fdf3cf9cfe4ec64cdc.js +1 -0
  12. data/tools/tlmgrapher/CanvaslabelvalueWidget-Cuas1i9P-ca4ea68c808ad5f465cc.js +1 -0
  13. data/tools/tlmgrapher/CanvaslineWidget-BYOYgPya-49f2888871b833201f26.js +1 -0
  14. data/tools/tlmgrapher/CanvaslinevalueWidget-3cVJMFo7-2aafedcff58572d0c467.js +1 -0
  15. data/tools/tlmgrapher/CheckbuttonWidget-B3wgSMuB-886bc06155954f77f48f.js +1 -0
  16. data/tools/tlmgrapher/ComboboxWidget-Dzr4Scvf-cccc7ef7dd704592630f.js +1 -0
  17. data/tools/tlmgrapher/DateWidget-BWh76Ibb-33bc7cbc62501f3f50a7.js +1 -0
  18. data/tools/tlmgrapher/DetailsDialog-EWjtBjle-c7397b128a1627131c19.js +1 -0
  19. data/tools/tlmgrapher/DynamicWidget-m9EliUR2-85e5e4f769bd2333c46d.js +1 -0
  20. data/tools/tlmgrapher/FormatvalueWidget-Rk0_eeIm-3fad0aabce48d82227c4.js +1 -0
  21. data/tools/tlmgrapher/Graph-BFUsShJg-aaadbcb335c2c4356090.js +1 -0
  22. data/tools/tlmgrapher/GraphWidget-LqekkNDr-762dee3450f3a63fdce6.js +1 -0
  23. data/tools/tlmgrapher/HorizontalWidget-BcfJ24Zn-bb6e43939a1af6088c96.js +1 -0
  24. data/tools/tlmgrapher/HorizontalboxWidget-CQy1Hv9E-2182e053548ef44137b6.js +1 -0
  25. data/tools/tlmgrapher/HorizontallineWidget-BdlNB951-c4ecee3b93ece6577c80.js +1 -0
  26. data/tools/tlmgrapher/IframeWidget-BBaDrRLo-27f223eec109d8f7db52.js +1 -0
  27. data/tools/tlmgrapher/ImageLoader-CDLQopxJ-b1323ffc9d0ef4fa79d0.js +1 -0
  28. data/tools/tlmgrapher/ImageviewerWidget-BgO3Pq6I-6b1ae952f8b3ade01054.js +1 -0
  29. data/tools/tlmgrapher/LabelWidget-B_C6lKOE-1baf36ea950e16dc4a9f.js +1 -0
  30. data/tools/tlmgrapher/LabelledWidget-B_UGivhr-5c4bb8b0ef4831e38805.js +1 -0
  31. data/tools/tlmgrapher/LabelprogressbarWidget-BJWCmsYC-64c59786eda8df1167de.js +1 -0
  32. data/tools/tlmgrapher/LabelsparklineWidget-DILCIh3q-bd46b2a05594b9343fd1.js +1 -0
  33. data/tools/tlmgrapher/LabelvalueWidget-CCZd1NXE-80599e273c69443d1539.js +1 -0
  34. data/tools/tlmgrapher/LabelvaluedescWidget-Bsllq8W6-ea5d1fa3961ccb59361f.js +1 -0
  35. data/tools/tlmgrapher/LabelvaluelimitsbarWidget-BV-cfaD--9be2ea60f89605b35c22.js +1 -0
  36. data/tools/tlmgrapher/LabelvaluelimitscolumnWidget-DwA0eRBw-b446ecf51b825df1dc6d.js +1 -0
  37. data/tools/tlmgrapher/LabelvaluerangebarWidget-3GDJz3dj-c03c2e216127c2c85dc2.js +1 -0
  38. data/tools/tlmgrapher/Layout-klOVw-YN-1bd46bc37b38d46695d1.js +1 -0
  39. data/tools/tlmgrapher/LedWidget-BAt02s0J-953acf1731d56870bfcb.js +1 -0
  40. data/tools/tlmgrapher/LimitsbarWidget-JJiyzZjb-3cecd3f567a7e8ba26e9.js +1 -0
  41. data/tools/tlmgrapher/LimitscolorWidget-CYzXKbYd-cb2cb276d7ca552df655.js +1 -0
  42. data/tools/tlmgrapher/LimitscolumnWidget-Cd76tBo7-b74cfe4b46851a84cb94.js +1 -0
  43. data/tools/tlmgrapher/LinegraphWidget-DWRtO6Ej-6126a63a8bbe3ef954e8.js +1 -0
  44. data/tools/tlmgrapher/MatrixbycolumnsWidget-cwsyjNV2-8ed92c41bdf02bf404db.js +1 -0
  45. data/tools/tlmgrapher/ProgressbarWidget-CYDziFej-22eea35cade22945adc9.js +1 -0
  46. data/tools/tlmgrapher/RadiobuttonWidget-U6jcQZoD-f06732d4ac17d38b0884.js +1 -0
  47. data/tools/tlmgrapher/RadiogroupWidget-HTPJnsB0-22d7e1cae95a99f27481.js +1 -0
  48. data/tools/tlmgrapher/RangebarWidget-DW0FJK6y-dc1f38504dc9ff7de12c.js +1 -0
  49. data/tools/tlmgrapher/RollupWidget-B2qrx55f-e96463076f3725a606d8.js +1 -0
  50. data/tools/tlmgrapher/ScrollwindowWidget-CwIDxgO6-38ad642f98fa616f87b4.js +1 -0
  51. data/tools/tlmgrapher/SignalWidget-Bosa3AbW-30a7cca8aa3656212d15.js +1 -0
  52. data/tools/tlmgrapher/SpacerWidget-DYAlt5mt-2ec04c0e504f3d2603a0.js +1 -0
  53. data/tools/tlmgrapher/SparklineWidget-CDrVXOFV-5ba8f9e7b8b17b27f865.js +1 -0
  54. data/tools/tlmgrapher/TabbookWidget-DDdlzCkv-e233de21b68c60ccea10.js +1 -0
  55. data/tools/tlmgrapher/TextboxWidget-5euFelEq-8e66c4d7929723450b6a.js +1 -0
  56. data/tools/tlmgrapher/TextfieldWidget-BFripYeh-3d733576c4424a4320f1.js +1 -0
  57. data/tools/tlmgrapher/TimeWidget-BBSbsUYJ-8183ad8861caca8ad5da.js +1 -0
  58. data/tools/tlmgrapher/TitleWidget-p8cjo-Bs-b00740418070f62c6cf9.js +1 -0
  59. data/tools/tlmgrapher/TlmGrapher-164bfa075069a74a6411.js +26 -0
  60. data/tools/tlmgrapher/VWidget-Dmqf_jKM-f03d30579a2fe310f9fe.js +1 -0
  61. data/tools/tlmgrapher/ValueWidget-CZh7JWwT-5598101fe6c7553e1a1a.js +1 -0
  62. data/tools/tlmgrapher/ValuelimitsbarWidget-DU7ybswC-43c197ddc86e3d5da08f.js +1 -0
  63. data/tools/tlmgrapher/ValuelimitscolumnWidget-DMw-h5jM-260964873405de3ed849.js +1 -0
  64. data/tools/tlmgrapher/ValuerangebarWidget-DPpofDpA-a6c1f6b8a6d03e9d57ba.js +1 -0
  65. data/tools/tlmgrapher/VerticalWidget-Ch7VAEmz-63ba862975d6eab6a75f.js +1 -0
  66. data/tools/tlmgrapher/VerticalboxWidget-DYx-TFT4-1ed12b1a837f190793ab.js +1 -0
  67. data/tools/tlmgrapher/Widget-orNSvnOh-a98828cd439e9a94bd76.js +1 -0
  68. data/tools/tlmgrapher/main-ca88b1aac639693ffb5d.js +1420 -0
  69. data/tools/tlmgrapher/main.js +1 -0
  70. metadata +69 -11
  71. data/tools/tlmgrapher/index.html +0 -4
  72. data/tools/tlmgrapher/js/272.js +0 -2
  73. data/tools/tlmgrapher/js/272.js.map +0 -1
  74. data/tools/tlmgrapher/js/656.js +0 -2
  75. data/tools/tlmgrapher/js/656.js.map +0 -1
  76. data/tools/tlmgrapher/js/980.js +0 -23
  77. data/tools/tlmgrapher/js/980.js.map +0 -1
  78. data/tools/tlmgrapher/js/app.js +0 -2
  79. data/tools/tlmgrapher/js/app.js.map +0 -1
@@ -0,0 +1,26 @@
1
+ System.register(["./main-ca88b1aac639693ffb5d.js","vue","./Graph-BFUsShJg-aaadbcb335c2c4356090.js","vue-router","vuex","vuetify"],function(Xs,sl){"use strict";var Di,je,Ai,Ri,Ci,ki,I,X,V,Ii,A,C,at,Dt,it,gt,At,Ue,Rt,ze,We,Ct,zt,Wt,Oi;return{setters:[M=>{Di=M.s,je=M._,Ai=M.Z,Ri=M.H,Ci=M.$,ki=M.G},M=>{I=M.resolveComponent,X=M.openBlock,V=M.createBlock,Ii=M.Teleport,A=M.createVNode,C=M.withCtx,at=M.createElementVNode,Dt=M.toDisplayString,it=M.createElementBlock,gt=M.Fragment,At=M.renderList,Ue=M.mergeProps,Rt=M.createTextVNode,ze=M.createSlots,We=M.normalizeStyle,Ct=M.createCommentVNode,zt=M.withDirectives,Wt=M.vShow},M=>{Oi=M.S},null,null,null],execute:function(){var M=document.createElement("style");M.textContent=`i.v-icon.mdi-chevron-down{animation:pulse 2s 3}@keyframes pulse{0%{-webkit-box-shadow:0 0 0 0 rgba(255,255,255,.4)}70%{-webkit-box-shadow:0 0 0 10px rgba(255,255,255,0)}to{-webkit-box-shadow:0 0 0 0 rgba(255,255,255,0)}}.expansion[data-v-d641d4a2]{padding:5px 5px 10px;background-color:var(--color-background-base-default)!important}.v-container[data-v-d641d4a2]{max-width:unset;padding-top:0;padding-bottom:10px}.grapher-info[data-v-d641d4a2]{position:relative;top:-115px;height:0px}.v-expansion-panel-text .container[data-v-d641d4a2]{margin:0}.v-expansion-panel-title[data-v-d641d4a2]{min-height:10px;padding:5px}.v-navigation-drawer[data-v-d641d4a2]{z-index:2}.grid[data-v-d641d4a2]{position:relative}.item[data-v-d641d4a2]{position:absolute;z-index:1}.item.muuri-item-dragging[data-v-d641d4a2]{z-index:3}.item.muuri-item-releasing[data-v-d641d4a2]{z-index:2}.item.muuri-item-hidden[data-v-d641d4a2]{z-index:0}.item-content[data-v-d641d4a2]{position:relative;cursor:pointer;border-radius:6px;margin:6px}.pulse[data-v-d641d4a2]{animation:pulse-d641d4a2 1s infinite}@keyframes pulse-d641d4a2{0%{opacity:1}50%{opacity:.5}}
2
+ /*$vite$:1*/`,document.head.appendChild(M);const Bs={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},Ys={class:"app-title mr-2"},Gs=["textContent"];function Fs(t,e,i,r,s,n){const o=I("v-col"),a=I("v-row"),l=I("v-icon"),h=I("v-btn"),c=I("v-divider"),d=I("v-list-item-title"),y=I("v-list-item"),p=I("v-list"),g=I("v-menu"),u=I("v-radio"),_=I("v-list-item-action"),b=I("v-radio-group"),m=I("v-checkbox");return X(),V(Ii,{to:"#openc3-menu"},[A(a,{"no-gutters":""},{default:C(()=>[A(o,{"align-self":"end"},{default:C(()=>[at("span",Ys,Dt(i.title),1)]),_:1})]),_:1}),A(a,{dense:"",class:"flex-nowrap"},{default:C(()=>[(X(!0),it(gt,null,At(i.menus,(E,w)=>(X(),V(g,{ref_for:!0,ref:"topmenu",key:w},{activator:C(({props:S})=>[A(h,Ue({ref_for:!0},S,{variant:"outlined",class:"mx-1 menu-button","data-test":n.formatDT(`${i.title} ${E.label}`)}),{default:C(()=>[at("span",{textContent:Dt(E.label)},null,8,Gs),A(l,{class:"myicon",end:""},{default:C(()=>e[0]||(e[0]=[Rt(" mdi-menu-down ")])),_:1})]),_:2},1040,["data-test"])]),default:C(()=>[A(p,null,{default:C(()=>[(X(!0),it(gt,null,At(E.items,(S,x)=>(X(),it(gt,null,[S.divider?(X(),V(c,{key:x+"-divider"})):S.subMenu&&S.subMenu.length>0?(X(),it("div",{key:x+"-submenu"},[(X(),V(g,{"open-on-hover":"",location:"right",key:x},{activator:C(({props:N})=>[(X(),V(y,Ue({ref_for:!0},N,{disabled:S.disabled,key:x}),ze({append:C(()=>[A(l,null,{default:C(()=>e[1]||(e[1]=[Rt(" mdi-chevron-right ")])),_:1})]),default:C(()=>[!S.radio&&!S.checkbox?(X(),V(d,{key:0,style:We("cursor: pointer;"+(S.disabled?"opacity: 0.2":""))},{default:C(()=>[Rt(Dt(S.label),1)]),_:2},1032,["style"])):Ct("",!0)]),_:2},[S.icon?{name:"prepend",fn:C(()=>[A(l,{disabled:S.disabled},{default:C(()=>[Rt(Dt(S.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:C(()=>[A(p,null,{default:C(()=>[(X(!0),it(gt,null,At(S.subMenu,(N,B)=>(X(),V(y,{key:B,"prepend-icon":N.icon,onClick:O=>n.subMenuClick(N)},{default:C(()=>[A(d,null,{default:C(()=>[Rt(Dt(N.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):S.radioGroup?(X(),V(b,{"model-value":S.value,"onUpdate:modelValue":S.command,key:x+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:C(()=>[(X(!0),it(gt,null,At(S.choices,(N,B)=>(X(),V(y,{key:B+"-choice"},{default:C(()=>[A(_,{class:"list-action"},{default:C(()=>[A(u,{color:"secondary",label:N.label,value:N.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(X(),V(y,{onClick:N=>S.command(S),disabled:S.disabled,"data-test":n.formatDT(`${i.title} ${E.label} ${S.label}`),key:x+"-list"},ze({default:C(()=>[S.checkbox?(X(),V(_,{key:0,class:"list-action"},{default:C(()=>[A(m,{modelValue:S.checked,"onUpdate:modelValue":N=>S.checked=N,label:S.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Ct("",!0),!S.radio&&!S.checkbox?(X(),V(d,{key:1,style:We("cursor: pointer;"+(S.disabled?"opacity: 0.2":""))},{default:C(()=>[Rt(Dt(S.label),1)]),_:2},1032,["style"])):Ct("",!0)]),_:2},[S.icon?{name:"prepend",fn:C(()=>[A(l,{icon:S.icon,disabled:S.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const Hs=Di(Bs,[["render",Fs],["__scopeId","data-v-0fdf6c8a"]]);/**
3
+ * Muuri v0.9.5
4
+ * https://muuri.dev/
5
+ * Copyright (c) 2015-present, Haltu Oy
6
+ * Released under the MIT license
7
+ * https://github.com/haltu/muuri/blob/master/LICENSE.md
8
+ * @license MIT
9
+ *
10
+ * Muuri Packer
11
+ * Copyright (c) 2016-present, Niklas Rämö <inramo@gmail.com>
12
+ * @license MIT
13
+ *
14
+ * Muuri Ticker / Muuri Emitter / Muuri Dragger
15
+ * Copyright (c) 2018-present, Niklas Rämö <inramo@gmail.com>
16
+ * @license MIT
17
+ *
18
+ * Muuri AutoScroller
19
+ * Copyright (c) 2019-present, Niklas Rämö <inramo@gmail.com>
20
+ * @license MIT
21
+ */var ce={},kt=typeof Map=="function"?new Map:null,lt="swap",It="move",qs="synchronize",vt="layoutStart",Li="layoutEnd",Pi="layoutAbort",Ni="add",Mi="remove",Vs="showStart",js="showEnd",$t="hideStart",Us="hideEnd",Xi="filter",Bi="sort",ue="move",de="send",yt="beforeSend",fe="receive",_e="beforeReceive",zs="dragInit",Ws="dragStart",$s="dragMove",Ks="dragScroll",Js="dragEnd",Zs="dragReleaseStart",Kt="dragReleaseEnd",Qs="destroy",Yi="ontouchstart"in window,$e=!!window.PointerEvent,Ke=!!window.navigator.msPointerEnabled,tn=16777216;function rt(){this._events={},this._queue=[],this._counter=0,this._clearOnEmit=!1}rt.prototype.on=function(t,e){if(!this._events||!t||!e)return this;var i=this._events[t];return i||(i=this._events[t]=[]),i.push(e),this},rt.prototype.off=function(t,e){if(!this._events||!t||!e)return this;var i=this._events[t];if(!i||!i.length)return this;for(var r;(r=i.indexOf(e))!==-1;)i.splice(r,1);return this},rt.prototype.clear=function(t){if(!this._events||!t)return this;var e=this._events[t];return e&&(e.length=0,delete this._events[t]),this},rt.prototype.emit=function(t){if(!this._events||!t)return this._clearOnEmit=!1,this;var e=this._events[t];if(!e||!e.length)return this._clearOnEmit=!1,this;var i=this._queue,r=i.length,s=arguments.length-1,n;s>3&&(n=[],n.push.apply(n,arguments),n.shift()),i.push.apply(i,e),this._clearOnEmit&&(e.length=0,this._clearOnEmit=!1),++this._counter;for(var o=r,a=i.length;o<a;o++)if(s===0?i[o]():s===1?i[o](arguments[1]):s===2?i[o](arguments[1],arguments[2]):s===3?i[o](arguments[1],arguments[2],arguments[3]):i[o].apply(null,n),!this._events)return this;return--this._counter,this._counter||(i.length=0),this},rt.prototype.burst=function(){return this._events?(this._clearOnEmit=!0,this.emit.apply(this,arguments),this):this},rt.prototype.countListeners=function(t){if(!this._events)return 0;var e=this._events[t];return e?e.length:0},rt.prototype.destroy=function(){return this._events?(this._queue.length=this._counter=0,this._events=null,this):this};var pe=$e?"pointerout":Ke?"MSPointerOut":"",en=100;function St(t){pe&&(this._dragger=t,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))}St.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(pe,this._onOut))},St.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(pe,this._onOut),this._resetData(),this._isActive=!1)},St.prototype._resetData=function(){window.clearTimeout(this._timeout),this._timeout=null,this._outEvent=null},St.prototype._onStart=function(t){t.pointerType!=="mouse"&&this._addBehaviour()},St.prototype._onOut=function(t){this._dragger._getTrackedTouch(t)&&(this._resetData(),this._outEvent=t,this._timeout=window.setTimeout(this._onTimeout,en))},St.prototype._onTimeout=function(){var t=this._outEvent;this._resetData(),this._dragger.isActive()&&this._dragger._onCancel(t)},St.prototype.destroy=function(){pe&&(this._dragger.off("start",this._onStart),this._removeBehaviour())};var Je=["","webkit","moz","ms","o","Webkit","Moz","MS","O"],Gi={};function me(t,e){var i=Gi[e]||"";if(i)return i;for(var r=e[0].toUpperCase()+e.slice(1),s=0;s<Je.length;){if(i=Je[s]?Je[s]+r:e,i in t)return Gi[e]=i,i;++s}return""}function Fi(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch{}return t}var ge=window.navigator.userAgent.toLowerCase(),rn=ge.indexOf("edge")>-1,sn=ge.indexOf("trident")>-1,nn=ge.indexOf("firefox")>-1,on=ge.indexOf("android")>-1,bt=Fi()?{passive:!0}:!1,Hi="touchAction",ve=me(document.documentElement.style,Hi),an="auto";function v(t,e){this._element=t,this._emitter=new rt,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,(rn||sn)&&($e||Ke)&&(this._edgeHack=new St(this)),this.setCssProps(e),this._touchAction||this.setTouchAction(an),t.addEventListener("dragstart",v._preventDefault,!1),t.addEventListener(v._inputEvents.start,this._onStart,bt)}v._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},v._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},v._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},v._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},v._inputEvents=function(){return Yi?v._touchEvents:$e?v._pointerEvents:Ke?v._msPointerEvents:v._mouseEvents}(),v._emitter=new rt,v._emitterEvents={start:"start",move:"move",end:"end",cancel:"cancel"},v._activeInstances=[],v._preventDefault=function(t){t.preventDefault&&t.cancelable!==!1&&t.preventDefault()},v._activateInstance=function(t){var e=v._activeInstances.indexOf(t);e>-1||(v._activeInstances.push(t),v._emitter.on(v._emitterEvents.move,t._onMove),v._emitter.on(v._emitterEvents.cancel,t._onCancel),v._emitter.on(v._emitterEvents.end,t._onEnd),v._activeInstances.length===1&&v._bindListeners())},v._deactivateInstance=function(t){var e=v._activeInstances.indexOf(t);e!==-1&&(v._activeInstances.splice(e,1),v._emitter.off(v._emitterEvents.move,t._onMove),v._emitter.off(v._emitterEvents.cancel,t._onCancel),v._emitter.off(v._emitterEvents.end,t._onEnd),v._activeInstances.length||v._unbindListeners())},v._bindListeners=function(){window.addEventListener(v._inputEvents.move,v._onMove,bt),window.addEventListener(v._inputEvents.end,v._onEnd,bt),v._inputEvents.cancel&&window.addEventListener(v._inputEvents.cancel,v._onCancel,bt)},v._unbindListeners=function(){window.removeEventListener(v._inputEvents.move,v._onMove,bt),window.removeEventListener(v._inputEvents.end,v._onEnd,bt),v._inputEvents.cancel&&window.removeEventListener(v._inputEvents.cancel,v._onCancel,bt)},v._getEventPointerId=function(t){return typeof t.pointerId=="number"?t.pointerId:t.changedTouches?t.changedTouches[0]?t.changedTouches[0].identifier:null:1},v._getTouchById=function(t,e){if(typeof t.pointerId=="number")return t.pointerId===e?t:null;if(t.changedTouches){for(var i=0;i<t.changedTouches.length;i++)if(t.changedTouches[i].identifier===e)return t.changedTouches[i];return null}return t},v._onMove=function(t){v._emitter.emit(v._emitterEvents.move,t)},v._onCancel=function(t){v._emitter.emit(v._emitterEvents.cancel,t)},v._onEnd=function(t){v._emitter.emit(v._emitterEvents.end,t)},v.prototype._reset=function(){this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._isActive=!1,v._deactivateInstance(this)},v.prototype._createEvent=function(t,e){var i=this._getTrackedTouch(e);return{type:t,srcEvent:e,distance:this.getDistance(),deltaX:this.getDeltaX(),deltaY:this.getDeltaY(),deltaTime:t===v._emitterEvents.start?0:this.getDeltaTime(),isFirst:t===v._emitterEvents.start,isFinal:t===v._emitterEvents.end||t===v._emitterEvents.cancel,pointerType:e.pointerType||(e.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}},v.prototype._emit=function(t,e){this._emitter.emit(t,this._createEvent(t,e))},v.prototype._getTrackedTouch=function(t){return this._pointerId===null?null:v._getTouchById(t,this._pointerId)},v.prototype._onStart=function(t){if(!this._isDestroyed&&this._pointerId===null&&(this._pointerId=v._getEventPointerId(t),this._pointerId!==null)){var e=this._getTrackedTouch(t);this._startX=this._currentX=e.clientX,this._startY=this._currentY=e.clientY,this._startTime=Date.now(),this._isActive=!0,this._emit(v._emitterEvents.start,t),this._isActive&&v._activateInstance(this)}},v.prototype._onMove=function(t){var e=this._getTrackedTouch(t);e&&(this._currentX=e.clientX,this._currentY=e.clientY,this._emit(v._emitterEvents.move,t))},v.prototype._onCancel=function(t){this._getTrackedTouch(t)&&(this._emit(v._emitterEvents.cancel,t),this._reset())},v.prototype._onEnd=function(t){this._getTrackedTouch(t)&&(this._emit(v._emitterEvents.end,t),this._reset())},v.prototype.isActive=function(){return this._isActive},v.prototype.setTouchAction=function(t){this._touchAction=t,ve&&(this._cssProps[ve]="",this._element.style[ve]=t),Yi&&(this._element.removeEventListener(v._touchEvents.start,v._preventDefault,!0),(this._element.style[ve]!==t||nn&&on)&&this._element.addEventListener(v._touchEvents.start,v._preventDefault,!0))},v.prototype.setCssProps=function(t){if(t){var e=this._cssProps,i=this._element,r,s;for(r in e)i.style[r]=e[r],delete e[r];for(r in t)if(t[r]){if(r===Hi){this.setTouchAction(t[r]);continue}s=me(i.style,r),s&&(e[s]="",i.style[s]=t[r])}}},v.prototype.getDeltaX=function(){return this._currentX-this._startX},v.prototype.getDeltaY=function(){return this._currentY-this._startY},v.prototype.getDistance=function(){var t=this.getDeltaX(),e=this.getDeltaY();return Math.sqrt(t*t+e*e)},v.prototype.getDeltaTime=function(){return this._startTime?Date.now()-this._startTime:0},v.prototype.on=function(t,e){this._emitter.on(t,e)},v.prototype.off=function(t,e){this._emitter.off(t,e)},v.prototype.destroy=function(){if(!this._isDestroyed){var t=this._element;this._edgeHack&&this._edgeHack.destroy(),this._reset(),this._emitter.destroy(),t.removeEventListener(v._inputEvents.start,this._onStart,bt),t.removeEventListener("dragstart",v._preventDefault,!1),t.removeEventListener(v._touchEvents.start,v._preventDefault,!0);for(var e in this._cssProps)t.style[e]=this._cssProps[e],delete this._cssProps[e];this._element=null,this._isDestroyed=!0}};var ln=1e3/60,hn=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return this.setTimeout(function(){t(Date.now())},ln)}).bind(window);function ye(t){this._nextStep=null,this._lanes=[],this._stepQueue=[],this._stepCallbacks={},this._step=this._step.bind(this);for(var e=0;e<t;e++)this._lanes.push(new Ze)}ye.prototype._step=function(t){var e=this._lanes,i=this._stepQueue,r=this._stepCallbacks,s,n,o,a,l,h;for(this._nextStep=null,s=0;s<e.length;s++){for(a=e[s].queue,l=e[s].callbacks,h=e[s].indices,n=0;n<a.length;n++)o=a[n],o&&(i.push(o),r[o]=l[o],delete l[o],delete h[o]);a.length=0}for(s=0;s<i.length;s++)o=i[s],r[o]&&r[o](t),delete r[o];i.length=0},ye.prototype.add=function(t,e,i){this._lanes[t].add(e,i),this._nextStep||(this._nextStep=hn(this._step))},ye.prototype.remove=function(t,e){this._lanes[t].remove(e)};function Ze(){this.queue=[],this.indices={},this.callbacks={}}Ze.prototype.add=function(t,e){var i=this.indices[t];i!==void 0&&(this.queue[i]=void 0),this.queue.push(t),this.callbacks[t]=e,this.indices[t]=this.queue.length-1},Ze.prototype.remove=function(t){var e=this.indices[t];e!==void 0&&(this.queue[e]=void 0,delete this.callbacks[t],delete this.indices[t])};var qi="layoutRead",Vi="layoutWrite",ji="visibilityRead",Ui="visibilityWrite",zi="dragStartRead",Wi="dragStartWrite",$i="dragMoveRead",Ki="dragMoveWrite",Ji="dragScrollRead",Zi="dragScrollWrite",Qi="dragSortRead",tr="placeholderLayoutRead",er="placeholderLayoutWrite",ir="placeholderResizeWrite",rr="autoScrollRead",sr="autoScrollWrite",nr="debounceRead",U=0,or=1,z=2,L=new ye(3);function cn(t,e,i){L.add(U,qi+t,e),L.add(z,Vi+t,i)}function ar(t){L.remove(U,qi+t),L.remove(z,Vi+t)}function un(t,e,i){L.add(U,ji+t,e),L.add(z,Ui+t,i)}function lr(t){L.remove(U,ji+t),L.remove(z,Ui+t)}function dn(t,e,i){L.add(U,zi+t,e),L.add(z,Wi+t,i)}function hr(t){L.remove(U,zi+t),L.remove(z,Wi+t)}function fn(t,e,i){L.add(U,$i+t,e),L.add(z,Ki+t,i)}function cr(t){L.remove(U,$i+t),L.remove(z,Ki+t)}function _n(t,e,i){L.add(U,Ji+t,e),L.add(z,Zi+t,i)}function ur(t){L.remove(U,Ji+t),L.remove(z,Zi+t)}function Se(t,e){L.add(or,Qi+t,e)}function pn(t){L.remove(or,Qi+t)}function mn(t,e,i){L.add(U,tr+t,e),L.add(z,er+t,i)}function dr(t){L.remove(U,tr+t),L.remove(z,er+t)}function gn(t,e){L.add(z,ir+t,e)}function vn(t){L.remove(z,ir+t)}function fr(t,e){L.add(U,rr,t),L.add(z,sr,e)}function yn(){L.remove(U,rr),L.remove(z,sr)}function Sn(t,e){L.add(U,nr+t,e)}function bn(t){L.remove(U,nr+t)}var G=1,q=2,Xt=4,Qe=8,Jt=G|Qe,Zt=G|Xt,Qt=q|Qe,be=q|Xt,wn="function";function k(t){return typeof t===wn}var we=typeof WeakMap=="function"?new WeakMap:null;function J(t,e){var i=we&&we.get(t);return i||(i=window.getComputedStyle(t,null),we&&we.set(t,i)),i.getPropertyValue(e)}function st(t,e){return parseFloat(J(t,e))||0}var Ot=document.documentElement,En=document.body,Ee={value:0,offset:0};function _r(t){return t===window||t===Ot||t===En?window:t}function te(t){return t===window?t.pageXOffset:t.scrollLeft}function ee(t){return t===window?t.pageYOffset:t.scrollTop}function pr(t){return t===window?Ot.scrollWidth-Ot.clientWidth:t.scrollWidth-t.clientWidth}function mr(t){return t===window?Ot.scrollHeight-Ot.clientHeight:t.scrollHeight-t.clientHeight}function gr(t,e){if(e=e||{},t===window)e.width=Ot.clientWidth,e.height=Ot.clientHeight,e.left=0,e.right=e.width,e.top=0,e.bottom=e.height;else{var i=t.getBoundingClientRect(),r=t.clientLeft||st(t,"border-left-width"),s=t.clientTop||st(t,"border-top-width");e.width=t.clientWidth,e.height=t.clientHeight,e.left=i.left+r,e.right=e.left+e.width,e.top=i.top+s,e.bottom=e.top+e.height}return e}function ie(t){return t._drag._getGrid()._settings.dragAutoScroll}function Tn(t){t._drag&&t._drag._prepareScroll()}function xn(t){if(!(!t._drag||!t._isActive)){var e=t._drag;e._scrollDiffX=e._scrollDiffY=0,t._setTranslate(e._left,e._top)}}function ti(t,e,i,r){return Ee.value=Math.min(r/2,t),Ee.offset=Math.max(0,i+Ee.value*2+r*e-r)/2,Ee}function dt(){this.reset()}dt.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},dt.prototype.hasReachedEnd=function(){return Xt&this.direction?this.value>=this.maxValue:this.value<=0},dt.prototype.computeCurrentScrollValue=function(){return this.value===null?G&this.direction?te(this.element):ee(this.element):Math.max(0,Math.min(this.value,this.maxValue))},dt.prototype.computeNextScrollValue=function(t){var e=this.speed*(t/1e3),i=Xt&this.direction?this.value+e:this.value-e;return Math.max(0,Math.min(i,this.maxValue))},dt.prototype.computeSpeed=function(){var t={direction:null,threshold:0,distance:0,value:0,maxValue:0,deltaTime:0,duration:0,isEnding:!1};return function(e){var i=this.item,r=ie(i).speed;return k(r)?(t.direction=this.direction,t.threshold=this.threshold,t.distance=this.distance,t.value=this.value,t.maxValue=this.maxValue,t.duration=this.duration,t.speed=this.speed,t.deltaTime=e,t.isEnding=this.isEnding,r(i,this.element,t)):r}}(),dt.prototype.tick=function(t){return this.isActive||(this.isActive=!0,this.onStart()),this.value=this.computeCurrentScrollValue(),this.speed=this.computeSpeed(t),this.value=this.computeNextScrollValue(t),this.duration+=t,this.value},dt.prototype.onStart=function(){var t=this.item,e=ie(t).onStart;k(e)&&e(t,this.element,this.direction)},dt.prototype.onStop=function(){var t=this.item,e=ie(t).onStop;k(e)&&e(t,this.element,this.direction),t._drag&&t._drag.sort()};function Bt(){this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0}Bt.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},Bt.prototype.addRequest=function(t){G&t.direction?(this.removeRequest(this.requestX),this.requestX=t):(this.removeRequest(this.requestY),this.requestY=t),t.action=this},Bt.prototype.removeRequest=function(t){t&&(this.requestX===t?(this.requestX=null,t.action=null):this.requestY===t&&(this.requestY=null,t.action=null))},Bt.prototype.computeScrollValues=function(){this.scrollLeft=this.requestX?this.requestX.value:te(this.element),this.scrollTop=this.requestY?this.requestY.value:ee(this.element)},Bt.prototype.scroll=function(){var t=this.element;t&&(t.scrollTo?t.scrollTo(this.scrollLeft,this.scrollTop):(t.scrollLeft=this.scrollLeft,t.scrollTop=this.scrollTop))};function re(t,e){this.pool=[],this.createItem=t,this.releaseItem=e}re.prototype.pick=function(){return this.pool.pop()||this.createItem()},re.prototype.release=function(t){this.releaseItem(t),this.pool.indexOf(t)===-1&&this.pool.push(t)},re.prototype.reset=function(){this.pool.length=0};function Dn(t,e){return!(t.left+t.width<=e.left||e.left+e.width<=t.left||t.top+t.height<=e.top||e.top+e.height<=t.top)}function An(t,e){if(!Dn(t,e))return 0;var i=Math.min(t.left+t.width,e.left+e.width)-Math.max(t.left,e.left),r=Math.min(t.top+t.height,e.top+e.height)-Math.max(t.top,e.top);return i*r}function Te(t,e){var i=An(t,e);if(!i)return 0;var r=Math.min(t.width,e.width)*Math.min(t.height,e.height);return i/r*100}var vr={width:0,height:0,left:0,right:0,top:0,bottom:0},yr={width:0,height:0,left:0,right:0,top:0,bottom:0};function P(){this._isDestroyed=!1,this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,this._items=[],this._actions=[],this._requests={},this._requests[G]={},this._requests[q]={},this._requestOverlapCheck={},this._dragPositions={},this._dragDirections={},this._overlapCheckInterval=150,this._requestPool=new re(function(){return new dt},function(t){t.reset()}),this._actionPool=new re(function(){return new Bt},function(t){t.reset()}),this._readTick=this._readTick.bind(this),this._writeTick=this._writeTick.bind(this)}P.AXIS_X=G,P.AXIS_Y=q,P.FORWARD=Xt,P.BACKWARD=Qe,P.LEFT=Jt,P.RIGHT=Zt,P.UP=Qt,P.DOWN=be,P.smoothSpeed=function(t,e,i){return function(r,s,n){var o=0;if(!n.isEnding)if(n.threshold>0){var a=n.threshold-Math.max(0,n.distance);o=t/n.threshold*a}else o=t;var l=n.speed,h=o;return l===o?h:l<o?(h=l+e*(n.deltaTime/1e3),Math.min(o,h)):(h=l-i*(n.deltaTime/1e3),Math.max(o,h))}},P.pointerHandle=function(t){var e={left:0,top:0,width:0,height:0},i=t||1;return function(r,s,n,o,a,l,h){return e.left=l-i*.5,e.top=h-i*.5,e.width=i,e.height=i,e}},P.prototype._readTick=function(t){this._isDestroyed||(t&&this._tickTime?(this._tickDeltaTime=t-this._tickTime,this._tickTime=t,this._updateRequests(),this._updateActions()):(this._tickTime=t,this._tickDeltaTime=0))},P.prototype._writeTick=function(){this._isDestroyed||(this._applyActions(),fr(this._readTick,this._writeTick))},P.prototype._startTicking=function(){this._isTicking=!0,fr(this._readTick,this._writeTick)},P.prototype._stopTicking=function(){this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,yn()},P.prototype._getItemHandleRect=function(t,e,i){var r=t._drag;if(e){var s=r._dragMoveEvent||r._dragStartEvent,n=e(t,r._clientX,r._clientY,t._width,t._height,s.clientX,s.clientY);i.left=n.left,i.top=n.top,i.width=n.width,i.height=n.height}else i.left=r._clientX,i.top=r._clientY,i.width=t._width,i.height=t._height;return i.right=i.left+i.width,i.bottom=i.top+i.height,i},P.prototype._requestItemScroll=function(t,e,i,r,s,n,o){var a=this._requests[e],l=a[t._id];l?(l.element!==i||l.direction!==r)&&l.reset():l=this._requestPool.pick(),l.item=t,l.element=i,l.direction=r,l.threshold=s,l.distance=n,l.maxValue=o,a[t._id]=l},P.prototype._cancelItemScroll=function(t,e){var i=this._requests[e],r=i[t._id];r&&(r.action&&r.action.removeRequest(r),this._requestPool.release(r),delete i[t._id])},P.prototype._checkItemOverlap=function(t,e,i){var r=ie(t),s=k(r.targets)?r.targets(t):r.targets,n=r.threshold,o=r.safeZone;if(!s||!s.length){e&&this._cancelItemScroll(t,G),i&&this._cancelItemScroll(t,q);return}var a=this._dragDirections[t._id],l=a[0],h=a[1];if(!l&&!h){e&&this._cancelItemScroll(t,G),i&&this._cancelItemScroll(t,q);return}for(var c=this._getItemHandleRect(t,r.handle,vr),d=yr,y=null,p=null,g=!0,u=!0,_=0,b=0,m=null,E=null,w=0,S=0,x=0,N=null,B=-1/0,O=0,mt=0,H=null,et=0,xt=0,j=null,Ve=-1/0,Os=0,Ls=0,Ps=null,Ns=0,Ms=0,xi=0;xi<s.length;xi++)y=s[xi],g=e&&l&&y.axis!==q,u=i&&h&&y.axis!==G,b=y.priority||0,!((!g||b<B)&&(!u||b<Ve))&&(p=_r(y.element||y),S=g?pr(p):-1,x=u?mr(p):-1,!(!S&&!x)&&(d=gr(p,d),_=Te(c,d),!(_<=0)&&(g&&b>=B&&S>0&&(b>B||_>mt)&&(E=null,m=ti(typeof y.threshold=="number"?y.threshold:n,o,c.width,d.width),l===Zt?(w=d.right+m.offset-c.right,w<=m.value&&te(p)<S&&(E=Zt)):l===Jt&&(w=c.left-(d.left-m.offset),w<=m.value&&te(p)>0&&(E=Jt)),E!==null&&(N=p,B=b,O=m.value,mt=_,H=E,et=w,xt=S)),u&&b>=Ve&&x>0&&(b>Ve||_>Ls)&&(E=null,m=ti(typeof y.threshold=="number"?y.threshold:n,o,c.height,d.height),h===be?(w=d.bottom+m.offset-c.bottom,w<=m.value&&ee(p)<x&&(E=be)):h===Qt&&(w=c.top-(d.top-m.offset),w<=m.value&&ee(p)>0&&(E=Qt)),E!==null&&(j=p,Ve=b,Os=m.value,Ls=_,Ps=E,Ns=w,Ms=x)))));e&&(N?this._requestItemScroll(t,G,N,H,O,et,xt):this._cancelItemScroll(t,G)),i&&(j?this._requestItemScroll(t,q,j,Ps,Os,Ns,Ms):this._cancelItemScroll(t,q))},P.prototype._updateScrollRequest=function(t){for(var e=t.item,i=ie(e),r=k(i.targets)?i.targets(e):i.targets,s=r&&r.length||0,n=i.threshold,o=i.safeZone,a=this._getItemHandleRect(e,i.handle,vr),l=yr,h=null,c=null,d=!1,y=null,p=null,g=null,u=null,_=null,b=null,m=0;m<s;m++)if(h=r[m],c=_r(h.element||h),c===t.element){if(d=!!(G&t.direction),d){if(h.axis===q)continue}else if(h.axis===G)continue;if(_=d?pr(c):mr(c),_<=0||(l=gr(c,l),y=Te(a,l),y<=0)||(p=ti(typeof h.threshold=="number"?h.threshold:n,o,d?a.width:a.height,d?l.width:l.height),t.direction===Jt?g=a.left-(l.left-p.offset):t.direction===Zt?g=l.right+p.offset-a.right:t.direction===Qt?g=a.top-(l.top-p.offset):g=l.bottom+p.offset-a.bottom,g>p.value)||(u=d?te(c):ee(c),b=Xt&t.direction?u>=_:u<=0,b))break;return t.maxValue=_,t.threshold=p.value,t.distance=g,t.isEnding=!1,!0}return i.smoothStop===!0&&t.speed>0?(b===null&&(b=t.hasReachedEnd()),t.isEnding=!b):t.isEnding=!1,t.isEnding},P.prototype._updateRequests=function(){for(var t=this._items,e=this._requests[G],i=this._requests[q],r,s,n,o,a,l,h,c=0;c<t.length;c++)r=t[c],o=this._requestOverlapCheck[r._id],a=o>0&&this._tickTime-o>this._overlapCheckInterval,l=!0,s=e[r._id],s&&s.isActive&&(l=!this._updateScrollRequest(s),l&&(a=!0,this._cancelItemScroll(r,G))),h=!0,n=i[r._id],n&&n.isActive&&(h=!this._updateScrollRequest(n),h&&(a=!0,this._cancelItemScroll(r,q))),a&&(this._requestOverlapCheck[r._id]=0,this._checkItemOverlap(r,l,h))},P.prototype._requestAction=function(t,e){for(var i=this._actions,r=e===G,s=null,n=0;n<i.length;n++){if(s=i[n],t.element!==s.element){s=null;continue}if(r?s.requestX:s.requestY){this._cancelItemScroll(t.item,e);return}break}s||(s=this._actionPool.pick()),s.element=t.element,s.addRequest(t),t.tick(this._tickDeltaTime),i.push(s)},P.prototype._updateActions=function(){var t=this._items,e=this._requests,i=this._actions,r,s,n,o;for(o=0;o<t.length;o++)r=t[o]._id,s=e[G][r],n=e[q][r],s&&this._requestAction(s,G),n&&this._requestAction(n,q);for(o=0;o<i.length;o++)i[o].computeScrollValues()},P.prototype._applyActions=function(){var t=this._actions,e=this._items,i;if(t.length){for(i=0;i<t.length;i++)t[i].scroll(),this._actionPool.release(t[i]);for(t.length=0,i=0;i<e.length;i++)Tn(e[i]);for(i=0;i<e.length;i++)xn(e[i])}},P.prototype._updateDragDirection=function(t){var e=this._dragPositions[t._id],i=this._dragDirections[t._id],r=t._drag._left,s=t._drag._top;if(e.length){var n=e[0],o=e[1];i[0]=r>n?Zt:r<n?Jt:i[0]||0,i[1]=s>o?be:s<o?Qt:i[1]||0}e[0]=r,e[1]=s},P.prototype.addItem=function(t){if(!this._isDestroyed){var e=this._items.indexOf(t);e===-1&&(this._items.push(t),this._requestOverlapCheck[t._id]=this._tickTime,this._dragDirections[t._id]=[0,0],this._dragPositions[t._id]=[],this._isTicking||this._startTicking())}},P.prototype.updateItem=function(t){this._isDestroyed||this._dragDirections[t._id]&&(this._updateDragDirection(t),this._requestOverlapCheck[t._id]||(this._requestOverlapCheck[t._id]=this._tickTime))},P.prototype.removeItem=function(t){if(!this._isDestroyed){var e=this._items.indexOf(t);if(e!==-1){var i=t._id,r=this._requests[G][i];r&&(this._cancelItemScroll(t,G),delete this._requests[G][i]);var s=this._requests[q][i];s&&(this._cancelItemScroll(t,q),delete this._requests[q][i]),delete this._requestOverlapCheck[i],delete this._dragPositions[i],delete this._dragDirections[i],this._items.splice(e,1),this._isTicking&&!this._items.length&&this._stopTicking()}}},P.prototype.isItemScrollingX=function(t){var e=this._requests[G][t._id];return!!(e&&e.isActive)},P.prototype.isItemScrollingY=function(t){var e=this._requests[q][t._id];return!!(e&&e.isActive)},P.prototype.isItemScrolling=function(t){return this.isItemScrollingX(t)||this.isItemScrollingY(t)},P.prototype.destroy=function(){if(!this._isDestroyed){for(var t=this._items.slice(0),e=0;e<t.length;e++)this.removeItem(t[e]);this._actions.length=0,this._requestPool.reset(),this._actionPool.reset(),this._isDestroyed=!0}};var Yt=window.Element.prototype,Rn=Yt.matches||Yt.matchesSelector||Yt.webkitMatchesSelector||Yt.mozMatchesSelector||Yt.msMatchesSelector||Yt.oMatchesSelector||function(){return!1};function xe(t,e){return Rn.call(t,e)}function Q(t,e){e&&(t.classList?t.classList.add(e):xe(t,"."+e)||(t.className+=" "+e))}var Sr=[],Cn="number";function ei(t,e,i){var r=typeof i===Cn?i:-1;r<0&&(r=t.length-r+1),t.splice.apply(t,Sr.concat(r,0,e)),Sr.length=0}function Gt(t,e,i){var r=Math.max(0,t.length-1+(i||0));return e>r?r:e<0?Math.max(r+e+1,0):e}function br(t,e,i){if(!(t.length<2)){var r=Gt(t,e),s=Gt(t,i);r!==s&&t.splice(s,0,t.splice(r,1)[0])}}function wr(t,e,i){if(!(t.length<2)){var r=Gt(t,e),s=Gt(t,i),n;r!==s&&(n=t[r],t[r]=t[s],t[s]=n)}}var ht=me(document.documentElement.style,"transform")||"transform",kn=/([A-Z])/g,In=/^(webkit-|moz-|ms-|o-)/,On=/^(-m-s-)/;function ii(t){var e=t.replace(kn,"-$1").toLowerCase();return e=e.replace(In,"-$1"),e=e.replace(On,"-ms-"),e}var Er=ii(ht),Ln="none",Pn="inline",Nn="none",Mn="display";function Xn(t){var e=J(t,Er);if(!e||e===Ln)return!1;var i=J(t,Mn);return!(i===Pn||i===Nn)}function ri(t){for(var e=document,i=t||e;i&&i!==e&&J(i,"position")==="static"&&!Xn(i);)i=i.parentElement||e;return i}var si={},ni={},Lt={};function Tr(t,e){var i=e||{},r;return i.left=0,i.top=0,t===document||(i.left=window.pageXOffset||0,i.top=window.pageYOffset||0,t.self===window.self)||(r=t.getBoundingClientRect(),i.left+=r.left,i.top+=r.top,i.left+=st(t,"border-left-width"),i.top+=st(t,"border-top-width")),i}function Ft(t,e,i){return Lt.left=0,Lt.top=0,t===e||i&&(t=ri(t),e=ri(e),t===e)||(Tr(t,si),Tr(e,ni),Lt.left=ni.left-si.left,Lt.top=ni.top-si.top),Lt}function oi(t){return t==="auto"||t==="scroll"||t==="overlay"}function Bn(t){return oi(J(t,"overflow"))||oi(J(t,"overflow-x"))||oi(J(t,"overflow-y"))}function xr(t,e){for(e=e||[];t&&t!==document;){if(t.getRootNode&&t instanceof DocumentFragment){t=t.getRootNode().host;continue}Bn(t)&&e.push(t),t=t.parentNode}return e.push(window),e}var Ht={},Yn="none",Gn=/^matrix3d/,Fn=/([^,]*,){4}/,Hn=/([^,]*,){12}/,qn=/[^,]*,/;function ft(t){Ht.x=0,Ht.y=0;var e=J(t,Er);if(!e||e===Yn)return Ht;var i=Gn.test(e),r=e.replace(i?Hn:Fn,""),s=r.replace(qn,"");return Ht.x=parseFloat(r)||0,Ht.y=parseFloat(s)||0,Ht}function W(t,e){e&&(t.classList?t.classList.remove(e):xe(t,"."+e)&&(t.className=(" "+t.className+" ").replace(" "+e+" "," ").trim()))}var Vn=/^(iPad|iPhone|iPod)/.test(window.navigator.platform)||/^Mac/.test(window.navigator.platform)&&window.navigator.maxTouchPoints>1,De=0,ai=1,Ae=2,Dr=Fi()?{passive:!0}:!1;function T(t){var e=t._element,i=t.getGrid(),r=i._settings;this._item=t,this._gridId=i._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=k(r.dragStartPredicate)?r.dragStartPredicate:T.defaultStartPredicate,this._startPredicateState=De,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&&e.querySelector(r.dragHandle)||e,this._dragger=new v(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)}T.autoScroller=new P,T.defaultStartPredicate=function(t,e,i){var r=t._drag;if(e.isFirst&&e.srcEvent.button||!Vn&&e.isFirst&&e.srcEvent.isTrusted===!0&&e.srcEvent.defaultPrevented===!1&&e.srcEvent.cancelable===!1)return!1;if(e.isFinal){r._finishStartPredicate(e);return}var s=r._startPredicateData;if(!s){var n=i||r._getGrid()._settings.dragStartPredicate||{};r._startPredicateData=s={distance:Math.max(n.distance,0)||0,delay:Math.max(n.delay,0)||0}}return s.delay&&(s.event=e,s.delayTimer||(s.delayTimer=window.setTimeout(function(){s.delay=0,r._resolveStartPredicate(s.event)&&(r._forceResolveStartPredicate(s.event),r._resetStartPredicate())},s.delay))),r._resolveStartPredicate(e)},T.defaultSortPredicate=function(){var t={},e={},i={},r=[],s=1,n=100;function o(a,l,h){var c=null,d=l._settings.dragSort,y=-1,p,g,u,_,b,m,E,w,S,x;if(d===!0?(r[0]=l,g=r):k(d)&&(g=d.call(l,a)),!g||!Array.isArray(g)||!g.length)return c;for(x=0;x<g.length;x++)if(u=g[x],!u._isDestroyed){for(u._updateBoundingRect(),m=Math.max(0,u._left),E=Math.max(0,u._top),w=Math.min(window.innerWidth,u._right),S=Math.min(window.innerHeight,u._bottom),_=u._element.parentNode;_&&_!==document&&_!==document.documentElement&&_!==document.body;){if(_.getRootNode&&_ instanceof DocumentFragment){_=_.getRootNode().host;continue}if(J(_,"overflow")!=="visible"&&(b=_.getBoundingClientRect(),m=Math.max(m,b.left),E=Math.max(E,b.top),w=Math.min(w,b.right),S=Math.min(S,b.bottom)),J(_,"position")==="fixed")break;_=_.parentNode}m>=w||E>=S||(e.left=m,e.top=E,e.width=w-m,e.height=S-E,p=Te(t,e),p>h&&p>y&&(y=p,c=u))}return r.length=0,c}return function(a,l){var h=a._drag,c=h._getGrid(),d=l&&typeof l.threshold=="number"?l.threshold:50,y=l&&l.action===lt?lt:It,p=l&&l.migrateAction===lt?lt:It;d=Math.min(Math.max(d,s),n),t.width=a._width,t.height=a._height,t.left=h._clientX,t.top=h._clientY;var g=o(a,c,d);if(!g)return null;var u=a.getGrid()!==g,_=0,b=0,m=0,E=-1,w=!1,S,x,N;for(g===c?(t.left=h._gridX+a._marginLeft,t.top=h._gridY+a._marginTop):(g._updateBorders(1,0,1,0),_=g._left+g._borderLeft,b=g._top+g._borderTop),N=0;N<g._items.length;N++)S=g._items[N],!(!S._isActive||S===a)&&(w=!0,e.width=S._width,e.height=S._height,e.left=S._left+S._marginLeft+_,e.top=S._top+S._marginTop+b,x=Te(t,e),x>m&&(E=N,m=x));return u&&m<d&&(E=w?E:0,m=d),m>=d?(i.grid=g,i.index=E,i.action=u?p:y,i):null}}(),T.prototype.stop=function(){if(this._isActive){if(this._isMigrating){this._finishMigration();return}var t=this._item,e=t._id;if(T.autoScroller.removeItem(t),hr(e),cr(e),ur(e),this._cancelSort(),this._isStarted){this._unbindScrollListeners();var i=t._element,r=this._getGrid(),s=r._settings.itemDraggingClass;i.parentNode!==r._element&&(r._element.appendChild(i),t._setTranslate(this._gridX,this._gridY),s&&i.clientWidth),W(i,s)}this._reset()}},T.prototype.sort=function(t){var e=this._item;this._isActive&&e._isActive&&this._dragMoveEvent&&(t===!0?this._handleSort():Se(e._id,this._handleSort))},T.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._dragger.destroy(),T.autoScroller.removeItem(this._item),this._isDestroyed=!0)},T.prototype._getGrid=function(){return ce[this._gridId]||null},T.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},T.prototype._bindScrollListeners=function(){var t=this._getGrid()._element,e=this._container,i=this._scrollers,r,s;if(i.length=0,xr(this._item._element.parentNode,i),e!==t)for(r=[],xr(t,r),s=0;s<r.length;s++)i.indexOf(r[s])<0&&i.push(r[s]);for(s=0;s<i.length;s++)i[s].addEventListener("scroll",this._onScroll,Dr)},T.prototype._unbindScrollListeners=function(){var t=this._scrollers,e;for(e=0;e<t.length;e++)t[e].removeEventListener("scroll",this._onScroll,Dr);t.length=0},T.prototype._resolveStartPredicate=function(t){var e=this._startPredicateData;if(!(t.distance<e.distance||e.delay))return this._resetStartPredicate(),!0},T.prototype._forceResolveStartPredicate=function(t){!this._isDestroyed&&this._startPredicateState===ai&&(this._startPredicateState=Ae,this._onStart(t))},T.prototype._finishStartPredicate=function(t){var e=this._item._element,i=Math.abs(t.deltaX)<2&&Math.abs(t.deltaY)<2&&t.deltaTime<200;this._resetStartPredicate(),i&&jn(e)},T.prototype._resetHeuristics=function(t,e){this._blockedSortIndex=null,this._sortX1=this._sortX2=t,this._sortY1=this._sortY2=e},T.prototype._checkHeuristics=function(t,e){var i=this._getGrid()._settings.dragSortHeuristics,r=i.minDragDistance;if(r<=0)return this._blockedSortIndex=null,!0;var s=t-this._sortX2,n=e-this._sortY2,o=r>3&&i.minBounceBackAngle>0;if(o||(this._blockedSortIndex=null),Math.abs(s)>r||Math.abs(n)>r){if(o){var a=Math.atan2(s,n),l=Math.atan2(this._sortX2-this._sortX1,this._sortY2-this._sortY1),h=Math.atan2(Math.sin(a-l),Math.cos(a-l));Math.abs(h)>i.minBounceBackAngle&&(this._blockedSortIndex=null)}return this._sortX1=this._sortX2,this._sortY1=this._sortY2,this._sortX2=t,this._sortY2=e,!0}return!1},T.prototype._resetStartPredicate=function(){var t=this._startPredicateData;t&&(t.delayTimer&&(t.delayTimer=window.clearTimeout(t.delayTimer)),this._startPredicateData=null)},T.prototype._handleSort=function(){if(this._isActive){var t=this._getGrid()._settings;if(!t.dragSort||!t.dragAutoScroll.sortDuringScroll&&T.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 e=this._checkHeuristics(this._gridX,this._gridY);if(!(!this._isSortNeeded&&!e)){var i=t.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))}}},T.prototype._handleSortDelayed=function(){this._isSortNeeded=!0,this._sortTimer=void 0,Se(this._item._id,this._handleSort)},T.prototype._cancelSort=function(){this._isSortNeeded=!1,this._sortTimer!==void 0&&(this._sortTimer=window.clearTimeout(this._sortTimer)),pn(this._item._id)},T.prototype._finishSort=function(){var t=this._getGrid()._settings.dragSort,e=t&&(this._isSortNeeded||this._sortTimer!==void 0);this._cancelSort(),e&&this._checkOverlap()},T.prototype._checkOverlap=function(){if(this._isActive){var t=this._item,e=this._getGrid()._settings,i,r,s,n,o,a,l,h;k(e.dragSortPredicate)?i=e.dragSortPredicate(t,this._dragMoveEvent):i=T.defaultSortPredicate(t,e.dragSortPredicate),!(!i||typeof i.index!="number")&&(l=i.action===lt?lt:It,r=t.getGrid(),n=i.grid||r,h=r!==n,s=r._items.indexOf(t),o=Gt(n._items,i.index,h&&l===It?1:0),!(!h&&o===this._blockedSortIndex)&&(h?(this._blockedSortIndex=null,a=n._items[o],r._hasListeners(yt)&&r._emit(yt,{item:t,fromGrid:r,fromIndex:s,toGrid:n,toIndex:o}),n._hasListeners(_e)&&n._emit(_e,{item:t,fromGrid:r,fromIndex:s,toGrid:n,toIndex:o}),t._gridId=n._id,this._isMigrating=t._gridId!==this._gridId,r._items.splice(s,1),ei(n._items,t,o),t._sortData=null,r._hasListeners(de)&&r._emit(de,{item:t,fromGrid:r,fromIndex:s,toGrid:n,toIndex:o}),n._hasListeners(fe)&&n._emit(fe,{item:t,fromGrid:r,fromIndex:s,toGrid:n,toIndex:o}),l===lt&&a&&a.isActive()&&n._items.indexOf(a)>-1&&n.send(a,r,s,{appendTo:this._container||document.body,layoutSender:!1,layoutReceiver:!1}),r.layout(),n.layout()):s!==o&&(this._blockedSortIndex=s,(l===lt?wr:br)(r._items,s,o),r._hasListeners(ue)&&r._emit(ue,{item:t,fromIndex:s,toIndex:o,action:l}),r.layout())))}},T.prototype._finishMigration=function(){var t=this._item,e=t._dragRelease,i=t._element,r=t._isActive,s=t.getGrid(),n=s._element,o=s._settings,a=o.dragContainer||n,l=this._getGrid()._settings,h=i.parentNode,c=r?l.itemVisibleClass:l.itemHiddenClass,d=r?o.itemVisibleClass:o.itemHiddenClass,y,p;this._isMigrating=!1,this.destroy(),l.itemClass!==o.itemClass&&(W(i,l.itemClass),Q(i,o.itemClass)),c!==d&&(W(i,c),Q(i,d)),a!==h&&(a.appendChild(i),p=Ft(h,a,!0),y=ft(i),y.x-=p.left,y.y-=p.top),t._refreshDimensions(),p=Ft(a,n,!0),e._containerDiffX=p.left,e._containerDiffY=p.top,t._drag=o.dragEnabled?new T(t):null,a!==h&&t._setTranslate(y.x,y.y),t._visibility.setStyles(r?o.visibleStyles:o.hiddenStyles),e.start()},T.prototype._preStartCheck=function(t){this._startPredicateState===De&&(this._startPredicateState=ai),this._startPredicateState===ai?(this._startPredicateResult=this._startPredicate(this._item,t),this._startPredicateResult===!0?(this._startPredicateState=Ae,this._onStart(t)):this._startPredicateResult===!1&&(this._resetStartPredicate(t),this._dragger._reset(),this._startPredicateState=De)):this._startPredicateState===Ae&&this._isActive&&this._onMove(t)},T.prototype._preEndCheck=function(t){var e=this._startPredicateState===Ae;this._startPredicate(this._item,t),this._startPredicateState=De,!(!e||!this._isActive)&&(this._isStarted?this._onEnd(t):this.stop())},T.prototype._onStart=function(t){var e=this._item;e._isActive&&(this._isActive=!0,this._dragStartEvent=t,T.autoScroller.addItem(e),dn(e._id,this._prepareStart,this._applyStart))},T.prototype._prepareStart=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=t._element,i=this._getGrid(),r=i._settings,s=i._element,n=r.dragContainer||s,o=ri(n),a=ft(e),l=e.getBoundingClientRect(),h=n!==s;if(this._container=n,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),h){var c=Ft(o,s);this._containerDiffX=c.left,this._containerDiffY=c.top}}}},T.prototype._applyStart=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=this._getGrid(),i=t._element,r=t._dragRelease,s=t._migrate,n=this._container!==e._element;t.isPositioning()&&t._layout.stop(!0,this._left,this._top),s._isActive&&(this._left-=s._containerDiffX,this._top-=s._containerDiffY,this._gridX-=s._containerDiffX,this._gridY-=s._containerDiffY,s.stop(!0,this._left,this._top)),t.isReleasing()&&r._reset(),e._settings.dragPlaceholder.enabled&&t._dragPlaceholder.create(),this._isStarted=!0,e._emit(zs,t,this._dragStartEvent),n&&(i.parentNode===this._container?(this._gridX-=this._containerDiffX,this._gridY-=this._containerDiffY):(this._left+=this._containerDiffX,this._top+=this._containerDiffY,this._container.appendChild(i),t._setTranslate(this._left,this._top))),Q(i,e._settings.itemDraggingClass),this._bindScrollListeners(),e._emit(Ws,t,this._dragStartEvent)}}},T.prototype._onMove=function(t){var e=this._item;if(!e._isActive){this.stop();return}this._dragMoveEvent=t,fn(e._id,this._prepareMove,this._applyMove),Se(e._id,this._handleSort)},T.prototype._prepareMove=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=this._getGrid()._settings,i=e.dragAxis,r=this._dragMoveEvent,s=this._dragPrevMoveEvent||this._dragStartEvent||r;if(i!=="y"){var n=r.clientX-s.clientX;this._left=this._left-this._moveDiffX+n,this._gridX=this._gridX-this._moveDiffX+n,this._clientX=this._clientX-this._moveDiffX+n,this._moveDiffX=n}if(i!=="x"){var o=r.clientY-s.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}}},T.prototype._applyMove=function(){if(this._isActive){var t=this._item;t._isActive&&(this._moveDiffX=this._moveDiffY=0,t._setTranslate(this._left,this._top),this._getGrid()._emit($s,t,this._dragMoveEvent),T.autoScroller.updateItem(t))}},T.prototype._onScroll=function(t){var e=this._item;if(!e._isActive){this.stop();return}this._scrollEvent=t,_n(e._id,this._prepareScroll,this._applyScroll),Se(e._id,this._handleSort)},T.prototype._prepareScroll=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=t._element,i=this._getGrid(),r=i._element,s=e.getBoundingClientRect();if(this._container!==r){var n=Ft(this._containingBlock,r);this._containerDiffX=n.left,this._containerDiffY=n.top}var o=this._clientX-this._moveDiffX-s.left;this._left=this._left-this._scrollDiffX+o,this._scrollDiffX=o;var a=this._clientY-this._moveDiffY-s.top;this._top=this._top-this._scrollDiffY+a,this._scrollDiffY=a,this._gridX=this._left-this._containerDiffX,this._gridY=this._top-this._containerDiffY}}},T.prototype._applyScroll=function(){if(this._isActive){var t=this._item;t._isActive&&(this._scrollDiffX=this._scrollDiffY=0,t._setTranslate(this._left,this._top),this._getGrid()._emit(Ks,t,this._scrollEvent))}},T.prototype._onEnd=function(t){var e=this._item,i=e._element,r=this._getGrid(),s=r._settings,n=e._dragRelease;if(!e._isActive){this.stop();return}hr(e._id),cr(e._id),ur(e._id),this._finishSort(),this._unbindScrollListeners(),n._containerDiffX=this._containerDiffX,n._containerDiffY=this._containerDiffY,this._reset(),W(i,s.itemDraggingClass),T.autoScroller.removeItem(e),r._emit(Js,e,t),this._isMigrating?this._finishMigration():n.start()};function jn(t){if(t.tagName.toLowerCase()==="a"){var e=t.getAttribute("href");if(e){var i=t.getAttribute("target");i&&i!=="_self"?window.open(e,i):window.location.href=e}}}function Ar(t,e){var i={},r,s;if(Array.isArray(e))for(s=0;s<e.length;s++)r=e[s],i[r]=J(t,ii(r));else for(r in e)i[r]=J(t,ii(r));return i}var Un=/^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/,Rr={};function zn(t){var e=Rr[t];return e||(e=t.replace(Un,""),e!==t&&(e=e[0].toLowerCase()+e.slice(1)),Rr[t]=e,e)}var Wn="[native code]";function $n(t){var e=window.Symbol;return!!(t&&k(e)&&k(e.toString)&&e(t).toString().indexOf(Wn)>-1)}function qt(t,e){for(var i in e)t.style[i]=e[i]}var Kn=!!(Element&&k(Element.prototype.animate)),Cr=!!(Element&&$n(Element.prototype.animate));function ct(t){this._element=t,this._animation=null,this._duration=0,this._easing="",this._callback=null,this._props=[],this._values=[],this._isDestroyed=!1,this._onFinish=this._onFinish.bind(this)}ct.prototype.start=function(t,e,i){if(!this._isDestroyed){var r=this._element,s=i||{};if(!Kn){qt(r,e),this._callback=k(s.onFinish)?s.onFinish:null,this._onFinish();return}var n=this._animation,o=this._props,a=this._values,l=s.duration||300,h=s.easing||"ease",c=!1,d,y,p;if(n&&(y=0,(l!==this._duration||h!==this._easing)&&(c=!0),!c)){for(d in e)if(++y,p=o.indexOf(d),p===-1||e[d]!==a[p]){c=!0;break}y!==o.length&&(c=!0)}if(c&&n.cancel(),this._callback=k(s.onFinish)?s.onFinish:null,!(n&&!c)){o.length=a.length=0;for(d in e)o.push(d),a.push(e[d]);this._duration=l,this._easing=h,this._animation=r.animate([kr(t,Cr),kr(e,Cr)],{duration:l,easing:h}),this._animation.onfinish=this._onFinish,qt(r,e)}}},ct.prototype.stop=function(){this._isDestroyed||!this._animation||(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},ct.prototype.getCurrentStyles=function(){return Ar(element,currentProps)},ct.prototype.isAnimating=function(){return!!this._animation},ct.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},ct.prototype._onFinish=function(){var t=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,t&&t()};function kr(t,e){var i={};for(var r in t)i[e?r:zn(r)]=t[r];return i}function wt(t,e){return"translateX("+t+"px) translateY("+e+"px)"}function $(t){this._item=t,this._animation=new ct,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)}$.prototype._updateDimensions=function(){this.isActive()&&qt(this._element,{width:this._item._width+"px",height:this._item._height+"px"})},$.prototype._onLayoutStart=function(t,e){var i=this._item;if(t.indexOf(i)===-1){this.reset();return}var r=i._left,s=i._top,n=this._left,o=this._top;if(this._left=r,this._top=s,!(!e&&!this._didMigrate&&n===r&&o===s)){var a=r+i._marginLeft,l=s+i._marginTop,h=i.getGrid(),c=!e&&h._settings.layoutDuration>0;if(!c||this._didMigrate){dr(i._id),this._element.style[ht]=wt(a,l),this._animation.stop(),this._didMigrate&&(h.getElement().appendChild(this._element),this._didMigrate=!1);return}this._nextTransX=a,this._nextTransY=l,mn(i._id,this._setupAnimation,this._startAnimation)}},$.prototype._setupAnimation=function(){if(this.isActive()){var t=ft(this._element);this._transX=t.x,this._transY=t.y}},$.prototype._startAnimation=function(){if(this.isActive()){var t=this._animation,e=this._transX,i=this._transY,r=this._nextTransX,s=this._nextTransY;if(e===r&&i===s){t.isAnimating()&&(this._element.style[ht]=wt(r,s),t.stop());return}var n=this._item.getGrid()._settings,o={},a={};o[ht]=wt(e,i),a[ht]=wt(r,s),t.start(o,a,{duration:n.layoutDuration,easing:n.layoutEasing,onFinish:this._onLayoutEnd})}},$.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},$.prototype._onReleaseEnd=function(t){if(t._id===this._item._id){if(!this._animation.isAnimating()){this.reset();return}this._resetAfterLayout=!0}},$.prototype._onMigrate=function(t){if(t.item===this._item){var e=this._item.getGrid(),i=t.toGrid;e.off(Kt,this._onReleaseEnd),e.off(vt,this._onLayoutStart),e.off(yt,this._onMigrate),e.off($t,this._onHide),i.on(Kt,this._onReleaseEnd),i.on(vt,this._onLayoutStart),i.on(yt,this._onMigrate),i.on($t,this._onHide),this._didMigrate=!0}},$.prototype._onHide=function(t){t.indexOf(this._item)>-1&&this.reset()},$.prototype.create=function(){if(this.isActive()){this._resetAfterLayout=!1;return}var t=this._item,e=t.getGrid(),i=e._settings,r=this._animation;this._left=t._left,this._top=t._top;var s;k(i.dragPlaceholder.createElement)?s=i.dragPlaceholder.createElement(t):s=document.createElement("div"),this._element=s,r._element=s,this._className=i.itemPlaceholderClass||"",this._className&&Q(s,this._className),qt(s,{position:"absolute",left:"0px",top:"0px",width:t._width+"px",height:t._height+"px"}),s.style[ht]=wt(t._left+t._marginLeft,t._top+t._marginTop),e.on(vt,this._onLayoutStart),e.on(Kt,this._onReleaseEnd),e.on(yt,this._onMigrate),e.on($t,this._onHide),k(i.dragPlaceholder.onCreate)&&i.dragPlaceholder.onCreate(t,s),e.getElement().appendChild(s)},$.prototype.reset=function(){if(this.isActive()){var t=this._element,e=this._item,i=e.getGrid(),r=i._settings,s=this._animation;this._resetAfterLayout=!1,dr(e._id),vn(e._id),s.stop(),s._element=null,i.off(Kt,this._onReleaseEnd),i.off(vt,this._onLayoutStart),i.off(yt,this._onMigrate),i.off($t,this._onHide),this._className&&(W(t,this._className),this._className=""),t.parentNode.removeChild(t),this._element=null,k(r.dragPlaceholder.onRemove)&&r.dragPlaceholder.onRemove(e,t)}},$.prototype.isActive=function(){return!!this._element},$.prototype.getElement=function(){return this._element},$.prototype.updateDimensions=function(){this.isActive()&&gn(this._item._id,this._updateDimensions)},$.prototype.destroy=function(){this.reset(),this._animation.destroy(),this._item=this._animation=null};function Et(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}Et.prototype.start=function(){if(!(this._isDestroyed||this._isActive)){var t=this._item,e=t.getGrid(),i=e._settings;this._isActive=!0,Q(t._element,i.itemReleasingClass),i.dragRelease.useDragContainer||this._placeToGrid(),e._emit(Zs,t),e._nextLayoutData||t._layout.start(!1)}},Et.prototype.stop=function(t,e,i){if(!(this._isDestroyed||!this._isActive)){var r=this._item,s=r.getGrid();!t&&(e===void 0||i===void 0)&&(e=r._left,i=r._top);var n=this._placeToGrid(e,i);this._reset(n),t||s._emit(Kt,r)}},Et.prototype.isJustReleased=function(){return this._isActive&&this._isPositioningStarted===!1},Et.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},Et.prototype._placeToGrid=function(t,e){if(!this._isDestroyed){var i=this._item,r=i._element,s=i.getGrid()._element,n=!1;if(r.parentNode!==s){if(t===void 0||e===void 0){var o=ft(r);t=o.x-this._containerDiffX,e=o.y-this._containerDiffY}s.appendChild(r),i._setTranslate(t,e),n=!0}return this._containerDiffX=0,this._containerDiffY=0,n}},Et.prototype._reset=function(t){if(!this._isDestroyed){var e=this._item,i=e.getGrid()._settings.itemReleasingClass;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,i&&(t&&e._element.clientWidth,W(e._element,i))}};var Ir=2;function _t(t){var e=t._element,i=e.style;this._item=t,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",t._setTranslate(0,0),this._animation=new ct(e),this._queue="layout-"+t._id,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}_t.prototype.start=function(t,e){if(!this._isDestroyed){var i=this._item,r=i._dragRelease,s=i.getGrid()._settings,n=this._isActive,o=r.isJustReleased(),a=o?s.dragRelease.duration:s.layoutDuration,l=o?s.dragRelease.easing:s.layoutEasing,h=!t&&!this._skipNextAnimation&&a>0;if(n&&(ar(i._id),i._emitter.burst(this._queue,!0,i)),o&&(r._isPositioningStarted=!0),k(e)&&i._emitter.on(this._queue,e),this._skipNextAnimation=!1,!h){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=n,cn(i._id,this._setupAnimation,this._startAnimation)}},_t.prototype.stop=function(t,e,i){if(!(this._isDestroyed||!this._isActive)){var r=this._item;if(ar(r._id),this._animation.isAnimating()){if(e===void 0||i===void 0){var s=ft(r._element);e=s.x,i=s.y}r._setTranslate(e,i),this._animation.stop()}W(r._element,r.getGrid()._settings.itemPositioningClass),this._isActive=!1,t&&r._emitter.burst(this._queue,!0,r)}},_t.prototype.destroy=function(){if(!this._isDestroyed){var t=this._item._element.style;this.stop(!0,0,0),this._item._emitter.clear(this._queue),this._animation.destroy(),t[ht]="",t.left="",t.top="",this._item=null,this._currentStyles=null,this._targetStyles=null,this._animOptions=null,this._isDestroyed=!0}},_t.prototype._updateOffsets=function(){if(!this._isDestroyed){var t=this._item,e=t._migrate,i=t._dragRelease;this._offsetLeft=i._isActive?i._containerDiffX:e._isActive?e._containerDiffX:0,this._offsetTop=i._isActive?i._containerDiffY:e._isActive?e._containerDiffY:0,this._nextLeft=this._item._left+this._offsetLeft,this._nextTop=this._item._top+this._offsetTop}},_t.prototype._finish=function(){if(!this._isDestroyed){var t=this._item,e=t._migrate,i=t._dragRelease;t._tX=this._nextLeft,t._tY=this._nextTop,this._isActive&&(this._isActive=!1,W(t._element,t.getGrid()._settings.itemPositioningClass)),i._isActive&&i.stop(),e._isActive&&e.stop(),t._emitter.burst(this._queue,!1,t)}},_t.prototype._setupAnimation=function(){var t=this._item;if(t._tX===void 0||t._tY===void 0){var e=ft(t._element);t._tX=e.x,t._tY=e.y}},_t.prototype._startAnimation=function(){var t=this._item,e=t.getGrid()._settings,i=this._animOptions.duration<=0;this._updateOffsets();var r=Math.abs(t._left-(t._tX-this._offsetLeft)),s=Math.abs(t._top-(t._tY-this._offsetTop));if(i||r<Ir&&s<Ir){(r||s||this._isInterrupted)&&t._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),this._finish();return}this._isInterrupted||Q(t._element,e.itemPositioningClass),this._currentStyles[ht]=wt(t._tX,t._tY),this._targetStyles[ht]=wt(this._nextLeft,this._nextTop),t._tX=t._tY=void 0,this._animation.start(this._currentStyles,this._targetStyles,this._animOptions)};function se(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}se.prototype.start=function(t,e,i){if(!this._isDestroyed){var r=this._item,s=r._element,n=r.isActive(),o=r.isVisible(),a=r.getGrid(),l=a._settings,h=t._settings,c=t._element,d=t._items,y=a._items.indexOf(r),p=i||document.body,g,u,_,b,m,E,w,S,x,N;if(typeof e=="number")g=Gt(d,e,1);else{if(u=t.getItem(e),!u)return;g=d.indexOf(u)}(r.isPositioning()||this._isActive||r.isReleasing())&&(E=ft(s),w=E.x,S=E.y),r.isPositioning()&&r._layout.stop(!0,w,S),this._isActive&&(w-=this._containerDiffX,S-=this._containerDiffY,this.stop(!0,w,S)),r.isReleasing()&&(w-=r._dragRelease._containerDiffX,S-=r._dragRelease._containerDiffY,r._dragRelease.stop(!0,w,S)),r._visibility.stop(!0),r._drag&&r._drag.destroy(),a._hasListeners(yt)&&a._emit(yt,{item:r,fromGrid:a,fromIndex:y,toGrid:t,toIndex:g}),t._hasListeners(_e)&&t._emit(_e,{item:r,fromGrid:a,fromIndex:y,toGrid:t,toIndex:g}),l.itemClass!==h.itemClass&&(W(s,l.itemClass),Q(s,h.itemClass)),x=o?l.itemVisibleClass:l.itemHiddenClass,N=o?h.itemVisibleClass:h.itemHiddenClass,x!==N&&(W(s,x),Q(s,N)),a._items.splice(y,1),ei(d,r,g),r._gridId=t._id,n?(_=s.parentNode,p!==_&&(p.appendChild(s),b=Ft(p,_,!0),E||(E=ft(s),w=E.x,S=E.y),r._setTranslate(w+b.left,S+b.top))):c.appendChild(s),r._visibility.setStyles(o?h.visibleStyles:h.hiddenStyles),n&&(m=Ft(p,c,!0)),r._refreshDimensions(),r._sortData=null,r._drag=h.dragEnabled?new T(r):null,n?(this._isActive=!0,this._container=p,this._containerDiffX=m.left,this._containerDiffY=m.top):(this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0),a._hasListeners(de)&&a._emit(de,{item:r,fromGrid:a,fromIndex:y,toGrid:t,toIndex:g}),t._hasListeners(fe)&&t._emit(fe,{item:r,fromGrid:a,fromIndex:y,toGrid:t,toIndex:g})}},se.prototype.stop=function(t,e,i){if(!(this._isDestroyed||!this._isActive)){var r=this._item,s=r._element,n=r.getGrid(),o=n._element,a;this._container!==o&&((e===void 0||i===void 0)&&(t?(a=ft(s),e=a.x-this._containerDiffX,i=a.y-this._containerDiffY):(e=r._left,i=r._top)),o.appendChild(s),r._setTranslate(e,i)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0}},se.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)};function nt(t){var e=t._isActive,i=t._element,r=i.children[0],s=t.getGrid()._settings;if(!r)throw new Error("No valid child element found within item element.");this._item=t,this._isDestroyed=!1,this._isHidden=!e,this._isHiding=!1,this._isShowing=!1,this._childElement=r,this._currentStyleProps=[],this._animation=new ct(r),this._queue="visibility-"+t._id,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),i.style.display=e?"":"none",Q(i,e?s.itemVisibleClass:s.itemHiddenClass),this.setStyles(e?s.visibleStyles:s.hiddenStyles)}nt.prototype.show=function(t,e){if(!this._isDestroyed){var i=this._item,r=i._element,s=k(e)?e:null,n=i.getGrid(),o=n._settings;if(!this._isShowing&&!this._isHidden){s&&s(!1,i);return}if(this._isShowing&&!t){s&&i._emitter.on(this._queue,s);return}this._isShowing||(i._emitter.burst(this._queue,!0,i),W(r,o.itemHiddenClass),Q(r,o.itemVisibleClass),this._isHiding||(r.style.display="")),s&&i._emitter.on(this._queue,s),this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,t,this._finishShow)}},nt.prototype.hide=function(t,e){if(!this._isDestroyed){var i=this._item,r=i._element,s=k(e)?e:null,n=i.getGrid(),o=n._settings;if(!this._isHiding&&this._isHidden){s&&s(!1,i);return}if(this._isHiding&&!t){s&&i._emitter.on(this._queue,s);return}this._isHiding||(i._emitter.burst(this._queue,!0,i),Q(r,o.itemHiddenClass),W(r,o.itemVisibleClass)),s&&i._emitter.on(this._queue,s),this._isHidden=this._isHiding=!0,this._isShowing=!1,this._startAnimation(!1,t,this._finishHide)}},nt.prototype.stop=function(t){if(!this._isDestroyed&&!(!this._isHiding&&!this._isShowing)){var e=this._item;lr(e._id),this._animation.stop(),t&&e._emitter.burst(this._queue,!0,e)}},nt.prototype.setStyles=function(t){var e=this._childElement,i=this._currentStyleProps;this._removeCurrentStyles();for(var r in t)i.push(r),e.style[r]=t[r]},nt.prototype.destroy=function(){if(!this._isDestroyed){var t=this._item,e=t._element,i=t.getGrid(),r=i._settings;this.stop(!0),t._emitter.clear(this._queue),this._animation.destroy(),this._removeCurrentStyles(),W(e,r.itemVisibleClass),W(e,r.itemHiddenClass),e.style.display="",this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0}},nt.prototype._startAnimation=function(t,e,i){if(!this._isDestroyed){var r=this._item,s=this._animation,n=this._childElement,o=r.getGrid()._settings,a=t?o.visibleStyles:o.hiddenStyles,l=t?o.showDuration:o.hideDuration,h=t?o.showEasing:o.hideEasing,c=e||l<=0,d;if(!a){i&&i();return}if(lr(r._id),c){qt(n,a),s.stop(),i&&i();return}s.isAnimating()&&(s._animation.onfinish=null),un(r._id,function(){d=Ar(n,a)},function(){s.start(d,a,{duration:l,easing:h,onFinish:i})})}},nt.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._item._emitter.burst(this._queue,!1,this._item))},nt.prototype._finishHide=function(){if(this._isHidden){var t=this._item;this._isHiding=!1,t._layout.stop(!0,0,0),t._element.style.display="none",t._emitter.burst(this._queue,!1,t)}},nt.prototype._removeCurrentStyles=function(){for(var t=this._childElement,e=this._currentStyleProps,i=0;i<e.length;i++)t.style[e[i]]="";e.length=0};var Jn=0;function Or(){return++Jn}function Y(t,e,i){var r=t._settings;if(kt){if(kt.has(e))throw new Error("You can only create one Muuri Item per element!");kt.set(e,this)}this._id=Or(),this._gridId=t._id,this._element=e,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 rt,e.parentNode!==t._element&&t._element.appendChild(e),Q(e,r.itemClass),typeof i!="boolean"&&(i=J(e,"display")!=="none"),this._isActive=i,this._visibility=new nt(this),this._layout=new _t(this),this._migrate=new se(this),this._drag=r.dragEnabled?new T(this):null,this._dragRelease=new Et(this),this._dragPlaceholder=new $(this)}Y.prototype.getGrid=function(){return ce[this._gridId]},Y.prototype.getElement=function(){return this._element},Y.prototype.getWidth=function(){return this._width},Y.prototype.getHeight=function(){return this._height},Y.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},Y.prototype.getPosition=function(){return{left:this._left,top:this._top}},Y.prototype.isActive=function(){return this._isActive},Y.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},Y.prototype.isShowing=function(){return!!(this._visibility&&this._visibility._isShowing)},Y.prototype.isHiding=function(){return!!(this._visibility&&this._visibility._isHiding)},Y.prototype.isPositioning=function(){return!!(this._layout&&this._layout._isActive)},Y.prototype.isDragging=function(){return!!(this._drag&&this._drag._isActive)},Y.prototype.isReleasing=function(){return!!(this._dragRelease&&this._dragRelease._isActive)},Y.prototype.isDestroyed=function(){return this._isDestroyed},Y.prototype._refreshDimensions=function(t){if(!this._isDestroyed&&!(t!==!0&&this._visibility._isHidden)){var e=this._element,i=this._dragPlaceholder,r=e.getBoundingClientRect();this._width=r.width,this._height=r.height,this._marginLeft=Math.max(0,st(e,"margin-left")),this._marginRight=Math.max(0,st(e,"margin-right")),this._marginTop=Math.max(0,st(e,"margin-top")),this._marginBottom=Math.max(0,st(e,"margin-bottom")),i&&i.updateDimensions()}},Y.prototype._refreshSortData=function(){if(!this._isDestroyed){var t=this._sortData={},e=this.getGrid()._settings.sortData,i;for(i in e)t[i]=e[i](this,this._element)}},Y.prototype._addToLayout=function(t,e){this._isActive!==!0&&(this._isActive=!0,this._left=t||0,this._top=e||0)},Y.prototype._removeFromLayout=function(){this._isActive!==!1&&(this._isActive=!1,this._left=0,this._top=0)},Y.prototype._canSkipLayout=function(t,e){return this._left===t&&this._top===e&&!this._migrate._isActive&&!this._layout._skipNextAnimation&&!this._dragRelease.isJustReleased()},Y.prototype._setTranslate=function(t,e){return this._tX===t&&this._tY===e?!1:(this._tX=t,this._tY=e,this._element.style[ht]=wt(t,e),!0)},Y.prototype._destroy=function(t){if(!this._isDestroyed){var e=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(),W(e,r.itemClass),t&&e.parentNode.removeChild(e),kt&&kt.delete(e),this._isActive=!1,this._isDestroyed=!0}};function Lr(t){var e=1,i=2,r=4,s=8,n=16,o=.001,a=.5;function l(u){return((u*1e3+.5<<0)/10<<0)/100}function h(){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(h.prototype.computeLayout=function(u,_){var b=u.items,m=u.slots,E=!!(_&e),w=!!(_&i),S=!!(_&r),x=!!(_&s),N=!!(_&n),B=typeof b[0]=="number",O,mt,H,et,xt,j;if(!b.length)return u;for(mt=B?2:1,O=0;O<b.length;O+=mt)B?(et=b[O],xt=b[O+1]):(H=b[O],et=H._width+H._marginLeft+H._marginRight,xt=H._height+H._marginTop+H._marginBottom),N&&(et=l(et),xt=l(xt)),j=this.computeNextSlot(u,et,xt,E,w),w?j.left+j.width>u.width&&(u.width=j.left+j.width):j.top+j.height>u.height&&(u.height=j.top+j.height),m[++this.slotIndex]=j.left,m[++this.slotIndex]=j.top,(S||x)&&this.slotSizes.push(j.width,j.height);if(S)for(O=0;O<m.length;O+=2)m[O]=u.width-(m[O]+this.slotSizes[O]);if(x)for(O=1;O<m.length;O+=2)m[O]=u.height-(m[O]+this.slotSizes[O]);return this.slotSizes.length=0,this.currentRects.length=0,this.nextRects.length=0,this.rectStore.length=0,this.rectId=0,this.slotIndex=-1,u},h.prototype.computeNextSlot=function(u,_,b,m,E){var w=this.slotData,S=this.currentRects,x=this.nextRects,N=!1,B,O,mt,H,et;for(x.length=0,w.left=null,w.top=null,w.width=_,w.height=b,H=0;H<S.length;H++)if(O=S[H],!!O&&(B=this.getRect(O),w.width<=B.width+o&&w.height<=B.height+o)){w.left=B.left,w.top=B.top;break}if(w.left===null&&(E?(w.left=u.width,w.top=0):(w.left=0,w.top=u.height),m||(N=!0)),!E&&w.top+w.height>u.height+o&&(w.left>a&&x.push(this.addRect(0,u.height,w.left,1/0)),w.left+w.width<u.width-a&&x.push(this.addRect(w.left+w.width,u.height,u.width-w.left-w.width,1/0)),u.height=w.top+w.height),E&&w.left+w.width>u.width+o&&(w.top>a&&x.push(this.addRect(u.width,0,1/0,w.top)),w.top+w.height<u.height-a&&x.push(this.addRect(u.width,w.top+w.height,1/0,u.height-w.top-w.height)),u.width=w.left+w.width),!N){for(m&&(H=0);H<S.length;H++)if(O=S[H],!!O)for(B=this.getRect(O),mt=this.splitRect(B,w),et=0;et<mt.length;et++)O=mt[et],B=this.getRect(O),(E?B.left+o<u.width-o:B.top+o<u.height-o)&&x.push(O)}return x.length>1&&this.purgeRects(x).sort(E?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=x,this.nextRects=S,w},h.prototype.addRect=function(u,_,b,m){var E=++this.rectId;return this.rectStore[E]=u||0,this.rectStore[++this.rectId]=_||0,this.rectStore[++this.rectId]=b||0,this.rectStore[++this.rectId]=m||0,E},h.prototype.getRect=function(u,_){return _||(_=this.rectTarget),_.left=this.rectStore[u]||0,_.top=this.rectStore[++u]||0,_.width=this.rectStore[++u]||0,_.height=this.rectStore[++u]||0,_},h.prototype.splitRect=function(){var u=[],_=0,b=0;return function(m,E){return u.length=0,m.left+m.width<=E.left+o||E.left+E.width<=m.left+o||m.top+m.height<=E.top+o||E.top+E.height<=m.top+o?(u.push(this.addRect(m.left,m.top,m.width,m.height)),u):(_=E.left-m.left,_>=a&&u.push(this.addRect(m.left,m.top,_,m.height)),_=m.left+m.width-(E.left+E.width),_>=a&&u.push(this.addRect(E.left+E.width,m.top,_,m.height)),b=E.top-m.top,b>=a&&u.push(this.addRect(m.left,m.top,m.width,b)),b=m.top+m.height-(E.top+E.height),b>=a&&u.push(this.addRect(m.left,E.top+E.height,m.width,b)),u)}}(),h.prototype.isRectAWithinRectB=function(u,_){return u.left+o>=_.left&&u.top+o>=_.top&&u.left+u.width-o<=_.left+_.width&&u.top+u.height-o<=_.top+_.height},h.prototype.purgeRects=function(){var u={},_={};return function(b){for(var m=b.length,E;m--;)if(E=b.length,!!b[m]){for(this.getRect(b[m],u);E--;)if(!(!b[E]||m===E)&&(this.getRect(b[E],_),this.isRectAWithinRectB(u,_))){b[m]=0;break}}return b}}(),h.prototype.sortRectsTopLeft=function(){var u={},_={};return function(b,m){return this.getRect(b,u),this.getRect(m,_),u.top<_.top&&u.top+o<_.top?-1:u.top>_.top&&u.top-o>_.top?1:u.left<_.left&&u.left+o<_.left?-1:u.left>_.left&&u.left-o>_.left?1:0}}(),h.prototype.sortRectsLeftTop=function(){var u={},_={};return function(b,m){return this.getRect(b,u),this.getRect(m,_),u.left<_.left&&u.left+o<_.left?-1:u.left>_.left&&u.left-o<_.left?1:u.top<_.top&&u.top+o<_.top?-1:u.top>_.top&&u.top-o>_.top?1:0}}(),t){var c=1,d=2,y=3,p=4,g=new h;self.onmessage=function(u){var _=new Float32Array(u.data),b=_.subarray(p,_.length),m=new Float32Array(b.length),E=_[y],w={items:b,slots:m,width:_[c],height:_[d]};g.computeLayout(w,E),_[c]=w.width,_[d]=w.height,_.set(w.slots,p),postMessage(_.buffer,[_.buffer])}}return h}var Pr=Lr(),Vt=null,Re=[];function Zn(t,e){var i=[];if(t>0){Vt||(Vt=URL.createObjectURL(new Blob(["("+Lr.toString()+")(true)"],{type:"application/javascript"})));for(var r=0,s;r<t;r++)s=new Worker(Vt),e&&(s.onmessage=e),i.push(s),Re.push(s)}return i}function Qn(t){for(var e,i,r=0;r<t.length;r++)e=t[r],e.onmessage=null,e.onerror=null,e.onmessageerror=null,e.terminate(),i=Re.indexOf(e),i>-1&&Re.splice(i,1);Vt&&!Re.length&&(URL.revokeObjectURL(Vt),Vt=null)}function to(){return!!(window.Worker&&window.URL&&window.Blob)}var Nr=1,Ce=2,Mr=4,Xr=8,Br=16,Yr=0,Gr=1,Fr=2,eo=3,li=4;function pt(t,e){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(e),t=typeof t=="number"?Math.max(0,t):0,t&&to())try{this._workers=Zn(t,this._onWorkerMessage)}catch{this._processor=new Pr}else this._processor=new Pr}pt.prototype._sendToWorker=function(){if(!(!this._layoutQueue.length||!this._workers.length)){var t=this._layoutQueue.shift(),e=this._workers.pop(),i=this._layoutWorkerData[t];delete this._layoutWorkerData[t],this._layoutWorkers[t]=e,e.postMessage(i.buffer,[i.buffer])}},pt.prototype._onWorkerMessage=function(t){var e=new Float32Array(t.data),i=e[Yr],r=this._layouts[i],s=this._layoutCallbacks[i],n=this._layoutWorkers[i];r&&delete this._layouts[i],s&&delete this._layoutCallbacks[i],n&&delete this._layoutWorkers[i],r&&s&&(r.width=e[Gr],r.height=e[Fr],r.slots=e.subarray(li,e.length),this._finalizeLayout(r),s(r)),n&&(this._workers.push(n),this._sendToWorker())},pt.prototype._finalizeLayout=function(t){var e=t._grid,i=t._settings&Ce,r=e._boxSizing==="border-box";return delete t._grid,delete t._settings,t.styles={},i?t.styles.width=(r?t.width+e._borderLeft+e._borderRight:t.width)+"px":t.styles.height=(r?t.height+e._borderTop+e._borderBottom:t.height)+"px",t},pt.prototype.setOptions=function(t){if(t){var e;typeof t.fillGaps=="boolean"?e=t.fillGaps?Nr:0:e=this._options&Nr;var i;typeof t.horizontal=="boolean"?i=t.horizontal?Ce:0:i=this._options&Ce;var r;typeof t.alignRight=="boolean"?r=t.alignRight?Mr:0:r=this._options&Mr;var s;typeof t.alignBottom=="boolean"?s=t.alignBottom?Xr:0:s=this._options&Xr;var n;typeof t.rounding=="boolean"?n=t.rounding?Br:0:n=this._options&Br,this._options=e|i|r|s|n}},pt.prototype.createLayout=function(t,e,i,r,s,n){if(this._layouts[e])throw new Error("A layout with the provided id is currently being processed.");var o=this._options&Ce,a={id:e,items:i,slots:null,width:o?0:r,height:o?s:0,_grid:t,_settings:this._options};if(!i.length){a.slots=[],this._finalizeLayout(a),n(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),n(a);return}var l=new Float32Array(li+i.length*2);l[Yr]=e,l[Gr]=a.width,l[Fr]=a.height,l[eo]=a._settings;var h,c,d;for(h=0,c=li-1,d;h<i.length;h++)d=i[h],l[++c]=d._width+d._marginLeft+d._marginRight,l[++c]=d._height+d._marginTop+d._marginBottom;return this._layoutQueue.push(e),this._layouts[e]=a,this._layoutCallbacks[e]=n,this._layoutWorkerData[e]=l,this._sendToWorker(),this.cancelLayout.bind(this,e)},pt.prototype.cancelLayout=function(t){var e=this._layouts[t];if(e&&(delete this._layouts[t],delete this._layoutCallbacks[t],this._layoutWorkerData[t])){delete this._layoutWorkerData[t];var i=this._layoutQueue.indexOf(t);i>-1&&this._layoutQueue.splice(i,1)}},pt.prototype.destroy=function(){for(var t in this._layoutWorkers)this._workers.push(this._layoutWorkers[t]);Qn(this._workers),this._workers.length=0,this._layoutQueue.length=0,this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={}};var io=0;function ro(t,e){var i=++io,r=0,s=0,n=!1,o=function(a){n||(s&&(r-=a-s),s=a,r>0?Sn(i,o):(r=s=0,t()))};return function(a){if(!n){if(e<=0){a!==!0&&t();return}if(a===!0){n=!0,r=s=0,o=void 0,bn(i);return}r<=0?(r=e,o(0)):r=e}}}var so="[object HTMLCollection]",no="[object NodeList]";function hi(t){var e=Object.prototype.toString.call(t);return e===so||e===no}var oo="object",ao="[object Object]",lo=Object.prototype.toString;function Hr(t){return typeof t===oo&&lo.call(t)===ao}function ho(){}function co(t){return hi(t)?Array.prototype.slice.call(t):Array.prototype.concat(t)}var qr="number",ke="string",Tt="instant",ci=0;function D(t,e){typeof t===ke&&(t=document.querySelector(t));var i=t.getRootNode?t.getRootNode({composed:!0})===document:document.body.contains(t);if(!i||t===document.documentElement)throw new Error("Container element must be an existing DOM element.");var r=uo(D.defaultOptions,e);r.visibleStyles=Vr(r.visibleStyles),r.hiddenStyles=Vr(r.hiddenStyles),k(r.dragSort)||(r.dragSort=!!r.dragSort),this._id=Or(),this._element=t,this._settings=r,this._isDestroyed=!1,this._items=[],this._layout={id:0,items:[],slots:[]},this._isLayoutFinished=!0,this._nextLayoutData=null,this._emitter=new rt,this._onLayoutDataReceived=this._onLayoutDataReceived.bind(this),ce[this._id]=this,Q(t,r.containerClass),_o(this,r.layoutOnResize),this.add(fo(t,r.items),{layout:!1}),r.layoutOnInit&&this.layout(!0)}D.Item=Y,D.ItemLayout=_t,D.ItemVisibility=nt,D.ItemMigrate=se,D.ItemDrag=T,D.ItemDragRelease=Et,D.ItemDragPlaceholder=$,D.Emitter=rt,D.Animator=ct,D.Dragger=v,D.Packer=pt,D.AutoScroller=P,D.defaultPacker=new pt(2),D.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:It,migrateAction:It},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:P.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"},D.prototype.on=function(t,e){return this._emitter.on(t,e),this},D.prototype.off=function(t,e){return this._emitter.off(t,e),this},D.prototype.getElement=function(){return this._element},D.prototype.getItem=function(t){if(this._isDestroyed||!t&&t!==0)return null;if(typeof t===qr)return this._items[t>-1?t:this._items.length+t]||null;if(t instanceof Y)return t._gridId===this._id?t:null;if(kt){var e=kt.get(t);return e&&e._gridId===this._id?e:null}else for(var i=0;i<this._items.length;i++)if(this._items[i]._element===t)return this._items[i];return null},D.prototype.getItems=function(t){if(this._isDestroyed||t===void 0)return this._items.slice(0);var e=[],i,r;if(Array.isArray(t)||hi(t))for(i=0;i<t.length;i++)r=this.getItem(t[i]),r&&e.push(r);else r=this.getItem(t),r&&e.push(r);return e},D.prototype.refreshItems=function(t,e){if(this._isDestroyed)return this;var i=t||this._items,r,s,n,o;if(e===!0)for(o=[],r=0;r<i.length;r++)s=i[r],!s.isVisible()&&!s.isHiding()&&(n=s.getElement().style,n.visibility="hidden",n.display="",o.push(n));for(r=0;r<i.length;r++)i[r]._refreshDimensions(e);if(e===!0){for(r=0;r<o.length;r++)n=o[r],n.visibility="",n.display="none";o.length=0}return this},D.prototype.refreshSortData=function(t){if(this._isDestroyed)return this;for(var e=t||this._items,i=0;i<e.length;i++)e[i]._refreshSortData();return this},D.prototype.synchronize=function(){if(this._isDestroyed)return this;var t=this._items;if(!t.length)return this;for(var e,i,r=0;r<t.length;r++)i=t[r]._element,i.parentNode===this._element&&(e=e||document.createDocumentFragment(),e.appendChild(i));return e?(this._element.appendChild(e),this._emit(qs),this):this},D.prototype.layout=function(t,e){if(this._isDestroyed)return this;var i=this._nextLayoutData;i&&k(i.cancel)&&i.cancel(),ci=ci%tn+1;var r=ci;this._nextLayoutData={id:r,instant:t,onFinish:e,cancel:null};for(var s=this._items,n=[],o=0;o<s.length;o++)s[o]._isActive&&n.push(s[o]);this._refreshDimensions();var a=this._width-this._borderLeft-this._borderRight,l=this._height-this._borderTop-this._borderBottom,h=this._settings.layout,c;return k(h)?c=h(this,r,n,a,l,this._onLayoutDataReceived):(D.defaultPacker.setOptions(h),c=D.defaultPacker.createLayout(this,r,n,a,l,this._onLayoutDataReceived)),k(c)&&this._nextLayoutData&&this._nextLayoutData.id===r&&(this._nextLayoutData.cancel=c),this},D.prototype.add=function(t,e){if(this._isDestroyed||!t)return[];var i=co(t);if(!i.length)return i;var r=e||{},s=r.layout?r.layout:r.layout===void 0,n=this._items,o=!1,a,l,h,c;for(c=0;c<i.length;c++)l=i[c],l.parentNode!==this._element&&(a=a||document.createDocumentFragment(),a.appendChild(l));for(a&&this._element.appendChild(a),c=0;c<i.length;c++)l=i[c],h=i[c]=new Y(this,l,r.active),h._isActive&&(o=!0,h._layout._skipNextAnimation=!0);for(c=0;c<i.length;c++)h=i[c],h._refreshDimensions(),h._refreshSortData();return ei(n,i,r.index),this._hasListeners(Ni)&&this._emit(Ni,i.slice(0)),o&&s&&this.layout(s===Tt,k(s)?s:void 0),i},D.prototype.remove=function(t,e){if(this._isDestroyed||!t.length)return[];var i=e||{},r=i.layout?i.layout:i.layout===void 0,s=!1,n=this.getItems(),o=[],a=[],l,h,c;for(c=0;c<t.length;c++)h=t[c],!h._isDestroyed&&(l=this._items.indexOf(h),l!==-1&&(h._isActive&&(s=!0),o.push(h),a.push(n.indexOf(h)),h._destroy(i.removeElements),this._items.splice(l,1)));return this._hasListeners(Mi)&&this._emit(Mi,o.slice(0),a),s&&r&&this.layout(r===Tt,k(r)?r:void 0),o},D.prototype.show=function(t,e){return!this._isDestroyed&&t.length&&this._setItemsVisibility(t,!0,e),this},D.prototype.hide=function(t,e){return!this._isDestroyed&&t.length&&this._setItemsVisibility(t,!1,e),this},D.prototype.filter=function(t,e){if(this._isDestroyed||!this._items.length)return this;var i=[],r=[],s=typeof t===ke,n=k(t),o=e||{},a=o.instant===!0,l=o.syncWithLayout,h=o.layout?o.layout:o.layout===void 0,c=k(o.onFinish)?o.onFinish:null,d=-1,y=ho,p,g;if(c&&(y=function(){++d&&c(i.slice(0),r.slice(0))}),n||s)for(g=0;g<this._items.length;g++)p=this._items[g],(n?t(p):xe(p._element,t))?i.push(p):r.push(p);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(Xi)&&this._emit(Xi,i.slice(0),r.slice(0)),h&&this.layout(h===Tt,k(h)?h:void 0)),this},D.prototype.sort=function(){var t,e,i,r;function s(o,a){for(var l=0,h,c,d,y,p=0;p<t.length;p++)if(h=t[p][0],c=t[p][1],d=(o._sortData?o:o._refreshSortData())._sortData[h],y=(a._sortData?a:a._refreshSortData())._sortData[h],c==="desc"||!c&&e?l=y<d?-1:y>d?1:0:l=d<y?-1:d>y?1:0,l)return l;return l||(r||(r=jr(i)),l=e?Ie(r,a,o):Ie(r,o,a)),l}function n(o,a){var l=e?-t(o,a):t(o,a);return l||(r||(r=jr(i)),l=e?Ie(r,a,o):Ie(r,o,a)),l}return function(o,a){if(this._isDestroyed||this._items.length<2)return this;var l=this._items,h=a||{},c=h.layout?h.layout:h.layout===void 0;if(e=!!h.descending,i=l.slice(0),r=null,k(o))t=o,l.sort(n);else if(typeof o===ke)t=o.trim().split(" ").filter(function(d){return d}).map(function(d){return d.split(":")}),l.sort(s);else if(Array.isArray(o))l.length=0,l.push.apply(l,o);else throw t=e=i=r=null,new Error("Invalid comparer argument provided.");return this._hasListeners(Bi)&&this._emit(Bi,l.slice(0),i),c&&this.layout(c===Tt,k(c)?c:void 0),t=e=i=r=null,this}}(),D.prototype.move=function(t,e,i){if(this._isDestroyed||this._items.length<2)return this;var r=this._items,s=i||{},n=s.layout?s.layout:s.layout===void 0,o=s.action===lt,a=o?lt:It,l=this.getItem(t),h=this.getItem(e),c,d;return l&&h&&l!==h&&(c=r.indexOf(l),d=r.indexOf(h),o?wr(r,c,d):br(r,c,d),this._hasListeners(ue)&&this._emit(ue,{item:l,fromIndex:c,toIndex:d,action:a}),n&&this.layout(n===Tt,k(n)?n:void 0)),this},D.prototype.send=function(t,e,i,r){if(this._isDestroyed||e._isDestroyed||this===e)return this;if(t=this.getItem(t),!t)return this;var s=r||{},n=s.appendTo||document.body,o=s.layoutSender?s.layoutSender:s.layoutSender===void 0,a=s.layoutReceiver?s.layoutReceiver:s.layoutReceiver===void 0;return t._migrate.start(e,i,n),t._migrate._isActive&&t._isActive&&(o&&this.layout(o===Tt,k(o)?o:void 0),a&&e.layout(a===Tt,k(a)?a:void 0)),this},D.prototype.destroy=function(t){if(this._isDestroyed)return this;var e=this._element,i=this._items.slice(0),r=this._layout&&this._layout.styles||{},s,n;for(po(this),s=0;s<i.length;s++)i[s]._destroy(t);this._items.length=0,W(e,this._settings.containerClass);for(n in r)e.style[n]="";return this._emit(Qs),this._emitter.destroy(),delete ce[this._id],this._isDestroyed=!0,this},D.prototype._emit=function(){this._isDestroyed||this._emitter.emit.apply(this._emitter,arguments)},D.prototype._hasListeners=function(t){return this._isDestroyed?!1:this._emitter.countListeners(t)>0},D.prototype._updateBoundingRect=function(){var t=this._element,e=t.getBoundingClientRect();this._width=e.width,this._height=e.height,this._left=e.left,this._top=e.top,this._right=e.right,this._bottom=e.bottom},D.prototype._updateBorders=function(t,e,i,r){var s=this._element;t&&(this._borderLeft=st(s,"border-left-width")),e&&(this._borderRight=st(s,"border-right-width")),i&&(this._borderTop=st(s,"border-top-width")),r&&(this._borderBottom=st(s,"border-bottom-width"))},D.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1),this._boxSizing=J(this._element,"box-sizing")},D.prototype._onLayoutDataReceived=function(){var t=[];return function(e){if(!(this._isDestroyed||!this._nextLayoutData||this._nextLayoutData.id!==e.id)){var i=this,r=this._nextLayoutData.instant,s=this._nextLayoutData.onFinish,n=e.items.length,o=n,a,l,h,c;for(this._nextLayoutData=null,!this._isLayoutFinished&&this._hasListeners(Pi)&&this._emit(Pi,this._layout.items.slice(0)),this._layout=e,t.length=0,c=0;c<n;c++){if(a=e.items[c],!a){--o;continue}if(l=e.slots[c*2],h=e.slots[c*2+1],a._canSkipLayout(l,h)){--o;continue}a._left=l,a._top=h,a.isActive()&&!a.isDragging()?t.push(a):--o}if(e.styles&&qt(this._element,e.styles),!(this._hasListeners(vt)&&(this._emit(vt,e.items.slice(0),r===!0),this._layout.id!==e.id))){var d=function(){if(!(--o>0)){var y=i._layout.id!==e.id,p=k(r)?r:s;y||(i._isLayoutFinished=!0),k(p)&&p(e.items.slice(0),y),!y&&i._hasListeners(Li)&&i._emit(Li,e.items.slice(0))}};if(!t.length)return d(),this;for(this._isLayoutFinished=!1,c=0;c<t.length&&this._layout.id===e.id;c++)t[c]._layout.start(r===!0,d);return this._layout.id===e.id&&(t.length=0),this}}}}(),D.prototype._setItemsVisibility=function(t,e,i){var r=this,s=t.slice(0),n=i||{},o=n.instant===!0,a=n.onFinish,l=n.layout?n.layout:n.layout===void 0,h=s.length,c=e?Vs:$t,d=e?js:Us,y=e?"show":"hide",p=!1,g=[],u=[],_,b;if(!h){k(a)&&a(s);return}for(b=0;b<s.length;b++)_=s[b],(e&&!_._isActive||!e&&_._isActive)&&(p=!0),_._layout._skipNextAnimation=!!(e&&!_._isActive),e&&_._visibility._isHidden&&u.push(_),e?_._addToLayout():_._removeFromLayout();u.length&&(this.refreshItems(u,!0),u.length=0);function m(){for(p&&n.syncWithLayout!==!1&&r.off(vt,m),r._hasListeners(c)&&r._emit(c,s.slice(0)),b=0;b<s.length;b++){if(s[b]._gridId!==r._id){--h<1&&(k(a)&&a(g.slice(0)),r._hasListeners(d)&&r._emit(d,g.slice(0)));continue}s[b]._visibility[y](o,function(E,w){E||g.push(w),--h<1&&(k(a)&&a(g.slice(0)),r._hasListeners(d)&&r._emit(d,g.slice(0)))})}}p&&n.syncWithLayout!==!1?this.on(vt,m):m(),p&&l&&this.layout(l===Tt,k(l)?l:void 0)};function uo(t,e){var i=ne({},t);return e&&(i=ne(i,e)),e&&e.visibleStyles?i.visibleStyles=e.visibleStyles:t&&t.visibleStyles&&(i.visibleStyles=t.visibleStyles),e&&e.hiddenStyles?i.hiddenStyles=e.hiddenStyles:t&&t.hiddenStyles&&(i.hiddenStyles=t.hiddenStyles),i}function ne(t,e){var i=Object.keys(e),r=i.length,s,n,o;for(o=0;o<r;o++){if(n=i[o],s=Hr(e[n]),Hr(t[n])&&s){t[n]=ne(ne({},t[n]),e[n]);continue}if(s){t[n]=ne({},e[n]);continue}if(Array.isArray(e[n])){t[n]=e[n].slice(0);continue}t[n]=e[n]}return t}function fo(t,e){if(e==="*")return t.children;if(typeof e===ke){for(var i=[],r=t.children,s=0;s<r.length;s++)xe(r[s],e)&&i.push(r[s]);return i}return Array.isArray(e)||hi(e)?e:[]}function _o(t,e){typeof e!==qr&&(e=e===!0?0:-1),e>=0&&(t._resizeHandler=ro(function(){t.refreshItems().layout()},e),window.addEventListener("resize",t._resizeHandler))}function po(t){t._resizeHandler&&(t._resizeHandler(!0),window.removeEventListener("resize",t._resizeHandler),t._resizeHandler=null)}function Vr(t){var e={},i=document.documentElement.style,r,s;for(r in t)t[r]&&(s=me(i,r),s&&(e[s]=t[r]));return e}function jr(t){for(var e={},i=0;i<t.length;i++)e[t[i]._id]=i;return e}function Ie(t,e,i){var r=t[e._id],s=t[i._id];return r-s}var mo=Object.defineProperty,go=(t,e,i)=>e in t?mo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,vo=(t,e,i)=>go(t,e+"",i);function Ur(t,e){return function(){return t.apply(e,arguments)}}const{toString:yo}=Object.prototype,{getPrototypeOf:ui}=Object,Oe=(t=>e=>{const i=yo.call(e);return t[i]||(t[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),ot=t=>(t=t.toLowerCase(),e=>Oe(e)===t),Le=t=>e=>typeof e===t,{isArray:jt}=Array,oe=Le("undefined");function So(t){return t!==null&&!oe(t)&&t.constructor!==null&&!oe(t.constructor)&&tt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const zr=ot("ArrayBuffer");function bo(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&zr(t.buffer),e}const wo=Le("string"),tt=Le("function"),Wr=Le("number"),Pe=t=>t!==null&&typeof t=="object",Eo=t=>t===!0||t===!1,Ne=t=>{if(Oe(t)!=="object")return!1;const e=ui(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},To=ot("Date"),xo=ot("File"),Do=ot("Blob"),Ao=ot("FileList"),Ro=t=>Pe(t)&&tt(t.pipe),Co=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||tt(t.append)&&((e=Oe(t))==="formdata"||e==="object"&&tt(t.toString)&&t.toString()==="[object FormData]"))},ko=ot("URLSearchParams"),[Io,Oo,Lo,Po]=["ReadableStream","Request","Response","Headers"].map(ot),No=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ae(t,e,{allOwnKeys:i=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),jt(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const n=i?Object.getOwnPropertyNames(t):Object.keys(t),o=n.length;let a;for(r=0;r<o;r++)a=n[r],e.call(null,t[a],a,t)}}function $r(t,e){e=e.toLowerCase();const i=Object.keys(t);let r=i.length,s;for(;r-- >0;)if(s=i[r],e===s.toLowerCase())return s;return null}const Pt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Kr=t=>!oe(t)&&t!==Pt;function di(){const{caseless:t}=Kr(this)&&this||{},e={},i=(r,s)=>{const n=t&&$r(e,s)||s;Ne(e[n])&&Ne(r)?e[n]=di(e[n],r):Ne(r)?e[n]=di({},r):jt(r)?e[n]=r.slice():e[n]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ae(arguments[r],i);return e}const Mo=(t,e,i,{allOwnKeys:r}={})=>(ae(e,(s,n)=>{i&&tt(s)?t[n]=Ur(s,i):t[n]=s},{allOwnKeys:r}),t),Xo=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Bo=(t,e,i,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),i&&Object.assign(t.prototype,i)},Yo=(t,e,i,r)=>{let s,n,o;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),n=s.length;n-- >0;)o=s[n],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=i!==!1&&ui(t)}while(t&&(!i||i(t,e))&&t!==Object.prototype);return e},Go=(t,e,i)=>{t=String(t),(i===void 0||i>t.length)&&(i=t.length),i-=e.length;const r=t.indexOf(e,i);return r!==-1&&r===i},Fo=t=>{if(!t)return null;if(jt(t))return t;let e=t.length;if(!Wr(e))return null;const i=new Array(e);for(;e-- >0;)i[e]=t[e];return i},Ho=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ui(Uint8Array)),qo=(t,e)=>{const i=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=i.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},Vo=(t,e)=>{let i;const r=[];for(;(i=t.exec(e))!==null;)r.push(i);return r},jo=ot("HTMLFormElement"),Uo=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,i,r){return i.toUpperCase()+r}),Jr=(({hasOwnProperty:t})=>(e,i)=>t.call(e,i))(Object.prototype),zo=ot("RegExp"),Zr=(t,e)=>{const i=Object.getOwnPropertyDescriptors(t),r={};ae(i,(s,n)=>{let o;(o=e(s,n,t))!==!1&&(r[n]=o||s)}),Object.defineProperties(t,r)},Wo=t=>{Zr(t,(e,i)=>{if(tt(t)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const r=t[i];if(tt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},$o=(t,e)=>{const i={},r=s=>{s.forEach(n=>{i[n]=!0})};return jt(t)?r(t):r(String(t).split(e)),i},Ko=()=>{},Jo=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,fi="abcdefghijklmnopqrstuvwxyz",Qr="0123456789",ts={DIGIT:Qr,ALPHA:fi,ALPHA_DIGIT:fi+fi.toUpperCase()+Qr},Zo=(t=16,e=ts.ALPHA_DIGIT)=>{let i="";const{length:r}=e;for(;t--;)i+=e[Math.random()*r|0];return i};function Qo(t){return!!(t&&tt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const ta=t=>{const e=new Array(10),i=(r,s)=>{if(Pe(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const n=jt(r)?[]:{};return ae(r,(o,a)=>{const l=i(o,s+1);!oe(l)&&(n[a]=l)}),e[s]=void 0,n}}return r};return i(t,0)},ea=ot("AsyncFunction"),ia=t=>t&&(Pe(t)||tt(t))&&tt(t.then)&&tt(t.catch),es=((t,e)=>t?setImmediate:e?((i,r)=>(Pt.addEventListener("message",({source:s,data:n})=>{s===Pt&&n===i&&r.length&&r.shift()()},!1),s=>{r.push(s),Pt.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",tt(Pt.postMessage)),ra=typeof queueMicrotask<"u"?queueMicrotask.bind(Pt):typeof process<"u"&&process.nextTick||es,f={isArray:jt,isArrayBuffer:zr,isBuffer:So,isFormData:Co,isArrayBufferView:bo,isString:wo,isNumber:Wr,isBoolean:Eo,isObject:Pe,isPlainObject:Ne,isReadableStream:Io,isRequest:Oo,isResponse:Lo,isHeaders:Po,isUndefined:oe,isDate:To,isFile:xo,isBlob:Do,isRegExp:zo,isFunction:tt,isStream:Ro,isURLSearchParams:ko,isTypedArray:Ho,isFileList:Ao,forEach:ae,merge:di,extend:Mo,trim:No,stripBOM:Xo,inherits:Bo,toFlatObject:Yo,kindOf:Oe,kindOfTest:ot,endsWith:Go,toArray:Fo,forEachEntry:qo,matchAll:Vo,isHTMLForm:jo,hasOwnProperty:Jr,hasOwnProp:Jr,reduceDescriptors:Zr,freezeMethods:Wo,toObjectSet:$o,toCamelCase:Uo,noop:Ko,toFiniteNumber:Jo,findKey:$r,global:Pt,isContextDefined:Kr,ALPHABET:ts,generateString:Zo,isSpecCompliantForm:Qo,toJSONObject:ta,isAsyncFn:ea,isThenable:ia,setImmediate:es,asap:ra};function R(t,e,i,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),i&&(this.config=i),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}f.inherits(R,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:f.toJSONObject(this.config),code:this.code,status:this.status}}});const is=R.prototype,rs={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{rs[t]={value:t}}),Object.defineProperties(R,rs),Object.defineProperty(is,"isAxiosError",{value:!0}),R.from=(t,e,i,r,s,n)=>{const o=Object.create(is);return f.toFlatObject(t,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),R.call(o,t.message,e,i,r,s),o.cause=t,o.name=t.name,n&&Object.assign(o,n),o};const sa=null;function _i(t){return f.isPlainObject(t)||f.isArray(t)}function ss(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function ns(t,e,i){return t?t.concat(e).map(function(r,s){return r=ss(r),!i&&s?"["+r+"]":r}).join(i?".":""):e}function na(t){return f.isArray(t)&&!t.some(_i)}const oa=f.toFlatObject(f,{},null,function(t){return/^is[A-Z]/.test(t)});function Me(t,e,i){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,i=f.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,g){return!f.isUndefined(g[p])});const r=i.metaTokens,s=i.visitor||h,n=i.dots,o=i.indexes,a=(i.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(s))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(f.isDate(p))return p.toISOString();if(!a&&f.isBlob(p))throw new R("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(p)||f.isTypedArray(p)?a&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function h(p,g,u){let _=p;if(p&&!u&&typeof p=="object"){if(f.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(f.isArray(p)&&na(p)||(f.isFileList(p)||f.endsWith(g,"[]"))&&(_=f.toArray(p)))return g=ss(g),_.forEach(function(b,m){!(f.isUndefined(b)||b===null)&&e.append(o===!0?ns([g],m,n):o===null?g:g+"[]",l(b))}),!1}return _i(p)?!0:(e.append(ns(u,g,n),l(p)),!1)}const c=[],d=Object.assign(oa,{defaultVisitor:h,convertValue:l,isVisitable:_i});function y(p,g){if(!f.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));c.push(p),f.forEach(p,function(u,_){(!(f.isUndefined(u)||u===null)&&s.call(e,u,f.isString(_)?_.trim():_,g,d))===!0&&y(u,g?g.concat(_):[_])}),c.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return y(t),e}function os(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function pi(t,e){this._pairs=[],t&&Me(t,this,e)}const as=pi.prototype;as.append=function(t,e){this._pairs.push([t,e])},as.toString=function(t){const e=t?function(i){return t.call(this,i,os)}:os;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function aa(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ls(t,e,i){if(!e)return t;const r=i&&i.encode||aa;f.isFunction(i)&&(i={serialize:i});const s=i&&i.serialize;let n;if(s?n=s(e,i):n=f.isURLSearchParams(e)?e.toString():new pi(e,i).toString(r),n){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+n}return t}class hs{constructor(){this.handlers=[]}use(e,i,r){return this.handlers.push({fulfilled:e,rejected:i,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(i){i!==null&&e(i)})}}const cs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},la=typeof URLSearchParams<"u"?URLSearchParams:pi,ha=typeof FormData<"u"?FormData:null,ca=typeof Blob<"u"?Blob:null,ua={isBrowser:!0,classes:{URLSearchParams:la,FormData:ha,Blob:ca},protocols:["http","https","file","blob","url","data"]},mi=typeof window<"u"&&typeof document<"u",gi=typeof navigator=="object"&&navigator||void 0,da=mi&&(!gi||["ReactNative","NativeScript","NS"].indexOf(gi.product)<0),fa=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_a=mi&&window.location.href||"http://localhost",pa=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mi,hasStandardBrowserEnv:da,hasStandardBrowserWebWorkerEnv:fa,navigator:gi,origin:_a},Symbol.toStringTag,{value:"Module"})),K={...pa,...ua};function ma(t,e){return Me(t,new K.classes.URLSearchParams,Object.assign({visitor:function(i,r,s,n){return K.isNode&&f.isBuffer(i)?(this.append(r,i.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}function ga(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function va(t){const e={},i=Object.keys(t);let r;const s=i.length;let n;for(r=0;r<s;r++)n=i[r],e[n]=t[n];return e}function us(t){function e(i,r,s,n){let o=i[n++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=n>=i.length;return o=!o&&f.isArray(s)?s.length:o,l?(f.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!f.isObject(s[o]))&&(s[o]=[]),e(i,r,s[o],n)&&f.isArray(s[o])&&(s[o]=va(s[o])),!a)}if(f.isFormData(t)&&f.isFunction(t.entries)){const i={};return f.forEachEntry(t,(r,s)=>{e(ga(r),s,i,0)}),i}return null}function ya(t,e,i){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const le={transitional:cs,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const i=e.getContentType()||"",r=i.indexOf("application/json")>-1,s=f.isObject(t);if(s&&f.isHTMLForm(t)&&(t=new FormData(t)),f.isFormData(t))return r?JSON.stringify(us(t)):t;if(f.isArrayBuffer(t)||f.isBuffer(t)||f.isStream(t)||f.isFile(t)||f.isBlob(t)||f.isReadableStream(t))return t;if(f.isArrayBufferView(t))return t.buffer;if(f.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let n;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return ma(t,this.formSerializer).toString();if((n=f.isFileList(t))||i.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Me(n?{"files[]":t}:t,o&&new o,this.formSerializer)}}return s||r?(e.setContentType("application/json",!1),ya(t)):t}],transformResponse:[function(t){const e=this.transitional||le.transitional,i=e&&e.forcedJSONParsing,r=this.responseType==="json";if(f.isResponse(t)||f.isReadableStream(t))return t;if(t&&f.isString(t)&&(i&&!this.responseType||r)){const s=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(n){if(s)throw n.name==="SyntaxError"?R.from(n,R.ERR_BAD_RESPONSE,this,null,this.response):n}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:K.classes.FormData,Blob:K.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{le.headers[t]={}});const Sa=f.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"]),ba=t=>{const e={};let i,r,s;return t&&t.split(`
22
+ `).forEach(function(n){s=n.indexOf(":"),i=n.substring(0,s).trim().toLowerCase(),r=n.substring(s+1).trim(),!(!i||e[i]&&Sa[i])&&(i==="set-cookie"?e[i]?e[i].push(r):e[i]=[r]:e[i]=e[i]?e[i]+", "+r:r)}),e},ds=Symbol("internals");function he(t){return t&&String(t).trim().toLowerCase()}function Xe(t){return t===!1||t==null?t:f.isArray(t)?t.map(Xe):String(t)}function wa(t){const e=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=i.exec(t);)e[r[1]]=r[2];return e}const Ea=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function vi(t,e,i,r,s){if(f.isFunction(r))return r.call(this,e,i);if(s&&(e=i),!!f.isString(e)){if(f.isString(r))return e.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(e)}}function Ta(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,i,r)=>i.toUpperCase()+r)}function xa(t,e){const i=f.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+i,{value:function(s,n,o){return this[r].call(this,e,s,n,o)},configurable:!0})})}class Z{constructor(e){e&&this.set(e)}set(e,i,r){const s=this;function n(a,l,h){const c=he(l);if(!c)throw new Error("header name must be a non-empty string");const d=f.findKey(s,c);(!d||s[d]===void 0||h===!0||h===void 0&&s[d]!==!1)&&(s[d||l]=Xe(a))}const o=(a,l)=>f.forEach(a,(h,c)=>n(h,c,l));if(f.isPlainObject(e)||e instanceof this.constructor)o(e,i);else if(f.isString(e)&&(e=e.trim())&&!Ea(e))o(ba(e),i);else if(f.isHeaders(e))for(const[a,l]of e.entries())n(l,a,r);else e!=null&&n(i,e,r);return this}get(e,i){if(e=he(e),e){const r=f.findKey(this,e);if(r){const s=this[r];if(!i)return s;if(i===!0)return wa(s);if(f.isFunction(i))return i.call(this,s,r);if(f.isRegExp(i))return i.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,i){if(e=he(e),e){const r=f.findKey(this,e);return!!(r&&this[r]!==void 0&&(!i||vi(this,this[r],r,i)))}return!1}delete(e,i){const r=this;let s=!1;function n(o){if(o=he(o),o){const a=f.findKey(r,o);a&&(!i||vi(r,r[a],a,i))&&(delete r[a],s=!0)}}return f.isArray(e)?e.forEach(n):n(e),s}clear(e){const i=Object.keys(this);let r=i.length,s=!1;for(;r--;){const n=i[r];(!e||vi(this,this[n],n,e,!0))&&(delete this[n],s=!0)}return s}normalize(e){const i=this,r={};return f.forEach(this,(s,n)=>{const o=f.findKey(r,n);if(o){i[o]=Xe(s),delete i[n];return}const a=e?Ta(n):String(n).trim();a!==n&&delete i[n],i[a]=Xe(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const i=Object.create(null);return f.forEach(this,(r,s)=>{r!=null&&r!==!1&&(i[s]=e&&f.isArray(r)?r.join(", "):r)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,i])=>e+": "+i).join(`
23
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...i){const r=new this(e);return i.forEach(s=>r.set(s)),r}static accessor(e){const i=(this[ds]=this[ds]={accessors:{}}).accessors,r=this.prototype;function s(n){const o=he(n);i[o]||(xa(r,n),i[o]=!0)}return f.isArray(e)?e.forEach(s):s(e),this}}Z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),f.reduceDescriptors(Z.prototype,({value:t},e)=>{let i=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[i]=r}}}),f.freezeMethods(Z);function yi(t,e){const i=this||le,r=e||i,s=Z.from(r.headers);let n=r.data;return f.forEach(t,function(o){n=o.call(i,n,s.normalize(),e?e.status:void 0)}),s.normalize(),n}function fs(t){return!!(t&&t.__CANCEL__)}function Ut(t,e,i){R.call(this,t??"canceled",R.ERR_CANCELED,e,i),this.name="CanceledError"}f.inherits(Ut,R,{__CANCEL__:!0});function _s(t,e,i){const r=i.config.validateStatus;!i.status||!r||r(i.status)?t(i):e(new R("Request failed with status code "+i.status,[R.ERR_BAD_REQUEST,R.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function Da(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Aa(t,e){t=t||10;const i=new Array(t),r=new Array(t);let s=0,n=0,o;return e=e!==void 0?e:1e3,function(a){const l=Date.now(),h=r[n];o||(o=l),i[s]=a,r[s]=l;let c=n,d=0;for(;c!==s;)d+=i[c++],c=c%t;if(s=(s+1)%t,s===n&&(n=(n+1)%t),l-o<e)return;const y=h&&l-h;return y?Math.round(d*1e3/y):void 0}}function Ra(t,e){let i=0,r=1e3/e,s,n;const o=(a,l=Date.now())=>{i=l,s=null,n&&(clearTimeout(n),n=null),t.apply(null,a)};return[(...a)=>{const l=Date.now(),h=l-i;h>=r?o(a,l):(s=a,n||(n=setTimeout(()=>{n=null,o(s)},r-h)))},()=>s&&o(s)]}const Be=(t,e,i=3)=>{let r=0;const s=Aa(50,250);return Ra(n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,l=o-r,h=s(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:h||void 0,estimated:h&&a&&c?(a-o)/h:void 0,event:n,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},i)},ps=(t,e)=>{const i=t!=null;return[r=>e[0]({lengthComputable:i,total:t,loaded:r}),e[1]]},ms=t=>(...e)=>f.asap(()=>t(...e)),Ca=K.hasStandardBrowserEnv?((t,e)=>i=>(i=new URL(i,K.origin),t.protocol===i.protocol&&t.host===i.host&&(e||t.port===i.port)))(new URL(K.origin),K.navigator&&/(msie|trident)/i.test(K.navigator.userAgent)):()=>!0,ka=K.hasStandardBrowserEnv?{write(t,e,i,r,s,n){const o=[t+"="+encodeURIComponent(e)];f.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),f.isString(r)&&o.push("path="+r),f.isString(s)&&o.push("domain="+s),n===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ia(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Oa(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function gs(t,e){return t&&!Ia(e)?Oa(t,e):e}const vs=t=>t instanceof Z?{...t}:t;function Nt(t,e){e=e||{};const i={};function r(h,c,d,y){return f.isPlainObject(h)&&f.isPlainObject(c)?f.merge.call({caseless:y},h,c):f.isPlainObject(c)?f.merge({},c):f.isArray(c)?c.slice():c}function s(h,c,d,y){if(f.isUndefined(c)){if(!f.isUndefined(h))return r(void 0,h,d,y)}else return r(h,c,d,y)}function n(h,c){if(!f.isUndefined(c))return r(void 0,c)}function o(h,c){if(f.isUndefined(c)){if(!f.isUndefined(h))return r(void 0,h)}else return r(void 0,c)}function a(h,c,d){if(d in e)return r(h,c);if(d in t)return r(void 0,h)}const l={url:n,method:n,data:n,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:(h,c,d)=>s(vs(h),vs(c),d,!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(h){const c=l[h]||s,d=c(t[h],e[h],h);f.isUndefined(d)&&c!==a||(i[h]=d)}),i}const ys=t=>{const e=Nt({},t);let{data:i,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:n,headers:o,auth:a}=e;e.headers=o=Z.from(o),e.url=ls(gs(e.baseURL,e.url),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(f.isFormData(i)){if(K.hasStandardBrowserEnv||K.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[h,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...c].join("; "))}}if(K.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(e)),r||r!==!1&&Ca(e.url))){const h=s&&n&&ka.read(n);h&&o.set(s,h)}return e},La=typeof XMLHttpRequest<"u",Pa=La&&function(t){return new Promise(function(e,i){const r=ys(t);let s=r.data;const n=Z.from(r.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:l}=r,h,c,d,y,p;function g(){y&&y(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function _(){if(!u)return;const m=Z.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!o||o==="text"||o==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:m,config:t,request:u};_s(function(w){e(w),g()},function(w){i(w),g()},E),u=null}"onloadend"in u?u.onloadend=_:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(_)},u.onabort=function(){u&&(i(new R("Request aborted",R.ECONNABORTED,t,u)),u=null)},u.onerror=function(){i(new R("Network Error",R.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let m=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||cs;r.timeoutErrorMessage&&(m=r.timeoutErrorMessage),i(new R(m,E.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,t,u)),u=null},s===void 0&&n.setContentType(null),"setRequestHeader"in u&&f.forEach(n.toJSON(),function(m,E){u.setRequestHeader(E,m)}),f.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),o&&o!=="json"&&(u.responseType=r.responseType),l&&([d,p]=Be(l,!0),u.addEventListener("progress",d)),a&&u.upload&&([c,y]=Be(a),u.upload.addEventListener("progress",c),u.upload.addEventListener("loadend",y)),(r.cancelToken||r.signal)&&(h=m=>{u&&(i(!m||m.type?new Ut(null,t,u):m),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const b=Da(r.url);if(b&&K.protocols.indexOf(b)===-1){i(new R("Unsupported protocol "+b+":",R.ERR_BAD_REQUEST,t));return}u.send(s||null)})},Na=(t,e)=>{const{length:i}=t=t?t.filter(Boolean):[];if(e||i){let r=new AbortController,s;const n=function(h){if(!s){s=!0,a();const c=h instanceof Error?h:this.reason;r.abort(c instanceof R?c:new Ut(c instanceof Error?c.message:c))}};let o=e&&setTimeout(()=>{o=null,n(new R(`timeout ${e} of ms exceeded`,R.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(h=>{h.unsubscribe?h.unsubscribe(n):h.removeEventListener("abort",n)}),t=null)};t.forEach(h=>h.addEventListener("abort",n));const{signal:l}=r;return l.unsubscribe=()=>f.asap(a),l}},Ma=function*(t,e){let i=t.byteLength;if(i<e){yield t;return}let r=0,s;for(;r<i;)s=r+e,yield t.slice(r,s),r=s},Xa=async function*(t,e){for await(const i of Ba(t))yield*Ma(i,e)},Ba=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:i,value:r}=await e.read();if(i)break;yield r}}finally{await e.cancel()}},Ss=(t,e,i,r)=>{const s=Xa(t,e);let n=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:h,value:c}=await s.next();if(h){a(),l.close();return}let d=c.byteLength;if(i){let y=n+=d;i(y)}l.enqueue(new Uint8Array(c))}catch(h){throw a(h),h}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},Ye=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",bs=Ye&&typeof ReadableStream=="function",Ya=Ye&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ws=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Ga=bs&&ws(()=>{let t=!1;const e=new Request(K.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Es=64*1024,Si=bs&&ws(()=>f.isReadableStream(new Response("").body)),Ge={stream:Si&&(t=>t.body)};Ye&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ge[e]&&(Ge[e]=f.isFunction(t[e])?i=>i[e]():(i,r)=>{throw new R(`Response type '${e}' is not supported`,R.ERR_NOT_SUPPORT,r)})})})(new Response);const Fa=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request(K.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await Ya(t)).byteLength},Ha=async(t,e)=>f.toFiniteNumber(t.getContentLength())??Fa(e),qa=Ye&&(async t=>{let{url:e,method:i,data:r,signal:s,cancelToken:n,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:h,headers:c,withCredentials:d="same-origin",fetchOptions:y}=ys(t);h=h?(h+"").toLowerCase():"text";let p=Na([s,n&&n.toAbortSignal()],o),g;const u=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let _;try{if(l&&Ga&&i!=="get"&&i!=="head"&&(_=await Ha(c,r))!==0){let S=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if(f.isFormData(r)&&(x=S.headers.get("content-type"))&&c.setContentType(x),S.body){const[N,B]=ps(_,Be(ms(l)));r=Ss(S.body,Es,N,B)}}f.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;g=new Request(e,{...y,signal:p,method:i.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let m=await fetch(g);const E=Si&&(h==="stream"||h==="response");if(Si&&(a||E&&u)){const S={};["status","statusText","headers"].forEach(O=>{S[O]=m[O]});const x=f.toFiniteNumber(m.headers.get("content-length")),[N,B]=a&&ps(x,Be(ms(a),!0))||[];m=new Response(Ss(m.body,Es,N,()=>{B&&B(),u&&u()}),S)}h=h||"text";let w=await Ge[f.findKey(Ge,h)||"text"](m,t);return!E&&u&&u(),await new Promise((S,x)=>{_s(S,x,{data:w,headers:Z.from(m.headers),status:m.status,statusText:m.statusText,config:t,request:g})})}catch(b){throw u&&u(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new R("Network Error",R.ERR_NETWORK,t,g),{cause:b.cause||b}):R.from(b,b&&b.code,t,g)}}),bi={http:sa,xhr:Pa,fetch:qa};f.forEach(bi,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ts=t=>`- ${t}`,Va=t=>f.isFunction(t)||t===null||t===!1,xs={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let i,r;const s={};for(let n=0;n<e;n++){i=t[n];let o;if(r=i,!Va(i)&&(r=bi[(o=String(i)).toLowerCase()],r===void 0))throw new R(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+n]=r}if(!r){const n=Object.entries(s).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?n.length>1?`since :
24
+ `+n.map(Ts).join(`
25
+ `):" "+Ts(n[0]):"as no adapter specified";throw new R("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:bi};function wi(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ut(null,t)}function Ds(t){return wi(t),t.headers=Z.from(t.headers),t.data=yi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),xs.getAdapter(t.adapter||le.adapter)(t).then(function(e){return wi(t),e.data=yi.call(t,t.transformResponse,e),e.headers=Z.from(e.headers),e},function(e){return fs(e)||(wi(t),e&&e.response&&(e.response.data=yi.call(t,t.transformResponse,e.response),e.response.headers=Z.from(e.response.headers))),Promise.reject(e)})}const As="1.7.9",Fe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Fe[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const Rs={};Fe.transitional=function(t,e,i){function r(s,n){return"[Axios v"+As+"] Transitional option '"+s+"'"+n+(i?". "+i:"")}return(s,n,o)=>{if(t===!1)throw new R(r(n," has been removed"+(e?" in "+e:"")),R.ERR_DEPRECATED);return e&&!Rs[n]&&(Rs[n]=!0,console.warn(r(n," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(s,n,o):!0}},Fe.spelling=function(t){return(e,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function ja(t,e,i){if(typeof t!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const n=r[s],o=e[n];if(o){const a=t[n],l=a===void 0||o(a,n,t);if(l!==!0)throw new R("option "+n+" must be "+l,R.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new R("Unknown option "+n,R.ERR_BAD_OPTION)}}const He={assertOptions:ja,validators:Fe},ut=He.validators;class Mt{constructor(e){this.defaults=e,this.interceptors={request:new hs,response:new hs}}async request(e,i){try{return await this._request(e,i)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const n=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?n&&!String(r.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(r.stack+=`
26
+ `+n):r.stack=n}catch{}}throw r}}_request(e,i){typeof e=="string"?(i=i||{},i.url=e):i=e||{},i=Nt(this.defaults,i);const{transitional:r,paramsSerializer:s,headers:n}=i;r!==void 0&&He.assertOptions(r,{silentJSONParsing:ut.transitional(ut.boolean),forcedJSONParsing:ut.transitional(ut.boolean),clarifyTimeoutError:ut.transitional(ut.boolean)},!1),s!=null&&(f.isFunction(s)?i.paramsSerializer={serialize:s}:He.assertOptions(s,{encode:ut.function,serialize:ut.function},!0)),He.assertOptions(i,{baseUrl:ut.spelling("baseURL"),withXsrfToken:ut.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let o=n&&f.merge(n.common,n[i.method]);n&&f.forEach(["delete","get","head","post","put","patch","common"],g=>{delete n[g]}),i.headers=Z.concat(o,n);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(i)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const h=[];this.interceptors.response.forEach(function(g){h.push(g.fulfilled,g.rejected)});let c,d=0,y;if(!l){const g=[Ds.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,h),y=g.length,c=Promise.resolve(i);d<y;)c=c.then(g[d++],g[d++]);return c}y=a.length;let p=i;for(d=0;d<y;){const g=a[d++],u=a[d++];try{p=g(p)}catch(_){u.call(this,_);break}}try{c=Ds.call(this,p)}catch(g){return Promise.reject(g)}for(d=0,y=h.length;d<y;)c=c.then(h[d++],h[d++]);return c}getUri(e){e=Nt(this.defaults,e);const i=gs(e.baseURL,e.url);return ls(i,e.params,e.paramsSerializer)}}f.forEach(["delete","get","head","options"],function(t){Mt.prototype[t]=function(e,i){return this.request(Nt(i||{},{method:t,url:e,data:(i||{}).data}))}}),f.forEach(["post","put","patch"],function(t){function e(i){return function(r,s,n){return this.request(Nt(n||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}Mt.prototype[t]=e(),Mt.prototype[t+"Form"]=e(!0)});class Ei{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(s){i=s});const r=this;this.promise.then(s=>{if(!r._listeners)return;let n=r._listeners.length;for(;n-- >0;)r._listeners[n](s);r._listeners=null}),this.promise.then=s=>{let n;const o=new Promise(a=>{r.subscribe(a),n=a}).then(s);return o.cancel=function(){r.unsubscribe(n)},o},e(function(s,n,o){r.reason||(r.reason=new Ut(s,n,o),i(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const i=this._listeners.indexOf(e);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const e=new AbortController,i=r=>{e.abort(r)};return this.subscribe(i),e.signal.unsubscribe=()=>this.unsubscribe(i),e.signal}static source(){let e;return{token:new Ei(function(i){e=i}),cancel:e}}}function Ua(t){return function(e){return t.apply(null,e)}}function za(t){return f.isObject(t)&&t.isAxiosError===!0}const Ti={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(Ti).forEach(([t,e])=>{Ti[e]=t});function Cs(t){const e=new Mt(t),i=Ur(Mt.prototype.request,e);return f.extend(i,Mt.prototype,e,{allOwnKeys:!0}),f.extend(i,e,null,{allOwnKeys:!0}),i.create=function(r){return Cs(Nt(t,r))},i}const F=Cs(le);F.Axios=Mt,F.CanceledError=Ut,F.CancelToken=Ei,F.isCancel=fs,F.VERSION=As,F.toFormData=Me,F.AxiosError=R,F.Cancel=F.CanceledError,F.all=function(t){return Promise.all(t)},F.spread=Ua,F.isAxiosError=za,F.mergeConfig=Nt,F.AxiosHeaders=Z,F.formToJSON=t=>us(f.isHTMLForm(t)?new FormData(t):t),F.getAdapter=xs.getAdapter,F.HttpStatusCode=Ti,F.default=F;const ks=F.create({baseURL:location.origin,timeout:6e4,params:{}});ks.interceptors.response.use(t=>t,t=>{var e,i,r,s,n,o,a,l,h,c,d;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(g){g&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let y=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(y+=`${t.response.statusText} `),(r=(i=t.response)==null?void 0:i.config)!=null&&r.data&&(y+=`${t.response.config.data} `),(n=(s=t.response)==null?void 0:s.data)!=null&&n.message?y+=`${t.response.data.message}`:(a=(o=t.response)==null?void 0:o.data)!=null&&a.exception?y+=`${t.response.data.exception}`:(c=(h=(l=t.response)==null?void 0:l.data)==null?void 0:h.error)!=null&&c.message?(t.response.data.error.class&&(y+=`${t.response.data.error.class} `),y+=`${t.response.data.error.message}`):y+=`${(d=t.response)==null?void 0:d.data}`;const{$cosmosNotify:p}=window;throw p&&p.serious({title:"Network error",body:y}),t}else throw t});var Wa={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart",remote:"remote"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:nl,protocols:Is}=Wa;Is.slice(0,Is.length-1);class $a{constructor(){vo(this,"id",1)}async exec(e,i,r={},s={},n=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,s.manual=!0,(await ks.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:i,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...s},timeout:n})).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.name="Unknown error",a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,i){return this.exec("map_target_to_interface",[e,i])}connect_interface(e,...i){return i.length>0?this.exec("connect_interface",[e,...i]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,i,...r){return this.exec("interface_cmd",[e,i,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,i,r){return this.exec("get_item",[e,i,r])}get_param(e,i,r){return this.exec("get_param",[e,i,r])}get_parameter(e,i,r){return this.exec("get_param",[e,i,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,i){return this.exec("get_tlm",[e,i])}get_telemetry(e,i){return this.exec("get_tlm",[e,i])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,i=!1){return this.exec("get_all_tlm_names",[e],{hidden:i})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}async get_tlm_packet(e,i,r,s=30){const n=await this.exec("get_tlm_packet",[e,i],{type:r,stale_time:s});if(n!=null){let o=n.length,a=null;for(let l=0;l<o;l++)a=this.decode_openc3_type(n[l][1]),a!==null&&(n[l][1]=a)}return n}get_packet_derived_items(e,i){return this.exec("get_packet_derived_items",[e,i])}get_tlm_buffer(e,i){return this.exec("get_tlm_buffer",[e,i])}async get_tlm_values(e,i=30,r=null){let s={stale_time:i};r!==null&&(s.cache_timeout=r);const n=await this.exec("get_tlm_values",[e],s,{},1e4);let o=n[0].length,a=null;for(let l=0;l<o;l++)a=this.decode_openc3_type(n[0][l]),a!==null&&(n[0][l]=a);return n}get_limits(e,i,r){return this.exec("get_limits",[e,i,r])}async tlm(e,i,r,s="CONVERTED"){let n=null;if(i===void 0)n=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(i))n=await this.exec("tlm",[e],{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 n=await this.exec("tlm",[e,i,r],{type:s});let o=this.decode_openc3_type(n);return o!==null&&(n=o),n}async inject_tlm(e,i,r=null,s="CONVERTED"){data=await this.exec("inject_tlm",[e,i,r],{type:s})}set_tlm(e,i,r,s){return this.exec("set_tlm",[e,i,r],{type:s})}override_tlm(e,i,r,s){return this.exec("override_tlm",[e,i,r],{type:s})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,i,r,s){return this.exec("normalize_tlm",[e,i,r],{type:s})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,i=!1){return this.exec("get_all_cmd_names",[e],{hidden:i})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,i){return this.exec("get_cmd",[e,i])}get_command(e,i){return this.exec("get_cmd",[e,i])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,i,r,s="CONVERTED"){return this.exec("get_cmd_value",[e,i,r,s])}get_cmd_buffer(e,i){return this.exec("get_cmd_buffer",[e,i])}_cmd(e,i,r,s,n){let o=null;for(let a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o=this.encode_openc3_type(s[a]),o!==null&&(s[a]=o));return this.exec(e,[i,r,s],{},n)}get_cmd_hazardous(e,i,r,s={}){return i===void 0?this.exec("get_cmd_hazardous",e,{},s):this._cmd("get_cmd_hazardous",e,i,r,s)}cmd(e,i,r,s={}){return i===void 0?this.exec("cmd",e,{},s):this._cmd("cmd",e,i,r,s)}cmd_no_range_check(e,i,r,s={}){return i===void 0?this.exec("cmd_no_range_check",e,{},s):this._cmd("cmd_no_range_check",e,i,r,s)}cmd_raw(e,i,r,s={}){return i===void 0?this.exec("cmd_raw",e,{},s):this._cmd("cmd_raw",e,i,r,s)}cmd_raw_no_range_check(e,i,r,s={}){return i===void 0?this.exec("cmd_raw_no_range_check",e,{},s):this._cmd("cmd_raw_no_range_check",e,i,r,s)}cmd_no_hazardous_check(e,i,r,s={}){return i===void 0?this.exec("cmd_no_hazardous_check",e,{},s):this._cmd("cmd_no_hazardous_check",e,i,r,s)}cmd_no_checks(e,i,r,s={}){return i===void 0?this.exec("cmd_no_checks",e,{},s):this._cmd("cmd_no_checks",e,i,r,s)}cmd_raw_no_hazardous_check(e,i,r,s={}){return i===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},s):this._cmd("cmd_raw_no_hazardous_check",e,i,r,s)}cmd_raw_no_checks(e,i,r,s={}){return i===void 0?this.exec("cmd_raw_no_checks",e,{},s):this._cmd("cmd_raw_no_checks",e,i,r,s)}build_cmd(e,i,r){return i===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,i,r)}build_command(e,i,r){return i===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,i,r)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,i){return this.exec("send_raw",[e,i])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,i){return this.exec("load_config",[e,i])}save_config(e,i,r){return this.exec("save_config",[e,i,r])}delete_config(e,i){return this.exec("delete_config",[e,i])}enable_limits(e,i,r){return this.exec("enable_limits",[e,i,r])}disable_limits(e,i,r){return this.exec("disable_limits",[e,i,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,i){return this.exec("set_setting",[e,i])}save_setting(e,i){return this.exec("set_setting",[e,i])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const i=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",i),s=new Uint8Array(r);return Array.from(s).map(n=>n.toString(16).padStart(2,"0")).join("")}}}const Ka={props:{settings:{type:Object,required:!0}},data(){return{show:!1}}};function Ja(t,e,i,r,s,n){const o=I("v-spacer"),a=I("v-toolbar"),l=I("v-text-field"),h=I("v-row"),c=I("v-card-text"),d=I("v-card"),y=I("v-dialog");return X(),V(y,{modelValue:s.show,"onUpdate:modelValue":e[0]||(e[0]=p=>s.show=p),width:"600"},{default:C(()=>[A(a,{height:"24"},{default:C(()=>[A(o),e[1]||(e[1]=at("span",null,"TlmGrapher Settings",-1)),A(o)]),_:1}),A(d,{class:"pa-3"},{default:C(()=>[A(c,null,{default:C(()=>[(X(!0),it(gt,null,At(i.settings,p=>(X(),it("div",{key:p.title},[A(h,{class:"my-5"},{default:C(()=>[A(l,{"hide-details":"auto",type:"number",rules:p.rules,label:p.title,modelValue:p.value,"onUpdate:modelValue":g=>p.value=g,modelModifiers:{number:!0}},null,8,["rules","label","modelValue","onUpdate:modelValue"])]),_:2},1024)]))),128)),A(h,null,{default:C(()=>e[2]||(e[2]=[at("span",{class:"text-red"}," Increasing these values may cause issues ",-1)])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Za=je(Ka,[["render",Ja]]),qe=250,Qa={components:{Graph:Oi,OpenConfigDialog:Ai,SaveConfigDialog:Ri,SettingsDialog:Za,TargetPacketItemChooser:Ci,TopBar:Hs},mixins:[ki],data(){return{title:"Telemetry Grapher",configKey:"telemetry_grapher",showOpenConfig:!1,showSaveConfig:!1,showSettingsDialog:!1,api:null,timeZone:null,grid:null,panel:0,state:"stop",startTime:null,graphs:[0],selectedGraphId:0,counter:1,applyingConfig:!1,observer:null,menus:[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.showOpenConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.showSaveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.panel=0,this.closeAllGraphs(),this.resetConfigBase()}}]},{label:"Graph",items:[{label:"Add Graph",icon:"mdi-plus",command:()=>{this.addGraph()}},{divider:!0},{label:"Start / Resume",icon:"mdi-play",command:()=>{this.state="start"}},{label:"Pause",icon:"mdi-pause",command:()=>{this.state="pause"}},{label:"Stop",icon:"mdi-stop",command:()=>{this.state="stop"}},{divider:!0},{label:"Clear All Data",icon:"mdi-eraser",command:()=>{this.clearAllData()}},{label:"Settings",icon:"mdi-cog",command:()=>{this.showSettingsDialog=!0}}]}],settings:{secondsGraphed:{title:"Seconds Graphed",value:1e3,rules:[t=>!!t||"Required"]},pointsSaved:{title:"Points Saved",value:1e6,rules:[t=>!!t||"Required"]},pointsGraphed:{title:"Points Graphed",value:1e3,rules:[t=>!!t||"Required"]},refreshIntervalMs:{title:"Refresh Interval Ms",value:100,rules:[t=>!!t||"Required"]}}}},watch:{settings:{handler:function(){this.saveDefaultConfig(this.currentConfig)},deep:!0},panel:function(){this.resizeAll()}},computed:{currentConfig:function(){return{settings:{secondsGraphed:this.settings.secondsGraphed.value,pointsSaved:this.settings.pointsSaved.value,pointsGraphed:this.settings.pointsGraphed.value,refreshIntervalMs:this.settings.refreshIntervalMs.value},graphs:this.grid.getItems().map(t=>{const e=`graph${t.getElement().id.substring(8)}`,i=this.$refs[e][0];let r={items:i.items,title:i.title,fullWidth:i.fullWidth,fullHeight:i.fullHeight,graphMinX:i.graphMinX,graphMaxX:i.graphMaxX,legendPosition:i.legendPosition,lines:i.lines};return i.graphStartDateTime&&i.graphEndDateTime&&(r.graphStartDateTime=i.graphStartDateTime,r.graphEndDateTime=i.graphEndDateTime),r})}}},created(){this.api=new $a,this.api.get_setting("time_zone").then(t=>{t&&(this.timeZone=t)}).catch(t=>{})},mounted:function(){if(this.grid=new D(".grid",{dragEnabled:!0,layoutOnResize:!0,dragHandle:".v-toolbar"}),this.grid.on("move",function(e){e.item.getGrid().synchronize()}),this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else if(this.$route.params.target&&this.$route.params.packet&&this.$route.params.item)this.addItem({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase(),itemName:this.$route.params.item.toUpperCase(),valueType:"CONVERTED",reduced:"DECOM"});else{let e=this.loadDefaultConfig();JSON.stringify(e)!=="{}"&&this.applyConfig(e)}this.observer=new MutationObserver(()=>{this.resizeAll()});const t=document.getElementById("openc3-nav-drawer");this.observer.observe(t,{attributes:!0,attributeOldValue:!0,attributeFilter:["class"]})},beforeUnmount(){this.observer.disconnect()},methods:{resizeAll:function(){setTimeout(()=>{this.grid.getItems().map(t=>{const e=`graph${t.getElement().id.substring(8)}`;this.$refs[e][0].resize()}),this.resize()},qe)},graphSelected:function(t){this.selectedGraphId=t},addItem:function(t,e=!0){for(const i of this.$refs[`graph${this.selectedGraphId}`][0].items)if(t.targetName===i.targetName&&t.packetName===i.packetName&&t.itemName===i.itemName&&t.valueType===i.valueType&&t.reduced===i.reduced&&t.reducedType===i.reducedType){this.$notify.caution({title:"Item Already Exists",body:`Item ${t.targetName} ${t.packetName} ${t.itemName} with ${t.valueType} ${t.reduced} ${t.reducedType} already exists!`});return}this.$refs[`graph${this.selectedGraphId}`][0].addItems([t]),e===!0&&(this.state="start"),this.saveDefaultConfig(this.currentConfig)},addGraph:function(t=!0){const e=this.counter;let i=!1,r=!1;t&&this.graphs.length!=0&&(this.$refs[`graph${this.graphs[0]}`][0].fullWidth===!1&&(i=!0),this.$refs[`graph${this.graphs[0]}`][0].fullHeight===!1&&(r=!0)),this.graphs.push(e),this.counter+=1,this.$nextTick(function(){let s=this.grid.add(this.$refs[`gridItem${e}`],{active:!1});this.grid.show(s),this.selectedGraphId=e,i&&this.$refs[`graph${e}`][0].collapseWidth(),r&&this.$refs[`graph${e}`][0].collapseHeight(),setTimeout(()=>{this.grid.refreshItems().layout()},qe)}),this.saveDefaultConfig(this.currentConfig)},closeGraph:function(t){let e=this.grid.getItems([document.getElementById(`gridItem${t}`)]);this.grid.remove(e),this.graphs.splice(this.graphs.indexOf(t),1),this.graphs.length===0?(this.startTime=null,this.selectedGraphId=null):this.selectedGraphId=this.graphs[0],this.saveDefaultConfig(this.currentConfig)},closeAllGraphs:function(){for(let t of[...this.graphs])this.closeGraph(t);this.counter=0},clearAllData:function(){for(let t of this.graphs)this.$refs[`graph${t}`][0].clearAllData()},minMaxGraph:function(t){this.selectedGraphId=t,setTimeout(()=>{this.grid.refreshItems().layout()},qe*2),this.saveDefaultConfig(this.currentConfig)},resize:function(){const t=document.querySelectorAll(".u-legend");let e=0;t.forEach(i=>{i.style.height="",i.clientHeight>e&&(e=i.clientHeight)}),e!==0&&t.forEach(i=>{i.clientHeight!==e&&(i.style.height=`${e}px`)}),setTimeout(()=>{this.grid.refreshItems().layout()},qe*2)},graphStarted:function(t){this.startTime===null&&(this.startTime=t)},applyConfig:async function(t){this.timeZone===null&&await this.api.get_setting("time_zone").then(r=>{r&&(this.timeZone=r)}).catch(r=>{}),this.dontSaveDefaultConfig=!0,this.closeAllGraphs(),await this.$nextTick(),this.settings.secondsGraphed.value=t.settings.secondsGraphed,this.settings.pointsSaved.value=t.settings.pointsSaved,this.settings.pointsGraphed.value=t.settings.pointsGraphed,this.settings.refreshIntervalMs.value=t.settings.refreshIntervalMs;let e=t.graphs;for(let r of e)this.addGraph(!1);await this.$nextTick();const i=this;e.forEach(function(r,s){let n=i.$refs[`graph${s}`][0];n.title=r.title,n.fullWidth=r.fullWidth,n.fullHeight=r.fullHeight,n.graphMinX=r.graphMinX,n.graphMaxX=r.graphMaxX,n.graphStartDateTime=r.graphStartDateTime,n.graphEndDateTime=r.graphEndDateTime,n.moveLegend(r.legendPosition),n.addItems([...r.items]),n.lines=r.lines}),this.state="start",this.dontSaveDefaultConfig=!1},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,async i=>{await this.applyConfig(i),this.saveDefaultConfig(i)}),this.panel=null},saveConfiguration:function(t){this.saveConfigBase(t,this.currentConfig)}}},tl={class:"grid"},el=["id"],il={class:"item-content"};function rl(t,e,i,r,s,n){const o=I("top-bar"),a=I("v-expansion-panel-title"),l=I("v-spacer"),h=I("v-row"),c=I("target-packet-item-chooser"),d=I("v-col"),y=I("v-btn"),p=I("v-container"),g=I("v-expansion-panel-text"),u=I("v-expansion-panel"),_=I("v-expansion-panels"),b=I("graph"),m=I("open-config-dialog"),E=I("save-config-dialog"),w=I("settings-dialog");return X(),it("div",null,[A(o,{menus:s.menus,title:s.title},null,8,["menus","title"]),A(_,{modelValue:s.panel,"onUpdate:modelValue":e[2]||(e[2]=S=>s.panel=S),class:"expansion"},{default:C(()=>[A(u,null,{default:C(()=>[A(a,{style:{"z-index":"1"}}),A(g,null,{default:C(()=>[zt(at("div",null,[A(h,{class:"my-5"},{default:C(()=>[A(l),e[10]||(e[10]=at("span",null," Add a graph from the menu bar or select an existing graph to continue ",-1)),A(l)]),_:1})],512),[[Wt,this.selectedGraphId===null]]),zt(A(p,null,{default:C(()=>[A(c,{"initial-target-name":this.$route.params.target,"initial-packet-name":this.$route.params.packet,"initial-item-name":this.$route.params.item,onAddItem:n.addItem,"button-text":"Add Item","choose-item":"","select-types":""},null,8,["initial-target-name","initial-packet-name","initial-item-name","onAddItem"]),A(h,{class:"grapher-info"},{default:C(()=>[A(d,{style:{"max-width":"300px","pointer-events":"none"}}),A(d,{style:{"max-width":"300px","pointer-events":"none"}}),A(d,{style:{"max-width":"300px","pointer-events":"none"}}),A(d,{style:{"max-width":"140px"}},{default:C(()=>[zt(A(y,{class:"pulse",onClick:e[0]||(e[0]=()=>{s.state="start"}),color:"primary","data-test":"start-graph",icon:"mdi-play",size:"large"},null,512),[[Wt,s.state==="pause"]]),zt(A(y,{onClick:e[1]||(e[1]=()=>{s.state="pause"}),color:"primary","data-test":"pause-graph",icon:"mdi-pause",size:"large"},null,512),[[Wt,s.state==="start"]]),A(l)]),_:1})]),_:1})]),_:1},512),[[Wt,this.selectedGraphId!==null]])]),_:1})]),_:1})]),_:1},8,["modelValue"]),at("div",null,[at("div",tl,[(X(!0),it(gt,null,At(s.graphs,S=>(X(),it("div",{class:"item",key:S,id:`gridItem${S}`,ref_for:!0,ref:`gridItem${S}`},[at("div",il,[A(b,{ref_for:!0,ref:`graph${S}`,id:S,state:s.state,"start-time":s.startTime,"selected-graph-id":s.selectedGraphId,"seconds-graphed":s.settings.secondsGraphed.value,"points-saved":s.settings.pointsSaved.value,"points-graphed":s.settings.pointsGraphed.value,"refresh-interval-ms":s.settings.refreshIntervalMs.value,"time-zone":s.timeZone,onCloseGraph:()=>n.closeGraph(S),onMinMaxGraph:()=>n.minMaxGraph(S),onResize:e[3]||(e[3]=()=>n.resize()),onPause:e[4]||(e[4]=()=>s.state="pause"),onStart:e[5]||(e[5]=()=>s.state="start"),onClick:()=>n.graphSelected(S),onEdit:e[6]||(e[6]=x=>t.saveDefaultConfig(n.currentConfig)),onStarted:n.graphStarted},null,8,["id","state","start-time","selected-graph-id","seconds-graphed","points-saved","points-graphed","refresh-interval-ms","time-zone","onCloseGraph","onMinMaxGraph","onClick","onStarted"])])],8,el))),128))])]),s.showOpenConfig?(X(),V(m,{key:0,modelValue:s.showOpenConfig,"onUpdate:modelValue":e[7]||(e[7]=S=>s.showOpenConfig=S),configKey:s.configKey,onSuccess:n.openConfiguration},null,8,["modelValue","configKey","onSuccess"])):Ct("",!0),s.showSaveConfig?(X(),V(E,{key:1,modelValue:s.showSaveConfig,"onUpdate:modelValue":e[8]||(e[8]=S=>s.showSaveConfig=S),configKey:s.configKey,onSuccess:n.saveConfiguration},null,8,["modelValue","configKey","onSuccess"])):Ct("",!0),s.showSettingsDialog?(X(),V(w,{key:2,modelValue:s.showSettingsDialog,"onUpdate:modelValue":e[9]||(e[9]=S=>s.showSettingsDialog=S),settings:s.settings},null,8,["modelValue","settings"])):Ct("",!0)])}const ol=Xs("default",je(Qa,[["render",rl],["__scopeId","data-v-d641d4a2"]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./main-ca88b1aac639693ffb5d.js","./Widget-orNSvnOh-a98828cd439e9a94bd76.js"],function(S,T){"use strict";var _,w;return{setters:[h=>{_=h.P},h=>{w=h.o}],execute:function(){var h={},b;function x(){return b||(b=1,function(t){(function(){var s={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function c(n){return V(E(n),arguments)}function I(n,u){return c.apply(null,[n].concat(u||[]))}function V(n,u){var i=1,p=n.length,e,o="",l,a,r,m,g,y,v,d;for(l=0;l<p;l++)if(typeof n[l]=="string")o+=n[l];else if(typeof n[l]=="object"){if(r=n[l],r.keys)for(e=u[i],a=0;a<r.keys.length;a++){if(e==null)throw new Error(c('[sprintf] Cannot access property "%s" of undefined value "%s"',r.keys[a],r.keys[a-1]));e=e[r.keys[a]]}else r.param_no?e=u[r.param_no]:e=u[i++];if(s.not_type.test(r.type)&&s.not_primitive.test(r.type)&&e instanceof Function&&(e=e()),s.numeric_arg.test(r.type)&&typeof e!="number"&&isNaN(e))throw new TypeError(c("[sprintf] expecting number but found %T",e));switch(s.number.test(r.type)&&(v=e>=0),r.type){case"b":e=parseInt(e,10).toString(2);break;case"c":e=String.fromCharCode(parseInt(e,10));break;case"d":case"i":e=parseInt(e,10);break;case"j":e=JSON.stringify(e,null,r.width?parseInt(r.width):0);break;case"e":e=r.precision?parseFloat(e).toExponential(r.precision):parseFloat(e).toExponential();break;case"f":e=r.precision?parseFloat(e).toFixed(r.precision):parseFloat(e);break;case"g":e=r.precision?String(Number(e.toPrecision(r.precision))):parseFloat(e);break;case"o":e=(parseInt(e,10)>>>0).toString(8);break;case"s":e=String(e),e=r.precision?e.substring(0,r.precision):e;break;case"t":e=String(!!e),e=r.precision?e.substring(0,r.precision):e;break;case"T":e=Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),e=r.precision?e.substring(0,r.precision):e;break;case"u":e=parseInt(e,10)>>>0;break;case"v":e=e.valueOf(),e=r.precision?e.substring(0,r.precision):e;break;case"x":e=(parseInt(e,10)>>>0).toString(16);break;case"X":e=(parseInt(e,10)>>>0).toString(16).toUpperCase();break}s.json.test(r.type)?o+=e:(s.number.test(r.type)&&(!v||r.sign)?(d=v?"+":"-",e=e.toString().replace(s.sign,"")):d="",g=r.pad_char?r.pad_char==="0"?"0":r.pad_char.charAt(1):" ",y=r.width-(d+e).length,m=r.width&&y>0?g.repeat(y):"",o+=r.align?d+e+m:g==="0"?d+m+e:m+d+e)}return o}var f=Object.create(null);function E(n){if(f[n])return f[n];for(var u=n,i,p=[],e=0;u;){if((i=s.text.exec(u))!==null)p.push(i[0]);else if((i=s.modulo.exec(u))!==null)p.push("%");else if((i=s.placeholder.exec(u))!==null){if(i[2]){e|=1;var o=[],l=i[2],a=[];if((a=s.key.exec(l))!==null)for(o.push(a[1]);(l=l.substring(a[0].length))!=="";)if((a=s.key_access.exec(l))!==null)o.push(a[1]);else if((a=s.index_access.exec(l))!==null)o.push(a[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");i[2]=o}else e|=2;if(e===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");p.push({placeholder:i[0],param_no:i[1],keys:i[2],sign:i[3],pad_char:i[4],align:i[5],width:i[6],precision:i[7],type:i[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");u=u.substring(i[0].length)}return f[n]=p}t.sprintf=c,t.vsprintf=I,typeof window<"u"&&(window.sprintf=c,window.vsprintf=I)})()}(h)),h}x();const k={methods:{formatValueBase(t,s){return this.isJsonString(t)?this.formatJsonString(t):Array.isArray(t)?this.formatArray(t):this.isObject(t)?"":s&&t?sprintf(s,t):String(t)},isJsonString(t){return t&&t.json_class==="String"&&t.raw!==void 0},formatJsonString(t){let s=Array.from(t.raw.slice(0,32),c=>("0"+(c&255).toString(16)).slice(-2)).join(" ").toUpperCase();return t.raw.length>32&&(s+="..."),s},formatArray(t){return"["+t.map(s=>typeof s=="string"?`"${s}"`:s).join(", ")+"]"},isObject(t){return Object.prototype.toString.call(t).slice(8,-1)==="Object"}}},L=S("L",{mixins:[w,_,k],props:{value:{default:null},limitsState:{type:String,default:null},counter:{default:null},formatString:null,timeZone:{type:String,default:"local"}},emits:["addItem","deleteItem","open"],data(){return{appliedTimeZone:"local",curValue:null,prevValue:null,grayLevel:80,grayRate:5,valueId:null,arrayIndex:null,viewDetails:!1,contextMenuShown:!1,x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}},{title:"Graph",action:()=>{window.open("/tools/tlmgrapher/"+encodeURIComponent(this.parameters[0])+"/"+encodeURIComponent(this.parameters[1])+"/"+encodeURIComponent(this.parameters[2]),"_blank")}}]}},watch:{_counter:function(t,s){this.curValue!==this.prevValue?this.grayLevel=80:(this.grayLevel-=this.grayRate,this.grayLevel<30&&(this.grayLevel=30)),this.prevValue=this.curValue}},computed:{_value:function(){return this.curValue=this.value,this.curValue===null&&(this.screenValues?this.screenValues[this.valueId]&&(this.arrayIndex!==null&&this.screenValues[this.valueId][0]?this.curValue=this.screenValues[this.valueId][0][this.arrayIndex]:this.curValue=this.screenValues[this.valueId][0]):this.curValue=null),this.curValue=this.formatValue(this.curValue),this.curValue},_limitsState:function(){let t=this.limitsState;return t===null&&(this.screenValues?this.screenValues[this.valueId]&&(t=this.screenValues[this.valueId][1]):t=null),t},_counter:function(){let t=this.counter;return t===null&&(this.screenValues?this.screenValues[this.valueId]&&(t=this.screenValues[this.valueId][2]):t=null),t},valueClass:function(){return"value shrink pa-1 openc3-"+this.limitsColor},astroStatus(){switch(this.limitsColor){case"green":return"normal";case"yellow":return"caution";case"red":return"critical";case"blue":return"standby";default:return null}},limitsColor(){let t=this._limitsState;if(t!=null)switch(t){case"GREEN":case"GREEN_HIGH":case"GREEN_LOW":return"green";case"YELLOW":case"YELLOW_HIGH":case"YELLOW_LOW":return"yellow";case"RED":case"RED_HIGH":case"RED_LOW":return"red";case"BLUE":return"blue";case"STALE":return"purple";default:return"white"}return""},limitsLetter(){let t=this._limitsState;if(t!=null){let s=t.charAt(0);return t.endsWith("_LOW")&&(s=s.toLowerCase()),s}return""}},created(){if(this.value===null||this.limitsState===null){if(this.parameters[2].includes("[["))this.parameters[2]=this.parameters[2].replace("[[","[").replace("]]","]");else if(this.parameters[2].includes("[")){let t=this.parameters[2].match(/\[(\d+)\]/);this.arrayIndex=parseInt(t[1]),this.parameters[2]=this.parameters[2].replace(t[0],"")}this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.getType()}`,this.$emit("addItem",this.valueId),this.screenTimeZone?this.appliedTimeZone=this.screenTimeZone:this.appliedTimeZone=this.timeZone}},destroyed(){(this.value===null||this.limitsState===null)&&this.$emit("deleteItem",this.valueId)},methods:{getType(){let t="WITH_UNITS";return this.parameters[3]&&(t=this.parameters[3]),t},formatValue(t){return t&&this.valueId&&(this.valueId.includes("PACKET_TIMEFORMATTED")||this.valueId.includes("RECEIVED_TIMEFORMATTED"))?(t=t.replaceAll("/","-"),this.formatUtcToLocal(new Date(t),this.appliedTimeZone)):this.formatValueBase(t,this.formatString)},showContextMenu(t){t.preventDefault(),this.contextMenuShown=!1,this.x=t.clientX,this.y=t.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})}}})}}});
@@ -0,0 +1 @@
1
+ System.register(["./main-ca88b1aac639693ffb5d.js","vue","./DetailsDialog-EWjtBjle-c7397b128a1627131c19.js","./VWidget-Dmqf_jKM-f03d30579a2fe310f9fe.js","vue-router","vuex","vuetify","./Widget-orNSvnOh-a98828cd439e9a94bd76.js"],function(w,W){"use strict";var c,a,r,o,d,n,l,m,p,v,u,g,h,f,x,y,V,S;return{setters:[e=>{c=e.s},e=>{a=e.resolveComponent,r=e.openBlock,o=e.createElementBlock,d=e.normalizeStyle,n=e.createVNode,l=e.withCtx,m=e.mergeProps,p=e.createSlots,v=e.createElementVNode,u=e.toDisplayString,g=e.Fragment,h=e.renderList,f=e.createBlock,x=e.withModifiers,y=e.createTextVNode},e=>{V=e.P},e=>{S=e.L},null,null,null,null],execute:function(){const _={components:{DetailsDialog:V},mixins:[S],data:function(){return{width:16}},computed:{fullName(){return this.parameters[0]+" "+this.parameters[1]+" "+this.parameters[2]},aging(){return{"--aging":this.grayLevel}}},created(){this.verifyNumParams("VALUE",3,5,"VALUE <TARGET> <PACKET> <ITEM> <TYPE> <WIDTH>"),this.setWidth(parseInt(this.parameters[4])+4,"ch",this.width)}};function C(t,i,U,I,z,k){const E=a("rux-status"),D=a("v-text-field"),N=a("v-tooltip"),B=a("v-list-item-title"),L=a("v-list-item"),M=a("v-list"),T=a("v-menu"),j=a("details-dialog");return r(),o("div",{class:"value-widget-container",style:d([t.computedStyle,k.aging])},[n(N,{location:"top"},{activator:l(({props:s})=>[n(D,m({variant:"solo",density:"compact",flat:"",readonly:"","hide-details":"","model-value":t._value,class:t.valueClass,"data-test":"value",onContextmenu:t.showContextMenu},s),p({_:2},[t.astroStatus?{name:"prepend-inner",fn:l(()=>[n(E,{status:t.astroStatus},null,8,["status"])]),key:"0"}:void 0]),1040,["model-value","class","onContextmenu"])]),default:l(()=>[v("span",null,u(k.fullName),1)]),_:1}),n(T,{modelValue:t.contextMenuShown,"onUpdate:modelValue":i[0]||(i[0]=s=>t.contextMenuShown=s),target:[t.x,t.y],style:{"z-index":"3000"}},{default:l(()=>[n(M,null,{default:l(()=>[(r(!0),o(g,null,h(t.contextMenuOptions,(s,P)=>(r(),f(L,{key:P,onClick:x(s.action,["stop"])},{default:l(()=>[n(B,null,{default:l(()=>[y(u(s.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),n(j,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":i[1]||(i[1]=s=>t.viewDetails=s)},null,8,["target-name","packet-name","item-name","modelValue"])],4)}const A=w("default",c(_,[["render",C],["__scopeId","data-v-c21e4dde"]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./ValueWidget-CZh7JWwT-5598101fe6c7553e1a1a.js","./LimitsbarWidget-JJiyzZjb-3cecd3f567a7e8ba26e9.js","./Widget-orNSvnOh-a98828cd439e9a94bd76.js","vue","./main-ca88b1aac639693ffb5d.js","./DetailsDialog-EWjtBjle-c7397b128a1627131c19.js","./VWidget-Dmqf_jKM-f03d30579a2fe310f9fe.js","vue-router","vuex","vuetify","./BarColumn-Dm3D1Lhp-ec78839c989cf756abdd.js"],function(g,f){"use strict";var l,i,a,s,o,u,c,n,r,m;return{setters:[e=>{l=e.default},e=>{i=e.default},e=>{a=e.o},e=>{s=e.resolveComponent,o=e.openBlock,u=e.createElementBlock,c=e.normalizeStyle,n=e.createVNode,r=e.mergeProps},e=>{m=e.s},null,null,null,null,null,null],execute:function(){const e={mixins:[a],components:{ValueWidget:l,LimitsbarWidget:i}};function d(t,x,V,W,w,y){const p=s("value-widget"),v=s("limitsbar-widget");return o(),u("div",{ref:"container",class:"d-flex flex-row",style:c(t.computedStyle)},[n(p,r(t.$attrs,{parameters:t.parameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"widget-index":0}),null,16,["parameters","settings","screen-values","screen-time-zone"]),n(v,r(t.$attrs,{parameters:t.parameters.slice(0,3),settings:[...t.appliedSettings],"screen-values":t.screenValues,"widget-index":1}),null,16,["parameters","settings","screen-values"])],4)}const j=g("default",m(e,[["render",d]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./ValueWidget-CZh7JWwT-5598101fe6c7553e1a1a.js","./LimitscolumnWidget-Cd76tBo7-b74cfe4b46851a84cb94.js","./Widget-orNSvnOh-a98828cd439e9a94bd76.js","vue","./main-ca88b1aac639693ffb5d.js","./DetailsDialog-EWjtBjle-c7397b128a1627131c19.js","./VWidget-Dmqf_jKM-f03d30579a2fe310f9fe.js","vue-router","vuex","vuetify","./BarColumn-Dm3D1Lhp-ec78839c989cf756abdd.js"],function(g,f){"use strict";var l,i,a,s,o,u,c,n,r,m;return{setters:[e=>{l=e.default},e=>{i=e.default},e=>{a=e.o},e=>{s=e.resolveComponent,o=e.openBlock,u=e.createElementBlock,c=e.normalizeStyle,n=e.createVNode,r=e.mergeProps},e=>{m=e.s},null,null,null,null,null,null],execute:function(){const e={mixins:[a],components:{ValueWidget:l,LimitscolumnWidget:i}};function d(t,V,W,B,S,w){const p=s("limitscolumn-widget"),v=s("value-widget");return o(),u("div",{ref:"container",style:c(t.computedStyle)},[n(p,r(t.$attrs,{parameters:t.parameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"widget-index":1}),null,16,["parameters","settings","screen-values"]),n(v,r(t.$attrs,{parameters:t.parameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"widget-index":0}),null,16,["parameters","settings","screen-values","screen-time-zone"])],4)}const j=g("default",m(e,[["render",d]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./ValueWidget-CZh7JWwT-5598101fe6c7553e1a1a.js","./RangebarWidget-DW0FJK6y-dc1f38504dc9ff7de12c.js","./Widget-orNSvnOh-a98828cd439e9a94bd76.js","vue","./main-ca88b1aac639693ffb5d.js","./DetailsDialog-EWjtBjle-c7397b128a1627131c19.js","./VWidget-Dmqf_jKM-f03d30579a2fe310f9fe.js","vue-router","vuex","vuetify"],function(g,f){"use strict";var n,i,l,r,m,o,u,s,a,c;return{setters:[e=>{n=e.default},e=>{i=e.default},e=>{l=e.o},e=>{r=e.resolveComponent,m=e.openBlock,o=e.createElementBlock,u=e.normalizeStyle,s=e.createVNode,a=e.mergeProps},e=>{c=e.s},null,null,null,null,null],execute:function(){const e={mixins:[l],components:{ValueWidget:n,RangebarWidget:i},computed:{valueParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[5],this.parameters[6]]},rangeBarParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[3],this.parameters[4],this.parameters[5],this.parameters[7],this.parameters[8]]}}};function d(t,W,S,w,x,p){const v=r("value-widget"),h=r("rangebar-widget");return m(),o("div",{ref:"container",class:"d-flex flex-row",style:u(t.computedStyle)},[s(v,a(t.$attrs,{parameters:p.valueParameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"widget-index":0}),null,16,["parameters","settings","screen-values","screen-time-zone"]),s(h,a(t.$attrs,{parameters:p.rangeBarParameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"widget-index":1}),null,16,["parameters","settings","screen-values"])],4)}const j=g("default",c(e,[["render",d]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Layout-klOVw-YN-1bd46bc37b38d46695d1.js","vue","./main-ca88b1aac639693ffb5d.js","./Widget-orNSvnOh-a98828cd439e9a94bd76.js","vue-router","vuex","vuetify"],function(v,k){"use strict";var a,r,i,c,o,m,u,g,p,f;return{setters:[e=>{a=e.r},e=>{r=e.openBlock,i=e.createElementBlock,c=e.normalizeStyle,o=e.Fragment,m=e.renderList,u=e.createBlock,g=e.resolveDynamicComponent,p=e.mergeProps},e=>{f=e.s},null,null,null,null],execute:function(){const e={mixins:[a],created:function(){if(this.parameters[0]){let n=this.parameters[0];this.widgets.forEach(l=>{l.settings.find(s=>s[0]==="MARGIN"||s[0]==="RAW"&&s[1].toUpperCase().includes("MARGIN"))===void 0&&l.settings.push(["MARGIN",n])})}}};function y(n,l,s,w,B,N){return r(),i("div",{ref:"container",class:"d-flex flex-column",style:c(n.computedStyle)},[(r(!0),i(o,null,m(n.widgets,(t,d)=>(r(),u(g(t.type),p({ref_for:!0},n.listeners,{key:d,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],4)}const h=v("default",f(e,[["render",y]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./VerticalWidget-Ch7VAEmz-63ba862975d6eab6a75f.js","./Layout-klOVw-YN-1bd46bc37b38d46695d1.js","vue","./main-ca88b1aac639693ffb5d.js","./Widget-orNSvnOh-a98828cd439e9a94bd76.js","vue-router","vuex","vuetify"],function(m,f){"use strict";var r,i,n,a,l,s,c,o,u,g,p,v;return{setters:[e=>{r=e.default},e=>{i=e.r},e=>{n=e.resolveComponent,a=e.openBlock,l=e.createElementBlock,s=e.createVNode,c=e.normalizeStyle,o=e.withCtx,u=e.createTextVNode,g=e.toDisplayString,p=e.mergeProps},e=>{v=e.s},null,null,null,null],execute:function(){const e={mixins:[i],components:{VerticalWidget:r}};function d(t,x,S,k,N,z){const y=n("v-banner"),V=n("vertical-widget");return a(),l("div",null,[s(y,{class:"boxbanner",style:c(t.computedStyle),"single-line":""},{default:o(()=>[u(g(t.parameters[0]),1)]),_:1},8,["style"]),s(V,p(t.listeners,{parameters:t.parameters.slice(1),settings:t.settings,widgets:t.widgets,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone}),null,16,["parameters","settings","widgets","screen-values","screen-time-zone"])])}const w=m("default",v(e,[["render",d],["__scopeId","data-v-832aa5cd"]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./main-ca88b1aac639693ffb5d.js"],function(o,d){"use strict";var p,r;return{setters:[n=>{p=n.z,r=n.d}],execute:function(){const n=o("o",{mixins:[p],props:{widgetIndex:{type:Number,default:null},parameters:{type:Array,default:()=>[]},settings:{type:Array,default:()=>[]},screenValues:{type:Object,default:()=>{}},screenTimeZone:{type:String,default:"local"},namedWidgets:{type:Object,default:{}},line:{type:String,default:""},lineNumber:{type:Number,default:0}},data(){return{appliedSettings:[],appliedStyle:{},widgetName:null,screenId:"NO_SCREEN"}},computed:{computedStyle:function(){return this.appliedSettings.forEach(t=>{this.applyStyleSetting(t)}),this.appliedStyle.width===void 0&&this.appliedStyle.height===void 0&&(this.appliedStyle.flex="0 10 100%"),this.appliedStyle},screen:function(){const t=this;return{getNamedWidget:function(e){return t.$store.getters.namedWidget(t.toQualifiedWidgetName(e))},open:function(e,i){t.$emit("open",e,i)},close:function(e,i){t.$emit("close",e,i)},closeAll:function(){t.$emit("closeAll")}}},listeners:function(){return Object.entries(this.$attrs).reduce((t,e)=>e[0].startsWith("on")?{...t,[e[0]]:e[1]}:t,{})}},watch:{widgetName:function(t,e){this.$store.commit("clearNamedWidget",this.toQualifiedWidgetName(e)),this.$store.commit("setNamedWidget",{[this.toQualifiedWidgetName(t)]:this})}},created(){var t,e;this.screenId=(t=this.settings.find(i=>i[0]==="__SCREEN_ID__"))==null?void 0:t.at(1),this.widgetName=(e=this.settings.find(i=>i[0]==="NAMED_WIDGET"))==null?void 0:e.at(1),this.appliedSettings=this.settings.map(i=>{const s=parseInt(i[0]);if(isNaN(s)||this.widgetIndex===null)return i;if(this.widgetIndex===s)return i.slice(1)}).filter(i=>i!==void 0)},beforeUnmount(){this.widgetName&&this.$store.commit("clearNamedWidget",this.toQualifiedWidgetName(this.widgetName))},methods:{applyStyleSetting(t){switch(t[0]){case"TEXTALIGN":this.appliedStyle["text-align"]=t[1].toLowerCase()+" !important",this.appliedStyle["--text-align"]=t[1].toLowerCase();break;case"PADDING":isNaN(Number(t[1]))||(t[1]+="px"),this.appliedStyle.padding=t[1]+" !important";break;case"MARGIN":isNaN(Number(t[1]))||(t[1]+="px"),this.appliedStyle.margin=t[1]+" !important";break;case"BACKCOLOR":this.appliedStyle["background-color"]=this.getColor(t.slice(1))+" !important";break;case"TEXTCOLOR":this.appliedStyle.color=this.getColor(t.slice(1))+" !important";break;case"BORDERCOLOR":this.appliedStyle["border-width"]="1px!important",this.appliedStyle["border-style"]="solid!important",this.appliedStyle["border-color"]=this.getColor(t.slice(1))+" !important";break;case"WIDTH":isNaN(Number(t[1]))||(t[1]+="px"),this.appliedStyle.width=t[1]+" !important";break;case"HEIGHT":isNaN(Number(t[1]))||(t[1]+="px"),this.appliedStyle.height=t[1]+" !important";break;case"RAW":this.appliedStyle[t[1].toLowerCase()]=t[2]+" !important";break}},verifyNumParams(t,e,i,s=""){let a={line:this.line,lineNumber:this.lineNumber,keyword:t,parameters:this.parameters};for(let l=1;l<=e;l++)if(this.parameters[l-1]===void 0)throw new r(a,`Not enough parameters for ${t}.`,s,"https://docs.openc3.com/docs/configuration");if(i!==null&&this.parameters.length>i)throw new r(a,`Too many parameters for ${t}.`,s,"https://docs.openc3.com/docs/configuration")},setWidth(t,e="px",i="120"){let s=this.appliedSettings.find(a=>a[0]==="WIDTH");return s?s.WIDTH:t?(this.appliedSettings.push(["WIDTH",`${t}${e}`]),parseInt(t)):(this.appliedSettings.push(["WIDTH",`${i}${e}`]),parseInt(i))},setHeight(t,e="px",i="20"){let s=null;return s=this.appliedSettings.find(a=>a[0]==="HEIGHT"),s?s.HEIGHT:t?(this.appliedSettings.push(["HEIGHT",`${t}${e}`]),parseInt(t)):(this.appliedSettings.push(["HEIGHT",`${i}${e}`]),parseInt(i))},getColor(t){switch(t.length){case 1:return t[0].toLowerCase();case 3:return`rgb(${t[0]},${t[1]},${t[2]})`}},toQualifiedWidgetName(t){return`${this.screenId}:${t}`}}})}}});