PageSourceSearch

https://everhustle.netlify.app/static/js/main.29f374cd.chunk.js

js everhustle.netlify.app collected 2026-10-03 10:42:53 UTC 43,027 bytes, 2 lines download raw bytes

1(this["webpackJsonpever-hustle-frontend"]=this["webpackJsonpever-hustle-frontend"]||[]).push([[0],{18:function(e,t,a){e.exports={center:"timer_center__2xD_R",container:"timer_container__3pHz5",timerRound:"timer_timerRound__2lVyz",beats:"timer_beats__1OEYX",taskLabel:"timer_taskLabel__22OI8",addTaskBtn:"timer_addTaskBtn__NLteY",stopTaskBtn:"timer_stopTaskBtn__3U-YG",bodyBack:"timer_bodyBack__3DNSC",backImage:"timer_backImage__3IDii",clock:"timer_clock__UJfJ1",inputN:"timer_inputN__jKBDO",labelN:"timer_labelN__SEWhU",description:"timer_description__HFv3m",heading:"timer_heading__2f8Qm",timeSpent:"timer_timeSpent__2AmmS",timeFormat:"timer_timeFormat__7tsgm",head2:"timer_head2__3RjMx"}},214:function(e,t,a){},215:function(e,t,a){},23:function(e,t,a){e.exports={mega_wrapper:"authForm_mega_wrapper__3j_Oa",contact_wrapper:"authForm_contact_wrapper__1U8yq",left_side:"authForm_left_side__2SPgb",right_side:"authForm_right_side__3atzf",form_row:"authForm_form_row__1kpQA","socials-wrapper":"authForm_socials-wrapper__3gFrM",facebook:"authForm_facebook__IPNEQ",twitter:"authForm_twitter__3Pydi",instagram:"authForm_instagram__3o2BC",youtube:"authForm_youtube__3gKEi"}},238:function(e,t,a){},242:function(e,t){},244:function(e,t){},259:function(e,t){},261:function(e,t){},289:function(e,t){},290:function(e,t){},295:function(e,t){},297:function(e,t){},304:function(e,t){},323:function(e,t){},384:function(e,t,a){},443:function(e,t,a){"use strict";a.r(t);var n=a(1),c=a(47),r=a.n(c),s=(a(238),a(8)),o=a.p+"static/media/EverHustle.36cbf42c.PNG",i=a(22),l=a(30),u=a(28),j=a(136),d=a.n(j),b=a(0),m=Object(n.createContext)(),h="LOGIN",p="LOGOUT",O=function(e,t){switch(t.type){case h:return Object(u.a)(Object(u.a)({},e),{},{user:d.a.decode(t.payload.token.split(" ")[1]),isLoggedIn:!0});case p:return Object(u.a)(Object(u.a)({},e),{},{user:void 0,isLoggedIn:!1});default:return e}},x=function(e){var t=e.children,a=localStorage.getItem("authToken"),c=a?d.a.decode(a.split(" ")[1]):void 0,r=Object(n.useReducer)(O,{user:c,isLoggedIn:!!c}),o=Object(s.a)(r,2),i=o[0],l=o[1],u={login:function(e){localStorage.setItem("authToken",e),l({type:h,payload:{token:e}})},logout:function(){localStorage.removeItem("authToken"),l({type:p})}},j={authState:i,authDispatch:l,actions:u};return Object(b.jsx)(m.Provider,{value:j,children:t})},g=function(){return Object(n.useContext)(m)},f=function(){var e=g(),t=e.authState,a=e.actions,c=Object(n.useState)(!1),r=Object(s.a)(c,2),u=r[0],j=r[1],d=Object(i.g)(),m=Object(n.useState)(!1),h=Object(s.a)(m,2),p=h[0],O=h[1];return window.addEventListener("scroll",(function(){window.scrollY>=50?j(!0):j(!1)})),Object(b.jsxs)("nav",{className:u?"nav active":"nav",children:[Object(b.jsx)(l.b,{to:"/",className:"logo",style:{backgroundColor:"inherit",marginRight:"auto",paddingLeft:"20px"},children:Object(b.jsx)("img",{src:o,alt:"logo",id:"logo-img"})}),Object(b.jsx)("input",{type:"radio",id:"menu-btn",className:p?"menu-btn":"null",style:{display:"none"}}),Object(b.jsx)("label",{htmlFor:"menu-btn",className:"menu-icon",onClick:function(){return O(!p)},children:Object(b.jsx)("span",{className:"nav-icon"})}),Object(b.jsxs)("ul",{className:"menu",style:{paddingRight:"20px"},children:[t.user?Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)("li",{onClick:function(){return O(!1)},children:Object(b.jsx)(l.c,{to:"/notes",activeClassName:"active-btn",children:"Notes"})}),Object(b.jsx)("li",{onClick:function(){return O(!1)},children:Object(b.jsx)(l.c,{to:"/articles",activeClassName:"active-btn",children:"Articles"})}),Object(b.jsx)("li",{onClick:function(){return O(!1)},children:Object(b.jsx)(l.c,{to:"/goals",activeClassName:"active-btn",children:"Goals"})}),Object(b.jsx)("li",{onClick:function(){return O(!1)},children:Object(b.jsx)(l.c,{to:"/reminders",activeClassName:"active-btn",children:"Reminders"})}),Object(b.jsx)("li",{onClick:function(){return O(!1)},children:Object(b.jsx)(l.c,{to:"/timers",activeClassName:"active-btn",children:"Timers"})})]}):null,Object(b.jsx)("li",{onClick:function(){return O(!1)},children:t.user?Object(b.jsx)(l.b,{to:"/",onClick:function(e){e.preventDefault(),a.logout(),d.push("/login")},children:"logout"}):Object(b.jsx)(l.b,{to:"/login",children:"Login"})}),Object(b.jsx)("li",{children:t.user?Object(b.jsxs)("div",{className:"user-btn disabled ml-3 menu-icon",children:["Hello ","".concat(t.user.firstName," ")]}):null})]})]})},v=(a(86),a(11)),y=a.n(v),N=a(16),w=a(454),k=a(456),S=a(20),_=a.n(S),C="https://everhustle-server.herokuapp.com/api/v1",F=(a(87),a(455)),T=a(449),E=a(450),M=a(451),D=a(88),I=function(e){var t=e.modal,a=e.toggle,c=e.setModal,r=Object(k.a)(function(){var e=Object(N.a)(y.a.mark((function e(t){var a,n,c,r;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.title,n=t.content,c=t.category,e.prev=1,e.next=4,_.a.post("".concat(C,"/notes"),{title:a,c
1ontent:n,category:c},{headers:{Authorization:localStorage.getItem("authToken")}});case 4:return r=e.sent,console.log("axios resp: ",r),e.abrupt("return",r.data);case 9:throw e.prev=9,e.t0=e.catch(1),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 13:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()),o=Object(n.useState)(""),i=Object(s.a)(o,2),l=i[0],u=i[1],j=Object(n.useState)(""),d=Object(s.a)(j,2),m=d[0],h=d[1],p=Object(D.b)(),O=function(e){var t=e.target,a=t.name,n=t.value;"note-title"===a?u(n):h(n)};return Object(b.jsx)("div",{children:Object(b.jsxs)(F.a,{isOpen:t,toggle:a,style:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"70px"},children:[Object(b.jsx)(T.a,{toggle:a,children:"Create note"}),Object(b.jsxs)(E.a,{children:[Object(b.jsxs)("div",{className:"form-group",children:[Object(b.jsx)("label",{htmlFor:"note-title",children:"Note title"}),Object(b.jsx)("input",{type:"text",name:"note-title",id:"note-title",className:"form-control",onChange:O,required:!0})]}),Object(b.jsxs)("div",{className:"form-group",children:[Object(b.jsx)("label",{htmlFor:"note-description",children:"Description"}),Object(b.jsx)("textarea",{name:"note-description",id:"note-description",cols:"20",rows:"4",className:"form-control",onChange:O,required:"required"})]})]}),Object(b.jsxs)(M.a,{children:[Object(b.jsx)("button",{className:"btn-note",type:"submit",onClick:function(){r.mutate({title:l,content:m,category:"general"},{onSuccess:function(){p.invalidateQueries("notes"),c(!1)}})},children:r.isLoading?"Creating...":"Create"}),Object(b.jsx)("button",{className:"btn-note",onClick:a,children:"Cancel"})]})]})})},A=function(e){var t=e.modal,a=e.toggle,c=(e.updateNote,e.noteObj),r=e.setModal,o=Object(n.useState)(c.title),i=Object(s.a)(o,2),l=i[0],j=i[1],d=Object(n.useState)(c.content),m=Object(s.a)(d,2),h=m[0],p=m[1],O=Object(k.a)(function(){var e=Object(N.a)(y.a.mark((function e(t){var a,n,c,r,s,o;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.id,n=t.title,c=t.content,r=t.category,(s={}).title=n||void 0,s.content=c||void 0,s.category=r||void 0,e.prev=5,e.next=8,_.a.put("".concat(C,"/notes/").concat(a),Object(u.a)({},s),{headers:{Authorization:localStorage.getItem("authToken")}});case 8:return o=e.sent,console.log("axios resp: ",o),e.abrupt("return",o.data);case 13:throw e.prev=13,e.t0=e.catch(5),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 17:case"end":return e.stop()}}),e,null,[[5,13]])})));return function(t){return e.apply(this,arguments)}}()),x=Object(D.b)(),g=function(e){var t=e.target,a=t.name,n=t.value;"note-title"===a?j(n):p(n)};return Object(b.jsx)("div",{children:Object(b.jsxs)(F.a,{isOpen:t,toggle:a,style:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"70px"},children:[Object(b.jsx)(T.a,{toggle:a,children:"Update note"}),Object(b.jsxs)(E.a,{children:[Object(b.jsxs)("div",{className:"form-group",children:[Object(b.jsx)("label",{htmlFor:"note-title",children:"Note title"}),Object(b.jsx)("input",{type:"text",name:"note-title",id:"note-title",className:"form-control",value:l,onChange:g})]}),Object(b.jsxs)("div",{className:"form-group",children:[Object(b.jsx)("label",{htmlFor:"note-description",children:"Description"}),Object(b.jsx)("textarea",{name:"note-description",id:"note-description",cols:"20",rows:"4",className:"form-control",value:h,onChange:g})]})]}),Object(b.jsxs)(M.a,{children:[Object(b.jsx)("button",{className:"btn-note",type:"button",onClick:function(e){O.mutate({id:c.id,title:l,content:h},{onSuccess:function(){x.invalidateQueries("notes"),r(!1)}})},children:O.isLoading?"Updating...":"Update"})," ",Object(b.jsx)("button",{className:"btn-note",type:"button",onClick:a,children:"Cancel"})]})]})})},L=function(e){var t=e.noteObj,a=e.index,c=(e.deleteNote,e.updateListArray),r=Object(n.useState)(!1),o=Object(s.a)(r,2),i=o[0],l=o[1],u=Object(D.b)(),j=Object(k.a)(function(){var e=Object(N.a)(y.a.mark((function e(t){var a,n;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.id,e.prev=1,e.next=4,_.a.delete("".concat(C,"/notes/").concat(a),{headers:{Authorization:localStorage.getItem("authToken")}});
1case 4:return n=e.sent,console.log("axios resp: ",n),e.abrupt("return",n.data);case 9:throw e.prev=9,e.t0=e.catch(1),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 13:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()),d=function(){l(!i)},m=[{primaryColor:"#5D93E1",secondaryColor:"#ECF3FC"},{primaryColor:"#F9D288",secondaryColor:"#FEFAF1"},{primaryColor:"#5DC250",secondaryColor:"#F2FAF1"},{primaryColor:"#F48687",secondaryColor:"#FDF1F1"},{primaryColor:"#B964F7",secondaryColor:"#F3F0FD"}];return Object(b.jsxs)("div",{className:"card-wrapper mx-sm-0 mr-md-5 mb-sm-4 mt-sm-4",children:[Object(b.jsx)("div",{className:"card-top",style:{backgroundColor:m[a%5].primaryColor}}),Object(b.jsxs)("div",{className:"note-holder",style:{WebkitOverflowScrolling:{backgroundColor:"#000"}},children:[Object(b.jsx)("span",{className:"card-header",style:{backgroundColor:m[a%5].secondaryColor,borderRadius:"10px"},children:t.title}),Object(b.jsx)("p",{className:"mt-3",children:t.content})]}),Object(b.jsxs)("div",{className:"note-icons",children:[Object(b.jsx)("i",{className:"far fa-edit mr-3",style:{color:m[a%5].primaryColor,cursor:"pointer"},onClick:function(){return l(!0)}}),j.isLoading?"Deleting":Object(b.jsx)("i",{className:"fas fa-trash-alt",style:{color:m[a%5].primaryColor,cursor:"pointer"},onClick:function(){j.mutate({id:t.id},{onSuccess:function(){u.invalidateQueries("notes")}})}})]}),Object(b.jsx)(A,{modal:i,toggle:d,updateNote:function(e){c(e,a),window.location.reload(),d()},noteObj:t,setModal:l})]})},P=(a(214),function(){return Object(b.jsx)("div",{className:"loading"})}),z=a(232),H=function(){return Object(b.jsxs)("div",{id:"contact",children:[Object(b.jsx)(z.a,{href:"https://github.com/DevelopersLeague/EverHustle-FrontEnd","data-size":"large","data-show-count":"true","aria-label":"Star EverHustle on GitHub \u2764",type:"stargazers",className:"px-4 mx-0"}),Object(b.jsx)("h4",{className:"text-light text-bold",children:"Star EverHustle on GitHub \u2764"})]})},R=function(){var e=Object(n.useState)(!1),t=Object(s.a)(e,2),a=t[0],c=t[1],r=Object(w.a)(["notes","getAll"],Object(N.a)(y.a.mark((function e(){var t;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_.a.get("".concat(C,"/notes"),{headers:{Authorization:localStorage.getItem("authToken")}});case 3:return t=e.sent,console.log("axios resp: ",t),e.abrupt("return",t.data);case 8:throw e.prev=8,e.t0=e.catch(0),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 12:case"end":return e.stop()}}),e,null,[[0,8]])}))));return Object(b.jsxs)(b.Fragment,{children:[Object(b.jsxs)("header",{className:"header text-center my-4 ",children:[Object(b.jsx)("div",{className:"heading_text",children:Object(b.jsx)("h3",{children:"Notes"})}),Object(b.jsx)("button",{className:"btn-note",onClick:function(){return c(!0)},children:"Create Note"})]}),Object(b.jsx)("div",{className:"notes-container",children:r.data?r.data.notes.map((function(e,t){return Object(b.jsx)(L,{noteObj:e,index:t},e.id)})):Object(b.jsx)(P,{})}),Object(b.jsx)(I,{toggle:function(){c(!a)},modal:a,setModal:c}),Object(b.jsx)(H,{})]})},B=function(){var e=Object(n.useState)([]),t=Object(s.a)(e,2),a=t[0],c=t[1],r=Object(n.useState)(!0),o=Object(s.a)(r,2),i=o[0],l=o[1],u="https://hn.algolia.com/api/v1/search?query=productivity&page=0",j=function(){var e=Object(N.a)(y.a.mark((function e(){var t,a;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(u);case 3:return t=e.sent,e.next=6,t.json();case 6:a=e.sent,c(a.hits),l(!1),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}(),d=function(){var e=Object(N.a)(y.a.mark((function e(t){var a,n;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return a=e.sent,e.next=6,a.json();case 6:n=e.sent,c(n.hits),l(!1),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}();return Object(n.useEffect)((function(){j()}),[]),i?Object(b.jsx)("div",{className:"loading"}):Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)("header",{className:"header text-center mt-4 pt-4 article-header",children:Object(b.jsxs)("div",{children:[Object(b.jsx)("h3",{children:"Articles"}),Object(b.jsx)("div",{className:"underline mx-auto"})]})}),Object(b.jsxs)("div",{className:"btn-container",children:[Object(b.jsx)("button",{className:"filter-btn",onClick:function(){d(u),l(!0)},children:"Productivity"}),Object(b.jsx)("button",{className:"filter-btn",onClick:function(){d("https://hn.algolia.com/api/v1/search?query=selfhelp&page=0"),l(!0)},children:"Self-Help"}),Object(b.jsx)("button",{className:"filter-btn",onClick:function(){d("https://hn.algolia.com/api/v1/search?query=motivate&page=0"),l(!0)},children:"Motivation"})]}),Object(b.jsx)("div",{className:"mega_wrapper",children:Object(b.jsx)("section",{className:"stories",children:a.map((function(e){var t=e.objectID,a=e.title,n=e.num_comments,c=e.url,r=e.author;return Object(b.jsxs)("article",{className:"story",children:[Object(b.jsx)("h4",{className:"title",children:a}),Object(b.jsxs)("p",{className:"info",children:[Object(b.jsxs)("span",{children:[r," | "]})," ",n," "," ","comments"]}),Object(b.jsx)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"read-link",children:"Read more"})]},t)}))})}),Object(b.jsx)(H,{})]})},J="https://everhustle-server.herokuapp.com/api/v1";a(215);var q=function(e){var t=Object(k.a)(function(){var e=Object(N.a)(y.a.mark((function e(t){var a,n;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.id,e.prev=1,e.next=4,_.a.delete("".concat(J,"/goals/").concat(a),{headers:{Authorization:localStorage.getItem("authToken")}});
1case 4:return n=e.sent,console.log("axios resp: ",n),e.abrupt("return",n.data);case 9:throw e.prev=9,e.t0=e.catch(1),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 13:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()),a=t.mutate,n=t.isLoading,c=Object(D.b)(),r=Object(k.a)(function(){var e=Object(N.a)(y.a.mark((function e(t){var a,n,c,r,s,o,i;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.id,n=t.title,c=t.content,r=t.category,s=t.isCompleted,(o={}).title=n||void 0,o.content=c||void 0,o.category=r||void 0,o.isCompleted=void 0!==s?s:void 0,console.log(o),e.prev=7,e.next=10,_.a.put("".concat(J,"/goals/").concat(a),Object(u.a)({},o),{headers:{Authorization:localStorage.getItem("authToken")}});case 10:return i=e.sent,console.log("axios resp: ",i),e.abrupt("return",i.data);case 15:throw e.prev=15,e.t0=e.catch(7),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 19:case"end":return e.stop()}}),e,null,[[7,15]])})));return function(t){return e.apply(this,arguments)}}()),s=e.task,o=e.filters,i=[];function l(e){return function(t){a({id:e.id},{onSuccess:function(){c.invalidateQueries("goals")}})}}function j(e){return function(t){r.mutate({id:e.id,isCompleted:!e.isCompleted},{onSuccess:function(){c.invalidateQueries("goals")}})}}return""==o?i=s.filter((function(t){return t.category==e.category})).map((function(e){return Object(b.jsxs)("li",{className:"collection-item",id:e.isCompleted?"task-complete":"",children:[e.title,n||r.isLoading?null:Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)("button",{className:"complete-item fa fa-check-circle",onClick:j(e)}),Object(b.jsx)("button",{className:"delete-item fa fa-remove",onClick:l(e)})]})]})})):s.filter((function(t){return t.category==e.category})).forEach((function(e){e.title.includes(o)&&i.push(Object(b.jsxs)("li",{className:"collection-item",id:e.isCompleted?"task-complete":"",children:[e.title,n||r.isLoading?null:Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)("button",{className:"complete-item fa fa-check-circle",onClick:j(e)}),Object(b.jsx)("button",{className:"delete-item fa fa-remove",onClick:l(e)})]})]}))})),Object(b.jsxs)("div",{children:[Object(b.jsx)("h2",{id:"category-head",children:e.category}),Object(b.jsx)("ul",{class:"collection",id:"collection-list",children:i})]})};var Y=function(){var e=Object(n.useState)(""),t=Object(s.a)(e,2),a=t[0],c=t[1],r=Object(w.a)(["goals","getAll"],Object(N.a)(y.a.mark((function e(){var t;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_.a.get("".concat(J,"/goals"),{headers:{Authorization:localStorage.getItem("authToken")}});case 3:return t=e.sent,console.log("axios resp: ",t),e.abrupt("return",t.data);case 8:throw e.prev=8,e.t0=e.catch(0),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 12:case"end":return e.stop()}}),e,null,[[0,8]])})))).data,o=Object(k.a)(function(){var e=Object(N.a)(y.a.mark((function e(t){var a,n,c,r;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.title,n=t.content,c=t.category,e.prev=1,e.next=4,_.a.post("".concat(J,"/goals"),{title:a,content:n,category:c},{headers:{Authorization:localStorage.getItem("authToken")}});case 4:return r=e.sent,console.log("axios resp: ",r),e.abrupt("return",r.data);case 9:throw e.prev=9,e.t0=e.catch(1),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 13:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()).mutate,i=Object(D.b)(),l=Object(n.useState)(""),u=Object(s.a)(l,2),j=u[0],d=u[1],m=Object(n.useState)(""),h=Object(s.a)(m,2),p=h[0],O=h[1];return Object(b.jsx)("div",{id:"notes-body",children:Object(b.jsx)("div",{className:"container",children:Object(b.jsx)("div",{className:"row",children:Object(b.jsx)("div",{className:"col s12",children:Object(b.jsx)("div",{className:"card",children:Object(b.jsxs)("div",{className:"card-content",children:[Object(b.jsx)("span",{className:"card-title",children:"Goals"}
1),Object(b.jsx)("div",{id:"main-row",children:Object(b.jsxs)("form",{id:"task-form",onSubmit:function(e){e.preventDefault(),o({title:j,content:"test content",category:p},{onSuccess:function(){i.invalidateQueries("goals"),d("")}})},children:[Object(b.jsxs)("div",{className:"input-field column s12",children:[Object(b.jsx)("input",{type:"text",name:"task",id:"task",onChange:function(e){d(e.target.value)},value:j}),Object(b.jsx)("input",{type:"radio",name:"Category",id:"Daily",onClick:function(){O("daily")}}),Object(b.jsx)("label",{for:"Daily",id:"categoryName",children:"DAILY"}),Object(b.jsx)("input",{type:"radio",name:"Category",id:"Weekly",onClick:function(){O("weekly")}}),Object(b.jsx)("label",{for:"Weekly",id:"categoryName",children:"WEEKLY"}),Object(b.jsx)("input",{type:"radio",name:"Category",id:"Monthly",onClick:function(){O("monthly")}}),Object(b.jsx)("label",{for:"Monthly",id:"categoryName",children:"MONTHLY"}),Object(b.jsx)("label",{className:"task-label",for:"task",children:"New Goal"})]}),Object(b.jsx)("button",{class:"add-task-btn",children:"ADD GOAL"})]})}),Object(b.jsxs)("div",{class:"card-action",children:[Object(b.jsxs)("div",{class:"input-field col s12",children:[Object(b.jsx)("input",{type:"text",name:"filter",id:"filter",value:a,onChange:function(e){c(e.target.value)}}),Object(b.jsx)("label",{className:"task-label",for:"filter",children:"Filter Goals"})]}),Object(b.jsx)("div",{children:r?Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)(q,{task:r.goals,category:"daily",filters:a}),Object(b.jsx)(q,{task:r.goals,category:"weekly",filters:a}),Object(b.jsx)(q,{task:r.goals,category:"monthly",filters:a})]}):"loading..."})]})]})})})})})})},G=function(){return Object(b.jsx)("div",{id:"main",children:Object(b.jsxs)("div",{className:"name",children:[Object(b.jsx)("h1",{children:Object(b.jsx)("span",{children:"EverHustle"})}),Object(b.jsx)("div",{className:"underline"}),Object(b.jsx)("h3",{className:"mt-2",children:" Your personalised productivity partner "}),Object(b.jsxs)("p",{className:"details mt-2",children:["Feeling unproductive in lockdown? ",Object(b.jsx)("br",{})," EverHustle will help you become a consistent hustler"]})]})})},Q=function(e){return Object(b.jsx)("div",{children:Object(b.jsxs)("div",{className:"a-box",children:[Object(b.jsx)("div",{className:"a-b-img",children:Object(b.jsx)("img",{src:e.image,alt:"feature"})}),Object(b.jsxs)("div",{className:"s-b-text",children:[Object(b.jsxs)("h3",{children:[e.title," "]}),Object(b.jsx)("p",{children:e.text})]})]})})},U=a.p+"static/media/feature_1.801589a0.png",W=a.p+"static/media/feature_2.2b466162.png",V=a.p+"static/media/feature_3.0fadb17c.png",K=function(){return Object(b.jsx)("div",{children:Object(b.jsxs)("div",{id:"features",children:[Object(b.jsx)("h1",{children:Object(b.jsx)("em",{children:"Features"})}),Object(b.jsxs)("div",{className:"a-container",children:[Object(b.jsx)(Q,{image:U,title:"Reminders",text:"Set reminders for various events, plan your schedule"}),Object(b.jsx)(Q,{image:W,title:"Postive Articles",text:"Feeling negative? Feel good again by reading productive articles"}),Object(b.jsx)(Q,{image:V,title:"Make Notes",text:"Plan your checklist for each day"})]})]})})},X=function(e){return Object(b.jsxs)("div",{id:"about",children:[Object(b.jsx)("div",{className:"about-image",children:Object(b.jsx)("img",{src:e.image,alt:""})}),Object(b.jsxs)("div",{className:"about-text",children:[Object(b.jsx)("h2",{children:e.title}),Object(b.jsx)("p",{children:"You can use the application on any device: mobile, tablet"})]})]})},Z=a.p+"static/media/Phone.8a0ad3b0.svg",$=(a(384),function(){return Object(b.jsxs)("div",{children:[Object(b.jsx)(G,{}),Object(b.jsx)(K,{}),Object(b.jsx)(X,{image:Z,title:"Mobile Responsive"}),Object(b.jsx)(H,{})]})}),ee=a(226),te=a.n(ee),ae=(a(385),"https://everhustle-server.herokuapp.com/api/v1"),ne=a(225),ce=(a(386),a(452)),re=function(){var e=Object(w.a)(["reminders","getAll"],Object(N.a)(y.a.mark((function e(){var t;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_.a.get("".concat(ae,"/reminders"),{headers:{Authorization:localStorage.getItem("authToken")}});case 3:return t=e.sent,console.log("axios resp: ",t),e.abrupt("return",t.data);case 8:throw e.prev=8,e.t0=e.catch(0),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 12:case"end":return e.stop()}}),e,null,[[0,8]])})))),t=Object(k.a)(function(){var e=Object(N.a)(y.a.mark((function e(t){var a,n;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.id,e.prev=1,e.next=4,_.a.delete("".concat(ae,"/reminders/").concat(a),{headers:{Authorization:localStorage.getItem("authToken")}});
1case 4:return n=e.sent,console.log("axios resp: ",n),e.abrupt("return",n.data);case 9:throw e.prev=9,e.t0=e.catch(1),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 13:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()),a=Object(k.a)(function(){var e=Object(N.a)(y.a.mark((function e(t){var a,n,c,r,s;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.title,n=t.content,c=t.category,r=t.timestamp,e.prev=1,e.next=4,_.a.post("".concat(ae,"/reminders"),{title:a,content:n,category:c,timestamp:r},{headers:{Authorization:localStorage.getItem("authToken")}});case 4:return s=e.sent,console.log("axios resp: ",s),e.abrupt("return",s.data);case 9:throw e.prev=9,e.t0=e.catch(1),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 13:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()),c=Object(D.b)(),r=Object(n.useState)(!1),o=Object(s.a)(r,2),i=o[0],l=o[1],u=Object(n.useState)("#efefef"),j=Object(s.a)(u,2),d=j[0],m=(j[1],Object(n.useState)(!0)),h=Object(s.a)(m,2),p=h[0],O=(h[1],Object(n.useState)("#004D80")),x=Object(s.a)(O,2),g=x[0],f=(x[1],Object(n.useState)("#3B3966")),v=Object(s.a)(f,2),S=v[0],C=(v[1],Object(n.useState)("#333333")),I=Object(s.a)(C,2),A=I[0],L=(I[1],Object(n.useState)("orange")),z=Object(s.a)(L,2),R=z[0],B=(z[1],Object(n.useState)(300)),J=Object(s.a)(B,2),q=J[0],Y=(J[1],Object(n.useState)(180)),G=Object(s.a)(Y,2),Q=G[0],U=(G[1],Object(n.useState)(280)),W=Object(s.a)(U,2),V=W[0],K=(W[1],Object(n.useState)(!0)),X=Object(s.a)(K,2),Z=X[0],$=(X[1],Object(n.useState)(!0)),ee=Object(s.a)($,2),re=ee[0],se=(ee[1],Object(n.useState)(!0)),oe=Object(s.a)(se,2),ie=oe[0],le=(oe[1],Object(n.useState)(!0)),ue=Object(s.a)(le,2),je=ue[0],de=(ue[1],Object(n.useState)(!0)),be=Object(s.a)(de,2),me=be[0],he=(be[1],Object(n.useState)(!0)),pe=Object(s.a)(he,2),Oe=pe[0],xe=(pe[1],Object(n.useState)(!0)),ge=Object(s.a)(xe,2),fe=ge[0],ve=(ge[1],Object(n.useState)(!0)),ye=Object(s.a)(ve,2),Ne=ye[0],we=(ye[1],Object(n.useState)(!1)),ke=Object(s.a)(we,2),Se=ke[0],_e=(ke[1],Object(n.useState)("DD/MM/YYYY")),Ce=Object(s.a)(_e,2),Fe=Ce[0],Te=(Ce[1],Object(n.useState)(!1)),Ee=Object(s.a)(Te,2),Me=Ee[0],De=(Ee[1],Object(n.useState)("")),Ie=Object(s.a)(De,2),Ae=Ie[0],Le=Ie[1],Pe=Object(n.useState)(new Date),ze=Object(s.a)(Pe,2),He=ze[0],Re=ze[1],Be=Object(n.useState)(""),Je=Object(s.a)(Be,2),qe=Je[0],Ye=Je[1],Ge=Object(n.useState)(!1),Qe=Object(s.a)(Ge,2),Ue=Qe[0],We=Qe[1];return Object(b.jsxs)(b.Fragment,{children:[Object(b.jsxs)("header",{className:"header text-center mt-4 ",children:[Object(b.jsx)("div",{className:"heading_text",children:Object(b.jsx)("h3",{children:"Reminders"})}),Object(b.jsx)("p",{children:"You will receive a reminder on the event day"})]}),Object(b.jsx)(ce.a,{color:"danger",isOpen:Ue,toggle:function(){return We(!1)},className:"ml-3 mr-3",children:"Event has been deleted"}),Object(b.jsxs)("section",{className:"mt-3",children:[Object(b.jsx)("div",{className:"mx-auto pb-3",style:{zIndex:-10},children:e.data?Object(b.jsx)(ne.a,{events:function(e){var t=e.map((function(e){return{name:e.title,extra:{text:e.content},date:parseInt(new Date(e.timestamp).getTime())}}));return console.log(t),t}(e.data.reminders),date:new Date,deleteEvent:function(a){console.log(a),t.mutate({id:e.data.reminders[a].id},{onSuccess:function(){c.invalidateQueries("reminders"),We(!Ue)}})},highlightToday:p,primaryColor:g,secondaryColor:d,todayColor:S,textColor:A,indicatorColor:R,animationSpeed:q,sidebarWidth:Q,detailWidth:V,showDetailToggler:Z,showSidebarToggler:re,onePanelAtATime:ie,allowDeleteEvent:je,allowAddEvent:me,openDetailsOnDateSelection:Oe,timeFormat24:Ne,showAllDayLabel:Se,detailDateFormat:Fe,detailDefault:fe,addEvent:function(e){Re(e),l(!0)},sidebarDefault:Me}):Object(b.jsx)(P,{})}),Object(b.jsxs)(F.a,{isOpen:i,children:[Object(b.jsx)(T.a,{children:"Add your own event: "}),Object(b.jsxs)(E.a,{children:[Object(b.jsxs)("div",{className:"form-group",children:[Object(b.jsx)("label",{htmlFor:"event-name",children:"Event name"}),Object(b.jsx)("input",{type:"text",name:"event-name",id:"event-name",className:"form-control",value:Ae,onChange:function(e){return Le(e.target.value)},required:!0})]}),Object(b.jsxs)("div",{className:"form-group",children:[Object(b.jsxs)("label",{htmlFor:"datePicker",className:"pr-2",children:["Date ",Object(b.jsx)("span",{children:"&"})," time"]}),Object(b.jsx)(te.a,{id:"datePicker",selected:He,onChange:function(e){e instanceof Date&&Re(e)},showTimeSelect:!0,dateFormat:"dd/MM/yyyy",className:"form-control col-md-8"}),"".concat(He.getHours()<=9?"0"+He.getHours():He.getHours(),":").concat(He.getMinutes()<=9?"0"+He.getMinutes():He.getMinutes())]}),Object(b.jsxs)("div",{className:"",children:[Object(b.jsx)("label",{htmlFor:"event-text",className:"text-bold",children:"Text "}),Object(b.jsx)("input",{className:"event-text form-control",type:"text",value:qe,onChange:function(e){e.preventDefault(),Ye(e.target.value)}})]})]}),Object(b.jsxs)(M.a,{children:[Object(b.jsx)("button",{className:"btn-note colorPickerBtn",disabled:""===Ae,onClick:function(){l(!1),a.mutate({title:Ae,content:qe,category:"general",timestamp:He.toISOString()},{onSuccess:function(){c.invalidateQueries("reminders"),Le(""),Ye("")}})},children:"Create!"}
1),Object(b.jsx)("button",{className:"btn-note",onClick:function(){return l(!1)},children:"Cancel"})]})]})]}),Object(b.jsx)("div",{style:{marginTop:"20px"},children:Object(b.jsx)(H,{})})]})},se="https://everhustle-server.herokuapp.com/api/v1",oe=function(){return Object(k.a)(function(){var e=Object(N.a)(y.a.mark((function e(t){var a,n,c;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.time,n=t.date,e.prev=1,e.next=4,_.a.post("".concat(se,"/focustime"),{time:a,date:n},{headers:{Authorization:localStorage.getItem("authToken")}});case 4:return c=e.sent,console.log("axios resp: ",c),e.abrupt("return",c.data);case 9:throw e.prev=9,e.t0=e.catch(1),console.log("axios err: ",e.t0),new Error(e.t0.response.data.message);case 13:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}())},ie=function(e){return Object(w.a)(["focustime","getAll","byDate"],Object(N.a)(y.a.mark((function t(){var a;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,_.a.get("".concat(se,"/focustime/").concat(e),{headers:{Authorization:localStorage.getItem("authToken")}});case 3:return a=t.sent,console.log("axios resp: ",a),t.abrupt("return",a.data);case 8:throw t.prev=8,t.t0=t.catch(0),console.log("axios err: ",t.t0),new Error(t.t0.response.data.message);case 12:case"end":return t.stop()}}),t,null,[[0,8]])}))))},le=a(229);var ue,je,de,be=function(e){var t=e.remainingTime;if(0==t)return Object(b.jsx)("div",{className:"timer",children:"Time Completed"});var a=Math.floor(t/3600),n=Math.floor(t%3600/60),c=t%60;return Object(b.jsxs)("div",{className:"timer",children:[Object(b.jsx)("div",{className:"text",children:"Remaining"}),Object(b.jsx)("div",{className:"value",children:"".concat(a,":").concat(n,":").concat(c)}),Object(b.jsx)("div",{className:"text",children:"seconds"})]})},me=a(18),he=a.n(me);function pe(e){var t="",a=Math.floor(e/3600);t=a>9?t.concat(JSON.stringify(a)):t.concat("0"+JSON.stringify(a)),t+=":";var n=Math.floor(e%3600/60);t=n>9?t.concat(JSON.stringify(n)):t.concat("0"+JSON.stringify(n)),t+=":";var c=e%60;return t=c>9?t.concat(JSON.stringify(c)):t.concat("0"+JSON.stringify(c)),console.log(t),t}function Oe(){var e=Object(n.useState)("0"),t=Object(s.a)(e,2),a=t[0],c=t[1],r=Object(n.useState)("0"),o=Object(s.a)(r,2),i=o[0],l=o[1],u=Object(n.useState)("0"),j=Object(s.a)(u,2),d=j[0],m=j[1],h=Object(n.useState)(0),p=Object(s.a)(h,2),O=p[0],x=p[1],g=Object(n.useState)(0),f=Object(s.a)(g,2),v=f[0],y=f[1],N=Object(n.useState)(!1),w=Object(s.a)(N,2),k=w[0],S=w[1],_=Object(n.useState)(null),C=Object(s.a)(_,2),F=C[0],T=C[1],E=oe();return Object(n.useEffect)((function(){T((new Date).toISOString().split("T")[0])}),[]),Object(b.jsx)("div",{className:he.a.bodyBack,children:Object(b.jsxs)("div",{className:he.a.container,children:[Object(b.jsx)("div",{className:he.a.backImage}),Object(b.jsx)("h1",{className:he.a.heading,children:"Countdown Timer"}),k?Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)("span",{className:he.a.description,children:"The clock is ticking. Increase your productivity"}),Object(b.jsx)(ge,{setCurrentTime:x,totalTime:v,setIsRunning:S,currentTime:O,mutation:E,dateStr:F}),Object(b.jsx)("button",{className:he.a.stopTaskBtn,onClick:function(){clearInterval(ue),clearTimeout(je),S(!1),E.mutate({date:F,time:pe(O)})},children:E.isLoading?"loading":"stop"})]}):Object(b.jsxs)("div",{className:he.a.timerWrapper,children:[Object(b.jsxs)("span",{className:he.a.description,children:["Set your Productive time and ",Object(b.jsx)("br",{}),"keep track of all the time set"]}),Object(b.jsxs)("form",{onSubmit:function(e){var t,n,r;e.preventDefault(),y((t=a,n=i,r=d,3600*JSON.parse(t)+60*JSON.parse(n)+JSON.parse(r))),console.log(a,i,d),x(0),S(!0),c(0),l(0),m(0)},children:[Object(b.jsx)("input",{type:"number",value:a,id:"hours",className:he.a.inputN,onChange:function(e){c(e.target.value)}}),Object(b.jsx)("input",{type:"number",value:i,id:"minutes",className:he.a.inputN,onChange:function(e){l(e.target.value)}}),Object(b.jsx)("input",{type:"number",value:d,id:"seconds",className:he.a.inputN,onChange:function(e){m(e.target.value)}}),Object(b.jsx)("br",{}),Object(b.jsx)("label",{htmlFor:"hours",id:he.a.labelN,children:"Hours"}
1),Object(b.jsx)("label",{htmlFor:"minutes",id:he.a.labelN,children:"Minutes"}),Object(b.jsx)("label",{for:"seconds",id:he.a.labelN,children:"Seconds"}),Object(b.jsx)("br",{}),Object(b.jsx)("button",{className:he.a.addTaskBtn,id:he.a.descriptions,type:"submit",children:"Start Timer"})]}),F?E.isLoading?"loading":Object(b.jsx)(xe,{dateStr:F}):"loading"]})]})})}var xe=function(e){var t=ie(e.dateStr);return Object(b.jsx)(b.Fragment,{children:Object(b.jsxs)("div",{children:[Object(b.jsx)("h4",{className:he.a.head2,children:"Today's Total Time Tracked"}),t.isLoading?"loading":(de=t.data.time.split(":"),console.log(de),Object(b.jsx)("div",{children:Object(b.jsxs)("p",{className:he.a.description,id:he.a.timeSpent,children:[de[0],Object(b.jsx)("span",{className:he.a.timeFormat,children:"Hr"})," :",de[1],Object(b.jsx)("span",{className:he.a.timeFormat,children:"Min"})," :",de[2],Object(b.jsx)("span",{className:he.a.timeFormat,children:"Sec"})]})}))]})})},ge=function(e){return Object(n.useEffect)((function(){return console.log(e.currentTime),ue=setInterval((function(){e.setCurrentTime((function(e){return e+1}))}),1e3),je=setTimeout((function(){clearInterval(ue),e.mutation.mutate({date:e.dateStr,time:pe(e.totalTime)},{onSuccess:function(){e.setIsRunning(!1)}})}),1e3*e.totalTime),function(){console.log("unmount"),clearInterval(ue),clearTimeout(je)}}),[]),Object(b.jsxs)("div",{children:[Object(b.jsx)("br",{}),Object(b.jsx)("div",{className:he.a.timerRound,children:Object(b.jsx)(le.CountdownCircleTimer,{isPlaying:!0,duration:e.totalTime,colors:[["#004777",.55],["#F7B801",.4],["#A30000"]],onComplete:function(){return[!1,1e3]},children:be})})]})},fe=a(23),ve=a.n(fe),ye=a(233),Ne=Object(n.createContext)(),we="SET_MESSAGES",ke="REMOVE_MESSAGES",Se=function(e,t){switch(t.type){case we:var a=!1;return e.forEach((function(e){e.key===t.payload.key&&(a=!0,e.value=t.payload.value)})),void(a||e.push({key:t.payload.key,value:t.payload.value}));case ke:return e.filter((function(e){return e.key!==t.payload.key}));default:return e}},_e=function(e){var t=e.children,a=Object(ye.a)(Se,[]),n=Object(s.a)(a,2),c=n[0],r=n[1],o={setMessages:function(e,t){r({type:we,payload:{key:e,value:t}})},getMessages:function(e){var t=c.filter((function(t){return t.key===e}));if(t.length>0)return t[0].value},removeMessages:function(e){r({type:ke,payload:{key:e}})}};return Object(b.jsx)(Ne.Provider,{value:{actions:o,messagesState:c},children:t})},Ce=function(){return Object(n.useContext)(Ne)},Fe="https://everhustle-server.herokuapp.com/api/v1",Te=a(96),Ee=function(){var e=Ce().actions,t=e.getMessages("errorMessage"),a=function(){var e=Ce().actions;return Object(k.a)(function(){var t=Object(N.a)(y.a.mark((function t(a){var n,c,r;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.email,c=a.password,t.prev=1,t.next=4,_.a.post("".concat(Fe,"/auth/login"),{email:n,password:c});case 4:return r=t.sent,console.log("axios resp: ",r),t.abrupt("return",r.data);case 9:throw t.prev=9,t.t0=t.catch(1),console.log("axios error: ",JSON.stringify(t.t0.response.data)),e.setMessages("errorMessage",t.t0.response.data.message),new Error(t.t0.response.data.message);case 14:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e){return t.apply(this,arguments)}}())}(),n=a.mutate,c=a.isLoading,r=Object(i.g)(),s=g(),o=Object(Te.a)({initialValues:{email:"",password:""},onSubmit:function(e,t){var a=t.resetForm;n(Object(u.a)({},e),{onSuccess:function(e){s.actions.login(e.token),r.push("/notes"),a({})}})}}),l=o.values,j=o.handleChange,d=o.handleSubmit;return Object(b.jsx)("div",{children:Object(b.jsxs)("form",{method:"POST",autocomplete:"off",onSubmit:d,children:[t?Object(b.jsx)("p",{children:t}):null,Object(b.jsxs)("div",{className:ve.a.form_row,children:[Object(b.jsx)("input",{type:"text",name:"email",id:"email",required:!0,onChange:function(t){e.removeMessages("errorMessage"),j(t)},autoComplete:"off","aria-autoComplete":"none",value:l.email}),Object(b.jsx)("span",{children:"Username or Email"})]}),Object(b.jsxs)("div",{className:ve.a.form_row,children:[Object(b.jsx)("input",{type:"password",name:"password",id:"password",onChange:function(t){e.removeMessages("errorMessage"),j(t)},required:!0,autoComplete:"off","aria-autoComplete":"none",value:l.password}),Object(b.jsx)("span",{children:"Password"})]}),Object(b.jsx)("div",{className:ve.a.form_row}),Object(b.jsx)("div",{className:ve.a.form_row,children:Object(b.jsx)("button",{type:"submit",children:c?"loading...":"log in"})})]})})},Me=a.p+"static/media/undraw_moving_forward.25e325dd.svg",De=function(){return Object(b.jsx)("div",{className:ve.a.mega_wrapper,children:Object(b.jsxs)("div",{className:ve.a.contact_wrapper,children:[Object(b.jsx)("div",{className:ve.a.left_side,children:Object(b.jsx)("img",{src:Me,width:"92%",alt:"svg"})}),Object(b.jsxs)("div",{className:ve.a.right_side,children:[Object(b.jsx)("h2",{children:"Account Login"}),Object(b.jsx)(Ee,{}),Object(b.jsx)("div",{class:"socials-wrapper",children:Object(b.jsxs)("h3",{children:["Don't have an account? Sign-up ",Object(b.jsx)(l.b,{to:"/sign-up",children:"here"})]})})]})]})})},Ie=function(){var e=Ce().actions,t=function(){var e=Ce().actions;return Object(k.a)(function(){var t=Object(N.a)(y.a.mark((function t(a){var n,c,r,s,o;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.email,c=a.password,r=a.firstName,s=a.lastName,t.prev=1,t.next=4,_.a.post("".concat(Fe,"/auth/signup"),{email:n,password:c,firstName:r,lastName:s});case 4:return o=t.sent,console.log("axios resp: ",o),e.setMessages("successMessage",o.data.message),t.abrupt("return",o.data);case 10:throw t.prev=10,t.t0=t.catch(1),console.log("axios error: ",JSON.stringify(t.t0.response.data)),e.setMessages("errorMessage",t.t0.response.data.message),new Error(t.t0.response.data.message);case 15:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e){return t.apply(this,arguments)}}())}
1(),a=t.mutate,n=t.isLoading,c=e.getMessages("successMessage"),r=e.getMessages("errorMessage"),s=Object(Te.a)({initialValues:{email:"",password:"",firstName:"",lastName:""},onSubmit:function(e,t){var n=t.resetForm;a(Object(u.a)({},e),{onSuccess:function(e){n({})}})}}),o=s.handleChange,i=s.handleSubmit,l=(s.errors,s.values),j=function(t){e.removeMessages("successMessage"),e.removeMessages("errorMessages"),o(t)};return Object(b.jsx)("div",{className:ve.a.mega_wrapper,children:Object(b.jsxs)("div",{className:ve.a.contact_wrapper,children:[Object(b.jsx)("div",{className:ve.a.left_side,children:Object(b.jsx)("img",{src:Me,width:"92%",height:"120%",alt:"svg"})}),Object(b.jsxs)("div",{className:ve.a.right_side,children:[Object(b.jsx)("h2",{children:"Create Account"}),Object(b.jsxs)("form",{method:"POST",autocomplete:"off",onSubmit:i,children:[c?Object(b.jsx)("p",{children:c}):null,r?Object(b.jsx)("p",{children:r}):null,Object(b.jsxs)("div",{class:ve.a.form_row,children:[Object(b.jsx)("input",{type:"text",required:!0,autoComplete:"off",name:"firstName",id:"firstName",onChange:j,value:l.firstName,"aria-autocomplete":"none"}),Object(b.jsx)("span",{children:"Fname"})]}),Object(b.jsxs)("div",{class:ve.a.form_row,children:[Object(b.jsx)("input",{type:"text",required:!0,autoComplete:"off","aria-autocomplete":"none",name:"lastName",id:"lastName",onChange:j,value:l.lastName}),Object(b.jsx)("span",{children:"Lname"})]}),Object(b.jsxs)("div",{class:ve.a.form_row,children:[Object(b.jsx)("input",{type:"email",required:!0,autoComplete:"off","aria-autocomplete":"none",name:"email",id:"email",onChange:j,value:l.email}),Object(b.jsx)("span",{children:"Email"})]}),Object(b.jsxs)("div",{class:ve.a.form_row,children:[Object(b.jsx)("input",{type:"password",required:!0,autoComplete:"off","aria-autocomplete":"none",name:"password",id:"password",onChange:j,value:l.password}),Object(b.jsx)("span",{children:"Password"})]}),Object(b.jsx)("div",{class:ve.a.form_row}),Object(b.jsx)("div",{class:ve.a.form_row,children:Object(b.jsx)("button",{type:"submit",children:n?"loading...":"sign up"})})]}),Object(b.jsx)("div",{class:"socials-wrapper",children:Object(b.jsxs)("h3",{children:["Have an account? login ",Object(b.jsx)("a",{href:"/login",children:"here"})]})})]})]})})};var Ae=function(e){var t=e.children,a=e.to;return g().authState.user?Object(b.jsx)(b.Fragment,{children:t}):Object(b.jsx)(i.a,{to:a})};var Le=function(){return Object(b.jsxs)(l.a,{children:[Object(b.jsx)(f,{}),Object(b.jsxs)(i.d,{children:[Object(b.jsx)(i.b,{exact:!0,path:"/",children:Object(b.jsx)($,{})}),Object(b.jsx)(i.b,{path:"/notes",children:Object(b.jsx)(Ae,{to:"/login",children:Object(b.jsx)(R,{})})}),Object(b.jsx)(i.b,{path:"/articles",children:Object(b.jsx)(B,{})}),Object(b.jsx)(i.b,{path:"/goals",children:Object(b.jsx)(Y,{})}),Object(b.jsx)(i.b,{path:"/reminders",children:Object(b.jsx)(re,{})}),Object(b.jsx)(i.b,{path:"/timers",children:Object(b.jsx)(Oe,{})}),Object(b.jsx)(i.b,{path:"/login",children:Object(b.jsx)(De,{})}),Object(b.jsx)(i.b,{path:"/sign-up",children:Object(b.jsx)(Ie,{})}),Object(b.jsx)(i.b,{path:"*",children:Object(b.jsx)($,{})})]})]})},Pe=new(a(453).a),ze=function(e){var t=e.children;return Object(b.jsx)(x,{children:Object(b.jsx)(_e,{children:Object(b.jsx)(D.a,{client:Pe,children:t})})})};r.a.render(Object(b.jsx)(ze,{children:Object(b.jsx)(Le,{})}),document.getElementById("root"))},86:function(e,t,a){}},[[443,1,2]]]);
2//# sourceMappingURL=main.29f374cd.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.