1import{d as N,u as L,M as S,r as m,N as A,f as u,g as v,h as c,t as o,i as n,s as p,H as F,j as y,w as M,k as O,F as R,C as T,l as b,_ as j}from"./BSliLbpZ.js";import{U as q}from"./DLarw8Ib.js";import{A as G}from"./DFn2-jVg.js";import H from"./DHOFUnoS.js";import{u as $}from"./DUpryqrV.js";import{l as D,b as E,s as z}from"./B3zsdQDa.js";import"./CY_b9lnP.js";const J={class:"link"},K={class:"link__intro"},Q={key:0,class:"link__title"},W={class:"link__subtitle"},X=["value"],Y={key:1,class:"link__error",role:"alert"},Z={class:"link__hint"},ee=N({__name:"LinkIdentityPanel",props:{pending:{},redirect:{default:""},showTitle:{type:Boolean,default:!0},backLabel:{default:""}},emits:["success","back"],setup(_,{emit:w}){const k=_,h=w,{t:e}=L(),U=S(),{linkPendingIdentity:P}=$(),i=m(k.pending),a=m(""),d=m(!1),l=m(""),f=m(0);A(()=>k.pending,s=>{i.value=s,a.value="",l.value="",f.value+=1});const x=b(()=>e(`authUi.providers.${i.value.provider}`)),B=b(()=>D(i.value)),g=b(()=>E(i.value));async function V(){if(!(d.value||!a.value)){l.value="",d.value=!0;try{const s=await P(a.value);if(s.success){a.value="",h("success",s);return}l.value=s.message??e("auth.errorGeneric")}finally{d.value=!1}}}function C(s,r){const t=z(s,r);t.kind==="success"?h("success",t.result):t.kind==="link"?(i.value=t.pending,a.value="",l.value="",f.value+=1):t.kind==="error"&&(l.value=t.message||e("auth.errorGeneric"))}function I(){U.push({path:"/passwort",query:k.redirect?{redirect:k.redirect}:{}})}return(s,r)=>(u(),v("div",J,[c("div",K,[_.showTitle?(u(),v("h2",Q,o(n(e)("authUi.link.title")),1)):p("",!0),c("p",W,o(n(e)("authUi.link.text",{email:i.value.email,provider:x.value})),1)]),B.value?(u(),v("form",{key:0,class:"link__form",onSubmit:F(V,["prevent"])},[c("input",{class:"link__hidden-user",type:"text",name:"username",autocomplete:"username",value:i.value.email,tabindex:"-1","aria-hidden":"true",readonly:""},null,8,X),y(G,{modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=t=>a.value=t),label:n(e)("authUi.link.password"),name:"current-password",autocomplete:"current-password",required:""},null,8,["modelValue","label"]),y(q,{type:"submit",loading:d.value,disabled:!a.value},{default:M(()=>[O(o(d.value?n(e)("authUi.link.submitting"):n(e)("authUi.link.submit")),1)]),_:1},8,["loading","disabled"])],32)):p("",!0),l.value?(u(),v("p",Y,o(l.value),1)):p("",!0),c("button",{type:"button",class:"link__forgot",onClick:I},o(n(e)("authUi.link.forgot")),1),g.value.length?(u(),v(R,{key:2},[c("p",Z,o(n(e)("authUi.link.otherMethods")),1),(u(),T(H,{key:f.value,intent:"login",providers:g.value,onResult:C},null,8,["providers"]))],64)):p("",!0),c("button",{type:"button",class:"link__back",onClick:r[1]||(r[1]=t=>h("back"))},o(_.backLabel||n(e)("authUi.link.back")),1)]))}}),re=Object.assign(j(ee,[["__scopeId","data-v-676378ea"]]),{__name:"AuthLinkIdentityPanel"});export{re 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.