PageSourceSearch

https://www.codedex.io/_next/static/chunks/pages/github-students/complete-07f8b583583d2f1d.js

js codedex.io collected 2026-09-25 14:56:34 UTC 9,266 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1699],{29449:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/github-students/complete",function(){return t(27372)}])},13973:function(e,n,t){"use strict";var i=t(82729),s=t(19521);function _templateObject(){let e=(0,i._)(['\n  width: 100vw;\n  height: 100vh;\n\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  /* margin-top: 2rem; */\n  background-size: cover;\n\n  main {\n    background-color: rgba(255, 255, 255, 0.95);\n    padding: 2rem;\n\n    img {\n      margin: 0 auto;\n      height: auto;\n      width: 240px;\n    }\n\n    h1 {\n      margin: 1rem 0;\n      font-size: 24px;\n      text-align: center;\n    }\n\n    div.description {\n      font-size: 18px;\n      font-weight: 500;\n      font-family: "Montserrat", sans-serif;\n      text-align: center;\n\n      p {\n        all: unset;\n      }\n    }\n\n    label {\n      margin-top: 1.5rem;\n      font-family: "Montserrat", sans-serif;\n      text-align: center;\n      font-size: 18px;\n      font-weight: bold;\n\n      textarea {\n        font-weight: 500;\n      }\n    }\n\n    div.cta-buttons {\n      margin-top: 3rem;\n      display: flex;\n      justify-content: center;\n      gap: 2rem;\n    }\n  }\n\n  '," {\n    padding-top: 5rem;\n\n    main {\n      margin-top: 10rem;\n      max-width: 90vw;\n    }\n\n    div.cta-buttons {\n      font-size: 8px;\n    }\n  }\n\n  "," {\n    padding-top: 0rem;\n\n    main {\n      margin-top: 5rem;\n\n      max-width: 85%;\n    }\n\n    div.cta-buttons {\n      font-size: 16px;\n    }\n  }\n  "," {\n    main {\n      max-width: 75%;\n    }\n  }\n  "," {\n    main {\n      margin-top: 5rem;\n      width: 50%;\n      max-width: 640px;\n    }\n  }\n"]);return _templateObject=function(){return e},e}let a=s.default.div.withConfig({componentId:"sc-d76b6354-0"})(_templateObject(),e=>{let{theme:n}=e;return n.breakpoints.xs},e=>{let{theme:n}=e;return n.breakpoints.sm},e=>{let{theme:n}=e;return n.breakpoints.md},e=>{let{theme:n}=e;return n.breakpoints.lg});n.Z=a},66647:function(e,n,t){"use strict";function selectUserDiscordData(e){try{if(e.user.isSignedIn){var n,t,i,s,a;if(void 0!==(null===(t=e.user)||void 0===t?void 0:null===(n=t.user)||void 0===n?void 0:n.integrations)&&void 0!==(null===(a=e.user)||void 0===a?void 0:null===(s=a.user)||void 0===s?void 0:null===(i=s.integrations)||void 0===i?void 0:i.discord))return e.user.user.integrations.discord}return null}catch(e){return null}}function selectUserBookmarks(e){try{let n=e.user.bookmarks;return{projects:(null==n?void 0:n.projects)||[],courses:(null==n?void 0:n.courses)||[],blogs:(null==n?void 0:n.blogs)||[],communityPosts:(null==n?void 0:n.communityPosts)||[]}}catch(e){return console.log(e),null}}t.d(n,{H:function(){return selectUserDiscordData},L:function(){return selectUserBookmarks}})},27372:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return complete}});var i=t(85893),s=t(9008),a=t.n(s),r=t(67294),c=t(41664),o=t.n(c),l=t(13973),githubStudentPack_StudentFailure=function(){let[e,n]=(0,r.useState)(!1),[t,s]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{n(!0)},[]),e)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a(),{children:(0,i.jsx)("title",{children:"Cod\xe9dex | Start your coding adventure ⋆˙⟡"})}),(0,i.jsx)(l.Z,{style:{backgroundImage:'url("/images/payments/payment_failure_background.png")'},children:(0,i.jsxs)("main",{className:"nes-container is-rounded",children:[(0,i.jsx)("img",{src:"/images/payments/payment_failed_card.gif",alt:"payment failed card"}),(0,i.jsx)("h1",{style:{color:"#EC6350"},children:"GitHub Student Status Invalid"}),(0,i.jsx)("br",{}),(0,i.jsxs)("div",{className:"description",children:[(0,i.jsxs)("p",{children:["Unfortunately we couldn’t confirm your GitHub Student Developer Pack status. Check your GitHub account by going to"," ",(0,i.jsx)(o(),{href:"https://education.github.com/pack",children:"https://education.github.com/pack"})," ","and make sure that you still have GitHub Student Developer Pack active."," "]}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsxs)("p",{children:["Contact"," ",(0,i.jsx)(o(),{href:"mailto:[email protected]",children:"[email protected]"}
1)," ","if the problem persists."]})]}),(0,i.jsx)("div",{className:"cta-buttons",children:(0,i.jsx)(o(),{href:"/",className:"nes-btn",children:"Back to Home"})})]})})]}):null},u=t(82729),d=t(19521),m=t(47010);function _templateObject(){let e=(0,u._)(["\n  display: flex;\n  width: 100%;\n  height: 100vh;\n  justify-content: center;\n  align-items: center;\n"]);return _templateObject=function(){return e},e}let f=d.default.div.withConfig({componentId:"sc-809b2e0d-0"})(_templateObject());var githubStudentPack_StudentStatusLoading=function(){return(0,i.jsx)(f,{children:(0,i.jsx)(m.Z,{color:"rgba(255, 255, 255)",className:"hidden animation",size:"2rem"})})},h=t(11163),p=t(9473),g=t(39828),b=t(62286),x=t.n(b),y=t(33599),v=t(92369),j=t(609),_=t(43910),k=t(66647),w=t(85673),StudentSuccess=function(){let[e,n]=(0,r.useState)(!1),[t,s]=(0,r.useState)(!1),c=(0,h.useRouter)(),u=(0,p.v9)(w.Cq),d=(0,p.v9)(j.f8),m=(0,p.v9)(j.IC),{auth:f}=(0,v.UM)(),b=(0,p.v9)(k.H);(0,r.useEffect)(function(){!async function(){let{codedextoken:e}=x().get();if(e){if(null!==f.currentUser){var n;await (0,_.wU)(f.currentUser,!0);let e=await (0,_.ag)(f.currentUser),t=null==e?void 0:null===(n=e.claims)||void 0===n?void 0:n.stripeRole;"club"===t?s(!0):c.push("/")}}else c.push("/")}()},[f.currentUser,c]);let S=(0,r.useCallback)(async()=>{let e=-1;for(;Math.abs(e)<u.length;){let n=u.at(e);try{if(["/signup","/login","/python/club","/payment_success","/pricing"].includes(n)||(null==n?void 0:n.includes("/payment_success")))e--;else{c.push(n);return}}catch(e){c.push("/")}}c.push("/")},[u,c]);return((0,r.useEffect)(()=>{setTimeout(()=>{var e;null===(e=document.querySelector(".survey"))||void 0===e||e.click()},2e3)},[]),(0,r.useEffect)(function(){t&&addWelcomeClubEmailNotification();async function addWelcomeClubEmailNotification(){let{firestore:e}=(0,v.UM)(),n=(0,g.JU)((0,g.hJ)(e,"users"),d),t=await (0,g.QT)(n),i=t.data(),s=new Date().toLocaleDateString("en-US");if("object"!=typeof i.notifications_tracker)await (0,g.pl)(n,{notifications_tracker:{send_welcome_club_email:[s]}},{merge:!0});else{if(i.notifications_tracker.send_welcome_club_email.includes(s))return;await (0,g.r7)(n,{"notifications_tracker.send_welcome_club_email":(0,g.vr)(s)})}Array.isArray(i.notifications)?await (0,g.r7)(n,{notifications:(0,g.vr)("send_welcome_club_email")}):await (0,g.pl)(n,{notifications:["send_welcome_club_email"]},{merge:!0}),await (0,g.r7)(n,{notifications:(0,g.Ab)("send_welcome_club_email")})}},[t,d]),(0,r.useCallback)(async function(){let{firestore:e}=(0,v.UM)();if(d){let n=(0,g.hJ)(e,"joinDiscordCollection");(0,g.ET)(n,{email:m.email,latestTimestamp:(0,g.Bt)()})}},[d,m.email]),(0,r.useEffect)(function(){n(!0)},[]),e)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a(),{children:(0,i.jsx)("title",{children:"Cod\xe9dex | Start your coding adventure ⋆˙⟡"})}),(0,i.jsx)(l.Z,{style:{backgroundImage:'url("/images/payments/payment_success_background.png")'},children:(0,i.jsxs)("main",{className:"nes-container is-rounded",children:[(0,i.jsx)("img",{src:"/images/payments/payment_success_card.gif",alt:"payment success card"}),(0,i.jsx)("h1",{style:{color:"#009259"},children:"Student Status Active!"}),(0,i.jsx)("br",{}),(0,i.jsxs)("div",{className:"description",children:[(0,i.jsxs)("p",{children:["Thank you so much for becoming a ",(0,i.jsx)(o(),{href:"/pricing",children:"Cod\xe9dex Club"})," ","member!"," "]}),(0,i.jsx)("p",{children:"Your account is being updated. You will now have access to all the courses and so much more! Check back in a day if you don't see the changes."})]}),(0,i.jsxs)("div",{className:"cta-buttons",children:[(0,i.jsx)("button",{className:"nes-btn",onClick:S,children:"Back"}),t?(0,i.jsxs)(i.Fragment,{children:[b&&(0,i.jsx)(o(),{href:"https://discord.gg/vSKEhP9fY2",className:"nes-btn is-primary",target:"_blank",onClick:async()=>{},children:"Join Discord"}),!b&&(0,i.jsx)(o(),{href:"/account?tabIndex=2",className:"nes-btn is-primary",target:"_blank",onClick:async()=>{},children:"Join Discord"})]}):(0,i.jsx)("button",{disabled:!t,className:"nes-btn is-disabled",children:"Join Discord"})]})]})}),(0,i.jsx)(y.Z,{fire:!0})]}):null},S=t(99428),complete=function(){let e=(0,h.useRouter)(),[n,t]=(0,r.useState)(!0),[s,a]=(0,r.useState)(!1),c=(0,p.v9)(j.IC),o=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{async function completeEnrollment(){let{code:n,state:i,error:s}=e.query;if(s){t(!1);return}if("string"==typeof n&&"string"==typeof i&&!o.current){o.current=!0;try{let e=await fetch("/api/github-student",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,state:i})}),t=await e.json();a("success"===t.status)}catch(e){a(!1)}finally{t(!1)}}}c&&e.isReady&&completeEnrollment()},[e.isReady,e.query,c]),(0,i.jsxs)("div",{children:[(0,i.jsx)(S.Z,{}),n?(0,i.jsx)(githubStudentPack_StudentStatusLoading,{}):s?(0,i.jsx)(StudentSuccess,{}):(0,i.jsx)(githubStudentPack_StudentFailure,{})]})}}},function(e){e.O(0,[1272,8700,4153,1622,9280,9428,9774,2888,179],function(){return e(e.s=29449)}),_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.