@epic-web/workshop-app 6.72.1 → 6.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/_exerciseNumber-jokuvO2V.js +2 -0
- package/build/client/assets/{_exerciseNumber-DUwXPNgl.js.map → _exerciseNumber-jokuvO2V.js.map} +1 -1
- package/build/client/assets/_exerciseNumber_.finished-BaC--Y5p.js +2 -0
- package/build/client/assets/_exerciseNumber_.finished-BaC--Y5p.js.map +1 -0
- package/build/client/assets/_extra-DXypL1sc.js +2 -0
- package/build/client/assets/{_extra-DkiDFYVP.js.map → _extra-DXypL1sc.js.map} +1 -1
- package/build/client/assets/_layout-_Aw6qzZC.js +2 -0
- package/build/client/assets/{_layout-DDTXkx2z.js.map → _layout-_Aw6qzZC.js.map} +1 -1
- package/build/client/assets/diff-DfWBhj2O.js +2 -0
- package/build/client/assets/{diff-DwJn8fSQ.js.map → diff-DfWBhj2O.js.map} +1 -1
- package/build/client/assets/{diff-HIgoC1PO.js → diff-Dng5ItOr.js} +2 -2
- package/build/client/assets/{diff-HIgoC1PO.js.map → diff-Dng5ItOr.js.map} +1 -1
- package/build/client/assets/epic-video-C1_HSISA.js +2 -0
- package/build/client/assets/{epic-video-DEq93iL_.js.map → epic-video-C1_HSISA.js.map} +1 -1
- package/build/client/assets/{epic-video-DnXXh6qE.js → epic-video-CC0372g5.js} +164 -164
- package/build/client/assets/{epic-video-DnXXh6qE.js.map → epic-video-CC0372g5.js.map} +1 -1
- package/build/client/assets/finished-BbEk1NdF.js +2 -0
- package/build/client/assets/finished-BbEk1NdF.js.map +1 -0
- package/build/client/assets/format-CZ5n8p10.js +2 -0
- package/build/client/assets/format-CZ5n8p10.js.map +1 -0
- package/build/client/assets/index-CFM_ffAh.js +2 -0
- package/build/client/assets/{index-IgBUhsxX.js.map → index-CFM_ffAh.js.map} +1 -1
- package/build/client/assets/index-CfU0fdf7.js +2 -0
- package/build/client/assets/{index-PKjGT1Rp.js.map → index-CfU0fdf7.js.map} +1 -1
- package/build/client/assets/index-Pxi8WjFA.js +2 -0
- package/build/client/assets/{index-BgExztV_.js.map → index-Pxi8WjFA.js.map} +1 -1
- package/build/client/assets/manifest-835c6db1.js +1 -0
- package/build/client/assets/{mdx-Dun3ONG_.js → mdx-vy-1-0a3.js} +2 -2
- package/build/client/assets/{mdx-Dun3ONG_.js.map → mdx-vy-1-0a3.js.map} +1 -1
- package/build/client/assets/{offline-videos-BP7_xJkO.js → offline-videos-DAsuWMco.js} +2 -2
- package/build/client/assets/offline-videos-DAsuWMco.js.map +1 -0
- package/build/client/assets/preferences-B7ND1VS9.js +2 -0
- package/build/client/assets/preferences-B7ND1VS9.js.map +1 -0
- package/build/client/assets/retrieval-practice-BOku32wW.js +2 -0
- package/build/client/assets/retrieval-practice-BOku32wW.js.map +1 -0
- package/build/client/assets/{root-CKcj2hDc.js → root-BwYDIUyI.js} +2 -2
- package/build/client/assets/{root-CKcj2hDc.js.map → root-BwYDIUyI.js.map} +1 -1
- package/build/client/assets/tailwind-C8PqsZFp.css +1 -0
- package/build/client/assets/test-Ciw2aKZE.js +2 -0
- package/build/client/assets/{test-BU7jE-eU.js.map → test-Ciw2aKZE.js.map} +1 -1
- package/build/client/assets/{tests-1-kVRtTc.js → tests-CZ2AhDKA.js} +2 -2
- package/build/client/assets/{tests-1-kVRtTc.js.map → tests-CZ2AhDKA.js.map} +1 -1
- package/build/server/index.js +110 -25
- package/build/server/index.js.map +1 -1
- package/package.json +3 -3
- package/build/client/assets/_exerciseNumber-DUwXPNgl.js +0 -2
- package/build/client/assets/_exerciseNumber_.finished-C4sVkuEq.js +0 -2
- package/build/client/assets/_exerciseNumber_.finished-C4sVkuEq.js.map +0 -1
- package/build/client/assets/_extra-DkiDFYVP.js +0 -2
- package/build/client/assets/_layout-DDTXkx2z.js +0 -2
- package/build/client/assets/diff-DwJn8fSQ.js +0 -2
- package/build/client/assets/epic-video-DEq93iL_.js +0 -2
- package/build/client/assets/finished-BW_4ow3n.js +0 -2
- package/build/client/assets/finished-BW_4ow3n.js.map +0 -1
- package/build/client/assets/index-BgExztV_.js +0 -2
- package/build/client/assets/index-IgBUhsxX.js +0 -2
- package/build/client/assets/index-PKjGT1Rp.js +0 -2
- package/build/client/assets/manifest-9e0c0428.js +0 -1
- package/build/client/assets/offline-videos-BP7_xJkO.js.map +0 -1
- package/build/client/assets/preferences-D6HQ5bK1.js +0 -2
- package/build/client/assets/preferences-D6HQ5bK1.js.map +0 -1
- package/build/client/assets/tailwind-C1_1LEqo.css +0 -1
- package/build/client/assets/test-BU7jE-eU.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{w as n,L as l}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{E as a}from"./index-CEVyDj51.js";import{r as c}from"./index-CqIc3cxq.js";import{E as m}from"./epic-video-CC0372g5.js";import{I as d,c as p}from"./misc-W4055b-0.js";import{L as f}from"./loading-CDNzW5oO.js";import{N as h}from"./nav-chevrons-Dk4GtZwQ.js";import{u as x}from"./revalidation-ws-BJWJviUX.js";import{M as u}from"./mdx-vy-1-0a3.js";import{u as j}from"./online-DiNLkgTC.js";import{g as b}from"./root-loader-BOzEMapJ.js";import{g}from"./seo-t5J-DRxw.js";import{R as v}from"./retrieval-practice-BOku32wW.js";import{E as w}from"./launch-editor-D2exGfVu.js";import{P as N}from"./progress-BcA4i0iU.js";import{u as k}from"./index-CdzVFL-Z.js";import"@epic-web/workshop-utils/offline-video-utils";import"./use-event-source-BuD4_2SF.js";import"./index-DzdDahau.js";import"./index-vDCSPjrM.js";import"./schemas-Uj5SZtvt.js";import"./tooltip-Tlsyx2YO.js";import"./format-CZ5n8p10.js";import"./user-BsPobzjB.js";import"./workshop-config-Zfc8zU0x.js";import"./preload-helper-BXl3LOEh.js";import"./progress-bar-DpWhcyhC.js";import"./pe-CIZUOJMr.js";const re={getSitemapEntries:()=>[{route:"/finished"}]},oe=({matches:r})=>{const s=b(r);return s?g({title:`🎉 ${s?.workshopTitle}`,description:`Elaboration for ${s?.workshopTitle}`,ogTitle:`Finished ${s?.workshopTitle}`,ogDescription:"You finished! Time to submit feedback.",instructor:s.instructor,requestInfo:s.requestInfo}):[]},E={h1:()=>null},ie=n(function({loaderData:s}){return x({watchPaths:["./exercises/FINISHED.mdx"]}),e.jsx("div",{className:"flex h-full grow flex-col",children:e.jsxs("main",{className:"grid h-full grow grid-cols-1 grid-rows-2 lg:grid-cols-2 lg:grid-rows-1",children:[e.jsxs("div",{className:"relative col-span-1 row-span-1 flex h-full flex-col lg:border-r",children:[e.jsx("h1",{className:"h-14 border-b pr-5 pl-10 text-sm leading-none font-medium uppercase",children:e.jsx("div",{className:"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2",children:e.jsxs("div",{className:"flex items-center justify-start gap-x-2",children:[e.jsx(l,{to:"/",className:"hover:underline",children:s.workshopTitle}),e.jsx("span",{children:"/"}),e.jsx("span",{children:"Elaboration"})]})})}),e.jsxs("article",{className:"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar h-full w-full max-w-none flex-1 scroll-pt-6 space-y-6 overflow-y-auto p-2 sm:p-10 sm:pt-8",id:s.articleId,children:[s.finishedCode?e.jsx(m,{epicVideoInfosPromise:s.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(u,{code:s.finishedCode,components:E})})}):"No finished instructions yet...",e.jsx(v,{})]}),e.jsx(a,{elementQuery:`#${s.articleId}`}),e.jsx(N,{type:"workshop-finished",className:"h-14 border-t px-6"}),e.jsxs("div",{className:"@container flex h-16 justify-between border-t border-b-4 lg:border-b-0",children:[e.jsx("div",{}),s.workshopFinished.status==="success"?e.jsx(w,{file:s.workshopFinished.file,relativePath:s.workshopFinished.relativePath}):null,e.jsx(h,{prev:s.prevStepLink,next:{to:"/"}})]})]}),e.jsx(y,{workshopTitle:s.workshopTitle,workshopFormEmbedUrl:s.workshopFormEmbedUrl})]})})});function y({workshopTitle:r,workshopFormEmbedUrl:s}){const t=k(),[o,i]=c.useState(!1);return j()?e.jsxs("div",{className:"relative shrink-0",children:[o?null:e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:e.jsx(f,{children:e.jsxs("span",{children:["Loading ",r," Elaboration form"]})})}),e.jsx("iframe",{onLoad:()=>i(!0),onError:()=>i(!0),title:"Elaboration",src:s,className:p("absolute inset-0 flex h-full w-full transition-opacity duration-300",o?"opacity-100":"opacity-0"),style:{colorScheme:t}})]}):e.jsx("div",{className:"relative shrink-0",children:e.jsx("div",{className:"text-foreground-destructive absolute inset-0 z-10 flex items-center justify-center",children:e.jsx(d,{name:"WifiNoConnection",size:"xl",children:e.jsxs("span",{children:["Unable to load the ",e.jsx("a",{href:s,className:"underline",children:`${r} feedback form`})," when offline"]})})})})}export{ie as default,re as handle,oe as meta};
|
|
2
|
+
//# sourceMappingURL=finished-BbEk1NdF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finished-BbEk1NdF.js","sources":["../../../app/routes/_app+/finished.tsx"],"sourcesContent":["import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetExercises,\n\tgetWorkshopFinished,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport { getEpicVideoInfos } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n\ttime,\n} from '@epic-web/workshop-utils/timing.server'\nimport { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport slugify from '@sindresorhus/slugify'\nimport * as React from 'react'\nimport { data, type HeadersFunction, Link } from 'react-router'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { Icon } from '#app/components/icons.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { NavChevrons } from '#app/components/nav-chevrons.tsx'\nimport { useRevalidationWS } from '#app/components/revalidation-ws.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn } from '#app/utils/misc.tsx'\nimport { useIsOnline } from '#app/utils/online.ts'\nimport { getRootMatchLoaderData } from '#app/utils/root-loader.ts'\nimport { getSeoMetaTags } from '#app/utils/seo.ts'\nimport { RetrievalPractice } from '#app/components/retrieval-practice.tsx'\nimport { EditFileOnGitHub } from '../launch-editor.tsx'\nimport { ProgressToggle } from '../progress.tsx'\nimport { useTheme } from '../theme/index.tsx'\nimport { type Route } from './+types/finished.tsx'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => [{ route: '/finished' }],\n}\n\nexport const meta: Route.MetaFunction = ({ matches }) => {\n\tconst rootData = getRootMatchLoaderData(matches)\n\tif (!rootData) return []\n\n\treturn getSeoMetaTags({\n\t\ttitle: `🎉 ${rootData?.workshopTitle}`,\n\t\tdescription: `Elaboration for ${rootData?.workshopTitle}`,\n\t\togTitle: `Finished ${rootData?.workshopTitle}`,\n\t\togDescription: `You finished! Time to submit feedback.`,\n\t\tinstructor: rootData.instructor,\n\t\trequestInfo: rootData.requestInfo,\n\t})\n}\n\nexport async function loader({ request }: Route.LoaderArgs) {\n\tconst timings = makeTimings('finishedLoader')\n\tconst exercises = await getExercises({ request, timings })\n\tconst compiledFinished = await time(() => getWorkshopFinished({ request }), {\n\t\ttimings,\n\t\ttype: 'compileMdx',\n\t\tdesc: 'compileMdx in finished',\n\t})\n\n\tconst lastExercises = exercises[exercises.length - 1]\n\tconst workshopConfig = getWorkshopConfig()\n\tconst workshopTitle = workshopConfig.title\n\tconst workshopFormTemplate = workshopConfig.forms.workshop\n\tconst workshopFormEmbedUrl = workshopFormTemplate.replace(\n\t\t'{workshopTitle}',\n\t\tencodeURIComponent(workshopTitle),\n\t)\n\treturn data(\n\t\t{\n\t\t\tarticleId: `workshop-${slugify(workshopTitle)}-finished`,\n\t\t\tworkshopTitle,\n\t\t\tworkshopFormEmbedUrl,\n\t\t\tfinishedCode:\n\t\t\t\tcompiledFinished.compiled.status === 'success'\n\t\t\t\t\t? compiledFinished.compiled.code\n\t\t\t\t\t: null,\n\t\t\tepicVideoInfosPromise:\n\t\t\t\tcompiledFinished.compiled.status === 'success'\n\t\t\t\t\t? getEpicVideoInfos(compiledFinished.compiled.epicVideoEmbeds, {\n\t\t\t\t\t\t\trequest,\n\t\t\t\t\t\t})\n\t\t\t\t\t: null,\n\t\t\tworkshopFinished: {\n\t\t\t\tstatus: compiledFinished.compiled.status,\n\t\t\t\tfile: compiledFinished.file,\n\t\t\t\trelativePath: compiledFinished.relativePath,\n\t\t\t},\n\t\t\tprevStepLink: lastExercises\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/${lastExercises.exerciseNumber}/finished`,\n\t\t\t\t\t}\n\t\t\t\t: null,\n\t\t},\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nconst mdxComponents = { h1: () => null }\n\nexport default function ExerciseFinished({\n\tloaderData: data,\n}: Route.ComponentProps) {\n\tuseRevalidationWS({ watchPaths: ['./exercises/FINISHED.mdx'] })\n\treturn (\n\t\t<div className=\"flex h-full grow flex-col\">\n\t\t\t<main className=\"grid h-full grow grid-cols-1 grid-rows-2 lg:grid-cols-2 lg:grid-rows-1\">\n\t\t\t\t<div className=\"relative col-span-1 row-span-1 flex h-full flex-col lg:border-r\">\n\t\t\t\t\t<h1 className=\"h-14 border-b pr-5 pl-10 text-sm leading-none font-medium uppercase\">\n\t\t\t\t\t\t<div className=\"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-start gap-x-2\">\n\t\t\t\t\t\t\t\t<Link to=\"/\" className=\"hover:underline\">\n\t\t\t\t\t\t\t\t\t{data.workshopTitle}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t<span>/</span>\n\t\t\t\t\t\t\t\t<span>Elaboration</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<article\n\t\t\t\t\t\tclassName=\"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar h-full w-full max-w-none flex-1 scroll-pt-6 space-y-6 overflow-y-auto p-2 sm:p-10 sm:pt-8\"\n\t\t\t\t\t\tid={data.articleId}\n\t\t\t\t\t>\n\t\t\t\t\t\t{data.finishedCode ? (\n\t\t\t\t\t\t\t<EpicVideoInfoProvider\n\t\t\t\t\t\t\t\tepicVideoInfosPromise={data.epicVideoInfosPromise}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t\t\t\t\t<Mdx code={data.finishedCode} components={mdxComponents} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t// TODO: render a random dad joke...\n\t\t\t\t\t\t\t'No finished instructions yet...'\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<RetrievalPractice />\n\t\t\t\t\t</article>\n\t\t\t\t\t<ElementScrollRestoration elementQuery={`#${data.articleId}`} />\n\t\t\t\t\t<ProgressToggle\n\t\t\t\t\t\ttype=\"workshop-finished\"\n\t\t\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"@container flex h-16 justify-between border-t border-b-4 lg:border-b-0\">\n\t\t\t\t\t\t<div />\n\t\t\t\t\t\t{data.workshopFinished.status === 'success' ? (\n\t\t\t\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\t\t\t\tfile={data.workshopFinished.file}\n\t\t\t\t\t\t\t\trelativePath={data.workshopFinished.relativePath}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t<NavChevrons prev={data.prevStepLink} next={{ to: '/' }} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Survey\n\t\t\t\t\tworkshopTitle={data.workshopTitle}\n\t\t\t\t\tworkshopFormEmbedUrl={data.workshopFormEmbedUrl}\n\t\t\t\t/>\n\t\t\t</main>\n\t\t</div>\n\t)\n}\n\nfunction Survey({\n\tworkshopTitle,\n\tworkshopFormEmbedUrl,\n}: {\n\tworkshopTitle: string\n\tworkshopFormEmbedUrl: string\n}) {\n\tconst theme = useTheme()\n\tconst [iframeLoaded, setIframeLoaded] = React.useState(false)\n\tconst isOnline = useIsOnline()\n\tif (!isOnline) {\n\t\treturn (\n\t\t\t<div className=\"relative shrink-0\">\n\t\t\t\t<div className=\"text-foreground-destructive absolute inset-0 z-10 flex items-center justify-center\">\n\t\t\t\t\t<Icon name=\"WifiNoConnection\" size=\"xl\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{'Unable to load the '}\n\t\t\t\t\t\t\t<a href={workshopFormEmbedUrl} className=\"underline\">\n\t\t\t\t\t\t\t\t{`${workshopTitle} feedback form`}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t{' when offline'}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Icon>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t}\n\treturn (\n\t\t<div className=\"relative shrink-0\">\n\t\t\t{!iframeLoaded ? (\n\t\t\t\t<div className=\"absolute inset-0 z-10 flex items-center justify-center\">\n\t\t\t\t\t<Loading>\n\t\t\t\t\t\t<span>Loading {workshopTitle} Elaboration form</span>\n\t\t\t\t\t</Loading>\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t\t<iframe\n\t\t\t\tonLoad={() => setIframeLoaded(true)}\n\t\t\t\t// show what would have shown if there is an error\n\t\t\t\tonError={() => setIframeLoaded(true)}\n\t\t\t\ttitle=\"Elaboration\"\n\t\t\t\tsrc={workshopFormEmbedUrl}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'absolute inset-0 flex h-full w-full transition-opacity duration-300',\n\t\t\t\t\tiframeLoaded ? 'opacity-100' : 'opacity-0',\n\t\t\t\t)}\n\t\t\t\tstyle={{ colorScheme: theme }}\n\t\t\t/>\n\t\t</div>\n\t)\n}\n"],"names":["handle","getSitemapEntries","route","meta","matches","rootData","getRootMatchLoaderData","getSeoMetaTags","title","workshopTitle","description","ogTitle","ogDescription","instructor","requestInfo","mdxComponents","h1","finished","_UNSAFE_withComponentProps","loaderData","data","useRevalidationWS","watchPaths","className","children","jsxs","jsx","Link","to","id","articleId","finishedCode","EpicVideoInfoProvider","epicVideoInfosPromise","Mdx","code","components","RetrievalPractice","ElementScrollRestoration","elementQuery","ProgressToggle","type","workshopFinished","status","EditFileOnGitHub","file","relativePath","NavChevrons","prev","prevStepLink","next","Survey","workshopFormEmbedUrl","theme","useTheme","iframeLoaded","setIframeLoaded","React","useIsOnline","Loading","onLoad","onError","src","cn","style","colorScheme","Icon","name","size","href"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-CZ5n8p10.js","sources":["../../../app/utils/format.ts"],"sourcesContent":["export function formatBytes(bytes: number) {\n\tif (!Number.isFinite(bytes)) return '—'\n\tif (bytes < 1024) return `${bytes} B`\n\tconst kb = bytes / 1024\n\tif (kb < 1024) return `${kb.toFixed(1)} KB`\n\tconst mb = kb / 1024\n\tif (mb < 1024) return `${mb.toFixed(1)} MB`\n\treturn `${(mb / 1024).toFixed(1)} GB`\n}\n"],"names":["formatBytes","bytes","kb","mb"],"mappings":"AAAO,SAASA,EAAYC,EAAe,CAC1C,GAAI,CAAC,OAAO,SAASA,CAAK,EAAG,MAAO,IACpC,GAAIA,EAAQ,KAAM,MAAO,GAAGA,CAAK,KACjC,MAAMC,EAAKD,EAAQ,KACnB,GAAIC,EAAK,KAAM,MAAO,GAAGA,EAAG,QAAQ,CAAC,CAAC,MACtC,MAAMC,EAAKD,EAAK,KAChB,OAAIC,EAAK,KAAa,GAAGA,EAAG,QAAQ,CAAC,CAAC,MAC/B,IAAIA,EAAK,MAAM,QAAQ,CAAC,CAAC,KACjC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{w as s,a,b as i,L as l}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{E as m}from"./index-CEVyDj51.js";import{E as n}from"./epic-video-CC0372g5.js";import{G as d}from"./error-boundary-DxHqAEHX.js";import{u as c}from"./revalidation-ws-BJWJviUX.js";import{E as p}from"./launch-editor-D2exGfVu.js";import{M as x}from"./mdx-vy-1-0a3.js";import{c as f}from"./misc-W4055b-0.js";import{g as u}from"./root-loader-BOzEMapJ.js";import{g as h}from"./seo-t5J-DRxw.js";import"./index-CqIc3cxq.js";import"@epic-web/workshop-utils/offline-video-utils";import"./use-event-source-BuD4_2SF.js";import"./index-DzdDahau.js";import"./index-vDCSPjrM.js";import"./index-CdzVFL-Z.js";import"./tooltip-Tlsyx2YO.js";import"./pe-CIZUOJMr.js";import"./schemas-Uj5SZtvt.js";import"./online-DiNLkgTC.js";import"./loading-CDNzW5oO.js";import"./format-CZ5n8p10.js";import"./user-BsPobzjB.js";import"./workshop-config-Zfc8zU0x.js";import"./preload-helper-BXl3LOEh.js";import"./progress-bar-DpWhcyhC.js";const z=o=>{const r=o.data,t=u(o.matches);return!r||!t?[{title:"🦉 | Error"}]:h({title:`📚 | ${r.title} | ${t.workshopTitle}`,description:`Extras for ${t.workshopTitle}`,ogTitle:r.title,ogDescription:`Extras for ${t.workshopTitle}`,instructor:t.instructor,requestInfo:t.requestInfo})};function j({extra:o}){return e.jsx("li",{children:e.jsxs(l,{className:f("relative flex items-center gap-4 px-4 py-3 text-lg font-semibold transition","hover:bg-muted/60 focus:bg-muted/60"),prefetch:"intent",to:o.dirName,children:[e.jsx("span",{className:"text-muted-foreground text-xs font-normal tabular-nums",children:"•"}),e.jsx("span",{className:"truncate",children:o.title})]})})}const v={h1:()=>null},J=s(function(){const r=i();return c({watchPaths:["./extra","./example","./examples"]}),e.jsxs("main",{className:"relative flex h-full w-full max-w-5xl flex-col justify-between border-r md:w-3/4 xl:w-2/3",children:[e.jsxs("article",{id:r.articleId,className:"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar flex w-full flex-1 flex-col gap-12 overflow-y-scroll px-3 py-4 pt-6 md:px-10 md:py-12 md:pt-16",children:[e.jsx("div",{children:e.jsx("h1",{className:"text-[clamp(3rem,6vw,7.5rem)] leading-none font-extrabold",children:r.title})}),e.jsx("div",{children:r.extrasReadme.compiled.status==="success"&&r.extrasReadme.compiled.code?e.jsx(n,{epicVideoInfosPromise:r.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(x,{code:r.extrasReadme.compiled.code,components:v})})}):r.extrasReadme.compiled.status==="error"?e.jsxs("div",{className:"text-foreground-destructive",children:["There was an error:",e.jsx("pre",{children:r.extrasReadme.compiled.error})]}):"No extras overview yet..."}),e.jsxs("div",{className:"pt-6",children:[e.jsx("h2",{className:"pb-4 font-mono text-xs font-semibold uppercase",children:"Extras"}),r.extras.length?e.jsx("ul",{className:"divide-border dark:divide-border/50 flex flex-col divide-y",children:r.extras.map(t=>e.jsx(j,{extra:t},t.dirName))}):e.jsx("p",{className:"text-muted-foreground",children:"No extras yet. Add one to get started."})]})]}),e.jsx(m,{elementQuery:`#${r.articleId}`}),e.jsx("div",{className:"@container flex h-16 justify-center border-t",children:e.jsx(p,{file:r.extrasReadme.file,relativePath:r.extrasReadme.relativePath})})]})}),K=a(function(){return e.jsx(d,{})});export{K as ErrorBoundary,J as default,z as meta};
|
|
2
|
+
//# sourceMappingURL=index-CFM_ffAh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-CFM_ffAh.js","sources":["../../../app/routes/_app+/extra+/index.tsx"],"sourcesContent":["import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetApps,\n\tgetExtrasInstructions,\n\tisExtraApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport { getEpicVideoInfos } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n\ttime,\n} from '@epic-web/workshop-utils/timing.server'\nimport slugify from '@sindresorhus/slugify'\nimport {\n\tdata,\n\ttype HeadersFunction,\n\tLink,\n\ttype LoaderFunctionArgs,\n\ttype MetaFunction,\n\tuseLoaderData,\n} from 'react-router'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { useRevalidationWS } from '#app/components/revalidation-ws.tsx'\nimport { EditFileOnGitHub } from '#app/routes/launch-editor.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn } from '#app/utils/misc.tsx'\nimport { getRootMatchLoaderData } from '#app/utils/root-loader.ts'\nimport { getSeoMetaTags } from '#app/utils/seo.ts'\n\nexport const meta: MetaFunction<typeof loader> = (args) => {\n\tconst loaderData = args.data\n\tconst rootData = getRootMatchLoaderData(args.matches)\n\tif (!loaderData || !rootData) return [{ title: '🦉 | Error' }]\n\n\treturn getSeoMetaTags({\n\t\ttitle: `📚 | ${loaderData.title} | ${rootData.workshopTitle}`,\n\t\tdescription: `Extras for ${rootData.workshopTitle}`,\n\t\togTitle: loaderData.title,\n\t\togDescription: `Extras for ${rootData.workshopTitle}`,\n\t\tinstructor: rootData.instructor,\n\t\trequestInfo: rootData.requestInfo,\n\t})\n}\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('extrasIndexLoader')\n\tconst { title: workshopTitle } = getWorkshopConfig()\n\tconst [extrasReadme, apps] = await Promise.all([\n\t\ttime(() => getExtrasInstructions({ request }), {\n\t\t\ttimings,\n\t\t\ttype: 'compileMdx',\n\t\t\tdesc: 'compileMdx in extras index',\n\t\t}),\n\t\ttime(() => getApps({ request, timings }), {\n\t\t\ttimings,\n\t\t\ttype: 'getApps',\n\t\t\tdesc: 'getApps in extras index',\n\t\t}),\n\t])\n\n\tconst extras = apps\n\t\t.filter(isExtraApp)\n\t\t.sort((a, b) =>\n\t\t\ta.title.localeCompare(b.title, undefined, {\n\t\t\t\tnumeric: true,\n\t\t\t\tsensitivity: 'base',\n\t\t\t}),\n\t\t)\n\t\t.map((extra) => ({\n\t\t\tdirName: extra.dirName,\n\t\t\ttitle: extra.title,\n\t\t}))\n\n\tconst title =\n\t\textrasReadme.compiled.status === 'success'\n\t\t\t? (extrasReadme.compiled.title ?? 'Extras')\n\t\t\t: 'Extras'\n\n\treturn data(\n\t\t{\n\t\t\tarticleId: `workshop-${slugify(workshopTitle)}-extras`,\n\t\t\ttitle,\n\t\t\textras,\n\t\t\textrasReadme,\n\t\t\tepicVideoInfosPromise:\n\t\t\t\textrasReadme.compiled.status === 'success'\n\t\t\t\t\t? getEpicVideoInfos(extrasReadme.compiled.epicVideoEmbeds, {\n\t\t\t\t\t\t\trequest,\n\t\t\t\t\t\t})\n\t\t\t\t\t: null,\n\t\t},\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nfunction ExtraListItem({\n\textra,\n}: {\n\textra: { dirName: string; title: string }\n}) {\n\treturn (\n\t\t<li>\n\t\t\t<Link\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'relative flex items-center gap-4 px-4 py-3 text-lg font-semibold transition',\n\t\t\t\t\t'hover:bg-muted/60 focus:bg-muted/60',\n\t\t\t\t)}\n\t\t\t\tprefetch=\"intent\"\n\t\t\t\tto={extra.dirName}\n\t\t\t>\n\t\t\t\t<span className=\"text-muted-foreground text-xs font-normal tabular-nums\">\n\t\t\t\t\t•\n\t\t\t\t</span>\n\t\t\t\t<span className=\"truncate\">{extra.title}</span>\n\t\t\t</Link>\n\t\t</li>\n\t)\n}\n\nconst mdxComponents = { h1: () => null }\n\nexport default function ExtrasIndex() {\n\tconst data = useLoaderData<typeof loader>()\n\tuseRevalidationWS({ watchPaths: ['./extra', './example', './examples'] })\n\n\treturn (\n\t\t<main className=\"relative flex h-full w-full max-w-5xl flex-col justify-between border-r md:w-3/4 xl:w-2/3\">\n\t\t\t<article\n\t\t\t\tid={data.articleId}\n\t\t\t\tclassName=\"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar flex w-full flex-1 flex-col gap-12 overflow-y-scroll px-3 py-4 pt-6 md:px-10 md:py-12 md:pt-16\"\n\t\t\t>\n\t\t\t\t<div>\n\t\t\t\t\t<h1 className=\"text-[clamp(3rem,6vw,7.5rem)] leading-none font-extrabold\">\n\t\t\t\t\t\t{data.title}\n\t\t\t\t\t</h1>\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t{data.extrasReadme.compiled.status === 'success' &&\n\t\t\t\t\tdata.extrasReadme.compiled.code ? (\n\t\t\t\t\t\t<EpicVideoInfoProvider\n\t\t\t\t\t\t\tepicVideoInfosPromise={data.epicVideoInfosPromise}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t\t\t\t<Mdx\n\t\t\t\t\t\t\t\t\tcode={data.extrasReadme.compiled.code}\n\t\t\t\t\t\t\t\t\tcomponents={mdxComponents}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t\t) : data.extrasReadme.compiled.status === 'error' ? (\n\t\t\t\t\t\t<div className=\"text-foreground-destructive\">\n\t\t\t\t\t\t\tThere was an error:\n\t\t\t\t\t\t\t<pre>{data.extrasReadme.compiled.error}</pre>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t'No extras overview yet...'\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"pt-6\">\n\t\t\t\t\t<h2 className=\"pb-4 font-mono text-xs font-semibold uppercase\">\n\t\t\t\t\t\tExtras\n\t\t\t\t\t</h2>\n\t\t\t\t\t{data.extras.length ? (\n\t\t\t\t\t\t<ul className=\"divide-border dark:divide-border/50 flex flex-col divide-y\">\n\t\t\t\t\t\t\t{data.extras.map((extra) => (\n\t\t\t\t\t\t\t\t<ExtraListItem key={extra.dirName} extra={extra} />\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<p className=\"text-muted-foreground\">\n\t\t\t\t\t\t\tNo extras yet. Add one to get started.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</article>\n\t\t\t<ElementScrollRestoration elementQuery={`#${data.articleId}`} />\n\t\t\t<div className=\"@container flex h-16 justify-center border-t\">\n\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\tfile={data.extrasReadme.file}\n\t\t\t\t\trelativePath={data.extrasReadme.relativePath}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn <GeneralErrorBoundary />\n}\n"],"names":["meta","args","loaderData","data","rootData","getRootMatchLoaderData","matches","title","getSeoMetaTags","workshopTitle","description","ogTitle","ogDescription","instructor","requestInfo","ExtraListItem","extra","children","jsxs","Link","className","cn","prefetch","to","dirName","jsx","mdxComponents","h1","index","_UNSAFE_withComponentProps","useLoaderData","useRevalidationWS","watchPaths","id","articleId","extrasReadme","compiled","status","code","EpicVideoInfoProvider","epicVideoInfosPromise","Mdx","components","error","extras","length","map","ElementScrollRestoration","elementQuery","EditFileOnGitHub","file","relativePath","ErrorBoundary","_UNSAFE_withErrorBoundaryProps","GeneralErrorBoundary"],"mappings":"0/BAgCO,MAAMA,EAAqCC,GAAS,CAC1D,MAAMC,EAAaD,EAAKE,KAClBC,EAAWC,EAAuBJ,EAAKK,OAAO,EACpD,MAAI,CAACJ,GAAc,CAACE,EAAiB,CAAC,CAAEG,MAAO,YAAa,CAAC,EAEtDC,EAAe,CACrBD,MAAO,QAAQL,EAAWK,KAAK,MAAMH,EAASK,aAAa,GAC3DC,YAAa,cAAcN,EAASK,aAAa,GACjDE,QAAST,EAAWK,MACpBK,cAAe,cAAcR,EAASK,aAAa,GACnDI,WAAYT,EAASS,WACrBC,YAAaV,EAASU,WACvB,CAAC,CACF,EAiEA,SAASC,EAAc,CACtBC,MAAAA,CACD,EAEG,CACF,aACE,KAAA,CACAC,SAAAC,EAAAA,KAACC,EAAA,CACAC,UAAWC,EACV,8EACA,qCACD,EACAC,SAAS,SACTC,GAAIP,EAAMQ,QAEVP,SAAA,CAAAQ,EAAAA,IAAC,OAAA,CAAKL,UAAU,yDAAyDH,SAAA,GAAA,CAEzE,EACAQ,EAAAA,IAAC,OAAA,CAAKL,UAAU,WAAYH,WAAMV,KAAA,CAAM,CAAA,EACzC,CAAA,CACD,CAEF,CAEA,MAAMmB,EAAgB,CAAEC,GAAIA,IAAM,IAAK,EAEvCC,EAAAC,EAAA,UAAsC,CACrC,MAAM1B,EAAO2B,EAAA,EACbC,OAAAA,EAAkB,CAAEC,WAAY,CAAC,UAAW,YAAa,YAAY,CAAE,CAAC,EAGvEd,EAAAA,KAAC,OAAA,CAAKE,UAAU,4FACfH,SAAA,CAAAC,EAAAA,KAAC,UAAA,CACAe,GAAI9B,EAAK+B,UACTd,UAAU,8JAEVH,SAAA,CAAAQ,EAAAA,IAAC,MAAA,CACAR,eAAC,KAAA,CAAGG,UAAU,4DACZH,SAAAd,EAAKI,MACP,CAAA,CACD,EACAkB,EAAAA,IAAC,MAAA,CACCR,SAAAd,EAAKgC,aAAaC,SAASC,SAAW,WACvClC,EAAKgC,aAAaC,SAASE,KAC1Bb,EAAAA,IAACc,EAAA,CACAC,sBAAuBrC,EAAKqC,sBAE5BvB,SAAAQ,EAAAA,IAAC,MAAA,CAAIL,UAAU,sCACdH,SAAAQ,EAAAA,IAACgB,EAAA,CACAH,KAAMnC,EAAKgC,aAAaC,SAASE,KACjCI,WAAYhB,EACb,EACD,CAAA,CACD,EACGvB,EAAKgC,aAAaC,SAASC,SAAW,QACzCnB,EAAAA,KAAC,MAAA,CAAIE,UAAU,8BAA8BH,SAAA,CAAA,4BAE3C,MAAA,CAAKA,SAAAd,EAAKgC,aAAaC,SAASO,KAAA,CAAM,CAAA,CAAA,CACxC,EAEA,2BAAA,CAEF,EACAzB,EAAAA,KAAC,MAAA,CAAIE,UAAU,OACdH,SAAA,CAAAQ,EAAAA,IAAC,KAAA,CAAGL,UAAU,iDAAiDH,SAAA,QAAA,CAE/D,EACCd,EAAKyC,OAAOC,OACZpB,EAAAA,IAAC,KAAA,CAAGL,UAAU,6DACZH,SAAAd,EAAKyC,OAAOE,IAAK9B,GACjBS,EAAAA,IAACV,EAAA,CAAkCC,MAAAA,CAAA,EAAfA,EAAMQ,OAAuB,CACjD,CAAA,CACF,EAEAC,EAAAA,IAAC,IAAA,CAAEL,UAAU,wBAAwBH,SAAA,wCAAA,CAErC,CAAA,CAAA,CAEF,CAAA,CAAA,CACD,QACC8B,EAAA,CAAyBC,aAAc,IAAI7C,EAAK+B,SAAS,EAAA,CAAI,EAC9DT,EAAAA,IAAC,MAAA,CAAIL,UAAU,+CACdH,SAAAQ,EAAAA,IAACwB,EAAA,CACAC,KAAM/C,EAAKgC,aAAae,KACxBC,aAAchD,EAAKgC,aAAagB,aACjC,CAAA,CACD,CAAA,CAAA,CACD,CAEF,CAAA,EAEOC,EAAAC,EAAA,UAAyB,CAC/B,aAAQC,EAAA,EAAqB,CAC9B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{w as l,a as m,L as n}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{E as a}from"./index-CEVyDj51.js";import{E as c}from"./epic-video-CC0372g5.js";import{G as p}from"./error-boundary-DxHqAEHX.js";import{E as d}from"./launch-editor-D2exGfVu.js";import{M as x}from"./mdx-vy-1-0a3.js";import{c as f}from"./misc-W4055b-0.js";import{P as h,u}from"./progress-BcA4i0iU.js";import"./index-CqIc3cxq.js";import"@epic-web/workshop-utils/offline-video-utils";import"./use-event-source-BuD4_2SF.js";import"./index-DzdDahau.js";import"./index-vDCSPjrM.js";import"./index-CdzVFL-Z.js";import"./tooltip-Tlsyx2YO.js";import"./root-loader-BOzEMapJ.js";import"./pe-CIZUOJMr.js";import"./schemas-Uj5SZtvt.js";import"./online-DiNLkgTC.js";import"./loading-CDNzW5oO.js";import"./format-CZ5n8p10.js";import"./user-BsPobzjB.js";import"./workshop-config-Zfc8zU0x.js";import"./preload-helper-BXl3LOEh.js";import"./progress-bar-DpWhcyhC.js";function b({index:o,exercise:r}){const s=u(r.exerciseNumber);return e.jsx("li",{children:e.jsxs(n,{className:f("hover:bg-muted/60 relative flex items-center gap-4 px-4 py-3 text-lg font-semibold transition after:absolute after:right-10 after:-translate-x-2 after:opacity-0 after:transition after:content-['→'] hover:after:translate-x-0 hover:after:opacity-100",s),to:`${r.exerciseNumber.toString().padStart(2,"0")}`,"data-keyboard-action":o===0?"g+n":void 0,children:[e.jsx("span",{className:"text-xs font-normal tabular-nums opacity-50",children:r.exerciseNumber}),e.jsx("span",{children:r.title})]})},r.exerciseNumber)}const j={h1:()=>null},A=l(function({loaderData:r}){const s=e.jsxs("ul",{className:"divide-border dark:divide-border/50 flex flex-col divide-y",children:[e.jsx("strong",{className:"px-10 pb-3 font-mono text-xs uppercase",children:"Exercises"}),r.exercises.map((t,i)=>e.jsx(b,{index:i,exercise:t},t.exerciseNumber))]});return e.jsxs("main",{className:"relative flex h-full w-full max-w-5xl flex-col justify-between border-r md:w-3/4 xl:w-2/3",children:[e.jsxs("article",{id:r.articleId,className:"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar flex w-full flex-1 flex-col gap-12 overflow-y-scroll px-3 py-4 pt-6 md:px-10 md:py-12 md:pt-16",children:[e.jsx("div",{children:e.jsx("h1",{className:"px-10 text-[clamp(3rem,6vw,7.5rem)] leading-none font-extrabold",children:r.title})}),e.jsxs("div",{className:"w-full max-w-none scroll-pt-6 border-t px-3 pt-3 md:px-10 md:pt-8",children:[e.jsx("h2",{className:"pb-5 font-mono text-xs font-semibold uppercase",children:"Intro"}),r.workshopReadme.compiled.status==="success"&&r.workshopReadme.compiled.code?e.jsx(c,{epicVideoInfosPromise:r.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(x,{code:r.workshopReadme.compiled.code,components:j})})}):r.workshopReadme.compiled.status==="error"?e.jsxs("div",{className:"text-foreground-destructive",children:["There was an error:",e.jsx("pre",{children:r.workshopReadme.compiled.error})]}):"No instructions yet..."]}),e.jsx("div",{className:"pt-10 pb-5",children:r.workshopReadme.compiled.status==="success"&&r.workshopReadme.compiled.code&&r.workshopReadme.compiled.code.length>500?s:null})]}),e.jsx(a,{elementQuery:`#${r.articleId}`}),e.jsx(h,{type:"workshop-instructions",className:"h-14 border-t px-6"}),e.jsx("div",{className:"@container flex h-16 justify-center border-t",children:e.jsx(d,{file:r.workshopReadme.file,relativePath:r.workshopReadme.relativePath})})]})}),J=m(function(){return e.jsx(p,{})});export{J as ErrorBoundary,A as default};
|
|
2
|
+
//# sourceMappingURL=index-CfU0fdf7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-CfU0fdf7.js","sources":["../../../app/routes/_app+/index.tsx"],"sourcesContent":["import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetExercises,\n\tgetWorkshopInstructions,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport { getEpicVideoInfos } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n\ttime,\n} from '@epic-web/workshop-utils/timing.server'\nimport slugify from '@sindresorhus/slugify'\nimport { data, type HeadersFunction, Link } from 'react-router'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { EditFileOnGitHub } from '#app/routes/launch-editor.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn } from '#app/utils/misc.tsx'\nimport { ProgressToggle, useExerciseProgressClassName } from '../progress.tsx'\nimport { type Route } from './+types/index.tsx'\n\nexport async function loader({ request }: Route.LoaderArgs) {\n\tconst timings = makeTimings('indexLoader')\n\tconst { title } = getWorkshopConfig()\n\tconst [exercises, workshopReadme] = await Promise.all([\n\t\ttime(() => getExercises({ request, timings }), {\n\t\t\ttimings,\n\t\t\ttype: 'getExercises',\n\t\t\tdesc: 'getExercises in index',\n\t\t}),\n\t\ttime(() => getWorkshopInstructions({ request }), {\n\t\t\ttimings,\n\t\t\ttype: 'compileMdx',\n\t\t\tdesc: 'compileMdx in index',\n\t\t}),\n\t])\n\n\treturn data(\n\t\t{\n\t\t\tarticleId: `workshop-${slugify(title)}-instructions`,\n\t\t\ttitle:\n\t\t\t\tworkshopReadme.compiled.status === 'success'\n\t\t\t\t\t? workshopReadme.compiled.title\n\t\t\t\t\t: title,\n\t\t\texercises: exercises.map((e) => ({\n\t\t\t\texerciseNumber: e.exerciseNumber,\n\t\t\t\ttitle: e.title,\n\t\t\t})),\n\t\t\tworkshopReadme,\n\t\t\tepicVideoInfosPromise:\n\t\t\t\tworkshopReadme.compiled.status === 'success'\n\t\t\t\t\t? getEpicVideoInfos(workshopReadme.compiled.epicVideoEmbeds, {\n\t\t\t\t\t\t\trequest,\n\t\t\t\t\t\t})\n\t\t\t\t\t: null,\n\t\t},\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nfunction ExerciseListItem({\n\tindex,\n\texercise,\n}: {\n\tindex: number\n\texercise: Awaited<Route.ComponentProps['loaderData']>['exercises'][number]\n}) {\n\tconst progressClassName = useExerciseProgressClassName(\n\t\texercise.exerciseNumber,\n\t)\n\treturn (\n\t\t<li key={exercise.exerciseNumber}>\n\t\t\t<Link\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"hover:bg-muted/60 relative flex items-center gap-4 px-4 py-3 text-lg font-semibold transition after:absolute after:right-10 after:-translate-x-2 after:opacity-0 after:transition after:content-['→'] hover:after:translate-x-0 hover:after:opacity-100\",\n\t\t\t\t\tprogressClassName,\n\t\t\t\t)}\n\t\t\t\tto={`${exercise.exerciseNumber.toString().padStart(2, '0')}`}\n\t\t\t\tdata-keyboard-action={index === 0 ? 'g+n' : undefined}\n\t\t\t>\n\t\t\t\t<span className=\"text-xs font-normal tabular-nums opacity-50\">\n\t\t\t\t\t{exercise.exerciseNumber}\n\t\t\t\t</span>\n\t\t\t\t<span>{exercise.title}</span>\n\t\t\t</Link>\n\t\t</li>\n\t)\n}\n\nconst mdxComponents = { h1: () => null }\n\nexport default function Index({ loaderData: data }: Route.ComponentProps) {\n\tconst exerciseLinks = (\n\t\t<ul className=\"divide-border dark:divide-border/50 flex flex-col divide-y\">\n\t\t\t<strong className=\"px-10 pb-3 font-mono text-xs uppercase\">\n\t\t\t\tExercises\n\t\t\t</strong>\n\t\t\t{data.exercises.map((exercise, index) => (\n\t\t\t\t<ExerciseListItem\n\t\t\t\t\tkey={exercise.exerciseNumber}\n\t\t\t\t\tindex={index}\n\t\t\t\t\texercise={exercise}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</ul>\n\t)\n\treturn (\n\t\t<main className=\"relative flex h-full w-full max-w-5xl flex-col justify-between border-r md:w-3/4 xl:w-2/3\">\n\t\t\t<article\n\t\t\t\tid={data.articleId}\n\t\t\t\tclassName=\"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar flex w-full flex-1 flex-col gap-12 overflow-y-scroll px-3 py-4 pt-6 md:px-10 md:py-12 md:pt-16\"\n\t\t\t>\n\t\t\t\t<div>\n\t\t\t\t\t<h1 className=\"px-10 text-[clamp(3rem,6vw,7.5rem)] leading-none font-extrabold\">\n\t\t\t\t\t\t{data.title}\n\t\t\t\t\t</h1>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"w-full max-w-none scroll-pt-6 border-t px-3 pt-3 md:px-10 md:pt-8\">\n\t\t\t\t\t<h2 className=\"pb-5 font-mono text-xs font-semibold uppercase\">\n\t\t\t\t\t\tIntro\n\t\t\t\t\t</h2>\n\t\t\t\t\t{data.workshopReadme.compiled.status === 'success' &&\n\t\t\t\t\tdata.workshopReadme.compiled.code ? (\n\t\t\t\t\t\t<EpicVideoInfoProvider\n\t\t\t\t\t\t\tepicVideoInfosPromise={data.epicVideoInfosPromise}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t\t\t\t<Mdx\n\t\t\t\t\t\t\t\t\tcode={data.workshopReadme.compiled.code}\n\t\t\t\t\t\t\t\t\tcomponents={mdxComponents}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t\t) : data.workshopReadme.compiled.status === 'error' ? (\n\t\t\t\t\t\t<div className=\"text-foreground-destructive\">\n\t\t\t\t\t\t\tThere was an error:\n\t\t\t\t\t\t\t<pre>{data.workshopReadme.compiled.error}</pre>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t'No instructions yet...'\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"pt-10 pb-5\">\n\t\t\t\t\t{data.workshopReadme.compiled.status === 'success' &&\n\t\t\t\t\tdata.workshopReadme.compiled.code &&\n\t\t\t\t\tdata.workshopReadme.compiled.code.length > 500\n\t\t\t\t\t\t? exerciseLinks\n\t\t\t\t\t\t: null}\n\t\t\t\t</div>\n\t\t\t</article>\n\t\t\t<ElementScrollRestoration elementQuery={`#${data.articleId}`} />\n\t\t\t<ProgressToggle\n\t\t\t\ttype=\"workshop-instructions\"\n\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t/>\n\t\t\t<div className=\"@container flex h-16 justify-center border-t\">\n\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\tfile={data.workshopReadme.file}\n\t\t\t\t\trelativePath={data.workshopReadme.relativePath}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn <GeneralErrorBoundary />\n}\n"],"names":["ExerciseListItem","index","exercise","progressClassName","useExerciseProgressClassName","exerciseNumber","children","jsxs","Link","className","cn","to","toString","padStart","jsx","title","mdxComponents","h1","_UNSAFE_withComponentProps","loaderData","data","exerciseLinks","exercises","map","id","articleId","workshopReadme","compiled","status","code","EpicVideoInfoProvider","epicVideoInfosPromise","Mdx","components","error","length","ElementScrollRestoration","elementQuery","ProgressToggle","type","EditFileOnGitHub","file","relativePath","ErrorBoundary","_UNSAFE_withErrorBoundaryProps","GeneralErrorBoundary"],"mappings":"i8BA0EA,SAASA,EAAiB,CACzBC,MAAAA,EACAC,SAAAA,CACD,EAGG,CACF,MAAMC,EAAoBC,EACzBF,EAASG,cACV,EACA,aACE,KAAA,CACAC,SAAAC,EAAAA,KAACC,EAAA,CACAC,UAAWC,EACV,0PACAP,CACD,EACAQ,GAAI,GAAGT,EAASG,eAAeO,WAAWC,SAAS,EAAG,GAAG,CAAC,GAC1D,uBAAsBZ,IAAU,EAAI,MAAQ,OAE5CK,SAAA,CAAAQ,EAAAA,IAAC,OAAA,CAAKL,UAAU,8CACdH,SAAAJ,EAASG,cAAA,CACX,EACAS,EAAAA,IAAC,OAAA,CAAMR,SAAAJ,EAASa,KAAA,CAAM,CAAA,EACvB,CAAA,EAbQb,EAASG,cAclB,CAEF,CAEA,MAAMW,EAAgB,CAAEC,GAAIA,IAAM,IAAK,EAEvChB,EAAAiB,EAAA,SAA8B,CAAEC,WAAYC,CAAK,EAAyB,CACzE,MAAMC,EACLd,EAAAA,KAAC,KAAA,CAAGE,UAAU,6DACbH,SAAA,CAAAQ,EAAAA,IAAC,SAAA,CAAOL,UAAU,yCAAyCH,SAAA,WAAA,CAE3D,EACCc,EAAKE,UAAUC,IAAI,CAACrB,EAAUD,IAC9Ba,EAAAA,IAACd,EAAA,CAEAC,MAAAA,EACAC,SAAAA,CAAA,EAFKA,EAASG,cAGf,CACA,CAAA,CAAA,CACF,EAED,OACCE,EAAAA,KAAC,OAAA,CAAKE,UAAU,4FACfH,SAAA,CAAAC,EAAAA,KAAC,UAAA,CACAiB,GAAIJ,EAAKK,UACThB,UAAU,8JAEVH,SAAA,CAAAQ,EAAAA,IAAC,MAAA,CACAR,eAAC,KAAA,CAAGG,UAAU,kEACZH,SAAAc,EAAKL,MACP,CAAA,CACD,EACAR,EAAAA,KAAC,MAAA,CAAIE,UAAU,oEACdH,SAAA,CAAAQ,EAAAA,IAAC,KAAA,CAAGL,UAAU,iDAAiDH,SAAA,QAE/D,EACCc,EAAKM,eAAeC,SAASC,SAAW,WACzCR,EAAKM,eAAeC,SAASE,KAC5Bf,EAAAA,IAACgB,EAAA,CACAC,sBAAuBX,EAAKW,sBAE5BzB,SAAAQ,EAAAA,IAAC,MAAA,CAAIL,UAAU,sCACdH,SAAAQ,EAAAA,IAACkB,EAAA,CACAH,KAAMT,EAAKM,eAAeC,SAASE,KACnCI,WAAYjB,EACb,EACD,CAAA,CACD,EACGI,EAAKM,eAAeC,SAASC,SAAW,QAC3CrB,EAAAA,KAAC,MAAA,CAAIE,UAAU,8BAA8BH,SAAA,CAAA,4BAE3C,MAAA,CAAKA,SAAAc,EAAKM,eAAeC,SAASO,KAAA,CAAM,CAAA,EAC1C,EAEA,wBAAA,CAAA,CAEF,EACApB,EAAAA,IAAC,OAAIL,UAAU,aACbH,SAAAc,EAAKM,eAAeC,SAASC,SAAW,WACzCR,EAAKM,eAAeC,SAASE,MAC7BT,EAAKM,eAAeC,SAASE,KAAKM,OAAS,IACxCd,EACA,IAAA,CACJ,CAAA,CAAA,CACD,QACCe,EAAA,CAAyBC,aAAc,IAAIjB,EAAKK,SAAS,EAAA,CAAI,EAC9DX,EAAAA,IAACwB,EAAA,CACAC,KAAK,wBACL9B,UAAU,oBAAA,CACX,EACAK,EAAAA,IAAC,MAAA,CAAIL,UAAU,+CACdH,SAAAQ,EAAAA,IAAC0B,EAAA,CACAC,KAAMrB,EAAKM,eAAee,KAC1BC,aAActB,EAAKM,eAAegB,aACnC,CAAA,CACD,CAAA,CAAA,CACD,CAEF,CAAA,EAEOC,EAAAC,EAAA,UAAyB,CAC/B,aAAQC,EAAA,EAAqB,CAC9B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{w as j,a as E,c as A,d as C,e as N}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as r}from"./jsx-runtime-C5WNSv3b.js";import{g as T,R as H,P as U,C as t,a as b,D as B}from"./playground-DmEAkxG1.js";import{U as I}from"./diff-Dng5ItOr.js";import{G as R}from"./error-boundary-DxHqAEHX.js";import{u as S}from"./workshop-config-Zfc8zU0x.js";import{u as O}from"./misc-W4055b-0.js";import{P as a}from"./preview-fhmjENlm.js";import{T as k}from"./tests-CZ2AhDKA.js";import"./index-CqIc3cxq.js";import"./loading-CDNzW5oO.js";import"./index-CdzVFL-Z.js";import"./tooltip-Tlsyx2YO.js";import"./index-vDCSPjrM.js";import"./root-loader-BOzEMapJ.js";import"./pe-CIZUOJMr.js";import"./schemas-Uj5SZtvt.js";import"./discord-BJkw0IrB.js";import"./user-BsPobzjB.js";import"./online-DiNLkgTC.js";import"./index-CJDOQ1bl.js";import"./index-ynYvVAOK.js";import"./status-indicator-C6DiLYL5.js";import"./index-DzdDahau.js";import"./set-playground-BSGwH9dH.js";import"./button-Cd-ekki5.js";import"./onboarding-indicator-B-XR90_G.js";import"./progress-bar-DpWhcyhC.js";import"./dialog-CzO65Z5w.js";import"./playground-window-x2mQ5o1O.js";import"./accordion-CQ7oujC6.js";import"./mdx-vy-1-0a3.js";import"./epic-video-CC0372g5.js";import"@epic-web/workshop-utils/offline-video-utils";import"./use-event-source-BuD4_2SF.js";import"./format-CZ5n8p10.js";import"./preload-helper-BXl3LOEh.js";import"./launch-editor-D2exGfVu.js";import"./revalidation-ws-BJWJviUX.js";const l=["playground","problem","solution","tests","diff","chat"],L=n=>!!(n&&l.includes(n)),Es=j(function({loaderData:e}){const{inBrowserBrowserRef:p}=A(),d=S(),[u]=C(),m=u.get("preview"),h=O(),x=N();function f(s){if(s==="tests")return ENV.EPICSHOP_DEPLOYED||!e.playground||e.playground.test.type==="none";if(s==="problem"||s==="solution"){if(e[s]?.dev.type==="none")return!0;if(ENV.EPICSHOP_DEPLOYED){const i=e[s]?.dev.type;return i!=="browser"&&i!=="export"&&!e[s]?.stackBlitzUrl}}return s==="playground"&&ENV.EPICSHOP_DEPLOYED?!0:s==="chat"?!d.product.discordChannelId:!1}function w(s){if(s==="tests"){if(!e.playground)return null;const{isTestRunning:i,testExitCode:o}=e.playground;return i?"running":o===0?"passed":o!==null&&o!==0?"failed":null}return(s==="problem"||s==="solution"||s==="playground")&&(s==="playground"?e.playground:e[s])?.isRunning?"running":null}const y=L(m)?m:l.find(s=>!f(s)),c=`/diff?${new URLSearchParams({app1:e.problem?.name??"",app2:e.solution?.name??""})}`;function g(s){s.altKey&&!s.ctrlKey&&!s.shiftKey&&!s.metaKey&&(s.preventDefault(),x(c))}const v=l.map(s=>{const i=f(s),o=w(s),P=s==="diff"&&h?c:`?${T(u,s,"playground")}`;return{id:s,label:s,hidden:i,status:o,to:P,onClick:s==="diff"?g:void 0}});return r.jsxs(H,{className:"relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden sm:col-span-1 sm:row-span-1",value:y,children:[r.jsx(U,{tabs:v}),r.jsxs("div",{className:"relative z-10 flex min-h-0 flex-1 flex-col overflow-hidden",children:[r.jsx(t,{value:"playground",className:"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start",forceMount:!0,children:r.jsx(b,{appInfo:e.playground,problemAppName:e.problem?.name,inBrowserBrowserRef:p,allApps:e.allApps,isUpToDate:e.playground?.isUpToDate??!1})}),r.jsx(t,{value:"problem",className:"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start",forceMount:!0,children:r.jsx(a,{appInfo:e.problem,inBrowserBrowserRef:p})}),r.jsx(t,{value:"solution",className:"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start",forceMount:!0,children:r.jsx(a,{appInfo:e.solution,inBrowserBrowserRef:p})}),r.jsx(t,{value:"tests",className:"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start overflow-hidden",children:r.jsx(k,{appInfo:e.playground,problemAppName:e.problem?.name,allApps:e.allApps,isUpToDate:e.playground?.isUpToDate??!1,userHasAccessPromise:e.userHasAccessPromise})}),r.jsx(t,{value:"diff",className:"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start",children:r.jsx(I,{diff:e.diff,allApps:e.allApps,userHasAccessPromise:e.userHasAccessPromise})}),r.jsx(t,{value:"chat",className:"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start",children:r.jsx(B,{discordPostsPromise:e.discordPostsPromise})})]})]})}),As=E(function(){return r.jsx(R,{statusHandlers:{404:()=>r.jsx("p",{children:"Sorry, we couldn't find an app here."})}})});export{As as ErrorBoundary,Es as default};
|
|
2
|
+
//# sourceMappingURL=index-Pxi8WjFA.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-BgExztV_.js","sources":["../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/index.tsx"],"sourcesContent":["import {\n\tgetAppByName,\n\tgetAppDisplayName,\n\tgetApps,\n\tgetExerciseApp,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getDiffCode } from '@epic-web/workshop-utils/diff.server'\nimport { userHasAccessToExerciseStep } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport * as Tabs from '@radix-ui/react-tabs'\nimport * as React from 'react'\nimport {\n\tuseNavigate,\n\tuseSearchParams,\n\tdata,\n\tredirect,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n\tuseOutletContext,\n} from 'react-router'\nimport { Diff } from '#app/components/diff.tsx'\nimport { DiscordChat } from '#app/components/discord-chat.tsx'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport {\n\tgetPreviewSearchParams,\n\tPreviewTabsList,\n} from '#app/components/preview-tabs.tsx'\nimport { useWorkshopConfig } from '#app/components/workshop-config.tsx'\nimport { fetchDiscordPosts } from '#app/utils/discord.server.ts'\nimport { useAltDown } from '#app/utils/misc.tsx'\nimport { type Route } from './+types/index.ts'\nimport { Playground } from './__shared/playground.tsx'\nimport { Preview } from './__shared/preview.tsx'\nimport { Tests } from './__shared/tests.tsx'\nimport { getAppRunningState, getTestState } from './__shared/utils.tsx'\n\nexport async function loader({ request, params }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('exerciseStepTypeIndexLoader')\n\tconst searchParams = new URL(request.url).searchParams\n\tconst cacheOptions = { request, timings }\n\n\tconst [exerciseStepApp, allAppsFull, problemApp, solutionApp] =\n\t\tawait Promise.all([\n\t\t\trequireExerciseApp(params, cacheOptions),\n\t\t\tgetApps(cacheOptions),\n\t\t\tgetExerciseApp({ ...params, type: 'problem' }, cacheOptions),\n\t\t\tgetExerciseApp({ ...params, type: 'solution' }, cacheOptions),\n\t\t])\n\n\tconst playgroundApp = allAppsFull.find(isPlaygroundApp)\n\tconst reqUrl = new URL(request.url)\n\n\tconst pathnameParam = reqUrl.searchParams.get('pathname')\n\tif (pathnameParam === '' || pathnameParam === '/') {\n\t\treqUrl.searchParams.delete('pathname')\n\t\tthrow redirect(reqUrl.toString())\n\t}\n\n\tconst app1Name = reqUrl.searchParams.get('app1')\n\tconst app2Name = reqUrl.searchParams.get('app2')\n\tconst app1 = app1Name\n\t\t? await getAppByName(app1Name)\n\t\t: playgroundApp || problemApp\n\tconst app2 = app2Name ? await getAppByName(app2Name) : solutionApp\n\n\tfunction getStepId(a: ExerciseStepApp) {\n\t\treturn (\n\t\t\ta.exerciseNumber * 1000 +\n\t\t\ta.stepNumber * 10 +\n\t\t\t(a.type === 'problem' ? 0 : 1)\n\t\t)\n\t}\n\n\tfunction getStepNameAndId(a: App) {\n\t\tif (isExerciseStepApp(a)) {\n\t\t\tconst exerciseNumberStr = String(a.exerciseNumber).padStart(2, '0')\n\t\t\tconst stepNumberStr = String(a.stepNumber).padStart(2, '0')\n\n\t\t\treturn {\n\t\t\t\tstepName: `${exerciseNumberStr}/${stepNumberStr}.${a.type}`,\n\t\t\t\tstepId: getStepId(a),\n\t\t\t}\n\t\t}\n\t\treturn { stepName: '', stepId: -1 }\n\t}\n\n\tconst allApps = allAppsFull\n\t\t.filter((a, i, ar) => ar.findIndex((b) => a.name === b.name) === i)\n\t\t.map((a) => ({\n\t\t\tdisplayName: getAppDisplayName(a, allAppsFull),\n\t\t\tname: a.name,\n\t\t\ttitle: a.title,\n\t\t\ttype: a.type,\n\t\t\t...getStepNameAndId(a),\n\t\t}))\n\n\tallApps.sort((a, b) => {\n\t\t// order them by their stepId\n\t\tif (a.stepId > 0 && b.stepId > 0) return a.stepId - b.stepId\n\n\t\t// non-step apps should come after step apps\n\t\tif (a.stepId > 0) return -1\n\t\tif (b.stepId > 0) return 1\n\n\t\treturn 0\n\t})\n\n\tasync function getDiffProp() {\n\t\tif (!app1 || !app2) {\n\t\t\treturn {\n\t\t\t\tapp1: app1?.name,\n\t\t\t\tapp2: app2?.name,\n\t\t\t\tdiffCode: null,\n\t\t\t}\n\t\t}\n\t\tconst diffCode = await getDiffCode(app1, app2, {\n\t\t\t...cacheOptions,\n\t\t\tforceFresh: searchParams.get('forceFresh') === 'diff',\n\t\t}).catch((e) => {\n\t\t\tconsole.error(e)\n\t\t\treturn null\n\t\t})\n\t\treturn {\n\t\t\tapp1: app1.name,\n\t\t\tapp2: app2.name,\n\t\t\tdiffCode,\n\t\t}\n\t}\n\n\treturn data(\n\t\t{\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\tallApps,\n\t\t\t// defer this promise so that we don't block the response from being sent\n\t\t\tdiscordPostsPromise: fetchDiscordPosts({ request }),\n\t\t\tuserHasAccessPromise: userHasAccessToExerciseStep({\n\t\t\t\texerciseNumber: Number(params.exerciseNumber),\n\t\t\t\tstepNumber: Number(params.stepNumber),\n\t\t\t\trequest,\n\t\t\t\ttimings,\n\t\t\t}),\n\t\t\tplayground: playgroundApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'playground',\n\t\t\t\t\t\tfullPath: playgroundApp.fullPath,\n\t\t\t\t\t\tdev: playgroundApp.dev,\n\t\t\t\t\t\ttest: playgroundApp.test,\n\t\t\t\t\t\ttitle: playgroundApp.title,\n\t\t\t\t\t\tname: playgroundApp.name,\n\t\t\t\t\t\tappName: playgroundApp.appName,\n\t\t\t\t\t\tisUpToDate: playgroundApp.isUpToDate,\n\t\t\t\t\t\tstackBlitzUrl: playgroundApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(playgroundApp)),\n\t\t\t\t\t\t...getTestState(playgroundApp),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tproblem: problemApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'problem',\n\t\t\t\t\t\tfullPath: problemApp.fullPath,\n\t\t\t\t\t\tdev: problemApp.dev,\n\t\t\t\t\t\ttest: problemApp.test,\n\t\t\t\t\t\ttitle: problemApp.title,\n\t\t\t\t\t\tname: problemApp.name,\n\t\t\t\t\t\tstackBlitzUrl: problemApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(problemApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tsolution: solutionApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'solution',\n\t\t\t\t\t\tfullPath: solutionApp.fullPath,\n\t\t\t\t\t\tdev: solutionApp.dev,\n\t\t\t\t\t\ttest: solutionApp.test,\n\t\t\t\t\t\ttitle: solutionApp.title,\n\t\t\t\t\t\tname: solutionApp.name,\n\t\t\t\t\t\tstackBlitzUrl: solutionApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(solutionApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tdiff: getDiffProp(),\n\t\t} as const,\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nconst tabs = [\n\t'playground',\n\t'problem',\n\t'solution',\n\t'tests',\n\t'diff',\n\t'chat',\n] as const\nconst isValidPreview = (s: string | null): s is (typeof tabs)[number] =>\n\tBoolean(s && tabs.includes(s as (typeof tabs)[number]))\n\nexport default function ExercisePartRoute({\n\tloaderData,\n}: Route.ComponentProps) {\n\tconst { inBrowserBrowserRef } = useOutletContext<{\n\t\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n\t}>()\n\tconst workshopConfig = useWorkshopConfig()\n\tconst [searchParams] = useSearchParams()\n\n\tconst preview = searchParams.get('preview')\n\n\tconst altDown = useAltDown()\n\tconst navigate = useNavigate()\n\n\tfunction shouldHideTab(tab: (typeof tabs)[number]) {\n\t\tif (tab === 'tests') {\n\t\t\treturn (\n\t\t\t\tENV.EPICSHOP_DEPLOYED ||\n\t\t\t\t!loaderData.playground ||\n\t\t\t\tloaderData.playground.test.type === 'none'\n\t\t\t)\n\t\t}\n\t\tif (tab === 'problem' || tab === 'solution') {\n\t\t\tif (loaderData[tab]?.dev.type === 'none') return true\n\t\t\tif (ENV.EPICSHOP_DEPLOYED) {\n\t\t\t\tconst devType = loaderData[tab]?.dev.type\n\t\t\t\treturn (\n\t\t\t\t\tdevType !== 'browser' &&\n\t\t\t\t\tdevType !== 'export' &&\n\t\t\t\t\t!loaderData[tab]?.stackBlitzUrl\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tif (tab === 'playground' && ENV.EPICSHOP_DEPLOYED) return true\n\n\t\tif (tab === 'chat') {\n\t\t\treturn !workshopConfig.product.discordChannelId\n\t\t}\n\t\treturn false\n\t}\n\n\tfunction getTabStatus(\n\t\ttab: (typeof tabs)[number],\n\t): 'running' | 'passed' | 'failed' | null {\n\t\tif (tab === 'tests') {\n\t\t\tif (!loaderData.playground) return null\n\t\t\tconst { isTestRunning, testExitCode } = loaderData.playground\n\t\t\tif (isTestRunning) return 'running'\n\t\t\tif (testExitCode === 0) return 'passed'\n\t\t\tif (testExitCode !== null && testExitCode !== 0) return 'failed'\n\t\t\treturn null\n\t\t}\n\t\tif (tab === 'problem' || tab === 'solution' || tab === 'playground') {\n\t\t\tconst appData =\n\t\t\t\ttab === 'playground' ? loaderData.playground : loaderData[tab]\n\t\t\tif (appData?.isRunning) return 'running'\n\t\t}\n\t\treturn null\n\t}\n\n\tconst activeTab = isValidPreview(preview)\n\t\t? preview\n\t\t: tabs.find((t) => !shouldHideTab(t))\n\n\t// when alt is held down, the diff tab should open to the full-page diff view\n\t// between the problem and solution (this is more for the instructor than the student)\n\tconst altDiffUrl = `/diff?${new URLSearchParams({\n\t\tapp1: loaderData.problem?.name ?? '',\n\t\tapp2: loaderData.solution?.name ?? '',\n\t})}`\n\n\tfunction handleDiffTabClick(event: React.MouseEvent<HTMLAnchorElement>) {\n\t\tif (event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) {\n\t\t\tevent.preventDefault()\n\t\t\tvoid navigate(altDiffUrl)\n\t\t}\n\t}\n\n\tconst previewTabs = tabs.map((tab) => {\n\t\tconst hidden = shouldHideTab(tab)\n\t\tconst status = getTabStatus(tab)\n\t\tconst to =\n\t\t\ttab === 'diff' && altDown\n\t\t\t\t? altDiffUrl\n\t\t\t\t: `?${getPreviewSearchParams(searchParams, tab, 'playground')}`\n\t\treturn {\n\t\t\tid: tab,\n\t\t\tlabel: tab,\n\t\t\thidden,\n\t\t\tstatus,\n\t\t\tto,\n\t\t\tonClick: tab === 'diff' ? handleDiffTabClick : undefined,\n\t\t}\n\t})\n\n\treturn (\n\t\t<Tabs.Root\n\t\t\tclassName=\"relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden sm:col-span-1 sm:row-span-1\"\n\t\t\tvalue={activeTab}\n\t\t\t// intentionally no onValueChange here because the Link will trigger the\n\t\t\t// change.\n\t\t>\n\t\t\t<PreviewTabsList tabs={previewTabs} />\n\t\t\t<div className=\"relative z-10 flex min-h-0 flex-1 flex-col overflow-hidden\">\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"playground\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Playground\n\t\t\t\t\t\tappInfo={loaderData.playground}\n\t\t\t\t\t\tproblemAppName={loaderData.problem?.name}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tisUpToDate={loaderData.playground?.isUpToDate ?? false}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"problem\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={loaderData.problem}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"solution\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={loaderData.solution}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"tests\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start overflow-hidden\"\n\t\t\t\t>\n\t\t\t\t\t<Tests\n\t\t\t\t\t\tappInfo={loaderData.playground}\n\t\t\t\t\t\tproblemAppName={loaderData.problem?.name}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tisUpToDate={loaderData.playground?.isUpToDate ?? false}\n\t\t\t\t\t\tuserHasAccessPromise={loaderData.userHasAccessPromise}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"diff\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t>\n\t\t\t\t\t<Diff\n\t\t\t\t\t\tdiff={loaderData.diff}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tuserHasAccessPromise={loaderData.userHasAccessPromise}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"chat\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t>\n\t\t\t\t\t<DiscordChat discordPostsPromise={loaderData.discordPostsPromise} />\n\t\t\t\t</Tabs.Content>\n\t\t\t</div>\n\t\t</Tabs.Root>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<GeneralErrorBoundary\n\t\t\tstatusHandlers={{\n\t\t\t\t404: () => <p>Sorry, we couldn't find an app here.</p>,\n\t\t\t}}\n\t\t/>\n\t)\n}\n"],"names":["tabs","isValidPreview","s","Boolean","includes","index","_UNSAFE_withComponentProps","loaderData","inBrowserBrowserRef","useOutletContext","workshopConfig","useWorkshopConfig","searchParams","useSearchParams","preview","get","altDown","useAltDown","navigate","useNavigate","shouldHideTab","tab","ENV","EPICSHOP_DEPLOYED","playground","test","type","dev","devType","stackBlitzUrl","product","discordChannelId","getTabStatus","isTestRunning","testExitCode","isRunning","activeTab","find","t","altDiffUrl","URLSearchParams","app1","problem","name","app2","solution","handleDiffTabClick","event","altKey","ctrlKey","shiftKey","metaKey","preventDefault","previewTabs","map","hidden","status","to","getPreviewSearchParams","id","label","onClick","jsxs","Tabs","className","value","children","jsx","PreviewTabsList","forceMount","Playground","appInfo","problemAppName","allApps","isUpToDate","Preview","Tests","userHasAccessPromise","Diff","diff","DiscordChat","discordPostsPromise","ErrorBoundary","_UNSAFE_withErrorBoundaryProps","GeneralErrorBoundary","statusHandlers"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index-Pxi8WjFA.js","sources":["../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/index.tsx"],"sourcesContent":["import {\n\tgetAppByName,\n\tgetAppDisplayName,\n\tgetApps,\n\tgetExerciseApp,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getDiffCode } from '@epic-web/workshop-utils/diff.server'\nimport { userHasAccessToExerciseStep } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport * as Tabs from '@radix-ui/react-tabs'\nimport * as React from 'react'\nimport {\n\tuseNavigate,\n\tuseSearchParams,\n\tdata,\n\tredirect,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n\tuseOutletContext,\n} from 'react-router'\nimport { Diff } from '#app/components/diff.tsx'\nimport { DiscordChat } from '#app/components/discord-chat.tsx'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport {\n\tgetPreviewSearchParams,\n\tPreviewTabsList,\n} from '#app/components/preview-tabs.tsx'\nimport { useWorkshopConfig } from '#app/components/workshop-config.tsx'\nimport { fetchDiscordPosts } from '#app/utils/discord.server.ts'\nimport { useAltDown } from '#app/utils/misc.tsx'\nimport { type Route } from './+types/index.ts'\nimport { Playground } from './__shared/playground.tsx'\nimport { Preview } from './__shared/preview.tsx'\nimport { Tests } from './__shared/tests.tsx'\nimport { getAppRunningState, getTestState } from './__shared/utils.tsx'\n\nexport async function loader({ request, params }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('exerciseStepTypeIndexLoader')\n\tconst searchParams = new URL(request.url).searchParams\n\tconst cacheOptions = { request, timings }\n\n\tconst [exerciseStepApp, allAppsFull, problemApp, solutionApp] =\n\t\tawait Promise.all([\n\t\t\trequireExerciseApp(params, cacheOptions),\n\t\t\tgetApps(cacheOptions),\n\t\t\tgetExerciseApp({ ...params, type: 'problem' }, cacheOptions),\n\t\t\tgetExerciseApp({ ...params, type: 'solution' }, cacheOptions),\n\t\t])\n\n\tconst playgroundApp = allAppsFull.find(isPlaygroundApp)\n\tconst reqUrl = new URL(request.url)\n\n\tconst pathnameParam = reqUrl.searchParams.get('pathname')\n\tif (pathnameParam === '' || pathnameParam === '/') {\n\t\treqUrl.searchParams.delete('pathname')\n\t\tthrow redirect(reqUrl.toString())\n\t}\n\n\tconst app1Name = reqUrl.searchParams.get('app1')\n\tconst app2Name = reqUrl.searchParams.get('app2')\n\tconst app1 = app1Name\n\t\t? await getAppByName(app1Name)\n\t\t: playgroundApp || problemApp\n\tconst app2 = app2Name ? await getAppByName(app2Name) : solutionApp\n\n\tfunction getStepId(a: ExerciseStepApp) {\n\t\treturn (\n\t\t\ta.exerciseNumber * 1000 +\n\t\t\ta.stepNumber * 10 +\n\t\t\t(a.type === 'problem' ? 0 : 1)\n\t\t)\n\t}\n\n\tfunction getStepNameAndId(a: App) {\n\t\tif (isExerciseStepApp(a)) {\n\t\t\tconst exerciseNumberStr = String(a.exerciseNumber).padStart(2, '0')\n\t\t\tconst stepNumberStr = String(a.stepNumber).padStart(2, '0')\n\n\t\t\treturn {\n\t\t\t\tstepName: `${exerciseNumberStr}/${stepNumberStr}.${a.type}`,\n\t\t\t\tstepId: getStepId(a),\n\t\t\t}\n\t\t}\n\t\treturn { stepName: '', stepId: -1 }\n\t}\n\n\tconst allApps = allAppsFull\n\t\t.filter((a, i, ar) => ar.findIndex((b) => a.name === b.name) === i)\n\t\t.map((a) => ({\n\t\t\tdisplayName: getAppDisplayName(a, allAppsFull),\n\t\t\tname: a.name,\n\t\t\ttitle: a.title,\n\t\t\ttype: a.type,\n\t\t\t...getStepNameAndId(a),\n\t\t}))\n\n\tallApps.sort((a, b) => {\n\t\t// order them by their stepId\n\t\tif (a.stepId > 0 && b.stepId > 0) return a.stepId - b.stepId\n\n\t\t// non-step apps should come after step apps\n\t\tif (a.stepId > 0) return -1\n\t\tif (b.stepId > 0) return 1\n\n\t\treturn 0\n\t})\n\n\tasync function getDiffProp() {\n\t\tif (!app1 || !app2) {\n\t\t\treturn {\n\t\t\t\tapp1: app1?.name,\n\t\t\t\tapp2: app2?.name,\n\t\t\t\tdiffCode: null,\n\t\t\t}\n\t\t}\n\t\tconst diffCode = await getDiffCode(app1, app2, {\n\t\t\t...cacheOptions,\n\t\t\tforceFresh: searchParams.get('forceFresh') === 'diff',\n\t\t}).catch((e) => {\n\t\t\tconsole.error(e)\n\t\t\treturn null\n\t\t})\n\t\treturn {\n\t\t\tapp1: app1.name,\n\t\t\tapp2: app2.name,\n\t\t\tdiffCode,\n\t\t}\n\t}\n\n\treturn data(\n\t\t{\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\tallApps,\n\t\t\t// defer this promise so that we don't block the response from being sent\n\t\t\tdiscordPostsPromise: fetchDiscordPosts({ request }),\n\t\t\tuserHasAccessPromise: userHasAccessToExerciseStep({\n\t\t\t\texerciseNumber: Number(params.exerciseNumber),\n\t\t\t\tstepNumber: Number(params.stepNumber),\n\t\t\t\trequest,\n\t\t\t\ttimings,\n\t\t\t}),\n\t\t\tplayground: playgroundApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'playground',\n\t\t\t\t\t\tfullPath: playgroundApp.fullPath,\n\t\t\t\t\t\tdev: playgroundApp.dev,\n\t\t\t\t\t\ttest: playgroundApp.test,\n\t\t\t\t\t\ttitle: playgroundApp.title,\n\t\t\t\t\t\tname: playgroundApp.name,\n\t\t\t\t\t\tappName: playgroundApp.appName,\n\t\t\t\t\t\tisUpToDate: playgroundApp.isUpToDate,\n\t\t\t\t\t\tstackBlitzUrl: playgroundApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(playgroundApp)),\n\t\t\t\t\t\t...getTestState(playgroundApp),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tproblem: problemApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'problem',\n\t\t\t\t\t\tfullPath: problemApp.fullPath,\n\t\t\t\t\t\tdev: problemApp.dev,\n\t\t\t\t\t\ttest: problemApp.test,\n\t\t\t\t\t\ttitle: problemApp.title,\n\t\t\t\t\t\tname: problemApp.name,\n\t\t\t\t\t\tstackBlitzUrl: problemApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(problemApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tsolution: solutionApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'solution',\n\t\t\t\t\t\tfullPath: solutionApp.fullPath,\n\t\t\t\t\t\tdev: solutionApp.dev,\n\t\t\t\t\t\ttest: solutionApp.test,\n\t\t\t\t\t\ttitle: solutionApp.title,\n\t\t\t\t\t\tname: solutionApp.name,\n\t\t\t\t\t\tstackBlitzUrl: solutionApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(solutionApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tdiff: getDiffProp(),\n\t\t} as const,\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nconst tabs = [\n\t'playground',\n\t'problem',\n\t'solution',\n\t'tests',\n\t'diff',\n\t'chat',\n] as const\nconst isValidPreview = (s: string | null): s is (typeof tabs)[number] =>\n\tBoolean(s && tabs.includes(s as (typeof tabs)[number]))\n\nexport default function ExercisePartRoute({\n\tloaderData,\n}: Route.ComponentProps) {\n\tconst { inBrowserBrowserRef } = useOutletContext<{\n\t\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n\t}>()\n\tconst workshopConfig = useWorkshopConfig()\n\tconst [searchParams] = useSearchParams()\n\n\tconst preview = searchParams.get('preview')\n\n\tconst altDown = useAltDown()\n\tconst navigate = useNavigate()\n\n\tfunction shouldHideTab(tab: (typeof tabs)[number]) {\n\t\tif (tab === 'tests') {\n\t\t\treturn (\n\t\t\t\tENV.EPICSHOP_DEPLOYED ||\n\t\t\t\t!loaderData.playground ||\n\t\t\t\tloaderData.playground.test.type === 'none'\n\t\t\t)\n\t\t}\n\t\tif (tab === 'problem' || tab === 'solution') {\n\t\t\tif (loaderData[tab]?.dev.type === 'none') return true\n\t\t\tif (ENV.EPICSHOP_DEPLOYED) {\n\t\t\t\tconst devType = loaderData[tab]?.dev.type\n\t\t\t\treturn (\n\t\t\t\t\tdevType !== 'browser' &&\n\t\t\t\t\tdevType !== 'export' &&\n\t\t\t\t\t!loaderData[tab]?.stackBlitzUrl\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tif (tab === 'playground' && ENV.EPICSHOP_DEPLOYED) return true\n\n\t\tif (tab === 'chat') {\n\t\t\treturn !workshopConfig.product.discordChannelId\n\t\t}\n\t\treturn false\n\t}\n\n\tfunction getTabStatus(\n\t\ttab: (typeof tabs)[number],\n\t): 'running' | 'passed' | 'failed' | null {\n\t\tif (tab === 'tests') {\n\t\t\tif (!loaderData.playground) return null\n\t\t\tconst { isTestRunning, testExitCode } = loaderData.playground\n\t\t\tif (isTestRunning) return 'running'\n\t\t\tif (testExitCode === 0) return 'passed'\n\t\t\tif (testExitCode !== null && testExitCode !== 0) return 'failed'\n\t\t\treturn null\n\t\t}\n\t\tif (tab === 'problem' || tab === 'solution' || tab === 'playground') {\n\t\t\tconst appData =\n\t\t\t\ttab === 'playground' ? loaderData.playground : loaderData[tab]\n\t\t\tif (appData?.isRunning) return 'running'\n\t\t}\n\t\treturn null\n\t}\n\n\tconst activeTab = isValidPreview(preview)\n\t\t? preview\n\t\t: tabs.find((t) => !shouldHideTab(t))\n\n\t// when alt is held down, the diff tab should open to the full-page diff view\n\t// between the problem and solution (this is more for the instructor than the student)\n\tconst altDiffUrl = `/diff?${new URLSearchParams({\n\t\tapp1: loaderData.problem?.name ?? '',\n\t\tapp2: loaderData.solution?.name ?? '',\n\t})}`\n\n\tfunction handleDiffTabClick(event: React.MouseEvent<HTMLAnchorElement>) {\n\t\tif (event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) {\n\t\t\tevent.preventDefault()\n\t\t\tvoid navigate(altDiffUrl)\n\t\t}\n\t}\n\n\tconst previewTabs = tabs.map((tab) => {\n\t\tconst hidden = shouldHideTab(tab)\n\t\tconst status = getTabStatus(tab)\n\t\tconst to =\n\t\t\ttab === 'diff' && altDown\n\t\t\t\t? altDiffUrl\n\t\t\t\t: `?${getPreviewSearchParams(searchParams, tab, 'playground')}`\n\t\treturn {\n\t\t\tid: tab,\n\t\t\tlabel: tab,\n\t\t\thidden,\n\t\t\tstatus,\n\t\t\tto,\n\t\t\tonClick: tab === 'diff' ? handleDiffTabClick : undefined,\n\t\t}\n\t})\n\n\treturn (\n\t\t<Tabs.Root\n\t\t\tclassName=\"relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden sm:col-span-1 sm:row-span-1\"\n\t\t\tvalue={activeTab}\n\t\t\t// intentionally no onValueChange here because the Link will trigger the\n\t\t\t// change.\n\t\t>\n\t\t\t<PreviewTabsList tabs={previewTabs} />\n\t\t\t<div className=\"relative z-10 flex min-h-0 flex-1 flex-col overflow-hidden\">\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"playground\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Playground\n\t\t\t\t\t\tappInfo={loaderData.playground}\n\t\t\t\t\t\tproblemAppName={loaderData.problem?.name}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tisUpToDate={loaderData.playground?.isUpToDate ?? false}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"problem\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={loaderData.problem}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"solution\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={loaderData.solution}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"tests\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start overflow-hidden\"\n\t\t\t\t>\n\t\t\t\t\t<Tests\n\t\t\t\t\t\tappInfo={loaderData.playground}\n\t\t\t\t\t\tproblemAppName={loaderData.problem?.name}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tisUpToDate={loaderData.playground?.isUpToDate ?? false}\n\t\t\t\t\t\tuserHasAccessPromise={loaderData.userHasAccessPromise}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"diff\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t>\n\t\t\t\t\t<Diff\n\t\t\t\t\t\tdiff={loaderData.diff}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tuserHasAccessPromise={loaderData.userHasAccessPromise}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"chat\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t>\n\t\t\t\t\t<DiscordChat discordPostsPromise={loaderData.discordPostsPromise} />\n\t\t\t\t</Tabs.Content>\n\t\t\t</div>\n\t\t</Tabs.Root>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<GeneralErrorBoundary\n\t\t\tstatusHandlers={{\n\t\t\t\t404: () => <p>Sorry, we couldn't find an app here.</p>,\n\t\t\t}}\n\t\t/>\n\t)\n}\n"],"names":["tabs","isValidPreview","s","Boolean","includes","index","_UNSAFE_withComponentProps","loaderData","inBrowserBrowserRef","useOutletContext","workshopConfig","useWorkshopConfig","searchParams","useSearchParams","preview","get","altDown","useAltDown","navigate","useNavigate","shouldHideTab","tab","ENV","EPICSHOP_DEPLOYED","playground","test","type","dev","devType","stackBlitzUrl","product","discordChannelId","getTabStatus","isTestRunning","testExitCode","isRunning","activeTab","find","t","altDiffUrl","URLSearchParams","app1","problem","name","app2","solution","handleDiffTabClick","event","altKey","ctrlKey","shiftKey","metaKey","preventDefault","previewTabs","map","hidden","status","to","getPreviewSearchParams","id","label","onClick","jsxs","Tabs","className","value","children","jsx","PreviewTabsList","forceMount","Playground","appInfo","problemAppName","allApps","isUpToDate","Preview","Tests","userHasAccessPromise","Diff","diff","DiscordChat","discordPostsPromise","ErrorBoundary","_UNSAFE_withErrorBoundaryProps","GeneralErrorBoundary","statusHandlers"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-DdbTov6T.js","imports":["/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CqIc3cxq.js","/assets/index-vDCSPjrM.js","/assets/chunk-FNSCYPCZ-BHgC5cdx.js","/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/preload-helper-BXl3LOEh.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-BwYDIUyI.js","imports":["/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CqIc3cxq.js","/assets/index-vDCSPjrM.js","/assets/chunk-FNSCYPCZ-BHgC5cdx.js","/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/preload-helper-BXl3LOEh.js","/assets/misc-W4055b-0.js","/assets/client-only-BeMV-Wuv.js","/assets/error-boundary-DxHqAEHX.js","/assets/dialog-CzO65Z5w.js","/assets/progress-bar-DpWhcyhC.js","/assets/index-DzdDahau.js","/assets/tooltip-Tlsyx2YO.js","/assets/schemas-Uj5SZtvt.js","/assets/index-CdzVFL-Z.js","/assets/presence-VCvV2mg7.js","/assets/seo-t5J-DRxw.js","/assets/pe-CIZUOJMr.js","/assets/index-ynYvVAOK.js","/assets/root-loader-BOzEMapJ.js","/assets/online-DiNLkgTC.js","/assets/coerce-CkHW0SMv.js"],"css":[]},"routes/$":{"id":"routes/$","parentId":"root","path":"*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/_-C4AWl_1u.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/error-boundary-DxHqAEHX.js","/assets/misc-W4055b-0.js","/assets/index-CqIc3cxq.js","/assets/preload-helper-BXl3LOEh.js"],"css":[]},"routes/_app+/_layout":{"id":"routes/_app+/_layout","parentId":"root","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/_layout-C9vSX5Ti.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/misc-W4055b-0.js","/assets/index-CqIc3cxq.js","/assets/pe-CIZUOJMr.js","/assets/onboarding-indicator-B-XR90_G.js","/assets/product-CvyMpYD_.js","/assets/revalidation-ws-BJWJviUX.js","/assets/status-indicator-C6DiLYL5.js","/assets/dialog-CzO65Z5w.js","/assets/index-CmflCPTU.js","/assets/tooltip-Tlsyx2YO.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js","/assets/online-DiNLkgTC.js","/assets/presence-VCvV2mg7.js","/assets/root-loader-BOzEMapJ.js","/assets/progress-BcA4i0iU.js","/assets/index-CdzVFL-Z.js","/assets/schemas-Uj5SZtvt.js","/assets/index-ynYvVAOK.js","/assets/index-vDCSPjrM.js","/assets/coerce-CkHW0SMv.js"],"css":[]},"routes/_app+/account":{"id":"routes/_app+/account","parentId":"routes/_app+/_layout","path":"account","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/account-C96cpeZR.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/button-Cd-ekki5.js","/assets/misc-W4055b-0.js","/assets/onboarding-indicator-B-XR90_G.js","/assets/tooltip-Tlsyx2YO.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js","/assets/index-CqIc3cxq.js","/assets/root-loader-BOzEMapJ.js","/assets/index-vDCSPjrM.js"],"css":[]},"routes/_app+/app.$appName+/$":{"id":"routes/_app+/app.$appName+/$","parentId":"routes/_app+/_layout","path":"app/:appName/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/api.$":{"id":"routes/_app+/app.$appName+/api.$","parentId":"routes/_app+/_layout","path":"app/:appName/api/*","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/epic_ws[.js]":{"id":"routes/_app+/app.$appName+/epic_ws[.js]","parentId":"routes/_app+/_layout","path":"app/:appName/epic_ws.js","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/epic_ws_.js_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/index":{"id":"routes/_app+/app.$appName+/index","parentId":"routes/_app+/_layout","path":"app/:appName","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/index-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/test.$testName":{"id":"routes/_app+/app.$appName+/test.$testName","parentId":"routes/_app+/_layout","path":"app/:appName/test/:testName","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/test._testName-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/test.epic_ws[.js]":{"id":"routes/_app+/app.$appName+/test.epic_ws[.js]","parentId":"routes/_app+/_layout","path":"app/:appName/test/epic_ws.js","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/test.epic_ws_.js_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.epic_ws[.js]":{"id":"routes/_app+/app.epic_ws[.js]","parentId":"routes/_app+/_layout","path":"app/epic_ws.js","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/app.epic_ws_.js_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/discord":{"id":"routes/_app+/discord","parentId":"routes/_app+/_layout","path":"discord","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/discord-r3m19sUM.js","imports":["/assets/discord-BJkw0IrB.js","/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/index-CqIc3cxq.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/misc-W4055b-0.js","/assets/user-BsPobzjB.js","/assets/root-loader-BOzEMapJ.js","/assets/workshop-config-Zfc8zU0x.js"],"css":[]},"routes/_app+/exercise+/_layout":{"id":"routes/_app+/exercise+/_layout","parentId":"routes/_app+/_layout","path":"exercise","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/_layout-BvtJxESE.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CqIc3cxq.js"],"css":[]},"routes/_app+/exercise+/$exerciseNumber":{"id":"routes/_app+/exercise+/$exerciseNumber","parentId":"routes/_app+/exercise+/_layout","path":":exerciseNumber","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/_exerciseNumber-jokuvO2V.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CEVyDj51.js","/assets/epic-video-CC0372g5.js","/assets/error-boundary-DxHqAEHX.js","/assets/revalidation-ws-BJWJviUX.js","/assets/launch-editor-D2exGfVu.js","/assets/progress-BcA4i0iU.js","/assets/mdx-vy-1-0a3.js","/assets/root-loader-BOzEMapJ.js","/assets/seo-t5J-DRxw.js","/assets/error-boundary-BDqWjIFP.js","/assets/index-CqIc3cxq.js","/assets/use-event-source-BuD4_2SF.js","/assets/index-DzdDahau.js","/assets/index-vDCSPjrM.js","/assets/index-CdzVFL-Z.js","/assets/misc-W4055b-0.js","/assets/tooltip-Tlsyx2YO.js","/assets/pe-CIZUOJMr.js","/assets/schemas-Uj5SZtvt.js","/assets/online-DiNLkgTC.js","/assets/loading-CDNzW5oO.js","/assets/format-CZ5n8p10.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js","/assets/preload-helper-BXl3LOEh.js","/assets/progress-bar-DpWhcyhC.js","/assets/chunk-FNSCYPCZ-BHgC5cdx.js","/assets/coerce-CkHW0SMv.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout","parentId":"routes/_app+/exercise+/_layout","path":":exerciseNumber/:stepNumber/:type","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/_layout-_Aw6qzZC.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CEVyDj51.js","/assets/index-CqIc3cxq.js","/assets/error-boundary-DxHqAEHX.js","/assets/nav-chevrons-Dk4GtZwQ.js","/assets/revalidation-ws-BJWJviUX.js","/assets/launch-editor-D2exGfVu.js","/assets/progress-BcA4i0iU.js","/assets/set-playground-BSGwH9dH.js","/assets/misc-W4055b-0.js","/assets/root-loader-BOzEMapJ.js","/assets/seo-t5J-DRxw.js","/assets/split-layout-DnRER1bP.js","/assets/error-boundary-BDqWjIFP.js","/assets/epic-video-CC0372g5.js","/assets/tooltip-Tlsyx2YO.js","/assets/mdx-vy-1-0a3.js","/assets/index-CmflCPTU.js","/assets/onboarding-indicator-B-XR90_G.js","/assets/preload-helper-BXl3LOEh.js","/assets/schemas-Uj5SZtvt.js","/assets/progress-bar-DpWhcyhC.js","/assets/pe-CIZUOJMr.js","/assets/index-CJDOQ1bl.js","/assets/index-vDCSPjrM.js","/assets/index-ynYvVAOK.js","/assets/button-Cd-ekki5.js","/assets/dialog-CzO65Z5w.js","/assets/chunk-FNSCYPCZ-BHgC5cdx.js","/assets/coerce-CkHW0SMv.js","/assets/use-event-source-BuD4_2SF.js","/assets/index-DzdDahau.js","/assets/index-CdzVFL-Z.js","/assets/online-DiNLkgTC.js","/assets/loading-CDNzW5oO.js","/assets/format-CZ5n8p10.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/app":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/app","parentId":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout","path":"app","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/app-CJniokic.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CqIc3cxq.js","/assets/preview-fhmjENlm.js","/assets/misc-W4055b-0.js","/assets/button-Cd-ekki5.js","/assets/loading-CDNzW5oO.js","/assets/index-CdzVFL-Z.js","/assets/tooltip-Tlsyx2YO.js","/assets/index-vDCSPjrM.js","/assets/root-loader-BOzEMapJ.js","/assets/pe-CIZUOJMr.js","/assets/schemas-Uj5SZtvt.js","/assets/progress-bar-DpWhcyhC.js"],"css":[]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/index":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/index","parentId":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/index-Pxi8WjFA.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/playground-DmEAkxG1.js","/assets/diff-Dng5ItOr.js","/assets/error-boundary-DxHqAEHX.js","/assets/workshop-config-Zfc8zU0x.js","/assets/misc-W4055b-0.js","/assets/preview-fhmjENlm.js","/assets/tests-CZ2AhDKA.js","/assets/index-CqIc3cxq.js","/assets/loading-CDNzW5oO.js","/assets/index-CdzVFL-Z.js","/assets/tooltip-Tlsyx2YO.js","/assets/index-vDCSPjrM.js","/assets/root-loader-BOzEMapJ.js","/assets/pe-CIZUOJMr.js","/assets/schemas-Uj5SZtvt.js","/assets/discord-BJkw0IrB.js","/assets/user-BsPobzjB.js","/assets/online-DiNLkgTC.js","/assets/index-CJDOQ1bl.js","/assets/index-ynYvVAOK.js","/assets/status-indicator-C6DiLYL5.js","/assets/index-DzdDahau.js","/assets/set-playground-BSGwH9dH.js","/assets/button-Cd-ekki5.js","/assets/onboarding-indicator-B-XR90_G.js","/assets/progress-bar-DpWhcyhC.js","/assets/dialog-CzO65Z5w.js","/assets/playground-window-x2mQ5o1O.js","/assets/accordion-CQ7oujC6.js","/assets/mdx-vy-1-0a3.js","/assets/epic-video-CC0372g5.js","/assets/use-event-source-BuD4_2SF.js","/assets/format-CZ5n8p10.js","/assets/preload-helper-BXl3LOEh.js","/assets/launch-editor-D2exGfVu.js","/assets/revalidation-ws-BJWJviUX.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/test":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/test","parentId":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout","path":"test","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/test-Ciw2aKZE.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/tests-CZ2AhDKA.js","/assets/index-CqIc3cxq.js","/assets/accordion-CQ7oujC6.js","/assets/tooltip-Tlsyx2YO.js","/assets/index-vDCSPjrM.js","/assets/misc-W4055b-0.js","/assets/index-CJDOQ1bl.js","/assets/index-ynYvVAOK.js","/assets/epic-video-CC0372g5.js","/assets/use-event-source-BuD4_2SF.js","/assets/index-DzdDahau.js","/assets/index-CdzVFL-Z.js","/assets/root-loader-BOzEMapJ.js","/assets/pe-CIZUOJMr.js","/assets/schemas-Uj5SZtvt.js","/assets/online-DiNLkgTC.js","/assets/loading-CDNzW5oO.js","/assets/format-CZ5n8p10.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js","/assets/playground-window-x2mQ5o1O.js","/assets/set-playground-BSGwH9dH.js","/assets/button-Cd-ekki5.js","/assets/onboarding-indicator-B-XR90_G.js","/assets/progress-bar-DpWhcyhC.js","/assets/dialog-CzO65Z5w.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.index":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.index","parentId":"routes/_app+/exercise+/_layout","path":":exerciseNumber/:stepNumber","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/_exerciseNumber_._stepNumber.index-BPqMtmN8.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/error-boundary-DxHqAEHX.js","/assets/error-boundary-BDqWjIFP.js","/assets/index-CqIc3cxq.js","/assets/preload-helper-BXl3LOEh.js","/assets/misc-W4055b-0.js","/assets/chunk-FNSCYPCZ-BHgC5cdx.js","/assets/schemas-Uj5SZtvt.js","/assets/coerce-CkHW0SMv.js"],"css":[]},"routes/_app+/exercise+/$exerciseNumber_.finished":{"id":"routes/_app+/exercise+/$exerciseNumber_.finished","parentId":"routes/_app+/exercise+/_layout","path":":exerciseNumber/finished","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/_exerciseNumber_.finished-BaC--Y5p.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CEVyDj51.js","/assets/index-CqIc3cxq.js","/assets/epic-video-CC0372g5.js","/assets/misc-W4055b-0.js","/assets/loading-CDNzW5oO.js","/assets/nav-chevrons-Dk4GtZwQ.js","/assets/revalidation-ws-BJWJviUX.js","/assets/retrieval-practice-BOku32wW.js","/assets/launch-editor-D2exGfVu.js","/assets/progress-BcA4i0iU.js","/assets/index-CdzVFL-Z.js","/assets/mdx-vy-1-0a3.js","/assets/online-DiNLkgTC.js","/assets/root-loader-BOzEMapJ.js","/assets/seo-t5J-DRxw.js","/assets/use-event-source-BuD4_2SF.js","/assets/index-DzdDahau.js","/assets/index-vDCSPjrM.js","/assets/schemas-Uj5SZtvt.js","/assets/tooltip-Tlsyx2YO.js","/assets/format-CZ5n8p10.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js","/assets/progress-bar-DpWhcyhC.js","/assets/pe-CIZUOJMr.js","/assets/preload-helper-BXl3LOEh.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/_app+/extra+/_layout":{"id":"routes/_app+/extra+/_layout","parentId":"routes/_app+/_layout","path":"extra","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/_layout-jJ6TnDJF.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CqIc3cxq.js"],"css":[]},"routes/_app+/extra+/$extra":{"id":"routes/_app+/extra+/$extra","parentId":"routes/_app+/extra+/_layout","path":":extra","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/_extra-DXypL1sc.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CEVyDj51.js","/assets/playground-DmEAkxG1.js","/assets/index-CqIc3cxq.js","/assets/diff-Dng5ItOr.js","/assets/epic-video-CC0372g5.js","/assets/error-boundary-DxHqAEHX.js","/assets/nav-chevrons-Dk4GtZwQ.js","/assets/revalidation-ws-BJWJviUX.js","/assets/workshop-config-Zfc8zU0x.js","/assets/preview-fhmjENlm.js","/assets/launch-editor-D2exGfVu.js","/assets/set-playground-BSGwH9dH.js","/assets/mdx-vy-1-0a3.js","/assets/root-loader-BOzEMapJ.js","/assets/seo-t5J-DRxw.js","/assets/split-layout-DnRER1bP.js","/assets/misc-W4055b-0.js","/assets/loading-CDNzW5oO.js","/assets/index-CdzVFL-Z.js","/assets/tooltip-Tlsyx2YO.js","/assets/index-vDCSPjrM.js","/assets/pe-CIZUOJMr.js","/assets/schemas-Uj5SZtvt.js","/assets/discord-BJkw0IrB.js","/assets/user-BsPobzjB.js","/assets/online-DiNLkgTC.js","/assets/index-CJDOQ1bl.js","/assets/index-ynYvVAOK.js","/assets/status-indicator-C6DiLYL5.js","/assets/index-DzdDahau.js","/assets/playground-window-x2mQ5o1O.js","/assets/accordion-CQ7oujC6.js","/assets/use-event-source-BuD4_2SF.js","/assets/format-CZ5n8p10.js","/assets/preload-helper-BXl3LOEh.js","/assets/button-Cd-ekki5.js","/assets/progress-bar-DpWhcyhC.js","/assets/onboarding-indicator-B-XR90_G.js","/assets/dialog-CzO65Z5w.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/_app+/extra+/index":{"id":"routes/_app+/extra+/index","parentId":"routes/_app+/extra+/_layout","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/index-CFM_ffAh.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CEVyDj51.js","/assets/epic-video-CC0372g5.js","/assets/error-boundary-DxHqAEHX.js","/assets/revalidation-ws-BJWJviUX.js","/assets/launch-editor-D2exGfVu.js","/assets/mdx-vy-1-0a3.js","/assets/misc-W4055b-0.js","/assets/root-loader-BOzEMapJ.js","/assets/seo-t5J-DRxw.js","/assets/index-CqIc3cxq.js","/assets/use-event-source-BuD4_2SF.js","/assets/index-DzdDahau.js","/assets/index-vDCSPjrM.js","/assets/index-CdzVFL-Z.js","/assets/tooltip-Tlsyx2YO.js","/assets/pe-CIZUOJMr.js","/assets/schemas-Uj5SZtvt.js","/assets/online-DiNLkgTC.js","/assets/loading-CDNzW5oO.js","/assets/format-CZ5n8p10.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js","/assets/preload-helper-BXl3LOEh.js","/assets/progress-bar-DpWhcyhC.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/_app+/finished":{"id":"routes/_app+/finished","parentId":"routes/_app+/_layout","path":"finished","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/finished-BbEk1NdF.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CEVyDj51.js","/assets/index-CqIc3cxq.js","/assets/epic-video-CC0372g5.js","/assets/misc-W4055b-0.js","/assets/loading-CDNzW5oO.js","/assets/nav-chevrons-Dk4GtZwQ.js","/assets/revalidation-ws-BJWJviUX.js","/assets/mdx-vy-1-0a3.js","/assets/online-DiNLkgTC.js","/assets/root-loader-BOzEMapJ.js","/assets/seo-t5J-DRxw.js","/assets/retrieval-practice-BOku32wW.js","/assets/launch-editor-D2exGfVu.js","/assets/progress-BcA4i0iU.js","/assets/index-CdzVFL-Z.js","/assets/use-event-source-BuD4_2SF.js","/assets/index-DzdDahau.js","/assets/index-vDCSPjrM.js","/assets/schemas-Uj5SZtvt.js","/assets/tooltip-Tlsyx2YO.js","/assets/format-CZ5n8p10.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js","/assets/preload-helper-BXl3LOEh.js","/assets/progress-bar-DpWhcyhC.js","/assets/pe-CIZUOJMr.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/_app+/guide":{"id":"routes/_app+/guide","parentId":"routes/_app+/_layout","path":"guide","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/guide-Cinib8Ji.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CqIc3cxq.js"],"css":[]},"routes/_app+/index":{"id":"routes/_app+/index","parentId":"routes/_app+/_layout","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/index-CfU0fdf7.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CEVyDj51.js","/assets/epic-video-CC0372g5.js","/assets/error-boundary-DxHqAEHX.js","/assets/launch-editor-D2exGfVu.js","/assets/mdx-vy-1-0a3.js","/assets/misc-W4055b-0.js","/assets/progress-BcA4i0iU.js","/assets/index-CqIc3cxq.js","/assets/use-event-source-BuD4_2SF.js","/assets/index-DzdDahau.js","/assets/index-vDCSPjrM.js","/assets/index-CdzVFL-Z.js","/assets/tooltip-Tlsyx2YO.js","/assets/root-loader-BOzEMapJ.js","/assets/pe-CIZUOJMr.js","/assets/schemas-Uj5SZtvt.js","/assets/online-DiNLkgTC.js","/assets/loading-CDNzW5oO.js","/assets/format-CZ5n8p10.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js","/assets/preload-helper-BXl3LOEh.js","/assets/progress-bar-DpWhcyhC.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/_app+/l":{"id":"routes/_app+/l","parentId":"routes/_app+/_layout","path":"l","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/l-BWU2-fsj.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/index-CqIc3cxq.js"],"css":[]},"routes/_app+/login":{"id":"routes/_app+/login","parentId":"routes/_app+/_layout","path":"login","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/login-mWjVXGbJ.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CqIc3cxq.js","/assets/use-event-source-BuD4_2SF.js","/assets/button-Cd-ekki5.js","/assets/loading-CDNzW5oO.js","/assets/product-CvyMpYD_.js","/assets/workshop-config-Zfc8zU0x.js","/assets/schemas-Uj5SZtvt.js","/assets/misc-W4055b-0.js","/assets/index-CdzVFL-Z.js","/assets/tooltip-Tlsyx2YO.js","/assets/index-vDCSPjrM.js","/assets/root-loader-BOzEMapJ.js","/assets/pe-CIZUOJMr.js"],"css":[]},"routes/_app+/preferences":{"id":"routes/_app+/preferences","parentId":"routes/_app+/_layout","path":"preferences","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/preferences-B7ND1VS9.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/button-Cd-ekki5.js","/assets/misc-W4055b-0.js","/assets/tooltip-Tlsyx2YO.js","/assets/format-CZ5n8p10.js","/assets/root-loader-BOzEMapJ.js","/assets/index-CqIc3cxq.js","/assets/index-vDCSPjrM.js"],"css":[]},"routes/_app+/support":{"id":"routes/_app+/support","parentId":"routes/_app+/_layout","path":"support","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/support-D5mDQ-c-.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CqIc3cxq.js"],"css":[]},"routes/_app+/workspace-structure":{"id":"routes/_app+/workspace-structure","parentId":"routes/_app+/_layout","path":"workspace-structure","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/workspace-structure-B6Rpl-B2.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/button-Cd-ekki5.js","/assets/index-CqIc3cxq.js","/assets/misc-W4055b-0.js"],"css":[]},"routes/admin+/_layout":{"id":"routes/admin+/_layout","parentId":"root","path":"admin","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/_layout-CunOyAg4.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/root-loader-BOzEMapJ.js","/assets/index-CqIc3cxq.js"],"css":[]},"routes/admin+/apps":{"id":"routes/admin+/apps","parentId":"routes/admin+/_layout","path":"apps","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/apps-l0sNRNKZ.js","imports":[],"css":[]},"routes/admin+/cache":{"id":"routes/admin+/cache","parentId":"routes/admin+/_layout","path":"cache","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/cache-CAr50MIB.js","imports":["/assets/chunk-FNSCYPCZ-BHgC5cdx.js","/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CqIc3cxq.js","/assets/client-only-BeMV-Wuv.js","/assets/button-Cd-ekki5.js","/assets/misc-W4055b-0.js","/assets/launch-editor-D2exGfVu.js","/assets/pe-CIZUOJMr.js","/assets/progress-bar-DpWhcyhC.js","/assets/root-loader-BOzEMapJ.js"],"css":[]},"routes/admin+/cache.$":{"id":"routes/admin+/cache.$","parentId":"routes/admin+/cache","path":"*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/cache._-l0sNRNKZ.js","imports":[],"css":[]},"routes/admin+/db":{"id":"routes/admin+/db","parentId":"routes/admin+/_layout","path":"db","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/db-DAnX-T3_.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/misc-W4055b-0.js","/assets/tooltip-Tlsyx2YO.js","/assets/launch-editor-D2exGfVu.js","/assets/index-CqIc3cxq.js","/assets/index-vDCSPjrM.js","/assets/progress-bar-DpWhcyhC.js","/assets/pe-CIZUOJMr.js","/assets/root-loader-BOzEMapJ.js"],"css":[]},"routes/admin+/index":{"id":"routes/admin+/index","parentId":"routes/admin+/_layout","index":true,"hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/index-DroM8fzS.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/misc-W4055b-0.js","/assets/index-CqIc3cxq.js","/assets/tooltip-Tlsyx2YO.js","/assets/progress-BcA4i0iU.js","/assets/root-loader-BOzEMapJ.js","/assets/index-vDCSPjrM.js","/assets/pe-CIZUOJMr.js"],"css":[]},"routes/admin+/notifications":{"id":"routes/admin+/notifications","parentId":"routes/admin+/_layout","path":"notifications","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/notifications-l0sNRNKZ.js","imports":[],"css":[]},"routes/admin+/offline-videos":{"id":"routes/admin+/offline-videos","parentId":"routes/admin+/_layout","path":"offline-videos","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/offline-videos-DAsuWMco.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/format-CZ5n8p10.js","/assets/misc-W4055b-0.js","/assets/index-CqIc3cxq.js"],"css":[]},"routes/admin+/version":{"id":"routes/admin+/version","parentId":"routes/admin+/_layout","path":"version","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/version-f8qqYbyU.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/workshop-config-Zfc8zU0x.js","/assets/index-CqIc3cxq.js","/assets/root-loader-BOzEMapJ.js"],"css":[]},"routes/admin+/version[.json]":{"id":"routes/admin+/version[.json]","parentId":"routes/admin+/_layout","path":"version.json","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/version_.json_-l0sNRNKZ.js","imports":[],"css":[]},"routes/apps":{"id":"routes/apps","parentId":"root","path":"apps","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/apps-DP2rzg_V.js","imports":[],"css":[]},"routes/diff":{"id":"routes/diff","parentId":"root","path":"diff","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/diff-DfWBhj2O.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/misc-W4055b-0.js","/assets/diff-Dng5ItOr.js","/assets/nav-chevrons-Dk4GtZwQ.js","/assets/index-CqIc3cxq.js","/assets/accordion-CQ7oujC6.js","/assets/tooltip-Tlsyx2YO.js","/assets/index-vDCSPjrM.js","/assets/index-CJDOQ1bl.js","/assets/index-ynYvVAOK.js","/assets/mdx-vy-1-0a3.js","/assets/index-DzdDahau.js","/assets/epic-video-CC0372g5.js","/assets/use-event-source-BuD4_2SF.js","/assets/index-CdzVFL-Z.js","/assets/root-loader-BOzEMapJ.js","/assets/pe-CIZUOJMr.js","/assets/schemas-Uj5SZtvt.js","/assets/online-DiNLkgTC.js","/assets/loading-CDNzW5oO.js","/assets/format-CZ5n8p10.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js","/assets/preload-helper-BXl3LOEh.js","/assets/launch-editor-D2exGfVu.js","/assets/progress-bar-DpWhcyhC.js","/assets/revalidation-ws-BJWJviUX.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/diff.$shortcut":{"id":"routes/diff.$shortcut","parentId":"routes/diff","path":":shortcut","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/diff._shortcut-l0sNRNKZ.js","imports":[],"css":[]},"routes/exercises":{"id":"routes/exercises","parentId":"root","path":"exercises","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/exercises-l0sNRNKZ.js","imports":[],"css":[]},"routes/launch-editor":{"id":"routes/launch-editor","parentId":"root","path":"launch-editor","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/launch-editor-l0sNRNKZ.js","imports":[],"css":[]},"routes/login-sse":{"id":"routes/login-sse","parentId":"root","path":"login-sse","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/login-sse-l0sNRNKZ.js","imports":[],"css":[]},"routes/mark-onboarding-complete":{"id":"routes/mark-onboarding-complete","parentId":"root","path":"mark-onboarding-complete","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/mark-onboarding-complete-l0sNRNKZ.js","imports":[],"css":[]},"routes/mcp-ui+/epic-video":{"id":"routes/mcp-ui+/epic-video","parentId":"root","path":"mcp-ui/epic-video","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/epic-video-C1_HSISA.js","imports":["/assets/chunk-EPOLDU6W-BCLmut3y.js","/assets/jsx-runtime-C5WNSv3b.js","/assets/index-CqIc3cxq.js","/assets/epic-video-CC0372g5.js","/assets/use-event-source-BuD4_2SF.js","/assets/index-DzdDahau.js","/assets/index-vDCSPjrM.js","/assets/index-CdzVFL-Z.js","/assets/misc-W4055b-0.js","/assets/tooltip-Tlsyx2YO.js","/assets/root-loader-BOzEMapJ.js","/assets/pe-CIZUOJMr.js","/assets/schemas-Uj5SZtvt.js","/assets/online-DiNLkgTC.js","/assets/loading-CDNzW5oO.js","/assets/format-CZ5n8p10.js","/assets/user-BsPobzjB.js","/assets/workshop-config-Zfc8zU0x.js"],"css":["/assets/epic-video-irT-uesJ.css"]},"routes/og":{"id":"routes/og","parentId":"root","path":"og","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/og-l0sNRNKZ.js","imports":[],"css":[]},"routes/persist-playground":{"id":"routes/persist-playground","parentId":"root","path":"persist-playground","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/persist-playground-l0sNRNKZ.js","imports":[],"css":[]},"routes/processes":{"id":"routes/processes","parentId":"root","path":"processes","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/processes-l0sNRNKZ.js","imports":[],"css":[]},"routes/progress":{"id":"routes/progress","parentId":"root","path":"progress","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/progress-l0sNRNKZ.js","imports":[],"css":[]},"routes/resources+/healthcheck":{"id":"routes/resources+/healthcheck","parentId":"root","path":"resources/healthcheck","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/healthcheck-l0sNRNKZ.js","imports":[],"css":[]},"routes/resources+/lookout":{"id":"routes/resources+/lookout","parentId":"root","path":"resources/lookout","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/lookout-l0sNRNKZ.js","imports":[],"css":[]},"routes/resources+/offline-video-progress.$playbackId":{"id":"routes/resources+/offline-video-progress.$playbackId","parentId":"root","path":"resources/offline-video-progress/:playbackId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/offline-video-progress._playbackId-l0sNRNKZ.js","imports":[],"css":[]},"routes/resources+/offline-videos":{"id":"routes/resources+/offline-videos","parentId":"root","path":"resources/offline-videos","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/offline-videos-l0sNRNKZ.js","imports":[],"css":[]},"routes/resources+/offline-videos.$playbackId":{"id":"routes/resources+/offline-videos.$playbackId","parentId":"routes/resources+/offline-videos","path":":playbackId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/offline-videos._playbackId-l0sNRNKZ.js","imports":[],"css":[]},"routes/robots[.]txt":{"id":"routes/robots[.]txt","parentId":"root","path":"robots.txt","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/robots_._txt-l0sNRNKZ.js","imports":[],"css":[]},"routes/saved-playgrounds":{"id":"routes/saved-playgrounds","parentId":"root","path":"saved-playgrounds","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/saved-playgrounds-l0sNRNKZ.js","imports":[],"css":[]},"routes/set-playground":{"id":"routes/set-playground","parentId":"root","path":"set-playground","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/set-playground-l0sNRNKZ.js","imports":[],"css":[]},"routes/sitemap[.]xml":{"id":"routes/sitemap[.]xml","parentId":"root","path":"sitemap.xml","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/sitemap_._xml-l0sNRNKZ.js","imports":[],"css":[]},"routes/start":{"id":"routes/start","parentId":"root","path":"start","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/start-l0sNRNKZ.js","imports":[],"css":[]},"routes/test":{"id":"routes/test","parentId":"root","path":"test","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/test-l0sNRNKZ.js","imports":[],"css":[]},"routes/theme/index":{"id":"routes/theme/index","parentId":"root","path":"theme","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/index-DP2rzg_V.js","imports":[],"css":[]},"routes/video-player/index":{"id":"routes/video-player/index","parentId":"root","path":"video-player","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/index-K6Dvbx-E.js","imports":[],"css":[]}},"url":"/assets/manifest-835c6db1.js","version":"835c6db1"};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-BdxLLjl2.js","assets/preload-helper-BXl3LOEh.js","assets/misc-W4055b-0.js","assets/jsx-runtime-C5WNSv3b.js","assets/index-CqIc3cxq.js","assets/chunk-EPOLDU6W-BCLmut3y.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as Q,j as u}from"./jsx-runtime-C5WNSv3b.js";import{I as tt,a as G,m as et,c as it,A as st,H as F}from"./misc-W4055b-0.js";import{b as nt,r as v}from"./index-CqIc3cxq.js";import{a as rt}from"./index-vDCSPjrM.js";import{L as ot,b as ht}from"./chunk-EPOLDU6W-BCLmut3y.js";import{t as k}from"./index-DzdDahau.js";import{D as at,V as lt}from"./epic-video-DnXXh6qE.js";import{_ as ft}from"./preload-helper-BXl3LOEh.js";import{u as ct}from"./index-CdzVFL-Z.js";import{S as ut}from"./tooltip-Tlsyx2YO.js";import{L as H}from"./launch-editor-D2exGfVu.js";const dt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Y=new Set,I=typeof process=="object"&&process?process:{},J=(h,t,e,i)=>{typeof I.emitWarning=="function"?I.emitWarning(h,t,e,i):console.error(`[${e}] ${t}: ${h}`)};let M=globalThis.AbortController,V=globalThis.AbortSignal;if(typeof M>"u"){V=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},M=class{constructor(){t()}signal=new V;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(const s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let h=I.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const t=()=>{h&&(h=!1,J("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}const pt=h=>!Y.has(h),x=h=>h&&h===Math.floor(h)&&h>0&&isFinite(h),K=h=>x(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?D:null:null;class D extends Array{constructor(t){super(t),this.fill(0)}}class j{heap;length;static#h=!1;static create(t){const e=K(t);if(!e)return[];j.#h=!0;const i=new j(t,e);return j.#h=!1,i}constructor(t,e){if(!j.#h)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class q{#h;#c;#m;#j;#b;#D;#M;#w;get perf(){return this.#w}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#_;#s;#i;#t;#l;#u;#a;#r;#y;#o;#S;#v;#d;#p;#A;#F;#f;#W;static unsafeExposeInternals(t){return{starts:t.#v,ttls:t.#d,autopurgeTimers:t.#p,sizes:t.#S,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#a},get tail(){return t.#r},free:t.#y,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,r)=>t.#N(e,i,s,r),moveToTail:e=>t.#R(e),indexes:e=>t.#x(e),rindexes:e=>t.#E(e),isStale:e=>t.#g(e)}}get max(){return this.#h}get maxSize(){return this.#c}get calculatedSize(){return this.#_}get size(){return this.#n}get fetchMethod(){return this.#D}get memoMethod(){return this.#M}get dispose(){return this.#m}get onInsert(){return this.#j}get disposeAfter(){return this.#b}constructor(t){const{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:n,updateAgeOnHas:o,allowStale:a,dispose:f,onInsert:d,disposeAfter:c,noDisposeOnSet:l,noUpdateTTL:g,maxSize:S=0,maxEntrySize:m=0,sizeCalculation:_,fetchMethod:p,memoMethod:w,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:C,ignoreFetchAbort:E,perf:R}=t;if(R!==void 0&&typeof R?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#w=R??dt,e!==0&&!x(e))throw new TypeError("max option must be a nonnegative integer");const O=e?K(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#h=e,this.#c=S,this.maxEntrySize=m||this.#c,this.sizeCalculation=_,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#M=w,p!==void 0&&typeof p!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#D=p,this.#F=!!p,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new O(e),this.#u=new O(e),this.#a=0,this.#r=0,this.#y=j.create(e),this.#n=0,this.#_=0,typeof f=="function"&&(this.#m=f),typeof d=="function"&&(this.#j=d),typeof c=="function"?(this.#b=c,this.#o=[]):(this.#b=void 0,this.#o=void 0),this.#A=!!this.#m,this.#W=!!this.#j,this.#f=!!this.#b,this.noDisposeOnSet=!!l,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(this.#c!==0&&!x(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!x(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!n,this.updateAgeOnHas=!!o,this.ttlResolution=x(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!x(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#I()}if(this.#h===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#h&&!this.#c){const T="LRU_CACHE_UNBOUNDED";pt(T)&&(Y.add(T),J("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",T,q))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#I(){const t=new D(this.#h),e=new D(this.#h);this.#d=t,this.#v=e;const i=this.ttlAutopurge?new Array(this.#h):void 0;this.#p=i,this.#U=(n,o,a=this.#w.now())=>{if(e[n]=o!==0?a:0,t[n]=o,i?.[n]&&(clearTimeout(i[n]),i[n]=void 0),o!==0&&i){const f=setTimeout(()=>{this.#g(n)&&this.#O(this.#i[n],"expire")},o+1);f.unref&&f.unref(),i[n]=f}},this.#C=n=>{e[n]=t[n]!==0?this.#w.now():0},this.#T=(n,o)=>{if(t[o]){const a=t[o],f=e[o];if(!a||!f)return;n.ttl=a,n.start=f,n.now=s||r();const d=n.now-f;n.remainingTTL=a-d}};let s=0;const r=()=>{const n=this.#w.now();if(this.ttlResolution>0){s=n;const o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{const o=this.#s.get(n);if(o===void 0)return 0;const a=t[o],f=e[o];if(!a||!f)return 1/0;const d=(s||r())-f;return a-d},this.#g=n=>{const o=e[n],a=t[n];return!!a&&!!o&&(s||r())-o>a}}#C=()=>{};#T=()=>{};#U=()=>{};#g=()=>!1;#V(){const t=new D(this.#h);this.#_=0,this.#S=t,this.#z=e=>{this.#_-=t[e],t[e]=0},this.#G=(e,i,s,r)=>{if(this.#e(i))return 0;if(!x(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,e),!x(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#L=(e,i,s)=>{if(t[e]=i,this.#c){const r=this.#c-t[e];for(;this.#_>r;)this.#P(!0)}this.#_+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#_)}}#z=t=>{};#L=(t,e,i)=>{};#G=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#x({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#r;!(!this.#H(e)||((t||!this.#g(e))&&(yield e),e===this.#a));)e=this.#u[e]}*#E({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#a;!(!this.#H(e)||((t||!this.#g(e))&&(yield e),e===this.#r));)e=this.#l[e]}#H(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(const t of this.#x())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(const t of this.#E())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(const t of this.#x()){const e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(const t of this.#E()){const e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(const t of this.#x())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(const t of this.#E())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const i of this.#x()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;if(r!==void 0&&t(r,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(const i of this.#x()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this)}}rforEach(t,e=this){for(const i of this.#E()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this)}}purgeStale(){let t=!1;for(const e of this.#E({allowStale:!0}))this.#g(e)&&(this.#O(this.#i[e],"expire"),t=!0);return t}info(t){const e=this.#s.get(t);if(e===void 0)return;const i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;const r={value:s};if(this.#d&&this.#v){const n=this.#d[e],o=this.#v[e];if(n&&o){const a=n-(this.#w.now()-o);r.ttl=a,r.start=Date.now()}}return this.#S&&(r.size=this.#S[e]),r}dump(){const t=[];for(const e of this.#x({allowStale:!0})){const i=this.#i[e],s=this.#t[e],r=this.#e(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;const n={value:r};if(this.#d&&this.#v){n.ttl=this.#d[e];const o=this.#w.now()-this.#v[e];n.start=Math.floor(Date.now()-o)}this.#S&&(n.size=this.#S[e]),t.unshift([i,n])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const s=Date.now()-i.start;i.start=this.#w.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;const{ttl:s=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=i;let{noUpdateTTL:f=this.noUpdateTTL}=i;const d=this.#G(t,e,i.size||0,o);if(this.maxEntrySize&&d>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#O(t,"set"),this;let c=this.#n===0?void 0:this.#s.get(t);if(c===void 0)c=this.#n===0?this.#r:this.#y.length!==0?this.#y.pop():this.#n===this.#h?this.#P(!1):this.#n,this.#i[c]=t,this.#t[c]=e,this.#s.set(t,c),this.#l[this.#r]=c,this.#u[c]=this.#r,this.#r=c,this.#n++,this.#L(c,d,a),a&&(a.set="add"),f=!1,this.#W&&this.#j?.(e,t,"add");else{this.#R(c);const l=this.#t[c];if(e!==l){if(this.#F&&this.#e(l)){l.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:g}=l;g!==void 0&&!n&&(this.#A&&this.#m?.(g,t,"set"),this.#f&&this.#o?.push([g,t,"set"]))}else n||(this.#A&&this.#m?.(l,t,"set"),this.#f&&this.#o?.push([l,t,"set"]));if(this.#z(c),this.#L(c,d,a),this.#t[c]=e,a){a.set="replace";const g=l&&this.#e(l)?l.__staleWhileFetching:l;g!==void 0&&(a.oldValue=g)}}else a&&(a.set="update");this.#W&&this.onInsert?.(e,t,e===l?"update":"replace")}if(s!==0&&!this.#d&&this.#I(),this.#d&&(f||this.#U(c,s,r),a&&this.#T(a,c)),!n&&this.#f&&this.#o){const l=this.#o;let g;for(;g=l?.shift();)this.#b?.(...g)}return this}pop(){try{for(;this.#n;){const t=this.#t[this.#a];if(this.#P(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#o){const t=this.#o;let e;for(;e=t?.shift();)this.#b?.(...e)}}}#P(t){const e=this.#a,i=this.#i[e],s=this.#t[e];return this.#F&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#A||this.#f)&&(this.#A&&this.#m?.(s,i,"evict"),this.#f&&this.#o?.push([s,i,"evict"])),this.#z(e),this.#p?.[e]&&(clearTimeout(this.#p[e]),this.#p[e]=void 0),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#y.push(e)),this.#n===1?(this.#a=this.#r=0,this.#y.length=0):this.#a=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#s.get(t);if(r!==void 0){const n=this.#t[r];if(this.#e(n)&&n.__staleWhileFetching===void 0)return!1;if(this.#g(r))s&&(s.has="stale",this.#T(s,r));else return i&&this.#C(r),s&&(s.has="hit",this.#T(s,r)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){const{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#g(s))return;const r=this.#t[s];return this.#e(r)?r.__staleWhileFetching:r}#N(t,e,i,s){const r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;const n=new M,{signal:o}=i;o?.addEventListener("abort",()=>n.abort(o.reason),{signal:n.signal});const a={signal:n.signal,options:i,context:s},f=(m,_=!1)=>{const{aborted:p}=n.signal,w=i.ignoreFetchAbort&&m!==void 0;if(i.status&&(p&&!_?(i.status.fetchAborted=!0,i.status.fetchError=n.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),p&&!w&&!_)return c(n.signal.reason);const A=g,b=this.#t[e];return(b===g||w&&_&&b===void 0)&&(m===void 0?A.__staleWhileFetching!==void 0?this.#t[e]=A.__staleWhileFetching:this.#O(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,m,a.options))),m},d=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),c(m)),c=m=>{const{aborted:_}=n.signal,p=_&&i.allowStaleOnFetchAbort,w=p||i.allowStaleOnFetchRejection,A=w||i.noDeleteOnFetchRejection,b=g;if(this.#t[e]===g&&(!A||b.__staleWhileFetching===void 0?this.#O(t,"fetch"):p||(this.#t[e]=b.__staleWhileFetching)),w)return i.status&&b.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),b.__staleWhileFetching;if(b.__returned===b)throw m},l=(m,_)=>{const p=this.#D?.(t,r,a);p&&p instanceof Promise&&p.then(w=>m(w===void 0?void 0:w),_),n.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=w=>f(w,!0)))})};i.status&&(i.status.fetchDispatched=!0);const g=new Promise(l).then(f,d),S=Object.assign(g,{__abortController:n,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,S,{...a.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=S,S}#e(t){if(!this.#F)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof M}async fetch(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:l=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:S=this.allowStaleOnFetchAbort,context:m,forceRefresh:_=!1,status:p,signal:w}=e;if(!this.#F)return p&&(p.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:p});const A={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:o,size:a,sizeCalculation:f,noUpdateTTL:d,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:l,allowStaleOnFetchAbort:S,ignoreFetchAbort:g,status:p,signal:w};let b=this.#s.get(t);if(b===void 0){p&&(p.fetch="miss");const y=this.#N(t,b,A,m);return y.__returned=y}else{const y=this.#t[b];if(this.#e(y)){const T=i&&y.__staleWhileFetching!==void 0;return p&&(p.fetch="inflight",T&&(p.returnedStale=!0)),T?y.__staleWhileFetching:y.__returned=y}const C=this.#g(b);if(!_&&!C)return p&&(p.fetch="hit"),this.#R(b),s&&this.#C(b),p&&this.#T(p,b),y;const E=this.#N(t,b,A,m),O=E.__staleWhileFetching!==void 0&&i;return p&&(p.fetch=C?"stale":"refresh",O&&C&&(p.returnedStale=!0)),O?E.__staleWhileFetching:E.__returned=E}}async forceFetch(t,e={}){const i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){const i=this.#M;if(!i)throw new Error("no memoMethod provided to constructor");const{context:s,forceRefresh:r,...n}=e,o=this.get(t,n);if(!r&&o!==void 0)return o;const a=i(t,o,{options:n,context:s});return this.set(t,a,n),a}get(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e,o=this.#s.get(t);if(o!==void 0){const a=this.#t[o],f=this.#e(a);return n&&this.#T(n,o),this.#g(o)?(n&&(n.get="stale"),f?(n&&i&&a.__staleWhileFetching!==void 0&&(n.returnedStale=!0),i?a.__staleWhileFetching:void 0):(r||this.#O(t,"expire"),n&&i&&(n.returnedStale=!0),i?a:void 0)):(n&&(n.get="hit"),f?a.__staleWhileFetching:(this.#R(o),s&&this.#C(o),a))}else n&&(n.get="miss")}#q(t,e){this.#u[e]=t,this.#l[t]=e}#R(t){t!==this.#r&&(t===this.#a?this.#a=this.#l[t]:this.#q(this.#u[t],this.#l[t]),this.#q(this.#r,t),this.#r=t)}delete(t){return this.#O(t,"delete")}#O(t,e){let i=!1;if(this.#n!==0){const s=this.#s.get(t);if(s!==void 0)if(this.#p?.[s]&&(clearTimeout(this.#p?.[s]),this.#p[s]=void 0),i=!0,this.#n===1)this.#k(e);else{this.#z(s);const r=this.#t[s];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#A||this.#f)&&(this.#A&&this.#m?.(r,t,e),this.#f&&this.#o?.push([r,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#r)this.#r=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else{const n=this.#u[s];this.#l[n]=this.#l[s];const o=this.#l[s];this.#u[o]=this.#u[s]}this.#n--,this.#y.push(s)}}if(this.#f&&this.#o?.length){const s=this.#o;let r;for(;r=s?.shift();)this.#b?.(...r)}return i}clear(){return this.#k("delete")}#k(t){for(const e of this.#E({allowStale:!0})){const i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{const s=this.#i[e];this.#A&&this.#m?.(i,s,t),this.#f&&this.#o?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#v){this.#d.fill(0),this.#v.fill(0);for(const e of this.#p??[])e!==void 0&&clearTimeout(e);this.#p?.fill(void 0)}if(this.#S&&this.#S.fill(0),this.#a=0,this.#r=0,this.#y.length=0,this.#_=0,this.#n=0,this.#f&&this.#o){const e=this.#o;let i;for(;i=e?.shift();)this.#b?.(...i)}}}var W={},z={},$;function gt(){if($)return z;$=1,Object.defineProperty(z,"__esModule",{value:!0}),z.getMDXComponent=r,z.getMDXExport=n;var h=s(nt()),t=s(rt()),e=s(Q());function i(o){if(typeof WeakMap!="function")return null;var a=new WeakMap,f=new WeakMap;return(i=function(d){return d?f:a})(o)}function s(o,a){if(o&&o.__esModule)return o;if(o===null||typeof o!="object"&&typeof o!="function")return{default:o};var f=i(a);if(f&&f.has(o))return f.get(o);var d={__proto__:null},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in o)if(l!=="default"&&{}.hasOwnProperty.call(o,l)){var g=c?Object.getOwnPropertyDescriptor(o,l):null;g&&(g.get||g.set)?Object.defineProperty(d,l,g):d[l]=o[l]}return d.default=o,f&&f.set(o,d),d}function r(o,a){return n(o,a).default}function n(o,a){const d={...{React:h,ReactDOM:t,_jsx_runtime:e},...a};return new Function(...Object.keys(d),o)(...Object.values(d))}return z}var B;function mt(){return B||(B=1,(function(h){Object.defineProperty(h,"__esModule",{value:!0});var t=gt();Object.keys(t).forEach(function(e){e==="default"||e==="__esModule"||e in h&&h[e]===t[e]||Object.defineProperty(h,e,{enumerable:!0,get:function(){return t[e]}})})})(W)),W}var L,X;function bt(){return X||(X=1,L=mt()),L}var wt=bt();function _t({code:h,svg:t,svgTheme:e,onSvg:i}){const r=ct()==="dark"?"dark":"default",o=`${`mermaid-svg-${v.useId()}`}-${r}`,a=v.useRef(null),f=v.useRef(i);return v.useEffect(()=>{f.current=i},[i]),v.useEffect(()=>{if(!a.current||t&&e===r)return;let d=!1;return ft(()=>import("./mermaid.core-BdxLLjl2.js").then(c=>c.bB),__vite__mapDeps([0,1,2,3,4,5])).then(c=>{c.default.initialize({startOnLoad:!1,theme:r}),c.default.render(o,h).then(({svg:l})=>{!d&&a.current&&(a.current.innerHTML=l,f.current?.(l))}).catch(l=>{!d&&a.current&&(a.current.innerHTML=`<pre style='color:red'>${String(l)}</pre>`)})}),()=>{d=!0}},[h,r,o,t,e]),u.jsx("div",{className:"mermaid not-prose",children:u.jsx("div",{ref:a,dangerouslySetInnerHTML:t?{__html:t}:void 0})})}const P=h=>h.replace(/\\/g,"/");function Z(h,t,e){const[,i]=h.replace(/\\|\//g,t).split(`${e==="playground"?"example":"exercises"}${t}`);return i}const U="border-border bg-[var(--shiki-background)] hover:bg-foreground/20 active:bg-foreground/30 box-content block rounded border-2 px-2 py-0.5 font-mono text-xs font-semibold outline-none transition duration-300 ease-in-out";function yt({"data-buttons":h,"data-filename":t,"data-fullpath":e,"data-sep":i="/","data-start":s,"data-type":r}){const n=ht();if(r==="other"||!h||!t||!e)return null;const o=P(n[n.type]?.fullPath??""),a=!e.startsWith(o),f=ENV.EPICSHOP_DEPLOYED?["problem","solution"]:["problem","solution","playground"],d=h.split(","),c=f.filter(l=>d.includes(l));return u.jsx(u.Fragment,{children:c.map(l=>{const g=n[l];if(l==="playground"){const _=n.playground&&n.playground.appName!==n.problem?.name;if(!g||_||a)return u.jsxs("button",{className:G(U,"cursor-not-allowed"),title:_?"Playground is not set to the right app":a?"This file is from different app":"You must 'Set to Playground' before opening a file",children:[u.jsx("span",{className:"uppercase",children:"Open"})," in ",l]},l)}if(!g||!g.fullPath)return null;const S=[P(g.fullPath),P(t)].join(i),m=Z(S,i,l);return u.jsx(H,{file:S,line:Number(s??1),children:u.jsxs("span",{title:m,className:U,children:[u.jsx("span",{className:"uppercase",children:"Open"})," in ",l]})},l)})})}function St(){const[h,t]=v.useState(!1);return v.useEffect(()=>{if(h){const e=setTimeout(()=>t(!1),1500);return()=>clearTimeout(e)}},[h]),u.jsx("button",{className:it(U,"w-12 uppercase"),onClick:async e=>{if(navigator.clipboard)try{const s=e.currentTarget.parentElement?.parentElement?.querySelector("pre")?.textContent||"";await navigator.clipboard.writeText(s),t(!0)}catch(i){console.error("Failed to copy to clipboard:",i),k.error("Failed to copy to clipboard",{description:"Please try again or copy the code manually."})}else k.error("Copying is only available in secure contexts (HTTPS or localhost).",{description:"Please access the workshop via localhost instead of an IP address to enable this feature."})},children:h?"copied":"copy"})}function vt({children:h,...t}){const{"data-buttons":e,"data-filename":i,"data-fullpath":s,"data-nocopy":r,"data-sep":n}=t,o=r===void 0;function a(){if(s&&n)return!i||i.includes("..")?{"data-filename":Z(s,n)}:{"data-filename":i.replace(/\//g,n)}}return u.jsxs("div",{className:"group relative",children:[u.jsxs("div",{className:"absolute top-0 right-0 z-50 m-2 flex items-baseline justify-end gap-4 opacity-0 transition duration-300 ease-in-out group-hover:opacity-100 focus-within:opacity-100",children:[e?u.jsx(yt,{...t}):null,o?u.jsx(St,{}):null]}),u.jsx("pre",{...t,className:G("scrollbar-thin scrollbar-thumb-scrollbar",t.className??""),...a(),children:h})]})}const At={h1:h=>u.jsx(F,{...h,as:"h1"}),h2:h=>u.jsx(F,{...h,as:"h2"}),h3:h=>u.jsx(F,{...h,as:"h3"}),h4:h=>u.jsx(F,{...h,as:"h4"}),h5:h=>u.jsx(F,{...h,as:"h5"}),h6:h=>u.jsx(F,{...h,as:"h6"}),a:st,p:h=>u.jsx("div",{...h}),pre:h=>u.jsx("pre",{...h,className:G("scrollbar-thin scrollbar-thumb-scrollbar",h.className??"")}),LaunchEditor:H,VideoEmbed:lt,EpicVideo:at,Mermaid:_t};function xt(h){const t=wt.getMDXComponent(h);function e({components:i,...s}){const r=v.useMemo(()=>({...At,...i}),[i]);return u.jsx(t,{components:r,...s})}return e}const N=new q({max:1e3});function Et(h){return v.useMemo(()=>{if(N.has(h))return N.get(h);const t=xt(h);return N.set(h,t),t},[h])}function Ut({code:h,components:t}){const e=Et(h),i=v.useMemo(()=>({Icon:tt,pre:vt,Link:ot,...t}),[t]);return u.jsx(e,{components:i})}function Gt(h){return function({file:e,children:i=u.jsx("code",{children:e}),...s}){const r=h(),n=u.jsxs("div",{className:"launch-editor-button-wrapper flex underline underline-offset-4",children:[i," ",u.jsx("svg",{height:24,width:24,children:u.jsx("use",{href:`${et}#Keyboard`})})]});return r?u.jsx("div",{className:"inline-block grow",children:u.jsx(H,{appFile:e,appName:r.name,...s,children:n})}):u.jsx(ut,{content:"App information not available",children:u.jsx("div",{className:"inline-block grow cursor-not-allowed",children:n})})}}export{Ut as M,Gt as c};
|
|
3
|
-
//# sourceMappingURL=mdx-
|
|
2
|
+
import{r as Q,j as u}from"./jsx-runtime-C5WNSv3b.js";import{I as tt,a as G,m as et,c as it,A as st,H as F}from"./misc-W4055b-0.js";import{b as nt,r as v}from"./index-CqIc3cxq.js";import{a as rt}from"./index-vDCSPjrM.js";import{L as ot,b as ht}from"./chunk-EPOLDU6W-BCLmut3y.js";import{t as k}from"./index-DzdDahau.js";import{D as at,V as lt}from"./epic-video-CC0372g5.js";import{_ as ft}from"./preload-helper-BXl3LOEh.js";import{u as ct}from"./index-CdzVFL-Z.js";import{S as ut}from"./tooltip-Tlsyx2YO.js";import{L as H}from"./launch-editor-D2exGfVu.js";const dt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Y=new Set,I=typeof process=="object"&&process?process:{},J=(h,t,e,i)=>{typeof I.emitWarning=="function"?I.emitWarning(h,t,e,i):console.error(`[${e}] ${t}: ${h}`)};let M=globalThis.AbortController,V=globalThis.AbortSignal;if(typeof M>"u"){V=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},M=class{constructor(){t()}signal=new V;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(const s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let h=I.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const t=()=>{h&&(h=!1,J("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}const pt=h=>!Y.has(h),x=h=>h&&h===Math.floor(h)&&h>0&&isFinite(h),K=h=>x(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?D:null:null;class D extends Array{constructor(t){super(t),this.fill(0)}}class j{heap;length;static#h=!1;static create(t){const e=K(t);if(!e)return[];j.#h=!0;const i=new j(t,e);return j.#h=!1,i}constructor(t,e){if(!j.#h)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class q{#h;#c;#m;#j;#b;#D;#M;#w;get perf(){return this.#w}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#_;#s;#i;#t;#l;#u;#a;#r;#y;#o;#S;#v;#d;#p;#A;#F;#f;#W;static unsafeExposeInternals(t){return{starts:t.#v,ttls:t.#d,autopurgeTimers:t.#p,sizes:t.#S,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#a},get tail(){return t.#r},free:t.#y,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,r)=>t.#N(e,i,s,r),moveToTail:e=>t.#R(e),indexes:e=>t.#x(e),rindexes:e=>t.#E(e),isStale:e=>t.#g(e)}}get max(){return this.#h}get maxSize(){return this.#c}get calculatedSize(){return this.#_}get size(){return this.#n}get fetchMethod(){return this.#D}get memoMethod(){return this.#M}get dispose(){return this.#m}get onInsert(){return this.#j}get disposeAfter(){return this.#b}constructor(t){const{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:n,updateAgeOnHas:o,allowStale:a,dispose:f,onInsert:d,disposeAfter:c,noDisposeOnSet:l,noUpdateTTL:g,maxSize:S=0,maxEntrySize:m=0,sizeCalculation:_,fetchMethod:p,memoMethod:w,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:C,ignoreFetchAbort:E,perf:R}=t;if(R!==void 0&&typeof R?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#w=R??dt,e!==0&&!x(e))throw new TypeError("max option must be a nonnegative integer");const O=e?K(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#h=e,this.#c=S,this.maxEntrySize=m||this.#c,this.sizeCalculation=_,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#M=w,p!==void 0&&typeof p!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#D=p,this.#F=!!p,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new O(e),this.#u=new O(e),this.#a=0,this.#r=0,this.#y=j.create(e),this.#n=0,this.#_=0,typeof f=="function"&&(this.#m=f),typeof d=="function"&&(this.#j=d),typeof c=="function"?(this.#b=c,this.#o=[]):(this.#b=void 0,this.#o=void 0),this.#A=!!this.#m,this.#W=!!this.#j,this.#f=!!this.#b,this.noDisposeOnSet=!!l,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(this.#c!==0&&!x(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!x(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!n,this.updateAgeOnHas=!!o,this.ttlResolution=x(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!x(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#I()}if(this.#h===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#h&&!this.#c){const T="LRU_CACHE_UNBOUNDED";pt(T)&&(Y.add(T),J("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",T,q))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#I(){const t=new D(this.#h),e=new D(this.#h);this.#d=t,this.#v=e;const i=this.ttlAutopurge?new Array(this.#h):void 0;this.#p=i,this.#U=(n,o,a=this.#w.now())=>{if(e[n]=o!==0?a:0,t[n]=o,i?.[n]&&(clearTimeout(i[n]),i[n]=void 0),o!==0&&i){const f=setTimeout(()=>{this.#g(n)&&this.#O(this.#i[n],"expire")},o+1);f.unref&&f.unref(),i[n]=f}},this.#C=n=>{e[n]=t[n]!==0?this.#w.now():0},this.#T=(n,o)=>{if(t[o]){const a=t[o],f=e[o];if(!a||!f)return;n.ttl=a,n.start=f,n.now=s||r();const d=n.now-f;n.remainingTTL=a-d}};let s=0;const r=()=>{const n=this.#w.now();if(this.ttlResolution>0){s=n;const o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{const o=this.#s.get(n);if(o===void 0)return 0;const a=t[o],f=e[o];if(!a||!f)return 1/0;const d=(s||r())-f;return a-d},this.#g=n=>{const o=e[n],a=t[n];return!!a&&!!o&&(s||r())-o>a}}#C=()=>{};#T=()=>{};#U=()=>{};#g=()=>!1;#V(){const t=new D(this.#h);this.#_=0,this.#S=t,this.#z=e=>{this.#_-=t[e],t[e]=0},this.#G=(e,i,s,r)=>{if(this.#e(i))return 0;if(!x(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,e),!x(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#L=(e,i,s)=>{if(t[e]=i,this.#c){const r=this.#c-t[e];for(;this.#_>r;)this.#P(!0)}this.#_+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#_)}}#z=t=>{};#L=(t,e,i)=>{};#G=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#x({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#r;!(!this.#H(e)||((t||!this.#g(e))&&(yield e),e===this.#a));)e=this.#u[e]}*#E({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#a;!(!this.#H(e)||((t||!this.#g(e))&&(yield e),e===this.#r));)e=this.#l[e]}#H(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(const t of this.#x())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(const t of this.#E())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(const t of this.#x()){const e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(const t of this.#E()){const e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(const t of this.#x())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(const t of this.#E())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const i of this.#x()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;if(r!==void 0&&t(r,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(const i of this.#x()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this)}}rforEach(t,e=this){for(const i of this.#E()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this)}}purgeStale(){let t=!1;for(const e of this.#E({allowStale:!0}))this.#g(e)&&(this.#O(this.#i[e],"expire"),t=!0);return t}info(t){const e=this.#s.get(t);if(e===void 0)return;const i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;const r={value:s};if(this.#d&&this.#v){const n=this.#d[e],o=this.#v[e];if(n&&o){const a=n-(this.#w.now()-o);r.ttl=a,r.start=Date.now()}}return this.#S&&(r.size=this.#S[e]),r}dump(){const t=[];for(const e of this.#x({allowStale:!0})){const i=this.#i[e],s=this.#t[e],r=this.#e(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;const n={value:r};if(this.#d&&this.#v){n.ttl=this.#d[e];const o=this.#w.now()-this.#v[e];n.start=Math.floor(Date.now()-o)}this.#S&&(n.size=this.#S[e]),t.unshift([i,n])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const s=Date.now()-i.start;i.start=this.#w.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;const{ttl:s=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=i;let{noUpdateTTL:f=this.noUpdateTTL}=i;const d=this.#G(t,e,i.size||0,o);if(this.maxEntrySize&&d>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#O(t,"set"),this;let c=this.#n===0?void 0:this.#s.get(t);if(c===void 0)c=this.#n===0?this.#r:this.#y.length!==0?this.#y.pop():this.#n===this.#h?this.#P(!1):this.#n,this.#i[c]=t,this.#t[c]=e,this.#s.set(t,c),this.#l[this.#r]=c,this.#u[c]=this.#r,this.#r=c,this.#n++,this.#L(c,d,a),a&&(a.set="add"),f=!1,this.#W&&this.#j?.(e,t,"add");else{this.#R(c);const l=this.#t[c];if(e!==l){if(this.#F&&this.#e(l)){l.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:g}=l;g!==void 0&&!n&&(this.#A&&this.#m?.(g,t,"set"),this.#f&&this.#o?.push([g,t,"set"]))}else n||(this.#A&&this.#m?.(l,t,"set"),this.#f&&this.#o?.push([l,t,"set"]));if(this.#z(c),this.#L(c,d,a),this.#t[c]=e,a){a.set="replace";const g=l&&this.#e(l)?l.__staleWhileFetching:l;g!==void 0&&(a.oldValue=g)}}else a&&(a.set="update");this.#W&&this.onInsert?.(e,t,e===l?"update":"replace")}if(s!==0&&!this.#d&&this.#I(),this.#d&&(f||this.#U(c,s,r),a&&this.#T(a,c)),!n&&this.#f&&this.#o){const l=this.#o;let g;for(;g=l?.shift();)this.#b?.(...g)}return this}pop(){try{for(;this.#n;){const t=this.#t[this.#a];if(this.#P(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#o){const t=this.#o;let e;for(;e=t?.shift();)this.#b?.(...e)}}}#P(t){const e=this.#a,i=this.#i[e],s=this.#t[e];return this.#F&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#A||this.#f)&&(this.#A&&this.#m?.(s,i,"evict"),this.#f&&this.#o?.push([s,i,"evict"])),this.#z(e),this.#p?.[e]&&(clearTimeout(this.#p[e]),this.#p[e]=void 0),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#y.push(e)),this.#n===1?(this.#a=this.#r=0,this.#y.length=0):this.#a=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#s.get(t);if(r!==void 0){const n=this.#t[r];if(this.#e(n)&&n.__staleWhileFetching===void 0)return!1;if(this.#g(r))s&&(s.has="stale",this.#T(s,r));else return i&&this.#C(r),s&&(s.has="hit",this.#T(s,r)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){const{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#g(s))return;const r=this.#t[s];return this.#e(r)?r.__staleWhileFetching:r}#N(t,e,i,s){const r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;const n=new M,{signal:o}=i;o?.addEventListener("abort",()=>n.abort(o.reason),{signal:n.signal});const a={signal:n.signal,options:i,context:s},f=(m,_=!1)=>{const{aborted:p}=n.signal,w=i.ignoreFetchAbort&&m!==void 0;if(i.status&&(p&&!_?(i.status.fetchAborted=!0,i.status.fetchError=n.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),p&&!w&&!_)return c(n.signal.reason);const A=g,b=this.#t[e];return(b===g||w&&_&&b===void 0)&&(m===void 0?A.__staleWhileFetching!==void 0?this.#t[e]=A.__staleWhileFetching:this.#O(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,m,a.options))),m},d=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),c(m)),c=m=>{const{aborted:_}=n.signal,p=_&&i.allowStaleOnFetchAbort,w=p||i.allowStaleOnFetchRejection,A=w||i.noDeleteOnFetchRejection,b=g;if(this.#t[e]===g&&(!A||b.__staleWhileFetching===void 0?this.#O(t,"fetch"):p||(this.#t[e]=b.__staleWhileFetching)),w)return i.status&&b.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),b.__staleWhileFetching;if(b.__returned===b)throw m},l=(m,_)=>{const p=this.#D?.(t,r,a);p&&p instanceof Promise&&p.then(w=>m(w===void 0?void 0:w),_),n.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=w=>f(w,!0)))})};i.status&&(i.status.fetchDispatched=!0);const g=new Promise(l).then(f,d),S=Object.assign(g,{__abortController:n,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,S,{...a.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=S,S}#e(t){if(!this.#F)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof M}async fetch(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:l=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:S=this.allowStaleOnFetchAbort,context:m,forceRefresh:_=!1,status:p,signal:w}=e;if(!this.#F)return p&&(p.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:p});const A={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:o,size:a,sizeCalculation:f,noUpdateTTL:d,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:l,allowStaleOnFetchAbort:S,ignoreFetchAbort:g,status:p,signal:w};let b=this.#s.get(t);if(b===void 0){p&&(p.fetch="miss");const y=this.#N(t,b,A,m);return y.__returned=y}else{const y=this.#t[b];if(this.#e(y)){const T=i&&y.__staleWhileFetching!==void 0;return p&&(p.fetch="inflight",T&&(p.returnedStale=!0)),T?y.__staleWhileFetching:y.__returned=y}const C=this.#g(b);if(!_&&!C)return p&&(p.fetch="hit"),this.#R(b),s&&this.#C(b),p&&this.#T(p,b),y;const E=this.#N(t,b,A,m),O=E.__staleWhileFetching!==void 0&&i;return p&&(p.fetch=C?"stale":"refresh",O&&C&&(p.returnedStale=!0)),O?E.__staleWhileFetching:E.__returned=E}}async forceFetch(t,e={}){const i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){const i=this.#M;if(!i)throw new Error("no memoMethod provided to constructor");const{context:s,forceRefresh:r,...n}=e,o=this.get(t,n);if(!r&&o!==void 0)return o;const a=i(t,o,{options:n,context:s});return this.set(t,a,n),a}get(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e,o=this.#s.get(t);if(o!==void 0){const a=this.#t[o],f=this.#e(a);return n&&this.#T(n,o),this.#g(o)?(n&&(n.get="stale"),f?(n&&i&&a.__staleWhileFetching!==void 0&&(n.returnedStale=!0),i?a.__staleWhileFetching:void 0):(r||this.#O(t,"expire"),n&&i&&(n.returnedStale=!0),i?a:void 0)):(n&&(n.get="hit"),f?a.__staleWhileFetching:(this.#R(o),s&&this.#C(o),a))}else n&&(n.get="miss")}#q(t,e){this.#u[e]=t,this.#l[t]=e}#R(t){t!==this.#r&&(t===this.#a?this.#a=this.#l[t]:this.#q(this.#u[t],this.#l[t]),this.#q(this.#r,t),this.#r=t)}delete(t){return this.#O(t,"delete")}#O(t,e){let i=!1;if(this.#n!==0){const s=this.#s.get(t);if(s!==void 0)if(this.#p?.[s]&&(clearTimeout(this.#p?.[s]),this.#p[s]=void 0),i=!0,this.#n===1)this.#k(e);else{this.#z(s);const r=this.#t[s];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#A||this.#f)&&(this.#A&&this.#m?.(r,t,e),this.#f&&this.#o?.push([r,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#r)this.#r=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else{const n=this.#u[s];this.#l[n]=this.#l[s];const o=this.#l[s];this.#u[o]=this.#u[s]}this.#n--,this.#y.push(s)}}if(this.#f&&this.#o?.length){const s=this.#o;let r;for(;r=s?.shift();)this.#b?.(...r)}return i}clear(){return this.#k("delete")}#k(t){for(const e of this.#E({allowStale:!0})){const i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{const s=this.#i[e];this.#A&&this.#m?.(i,s,t),this.#f&&this.#o?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#v){this.#d.fill(0),this.#v.fill(0);for(const e of this.#p??[])e!==void 0&&clearTimeout(e);this.#p?.fill(void 0)}if(this.#S&&this.#S.fill(0),this.#a=0,this.#r=0,this.#y.length=0,this.#_=0,this.#n=0,this.#f&&this.#o){const e=this.#o;let i;for(;i=e?.shift();)this.#b?.(...i)}}}var W={},z={},$;function gt(){if($)return z;$=1,Object.defineProperty(z,"__esModule",{value:!0}),z.getMDXComponent=r,z.getMDXExport=n;var h=s(nt()),t=s(rt()),e=s(Q());function i(o){if(typeof WeakMap!="function")return null;var a=new WeakMap,f=new WeakMap;return(i=function(d){return d?f:a})(o)}function s(o,a){if(o&&o.__esModule)return o;if(o===null||typeof o!="object"&&typeof o!="function")return{default:o};var f=i(a);if(f&&f.has(o))return f.get(o);var d={__proto__:null},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in o)if(l!=="default"&&{}.hasOwnProperty.call(o,l)){var g=c?Object.getOwnPropertyDescriptor(o,l):null;g&&(g.get||g.set)?Object.defineProperty(d,l,g):d[l]=o[l]}return d.default=o,f&&f.set(o,d),d}function r(o,a){return n(o,a).default}function n(o,a){const d={...{React:h,ReactDOM:t,_jsx_runtime:e},...a};return new Function(...Object.keys(d),o)(...Object.values(d))}return z}var B;function mt(){return B||(B=1,(function(h){Object.defineProperty(h,"__esModule",{value:!0});var t=gt();Object.keys(t).forEach(function(e){e==="default"||e==="__esModule"||e in h&&h[e]===t[e]||Object.defineProperty(h,e,{enumerable:!0,get:function(){return t[e]}})})})(W)),W}var L,X;function bt(){return X||(X=1,L=mt()),L}var wt=bt();function _t({code:h,svg:t,svgTheme:e,onSvg:i}){const r=ct()==="dark"?"dark":"default",o=`${`mermaid-svg-${v.useId()}`}-${r}`,a=v.useRef(null),f=v.useRef(i);return v.useEffect(()=>{f.current=i},[i]),v.useEffect(()=>{if(!a.current||t&&e===r)return;let d=!1;return ft(()=>import("./mermaid.core-BdxLLjl2.js").then(c=>c.bB),__vite__mapDeps([0,1,2,3,4,5])).then(c=>{c.default.initialize({startOnLoad:!1,theme:r}),c.default.render(o,h).then(({svg:l})=>{!d&&a.current&&(a.current.innerHTML=l,f.current?.(l))}).catch(l=>{!d&&a.current&&(a.current.innerHTML=`<pre style='color:red'>${String(l)}</pre>`)})}),()=>{d=!0}},[h,r,o,t,e]),u.jsx("div",{className:"mermaid not-prose",children:u.jsx("div",{ref:a,dangerouslySetInnerHTML:t?{__html:t}:void 0})})}const P=h=>h.replace(/\\/g,"/");function Z(h,t,e){const[,i]=h.replace(/\\|\//g,t).split(`${e==="playground"?"example":"exercises"}${t}`);return i}const U="border-border bg-[var(--shiki-background)] hover:bg-foreground/20 active:bg-foreground/30 box-content block rounded border-2 px-2 py-0.5 font-mono text-xs font-semibold outline-none transition duration-300 ease-in-out";function yt({"data-buttons":h,"data-filename":t,"data-fullpath":e,"data-sep":i="/","data-start":s,"data-type":r}){const n=ht();if(r==="other"||!h||!t||!e)return null;const o=P(n[n.type]?.fullPath??""),a=!e.startsWith(o),f=ENV.EPICSHOP_DEPLOYED?["problem","solution"]:["problem","solution","playground"],d=h.split(","),c=f.filter(l=>d.includes(l));return u.jsx(u.Fragment,{children:c.map(l=>{const g=n[l];if(l==="playground"){const _=n.playground&&n.playground.appName!==n.problem?.name;if(!g||_||a)return u.jsxs("button",{className:G(U,"cursor-not-allowed"),title:_?"Playground is not set to the right app":a?"This file is from different app":"You must 'Set to Playground' before opening a file",children:[u.jsx("span",{className:"uppercase",children:"Open"})," in ",l]},l)}if(!g||!g.fullPath)return null;const S=[P(g.fullPath),P(t)].join(i),m=Z(S,i,l);return u.jsx(H,{file:S,line:Number(s??1),children:u.jsxs("span",{title:m,className:U,children:[u.jsx("span",{className:"uppercase",children:"Open"})," in ",l]})},l)})})}function St(){const[h,t]=v.useState(!1);return v.useEffect(()=>{if(h){const e=setTimeout(()=>t(!1),1500);return()=>clearTimeout(e)}},[h]),u.jsx("button",{className:it(U,"w-12 uppercase"),onClick:async e=>{if(navigator.clipboard)try{const s=e.currentTarget.parentElement?.parentElement?.querySelector("pre")?.textContent||"";await navigator.clipboard.writeText(s),t(!0)}catch(i){console.error("Failed to copy to clipboard:",i),k.error("Failed to copy to clipboard",{description:"Please try again or copy the code manually."})}else k.error("Copying is only available in secure contexts (HTTPS or localhost).",{description:"Please access the workshop via localhost instead of an IP address to enable this feature."})},children:h?"copied":"copy"})}function vt({children:h,...t}){const{"data-buttons":e,"data-filename":i,"data-fullpath":s,"data-nocopy":r,"data-sep":n}=t,o=r===void 0;function a(){if(s&&n)return!i||i.includes("..")?{"data-filename":Z(s,n)}:{"data-filename":i.replace(/\//g,n)}}return u.jsxs("div",{className:"group relative",children:[u.jsxs("div",{className:"absolute top-0 right-0 z-50 m-2 flex items-baseline justify-end gap-4 opacity-0 transition duration-300 ease-in-out group-hover:opacity-100 focus-within:opacity-100",children:[e?u.jsx(yt,{...t}):null,o?u.jsx(St,{}):null]}),u.jsx("pre",{...t,className:G("scrollbar-thin scrollbar-thumb-scrollbar",t.className??""),...a(),children:h})]})}const At={h1:h=>u.jsx(F,{...h,as:"h1"}),h2:h=>u.jsx(F,{...h,as:"h2"}),h3:h=>u.jsx(F,{...h,as:"h3"}),h4:h=>u.jsx(F,{...h,as:"h4"}),h5:h=>u.jsx(F,{...h,as:"h5"}),h6:h=>u.jsx(F,{...h,as:"h6"}),a:st,p:h=>u.jsx("div",{...h}),pre:h=>u.jsx("pre",{...h,className:G("scrollbar-thin scrollbar-thumb-scrollbar",h.className??"")}),LaunchEditor:H,VideoEmbed:lt,EpicVideo:at,Mermaid:_t};function xt(h){const t=wt.getMDXComponent(h);function e({components:i,...s}){const r=v.useMemo(()=>({...At,...i}),[i]);return u.jsx(t,{components:r,...s})}return e}const N=new q({max:1e3});function Et(h){return v.useMemo(()=>{if(N.has(h))return N.get(h);const t=xt(h);return N.set(h,t),t},[h])}function Ut({code:h,components:t}){const e=Et(h),i=v.useMemo(()=>({Icon:tt,pre:vt,Link:ot,...t}),[t]);return u.jsx(e,{components:i})}function Gt(h){return function({file:e,children:i=u.jsx("code",{children:e}),...s}){const r=h(),n=u.jsxs("div",{className:"launch-editor-button-wrapper flex underline underline-offset-4",children:[i," ",u.jsx("svg",{height:24,width:24,children:u.jsx("use",{href:`${et}#Keyboard`})})]});return r?u.jsx("div",{className:"inline-block grow",children:u.jsx(H,{appFile:e,appName:r.name,...s,children:n})}):u.jsx(ut,{content:"App information not available",children:u.jsx("div",{className:"inline-block grow cursor-not-allowed",children:n})})}}export{Ut as M,Gt as c};
|
|
3
|
+
//# sourceMappingURL=mdx-vy-1-0a3.js.map
|