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