text: import{S as e,i as t,s as a,e as s,t as c,k as n,c as l,a as r,g as i,d as o,n as h,b as f,f as d,F as v,l as u,M as m,N as p,G as g,O as E,h as b,P as y,j as w,L as k,m as T,o as I,v as S,r as N,w as D,Q as B,R as x,z as C,T as A,U as _}from"../../chunks/vendor-c052606d.js";/* empty css                                                       */import{T as H,x as O,n as V,a as P}from"../../chunks/requests-531e903b.js";import{s as U,a as R,t as L,b as j}from"../../chunks/store-ce76cd4a.js";const{document:M}=A;function $(e,t,a){const s=e.slice();return s[30]=t[a],s[32]=a,s}function J(e,t,a){const s=e.slice();return s[33]=t[a],s[32]=a,s}function q(e,t,a){const s=e.slice();return s[35]=t[a][0],s[36]=t[a][1],s}function F(e,t,a){const s=e.slice();return s[39]=t[a].short_id,s[40]=t[a].name,s[41]=t[a].ports,s[32]=a,s}function z(e,t,a){const s=e.slice();return s[43]=t[a],s[32]=a,s}function G(e,t,a){const s=e.slice();return s[35]=t[a][0],s[36]=t[a][1],s}function Q(e,t,a){const s=e.slice();return s[35]=t[a][0],s[36]=t[a][1],s}function K(e){let t,a,u,p,g,E,b,y,w,k,T,I,S,N,D,B=e[0],x=[];for(let s=0;s<B.length;s+=1)x[s]=ee(z(e,B,s));return{c(){t=s("table"),a=s("thead"),u=s("tr"),p=s("th"),g=c("ID"),E=n(),b=s("th"),y=c("Name"),w=n(),k=s("th"),T=c("Activated"),I=n(),S=s("th"),N=c("Actions"),D=n();for(let e=0;e<x.length;e+=1)x[e].c();this.h()},l(e){t=l(e,"TABLE",{class:!0});var s=r(t);a=l(s,"THEAD",{});var c=r(a);u=l(c,"TR",{class:!0});var n=r(u);p=l(n,"TH",{});var f=r(p);g=i(f,"ID"),f.forEach(o),E=h(n),b=l(n,"TH",{});var d=r(b);y=i(d,"Name"),d.forEach(o),w=h(n),k=l(n,"TH",{});var v=r(k);T=i(v,"Activated"),v.forEach(o),I=h(n),S=l(n,"TH",{});var m=r(S);N=i(m,"Actions"),m.forEach(o),n.forEach(o),c.forEach(o),D=h(s);for(let t=0;t<x.length;t+=1)x[t].l(s);s.forEach(o),this.h()},h(){f(u,"class","w3-dark-grey"),f(t,"class","w3-table-all w3-centered")},m(e,s){d(e,t,s),v(t,a),v(a,u),v(u,p),v(p,g),v(u,E),v(u,b),v(b,y),v(u,w),v(u,k),v(k,T),v(u,I),v(u,S),v(S,N),v(t,D);for(let a=0;a<x.length;a+=1)x[a].m(t,null)},p(e,a){if(17413&a[0]){let s;for(B=e[0],s=0;s<B.length;s+=1){const c=z(e,B,s);x[s]?x[s].p(c,a):(x[s]=ee(c),x[s].c(),x[s].m(t,null))}for(;s<x.length;s+=1)x[s].d(1);x.length=B.length}},d(e){e&&o(t),m(x,e)}}}function W(e){let t,a,u,m,p,E,b,w,k,T,I,S,N,D=[],x=new Map,C=Object.entries(e[43]);const A=e=>e[35];for(let s=0;s<C.length;s+=1){let t=G(e,C,s),a=A(t);x.set(a,D[s]=Y(a,t))}return{c(){t=s("tr");for(let e=0;e<D.length;e+=1)D[e].c();a=n(),u=s("td"),m=s("div"),p=s("div"),E=s("button"),b=c("Activate"),w=n(),k=s("button"),T=c("Delete"),I=n(),this.h()},l(e){t=l(e,"TR",{index:!0});var s=r(t);for(let t=0;t<D.length;t+=1)D[t].l(s);a=h(s),u=l(s,"TD",{class:!0});var c=r(u);m=l(c,"DIV",{class:!0});var n=r(m);p=l(n,"DIV",{class:!0});var f=r(p);E=l(f,"BUTTON",{});var d=r(E);b=i(d,"Activate"),d.forEach(o),w=h(f),k=l(f,"BUTTON",{});var v=r(k);T=i(v,"Delete"),v.forEach(o),f.forEach(o),n.forEach(o),c.forEach(o),I=h(s),s.forEach(o),this.h()},h(){f(p,"class","w3-bar"),f(m,"class","w3-show-inline-block"),f(u,"class","svelte-83vf4v"),f(t,"index",e[32])},m(s,c){d(s,t,c);for(let e=0;e<D.length;e+=1)D[e].m(t,null);v(t,a),v(t,u),v(u,m),v(m,p),v(p,E),v(E,b),v(p,w),v(p,k),v(k,T),v(t,I),S||(N=[g(E,"click",e[10]),g(k,"click",e[14])],S=!0)},p(e,s){1&s[0]&&(C=Object.entries(e[43]),D=y(D,s,A,1,e,C,x,t,_,Y,a,G))},d(e){e&&o(t);for(let t=0;t<D.length;t+=1)D[t].d();S=!1,B(N)}}}function X(e){let t,a,u,m,E,b,w,k,T,I,S,N,D,x=[],C=new Map,A=Object.entries(e[43]);const H=e=>e[35];for(let s=0;s<A.length;s+=1){let t=Q(e,A,s),a=H(t);C.set(a,x[s]=Z(a,t))}return{c(){t=s("tr");for(let e=0;e<x.length;e+=1)x[e].c();a=n(),u=s("td"),m=s("div"),E=s("div"),b=s("button"),w=c("Activate"),k=n(),T=s("button"),I=c("Delete"),S=n(),this.h()},l(e){t=l(e,"TR",{index:!0,style:!0});var s=r(t);for(let t=0;t<x.length;t+=1)x[t].l(s);a=h(s),u=l(s,"TD",{class:!0});var c=r(u);m=l(c,"DIV",{class:!0});var n=r(m);E=l(n,"DIV",{class:!0});var f=r(E);b=l(f,"BUTTON",{});var d=r(b);w=i(d,"Activate"),d.forEach(o),k=h(f),T=l(f,"BUTTON",{});var v=r(T);I=i(v,"Delete"),v.forEach(o),f.forEach(o),n.forEach(o),c.forEach(o),S=h(s),s.forEach(o),this.h()},h(){f(E,"class","w3-bar"),f(m,"class","w3-show-inline-block"),f(u,"class","svelte-83vf4v"),f(t,"index",e[32]),p(t,"background-color","#acddb4")},m(s,c){d(s,t,c);for(let e=0;e<x.length;e+=1)x[e].m(t,null);v(t,a),v(t,u),v(u,m),v(m,E),v(E,b),v(b,w),v(E,k),v(E,T),v(T,I),v(t,S),N||(D=[g(b,"click",e[10]),g(T,"click",e[14])],N=!0)},p(e,s){1&s[0]&&(A=Object.entries(e[43]),x=y(x,s,H,1,e,A,C,t,_,Z,a,Q))},d(e){e&&o(t);for(let t=0;t<x.length;t+=1)x[t].d();N=!1,B(D)}}}function Y(e,t){let a,n,h=t[36]+"";return{key:e,first:null,c(){a=s("td"),n=c(h),this.h()},l(e){a=l(e,"TD",{class:!0});var t=r(a);n=i(t,h),t.forEach(o),this.h()},h(){f(a,"class","svelte-83vf4v"),this.first=a},m(e,t){d(e,a,t),v(a,n)},p(e,a){t=e,1&a[0]&&h!==(h=t[36]+"")&&b(n,h)},d(e){e&&o(a)}}}function Z(e,t){let a,n,h=t[36]+"";return{key:e,first:null,c(){a=s("td"),n=c(h),this.h()},l(e){a=l(e,"TD",{class:!0});var t=r(a);n=i(t,h),t.forEach(o),this.h()},h(){f(a,"class","svelte-83vf4v"),this.first=a},m(e,t){d(e,a,t),v(a,n)},p(e,a){t=e,1&a[0]&&h!==(h=t[36]+"")&&b(n,h)},d(e){e&&o(a)}}}function ee(e){let t;function a(e,t){return e[2]==e[32]||e[0][e[32]].activated?X:W}let s=a(e),c=s(e);return{c(){c.c(),t=u()},l(e){c.l(e),t=u()},m(e,a){c.m(e,a),d(e,t,a)},p(e,n){s===(s=a(e))&&c?c.p(e,n):(c.d(1),c=s(e),c&&(c.c(),c.m(t.parentNode,t)))},d(e){c.d(e),e&&o(t)}}}function te(e){let t,a,u,p,g,E,b,y,w,k,T,I,S,N,D,B=e[4],x=[];for(let s=0;s<B.length;s+=1)x[s]=ce(F(e,B,s));return{c(){t=s("table"),a=s("thead"),u=s("tr"),p=s("th"),g=c("ShortID"),E=n(),b=s("th"),y=c("Name"),w=n(),k=s("th"),T=c("Ports"),I=n(),S=s("th"),N=c("Actions"),D=n();for(let e=0;e<x.length;e+=1)x[e].c();this.h()},l(e){t=l(e,"TABLE",{id:!0,class:!0});var s=r(t);a=l(s,"THEAD",{});var c=r(a);u=l(c,"TR",{class:!0});var n=r(u);p=l(n,"TH",{});var f=r(p);g=i(f,"ShortID"),f.forEach(o),E=h(n),b=l(n,"TH",{});var d=r(b);y=i(d,"Name"),d.forEach(o),w=h(n),k=l(n,"TH",{});var v=r(k);T=i(v,"Ports"),v.forEach(o),I=h(n),S=l(n,"TH",{});var m=r(S);N=i(m,"Actions"),m.forEach(o),n.forEach(o),c.forEach(o),D=h(s);for(let t=0;t<x.length;t+=1)x[t].l(s);s.forEach(o),this.h()},h(){f(u,"class","w3-dark-grey"),f(t,"id","selectContainers"),f(t,"class","w3-table-all w3-centered")},m(e,s){d(e,t,s),v(t,a),v(a,u),v(u,p),v(p,g),v(u,E),v(u,b),v(b,y),v(u,w),v(u,k),v(k,T),v(u,I),v(u,S),v(S,N),v(t,D);for(let a=0;a<x.length;a+=1)x[a].m(t,null)},p(e,a){if(6192&a[0]){let s;for(B=e[4],s=0;s<B.length;s+=1){const c=F(e,B,s);x[s]?x[s].p(c,a):(x[s]=ce(c),x[s].c(),x[s].m(t,null))}for(;s<x.length;s+=1)x[s].d(1);x.length=B.length}},d(e){e&&o(t),m(x,e)}}}function ae(e){let t,a,u,m,p,E,y,w,k,T,I,S,N,D,x,C,A,_,H,O,V,P=e[39]+"",U=e[40]+"",R=e[41]+"";return{c(){t=s("tr"),a=s("td"),u=c(P),m=n(),p=s("td"),E=c(U),y=n(),w=s("td"),k=c(R),T=n(),I=s("td"),S=s("div"),N=s("div"),D=s("button"),x=c("Activate"),C=n(),A=s("button"),_=c("Deactivate"),H=n(),this.h()},l(e){t=l(e,"TR",{index:!0});var s=r(t);a=l(s,"TD",{class:!0});var c=r(a);u=i(c,P),c.forEach(o),m=h(s),p=l(s,"TD",{class:!0});var n=r(p);E=i(n,U),n.forEach(o),y=h(s),w=l(s,"TD",{class:!0});var f=r(w);k=i(f,R),f.forEach(o),T=h(s),I=l(s,"TD",{class:!0});var d=r(I);S=l(d,"DIV",{class:!0});var v=r(S);N=l(v,"DIV",{class:!0});var g=r(N);D=l(g,"BUTTON",{});var b=r(D);x=i(b,"Activate"),b.forEach(o),C=h(g),A=l(g,"BUTTON",{});var B=r(A);_=i(B,"Deactivate"),B.forEach(o),g.forEach(o),v.forEach(o),d.forEach(o),H=h(s),s.forEach(o),this.h()},h(){f(a,"class","svelte-83vf4v"),f(p,"class","svelte-83vf4v"),f(w,"class","svelte-83vf4v"),f(N,"class","w3-bar"),f(S,"class","w3-show-inline-block"),f(I,"class","svelte-83vf4v"),f(t,"index",e[32])},m(s,c){d(s,t,c),v(t,a),v(a,u),v(t,m),v(t,p),v(p,E),v(t,y),v(t,w),v(w,k),v(t,T),v(t,I),v(I,S),v(S,N),v(N,D),v(D,x),v(N,C),v(N,A),v(A,_),v(t,H),O||(V=[g(D,"click",e[11]),g(A,"click",e[12])],O=!0)},p(e,t){16&t[0]&&P!==(P=e[39]+"")&&b(u,P),16&t[0]&&U!==(U=e[40]+"")&&b(E,U),16&t[0]&&R!==(R=e[41]+"")&&b(k,R)},d(e){e&&o(t),O=!1,B(V)}}}function se(e){let t,a,u,m,p,E,y,w,k,T,I,S,N,D,x,C,A,_,H,O,V,P,U=e[39]+"",R=e[40]+"",L=e[41]+"";return{c(){t=s("tr"),a=s("td"),u=c(U),m=n(),p=s("td"),E=c(R),y=n(),w=s("td"),k=c(L),T=n(),I=s("td"),S=s("div"),N=s("div"),D=s("button"),x=c("Activate"),C=n(),A=s("button"),_=c("Deactivate"),H=n(),this.h()},l(e){t=l(e,"TR",{index:!0,style:!0});var s=r(t);a=l(s,"TD",{class:!0});var c=r(a);u=i(c,U),c.forEach(o),m=h(s),p=l(s,"TD",{class:!0});var n=r(p);E=i(n,R),n.forEach(o),y=h(s),w=l(s,"TD",{class:!0});var f=r(w);k=i(f,L),f.forEach(o),T=h(s),I=l(s,"TD",{class:!0});var d=r(I);S=l(d,"DIV",{class:!0});var v=r(S);N=l(v,"DIV",{class:!0});var g=r(N);D=l(g,"BUTTON",{});var b=r(D);x=i(b,"Activate"),b.forEach(o),C=h(g),A=l(g,"BUTTON",{});var B=r(A);_=i(B,"Deactivate"),B.forEach(o),g.forEach(o),v.forEach(o),d.forEach(o),H=h(s),s.forEach(o),this.h()},h(){f(a,"class","svelte-83vf4v"),f(p,"class","svelte-83vf4v"),f(w,"class","svelte-83vf4v"),f(N,"class","w3-bar"),f(S,"class","w3-show-inline-block"),f(I,"class","svelte-83vf4v"),f(t,"index",e[32]),f(t,"style",O=e[5][e[32]])},m(s,c){d(s,t,c),v(t,a),v(a,u),v(t,m),v(t,p),v(p,E),v(t,y),v(t,w),v(w,k),v(t,T),v(t,I),v(I,S),v(S,N),v(N,D),v(D,x),v(N,C),v(N,A),v(A,_),v(t,H),V||(P=[g(D,"click",e[11]),g(A,"click",e[12])],V=!0)},p(e,a){16&a[0]&&U!==(U=e[39]+"")&&b(u,U),16&a[0]&&R!==(R=e[40]+"")&&b(E,R),16&a[0]&&L!==(L=e[41]+"")&&b(k,L),32&a[0]&&O!==(O=e[5][e[32]])&&f(t,"style",O)},d(e){e&&o(t),V=!1,B(P)}}}function ce(e){let t;function a(e,t){return e[32]in e[5]?se:ae}let s=a(e),c=s(e);return{c(){c.c(),t=u()},l(e){c.l(e),t=u()},m(e,a){c.m(e,a),d(e,t,a)},p(e,n){s===(s=a(e))&&c?c.p(e,n):(c.d(1),c=s(e),c&&(c.c(),c.m(t.parentNode,t)))},d(e){c.d(e),e&&o(t)}}}function ne(e){let t,a=e[1].configurations.length>0&&le(e);return{c(){a&&a.c(),t=u()},l(e){a&&a.l(e),t=u()},m(e,s){a&&a.m(e,s),d(e,t,s)},p(e,s){e[1].configurations.length>0?a?a.p(e,s):(a=le(e),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},d(e){a&&a.d(e),e&&o(t)}}}function le(e){let t,a="Communication"==e[1].type&&re(e);return{c(){a&&a.c(),t=u()},l(e){a&&a.l(e),t=u()},m(e,s){a&&a.m(e,s),d(e,t,s)},p(e,s){"Communication"==e[1].type?a?a.p(e,s):(a=re(e),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},d(e){a&&a.d(e),e&&o(t)}}}function re(e){let t,a=e[1].configurations,s=[];for(let c=0;c<a.length;c+=1)s[c]=ve(J(e,a,c));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=u()},l(e){for(let t=0;t<s.length;t+=1)s[t].l(e);t=u()},m(e,a){for(let t=0;t<s.length;t+=1)s[t].m(e,a);d(e,t,a)},p(e,c){if(514&c[0]){let n;for(a=e[1].configurations,n=0;n<a.length;n+=1){const l=J(e,a,n);s[n]?s[n].p(l,c):(s[n]=ve(l),s[n].c(),s[n].m(t.parentNode,t))}for(;n<s.length;n+=1)s[n].d(1);s.length=a.length}},d(e){m(s,e),e&&o(t)}}}function ie(e){let t,a,u,m,p,g,E,y=e[35]+"";return{c(){t=s("label"),a=s("b"),u=c(y),m=n(),p=s("input"),this.h()},l(e){t=l(e,"LABEL",{class:!0});var s=r(t);a=l(s,"B",{});var c=r(a);u=i(c,y),c.forEach(o),s.forEach(o),m=h(e),p=l(e,"INPUT",{class:!0,type:!0,key:!0,value:!0}),this.h()},h(){f(t,"class",""),f(p,"class","w3-input w3-border"),f(p,"type","list"),f(p,"key",g=e[35]),p.value=E=e[36].join()},m(e,s){d(e,t,s),v(t,a),v(a,u),d(e,m,s),d(e,p,s)},p(e,t){2&t[0]&&y!==(y=e[35]+"")&&b(u,y),2&t[0]&&g!==(g=e[35])&&f(p,"key",g),2&t[0]&&E!==(E=e[36].join())&&(p.value=E)},d(e){e&&o(t),e&&o(m),e&&o(p)}}}function oe(e){let t,a,u,m,p,g,E,y=e[35]+"";return{c(){t=s("input"),m=n(),p=s("label"),g=s("b"),E=c(y),this.h()},l(e){t=l(e,"INPUT",{class:!0,type:!0,key:!0,checked:!0}),m=h(e),p=l(e,"LABEL",{class:!0});var a=r(p);g=l(a,"B",{});var s=r(g);E=i(s,y),s.forEach(o),a.forEach(o),this.h()},h(){f(t,"class","w3-check"),f(t,"type","checkbox"),f(t,"key",a=e[35]),t.checked=u=e[36],f(p,"class","")},m(e,a){d(e,t,a),d(e,m,a),d(e,p,a),v(p,g),v(g,E)},p(e,s){2&s[0]&&a!==(a=e[35])&&f(t,"key",a),2&s[0]&&u!==(u=e[36])&&(t.checked=u),2&s[0]&&y!==(y=e[35]+"")&&b(E,y)},d(e){e&&o(t),e&&o(m),e&&o(p)}}}function he(e){let t,a,u,m,p,g,E,y=e[35]+"";return{c(){t=s("label"),a=s("b"),u=c(y),m=n(),p=s("input"),this.h()},l(e){t=l(e,"LABEL",{class:!0});var s=r(t);a=l(s,"B",{});var c=r(a);u=i(c,y),c.forEach(o),s.forEach(o),m=h(e),p=l(e,"INPUT",{class:!0,type:!0,key:!0,value:!0}),this.h()},h(){f(t,"class",""),f(p,"class","w3-input w3-border"),f(p,"type","string"),f(p,"key",g=e[35]),p.value=E=e[36]},m(e,s){d(e,t,s),v(t,a),v(a,u),d(e,m,s),d(e,p,s)},p(e,t){2&t[0]&&y!==(y=e[35]+"")&&b(u,y),2&t[0]&&g!==(g=e[35])&&f(p,"key",g),2&t[0]&&E!==(E=e[36])&&(p.value=E)},d(e){e&&o(t),e&&o(m),e&&o(p)}}}function fe(e){let t,a,u,m,p,g,E,y=e[35]+"";return{c(){t=s("label"),a=s("b"),u=c(y),m=n(),p=s("input"),this.h()},l(e){t=l(e,"LABEL",{class:!0});var s=r(t);a=l(s,"B",{});var c=r(a);u=i(c,y),c.forEach(o),s.forEach(o),m=h(e),p=l(e,"INPUT",{class:!0,type:!0,convert:!0,key:!0,value:!0}),this.h()},h(){f(t,"class",""),f(p,"class","w3-input w3-border"),f(p,"type","string"),f(p,"convert","required"),f(p,"key",g=e[35]),p.value=E=e[36]},m(e,s){d(e,t,s),v(t,a),v(a,u),d(e,m,s),d(e,p,s)},p(e,t){2&t[0]&&y!==(y=e[35]+"")&&b(u,y),2&t[0]&&g!==(g=e[35])&&f(p,"key",g),2&t[0]&&E!==(E=e[36])&&(p.value=E)},d(e){e&&o(t),e&&o(m),e&&o(p)}}}function de(e,t){let a;function c(e,t){return"number"==typeof e[36]?fe:"string"==typeof e[36]?he:"boolean"==typeof e[36]?oe:"object"==typeof e[36]?ie:void 0}let n=c(t),i=n&&n(t);return{key:e,first:null,c(){a=s("p"),i&&i.c(),this.h()},l(e){a=l(e,"P",{});var t=r(a);i&&i.l(t),t.forEach(o),this.h()},h(){this.first=a},m(e,t){d(e,a,t),i&&i.m(a,null)},p(e,s){n===(n=c(t=e))&&i?i.p(t,s):(i&&i.d(1),i=n&&n(t),i&&(i.c(),i.m(a,null)))},d(e){e&&o(a),i&&i.d()}}}function ve(e){let t,a,u,m,w,k,T,I,S,N,D,B,x,C,A,H,O,V,P,U,R,L,j=e[33].container_info.name+"",M=[],$=new Map,J=Object.entries(e[33].configs);const F=e=>e[35];for(let s=0;s<J.length;s+=1){let t=q(e,J,s),a=F(t);$.set(a,M[s]=de(a,t))}return{c(){t=s("div"),a=s("div"),u=s("h2"),m=c(j),w=n(),k=s("p"),T=c("Description here from application configs"),I=n(),S=s("div"),N=s("form"),D=s("h5"),B=c("Update Form"),x=n();for(let e=0;e<M.length;e+=1)M[e].c();C=n(),A=s("p"),H=s("input"),P=n(),U=s("hr"),this.h()},l(e){t=l(e,"DIV",{class:!0});var s=r(t);a=l(s,"DIV",{class:!0});var c=r(a);u=l(c,"H2",{class:!0,style:!0});var n=r(u);m=i(n,j),n.forEach(o),w=h(c),k=l(c,"P",{});var f=r(k);T=i(f,"Description here from application configs"),f.forEach(o),c.forEach(o),I=h(s),S=l(s,"DIV",{class:!0});var d=r(S);N=l(d,"FORM",{name:!0,port:!0,index:!0,class:!0});var v=r(N);D=l(v,"H5",{class:!0,style:!0});var p=r(D);B=i(p,"Update Form"),p.forEach(o),x=h(v);for(let t=0;t<M.length;t+=1)M[t].l(v);C=h(v),A=l(v,"P",{});var g=r(A);H=l(g,"INPUT",{class:!0,type:!0,value:!0}),g.forEach(o),v.forEach(o),d.forEach(o),s.forEach(o),P=h(e),U=l(e,"HR",{class:!0}),this.h()},h(){f(u,"class","w3-text-orange"),p(u,"text-shadow","1px 1px 0 #444"),f(a,"class","w3-third w3-container w3-blue"),f(D,"class","w3-text-orange"),p(D,"text-shadow","1px 1px 0 #444"),f(H,"class","w3-blue"),f(H,"type","submit"),H.value="Update",f(N,"name",O=e[33].container_info.name),f(N,"port",V=e[33].container_info.ports),f(N,"index",e[32]),f(N,"class","w3-container"),f(S,"class","w3-twothird w3-container w3-gray"),f(t,"class","w3-row w3-border"),f(U,"class","svelte-83vf4v")},m(s,c){d(s,t,c),v(t,a),v(a,u),v(u,m),v(a,w),v(a,k),v(k,T),v(t,I),v(t,S),v(S,N),v(N,D),v(D,B),v(N,x);for(let e=0;e<M.length;e+=1)M[e].m(N,null);v(N,C),v(N,A),v(A,H),d(s,P,c),d(s,U,c),R||(L=g(N,"submit",E(e[9])),R=!0)},p(e,t){2&t[0]&&j!==(j=e[33].container_info.name+"")&&b(m,j),2&t[0]&&(J=Object.entries(e[33].configs),M=y(M,t,F,1,e,J,$,N,_,de,C,q)),2&t[0]&&O!==(O=e[33].container_info.name)&&f(N,"name",O),2&t[0]&&V!==(V=e[33].container_info.ports)&&f(N,"port",V)},d(e){e&&o(t);for(let t=0;t<M.length;t+=1)M[t].d();e&&o(P),e&&o(U),R=!1,L()}}}function ue(e){let t,a=e[6],s=[];for(let c=0;c<a.length;c+=1)s[c]=me($(e,a,c));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=u()},l(e){for(let t=0;t<s.length;t+=1)s[t].l(e);t=u()},m(e,a){for(let t=0;t<s.length;t+=1)s[t].m(e,a);d(e,t,a)},p(e,c){if(64&c[0]){let n;for(a=e[6],n=0;n<a.length;n+=1){const l=$(e,a,n);s[n]?s[n].p(l,c):(s[n]=me(l),s[n].c(),s[n].m(t.parentNode,t))}for(;n<s.length;n+=1)s[n].d(1);s.length=a.length}},d(e){m(s,e),e&&o(t)}}}function me(e){let t,a,u,m,p,g,E,y=e[30]+"";return{c(){t=s("label"),a=c(y),u=n(),m=s("input"),p=n(),g=s("span"),E=n(),this.h()},l(e){t=l(e,"LABEL",{class:!0});var s=r(t);a=i(s,y),u=h(s),m=l(s,"INPUT",{type:!0,checked:!0,name:!0,class:!0}),p=h(s),g=l(s,"SPAN",{class:!0}),r(g).forEach(o),E=h(s),s.forEach(o),this.h()},h(){f(m,"type","radio"),m.checked="checked",f(m,"name","radio"),f(m,"class","svelte-83vf4v"),f(g,"class","checkmark svelte-83vf4v"),f(t,"class","container svelte-83vf4v")},m(e,s){d(e,t,s),v(t,a),v(t,u),v(t,m),v(t,p),v(t,g),v(t,E)},p(e,t){64&t[0]&&y!==(y=e[30]+"")&&b(a,y)},d(e){e&&o(t)}}}function pe(e){let t,a,u,m,E,b,y,x,C,A,_,O,V,P,U,R,L,j,$,J,q,F,z,G,Q,W,X,Y,Z,ee,ae,se,ce,le,re,ie,oe,he,fe,de,ve,me,pe,Ee,be,ye,we,ke,Te,Ie,Se,Ne,De,Be,xe,Ce,Ae,_e,He,Oe,Ve,Pe,Ue,Re,Le,je,Me,$e,Je,qe,Fe,ze,Ge,Qe,Ke,We,Xe,Ye,Ze,et,tt,at,st,ct,nt,lt,rt,it,ot,ht,ft,dt,vt,ut,mt,pt,gt,Et,bt,yt,wt,kt,Tt,It,St,Nt,Dt,Bt,xt,Ct,At,_t,Ht,Ot,Vt,Pt,Ut,Rt,Lt,jt,Mt,$t,Jt,qt,Ft,zt,Gt,Qt,Kt,Wt,Xt,Yt,Zt,ea,ta,aa,sa,ca,na,la,ra,ia,oa,ha,fa,da,va,ua,ma,pa,ga,Ea,ba,ya,wa,ka,Ta,Ia,Sa,Na,Da,Ba,xa,Ca,Aa,_a,Ha,Oa,Va,Pa,Ua,Ra,La,ja,Ma,$a,Ja,qa,Fa,za,Ga;a=new H({});let Qa=e[0].length>0&&K(e),Ka=e[4].length>0&&te(e),Wa="configurations"in e[1]&&ne(e),Xa=e[6].length>0&&ue(e);return{c(){t=n(),w(a.$$.fragment),u=n(),m=s("hr"),E=n(),b=s("div"),y=s("h1"),x=s("b"),C=c("Scenario Management"),A=n(),_=s("hr"),O=n(),V=s("section"),P=s("h3"),U=c("Select scenario"),R=n(),L=s("section"),Qa&&Qa.c(),j=n(),$=s("div"),J=s("div"),q=s("button"),F=c("Create Scenario"),z=n(),G=s("div"),Q=s("input"),W=n(),X=s("div"),Y=s("div"),Z=s("button"),ee=c("Rename Scenario"),ae=n(),se=s("div"),ce=s("input"),le=n(),re=s("div"),ie=s("input"),oe=n(),he=s("hr"),fe=n(),de=s("div"),ve=s("h1"),me=s("b"),pe=c("Scenario Type"),Ee=n(),be=s("div"),ye=s("div"),we=s("a"),ke=s("div"),Te=c("Communication"),Ie=n(),Se=s("a"),Ne=s("div"),De=c("Static"),Be=n(),xe=s("a"),Ce=s("div"),Ae=c("Driving Simulation"),_e=n(),He=s("div"),Oe=s("hr"),Ve=n(),Pe=s("div"),Ue=s("h1"),Re=s("b"),Le=c("Configuration"),je=n(),Me=s("hr"),$e=n(),Je=s("section"),qe=s("h3"),Fe=s("b"),ze=c("Select containers"),Ge=n(),Qe=s("section"),Ka&&Ka.c(),Ke=n(),We=s("hr"),Xe=n(),Ye=s("section"),Ze=s("h3"),et=s("b"),tt=c("Configure containers"),at=n(),st=s("section"),Wa&&Wa.c(),nt=n(),lt=s("div"),rt=s("hr"),it=n(),ot=s("div"),ht=s("h1"),ft=s("b"),dt=c("Configuration"),vt=n(),ut=s("hr"),mt=n(),pt=s("section"),gt=s("h3"),Et=s("b"),bt=c("Select Static Datasets"),yt=c(" (folder:number_images)"),wt=n(),kt=s("div"),Xa&&Xa.c(),Tt=n(),It=s("hr"),St=n(),Nt=s("section"),Dt=s("h3"),Bt=s("b"),xt=c("Select Attack"),Ct=n(),At=s("div"),_t=s("label"),Ht=c("Image Blurring\n                    "),Ot=s("input"),Vt=n(),Pt=s("span"),Ut=n(),Rt=s("label"),Lt=c("Blacking Images\n                    "),jt=s("input"),Mt=n(),$t=s("span"),Jt=n(),qt=s("input"),Ft=n(),zt=s("hr"),Gt=n(),Qt=s("section"),Kt=s("h3"),Wt=s("b"),Xt=c("Validate Dataset"),Yt=n(),Zt=s("div"),ea=s("input"),ta=n(),aa=s("label"),sa=s("b"),ca=c("Algorithm1"),na=n(),la=s("hr"),ia=n(),oa=s("div"),ha=s("hr"),fa=n(),da=s("div"),va=s("h1"),ua=s("b"),ma=c("Configuration"),pa=n(),ga=s("hr"),Ea=n(),ba=s("section"),ya=s("h3"),wa=s("b"),ka=c("Select Driving Path"),Ta=n(),Ia=s("hr"),Sa=n(),Na=s("section"),Da=s("h3"),Ba=s("b"),xa=c("Select Sensors"),Ca=n(),Aa=s("hr"),_a=n(),Ha=s("section"),Oa=s("h3"),Va=s("b"),Pa=c("Attack Configuration"),Ra=n(),La=s("hr"),ja=n(),Ma=s("button"),$a=c("Save Configurations"),Ja=n(),qa=s("hr"),this.h()},l(e){k('[data-svelte="svelte-101i1i0"]',M.head).forEach(o),t=h(e),T(a.$$.fragment,e),u=h(e),m=l(e,"HR",{class:!0}),E=h(e),b=l(e,"DIV",{class:!0});var s=r(b);y=l(s,"H1",{class:!0,style:!0});var c=r(y);x=l(c,"B",{});var n=r(x);C=i(n,"Scenario Management"),n.forEach(o),c.forEach(o),s.forEach(o),A=h(e),_=l(e,"HR",{class:!0}),O=h(e),V=l(e,"SECTION",{class:!0});var f=r(V);P=l(f,"H3",{});var d=r(P);U=i(d,"Select scenario"),d.forEach(o),f.forEach(o),R=h(e),L=l(e,"SECTION",{class:!0});var v=r(L);Qa&&Qa.l(v),j=h(v),$=l(v,"DIV",{class:!0});var p=r($);J=l(p,"DIV",{class:!0});var g=r(J);q=l(g,"BUTTON",{ref:!0,class:!0});var w=r(q);F=i(w,"Create Scenario"),w.forEach(o),g.forEach(o),z=h(p),G=l(p,"DIV",{class:!0});var I=r(G);Q=l(I,"INPUT",{id:!0,class:!0,name:!0,type:!0,placeholder:!0}),I.forEach(o),p.forEach(o),W=h(v),X=l(v,"DIV",{class:!0});var S=r(X);Y=l(S,"DIV",{class:!0});var N=r(Y);Z=l(N,"BUTTON",{ref:!0,class:!0});var D=r(Z);ee=i(D,"Rename Scenario"),D.forEach(o),N.forEach(o),ae=h(S),se=l(S,"DIV",{class:!0});var B=r(se);ce=l(B,"INPUT",{id:!0,class:!0,name:!0,type:!0,placeholder:!0}),B.forEach(o),le=h(S),re=l(S,"DIV",{class:!0});var H=r(re);ie=l(H,"INPUT",{id:!0,class:!0,name:!0,type:!0,placeholder:!0}),H.forEach(o),S.forEach(o),v.forEach(o),oe=h(e),he=l(e,"HR",{class:!0}),fe=h(e),de=l(e,"DIV",{class:!0});var K=r(de);ve=l(K,"H1",{class:!0,style:!0});var te=r(ve);me=l(te,"B",{});var ne=r(me);pe=i(ne,"Scenario Type"),ne.forEach(o),te.forEach(o),K.forEach(o),Ee=h(e),be=l(e,"DIV",{class:!0});var ue=r(be);ye=l(ue,"DIV",{id:!0,class:!0});var ge=r(ye);we=l(ge,"A",{href:!0});var ct=r(we);ke=l(ct,"DIV",{class:!0});var ra=r(ke);Te=i(ra,"Communication"),ra.forEach(o),ct.forEach(o),Ie=h(ge),Se=l(ge,"A",{href:!0});var Ua=r(Se);Ne=l(Ua,"DIV",{class:!0});var Fa=r(Ne);De=i(Fa,"Static"),Fa.forEach(o),Ua.forEach(o),Be=h(ge),xe=l(ge,"A",{href:!0});var za=r(xe);Ce=l(za,"DIV",{class:!0});var Ga=r(Ce);Ae=i(Ga,"Driving Simulation"),Ga.forEach(o),za.forEach(o),ge.forEach(o),_e=h(ue),He=l(ue,"DIV",{id:!0,class:!0,style:!0});var Ya=r(He);Oe=l(Ya,"HR",{class:!0}),Ve=h(Ya),Pe=l(Ya,"DIV",{class:!0});var Za=r(Pe);Ue=l(Za,"H1",{class:!0,style:!0});var es=r(Ue);Re=l(es,"B",{});var ts=r(Re);Le=i(ts,"Configuration"),ts.forEach(o),es.forEach(o),Za.forEach(o),je=h(Ya),Me=l(Ya,"HR",{class:!0}),$e=h(Ya),Je=l(Ya,"SECTION",{class:!0});var as=r(Je);qe=l(as,"H3",{});var ss=r(qe);Fe=l(ss,"B",{});var cs=r(Fe);ze=i(cs,"Select containers"),cs.forEach(o),ss.forEach(o),as.forEach(o),Ge=h(Ya),Qe=l(Ya,"SECTION",{class:!0});var ns=r(Qe);Ka&&Ka.l(ns),ns.forEach(o),Ke=h(Ya),We=l(Ya,"HR",{class:!0}),Xe=h(Ya),Ye=l(Ya,"SECTION",{class:!0});var ls=r(Ye);Ze=l(ls,"H3",{});var rs=r(Ze);et=l(rs,"B",{});var is=r(et);tt=i(is,"Configure containers"),is.forEach(o),rs.forEach(o),ls.forEach(o),at=h(Ya),st=l(Ya,"SECTION",{class:!0});var os=r(st);Wa&&Wa.l(os),os.forEach(o),Ya.forEach(o),nt=h(ue),lt=l(ue,"DIV",{id:!0,class:!0,style:!0});var hs=r(lt);rt=l(hs,"HR",{class:!0}),it=h(hs),ot=l(hs,"DIV",{class:!0});var fs=r(ot);ht=l(fs,"H1",{class:!0,style:!0});var ds=r(ht);ft=l(ds,"B",{});var vs=r(ft);dt=i(vs,"Configuration"),vs.forEach(o),ds.forEach(o),fs.forEach(o),vt=h(hs),ut=l(hs,"HR",{class:!0}),mt=h(hs),pt=l(hs,"SECTION",{class:!0});var us=r(pt);gt=l(us,"H3",{});var ms=r(gt);Et=l(ms,"B",{});var ps=r(Et);bt=i(ps,"Select Static Datasets"),ps.forEach(o),yt=i(ms," (folder:number_images)"),ms.forEach(o),wt=h(us),kt=l(us,"DIV",{class:!0,id:!0});var gs=r(kt);Xa&&Xa.l(gs),gs.forEach(o),us.forEach(o),Tt=h(hs),It=l(hs,"HR",{class:!0}),St=h(hs),Nt=l(hs,"SECTION",{class:!0});var Es=r(Nt);Dt=l(Es,"H3",{});var bs=r(Dt);Bt=l(bs,"B",{});var ys=r(Bt);xt=i(ys,"Select Attack"),ys.forEach(o),bs.forEach(o),Ct=h(Es),At=l(Es,"DIV",{class:!0,id:!0});var ws=r(At);_t=l(ws,"LABEL",{class:!0});var ks=r(_t);Ht=i(ks,"Image Blurring\n                    "),Ot=l(ks,"INPUT",{type:!0,checked:!0,name:!0,class:!0}),Vt=h(ks),Pt=l(ks,"SPAN",{class:!0}),r(Pt).forEach(o),ks.forEach(o),Ut=h(ws),Rt=l(ws,"LABEL",{class:!0});var Ts=r(Rt);Lt=i(Ts,"Blacking Images\n                    "),jt=l(Ts,"INPUT",{type:!0,checked:!0,name:!0,class:!0}),Mt=h(Ts),$t=l(Ts,"SPAN",{class:!0}),r($t).forEach(o),Ts.forEach(o),Jt=h(ws),qt=l(ws,"INPUT",{id:!0,class:!0,name:!0,type:!0,placeholder:!0}),ws.forEach(o),Es.forEach(o),Ft=h(hs),zt=l(hs,"HR",{class:!0}),Gt=h(hs),Qt=l(hs,"SECTION",{class:!0});var Is=r(Qt);Kt=l(Is,"H3",{});var Ss=r(Kt);Wt=l(Ss,"B",{});var Ns=r(Wt);Xt=i(Ns,"Validate Dataset"),Ns.forEach(o),Ss.forEach(o),Yt=h(Is),Zt=l(Is,"DIV",{class:!0,id:!0});var Ds=r(Zt);ea=l(Ds,"INPUT",{class:!0,type:!0,checked:!0}),ta=h(Ds),aa=l(Ds,"LABEL",{class:!0});var Bs=r(aa);sa=l(Bs,"B",{});var xs=r(sa);ca=i(xs,"Algorithm1"),xs.forEach(o),Bs.forEach(o),Ds.forEach(o),Is.forEach(o),na=h(hs),la=l(hs,"HR",{class:!0}),hs.forEach(o),ia=h(ue),oa=l(ue,"DIV",{id:!0,class:!0,style:!0});var Cs=r(oa);ha=l(Cs,"HR",{class:!0}),fa=h(Cs),da=l(Cs,"DIV",{class:!0});var As=r(da);va=l(As,"H1",{class:!0,style:!0});var _s=r(va);ua=l(_s,"B",{});var Hs=r(ua);ma=i(Hs,"Configuration"),Hs.forEach(o),_s.forEach(o),As.forEach(o),pa=h(Cs),ga=l(Cs,"HR",{class:!0}),Ea=h(Cs),ba=l(Cs,"SECTION",{class:!0});var Os=r(ba);ya=l(Os,"H3",{});var Vs=r(ya);wa=l(Vs,"B",{});var Ps=r(wa);ka=i(Ps,"Select Driving Path"),Ps.forEach(o),Vs.forEach(o),Os.forEach(o),Ta=h(Cs),Ia=l(Cs,"HR",{class:!0}),Sa=h(Cs),Na=l(Cs,"SECTION",{class:!0});var Us=r(Na);Da=l(Us,"H3",{});var Rs=r(Da);Ba=l(Rs,"B",{});var Ls=r(Ba);xa=i(Ls,"Select Sensors"),Ls.forEach(o),Rs.forEach(o),Us.forEach(o),Ca=h(Cs),Aa=l(Cs,"HR",{class:!0}),_a=h(Cs),Ha=l(Cs,"SECTION",{class:!0});var js=r(Ha);Oa=l(js,"H3",{});var Ms=r(Oa);Va=l(Ms,"B",{});var $s=r(Va);Pa=i($s,"Attack Configuration"),$s.forEach(o),Ms.forEach(o),js.forEach(o),Cs.forEach(o),ue.forEach(o),Ra=h(e),La=l(e,"HR",{class:!0}),ja=h(e),Ma=l(e,"BUTTON",{class:!0});var Js=r(Ma);$a=i(Js,"Save Configurations"),Js.forEach(o),Ja=h(e),qa=l(e,"HR",{class:!0}),this.h()},h(){M.title="Configuration and Scheduling",f(m,"class","svelte-83vf4v"),f(y,"class","w3-text-yellow"),p(y,"text-shadow","1px 1px 0 #444"),f(b,"class","w3-panel w3-blue"),f(_,"class","svelte-83vf4v"),f(V,"class","page-headline"),f(q,"ref","createNewScenario"),f(q,"class","w3-col w3-input w3-border"),f(J,"class","w3-third"),f(Q,"id","createNewScenario"),f(Q,"class","w3-input w3-border"),f(Q,"name","name"),f(Q,"type","text"),f(Q,"placeholder","Scenario Name"),f(G,"class","w3-rest"),f($,"class","w3-row w3-section"),f(Z,"ref","renameScenario"),f(Z,"class","w3-col w3-input w3-border"),f(Y,"class","w3-third"),f(ce,"id","renameScenarioID"),f(ce,"class","w3-input w3-border"),f(ce,"name","id"),f(ce,"type","text"),f(ce,"placeholder","Scenario Identifier"),f(se,"class","w3-third"),f(ie,"id","renameScenario"),f(ie,"class","w3-input w3-border"),f(ie,"name","name"),f(ie,"type","text"),f(ie,"placeholder","Scenario Name"),f(re,"class","w3-rest"),f(X,"class","w3-row w3-section"),f(L,"class","w3-container"),f(he,"class","svelte-83vf4v"),f(ve,"class","w3-text-yellow"),p(ve,"text-shadow","1px 1px 0 #444"),f(de,"class","w3-panel w3-blue"),f(ke,"class","w3-third tablink w3-bottombar w3-hover-light-grey w3-padding w3-border-red"),f(we,"href","javascript:void(0)"),f(Ne,"class","w3-third tablink w3-bottombar w3-hover-light-grey w3-padding"),f(Se,"href","javascript:void(0)"),f(Ce,"class","w3-third tablink w3-bottombar w3-hover-light-grey w3-padding"),f(xe,"href","javascript:void(0)"),f(ye,"id","selectConfigTabs"),f(ye,"class","w3-row"),f(Oe,"class","svelte-83vf4v"),f(Ue,"class","w3-text-yellow"),p(Ue,"text-shadow","1px 1px 0 #444"),f(Pe,"class","w3-panel w3-blue"),f(Me,"class","svelte-83vf4v"),f(Je,"class","page-headline"),f(Qe,"class","w3-container"),f(We,"class","svelte-83vf4v"),f(Ye,"class","page-headline"),f(st,"class","w3-container"),f(He,"id","Communication"),f(He,"class","w3-container city"),f(He,"style",ct=e[3].Communication),f(rt,"class","svelte-83vf4v"),f(ht,"class","w3-text-yellow"),p(ht,"text-shadow","1px 1px 0 #444"),f(ot,"class","w3-panel w3-blue"),f(ut,"class","svelte-83vf4v"),f(kt,"class","w3-container"),f(kt,"id","static_datasets"),f(pt,"class","page-headline"),f(It,"class","svelte-83vf4v"),f(Ot,"type","radio"),Ot.checked="checked",f(Ot,"name","radio2"),f(Ot,"class","svelte-83vf4v"),f(Pt,"class","checkmark svelte-83vf4v"),f(_t,"class","container svelte-83vf4v"),f(jt,"type","radio"),jt.checked="checked",f(jt,"name","radio2"),f(jt,"class","svelte-83vf4v"),f($t,"class","checkmark svelte-83vf4v"),f(Rt,"class","container svelte-83vf4v"),f(qt,"id","numberImages"),f(qt,"class","w3-input w3-border"),f(qt,"name","numberImg"),f(qt,"type","text"),f(qt,"placeholder","Number of Images to Attack"),f(At,"class","w3-container"),f(At,"id","static_attacks"),f(Nt,"class","page-headline"),f(zt,"class","svelte-83vf4v"),f(ea,"class","w3-check"),f(ea,"type","checkbox"),ea.checked="",f(aa,"class",""),f(Zt,"class","w3-container"),f(Zt,"id","static_validation"),f(Qt,"class","page-headline"),f(la,"class","svelte-83vf4v"),f(lt,"id","Static"),f(lt,"class","w3-container city"),f(lt,"style",ra=e[3].Static),f(ha,"class","svelte-83vf4v"),f(va,"class","w3-text-yellow"),p(va,"text-shadow","1px 1px 0 #444"),f(da,"class","w3-panel w3-blue"),f(ga,"class","svelte-83vf4v"),f(ba,"class","page-headline"),f(Ia,"class","svelte-83vf4v"),f(Na,"class","page-headline"),f(Aa,"class","svelte-83vf4v"),f(Ha,"class","page-headline"),f(oa,"id","Driving Simulation"),f(oa,"class","w3-container city"),f(oa,"style",Ua=e[3]["Driving Simulation"]),f(be,"class","w3-container"),f(La,"class","svelte-83vf4v"),f(Ma,"class","w3-col w3-input w3-border w3-margin-top"),f(qa,"class","svelte-83vf4v")},m(s,c){d(s,t,c),I(a,s,c),d(s,u,c),d(s,m,c),d(s,E,c),d(s,b,c),v(b,y),v(y,x),v(x,C),d(s,A,c),d(s,_,c),d(s,O,c),d(s,V,c),v(V,P),v(P,U),d(s,R,c),d(s,L,c),Qa&&Qa.m(L,null),v(L,j),v(L,$),v($,J),v(J,q),v(q,F),v($,z),v($,G),v(G,Q),v(L,W),v(L,X),v(X,Y),v(Y,Z),v(Z,ee),v(X,ae),v(X,se),v(se,ce),v(X,le),v(X,re),v(re,ie),d(s,oe,c),d(s,he,c),d(s,fe,c),d(s,de,c),v(de,ve),v(ve,me),v(me,pe),d(s,Ee,c),d(s,be,c),v(be,ye),v(ye,we),v(we,ke),v(ke,Te),v(ye,Ie),v(ye,Se),v(Se,Ne),v(Ne,De),v(ye,Be),v(ye,xe),v(xe,Ce),v(Ce,Ae),v(be,_e),v(be,He),v(He,Oe),v(He,Ve),v(He,Pe),v(Pe,Ue),v(Ue,Re),v(Re,Le),v(He,je),v(He,Me),v(He,$e),v(He,Je),v(Je,qe),v(qe,Fe),v(Fe,ze),v(He,Ge),v(He,Qe),Ka&&Ka.m(Qe,null),v(He,Ke),v(He,We),v(He,Xe),v(He,Ye),v(Ye,Ze),v(Ze,et),v(et,tt),v(He,at),v(He,st),Wa&&Wa.m(st,null),v(be,nt),v(be,lt),v(lt,rt),v(lt,it),v(lt,ot),v(ot,ht),v(ht,ft),v(ft,dt),v(lt,vt),v(lt,ut),v(lt,mt),v(lt,pt),v(pt,gt),v(gt,Et),v(Et,bt),v(gt,yt),v(pt,wt),v(pt,kt),Xa&&Xa.m(kt,null),v(lt,Tt),v(lt,It),v(lt,St),v(lt,Nt),v(Nt,Dt),v(Dt,Bt),v(Bt,xt),v(Nt,Ct),v(Nt,At),v(At,_t),v(_t,Ht),v(_t,Ot),v(_t,Vt),v(_t,Pt),v(At,Ut),v(At,Rt),v(Rt,Lt),v(Rt,jt),v(Rt,Mt),v(Rt,$t),v(At,Jt),v(At,qt),v(lt,Ft),v(lt,zt),v(lt,Gt),v(lt,Qt),v(Qt,Kt),v(Kt,Wt),v(Wt,Xt),v(Qt,Yt),v(Qt,Zt),v(Zt,ea),v(Zt,ta),v(Zt,aa),v(aa,sa),v(sa,ca),v(lt,na),v(lt,la),v(be,ia),v(be,oa),v(oa,ha),v(oa,fa),v(oa,da),v(da,va),v(va,ua),v(ua,ma),v(oa,pa),v(oa,ga),v(oa,Ea),v(oa,ba),v(ba,ya),v(ya,wa),v(wa,ka),v(oa,Ta),v(oa,Ia),v(oa,Sa),v(oa,Na),v(Na,Da),v(Da,Ba),v(Ba,xa),v(oa,Ca),v(oa,Aa),v(oa,_a),v(oa,Ha),v(Ha,Oa),v(Oa,Va),v(Va,Pa),d(s,Ra,c),d(s,La,c),d(s,ja,c),d(s,Ma,c),v(Ma,$a),d(s,Ja,c),d(s,qa,c),Fa=!0,za||(Ga=[g(q,"click",e[15]),g(Z,"click",e[13]),g(ke,"click",e[7]),g(we,"click",ge),g(Ne,"click",e[7]),g(Se,"click",ge),g(Ce,"click",e[7]),g(xe,"click",ge),g(Ma,"click",e[8])],za=!0)},p(e,t){e[0].length>0?Qa?Qa.p(e,t):(Qa=K(e),Qa.c(),Qa.m(L,j)):Qa&&(Qa.d(1),Qa=null),e[4].length>0?Ka?Ka.p(e,t):(Ka=te(e),Ka.c(),Ka.m(Qe,null)):Ka&&(Ka.d(1),Ka=null),"configurations"in e[1]?Wa?Wa.p(e,t):(Wa=ne(e),Wa.c(),Wa.m(st,null)):Wa&&(Wa.d(1),Wa=null),(!Fa||8&t[0]&&ct!==(ct=e[3].Communication))&&f(He,"style",ct),e[6].length>0?Xa?Xa.p(e,t):(Xa=ue(e),Xa.c(),Xa.m(kt,null)):Xa&&(Xa.d(1),Xa=null),(!Fa||8&t[0]&&ra!==(ra=e[3].Static))&&f(lt,"style",ra),(!Fa||8&t[0]&&Ua!==(Ua=e[3]["Driving Simulation"]))&&f(oa,"style",Ua)},i(e){Fa||(S(a.$$.fragment,e),Fa=!0)},o(e){N(a.$$.fragment,e),Fa=!1},d(e){e&&o(t),D(a,e),e&&o(u),e&&o(m),e&&o(E),e&&o(b),e&&o(A),e&&o(_),e&&o(O),e&&o(V),e&&o(R),e&&o(L),Qa&&Qa.d(),e&&o(oe),e&&o(he),e&&o(fe),e&&o(de),e&&o(Ee),e&&o(be),Ka&&Ka.d(),Wa&&Wa.d(),Xa&&Xa.d(),e&&o(Ra),e&&o(La),e&&o(ja),e&&o(Ma),e&&o(Ja),e&&o(qa),za=!1,B(Ga)}}}function ge(){let e=this.firstChild.innerText;var t,a,s;for(a=document.getElementsByClassName("city"),t=0;t<a.length;t++)a[t].style.display="none";for(s=document.getElementsByClassName("tablink"),t=0;t<a.length;t++)s[t].className=s[t].className.replace(" w3-border-red","");document.getElementById(e).style.display="block",this.firstChild.className+=" w3-border-red"}function Ee(e,t,a){let s=[],c={},n=!1,l="Communication";const r=U.subscribe((e=>{a(0,s=e)})),i=R.subscribe((e=>{a(1,c=e)})),o=L.subscribe((e=>{n=e})),h=j.subscribe((e=>{l=e}));let f;x((()=>{r(),i(),o(),h()}));let d={Communication:"display:block",Static:"display:none","Driving Simulation":"display:none"},v=[{short_id:"123",name:"DoS Attack",ports:"8010"},{short_id:"1243",name:"Replay Attack",ports:"8020"},{short_id:"122",name:"MitM",ports:"8030"}],u={},m=[];function p(e){e?(a(1,c={}),a(1,c.ref=s[f]._id,c),a(1,c.name=s[f].name,c),a(1,c.configurations=[],c),R.set(c)):(a(1,c.configurations=[],c),R.set(c))}function g(){let e=document.getElementById("static_datasets").childNodes,t=document.getElementById("static_attacks").getElementsByTagName("label"),a=document.getElementById("static_validation").getElementsByTagName("input");console.log("nooowo:",c);for(var s=0;s<e.length;s++)e[s].hasChildNodes()&&(e[s].innerText==c.configurations[0].dataset?e[s].firstElementChild.checked=!0:e[s].firstElementChild.checked=!1);for(s=0;s<t.length;s++)t.item(s).innerText==c.configurations[0].attack?t.item(s).firstElementChild.checked=!0:t.item(s).firstElementChild.checked=!1;document.getElementById("numberImages").value=c.configurations[0].attack_samples;for(s=0;s<a.length;s++){a[s].checked=!1;let e=c.configurations[0].validations;for(var n=0;n<e.length;n++)a[s].nextElementSibling.firstElementChild.innerText==e[n]&&(a[s].checked=!0)}}function E(e){let t=document.getElementById("selectConfigTabs").getElementsByTagName("div");for(var a=0;a<t.length;a++)t[a].innerText==e?t[a].classList.add("w3-border-red"):t[a].classList.remove("w3-border-red");j.set(e),document.getElementById("Communication").style.display="none",document.getElementById("Driving Simulation").style.display="none",document.getElementById("Static").style.display="none",document.getElementById(e).style.display="block"}function b(){let e=!1;for(let t=0;t<s.length;t++)s[t].activated&&(e=!0);return e}return C((async()=>{console.log("reload here...",l),async function(e){n?O("/localservices",(function(t){let s=JSON.parse(t.response);s.data&&a(4,v=s.data),e()})):O("/containers",(function(t){let s=JSON.parse(t.response);s.data&&a(4,v=s.data),e()}))}((function(){if(s.length<1)O("/api/db1/scenarios",(function(e){let t=JSON.parse(e.response);if(t.data){for(let e=0;e<t.data.length;e++)t.data[e].activated=!1;U.set(t.data)}}));else if(Object.keys(c).length>0){if(j.set(c.type),console.log("reload222 here...",l),E(l),"Communication"==c.type)for(var e=0;e<c.configurations.length;e++)for(var t=0;t<v.length;t++){let s=t.toString();v[t].short_id==c.configurations[e].container_info.short_id&&a(5,u[s]="background-color: #acddb4;",u)}"Static"==c.type&&g(),c.type}})),async function(){O("/staticfiles",(function(e){let t=JSON.parse(e.response);t.data&&a(6,m=t.data)}))}()})),[s,c,f,d,v,u,m,async function(){j.set(this.innerText);for(let s in d)s==this.innerText?a(3,d[s]="display:block",d):a(3,d[s]="display:none",d);p(!1);let e=document.getElementById("selectContainers").getElementsByTagName("tr").length;for(var t=0;t<e;t++)a(5,u[t]="",u)},async function(){if(!b())return void V.danger("please create and activate a scenario first.");let e="/api/db1/scenario_configurations",t="POST";if("_id"in c&&(t="PUT",e="/api/db1/scenario_configurations/"+c._id),"Static"==l){let e=function(){let e={},t=document.getElementById("static_datasets").childNodes,a=document.getElementById("static_attacks").getElementsByTagName("label"),s=document.getElementById("static_validation").getElementsByTagName("input");for(var c=0;c<t.length;c++)t[c].hasChildNodes()&&t[c].firstElementChild.checked&&(e.dataset=t[c].innerText);for(c=0;c<a.length;c++)a.item(c).firstElementChild.checked&&(e.attack=a.item(c).innerText);e.attack_samples=parseInt(document.getElementById("numberImages").value);let n=[];for(c=0;c<s.length;c++)s[c].checked&&n.push(s[c].nextElementSibling.firstElementChild.innerText);return e.validations=n,e}();if(isNaN(e.attack_samples)||parseInt(e.dataset.split(":")[1])<e.attack_samples){let t=e.dataset.split(":")[1];return void V.danger("Please enter a number between 0 and "+t)}c.type==l&&"_id"in c||a(1,c={name:s[f].name,ref:s[f]._id}),a(1,c.configurations=[e],c)}a(1,c.type=l,c),P(e,t,c,(function(e){"POST"==t&&a(1,c._id=e.data,c),R.set(c),V.success("Configuration saved successfull.")}))},async function(){if(!b())return void V.danger("please create and activate a scenario first.");let e={},t=parseInt(this.getAttribute("index")),s=this.getAttribute("name"),l=this.getAttribute("port").split(",")[0].split("/")[0],r=this.querySelectorAll("input");for(let a=0;a<r.length;a++){let t=r[a],s=t.getAttribute("type"),c=t.getAttribute("key"),n=t.value;null==n&&(n=""),"submit"!=s&&("checkbox"==s?e[c]=t.checked:"list"==s?e[c]=n.split(","):t.hasAttribute("convert")?e[c]=Number(n):e[c]=n)}let i="/containers/"+s+"/"+l+"/configs",o="POST";n&&(i="/localservices/"+s+"/"+l+"/configs",o="PUT"),P(i,o,e,(function(s){a(1,c.configurations[t].configs=e,c),R.set(c),V.success("Configuration update successfull.")}))},function(){let e,t=this.parentElement.parentElement.parentElement.parentElement.getAttribute("index");for(let c=0;c<s.length;c++)c==t?(a(2,f=c),a(0,s[c].activated=!0,s),e=s[c]):a(0,s[c].activated=!1,s);U.set(s);for(let s of Object.keys(u))a(5,u[s]="",u);p(!0);let n="/api/db1/scenario_configurations/ref-"+e._id;O(n,(function(e){let t=JSON.parse(e.response);if(t.data&&t.data.length>0&&(a(1,c=t.data[0]),"type"in c)){if(E(c.type),"Communication"==c.type){for(let e=0;e<v.length;e++){let t=e.toString();a(5,u[t]="",u);let s=v[e].short_id;for(let e=0;e<c.configurations.length;e++){s==c.configurations[e].container_info.short_id&&(a(5,u[t]="background-color: #acddb4;",u),e=c.configurations.length)}}R.set(c)}"Static"==c.type&&g(),c.type}}))},function(){if(!b())return void V.danger("please create and activate a scenario first.");c.type!=l&&(console.log("resetting scenario configs"),p(!1));let e=this.parentElement.parentElement.parentElement.parentElement.getAttribute("index");a(5,u[e]="background-color: #acddb4;",u);let t=v[parseInt(e)],s={},r=t.name,i=t.ports.split(",")[0].split("/")[0],o="/containers/"+r+"/"+i+"/configs";n&&(o="/localservices/"+r+"/"+i+"/configs"),O(o,(function(e){let n=JSON.parse(e.response);n.data&&"data"in n.data&&(s=n.data.data),c.configurations.length<1?a(1,c.configurations=[{container_info:t,configs:s}],c):c.configurations.push({container_info:t,configs:s}),R.set(c)}))},function(){if(!b())return void V.danger("please create and activate a scenario first.");let e=this.parentElement.parentElement.parentElement.parentElement.getAttribute("index");a(5,u[e]="",u);let t=v[parseInt(e)].short_id,s=-1;for(let a=0;a<c.configurations.length;a++)c.configurations[a].container_info.short_id==t&&(s=a,a=c.configurations.length);s>-1&&c.configurations.splice(s,1),R.set(c)},function(){let e=this.getAttribute("ref"),t=document.getElementById(e+"ID"),c=document.getElementById(e);if(""!=t.value&&""!=c.value){let e=!1,n=-1;for(let a=0;a<s.length;a++)s[a]._id==t.value&&(e=!0,n=a,a=s.length);if(!e)return void V.danger("scenario identifier does not exist.");let l="/api/db1/scenarios/"+t.value,r={name:c.value};P(l,"PUT",r,(function(e){a(0,s[n].name=c.value,s),U.set(s),V.success("Scenario renamed successfully.")}))}else V.danger("please provide scenario identifier and new name.")},function(){let e=!1,t=parseInt(this.parentElement.parentElement.parentElement.parentElement.getAttribute("index"));s[t].activated&&(e=!0);let n=s[t]._id;if(P("/api/db1/scenarios/"+n,"DELETE",{},(function(e){s.splice(t,1),U.set(s),V.success("Scenario deleted successfully.")})),P("/api/db1/scenario_configurations/ref-"+n,"DELETE",{},(function(e){V.success("Scenario configuration deleted successfully.")})),e){a(1,c={}),R.set(c);for(let e of Object.keys(u))a(5,u[e]="",u)}},function(){let e=this.getAttribute("ref");if(""!=e){let t=document.getElementById(e);if(""!=t.value){let e={name:t.value},a="/api/db1/scenarios";console.log("createNewScenario request with body:",e," and url:",a),P(a,"POST",e,(function(e){console.log(e,"response from createNewScenario"),s.push({_id:e.data,name:t.value,activated:!1}),U.set(s),V.success("New scenario created.")}))}else V.danger("please provide scenario name.")}}]}export default class extends e{constructor(e){super(),t(this,e,Ee,pe,a,{},[-1,-1])}}
  