PageSourceSearch

https://socialuwu.netlify.app/static/js/480.38f37c01.chunk.js

js socialuwu.netlify.app collected 2026-10-03 11:25:35 UTC 8,884 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksocialuwu=self.webpackChunksocialuwu||[]).push([[480],{7376:function(e,n,t){t.d(n,{x4:function(){return u},z2:function(){return c},RB:function(){return l}});var r=t(5861),s=t(7757),a=t.n(s),i=t(4461),o=t(6960),u=function(e,n,t){return function(){var n=(0,r.Z)(a().mark((function n(r){var s,u;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.x4(e);case 2:s=n.sent,(u=s.data).error?(o.Am.error(u.error,{position:"top-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"}),t(!1)):(window.location.href="/",r({type:"LOGIN",data:u}),t(!1));case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()},c=function(e,n,t){return function(){var n=(0,r.Z)(a().mark((function n(r){var s,u;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.z2(e);case 2:s=n.sent,(u=s.data).error?(o.Am.error(u.error,{position:"top-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"}),t(!1)):(o.Am.success("User created now login :)",{position:"top-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"}),window.location.reload(),t(!1));case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()},l=function(e,n){return function(){var n=(0,r.Z)(a().mark((function n(t){var r,s;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.RB(e);case 2:r=n.sent,(s=r.data).error||0===Object.entries(s).length?(localStorage.removeItem("token"),window.location.href="/auth"):t({type:"GET_USER_BY_ID",data:s});case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}},4461:function(e,n,t){t.d(n,{x4:function(){return a},z2:function(){return i},RB:function(){return o},LL:function(){return u},eP:function(){return c},C3:function(){return l},s:function(){return p},Pj:function(){return d},V9:function(){return m},rX:function(){return f},K3:function(){return h},Gv:function(){return g},z4:function(){return v},aD:function(){return x}});var r=t(4569),s=t.n(r)().create({baseURL:"https://socialuwu.herokuapp.com/"}),a=function(e){return s.post("/api/users/login",e)},i=function(e){return s.post("/api/users/register",e)},o=function(e){return s.get("/api/users/getbyid/".concat(e))},u=function(e,n){return s.put("/api/users/update_profile",e,{headers:{token:n}})},c=function(e,n){return s.put("/api/users/follow/".concat(e),{},{headers:{token:n}})},l=function(){return s.get("/api/posts")},p=function(){return s.get("/api/posts/trending")},d=function(e){return s.get("/api/posts/userposts/".concat(e))},m=function(e,n){return s.delete("/api/posts/".concat(e),{headers:{token:n}})},f=function(e,n){return s.put("/api/posts/like/".concat(e),{},{headers:{token:n}})},h=function(e,n){return s.post("/api/posts",e,{headers:{token:n}})},g=function(e,n,t){return s.put("/api/posts/".concat(e),n,{headers:{token:t}})},v=function(e,n,t){return s.post("/api/posts/".concat(e,"/comment"),n,{headers:{token:t}})},x=function(e){return s.get("/api/posts/search/".concat(e))}},8480:function(e,n,t){t.r(n),t.d(n,{default:function(){return m}});var r=t(1413),s=t(885),a=t(2791),i=t(6030),o=t(3239),u=t(4696),c=t(7376),l=(t(5462),t(6960)),p=t(6871),d=t(184),m=function(){var e=(0,p.s0)(),n=(0,a.useState)({email:"",password:""}),t=(0,s.Z)(n,2),m=t[0],f=t[1],h=(0,a.useState)({username:"",email:"",password:"",confirmpassword:""}),g=(0,s.Z)(h,2),v=g[0],x=g[1],_=(0,a.useState)(!1),w=(0,s.Z)(_,2),j=w[0],b=w[1];(0,a.useEffect)((function(){document.title="SocialUwU - Login";var e=document.querySelector("#sign-in-btn"),n=document.querySelector("#sign-up-btn"),t=document.querySelector(".container");null===n||void 0===n||n.addEventListener("click",(function(){null===t||void 0===t||t.classList.add("sign-up-mode"),document.title="SocialUwU - Register"})),null===e||void 0===e||e.addEventListener("click",(function(){null===t||void 0===t||t.classList.remove("sign-up-mode"),document.title="SocialUwU - Login"}))}),[]);var N=(0,i.I0)();(0,a.useEffect)((function(){var e=[];try{e=JSON.parse(localStorage.getItem("token"))}catch(n){localStorage.removeItem("token"),window.location.href="/"}e&&(window.location.href="/")}),[e,N]);var k=new RegExp(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{8,}$/,"i").test(v.password);return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"container",children:[(0,d.jsx)("div",{className:"container__forms",children:(0,d.jsxs)("div",{className:"form",children:[(0,d.jsxs)("form",{action:"",className:"form__sign-in",onSubmit:function(n){n.preventDefault(),b(!0),N((0,c.x4)(m,e,b))},children:[(0,d.jsx)("h2",{className:"form__title",children:"Sign In"}),(0,d.jsxs)("div",{className:"form__input-field",children:[(0,d.jsx)("i",{className:"uil uil-envelope"}),(0,d.jsx)("input",{type:"email",placeholder:"Email",required:!0,onChange:function(e){return f((0,r.Z)((0,r.Z)({},m),{},{email:e.target.value}))}})]}),(0,d.jsxs)("div",{className:"form__input-field",children:[(0,d.jsx)("i",{className:"uil uil-lock"}),(0,d.jsx)("input",{type:"password",placeholder:"Password",required:!0,onChange:function(e){return f((0,r.Z)((0,r.Z)({},m),{},{password:e.target.value}))}})]}),m.email.includes("@")&&m.password.trim().length>=6?j?(0,d.jsx)(o.Z,{}):(0,d.jsx)("input",{className:"form__submit",type:"submit",value:"Login"}):(0,d.jsx)("input",{className:"form__submit_disabled",type:"submit",value:"Login",disabled:!0})]}),(0,d.jsxs)("form",{className:"form__sign-up",onSubmit:function(n){n.preventDefault(),b(!0),N((0,c.z2)(v,e,b))},children:[(0,d.jsx)("h2",{className:"form__title",children:"Sign Up"}),(0,d.jsxs)("div",{className:"form__input-field",children:[(0,d.jsx)("i",{className:"uil uil-user"}),(0,d.jsx)("input",{type:"text",placeholder:"Username",required:!0,onChange:function(e){return x((0,r.Z)((0,r.Z)({},v),{},{username:e.target.value}))}})]}),(0,d.jsxs)("div",{className:"form__input-field",children:[(0,d.jsx)("i",{className:"uil uil-envelope"}),(0,d.jsx)("input",{type:"email",placeholder:"Email",required:!0,onChange:function(e){return x((0,r.Z)((0,r.Z)({},v),{},{email:e.target.value}))}})]}),(0,d.jsxs)("div",{className:"form__input-field",children:[(0,d.jsx)("i",{className:"uil uil-lock"}),(0,d.jsx)("input",{type:"password",placeholder:"Password",required:!0,onChange:function(e){return x((0,r.Z)((0,r.Z)({},v),{},{password:e.target.value}))}})]}),(0,d.jsxs)("div",{className:"form__input-field",children:[(0,d.jsx)("i",{className:"uil uil-lock"}),(0,d.jsx)("input",{type:"password",placeholder:"Confirm Password",required:!0,onChange:function(e){return x((0,r.Z)((0,r.Z)({},v),{},{confirmpassword:e.target.value}))}})]}),(0,d.jsxs)("div",{children:[v.username.trim().length>=4&&v.username.trim().length<=20&&v.password.trim().length>=8&&v.password.trim().length<=20&&k&&v.password===v.confirmpassword&&v.email.includes("@")?j?(0,d.jsx)(o.Z,{}):(0,d.jsx)("input",{className:"form__submit",type:"submit",value:"Register"}):(0,d.jsx)("input",{className:"form__submit_disabled",type:"submit",value:"Register",disabled:!0}),j?"":(0,d.jsx)(u.Z,{title:"NOTE: username length must be between 4 to 20 characters,email should be valid and both password should match and must be between 8 to 20 charcters and password should be combination of one uppercase,one lower case,one special char and one digit UwU",arrow:!0,children:(0,d.jsx)("i",{className:"uil uil-info-circle",style:{cursor:"pointer",marginLeft:"2rem",fontSize:"1.3rem",color:"gray"}})})]})," "]})]})}),(0,d.jsxs)("div",{className:"container__panels",children:[(0,d.jsxs)("div",{className:"panel panel__left",children:[(0,d.jsxs)("div",{className:"panel__content",children:[(0,d.jsx)("h3",{className:"panel__title",children:"New here ?"}),(0,d.jsx)("p",{className:"panel__paragraph",children:"Are you new here go sign up else (\u3000-_\uff65) \ufe3b\u30c7\u2550\u4e00"}
1),(0,d.jsx)("button",{className:"btn btn-transparent",id:"sign-up-btn",children:"Register"})]}),(0,d.jsx)("img",{className:"panel__image",src:"https://stories.freepiklabs.com/storage/11588/market-launch-amico-2628.png",alt:""})]}),(0,d.jsxs)("div",{className:"panel panel__right",children:[(0,d.jsxs)("div",{className:"panel__content",children:[(0,d.jsx)("h3",{className:"panel__title",children:"One of us ?"}),(0,d.jsx)("p",{className:"panel__paragraph",children:"Are you one of us go sign in else (\u3000-_\uff65) \ufe3b\u30c7\u2550\u4e00"}),(0,d.jsx)("button",{className:"btn btn-transparent",id:"sign-in-btn",children:"Sign In"})]}),(0,d.jsx)("img",{className:"panel__image",src:"https://www.pngkey.com/png/full/444-4444270_ia-press-play-website.png",alt:""})]})]})]}),(0,d.jsx)(l.Ix,{})]})}}}]);
2//# sourceMappingURL=480.38f37c01.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.