mirror of
https://github.com/pockethost/pockethost.git
synced 2025-06-11 08:36:41 +00:00
3 lines
4.5 KiB
JavaScript
3 lines
4.5 KiB
JavaScript
import{s as de,a as g,f as o,l as oe,D as ce,d as p,c as x,g as u,h as E,x as H,m as ue,j as s,i as Y,y as t,E as N,A as W,F as fe,n as pe,G as he}from"../chunks/scheduler.de195056.js";import{S as me,i as ve,a as X,t as le,c as _e,f as re,g as be}from"../chunks/index.c6f2ad36.js";import{s as ie}from"../chunks/index.3f7c9ec2.js";import{a as we}from"../chunks/database.5ddaa35e.js";function ne(h){let i,l,c,a,m,f,w;return{c(){i=o("div"),l=o("i"),c=g(),a=o("span"),m=oe(h[2]),this.h()},l(e){i=u(e,"DIV",{class:!0});var n=E(i);l=u(n,"I",{class:!0}),E(l).forEach(p),c=x(n),a=u(n,"SPAN",{});var v=E(a);m=ue(v,h[2]),v.forEach(p),n.forEach(p),this.h()},h(){s(l,"class","fa-solid fa-circle-exclamation"),s(i,"class","alert alert-error mb-5")},m(e,n){Y(e,i,n),t(i,l),t(i,c),t(i,a),t(a,m),w=!0},p(e,n){(!w||n&4)&&pe(m,e[2])},i(e){w||(e&&he(()=>{w&&(f||(f=re(i,ie,{},!0)),f.run(1))}),w=!0)},o(e){e&&(f||(f=re(i,ie,{},!1)),f.run(0)),w=!1},d(e){e&&p(i),e&&f&&f.end()}}}function Ee(h){let i,l,c,a,m,f="Login",w,e,n,v,M="Email address",j,_,F,L,D,Z="Password",U,b,O,V,G,S,I,R,q,z,P,$="<hr/>",J,T,ee=`<a class="link" href="/signup">sign up</a> |
|
|
<a class="link" href="/login/password-reset">forgot password</a>`,K,te,r=h[2]&&ne(h);return{c(){i=g(),l=o("div"),c=o("div"),a=o("div"),m=o("h2"),m.textContent=f,w=g(),e=o("form"),n=o("div"),v=o("label"),v.textContent=M,j=g(),_=o("input"),F=g(),L=o("div"),D=o("label"),D.textContent=Z,U=g(),b=o("input"),O=g(),V=o("p"),G=g(),r&&r.c(),S=g(),I=o("button"),R=oe("Log In "),q=o("i"),z=g(),P=o("div"),P.innerHTML=$,J=g(),T=o("div"),T.innerHTML=ee,this.h()},l(d){ce("svelte-wfjm72",document.head).forEach(p),i=x(d),l=u(d,"DIV",{class:!0});var se=E(l);c=u(se,"DIV",{class:!0});var ae=E(c);a=u(ae,"DIV",{class:!0});var k=E(a);m=u(k,"H2",{class:!0,"data-svelte-h":!0}),H(m)!=="svelte-dkfxp7"&&(m.textContent=f),w=x(k),e=u(k,"FORM",{});var y=E(e);n=u(y,"DIV",{class:!0});var A=E(n);v=u(A,"LABEL",{class:!0,for:!0,"data-svelte-h":!0}),H(v)!=="svelte-1ts02yh"&&(v.textContent=M),j=x(A),_=u(A,"INPUT",{type:!0,class:!0,id:!0,placeholder:!0,autocomplete:!0}),A.forEach(p),F=x(y),L=u(y,"DIV",{class:!0});var B=E(L);D=u(B,"LABEL",{class:!0,for:!0,"data-svelte-h":!0}),H(D)!=="svelte-m1esth"&&(D.textContent=Z),U=x(B),b=u(B,"INPUT",{type:!0,class:!0,id:!0,placeholder:!0,autocomplete:!0}),B.forEach(p),O=x(y),V=u(y,"P",{class:!0}),E(V).forEach(p),G=x(y),r&&r.l(y),S=x(y),I=u(y,"BUTTON",{type:!0,class:!0});var Q=E(I);R=ue(Q,"Log In "),q=u(Q,"I",{class:!0}),E(q).forEach(p),Q.forEach(p),y.forEach(p),z=x(k),P=u(k,"DIV",{class:!0,"data-svelte-h":!0}),H(P)!=="svelte-18ir1wq"&&(P.innerHTML=$),J=x(k),T=u(k,"DIV",{class:!0,"data-svelte-h":!0}),H(T)!=="svelte-1u8qnq1"&&(T.innerHTML=ee),k.forEach(p),ae.forEach(p),se.forEach(p),this.h()},h(){document.title="Sign In - PocketHost",s(m,"class","card-title mb-4"),s(v,"class","label"),s(v,"for","email"),s(_,"type","email"),s(_,"class","input input-bordered w-full max-w-xs"),s(_,"id","email"),s(_,"placeholder","name@example.com"),_.required=!0,s(_,"autocomplete","email"),s(n,"class","form-control w-full max-w-xs"),s(D,"class","label"),s(D,"for","password"),s(b,"type","password"),s(b,"class","input input-bordered w-full max-w-xs"),s(b,"id","password"),s(b,"placeholder","Password"),b.required=!0,s(b,"autocomplete","current-password"),s(L,"class","form-control w-full max-w-xs"),s(V,"class","m-3"),s(q,"class","bi bi-arrow-right-short"),s(I,"type","submit"),s(I,"class","btn btn-primary w-100"),I.disabled=h[3],s(P,"class","py-4"),s(T,"class","text-center"),s(a,"class","card-body"),s(c,"class","card w-96 bg-base-100 shadow-xl"),s(l,"class","flex justify-center")},m(d,C){Y(d,i,C),Y(d,l,C),t(l,c),t(c,a),t(a,m),t(a,w),t(a,e),t(e,n),t(n,v),t(n,j),t(n,_),N(_,h[0]),t(e,F),t(e,L),t(L,D),t(L,U),t(L,b),N(b,h[1]),t(e,O),t(e,V),t(e,G),r&&r.m(e,null),t(e,S),t(e,I),t(I,R),t(I,q),t(a,z),t(a,P),t(a,J),t(a,T),K||(te=[W(_,"input",h[5]),W(b,"input",h[6]),W(e,"submit",h[4])],K=!0)},p(d,[C]){C&1&&_.value!==d[0]&&N(_,d[0]),C&2&&b.value!==d[1]&&N(b,d[1]),d[2]?r?(r.p(d,C),C&4&&X(r,1)):(r=ne(d),r.c(),X(r,1),r.m(e,S)):r&&(be(),le(r,1,1,()=>{r=null}),_e()),C&8&&(I.disabled=d[3])},i(d){X(r)},o(d){le(r)},d(d){d&&(p(i),p(l)),r&&r.d(),K=!1,fe(te)}}}function ge(h,i,l){let c="",a="",m="",f=!0;const w=async v=>{v.preventDefault(),l(3,f=!0),await we(c,a,M=>{l(2,m=M)}),l(3,f=!1)};function e(){c=this.value,l(0,c)}function n(){a=this.value,l(1,a)}return h.$$.update=()=>{h.$$.dirty&3&&l(3,f=c.length===0||a.length===0)},[c,a,m,f,w,e,n]}class Le extends me{constructor(i){super(),ve(this,i,ge,Ee,de,{})}}export{Le as component};
|