(this.webpackJsonpui=this.webpackJsonpui||[]).push([[0],{802:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),c=a(28),s=a.n(c),i=a(886),o=a(26),l=a(112),u=a(2),d=a(6),j=a(40),b=a(42),p=a(844),h=a(878),O=a(883),f=a(884),x=a(876),g=a(810),k=a(811),v=a(873),y=a(874),m=a(885),S=a(813),T=a(117),_=a(847),A=a(812),E=a(347),C=a.n(E),R=a(349),I=a.n(R),w=a(352),q=a.n(w),P=a(353),N=a.n(P),D=a(351),L=a.n(D),B=a(354),H=a.n(B),U=a(350),K=a.n(U),z=a(348),G=a.n(z),V={HOME:"".concat(window.ROOT_PATH,"/"),SETTINGS:"".concat(window.ROOT_PATH,"/settings"),SERVERS:"".concat(window.ROOT_PATH,"/servers"),SCHEDULERS:"".concat(window.ROOT_PATH,"/schedulers"),QUEUE_DETAILS:"".concat(window.ROOT_PATH,"/queues/:qname"),REDIS:"".concat(window.ROOT_PATH,"/redis"),TASK_DETAILS:"".concat(window.ROOT_PATH,"/queues/:qname/tasks/:taskId")};function M(e,t){var a=V.QUEUE_DETAILS.replace(":qname",e);return t?"".concat(a,"?status=").concat(t):a}function Q(e,t){return V.TASK_DETAILS.replace(":qname",e).replace(":taskId",t)}var W=a(355),F="POLL_INTERVAL_CHANGE",Y="THEME_PREFERENCE_CHANGE",J="TOGGLE_DRAWER",X="TASK_ROWS_PER_PAGE_CHANGE",$="DAILY_STATS_KEY_CHANGE";function Z(e){return{type:X,value:e}}var ee=a(846),te=a(45),ae=a(245),ne=a.n(ae),re=a(247),ce=a.n(re),se=a(246),ie=a.n(se),oe=a(244),le=a.n(oe),ue=a(1),de=Object(p.a)((function(e){return Object(ee.a)({root:{flexShrink:0,marginLeft:e.spacing(2.5)}})}));var je=function(e){var t=de(),a=Object(te.a)(),n=e.count,r=e.page,c=e.rowsPerPage,s=e.onPageChange;return Object(ue.jsxs)("div",{className:t.root,children:[Object(ue.jsx)(_.a,{onClick:function(e){s(e,0)},disabled:0===r,"aria-label":"first page",children:"rtl"===a.direction?Object(ue.jsx)(le.a,{}):Object(ue.jsx)(ne.a,{})}),Object(ue.jsx)(_.a,{onClick:function(e){s(e,r-1)},disabled:0===r,"aria-label":"previous page",children:"rtl"===a.direction?Object(ue.jsx)(ie.a,{}):Object(ue.jsx)(ce.a,{})}),Object(ue.jsx)(_.a,{onClick:function(e){s(e,r+1)},disabled:r>=Math.ceil(n/c)-1,"aria-label":"next page",children:"rtl"===a.direction?Object(ue.jsx)(ce.a,{}):Object(ue.jsx)(ie.a,{})}),Object(ue.jsx)(_.a,{onClick:function(e){s(e,Math.max(0,Math.ceil(n/c)-1))},disabled:r>=Math.ceil(n/c)-1,"aria-label":"last page",children:"rtl"===a.direction?Object(ue.jsx)(ne.a,{}):Object(ue.jsx)(le.a,{})})]})},be=[10,20,30,60,100],pe=a(869),he=a(870),Oe=a(167),fe=a(250),xe=a.n(fe),ge=a(889),ke=a(871),ve=a(4),ye=a.n(ve),me=a(10),Se=a(19),Te=a.n(Se),_e=a(126),Ae=a.n(_e),Ee="".concat(window.ROOT_PATH,"/api");function Ce(){return Re.apply(this,arguments)}function Re(){return(Re=Object(me.a)(ye.a.mark((function e(){var t;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/queues")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ie(e){return we.apply(this,arguments)}function we(){return(we=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qe(e){return Pe.apply(this,arguments)}function Pe(){return(Pe=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,":pause")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ne(e){return De.apply(this,arguments)}function De(){return(De=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,":resume")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Le(){return Be.apply(this,arguments)}function Be(){return(Be=Object(me.a)(ye.a.mark((function e(){var t;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/queue_stats")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function He(e,t){return Ue.apply(this,arguments)}function Ue(){return(Ue=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/tasks/").concat(a),e.next=3,Te()({method:"get",url:n});case 3:return r=e.sent,e.abrupt("return",r.data);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ke(e,t){return ze.apply(this,arguments)}function ze(){return(ze=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/active_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ge(e,t){return Ve.apply(this,arguments)}function Ve(){return(Ve=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/active_tasks/").concat(a,":cancel")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Me(e){return Qe.apply(this,arguments)}function Qe(){return(Qe=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/active_tasks:cancel_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(e,t){return Fe.apply(this,arguments)}function Fe(){return(Fe=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/active_tasks:batch_cancel"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ye(e,t){return Je.apply(this,arguments)}function Je(){return(Je=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/pending_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xe(e,t){return $e.apply(this,arguments)}function $e(){return($e=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/scheduled_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ze(e,t){return et.apply(this,arguments)}function et(){return(et=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/retry_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tt(e,t){return at.apply(this,arguments)}function at(){return(at=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/archived_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nt(e,t){return rt.apply(this,arguments)}function rt(){return(rt=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/completed_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ct(e,t){return st.apply(this,arguments)}function st(){return(st=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks/").concat(a,":archive")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function it(e,t){return ot.apply(this,arguments)}function ot(){return(ot=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks:batch_archive"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lt(e){return ut.apply(this,arguments)}function ut(){return(ut=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks:archive_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dt(e,t){return jt.apply(this,arguments)}function jt(){return(jt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bt(e,t){return pt.apply(this,arguments)}function pt(){return(pt=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks:batch_delete"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ht(e){return Ot.apply(this,arguments)}function Ot(){return(Ot=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks:delete_all")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ft(e,t){return xt.apply(this,arguments)}function xt(){return(xt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks/").concat(a,":run")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gt(e,t){return kt.apply(this,arguments)}function kt(){return(kt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks/").concat(a,":archive")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vt(e,t){return yt.apply(this,arguments)}function yt(){return(yt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mt(e,t){return St.apply(this,arguments)}function St(){return(St=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:batch_delete"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Tt(e){return _t.apply(this,arguments)}function _t(){return(_t=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:delete_all")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function At(e,t){return Et.apply(this,arguments)}function Et(){return(Et=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:batch_run"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ct(e){return Rt.apply(this,arguments)}function Rt(){return(Rt=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function It(e,t){return wt.apply(this,arguments)}function wt(){return(wt=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:batch_archive"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qt(e){return Pt.apply(this,arguments)}function Pt(){return(Pt=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:archive_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nt(e,t){return Dt.apply(this,arguments)}function Dt(){return(Dt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks/").concat(a,":run")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lt(e,t){return Bt.apply(this,arguments)}function Bt(){return(Bt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks/").concat(a,":archive")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ht(e,t){return Ut.apply(this,arguments)}function Ut(){return(Ut=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Kt(e,t){return zt.apply(this,arguments)}function zt(){return(zt=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:batch_delete"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gt(e){return Vt.apply(this,arguments)}function Vt(){return(Vt=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:delete_all")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mt(e,t){return Qt.apply(this,arguments)}function Qt(){return(Qt=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:batch_run"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wt(e){return Ft.apply(this,arguments)}function Ft(){return(Ft=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Yt(e,t){return Jt.apply(this,arguments)}function Jt(){return(Jt=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:batch_archive"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xt(e){return $t.apply(this,arguments)}function $t(){return($t=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:archive_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Zt(e,t){return ea.apply(this,arguments)}function ea(){return(ea=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks/").concat(a,":run")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ta(e,t){return aa.apply(this,arguments)}function aa(){return(aa=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function na(e,t){return ra.apply(this,arguments)}function ra(){return(ra=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks:batch_delete"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ca(e){return sa.apply(this,arguments)}function sa(){return(sa=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks:delete_all")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ia(e,t){return oa.apply(this,arguments)}function oa(){return(oa=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks:batch_run"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function la(e){return ua.apply(this,arguments)}function ua(){return(ua=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function da(e,t){return ja.apply(this,arguments)}function ja(){return(ja=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/completed_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ba(e,t){return pa.apply(this,arguments)}function pa(){return(pa=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/completed_tasks:batch_delete"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ha(e){return Oa.apply(this,arguments)}function Oa(){return(Oa=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/completed_tasks:delete_all")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fa(){return xa.apply(this,arguments)}function xa(){return(xa=Object(me.a)(ye.a.mark((function e(){var t;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/servers")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ga(){return ka.apply(this,arguments)}function ka(){return(ka=Object(me.a)(ye.a.mark((function e(){var t;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/scheduler_entries")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function va(e){return ya.apply(this,arguments)}function ya(){return(ya=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/scheduler_entries/").concat(t,"/enqueue_events")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ma(){return Sa.apply(this,arguments)}function Sa(){return(Sa=Object(me.a)(ye.a.mark((function e(){var t;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/redis_info")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ta(e){var t=e.response;return t?"".concat(t.status," (").concat(t.statusText,"): ").concat(t.data):"error: no error response data available"}function _a(e){var t=e.response;return t?t.data:"Unknown error occurred. See the logs for details."}function Aa(e){var t=Math.floor(e/3600),a=Math.floor((e-3600*t)/60);return{hour:t,minute:a,second:e-3600*t-60*a,totalSeconds:e}}function Ea(e,t){var a=e-t;return Aa(Math.floor(a/1e3))}function Ca(e){if(e.hour>24){var t=Math.floor(e.hour/24);return t+(1===t?" day":" days")}return(0!==e.hour?"".concat(e.hour,"h"):"")+(0!==e.minute?"".concat(e.minute,"m"):"")+"".concat(e.second,"s")}function Ra(e){try{var t=Ea(Date.parse(e),Date.now());return t.totalSeconds<1?"now":"in "+Ca(t)}catch(a){return"-"}}function Ia(e){try{return wa(Date.parse(e)/1e3)}catch(t){return console.error("Could not parse timestamp: ",e,t),"-"}}function wa(e){return 0===e?"":Ca(Ea(Date.now(),1e3*e))+" ago"}function qa(e){var t=e.indexOf("-");return-1===t?e:e.substr(0,t)}function Pa(e,t){if(0===t)return"0.00%";var a=(e/t*100).toFixed(2);return"".concat(a," %")}function Na(e){return function(e){try{JSON.parse(e)}catch(t){return!1}return!0}(e)?JSON.stringify(JSON.parse(e),null,2):e}var Da="LIST_QUEUES_BEGIN",La="LIST_QUEUES_SUCCESS",Ba="LIST_QUEUES_ERROR",Ha="DELETE_QUEUE_BEGIN",Ua="DELETE_QUEUE_SUCCESS",Ka="DELETE_QUEUE_ERROR",za="PAUSE_QUEUE_BEGIN",Ga="PAUSE_QUEUE_SUCCESS",Va="PAUSE_QUEUE_ERROR",Ma="RESUME_QUEUE_BEGIN",Qa="RESUME_QUEUE_SUCCESS",Wa="RESUME_QUEUE_ERROR";function Fa(){return function(){var e=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:Da}),e.prev=1,e.next=4,Ce();case 4:a=e.sent,t({type:La,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listQueuesAsync: ".concat(Ta(e.t0))),t({type:Ba,error:_a(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}function Ya(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Ha,queue:e}),t.prev=1,t.next=4,Ie(e);case 4:a({type:Ua,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0),a({type:Ka,queue:e,error:_a(t.t0)});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()}var Ja="LIST_QUEUE_STATS_BEGIN",Xa="LIST_QUEUE_STATS_SUCCESS",$a="LIST_QUEUE_STATS_ERROR";var Za=a(848),en=a(849),tn=a(852),an=a(203),nn=a(204),rn=a(165),cn=a(162),sn=a(359);var on=function(e){var t=Object(b.f)();return Object(ue.jsx)(Za.a,{children:Object(ue.jsxs)(en.a,{data:e.data,maxBarSize:120,onClick:function(a){var n=e.data.map((function(e){return e.queue}));a&&a.activeLabel&&n.includes(a.activeLabel)&&t.push(M(a.activeLabel))},style:{cursor:"pointer"},children:[Object(ue.jsx)(tn.a,{strokeDasharray:"3 3"}),Object(ue.jsx)(an.a,{dataKey:"queue"}),Object(ue.jsx)(nn.a,{}),Object(ue.jsx)(rn.a,{}),Object(ue.jsx)(cn.a,{}),Object(ue.jsx)(sn.a,{dataKey:"active",stackId:"a",fill:"#1967d2"}),Object(ue.jsx)(sn.a,{dataKey:"pending",stackId:"a",fill:"#669df6"}),Object(ue.jsx)(sn.a,{dataKey:"scheduled",stackId:"a",fill:"#fdd663"}),Object(ue.jsx)(sn.a,{dataKey:"retry",stackId:"a",fill:"#f666a9"}),Object(ue.jsx)(sn.a,{dataKey:"archived",stackId:"a",fill:"#ac4776"}),Object(ue.jsx)(sn.a,{dataKey:"completed",stackId:"a",fill:"#4bb543"})]})})};var ln=function(e){var t=Object(te.a)();return Object(ue.jsx)(Za.a,{children:Object(ue.jsxs)(en.a,{data:e.data,maxBarSize:120,children:[Object(ue.jsx)(tn.a,{strokeDasharray:"3 3"}),Object(ue.jsx)(an.a,{dataKey:"queue"}),Object(ue.jsx)(nn.a,{}),Object(ue.jsx)(rn.a,{}),Object(ue.jsx)(cn.a,{}),Object(ue.jsx)(sn.a,{dataKey:"succeeded",stackId:"a",fill:t.palette.success.light}),Object(ue.jsx)(sn.a,{dataKey:"failed",stackId:"a",fill:t.palette.error.light})]})})},un=a(14),dn=a(98),jn=a(859),bn=a(863),pn=a(862),hn=a(858),On=a(860),fn=a(861),xn=a(895),gn=a(864),kn=a(332),vn=a.n(kn),yn=a(331),mn=a.n(yn),Sn=a(53),Tn=a.n(Sn),_n=a(56),An=a.n(_n),En=a(807),Cn=a(853),Rn=a(857),In=a(855),wn=a(856),qn=a(854);var Pn,Nn=Object(o.b)((function(e,t){var a=!1;if(null!==t.queue){var n=e.queues.data.find((function(e){var a;return e.name===(null===(a=t.queue)||void 0===a?void 0:a.queue)}));void 0!==n&&(a=n.requestPending)}return{requestPending:a}}),{deleteQueueAsync:Ya})((function(e){return Object(ue.jsx)(Cn.a,{open:null!==e.queue,onClose:e.onClose,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:null!==e.queue&&(e.queue.size>0?Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsx)(qn.a,{id:"alert-dialog-title",children:"Queue is not empty"}),Object(ue.jsx)(In.a,{children:Object(ue.jsxs)(wn.a,{id:"alert-dialog-description",children:['You are trying to delete a non-emtpy queue "',e.queue.queue,'". Please empty the queue first before deleting.']})}),Object(ue.jsx)(Rn.a,{children:Object(ue.jsx)(En.a,{onClick:e.onClose,color:"primary",children:"OK"})})]}):Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsxs)(qn.a,{id:"alert-dialog-title",children:['Are you sure you want to delete "',e.queue.queue,'"?']}),Object(ue.jsx)(In.a,{children:Object(ue.jsx)(wn.a,{id:"alert-dialog-description",children:"You can't undo this action."})}),Object(ue.jsxs)(Rn.a,{children:[Object(ue.jsx)(En.a,{onClick:e.onClose,disabled:e.requestPending,color:"primary",children:"Cancel"}),Object(ue.jsx)(En.a,{onClick:function(){e.queue&&(e.deleteQueueAsync(e.queue.queue),e.onClose())},disabled:e.requestPending,color:"primary",autoFocus:!0,children:"Delete"})]})]}))})}));!function(e){e.Asc="asc",e.Desc="desc"}(Pn||(Pn={}));var Dn,Ln=a(207),Bn=a.n(Ln),Hn=Object(p.a)((function(e){return{table:{minWidth:650},fixedCell:{position:"sticky",zIndex:1,left:0,background:e.palette.background.paper}}}));!function(e){e[e.Queue=0]="Queue",e[e.State=1]="State",e[e.Size=2]="Size",e[e.MemoryUsage=3]="MemoryUsage",e[e.Processed=4]="Processed",e[e.Failed=5]="Failed",e[e.ErrorRate=6]="ErrorRate",e[e.None=7]="None"}(Dn||(Dn={}));var Un=[{label:"Queue",key:"queue",sortBy:Dn.Queue,align:"left"},{label:"State",key:"state",sortBy:Dn.State,align:"left"},{label:"Size",key:"size",sortBy:Dn.Size,align:"right"},{label:"Memory usage",key:"memory_usage",sortBy:Dn.MemoryUsage,align:"right"},{label:"Processed",key:"processed",sortBy:Dn.Processed,align:"right"},{label:"Failed",key:"failed",sortBy:Dn.Failed,align:"right"},{label:"Error rate",key:"error_rate",sortBy:Dn.ErrorRate,align:"right"},{label:"Actions",key:"actions",sortBy:Dn.None,align:"center"}];function Kn(e,t){var a=Object(dn.a)(e);return a.sort(t),a}function zn(e){var t=Hn(),a=Object(n.useState)(Dn.Queue),c=Object(un.a)(a,2),s=c[0],i=c[1],o=Object(n.useState)(Pn.Asc),l=Object(un.a)(o,2),u=l[0],j=l[1],b=Object(n.useState)(null),p=Object(un.a)(b,2),h=p[0],O=p[1];return Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(jn.a,{className:t.table,"aria-label":"queues overview table",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsx)(fn.a,{children:Un.map((function(e,a){return Object(ue.jsx)(pn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:e.sortBy!==Dn.None?Object(ue.jsx)(xn.a,{active:s===e.sortBy,direction:u,onClick:(n=e.sortBy,function(e){if(n===s){var t=u===Pn.Asc?Pn.Desc:Pn.Asc;j(t)}else i(n)}),children:e.label}):Object(ue.jsx)("div",{children:e.label})},e.key);var n}))})}),Object(ue.jsx)(bn.a,{children:Kn(e.queues,(function(e,t){var a;switch(s){case Dn.Queue:if(e.queue===t.queue)return 0;a=e.queue0&&Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ke.a,{children:"Error"}),"Could not retrieve queues live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})}),Object(ue.jsx)(he.a,{item:!0,xs:6,children:Object(ue.jsxs)(Oe.a,{className:i.paper,variant:"outlined",children:[Object(ue.jsx)("div",{className:i.chartHeader,children:Object(ue.jsxs)("div",{className:i.chartHeaderTitle,children:[Object(ue.jsx)(T.a,{variant:"h6",children:"Queue Size"}),Object(ue.jsx)(Qn,{title:Object(ue.jsxs)("div",{children:[Object(ue.jsx)("div",{className:i.tooltipSection,children:"Total number of tasks in the queue"}),Object(ue.jsxs)("div",{className:i.tooltipSection,children:[Object(ue.jsx)("strong",{children:"Active"}),": number of tasks currently being processed"]}),Object(ue.jsxs)("div",{className:i.tooltipSection,children:[Object(ue.jsx)("strong",{children:"Pending"}),": number of tasks ready to be processed"]}),Object(ue.jsxs)("div",{className:i.tooltipSection,children:[Object(ue.jsx)("strong",{children:"Scheduled"}),": number of tasks scheduled to be processed in the future"]}),Object(ue.jsxs)("div",{className:i.tooltipSection,children:[Object(ue.jsx)("strong",{children:"Retry"}),": number of tasks scheduled to be retried in the future"]}),Object(ue.jsxs)("div",{children:[Object(ue.jsx)("strong",{children:"Archived"}),": number of tasks exhausted their retries"]})]}),children:Object(ue.jsx)(xe.a,{fontSize:"small",className:i.infoIcon})})]})}),Object(ue.jsx)("div",{className:i.chartContainer,children:Object(ue.jsx)(on,{data:r})})]})}),Object(ue.jsx)(he.a,{item:!0,xs:6,children:Object(ue.jsxs)(Oe.a,{className:i.paper,variant:"outlined",children:[Object(ue.jsxs)("div",{className:i.chartHeader,children:[Object(ue.jsxs)("div",{className:i.chartHeaderTitle,children:[Object(ue.jsx)(T.a,{variant:"h6",children:"Tasks Processed"}),Object(ue.jsx)(Qn,{title:Object(ue.jsxs)("div",{children:[Object(ue.jsx)("div",{className:i.tooltipSection,children:"Total number of tasks processed in a given day (UTC)"}),Object(ue.jsxs)("div",{className:i.tooltipSection,children:[Object(ue.jsx)("strong",{children:"Succeeded"}),": number of tasks successfully processed"]}),Object(ue.jsxs)("div",{children:[Object(ue.jsx)("strong",{children:"Failed"}),": number of tasks failed to be processed"]})]}),children:Object(ue.jsx)(xe.a,{fontSize:"small",className:i.infoIcon})})]}),Object(ue.jsx)("div",{children:Object(ue.jsx)(ar,{options:[{label:"Today",key:"today"},{label:"Last 7d",key:"last-7d"},{label:"Last 30d",key:"last-30d"},{label:"Last 90d",key:"last-90d"}],initialSelectedKey:s,onSelect:function(t){return e.dailyStatsKeyChange(t)}})})]}),Object(ue.jsxs)("div",{className:i.chartContainer,children:["today"===s&&Object(ue.jsx)(ln,{data:l}),"last-7d"===s&&Object(ue.jsx)(ir,{data:e.queueStats,numDays:7}),"last-30d"===s&&Object(ue.jsx)(ir,{data:e.queueStats,numDays:30}),"last-90d"===s&&Object(ue.jsx)(ir,{data:e.queueStats,numDays:90})]})]})}),Object(ue.jsx)(he.a,{item:!0,xs:12,className:i.tableContainer,children:Object(ue.jsx)(Oe.a,{className:i.paper,variant:"outlined",children:Object(ue.jsx)(zn,{queues:r,onPauseClick:e.pauseQueueAsync,onResumeClick:e.resumeQueueAsync,onDeleteClick:e.deleteQueueAsync})})})]})})}));!function(e){e[e.SystemDefault=0]="SystemDefault",e[e.Always=1]="Always",e[e.Never=2]="Never"}(dr||(dr={}));var br={pollInterval:8,themePreference:dr.SystemDefault,isDrawerOpen:!0,taskRowsPerPage:20,dailyStatsChartType:"last-7d"};var pr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:br,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case F:return Object(u.a)(Object(u.a)({},e),{},{pollInterval:t.value});case Y:return Object(u.a)(Object(u.a)({},e),{},{themePreference:t.value});case J:return Object(u.a)(Object(u.a)({},e),{},{isDrawerOpen:!e.isDrawerOpen});case X:return Object(u.a)(Object(u.a)({},e),{},{taskRowsPerPage:t.value});case $:return Object(u.a)(Object(u.a)({},e),{},{dailyStatsChartType:t.value});default:return e}},hr=a(872);function Or(e){return"dark"===e.palette.type}var fr="CLOSE_SNACKBAR";var xr=Object(p.a)((function(e){return{listItem:{borderTopRightRadius:"24px",borderBottomRightRadius:"24px"},selected:{backgroundColor:Or(e)?"".concat(e.palette.secondary.main,"30"):"".concat(e.palette.primary.main,"30")},selectedText:{fontWeight:600,color:Or(e)?e.palette.secondary.main:e.palette.primary.main},selectedIcon:{color:Or(e)?e.palette.secondary.main:e.palette.primary.main}}}));var gr=function(e){var t=xr(),a=e.icon,n=e.primary,c=e.to,s=Object(b.i)({path:c,strict:!0,sensitive:!0,exact:!0}),i=r.a.useMemo((function(){return r.a.forwardRef((function(e,t){return Object(ue.jsx)(j.b,Object(u.a)({to:c,ref:t},e))}))}),[c]);return Object(ue.jsx)("li",{children:Object(ue.jsx)(gn.a,{title:n,placement:"right",children:Object(ue.jsxs)(k.a,{button:!0,component:i,className:Object(d.default)(t.listItem,s&&t.selected),children:[a&&Object(ue.jsx)(v.a,{className:Object(d.default)(s&&t.selectedIcon),children:a}),Object(ue.jsx)(y.a,{primary:n,classes:{primary:s?t.selectedText:void 0}})]})})})},kr=a(367),vr=a(340),yr=a.n(vr),mr=a(890),Sr=a(335),Tr=a(336);function _r(e){var t=Or(Object(te.a)())?Sr.a:Tr.a;return Object(ue.jsx)(mr.a,{language:e.language,style:t,customStyle:e.customStyle,children:e.children})}var Ar=a(339),Er=a.n(Ar),Cr="LIST_SCHEDULER_ENTRIES_BEGIN",Rr="LIST_SCHEDULER_ENTRIES_SUCCESS",Ir="LIST_SCHEDULER_ENTRIES_ERROR",wr="LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN",qr="LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS",Pr="LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR";function Nr(e,t){return e.enqueueEventsByEntryId[t]||{data:[],loading:!1}}var Dr={loading:!1,data:[],error:"",enqueueEventsByEntryId:{}};var Lr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Cr:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Rr:return Object(u.a)(Object(u.a)({},e),{},{error:"",loading:!1,data:t.payload.entries});case Ir:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case wr:var a=Nr(e,t.entryId);return Object(u.a)(Object(u.a)({},e),{},{enqueueEventsByEntryId:Object(u.a)(Object(u.a)({},e.enqueueEventsByEntryId),{},Object(l.a)({},t.entryId,Object(u.a)(Object(u.a)({},a),{},{loading:!0})))});case qr:var n=function(e,t){return Date.parse(t.enqueued_at)-Date.parse(e.enqueued_at)},r=Nr(e,t.entryId),c=Er()([].concat(Object(dn.a)(r.data),Object(dn.a)(t.payload.events)),"task_id").sort(n);return Object(u.a)(Object(u.a)({},e),{},{enqueueEventsByEntryId:Object(u.a)(Object(u.a)({},e.enqueueEventsByEntryId),{},Object(l.a)({},t.entryId,{loading:!1,data:c}))});case Pr:var s=Nr(e,t.entryId);return Object(u.a)(Object(u.a)({},e),{},{enqueueEventsByEntryId:Object(u.a)(Object(u.a)({},e.enqueueEventsByEntryId),{},Object(l.a)({},t.entryId,Object(u.a)(Object(u.a)({},s),{},{loading:!1})))});default:return e}},Br=Object(p.a)((function(e){return{table:{height:"80vh"},stickyHeaderCell:{background:e.palette.background.paper}}}));var Hr,Ur=Object(o.b)((function(e,t){return{events:Nr(e.schedulerEntries,t.entryId)}}),{listSchedulerEnqueueEventsAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:wr,entryId:e}),t.prev=1,t.next=4,va(e);case 4:n=t.sent,a({type:qr,payload:n,entryId:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("listSchedulerEnqueueEventsAsync: ",Ta(t.t0)),a({type:Pr,error:_a(t.t0),entryId:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()}})((function(e){var t=Br(),a=e.listSchedulerEnqueueEventsAsync,r=e.entryId,c=e.events;return Object(n.useEffect)((function(){a(r)}),[r,a]),Object(ue.jsx)(hn.a,{className:t.table,children:Object(ue.jsxs)(jn.a,{stickyHeader:!0,"aria-label":"scheduler enqueue events table",size:"small",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{classes:{stickyHeader:t.stickyHeaderCell},children:"Enqueued"}),Object(ue.jsx)(pn.a,{classes:{stickyHeader:t.stickyHeaderCell},children:"Task ID"})]})}),Object(ue.jsx)(bn.a,{children:c.data.map((function(e){return Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{component:"th",scope:"row",children:Ia(e.enqueued_at)}),Object(ue.jsx)(pn.a,{children:e.task_id})]},e.task_id)}))})]})})})),Kr=Object(p.a)((function(e){return{table:{minWidth:650},noBorder:{border:"none"},fixedCell:{position:"sticky",zIndex:1,left:0,background:e.palette.background.paper},modal:{display:"flex",alignItems:"center",justifyContent:"center"},modalContent:{background:e.palette.background.paper,padding:e.spacing(2),width:"540px",outline:"none",borderRadius:e.shape.borderRadius},eventsTable:{maxHeight:"80vh"}}}));!function(e){e[e.EntryId=0]="EntryId",e[e.Spec=1]="Spec",e[e.Type=2]="Type",e[e.Payload=3]="Payload",e[e.Options=4]="Options",e[e.NextEnqueue=5]="NextEnqueue",e[e.PrevEnqueue=6]="PrevEnqueue",e[e.None=7]="None"}(Hr||(Hr={}));var zr=[{label:"Entry ID",key:"entry_id",sortBy:Hr.EntryId,align:"left"},{label:"Spec",key:"spec",sortBy:Hr.Spec,align:"left"},{label:"Type",key:"type",sortBy:Hr.Type,align:"left"},{label:"Payload",key:"task_payload",sortBy:Hr.Payload,align:"left"},{label:"Options",key:"options",sortBy:Hr.Options,align:"left"},{label:"Next Enqueue",key:"next_enqueue",sortBy:Hr.NextEnqueue,align:"left"},{label:"Prev Enqueue",key:"prev_enqueue",sortBy:Hr.PrevEnqueue,align:"left"},{label:"",key:"show_history",sortBy:Hr.None,align:"left"}];function Gr(e,t){var a=Object(dn.a)(e);return a.sort(t),a}function Vr(e){var t=Kr(),a=Object(n.useState)(Hr.EntryId),r=Object(un.a)(a,2),c=r[0],s=r[1],i=Object(n.useState)(Pn.Asc),o=Object(un.a)(i,2),l=o[0],u=o[1],j=Object(n.useState)(""),b=Object(un.a)(j,2),p=b[0],h=b[1];return 0===e.entries.length?Object(ue.jsxs)(ge.a,{severity:"info",children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No entries found at this time."]}):Object(ue.jsx)(ue.Fragment,{children:Object(ue.jsxs)(hn.a,{children:[Object(ue.jsxs)(jn.a,{className:t.table,"aria-label":"scheduler entries table",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsx)(fn.a,{children:zr.map((function(e,a){return Object(ue.jsx)(pn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:Object(ue.jsx)(xn.a,{active:e.sortBy===c,direction:l,onClick:(n=e.sortBy,function(e){if(n===c){var t=l===Pn.Asc?Pn.Desc:Pn.Asc;u(t)}else s(n)}),children:e.label})},e.key);var n}))})}),Object(ue.jsx)(bn.a,{children:Gr(e.entries,(function(e,t){var a;switch(c){case Hr.EntryId:if(e.id===t.id)return 0;a=e.id *":{borderBottom:"unset"}},noBorder:{border:"none"}}}));function Qr(e){var t=e.entry,a=e.isLastRow,n=Mr();return Object(ue.jsxs)(fn.a,{className:n.rowRoot,children:[Object(ue.jsx)(pn.a,{component:"th",scope:"row",className:Object(d.default)(a&&n.noBorder),children:t.id}),Object(ue.jsx)(pn.a,{className:Object(d.default)(a&&n.noBorder),children:t.spec}),Object(ue.jsx)(pn.a,{className:Object(d.default)(a&&n.noBorder),children:t.task_type}),Object(ue.jsx)(pn.a,{className:Object(d.default)(a&&n.noBorder),children:Object(ue.jsx)(_r,{language:"json",children:Na(t.task_payload)})}),Object(ue.jsx)(pn.a,{className:Object(d.default)(a&&n.noBorder),children:Object(ue.jsx)(_r,{language:"go",children:t.options.length>0?t.options.join(", "):"No options"})}),Object(ue.jsx)(pn.a,{className:Object(d.default)(a&&n.noBorder),children:Ra(t.next_enqueue_at)}),Object(ue.jsx)(pn.a,{className:Object(d.default)(a&&n.noBorder),children:t.prev_enqueue_at?Ia(t.prev_enqueue_at):"N/A"}),Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(gn.a,{title:"See History",children:Object(ue.jsx)(_.a,{"aria-label":"expand row",size:"small",onClick:e.onShowHistoryClick,children:Object(ue.jsx)(yr.a,{})})})})]})}var Wr=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column"},heading:{paddingLeft:e.spacing(2),marginBottom:e.spacing(1)}}}));var Fr=Object(o.b)((function(e){return{loading:e.schedulerEntries.loading,error:e.schedulerEntries.error,entries:e.schedulerEntries.data,pollInterval:e.settings.pollInterval}}),{listSchedulerEntriesAsync:function(){return function(){var e=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:Cr}),e.prev=1,e.next=4,ga();case 4:a=e.sent,t({type:Rr,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listSchedulerEnqueueEventsAsync: ".concat(Ta(e.t0))),t({type:Ir,error:_a(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}})((function(e){var t=e.pollInterval,a=e.listSchedulerEntriesAsync,n=Wr();return nr(a,t),Object(ue.jsx)(pe.a,{maxWidth:"lg",className:n.container,children:Object(ue.jsx)(he.a,{container:!0,spacing:3,children:""===e.error?Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(Oe.a,{className:n.paper,variant:"outlined",children:[Object(ue.jsx)(T.a,{variant:"h6",className:n.heading,children:"Scheduler Entries"}),Object(ue.jsx)(Vr,{entries:e.entries})]})}):Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ke.a,{children:"Error"}),"Could not retrieve scheduler entries live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})})})})})),Yr=a(358),Jr=a(897),Xr=a(896),$r=a(341),Zr=a.n($r),ec=a(875),tc=a(892),ac=a(891),nc=a(251),rc=a.n(nc),cc="GET_TASK_INFO_BEGIN",sc="GET_TASK_INFO_SUCCESS",ic="GET_TASK_INFO_ERROR",oc="LIST_ACTIVE_TASKS_BEGIN",lc="LIST_ACTIVE_TASKS_SUCCESS",uc="LIST_ACTIVE_TASKS_ERROR",dc="LIST_PENDING_TASKS_BEGIN",jc="LIST_PENDING_TASKS_SUCCESS",bc="LIST_PENDING_TASKS_ERROR",pc="LIST_SCHEDULED_TASKS_BEGIN",hc="LIST_SCHEDULED_TASKS_SUCCESS",Oc="LIST_SCHEDULED_TASKS_ERROR",fc="LIST_RETRY_TASKS_BEGIN",xc="LIST_RETRY_TASKS_SUCCESS",gc="LIST_RETRY_TASKS_ERROR",kc="LIST_ARCHIVED_TASKS_BEGIN",vc="LIST_ARCHIVED_TASKS_SUCCESS",yc="LIST_ARCHIVED_TASKS_ERROR",mc="LIST_COMPLETED_TASKS_BEGIN",Sc="LIST_COMPLETED_TASKS_SUCCESS",Tc="LIST_COMPLETED_TASKS_ERROR",_c="CANCEL_ACTIVE_TASK_BEGIN",Ac="CANCEL_ACTIVE_TASK_SUCCESS",Ec="CANCEL_ACTIVE_TASK_ERROR",Cc="CANCEL_ALL_ACTIVE_TASKS_BEGIN",Rc="CANCEL_ALL_ACTIVE_TASKS_SUCCESS",Ic="CANCEL_ALL_ACTIVE_TASKS_ERROR",wc="BATCH_CANCEL_ACTIVE_TASKS_BEGIN",qc="BATCH_CANCEL_ACTIVE_TASKS_SUCCESS",Pc="BATCH_CANCEL_ACTIVE_TASKS_ERROR",Nc="RUN_SCHEDULED_TASK_BEGIN",Dc="RUN_SCHEDULED_TASK_SUCCESS",Lc="RUN_SCHEDULED_TASK_ERROR",Bc="RUN_RETRY_TASK_BEGIN",Hc="RUN_RETRY_TASK_SUCCESS",Uc="RUN_RETRY_TASK_ERROR",Kc="RUN_ARCHIVED_TASK_BEGIN",zc="RUN_ARCHIVED_TASK_SUCCESS",Gc="RUN_ARCHIVED_TASK_ERROR",Vc="DELETE_PENDING_TASK_BEGIN",Mc="DELETE_PENDING_TASK_SUCCESS",Qc="DELETE_PENDING_TASK_ERROR",Wc="ARCHIVE_PENDING_TASK_BEGIN",Fc="ARCHIVE_PENDING_TASK_SUCCESS",Yc="ARCHIVE_PENDING_TASK_ERROR",Jc="DELETE_SCHEDULED_TASK_BEGIN",Xc="DELETE_SCHEDULED_TASK_SUCCESS",$c="DELETE_SCHEDULED_TASK_ERROR",Zc="ARCHIVE_SCHEDULED_TASK_BEGIN",es="ARCHIVE_SCHEDULED_TASK_SUCCESS",ts="ARCHIVE_SCHEDULED_TASK_ERROR",as="ARCHIVE_RETRY_TASK_BEGIN",ns="ARCHIVE_RETRY_TASK_SUCCESS",rs="ARCHIVE_RETRY_TASK_ERROR",cs="BATCH_ARCHIVE_PENDING_TASKS_BEGIN",ss="BATCH_ARCHIVE_PENDING_TASKS_SUCCESS",is="BATCH_RUN_PENDING_TASKS_ERROR",os="BATCH_DELETE_PENDING_TASKS_BEGIN",ls="BATCH_DELETE_PENDING_TASKS_SUCCESS",us="BATCH_DELETE_PENDING_TASKS_ERROR",ds="DELETE_ALL_PENDING_TASKS_BEGIN",js="DELETE_ALL_PENDING_TASKS_SUCCESS",bs="DELETE_ALL_PENDING_TASKS_ERROR",ps="ARCHIVE_ALL_PENDING_TASKS_BEGIN",hs="ARCHIVE_ALL_PENDING_TASKS_SUCCESS",Os="ARCHIVE_ALL_PENDING_TASKS_ERROR",fs="BATCH_RUN_SCHEDULED_TASKS_BEGIN",xs="BATCH_RUN_SCHEDULED_TASKS_SUCCESS",gs="BATCH_RUN_SCHEDULED_TASKS_ERROR",ks="BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN",vs="BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS",ys="BATCH_RUN_SCHEDULED_TASKS_ERROR",ms="BATCH_DELETE_SCHEDULED_TASKS_BEGIN",Ss="BATCH_DELETE_SCHEDULED_TASKS_SUCCESS",Ts="BATCH_DELETE_SCHEDULED_TASKS_ERROR",_s="RUN_ALL_SCHEDULED_TASKS_BEGIN",As="RUN_ALL_SCHEDULED_TASKS_SUCCESS",Es="RUN_ALL_SCHEDULED_TASKS_ERROR",Cs="ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN",Rs="ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS",Is="ARCHIVE_ALL_SCHEDULED_TASKS_ERROR",ws="DELETE_ALL_SCHEDULED_TASKS_BEGIN",qs="DELETE_ALL_SCHEDULED_TASKS_SUCCESS",Ps="DELETE_ALL_SCHEDULED_TASKS_ERROR",Ns="DELETE_RETRY_TASK_BEGIN",Ds="DELETE_RETRY_TASK_SUCCESS",Ls="DELETE_RETRY_TASK_ERROR",Bs="BATCH_RUN_RETRY_TASKS_BEGIN",Hs="BATCH_RUN_RETRY_TASKS_SUCCESS",Us="BATCH_RUN_RETRY_TASKS_ERROR",Ks="BATCH_ARCHIVE_RETRY_TASKS_BEGIN",zs="BATCH_ARCHIVE_RETRY_TASKS_SUCCESS",Gs="BATCH_ARCHIVE_RETRY_TASKS_ERROR",Vs="BATCH_DELETE_RETRY_TASKS_BEGIN",Ms="BATCH_DELETE_RETRY_TASKS_SUCCESS",Qs="BATCH_DELETE_RETRY_TASKS_ERROR",Ws="RUN_ALL_RETRY_TASKS_BEGIN",Fs="RUN_ALL_RETRY_TASKS_SUCCESS",Ys="RUN_ALL_RETRY_TASKS_ERROR",Js="ARCHIVE_ALL_RETRY_TASKS_BEGIN",Xs="ARCHIVE_ALL_RETRY_TASKS_SUCCESS",$s="ARCHIVE_ALL_RETRY_TASKS_ERROR",Zs="DELETE_ALL_RETRY_TASKS_BEGIN",ei="DELETE_ALL_RETRY_TASKS_SUCCESS",ti="DELETE_ALL_RETRY_TASKS_ERROR",ai="DELETE_ARCHIVED_TASK_BEGIN",ni="DELETE_ARCHIVED_TASK_SUCCESS",ri="DELETE_ARCHIVED_TASK_ERROR",ci="BATCH_RUN_ARCHIVED_TASKS_BEGIN",si="BATCH_RUN_ARCHIVED_TASKS_SUCCESS",ii="BATCH_RUN_ARCHIVED_TASKS_ERROR",oi="BATCH_DELETE_ARCHIVED_TASKS_BEGIN",li="BATCH_DELETE_ARCHIVED_TASKS_SUCCESS",ui="BATCH_DELETE_ARCHIVED_TASKS_ERROR",di="RUN_ALL_ARCHIVED_TASKS_BEGIN",ji="RUN_ALL_ARCHIVED_TASKS_SUCCESS",bi="RUN_ALL_ARCHIVED_TASKS_ERROR",pi="DELETE_ALL_ARCHIVED_TASKS_BEGIN",hi="DELETE_ALL_ARCHIVED_TASKS_SUCCESS",Oi="DELETE_ALL_ARCHIVED_TASKS_ERROR",fi="DELETE_COMPLETED_TASK_BEGIN",xi="DELETE_COMPLETED_TASK_SUCCESS",gi="DELETE_COMPLETED_TASK_ERROR",ki="DELETE_ALL_COMPLETED_TASKS_BEGIN",vi="DELETE_ALL_COMPLETED_TASKS_SUCCESS",yi="DELETE_ALL_COMPLETED_TASKS_ERROR",mi="BATCH_DELETE_COMPLETED_TASKS_BEGIN",Si="BATCH_DELETE_COMPLETED_TASKS_SUCCESS",Ti="BATCH_DELETE_COMPLETED_TASKS_ERROR";var _i=a(360),Ai=Object(p.a)((function(e){return{actionsContainer:{display:"flex",padding:"4px"},moreIcon:{marginRight:"8px"},iconGroup:{paddingLeft:e.spacing(1),borderLeft:"1px solid ".concat(e.palette.grey[100])}}}));function Ei(e){var t=Ai(),a=Object(n.useState)(null),r=Object(un.a)(a,2),c=r[0],s=r[1],i=function(){return s(null)};return Object(ue.jsxs)("div",{className:t.actionsContainer,children:[Object(ue.jsx)(gn.a,{title:"More Actions",children:Object(ue.jsx)(_.a,{"aria-label":"actions",className:t.moreIcon,onClick:function(e){s(e.currentTarget)},children:Object(ue.jsx)(An.a,{})})}),Object(ue.jsx)(_i.a,{id:"action-menu",keepMounted:!0,anchorEl:c,open:Boolean(c),onClose:i,children:e.menuItemActions.map((function(e){return Object(ue.jsx)(Zn.a,{onClick:function(){e.onClick(),i()},disabled:e.disabled,children:e.label},e.label)}))}),e.showIconButtons&&Object(ue.jsx)("div",{className:t.iconGroup,children:e.iconButtonActions.map((function(e){return Object(ue.jsx)(gn.a,{title:e.tooltip,children:Object(ue.jsx)(_.a,{onClick:e.onClick,disabled:e.disabled,children:e.icon})},e.tooltip)}))})]})}var Ci=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Ri={listActiveTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:oc,queue:e}),a.prev=1,a.next=4,Ke(e,t);case 4:r=a.sent,n({type:lc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listActiveTasksAsync: ",Ta(a.t0)),n({type:uc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},cancelActiveTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:_c,queue:e,taskId:t}),a.prev=1,a.next=4,Ge(e,t);case 4:n({type:Ac,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("cancelActiveTaskAsync: ",Ta(a.t0)),n({type:Ec,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},batchCancelActiveTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:wc,queue:e,taskIds:t}),a.prev=1,a.next=4,We(e,t);case 4:r=a.sent,n({type:qc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchCancelActiveTasksAsync: ",Ta(a.t0)),n({type:Pc,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},cancelAllActiveTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Cc,queue:e}),t.prev=1,t.next=4,Me(e);case 4:a({type:Rc,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("cancelAllActiveTasksAsync: ",Ta(t.t0)),a({type:Ic,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},taskRowsPerPageChange:Z},Ii=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"payload",label:"Payload",align:"left"},{key:"status",label:"Status",align:"left"},{key:"start-time",label:"Started",align:"left"},{key:"deadline",label:"Deadline",align:"left"},{key:"actions",label:"Actions",align:"center"}],wi=Object(o.b)((function(e){return{loading:e.tasks.activeTasks.loading,error:e.tasks.activeTasks.error,tasks:e.tasks.activeTasks.data,batchActionPending:e.tasks.activeTasks.batchActionPending,allActionPending:e.tasks.activeTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),Ri);var qi=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}}}}));function Pi(e){var t=e.task,a=qi(),n=Object(b.f)();return Object(ue.jsxs)(fn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(pn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(pn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(pn.a,{children:t.type}),Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(_r,{language:"json",customStyle:{margin:0,maxWidth:400},children:Na(t.payload)})}),Object(ue.jsx)(pn.a,{children:t.canceling?"Canceling":"Running"}),Object(ue.jsx)(pn.a,{children:"-"===t.start_time?"just now":Ia(t.start_time)}),Object(ue.jsx)(pn.a,{children:"-"===t.deadline?"-":Ra(t.deadline)}),Object(ue.jsx)(pn.a,{align:"center",onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsx)(r.a.Fragment,{children:Object(ue.jsx)(gn.a,{title:"Cancel",children:Object(ue.jsx)(_.a,{onClick:e.onCancelClick,disabled:t.requestPending||t.canceling,size:"small",children:Object(ue.jsx)(rc.a,{fontSize:"small"})})})}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(An.a,{fontSize:"small"})})})]},t.id)}var Ni=wi((function(e){var t=e.pollInterval,a=e.listActiveTasksAsync,r=e.queue,c=e.pageSize,s=Ci(),i=Object(n.useState)(0),o=Object(un.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(un.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(un.a)(h,2),f=O[0],x=O[1];if(nr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No active tasks at this time."]});var g=e.tasks.length,k=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ei,{showIconButtons:k>0,iconButtonActions:[{tooltip:"Cancel",icon:Object(ue.jsx)(rc.a,{}),onClick:function(){e.batchCancelActiveTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Cancel All",onClick:function(){e.cancelAllActiveTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(hn.a,{component:Oe.a,children:Object(ue.jsxs)(jn.a,{stickyHeader:!0,className:s.table,"aria-label":"active tasks table",size:"small",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{indeterminate:k>0&&k0&&k===g,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),Ii.map((function(e){return Object(ue.jsx)(pn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(bn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(Pi,{task:t,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},onCancelClick:function(){e.cancelActiveTaskAsync(r,t.id)},onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(ec.a,{children:Object(ue.jsx)(fn.a,{children:Object(ue.jsx)(tc.a,{rowsPerPageOptions:be,colSpan:Ii.length+1,count:e.tasks.length,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),Di=a(99),Li=a.n(Di),Bi=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Hi={listPendingTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:dc,queue:e}),a.prev=1,a.next=4,Ye(e,t);case 4:r=a.sent,n({type:jc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listPendingTasksAsync: ",Ta(a.t0)),n({type:bc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},deletePendingTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Vc,queue:e,taskId:t}),a.prev=1,a.next=4,dt(e,t);case 4:n({type:Mc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deletePendingTaskAsync: ",Ta(a.t0)),n({type:Qc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},batchDeletePendingTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:os,queue:e,taskIds:t}),a.prev=1,a.next=4,bt(e,t);case 4:r=a.sent,n({type:ls,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeletePendingTasksAsync: ",Ta(a.t0)),n({type:us,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},deleteAllPendingTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:ds,queue:e}),t.prev=1,t.next=4,ht(e);case 4:n=t.sent,a({type:js,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllPendingTasksAsync: ",Ta(t.t0)),a({type:bs,error:_a(t.t0),queue:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},archivePendingTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Wc,queue:e,taskId:t}),a.prev=1,a.next=4,ct(e,t);case 4:n({type:Fc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("archivePendingTaskAsync: ",Ta(a.t0)),n({type:Yc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},batchArchivePendingTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:cs,queue:e,taskIds:t}),a.prev=1,a.next=4,it(e,t);case 4:r=a.sent,n({type:ss,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchArchivePendingTasksAsync: ",Ta(a.t0)),n({type:is,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},archiveAllPendingTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:ps,queue:e}),t.prev=1,t.next=4,lt(e);case 4:a({type:hs,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllPendingTasksAsync: ",Ta(t.t0)),a({type:Os,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},taskRowsPerPageChange:Z},Ui=Object(o.b)((function(e){return{loading:e.tasks.pendingTasks.loading,error:e.tasks.pendingTasks.error,tasks:e.tasks.pendingTasks.data,batchActionPending:e.tasks.pendingTasks.batchActionPending,allActionPending:e.tasks.pendingTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),Hi);var Ki=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"96px"},actionButton:{marginLeft:3,marginRight:3}}}));function zi(e){var t=e.task,a=Ki(),n=Object(b.f)();return Object(ue.jsxs)(fn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(pn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(pn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(pn.a,{children:t.type}),Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(_r,{language:"json",customStyle:{margin:0,maxWidth:400},children:Na(t.payload)})}),Object(ue.jsx)(pn.a,{align:"right",children:t.retried}),Object(ue.jsx)(pn.a,{align:"right",children:t.max_retry}),Object(ue.jsx)(pn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(gn.a,{title:"Delete",children:Object(ue.jsx)(_.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Tn.a,{fontSize:"small"})})}),Object(ue.jsx)(gn.a,{title:"Archive",children:Object(ue.jsx)(_.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Li.a,{fontSize:"small"})})})]}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(An.a,{fontSize:"small"})})})]},t.id)}var Gi=Ui((function(e){var t=e.pollInterval,a=e.listPendingTasksAsync,r=e.queue,c=e.pageSize,s=Bi(),i=Object(n.useState)(0),o=Object(un.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(un.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(un.a)(h,2),f=O[0],x=O[1];if(nr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No pending tasks at this time."]});var g=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"paylod",label:"Payload",align:"left"},{key:"retried",label:"Retried",align:"right"},{key:"max_retry",label:"Max Retry",align:"right"},{key:"actions",label:"Actions",align:"center"}],k=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ei,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(Tn.a,{}),onClick:function(){e.batchDeletePendingTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(ue.jsx)(Li.a,{}),onClick:function(){e.batchArchivePendingTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Delete All",onClick:function(){e.deleteAllPendingTasksAsync(r)},disabled:e.allActionPending},{label:"Archive All",onClick:function(){e.archiveAllPendingTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(hn.a,{component:Oe.a,children:Object(ue.jsxs)(jn.a,{stickyHeader:!0,className:s.table,"aria-label":"pending tasks table",size:"small",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{indeterminate:v>0&&v0&&v===k,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),g.map((function(e){return Object(ue.jsx)(pn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(bn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(zi,{task:t,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},allActionPending:e.allActionPending,onDeleteClick:function(){return e.deletePendingTaskAsync(r,t.id)},onArchiveClick:function(){e.archivePendingTaskAsync(r,t.id)},onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(ec.a,{children:Object(ue.jsx)(fn.a,{children:Object(ue.jsx)(tc.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),Vi=a(100),Mi=a.n(Vi),Qi=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Wi={listScheduledTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:pc,queue:e}),a.prev=1,a.next=4,Xe(e,t);case 4:r=a.sent,n({type:hc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listScheduledTasksAsync: ",Ta(a.t0)),n({type:Oc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchDeleteScheduledTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ms,queue:e,taskIds:t}),a.prev=1,a.next=4,mt(e,t);case 4:r=a.sent,n({type:Ss,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteScheduledTasksAsync: ",Ta(a.t0)),n({type:Ts,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchRunScheduledTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:fs,queue:e,taskIds:t}),a.prev=1,a.next=4,At(e,t);case 4:r=a.sent,n({type:xs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunScheduledTasksAsync: ",Ta(a.t0)),n({type:gs,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchArchiveScheduledTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ks,queue:e,taskIds:t}),a.prev=1,a.next=4,It(e,t);case 4:r=a.sent,n({type:vs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchArchiveScheduledTasksAsync: ",Ta(a.t0)),n({type:ys,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},deleteAllScheduledTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:ws,queue:e}),t.prev=1,t.next=4,Tt(e);case 4:n=t.sent,a({type:qs,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllScheduledTasksAsync: ",Ta(t.t0)),a({type:Ps,error:_a(t.t0),queue:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},runAllScheduledTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:_s,queue:e}),t.prev=1,t.next=4,Ct(e);case 4:a({type:As,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllScheduledTasksAsync: ",Ta(t.t0)),a({type:Es,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},archiveAllScheduledTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Cs,queue:e}),t.prev=1,t.next=4,qt(e);case 4:a({type:Rs,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllScheduledTasksAsync: ",Ta(t.t0)),a({type:Is,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},deleteScheduledTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Jc,queue:e,taskId:t}),a.prev=1,a.next=4,vt(e,t);case 4:n({type:Xc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteScheduledTaskAsync: ",Ta(a.t0)),n({type:$c,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},runScheduledTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Nc,queue:e,taskId:t}),a.prev=1,a.next=4,ft(e,t);case 4:n({type:Dc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runScheduledTaskAsync: ",Ta(a.t0)),n({type:Lc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},archiveScheduledTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Zc,queue:e,taskId:t}),a.prev=1,a.next=4,gt(e,t);case 4:n({type:es,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("archiveScheduledTaskAsync: ",Ta(a.t0)),n({type:ts,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},taskRowsPerPageChange:Z},Fi=Object(o.b)((function(e){return{loading:e.tasks.scheduledTasks.loading,error:e.tasks.scheduledTasks.error,tasks:e.tasks.scheduledTasks.data,batchActionPending:e.tasks.scheduledTasks.batchActionPending,allActionPending:e.tasks.scheduledTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),Wi);var Yi=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"140px"},actionButton:{marginLeft:3,marginRight:3}}}));function Ji(e){var t=e.task,a=Yi(),n=Object(b.f)();return Object(ue.jsxs)(fn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(pn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(pn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(pn.a,{children:t.type}),Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(_r,{language:"json",customStyle:{margin:0,maxWidth:400},children:Na(t.payload)})}),Object(ue.jsx)(pn.a,{children:Ra(t.next_process_at)}),Object(ue.jsx)(pn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(gn.a,{title:"Delete",children:Object(ue.jsx)(_.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Tn.a,{fontSize:"small"})})}),Object(ue.jsx)(gn.a,{title:"Archive",children:Object(ue.jsx)(_.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Li.a,{fontSize:"small"})})}),Object(ue.jsx)(gn.a,{title:"Run",children:Object(ue.jsx)(_.a,{onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Mi.a,{fontSize:"small"})})})]}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(An.a,{fontSize:"small"})})})]},t.id)}var Xi=Fi((function(e){var t=e.pollInterval,a=e.listScheduledTasksAsync,r=e.queue,c=e.pageSize,s=Qi(),i=Object(n.useState)(0),o=Object(un.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(un.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(un.a)(h,2),f=O[0],x=O[1];if(nr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No scheduled tasks at this time."]});var g=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"payload",label:"Payload",align:"left"},{key:"process_in",label:"Process In",align:"left"},{key:"actions",label:"Actions",align:"center"}],k=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ei,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(Tn.a,{}),onClick:function(){e.batchDeleteScheduledTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(ue.jsx)(Li.a,{}),onClick:function(){e.batchArchiveScheduledTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(ue.jsx)(Mi.a,{}),onClick:function(){e.batchRunScheduledTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Delete All",onClick:function(){e.deleteAllScheduledTasksAsync(r)},disabled:e.allActionPending},{label:"Archive All",onClick:function(){e.archiveAllScheduledTasksAsync(r)},disabled:e.allActionPending},{label:"Run All",onClick:function(){e.runAllScheduledTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(hn.a,{component:Oe.a,children:Object(ue.jsxs)(jn.a,{stickyHeader:!0,className:s.table,"aria-label":"scheduled tasks table",size:"small",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{indeterminate:v>0&&v0&&v===k,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),g.map((function(e){return Object(ue.jsx)(pn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.label)}))]})}),Object(ue.jsx)(bn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(Ji,{task:t,allActionPending:e.allActionPending,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},onRunClick:function(){e.runScheduledTaskAsync(r,t.id)},onDeleteClick:function(){e.deleteScheduledTaskAsync(r,t.id)},onArchiveClick:function(){e.archiveScheduledTaskAsync(r,t.id)},onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(ec.a,{children:Object(ue.jsx)(fn.a,{children:Object(ue.jsx)(tc.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),$i=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Zi={batchDeleteRetryTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Vs,queue:e,taskIds:t}),a.prev=1,a.next=4,Kt(e,t);case 4:r=a.sent,n({type:Ms,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteRetryTasksAsync: ",Ta(a.t0)),n({type:Qs,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchRunRetryTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Bs,queue:e,taskIds:t}),a.prev=1,a.next=4,Mt(e,t);case 4:r=a.sent,n({type:Hs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunRetryTasksAsync: ",Ta(a.t0)),n({type:Us,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchArchiveRetryTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Ks,queue:e,taskIds:t}),a.prev=1,a.next=4,Yt(e,t);case 4:r=a.sent,n({type:zs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchArchiveRetryTasksAsync: ",Ta(a.t0)),n({type:Gs,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},deleteAllRetryTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Zs,queue:e}),t.prev=1,t.next=4,Gt(e);case 4:n=t.sent,a({type:ei,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllRetryTasksAsync: ",Ta(t.t0)),a({type:ti,error:_a(t.t0),queue:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},runAllRetryTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Ws,queue:e}),t.prev=1,t.next=4,Wt(e);case 4:a({type:Fs,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllRetryTasksAsync: ",Ta(t.t0)),a({type:Ys,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},archiveAllRetryTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Js,queue:e}),t.prev=1,t.next=4,Xt(e);case 4:a({type:Xs,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllRetryTasksAsync: ",Ta(t.t0)),a({type:$s,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},listRetryTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:fc,queue:e}),a.prev=1,a.next=4,Ze(e,t);case 4:r=a.sent,n({type:xc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listRetryTasksAsync: ",Ta(a.t0)),n({type:gc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},deleteRetryTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Ns,queue:e,taskId:t}),a.prev=1,a.next=4,Ht(e,t);case 4:n({type:Ds,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteRetryTaskAsync: ",Ta(a.t0)),n({type:Ls,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},runRetryTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Bc,queue:e,taskId:t}),a.prev=1,a.next=4,Nt(e,t);case 4:n({type:Hc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runRetryTaskAsync: ",Ta(a.t0)),n({type:Uc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},archiveRetryTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:as,queue:e,taskId:t}),a.prev=1,a.next=4,Lt(e,t);case 4:n({type:ns,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("archiveRetryTaskAsync: ",Ta(a.t0)),n({type:rs,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},taskRowsPerPageChange:Z},eo=Object(o.b)((function(e){return{loading:e.tasks.retryTasks.loading,error:e.tasks.retryTasks.error,tasks:e.tasks.retryTasks.data,batchActionPending:e.tasks.retryTasks.batchActionPending,allActionPending:e.tasks.retryTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),Zi);var to=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"140px"},actionButton:{marginLeft:3,marginRight:3}}}));function ao(e){var t=e.task,a=to(),n=Object(b.f)();return Object(ue.jsxs)(fn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(pn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(pn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(pn.a,{children:t.type}),Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(_r,{language:"json",customStyle:{margin:0,maxWidth:400},children:Na(t.payload)})}),Object(ue.jsx)(pn.a,{children:Ra(t.next_process_at)}),Object(ue.jsx)(pn.a,{children:t.error_message}),Object(ue.jsx)(pn.a,{align:"right",children:t.retried}),Object(ue.jsx)(pn.a,{align:"right",children:t.max_retry}),Object(ue.jsx)(pn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(gn.a,{title:"Delete",children:Object(ue.jsx)(_.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Tn.a,{fontSize:"small"})})}),Object(ue.jsx)(gn.a,{title:"Archive",children:Object(ue.jsx)(_.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Li.a,{fontSize:"small"})})}),Object(ue.jsx)(gn.a,{title:"Run",children:Object(ue.jsx)(_.a,{onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Mi.a,{fontSize:"small"})})})]}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(An.a,{fontSize:"small"})})})]},t.id)}var no=eo((function(e){var t=e.pollInterval,a=e.listRetryTasksAsync,r=e.queue,c=e.pageSize,s=$i(),i=Object(n.useState)(0),o=Object(un.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(un.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(un.a)(h,2),f=O[0],x=O[1];if(nr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No retry tasks at this time."]});var g=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"payload",label:"Payload",align:"left"},{key:"retry_in",label:"Retry In",align:"left"},{key:"last_error",label:"Last Error",align:"left"},{key:"retried",label:"Retried",align:"right"},{key:"max_retry",label:"Max Retry",align:"right"},{key:"actions",label:"Actions",align:"center"}],k=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ei,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(Tn.a,{}),onClick:function(){e.batchDeleteRetryTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(ue.jsx)(Li.a,{}),onClick:function(){e.batchArchiveRetryTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(ue.jsx)(Mi.a,{}),onClick:function(){e.batchRunRetryTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Delete All",onClick:function(){e.deleteAllRetryTasksAsync(r)},disabled:e.allActionPending},{label:"Archive All",onClick:function(){e.archiveAllRetryTasksAsync(r)},disabled:e.allActionPending},{label:"Run All",onClick:function(){e.runAllRetryTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(hn.a,{component:Oe.a,children:Object(ue.jsxs)(jn.a,{stickyHeader:!0,className:s.table,"aria-label":"retry tasks table",size:"small",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{indeterminate:v>0&&v0&&v===k,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),g.map((function(e){return Object(ue.jsx)(pn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.label)}))]})}),Object(ue.jsx)(bn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(ao,{task:t,allActionPending:e.allActionPending,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},onRunClick:function(){e.runRetryTaskAsync(t.queue,t.id)},onDeleteClick:function(){e.deleteRetryTaskAsync(t.queue,t.id)},onArchiveClick:function(){e.archiveRetryTaskAsync(t.queue,t.id)},onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(ec.a,{children:Object(ue.jsx)(fn.a,{children:Object(ue.jsx)(tc.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),ro=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var co={listArchivedTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:kc,queue:e}),a.prev=1,a.next=4,tt(e,t);case 4:r=a.sent,n({type:vc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listArchivedTasksAsync: ",Ta(a.t0)),n({type:yc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},runArchivedTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Kc,queue:e,taskId:t}),a.prev=1,a.next=4,Zt(e,t);case 4:n({type:zc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runArchivedTaskAsync: ",Ta(a.t0)),n({type:Gc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},runAllArchivedTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:di,queue:e}),t.prev=1,t.next=4,la(e);case 4:a({type:ji,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllArchivedTasksAsync: ",Ta(t.t0)),a({type:bi,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},deleteArchivedTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ai,queue:e,taskId:t}),a.prev=1,a.next=4,ta(e,t);case 4:n({type:ni,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteArchivedTaskAsync: ",Ta(a.t0)),n({type:ri,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},deleteAllArchivedTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:pi,queue:e}),t.prev=1,t.next=4,ca(e);case 4:n=t.sent,a({type:hi,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllArchivedTasksAsync: ",Ta(t.t0)),a({type:Oi,error:_a(t.t0),queue:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},batchRunArchivedTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ci,queue:e,taskIds:t}),a.prev=1,a.next=4,ia(e,t);case 4:r=a.sent,n({type:si,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunArchivedTasksAsync: ",Ta(a.t0)),n({type:ii,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchDeleteArchivedTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:oi,queue:e,taskIds:t}),a.prev=1,a.next=4,na(e,t);case 4:r=a.sent,n({type:li,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteArchivedTasksAsync: ",Ta(a.t0)),n({type:ui,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},taskRowsPerPageChange:Z},so=Object(o.b)((function(e){return{loading:e.tasks.archivedTasks.loading,error:e.tasks.archivedTasks.error,tasks:e.tasks.archivedTasks.data,batchActionPending:e.tasks.archivedTasks.batchActionPending,allActionPending:e.tasks.archivedTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),co);var io=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"96px"},actionButton:{marginLeft:3,marginRight:3}}}));function oo(e){var t=e.task,a=io(),n=Object(b.f)();return Object(ue.jsxs)(fn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(pn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(pn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(pn.a,{children:t.type}),Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(_r,{language:"json",customStyle:{margin:0,maxWidth:400},children:Na(t.payload)})}),Object(ue.jsx)(pn.a,{children:Ia(t.last_failed_at)}),Object(ue.jsx)(pn.a,{children:t.error_message}),Object(ue.jsx)(pn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(gn.a,{title:"Delete",children:Object(ue.jsx)(_.a,{className:a.actionButton,onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(ue.jsx)(Tn.a,{fontSize:"small"})})}),Object(ue.jsx)(gn.a,{title:"Run",children:Object(ue.jsx)(_.a,{className:a.actionButton,onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(ue.jsx)(Mi.a,{fontSize:"small"})})})]}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(An.a,{fontSize:"small"})})})]},t.id)}var lo=so((function(e){var t=e.pollInterval,a=e.listArchivedTasksAsync,r=e.queue,c=e.pageSize,s=ro(),i=Object(n.useState)(0),o=Object(un.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(un.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(un.a)(h,2),f=O[0],x=O[1];if(nr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No archived tasks at this time."]});var g=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"payload",label:"Payload",align:"left"},{key:"last_failed",label:"Last Failed",align:"left"},{key:"last_error",label:"Last Error",align:"left"},{key:"actions",label:"Actions",align:"center"}],k=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ei,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(Tn.a,{}),onClick:function(){e.batchDeleteArchivedTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(ue.jsx)(Mi.a,{}),onClick:function(){e.batchRunArchivedTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Delete All",onClick:function(){e.deleteAllArchivedTasksAsync(r)},disabled:e.allActionPending},{label:"Run All",onClick:function(){e.runAllArchivedTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(hn.a,{component:Oe.a,children:Object(ue.jsxs)(jn.a,{stickyHeader:!0,className:s.table,"aria-label":"archived tasks table",size:"small",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{indeterminate:v>0&&v0&&v===k,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),g.map((function(e){return Object(ue.jsx)(pn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(bn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(oo,{task:t,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},onRunClick:function(){e.runArchivedTaskAsync(r,t.id)},onDeleteClick:function(){e.deleteArchivedTaskAsync(r,t.id)},allActionPending:e.allActionPending,onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(ec.a,{children:Object(ue.jsx)(fn.a,{children:Object(ue.jsx)(tc.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),uo=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var jo={listCompletedTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,n({type:mc,queue:e}),a.next=4,nt(e,t);case 4:r=a.sent,n({type:Sc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(0),console.error("listCompletedTasksAsync: ",Ta(a.t0)),n({type:Tc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[0,8]])})));return function(e){return a.apply(this,arguments)}}()},deleteCompletedTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:fi,queue:e,taskId:t}),a.prev=1,a.next=4,da(e,t);case 4:n({type:xi,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteCompletedTaskAsync: ",Ta(a.t0)),n({type:gi,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},deleteAllCompletedTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:ki,queue:e}),t.prev=1,t.next=4,ha(e);case 4:n=t.sent,a({type:vi,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllCompletedTasksAsync: ",Ta(t.t0)),a({type:yi,error:_a(t.t0),queue:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},batchDeleteCompletedTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:mi,queue:e,taskIds:t}),a.prev=1,a.next=4,ba(e,t);case 4:r=a.sent,n({type:Si,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteCompletedTasksAsync: ",Ta(a.t0)),n({type:Ti,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},taskRowsPerPageChange:Z},bo=Object(o.b)((function(e){return{loading:e.tasks.completedTasks.loading,error:e.tasks.completedTasks.error,tasks:e.tasks.completedTasks.data,batchActionPending:e.tasks.completedTasks.batchActionPending,allActionPending:e.tasks.completedTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),jo);var po=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"96px"},actionButton:{marginLeft:3,marginRight:3}}}));function ho(e){var t=e.task,a=po(),n=Object(b.f)();return Object(ue.jsxs)(fn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(pn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(pn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(pn.a,{children:t.type}),Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(_r,{language:"json",customStyle:{margin:0,maxWidth:400},children:Na(t.payload)})}),Object(ue.jsx)(pn.a,{children:Ia(t.completed_at)}),Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(_r,{language:"json",customStyle:{margin:0,maxWidth:400},children:Na(t.result)})}),Object(ue.jsx)(pn.a,{children:t.ttl_seconds>0?"".concat(Ca(Aa(t.ttl_seconds))," left"):"expired"}),Object(ue.jsx)(pn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsx)(r.a.Fragment,{children:Object(ue.jsx)(gn.a,{title:"Delete",children:Object(ue.jsx)(_.a,{className:a.actionButton,onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(ue.jsx)(Tn.a,{fontSize:"small"})})})}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(An.a,{fontSize:"small"})})})]},t.id)}var Oo=bo((function(e){var t=e.pollInterval,a=e.listCompletedTasksAsync,r=e.queue,c=e.pageSize,s=uo(),i=Object(n.useState)(0),o=Object(un.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(un.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(un.a)(h,2),f=O[0],x=O[1];if(nr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No completed tasks at this time."]});var g=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"payload",label:"Payload",align:"left"},{key:"completed_at",label:"Completed",align:"left"},{key:"result",label:"Result",align:"left"},{key:"ttl",label:"TTL",align:"left"},{key:"actions",label:"Actions",align:"center"}],k=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ei,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(Tn.a,{}),onClick:function(){e.batchDeleteCompletedTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Delete All",onClick:function(){e.deleteAllCompletedTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(hn.a,{component:Oe.a,children:Object(ue.jsxs)(jn.a,{stickyHeader:!0,className:s.table,"aria-label":"archived tasks table",size:"small",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(ac.a,{indeterminate:v>0&&v0&&v===k,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),g.map((function(e){return Object(ue.jsx)(pn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(bn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(ho,{task:t,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},onDeleteClick:function(){e.deleteCompletedTaskAsync(r,t.id)},allActionPending:e.allActionPending,onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(ec.a,{children:Object(ue.jsx)(fn.a,{children:Object(ue.jsx)(tc.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})}));function fo(e){var t=e.children,a=e.value,n=e.selected,r=Object(Yr.a)(e,["children","value","selected"]);return Object(ue.jsx)("div",Object(u.a)(Object(u.a)({role:"tabpanel",hidden:a!==n,id:"scrollable-auto-tabpanel-".concat(n),"aria-labelledby":"scrollable-auto-tab-".concat(n),style:{flex:1,overflowY:"scroll"}},r),{},{children:a===n&&t}))}var xo=Object(o.b)((function(e,t){var a=e.queues.data.find((function(e){return e.name===t.queue}));return{currentStats:a?a.currentStats:{queue:t.queue,paused:!1,size:0,active:0,pending:0,scheduled:0,retry:0,archived:0,completed:0,processed:0,failed:0,timestamp:"n/a"}}})),go=Object(p.a)((function(e){return{container:{width:"100%",height:"100%",background:e.palette.background.paper},header:{display:"flex",alignItems:"center",paddingTop:e.spacing(1)},heading:{paddingTop:e.spacing(1),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},chip:{marginLeft:e.spacing(1)},taskcount:{fontSize:"12px",color:e.palette.text.secondary,background:Or(e)?"#303030":e.palette.background.default,textAlign:"center",padding:"3px 6px",borderRadius:"10px",marginLeft:"2px"},searchbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},search:{position:"relative",width:"312px",borderRadius:"18px",backgroundColor:Or(e)?"#303030":e.palette.grey[100],"&:hover, &:focus":{backgroundColor:Or(e)?"#303030":e.palette.grey[200]}},searchIcon:{padding:e.spacing(0,2),height:"100%",position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},inputRoot:{color:"inherit",width:"100%"},inputInput:{padding:e.spacing(1,1,1,0),paddingLeft:"calc(1em + ".concat(e.spacing(4),"px)"),width:"100%",fontSize:"0.85rem"}}}));var ko=xo((function(e){var t=e.currentStats,a=go(),r=Object(b.f)(),c=[{key:"active",label:"Active",count:t.active},{key:"pending",label:"Pending",count:t.pending},{key:"scheduled",label:"Scheduled",count:t.scheduled},{key:"retry",label:"Retry",count:t.retry},{key:"archived",label:"Archived",count:t.archived},{key:"completed",label:"Completed",count:t.completed}],s=Object(n.useState)(""),i=Object(un.a)(s,2),o=i[0],l=i[1];return Object(ue.jsxs)(Oe.a,{variant:"outlined",className:a.container,children:[Object(ue.jsxs)("div",{className:a.header,children:[Object(ue.jsx)(T.a,{color:"textPrimary",className:a.heading,children:"Tasks"}),Object(ue.jsx)("div",{children:c.map((function(t){return Object(ue.jsx)(Jr.a,{className:a.chip,label:Object(ue.jsxs)("div",{children:[t.label," ",Object(ue.jsx)("span",{className:a.taskcount,children:t.count})]}),variant:"outlined",color:e.selected===t.key?"primary":"default",onClick:function(){return r.push(M(e.queue,t.key))}},t.key)}))}),Object(ue.jsx)("div",{className:a.searchbar,children:Object(ue.jsxs)("div",{className:a.search,children:[Object(ue.jsx)("div",{className:a.searchIcon,children:Object(ue.jsx)(Zr.a,{})}),Object(ue.jsx)(Xr.a,{placeholder:"Search by ID",classes:{root:a.inputRoot,input:a.inputInput},value:o,onChange:function(e){l(e.target.value)},inputProps:{"aria-label":"search",onKeyDown:function(t){"Enter"===t.key&&r.push(Q(e.queue,o.trim()))}}})]})})]}),Object(ue.jsx)(fo,{value:"active",selected:e.selected,children:Object(ue.jsx)(Ni,{queue:e.queue})}),Object(ue.jsx)(fo,{value:"pending",selected:e.selected,children:Object(ue.jsx)(Gi,{queue:e.queue,totalTaskCount:t.pending})}),Object(ue.jsx)(fo,{value:"scheduled",selected:e.selected,children:Object(ue.jsx)(Xi,{queue:e.queue,totalTaskCount:t.scheduled})}),Object(ue.jsx)(fo,{value:"retry",selected:e.selected,children:Object(ue.jsx)(no,{queue:e.queue,totalTaskCount:t.retry})}),Object(ue.jsx)(fo,{value:"archived",selected:e.selected,children:Object(ue.jsx)(lo,{queue:e.queue,totalTaskCount:t.archived})}),Object(ue.jsx)(fo,{value:"completed",selected:e.selected,children:Object(ue.jsx)(Oo,{queue:e.queue,totalTaskCount:t.completed})})]})})),vo=Object(p.a)((function(e){return{banner:{paddingTop:e.spacing(2),paddingBottom:e.spacing(2),display:"flex"},bannerItem:{flexGrow:1,borderLeft:"1px solid ".concat(e.palette.divider),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}}));var yo=Object(o.b)((function(e,t){var a=e.queues.data.find((function(e){return e.name===t.qname}));return{queue:null===a||void 0===a?void 0:a.currentStats}}))((function(e){var t=vo(),a=e.queue,n=e.qname;return Object(ue.jsxs)("div",{className:t.banner,children:[Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue name"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:n})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue state"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?a.paused?"paused":"run":"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue size"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?a.size:"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Memory usage"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?Bn()(a.memory_usage_bytes):"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Processed"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?a.processed:"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Failed"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?a.failed:"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Error rate"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?Pa(a.failed,a.processed):"-"})]})]})})),mo=a(18),So=a(893),To=a(342),_o=a.n(To),Ao=Object(Mn.a)((function(e){return{root:{backgroundColor:Or(e)?"#303030":e.palette.background.default,height:e.spacing(3),color:e.palette.text.secondary,fontWeight:e.typography.fontWeightRegular,"&:hover, &:focus":{backgroundColor:e.palette.action.hover},"&:active":{boxShadow:e.shadows[1],backgroundColor:Object(mo.c)(e.palette.action.hover,.12)}}}}))(Jr.a);function Eo(e){var t=Object(b.f)(),a=Object(n.useState)(null),r=Object(un.a)(a,2),c=r[0],s=r[1],i=function(e){e.preventDefault(),s(e.currentTarget)},o=function(){s(null)};return Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsxs)(So.a,{"aria-label":"breadcrumb",children:[Object(ue.jsx)(Ao,{component:j.b,to:V.HOME,label:"Queues",onClick:function(){return t.push(V.HOME)}}),Object(ue.jsx)(Ao,{label:e.queueName,deleteIcon:Object(ue.jsx)(_o.a,{}),onClick:i,onDelete:i}),e.taskId&&Object(ue.jsx)(Ao,{label:"task:".concat(e.taskId)})]}),Object(ue.jsx)(_i.a,{id:"queue-breadcrumb-menu",anchorEl:c,keepMounted:!0,open:Boolean(c),onClose:o,children:e.queues.sort().map((function(e){return Object(ue.jsx)(Zn.a,{onClick:function(){t.push(M(e)),o()},children:e},e)}))})]})}var Co=Object(o.b)((function(e){return{queues:e.queues.data.map((function(e){return e.name}))}}),{listQueuesAsync:Fa}),Ro=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(2)},breadcrumbs:{marginBottom:e.spacing(2)},banner:{marginBottom:e.spacing(2)},tasksTable:{marginBottom:e.spacing(4)}}}));var Io=["active","pending","scheduled","retry","archived","completed"];var wo=Co((function(e){var t=Ro(),a=Object(b.h)().qname,r=new URLSearchParams(Object(b.g)().search).get("status");r&&Io.includes(r)||(r="active");var c=e.listQueuesAsync;return Object(n.useEffect)((function(){c()}),[c]),Object(ue.jsx)(pe.a,{maxWidth:"lg",children:Object(ue.jsxs)(he.a,{container:!0,spacing:0,className:t.container,children:[Object(ue.jsx)(he.a,{item:!0,xs:12,className:t.breadcrumbs,children:Object(ue.jsx)(Eo,{queues:e.queues,queueName:a})}),Object(ue.jsx)(he.a,{item:!0,xs:12,className:t.banner,children:Object(ue.jsx)(yo,{qname:a})}),Object(ue.jsx)(he.a,{item:!0,xs:12,className:t.tasksTable,children:Object(ue.jsx)(ko,{queue:a,selected:r})})]})})})),qo=a(343),Po=a.n(qo);var No=Object(o.b)((function(e){return{loading:e.tasks.taskInfo.loading,error:e.tasks.taskInfo.error,taskInfo:e.tasks.taskInfo.data,pollInterval:e.settings.pollInterval,queues:e.queues.data.map((function(e){return e.name}))}}),{getTaskInfoAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:cc}),a.prev=1,a.next=4,He(e,t);case 4:r=a.sent,n({type:sc,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("getTaskInfoAsync: ",Ta(a.t0)),n({type:ic,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},listQueuesAsync:Fa}),Do=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(2)},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},paper:{padding:e.spacing(2),marginTop:e.spacing(2)},breadcrumbs:{marginBottom:e.spacing(2)},infoRow:{display:"flex",alignItems:"center",paddingTop:e.spacing(1)},infoKeyCell:{width:"140px"},infoValueCell:{width:"auto"},footer:{paddingTop:e.spacing(3),paddingBottom:e.spacing(3)}}}));var Lo=No((function(e){var t=Do(),a=Object(b.h)(),r=a.qname,c=a.taskId,s=e.getTaskInfoAsync,i=e.pollInterval,o=e.listQueuesAsync,l=e.taskInfo,u=Object(b.f)();return nr(Object(n.useMemo)((function(){return function(){s(r,c)}}),[r,c,s]),i),Object(n.useEffect)((function(){o()}),[o]),Object(ue.jsx)(pe.a,{maxWidth:"lg",className:t.container,children:Object(ue.jsxs)(he.a,{container:!0,spacing:0,children:[Object(ue.jsx)(he.a,{item:!0,xs:12,className:t.breadcrumbs,children:Object(ue.jsx)(Eo,{queues:e.queues,queueName:r,taskId:c})}),Object(ue.jsxs)(he.a,{item:!0,xs:12,md:6,children:[e.error?Object(ue.jsxs)(ge.a,{severity:"error",className:t.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]}):Object(ue.jsxs)(Oe.a,{className:t.paper,variant:"outlined",children:[Object(ue.jsx)(T.a,{variant:"h6",children:"Task Info"}),Object(ue.jsxs)("div",{children:[Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["ID:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.id})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Type:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.type})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["State:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.state})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Queue:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.queue})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Retry:"," "]}),Object(ue.jsxs)(T.a,{className:t.infoValueCell,children:[null===l||void 0===l?void 0:l.retried,"/",null===l||void 0===l?void 0:l.max_retry]})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Last Failure:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.last_failed_at)?Object(ue.jsxs)(T.a,{children:[null===l||void 0===l?void 0:l.error_message," (",null===l||void 0===l?void 0:l.last_failed_at,")"]}):Object(ue.jsx)(T.a,{children:" - "})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Next Process Time:"," "]}),(null===l||void 0===l?void 0:l.next_process_at)?Object(ue.jsx)(T.a,{children:null===l||void 0===l?void 0:l.next_process_at}):Object(ue.jsx)(T.a,{children:" - "})]})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Timeout:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.timeout_seconds)?Object(ue.jsxs)(T.a,{children:[null===l||void 0===l?void 0:l.timeout_seconds," seconds"]}):Object(ue.jsx)(T.a,{children:" - "})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Deadline:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.deadline)?Object(ue.jsx)(T.a,{children:null===l||void 0===l?void 0:l.deadline}):Object(ue.jsx)(T.a,{children:" - "})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Payload:"," "]}),Object(ue.jsx)("div",{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.payload)&&Object(ue.jsx)(_r,{language:"json",customStyle:{margin:0,maxWidth:400},children:Na(l.payload)})})]}),"completed"===(null===l||void 0===l?void 0:l.state)&&Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Completed:"," "]}),Object(ue.jsx)("div",{className:t.infoValueCell,children:Object(ue.jsxs)(T.a,{children:[Ia(l.completed_at)," (",l.completed_at,")"]})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Result:"," "]}),Object(ue.jsx)("div",{className:t.infoValueCell,children:Object(ue.jsx)(_r,{language:"json",customStyle:{margin:0,maxWidth:400},children:Na(l.result)})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["TTL:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:Object(ue.jsx)(T.a,{children:l.ttl_seconds>0?"".concat(Ca(Aa(l.ttl_seconds))," left"):"expired"})})]})]})]}),Object(ue.jsx)("div",{className:t.footer,children:Object(ue.jsx)(En.a,{startIcon:Object(ue.jsx)(Po.a,{}),onClick:function(){return u.goBack()},children:"Go Back"})})]})]})})})),Bo=a(894),Ho=a(344),Uo=a.n(Ho),Ko=a(887),zo=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column"},formControl:{margin:e.spacing(1),display:"flex",justifyContent:"space-between",flexDirection:"row",alignItems:"center"},selectEmpty:{marginTop:e.spacing(2)},select:{width:"200px"}}}));var Go={pollIntervalChange:function(e){return{type:F,value:e}},selectTheme:function(e){return{type:Y,value:e}}};var Vo,Mo=Object(o.b)((function(e){return{pollInterval:e.settings.pollInterval,themePreference:e.settings.themePreference}}),Go)((function(e){var t=zo(),a=Object(n.useState)(e.pollInterval),r=Object(un.a)(a,2),c=r[0],s=r[1];return Object(ue.jsx)(pe.a,{maxWidth:"lg",className:t.container,children:Object(ue.jsxs)(he.a,{container:!0,spacing:3,justify:"center",children:[Object(ue.jsx)(he.a,{item:!0,xs:1}),Object(ue.jsx)(he.a,{item:!0,xs:6,children:Object(ue.jsx)(T.a,{variant:"h5",color:"textPrimary",children:"Settings"})}),Object(ue.jsx)(he.a,{item:!0,xs:5}),Object(ue.jsx)(he.a,{item:!0,xs:1}),Object(ue.jsx)(he.a,{item:!0,xs:6,children:Object(ue.jsxs)(Oe.a,{className:t.paper,variant:"outlined",children:[Object(ue.jsx)(T.a,{color:"textPrimary",children:"Polling Interval"}),Object(ue.jsx)(T.a,{gutterBottom:!0,color:"textSecondary",variant:"subtitle1",children:"Web UI will fetch live data with the specified interval"}),Object(ue.jsxs)(T.a,{gutterBottom:!0,color:"textSecondary",variant:"subtitle1",children:["Currently: Every"," ",1===c?"second":"".concat(c," seconds")]}),Object(ue.jsx)(Bo.a,{value:c,onChange:function(e,t){s(t)},onChangeCommitted:function(t,a){e.pollIntervalChange(a)},"aria-labelledby":"continuous-slider",valueLabelDisplay:"auto",step:1,marks:!0,min:2,max:20})]})}),Object(ue.jsx)(he.a,{xs:5}),Object(ue.jsx)(he.a,{item:!0,xs:1}),Object(ue.jsx)(he.a,{item:!0,xs:6,children:Object(ue.jsx)(Oe.a,{className:t.paper,variant:"outlined",children:Object(ue.jsxs)(Uo.a,{variant:"outlined",className:t.formControl,children:[Object(ue.jsx)(T.a,{color:"textPrimary",children:"Dark Theme"}),Object(ue.jsxs)(Ko.a,{labelId:"theme-label",id:"theme-selected",value:e.themePreference,onChange:function(t){e.selectTheme(t.target.value)},label:"theme preference",className:t.select,children:[Object(ue.jsx)(Zn.a,{value:dr.SystemDefault,children:"System Default"}),Object(ue.jsx)(Zn.a,{value:dr.Always,children:"Always"}),Object(ue.jsx)(Zn.a,{value:dr.Never,children:"Never"})]})]})})}),Object(ue.jsx)(he.a,{item:!0,xs:5})]})})})),Qo=a(898),Wo=a(879),Fo=a(346),Yo=a.n(Fo),Jo=a(345),Xo=a.n(Jo),$o=Object(p.a)((function(e){return{table:{minWidth:650},fixedCell:{position:"sticky",zIndex:1,left:0,background:e.palette.background.paper}}}));!function(e){e[e.HostPID=0]="HostPID",e[e.Status=1]="Status",e[e.ActiveWorkers=2]="ActiveWorkers",e[e.Queues=3]="Queues",e[e.Started=4]="Started"}(Vo||(Vo={}));var Zo=[{label:"Host:PID",key:"host",sortBy:Vo.HostPID,align:"left"},{label:"Started",key:"started",sortBy:Vo.Started,align:"left"},{label:"Status",key:"status",sortBy:Vo.Status,align:"left"},{label:"Queues",key:"queues",sortBy:Vo.Queues,align:"left"},{label:"Active Workers",key:"workers",sortBy:Vo.ActiveWorkers,align:"left"}];function el(e,t){var a=Object(dn.a)(e);return a.sort(t),a}function tl(e){var t=$o(),a=Object(n.useState)(Vo.HostPID),r=Object(un.a)(a,2),c=r[0],s=r[1],i=Object(n.useState)(Pn.Asc),o=Object(un.a)(i,2),l=o[0],u=o[1];return 0===e.servers.length?Object(ue.jsxs)(ge.a,{severity:"info",children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No servers found at this time."]}):Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(jn.a,{className:t.table,"aria-label":"server info table",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Zo.map((function(e,a){return Object(ue.jsx)(pn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:Object(ue.jsx)(xn.a,{active:e.sortBy===c,direction:l,onClick:(n=e.sortBy,function(e){if(n===c){var t=l===Pn.Asc?Pn.Desc:Pn.Asc;u(t)}else s(n)}),children:e.label})},e.key);var n})),Object(ue.jsx)(pn.a,{})]})}),Object(ue.jsx)(bn.a,{children:el(e.servers,(function(e,t){var a=!1;switch(c){case Vo.HostPID:if(e.host===t.host&&e.pid===t.pid)return 0;a=e.host===t.host?e.pid *":{borderBottom:"unset"}},noBorder:{border:"none"},link:{color:e.palette.text.primary}}}));function nl(e){var t=al(),a=e.server,c=Object(n.useState)(!1),s=Object(un.a)(c,2),i=s[0],o=s[1],l=Object.keys(a.queue_priorities);return Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsxs)(fn.a,{className:t.rowRoot,children:[Object(ue.jsxs)(pn.a,{children:[a.host,":",a.pid]}),Object(ue.jsx)(pn.a,{children:Ia(a.start_time)}),Object(ue.jsx)(pn.a,{children:a.status}),Object(ue.jsx)(pn.a,{children:l.map((function(e,a){return Object(ue.jsxs)("span",{children:[Object(ue.jsx)(j.b,{to:M(e),className:t.link,children:e}),a===l.length-1?"":", "]},e)}))}),Object(ue.jsxs)(pn.a,{children:[a.active_workers.length,"/",a.concurrency]}),Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(gn.a,{title:i?"Hide Details":"Show Details",children:Object(ue.jsx)(_.a,{"aria-label":"expand row",size:"small",onClick:function(){return o(!i)},children:i?Object(ue.jsx)(Xo.a,{}):Object(ue.jsx)(Yo.a,{})})})})]}),Object(ue.jsx)(fn.a,{className:t.rowRoot,children:Object(ue.jsx)(pn.a,{style:{paddingBottom:0,paddingTop:0},colSpan:6,children:Object(ue.jsx)(Wo.a,{in:i,timeout:"auto",unmountOnExit:!0,children:Object(ue.jsxs)(he.a,{container:!0,spacing:2,children:[Object(ue.jsxs)(he.a,{item:!0,xs:9,children:[Object(ue.jsx)(T.a,{variant:"subtitle1",gutterBottom:!0,color:"textSecondary",children:"Active Workers"}),Object(ue.jsxs)(jn.a,{size:"small","aria-label":"active workers",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{children:"Task ID"}),Object(ue.jsx)(pn.a,{children:"Task Payload"}),Object(ue.jsx)(pn.a,{children:"Queue"}),Object(ue.jsx)(pn.a,{children:"Started"})]})}),Object(ue.jsx)(bn.a,{children:a.active_workers.map((function(e){return Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{component:"th",scope:"row",children:qa(e.task_id)}),Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(_r,{language:"json",customStyle:{margin:0},children:Na(e.task_payload)})}),Object(ue.jsx)(pn.a,{children:e.queue}),Object(ue.jsx)(pn.a,{children:Ia(e.start_time)})]},e.task_id)}))})]})]}),Object(ue.jsxs)(he.a,{item:!0,xs:3,children:[Object(ue.jsx)(T.a,{variant:"subtitle1",gutterBottom:!0,color:"textSecondary",children:"Queue Priority"}),Object(ue.jsxs)(jn.a,{size:"small","aria-label":"active workers",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{children:"Queue"}),Object(ue.jsx)(pn.a,{align:"right",children:"Priority"})]})}),Object(ue.jsx)(bn.a,{children:l.map((function(e){return Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{children:Object(ue.jsx)(j.b,{to:M(e),className:t.link,children:e})}),Object(ue.jsx)(pn.a,{align:"right",children:a.queue_priorities[e]})]},e)}))})]}),Object(ue.jsxs)(Qo.a,{margin:2,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",component:"span",children:["Strict Priority:"," "]}),Object(ue.jsx)(T.a,{variant:"button",component:"span",children:a.strict_priority_enabled?"ON":"OFF"})]})]})]})})})})]})}var rl="LIST_SERVERS_BEGIN",cl="LIST_SERVERS_SUCCESS",sl="LIST_SERVERS_ERROR";var il=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column"},heading:{paddingLeft:e.spacing(2),marginBottom:e.spacing(1)}}}));var ol=Object(o.b)((function(e){return{loading:e.servers.loading,error:e.servers.error,servers:e.servers.data,pollInterval:e.settings.pollInterval}}),{listServersAsync:function(){return function(){var e=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:rl}),e.prev=1,e.next=4,fa();case 4:a=e.sent,t({type:cl,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listServersAsync: ".concat(Ta(e.t0))),t({type:sl,error:_a(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}})((function(e){var t=e.pollInterval,a=e.listServersAsync,n=il();return nr(a,t),Object(ue.jsx)(pe.a,{maxWidth:"lg",className:n.container,children:Object(ue.jsx)(he.a,{container:!0,spacing:3,children:""===e.error?Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(Oe.a,{className:n.paper,variant:"outlined",children:[Object(ue.jsx)(T.a,{variant:"h6",className:n.heading,children:"Servers"}),Object(ue.jsx)(tl,{servers:e.servers})]})}):Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ke.a,{children:"Error"}),"Could not retrieve servers live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})})})})})),ll=a(881),ul=a(882),dl="GET_REDIS_INFO_BEGIN",jl="GET_REDIS_INFO_SUCCESS",bl="GET_REDIS_INFO_ERROR";var pl=Object(p.a)((function(e){return{table:{minWidth:650}}}));function hl(e){var t=pl();return Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(jn.a,{className:t.table,"aria-label":"queue location table",children:[Object(ue.jsx)(On.a,{children:Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{children:"Queue"}),Object(ue.jsx)(pn.a,{children:"KeySlot"}),Object(ue.jsx)(pn.a,{children:"Node Addresses"})]})}),Object(ue.jsx)(bn.a,{children:e.queueLocations.map((function(e){return Object(ue.jsxs)(fn.a,{children:[Object(ue.jsx)(pn.a,{component:"th",scope:"row",children:e.queue}),Object(ue.jsx)(pn.a,{children:e.keyslot}),Object(ue.jsx)(pn.a,{children:e.nodes.join(", ")})]},e.queue)}))})]})})}var Ol=a(880),fl=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)}}}));function xl(e){var t=e.redisInfo;return Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsx)(T.a,{variant:"h6",color:"textSecondary",children:"Server"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(gl,{title:"Version",content:t.redis_version})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(gl,{title:"Uptime",content:"".concat(t.uptime_in_days," days")})}),Object(ue.jsx)(he.a,{item:!0,xs:6}),Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsx)(T.a,{variant:"h6",color:"textSecondary",children:"Memory"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(gl,{title:"Used Memory",content:t.used_memory_human})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(gl,{title:"Peak Memory Used",content:t.used_memory_peak_human})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(gl,{title:"Memory Fragmentation Ratio",content:t.mem_fragmentation_ratio})}),Object(ue.jsx)(he.a,{item:!0,xs:3}),Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsx)(T.a,{variant:"h6",color:"textSecondary",children:"Connections"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(gl,{title:"Connected Clients",content:t.connected_clients})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(gl,{title:"Connected Replicas",content:t.connected_slaves})}),Object(ue.jsx)(he.a,{item:!0,xs:6}),Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsx)(T.a,{variant:"h6",color:"textSecondary",children:"Persistence"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(gl,{title:"Last Save to Disk",content:wa(parseInt(t.rdb_last_save_time))})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(gl,{title:"Number of Changes Since Last Dump",content:t.rdb_changes_since_last_save})}),Object(ue.jsx)(he.a,{item:!0,xs:6})]})}function gl(e){return Object(ue.jsx)(ll.a,{variant:"outlined",children:Object(ue.jsxs)(ul.a,{children:[Object(ue.jsx)(T.a,{gutterBottom:!0,color:"textPrimary",variant:"h5",align:"center",children:e.content}),Object(ue.jsx)(T.a,{color:"textSecondary",variant:"subtitle2",align:"center",children:e.title})]})})}var kl=Object(o.b)((function(e){return{loading:e.redis.loading,error:e.redis.error,redisInfo:e.redis.data,redisAddress:e.redis.address,redisInfoRaw:e.redis.rawData,redisClusterEnabled:e.redis.cluster,redisClusterNodesRaw:e.redis.rawClusterNodes,queueLocations:e.redis.queueLocations,pollInterval:e.settings.pollInterval,themePreference:e.settings.themePreference}}),{getRedisInfoAsync:function(){return function(){var e=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:dl}),e.prev=1,e.next=4,ma();case 4:a=e.sent,t({type:jl,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("getRedisInfoAsync: ".concat(Ta(e.t0))),t({type:bl,error:_a(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}})((function(e){var t=fl(),a=e.pollInterval,n=e.getRedisInfoAsync,r=e.redisInfo,c=e.redisInfoRaw,s=e.redisClusterEnabled,i=e.redisClusterNodesRaw,o=e.queueLocations;return nr(n,a),Object(ue.jsx)(pe.a,{maxWidth:"lg",className:t.container,children:Object(ue.jsx)(he.a,{container:!0,spacing:3,children:""===e.error?Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsxs)(he.a,{item:!0,xs:12,children:[Object(ue.jsx)(T.a,{variant:"h5",color:"textPrimary",children:s?"Redis Cluster Info":"Redis Info"}),!s&&Object(ue.jsxs)(T.a,{variant:"subtitle1",color:"textSecondary",children:["Connected to: ",e.redisAddress]})]}),o&&o.length>0&&Object(ue.jsxs)(he.a,{item:!0,xs:12,children:[Object(ue.jsx)(T.a,{variant:"h6",color:"textSecondary",children:"Queue Location in Cluster"}),Object(ue.jsx)(hl,{queueLocations:o})]}),i&&Object(ue.jsx)(ue.Fragment,{children:Object(ue.jsxs)(he.a,{item:!0,xs:12,children:[Object(ue.jsxs)(T.a,{variant:"h6",color:"textSecondary",children:[Object(ue.jsx)(Ol.a,{href:"https://redis.io/commands/cluster-nodes",target:"_",children:"CLUSTER NODES"})," ","Command Output"]}),Object(ue.jsx)(_r,{language:"yaml",children:i})]})}),r&&!s&&Object(ue.jsx)(xl,{redisInfo:r}),c&&Object(ue.jsx)(ue.Fragment,{children:Object(ue.jsxs)(he.a,{item:!0,xs:6,children:[Object(ue.jsxs)(T.a,{variant:"h6",color:"textSecondary",children:[s?Object(ue.jsx)(Ol.a,{href:"https://redis.io/commands/cluster-info",target:"_",children:"CLUSTER INFO"}):Object(ue.jsx)(Ol.a,{href:"https://redis.io/commands/info",target:"_",children:"INFO"})," ","Command Output"]}),Object(ue.jsx)(_r,{language:"yaml",children:c})]})})]}):Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ke.a,{children:"Error"}),"Could not retrieve redis live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})})})})})),vl=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},headingText:{fontWeight:"bold"}}}));function yl(){var e=vl();return Object(ue.jsx)(pe.a,{maxWidth:"lg",className:e.container,children:Object(ue.jsx)(he.a,{container:!0,spacing:3,children:Object(ue.jsxs)(he.a,{item:!0,xs:12,children:[Object(ue.jsx)(T.a,{variant:"h5",align:"center",className:e.headingText,children:"Oops!"}),Object(ue.jsx)(T.a,{variant:"subtitle1",color:"textSecondary",align:"center",children:"404 - Page Not Found"})]})})})}var ml={closeSnackbar:function(){return{type:fr}},toggleDrawer:function(){return{type:J}}};function Sl(e){return Object(ue.jsx)(A.a,Object(u.a)(Object(u.a)({},e),{},{direction:"up"}))}var Tl=Object(o.b)((function(e){return{snackbar:e.snackbar,themePreference:e.settings.themePreference,isDrawerOpen:e.settings.isDrawerOpen}}),ml)((function(e){var t=function(e){var t=Object(hr.a)("(prefers-color-scheme: dark)");return e===dr.Always?t=!0:e===dr.Never&&(t=!1),Object(W.a)({palette:{primary:{main:"#4379FF"},secondary:{main:"#97FBD1"},background:{default:"#f5f7f9"},type:t?"dark":"light"}})}(e.themePreference),a=function(e){return Object(p.a)({root:{display:"flex"},toolbar:{paddingRight:24},toolbarIcon:Object(u.a)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"0 8px"},e.mixins.toolbar),appBar:{backgroundColor:e.palette.background.paper,zIndex:e.zIndex.drawer+1},menuButton:{marginRight:e.spacing(1),color:Or(e)?e.palette.grey[100]:e.palette.grey[700]},menuButtonHidden:{display:"none"},title:{flexGrow:1},drawerPaper:{position:"relative",whiteSpace:"nowrap",width:220,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),border:"none"},drawerPaperClose:Object(l.a)({overflowX:"hidden",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),width:e.spacing(7)},e.breakpoints.up("sm"),{width:e.spacing(9)}),snackbar:{background:e.palette.grey.A400,color:"#ffffff"},snackbarCloseIcon:{color:e.palette.grey[400]},appBarSpacer:e.mixins.toolbar,mainContainer:{display:"flex",width:"100vw"},content:{flex:1,height:"100vh",overflow:"hidden",background:e.palette.background.paper},contentWrapper:{height:"100%",display:"flex",paddingTop:"64px",overflow:"scroll"},sidebarContainer:{display:"flex",justifyContent:"space-between",height:"100%",flexDirection:"column"},listItem:{borderTopRightRadius:"24px",borderBottomRightRadius:"24px"}})}(t)();return Object(ue.jsx)(h.a,{theme:t,children:Object(ue.jsx)(j.a,{children:Object(ue.jsxs)("div",{className:a.root,children:[Object(ue.jsx)(O.a,{position:"absolute",className:a.appBar,variant:"outlined",children:Object(ue.jsxs)(x.a,{className:a.toolbar,children:[Object(ue.jsx)(_.a,{edge:"start",color:"inherit","aria-label":"open drawer",onClick:e.toggleDrawer,className:a.menuButton,children:Object(ue.jsx)(C.a,{})}),Object(ue.jsx)(T.a,{component:"h1",variant:"h6",noWrap:!0,className:a.title,color:"textPrimary",children:"Asynq Monitoring"})]})}),Object(ue.jsxs)("div",{className:a.mainContainer,children:[Object(ue.jsxs)(f.a,{variant:"permanent",classes:{paper:Object(d.default)(a.drawerPaper,!e.isDrawerOpen&&a.drawerPaperClose)},open:e.isDrawerOpen,children:[Object(ue.jsx)(m.a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:e.snackbar.isOpen,autoHideDuration:6e3,onClose:e.closeSnackbar,TransitionComponent:Sl,children:Object(ue.jsx)(S.a,{message:e.snackbar.message,className:a.snackbar,action:Object(ue.jsx)(_.a,{size:"small","aria-label":"close",color:"inherit",onClick:e.closeSnackbar,children:Object(ue.jsx)(G.a,{className:a.snackbarCloseIcon,fontSize:"small"})})})}),Object(ue.jsx)("div",{className:a.appBarSpacer}),Object(ue.jsxs)("div",{className:a.sidebarContainer,children:[Object(ue.jsx)(g.a,{children:Object(ue.jsxs)("div",{children:[Object(ue.jsx)(gr,{to:V.HOME,primary:"Queues",icon:Object(ue.jsx)(I.a,{})}),Object(ue.jsx)(gr,{to:V.SERVERS,primary:"Servers",icon:Object(ue.jsx)(K.a,{})}),Object(ue.jsx)(gr,{to:V.SCHEDULERS,primary:"Schedulers",icon:Object(ue.jsx)(L.a,{})}),Object(ue.jsx)(gr,{to:V.REDIS,primary:"Redis",icon:Object(ue.jsx)(q.a,{})})]})}),Object(ue.jsxs)(g.a,{children:[Object(ue.jsx)(gr,{to:V.SETTINGS,primary:"Settings",icon:Object(ue.jsx)(N.a,{})}),Object(ue.jsxs)(k.a,{button:!0,component:"a",className:a.listItem,href:"https://github.com/hibiken/asynqmon/issues",target:"_blank",children:[Object(ue.jsx)(v.a,{children:Object(ue.jsx)(H.a,{})}),Object(ue.jsx)(y.a,{primary:"Send Feedback"})]})]})]})]}),Object(ue.jsx)("main",{className:a.content,children:Object(ue.jsx)("div",{className:a.contentWrapper,children:Object(ue.jsxs)(b.c,{children:[Object(ue.jsx)(b.a,{exact:!0,path:V.TASK_DETAILS,children:Object(ue.jsx)(Lo,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.QUEUE_DETAILS,children:Object(ue.jsx)(wo,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.SCHEDULERS,children:Object(ue.jsx)(Fr,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.SERVERS,children:Object(ue.jsx)(ol,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.REDIS,children:Object(ue.jsx)(kl,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.SETTINGS,children:Object(ue.jsx)(Mo,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.HOME,children:Object(ue.jsx)(jr,{})}),Object(ue.jsx)(b.a,{path:"*",children:Object(ue.jsx)(yl,{})})]})})})]})]})})})})),_l=a(92),Al=a(357),El={data:[],loading:!1,error:""};var Cl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:El,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Da:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case La:var a=t.payload.queues;return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:"",data:a.map((function(e){return{name:e.queue,currentStats:e,requestPending:!1}}))});case Ba:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case Ha:case za:case Ma:var n=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}));return Object(u.a)(Object(u.a)({},e),{},{data:n});case Ua:var r=e.data.filter((function(e){return e.name!==t.queue}));return Object(u.a)(Object(u.a)({},e),{},{data:r});case Ga:var c=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1,currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{paused:!0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:c});case Qa:var s=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1,currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{paused:!1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:s});case Ka:case Va:case Wa:var i=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}));return Object(u.a)(Object(u.a)({},e),{},{data:i});case lc:case jc:case hc:case xc:case vc:var o=e.data.filter((function(e){return e.name!==t.queue})).concat({name:t.queue,currentStats:t.payload.stats,requestPending:!1});return Object(u.a)(Object(u.a)({},e),{},{data:o});case Dc:var l=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+1,scheduled:e.currentStats.scheduled-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:l});case Hc:var d=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+1,retry:e.currentStats.retry-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:d});case zc:var j=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+1,archived:e.currentStats.archived-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:j});case Fc:var b=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+1,pending:e.currentStats.pending-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:b});case es:var p=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+1,scheduled:e.currentStats.scheduled-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:p});case ns:var h=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+1,retry:e.currentStats.retry-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:h});case Mc:var O=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-1,pending:e.currentStats.pending-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:O});case Xc:var f=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-1,scheduled:e.currentStats.scheduled-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:f});case ss:var x=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+t.payload.archived_ids.length,pending:e.currentStats.pending-t.payload.archived_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:x});case ls:var g=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.payload.deleted_ids.length,pending:e.currentStats.pending-t.payload.deleted_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:g});case hs:var k=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+e.currentStats.pending,pending:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:k});case js:var v=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.deleted,pending:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:v});case xs:var y=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+t.payload.pending_ids.length,scheduled:e.currentStats.scheduled-t.payload.pending_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:y});case vs:var m=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+t.payload.archived_ids.length,scheduled:e.currentStats.scheduled-t.payload.archived_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:m});case Ss:var S=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.payload.deleted_ids.length,scheduled:e.currentStats.scheduled-t.payload.deleted_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:S});case As:var T=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+e.currentStats.scheduled,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:T});case Rs:var _=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+e.currentStats.scheduled,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:_});case qs:var A=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.deleted,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:A});case Ds:var E=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-1,retry:e.currentStats.retry-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:E});case Hs:var C=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+t.payload.pending_ids.length,retry:e.currentStats.retry-t.payload.pending_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:C});case zs:var R=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.pending+t.payload.archived_ids.length,retry:e.currentStats.retry-t.payload.archived_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:R});case Ms:var I=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.payload.deleted_ids.length,retry:e.currentStats.retry-t.payload.deleted_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:I});case Fs:var w=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+e.currentStats.retry,retry:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:w});case Xs:var q=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+e.currentStats.retry,retry:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:q});case ei:var P=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.deleted,retry:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:P});case ni:var N=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-1,archived:e.currentStats.archived-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:N});case xi:var D=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-1,completed:e.currentStats.completed-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:D});case si:var L=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+t.payload.pending_ids.length,archived:e.currentStats.archived-t.payload.pending_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:L});case li:var B=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.payload.deleted_ids.length,archived:e.currentStats.archived-t.payload.deleted_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:B});case Si:var H=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.payload.deleted_ids.length,completed:e.currentStats.completed-t.payload.deleted_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:H});case ji:var U=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+e.currentStats.archived,archived:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:U});case hi:var K=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.deleted,archived:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:K});case vi:var z=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.deleted,completed:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:z});default:return e}},Rl={activeTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},pendingTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},scheduledTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},retryTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},archivedTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},completedTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},taskInfo:{loading:!1,error:""}};var Il=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rl,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case cc:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:Object(u.a)(Object(u.a)({},e.taskInfo),{},{loading:!0})});case ic:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:{loading:!1,error:t.error}});case sc:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:{loading:!1,error:"",data:t.payload}});case oc:return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{loading:!0})});case lc:return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{canceling:!1,requestPending:!1})}))})});case uc:return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{loading:!1,error:t.error,data:[]})});case dc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{loading:!0})});case jc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case bc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{loading:!1,error:t.error,data:[]})});case pc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{loading:!0})});case hc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case Oc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{loading:!1,error:t.error,data:[]})});case fc:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{loading:!0})});case xc:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case gc:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{loading:!1,error:t.error,data:[]})});case kc:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{loading:!0})});case vc:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case yc:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{loading:!1,error:t.error,data:[]})});case mc:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{loading:!0})});case Sc:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case Tc:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{loading:!1,error:t.error,data:[]})});case fi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{data:e.completedTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}))})});case xi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{data:e.completedTasks.data.filter((function(e){return e.id!==t.taskId}))})});case gi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{data:e.completedTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case ki:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{allActionPending:!0})});case vi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{allActionPending:!1,data:[]})});case yi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{allActionPending:!1})});case mi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{batchActionPending:!0,data:e.completedTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}))})});case Si:var a=e.completedTasks.data.filter((function(e){return!t.payload.deleted_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{batchActionPending:!1,data:a})});case Ti:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{batchActionPending:!1,data:e.completedTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}))})});case _c:var n=e.activeTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{data:n})});case Ac:var r=e.activeTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1,canceling:!0})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{data:r})});case Ec:var c=e.activeTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{data:c})});case wc:var s=e.activeTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{batchActionPending:!0,data:s})});case qc:var i=e.activeTasks.data.map((function(e){return t.payload.canceled_ids.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{canceling:!0,requestPending:!1}):t.payload.error_ids.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{batchActionPending:!1,data:i})});case Pc:var o=e.activeTasks.data.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{batchActionPending:!1,data:o})});case Cc:var l=e.activeTasks.data.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{allActionPending:!0,data:l})});case Rc:var d=e.activeTasks.data.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1,canceling:!0})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{allActionPending:!1,data:d})});case Ic:var j=e.activeTasks.data.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{allActionPending:!1,data:j})});case Wc:case Vc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{data:e.pendingTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}))})});case Fc:case Mc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{data:e.pendingTasks.data.filter((function(e){return e.id!==t.taskId}))})});case Yc:case Qc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{data:e.pendingTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case ps:case ds:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!0})});case hs:case js:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!1,data:[]})});case Os:case bs:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!1})});case cs:case os:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{batchActionPending:!0,data:e.pendingTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}))})});case ss:var b=e.pendingTasks.data.filter((function(e){return!t.payload.archived_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{batchActionPending:!1,data:b})});case ls:var p=e.pendingTasks.data.filter((function(e){return!t.payload.deleted_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{batchActionPending:!1,data:p})});case is:case us:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{batchActionPending:!1,data:e.pendingTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}))})});case Nc:case Zc:case Jc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{data:e.scheduledTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}))})});case Dc:case es:case Xc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{data:e.scheduledTasks.data.filter((function(e){return e.id!==t.taskId}))})});case Lc:case ts:case $c:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{data:e.scheduledTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case _s:case Cs:case ws:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!0})});case As:case Rs:case qs:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!1,data:[]})});case Es:case Is:case Ps:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!1})});case fs:case ks:case ms:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{batchActionPending:!0,data:e.scheduledTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}))})});case xs:var h=e.scheduledTasks.data.filter((function(e){return!t.payload.pending_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{batchActionPending:!1,data:h})});case vs:var O=e.scheduledTasks.data.filter((function(e){return!t.payload.archived_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{batchActionPending:!1,data:O})});case Ss:var f=e.scheduledTasks.data.filter((function(e){return!t.payload.deleted_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{batchActionPending:!1,data:f})});case gs:case ys:case Ts:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{batchActionPending:!1,data:e.scheduledTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}))})});case Bc:case as:case Ns:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{data:e.retryTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}))})});case Hc:case ns:case Ds:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{data:e.retryTasks.data.filter((function(e){return e.id!==t.taskId}))})});case Uc:case rs:case Ls:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{data:e.retryTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case Ws:case Js:case Zs:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!0})});case Fs:case Xs:case ei:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!1,data:[]})});case Ys:case $s:case ti:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!1})});case Bs:case Ks:case Vs:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{batchActionPending:!0,data:e.retryTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}))})});case Hs:var x=e.retryTasks.data.filter((function(e){return!t.payload.pending_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{batchActionPending:!1,data:x})});case zs:var g=e.retryTasks.data.filter((function(e){return!t.payload.archived_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{batchActionPending:!1,data:g})});case Ms:var k=e.retryTasks.data.filter((function(e){return!t.payload.deleted_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{batchActionPending:!1,data:k})});case Us:case Gs:case Qs:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{batchActionPending:!1,data:e.retryTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}))})});case Kc:case ai:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{data:e.archivedTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}))})});case zc:case ni:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{data:e.archivedTasks.data.filter((function(e){return e.id!==t.taskId}))})});case Gc:case ri:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{data:e.archivedTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case di:case pi:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!0})});case ji:case hi:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!1,data:[]})});case bi:case Oi:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!1})});case ci:case oi:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{batchActionPending:!0,data:e.archivedTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}))})});case si:var v=e.archivedTasks.data.filter((function(e){return!t.payload.pending_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{batchActionPending:!1,data:v})});case li:var y=e.archivedTasks.data.filter((function(e){return!t.payload.deleted_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{batchActionPending:!1,data:y})});case ii:case ui:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{batchActionPending:!1,data:e.archivedTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}))})});default:return e}},wl={loading:!1,error:"",data:[]};var ql={isOpen:!1,message:""};var Pl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ql,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case fr:return Object(u.a)(Object(u.a)({},e),{},{isOpen:!1});case qc:var a=t.payload.canceled_ids.length;return{isOpen:!0,message:"Cancelation signal sent to ".concat(a," ").concat(1===a?"task":"tasks")};case Rc:return{isOpen:!0,message:"Cancelation signal sent to all tasks in ".concat(t.queue," queue")};case Dc:return{isOpen:!0,message:"Scheduled task is now pending"};case Hc:return{isOpen:!0,message:"Retry task is now pending"};case zc:return{isOpen:!0,message:"Archived task is now pending"};case Fc:return{isOpen:!0,message:"Pending task is now archived"};case es:return{isOpen:!0,message:"Scheduled task is now archived"};case ns:return{isOpen:!0,message:"Retry task is now archived"};case Mc:return{isOpen:!0,message:"Pending task deleted"};case Xc:return{isOpen:!0,message:"Scheduled task deleted"};case xs:var n=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(n," scheduled ").concat(1===n?"task is":"tasks are"," now pending")};case ss:var r=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(r," pending ").concat(1===r?"task is":"tasks are"," now archived")};case ls:var c=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(c," pending ").concat(1===c?"task":"tasks"," deleted")};case vs:var s=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(s," scheduled ").concat(1===s?"task is":"tasks are"," now archived")};case Ss:var i=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(i," scheduled ").concat(1===i?"task":"tasks"," deleted")};case hs:return{isOpen:!0,message:"All pending tasks are now archived"};case js:return{isOpen:!0,message:"All pending tasks deleted"};case As:return{isOpen:!0,message:"All scheduled tasks are now pending"};case Rs:return{isOpen:!0,message:"All scheduled tasks are now archived"};case qs:return{isOpen:!0,message:"All scheduled tasks deleted"};case Ds:return{isOpen:!0,message:"Retry task deleted"};case Hs:var o=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(o," retry ").concat(1===o?"task is":"tasks are"," now pending")};case zs:var l=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(l," retry ").concat(1===l?"task is":"tasks are"," now archived")};case Ms:var d=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(d," retry ").concat(1===d?"task":"tasks"," deleted")};case Fs:return{isOpen:!0,message:"All retry tasks are now pending"};case Xs:return{isOpen:!0,message:"All retry tasks are now archived"};case ei:return{isOpen:!0,message:"All retry tasks deleted"};case ni:return{isOpen:!0,message:"Archived task deleted"};case si:var j=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(j," archived ").concat(1===j?"task is":"tasks are"," now pending")};case li:var b=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(b," archived ").concat(1===b?"task":"tasks"," deleted")};case ji:return{isOpen:!0,message:"All archived tasks are now pending"};case hi:return{isOpen:!0,message:"All archived tasks deleted"};case xi:return{isOpen:!0,message:"Completed task deleted"};case vi:return{isOpen:!0,message:"All completed tasks deleted"};case Si:var p=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(p," completed ").concat(1===p?"task":"tasks"," deleted")};default:return e}},Nl={loading:!1,data:{}};function Dl(e,t){var a=new Date(e),n=new Date(t);return a.getUTCDate()===n.getUTCDate()&&a.getUTCMonth()===n.getUTCMonth()&&a.getUTCFullYear()===n.getUTCFullYear()}var Ll={loading:!1,error:"",address:"",data:null,rawData:null,cluster:!1,rawClusterNodes:null,queueLocations:null};var Bl="asynqmon:state";var Hl=Object(_l.b)({settings:pr,queues:Cl,tasks:Il,servers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wl,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case rl:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case cl:return{loading:!1,error:"",data:t.payload.servers};case sl:return Object(u.a)(Object(u.a)({},e),{},{error:t.error,loading:!1});default:return e}},schedulerEntries:Lr,snackbar:Pl,queueStats:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Nl,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ja:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Xa:return{data:t.payload.stats,loading:!1};case $a:return Object(u.a)(Object(u.a)({},e),{},{loading:!1});case La:var a,n=Object(u.a)({},e.data),r=Object(rr.a)(t.payload.queues);try{var c=function(){var e=a.value,t=n[e.queue];if(!t)return"continue";var r=t.map((function(t){return Dl(t.date,e.timestamp)?Object(u.a)(Object(u.a)({},t),{},{processed:e.processed,failed:e.failed}):t}));n[e.queue]=r};for(r.s();!(a=r.n()).done;)c()}catch(s){r.e(s)}finally{r.f()}return Object(u.a)(Object(u.a)({},e),{},{data:n});default:return e}},redis:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ll,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case dl:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case bl:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case jl:return{loading:!1,error:"",address:t.payload.address,data:t.payload.info,rawData:t.payload.raw_info,cluster:t.payload.cluster,rawClusterNodes:t.payload.raw_cluster_nodes,queueLocations:t.payload.queue_locations};default:return e}}}),Ul=function(){try{var e=localStorage.getItem(Bl);if(null===e)return{};var t=JSON.parse(e);return{settings:Object(u.a)(Object(u.a)({},br),t.settings||{})}}catch(a){return console.log("loadState: could not load state ",a),{}}}(),Kl=Object(Al.a)({reducer:Hl,preloadedState:Ul});Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var zl=void 0;Kl.subscribe((function(){zl!==(zl=Kl.getState().settings)&&function(e){try{var t=JSON.stringify({settings:e.settings});localStorage.setItem(Bl,t)}catch(a){console.error("saveState: could not save state: ",a)}}(Kl.getState())})),s.a.render(Object(ue.jsxs)(r.a.StrictMode,{children:[Object(ue.jsx)(i.a,{}),Object(ue.jsx)(o.a,{store:Kl,children:Object(ue.jsx)(Tl,{})})]}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[802,1,2]]]); //# sourceMappingURL=main.2bdef890.chunk.js.map