PageSourceSearch

https://letsdatascience.com/_next/static/chunks/31261-fd0514118f295128.js

js letsdatascience.com collected 2026-10-01 10:22:58 UTC 21,912 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[31261],{31261:(e,t,s)=>{s.r(t),s.d(t,{default:()=>C});var r=s(95155),a=s(70624),n=s(12115),l=s(28150),i=s(6613),c=s(5917),o=s(61362),d=s(78874),u=s(17666),x=s(57828),h=s(40704),m=s(75426),p=s(8161),b=s(7420),j=s(40079),g=s(94407),f=s(47769),N=s(76106),v=s(12551),w=s(57706),y=s(5950),k=s(7368);function C(e){let{challenges:t,completed:s,onComplete:n,index:o,setIndex:d,drafts:u,variant:x="workbench",isLoading:h=!1}=e,m=t.filter(e=>s.has(e.id)).length,p=Math.round(m/t.length*100),b=(0,r.jsxs)("details",{className:"rounded-xl border border-neutral-300 bg-white p-5",children:[(0,r.jsx)("summary",{className:"cursor-pointer font-semibold text-sm",children:"Bean & Brew table reference"}),(0,r.jsx)("div",{className:"mt-4 grid gap-4 sm:grid-cols-2",children:Object.entries(y.tables).map(e=>{let[t,s]=e;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("h3",{className:"font-mono text-sm font-semibold",children:[t," \xb7 ",s.rows.length," rows"]}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-6 text-neutral-600",children:s.columns.map(e=>"".concat(e.name," (").concat(e.type,")")).join(", ")})]},t)})})]}),j=(0,r.jsx)(A,{challenge:t[o],draft:u.current[t[o].id],onDraft:e=>{u.current[t[o].id]=e},onComplete:n,workbench:"workbench"===x,index:o,total:t.length,solved:s.has(t[o].id)},t[o].id),g=(0,r.jsxs)(a.A,{title:"Investigate Bean & Brew",children:[t.length," tasks on the same caf\xe9 records. Run the starter, inspect its result, then change the query. Each request names the output columns; any requested sort order is checked too."]});return h?(0,r.jsxs)("div",{className:"mx-auto max-w-4xl min-w-0 space-y-6",children:[g,(0,r.jsx)("p",{role:"status",children:"Loading your practice progress…"})]}):"workbench"===x?(0,r.jsxs)("div",{className:"mx-auto max-w-4xl min-w-0 space-y-6","data-testid":"fundamentals-practice",children:[g,b,(0,r.jsx)("div",{"data-lds-practice-runner":"true",className:"lds-practice-runner",children:(0,r.jsxs)("section",{className:"lds-practice-workbench","aria-label":"Coding practice workbench",children:[(0,r.jsxs)("header",{className:"lds-practice-toolbar",children:[(0,r.jsxs)("div",{className:"lds-practice-progress",children:[(0,r.jsxs)("div",{className:"lds-practice-progress-copy",children:[(0,r.jsx)("span",{className:"lds-practice-progress-icon","aria-hidden":"true",children:(0,r.jsx)(l.A,{size:16})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"lds-practice-progress-label",children:"Practice progress"}),(0,r.jsxs)("strong",{children:[m," of ",t.length," solved"]})]}),100===p&&(0,r.jsxs)("span",{className:"lds-practice-complete-label",children:[(0,r.jsx)(i.A,{size:13,"aria-hidden":"true"})," Complete"]})]}),(0,r.jsx)("div",{className:"lds-practice-progress-track",role:"progressbar","aria-label":"Practice completion","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":p,children:(0,r.jsx)("span",{style:{width:"".concat(p,"%")}})})]}),(0,r.jsx)("nav",{className:"lds-practice-question-nav",style:{justifyContent:"flex-start"},"aria-label":"Practice tasks",children:t.map((e,t)=>(0,r.jsx)("button",{type:"button",title:e.title,className:"lds-practice-question-button ".concat(t===o?"is-current":s.has(e.id)?"is-complete":""),style:{minWidth:44,minHeight:44},"aria-current":t===o?"step":void 0,"aria-label":"Task ".concat(t+1,": ").concat(e.title).concat(s.has(e.id)?", solved":""),onClick:()=>d(t),children:s.has(e.id)&&t!==o?(0,r.jsx)(c.A,{size:14,"aria-hidden":"true"}):t+1},e.id))})]}),j]})})]}):(0,r.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6","data-testid":"fundamentals-practice",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,r.jsx)("h2",{className:"text-2xl font-semibold",children:"Work with the caf\xe9 records"}),(0,r.jsxs)("p",{className:"text-sm text-neutral-600",children:[t.filter(e=>s.has(e.id)).length," of ",t.length," solved"]})]}),(0,r.jsx)("p",{className:"text-base leading-7 text-neutral-700",children:"Run the starter, inspect its result, then change the query. Each request names the output columns. When it asks for a sort order, that order is checked too."}),(0,r.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Practice tasks",children:t.map((e,t)=>(0,r.jsxs)("button",{className:"min-h-11 min-w-11 rounded-lg border px-3 text-sm ".concat(t===o?"border-neutral-900 bg-neutral-900 text-white":"border-neutral-300 bg-white text-neutral-700"),"aria-current":t===o?"step":void 0,"aria-label":"Task ".concat(t+1,": ").concat(e.title).concat(s.has(e.id)?", solved":""),onClick:()=>d(t),children:[t+1,s.has(e.id)?" ✓":""]},e.id))}),j,b]})}function A(e){let{challenge:t,draft:s,onDraft:a,onComplete:i,workbench:y,index:C,total:A,solved:R}=e,z=(0,p.w)(),{isReady:S,executeQuery:E}
1=z,[L,q]=(0,n.useState)(null!=s?s:(0,w.F)(t.initialQuery)),[M,F]=(0,n.useState)(null),[H,T]=(0,n.useState)(""),[I,P]=(0,n.useState)(null),[B,O]=(0,n.useState)(!1),[Q,W]=(0,n.useState)(0),[_,D]=(0,n.useState)(!1),[U,K]=(0,n.useState)(0),[$,G]=(0,n.useState)(""),J=(0,n.useRef)(new k.j$),X=(0,n.useRef)(!0),Y=(0,n.useRef)(!1),V=(0,n.useId)(),{publishActivity:Z,clearActivity:ee}=(0,b.X)();(0,n.useEffect)(()=>{X.current=!0;let e=J.current;return()=>{X.current=!1,e.invalidate()}},[]);let et=e=>{J.current.invalidate(),q(e),a(e),P(null),T(""),F(null)},es=(0,n.useCallback)(async()=>{if(!S||Y.current)return;let e=J.current.next();Y.current=!0,O(!0),T(""),P(null),K(e=>e+1);let s=()=>X.current&&J.current.current(e);try{let e=(0,k.DM)(L);if(e){F({columns:[],rows:[],rowCount:0,error:e,executionTime:0}),T(e);return}let r=await E(L);if(!s())return;if(F(r),r.error)return void T(r.error);let a=await E(t.solution);if(!s())return;let n=(0,k.$j)(r,a,/\bORDER\s+BY\b/i.test(t.solution));if(P(n.correct),T(n.message),n.correct){let e=await i(t.id);s()&&!e&&T("".concat(n.message," Progress could not be saved. Run again to retry."))}}catch(e){s()&&T(e instanceof Error?e.message:"The query could not run. Please try again.")}finally{Y.current=!1,X.current&&O(!1)}},[S,E,L,t,i]);return((0,n.useEffect)(()=>{Z(V,{kind:"coding-practice",itemId:t.id,language:"sql",title:t.title,prompt:t.description,concepts:t.concepts,code:L.slice(0,12e3),attemptCount:U,runState:B?"running":(null==M?void 0:M.error)?"error":!0===I?"correct":!1===I?"incorrect":M?"ran":"not-run",...M?{output:JSON.stringify(M).slice(0,4e3)}:{},hintsAvailable:t.hints.length,revealedHints:t.hints.slice(0,Q),solutionRevealed:_})},[V,Z,t,L,U,B,M,I,Q,_]),(0,n.useEffect)(()=>()=>ee(V),[ee,V]),y)?(0,r.jsxs)("section",{"aria-label":t.title,children:[(0,r.jsxs)("div",{className:"lds-practice-brief",children:[(0,r.jsxs)("div",{className:"lds-practice-brief-meta",children:[(0,r.jsxs)("span",{children:["Challenge ",C+1," of ",A]}),(0,r.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,r.jsx)("span",{className:"capitalize",children:t.difficulty}),(0,r.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,r.jsx)("span",{children:t.category}),R&&(0,r.jsxs)("span",{className:"lds-practice-completed-status",children:[(0,r.jsx)(o.A,{size:13,"aria-hidden":"true"})," Completed"]})]}),(0,r.jsx)("h2",{children:t.title}),(0,r.jsx)("p",{children:t.description}),(0,r.jsxs)("div",{className:"lds-practice-concepts",children:[(0,r.jsx)("span",{children:"Focus"}),(0,r.jsx)("span",{children:t.concepts.join(" \xb7 ")})]})]}),(0,r.jsxs)("div",{className:"lds-practice-runtime",children:[(0,r.jsxs)("div",{className:"lds-practice-editor-label",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)(l.A,{size:14,"aria-hidden":"true"})," SQL workspace"]}),(0,r.jsx)("span",{children:"Run with Command/Ctrl + Enter"})]}),(0,r.jsx)(j.A,{language:"sql",value:L,onChange:et,onRunShortcut:es,minHeight:320,flush:!0}),(0,r.jsx)(g.A,{variant:"workbench",isReady:z.isReady,isRunning:B,onRun:es,onReset:()=>{et((0,w.F)(t.initialQuery)),W(0),D(!1),G("")},onHint:()=>W(e=>Math.min(t.hints.length,e+1)),onSolution:()=>D(e=>!e)}),z.error&&!z.isReady&&(0,r.jsx)("p",{role:"alert",className:"lds-practice-runtime-error",children:z.error}),!M||M.error?(0,r.jsx)(f.A,{variant:"workbench",result:M?{output:"",error:M.error,durationMs:M.executionTime}:null}):(0,r.jsxs)("div",{className:"lds-practice-output",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-neutral-800 px-4 py-2",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5 font-mono text-xs text-emerald-400",children:[(0,r.jsx)(o.A,{size:12,"aria-hidden":"true"}),M.rowCount," rows returned"]}),(0,r.jsxs)("span",{className:"text-[10px] text-neutral-400",children:[M.executionTime.toFixed(0)," ms"]})]}),(0,r.jsxs)("div",{className:"max-h-[420px] overflow-auto",role:"region","aria-label":"Code output table",tabIndex:0,children:[(0,r.jsxs)("table",{className:"w-full text-left font-mono text-xs",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-neutral-950",children:(0,r.jsx)("tr",{children:M.columns.map((e,t)=>(0,r.jsx)("th",{scope:"col",className:"whitespace-nowrap border-b border-neutral-800 px-3 py-2 font-semibold text-neutral-300",children:e},t))})}),(0,r.jsx)("tbody",{children:M.rows.map((e,t)=>(0,r.jsx)("tr",{className:"border-b border-neutral-800/60 hover:bg-neutral-800/40",children:e.map((e,t)=>(0,r.jsx)("td",{className:"whitespace-nowrap px-3 py-1.5 text-neutral-200",children:null===e?(0,r.jsx)("span",{className:"italic text-neutral-400",children:"NULL"}):String(e)},t))},t))})]}),0===M.rows.length&&(0,r.jsx)("p",{className:"p-4 text-sm text-neutral-300",children:"No rows returned."})]})]}),H&&(0,r.jsxs)("div",{role:"status",className:"lds-practice-verdict ".concat(!0===I?"is-correct":"is-incorrect"),children:[!0===I?(0,r.jsx)(o.A,{size:16,className:"shrink-0","aria-hidden":"true"}):(0,r.jsx)(d.A,{size:16,className:"shrink-0","aria-hidden":"true"}),(0,r.jsx)("span",{children:H})]})]}),(Q>0||_)&&(0,r.jsxs)("div",{className:"lds-practice-assist",children:[Q>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)(N.A,{hints:t.hints.slice(0,Q).map(e=>({body:e}))}),Q<t.hints.length&&(0,r.jsxs)("button",{type:"button",className:"lds-practice-next-hint",onClick:()=>W(e=>e+1),children:[(0,r.jsx)(u.A,{size:13,"aria-hidden":"true"})," Reveal hint ",Q+1," of"," ",t.hints.length]})]}),_&&(0,r.jsxs)("div",{className:"lds-practice-solution",children:[(0,r.jsxs)("div",{className:"lds-practice-solution-toolbar",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)(x.A,{size:14,"aria-hidden":"true"})," Reference solution"]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>et((0,w.F)(t.solution)),children:[(0,r.jsx)(h.A,{size:14,"aria-hidden":"true"})," Load into editor"]}),(0,r.jsxs)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText((0,w.F)(t.solution)),G("Copied")}catch(e){G("Copy unavailable. Select the code to copy it.")}},children:["Copied"===$?(0,r.jsx)(c.A,{size:14,"aria-hidden":"true"}):(0,r.jsx)(m.A,{size:14,"aria-hidden":"true"}),"Copied"===$?"Copied":"Copy"]})]})]}),(0,r.jsx)(v.A,{code:t.solution,language:"sql"}),$&&(0,r.jsx)("p",{role:"status",className:"mt-2 text-xs text-neutral-600",children:$}),(0,r.jsx)("p",{className:"mt-3 text-sm leading-6 text-neutral-600",children:"Explain what each clause does, then try the request again with the answer closed."})]})]})]}):(0,r.jsxs)("section",{className:"space-y-4","aria-label":t.title,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-semibold text-neutral-900",children:t.title}),(0,r.jsx)("p",{className:"mt-3 text-base leading-7 text-neutral-700",children:t.description})]}),(0,r.jsxs)("div",{className:"overflow-hidden rounded-xl border border-neutral-800 bg-neutral-900",children:[(0,r.jsx)(j.A,{language:"sql",value:L,onChange:et,onRunShortcut:es,minHeight:210}),(0,r.jsx)(g.A,{isReady:z.isReady,isRunning:B,onRun:es,onReset:()=>{et((0,w.F)(t.initialQuery)),W(0),D(!1)},onHint:()=>W(e=>Math.min(t.hints.length,e+1)),onSolution:()=>D(e=>!e)})]}),z.error&&!z.isReady&&(0,r.jsx)("p",{role:"alert",className:"text-red-800",children:z.error}),!M||M.error?(0,r.jsx)(f.A,{result:M?{output:"",error:M.error,durationMs:M.executionTime}:null}):(0,r.jsxs)("div",{className:"overflow-hidden rounded-xl border border-neutral-300 bg-white",children:[(0,r.jsxs)("p",{className:"border-b border-neutral-200 bg-neutral-50 px-4 py-2 text-xs text-neutral-600",children:[M.rowCount," rows returned \xb7 ",M.executionTime.toFixed(0)," ms"]}),(0,r.jsxs)("div",{className:"max-h-[360px] overflow-auto",role:"region","aria-label":"Code output table",tabIndex:0,children:[(0,r.jsxs)("table",{className:"w-full border-collapse text-left text-sm",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-neutral-100",children:(0,r.jsx)("tr",{children:M.columns.map((e,t)=>(0,r.jsx)("th",{scope:"col",className:"border-b border-neutral-200 px-3 py-2 font-mono text-xs",children:e},t))})}),(0,r.jsx)("tbody",{children:M.rows.map((e,t)=>(0,r.jsx)("tr",{children:e.map((e,t)=>(0,r.jsx)("td",{className:"whitespace-nowrap border-b border-neutral-100 px-3 py-2",children:null===e?(0,r.jsx)("span",{className:"font-mono text-xs text-neutral-600",children:"NULL"}):String(e)},t))},t))})]}),0===M.rows.length&&(0,r.jsx)("p",{className:"p-4 text-sm text-neutral-600",children:"No rows returned."})]})]}),H&&(0,r.jsx)("p",{role:"status",className:"rounded-lg border p-4 text-sm leading-6 ".concat(!0===I?"border-emerald-300 bg-emerald-50 text-emerald-950":"border-amber-300 bg-amber-50 text-amber-950"),children:H}),Q>0&&(0,r.jsx)("ol",{className:"list-inside list-decimal space-y-2 rounded-lg border border-neutral-200 bg-white p-4 text-sm leading-6",children:t.hints.slice(0,Q).map(e=>(0,r.jsx)("li",{children:e},e))}),_&&(0,r.jsxs)("div",{className:"rounded-xl border border-neutral-300 bg-white p-5",children:[(0,r.jsx)("h4",{className:"mb-3 font-semibold text-sm",children:"One working answer"}),(0,r.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap text-sm leading-6",children:(0,r.jsx)("code",{children:t.solution})}),(0,r.jsx)("p",{className:"mt-3 text-sm text-neutral-600",children:"Explain what each clause does, then try the request again with the answer closed."})]})]})}},40079:(e,t,s)=>{s.d(t,{A:()=>c});var r=s(95155),a=s(12115),n=s(67909),l=s(35299);let i=(0,n.default)(()=>s.e(85778).then(s.bind(s,85778)).then(e=>e.default),{loadableGenerated:{webpack:()=>[85778]},ssr:!1,loading:()=>(0,r.jsx)("div",{className:"bg-neutral-900 rounded-lg flex items-center justify-center",style:{minHeight:240},children:(0,r.jsxs)("div",{className:"flex items-center gap-2 text-neutral-400 text-sm",children:[(0,r.jsx)(l.A,{size:16,className:"animate-spin"}),"Loading editor…"]})})});function c(e){let{language:t,value:s,onChange:n,onRunShortcut:l,minHeight:c=240,readOnly:o=!1,theme:d="vs-dark",flush:u=!1}=e,x=a.useRef(l);a.useLayoutEffect(()=>{x.current=l},[l]);let h=a.useCallback((e,t)=>{e.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.Enter,()=>{var e;return null==(e=x.current)?void 0:e.call(x)})},[]);return(0,r.jsx)("div",{className:"bg-neutral-900 overflow-hidden ".concat(u?"":"rounded-lg"),style:{minHeight:c},children:(0,r.jsx)(i,{language:t,value:s,theme:d,onChange:e=>n(null!=e?e:""),onMount:h,height:Math.max(c,240),options:{minimap:{enabled:!1},fontSize:14,lineNumbers:"on",scrollBeyondLastLine:!1,padding:{top:14,bottom:14},wordWrap:"on",tabSize:4,insertSpaces:!0,renderLineHighlight:"all",smoothScrolling:!0,readOnly:o,automaticLayout:!0,glyphMargin:!1,folding:!0,guides:{indentation:!0,highlightActiveIndentation:!0},accessibilitySupport:"auto"}})})}},47769:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(95155);s(12115);var a=s(50803),n=s(61362),l=s(6132);function i(e){let{result:t,variant:s="default"}=e,i="workbench"===s;return t?t.rows&&t.columns&&!t.error?(0,r.jsxs)("div",{className:i?"lds-practice-output":"bg-neutral-900 border border-neutral-800 rounded-lg overflow-hidden",children:[(0,r.jsxs)("div",{className:"px-4 py-2 border-b border-neutral-800 flex items-center justify-between",children:[(0,r.jsxs)("span",{className:"text-xs font-mono text-emerald-400 flex items-center gap-1.5",children:[(0,r.jsx)(n.A,{size:12})," ",t.output]}),(0,r.jsxs)("span",{className:"text-[10px] text-neutral-500",children:[t.durationMs.toFixed(0)," ms"]})]}),(0,r.jsx)("div",{className:"overflow-x-auto max-h-[420px] overflow-y-auto",role:"region","aria-label":"Code output table",tabIndex:0,children:(0,r.jsxs)("table",{className:"w-full text-xs font-mono",children:[(0,r.jsx)("thead",{className:"bg-neutral-950/80 sticky top-0",children:(0,r.jsx)("tr",{children:t.columns.map(e=>(0,r.jsx)("th",{className:"text-left px-3 py-2 font-semibold text-neutral-300 border-b border-neutral-800 whitespace-nowrap",children:e},e))})}),(0,r.jsx)("tbody",{children:t.rows.map((e,s)=>(0,r.jsx)("tr",{className:"border-b border-neutral-900/60 hover:bg-neutral-800/40",children:t.columns.map(t=>(0,r.jsx)("td",{className:"px-3 py-1.5 text-neutral-200 whitespace-nowrap",children:null===e[t]||void 0===e[t]?(0,r.jsx)("span",{className:"text-neutral-600 italic",children:"NULL"}):String(e[t])},t))},s))})]})})]}):t.error?(0,r.jsxs)("div",{className:i?"lds-practice-output lds-practice-output-error":"bg-rose-950/30 border border-rose-900/60 rounded-lg overflow-hidden",children:[(0,r.jsxs)("div",{className:"px-4 py-2 border-b border-rose-900/40 flex items-center justify-between",children:[(0,r.jsxs)("span",{className:"text-xs font-mono text-rose-300 flex items-center gap-1.5",children:[(0,r.jsx)(l.A,{size:12})," Error"]}),(0,r.jsxs)("span",{className:"text-[10px] text-rose-500/80",children:[t.durationMs.toFixed(0)," ms"]})]}),(0,r.jsx)("pre",{className:"px-4 py-3 text-xs font-mono text-rose-200 whitespace-pre-wrap leading-relaxed overflow-x-auto",children:t.error})]}):(0,r.jsxs)("div",{className:i?"lds-practice-output":"bg-neutral-900 border border-neutral-800 rounded-lg overflow-hidden",children:[(0,r.jsxs)("div",{className:"px-4 py-2 border-b border-neutral-800 flex items-center justify-between",children:[(0,r.jsxs)("span",{className:"text-xs font-mono text-emerald-400 flex items-center gap-1.5",children:[(0,r.jsx)(n.A,{size:12})," Run completed"]}),(0,r.jsxs)("span",{className:"text-[10px] text-neutral-500",children:[t.durationMs.toFixed(0)," ms"]})]}),(0,r.jsx)("pre",{className:"px-4 py-3 text-xs font-mono text-neutral-200 whitespace-pre-wrap leading-relaxed overflow-x-auto max-h-[420px]",children:t.output||(0,r.jsx)("span",{className:"text-neutral-500 italic",children:"(no stdout, your co
1de ran but printed nothing)"})})]}):(0,r.jsxs)("div",{className:i?"lds-practice-output lds-practice-output-empty":"bg-neutral-900 border border-neutral-800 rounded-lg p-8 text-center text-sm text-neutral-500",children:[(0,r.jsx)(a.A,{size:i?16:20,className:i?"text-neutral-500":"mx-auto mb-2 text-neutral-600"}),"Press ",(0,r.jsx)("kbd",{className:"px-1.5 py-0.5 bg-neutral-800 text-neutral-300 rounded text-xs font-mono",children:"Run"})," to execute your code."]})}},70624:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(95155);function a(e){let{title:t,children:s}=e;return(0,r.jsxs)("header",{"data-course-practice-intro":!0,className:"mb-6",children:[(0,r.jsx)("h2",{className:"text-2xl font-semibold text-neutral-900",children:t}),(0,r.jsx)("p",{className:"mt-3 text-base leading-7 text-neutral-700",children:s})]})}},76106:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(95155);s(12115);var a=s(17666);function n(e){let{hints:t=[]}=e;return t.length?(0,r.jsx)("div",{className:"space-y-3",children:t.map((e,t)=>{var s;return(0,r.jsxs)("div",{className:"lds-practice-hint",children:[(0,r.jsx)("span",{className:"lds-practice-hint-icon","aria-hidden":!0,children:(0,r.jsx)(a.A,{size:14})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("div",{className:"text-[11px] font-bold text-[var(--lds-studio-accent-strong)] uppercase mb-0.5",children:null!=(s=e.label)?s:"Hint ".concat(t+1)}),(0,r.jsx)("div",{className:"text-sm text-neutral-700 leading-relaxed",children:e.body})]})]},t)})}):null}},94407:(e,t,s)=>{s.d(t,{A:()=>o});var r=s(95155);s(12115);var a=s(35299),n=s(85921),l=s(17666),i=s(57828),c=s(48314);function o(e){let{isRunning:t,isReady:s,onRun:o,onReset:d,onHint:u,onSolution:x,showShortcut:h=!0,variant:m="default"}=e,p="workbench"===m;return(0,r.jsxs)("div",{className:p?"lds-practice-run-controls":"flex items-center justify-between gap-2 px-4 py-3 bg-neutral-950/40 border-t border-neutral-800",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("button",{type:"button",onClick:o,disabled:!s||t,className:p?"lds-practice-run-button":"inline-flex items-center gap-1.5 px-3.5 py-2 rounded-md bg-emerald-600 hover:bg-emerald-500 text-white text-sm font-medium transition-colors disabled:bg-neutral-700 disabled:cursor-not-allowed",children:[t?(0,r.jsx)(a.A,{size:14,className:"animate-spin"}):(0,r.jsx)(n.A,{size:14}),t?"Running…":"Run"]}),h&&(0,r.jsx)("span",{className:"hidden sm:inline text-[11px] text-neutral-500 font-mono",children:"⌘/Ctrl + Enter"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[u&&(0,r.jsxs)("button",{type:"button",onClick:u,className:p?"lds-practice-tool-button":"inline-flex items-center gap-1.5 px-2.5 py-2 rounded-md bg-amber-500/10 hover:bg-amber-500/20 text-amber-300 text-sm font-medium transition-colors",children:[(0,r.jsx)(l.A,{size:14}),"Hint"]}),x&&(0,r.jsxs)("button",{type:"button",onClick:x,className:p?"lds-practice-tool-button":"inline-flex items-center gap-1.5 px-2.5 py-2 rounded-md bg-neutral-800 hover:bg-neutral-700 text-neutral-200 text-sm font-medium transition-colors",children:[(0,r.jsx)(i.A,{size:14}),"Solution"]}),(0,r.jsxs)("button",{type:"button",onClick:d,className:p?"lds-practice-tool-button":"inline-flex items-center gap-1.5 px-2.5 py-2 rounded-md bg-neutral-800 hover:bg-neutral-700 text-neutral-300 text-sm font-medium transition-colors",children:[(0,r.jsx)(c.A,{size:14}),"Reset"]})]})]})}}}]);

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.