"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[8786],{20851:(S,d,i)=>{i.d(d,{GU:()=>h,YO:()=>c,qm:()=>r});var n=i(74848),t=i(32196),g=i(96540),m=i(40845),a=i(19361),p=i(38645);const r=({children:s,enterAnimation:o=!0})=>{const l=(0,m.of)(c);return(0,n.jsx)("div",{className:(0,t.cx)(l.loginInnerBox,o&&l.enterAnimation),children:s})},h=({children:s,branding:o,isChangingPassword:l})=>{const e=(0,m.of)(c),[j,x]=(0,g.useState)(!1),f=o?.loginSubtitle??a.M.GetLoginSubTitle(),v=o?.loginTitle??a.M.LoginTitle,E=o?.loginBoxBackground||a.M.LoginBoxBackground(),L=o?.loginLogo,u=o?.hideEdition??a.M.HideEdition;return(0,g.useEffect)(()=>x(!0),[]),(0,n.jsxs)(a.M.LoginBackground,{className:(0,t.cx)(e.container,j&&e.loginAnim,o?.loginBackground),children:[(0,n.jsx)("div",{className:e.loginMain,children:(0,n.jsxs)("div",{className:(0,t.cx)(e.loginContent,E,"login-content-box"),children:[(0,n.jsxs)("div",{className:e.loginLogoWrapper,children:[(0,n.jsx)(a.M.LoginLogo,{className:e.loginLogo,logo:L}),(0,n.jsx)("div",{className:e.titleWrapper,children:l?(0,n.jsx)("h1",{className:e.mainTitle,children:"Update your password"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h1",{className:e.mainTitle,children:v}),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)(p.wi,{hideEdition:u,customLinks:o?.footerLinks})]})},y=(0,t.keyframes)`
from{
  opacity: 0;
  transform: translate(-60px, 0px);
}

to{
  opacity: 1;
  transform: translate(0px, 0px);
}`,c=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:`${y} ease-out 0.2s`}})})},78786:(S,d,i)=>{i.r(d),i.d(d,{VerifyEmailPage:()=>x,default:()=>f});var n=i(74848),t=i(20851),g=i(96540),m=i(49785),a=i(17172),p=i(66864),r=i(55852),h=i(17408),y=i(88575),c=i(10354),s=i(67061),o=i(2913),l=i(3169),e=i(35538);const j=()=>{const v=(0,l._2)(),{handleSubmit:E,register:L,formState:{errors:u}}=(0,m.mN)(),[M,C]=(0,g.useState)(!1),I=D=>{(0,a.AI)().post("/api/user/signup",D).then(()=>{C(!0)}).catch(B=>{const A=B.data?.message||B;v.warning(A)})};return M?(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{children:"An email with a verification link has been sent to the email address. You should receive it shortly."}),(0,n.jsx)(p.mc,{margin:"md"}),(0,n.jsx)(r.z9,{variant:"primary",href:(0,o.zj)().appSubUrl+"/signup",children:"Complete Signup"})]}):(0,n.jsxs)("form",{onSubmit:E(I),children:[(0,n.jsx)(h.s,{children:"Verify Email"}),(0,n.jsx)(y.D,{label:"Email",description:"Enter your email address to get a verification link sent to you",invalid:!!u.email,error:u.email?.message,children:(0,n.jsx)(c.p,{id:"email",...L("email",{required:"Email is required",pattern:{value:e.pL,message:"Email is invalid"}}),placeholder:"Email"})}),(0,n.jsxs)(s.B,{children:[(0,n.jsx)(r.$n,{type:"submit",children:"Send verification email"}),(0,n.jsx)(r.z9,{fill:"text",href:(0,o.zj)().appSubUrl+"/login",children:"Back to login"})]})]})},x=()=>(0,n.jsx)(t.GU,{children:(0,n.jsx)(t.qm,{children:(0,n.jsx)(j,{})})}),f=x}}]);

//# sourceMappingURL=8786.84c182c0150b985249ec.js.map