Commit e29738b8 authored by Aral Balkan's avatar Aral Balkan
Browse files

Add instance/person info to About and remove test components

parent f2ea67ca
import{w as t,s as e,S as n,i as s,a as o,c as r,e as a,t as l,b as c,d as i,f as u,g as p,h as f,j as h,k as $,l as m,m as d,n as g,u as v,o as w,p as b,q as y,r as E,v as k,x,y as S,z as P,A as T,B as N,C as A,D as I,E as R,F as U,G as L,H as B,I as H,J as M,K as W,L as O,M as C,N as j,O as F,P as _,Q as K,R as D,T as G,U as V,V as Y,W as q,X as z,Y as J,Z as Q,_ as X,$ as Z,a0 as tt,a1 as et,a2 as nt,a3 as st,a4 as ot,a5 as rt}from"./vendor.328a5a9a.js";!function(t=".",e="__import__"){try{self[e]=new Function("u","return import(u)")}catch(n){const s=new URL(t,location),o=t=>{URL.revokeObjectURL(t.src),t.remove()};self[e]=t=>new Promise(((n,r)=>{const a=new URL(t,s);if(self[e].moduleMap[a])return n(self[e].moduleMap[a]);const l=new Blob([`import * as m from '${a}';`,`${e}.moduleMap['${a}']=m;`],{type:"text/javascript"}),c=Object.assign(document.createElement("script"),{type:"module",src:URL.createObjectURL(l),onerror(){r(new Error(`Failed to import: ${t}`)),o(c)},onload(){n(self[e].moduleMap[a]),o(c)}});document.head.appendChild(c)})),self[e].moduleMap={}}}("/assets/");const at={},lt=t(!1),ct=t([]),it=t(null),ut=t(null),pt=t(null);function ft(t){let e,n,s,o,x,S;const P=t[2].default,T=r(P,t,t[1],null);return{c(){e=a("section"),n=a("h2"),s=l(t[0]),o=c(),T&&T.c(),this.h()},l(r){e=i(r,"SECTION",{class:!0});var a=u(e);n=i(a,"H2",{});var l=u(n);s=p(l,t[0]),l.forEach(f),o=h(a),T&&T.l(a),a.forEach(f),this.h()},h(){$(e,"class","svelte-1as3kqo")},m(t,r){m(t,e,r),d(e,n),d(n,s),d(e,o),T&&T.m(e,null),S=!0},p(t,[e]){(!S||1&e)&&g(s,t[0]),T&&T.p&&2&e&&v(T,P,t,t[1],e,null,null)},i(t){S||(w(T,t),b((()=>{x||(x=y(e,E,{duration:300},!0)),x.run(1)})),S=!0)},o(t){k(T,t),x||(x=y(e,E,{duration:300},!1)),x.run(0),S=!1},d(t){t&&f(e),T&&T.d(t),t&&x&&x.end()}}}function ht(t,e,n){let{$$slots:s={},$$scope:o}=e,{title:r}=e;return t.$$set=t=>{"title"in t&&n(0,r=t.title),"$$scope"in t&&n(1,o=t.$$scope)},[r,o,s]}class $t extends n{constructor(t){super(),s(this,t,ht,ft,o,{title:0})}}function mt(t){let e,n,s,o,r,$,g,v;return{c(){e=a("p"),n=l("Welcome to your new Small Web place."),s=c(),o=a("p"),r=l("This is your passphrase, please save it somewhere safe, like a password manager:"),$=c(),g=a("pre"),v=l("this is where the pass phrase goes")},l(t){e=i(t,"P",{});var a=u(e);n=p(a,"Welcome to your new Small Web place."),a.forEach(f),s=h(t),o=i(t,"P",{});var l=u(o);r=p(l,"This is your passphrase, please save it somewhere safe, like a password manager:"),l.forEach(f),$=h(t),g=i(t,"PRE",{});var c=u(g);v=p(c,"this is where the pass phrase goes"),c.forEach(f)},m(t,a){m(t,e,a),d(e,n),m(t,s,a),m(t,o,a),d(o,r),m(t,$,a),m(t,g,a),d(g,v)},d(t){t&&f(e),t&&f(s),t&&f(o),t&&f($),t&&f(g)}}}function dt(t){let e,n;return e=new $t({props:{path:gt,title:"Setup",$$slots:{default:[mt]},$$scope:{ctx:t}}}),{c(){x(e.$$.fragment)},l(t){S(e.$$.fragment,t)},m(t,s){P(e,t,s),n=!0},p(t,[n]){const s={};1&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){T(e,t)}}}const gt="/setup";function vt(t){let e,n;return{c(){e=a("p"),n=l("Welcome to the Small Web Reference Client.")},l(t){e=i(t,"P",{});var s=u(e);n=p(s,"Welcome to the Small Web Reference Client."),s.forEach(f)},m(t,s){m(t,e,s),d(e,n)},d(t){t&&f(e)}}}function wt(t){let e,n;return e=new $t({props:{path:"/",title:"Home",$$slots:{default:[vt]},$$scope:{ctx:t}}}),{c(){x(e.$$.fragment)},l(t){S(e.$$.fragment,t)},m(t,s){P(e,t,s),n=!0},p(t,[n]){const s={};1&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){T(e,t)}}}function bt(t){let e,n;return{c(){e=a("p"),n=l("This is the About section.")},l(t){e=i(t,"P",{});var s=u(e);n=p(s,"This is the About section."),s.forEach(f)},m(t,s){m(t,e,s),d(e,n)},d(t){t&&f(e)}}}function yt(t){let e,n;return e=new $t({props:{path:"/about",title:"About",$$slots:{default:[bt]},$$scope:{ctx:t}}}),{c(){x(e.$$.fragment)},l(t){S(e.$$.fragment,t)},m(t,s){P(e,t,s),n=!0},p(t,[n]){const s={};1&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){T(e,t)}}}function Et(t){let e,n,s,o,r,$,g,v,w;return{c(){e=a("div"),n=a("hr"),s=c(),o=a("h3"),r=l("Hello, I am here!"),$=c(),g=a("hr")},l(t){e=i(t,"DIV",{});var a=u(e);n=i(a,"HR",{}),s=h(a),o=i(a,"H3",{});var l=u(o);r=p(l,"Hello, I am here!"),l.forEach(f),$=h(a),g=i(a,"HR",{}),a.forEach(f)},m(t,a){m(t,e,a),d(e,n),d(e,s),d(e,o),d(o,r),d(e,$),d(e,g),w=!0},p(e,n){t=e},i(n){w||(b((()=>{v||(v=y(e,N,t[0],!0)),v.run(1)})),w=!0)},o(n){v||(v=y(e,N,t[0],!1)),v.run(0),w=!1},d(t){t&&f(e),t&&v&&v.end()}}}function kt(t){let e,n,s,o,r,$,g=t[0]&&Et(t);return{c(){g&&g.c(),e=c(),n=a("button"),s=l("Toggle visibility")},l(t){g&&g.l(t),e=h(t),n=i(t,"BUTTON",{});var o=u(n);s=p(o,"Toggle visibility"),o.forEach(f)},m(a,l){g&&g.m(a,l),m(a,e,l),m(a,n,l),d(n,s),o=!0,r||($=A(n,"click",t[1]),r=!0)},p(t,n){t[0]?g?(g.p(t,n),1&n&&w(g,1)):(g=Et(t),g.c(),w(g,1),g.m(e.parentNode,e)):g&&(I(),k(g,1,1,(()=>{g=null})),R())},i(t){o||(w(g),o=!0)},o(t){k(g),o=!1},d(t){g&&g.d(t),t&&f(e),t&&f(n),r=!1,$()}}}function xt(t){let e,n;return e=new $t({props:{path:"/sliding",title:"A little sliding thing",$$slots:{default:[kt]},$$scope:{ctx:t}}}),{c(){x(e.$$.fragment)},l(t){S(e.$$.fragment,t)},m(t,s){P(e,t,s),n=!0},p(t,[n]){const s={};5&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){T(e,t)}}}function St(t,e,n){let s=!0;return[s,()=>n(0,s=!s)]}function Pt(t){let e,n,s,o,r,v,b,y,E,N,A=t[0]?"on":"off";return e=new U({props:{checked:t[0]}}),e.$on("change",t[1]),{c(){x(e.$$.fragment),n=c(),s=a("br"),o=c(),r=a("p"),v=l("The switch is "),b=a("strong"),y=l(A),E=l("."),this.h()},l(t){S(e.$$.fragment,t),n=h(t),s=i(t,"BR",{}),o=h(t),r=i(t,"P",{class:!0});var a=u(r);v=p(a,"The switch is "),b=i(a,"STRONG",{});var l=u(b);y=p(l,A),l.forEach(f),E=p(a,"."),a.forEach(f),this.h()},h(){$(r,"class","svelte-1ae7t9m")},m(t,a){P(e,t,a),m(t,n,a),m(t,s,a),m(t,o,a),m(t,r,a),d(r,v),d(r,b),d(b,y),d(r,E),N=!0},p(t,n){const s={};1&n&&(s.checked=t[0]),e.$set(s),(!N||1&n)&&A!==(A=t[0]?"on":"off")&&g(y,A)},i(t){N||(w(e.$$.fragment,t),N=!0)},o(t){k(e.$$.fragment,t),N=!1},d(t){T(e,t),t&&f(n),t&&f(s),t&&f(o),t&&f(r)}}}function Tt(t){let e,n;return e=new $t({props:{path:"/switch",title:"An npm-installed switch component",$$slots:{default:[Pt]},$$scope:{ctx:t}}}),{c(){x(e.$$.fragment)},l(t){S(e.$$.fragment,t)},m(t,s){P(e,t,s),n=!0},p(t,[n]){const s={};5&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){T(e,t)}}}function Nt(t,e,n){let s=!0;return[s,function(t){const{checked:e}=t.detail;n(0,s=e)}]}function At(t,e,n){const s=t.slice();return s[2]=e[n],s}function It(t){let e,n,s=t[2].data+"";return{c(){e=a("li"),n=l(s)},l(t){e=i(t,"LI",{});var o=u(e);n=p(o,s),o.forEach(f)},m(t,s){m(t,e,s),d(e,n)},p(t,e){1&e&&s!==(s=t[2].data+"")&&g(n,s)},d(t){t&&f(e)}}}function Rt(t){let e,n,s,o,r=t[0],$=[];for(let a=0;a<r.length;a+=1)$[a]=It(At(t,r,a));return{c(){e=a("p"),n=l("This is private."),s=c(),o=a("ul");for(let t=0;t<$.length;t+=1)$[t].c()},l(t){e=i(t,"P",{});var r=u(e);n=p(r,"This is private."),r.forEach(f),s=h(t),o=i(t,"UL",{});var a=u(o);for(let e=0;e<$.length;e+=1)$[e].l(a);a.forEach(f)},m(t,r){m(t,e,r),d(e,n),m(t,s,r),m(t,o,r);for(let e=0;e<$.length;e+=1)$[e].m(o,null)},p(t,e){if(1&e){let n;for(r=t[0],n=0;n<r.length;n+=1){const s=At(t,r,n);$[n]?$[n].p(s,e):($[n]=It(s),$[n].c(),$[n].m(o,null))}for(;n<$.length;n+=1)$[n].d(1);$.length=r.length}},d(t){t&&f(e),t&&f(s),t&&f(o),H($,t)}}}function Ut(t){let e,n;return e=new $t({props:{title:"Private",$$slots:{default:[Rt]},$$scope:{ctx:t}}}),{c(){x(e.$$.fragment)},l(t){S(e.$$.fragment,t)},m(t,s){P(e,t,s),n=!0},p(t,[n]){const s={};33&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){T(e,t)}}}function Lt(t,e,n){let s;const{privateMessages:o}=L(at);return B(t,o,(t=>n(0,s=t))),[s,o]}async function Bt(t){const e=`https://${window.location.hostname}/private-token`,n=await fetch(e),s=(await n.json()).encryptedPrivateToken,o=await fetch(`https://${window.location.hostname}/hostname`),r=(await o.json()).hostname;console.log("Production hostname: ",r);const a=O.blake2bHex(r),l=await function(t,e){return new Promise(((n,s)=>{C(t,e,(function(t,e){if(t)return console.log("error",t),s(t);n(e)}))}))}(a,t),c=function(t){let e="";for(let n=0,s=t.length;n<s;n++)e+=Mt[t[n]];return e}(l.publicKey);console.log("Public key: ",c),console.log("encryptedPrivateToken",s);const i=M.sealedBox.open(function(t){for(var e=new Uint8Array(Math.ceil(t.length/2)),n=0;n<e.length;n++)e[n]=parseInt(t.substr(2*n,2),16);return e}(s),l.publicKey,l.secretKey);if(null===i)return console.log("Error: could not decrypt the private token."),null;const u=j.encodeUTF8(i);return console.log("Unencrypted private token: ",u),u}M.sealedBox=W;const Ht=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"],Mt=new Array(256);for(let pe=0;pe<256;pe++)Mt[pe]=`${Ht[pe>>>4&15]}${Ht[15&pe]}`;function Wt(t){let e,n,s=t[9].message+"";return{c(){e=a("p"),n=l(s),this.h()},l(t){e=i(t,"P",{style:!0});var o=u(e);n=p(o,s),o.forEach(f),this.h()},h(){Y(e,"color","red")},m(t,s){m(t,e,s),d(e,n)},p(t,e){2&e&&s!==(s=t[9].message+"")&&g(n,s)},i:q,o:q,d(t){t&&f(e)}}}function Ot(t){let e,n=void 0!==t[8]&&Ct(t);return{c(){n&&n.c(),e=_()},l(t){n&&n.l(t),e=_()},m(t,s){n&&n.m(t,s),m(t,e,s)},p(t,s){void 0!==t[8]?n?n.p(t,s):(n=Ct(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:q,o:q,d(t){n&&n.d(t),t&&f(e)}}}function Ct(t){let e;function n(t,e){return null===t[8]?Ft:jt}let s=n(t),o=s(t);return{c(){o.c(),e=_()},l(t){o.l(t),e=_()},m(t,n){o.m(t,n),m(t,e,n)},p(t,r){s===(s=n(t))&&o?o.p(t,r):(o.d(1),o=s(t),o&&(o.c(),o.m(e.parentNode,e)))},d(t){o.d(t),t&&f(e)}}}function jt(t){let e,n=(t[3](),"");return{c(){e=l(n)},l(t){e=p(t,n)},m(t,n){m(t,e,n)},p:q,d(t){t&&f(e)}}}function Ft(t){let e,n,s,o;return{c(){e=a("p"),n=a("strong"),s=l("Sign in failed."),o=l(" Please try again.")},l(t){e=i(t,"P",{});var r=u(e);n=i(r,"STRONG",{});var a=u(n);s=p(a,"Sign in failed."),a.forEach(f),o=p(r," Please try again."),r.forEach(f)},m(t,r){m(t,e,r),d(e,n),d(n,s),d(e,o)},p:q,d(t){t&&f(e)}}}function _t(t){let e,n,s,o,r;return o=new z({}),{c(){e=a("p"),n=l("Authenticating…"),s=c(),x(o.$$.fragment)},l(t){e=i(t,"P",{});var r=u(e);n=p(r,"Authenticating…"),r.forEach(f),s=h(t),S(o.$$.fragment,t)},m(t,a){m(t,e,a),d(e,n),m(t,s,a),P(o,t,a),r=!0},p:q,i(t){r||(w(o.$$.fragment,t),r=!0)},o(t){k(o.$$.fragment,t),r=!1},d(t){t&&f(e),t&&f(s),T(o,t)}}}function Kt(t){let e,n,s,o,r,g,v,b,y,E,x,S,P,T,N={ctx:t,current:null,token:null,hasCatch:!0,pending:_t,then:Ot,catch:Wt,value:8,error:9,blocks:[,,,]};return F(x=t[1],N),{c(){e=a("form"),n=a("label"),s=l("Password"),o=c(),r=a("input"),g=c(),v=a("button"),b=l("Sign in"),y=c(),E=_(),N.block.c(),this.h()},l(t){e=i(t,"FORM",{id:!0,name:!0});var a=u(e);n=i(a,"LABEL",{for:!0});var l=u(n);s=p(l,"Password"),l.forEach(f),o=h(a),r=i(a,"INPUT",{name:!0,type:!0}),g=h(a),v=i(a,"BUTTON",{});var c=u(v);b=p(c,"Sign in"),c.forEach(f),a.forEach(f),y=h(t),E=_(),N.block.l(t),this.h()},h(){$(n,"for","passphrase"),$(r,"name","passphrase"),$(r,"type","password"),$(e,"id","signInForm"),$(e,"name","signInForm")},m(a,l){m(a,e,l),d(e,n),d(n,s),d(e,o),d(e,r),t[5](r),d(e,g),d(e,v),d(v,b),m(a,y,l),m(a,E,l),N.block.m(a,N.anchor=l),N.mount=()=>E.parentNode,N.anchor=E,S=!0,P||(T=A(e,"submit",K(t[4])),P=!0)},p(e,n){if(t=e,N.ctx=t,2&n&&x!==(x=t[1])&&F(x,N));else{const e=t.slice();e[8]=e[9]=N.resolved,N.block.p(e,n)}},i(t){S||(w(N.block),S=!0)},o(t){for(let e=0;e<3;e+=1){const t=N.blocks[e];k(t)}S=!1},d(n){n&&f(e),t[5](null),n&&f(y),n&&f(E),N.block.d(n),N.token=null,N=null,P=!1,T()}}}function Dt(t){let e,n;return e=new $t({props:{title:"Sign in",$$slots:{default:[Kt]},$$scope:{ctx:t}}}),{c(){x(e.$$.fragment)},l(t){S(e.$$.fragment,t)},m(t,s){P(e,t,s),n=!0},p(t,[n]){const s={};1027&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){T(e,t)}}}function Gt(t,e,n){let s,o;B(t,lt,(t=>n(7,o=t)));let r,a,{privateToken:l}=L(at);return B(t,l,(t=>n(6,s=t))),t.$$.update=()=>{1&t.$$.dirty&&null!=r&&r.focus()},[r,a,l,async function(){return D(l,s=await a,s),n(1,a=void 0),D(lt,o=!0,o),G("/private"),""},function(){n(1,a=Bt(r.value))},function(t){V[t?"unshift":"push"]((()=>{r=t,n(0,r)}))}]}function Vt(t){let e,n,s,o,r,$,g;return{c(){e=a("p"),n=l("Are you sure?"),s=c(),o=a("button"),r=l("Yes, sign me out.")},l(t){e=i(t,"P",{});var a=u(e);n=p(a,"Are you sure?"),a.forEach(f),s=h(t),o=i(t,"BUTTON",{});var l=u(o);r=p(l,"Yes, sign me out."),l.forEach(f)},m(a,l){m(a,e,l),d(e,n),m(a,s,l),m(a,o,l),d(o,r),$||(g=A(o,"click",K(t[0])),$=!0)},p:q,d(t){t&&f(e),t&&f(s),t&&f(o),$=!1,g()}}}function Yt(t){let e,n;return e=new $t({props:{title:"Sign out",$$slots:{default:[Vt]},$$scope:{ctx:t}}}),{c(){x(e.$$.fragment)},l(t){S(e.$$.fragment,t)},m(t,s){P(e,t,s),n=!0},p(t,[n]){const s={};4&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){T(e,t)}}}function qt(t,e,n){let s;return B(t,lt,(t=>n(1,s=t))),[async function(){D(lt,s=!1,s),G("/sign-in")}]}function zt(t){let e,n,s,o;return{c(){e=a("p"),n=l("Sorry, cannot find section "),s=l(t[0]),o=l(".")},l(r){e=i(r,"P",{});var a=u(e);n=p(a,"Sorry, cannot find section "),s=p(a,t[0]),o=p(a,"."),a.forEach(f)},m(t,r){m(t,e,r),d(e,n),d(e,s),d(e,o)},p(t,e){1&e&&g(s,t[0])},d(t){t&&f(e)}}}function Jt(t){let e,n;return e=new $t({props:{path:"/404",title:"404: not found",$$slots:{default:[zt]},$$scope:{ctx:t}}}),{c(){x(e.$$.fragment)},l(t){S(e.$$.fragment,t)},m(t,s){P(e,t,s),n=!0},p(t,[n]){const s={};3&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){T(e,t)}}}function Qt(t,e,n){let s=location.hash.replace("#","");return window.addEventListener("hashchange",(()=>{n(0,s=location.hash.replace("#",""))})),[s]}let Xt;lt.subscribe((t=>{console.log(`Sections: signed in changed to ${t}`),Xt=t}));const Zt=[{path:"/",title:"Home",route:class extends n{constructor(t){super(),s(this,t,null,wt,o,{})}}},{path:"/about",title:"About",route:class extends n{constructor(t){super(),s(this,t,null,yt,o,{})}}},{path:"/sliding",title:"Sliding",route:class extends n{constructor(t){super(),s(this,t,St,xt,o,{})}}},{path:"/switch",title:"Switch",route:class extends n{constructor(t){super(),s(this,t,Nt,Tt,o,{})}}},{path:"/sign-in",title:"Sign in",route:class extends n{constructor(t){super(),s(this,t,Gt,Dt,o,{})}}},{path:"/sign-out",title:"Sign out",route:class extends n{constructor(t){super(),s(this,t,qt,Yt,o,{})}},isPrivate:!0},{path:"/private",title:"Private",route:class extends n{constructor(t){super(),s(this,t,Lt,Ut,o,{})}},isPrivate:!0},{path:"/setup",title:"Setup",notInNavigation:!0,route:class extends n{constructor(t){super(),s(this,t,null,dt,o,{})}}},{path:"*",title:"404: not found",notInNavigation:!0,route:class extends n{constructor(t){super(),s(this,t,Qt,Jt,o,{})}}}],te=()=>(Xt||Q("/sign-in"),Xt);let ee=new Map;Zt.forEach((t=>{const e=J({component:t.route,props:{title:t.title}});t.isPrivate&&(e.conditions=[te]),ee.set(t.path,e)}));function ne(t,e,n){const s=t.slice();return s[1]=e[n],s}function se(t){let e,n,s,o,r,g,v=t[1].title+"";return{c(){e=a("li"),n=a("a"),s=l(v),o=c(),this.h()},l(t){e=i(t,"LI",{class:!0});var r=u(e);n=i(r,"A",{href:!0});var a=u(n);s=p(a,v),a.forEach(f),o=h(r),r.forEach(f),this.h()},h(){$(n,"href",t[1].path),$(e,"class","svelte-1u66s9g")},m(t,a){m(t,e,a),d(e,n),d(n,s),d(e,o),r||(g=[X(Z.call(null,n)),X(tt.call(null,n))],r=!0)},p:q,d(t){t&&f(e),r=!1,et(g)}}}function oe(t){let e,n=!t[1].notInNavigation&&ae(t[1],t[0]),s=n&&se(t);return{c(){s&&s.c(),e=_()},l(t){s&&s.l(t),e=_()},m(t,n){s&&s.m(t,n),m(t,e,n)},p(t,o){1&o&&(n=!t[1].notInNavigation&&ae(t[1],t[0])),n?s?s.p(t,o):(s=se(t),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null)},d(t){s&&s.d(t),t&&f(e)}}}function re(t){let e,n,s=Zt,o=[];for(let r=0;r<s.length;r+=1)o[r]=oe(ne(t,s,r));return{c(){e=a("nav"),n=a("ul");for(let t=0;t<o.length;t+=1)o[t].c();this.h()},l(t){e=i(t,"NAV",{});var s=u(e);n=i(s,"UL",{class:!0});var r=u(n);for(let e=0;e<o.length;e+=1)o[e].l(r);r.forEach(f),s.forEach(f),this.h()},h(){$(n,"class","svelte-1u66s9g")},m(t,s){m(t,e,s),d(e,n);for(let e=0;e<o.length;e+=1)o[e].m(n,null)},p(t,[e]){if(1&e){let r;for(s=Zt,r=0;r<s.length;r+=1){const a=ne(t,s,r);o[r]?o[r].p(a,e):(o[r]=oe(a),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=s.length}},i:q,o:q,d(t){t&&f(e),H(o,t)}}}function ae(t,e){const n=!t.notInNavigation,s=!t.isPrivate,o=t.isPrivate&&e,r=!("/sign-in"==t.path&&e);return n&&(s||o)&&r}function le(t,e,n){let s;return B(t,lt,(t=>n(0,s=t))),[s]}class ce extends n{constructor(t){super(),s(this,t,le,re,o,{})}}function ie(t){let e,n,s,o,r,g,v,b;return o=new ce({}),v=new nt({props:{routes:ee}}),{c(){e=a("h1"),n=l("Small Web Reference Client (Henry)"),s=c(),x(o.$$.fragment),r=c(),g=a("main"),x(v.$$.fragment),this.h()},l(t){e=i(t,"H1",{});var a=u(e);n=p(a,"Small Web Reference Client (Henry)"),a.forEach(f),s=h(t),S(o.$$.fragment,t),r=h(t),g=i(t,"MAIN",{class:!0});var l=u(g);S(v.$$.fragment,l),l.forEach(f),this.h()},h(){$(g,"class","svelte-xl3vai")},m(t,a){m(t,e,a),d(e,n),m(t,s,a),P(o,t,a),m(t,r,a),m(t,g,a),P(v,g,null),b=!0},p:q,i(t){b||(w(o.$$.fragment,t),w(v.$$.fragment,t),b=!0)},o(t){k(o.$$.fragment,t),k(v.$$.fragment,t),b=!1},d(t){t&&f(e),t&&f(s),T(o,t),t&&f(r),t&&f(g),T(v)}}}function ue(t,n,s){let o,r,a,l;e(at,{signedIn:lt,publicSocket:pt,privateToken:it,privateSocket:ut,privateMessages:ct});const{publicSocket:c,privateToken:i,privateSocket:u,privateMessages:p}=L(at);return B(t,c,(t=>s(4,o=t))),B(t,i,(t=>s(7,l=t))),B(t,u,(t=>s(5,r=t))),B(t,p,(t=>s(6,a=t))),st((()=>{D(c,o=new WebSocket(`wss://${location.hostname}/public`),o),D(c,o.onmessage=t=>{console.log(`Public message: ${t.data}`)},o),lt.subscribe((t=>{t?(console.log("Attempting to connect using private token",ot(i)),D(u,r=new WebSocket(`wss://${location.hostname}/private/${ot(i)}`),r),D(u,r.onmessage=t=>{D(p,a=[...a,t],a)},r)):null!==r&&(0!==r.readyState&&1!==r.readyState||(console.log("Signed out, closing private socket."),r.send("Client is about to close."),r.close(1e3,"Person signed out."),D(i,l=null,l),D(p,a=[],a)))}))})),[c,i,u,p]}globalThis.Buffer=rt.Buffer,new class extends n{constructor(t){super(),s(this,t,ue,ie,o,{})}}({target:document.getElementById("svelte")});
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif}button,input,label{font-size:1.25em}button,input{background:#fff;color:#000;border:2px solid grey;border-radius:.25em;padding:.5em}button:focus,input:focus{outline:0;box-shadow:0 0 2px #06f}section.svelte-1as3kqo{position:absolute;top:0}p.svelte-1ae7t9m{font-size:1.4em}ul.svelte-1u66s9g{list-style-type:none;padding:0 0 1em 0;border-bottom:1px solid gray}li.svelte-1u66s9g{display:inline-block}li.svelte-1u66s9g:not(:first-child):before{content:'|';padding-right:.5em}li.svelte-1u66s9g:not(:last-child){padding-right:.5em}a.active{color:#000;text-decoration:none}main.svelte-xl3vai{position:relative}
\ No newline at end of file
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif}button,input,label{font-size:1.25em}button,input{background:#fff;color:#000;border:2px solid grey;border-radius:.25em;padding:.5em}button:focus,input:focus{outline:0;box-shadow:0 0 2px #06f}section.svelte-1as3kqo{position:absolute;top:0}h3.svelte-10tfvbd{background-color:#b0c4de;padding:.25em}ul.svelte-1u66s9g{list-style-type:none;padding:0 0 1em 0;border-bottom:1px solid gray}li.svelte-1u66s9g{display:inline-block}li.svelte-1u66s9g:not(:first-child):before{content:'|';padding-right:.5em}li.svelte-1u66s9g:not(:last-child){padding-right:.5em}a.active{color:#000;text-decoration:none}main.svelte-xl3vai{position:relative}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -4,10 +4,10 @@
<link rel="icon" href="data:,"> <!-- no favicon request -->
<title>Henry: Small Web Reference Client</title>
<script type="module" crossorigin="" src="/assets/index.125f1f98.js" integrity="sha384-WLN8BviApmlzCS9/cR8GV4AMmQMEM57YduIdGp4rQ63xdpfD2sDtNppO1cuc/ATV"></script>
<link rel="modulepreload" href="/assets/vendor.328a5a9a.js">
<script type="module" crossorigin="" src="/assets/index.fb4336c4.js" integrity="sha384-mPBAxS3oaIFae1UMfnRIgS7o7dTg4TNfqAAx5TEqHUtI+ZMCV4lbm8Dfrq9MYw+v"></script>
<link rel="modulepreload" href="/assets/vendor.a9672bda.js">
<link rel="stylesheet" href="/assets/vendor.d75d5eb7.css" integrity="sha384-zP7hpJGwOZ+WoQ4spFKeHn1HpZp2YbdoUhJLDnNRBnxijRk151uEMhuDyvNc+yM8">
<link rel="stylesheet" href="/assets/index.5023e28c.css" integrity="sha384-bEQUDyTlsJptKzE3SMDEzxYvWS1nkdqjNPgsO7z4+pswB2PpRL8gTI9/wpfKV9FU">
<link rel="stylesheet" href="/assets/index.d8c315d9.css" integrity="sha384-NSbru+2A86tINcDG4WCdJkxIy1YGPsz686MhXq/rzJioroFab91c/PbEqqBiW0u8">
</head>
<body>
<div id="svelte"></div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment