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