@burdenoff/microfe-technospam 2026.1102.1 → 2026.1102.3

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.
Files changed (133) hide show
  1. package/dist/generated/wspace-types.d.ts +7468 -141
  2. package/dist/generated/wspace-types.d.ts.map +1 -1
  3. package/dist/node_modules/@codemirror/autocomplete/dist/index.js +527 -0
  4. package/dist/node_modules/@codemirror/autocomplete/dist/index.js.map +1 -0
  5. package/dist/node_modules/@codemirror/commands/dist/index.js +1108 -0
  6. package/dist/node_modules/@codemirror/commands/dist/index.js.map +1 -0
  7. package/dist/node_modules/@codemirror/lang-go/dist/index.js +206 -0
  8. package/dist/node_modules/@codemirror/lang-go/dist/index.js.map +1 -0
  9. package/dist/node_modules/@codemirror/lang-javascript/dist/index.js +321 -0
  10. package/dist/node_modules/@codemirror/lang-javascript/dist/index.js.map +1 -0
  11. package/dist/node_modules/@codemirror/lang-python/dist/index.js +265 -0
  12. package/dist/node_modules/@codemirror/lang-python/dist/index.js.map +1 -0
  13. package/dist/node_modules/@codemirror/language/dist/index.js +957 -0
  14. package/dist/node_modules/@codemirror/language/dist/index.js.map +1 -0
  15. package/dist/node_modules/@codemirror/legacy-modes/mode/ruby.js +164 -0
  16. package/dist/node_modules/@codemirror/legacy-modes/mode/ruby.js.map +1 -0
  17. package/dist/node_modules/@codemirror/legacy-modes/mode/shell.js +109 -0
  18. package/dist/node_modules/@codemirror/legacy-modes/mode/shell.js.map +1 -0
  19. package/dist/node_modules/@codemirror/state/dist/index.js +1739 -0
  20. package/dist/node_modules/@codemirror/state/dist/index.js.map +1 -0
  21. package/dist/node_modules/@codemirror/streamparser/dist/index.js +70 -0
  22. package/dist/node_modules/@codemirror/streamparser/dist/index.js.map +1 -0
  23. package/dist/node_modules/@codemirror/view/dist/index.js +5427 -0
  24. package/dist/node_modules/@codemirror/view/dist/index.js.map +1 -0
  25. package/dist/node_modules/@lezer/common/dist/index.js +896 -0
  26. package/dist/node_modules/@lezer/common/dist/index.js.map +1 -0
  27. package/dist/node_modules/@lezer/go/dist/index.js +215 -0
  28. package/dist/node_modules/@lezer/go/dist/index.js.map +1 -0
  29. package/dist/node_modules/@lezer/highlight/dist/index.js +395 -0
  30. package/dist/node_modules/@lezer/highlight/dist/index.js.map +1 -0
  31. package/dist/node_modules/@lezer/javascript/dist/index.js +437 -0
  32. package/dist/node_modules/@lezer/javascript/dist/index.js.map +1 -0
  33. package/dist/node_modules/@lezer/lr/dist/index.js +842 -0
  34. package/dist/node_modules/@lezer/lr/dist/index.js.map +1 -0
  35. package/dist/node_modules/@lezer/python/dist/index.js +352 -0
  36. package/dist/node_modules/@lezer/python/dist/index.js.map +1 -0
  37. package/dist/node_modules/@marijn/find-cluster-break/src/index.js +66 -0
  38. package/dist/node_modules/@marijn/find-cluster-break/src/index.js.map +1 -0
  39. package/dist/node_modules/style-mod/src/style-mod.js +74 -0
  40. package/dist/node_modules/style-mod/src/style-mod.js.map +1 -0
  41. package/dist/node_modules/w3c-keyname/index.js +90 -0
  42. package/dist/node_modules/w3c-keyname/index.js.map +1 -0
  43. package/dist/stories/fixtures/technospamFixtures.d.ts.map +1 -1
  44. package/dist/stories/journeys/Problems.stories.d.ts.map +1 -1
  45. package/dist/technospam/TechnoSpamRoot.d.ts.map +1 -1
  46. package/dist/technospam/TechnoSpamRoot.js +187 -178
  47. package/dist/technospam/TechnoSpamRoot.js.map +1 -1
  48. package/dist/technospam/api/technospamApi.d.ts +39 -0
  49. package/dist/technospam/api/technospamApi.d.ts.map +1 -1
  50. package/dist/technospam/api/technospamApi.js +184 -150
  51. package/dist/technospam/api/technospamApi.js.map +1 -1
  52. package/dist/technospam/components/MediaCover.js +2 -2
  53. package/dist/technospam/components/MediaCover.js.map +1 -1
  54. package/dist/technospam/components/MobileSectionTabs.d.ts +9 -0
  55. package/dist/technospam/components/MobileSectionTabs.d.ts.map +1 -0
  56. package/dist/technospam/components/MobileSectionTabs.js +43 -0
  57. package/dist/technospam/components/MobileSectionTabs.js.map +1 -0
  58. package/dist/technospam/components/PageLayout.d.ts +7 -1
  59. package/dist/technospam/components/PageLayout.d.ts.map +1 -1
  60. package/dist/technospam/components/PageLayout.js +40 -28
  61. package/dist/technospam/components/PageLayout.js.map +1 -1
  62. package/dist/technospam/components/SubmissionViews.d.ts +6 -2
  63. package/dist/technospam/components/SubmissionViews.d.ts.map +1 -1
  64. package/dist/technospam/components/SubmissionViews.js +6 -5
  65. package/dist/technospam/components/SubmissionViews.js.map +1 -1
  66. package/dist/technospam/components/TechnoSpamErrorBoundary.d.ts +6 -0
  67. package/dist/technospam/components/TechnoSpamErrorBoundary.d.ts.map +1 -1
  68. package/dist/technospam/components/TechnoSpamErrorBoundary.js +2 -2
  69. package/dist/technospam/components/TechnoSpamErrorBoundary.js.map +1 -1
  70. package/dist/technospam/components/editor/CodeEditor.d.ts +26 -0
  71. package/dist/technospam/components/editor/CodeEditor.d.ts.map +1 -0
  72. package/dist/technospam/components/editor/CodeEditor.js +102 -0
  73. package/dist/technospam/components/editor/CodeEditor.js.map +1 -0
  74. package/dist/technospam/components/editor/RunOutputPanel.d.ts +14 -0
  75. package/dist/technospam/components/editor/RunOutputPanel.d.ts.map +1 -0
  76. package/dist/technospam/components/editor/RunOutputPanel.js +127 -0
  77. package/dist/technospam/components/editor/RunOutputPanel.js.map +1 -0
  78. package/dist/technospam/components/editor/editorLanguages.d.ts +11 -0
  79. package/dist/technospam/components/editor/editorLanguages.d.ts.map +1 -0
  80. package/dist/technospam/components/editor/editorLanguages.js +30 -0
  81. package/dist/technospam/components/editor/editorLanguages.js.map +1 -0
  82. package/dist/technospam/components/editor/editorTheme.d.ts +11 -0
  83. package/dist/technospam/components/editor/editorTheme.d.ts.map +1 -0
  84. package/dist/technospam/components/editor/editorTheme.js +120 -0
  85. package/dist/technospam/components/editor/editorTheme.js.map +1 -0
  86. package/dist/technospam/components/lesson/SaveCourseOffline.js +6 -6
  87. package/dist/technospam/hooks/usePhoneLayout.d.ts +18 -0
  88. package/dist/technospam/hooks/usePhoneLayout.d.ts.map +1 -0
  89. package/dist/technospam/hooks/usePhoneLayout.js +14 -0
  90. package/dist/technospam/hooks/usePhoneLayout.js.map +1 -0
  91. package/dist/technospam/hooks/useSolutionRunner.d.ts +35 -0
  92. package/dist/technospam/hooks/useSolutionRunner.d.ts.map +1 -0
  93. package/dist/technospam/hooks/useSolutionRunner.js +66 -0
  94. package/dist/technospam/hooks/useSolutionRunner.js.map +1 -0
  95. package/dist/technospam/hooks/useTechnoSpamAnalytics.d.ts +1 -1
  96. package/dist/technospam/hooks/useTechnoSpamAnalytics.d.ts.map +1 -1
  97. package/dist/technospam/hooks/useTechnoSpamAnalytics.js.map +1 -1
  98. package/dist/technospam/pages/AdminAdminDashboardPagePage.js +1 -1
  99. package/dist/technospam/pages/AdminAdminDashboardPagePage.js.map +1 -1
  100. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.d.ts.map +1 -1
  101. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +416 -263
  102. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
  103. package/dist/technospam/pages/ApplicationsProblemsPagePage.d.ts.map +1 -1
  104. package/dist/technospam/pages/ApplicationsProblemsPagePage.js +89 -87
  105. package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
  106. package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +3 -3
  107. package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
  108. package/dist/technospam/pages/CoursesCoursesPagePage.d.ts.map +1 -1
  109. package/dist/technospam/pages/CoursesCoursesPagePage.js +117 -81
  110. package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
  111. package/dist/technospam/pages/CoursesMyLearningPagePage.js +1 -1
  112. package/dist/technospam/pages/CoursesMyLearningPagePage.js.map +1 -1
  113. package/dist/technospam/pages/DashboardDashboardPagePage.d.ts.map +1 -1
  114. package/dist/technospam/pages/DashboardDashboardPagePage.js +21 -17
  115. package/dist/technospam/pages/DashboardDashboardPagePage.js.map +1 -1
  116. package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js +3 -3
  117. package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js.map +1 -1
  118. package/dist/technospam/pages/MentorshipMentorProfilePagePage.js +4 -4
  119. package/dist/technospam/pages/MentorshipMentorProfilePagePage.js.map +1 -1
  120. package/dist/technospam/pages/MentorshipMentorsPagePage.d.ts.map +1 -1
  121. package/dist/technospam/pages/MentorshipMentorsPagePage.js +6 -4
  122. package/dist/technospam/pages/MentorshipMentorsPagePage.js.map +1 -1
  123. package/dist/technospam/pages/MentorshipSessionsPagePage.js +1 -1
  124. package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
  125. package/dist/technospam/types/index.d.ts +7 -0
  126. package/dist/technospam/types/index.d.ts.map +1 -1
  127. package/dist/technospam/utils/mobileTabs.d.ts +45 -0
  128. package/dist/technospam/utils/mobileTabs.d.ts.map +1 -0
  129. package/dist/technospam/utils/mobileTabs.js +70 -0
  130. package/dist/technospam/utils/mobileTabs.js.map +1 -0
  131. package/dist/test/matchMedia.d.ts +6 -0
  132. package/dist/test/matchMedia.d.ts.map +1 -0
  133. package/package.json +16 -6
