PageSourceSearch

https://atvault.com/_frsh/js/a70b2969bdbf36ae7752826049053e0290c6a444/chunk-EDFEDHM7.js

js atvault.com collected 2026-09-29 16:52:07 UTC 4,173 bytes, 1 lines download raw bytes

1import{d as o}from"./chunk-6EX23YKH.js";import{a as t}from"./chunk-4EPSTKRT.js";import{a,b as S}from"./chunk-QRRW2DQH.js";function T({open:g,onClose:E,onLoginSuccess:P,onSwitchToRegister:L,lang:s,redirectTo:u}){let[f,b]=a(""),[h,w]=a(""),[y,n]=a(""),[x,i]=a(""),[c,d]=a(!1),[v,p]=a(!1),[m,_]=a(!1);S(()=>{g&&(b(""),w(""),n(""),i(""),d(!1),_(!1))},[g]);let k=async r=>{r.preventDefault(),p(!0),n(""),i("");try{let e=await fetch("/api/auth",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"signin",email:f,password:h})}),l=await e.json();if(!e.ok){n(l.error||o("login_modal.error_login",s));return}i(`\u2705 ${o("login_modal.success_login",s)}`),setTimeout(()=>{u&&u.startsWith("/")&&!u.startsWith("//")?globalThis.location.href=u:globalThis.location.reload()},1500)}catch(e){let l=e instanceof Error?e.message:String(e);n(`${o("login_modal.error_connection",s)}: ${l}`)}finally{p(!1)}},C=async r=>{r.preventDefault(),p(!0),n(""),i("");try{let e=await fetch("/api/auth/forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:f})}),l=await e.json();if(!e.ok){n(l.error||"Error al enviar el email");return}i("\u2705 Te enviamos un email para resetear tu contrase\xF1a."),setTimeout(()=>{d(!1),i("")},3e3)}catch(e){let l=e instanceof Error?e.message:String(e);n(`Error de conexi\xF3n: ${l}`)}finally{p(!1)}};return g?t("div",{class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",children:t("div",{class:"relative w-[600px] h-[400px] rounded-xl overflow-hidden shadow-lg bg-white",children:[t("button",{type:"button",onClick:E,class:"absolute top-4 right-4 z-10 text-gray-500 hover:text-gray-700 text-2xl font-bold",children:"\xD7"}),t("form",{onSubmit:c?C:k,class:"flex w-full h-full",children:[t("div",{class:"w-1/2 bg-[#7FBC42] flex flex-col items-center justify-center gap-4 p-6",children:[t("picture",{children:[t("source",{type:"image/webp",srcSet:"/assets/images/logo-negativo-blanco.webp"}),t("img",{src:"/assets/images/logo-negativo-blanco.webp",class:"h-16",alt:"AT Vault Logo"})]}),t("input",{type:"email",placeholder:o("login_modal.email",s),class:"rounded-lg px-4 py-2 text-gray-800 focus:outline-none focus:ring-2 focus:ring-white w-full",value:f,onInput:r=>b(r.target.value),required:!0}),t("input",{type:"text",name:"website",style:{position:"absolute",left:"-9999px"},tabIndex:-1,autoComplete:"off","aria-hidden":"true"}),!c&&t("div",{class:"w-full relative",children:[t("input",{type:m?"text":"password",placeholder:o("login_modal.password",s),class:"rounded-lg px-4 py-2 pr-10 text-gray-800 focus:outline-none focus:ring-2 focus:ring-white w-full",value:h,onInput:r=>w(r.target.value),required:!0}),t("button",{type:"button",onClick:()=>_(!m),class:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-600 hover:text-gray-800",children:m?"\u{1F441}\uFE0F":"\u{1F441}\uFE0F\u200D\u{1F5E8}\uFE0F"})]}),y&&t("p",{class:"text-red-100 text-sm text-center",children:y}),x&&t("p",{class:"text-green-100 text-sm text-center",children:x}),t("button",{type:"submit",disabled:v,class:"mt-2 rounded-lg bg-white text-[#7FBC42] font-bold py-2 hover:bg-gray-100 transition w-full disabled:opacity-50",children:v?o("login_modal.btn_processing",s):c?o("login_modal.btn_send_email",s):o("login_modal.btn_login",s)}),!c&&t("button",{type:"button",onClick:()=>d(!0),class:"text-white text-opacity-75 underline-offset-2 hover:underline text-sm",children:o("login_modal.forgot_password",s)}),c&&t("button",{type:"button",onClick:()=>{d(!1),n(""),i("")},class:"text-white text-opacity-75 underline-offset-2 hover:underline text-sm",children:o("login_modal.btn_back",s)}),!c&&t("button",{type:"button",onClick:()=>{L()},class:"mt-2 text-white text-opacity-75 underline-offset-2 hover:underline text-sm",children:o("login_modal.no_account",s)})]}),t("div",{class:"w-1/2 bg-[#E5E5E5] flex items-center justify-center p-8",children:t("picture",{children:[t("source",{type:"image/webp",srcSet:"/assets/icon/3-personajes.webp"}),t("img",{src:"/assets/icon/3-personajes.png",alt:"",class:"max-w-full max-h-full object-contain"})]})})]})]})}):null}export{T as a};

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.