manifest
Version:
Self-hosted Manifest LLM router with embedded server, SQLite database, and dashboard
2 lines (1 loc) • 4.1 kB
JavaScript
import{a as o,g as n,T as V,M as X,i as r,m,h as c,A as f,S as $,t as s,d as j}from"./vendor-C-Y5oNOq.js";import{S as z}from"./SocialButtons-DudwEJ6b.js";import{s as L}from"./index-C4Qw7vZo.js";import"./auth-CU91cd7V.js";var G=s("<div class=auth-header><h1 class=auth-header__title>Check your email</h1><p class=auth-header__subtitle>We sent a verification link to <strong>"),J=s("<div class=auth-form><div class=auth-form__success>Click the link in your email to verify your account and get started.</div><button class=auth-form__link-btn>"),K=s("<div class=auth-footer>"),Q=s("<div class=auth-header><h1 class=auth-header__title>Create an account</h1><p class=auth-header__subtitle>Monitor your AI agents' costs and usage"),Z=s("<div class=auth-divider><span class=auth-divider__text>or"),ee=s("<div class=auth-form__error role=alert>An account with this email already exists. <!> or <!>."),M=s("<div class=auth-form__error role=alert>"),te=s('<form class=auth-form><label class=auth-form__label>Name<input class=auth-form__input type=text placeholder="Your name"required></label><label class=auth-form__label>Email<input class=auth-form__input type=email placeholder=you@example.com required></label><label class=auth-form__label>Password<input class=auth-form__input type=password placeholder="Create a password"required minlength=8></label><button class=auth-form__submit type=submit>'),ae=s("<p class=auth-terms>By signing up, you agree to our <a href=# class=auth-terms__link>Terms</a> and <a href=# class=auth-terms__link>Privacy Policy"),re=s("<div class=auth-footer><span>Already have an account? "),le=s("<span class=spinner>");const se=60,ce=()=>{const[g,N]=o(""),[_,D]=o(""),[v,O]=o(""),[d,p]=o(""),[b,S]=o(!1),[U,P]=o(!1),[y,C]=o(!1),[h,E]=o(0),w=()=>{E(se);const e=setInterval(()=>{E(a=>a<=1?(clearInterval(e),0):a-1)},1e3)},q=async e=>{e.preventDefault(),p(""),S(!0);const{data:a,error:l}=await L.signUp.email({name:g(),email:_(),password:v()});if(S(!1),l){l.code==="USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL"&&C(!0),p(l.message??"Registration failed");return}if(C(!1),a?.token){window.location.href="/";return}P(!0),w()},B=async()=>{if(h()>0)return;const{error:e}=await L.sendVerificationEmail({email:_(),callbackURL:"/"});if(e){p(e.message??"Failed to resend verification email");return}w()};return[n(V,{children:"Sign Up - Manifest"}),n(X,{name:"description",content:"Create a Manifest account to start monitoring your AI agents."}),n($,{get when(){return U()},get fallback(){return[Q(),n(z,{}),Z(),(()=>{var e=te(),a=e.firstChild,l=a.firstChild,i=l.nextSibling,u=a.nextSibling,W=u.firstChild,x=W.nextSibling,k=u.nextSibling,Y=k.firstChild,R=Y.nextSibling,A=k.nextSibling;return e.addEventListener("submit",q),r(e,n($,{get when(){return y()},get children(){var t=ee(),F=t.firstChild,T=F.nextSibling,H=T.nextSibling,I=H.nextSibling;return I.nextSibling,r(t,n(f,{href:"/login",class:"auth-form__error-link",children:"Sign in"}),T),r(t,n(f,{href:"/reset-password",class:"auth-form__error-link",children:"reset your password"}),I),t}}),a),r(e,n($,{get when(){return m(()=>!!d())()&&!y()},get children(){var t=M();return r(t,d),t}}),a),i.$$input=t=>N(t.currentTarget.value),x.$$input=t=>D(t.currentTarget.value),R.$$input=t=>O(t.currentTarget.value),r(A,(()=>{var t=m(()=>!!b());return()=>t()?le():"Create account"})()),c(()=>A.disabled=b()),c(()=>i.value=g()),c(()=>x.value=_()),c(()=>R.value=v()),e})(),ae(),(()=>{var e=re();return e.firstChild,r(e,n(f,{href:"/login",class:"auth-footer__link",children:"Sign in"}),null),e})()]},get children(){return[(()=>{var e=G(),a=e.firstChild,l=a.nextSibling,i=l.firstChild,u=i.nextSibling;return r(u,_),e})(),(()=>{var e=J(),a=e.firstChild,l=a.nextSibling;return r(e,(()=>{var i=m(()=>!!d());return()=>i()&&(()=>{var u=M();return r(u,d),u})()})(),a),l.$$click=B,r(l,(()=>{var i=m(()=>h()>0);return()=>i()?`Resend in ${h()}s`:"Resend verification email"})()),c(()=>l.disabled=h()>0),e})(),(()=>{var e=K();return r(e,n(f,{href:"/login",class:"auth-footer__link",children:"Back to sign in"})),e})()]}})]};j(["click","input"]);export{ce as default};