@@ -6,73 +6,76 @@ import { StatCard as a } from "../components/StatCard.js";
6
6
  import { formatDateTime as o, humanizeEnum as s } from "../utils/format.js";
7
7
  import { StatusBadge as c } from "../components/StatusBadge.js";
8
8
  import { PremiumBadge as ee, UpgradeGate as l } from "../components/UpgradeGate.js";
9
- import { EmptyView as te, ErrorView as u, LoadingRows as ne } from "../components/StateViews.js";
10
- import { TagStrip as re } from "../components/TagStrip.js";
11
- import { CodePanel as ie, IoBlock as d, TestResultsPanel as ae } from "../components/SubmissionViews.js";
12
- import { notify as f } from "../lib/toast.js";
13
- import { useProblemQuery as oe, useRegradeSubmission as se, useSubmissionsQuery as ce, useSubmitSolution as le } from "../api/technospamApi.js";
14
- import { SubmissionReviewPanel as ue } from "../components/SubmissionReviewPanel.js";
9
+ import { EmptyView as te, ErrorView as ne, LoadingRows as re } from "../components/StateViews.js";
10
+ import { TagStrip as ie } from "../components/TagStrip.js";
11
+ import { CodePanel as ae, IoBlock as oe, TestResultsPanel as se } from "../components/SubmissionViews.js";
12
+ import { notify as u } from "../lib/toast.js";
13
+ import { useProblemQuery as ce, useRegradeSubmission as le, useSubmissionsQuery as ue, useSubmitSolution as de } from "../api/technospamApi.js";
14
+ import { SubmissionReviewPanel as fe } from "../components/SubmissionReviewPanel.js";
15
+ import { TechnoSpamErrorBoundary as pe } from "../components/TechnoSpamErrorBoundary.js";
15
16
  import "../components/index.js";
