@burdenoff/microfe-technospam 2026.1030.3 → 2026.1030.5

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 (67) hide show
  1. package/dist/generated/wspace-types.d.ts +1501 -11
  2. package/dist/generated/wspace-types.d.ts.map +1 -1
  3. package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -1
  4. package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -1
  5. package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -1
  6. package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -1
  7. package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -1
  8. package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -1
  9. package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -1
  10. package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -1
  11. package/dist/node_modules/sonner/dist/index.js.map +1 -1
  12. package/dist/stories/fixtures/technospamFixtures.d.ts +1 -0
  13. package/dist/stories/fixtures/technospamFixtures.d.ts.map +1 -1
  14. package/dist/stories/journeys/Courses.stories.d.ts +5 -2
  15. package/dist/stories/journeys/Courses.stories.d.ts.map +1 -1
  16. package/dist/stories/journeys/Dashboard.stories.d.ts +2 -2
  17. package/dist/stories/journeys/Dashboard.stories.d.ts.map +1 -1
  18. package/dist/technospam/TechnoSpamRoutes.d.ts.map +1 -1
  19. package/dist/technospam/TechnoSpamRoutes.js +31 -27
  20. package/dist/technospam/TechnoSpamRoutes.js.map +1 -1
  21. package/dist/technospam/api/technospamApi.d.ts +101 -5
  22. package/dist/technospam/api/technospamApi.d.ts.map +1 -1
  23. package/dist/technospam/api/technospamApi.js +278 -146
  24. package/dist/technospam/api/technospamApi.js.map +1 -1
  25. package/dist/technospam/components/lesson/InteractiveWorkspace.d.ts +15 -0
  26. package/dist/technospam/components/lesson/InteractiveWorkspace.d.ts.map +1 -0
  27. package/dist/technospam/components/lesson/InteractiveWorkspace.js +195 -0
  28. package/dist/technospam/components/lesson/InteractiveWorkspace.js.map +1 -0
  29. package/dist/technospam/components/lesson/LessonKindFields.d.ts +15 -0
  30. package/dist/technospam/components/lesson/LessonKindFields.d.ts.map +1 -0
  31. package/dist/technospam/components/lesson/LessonKindFields.js +150 -0
  32. package/dist/technospam/components/lesson/LessonKindFields.js.map +1 -0
  33. package/dist/technospam/components/lesson/QuizLesson.d.ts +14 -0
  34. package/dist/technospam/components/lesson/QuizLesson.d.ts.map +1 -0
  35. package/dist/technospam/components/lesson/QuizLesson.js +105 -0
  36. package/dist/technospam/components/lesson/QuizLesson.js.map +1 -0
  37. package/dist/technospam/components/lesson/lessonAuthoring.d.ts +47 -0
  38. package/dist/technospam/components/lesson/lessonAuthoring.d.ts.map +1 -0
  39. package/dist/technospam/components/lesson/lessonAuthoring.js +80 -0
  40. package/dist/technospam/components/lesson/lessonAuthoring.js.map +1 -0
  41. package/dist/technospam/hooks/useTechnoSpamAnalytics.d.ts +1 -1
  42. package/dist/technospam/hooks/useTechnoSpamAnalytics.d.ts.map +1 -1
  43. package/dist/technospam/hooks/useTechnoSpamAnalytics.js.map +1 -1
  44. package/dist/technospam/pages/AdminAdminDashboardPagePage.d.ts.map +1 -1
  45. package/dist/technospam/pages/AdminAdminDashboardPagePage.js +230 -207
  46. package/dist/technospam/pages/AdminAdminDashboardPagePage.js.map +1 -1
  47. package/dist/technospam/pages/CoursesCourseDetailsPagePage.d.ts.map +1 -1
  48. package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +130 -132
  49. package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
  50. package/dist/technospam/pages/CoursesLessonPlayerPagePage.d.ts +9 -0
  51. package/dist/technospam/pages/CoursesLessonPlayerPagePage.d.ts.map +1 -0
  52. package/dist/technospam/pages/CoursesLessonPlayerPagePage.js +291 -0
  53. package/dist/technospam/pages/CoursesLessonPlayerPagePage.js.map +1 -0
  54. package/dist/technospam/pages/CoursesMyLearningPagePage.d.ts.map +1 -1
  55. package/dist/technospam/pages/CoursesMyLearningPagePage.js +80 -78
  56. package/dist/technospam/pages/CoursesMyLearningPagePage.js.map +1 -1
  57. package/dist/technospam/pages/DashboardDashboardPagePage.d.ts.map +1 -1
  58. package/dist/technospam/pages/DashboardDashboardPagePage.js +136 -133
  59. package/dist/technospam/pages/DashboardDashboardPagePage.js.map +1 -1
  60. package/dist/technospam/utils/lessonPath.d.ts +15 -0
  61. package/dist/technospam/utils/lessonPath.d.ts.map +1 -0
  62. package/dist/technospam/utils/lessonPath.js +15 -0
  63. package/dist/technospam/utils/lessonPath.js.map +1 -0
  64. package/dist/technospam/utils/pageContext.d.ts.map +1 -1
  65. package/dist/technospam/utils/pageContext.js +10 -0
  66. package/dist/technospam/utils/pageContext.js.map +1 -1
  67. package/package.json +1 -1
@@ -8,47 +8,49 @@ import { EmptyView as f, ErrorView as p, LoadingRows as m } from "../components/
8
8
  import { TagInput as h } from "../components/TagInput.js";
9
9
  import { CodePanel as g, TestResultsPanel as _ } from "../components/SubmissionViews.js";
10
10
  import { notify as v } from "../lib/toast.js";
11
- import { useApproveMentor as y, useArchiveCourse as b, useCompleteHackathon as x, useCoursesQuery as S, useCreateCourse as C, useCreateHackathon as w, useCreateLesson as T, useCreateProblem as E, useGradeSubmission as D, useHackathonsQuery as ee, useLessonsQuery as O, useMentorsQuery as k, useOpenRegistration as te, useProblemsQuery as A, usePublishCourse as j, usePublishProblem as M, useRegradeSubmission as N, useScoreTeam as P, useStartHackathon as F, useStartJudging as I, useSubmissionsQuery as L, useTeamsQuery as R, useUpdateLesson as z } from "../api/technospamApi.js";
11
+ import { useApproveMentor as y, useArchiveCourse as b, useCompleteHackathon as x, useCoursesQuery as S, useCreateCourse as C, useCreateHackathon as w, useCreateLesson as T, useCreateProblem as ee, useGradeSubmission as E, useHackathonsQuery as D, useLessonQuizKeyQuery as O, useLessonsQuery as k, useMentorsQuery as A, useOpenRegistration as j, useProblemsQuery as M, usePublishCourse as te, usePublishProblem as ne, useRegradeSubmission as N, useScoreTeam as P, useStartHackathon as re, useStartJudging as F, useSubmissionsQuery as I, useTeamsQuery as L, useUpdateLesson as R } from "../api/technospamApi.js";
12
12
  import "../components/index.js";
13
- import { useState as B } from "react";
14
- import { Archive as ne, Award as V, BookOpen as H, Code2 as U, ExternalLink as re, Gavel as ie, ListChecks as ae, Pencil as oe, Play as se, Plus as ce, RefreshCw as W, Rocket as le, ShieldAlert as ue, Trophy as de, UserCheck as fe, Users as G, X as pe } from "lucide-react";
13
+ import { draftFromLesson as z, draftToInput as B } from "../components/lesson/lessonAuthoring.js";
14
+ import { LessonKindFields as V } from "../components/lesson/LessonKindFields.js";
15
+ import { useMemo as ie, useState as H } from "react";
16
+ import { Archive as ae, Award as oe, BookOpen as U, Code2 as W, ExternalLink as se, Gavel as ce, ListChecks as le, Pencil as ue, Play as de, Plus as fe, RefreshCw as pe, Rocket as me, ShieldAlert as he, Trophy as ge, UserCheck as _e, Users as G, X as ve } from "lucide-react";
15
17
  import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
16
- import { Badge as me, Button as Y, GlassCard as he, Input as X, Select as ge, SelectContent as _e, SelectItem as ve, SelectTrigger as ye, SelectValue as be, Tabs as xe, TabsList as Se, TabsTrigger as Ce, Textarea as Z } from "@burdenoff/fe-libs/ui";
17
- import { nativeConfirm as we } from "@burdenoff/fe-libs/shared/native";
18
+ import { Badge as ye, Button as Y, GlassCard as be, Input as X, Select as xe, SelectContent as Se, SelectItem as Ce, SelectTrigger as we, SelectValue as Te, Tabs as Ee, TabsList as De, TabsTrigger as Oe, Textarea as Z } from "@burdenoff/fe-libs/ui";
19
+ import { nativeConfirm as ke } from "@burdenoff/fe-libs/shared/native";
18
20
  //#region src/technospam/pages/AdminAdminDashboardPagePage.tsx
