(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5469],{37101:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/password-reset",function(){return n(70182)}])},2391:function(e,s,n){"use strict";n.d(s,{E:function(){return r}});var r={maxWidth:"400px",margin:"auto",border:"1px solid lightgrey",borderRadius:"5px",padding:"10px 20px 20px 20px",backgroundColor:"#fafafa",fontSize:"12pt",color:"#606060"}},73306:function(e,s,n){"use strict";n.d(s,{Z:function(){return u}});var r=n(85893),t=n(9008),i=n.n(t),a=n(54),o=n(48397),c=n(1864);function u(e){var s=e.title,n=(0,a.i)().siteName;return(0,r.jsxs)(i(),{children:[(0,r.jsxs)("title",{children:[n," ",n?"\u2013":""," ",s]}),(0,r.jsx)("meta",{name:"description",content:"CoCalc landing pages and documentation"}),(0,r.jsx)("link",{rel:"icon",href:(0,c.join)(null!==o.Z&&void 0!==o.Z?o.Z:"","/webapp/favicon-32x32.png")})]})}},70182:function(e,s,n){"use strict";n.r(s),n.d(s,{__N_SSP:function(){return E},default:function(){return k}});var r=n(85893),t=n(97183),i=n(47568),a=n(26042),o=n(69396),c=n(70655),u=n(79531),d=n(71577),l=n(99138),p=n(67294),h=n(61429),x=n(17682),f=n(40981),g=n(2391),j=n(9125),m=n(7772),y=n(92771),v=n(77389);function w(){var e=(0,x.Z)().siteName,s=(0,p.useState)(""),n=s[0],t=s[1],w=(0,p.useState)(!1),_=w[0],Z=w[1],b=(0,p.useState)(""),S=b[0],E=b[1],k=(0,p.useState)(""),C=k[0],N=k[1];function P(){return T.apply(this,arguments)}function T(){return(T=(0,i.Z)((function(){var e,s;return(0,c.__generator)(this,(function(r){switch(r.label){case 0:if(_)return[2];r.label=1;case 1:return r.trys.push([1,3,4,5]),E(""),N(""),Z(!0),[4,(0,j.Z)("/auth/password-reset",{email:n})];case 2:return(e=r.sent()).success&&(t(""),N(e.success)),[3,5];case 3:return s=r.sent(),E("".concat(s)),[3,5];case 4:return Z(!1),[7];case 5:return[2]}}))}))).apply(this,arguments)}return(0,r.jsxs)("div",{style:{padding:"0 15px"},children:[(0,r.jsxs)("div",{style:{textAlign:"center",marginBottom:"15px"},children:[(0,r.jsx)(h.Z,{style:{width:"100px",height:"100px"}}),(0,r.jsxs)("h1",{children:["Reset Your ",e," Password"]})]}),(0,r.jsxs)("div",{style:g.E,children:[(0,r.jsxs)("div",{style:{margin:"10px 0"},children:["Enter your ",e," account's email address and we will email a password reset link to you."]}),(0,r.jsxs)("form",{children:[(0,r.jsx)(u.Z,{style:{fontSize:"13pt"},autoFocus:!0,placeholder:"Enter your email address",autoComplete:"username",value:n,onChange:function(e){t(e.target.value),E(""),N("")},onPressEnter:function(e){e.preventDefault(),!_&&(0,v.is_valid_email_address)(n)&&P()}}),n&&(0,r.jsx)(d.Z,{disabled:_||!(0,v.is_valid_email_address)(n)||!!S,shape:"round",size:"large",type:"primary",style:{width:"100%",marginTop:"20px"},onClick:P,children:_?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.Icon,{name:"spinner",spin:!0})," Sending password reset email..."]}):n&&(0,v.is_valid_email_address)(n)&&!S?"Send password reset email":"Enter your email address."})]}),S&&(0,r.jsx)(l.Z,{style:{marginTop:"20px"},message:"Error",description:(0,r.jsxs)("div",{style:{fontSize:"12pt"},children:[(0,r.jsx)("b",{children:S}),(0,r.jsx)("br",{})," If you are stuck ",(0,r.jsx)(y.Z,{lower:!0}),"."]}),type:"error",showIcon:!0}),C&&(0,r.jsx)(l.Z,{style:{marginTop:"20px"},message:(0,r.jsx)("b",{children:"Success"}),description:(0,r.jsx)("div",{style:{fontSize:"12pt"},children:C}),type:"success",showIcon:!0})]}),(0,r.jsxs)("div",{style:(0,o.Z)((0,a.Z)({},g.E),{backgroundColor:"white",marginTop:"30px",marginBottom:"30px",paddingTop:"15px"}),children:[(0,r.jsxs)("p",{children:["Remember your password? ",(0,r.jsx)(f.Z,{href:"/auth/sign-in",children:"Sign In"})]}),(0,r.jsxs)("p",{children:["Do not have an account? ",(0,r.jsx)(f.Z,{href:"/auth/sign-up",children:"Sign Up"})]}),"You can also"," ",(0,r.jsxs)(f.Z,{href:"/auth/try",children:["try ",e," without creating an account"]})]})]})}var _=n(31910),Z=n(73306),b=n(31498),S=n(54),E=!0;function k(e){var s=e.customize;return(0,r.jsxs)(S.l,{value:s,children:[(0,r.jsx)(Z.Z,{title:"Forgot your Password?"}),(0,r.jsxs)(t.Z,{children:[(0,r.jsx)(b.Z,{page:"sign-in",subPage:"password-reset"}),(0,r.jsxs)(t.Z.Content,{style:{backgroundColor:"white"},children:[(0,r.jsx)(w,{}),(0,r.jsx)(_.Z,{})]})]})]})}}},function(e){e.O(0,[5386,4491,4089,549,4046,6994,3361,9066,6735,9774,2888,179],(function(){return s=37101,e(e.s=s);var s}));var s=e.O();_N_E=s}]);