@hydralms/components 0.3.0 → 0.3.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/StudentProfile-BPsZBaJj.cjs +1 -0
- package/dist/{StudentProfile-DeMxdrL3.js → StudentProfile-Cw2p-RZn.js} +577 -579
- package/dist/index.cjs +1 -1
- package/dist/index.js +172 -166
- package/dist/license/index.d.ts +2 -2
- package/dist/license/tiers.d.ts +3 -0
- package/dist/modules.cjs +1 -1
- package/dist/modules.js +111 -110
- package/dist/sections/AdaptiveLearningPath/AdaptiveLearningPath.d.ts +5 -0
- package/dist/sections/AdaptiveLearningPath/path-connector.d.ts +8 -0
- package/dist/sections/AdaptiveLearningPath/path-milestone-marker.d.ts +7 -0
- package/dist/sections/AdaptiveLearningPath/path-node-card.d.ts +10 -0
- package/dist/sections/AdaptiveLearningPath/path-skill-bar.d.ts +8 -0
- package/dist/sections/AdaptiveLearningPath/types.d.ts +136 -0
- package/dist/sections/ContentAuthoringStudio/ContentAuthoringStudio.d.ts +5 -0
- package/dist/sections/ContentAuthoringStudio/block-editor-item.d.ts +14 -0
- package/dist/sections/ContentAuthoringStudio/block-type-picker.d.ts +12 -0
- package/dist/sections/ContentAuthoringStudio/types.d.ts +67 -0
- package/dist/sections/index.d.ts +4 -0
- package/dist/sections.cjs +1 -1
- package/dist/sections.js +1325 -232
- package/dist/withProGate-BJdu1T9Y.cjs +2 -0
- package/dist/withProGate-BvFc7Jwy.js +4975 -0
- package/package.json +24 -7
- package/src/license/index.ts +2 -2
- package/src/license/tiers.ts +12 -2
- package/src/modules/CoursePlayer/CoursePlayer.tsx +3 -1
- package/src/progress/stat-card.tsx +10 -5
- package/src/sections/AdaptiveLearningPath/AdaptiveLearningPath.tsx +251 -0
- package/src/sections/AdaptiveLearningPath/path-connector.tsx +27 -0
- package/src/sections/AdaptiveLearningPath/path-milestone-marker.tsx +50 -0
- package/src/sections/AdaptiveLearningPath/path-node-card.tsx +166 -0
- package/src/sections/AdaptiveLearningPath/path-skill-bar.tsx +49 -0
- package/src/sections/AdaptiveLearningPath/types.ts +159 -0
- package/src/sections/ContentAuthoringStudio/ContentAuthoringStudio.tsx +289 -0
- package/src/sections/ContentAuthoringStudio/block-editor-item.tsx +487 -0
- package/src/sections/ContentAuthoringStudio/block-type-picker.tsx +123 -0
- package/src/sections/ContentAuthoringStudio/types.ts +67 -0
- package/src/sections/ForumBoard/ForumBoard.tsx +8 -6
- package/src/sections/LessonPage/LessonPage.tsx +4 -7
- package/src/sections/index.ts +18 -0
- package/src/video/video-player.tsx +14 -5
- package/dist/StudentProfile-BVfZMbnV.cjs +0 -1
- package/dist/tabs-BsfVo2Bl.cjs +0 -173
- package/dist/tabs-BuY1iNJE.js +0 -22305
- package/dist/withProGate-BWqcKdPM.js +0 -137
- package/dist/withProGate-DX6XqKLp.cjs +0 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsx as e, Fragment as O, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { useState as F, useRef as J, useEffect as
|
|
3
|
-
import { AlertCircle as q, ChevronLeft as
|
|
4
|
-
import { c as k,
|
|
2
|
+
import { useState as F, useRef as J, useEffect as ge, useMemo as j, useCallback as Y, Fragment as At, memo as Lt } from "react";
|
|
3
|
+
import { AlertCircle as q, ChevronLeft as Ut, ChevronRight as Re, Send as Ye, CheckCircle as De, Clock as xe, Check as Qe, Pin as Ze, MessageSquare as Te, Heart as Je, Reply as Rt, Save as Dt, ArrowUp as Tt, ArrowDown as Mt, BookOpen as oe, Award as Se, Printer as It, Download as Ft, CheckCircle2 as me, Circle as Pt, Plus as Et, ArrowUpDown as _t, XCircle as $e, Loader2 as Bt, Grid as jt, List as Qt, GraduationCap as ze, Calendar as $t } from "lucide-react";
|
|
4
|
+
import { c as k, a2 as $, v as D, s as Ke, C as E, D as Me, ao as Xe, x as _, ar as be, ap as qe, aw as f, aV as Ve, E as Vt, a8 as Gt, B as X, av as G, P as fe, M as Ht, b7 as Wt, a$ as Ge, a4 as Ot, d as et, e as tt, I as Yt, af as Zt, ay as Jt, as as ue, a as lt, J as Kt, aU as he, b6 as Ie, ak as we, aQ as se, aS as ie, aR as re, al as Xt, aA as at, a0 as nt, aL as st, aN as it, aO as ce, aM as ke, a5 as He, ad as Ae, a9 as qt, aD as rt, aJ as ct, aK as de, aI as Ne, aE as dt, aG as le, an as ot, az as Le, aC as el, b as tl, A as mt, au as ut, aB as ll, K as We } from "./withProGate-BvFc7Jwy.js";
|
|
5
5
|
import { cva as ht } from "class-variance-authority";
|
|
6
|
-
function
|
|
6
|
+
function al(l, a, i, c) {
|
|
7
7
|
const p = i.map((s) => ({
|
|
8
8
|
uid: a,
|
|
9
9
|
answerUid: s.uid,
|
|
10
10
|
content: s.content
|
|
11
11
|
})), m = [...l.filter((s) => s.uid !== a), ...p];
|
|
12
|
-
return
|
|
12
|
+
return c == null || c(m), m;
|
|
13
13
|
}
|
|
14
14
|
function ft({
|
|
15
15
|
questions: l,
|
|
16
16
|
initialAnswers: a = [],
|
|
17
17
|
onAnswerChange: i,
|
|
18
|
-
questionMaterials:
|
|
18
|
+
questionMaterials: c
|
|
19
19
|
}) {
|
|
20
|
-
const [p, r] = F(0), [m, s] = F(a), [v, b] = F(/* @__PURE__ */ new Set()), [h, w] = F(!1), N = J(null), C = J(!0),
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
20
|
+
const [p, r] = F(0), [m, s] = F(a), [v, b] = F(/* @__PURE__ */ new Set()), [h, w] = F(!1), N = J(null), C = J(!0), z = J(l);
|
|
21
|
+
z.current = l;
|
|
22
|
+
const d = J(p);
|
|
23
|
+
d.current = p;
|
|
24
|
+
const S = J(i);
|
|
25
|
+
S.current = i;
|
|
26
26
|
const U = l[p];
|
|
27
|
-
|
|
27
|
+
ge(() => {
|
|
28
28
|
var n;
|
|
29
29
|
if (C.current) {
|
|
30
30
|
C.current = !1;
|
|
@@ -32,13 +32,13 @@ function ft({
|
|
|
32
32
|
}
|
|
33
33
|
(n = N.current) == null || n.focus();
|
|
34
34
|
}, [p]);
|
|
35
|
-
const u =
|
|
35
|
+
const u = j(
|
|
36
36
|
() => U ? m.filter((n) => n.uid === U.uid) : [],
|
|
37
37
|
[m, U]
|
|
38
|
-
), M =
|
|
39
|
-
() => (
|
|
40
|
-
[
|
|
41
|
-
), x =
|
|
38
|
+
), M = j(
|
|
39
|
+
() => (c == null ? void 0 : c.filter((n) => n.questionUid === (U == null ? void 0 : U.uid))) ?? [],
|
|
40
|
+
[c, U]
|
|
41
|
+
), x = j(
|
|
42
42
|
() => l.map((n, g) => ({
|
|
43
43
|
uid: n.uid,
|
|
44
44
|
sequence: g,
|
|
@@ -47,28 +47,28 @@ function ft({
|
|
|
47
47
|
isSkipped: !1
|
|
48
48
|
})),
|
|
49
49
|
[l, m, v]
|
|
50
|
-
), A =
|
|
50
|
+
), A = Y(
|
|
51
51
|
(n) => {
|
|
52
|
-
const g =
|
|
52
|
+
const g = z.current[d.current];
|
|
53
53
|
g && s(
|
|
54
|
-
(R) =>
|
|
54
|
+
(R) => al(R, g.uid, n, S.current)
|
|
55
55
|
);
|
|
56
56
|
},
|
|
57
57
|
[]
|
|
58
|
-
),
|
|
58
|
+
), o = Y(
|
|
59
59
|
(n) => {
|
|
60
60
|
const g = l.findIndex((R) => R.uid === n);
|
|
61
61
|
g !== -1 && r(g);
|
|
62
62
|
},
|
|
63
63
|
[l]
|
|
64
|
-
), y =
|
|
64
|
+
), y = Y((n) => {
|
|
65
65
|
b((g) => {
|
|
66
66
|
const R = new Set(g);
|
|
67
67
|
return R.has(n) ? R.delete(n) : R.add(n), R;
|
|
68
68
|
});
|
|
69
|
-
}, []), L =
|
|
70
|
-
r((n) => Math.min(n + 1,
|
|
71
|
-
}, []), T =
|
|
69
|
+
}, []), L = Y(() => {
|
|
70
|
+
r((n) => Math.min(n + 1, z.current.length - 1));
|
|
71
|
+
}, []), T = Y(() => {
|
|
72
72
|
r((n) => Math.max(n - 1, 0));
|
|
73
73
|
}, []);
|
|
74
74
|
return {
|
|
@@ -83,7 +83,7 @@ function ft({
|
|
|
83
83
|
currentMaterials: M,
|
|
84
84
|
navigatorItems: x,
|
|
85
85
|
handleAnswer: A,
|
|
86
|
-
handleNavigate:
|
|
86
|
+
handleNavigate: o,
|
|
87
87
|
handleToggleFlag: y,
|
|
88
88
|
goNext: L,
|
|
89
89
|
goPrevious: T,
|
|
@@ -95,13 +95,13 @@ function te({
|
|
|
95
95
|
isLoading: l,
|
|
96
96
|
error: a,
|
|
97
97
|
onRetry: i,
|
|
98
|
-
skeleton:
|
|
98
|
+
skeleton: c,
|
|
99
99
|
loadingClassName: p = "space-y-4",
|
|
100
100
|
className: r,
|
|
101
101
|
style: m,
|
|
102
102
|
children: s
|
|
103
103
|
}) {
|
|
104
|
-
return l ? /* @__PURE__ */ e("div", { className: k(p, r), style: m, children:
|
|
104
|
+
return l ? /* @__PURE__ */ e("div", { className: k(p, r), style: m, children: c }) : a ? /* @__PURE__ */ e("div", { className: k("py-12", r), style: m, children: /* @__PURE__ */ e(
|
|
105
105
|
$,
|
|
106
106
|
{
|
|
107
107
|
icon: /* @__PURE__ */ e(q, { className: "size-10 text-destructive" }),
|
|
@@ -111,11 +111,11 @@ function te({
|
|
|
111
111
|
}
|
|
112
112
|
) }) : /* @__PURE__ */ e(O, { children: s });
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function zl({
|
|
115
115
|
questions: l,
|
|
116
116
|
initialAnswers: a = [],
|
|
117
117
|
onSubmit: i,
|
|
118
|
-
onAnswerChange:
|
|
118
|
+
onAnswerChange: c,
|
|
119
119
|
timeElapsedSeconds: p,
|
|
120
120
|
timeLimitSeconds: r,
|
|
121
121
|
questionMaterials: m,
|
|
@@ -128,15 +128,15 @@ function Sl({
|
|
|
128
128
|
style: C
|
|
129
129
|
}) {
|
|
130
130
|
const {
|
|
131
|
-
currentIndex:
|
|
132
|
-
currentQuestion:
|
|
133
|
-
sessionAnswers:
|
|
131
|
+
currentIndex: z,
|
|
132
|
+
currentQuestion: d,
|
|
133
|
+
sessionAnswers: S,
|
|
134
134
|
flaggedUids: U,
|
|
135
135
|
materialsOpen: u,
|
|
136
136
|
setMaterialsOpen: M,
|
|
137
137
|
questionAreaRef: x,
|
|
138
138
|
currentQuestionAnswers: A,
|
|
139
|
-
currentMaterials:
|
|
139
|
+
currentMaterials: o,
|
|
140
140
|
navigatorItems: y,
|
|
141
141
|
handleAnswer: L,
|
|
142
142
|
handleNavigate: T,
|
|
@@ -144,19 +144,19 @@ function Sl({
|
|
|
144
144
|
goNext: g,
|
|
145
145
|
goPrevious: R,
|
|
146
146
|
hasNext: P,
|
|
147
|
-
hasPrevious:
|
|
148
|
-
} = ft({ questions: l, initialAnswers: a, onAnswerChange:
|
|
149
|
-
V.current =
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
const K =
|
|
153
|
-
|
|
154
|
-
}, []), I = J(
|
|
155
|
-
I.current =
|
|
156
|
-
const
|
|
147
|
+
hasPrevious: Z
|
|
148
|
+
} = ft({ questions: l, initialAnswers: a, onAnswerChange: c, questionMaterials: m }), V = J(S);
|
|
149
|
+
V.current = S;
|
|
150
|
+
const H = J(i);
|
|
151
|
+
H.current = i;
|
|
152
|
+
const K = Y(() => {
|
|
153
|
+
H.current(V.current);
|
|
154
|
+
}, []), I = J(d == null ? void 0 : d.uid);
|
|
155
|
+
I.current = d == null ? void 0 : d.uid;
|
|
156
|
+
const B = Y(() => {
|
|
157
157
|
const W = I.current;
|
|
158
158
|
W && n(W);
|
|
159
|
-
}, [n]), Q =
|
|
159
|
+
}, [n]), Q = Y(() => M(!0), [M]);
|
|
160
160
|
return /* @__PURE__ */ e(
|
|
161
161
|
te,
|
|
162
162
|
{
|
|
@@ -174,10 +174,10 @@ function Sl({
|
|
|
174
174
|
/* @__PURE__ */ e(
|
|
175
175
|
Ke,
|
|
176
176
|
{
|
|
177
|
-
currentQuestionIndex:
|
|
177
|
+
currentQuestionIndex: z,
|
|
178
178
|
totalQuestions: l.length,
|
|
179
179
|
hasNext: P,
|
|
180
|
-
hasPrevious:
|
|
180
|
+
hasPrevious: Z,
|
|
181
181
|
onNext: g,
|
|
182
182
|
onPrevious: R,
|
|
183
183
|
onSubmit: K,
|
|
@@ -185,34 +185,34 @@ function Sl({
|
|
|
185
185
|
timeLimitSeconds: r,
|
|
186
186
|
questions: y,
|
|
187
187
|
onNavigateToQuestion: T,
|
|
188
|
-
currentQuestionUid:
|
|
188
|
+
currentQuestionUid: d == null ? void 0 : d.uid,
|
|
189
189
|
isSubmitting: s,
|
|
190
190
|
readOnly: v
|
|
191
191
|
}
|
|
192
192
|
),
|
|
193
193
|
/* @__PURE__ */ t("span", { className: "sr-only", "aria-live": "polite", children: [
|
|
194
194
|
"Question ",
|
|
195
|
-
|
|
195
|
+
z + 1,
|
|
196
196
|
" of ",
|
|
197
197
|
l.length
|
|
198
198
|
] }),
|
|
199
|
-
|
|
200
|
-
/* @__PURE__ */ e(
|
|
199
|
+
d && /* @__PURE__ */ t(E, { className: "mt-3", ref: x, tabIndex: -1, children: [
|
|
200
|
+
/* @__PURE__ */ e(Me, { className: "pb-0", children: /* @__PURE__ */ e(
|
|
201
201
|
Xe,
|
|
202
202
|
{
|
|
203
|
-
questionNumber:
|
|
203
|
+
questionNumber: z + 1,
|
|
204
204
|
totalQuestions: l.length,
|
|
205
|
-
isFlagged: U.has(
|
|
206
|
-
onToggleFlag:
|
|
207
|
-
hasMaterials:
|
|
205
|
+
isFlagged: U.has(d.uid),
|
|
206
|
+
onToggleFlag: B,
|
|
207
|
+
hasMaterials: o.length > 0,
|
|
208
208
|
onOpenMaterials: Q,
|
|
209
209
|
readOnly: v
|
|
210
210
|
}
|
|
211
211
|
) }),
|
|
212
|
-
/* @__PURE__ */ e(
|
|
212
|
+
/* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(
|
|
213
213
|
be,
|
|
214
214
|
{
|
|
215
|
-
question:
|
|
215
|
+
question: d,
|
|
216
216
|
sessionAnswers: A,
|
|
217
217
|
onAnswer: L,
|
|
218
218
|
readOnly: v
|
|
@@ -224,10 +224,10 @@ function Sl({
|
|
|
224
224
|
D,
|
|
225
225
|
{
|
|
226
226
|
variant: "outline",
|
|
227
|
-
disabled: !
|
|
227
|
+
disabled: !Z,
|
|
228
228
|
onClick: R,
|
|
229
229
|
children: [
|
|
230
|
-
/* @__PURE__ */ e(
|
|
230
|
+
/* @__PURE__ */ e(Ut, { className: "size-4 mr-1" }),
|
|
231
231
|
"Previous"
|
|
232
232
|
]
|
|
233
233
|
}
|
|
@@ -245,19 +245,19 @@ function Sl({
|
|
|
245
245
|
{
|
|
246
246
|
open: u,
|
|
247
247
|
onOpenChange: M,
|
|
248
|
-
materials:
|
|
249
|
-
questionNumber:
|
|
248
|
+
materials: o,
|
|
249
|
+
questionNumber: z + 1
|
|
250
250
|
}
|
|
251
251
|
)
|
|
252
252
|
] })
|
|
253
253
|
}
|
|
254
254
|
);
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function Al({
|
|
257
257
|
video: l,
|
|
258
258
|
notes: a,
|
|
259
259
|
layout: i = "horizontal",
|
|
260
|
-
notesPanelWidth:
|
|
260
|
+
notesPanelWidth: c = "340px",
|
|
261
261
|
notesPanelHeight: p = "240px",
|
|
262
262
|
isLoading: r,
|
|
263
263
|
error: m,
|
|
@@ -266,7 +266,7 @@ function zl({
|
|
|
266
266
|
className: b,
|
|
267
267
|
style: h
|
|
268
268
|
}) {
|
|
269
|
-
const w = i === "horizontal", N =
|
|
269
|
+
const w = i === "horizontal", N = Y(() => {
|
|
270
270
|
var C;
|
|
271
271
|
(C = l.onEnded) == null || C.call(l), v == null || v();
|
|
272
272
|
}, [l, v]);
|
|
@@ -294,19 +294,19 @@ function zl({
|
|
|
294
294
|
children: [
|
|
295
295
|
/* @__PURE__ */ e("div", { className: "flex-1 min-w-0 min-h-0", children: /* @__PURE__ */ e(Ve, { ...l, onEnded: N }) }),
|
|
296
296
|
/* @__PURE__ */ t(
|
|
297
|
-
|
|
297
|
+
E,
|
|
298
298
|
{
|
|
299
299
|
className: k(
|
|
300
300
|
"overflow-auto shrink-0 rounded-none border-0",
|
|
301
301
|
w ? "border-l border-border" : "border-t border-border w-full"
|
|
302
302
|
),
|
|
303
303
|
style: {
|
|
304
|
-
width: w ?
|
|
304
|
+
width: w ? c : void 0,
|
|
305
305
|
height: w ? void 0 : p
|
|
306
306
|
},
|
|
307
307
|
children: [
|
|
308
|
-
/* @__PURE__ */ e(
|
|
309
|
-
/* @__PURE__ */ e(
|
|
308
|
+
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(Vt, { children: "Notes" }) }),
|
|
309
|
+
/* @__PURE__ */ e(_, { children: typeof a == "string" ? /* @__PURE__ */ e("span", { className: "text-sm text-foreground", children: a }) : a })
|
|
310
310
|
]
|
|
311
311
|
}
|
|
312
312
|
)
|
|
@@ -316,11 +316,11 @@ function zl({
|
|
|
316
316
|
}
|
|
317
317
|
);
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function Ll({
|
|
320
320
|
cards: l,
|
|
321
321
|
title: a,
|
|
322
322
|
description: i,
|
|
323
|
-
shuffled:
|
|
323
|
+
shuffled: c = !1,
|
|
324
324
|
onComplete: p,
|
|
325
325
|
readOnly: r = !1,
|
|
326
326
|
isLoading: m,
|
|
@@ -331,12 +331,12 @@ function Al({
|
|
|
331
331
|
}) {
|
|
332
332
|
const [w, N] = F(!1), C = {
|
|
333
333
|
totalCards: l.length,
|
|
334
|
-
wasShuffled:
|
|
334
|
+
wasShuffled: c
|
|
335
335
|
};
|
|
336
|
-
function
|
|
336
|
+
function z() {
|
|
337
337
|
N(!0), p == null || p(C);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function d() {
|
|
340
340
|
N(!1);
|
|
341
341
|
}
|
|
342
342
|
return /* @__PURE__ */ e(
|
|
@@ -351,7 +351,7 @@ function Al({
|
|
|
351
351
|
/* @__PURE__ */ e(f, { className: "h-6 w-48" }),
|
|
352
352
|
/* @__PURE__ */ e(f, { className: "h-64 w-full rounded-lg" })
|
|
353
353
|
] }),
|
|
354
|
-
children: w ? /* @__PURE__ */ e("div", { className: k("flex flex-col items-center", b), style: h, children: /* @__PURE__ */ e(
|
|
354
|
+
children: w ? /* @__PURE__ */ e("div", { className: k("flex flex-col items-center", b), style: h, children: /* @__PURE__ */ e(E, { children: /* @__PURE__ */ t(_, { className: "pt-6 text-center flex flex-col items-center gap-2", children: [
|
|
355
355
|
/* @__PURE__ */ e(De, { size: 48, className: "text-success" }),
|
|
356
356
|
/* @__PURE__ */ e("span", { className: "text-xl font-bold text-foreground", children: "Deck complete!" }),
|
|
357
357
|
a && /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: [
|
|
@@ -365,27 +365,27 @@ function Al({
|
|
|
365
365
|
" studied",
|
|
366
366
|
C.wasShuffled ? " (shuffled)" : ""
|
|
367
367
|
] }),
|
|
368
|
-
/* @__PURE__ */ e(D, { className: "mt-2", onClick:
|
|
368
|
+
/* @__PURE__ */ e(D, { className: "mt-2", onClick: d, children: "Study Again" })
|
|
369
369
|
] }) }) }) : /* @__PURE__ */ e("div", { className: k("flex flex-col items-center", b), style: h, children: /* @__PURE__ */ e(
|
|
370
|
-
|
|
370
|
+
Gt,
|
|
371
371
|
{
|
|
372
372
|
cards: l,
|
|
373
373
|
deckName: a,
|
|
374
374
|
deckDescription: i,
|
|
375
|
-
shuffled:
|
|
375
|
+
shuffled: c,
|
|
376
376
|
showProgress: !0,
|
|
377
|
-
onComplete:
|
|
377
|
+
onComplete: z,
|
|
378
378
|
readOnly: r
|
|
379
379
|
}
|
|
380
380
|
) })
|
|
381
381
|
}
|
|
382
382
|
);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function nl({
|
|
385
385
|
score: l
|
|
386
386
|
}) {
|
|
387
387
|
const a = l.percentage !== void 0 ? l.percentage : l.total > 0 ? Math.round(l.correct / l.total * 100) : 0;
|
|
388
|
-
return /* @__PURE__ */ e(
|
|
388
|
+
return /* @__PURE__ */ e(E, { className: "mb-3", children: /* @__PURE__ */ e(_, { className: "pt-6", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
389
389
|
/* @__PURE__ */ t("div", { className: "flex items-baseline gap-2", children: [
|
|
390
390
|
/* @__PURE__ */ t("span", { className: "text-2xl font-bold leading-none text-foreground", children: [
|
|
391
391
|
a,
|
|
@@ -411,7 +411,7 @@ function Ue({
|
|
|
411
411
|
sessionAnswers: a,
|
|
412
412
|
showCorrectAnswers: i
|
|
413
413
|
}) {
|
|
414
|
-
const
|
|
414
|
+
const c = j(() => {
|
|
415
415
|
const p = /* @__PURE__ */ new Map();
|
|
416
416
|
for (const r of a) {
|
|
417
417
|
const m = p.get(r.uid);
|
|
@@ -419,37 +419,37 @@ function Ue({
|
|
|
419
419
|
}
|
|
420
420
|
return p;
|
|
421
421
|
}, [a]);
|
|
422
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-3", children: l.map((p, r) => /* @__PURE__ */ t(
|
|
422
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-3", children: l.map((p, r) => /* @__PURE__ */ t(E, { className: "overflow-hidden", children: [
|
|
423
423
|
/* @__PURE__ */ e("div", { className: "px-2 py-1 bg-muted", children: /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground font-semibold", children: [
|
|
424
424
|
"Question ",
|
|
425
425
|
r + 1
|
|
426
426
|
] }) }),
|
|
427
|
-
/* @__PURE__ */ e(
|
|
428
|
-
/* @__PURE__ */ e(
|
|
427
|
+
/* @__PURE__ */ e(G, {}),
|
|
428
|
+
/* @__PURE__ */ e(_, { className: "pt-4 pb-4", children: /* @__PURE__ */ e(
|
|
429
429
|
be,
|
|
430
430
|
{
|
|
431
431
|
question: p,
|
|
432
|
-
sessionAnswers:
|
|
432
|
+
sessionAnswers: c.get(p.uid) ?? [],
|
|
433
433
|
readOnly: !0,
|
|
434
434
|
showCorrectAnswers: i
|
|
435
435
|
}
|
|
436
436
|
) })
|
|
437
437
|
] }, p.uid)) });
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function sl(l, a, i, c) {
|
|
440
440
|
const p = new Map(l.map((s) => [s.uid, s])), r = new Set(i.flatMap((s) => s.questionUids)), m = l.filter((s) => !r.has(s.uid));
|
|
441
441
|
return /* @__PURE__ */ t("div", { className: "flex flex-col gap-4", children: [
|
|
442
442
|
i.map((s) => {
|
|
443
443
|
const v = s.questionUids.map((b) => p.get(b)).filter(Boolean);
|
|
444
444
|
return /* @__PURE__ */ t("div", { children: [
|
|
445
445
|
/* @__PURE__ */ e("span", { className: "uppercase text-xs tracking-wide text-muted-foreground font-semibold", children: s.label }),
|
|
446
|
-
/* @__PURE__ */ e(
|
|
446
|
+
/* @__PURE__ */ e(G, { className: "mb-2" }),
|
|
447
447
|
/* @__PURE__ */ e(
|
|
448
448
|
Ue,
|
|
449
449
|
{
|
|
450
450
|
questions: v,
|
|
451
451
|
sessionAnswers: a,
|
|
452
|
-
showCorrectAnswers:
|
|
452
|
+
showCorrectAnswers: c
|
|
453
453
|
}
|
|
454
454
|
)
|
|
455
455
|
] }, s.label);
|
|
@@ -459,16 +459,16 @@ function nl(l, a, i, o) {
|
|
|
459
459
|
{
|
|
460
460
|
questions: m,
|
|
461
461
|
sessionAnswers: a,
|
|
462
|
-
showCorrectAnswers:
|
|
462
|
+
showCorrectAnswers: c
|
|
463
463
|
}
|
|
464
464
|
) })
|
|
465
465
|
] });
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function Ul({
|
|
468
468
|
questions: l,
|
|
469
469
|
sessionAnswers: a,
|
|
470
470
|
score: i,
|
|
471
|
-
questionGroups:
|
|
471
|
+
questionGroups: c,
|
|
472
472
|
showCorrectAnswers: p = !0,
|
|
473
473
|
isLoading: r,
|
|
474
474
|
error: m,
|
|
@@ -490,8 +490,8 @@ function Ll({
|
|
|
490
490
|
action: s ? /* @__PURE__ */ e(D, { variant: "outline", onClick: s, children: "Retry" }) : void 0
|
|
491
491
|
}
|
|
492
492
|
) }) : /* @__PURE__ */ t("div", { className: k(v), style: b, children: [
|
|
493
|
-
i && /* @__PURE__ */ e(
|
|
494
|
-
|
|
493
|
+
i && /* @__PURE__ */ e(nl, { score: i }),
|
|
494
|
+
c && c.length > 0 ? sl(l, a, c, p) : /* @__PURE__ */ e(
|
|
495
495
|
Ue,
|
|
496
496
|
{
|
|
497
497
|
questions: l,
|
|
@@ -507,11 +507,11 @@ function pt(l) {
|
|
|
507
507
|
!i.children || i.children.length === 0 ? a.push(i.uid) : a.push(...pt(i.children));
|
|
508
508
|
return a;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Rl({
|
|
511
511
|
items: l,
|
|
512
512
|
progress: a,
|
|
513
513
|
courseTitle: i,
|
|
514
|
-
activeItemUid:
|
|
514
|
+
activeItemUid: c,
|
|
515
515
|
onItemClick: p,
|
|
516
516
|
showOverallProgress: r = !0,
|
|
517
517
|
showDuration: m = !0,
|
|
@@ -523,7 +523,7 @@ function Ul({
|
|
|
523
523
|
className: N,
|
|
524
524
|
style: C
|
|
525
525
|
}) {
|
|
526
|
-
const { completedCount:
|
|
526
|
+
const { completedCount: z, totalCount: d, percentage: S } = j(() => {
|
|
527
527
|
const U = pt(l), u = U.length, M = a ? U.filter(
|
|
528
528
|
(x) => a.some((A) => A.resourceUid === x && A.isCompleted)
|
|
529
529
|
).length : 0;
|
|
@@ -554,22 +554,22 @@ function Ul({
|
|
|
554
554
|
(i || r) && /* @__PURE__ */ t("div", { className: "px-2 pt-2 pb-2", children: [
|
|
555
555
|
i && /* @__PURE__ */ e("p", { className: k("font-semibold text-sm text-foreground", r && "mb-1"), children: i }),
|
|
556
556
|
r && /* @__PURE__ */ t("div", { children: [
|
|
557
|
-
/* @__PURE__ */ e(
|
|
557
|
+
/* @__PURE__ */ e(fe, { value: S, size: "sm" }),
|
|
558
558
|
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground mt-0.5 block", children: [
|
|
559
|
-
|
|
559
|
+
z,
|
|
560
560
|
" of ",
|
|
561
|
-
|
|
561
|
+
d,
|
|
562
562
|
" completed"
|
|
563
563
|
] })
|
|
564
564
|
] })
|
|
565
565
|
] }),
|
|
566
|
-
(i || r) && /* @__PURE__ */ e(
|
|
566
|
+
(i || r) && /* @__PURE__ */ e(G, {}),
|
|
567
567
|
/* @__PURE__ */ e(
|
|
568
568
|
Ht,
|
|
569
569
|
{
|
|
570
570
|
items: l,
|
|
571
571
|
progress: a,
|
|
572
|
-
activeItemUid:
|
|
572
|
+
activeItemUid: c,
|
|
573
573
|
onItemClick: p,
|
|
574
574
|
readOnly: v,
|
|
575
575
|
showDuration: m,
|
|
@@ -579,11 +579,11 @@ function Ul({
|
|
|
579
579
|
)
|
|
580
580
|
] });
|
|
581
581
|
}
|
|
582
|
-
function
|
|
582
|
+
function Dl({
|
|
583
583
|
questions: l,
|
|
584
584
|
instantFeedback: a = !0,
|
|
585
585
|
allowRetry: i = !0,
|
|
586
|
-
onComplete:
|
|
586
|
+
onComplete: c,
|
|
587
587
|
shuffled: p = !1,
|
|
588
588
|
readOnly: r = !1,
|
|
589
589
|
isLoading: m,
|
|
@@ -592,15 +592,15 @@ function Rl({
|
|
|
592
592
|
className: b,
|
|
593
593
|
style: h
|
|
594
594
|
}) {
|
|
595
|
-
const w =
|
|
595
|
+
const w = j(
|
|
596
596
|
() => {
|
|
597
597
|
const I = l ?? [];
|
|
598
|
-
return p ?
|
|
598
|
+
return p ? Wt(I) : I;
|
|
599
599
|
},
|
|
600
600
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
601
601
|
[l, p]
|
|
602
|
-
), [N, C] = F(0), [
|
|
603
|
-
|
|
602
|
+
), [N, C] = F(0), [z, d] = F(/* @__PURE__ */ new Set()), [S, U] = F(/* @__PURE__ */ new Map()), [u, M] = F(/* @__PURE__ */ new Set()), [x, A] = F(null), [o, y] = F(!1), L = J(null), T = J(!0);
|
|
603
|
+
ge(() => {
|
|
604
604
|
var I;
|
|
605
605
|
if (T.current) {
|
|
606
606
|
T.current = !1;
|
|
@@ -608,42 +608,42 @@ function Rl({
|
|
|
608
608
|
}
|
|
609
609
|
(I = L.current) == null || I.focus();
|
|
610
610
|
}, [N]);
|
|
611
|
-
const n = w[N], g = n ?
|
|
611
|
+
const n = w[N], g = n ? z.has(n.uid) : !1;
|
|
612
612
|
function R() {
|
|
613
613
|
if (!n || !x) return;
|
|
614
|
-
const I = (
|
|
615
|
-
U((W) => new Map(W).set(n.uid, I)),
|
|
616
|
-
const
|
|
614
|
+
const I = (S.get(n.uid) ?? 0) + 1;
|
|
615
|
+
U((W) => new Map(W).set(n.uid, I)), d((W) => new Set(W).add(n.uid));
|
|
616
|
+
const B = x.map((W) => ({
|
|
617
617
|
uid: n.uid,
|
|
618
618
|
answerUid: W.uid,
|
|
619
619
|
content: W.content
|
|
620
620
|
}));
|
|
621
|
-
|
|
621
|
+
Ge(n, B) === !0 && I === 1 && M((W) => new Set(W).add(n.uid));
|
|
622
622
|
}
|
|
623
623
|
function P() {
|
|
624
|
-
n && (
|
|
625
|
-
const
|
|
626
|
-
return
|
|
624
|
+
n && (d((I) => {
|
|
625
|
+
const B = new Set(I);
|
|
626
|
+
return B.delete(n.uid), B;
|
|
627
627
|
}), A(null));
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function Z() {
|
|
630
630
|
if (N < w.length - 1)
|
|
631
631
|
C((I) => I + 1), A(null);
|
|
632
632
|
else {
|
|
633
633
|
const I = {
|
|
634
634
|
totalQuestions: w.length,
|
|
635
635
|
correctOnFirstAttempt: u.size,
|
|
636
|
-
totalAttempts: Array.from(
|
|
636
|
+
totalAttempts: Array.from(S.values()).reduce((B, Q) => B + Q, 0)
|
|
637
637
|
};
|
|
638
|
-
y(!0),
|
|
638
|
+
y(!0), c == null || c(I);
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
const V =
|
|
641
|
+
const V = j(() => !n || !x ? [] : x.map((I) => ({
|
|
642
642
|
uid: n.uid,
|
|
643
643
|
answerUid: I.uid,
|
|
644
644
|
content: I.content
|
|
645
|
-
})), [n, x]),
|
|
646
|
-
() => n ?
|
|
645
|
+
})), [n, x]), H = j(
|
|
646
|
+
() => n ? Ge(n, V) === !0 : !1,
|
|
647
647
|
[n, V]
|
|
648
648
|
), K = w.length > 0 ? Math.round(u.size / w.length * 100) : 0;
|
|
649
649
|
return /* @__PURE__ */ e(
|
|
@@ -658,7 +658,7 @@ function Rl({
|
|
|
658
658
|
/* @__PURE__ */ e(f, { className: "h-2 w-full" }),
|
|
659
659
|
/* @__PURE__ */ e(f, { className: "h-48 w-full" })
|
|
660
660
|
] }),
|
|
661
|
-
children:
|
|
661
|
+
children: o ? /* @__PURE__ */ e(E, { className: b, style: h, children: /* @__PURE__ */ t(_, { className: "pt-6 text-center", children: [
|
|
662
662
|
/* @__PURE__ */ e(De, { size: 48, className: "text-success mx-auto mb-4" }),
|
|
663
663
|
/* @__PURE__ */ e("p", { className: "text-xl font-bold mb-1 text-foreground", children: "Practice Complete!" }),
|
|
664
664
|
/* @__PURE__ */ t("p", { className: "text-muted-foreground mb-2", children: [
|
|
@@ -674,7 +674,7 @@ function Rl({
|
|
|
674
674
|
{
|
|
675
675
|
variant: "outline",
|
|
676
676
|
onClick: () => {
|
|
677
|
-
C(0),
|
|
677
|
+
C(0), d(/* @__PURE__ */ new Set()), U(/* @__PURE__ */ new Map()), M(/* @__PURE__ */ new Set()), A(null), y(!1);
|
|
678
678
|
},
|
|
679
679
|
children: "Practice Again"
|
|
680
680
|
}
|
|
@@ -693,7 +693,7 @@ function Rl({
|
|
|
693
693
|
] })
|
|
694
694
|
] }),
|
|
695
695
|
/* @__PURE__ */ e(
|
|
696
|
-
|
|
696
|
+
fe,
|
|
697
697
|
{
|
|
698
698
|
value: N + (g ? 1 : 0),
|
|
699
699
|
max: w.length,
|
|
@@ -707,7 +707,7 @@ function Rl({
|
|
|
707
707
|
" of ",
|
|
708
708
|
w.length
|
|
709
709
|
] }),
|
|
710
|
-
n && /* @__PURE__ */ e(
|
|
710
|
+
n && /* @__PURE__ */ e(E, { ref: L, tabIndex: -1, children: /* @__PURE__ */ t(_, { className: "pt-6", children: [
|
|
711
711
|
/* @__PURE__ */ e(
|
|
712
712
|
be,
|
|
713
713
|
{
|
|
@@ -719,11 +719,11 @@ function Rl({
|
|
|
719
719
|
}
|
|
720
720
|
),
|
|
721
721
|
a && g && /* @__PURE__ */ e(
|
|
722
|
-
|
|
722
|
+
Ot,
|
|
723
723
|
{
|
|
724
|
-
isCorrect:
|
|
724
|
+
isCorrect: H,
|
|
725
725
|
explanation: n.explanation,
|
|
726
|
-
onRetry: i && !
|
|
726
|
+
onRetry: i && !H ? P : void 0
|
|
727
727
|
}
|
|
728
728
|
),
|
|
729
729
|
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2 mt-2", children: [
|
|
@@ -738,7 +738,7 @@ function Rl({
|
|
|
738
738
|
(!a || g) && /* @__PURE__ */ e(
|
|
739
739
|
D,
|
|
740
740
|
{
|
|
741
|
-
onClick:
|
|
741
|
+
onClick: Z,
|
|
742
742
|
disabled: r,
|
|
743
743
|
children: N < w.length - 1 ? "Next Question" : "Finish"
|
|
744
744
|
}
|
|
@@ -749,11 +749,11 @@ function Rl({
|
|
|
749
749
|
}
|
|
750
750
|
);
|
|
751
751
|
}
|
|
752
|
-
function
|
|
752
|
+
function Tl({
|
|
753
753
|
questions: l = [],
|
|
754
754
|
initialAnswers: a = [],
|
|
755
755
|
onSubmit: i,
|
|
756
|
-
onAnswerChange:
|
|
756
|
+
onAnswerChange: c,
|
|
757
757
|
timeLimitSeconds: p,
|
|
758
758
|
timeElapsedSeconds: r,
|
|
759
759
|
autoSubmitOnTimeout: m = !0,
|
|
@@ -764,9 +764,9 @@ function Dl({
|
|
|
764
764
|
instructions: w,
|
|
765
765
|
questionMaterials: N,
|
|
766
766
|
isSubmitting: C = !1,
|
|
767
|
-
readOnly:
|
|
768
|
-
isLoading:
|
|
769
|
-
error:
|
|
767
|
+
readOnly: z = !1,
|
|
768
|
+
isLoading: d,
|
|
769
|
+
error: S,
|
|
770
770
|
onRetry: U,
|
|
771
771
|
className: u,
|
|
772
772
|
style: M
|
|
@@ -774,7 +774,7 @@ function Dl({
|
|
|
774
774
|
const {
|
|
775
775
|
currentIndex: x,
|
|
776
776
|
currentQuestion: A,
|
|
777
|
-
sessionAnswers:
|
|
777
|
+
sessionAnswers: o,
|
|
778
778
|
flaggedUids: y,
|
|
779
779
|
materialsOpen: L,
|
|
780
780
|
setMaterialsOpen: T,
|
|
@@ -782,52 +782,52 @@ function Dl({
|
|
|
782
782
|
currentQuestionAnswers: g,
|
|
783
783
|
currentMaterials: R,
|
|
784
784
|
navigatorItems: P,
|
|
785
|
-
handleAnswer:
|
|
785
|
+
handleAnswer: Z,
|
|
786
786
|
handleNavigate: V,
|
|
787
|
-
handleToggleFlag:
|
|
787
|
+
handleToggleFlag: H,
|
|
788
788
|
goNext: K,
|
|
789
789
|
goPrevious: I,
|
|
790
|
-
hasNext:
|
|
791
|
-
} = ft({ questions: l, initialAnswers: a, onAnswerChange:
|
|
792
|
-
Pe.current =
|
|
793
|
-
const
|
|
794
|
-
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
const
|
|
798
|
-
|
|
799
|
-
const ee = p - r, Nt =
|
|
790
|
+
hasNext: B
|
|
791
|
+
} = ft({ questions: l, initialAnswers: a, onAnswerChange: c, questionMaterials: N }), [Q, W] = F(!1), [gt, xt] = F(!1), Fe = J(!1), Pe = J(o);
|
|
792
|
+
Pe.current = o;
|
|
793
|
+
const Ee = J(i);
|
|
794
|
+
Ee.current = i;
|
|
795
|
+
const _e = J(r);
|
|
796
|
+
_e.current = r;
|
|
797
|
+
const Be = J(A == null ? void 0 : A.uid);
|
|
798
|
+
Be.current = A == null ? void 0 : A.uid;
|
|
799
|
+
const ee = p - r, Nt = j(
|
|
800
800
|
() => P.filter((ne) => ne.isAnswered).length,
|
|
801
801
|
[P]
|
|
802
|
-
), ae =
|
|
803
|
-
const
|
|
804
|
-
timeElapsedSeconds:
|
|
802
|
+
), ae = Y((ne) => {
|
|
803
|
+
const je = Pe.current, St = new Set(je.map((ye) => ye.uid)), zt = {
|
|
804
|
+
timeElapsedSeconds: _e.current,
|
|
805
805
|
wasAutoSubmitted: ne,
|
|
806
806
|
answeredCount: l.filter((ye) => St.has(ye.uid)).length,
|
|
807
807
|
totalQuestions: l.length
|
|
808
808
|
};
|
|
809
|
-
|
|
809
|
+
Ee.current(je, zt);
|
|
810
810
|
}, [l]);
|
|
811
|
-
|
|
811
|
+
ge(() => {
|
|
812
812
|
ee <= s && ee > 0 && xt(!0);
|
|
813
|
-
}, [ee, s]),
|
|
813
|
+
}, [ee, s]), ge(() => {
|
|
814
814
|
m && ee <= 0 && !Fe.current && (Fe.current = !0, ae(!0));
|
|
815
815
|
}, [ee, m, ae]);
|
|
816
|
-
const vt =
|
|
816
|
+
const vt = Y(() => {
|
|
817
817
|
b ? W(!0) : ae(!1);
|
|
818
|
-
}, [b, ae]), bt =
|
|
818
|
+
}, [b, ae]), bt = Y(() => {
|
|
819
819
|
v && I();
|
|
820
|
-
}, [v, I]), wt =
|
|
821
|
-
const ne =
|
|
822
|
-
ne &&
|
|
823
|
-
}, [
|
|
820
|
+
}, [v, I]), wt = Y(() => {
|
|
821
|
+
const ne = Be.current;
|
|
822
|
+
ne && H(ne);
|
|
823
|
+
}, [H]), yt = Y(() => T(!0), [T]), kt = Y(() => {
|
|
824
824
|
W(!1), ae(!1);
|
|
825
|
-
}, [ae]), Ct =
|
|
825
|
+
}, [ae]), Ct = Y(() => W(!1), []);
|
|
826
826
|
return /* @__PURE__ */ e(
|
|
827
827
|
te,
|
|
828
828
|
{
|
|
829
|
-
isLoading:
|
|
830
|
-
error:
|
|
829
|
+
isLoading: d,
|
|
830
|
+
error: S,
|
|
831
831
|
onRetry: U,
|
|
832
832
|
className: u,
|
|
833
833
|
style: M,
|
|
@@ -849,7 +849,7 @@ function Dl({
|
|
|
849
849
|
{
|
|
850
850
|
currentQuestionIndex: x,
|
|
851
851
|
totalQuestions: l.length,
|
|
852
|
-
hasNext:
|
|
852
|
+
hasNext: B,
|
|
853
853
|
hasPrevious: v && x > 0,
|
|
854
854
|
onNext: K,
|
|
855
855
|
onPrevious: bt,
|
|
@@ -860,18 +860,18 @@ function Dl({
|
|
|
860
860
|
onNavigateToQuestion: V,
|
|
861
861
|
currentQuestionUid: A == null ? void 0 : A.uid,
|
|
862
862
|
isSubmitting: C,
|
|
863
|
-
readOnly:
|
|
863
|
+
readOnly: z
|
|
864
864
|
}
|
|
865
865
|
),
|
|
866
|
-
w && x === 0 && /* @__PURE__ */ e(
|
|
866
|
+
w && x === 0 && /* @__PURE__ */ e(E, { className: "mt-3", children: /* @__PURE__ */ e(_, { className: "pt-6", children: w }) }),
|
|
867
867
|
/* @__PURE__ */ t("span", { className: "sr-only", "aria-live": "polite", children: [
|
|
868
868
|
"Question ",
|
|
869
869
|
x + 1,
|
|
870
870
|
" of ",
|
|
871
871
|
l.length
|
|
872
872
|
] }),
|
|
873
|
-
A && /* @__PURE__ */ t(
|
|
874
|
-
/* @__PURE__ */ e(
|
|
873
|
+
A && /* @__PURE__ */ t(E, { className: "mt-3", ref: n, tabIndex: -1, children: [
|
|
874
|
+
/* @__PURE__ */ e(Me, { className: "pb-0", children: /* @__PURE__ */ e(
|
|
875
875
|
Xe,
|
|
876
876
|
{
|
|
877
877
|
questionNumber: x + 1,
|
|
@@ -880,16 +880,16 @@ function Dl({
|
|
|
880
880
|
onToggleFlag: wt,
|
|
881
881
|
hasMaterials: R.length > 0,
|
|
882
882
|
onOpenMaterials: yt,
|
|
883
|
-
readOnly:
|
|
883
|
+
readOnly: z
|
|
884
884
|
}
|
|
885
885
|
) }),
|
|
886
|
-
/* @__PURE__ */ e(
|
|
886
|
+
/* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(
|
|
887
887
|
be,
|
|
888
888
|
{
|
|
889
889
|
question: A,
|
|
890
890
|
sessionAnswers: g,
|
|
891
|
-
onAnswer:
|
|
892
|
-
readOnly:
|
|
891
|
+
onAnswer: Z,
|
|
892
|
+
readOnly: z
|
|
893
893
|
}
|
|
894
894
|
) })
|
|
895
895
|
] }),
|
|
@@ -903,7 +903,7 @@ function Dl({
|
|
|
903
903
|
}
|
|
904
904
|
),
|
|
905
905
|
/* @__PURE__ */ e(
|
|
906
|
-
|
|
906
|
+
Yt,
|
|
907
907
|
{
|
|
908
908
|
open: Q,
|
|
909
909
|
title: "Submit Exam?",
|
|
@@ -920,11 +920,11 @@ function Dl({
|
|
|
920
920
|
}
|
|
921
921
|
);
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function Ml({
|
|
924
924
|
title: l,
|
|
925
925
|
description: a,
|
|
926
926
|
questions: i = [],
|
|
927
|
-
initialAnswers:
|
|
927
|
+
initialAnswers: c = [],
|
|
928
928
|
onSubmit: p,
|
|
929
929
|
onAnswerChange: r,
|
|
930
930
|
showProgress: m = !0,
|
|
@@ -935,33 +935,33 @@ function Tl({
|
|
|
935
935
|
isLoading: w,
|
|
936
936
|
error: N,
|
|
937
937
|
onRetry: C,
|
|
938
|
-
className:
|
|
939
|
-
style:
|
|
938
|
+
className: z,
|
|
939
|
+
style: d
|
|
940
940
|
}) {
|
|
941
|
-
const [
|
|
942
|
-
const
|
|
943
|
-
return i.filter((y) =>
|
|
944
|
-
}, [i,
|
|
945
|
-
function x(
|
|
941
|
+
const [S, U] = F(c), u = j(() => {
|
|
942
|
+
const o = new Set(S.map((y) => y.questionUid));
|
|
943
|
+
return i.filter((y) => o.has(y.uid)).length;
|
|
944
|
+
}, [i, S]), M = !s || u === i.length;
|
|
945
|
+
function x(o, y) {
|
|
946
946
|
U((L) => {
|
|
947
|
-
const n = [...L.filter((g) => g.questionUid !==
|
|
947
|
+
const n = [...L.filter((g) => g.questionUid !== o), { questionUid: o, value: y }];
|
|
948
948
|
return r == null || r(n), n;
|
|
949
949
|
});
|
|
950
950
|
}
|
|
951
|
-
const A =
|
|
952
|
-
const
|
|
953
|
-
for (const y of
|
|
954
|
-
|
|
955
|
-
return
|
|
956
|
-
}, [
|
|
951
|
+
const A = j(() => {
|
|
952
|
+
const o = /* @__PURE__ */ new Map();
|
|
953
|
+
for (const y of S)
|
|
954
|
+
o.set(y.questionUid, y);
|
|
955
|
+
return o;
|
|
956
|
+
}, [S]);
|
|
957
957
|
return /* @__PURE__ */ e(
|
|
958
958
|
te,
|
|
959
959
|
{
|
|
960
960
|
isLoading: w,
|
|
961
961
|
error: N,
|
|
962
962
|
onRetry: C,
|
|
963
|
-
className:
|
|
964
|
-
style:
|
|
963
|
+
className: z,
|
|
964
|
+
style: d,
|
|
965
965
|
skeleton: /* @__PURE__ */ t(O, { children: [
|
|
966
966
|
/* @__PURE__ */ e(f, { className: "h-6 w-48" }),
|
|
967
967
|
/* @__PURE__ */ e(f, { className: "h-2 w-full" }),
|
|
@@ -969,11 +969,11 @@ function Tl({
|
|
|
969
969
|
/* @__PURE__ */ e(f, { className: "h-16 w-full" }),
|
|
970
970
|
/* @__PURE__ */ e(f, { className: "h-16 w-full" })
|
|
971
971
|
] }),
|
|
972
|
-
children: /* @__PURE__ */ t("div", { className:
|
|
972
|
+
children: /* @__PURE__ */ t("div", { className: z, style: d, children: [
|
|
973
973
|
/* @__PURE__ */ e("p", { className: "text-xl font-bold text-foreground mb-2", children: l }),
|
|
974
974
|
a && /* @__PURE__ */ e("div", { className: "mb-2 text-muted-foreground text-sm", children: typeof a == "string" ? /* @__PURE__ */ e("span", { children: a }) : a }),
|
|
975
975
|
m && /* @__PURE__ */ t("div", { className: "mb-3", children: [
|
|
976
|
-
/* @__PURE__ */ e(
|
|
976
|
+
/* @__PURE__ */ e(fe, { value: u / i.length * 100 }),
|
|
977
977
|
/* @__PURE__ */ t("span", { className: "block text-xs text-muted-foreground mt-0.5", children: [
|
|
978
978
|
u,
|
|
979
979
|
" of ",
|
|
@@ -981,63 +981,63 @@ function Tl({
|
|
|
981
981
|
" answered"
|
|
982
982
|
] })
|
|
983
983
|
] }),
|
|
984
|
-
i.map((
|
|
984
|
+
i.map((o, y) => {
|
|
985
985
|
var T, n;
|
|
986
|
-
const L = A.get(
|
|
987
|
-
return /* @__PURE__ */ e(
|
|
986
|
+
const L = A.get(o.uid);
|
|
987
|
+
return /* @__PURE__ */ e(E, { className: "mb-2", children: /* @__PURE__ */ t(_, { className: "pt-6", children: [
|
|
988
988
|
/* @__PURE__ */ t("p", { className: "font-medium text-foreground mb-2", children: [
|
|
989
989
|
y + 1,
|
|
990
990
|
". ",
|
|
991
|
-
|
|
992
|
-
|
|
991
|
+
o.content,
|
|
992
|
+
o.required && /* @__PURE__ */ e("span", { className: "text-destructive ml-0.5", children: "*" })
|
|
993
993
|
] }),
|
|
994
|
-
|
|
995
|
-
|
|
994
|
+
o.type === "likert" && /* @__PURE__ */ e(
|
|
995
|
+
Zt,
|
|
996
996
|
{
|
|
997
997
|
value: L ? Number(L.value) : null,
|
|
998
|
-
onChange: (g) => x(
|
|
999
|
-
points:
|
|
1000
|
-
lowLabel: (T =
|
|
1001
|
-
highLabel: (n =
|
|
998
|
+
onChange: (g) => x(o.uid, g),
|
|
999
|
+
points: o.scalePoints,
|
|
1000
|
+
lowLabel: (T = o.scaleLabels) == null ? void 0 : T.low,
|
|
1001
|
+
highLabel: (n = o.scaleLabels) == null ? void 0 : n.high,
|
|
1002
1002
|
readOnly: h
|
|
1003
1003
|
}
|
|
1004
1004
|
),
|
|
1005
|
-
|
|
1006
|
-
|
|
1005
|
+
o.type === "rating" && /* @__PURE__ */ e(
|
|
1006
|
+
Jt,
|
|
1007
1007
|
{
|
|
1008
1008
|
value: L ? Number(L.value) : 0,
|
|
1009
|
-
onChange: (g) => x(
|
|
1009
|
+
onChange: (g) => x(o.uid, g),
|
|
1010
1010
|
readOnly: h
|
|
1011
1011
|
}
|
|
1012
1012
|
),
|
|
1013
|
-
|
|
1014
|
-
|
|
1013
|
+
o.type === "open_text" && /* @__PURE__ */ e(
|
|
1014
|
+
ue,
|
|
1015
1015
|
{
|
|
1016
1016
|
placeholder: "Type your response...",
|
|
1017
1017
|
value: (L == null ? void 0 : L.value) ?? "",
|
|
1018
|
-
onChange: (g) => x(
|
|
1018
|
+
onChange: (g) => x(o.uid, g),
|
|
1019
1019
|
readOnly: h,
|
|
1020
1020
|
className: "min-h-24",
|
|
1021
1021
|
variant: "minimal"
|
|
1022
1022
|
}
|
|
1023
1023
|
),
|
|
1024
|
-
|
|
1024
|
+
o.type === "choice" && o.answers && /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: o.answers.map((g) => /* @__PURE__ */ t("label", { className: "flex items-center gap-2 cursor-pointer py-1 text-sm text-foreground has-[input:disabled]:cursor-default has-[input:disabled]:opacity-60", children: [
|
|
1025
1025
|
/* @__PURE__ */ e(
|
|
1026
1026
|
"input",
|
|
1027
1027
|
{
|
|
1028
1028
|
type: "radio",
|
|
1029
1029
|
className: "accent-primary m-0 shrink-0",
|
|
1030
|
-
name: `survey-q-${
|
|
1030
|
+
name: `survey-q-${o.uid}`,
|
|
1031
1031
|
value: g.uid,
|
|
1032
1032
|
checked: (L == null ? void 0 : L.value) === g.uid,
|
|
1033
|
-
onChange: () => x(
|
|
1033
|
+
onChange: () => x(o.uid, g.uid),
|
|
1034
1034
|
disabled: h
|
|
1035
1035
|
}
|
|
1036
1036
|
),
|
|
1037
1037
|
/* @__PURE__ */ e("span", { children: g.content })
|
|
1038
1038
|
] }, g.uid)) }),
|
|
1039
|
-
|
|
1040
|
-
const R =
|
|
1039
|
+
o.type === "multiple_choice" && o.answers && /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: o.answers.map((g) => {
|
|
1040
|
+
const R = S.filter((P) => P.questionUid === o.uid).map((P) => String(P.value));
|
|
1041
1041
|
return /* @__PURE__ */ t("label", { className: "flex items-center gap-2 cursor-pointer py-1 text-sm text-foreground has-[input:disabled]:cursor-default has-[input:disabled]:opacity-60", children: [
|
|
1042
1042
|
/* @__PURE__ */ e(
|
|
1043
1043
|
"input",
|
|
@@ -1047,13 +1047,13 @@ function Tl({
|
|
|
1047
1047
|
checked: R.includes(g.uid),
|
|
1048
1048
|
disabled: h,
|
|
1049
1049
|
onChange: (P) => {
|
|
1050
|
-
const
|
|
1050
|
+
const Z = S.filter((H) => H.questionUid === o.uid);
|
|
1051
1051
|
let V;
|
|
1052
|
-
P.target.checked ? V = [...
|
|
1053
|
-
...
|
|
1052
|
+
P.target.checked ? V = [...Z, { questionUid: o.uid, value: g.uid }] : V = Z.filter((H) => String(H.value) !== g.uid), U((H) => [
|
|
1053
|
+
...H.filter((K) => K.questionUid !== o.uid),
|
|
1054
1054
|
...V
|
|
1055
1055
|
]), r == null || r([
|
|
1056
|
-
...
|
|
1056
|
+
...S.filter((H) => H.questionUid !== o.uid),
|
|
1057
1057
|
...V
|
|
1058
1058
|
]);
|
|
1059
1059
|
}
|
|
@@ -1062,9 +1062,9 @@ function Tl({
|
|
|
1062
1062
|
/* @__PURE__ */ e("span", { children: g.content })
|
|
1063
1063
|
] }, g.uid);
|
|
1064
1064
|
}) })
|
|
1065
|
-
] }) },
|
|
1065
|
+
] }) }, o.uid);
|
|
1066
1066
|
}),
|
|
1067
|
-
/* @__PURE__ */ e(
|
|
1067
|
+
/* @__PURE__ */ e(G, { className: "my-3" }),
|
|
1068
1068
|
/* @__PURE__ */ t("div", { className: "flex justify-between items-center", children: [
|
|
1069
1069
|
/* @__PURE__ */ t("span", { className: "text-sm text-muted-foreground", children: [
|
|
1070
1070
|
u,
|
|
@@ -1075,7 +1075,7 @@ function Tl({
|
|
|
1075
1075
|
/* @__PURE__ */ e(
|
|
1076
1076
|
D,
|
|
1077
1077
|
{
|
|
1078
|
-
onClick: () => p(
|
|
1078
|
+
onClick: () => p(S),
|
|
1079
1079
|
disabled: !M || b || h,
|
|
1080
1080
|
children: b ? "Submitting..." : v
|
|
1081
1081
|
}
|
|
@@ -1089,7 +1089,7 @@ function Il({
|
|
|
1089
1089
|
title: l,
|
|
1090
1090
|
blocks: a,
|
|
1091
1091
|
isCompleted: i = !1,
|
|
1092
|
-
onMarkComplete:
|
|
1092
|
+
onMarkComplete: c,
|
|
1093
1093
|
onNextLesson: p,
|
|
1094
1094
|
nextLessonTitle: r,
|
|
1095
1095
|
estimatedDuration: m,
|
|
@@ -1101,12 +1101,9 @@ function Il({
|
|
|
1101
1101
|
className: N,
|
|
1102
1102
|
style: C
|
|
1103
1103
|
}) {
|
|
1104
|
-
const [
|
|
1105
|
-
|
|
1106
|
-
c(
|
|
1107
|
-
}, [i]);
|
|
1108
|
-
function z() {
|
|
1109
|
-
c(!0), o == null || o();
|
|
1104
|
+
const [z, d] = F(!1), S = i || z;
|
|
1105
|
+
function U() {
|
|
1106
|
+
d(!0), c == null || c();
|
|
1110
1107
|
}
|
|
1111
1108
|
return /* @__PURE__ */ e(
|
|
1112
1109
|
te,
|
|
@@ -1130,14 +1127,14 @@ function Il({
|
|
|
1130
1127
|
/* @__PURE__ */ e("span", { className: "text-sm", children: lt(m) })
|
|
1131
1128
|
] })
|
|
1132
1129
|
] }),
|
|
1133
|
-
/* @__PURE__ */ e(
|
|
1134
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-3", children: a != null && a.length ? a.map((
|
|
1135
|
-
|
|
1130
|
+
/* @__PURE__ */ e(G, { className: "mb-3" }),
|
|
1131
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-3", children: a != null && a.length ? a.map((u, M) => /* @__PURE__ */ e(
|
|
1132
|
+
Kt,
|
|
1136
1133
|
{
|
|
1137
|
-
block:
|
|
1134
|
+
block: u,
|
|
1138
1135
|
readOnly: v
|
|
1139
1136
|
},
|
|
1140
|
-
|
|
1137
|
+
M
|
|
1141
1138
|
)) : /* @__PURE__ */ e(
|
|
1142
1139
|
$,
|
|
1143
1140
|
{
|
|
@@ -1145,14 +1142,14 @@ function Il({
|
|
|
1145
1142
|
description: "This lesson doesn't have any content blocks."
|
|
1146
1143
|
}
|
|
1147
1144
|
) }),
|
|
1148
|
-
/* @__PURE__ */ e(
|
|
1145
|
+
/* @__PURE__ */ e(E, { className: "mt-4 sticky bottom-0 z-10", children: /* @__PURE__ */ e(_, { className: "px-4 py-3", children: /* @__PURE__ */ t("div", { className: "flex justify-between items-center", children: [
|
|
1149
1146
|
S ? /* @__PURE__ */ t("div", { className: "flex items-center gap-1 text-success", children: [
|
|
1150
1147
|
/* @__PURE__ */ e(Qe, { size: 20 }),
|
|
1151
1148
|
/* @__PURE__ */ e("span", { className: "text-sm font-semibold", children: "Lesson Complete" })
|
|
1152
1149
|
] }) : /* @__PURE__ */ t(
|
|
1153
1150
|
D,
|
|
1154
1151
|
{
|
|
1155
|
-
onClick:
|
|
1152
|
+
onClick: U,
|
|
1156
1153
|
disabled: v,
|
|
1157
1154
|
children: [
|
|
1158
1155
|
/* @__PURE__ */ e(Qe, { size: 18 }),
|
|
@@ -1177,11 +1174,11 @@ function Il({
|
|
|
1177
1174
|
}
|
|
1178
1175
|
);
|
|
1179
1176
|
}
|
|
1180
|
-
function
|
|
1177
|
+
function Fl({
|
|
1181
1178
|
announcements: l,
|
|
1182
1179
|
onMarkRead: a,
|
|
1183
1180
|
onSelect: i,
|
|
1184
|
-
showAvatars:
|
|
1181
|
+
showAvatars: c = !0,
|
|
1185
1182
|
previewLines: p = 3,
|
|
1186
1183
|
emptyMessage: r = "No announcements yet",
|
|
1187
1184
|
readOnly: m = !1,
|
|
@@ -1192,29 +1189,29 @@ function Ml({
|
|
|
1192
1189
|
currentPage: w = 1,
|
|
1193
1190
|
totalItems: N,
|
|
1194
1191
|
onPageChange: C,
|
|
1195
|
-
className:
|
|
1196
|
-
style:
|
|
1192
|
+
className: z,
|
|
1193
|
+
style: d
|
|
1197
1194
|
}) {
|
|
1198
|
-
const [
|
|
1199
|
-
const x = l.filter((
|
|
1195
|
+
const [S, U] = F(/* @__PURE__ */ new Set()), u = j(() => {
|
|
1196
|
+
const x = l.filter((o) => o.isPinned), A = l.filter((o) => !o.isPinned);
|
|
1200
1197
|
return [...x, ...A];
|
|
1201
1198
|
}, [l]);
|
|
1202
1199
|
function M(x) {
|
|
1203
|
-
U((
|
|
1204
|
-
const y = new Set(
|
|
1200
|
+
U((o) => {
|
|
1201
|
+
const y = new Set(o);
|
|
1205
1202
|
return y.has(x) ? y.delete(x) : y.add(x), y;
|
|
1206
1203
|
});
|
|
1207
|
-
const A = l.find((
|
|
1204
|
+
const A = l.find((o) => o.uid === x);
|
|
1208
1205
|
A && !A.isRead && (a == null || a(x));
|
|
1209
1206
|
}
|
|
1210
|
-
return s ? /* @__PURE__ */ e("div", { className: k("space-y-4",
|
|
1207
|
+
return s ? /* @__PURE__ */ e("div", { className: k("space-y-4", z), style: d, children: Array.from({ length: 3 }).map((x, A) => /* @__PURE__ */ t("div", { className: "flex gap-3 items-start", children: [
|
|
1211
1208
|
/* @__PURE__ */ e(f, { className: "h-10 w-10 rounded-full shrink-0" }),
|
|
1212
1209
|
/* @__PURE__ */ t("div", { className: "flex-1 space-y-2", children: [
|
|
1213
1210
|
/* @__PURE__ */ e(f, { className: "h-5 w-48" }),
|
|
1214
1211
|
/* @__PURE__ */ e(f, { className: "h-4 w-full" }),
|
|
1215
1212
|
/* @__PURE__ */ e(f, { className: "h-4 w-full" })
|
|
1216
1213
|
] })
|
|
1217
|
-
] }, A)) }) : v ? /* @__PURE__ */ e("div", { className: k("py-12",
|
|
1214
|
+
] }, A)) }) : v ? /* @__PURE__ */ e("div", { className: k("py-12", z), style: d, children: /* @__PURE__ */ e(
|
|
1218
1215
|
$,
|
|
1219
1216
|
{
|
|
1220
1217
|
icon: /* @__PURE__ */ e(q, { className: "size-10 text-destructive" }),
|
|
@@ -1222,11 +1219,11 @@ function Ml({
|
|
|
1222
1219
|
description: v,
|
|
1223
1220
|
action: b ? /* @__PURE__ */ e(D, { variant: "outline", onClick: b, children: "Retry" }) : void 0
|
|
1224
1221
|
}
|
|
1225
|
-
) }) : u.length === 0 ? /* @__PURE__ */ e("div", { className:
|
|
1222
|
+
) }) : u.length === 0 ? /* @__PURE__ */ e("div", { className: z, style: d, children: /* @__PURE__ */ e($, { title: r }) }) : /* @__PURE__ */ t("div", { className: k("flex flex-col gap-2", z), style: d, children: [
|
|
1226
1223
|
(C && h ? u.slice((w - 1) * h, w * h) : u).map((x) => {
|
|
1227
|
-
const A =
|
|
1224
|
+
const A = S.has(x.uid);
|
|
1228
1225
|
return /* @__PURE__ */ e(
|
|
1229
|
-
|
|
1226
|
+
E,
|
|
1230
1227
|
{
|
|
1231
1228
|
className: k(
|
|
1232
1229
|
x.isRead && "opacity-85",
|
|
@@ -1234,9 +1231,9 @@ function Ml({
|
|
|
1234
1231
|
x.isPinned && "border-l-4 border-l-warning"
|
|
1235
1232
|
),
|
|
1236
1233
|
onClick: () => i && !m ? i(x) : M(x.uid),
|
|
1237
|
-
children: /* @__PURE__ */ e(
|
|
1238
|
-
|
|
1239
|
-
|
|
1234
|
+
children: /* @__PURE__ */ e(_, { className: "py-4", children: /* @__PURE__ */ t("div", { className: "flex gap-1.5 items-start", children: [
|
|
1235
|
+
c && /* @__PURE__ */ e(
|
|
1236
|
+
he,
|
|
1240
1237
|
{
|
|
1241
1238
|
displayName: x.author.displayName,
|
|
1242
1239
|
avatarUrl: x.author.avatarUrl,
|
|
@@ -1259,7 +1256,7 @@ function Ml({
|
|
|
1259
1256
|
/* @__PURE__ */ t("span", { className: "block text-xs text-muted-foreground mb-1", children: [
|
|
1260
1257
|
x.author.displayName,
|
|
1261
1258
|
" · ",
|
|
1262
|
-
|
|
1259
|
+
Ie(x.createdAt)
|
|
1263
1260
|
] }),
|
|
1264
1261
|
/* @__PURE__ */ e(
|
|
1265
1262
|
"div",
|
|
@@ -1278,8 +1275,8 @@ function Ml({
|
|
|
1278
1275
|
variant: "link",
|
|
1279
1276
|
size: "xs",
|
|
1280
1277
|
className: "px-0 mt-0.5 h-auto",
|
|
1281
|
-
onClick: (
|
|
1282
|
-
|
|
1278
|
+
onClick: (o) => {
|
|
1279
|
+
o.stopPropagation(), M(x.uid);
|
|
1283
1280
|
},
|
|
1284
1281
|
children: "Read more"
|
|
1285
1282
|
}
|
|
@@ -1304,11 +1301,11 @@ function Ml({
|
|
|
1304
1301
|
function ve(l) {
|
|
1305
1302
|
return l.replace(/<[^>]*>/g, "").trim().length === 0;
|
|
1306
1303
|
}
|
|
1307
|
-
function
|
|
1304
|
+
function Pl({
|
|
1308
1305
|
title: l,
|
|
1309
1306
|
rootPost: a,
|
|
1310
1307
|
replies: i,
|
|
1311
|
-
currentUser:
|
|
1308
|
+
currentUser: c,
|
|
1312
1309
|
onReply: p,
|
|
1313
1310
|
onToggleLike: r,
|
|
1314
1311
|
onMarkAnswer: m,
|
|
@@ -1319,10 +1316,10 @@ function Fl({
|
|
|
1319
1316
|
isLoading: w,
|
|
1320
1317
|
error: N,
|
|
1321
1318
|
onRetry: C,
|
|
1322
|
-
className:
|
|
1323
|
-
style:
|
|
1319
|
+
className: z,
|
|
1320
|
+
style: d
|
|
1324
1321
|
}) {
|
|
1325
|
-
const [
|
|
1322
|
+
const [S, U] = F(null), [u, M] = F(""), x = j(() => {
|
|
1326
1323
|
const y = /* @__PURE__ */ new Map();
|
|
1327
1324
|
for (const L of i) {
|
|
1328
1325
|
const T = L.parentUid ?? a.uid, n = y.get(T) ?? [];
|
|
@@ -1333,7 +1330,7 @@ function Fl({
|
|
|
1333
1330
|
return y;
|
|
1334
1331
|
}, [i, a.uid, b]);
|
|
1335
1332
|
if (w)
|
|
1336
|
-
return /* @__PURE__ */ t("div", { className: k("space-y-4",
|
|
1333
|
+
return /* @__PURE__ */ t("div", { className: k("space-y-4", z), style: d, children: [
|
|
1337
1334
|
/* @__PURE__ */ e(f, { className: "h-7 w-64" }),
|
|
1338
1335
|
/* @__PURE__ */ t("div", { className: "flex items-start gap-3", children: [
|
|
1339
1336
|
/* @__PURE__ */ e(f, { className: "h-8 w-8 rounded-full shrink-0" }),
|
|
@@ -1342,7 +1339,7 @@ function Fl({
|
|
|
1342
1339
|
Array.from({ length: 2 }).map((y, L) => /* @__PURE__ */ e("div", { className: "ml-8", children: /* @__PURE__ */ e(f, { className: "h-20 w-full" }) }, L))
|
|
1343
1340
|
] });
|
|
1344
1341
|
if (N)
|
|
1345
|
-
return /* @__PURE__ */ e("div", { className: k("py-12",
|
|
1342
|
+
return /* @__PURE__ */ e("div", { className: k("py-12", z), style: d, children: /* @__PURE__ */ e(
|
|
1346
1343
|
$,
|
|
1347
1344
|
{
|
|
1348
1345
|
icon: /* @__PURE__ */ e(q, { className: "size-10 text-destructive" }),
|
|
@@ -1354,7 +1351,7 @@ function Fl({
|
|
|
1354
1351
|
function A(y) {
|
|
1355
1352
|
ve(u) || (p(y, u), M(""), U(null));
|
|
1356
1353
|
}
|
|
1357
|
-
function
|
|
1354
|
+
function o(y, L) {
|
|
1358
1355
|
const T = x.get(y.uid) ?? [], n = Math.min(L, s), g = /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: [
|
|
1359
1356
|
r && !h && /* @__PURE__ */ t(se, { children: [
|
|
1360
1357
|
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ t(
|
|
@@ -1382,14 +1379,14 @@ function Fl({
|
|
|
1382
1379
|
"aria-label": "Reply",
|
|
1383
1380
|
onClick: () => U(y.uid),
|
|
1384
1381
|
children: [
|
|
1385
|
-
/* @__PURE__ */ e(
|
|
1382
|
+
/* @__PURE__ */ e(Rt, { size: 14 }),
|
|
1386
1383
|
"Reply"
|
|
1387
1384
|
]
|
|
1388
1385
|
}
|
|
1389
1386
|
) }),
|
|
1390
1387
|
/* @__PURE__ */ e(re, { children: "Reply" })
|
|
1391
1388
|
] }),
|
|
1392
|
-
m && !h &&
|
|
1389
|
+
m && !h && c.role !== "student" && !y.isAnswer && /* @__PURE__ */ t(se, { children: [
|
|
1393
1390
|
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ t(
|
|
1394
1391
|
D,
|
|
1395
1392
|
{
|
|
@@ -1409,7 +1406,7 @@ function Fl({
|
|
|
1409
1406
|
] });
|
|
1410
1407
|
return /* @__PURE__ */ t("div", { children: [
|
|
1411
1408
|
/* @__PURE__ */ e(
|
|
1412
|
-
|
|
1409
|
+
Xt,
|
|
1413
1410
|
{
|
|
1414
1411
|
author: y.author,
|
|
1415
1412
|
content: y.content,
|
|
@@ -1421,14 +1418,14 @@ function Fl({
|
|
|
1421
1418
|
className: "mb-2"
|
|
1422
1419
|
}
|
|
1423
1420
|
),
|
|
1424
|
-
|
|
1425
|
-
|
|
1421
|
+
S === y.uid && /* @__PURE__ */ e(
|
|
1422
|
+
E,
|
|
1426
1423
|
{
|
|
1427
1424
|
className: "mb-2",
|
|
1428
1425
|
style: { marginLeft: `${(n + 1) * 16}px` },
|
|
1429
|
-
children: /* @__PURE__ */ t(
|
|
1426
|
+
children: /* @__PURE__ */ t(_, { className: "py-4", children: [
|
|
1430
1427
|
/* @__PURE__ */ e(
|
|
1431
|
-
|
|
1428
|
+
ue,
|
|
1432
1429
|
{
|
|
1433
1430
|
className: "min-h-15 mb-2",
|
|
1434
1431
|
placeholder: "Write a reply...",
|
|
@@ -1462,10 +1459,10 @@ function Fl({
|
|
|
1462
1459
|
] })
|
|
1463
1460
|
}
|
|
1464
1461
|
),
|
|
1465
|
-
T.map((R) =>
|
|
1462
|
+
T.map((R) => o(R, L + 1))
|
|
1466
1463
|
] }, y.uid);
|
|
1467
1464
|
}
|
|
1468
|
-
return /* @__PURE__ */ t("div", { className:
|
|
1465
|
+
return /* @__PURE__ */ t("div", { className: z, style: d, children: [
|
|
1469
1466
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
1470
1467
|
/* @__PURE__ */ e(Te, { size: 20, className: "text-foreground shrink-0" }),
|
|
1471
1468
|
/* @__PURE__ */ e("span", { className: "text-lg font-semibold text-foreground", children: l }),
|
|
@@ -1475,15 +1472,15 @@ function Fl({
|
|
|
1475
1472
|
i.length === 1 ? "reply" : "replies"
|
|
1476
1473
|
] })
|
|
1477
1474
|
] }),
|
|
1478
|
-
/* @__PURE__ */ e(
|
|
1479
|
-
|
|
1475
|
+
/* @__PURE__ */ e(G, { className: "mb-2" }),
|
|
1476
|
+
o(a, 0)
|
|
1480
1477
|
] });
|
|
1481
1478
|
}
|
|
1482
|
-
function
|
|
1479
|
+
function El({
|
|
1483
1480
|
title: l,
|
|
1484
1481
|
instructions: a,
|
|
1485
1482
|
dueDate: i,
|
|
1486
|
-
maxScore:
|
|
1483
|
+
maxScore: c,
|
|
1487
1484
|
status: p,
|
|
1488
1485
|
submissionTypes: r,
|
|
1489
1486
|
existingSubmission: m,
|
|
@@ -1494,27 +1491,27 @@ function Pl({
|
|
|
1494
1491
|
isSubmitting: w = !1,
|
|
1495
1492
|
readOnly: N = !1,
|
|
1496
1493
|
isLoading: C,
|
|
1497
|
-
error:
|
|
1498
|
-
onRetry:
|
|
1499
|
-
className:
|
|
1494
|
+
error: z,
|
|
1495
|
+
onRetry: d,
|
|
1496
|
+
className: S,
|
|
1500
1497
|
style: U
|
|
1501
1498
|
}) {
|
|
1502
|
-
const [u, M] = F((m == null ? void 0 : m.textContent) ?? ""), [x, A] = F((m == null ? void 0 : m.files) ?? []), [
|
|
1499
|
+
const [u, M] = F((m == null ? void 0 : m.textContent) ?? ""), [x, A] = F((m == null ? void 0 : m.files) ?? []), [o, y] = F((m == null ? void 0 : m.url) ?? ""), [L, T] = F(r[0]);
|
|
1503
1500
|
if (C)
|
|
1504
|
-
return /* @__PURE__ */ t("div", { className: k("space-y-4",
|
|
1501
|
+
return /* @__PURE__ */ t("div", { className: k("space-y-4", S), style: U, children: [
|
|
1505
1502
|
/* @__PURE__ */ e(f, { className: "h-8 w-64" }),
|
|
1506
1503
|
/* @__PURE__ */ e(f, { className: "h-6 w-20" }),
|
|
1507
1504
|
/* @__PURE__ */ e(f, { className: "h-32 w-full" }),
|
|
1508
1505
|
/* @__PURE__ */ e(f, { className: "h-10 w-32" })
|
|
1509
1506
|
] });
|
|
1510
|
-
if (
|
|
1511
|
-
return /* @__PURE__ */ e("div", { className: k("py-12",
|
|
1507
|
+
if (z)
|
|
1508
|
+
return /* @__PURE__ */ e("div", { className: k("py-12", S), style: U, children: /* @__PURE__ */ e(
|
|
1512
1509
|
$,
|
|
1513
1510
|
{
|
|
1514
1511
|
icon: /* @__PURE__ */ e(q, { className: "size-10 text-destructive" }),
|
|
1515
1512
|
title: "Something went wrong",
|
|
1516
|
-
description:
|
|
1517
|
-
action:
|
|
1513
|
+
description: z,
|
|
1514
|
+
action: d ? /* @__PURE__ */ e(D, { variant: "outline", onClick: d, children: "Retry" }) : void 0
|
|
1518
1515
|
}
|
|
1519
1516
|
) });
|
|
1520
1517
|
const n = !N && !["submitted", "graded"].includes(p);
|
|
@@ -1522,22 +1519,22 @@ function Pl({
|
|
|
1522
1519
|
return {
|
|
1523
1520
|
textContent: r.includes("text") ? u : void 0,
|
|
1524
1521
|
files: r.includes("file") ? x : void 0,
|
|
1525
|
-
url: r.includes("url") ?
|
|
1522
|
+
url: r.includes("url") ? o : void 0
|
|
1526
1523
|
};
|
|
1527
1524
|
}
|
|
1528
|
-
return /* @__PURE__ */ t("div", { className:
|
|
1525
|
+
return /* @__PURE__ */ t("div", { className: S, style: U, children: [
|
|
1529
1526
|
/* @__PURE__ */ e("div", { className: "flex justify-between items-start mb-2", children: /* @__PURE__ */ t("div", { children: [
|
|
1530
1527
|
/* @__PURE__ */ e("div", { className: "text-xl font-bold text-foreground mb-0.5", children: l }),
|
|
1531
1528
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
1532
1529
|
/* @__PURE__ */ e(at, { status: p }),
|
|
1533
1530
|
i && /* @__PURE__ */ e(nt, { dueDate: i, size: "small" }),
|
|
1534
|
-
|
|
1535
|
-
|
|
1531
|
+
c != null && /* @__PURE__ */ t("span", { className: "text-sm text-muted-foreground", children: [
|
|
1532
|
+
c,
|
|
1536
1533
|
" points"
|
|
1537
1534
|
] })
|
|
1538
1535
|
] })
|
|
1539
1536
|
] }) }),
|
|
1540
|
-
/* @__PURE__ */ e(
|
|
1537
|
+
/* @__PURE__ */ e(E, { className: "mb-3", children: /* @__PURE__ */ t(_, { className: "pt-6", children: [
|
|
1541
1538
|
/* @__PURE__ */ e("div", { className: "font-semibold text-sm text-foreground mb-1", children: "Instructions" }),
|
|
1542
1539
|
/* @__PURE__ */ e("div", { className: "text-muted-foreground text-sm", children: typeof a == "string" ? /* @__PURE__ */ e("span", { children: a }) : a })
|
|
1543
1540
|
] }) }),
|
|
@@ -1545,7 +1542,7 @@ function Pl({
|
|
|
1545
1542
|
/* @__PURE__ */ t("div", { className: "font-semibold text-sm mb-1", children: [
|
|
1546
1543
|
"Grade: ",
|
|
1547
1544
|
h.score,
|
|
1548
|
-
|
|
1545
|
+
c != null ? ` / ${c}` : ""
|
|
1549
1546
|
] }),
|
|
1550
1547
|
h.feedback && /* @__PURE__ */ e("div", { children: h.feedback })
|
|
1551
1548
|
] }) }),
|
|
@@ -1557,7 +1554,7 @@ function Pl({
|
|
|
1557
1554
|
r.includes("url") && /* @__PURE__ */ e(ce, { value: "url", children: "URL" })
|
|
1558
1555
|
] }),
|
|
1559
1556
|
r.includes("text") && /* @__PURE__ */ e(ke, { value: "text", children: /* @__PURE__ */ e(
|
|
1560
|
-
|
|
1557
|
+
ue,
|
|
1561
1558
|
{
|
|
1562
1559
|
className: "min-h-45",
|
|
1563
1560
|
placeholder: "Type your submission...",
|
|
@@ -1567,11 +1564,11 @@ function Pl({
|
|
|
1567
1564
|
}
|
|
1568
1565
|
) }),
|
|
1569
1566
|
r.includes("file") && /* @__PURE__ */ e(ke, { value: "file", children: /* @__PURE__ */ e(
|
|
1570
|
-
|
|
1567
|
+
He,
|
|
1571
1568
|
{
|
|
1572
1569
|
files: x,
|
|
1573
1570
|
onFilesAdded: (R) => A((P) => [...P, ...R]),
|
|
1574
|
-
onFileRemove: (R) => A((P) => P.filter((
|
|
1571
|
+
onFileRemove: (R) => A((P) => P.filter((Z, V) => V !== R)),
|
|
1575
1572
|
accept: s == null ? void 0 : s.acceptedTypes,
|
|
1576
1573
|
maxFiles: s == null ? void 0 : s.maxFiles,
|
|
1577
1574
|
maxSizeMB: s == null ? void 0 : s.maxSizeMB
|
|
@@ -1581,13 +1578,13 @@ function Pl({
|
|
|
1581
1578
|
Ae,
|
|
1582
1579
|
{
|
|
1583
1580
|
placeholder: "https://...",
|
|
1584
|
-
value:
|
|
1581
|
+
value: o,
|
|
1585
1582
|
onChange: (R) => y(R.target.value)
|
|
1586
1583
|
}
|
|
1587
1584
|
) })
|
|
1588
1585
|
] }) : /* @__PURE__ */ t(O, { children: [
|
|
1589
1586
|
r.includes("text") && /* @__PURE__ */ e(
|
|
1590
|
-
|
|
1587
|
+
ue,
|
|
1591
1588
|
{
|
|
1592
1589
|
className: "min-h-45 mb-2",
|
|
1593
1590
|
placeholder: "Type your submission...",
|
|
@@ -1597,11 +1594,11 @@ function Pl({
|
|
|
1597
1594
|
}
|
|
1598
1595
|
),
|
|
1599
1596
|
r.includes("file") && /* @__PURE__ */ e("div", { className: "mb-2", children: /* @__PURE__ */ e(
|
|
1600
|
-
|
|
1597
|
+
He,
|
|
1601
1598
|
{
|
|
1602
1599
|
files: x,
|
|
1603
1600
|
onFilesAdded: (R) => A((P) => [...P, ...R]),
|
|
1604
|
-
onFileRemove: (R) => A((P) => P.filter((
|
|
1601
|
+
onFileRemove: (R) => A((P) => P.filter((Z, V) => V !== R)),
|
|
1605
1602
|
accept: s == null ? void 0 : s.acceptedTypes,
|
|
1606
1603
|
maxFiles: s == null ? void 0 : s.maxFiles,
|
|
1607
1604
|
maxSizeMB: s == null ? void 0 : s.maxSizeMB
|
|
@@ -1612,12 +1609,12 @@ function Pl({
|
|
|
1612
1609
|
{
|
|
1613
1610
|
className: "mb-2",
|
|
1614
1611
|
placeholder: "https://...",
|
|
1615
|
-
value:
|
|
1612
|
+
value: o,
|
|
1616
1613
|
onChange: (R) => y(R.target.value)
|
|
1617
1614
|
}
|
|
1618
1615
|
)
|
|
1619
1616
|
] }),
|
|
1620
|
-
/* @__PURE__ */ e(
|
|
1617
|
+
/* @__PURE__ */ e(G, { className: "my-2" }),
|
|
1621
1618
|
/* @__PURE__ */ t("div", { className: "flex gap-2 justify-end", children: [
|
|
1622
1619
|
b && /* @__PURE__ */ t(
|
|
1623
1620
|
D,
|
|
@@ -1626,7 +1623,7 @@ function Pl({
|
|
|
1626
1623
|
onClick: () => b(g()),
|
|
1627
1624
|
disabled: w,
|
|
1628
1625
|
children: [
|
|
1629
|
-
/* @__PURE__ */ e(
|
|
1626
|
+
/* @__PURE__ */ e(Dt, { size: 16 }),
|
|
1630
1627
|
"Save Draft"
|
|
1631
1628
|
]
|
|
1632
1629
|
}
|
|
@@ -1646,11 +1643,11 @@ function Pl({
|
|
|
1646
1643
|
] })
|
|
1647
1644
|
] });
|
|
1648
1645
|
}
|
|
1649
|
-
function
|
|
1646
|
+
function pe({
|
|
1650
1647
|
label: l,
|
|
1651
1648
|
field: a,
|
|
1652
1649
|
sortField: i,
|
|
1653
|
-
sortDir:
|
|
1650
|
+
sortDir: c,
|
|
1654
1651
|
onSort: p,
|
|
1655
1652
|
textAlign: r
|
|
1656
1653
|
}) {
|
|
@@ -1665,7 +1662,7 @@ function ge({
|
|
|
1665
1662
|
onClick: () => p(a),
|
|
1666
1663
|
children: /* @__PURE__ */ t("div", { className: k("flex items-center gap-1", r === "right" && "justify-end"), children: [
|
|
1667
1664
|
/* @__PURE__ */ e("span", { className: k(m ? "text-foreground" : "text-muted-foreground"), children: l }),
|
|
1668
|
-
m && (
|
|
1665
|
+
m && (c === "asc" ? /* @__PURE__ */ e(Tt, { size: 14 }) : /* @__PURE__ */ e(Mt, { size: 14 }))
|
|
1669
1666
|
] })
|
|
1670
1667
|
}
|
|
1671
1668
|
);
|
|
@@ -1674,7 +1671,7 @@ function _l({
|
|
|
1674
1671
|
items: l,
|
|
1675
1672
|
categories: a,
|
|
1676
1673
|
overallGrade: i,
|
|
1677
|
-
showWeights:
|
|
1674
|
+
showWeights: c = !0,
|
|
1678
1675
|
showCategoryTotals: p = !0,
|
|
1679
1676
|
onItemClick: r,
|
|
1680
1677
|
readOnly: m = !1,
|
|
@@ -1685,18 +1682,18 @@ function _l({
|
|
|
1685
1682
|
currentPage: w = 1,
|
|
1686
1683
|
totalItems: N,
|
|
1687
1684
|
onPageChange: C,
|
|
1688
|
-
className:
|
|
1689
|
-
style:
|
|
1685
|
+
className: z,
|
|
1686
|
+
style: d
|
|
1690
1687
|
}) {
|
|
1691
|
-
const [
|
|
1688
|
+
const [S, U] = F("dueDate"), [u, M] = F("asc");
|
|
1692
1689
|
function x(L) {
|
|
1693
|
-
|
|
1690
|
+
S === L ? M((T) => T === "asc" ? "desc" : "asc") : (U(L), M("asc"));
|
|
1694
1691
|
}
|
|
1695
|
-
const A =
|
|
1692
|
+
const A = j(() => {
|
|
1696
1693
|
const L = [...l];
|
|
1697
1694
|
return L.sort((T, n) => {
|
|
1698
1695
|
let g = 0;
|
|
1699
|
-
switch (
|
|
1696
|
+
switch (S) {
|
|
1700
1697
|
case "name":
|
|
1701
1698
|
g = T.name.localeCompare(n.name);
|
|
1702
1699
|
break;
|
|
@@ -1712,15 +1709,15 @@ function _l({
|
|
|
1712
1709
|
}
|
|
1713
1710
|
return u === "asc" ? g : -g;
|
|
1714
1711
|
}), L;
|
|
1715
|
-
}, [l,
|
|
1712
|
+
}, [l, S, u]), o = j(() => {
|
|
1716
1713
|
if (!a || a.length === 0) return [{ category: null, items: A }];
|
|
1717
1714
|
const L = a.map((n) => ({
|
|
1718
1715
|
category: n,
|
|
1719
1716
|
items: A.filter((g) => g.categoryUid === n.uid)
|
|
1720
1717
|
})), T = A.filter((n) => !n.categoryUid);
|
|
1721
1718
|
return T.length > 0 && L.push({ category: null, items: T }), L;
|
|
1722
|
-
}, [A, a]), y =
|
|
1723
|
-
return s ? /* @__PURE__ */ t("div", { className: k("space-y-4",
|
|
1719
|
+
}, [A, a]), y = c ? 5 : 4;
|
|
1720
|
+
return s ? /* @__PURE__ */ t("div", { className: k("space-y-4", z), style: d, children: [
|
|
1724
1721
|
/* @__PURE__ */ e(f, { className: "h-20 w-full" }),
|
|
1725
1722
|
/* @__PURE__ */ e(f, { className: "h-10 w-full" }),
|
|
1726
1723
|
/* @__PURE__ */ e(f, { className: "h-12 w-full" }),
|
|
@@ -1728,7 +1725,7 @@ function _l({
|
|
|
1728
1725
|
/* @__PURE__ */ e(f, { className: "h-12 w-full" }),
|
|
1729
1726
|
/* @__PURE__ */ e(f, { className: "h-12 w-full" }),
|
|
1730
1727
|
/* @__PURE__ */ e(f, { className: "h-12 w-full" })
|
|
1731
|
-
] }) : v ? /* @__PURE__ */ e("div", { className: k("py-12",
|
|
1728
|
+
] }) : v ? /* @__PURE__ */ e("div", { className: k("py-12", z), style: d, children: /* @__PURE__ */ e(
|
|
1732
1729
|
$,
|
|
1733
1730
|
{
|
|
1734
1731
|
icon: /* @__PURE__ */ e(q, { className: "size-10 text-destructive" }),
|
|
@@ -1736,10 +1733,10 @@ function _l({
|
|
|
1736
1733
|
description: v,
|
|
1737
1734
|
action: b ? /* @__PURE__ */ e(D, { variant: "outline", onClick: b, children: "Retry" }) : void 0
|
|
1738
1735
|
}
|
|
1739
|
-
) }) : /* @__PURE__ */ t("div", { className:
|
|
1740
|
-
i && /* @__PURE__ */ e(
|
|
1736
|
+
) }) : /* @__PURE__ */ t("div", { className: z, style: d, children: [
|
|
1737
|
+
i && /* @__PURE__ */ e(E, { className: "mb-3", children: /* @__PURE__ */ e(_, { className: "pt-6", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
1741
1738
|
/* @__PURE__ */ e(
|
|
1742
|
-
|
|
1739
|
+
qt,
|
|
1743
1740
|
{
|
|
1744
1741
|
percentage: i.percentage,
|
|
1745
1742
|
letterGrade: i.letterGrade,
|
|
@@ -1757,52 +1754,52 @@ function _l({
|
|
|
1757
1754
|
] })
|
|
1758
1755
|
] })
|
|
1759
1756
|
] }) }) }),
|
|
1760
|
-
/* @__PURE__ */ e(
|
|
1757
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ t(rt, { children: [
|
|
1761
1758
|
/* @__PURE__ */ e(ct, { children: /* @__PURE__ */ t(de, { children: [
|
|
1762
1759
|
/* @__PURE__ */ e(
|
|
1763
|
-
|
|
1760
|
+
pe,
|
|
1764
1761
|
{
|
|
1765
1762
|
label: "Assignment",
|
|
1766
1763
|
field: "name",
|
|
1767
|
-
sortField:
|
|
1764
|
+
sortField: S,
|
|
1768
1765
|
sortDir: u,
|
|
1769
1766
|
onSort: x
|
|
1770
1767
|
}
|
|
1771
1768
|
),
|
|
1772
1769
|
/* @__PURE__ */ e(
|
|
1773
|
-
|
|
1770
|
+
pe,
|
|
1774
1771
|
{
|
|
1775
1772
|
label: "Status",
|
|
1776
1773
|
field: "status",
|
|
1777
|
-
sortField:
|
|
1774
|
+
sortField: S,
|
|
1778
1775
|
sortDir: u,
|
|
1779
1776
|
onSort: x
|
|
1780
1777
|
}
|
|
1781
1778
|
),
|
|
1782
1779
|
/* @__PURE__ */ e(
|
|
1783
|
-
|
|
1780
|
+
pe,
|
|
1784
1781
|
{
|
|
1785
1782
|
label: "Due Date",
|
|
1786
1783
|
field: "dueDate",
|
|
1787
|
-
sortField:
|
|
1784
|
+
sortField: S,
|
|
1788
1785
|
sortDir: u,
|
|
1789
1786
|
onSort: x
|
|
1790
1787
|
}
|
|
1791
1788
|
),
|
|
1792
1789
|
/* @__PURE__ */ e(
|
|
1793
|
-
|
|
1790
|
+
pe,
|
|
1794
1791
|
{
|
|
1795
1792
|
label: "Score",
|
|
1796
1793
|
field: "score",
|
|
1797
|
-
sortField:
|
|
1794
|
+
sortField: S,
|
|
1798
1795
|
sortDir: u,
|
|
1799
1796
|
onSort: x,
|
|
1800
1797
|
textAlign: "right"
|
|
1801
1798
|
}
|
|
1802
1799
|
),
|
|
1803
|
-
|
|
1800
|
+
c && /* @__PURE__ */ e(Ne, { className: "text-right text-muted-foreground", children: "Weight" })
|
|
1804
1801
|
] }) }),
|
|
1805
|
-
/* @__PURE__ */ e(dt, { children:
|
|
1802
|
+
/* @__PURE__ */ e(dt, { children: o.map((L, T) => {
|
|
1806
1803
|
var n;
|
|
1807
1804
|
return /* @__PURE__ */ t(At, { children: [
|
|
1808
1805
|
L.category && p && /* @__PURE__ */ e(de, { className: "bg-muted hover:bg-muted", children: /* @__PURE__ */ e(le, { colSpan: y, children: /* @__PURE__ */ t("span", { className: "font-semibold text-sm text-foreground", children: [
|
|
@@ -1830,7 +1827,7 @@ function _l({
|
|
|
1830
1827
|
" / ",
|
|
1831
1828
|
g.maxScore
|
|
1832
1829
|
] }) : g.status === "excused" ? /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Excused" }) : /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "—" }) }),
|
|
1833
|
-
|
|
1830
|
+
c && /* @__PURE__ */ e(le, { className: "text-right", children: g.weight != null ? `${g.weight}%` : "—" })
|
|
1834
1831
|
]
|
|
1835
1832
|
},
|
|
1836
1833
|
g.uid
|
|
@@ -1849,20 +1846,20 @@ function _l({
|
|
|
1849
1846
|
)
|
|
1850
1847
|
] });
|
|
1851
1848
|
}
|
|
1852
|
-
const
|
|
1849
|
+
const il = [
|
|
1853
1850
|
"var(--palette-0)",
|
|
1854
1851
|
"var(--palette-1)",
|
|
1855
1852
|
"var(--palette-2)",
|
|
1856
1853
|
"var(--palette-3)"
|
|
1857
|
-
], Ce =
|
|
1858
|
-
function
|
|
1854
|
+
], Ce = il.length;
|
|
1855
|
+
function rl(l) {
|
|
1859
1856
|
return `palette${(l % Ce + Ce) % Ce}`;
|
|
1860
1857
|
}
|
|
1861
|
-
function
|
|
1858
|
+
function Bl({
|
|
1862
1859
|
overallProgress: l,
|
|
1863
1860
|
totalTimeSpent: a,
|
|
1864
1861
|
modules: i,
|
|
1865
|
-
recentActivity:
|
|
1862
|
+
recentActivity: c,
|
|
1866
1863
|
streak: p,
|
|
1867
1864
|
achievements: r,
|
|
1868
1865
|
recentActivityLimit: m = 5,
|
|
@@ -1873,17 +1870,17 @@ function El({
|
|
|
1873
1870
|
className: w,
|
|
1874
1871
|
style: N
|
|
1875
1872
|
}) {
|
|
1876
|
-
const C =
|
|
1877
|
-
() => i.filter((
|
|
1873
|
+
const C = j(
|
|
1874
|
+
() => i.filter((d) => d.completedItems === d.totalItems).length,
|
|
1878
1875
|
[i]
|
|
1879
|
-
),
|
|
1880
|
-
() => (
|
|
1881
|
-
uid:
|
|
1882
|
-
type:
|
|
1883
|
-
title:
|
|
1884
|
-
timestamp:
|
|
1876
|
+
), z = j(
|
|
1877
|
+
() => (c == null ? void 0 : c.map((d) => ({
|
|
1878
|
+
uid: d.uid,
|
|
1879
|
+
type: d.type,
|
|
1880
|
+
title: d.description,
|
|
1881
|
+
timestamp: d.timestamp
|
|
1885
1882
|
}))) ?? [],
|
|
1886
|
-
[
|
|
1883
|
+
[c]
|
|
1887
1884
|
);
|
|
1888
1885
|
return v ? /* @__PURE__ */ t("div", { className: k("space-y-4", w), style: N, children: [
|
|
1889
1886
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-3", children: [
|
|
@@ -1905,7 +1902,7 @@ function El({
|
|
|
1905
1902
|
}
|
|
1906
1903
|
) }) : /* @__PURE__ */ t("div", { className: w, style: N, children: [
|
|
1907
1904
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(160px,1fr))] gap-3 mb-4", children: [
|
|
1908
|
-
/* @__PURE__ */ e(
|
|
1905
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(_, { className: "p-3 flex justify-center", children: /* @__PURE__ */ e(ot, { value: l, size: 100 }) }) }),
|
|
1909
1906
|
/* @__PURE__ */ e(
|
|
1910
1907
|
Le,
|
|
1911
1908
|
{
|
|
@@ -1915,8 +1912,8 @@ function El({
|
|
|
1915
1912
|
value: lt(a)
|
|
1916
1913
|
}
|
|
1917
1914
|
),
|
|
1918
|
-
p && /* @__PURE__ */ e(
|
|
1919
|
-
|
|
1915
|
+
p && /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(_, { className: "p-4 flex items-center", children: /* @__PURE__ */ e(
|
|
1916
|
+
el,
|
|
1920
1917
|
{
|
|
1921
1918
|
currentStreak: p.currentDays,
|
|
1922
1919
|
longestStreak: p.longestDays,
|
|
@@ -1926,7 +1923,7 @@ function El({
|
|
|
1926
1923
|
/* @__PURE__ */ e(
|
|
1927
1924
|
Le,
|
|
1928
1925
|
{
|
|
1929
|
-
icon: /* @__PURE__ */ e(
|
|
1926
|
+
icon: /* @__PURE__ */ e(oe, { size: 24 }),
|
|
1930
1927
|
label: "Modules",
|
|
1931
1928
|
description: "Course progress",
|
|
1932
1929
|
value: `${C} / ${i.length}`,
|
|
@@ -1934,68 +1931,68 @@ function El({
|
|
|
1934
1931
|
}
|
|
1935
1932
|
)
|
|
1936
1933
|
] }),
|
|
1937
|
-
/* @__PURE__ */ e(
|
|
1934
|
+
/* @__PURE__ */ e(G, { className: "mb-3" }),
|
|
1938
1935
|
/* @__PURE__ */ e("p", { className: "text-lg font-semibold mb-2 text-foreground", children: "Module Progress" }),
|
|
1939
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 mb-4", children: i.map((
|
|
1940
|
-
const U =
|
|
1936
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 mb-4", children: i.map((d, S) => {
|
|
1937
|
+
const U = d.totalItems > 0 ? d.completedItems / d.totalItems * 100 : 0;
|
|
1941
1938
|
return /* @__PURE__ */ e(
|
|
1942
|
-
|
|
1939
|
+
E,
|
|
1943
1940
|
{
|
|
1944
1941
|
className: k(
|
|
1945
1942
|
"transition-colors",
|
|
1946
1943
|
s && "cursor-pointer hover:border-primary"
|
|
1947
1944
|
),
|
|
1948
|
-
onClick: () => s == null ? void 0 : s(
|
|
1949
|
-
children: /* @__PURE__ */ t(
|
|
1945
|
+
onClick: () => s == null ? void 0 : s(d.uid),
|
|
1946
|
+
children: /* @__PURE__ */ t(_, { className: "p-3", children: [
|
|
1950
1947
|
/* @__PURE__ */ t("div", { className: "flex justify-between items-center mb-0.5", children: [
|
|
1951
|
-
/* @__PURE__ */ e("span", { className: "font-semibold text-sm text-foreground", children:
|
|
1948
|
+
/* @__PURE__ */ e("span", { className: "font-semibold text-sm text-foreground", children: d.name }),
|
|
1952
1949
|
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: [
|
|
1953
|
-
|
|
1950
|
+
d.completedItems,
|
|
1954
1951
|
" / ",
|
|
1955
|
-
|
|
1952
|
+
d.totalItems
|
|
1956
1953
|
] })
|
|
1957
1954
|
] }),
|
|
1958
|
-
/* @__PURE__ */ e(
|
|
1955
|
+
/* @__PURE__ */ e(fe, { value: U, size: "sm", variant: U >= 100 ? "success" : rl(S) })
|
|
1959
1956
|
] })
|
|
1960
1957
|
},
|
|
1961
|
-
|
|
1958
|
+
d.uid
|
|
1962
1959
|
);
|
|
1963
1960
|
}) }),
|
|
1964
|
-
|
|
1965
|
-
/* @__PURE__ */ e(
|
|
1961
|
+
c && c.length > 0 && /* @__PURE__ */ t(O, { children: [
|
|
1962
|
+
/* @__PURE__ */ e(G, { className: "mb-3" }),
|
|
1966
1963
|
/* @__PURE__ */ e("p", { className: "text-lg font-semibold mb-2 text-foreground", children: "Recent Activity" }),
|
|
1967
1964
|
/* @__PURE__ */ e("div", { className: "mb-4", children: /* @__PURE__ */ e(
|
|
1968
|
-
|
|
1965
|
+
tl,
|
|
1969
1966
|
{
|
|
1970
|
-
events:
|
|
1967
|
+
events: z,
|
|
1971
1968
|
limit: m
|
|
1972
1969
|
}
|
|
1973
1970
|
) })
|
|
1974
1971
|
] }),
|
|
1975
1972
|
r && r.length > 0 && /* @__PURE__ */ t(O, { children: [
|
|
1976
|
-
/* @__PURE__ */ e(
|
|
1973
|
+
/* @__PURE__ */ e(G, { className: "mb-3" }),
|
|
1977
1974
|
/* @__PURE__ */ e("p", { className: "text-lg font-semibold mb-2 text-foreground", children: "Achievements" }),
|
|
1978
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(140px,1fr))] gap-2", children: r.map((
|
|
1975
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(140px,1fr))] gap-2", children: r.map((d) => /* @__PURE__ */ e(
|
|
1979
1976
|
mt,
|
|
1980
1977
|
{
|
|
1981
|
-
title:
|
|
1982
|
-
description:
|
|
1983
|
-
icon:
|
|
1978
|
+
title: d.name,
|
|
1979
|
+
description: d.description,
|
|
1980
|
+
icon: d.iconUrl ? /* @__PURE__ */ e(
|
|
1984
1981
|
"img",
|
|
1985
1982
|
{
|
|
1986
|
-
src:
|
|
1987
|
-
alt:
|
|
1983
|
+
src: d.iconUrl,
|
|
1984
|
+
alt: d.name,
|
|
1988
1985
|
className: "w-12 h-12"
|
|
1989
1986
|
}
|
|
1990
1987
|
) : void 0,
|
|
1991
|
-
earnedDate:
|
|
1988
|
+
earnedDate: d.earnedAt
|
|
1992
1989
|
},
|
|
1993
|
-
|
|
1990
|
+
d.uid
|
|
1994
1991
|
)) })
|
|
1995
1992
|
] })
|
|
1996
1993
|
] });
|
|
1997
1994
|
}
|
|
1998
|
-
const
|
|
1995
|
+
const cl = {
|
|
1999
1996
|
classic: {
|
|
2000
1997
|
size: 40,
|
|
2001
1998
|
paths: [
|
|
@@ -2026,12 +2023,12 @@ const rl = {
|
|
|
2026
2023
|
dots: [{ cx: 5, cy: 5, r: 5 }],
|
|
2027
2024
|
color: "text-primary/40"
|
|
2028
2025
|
}
|
|
2029
|
-
},
|
|
2026
|
+
}, dl = [
|
|
2030
2027
|
{ key: "tl", pos: "top-3 left-3", transform: void 0 },
|
|
2031
2028
|
{ key: "tr", pos: "top-3 right-3", transform: "scaleX(-1)" },
|
|
2032
2029
|
{ key: "bl", pos: "bottom-3 left-3", transform: "scaleY(-1)" },
|
|
2033
2030
|
{ key: "br", pos: "bottom-3 right-3", transform: "scale(-1)" }
|
|
2034
|
-
],
|
|
2031
|
+
], ol = {
|
|
2035
2032
|
classic: {
|
|
2036
2033
|
lineColor: "bg-warning/30",
|
|
2037
2034
|
motif: /* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 12 12", className: "text-warning/50 shrink-0", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M6 0 L12 6 L6 12 L0 6 Z", fill: "currentColor" }) })
|
|
@@ -2056,7 +2053,7 @@ const rl = {
|
|
|
2056
2053
|
lineColor: "bg-primary/40",
|
|
2057
2054
|
motif: /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 10 10", className: "text-primary/50 shrink-0", "aria-hidden": "true", children: /* @__PURE__ */ e("rect", { x: "1", y: "1", width: "8", height: "8", fill: "currentColor" }) })
|
|
2058
2055
|
}
|
|
2059
|
-
},
|
|
2056
|
+
}, ml = {
|
|
2060
2057
|
classic: {
|
|
2061
2058
|
background: "radial-gradient(ellipse at center, var(--color-warning) 0%, transparent 65%)",
|
|
2062
2059
|
opacity: 0.06
|
|
@@ -2075,32 +2072,32 @@ const rl = {
|
|
|
2075
2072
|
background: "radial-gradient(ellipse at 30% 50%, var(--color-primary) 0%, transparent 50%), radial-gradient(ellipse at 70% 50%, var(--color-palette-0) 0%, transparent 50%)",
|
|
2076
2073
|
opacity: 0.06
|
|
2077
2074
|
}
|
|
2078
|
-
},
|
|
2075
|
+
}, ul = {
|
|
2079
2076
|
classic: "text-warning",
|
|
2080
2077
|
modern: "text-primary",
|
|
2081
2078
|
elegant: "text-foreground/60",
|
|
2082
2079
|
academic: "text-info",
|
|
2083
2080
|
minimal: "text-muted-foreground",
|
|
2084
2081
|
bold: "text-primary"
|
|
2085
|
-
},
|
|
2082
|
+
}, hl = {
|
|
2086
2083
|
classic: "uppercase tracking-[4px] text-base font-medium text-foreground/80 font-serif",
|
|
2087
2084
|
modern: "uppercase tracking-[3px] text-base font-medium text-primary/80",
|
|
2088
2085
|
elegant: "uppercase tracking-[5px] text-sm font-light text-foreground/50",
|
|
2089
2086
|
academic: "uppercase tracking-[3px] text-base font-semibold text-info/80",
|
|
2090
2087
|
minimal: "uppercase tracking-[2px] text-sm font-normal text-muted-foreground",
|
|
2091
2088
|
bold: "uppercase tracking-[3px] text-lg font-black text-primary"
|
|
2092
|
-
},
|
|
2089
|
+
}, fl = {
|
|
2093
2090
|
classic: "text-warning",
|
|
2094
2091
|
modern: "text-primary",
|
|
2095
2092
|
elegant: "text-foreground/80",
|
|
2096
2093
|
academic: "text-info",
|
|
2097
2094
|
minimal: "text-foreground",
|
|
2098
2095
|
bold: "text-primary"
|
|
2099
|
-
},
|
|
2096
|
+
}, pl = /* @__PURE__ */ new Set([
|
|
2100
2097
|
"classic",
|
|
2101
2098
|
"elegant",
|
|
2102
2099
|
"academic"
|
|
2103
|
-
]),
|
|
2100
|
+
]), gl = ht("mx-auto max-w-4xl", {
|
|
2104
2101
|
variants: {
|
|
2105
2102
|
variant: {
|
|
2106
2103
|
classic: "border-[3px] border-double border-warning/50 rounded-lg p-1.5",
|
|
@@ -2112,7 +2109,7 @@ const rl = {
|
|
|
2112
2109
|
}
|
|
2113
2110
|
},
|
|
2114
2111
|
defaultVariants: { variant: "classic" }
|
|
2115
|
-
}),
|
|
2112
|
+
}), xl = ht(
|
|
2116
2113
|
"relative text-center p-8 sm:p-12 md:p-16 overflow-hidden",
|
|
2117
2114
|
{
|
|
2118
2115
|
variants: {
|
|
@@ -2128,14 +2125,14 @@ const rl = {
|
|
|
2128
2125
|
defaultVariants: { variant: "classic" }
|
|
2129
2126
|
}
|
|
2130
2127
|
);
|
|
2131
|
-
function
|
|
2132
|
-
const a =
|
|
2133
|
-
return a ? /* @__PURE__ */ e(O, { children:
|
|
2128
|
+
function Nl({ variant: l }) {
|
|
2129
|
+
const a = cl[l];
|
|
2130
|
+
return a ? /* @__PURE__ */ e(O, { children: dl.map(({ key: i, pos: c, transform: p }) => {
|
|
2134
2131
|
var r;
|
|
2135
2132
|
return /* @__PURE__ */ t(
|
|
2136
2133
|
"svg",
|
|
2137
2134
|
{
|
|
2138
|
-
className: k("absolute pointer-events-none",
|
|
2135
|
+
className: k("absolute pointer-events-none", c, a.color),
|
|
2139
2136
|
width: a.size,
|
|
2140
2137
|
height: a.size,
|
|
2141
2138
|
viewBox: `0 0 ${a.size} ${a.size}`,
|
|
@@ -2166,7 +2163,7 @@ function Oe({
|
|
|
2166
2163
|
variant: l,
|
|
2167
2164
|
className: a
|
|
2168
2165
|
}) {
|
|
2169
|
-
const i =
|
|
2166
|
+
const i = ol[l];
|
|
2170
2167
|
return /* @__PURE__ */ t(
|
|
2171
2168
|
"div",
|
|
2172
2169
|
{
|
|
@@ -2188,7 +2185,7 @@ function jl({
|
|
|
2188
2185
|
recipientName: l,
|
|
2189
2186
|
courseTitle: a,
|
|
2190
2187
|
completionDate: i,
|
|
2191
|
-
organizationName:
|
|
2188
|
+
organizationName: c,
|
|
2192
2189
|
organizationLogo: p,
|
|
2193
2190
|
signatory: r,
|
|
2194
2191
|
certificateId: m,
|
|
@@ -2199,10 +2196,10 @@ function jl({
|
|
|
2199
2196
|
isLoading: w,
|
|
2200
2197
|
error: N,
|
|
2201
2198
|
onRetry: C,
|
|
2202
|
-
className:
|
|
2203
|
-
style:
|
|
2199
|
+
className: z,
|
|
2200
|
+
style: d
|
|
2204
2201
|
}) {
|
|
2205
|
-
const
|
|
2202
|
+
const S = j(() => {
|
|
2206
2203
|
try {
|
|
2207
2204
|
return new Date(i).toLocaleDateString("en-US", {
|
|
2208
2205
|
year: "numeric",
|
|
@@ -2216,19 +2213,19 @@ function jl({
|
|
|
2216
2213
|
function U() {
|
|
2217
2214
|
b ? b() : window.print();
|
|
2218
2215
|
}
|
|
2219
|
-
const u =
|
|
2216
|
+
const u = ml[s];
|
|
2220
2217
|
return /* @__PURE__ */ e(
|
|
2221
2218
|
te,
|
|
2222
2219
|
{
|
|
2223
2220
|
isLoading: w,
|
|
2224
2221
|
error: N,
|
|
2225
2222
|
onRetry: C,
|
|
2226
|
-
className:
|
|
2227
|
-
style:
|
|
2223
|
+
className: z,
|
|
2224
|
+
style: d,
|
|
2228
2225
|
skeleton: /* @__PURE__ */ e(f, { className: "h-80 w-full rounded-lg border" }),
|
|
2229
|
-
children: /* @__PURE__ */ t("div", { className:
|
|
2230
|
-
/* @__PURE__ */ e("div", { className:
|
|
2231
|
-
/* @__PURE__ */ e(
|
|
2226
|
+
children: /* @__PURE__ */ t("div", { className: z, style: d, children: [
|
|
2227
|
+
/* @__PURE__ */ e("div", { className: gl({ variant: s }), children: /* @__PURE__ */ t("div", { className: xl({ variant: s }), children: [
|
|
2228
|
+
/* @__PURE__ */ e(Nl, { variant: s }),
|
|
2232
2229
|
u && /* @__PURE__ */ e(
|
|
2233
2230
|
"div",
|
|
2234
2231
|
{
|
|
@@ -2242,17 +2239,17 @@ function jl({
|
|
|
2242
2239
|
"img",
|
|
2243
2240
|
{
|
|
2244
2241
|
src: p,
|
|
2245
|
-
alt:
|
|
2242
|
+
alt: c,
|
|
2246
2243
|
className: "h-20 mb-4 mx-auto block"
|
|
2247
2244
|
}
|
|
2248
2245
|
) : /* @__PURE__ */ e(
|
|
2249
2246
|
Se,
|
|
2250
2247
|
{
|
|
2251
2248
|
size: 64,
|
|
2252
|
-
className: k("mx-auto mb-6",
|
|
2249
|
+
className: k("mx-auto mb-6", ul[s])
|
|
2253
2250
|
}
|
|
2254
2251
|
),
|
|
2255
|
-
/* @__PURE__ */ e("p", { className: k("mb-2",
|
|
2252
|
+
/* @__PURE__ */ e("p", { className: k("mb-2", hl[s]), children: "Certificate of Completion" }),
|
|
2256
2253
|
/* @__PURE__ */ e(Oe, { variant: s }),
|
|
2257
2254
|
/* @__PURE__ */ e("p", { className: "text-base text-foreground/70 mb-2", children: "This is to certify that" }),
|
|
2258
2255
|
/* @__PURE__ */ e(
|
|
@@ -2260,7 +2257,7 @@ function jl({
|
|
|
2260
2257
|
{
|
|
2261
2258
|
className: k(
|
|
2262
2259
|
"text-4xl font-bold mb-4 text-foreground",
|
|
2263
|
-
|
|
2260
|
+
pl.has(s) && "font-serif"
|
|
2264
2261
|
),
|
|
2265
2262
|
children: l
|
|
2266
2263
|
}
|
|
@@ -2271,16 +2268,16 @@ function jl({
|
|
|
2271
2268
|
{
|
|
2272
2269
|
className: k(
|
|
2273
2270
|
"text-2xl font-semibold mb-4",
|
|
2274
|
-
|
|
2271
|
+
fl[s]
|
|
2275
2272
|
),
|
|
2276
2273
|
children: a
|
|
2277
2274
|
}
|
|
2278
2275
|
),
|
|
2279
2276
|
/* @__PURE__ */ t("p", { className: "text-base text-foreground/60 mb-6", children: [
|
|
2280
2277
|
"Issued by ",
|
|
2281
|
-
|
|
2278
|
+
c,
|
|
2282
2279
|
" on ",
|
|
2283
|
-
|
|
2280
|
+
S
|
|
2284
2281
|
] }),
|
|
2285
2282
|
r && /* @__PURE__ */ t("div", { className: "mt-6 mb-4", children: [
|
|
2286
2283
|
/* @__PURE__ */ e(Oe, { variant: s }),
|
|
@@ -2299,7 +2296,7 @@ function jl({
|
|
|
2299
2296
|
" Print"
|
|
2300
2297
|
] }),
|
|
2301
2298
|
h && /* @__PURE__ */ t(D, { variant: "outline", onClick: h, children: [
|
|
2302
|
-
/* @__PURE__ */ e(
|
|
2299
|
+
/* @__PURE__ */ e(Ft, { size: 16 }),
|
|
2303
2300
|
" Download"
|
|
2304
2301
|
] })
|
|
2305
2302
|
] })
|
|
@@ -2307,11 +2304,11 @@ function jl({
|
|
|
2307
2304
|
}
|
|
2308
2305
|
);
|
|
2309
2306
|
}
|
|
2310
|
-
function
|
|
2307
|
+
function Ql({
|
|
2311
2308
|
criteria: l,
|
|
2312
2309
|
selectedLevels: a,
|
|
2313
2310
|
totalScore: i,
|
|
2314
|
-
maxScore:
|
|
2311
|
+
maxScore: c,
|
|
2315
2312
|
feedback: p,
|
|
2316
2313
|
isLoading: r,
|
|
2317
2314
|
error: m,
|
|
@@ -2333,17 +2330,17 @@ function Bl({
|
|
|
2333
2330
|
action: s ? /* @__PURE__ */ e(D, { variant: "outline", onClick: s, children: "Retry" }) : void 0
|
|
2334
2331
|
}
|
|
2335
2332
|
) }) : /* @__PURE__ */ t("div", { className: k("flex flex-col gap-4", v), style: b, children: [
|
|
2336
|
-
h && i !== void 0 &&
|
|
2333
|
+
h && i !== void 0 && c !== void 0 && /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
2337
2334
|
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground", children: "Rubric" }),
|
|
2338
|
-
/* @__PURE__ */ t(X, { variant: i >=
|
|
2335
|
+
/* @__PURE__ */ t(X, { variant: i >= c * 0.7 ? "success" : "destructive", children: [
|
|
2339
2336
|
i,
|
|
2340
2337
|
" / ",
|
|
2341
|
-
|
|
2338
|
+
c,
|
|
2342
2339
|
" pts"
|
|
2343
2340
|
] })
|
|
2344
2341
|
] }),
|
|
2345
2342
|
!h && /* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground", children: "Grading Rubric" }),
|
|
2346
|
-
/* @__PURE__ */ e(
|
|
2343
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(_, { className: "p-0", children: /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ t(rt, { className: "text-sm", children: [
|
|
2347
2344
|
/* @__PURE__ */ e(ct, { children: /* @__PURE__ */ t(de, { className: "bg-muted/50", children: [
|
|
2348
2345
|
/* @__PURE__ */ e(Ne, { className: "text-left font-medium text-muted-foreground w-1/5", children: "Criterion" }),
|
|
2349
2346
|
(w = l[0]) == null ? void 0 : w.levels.map((N) => /* @__PURE__ */ t(
|
|
@@ -2362,7 +2359,7 @@ function Bl({
|
|
|
2362
2359
|
))
|
|
2363
2360
|
] }) }),
|
|
2364
2361
|
/* @__PURE__ */ e(dt, { children: l.map((N, C) => {
|
|
2365
|
-
const
|
|
2362
|
+
const z = a == null ? void 0 : a[N.uid];
|
|
2366
2363
|
return /* @__PURE__ */ t(
|
|
2367
2364
|
de,
|
|
2368
2365
|
{
|
|
@@ -2372,21 +2369,21 @@ function Bl({
|
|
|
2372
2369
|
/* @__PURE__ */ e("div", { className: "font-medium text-foreground", children: N.name }),
|
|
2373
2370
|
N.description && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground mt-0.5", children: N.description })
|
|
2374
2371
|
] }),
|
|
2375
|
-
N.levels.map((
|
|
2376
|
-
const
|
|
2372
|
+
N.levels.map((d) => {
|
|
2373
|
+
const S = z === d.uid;
|
|
2377
2374
|
return /* @__PURE__ */ t(
|
|
2378
2375
|
le,
|
|
2379
2376
|
{
|
|
2380
2377
|
className: k(
|
|
2381
2378
|
"align-top text-center",
|
|
2382
|
-
|
|
2379
|
+
S && "bg-primary/10 ring-2 ring-primary/30 ring-inset rounded-sm"
|
|
2383
2380
|
),
|
|
2384
2381
|
children: [
|
|
2385
|
-
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children:
|
|
2386
|
-
|
|
2382
|
+
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: d.description }),
|
|
2383
|
+
S && /* @__PURE__ */ e("div", { className: "mt-1.5 flex justify-center", children: /* @__PURE__ */ e(me, { className: "size-4 text-primary" }) })
|
|
2387
2384
|
]
|
|
2388
2385
|
},
|
|
2389
|
-
|
|
2386
|
+
d.uid
|
|
2390
2387
|
);
|
|
2391
2388
|
})
|
|
2392
2389
|
]
|
|
@@ -2396,7 +2393,7 @@ function Bl({
|
|
|
2396
2393
|
}) })
|
|
2397
2394
|
] }) }) }) }),
|
|
2398
2395
|
p && /* @__PURE__ */ t(O, { children: [
|
|
2399
|
-
/* @__PURE__ */ e(
|
|
2396
|
+
/* @__PURE__ */ e(G, {}),
|
|
2400
2397
|
/* @__PURE__ */ t("div", { children: [
|
|
2401
2398
|
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground mb-1", children: "Instructor Feedback" }),
|
|
2402
2399
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground whitespace-pre-wrap", children: p })
|
|
@@ -2404,21 +2401,21 @@ function Bl({
|
|
|
2404
2401
|
] })
|
|
2405
2402
|
] });
|
|
2406
2403
|
}
|
|
2407
|
-
function
|
|
2404
|
+
function $l({
|
|
2408
2405
|
title: l,
|
|
2409
2406
|
requirements: a,
|
|
2410
2407
|
onRequirementClick: i,
|
|
2411
|
-
isLoading:
|
|
2408
|
+
isLoading: c,
|
|
2412
2409
|
error: p,
|
|
2413
2410
|
onRetry: r,
|
|
2414
2411
|
className: m,
|
|
2415
2412
|
style: s
|
|
2416
2413
|
}) {
|
|
2417
|
-
const v =
|
|
2414
|
+
const v = j(
|
|
2418
2415
|
() => a.filter((h) => h.completed).length,
|
|
2419
2416
|
[a]
|
|
2420
2417
|
), b = a.length > 0 ? Math.round(v / a.length * 100) : 0;
|
|
2421
|
-
return
|
|
2418
|
+
return c ? /* @__PURE__ */ t("div", { className: k("space-y-4", m), style: s, children: [
|
|
2422
2419
|
/* @__PURE__ */ e(f, { className: "h-6 w-48" }),
|
|
2423
2420
|
/* @__PURE__ */ e(f, { className: "h-2 w-full" }),
|
|
2424
2421
|
Array.from({ length: 4 }).map((h, w) => /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
@@ -2448,7 +2445,7 @@ function Ql({
|
|
|
2448
2445
|
"%"
|
|
2449
2446
|
] })
|
|
2450
2447
|
] }),
|
|
2451
|
-
/* @__PURE__ */ e(
|
|
2448
|
+
/* @__PURE__ */ e(fe, { value: b })
|
|
2452
2449
|
] }),
|
|
2453
2450
|
/* @__PURE__ */ e("ul", { className: "flex flex-col gap-1", children: a.map((h) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ t(
|
|
2454
2451
|
"button",
|
|
@@ -2463,7 +2460,7 @@ function Ql({
|
|
|
2463
2460
|
},
|
|
2464
2461
|
disabled: h.completed,
|
|
2465
2462
|
children: [
|
|
2466
|
-
h.completed ? /* @__PURE__ */ e(
|
|
2463
|
+
h.completed ? /* @__PURE__ */ e(me, { className: "size-5 text-success shrink-0 mt-0.5" }) : /* @__PURE__ */ e(Pt, { className: "size-5 text-muted-foreground shrink-0 mt-0.5" }),
|
|
2467
2464
|
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
2468
2465
|
/* @__PURE__ */ e(
|
|
2469
2466
|
"div",
|
|
@@ -2486,17 +2483,17 @@ function Ql({
|
|
|
2486
2483
|
) }, h.uid)) })
|
|
2487
2484
|
] });
|
|
2488
2485
|
}
|
|
2489
|
-
const
|
|
2486
|
+
const vl = {
|
|
2490
2487
|
newest: "Newest",
|
|
2491
2488
|
oldest: "Oldest",
|
|
2492
2489
|
most_replies: "Most Replies",
|
|
2493
2490
|
most_liked: "Most Liked"
|
|
2494
2491
|
};
|
|
2495
|
-
function
|
|
2492
|
+
function Vl({
|
|
2496
2493
|
title: l,
|
|
2497
2494
|
topics: a,
|
|
2498
2495
|
onTopicClick: i,
|
|
2499
|
-
onCreateTopic:
|
|
2496
|
+
onCreateTopic: c,
|
|
2500
2497
|
sortOrder: p = "newest",
|
|
2501
2498
|
onSortChange: r,
|
|
2502
2499
|
searchQuery: m = "",
|
|
@@ -2507,13 +2504,13 @@ function $l({
|
|
|
2507
2504
|
onRetry: w,
|
|
2508
2505
|
pageSize: N,
|
|
2509
2506
|
currentPage: C = 1,
|
|
2510
|
-
totalItems:
|
|
2511
|
-
onPageChange:
|
|
2512
|
-
className:
|
|
2507
|
+
totalItems: z,
|
|
2508
|
+
onPageChange: d,
|
|
2509
|
+
className: S,
|
|
2513
2510
|
style: U
|
|
2514
2511
|
}) {
|
|
2515
|
-
const [u, M] = F(!1), [x, A] = F(""), [
|
|
2516
|
-
function
|
|
2512
|
+
const [u, M] = F(!1), [x, A] = F(""), [o, y] = F(""), [L, T] = F(m), [n, g] = F(p), R = s !== void 0 ? m : L, P = r !== void 0 ? p : n;
|
|
2513
|
+
function Z(I) {
|
|
2517
2514
|
s ? s(I) : T(I);
|
|
2518
2515
|
}
|
|
2519
2516
|
function V() {
|
|
@@ -2522,42 +2519,42 @@ function $l({
|
|
|
2522
2519
|
"oldest",
|
|
2523
2520
|
"most_replies",
|
|
2524
2521
|
"most_liked"
|
|
2525
|
-
],
|
|
2522
|
+
], B = I.indexOf(P), Q = I[(B + 1) % I.length];
|
|
2526
2523
|
r ? r(Q) : g(Q);
|
|
2527
2524
|
}
|
|
2528
|
-
function
|
|
2529
|
-
!x.trim() || ve(
|
|
2525
|
+
function H() {
|
|
2526
|
+
!x.trim() || ve(o) || (c == null || c(x.trim(), o), A(""), y(""), M(!1));
|
|
2530
2527
|
}
|
|
2531
|
-
const K =
|
|
2528
|
+
const K = j(() => [...a.filter((B) => {
|
|
2532
2529
|
var W;
|
|
2533
2530
|
if (!R) return !0;
|
|
2534
2531
|
const Q = R.toLowerCase();
|
|
2535
|
-
return
|
|
2536
|
-
})].sort((
|
|
2537
|
-
if (
|
|
2538
|
-
if (!
|
|
2532
|
+
return B.title.toLowerCase().includes(Q) || ((W = B.preview) == null ? void 0 : W.toLowerCase().includes(Q)) || B.author.displayName.toLowerCase().includes(Q);
|
|
2533
|
+
})].sort((B, Q) => {
|
|
2534
|
+
if (B.isPinned && !Q.isPinned) return -1;
|
|
2535
|
+
if (!B.isPinned && Q.isPinned) return 1;
|
|
2539
2536
|
switch (P) {
|
|
2540
2537
|
case "oldest":
|
|
2541
|
-
return new Date(
|
|
2538
|
+
return new Date(B.createdAt).getTime() - new Date(Q.createdAt).getTime();
|
|
2542
2539
|
case "most_replies":
|
|
2543
|
-
return Q.replyCount -
|
|
2540
|
+
return Q.replyCount - B.replyCount;
|
|
2544
2541
|
case "most_liked":
|
|
2545
|
-
return Q.likeCount -
|
|
2542
|
+
return Q.likeCount - B.likeCount;
|
|
2546
2543
|
case "newest":
|
|
2547
2544
|
default:
|
|
2548
|
-
return new Date(Q.createdAt).getTime() - new Date(
|
|
2545
|
+
return new Date(Q.createdAt).getTime() - new Date(B.createdAt).getTime();
|
|
2549
2546
|
}
|
|
2550
2547
|
}), [a, R, P]);
|
|
2551
|
-
return b ? /* @__PURE__ */ t("div", { className: k("space-y-4",
|
|
2548
|
+
return b ? /* @__PURE__ */ t("div", { className: k("space-y-4", S), style: U, children: [
|
|
2552
2549
|
/* @__PURE__ */ e(f, { className: "h-9 w-full" }),
|
|
2553
|
-
Array.from({ length: 4 }).map((I,
|
|
2550
|
+
Array.from({ length: 4 }).map((I, B) => /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
2554
2551
|
/* @__PURE__ */ e(f, { className: "h-8 w-8 rounded-full" }),
|
|
2555
2552
|
/* @__PURE__ */ t("div", { className: "flex-1 space-y-2", children: [
|
|
2556
2553
|
/* @__PURE__ */ e(f, { className: "h-5 w-64" }),
|
|
2557
2554
|
/* @__PURE__ */ e(f, { className: "h-4 w-32" })
|
|
2558
2555
|
] })
|
|
2559
|
-
] },
|
|
2560
|
-
] }) : h ? /* @__PURE__ */ e("div", { className: k("py-12",
|
|
2556
|
+
] }, B))
|
|
2557
|
+
] }) : h ? /* @__PURE__ */ e("div", { className: k("py-12", S), style: U, children: /* @__PURE__ */ e(
|
|
2561
2558
|
$,
|
|
2562
2559
|
{
|
|
2563
2560
|
icon: /* @__PURE__ */ e(q, { className: "size-10 text-destructive" }),
|
|
@@ -2565,23 +2562,23 @@ function $l({
|
|
|
2565
2562
|
description: h,
|
|
2566
2563
|
action: w ? /* @__PURE__ */ e(D, { variant: "outline", onClick: w, children: "Retry" }) : void 0
|
|
2567
2564
|
}
|
|
2568
|
-
) }) : /* @__PURE__ */ t("div", { className: k("flex flex-col gap-4",
|
|
2565
|
+
) }) : /* @__PURE__ */ t("div", { className: k("flex flex-col gap-4", S), style: U, children: [
|
|
2569
2566
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between gap-4", children: [
|
|
2570
2567
|
l && /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: l }),
|
|
2571
|
-
!v &&
|
|
2568
|
+
!v && c && /* @__PURE__ */ t(
|
|
2572
2569
|
D,
|
|
2573
2570
|
{
|
|
2574
2571
|
size: "sm",
|
|
2575
2572
|
onClick: () => M(!u),
|
|
2576
2573
|
children: [
|
|
2577
|
-
/* @__PURE__ */ e(
|
|
2574
|
+
/* @__PURE__ */ e(Et, { className: "size-4 mr-1.5" }),
|
|
2578
2575
|
"New Topic"
|
|
2579
2576
|
]
|
|
2580
2577
|
}
|
|
2581
2578
|
)
|
|
2582
2579
|
] }),
|
|
2583
|
-
/* @__PURE__ */ e(
|
|
2584
|
-
u && /* @__PURE__ */ e(
|
|
2580
|
+
/* @__PURE__ */ e(G, {}),
|
|
2581
|
+
u && /* @__PURE__ */ e(E, { children: /* @__PURE__ */ t(_, { className: "pt-4 space-y-3", children: [
|
|
2585
2582
|
/* @__PURE__ */ e(
|
|
2586
2583
|
Ae,
|
|
2587
2584
|
{
|
|
@@ -2591,10 +2588,10 @@ function $l({
|
|
|
2591
2588
|
}
|
|
2592
2589
|
),
|
|
2593
2590
|
/* @__PURE__ */ e(
|
|
2594
|
-
|
|
2591
|
+
ue,
|
|
2595
2592
|
{
|
|
2596
2593
|
placeholder: "What would you like to discuss?",
|
|
2597
|
-
value:
|
|
2594
|
+
value: o,
|
|
2598
2595
|
onChange: (I) => y(I),
|
|
2599
2596
|
variant: "minimal"
|
|
2600
2597
|
}
|
|
@@ -2615,8 +2612,8 @@ function $l({
|
|
|
2615
2612
|
D,
|
|
2616
2613
|
{
|
|
2617
2614
|
size: "sm",
|
|
2618
|
-
onClick:
|
|
2619
|
-
disabled: !x.trim() || ve(
|
|
2615
|
+
onClick: H,
|
|
2616
|
+
disabled: !x.trim() || ve(o),
|
|
2620
2617
|
children: "Post Topic"
|
|
2621
2618
|
}
|
|
2622
2619
|
)
|
|
@@ -2627,13 +2624,13 @@ function $l({
|
|
|
2627
2624
|
ut,
|
|
2628
2625
|
{
|
|
2629
2626
|
value: R,
|
|
2630
|
-
onChange:
|
|
2627
|
+
onChange: Z,
|
|
2631
2628
|
placeholder: "Search topics..."
|
|
2632
2629
|
}
|
|
2633
2630
|
) }),
|
|
2634
2631
|
/* @__PURE__ */ t(D, { variant: "outline", size: "sm", onClick: V, children: [
|
|
2635
2632
|
/* @__PURE__ */ e(_t, { className: "size-3.5 mr-1.5" }),
|
|
2636
|
-
|
|
2633
|
+
vl[P]
|
|
2637
2634
|
] })
|
|
2638
2635
|
] }),
|
|
2639
2636
|
K.length === 0 ? /* @__PURE__ */ e(
|
|
@@ -2643,71 +2640,72 @@ function $l({
|
|
|
2643
2640
|
title: "No topics found",
|
|
2644
2641
|
description: R ? "Try a different search term." : "Be the first to start a discussion!"
|
|
2645
2642
|
}
|
|
2646
|
-
) : /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: (
|
|
2647
|
-
|
|
2643
|
+
) : /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: (d && N ? K.slice((C - 1) * N, C * N) : K).map((I) => /* @__PURE__ */ e(
|
|
2644
|
+
bl,
|
|
2648
2645
|
{
|
|
2649
2646
|
topic: I,
|
|
2650
|
-
onClick:
|
|
2647
|
+
onClick: i
|
|
2651
2648
|
},
|
|
2652
2649
|
I.uid
|
|
2653
2650
|
)) }),
|
|
2654
|
-
|
|
2651
|
+
d && N && K.length > 0 && /* @__PURE__ */ e(
|
|
2655
2652
|
we,
|
|
2656
2653
|
{
|
|
2657
2654
|
currentPage: C,
|
|
2658
|
-
totalPages: Math.ceil((
|
|
2659
|
-
onPageChange:
|
|
2655
|
+
totalPages: Math.ceil((z ?? K.length) / N),
|
|
2656
|
+
onPageChange: d,
|
|
2660
2657
|
className: "mt-4"
|
|
2661
2658
|
}
|
|
2662
2659
|
)
|
|
2663
2660
|
] });
|
|
2664
2661
|
}
|
|
2665
|
-
|
|
2666
|
-
topic:
|
|
2667
|
-
onClick:
|
|
2662
|
+
const bl = Lt(function({
|
|
2663
|
+
topic: a,
|
|
2664
|
+
onClick: i
|
|
2668
2665
|
}) {
|
|
2666
|
+
const c = Y(() => i(a.uid), [i, a.uid]);
|
|
2669
2667
|
return /* @__PURE__ */ e(
|
|
2670
2668
|
"button",
|
|
2671
2669
|
{
|
|
2672
2670
|
type: "button",
|
|
2673
2671
|
className: "w-full text-left",
|
|
2674
|
-
onClick:
|
|
2672
|
+
onClick: c,
|
|
2675
2673
|
children: /* @__PURE__ */ e(
|
|
2676
|
-
|
|
2674
|
+
E,
|
|
2677
2675
|
{
|
|
2678
2676
|
className: k(
|
|
2679
2677
|
"transition-colors hover:bg-muted/30",
|
|
2680
|
-
|
|
2678
|
+
a.isPinned && "border-l-2 border-l-warning"
|
|
2681
2679
|
),
|
|
2682
|
-
children: /* @__PURE__ */ e(
|
|
2680
|
+
children: /* @__PURE__ */ e(_, { className: "py-3 px-4", children: /* @__PURE__ */ t("div", { className: "flex items-start gap-3", children: [
|
|
2683
2681
|
/* @__PURE__ */ e(
|
|
2684
|
-
|
|
2682
|
+
he,
|
|
2685
2683
|
{
|
|
2686
|
-
displayName:
|
|
2687
|
-
avatarUrl:
|
|
2684
|
+
displayName: a.author.displayName,
|
|
2685
|
+
avatarUrl: a.author.avatarUrl,
|
|
2688
2686
|
size: "small"
|
|
2689
2687
|
}
|
|
2690
2688
|
),
|
|
2691
2689
|
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
2692
2690
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-0.5", children: [
|
|
2693
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-foreground text-sm truncate", children:
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
/* @__PURE__ */ e(
|
|
2691
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-foreground text-sm truncate", children: a.title }),
|
|
2692
|
+
a.isPinned && /* @__PURE__ */ e(Ze, { className: "size-3 text-warning shrink-0" }),
|
|
2693
|
+
a.isAnswered && /* @__PURE__ */ t(X, { variant: "success", className: "text-xs shrink-0", children: [
|
|
2694
|
+
/* @__PURE__ */ e(me, { className: "size-3 mr-0.5" }),
|
|
2697
2695
|
"Answered"
|
|
2698
2696
|
] })
|
|
2699
2697
|
] }),
|
|
2700
|
-
|
|
2698
|
+
a.preview && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-1", children: a.preview }),
|
|
2701
2699
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3 mt-1.5 text-xs text-muted-foreground", children: [
|
|
2702
|
-
/* @__PURE__ */ e("span", { children:
|
|
2703
|
-
/* @__PURE__ */ e("span", { children:
|
|
2700
|
+
/* @__PURE__ */ e("span", { children: a.author.displayName }),
|
|
2701
|
+
/* @__PURE__ */ e("span", { children: Ie(a.createdAt) }),
|
|
2704
2702
|
/* @__PURE__ */ t(X, { variant: "muted", className: "gap-0.5 text-xs px-1.5 py-0", children: [
|
|
2705
2703
|
/* @__PURE__ */ e(Te, { className: "size-3" }),
|
|
2706
|
-
|
|
2704
|
+
a.replyCount
|
|
2707
2705
|
] }),
|
|
2708
2706
|
/* @__PURE__ */ t(X, { variant: "muted", className: "gap-0.5 text-xs px-1.5 py-0", children: [
|
|
2709
2707
|
/* @__PURE__ */ e(Je, { className: "size-3" }),
|
|
2710
|
-
|
|
2708
|
+
a.likeCount
|
|
2711
2709
|
] })
|
|
2712
2710
|
] })
|
|
2713
2711
|
] })
|
|
@@ -2716,12 +2714,12 @@ function vl({
|
|
|
2716
2714
|
)
|
|
2717
2715
|
}
|
|
2718
2716
|
);
|
|
2719
|
-
}
|
|
2720
|
-
function
|
|
2717
|
+
});
|
|
2718
|
+
function Gl({
|
|
2721
2719
|
course: l,
|
|
2722
2720
|
prerequisites: a,
|
|
2723
2721
|
onEnroll: i,
|
|
2724
|
-
onCancel:
|
|
2722
|
+
onCancel: c,
|
|
2725
2723
|
enrollLabel: p = "Enroll Now",
|
|
2726
2724
|
isEnrolling: r = !1,
|
|
2727
2725
|
isLoading: m,
|
|
@@ -2730,7 +2728,7 @@ function Vl({
|
|
|
2730
2728
|
className: b,
|
|
2731
2729
|
style: h
|
|
2732
2730
|
}) {
|
|
2733
|
-
const w = Array.isArray(a) && a.length > 0, [N, C] = F("details"),
|
|
2731
|
+
const w = Array.isArray(a) && a.length > 0, [N, C] = F("details"), z = j(
|
|
2734
2732
|
() => w ? [
|
|
2735
2733
|
{ key: "details", label: "Course Details" },
|
|
2736
2734
|
{ key: "prerequisites", label: "Prerequisites" },
|
|
@@ -2757,17 +2755,17 @@ function Vl({
|
|
|
2757
2755
|
action: v ? /* @__PURE__ */ e(D, { variant: "outline", onClick: v, children: "Retry" }) : void 0
|
|
2758
2756
|
}
|
|
2759
2757
|
) });
|
|
2760
|
-
const
|
|
2758
|
+
const d = z.findIndex((o) => o.key === N), S = !w || a.every((o) => o.isMet);
|
|
2761
2759
|
function U() {
|
|
2762
|
-
const
|
|
2763
|
-
|
|
2760
|
+
const o = d + 1;
|
|
2761
|
+
o < z.length && C(z[o].key);
|
|
2764
2762
|
}
|
|
2765
2763
|
function u() {
|
|
2766
|
-
const
|
|
2767
|
-
|
|
2764
|
+
const o = d - 1;
|
|
2765
|
+
o >= 0 && C(z[o].key);
|
|
2768
2766
|
}
|
|
2769
2767
|
function M() {
|
|
2770
|
-
return /* @__PURE__ */ e(
|
|
2768
|
+
return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ t(_, { className: "pt-6", children: [
|
|
2771
2769
|
l.thumbnailUrl ? /* @__PURE__ */ e(
|
|
2772
2770
|
"img",
|
|
2773
2771
|
{
|
|
@@ -2775,13 +2773,13 @@ function Vl({
|
|
|
2775
2773
|
alt: l.title,
|
|
2776
2774
|
className: "w-full h-48 object-cover rounded-lg mb-4"
|
|
2777
2775
|
}
|
|
2778
|
-
) : /* @__PURE__ */ e("div", { className: "w-full h-48 rounded-lg mb-4 bg-muted flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
2776
|
+
) : /* @__PURE__ */ e("div", { className: "w-full h-48 rounded-lg mb-4 bg-muted flex items-center justify-center", children: /* @__PURE__ */ e(oe, { className: "size-12 text-muted-foreground" }) }),
|
|
2779
2777
|
/* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-1", children: l.title }),
|
|
2780
2778
|
l.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mb-3", children: l.description }),
|
|
2781
2779
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
2782
2780
|
l.instructor && /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
2783
2781
|
/* @__PURE__ */ e(
|
|
2784
|
-
|
|
2782
|
+
he,
|
|
2785
2783
|
{
|
|
2786
2784
|
displayName: l.instructor.displayName,
|
|
2787
2785
|
avatarUrl: l.instructor.avatarUrl,
|
|
@@ -2796,45 +2794,45 @@ function Vl({
|
|
|
2796
2794
|
] })
|
|
2797
2795
|
] }),
|
|
2798
2796
|
l.syllabus && l.syllabus.length > 0 && /* @__PURE__ */ t(O, { children: [
|
|
2799
|
-
/* @__PURE__ */ e(
|
|
2797
|
+
/* @__PURE__ */ e(G, { className: "my-3" }),
|
|
2800
2798
|
/* @__PURE__ */ e("div", { className: "mb-1 text-sm font-semibold text-foreground", children: "Syllabus" }),
|
|
2801
|
-
/* @__PURE__ */ e("ul", { className: "list-disc list-inside space-y-1", children: l.syllabus.map((
|
|
2799
|
+
/* @__PURE__ */ e("ul", { className: "list-disc list-inside space-y-1", children: l.syllabus.map((o, y) => /* @__PURE__ */ e("li", { className: "text-sm text-muted-foreground", children: o }, y)) })
|
|
2802
2800
|
] }),
|
|
2803
|
-
/* @__PURE__ */ e(
|
|
2801
|
+
/* @__PURE__ */ e(G, { className: "my-4" }),
|
|
2804
2802
|
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2", children: [
|
|
2805
|
-
|
|
2803
|
+
c && /* @__PURE__ */ e(D, { variant: "outline", onClick: c, children: "Cancel" }),
|
|
2806
2804
|
/* @__PURE__ */ e(D, { onClick: U, children: "Continue" })
|
|
2807
2805
|
] })
|
|
2808
2806
|
] }) });
|
|
2809
2807
|
}
|
|
2810
2808
|
function x() {
|
|
2811
|
-
return /* @__PURE__ */ e(
|
|
2809
|
+
return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ t(_, { className: "pt-6", children: [
|
|
2812
2810
|
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground mb-3", children: "Prerequisites" }),
|
|
2813
|
-
/* @__PURE__ */ e("ul", { className: "space-y-3", children: a.map((
|
|
2814
|
-
|
|
2811
|
+
/* @__PURE__ */ e("ul", { className: "space-y-3", children: a.map((o) => /* @__PURE__ */ t("li", { className: "flex items-start gap-2", children: [
|
|
2812
|
+
o.isMet ? /* @__PURE__ */ e(me, { className: "size-4 text-success shrink-0 mt-0.5" }) : /* @__PURE__ */ e($e, { className: "size-4 text-destructive shrink-0 mt-0.5" }),
|
|
2815
2813
|
/* @__PURE__ */ t("div", { children: [
|
|
2816
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children:
|
|
2817
|
-
|
|
2814
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: o.label }),
|
|
2815
|
+
o.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-0.5", children: o.description })
|
|
2818
2816
|
] })
|
|
2819
|
-
] },
|
|
2820
|
-
/* @__PURE__ */ e(
|
|
2817
|
+
] }, o.uid)) }),
|
|
2818
|
+
/* @__PURE__ */ e(G, { className: "my-4" }),
|
|
2821
2819
|
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2", children: [
|
|
2822
2820
|
/* @__PURE__ */ e(D, { variant: "outline", onClick: u, children: "Back" }),
|
|
2823
|
-
/* @__PURE__ */ e(D, { onClick: U, disabled: !
|
|
2821
|
+
/* @__PURE__ */ e(D, { onClick: U, disabled: !S, children: "Continue" })
|
|
2824
2822
|
] })
|
|
2825
2823
|
] }) });
|
|
2826
2824
|
}
|
|
2827
2825
|
function A() {
|
|
2828
|
-
return /* @__PURE__ */ e(
|
|
2826
|
+
return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ t(_, { className: "pt-6", children: [
|
|
2829
2827
|
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground mb-3", children: "Confirm Enrollment" }),
|
|
2830
2828
|
/* @__PURE__ */ t("div", { className: "space-y-2 mb-3", children: [
|
|
2831
2829
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
2832
|
-
/* @__PURE__ */ e(
|
|
2830
|
+
/* @__PURE__ */ e(oe, { className: "size-4 text-muted-foreground" }),
|
|
2833
2831
|
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: l.title })
|
|
2834
2832
|
] }),
|
|
2835
2833
|
l.instructor && /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
2836
2834
|
/* @__PURE__ */ e(
|
|
2837
|
-
|
|
2835
|
+
he,
|
|
2838
2836
|
{
|
|
2839
2837
|
displayName: l.instructor.displayName,
|
|
2840
2838
|
avatarUrl: l.instructor.avatarUrl,
|
|
@@ -2848,14 +2846,14 @@ function Vl({
|
|
|
2848
2846
|
/* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: l.duration })
|
|
2849
2847
|
] })
|
|
2850
2848
|
] }),
|
|
2851
|
-
w && /* @__PURE__ */ e("div", { className: "mb-3", children:
|
|
2852
|
-
/* @__PURE__ */ e(
|
|
2849
|
+
w && /* @__PURE__ */ e("div", { className: "mb-3", children: S ? /* @__PURE__ */ t(X, { variant: "success", children: [
|
|
2850
|
+
/* @__PURE__ */ e(me, { className: "size-3 mr-1" }),
|
|
2853
2851
|
"All prerequisites met"
|
|
2854
2852
|
] }) : /* @__PURE__ */ t(X, { variant: "warning", children: [
|
|
2855
2853
|
/* @__PURE__ */ e($e, { className: "size-3 mr-1" }),
|
|
2856
2854
|
"Some prerequisites not met"
|
|
2857
2855
|
] }) }),
|
|
2858
|
-
/* @__PURE__ */ e(
|
|
2856
|
+
/* @__PURE__ */ e(G, { className: "my-4" }),
|
|
2859
2857
|
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2", children: [
|
|
2860
2858
|
/* @__PURE__ */ e(D, { variant: "outline", onClick: u, children: "Back" }),
|
|
2861
2859
|
/* @__PURE__ */ t(
|
|
@@ -2864,7 +2862,7 @@ function Vl({
|
|
|
2864
2862
|
onClick: () => i(l.uid),
|
|
2865
2863
|
disabled: r,
|
|
2866
2864
|
children: [
|
|
2867
|
-
r && /* @__PURE__ */ e(
|
|
2865
|
+
r && /* @__PURE__ */ e(Bt, { className: "size-4 mr-1 animate-spin" }),
|
|
2868
2866
|
p
|
|
2869
2867
|
]
|
|
2870
2868
|
}
|
|
@@ -2874,10 +2872,10 @@ function Vl({
|
|
|
2874
2872
|
}
|
|
2875
2873
|
return /* @__PURE__ */ t("div", { className: b, style: h, children: [
|
|
2876
2874
|
/* @__PURE__ */ e(
|
|
2877
|
-
|
|
2875
|
+
ll,
|
|
2878
2876
|
{
|
|
2879
|
-
steps:
|
|
2880
|
-
currentStep:
|
|
2877
|
+
steps: z.map((o) => ({ label: o.label })),
|
|
2878
|
+
currentStep: d,
|
|
2881
2879
|
className: "mb-6"
|
|
2882
2880
|
}
|
|
2883
2881
|
),
|
|
@@ -2890,7 +2888,7 @@ function Hl({
|
|
|
2890
2888
|
courses: l = [],
|
|
2891
2889
|
categories: a,
|
|
2892
2890
|
onCourseClick: i,
|
|
2893
|
-
onEnroll:
|
|
2891
|
+
onEnroll: c,
|
|
2894
2892
|
viewMode: p = "grid",
|
|
2895
2893
|
allowViewToggle: r = !0,
|
|
2896
2894
|
showSearch: m = !0,
|
|
@@ -2901,31 +2899,31 @@ function Hl({
|
|
|
2901
2899
|
onRetry: w,
|
|
2902
2900
|
pageSize: N,
|
|
2903
2901
|
currentPage: C = 1,
|
|
2904
|
-
totalItems:
|
|
2905
|
-
onPageChange:
|
|
2906
|
-
className:
|
|
2902
|
+
totalItems: z,
|
|
2903
|
+
onPageChange: d,
|
|
2904
|
+
className: S,
|
|
2907
2905
|
style: U
|
|
2908
2906
|
}) {
|
|
2909
|
-
const [u, M] = F(""), [x, A] = F(null), [
|
|
2907
|
+
const [u, M] = F(""), [x, A] = F(null), [o, y] = F(p), L = j(() => {
|
|
2910
2908
|
let n = l;
|
|
2911
2909
|
if (x && (n = n.filter((g) => g.categoryUid === x)), u.trim()) {
|
|
2912
2910
|
const g = u.toLowerCase();
|
|
2913
2911
|
n = n.filter(
|
|
2914
2912
|
(R) => {
|
|
2915
|
-
var P,
|
|
2916
|
-
return R.title.toLowerCase().includes(g) || ((P = R.description) == null ? void 0 : P.toLowerCase().includes(g)) || ((
|
|
2913
|
+
var P, Z;
|
|
2914
|
+
return R.title.toLowerCase().includes(g) || ((P = R.description) == null ? void 0 : P.toLowerCase().includes(g)) || ((Z = R.instructor) == null ? void 0 : Z.displayName.toLowerCase().includes(g));
|
|
2917
2915
|
}
|
|
2918
2916
|
);
|
|
2919
2917
|
}
|
|
2920
2918
|
return n;
|
|
2921
2919
|
}, [l, x, u]);
|
|
2922
2920
|
if (b)
|
|
2923
|
-
return /* @__PURE__ */ t("div", { className: k("space-y-4",
|
|
2921
|
+
return /* @__PURE__ */ t("div", { className: k("space-y-4", S), style: U, children: [
|
|
2924
2922
|
/* @__PURE__ */ e(f, { className: "h-9 w-full" }),
|
|
2925
2923
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", children: Array.from({ length: 6 }).map((n, g) => /* @__PURE__ */ e(f, { className: "h-64 w-full rounded-lg" }, g)) })
|
|
2926
2924
|
] });
|
|
2927
2925
|
if (h)
|
|
2928
|
-
return /* @__PURE__ */ e("div", { className: k("py-12",
|
|
2926
|
+
return /* @__PURE__ */ e("div", { className: k("py-12", S), style: U, children: /* @__PURE__ */ e(
|
|
2929
2927
|
$,
|
|
2930
2928
|
{
|
|
2931
2929
|
icon: /* @__PURE__ */ e(q, { className: "size-10 text-destructive" }),
|
|
@@ -2934,8 +2932,8 @@ function Hl({
|
|
|
2934
2932
|
action: w ? /* @__PURE__ */ e(D, { variant: "outline", onClick: w, children: "Retry" }) : void 0
|
|
2935
2933
|
}
|
|
2936
2934
|
) });
|
|
2937
|
-
const T =
|
|
2938
|
-
return /* @__PURE__ */ t("div", { className:
|
|
2935
|
+
const T = d && N ? L.slice((C - 1) * N, C * N) : L;
|
|
2936
|
+
return /* @__PURE__ */ t("div", { className: S, style: U, children: [
|
|
2939
2937
|
/* @__PURE__ */ t("div", { className: "flex gap-2 items-center mb-2", children: [
|
|
2940
2938
|
m && /* @__PURE__ */ e("div", { className: "flex-1 max-w-80", children: /* @__PURE__ */ e(
|
|
2941
2939
|
ut,
|
|
@@ -2954,7 +2952,7 @@ function Hl({
|
|
|
2954
2952
|
variant: "ghost",
|
|
2955
2953
|
size: "icon-xs",
|
|
2956
2954
|
"aria-label": "Grid view",
|
|
2957
|
-
className: k(
|
|
2955
|
+
className: k(o === "grid" && "text-primary"),
|
|
2958
2956
|
onClick: () => y("grid"),
|
|
2959
2957
|
children: /* @__PURE__ */ e(jt, { size: 18 })
|
|
2960
2958
|
}
|
|
@@ -2968,9 +2966,9 @@ function Hl({
|
|
|
2968
2966
|
variant: "ghost",
|
|
2969
2967
|
size: "icon-xs",
|
|
2970
2968
|
"aria-label": "List view",
|
|
2971
|
-
className: k(
|
|
2969
|
+
className: k(o === "list" && "text-primary"),
|
|
2972
2970
|
onClick: () => y("list"),
|
|
2973
|
-
children: /* @__PURE__ */ e(
|
|
2971
|
+
children: /* @__PURE__ */ e(Qt, { size: 18 })
|
|
2974
2972
|
}
|
|
2975
2973
|
) }),
|
|
2976
2974
|
/* @__PURE__ */ e(re, { children: "List view" })
|
|
@@ -2996,7 +2994,7 @@ function Hl({
|
|
|
2996
2994
|
title: s,
|
|
2997
2995
|
description: "Try adjusting your search or filter."
|
|
2998
2996
|
}
|
|
2999
|
-
) :
|
|
2997
|
+
) : o === "grid" ? /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", children: T.map((n) => /* @__PURE__ */ e(
|
|
3000
2998
|
We,
|
|
3001
2999
|
{
|
|
3002
3000
|
uid: n.uid,
|
|
@@ -3010,7 +3008,7 @@ function Hl({
|
|
|
3010
3008
|
duration: n.duration,
|
|
3011
3009
|
layout: "vertical",
|
|
3012
3010
|
onClick: v ? void 0 : () => i(n),
|
|
3013
|
-
onEnroll:
|
|
3011
|
+
onEnroll: c && !v ? () => c(n) : void 0,
|
|
3014
3012
|
className: k(v && "opacity-70")
|
|
3015
3013
|
},
|
|
3016
3014
|
n.uid
|
|
@@ -3028,27 +3026,27 @@ function Hl({
|
|
|
3028
3026
|
duration: n.duration,
|
|
3029
3027
|
layout: "horizontal",
|
|
3030
3028
|
onClick: v ? void 0 : () => i(n),
|
|
3031
|
-
onEnroll:
|
|
3029
|
+
onEnroll: c && !v ? () => c(n) : void 0,
|
|
3032
3030
|
className: k(v && "opacity-70")
|
|
3033
3031
|
},
|
|
3034
3032
|
n.uid
|
|
3035
3033
|
)) }),
|
|
3036
|
-
|
|
3034
|
+
d && N && L.length > 0 && /* @__PURE__ */ e(
|
|
3037
3035
|
we,
|
|
3038
3036
|
{
|
|
3039
3037
|
currentPage: C,
|
|
3040
|
-
totalPages: Math.ceil((
|
|
3041
|
-
onPageChange:
|
|
3038
|
+
totalPages: Math.ceil((z ?? L.length) / N),
|
|
3039
|
+
onPageChange: d,
|
|
3042
3040
|
className: "mt-4"
|
|
3043
3041
|
}
|
|
3044
3042
|
)
|
|
3045
3043
|
] });
|
|
3046
3044
|
}
|
|
3047
|
-
function
|
|
3045
|
+
function Wl({
|
|
3048
3046
|
student: l,
|
|
3049
3047
|
enrolledCourses: a = [],
|
|
3050
3048
|
achievements: i = [],
|
|
3051
|
-
certificates:
|
|
3049
|
+
certificates: c = [],
|
|
3052
3050
|
stats: p,
|
|
3053
3051
|
showCourses: r = !0,
|
|
3054
3052
|
showAchievements: m = !0,
|
|
@@ -3059,20 +3057,20 @@ function Gl({
|
|
|
3059
3057
|
error: w,
|
|
3060
3058
|
onRetry: N,
|
|
3061
3059
|
className: C,
|
|
3062
|
-
style:
|
|
3060
|
+
style: z
|
|
3063
3061
|
}) {
|
|
3064
|
-
const
|
|
3062
|
+
const d = a.filter((u) => u.progress >= 100), S = [
|
|
3065
3063
|
{
|
|
3066
3064
|
label: "Enrolled",
|
|
3067
3065
|
value: String(a.length),
|
|
3068
|
-
icon: /* @__PURE__ */ e(
|
|
3066
|
+
icon: /* @__PURE__ */ e(oe, { size: 24 })
|
|
3069
3067
|
},
|
|
3070
3068
|
{
|
|
3071
3069
|
label: "Completed",
|
|
3072
|
-
value: String(
|
|
3070
|
+
value: String(d.length),
|
|
3073
3071
|
icon: /* @__PURE__ */ e(ze, { size: 24 })
|
|
3074
3072
|
}
|
|
3075
|
-
], U = p ??
|
|
3073
|
+
], U = p ?? S;
|
|
3076
3074
|
return /* @__PURE__ */ e(
|
|
3077
3075
|
te,
|
|
3078
3076
|
{
|
|
@@ -3080,9 +3078,9 @@ function Gl({
|
|
|
3080
3078
|
error: w,
|
|
3081
3079
|
onRetry: N,
|
|
3082
3080
|
className: C,
|
|
3083
|
-
style:
|
|
3081
|
+
style: z,
|
|
3084
3082
|
skeleton: /* @__PURE__ */ t(O, { children: [
|
|
3085
|
-
/* @__PURE__ */ e(
|
|
3083
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ t(_, { className: "p-4 flex items-center gap-4", children: [
|
|
3086
3084
|
/* @__PURE__ */ e(f, { className: "size-12 rounded-full" }),
|
|
3087
3085
|
/* @__PURE__ */ t("div", { className: "flex-1 space-y-2", children: [
|
|
3088
3086
|
/* @__PURE__ */ e(f, { className: "h-5 w-40" }),
|
|
@@ -3099,10 +3097,10 @@ function Gl({
|
|
|
3099
3097
|
/* @__PURE__ */ e(f, { className: "h-8 w-full" }),
|
|
3100
3098
|
/* @__PURE__ */ e(f, { className: "h-8 w-full" })
|
|
3101
3099
|
] }),
|
|
3102
|
-
children: /* @__PURE__ */ t("div", { className: k("space-y-4", C), style:
|
|
3103
|
-
/* @__PURE__ */ e(
|
|
3100
|
+
children: /* @__PURE__ */ t("div", { className: k("space-y-4", C), style: z, children: [
|
|
3101
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ t(_, { className: "p-4 flex items-start gap-4", children: [
|
|
3104
3102
|
/* @__PURE__ */ e(
|
|
3105
|
-
|
|
3103
|
+
he,
|
|
3106
3104
|
{
|
|
3107
3105
|
displayName: l.displayName,
|
|
3108
3106
|
avatarUrl: l.avatarUrl,
|
|
@@ -3117,7 +3115,7 @@ function Gl({
|
|
|
3117
3115
|
l.email && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: l.email }),
|
|
3118
3116
|
l.bio && /* @__PURE__ */ e("p", { className: "text-sm text-foreground mt-1", children: l.bio }),
|
|
3119
3117
|
l.joinedAt && /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground mt-1 flex items-center gap-1", children: [
|
|
3120
|
-
/* @__PURE__ */ e(
|
|
3118
|
+
/* @__PURE__ */ e($t, { size: 12 }),
|
|
3121
3119
|
"Joined ",
|
|
3122
3120
|
new Date(l.joinedAt).toLocaleDateString()
|
|
3123
3121
|
] })
|
|
@@ -3133,12 +3131,12 @@ function Gl({
|
|
|
3133
3131
|
u.label
|
|
3134
3132
|
)) }),
|
|
3135
3133
|
r && /* @__PURE__ */ t(O, { children: [
|
|
3136
|
-
/* @__PURE__ */ e(
|
|
3134
|
+
/* @__PURE__ */ e(G, {}),
|
|
3137
3135
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
3138
3136
|
/* @__PURE__ */ e("p", { className: "text-lg font-semibold text-foreground", children: "Enrolled Courses" }),
|
|
3139
3137
|
/* @__PURE__ */ e(X, { variant: "secondary", children: a.length })
|
|
3140
3138
|
] }),
|
|
3141
|
-
a.length > 0 ? /* @__PURE__ */ e(
|
|
3139
|
+
a.length > 0 ? /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(_, { className: "p-0 divide-y divide-border", children: a.map((u) => /* @__PURE__ */ t(
|
|
3142
3140
|
"div",
|
|
3143
3141
|
{
|
|
3144
3142
|
className: k(
|
|
@@ -3150,7 +3148,7 @@ function Gl({
|
|
|
3150
3148
|
/* @__PURE__ */ e(ot, { value: u.progress, size: 32, strokeWidth: 3 }),
|
|
3151
3149
|
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
3152
3150
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground truncate", children: u.title }),
|
|
3153
|
-
u.lastAccessedAt && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children:
|
|
3151
|
+
u.lastAccessedAt && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: Ie(u.lastAccessedAt) })
|
|
3154
3152
|
] }),
|
|
3155
3153
|
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground whitespace-nowrap", children: [
|
|
3156
3154
|
Math.round(u.progress),
|
|
@@ -3162,14 +3160,14 @@ function Gl({
|
|
|
3162
3160
|
)) }) }) : /* @__PURE__ */ e(
|
|
3163
3161
|
$,
|
|
3164
3162
|
{
|
|
3165
|
-
icon: /* @__PURE__ */ e(
|
|
3163
|
+
icon: /* @__PURE__ */ e(oe, {}),
|
|
3166
3164
|
title: "No courses yet",
|
|
3167
3165
|
description: "This student has not enrolled in any courses."
|
|
3168
3166
|
}
|
|
3169
3167
|
)
|
|
3170
3168
|
] }),
|
|
3171
3169
|
m && /* @__PURE__ */ t(O, { children: [
|
|
3172
|
-
/* @__PURE__ */ e(
|
|
3170
|
+
/* @__PURE__ */ e(G, {}),
|
|
3173
3171
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
3174
3172
|
/* @__PURE__ */ e("p", { className: "text-lg font-semibold text-foreground", children: "Achievements" }),
|
|
3175
3173
|
/* @__PURE__ */ e(X, { variant: "secondary", children: i.length })
|
|
@@ -3199,12 +3197,12 @@ function Gl({
|
|
|
3199
3197
|
}
|
|
3200
3198
|
)
|
|
3201
3199
|
] }),
|
|
3202
|
-
/* @__PURE__ */ e(
|
|
3200
|
+
/* @__PURE__ */ e(G, {}),
|
|
3203
3201
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
3204
3202
|
/* @__PURE__ */ e("p", { className: "text-lg font-semibold text-foreground", children: "Certificates" }),
|
|
3205
|
-
/* @__PURE__ */ e(X, { variant: "secondary", children:
|
|
3203
|
+
/* @__PURE__ */ e(X, { variant: "secondary", children: c.length })
|
|
3206
3204
|
] }),
|
|
3207
|
-
|
|
3205
|
+
c.length > 0 ? /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(_, { className: "p-0 divide-y divide-border", children: c.map((u) => /* @__PURE__ */ t(
|
|
3208
3206
|
"div",
|
|
3209
3207
|
{
|
|
3210
3208
|
className: k(
|
|
@@ -3248,28 +3246,28 @@ function Gl({
|
|
|
3248
3246
|
);
|
|
3249
3247
|
}
|
|
3250
3248
|
export {
|
|
3251
|
-
|
|
3249
|
+
Fl as A,
|
|
3252
3250
|
jl as C,
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3251
|
+
Pl as D,
|
|
3252
|
+
Gl as E,
|
|
3253
|
+
Ll as F,
|
|
3256
3254
|
_l as G,
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3255
|
+
Al as L,
|
|
3256
|
+
Dl as P,
|
|
3257
|
+
zl as Q,
|
|
3258
|
+
$l as R,
|
|
3261
3259
|
te as S,
|
|
3262
|
-
|
|
3263
|
-
|
|
3260
|
+
Ul as a,
|
|
3261
|
+
El as b,
|
|
3264
3262
|
Hl as c,
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3263
|
+
Rl as d,
|
|
3264
|
+
Tl as e,
|
|
3265
|
+
Vl as f,
|
|
3268
3266
|
Il as g,
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3267
|
+
Bl as h,
|
|
3268
|
+
Ql as i,
|
|
3269
|
+
Wl as j,
|
|
3270
|
+
Ml as k,
|
|
3273
3271
|
pt as l,
|
|
3274
|
-
|
|
3272
|
+
al as m
|
|
3275
3273
|
};
|