mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-01-19 19:25:52 +08:00
2 lines
219 KiB
JavaScript
2 lines
219 KiB
JavaScript
(this.webpackJsonpui=this.webpackJsonpui||[]).push([[0],{806:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),c=a(30),s=a.n(c),i=a(899),o=a(25),l=a(19),u=a(2),d=a(5),j=a(39),b=a(45),p=a(852),h=a(887),O=a(896),f=a(897),m=a(883),x=a(816),g=a(817),v=a(880),y=a(881),k=a(898),S=a(821),_=a(809),T=a(820),E=a(357),A=a.n(E),C=a(359),w=a.n(C),R=a(362),I=a.n(R),q=a(364),N=a.n(q),P=a(361),D=a.n(P),L=a(365),B=a.n(L),H=a(363),z=a.n(H),U=a(360),K=a.n(U),G=a(358),M=a.n(G),V=function(){return{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"),QUEUE_METRICS:"".concat(window.ROOT_PATH,"/q/metrics")}};function F(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 Y=a(366),W="POLL_INTERVAL_CHANGE",J="THEME_PREFERENCE_CHANGE",$="TOGGLE_DRAWER",Z="TASK_ROWS_PER_PAGE_CHANGE",X="DAILY_STATS_KEY_CHANGE";function ee(e){return{type:Z,value:e}}var te=a(854),ae=a(46),ne=a(245),re=a.n(ne),ce=a(247),se=a.n(ce),ie=a(246),oe=a.n(ie),le=a(244),ue=a.n(le),de=a(1),je=Object(p.a)((function(e){return Object(te.a)({root:{flexShrink:0,marginLeft:e.spacing(2.5)}})}));var be=function(e){var t=je(),a=Object(ae.a)(),n=e.count,r=e.page,c=e.rowsPerPage,s=e.onPageChange;return Object(de.jsxs)("div",{className:t.root,children:[Object(de.jsx)(_.a,{onClick:function(e){s(e,0)},disabled:0===r,"aria-label":"first page",children:"rtl"===a.direction?Object(de.jsx)(ue.a,{}):Object(de.jsx)(re.a,{})}),Object(de.jsx)(_.a,{onClick:function(e){s(e,r-1)},disabled:0===r,"aria-label":"previous page",children:"rtl"===a.direction?Object(de.jsx)(oe.a,{}):Object(de.jsx)(se.a,{})}),Object(de.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(de.jsx)(se.a,{}):Object(de.jsx)(oe.a,{})}),Object(de.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(de.jsx)(re.a,{}):Object(de.jsx)(ue.a,{})})]})},pe=[10,20,30,60,100],he=a(876),Oe=a(877),fe=a(149),me=a(106),xe=a(162),ge=a.n(xe),ve=a(901),ye=a(878),ke=a(10),Se=a(4),_e=a.n(Se),Te=a(21),Ee=a.n(Te),Ae=a(80),Ce=a.n(Ae),we=function(){return"".concat(window.ROOT_PATH,"/api")};function Re(){return Ie.apply(this,arguments)}function Ie(){return(Ie=Object(ke.a)(_e.a.mark((function e(){var t;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"get",url:"".concat(we(),"/queues")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qe(e){return Ne.apply(this,arguments)}function Ne(){return(Ne=Object(ke.a)(_e.a.mark((function e(t){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/queues/").concat(t)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pe(e){return De.apply(this,arguments)}function De(){return(De=Object(ke.a)(_e.a.mark((function e(t){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,":pause")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Le(e){return Be.apply(this,arguments)}function Be(){return(Be=Object(ke.a)(_e.a.mark((function e(t){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,":resume")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function He(){return ze.apply(this,arguments)}function ze(){return(ze=Object(ke.a)(_e.a.mark((function e(){var t;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"get",url:"".concat(we(),"/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 Ue(e,t){return Ke.apply(this,arguments)}function Ke(){return(Ke=Object(ke.a)(_e.a.mark((function e(t,a){var n,r;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(we(),"/queues/").concat(t,"/tasks/").concat(a),e.next=3,Ee()({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 Ge(e,t){return Me.apply(this,arguments)}function Me(){return(Me=Object(ke.a)(_e.a.mark((function e(t,a){var n,r;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(we(),"/queues/").concat(t,"/active_tasks"),a&&(n+="?".concat(Ce.a.stringify(a))),e.next=4,Ee()({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 Ve(e,t){return Fe.apply(this,arguments)}function Fe(){return(Fe=Object(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/active_tasks/").concat(a,":cancel")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Qe(e){return Ye.apply(this,arguments)}function Ye(){return(Ye=Object(ke.a)(_e.a.mark((function e(t){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/active_tasks:cancel_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(e,t){return Je.apply(this,arguments)}function Je(){return(Je=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 $e(e,t){return Ze.apply(this,arguments)}function Ze(){return(Ze=Object(ke.a)(_e.a.mark((function e(t,a){var n,r;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(we(),"/queues/").concat(t,"/pending_tasks"),a&&(n+="?".concat(Ce.a.stringify(a))),e.next=4,Ee()({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 et.apply(this,arguments)}function et(){return(et=Object(ke.a)(_e.a.mark((function e(t,a){var n,r;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(we(),"/queues/").concat(t,"/scheduled_tasks"),a&&(n+="?".concat(Ce.a.stringify(a))),e.next=4,Ee()({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(ke.a)(_e.a.mark((function e(t,a){var n,r;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(we(),"/queues/").concat(t,"/retry_tasks"),a&&(n+="?".concat(Ce.a.stringify(a))),e.next=4,Ee()({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(ke.a)(_e.a.mark((function e(t,a){var n,r;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(we(),"/queues/").concat(t,"/archived_tasks"),a&&(n+="?".concat(Ce.a.stringify(a))),e.next=4,Ee()({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(ke.a)(_e.a.mark((function e(t,a){var n,r;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(we(),"/queues/").concat(t,"/completed_tasks"),a&&(n+="?".concat(Ce.a.stringify(a))),e.next=4,Ee()({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 it(e,t){return ot.apply(this,arguments)}function ot(){return(ot=Object(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/pending_tasks/").concat(a,":archive")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lt(e,t){return ut.apply(this,arguments)}function ut(){return(ut=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 dt(e){return jt.apply(this,arguments)}function jt(){return(jt=Object(ke.a)(_e.a.mark((function e(t){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/pending_tasks:archive_all")});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(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/queues/").concat(t,"/pending_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ht(e,t){return Ot.apply(this,arguments)}function Ot(){return(Ot=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 ft(e){return mt.apply(this,arguments)}function mt(){return(mt=Object(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/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 xt(e,t){return gt.apply(this,arguments)}function gt(){return(gt=Object(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/scheduled_tasks/").concat(a,":run")});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(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/scheduled_tasks/").concat(a,":archive")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kt(e,t){return St.apply(this,arguments)}function St(){return(St=Object(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/queues/").concat(t,"/scheduled_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _t(e,t){return Tt.apply(this,arguments)}function Tt(){return(Tt=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 Et(e){return At.apply(this,arguments)}function At(){return(At=Object(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/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 Ct(e,t){return wt.apply(this,arguments)}function wt(){return(wt=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 Rt(e){return It.apply(this,arguments)}function It(){return(It=Object(ke.a)(_e.a.mark((function e(t){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/scheduled_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qt(e,t){return Nt.apply(this,arguments)}function Nt(){return(Nt=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 Pt(e){return Dt.apply(this,arguments)}function Dt(){return(Dt=Object(ke.a)(_e.a.mark((function e(t){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/scheduled_tasks:archive_all")});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(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/retry_tasks/").concat(a,":run")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ht(e,t){return zt.apply(this,arguments)}function zt(){return(zt=Object(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/retry_tasks/").concat(a,":archive")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ut(e,t){return Kt.apply(this,arguments)}function Kt(){return(Kt=Object(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/queues/").concat(t,"/retry_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gt(e,t){return Mt.apply(this,arguments)}function Mt(){return(Mt=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 Vt(e){return Ft.apply(this,arguments)}function Ft(){return(Ft=Object(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/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 Qt(e,t){return Yt.apply(this,arguments)}function Yt(){return(Yt=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 Jt.apply(this,arguments)}function Jt(){return(Jt=Object(ke.a)(_e.a.mark((function e(t){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/retry_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $t(e,t){return Zt.apply(this,arguments)}function Zt(){return(Zt=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 ea.apply(this,arguments)}function ea(){return(ea=Object(ke.a)(_e.a.mark((function e(t){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/retry_tasks:archive_all")});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(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/archived_tasks/").concat(a,":run")});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(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/queues/").concat(t,"/archived_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ca(e,t){return sa.apply(this,arguments)}function sa(){return(sa=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 ia(e){return oa.apply(this,arguments)}function oa(){return(oa=Object(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/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 la(e,t){return ua.apply(this,arguments)}function ua(){return(ua=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 da(e){return ja.apply(this,arguments)}function ja(){return(ja=Object(ke.a)(_e.a.mark((function e(t){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/queues/").concat(t,"/archived_tasks:run_all")});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(ke.a)(_e.a.mark((function e(t,a){return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/queues/").concat(t,"/completed_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ha(e,t){return Oa.apply(this,arguments)}function Oa(){return(Oa=Object(ke.a)(_e.a.mark((function e(t,a){var n;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"post",url:"".concat(we(),"/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 fa(e){return ma.apply(this,arguments)}function ma(){return(ma=Object(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"delete",url:"".concat(we(),"/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 xa(){return ga.apply(this,arguments)}function ga(){return(ga=Object(ke.a)(_e.a.mark((function e(){var t;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"get",url:"".concat(we(),"/servers")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function va(){return ya.apply(this,arguments)}function ya(){return(ya=Object(ke.a)(_e.a.mark((function e(){var t;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"get",url:"".concat(we(),"/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 ka(e){return Sa.apply(this,arguments)}function Sa(){return(Sa=Object(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"get",url:"".concat(we(),"/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 _a(){return Ta.apply(this,arguments)}function Ta(){return(Ta=Object(ke.a)(_e.a.mark((function e(){var t;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ee()({method:"get",url:"".concat(we(),"/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 Ea(e,t,a){return Aa.apply(this,arguments)}function Aa(){return(Aa=Object(ke.a)(_e.a.mark((function e(t,a,n){var r,c;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={endtime:t,duration:a},n&&n.length>0&&(r.queues=n.join(",")),e.next=4,Ee()({method:"get",url:"".concat(we(),"/metrics?").concat(Ce.a.stringify(r))});case 4:return c=e.sent,e.abrupt("return",c.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ca(e){var t=e.response;return t?"".concat(t.status," (").concat(t.statusText,"): ").concat(t.data):"error: no error response data available"}function wa(e){var t=e.response;return t?t.data:"Unknown error occurred. See the logs for details."}function Ra(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 Ia(e,t){var a=e-t;return Ra(Math.floor(a/1e3))}function qa(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 Na(e){try{var t=Ia(Date.parse(e),Date.now());return t.totalSeconds<1?"now":"in "+qa(t)}catch(a){return"-"}}function Pa(e){if("0001-01-01T00:00:00Z"===e)return"-";try{return Da(Date.parse(e)/1e3)}catch(t){return console.error("Could not parse timestamp: ",e,t),"-"}}function Da(e){return 0===e?"":qa(Ia(Date.now(),1e3*e))+" ago"}function La(e){var t=e.indexOf("-");return-1===t?e:e.substr(0,t)}function Ba(e,t){if(0===t)return"0.00%";var a=(e/t*100).toFixed(2);return"".concat(a," %")}function Ha(e){return function(e){try{JSON.parse(e)}catch(t){return!1}return!0}(e)?JSON.stringify(JSON.parse(e),null,2):e}function za(){return Math.floor(Date.now()/1e3)}var Ua=/([0-9]*(\.[0-9]*)?)[s|m|h]/;var Ka="LIST_QUEUES_BEGIN",Ga="LIST_QUEUES_SUCCESS",Ma="LIST_QUEUES_ERROR",Va="DELETE_QUEUE_BEGIN",Fa="DELETE_QUEUE_SUCCESS",Qa="DELETE_QUEUE_ERROR",Ya="PAUSE_QUEUE_BEGIN",Wa="PAUSE_QUEUE_SUCCESS",Ja="PAUSE_QUEUE_ERROR",$a="RESUME_QUEUE_BEGIN",Za="RESUME_QUEUE_SUCCESS",Xa="RESUME_QUEUE_ERROR";function en(){return function(){var e=Object(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:Ka}),e.prev=1,e.next=4,Re();case 4:a=e.sent,t({type:Ga,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listQueuesAsync: ".concat(Ca(e.t0))),t({type:Ma,error:wa(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}function tn(e){return function(){var t=Object(ke.a)(_e.a.mark((function t(a){return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Va,queue:e}),t.prev=1,t.next=4,qe(e);case 4:a({type:Fa,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0),a({type:Qa,queue:e,error:wa(t.t0)});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()}var an="LIST_QUEUE_STATS_BEGIN",nn="LIST_QUEUE_STATS_SUCCESS",rn="LIST_QUEUE_STATS_ERROR";var cn=a(855),sn=a(856),on=a(860),ln=a(204),un=a(205),dn=a(167),jn=a(164),bn=a(369);var pn=function(e){var t=Object(ae.a)(),a=Object(b.f)();return Object(de.jsx)(cn.a,{children:Object(de.jsxs)(sn.a,{data:e.data,maxBarSize:120,onClick:function(t){var n=e.data.map((function(e){return e.queue}));t&&t.activeLabel&&n.includes(t.activeLabel)&&a.push(F(t.activeLabel))},style:{cursor:"pointer"},children:[Object(de.jsx)(on.a,{strokeDasharray:"3 3"}),Object(de.jsx)(ln.a,{dataKey:"queue",stroke:t.palette.text.secondary}),Object(de.jsx)(un.a,{stroke:t.palette.text.secondary}),Object(de.jsx)(dn.a,{}),Object(de.jsx)(jn.a,{}),Object(de.jsx)(bn.a,{dataKey:"active",stackId:"a",fill:"#1967d2"}),Object(de.jsx)(bn.a,{dataKey:"pending",stackId:"a",fill:"#669df6"}),Object(de.jsx)(bn.a,{dataKey:"scheduled",stackId:"a",fill:"#fdd663"}),Object(de.jsx)(bn.a,{dataKey:"retry",stackId:"a",fill:"#f666a9"}),Object(de.jsx)(bn.a,{dataKey:"archived",stackId:"a",fill:"#ac4776"}),Object(de.jsx)(bn.a,{dataKey:"completed",stackId:"a",fill:"#4bb543"})]})})};var hn=function(e){var t=Object(ae.a)();return Object(de.jsx)(cn.a,{children:Object(de.jsxs)(sn.a,{data:e.data,maxBarSize:120,children:[Object(de.jsx)(on.a,{strokeDasharray:"3 3"}),Object(de.jsx)(ln.a,{dataKey:"queue",stroke:t.palette.text.secondary}),Object(de.jsx)(un.a,{stroke:t.palette.text.secondary}),Object(de.jsx)(dn.a,{}),Object(de.jsx)(jn.a,{}),Object(de.jsx)(bn.a,{dataKey:"succeeded",stackId:"a",fill:t.palette.success.light}),Object(de.jsx)(bn.a,{dataKey:"failed",stackId:"a",fill:t.palette.error.light})]})})},On=a(11),fn=a(41),mn=a(867),xn=a(871),gn=a(870),vn=a(866),yn=a(868),kn=a(869),Sn=a(910),_n=a(872),Tn=a(337),En=a.n(Tn),An=a(336),Cn=a.n(An),wn=a(54),Rn=a.n(wn),In=a(57),qn=a.n(In),Nn=a(812),Pn=a(861),Dn=a(865),Ln=a(863),Bn=a(864),Hn=a(862);var zn,Un=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:tn})((function(e){return Object(de.jsx)(Pn.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(de.jsxs)(de.Fragment,{children:[Object(de.jsx)(Hn.a,{id:"alert-dialog-title",children:"Queue is not empty"}),Object(de.jsx)(Ln.a,{children:Object(de.jsxs)(Bn.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(de.jsx)(Dn.a,{children:Object(de.jsx)(Nn.a,{onClick:e.onClose,color:"primary",children:"OK"})})]}):Object(de.jsxs)(de.Fragment,{children:[Object(de.jsxs)(Hn.a,{id:"alert-dialog-title",children:['Are you sure you want to delete "',e.queue.queue,'"?']}),Object(de.jsx)(Ln.a,{children:Object(de.jsx)(Bn.a,{id:"alert-dialog-description",children:"You can't undo this action."})}),Object(de.jsxs)(Dn.a,{children:[Object(de.jsx)(Nn.a,{onClick:e.onClose,disabled:e.requestPending,color:"primary",children:"Cancel"}),Object(de.jsx)(Nn.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"}(zn||(zn={}));var Kn,Gn=a(143),Mn=a.n(Gn),Vn=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.Latency=4]="Latency",e[e.Processed=5]="Processed",e[e.Failed=6]="Failed",e[e.ErrorRate=7]="ErrorRate",e[e.None=8]="None"}(Kn||(Kn={}));var Fn=[{label:"Queue",key:"queue",sortBy:Kn.Queue,align:"left"},{label:"State",key:"state",sortBy:Kn.State,align:"left"},{label:"Size",key:"size",sortBy:Kn.Size,align:"right"},{label:"Memory usage",key:"memory_usage",sortBy:Kn.MemoryUsage,align:"right"},{label:"Latency",key:"latency",sortBy:Kn.Latency,align:"right"},{label:"Processed",key:"processed",sortBy:Kn.Processed,align:"right"},{label:"Failed",key:"failed",sortBy:Kn.Failed,align:"right"},{label:"Error rate",key:"error_rate",sortBy:Kn.ErrorRate,align:"right"},{label:"Actions",key:"actions",sortBy:Kn.None,align:"center"}];function Qn(e,t){var a=Object(fn.a)(e);return a.sort(t),a}function Yn(e){var t=Vn(),a=Object(n.useState)(Kn.Queue),c=Object(On.a)(a,2),s=c[0],i=c[1],o=Object(n.useState)(zn.Asc),l=Object(On.a)(o,2),u=l[0],j=l[1],b=Object(n.useState)(null),p=Object(On.a)(b,2),h=p[0],O=p[1];return Object(de.jsxs)(r.a.Fragment,{children:[Object(de.jsx)(vn.a,{children:Object(de.jsxs)(mn.a,{className:t.table,"aria-label":"queues overview table",children:[Object(de.jsx)(yn.a,{children:Object(de.jsx)(kn.a,{children:Fn.filter((function(e){return!window.READ_ONLY||"actions"!==e.key})).map((function(e,a){return Object(de.jsx)(gn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:e.sortBy!==Kn.None?Object(de.jsx)(Sn.a,{active:s===e.sortBy,direction:u,onClick:(n=e.sortBy,function(e){if(n===s){var t=u===zn.Asc?zn.Desc:zn.Asc;j(t)}else i(n)}),children:e.label}):Object(de.jsx)("div",{children:e.label})},e.key);var n}))})}),Object(de.jsx)(xn.a,{children:Qn(e.queues,(function(e,t){var a;switch(s){case Kn.Queue:if(e.queue===t.queue)return 0;a=e.queue<t.queue;break;case Kn.State:if(e.paused===t.paused)return 0;a=!e.paused;break;case Kn.Size:if(e.size===t.size)return 0;a=e.size<t.size;break;case Kn.MemoryUsage:if(e.memory_usage_bytes===t.memory_usage_bytes)return 0;a=e.memory_usage_bytes<t.memory_usage_bytes;break;case Kn.Latency:if(e.latency_msec===t.latency_msec)return 0;a=e.latency_msec<t.latency_msec;break;case Kn.Processed:if(e.processed===t.processed)return 0;a=e.processed<t.processed;break;case Kn.Failed:if(e.failed===t.failed)return 0;a=e.failed<t.failed;break;case Kn.ErrorRate:var n=e.failed/e.processed,r=t.failed/t.processed;if(n===r)return 0;a=n<r;break;default:throw"Unexpected order by value: ".concat(s)}return u===zn.Asc?a?-1:1:a?1:-1})).map((function(t){return Object(de.jsx)(Jn,{queue:t,onPauseClick:function(){return e.onPauseClick(t.queue)},onResumeClick:function(){return e.onResumeClick(t.queue)},onDeleteClick:function(){return O(t)}},t.queue)}))})]})}),Object(de.jsx)(Un,{onClose:function(){O(null)},queue:h})]})}var Wn=Object(p.a)((function(e){return{row:{"&:last-child td":{borderBottomWidth:0},"&:last-child th":{borderBottomWidth:0}},linkText:{textDecoration:"none",color:e.palette.text.primary,"&:hover":{textDecoration:"underline"}},textGreen:{color:e.palette.success.dark},textRed:{color:e.palette.error.dark},boldCell:{fontWeight:600},fixedCell:{position:"sticky",zIndex:1,left:0,background:e.palette.background.paper},actionIconsContainer:{display:"flex",justifyContent:"center",minWidth:"100px"}}}));function Jn(e){var t=Wn(),a=e.queue,c=Object(n.useState)(!1),s=Object(On.a)(c,2),i=s[0],o=s[1];return Object(de.jsxs)(kn.a,{className:t.row,children:[Object(de.jsx)(gn.a,{component:"th",scope:"row",className:Object(d.default)(t.boldCell,t.fixedCell),children:Object(de.jsx)(j.b,{to:F(a.queue),className:t.linkText,children:a.queue})}),Object(de.jsx)(gn.a,{children:a.paused?Object(de.jsx)("span",{className:t.textRed,children:"paused"}):Object(de.jsx)("span",{className:t.textGreen,children:"run"})}),Object(de.jsx)(gn.a,{align:"right",children:a.size}),Object(de.jsx)(gn.a,{align:"right",children:Mn()(a.memory_usage_bytes)}),Object(de.jsx)(gn.a,{align:"right",children:a.display_latency}),Object(de.jsx)(gn.a,{align:"right",children:a.processed}),Object(de.jsx)(gn.a,{align:"right",children:a.failed}),Object(de.jsx)(gn.a,{align:"right",children:Ba(a.failed,a.processed)}),!window.READ_ONLY&&Object(de.jsx)(gn.a,{align:"center",onMouseEnter:function(){return o(!0)},onMouseLeave:function(){return o(!1)},children:Object(de.jsx)("div",{className:t.actionIconsContainer,children:i?Object(de.jsxs)(r.a.Fragment,{children:[a.paused?Object(de.jsx)(_n.a,{title:"Resume",children:Object(de.jsx)(_.a,{color:"secondary",onClick:e.onResumeClick,disabled:a.requestPending,size:"small",children:Object(de.jsx)(Cn.a,{fontSize:"small"})})}):Object(de.jsx)(_n.a,{title:"Pause",children:Object(de.jsx)(_.a,{color:"primary",onClick:e.onPauseClick,disabled:a.requestPending,size:"small",children:Object(de.jsx)(En.a,{fontSize:"small"})})}),Object(de.jsx)(_n.a,{title:"Delete",children:Object(de.jsx)(_.a,{onClick:e.onDeleteClick,size:"small",children:Object(de.jsx)(Rn.a,{fontSize:"small"})})})]}):Object(de.jsx)(_.a,{size:"small",children:Object(de.jsx)(qn.a,{fontSize:"small"})})})})]},a.queue)}var $n=a(9),Zn=Object($n.a)((function(e){return{tooltip:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",maxWidth:400,fontSize:e.typography.pxToRem(12),border:"1px solid #dadde9"}}}))(_n.a),Xn=a(873),er=a(338),tr=a.n(er),ar=a(814),nr=a(252),rr=a(813),cr=a(874),sr=a(815),ir=Object(p.a)((function(e){return{popper:{zIndex:2},buttonContained:{backgroundColor:kr(e)?"#303030":e.palette.background.default,color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover}}}}));function or(e){var t=ir(),a=r.a.useState(!1),n=Object(On.a)(a,2),c=n[0],s=n[1],i=r.a.useRef(null),o=r.a.useState(e.initialSelectedKey),l=Object(On.a)(o,2),d=l[0],j=l[1],b=function(e){i.current&&i.current.contains(e.target)||s(!1)},p=e.options.find((function(e){return e.key===d}));return Object(de.jsxs)(de.Fragment,{children:[Object(de.jsxs)(Xn.a,{variant:"contained",ref:i,"aria-label":"split button",size:"small",disableElevation:!0,children:[Object(de.jsx)(Nn.a,{classes:{contained:t.buttonContained},children:p?p.label:"Select Option"}),Object(de.jsx)(Nn.a,{size:"small","aria-controls":c?"split-button-menu":void 0,"aria-expanded":c?"true":void 0,"aria-label":"select option","aria-haspopup":"menu",onClick:function(){s((function(e){return!e}))},classes:{contained:t.buttonContained},children:Object(de.jsx)(tr.a,{})})]}),Object(de.jsx)(rr.a,{open:c,anchorEl:i.current,role:void 0,transition:!0,disablePortal:!0,className:t.popper,children:function(t){var a=t.TransitionProps,n=t.placement;return Object(de.jsx)(nr.a,Object(u.a)(Object(u.a)({},a),{},{style:{transformOrigin:"bottom"===n?"center top":"center bottom"},children:Object(de.jsx)(fe.a,{children:Object(de.jsx)(ar.a,{onClickAway:b,children:Object(de.jsx)(sr.a,{id:"split-button-menu",children:e.options.map((function(t){return Object(de.jsx)(cr.a,{selected:t.key===d,onClick:function(a){return n=t.key,j(n),s(!1),void e.onSelect(n);var n},children:t.label},t.key)}))})})})}))}})]})}function lr(e,t){Object(n.useEffect)((function(){e();var a=setInterval(e,1e3*t);return function(){return clearInterval(a)}}),[t,e])}function ur(){var e=Object(b.g)().search;return Object(n.useMemo)((function(){return new URLSearchParams(e)}),[e])}var dr=a(42),jr=a(875),br=a(339);function pr(e){var t=function(e,t){var a={};for(var n in e){var r,c=Object(dr.a)(e[n]);try{for(c.s();!(r=c.n()).done;){var s=r.value;a.hasOwnProperty(s.date)||(a[s.date]={succeeded:0,failed:0,date:s.date}),a[s.date].succeeded+=s.processed-s.failed,a[s.date].failed+=s.failed}}catch(i){c.e(i)}finally{c.f()}}return Object.values(a).sort(hr).slice(-t)}(e.data,e.numDays),a=Object(ae.a)();return Object(de.jsx)(cn.a,{children:Object(de.jsxs)(jr.a,{data:t,children:[Object(de.jsx)(on.a,{strokeDasharray:"3 3"}),Object(de.jsx)(ln.a,{dataKey:"date",minTickGap:10,stroke:a.palette.text.secondary}),Object(de.jsx)(un.a,{stroke:a.palette.text.secondary}),Object(de.jsx)(dn.a,{}),Object(de.jsx)(jn.a,{}),Object(de.jsx)(br.a,{type:"monotone",dataKey:"succeeded",stroke:a.palette.success.main}),Object(de.jsx)(br.a,{type:"monotone",dataKey:"failed",stroke:a.palette.error.main})]})})}function hr(e,t){return Date.parse(e.date)-Date.parse(t.date)}var Or=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"},chartHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:e.spacing(2)},chartHeaderTitle:{display:"flex",alignItems:"center"},chartContainer:{width:"100%",height:"300px"},infoIcon:{marginLeft:e.spacing(1),color:e.palette.grey[500],cursor:"pointer"},tooltipSection:{marginBottom:"4px"},tableContainer:{marginBottom:e.spacing(2)}}}));var fr={listQueuesAsync:en,pauseQueueAsync:function(e){return function(){var t=Object(ke.a)(_e.a.mark((function t(a){return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Ya,queue:e}),t.prev=1,t.next=4,Pe(e);case 4:a({type:Wa,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("pauseQueueAsynq: ",Ca(t.t0)),a({type:Ja,queue:e,error:wa(t.t0)});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},resumeQueueAsync:function(e){return function(){var t=Object(ke.a)(_e.a.mark((function t(a){return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:$a,queue:e}),t.prev=1,t.next=4,Le(e);case 4:a({type:Za,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("resumeQueueAsync: ",Ca(t.t0)),a({type:Xa,queue:e,error:wa(t.t0)});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},deleteQueueAsync:tn,listQueueStatsAsync:function(){return function(){var e=Object(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:an}),e.prev=1,e.next=4,He();case 4:a=e.sent,t({type:nn,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listQueueStatsAsync: ",Ca(e.t0)),t({type:rn,error:wa(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()},dailyStatsKeyChange:function(e){return{type:X,value:e}}};var mr,xr=Object(o.b)((function(e){return{loading:e.queues.loading,queues:e.queues.data.map((function(e){return Object(u.a)(Object(u.a)({},e.currentStats),{},{requestPending:e.requestPending})})),error:e.queues.error,pollInterval:e.settings.pollInterval,queueStats:e.queueStats.data,dailyStatsKey:e.settings.dailyStatsChartType}}),fr)((function(e){var t=e.pollInterval,a=e.listQueuesAsync,r=e.queues,c=e.listQueueStatsAsync,s=e.dailyStatsKey,i=Or();lr(a,t);var o=r.map((function(e){return e.queue})).sort().join(",");Object(n.useEffect)((function(){c()}),[c,o]);var l=r.map((function(e){return{queue:e.queue,succeeded:e.processed-e.failed,failed:e.failed}}));return Object(de.jsx)(he.a,{maxWidth:"lg",className:i.container,children:Object(de.jsxs)(Oe.a,{container:!0,spacing:3,children:[e.error.length>0&&Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsxs)(ve.a,{severity:"error",children:[Object(de.jsx)(ye.a,{children:"Error"}),"Could not retrieve queues live data \u2014"," ",Object(de.jsx)("strong",{children:"See the logs for details"})]})}),Object(de.jsx)(Oe.a,{item:!0,xs:6,children:Object(de.jsxs)(fe.a,{className:i.paper,variant:"outlined",children:[Object(de.jsx)("div",{className:i.chartHeader,children:Object(de.jsxs)("div",{className:i.chartHeaderTitle,children:[Object(de.jsx)(me.a,{variant:"h6",children:"Queue Size"}),Object(de.jsx)(Zn,{title:Object(de.jsxs)("div",{children:[Object(de.jsx)("div",{className:i.tooltipSection,children:"Total number of tasks in the queue"}),Object(de.jsxs)("div",{className:i.tooltipSection,children:[Object(de.jsx)("strong",{children:"Active"}),": number of tasks currently being processed"]}),Object(de.jsxs)("div",{className:i.tooltipSection,children:[Object(de.jsx)("strong",{children:"Pending"}),": number of tasks ready to be processed"]}),Object(de.jsxs)("div",{className:i.tooltipSection,children:[Object(de.jsx)("strong",{children:"Scheduled"}),": number of tasks scheduled to be processed in the future"]}),Object(de.jsxs)("div",{className:i.tooltipSection,children:[Object(de.jsx)("strong",{children:"Retry"}),": number of tasks scheduled to be retried in the future"]}),Object(de.jsxs)("div",{children:[Object(de.jsx)("strong",{children:"Archived"}),": number of tasks exhausted their retries"]})]}),children:Object(de.jsx)(ge.a,{fontSize:"small",className:i.infoIcon})})]})}),Object(de.jsx)("div",{className:i.chartContainer,children:Object(de.jsx)(pn,{data:r})})]})}),Object(de.jsx)(Oe.a,{item:!0,xs:6,children:Object(de.jsxs)(fe.a,{className:i.paper,variant:"outlined",children:[Object(de.jsxs)("div",{className:i.chartHeader,children:[Object(de.jsxs)("div",{className:i.chartHeaderTitle,children:[Object(de.jsx)(me.a,{variant:"h6",children:"Tasks Processed"}),Object(de.jsx)(Zn,{title:Object(de.jsxs)("div",{children:[Object(de.jsx)("div",{className:i.tooltipSection,children:"Total number of tasks processed in a given day (UTC)"}),Object(de.jsxs)("div",{className:i.tooltipSection,children:[Object(de.jsx)("strong",{children:"Succeeded"}),": number of tasks successfully processed"]}),Object(de.jsxs)("div",{children:[Object(de.jsx)("strong",{children:"Failed"}),": number of tasks failed to be processed"]})]}),children:Object(de.jsx)(ge.a,{fontSize:"small",className:i.infoIcon})})]}),Object(de.jsx)("div",{children:Object(de.jsx)(or,{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(de.jsxs)("div",{className:i.chartContainer,children:["today"===s&&Object(de.jsx)(hn,{data:l}),"last-7d"===s&&Object(de.jsx)(pr,{data:e.queueStats,numDays:7}),"last-30d"===s&&Object(de.jsx)(pr,{data:e.queueStats,numDays:30}),"last-90d"===s&&Object(de.jsx)(pr,{data:e.queueStats,numDays:90})]})]})}),Object(de.jsx)(Oe.a,{item:!0,xs:12,className:i.tableContainer,children:Object(de.jsx)(fe.a,{className:i.paper,variant:"outlined",children:Object(de.jsx)(Yn,{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"}(mr||(mr={}));var gr={pollInterval:8,themePreference:mr.SystemDefault,isDrawerOpen:!0,taskRowsPerPage:20,dailyStatsChartType:"last-7d"};var vr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case W:return Object(u.a)(Object(u.a)({},e),{},{pollInterval:t.value});case J:return Object(u.a)(Object(u.a)({},e),{},{themePreference:t.value});case $:return Object(u.a)(Object(u.a)({},e),{},{isDrawerOpen:!e.isDrawerOpen});case Z:return Object(u.a)(Object(u.a)({},e),{},{taskRowsPerPage:t.value});case X:return Object(u.a)(Object(u.a)({},e),{},{dailyStatsChartType:t.value});default:return e}},yr=a(879);function kr(e){return"dark"===e.palette.type}var Sr="CLOSE_SNACKBAR";var _r=Object(p.a)((function(e){return{listItem:{borderTopRightRadius:"24px",borderBottomRightRadius:"24px"},selected:{backgroundColor:kr(e)?"".concat(e.palette.secondary.main,"30"):"".concat(e.palette.primary.main,"30")},selectedText:{fontWeight:600,color:kr(e)?e.palette.secondary.main:e.palette.primary.main},selectedIcon:{color:kr(e)?e.palette.secondary.main:e.palette.primary.main}}}));var Tr=function(e){var t=_r(),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(de.jsx)(j.b,Object(u.a)({to:c,ref:t},e))}))}),[c]);return Object(de.jsx)("li",{children:Object(de.jsx)(_n.a,{title:n,placement:"right",children:Object(de.jsxs)(g.a,{button:!0,component:i,className:Object(d.default)(t.listItem,s&&t.selected),children:[a&&Object(de.jsx)(v.a,{className:Object(d.default)(s&&t.selectedIcon),children:a}),Object(de.jsx)(y.a,{primary:n,classes:{primary:s?t.selectedText:void 0}})]})})})},Er=a(255),Ar=a(344),Cr=a.n(Ar),wr=a(902),Rr=a(340),Ir=a(341);function qr(e){var t=kr(Object(ae.a)())?Rr.a:Ir.a;return Object(de.jsx)(wr.a,{language:e.language,style:t,customStyle:e.customStyle,children:e.children})}var Nr=a(343),Pr=a.n(Nr),Dr="LIST_SCHEDULER_ENTRIES_BEGIN",Lr="LIST_SCHEDULER_ENTRIES_SUCCESS",Br="LIST_SCHEDULER_ENTRIES_ERROR",Hr="LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN",zr="LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS",Ur="LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR";function Kr(e,t){return e.enqueueEventsByEntryId[t]||{data:[],loading:!1}}var Gr={loading:!1,data:[],error:"",enqueueEventsByEntryId:{}};var Mr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Dr:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Lr:return Object(u.a)(Object(u.a)({},e),{},{error:"",loading:!1,data:t.payload.entries});case Br:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case Hr:var a=Kr(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 zr:var n=function(e,t){return Date.parse(t.enqueued_at)-Date.parse(e.enqueued_at)},r=Kr(e,t.entryId),c=Pr()([].concat(Object(fn.a)(r.data),Object(fn.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 Ur:var s=Kr(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}},Vr=Object(p.a)((function(e){return{table:{height:"80vh"},stickyHeaderCell:{background:e.palette.background.paper}}}));var Fr=Object(o.b)((function(e,t){return{events:Kr(e.schedulerEntries,t.entryId)}}),{listSchedulerEnqueueEventsAsync:function(e){return function(){var t=Object(ke.a)(_e.a.mark((function t(a){var n;return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Hr,entryId:e}),t.prev=1,t.next=4,ka(e);case 4:n=t.sent,a({type:zr,payload:n,entryId:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("listSchedulerEnqueueEventsAsync: ",Ca(t.t0)),a({type:Ur,error:wa(t.t0),entryId:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()}});var Qr,Yr=Fr((function(e){var t=Vr(),a=e.listSchedulerEnqueueEventsAsync,r=e.entryId,c=e.events;return Object(n.useEffect)((function(){a(r)}),[r,a]),Object(de.jsx)(vn.a,{className:t.table,children:Object(de.jsxs)(mn.a,{stickyHeader:!0,"aria-label":"scheduler enqueue events table",size:"small",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[Object(de.jsx)(gn.a,{classes:{stickyHeader:t.stickyHeaderCell},children:"Enqueued"}),Object(de.jsx)(gn.a,{classes:{stickyHeader:t.stickyHeaderCell},children:"Task ID"})]})}),Object(de.jsx)(xn.a,{children:c.data.map((function(e){return Object(de.jsxs)(kn.a,{children:[Object(de.jsx)(gn.a,{component:"th",scope:"row",children:Pa(e.enqueued_at)}),Object(de.jsx)(gn.a,{children:e.task_id})]},e.task_id)}))})]})})})),Wr=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"}(Qr||(Qr={}));var Jr=[{label:"Entry ID",key:"entry_id",sortBy:Qr.EntryId,align:"left"},{label:"Spec",key:"spec",sortBy:Qr.Spec,align:"left"},{label:"Type",key:"type",sortBy:Qr.Type,align:"left"},{label:"Payload",key:"task_payload",sortBy:Qr.Payload,align:"left"},{label:"Options",key:"options",sortBy:Qr.Options,align:"left"},{label:"Next Enqueue",key:"next_enqueue",sortBy:Qr.NextEnqueue,align:"left"},{label:"Prev Enqueue",key:"prev_enqueue",sortBy:Qr.PrevEnqueue,align:"left"},{label:"",key:"show_history",sortBy:Qr.None,align:"left"}];function $r(e,t){var a=Object(fn.a)(e);return a.sort(t),a}function Zr(e){var t=Wr(),a=Object(n.useState)(Qr.EntryId),r=Object(On.a)(a,2),c=r[0],s=r[1],i=Object(n.useState)(zn.Asc),o=Object(On.a)(i,2),l=o[0],u=o[1],j=Object(n.useState)(""),b=Object(On.a)(j,2),p=b[0],h=b[1];return 0===e.entries.length?Object(de.jsxs)(ve.a,{severity:"info",children:[Object(de.jsx)(ye.a,{children:"Info"}),"No entries found at this time."]}):Object(de.jsx)(de.Fragment,{children:Object(de.jsxs)(vn.a,{children:[Object(de.jsxs)(mn.a,{className:t.table,"aria-label":"scheduler entries table",children:[Object(de.jsx)(yn.a,{children:Object(de.jsx)(kn.a,{children:Jr.map((function(e,a){return Object(de.jsx)(gn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:Object(de.jsx)(Sn.a,{active:e.sortBy===c,direction:l,onClick:(n=e.sortBy,function(e){if(n===c){var t=l===zn.Asc?zn.Desc:zn.Asc;u(t)}else s(n)}),children:e.label})},e.key);var n}))})}),Object(de.jsx)(xn.a,{children:$r(e.entries,(function(e,t){var a;switch(c){case Qr.EntryId:if(e.id===t.id)return 0;a=e.id<t.id;break;case Qr.Spec:if(e.spec===t.spec)return 0;a=e.spec<t.spec;break;case Qr.Type:if(e.task_type===t.task_type)return 0;a=e.task_type<t.task_type;break;case Qr.Payload:if(e.task_payload===t.task_payload)return 0;a=e.task_payload<t.task_payload;break;case Qr.Options:if(e.options===t.options)return 0;a=e.options<t.options;break;case Qr.NextEnqueue:if(e.next_enqueue_at===t.next_enqueue_at)return 0;a=e.next_enqueue_at<t.next_enqueue_at;break;case Qr.PrevEnqueue:var n=e.prev_enqueue_at||"",r=t.prev_enqueue_at||"";if(n===r)return 0;a=n<r;break;default:throw"Unexpected order by value: ".concat(c)}return l===zn.Asc?a?-1:1:a?1:-1})).map((function(t,a){return Object(de.jsx)(ec,{entry:t,isLastRow:a===e.entries.length-1,onShowHistoryClick:function(){return h(t.id)}},t.id)}))})]}),Object(de.jsx)(Er.a,{open:""!==p,onClose:function(){return h("")},className:t.modal,children:Object(de.jsxs)("div",{className:t.modalContent,children:[Object(de.jsx)(me.a,{variant:"h6",gutterBottom:!0,color:"textPrimary",children:"Recent History"}),Object(de.jsx)(Yr,{entryId:p})]})})]})})}var Xr=Object(p.a)((function(e){return{rowRoot:{"& > *":{borderBottom:"unset"}},noBorder:{border:"none"}}}));function ec(e){var t=e.entry,a=e.isLastRow,n=Xr();return Object(de.jsxs)(kn.a,{className:n.rowRoot,children:[Object(de.jsx)(gn.a,{component:"th",scope:"row",className:Object(d.default)(a&&n.noBorder),children:t.id}),Object(de.jsx)(gn.a,{className:Object(d.default)(a&&n.noBorder),children:t.spec}),Object(de.jsx)(gn.a,{className:Object(d.default)(a&&n.noBorder),children:t.task_type}),Object(de.jsx)(gn.a,{className:Object(d.default)(a&&n.noBorder),children:Object(de.jsx)(qr,{language:"json",children:Ha(t.task_payload)})}),Object(de.jsx)(gn.a,{className:Object(d.default)(a&&n.noBorder),children:Object(de.jsx)(qr,{language:"go",children:t.options.length>0?t.options.join(", "):"No options"})}),Object(de.jsx)(gn.a,{className:Object(d.default)(a&&n.noBorder),children:Na(t.next_enqueue_at)}),Object(de.jsx)(gn.a,{className:Object(d.default)(a&&n.noBorder),children:t.prev_enqueue_at?Pa(t.prev_enqueue_at):"N/A"}),Object(de.jsx)(gn.a,{children:Object(de.jsx)(_n.a,{title:"See History",children:Object(de.jsx)(_.a,{"aria-label":"expand row",size:"small",onClick:e.onShowHistoryClick,children:Object(de.jsx)(Cr.a,{})})})})]})}var tc=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 ac=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(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:Dr}),e.prev=1,e.next=4,va();case 4:a=e.sent,t({type:Lr,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listSchedulerEnqueueEventsAsync: ".concat(Ca(e.t0))),t({type:Br,error:wa(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}});var nc=ac((function(e){var t=e.pollInterval,a=e.listSchedulerEntriesAsync,n=tc();return lr(a,t),Object(de.jsx)(he.a,{maxWidth:"lg",className:n.container,children:Object(de.jsx)(Oe.a,{container:!0,spacing:3,children:""===e.error?Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsxs)(fe.a,{className:n.paper,variant:"outlined",children:[Object(de.jsx)(me.a,{variant:"h6",className:n.heading,children:"Scheduler Entries"}),Object(de.jsx)(Zr,{entries:e.entries})]})}):Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsxs)(ve.a,{severity:"error",children:[Object(de.jsx)(ye.a,{children:"Error"}),"Could not retrieve scheduler entries live data \u2014"," ",Object(de.jsx)("strong",{children:"See the logs for details"})]})})})})})),rc=a(6),cc=a(911),sc=a(375),ic=a(346),oc=a.n(ic),lc=a(905),uc=a(882),dc=a(906),jc=a(251),bc=a.n(jc),pc=a(73),hc=a.n(pc),Oc="GET_TASK_INFO_BEGIN",fc="GET_TASK_INFO_SUCCESS",mc="GET_TASK_INFO_ERROR",xc="LIST_ACTIVE_TASKS_BEGIN",gc="LIST_ACTIVE_TASKS_SUCCESS",vc="LIST_ACTIVE_TASKS_ERROR",yc="LIST_PENDING_TASKS_BEGIN",kc="LIST_PENDING_TASKS_SUCCESS",Sc="LIST_PENDING_TASKS_ERROR",_c="LIST_SCHEDULED_TASKS_BEGIN",Tc="LIST_SCHEDULED_TASKS_SUCCESS",Ec="LIST_SCHEDULED_TASKS_ERROR",Ac="LIST_RETRY_TASKS_BEGIN",Cc="LIST_RETRY_TASKS_SUCCESS",wc="LIST_RETRY_TASKS_ERROR",Rc="LIST_ARCHIVED_TASKS_BEGIN",Ic="LIST_ARCHIVED_TASKS_SUCCESS",qc="LIST_ARCHIVED_TASKS_ERROR",Nc="LIST_COMPLETED_TASKS_BEGIN",Pc="LIST_COMPLETED_TASKS_SUCCESS",Dc="LIST_COMPLETED_TASKS_ERROR",Lc="CANCEL_ACTIVE_TASK_BEGIN",Bc="CANCEL_ACTIVE_TASK_SUCCESS",Hc="CANCEL_ACTIVE_TASK_ERROR",zc="CANCEL_ALL_ACTIVE_TASKS_BEGIN",Uc="CANCEL_ALL_ACTIVE_TASKS_SUCCESS",Kc="CANCEL_ALL_ACTIVE_TASKS_ERROR",Gc="BATCH_CANCEL_ACTIVE_TASKS_BEGIN",Mc="BATCH_CANCEL_ACTIVE_TASKS_SUCCESS",Vc="BATCH_CANCEL_ACTIVE_TASKS_ERROR",Fc="RUN_SCHEDULED_TASK_BEGIN",Qc="RUN_SCHEDULED_TASK_SUCCESS",Yc="RUN_SCHEDULED_TASK_ERROR",Wc="RUN_RETRY_TASK_BEGIN",Jc="RUN_RETRY_TASK_SUCCESS",$c="RUN_RETRY_TASK_ERROR",Zc="RUN_ARCHIVED_TASK_BEGIN",Xc="RUN_ARCHIVED_TASK_SUCCESS",es="RUN_ARCHIVED_TASK_ERROR",ts="DELETE_PENDING_TASK_BEGIN",as="DELETE_PENDING_TASK_SUCCESS",ns="DELETE_PENDING_TASK_ERROR",rs="ARCHIVE_PENDING_TASK_BEGIN",cs="ARCHIVE_PENDING_TASK_SUCCESS",ss="ARCHIVE_PENDING_TASK_ERROR",is="DELETE_SCHEDULED_TASK_BEGIN",os="DELETE_SCHEDULED_TASK_SUCCESS",ls="DELETE_SCHEDULED_TASK_ERROR",us="ARCHIVE_SCHEDULED_TASK_BEGIN",ds="ARCHIVE_SCHEDULED_TASK_SUCCESS",js="ARCHIVE_SCHEDULED_TASK_ERROR",bs="ARCHIVE_RETRY_TASK_BEGIN",ps="ARCHIVE_RETRY_TASK_SUCCESS",hs="ARCHIVE_RETRY_TASK_ERROR",Os="BATCH_ARCHIVE_PENDING_TASKS_BEGIN",fs="BATCH_ARCHIVE_PENDING_TASKS_SUCCESS",ms="BATCH_RUN_PENDING_TASKS_ERROR",xs="BATCH_DELETE_PENDING_TASKS_BEGIN",gs="BATCH_DELETE_PENDING_TASKS_SUCCESS",vs="BATCH_DELETE_PENDING_TASKS_ERROR",ys="DELETE_ALL_PENDING_TASKS_BEGIN",ks="DELETE_ALL_PENDING_TASKS_SUCCESS",Ss="DELETE_ALL_PENDING_TASKS_ERROR",_s="ARCHIVE_ALL_PENDING_TASKS_BEGIN",Ts="ARCHIVE_ALL_PENDING_TASKS_SUCCESS",Es="ARCHIVE_ALL_PENDING_TASKS_ERROR",As="BATCH_RUN_SCHEDULED_TASKS_BEGIN",Cs="BATCH_RUN_SCHEDULED_TASKS_SUCCESS",ws="BATCH_RUN_SCHEDULED_TASKS_ERROR",Rs="BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN",Is="BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS",qs="BATCH_RUN_SCHEDULED_TASKS_ERROR",Ns="BATCH_DELETE_SCHEDULED_TASKS_BEGIN",Ps="BATCH_DELETE_SCHEDULED_TASKS_SUCCESS",Ds="BATCH_DELETE_SCHEDULED_TASKS_ERROR",Ls="RUN_ALL_SCHEDULED_TASKS_BEGIN",Bs="RUN_ALL_SCHEDULED_TASKS_SUCCESS",Hs="RUN_ALL_SCHEDULED_TASKS_ERROR",zs="ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN",Us="ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS",Ks="ARCHIVE_ALL_SCHEDULED_TASKS_ERROR",Gs="DELETE_ALL_SCHEDULED_TASKS_BEGIN",Ms="DELETE_ALL_SCHEDULED_TASKS_SUCCESS",Vs="DELETE_ALL_SCHEDULED_TASKS_ERROR",Fs="DELETE_RETRY_TASK_BEGIN",Qs="DELETE_RETRY_TASK_SUCCESS",Ys="DELETE_RETRY_TASK_ERROR",Ws="BATCH_RUN_RETRY_TASKS_BEGIN",Js="BATCH_RUN_RETRY_TASKS_SUCCESS",$s="BATCH_RUN_RETRY_TASKS_ERROR",Zs="BATCH_ARCHIVE_RETRY_TASKS_BEGIN",Xs="BATCH_ARCHIVE_RETRY_TASKS_SUCCESS",ei="BATCH_ARCHIVE_RETRY_TASKS_ERROR",ti="BATCH_DELETE_RETRY_TASKS_BEGIN",ai="BATCH_DELETE_RETRY_TASKS_SUCCESS",ni="BATCH_DELETE_RETRY_TASKS_ERROR",ri="RUN_ALL_RETRY_TASKS_BEGIN",ci="RUN_ALL_RETRY_TASKS_SUCCESS",si="RUN_ALL_RETRY_TASKS_ERROR",ii="ARCHIVE_ALL_RETRY_TASKS_BEGIN",oi="ARCHIVE_ALL_RETRY_TASKS_SUCCESS",li="ARCHIVE_ALL_RETRY_TASKS_ERROR",ui="DELETE_ALL_RETRY_TASKS_BEGIN",di="DELETE_ALL_RETRY_TASKS_SUCCESS",ji="DELETE_ALL_RETRY_TASKS_ERROR",bi="DELETE_ARCHIVED_TASK_BEGIN",pi="DELETE_ARCHIVED_TASK_SUCCESS",hi="DELETE_ARCHIVED_TASK_ERROR",Oi="BATCH_RUN_ARCHIVED_TASKS_BEGIN",fi="BATCH_RUN_ARCHIVED_TASKS_SUCCESS",mi="BATCH_RUN_ARCHIVED_TASKS_ERROR",xi="BATCH_DELETE_ARCHIVED_TASKS_BEGIN",gi="BATCH_DELETE_ARCHIVED_TASKS_SUCCESS",vi="BATCH_DELETE_ARCHIVED_TASKS_ERROR",yi="RUN_ALL_ARCHIVED_TASKS_BEGIN",ki="RUN_ALL_ARCHIVED_TASKS_SUCCESS",Si="RUN_ALL_ARCHIVED_TASKS_ERROR",_i="DELETE_ALL_ARCHIVED_TASKS_BEGIN",Ti="DELETE_ALL_ARCHIVED_TASKS_SUCCESS",Ei="DELETE_ALL_ARCHIVED_TASKS_ERROR",Ai="DELETE_COMPLETED_TASK_BEGIN",Ci="DELETE_COMPLETED_TASK_SUCCESS",wi="DELETE_COMPLETED_TASK_ERROR",Ri="DELETE_ALL_COMPLETED_TASKS_BEGIN",Ii="DELETE_ALL_COMPLETED_TASKS_SUCCESS",qi="DELETE_ALL_COMPLETED_TASKS_ERROR",Ni="BATCH_DELETE_COMPLETED_TASKS_BEGIN",Pi="BATCH_DELETE_COMPLETED_TASKS_SUCCESS",Di="BATCH_DELETE_COMPLETED_TASKS_ERROR";var Li=a(345),Bi=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 Hi(e){var t=Bi(),a=Object(n.useState)(null),r=Object(On.a)(a,2),c=r[0],s=r[1],i=function(){return s(null)};return Object(de.jsxs)("div",{className:t.actionsContainer,children:[Object(de.jsx)(_n.a,{title:"More Actions",children:Object(de.jsx)(_.a,{"aria-label":"actions",className:t.moreIcon,onClick:function(e){s(e.currentTarget)},children:Object(de.jsx)(qn.a,{})})}),Object(de.jsx)(Li.a,{id:"action-menu",keepMounted:!0,anchorEl:c,open:Boolean(c),onClose:i,children:e.menuItemActions.map((function(e){return Object(de.jsx)(cr.a,{onClick:function(){e.onClick(),i()},disabled:e.disabled,children:e.label},e.label)}))}),e.showIconButtons&&Object(de.jsx)("div",{className:t.iconGroup,children:e.iconButtonActions.map((function(e){return Object(de.jsx)(_n.a,{title:e.tooltip,children:Object(de.jsx)(_.a,{onClick:e.onClick,disabled:e.disabled,children:e.icon})},e.tooltip)}))})]})}var zi=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Ui={listActiveTasksAsync:function(e,t){return function(){var a=Object(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:xc,queue:e}),a.prev=1,a.next=4,Ge(e,t);case 4:r=a.sent,n({type:gc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listActiveTasksAsync: ",Ca(a.t0)),n({type:vc,queue:e,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Lc,queue:e,taskId:t}),a.prev=1,a.next=4,Ve(e,t);case 4:n({type:Bc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("cancelActiveTaskAsync: ",Ca(a.t0)),n({type:Hc,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Gc,queue:e,taskIds:t}),a.prev=1,a.next=4,We(e,t);case 4:r=a.sent,n({type:Mc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchCancelActiveTasksAsync: ",Ca(a.t0)),n({type:Vc,error:wa(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(ke.a)(_e.a.mark((function t(a){return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:zc,queue:e}),t.prev=1,t.next=4,Qe(e);case 4:a({type:Uc,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("cancelAllActiveTasksAsync: ",Ca(t.t0)),a({type:Kc,error:wa(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},taskRowsPerPageChange:ee},Ki=[{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"}],Gi=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}}),Ui);var Mi=Object(p.a)((function(e){return{root:{cursor:"pointer","& #copy-button":{display:"none"},"&:hover":{boxShadow:e.shadows[2]},"&:hover $copyButton":{display:"inline-block"},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},idCell:{width:"200px"},copyButton:{display:"none"},IdGroup:{display:"flex",alignItems:"center"}}}));function Vi(e){var t=e.task,a=Mi(),n=Object(b.f)();return Object(de.jsxs)(kn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(de.jsx)(gn.a,{component:"th",scope:"row",className:a.idCell,children:Object(de.jsxs)("div",{className:a.IdGroup,children:[La(t.id),Object(de.jsx)(_n.a,{title:"Copy full ID to clipboard",children:Object(de.jsx)(_.a,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(t.id)},size:"small",className:a.copyButton,children:Object(de.jsx)(hc.a,{fontSize:"small"})})})]})}),Object(de.jsx)(gn.a,{children:t.type}),Object(de.jsx)(gn.a,{children:Object(de.jsx)(qr,{language:"json",customStyle:{margin:0,maxWidth:400},children:Ha(t.payload)})}),Object(de.jsx)(gn.a,{children:t.canceling?"Canceling":t.is_orphaned?"Orphaned":"Running"}),Object(de.jsx)(gn.a,{children:t.is_orphaned?"-":"-"===t.start_time?"just now":Pa(t.start_time)}),Object(de.jsx)(gn.a,{children:"-"===t.deadline?"-":Na(t.deadline)}),!window.READ_ONLY&&Object(de.jsx)(gn.a,{align:"center",onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(de.jsx)(r.a.Fragment,{children:Object(de.jsx)(_n.a,{title:"Cancel",children:Object(de.jsx)(_.a,{onClick:e.onCancelClick,disabled:t.requestPending||t.canceling||t.is_orphaned,size:"small",children:Object(de.jsx)(bc.a,{fontSize:"small"})})})}):Object(de.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(de.jsx)(qn.a,{fontSize:"small"})})})]},t.id)}var Fi=Gi((function(e){var t=e.pollInterval,a=e.listActiveTasksAsync,r=e.queue,c=e.pageSize,s=zi(),i=Object(n.useState)(0),o=Object(On.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(On.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(On.a)(h,2),f=O[0],m=O[1];if(lr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(de.jsxs)(ve.a,{severity:"error",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(de.jsxs)(ve.a,{severity:"info",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Info"}),"No active tasks at this time."]});var x=e.tasks.length,g=b.length;return Object(de.jsxs)("div",{children:[!window.READ_ONLY&&Object(de.jsx)(Hi,{showIconButtons:g>0,iconButtonActions:[{tooltip:"Cancel",icon:Object(de.jsx)(bc.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(de.jsx)(vn.a,{component:fe.a,children:Object(de.jsxs)(mn.a,{stickyHeader:!0,className:s.table,"aria-label":"active tasks table",size:"small",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{indeterminate:g>0&&g<x,checked:x>0&&g===x,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"}})})}),Ki.filter((function(e){return!window.READ_ONLY||"actions"!==e.key})).map((function(e){return Object(de.jsx)(gn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(de.jsx)(xn.a,{children:e.tasks.map((function(t){return Object(de.jsx)(Vi,{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 m(t.id)},onActionCellLeave:function(){return m("")},showActions:f===t.id},t.id)}))}),Object(de.jsx)(uc.a,{children:Object(de.jsx)(kn.a,{children:Object(de.jsx)(dc.a,{rowsPerPageOptions:pe,colSpan:Ki.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:be,className:s.pagination})})})]})})]})})),Qi=a(104),Yi=a.n(Qi),Wi=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Ji={listPendingTasksAsync:function(e,t){return function(){var a=Object(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:yc,queue:e}),a.prev=1,a.next=4,$e(e,t);case 4:r=a.sent,n({type:kc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listPendingTasksAsync: ",Ca(a.t0)),n({type:Sc,queue:e,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ts,queue:e,taskId:t}),a.prev=1,a.next=4,bt(e,t);case 4:n({type:as,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deletePendingTaskAsync: ",Ca(a.t0)),n({type:ns,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:xs,queue:e,taskIds:t}),a.prev=1,a.next=4,ht(e,t);case 4:r=a.sent,n({type:gs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeletePendingTasksAsync: ",Ca(a.t0)),n({type:vs,error:wa(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(ke.a)(_e.a.mark((function t(a){var n;return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:ys,queue:e}),t.prev=1,t.next=4,ft(e);case 4:n=t.sent,a({type:ks,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllPendingTasksAsync: ",Ca(t.t0)),a({type:Ss,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:rs,queue:e,taskId:t}),a.prev=1,a.next=4,it(e,t);case 4:n({type:cs,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("archivePendingTaskAsync: ",Ca(a.t0)),n({type:ss,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.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,lt(e,t);case 4:r=a.sent,n({type:fs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchArchivePendingTasksAsync: ",Ca(a.t0)),n({type:ms,error:wa(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(ke.a)(_e.a.mark((function t(a){return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:_s,queue:e}),t.prev=1,t.next=4,dt(e);case 4:a({type:Ts,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllPendingTasksAsync: ",Ca(t.t0)),a({type:Es,error:wa(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},taskRowsPerPageChange:ee},$i=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}}),Ji);var Zi=Object(p.a)((function(e){return{root:{cursor:"pointer","& #copy-button":{display:"none"},"&:hover":{boxShadow:e.shadows[2],"& #copy-button":{display:"inline-block"}},"&:hover $copyButton":{display:"inline-block"},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"96px"},actionButton:{marginLeft:3,marginRight:3},idCell:{width:"200px"},copyButton:{display:"none"},IdGroup:{display:"flex",alignItems:"center"}}}));function Xi(e){var t=e.task,a=Zi(),n=Object(b.f)();return Object(de.jsxs)(kn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(de.jsx)(gn.a,{component:"th",scope:"row",className:a.idCell,children:Object(de.jsxs)("div",{className:a.IdGroup,children:[La(t.id),Object(de.jsx)(_n.a,{title:"Copy full ID to clipboard",children:Object(de.jsx)(_.a,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(t.id)},size:"small",className:a.copyButton,children:Object(de.jsx)(hc.a,{fontSize:"small"})})})]})}),Object(de.jsx)(gn.a,{children:t.type}),Object(de.jsx)(gn.a,{children:Object(de.jsx)(qr,{language:"json",customStyle:{margin:0,maxWidth:400},children:Ha(t.payload)})}),Object(de.jsx)(gn.a,{align:"right",children:t.retried}),Object(de.jsx)(gn.a,{align:"right",children:t.max_retry}),!window.READ_ONLY&&Object(de.jsx)(gn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(de.jsxs)(r.a.Fragment,{children:[Object(de.jsx)(_n.a,{title:"Delete",children:Object(de.jsx)(_.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(de.jsx)(Rn.a,{fontSize:"small"})})}),Object(de.jsx)(_n.a,{title:"Archive",children:Object(de.jsx)(_.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(de.jsx)(Yi.a,{fontSize:"small"})})})]}):Object(de.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(de.jsx)(qn.a,{fontSize:"small"})})})]},t.id)}var eo=$i((function(e){var t=e.pollInterval,a=e.listPendingTasksAsync,r=e.queue,c=e.pageSize,s=Wi(),i=Object(n.useState)(0),o=Object(On.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(On.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(On.a)(h,2),f=O[0],m=O[1];if(lr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(de.jsxs)(ve.a,{severity:"error",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(de.jsxs)(ve.a,{severity:"info",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Info"}),"No pending tasks at this time."]});var x=[{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"}],g=e.tasks.length,v=b.length;return Object(de.jsxs)("div",{children:[!window.READ_ONLY&&Object(de.jsx)(Hi,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(de.jsx)(Rn.a,{}),onClick:function(){e.batchDeletePendingTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(de.jsx)(Yi.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(de.jsx)(vn.a,{component:fe.a,children:Object(de.jsxs)(mn.a,{stickyHeader:!0,className:s.table,"aria-label":"pending tasks table",size:"small",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{indeterminate:v>0&&v<g,checked:g>0&&v===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"}})})}),x.filter((function(e){return!window.READ_ONLY||"actions"!==e.key})).map((function(e){return Object(de.jsx)(gn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(de.jsx)(xn.a,{children:e.tasks.map((function(t){return Object(de.jsx)(Xi,{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 m(t.id)},onActionCellLeave:function(){return m("")},showActions:f===t.id},t.id)}))}),Object(de.jsx)(uc.a,{children:Object(de.jsx)(kn.a,{children:Object(de.jsx)(dc.a,{rowsPerPageOptions:pe,colSpan:x.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:be,className:s.pagination})})})]})})]})})),to=a(105),ao=a.n(to),no=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var ro={listScheduledTasksAsync:function(e,t){return function(){var a=Object(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:_c,queue:e}),a.prev=1,a.next=4,Xe(e,t);case 4:r=a.sent,n({type:Tc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listScheduledTasksAsync: ",Ca(a.t0)),n({type:Ec,queue:e,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Ns,queue:e,taskIds:t}),a.prev=1,a.next=4,_t(e,t);case 4:r=a.sent,n({type:Ps,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteScheduledTasksAsync: ",Ca(a.t0)),n({type:Ds,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:As,queue:e,taskIds:t}),a.prev=1,a.next=4,Ct(e,t);case 4:r=a.sent,n({type:Cs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunScheduledTasksAsync: ",Ca(a.t0)),n({type:ws,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Rs,queue:e,taskIds:t}),a.prev=1,a.next=4,qt(e,t);case 4:r=a.sent,n({type:Is,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchArchiveScheduledTasksAsync: ",Ca(a.t0)),n({type:qs,error:wa(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(ke.a)(_e.a.mark((function t(a){var n;return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Gs,queue:e}),t.prev=1,t.next=4,Et(e);case 4:n=t.sent,a({type:Ms,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllScheduledTasksAsync: ",Ca(t.t0)),a({type:Vs,error:wa(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(ke.a)(_e.a.mark((function t(a){return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Ls,queue:e}),t.prev=1,t.next=4,Rt(e);case 4:a({type:Bs,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllScheduledTasksAsync: ",Ca(t.t0)),a({type:Hs,error:wa(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(ke.a)(_e.a.mark((function t(a){return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:zs,queue:e}),t.prev=1,t.next=4,Pt(e);case 4:a({type:Us,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllScheduledTasksAsync: ",Ca(t.t0)),a({type:Ks,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:is,queue:e,taskId:t}),a.prev=1,a.next=4,kt(e,t);case 4:n({type:os,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteScheduledTaskAsync: ",Ca(a.t0)),n({type:ls,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Fc,queue:e,taskId:t}),a.prev=1,a.next=4,xt(e,t);case 4:n({type:Qc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runScheduledTaskAsync: ",Ca(a.t0)),n({type:Yc,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:us,queue:e,taskId:t}),a.prev=1,a.next=4,vt(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("archiveScheduledTaskAsync: ",Ca(a.t0)),n({type:js,error:wa(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:ee},co=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}}),ro);var so=Object(p.a)((function(e){return{root:{cursor:"pointer","& #copy-button":{display:"none"},"&:hover":{boxShadow:e.shadows[2],"& #copy-button":{display:"inline-block"}},"&:hover $copyButton":{display:"inline-block"},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"140px"},actionButton:{marginLeft:3,marginRight:3},idCell:{width:"200px"},copyButton:{display:"none"},IdGroup:{display:"flex",alignItems:"center"}}}));function io(e){var t=e.task,a=so(),n=Object(b.f)();return Object(de.jsxs)(kn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(de.jsx)(gn.a,{component:"th",scope:"row",className:a.idCell,children:Object(de.jsxs)("div",{className:a.IdGroup,children:[La(t.id),Object(de.jsx)(_n.a,{title:"Copy full ID to clipboard",children:Object(de.jsx)(_.a,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(t.id)},size:"small",className:a.copyButton,children:Object(de.jsx)(hc.a,{fontSize:"small"})})})]})}),Object(de.jsx)(gn.a,{children:t.type}),Object(de.jsx)(gn.a,{children:Object(de.jsx)(qr,{language:"json",customStyle:{margin:0,maxWidth:400},children:Ha(t.payload)})}),Object(de.jsx)(gn.a,{children:Na(t.next_process_at)}),!window.READ_ONLY&&Object(de.jsx)(gn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(de.jsxs)(r.a.Fragment,{children:[Object(de.jsx)(_n.a,{title:"Delete",children:Object(de.jsx)(_.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(de.jsx)(Rn.a,{fontSize:"small"})})}),Object(de.jsx)(_n.a,{title:"Archive",children:Object(de.jsx)(_.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(de.jsx)(Yi.a,{fontSize:"small"})})}),Object(de.jsx)(_n.a,{title:"Run",children:Object(de.jsx)(_.a,{onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(de.jsx)(ao.a,{fontSize:"small"})})})]}):Object(de.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(de.jsx)(qn.a,{fontSize:"small"})})})]},t.id)}var oo=co((function(e){var t=e.pollInterval,a=e.listScheduledTasksAsync,r=e.queue,c=e.pageSize,s=no(),i=Object(n.useState)(0),o=Object(On.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(On.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(On.a)(h,2),f=O[0],m=O[1];if(lr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(de.jsxs)(ve.a,{severity:"error",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(de.jsxs)(ve.a,{severity:"info",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Info"}),"No scheduled tasks at this time."]});var x=[{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"}],g=e.tasks.length,v=b.length;return Object(de.jsxs)("div",{children:[!window.READ_ONLY&&Object(de.jsx)(Hi,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(de.jsx)(Rn.a,{}),onClick:function(){e.batchDeleteScheduledTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(de.jsx)(Yi.a,{}),onClick:function(){e.batchArchiveScheduledTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(de.jsx)(ao.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(de.jsx)(vn.a,{component:fe.a,children:Object(de.jsxs)(mn.a,{stickyHeader:!0,className:s.table,"aria-label":"scheduled tasks table",size:"small",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{indeterminate:v>0&&v<g,checked:g>0&&v===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"}})})}),x.filter((function(e){return!window.READ_ONLY||"actions"!==e.key})).map((function(e){return Object(de.jsx)(gn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.label)}))]})}),Object(de.jsx)(xn.a,{children:e.tasks.map((function(t){return Object(de.jsx)(io,{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 m(t.id)},onActionCellLeave:function(){return m("")},showActions:f===t.id},t.id)}))}),Object(de.jsx)(uc.a,{children:Object(de.jsx)(kn.a,{children:Object(de.jsx)(dc.a,{rowsPerPageOptions:pe,colSpan:x.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:be,className:s.pagination})})})]})})]})})),lo=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var uo={batchDeleteRetryTasksAsync:function(e,t){return function(){var a=Object(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ti,queue:e,taskIds:t}),a.prev=1,a.next=4,Gt(e,t);case 4:r=a.sent,n({type:ai,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteRetryTasksAsync: ",Ca(a.t0)),n({type:ni,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Ws,queue:e,taskIds:t}),a.prev=1,a.next=4,Qt(e,t);case 4:r=a.sent,n({type:Js,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunRetryTasksAsync: ",Ca(a.t0)),n({type:$s,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Zs,queue:e,taskIds:t}),a.prev=1,a.next=4,$t(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("batchArchiveRetryTasksAsync: ",Ca(a.t0)),n({type:ei,error:wa(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(ke.a)(_e.a.mark((function t(a){var n;return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:ui,queue:e}),t.prev=1,t.next=4,Vt(e);case 4:n=t.sent,a({type:di,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllRetryTasksAsync: ",Ca(t.t0)),a({type:ji,error:wa(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(ke.a)(_e.a.mark((function t(a){return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:ri,queue:e}),t.prev=1,t.next=4,Wt(e);case 4:a({type:ci,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllRetryTasksAsync: ",Ca(t.t0)),a({type:si,error:wa(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(ke.a)(_e.a.mark((function t(a){return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:ii,queue:e}),t.prev=1,t.next=4,Xt(e);case 4:a({type:oi,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllRetryTasksAsync: ",Ca(t.t0)),a({type:li,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Ac,queue:e}),a.prev=1,a.next=4,tt(e,t);case 4:r=a.sent,n({type:Cc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listRetryTasksAsync: ",Ca(a.t0)),n({type:wc,queue:e,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Fs,queue:e,taskId:t}),a.prev=1,a.next=4,Ut(e,t);case 4:n({type:Qs,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteRetryTaskAsync: ",Ca(a.t0)),n({type:Ys,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.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,Lt(e,t);case 4:n({type:Jc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runRetryTaskAsync: ",Ca(a.t0)),n({type:$c,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:bs,queue:e,taskId:t}),a.prev=1,a.next=4,Ht(e,t);case 4:n({type:ps,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("archiveRetryTaskAsync: ",Ca(a.t0)),n({type:hs,error:wa(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:ee},jo=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}}),uo);var bo=Object(p.a)((function(e){return{root:{cursor:"pointer","& #copy-button":{display:"none"},"&:hover":{boxShadow:e.shadows[2],"& #copy-button":{display:"inline-block"}},"&:hover $copyButton":{display:"inline-block"},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"140px"},actionButton:{marginLeft:3,marginRight:3},idCell:{width:"200px"},copyButton:{display:"none"},IdGroup:{display:"flex",alignItems:"center"}}}));function po(e){var t=e.task,a=bo(),n=Object(b.f)();return Object(de.jsxs)(kn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(de.jsx)(gn.a,{component:"th",scope:"row",className:a.idCell,children:Object(de.jsxs)("div",{className:a.IdGroup,children:[La(t.id),Object(de.jsx)(_n.a,{title:"Copy full ID to clipboard",children:Object(de.jsx)(_.a,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(t.id)},size:"small",className:a.copyButton,children:Object(de.jsx)(hc.a,{fontSize:"small"})})})]})}),Object(de.jsx)(gn.a,{children:t.type}),Object(de.jsx)(gn.a,{children:Object(de.jsx)(qr,{language:"json",customStyle:{margin:0,maxWidth:400},children:Ha(t.payload)})}),Object(de.jsx)(gn.a,{children:Na(t.next_process_at)}),Object(de.jsx)(gn.a,{children:t.error_message}),Object(de.jsx)(gn.a,{align:"right",children:t.retried}),Object(de.jsx)(gn.a,{align:"right",children:t.max_retry}),!window.READ_ONLY&&Object(de.jsx)(gn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(de.jsxs)(r.a.Fragment,{children:[Object(de.jsx)(_n.a,{title:"Delete",children:Object(de.jsx)(_.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(de.jsx)(Rn.a,{fontSize:"small"})})}),Object(de.jsx)(_n.a,{title:"Archive",children:Object(de.jsx)(_.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(de.jsx)(Yi.a,{fontSize:"small"})})}),Object(de.jsx)(_n.a,{title:"Run",children:Object(de.jsx)(_.a,{onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(de.jsx)(ao.a,{fontSize:"small"})})})]}):Object(de.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(de.jsx)(qn.a,{fontSize:"small"})})})]},t.id)}var ho=jo((function(e){var t=e.pollInterval,a=e.listRetryTasksAsync,r=e.queue,c=e.pageSize,s=lo(),i=Object(n.useState)(0),o=Object(On.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(On.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(On.a)(h,2),f=O[0],m=O[1];if(lr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(de.jsxs)(ve.a,{severity:"error",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(de.jsxs)(ve.a,{severity:"info",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Info"}),"No retry tasks at this time."]});var x=[{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"}],g=e.tasks.length,v=b.length;return Object(de.jsxs)("div",{children:[!window.READ_ONLY&&Object(de.jsx)(Hi,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(de.jsx)(Rn.a,{}),onClick:function(){e.batchDeleteRetryTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(de.jsx)(Yi.a,{}),onClick:function(){e.batchArchiveRetryTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(de.jsx)(ao.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(de.jsx)(vn.a,{component:fe.a,children:Object(de.jsxs)(mn.a,{stickyHeader:!0,className:s.table,"aria-label":"retry tasks table",size:"small",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{indeterminate:v>0&&v<g,checked:g>0&&v===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"}})})}),x.filter((function(e){return!window.READ_ONLY||"actions"!==e.key})).map((function(e){return Object(de.jsx)(gn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.label)}))]})}),Object(de.jsx)(xn.a,{children:e.tasks.map((function(t){return Object(de.jsx)(po,{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 m(t.id)},onActionCellLeave:function(){return m("")},showActions:f===t.id},t.id)}))}),Object(de.jsx)(uc.a,{children:Object(de.jsx)(kn.a,{children:Object(de.jsx)(dc.a,{rowsPerPageOptions:pe,colSpan:x.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:be,className:s.pagination})})})]})})]})})),Oo=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"},idCell:{width:"200px"}}}));var fo={listArchivedTasksAsync:function(e,t){return function(){var a=Object(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Rc,queue:e}),a.prev=1,a.next=4,nt(e,t);case 4:r=a.sent,n({type:Ic,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listArchivedTasksAsync: ",Ca(a.t0)),n({type:qc,queue:e,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.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,ta(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("runArchivedTaskAsync: ",Ca(a.t0)),n({type:es,error:wa(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(ke.a)(_e.a.mark((function t(a){return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:yi,queue:e}),t.prev=1,t.next=4,da(e);case 4:a({type:ki,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllArchivedTasksAsync: ",Ca(t.t0)),a({type:Si,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:bi,queue:e,taskId:t}),a.prev=1,a.next=4,na(e,t);case 4:n({type:pi,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteArchivedTaskAsync: ",Ca(a.t0)),n({type:hi,error:wa(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(ke.a)(_e.a.mark((function t(a){var n;return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:_i,queue:e}),t.prev=1,t.next=4,ia(e);case 4:n=t.sent,a({type:Ti,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllArchivedTasksAsync: ",Ca(t.t0)),a({type:Ei,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.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,la(e,t);case 4:r=a.sent,n({type:fi,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunArchivedTasksAsync: ",Ca(a.t0)),n({type:mi,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:xi,queue:e,taskIds:t}),a.prev=1,a.next=4,ca(e,t);case 4:r=a.sent,n({type:gi,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteArchivedTasksAsync: ",Ca(a.t0)),n({type:vi,error:wa(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:ee},mo=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}}),fo);var xo=Object(p.a)((function(e){return{root:{cursor:"pointer","& #copy-button":{display:"none"},"&:hover":{boxShadow:e.shadows[2]},"&:hover $copyButton":{display:"inline-block"},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"96px"},actionButton:{marginLeft:3,marginRight:3},idCell:{width:"200px"},copyButton:{display:"none"},IdGroup:{display:"flex",alignItems:"center"}}}));function go(e){var t=e.task,a=xo(),n=Object(b.f)();return Object(de.jsxs)(kn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(de.jsx)(gn.a,{component:"th",scope:"row",className:a.idCell,children:Object(de.jsxs)("div",{className:a.IdGroup,children:[La(t.id),Object(de.jsx)(_n.a,{title:"Copy full ID to clipboard",children:Object(de.jsx)(_.a,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(t.id)},size:"small",className:a.copyButton,children:Object(de.jsx)(hc.a,{fontSize:"small"})})})]})}),Object(de.jsx)(gn.a,{children:t.type}),Object(de.jsx)(gn.a,{children:Object(de.jsx)(qr,{language:"json",customStyle:{margin:0,maxWidth:400},children:Ha(t.payload)})}),Object(de.jsx)(gn.a,{children:Pa(t.last_failed_at)}),Object(de.jsx)(gn.a,{children:t.error_message}),!window.READ_ONLY&&Object(de.jsx)(gn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(de.jsxs)(r.a.Fragment,{children:[Object(de.jsx)(_n.a,{title:"Delete",children:Object(de.jsx)(_.a,{className:a.actionButton,onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(de.jsx)(Rn.a,{fontSize:"small"})})}),Object(de.jsx)(_n.a,{title:"Run",children:Object(de.jsx)(_.a,{className:a.actionButton,onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(de.jsx)(ao.a,{fontSize:"small"})})})]}):Object(de.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(de.jsx)(qn.a,{fontSize:"small"})})})]},t.id)}var vo=mo((function(e){var t=e.pollInterval,a=e.listArchivedTasksAsync,r=e.queue,c=e.pageSize,s=Oo(),i=Object(n.useState)(0),o=Object(On.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(On.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(On.a)(h,2),f=O[0],m=O[1];if(lr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(de.jsxs)(ve.a,{severity:"error",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(de.jsxs)(ve.a,{severity:"info",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Info"}),"No archived tasks at this time."]});var x=[{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"}],g=e.tasks.length,v=b.length;return Object(de.jsxs)("div",{children:[!window.READ_ONLY&&Object(de.jsx)(Hi,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(de.jsx)(Rn.a,{}),onClick:function(){e.batchDeleteArchivedTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(de.jsx)(ao.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(de.jsx)(vn.a,{component:fe.a,children:Object(de.jsxs)(mn.a,{stickyHeader:!0,className:s.table,"aria-label":"archived tasks table",size:"small",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{indeterminate:v>0&&v<g,checked:g>0&&v===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"}})})}),x.filter((function(e){return!window.READ_ONLY||"actions"!==e.key})).map((function(e){return Object(de.jsx)(gn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(de.jsx)(xn.a,{children:e.tasks.map((function(t){return Object(de.jsx)(go,{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 m(t.id)},onActionCellLeave:function(){return m("")},showActions:f===t.id},t.id)}))}),Object(de.jsx)(uc.a,{children:Object(de.jsx)(kn.a,{children:Object(de.jsx)(dc.a,{rowsPerPageOptions:pe,colSpan:x.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:be,className:s.pagination})})})]})})]})})),yo=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var ko={listCompletedTasksAsync:function(e,t){return function(){var a=Object(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,n({type:Nc,queue:e}),a.next=4,ct(e,t);case 4:r=a.sent,n({type:Pc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(0),console.error("listCompletedTasksAsync: ",Ca(a.t0)),n({type:Dc,queue:e,error:wa(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(ke.a)(_e.a.mark((function a(n){return _e.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,ba(e,t);case 4:n({type:Ci,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteCompletedTaskAsync: ",Ca(a.t0)),n({type:wi,error:wa(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(ke.a)(_e.a.mark((function t(a){var n;return _e.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Ri,queue:e}),t.prev=1,t.next=4,fa(e);case 4:n=t.sent,a({type:Ii,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllCompletedTasksAsync: ",Ca(t.t0)),a({type:qi,error:wa(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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Ni,queue:e,taskIds:t}),a.prev=1,a.next=4,ha(e,t);case 4:r=a.sent,n({type:Pi,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteCompletedTasksAsync: ",Ca(a.t0)),n({type:Di,error:wa(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:ee},So=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}}),ko);var _o=Object(p.a)((function(e){return{root:{cursor:"pointer","& #copy-button":{display:"none"},"&:hover":{boxShadow:e.shadows[2],"& #copy-button":{display:"inline-block"}},"&:hover $copyButton":{display:"inline-block"},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"96px"},actionButton:{marginLeft:3,marginRight:3},idCell:{width:"200px"},copyButton:{display:"none"},IdGroup:{display:"flex",alignItems:"center"}}}));function To(e){var t=e.task,a=_o(),n=Object(b.f)();return Object(de.jsxs)(kn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(de.jsx)(gn.a,{component:"th",scope:"row",className:a.idCell,children:Object(de.jsxs)("div",{className:a.IdGroup,children:[La(t.id),Object(de.jsx)(_n.a,{title:"Copy full ID to clipboard",children:Object(de.jsx)(_.a,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(t.id)},size:"small",className:a.copyButton,children:Object(de.jsx)(hc.a,{fontSize:"small"})})})]})}),Object(de.jsx)(gn.a,{children:t.type}),Object(de.jsx)(gn.a,{children:Object(de.jsx)(qr,{language:"json",customStyle:{margin:0,maxWidth:400},children:Ha(t.payload)})}),Object(de.jsx)(gn.a,{children:Pa(t.completed_at)}),Object(de.jsx)(gn.a,{children:Object(de.jsx)(qr,{language:"json",customStyle:{margin:0,maxWidth:400},children:Ha(t.result)})}),Object(de.jsx)(gn.a,{children:t.ttl_seconds>0?"".concat(qa(Ra(t.ttl_seconds))," left"):"expired"}),!window.READ_ONLY&&Object(de.jsx)(gn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(de.jsx)(r.a.Fragment,{children:Object(de.jsx)(_n.a,{title:"Delete",children:Object(de.jsx)(_.a,{className:a.actionButton,onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(de.jsx)(Rn.a,{fontSize:"small"})})})}):Object(de.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(de.jsx)(qn.a,{fontSize:"small"})})})]},t.id)}var Eo=So((function(e){var t=e.pollInterval,a=e.listCompletedTasksAsync,r=e.queue,c=e.pageSize,s=yo(),i=Object(n.useState)(0),o=Object(On.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(On.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(On.a)(h,2),f=O[0],m=O[1];if(lr(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(de.jsxs)(ve.a,{severity:"error",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(de.jsxs)(ve.a,{severity:"info",className:s.alert,children:[Object(de.jsx)(ye.a,{children:"Info"}),"No completed tasks at this time."]});var x=[{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"}],g=e.tasks.length,v=b.length;return Object(de.jsxs)("div",{children:[!window.READ_ONLY&&Object(de.jsx)(Hi,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(de.jsx)(Rn.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(de.jsx)(vn.a,{component:fe.a,children:Object(de.jsxs)(mn.a,{stickyHeader:!0,className:s.table,"aria-label":"archived tasks table",size:"small",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[!window.READ_ONLY&&Object(de.jsx)(gn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(de.jsx)(_.a,{children:Object(de.jsx)(lc.a,{indeterminate:v>0&&v<g,checked:g>0&&v===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"}})})}),x.filter((function(e){return!window.READ_ONLY||"actions"!==e.key})).map((function(e){return Object(de.jsx)(gn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(de.jsx)(xn.a,{children:e.tasks.map((function(t){return Object(de.jsx)(To,{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 m(t.id)},onActionCellLeave:function(){return m("")},showActions:f===t.id},t.id)}))}),Object(de.jsx)(uc.a,{children:Object(de.jsx)(kn.a,{children:Object(de.jsx)(dc.a,{rowsPerPageOptions:pe,colSpan:x.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:be,className:s.pagination})})})]})})]})})),Ao=["children","value","selected"];function Co(e){var t=e.children,a=e.value,n=e.selected,r=Object(rc.a)(e,Ao);return Object(de.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 wo=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"}}})),Ro=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:kr(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:kr(e)?"#303030":e.palette.grey[100],"&:hover, &:focus":{backgroundColor:kr(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 Io=wo((function(e){var t=e.currentStats,a=Ro(),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(On.a)(s,2),o=i[0],l=i[1];return Object(de.jsxs)(fe.a,{variant:"outlined",className:a.container,children:[Object(de.jsxs)("div",{className:a.header,children:[Object(de.jsx)(me.a,{color:"textPrimary",className:a.heading,children:"Tasks"}),Object(de.jsx)("div",{children:c.map((function(t){return Object(de.jsx)(cc.a,{className:a.chip,label:Object(de.jsxs)("div",{children:[t.label," ",Object(de.jsx)("span",{className:a.taskcount,children:t.count})]}),variant:"outlined",color:e.selected===t.key?"primary":"default",onClick:function(){return r.push(F(e.queue,t.key))}},t.key)}))}),Object(de.jsx)("div",{className:a.searchbar,children:Object(de.jsxs)("div",{className:a.search,children:[Object(de.jsx)("div",{className:a.searchIcon,children:Object(de.jsx)(oc.a,{})}),Object(de.jsx)(sc.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(de.jsx)(Co,{value:"active",selected:e.selected,children:Object(de.jsx)(Fi,{queue:e.queue,totalTaskCount:t.active})}),Object(de.jsx)(Co,{value:"pending",selected:e.selected,children:Object(de.jsx)(eo,{queue:e.queue,totalTaskCount:t.pending})}),Object(de.jsx)(Co,{value:"scheduled",selected:e.selected,children:Object(de.jsx)(oo,{queue:e.queue,totalTaskCount:t.scheduled})}),Object(de.jsx)(Co,{value:"retry",selected:e.selected,children:Object(de.jsx)(ho,{queue:e.queue,totalTaskCount:t.retry})}),Object(de.jsx)(Co,{value:"archived",selected:e.selected,children:Object(de.jsx)(vo,{queue:e.queue,totalTaskCount:t.archived})}),Object(de.jsx)(Co,{value:"completed",selected:e.selected,children:Object(de.jsx)(Eo,{queue:e.queue,totalTaskCount:t.completed})})]})})),qo=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 No=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=qo(),a=e.queue,n=e.qname;return Object(de.jsxs)("div",{className:t.banner,children:[Object(de.jsxs)("div",{className:t.bannerItem,children:[Object(de.jsx)(me.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue name"}),Object(de.jsx)(me.a,{color:"textSecondary",children:n})]}),Object(de.jsxs)("div",{className:t.bannerItem,children:[Object(de.jsx)(me.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue state"}),Object(de.jsx)(me.a,{color:"textSecondary",children:a?a.paused?"paused":"run":"-"})]}),Object(de.jsxs)("div",{className:t.bannerItem,children:[Object(de.jsx)(me.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue size"}),Object(de.jsx)(me.a,{color:"textSecondary",children:a?a.size:"-"})]}),Object(de.jsxs)("div",{className:t.bannerItem,children:[Object(de.jsx)(me.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Memory usage"}),Object(de.jsx)(me.a,{color:"textSecondary",children:a?Mn()(a.memory_usage_bytes):"-"})]}),Object(de.jsxs)("div",{className:t.bannerItem,children:[Object(de.jsx)(me.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Latency"}),Object(de.jsx)(me.a,{color:"textSecondary",children:a?a.display_latency:"-"})]}),Object(de.jsxs)("div",{className:t.bannerItem,children:[Object(de.jsx)(me.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Processed"}),Object(de.jsx)(me.a,{color:"textSecondary",children:a?a.processed:"-"})]}),Object(de.jsxs)("div",{className:t.bannerItem,children:[Object(de.jsx)(me.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Failed"}),Object(de.jsx)(me.a,{color:"textSecondary",children:a?a.failed:"-"})]}),Object(de.jsxs)("div",{className:t.bannerItem,children:[Object(de.jsx)(me.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Error rate"}),Object(de.jsx)(me.a,{color:"textSecondary",children:a?Ba(a.failed,a.processed):"-"})]})]})})),Po=a(17),Do=a(907),Lo=a(347),Bo=a.n(Lo),Ho=Object($n.a)((function(e){return{root:{backgroundColor:kr(e)?"#303030":e.palette.background.default,height:e.spacing(3),color:e.palette.text.secondary,fontWeight:400,"&:hover, &:focus":{backgroundColor:e.palette.action.hover},"&:active":{boxShadow:e.shadows[1],backgroundColor:Object(Po.c)(e.palette.action.hover,.12)}}}}))(cc.a);function zo(e){var t=Object(b.f)(),a=Object(n.useState)(null),r=Object(On.a)(a,2),c=r[0],s=r[1],i=V(),o=function(e){e.preventDefault(),s(e.currentTarget)},l=function(){s(null)};return Object(de.jsxs)(de.Fragment,{children:[Object(de.jsxs)(Do.a,{"aria-label":"breadcrumb",children:[Object(de.jsx)(Ho,{component:j.b,to:i.HOME,label:"Queues",onClick:function(){return t.push(i.HOME)}}),Object(de.jsx)(Ho,{label:e.queueName,deleteIcon:Object(de.jsx)(Bo.a,{}),onClick:o,onDelete:o}),e.taskId&&Object(de.jsx)(Ho,{label:"task:".concat(e.taskId)})]}),Object(de.jsx)(Li.a,{id:"queue-breadcrumb-menu",anchorEl:c,keepMounted:!0,open:Boolean(c),onClose:l,children:e.queues.sort().map((function(e){return Object(de.jsx)(cr.a,{onClick:function(){t.push(F(e)),l()},children:e},e)}))})]})}var Uo=Object(o.b)((function(e){return{queues:e.queues.data.map((function(e){return e.name}))}}),{listQueuesAsync:en}),Ko=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)}}})),Go=["active","pending","scheduled","retry","archived","completed"];var Mo=Uo((function(e){var t=Ko(),a=Object(b.h)().qname,r=ur().get("status");r&&Go.includes(r)||(r="active");var c=e.listQueuesAsync;return Object(n.useEffect)((function(){c()}),[c]),Object(de.jsx)(he.a,{maxWidth:"lg",children:Object(de.jsxs)(Oe.a,{container:!0,spacing:0,className:t.container,children:[Object(de.jsx)(Oe.a,{item:!0,xs:12,className:t.breadcrumbs,children:Object(de.jsx)(zo,{queues:e.queues,queueName:a})}),Object(de.jsx)(Oe.a,{item:!0,xs:12,className:t.banner,children:Object(de.jsx)(No,{qname:a})}),Object(de.jsx)(Oe.a,{item:!0,xs:12,className:t.tasksTable,children:Object(de.jsx)(Io,{queue:a,selected:r})})]})})})),Vo=a(348),Fo=a.n(Vo);var Qo=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(ke.a)(_e.a.mark((function a(n){var r;return _e.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Oc}),a.prev=1,a.next=4,Ue(e,t);case 4:r=a.sent,n({type:fc,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("getTaskInfoAsync: ",Ca(a.t0)),n({type:mc,error:wa(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},listQueuesAsync:en}),Yo=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 Wo=Qo((function(e){var t=Yo(),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 lr(Object(n.useMemo)((function(){return function(){s(r,c)}}),[r,c,s]),i),Object(n.useEffect)((function(){o()}),[o]),Object(de.jsx)(he.a,{maxWidth:"lg",className:t.container,children:Object(de.jsxs)(Oe.a,{container:!0,spacing:0,children:[Object(de.jsx)(Oe.a,{item:!0,xs:12,className:t.breadcrumbs,children:Object(de.jsx)(zo,{queues:e.queues,queueName:r,taskId:c})}),Object(de.jsxs)(Oe.a,{item:!0,xs:12,md:6,children:[e.error?Object(de.jsxs)(ve.a,{severity:"error",className:t.alert,children:[Object(de.jsx)(ye.a,{children:"Error"}),e.error]}):Object(de.jsxs)(fe.a,{className:t.paper,variant:"outlined",children:[Object(de.jsx)(me.a,{variant:"h6",children:"Task Info"}),Object(de.jsxs)("div",{children:[Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["ID:"," "]}),Object(de.jsx)(me.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.id})]}),Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Type:"," "]}),Object(de.jsx)(me.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.type})]}),Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["State:"," "]}),Object(de.jsx)(me.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.state})]}),Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Queue:"," "]}),Object(de.jsx)(me.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.queue})]}),Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Retry:"," "]}),Object(de.jsxs)(me.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(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Last Failure:"," "]}),Object(de.jsx)(me.a,{className:t.infoValueCell,children:null!==l&&void 0!==l&&l.last_failed_at?Object(de.jsxs)(me.a,{children:[null===l||void 0===l?void 0:l.error_message," (",null===l||void 0===l?void 0:l.last_failed_at,")"]}):Object(de.jsx)(me.a,{children:" - "})})]}),Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Next Process Time:"," "]}),null!==l&&void 0!==l&&l.next_process_at?Object(de.jsx)(me.a,{children:null===l||void 0===l?void 0:l.next_process_at}):Object(de.jsx)(me.a,{children:" - "})]})]}),Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Timeout:"," "]}),Object(de.jsx)(me.a,{className:t.infoValueCell,children:null!==l&&void 0!==l&&l.timeout_seconds?Object(de.jsxs)(me.a,{children:[null===l||void 0===l?void 0:l.timeout_seconds," seconds"]}):Object(de.jsx)(me.a,{children:" - "})})]}),Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Deadline:"," "]}),Object(de.jsx)(me.a,{className:t.infoValueCell,children:null!==l&&void 0!==l&&l.deadline?Object(de.jsx)(me.a,{children:null===l||void 0===l?void 0:l.deadline}):Object(de.jsx)(me.a,{children:" - "})})]}),Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Payload:"," "]}),Object(de.jsx)("div",{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.payload)&&Object(de.jsx)(qr,{language:"json",customStyle:{margin:0,maxWidth:400},children:Ha(l.payload)})})]}),"completed"===(null===l||void 0===l?void 0:l.state)&&Object(de.jsxs)(de.Fragment,{children:[Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Completed:"," "]}),Object(de.jsx)("div",{className:t.infoValueCell,children:Object(de.jsxs)(me.a,{children:[Pa(l.completed_at)," (",l.completed_at,")"]})})]}),Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Result:"," "]}),Object(de.jsx)("div",{className:t.infoValueCell,children:Object(de.jsx)(qr,{language:"json",customStyle:{margin:0,maxWidth:400},children:Ha(l.result)})})]}),Object(de.jsxs)("div",{className:t.infoRow,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",className:t.infoKeyCell,children:["TTL:"," "]}),Object(de.jsx)(me.a,{className:t.infoValueCell,children:Object(de.jsx)(me.a,{children:l.ttl_seconds>0?"".concat(qa(Ra(l.ttl_seconds))," left"):"expired"})})]})]})]}),Object(de.jsx)("div",{className:t.footer,children:Object(de.jsx)(Nn.a,{startIcon:Object(de.jsx)(Fo.a,{}),onClick:function(){return u.goBack()},children:"Go Back"})})]})]})})})),Jo=a(909),$o=a(349),Zo=a.n($o),Xo=a(903),el=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 tl={pollIntervalChange:function(e){return{type:W,value:e}},selectTheme:function(e){return{type:J,value:e}}};var al,nl=Object(o.b)((function(e){return{pollInterval:e.settings.pollInterval,themePreference:e.settings.themePreference}}),tl)((function(e){var t=el(),a=Object(n.useState)(e.pollInterval),r=Object(On.a)(a,2),c=r[0],s=r[1];return Object(de.jsx)(he.a,{maxWidth:"lg",className:t.container,children:Object(de.jsxs)(Oe.a,{container:!0,spacing:3,justify:"center",children:[Object(de.jsx)(Oe.a,{item:!0,xs:1}),Object(de.jsx)(Oe.a,{item:!0,xs:6,children:Object(de.jsx)(me.a,{variant:"h5",color:"textPrimary",children:"Settings"})}),Object(de.jsx)(Oe.a,{item:!0,xs:5}),Object(de.jsx)(Oe.a,{item:!0,xs:1}),Object(de.jsx)(Oe.a,{item:!0,xs:6,children:Object(de.jsxs)(fe.a,{className:t.paper,variant:"outlined",children:[Object(de.jsx)(me.a,{color:"textPrimary",children:"Polling Interval"}),Object(de.jsx)(me.a,{gutterBottom:!0,color:"textSecondary",variant:"subtitle1",children:"Web UI will fetch live data with the specified interval"}),Object(de.jsxs)(me.a,{gutterBottom:!0,color:"textSecondary",variant:"subtitle1",children:["Currently: Every"," ",1===c?"second":"".concat(c," seconds")]}),Object(de.jsx)(Jo.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(de.jsx)(Oe.a,{xs:5}),Object(de.jsx)(Oe.a,{item:!0,xs:1}),Object(de.jsx)(Oe.a,{item:!0,xs:6,children:Object(de.jsx)(fe.a,{className:t.paper,variant:"outlined",children:Object(de.jsxs)(Zo.a,{variant:"outlined",className:t.formControl,children:[Object(de.jsx)(me.a,{color:"textPrimary",children:"Dark Theme"}),Object(de.jsxs)(Xo.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(de.jsx)(cr.a,{value:mr.SystemDefault,children:"System Default"}),Object(de.jsx)(cr.a,{value:mr.Always,children:"Always"}),Object(de.jsx)(cr.a,{value:mr.Never,children:"Never"})]})]})})}),Object(de.jsx)(Oe.a,{item:!0,xs:5})]})})})),rl=a(912),cl=a(888),sl=a(351),il=a.n(sl),ol=a(350),ll=a.n(ol),ul=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"}(al||(al={}));var dl=[{label:"Host:PID",key:"host",sortBy:al.HostPID,align:"left"},{label:"Started",key:"started",sortBy:al.Started,align:"left"},{label:"Status",key:"status",sortBy:al.Status,align:"left"},{label:"Queues",key:"queues",sortBy:al.Queues,align:"left"},{label:"Active Workers",key:"workers",sortBy:al.ActiveWorkers,align:"left"}];function jl(e,t){var a=Object(fn.a)(e);return a.sort(t),a}function bl(e){var t=ul(),a=Object(n.useState)(al.HostPID),r=Object(On.a)(a,2),c=r[0],s=r[1],i=Object(n.useState)(zn.Asc),o=Object(On.a)(i,2),l=o[0],u=o[1];return 0===e.servers.length?Object(de.jsxs)(ve.a,{severity:"info",children:[Object(de.jsx)(ye.a,{children:"Info"}),"No servers found at this time."]}):Object(de.jsx)(vn.a,{children:Object(de.jsxs)(mn.a,{className:t.table,"aria-label":"server info table",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[dl.map((function(e,a){return Object(de.jsx)(gn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:Object(de.jsx)(Sn.a,{active:e.sortBy===c,direction:l,onClick:(n=e.sortBy,function(e){if(n===c){var t=l===zn.Asc?zn.Desc:zn.Asc;u(t)}else s(n)}),children:e.label})},e.key);var n})),Object(de.jsx)(gn.a,{})]})}),Object(de.jsx)(xn.a,{children:jl(e.servers,(function(e,t){var a=!1;switch(c){case al.HostPID:if(e.host===t.host&&e.pid===t.pid)return 0;a=e.host===t.host?e.pid<t.pid:e.host<t.host;break;case al.Started:var n=Date.parse(e.start_time),r=Date.parse(t.start_time);if(n===r)return 0;a=n<r;break;case al.Status:if(e.status===t.status)return 0;a=e.status<t.status;break;case al.Queues:var s=Object.keys(e.queue_priorities).join(","),i=Object.keys(t.queue_priorities).join(",");if(s===i)return 0;a=s<i;break;case al.ActiveWorkers:if(e.active_workers.length===t.active_workers.length)return 0;a=e.active_workers.length<t.active_workers.length;break;default:throw"Unexpected order by value: ".concat(c)}return l===zn.Asc?a?-1:1:a?1:-1})).map((function(e){return Object(de.jsx)(hl,{server:e},e.id)}))})]})})}var pl=Object(p.a)((function(e){return{rowRoot:{"& > *":{borderBottom:"unset"}},noBorder:{border:"none"},link:{color:e.palette.text.primary}}}));function hl(e){var t=pl(),a=e.server,c=Object(n.useState)(!1),s=Object(On.a)(c,2),i=s[0],o=s[1],l=Object.keys(a.queue_priorities);return Object(de.jsxs)(r.a.Fragment,{children:[Object(de.jsxs)(kn.a,{className:t.rowRoot,children:[Object(de.jsxs)(gn.a,{children:[a.host,":",a.pid]}),Object(de.jsx)(gn.a,{children:Pa(a.start_time)}),Object(de.jsx)(gn.a,{children:a.status}),Object(de.jsx)(gn.a,{children:l.map((function(e,a){return Object(de.jsxs)("span",{children:[Object(de.jsx)(j.b,{to:F(e),className:t.link,children:e}),a===l.length-1?"":", "]},e)}))}),Object(de.jsxs)(gn.a,{children:[a.active_workers.length,"/",a.concurrency]}),Object(de.jsx)(gn.a,{children:Object(de.jsx)(_n.a,{title:i?"Hide Details":"Show Details",children:Object(de.jsx)(_.a,{"aria-label":"expand row",size:"small",onClick:function(){return o(!i)},children:i?Object(de.jsx)(ll.a,{}):Object(de.jsx)(il.a,{})})})})]}),Object(de.jsx)(kn.a,{className:t.rowRoot,children:Object(de.jsx)(gn.a,{style:{paddingBottom:0,paddingTop:0},colSpan:6,children:Object(de.jsx)(cl.a,{in:i,timeout:"auto",unmountOnExit:!0,children:Object(de.jsxs)(Oe.a,{container:!0,spacing:2,children:[Object(de.jsxs)(Oe.a,{item:!0,xs:9,children:[Object(de.jsx)(me.a,{variant:"subtitle1",gutterBottom:!0,color:"textSecondary",children:"Active Workers"}),Object(de.jsxs)(mn.a,{size:"small","aria-label":"active workers",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[Object(de.jsx)(gn.a,{children:"Task ID"}),Object(de.jsx)(gn.a,{children:"Task Payload"}),Object(de.jsx)(gn.a,{children:"Queue"}),Object(de.jsx)(gn.a,{children:"Started"})]})}),Object(de.jsx)(xn.a,{children:a.active_workers.map((function(e){return Object(de.jsxs)(kn.a,{children:[Object(de.jsx)(gn.a,{component:"th",scope:"row",children:La(e.task_id)}),Object(de.jsx)(gn.a,{children:Object(de.jsx)(qr,{language:"json",customStyle:{margin:0},children:Ha(e.task_payload)})}),Object(de.jsx)(gn.a,{children:e.queue}),Object(de.jsx)(gn.a,{children:Pa(e.start_time)})]},e.task_id)}))})]})]}),Object(de.jsxs)(Oe.a,{item:!0,xs:3,children:[Object(de.jsx)(me.a,{variant:"subtitle1",gutterBottom:!0,color:"textSecondary",children:"Queue Priority"}),Object(de.jsxs)(mn.a,{size:"small","aria-label":"active workers",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[Object(de.jsx)(gn.a,{children:"Queue"}),Object(de.jsx)(gn.a,{align:"right",children:"Priority"})]})}),Object(de.jsx)(xn.a,{children:l.map((function(e){return Object(de.jsxs)(kn.a,{children:[Object(de.jsx)(gn.a,{children:Object(de.jsx)(j.b,{to:F(e),className:t.link,children:e})}),Object(de.jsx)(gn.a,{align:"right",children:a.queue_priorities[e]})]},e)}))})]}),Object(de.jsxs)(rl.a,{margin:2,children:[Object(de.jsxs)(me.a,{variant:"subtitle2",component:"span",children:["Strict Priority:"," "]}),Object(de.jsx)(me.a,{variant:"button",component:"span",children:a.strict_priority_enabled?"ON":"OFF"})]})]})]})})})})]})}var Ol="LIST_SERVERS_BEGIN",fl="LIST_SERVERS_SUCCESS",ml="LIST_SERVERS_ERROR";var xl=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 gl=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(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:Ol}),e.prev=1,e.next=4,xa();case 4:a=e.sent,t({type:fl,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listServersAsync: ".concat(Ca(e.t0))),t({type:ml,error:wa(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}});var vl=gl((function(e){var t=e.pollInterval,a=e.listServersAsync,n=xl();return lr(a,t),Object(de.jsx)(he.a,{maxWidth:"lg",className:n.container,children:Object(de.jsx)(Oe.a,{container:!0,spacing:3,children:""===e.error?Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsxs)(fe.a,{className:n.paper,variant:"outlined",children:[Object(de.jsx)(me.a,{variant:"h6",className:n.heading,children:"Servers"}),Object(de.jsx)(bl,{servers:e.servers})]})}):Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsxs)(ve.a,{severity:"error",children:[Object(de.jsx)(ye.a,{children:"Error"}),"Could not retrieve servers live data \u2014"," ",Object(de.jsx)("strong",{children:"See the logs for details"})]})})})})})),yl=a(890),kl=a(891),Sl="GET_REDIS_INFO_BEGIN",_l="GET_REDIS_INFO_SUCCESS",Tl="GET_REDIS_INFO_ERROR";var El=Object(p.a)((function(e){return{table:{minWidth:650}}}));function Al(e){var t=El();return Object(de.jsx)(vn.a,{children:Object(de.jsxs)(mn.a,{className:t.table,"aria-label":"queue location table",children:[Object(de.jsx)(yn.a,{children:Object(de.jsxs)(kn.a,{children:[Object(de.jsx)(gn.a,{children:"Queue"}),Object(de.jsx)(gn.a,{children:"KeySlot"}),Object(de.jsx)(gn.a,{children:"Node Addresses"})]})}),Object(de.jsx)(xn.a,{children:e.queueLocations.map((function(e){return Object(de.jsxs)(kn.a,{children:[Object(de.jsx)(gn.a,{component:"th",scope:"row",children:e.queue}),Object(de.jsx)(gn.a,{children:e.keyslot}),Object(de.jsx)(gn.a,{children:e.nodes.join(", ")})]},e.queue)}))})]})})}var Cl=a(889),wl=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)}}}));var Rl=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(ke.a)(_e.a.mark((function e(t){var a;return _e.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:Sl}),e.prev=1,e.next=4,_a();case 4:a=e.sent,t({type:_l,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("getRedisInfoAsync: ".concat(Ca(e.t0))),t({type:Tl,error:wa(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}});function Il(e){var t=e.redisInfo;return Object(de.jsxs)(de.Fragment,{children:[Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(me.a,{variant:"h6",color:"textSecondary",children:"Server"})}),Object(de.jsx)(Oe.a,{item:!0,xs:3,children:Object(de.jsx)(ql,{title:"Version",content:t.redis_version})}),Object(de.jsx)(Oe.a,{item:!0,xs:3,children:Object(de.jsx)(ql,{title:"Uptime",content:"".concat(t.uptime_in_days," days")})}),Object(de.jsx)(Oe.a,{item:!0,xs:6}),Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(me.a,{variant:"h6",color:"textSecondary",children:"Memory"})}),Object(de.jsx)(Oe.a,{item:!0,xs:3,children:Object(de.jsx)(ql,{title:"Used Memory",content:t.used_memory_human})}),Object(de.jsx)(Oe.a,{item:!0,xs:3,children:Object(de.jsx)(ql,{title:"Peak Memory Used",content:t.used_memory_peak_human})}),Object(de.jsx)(Oe.a,{item:!0,xs:3,children:Object(de.jsx)(ql,{title:"Memory Fragmentation Ratio",content:t.mem_fragmentation_ratio})}),Object(de.jsx)(Oe.a,{item:!0,xs:3}),Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(me.a,{variant:"h6",color:"textSecondary",children:"Connections"})}),Object(de.jsx)(Oe.a,{item:!0,xs:3,children:Object(de.jsx)(ql,{title:"Connected Clients",content:t.connected_clients})}),Object(de.jsx)(Oe.a,{item:!0,xs:3,children:Object(de.jsx)(ql,{title:"Connected Replicas",content:t.connected_slaves})}),Object(de.jsx)(Oe.a,{item:!0,xs:6}),Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(me.a,{variant:"h6",color:"textSecondary",children:"Persistence"})}),Object(de.jsx)(Oe.a,{item:!0,xs:3,children:Object(de.jsx)(ql,{title:"Last Save to Disk",content:Da(parseInt(t.rdb_last_save_time))})}),Object(de.jsx)(Oe.a,{item:!0,xs:3,children:Object(de.jsx)(ql,{title:"Number of Changes Since Last Dump",content:t.rdb_changes_since_last_save})}),Object(de.jsx)(Oe.a,{item:!0,xs:6})]})}function ql(e){return Object(de.jsx)(yl.a,{variant:"outlined",children:Object(de.jsxs)(kl.a,{children:[Object(de.jsx)(me.a,{gutterBottom:!0,color:"textPrimary",variant:"h5",align:"center",children:e.content}),Object(de.jsx)(me.a,{color:"textSecondary",variant:"subtitle2",align:"center",children:e.title})]})})}var Nl=Rl((function(e){var t=wl(),a=e.pollInterval,n=e.getRedisInfoAsync,r=e.redisInfo,c=e.redisInfoRaw,s=e.redisClusterEnabled,i=e.redisClusterNodesRaw,o=e.queueLocations;return lr(n,a),Object(de.jsx)(he.a,{maxWidth:"lg",className:t.container,children:Object(de.jsx)(Oe.a,{container:!0,spacing:3,children:""===e.error?Object(de.jsxs)(de.Fragment,{children:[Object(de.jsxs)(Oe.a,{item:!0,xs:12,children:[Object(de.jsx)(me.a,{variant:"h5",color:"textPrimary",children:s?"Redis Cluster Info":"Redis Info"}),!s&&Object(de.jsxs)(me.a,{variant:"subtitle1",color:"textSecondary",children:["Connected to: ",e.redisAddress]})]}),o&&o.length>0&&Object(de.jsxs)(Oe.a,{item:!0,xs:12,children:[Object(de.jsx)(me.a,{variant:"h6",color:"textSecondary",children:"Queue Location in Cluster"}),Object(de.jsx)(Al,{queueLocations:o})]}),i&&Object(de.jsx)(de.Fragment,{children:Object(de.jsxs)(Oe.a,{item:!0,xs:12,children:[Object(de.jsxs)(me.a,{variant:"h6",color:"textSecondary",children:[Object(de.jsx)(Cl.a,{href:"https://redis.io/commands/cluster-nodes",target:"_",children:"CLUSTER NODES"})," ","Command Output"]}),Object(de.jsx)(qr,{language:"yaml",children:i})]})}),r&&!s&&Object(de.jsx)(Il,{redisInfo:r}),c&&Object(de.jsx)(de.Fragment,{children:Object(de.jsxs)(Oe.a,{item:!0,xs:6,children:[Object(de.jsxs)(me.a,{variant:"h6",color:"textSecondary",children:[s?Object(de.jsx)(Cl.a,{href:"https://redis.io/commands/cluster-info",target:"_",children:"CLUSTER INFO"}):Object(de.jsx)(Cl.a,{href:"https://redis.io/commands/info",target:"_",children:"INFO"})," ","Command Output"]}),Object(de.jsx)(qr,{language:"yaml",children:c})]})})]}):Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsxs)(ve.a,{severity:"error",children:[Object(de.jsx)(ye.a,{children:"Error"}),"Could not retrieve redis live data \u2014"," ",Object(de.jsx)("strong",{children:"See the logs for details"})]})})})})})),Pl=a(356),Dl=a.n(Pl),Ll="GET_METRICS_BEGIN",Bl="GET_METRICS_SUCCESS",Hl="GET_METRICS_ERROR";var zl=["#2085ec","#72b4eb","#0a417a","#8464a0","#cea9bc","#323232"];function Ul(e){var t=Object(ae.a)(),a=function(e){if(0===e.length)return[];var t,a={},n=Object(dr.a)(e);try{for(n.s();!(t=n.n()).done;){var r,c=t.value,s=Object(dr.a)(c.values);try{for(s.s();!(r=s.n()).done;){var i=Object(On.a)(r.value,2),o=i[0],l=i[1];a[o]||(a[o]={timestamp:o});var u=c.metric.queue;u&&(a[o][u]=parseFloat(l))}}catch(d){s.e(d)}finally{s.f()}}}catch(d){n.e(d)}finally{n.f()}return Object.values(a)}(e.data),n=e.data.map((function(e){return e.metric.queue}));return Object(de.jsx)(cn.a,{height:260,children:Object(de.jsxs)(jr.a,{data:a,children:[Object(de.jsx)(on.a,{strokeDasharray:"3 3"}),Object(de.jsx)(ln.a,{minTickGap:10,dataKey:"timestamp",domain:[e.startTime,e.endTime],tickFormatter:function(e){return new Date(1e3*e).toLocaleTimeString()},type:"number",scale:"time",stroke:t.palette.text.secondary}),Object(de.jsx)(un.a,{tickFormatter:e.yAxisTickFormatter,stroke:t.palette.text.secondary}),Object(de.jsx)(dn.a,{labelFormatter:function(e){return new Date(1e3*e).toLocaleTimeString()}}),Object(de.jsx)(jn.a,{}),n.map((function(e,t){return Object(de.jsx)(br.a,{type:"monotone",dataKey:e,stroke:zl[t%zl.length],dot:!1},e)}))]})})}Ul.defaultProps={yAxisTickFormatter:function(e){return e.toString()}};var Kl=Ul,Gl=a(818),Ml=a(904),Vl=a(894),Fl=a(895),Ql=a(892),Yl=a(819),Wl=a(893),Jl=a(908),$l=a(354),Zl=a.n($l),Xl=a(355),eu=a.n(Xl),tu=a(353),au=a.n(tu),nu=a(352),ru=a.n(nu);function cu(e){return{pollInterval:e.settings.pollInterval}}Object(o.b)(cu);var su=Object(p.a)((function(e){return{root:{display:"flex",alignItems:"center"},endTimeCaption:{marginRight:e.spacing(1)},shiftButtons:{marginLeft:e.spacing(1)},buttonGroupRoot:{height:29,position:"relative",top:1},endTimeShiftControls:{padding:e.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",borderBottomColor:e.palette.divider,borderBottomWidth:1,borderBottomStyle:"solid"},leftShiftButtons:{display:"flex",alignItems:"center",marginRight:e.spacing(2)},rightShiftButtons:{display:"flex",alignItems:"center",marginLeft:e.spacing(2)},controlsContainer:{display:"flex",justifyContent:"flex-end"},controlSelectorBox:{display:"flex",minWidth:490,padding:e.spacing(2)},controlEndTimeSelector:{width:"50%"},controlDurationSelector:{width:"50%"},radioButtonRoot:{paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5),paddingLeft:e.spacing(1),paddingRight:e.spacing(1)},formControlLabel:{fontSize:14},buttonLabel:{textTransform:"none",fontSize:12},formControlRoot:{width:"100%",margin:0},formLabel:{fontSize:14,fontWeight:500,marginBottom:e.spacing(1)},customInputField:{marginTop:e.spacing(1)},filterButton:{marginLeft:e.spacing(1)},queueFilters:{padding:e.spacing(2),maxHeight:400},checkbox:{padding:6}}})),iu=86400;function ou(e){var t=new Date(1e3*e).toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2];return ru.a.unix(e).format("ddd, DD MMM YYYY HH:mm:ss ")+t}function lu(e){var t=su();return Object(de.jsx)(Fl.a,{classes:{label:t.formControlLabel},value:e.value,control:Object(de.jsx)(Ml.a,{size:"small",classes:{root:t.radioButtonRoot}}),label:e.label})}var uu=Object(p.a)((function(e){return{root:{minWidth:40,fontWeight:function(e){return e.dense?400:500}},label:{fontSize:12,textTransform:"none"},iconRoot:{marginRight:function(e){return"left"===e.direction?e.dense?-8:-4:0},marginLeft:function(e){return"right"===e.direction?e.dense?-8:-4:0},color:function(t){return t.color?t.color:e.palette.grey[kr(e)?200:700]}}}}));function du(e){var t=uu(e);return Object(de.jsxs)(Nn.a,Object(u.a)(Object(u.a)({},e),{},{classes:{root:t.root,label:t.label},size:"small",children:["left"===e.direction&&Object(de.jsx)(Zl.a,{classes:{root:t.iconRoot}}),e.text,"right"===e.direction&&Object(de.jsx)(eu.a,{classes:{root:t.iconRoot}})]}))}du.defaultProps={dense:!1};var ju=Object(o.b)(cu)((function(e){var t=su(),a=r.a.useState(function(e,t){var a="real_time",n="",r="1h",c="",s=za();switch(s<=e&&e<=s+1?a="real_time":(a="custom",n=new Date(1e3*e).toISOString()),t){case 3600:r="1h";break;case 21600:r="6h";break;case 86400:r="1d";break;case 8*iu:r="8d";break;case 30*iu:r="30d";break;default:r="custom",c=t+"s"}return{endTimeOption:a,customEndTime:n,customEndTimeError:"",durationOption:r,customDuration:c,customDurationError:""}}(e.endTimeSec,e.durationSec)),n=Object(On.a)(a,2),c=n[0],s=n[1],i=r.a.useState(null),o=Object(On.a)(i,2),l=o[0],d=o[1],j=r.a.useState(null),b=Object(On.a)(j,2),p=b[0],h=b[1],O=Boolean(l),f=Boolean(p);r.a.useEffect((function(){if("real_time"===c.endTimeOption){var t=setInterval((function(){e.onEndTimeChange(za(),!1)}),1e3*e.pollInterval);return function(){return clearInterval(t)}}}));var m=function(t){return function(){var a=za(),n=e.endTimeSec+t;if(a<=n)return s((function(e){return Object(u.a)(Object(u.a)({},e),{},{customEndTime:"",endTimeOption:"real_time"})})),void e.onEndTimeChange(a,!1);s((function(e){return Object(u.a)(Object(u.a)({},e),{},{endTimeOption:"custom",customEndTime:new Date(1e3*n).toISOString()})})),e.onEndTimeChange(n,!0)}};return Object(de.jsxs)("div",{className:t.root,children:[Object(de.jsx)(me.a,{variant:"caption",color:"textPrimary",className:t.endTimeCaption,children:ou(e.endTimeSec)}),Object(de.jsxs)("div",{children:[Object(de.jsxs)(Nn.a,{"aria-describedby":O?"time-popover":void 0,variant:"outlined",color:"primary",onClick:function(e){d(e.currentTarget)},size:"small",classes:{label:t.buttonLabel},children:["real_time"===c.endTimeOption?"Realtime":"Historical",":"," ","custom"===c.durationOption?c.customDuration:c.durationOption]}),Object(de.jsxs)(Gl.a,{id:O?"time-popover":void 0,open:O,anchorEl:l,onClose:function(){d(null)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[Object(de.jsxs)("div",{className:t.endTimeShiftControls,children:[Object(de.jsxs)("div",{className:t.leftShiftButtons,children:[Object(de.jsx)(du,{direction:"left",text:"2h",onClick:m(-7200),dense:!0}),Object(de.jsx)(du,{direction:"left",text:"1h",onClick:m(-3600),dense:!0}),Object(de.jsx)(du,{direction:"left",text:"30m",onClick:m(-1800),dense:!0}),Object(de.jsx)(du,{direction:"left",text:"15m",onClick:m(-900),dense:!0}),Object(de.jsx)(du,{direction:"left",text:"5m",onClick:m(-300),dense:!0})]}),Object(de.jsxs)("div",{className:t.rightShiftButtons,children:[Object(de.jsx)(du,{direction:"right",text:"5m",onClick:m(300),dense:!0}),Object(de.jsx)(du,{direction:"right",text:"15m",onClick:m(900),dense:!0}),Object(de.jsx)(du,{direction:"right",text:"30m",onClick:m(1800),dense:!0}),Object(de.jsx)(du,{direction:"right",text:"1h",onClick:m(3600),dense:!0}),Object(de.jsx)(du,{direction:"right",text:"2h",onClick:m(7200),dense:!0})]})]}),Object(de.jsxs)("div",{className:t.controlSelectorBox,children:[Object(de.jsx)("div",{className:t.controlEndTimeSelector,children:Object(de.jsxs)(Ql.a,{component:"fieldset",margin:"dense",classes:{root:t.formControlRoot},children:[Object(de.jsx)(Wl.a,{className:t.formLabel,component:"legend",children:"End Time"}),Object(de.jsxs)(Vl.a,{"aria-label":"end_time",name:"end_time",value:c.endTimeOption,onChange:function(t){var a=t.target.value;switch(s((function(e){return Object(u.a)(Object(u.a)({},e),{},{endTimeOption:a,customEndTime:"",customEndTimeError:""})})),a){case"real_time":e.onEndTimeChange(za(),!1);break;case"freeze_at_now":e.onEndTimeChange(za(),!0)}},children:[Object(de.jsx)(lu,{value:"real_time",label:"Real Time"}),Object(de.jsx)(lu,{value:"freeze_at_now",label:"Freeze at now"}),Object(de.jsx)(lu,{value:"custom",label:"Custom End Time"})]}),Object(de.jsx)("div",{className:t.customInputField,children:Object(de.jsx)(Jl.a,{id:"custom-endtime",label:"yyyy-mm-dd hh:mm:ssz",variant:"outlined",size:"small",onChange:function(e){e.persist(),s((function(t){return Object(u.a)(Object(u.a)({},t),{},{customEndTime:e.target.value})}))},value:c.customEndTime,onKeyDown:function(t){if("Enter"===t.key){var a=Date.parse(c.customEndTime);if(isNaN(a))return void s((function(e){return Object(u.a)(Object(u.a)({},e),{},{customEndTimeError:"End time invalid"})}));s((function(e){return Object(u.a)(Object(u.a)({},e),{},{endTimeOption:"custom",customEndTimeError:""})})),e.onEndTimeChange(Math.floor(a/1e3),!0)}},error:""!==c.customEndTimeError,helperText:c.customEndTimeError})})]})}),Object(de.jsx)("div",{className:t.controlDurationSelector,children:Object(de.jsxs)(Ql.a,{component:"fieldset",margin:"dense",classes:{root:t.formControlRoot},children:[Object(de.jsx)(Wl.a,{className:t.formLabel,component:"legend",children:"Duration"}),Object(de.jsxs)(Vl.a,{"aria-label":"duration",name:"duration",value:c.durationOption,onChange:function(t){var a=t.target.value;s((function(e){return Object(u.a)(Object(u.a)({},e),{},{durationOption:a,customDuration:"",customDurationError:""})}));var n="real_time"!==c.endTimeOption;switch(a){case"1h":e.onDurationChange(3600,n);break;case"6h":e.onDurationChange(21600,n);break;case"1d":e.onDurationChange(86400,n);break;case"8d":e.onDurationChange(8*iu,n);break;case"30d":e.onDurationChange(30*iu,n)}},children:[Object(de.jsx)(lu,{value:"1h",label:"1h"}),Object(de.jsx)(lu,{value:"6h",label:"6h"}),Object(de.jsx)(lu,{value:"1d",label:"1 day"}),Object(de.jsx)(lu,{value:"8d",label:"8 days"}),Object(de.jsx)(lu,{value:"30d",label:"30 days"}),Object(de.jsx)(lu,{value:"custom",label:"Custom Duration"})]}),Object(de.jsx)("div",{className:t.customInputField,children:Object(de.jsx)(Jl.a,{id:"custom-duration",label:"duration",variant:"outlined",size:"small",onChange:function(e){e.persist(),s((function(t){return Object(u.a)(Object(u.a)({},t),{},{customDuration:e.target.value})}))},value:c.customDuration,onKeyDown:function(t){if("Enter"===t.key)try{var a=function(e){if(!Ua.test(e))throw new Error("invalid duration");var t=parseFloat(e.slice(0,-1));switch(e.slice(-1)){case"s":return t;case"m":return 60*t;case"h":return 60*t*60;default:throw new Error("invalid duration unit")}}(c.customDuration);s((function(e){return Object(u.a)(Object(u.a)({},e),{},{durationOption:"custom",customDurationError:""})})),e.onDurationChange(a,"real_time"!==c.endTimeOption)}catch(n){s((function(e){return Object(u.a)(Object(u.a)({},e),{},{customDurationError:"Duration invalid"})}))}},error:""!==c.customDurationError,helperText:c.customDurationError})})]})})]})]})]}),Object(de.jsx)("div",{className:t.shiftButtons,children:Object(de.jsxs)(Xn.a,{classes:{root:t.buttonGroupRoot},size:"small",color:"primary","aria-label":"shift buttons",children:[Object(de.jsx)(du,{direction:"left",text:"custom"===c.durationOption?"1h":c.durationOption,color:"primary",onClick:"custom"===c.durationOption?m(-3600):m(-e.durationSec)}),Object(de.jsx)(du,{direction:"right",text:"custom"===c.durationOption?"1h":c.durationOption,color:"primary",onClick:"custom"===c.durationOption?m(3600):m(e.durationSec)})]})}),Object(de.jsxs)("div",{className:t.filterButton,children:[Object(de.jsx)(_.a,{"aria-label":"filter",size:"small",onClick:function(e){h(e.currentTarget)},children:Object(de.jsx)(au.a,{})}),Object(de.jsx)(Gl.a,{id:f?"queue-popover":void 0,open:f,anchorEl:p,onClose:function(){h(null)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:Object(de.jsxs)(Ql.a,{className:t.queueFilters,children:[Object(de.jsx)(Wl.a,{className:t.formLabel,component:"legend",children:"Queues"}),Object(de.jsx)(Yl.a,{children:e.queues.map((function(a){return Object(de.jsx)(Fl.a,{control:Object(de.jsx)(lc.a,{size:"small",checked:e.selectedQueues.includes(a),onChange:function(){e.selectedQueues.includes(a)?e.removeQueue(a):e.addQueue(a)},name:a,className:t.checkbox}),label:a,classes:{label:t.formControlLabel}},a)}))})]})})]})]})})),bu=Object(p.a)((function(e){return{container:{marginTop:30,paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},controlsContainer:{display:"flex",justifyContent:"flex-end",position:"fixed",background:e.palette.background.paper,zIndex:e.zIndex.appBar,right:0,top:64,width:"100%",padding:e.spacing(2)},chartInfo:{display:"flex",alignItems:"center",marginBottom:e.spacing(1)},infoIcon:{marginLeft:e.spacing(1),color:e.palette.grey[500],cursor:"pointer"},errorMessage:{marginLeft:"auto",display:"flex",alignItems:"center"},warningIcon:{color:"#ff6700",marginRight:6}}}));var pu=Object(o.b)((function(e){return{loading:e.metrics.loading,error:e.metrics.error,data:e.metrics.data,pollInterval:e.settings.pollInterval,queues:e.queues.data.map((function(e){return e.name}))}}),{getMetricsAsync:function(e,t,a){return function(){var n=Object(ke.a)(_e.a.mark((function n(r){var c;return _e.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r({type:Ll}),n.prev=1,n.next=4,Ea(e,t,a);case 4:c=n.sent,r({type:Bl,payload:c}),n.next=12;break;case 8:n.prev=8,n.t0=n.catch(1),console.error("getMetricsAsync: ".concat(Ca(n.t0))),r({type:Hl,error:wa(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[1,8]])})));return function(e){return n.apply(this,arguments)}}()},listQueuesAsync:en}),hu="end",Ou="duration";var fu=pu((function(e){var t=bu(),a=Object(b.f)(),n=ur(),c=n.get(hu),s=c?parseFloat(c):za(),i=n.get(Ou),o=i?parseFloat(i):3600,d=e.pollInterval,j=e.getMetricsAsync,p=e.listQueuesAsync,h=e.data,O=r.a.useState(s),f=Object(On.a)(O,2),m=f[0],x=f[1],g=r.a.useState(o),v=Object(On.a)(g,2),y=v[0],k=v[1],S=r.a.useState([]),_=Object(On.a)(S,2),T=_[0],E=_[1];return r.a.useEffect((function(){p()}),[p]),r.a.useEffect((function(){j(m,y,T)}),[d,j,y,m,T]),Object(de.jsxs)(he.a,{maxWidth:"lg",className:t.container,children:[Object(de.jsx)("div",{className:t.controlsContainer,children:Object(de.jsx)(ju,{endTimeSec:m,onEndTimeChange:function(e,t){var n,r=t?(n={},Object(l.a)(n,hu,e),Object(l.a)(n,Ou,y),n):Object(l.a)({},Ou,y);a.push(Object(u.a)(Object(u.a)({},a.location),{},{search:Ce.a.stringify(r)})),x(e)},durationSec:y,onDurationChange:function(e,t){var n,r=t?(n={},Object(l.a)(n,hu,m),Object(l.a)(n,Ou,e),n):Object(l.a)({},Ou,e);a.push(Object(u.a)(Object(u.a)({},a.location),{},{search:Ce.a.stringify(r)})),k(e)},queues:e.queues,selectedQueues:0===T.length?e.queues:T,addQueue:function(e){T.includes(e)||E(T.concat(e))},removeQueue:function(t){1!==T.length&&(0!==T.length?E(T.filter((function(e){return e!==t}))):E(e.queues.filter((function(e){return e!==t}))))}})}),Object(de.jsxs)(Oe.a,{container:!0,spacing:3,children:[(null===h||void 0===h?void 0:h.tasks_processed_per_second)&&Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(mu,{title:"Tasks Processed",description:"Number of tasks processed (both succeeded and failed) per second.",metrics:h.tasks_processed_per_second,endTime:m,startTime:m-y})}),(null===h||void 0===h?void 0:h.tasks_failed_per_second)&&Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(mu,{title:"Tasks Failed",description:"Number of tasks failed per second.",metrics:h.tasks_failed_per_second,endTime:m,startTime:m-y})}),(null===h||void 0===h?void 0:h.error_rate)&&Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(mu,{title:"Error Rate",description:"Rate of task failures",metrics:h.error_rate,endTime:m,startTime:m-y})}),(null===h||void 0===h?void 0:h.queue_size)&&Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(mu,{title:"Queue Size",description:"Total number of tasks in a given queue.",metrics:h.queue_size,endTime:m,startTime:m-y})}),(null===h||void 0===h?void 0:h.queue_latency_seconds)&&Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(mu,{title:"Queue Latency",description:"Latency of queue, measured by the oldest pending task in the queue.",metrics:h.queue_latency_seconds,endTime:m,startTime:m-y,yAxisTickFormatter:function(e){return e+"s"}})}),(null===h||void 0===h?void 0:h.queue_size)&&Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(mu,{title:"Queue Memory Usage (approx)",description:"Memory usage by queue. Approximate value by sampling a few tasks in a queue.",metrics:h.queue_memory_usage_approx_bytes,endTime:m,startTime:m-y,yAxisTickFormatter:function(e){try{return Mn()(e)}catch(t){return e+"B"}}})}),(null===h||void 0===h?void 0:h.pending_tasks_by_queue)&&Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(mu,{title:"Pending Tasks",description:"Number of pending tasks in a given queue.",metrics:h.pending_tasks_by_queue,endTime:m,startTime:m-y})}),(null===h||void 0===h?void 0:h.retry_tasks_by_queue)&&Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(mu,{title:"Retry Tasks",description:"Number of retry tasks in a given queue.",metrics:h.retry_tasks_by_queue,endTime:m,startTime:m-y})}),(null===h||void 0===h?void 0:h.archived_tasks_by_queue)&&Object(de.jsx)(Oe.a,{item:!0,xs:12,children:Object(de.jsx)(mu,{title:"Archived Tasks",description:"Number of archived tasks in a given queue.",metrics:h.archived_tasks_by_queue,endTime:m,startTime:m-y})})]})]})}));function mu(e){var t,a=bu();return Object(de.jsxs)(de.Fragment,{children:[Object(de.jsxs)("div",{className:a.chartInfo,children:[Object(de.jsx)(me.a,{color:"textPrimary",children:e.title}),Object(de.jsx)(Zn,{title:Object(de.jsx)("div",{children:e.description}),children:Object(de.jsx)(ge.a,{fontSize:"small",className:a.infoIcon})}),"error"===e.metrics.status&&Object(de.jsxs)("div",{className:a.errorMessage,children:[Object(de.jsx)(Dl.a,{fontSize:"small",className:a.warningIcon}),Object(de.jsxs)(me.a,{color:"textSecondary",children:["Failed to get metrics data: ",e.metrics.error]})]})]}),Object(de.jsx)(Kl,{data:"error"===e.metrics.status?[]:(null===(t=e.metrics.data)||void 0===t?void 0:t.result)||[],endTime:e.endTime,startTime:e.startTime,yAxisTickFormatter:e.yAxisTickFormatter})]})}var xu,gu,vu=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},headingText:{fontWeight:"bold"}}}));function yu(){var e=vu();return Object(de.jsx)(he.a,{maxWidth:"lg",className:e.container,children:Object(de.jsx)(Oe.a,{container:!0,spacing:3,children:Object(de.jsxs)(Oe.a,{item:!0,xs:12,children:[Object(de.jsx)(me.a,{variant:"h5",align:"center",className:e.headingText,children:"Oops!"}),Object(de.jsx)(me.a,{variant:"subtitle1",color:"textSecondary",align:"center",children:"404 - Page Not Found"})]})})})}var ku=["title","titleId"];function Su(){return Su=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},Su.apply(this,arguments)}function _u(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},c=Object.keys(e);for(n=0;n<c.length;n++)a=c[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)a=c[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function Tu(e,t){var a=e.title,r=e.titleId,c=_u(e,ku);return n.createElement("svg",Su({fill:"none",height:397,viewBox:"0 0 1663 397",width:1663,xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},c),a?n.createElement("title",{id:r},a):null,xu||(xu=n.createElement("g",{fill:"#2f80ed"},n.createElement("path",{d:"m206.548 169.585c-.557-23.718 13.058-45.343 34.682-55.094 29.6-13.347 64.54-.124 77.887 29.477l15.238 12.411.787-19.637c-17.331-38.4361-62.701-55.6064-101.137-38.2754-28.077 12.6594-45.753 40.7374-45.031 71.5204l.722 32.337 7.225 16.025 10.183-23.874z"}),n.createElement("path",{d:"m107.46 139.032c2.407 5.339 5.56 10.213 9.32 14.511-5.737 1.125-11.386 2.914-16.8471 5.377-38.4362 17.331-55.6065 62.701-38.2754 101.137l15.2377 12.412.7867-19.637c-13.3469-29.601-.1238-64.541 29.4761-77.888 13.93-6.281 29.44-6.923 43.805-1.844l-4.244 11.213 42.371-6.199-27.65-32.7-4.255 11.246c-2.446-.879-4.918-1.63-7.408-2.253-11.712-3.279-21.294-11.514-26.294-22.6-9.274-20.57-.085-44.85 20.484-54.1248 20.57-9.2749 44.85-.0862 54.125 20.4834l16.024-7.2255c-13.259-29.4054-47.969-42.5414-77.374-29.2824s-42.5414 47.9693-29.282 77.3743z"}),n.createElement("path",{d:"m162.795 298.333c28.076-12.66 45.753-40.737 45.03-71.521l-.721-32.337-17.408 7.85.555 24.89c.557 23.717-13.057 45.343-34.682 55.093-29.6 13.347-64.5399.124-77.8868-29.476l-16.0244 7.225c17.331 38.437 62.7012 55.607 101.1372 38.276z"}),n.createElement("path",{d:"m289.641 221.854c-13.93 6.281-29.439 6.924-43.805 1.845l4.244-11.213-42.371 6.199 27.65 32.699 4.256-11.245c2.446.879 4.917 1.63 7.407 2.253 11.713 3.278 21.295 11.513 26.294 22.6 9.274 20.57.086 44.85-20.484 54.125-20.569 9.275-44.849.086-54.124-20.484l-16.025 7.226c13.259 29.405 47.969 42.541 77.375 29.282 29.405-13.259 42.541-47.969 29.282-77.374-2.407-5.339-5.561-10.213-9.321-14.511 5.738-1.125 11.386-2.915 16.847-5.377 38.437-17.331 55.607-62.701 38.276-101.137l-16.024 7.225c13.346 29.601.123 64.541-29.477 77.887z"}))),gu||(gu=n.createElement("path",{d:"m517.32 233.008h-80.896l-20.992 52.992h-13.568l67.584-168.96h15.104l67.584 168.96h-13.568zm-4.608-11.776-29.44-73.728-6.144-17.92h-.256l-6.144 17.408-29.44 74.24zm108.05 67.328c-12.971 0-24.235-2.56-33.792-7.68s-16.128-12.544-19.712-22.272l10.496-6.912c2.56 8.533 7.765 14.933 15.616 19.2s17.493 6.4 28.928 6.4c11.605 0 20.651-2.219 27.136-6.656 6.656-4.437 9.984-10.325 9.984-17.664 0-6.315-2.816-11.349-8.448-15.104s-15.531-6.912-29.696-9.472c-17.92-3.243-30.549-7.595-37.888-13.056s-11.008-13.227-11.008-23.296c0-6.656 2.048-12.8 6.144-18.432s9.899-10.069 17.408-13.312 16.043-4.864 25.6-4.864c13.483 0 24.235 2.56 32.256 7.68 8.192 5.12 13.824 12.971 16.896 23.552l-11.008 6.4c-4.779-17.579-17.493-26.368-38.144-26.368-6.827 0-13.056 1.109-18.688 3.328-5.461 2.219-9.813 5.205-13.056 8.96-3.072 3.584-4.608 7.509-4.608 11.776 0 6.997 2.901 12.459 8.704 16.384s16.043 7.168 30.72 9.728c17.408 2.901 29.696 7.083 36.864 12.544s10.752 13.141 10.752 23.04c0 10.923-4.693 19.712-14.08 26.368-9.216 6.485-21.675 9.728-37.376 9.728zm122.732 20.992c-4.779 11.605-10.069 19.712-15.872 24.32-5.803 4.779-13.141 7.168-22.016 7.168-10.581 0-18.688-3.157-24.32-9.472l4.864-11.008c4.096 6.144 10.581 9.216 19.456 9.216 5.973 0 11.008-1.707 15.104-5.12 4.267-3.243 8.192-9.301 11.776-18.176l8.192-20.48-13.312-31.744-40.704-96.256h14.592l39.168 97.024 6.4 17.152 6.912-18.432 37.632-95.744h13.824zm149.444-154.112c14.677 0 26.453 4.096 35.328 12.288 9.045 8.192 13.568 19.968 13.568 35.328v82.944h-12.8v-78.848c0-13.653-3.328-23.808-9.984-30.464s-15.787-9.984-27.392-9.984c-8.192 0-15.787 1.877-22.784 5.632s-12.629 9.216-16.896 16.384c-4.096 7.168-6.144 15.531-6.144 25.088v72.192h-12.8v-128h11.52l.512 25.856c4.096-9.216 10.325-16.213 18.688-20.992 8.533-4.949 18.261-7.424 29.184-7.424zm203.692 2.56v181.76h-12.8v-80.896c-3.93 9.216-9.99 16.469-18.18 21.76s-17.83 7.936-28.93 7.936c-18.09 0-32.42-5.888-43.006-17.664-10.411-11.776-15.616-28.075-15.616-48.896s5.205-37.12 15.616-48.896c10.586-11.776 24.916-17.664 43.006-17.664 11.44 0 21.34 2.816 29.7 8.448 8.36 5.461 14.33 13.056 17.92 22.784l.77-28.672zm-58.37 119.296c13.31 0 23.98-4.437 32-13.312 8.19-9.045 12.71-21.248 13.57-36.608v-10.752c-.69-15.36-5.12-27.477-13.32-36.352-8.19-9.045-18.94-13.568-32.25-13.568-14.85 0-26.46 4.949-34.82 14.848-8.361 9.728-12.542 23.211-12.542 40.448s4.181 30.805 12.542 40.704c8.36 9.728 19.97 14.592 34.82 14.592zm259.93-122.368c14.5 0 26.11 4.096 34.81 12.288 8.71 8.192 13.06 19.712 13.06 34.56v83.712h-7.17v-82.944c0-13.141-3.75-23.296-11.26-30.464s-17.67-10.752-30.47-10.752c-9.21 0-17.66 2.219-25.34 6.656-7.51 4.267-13.48 10.155-17.92 17.664-4.27 7.339-6.4 15.36-6.4 24.064v76.288h-7.17v-82.944c0-13.141-3.75-23.296-11.26-30.464-7.51-7.339-17.67-11.008-30.47-11.008-9.04 0-17.4 2.219-25.08 6.656-7.51 4.267-13.49 10.155-17.92 17.664-4.44 7.339-6.66 15.531-6.66 24.576v75.52h-7.17v-128h6.66l.25 30.464c3.59-10.069 9.99-18.091 19.2-24.064 9.22-5.973 19.8-8.96 31.75-8.96 12.29 0 22.53 2.987 30.72 8.96 8.36 5.973 13.65 14.507 15.87 25.6 3.07-10.411 9.39-18.859 18.94-25.344 9.56-6.485 20.57-9.728 33.03-9.728zm142.29.512c18.61 0 33.2 5.888 43.78 17.664 10.75 11.776 16.13 28.075 16.13 48.896s-5.38 37.12-16.13 48.896c-10.58 11.776-25.17 17.664-43.78 17.664-18.77 0-33.53-5.888-44.28-17.664-10.76-11.947-16.13-28.245-16.13-48.896s5.37-36.864 16.13-48.64c10.75-11.947 25.51-17.92 44.28-17.92zm0 6.144c-16.55 0-29.61 5.376-39.16 16.128-9.39 10.752-14.08 25.515-14.08 44.288s4.69 33.536 14.08 44.288c9.55 10.752 22.61 16.128 39.16 16.128 16.39 0 29.27-5.376 38.66-16.128s14.08-25.515 14.08-44.288-4.69-33.536-14.08-44.288-22.27-16.128-38.66-16.128zm153.9-6.144c14.85 0 26.54 4.096 35.08 12.288 8.7 8.192 13.05 19.712 13.05 34.56v83.712h-7.17v-81.92c0-13.653-3.75-24.149-11.26-31.488s-17.75-11.008-30.72-11.008c-9.22 0-17.66 2.219-25.34 6.656-7.51 4.267-13.49 10.155-17.92 17.664-4.44 7.339-6.66 15.616-6.66 24.832v75.264h-7.17v-128h6.66v30.72c3.58-10.24 9.98-18.347 19.2-24.32 9.21-5.973 19.97-8.96 32.25-8.96z",fill:"#828282"})))}var Eu,Au=n.forwardRef(Tu),Cu=(a.p,["title","titleId"]);function wu(){return wu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},wu.apply(this,arguments)}function Ru(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},c=Object.keys(e);for(n=0;n<c.length;n++)a=c[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)a=c[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function Iu(e,t){var a=e.title,r=e.titleId,c=Ru(e,Cu);return n.createElement("svg",wu({fill:"none",height:397,viewBox:"0 0 1663 397",width:1663,xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},c),a?n.createElement("title",{id:r},a):null,Eu||(Eu=n.createElement("g",{fill:"#f2f2f2"},n.createElement("path",{d:"m206.548 169.585c-.556-23.718 13.058-45.343 34.682-55.094 29.6-13.347 64.54-.124 77.887 29.477l15.238 12.411.787-19.637c-17.331-38.4361-62.701-55.6064-101.137-38.2754-28.077 12.6594-45.753 40.7374-45.031 71.5204l.722 32.337 7.225 16.025 10.183-23.874z"}),n.createElement("path",{d:"m107.46 139.032c2.407 5.339 5.56 10.213 9.321 14.511-5.738 1.125-11.387 2.914-16.8479 5.377-38.4363 17.331-55.6066 62.701-38.2755 101.137l15.2377 12.412.7867-19.637c-13.3469-29.601-.1238-64.541 29.477-77.888 13.929-6.281 29.439-6.923 43.804-1.844l-4.244 11.213 42.371-6.199-27.649-32.7-4.256 11.246c-2.446-.879-4.917-1.63-7.407-2.253-11.713-3.279-21.295-11.514-26.294-22.6-9.275-20.57-.086-44.85 20.484-54.1248 20.569-9.2749 44.849-.0862 54.124 20.4834l16.024-7.2255c-13.259-29.4054-47.969-42.5414-77.374-29.2824s-42.5413 47.9693-29.282 77.3743z"}),n.createElement("path",{d:"m162.795 298.333c28.076-12.66 45.753-40.737 45.03-71.521l-.721-32.337-17.408 7.85.555 24.89c.557 23.717-13.057 45.343-34.682 55.093-29.6 13.347-64.5399.124-77.8868-29.476l-16.0244 7.225c17.331 38.437 62.7012 55.607 101.1372 38.276z"}),n.createElement("path",{d:"m289.641 221.854c-13.929 6.281-29.439 6.924-43.804 1.845l4.243-11.213-42.371 6.199 27.65 32.699 4.256-11.245c2.446.879 4.917 1.63 7.407 2.253 11.713 3.278 21.295 11.513 26.294 22.6 9.274 20.57.086 44.85-20.484 54.125-20.569 9.275-44.849.086-54.124-20.484l-16.025 7.226c13.259 29.405 47.969 42.541 77.375 29.282 29.405-13.259 42.541-47.969 29.282-77.374-2.407-5.339-5.561-10.213-9.321-14.511 5.738-1.125 11.386-2.915 16.848-5.377 38.436-17.331 55.606-62.701 38.275-101.137l-16.024 7.225c13.346 29.601.123 64.541-29.477 77.887z"}),n.createElement("path",{d:"m517.32 233.008h-80.896l-20.992 52.992h-13.568l67.584-168.96h15.104l67.584 168.96h-13.568zm-4.608-11.776-29.44-73.728-6.144-17.92h-.256l-6.144 17.408-29.44 74.24zm108.05 67.328c-12.971 0-24.235-2.56-33.792-7.68s-16.128-12.544-19.712-22.272l10.496-6.912c2.56 8.533 7.765 14.933 15.616 19.2s17.493 6.4 28.928 6.4c11.605 0 20.651-2.219 27.136-6.656 6.656-4.437 9.984-10.325 9.984-17.664 0-6.315-2.816-11.349-8.448-15.104s-15.531-6.912-29.696-9.472c-17.92-3.243-30.549-7.595-37.888-13.056s-11.008-13.227-11.008-23.296c0-6.656 2.048-12.8 6.144-18.432s9.899-10.069 17.408-13.312 16.043-4.864 25.6-4.864c13.483 0 24.235 2.56 32.256 7.68 8.192 5.12 13.824 12.971 16.896 23.552l-11.008 6.4c-4.779-17.579-17.493-26.368-38.144-26.368-6.827 0-13.056 1.109-18.688 3.328-5.461 2.219-9.813 5.205-13.056 8.96-3.072 3.584-4.608 7.509-4.608 11.776 0 6.997 2.901 12.459 8.704 16.384s16.043 7.168 30.72 9.728c17.408 2.901 29.696 7.083 36.864 12.544s10.752 13.141 10.752 23.04c0 10.923-4.693 19.712-14.08 26.368-9.216 6.485-21.675 9.728-37.376 9.728zm122.732 20.992c-4.779 11.605-10.069 19.712-15.872 24.32-5.803 4.779-13.141 7.168-22.016 7.168-10.581 0-18.688-3.157-24.32-9.472l4.864-11.008c4.096 6.144 10.581 9.216 19.456 9.216 5.973 0 11.008-1.707 15.104-5.12 4.267-3.243 8.192-9.301 11.776-18.176l8.192-20.48-13.312-31.744-40.704-96.256h14.592l39.168 97.024 6.4 17.152 6.912-18.432 37.632-95.744h13.824zm149.444-154.112c14.677 0 26.453 4.096 35.328 12.288 9.045 8.192 13.568 19.968 13.568 35.328v82.944h-12.8v-78.848c0-13.653-3.328-23.808-9.984-30.464s-15.787-9.984-27.392-9.984c-8.192 0-15.787 1.877-22.784 5.632s-12.629 9.216-16.896 16.384c-4.096 7.168-6.144 15.531-6.144 25.088v72.192h-12.8v-128h11.52l.512 25.856c4.096-9.216 10.325-16.213 18.688-20.992 8.533-4.949 18.261-7.424 29.184-7.424zm203.692 2.56v181.76h-12.8v-80.896c-3.93 9.216-9.99 16.469-18.18 21.76s-17.83 7.936-28.93 7.936c-18.09 0-32.42-5.888-43.006-17.664-10.411-11.776-15.616-28.075-15.616-48.896s5.205-37.12 15.616-48.896c10.586-11.776 24.916-17.664 43.006-17.664 11.44 0 21.34 2.816 29.7 8.448 8.36 5.461 14.33 13.056 17.92 22.784l.77-28.672zm-58.37 119.296c13.31 0 23.98-4.437 32-13.312 8.19-9.045 12.71-21.248 13.57-36.608v-10.752c-.69-15.36-5.12-27.477-13.32-36.352-8.19-9.045-18.94-13.568-32.25-13.568-14.85 0-26.46 4.949-34.82 14.848-8.361 9.728-12.542 23.211-12.542 40.448s4.181 30.805 12.542 40.704c8.36 9.728 19.97 14.592 34.82 14.592zm259.93-122.368c14.5 0 26.11 4.096 34.81 12.288 8.71 8.192 13.06 19.712 13.06 34.56v83.712h-7.17v-82.944c0-13.141-3.75-23.296-11.26-30.464s-17.67-10.752-30.47-10.752c-9.21 0-17.66 2.219-25.34 6.656-7.51 4.267-13.48 10.155-17.92 17.664-4.27 7.339-6.4 15.36-6.4 24.064v76.288h-7.17v-82.944c0-13.141-3.75-23.296-11.26-30.464-7.51-7.339-17.67-11.008-30.47-11.008-9.04 0-17.4 2.219-25.08 6.656-7.51 4.267-13.49 10.155-17.92 17.664-4.44 7.339-6.66 15.531-6.66 24.576v75.52h-7.17v-128h6.66l.25 30.464c3.59-10.069 9.99-18.091 19.2-24.064 9.22-5.973 19.8-8.96 31.75-8.96 12.29 0 22.53 2.987 30.72 8.96 8.36 5.973 13.65 14.507 15.87 25.6 3.07-10.411 9.39-18.859 18.94-25.344 9.56-6.485 20.57-9.728 33.03-9.728zm142.29.512c18.61 0 33.2 5.888 43.78 17.664 10.75 11.776 16.13 28.075 16.13 48.896s-5.38 37.12-16.13 48.896c-10.58 11.776-25.17 17.664-43.78 17.664-18.77 0-33.53-5.888-44.28-17.664-10.76-11.947-16.13-28.245-16.13-48.896s5.37-36.864 16.13-48.64c10.75-11.947 25.51-17.92 44.28-17.92zm0 6.144c-16.55 0-29.61 5.376-39.16 16.128-9.39 10.752-14.08 25.515-14.08 44.288s4.69 33.536 14.08 44.288c9.55 10.752 22.61 16.128 39.16 16.128 16.39 0 29.27-5.376 38.66-16.128s14.08-25.515 14.08-44.288-4.69-33.536-14.08-44.288-22.27-16.128-38.66-16.128zm153.9-6.144c14.85 0 26.54 4.096 35.08 12.288 8.7 8.192 13.05 19.712 13.05 34.56v83.712h-7.17v-81.92c0-13.653-3.75-24.149-11.26-31.488s-17.75-11.008-30.72-11.008c-9.22 0-17.66 2.219-25.34 6.656-7.51 4.267-13.49 10.155-17.92 17.664-4.44 7.339-6.66 15.616-6.66 24.832v75.264h-7.17v-128h6.66v30.72c3.58-10.24 9.98-18.347 19.2-24.32 9.21-5.973 19.97-8.96 32.25-8.96z"}))))}var qu=n.forwardRef(Iu);a.p;var Nu={closeSnackbar:function(){return{type:Sr}},toggleDrawer:function(){return{type:$}}};function Pu(e){return Object(de.jsx)(T.a,Object(u.a)(Object(u.a)({},e),{},{direction:"up"}))}var Du=Object(o.b)((function(e){return{snackbar:e.snackbar,themePreference:e.settings.themePreference,isDrawerOpen:e.settings.isDrawerOpen}}),Nu)((function(e){var t=function(e){var t=Object(yr.a)("(prefers-color-scheme: dark)");return e===mr.Always?t=!0:e===mr.Never&&(t=!1),Object(Y.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:kr(e)?e.palette.grey[100]:e.palette.grey[700]},menuButtonHidden:{display:"none"},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)(),n=V();return Object(de.jsx)(h.a,{theme:t,children:Object(de.jsx)(j.a,{children:Object(de.jsxs)("div",{className:a.root,children:[Object(de.jsx)(O.a,{position:"absolute",className:a.appBar,variant:"outlined",children:Object(de.jsxs)(m.a,{className:a.toolbar,children:[Object(de.jsx)(_.a,{edge:"start",color:"inherit","aria-label":"open drawer",onClick:e.toggleDrawer,className:a.menuButton,children:Object(de.jsx)(A.a,{})}),kr(t)?Object(de.jsx)(qu,{width:200,height:48}):Object(de.jsx)(Au,{width:200,height:48})]})}),Object(de.jsxs)("div",{className:a.mainContainer,children:[Object(de.jsxs)(f.a,{variant:"permanent",classes:{paper:Object(d.default)(a.drawerPaper,!e.isDrawerOpen&&a.drawerPaperClose)},open:e.isDrawerOpen,children:[Object(de.jsx)(k.a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:e.snackbar.isOpen,autoHideDuration:6e3,onClose:e.closeSnackbar,TransitionComponent:Pu,children:Object(de.jsx)(S.a,{message:e.snackbar.message,className:a.snackbar,action:Object(de.jsx)(_.a,{size:"small","aria-label":"close",color:"inherit",onClick:e.closeSnackbar,children:Object(de.jsx)(M.a,{className:a.snackbarCloseIcon,fontSize:"small"})})})}),Object(de.jsx)("div",{className:a.appBarSpacer}),Object(de.jsxs)("div",{className:a.sidebarContainer,children:[Object(de.jsx)(x.a,{children:Object(de.jsxs)("div",{children:[Object(de.jsx)(Tr,{to:n.HOME,primary:"Queues",icon:Object(de.jsx)(w.a,{})}),Object(de.jsx)(Tr,{to:n.SERVERS,primary:"Servers",icon:Object(de.jsx)(K.a,{})}),Object(de.jsx)(Tr,{to:n.SCHEDULERS,primary:"Schedulers",icon:Object(de.jsx)(D.a,{})}),Object(de.jsx)(Tr,{to:n.REDIS,primary:"Redis",icon:Object(de.jsx)(I.a,{})}),window.PROMETHEUS_SERVER_ADDRESS&&Object(de.jsx)(Tr,{to:n.QUEUE_METRICS,primary:"Metrics",icon:Object(de.jsx)(z.a,{})})]})}),Object(de.jsxs)(x.a,{children:[Object(de.jsx)(Tr,{to:n.SETTINGS,primary:"Settings",icon:Object(de.jsx)(N.a,{})}),Object(de.jsxs)(g.a,{button:!0,component:"a",className:a.listItem,href:"https://github.com/hibiken/asynqmon/issues",target:"_blank",children:[Object(de.jsx)(v.a,{children:Object(de.jsx)(B.a,{})}),Object(de.jsx)(y.a,{primary:"Send Feedback"})]})]})]})]}),Object(de.jsx)("main",{className:a.content,children:Object(de.jsx)("div",{className:a.contentWrapper,children:Object(de.jsxs)(b.c,{children:[Object(de.jsx)(b.a,{exact:!0,path:n.TASK_DETAILS,children:Object(de.jsx)(Wo,{})}),Object(de.jsx)(b.a,{exact:!0,path:n.QUEUE_DETAILS,children:Object(de.jsx)(Mo,{})}),Object(de.jsx)(b.a,{exact:!0,path:n.SCHEDULERS,children:Object(de.jsx)(nc,{})}),Object(de.jsx)(b.a,{exact:!0,path:n.SERVERS,children:Object(de.jsx)(vl,{})}),Object(de.jsx)(b.a,{exact:!0,path:n.REDIS,children:Object(de.jsx)(Nl,{})}),Object(de.jsx)(b.a,{exact:!0,path:n.SETTINGS,children:Object(de.jsx)(nl,{})}),Object(de.jsx)(b.a,{exact:!0,path:n.HOME,children:Object(de.jsx)(xr,{})}),Object(de.jsx)(b.a,{exact:!0,path:n.QUEUE_METRICS,children:Object(de.jsx)(fu,{})}),Object(de.jsx)(b.a,{path:"*",children:Object(de.jsx)(yu,{})})]})})})]})]})})})})),Lu=a(94),Bu=a(368),Hu={data:[],loading:!1,error:""};var zu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hu,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ka:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Ga: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 Ma:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case Va:case Ya:case $a: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 Fa:var r=e.data.filter((function(e){return e.name!==t.queue}));return Object(u.a)(Object(u.a)({},e),{},{data:r});case Wa: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 Za: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 Qa:case Ja:case Xa: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 gc:case kc:case Tc:case Cc:case Ic: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 Qc: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 Jc: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 Xc: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 cs: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 ds: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 ps: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 as: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 os: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 fs: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,pending:e.currentStats.pending-t.payload.archived_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:m});case gs: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),{},{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:x});case Ts: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),{},{archived:e.currentStats.archived+e.currentStats.pending,pending:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:g});case ks: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 Cs: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 Is: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+t.payload.archived_ids.length,scheduled:e.currentStats.scheduled-t.payload.archived_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:k});case Ps: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 Bs: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),{},{pending:e.currentStats.pending+e.currentStats.scheduled,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:_});case Us: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),{},{archived:e.currentStats.archived+e.currentStats.scheduled,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:T});case Ms: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-t.deleted,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:E});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-1,retry:e.currentStats.retry-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:A});case Js: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 Xs: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),{},{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:w});case ai: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),{},{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:R});case ci: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),{},{pending:e.currentStats.pending+e.currentStats.retry,retry:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:I});case oi: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 di: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-t.deleted,retry:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:N});case pi: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-1,archived:e.currentStats.archived-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:P});case Ci: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 fi: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 gi: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 Pi: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 ki: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),{},{pending:e.currentStats.pending+e.currentStats.archived,archived:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:z});case Ti: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),{},{size:e.currentStats.size-t.deleted,archived:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:U});case Ii: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,completed:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:K});default:return e}},Uu={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 Ku=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Uu,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Oc:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:Object(u.a)(Object(u.a)({},e.taskInfo),{},{loading:!0})});case mc:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:{loading:!1,error:t.error}});case fc:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:{loading:!1,error:"",data:t.payload}});case xc:return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{loading:!0})});case gc: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 vc:return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{loading:!1,error:t.error,data:[]})});case yc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{loading:!0})});case kc: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 Sc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{loading:!1,error:t.error,data:[]})});case _c:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{loading:!0})});case Tc: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 Ec:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{loading:!1,error:t.error,data:[]})});case Ac:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{loading:!0})});case Cc: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 wc:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{loading:!1,error:t.error,data:[]})});case Rc:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{loading:!0})});case Ic: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 qc:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{loading:!1,error:t.error,data:[]})});case Nc:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{loading:!0})});case Pc: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 Dc:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{loading:!1,error:t.error,data:[]})});case Ai: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 Ci: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 wi: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 Ri:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{allActionPending:!0})});case Ii:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{allActionPending:!1,data:[]})});case qi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{allActionPending:!1})});case Ni: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 Pi: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 Di: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 Lc: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 Bc: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 Hc: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 Gc: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 Mc: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 Vc: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 zc: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 Uc: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 Kc: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 rs:case ts: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 cs:case as: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 ss:case ns: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 _s:case ys:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!0})});case Ts:case ks:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!1,data:[]})});case Es:case Ss:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!1})});case Os:case xs: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 fs: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 gs: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 ms:case vs: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 Fc:case us:case is: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 Qc:case ds:case os: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 Yc:case js:case ls: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 Ls:case zs:case Gs:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!0})});case Bs:case Us:case Ms:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!1,data:[]})});case Hs:case Ks:case Vs:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!1})});case As:case Rs:case Ns: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 Cs: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 Is: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 Ps: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 ws:case qs:case Ds: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 Wc:case bs:case Fs: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 Jc:case ps:case Qs: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 $c:case hs:case Ys: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 ri:case ii:case ui:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!0})});case ci:case oi:case di:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!1,data:[]})});case si:case li:case ji:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!1})});case Ws:case Zs:case ti: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 Js:var m=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:m})});case Xs:var x=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:x})});case ai:var g=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:g})});case $s:case ei:case ni: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 Zc:case bi: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 Xc:case pi: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 es:case hi: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 yi:case _i:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!0})});case ki:case Ti:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!1,data:[]})});case Si:case Ei:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!1})});case Oi:case xi: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 fi: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 gi: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 mi:case vi: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}},Gu={loading:!1,error:"",data:[]};var Mu={isOpen:!1,message:""};var Vu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mu,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Sr:return Object(u.a)(Object(u.a)({},e),{},{isOpen:!1});case Mc:var a=t.payload.canceled_ids.length;return{isOpen:!0,message:"Cancelation signal sent to ".concat(a," ").concat(1===a?"task":"tasks")};case Uc:return{isOpen:!0,message:"Cancelation signal sent to all tasks in ".concat(t.queue," queue")};case Qc:return{isOpen:!0,message:"Scheduled task is now pending"};case Jc:return{isOpen:!0,message:"Retry task is now pending"};case Xc:return{isOpen:!0,message:"Archived task is now pending"};case cs:return{isOpen:!0,message:"Pending task is now archived"};case ds:return{isOpen:!0,message:"Scheduled task is now archived"};case ps:return{isOpen:!0,message:"Retry task is now archived"};case as:return{isOpen:!0,message:"Pending task deleted"};case os:return{isOpen:!0,message:"Scheduled task deleted"};case Cs:var n=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(n," scheduled ").concat(1===n?"task is":"tasks are"," now pending")};case fs:var r=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(r," pending ").concat(1===r?"task is":"tasks are"," now archived")};case gs:var c=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(c," pending ").concat(1===c?"task":"tasks"," deleted")};case Is:var s=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(s," scheduled ").concat(1===s?"task is":"tasks are"," now archived")};case Ps:var i=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(i," scheduled ").concat(1===i?"task":"tasks"," deleted")};case Ts:return{isOpen:!0,message:"All pending tasks are now archived"};case ks:return{isOpen:!0,message:"All pending tasks deleted"};case Bs:return{isOpen:!0,message:"All scheduled tasks are now pending"};case Us:return{isOpen:!0,message:"All scheduled tasks are now archived"};case Ms:return{isOpen:!0,message:"All scheduled tasks deleted"};case Qs:return{isOpen:!0,message:"Retry task deleted"};case Js:var o=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(o," retry ").concat(1===o?"task is":"tasks are"," now pending")};case Xs:var l=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(l," retry ").concat(1===l?"task is":"tasks are"," now archived")};case ai:var d=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(d," retry ").concat(1===d?"task":"tasks"," deleted")};case ci:return{isOpen:!0,message:"All retry tasks are now pending"};case oi:return{isOpen:!0,message:"All retry tasks are now archived"};case di:return{isOpen:!0,message:"All retry tasks deleted"};case pi:return{isOpen:!0,message:"Archived task deleted"};case fi:var j=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(j," archived ").concat(1===j?"task is":"tasks are"," now pending")};case gi:var b=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(b," archived ").concat(1===b?"task":"tasks"," deleted")};case ki:return{isOpen:!0,message:"All archived tasks are now pending"};case Ti:return{isOpen:!0,message:"All archived tasks deleted"};case Ci:return{isOpen:!0,message:"Completed task deleted"};case Ii:return{isOpen:!0,message:"All completed tasks deleted"};case Pi:var p=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(p," completed ").concat(1===p?"task":"tasks"," deleted")};default:return e}},Fu={loading:!1,data:{}};function Qu(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 Yu={loading:!1,error:"",address:"",data:null,rawData:null,cluster:!1,rawClusterNodes:null,queueLocations:null};var Wu={loading:!1,error:"",data:null};var Ju="asynqmon:state";var $u=Object(Lu.b)({settings:vr,queues:zu,tasks:Ku,servers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gu,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ol:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case fl:return{loading:!1,error:"",data:t.payload.servers};case ml:return Object(u.a)(Object(u.a)({},e),{},{error:t.error,loading:!1});default:return e}},schedulerEntries:Mr,snackbar:Vu,queueStats:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fu,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case an:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case nn:return{data:t.payload.stats,loading:!1};case rn:return Object(u.a)(Object(u.a)({},e),{},{loading:!1});case Ga:var a,n=Object(u.a)({},e.data),r=Object(dr.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 Qu(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]:Yu,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Sl:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Tl:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case _l: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}},metrics:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wu,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ll:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Hl:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case Bl:return{loading:!1,error:"",data:t.payload};default:return e}}}),Zu=function(){try{var e=localStorage.getItem(Ju);if(null===e)return{};var t=JSON.parse(e);return{settings:Object(u.a)(Object(u.a)({},gr),t.settings||{})}}catch(a){return console.log("loadState: could not load state ",a),{}}}(),Xu=Object(Bu.a)({reducer:$u,preloadedState:Zu});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}$/));void 0===window.FLAG_ROOT_PATH?(console.log("ROOT_PATH is not defined. Falling back to emtpy string"),window.ROOT_PATH=""):window.ROOT_PATH=window.FLAG_ROOT_PATH,void 0===window.FLAG_PROMETHEUS_SERVER_ADDRESS?(console.log("PROMETHEUS_SERVER_ADDRESS is not defined. Falling back to emtpy string"),window.PROMETHEUS_SERVER_ADDRESS=""):window.FLAG_PROMETHEUS_SERVER_ADDRESS.startsWith("/[[")?(console.log("PROMETHEUS_SERVER_ADDRESS was not evaluated by the server. Falling back to empty string"),window.PROMETHEUS_SERVER_ADDRESS=""):window.PROMETHEUS_SERVER_ADDRESS=window.FLAG_PROMETHEUS_SERVER_ADDRESS,void 0===window.FLAG_READ_ONLY?(console.log("READ_ONLY is not defined. Falling back to false"),window.READ_ONLY=!1):window.FLAG_READ_ONLY.startsWith("/[[")?(console.log("READ_ONLY was not evaluated by the server. Falling back to false"),window.READ_ONLY=!1):window.READ_ONLY="true"===window.FLAG_READ_ONLY;var ed=void 0;Xu.subscribe((function(){ed!==(ed=Xu.getState().settings)&&function(e){try{var t=JSON.stringify({settings:e.settings});localStorage.setItem(Ju,t)}catch(a){console.error("saveState: could not save state: ",a)}}(Xu.getState())})),s.a.render(Object(de.jsxs)(r.a.StrictMode,{children:[Object(de.jsx)(i.a,{}),Object(de.jsx)(o.a,{store:Xu,children:Object(de.jsx)(Du,{})})]}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[806,1,2]]]);
|
|
//# sourceMappingURL=main.c13b2054.chunk.js.map
|