"use strict";(()=>{vare={};e.id=6827,e.ids=[636,6827],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){returnfunctione(t,s){returnsint?t[s]:"then"int&&"function"==typeoft.then?t.then(t=>e(t,s)):"function"==typeoft&&"default"===s?t:void0}}})},67097:(e,t,s)=>{s.r(t),s.d(t,{config:()=>D,default:()=>_,getServerSideProps:()=>E,getStaticPaths:()=>A,getStaticProps:()=>b,reportWebVitals:()=>w,routeModule:()=>T,unstable_getServerProps:()=>L,unstable_getServerSideProps:()=>R,unstable_getStaticParams:()=>N,unstable_getStaticPaths:()=>k,unstable_getStaticProps:()=>M});varr={};s.r(r),s.d(r,{SendPassResetContext:()=>j,default:()=>v,getServerSideProps:()=>q});vari=s(63865),a=s(9455),n=s(30671),o=s(49407),u=s(68268),l=s(8732),c=s(82015),p=s.n(c),m=s(71457),d=s(87472),x=s(32415),h=s(20048),f=s.n(h),g=s(63715),S=s(13002),y=s(49240);functionP({message:e}){return(0,l.jsxs)("div",{className:"info gray",children:[(0,l.jsx)(y.A,{fontSize:"small",color:"inherit",className:"opacity-50 text-gray-600"}),(0,l.jsx)("span",{className:"font-normal",children:e})]})}letj=p().createContext({});functionv(e){lett="Cloudbased SQL data management system | Datasquirel",s="Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.",r=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:t}),(0,l.jsx)("meta",{name:"description",content:s}),(0,l.jsx)(d.A,{pageTitle:t,pageDescription:s,pagePathname:"/"})]}),[i,a]=p().useState(!1),[n,o]=p().useState(!1);return(0,l.jsx)(m.A,{head:r,user:e.user,children:(0,l.jsx)(j.Provider,{value:{user:e.user},children:(0,l.jsx)("main",{children:(0,l.jsxs)("section",{children:[i&&(0,l.jsx)(x.A,{}),n?(0,l.jsx)(S.A,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,l.jsx)("div",{className:"paper",children:(0,l.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,l.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,l.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,l.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:e=>{a(!0),e.preventDefault();lett=e.target["email-address"].value;(0,g.A)(`/api/sendPasswordResetLink?email=${t}`).then(e=>{console.log(e),setTimeout(()=>{a(!1)},500),e.success&&o(!0)})},children:[(0,l.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:e?.user?.logged_in_status?e.user.email:"",required:!0}),(0,l.jsx)("button",{children:"Send password reset Email"}),(0,l.jsx)(P,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}asyncfunctionq({req:e,res:t}){lets=awaitf()(e,t);returns?.social_login?{redirect:{destination:"/",permanent:!1}}:{props:{user:s}}}let_=(0,n.M)(r,"default"),b=(0,n.M)(r,"getStaticProps"),A=(0,n.M)(r,"getStaticPaths"),E=(0,n.M)(r,"getServerSideProps"),D=(0,n.M)(r,"config"),w=(0,n.M)(r,"reportWebVitals"),M=(0,n.M)(r,"unstable_getStaticProps"),k=(0,n.M)(r,"unstable_getStaticPaths"),N=(0,n.M)(r,"unstable_getStaticParams"),L=(0,n.M)(r,"unstable_getServerProps"),R=(0,n.M)(r,"unstable_getServerSideProps"),T=newi.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/send-password-reset-link",pathname:"/send-password-reset-link",bundlePath:"",filename:""},components:{App:u.default,Document:o.default},userland:r})},13002:(e,t,s)=>{s.d(t,{A:()=>i});varr=s(8732);functioni({message:e,className:t}){return(0,r.jsxs)("div",{className:"info green"+(t?" "+t:""),children:[(0,r.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,r.jsx)("span",{children:e})]})}s(82015)},20048:(e,t,s)=>{s(81630);letr=s(67216),i=s(83007),a=s(29021);asyncfunctionn(e,t,s,n){if(!e.cookies?.datasquirelAuthKey?.match(/./))returnnull;leto=i(e.cookies.datasquirelAuthKey);if(!o)returnnull;letu=JSON.parse(o);if(!u.cs