benservers.com
Open in
urlscan Pro
129.151.76.200
Public Scan
Submitted URL: http://benservers.com/_app/immutable/pages/__layout.svelte-4da6ba60.js
Effective URL: https://benservers.com/_app/immutable/pages/__layout.svelte-4da6ba60.js
Submission: On November 03 via api from US — Scanned from GB
Effective URL: https://benservers.com/_app/immutable/pages/__layout.svelte-4da6ba60.js
Submission: On November 03 via api from US — Scanned from GB
Form analysis
0 forms found in the DOMText Content
import{J as Tr,S as At,i as Mt,s as Dt,l as k,m as b,n as u,h as i,p as e,b as x,f as S,g as xt,t as F,d as $t,K as Je,o as rr,L as ce,e as Se,a as M,x as Re,c as D,y as qe,z as Ke,M as ze,C as Ge,r as G,u as J,N as m,O as _,P as n,D as wr,Q as Rr,R as qr,F as Wt,T as Kr,U as Wr,V as B,W as Hr,X as Pr,Y as Fr,H as Ur,Z as Gr,_ as Jr,$ as Qr,a0 as Xr,a1 as Yr,a2 as Zr,v as Pt,a3 as el,a4 as tl,a5 as Yt}from"../chunks/index-c0799f21.js";import{u as Qt,i as Xt,l as kr,a as xe,f as rl,b as br,t as ll,r as sl,p as il,d as al,c as Zt,s as Er,e as yr}from"../chunks/store-844eab77.js";import{n as ol,p as nl}from"../chunks/stores-9258810f.js";import{g as Ht,e as er,a as xr,p as ul}from"../chunks/api-0f842e8c.js";import{d as cl}from"../chunks/env-897091ef.js";import{T as yt}from"../chunks/Tooltip-f8e77953.js";import{w as fl}from"../chunks/index-6e16db0a.js";function hl(o){const t=o-1;return t*t*t+1}function dl(o,{delay:t=0,duration:l=400,easing:r=Tr}={}){const s=+getComputedStyle(o).opacity;return{delay:t,duration:l,easing:r,css:a=>`opacity: ${a*s}`}}function $r(o){let t,l,r=o[1]&&Ir(o);return{c(){r&&r.c(),t=Se()},l(s){r&&r.l(s),t=Se()},m(s,a){r&&r.m(s,a),x(s,t,a),l=!0},p(s,a){s[1]?r?(r.p(s,a),a&2&&S(r,1)):(r=Ir(s),r.c(),S(r,1),r.m(t.parentNode,t)):r&&(xt(),F(r,1,1,()=>{r=null}),$t())},i(s){l||(S(r),l=!0)},o(s){F(r),l=!1},d(s){r&&r.d(s),s&&i(t)}}}function Ir(o){let t,l,r,s,a,c,g;function f(h,w){return h[0].loading?ml:h[0].success===null?gl:h[0].success?vl:pl}let d=f(o),p=d(o);return s=new yt({props:{triggeredBy:"#update",placement:"right",color:"bg-coolgray-200 text-white",$$slots:{default:[_l]},$$scope:{ctx:o}}}),{c(){t=k("button"),p.c(),r=M(),Re(s.$$.fragment),this.h()},l(h){t=b(h,"BUTTON",{id:!0,class:!0});var w=u(t);p.l(w),w.forEach(i),r=D(h),qe(s.$$.fragment,h),this.h()},h(){e(t,"id","update"),t.disabled=l=o[0].success===!1,e(t,"class","icons bg-coollabs-gradient text-white duration-75 hover:scale-105 w-full")},m(h,w){x(h,t,w),p.m(t,null),x(h,r,w),Ke(s,h,w),a=!0,c||(g=ze(t,"click",o[3]),c=!0)},p(h,w){d!==(d=f(h))&&(p.d(1),p=d(h),p&&(p.c(),p.m(t,null))),(!a||w&1&&l!==(l=h[0].success===!1))&&(t.disabled=l);const $={};w&128&&($.$$scope={dirty:w,ctx:h}),s.$set($)},i(h){a||(S(s.$$.fragment,h),a=!0)},o(h){F(s.$$.fragment,h),a=!1},d(h){h&&i(t),p.d(),h&&i(r),Ge(s,h),c=!1,g()}}}function pl(o){let t,l,r,s,a,c,g;return{c(){t=m("svg"),l=m("path"),r=m("path"),s=m("path"),a=m("path"),c=m("ellipse"),g=m("ellipse"),this.h()},l(f){t=_(f,"svg",{xmlns:!0,viewBox:!0,class:!0});var d=u(t);l=_(d,"path",{fill:!0,d:!0}),u(l).forEach(i),r=_(d,"path",{fill:!0,d:!0}),u(r).forEach(i),s=_(d,"path",{fill:!0,d:!0}),u(s).forEach(i),a=_(d,"path",{fill:!0,d:!0}),u(a).forEach(i),c=_(d,"ellipse",{fill:!0,cx:!0,cy:!0,rx:!0,ry:!0}),u(c).forEach(i),g=_(d,"ellipse",{fill:!0,cx:!0,cy:!0,rx:!0,ry:!0}),u(g).forEach(i),d.forEach(i),this.h()},h(){e(l,"fill","#FFCC4D"),e(l,"d","M36 18c0 9.941-8.059 18-18 18S0 27.941 0 18 8.059 0 18 0s18 8.059 18 18"),e(r,"fill","#664500"),e(r,"d","M22 27c0 2.763-1.791 3-4 3-2.21 0-4-.237-4-3 0-2.761 1.79-6 4-6 2.209 0 4 3.239 4 6zm8-12c-.124 0-.25-.023-.371-.072-5.229-2.091-7.372-5.241-7.461-5.374-.307-.46-.183-1.081.277-1.387.459-.306 1.077-.184 1.385.274.019.027 1.93 2.785 6.541 4.629.513.206.763.787.558 1.3-.157.392-.533.63-.929.63zM6 15c-.397 0-.772-.238-.929-.629-.205-.513.044-1.095.557-1.3 4.612-1.844 6.523-4.602 6.542-4.629.308-.456.929-.577 1.387-.27.457.308.581.925.275 1.383-.089.133-2.232 3.283-7.46 5.374C6.25 14.977 6.124 15 6 15z"),e(s,"fill","#5DADEC"),e(s,"d","M24 16h4v19l-4-.046V16zM8 35l4-.046V16H8v19z"),e(a,"fill","#664500"),e(a,"d","M14.999 18c-.15 0-.303-.034-.446-.105-3.512-1.756-7.07-.018-7.105 0-.495.249-1.095.046-1.342-.447-.247-.494-.047-1.095.447-1.342.182-.09 4.498-2.197 8.895 0 .494.247.694.848.447 1.342-.176.35-.529.552-.896.552zm14 0c-.15 0-.303-.034-.446-.105-3.513-1.756-7.07-.018-7.105 0-.494.248-1.094.047-1.342-.447-.247-.494-.047-1.095.447-1.342.182-.09 4.501-2.196 8.895 0 .494.247.694.848.447 1.342-.176.35-.529.552-.896.552z"),e(c,"fill","#5DADEC"),e(c,"cx","18"),e(c,"cy","34"),e(c,"rx","18"),e(c,"ry","2"),e(g,"fill","#E75A70"),e(g,"cx","18"),e(g,"cy","27"),e(g,"rx","3"),e(g,"ry","2"),e(t,"xmlns","http://www.w3.org/2000/svg"),e(t,"viewBox","0 0 36 36"),e(t,"class","h-9 w-8")},m(f,d){x(f,t,d),n(t,l),n(t,r),n(t,s),n(t,a),n(t,c),n(t,g)},d(f){f&&i(t)}}}function vl(o){let t,l,r,s,a,c,g,f,d,p,h,w,$,L,C,j;return{c(){t=m("svg"),l=m("path"),r=m("path"),s=m("path"),a=m("path"),c=m("path"),g=m("path"),f=m("path"),d=m("circle"),p=m("circle"),h=m("circle"),w=m("circle"),$=m("circle"),L=m("circle"),C=m("circle"),j=m("circle"),this.h()},l(H){t=_(H,"svg",{xmlns:!0,viewBox:!0,class:!0});var V=u(t);l=_(V,"path",{fill:!0,d:!0}),u(l).forEach(i),r=_(V,"path",{fill:!0,d:!0}),u(r).forEach(i),s=_(V,"path",{fill:!0,d:!0}),u(s).forEach(i),a=_(V,"path",{fill:!0,d:!0}),u(a).forEach(i),c=_(V,"path",{fill:!0,d:!0}),u(c).forEach(i),g=_(V,"path",{fill:!0,d:!0}),u(g).forEach(i),f=_(V,"path",{fill:!0,d:!0}),u(f).forEach(i),d=_(V,"circle",{fill:!0,cx:!0,cy:!0,r:!0}),u(d).forEach(i),p=_(V,"circle",{fill:!0,cx:!0,cy:!0,r:!0}),u(p).forEach(i),h=_(V,"circle",{fill:!0,cx:!0,cy:!0,r:!0}),u(h).forEach(i),w=_(V,"circle",{fill:!0,cx:!0,cy:!0,r:!0}),u(w).forEach(i),$=_(V,"circle",{fill:!0,cx:!0,cy:!0,r:!0}),u($).forEach(i),L=_(V,"circle",{fill:!0,cx:!0,cy:!0,r:!0}),u(L).forEach(i),C=_(V,"circle",{fill:!0,cx:!0,cy:!0,r:!0}),u(C).forEach(i),j=_(V,"circle",{fill:!0,cx:!0,cy:!0,r:!0}),u(j).forEach(i),V.forEach(i),this.h()},h(){e(l,"fill","#DD2E44"),e(l,"d","M11.626 7.488c-.112.112-.197.247-.268.395l-.008-.008L.134 33.141l.011.011c-.208.403.14 1.223.853 1.937.713.713 1.533 1.061 1.936.853l.01.01L28.21 24.735l-.008-.009c.147-.07.282-.155.395-.269 1.562-1.562-.971-6.627-5.656-11.313-4.687-4.686-9.752-7.218-11.315-5.656z"),e(r,"fill","#EA596E"),e(r,"d","M13 12L.416 32.506l-.282.635.011.011c-.208.403.14 1.223.853 1.937.232.232.473.408.709.557L17 17l-4-5z"),e(s,"fill","#A0041E"),e(s,"d","M23.012 13.066c4.67 4.672 7.263 9.652 5.789 11.124-1.473 1.474-6.453-1.118-11.126-5.788-4.671-4.672-7.263-9.654-5.79-11.127 1.474-1.473 6.454 1.119 11.127 5.791z"),e(a,"fill","#AA8DD8"),e(a,"d","M18.59 13.609c-.199.161-.459.245-.734.215-.868-.094-1.598-.396-2.109-.873-.541-.505-.808-1.183-.735-1.862.128-1.192 1.324-2.286 3.363-2.066.793.085 1.147-.17 1.159-.292.014-.121-.277-.446-1.07-.532-.868-.094-1.598-.396-2.11-.873-.541-.505-.809-1.183-.735-1.862.13-1.192 1.325-2.286 3.362-2.065.578.062.883-.057 1.012-.134.103-.063.144-.123.148-.158.012-.121-.275-.446-1.07-.532-.549-.06-.947-.552-.886-1.102.059-.549.55-.946 1.101-.886 2.037.219 2.973 1.542 2.844 2.735-.13 1.194-1.325 2.286-3.364 2.067-.578-.063-.88.057-1.01.134-.103.062-.145.123-.149.157-.013.122.276.446 1.071.532 2.037.22 2.973 1.542 2.844 2.735-.129 1.192-1.324 2.286-3.362 2.065-.578-.062-.882.058-1.012.134-.104.064-.144.124-.148.158-.013.121.276.446 1.07.532.548.06.947.553.886 1.102-.028.274-.167.511-.366.671z"),e(c,"fill","#77B255"),e(c,"d","M30.661 22.857c1.973-.557 3.334.323 3.658 1.478.324 1.154-.378 2.615-2.35 3.17-.77.216-1.001.584-.97.701.034.118.425.312 1.193.095 1.972-.555 3.333.325 3.657 1.479.326 1.155-.378 2.614-2.351 3.17-.769.216-1.001.585-.967.702.033.117.423.311 1.192.095.53-.149 1.084.16 1.233.691.148.532-.161 1.084-.693 1.234-1.971.555-3.333-.323-3.659-1.479-.324-1.154.379-2.613 2.353-3.169.77-.217 1.001-.584.967-.702-.032-.117-.422-.312-1.19-.096-1.974.556-3.334-.322-3.659-1.479-.325-1.154.378-2.613 2.351-3.17.768-.215.999-.585.967-.701-.034-.118-.423-.312-1.192-.096-.532.15-1.083-.16-1.233-.691-.149-.53.161-1.082.693-1.232z"),e(g,"fill","#AA8DD8"),e(g,"d","M23.001 20.16c-.294 0-.584-.129-.782-.375-.345-.432-.274-1.061.156-1.406.218-.175 5.418-4.259 12.767-3.208.547.078.927.584.849 1.131-.078.546-.58.93-1.132.848-6.493-.922-11.187 2.754-11.233 2.791-.186.148-.406.219-.625.219z"),e(f,"fill","#77B255"),e(f,"d","M5.754 16c-.095 0-.192-.014-.288-.042-.529-.159-.829-.716-.67-1.245 1.133-3.773 2.16-9.794.898-11.364-.141-.178-.354-.353-.842-.316-.938.072-.849 2.051-.848 2.071.042.551-.372 1.031-.922 1.072-.559.034-1.031-.372-1.072-.923-.103-1.379.326-4.035 2.692-4.214 1.056-.08 1.933.287 2.552 1.057 2.371 2.951-.036 11.506-.542 13.192-.13.433-.528.712-.958.712z"),e(d,"fill","#5C913B"),e(d,"cx","25.5"),e(d,"cy","9.5"),e(d,"r","1.5"),e(p,"fill","#9266CC"),e(p,"cx","2"),e(p,"cy","18"),e(p,"r","2"),e(h,"fill","#5C913B"),e(h,"cx","32.5"),e(h,"cy","19.5"),e(h,"r","1.5"),e(w,"fill","#5C913B"),e(w,"cx","23.5"),e(w,"cy","31.5"),e(w,"r","1.5"),e($,"fill","#FFCC4D"),e($,"cx","28"),e($,"cy","4"),e($,"r","2"),e(L,"fill","#FFCC4D"),e(L,"cx","32.5"),e(L,"cy","8.5"),e(L,"r","1.5"),e(C,"fill","#FFCC4D"),e(C,"cx","29.5"),e(C,"cy","12.5"),e(C,"r","1.5"),e(j,"fill","#FFCC4D"),e(j,"cx","7.5"),e(j,"cy","23.5"),e(j,"r","1.5"),e(t,"xmlns","http://www.w3.org/2000/svg"),e(t,"viewBox","0 0 36 36"),e(t,"class","h-8 w-8")},m(H,V){x(H,t,V),n(t,l),n(t,r),n(t,s),n(t,a),n(t,c),n(t,g),n(t,f),n(t,d),n(t,p),n(t,h),n(t,w),n(t,$),n(t,L),n(t,C),n(t,j)},d(H){H&&i(t)}}}function gl(o){let t,l,r,s,a,c,g,f,d,p;return{c(){t=k("div"),l=m("svg"),r=m("path"),s=m("circle"),a=m("line"),c=m("line"),g=m("line"),f=M(),d=k("span"),p=G("Update available"),this.h()},l(h){t=b(h,"DIV",{class:!0});var w=u(t);l=_(w,"svg",{xmlns:!0,class:!0,viewBox:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var $=u(l);r=_($,"path",{stroke:!0,d:!0,fill:!0}),u(r).forEach(i),s=_($,"circle",{cx:!0,cy:!0,r:!0}),u(s).forEach(i),a=_($,"line",{x1:!0,y1:!0,x2:!0,y2:!0}),u(a).forEach(i),c=_($,"line",{x1:!0,y1:!0,x2:!0,y2:!0}),u(c).forEach(i),g=_($,"line",{x1:!0,y1:!0,x2:!0,y2:!0}),u(g).forEach(i),$.forEach(i),f=D(w),d=b(w,"SPAN",{class:!0});var L=u(d);p=J(L,"Update available"),L.forEach(i),w.forEach(i),this.h()},h(){e(r,"stroke","none"),e(r,"d","M0 0h24v24H0z"),e(r,"fill","none"),e(s,"cx","12"),e(s,"cy","12"),e(s,"r","9"),e(a,"x1","12"),e(a,"y1","8"),e(a,"x2","8"),e(a,"y2","12"),e(c,"x1","12"),e(c,"y1","8"),e(c,"x2","12"),e(c,"y2","16"),e(g,"x1","16"),e(g,"y1","12"),e(g,"x2","12"),e(g,"y2","8"),e(l,"xmlns","http://www.w3.org/2000/svg"),e(l,"class","h-8 w-8"),e(l,"viewBox","0 0 24 24"),e(l,"stroke-width","1.5"),e(l,"stroke","currentColor"),e(l,"fill","none"),e(l,"stroke-linecap","round"),e(l,"stroke-linejoin","round"),e(d,"class","flex lg:hidden"),e(t,"class","flex items-center justify-center space-x-2")},m(h,w){x(h,t,w),n(t,l),n(l,r),n(l,s),n(l,a),n(l,c),n(l,g),n(t,f),n(t,d),n(d,p)},d(h){h&&i(t)}}}function ml(o){let t,l,r;return{c(){t=m("svg"),l=m("path"),r=m("path"),this.h()},l(s){t=_(s,"svg",{xmlns:!0,class:!0,viewBox:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var a=u(t);l=_(a,"path",{stroke:!0,d:!0,fill:!0}),u(l).forEach(i),r=_(a,"path",{d:!0}),u(r).forEach(i),a.forEach(i),this.h()},h(){e(l,"stroke","none"),e(l,"d","M0 0h24v24H0z"),e(l,"fill","none"),e(r,"d","M19.5 13.572l-7.5 7.428l-7.5 -7.428m0 0a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572"),e(t,"xmlns","http://www.w3.org/2000/svg"),e(t,"class","lds-heart h-8 w-8 mx-auto"),e(t,"viewBox","0 0 24 24"),e(t,"stroke-width","1.5"),e(t,"stroke","currentColor"),e(t,"fill","none"),e(t,"stroke-linecap","round"),e(t,"stroke-linejoin","round")},m(s,a){x(s,t,a),n(t,l),n(t,r)},d(s){s&&i(t)}}}function _l(o){let t;return{c(){t=G("New Version Available!")},l(l){t=J(l,"New Version Available!")},m(l,r){x(l,t,r)},d(l){l&&i(t)}}}function wl(o){let t,l,r=o[2].teamId==="0"&&$r(o);return{c(){t=k("div"),r&&r.c(),this.h()},l(s){t=b(s,"DIV",{class:!0});var a=u(t);r&&r.l(a),a.forEach(i),this.h()},h(){e(t,"class","py-0 lg:py-2")},m(s,a){x(s,t,a),r&&r.m(t,null),l=!0},p(s,[a]){s[2].teamId==="0"?r?(r.p(s,a),a&4&&S(r,1)):(r=$r(s),r.c(),S(r,1),r.m(t,null)):r&&(xt(),F(r,1,1,()=>{r=null}),$t())},i(s){l||(S(r),l=!0)},o(s){F(r),l=!1},d(s){s&&i(t),r&&r.d()}}}function kl(o,t,l){let r,s,a,c,g;Je(o,Qt,p=>l(4,r=p)),Je(o,Xt,p=>l(1,s=p)),Je(o,kr,p=>l(5,a=p)),Je(o,xe,p=>l(2,c=p)),Je(o,rl,p=>l(6,g=p));let f={found:!1,loading:!1,success:null};async function d(){l(0,f.loading=!0,f);try{if(!cl){localStorage.setItem("lastVersion",c.version),await ul("/update",{type:"update",latestVersion:a}),br({message:"Update completed.<br><br>Waiting for the new version to start...",type:"success"});let p=!1,h=0;do{await xr(4e3);try{await Ht("/undead"),p=!0}catch{p=!1}if(p)break;h++}while(!p||h<120);return br({message:"New version reachable. Reloading...",type:"success"}),l(0,f.loading=!1,f),l(0,f.success=!0,f),await xr(3e3),window.location.reload()}}catch(p){return l(0,f.success=!1,f),l(0,f.loading=!1,f),er(p)}}return rr(async()=>{if(c.userId){const p=g.latestVersion;if(c.teamId==="0"){if(r===!0)return;try{ce(Qt,r=!0,r);const h=await Ht("/update");(p||(h==null?void 0:h.isUpdateAvailable))&&(ce(kr,a=p||h.latestVersion,a),p?ce(Xt,s=!0,s):ce(Xt,s=h.isUpdateAvailable,s))}catch(h){return er(h)}finally{ce(Qt,r=!1,r)}}}}),[f,s,c,d]}class Or extends At{constructor(t){super(),Mt(this,t,kl,wl,Dt,{})}}function Ar(o){return Object.prototype.toString.call(o)==="[object Date]"}function tr(o,t){if(o===t||o!==o)return()=>o;const l=typeof o;if(l!==typeof t||Array.isArray(o)!==Array.isArray(t))throw new Error("Cannot interpolate values of different type");if(Array.isArray(o)){const r=t.map((s,a)=>tr(o[a],s));return s=>r.map(a=>a(s))}if(l==="object"){if(!o||!t)throw new Error("Object cannot be null");if(Ar(o)&&Ar(t)){o=o.getTime(),t=t.getTime();const a=t-o;return c=>new Date(o+c*a)}const r=Object.keys(t),s={};return r.forEach(a=>{s[a]=tr(o[a],t[a])}),a=>{const c={};return r.forEach(g=>{c[g]=s[g](a)}),c}}if(l==="number"){const r=t-o;return s=>o+s*r}throw new Error(`Cannot interpolate ${l} values`)}function bl(o,t={}){const l=fl(o);let r,s=o;function a(c,g){if(o==null)return l.set(o=c),Promise.resolve();s=c;let f=r,d=!1,{delay:p=0,duration:h=400,easing:w=Tr,interpolate:$=tr}=wr(wr({},t),g);if(h===0)return f&&(f.abort(),f=null),l.set(o=s),Promise.resolve();const L=Rr()+p;let C;return r=qr(j=>{if(j<L)return!0;d||(C=$(o,c),typeof h=="function"&&(h=h(o,c)),d=!0),f&&(f.abort(),f=null);const H=j-L;return H>h?(l.set(o=c),!1):(l.set(o=C(w(H/h))),!0)}),r.promise}return{set:a,update:(c,g)=>a(c(s,o),g),subscribe:l.subscribe}}function El(o){let t,l,r;return{c(){t=k("div"),l=k("div"),this.h()},l(s){t=b(s,"DIV",{class:!0});var a=u(t);l=b(a,"DIV",{class:!0,style:!0}),u(l).forEach(i),a.forEach(i),this.h()},h(){e(l,"class","progress-sliver svelte-138tt74"),e(l,"style",r=`--width: ${o[0]*100}%`),e(t,"class","progress-bar svelte-138tt74")},m(s,a){x(s,t,a),n(t,l)},p(s,[a]){a&1&&r!==(r=`--width: ${s[0]*100}%`)&&e(l,"style",r)},i:Wt,o:Wt,d(s){s&&i(t)}}}function yl(o,t,l){let r,s;const a=bl(0,{duration:2e3,easing:hl});return Je(o,a,c=>l(0,r=c)),rr(()=>{s=setTimeout(()=>{a.set(.7)},500)}),Kr(()=>{clearTimeout(s)}),[r,a]}class xl extends At{constructor(t){super(),Mt(this,t,yl,El,Dt,{})}}function $l(o){let t,l;return{c(){t=m("svg"),l=m("path"),this.h()},l(r){t=_(r,"svg",{xmlns:!0,fill:!0,viewBox:!0,class:!0});var s=u(t);l=_(s,"path",{"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-width":!0,d:!0}),u(l).forEach(i),s.forEach(i),this.h()},h(){e(l,"stroke-linecap","round"),e(l,"stroke-linejoin","round"),e(l,"stroke-width","2"),e(l,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),e(t,"xmlns","http://www.w3.org/2000/svg"),e(t,"fill","none"),e(t,"viewBox","0 0 24 24"),e(t,"class","stroke-current flex-shrink-0 w-6 h-6")},m(r,s){x(r,t,s),n(t,l)},d(r){r&&i(t)}}}function Il(o){let t,l;return{c(){t=m("svg"),l=m("path"),this.h()},l(r){t=_(r,"svg",{xmlns:!0,class:!0,fill:!0,viewBox:!0});var s=u(t);l=_(s,"path",{"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-width":!0,d:!0}),u(l).forEach(i),s.forEach(i),this.h()},h(){e(l,"stroke-linecap","round"),e(l,"stroke-linejoin","round"),e(l,"stroke-width","2"),e(l,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),e(t,"xmlns","http://www.w3.org/2000/svg"),e(t,"class","stroke-current flex-shrink-0 h-6 w-6"),e(t,"fill","none"),e(t,"viewBox","0 0 24 24")},m(r,s){x(r,t,s),n(t,l)},d(r){r&&i(t)}}}function Al(o){let t,l;return{c(){t=m("svg"),l=m("path"),this.h()},l(r){t=_(r,"svg",{xmlns:!0,class:!0,fill:!0,viewBox:!0});var s=u(t);l=_(s,"path",{"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-width":!0,d:!0}),u(l).forEach(i),s.forEach(i),this.h()},h(){e(l,"stroke-linecap","round"),e(l,"stroke-linejoin","round"),e(l,"stroke-width","2"),e(l,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),e(t,"xmlns","http://www.w3.org/2000/svg"),e(t,"class","stroke-current flex-shrink-0 h-6 w-6"),e(t,"fill","none"),e(t,"viewBox","0 0 24 24")},m(r,s){x(r,t,s),n(t,l)},d(r){r&&i(t)}}}function Ml(o){let t,l,r,s,a;function c(h,w){if(h[0]==="success")return Al;if(h[0]==="error")return Il;if(h[0]==="info")return $l}let g=c(o),f=g&&g(o);const d=o[4].default,p=Wr(d,o,o[3],null);return{c(){t=k("div"),f&&f.c(),l=M(),p&&p.c(),this.h()},l(h){t=b(h,"DIV",{class:!0});var w=u(t);f&&f.l(w),l=D(w),p&&p.l(w),w.forEach(i),this.h()},h(){e(t,"class",` flex flex-row justify-center alert shadow-lg text-white hover:scale-105 transition-all duration-100 cursor-pointer rounded ${o[2]()}`),B(t,"alert-error",o[0]==="error"),B(t,"alert-info",o[0]==="info")},m(h,w){x(h,t,w),f&&f.m(t,null),n(t,l),p&&p.m(t,null),r=!0,s||(a=[ze(t,"click",o[5]),ze(t,"mouseover",o[6]),ze(t,"focus",o[7]),ze(t,"mouseout",o[8]),ze(t,"blur",o[9])],s=!0)},p(h,[w]){g!==(g=c(h))&&(f&&f.d(1),f=g&&g(h),f&&(f.c(),f.m(t,l))),p&&p.p&&(!r||w&8)&&Hr(p,d,h,h[3],r?Fr(d,h[3],w,null):Pr(h[3]),null),(!r||w&1)&&B(t,"alert-error",h[0]==="error"),(!r||w&1)&&B(t,"alert-info",h[0]==="info")},i(h){r||(S(p,h),r=!0)},o(h){F(p,h),r=!1},d(h){h&&i(t),f&&f.d(),p&&p.d(h),s=!1,Ur(a)}}}function Dl(o,t,l){let{$$slots:r={},$$scope:s}=t;const a=Gr();let{type:c="info"}=t;function g(){if(c==="success")return"bg-dark lg:bg-primary"}const f=()=>a("click"),d=()=>a("pause"),p=()=>a("pause"),h=()=>a("resume"),w=()=>a("resume");return o.$$set=$=>{"type"in $&&l(0,c=$.type),"$$scope"in $&&l(3,s=$.$$scope)},[c,a,g,s,r,f,d,p,h,w]}class Bl extends At{constructor(t){super(),Mt(this,t,Dl,Ml,Dt,{type:0})}}function Mr(o,t,l){const r=o.slice();return r[4]=t[l],r}function Dr(o){let t,l,r=[],s=new Map,a,c=o[0];const g=f=>f[4].id;for(let f=0;f<c.length;f+=1){let d=Mr(o,c,f),p=g(d);s.set(p,r[f]=Br(p,d))}return{c(){t=k("section"),l=k("article");for(let f=0;f<r.length;f+=1)r[f].c();this.h()},l(f){t=b(f,"SECTION",{class:!0});var d=u(t);l=b(d,"ARTICLE",{class:!0,role:!0});var p=u(l);for(let h=0;h<r.length;h+=1)r[h].l(p);p.forEach(i),d.forEach(i),this.h()},h(){e(l,"class","toast toast-top toast-center rounded-none w-2/3 lg:w-[20rem]"),e(l,"role","alert"),e(t,"class","svelte-1n5mq1c")},m(f,d){x(f,t,d),n(t,l);for(let p=0;p<r.length;p+=1)r[p].m(l,null);a=!0},p(f,d){d&1&&(c=f[0],xt(),r=Jr(r,d,g,1,f,c,s,l,Qr,Br,null,Mr),$t())},i(f){if(!a){for(let d=0;d<c.length;d+=1)S(r[d]);a=!0}},o(f){for(let d=0;d<r.length;d+=1)F(r[d]);a=!1},d(f){f&&i(t);for(let d=0;d<r.length;d+=1)r[d].d()}}}function Ll(o){let t,l=o[4].message+"",r;return{c(){t=new Xr(!1),r=Se(),this.h()},l(s){t=Yr(s,!1),r=Se(),this.h()},h(){t.a=r},m(s,a){t.m(l,s,a),x(s,r,a)},p(s,a){a&1&&l!==(l=s[4].message+"")&&t.p(l)},d(s){s&&i(r),s&&t.d()}}}function Br(o,t){let l,r,s;function a(){return t[1](t[4])}function c(){return t[2](t[4])}function g(){return t[3](t[4])}return r=new Bl({props:{type:t[4].type,$$slots:{default:[Ll]},$$scope:{ctx:t}}}),r.$on("resume",a),r.$on("pause",c),r.$on("click",g),{key:o,first:null,c(){l=Se(),Re(r.$$.fragment),this.h()},l(f){l=Se(),qe(r.$$.fragment,f),this.h()},h(){this.first=l},m(f,d){x(f,l,d),Ke(r,f,d),s=!0},p(f,d){t=f;const p={};d&1&&(p.type=t[4].type),d&129&&(p.$$scope={dirty:d,ctx:t}),r.$set(p)},i(f){s||(S(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&i(l),Ge(r,f)}}}function Cl(o){let t,l,r=o[0].length>0&&Dr(o);return{c(){r&&r.c(),t=Se()},l(s){r&&r.l(s),t=Se()},m(s,a){r&&r.m(s,a),x(s,t,a),l=!0},p(s,[a]){s[0].length>0?r?(r.p(s,a),a&1&&S(r,1)):(r=Dr(s),r.c(),S(r,1),r.m(t.parentNode,t)):r&&(xt(),F(r,1,1,()=>{r=null}),$t())},i(s){l||(S(r),l=!0)},o(s){F(r),l=!1},d(s){r&&r.d(s),s&&i(t)}}}function jl(o,t,l){let r;return Je(o,ll,g=>l(0,r=g)),[r,g=>sl(g.id),g=>il(g.id),g=>al(g.id)]}class Vl extends At{constructor(t){super(),Mt(this,t,jl,Cl,Dt,{})}}function zl(o){let t,l,r;return{c(){t=M(),l=k("link"),this.h()},l(s){t=D(s),l=b(s,"LINK",{rel:!0,href:!0}),this.h()},h(){document.title="Coolify",e(l,"rel","icon"),e(l,"href",r=o[2].whiteLabeledDetails.icon)},m(s,a){x(s,t,a),x(s,l,a)},p(s,a){a&4&&r!==(r=s[2].whiteLabeledDetails.icon)&&e(l,"href",r)},d(s){s&&i(t),s&&i(l)}}}function Sl(o){let t,l;return{c(){t=M(),l=k("link"),this.h()},l(r){t=D(r),l=b(r,"LINK",{rel:!0,href:!0}),this.h()},h(){document.title="Coolify",e(l,"rel","icon"),e(l,"href","/favicon.png")},m(r,s){x(r,t,s),x(r,l,s)},p:Wt,d(r){r&&i(t),r&&i(l)}}}function Lr(o){let t,l,r,s;return l=new xl({}),{c(){t=k("div"),Re(l.$$.fragment)},l(a){t=b(a,"DIV",{});var c=u(t);qe(l.$$.fragment,c),c.forEach(i)},m(a,c){x(a,t,c),Ke(l,t,null),s=!0},i(a){s||(S(l.$$.fragment,a),r&&r.end(1),s=!0)},o(a){F(l.$$.fragment,a),r=el(t,dl,{delay:100}),s=!1},d(a){a&&i(t),Ge(l),a&&r&&r.end()}}}function Cr(o){let t,l,r,s,a,c,g,f,d,p,h,w,$,L,C,j,H,V,Ne,I,Qe,me,Te,We,He,Ce,Q,le,A,$e,se,X,Ie,Pe,Xe,ct,fe,Y,Z,U,_e,be,Ae,ie,ee,Fe,ft,Ee,z,P,Me,De,st,je,he,ht,it=o[2].version+"",Ye,ae,te,ye,R,Ue,pt;t=new yt({props:{triggeredBy:"#dashboard",placement:"right",color:"bg-pink-500",$$slots:{default:[Nl]},$$scope:{ctx:o}}}),r=new yt({props:{triggeredBy:"#servers",placement:"right",color:"bg-sky-500",$$slots:{default:[Tl]},$$scope:{ctx:o}}}),a=new yt({props:{triggeredBy:"#iam",placement:"right",color:"bg-iam",$$slots:{default:[Wl]},$$scope:{ctx:o}}}),g=new yt({props:{triggeredBy:"#settings",placement:"right",color:"bg-settings text-black",$$slots:{default:[Hl]},$$scope:{ctx:o}}}),d=new yt({props:{triggeredBy:"#logout",placement:"right",color:"bg-red-600",$$slots:{default:[Pl]},$$scope:{ctx:o}}});function dt(v,y){if(!v[2].whiteLabeled)return Ul;if(v[2].whiteLabeledDetails.icon)return Fl}let Ze=dt(o),q=Ze&&Ze(o),W=o[2].teamId==="0"&&jr(o);He=new Or({});let N=o[2].pendingInvitations.length>0&&Vr(o),O=o[2].whiteLabeled&&zr();return{c(){Re(t.$$.fragment),l=M(),Re(r.$$.fragment),s=M(),Re(a.$$.fragment),c=M(),Re(g.$$.fragment),f=M(),Re(d.$$.fragment),p=M(),h=k("nav"),w=k("div"),q&&q.c(),$=M(),L=k("div"),C=k("a"),j=m("svg"),H=m("path"),V=m("path"),Ne=m("path"),I=M(),W&&W.c(),Qe=M(),me=k("div"),Te=M(),We=k("div"),Re(He.$$.fragment),Ce=M(),Q=k("div"),le=k("a"),N&&N.c(),A=m("svg"),$e=m("path"),se=m("circle"),X=m("path"),Ie=m("path"),Pe=m("path"),ct=M(),fe=k("a"),Y=m("svg"),Z=m("path"),U=m("path"),_e=m("circle"),Ae=M(),ie=k("a"),ee=m("svg"),Fe=m("path"),ft=M(),Ee=k("div"),z=m("svg"),P=m("path"),Me=m("path"),De=m("path"),st=M(),je=k("div"),he=k("a"),ht=G("v"),Ye=G(it),te=M(),O&&O.c(),ye=Se(),this.h()},l(v){qe(t.$$.fragment,v),l=D(v),qe(r.$$.fragment,v),s=D(v),qe(a.$$.fragment,v),c=D(v),qe(g.$$.fragment,v),f=D(v),qe(d.$$.fragment,v),p=D(v),h=b(v,"NAV",{class:!0});var y=u(h);w=b(y,"DIV",{class:!0});var oe=u(w);q&&q.l(oe),$=D(oe),L=b(oe,"DIV",{class:!0});var Oe=u(L);C=b(Oe,"A",{id:!0,href:!0,class:!0});var Ve=u(C);j=_(Ve,"svg",{xmlns:!0,class:!0,viewBox:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var we=u(j);H=_(we,"path",{stroke:!0,d:!0,fill:!0}),u(H).forEach(i),V=_(we,"path",{d:!0}),u(V).forEach(i),Ne=_(we,"path",{d:!0}),u(Ne).forEach(i),we.forEach(i),Ve.forEach(i),I=D(Oe),W&&W.l(Oe),Oe.forEach(i),Qe=D(oe),me=b(oe,"DIV",{class:!0}),u(me).forEach(i),Te=D(oe),We=b(oe,"DIV",{class:!0});var at=u(We);qe(He.$$.fragment,at),at.forEach(i),Ce=D(oe),Q=b(oe,"DIV",{class:!0});var de=u(Q);le=b(de,"A",{id:!0,href:!0,class:!0});var Be=u(le);N&&N.l(Be),A=_(Be,"svg",{xmlns:!0,viewBox:!0,class:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var K=u(A);$e=_(K,"path",{stroke:!0,d:!0,fill:!0}),u($e).forEach(i),se=_(K,"circle",{cx:!0,cy:!0,r:!0}),u(se).forEach(i),X=_(K,"path",{d:!0}),u(X).forEach(i),Ie=_(K,"path",{d:!0}),u(Ie).forEach(i),Pe=_(K,"path",{d:!0}),u(Pe).forEach(i),K.forEach(i),Be.forEach(i),ct=D(de),fe=b(de,"A",{id:!0,href:!0,class:!0});var et=u(fe);Y=_(et,"svg",{xmlns:!0,viewBox:!0,class:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var tt=u(Y);Z=_(tt,"path",{stroke:!0,d:!0,fill:!0}),u(Z).forEach(i),U=_(tt,"path",{d:!0}),u(U).forEach(i),_e=_(tt,"circle",{cx:!0,cy:!0,r:!0}),u(_e).forEach(i),tt.forEach(i),et.forEach(i),Ae=D(de),ie=b(de,"A",{id:!0,href:!0,target:!0,rel:!0,class:!0});var nt=u(ie);ee=_(nt,"svg",{xmlns:!0,fill:!0,viewBox:!0,"stroke-width":!0,stroke:!0,class:!0});var vt=u(ee);Fe=_(vt,"path",{"stroke-linecap":!0,"stroke-linejoin":!0,d:!0}),u(Fe).forEach(i),vt.forEach(i),nt.forEach(i),ft=D(de),Ee=b(de,"DIV",{id:!0,class:!0});var ot=u(Ee);z=_(ot,"svg",{xmlns:!0,class:!0,viewBox:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var ut=u(z);P=_(ut,"path",{stroke:!0,d:!0,fill:!0}),u(P).forEach(i),Me=_(ut,"path",{d:!0}),u(Me).forEach(i),De=_(ut,"path",{d:!0}),u(De).forEach(i),ut.forEach(i),ot.forEach(i),st=D(de),je=b(de,"DIV",{class:!0});var gt=u(je);he=b(gt,"A",{class:!0,href:!0,target:!0});var rt=u(he);ht=J(rt,"v"),Ye=J(rt,it),rt.forEach(i),gt.forEach(i),de.forEach(i),oe.forEach(i),y.forEach(i),te=D(v),O&&O.l(v),ye=Se(),this.h()},h(){e(H,"stroke","none"),e(H,"d","M0 0h24v24H0z"),e(H,"fill","none"),e(V,"d","M19 8.71l-5.333 -4.148a2.666 2.666 0 0 0 -3.274 0l-5.334 4.148a2.665 2.665 0 0 0 -1.029 2.105v7.2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-7.2c0 -.823 -.38 -1.6 -1.03 -2.105"),e(Ne,"d","M16 15c-2.21 1.333 -5.792 1.333 -8 0"),e(j,"xmlns","http://www.w3.org/2000/svg"),e(j,"class","h-9 w-9"),e(j,"viewBox","0 0 24 24"),e(j,"stroke-width","1.5"),e(j,"stroke","currentColor"),e(j,"fill","none"),e(j,"stroke-linecap","round"),e(j,"stroke-linejoin","round"),e(C,"id","dashboard"),e(C,"href","/"),e(C,"class","icons hover:text-pink-500"),B(C,"text-pink-500",o[4].url.pathname==="/"),B(C,"bg-coolgray-500",o[4].url.pathname==="/"),B(C,"bg-coolgray-200",o[4].url.pathname!=="/"),e(L,"class","flex flex-col space-y-2 py-2"),B(L,"mt-2",o[2].whiteLabeled),e(me,"class","flex-1"),e(We,"class","lg:block hidden"),e($e,"stroke","none"),e($e,"d","M0 0h24v24H0z"),e($e,"fill","none"),e(se,"cx","9"),e(se,"cy","7"),e(se,"r","4"),e(X,"d","M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"),e(Ie,"d","M16 3.13a4 4 0 0 1 0 7.75"),e(Pe,"d","M21 21v-2a4 4 0 0 0 -3 -3.85"),e(A,"xmlns","http://www.w3.org/2000/svg"),e(A,"viewBox","0 0 24 24"),e(A,"class","h-9 w-9"),e(A,"stroke-width","1.5"),e(A,"stroke","currentColor"),e(A,"fill","none"),e(A,"stroke-linecap","round"),e(A,"stroke-linejoin","round"),e(le,"id","iam"),e(le,"href",Xe=o[2].pendingInvitations.length>0?"/iam/pending":"/iam"),e(le,"class","icons hover:text-iam indicator"),B(le,"text-iam",o[4].url.pathname.startsWith("/iam")),B(le,"bg-coolgray-500",o[4].url.pathname.startsWith("/iam")),e(Z,"stroke","none"),e(Z,"d","M0 0h24v24H0z"),e(Z,"fill","none"),e(U,"d","M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"),e(_e,"cx","12"),e(_e,"cy","12"),e(_e,"r","3"),e(Y,"xmlns","http://www.w3.org/2000/svg"),e(Y,"viewBox","0 0 24 24"),e(Y,"class","h-9 w-9"),e(Y,"stroke-width","1.5"),e(Y,"stroke","currentColor"),e(Y,"fill","none"),e(Y,"stroke-linecap","round"),e(Y,"stroke-linejoin","round"),e(fe,"id","settings"),e(fe,"href",be=o[2].teamId==="0"?"/settings/coolify":"/settings/docker"),e(fe,"class","icons hover:text-settings"),B(fe,"text-settings",o[4].url.pathname.startsWith("/settings")),B(fe,"bg-coolgray-500",o[4].url.pathname.startsWith("/settings")),e(Fe,"stroke-linecap","round"),e(Fe,"stroke-linejoin","round"),e(Fe,"d","M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25"),e(ee,"xmlns","http://www.w3.org/2000/svg"),e(ee,"fill","none"),e(ee,"viewBox","0 0 24 24"),e(ee,"stroke-width","1.5"),e(ee,"stroke","currentColor"),e(ee,"class","w-9 h-9"),e(ie,"id","documentation"),e(ie,"href","https://docs.coollabs.io/coolify-v3/"),e(ie,"target","_blank"),e(ie,"rel","noreferrer external"),e(ie,"class","icons hover:text-info"),e(P,"stroke","none"),e(P,"d","M0 0h24v24H0z"),e(P,"fill","none"),e(Me,"d","M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"),e(De,"d","M7 12h14l-3 -3m0 6l3 -3"),e(z,"xmlns","http://www.w3.org/2000/svg"),e(z,"class","ml-1 h-8 w-8"),e(z,"viewBox","0 0 24 24"),e(z,"stroke-width","1.5"),e(z,"stroke","currentColor"),e(z,"fill","none"),e(z,"stroke-linecap","round"),e(z,"stroke-linejoin","round"),e(Ee,"id","logout"),e(Ee,"class","icons bg-coolgray-200 hover:text-error cursor-pointer"),e(he,"class","text-[10px] no-underline"),e(he,"href",ae=`https://github.com/coollabsio/coolify/releases/tag/v${o[2].version}`),e(he,"target","_blank noreferrer"),e(je,"class","w-full text-center font-bold text-stone-400 hover:bg-coolgray-200 hover:text-white"),e(Q,"class","flex flex-col space-y-2 py-2"),e(w,"class","flex h-screen w-full flex-col items-center transition-all duration-100"),e(h,"class","nav-main hidden lg:block z-20")},m(v,y){Ke(t,v,y),x(v,l,y),Ke(r,v,y),x(v,s,y),Ke(a,v,y),x(v,c,y),Ke(g,v,y),x(v,f,y),Ke(d,v,y),x(v,p,y),x(v,h,y),n(h,w),q&&q.m(w,null),n(w,$),n(w,L),n(L,C),n(C,j),n(j,H),n(j,V),n(j,Ne),n(L,I),W&&W.m(L,null),n(w,Qe),n(w,me),n(w,Te),n(w,We),Ke(He,We,null),n(w,Ce),n(w,Q),n(Q,le),N&&N.m(le,null),n(le,A),n(A,$e),n(A,se),n(A,X),n(A,Ie),n(A,Pe),n(Q,ct),n(Q,fe),n(fe,Y),n(Y,Z),n(Y,U),n(Y,_e),n(Q,Ae),n(Q,ie),n(ie,ee),n(ee,Fe),n(Q,ft),n(Q,Ee),n(Ee,z),n(z,P),n(z,Me),n(z,De),n(Q,st),n(Q,je),n(je,he),n(he,ht),n(he,Ye),x(v,te,y),O&&O.m(v,y),x(v,ye,y),R=!0,Ue||(pt=ze(Ee,"click",o[5]),Ue=!0)},p(v,y){const oe={};y&32768&&(oe.$$scope={dirty:y,ctx:v}),t.$set(oe);const Oe={};y&32768&&(Oe.$$scope={dirty:y,ctx:v}),r.$set(Oe);const Ve={};y&32768&&(Ve.$$scope={dirty:y,ctx:v}),a.$set(Ve);const we={};y&32768&&(we.$$scope={dirty:y,ctx:v}),g.$set(we);const at={};y&32768&&(at.$$scope={dirty:y,ctx:v}),d.$set(at),Ze===(Ze=dt(v))&&q?q.p(v,y):(q&&q.d(1),q=Ze&&Ze(v),q&&(q.c(),q.m(w,$))),(!R||y&16)&&B(C,"text-pink-500",v[4].url.pathname==="/"),(!R||y&16)&&B(C,"bg-coolgray-500",v[4].url.pathname==="/"),(!R||y&16)&&B(C,"bg-coolgray-200",v[4].url.pathname!=="/"),v[2].teamId==="0"?W?W.p(v,y):(W=jr(v),W.c(),W.m(L,null)):W&&(W.d(1),W=null),(!R||y&4)&&B(L,"mt-2",v[2].whiteLabeled),v[2].pendingInvitations.length>0?N?N.p(v,y):(N=Vr(v),N.c(),N.m(le,A)):N&&(N.d(1),N=null),(!R||y&4&&Xe!==(Xe=v[2].pendingInvitations.length>0?"/iam/pending":"/iam"))&&e(le,"href",Xe),(!R||y&16)&&B(le,"text-iam",v[4].url.pathname.startsWith("/iam")),(!R||y&16)&&B(le,"bg-coolgray-500",v[4].url.pathname.startsWith("/iam")),(!R||y&4&&be!==(be=v[2].teamId==="0"?"/settings/coolify":"/settings/docker"))&&e(fe,"href",be),(!R||y&16)&&B(fe,"text-settings",v[4].url.pathname.startsWith("/settings")),(!R||y&16)&&B(fe,"bg-coolgray-500",v[4].url.pathname.startsWith("/settings")),(!R||y&4)&&it!==(it=v[2].version+"")&&Pt(Ye,it),(!R||y&4&&ae!==(ae=`https://github.com/coollabsio/coolify/releases/tag/v${v[2].version}`))&&e(he,"href",ae),v[2].whiteLabeled?O||(O=zr(),O.c(),O.m(ye.parentNode,ye)):O&&(O.d(1),O=null)},i(v){R||(S(t.$$.fragment,v),S(r.$$.fragment,v),S(a.$$.fragment,v),S(g.$$.fragment,v),S(d.$$.fragment,v),S(He.$$.fragment,v),R=!0)},o(v){F(t.$$.fragment,v),F(r.$$.fragment,v),F(a.$$.fragment,v),F(g.$$.fragment,v),F(d.$$.fragment,v),F(He.$$.fragment,v),R=!1},d(v){Ge(t,v),v&&i(l),Ge(r,v),v&&i(s),Ge(a,v),v&&i(c),Ge(g,v),v&&i(f),Ge(d,v),v&&i(p),v&&i(h),q&&q.d(),W&&W.d(),Ge(He),N&&N.d(),v&&i(te),O&&O.d(v),v&&i(ye),Ue=!1,pt()}}}function Nl(o){let t;return{c(){t=G("Dashboard")},l(l){t=J(l,"Dashboard")},m(l,r){x(l,t,r)},d(l){l&&i(t)}}}function Tl(o){let t;return{c(){t=G("Servers")},l(l){t=J(l,"Servers")},m(l,r){x(l,t,r)},d(l){l&&i(t)}}}function Wl(o){let t;return{c(){t=G("IAM")},l(l){t=J(l,"IAM")},m(l,r){x(l,t,r)},d(l){l&&i(t)}}}function Hl(o){let t;return{c(){t=G("Settings")},l(l){t=J(l,"Settings")},m(l,r){x(l,t,r)},d(l){l&&i(t)}}}function Pl(o){let t;return{c(){t=G("Logout")},l(l){t=J(l,"Logout")},m(l,r){x(l,t,r)},d(l){l&&i(t)}}}function Fl(o){let t,l,r;return{c(){t=k("div"),l=k("img"),this.h()},l(s){t=b(s,"DIV",{class:!0});var a=u(t);l=b(a,"IMG",{src:!0,alt:!0}),a.forEach(i),this.h()},h(){Yt(l.src,r=o[2].whiteLabeledDetails.icon)||e(l,"src",r),e(l,"alt","White labeled logo"),e(t,"class","mb-2 mt-4 h-10 w-10")},m(s,a){x(s,t,a),n(t,l)},p(s,a){a&4&&!Yt(l.src,r=s[2].whiteLabeledDetails.icon)&&e(l,"src",r)},d(s){s&&i(t)}}}function Ul(o){let t,l,r;return{c(){t=k("div"),l=k("img"),this.h()},l(s){t=b(s,"DIV",{class:!0});var a=u(t);l=b(a,"IMG",{src:!0,alt:!0}),a.forEach(i),this.h()},h(){Yt(l.src,r="/favicon.png")||e(l,"src",r),e(l,"alt","coolLabs logo"),e(t,"class","mb-2 mt-4 h-10 w-10")},m(s,a){x(s,t,a),n(t,l)},p:Wt,d(s){s&&i(t)}}}function jr(o){let t,l,r,s,a,c,g;return{c(){t=k("a"),l=m("svg"),r=m("path"),s=m("rect"),a=m("rect"),c=m("line"),g=m("line"),this.h()},l(f){t=b(f,"A",{id:!0,href:!0,class:!0});var d=u(t);l=_(d,"svg",{xmlns:!0,class:!0,viewBox:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var p=u(l);r=_(p,"path",{stroke:!0,d:!0,fill:!0}),u(r).forEach(i),s=_(p,"rect",{x:!0,y:!0,width:!0,height:!0,rx:!0}),u(s).forEach(i),a=_(p,"rect",{x:!0,y:!0,width:!0,height:!0,rx:!0}),u(a).forEach(i),c=_(p,"line",{x1:!0,y1:!0,x2:!0,y2:!0}),u(c).forEach(i),g=_(p,"line",{x1:!0,y1:!0,x2:!0,y2:!0}),u(g).forEach(i),p.forEach(i),d.forEach(i),this.h()},h(){e(r,"stroke","none"),e(r,"d","M0 0h24v24H0z"),e(r,"fill","none"),e(s,"x","3"),e(s,"y","4"),e(s,"width","18"),e(s,"height","8"),e(s,"rx","3"),e(a,"x","3"),e(a,"y","12"),e(a,"width","18"),e(a,"height","8"),e(a,"rx","3"),e(c,"x1","7"),e(c,"y1","8"),e(c,"x2","7"),e(c,"y2","8.01"),e(g,"x1","7"),e(g,"y1","16"),e(g,"x2","7"),e(g,"y2","16.01"),e(l,"xmlns","http://www.w3.org/2000/svg"),e(l,"class","w-8 h-8 mx-auto"),e(l,"viewBox","0 0 24 24"),e(l,"stroke-width","1.5"),e(l,"stroke","currentColor"),e(l,"fill","none"),e(l,"stroke-linecap","round"),e(l,"stroke-linejoin","round"),e(t,"id","servers"),e(t,"href","/servers"),e(t,"class","icons hover:text-sky-500"),B(t,"text-sky-500",o[4].url.pathname==="/servers"),B(t,"bg-coolgray-500",o[4].url.pathname==="/servers"),B(t,"bg-coolgray-200",o[4].url.pathname!=="/servers")},m(f,d){x(f,t,d),n(t,l),n(l,r),n(l,s),n(l,a),n(l,c),n(l,g)},p(f,d){d&16&&B(t,"text-sky-500",f[4].url.pathname==="/servers"),d&16&&B(t,"bg-coolgray-500",f[4].url.pathname==="/servers"),d&16&&B(t,"bg-coolgray-200",f[4].url.pathname!=="/servers")},d(f){f&&i(t)}}}function Vr(o){let t,l=o[0].length+"",r,s;return{c(){t=k("span"),r=G(l),s=M(),this.h()},l(a){t=b(a,"SPAN",{class:!0});var c=u(t);r=J(c,l),c.forEach(i),s=D(a),this.h()},h(){e(t,"class","indicator-item rounded-full badge badge-primary mr-2")},m(a,c){x(a,t,c),n(t,r),x(a,s,c)},p(a,c){c&1&&l!==(l=a[0].length+"")&&Pt(r,l)},d(a){a&&i(t),a&&i(s)}}}function zr(o){let t,l,r,s;return{c(){t=k("span"),l=G("Powered by "),r=k("a"),s=G("Coolify"),this.h()},l(a){t=b(a,"SPAN",{class:!0});var c=u(t);l=J(c,"Powered by "),r=b(c,"A",{href:!0,target:!0});var g=u(r);s=J(g,"Coolify"),g.forEach(i),c.forEach(i),this.h()},h(){e(r,"href","https://coolify.io"),e(r,"target","_blank noreferrer"),e(t,"class","fixed bottom-0 left-[50px] z-50 m-2 px-4 text-xs text-stone-700")},m(a,c){x(a,t,c),n(t,l),n(t,r),n(r,s)},d(a){a&&i(t)}}}function Sr(o){let t,l;return{c(){t=k("h3"),l=G("Coolify"),this.h()},l(r){t=b(r,"H3",{class:!0});var s=u(t);l=J(s,"Coolify"),s.forEach(i),this.h()},h(){e(t,"class","mb-0 text-white")},m(r,s){x(r,t,s),n(t,l)},d(r){r&&i(t)}}}function Nr(o){let t,l=o[0].length+"",r;return{c(){t=k("span"),r=G(l),this.h()},l(s){t=b(s,"SPAN",{class:!0});var a=u(t);r=J(a,l),a.forEach(i),this.h()},h(){e(t,"class","indicator-item rounded-full badge badge-primary")},m(s,a){x(s,t,a),n(t,r)},p(s,a){a&1&&l!==(l=s[0].length+"")&&Pt(r,l)},d(s){s&&i(t)}}}function Ol(o){let t,l,r,s,a,c,g,f,d,p,h,w,$,L,C,j,H,V,Ne,I,Qe,me,Te,We,He,Ce,Q,le,A,$e,se,X,Ie,Pe,Xe,ct,fe,Y,Z,U,_e,be,Ae,ie,ee,Fe,ft,Ee,z,P,Me,De,st,je,he,ht,it,Ye,ae,te,ye,R,Ue,pt,dt,Ze,q,W,N,O,v,y,oe,Oe,Ve,we,at,de,Be,K,et,tt,nt,vt,ot,ut,gt,rt,lt,Ft,It=o[2].version+"",Bt,Lt,pe,Ut,lr;function sr(E,T){if(!E[2].whiteLabeled)return Sl;if(E[2].whiteLabeledDetails.icon)return zl}let mt=sr(o),ve=mt&&mt(o);r=new Vl({});let ne=o[3]&&Lr(),re=o[2].userId&&Cr(o),ke=!o[2].whiteLabeled&&Sr();const Ot=o[13].default,Le=Wr(Ot,o,o[15],null);let ge=o[2].pendingInvitations.length>0&&Nr(o);return we=new Or({}),{c(){ve&&ve.c(),t=Se(),l=M(),Re(r.$$.fragment),s=M(),ne&&ne.c(),a=M(),c=k("div"),g=k("input"),f=M(),d=k("div"),re&&re.c(),p=M(),h=k("div"),w=k("div"),$=k("label"),L=k("span"),C=M(),j=k("span"),H=M(),V=k("span"),Ne=M(),I=k("div"),ke&&ke.c(),Qe=M(),me=k("main"),Te=k("div"),Le&&Le.c(),He=M(),Ce=k("div"),Q=k("label"),le=M(),A=k("ul"),$e=k("li"),se=k("a"),X=m("svg"),Ie=m("path"),Pe=m("path"),Xe=m("path"),ct=G(` Dashboard`),fe=M(),Y=k("li"),Z=k("a"),U=m("svg"),_e=m("path"),be=m("rect"),Ae=m("rect"),ie=m("line"),ee=m("line"),Fe=G(` Servers`),ft=M(),Ee=k("li"),z=k("a"),P=m("svg"),Me=m("path"),De=m("circle"),st=m("path"),je=m("path"),he=m("path"),ht=G(` IAM `),ge&&ge.c(),it=M(),Ye=k("li"),ae=k("a"),te=m("svg"),ye=m("path"),R=m("path"),Ue=m("circle"),pt=G(` Settings`),Ze=M(),q=k("li"),W=k("a"),N=m("svg"),O=m("path"),v=G(` Documentation`),y=M(),oe=k("li"),Oe=M(),Ve=k("div"),Re(we.$$.fragment),at=M(),de=k("li"),Be=k("div"),K=m("svg"),et=m("path"),tt=m("path"),nt=m("path"),vt=M(),ot=k("div"),ut=G("Logout"),gt=M(),rt=k("li"),lt=k("a"),Ft=G("v"),Bt=G(It),this.h()},l(E){const T=Zr("svelte-1bqq90l",document.head);ve&&ve.l(T),t=Se(),T.forEach(i),l=D(E),qe(r.$$.fragment,E),s=D(E),ne&&ne.l(E),a=D(E),c=b(E,"DIV",{class:!0});var _t=u(c);g=b(_t,"INPUT",{id:!0,type:!0,class:!0}),f=D(_t),d=b(_t,"DIV",{class:!0});var wt=u(d);re&&re.l(wt),p=D(wt),h=b(wt,"DIV",{class:!0});var ir=u(h);w=b(ir,"DIV",{});var Ct=u(w);$=b(Ct,"LABEL",{for:!0,class:!0});var kt=u($);L=b(kt,"SPAN",{class:!0}),u(L).forEach(i),C=D(kt),j=b(kt,"SPAN",{class:!0}),u(j).forEach(i),H=D(kt),V=b(kt,"SPAN",{class:!0}),u(V).forEach(i),kt.forEach(i),Ne=D(Ct),I=b(Ct,"DIV",{class:!0});var ar=u(I);ke&&ke.l(ar),ar.forEach(i),Ct.forEach(i),ir.forEach(i),Qe=D(wt),me=b(wt,"MAIN",{});var or=u(me);Te=b(or,"DIV",{class:!0});var nr=u(Te);Le&&Le.l(nr),nr.forEach(i),or.forEach(i),wt.forEach(i),He=D(_t),Ce=b(_t,"DIV",{class:!0});var jt=u(Ce);Q=b(jt,"LABEL",{for:!0,class:!0}),u(Q).forEach(i),le=D(jt),A=b(jt,"UL",{class:!0});var ue=u(A);$e=b(ue,"LI",{});var ur=u($e);se=b(ur,"A",{class:!0,href:!0});var Rt=u(se);X=_(Rt,"svg",{xmlns:!0,class:!0,viewBox:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var Vt=u(X);Ie=_(Vt,"path",{stroke:!0,d:!0,fill:!0}),u(Ie).forEach(i),Pe=_(Vt,"path",{d:!0}),u(Pe).forEach(i),Xe=_(Vt,"path",{d:!0}),u(Xe).forEach(i),Vt.forEach(i),ct=J(Rt,` Dashboard`),Rt.forEach(i),ur.forEach(i),fe=D(ue),Y=b(ue,"LI",{});var cr=u(Y);Z=b(cr,"A",{id:!0,class:!0,href:!0});var qt=u(Z);U=_(qt,"svg",{xmlns:!0,class:!0,viewBox:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var bt=u(U);_e=_(bt,"path",{stroke:!0,d:!0,fill:!0}),u(_e).forEach(i),be=_(bt,"rect",{x:!0,y:!0,width:!0,height:!0,rx:!0}),u(be).forEach(i),Ae=_(bt,"rect",{x:!0,y:!0,width:!0,height:!0,rx:!0}),u(Ae).forEach(i),ie=_(bt,"line",{x1:!0,y1:!0,x2:!0,y2:!0}),u(ie).forEach(i),ee=_(bt,"line",{x1:!0,y1:!0,x2:!0,y2:!0}),u(ee).forEach(i),bt.forEach(i),Fe=J(qt,` Servers`),qt.forEach(i),cr.forEach(i),ft=D(ue),Ee=b(ue,"LI",{});var fr=u(Ee);z=b(fr,"A",{class:!0,href:!0});var zt=u(z);P=_(zt,"svg",{xmlns:!0,viewBox:!0,class:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var Et=u(P);Me=_(Et,"path",{stroke:!0,d:!0,fill:!0}),u(Me).forEach(i),De=_(Et,"circle",{cx:!0,cy:!0,r:!0}),u(De).forEach(i),st=_(Et,"path",{d:!0}),u(st).forEach(i),je=_(Et,"path",{d:!0}),u(je).forEach(i),he=_(Et,"path",{d:!0}),u(he).forEach(i),Et.forEach(i),ht=J(zt,` IAM `),ge&&ge.l(zt),zt.forEach(i),fr.forEach(i),it=D(ue),Ye=b(ue,"LI",{});var hr=u(Ye);ae=b(hr,"A",{class:!0,href:!0});var Kt=u(ae);te=_(Kt,"svg",{xmlns:!0,viewBox:!0,class:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var St=u(te);ye=_(St,"path",{stroke:!0,d:!0,fill:!0}),u(ye).forEach(i),R=_(St,"path",{d:!0}),u(R).forEach(i),Ue=_(St,"circle",{cx:!0,cy:!0,r:!0}),u(Ue).forEach(i),St.forEach(i),pt=J(Kt,` Settings`),Kt.forEach(i),hr.forEach(i),Ze=D(ue),q=b(ue,"LI",{});var dr=u(q);W=b(dr,"A",{class:!0,href:!0,target:!0,rel:!0});var Gt=u(W);N=_(Gt,"svg",{xmlns:!0,fill:!0,viewBox:!0,"stroke-width":!0,stroke:!0,class:!0});var pr=u(N);O=_(pr,"path",{"stroke-linecap":!0,"stroke-linejoin":!0,d:!0}),u(O).forEach(i),pr.forEach(i),v=J(Gt,` Documentation`),Gt.forEach(i),dr.forEach(i),y=D(ue),oe=b(ue,"LI",{class:!0}),u(oe).forEach(i),Oe=D(ue),Ve=b(ue,"DIV",{class:!0});var vr=u(Ve);qe(we.$$.fragment,vr),vr.forEach(i),at=D(ue),de=b(ue,"LI",{});var gr=u(de);Be=b(gr,"DIV",{class:!0});var Nt=u(Be);K=_(Nt,"svg",{xmlns:!0,class:!0,viewBox:!0,"stroke-width":!0,stroke:!0,fill:!0,"stroke-linecap":!0,"stroke-linejoin":!0});var Tt=u(K);et=_(Tt,"path",{stroke:!0,d:!0,fill:!0}),u(et).forEach(i),tt=_(Tt,"path",{d:!0}),u(tt).forEach(i),nt=_(Tt,"path",{d:!0}),u(nt).forEach(i),Tt.forEach(i),vt=D(Nt),ot=b(Nt,"DIV",{class:!0});var mr=u(ot);ut=J(mr,"Logout"),mr.forEach(i),Nt.forEach(i),gr.forEach(i),gt=D(ue),rt=b(ue,"LI",{class:!0});var _r=u(rt);lt=b(_r,"A",{class:!0,href:!0,target:!0});var Jt=u(lt);Ft=J(Jt,"v"),Bt=J(Jt,It),Jt.forEach(i),_r.forEach(i),ue.forEach(i),jt.forEach(i),_t.forEach(i),this.h()},h(){e(g,"id","main-drawer"),e(g,"type","checkbox"),e(g,"class","drawer-toggle"),e(L,"class","burger bg-white"),e(j,"class","burger bg-white"),e(V,"class","burger bg-white"),e($,"for","main-drawer"),e($,"class","drawer-button btn btn-square btn-ghost flex-col"),e(I,"class","prose flex flex-row justify-between space-x-1 w-full items-center pr-3"),e(h,"class","navbar lg:hidden space-x-2 flex flex-row justify-between bg-coollabs"),B(h,"hidden",!o[2].userId),e(Te,"class",We=o[2].userId?"lg:pl-16":null),e(d,"class","drawer-content"),e(Q,"for","main-drawer"),e(Q,"class","drawer-overlay w-full"),e(Ie,"stroke","none"),e(Ie,"d","M0 0h24v24H0z"),e(Ie,"fill","none"),e(Pe,"d","M19 8.71l-5.333 -4.148a2.666 2.666 0 0 0 -3.274 0l-5.334 4.148a2.665 2.665 0 0 0 -1.029 2.105v7.2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-7.2c0 -.823 -.38 -1.6 -1.03 -2.105"),e(Xe,"d","M16 15c-2.21 1.333 -5.792 1.333 -8 0"),e(X,"xmlns","http://www.w3.org/2000/svg"),e(X,"class","h-8 w-8"),e(X,"viewBox","0 0 24 24"),e(X,"stroke-width","1.5"),e(X,"stroke","currentColor"),e(X,"fill","none"),e(X,"stroke-linecap","round"),e(X,"stroke-linejoin","round"),e(se,"class","no-underline icons hover:text-white hover:bg-pink-500"),e(se,"href","/"),B(se,"bg-pink-500",o[4].url.pathname==="/"),e(_e,"stroke","none"),e(_e,"d","M0 0h24v24H0z"),e(_e,"fill","none"),e(be,"x","3"),e(be,"y","4"),e(be,"width","18"),e(be,"height","8"),e(be,"rx","3"),e(Ae,"x","3"),e(Ae,"y","12"),e(Ae,"width","18"),e(Ae,"height","8"),e(Ae,"rx","3"),e(ie,"x1","7"),e(ie,"y1","8"),e(ie,"x2","7"),e(ie,"y2","8.01"),e(ee,"x1","7"),e(ee,"y1","16"),e(ee,"x2","7"),e(ee,"y2","16.01"),e(U,"xmlns","http://www.w3.org/2000/svg"),e(U,"class","w-8 h-8"),e(U,"viewBox","0 0 24 24"),e(U,"stroke-width","1.5"),e(U,"stroke","currentColor"),e(U,"fill","none"),e(U,"stroke-linecap","round"),e(U,"stroke-linejoin","round"),e(Z,"id","servers"),e(Z,"class","no-underline icons hover:text-white hover:bg-sky-500"),e(Z,"href","/servers"),B(Z,"bg-sky-500",o[4].url.pathname.startsWith("/servers")),e(Me,"stroke","none"),e(Me,"d","M0 0h24v24H0z"),e(Me,"fill","none"),e(De,"cx","9"),e(De,"cy","7"),e(De,"r","4"),e(st,"d","M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"),e(je,"d","M16 3.13a4 4 0 0 1 0 7.75"),e(he,"d","M21 21v-2a4 4 0 0 0 -3 -3.85"),e(P,"xmlns","http://www.w3.org/2000/svg"),e(P,"viewBox","0 0 24 24"),e(P,"class","h-8 w-8"),e(P,"stroke-width","1.5"),e(P,"stroke","currentColor"),e(P,"fill","none"),e(P,"stroke-linecap","round"),e(P,"stroke-linejoin","round"),e(z,"class","no-underline icons hover:text-white hover:bg-iam"),e(z,"href","/iam"),B(z,"bg-iam",o[4].url.pathname.startsWith("/iam")),e(ye,"stroke","none"),e(ye,"d","M0 0h24v24H0z"),e(ye,"fill","none"),e(R,"d","M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"),e(Ue,"cx","12"),e(Ue,"cy","12"),e(Ue,"r","3"),e(te,"xmlns","http://www.w3.org/2000/svg"),e(te,"viewBox","0 0 24 24"),e(te,"class","h-8 w-8"),e(te,"stroke-width","1.5"),e(te,"stroke","currentColor"),e(te,"fill","none"),e(te,"stroke-linecap","round"),e(te,"stroke-linejoin","round"),e(ae,"class","no-underline icons hover:text-black hover:bg-settings"),e(ae,"href",dt=o[2].teamId==="0"?"/settings/coolify":"/settings/ssh"),B(ae,"bg-settings",o[4].url.pathname.startsWith("/settings")),B(ae,"text-black",o[4].url.pathname.startsWith("/settings")),e(O,"stroke-linecap","round"),e(O,"stroke-linejoin","round"),e(O,"d","M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25"),e(N,"xmlns","http://www.w3.org/2000/svg"),e(N,"fill","none"),e(N,"viewBox","0 0 24 24"),e(N,"stroke-width","1.5"),e(N,"stroke","currentColor"),e(N,"class","w-8 h-8"),e(W,"class","no-underline icons hover:text-white hover:bg-info"),e(W,"href","https://docs.coollabs.io/coolify-v3/"),e(W,"target","_blank"),e(W,"rel","noreferrer external"),e(oe,"class","flex-1 bg-transparent"),e(Ve,"class","block lg:hidden"),e(et,"stroke","none"),e(et,"d","M0 0h24v24H0z"),e(et,"fill","none"),e(tt,"d","M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"),e(nt,"d","M7 12h14l-3 -3m0 6l3 -3"),e(K,"xmlns","http://www.w3.org/2000/svg"),e(K,"class","ml-1 h-8 w-8"),e(K,"viewBox","0 0 24 24"),e(K,"stroke-width","1.5"),e(K,"stroke","currentColor"),e(K,"fill","none"),e(K,"stroke-linecap","round"),e(K,"stroke-linejoin","round"),e(ot,"class","-ml-1"),e(Be,"class","no-underline icons hover:bg-error"),e(lt,"class","text-xs hover:bg-coolgray-200 no-underline hover:text-white text-right"),e(lt,"href",Lt=`https://github.com/coollabsio/coolify/releases/tag/v${o[2].version}`),e(lt,"target","_blank noreferrer"),e(rt,"class","w-full"),e(A,"class","menu bg-coolgray-200 w-60 p-2 space-y-3 pt-4"),e(Ce,"class","drawer-side"),e(c,"class","drawer")},m(E,T){ve&&ve.m(document.head,null),n(document.head,t),x(E,l,T),Ke(r,E,T),x(E,s,T),ne&&ne.m(E,T),x(E,a,T),x(E,c,T),n(c,g),o[14](g),n(c,f),n(c,d),re&&re.m(d,null),n(d,p),n(d,h),n(h,w),n(w,$),n($,L),n($,C),n($,j),n($,H),n($,V),n(w,Ne),n(w,I),ke&&ke.m(I,null),n(d,Qe),n(d,me),n(me,Te),Le&&Le.m(Te,null),n(c,He),n(c,Ce),n(Ce,Q),n(Ce,le),n(Ce,A),n(A,$e),n($e,se),n(se,X),n(X,Ie),n(X,Pe),n(X,Xe),n(se,ct),n(A,fe),n(A,Y),n(Y,Z),n(Z,U),n(U,_e),n(U,be),n(U,Ae),n(U,ie),n(U,ee),n(Z,Fe),n(A,ft),n(A,Ee),n(Ee,z),n(z,P),n(P,Me),n(P,De),n(P,st),n(P,je),n(P,he),n(z,ht),ge&&ge.m(z,null),n(A,it),n(A,Ye),n(Ye,ae),n(ae,te),n(te,ye),n(te,R),n(te,Ue),n(ae,pt),n(A,Ze),n(A,q),n(q,W),n(W,N),n(N,O),n(W,v),n(A,y),n(A,oe),n(A,Oe),n(A,Ve),Ke(we,Ve,null),n(A,at),n(A,de),n(de,Be),n(Be,K),n(K,et),n(K,tt),n(K,nt),n(Be,vt),n(Be,ot),n(ot,ut),n(A,gt),n(A,rt),n(rt,lt),n(lt,Ft),n(lt,Bt),pe=!0,Ut||(lr=[ze(se,"click",o[6]),ze(Z,"click",o[6]),ze(z,"click",o[6]),ze(ae,"click",o[6]),ze(Be,"click",o[5])],Ut=!0)},p(E,[T]){mt===(mt=sr(E))&&ve?ve.p(E,T):(ve&&ve.d(1),ve=mt&&mt(E),ve&&(ve.c(),ve.m(t.parentNode,t))),E[3]?ne?T&8&&S(ne,1):(ne=Lr(),ne.c(),S(ne,1),ne.m(a.parentNode,a)):ne&&(xt(),F(ne,1,1,()=>{ne=null}),$t()),E[2].userId?re?(re.p(E,T),T&4&&S(re,1)):(re=Cr(E),re.c(),S(re,1),re.m(d,p)):re&&(xt(),F(re,1,1,()=>{re=null}),$t()),E[2].whiteLabeled?ke&&(ke.d(1),ke=null):ke||(ke=Sr(),ke.c(),ke.m(I,null)),(!pe||T&4)&&B(h,"hidden",!E[2].userId),Le&&Le.p&&(!pe||T&32768)&&Hr(Le,Ot,E,E[15],pe?Fr(Ot,E[15],T,null):Pr(E[15]),null),(!pe||T&4&&We!==(We=E[2].userId?"lg:pl-16":null))&&e(Te,"class",We),(!pe||T&16)&&B(se,"bg-pink-500",E[4].url.pathname==="/"),(!pe||T&16)&&B(Z,"bg-sky-500",E[4].url.pathname.startsWith("/servers")),E[2].pendingInvitations.length>0?ge?ge.p(E,T):(ge=Nr(E),ge.c(),ge.m(z,null)):ge&&(ge.d(1),ge=null),(!pe||T&16)&&B(z,"bg-iam",E[4].url.pathname.startsWith("/iam")),(!pe||T&4&&dt!==(dt=E[2].teamId==="0"?"/settings/coolify":"/settings/ssh"))&&e(ae,"href",dt),(!pe||T&16)&&B(ae,"bg-settings",E[4].url.pathname.startsWith("/settings")),(!pe||T&16)&&B(ae,"text-black",E[4].url.pathname.startsWith("/settings")),(!pe||T&4)&&It!==(It=E[2].version+"")&&Pt(Bt,It),(!pe||T&4&&Lt!==(Lt=`https://github.com/coollabsio/coolify/releases/tag/v${E[2].version}`))&&e(lt,"href",Lt)},i(E){pe||(S(r.$$.fragment,E),S(ne),S(re),S(Le,E),S(we.$$.fragment,E),pe=!0)},o(E){F(r.$$.fragment,E),F(ne),F(re),F(Le,E),F(we.$$.fragment,E),pe=!1},d(E){ve&&ve.d(E),i(t),E&&i(l),Ge(r,E),E&&i(s),ne&&ne.d(E),E&&i(a),E&&i(c),o[14](null),re&&re.d(),ke&&ke.d(),Le&&Le.d(E),ge&&ge.d(),Ge(we),Ut=!1,Ur(lr)}}}const Zl=async({url:o})=>{var l;const t=await Ht("/base");try{if(Zt.get("token")){const r=await Ht("/user");return{props:{...r,baseSettings:t},stuff:{...r}}}else return o.pathname!=="/login"&&o.pathname!=="/register"?{status:302,redirect:"/login",props:{baseSettings:t}}:{props:{baseSettings:t}}}catch(r){return(((l=r==null?void 0:r.code)==null?void 0:l.startsWith("FAST_JWT"))||r.status===401)&&(Zt.remove("token"),o.pathname!=="/login")?{status:302,redirect:"/login",props:{baseSettings:t}}:o.pathname!=="/login"?{status:302,redirect:"/login",props:{baseSettings:t}}:{status:500,error:new Error(r),props:{baseSettings:t}}}};function Rl(o,t,l){let r,s,a,c;Je(o,Er,I=>l(16,r=I)),Je(o,xe,I=>l(2,s=I)),Je(o,ol,I=>l(3,a=I)),Je(o,nl,I=>l(4,c=I));let{$$slots:g={},$$scope:f}=t,{settings:d}=t,{baseSettings:p}=t,{pendingInvitations:h=0}=t;ce(xe,s.isRegistrationEnabled=p.isRegistrationEnabled,s),ce(xe,s.ipv4=p.ipv4,s),ce(xe,s.ipv6=p.ipv6,s),ce(xe,s.version=p.version,s),ce(xe,s.whiteLabeled=p.whiteLabeled,s),ce(xe,s.whiteLabeledDetails.icon=p.whiteLabeledIcon,s),ce(xe,s.isARM=p.isARM,s),ce(xe,s.pendingInvitations=h,s);let{userId:w}=t,{teamId:$}=t,{permission:L}=t,{isAdmin:C}=t;w&&ce(xe,s.userId=w,s),$&&ce(xe,s.teamId=$,s),L&&ce(xe,s.permission=L,s),C&&ce(xe,s.isAdmin=C,s);async function j(){try{return Zt.remove("token"),window.location.replace("/login")}catch(I){return er(I)}}rr(async()=>{s.userId&&(yr.connect(),yr.on("start-service",I=>{const{serviceId:Qe,state:me}=I;ce(Er,r.service.startup[Qe]=me,r),(me===0||me===1)&&delete r.service.startup[Qe]}))});let H;const V=()=>l(1,H.checked=!1,H);function Ne(I){tl[I?"unshift":"push"](()=>{H=I,l(1,H)})}return o.$$set=I=>{"settings"in I&&l(7,d=I.settings),"baseSettings"in I&&l(8,p=I.baseSettings),"pendingInvitations"in I&&l(0,h=I.pendingInvitations),"userId"in I&&l(9,w=I.userId),"teamId"in I&&l(10,$=I.teamId),"permission"in I&&l(11,L=I.permission),"isAdmin"in I&&l(12,C=I.isAdmin),"$$scope"in I&&l(15,f=I.$$scope)},[h,H,s,a,c,j,V,d,p,w,$,L,C,g,Ne,f]}class es extends At{constructor(t){super(),Mt(this,t,Rl,Ol,Dt,{settings:7,baseSettings:8,pendingInvitations:0,userId:9,teamId:10,permission:11,isAdmin:12})}}export{es as default,Zl as load};