19
- var Te = [
21
+ var Ae = [
20
22
  "ARTICLE",
21
23
  "VIDEO",
22
24
  "INTERACTIVE",
23
25
  "QUIZ",
24
26
  "PROJECT"
25
- ], Ee = [
27
+ ], je = [
26
28
  "ACCEPTED",
27
29
  "WRONG_ANSWER",
28
30
  "TIME_LIMIT_EXCEEDED",
29
31
  "RUNTIME_ERROR",
30
32
  "COMPILE_ERROR"
31
- ], De = [
33
+ ], Me = [
32
34
  "BEGINNER",
33
35
  "INTERMEDIATE",
34
36
  "ADVANCED",
35
37
  "EXPERT"
36
- ], Oe = [
38
+ ], Ne = [
37
39
  "EASY",
38
40
  "MEDIUM",
39
41
  "HARD"
40
42
  ];
41
- function ke(e) {
43
+ function Pe(e) {
42
44
  return e.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
43
45
  }
44
- function Ae(e) {
46
+ function Fe(e) {
45
47
  return e.split(",").map((e) => e.trim()).filter(Boolean);
46
48
  }
47
49
  function Q(e) {
48
50
  let t = Number.parseInt(e, 10);
49
51
  return Number.isFinite(t) ? t : void 0;
50
52
  }
51
- function je(e) {
53
+ function Ie(e) {
52
54
  if (!e) return null;
53
55
  let t = new Date(e);
54
56
  return Number.isNaN(t.getTime()) ? null : t.toISOString();
@@ -65,7 +67,7 @@ function $({ label: e, required: t, className: n, children: r }) {
65
67
  }), r]
66
68
  });
67
69
  }
