1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4647],{67540:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/profile/password",function(){return r(38588)}])},5392:function(e,t,r){"use strict";var n=r(5447),i=r(99728),o=r(8014),a=(r(56168),r(34237)),s=r(14131),u=r(40137);t.Z=function(e){var t=e.isDragActive,r=e.paragraphs,l=e.open,c=e.styles;return(0,o.jsxs)(a.kC,(0,i.Z)((0,n.Z)({flexDir:"column",flexGrow:"1",alignContent:"center",justifyContent:"center",alignItems:"center",w:"100%",maxW:"60%"},c),{children:[(0,o.jsx)(a.xu,{mb:"20px",children:(0,o.jsx)(u.Z,{icon:"upload",size:50})}),t?(0,o.jsx)(a.xv,{maxW:"450px",variant:"numeralsS",align:"center",children:"Drop your images here"}):(0,o.jsx)(a.kC,{w:"100%",maxWidth:"220px",flexDir:"column",alignContent:"center",children:r.map((function(e,t){return(0,o.jsx)(a.xv,{w:"100%",variant:"description",align:"center",mt:"10px",children:e},"paragraph--".concat(t))}))}),(0,o.jsx)(s.Z,{variant:"base.1.outline",size:"md",onClick:l,mt:"40px",children:"Upload Image"})]}))}},30436:function(e,t,r){"use strict";r.d(t,{Z:function(){return E}});var n=r(43692),i=r(5447),o=r(99728),a=r(2746),s=r(44453),u=r.n(s),l=r(8014),c=r(85085),d=r(56168),p=r(42003),f=r(65090),m=r(8403),h=r(90319),v=r(84855),x=r(34237),g=r(86584),w=r(59403),b=r(12048),_=r(60461),Z=r(77567),j=r(63940),y=r(5392),I=r(14131),P=r(40137),C=["Upload your Profile Picture. *","Simply drag & drop your image in the view or use Upload Button."],k={maxWidth:"460px",borderStyle:"solid"},D=function(e){var t=e.media,r=e.open,n=e.onRemoveImage,i=e.loading;return(0,l.jsxs)(x.xu,{filter:i?"blur(5px)":"blur(0)",position:"relative",role:"group",maxW:"460px",h:"100%",w:"100%",children:[(0,l.jsx)(Z.Z,{src:(0,h.Jn)(null===t||void 0===t?void 0:t.sizes.large.url),alt:"preview",layout:"fill",objectFit:"cover"}),(0,l.jsx)(x.kC,{w:"100%",h:"50%",p:{base:"20px",md:"40px 100px 40px 40px"},className:"overlay",pos:"absolute",left:"0",bottom:"0",transition:"opacity .4s",bgGradient:"linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(43, 43, 44, 0.7) 100%)",opacity:{base:1,md:0},alignItems:"flex-end",_groupHover:{opacity:1},children:(0,l.jsxs)(x.kC,{w:"100%",alignContent:"center",justifyContent:"space-between",children:[(0,l.jsx)(g.hU,{"aria-label":"Delete Picture",icon:(0,l.jsx)(P.Z,{icon:"trashicon",size:20,fill:"base.6"}),onClick:function(){return w.s.removeMediaItem(),void n()},bg:"red",minWidth:"0",borderRadius:"15px",width:"30px",height:"30px",padding:"0",zIndex:1}),(0,l.jsx)(I.Z,{color:"base.6",rightIcon:(0,l.jsx)(P.Z,{icon:"reloadicon",size:20,fill:"base.6"}),variant:"flat",size:"xs",onClick:r,children:"Change"})]})})]})},S=(0,_.Pi)((function(e){var t=e.getRootProps,r=e.getInputProps,n=e.isDragActive,a=e.open,s=e.onRemoveImage,u=e.media,c=e.loading,d=(0,b.rd)("base_2.3"),p=(0,o.Z)((0,i.Z)({},k),{borderColor:d,borderWidth:u?"0":"1px",marginLeft:u?"0":"1px"});return(0,l.jsxs)(x.kC,(0,o.Z)((0,i.Z)({style:p,flex:"1",minW:{base:"0",xl:"400px"}},t()),{minH:{base:"360px",md:"100%"},mb:{base:"20px",md:"0"},w:{base:"70%",md:"auto"},children:[(0,l.jsx)("input",(0,i.Z)({},r())),(0,l.jsxs)(x.kC,{direction:"column",flex:1,align:"center",justify:"center",position:"relative",children:[c&&(0,l.jsx)(j.Z,{position:"absolute",left:"0",top:"0",right:"0",bottom:"0",zIndex:"10",w:"48px",h:"48px",margin:"auto"}),u?(0,l.jsx)(D,{media:u,open:a,onRemoveImage:s,loading:c}):(0,l.jsx)(y.Z,{isDragActive:n,open:a,paragraphs:C})]})]}))})),E=(0,c.Pi)((function(e){var t=e.onUpload,r=e.onRemoveImage,s=e.media,c=(0,d.useState)(s),x=c[0],g=c[1],w=(0,d.useState)(!1),b=w[0],_=w[1],Z=(0,m.Z)(),j=(0,v.Z)({toastErrors:!0}),y=(0,d.useCallback)(function(){var e=(0,n.Z)(u().mark((function e(r){var n,s,l,c,d;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,a.Z)(r,1),s=n[0]){e.next=3;break}return e.abrupt("return");case 3:return l=(0,f.kb)(),e.prev=4,e.next=7,(0,h.Hk)(s,l);case 7:c=e.sent,g((0,o.Z)((0,i.Z)({},c),{sizes:{large:c,medium:c,small:c},name:""})),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(4);case 13:return _(!0),e.next=16,j(s,{grayscale:void 0});case 16:(d=e.sent)&&(t(d),g(null)),_(!1);case 19:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t){return e.apply(this,arguments)}}(),[t,j]),I=(0,p.uI)({onDrop:y,accept:h.KL.join(", "),noClick:!0,maxFiles:1,multiple:!1,maxSize:h.Tb}),P=I.getRootProps,C=I.getInputProps,k=I.open,D=I.isDragActive,E=I.fileRejections;return(0,d.useEffect)((function(){var e=E.map((function(e){return e.errors.map((function(e){return(0,h.hi)(e.code)}))}));(null===e||void 0===e?void 0:e.length)&&Z({status:"error",title:e.flat().join("\n")})}
1),[E]),(0,l.jsx)(S,{getRootProps:P,getInputProps:C,isDragActive:D,open:k,onRemoveImage:r,media:s||x,loading:b})}))},58575:function(e,t,r){"use strict";var n=r(2746),i=r(8014),o=r(34237),a=r(14131),s=r(14970),u=r(29675),l=r(8403),c={first_name:"First Name",last_name:"Last Name",country:"Country",about_user:"Bio",phone_number:"Phone Number",categories:"Categories"};t.Z=function(e){var t=e.loading,r=(0,s.u6)(),d=r.errors,p=r.dirty,f=(0,l.Z)();(0,u.Z)(p);return(0,i.jsx)(o.kC,{position:"sticky",bottom:"0",justify:"flex-start",p:{base:"20px 0",md:"20px 0"},bg:"support1.4",zIndex:9,children:(0,i.jsx)(a.Z,{isLoading:t,type:"submit",onClick:function(){if(Object.keys(d).length){var e=(0,n.Z)(Object.entries(d)[0],2),t=e[0],r=e[1];if(t.includes("social")&&d.social&&Object.keys(d.social).length){var i=(0,n.Z)(Object.entries(d.social)[0],2),o=i[0],a=i[1],s="".concat(o,": ").concat(a);f({status:"error",title:s})}else{var u="".concat(c[t]||t,": ").concat(r);f({status:"error",title:u})}}},children:"Update"})})}},38588:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return C}});var n=r(8014),i=r(40107),o=r(43692),a=r(5447),s=r(99728),u=r(44453),l=r.n(u),c=r(34237),d=r(98421),p=r(63024),f=r.n(p),m=r(33453),h=r(24113),v=r(47011),x=r(14970),g=r(85085),w=(r(56168),r(8403)),b=r(58575),_=r(94644),Z=r(31651),j=[{title:"Email",fields:[{label:"Email",name:"email",type:Z.Z.EMAIL}]},{title:"Password",fields:[{label:"Current Password",name:"current_password",type:Z.Z.PASSWORD},{label:"New Password",name:"new_password",type:Z.Z.PASSWORD},{label:"Confirm New Password",name:"confirm_new_password",type:Z.Z.PASSWORD}]}],y=(0,_.Ry)({email:(0,_.Z_)().email().required(),current_password:(0,_.Z_)().when("new_password",{is:function(e){return!!e},then:(0,_.Z_)().required("Please type your old password")}),new_password:(0,_.Z_)().min(6,"Must be 6 characters or more").max(32,"Must be 32 characters or less"),confirm_new_password:(0,_.Z_)().when("new_password",{is:function(e){return!!e},then:(0,_.Z_)().oneOf([(0,_.iH)("new_password")],"Passwords must match").required("Required")})}),I=(0,g.Pi)((function(){var e=(0,v.L)(),t=e.user,r=e.dispatch,i=(0,w.Z)({position:"top-right"}),u={email:(null===t||void 0===t?void 0:t.email)||"",current_password:"",new_password:"",confirm_new_password:""},p=function(){var e=(0,o.Z)(l().mark((function e(n,o){var u,c,p,m,h;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=n.email,c=n.current_password,p=n.new_password,m=o.setFieldValue,h=[],u!==(null===t||void 0===t?void 0:t.email)&&h.push(f().post("/api/change-email/",{email:u}).then((function(){i({status:"success",title:"Email address updated. Check your email for a confirmation email."});var e=(0,s.Z)((0,a.Z)({},t),{email:u});r({key:"user",value:e})})).catch((function(e){var r,n=(null===(r=e.response.data)||void 0===r?void 0:r.detail)||d.FI;m("email",(null===t||void 0===t?void 0:t.email)||""),i({status:"error",title:n})}))),p&&h.push(f().post("/api/change-password/",{current_password:c,password:p}).then((function(){["current_password","new_password","confirm_new_password"].forEach((function(e){return m(e,"")})),i({status:"success",title:"Password updated."})})).catch((function(e){var t,r=(null===(t=e.response.data)||void 0===t?void 0:t.detail)||d.FI;i({status:"error",title:r})}))),e.next=6,Promise.all(h);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();return(0,n.jsx)(x.J9,{initialValues:u,validationSchema:y,onSubmit:p,children:function(e){var t=e.isSubmitting;return(0,n.jsxs)(x.l0,{style:{width:"100%"},children:[j.map((function(e,t){return(0,n.jsxs)(c.kC,{flexDir:"column",mb:"60px",children:[(0,n.jsx)(c.xv,{variant:"numeralsS",mb:"20px",children:e.title}),e.fields.map((function(e,r){return(0,n.jsx)(c.xu,{mb:"10px",children:(0,n.jsx)(m.Z,{name:e.name,render:function(t){var r=t.field;return(0,n.jsx)(h.Z,(0,a.Z)({type:e.type,placeholder:e.label},r))}})},"field-".concat(t,"-").concat(r))}))]},"grIdx-".concat(t))})),(0,n.jsx)(b.Z,{loading:t})]})}})})),P=function(){return(0,n.jsx)(I,{})};P.getLayout=function(e){return(0,n.jsx)(i.Z,{children:e})};var C=P},59403:function(e,t,r){"use strict";r.d(t,{s:function(){return a}});var n=r(62139),i=r(84911),o=r(21350),a=new(function(){function e(){(0,n.Z)(this,e),this.init(),(0,o.rC)(this,{type:o.LO,user:o.LO,loading:o.LO,categories:o.LO,featured_portfolio:o.LO,last_award:o.LO,init:o.aD,addMediaItem:o.aD,removeMediaItem:o.aD,addPortfolioItem:o.aD,removePortfolioItem:o.aD,updatePortfolioItem:o.aD,getPortfolioItem:o.aD})}var t=e.prototype;return t.init=function(){this.user=null,this.type="profile",this.loading=!1,this.categories=[],this.featured_portfolio=[],this.portfolio_limit=9,this.last_award=null},t.addMediaItem=function(e){this.user&&(this.user.profile.profile_image=e)},t.removeMediaItem=function(){this.user&&(this.user.profile.profile_image=null)},t.addPortfolioItem=function(e){this.featured_portfolio=(0,i.Z)(this.featured_portfolio).concat([e])},t.updatePortfolioItem=function(e,t){this.featured_portfolio=this.featured_portfolio.map((function(r){return r.id===e?t:r}))},t.removePortfolioItem=function(e){this.featured_portfolio=this.featured_portfolio.filter((function(t){return t.id!==e}))},t.getPortfolioItem=function(e){return this.featured_portfolio.find((function(t){return t.id===e}))},e}())},29675:function(e,t,r){"use strict";var n=r(56168),i=r(75332);t.Z=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"You have unsaved changes \u2013 are you sure you wish to leave this page?",r=(0,i.useRouter)();(0,n.useEffect)((function(){var n=function(r){if(e)return r.preventDefault(),r.returnValue=t},i=function(){if(e&&!window.confirm(t))throw r.events.emit("routeChangeError",void 0,{shallow:!0}),"Route change was aborted (this error can be safely ignored). See https://github.com/zeit/next.js/issues/2476"};return window.addEventListener("beforeunload",n),r.events.on("routeChangeStart",i),function(){window.removeEventListener("beforeunload",n),r.events.off("routeChangeStart",i)}}),[e,r.events,t])}},84855:function(e,t,r){"use strict";var n=r(43692),i=r(44453),o=r.n(i),a=r(90319),s=r(8403);t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.toastErrors,r=void 0!==t&&t,i=(0,s.Z)();return function(){var e=(0,n.Z)(o().mark((function e(t,n){var s,u,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,a.Ix)(t,n,!0);case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),r&&(l=e.t0,i({title:"Upload Failed",description:(null===l||void 0===l||null===(s=l.response)||void 0===s||null===(u=s.data)||void 0===u?void 0:u.detail)||void 0,status:"error"})),e.abrupt("return",null);case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t,r){return e.apply(this,arguments)}}()}}},function(e){e.O(0,[2783,6531,5274,5193,9774,2888,179],(function(){return t=67540,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.