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RhPrtFHeVd6lyVI162ooJGPqDXmgmXqc92NaSxZ5BBSygjniWpIacSXzrhZDZt4NsFdg3rmCaeGJe2J5qCGNDmLhwPoaOd/93V5pjxyTjoGSpZmWE0QADs="},48:function(e,t,a){e.exports=a(81)},79:function(e,t,a){},80:function(e,t,a){},81:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),c=a(21),o=a.n(c),l=a(2),s=a(17),i=a(3),u=a(1),m=a.n(u),p=a(5),E=a(7),A=a.n(E),f=a(42),d=a.n(f),g=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3;return function(n){var r=d.a.v4();n({type:"SET_ALERT",payload:{msg:e,alertType:t,id:r}}),setTimeout(function(){return n({type:"REMOVE_ALERT",payload:r})},a)}},h=function(e){e?A.a.defaults.headers.common["x-auth-token"]=e:delete A.a.defaults.headers.common["x-auth-token"]},b=function(){return function(){var e=Object(p.a)(m.a.mark(function e(t){var a;return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return localStorage.token&&h(localStorage.token),e.prev=1,e.next=4,A.a.get("/api/auth");case 4:a=e.sent,t({type:"USER_LOADED",payload:a.data}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),t({type:"AUTH_ERROR"});case 11:case"end":return e.stop()}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}()},y=Object(i.b)(function(e){return{auth:e.auth}},{logout:function(){return function(e){e({type:"CLEAR_PROFILE"}),e({type:"LOGOUT"})}}})(function(e){var t=e.auth,a=t.isAuthenticated,c=t.loading,o=e.logout,s=r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement(l.b,{to:"/profiles"},"Squad")),r.a.createElement("li",null,r.a.createElement(l.b,{to:"/stories"},"Stories")),r.a.createElement("li",null,r.a.createElement(l.b,{to:"/dashboard"},r.a.createElement("i",{className:"fas fa-user"})," ",r.a.createElement("span",{className:"hide-sm"},"Dashboard"))),r.a.createElement("li",null,r.a.createElement("a",{onClick:o,href:"#!"},r.a.createElement("i",{className:"fas fa-sign-out-alt"})," ",r.a.createElement("span",{className:"hide-sm"},"Logout")))),i=r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement(l.b,{to:"/profiles"},"Squad")),r.a.createElement("li",null,r.a.createElement(l.b,{to:"/register"},"Register")),r.a.createElement("li",null,r.a.createElement(l.b,{to:"/login"},"Login")));return r.a.createElement("nav",{className:"navbar bg-dark"},r.a.createElement("h1",null,r.a.createElement(l.b,{to:"/"},r.a.createElement("i",{className:"fas fa-code"})," OurStory")),!c&&r.a.createElement(n.Fragment,null,a?s:i))}),B=Object(i.b)(function(e){return{isAuthenticated:e.auth.isAuthenticated}})(function(e){return e.isAuthenticated?r.a.createElement(s.a,{to:"/dashboard"}):r.a.createElement("section",{className:"landing"},r.a.createElement("div",{className:"dark-overlay"},r.a.createElement("div",{className:"landing-inner"},r.a.createElement("h1",{className:"x-large"},"Our Wedding Story"),r.a.createElement("p",{className:"lead"},"Create your story. Have your friends add theirs. Create our Wedding Story."),r.a.createElement("div",{className:"buttons"},r.a.createElement(l.b,{to:"/register",className:"btn btn-primary"},"Sign Up"),r.a.createElement(l.b,{to:"/login",className:"btn btn-light"},"Login")))))}),v=a(13),C=a(4),w=a(8),N=Object(i.b)(function(e){return{isAuthenticated:e.auth.isAuthenticated}},{setAlert:g,register:function(e){var t=e.name,a=e.email,n=e.password;return function(){var e=Object(p.a)(m.a.mark(function e(r){var c,o,l,s;return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c={headers:{"Content-Type":"application/json"}},o=JSON.stringify({name:t,email:a,password:n}),e.prev=2,e.next=5,A.a.post("/api/users",o,c);case 5:l=e.sent,r({type:"REGISTER_SUCCESS",payload:l.data}),r(b()),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(2),(s=e.t0.response.data.errors)&&s.forEach(function(e){return r(g(e.msg,"danger"))}),r({type:"REGISTER_FAIL"});case 15:case"end":return e.stop()}},e,null,[[2,10]])}));return function(t){return e.apply(this,arguments)}}()}})(function(e){var t=e.setAlert,a=e.register,c=e.isAuthenticated,o=Object(n.useState)({name:"",email:"",password:"",password2:""}),i=Object(w.a)(o,2),u=i[0],E=i[1],A=u.name,f=u.email,d=u.password,g=u.password2,h=function(e){return E(Object(C.a)({},u,Object(v.a)({},e.target.name,e.target.value)))},b=function(){var e=Object(p.a)(m.a.mark(function e(n){return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n.preventDefault(),d!==g?t("Passwords do not match","danger"):a({name:A,email:f,password:d});case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();return c?r.a.createElement(s.a,{to:"/dashboard"}):r.a.createElement(n.Fragment,null,r.a.createElement("h1",{className:"large text-primary"},"Sign Up"),r.a.createElement("p",{className:"lead"},r.a.createElement("i",{className:"fas fa-user"})," Create Your Account"),r.a.createElement("form",{className:"form",onSubmit:function(e){return b(e)}},r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"text",placeholder:"Name",name:"name",value:A,onChange:function(e){return h(e)}})),r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"email",placeholder:"Email Address",name:"email",value:f,onChange:function(e){return h(e)}}),r.a.createElement("small",{className:"form-text"},"This site uses Gravatar so if you want a profile image, use a Gravatar email")),r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"password",placeholder:"Password",name:"password",value:d,onChange:function(e){return h(e)}})),r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"password",placeholder:"Confirm Password",name:"password2",value:g,onChange:function(e){return h(e)}})),r.a.createElement("input",{type:"submit",className:"btn btn-primary",value:"Register"})),r.a.createElement("p",{className:"my-1"},"Already have an account? ",r.a.createElement(l.b,{to:"/login"},"Sign In")))}),O=Object(i.b)(function(e){return{isAuthenticated:e.auth.isAuthenticated}},{login:function(e,t){return function(){var a=Object(p.a)(m.a.mark(function a(n){var r,c,o,l;return m.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r={headers:{"Content-Type":"application/json"}},c=JSON.stringify({email:e,password:t}),a.prev=2,a.next=5,A.a.post("/api/auth",c,r);case 5:o=a.sent,n({type:"LOGIN_SUCCESS",payload:o.data}),n(b()),a.next=15;break;case 10:a.prev=10,a.t0=a.catch(2),(l=a.t0.response.data.errors)&&l.forEach(function(e){return n(g(e.msg,"danger"))}),n({type:"LOGIN_FAIL"});case 15:case"end":return a.stop()}},a,null,[[2,10]])}));return function(e){return a.apply(this,arguments)}}()}})(function(e){var t=e.login,a=e.isAuthenticated,c=Object(n.useState)({email:"",password:""}),o=Object(w.a)(c,2),i=o[0],u=o[1],E=i.email,A=i.password,f=function(e){return u(Object(C.a)({},i,Object(v.a)({},e.target.name,e.target.value)))},d=function(){var e=Object(p.a)(m.a.mark(function e(a){return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a.preventDefault(),t(E,A);case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();return a?r.a.createElement(s.a,{to:"/dashboard"}):r.a.createElement(n.Fragment,null,r.a.createElement("h1",{className:"large text-primary"},"Sign In"),r.a.createElement("p",{className:"lead"},r.a.createElement("i",{className:"fas fa-user"})," Sign Into Your Account"),r.a.createElement("form",{className:"form",onSubmit:function(e){return d(e)}},r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"email",placeholder:"Email Address",name:"email",value:E,onChange:function(e){return f(e)},required:!0})),r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"password",placeholder:"Password",name:"password",value:A,onChange:function(e){return f(e)},minLength:"6"})),r.a.createElement("input",{type:"submit",className:"btn btn-primary",value:"Login"})),r.a.createElement("p",{className:"my-1"},"Don't have an account? ",r.a.createElement(l.b,{to:"/register"},"Sign Up")))}),k=Object(i.b)(function(e){return{alerts:e.alert}})(function(e){var t=e.alerts;return null!==t&&t.length>0&&t.map(function(e){return r.a.createElement("div",{key:e.id,className:"alert alert-".concat(e.alertType)},e.msg)})}),R=a(18),x=a.n(R),I=a(23),S=a.n(I),F=function(){return function(){var e=Object(p.a)(m.a.mark(function e(t){var a;return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,A.a.get("/api/profile/me");case 3:a=e.sent,t({type:"GET_PROFILE",payload:a.data}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),t({type:"PROFIL_ERROR",payload:{msg:e.t0.response.statusText,status:e.t0.response.status}});case 10:case"end":return e.stop()}},e,null,[[0,7]])}));return function(t){return e.apply(this,arguments)}}()},j=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var n=Object(p.a)(m.a.mark(function n(r){var c,o,l;return m.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,c={headers:{"Content-Type":"application/json"}},n.next=4,A.a.post("/api/profile",e,c);case 4:o=n.sent,r({type:"GET_PROFILE",payload:o.data}),r(g(a?"Profile Updated":"Profile Created","success")),a||t.push("/dashboard"),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),(l=n.t0.response.data.errors)&&l.forEach(function(e){return r(g(e.msg,"danger"))}),r({type:"PROFIL_ERROR",payload:{msg:n.t0.response.statusText,status:n.t0.response.status}});case 15:case"end":return n.stop()}},n,null,[[0,10]])}));return function(e){return n.apply(this,arguments)}}()},Q=Object(i.b)(null,{deleteGuestbook:function(e){return function(){var t=Object(p.a)(m.a.mark(function t(a){var n;return m.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,A.a.delete("/api/profile/guestbook/".concat(e));case 3:n=t.sent,a({type:"UPDATE_PROFILE",payload:n.data}),a(g("Guestbook Removed","success")),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),a({type:"PROFIL_ERROR",payload:{msg:t.t0.response.statusText,status:t.t0.response.status}});case 11:case"end":return t.stop()}},t,null,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()}})(function(e){var t=e.guestbook,a=e.deleteGuestbook,c=t.map(function(e){return r.a.createElement("tr",{key:e._id},r.a.createElement("td",null,e.name),r.a.createElement("td",{className:"hide-sm"},e.background),r.a.createElement("td",null,r.a.createElement(x.a,{format:"YYYY/MM/DD"},S.a.utc(e.from))," -"," ",null===e.to?" Now":r.a.createElement(x.a,{format:"YYYY/MM/DD"},S.a.utc(e.to))),r.a.createElement("td",null,r.a.createElement("button",{onClick:function(){return a(e._id)},className:"btn btn-danger"},"Delete")))});return r.a.createElement(n.Fragment,null,r.a.createElement("h2",{className:"my-2"},"Guestbooks"),r.a.createElement("table",{className:"table"},r.a.createElement("thead",null,r.a.createElement("tr",null,r.a.createElement("th",null,"Wedding Name"),r.a.createElement("th",{className:"hide-sm"},"Background"),r.a.createElement("th",{className:"hide-sm"},"Date"),r.a.createElement("th",null))),r.a.createElement("tbody",null,c)))}),D=function(e){var t=e.addLike,a=e.removeLike,c=e.deleteStory,o=e.auth,s=e.story,i=s._id,u=s.text,m=s.name,p=s.avatar,E=s.user,A=s.likes,f=s.comments,d=s.date,g=e.showActions;return r.a.createElement("div",{className:"story bg-white p-1 my-1"},r.a.createElement("div",null,r.a.createElement(l.b,{to:"/profile/".concat(E)},r.a.createElement("img",{className:"round-img",src:p,alt:""}),r.a.createElement("h4",null,m))),r.a.createElement("div",null,r.a.createElement("p",{className:"my-1"},u),r.a.createElement("p",{className:"story-date"},"Storyed on ",r.a.createElement(x.a,{format:"YYYY/MM/DD"},d)),g&&r.a.createElement(n.Fragment,null,r.a.createElement("button",{onClick:function(){return t(i)},type:"button",className:"btn btn-light"},r.a.createElement("i",{className:"fas fa-thumbs-up"})," ",r.a.createElement("span",null,A.length>0&&r.a.createElement("span",null,A.length))),r.a.createElement("button",{onClick:function(){return a(i)},type:"button",className:"btn btn-light"},r.a.createElement("i",{className:"fas fa-thumbs-down"})),r.a.createElement(l.b,{to:"/stories/".concat(i),className:"btn btn-primary"},"Discussion"," ",f.length>0&&r.a.createElement("span",{className:"comment-count"},f.length)),!o.loading&&E===o.user._id&&r.a.createElement("button",{onClick:function(){return c(i)},type:"button",className:"btn btn-danger"},r.a.createElement("i",{className:"fas fa-times"})))))};D.defaultProps={showActions:!0};var G=Object(i.b)(function(e){return{auth:e.auth}},{addLike:function(e){return function(){var t=Object(p.a)(m.a.mark(function t(a){var n;return m.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,A.a.put("/api/stories/like/".concat(e));case 3:n=t.sent,a({type:"UPDATE_LIKES",payload:{id:e,likes:n.data}}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),a({type:"STORY_ERROR",payload:{msg:t.t0.response.statusText,status:t.t0.response.status}});case 10:case"end":return t.stop()}},t,null,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},removeLike:function(e){return function(){var t=Object(p.a)(m.a.mark(function t(a){var n;return m.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,A.a.put("/api/stories/unlike/".concat(e));case 3:n=t.sent,a({type:"UPDATE_LIKES",payload:{id:e,likes:n.data}}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),a({type:"STORY_ERROR",payload:{msg:t.t0.response.statusText,status:t.t0.response.status}});case 10:case"end":return t.stop()}},t,null,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},deleteStory:function(e){return function(){var t=Object(p.a)(m.a.mark(function t(a){return m.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,A.a.delete("/api/stories/".concat(e));case 3:a({type:"DELETE_STORY",payload:e}),a(g("Story Removed","success")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),a({type:"STORY_ERROR",payload:{msg:t.t0.response.statusText,status:t.t0.response.status}});case 10:case"end":return t.stop()}},t,null,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()}})(D),Y=Object(i.b)(null,{addStory:function(e){return function(){var t=Object(p.a)(m.a.mark(function t(a){var n,r;return m.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n={headers:{"Content-Type":"application/json"}},t.prev=1,t.next=4,A.a.post("/api/stories",e,n);case 4:r=t.sent,a({type:"ADD_STORY",payload:r.data}),a(g("Story Created","success")),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),a({type:"STORY_ERROR",payload:{msg:t.t0.response.statusText,status:t.t0.response.status}});case 12:case"end":return t.stop()}},t,null,[[1,9]])}));return function(e){return t.apply(this,arguments)}}()}})(function(e){var t=e.addStory,a=Object(n.useState)(""),c=Object(w.a)(a,2),o=c[0],l=c[1];return r.a.createElement("div",{className:"story-form"},r.a.createElement("div",{className:"bg-primary p"},r.a.createElement("h3",null,"Say Something...")),r.a.createElement("form",{className:"form my-1",onSubmit:function(e){e.preventDefault(),t({text:o}),l("")}},r.a.createElement("textarea",{name:"text",cols:"30",rows:"5",placeholder:"Create a story",value:o,onChange:function(e){return l(e.target.value)},required:!0}),r.a.createElement("input",{type:"submit",className:"btn btn-dark my-1",value:"Submit"})))}),U=a(44),L=a.n(U),T=function(){return r.a.createElement(n.Fragment,null,r.a.createElement("img",{src:L.a,style:{width:"200px",margin:"auto",display:"block"},alt:"Loading..."}))},M=function(){return r.a.createElement("div",{className:"dash-buttons"},r.a.createElement(l.b,{to:"/edit-profile",className:"btn btn-light"},r.a.createElement("i",{className:"fas fa-user-circle text-primary"})," Edit Profile"),r.a.createElement(l.b,{to:"/add-guestbook",className:"btn btn-light"},r.a.createElement("i",{className:"fab fa-black-tie text-primary"})," Add Guestbook"))},H=Object(i.b)(function(e){return{auth:e.auth,profile:e.profile,story:e.story}},{getCurrentProfile:F,getCurrentUserStories:function(){return function(){var e=Object(p.a)(m.a.mark(function e(t){var a;return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,A.a.get("/api/stories/current");case 3:a=e.sent,t({type:"GET_STORIES",payload:a.data}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),t({type:"STORY_ERROR",payload:{msg:e.t0.response.statusText,status:e.t0.response.status}});case 10:case"end":return e.stop()}},e,null,[[0,7]])}));return function(t){return e.apply(this,arguments)}}()},deleteAccount:function(){return function(){var e=Object(p.a)(m.a.mark(function e(t){return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.confirm("Are you sure? This can NOT be undone!")){e.next=12;break}return e.prev=1,e.next=4,A.a.delete("/api/profile");case 4:t({type:"CLEAR_PROFILE"}),t({type:"ACCOUNT_DELETED"}),t(g("Your account has been permanantly deleted")),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),t({type:"PROFIL_ERROR",payload:{msg:e.t0.response.statusText,status:e.t0.response.status}});case 12:case"end":return e.stop()}},e,null,[[1,9]])}));return function(t){return e.apply(this,arguments)}}()}})(function(e){var t=e.getCurrentProfile,a=e.deleteAccount,c=e.auth.user,o=e.profile,s=o.profile,i=o.loading,u=e.getCurrentUserStories,m=e.story.stories;return Object(n.useEffect)(function(){t()},[t]),Object(n.useEffect)(function(){u()},[u]),i&&null===s?r.a.createElement(T,null):r.a.createElement(n.Fragment,null,r.a.createElement("h1",{className:"large text-primary"},"Dashboard"),r.a.createElement("p",{className:"lead"},r.a.createElement("i",{className:"fas fa-user"})," Welcome ",c&&c.name),null!==s?r.a.createElement(n.Fragment,null,r.a.createElement(M,null),r.a.createElement(Q,{guestbook:s.guestbook}),r.a.createElement("div",{className:"my-2"},r.a.createElement("button",{className:"btn btn-danger",onClick:function(){return a()}},r.a.createElement("i",{className:"fas fa-user-minus"})," Delete My Account")),r.a.createElement("h1",{className:"large text-primary"},"Your Wedding Stories"),r.a.createElement("p",{className:"lead"},r.a.createElement("i",{className:"fas fa-user"})," Add your Wedding Story Here:"),r.a.createElement(Y,null),r.a.createElement("div",{className:"stories"},m.map(function(e){return r.a.createElement(G,{key:e._id,story:e})}))):r.a.createElement(n.Fragment,null,r.a.createElement("p",null,"Welcome to Our Wedding Story. Let's begin by entering a little about yourself!"),r.a.createElement(l.b,{to:"/create-profile",className:"btn btn-primary my-1"},"Say Hello")))}),P=Object(i.b)(null,{createProfile:j})(Object(s.g)(function(e){var t=e.createProfile,a=e.history,c=Object(n.useState)({bio:"",twitter:"",facebook:"",linkedin:"",youtube:"",instagram:""}),o=Object(w.a)(c,2),s=o[0],i=o[1],u=Object(n.useState)(!1),m=Object(w.a)(u,2),p=m[0],E=m[1],A=s.bio,f=s.twitter,d=s.facebook,g=s.linkedin,h=s.youtube,b=s.instagram,y=function(e){return i(Object(C.a)({},s,Object(v.a)({},e.target.name,e.target.value)))};return r.a.createElement(n.Fragment,null,r.a.createElement("h1",{className:"large text-primary"},"Create Your Profile"),r.a.createElement("p",{className:"lead"},r.a.createElement("i",{className:"fas fa-user"})," Let's get some information to make your profile stand out"),r.a.createElement("small",null,"* = required field"),r.a.createElement("form",{className:"form",onSubmit:function(e){return function(e){e.preventDefault(),t(s,a)}(e)}},r.a.createElement("div",{className:"form-group"},r.a.createElement("textarea",{placeholder:"A short bio of yourself",name:"bio",value:A,onChange:function(e){return y(e)}}),r.a.createElement("small",{className:"form-text"},"Tell us a little about yourself")),r.a.createElement("div",{className:"my-2"},r.a.createElement("button",{onClick:function(){return E(!p)},type:"button",className:"btn btn-light"},"Add Social Network Links"),r.a.createElement("span",null,"Optional")),p&&r.a.createElement(n.Fragment,null,r.a.createElement("div",{className:"form-group social-input"},r.a.createElement("i",{className:"fab fa-twitter fa-2x"}),r.a.createElement("input",{type:"text",placeholder:"Twitter URL",name:"twitter",value:f,onChange:function(e){return y(e)}})),r.a.createElement("div",{className:"form-group social-input"},r.a.createElement("i",{className:"fab fa-facebook fa-2x"}),r.a.createElement("input",{type:"text",placeholder:"Facebook URL",name:"facebook",value:d,onChange:function(e){return y(e)}})),r.a.createElement("div",{className:"form-group social-input"},r.a.createElement("i",{className:"fab fa-youtube fa-2x"}),r.a.createElement("input",{type:"text",placeholder:"YouTube URL",name:"youtube",value:h,onChange:function(e){return y(e)}})),r.a.createElement("div",{className:"form-group social-input"},r.a.createElement("i",{className:"fab fa-linkedin fa-2x"}),r.a.createElement("input",{type:"text",placeholder:"Linkedin URL",name:"linkedin",value:g,onChange:function(e){return y(e)}})),r.a.createElement("div",{className:"form-group social-input"},r.a.createElement("i",{className:"fab fa-instagram fa-2x"}),r.a.createElement("input",{type:"text",placeholder:"Instagram URL",name:"instagram",value:b,onChange:function(e){return y(e)}}))),r.a.createElement("input",{type:"submit",className:"btn btn-primary my-1"}),r.a.createElement(l.b,{className:"btn btn-light my-1",to:"/dashboard"},"Go Back")))})),W=function(e){var t=e.msg;return r.a.createElement("div",{className:"alert alert-info alert-dismissible fade show",role:"alert"},t,r.a.createElement("button",{type:"button",className:"close","data-dismiss":"alert","aria-label":"Close"},r.a.createElement("span",{"aria-hidden":"true"},"\xd7")))},K=function(e){var t=e.percentage;return r.a.createElement("div",{className:"progress"},r.a.createElement("div",{className:"progress-bar progress-bar-striped bg-success",role:"progressbar",style:{width:"".concat(t,"%")}},t,"%"))},J=function(){var e=Object(n.useState)(""),t=Object(w.a)(e,2),a=t[0],c=t[1],o=Object(n.useState)("Choose File"),l=Object(w.a)(o,2),s=l[0],i=l[1],u=Object(n.useState)({}),E=Object(w.a)(u,2),f=E[0],d=E[1],g=Object(n.useState)(""),h=Object(w.a)(g,2),b=h[0],y=h[1],B=Object(n.useState)(0),v=Object(w.a)(B,2),C=v[0],N=v[1],O=function(){var e=Object(p.a)(m.a.mark(function e(t){var n,r,c,o,l;return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),(n=new FormData).append("file",a),e.prev=3,e.next=6,A.a.post("/api/upload",n,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:function(e){N(parseInt(Math.round(100*e.loaded/e.total))),setTimeout(function(){return N(0)},1e4)}});case 6:r=e.sent,c=r.data,o=c.fileName,l=c.filePath,d({fileName:o,filePath:l}),y("File Uploaded"),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),500===e.t0.response.status?y("There was a problem with the server"):y(e.t0.response.data.msg);case 15:case"end":return e.stop()}},e,null,[[3,12]])}));return function(t){return e.apply(this,arguments)}}();return r.a.createElement(n.Fragment,null,b?r.a.createElement(W,{msg:b}):null,r.a.createElement("form",{onSubmit:O},r.a.createElement("div",{className:"custom-file mb-4"},r.a.createElement("input",{type:"file",className:"custom-file-input",id:"customFile",onChange:function(e){c(e.target.files[0]),i(e.target.files[0].name)}}),r.a.createElement("label",{className:"custom-file-label",htmlFor:"customFile"},s)),r.a.createElement(K,{percentage:C}),r.a.createElement("input",{type:"submit",value:"Upload",className:"btn btn-primary btn-block mt-4"})),f?r.a.createElement("div",{className:"row mt-5"},r.a.createElement("div",{className:"col-md-6 m-auto"},r.a.createElement("img",{style:{width:"100%"},src:f.filePath,alt:f.fileName}))):null)},Z=Object(i.b)(function(e){return{profile:e.profile}},{createProfile:j,getCurrentProfile:F})(Object(s.g)(function(e){var t=e.profile,a=t.profile,c=t.loading,o=e.createProfile,s=e.getCurrentProfile,i=e.history,u=Object(n.useState)({bio:"",twitter:"",facebook:"",linkedin:"",youtube:"",instagram:""}),m=Object(w.a)(u,2),p=m[0],E=m[1],A=Object(n.useState)(!1),f=Object(w.a)(A,2),d=f[0],g=f[1];Object(n.useEffect)(function(){s(),E({bio:c||!a.bio?"":a.bio,twitter:c||!a.social?"":a.social.twitter,facebook:c||!a.social?"":a.social.facebook,linkedin:c||!a.social?"":a.social.linkedin,youtube:c||!a.social?"":a.social.youtube,instagram:c||!a.social?"":a.social.instagram})},[c,s]);var h=p.bio,b=p.twitter,y=p.facebook,B=p.linkedin,N=p.youtube,O=p.instagram,k=function(e){return E(Object(C.a)({},p,Object(v.a)({},e.target.name,e.target.value)))};return r.a.createElement(n.Fragment,null,r.a.createElement("h1",{className:"large text-primary"},"Edit Your Profile"),r.a.createElement("p",{className:"lead"},r.a.createElement("i",{className:"fas fa-user"})," Let's add a profile picture"),r.a.createElement("small",null,"* = required field"),r.a.createElement(J,null),r.a.createElement("form",{className:"form",onSubmit:function(e){return function(e){e.preventDefault(),o(p,i,!0)}(e)}},r.a.createElement("div",{className:"form-group"},r.a.createElement("textarea",{placeholder:"A short bio of yourself",name:"bio",rows:"4",cols:"50",value:h,onChange:function(e){return k(e)}}),r.a.createElement("small",{className:"form-text"},"You can edit your bio here")),r.a.createElement("div",{className:"my-2"},r.a.createElement("button",{onClick:function(){return g(!d)},type:"button",className:"btn btn-light"},"Add Social Network Links"),r.a.createElement("span",null,"Optional")),d&&r.a.createElement(n.Fragment,null,r.a.createElement("div",{className:"form-group social-input"},r.a.createElement("i",{className:"fab fa-twitter fa-2x"}),r.a.createElement("input",{type:"text",placeholder:"Twitter URL",name:"twitter",value:b,onChange:function(e){return k(e)}})),r.a.createElement("div",{className:"form-group social-input"},r.a.createElement("i",{className:"fab fa-facebook fa-2x"}),r.a.createElement("input",{type:"text",placeholder:"Facebook URL",name:"facebook",value:y,onChange:function(e){return k(e)}})),r.a.createElement("div",{className:"form-group social-input"},r.a.createElement("i",{className:"fab fa-youtube fa-2x"}),r.a.createElement("input",{type:"text",placeholder:"YouTube URL",name:"youtube",value:N,onChange:function(e){return k(e)}})),r.a.createElement("div",{className:"form-group social-input"},r.a.createElement("i",{className:"fab fa-linkedin fa-2x"}),r.a.createElement("input",{type:"text",placeholder:"Linkedin URL",name:"linkedin",value:B,onChange:function(e){return k(e)}})),r.a.createElement("div",{className:"form-group social-input"},r.a.createElement("i",{className:"fab fa-instagram fa-2x"}),r.a.createElement("input",{type:"text",placeholder:"Instagram URL",name:"instagram",value:O,onChange:function(e){return k(e)}}))),r.a.createElement("input",{type:"submit",className:"btn btn-primary my-1"}),r.a.createElement(l.b,{className:"btn btn-light my-1",to:"/dashboard"},"Go Back")))})),q=Object(i.b)(null,{addGuestbook:function(e,t){return function(){var a=Object(p.a)(m.a.mark(function a(n){var r,c,o;return m.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,r={headers:{"Content-Type":"application/json"}},a.next=4,A.a.put("/api/profile/guestbooks",e,r);case 4:c=a.sent,n({type:"UPDATE_PROFILE",payload:c.data}),n(g("Guestbook Added","success")),t.push("/dashboard"),a.next=15;break;case 10:a.prev=10,a.t0=a.catch(0),(o=a.t0.response.data.errors)&&o.forEach(function(e){return n(g(e.msg,"danger"))}),n({type:"PROFIL_ERROR",payload:{msg:a.t0.response.statusText,status:a.t0.response.status}});case 15:case"end":return a.stop()}},a,null,[[0,10]])}));return function(e){return a.apply(this,arguments)}}()}})(Object(s.g)(function(e){var t=e.addGuestbook,a=e.history,c=Object(n.useState)({name:"",background:"",location:"",from:"",to:"",openInvite:!1,notes:""}),o=Object(w.a)(c,2),s=o[0],i=o[1],u=Object(n.useState)(!1),m=Object(w.a)(u,2),p=m[0],E=m[1],A=s.name,f=s.background,d=s.location,g=s.from,h=s.to,b=s.openInvite,y=s.notes,B=function(e){return i(Object(C.a)({},s,Object(v.a)({},e.target.name,e.target.value)))};return r.a.createElement(n.Fragment,null,r.a.createElement("h1",{className:"large text-primary"},"Add a Wedding Date"),r.a.createElement("p",{className:"lead"},r.a.createElement("i",{className:"fas fa-code-branch"})," Introduce the couple and inspire your friends to add to their story!"),r.a.createElement("small",null,"* = required field"),r.a.createElement("form",{className:"form",onSubmit:function(e){e.preventDefault(),t(s,a)}},r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"text",placeholder:"* Wedding Name",name:"name",value:A,onChange:function(e){return B(e)},required:!0})),r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"text",placeholder:"* How do you know them?",name:"background",value:f,onChange:function(e){return B(e)},required:!0})),r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"text",placeholder:"Location",name:"location",value:d,onChange:function(e){return B(e)}})),r.a.createElement("div",{className:"form-group"},r.a.createElement("h4",null,"From Date"),r.a.createElement("input",{type:"date",name:"from",value:g,onChange:function(e){return B(e)}})),r.a.createElement("div",{className:"form-group"},r.a.createElement("p",null,r.a.createElement("input",{type:"checkbox",name:"openInvite",checked:b,value:b,onChange:function(){i(Object(C.a)({},s,{openInvite:!b})),E(!p)}})," ","Open Invite")),r.a.createElement("div",{className:"form-group"},r.a.createElement("h4",null,"To Date"),r.a.createElement("input",{type:"date",name:"to",value:h,onChange:function(e){return B(e)},disabled:p?"disabled":""})),r.a.createElement("div",{className:"form-group"},r.a.createElement("textarea",{name:"notes",cols:"30",rows:"5",placeholder:"Notes",value:y,onChange:function(e){return B(e)}})),r.a.createElement("input",{type:"submit",className:"btn btn-primary my-1"}),r.a.createElement(l.b,{className:"btn btn-light my-1",to:"/dashboard"},"Go Back")))})),V=function(e){var t=e.profile,a=t.user,n=a._id,c=a.name,o=a.avatar,s=t.bio;return r.a.createElement("div",{className:"profile bg-light"},r.a.createElement("img",{src:o,alt:"",className:"round-img"}),r.a.createElement("div",null,r.a.createElement("h2",null,c),r.a.createElement("p",null,s),r.a.createElement(l.b,{to:"/profile/".concat(n),className:"btn btn-primary"},"View Profile")))},z=Object(i.b)(function(e){return{profile:e.profile}},{getProfiles:function(){return function(){var e=Object(p.a)(m.a.mark(function e(t){var a;return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:"CLEAR_PROFILE"}),e.prev=1,e.next=4,A.a.get("/api/profile");case 4:a=e.sent,t({type:"GET_PROFILES",payload:a.data}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),t({type:"PROFIL_ERROR",payload:{msg:e.t0.response.statusText,status:e.t0.response.status}});case 11:case"end":return e.stop()}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}()}})(function(e){var t=e.getProfiles,a=e.profile,c=a.profiles,o=a.loading;return Object(n.useEffect)(function(){t()},[t]),r.a.createElement(n.Fragment,null,o?r.a.createElement(T,null):r.a.createElement(n.Fragment,null,r.a.createElement("h1",{className:"large text-primary"},"Your Wedding Party"),r.a.createElement("p",{className:"lead"},r.a.createElement("i",{className:"fab fa-connectdevelop"})," Connect and share your stories"),r.a.createElement("div",{className:"profiles"},c.length>0?c.map(function(e){return r.a.createElement(V,{key:e._id,profile:e})}):r.a.createElement("h4",null,"No profiles found..."))))}),X=function(e){var t=e.profile,a=t.social,n=t.user,c=n.name,o=n.avatar;return r.a.createElement("div",{className:"profile-top bg-primary p-2"},r.a.createElement("img",{className:"round-img my-1",src:o,alt:""}),r.a.createElement("h1",{className:"large"},c),r.a.createElement("div",{className:"icons my-1"},a&&a.twitter&&r.a.createElement("a",{href:a.twitter,target:"_blank",rel:"noopener noreferrer"},r.a.createElement("i",{className:"fab fa-twitter fa-2x"})),a&&a.facebook&&r.a.createElement("a",{href:a.facebook,target:"_blank",rel:"noopener noreferrer"},r.a.createElement("i",{className:"fab fa-facebook fa-2x"})),a&&a.linkedin&&r.a.createElement("a",{href:a.linkedin,target:"_blank",rel:"noopener noreferrer"},r.a.createElement("i",{className:"fab fa-linkedin fa-2x"})),a&&a.youtube&&r.a.createElement("a",{href:a.youtube,target:"_blank",rel:"noopener noreferrer"},r.a.createElement("i",{className:"fab fa-youtube fa-2x"})),a&&a.instagram&&r.a.createElement("a",{href:a.instagram,target:"_blank",rel:"noopener noreferrer"},r.a.createElement("i",{className:"fab fa-instagram fa-2x"}))))},_=function(e){var t=e.profile,a=t.bio,c=t.user.name;return r.a.createElement("div",{className:"profile-about bg-light p-2"},a&&r.a.createElement(n.Fragment,null,r.a.createElement("h2",{className:"text-primary"},c.trim().split(" ")[0],"s Bio"),r.a.createElement("p",null,a),r.a.createElement("div",{className:"line"})))},$=Object(i.b)(function(e){return{profile:e.profile,auth:e.auth}},{getProfileById:function(e){return function(){var t=Object(p.a)(m.a.mark(function t(a){var n;return m.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,A.a.get("/api/profile/user/".concat(e));case 3:n=t.sent,a({type:"GET_PROFILE",payload:n.data}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),a({type:"PROFIL_ERROR",payload:{msg:t.t0.response.statusText,status:t.t0.response.status}});case 10:case"end":return t.stop()}},t,null,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()}})(function(e){var t=e.getProfileById,a=e.profile,c=a.profile,o=a.loading,s=e.auth,i=e.match;return Object(n.useEffect)(function(){t(i.params.id)},[t,i.params.id]),r.a.createElement(n.Fragment,null,null===c||o?r.a.createElement(T,null):r.a.createElement(n.Fragment,null,r.a.createElement(l.b,{to:"/profiles",className:"btn btn-light"},"Back To Profiles"),s.isAuthenticated&&!1===s.loading&&s.user._id===c.user._id&&r.a.createElement(l.b,{to:"/edit-profile",className:"btn btn-dark"},"Edit Profile"),r.a.createElement("div",{className:"profile-grid my-1"},r.a.createElement(X,{profile:c}),r.a.createElement(_,{profile:c}))))}),ee=Object(i.b)(function(e){return{story:e.story}},{getStories:function(){return function(){var e=Object(p.a)(m.a.mark(function e(t){var a;return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,A.a.get("/api/stories");case 3:a=e.sent,t({type:"GET_STORIES",payload:a.data}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),t({type:"STORY_ERROR",payload:{msg:e.t0.response.statusText,status:e.t0.response.status}});case 10:case"end":return e.stop()}},e,null,[[0,7]])}));return function(t){return e.apply(this,arguments)}}()}})(function(e){var t=e.getStories,a=e.story,c=a.stories,o=a.loading;return Object(n.useEffect)(function(){t()},[t]),o?r.a.createElement(T,null):r.a.createElement(n.Fragment,null,r.a.createElement("h1",{className:"large text-primary"},"Our Wedding Stories"),r.a.createElement("p",{className:"lead"},r.a.createElement("i",{className:"fas fa-user"})," Welcome to the community"),r.a.createElement("div",{className:"stories"},c.map(function(e){return r.a.createElement(G,{key:e._id,story:e})})))}),te=Object(i.b)(null,{addComment:function(e,t){return function(){var a=Object(p.a)(m.a.mark(function a(n){var r,c;return m.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r={headers:{"Content-Type":"application/json"}},a.prev=1,a.next=4,A.a.post("/api/stories/comment/".concat(e),t,r);case 4:c=a.sent,n({type:"ADD_COMMENT",payload:c.data}),n(g("Comment Added","success")),a.next=12;break;case 9:a.prev=9,a.t0=a.catch(1),n({type:"STORY_ERROR",payload:{msg:a.t0.response.statusText,status:a.t0.response.status}});case 12:case"end":return a.stop()}},a,null,[[1,9]])}));return function(e){return a.apply(this,arguments)}}()}})(function(e){var t=e.storyId,a=e.addComment,c=Object(n.useState)(""),o=Object(w.a)(c,2),l=o[0],s=o[1];return r.a.createElement("div",{className:"story-form"},r.a.createElement("div",{className:"bg-primary p"},r.a.createElement("h3",null,"Leave a Memory")),r.a.createElement("form",{className:"form my-1",onSubmit:function(e){e.preventDefault(),a(t,{text:l}),s("")}},r.a.createElement("textarea",{name:"text",cols:"30",rows:"5",placeholder:"Add to their story..",value:l,onChange:function(e){return s(e.target.value)},required:!0}),r.a.createElement("input",{type:"submit",className:"btn btn-dark my-1",value:"Submit"})))}),ae=Object(i.b)(function(e){return{auth:e.auth}},{deleteComment:function(e,t){return function(){var a=Object(p.a)(m.a.mark(function a(n){return m.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,A.a.delete("/api/stories/comment/".concat(e,"/").concat(t));case 3:n({type:"REMOVE_COMMENT",payload:t}),n(g("Comment Removed","success")),a.next=10;break;case 7:a.prev=7,a.t0=a.catch(0),n({type:"STORY_ERROR",payload:{msg:a.t0.response.statusText,status:a.t0.response.status}});case 10:case"end":return a.stop()}},a,null,[[0,7]])}));return function(e){return a.apply(this,arguments)}}()}})(function(e){var t=e.storyId,a=e.comment,n=a._id,c=a.text,o=a.name,s=a.avatar,i=a.user,u=a.date,m=e.auth,p=e.deleteComment;return r.a.createElement("div",{className:"story bg-white p-1 my-1"},r.a.createElement("div",null,r.a.createElement(l.b,{to:"/profile/".concat(i)},r.a.createElement("img",{className:"round-img",src:s,alt:""}),r.a.createElement("h4",null,o))),r.a.createElement("div",null,r.a.createElement("p",{className:"my-1"},c),r.a.createElement("p",{className:"story-date"},"Storyed on ",r.a.createElement(x.a,{format:"YYYY/MM/DD"},u)),!m.loading&&i===m.user._id&&r.a.createElement("button",{onClick:function(){return p(t,n)},type:"button",className:"btn btn-danger"},r.a.createElement("i",{className:"fas fa-times"}))))}),ne=Object(i.b)(function(e){return{story:e.story}},{getStory:function(e){return function(){var t=Object(p.a)(m.a.mark(function t(a){var n;return m.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,A.a.get("/api/stories/".concat(e));case 3:n=t.sent,a({type:"GET_STORY",payload:n.data}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),a({type:"STORY_ERROR",payload:{msg:t.t0.response.statusText,status:t.t0.response.status}});case 10:case"end":return t.stop()}},t,null,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()}})(function(e){var t=e.getStory,a=e.story,c=a.story,o=a.loading,s=e.match;return Object(n.useEffect)(function(){t(s.params.id)},[t]),o||null===c?r.a.createElement(T,null):r.a.createElement(n.Fragment,null,r.a.createElement(l.b,{to:"/stories",className:"btn"},"Back To Stories"),r.a.createElement(G,{story:c,showActions:!1}),r.a.createElement(te,{storyId:c._id}),r.a.createElement("div",{className:"comments"},c.comments.map(function(e){return r.a.createElement(ae,{key:e._id,comment:e,storyId:c._id})})))}),re=function(){return r.a.createElement(n.Fragment,null,r.a.createElement("h1",{className:"x-large text-primary"},r.a.createElement("i",{className:"fas fa-exclamation-triangle"})," Page Not Found"),r.a.createElement("p",{className:"large"},"Sorry, this page does not exist"))},ce=a(47),oe=Object(i.b)(function(e){return{auth:e.auth}})(function(e){var t=e.component,a=e.auth,n=a.isAuthenticated,c=a.loading,o=Object(ce.a)(e,["component","auth"]);return r.a.createElement(s.b,Object.assign({},o,{render:function(e){return n||c?r.a.createElement(t,e):r.a.createElement(s.a,{to:"/login"})}}))}),le=function(){return r.a.createElement("section",{className:"container"},r.a.createElement(k,null),r.a.createElement(s.d,null,r.a.createElement(s.b,{exact:!0,path:"/register",component:N}),r.a.createElement(s.b,{exact:!0,path:"/login",component:O}),r.a.createElement(s.b,{exact:!0,path:"/profiles",component:z}),r.a.createElement(s.b,{exact:!0,path:"/profile/:id",component:$}),r.a.createElement(oe,{exact:!0,path:"/dashboard",component:H}),r.a.createElement(oe,{exact:!0,path:"/create-profile",component:P}),r.a.createElement(oe,{exact:!0,path:"/edit-profile",component:Z}),r.a.createElement(oe,{exact:!0,path:"/add-guestbook",component:q}),r.a.createElement(oe,{exact:!0,path:"/stories",component:ee}),r.a.createElement(oe,{exact:!0,path:"/stories/:id",component:ne}),r.a.createElement(s.b,{component:re})))},se=a(16),ie=a(45),ue=a(46),me=a(24),pe=[],Ee={token:localStorage.getItem("token"),isAuthenticated:null,loading:!0,user:null},Ae={profile:null,profiles:[],repos:[],loading:!0,error:{}},fe={stories:[],story:null,loading:!0,error:{}},de=Object(se.combineReducers)({alert:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe,t=arguments.length>1?arguments[1]:void 0,a=t.type,n=t.payload;switch(a){case"SET_ALERT":return[].concat(Object(me.a)(e),[n]);case"REMOVE_ALERT":return e.filter(function(e){return e.id!==n});default:return e}},auth:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ee,t=arguments.length>1?arguments[1]:void 0,a=t.type,n=t.payload;switch(a){case"USER_LOADED":return Object(C.a)({},e,{isAuthenticated:!0,loading:!1,user:n});case"REGISTER_SUCCESS":case"LOGIN_SUCCESS":return localStorage.setItem("token",n.token),Object(C.a)({},e,n,{isAuthenticated:!0,loading:!1});case"REGISTER_FAIL":case"AUTH_ERROR":case"LOGIN_FAIL":case"LOGOUT":case"ACCOUNT_DELETED":return localStorage.removeItem("token"),Object(C.a)({},e,{token:null,isAuthenticated:!1,loading:!1});default:return e}},profile:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ae,t=arguments.length>1?arguments[1]:void 0,a=t.type,n=t.payload;switch(a){case"GET_PROFILE":case"UPDATE_PROFILE":return Object(C.a)({},e,{profile:n,loading:!1});case"GET_PROFILES":return Object(C.a)({},e,{profiles:n,loading:!1});case"PROFIL_ERROR":return Object(C.a)({},e,{error:n,loading:!1});case"CLEAR_PROFILE":return Object(C.a)({},e,{profile:null,repos:[],loading:!1});case"GET_REPOS":return Object(C.a)({},e,{repos:n,loading:!1});default:return e}},story:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fe,t=arguments.length>1?arguments[1]:void 0,a=t.type,n=t.payload;switch(a){case"GET_STORIES":return Object(C.a)({},e,{stories:n,loading:!1});case"GET_STORY":return Object(C.a)({},e,{story:n,loading:!1});case"ADD_STORY":return Object(C.a)({},e,{stories:[n].concat(Object(me.a)(e.stories)),loading:!1});case"DELETE_STORY":return Object(C.a)({},e,{stories:e.stories.filter(function(e){return e._id!==n}),loading:!1});case"STORY_ERROR":return Object(C.a)({},e,{error:n,loading:!1});case"UPDATE_LIKES":return Object(C.a)({},e,{stories:e.stories.map(function(e){return e._id===n.id?Object(C.a)({},e,{likes:n.likes}):e}),loading:!1});case"ADD_COMMENT":return Object(C.a)({},e,{story:Object(C.a)({},e.story,{comments:n}),loading:!1});case"REMOVE_COMMENT":return Object(C.a)({},e,{story:Object(C.a)({},e.story,{comments:e.story.comments.filter(function(e){return e._id!==n})}),loading:!1});default:return e}}}),ge=[ue.a],he=Object(se.createStore)(de,{},Object(ie.composeWithDevTools)(se.applyMiddleware.apply(void 0,ge)));a(79),a(80);localStorage.token&&h(localStorage.token);var be=function(){return Object(n.useEffect)(function(){he.dispatch(b())},[]),r.a.createElement(i.a,{store:he},r.a.createElement(l.a,null,r.a.createElement(n.Fragment,null,r.a.createElement(y,null),r.a.createElement(s.d,null,r.a.createElement(s.b,{exact:!0,path:"/",component:B}),r.a.createElement(s.b,{component:le})))))};o.a.render(r.a.createElement(be,null),document.getElementById("root"))}},[[48,1,2]]]);
  //# sourceMappingURL=main.5797bfde.chunk.js.map