68
- function Me({ seed: e, icon: n }) {
70
+ function Le({ seed: e, icon: n }) {
69
71
  return /* @__PURE__ */ q("span", {
70
72
  className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br text-white shadow-sm", r(e)),
71
73
  children: /* @__PURE__ */ q(n, {
@@ -74,8 +76,8 @@ function Me({ seed: e, icon: n }) {
74
76
  })
75
77
  });
76
78
  }
77
- function Ne({ title: e, description: t, icon: n, children: r, footer: i }) {
78
- return /* @__PURE__ */ J(he, {
79
+ function Re({ title: e, description: t, icon: n, children: r, footer: i }) {
80
+ return /* @__PURE__ */ J(be, {
79
81
  className: "space-y-4 p-4 sm:p-5",
80
82
  children: [
81
83
  /* @__PURE__ */ J("div", {
@@ -105,7 +107,7 @@ function Ne({ title: e, description: t, icon: n, children: r, footer: i }) {
105
107
  ]
106
108
  });
107
109
  }
108
- function Pe({ summary: e, actionLabel: t, open: n, onToggle: r }) {
110
+ function ze({ summary: e, actionLabel: t, open: n, onToggle: r }) {
109
111
  return /* @__PURE__ */ J("div", {
110
112
  className: "flex items-center justify-between gap-3",
111
113
  children: [/* @__PURE__ */ q("p", {
@@ -115,12 +117,12 @@ function Pe({ summary: e, actionLabel: t, open: n, onToggle: r }) {
115
117
  size: "sm",
116
118
  variant: n ? "outline" : "default",
117
119
  onClick: r,
118
- children: [q(n ? pe : ce, { size: 15 }), n ? "Close" : t]
120
+ children: [q(n ? ve : fe, { size: 15 }), n ? "Close" : t]
119
121
  }) : null]
120
122
  });
121
123
  }
122
- function Fe({ leading: e, children: t, actions: n }) {
123
- return /* @__PURE__ */ J(he, {
124
+ function Be({ leading: e, children: t, actions: n }) {
125
+ return /* @__PURE__ */ J(be, {
124
126
  className: "flex flex-col gap-3 p-4 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md sm:flex-row sm:items-center sm:justify-between",
125
127
  children: [/* @__PURE__ */ J("div", {
126
128
  className: "flex min-w-0 items-center gap-3",
@@ -134,8 +136,11 @@ function Fe({ leading: e, children: t, actions: n }) {
134
136
  }) : null]
135
137
  });
136
138
  }
137
- function Ie({ lesson: e, onSaved: t, onCancel: n }) {
138
- let [r, { loading: i }] = z(), [a, o] = B(e.title), [s, c] = B(e.kind), [l, d] = B(e.content ?? ""), [f, p] = B(String(e.estimatedMinutes ?? ""));
139
+ function Ve({ lesson: e, onSaved: t, onCancel: n }) {
140
+ let [r, { loading: i }] = R(), [a, o] = H(e.title), [s, c] = H(e.kind), [l, d] = H(e.content ?? ""), [f, p] = H(String(e.estimatedMinutes ?? "")), [m, h] = H(() => z(e)), { data: g } = O(e.id, s !== "QUIZ"), [_, y] = H(null), b = ie(() => z(null, g?.tecLessonQuizKey).quiz, [g]), x = {
141
+ ...m,
142
+ quiz: _ ?? b
143
+ };
139
144
  return /* @__PURE__ */ J("div", {
140
145
  className: "mt-2 space-y-2 rounded-lg border border-border-seam bg-bg-surface p-3",
141
146
  children: [
@@ -145,10 +150,10 @@ function Ie({ lesson: e, onSaved: t, onCancel: n }) {
145
150
  value: a,
146
151
  onChange: (e) => o(e.target.value),
147
152
  placeholder: "Lesson title"
148
- }), /* @__PURE__ */ J(ge, {
153
+ }), /* @__PURE__ */ J(xe, {
149
154
  value: s,
150
155
  onValueChange: (e) => c(e),
151
- children: [/* @__PURE__ */ q(ye, { children: /* @__PURE__ */ q(be, {}) }), /* @__PURE__ */ q(_e, { children: Te.map((e) => /* @__PURE__ */ q(ve, {
156
+ children: [/* @__PURE__ */ q(we, { children: /* @__PURE__ */ q(Te, {}) }), /* @__PURE__ */ q(Se, { children: Ae.map((e) => /* @__PURE__ */ q(Ce, {
152
157
  value: e,
153
158
  children: u(e)
154
159
  }, e)) })]
@@ -159,6 +164,13 @@ function Ie({ lesson: e, onSaved: t, onCancel: n }) {
159
164
  value: l,
160
165
  onChange: (e) => d(e.target.value)
161
166
  }),
167
+ /* @__PURE__ */ q(V, {
168
+ kind: s,
169
+ draft: x,
170
+ onChange: (e) => {
171
+ h(e), e.quiz !== x.quiz && y(e.quiz);
172
+ }
173
+ }),
162
174
  /* @__PURE__ */ J("div", {
163
175
  className: "flex flex-wrap items-center gap-2",
164
176
  children: [/* @__PURE__ */ q(X, {
@@ -180,13 +192,16 @@ function Ie({ lesson: e, onSaved: t, onCancel: n }) {
180
192
  onClick: async () => {
181
193
  let i = a.trim();
182
194
  if (!i) return v.error("Lesson title is required");
195
+ let o = B(s, x);
196
+ if (!o.ok) return v.error(o.error);
183
197
  (await r({ variables: {
184
198
  id: e.id,
185
199
  input: {
186
200
  title: i,
187
201
  kind: s,
188
202
  content: l.trim() || null,
189
- estimatedMinutes: Q(f)
203
+ estimatedMinutes: Q(f),
204
+ ...o.input
190
205
  }
191
206
  } })).data?.tecUpdateLesson && (v.success("Lesson updated", i), await t(), n());
192
207
  },
@@ -198,8 +213,8 @@ function Ie({ lesson: e, onSaved: t, onCancel: n }) {
198
213
  ]
199
214
  });
200
215
  }
201
- function Le({ courseId: e }) {
202
- let { data: t, loading: n, refetch: r } = O(e), [i, { loading: a }] = T(), [o] = z(), [c, l] = B(null), [d, f] = B(null), [p, h] = B(""), [g, _] = B("ARTICLE"), [y, b] = B(""), [x, S] = B(""), [C, w] = B(!1), E = [...t?.tecListLessons?.items ?? []].sort((e, t) => e.position - t.position), D = async (e) => {
216
+ function He({ courseId: e }) {
217
+ let { data: t, loading: n, refetch: r } = k(e), [i, { loading: a }] = T(), [o] = R(), [c, l] = H(null), [d, f] = H(null), [p, h] = H(""), [g, _] = H("ARTICLE"), [y, b] = H(""), [x, S] = H(""), [C, w] = H(!1), [ee, E] = H(() => z()), D = [...t?.tecListLessons?.items ?? []].sort((e, t) => e.position - t.position), O = async (e) => {
203
218
  f(e.id);
204
219
  try {
205
220
  let t = await o({ variables: {
@@ -218,25 +233,25 @@ function Le({ courseId: e }) {
218
233
  className: "mb-3 flex items-center gap-2",
219
234
  children: [/* @__PURE__ */ q("span", {
220
235
  className: "flex h-7 w-7 items-center justify-center rounded-lg bg-accent-primary/15 text-accent-primary ring-1 ring-accent-primary/20",
221
- children: /* @__PURE__ */ q(ae, { size: 15 })
236
+ children: /* @__PURE__ */ q(le, { size: 15 })
222
237
  }), /* @__PURE__ */ J("span", {
223
238
  className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
224
239
  children: [
225
240
  "Curriculum (",
226
- E.length,
241
+ D.length,
227
242
  ")"
228
243
  ]
229
244
  })]
230
245
  }),
231
- n && E.length === 0 ? /* @__PURE__ */ q(m, {
246
+ n && D.length === 0 ? /* @__PURE__ */ q(m, {
232
247
  count: 2,
233
248
  height: "h-10"
234
- }) : E.length === 0 ? /* @__PURE__ */ q("p", {
249
+ }) : D.length === 0 ? /* @__PURE__ */ q("p", {
235
250
  className: "mb-3 text-xs text-text-muted",
236
251
  children: "No lessons yet — add the first below."
237
252
  }) : /* @__PURE__ */ q("ol", {
238
253
  className: "mb-3 space-y-1.5",
239
- children: E.map((e, t) => /* @__PURE__ */ J("li", { children: [/* @__PURE__ */ J("div", {
254
+ children: D.map((e, t) => /* @__PURE__ */ J("li", { children: [/* @__PURE__ */ J("div", {
240
255
  className: "flex flex-wrap items-center gap-2 rounded-lg bg-bg-surface px-3 py-2 text-sm text-text-primary",
241
256
  children: [
242
257
  /* @__PURE__ */ q("span", {
@@ -247,7 +262,7 @@ function Le({ courseId: e }) {
247
262
  className: "min-w-0 flex-1 truncate",
248
263
  children: e.title
249
264
  }),
250
- /* @__PURE__ */ q(me, {
265
+ /* @__PURE__ */ q(ye, {
251
266
  variant: "secondary",
252
267
  className: "text-[11px]",
253
268
  children: u(e.kind)
@@ -262,7 +277,7 @@ function Le({ courseId: e }) {
262
277
  type: "checkbox",
263
278
  checked: e.isPreview,
264
279
  disabled: d === e.id,
265
- onChange: () => void D(e)
280
+ onChange: () => void O(e)
266
281
  }), "Free preview"]
267
282
  }),
268
283
  /* @__PURE__ */ J(Y, {
@@ -270,13 +285,13 @@ function Le({ courseId: e }) {
270
285
  variant: "ghost",
271
286
  onClick: () => l(c === e.id ? null : e.id),
272
287
  children: [
273
- /* @__PURE__ */ q(oe, { size: 13 }),
288
+ /* @__PURE__ */ q(ue, { size: 13 }),
274
289
  " ",
275
290
  c === e.id ? "Close" : "Edit"
276
291
  ]
277
292
  })
278
293
  ]
279
- }), c === e.id ? /* @__PURE__ */ q(Ie, {
294
+ }), c === e.id ? /* @__PURE__ */ q(Ve, {
280
295
  lesson: e,
281
296
  onSaved: async () => {
282
297
  await r();
@@ -290,10 +305,10 @@ function Le({ courseId: e }) {
290
305
  placeholder: "Lesson title",
291
306
  value: p,
292
307
  onChange: (e) => h(e.target.value)
293
- }), /* @__PURE__ */ J(ge, {
308
+ }), /* @__PURE__ */ J(xe, {
294
309
  value: g,
295
310
  onValueChange: (e) => _(e),
296
- children: [/* @__PURE__ */ q(ye, { children: /* @__PURE__ */ q(be, {}) }), /* @__PURE__ */ q(_e, { children: Te.map((e) => /* @__PURE__ */ q(ve, {
311
+ children: [/* @__PURE__ */ q(we, { children: /* @__PURE__ */ q(Te, {}) }), /* @__PURE__ */ q(Se, { children: Ae.map((e) => /* @__PURE__ */ q(Ce, {
297
312
  value: e,
298
313
  children: u(e)
299
314
  }, e)) })]
@@ -305,6 +320,11 @@ function Le({ courseId: e }) {
305
320
  value: y,
306
321
  onChange: (e) => b(e.target.value)
307
322
  }),
323
+ /* @__PURE__ */ q(V, {
324
+ kind: g,
325
+ draft: ee,
326
+ onChange: E
327
+ }),
308
328
  /* @__PURE__ */ J("div", {
309
329
  className: "mt-2 flex flex-wrap items-center gap-3",
310
330
  children: [
@@ -328,27 +348,30 @@ function Le({ courseId: e }) {
328
348
  onClick: async () => {
329
349
  let t = p.trim();
330
350
  if (!t) return v.error("Lesson title is required");
351
+ let n = B(g, ee);
352
+ if (!n.ok) return v.error(n.error);
331
353
  (await i({ variables: { input: {
332
354
  courseId: e,
333
355
  title: t,
334
356
  kind: g,
335
357
  content: y.trim() || void 0,
336
- position: E.length + 1,
358
+ position: D.length + 1,
337
359
  estimatedMinutes: Q(x),
338
- isPreview: C
339
- } } })).data?.tecCreateLesson && (v.success("Lesson added", t), h(""), b(""), S(""), w(!1), await r());
360
+ isPreview: C,
361
+ ...n.input
362
+ } } })).data?.tecCreateLesson && (v.success("Lesson added", t), h(""), b(""), S(""), w(!1), E(z()), await r());
340
363
  },
341
364
  disabled: a,
342
365
  className: "ml-auto",
343
- children: [/* @__PURE__ */ q(ce, { size: 14 }), " Add lesson"]
366
+ children: [/* @__PURE__ */ q(fe, { size: 14 }), " Add lesson"]
344
367
  })
345
368
  ]
346
369
  })
347
370
  ]
348
371
  });
349
372
  }
350
- function Re({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
351
- let [i, a] = B(!1), s = e.verdict !== "PENDING";
373
+ function Ue({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
374
+ let [i, a] = H(!1), s = e.verdict !== "PENDING";
352
375
  return /* @__PURE__ */ J("div", {
353
376
  className: "space-y-3 rounded-lg bg-bg-surface px-3 py-3 text-sm",
354
377
  children: [
@@ -359,7 +382,7 @@ function Re({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
359
382
  /* @__PURE__ */ J("span", {
360
383
  className: "inline-flex items-center gap-1 text-xs text-text-muted",
361
384
  children: [
362
- /* @__PURE__ */ q(U, { size: 12 }),
385
+ /* @__PURE__ */ q(W, { size: 12 }),
363
386
  " ",
364
387
  u(e.language)
365
388
  ]
@@ -398,7 +421,7 @@ function Re({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
398
421
  variant: "outline",
399
422
  onClick: () => a((e) => !e),
400
423
  children: [
401
- /* @__PURE__ */ q(U, { size: 13 }),
424
+ /* @__PURE__ */ q(W, { size: 13 }),
402
425
  " ",
403
426
  i ? "Hide code" : "View code"
404
427
  ]
@@ -408,11 +431,11 @@ function Re({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
408
431
  variant: "outline",
409
432
  onClick: r,
410
433
  disabled: t,
411
- children: [/* @__PURE__ */ q(W, { size: 13 }), " Re-run grader"]
434
+ children: [/* @__PURE__ */ q(pe, { size: 13 }), " Re-run grader"]
412
435
  }) : null,
413
436
  /* @__PURE__ */ q("div", {
414
437
  className: "ml-auto flex flex-wrap gap-1",
415
- children: Ee.map((r) => /* @__PURE__ */ q(Y, {
438
+ children: je.map((r) => /* @__PURE__ */ q(Y, {
416
439
  size: "sm",
417
440
  variant: r === "ACCEPTED" ? "default" : "outline",
418
441
  onClick: () => n(r),
@@ -434,8 +457,8 @@ function Re({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
434
457
  ]
435
458
  });
436
459
  }
437
- function ze({ problemId: e }) {
438
- let { data: t, loading: n, refetch: r } = L({ problemId: e }), [i] = D(), [a] = N(), [o, s] = B(null), [c, l] = B(!1), d = t?.tecListSubmissions?.items ?? [], f = c ? d.filter((e) => e.verdict === "PENDING") : d, p = d.filter((e) => e.verdict === "PENDING").length, h = async (e, t) => {
460
+ function We({ problemId: e }) {
461
+ let { data: t, loading: n, refetch: r } = I({ problemId: e }), [i] = E(), [a] = N(), [o, s] = H(null), [c, l] = H(!1), d = t?.tecListSubmissions?.items ?? [], f = c ? d.filter((e) => e.verdict === "PENDING") : d, p = d.filter((e) => e.verdict === "PENDING").length, h = async (e, t) => {
439
462
  s(e);
440
463
  try {
441
464
  (await i({ variables: {
@@ -461,7 +484,7 @@ function ze({ problemId: e }) {
461
484
  children: [
462
485
  /* @__PURE__ */ q("span", {
463
486
  className: "flex h-7 w-7 items-center justify-center rounded-lg bg-accent-purple/15 text-accent-purple ring-1 ring-accent-purple/20",
464
- children: /* @__PURE__ */ q(ie, { size: 15 })
487
+ children: /* @__PURE__ */ q(ce, { size: 15 })
465
488
  }),
466
489
  /* @__PURE__ */ J("span", {
467
490
  className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
@@ -488,7 +511,7 @@ function ze({ problemId: e }) {
488
511
  children: c ? "Nothing is waiting on a verdict." : "No submissions yet."
489
512
  }) : /* @__PURE__ */ q("div", {
490
513
  className: "space-y-2",
491
- children: f.map((e) => /* @__PURE__ */ q(Re, {
514
+ children: f.map((e) => /* @__PURE__ */ q(Ue, {
492
515
  submission: e,
493
516
  busy: o === e.id,
494
517
  onGrade: (t) => void h(e.id, t),
@@ -497,8 +520,8 @@ function ze({ problemId: e }) {
497
520
  })]
498
521
  });
499
522
  }
500
- function Be({ hackathon: e }) {
501
- let { data: t, loading: n, refetch: r } = R(e.id), [i] = P(), [a, o] = B(null), [s, c] = B({}), l = t?.tecListTeams?.items ?? [], u = async (e, t) => {
523
+ function Ge({ hackathon: e }) {
524
+ let { data: t, loading: n, refetch: r } = L(e.id), [i] = P(), [a, o] = H(null), [s, c] = H({}), l = t?.tecListTeams?.items ?? [], u = async (e, t) => {
502
525
  let n = Math.max(0, Number(s[e] ?? "0") || 0);
503
526
  o(e);
504
527
  try {
@@ -579,7 +602,7 @@ function Be({ hackathon: e }) {
579
602
  variant: "outline",
580
603
  onClick: () => u(t.id, !0),
581
604
  disabled: a === t.id,
582
- children: [/* @__PURE__ */ q(de, { size: 14 }), " Winner"]
605
+ children: [/* @__PURE__ */ q(ge, { size: 14 }), " Winner"]
583
606
  })
584
607
  ]
585
608
  }) : /* @__PURE__ */ J("span", {
@@ -605,13 +628,13 @@ function Be({ hackathon: e }) {
605
628
  target: "_blank",
606
629
  rel: "noreferrer noopener",
607
630
  className: "inline-flex items-center gap-1 text-xs font-medium text-accent-primary hover:underline",
608
- children: [/* @__PURE__ */ q(re, { size: 12 }), " Project"]
631
+ children: [/* @__PURE__ */ q(se, { size: 12 }), " Project"]
609
632
  }) : null, t.repoUrl ? /* @__PURE__ */ J("a", {
610
633
  href: t.repoUrl,
611
634
  target: "_blank",
612
635
  rel: "noreferrer noopener",
613
636
  className: "inline-flex items-center gap-1 text-xs font-medium text-accent-primary hover:underline",
614
- children: [/* @__PURE__ */ q(U, { size: 12 }), " Repository"]
637
+ children: [/* @__PURE__ */ q(W, { size: 12 }), " Repository"]
615
638
  }) : null]
616
639
  })
617
640
  ]
@@ -623,32 +646,32 @@ function Be({ hackathon: e }) {
623
646
  })]
624
647
  });
625
648
  }
626
- function Ve() {
627
- let { data: e, loading: t, error: n, refetch: r } = S({}), [o, { loading: c }] = C(), [l] = j(), [g] = b(), [_, y] = B(!1), [x, w] = B(null), [T, E] = B(null), [D, ee] = B(""), [O, k] = B(""), [te, A] = B(""), [M, N] = B(""), [P, F] = B("BEGINNER"), [I, L] = B(""), [R, z] = B([]), V = e?.tecListCourses?.items ?? [], U = () => {
628
- ee(""), k(""), A(""), N(""), F("BEGINNER"), L(""), z([]), y(!1);
629
- }, re = async () => {
630
- let e = D.trim();
649
+ function Ke() {
650
+ let { data: e, loading: t, error: n, refetch: r } = S({}), [o, { loading: c }] = C(), [l] = te(), [g] = b(), [_, y] = H(!1), [x, w] = H(null), [T, ee] = H(null), [E, D] = H(""), [O, k] = H(""), [A, j] = H(""), [M, ne] = H(""), [N, P] = H("BEGINNER"), [re, F] = H(""), [I, L] = H([]), R = e?.tecListCourses?.items ?? [], z = () => {
651
+ D(""), k(""), j(""), ne(""), P("BEGINNER"), F(""), L([]), y(!1);
652
+ }, B = async () => {
653
+ let e = E.trim();
631
654
  if (!e) return v.error("Title is required");
632
- let t = ke(O || e);
655
+ let t = Pe(O || e);
633
656
  if (!t) return v.error("A valid slug is required");
634
657
  (await o({ variables: { input: {
635
658
  title: e,
636
659
  slug: t,
637
- summary: te.trim() || void 0,
660
+ summary: A.trim() || void 0,
638
661
  topic: M.trim() || void 0,
639
- level: P,
640
- estimatedMinutes: Q(I),
641
- tags: R
642
- } } })).data?.tecCreateCourse && (v.success("Course created", `"${e}" saved as a draft.`), U(), await r());
643
- }, ie = async (e) => {
662
+ level: N,
663
+ estimatedMinutes: Q(re),
664
+ tags: I
665
+ } } })).data?.tecCreateCourse && (v.success("Course created", `"${e}" saved as a draft.`), z(), await r());
666
+ }, V = async (e) => {
644
667
  w(e);
645
668
  try {
646
669
  (await l({ variables: { id: e } })).data?.tecPublishCourse && (v.success("Course published"), await r());
647
670
  } finally {
648
671
  w(null);
649
672
  }
650
- }, oe = async (e, t) => {
651
- if (await we({
673
+ }, ie = async (e, t) => {
674
+ if (await ke({
652
675
  title: "Archive course",
653
676
  message: `Archive "${t}"? Learners will no longer be able to enroll.`,
654
677
  okButtonTitle: "Archive",
@@ -665,24 +688,24 @@ function Ve() {
665
688
  return /* @__PURE__ */ J("div", {
666
689
  className: "space-y-4",
667
690
  children: [
668
- /* @__PURE__ */ q(Pe, {
669
- summary: `${V.length} course${V.length === 1 ? "" : "s"}`,
691
+ /* @__PURE__ */ q(ze, {
692
+ summary: `${R.length} course${R.length === 1 ? "" : "s"}`,
670
693
  actionLabel: "New course",
671
694
  open: _,
672
695
  onToggle: () => y((e) => !e)
673
696
  }),
674
- _ ? /* @__PURE__ */ J(Ne, {
697
+ _ ? /* @__PURE__ */ J(Re, {
675
698
  title: "New course",
676
699
  description: "Draft a course, then add lessons and publish when it's ready.",
677
- icon: H,
700
+ icon: U,
678
701
  footer: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Y, {
679
702
  variant: "outline",
680
703
  size: "sm",
681
- onClick: U,
704
+ onClick: z,
682
705
  children: "Cancel"
683
706
  }), /* @__PURE__ */ q(Y, {
684
707
  size: "sm",
685
- onClick: re,
708
+ onClick: B,
686
709
  disabled: c,
687
710
  children: c ? "Creating…" : "Create course"
688
711
  })] }),
@@ -691,8 +714,8 @@ function Ve() {
691
714
  label: "Title",
692
715
  required: !0,
693
716
  children: /* @__PURE__ */ q(X, {
694
- value: D,
695
- onChange: (e) => ee(e.target.value),
717
+ value: E,
718
+ onChange: (e) => D(e.target.value),
696
719
  placeholder: "Intro to TypeScript"
697
720
  })
698
721
  }),
@@ -709,16 +732,16 @@ function Ve() {
709
732
  label: "Topic",
710
733
  children: /* @__PURE__ */ q(X, {
711
734
  value: M,
712
- onChange: (e) => N(e.target.value),
735
+ onChange: (e) => ne(e.target.value),
713
736
  placeholder: "e.g. Web, AI, Data, Cloud"
714
737
  })
715
738
  }),
716
739
  /* @__PURE__ */ q($, {
717
740
  label: "Level",
718
- children: /* @__PURE__ */ J(ge, {
719
- value: P,
720
- onValueChange: (e) => F(e),
721
- children: [/* @__PURE__ */ q(ye, { children: /* @__PURE__ */ q(be, {}) }), /* @__PURE__ */ q(_e, { children: De.map((e) => /* @__PURE__ */ q(ve, {
741
+ children: /* @__PURE__ */ J(xe, {
742
+ value: N,
743
+ onValueChange: (e) => P(e),
744
+ children: [/* @__PURE__ */ q(we, { children: /* @__PURE__ */ q(Te, {}) }), /* @__PURE__ */ q(Se, { children: Me.map((e) => /* @__PURE__ */ q(Ce, {
722
745
  value: e,
723
746
  children: u(e)
724
747
  }, e)) })]
@@ -729,16 +752,16 @@ function Ve() {
729
752
  children: /* @__PURE__ */ q(X, {
730
753
  type: "number",
731
754
  min: 0,
732
- value: I,
733
- onChange: (e) => L(e.target.value),
755
+ value: re,
756
+ onChange: (e) => F(e.target.value),
734
757
  placeholder: "120"
735
758
  })
736
759
  }),
737
760
  /* @__PURE__ */ q($, {
738
761
  label: "Tags",
739
762
  children: /* @__PURE__ */ q(h, {
740
- value: R,
741
- onChange: z,
763
+ value: I,
764
+ onChange: L,
742
765
  placeholder: "typescript, basics"
743
766
  })
744
767
  }),
@@ -746,24 +769,24 @@ function Ve() {
746
769
  label: "Summary",
747
770
  className: "sm:col-span-2",
748
771
  children: /* @__PURE__ */ q(Z, {
749
- value: te,
750
- onChange: (e) => A(e.target.value),
772
+ value: A,
773
+ onChange: (e) => j(e.target.value),
751
774
  placeholder: "What learners will build and take away."
752
775
  })
753
776
  })
754
777
  ]
755
778
  }) : null,
756
- t && !V.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
779
+ t && !R.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
757
780
  title: "Couldn't load courses",
758
781
  error: n
759
- }) : V.length === 0 ? /* @__PURE__ */ q(f, {
760
- icon: /* @__PURE__ */ q(H, { size: 26 }),
782
+ }) : R.length === 0 ? /* @__PURE__ */ q(f, {
783
+ icon: /* @__PURE__ */ q(U, { size: 26 }),
761
784
  title: "No courses yet",
762
785
  description: "Create your first course with the button above. TechnoSpam is pre-launch."
763
786
  }) : /* @__PURE__ */ q("div", {
764
787
  className: "space-y-3",
765
- children: V.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Fe, {
766
- leading: /* @__PURE__ */ q(Me, {
788
+ children: R.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Be, {
789
+ leading: /* @__PURE__ */ q(Le, {
767
790
  seed: `${e.topic ?? ""} ${e.title}`,
768
791
  icon: i(e.topic ?? e.title)
769
792
  }),
@@ -771,21 +794,21 @@ function Ve() {
771
794
  /* @__PURE__ */ J(Y, {
772
795
  size: "sm",
773
796
  variant: "outline",
774
- onClick: () => E(T === e.id ? null : e.id),
775
- children: [/* @__PURE__ */ q(ae, { size: 15 }), " Lessons"]
797
+ onClick: () => ee(T === e.id ? null : e.id),
798
+ children: [/* @__PURE__ */ q(le, { size: 15 }), " Lessons"]
776
799
  }),
777
800
  e.status === "DRAFT" ? /* @__PURE__ */ J(Y, {
778
801
  size: "sm",
779
- onClick: () => ie(e.id),
802
+ onClick: () => V(e.id),
780
803
  disabled: x === e.id,
781
- children: [/* @__PURE__ */ q(le, { size: 15 }), " Publish"]
804
+ children: [/* @__PURE__ */ q(me, { size: 15 }), " Publish"]
782
805
  }) : null,
783
806
  e.status === "ARCHIVED" ? null : /* @__PURE__ */ J(Y, {
784
807
  size: "sm",
785
808
  variant: "outline",
786
- onClick: () => oe(e.id, e.title),
809
+ onClick: () => ie(e.id, e.title),
787
810
  disabled: x === e.id,
788
- children: [/* @__PURE__ */ q(ne, { size: 15 }), " Archive"]
811
+ children: [/* @__PURE__ */ q(ae, { size: 15 }), " Archive"]
789
812
  })
790
813
  ] }),
791
814
  children: [/* @__PURE__ */ J("div", {
@@ -813,30 +836,30 @@ function Ve() {
813
836
  a(e.updatedAt)
814
837
  ]
815
838
  })]
816
- }), T === e.id ? /* @__PURE__ */ q(Le, { courseId: e.id }) : null] }, e.id))
839
+ }), T === e.id ? /* @__PURE__ */ q(He, { courseId: e.id }) : null] }, e.id))
817
840
  })
818
841
  ]
819
842
  });
820
843
  }
821
- function He() {
822
- let { data: e, loading: t, error: n, refetch: r } = A({}), [a, { loading: o }] = E(), [s] = M(), [c, l] = B(!1), [h, g] = B(null), [_, y] = B(null), [b, x] = B(""), [S, C] = B(""), [w, T] = B(""), [D, ee] = B(""), [O, k] = B("EASY"), [te, j] = B(""), [N, P] = B(""), [F, I] = B(""), L = e?.tecListProblems?.items ?? [], R = () => {
823
- x(""), C(""), T(""), ee(""), k("EASY"), j(""), P(""), I(""), l(!1);
824
- }, z = async () => {
844
+ function qe() {
845
+ let { data: e, loading: t, error: n, refetch: r } = M({}), [a, { loading: o }] = ee(), [s] = ne(), [c, l] = H(!1), [h, g] = H(null), [_, y] = H(null), [b, x] = H(""), [S, C] = H(""), [w, T] = H(""), [E, D] = H(""), [O, k] = H("EASY"), [A, j] = H(""), [te, N] = H(""), [P, re] = H(""), F = e?.tecListProblems?.items ?? [], I = () => {
846
+ x(""), C(""), T(""), D(""), k("EASY"), j(""), N(""), re(""), l(!1);
847
+ }, L = async () => {
825
848
  let e = b.trim();
826
849
  if (!e) return v.error("Title is required");
827
- let t = ke(S || e);
850
+ let t = Pe(S || e);
828
851
  if (!t) return v.error("A valid slug is required");
829
852
  (await a({ variables: { input: {
830
853
  title: e,
831
854
  slug: t,
832
855
  statement: w.trim() || void 0,
833
- topic: D.trim() || void 0,
856
+ topic: E.trim() || void 0,
834
857
  difficulty: O,
835
- points: Q(te),
836
- languages: Ae(N),
837
- starterCode: F.trim() || void 0
838
- } } })).data?.tecCreateProblem && (v.success("Problem created", `"${e}" saved as a draft.`), R(), await r());
839
- }, ne = async (e) => {
858
+ points: Q(A),
859
+ languages: Fe(te),
860
+ starterCode: P.trim() || void 0
861
+ } } })).data?.tecCreateProblem && (v.success("Problem created", `"${e}" saved as a draft.`), I(), await r());
862
+ }, R = async (e) => {
840
863
  g(e);
841
864
  try {
842
865
  (await s({ variables: { id: e } })).data?.tecPublishProblem && (v.success("Problem published"), await r());
@@ -847,24 +870,24 @@ function He() {
847
870
  return /* @__PURE__ */ J("div", {
848
871
  className: "space-y-4",
849
872
  children: [
850
- /* @__PURE__ */ q(Pe, {
851
- summary: `${L.length} problem${L.length === 1 ? "" : "s"}`,
873
+ /* @__PURE__ */ q(ze, {
874
+ summary: `${F.length} problem${F.length === 1 ? "" : "s"}`,
852
875
  actionLabel: "New problem",
853
876
  open: c,
854
877
  onToggle: () => l((e) => !e)
855
878
  }),
856
- c ? /* @__PURE__ */ J(Ne, {
879
+ c ? /* @__PURE__ */ J(Re, {
857
880
  title: "New problem",
858
881
  description: "Define a coding challenge learners can solve and submit.",
859
- icon: U,
882
+ icon: W,
860
883
  footer: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Y, {
861
884
  variant: "outline",
862
885
  size: "sm",
863
- onClick: R,
886
+ onClick: I,
864
887
  children: "Cancel"
865
888
  }), /* @__PURE__ */ q(Y, {
866
889
  size: "sm",
867
- onClick: z,
890
+ onClick: L,
868
891
  disabled: o,
869
892
  children: o ? "Creating…" : "Create problem"
870
893
  })] }),
@@ -890,17 +913,17 @@ function He() {
890
913
  /* @__PURE__ */ q($, {
891
914
  label: "Topic",
892
915
  children: /* @__PURE__ */ q(X, {
893
- value: D,
894
- onChange: (e) => ee(e.target.value),
916
+ value: E,
917
+ onChange: (e) => D(e.target.value),
895
918
  placeholder: "Arrays"
896
919
  })
897
920
  }),
898
921
  /* @__PURE__ */ q($, {
899
922
  label: "Difficulty",
900
- children: /* @__PURE__ */ J(ge, {
923
+ children: /* @__PURE__ */ J(xe, {
901
924
  value: O,
902
925
  onValueChange: (e) => k(e),
903
- children: [/* @__PURE__ */ q(ye, { children: /* @__PURE__ */ q(be, {}) }), /* @__PURE__ */ q(_e, { children: Oe.map((e) => /* @__PURE__ */ q(ve, {
926
+ children: [/* @__PURE__ */ q(we, { children: /* @__PURE__ */ q(Te, {}) }), /* @__PURE__ */ q(Se, { children: Ne.map((e) => /* @__PURE__ */ q(Ce, {
904
927
  value: e,
905
928
  children: u(e)
906
929
  }, e)) })]
@@ -911,7 +934,7 @@ function He() {
911
934
  children: /* @__PURE__ */ q(X, {
912
935
  type: "number",
913
936
  min: 0,
914
- value: te,
937
+ value: A,
915
938
  onChange: (e) => j(e.target.value),
916
939
  placeholder: "100"
917
940
  })
@@ -919,8 +942,8 @@ function He() {
919
942
  /* @__PURE__ */ q($, {
920
943
  label: "Languages (comma-separated)",
921
944
  children: /* @__PURE__ */ q(X, {
922
- value: N,
923
- onChange: (e) => P(e.target.value),
945
+ value: te,
946
+ onChange: (e) => N(e.target.value),
924
947
  placeholder: "python, typescript"
925
948
  })
926
949
  }),
@@ -937,25 +960,25 @@ function He() {
937
960
  label: "Starter code",
938
961
  className: "sm:col-span-2",
939
962
  children: /* @__PURE__ */ q(Z, {
940
- value: F,
941
- onChange: (e) => I(e.target.value),
963
+ value: P,
964
+ onChange: (e) => re(e.target.value),
942
965
  className: "font-mono",
943
966
  placeholder: "def solve(nums, target):\\n pass"
944
967
  })
945
968
  })
946
969
  ]
947
970
  }) : null,
948
- t && !L.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
971
+ t && !F.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
949
972
  title: "Couldn't load problems",
950
973
  error: n
951
- }) : L.length === 0 ? /* @__PURE__ */ q(f, {
952
- icon: /* @__PURE__ */ q(U, { size: 26 }),
974
+ }) : F.length === 0 ? /* @__PURE__ */ q(f, {
975
+ icon: /* @__PURE__ */ q(W, { size: 26 }),
953
976
  title: "No problems yet",
954
977
  description: "Create your first coding problem with the button above. TechnoSpam is pre-launch."
955
978
  }) : /* @__PURE__ */ q("div", {
956
979
  className: "space-y-3",
957
- children: L.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Fe, {
958
- leading: /* @__PURE__ */ q(Me, {
980
+ children: F.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Be, {
981
+ leading: /* @__PURE__ */ q(Le, {
959
982
  seed: `${e.topic ?? ""} ${e.title}`,
960
983
  icon: i(e.topic ?? e.title)
961
984
  }),
@@ -963,12 +986,12 @@ function He() {
963
986
  size: "sm",
964
987
  variant: "outline",
965
988
  onClick: () => y(_ === e.id ? null : e.id),
966
- children: [/* @__PURE__ */ q(ie, { size: 15 }), " Grade"]
989
+ children: [/* @__PURE__ */ q(ce, { size: 15 }), " Grade"]
967
990
  }), e.status === "DRAFT" ? /* @__PURE__ */ J(Y, {
968
991
  size: "sm",
969
- onClick: () => ne(e.id),
992
+ onClick: () => R(e.id),
970
993
  disabled: h === e.id,
971
- children: [/* @__PURE__ */ q(le, { size: 15 }), " Publish"]
994
+ children: [/* @__PURE__ */ q(me, { size: 15 }), " Publish"]
972
995
  }) : null] }),
973
996
  children: [/* @__PURE__ */ J("div", {
974
997
  className: "flex flex-wrap items-center gap-2",
@@ -996,41 +1019,41 @@ function He() {
996
1019
  e.languages.length ? e.languages.join(", ") : "No languages"
997
1020
  ]
998
1021
  })]
999
- }), _ === e.id ? /* @__PURE__ */ q(ze, { problemId: e.id }) : null] }, e.id))
1022
+ }), _ === e.id ? /* @__PURE__ */ q(We, { problemId: e.id }) : null] }, e.id))
1000
1023
  })
1001
1024
  ]
1002
1025
  });
1003
1026
  }
1004
- function Ue() {
1005
- let { data: e, loading: t, error: n, refetch: r } = ee({}), [a, { loading: s }] = w(), [l] = te(), [u] = F(), [g] = I(), [_] = x(), [y, b] = B(!1), [S, C] = B(null), [T, E] = B(null), [D, O] = B(""), [k, A] = B(""), [j, M] = B(""), [N, P] = B(""), [L, R] = B(""), [z, ne] = B(""), [H, U] = B(""), [re, ae] = B(""), [oe, ce] = B([]), W = e?.tecListHackathons?.items ?? [], ue = () => {
1006
- O(""), A(""), M(""), P(""), R(""), ne(""), U(""), ae(""), ce([]), b(!1);
1007
- }, fe = async () => {
1008
- let e = D.trim();
1027
+ function Je() {
1028
+ let { data: e, loading: t, error: n, refetch: r } = D({}), [a, { loading: s }] = w(), [l] = j(), [u] = re(), [g] = F(), [_] = x(), [y, b] = H(!1), [S, C] = H(null), [T, ee] = H(null), [E, O] = H(""), [k, A] = H(""), [M, te] = H(""), [ne, N] = H(""), [P, I] = H(""), [L, R] = H(""), [z, B] = H(""), [V, ie] = H(""), [ae, U] = H([]), W = e?.tecListHackathons?.items ?? [], se = () => {
1029
+ O(""), A(""), te(""), N(""), I(""), R(""), B(""), ie(""), U([]), b(!1);
1030
+ }, le = async () => {
1031
+ let e = E.trim();
1009
1032
  if (!e) return v.error("Title is required");
1010
- let t = ke(k || e);
1033
+ let t = Pe(k || e);
1011
1034
  if (!t) return v.error("A valid slug is required");
1012
- let n = je(L), i = je(z);
1035
+ let n = Ie(P), i = Ie(L);
1013
1036
  if (!n || !i) return v.error("Start and end date/time are required");
1014
1037
  if (new Date(i) <= new Date(n)) return v.error("End must be after the start");
1015
1038
  (await a({ variables: { input: {
1016
1039
  title: e,
1017
1040
  slug: t,
1018
- theme: j.trim() || void 0,
1019
- description: N.trim() || void 0,
1041
+ theme: M.trim() || void 0,
1042
+ description: ne.trim() || void 0,
1020
1043
  startAt: n,
1021
1044
  endAt: i,
1022
- prizePool: Q(H),
1023
- maxTeamSize: Q(re),
1024
- tags: oe
1025
- } } })).data?.tecCreateHackathon && (v.success("Hackathon created", `"${e}" saved as a draft.`), ue(), await r());
1026
- }, pe = async (e) => {
1045
+ prizePool: Q(z),
1046
+ maxTeamSize: Q(V),
1047
+ tags: ae
1048
+ } } })).data?.tecCreateHackathon && (v.success("Hackathon created", `"${e}" saved as a draft.`), se(), await r());
1049
+ }, ue = async (e) => {
1027
1050
  C(e);
1028
1051
  try {
1029
1052
  (await l({ variables: { id: e } })).data?.tecOpenRegistration && (v.success("Registration open", "Teams can now register."), await r());
1030
1053
  } finally {
1031
1054
  C(null);
1032
1055
  }
1033
- }, me = async (e, t, n) => {
1056
+ }, fe = async (e, t, n) => {
1034
1057
  C(e);
1035
1058
  try {
1036
1059
  (await t({ variables: { id: e } })).data && (v.success(n), await r());
@@ -1041,24 +1064,24 @@ function Ue() {
1041
1064
  return /* @__PURE__ */ J("div", {
1042
1065
  className: "space-y-4",
1043
1066
  children: [
1044
- /* @__PURE__ */ q(Pe, {
1067
+ /* @__PURE__ */ q(ze, {
1045
1068
  summary: `${W.length} hackathon${W.length === 1 ? "" : "s"}`,
1046
1069
  actionLabel: "New hackathon",
1047
1070
  open: y,
1048
1071
  onToggle: () => b((e) => !e)
1049
1072
  }),
1050
- y ? /* @__PURE__ */ J(Ne, {
1073
+ y ? /* @__PURE__ */ J(Re, {
1051
1074
  title: "New hackathon",
1052
1075
  description: "Set up an event, open registration, then run judging to completion.",
1053
- icon: de,
1076
+ icon: ge,
1054
1077
  footer: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Y, {
1055
1078
  variant: "outline",
1056
1079
  size: "sm",
1057
- onClick: ue,
1080
+ onClick: se,
1058
1081
  children: "Cancel"
1059
1082
  }), /* @__PURE__ */ q(Y, {
1060
1083
  size: "sm",
1061
- onClick: fe,
1084
+ onClick: le,
1062
1085
  disabled: s,
1063
1086
  children: s ? "Creating…" : "Create hackathon"
1064
1087
  })] }),
@@ -1067,7 +1090,7 @@ function Ue() {
1067
1090
  label: "Title",
1068
1091
  required: !0,
1069
1092
  children: /* @__PURE__ */ q(X, {
1070
- value: D,
1093
+ value: E,
1071
1094
  onChange: (e) => O(e.target.value),
1072
1095
  placeholder: "Build Days 2026"
1073
1096
  })
@@ -1084,16 +1107,16 @@ function Ue() {
1084
1107
  /* @__PURE__ */ q($, {
1085
1108
  label: "Theme",
1086
1109
  children: /* @__PURE__ */ q(X, {
1087
- value: j,
1088
- onChange: (e) => M(e.target.value),
1110
+ value: M,
1111
+ onChange: (e) => te(e.target.value),
1089
1112
  placeholder: "AI for good"
1090
1113
  })
1091
1114
  }),
1092
1115
  /* @__PURE__ */ q($, {
1093
1116
  label: "Tags",
1094
1117
  children: /* @__PURE__ */ q(h, {
1095
- value: oe,
1096
- onChange: ce,
1118
+ value: ae,
1119
+ onChange: U,
1097
1120
  placeholder: "ai, web"
1098
1121
  })
1099
1122
  }),
@@ -1102,8 +1125,8 @@ function Ue() {
1102
1125
  required: !0,
1103
1126
  children: /* @__PURE__ */ q(X, {
1104
1127
  type: "datetime-local",
1105
- value: L,
1106
- onChange: (e) => R(e.target.value)
1128
+ value: P,
1129
+ onChange: (e) => I(e.target.value)
1107
1130
  })
1108
1131
  }),
1109
1132
  /* @__PURE__ */ q($, {
@@ -1111,8 +1134,8 @@ function Ue() {
1111
1134
  required: !0,
1112
1135
  children: /* @__PURE__ */ q(X, {
1113
1136
  type: "datetime-local",
1114
- value: z,
1115
- onChange: (e) => ne(e.target.value)
1137
+ value: L,
1138
+ onChange: (e) => R(e.target.value)
1116
1139
  })
1117
1140
  }),
1118
1141
  /* @__PURE__ */ q($, {
@@ -1120,8 +1143,8 @@ function Ue() {
1120
1143
  children: /* @__PURE__ */ q(X, {
1121
1144
  type: "number",
1122
1145
  min: 0,
1123
- value: H,
1124
- onChange: (e) => U(e.target.value),
1146
+ value: z,
1147
+ onChange: (e) => B(e.target.value),
1125
1148
  placeholder: "5000"
1126
1149
  })
1127
1150
  }),
@@ -1130,8 +1153,8 @@ function Ue() {
1130
1153
  children: /* @__PURE__ */ q(X, {
1131
1154
  type: "number",
1132
1155
  min: 1,
1133
- value: re,
1134
- onChange: (e) => ae(e.target.value),
1156
+ value: V,
1157
+ onChange: (e) => ie(e.target.value),
1135
1158
  placeholder: "4"
1136
1159
  })
1137
1160
  }),
@@ -1139,8 +1162,8 @@ function Ue() {
1139
1162
  label: "Description",
1140
1163
  className: "sm:col-span-2",
1141
1164
  children: /* @__PURE__ */ q(Z, {
1142
- value: N,
1143
- onChange: (e) => P(e.target.value),
1165
+ value: ne,
1166
+ onChange: (e) => N(e.target.value),
1144
1167
  placeholder: "What the hackathon is about and how judging works."
1145
1168
  })
1146
1169
  })
@@ -1150,46 +1173,46 @@ function Ue() {
1150
1173
  title: "Couldn't load hackathons",
1151
1174
  error: n
1152
1175
  }) : W.length === 0 ? /* @__PURE__ */ q(f, {
1153
- icon: /* @__PURE__ */ q(de, { size: 26 }),
1176
+ icon: /* @__PURE__ */ q(ge, { size: 26 }),
1154
1177
  title: "No hackathons yet",
1155
1178
  description: "Create your first hackathon with the button above. TechnoSpam is pre-launch."
1156
1179
  }) : /* @__PURE__ */ q("div", {
1157
1180
  className: "space-y-3",
1158
- children: W.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Fe, {
1159
- leading: /* @__PURE__ */ q(Me, {
1181
+ children: W.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Be, {
1182
+ leading: /* @__PURE__ */ q(Le, {
1160
1183
  seed: e.title,
1161
- icon: i(e.title, de)
1184
+ icon: i(e.title, ge)
1162
1185
  }),
1163
1186
  actions: /* @__PURE__ */ J(K, { children: [
1164
1187
  /* @__PURE__ */ J(Y, {
1165
1188
  size: "sm",
1166
1189
  variant: "outline",
1167
- onClick: () => E(T === e.id ? null : e.id),
1190
+ onClick: () => ee(T === e.id ? null : e.id),
1168
1191
  children: [/* @__PURE__ */ q(G, { size: 15 }), " Teams"]
1169
1192
  }),
1170
1193
  e.status === "DRAFT" ? /* @__PURE__ */ J(Y, {
1171
1194
  size: "sm",
1172
- onClick: () => pe(e.id),
1195
+ onClick: () => ue(e.id),
1173
1196
  disabled: S === e.id,
1174
- children: [/* @__PURE__ */ q(le, { size: 15 }), " Open registration"]
1197
+ children: [/* @__PURE__ */ q(me, { size: 15 }), " Open registration"]
1175
1198
  }) : null,
1176
1199
  e.status === "REGISTRATION_OPEN" ? /* @__PURE__ */ J(Y, {
1177
1200
  size: "sm",
1178
- onClick: () => me(e.id, u, "Hackathon started"),
1201
+ onClick: () => fe(e.id, u, "Hackathon started"),
1179
1202
  disabled: S === e.id,
1180
- children: [/* @__PURE__ */ q(se, { size: 15 }), " Start"]
1203
+ children: [/* @__PURE__ */ q(de, { size: 15 }), " Start"]
1181
1204
  }) : null,
1182
1205
  e.status === "IN_PROGRESS" ? /* @__PURE__ */ J(Y, {
1183
1206
  size: "sm",
1184
- onClick: () => me(e.id, g, "Judging started"),
1207
+ onClick: () => fe(e.id, g, "Judging started"),
1185
1208
  disabled: S === e.id,
1186
- children: [/* @__PURE__ */ q(ie, { size: 15 }), " Start judging"]
1209
+ children: [/* @__PURE__ */ q(ce, { size: 15 }), " Start judging"]
1187
1210
  }) : null,
1188
1211
  e.status === "JUDGING" ? /* @__PURE__ */ J(Y, {
1189
1212
  size: "sm",
1190
- onClick: () => me(e.id, _, "Hackathon completed"),
1213
+ onClick: () => fe(e.id, _, "Hackathon completed"),
1191
1214
  disabled: S === e.id,
1192
- children: [/* @__PURE__ */ q(V, { size: 15 }), " Complete"]
1215
+ children: [/* @__PURE__ */ q(oe, { size: 15 }), " Complete"]
1193
1216
  }) : null
1194
1217
  ] }),
1195
1218
  children: [/* @__PURE__ */ J("div", {
@@ -1209,13 +1232,13 @@ function Ue() {
1209
1232
  e.prizePool ? ` · ${c(e.prizePool, e.currency)} prize` : ""
1210
1233
  ]
1211
1234
  })]
1212
- }), T === e.id ? /* @__PURE__ */ q(Be, { hackathon: e }) : null] }, e.id))
1235
+ }), T === e.id ? /* @__PURE__ */ q(Ge, { hackathon: e }) : null] }, e.id))
1213
1236
  })
1214
1237
  ]
1215
1238
  });
1216
1239
  }
1217
- function We() {
1218
- let { data: e, loading: t, error: n, refetch: r } = k({}), [a] = y(), [o, s] = B(null), c = e?.tecListMentors?.items ?? [], u = c.filter((e) => e.status === "PENDING").length, h = async (e) => {
1240
+ function Ye() {
1241
+ let { data: e, loading: t, error: n, refetch: r } = A({}), [a] = y(), [o, s] = H(null), c = e?.tecListMentors?.items ?? [], u = c.filter((e) => e.status === "PENDING").length, h = async (e) => {
1219
1242
  s(e);
1220
1243
  try {
1221
1244
  (await a({ variables: { id: e } })).data?.tecApproveMentor && (v.success("Mentor approved", "They can now accept mentees."), await r());
@@ -1225,7 +1248,7 @@ function We() {
1225
1248
  };
1226
1249
  return /* @__PURE__ */ J("div", {
1227
1250
  className: "space-y-4",
1228
- children: [/* @__PURE__ */ q(Pe, { summary: `${c.length} mentor${c.length === 1 ? "" : "s"}${u ? ` · ${u} pending approval` : ""}` }), t && !c.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
1251
+ children: [/* @__PURE__ */ q(ze, { summary: `${c.length} mentor${c.length === 1 ? "" : "s"}${u ? ` · ${u} pending approval` : ""}` }), t && !c.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
1229
1252
  title: "Couldn't load mentors",
1230
1253
  error: n
1231
1254
  }) : c.length === 0 ? /* @__PURE__ */ q(f, {
@@ -1234,8 +1257,8 @@ function We() {
1234
1257
  description: "Mentor applications will appear here for review. TechnoSpam is pre-launch."
1235
1258
  }) : /* @__PURE__ */ q("div", {
1236
1259
  className: "space-y-3",
1237
- children: c.map((e) => /* @__PURE__ */ J(Fe, {
1238
- leading: /* @__PURE__ */ q(Me, {
1260
+ children: c.map((e) => /* @__PURE__ */ J(Be, {
1261
+ leading: /* @__PURE__ */ q(Le, {
1239
1262
  seed: e.headline,
1240
1263
  icon: i(e.expertise[0] ?? e.headline, G)
1241
1264
  }),
@@ -1243,7 +1266,7 @@ function We() {
1243
1266
  size: "sm",
1244
1267
  onClick: () => h(e.id),
1245
1268
  disabled: o === e.id,
1246
- children: [/* @__PURE__ */ q(fe, { size: 15 }), " Approve"]
1269
+ children: [/* @__PURE__ */ q(_e, { size: 15 }), " Approve"]
1247
1270
  }) : void 0,
1248
1271
  children: [/* @__PURE__ */ J("div", {
1249
1272
  className: "flex flex-wrap items-center gap-2",
@@ -1253,7 +1276,7 @@ function We() {
1253
1276
  children: e.headline
1254
1277
  }),
1255
1278
  /* @__PURE__ */ q(d, { status: e.status }),
1256
- e.isAcceptingMentees ? /* @__PURE__ */ q(me, {
1279
+ e.isAcceptingMentees ? /* @__PURE__ */ q(ye, {
1257
1280
  variant: "secondary",
1258
1281
  className: "text-[11px]",
1259
1282
  children: "Accepting mentees"
@@ -1276,16 +1299,16 @@ function We() {
1276
1299
  })]
1277
1300
  });
1278
1301
  }
1279
- function Ge() {
1280
- let [t, r] = B("courses"), { currentUser: i } = e(), a = (i?.role ?? "").toLowerCase();
1302
+ function Xe() {
1303
+ let [t, r] = H("courses"), { currentUser: i } = e(), a = (i?.role ?? "").toLowerCase();
1281
1304
  return /* @__PURE__ */ J(n, {
1282
1305
  hero: !0,
1283
1306
  title: "Authoring Console",
1284
1307
  description: "Create and manage TechnoSpam content — courses, problems, hackathons, and mentor applications.",
1285
1308
  children: [
1286
- a.includes("admin") || a.includes("owner") || a.includes("instructor") ? null : /* @__PURE__ */ J(he, {
1309
+ a.includes("admin") || a.includes("owner") || a.includes("instructor") ? null : /* @__PURE__ */ J(be, {
1287
1310
  className: "mb-5 flex items-start gap-3 border-status-warning-border p-4",
1288
- children: [/* @__PURE__ */ q(ue, {
1311
+ children: [/* @__PURE__ */ q(he, {
1289
1312
  size: 18,
1290
1313
  className: "mt-0.5 shrink-0 text-status-warning-text"
1291
1314
  }), /* @__PURE__ */ J("div", {
@@ -1300,36 +1323,36 @@ function Ge() {
1300
1323
  ]
1301
1324
  })]
1302
1325
  }),
1303
- /* @__PURE__ */ q(xe, {
1326
+ /* @__PURE__ */ q(Ee, {
1304
1327
  value: t,
1305
1328
  onValueChange: (e) => r(e),
1306
- children: /* @__PURE__ */ J(Se, {
1329
+ children: /* @__PURE__ */ J(De, {
1307
1330
  className: "mb-5",
1308
1331
  children: [
1309
- /* @__PURE__ */ J(Ce, {
1332
+ /* @__PURE__ */ J(Oe, {
1310
1333
  value: "courses",
1311
- children: [/* @__PURE__ */ q(H, { size: 15 }), " Courses"]
1334
+ children: [/* @__PURE__ */ q(U, { size: 15 }), " Courses"]
1312
1335
  }),
1313
- /* @__PURE__ */ J(Ce, {
1336
+ /* @__PURE__ */ J(Oe, {
1314
1337
  value: "problems",
1315
- children: [/* @__PURE__ */ q(U, { size: 15 }), " Problems"]
1338
+ children: [/* @__PURE__ */ q(W, { size: 15 }), " Problems"]
1316
1339
  }),
1317
- /* @__PURE__ */ J(Ce, {
1340
+ /* @__PURE__ */ J(Oe, {
1318
1341
  value: "hackathons",
1319
- children: [/* @__PURE__ */ q(de, { size: 15 }), " Hackathons"]
1342
+ children: [/* @__PURE__ */ q(ge, { size: 15 }), " Hackathons"]
1320
1343
  }),
1321
- /* @__PURE__ */ J(Ce, {
1344
+ /* @__PURE__ */ J(Oe, {
1322
1345
  value: "mentors",
1323
1346
  children: [/* @__PURE__ */ q(G, { size: 15 }), " Mentors"]
1324
1347
  })
1325
1348
  ]
1326
1349
  })
1327
1350
  }),
1328
- q(t === "courses" ? Ve : t === "problems" ? He : t === "hackathons" ? Ue : We, {})
1351
+ q(t === "courses" ? Ke : t === "problems" ? qe : t === "hackathons" ? Je : Ye, {})
1329
1352
  ]
1330
1353
  });
1331
1354
  }
1332
1355
  //#endregion
1333
- export { Ge as AdminAdminDashboardPagePage };
1356
+ export { Xe as AdminAdminDashboardPagePage };
1334
1357
 
1335
1358
  //# sourceMappingURL=AdminAdminDashboardPagePage.js.map