import{S as ie,i as re,s as se,e as de,b as z,a1 as U,h as c,D as J,E as F,F as oe,k as C,q as M,a as R,_ as Y,l as L,m as O,r as A,c as j,$ as G,n as m,H as d,I as K,J as T,u as X,O as ne,G as $,K as Se,L as ee,M as te,N as le,g as B,d as P,C as we,w as Ne,p as he,v as be,f as _e,x as Ee,y as Q,z as ae,A as W,B as Z,a0 as Te,ad as Re,R as je,X as qe,Y as Fe}from"./index.4fe0636c.js";import{E as Xe,C as Ye,q as Ge}from"./taskQueries.00b1e24e.js";function He(l){let e,t,i,r,a,s,o,n,f,g=l[0]&&De(l),u=[{"aria-atomic":"true"},{"aria-labelledby":l[4]},{"aria-live":f=l[1]?"assertive":"off"},l[6]],k={};for(let h=0;h{e=F(F({},e),oe(u)),t(6,a=J(e,r)),"small"in u&&t(0,s=u.small),"active"in u&&t(1,o=u.active),"withOverlay"in u&&t(2,n=u.withOverlay),"description"in u&&t(3,f=u.description),"id"in u&&t(4,g=u.id)},l.$$.update=()=>{l.$$.dirty&1&&t(5,i=s?"42":"44")},[s,o,n,f,g,i,a]}class Qe extends ie{constructor(e){super(),re(this,e,Ue,Ke,se,{small:0,active:1,withOverlay:2,description:3,id:4})}}const We=Qe;function Ze(l){let e,t,i,r,a,s;const o=l[11].default,n=$(o,l,l[10],null);let f=[l[9],{style:i=l[9].style+"; "+(l[6]&&"position: relative")}],g={};for(let u=0;u{o&&(_.contains(v.target)||(b("click:outside",{target:v.target}),n&&t(0,o=!1)))};function D(v){Ne[v?"unshift":"push"](()=>{_=v,t(7,_)})}return l.$$set=v=>{e=F(F({},e),oe(v)),t(9,r=J(e,i)),"open"in v&&t(0,o=v.open),"closeOnOutsideClick"in v&&t(1,n=v.closeOnOutsideClick),"caret"in v&&t(2,f=v.caret),"align"in v&&t(3,g=v.align),"light"in v&&t(4,u=v.light),"highContrast"in v&&t(5,k=v.highContrast),"relative"in v&&t(6,h=v.relative),"$$scope"in v&&t(10,s=v.$$scope)},[o,n,f,g,u,k,h,_,b,r,s,a,p,D]}class $e extends ie{constructor(e){super(),re(this,e,xe,Ze,se,{open:0,closeOnOutsideClick:1,caret:2,align:3,light:4,highContrast:5,relative:6})}}const et=$e,tt=l=>({}),Ve=l=>({});function lt(l){let e;return{c(){e=M(l[4])},l(t){e=A(t,l[4])},m(t,i){z(t,e,i)},p(t,i){i&16&&X(e,t[4])},d(t){t&&c(e)}}}function Oe(l){let e,t,i;var r=l[10][l[2]];function a(s){return{props:{class:"bx--progress-bar__status-icon"}}}return r&&(e=Ee(r,a())),{c(){e&&Q(e.$$.fragment),t=de()},l(s){e&&ae(e.$$.fragment,s),t=de()},m(s,o){e&&W(e,s,o),z(s,t,o),i=!0},p(s,o){if(o&4&&r!==(r=s[10][s[2]])){if(e){be();const n=e;P(n.$$.fragment,1,0,()=>{Z(n,1)}),_e()}r?(e=Ee(r,a()),Q(e.$$.fragment),B(e.$$.fragment,1),W(e,t.parentNode,t)):e=null}},i(s){i||(e&&B(e.$$.fragment,s),i=!0)},o(s){e&&P(e.$$.fragment,s),i=!1},d(s){s&&c(t),e&&Z(e,s)}}}function ye(l){let e,t;return{c(){e=C("div"),t=M(l[6]),this.h()},l(i){e=L(i,"DIV",{id:!0});var r=O(e);t=A(r,l[6]),r.forEach(c),this.h()},h(){m(e,"id",l[11]),d(e,"bx--progress-bar__helper-text",!0)},m(i,r){z(i,e,r),T(e,t)},p(i,r){r&64&&X(t,i[6])},d(i){i&&c(e)}}}function it(l){let e,t,i,r,a,s,o,n,f,g,u,k,h;const b=l[15].labelText,_=$(b,l,l[14],Ve),p=_||lt(l);let D=(l[2]==="error"||l[2]==="finished")&&Oe(l),v=l[6]&&ye(l),N=[l[12]],I={};for(let E=0;E{D=null}),_e()),(!h||V&128)&&m(t,"for",E[7]),(!h||V&32)&&d(t,"bx--visually-hidden",E[5]),V&261&&he(s,"transform",E[2]==="active"&&`scaleX(${E[8]/E[0]})`),(!h||V&128)&&m(a,"id",E[7]),(!h||V&4&&o!==(o=E[2]==="active"))&&m(a,"aria-busy",o),(!h||V&512&&n!==(n=E[9]?void 0:0))&&m(a,"aria-valuemin",n),(!h||V&513&&f!==(f=E[9]?void 0:E[0]))&&m(a,"aria-valuemax",f),(!h||V&768&&g!==(g=E[9]?void 0:E[8]))&&m(a,"aria-valuenow",g),(!h||V&64&&u!==(u=E[6]?E[11]:null))&&m(a,"aria-describedby",u),E[6]?v?v.p(E,V):(v=ye(E),v.c(),v.m(e,null)):v&&(v.d(1),v=null),K(e,I=ne(N,[V&4096&&E[12]])),d(e,"bx--progress-bar",!0),d(e,"bx--progress-bar--indeterminate",E[9]),d(e,"bx--progress-bar--big",E[3]==="md"),d(e,"bx--progress-bar--small",E[3]==="sm"),d(e,"bx--progress-bar--inline",E[1]==="inline"),d(e,"bx--progress-bar--indented",E[1]==="indented"),d(e,"bx--progress-bar--error",E[2]==="error"),d(e,"bx--progress-bar--finished",E[2]==="finished")},i(E){h||(B(p,E),B(D),h=!0)},o(E){P(p,E),P(D),h=!1},d(E){E&&c(e),p&&p.d(E),D&&D.d(),v&&v.d()}}}function rt(l,e,t){let i;const r=["value","max","kind","status","size","labelText","hideLabel","helperText","id"];let a=J(e,r),{$$slots:s={},$$scope:o}=e,{value:n=void 0}=e,{max:f=100}=e,{kind:g="default"}=e,{status:u="active"}=e,{size:k="md"}=e,{labelText:h=""}=e,{hideLabel:b=!1}=e,{helperText:_=""}=e,{id:p="ccs-"+Math.random().toString(36)}=e;const D={error:Xe,finished:Ye};let v="ccs-"+Math.random().toString(36),N;return l.$$set=I=>{e=F(F({},e),oe(I)),t(12,a=J(e,r)),"value"in I&&t(13,n=I.value),"max"in I&&t(0,f=I.max),"kind"in I&&t(1,g=I.kind),"status"in I&&t(2,u=I.status),"size"in I&&t(3,k=I.size),"labelText"in I&&t(4,h=I.labelText),"hideLabel"in I&&t(5,b=I.hideLabel),"helperText"in I&&t(6,_=I.helperText),"id"in I&&t(7,p=I.id),"$$scope"in I&&t(14,o=I.$$scope)},l.$$.update=()=>{l.$$.dirty&8196&&t(9,i=n===void 0&&u==="active"),l.$$.dirty&8197&&(u==="error"||n<0?t(8,N=0):n>f?t(8,N=f):t(8,N=n))},[f,g,u,k,h,b,_,p,N,i,D,v,a,n,o,s]}class st extends ie{constructor(e){super(),re(this,e,rt,it,se,{value:13,max:0,kind:1,status:2,size:3,labelText:4,hideLabel:5,helperText:6,id:7})}}const at=st;function Ce(l){let e,t;return{c(){e=Y("title"),t=M(l[1])},l(i){e=G(i,"title",{});var r=O(e);t=A(r,l[1]),r.forEach(c)},m(i,r){z(i,e,r),T(e,t)},p(i,r){r&2&&X(t,i[1])},d(i){i&&c(e)}}}function ot(l){let e,t,i=l[1]&&Ce(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let s=0;s{t(5,e=F(F({},e),oe(f))),t(3,s=J(e,a)),"size"in f&&t(0,o=f.size),"title"in f&&t(1,n=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||n),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=oe(e),[o,n,r,s,i]}class ft extends ie{constructor(e){super(),re(this,e,nt,ot,se,{size:0,title:1})}}function Le(l,e,t){const i=l.slice();i[10]=e[t][0],i[11]=e[t][1];const r=i[11].step_progress==null?void 0:i[11].step_progress;return i[12]=r,i}function ut(l){let e,t,i;return t=new ft({}),{c(){e=M("Tasks "),Q(t.$$.fragment)},l(r){e=A(r,"Tasks "),ae(t.$$.fragment,r)},m(r,a){z(r,e,a),W(t,r,a),i=!0},p:U,i(r){i||(B(t.$$.fragment,r),i=!0)},o(r){P(t.$$.fragment,r),i=!1},d(r){r&&c(e),Z(t,r)}}}function dt(l){let e=l[3].length+"",t,i,r=l[3].length>1?"s":"",a;return{c(){t=M(e),i=M(" failed task"),a=M(r)},l(s){t=A(s,e),i=A(s," failed task"),a=A(s,r)},m(s,o){z(s,t,o),z(s,i,o),z(s,a,o)},p(s,o){o&8&&e!==(e=s[3].length+"")&&X(t,e),o&8&&r!==(r=s[3].length>1?"s":"")&&X(a,r)},i:U,o:U,d(s){s&&c(t),s&&c(i),s&&c(a)}}}function ht(l){let e=l[4].length+"",t,i,r=l[4].length>1?"s":"",a,s,o,n;return o=new We({props:{withOverlay:!1,small:!0}}),{c(){t=M(e),i=M(" running task"),a=M(r),s=M("... "),Q(o.$$.fragment)},l(f){t=A(f,e),i=A(f," running task"),a=A(f,r),s=A(f,"... "),ae(o.$$.fragment,f)},m(f,g){z(f,t,g),z(f,i,g),z(f,a,g),z(f,s,g),W(o,f,g),n=!0},p(f,g){(!n||g&16)&&e!==(e=f[4].length+"")&&X(t,e),(!n||g&16)&&r!==(r=f[4].length>1?"s":"")&&X(a,r)},i(f){n||(B(o.$$.fragment,f),n=!0)},o(f){P(o.$$.fragment,f),n=!1},d(f){f&&c(t),f&&c(i),f&&c(a),f&&c(s),Z(o,f)}}}function ze(l){let e,t=`${l[2]*100}%`;return{c(){e=C("div"),this.h()},l(i){e=L(i,"DIV",{class:!0}),O(e).forEach(c),this.h()},h(){m(e,"class","absolute left-0 top-0 z-0 h-full bg-blue-400 transition"),he(e,"width",t)},m(i,r){z(i,e,r)},p(i,r){r&4&&t!==(t=`${i[2]*100}%`)&&he(e,"width",t)},d(i){i&&c(e)}}}function Be(l,e){let t,i,r,a=e[11].name+"",s,o,n,f,g,u;return f=new at({props:{labelText:e[11].message||"",helperText:e[11].status!="completed"?e[11].details:"",value:e[11].status==="completed"?1:e[12],max:1,size:"sm",status:e[6][e[11].status]}}),{key:l,first:null,c(){t=C("div"),i=C("div"),r=C("div"),s=M(a),o=R(),n=C("div"),Q(f.$$.fragment),g=R(),this.h()},l(k){t=L(k,"DIV",{class:!0});var h=O(t);i=L(h,"DIV",{class:!0});var b=O(i);r=L(b,"DIV",{class:!0});var _=O(r);s=A(_,a),_.forEach(c),b.forEach(c),o=j(h),n=L(h,"DIV",{class:!0});var p=O(n);ae(f.$$.fragment,p),p.forEach(c),g=j(h),h.forEach(c),this.h()},h(){m(r,"class","mr-2"),m(i,"class","text-s flex flex-row"),m(n,"class","progress-container mt-3"),m(t,"class","relative border-b-2 border-slate-200 p-4 text-left last:border-b-0"),this.first=t},m(k,h){z(k,t,h),T(t,i),T(i,r),T(r,s),T(t,o),T(t,n),W(f,n,null),T(t,g),u=!0},p(k,h){e=k,(!u||h&1)&&a!==(a=e[11].name+"")&&X(s,a);const b={};h&1&&(b.labelText=e[11].message||""),h&1&&(b.helperText=e[11].status!="completed"?e[11].details:""),h&1&&(b.value=e[11].status==="completed"?1:e[12]),h&1&&(b.status=e[6][e[11].status]),f.$set(b)},i(k){u||(B(f.$$.fragment,k),u=!0)},o(k){P(f.$$.fragment,k),u=!1},d(k){k&&c(t),Z(f)}}}function bt(l){let e,t=[],i=new Map,r,a=l[0];const s=o=>o[10];for(let o=0;o{k[D]=null}),_e(),r=k[i],r?r.p(_,p):(r=k[i]=u[i](_),r.c()),B(r,1),r.m(t,null)),_[4].length===1?b?b.p(_,p):(b=ze(_),b.c(),b.m(e,s)):b&&(b.d(1),b=null);const v={};p&2&&(v.open=_[1]),p&32769&&(v.$$scope={dirty:p,ctx:_}),o.$set(v),(!n||p&16)&&d(e,"bg-white",!_[4].length),(!n||p&16)&&d(e,"bg-blue-200",_[4].length),(!n||p&16)&&d(e,"border-blue-400",_[4].length)},i(_){n||(B(r),B(o.$$.fragment,_),n=!0)},o(_){P(r),P(o.$$.fragment,_),n=!1},d(_){_&&c(e),k[i].d(),b&&b.d(),Z(o),f=!1,g()}}}function vt(l,e,t){let i,r,a,s,o;const n=Ge();je(l,n,h=>t(7,o=h));let f=!1;const g={pending:"active",completed:"finished",error:"error"},u=()=>{f&&t(1,f=!1)},k=()=>t(1,f=!f);return l.$$.update=()=>{var h,b;l.$$.dirty&128&&t(0,i=Object.entries(((h=o.data)==null?void 0:h.tasks)||{}).sort(([,_],[,p])=>Date.parse(p.start_timestamp)-Date.parse(_.start_timestamp))),l.$$.dirty&1&&t(4,r=i.filter(([,_])=>_.status==="pending")),l.$$.dirty&1&&t(3,a=i.filter(([,_])=>_.status==="error")),l.$$.dirty&128&&t(2,s=((b=o.data)==null?void 0:b.progress)||0)},[i,f,s,a,r,n,g,o,u,k]}class ct extends ie{constructor(e){super(),re(this,e,vt,_t,se,{})}}const gt=l=>({}),Pe=l=>({}),mt=l=>({}),Me=l=>({}),pt=l=>({}),Ae=l=>({});function kt(l){let e,t,i,r,a,s,o,n,f,g,u,k,h,b,_,p,D,v;const N=l[2]["header-subtext"],I=$(N,l,l[1],Ae),E=l[2]["header-center"],V=$(E,l,l[1],Me),H=l[2]["header-right"],S=$(H,l,l[1],Pe);_=new ct({});const ve=l[2].default,q=$(ve,l,l[1],null);return{c(){e=C("div"),t=C("div"),i=C("div"),r=C("a"),a=M(`Lilac `),s=C("span"),o=M(l[0]),n=R(),f=C("div"),I&&I.c(),g=R(),u=C("div"),V&&V.c(),k=R(),h=C("div"),S&&S.c(),b=R(),Q(_.$$.fragment),p=R(),D=C("div"),q&&q.c(),this.h()},l(y){e=L(y,"DIV",{class:!0});var w=O(e);t=L(w,"DIV",{class:!0});var x=O(t);i=L(x,"DIV",{class:!0});var fe=O(i);r=L(fe,"A",{class:!0,href:!0});var ce=O(r);a=A(ce,`Lilac `),s=L(ce,"SPAN",{});var ge=O(s);o=A(ge,l[0]),ge.forEach(c),ce.forEach(c),n=j(fe),f=L(fe,"DIV",{class:!0});var me=O(f);I&&I.l(me),me.forEach(c),fe.forEach(c),g=j(x),u=L(x,"DIV",{class:!0});var pe=O(u);V&&V.l(pe),pe.forEach(c),k=j(x),h=L(x,"DIV",{class:!0});var ue=O(h);S&&S.l(ue),b=j(ue),ae(_.$$.fragment,ue),ue.forEach(c),x.forEach(c),p=j(w),D=L(w,"DIV",{class:!0});var ke=O(D);q&&q.l(ke),ke.forEach(c),w.forEach(c),this.h()},h(){m(r,"class","text-xl normal-case"),m(r,"href","/"),m(f,"class","mt-1 pl-4"),m(i,"class","mr-4 flex flex-row items-center"),m(u,"class","flex-grow flex-row items-center justify-center"),m(h,"class","flex flex-row items-center gap-x-2"),m(t,"class","flex flex-row items-center justify-between justify-items-center gap-x-12 border-b border-gray-200 px-4 py-2"),m(D,"class","flex h-full w-full overflow-hidden"),m(e,"class","flex h-full w-full flex-col")},m(y,w){z(y,e,w),T(e,t),T(t,i),T(i,r),T(r,a),T(r,s),T(s,o),T(i,n),T(i,f),I&&I.m(f,null),T(t,g),T(t,u),V&&V.m(u,null),T(t,k),T(t,h),S&&S.m(h,null),T(h,b),W(_,h,null),T(e,p),T(e,D),q&&q.m(D,null),v=!0},p(y,[w]){(!v||w&1)&&X(o,y[0]),I&&I.p&&(!v||w&2)&&ee(I,N,y,y[1],v?le(N,y[1],w,pt):te(y[1]),Ae),V&&V.p&&(!v||w&2)&&ee(V,E,y,y[1],v?le(E,y[1],w,mt):te(y[1]),Me),S&&S.p&&(!v||w&2)&&ee(S,H,y,y[1],v?le(H,y[1],w,gt):te(y[1]),Pe),q&&q.p&&(!v||w&2)&&ee(q,ve,y,y[1],v?le(ve,y[1],w,null):te(y[1]),null)},i(y){v||(B(I,y),B(V,y),B(S,y),B(_.$$.fragment,y),B(q,y),v=!0)},o(y){P(I,y),P(V,y),P(S,y),P(_.$$.fragment,y),P(q,y),v=!1},d(y){y&&c(e),I&&I.d(y),V&&V.d(y),S&&S.d(y),Z(_),q&&q.d(y)}}}function Et(l,e,t){let{$$slots:i={},$$scope:r}=e,{title:a}=e;return l.$$set=s=>{"title"in s&&t(0,a=s.title),"$$scope"in s&&t(1,r=s.$$scope)},[a,r,i]}class It extends ie{constructor(e){super(),re(this,e,Et,kt,se,{title:0})}}export{ft as C,We as L,It as P};