(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8998],{76650:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/login",function(){return n(21356)}])},29058:function(e,t,n){"use strict";var r=n(85893),i=n(67294),a=n(84677),o=n(56027),s=n(1420);let l=(0,o.ZL)()(()=>({root:{backgroundColor:s.nS,borderRadius:"24px",boxShadow:"none",width:"200px","&:hover, &:focus":{boxShadow:"none",backgroundColor:"#062327"},textTransform:"none","&, .CgHtmlContent &, .CgHtmlContent &:hover":{color:"white",fontWeight:600}}}));t.Z=i.forwardRef(function(e,t){let{size:n="large",className:i=null,...o}=e,{classes:s,cx:c}=l();return(0,r.jsx)(a.Z,{...o,variant:"contained",color:"primary",ref:t,size:n,className:c(s.root,i)})})},46335:function(e,t,n){"use strict";var r=n(85893);n(67294);var i=n(56027),a=n(41664),o=n.n(a);let s=(0,i.ZL)()(e=>({link:{"&, &:visited":{color:"inherit",textDecoration:"underline"}}}));t.Z=e=>{let{children:t,aProps:n={},...i}=e,{classes:a}=s();return(0,r.jsx)(o(),{passHref:!0,...i,className:a.link,...n,children:t})}},89077:function(e,t,n){"use strict";n.d(t,{W:function(){return s}});var r=n(85893);n(67294);var i=n(21485),a=n(56027),o=n(1420);let s=e=>({font:{fontFamily:'"Montserrat", sans-serif',fontSize:34,lineHeight:"38px",fontWeight:600,color:o.$R,[e.breakpoints.down("md")]:{fontSize:28}}}),l=(0,a.ZL)()(s);t.Z=e=>{let{className:t,...n}=e,{classes:a,cx:o}=l();return(0,r.jsx)(i.Z,{component:"h1",className:o(t,a.font),...n})}},80685:function(e,t,n){"use strict";n.d(t,{W:function(){return s}});var r=n(85893);n(67294);var i=n(21485),a=n(56027),o=n(61099);let s=e=>({font:{fontFamily:'"Montserrat", sans-serif',fontSize:28,lineHeight:"30px",fontWeight:400,[e.breakpoints.down("md")]:{fontSize:21}},asH3Styles:{...(0,o.W)(e).font}}),l=(0,a.ZL)()(s);t.Z=e=>{let{styleAsH3:t,className:n,...a}=e,{classes:o,cx:s}=l(),c=t?o.asH3Styles:o.font;return(0,r.jsx)(i.Z,{component:"h2",...a,className:s(n,c)})}},87869:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var r=n(85893);n(67294);var i=n(21485),a=n(56027);let o=e=>({font:{fontFamily:'"Montserrat", sans-serif',fontSize:18,lineHeight:"21px",fontWeight:400}}),s=(0,a.ZL)()(o);t.Z=e=>{let{className:t,...n}=e,{classes:a,cx:o}=s();return(0,r.jsx)(i.Z,{component:"h4",...n,className:o(t,a.font)})}},27102:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var r=n(85893);n(67294);var i=n(21485),a=n(56027);let o=e=>({font:{fontFamily:'"Montserrat", sans-serif',fontSize:14,lineHeight:"21px",fontWeight:600}}),s=(0,a.ZL)()(o);t.Z=e=>{let{className:t,...n}=e,{classes:a,cx:o}=s();return(0,r.jsx)(i.Z,{component:"h5",...n,className:o(t,a.font)})}},88210:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var r=n(85893);n(67294);var i=n(21485),a=n(56027);let o=e=>({font:{fontFamily:'"Montserrat", sans-serif',fontSize:16,lineHeight:"21px",fontWeight:300,marginTop:e.spacing(2.9),marginBottom:e.spacing(2.9)}}),s=(0,a.ZL)()(o);t.Z=(0,a.D2)(e=>{let{className:t,...n}=e,{classes:a,cx:o}=s();return(0,r.jsx)(i.Z,{component:"h6",...n,className:o(t,a.font)})},o)},4457:function(e,t,n){"use strict";var r=n(85893);n(67294);var i=n(56027),a=n(89077),o=n(80685),s=n(61099),l=n(87869),c=n(27102),d=n(88210),u=n(31788),f=n(84136);let g=(0,i.ZL)()(e=>({container:{"& h1":(0,a.W)(e).font,"& h2":(0,o.W)(e).font,"& h3":(0,s.W)(e).font,"& h4":(0,l.W)(e).font,"& h5":(0,c.W)(e).font,"& h6":(0,d.W)(e).font,"&, & p, & ul, & ol":(0,u.W)(e).font,"& a":(0,f.W)(e).font,"& img":{maxWidth:"100%",height:"auto"},"& figure":{marginLeft:0,marginRight:0,"& > img":{display:"block",margin:"0 auto",width:"auto",height:"auto"},"& > figcaption":{fontSize:14,lineHeight:"20px",fontWeight:400,fontStyle:"italic",marginTop:e.spacing(1)}},"& iframe":{width:"100%",aspectRatio:"16/9"},"& .text-align-left":{textAlign:"left"},"& .text-align-right":{textAlign:"right"},"& .text-align-center":{textAlign:"center"},"& .text-align-justify":{textAlign:"justify"},[e.breakpoints.down("lg")]:{"& .align-left, & .align-right, & .align-center":{display:"block",margin:"1em auto"}},[e.breakpoints.up("lg")]:{"& .align-left":{float:"left",margin:"0 1em 1em 0",maxWidth:"50%"},"& .align-right":{float:"right",margin:"0 0 1em 1em",maxWidth:"50%"},"& .align-center":{display:"block",margin:"1em auto"}},display:"flow-root","& > *:first-child":{marginTop:0},"& > *:last-child":{marginBottom:0}}}));t.Z=e=>{let{component:t="div",className:n=null,html:i=null,children:a}=e,{classes:o,cx:s}=g(),l=s("CgHtmlContent",n,o.container),c={};return null!==i&&(c.dangerouslySetInnerHTML={__html:i}),(0,r.jsx)(t,{className:s(l,n),...c,children:a})}},94326:function(e,t,n){"use strict";n.d(t,{Ak:function(){return f},D4:function(){return g},hj:function(){return u},qn:function(){return d},rE:function(){return p}});var r=n(85893);n(67294);var i=n(93967),a=n.n(i),o=n(80685),s=n(12271),l=n(89077),c=n(31754);let d=e=>(0,r.jsx)(l.Z,{gutterBottom:!0,...e}),u=e=>{let{className:t="",...n}=e,{classes:i}=(0,s.Z)();return(0,r.jsx)(c.Z,{elevation:2,className:a()(i.groupedField,t),...n})},f=e=>{let{className:t="",...n}=e,{classes:i}=(0,s.Z)();return(0,r.jsx)(o.Z,{...n,styleAsH3:!0,className:a()(t,i.headerPadding,i.headingH3)})},g=e=>{let{className:t="",...n}=e,{classes:i}=(0,s.Z)();return(0,r.jsx)("div",{...n,className:a()(t,i.standardPadding)})},p=e=>{let{className:t="",...n}=e,{classes:i}=(0,s.Z)();return(0,r.jsx)("div",{...n,className:a()(t,i.headerPadding)})}},12271:function(e,t,n){"use strict";let r=(0,n(56027).ZL)()(e=>({fieldWrapper:{margin:"2rem 0"},button:{marginTop:e.spacing(4)},copyButton:{"body &":{width:"auto"}},groupedField:{boxShadow:"0 2px 4px rgba(0, 0, 0, 0.25)",padding:"0 ".concat(e.spacing(4)," ").concat(e.spacing(2)," ").concat(e.spacing(4)),marginBottom:e.spacing(6),marginTop:e.spacing(6)},ibType:{paddingBottom:e.spacing(2)},headerPadding:{padding:"".concat(e.spacing(4)," 0 ").concat(e.spacing(1)," 0"),"&.MuiFormLabel-root":{padding:"".concat(e.spacing(4)," 0 ").concat(e.spacing(1)," 0")}},standardPadding:{padding:"".concat(e.spacing(4)," 0 ").concat(e.spacing(1))},lastSection:{marginBottom:0},profileStatusSection:{boxShadow:"none",padding:"0",marginTop:0},formSpacer:{display:"flex",justifyContent:"space-between",alignItems:"first baseline",[e.breakpoints.down("md")]:{flexDirection:"column"}},radioGroup:{justifyContent:"space-between",[e.breakpoints.down("md")]:{flexDirection:"column"}},yearField:{flexBasis:"20%"},myRootClass:{flexBasis:"78%"},headingH3:{fontSize:"21px !important",fontWeight:600,lineHeight:"21px !important",[e.breakpoints.down("md")]:{fontSize:"18px  !important"},"&.MuiFormLabel-root":{fontWeight:600}},interfaceHeading:{marginBottom:e.spacing(2)},errorMessageContainer:{justifyContent:"space-between","& > div:first-child":{flexBasis:"70%"},"& > div:last-child":{flexBasis:"30%"},[e.breakpoints.down("md")]:{flexDirection:"column-reverse","& > div":{flexBasis:"100%"}}},helperText:{textAlign:"end !important"}}));t.Z=r},69854:function(e,t,n){"use strict";var r=n(85893);n(67294);var i=n(87536),a=n(50720),o=n(46705);t.Z=e=>{let{formContext:t,pickersContext:n=!1,children:s,...l}=e,c=(0,r.jsx)(i.RV,{...t,children:(0,r.jsx)("form",{...l,noValidate:!0,children:s})});return n&&(c=(0,r.jsx)(a._,{dateAdapter:o.H,children:c})),c}},86011:function(e,t,n){"use strict";var r=n(85893);n(67294);var i=n(56027),a=n(31754);let o=(0,i.ZL)()(e=>({paper:{padding:e.spacing(4)}}));t.Z=e=>{let{children:t,className:n=null}=e,{classes:i,cx:s}=o();return(0,r.jsx)(a.Z,{className:s(i.paper,n),children:t})}},21356:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return P}});var r=n(85893),i=n(67294),a=n(53928),o=n(11163),s=n(68573),l=n(89077),c=n(31788),d=n(41664),u=n.n(d),f=n(84136),g=n(87536),p=n(40492),h=n(4318),m=n(29058),x=n(69854),j=n(94326),y=n(59886),Z=n(78795),v=n(29496),b=n(46335),w=e=>{let{onSuccess:t}=e,n=(0,g.cI)(),{handleSubmit:i}=n,{setToken:a}=(0,y.Z)(),{enqueueSnackbar:o}=(0,v.Ds)(),l=async e=>{try{let n=(await h.Z.post("/user/login?_format=hal_json",e,{headers:{Authorization:""}})).data.jwt_token;if(!new Z.Z(n).isAuthenticated()){o("The access token issued by the server isn't valid for the browser. Please make sure that your system clock is synchronized.",{persist:!0,variant:"error"});return}a(n),t()}catch(a){var n,i;let e=(null===(i=a.response)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:n.message)||"Login failed: ".concat(a.message),t=(0,r.jsx)(b.Z,{href:"/user/forgot-password",children:"here"});o((0,r.jsxs)("div",{children:[e," ",403===a.response.status?"Please go ":"Please try again or go ",t," to reset your password and log in."]}),{persist:!0,variant:"error"})}};return(0,r.jsxs)(x.Z,{formContext:n,onSubmit:i(l),"data-cy":"login-form",children:[(0,r.jsx)(j.D4,{children:(0,r.jsx)(g.Qr,{render:e=>{let{field:t}=e;return(0,r.jsx)(p.Z,{required:!0,type:"email",label:"E-mail address",inputProps:{"data-cy":"email-input"},...t})},name:"mail",defaultValue:""})}),(0,r.jsx)(j.D4,{children:(0,r.jsx)(g.Qr,{render:e=>{let{field:t}=e;return(0,r.jsx)(p.Z,{required:!0,type:"password",label:"Password",inputProps:{"data-cy":"password-input"},...t})},name:"pass",defaultValue:""})}),(0,r.jsx)(j.D4,{children:(0,r.jsxs)(s.ZP,{container:!0,spacing:2,alignItems:"center",children:[(0,r.jsx)(s.ZP,{item:!0,children:(0,r.jsx)(m.Z,{type:"submit","data-cy":"submit-button",children:"Submit"})}),(0,r.jsx)(s.ZP,{item:!0,children:(0,r.jsx)(c.Z,{component:"span",children:(0,r.jsx)(u(),{href:"/user/forgot-password",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(f.Z,{children:"Forgot Password?"})})})})]})})]})},S=n(4457),W=()=>(0,r.jsxs)(S.Z,{children:[(0,r.jsx)("p",{children:"Welcome to CreativeGround!"}),(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Already have a user account?"})}),(0,r.jsx)("p",{children:"Sign in by entering your email address and password. In your dashboard you will have access to create a public profile, edit profiles you already manage, and edit your user account."}),(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Need to create an account?"})}),(0,r.jsxs)("p",{children:["Click on "," ",(0,r.jsx)(u(),{passHref:!0,href:"/user/register",children:"‘Sign up’"})," "," and provide your email and password. Stay informed by selecting I would like to receive email updates about CreativeGround, and don't worry, we only send out a few emails a year!"]})]}),k=n(86011),H=(0,n(91553).Z)({remount:!0,isAuthenticated:!0})(e=>{var t;let{isAuthenticated:n}=e,a=(0,o.useRouter)(),d=a.query.destination;void 0!==(t=d)&&""!==t&&/^\/($|[^/])/.test(t)||(d="/user/account"),(0,i.useEffect)(()=>{n&&a.push(d)},[n,d]);let g=(0,i.useCallback)(()=>{a.push(d)},[a,d]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(k.Z,{children:[(0,r.jsx)(l.Z,{gutterBottom:!0,children:"Login"}),(0,r.jsxs)(s.ZP,{container:!0,spacing:4,children:[(0,r.jsxs)(s.ZP,{item:!0,sm:12,md:6,lg:5,children:[(0,r.jsx)(j.D4,{children:(0,r.jsxs)(c.Z,{children:["Don't have an account?"," ",(0,r.jsx)(u(),{href:"/user/register",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(f.Z,{children:"Sign Up."})})]})}),(0,r.jsx)(w,{onSuccess:g})]}),(0,r.jsx)(s.ZP,{item:!0,sm:12,md:6,lg:7,children:(0,r.jsx)(W,{})})]})]})})}),C=n(34777);function P(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.Z,{children:"Log in"}),(0,r.jsx)(H,{})]})}P.Layout=a.Z}},function(e){e.O(0,[8946,492,6593,2888,9774,179],function(){return e(e.s=76650)}),_N_E=e.O()}]);