@burdenoff/microfe-technospam 2026.1024.1 → 2026.1030.1

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 (33) hide show
  1. package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -1
  2. package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -1
  3. package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -1
  4. package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -1
  5. package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -1
  6. package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -1
  7. package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -1
  8. package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -1
  9. package/dist/node_modules/sonner/dist/index.js.map +1 -1
  10. package/dist/technospam/hooks/useFocusedRecordParam.d.ts +41 -0
  11. package/dist/technospam/hooks/useFocusedRecordParam.d.ts.map +1 -0
  12. package/dist/technospam/hooks/useFocusedRecordParam.js +41 -0
  13. package/dist/technospam/hooks/useFocusedRecordParam.js.map +1 -0
  14. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.d.ts.map +1 -1
  15. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +176 -161
  16. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
  17. package/dist/technospam/pages/CoursesCourseDetailsPagePage.d.ts.map +1 -1
  18. package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +92 -88
  19. package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
  20. package/dist/technospam/pages/CoursesMyLearningPagePage.d.ts.map +1 -1
  21. package/dist/technospam/pages/CoursesMyLearningPagePage.js +89 -79
  22. package/dist/technospam/pages/CoursesMyLearningPagePage.js.map +1 -1
  23. package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.d.ts.map +1 -1
  24. package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js +155 -147
  25. package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js.map +1 -1
  26. package/dist/technospam/pages/MentorshipSessionsPagePage.d.ts.map +1 -1
  27. package/dist/technospam/pages/MentorshipSessionsPagePage.js +186 -167
  28. package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
  29. package/dist/technospam/utils/pageContext.d.ts +54 -5
  30. package/dist/technospam/utils/pageContext.d.ts.map +1 -1
  31. package/dist/technospam/utils/pageContext.js +99 -35
  32. package/dist/technospam/utils/pageContext.js.map +1 -1
  33. package/package.json +1 -1
@@ -1,66 +1,77 @@
1
1
  import { useTechnoSpam as e } from "../providers/TechnoSpamProvider.js";
2
2
  import { useTechnoSpamAnalytics as t } from "../hooks/useTechnoSpamAnalytics.js";
3
- import { PageLayout as n } from "../components/PageLayout.js";
4
- import { StatCard as r } from "../components/StatCard.js";
5
- import { formatDateTime as i, humanizeEnum as a } from "../utils/format.js";
6
- import { StatusBadge as o } from "../components/StatusBadge.js";
7
- import { EmptyView as s, ErrorView as c, LoadingRows as ee } from "../components/StateViews.js";
3
+ import { cn as n } from "../utils/cn.js";
4
+ import { PageLayout as r } from "../components/PageLayout.js";
5
+ import { StatCard as i } from "../components/StatCard.js";
6
+ import { formatDateTime as a, humanizeEnum as o } from "../utils/format.js";
7
+ import { StatusBadge as s } from "../components/StatusBadge.js";
8
+ import { EmptyView as c, ErrorView as l, LoadingRows as ee } from "../components/StateViews.js";
8
9
  import { TagStrip as te } from "../components/TagStrip.js";
9
- import { PremiumBadge as ne, UpgradeGate as l } from "../components/UpgradeGate.js";
10
- import { CodePanel as re, IoBlock as u, TestResultsPanel as ie } from "../components/SubmissionViews.js";
10
+ import { PremiumBadge as ne, UpgradeGate as u } from "../components/UpgradeGate.js";
11
+ import { CodePanel as re, IoBlock as d, TestResultsPanel as ie } from "../components/SubmissionViews.js";
11
12
  import "../components/index.js";
12
- import { notify as d } from "../lib/toast.js";
13
+ import { notify as f } from "../lib/toast.js";
13
14
  import { useProblemQuery as ae, useRegradeSubmission as oe, useSubmissionsQuery as se, useSubmitSolution as ce } from "../api/technospamApi.js";
