1var R=Object.defineProperty;var L=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var j=(d,n,s)=>n in d?R(d,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):d[n]=s,M=(d,n)=>{for(var s in n||(n={}))W.call(n,s)&&j(d,s,n[s]);if(L)for(var s of L(n))$.call(n,s)&&j(d,s,n[s]);return d};import{W as T,X as z,y as F,e as b,r as v,a as A,s as G,b as H,l as _,o as c,g as l,h as i,i as m,t as o,j as f,F as y,m as J,a7 as O,B as X,Z as Y,f as P,a8 as Z,a9 as K,w as Q,_ as ee,k as le,aa as ae}from"./index-DkHxERqz.js";import{I as h}from"./Input-Bm08PcR5.js";import{v as B}from"./vmms-BYVWwStu.js";import{i as se,r as te}from"./volunteer-GgeCYVIx.js";const oe={class:"flex min-h-screen bg-surface-white"},ne={class:"relative hidden w-1/2 flex-col justify-between overflow-hidden bg-gradient-to-br from-red-600 via-red-700 to-red-900 p-12 text-white lg:flex"},re={class:"relative flex items-center gap-3"},ie=["src","alt"],de={class:"text-xl font-semibold tracking-wide"},ue={class:"relative max-w-md"},me={class:"text-sm font-medium uppercase tracking-[0.2em] text-red-200"},ce={class:"mt-3 text-4xl font-bold leading-tight"},pe={class:"mt-4 text-red-100"},ge={class:"mt-8 space-y-3 text-sm text-red-50"},_e={class:"flex h-6 w-6 items-center justify-center rounded-full bg-white/15"},he={class:"relative text-xs text-red-200"},be={class:"flex w-full flex-col items-center justify-center bg-surface-gray-1 px-4 py-10 lg:w-1/2"},ve={class:"mb-8 flex items-center gap-3 lg:hidden"},fe=["src","alt"],ye={class:"text-lg font-semibold text-ink-gray-9"},we={class:"px-8 pt-8 pb-4 border-b border-outline-gray-1"},xe={class:"text-2xl font-semibold text-ink-gray-9"},ke={class:"mt-1 text-sm text-ink-gray-5"},Ve={class:"flex items-end gap-2"},Se=["aria-label","aria-pressed"],Me={class:"mt-1 text-right"},Fe={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},Ue={class:"px-8 py-4 border-t border-outline-gray-1 text-center text-sm text-ink-gray-5"},qe={__name:"Login",setup(d){const n=T(),s=z(),{branding:U}=F(),D=b(()=>{var e;return((e=U.data)==null?void 0:e.logo)||B}),g=b(()=>{var e;return((e=U.data)==null?void 0:e.brand_name)||"VMMS Portal"}),q=b(()=>[__("Become a member or renew in minutes"),__("Find and apply for volunteer opportunities"),__("Track your events, deployments and applications")]),p=v(!1),w=v(""),x=v(""),k=v(!1),u=A(M({},se)),V=F();let{isLoggedIn:C}=F();const r=b(()=>n.hash!=="#signup");function E(){r.value?s.replace({hash:"#signup"}):s.replace({hash:"#login"})}G(()=>{C&&s.push({name:"Dashboard"})});const S=H({url:"onerc_vmms.volunteer_and_member_management.api.user.create_user",onSuccess(){k.value=!0,te(u),s.replace({hash:"#login"})}});function N(){r.value?V.login.submit({usr:w.value,pwd:x.value},{onSuccess:()=>{const e=n.query["redirect-to"];e?s.push(e):s.push({name:"Dashboard"})}}):S.submit(M({},u))}function I(){window.location.href="/login#forgot"}return(e,a)=>(c(),_(y,null,[l("div",oe,[l("div",ne,[a[8]||(a[8]=l("div",{class:"absolute -top-24 -left-24 h-96 w-96 rounded-full bg-white/10 blur-3xl"},null,-1)),a[9]||(a[9]=l("div",{class:"absolute -bottom-32 -right-16 h-[28rem] w-[28rem] rounded-full bg-black/20 blur-3xl"},null,-1)),a[10]||(a[10]=l("div",{class:"absolute top-1/3 right-10 h-40 w-40 rounded-3xl border border-white/10 rotate-12"},null,-1)),a[11]||(a[11]=l("div",{class:"absolute bottom-24 left-16 h-24 w-24 rounded-2xl border border-white/10 -rotate-6"},null,-1)),l("div",re,[l("img",{src:m(B),alt:g.value,class:"h-12 w-12 rounded-xl object-contain shadow-lg"},null,8,ie),l("span",de,o(e.__(g.value)||"VMMS"),1)]),l("div",ue,[l("p",me,o(e.__("Volunteer & Member Portal")),1),l("h1",ce,[f(o(e.__("Serve. Belong.")),1),a[7]||(a[7]=l("br",null,null,-1)),f(" "+o(e.__("Make a difference.")),1)]),l("p",pe,o(e.__("Manage your membership, discover volunteer opportunities, and stay connected with your community â all in one place.")),1),l("ul",ge,[(c(!0),_(y,null,J(q.value,t=>(c(),_("li",{key:t,class:"flex items-center gap-3"},[l("span",_e,[i(m(O),{name:"check",class:"h-3.5 w-3.5"})]),f(" "+o(t),1)]))),128))])]),l("p",he," © "+o(new Date().getFullYear())+" "+o(e.__(g.value)),1)]),l("div",be,[l("div",ve,[l("img",{src:D.value,alt:g.value,class:"h-10 w-10 rounded-lg object-contain"},null,8,fe),l("span",ye,o(e.__(g.value)),1)]),l("div",{class:X([r.value?"max-w-md":"max-w-2xl","w-full rounded-2xl border border-outline-gray-1 bg-surface-white shadow-lg"])},[l("div",we,[l("h1",xe,o(r.value?e.__("Welcome back"):e.__("Create an account")),1),l("p",ke,o(r.value?e.__("Sign in to your VMMS Portal account"):e.__("Get started with the VMMS Portal")),1)]),l("form",{class:"px-8 py-6 flex flex-col space-y-4",onSubmit:Y(N,["prevent"])},[r.value?(c(),_(y,{key:0},[i(h,{required:"",name:"email",type:"email",autocomplete:"username",placeholder:e.__("[email protected]"),label:e.__("Email"),modelValue:w.value,"onUpdate:modelValue":a[0]||(a[0]=t=>w.value=t)},null,8,["placeholder","label","modelValue"]),l("div",null,[l("div",Ve,[i(
1h,{class:"flex-1",required:"",name:"password",autocomplete:"current-password",type:p.value?"text":"password",placeholder:e.__("â¢â¢â¢â¢â¢â¢"),label:e.__("Password"),modelValue:x.value,"onUpdate:modelValue":a[1]||(a[1]=t=>x.value=t)},null,8,["type","placeholder","label","modelValue"]),l("button",{type:"button",class:"mb-0.5 p-2 rounded-lg text-ink-gray-4 hover:text-ink-gray-6 hover:bg-surface-gray-2 transition-colors","aria-label":p.value?e.__("Hide password"):e.__("Show password"),"aria-pressed":p.value,onClick:a[2]||(a[2]=t=>p.value=!p.value)},[p.value?(c(),P(m(K),{key:1,class:"w-4 h-4"})):(c(),P(m(Z),{key:0,class:"w-4 h-4"}))],8,Se)]),l("div",Me,[l("button",{type:"button",class:"text-xs text-ink-red-3 hover:underline",onClick:I},o(e.__("Forgot Password?")),1)])])],64)):(c(),_(y,{key:1},[l("div",Fe,[i(h,{required:"",name:"firstname",type:"text",autocomplete:"given-name",placeholder:e.__("John"),label:e.__("First Name"),modelValue:u.first_name,"onUpdate:modelValue":a[3]||(a[3]=t=>u.first_name=t)},null,8,["placeholder","label","modelValue"]),i(h,{required:"",name:"lastname",type:"text",autocomplete:"family-name",placeholder:e.__("Doe"),label:e.__("Last Name"),modelValue:u.last_name,"onUpdate:modelValue":a[4]||(a[4]=t=>u.last_name=t)},null,8,["placeholder","label","modelValue"])]),i(h,{required:"",name:"email",type:"email",autocomplete:"email",placeholder:e.__("[email protected]"),label:e.__("Email"),modelValue:u.email,"onUpdate:modelValue":a[5]||(a[5]=t=>u.email=t)},null,8,["placeholder","label","modelValue"])],64)),i(ee,{loading:r.value?m(V).login.loading:m(S).loading,variant:"solid",type:"submit",theme:"red",class:"w-full"},{default:Q(()=>[f(o(r.value?e.__("Login"):e.__("Sign Up")),1)]),_:1},8,["loading"]),i(le,{class:"text-center",message:r.value?m(V).login.error:m(S).error},null,8,["message"])],32),l("div",Ue,[l("span",null,o(r.value?e.__("Don't have an account?"):e.__("Already have an account?")),1),l("button",{type:"button",class:"ml-1 font-medium text-ink-red-3 hover:underline",onClick:E},o(r.value?e.__("Sign up"):e.__("Login")),1)])],2)])]),i(ae,{options:{title:e.__("Successfully Registered"),message:e.__("We have sent you an email with a link to set your password. Please check your inbox (and spam folder) to complete your registration."),size:"lg",icon:{name:"check-circle",appearance:"success"}},modelValue:k.value,"onUpdate:modelValue":a[6]||(a[6]=t=>k.value=t)},null,8,["options","modelValue"])],64))}};export{qe as default}; 2//# sourceMappingURL=Login-zVrsk2xS.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.