PageSourceSearch

https://www.codedex.io/_next/static/chunks/pages/admin/daily-challenges/[challengeId]/test-4fbfb76807f25531.js

js codedex.io collected 2026-09-25 14:55:23 UTC 6,814 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1666],{49063:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/daily-challenges/[challengeId]/test",function(){return n(87422)}])},91595:function(e,t,n){"use strict";n.d(t,{A:function(){return getMdxOptions}});var l=n(32075),a=n(64362),r=n(60877),s=n(60113),i=n(28727),u=n(67658),c=n(88298),o=n(93809),d=n(18002),h=n(52935),g=n(96276),p=n(42309),f=n(21623);function rehypeStringifyStyles(){return e=>{(0,f.Vn)(e,"element",e=>{var t;if((null===(t=e.properties)||void 0===t?void 0:t.style)&&"string"==typeof e.properties.style){let t={};e.properties.style.split(";").filter(e=>e.trim()).forEach(e=>{let n=e.indexOf(":");if(-1===n)return;let l=e.slice(0,n).trim(),a=e.slice(n+1).trim(),r=l.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());t[r]=a}),e.properties.style=t}})}}function getMdxOptions(){return{remarkPlugins:[r.Z,i.Z,o.Z,u.Z,c.Z],rehypePlugins:[[l.Z,{aliases:{markdown:["output","terminal"]}}],a.Z,[d.Z,{target:"_blank",rel:["nofollow","noreferrer","noopener"]}],[g.default,{rewrite(e){("h2"===e.tagName||"h3"===e.tagName||"h4"===e.tagName)&&e.children&&e.children[0]&&(e.children[0].value=" "+e.children[0].value)}}],[s.Z,{throwOnError:!0,strict:!0}],[h.Z,{behavior:"prepend",content(e){let{tagName:t}=e;return"h1"===t?(0,p.h)("span",""):"h2"===t?(0,p.h)("span","#"):"h3"===t?(0,p.h)("span","##"):"h4"===t?(0,p.h)("span","###"):"h5"===t?(0,p.h)("span",""):"h6"===t?(0,p.h)("span",""):void 0}}],rehypeStringifyStyles],format:"mdx"}}},4584:function(e,t,n){"use strict";n.d(t,{CD:function(){return getChallenge},G7:function(){return publishChallenge},ZS:function(){return generateChallenge},bs:function(){return updateChallenge},sR:function(){return testChallenge},uS:function(){return approveChallenge},xV:function(){return getScheduledChallenges}});var l=n(23914);let getFunctionsInstance=()=>(0,l.$C)();async function getScheduledChallenges(e){let t=getFunctionsInstance(),n=(0,l.V1)(t,"getScheduledChallenges"),a=await n(e);return a.data}async function getChallenge(e){let t=getFunctionsInstance(),n=(0,l.V1)(t,"getDailyChallengeWithId"),a=await n({challengeId:e});return a.data}async function generateChallenge(e){let t=getFunctionsInstance(),n=(0,l.V1)(t,"generateChallenge"),a=await n(e);return a.data}async function updateChallenge(e){let t=getFunctionsInstance(),n=(0,l.V1)(t,"updateChallenge"),a=await n(e);return a.data}async function approveChallenge(e){let t=getFunctionsInstance(),n=(0,l.V1)(t,"approveChallenge"),a=await n(e);return a.data}async function testChallenge(e){let t=getFunctionsInstance(),n=(0,l.V1)(t,"testChallenge"),a=await n(e);return a.data}async function publishChallenge(e){let t=getFunctionsInstance(),n=(0,l.V1)(t,"publishChallenge"),a=await n(e);return a.data}},87422:function(e,t,n){"use strict";n.r(t);var l=n(82729),a=n(85893),r=n(67294),s=n(11163),i=n(41664),u=n.n(i),c=n(19521),o=n(62770),d=n(99428),h=n(88832),g=n(73691),p=n(37601),f=n(34676),x=n(39456),m=n(91595),y=n(73845),C=n(40321),j=n(4584),v=n(73857);function _templateObject(){let e=(0,l._)(['\n  flex: 1;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  font-family: "Mulish", sans-serif;\n  font-size: 16px;\n  color: ',";\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,l._)(["\n  padding: 24px;\n  margin: 24px;\n  background: ",";\n  border: 2px solid ",';\n  border-radius: 4px;\n  font-family: "Mulish", sans-serif;\n  color: ',";\n"]);return _templateObject1=function(){return e},e}let w=c.default.div.withConfig({componentId:"sc-538858b5-0"})(_templateObject(),e=>{let{theme:t}=e;return t.colors.text.tertiary}),b=c.default.div.withConfig({componentId:"sc-538858b5-1"})(_templateObject1(),e=>{let{theme:t}=e;return t.colors.palette.red["100"]},e=>{let{theme:t}=e;return t.colors.palette.red["500"]},e=>{let{theme:t}=e;return t.colors.palette.red["700"]});t.default=function(){let e=(0,s.useRouter)(),t=(0,y.T)(),{challengeId:n}=e.query,[l,i]=(0,r.useState)(null),[c,_]=(0,r.useState)(!0),[S,Z]=(0,r.useState)(null),[I,F]=(0,r.useState)(null),[O,E]=(0,r.useState)(null),[k,D]=(0,r.useState)([]);if((0,r.useEffect)(()=>{(async function(){if(n&&"string"==typeof n){_(!0),Z(null);try{var e,l,a;let r=await (0,j.CD)(n);i(r);
1let s={id:r.id,dayId:r.scheduledDate,title:r.title,description:r.description,difficulty:r.difficulty,tags:r.tags,languages:r.languages,starterCode:r.starterCode,hints:r.hints,xpReward:r.xpReward,scheduledDate:r.scheduledDate,status:r.status,examples:r.examples,visibleTestCases:r.testCases.filter(e=>!e.isHidden).map(e=>{let{id:t,input:n,expectedOutput:l}=e;return{id:t,input:n,expectedOutput:l}})};t((0,C.ob)(s)),t((0,C.mW)(s.visibleTestCases));let u=(0,m.A)(),[c,o,...d]=await Promise.all([(0,x.q)(null!==(e=r.description)&&void 0!==e?e:"",{mdxOptions:u}),(0,x.q)(null!==(l=r.examples)&&void 0!==l?l:"",{mdxOptions:u}),...(null!==(a=r.hints)&&void 0!==a?a:[]).map(e=>(0,x.q)(null!=e?e:"",{mdxOptions:u}))]);F(c),E(o),D(d)}catch(e){console.error("Failed to fetch challenge:",e),Z("Failed to load challenge. Please try again.")}finally{_(!1)}}})()},[n,t]),c)return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.Z,{learningEnv:"course"}),(0,a.jsx)(h.fj,{children:(0,a.jsx)(w,{children:"Loading challenge..."})})]});if(S||!l)return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.Z,{learningEnv:"course"}),(0,a.jsxs)(h.fj,{children:[(0,a.jsx)(b,{children:S||"Challenge not found."}),(0,a.jsx)("div",{style:{padding:"0 24px"},children:(0,a.jsx)(u(),{href:"/admin/daily-challenges",children:(0,a.jsx)(v.Z,{variant:"subtle",children:"Back to list"})})})]})]});let N={id:l.id,dayId:l.scheduledDate,title:l.title,description:l.description,difficulty:l.difficulty,tags:l.tags,languages:l.languages,starterCode:l.starterCode,hints:l.hints,xpReward:l.xpReward,scheduledDate:l.scheduledDate,status:l.status,examples:l.examples,visibleTestCases:l.testCases.filter(e=>!e.isHidden).map(e=>{let{id:t,input:n,expectedOutput:l}=e;return{id:t,input:n,expectedOutput:l}})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.Z,{learningEnv:"courses",dailyChallengeTitle:l.title}),(0,a.jsxs)(h.fj,{children:[(0,a.jsx)(h.mp,{children:(0,a.jsxs)(o.Z,{sizes:[50,50],minSize:[550,600],expandToMin:!0,gutterSize:5,gutterAlign:"center",snapOffset:30,dragInterval:1,direction:"horizontal",cursor:"col-resize",className:"split-container",children:[I&&O?(0,a.jsx)(g.Z,{challenge:N,descriptionSource:I,examplesSource:O,hintsSources:k}):(0,a.jsx)("div",{}),(0,a.jsx)(p.Z,{challenge:N,testMode:!0})]})}),(0,a.jsx)(f.Z,{challenge:N})]})]})}}},function(e){e.O(0,[9774,1272,8700,1057,3777,9772,5880,1265,4153,1622,9280,286,6095,1226,5024,8727,2214,3764,4844,155,2075,9456,6204,4898,8521,9428,3355,945,4812,7434,1457,3689,6948,466,2888,179],function(){return e(e.s=49063)}),_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.