16
- import { FOCUS_PARAMS as de } from "../utils/pageContext.js";
17
- import { focusableCardProps as p, useFocusedRecordParam as fe } from "../hooks/useFocusedRecordParam.js";
18
- import { useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
19
- import { Clock as v, Code2 as y, FileText as b, FlaskConical as pe, Layers as x, RefreshCw as S, Send as me, Sparkles as he, Trophy as C } from "lucide-react";
20
- import { useSearchParams as ge } from "react-router";
21
- import { Fragment as _e, jsx as w, jsxs as T } from "react/jsx-runtime";
22
- import { Badge as ve, Button as E, GlassCard as D, Select as ye, SelectContent as be, SelectItem as xe, SelectTrigger as Se, SelectValue as Ce, Skeleton as O, Textarea as we } from "@burdenoff/fe-libs/ui";
17
+ import { FOCUS_PARAMS as me } from "../utils/pageContext.js";
18
+ import { useSolutionRunner as he } from "../hooks/useSolutionRunner.js";
19
+ import { RunOutputPanel as ge } from "../components/editor/RunOutputPanel.js";
20
+ import { focusableCardProps as d, useFocusedRecordParam as _e } from "../hooks/useFocusedRecordParam.js";
21
+ import { Suspense as ve, lazy as f, useEffect as p, useMemo as ye, useRef as be, useState as m } from "react";
22
+ import { BookOpen as xe, Clock as h, Code2 as g, FileText as _, FlaskConical as Se, Layers as v, Play as Ce, RefreshCw as y, RotateCcw as we, Send as Te, Sparkles as Ee, Terminal as b, Trophy as x } from "lucide-react";
23
+ import { useSearchParams as De } from "react-router";
24
+ import { Fragment as Oe, jsx as S, jsxs as C } from "react/jsx-runtime";
25
+ import { Badge as ke, Button as w, GlassCard as T, Select as Ae, SelectContent as je, SelectItem as Me, SelectTrigger as Ne, SelectValue as Pe, Skeleton as E, Textarea as D } from "@burdenoff/fe-libs/ui";
23
26
  //#region src/technospam/pages/ApplicationsProblemDetailsPagePage.tsx
24
- var k = [
27
+ var O = [
25
28
  "javascript",
26
29
  "python",
27
30
  "typescript"
28
- ], Te = 3e3, Ee = 3 * 6e4;
29
- function De({ s: e, focused: t, onToggle: n }) {
30
- return /* @__PURE__ */ T("div", {
31
+ ], Fe = f(() => import("../components/editor/CodeEditor.js")), Ie = 3e3, Le = 3 * 6e4;
32
+ function Re({ s: e, focused: t, onToggle: n }) {
33
+ return /* @__PURE__ */ C("div", {
31
34
  className: r("cursor-pointer rounded-lg border border-transparent px-2 py-3 transition-colors hover:border-border-seam hover:bg-bg-sunken", t && "ring-2 ring-accent-primary"),
32
- ...p(t, n),
33
- children: [/* @__PURE__ */ T("div", {
35
+ ...d(t, n),
36
+ children: [/* @__PURE__ */ C("div", {
34
37
  className: "flex flex-wrap items-center gap-x-4 gap-y-1",
35
38
  children: [
36
- /* @__PURE__ */ w("button", {
39
+ /* @__PURE__ */ S("button", {
37
40
  type: "button",
38
41
  "aria-pressed": t,
39
42
  "aria-label": `Focus submission from ${o(e.createdAt)}`,
40
43
  onClick: n,
41
44
  className: "rounded-full",
42
- children: /* @__PURE__ */ w(c, { status: e.verdict })
45
+ children: /* @__PURE__ */ S(c, { status: e.verdict })
43
46
  }),
44
- /* @__PURE__ */ T("span", {
47
+ /* @__PURE__ */ C("span", {
45
48
  className: "inline-flex items-center gap-1 text-sm font-medium text-text-primary",
46
49
  children: [
47
- /* @__PURE__ */ w(y, { size: 13 }),
50
+ /* @__PURE__ */ S(g, { size: 13 }),
48
51
  " ",
49
52
  s(e.language)
50
53
  ]
51
54
  }),
52
- /* @__PURE__ */ T("span", {
55
+ /* @__PURE__ */ C("span", {
53
56
  className: "inline-flex items-center gap-1 text-xs text-text-muted",
54
57
  children: [
55
- /* @__PURE__ */ w(v, { size: 12 }),
58
+ /* @__PURE__ */ S(h, { size: 12 }),
56
59
  " ",
57
60
  e.runtimeMs,
58
61
  " ms"
59
62
  ]
60
63
  }),
61
- /* @__PURE__ */ T("span", {
64
+ /* @__PURE__ */ C("span", {
62
65
  className: "inline-flex items-center gap-1 text-xs text-text-muted",
63
66
  children: [
64
- /* @__PURE__ */ w(C, { size: 12 }),
67
+ /* @__PURE__ */ S(x, { size: 12 }),
65
68
  " ",
66
69
  e.pointsAwarded,
67
70
  " pts"
68
71
  ]
69
72
  }),
70
- /* @__PURE__ */ w("span", {
73
+ /* @__PURE__ */ S("span", {
71
74
  className: "ml-auto text-xs text-text-muted",
72
75
  children: o(e.createdAt)
73
76
  })
74
77
  ]
75
- }), e.totalCount > 0 ? /* @__PURE__ */ T("p", {
78
+ }), e.totalCount > 0 ? /* @__PURE__ */ C("p", {
76
79
  className: "mt-1 px-0.5 text-xs text-text-muted",
77
80
  children: [
78
81
  "Passed ",
@@ -84,297 +87,286 @@ function De({ s: e, focused: t, onToggle: n }) {
84
87
  }) : null]
85
88
  });
86
89
  }
87
- function A() {
88
- let [r] = ge(), o = r.get("id") ?? "", [p, A] = fe(de.submission), { currentUser: Oe, workspaceId: j } = e(), ke = t(), M = Oe?.id, { emit: N } = n(), { data: Ae, loading: je, error: P, refetch: F } = oe(o);
89
- m(() => {
90
- o && N("technospam.problem.viewed", {
91
- workspaceId: j,
92
- entityId: o,
90
+ function k() {
91
+ let [o] = De(), d = o.get("id") ?? "", [f, k] = _e(me.submission), { currentUser: ze, workspaceId: A } = e(), Be = t(), Ve = ze?.id, { emit: j } = n(), { data: He, loading: Ue, error: M, refetch: N } = ce(d);
92
+ p(() => {
93
+ d && j("technospam.problem.viewed", {
94
+ workspaceId: A,
95
+ entityId: d,
93
96
  entityType: "TEC_PROBLEM"
94
97
  });
95
98
  }, [
96
- o,
97
- j,
98
- N
99
+ d,
100
+ A,
101
+ j
99
102
  ]);
100
- let { data: I, loading: Me, error: L, refetch: R } = ce({
101
- ...M ? { learnerId: M } : {},
102
- problemId: o
103
- }), [Ne, { loading: z }] = le(), [Pe, { loading: B }] = se(), V = Ae?.tecProblem ?? null, H = h(() => V?.languages?.length ? V.languages : k, [V]), [U, W] = _(""), [G, K] = _(""), q = g(!1);
104
- m(() => {
105
- V && !q.current && (W(V.languages[0] ?? k[0]), K(V.starterCode ?? ""), q.current = !0);
106
- }, [V]);
107
- let J = h(() => [...I?.tecListSubmissions?.items ?? []].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()), [I]), Fe = async () => {
108
- if (!o) return;
109
- if (!U) {
110
- f.error("Pick a language", "Choose a language before submitting.");
103
+ let { data: P, loading: We, error: F, refetch: I } = ue({
104
+ ...Ve ? { learnerId: Ve } : {},
105
+ problemId: d
106
+ }), [Ge, { loading: L }] = de(), [Ke, { loading: R }] = le(), z = He?.tecProblem ?? null, B = ye(() => z?.languages?.length ? z.languages : O, [z]), [V, H] = m(""), [U, W] = m(""), [G, K] = m(!1), [qe, Je] = m(""), [q, Ye] = m("description"), J = he(), Xe = be(null), Ze = J.reset;
107
+ p(() => {
108
+ z && Xe.current !== z.id && (H(z.languages[0] ?? O[0]), W(z.starterCode ?? ""), Je(z.publicTestCases?.[0]?.input ?? ""), K(!1), Ze(), Xe.current = z.id);
109
+ }, [z, Ze]);
110
+ let Qe = (e) => {
111
+ H(e), J.reset();
112
+ }, Y = ye(() => [...P?.tecListSubmissions?.items ?? []].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()), [P]), $e = () => {
113
+ if (!(!d || J.running || J.warming || z?.isLocked)) {
114
+ if (!V) {
115
+ u.error("Pick a language", "Choose a language before running your code.");
116
+ return;
117
+ }
118
+ if (!U.trim()) {
119
+ u.error("Add your solution", "Write some code before running it.");
120
+ return;
121
+ }
122
+ j("technospam.problem.run_clicked", {
123
+ workspaceId: A,
124
+ entityId: d,
125
+ entityType: "TEC_PROBLEM",
126
+ language: V,
127
+ customInput: G
128
+ }), J.execute({
129
+ problemId: d,
130
+ language: V,
131
+ code: U,
132
+ stdin: G ? qe : null
133
+ });
134
+ }
135
+ }, et = () => {
136
+ W(z?.starterCode ?? ""), J.reset();
137
+ }, tt = async () => {
138
+ if (!d || L || z?.isLocked) return;
139
+ if (!V) {
140
+ u.error("Pick a language", "Choose a language before submitting.");
111
141
  return;
112
142
  }
113
- if (!G.trim()) {
114
- f.error("Add your solution", "Write some code before submitting.");
143
+ if (!U.trim()) {
144
+ u.error("Add your solution", "Write some code before submitting.");
115
145
  return;
116
146
  }
117
- N("technospam.problem.submit_clicked", {
118
- workspaceId: j,
119
- entityId: o,
147
+ j("technospam.problem.submit_clicked", {
148
+ workspaceId: A,
149
+ entityId: d,
120
150
  entityType: "TEC_PROBLEM",
121
- language: U
151
+ language: V
122
152
  });
123
- let e = await Ne({ variables: { input: {
124
- problemId: o,
125
- language: U,
126
- code: G
153
+ let e = await Ge({ variables: { input: {
154
+ problemId: d,
155
+ language: V,
156
+ code: U
127
157
  } } });
128
158
  if (e.data?.tecSubmitSolution) {
129
- N("technospam.problem.submitted", {
130
- workspaceId: j,
131
- entityId: o,
159
+ j("technospam.problem.submitted", {
160
+ workspaceId: A,
161
+ entityId: d,
132
162
  entityType: "TEC_PROBLEM",
133
163
  submissionId: e.data.tecSubmitSolution.id
134
164
  });
135
165
  let t = e.data.tecSubmitSolution;
136
- t.verdict === "PENDING" ? f.info("Solution submitted", "Grading has started — your verdict will appear here in a moment.") : t.verdict === "ACCEPTED" ? f.success("Accepted", `Passed all ${t.totalCount} test cases.`) : f.error(s(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), await Promise.all([F(), R()]);
166
+ t.verdict === "PENDING" ? u.info("Solution submitted", "Grading has started — your verdict will appear here in a moment.") : t.verdict === "ACCEPTED" ? u.success("Accepted", `Passed all ${t.totalCount} test cases.`) : u.error(s(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), await Promise.all([N(), I()]);
137
167
  }
138
- }, Ie = async (e) => {
139
- let t = (await Pe({ variables: { id: e } })).data?.tecRegradeSubmission;
140
- t && (t.verdict === "PENDING" ? f.error("Still pending", "The grader is not available yet. Please try again shortly.") : f.success("Grading complete", `Verdict: ${s(t.verdict)}.`), await Promise.all([F(), R()]));
141
- }, Y = J.find((e) => (e.testResults?.length ?? 0) > 0) ?? null, X = J[0] ?? null, Z = X?.verdict === "PENDING" ? X.id : null, [Q, Le] = _(null), Re = Z !== null && Q !== Z;
142
- m(() => {
168
+ }, nt = async (e) => {
169
+ let t = (await Ke({ variables: { id: e } })).data?.tecRegradeSubmission;
170
+ t && (t.verdict === "PENDING" ? u.error("Still pending", "The grader is not available yet. Please try again shortly.") : u.success("Grading complete", `Verdict: ${s(t.verdict)}.`), await Promise.all([N(), I()]));
171
+ }, X = Y.find((e) => (e.testResults?.length ?? 0) > 0) ?? null, rt = Y[0] ?? null, Z = rt?.verdict === "PENDING" ? rt.id : null, [Q, it] = m(null), at = Z !== null && Q !== Z;
172
+ p(() => {
143
173
  if (!Z || Q === Z) return;
144
174
  let e = Date.now(), t = window.setInterval(() => {
145
- if (Date.now() - e > Ee) {
146
- window.clearInterval(t), Le(Z);
175
+ if (Date.now() - e > Le) {
176
+ window.clearInterval(t), it(Z);
147
177
  return;
148
178
  }
149
- R();
150
- }, Te);
179
+ I();
180
+ }, Ie);
151
181
  return () => window.clearInterval(t);
152
182
  }, [
153
183
  Z,
154
184
  Q,
155
- R
185
+ I
156
186
  ]);
157
- let $ = g(null);
158
- return m(() => {
187
+ let $ = be(null);
188
+ return p(() => {
159
189
  if (Z) {
160
190
  $.current = Z;
161
191
  return;
162
192
  }
163
193
  let e = $.current;
164
194
  if (!e) return;
165
- let t = J.find((t) => t.id === e);
166
- !t || t.verdict === "PENDING" || ($.current = null, t.verdict === "ACCEPTED" ? f.success("Accepted", `Passed all ${t.totalCount} test cases.`) : f.error(s(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), F());
195
+ let t = Y.find((t) => t.id === e);
196
+ !t || t.verdict === "PENDING" || ($.current = null, t.verdict === "ACCEPTED" ? u.success("Accepted", `Passed all ${t.totalCount} test cases.`) : u.error(s(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), N());
167
197
  }, [
168
198
  Z,
169
- J,
170
- F
171
- ]), je && !V ? /* @__PURE__ */ T(i, {
199
+ Y,
200
+ N
201
+ ]), Ue && !z ? /* @__PURE__ */ C(i, {
172
202
  title: "Problem",
173
203
  backPath: "/applications/problems-page",
174
- children: [/* @__PURE__ */ w(O, { className: "mb-4 h-28 w-full rounded-xl" }), /* @__PURE__ */ w(O, { className: "h-72 w-full rounded-xl" })]
175
- }) : P || !V ? /* @__PURE__ */ w(i, {
204
+ children: [/* @__PURE__ */ S(E, { className: "mb-4 h-28 w-full rounded-xl" }), /* @__PURE__ */ S(E, { className: "h-72 w-full rounded-xl" })]
205
+ }) : M || !z ? /* @__PURE__ */ S(i, {
176
206
  title: "Problem",
177
207
  backPath: "/applications/problems-page",
178
- children: P ? /* @__PURE__ */ w(u, {
208
+ children: M ? /* @__PURE__ */ S(ne, {
179
209
  title: "Couldn't load problem",
180
- error: P
181
- }) : /* @__PURE__ */ w(te, {
210
+ error: M
211
+ }) : /* @__PURE__ */ S(te, {
182
212
  title: "Problem not found",
183
213
  description: "This problem may have been unpublished."
184
214
  })
185
- }) : /* @__PURE__ */ T(i, {
215
+ }) : /* @__PURE__ */ C(i, {
186
216
  hero: !0,
187
217
  backPath: "/applications/problems-page",
188
- title: V.title,
189
- description: V.topic ?? void 0,
218
+ title: z.title,
219
+ description: z.topic ?? void 0,
190
220
  children: [
191
- /* @__PURE__ */ T("div", {
221
+ /* @__PURE__ */ C("div", {
192
222
  className: "mb-5 flex flex-wrap items-center gap-2",
193
223
  children: [
194
- /* @__PURE__ */ w(c, {
195
- status: V.difficulty,
224
+ /* @__PURE__ */ S(c, {
225
+ status: z.difficulty,
196
226
  kind: "level"
197
227
  }),
198
- /* @__PURE__ */ w(c, { status: V.status }),
199
- V.topic ? /* @__PURE__ */ T(ve, {
228
+ /* @__PURE__ */ S(c, { status: z.status }),
229
+ z.topic ? /* @__PURE__ */ C(ke, {
200
230
  variant: "outline",
201
231
  className: "gap-1",
202
232
  children: [
203
- /* @__PURE__ */ w(x, { size: 12 }),
233
+ /* @__PURE__ */ S(v, { size: 12 }),
204
234
  " ",
205
- V.topic
235
+ z.topic
206
236
  ]
207
237
  }) : null,
208
- V.isPremiumOnly ? /* @__PURE__ */ w(ee, { locked: V.isLocked }) : null,
209
- /* @__PURE__ */ w(re, { tags: V.tags })
238
+ z.isPremiumOnly ? /* @__PURE__ */ S(ee, { locked: z.isLocked }) : null,
239
+ /* @__PURE__ */ S(ie, { tags: z.tags })
210
240
  ]
211
241
  }),
212
- /* @__PURE__ */ T("div", {
242
+ /* @__PURE__ */ C("div", {
213
243
  className: "mb-6 grid grid-cols-2 gap-3 sm:grid-cols-4",
214
244
  children: [
215
- /* @__PURE__ */ w(a, {
245
+ /* @__PURE__ */ S(a, {
216
246
  label: "Points",
217
- value: V.points,
218
- icon: C,
247
+ value: z.points,
248
+ icon: x,
219
249
  tone: "amber"
220
250
  }),
221
- /* @__PURE__ */ w(a, {
251
+ /* @__PURE__ */ S(a, {
222
252
  label: "Languages",
223
- value: H.length,
224
- icon: y,
253
+ value: B.length,
254
+ icon: g,
225
255
  tone: "blue"
226
256
  }),
227
- /* @__PURE__ */ w(a, {
257
+ /* @__PURE__ */ S(a, {
228
258
  label: "Difficulty",
229
- value: s(V.difficulty),
230
- icon: x,
259
+ value: s(z.difficulty),
260
+ icon: v,
231
261
  tone: "purple"
232
262
  }),
233
- /* @__PURE__ */ w(a, {
263
+ /* @__PURE__ */ S(a, {
234
264
  label: "My submissions",
235
- value: J.length,
236
- icon: b,
265
+ value: Y.length,
266
+ icon: _,
237
267
  tone: "teal"
238
268
  })
239
269
  ]
240
270
  }),
241
- /* @__PURE__ */ T("div", {
242
- className: "grid grid-cols-1 gap-5 lg:grid-cols-3",
243
- children: [/* @__PURE__ */ T("div", {
244
- className: "space-y-5 lg:col-span-2",
271
+ /* @__PURE__ */ S("div", {
272
+ role: "tablist",
273
+ "aria-label": "Problem sections",
274
+ className: "mb-4 grid grid-cols-2 gap-1 rounded-xl border border-border-seam bg-bg-sunken p-1 lg:hidden",
275
+ children: [{
276
+ pane: "description",
277
+ label: "Description",
278
+ icon: xe
279
+ }, {
280
+ pane: "solution",
281
+ label: "Solution",
282
+ icon: g
283
+ }].map(({ pane: e, label: t, icon: n }) => /* @__PURE__ */ C("button", {
284
+ type: "button",
285
+ role: "tab",
286
+ id: `problem-tab-${e}`,
287
+ "aria-selected": q === e,
288
+ "aria-controls": `problem-pane-${e}`,
289
+ onClick: () => Ye(e),
290
+ className: r("inline-flex items-center justify-center gap-1.5 rounded-lg px-3 py-2 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus", q === e ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"),
245
291
  children: [
246
- /* @__PURE__ */ T(D, {
292
+ /* @__PURE__ */ S(n, { size: 14 }),
293
+ " ",
294
+ t
295
+ ]
296
+ }, e))
297
+ }),
298
+ /* @__PURE__ */ C("div", {
299
+ className: "grid grid-cols-1 gap-5 lg:grid-cols-2",
300
+ children: [/* @__PURE__ */ C("div", {
301
+ id: "problem-pane-description",
302
+ role: "tabpanel",
303
+ "aria-labelledby": "problem-tab-description",
304
+ className: r("min-w-0 space-y-5", q !== "description" && "hidden lg:block"),
305
+ children: [
306
+ /* @__PURE__ */ C(T, {
247
307
  className: "p-5",
248
- children: [/* @__PURE__ */ w("h2", {
308
+ children: [/* @__PURE__ */ S("h2", {
249
309
  className: "mb-2 text-base font-semibold text-text-primary",
250
310
  children: "Problem statement"
251
- }), V.isLocked ? /* @__PURE__ */ w(l, { description: "This problem's statement is part of a paid TechnoSpam plan. Ask a workspace admin to upgrade to unlock it." }) : V.statement ? /* @__PURE__ */ w("p", {
311
+ }), z.isLocked ? /* @__PURE__ */ S(l, { description: "This problem's statement is part of a paid TechnoSpam plan. Ask a workspace admin to upgrade to unlock it." }) : z.statement ? /* @__PURE__ */ S("p", {
252
312
  className: "whitespace-pre-wrap text-sm leading-relaxed text-text-secondary",
253
- children: V.statement
254
- }) : /* @__PURE__ */ w("p", {
313
+ children: z.statement
314
+ }) : /* @__PURE__ */ S("p", {
255
315
  className: "py-4 text-center text-sm text-text-muted",
256
316
  children: "The statement for this problem is being prepared."
257
317
  })]
258
318
  }),
259
- V.isLocked ? /* @__PURE__ */ w(l, {
319
+ z.isLocked ? /* @__PURE__ */ S(l, {
260
320
  compact: !0,
261
321
  description: "Starter code and sample test cases unlock with a paid TechnoSpam plan."
262
- }) : V.starterCode ? /* @__PURE__ */ T(D, {
263
- className: "p-5",
264
- children: [/* @__PURE__ */ w("h2", {
265
- className: "mb-3 text-base font-semibold text-text-primary",
266
- children: "Starter code"
267
- }), /* @__PURE__ */ w(ie, {
268
- label: s(H[0] ?? "code"),
269
- bodyClassName: "max-h-72",
270
- children: V.starterCode
271
- })]
272
322
  }) : null,
273
- /* @__PURE__ */ T(D, {
274
- className: "p-5",
275
- children: [
276
- /* @__PURE__ */ T("div", {
277
- className: "mb-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",
278
- children: [/* @__PURE__ */ w("h2", {
279
- className: "text-base font-semibold text-text-primary",
280
- children: "Submit a solution"
281
- }), /* @__PURE__ */ T("div", {
282
- className: "flex items-center gap-2",
283
- children: [/* @__PURE__ */ w("span", {
284
- className: "text-sm text-text-secondary",
285
- children: "Language"
286
- }), /* @__PURE__ */ T(ye, {
287
- value: U,
288
- onValueChange: W,
289
- children: [/* @__PURE__ */ w(Se, {
290
- className: "w-full sm:w-48",
291
- "aria-label": "Language",
292
- children: /* @__PURE__ */ w(Ce, { placeholder: "Choose a language" })
293
- }), /* @__PURE__ */ w(be, { children: H.map((e) => /* @__PURE__ */ w(xe, {
294
- value: e,
295
- children: s(e)
296
- }, e)) })]
297
- })]
298
- })]
299
- }),
300
- /* @__PURE__ */ T("div", {
301
- className: "overflow-hidden rounded-xl border border-border-strong bg-bg-sunken shadow-sm",
302
- children: [/* @__PURE__ */ T("div", {
303
- className: "flex items-center justify-between gap-2 border-b border-border-seam bg-bg-canvas/40 px-4 py-2",
304
- children: [/* @__PURE__ */ T("div", {
305
- className: "flex items-center gap-1.5",
306
- children: [
307
- /* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-border" }),
308
- /* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-border" }),
309
- /* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-border" })
310
- ]
311
- }), /* @__PURE__ */ T("span", {
312
- className: "inline-flex items-center gap-1.5 font-mono text-xs text-text-secondary",
313
- children: [
314
- /* @__PURE__ */ w(y, { size: 13 }),
315
- " ",
316
- U ? s(U) : "solution"
317
- ]
318
- })]
319
- }), /* @__PURE__ */ w(we, {
320
- value: G,
321
- onChange: (e) => K(e.target.value),
322
- placeholder: "Write your solution…",
323
- className: "min-h-[280px] resize-y rounded-none border-0 bg-transparent font-mono text-xs leading-relaxed focus-visible:ring-0 focus-visible:ring-offset-0",
324
- spellCheck: !1
325
- })]
326
- }),
327
- /* @__PURE__ */ T(E, {
328
- className: "mt-4 w-full",
329
- onClick: Fe,
330
- disabled: z || !G.trim(),
331
- children: [
332
- /* @__PURE__ */ w(me, { size: 16 }),
333
- " ",
334
- z ? "Running test cases…" : "Run & submit"
335
- ]
336
- }),
337
- /* @__PURE__ */ w("p", {
338
- className: "mt-2 text-center text-xs text-text-muted",
339
- children: "Your code runs against this problem's test cases in an isolated sandbox."
340
- })
341
- ]
342
- }),
343
- V.publicTestCases?.length ? /* @__PURE__ */ T(D, {
323
+ z.publicTestCases?.length ? /* @__PURE__ */ C(T, {
344
324
  className: "p-5",
345
325
  children: [
346
- /* @__PURE__ */ T("h2", {
326
+ /* @__PURE__ */ C("h2", {
347
327
  className: "mb-1 flex items-center gap-2 text-base font-semibold text-text-primary",
348
- children: [/* @__PURE__ */ w(pe, { size: 16 }), " Sample test cases"]
328
+ children: [/* @__PURE__ */ S(Se, { size: 16 }), " Sample test cases"]
349
329
  }),
350
- /* @__PURE__ */ w("p", {
330
+ /* @__PURE__ */ C("p", {
351
331
  className: "mb-3 text-sm text-text-secondary",
352
- children: "Your solution reads each input from stdin and must print the expected output. Hidden test cases are also run when you submit."
332
+ children: [
333
+ "Your solution reads each input from stdin and must print the expected output.",
334
+ /* @__PURE__ */ S("strong", {
335
+ className: "font-medium text-text-primary",
336
+ children: " Run"
337
+ }),
338
+ " checks these samples; ",
339
+ /* @__PURE__ */ S("strong", {
340
+ className: "font-medium text-text-primary",
341
+ children: "Submit"
342
+ }),
343
+ " also runs the hidden test cases."
344
+ ]
353
345
  }),
354
- /* @__PURE__ */ w("div", {
346
+ /* @__PURE__ */ S("div", {
355
347
  className: "space-y-3",
356
- children: V.publicTestCases.map((e) => /* @__PURE__ */ T("div", {
348
+ children: z.publicTestCases.map((e) => /* @__PURE__ */ C("div", {
357
349
  className: "rounded-xl border border-border-seam p-3",
358
- children: [/* @__PURE__ */ T("div", {
350
+ children: [/* @__PURE__ */ C("div", {
359
351
  className: "mb-2 flex flex-wrap items-center gap-x-3 gap-y-1",
360
- children: [/* @__PURE__ */ w("span", {
352
+ children: [/* @__PURE__ */ S("span", {
361
353
  className: "text-sm font-medium text-text-primary",
362
354
  children: e.name
363
- }), /* @__PURE__ */ T("span", {
355
+ }), /* @__PURE__ */ C("span", {
364
356
  className: "inline-flex items-center gap-1 text-xs text-text-muted",
365
357
  children: [
366
- /* @__PURE__ */ w(v, { size: 12 }),
358
+ /* @__PURE__ */ S(h, { size: 12 }),
367
359
  " ",
368
360
  e.timeLimitMs,
369
361
  " ms limit"
370
362
  ]
371
363
  })]
372
- }), /* @__PURE__ */ T("div", {
364
+ }), /* @__PURE__ */ C("div", {
373
365
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
374
- children: [/* @__PURE__ */ w(d, {
366
+ children: [/* @__PURE__ */ S(oe, {
375
367
  label: "Input",
376
368
  value: e.input
377
- }), /* @__PURE__ */ w(d, {
369
+ }), /* @__PURE__ */ S(oe, {
378
370
  label: "Expected output",
379
371
  value: e.expectedOutput
380
372
  })]
@@ -383,83 +375,244 @@ function A() {
383
375
  })
384
376
  ]
385
377
  }) : null,
386
- Z ? /* @__PURE__ */ T(D, {
378
+ !z.isLocked && z.starterCode ? /* @__PURE__ */ C(T, {
379
+ className: "p-5",
380
+ children: [/* @__PURE__ */ S("h2", {
381
+ className: "mb-3 text-base font-semibold text-text-primary",
382
+ children: "Starter code"
383
+ }), /* @__PURE__ */ S(ae, {
384
+ label: s(B[0] ?? "code"),
385
+ bodyClassName: "max-h-72",
386
+ children: z.starterCode
387
+ })]
388
+ }) : null
389
+ ]
390
+ }), /* @__PURE__ */ C("div", {
391
+ id: "problem-pane-solution",
392
+ role: "tabpanel",
393
+ "aria-labelledby": "problem-tab-solution",
394
+ className: r("min-w-0 space-y-5", q !== "solution" && "hidden lg:block"),
395
+ children: [
396
+ /* @__PURE__ */ C(T, {
397
+ className: "p-5",
398
+ children: [
399
+ /* @__PURE__ */ C("div", {
400
+ className: "mb-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",
401
+ children: [/* @__PURE__ */ C("h2", {
402
+ className: "inline-flex items-center gap-2 text-base font-semibold text-text-primary",
403
+ children: [/* @__PURE__ */ S(g, { size: 16 }), " Solve"]
404
+ }), /* @__PURE__ */ C("div", {
405
+ className: "flex items-center gap-2",
406
+ children: [
407
+ /* @__PURE__ */ S("span", {
408
+ className: "text-sm text-text-secondary",
409
+ children: "Language"
410
+ }),
411
+ /* @__PURE__ */ C(Ae, {
412
+ value: V,
413
+ onValueChange: Qe,
414
+ children: [/* @__PURE__ */ S(Ne, {
415
+ className: "w-full sm:w-44",
416
+ "aria-label": "Language",
417
+ children: /* @__PURE__ */ S(Pe, { placeholder: "Choose a language" })
418
+ }), /* @__PURE__ */ S(je, { children: B.map((e) => /* @__PURE__ */ S(Me, {
419
+ value: e,
420
+ children: s(e)
421
+ }, e)) })]
422
+ }),
423
+ /* @__PURE__ */ S(w, {
424
+ variant: "ghost",
425
+ size: "icon",
426
+ onClick: et,
427
+ "aria-label": "Reset to starter code",
428
+ title: "Reset to starter code",
429
+ children: /* @__PURE__ */ S(we, { size: 16 })
430
+ })
431
+ ]
432
+ })]
433
+ }),
434
+ /* @__PURE__ */ C("div", {
435
+ className: "overflow-hidden rounded-xl border border-border-strong bg-bg-sunken shadow-sm focus-within:ring-2 focus-within:ring-border-focus",
436
+ children: [/* @__PURE__ */ C("div", {
437
+ className: "flex items-center justify-between gap-2 border-b border-border-seam bg-bg-canvas/40 px-4 py-2",
438
+ children: [/* @__PURE__ */ C("div", {
439
+ className: "flex items-center gap-1.5",
440
+ "aria-hidden": "true",
441
+ children: [
442
+ /* @__PURE__ */ S("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-border" }),
443
+ /* @__PURE__ */ S("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-border" }),
444
+ /* @__PURE__ */ S("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-border" })
445
+ ]
446
+ }), /* @__PURE__ */ C("span", {
447
+ className: "inline-flex items-center gap-1.5 font-mono text-xs text-text-secondary",
448
+ children: [
449
+ /* @__PURE__ */ S(g, { size: 13 }),
450
+ " ",
451
+ V ? s(V) : "solution"
452
+ ]
453
+ })]
454
+ }), /* @__PURE__ */ S(pe, {
455
+ fallback: /* @__PURE__ */ S(D, {
456
+ value: U,
457
+ onChange: (e) => W(e.target.value),
458
+ "aria-label": `Solution code${V ? ` (${s(V)})` : ""}`,
459
+ placeholder: "Write your solution…",
460
+ spellCheck: !1,
461
+ className: "h-[360px] resize-none rounded-none border-0 font-mono text-xs lg:h-[440px]"
462
+ }),
463
+ children: /* @__PURE__ */ S(ve, {
464
+ fallback: /* @__PURE__ */ S(E, { className: "h-[360px] w-full rounded-none lg:h-[440px]" }),
465
+ children: /* @__PURE__ */ S(Fe, {
466
+ value: U,
467
+ onChange: W,
468
+ language: V,
469
+ ariaLabel: `Solution code${V ? ` (${s(V)})` : ""}`,
470
+ placeholder: "Write your solution…",
471
+ onRun: $e,
472
+ onSubmit: () => void tt(),
473
+ className: "h-[360px] text-xs lg:h-[440px]"
474
+ })
475
+ })
476
+ })]
477
+ }),
478
+ /* @__PURE__ */ C("div", {
479
+ className: "mt-3",
480
+ children: [/* @__PURE__ */ C("label", {
481
+ className: "inline-flex cursor-pointer items-center gap-2 text-sm text-text-secondary",
482
+ children: [
483
+ /* @__PURE__ */ S("input", {
484
+ type: "checkbox",
485
+ checked: G,
486
+ onChange: (e) => K(e.target.checked),
487
+ className: "h-4 w-4 rounded border-border-strong accent-current"
488
+ }),
489
+ /* @__PURE__ */ S(b, { size: 14 }),
490
+ " Run with custom input"
491
+ ]
492
+ }), G ? /* @__PURE__ */ S(D, {
493
+ value: qe,
494
+ onChange: (e) => Je(e.target.value),
495
+ "aria-label": "Custom input (stdin)",
496
+ placeholder: "Input passed to your program on stdin",
497
+ className: "mt-2 min-h-[88px] font-mono text-xs",
498
+ spellCheck: !1
499
+ }) : null]
500
+ }),
501
+ /* @__PURE__ */ C("div", {
502
+ className: "mt-4 grid grid-cols-2 gap-2",
503
+ children: [/* @__PURE__ */ C(w, {
504
+ variant: "outline",
505
+ onClick: $e,
506
+ disabled: J.running || J.warming || !U.trim() || !!z.isLocked,
507
+ children: [
508
+ /* @__PURE__ */ S(Ce, { size: 16 }),
509
+ " ",
510
+ J.warming ? "Starting…" : J.running ? "Running…" : "Run"
511
+ ]
512
+ }), /* @__PURE__ */ C(w, {
513
+ onClick: () => void tt(),
514
+ disabled: L || !U.trim() || !!z.isLocked,
515
+ children: [
516
+ /* @__PURE__ */ S(Te, { size: 16 }),
517
+ " ",
518
+ L ? "Submitting…" : "Submit"
519
+ ]
520
+ })]
521
+ }),
522
+ /* @__PURE__ */ S("p", {
523
+ className: "mt-2 text-center text-xs text-text-muted",
524
+ children: "Code runs in an isolated sandbox. Ctrl/⌘+Enter runs, Ctrl/⌘+Shift+Enter submits; press Esc then Tab to leave the editor."
525
+ })
526
+ ]
527
+ }),
528
+ /* @__PURE__ */ C(T, {
529
+ className: "p-5",
530
+ "aria-live": "polite",
531
+ children: [/* @__PURE__ */ C("h2", {
532
+ className: "mb-3 flex items-center gap-2 text-base font-semibold text-text-primary",
533
+ children: [/* @__PURE__ */ S(b, { size: 16 }), " Run output"]
534
+ }), /* @__PURE__ */ S(ge, {
535
+ run: J.run,
536
+ running: J.running,
537
+ warming: J.warming,
538
+ error: J.error
539
+ })]
540
+ }),
541
+ Z ? /* @__PURE__ */ C(T, {
387
542
  className: "p-5",
388
543
  children: [
389
- /* @__PURE__ */ w("h2", {
544
+ /* @__PURE__ */ S("h2", {
390
545
  className: "mb-2 text-base font-semibold text-text-primary",
391
- children: "Latest run"
546
+ children: "Latest submission"
392
547
  }),
393
- Re ? /* @__PURE__ */ T("p", {
548
+ at ? /* @__PURE__ */ C("p", {
394
549
  className: "mb-3 inline-flex items-center gap-2 text-sm text-text-secondary",
395
- children: [/* @__PURE__ */ w(S, {
550
+ children: [/* @__PURE__ */ S(y, {
396
551
  size: 14,
397
552
  className: "animate-spin"
398
553
  }), "Grading your submission — the grader is starting up. Your verdict will appear here automatically."]
399
- }) : /* @__PURE__ */ w("p", {
554
+ }) : /* @__PURE__ */ S("p", {
400
555
  className: "mb-3 text-sm text-text-secondary",
401
556
  children: "Your most recent submission has not been graded yet — the grader was unavailable. You can re-run it without resubmitting your code."
402
557
  }),
403
- /* @__PURE__ */ T(E, {
558
+ /* @__PURE__ */ C(w, {
404
559
  variant: "outline",
405
- onClick: () => void Ie(Z),
406
- disabled: B,
560
+ onClick: () => void nt(Z),
561
+ disabled: R,
407
562
  children: [
408
- /* @__PURE__ */ w(S, { size: 16 }),
563
+ /* @__PURE__ */ S(y, { size: 16 }),
409
564
  " ",
410
- B ? "Re-running…" : "Re-run grader"
565
+ R ? "Re-running…" : "Re-run grader"
411
566
  ]
412
567
  })
413
568
  ]
414
- }) : Y ? /* @__PURE__ */ T(_e, { children: [/* @__PURE__ */ T(D, {
569
+ }) : X ? /* @__PURE__ */ C(Oe, { children: [/* @__PURE__ */ C(T, {
415
570
  className: "p-5",
416
- children: [/* @__PURE__ */ w("h2", {
571
+ children: [/* @__PURE__ */ S("h2", {
417
572
  className: "mb-3 text-base font-semibold text-text-primary",
418
- children: "Latest run"
419
- }), /* @__PURE__ */ w(ae, { submission: Y })]
420
- }), /* @__PURE__ */ T(D, {
573
+ children: "Latest submission"
574
+ }), /* @__PURE__ */ S(se, { submission: X })]
575
+ }), /* @__PURE__ */ C(T, {
421
576
  className: "p-5",
422
- children: [/* @__PURE__ */ T("h2", {
577
+ children: [/* @__PURE__ */ C("h2", {
423
578
  className: "mb-3 flex items-center gap-2 text-base font-semibold text-text-primary",
424
- children: [/* @__PURE__ */ w(he, { size: 16 }), " TechnoSage review"]
425
- }), /* @__PURE__ */ w(ue, {
426
- submission: Y,
427
- onOpenProblem: (e) => ke(`/applications/problem-details-page?id=${e}`)
579
+ children: [/* @__PURE__ */ S(Ee, { size: 16 }), " TechnoSage review"]
580
+ }), /* @__PURE__ */ S(fe, {
581
+ submission: X,
582
+ onOpenProblem: (e) => Be(`/applications/problem-details-page?id=${e}`)
428
583
  })]
429
- })] }) : null
584
+ })] }) : null,
585
+ /* @__PURE__ */ C(T, {
586
+ className: "p-5",
587
+ children: [/* @__PURE__ */ S("h2", {
588
+ className: "mb-3 text-base font-semibold text-text-primary",
589
+ children: "My submissions"
590
+ }), We && !Y.length ? /* @__PURE__ */ S(re, {
591
+ count: 3,
592
+ height: "h-12"
593
+ }) : F ? /* @__PURE__ */ S(ne, {
594
+ title: "Couldn't load submissions",
595
+ error: F
596
+ }) : Y.length === 0 ? /* @__PURE__ */ S(te, {
597
+ icon: /* @__PURE__ */ S(_, { size: 24 }),
598
+ title: "No submissions yet",
599
+ description: "Submit a solution to see your verdicts and points here."
600
+ }) : /* @__PURE__ */ S("div", {
601
+ className: "space-y-1",
602
+ children: Y.map((e) => /* @__PURE__ */ S(Re, {
603
+ s: e,
604
+ focused: f === e.id,
605
+ onToggle: () => k(f === e.id ? null : e.id)
606
+ }, e.id))
607
+ })]
608
+ })
430
609
  ]
431
- }), /* @__PURE__ */ w("div", {
432
- className: "lg:col-span-1",
433
- children: /* @__PURE__ */ T(D, {
434
- className: "p-5",
435
- children: [/* @__PURE__ */ w("h2", {
436
- className: "mb-3 text-base font-semibold text-text-primary",
437
- children: "My submissions"
438
- }), Me && !J.length ? /* @__PURE__ */ w(ne, {
439
- count: 3,
440
- height: "h-12"
441
- }) : L ? /* @__PURE__ */ w(u, {
442
- title: "Couldn't load submissions",
443
- error: L
444
- }) : J.length === 0 ? /* @__PURE__ */ w(te, {
445
- icon: /* @__PURE__ */ w(b, { size: 24 }),
446
- title: "No submissions yet",
447
- description: "Submit a solution above to see your verdicts and points here."
448
- }) : /* @__PURE__ */ w("div", {
449
- className: "space-y-1",
450
- children: J.map((e) => /* @__PURE__ */ w(De, {
451
- s: e,
452
- focused: p === e.id,
453
- onToggle: () => A(p === e.id ? null : e.id)
454
- }, e.id))
455
- })]
456
- })
457
610
  })]
458
611
  })
459
612
  ]
460
613
  });
461
614
  }
462
615
  //#endregion
463
- export { A as ApplicationsProblemDetailsPagePage };
616
+ export { k as ApplicationsProblemDetailsPagePage };
464
617
 
465
618
  //# sourceMappingURL=ApplicationsProblemDetailsPagePage.js.map