1/*! For license information please see 580.86071f6f.chunk.js.LICENSE.txt */ 2(self.webpackChunkniaclient=self.webpackChunkniaclient||[]).push([[580],{4082(e,n,t){"use strict";t.d(n,{A:()=>x});var a=t(65043),s=t(73773),o=t(50147),i=t(67470),l=t(64851),r=t(21215),c=t(98139),h=t.n(c),d=t(17392),p=t(19778),u=t(1528),m=t(98348),g=t(63102),b=t(74802),C=t(63037),A=t(70579);const M={success:p.A,warning:g.A,error:u.A,info:m.A},f=a.forwardRef(function(e,n){const{classes:t,className:a,message:o,onClose:i,variant:l}=e,r=M[l];return(0,A.jsx)(s.A,{ref:n,className:h()(t[l],a),"aria-describedby":"client-snackbar",message:(0,A.jsxs)("span",{id:"client-snackbar",className:t.message,children:[(0,A.jsx)(r,{className:h()(t.icon,t.iconVariant)}),o]}),action:[(0,A.jsx)(d.A,{"aria-label":"Close",color:"inherit",onClick:i,children:(0,A.jsx)(b.A,{className:t.icon})},"close")]})}),x=(0,C.Xy)(f,e=>({success:{backgroundColor:o.A[600]},error:{backgroundColor:l.A[600]},info:{backgroundColor:i.A[600]},warning:{backgroundColor:r.A[700]},icon:{fontSize:20},iconVariant:{opacity:.9,marginRight:e.spacing()},message:{display:"flex",alignItems:"center"}}))},10580(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>E});var a=t(65043),s=t(83003),o=t(63037),i=t(85865),l=t(55691),r=t(63336),c=t(81637),h=t(42518),d=t(50541),p=t(59982),u=t(30070),m=t(4082),g=t(70554),b=t(45818),C=t(91822),A=t(45315),M=t(80423),f=t(70579);function x(e,n,t){return"pre"===e?(0,f.jsx)(c.A,{color:"secondary",className:n.loadingSpinner}):"failure"===e?(0,f.jsxs)("div",{className:n.content,children:[(0,f.jsx)("img",{src:A.A,alt:"error",className:n.icon}),(0,f.jsx)(i.A,{className:n.message,variant:"h6",children:"Failed to activate account"}),(0,f.jsx)(h.A,{fullWidth:!0,onClick:t,variant:"contained",color:"secondary",children:"Resend Activation Email"})]}):"success"===e?(0,f.jsxs)("div",{className:n.content,children:[(0,f.jsx)("img",{src:C.A,alt:"error",className:n.icon}),(0,f.jsx)(i.A,{className:n.messageText,variant:"h6",children:"Your account has been activated."}),(0,f.jsx)(i.A,{className:n.messageText2,variant:"body1",children:"Congratulations on activating your account. Login to access all your NiaNow.com benefits!"}),(0,f.jsx)(h.A,{fullWidth:!0,href:"/login",variant:"contained",color:"secondary",children:"Login"})]}):(0,f.jsx)(i.A,{children:"Something went wrong"})}class j extends a.Component{constructor(e){super(e),this.state={status:"pre",snackbarOpen:!1,snackbarVariant:"",snackbarMessage:""},this.handleClose=this.handleClose.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){const{id:e,token:n}=this.props.match.params,{dispatch:t,logInStatus:a}=this.props;console.log("ID: ",e),console.log("TOKEN: ",n),(0,g.Nz)(e,n).then(e=>{console.log("activated account"),console.log(e.data),this.setState({status:"success"}),"success"===a&&t((0,b.A$)(!0))}).catch(e=>{console.log("failed to activate account"),console.log(e.response),this.setState({status:"failure",snackbarOpen:!0,snackbarMessage:"failed to activate account",snackbarVariant:"error"})})}onClick(){const{id:e}=this.props.match.params;(0,g.Xb)(e).then(e=>{console.log("send activation email"),console.log(e.data)}).catch(e=>{console.log("failed to send activation email"),console.log(e.response)})}handleClose(e,n){"clickaway"!==n&&this.setState({snackbarOpen:!1})}render(){const{classes:e}=this.props,{status:n,snackbarOpen:t,snackbarMessage:a,snackbarVariant:s}=this.state;return(0,f.jsxs)("div",{className:e.page,children:[(0,f.jsx)(d.A,{}),(0,f.jsxs)("main",{className:e.container,children:[(0,f.jsx)("div",{className:e.appBarSpacer}),(0,f.jsx)(i.A,{className:e.header,color:"textSecondary",variant:"h4",children:"Account Activation"}),(0,f.jsx)(r.A,{className:e.paper,elevation:1,children:x(n,e,this.onClick)}),(0,f.jsx)(l.A,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:t,autoHideDuration:5e3,onClose:this.handleClose,children:(0,f.jsx)(m.A,{onClose:this.handleClose,variant:s,message:a})}),(0,f.jsx)(u.A,{})]}),(0,f.jsx)(p.A,{})]})}}const E=(0,M.A)((0,o.Xy)((0,s.Ng)(function(e){const{status:n}=e.loginReducer;return{logInStatus:n}})(j),e=>({appBarSpacer:e.mixins.toolbar,page:{position:"relative",width:"100%",minHeight:"100vh"},header:{textAlign:"center",margin:e.spacing(5)},loadingSpinner:{margin:e.spacing(5)},paper:{marginTop:e.spacing(3),marginBottom:e.spacing(3),padding:e.spacing(2),[e.breakpoints.up(448)]:{marginTop:e.spacing(6),marginBottom:e.spacing(6),padding:e.spacing(3)}},container:{width:"auto",marginLeft:"auto",marginRight:"auto",marginBottom:e.spacing(10),[e.breakpoints.up(432)]:{width:400,marginLeft:"auto",marginRight:"auto"}},content:{textAlign:"center"}
2,icon:{height:40,width:40,marginBottom:e.spacing(2)},messageText:{marginBottom:e.spacing(3)},messageText2:{marginBottom:e.spacing(5)}})))},45818(e,n,t){"use strict";t.d(n,{A$:()=>c,Av:()=>r,Ry:()=>h,kX:()=>i});var a=t(26070),s=t(70554);function o(){return{type:a.A.LOGIN_REQUEST}}function i(e,n){return{type:a.A.LOGIN_SUCCESS,token:e,user:n}}function l(e){return{type:a.A.LOGIN_FAILURE,error:e}}function r(e,n){return function(t){t(o()),(0,s.Lx)(e,n).then(n=>{(0,s.Qc)(e).then(e=>{t(i(n.data.access_token,e.data))}).catch(e=>{t(l(e.response))})}).catch(e=>{t(l(e.response))})}}function c(e){return{type:a.A.EMAIL_VERIFIED,payload:e}}function h(e,n){return function(t){t(o()),(0,s.Qc)(e).then(e=>{t(i(n,e.data))}).catch(e=>{t(l(e.response))})}}},50541(e,n,t){"use strict";t.d(n,{A:()=>b});var a=t(65043),s=t(83003),o=t(63037),i=t(92314),l=t(55263),r=t(35475),c=t(31268),h=t(77086),d=t(52336),p=t(93635),u=t(70579);const m=()=>{document.getElementById("google_translate_element").hasChildNodes()||new google.translate.TranslateElement({pageLanguage:"en",layout:google.translate.TranslateElement.InlineLayout.SIMPLE,autoDisplay:!1,gaTrack:!0,gaId:"UA-70258310-7"},"google_translate_element")};class g extends a.Component{constructor(e){super(e),this.state={anchorEl0:null,anchorEl:null,anchorEl2:null,anchorEl3:null,anchorEl5:null,anchorEl6:null,mobileMoreAnchorEl:null},this.handleShopMenu=this.handleShopMenu.bind(this),this.handleUserMenu=this.handleUserMenu.bind(this),this.handleClassesMenu=this.handleClassesMenu.bind(this),this.handleTrainingsMenu=this.handleTrainingsMenu.bind(this),this.handleEventsMenu=this.handleEventsMenu.bind(this),this.handleShopClose=this.handleShopClose.bind(this),this.handleUserClose=this.handleUserClose.bind(this),this.handleClassesClose=this.handleClassesClose.bind(this),this.handleTrainingsClose=this.handleTrainingsClose.bind(this),this.handleEventsClose=this.handleEventsClose.bind(this),this.handleMobileMenuOpen=this.handleMobileMenuOpen.bind(this),this.handleMobileMenuClose=this.handleMobileMenuClose.bind(this),this.handleAboutMenu=this.handleAboutMenu.bind(this),this.handleAboutClose=this.handleAboutClose.bind(this)}componentDidMount(){const e=document.getElementById("google_translate_element"),n=document.getElementById("google_translate_placeholder");if(e&&n&&n.appendChild(e),window.googleTranslateElementInit=m,!document.getElementById("google_translate_script2")){const e=document.createElement("script");e.setAttribute("src","//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"),e.setAttribute("id","google_translate_script2"),document.body.appendChild(e)}}componentWillUnmount(){const e=document.getElementById("google_translate_element"),n=document.getElementById("google_translate_host");e&&n&&n.appendChild(e)}handleAboutMenu(e){this.setState({anchorEl0:e.currentTarget})}handleAboutClose(){this.setState({anchorEl0:null})}handleClassesMenu(e){this.setState({anchorEl:e.currentTarget})}handleClassesClose(){this.setState({anchorEl:null})}handleTrainingsMenu(e){this.setState({anchorEl2:e.currentTarget})}handleTrainingsClose(){this.setState({anchorEl2:null})}handleEventsMenu(e){this.setState({anchorEl3:e.currentTarget})}handleEventsClose(){this.setState({anchorEl3:null})}handleShopMenu(e){this.setState({anchorEl5:e.currentTarget})}handleShopClose(){this.setState({anchorEl5:null})}handleUserMenu(e){this.setState({anchorEl6:e.currentTarget})}handleUserClose(){this.setState({anchorEl6:null})}handleMobileMenuOpen(e){this.setState({mobileMoreAnchorEl:e.currentTarget})}handleMobileMenuClose(){this.setState({mobileMoreAnchorEl:null})}render(){const{classes:e,user:n,elevation:t}=this.props,{anchorEl0:s,anchorEl:o,anchorEl2:m,anchorEl3:g,anchorEl5:b,anchorEl6:C,mobileMoreAnchorEl:A}=this.state,M=Boolean(s),f=Boolean(o),x=Boolean(m),j=Boolean(g),E=Boolean(b),_=Boolean(C),v=Boolean(A);return(0,u.jsxs)(a.Fragment,{children:[(0,u.jsx)(i.A,{className:e.appBar,elevation:t,position:"fixed",children:(0,u.jsxs)(l.A,{children:[(0,u.jsx)("div",{className:e.flowGrow,children:(0,u.jsx)(r.N_,{to:"/",children:(0,u.jsx)("img",{src:c,alt:"Nia",className:e.logo})})}),(0,u.jsx)("div",{className:e.googleTranslateElement,id:"google_translate_placeholder"}),(0,u.jsx)(h.A,{classes:e,handleAboutMenu:this.handleAboutMenu,handleClassesMenu:this.handleClassesMenu,handleTrainingsMenu:this.handleTrainingsMenu,handleEventsMenu:this.handleEventsMenu,handleShopMenu:this.handleShopMenu,userMenuOpen:_,handleUserMenu:this.handleUserMenu,user:n}),(0,u.jsx)(d.A,{classes:e,handleMobileMenuOpen:this.handleMobileMenuOpen})]})}),(0,u.jsx)(p.A,{classes:e,user:n,anchorEl0:s,anchorEl6:C,anchorEl5:b,anchorEl3:g,anchorEl2:m,anchorEl:
2o,mobileMoreAnchorEl:A,aboutMenuOpen:M,handleAboutMenu:this.handleAboutMenu,handleAboutClose:this.handleAboutClose,shopMenuOpen:E,handleShopMenu:this.handleShopMenu,handleShopClose:this.handleShopClose,trainingsMenuOpen:x,handleTrainingsMenu:this.handleTrainingsMenu,handleTrainingsClose:this.handleTrainingsClose,eventsMenuOpen:j,handleEventsMenu:this.handleEventsMenu,handleEventsClose:this.handleEventsClose,classesMenuOpen:f,handleClassesMenu:this.handleClassesMenu,handleClassesClose:this.handleClassesClose,userMenuOpen:_,handleUserMenu:this.handleUserMenu,handleUserClose:this.handleUserClose,mobileMenuOpen:v,handleMobileMenuClose:this.handleMobileMenuClose})]})}}const b=(0,o.Xy)((0,s.Ng)(e=>{const{user:n}=e.loginReducer;return{user:n}})(g),e=>({appBar:{zIndex:e.zIndex.drawer+1},flowGrow:{flexGrow:1},logo:{marginLeft:10,height:40,marginTop:"4px"},sectionDesktop:{display:"none",[e.breakpoints.up("md")]:{display:"flex"}},googleTranslateElement:{[e.breakpoints.down("md")]:{visibility:"hidden"}},sectionMobile:{display:"flex",[e.breakpoints.up("md")]:{display:"none"}},externalLink:{textDecoration:"none","&:focus":{outline:"none"},color:e.palette.text.primary},navIcon:{marginLeft:4,height:24,width:24},navIconCustom:{height:28,width:28}}))},70554(e,n,t){"use strict";t.d(n,{$G:()=>x,DY:()=>h,FK:()=>C,J1:()=>g,JE:()=>r,Ln:()=>A,Lx:()=>d,Nz:()=>u,Qc:()=>c,U6:()=>M,Xb:()=>m,ec:()=>b,ht:()=>l,vu:()=>f,wz:()=>i,y4:()=>p});var a=t(40854),s=t.n(a),o=t(89013);function i(e){const n="api/user/"+e+"/";return s()({method:"get",url:n,baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},data:{client_id:o.U6,client_secret:o.p$}})}function l(e){return s()({method:"get",url:"/api/user/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},params:{email:e},data:{client_id:o.U6,client_secret:o.p$}})}function r(e){return s()({method:"get",url:"/api/user/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},params:{username:e},data:{client_id:o.U6,client_secret:o.p$}})}function c(e){return s()({method:"get",url:"/api/userlogin/"+e+"/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},data:{client_id:o.U6,client_secret:o.p$}})}function h(e){return s()({method:"post",url:"/api/user/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},data:{first_name:e.first_name,last_name:e.last_name,email:e.email,username:e.username,password:e.password,client_id:o.U6,client_secret:o.p$}})}function d(e,n){return s()({method:"post",url:"o/token/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},params:{grant_type:"password"},data:{username:e,password:n,client_id:o.U6,client_secret:o.p$}})}function p(e){return s()({method:"post",url:"o/revoke_token/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},params:{token:e},data:{client_id:o.U6,client_secret:o.p$}})}function u(e,n){return s()({method:"post",url:"api/activate/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},params:{id:e,token:n},data:{client_id:o.U6,client_secret:o.p$}})}function m(e){return s()({method:"post",url:"api/send_activation/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},params:{id:e},data:{client_id:o.U6,client_secret:o.p$}})}function g(e){return s()({method:"post",url:"api/password_reset/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},params:{email:e},data:{client_id:o.U6,client_secret:o.p$}})}function b(e,n,t){return s()({method:"post",url:"api/change_password/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},params:{id:e},data:{token:n,password:t,client_id:o.U6,client_secret:o.p$}})}function C(e,n,t,a){const i="/api/user/"+a+"/password/";return s()({method:"post",url:i,baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json",authorization:"bearer "+t},data:{old_password:e,password:n}})}function A(e,n,t,a,i,l){const r="/api/user/"+l+"/";return s()({method:"put",url:r,baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json",authorization:"bearer "+i},data:{username:n,email:e,first_name:t,last_name:a}})}function M(e){return s()({method:"get",url:"api/teacher_search/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},params:{query:e},data:{client_id:o.U6,client_secret:o.p$}})}function f(e){return s()({method:"get",url:"api/trainer_search/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},params:{query:e},data:{client_id:o.U6,client_secret:o.p$}})}function x(){return s()({method:"get",url:"api/trainer_list/",baseURL:o.Kx,timeout:"10000",headers:{Accept:"application/json","Content-Type":"application/json"},data:{client_id:o.U6,client_secret:o.p$}})}},80423(e,n,t){"use strict";t.d(n,{A:()=>i});var a=t(89379),s=(t(65043),t(73216)),o=t(70579);const i=function(e){return function(n){const t=(0,s.g)(),i=(0,s.zy)(),l=(0,s.Zp)(),r={params:t};return(0,o.jsx)(e,(0,a.A)((0,a.A)({},n),{},{params:t,location:i,navigate:l,match:r}))}}},98139(e,n){var t;!function(){"use strict";var a={}.hasOwnProperty;function s(){for(var e="",n=0;n<arguments.length;n++){var t=arguments[n];t&&(e=i(e,o(t)))}return e}function o(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var n="";for(var t in e)a.call(e,t)&&e[t]&&(n=i(n,t));return n}function i(e,n){return n?e?e+" "+n:e+n:e}e.exports?(s.default=s,e.exports=s):void 0===(t=function(){return s}.apply(n,[]))||(e.exports=t)}()}}]); 3//# sourceMappingURL=580.86071f6f.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.