"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[8006],{67293:(M,r,i)=>{i.d(r,{GU:()=>y,YO:()=>x,qm:()=>h});var n=i(74848),t=i(22803),c=i(96540),d=i(29675),g=i(11817),l=i(77455),m=i(50363);const h=({children:s,enterAnimation:o=!0})=>{const a=(0,d.of)(x);return(0,n.jsx)("div",{className:(0,t.cx)(a.loginInnerBox,o&&a.enterAnimation),children:s})},y=({children:s,branding:o,isChangingPassword:a})=>{const e=(0,d.of)(x),[v,u]=(0,c.useState)(!1),f=o?.loginSubtitle??l.M.GetLoginSubTitle(),E=o?.loginTitle??l.M.LoginTitle,L=o?.loginBoxBackground||l.M.LoginBoxBackground(),B=o?.loginLogo,p=o?.hideEdition??l.M.HideEdition;return(0,c.useEffect)(()=>u(!0),[]),(0,n.jsxs)(l.M.LoginBackground,{className:(0,t.cx)(e.container,v&&e.loginAnim,o?.loginBackground),children:[(0,n.jsx)("div",{className:e.loginMain,children:(0,n.jsxs)("div",{className:(0,t.cx)(e.loginContent,L,"login-content-box"),children:[(0,n.jsxs)("div",{className:e.loginLogoWrapper,children:[(0,n.jsx)(l.M.LoginLogo,{className:e.loginLogo,logo:B}),(0,n.jsx)("div",{className:e.titleWrapper,children:a?(0,n.jsx)("h1",{className:e.mainTitle,children:(0,n.jsx)(g.x6,{i18nKey:"login.layout.update-password",children:"Update your password"})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h1",{className:e.mainTitle,children:E}),f&&(0,n.jsx)("h3",{className:e.subTitle,children:f})]})})]}),(0,n.jsx)("div",{className:e.loginOuterBox,children:s})]})}),o?.hideFooter?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(m.wi,{hideEdition:p,customLinks:o?.footerLinks})]})},j=(0,t.keyframes)`
from{
  opacity: 0;
  transform: translate(-60px, 0px);
}

to{
  opacity: 1;
  transform: translate(0px, 0px);
}`,x=s=>({loginMain:(0,t.css)({flexGrow:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minWidth:"100%"}),container:(0,t.css)({minHeight:"100%",backgroundPosition:"center",backgroundRepeat:"no-repeat",flex:1,minWidth:"100%",marginLeft:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}),loginAnim:(0,t.css)({"&:before":{opacity:1},".login-content-box":{opacity:1}}),submitButton:(0,t.css)({justifyContent:"center",width:"100%"}),loginLogo:(0,t.css)({width:"100%",maxWidth:60,marginBottom:s.spacing(2),[s.breakpoints.up("sm")]:{maxWidth:100}}),loginLogoWrapper:(0,t.css)({display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",padding:s.spacing(3)}),titleWrapper:(0,t.css)({textAlign:"center"}),mainTitle:(0,t.css)({fontSize:22,[s.breakpoints.up("sm")]:{fontSize:32}}),subTitle:(0,t.css)({fontSize:s.typography.size.md,color:s.colors.text.secondary}),loginContent:(0,t.css)({maxWidth:478,width:"calc(100% - 2rem)",display:"flex",alignItems:"stretch",flexDirection:"column",position:"relative",justifyContent:"flex-start",zIndex:1,minHeight:320,borderRadius:s.shape.radius.default,padding:s.spacing(2,0),opacity:0,[s.transitions.handleMotion("no-preference","reduce")]:{transition:"opacity 0.5s ease-in-out"},[s.breakpoints.up("sm")]:{minHeight:s.spacing(40),justifyContent:"center"}}),loginOuterBox:(0,t.css)({display:"flex",overflowY:"hidden",alignItems:"center",justifyContent:"center"}),loginInnerBox:(0,t.css)({padding:s.spacing(0,2,2,2),display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,maxWidth:415,width:"100%",transform:"translate(0px, 0px)",[s.transitions.handleMotion("no-preference")]:{transition:"0.25s ease"}}),enterAnimation:(0,t.css)({[s.transitions.handleMotion("no-preference")]:{animation:`${j} ease-out 0.2s`}})})},58006:(M,r,i)=>{i.r(r),i.d(r,{VerifyEmailPage:()=>u,default:()=>f});var n=i(74848),t=i(67293),c=i(96540),d=i(49785),g=i(28082),l=i(19550),m=i(54594),h=i(99178),y=i(86489),j=i(34128),x=i(48583),s=i(88023),o=i(17687),a=i(11817),e=i(4148);const v=()=>{const E=(0,o._2)(),{handleSubmit:L,register:B,formState:{errors:p}}=(0,d.mN)(),[S,D]=(0,c.useState)(!1),I=C=>{(0,g.AI)().post("/api/user/signup",C).then(()=>{D(!0)}).catch(A=>{const T=A.data?.message||A;E.warning(T)})};return S?(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.info",children:"An email with a verification link has been sent to the email address. You should receive it shortly."})}),(0,n.jsx)(l.mc,{margin:"md"}),(0,n.jsx)(m.z9,{variant:"primary",href:(0,s.zj)().appSubUrl+"/signup",children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.complete-button",children:"Complete signup"})})]}):(0,n.jsxs)("form",{onSubmit:L(I),children:[(0,n.jsx)(h.s,{children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.header",children:"Verify email"})}),(0,n.jsx)(y.D,{label:"Email",description:"Enter your email address to get a verification link sent to you",invalid:!!p.email,error:p.email?.message,children:(0,n.jsx)(j.p,{id:"email",...B("email",{required:"Email is required",pattern:{value:e.pL,message:"Email is invalid"}}),placeholder:"Email"})}),(0,n.jsxs)(x.B,{children:[(0,n.jsx)(m.$n,{type:"submit",children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.send-button",children:"Send verification email"})}),(0,n.jsx)(m.z9,{fill:"text",href:(0,s.zj)().appSubUrl+"/login",children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.back-button",children:"Back to login"})})]})]})},u=()=>(0,n.jsx)(t.GU,{children:(0,n.jsx)(t.qm,{children:(0,n.jsx)(v,{})})}),f=u},4148:(M,r,i)=>{i.d(r,{pL:()=>t,z5:()=>d});var n=i(32370);const t=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function c(){const g=n.$.licenseInfo?.trialExpiry;return!!(g&&g>0)}const d=()=>c()&&n.$.featureToggles.featureHighlights}}]);

//# sourceMappingURL=8006.47272818f4580b66f2f5.js.map