const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-4PWHNWf5.js","assets/vendor-query-D-sr233n.js","assets/vendor-react-BwKDLVNL.js","assets/vendor-i18n-C6wqqoou.js","assets/vendor-dayjs-5tvLiZdS.js","assets/vendor-sentry-BncsBMgc.js","assets/vendor-antd-core-4y2ghozH.js","assets/index-BWYLWDpU.css"])))=>i.map(i=>d[i]);
import{_ as g}from"./vendor-query-D-sr233n.js";import{x as h,u as f,r as i,j as e}from"./vendor-react-BwKDLVNL.js";import{aC as _,t as j,v,w as b,D as N,E as c,F as d,y as l,c as m}from"./index-4PWHNWf5.js";import"./vendor-dayjs-5tvLiZdS.js";import{S as P}from"./skeleton-B4A3ODHp.js";import{M as S}from"./MarketingShell-BAIPYo8j.js";import{u as w}from"./vendor-i18n-C6wqqoou.js";import"./vendor-sentry-BncsBMgc.js";import"./vendor-antd-core-4y2ghozH.js";import"./zap-BR8fpIck.js";import"./globe-hDIdw7U2.js";import"./shield-check-DRbHr__K.js";import"./users-1HBFFtf4.js";import"./file-text-BokCHFLv.js";import"./SiteFooter-BRhqHJTy.js";import"./send-CwoGz6Hv.js";import"./building-2-DQ37wC4v.js";const k=i.lazy(()=>g(()=>import("./index-4PWHNWf5.js").then(t=>t.cL),__vite__mapDeps([0,1,2,3,4,5,6,7])));function y(t){if(!t)return null;const a=t.trim();return a.length===0||a.length>512||!a.startsWith("/")||a.startsWith("//")||/\b(https?:|javascript:|data:)/i.test(a)?null:a}function G(){const{t}=w(),[a]=h(),n=f(),s=a.get("redirect"),r=y(s),[o,p]=i.useState(!0);i.useEffect(()=>{m("login_page_viewed",{hasRedirect:r!==null,rawRedirectBlocked:s!==null&&r===null})},[s,r]);const u=()=>{r?(m("login_redirect_followed",{target:r}),n(r,{replace:!0})):n("/",{replace:!0})},x=()=>{p(!1),n("/",{replace:!0})};return e.jsxs(S,{active:null,containerSize:"base",children:[e.jsxs(_,{children:[e.jsx("title",{children:t("loginPage.meta.title","Вход — Avalog")}),e.jsx("meta",{name:"robots",content:"noindex,follow"})]}),e.jsxs(j,{py:"lg",className:"relative overflow-hidden bg-bg-base",children:[e.jsxs("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",children:[e.jsx("div",{className:"absolute inset-x-0 top-0 h-[420px] bg-gradient-to-b from-primary-light/60 via-primary-light/15 to-transparent"}),e.jsx("div",{className:"absolute inset-0 opacity-60 [background-image:linear-gradient(to_right,var(--color-border)_1px,transparent_1px),linear-gradient(to_bottom,var(--color-border)_1px,transparent_1px)] [background-size:56px_56px] [mask-image:radial-gradient(ellipse_75%_50%_at_50%_0%,#000_55%,transparent_100%)]"})]}),e.jsx(v,{size:"base",className:"relative",children:e.jsxs(b,{gap:6,align:"center",className:"max-w-md mx-auto text-center",children:[e.jsx(N,{size:"lg",children:t("loginPage.heading","Вход в Avalog")}),s&&!r?e.jsx(c,{children:e.jsx(d,{className:"py-4",children:e.jsx(l,{className:"text-text-muted text-sm",children:t("loginPage.redirectBlocked","Параметр redirect был отклонён по соображениям безопасности. После входа вы попадёте на главную.")})})}):r?e.jsx(c,{children:e.jsx(d,{className:"py-4",children:e.jsx(l,{className:"text-text-muted text-sm",children:t("loginPage.redirectNotice","После входа мы перенаправим вас на запрошенную страницу.")})})}):null,e.jsx(i.Suspense,{fallback:e.jsx(P,{className:"h-64 w-full"}),children:e.jsx(k,{isOpen:o,onClose:x,onSuccess:u})}),o?null:e.jsx(l,{className:"text-sm text-text-muted",children:t("loginPage.windowClosed","Окно входа закрыто. Обновите страницу для повтора.")})]})})]})]})}export{G as default,y as safeRedirectTarget};