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

to{
  opacity: 1;
  transform: translate(0px, 0px);
}`,d=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:`${v} ease-out 0.2s`}})})},62018(S,g,i){i.r(g),i.d(g,{VerifyEmailPage:()=>x,default:()=>u});var n=i(74848),t=i(58102),m=i(96540),p=i(49785),a=i(92745),l=i(68143),y=i(32881),c=i(45861),h=i(53487),v=i(37386),d=i(63527),s=i(41654),e=i(65642),r=i(64762),o=i(42939);const j=()=>{const E=(0,r._2)(),{handleSubmit:L,register:B,formState:{errors:f}}=(0,p.mN)(),[C,D]=(0,m.useState)(!1),I=A=>{(0,l.AI)().post("/api/user/signup",A).then(()=>{D(!0)}).catch(M=>{const P=M.data?.message||M;E.warning(P)})};return C?(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)(y.mc,{margin:"md"}),(0,n.jsx)(c.z9,{variant:"primary",href:(0,e.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)(v.D,{label:(0,a.t)("sign-up.verify.email-label","Email"),description:(0,a.t)("sign-up.verify.email-description","Enter your email address to get a verification link sent to you"),invalid:!!f.email,error:f.email?.message,children:(0,n.jsx)(d.p,{id:"email",...B("email",{required:"Email is required",pattern:{value:o.pL,message:"Email is invalid"}})})}),(0,n.jsxs)(s.B,{children:[(0,n.jsx)(c.$n,{type:"submit",children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.send-button",children:"Send verification email"})}),(0,n.jsx)(c.z9,{fill:"text",href:(0,e.zj)().appSubUrl+"/login",children:(0,n.jsx)(a.x6,{i18nKey:"sign-up.verify.back-button",children:"Back to login"})})]})]})},x=()=>(0,n.jsx)(t.GU,{children:(0,n.jsx)(t.qm,{children:(0,n.jsx)(j,{})})}),u=x}}]);

//# sourceMappingURL=2018.d60edf33a1ef3f16589e.js.map