PageSourceSearch

https://hype4.academy/_next/static/chunks/pages/auth/verify-email-7eadd3a16b3b1b80.js

js hype4.academy collected 2026-10-01 11:33:26 UTC 12,783 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7867],{76489:function(e,t){"use strict";t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var n={},r=e.split(";"),o=(t||{}).decode||i,a=0;a<r.length;a++){var s=r[a],c=s.indexOf("=");if(!(c<0)){var l=s.substring(0,c).trim();if(void 0==n[l]){var p=s.substring(c+1,s.length).trim();'"'===p[0]&&(p=p.slice(1,-1)),n[l]=function(e,t){try{return t(e)}catch(t){return e}}(p,o)}}}return n},t.serialize=function(e,t,i){var o=i||{},a=o.encode||n;if("function"!=typeof a)throw TypeError("option encode is invalid");if(!r.test(e))throw TypeError("argument name is invalid");var s=a(t);if(s&&!r.test(s))throw TypeError("argument val is invalid");var c=e+"="+s;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(l)}if(o.domain){if(!r.test(o.domain))throw TypeError("option domain is invalid");c+="; Domain="+o.domain}if(o.path){if(!r.test(o.path))throw TypeError("option path is invalid");c+="; Path="+o.path}if(o.expires){if("function"!=typeof o.expires.toUTCString)throw TypeError("option expires is invali
1d");c+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(c+="; HttpOnly"),o.secure&&(c+="; Secure"),o.sameSite)switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:case"strict":c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"none":c+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return c};var i=decodeURIComponent,n=encodeURIComponent,r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},47041:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCookies=t.hasCookie=t.removeCookies=t.deleteCookie=t.setCookies=t.setCookie=t.getCookie=t.getCookies=void 0;var o=i(76489),a=function(){return"undefined"!=typeof window},s=function(e){void 0===e&&(e="");try{var t=JSON.stringify(e);return/^[\{\[]/.test(t)?t:e}catch(t){return e}};t.getCookies=function(e){if(e&&(t=e.req),!a())return t&&t.cookies?t.cookies:t&&t.headers&&t.headers.cookie?(0,o.parse)(t.headers.cookie):{};for(var t,i={},n=document.cookie?document.cookie.split("; "):[],r=0,s=n.length;r<s;r++){var c=n[r].split("="),l=c.slice(1).join("=");i[c[0]]=l}return i},t.getCookie=function(e,i){var n,r=(0,t.getCookies)(i)[e];if(void 0!==r)return"true"===(n=r?r.replace(/(%[0-9A-Z]{2}
1)+/g,decodeURIComponent):r)||"false"!==n&&("undefined"!==n?"null"===n?null:n:void 0)},t.setCookie=function(e,t,i){if(i){var c,l,p,d=i.req,u=i.res,f=r(i,["req","res"]);l=d,p=u,c=f}var m=(0,o.serialize)(e,s(t),n({path:"/"},c));if(a())document.cookie=m;else if(p&&l){var h=p.getHeader("Set-Cookie");if(Array.isArray(h)||(h=h?[String(h)]:[]),p.setHeader("Set-Cookie",h.concat(m)),l&&l.cookies){var x=l.cookies;""===t?delete x[e]:x[e]=s(t)}if(l&&l.headers&&l.headers.cookie){var x=(0,o.parse)(l.headers.cookie);""===t?delete x[e]:x[e]=s(t),l.headers.cookie=Object.entries(x).reduce(function(e,t){return e.concat("".concat(t[0],"=").concat(t[1],";"))},"")}}},t.setCookies=function(e,i,n){return console.warn("[WARN]: setCookies was deprecated. It will be deleted in the new version. Use setCookie instead."),(0,t.setCookie)(e,i,n)},t.deleteCookie=function(e,i){return(0,t.setCookie)(e,"",n(n({},i),{maxAge:-1}))},t.removeCookies=function(e,i){return console.warn("[WARN]: removeCookies was deprecated. It will be deleted in the new version. Use deleteCookie instead."),(0,t.deleteCookie)(e,i)},t.hasCookie=function(e,i){return!!e&&(0,t.getCookies)(i).hasOwnProperty(e)},t.checkCookies=function(e,i){return console.warn("[WARN]: checkCookies was deprecated. It will be deleted in the new version. Use hasCookie instead."),(0,t.hasCookie)(e,i)}},86829:function(e,t,i){"use strict";i.d(t,{Z:function(){return a}}),i(67294);var n=i(18297),r=i.n(n),o=i(85893),a=e=>{let{children:t}=e;return(0,o.jsx)("div",{className:r().bgColor,children:t})}},31473:function(e,t,i){"use strict";var n=i(42758);t.Z=n.Z},37485:function(e,t,i){"use strict";var n=i(84775);t.Z=n.Z},84775:function(e,t,i){"use strict";i(67294);var n=i(9008),r=i.n(n),o=i(26533),a=i(85893);t.Z=e=>{let{title:t,url:i="",heroImage:n="https://hype4.academy/hero.jpg",description:s="Learn design and front-end coding with our articles, books, courses and videos.",children:c,ldJSON:l,keywords:p="Squareblack, SquarePlanet, Hype4, frontend academy, design academy, ux academy, javascript academy",noIndex:d=!1}=e,u=t?t+" | SquarePlanet":"SquarePlanet";return(0,a.jsxs)(r(),{children:[(0,a.jsx)("title",{children:(0,o.fm)(u)}),(0,a.jsx)("meta",{charSet:"UTF-8"}),(0,a.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=utf-8"}),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,a.jsx)("meta",{name:"description",content:s}),p&&(0,a.jsx)("meta",{name:"keywords",content:p}),d&&(0,a.jsx)("meta",{name:"robots",content:"noindex"}),(0,a.jsx)("meta",{property:"og:image",content:n}),(0,a.jsx)("meta",{property:"twitter:image",content:n}),(0,a.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,a.jsx)("meta",{name:"twitter:site",content:"@hype4academy"}),(0,a.jsx)("meta",{name:"twitter:creator",content:"hype4academy"}),(0,a.jsx)("meta",{name:"twitter:title",content:(0,o.fm)(u)}),(0,a.jsx)("meta",{name:"twitter:description",content:(0,o.fm)(s)}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{property:"og:site_name",content:"SquarePlanet"}),(0,a.jsx)("meta",{property:"og:url",content:"https://hype4.academy/".concat(i)}),(0,a.jsx)("meta",{property:"og:title",content:(0,o.fm)(u)}),(0,a.jsx)("meta",{property:"og:description",content:(0,o.fm)(s)}),(0,a.jsx)("meta",{property:"article:author",content:"https://twitter.com/hype4academy"}),(0,a.jsx)("meta",{property:"article:publisher",content:"https://twitter.com/hype4academy"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"57x57",href:"/favicon/apple-icon-57x57.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"60x60",href:"/favicon/apple-icon-60x60.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"72x72",href:"/favicon/apple-icon-72x72.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"76x76",href:"/favicon/apple-icon-76x76.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"114x114",href:"/favicon/apple-icon-114x114.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"120x120",href:"/favicon/apple-icon-120x120.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"144x144",href:"/favicon/apple-icon-144x144.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"152x152",href:"/favicon/apple-icon-152x152.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/favicon/apple-icon-180x180.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"192x192",href:"/favicon/android-icon-192x192.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon/favicon-32x32.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"96x96",href:"/favicon/favicon-96x96.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon/favicon-16x16.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon/favicon.ico"}),(0,a.jsx)("link",{rel:"manifest",href:"/favicon/manifest.json"}),(0,a.jsx)("meta",{name:"msapplication-TileColor",content:"#ffffff"}),(0,a.jsx)("meta",{name:"msapplication-TileImage",content:"/favicon/ms-icon-144x144.png"}),(0,a.jsx)("meta",{name:"theme-color",content:"#ffffff"}),l&&(0,a.jsxs)("script",{type:"application/ld+json",children:[" ","".concat(JSON.stringify(l))," "]}),(0,a.jsx)("script",{src:"https://analytics.ahrefs.com/analytics.js","data-key":"1Tq7QcEwJTWkK9xGI9UFoQ",defer:!0}),(0,a.jsx)("script",{async:!0,src:"https://www.googletagmanager.com/gtag/js?i
1d=AW-11179570373"}),(0,a.jsx)("script",{dangerouslySetInnerHTML:{__html:"\n            window.dataLayer = window.dataLayer || [];\n            function gtag(){dataLayer.push(arguments);}\n            gtag('js', new Date());\n            gtag('config', 'AW-11179570373');\n          "}}),(0,a.jsx)("link",{rel:"preconnect",href:"https://img2.storyblok.com/"}),(0,a.jsx)("link",{rel:"dns-prefetch",href:"https://img2.storyblok.com/"}),c]})}},62548:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSP:function(){return E},default:function(){return O}});var n,r=i(31473),o=i(37485),a=i(67294),s=i(11163),c=i(41879),l=i(63523),p=i(87536),d=i(95496),u=i(49067),f=i(85304),m=i(18297),h=i.n(m),x=i(86829),g=i(44185),v=i(70398),y=i(41880),j=i(60017),k=i(85893),w=((n=w||{}).NO_TOKEN="NO_TOKEN",n.FOUND_TOKEN="FOUND_TOKEN",n.VERIFIED_TOKEN="VERIFIED_TOKEN",n.EXP_TOKEN="EXP_TOKEN",n),N=()=>{var e;let t=(0,s.useRouter)(),{openDrawer:i}=(0,g.y)(),{0:n}=(0,a.useState)(null==t||null===(e=t.query)||void 0===e?void 0:e.token),{0:r,1:o}=(0,a.useState)(n?w.FOUND_TOKEN:w.NO_TOKEN),{0:m,1:N}=(0,a.useState)(!1),{handleSubmit:E,control:O,reset:C,formState:{errors:_}}=(0,p.cI)({defaultValues:{email:""},resolver:(0,d.X)(v.Z.verifyEmail)}),T=async e=>{let{email:t}=e;if(t)try{let e=await l.Wf.post(c.AX.customAuth.sendVerificationEmail,{email:t});if(200!==e.status)throw Error();N(!0)}catch(e){var i;return(0,u.Vw)((null==e||null===(i=e.response.data)||void 0===i?void 0:i.message)||e.message)}},b=async e=>{try{let t=await l.Wf.post(c.AX.customAuth.verifyEmail,{token:e});if(200!==t.status)throw Error();o(w.VERIFIED_TOKEN)}catch(e){o(w.EXP_TOKEN),(0,u.Vw)("Your verification link has expired!")}finally{C()}};return(0,a.useEffect)(()=>{history.replaceState&&history.replaceState(null,"",location.pathname),n?(o(w.FOUND_TOKEN),b(n)):(o(w.NO_TOKEN),(0,u.Vw)("Your verification link has expired!"))},[]),(0,k.jsx)(x.Z,{children:(0,k.jsx)(k.Fragment,{children:(0,k.jsxs)("div",{className:"".concat(h().card," ").concat(h().desktopCard),children:[(0,k.jsx)("h2",{className:h().title,children:"Email verification"}),r===w.FOUND_TOKEN&&(0,k.jsx)("p",{className:h().description,children:"Veryfing your email...."}),r===w.VERIFIED_TOKEN&&(0,k.jsxs)("div",{children:[(0,k.jsx)("p",{className:h().description,children:"Your account has been verified!"}),(0,k.jsx)("p",{className:h().description,children:"Now you can login!"}),(0,k.jsx)("br",{}),(0,k.jsx)("div",{className:h().submitBtn,onClick:()=>i("login"),children:"Log in"})]}),(r===w.EXP_TOKEN||r===w.NO_TOKEN)&&(0,k.jsx)("div",{children:m?(0,k.jsx)("div",{children:(0,k.jsx)("p",{className:h().description,children:"A new verification email sent!"})}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("p",{className:h().description,children:"Your token has expired!"}),(0,k.jsx)("p",{className:h().description,children:"Type your email again to verify account"}),(0,k.jsx)("br",{}),(0,k.jsxs)("form",{onSubmit:E(T),children:[(0,k.jsx)("div",{className:"inputWrap",children:(0,k.jsx)(p.Qr,{name:"email",control:O,rules:{required:!0},render:e=>{var t;let{field:i}=e;return(0,k.jsx)(f.Z,{name:i.name,label:"Email:",type:"email",placeholder:"Type your email...",initialValue:i.value,setValue:i.onChange,error:(null===(t=_[i.name])||void 0===t?void 0:t.message)||void 0,autoComplete:"email"})}})}),(0,k.jsxs)("button",{type:"submit",className:h().submitBtn,"data-test-id":"submit-btn",children:["Send verification email",(0,k.jsxs)("span",{className:h().arrow,children:[(0,k.jsx)("img",{src:y.Z.src,alt:"Arrow",role:"presentation",width:17,height:20,className:h().arrowWhite}),(0,k.jsx)("img",{src:j.Z.src,alt:"Arrow Green",role:"presentation",width:17,height:20,className:h().arrowGreen})]})]})]})]})}),r!==w.VERIFIED_TOKEN&&(0,k.jsx)("div",{className:h().registerContainer,children:(0,k.jsx)("p",{className:h().registerText,children:(0,k.jsx)("div",{className:h().link,onClick:()=>i("login"),children:"Switch to login"})})})]})})})},E=!0;function O(){return(0,k.jsxs)(r.Z,{transparentNav:"whiteNav",children:[(0,k.jsx)(o.Z,{title:"Verify your email"}),(0,k.jsx)("div",{className:"authContainer",children:(0,k.jsx)(N,{})})]})}},74964:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/verify-email",function(){return i(62548)}])},9008:function(e,t,i){e.exports=i(74394)}},function(e){e.O(0,[2758,2888,9774,179],function(){return e(e.s=74964)}),_N_E=e.O()}]);

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.