"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[2470],{92470:(E,l,a)=>{a.r(l),a.d(l,{VerifyEmailPage:()=>u,default:()=>p});var e=a(65237),i=a(15568),m=a(55041),r=a(6741),t=a(48389),c=a(46181),d=a(34128),g=a(5263),f=a(96682),o=a(18819),v=a(93589),h=a(71175);const y=()=>{const S=(0,v.iG)(),[A,z]=(0,e.useState)(!1),Z=s=>{(0,m.i)().post("/api/user/signup",s).then(()=>{z(!0)}).catch(n=>{const L=n.data?.message||n;S.warning(L)})};return A?e.createElement("div",null,e.createElement("p",null,"An email with a verification link has been sent to the email address. You should receive it shortly."),e.createElement(r.W2,{margin:"md"}),e.createElement(t.Qj,{variant:"primary",href:(0,o.iE)().appSubUrl+"/signup"},"Complete Signup")):e.createElement(c.l,{onSubmit:Z},({register:s,errors:n})=>e.createElement(e.Fragment,null,e.createElement(d.D,null,"Verify Email"),e.createElement(g.g,{label:"Email",description:"Enter your email address to get a verification link sent to you",invalid:!!n.email,error:n.email?.message},e.createElement(f.I,{id:"email",...s("email",{required:"Email is required",pattern:{value:h.Yb,message:"Email is invalid"}}),placeholder:"Email"})),e.createElement(r.Lh,null,e.createElement(t.zx,{type:"submit"},"Send verification email"),e.createElement(t.Qj,{fill:"text",href:(0,o.iE)().appSubUrl+"/login"},"Back to login"))))},u=()=>e.createElement(i.dd,null,e.createElement(i.$s,null,e.createElement(y,null))),p=u},71175:(E,l,a)=>{a.d(l,{Yb:()=>i,d5:()=>r});var e=a(49784);const i=/^[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 m(){const t=e.v.licenseInfo?.trialExpiry;return!!(t&&t>0)}const r=()=>m()&&e.v.featureToggles.featureHighlights}}]);

//# sourceMappingURL=2470.04348c650eb509cfb210.js.map