1"use strict";(self.webpackChunkStackby_webapp=self.webpackChunkStackby_webapp||[]).push([[3848],{63848:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var n=r(71083),o=r(379),s=r.n(o),a=r(71468),i=r(25052),c=r(99338),u=r(28930),l=r(92672),p=r(20054),d=r(70510),f=r(96763);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(t)?t:t+""}function b(e,t,r){return t=g(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(w=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var j=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=b(this,t,[e])).state={password:"",confirmpassword:"",error:!1,loading:!1,errorMessage:"",success:!1,redirct:!1},f.log("create pass"),r.resetPassword=r.resetPassword.bind(r),r.checkForToken=r.checkForToken.bind(r),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),r=t,o=[{key:"componentDidMount",value:function(){}},{key:"checkForToken",value:function(e){var t=this;n.A.get("/api/v1/resetpassword/"+this.props.match.params.token).then(function(e){t.setState({loading:!1})}).catch(function(e){setTimeout(function(){window.location.href="/404"}.bind(t),1e3)})}},{key:"resetPassword",value:function(e){var t=this;e.preventDefault();var r=this.state,o=r.password,s=r.confirmpassword;if(""==o)this.setState({error:!0,errorMessage:"Please Enter Password"});else if(""==s)this.setState({error:!0,errorMessage:"Please Enter Confirm Password"});else{this.setState({error:!1,loading:!0});var a="newpassword="+o;n.A.post("/api/v1/createPassword",a,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(e){t.setState({loading:!1}),e.data,t.setState({success:!0,error:!1,redirct:"/onboarding"})}).catch(function(e){t.setState({error:"true",errorMessage:e.response.data.error,loading:!1})})}}},{key:"render",value:function(){var e=this,t=this.state.redirct;return t?(0,d.jsx)(i.C5,{to:t}):(0,d.jsx)("div",{className:"login-wrapper",children:(0,d.jsxs)("div",{className:"container",children:[this.state.loading?(0,d.jsx)(c.A,{active:!0,inverted:!0,children:(0,d.jsx)(u.A,{size:"small",children:"Loading"})}):"",(0,d.jsxs)("div",{className:"frame",children:[(0,d.jsxs)("div",{className:"nav",children:[(0,d.jsx)("img",{src:p,onClick:function(){return e.props.history.push("/")},alt:"Stackby Logo",className:"img-responsive"}),(0,d.jsx)("h1",{children:" Create Password "})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"form-signin",action:"",method:"post",name:"form",children:[(0,d.jsx)("input",{className:"form-input fname",type:"password",name:"password",placeholder:"Password",onChange:function(t){return e.setState({password:t.target.value})},required:!0}),(0,d.jsx)("input",{className:"form-input",type:"password",name:"password",placeholder:"Confirm Password",onChange:function(t){return e.setState({confirmpassword:t.target.value})},required:!0}),this.state.error?(0,d.jsxs)("p",{className:"msg",style:{color:"red"},children:[" ",this.state.errorMessage," "]}):"",(0,d.jsx)("button",{className:"btn btn-signin",onClick:function(t){e.resetPassword(t)},children:"Change Password"}),this.state.error?(0,d.jsxs)("p",{className:"msg",style:{color:"green",marginTop:10},children:[" ","Password changed successfully, redirecting to login page..."," "]}):""]}),(0,d.jsxs)("div",{className:"forget",children:[(0,d.jsx)("span",{children:"Back to "}),(0,d.jsx)(i.N_,{to:"/login",children:"login"})]})]})]})]})})}}],o&&m(r.prototype,o),s&&m(r,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,s}(s().Component);const P=(0,a.Ng)()((0,l.A)(j))}}]);
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.