UNPKG

@platformos/pos-cli

Version:
2 lines (1 loc) 22.5 kB
import{S as pe,i as de,s as me,d,o as w,p as _,Q as L,R as B,H as j,b as P,c as p,z as u,e as g,f as z,K as O,h as M,j as $,k as C,l as fe,E as W,x as Qe,I as y,J as Ce,L as D,M as J,n as G,N as Ee,g as Ve,t as Ae,a as Ge,y as Ne,a5 as Xe,Y as he,X as Ie,T as Se,ah as Ye,a7 as Ze,Z as et,_ as tt,m as st,u as lt,q as at,r as nt}from"../chunks/n7YEDvJi.js";import"../chunks/IHki7fMi.js";import{p as it}from"../chunks/DjNrOAme.js";import{t as rt}from"../chunks/t7b_BBSP.js";import{s as Q}from"../chunks/Bp_ajb_u.js";import{I as F}from"../chunks/DHO4ENnJ.js";import{e as Te,u as ot,o as ct}from"../chunks/DMhVG_ro.js";import{f as ue}from"../chunks/BaKpYqK2.js";function Le(o){const t=o.slice(),e=typeof window<"u"&&window.location.port!=="4173"&&window.location.port!=="5173"?`http://localhost:${parseInt(window.location.port)}`:"http://localhost:3333";return t[3]=e,t}function Me(o){const t=o.slice(),e=typeof window<"u"&&window.location.port!=="4173"&&window.location.port!=="5173"?`http://localhost:${parseInt(window.location.port)}`:"http://localhost:3333";return t[3]=e,t}function ft(o){var n;let t,e=((n=o[0].online)==null?void 0:n.MPKIT_URL.replace("https://",""))+"",l,i;return{c(){t=$("a"),l=Ae(e),this.h()},l(c){t=g(c,"A",{href:!0});var a=z(t);l=Ve(a,e),a.forEach(d),this.h()},h(){var c;u(t,"href",i=(c=o[0].online)==null?void 0:c.MPKIT_URL)},m(c,a){P(c,t,a),p(t,l)},p(c,a){var s,r;a&1&&e!==(e=((s=c[0].online)==null?void 0:s.MPKIT_URL.replace("https://",""))+"")&&Ge(l,e),a&1&&i!==(i=(r=c[0].online)==null?void 0:r.MPKIT_URL)&&u(t,"href",i)},d(c){c&&d(t)}}}function ht(o){let t;return{c(){t=Ae("disconnected")},l(e){t=Ve(e,"disconnected")},m(e,l){P(e,t,l)},p:G,d(e){e&&d(t)}}}function ut(o){let t;return{c(){t=Ae("connecting…")},l(e){t=Ve(e,"connecting…")},m(e,l){P(e,t,l)},p:G,d(e){e&&d(t)}}}function Pe(o){let t,e,l,i,n,c="Database",a,s,r;return l=new F({props:{icon:"database"}}),{c(){t=$("li"),e=$("a"),J(l.$$.fragment),i=C(),n=$("span"),n.textContent=c,this.h()},l(f){t=g(f,"LI",{class:!0});var E=z(t);e=g(E,"A",{href:!0,class:!0});var b=z(e);D(l.$$.fragment,b),i=M(b),n=g(b,"SPAN",{class:!0,"data-svelte-h":!0}),O(n)!=="svelte-xe6gx4"&&(n.textContent=c),b.forEach(d),E.forEach(d),this.h()},h(){u(n,"class","label svelte-uthxgc"),u(e,"href","/database"),u(e,"class","svelte-uthxgc"),L(e,"active",o[1].url.pathname.startsWith("/database")),u(t,"class","svelte-uthxgc")},m(f,E){P(f,t,E),p(t,e),y(l,e,null),p(e,i),p(e,n),a=!0,s||(r=[Ce(e,"focus",o[2],{once:!0}),Ce(e,"mouseover",o[2],{once:!0})],s=!0)},p(f,E){(!a||E&2)&&L(e,"active",f[1].url.pathname.startsWith("/database"))},i(f){a||(_(l.$$.fragment,f),a=!0)},o(f){w(l.$$.fragment,f),a=!1},d(f){f&&d(t),W(l),s=!1,Qe(r)}}}function Ue(o){let t,e,l,i,n,c="Users",a;return l=new F({props:{icon:"users"}}),{c(){t=$("li"),e=$("a"),J(l.$$.fragment),i=C(),n=$("span"),n.textContent=c,this.h()},l(s){t=g(s,"LI",{class:!0});var r=z(t);e=g(r,"A",{href:!0,class:!0});var f=z(e);D(l.$$.fragment,f),i=M(f),n=g(f,"SPAN",{class:!0,"data-svelte-h":!0}),O(n)!=="svelte-o38ms3"&&(n.textContent=c),f.forEach(d),r.forEach(d),this.h()},h(){u(n,"class","label svelte-uthxgc"),u(e,"href","/users"),u(e,"class","svelte-uthxgc"),L(e,"active",o[1].url.pathname.startsWith("/users")),u(t,"class","svelte-uthxgc")},m(s,r){P(s,t,r),p(t,e),y(l,e,null),p(e,i),p(e,n),a=!0},p(s,r){(!a||r&2)&&L(e,"active",s[1].url.pathname.startsWith("/users"))},i(s){a||(_(l.$$.fragment,s),a=!0)},o(s){w(l.$$.fragment,s),a=!1},d(s){s&&d(t),W(l)}}}function We(o){let t,e,l,i,n,c="Logs",a;return l=new F({props:{icon:"log"}}),{c(){t=$("li"),e=$("a"),J(l.$$.fragment),i=C(),n=$("span"),n.textContent=c,this.h()},l(s){t=g(s,"LI",{class:!0});var r=z(t);e=g(r,"A",{href:!0,class:!0});var f=z(e);D(l.$$.fragment,f),i=M(f),n=g(f,"SPAN",{class:!0,"data-svelte-h":!0}),O(n)!=="svelte-17j55om"&&(n.textContent=c),f.forEach(d),r.forEach(d),this.h()},h(){u(n,"class","label svelte-uthxgc"),u(e,"href","/logs"),u(e,"class","svelte-uthxgc"),L(e,"active",o[1].url.pathname==="/logs"),u(t,"class","svelte-uthxgc")},m(s,r){P(s,t,r),p(t,e),y(l,e,null),p(e,i),p(e,n),a=!0},p(s,r){(!a||r&2)&&L(e,"active",s[1].url.pathname==="/logs")},i(s){a||(_(l.$$.fragment,s),a=!0)},o(s){w(l.$$.fragment,s),a=!1},d(s){s&&d(t),W(l)}}}function ye(o){let t,e,l,i,n,c="Logs v2",a;return l=new F({props:{icon:"logFresh"}}),{c(){t=$("li"),e=$("a"),J(l.$$.fragment),i=C(),n=$("span"),n.textContent=c,this.h()},l(s){t=g(s,"LI",{class:!0});var r=z(t);e=g(r,"A",{href:!0,class:!0});var f=z(e);D(l.$$.fragment,f),i=M(f),n=g(f,"SPAN",{class:!0,"data-svelte-h":!0}),O(n)!=="svelte-taaagi"&&(n.textContent=c),f.forEach(d),r.forEach(d),this.h()},h(){u(n,"class","label svelte-uthxgc"),u(e,"href","/logsv2"),u(e,"class","svelte-uthxgc"),L(e,"active",o[1].url.pathname.startsWith("/logsv2")),u(t,"class","svelte-uthxgc")},m(s,r){P(s,t,r),p(t,e),y(l,e,null),p(e,i),p(e,n),a=!0},p(s,r){(!a||r&2)&&L(e,"active",s[1].url.pathname.startsWith("/logsv2"))},i(s){a||(_(l.$$.fragment,s),a=!0)},o(s){w(l.$$.fragment,s),a=!1},d(s){s&&d(t),W(l)}}}function De(o){let t,e,l,i,n,c="Network Logs",a;return l=new F({props:{icon:"globeMessage"}}),{c(){t=$("li"),e=$("a"),J(l.$$.fragment),i=C(),n=$("span"),n.textContent=c,this.h()},l(s){t=g(s,"LI",{class:!0});var r=z(t);e=g(r,"A",{href:!0,class:!0});var f=z(e);D(l.$$.fragment,f),i=M(f),n=g(f,"SPAN",{class:!0,"data-svelte-h":!0}),O(n)!=="svelte-1d3zf0k"&&(n.textContent=c),f.forEach(d),r.forEach(d),this.h()},h(){u(n,"class","label svelte-uthxgc"),u(e,"href","/network"),u(e,"class","svelte-uthxgc"),L(e,"active",o[1].url.pathname.startsWith("/network")),u(t,"class","svelte-uthxgc")},m(s,r){P(s,t,r),p(t,e),y(l,e,null),p(e,i),p(e,n),a=!0},p(s,r){(!a||r&2)&&L(e,"active",s[1].url.pathname.startsWith("/network"))},i(s){a||(_(l.$$.fragment,s),a=!0)},o(s){w(l.$$.fragment,s),a=!1},d(s){s&&d(t),W(l)}}}function Je(o){let t,e,l,i,n,c="Background Jobs",a;return l=new F({props:{icon:"backgroundJob"}}),{c(){t=$("li"),e=$("a"),J(l.$$.fragment),i=C(),n=$("span"),n.textContent=c,this.h()},l(s){t=g(s,"LI",{class:!0});var r=z(t);e=g(r,"A",{href:!0,class:!0});var f=z(e);D(l.$$.fragment,f),i=M(f),n=g(f,"SPAN",{class:!0,"data-svelte-h":!0}),O(n)!=="svelte-fuvc8n"&&(n.textContent=c),f.forEach(d),r.forEach(d),this.h()},h(){u(n,"class","label svelte-uthxgc"),u(e,"href","/backgroundJobs"),u(e,"class","svelte-uthxgc"),L(e,"active",o[1].url.pathname.startsWith("/backgroundJobs")),u(t,"class","svelte-uthxgc")},m(s,r){P(s,t,r),p(t,e),y(l,e,null),p(e,i),p(e,n),a=!0},p(s,r){(!a||r&2)&&L(e,"active",s[1].url.pathname.startsWith("/backgroundJobs"))},i(s){a||(_(l.$$.fragment,s),a=!0)},o(s){w(l.$$.fragment,s),a=!1},d(s){s&&d(t),W(l)}}}function Oe(o){let t,e,l,i,n,c="Constants",a;return l=new F({props:{icon:"constant"}}),{c(){t=$("li"),e=$("a"),J(l.$$.fragment),i=C(),n=$("span"),n.textContent=c,this.h()},l(s){t=g(s,"LI",{class:!0});var r=z(t);e=g(r,"A",{href:!0,class:!0});var f=z(e);D(l.$$.fragment,f),i=M(f),n=g(f,"SPAN",{class:!0,"data-svelte-h":!0}),O(n)!=="svelte-s4kqu"&&(n.textContent=c),f.forEach(d),r.forEach(d),this.h()},h(){u(n,"class","label svelte-uthxgc"),u(e,"href","/constants"),u(e,"class","svelte-uthxgc"),L(e,"active",o[1].url.pathname.startsWith("/constants")),u(t,"class","svelte-uthxgc")},m(s,r){P(s,t,r),p(t,e),y(l,e,null),p(e,i),p(e,n),a=!0},p(s,r){(!a||r&2)&&L(e,"active",s[1].url.pathname.startsWith("/constants"))},i(s){a||(_(l.$$.fragment,s),a=!0)},o(s){w(l.$$.fragment,s),a=!1},d(s){s&&d(t),W(l)}}}function Re(o){let t,e,l,i,n,c="Liquid Evaluator",a;return l=new F({props:{icon:"liquid"}}),{c(){t=$("li"),e=$("a"),J(l.$$.fragment),i=C(),n=$("span"),n.textContent=c,this.h()},l(s){t=g(s,"LI",{class:!0});var r=z(t);e=g(r,"A",{href:!0,class:!0});var f=z(e);D(l.$$.fragment,f),i=M(f),n=g(f,"SPAN",{class:!0,"data-svelte-h":!0}),O(n)!=="svelte-1k272bg"&&(n.textContent=c),f.forEach(d),r.forEach(d),this.h()},h(){u(n,"class","label svelte-uthxgc"),u(e,"href",o[3]+"/gui/liquid"),u(e,"class","svelte-uthxgc"),u(t,"class","svelte-uthxgc")},m(s,r){P(s,t,r),p(t,e),y(l,e,null),p(e,i),p(e,n),a=!0},p:G,i(s){a||(_(l.$$.fragment,s),a=!0)},o(s){w(l.$$.fragment,s),a=!1},d(s){s&&d(t),W(l)}}}function Ke(o){let t,e,l,i,n,c="GraphiQL",a;return l=new F({props:{icon:"graphql"}}),{c(){t=$("li"),e=$("a"),J(l.$$.fragment),i=C(),n=$("span"),n.textContent=c,this.h()},l(s){t=g(s,"LI",{class:!0});var r=z(t);e=g(r,"A",{href:!0,class:!0});var f=z(e);D(l.$$.fragment,f),i=M(f),n=g(f,"SPAN",{class:!0,"data-svelte-h":!0}),O(n)!=="svelte-pzl6ct"&&(n.textContent=c),f.forEach(d),r.forEach(d),this.h()},h(){u(n,"class","label svelte-uthxgc"),u(e,"href",o[3]+"/gui/graphql"),u(e,"class","svelte-uthxgc"),u(t,"class","svelte-uthxgc")},m(s,r){P(s,t,r),p(t,e),y(l,e,null),p(e,i),p(e,n),a=!0},p:G,i(s){a||(_(l.$$.fragment,s),a=!0)},o(s){w(l.$$.fragment,s),a=!1},d(s){s&&d(t),W(l)}}}function pt(o){let t,e,l,i,n='<svg class="sign svelte-uthxgc" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" x="0" y="0" style="enable-background:new 0 0 28.4 24.5" version="1.1" viewBox="0 0 28.4 24.5"><style>.st0,.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#56b146}.st1{fill:#c3233d}.st2,.st3,.st4,.st5,.st6,.st7,.st8,.st9{fill-rule:evenodd;clip-rule:evenodd;fill:#d5246a}.st3,.st4,.st5,.st6,.st7,.st8,.st9{fill:#e77a2b}.st4,.st5,.st6,.st7,.st8,.st9{fill:#fac922}.st5,.st6,.st7,.st8,.st9{fill:#487fb5}.st6,.st7,.st8,.st9{fill:#23477b}.st7,.st8,.st9{fill:#419845}.st8,.st9{fill:#014c3d}.st9{fill:#008b47}</style><path d="M4.7 0h2.4L3.3 3.9 4.7 0z" class="st0"></path><path d="M2 10.4 0 6.8h2v3.6z" class="st1"></path><path d="M2 6.7h4l-4 3.6V6.7z" class="st2"></path><path d="M5.8 13.6 6 6.7l-4 3.6 3.8 3.3z" class="st3"></path><path d="m10.6 10.2-4.8 3.4.2-6.9 4.6 3.5z" class="st4"></path><path d="M13.6 5.7 6 6.7l4.7 3.4 2.9-4.4z" class="st0"></path><path d="M11.9 0 8.8 3.8l4.9 1.8L11.9 0z" class="st1"></path><path d="M19.1 0h-7.3l1.8 5.7L19.1 0z" class="st5"></path><path d="m6 6.7 7.6-1.1-4.8-1.8L6 6.7z" class="st2"></path><path d="M20.5 5.7h-6.9L19.1 0l1.4 5.7z" class="st6"></path><path d="m17 12-6.4-1.8 3-4.5L17 12z" class="st7"></path><path d="M20.5 5.7 17 12l-3.4-6.3h6.9z" class="st8"></path><path d="M22.9 10.2 17 12l3.4-6.3 2.5 4.5z" class="st7"></path><path d="M21.8 13.9 17 12l5.8-1.8-1 3.7z" class="st0"></path><path d="m19.1 0 5.3 4.4-3.9 1.3L19.1 0z" class="st5"></path><path d="m20.5 5.7 3.9-1.3-1.5 5.8-2.4-4.5z" class="st9"></path><path d="m22.9 10.2 5.4 1-6.5 2.6 1.1-3.6z" class="st8"></path><path d="m28.3 11.2.1 5.2-6.5-2.6 6.4-2.6z" class="st7"></path><path d="m21.8 13.9 6.5 2.5-4.9.8-1.6-3.3z" class="st6"></path><path d="m28.4 16.4-2.5 5.7-2.4-4.8 4.9-.9z" class="st0"></path><defs><filter id="Adobe_OpacityMaskFilter" width="10.8" height="7.2" x="15.1" y="17.2" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="a_00000065067817451968692310000014300811633783240372_" width="10.8" height="7.2" x="15.1" y="17.2" maskUnits="userSpaceOnUse"><path d="M15.1 17.2h10.8v7.2H15.1v-7.2z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#fff;filter:url(#Adobe_OpacityMaskFilter)"></path></mask><g style="mask:url(#a_00000065067817451968692310000014300811633783240372_)"><path d="m23.4 17.2 2.4 4.8-3.6-2 1.2-2.8z" class="st5"></path><path d="m25.8 22.1-3.6 2.4V20l3.6 2.1z" class="st6"></path><path d="M22.2 20v4.5l-1.8-2.9 1.8-1.6z" class="st5"></path><path d="M22.2 24.5h-4.8l3-2.9 1.8 2.9z" class="st6"></path><path d="m20.4 21.6-3 2.9.5-2.9h2.5z" class="st1"></path><path d="m17.9 21.6-.5 2.9-2.3-2.9h2.8z" class="st2"></path></g><path d="M17.9 21.6H15l1.7-2 1.2 2z" class="st1"></path><path d="M15.1 21.6v-3.8l1.7 1.8-1.7 2z" class="st3"></path><path d="m24.4 4.4 3.9 6.8-5.4-1 1.5-5.8z" class="st0"></path><path d="m17.9 17.9-.4-1.9 2.9 1.3-2.5.6z" class="st7"></path><path d="m15.1 17.8 2.9.1-.4-1.9-2.5 1.8z" class="st0"></path><path d="m16.7 19.6 1.2-1.7-2.9-.1 1.7 1.8z" class="st4"></path><path d="m6.7 2.5 2.1 1.3-.1-2.6-2 1.3z" class="st7"></path><path d="m6.7 2.5 2-1.3L7.1 0l-.4 2.5z" class="st0"></path><path d="M3.3 3.9 7.1 0l-.4 2.5-3.4 1.4z" class="st9"></path><path d="M8.8 3.8 6.7 2.5l-1 1.4 3.1-.1z" class="st8"></path><path d="m3.3 3.9 3.3-1.4-1 1.4H3.3z" class="st7"></path><path d="m2 6.7 3.7-2.8.3 2.8H2z" class="st3"></path><path d="M5.7 3.9 6 6.7l2.8-2.9-3.1.1z" class="st1"></path><path d="m2 6.7 1.4-2.8h2.4L2 6.7z" class="st4"></path><path d="m11 13.6-1.2 2h3.3l-2.1-2z" class="st7"></path><path d="m8.5 13.6 1.4 2 1.2-2H8.5z" class="st0"></path><path d="m10.6 10.2.4 3.4 6-1.6-6.4-1.8z" class="st8"></path><path d="M13.2 15.6 17 12l-6 1.6 2.2 2z" class="st9"></path></svg>',c,a,s,r='<svg class="logotype svelte-uthxgc" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 135 22.2" viewBox="0 0 135 22.2" fill="currentColor"><path d="m96.2 4.3-1.4 1.3-1.4-1.3h-3.1l-1.7 2-2-2v13.4h3.9V8.4h1.8l.6 1v8.3h3.9l-.4-.5.4.5V9.4l.6-1h1.2l.5 1v8.3h4V7.3l-3.1-3h-3.8zM9.5 12.2l-1.4 1.4H4V8.4h4.1L9.5 10v2.2zM6.8 4.4H4L2 6.3 0 4.4v17.8h4v-4.6l-.1-.1.1.1h5.7l3.5-3.1V8L9.6 4.4H6.8zm34.7 8.2V9.1h4.2v-4h-4.2l-2-2.2-2-2v13.7l3.9 3h5v-4h-3.3l-1.6-1zm-10.4 1.1h-4.2l-1.5-1.5V9.9l1.5-1.3h4.2v5.1zm0-9h-5.7l-3.5 3V14l3.5 3.6h5.7l2-1.9 2 1.9v-9l-2-1.9-2-2zm46.8-.1-2 2.1-2-2.1v13h4v-9h4.2l2.5 2.6V6.7L82 4.6h-4.1zM48.4 3.1v14.5h4v-4.8h4.2V8.9h-4.2V5.4L54.1 4h3.3V0h-5l-4 3.1zm-31.1-.8-2-2.2v17.6h4V4.5l-2-2.2zm50.8 9.8-1.5 1.6h-2.7l-1.5-1.6V9.9l1.5-1.3h2.7l1.5 1.3v2.2zm-5.8-7.5-3.6 3V14l3.6 3.6h6l3.6-3.6V7.6l-3.6-3h-6zm52.9 4.1V12l-1.4 2h-3l-1.4-2V5.5l1.4-2h3l1.4 2v3.2zM109.3 0l-3.7 3.5V14l3.7 3.5h6L119 14V3.5L115.3 0h-6zm22.5 7.1-.2-.1v.1h-.1V7h-5.2l-1.1-1V4.7l1.1-1.2h3.3l2.1 1.8 3.2-1.8-3.6-3.5h-6l-3.7 3.5v4.3l3.4 2.6h4.8l1.4 1v1.4l-1.4 1.2h-3l-2.1-1.8-3.2 1.8 3.7 3.5h6L135 14V9.7l-3.2-2.6z"></path></svg> <span class="label svelte-uthxgc">platformOS development tools</span>',f,E,b,m,h,K=o[0].header.includes("database"),Y,ve=o[0].header.includes("users"),Z,_e=o[0].header.includes("logs"),ee,ge=o[0].header.includes("logsv2"),te,$e=o[0].header.includes("network"),se,be=o[0].header.includes("backgroundJobs"),le,ke=o[0].header.includes("constants"),ae,we=o[0].header.includes("liquid"),ne,ze=o[0].header.includes("graphiql"),X;function xe(v,k){return v[0].online===void 0?ut:v[0].online===!1?ht:ft}let ie=xe(o),R=ie(o),I=K&&Pe(o),V=ve&&Ue(o),A=_e&&We(o),x=ge&&ye(o),H=$e&&De(o),q=be&&Je(o),N=ke&&Oe(o),S=we&&Re(Me(o)),T=ze&&Ke(Le(o));return{c(){t=$("header"),e=$("div"),l=$("div"),i=$("a"),i.innerHTML=n,c=C(),a=$("h1"),s=$("a"),s.innerHTML=r,f=C(),E=$("span"),R.c(),b=C(),m=$("nav"),h=$("ul"),I&&I.c(),Y=C(),V&&V.c(),Z=C(),A&&A.c(),ee=C(),x&&x.c(),te=C(),H&&H.c(),se=C(),q&&q.c(),le=C(),N&&N.c(),ae=C(),S&&S.c(),ne=C(),T&&T.c(),this.h()},l(v){t=g(v,"HEADER",{class:!0});var k=z(t);e=g(k,"DIV",{class:!0});var re=z(e);l=g(re,"DIV",{class:!0});var oe=z(l);i=g(oe,"A",{href:!0,"data-svelte-h":!0}),O(i)!=="svelte-1nhlu7c"&&(i.innerHTML=n),c=M(oe),a=g(oe,"H1",{class:!0});var ce=z(a);s=g(ce,"A",{href:!0,class:!0,"data-svelte-h":!0}),O(s)!=="svelte-z2lbz1"&&(s.innerHTML=r),f=M(ce),E=g(ce,"SPAN",{class:!0});var He=z(E);R.l(He),He.forEach(d),ce.forEach(d),oe.forEach(d),b=M(re),m=g(re,"NAV",{class:!0});var qe=z(m);h=g(qe,"UL",{class:!0});var U=z(h);I&&I.l(U),Y=M(U),V&&V.l(U),Z=M(U),A&&A.l(U),ee=M(U),x&&x.l(U),te=M(U),H&&H.l(U),se=M(U),q&&q.l(U),le=M(U),N&&N.l(U),ae=M(U),S&&S.l(U),ne=M(U),T&&T.l(U),U.forEach(d),qe.forEach(d),re.forEach(d),k.forEach(d),this.h()},h(){u(i,"href","/"),u(s,"href","/"),u(s,"class","svelte-uthxgc"),u(E,"class","instance svelte-uthxgc"),L(E,"offline",!o[0].online),u(a,"class","svelte-uthxgc"),u(l,"class","logo svelte-uthxgc"),u(h,"class","svelte-uthxgc"),u(m,"class","svelte-uthxgc"),u(e,"class","wrapper svelte-uthxgc"),u(t,"class","svelte-uthxgc")},m(v,k){P(v,t,k),p(t,e),p(e,l),p(l,i),p(l,c),p(l,a),p(a,s),p(a,f),p(a,E),R.m(E,null),p(e,b),p(e,m),p(m,h),I&&I.m(h,null),p(h,Y),V&&V.m(h,null),p(h,Z),A&&A.m(h,null),p(h,ee),x&&x.m(h,null),p(h,te),H&&H.m(h,null),p(h,se),q&&q.m(h,null),p(h,le),N&&N.m(h,null),p(h,ae),S&&S.m(h,null),p(h,ne),T&&T.m(h,null),X=!0},p(v,[k]){ie===(ie=xe(v))&&R?R.p(v,k):(R.d(1),R=ie(v),R&&(R.c(),R.m(E,null))),(!X||k&1)&&L(E,"offline",!v[0].online),k&1&&(K=v[0].header.includes("database")),K?I?(I.p(v,k),k&1&&_(I,1)):(I=Pe(v),I.c(),_(I,1),I.m(h,Y)):I&&(B(),w(I,1,1,()=>{I=null}),j()),k&1&&(ve=v[0].header.includes("users")),ve?V?(V.p(v,k),k&1&&_(V,1)):(V=Ue(v),V.c(),_(V,1),V.m(h,Z)):V&&(B(),w(V,1,1,()=>{V=null}),j()),k&1&&(_e=v[0].header.includes("logs")),_e?A?(A.p(v,k),k&1&&_(A,1)):(A=We(v),A.c(),_(A,1),A.m(h,ee)):A&&(B(),w(A,1,1,()=>{A=null}),j()),k&1&&(ge=v[0].header.includes("logsv2")),ge?x?(x.p(v,k),k&1&&_(x,1)):(x=ye(v),x.c(),_(x,1),x.m(h,te)):x&&(B(),w(x,1,1,()=>{x=null}),j()),k&1&&($e=v[0].header.includes("network")),$e?H?(H.p(v,k),k&1&&_(H,1)):(H=De(v),H.c(),_(H,1),H.m(h,se)):H&&(B(),w(H,1,1,()=>{H=null}),j()),k&1&&(be=v[0].header.includes("backgroundJobs")),be?q?(q.p(v,k),k&1&&_(q,1)):(q=Je(v),q.c(),_(q,1),q.m(h,le)):q&&(B(),w(q,1,1,()=>{q=null}),j()),k&1&&(ke=v[0].header.includes("constants")),ke?N?(N.p(v,k),k&1&&_(N,1)):(N=Oe(v),N.c(),_(N,1),N.m(h,ae)):N&&(B(),w(N,1,1,()=>{N=null}),j()),k&1&&(we=v[0].header.includes("liquid")),we?S?(S.p(Me(v),k),k&1&&_(S,1)):(S=Re(Me(v)),S.c(),_(S,1),S.m(h,ne)):S&&(B(),w(S,1,1,()=>{S=null}),j()),k&1&&(ze=v[0].header.includes("graphiql")),ze?T?(T.p(Le(v),k),k&1&&_(T,1)):(T=Ke(Le(v)),T.c(),_(T,1),T.m(h,null)):T&&(B(),w(T,1,1,()=>{T=null}),j())},i(v){X||(_(I),_(V),_(A),_(x),_(H),_(q),_(N),_(S),_(T),X=!0)},o(v){w(I),w(V),w(A),w(x),w(H),w(q),w(N),w(S),w(T),X=!1},d(v){v&&d(t),R.d(),I&&I.d(),V&&V.d(),A&&A.d(),x&&x.d(),H&&H.d(),q&&q.d(),N&&N.d(),S&&S.d(),T&&T.d()}}}function dt(o,t,e){let l,i;return fe(o,Q,c=>e(0,l=c)),fe(o,it,c=>e(1,i=c)),[l,i,async()=>{l.tables.length||Ee(Q,l.tables=await rt.get(),l)}]}class mt extends pe{constructor(t){super(),de(this,t,dt,pt,me,{})}}function Be(o){let t,e="Disconnected from the instance";return{c(){t=$("div"),t.textContent=e,this.h()},l(l){t=g(l,"DIV",{class:!0,"data-svelte-h":!0}),O(t)!=="svelte-1k8ucix"&&(t.textContent=e),this.h()},h(){u(t,"class","connectionIndicator svelte-1cyr69k"),L(t,"offline",o[0].online===!1)},m(l,i){P(l,t,i)},p(l,i){i&1&&L(t,"offline",l[0].online===!1)},d(l){l&&d(t)}}}function vt(o){let t,e=o[0].online===!1&&Be(o);return{c(){e&&e.c(),t=Ne()},l(l){e&&e.l(l),t=Ne()},m(l,i){e&&e.m(l,i),P(l,t,i)},p(l,[i]){l[0].online===!1?e?e.p(l,i):(e=Be(l),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:G,o:G,d(l){l&&d(t),e&&e.d(l)}}}let _t=7e3;function gt(o,t,e){let l;fe(o,Q,c=>e(0,l=c));let i;Xe(async()=>(n(),i=setInterval(n,_t),()=>clearInterval(i)));const n=async()=>{if(document.visibilityState!=="hidden"){const c=typeof window<"u"&&window.location.port!=="4173"&&window.location.port!=="5173"?`http://localhost:${parseInt(window.location.port)}`:"http://localhost:3333";fetch(`${c}/info`).then(a=>a.json()).then(a=>{a&&Ee(Q,l.online=a,l)}).catch(a=>{Ee(Q,l.online=!1,l)})}};return[l]}class $t extends pe{constructor(t){super(),de(this,t,gt,vt,me,{})}}function je(o,t,e){const l=o.slice();return l[4]=t[e],l}function Fe(o,t){let e,l,i=t[4].message+"",n,c,a,s,r,f,E;a=new F({props:{icon:"x",size:"10"}});function b(){return t[2](t[4])}return{key:o,first:null,c(){e=$("div"),l=new tt(!1),n=C(),c=$("button"),J(a.$$.fragment),this.h()},l(m){e=g(m,"DIV",{class:!0});var h=z(e);l=et(h,!1),n=M(h),c=g(h,"BUTTON",{class:!0});var K=z(c);D(a.$$.fragment,K),K.forEach(d),h.forEach(d),this.h()},h(){l.a=n,u(c,"class","svelte-fq192n"),u(e,"class","notification svelte-fq192n"),L(e,"success",t[4].type==="success"),L(e,"error",t[4].type==="error"),L(e,"info",t[4].type==="info"),this.first=e},m(m,h){P(m,e,h),l.m(i,e),p(e,n),p(e,c),y(a,c,null),r=!0,f||(E=Ce(c,"click",b),f=!0)},p(m,h){t=m,(!r||h&2)&&i!==(i=t[4].message+"")&&l.p(i),(!r||h&2)&&L(e,"success",t[4].type==="success"),(!r||h&2)&&L(e,"error",t[4].type==="error"),(!r||h&2)&&L(e,"info",t[4].type==="info")},i(m){r||(_(a.$$.fragment,m),m&&Ie(()=>{r&&(s||(s=he(e,ue,{duration:100},!0)),s.run(1))}),r=!0)},o(m){w(a.$$.fragment,m),m&&(s||(s=he(e,ue,{duration:100},!1)),s.run(0)),r=!1},d(m){m&&d(e),W(a),m&&s&&s.end(),f=!1,E()}}}function bt(o){let t,e=[],l=new Map,i,n,c,a,s,r,f=Te(o[1].notifications);const E=b=>b[4].id;for(let b=0;b<f.length;b+=1){let m=je(o,f,b),h=E(m);l.set(h,e[b]=Fe(h,m))}return c=new $t({}),{c(){t=$("div");for(let b=0;b<e.length;b+=1)e[b].c();i=C(),n=$("div"),J(c.$$.fragment),this.h()},l(b){t=g(b,"DIV",{class:!0,"aria-live":!0,style:!0});var m=z(t);for(let K=0;K<e.length;K+=1)e[K].l(m);i=M(m),n=g(m,"DIV",{class:!0});var h=z(n);D(c.$$.fragment,h),h.forEach(d),m.forEach(d),this.h()},h(){u(n,"class","notification error svelte-fq192n"),L(n,"disabled",o[1].online!==!1),u(t,"class","container svelte-fq192n"),u(t,"aria-live","assertive"),Se(t,"--height","-"+o[0]+"px"),Ie(()=>o[3].call(t))},m(b,m){P(b,t,m);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);p(t,i),p(t,n),y(c,n,null),s=Ye(t,o[3].bind(t)),r=!0},p(b,[m]){m&2&&(f=Te(b[1].notifications),B(),e=ot(e,m,E,1,b,f,l,t,ct,Fe,i,je),j()),(!r||m&2)&&L(n,"disabled",b[1].online!==!1),(!r||m&1)&&Se(t,"--height","-"+b[0]+"px")},i(b){if(!r){for(let m=0;m<f.length;m+=1)_(e[m]);_(c.$$.fragment,b),b&&Ie(()=>{r&&(a||(a=he(n,ue,{duration:100},!0)),a.run(1))}),r=!0}},o(b){for(let m=0;m<e.length;m+=1)w(e[m]);w(c.$$.fragment,b),b&&(a||(a=he(n,ue,{duration:100},!1)),a.run(0)),r=!1},d(b){b&&d(t);for(let m=0;m<e.length;m+=1)e[m].d();W(c),b&&a&&a.end(),s()}}}function kt(o,t,e){let l;fe(o,Q,a=>e(1,l=a));let i=0;Ze(()=>{l.notifications.forEach(a=>{a.timeout||(a.type==="success"||a.type==="info")&&(a.timeout=setTimeout(()=>Q.notification.remove(a.id),7e3))})});const n=a=>Q.notification.remove(a.id);function c(){i=this.clientHeight,e(0,i)}return[i,l,n,c]}class wt extends pe{constructor(t){super(),de(this,t,kt,bt,me,{})}}function zt(o){let t,e,l,i,n;t=new mt({});const c=o[1].default,a=st(c,o,o[0],null);return i=new wt({}),{c(){J(t.$$.fragment),e=C(),a&&a.c(),l=C(),J(i.$$.fragment)},l(s){D(t.$$.fragment,s),e=M(s),a&&a.l(s),l=M(s),D(i.$$.fragment,s)},m(s,r){y(t,s,r),P(s,e,r),a&&a.m(s,r),P(s,l,r),y(i,s,r),n=!0},p(s,[r]){a&&a.p&&(!n||r&1)&&lt(a,c,s,s[0],n?nt(c,s[0],r,null):at(s[0]),null)},i(s){n||(_(t.$$.fragment,s),_(a,s),_(i.$$.fragment,s),n=!0)},o(s){w(t.$$.fragment,s),w(a,s),w(i.$$.fragment,s),n=!1},d(s){s&&(d(e),d(l)),W(t,s),a&&a.d(s),W(i,s)}}}function Lt(o,t,e){let{$$slots:l={},$$scope:i}=t;return o.$$set=n=>{"$$scope"in n&&e(0,i=n.$$scope)},[i,l]}class qt extends pe{constructor(t){super(),de(this,t,Lt,zt,me,{})}}export{qt as component};