1import{_ as U}from"./omtcoaS6.js";import{z as E,a as z,K as A,M as D,r as v,b as F,d as j,e as I,f as n,j as s,_ as K,A as G,B as O,as as H,k as p,l as e,t as o,m as w,x as r,O as k,v as h,R as J,P as b,T as y,U as q,F as S,y as d,ac as Q,ae as W}from"./Dsf9DNGP.js";import{u as X}from"./CGEWKZeS.js";const Y={key:0,class:"alert alert-info"},Z={class:"form-group"},ee={for:"inputEmail"},te={class:"form-group"},se={for:"inputPassword"},oe=["value"],ae={class:"h5 mt-5"},ne={class:"h5 mt-3"},de=E({__name:"index",setup(ie){const i=G(O),l=v(),u=v(),{t:_,te:L}=z(),{userLogin:$}=A(),x=D(),R=d(()=>i?.value?.can_request_password),B=d(()=>i?.value?.show_registration_page),N=d(()=>i?.value?.can_request_id),V=d(()=>B.value&&N.value),T=d(()=>i?.value?.url_of_registration!==""?i?.value?.url_of_registration:"registration"),m=v(_("login")),{routeBreadcrumb:C}=X(m),M=async()=>{if(l.value&&u.value)await $({email:l.value,password:u.value,loadShoppingLists:i?.value?.show_shopping_list,redirectUrl:x.query?.redirect});else{const t=Q(),a=_("v1.messages.missingLoginCredentials");t.add(a,W.DANGER)}};return F({title:m}),j(),(t,a)=>{const c=U,g=H("i18n-t"),P=K;return p(),I(P,{breadcrumb:s(C)},{default:n(()=>[e("h1",null,o(s(m)),1),s(L)("first_time_login_text")&&s(_)("first_time_login_text")?(p(),w("div",Y,[r(g,{keypath:"first_time_login_text",tag:"p",for:"link"},{link:n(()=>[r(c,{to:"/login/request"},{default:n(()=>[k(o(t.$t("first_time_login_link_text")),1)]),_:1})]),_:1})])):h("",!0),e("p",null,o(t.$t("ask_for_credentials")),1),e("form",{id:"login-form",method:"post",onSubmit:J(M,["prevent"])},[a[2]||(a[2]=e("input",{id:"submitForm",type:"hidden",value:"true"},null,-1)),e("div",Z,[e("label",ee,o(t.$t("email_address")),1),b(e("input",{id:"inputEmail","onUpdate:modelValue":a[0]||(a[0]=f=>y(l)?l.value=f:null),type:"text",class:"form-control",name:"user",autocomplete:"email",size:"30",required:""},null,512),[[q,s(l)]])]),e("div",te,[e("label",se,o(t.$t("password")),1),b(e("input",{id:"inputPassword","onUpdate:modelValue":a[1]||(a[1]=f=>y(u)?u.value=f:null),type:"password",class:"form-control",name:"password",autocomplete:"current-password",size:"30",required:""},null,512),[[q,s(u)]])]),e("input",{id:"login_button",type:"submit",class:"btn btn-primary",name:"submit",value:t.$t("login")},null,8,oe)],32),s(R)?(p(),w(S,{key:1},[e("p",ae,o(t.$t("ask_for_password_topic")),1),r(g,{keypath:"v1.views.login.request.newPassword",tag:"p",for:"link"},{link:n(()=>[r(c,{to:"/login/request"},{default:n(()=>[k(o(t.$t("v1.views.login.request.params.link")),1)]),_:1})]),_:1})],64)):h("",!0),s(V)?(p(),w(S,{key:2},[e("p",ne,o(t.$t("request_id_topic")),1),r(g,{keypath:"v1.views.login.request.account",tag:"p",for:"link"},{link:n(()=>[r(c,{to:"/login/"+s(T)},{default:n(()=>[k(o(t.$t("v1.views.login.request.params.link")),1)]),_:1},8,["to"])]),_:1})],64)):h("",!0)]),_:1},8,["breadcrumb"])}}});export{de as default};
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.