14
- import { useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
15
- import { Clock as g, Code2 as _, FileText as v, FlaskConical as le, Layers as y, RefreshCw as b, Send as ue, Trophy as x } from "lucide-react";
16
- import { useSearchParams as S } from "react-router";
17
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
18
- import { Badge as de, Button as T, GlassCard as E, Select as fe, SelectContent as pe, SelectItem as me, SelectTrigger as he, SelectValue as ge, Skeleton as D, Textarea as _e } from "@burdenoff/fe-libs/ui";
15
+ import { FOCUS_PARAMS as le } from "../utils/pageContext.js";
16
+ import { focusableCardProps as p, useFocusedRecordParam as ue } from "../hooks/useFocusedRecordParam.js";
17
+ import { useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
18
+ import { Clock as v, Code2 as y, FileText as b, FlaskConical as de, Layers as x, RefreshCw as S, Send as fe, Trophy as C } from "lucide-react";
19
+ import { useSearchParams as pe } from "react-router";
20
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
21
+ import { Badge as me, Button as E, GlassCard as D, Select as he, SelectContent as ge, SelectItem as _e, SelectTrigger as ve, SelectValue as ye, Skeleton as O, Textarea as be } from "@burdenoff/fe-libs/ui";
19
22
  //#region src/technospam/pages/ApplicationsProblemDetailsPagePage.tsx
20
- var O = [
23
+ var k = [
21
24
  "javascript",
22
25
  "python",
23
26
  "typescript"
24
- ], ve = 3e3, ye = 3 * 6e4;
25
- function be({ s: e }) {
26
- return /* @__PURE__ */ w("div", {
27
- className: "rounded-lg border border-transparent px-2 py-3 transition-colors hover:border-border-seam hover:bg-bg-sunken",
28
- children: [/* @__PURE__ */ w("div", {
27
+ ], xe = 3e3, Se = 3 * 6e4;
28
+ function Ce({ s: e, focused: t, onToggle: r }) {
29
+ return /* @__PURE__ */ T("div", {
30
+ className: n("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"),
31
+ ...p(t, r),
32
+ children: [/* @__PURE__ */ T("div", {
29
33
  className: "flex flex-wrap items-center gap-x-4 gap-y-1",
30
34
  children: [
31
- /* @__PURE__ */ C(o, { status: e.verdict }),
32
- /* @__PURE__ */ w("span", {
35
+ /* @__PURE__ */ w("button", {
36
+ type: "button",
37
+ "aria-pressed": t,
38
+ "aria-label": `Focus submission from ${a(e.createdAt)}`,
39
+ onClick: r,
40
+ className: "rounded-full",
41
+ children: /* @__PURE__ */ w(s, { status: e.verdict })
42
+ }),
43
+ /* @__PURE__ */ T("span", {
33
44
  className: "inline-flex items-center gap-1 text-sm font-medium text-text-primary",
34
45
  children: [
35
- /* @__PURE__ */ C(_, { size: 13 }),
46
+ /* @__PURE__ */ w(y, { size: 13 }),
36
47
  " ",
37
- a(e.language)
48
+ o(e.language)
38
49
  ]
39
50
  }),
40
- /* @__PURE__ */ w("span", {
51
+ /* @__PURE__ */ T("span", {
41
52
  className: "inline-flex items-center gap-1 text-xs text-text-muted",
42
53
  children: [
43
- /* @__PURE__ */ C(g, { size: 12 }),
54
+ /* @__PURE__ */ w(v, { size: 12 }),
44
55
  " ",
45
56
  e.runtimeMs,
46
57
  " ms"
47
58
  ]
48
59
  }),
49
- /* @__PURE__ */ w("span", {
60
+ /* @__PURE__ */ T("span", {
50
61
  className: "inline-flex items-center gap-1 text-xs text-text-muted",
51
62
  children: [
52
- /* @__PURE__ */ C(x, { size: 12 }),
63
+ /* @__PURE__ */ w(C, { size: 12 }),
53
64
  " ",
54
65
  e.pointsAwarded,
55
66
  " pts"
56
67
  ]
57
68
  }),
58
- /* @__PURE__ */ C("span", {
69
+ /* @__PURE__ */ w("span", {
59
70
  className: "ml-auto text-xs text-text-muted",
60
- children: i(e.createdAt)
71
+ children: a(e.createdAt)
61
72
  })
62
73
  ]
63
- }), e.totalCount > 0 ? /* @__PURE__ */ w("p", {
74
+ }), e.totalCount > 0 ? /* @__PURE__ */ T("p", {
64
75
  className: "mt-1 px-0.5 text-xs text-text-muted",
65
76
  children: [
66
77
  "Passed ",
@@ -72,78 +83,78 @@ function be({ s: e }) {
72
83
  }) : null]
73
84
  });
74
85
  }
75
- function k() {
76
- let [i] = S(), k = i.get("id") ?? "", { currentUser: xe, workspaceId: A } = e(), j = xe?.id, { emit: M } = t(), { data: Se, loading: N, error: P, refetch: F } = ae(k);
77
- f(() => {
78
- k && M("technospam.problem.viewed", {
79
- workspaceId: A,
80
- entityId: k,
86
+ function A() {
87
+ let [n] = pe(), a = n.get("id") ?? "", [p, A] = ue(le.submission), { currentUser: we, workspaceId: j } = e(), M = we?.id, { emit: N } = t(), { data: Te, loading: Ee, error: P, refetch: F } = ae(a);
88
+ m(() => {
89
+ a && N("technospam.problem.viewed", {
90
+ workspaceId: j,
91
+ entityId: a,
81
92
  entityType: "TEC_PROBLEM"
82
93
  });
83
94
  }, [
84
- k,
85
- A,
86
- M
95
+ a,
96
+ j,
97
+ N
87
98
  ]);
88
- let { data: I, loading: Ce, error: L, refetch: R } = se({
89
- ...j ? { learnerId: j } : {},
90
- problemId: k
91
- }), [we, { loading: z }] = ce(), [Te, { loading: B }] = oe(), V = Se?.tecProblem ?? null, H = p(() => V?.languages?.length ? V.languages : O, [V]), [U, W] = h(""), [G, K] = h(""), q = m(!1);
92
- f(() => {
93
- V && !q.current && (W(V.languages[0] ?? O[0]), K(V.starterCode ?? ""), q.current = !0);
99
+ let { data: I, loading: De, error: L, refetch: R } = se({
100
+ ...M ? { learnerId: M } : {},
101
+ problemId: a
102
+ }), [Oe, { loading: z }] = ce(), [ke, { loading: B }] = oe(), V = Te?.tecProblem ?? null, H = h(() => V?.languages?.length ? V.languages : k, [V]), [U, W] = _(""), [G, K] = _(""), q = g(!1);
103
+ m(() => {
104
+ V && !q.current && (W(V.languages[0] ?? k[0]), K(V.starterCode ?? ""), q.current = !0);
94
105
  }, [V]);
95
- let J = p(() => [...I?.tecListSubmissions?.items ?? []].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()), [I]), Ee = async () => {
96
- if (!k) return;
106
+ let J = h(() => [...I?.tecListSubmissions?.items ?? []].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()), [I]), Ae = async () => {
107
+ if (!a) return;
97
108
  if (!U) {
98
- d.error("Pick a language", "Choose a language before submitting.");
109
+ f.error("Pick a language", "Choose a language before submitting.");
99
110
  return;
100
111
  }
101
112
  if (!G.trim()) {
102
- d.error("Add your solution", "Write some code before submitting.");
113
+ f.error("Add your solution", "Write some code before submitting.");
103
114
  return;
104
115
  }
105
- M("technospam.problem.submit_clicked", {
106
- workspaceId: A,
107
- entityId: k,
116
+ N("technospam.problem.submit_clicked", {
117
+ workspaceId: j,
118
+ entityId: a,
108
119
  entityType: "TEC_PROBLEM",
109
120
  language: U
110
121
  });
111
- let e = await we({ variables: { input: {
112
- problemId: k,
122
+ let e = await Oe({ variables: { input: {
123
+ problemId: a,
113
124
  language: U,
114
125
  code: G
115
126
  } } });
116
127
  if (e.data?.tecSubmitSolution) {
117
- M("technospam.problem.submitted", {
118
- workspaceId: A,
119
- entityId: k,
128
+ N("technospam.problem.submitted", {
129
+ workspaceId: j,
130
+ entityId: a,
120
131
  entityType: "TEC_PROBLEM",
121
132
  submissionId: e.data.tecSubmitSolution.id
122
133
  });
123
134
  let t = e.data.tecSubmitSolution;
124
- t.verdict === "PENDING" ? d.info("Solution submitted", "Grading has started — your verdict will appear here in a moment.") : t.verdict === "ACCEPTED" ? d.success("Accepted", `Passed all ${t.totalCount} test cases.`) : d.error(a(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), await Promise.all([F(), R()]);
135
+ 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(o(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), await Promise.all([F(), R()]);
125
136
  }
126
- }, De = async (e) => {
127
- let t = (await Te({ variables: { id: e } })).data?.tecRegradeSubmission;
128
- t && (t.verdict === "PENDING" ? d.error("Still pending", "The grader is not available yet. Please try again shortly.") : d.success("Grading complete", `Verdict: ${a(t.verdict)}.`), await Promise.all([F(), R()]));
129
- }, Y = J.find((e) => (e.testResults?.length ?? 0) > 0) ?? null, X = J[0] ?? null, Z = X?.verdict === "PENDING" ? X.id : null, [Q, Oe] = h(null), ke = Z !== null && Q !== Z;
130
- f(() => {
137
+ }, je = async (e) => {
138
+ let t = (await ke({ variables: { id: e } })).data?.tecRegradeSubmission;
139
+ t && (t.verdict === "PENDING" ? f.error("Still pending", "The grader is not available yet. Please try again shortly.") : f.success("Grading complete", `Verdict: ${o(t.verdict)}.`), await Promise.all([F(), R()]));
140
+ }, Y = J.find((e) => (e.testResults?.length ?? 0) > 0) ?? null, X = J[0] ?? null, Z = X?.verdict === "PENDING" ? X.id : null, [Q, Me] = _(null), Ne = Z !== null && Q !== Z;
141
+ m(() => {
131
142
  if (!Z || Q === Z) return;
132
143
  let e = Date.now(), t = window.setInterval(() => {
133
- if (Date.now() - e > ye) {
134
- window.clearInterval(t), Oe(Z);
144
+ if (Date.now() - e > Se) {
145
+ window.clearInterval(t), Me(Z);
135
146
  return;
136
147
  }
137
148
  R();
138
- }, ve);
149
+ }, xe);
139
150
  return () => window.clearInterval(t);
140
151
  }, [
141
152
  Z,
142
153
  Q,
143
154
  R
144
155
  ]);
145
- let $ = m(null);
146
- return f(() => {
156
+ let $ = g(null);
157
+ return m(() => {
147
158
  if (Z) {
148
159
  $.current = Z;
149
160
  return;
@@ -151,159 +162,159 @@ function k() {
151
162
  let e = $.current;
152
163
  if (!e) return;
153
164
  let t = J.find((t) => t.id === e);
154
- !t || t.verdict === "PENDING" || ($.current = null, t.verdict === "ACCEPTED" ? d.success("Accepted", `Passed all ${t.totalCount} test cases.`) : d.error(a(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), F());
165
+ !t || t.verdict === "PENDING" || ($.current = null, t.verdict === "ACCEPTED" ? f.success("Accepted", `Passed all ${t.totalCount} test cases.`) : f.error(o(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), F());
155
166
  }, [
156
167
  Z,
157
168
  J,
158
169
  F
159
- ]), N && !V ? /* @__PURE__ */ w(n, {
170
+ ]), Ee && !V ? /* @__PURE__ */ T(r, {
160
171
  title: "Problem",
161
172
  backPath: "/applications/problems-page",
162
- children: [/* @__PURE__ */ C(D, { className: "mb-4 h-28 w-full rounded-xl" }), /* @__PURE__ */ C(D, { className: "h-72 w-full rounded-xl" })]
163
- }) : P || !V ? /* @__PURE__ */ C(n, {
173
+ children: [/* @__PURE__ */ w(O, { className: "mb-4 h-28 w-full rounded-xl" }), /* @__PURE__ */ w(O, { className: "h-72 w-full rounded-xl" })]
174
+ }) : P || !V ? /* @__PURE__ */ w(r, {
164
175
  title: "Problem",
165
176
  backPath: "/applications/problems-page",
166
- children: P ? /* @__PURE__ */ C(c, {
177
+ children: P ? /* @__PURE__ */ w(l, {
167
178
  title: "Couldn't load problem",
168
179
  error: P
169
- }) : /* @__PURE__ */ C(s, {
180
+ }) : /* @__PURE__ */ w(c, {
170
181
  title: "Problem not found",
171
182
  description: "This problem may have been unpublished."
172
183
  })
173
- }) : /* @__PURE__ */ w(n, {
184
+ }) : /* @__PURE__ */ T(r, {
174
185
  hero: !0,
175
186
  backPath: "/applications/problems-page",
176
187
  title: V.title,
177
188
  description: V.topic ?? void 0,
178
189
  children: [
179
- /* @__PURE__ */ w("div", {
190
+ /* @__PURE__ */ T("div", {
180
191
  className: "mb-5 flex flex-wrap items-center gap-2",
181
192
  children: [
182
- /* @__PURE__ */ C(o, {
193
+ /* @__PURE__ */ w(s, {
183
194
  status: V.difficulty,
184
195
  kind: "level"
185
196
  }),
186
- /* @__PURE__ */ C(o, { status: V.status }),
187
- V.topic ? /* @__PURE__ */ w(de, {
197
+ /* @__PURE__ */ w(s, { status: V.status }),
198
+ V.topic ? /* @__PURE__ */ T(me, {
188
199
  variant: "outline",
189
200
  className: "gap-1",
190
201
  children: [
191
- /* @__PURE__ */ C(y, { size: 12 }),
202
+ /* @__PURE__ */ w(x, { size: 12 }),
192
203
  " ",
193
204
  V.topic
194
205
  ]
195
206
  }) : null,
196
- V.isPremiumOnly ? /* @__PURE__ */ C(ne, { locked: V.isLocked }) : null,
197
- /* @__PURE__ */ C(te, { tags: V.tags })
207
+ V.isPremiumOnly ? /* @__PURE__ */ w(ne, { locked: V.isLocked }) : null,
208
+ /* @__PURE__ */ w(te, { tags: V.tags })
198
209
  ]
199
210
  }),
200
- /* @__PURE__ */ w("div", {
211
+ /* @__PURE__ */ T("div", {
201
212
  className: "mb-6 grid grid-cols-2 gap-3 sm:grid-cols-4",
202
213
  children: [
203
- /* @__PURE__ */ C(r, {
214
+ /* @__PURE__ */ w(i, {
204
215
  label: "Points",
205
216
  value: V.points,
206
- icon: x,
217
+ icon: C,
207
218
  tone: "amber"
208
219
  }),
209
- /* @__PURE__ */ C(r, {
220
+ /* @__PURE__ */ w(i, {
210
221
  label: "Languages",
211
222
  value: H.length,
212
- icon: _,
223
+ icon: y,
213
224
  tone: "blue"
214
225
  }),
215
- /* @__PURE__ */ C(r, {
226
+ /* @__PURE__ */ w(i, {
216
227
  label: "Difficulty",
217
- value: a(V.difficulty),
218
- icon: y,
228
+ value: o(V.difficulty),
229
+ icon: x,
219
230
  tone: "purple"
220
231
  }),
221
- /* @__PURE__ */ C(r, {
232
+ /* @__PURE__ */ w(i, {
222
233
  label: "My submissions",
223
234
  value: J.length,
224
- icon: v,
235
+ icon: b,
225
236
  tone: "teal"
226
237
  })
227
238
  ]
228
239
  }),
229
- /* @__PURE__ */ w("div", {
240
+ /* @__PURE__ */ T("div", {
230
241
  className: "grid grid-cols-1 gap-5 lg:grid-cols-3",
231
- children: [/* @__PURE__ */ w("div", {
242
+ children: [/* @__PURE__ */ T("div", {
232
243
  className: "space-y-5 lg:col-span-2",
233
244
  children: [
234
- /* @__PURE__ */ w(E, {
245
+ /* @__PURE__ */ T(D, {
235
246
  className: "p-5",
236
- children: [/* @__PURE__ */ C("h2", {
247
+ children: [/* @__PURE__ */ w("h2", {
237
248
  className: "mb-2 text-base font-semibold text-text-primary",
238
249
  children: "Problem statement"
239
- }), V.isLocked ? /* @__PURE__ */ C(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__ */ C("p", {
250
+ }), V.isLocked ? /* @__PURE__ */ w(u, { 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", {
240
251
  className: "whitespace-pre-wrap text-sm leading-relaxed text-text-secondary",
241
252
  children: V.statement
242
- }) : /* @__PURE__ */ C("p", {
253
+ }) : /* @__PURE__ */ w("p", {
243
254
  className: "py-4 text-center text-sm text-text-muted",
244
255
  children: "The statement for this problem is being prepared."
245
256
  })]
246
257
  }),
247
- V.isLocked ? /* @__PURE__ */ C(l, {
258
+ V.isLocked ? /* @__PURE__ */ w(u, {
248
259
  compact: !0,
249
260
  description: "Starter code and sample test cases unlock with a paid TechnoSpam plan."
250
- }) : V.starterCode ? /* @__PURE__ */ w(E, {
261
+ }) : V.starterCode ? /* @__PURE__ */ T(D, {
251
262
  className: "p-5",
252
- children: [/* @__PURE__ */ C("h2", {
263
+ children: [/* @__PURE__ */ w("h2", {
253
264
  className: "mb-3 text-base font-semibold text-text-primary",
254
265
  children: "Starter code"
255
- }), /* @__PURE__ */ C(re, {
256
- label: a(H[0] ?? "code"),
266
+ }), /* @__PURE__ */ w(re, {
267
+ label: o(H[0] ?? "code"),
257
268
  bodyClassName: "max-h-72",
258
269
  children: V.starterCode
259
270
  })]
260
271
  }) : null,
261
- /* @__PURE__ */ w(E, {
272
+ /* @__PURE__ */ T(D, {
262
273
  className: "p-5",
263
274
  children: [
264
- /* @__PURE__ */ w("div", {
275
+ /* @__PURE__ */ T("div", {
265
276
  className: "mb-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",
266
- children: [/* @__PURE__ */ C("h2", {
277
+ children: [/* @__PURE__ */ w("h2", {
267
278
  className: "text-base font-semibold text-text-primary",
268
279
  children: "Submit a solution"
269
- }), /* @__PURE__ */ w("div", {
280
+ }), /* @__PURE__ */ T("div", {
270
281
  className: "flex items-center gap-2",
271
- children: [/* @__PURE__ */ C("span", {
282
+ children: [/* @__PURE__ */ w("span", {
272
283
  className: "text-sm text-text-secondary",
273
284
  children: "Language"
274
- }), /* @__PURE__ */ w(fe, {
285
+ }), /* @__PURE__ */ T(he, {
275
286
  value: U,
276
287
  onValueChange: W,
277
- children: [/* @__PURE__ */ C(he, {
288
+ children: [/* @__PURE__ */ w(ve, {
278
289
  className: "w-full sm:w-48",
279
- children: /* @__PURE__ */ C(ge, { placeholder: "Choose a language" })
280
- }), /* @__PURE__ */ C(pe, { children: H.map((e) => /* @__PURE__ */ C(me, {
290
+ children: /* @__PURE__ */ w(ye, { placeholder: "Choose a language" })
291
+ }), /* @__PURE__ */ w(ge, { children: H.map((e) => /* @__PURE__ */ w(_e, {
281
292
  value: e,
282
- children: a(e)
293
+ children: o(e)
283
294
  }, e)) })]
284
295
  })]
285
296
  })]
286
297
  }),
287
- /* @__PURE__ */ w("div", {
298
+ /* @__PURE__ */ T("div", {
288
299
  className: "overflow-hidden rounded-xl border border-border-strong bg-bg-sunken shadow-sm",
289
- children: [/* @__PURE__ */ w("div", {
300
+ children: [/* @__PURE__ */ T("div", {
290
301
  className: "flex items-center justify-between gap-2 border-b border-border-seam bg-bg-canvas/40 px-4 py-2",
291
- children: [/* @__PURE__ */ w("div", {
302
+ children: [/* @__PURE__ */ T("div", {
292
303
  className: "flex items-center gap-1.5",
293
304
  children: [
294
- /* @__PURE__ */ C("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-border" }),
295
- /* @__PURE__ */ C("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-border" }),
296
- /* @__PURE__ */ C("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-border" })
305
+ /* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-border" }),
306
+ /* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-border" }),
307
+ /* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-border" })
297
308
  ]
298
- }), /* @__PURE__ */ w("span", {
309
+ }), /* @__PURE__ */ T("span", {
299
310
  className: "inline-flex items-center gap-1.5 font-mono text-xs text-text-muted",
300
311
  children: [
301
- /* @__PURE__ */ C(_, { size: 13 }),
312
+ /* @__PURE__ */ w(y, { size: 13 }),
302
313
  " ",
303
- U ? a(U) : "solution"
314
+ U ? o(U) : "solution"
304
315
  ]
305
316
  })]
306
- }), /* @__PURE__ */ C(_e, {
317
+ }), /* @__PURE__ */ w(be, {
307
318
  value: G,
308
319
  onChange: (e) => K(e.target.value),
309
320
  placeholder: "Write your solution…",
@@ -311,57 +322,57 @@ function k() {
311
322
  spellCheck: !1
312
323
  })]
313
324
  }),
314
- /* @__PURE__ */ w(T, {
325
+ /* @__PURE__ */ T(E, {
315
326
  className: "mt-4 w-full",
316
- onClick: Ee,
327
+ onClick: Ae,
317
328
  disabled: z || !G.trim(),
318
329
  children: [
319
- /* @__PURE__ */ C(ue, { size: 16 }),
330
+ /* @__PURE__ */ w(fe, { size: 16 }),
320
331
  " ",
321
332
  z ? "Running test cases…" : "Run & submit"
322
333
  ]
323
334
  }),
324
- /* @__PURE__ */ C("p", {
335
+ /* @__PURE__ */ w("p", {
325
336
  className: "mt-2 text-center text-xs text-text-muted",
326
337
  children: "Your code runs against this problem's test cases in an isolated sandbox."
327
338
  })
328
339
  ]
329
340
  }),
330
- V.publicTestCases?.length ? /* @__PURE__ */ w(E, {
341
+ V.publicTestCases?.length ? /* @__PURE__ */ T(D, {
331
342
  className: "p-5",
332
343
  children: [
333
- /* @__PURE__ */ w("h2", {
344
+ /* @__PURE__ */ T("h2", {
334
345
  className: "mb-1 flex items-center gap-2 text-base font-semibold text-text-primary",
335
- children: [/* @__PURE__ */ C(le, { size: 16 }), " Sample test cases"]
346
+ children: [/* @__PURE__ */ w(de, { size: 16 }), " Sample test cases"]
336
347
  }),
337
- /* @__PURE__ */ C("p", {
348
+ /* @__PURE__ */ w("p", {
338
349
  className: "mb-3 text-sm text-text-secondary",
339
350
  children: "Your solution reads each input from stdin and must print the expected output. Hidden test cases are also run when you submit."
340
351
  }),
341
- /* @__PURE__ */ C("div", {
352
+ /* @__PURE__ */ w("div", {
342
353
  className: "space-y-3",
343
- children: V.publicTestCases.map((e) => /* @__PURE__ */ w("div", {
354
+ children: V.publicTestCases.map((e) => /* @__PURE__ */ T("div", {
344
355
  className: "rounded-xl border border-border-seam p-3",
345
- children: [/* @__PURE__ */ w("div", {
356
+ children: [/* @__PURE__ */ T("div", {
346
357
  className: "mb-2 flex flex-wrap items-center gap-x-3 gap-y-1",
347
- children: [/* @__PURE__ */ C("span", {
358
+ children: [/* @__PURE__ */ w("span", {
348
359
  className: "text-sm font-medium text-text-primary",
349
360
  children: e.name
350
- }), /* @__PURE__ */ w("span", {
361
+ }), /* @__PURE__ */ T("span", {
351
362
  className: "inline-flex items-center gap-1 text-xs text-text-muted",
352
363
  children: [
353
- /* @__PURE__ */ C(g, { size: 12 }),
364
+ /* @__PURE__ */ w(v, { size: 12 }),
354
365
  " ",
355
366
  e.timeLimitMs,
356
367
  " ms limit"
357
368
  ]
358
369
  })]
359
- }), /* @__PURE__ */ w("div", {
370
+ }), /* @__PURE__ */ T("div", {
360
371
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
361
- children: [/* @__PURE__ */ C(u, {
372
+ children: [/* @__PURE__ */ w(d, {
362
373
  label: "Input",
363
374
  value: e.input
364
- }), /* @__PURE__ */ C(u, {
375
+ }), /* @__PURE__ */ w(d, {
365
376
  label: "Expected output",
366
377
  value: e.expectedOutput
367
378
  })]
@@ -370,62 +381,66 @@ function k() {
370
381
  })
371
382
  ]
372
383
  }) : null,
373
- Z ? /* @__PURE__ */ w(E, {
384
+ Z ? /* @__PURE__ */ T(D, {
374
385
  className: "p-5",
375
386
  children: [
376
- /* @__PURE__ */ C("h2", {
387
+ /* @__PURE__ */ w("h2", {
377
388
  className: "mb-2 text-base font-semibold text-text-primary",
378
389
  children: "Latest run"
379
390
  }),
380
- ke ? /* @__PURE__ */ w("p", {
391
+ Ne ? /* @__PURE__ */ T("p", {
381
392
  className: "mb-3 inline-flex items-center gap-2 text-sm text-text-secondary",
382
- children: [/* @__PURE__ */ C(b, {
393
+ children: [/* @__PURE__ */ w(S, {
383
394
  size: 14,
384
395
  className: "animate-spin"
385
396
  }), "Grading your submission — the grader is starting up. Your verdict will appear here automatically."]
386
- }) : /* @__PURE__ */ C("p", {
397
+ }) : /* @__PURE__ */ w("p", {
387
398
  className: "mb-3 text-sm text-text-secondary",
388
399
  children: "Your most recent submission has not been graded yet — the grader was unavailable. You can re-run it without resubmitting your code."
389
400
  }),
390
- /* @__PURE__ */ w(T, {
401
+ /* @__PURE__ */ T(E, {
391
402
  variant: "outline",
392
- onClick: () => void De(Z),
403
+ onClick: () => void je(Z),
393
404
  disabled: B,
394
405
  children: [
395
- /* @__PURE__ */ C(b, { size: 16 }),
406
+ /* @__PURE__ */ w(S, { size: 16 }),
396
407
  " ",
397
408
  B ? "Re-running…" : "Re-run grader"
398
409
  ]
399
410
  })
400
411
  ]
401
- }) : Y ? /* @__PURE__ */ w(E, {
412
+ }) : Y ? /* @__PURE__ */ T(D, {
402
413
  className: "p-5",
403
- children: [/* @__PURE__ */ C("h2", {
414
+ children: [/* @__PURE__ */ w("h2", {
404
415
  className: "mb-3 text-base font-semibold text-text-primary",
405
416
  children: "Latest run"
406
- }), /* @__PURE__ */ C(ie, { submission: Y })]
417
+ }), /* @__PURE__ */ w(ie, { submission: Y })]
407
418
  }) : null
408
419
  ]
409
- }), /* @__PURE__ */ C("div", {
420
+ }), /* @__PURE__ */ w("div", {
410
421
  className: "lg:col-span-1",
411
- children: /* @__PURE__ */ w(E, {
422
+ children: /* @__PURE__ */ T(D, {
412
423
  className: "p-5",
413
- children: [/* @__PURE__ */ C("h2", {
424
+ children: [/* @__PURE__ */ w("h2", {
414
425
  className: "mb-3 text-base font-semibold text-text-primary",
415
426
  children: "My submissions"
416
- }), Ce && !J.length ? /* @__PURE__ */ C(ee, {
427
+ }), De && !J.length ? /* @__PURE__ */ w(ee, {
417
428
  count: 3,
418
429
  height: "h-12"
419
- }) : L ? /* @__PURE__ */ C(c, {
430
+ }) : L ? /* @__PURE__ */ w(l, {
420
431
  title: "Couldn't load submissions",
421
432
  error: L
422
- }) : J.length === 0 ? /* @__PURE__ */ C(s, {
423
- icon: /* @__PURE__ */ C(v, { size: 24 }),
433
+ }) : J.length === 0 ? /* @__PURE__ */ w(c, {
434
+ icon: /* @__PURE__ */ w(b, { size: 24 }),
424
435
  title: "No submissions yet",
425
436
  description: "Submit a solution above to see your verdicts and points here."
426
- }) : /* @__PURE__ */ C("div", {
437
+ }) : /* @__PURE__ */ w("div", {
427
438
  className: "space-y-1",
428
- children: J.map((e) => /* @__PURE__ */ C(be, { s: e }, e.id))
439
+ children: J.map((e) => /* @__PURE__ */ w(Ce, {
440
+ s: e,
441
+ focused: p === e.id,
442
+ onToggle: () => A(p === e.id ? null : e.id)
443
+ }, e.id))
429
444
  })]
430
445
  })
431
446
  })]
@@ -434,6 +449,6 @@ function k() {
434
449
  });
435
450
  }
436
451
  //#endregion
437
- export { k as ApplicationsProblemDetailsPagePage };
452
+ export { A as ApplicationsProblemDetailsPagePage };
438
453
 
439
454
  //# sourceMappingURL=ApplicationsProblemDetailsPagePage.js.map