@instructure/platform-modules 1.16.0 → 1.17.0
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/adapters/canvasGraphql/index.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/normalize.d.ts +5 -0
- package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/queries.d.ts +5 -0
- package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
- package/dist/adapters/inMemory.d.ts.map +1 -1
- package/dist/adapters/types.d.ts +6 -0
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/cache/keys.d.ts +3 -0
- package/dist/cache/keys.d.ts.map +1 -1
- package/dist/chunks/ModulesProgressBar-BFKPmBau.js +2727 -0
- package/dist/components/HighlightedText.d.ts +13 -0
- package/dist/components/HighlightedText.d.ts.map +1 -0
- package/dist/components/ModuleCard.d.ts +1 -0
- package/dist/components/ModuleCard.d.ts.map +1 -1
- package/dist/components/ModuleItemRow.d.ts +1 -0
- package/dist/components/ModuleItemRow.d.ts.map +1 -1
- package/dist/components/ModulesList.d.ts.map +1 -1
- package/dist/components/ModulesList.stories.d.ts +5 -0
- package/dist/components/ModulesList.stories.d.ts.map +1 -1
- package/dist/components/ModulesProgressBar.d.ts +3 -2
- package/dist/components/ModulesProgressBar.d.ts.map +1 -1
- package/dist/edit.js +9 -9
- package/dist/hooks/constants.d.ts +2 -0
- package/dist/hooks/constants.d.ts.map +1 -1
- package/dist/hooks/queryOptions.d.ts +2 -0
- package/dist/hooks/queryOptions.d.ts.map +1 -1
- package/dist/hooks/useItemsMode.d.ts +1 -0
- package/dist/hooks/useItemsMode.d.ts.map +1 -1
- package/dist/hooks/useModules.d.ts +1 -0
- package/dist/hooks/useModules.d.ts.map +1 -1
- package/dist/hooks/useModulesPageData.d.ts +11 -0
- package/dist/hooks/useModulesPageData.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1212 -1104
- package/dist/types/domain.d.ts +5 -0
- package/dist/types/domain.d.ts.map +1 -1
- package/dist/types/filterClause.d.ts +1 -0
- package/dist/types/filterClause.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/schemas.d.ts +2 -1
- package/dist/types/schemas.d.ts.map +1 -1
- package/locales/en.json +6 -0
- package/package.json +1 -1
- package/dist/chunks/ModulesProgressBar-B1oRo549.js +0 -2548
|
@@ -0,0 +1,2727 @@
|
|
|
1
|
+
import { keepPreviousData as ro, useQuery as so, useQueryClient as io, QueryObserver as rr } from "@tanstack/react-query";
|
|
2
|
+
import In from "p-limit";
|
|
3
|
+
import { createContext as Lt, useContext as ct, useRef as C, useMemo as W, isValidElement as xt, useState as Q, useEffect as ue, useCallback as D, Fragment as Rt, memo as sr, cloneElement as ir, useLayoutEffect as ar } from "react";
|
|
4
|
+
import { BREAKPOINTS as cr } from "@instructure/platform-with-breakpoints";
|
|
5
|
+
import { jsx as c, Fragment as rt, jsxs as K } from "react/jsx-runtime";
|
|
6
|
+
import { useTheme as Nt } from "@instructure/emotion";
|
|
7
|
+
import { ScreenReaderContent as ao } from "@instructure/ui-a11y-content";
|
|
8
|
+
import { Flex as O } from "@instructure/ui-flex/v11_7";
|
|
9
|
+
import { PlugInstUIIcon as lr, ExternalLinkInstUIIcon as ur, FileInstUIIcon as dr, FileTextInstUIIcon as mr, MessagesSquareInstUIIcon as pr, RocketInstUIIcon as gr, FilePenLineInstUIIcon as fr, ClockInstUIIcon as hr, CalendarInstUIIcon as Ot, LockInstUIIcon as kt, CircleAlertInstUIIcon as _e, CircleCheckInstUIIcon as Ft, ClockFadingInstUIIcon as qt, CircleDashedInstUIIcon as zt, CornerDownRightInstUIIcon as br, IconArrowOpenStartLine as yr, IconArrowOpenEndLine as Ir } from "@instructure/ui-icons";
|
|
10
|
+
import { Link as Sr } from "@instructure/ui-link/v11_7";
|
|
11
|
+
import { Text as be } from "@instructure/ui-text/v11_7";
|
|
12
|
+
import { View as ge } from "@instructure/ui-view/v11_7";
|
|
13
|
+
import { Pill as Mr } from "@instructure/ui-pill/v11_7";
|
|
14
|
+
import { IconButton as Sn } from "@instructure/ui-buttons/v11_7";
|
|
15
|
+
import { Heading as Tr } from "@instructure/ui-heading/v11_7";
|
|
16
|
+
import { Tooltip as wr } from "@instructure/ui-tooltip/v11_7";
|
|
17
|
+
import { z as a } from "zod";
|
|
18
|
+
import { isValid as wt, colorToRGB as vt, overlayColors as vr, alpha as Er, color2hex as co, contrast as ye, darken as Pr, lighten as Cr } from "@instructure/ui-color-utils";
|
|
19
|
+
import { Tag as lo } from "@instructure/ui-tag/v11_7";
|
|
20
|
+
const _r = a.object({
|
|
21
|
+
target: a.enum(["module", "item"]),
|
|
22
|
+
field: a.string(),
|
|
23
|
+
op: a.enum(["eq", "contains", "within"]),
|
|
24
|
+
value: a.union([a.string(), a.boolean(), a.number()])
|
|
25
|
+
}).strict();
|
|
26
|
+
function Ar(e, t) {
|
|
27
|
+
const n = e == null ? void 0 : e[t.target];
|
|
28
|
+
return !n || !Object.prototype.hasOwnProperty.call(n, t.field) ? !1 : n[t.field].includes(t.op);
|
|
29
|
+
}
|
|
30
|
+
const Dr = a.enum([
|
|
31
|
+
"assignment",
|
|
32
|
+
"quiz",
|
|
33
|
+
"discussion",
|
|
34
|
+
"page",
|
|
35
|
+
"file",
|
|
36
|
+
"external_url",
|
|
37
|
+
"external_tool",
|
|
38
|
+
"sub_header"
|
|
39
|
+
]), Lr = a.enum(["not_started", "in_progress", "complete", "incomplete", "missing", "locked"]), xr = a.enum([
|
|
40
|
+
"not_started",
|
|
41
|
+
"in_progress",
|
|
42
|
+
"complete",
|
|
43
|
+
"missing",
|
|
44
|
+
"incomplete",
|
|
45
|
+
"missing_and_incomplete",
|
|
46
|
+
"locked"
|
|
47
|
+
]), Rr = a.enum([
|
|
48
|
+
"must_view",
|
|
49
|
+
"must_mark_done",
|
|
50
|
+
"must_contribute",
|
|
51
|
+
"must_submit",
|
|
52
|
+
"min_score",
|
|
53
|
+
"min_percentage",
|
|
54
|
+
"unknown"
|
|
55
|
+
]), Nr = a.object({
|
|
56
|
+
status: xr.optional(),
|
|
57
|
+
requirementsMet: a.number(),
|
|
58
|
+
requirementCount: a.number(),
|
|
59
|
+
percentComplete: a.number().min(0).max(100),
|
|
60
|
+
nextDueAt: a.string().nullish(),
|
|
61
|
+
missingCount: a.number(),
|
|
62
|
+
incompleteCount: a.number()
|
|
63
|
+
}), uo = a.object({
|
|
64
|
+
itemId: a.string(),
|
|
65
|
+
type: Rr,
|
|
66
|
+
minScore: a.number().nullish(),
|
|
67
|
+
minPercentage: a.number().nullish()
|
|
68
|
+
}), mo = a.object({
|
|
69
|
+
id: a.string(),
|
|
70
|
+
moduleId: a.string(),
|
|
71
|
+
title: a.string(),
|
|
72
|
+
type: Dr,
|
|
73
|
+
position: a.number(),
|
|
74
|
+
itemNumber: a.number().optional(),
|
|
75
|
+
indent: a.number(),
|
|
76
|
+
published: a.boolean(),
|
|
77
|
+
url: a.string().nullish(),
|
|
78
|
+
newTab: a.boolean().nullish(),
|
|
79
|
+
completionRequirement: uo.nullish(),
|
|
80
|
+
dueAt: a.string().nullish(),
|
|
81
|
+
status: Lr.optional(),
|
|
82
|
+
pointsPossible: a.number().nullish(),
|
|
83
|
+
extensions: a.record(a.unknown()).optional()
|
|
84
|
+
}), Or = a.object({
|
|
85
|
+
id: a.string(),
|
|
86
|
+
name: a.string()
|
|
87
|
+
}), kr = a.object({
|
|
88
|
+
nameMatched: a.boolean(),
|
|
89
|
+
matchingItemCount: a.number()
|
|
90
|
+
}), Fr = a.object({
|
|
91
|
+
id: a.string(),
|
|
92
|
+
name: a.string(),
|
|
93
|
+
position: a.number(),
|
|
94
|
+
published: a.boolean(),
|
|
95
|
+
itemCount: a.number(),
|
|
96
|
+
estimatedDurationMinutes: a.number().optional(),
|
|
97
|
+
items: a.array(mo).optional(),
|
|
98
|
+
unlockAt: a.string().nullish(),
|
|
99
|
+
prerequisiteModules: a.array(Or),
|
|
100
|
+
requirementCount: a.number().nullish(),
|
|
101
|
+
requireSequentialProgress: a.boolean(),
|
|
102
|
+
completionRequirements: a.array(uo).optional(),
|
|
103
|
+
progress: Nr.optional(),
|
|
104
|
+
collapsed: a.boolean().nullish(),
|
|
105
|
+
searchMatch: kr.optional(),
|
|
106
|
+
extensions: a.record(a.unknown()).optional()
|
|
107
|
+
}), Au = a.object({
|
|
108
|
+
hasNextPage: a.boolean(),
|
|
109
|
+
endCursor: a.string().nullable()
|
|
110
|
+
}).refine((e) => !e.hasNextPage || e.endCursor !== null, {
|
|
111
|
+
message: 'hasNextPage is true but endCursor is null: there is another page and no cursor to ask for it with, which renders a "Load more" that can never load.',
|
|
112
|
+
path: ["endCursor"]
|
|
113
|
+
}), po = a.object({
|
|
114
|
+
hasNextPage: a.boolean(),
|
|
115
|
+
endCursor: a.string().nullable(),
|
|
116
|
+
hasPreviousPage: a.boolean(),
|
|
117
|
+
startCursor: a.string().nullable(),
|
|
118
|
+
totalCount: a.number().nullable(),
|
|
119
|
+
totalNrOfPages: a.number().nullable()
|
|
120
|
+
}).refine((e) => !e.hasNextPage || e.endCursor !== null, {
|
|
121
|
+
message: 'hasNextPage is true but endCursor is null: there is another page and no cursor to ask for it with, which renders a "Load more" that can never load.',
|
|
122
|
+
path: ["endCursor"]
|
|
123
|
+
}), Du = a.object({
|
|
124
|
+
modules: a.array(Fr),
|
|
125
|
+
pageInfo: po
|
|
126
|
+
}), Lu = a.object({
|
|
127
|
+
items: a.array(mo),
|
|
128
|
+
pageInfo: po
|
|
129
|
+
}), go = "career.estimatedDurationMinutes";
|
|
130
|
+
function fo(e) {
|
|
131
|
+
var n;
|
|
132
|
+
const t = (n = e.extensions) == null ? void 0 : n[go];
|
|
133
|
+
return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? null : t;
|
|
134
|
+
}
|
|
135
|
+
function xu(e, t) {
|
|
136
|
+
return t == null ? e : { ...e, [go]: t };
|
|
137
|
+
}
|
|
138
|
+
const qr = "modules.suppressItemNumbering";
|
|
139
|
+
function Ru(e) {
|
|
140
|
+
var t;
|
|
141
|
+
return ((t = e.extensions) == null ? void 0 : t[qr]) === !0;
|
|
142
|
+
}
|
|
143
|
+
const zr = "organize.newPlacement", Ur = "organize.newModule", $r = "organize.addedItemCount";
|
|
144
|
+
function Nu(e) {
|
|
145
|
+
var t;
|
|
146
|
+
return ((t = e.extensions) == null ? void 0 : t[zr]) === !0;
|
|
147
|
+
}
|
|
148
|
+
function Ou(e) {
|
|
149
|
+
var t;
|
|
150
|
+
return ((t = e.extensions) == null ? void 0 : t[Ur]) === !0;
|
|
151
|
+
}
|
|
152
|
+
function ku(e) {
|
|
153
|
+
var n;
|
|
154
|
+
const t = (n = e.extensions) == null ? void 0 : n[$r];
|
|
155
|
+
return typeof t != "number" || !Number.isInteger(t) || t < 0 ? 0 : t;
|
|
156
|
+
}
|
|
157
|
+
const ho = Lt(null), Br = () => {
|
|
158
|
+
};
|
|
159
|
+
function Fu({
|
|
160
|
+
host: e,
|
|
161
|
+
onEvent: t,
|
|
162
|
+
children: n
|
|
163
|
+
}) {
|
|
164
|
+
const o = C(t);
|
|
165
|
+
o.current = t;
|
|
166
|
+
const r = W(
|
|
167
|
+
() => (s) => o.current({ event: s, host: e }),
|
|
168
|
+
[e]
|
|
169
|
+
);
|
|
170
|
+
return /* @__PURE__ */ c(ho.Provider, { value: r, children: n });
|
|
171
|
+
}
|
|
172
|
+
function Wr() {
|
|
173
|
+
return ct(ho) ?? Br;
|
|
174
|
+
}
|
|
175
|
+
const Mn = 100, bo = 2e3;
|
|
176
|
+
class Hr extends Error {
|
|
177
|
+
constructor(t, n) {
|
|
178
|
+
super(
|
|
179
|
+
`This in-memory adapter was built for course ${t} but was asked for course ${n}. A fixture serves exactly one course.`
|
|
180
|
+
), this.name = "InMemoryCourseMismatchError", this.expected = t, this.received = n;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
const Tn = (e) => `offset:${e}`, wn = (e) => {
|
|
184
|
+
if (!e) return 0;
|
|
185
|
+
const t = Number.parseInt(e.replace("offset:", ""), 10);
|
|
186
|
+
return Number.isFinite(t) && t >= 0 ? t : 0;
|
|
187
|
+
}, Ze = (e) => {
|
|
188
|
+
if (e != null && e.aborted)
|
|
189
|
+
throw new DOMException("The operation was aborted.", "AbortError");
|
|
190
|
+
};
|
|
191
|
+
function vn(e, t, n) {
|
|
192
|
+
const o = e.length, r = Math.ceil(o / n), s = t.kind === "first" ? 0 : t.kind === "after" ? wn(t.cursor) : t.kind === "before" ? Math.max(0, wn(t.cursor) - n) : Math.max(0, o - t.count), i = e.slice(s, s + n), u = s + i.length, m = u < o, p = s > 0;
|
|
193
|
+
return {
|
|
194
|
+
slice: i,
|
|
195
|
+
pageInfo: {
|
|
196
|
+
hasNextPage: m,
|
|
197
|
+
endCursor: m ? Tn(u) : null,
|
|
198
|
+
hasPreviousPage: p,
|
|
199
|
+
startCursor: p ? Tn(s) : null,
|
|
200
|
+
totalCount: o,
|
|
201
|
+
totalNrOfPages: r
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
const Gr = /* @__PURE__ */ new Map([
|
|
206
|
+
["COMPLETED", (e) => {
|
|
207
|
+
var t;
|
|
208
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "complete";
|
|
209
|
+
}],
|
|
210
|
+
["IN_PROGRESS", (e) => {
|
|
211
|
+
var t;
|
|
212
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "in_progress";
|
|
213
|
+
}],
|
|
214
|
+
["INCOMPLETE", (e) => {
|
|
215
|
+
var t;
|
|
216
|
+
return ((t = e.progress) == null ? void 0 : t.status) !== "complete";
|
|
217
|
+
}],
|
|
218
|
+
[
|
|
219
|
+
"NOT_STARTED",
|
|
220
|
+
(e) => {
|
|
221
|
+
var t, n;
|
|
222
|
+
return ((t = e.progress) == null ? void 0 : t.status) !== "complete" && ((n = e.progress) == null ? void 0 : n.status) !== "in_progress";
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
]), jr = /* @__PURE__ */ new Map([
|
|
226
|
+
["locked", (e) => {
|
|
227
|
+
var t;
|
|
228
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "locked";
|
|
229
|
+
}],
|
|
230
|
+
["missing", (e) => {
|
|
231
|
+
var t;
|
|
232
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "missing";
|
|
233
|
+
}],
|
|
234
|
+
["missing_and_incomplete", (e) => {
|
|
235
|
+
var t;
|
|
236
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "missing_and_incomplete";
|
|
237
|
+
}],
|
|
238
|
+
["incomplete", (e) => {
|
|
239
|
+
var t;
|
|
240
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "incomplete";
|
|
241
|
+
}],
|
|
242
|
+
["complete", (e) => {
|
|
243
|
+
var t;
|
|
244
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "complete";
|
|
245
|
+
}],
|
|
246
|
+
["in_progress", (e) => {
|
|
247
|
+
var t;
|
|
248
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "in_progress";
|
|
249
|
+
}],
|
|
250
|
+
["not_started", (e) => {
|
|
251
|
+
var t;
|
|
252
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "not_started";
|
|
253
|
+
}]
|
|
254
|
+
]), Kr = {
|
|
255
|
+
module: { completionStatus: ["eq"], moduleStatus: ["eq"], dueWithinDays: ["within"] },
|
|
256
|
+
search: !0
|
|
257
|
+
}, yt = (e, t) => e.toLowerCase().includes(t.toLowerCase());
|
|
258
|
+
function Yr(e) {
|
|
259
|
+
const t = Date.parse(e.start), n = Date.parse(e.end);
|
|
260
|
+
return (o) => {
|
|
261
|
+
var i;
|
|
262
|
+
const r = (i = o.progress) == null ? void 0 : i.nextDueAt;
|
|
263
|
+
if (!r) return !1;
|
|
264
|
+
const s = Date.parse(r);
|
|
265
|
+
return s >= t && s <= n;
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
function Qr(e, t) {
|
|
269
|
+
if (e.target === "module" && e.field === "completionStatus" && e.op === "eq") {
|
|
270
|
+
const n = typeof e.value == "string" ? Gr.get(e.value) : void 0;
|
|
271
|
+
if (!n) throw new Error(`unknown completionStatus "${String(e.value)}"`);
|
|
272
|
+
return n;
|
|
273
|
+
}
|
|
274
|
+
if (e.target === "module" && e.field === "moduleStatus" && e.op === "eq") {
|
|
275
|
+
const n = typeof e.value == "string" ? jr.get(e.value) : void 0;
|
|
276
|
+
if (!n) throw new Error(`unknown moduleStatus "${String(e.value)}"`);
|
|
277
|
+
return n;
|
|
278
|
+
}
|
|
279
|
+
if (e.target === "module" && e.field === "dueWithinDays" && e.op === "within") {
|
|
280
|
+
if (!t) throw new Error("A dueWithinDays clause needs a dueRange");
|
|
281
|
+
return Yr(t);
|
|
282
|
+
}
|
|
283
|
+
throw new Error(`in-memory adapter cannot compile ${e.target}.${e.field} ${e.op}`);
|
|
284
|
+
}
|
|
285
|
+
function qu(e, t = {}) {
|
|
286
|
+
const n = (s) => e.itemsByModuleId[s] ?? [], o = (s) => {
|
|
287
|
+
let i = 0;
|
|
288
|
+
return n(s).map(
|
|
289
|
+
(u) => u.type === "sub_header" ? u : { ...u, itemNumber: ++i }
|
|
290
|
+
);
|
|
291
|
+
}, r = (s) => {
|
|
292
|
+
if (s !== e.courseId)
|
|
293
|
+
throw new Hr(e.courseId, s);
|
|
294
|
+
};
|
|
295
|
+
return {
|
|
296
|
+
capabilities: Kr,
|
|
297
|
+
async listModules({
|
|
298
|
+
courseId: s,
|
|
299
|
+
page: i = { kind: "first" },
|
|
300
|
+
pageSize: u,
|
|
301
|
+
includeItems: m,
|
|
302
|
+
filter: p,
|
|
303
|
+
dueRange: b,
|
|
304
|
+
search: g,
|
|
305
|
+
inlineItemsFirst: h,
|
|
306
|
+
signal: E
|
|
307
|
+
}) {
|
|
308
|
+
var M;
|
|
309
|
+
Ze(E), r(s), (M = t.onRequest) == null || M.call(t, "listModules", { operation: "listModules", courseId: s });
|
|
310
|
+
const y = (g == null ? void 0 : g.trim()) || void 0, q = (T) => y ? {
|
|
311
|
+
nameMatched: yt(T.name, y),
|
|
312
|
+
matchingItemCount: n(T.id).filter((_) => yt(_.title, y)).length
|
|
313
|
+
} : void 0, k = (T) => {
|
|
314
|
+
const _ = q(T);
|
|
315
|
+
return !_ || _.nameMatched || _.matchingItemCount > 0;
|
|
316
|
+
}, v = p ? e.modules.filter(Qr(p, b)) : e.modules, R = y ? v.filter(k) : v, { slice: A, pageInfo: N } = vn(R, i, u), L = Math.min(h ?? Mn, Mn);
|
|
317
|
+
return { modules: A.map((T) => {
|
|
318
|
+
const _ = n(T.id), $ = m && _.length <= L, H = q(T);
|
|
319
|
+
return {
|
|
320
|
+
...T,
|
|
321
|
+
itemCount: _.length,
|
|
322
|
+
items: $ ? _ : void 0,
|
|
323
|
+
...H ? { searchMatch: H } : {}
|
|
324
|
+
};
|
|
325
|
+
}), pageInfo: N };
|
|
326
|
+
},
|
|
327
|
+
async listModuleItems({
|
|
328
|
+
courseId: s,
|
|
329
|
+
moduleId: i,
|
|
330
|
+
page: u = { kind: "first" },
|
|
331
|
+
pageSize: m,
|
|
332
|
+
search: p,
|
|
333
|
+
signal: b
|
|
334
|
+
}) {
|
|
335
|
+
var q;
|
|
336
|
+
Ze(b), r(s), (q = t.onRequest) == null || q.call(t, "listModuleItems", { operation: "listModuleItems", courseId: s, moduleId: i });
|
|
337
|
+
const g = (p == null ? void 0 : p.trim()) || void 0, h = g ? o(i).filter((k) => yt(k.title, g)) : o(i), { slice: E, pageInfo: y } = vn(h, u, m);
|
|
338
|
+
return { items: E, pageInfo: y };
|
|
339
|
+
},
|
|
340
|
+
async setModuleCollapsed({
|
|
341
|
+
courseId: s,
|
|
342
|
+
moduleId: i,
|
|
343
|
+
collapsed: u,
|
|
344
|
+
signal: m
|
|
345
|
+
}) {
|
|
346
|
+
var b;
|
|
347
|
+
Ze(m), r(s), (b = t.onRequest) == null || b.call(t, "setModuleCollapsed", {
|
|
348
|
+
operation: "setModuleCollapsed",
|
|
349
|
+
courseId: s,
|
|
350
|
+
moduleId: i,
|
|
351
|
+
collapsed: u
|
|
352
|
+
});
|
|
353
|
+
const p = e.modules.findIndex((g) => g.id === i);
|
|
354
|
+
p !== -1 && (e.modules[p] = { ...e.modules[p], collapsed: u });
|
|
355
|
+
},
|
|
356
|
+
async setAllModulesCollapsed({
|
|
357
|
+
courseId: s,
|
|
358
|
+
collapsed: i,
|
|
359
|
+
signal: u
|
|
360
|
+
}) {
|
|
361
|
+
var m;
|
|
362
|
+
Ze(u), r(s), (m = t.onRequest) == null || m.call(t, "setAllModulesCollapsed", {
|
|
363
|
+
operation: "setAllModulesCollapsed",
|
|
364
|
+
courseId: s,
|
|
365
|
+
collapsed: i
|
|
366
|
+
}), e.modules = e.modules.map((p) => ({ ...p, collapsed: i }));
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
const Pe = ["platform-modules"];
|
|
371
|
+
function lt(e) {
|
|
372
|
+
return (e == null ? void 0 : e.trim()) || void 0;
|
|
373
|
+
}
|
|
374
|
+
function En(e) {
|
|
375
|
+
const t = lt(e.search);
|
|
376
|
+
return t === e.search ? e : { ...e, search: t };
|
|
377
|
+
}
|
|
378
|
+
const We = {
|
|
379
|
+
all: Pe,
|
|
380
|
+
course: (e) => [...Pe, e],
|
|
381
|
+
list: (e, t = {}) => [...Pe, e, "list", En(t)],
|
|
382
|
+
items: (e, t, n = {}) => [...Pe, e, "module", t, "items", En(n)]
|
|
383
|
+
};
|
|
384
|
+
function Vr(e) {
|
|
385
|
+
return [...Pe, e, "list"];
|
|
386
|
+
}
|
|
387
|
+
function ot(e, t) {
|
|
388
|
+
return [...Pe, e, "module", t, "items"];
|
|
389
|
+
}
|
|
390
|
+
function zu(e, t, n, o) {
|
|
391
|
+
const r = o ? We.items(t, n, o) : ot(t, n);
|
|
392
|
+
return e.invalidateQueries({ queryKey: r });
|
|
393
|
+
}
|
|
394
|
+
function Uu(e, t, n) {
|
|
395
|
+
const o = n ? We.list(t, n) : Vr(t);
|
|
396
|
+
return e.invalidateQueries({ queryKey: o });
|
|
397
|
+
}
|
|
398
|
+
function $u(e, t) {
|
|
399
|
+
return e.invalidateQueries({ queryKey: We.course(t) });
|
|
400
|
+
}
|
|
401
|
+
const Et = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
402
|
+
function Pn(e, t) {
|
|
403
|
+
const n = Object.entries(t ?? {}).filter(([, o]) => o !== void 0);
|
|
404
|
+
return { ...e, ...Object.fromEntries(n) };
|
|
405
|
+
}
|
|
406
|
+
function Bu(e, t = {}) {
|
|
407
|
+
const n = Object.keys(e).map((r) => [
|
|
408
|
+
r,
|
|
409
|
+
Pn(e[r], Et(t, r) ? t[r] : void 0)
|
|
410
|
+
]), o = Object.keys(t).filter((r) => !Et(e, r)).sort().map((r) => [r, Pn({}, t[r])]);
|
|
411
|
+
return Object.fromEntries([...n, ...o]);
|
|
412
|
+
}
|
|
413
|
+
function De(e, t) {
|
|
414
|
+
if (!(!Et(e, t) || e[t].hidden))
|
|
415
|
+
return e[t];
|
|
416
|
+
}
|
|
417
|
+
function yo(e) {
|
|
418
|
+
return Object.keys(e).filter((t) => De(e, t) !== void 0).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
|
|
419
|
+
}
|
|
420
|
+
const Xr = "Page %{page} of %{pageCount}", Zr = "First page", Jr = "Previous page", es = "Next page", ts = "Last page", ns = "Page %{page}", os = "…", rs = "Expand all modules", ss = "Collapse all modules", is = { one: "Loading items in %{count} module…", other: "Loading items in %{count} modules…" }, as = "All items loaded", cs = { one: "%{count} module expanded", other: "%{count} modules expanded" }, ls = { one: "%{count} module collapsed", other: "%{count} modules collapsed" }, us = "Modules failed to load: %{message}", ds = "Loading modules", ms = "No modules available yet", ps = "Modules will appear here once your instructor publishes them. Check back soon or reach out to your instructor for more information.", gs = "No matching results", fs = "Adjust or clear your filters to see more items.", hs = "Clear filters", bs = "Search modules and items", ys = "Clear search", Is = { one: "%{count} module matches “%{term}”", other: "%{count} modules match “%{term}”" }, Ss = "Status", Ms = "All", Ts = "Not started", ws = "In progress", vs = "Complete", Es = "Due soon", Ps = "Missing", Cs = "Locked until %{name} is completed.", _s = "Locked until %{prerequisites} are completed.", As = "%{count} prerequisites", Ds = "%{label}. %{name}", Ls = "%{label} %{name}", xs = "%{name} progress", Rs = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, Ns = "Items failed to load: %{message}", Os = "Loading items", ks = "Loading…", Fs = "No items.", qs = "%{name} items pages", zs = "Page %{page} of %{pageCount} in %{name}", Us = "(unpublished)", $s = "Collapse %{name}", Bs = "Expand %{name}", Ws = "Not started", Hs = "In progress", Gs = "All completed", js = "%{count} Missing", Ks = "%{count} Incomplete", Ys = "%{missing} & %{incomplete}", Qs = "Locked", Vs = "Due soon", Xs = "Not started", Zs = "In progress", Js = "Completed", ei = "Incomplete", ti = "Missing", ni = "Locked", oi = "Due soon", ri = "Assignment", si = "Quiz", ii = "Discussion", ai = "Page", ci = "File", li = "External URL", ui = "External tool", di = "Text header", mi = "Item type", pi = "Due date", gi = "Points", fi = "Requirement", hi = "Estimated duration", bi = "Publish state", yi = "View the item", Ii = "Submit the assignment", Si = "Contribute to the page", Mi = "Mark as done", Ti = "Score at least the minimum", wi = "Score at least %{count}", vi = "Score at least the minimum percentage", Ei = "Score at least %{count}%", Pi = "Complete the requirement", Ci = "today, %{time}", _i = "yesterday, %{time}", Ai = "tomorrow, %{time}", Di = "%{date}, %{time}", Li = "%{time} (%{zone})", xi = "Due %{when}", Ri = "Past due %{when}", Ni = "Will unlock on %{when}", Oi = "Unlocked on %{when}", ki = "%{duration} to complete", Fi = "%{duration} remaining", qi = "%{hours}h %{minutes}m", zi = "%{count}h", Ui = "%{count}m", $i = { one: "%{count} pt", other: "%{count} pts" }, Bi = "%{met} of %{count}", Wi = { one: "%{met} of %{count} requirement met", other: "%{met} of %{count} requirements met" }, Hi = "%{percent}%", Gi = { one: "%{completedModules} of %{totalModules} module complete", other: "%{completedModules} of %{totalModules} modules complete" }, ji = "(%{itemsSummary})", Ki = { one: "%{completedItems} of %{totalItems} item", other: "%{completedItems} of %{totalItems} items" }, Yi = "Module progress", Qi = "Module progress pages", Vi = "Modules %{start}–%{end} of %{total}", Xi = "%{name}: %{status}", Zi = "%{count}min", Ji = "%{count}hr", ea = "%{hours}hr %{minutes}min", ta = "Unpublished", na = "Untitled item", oa = "opens in a new window", ra = "Organize with AI", sa = "Organize content into modules", ia = "Module progression", aa = "Set module prerequisites", ca = "Set item requirements per module", la = "Close", ua = "What should this do?", da = "Place new content only", ma = "Reorganize the whole course", pa = "This rebuilds every module in the course. Existing modules can be renamed, refilled, or removed.", ga = "Content to organize", fa = "Anything else it should know? (optional)", ha = "For example: keep the lab work together and put it last.", ba = "%{used}/%{max}", ya = "Choose at least one kind of content.", Ia = "Organize", Sa = "Cancel", Ma = "Start over", Ta = "Regenerate", wa = "Apply", va = "Try again", Ea = "Organizing your content…", Pa = "Creating your modules…", Ca = "Still working. Large courses take longer.", _a = "Your proposal is ready to review.", Aa = "Your modules were created.", Da = "Your content could not be organized: %{message}", La = "Your modules could not be created: %{message}", xa = "Proposed modules", Ra = "New module", Na = { one: "%{count} item added", other: "%{count} items added" }, Oa = "New", ka = "New placement", Fa = { one: "%{count} item was not placed", other: "%{count} items were not placed" }, qa = "You can still apply this. Anything left out stays where it is.", za = { one: "%{count} thing to know", other: "%{count} things to know" }, Ua = "No modules yet", $a = "Modules you add to this course appear here.", Ba = { one: "%{count} item", other: "%{count} items" }, Wa = "Complete all required items in any order", Ha = "Complete all required items in order", Ga = "Complete one required item", ja = "Required", Ka = "Optional", Ya = "Required", Qa = "Move %{name}", Va = "draggable", Xa = "To pick up a module or item, press Space or Enter. Use the arrow keys to move it. Press Space or Enter again to drop it, or press Escape to cancel.", Za = "Picked up %{name}.", Ja = "%{name} is at position %{position} of %{count}.", ec = "%{name} is at position %{position} of %{count} in %{module}.", tc = "%{name} is not over a drop position.", nc = "%{name} was dropped at position %{position} of %{count}.", oc = "%{name} was dropped at position %{position} of %{count} in %{module}.", rc = "%{name} was dropped. It did not move.", sc = "Moving %{name} was canceled.", ic = {
|
|
421
|
+
pageChangedAnnouncement: Xr,
|
|
422
|
+
paginationFirstPage: Zr,
|
|
423
|
+
paginationPreviousPage: Jr,
|
|
424
|
+
paginationNextPage: es,
|
|
425
|
+
paginationLastPage: ts,
|
|
426
|
+
paginationPageLabel: ns,
|
|
427
|
+
paginationEllipsis: os,
|
|
428
|
+
expandAllModules: rs,
|
|
429
|
+
collapseAllModules: ss,
|
|
430
|
+
expandAllLoadingItems: is,
|
|
431
|
+
expandAllItemsLoaded: as,
|
|
432
|
+
modulesExpandedAnnouncement: cs,
|
|
433
|
+
modulesCollapsedAnnouncement: ls,
|
|
434
|
+
modulesLoadErrorAlert: us,
|
|
435
|
+
modulesLoadingSpinnerLabel: ds,
|
|
436
|
+
noModulesEmptyStateTitle: ms,
|
|
437
|
+
noModulesEmptyStateDescription: ps,
|
|
438
|
+
filteredEmptyStateTitle: gs,
|
|
439
|
+
filteredEmptyStateDescription: fs,
|
|
440
|
+
clearFilters: hs,
|
|
441
|
+
searchLabel: bs,
|
|
442
|
+
clearSearch: ys,
|
|
443
|
+
searchResultsHint: Is,
|
|
444
|
+
filterGroupLabel: Ss,
|
|
445
|
+
filterAll: Ms,
|
|
446
|
+
filterNotStarted: Ts,
|
|
447
|
+
filterInProgress: ws,
|
|
448
|
+
filterComplete: vs,
|
|
449
|
+
filterDueThisWeek: Es,
|
|
450
|
+
filterMissing: Ps,
|
|
451
|
+
lockedByPrerequisiteByline: Cs,
|
|
452
|
+
lockedByPrerequisitesByline: _s,
|
|
453
|
+
lockedByPrerequisitesCount: As,
|
|
454
|
+
moduleNameWithLabel: Ds,
|
|
455
|
+
itemNameWithLabel: Ls,
|
|
456
|
+
moduleProgressScreenReaderLabel: xs,
|
|
457
|
+
itemsLoadedAnnouncement: Rs,
|
|
458
|
+
itemsLoadErrorAlert: Ns,
|
|
459
|
+
itemsLoadingSpinnerLabel: Os,
|
|
460
|
+
itemsLoadingText: ks,
|
|
461
|
+
noItemsEmptyState: Fs,
|
|
462
|
+
itemsPaginationLabel: qs,
|
|
463
|
+
itemsPageChangedAnnouncement: zs,
|
|
464
|
+
moduleUnpublishedBadge: Us,
|
|
465
|
+
collapseModule: $s,
|
|
466
|
+
expandModule: Bs,
|
|
467
|
+
moduleStatusNotStarted: Ws,
|
|
468
|
+
moduleStatusInProgress: Hs,
|
|
469
|
+
moduleStatusComplete: Gs,
|
|
470
|
+
moduleStatusMissing: js,
|
|
471
|
+
moduleStatusIncomplete: Ks,
|
|
472
|
+
moduleStatusMissingAndIncomplete: Ys,
|
|
473
|
+
moduleStatusLocked: Qs,
|
|
474
|
+
moduleStatusDueSoon: Vs,
|
|
475
|
+
itemStatusNotStarted: Xs,
|
|
476
|
+
itemStatusInProgress: Zs,
|
|
477
|
+
itemStatusComplete: Js,
|
|
478
|
+
itemStatusIncomplete: ei,
|
|
479
|
+
itemStatusMissing: ti,
|
|
480
|
+
itemStatusLocked: ni,
|
|
481
|
+
itemStatusDueSoon: oi,
|
|
482
|
+
itemTypeAssignment: ri,
|
|
483
|
+
itemTypeQuiz: si,
|
|
484
|
+
itemTypeDiscussion: ii,
|
|
485
|
+
itemTypePage: ai,
|
|
486
|
+
itemTypeFile: ci,
|
|
487
|
+
itemTypeExternalUrl: li,
|
|
488
|
+
itemTypeExternalTool: ui,
|
|
489
|
+
itemTypeSubHeader: di,
|
|
490
|
+
metaFieldTypeLabel: mi,
|
|
491
|
+
metaFieldDueAtLabel: pi,
|
|
492
|
+
metaFieldPointsLabel: gi,
|
|
493
|
+
metaFieldRequirementLabel: fi,
|
|
494
|
+
metaFieldDurationLabel: hi,
|
|
495
|
+
metaFieldPublishStateLabel: bi,
|
|
496
|
+
requirementMustView: yi,
|
|
497
|
+
requirementMustSubmit: Ii,
|
|
498
|
+
requirementMustContribute: Si,
|
|
499
|
+
requirementMustMarkDone: Mi,
|
|
500
|
+
requirementMinScoreUnknown: Ti,
|
|
501
|
+
requirementMinScore: wi,
|
|
502
|
+
requirementMinPercentageUnknown: vi,
|
|
503
|
+
requirementMinPercentage: Ei,
|
|
504
|
+
requirementUnknown: Pi,
|
|
505
|
+
dateTimeToday: Ci,
|
|
506
|
+
dateTimeYesterday: _i,
|
|
507
|
+
dateTimeTomorrow: Ai,
|
|
508
|
+
dateTimeWithDate: Di,
|
|
509
|
+
timeWithZone: Li,
|
|
510
|
+
dueByline: xi,
|
|
511
|
+
pastDueByline: Ri,
|
|
512
|
+
unlockByline: Ni,
|
|
513
|
+
unlockedByline: Oi,
|
|
514
|
+
estimatedDurationByline: ki,
|
|
515
|
+
remainingDurationByline: Fi,
|
|
516
|
+
estimatedDurationHoursAndMinutes: qi,
|
|
517
|
+
estimatedDurationHours: zi,
|
|
518
|
+
estimatedDurationMinutesAbbreviated: Ui,
|
|
519
|
+
pointsAbbreviated: $i,
|
|
520
|
+
progressSummary: Bi,
|
|
521
|
+
progressScreenReaderValue: Wi,
|
|
522
|
+
moduleProgressOverviewPercentLabel: Hi,
|
|
523
|
+
moduleProgressOverviewSummary: Gi,
|
|
524
|
+
moduleProgressOverviewDetail: ji,
|
|
525
|
+
moduleProgressOverviewItemsSummary: Ki,
|
|
526
|
+
moduleProgressOverviewGroupLabel: Yi,
|
|
527
|
+
moduleProgressOverviewPaginationLabel: Qi,
|
|
528
|
+
moduleProgressOverviewPageRange: Vi,
|
|
529
|
+
moduleProgressSegmentLabel: Xi,
|
|
530
|
+
durationMinutes: Zi,
|
|
531
|
+
durationHours: Ji,
|
|
532
|
+
durationHoursAndMinutes: ea,
|
|
533
|
+
itemUnpublishedLabel: ta,
|
|
534
|
+
itemUntitled: na,
|
|
535
|
+
opensInNewWindow: oa,
|
|
536
|
+
organizeModulesTrigger: ra,
|
|
537
|
+
organizeModalLabel: sa,
|
|
538
|
+
organizeProgressionLegend: ia,
|
|
539
|
+
organizeSetPrerequisites: aa,
|
|
540
|
+
organizeSetRequirements: ca,
|
|
541
|
+
organizeCloseModal: la,
|
|
542
|
+
organizeModeLegend: ua,
|
|
543
|
+
organizeModePlaceNew: da,
|
|
544
|
+
organizeModeReorganizeAll: ma,
|
|
545
|
+
organizeReorganizeWarning: pa,
|
|
546
|
+
organizeContentTypesLegend: ga,
|
|
547
|
+
organizeDirectionLabel: fa,
|
|
548
|
+
organizeDirectionPlaceholder: ha,
|
|
549
|
+
organizeDirectionCount: ba,
|
|
550
|
+
organizeErrorPickAContentType: ya,
|
|
551
|
+
organizeSubmit: Ia,
|
|
552
|
+
organizeCancel: Sa,
|
|
553
|
+
organizeStartOver: Ma,
|
|
554
|
+
organizeRegenerate: Ta,
|
|
555
|
+
organizeApply: wa,
|
|
556
|
+
organizeTryAgain: va,
|
|
557
|
+
organizeLoadingLabel: Ea,
|
|
558
|
+
organizeApplyingLabel: Pa,
|
|
559
|
+
organizeStillWorking: Ca,
|
|
560
|
+
organizeProposalReadyAnnouncement: _a,
|
|
561
|
+
organizeAppliedAnnouncement: Aa,
|
|
562
|
+
organizeFailed: Da,
|
|
563
|
+
organizeApplyFailed: La,
|
|
564
|
+
organizePreviewHeading: xa,
|
|
565
|
+
organizeNewModuleLabel: Ra,
|
|
566
|
+
organizeItemsAddedLabel: Na,
|
|
567
|
+
organizeNewItemPill: Oa,
|
|
568
|
+
metaFieldNewPlacementLabel: ka,
|
|
569
|
+
organizeUnplacedHeading: Fa,
|
|
570
|
+
organizeUnplacedExplanation: qa,
|
|
571
|
+
organizeWarningsHeading: za,
|
|
572
|
+
editNoModulesTitle: Ua,
|
|
573
|
+
editNoModulesDescription: $a,
|
|
574
|
+
moduleItemCount: Ba,
|
|
575
|
+
moduleRequirementAll: Wa,
|
|
576
|
+
moduleRequirementAllInOrder: Ha,
|
|
577
|
+
moduleRequirementOne: Ga,
|
|
578
|
+
itemRequiredTag: ja,
|
|
579
|
+
itemOptionalTag: Ka,
|
|
580
|
+
moduleRequiredPill: Ya,
|
|
581
|
+
dragHandleLabel: Qa,
|
|
582
|
+
dragRoleDescription: Va,
|
|
583
|
+
dragInstructions: Xa,
|
|
584
|
+
dragPickedUp: Za,
|
|
585
|
+
dragOverPosition: Ja,
|
|
586
|
+
dragOverPositionInModule: ec,
|
|
587
|
+
dragOverNothing: tc,
|
|
588
|
+
dragDroppedPosition: nc,
|
|
589
|
+
dragDroppedPositionInModule: oc,
|
|
590
|
+
dragDroppedNowhere: rc,
|
|
591
|
+
dragCanceled: sc
|
|
592
|
+
}, ac = /%\{(\w+)\}/g, cc = ic, fe = "en-US", lc = /* @__PURE__ */ new Map(), uc = /* @__PURE__ */ new Map();
|
|
593
|
+
function Io(e, t, n) {
|
|
594
|
+
const o = e.get(t);
|
|
595
|
+
if (o) return o;
|
|
596
|
+
const r = n();
|
|
597
|
+
return e.set(t, r), r;
|
|
598
|
+
}
|
|
599
|
+
function dc(e, t, n) {
|
|
600
|
+
return n ? e.replace(ac, (o, r) => {
|
|
601
|
+
if (!Object.prototype.hasOwnProperty.call(n, r)) return o;
|
|
602
|
+
const s = n[r];
|
|
603
|
+
return typeof s == "number" && Number.isFinite(s) ? Io(uc, t, () => new Intl.NumberFormat(t)).format(s) : String(s);
|
|
604
|
+
}) : e;
|
|
605
|
+
}
|
|
606
|
+
function mc(e, t, n) {
|
|
607
|
+
const o = n == null ? void 0 : n.count;
|
|
608
|
+
if (typeof o == "number" && Number.isFinite(o)) {
|
|
609
|
+
const r = Io(lc, t, () => new Intl.PluralRules(t)).select(o), s = e[r];
|
|
610
|
+
if (typeof s == "string") return s;
|
|
611
|
+
}
|
|
612
|
+
return typeof e.other == "string" ? e.other : void 0;
|
|
613
|
+
}
|
|
614
|
+
function Cn(e, t, n) {
|
|
615
|
+
if (typeof e == "string") return e;
|
|
616
|
+
if (e !== null && typeof e == "object")
|
|
617
|
+
return mc(e, t, n);
|
|
618
|
+
}
|
|
619
|
+
const _n = /* @__PURE__ */ new Set();
|
|
620
|
+
function pc(e) {
|
|
621
|
+
_n.has(e) || (_n.add(e), console.warn(
|
|
622
|
+
`[platform-modules] no translation for "${e}"; it will render as itself. Add it to the catalog passed to ModulesI18nProvider.`
|
|
623
|
+
));
|
|
624
|
+
}
|
|
625
|
+
function gc(e, t, n, o, r) {
|
|
626
|
+
const s = Cn(e == null ? void 0 : e[t], n, r);
|
|
627
|
+
if (typeof s == "string") return s;
|
|
628
|
+
const i = Cn(cc[t], n, r);
|
|
629
|
+
return typeof i == "string" ? i : (o && pc(t), t);
|
|
630
|
+
}
|
|
631
|
+
function So(e, t = fe, n = !1) {
|
|
632
|
+
return (o, r) => dc(gc(e, o, t, n, r), t, r);
|
|
633
|
+
}
|
|
634
|
+
const fc = So(), hc = { t: fc, locale: fe }, Pt = Lt(null);
|
|
635
|
+
function Wu({
|
|
636
|
+
translations: e,
|
|
637
|
+
locale: t,
|
|
638
|
+
timezone: n,
|
|
639
|
+
warnOnMissingKey: o,
|
|
640
|
+
children: r
|
|
641
|
+
}) {
|
|
642
|
+
const s = ct(Pt), i = W(() => {
|
|
643
|
+
const u = (s == null ? void 0 : s.translations) === void 0 ? e : { ...s.translations, ...e }, m = t ?? (s == null ? void 0 : s.locale) ?? fe;
|
|
644
|
+
return {
|
|
645
|
+
t: So(u, m, o),
|
|
646
|
+
locale: m,
|
|
647
|
+
timezone: n ?? (s == null ? void 0 : s.timezone),
|
|
648
|
+
translations: u
|
|
649
|
+
};
|
|
650
|
+
}, [s, e, t, n, o]);
|
|
651
|
+
return /* @__PURE__ */ c(Pt.Provider, { value: i, children: r });
|
|
652
|
+
}
|
|
653
|
+
function ee() {
|
|
654
|
+
return ct(Pt) ?? hc;
|
|
655
|
+
}
|
|
656
|
+
const Ct = 864e5, _t = "en-US", An = /* @__PURE__ */ new Map(), Dn = /* @__PURE__ */ new Map();
|
|
657
|
+
function bc(e) {
|
|
658
|
+
const t = Dn.get(e);
|
|
659
|
+
if (t) return t;
|
|
660
|
+
const n = new Intl.NumberFormat(e, { useGrouping: !1 });
|
|
661
|
+
return Dn.set(e, n), n;
|
|
662
|
+
}
|
|
663
|
+
function Ln(e, t) {
|
|
664
|
+
return {
|
|
665
|
+
time: new Intl.DateTimeFormat(e, {
|
|
666
|
+
hour: "numeric",
|
|
667
|
+
minute: "2-digit",
|
|
668
|
+
timeZone: t
|
|
669
|
+
}),
|
|
670
|
+
day: new Intl.DateTimeFormat(e, { month: "long", day: "numeric", timeZone: t }),
|
|
671
|
+
dayYear: new Intl.DateTimeFormat(e, {
|
|
672
|
+
month: "long",
|
|
673
|
+
day: "numeric",
|
|
674
|
+
year: "numeric",
|
|
675
|
+
timeZone: t
|
|
676
|
+
}),
|
|
677
|
+
zone: t ? new Intl.DateTimeFormat(e, { timeZone: t, timeZoneName: "short" }) : void 0,
|
|
678
|
+
civilDay: new Intl.DateTimeFormat(_t, {
|
|
679
|
+
year: "numeric",
|
|
680
|
+
month: "numeric",
|
|
681
|
+
day: "numeric",
|
|
682
|
+
timeZone: t
|
|
683
|
+
})
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
function Ut(e, t) {
|
|
687
|
+
const n = t || void 0, o = `${e}|${n ?? ""}`, r = An.get(o);
|
|
688
|
+
if (r) return r;
|
|
689
|
+
let s;
|
|
690
|
+
try {
|
|
691
|
+
s = Ln(e, n);
|
|
692
|
+
} catch {
|
|
693
|
+
console.warn(
|
|
694
|
+
`[platform-modules] Unusable timezone ${JSON.stringify(n)}; rendering dates in the viewer's own clock instead.`
|
|
695
|
+
), s = Ln(e, void 0);
|
|
696
|
+
}
|
|
697
|
+
return An.set(o, s), s;
|
|
698
|
+
}
|
|
699
|
+
function xn(e, t) {
|
|
700
|
+
return new Date(st(e, t)).getUTCFullYear();
|
|
701
|
+
}
|
|
702
|
+
function yc(e, t) {
|
|
703
|
+
var o;
|
|
704
|
+
const n = (o = e.zone) == null ? void 0 : o.formatToParts(t).find((r) => r.type === "timeZoneName");
|
|
705
|
+
return (n == null ? void 0 : n.value) ?? null;
|
|
706
|
+
}
|
|
707
|
+
function Mo(e, t) {
|
|
708
|
+
var n;
|
|
709
|
+
return Number((n = e.find((o) => o.type === t)) == null ? void 0 : n.value);
|
|
710
|
+
}
|
|
711
|
+
function st(e, t) {
|
|
712
|
+
const n = e.civilDay.formatToParts(t), o = (r) => Mo(n, r);
|
|
713
|
+
return Date.UTC(o("year"), o("month") - 1, o("day"));
|
|
714
|
+
}
|
|
715
|
+
function Ic(e, t, n) {
|
|
716
|
+
return Po(Ut(fe, n), e, t);
|
|
717
|
+
}
|
|
718
|
+
const Rn = {
|
|
719
|
+
hour12: !1,
|
|
720
|
+
year: "numeric",
|
|
721
|
+
month: "numeric",
|
|
722
|
+
day: "numeric",
|
|
723
|
+
hour: "numeric",
|
|
724
|
+
minute: "numeric",
|
|
725
|
+
second: "numeric"
|
|
726
|
+
}, Nn = /* @__PURE__ */ new Map();
|
|
727
|
+
function Sc(e) {
|
|
728
|
+
const t = e || void 0, n = t ?? "", o = Nn.get(n);
|
|
729
|
+
if (o) return o;
|
|
730
|
+
let r;
|
|
731
|
+
try {
|
|
732
|
+
r = new Intl.DateTimeFormat(_t, { ...Rn, timeZone: t });
|
|
733
|
+
} catch {
|
|
734
|
+
r = new Intl.DateTimeFormat(_t, Rn);
|
|
735
|
+
}
|
|
736
|
+
return Nn.set(n, r), r;
|
|
737
|
+
}
|
|
738
|
+
function On(e, t) {
|
|
739
|
+
const n = Sc(e).formatToParts(t), o = (s) => Mo(n, s);
|
|
740
|
+
return Date.UTC(
|
|
741
|
+
o("year"),
|
|
742
|
+
o("month") - 1,
|
|
743
|
+
o("day"),
|
|
744
|
+
o("hour") % 24,
|
|
745
|
+
o("minute"),
|
|
746
|
+
o("second")
|
|
747
|
+
) - Math.floor(t.getTime() / 1e3) * 1e3;
|
|
748
|
+
}
|
|
749
|
+
function kn(e, t) {
|
|
750
|
+
const n = st(Ut(fe, t), e), o = new Date(n - On(t, e));
|
|
751
|
+
return n - On(t, o);
|
|
752
|
+
}
|
|
753
|
+
function Mc(e, t, n) {
|
|
754
|
+
const o = kn(e, n), r = new Date(o + t * Ct + Ct / 2);
|
|
755
|
+
return {
|
|
756
|
+
start: e.toISOString(),
|
|
757
|
+
end: new Date(kn(r, n) - 1).toISOString()
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
const To = 7;
|
|
761
|
+
function wo(e) {
|
|
762
|
+
if (!e) return null;
|
|
763
|
+
const t = new Date(e);
|
|
764
|
+
return Number.isNaN(t.getTime()) ? null : t;
|
|
765
|
+
}
|
|
766
|
+
function vo(e, t, n) {
|
|
767
|
+
const o = wo(e);
|
|
768
|
+
return o === null || Eo(e, t) ? !1 : Ic(o, t, n) < To;
|
|
769
|
+
}
|
|
770
|
+
function Eo(e, t) {
|
|
771
|
+
const n = wo(e);
|
|
772
|
+
return n !== null && n.getTime() < t.getTime();
|
|
773
|
+
}
|
|
774
|
+
function Po(e, t, n) {
|
|
775
|
+
return Math.round((st(e, t) - st(e, n)) / Ct);
|
|
776
|
+
}
|
|
777
|
+
function Tc(e, t, n, { locale: o = fe, timezone: r } = {}) {
|
|
778
|
+
const s = new Date(t);
|
|
779
|
+
if (Number.isNaN(s.getTime())) return t;
|
|
780
|
+
const i = Ut(o, r), u = yc(i, s), m = i.time.format(s), p = u ? e("timeWithZone", { time: m, zone: u }) : m, b = Po(i, s, n);
|
|
781
|
+
if (b === 0) return e("dateTimeToday", { time: p });
|
|
782
|
+
if (b === -1) return e("dateTimeYesterday", { time: p });
|
|
783
|
+
if (b === 1) return e("dateTimeTomorrow", { time: p });
|
|
784
|
+
const h = xn(i, s) === xn(i, n) ? i.day.format(s) : i.dayYear.format(s);
|
|
785
|
+
return e("dateTimeWithDate", { date: h, time: p });
|
|
786
|
+
}
|
|
787
|
+
function Co(e, t = fe) {
|
|
788
|
+
return !Number.isInteger(e) || e < 1 ? null : bc(t).format(e);
|
|
789
|
+
}
|
|
790
|
+
function wc(e, t, n = fe) {
|
|
791
|
+
if (!e || t === void 0) return null;
|
|
792
|
+
const o = Co(t, n);
|
|
793
|
+
return o === null ? null : `${e}.${o}`;
|
|
794
|
+
}
|
|
795
|
+
function vc(e, t) {
|
|
796
|
+
return t == null ? null : e("pointsAbbreviated", { count: t });
|
|
797
|
+
}
|
|
798
|
+
function Ec(e, t) {
|
|
799
|
+
switch (t.type) {
|
|
800
|
+
case "must_view":
|
|
801
|
+
return e("requirementMustView");
|
|
802
|
+
case "must_submit":
|
|
803
|
+
return e("requirementMustSubmit");
|
|
804
|
+
case "must_contribute":
|
|
805
|
+
return e("requirementMustContribute");
|
|
806
|
+
case "must_mark_done":
|
|
807
|
+
return e("requirementMustMarkDone");
|
|
808
|
+
case "min_score":
|
|
809
|
+
return t.minScore === null || t.minScore === void 0 ? e("requirementMinScoreUnknown") : e("requirementMinScore", { count: t.minScore });
|
|
810
|
+
case "min_percentage":
|
|
811
|
+
return t.minPercentage === null || t.minPercentage === void 0 ? e("requirementMinPercentageUnknown") : e("requirementMinPercentage", { count: t.minPercentage });
|
|
812
|
+
case "unknown":
|
|
813
|
+
return e("requirementUnknown");
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
function Pc(e, t, n) {
|
|
817
|
+
return e("progressSummary", { met: t, count: n });
|
|
818
|
+
}
|
|
819
|
+
function Hu(e, t, n) {
|
|
820
|
+
return e("progressScreenReaderValue", { met: t, count: n });
|
|
821
|
+
}
|
|
822
|
+
function Cc(e) {
|
|
823
|
+
if (!e) return null;
|
|
824
|
+
const t = e.map((n) => fo(n)).filter((n) => n !== null);
|
|
825
|
+
return t.length === 0 ? null : t.reduce((n, o) => n + o, 0);
|
|
826
|
+
}
|
|
827
|
+
function Gu(e) {
|
|
828
|
+
if (!e) return null;
|
|
829
|
+
const t = e.filter((n) => n.status !== void 0 && n.status !== "complete");
|
|
830
|
+
return Cc(t);
|
|
831
|
+
}
|
|
832
|
+
function _o(e) {
|
|
833
|
+
return { hours: Math.floor(e / 60), mins: e % 60 };
|
|
834
|
+
}
|
|
835
|
+
function Ao(e, t) {
|
|
836
|
+
const { hours: n, mins: o } = _o(t);
|
|
837
|
+
return n > 0 && o > 0 ? e("estimatedDurationHoursAndMinutes", { hours: n, minutes: o }) : n > 0 ? e("estimatedDurationHours", { count: n }) : e("estimatedDurationMinutesAbbreviated", { count: o });
|
|
838
|
+
}
|
|
839
|
+
function _c(e, t) {
|
|
840
|
+
return e("estimatedDurationByline", { duration: Ao(e, t) });
|
|
841
|
+
}
|
|
842
|
+
function Ac(e, t) {
|
|
843
|
+
return e("remainingDurationByline", { duration: Ao(e, t) });
|
|
844
|
+
}
|
|
845
|
+
function Dc(e, t) {
|
|
846
|
+
const { hours: n, mins: o } = _o(t);
|
|
847
|
+
return n > 0 && o > 0 ? e("durationHoursAndMinutes", { hours: n, minutes: o }) : n > 0 ? e("durationHours", { count: n }) : e("durationMinutes", { count: o });
|
|
848
|
+
}
|
|
849
|
+
const Lc = "all", xc = To, Rc = {
|
|
850
|
+
all: {
|
|
851
|
+
label: "filterAll",
|
|
852
|
+
order: 10,
|
|
853
|
+
unfiltered: !0,
|
|
854
|
+
predicate: () => !0
|
|
855
|
+
},
|
|
856
|
+
not_started: {
|
|
857
|
+
label: "filterNotStarted",
|
|
858
|
+
order: 15,
|
|
859
|
+
predicate: (e) => {
|
|
860
|
+
var t;
|
|
861
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "not_started";
|
|
862
|
+
},
|
|
863
|
+
query: { target: "module", field: "moduleStatus", op: "eq", value: "not_started" }
|
|
864
|
+
},
|
|
865
|
+
in_progress: {
|
|
866
|
+
label: "filterInProgress",
|
|
867
|
+
order: 20,
|
|
868
|
+
predicate: (e) => {
|
|
869
|
+
var t;
|
|
870
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "in_progress";
|
|
871
|
+
},
|
|
872
|
+
query: { target: "module", field: "moduleStatus", op: "eq", value: "in_progress" }
|
|
873
|
+
},
|
|
874
|
+
complete: {
|
|
875
|
+
label: "filterComplete",
|
|
876
|
+
order: 30,
|
|
877
|
+
predicate: (e) => {
|
|
878
|
+
var t;
|
|
879
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "complete";
|
|
880
|
+
},
|
|
881
|
+
query: { target: "module", field: "completionStatus", op: "eq", value: "COMPLETED" }
|
|
882
|
+
},
|
|
883
|
+
due_this_week: {
|
|
884
|
+
label: "filterDueThisWeek",
|
|
885
|
+
order: 40,
|
|
886
|
+
predicate: (e, { today: t, timezone: n }) => {
|
|
887
|
+
var o;
|
|
888
|
+
return vo((o = e.progress) == null ? void 0 : o.nextDueAt, t, n);
|
|
889
|
+
},
|
|
890
|
+
query: {
|
|
891
|
+
target: "module",
|
|
892
|
+
field: "dueWithinDays",
|
|
893
|
+
op: "within",
|
|
894
|
+
value: xc
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
missing: {
|
|
898
|
+
label: "filterMissing",
|
|
899
|
+
order: 50,
|
|
900
|
+
predicate: (e) => {
|
|
901
|
+
var t;
|
|
902
|
+
return ((t = e.progress) == null ? void 0 : t.status) === "missing";
|
|
903
|
+
},
|
|
904
|
+
query: { target: "module", field: "moduleStatus", op: "eq", value: "missing" }
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
function $t(e) {
|
|
908
|
+
return e == null ? void 0 : e.query;
|
|
909
|
+
}
|
|
910
|
+
function Do(e) {
|
|
911
|
+
return (e == null ? void 0 : e.unfiltered) === !0;
|
|
912
|
+
}
|
|
913
|
+
function Fn(e) {
|
|
914
|
+
return e !== void 0 && !Do(e);
|
|
915
|
+
}
|
|
916
|
+
function Nc(e) {
|
|
917
|
+
return e !== void 0 && $t(e) === void 0;
|
|
918
|
+
}
|
|
919
|
+
const Oc = {
|
|
920
|
+
moduleLabel: (e, t, { locale: n }) => Co(e, n),
|
|
921
|
+
dateTime: (e, t, { t: n, locale: o, timezone: r }) => Tc(n, e, t, { locale: o, timezone: r }),
|
|
922
|
+
points: (e, { t }) => vc(t, e),
|
|
923
|
+
progress: (e, t, n, { t: o }) => Pc(o, t, n)
|
|
924
|
+
}, ae = { size: "xs", color: "mutedColor" }, kc = {
|
|
925
|
+
assignment: {
|
|
926
|
+
label: "itemTypeAssignment",
|
|
927
|
+
order: 10,
|
|
928
|
+
icon: /* @__PURE__ */ c(fr, { ...ae })
|
|
929
|
+
},
|
|
930
|
+
quiz: { label: "itemTypeQuiz", order: 20, icon: /* @__PURE__ */ c(gr, { ...ae }) },
|
|
931
|
+
discussion: {
|
|
932
|
+
label: "itemTypeDiscussion",
|
|
933
|
+
order: 30,
|
|
934
|
+
icon: /* @__PURE__ */ c(pr, { ...ae })
|
|
935
|
+
},
|
|
936
|
+
page: { label: "itemTypePage", order: 40, icon: /* @__PURE__ */ c(mr, { ...ae }) },
|
|
937
|
+
file: { label: "itemTypeFile", order: 50, icon: /* @__PURE__ */ c(dr, { ...ae }) },
|
|
938
|
+
external_url: {
|
|
939
|
+
label: "itemTypeExternalUrl",
|
|
940
|
+
order: 60,
|
|
941
|
+
icon: /* @__PURE__ */ c(ur, { ...ae })
|
|
942
|
+
},
|
|
943
|
+
external_tool: {
|
|
944
|
+
label: "itemTypeExternalTool",
|
|
945
|
+
order: 70,
|
|
946
|
+
icon: /* @__PURE__ */ c(lr, { ...ae })
|
|
947
|
+
},
|
|
948
|
+
sub_header: { label: "itemTypeSubHeader", order: 80, icon: null }
|
|
949
|
+
}, ju = "type", Fc = { fontSizeMedium: "inherit" }, qn = /* @__PURE__ */ c(Ot, { ...ae });
|
|
950
|
+
function zn({ item: e, today: t }) {
|
|
951
|
+
return e.status !== "complete" && e.status !== "locked" && Eo(e.dueAt, t);
|
|
952
|
+
}
|
|
953
|
+
const qc = {
|
|
954
|
+
type: {
|
|
955
|
+
label: "metaFieldTypeLabel",
|
|
956
|
+
order: 10,
|
|
957
|
+
renderIcon: ({ item: e, config: t }) => {
|
|
958
|
+
const n = De(t.itemTypes, e.type);
|
|
959
|
+
return n ? n.renderIcon ? n.renderIcon({ item: e }) : n.icon : null;
|
|
960
|
+
},
|
|
961
|
+
render: ({ item: e, t, config: n }) => {
|
|
962
|
+
const o = De(n.itemTypes, e.type);
|
|
963
|
+
return o ? t(o.label) : null;
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
points: {
|
|
967
|
+
label: "metaFieldPointsLabel",
|
|
968
|
+
order: 20,
|
|
969
|
+
render: ({ item: e, formatters: t }) => t.points(e.pointsPossible)
|
|
970
|
+
},
|
|
971
|
+
requirement: {
|
|
972
|
+
label: "metaFieldRequirementLabel",
|
|
973
|
+
order: 30,
|
|
974
|
+
render: ({ item: e, t }) => e.completionRequirement ? Ec(t, e.completionRequirement) : null
|
|
975
|
+
},
|
|
976
|
+
dueAt: {
|
|
977
|
+
label: "metaFieldDueAtLabel",
|
|
978
|
+
order: 40,
|
|
979
|
+
icon: qn,
|
|
980
|
+
/** Only the shipped glyph reddens; a host that cleared or replaced it keeps what it set. */
|
|
981
|
+
renderIcon: (e) => {
|
|
982
|
+
var n;
|
|
983
|
+
const t = (n = e.config.itemMeta.dueAt) == null ? void 0 : n.icon;
|
|
984
|
+
return t !== qn || !zn(e) ? t : /* @__PURE__ */ c(Ot, { ...ae, color: "errorColor" });
|
|
985
|
+
},
|
|
986
|
+
render: (e) => {
|
|
987
|
+
const { item: t, today: n, formatters: o } = e;
|
|
988
|
+
return t.dueAt ? zn(e) ? /* @__PURE__ */ c(be, { color: "danger", themeOverride: Fc, children: o.pastDueByline(t.dueAt, n) }) : o.dueByline(t.dueAt, n) : null;
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
estimatedDuration: {
|
|
992
|
+
label: "metaFieldDurationLabel",
|
|
993
|
+
order: 50,
|
|
994
|
+
icon: /* @__PURE__ */ c(hr, { ...ae }),
|
|
995
|
+
render: ({ item: e, t }) => {
|
|
996
|
+
const n = fo(e);
|
|
997
|
+
return n === null ? null : Dc(t, n);
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
unpublished: {
|
|
1001
|
+
label: "metaFieldPublishStateLabel",
|
|
1002
|
+
order: 60,
|
|
1003
|
+
render: ({ item: e, t }) => e.published ? null : t("itemUnpublishedLabel")
|
|
1004
|
+
}
|
|
1005
|
+
}, Bt = {
|
|
1006
|
+
formatters: Oc,
|
|
1007
|
+
itemTypes: kc,
|
|
1008
|
+
itemStatuses: {},
|
|
1009
|
+
itemMeta: qc,
|
|
1010
|
+
filters: Rc,
|
|
1011
|
+
moduleActions: {},
|
|
1012
|
+
itemActions: {},
|
|
1013
|
+
navigation: {},
|
|
1014
|
+
permissions: {},
|
|
1015
|
+
notify: void 0
|
|
1016
|
+
};
|
|
1017
|
+
Object.freeze(Bt);
|
|
1018
|
+
for (const e of Object.values(Bt)) {
|
|
1019
|
+
Object.freeze(e);
|
|
1020
|
+
for (const t of Object.values(e ?? {})) Object.freeze(t);
|
|
1021
|
+
}
|
|
1022
|
+
function zc(e, t) {
|
|
1023
|
+
return yo(e).filter((n) => {
|
|
1024
|
+
if (Do(n)) return !1;
|
|
1025
|
+
const o = $t(n);
|
|
1026
|
+
return o === void 0 ? !0 : !Ar(t, o);
|
|
1027
|
+
}).map((n) => n.key);
|
|
1028
|
+
}
|
|
1029
|
+
function Un(e) {
|
|
1030
|
+
return `[platform-modules] the adapter cannot serve filter(s): ${e.join(", ")}. Give the entry a query the adapter's capabilities declare, or mark it unfiltered.`;
|
|
1031
|
+
}
|
|
1032
|
+
function Uc(e, t) {
|
|
1033
|
+
const n = zc(e, t);
|
|
1034
|
+
if (n.length === 0) return e;
|
|
1035
|
+
if (process.env.NODE_ENV !== "production")
|
|
1036
|
+
throw new Error(Un(n));
|
|
1037
|
+
console.warn(Un(n));
|
|
1038
|
+
const o = Object.fromEntries(n.map((r) => [r, { ...e[r], hidden: !0 }]));
|
|
1039
|
+
return { ...e, ...o };
|
|
1040
|
+
}
|
|
1041
|
+
const Lo = Lt(null);
|
|
1042
|
+
function Ku({ value: e, children: t }) {
|
|
1043
|
+
return /* @__PURE__ */ c(Lo.Provider, { value: e, children: t });
|
|
1044
|
+
}
|
|
1045
|
+
function ut() {
|
|
1046
|
+
return ct(Lo) ?? Bt;
|
|
1047
|
+
}
|
|
1048
|
+
function Yu(e) {
|
|
1049
|
+
return De(ut().itemMeta, e) !== void 0;
|
|
1050
|
+
}
|
|
1051
|
+
const He = a.object({
|
|
1052
|
+
label: a.string(),
|
|
1053
|
+
order: a.number(),
|
|
1054
|
+
hidden: a.boolean().optional()
|
|
1055
|
+
});
|
|
1056
|
+
function Ee(e) {
|
|
1057
|
+
return a.record(a.string(), e);
|
|
1058
|
+
}
|
|
1059
|
+
const $c = Ee(He.strict()), Wt = (e) => e == null || typeof e == "string" || typeof e == "number" || typeof e == "bigint" || typeof e == "boolean" || xt(e) || Array.isArray(e) && e.every(Wt), xo = (e) => {
|
|
1060
|
+
var t;
|
|
1061
|
+
return e == null || typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
|
|
1062
|
+
}, Bc = He.extend({
|
|
1063
|
+
icon: a.custom(Wt, { message: "icon must be a ReactNode" }),
|
|
1064
|
+
renderIcon: a.custom(xo, {
|
|
1065
|
+
message: "renderIcon must be a function of the item, not a React component"
|
|
1066
|
+
})
|
|
1067
|
+
}).strict(), Ro = (e) => {
|
|
1068
|
+
var t;
|
|
1069
|
+
return typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
|
|
1070
|
+
}, $n = (e) => e == null || Ro(e), Bn = He.extend({
|
|
1071
|
+
onSelect: a.custom(Ro, {
|
|
1072
|
+
message: "onSelect must be a function taking an ActionContext"
|
|
1073
|
+
}),
|
|
1074
|
+
visible: a.custom($n, {
|
|
1075
|
+
message: "visible must be a function taking an ActionContext, not a React component"
|
|
1076
|
+
}),
|
|
1077
|
+
renderModal: a.custom($n, {
|
|
1078
|
+
message: "renderModal must be a function taking an ActionContext, not a React component"
|
|
1079
|
+
})
|
|
1080
|
+
}).strict();
|
|
1081
|
+
function Je() {
|
|
1082
|
+
return a.custom((e) => typeof e == "function", {
|
|
1083
|
+
message: "Expected a function"
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
const Wc = He.extend({
|
|
1087
|
+
render: a.custom((e) => typeof e == "function", {
|
|
1088
|
+
message: "render must be a function taking a MetaFieldContext"
|
|
1089
|
+
}),
|
|
1090
|
+
icon: a.custom(Wt, { message: "icon must be a ReactNode" }),
|
|
1091
|
+
renderIcon: a.custom(xo, {
|
|
1092
|
+
message: "renderIcon must be a function of the field context, not a React component"
|
|
1093
|
+
})
|
|
1094
|
+
}).strict(), Hc = He.extend({
|
|
1095
|
+
predicate: a.custom((e) => typeof e == "function", {
|
|
1096
|
+
message: "predicate must be a function of the module and a FilterContext"
|
|
1097
|
+
}),
|
|
1098
|
+
query: _r.optional(),
|
|
1099
|
+
unfiltered: a.boolean().optional()
|
|
1100
|
+
}).strict(), $e = () => a.custom((e) => typeof e == "function", { message: "Expected a function" }).optional(), Gc = a.object({
|
|
1101
|
+
getItemHref: $e(),
|
|
1102
|
+
getItemEditHref: $e(),
|
|
1103
|
+
getModuleHref: $e(),
|
|
1104
|
+
onItemClick: $e()
|
|
1105
|
+
}).strict(), jc = a.object({
|
|
1106
|
+
createModule: a.boolean().optional(),
|
|
1107
|
+
updateModule: a.boolean().optional(),
|
|
1108
|
+
deleteModule: a.boolean().optional(),
|
|
1109
|
+
reorderModules: a.boolean().optional(),
|
|
1110
|
+
setModulesPublished: a.boolean().optional(),
|
|
1111
|
+
createModuleItem: a.boolean().optional(),
|
|
1112
|
+
updateModuleItem: a.boolean().optional(),
|
|
1113
|
+
deleteModuleItem: a.boolean().optional(),
|
|
1114
|
+
reorderModuleItems: a.boolean().optional()
|
|
1115
|
+
}).strict(), Qu = a.object({
|
|
1116
|
+
formatters: a.object({
|
|
1117
|
+
moduleLabel: Je(),
|
|
1118
|
+
dateTime: Je(),
|
|
1119
|
+
points: Je(),
|
|
1120
|
+
progress: Je()
|
|
1121
|
+
}).strict(),
|
|
1122
|
+
itemTypes: Ee(Bc),
|
|
1123
|
+
itemStatuses: $c,
|
|
1124
|
+
itemMeta: Ee(Wc),
|
|
1125
|
+
filters: Ee(Hc),
|
|
1126
|
+
moduleActions: Ee(Bn),
|
|
1127
|
+
itemActions: Ee(Bn),
|
|
1128
|
+
navigation: Gc,
|
|
1129
|
+
permissions: jc,
|
|
1130
|
+
notify: $e()
|
|
1131
|
+
});
|
|
1132
|
+
function No() {
|
|
1133
|
+
const { formatters: e } = ut(), { t, locale: n, timezone: o } = ee();
|
|
1134
|
+
return W(() => {
|
|
1135
|
+
const r = { t, locale: n, timezone: o }, s = (i, u) => e.dateTime(i, u, r);
|
|
1136
|
+
return {
|
|
1137
|
+
moduleLabel: (i, u) => e.moduleLabel(i, u, r) || null,
|
|
1138
|
+
dueByline: (i, u) => t("dueByline", { when: s(i, u) }),
|
|
1139
|
+
pastDueByline: (i, u) => t("pastDueByline", { when: s(i, u) }),
|
|
1140
|
+
unlockByline: (i, u) => t("unlockByline", { when: s(i, u) }),
|
|
1141
|
+
unlockedByline: (i, u) => t("unlockedByline", { when: s(i, u) }),
|
|
1142
|
+
estimatedDurationByline: (i) => _c(t, i),
|
|
1143
|
+
remainingDurationByline: (i) => Ac(t, i),
|
|
1144
|
+
points: (i) => e.points(i, r),
|
|
1145
|
+
progress: (i, u, m) => e.progress(i, u, m, r)
|
|
1146
|
+
};
|
|
1147
|
+
}, [e, t, n, o]);
|
|
1148
|
+
}
|
|
1149
|
+
const Ht = 10, Kc = 4, Yc = 20, Oo = 100, Qc = 4, Vc = 4, Gt = 5 * 60 * 1e3, ko = 20, Xc = 300, Zc = 2;
|
|
1150
|
+
function Fo(e) {
|
|
1151
|
+
const {
|
|
1152
|
+
courseId: t,
|
|
1153
|
+
adapter: n,
|
|
1154
|
+
page: o,
|
|
1155
|
+
pageSize: r,
|
|
1156
|
+
includeItems: s,
|
|
1157
|
+
filter: i,
|
|
1158
|
+
dueRange: u,
|
|
1159
|
+
inlineItemsFirst: m,
|
|
1160
|
+
inlineFirst: p,
|
|
1161
|
+
view: b,
|
|
1162
|
+
staleTime: g,
|
|
1163
|
+
enabled: h
|
|
1164
|
+
} = e, E = lt(e.search);
|
|
1165
|
+
return {
|
|
1166
|
+
// `inlineItemsFirst`/`inlineFirst` are deliberately out of the key: derived from this list.
|
|
1167
|
+
queryKey: We.list(t, { view: b, pageSize: r, includeItems: s, filter: i, search: E, page: o }),
|
|
1168
|
+
queryFn: ({ signal: y }) => n.listModules({
|
|
1169
|
+
courseId: t,
|
|
1170
|
+
page: o,
|
|
1171
|
+
pageSize: r,
|
|
1172
|
+
includeItems: s,
|
|
1173
|
+
filter: i,
|
|
1174
|
+
dueRange: u,
|
|
1175
|
+
search: E,
|
|
1176
|
+
inlineItemsFirst: m,
|
|
1177
|
+
inlineFirst: p,
|
|
1178
|
+
signal: y
|
|
1179
|
+
}),
|
|
1180
|
+
enabled: h,
|
|
1181
|
+
staleTime: g,
|
|
1182
|
+
refetchOnWindowFocus: !1
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
1185
|
+
function Jc(e) {
|
|
1186
|
+
const { courseId: t, moduleId: n, adapter: o, page: r, pageSize: s, view: i, staleTime: u, enabled: m, limit: p } = e, b = lt(e.search);
|
|
1187
|
+
return {
|
|
1188
|
+
queryKey: We.items(t, n, { view: i, pageSize: s, search: b, page: r }),
|
|
1189
|
+
queryFn: ({ signal: g }) => {
|
|
1190
|
+
const h = () => o.listModuleItems({
|
|
1191
|
+
courseId: t,
|
|
1192
|
+
moduleId: n,
|
|
1193
|
+
page: r,
|
|
1194
|
+
pageSize: s,
|
|
1195
|
+
search: b,
|
|
1196
|
+
signal: g
|
|
1197
|
+
});
|
|
1198
|
+
return p ? p(() => {
|
|
1199
|
+
if (g.aborted)
|
|
1200
|
+
throw new DOMException("The operation was aborted.", "AbortError");
|
|
1201
|
+
return h();
|
|
1202
|
+
}) : h();
|
|
1203
|
+
},
|
|
1204
|
+
placeholderData: ro,
|
|
1205
|
+
enabled: m,
|
|
1206
|
+
staleTime: u,
|
|
1207
|
+
refetchOnWindowFocus: !1
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
const it = { request: { kind: "first" }, page: 1 };
|
|
1211
|
+
function Be(e, t) {
|
|
1212
|
+
return e === null ? 1 : Math.max(1, Math.ceil(e / t));
|
|
1213
|
+
}
|
|
1214
|
+
function el(e, t, n, o) {
|
|
1215
|
+
switch (e) {
|
|
1216
|
+
case "first":
|
|
1217
|
+
return it;
|
|
1218
|
+
case "previous":
|
|
1219
|
+
return t === 2 ? it : n.hasPreviousPage && n.startCursor !== null ? { request: { kind: "before", cursor: n.startCursor }, page: t - 1 } : null;
|
|
1220
|
+
case "next":
|
|
1221
|
+
return n.hasNextPage && n.endCursor !== null ? { request: { kind: "after", cursor: n.endCursor }, page: t + 1 } : null;
|
|
1222
|
+
case "last": {
|
|
1223
|
+
const r = n.totalCount;
|
|
1224
|
+
return r === null ? null : {
|
|
1225
|
+
request: { kind: "last", count: r % o || o },
|
|
1226
|
+
page: Be(r, o)
|
|
1227
|
+
};
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
const It = { kind: "first" }, tl = {
|
|
1232
|
+
hasNextPage: !1,
|
|
1233
|
+
endCursor: null,
|
|
1234
|
+
hasPreviousPage: !1,
|
|
1235
|
+
startCursor: null,
|
|
1236
|
+
totalCount: null,
|
|
1237
|
+
totalNrOfPages: null
|
|
1238
|
+
};
|
|
1239
|
+
function nl(e) {
|
|
1240
|
+
var le, he, Ie;
|
|
1241
|
+
const {
|
|
1242
|
+
courseId: t,
|
|
1243
|
+
adapter: n,
|
|
1244
|
+
pageSize: o = Ht,
|
|
1245
|
+
includeItems: r = !1,
|
|
1246
|
+
filter: s,
|
|
1247
|
+
dueRange: i,
|
|
1248
|
+
search: u,
|
|
1249
|
+
inlineItemsFirst: m,
|
|
1250
|
+
inlineFirst: p,
|
|
1251
|
+
view: b,
|
|
1252
|
+
staleTime: g = Gt,
|
|
1253
|
+
enabled: h = !0
|
|
1254
|
+
} = e, [E, y] = Q(It), [q, k] = Q(1), v = JSON.stringify([
|
|
1255
|
+
t,
|
|
1256
|
+
b,
|
|
1257
|
+
o,
|
|
1258
|
+
r,
|
|
1259
|
+
s,
|
|
1260
|
+
lt(u)
|
|
1261
|
+
]), R = C(v);
|
|
1262
|
+
ue(() => {
|
|
1263
|
+
R.current !== v && (R.current = v, y(It), k(1));
|
|
1264
|
+
}, [v]);
|
|
1265
|
+
const A = so({
|
|
1266
|
+
...Fo({
|
|
1267
|
+
courseId: t,
|
|
1268
|
+
adapter: n,
|
|
1269
|
+
page: E,
|
|
1270
|
+
pageSize: o,
|
|
1271
|
+
includeItems: r,
|
|
1272
|
+
filter: s,
|
|
1273
|
+
dueRange: i,
|
|
1274
|
+
search: u,
|
|
1275
|
+
inlineItemsFirst: m,
|
|
1276
|
+
inlineFirst: p,
|
|
1277
|
+
view: b,
|
|
1278
|
+
staleTime: g,
|
|
1279
|
+
enabled: h
|
|
1280
|
+
}),
|
|
1281
|
+
// `useItemsMode` shares `modulesQueryOptions`, and `inlineFirst` is out of that key.
|
|
1282
|
+
placeholderData: ro
|
|
1283
|
+
}), N = C(null);
|
|
1284
|
+
((le = A.data) == null ? void 0 : le.pageInfo.totalCount) != null && (N.current = A.data.pageInfo.totalCount);
|
|
1285
|
+
const L = C(1);
|
|
1286
|
+
A.isPlaceholderData || (L.current = q);
|
|
1287
|
+
const F = L.current, M = ((he = A.data) == null ? void 0 : he.pageInfo) ?? tl, T = ((Ie = A.data) == null ? void 0 : Ie.modules) ?? [], _ = M.totalCount, $ = Be(_, o), H = D(() => {
|
|
1288
|
+
y(It), k(1);
|
|
1289
|
+
}, []), V = M.hasPreviousPage, Y = M.startCursor, oe = D(() => {
|
|
1290
|
+
!V || Y === null || (y({ kind: "before", cursor: Y }), k(F - 1));
|
|
1291
|
+
}, [V, Y, F]), P = M.hasNextPage, U = M.endCursor, de = D(() => {
|
|
1292
|
+
!P || U === null || (y({ kind: "after", cursor: U }), k(F + 1));
|
|
1293
|
+
}, [P, U, F]), ce = D(() => {
|
|
1294
|
+
const te = N.current, me = te !== null && te > 0 && te % o || o;
|
|
1295
|
+
y({ kind: "last", count: me }), k($);
|
|
1296
|
+
}, [o, $]);
|
|
1297
|
+
return {
|
|
1298
|
+
modules: T,
|
|
1299
|
+
pageInfo: M,
|
|
1300
|
+
page: F,
|
|
1301
|
+
pageCount: $,
|
|
1302
|
+
hasNextPage: P,
|
|
1303
|
+
hasPreviousPage: V,
|
|
1304
|
+
goToFirstPage: H,
|
|
1305
|
+
goToPreviousPage: oe,
|
|
1306
|
+
goToNextPage: de,
|
|
1307
|
+
goToLastPage: ce,
|
|
1308
|
+
isLoading: A.isLoading,
|
|
1309
|
+
isPending: A.isPending,
|
|
1310
|
+
isPlaceholderData: A.isPlaceholderData,
|
|
1311
|
+
error: A.error
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
const ol = { kind: "first" };
|
|
1315
|
+
function rl(e, t, n = bo) {
|
|
1316
|
+
let o = 0, r = 0;
|
|
1317
|
+
for (const s of e.modules) {
|
|
1318
|
+
if (s.itemCount > t) return "onDemand";
|
|
1319
|
+
o += s.itemCount, s.itemCount > r && (r = s.itemCount);
|
|
1320
|
+
}
|
|
1321
|
+
return o > t * 2 ? "onDemand" : Math.max(e.modules.length, 1) * Math.max(r, 1) <= n ? "inline" : "onDemand";
|
|
1322
|
+
}
|
|
1323
|
+
function sl(e) {
|
|
1324
|
+
const {
|
|
1325
|
+
courseId: t,
|
|
1326
|
+
adapter: n,
|
|
1327
|
+
mode: o = "auto",
|
|
1328
|
+
inlineThreshold: r = Oo,
|
|
1329
|
+
nodeBudget: s = n.inlineNodeBudget ?? bo,
|
|
1330
|
+
pageSize: i = Ht,
|
|
1331
|
+
filter: u,
|
|
1332
|
+
dueRange: m,
|
|
1333
|
+
search: p,
|
|
1334
|
+
view: b,
|
|
1335
|
+
staleTime: g = Gt
|
|
1336
|
+
} = e, h = o === "auto", E = so(
|
|
1337
|
+
Fo({
|
|
1338
|
+
courseId: t,
|
|
1339
|
+
adapter: n,
|
|
1340
|
+
page: ol,
|
|
1341
|
+
pageSize: i,
|
|
1342
|
+
includeItems: !1,
|
|
1343
|
+
filter: u,
|
|
1344
|
+
dueRange: m,
|
|
1345
|
+
search: p,
|
|
1346
|
+
view: b,
|
|
1347
|
+
staleTime: g,
|
|
1348
|
+
enabled: h
|
|
1349
|
+
})
|
|
1350
|
+
);
|
|
1351
|
+
if (!h)
|
|
1352
|
+
return {
|
|
1353
|
+
resolvedMode: o,
|
|
1354
|
+
isResolving: !1,
|
|
1355
|
+
probed: !1,
|
|
1356
|
+
error: null,
|
|
1357
|
+
inlineShape: null
|
|
1358
|
+
};
|
|
1359
|
+
if (E.error)
|
|
1360
|
+
return {
|
|
1361
|
+
resolvedMode: "onDemand",
|
|
1362
|
+
isResolving: !1,
|
|
1363
|
+
probed: !0,
|
|
1364
|
+
error: E.error,
|
|
1365
|
+
inlineShape: null
|
|
1366
|
+
};
|
|
1367
|
+
const y = E.data;
|
|
1368
|
+
return y ? {
|
|
1369
|
+
resolvedMode: rl(y, r, s),
|
|
1370
|
+
isResolving: !1,
|
|
1371
|
+
probed: !0,
|
|
1372
|
+
error: null,
|
|
1373
|
+
inlineShape: il(y)
|
|
1374
|
+
} : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
|
|
1375
|
+
}
|
|
1376
|
+
function il(e) {
|
|
1377
|
+
let t = 1;
|
|
1378
|
+
for (const n of e.modules)
|
|
1379
|
+
n.itemCount > t && (t = n.itemCount);
|
|
1380
|
+
return { moduleCount: Math.max(e.modules.length, 1), maxItemCount: t };
|
|
1381
|
+
}
|
|
1382
|
+
const al = `(max-width: ${cr.mobileOnly.maxWidth})`;
|
|
1383
|
+
function Wn() {
|
|
1384
|
+
return typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia(al);
|
|
1385
|
+
}
|
|
1386
|
+
function cl() {
|
|
1387
|
+
const [e, t] = Q(() => {
|
|
1388
|
+
var n;
|
|
1389
|
+
return ((n = Wn()) == null ? void 0 : n.matches) ?? !1;
|
|
1390
|
+
});
|
|
1391
|
+
return ue(() => {
|
|
1392
|
+
const n = Wn();
|
|
1393
|
+
if (n === null) return;
|
|
1394
|
+
t(n.matches);
|
|
1395
|
+
const o = (r) => t(r.matches);
|
|
1396
|
+
return n.addEventListener("change", o), () => n.removeEventListener("change", o);
|
|
1397
|
+
}, []), e;
|
|
1398
|
+
}
|
|
1399
|
+
const St = "\0", ll = /* @__PURE__ */ new Map();
|
|
1400
|
+
function ul(e, t, {
|
|
1401
|
+
pageSize: n,
|
|
1402
|
+
retainCollapsedLimit: o = ko,
|
|
1403
|
+
partition: r = ""
|
|
1404
|
+
}) {
|
|
1405
|
+
const s = io(), i = C(/* @__PURE__ */ new Map()), u = C(/* @__PURE__ */ new Map()), m = `${n}${St}${r}`, p = C(m), [b, g] = Q(ll), h = e.join(St), E = W(() => h === "" ? [] : h.split(St), [h]);
|
|
1406
|
+
ue(() => {
|
|
1407
|
+
const v = i.current, R = u.current;
|
|
1408
|
+
p.current !== m && (R.clear(), p.current = m);
|
|
1409
|
+
const A = () => {
|
|
1410
|
+
g((M) => {
|
|
1411
|
+
const T = /* @__PURE__ */ new Map();
|
|
1412
|
+
let _ = M.size !== v.size;
|
|
1413
|
+
for (const [$, H] of v) {
|
|
1414
|
+
const V = H.getCurrentResult(), Y = R.get($), oe = Y ? V.isPlaceholderData ? Y.shownPage : Y.page : 1, P = M.get($);
|
|
1415
|
+
if (P && P.result === V && P.page === oe) {
|
|
1416
|
+
T.set($, P);
|
|
1417
|
+
continue;
|
|
1418
|
+
}
|
|
1419
|
+
T.set($, { result: V, page: oe }), _ = !0;
|
|
1420
|
+
}
|
|
1421
|
+
return _ ? T : M;
|
|
1422
|
+
});
|
|
1423
|
+
}, N = (M) => (R.get(M) ?? it).request, L = new Set(E);
|
|
1424
|
+
for (const M of E) {
|
|
1425
|
+
if (v.has(M)) continue;
|
|
1426
|
+
const T = new rr(
|
|
1427
|
+
s,
|
|
1428
|
+
t(M, !0, N(M))
|
|
1429
|
+
);
|
|
1430
|
+
v.set(M, T), T.subscribe(A);
|
|
1431
|
+
}
|
|
1432
|
+
for (const [M, T] of v)
|
|
1433
|
+
T.setOptions(t(M, L.has(M), N(M)));
|
|
1434
|
+
for (const M of E) {
|
|
1435
|
+
const T = v.get(M);
|
|
1436
|
+
T && (v.delete(M), v.set(M, T));
|
|
1437
|
+
}
|
|
1438
|
+
let F = v.size - L.size;
|
|
1439
|
+
if (F > o)
|
|
1440
|
+
for (const [M, T] of v) {
|
|
1441
|
+
if (F <= o) break;
|
|
1442
|
+
L.has(M) || (T.destroy(), v.delete(M), R.delete(M), F -= 1);
|
|
1443
|
+
}
|
|
1444
|
+
A();
|
|
1445
|
+
}, [s, t, E, o, m]), ue(() => {
|
|
1446
|
+
const v = i.current;
|
|
1447
|
+
return () => {
|
|
1448
|
+
for (const R of v.values()) R.destroy();
|
|
1449
|
+
v.clear();
|
|
1450
|
+
};
|
|
1451
|
+
}, []);
|
|
1452
|
+
const y = C(n);
|
|
1453
|
+
y.current = n;
|
|
1454
|
+
const q = C(t);
|
|
1455
|
+
q.current = t;
|
|
1456
|
+
const k = D((v, R) => {
|
|
1457
|
+
const A = i.current.get(v), N = A == null ? void 0 : A.getCurrentResult();
|
|
1458
|
+
if (!A || !(N != null && N.data) || N.isPlaceholderData) return;
|
|
1459
|
+
const L = u.current.get(v) ?? it, F = el(R, L.page, N.data.pageInfo, y.current);
|
|
1460
|
+
!F || F.page === L.page || (u.current.set(v, { ...F, shownPage: L.page }), A.setOptions(
|
|
1461
|
+
q.current(v, A.options.enabled !== !1, F.request)
|
|
1462
|
+
));
|
|
1463
|
+
}, []);
|
|
1464
|
+
return { entries: b, goToPage: k };
|
|
1465
|
+
}
|
|
1466
|
+
const dl = [], et = /* @__PURE__ */ new Set();
|
|
1467
|
+
function Hn(e) {
|
|
1468
|
+
var t;
|
|
1469
|
+
return (((t = e == null ? void 0 : e.searchMatch) == null ? void 0 : t.matchingItemCount) ?? 0) > 0;
|
|
1470
|
+
}
|
|
1471
|
+
function ml(e) {
|
|
1472
|
+
const t = e.trim();
|
|
1473
|
+
return t.length >= Zc ? t : void 0;
|
|
1474
|
+
}
|
|
1475
|
+
function Vu(e) {
|
|
1476
|
+
var pn, gn, fn;
|
|
1477
|
+
const {
|
|
1478
|
+
courseId: t,
|
|
1479
|
+
adapter: n,
|
|
1480
|
+
view: o,
|
|
1481
|
+
itemsMode: r = "auto",
|
|
1482
|
+
inlineThreshold: s = Oo,
|
|
1483
|
+
pageSize: i = Ht,
|
|
1484
|
+
mobilePageSize: u = Kc,
|
|
1485
|
+
itemPageSize: m = Yc,
|
|
1486
|
+
itemConcurrency: p = Qc,
|
|
1487
|
+
retainCollapsedLimit: b = ko,
|
|
1488
|
+
staleTime: g = Gt,
|
|
1489
|
+
initialExpandedModuleIds: h,
|
|
1490
|
+
initialFilter: E = Lc,
|
|
1491
|
+
today: y,
|
|
1492
|
+
search: q = !1,
|
|
1493
|
+
initialSearch: k = "",
|
|
1494
|
+
onSearchChange: v
|
|
1495
|
+
} = e, R = cl() ? u : i, A = io(), N = ut(), [L, F] = Q(E), M = W(
|
|
1496
|
+
() => Uc(N.filters, n.capabilities),
|
|
1497
|
+
[N.filters, n.capabilities]
|
|
1498
|
+
), T = De(M, L), _ = $t(T), $ = q && ((pn = n.capabilities) == null ? void 0 : pn.search) === !0, [H, V] = Q(k), [Y, oe] = Q(k);
|
|
1499
|
+
ue(() => {
|
|
1500
|
+
if (H === Y) return;
|
|
1501
|
+
const l = setTimeout(() => oe(H), Xc);
|
|
1502
|
+
return () => clearTimeout(l);
|
|
1503
|
+
}, [H, Y]);
|
|
1504
|
+
const P = $ ? ml(Y) : void 0, U = P !== void 0, de = D(() => {
|
|
1505
|
+
V(""), oe("");
|
|
1506
|
+
}, []), ce = C(v);
|
|
1507
|
+
ce.current = v;
|
|
1508
|
+
const le = C(P);
|
|
1509
|
+
ue(() => {
|
|
1510
|
+
var l;
|
|
1511
|
+
le.current !== P && (le.current = P, (l = ce.current) == null || l.call(ce, P ?? ""));
|
|
1512
|
+
}, [P]);
|
|
1513
|
+
const { timezone: he } = ee(), [Ie] = Q(() => /* @__PURE__ */ new Date()), te = y ?? Ie, me = W(
|
|
1514
|
+
() => (_ == null ? void 0 : _.op) === "within" ? Mc(te, Number(_.value), he) : void 0,
|
|
1515
|
+
[_ == null ? void 0 : _.op, _ == null ? void 0 : _.value, te, he]
|
|
1516
|
+
), re = sl({
|
|
1517
|
+
courseId: t,
|
|
1518
|
+
adapter: n,
|
|
1519
|
+
mode: U ? "onDemand" : r,
|
|
1520
|
+
inlineThreshold: s,
|
|
1521
|
+
pageSize: R,
|
|
1522
|
+
filter: _,
|
|
1523
|
+
dueRange: me,
|
|
1524
|
+
search: P,
|
|
1525
|
+
view: o,
|
|
1526
|
+
staleTime: g
|
|
1527
|
+
}), Se = re.resolvedMode, I = nl({
|
|
1528
|
+
courseId: t,
|
|
1529
|
+
adapter: n,
|
|
1530
|
+
pageSize: R,
|
|
1531
|
+
filter: _,
|
|
1532
|
+
dueRange: me,
|
|
1533
|
+
search: P,
|
|
1534
|
+
view: o,
|
|
1535
|
+
staleTime: g,
|
|
1536
|
+
includeItems: Se === "inline",
|
|
1537
|
+
inlineItemsFirst: (gn = re.inlineShape) == null ? void 0 : gn.maxItemCount,
|
|
1538
|
+
inlineFirst: (fn = re.inlineShape) == null ? void 0 : fn.moduleCount,
|
|
1539
|
+
enabled: Se !== null
|
|
1540
|
+
}), [se, ne] = Q(
|
|
1541
|
+
() => h ?? []
|
|
1542
|
+
), Le = h === void 0, X = C(!1), Me = Fn(T), S = C(Me);
|
|
1543
|
+
S.current = Me;
|
|
1544
|
+
const G = Me || U, B = C(G);
|
|
1545
|
+
B.current = G;
|
|
1546
|
+
const xe = C(U);
|
|
1547
|
+
xe.current = U;
|
|
1548
|
+
const Kt = C(I.hasNextPage);
|
|
1549
|
+
Kt.current = I.hasNextPage;
|
|
1550
|
+
const Yt = C(I.hasPreviousPage);
|
|
1551
|
+
Yt.current = I.hasPreviousPage;
|
|
1552
|
+
const Qt = C(I.isPlaceholderData);
|
|
1553
|
+
Qt.current = I.isPlaceholderData, ue(() => {
|
|
1554
|
+
!Le || X.current || G || I.isPlaceholderData || ne((l) => {
|
|
1555
|
+
const d = new Set(l), f = [...l];
|
|
1556
|
+
for (const w of I.modules)
|
|
1557
|
+
w.collapsed === !1 && !d.has(w.id) && f.push(w.id);
|
|
1558
|
+
return f.length === l.length ? l : f;
|
|
1559
|
+
});
|
|
1560
|
+
}, [I.modules, I.isPlaceholderData, Le, G]);
|
|
1561
|
+
const pe = W(() => {
|
|
1562
|
+
const l = /* @__PURE__ */ new Map();
|
|
1563
|
+
for (const d of I.modules) l.set(d.id, d);
|
|
1564
|
+
return l;
|
|
1565
|
+
}, [I.modules]), Ge = JSON.stringify([P, L]), [Vt, jo] = Q({
|
|
1566
|
+
key: Ge,
|
|
1567
|
+
ids: et
|
|
1568
|
+
}), Xt = Vt.key === Ge ? Vt.ids : et, Re = W(() => {
|
|
1569
|
+
if (!U || I.isPlaceholderData) return et;
|
|
1570
|
+
const l = /* @__PURE__ */ new Set();
|
|
1571
|
+
for (const d of I.modules)
|
|
1572
|
+
Hn(d) && !Xt.has(d.id) && l.add(d.id);
|
|
1573
|
+
return l;
|
|
1574
|
+
}, [U, I.isPlaceholderData, I.modules, Xt]), je = C(Re);
|
|
1575
|
+
je.current = Re;
|
|
1576
|
+
const Zt = C(Ge);
|
|
1577
|
+
Zt.current = Ge;
|
|
1578
|
+
const Ne = W(() => {
|
|
1579
|
+
if (Re.size === 0) return se;
|
|
1580
|
+
const l = new Set(se), d = [...Re].filter((f) => !l.has(f));
|
|
1581
|
+
return d.length === 0 ? se : [...se, ...d];
|
|
1582
|
+
}, [se, Re]), Z = D((l, d) => {
|
|
1583
|
+
const f = Zt.current;
|
|
1584
|
+
jo((w) => {
|
|
1585
|
+
const x = new Set(w.key === f ? w.ids : et);
|
|
1586
|
+
for (const z of l)
|
|
1587
|
+
d ? x.add(z) : x.delete(z);
|
|
1588
|
+
return { key: f, ids: x };
|
|
1589
|
+
});
|
|
1590
|
+
}, []), mt = W(
|
|
1591
|
+
() => Ne.filter((l) => {
|
|
1592
|
+
const d = pe.get(l);
|
|
1593
|
+
return d !== void 0 && d.items === void 0;
|
|
1594
|
+
}),
|
|
1595
|
+
[Ne, pe]
|
|
1596
|
+
), Jt = W(() => new Set(mt), [mt]), en = W(() => In(p), [p]), Ko = D(
|
|
1597
|
+
(l, d, f) => Jc({
|
|
1598
|
+
courseId: t,
|
|
1599
|
+
moduleId: l,
|
|
1600
|
+
adapter: n,
|
|
1601
|
+
page: f,
|
|
1602
|
+
pageSize: m,
|
|
1603
|
+
search: Hn(pe.get(l)) ? P : void 0,
|
|
1604
|
+
view: o,
|
|
1605
|
+
staleTime: g,
|
|
1606
|
+
enabled: d && !(P !== void 0 && I.isPlaceholderData),
|
|
1607
|
+
limit: en
|
|
1608
|
+
}),
|
|
1609
|
+
[
|
|
1610
|
+
t,
|
|
1611
|
+
n,
|
|
1612
|
+
m,
|
|
1613
|
+
P,
|
|
1614
|
+
pe,
|
|
1615
|
+
I.isPlaceholderData,
|
|
1616
|
+
o,
|
|
1617
|
+
g,
|
|
1618
|
+
en
|
|
1619
|
+
]
|
|
1620
|
+
), tn = ul(mt, Ko, {
|
|
1621
|
+
pageSize: m,
|
|
1622
|
+
retainCollapsedLimit: b,
|
|
1623
|
+
partition: JSON.stringify([t, o, P])
|
|
1624
|
+
}), nn = W(() => In(Vc), []), [Yo, on] = Q(0), Ke = D((l) => (on((d) => d + 1), l.finally(() => on((d) => d - 1))), []), Oe = C(/* @__PURE__ */ new Map()), pt = C(Promise.resolve()), ie = D(
|
|
1625
|
+
(l, d, f) => {
|
|
1626
|
+
if (B.current) return;
|
|
1627
|
+
const w = n.setModuleCollapsed;
|
|
1628
|
+
if (!w) return;
|
|
1629
|
+
const x = Promise.all([pt.current, Oe.current.get(l)]).then(
|
|
1630
|
+
() => nn(() => w({ courseId: t, moduleId: l, collapsed: d }))
|
|
1631
|
+
), z = ((f == null ? void 0 : f.track) === !0 ? Ke(x) : x).catch((J) => {
|
|
1632
|
+
console.warn(
|
|
1633
|
+
`[platform-modules] failed to persist module ${l} collapsed=${d}: ${String(J)}`
|
|
1634
|
+
);
|
|
1635
|
+
}).finally(() => {
|
|
1636
|
+
Oe.current.get(l) === z && Oe.current.delete(l);
|
|
1637
|
+
});
|
|
1638
|
+
Oe.current.set(l, z);
|
|
1639
|
+
},
|
|
1640
|
+
[n, t, nn, Ke]
|
|
1641
|
+
), Ye = D(
|
|
1642
|
+
(l, d) => {
|
|
1643
|
+
const f = n.setAllModulesCollapsed;
|
|
1644
|
+
if (!(!B.current && !Kt.current && !Yt.current && !Qt.current && f !== void 0)) {
|
|
1645
|
+
for (const z of d) ie(z, l, { track: !0 });
|
|
1646
|
+
return;
|
|
1647
|
+
}
|
|
1648
|
+
const x = Ke(
|
|
1649
|
+
Promise.all([pt.current, ...Oe.current.values()]).then(
|
|
1650
|
+
() => f({ courseId: t, collapsed: l })
|
|
1651
|
+
)
|
|
1652
|
+
).catch((z) => {
|
|
1653
|
+
console.warn(
|
|
1654
|
+
`[platform-modules] failed to persist all modules collapsed=${l}: ${String(z)}`
|
|
1655
|
+
);
|
|
1656
|
+
});
|
|
1657
|
+
pt.current = x;
|
|
1658
|
+
},
|
|
1659
|
+
[n, t, ie, Ke]
|
|
1660
|
+
), gt = D(
|
|
1661
|
+
(l, d) => {
|
|
1662
|
+
X.current = !0, ne(
|
|
1663
|
+
(f) => f.includes(l) ? f : [...f, l]
|
|
1664
|
+
), Z([l], !1), (d == null ? void 0 : d.persist) !== !1 && ie(l, !1);
|
|
1665
|
+
},
|
|
1666
|
+
[ie, Z]
|
|
1667
|
+
), ke = D(
|
|
1668
|
+
(l, d) => {
|
|
1669
|
+
X.current = !0, ne((f) => f.filter((w) => w !== l)), je.current.has(l) && Z([l], !0), A.cancelQueries({ queryKey: ot(t, l) }), (d == null ? void 0 : d.persist) !== !1 && ie(l, !0);
|
|
1670
|
+
},
|
|
1671
|
+
[A, t, ie, Z]
|
|
1672
|
+
), Qo = D(
|
|
1673
|
+
(l) => {
|
|
1674
|
+
X.current = !0, ne((d) => {
|
|
1675
|
+
const f = new Set(d), w = l.filter((x) => !f.has(x));
|
|
1676
|
+
return w.length === 0 ? d : [...d, ...w];
|
|
1677
|
+
}), Z(l, !1);
|
|
1678
|
+
for (const d of l) ie(d, !1, { track: !0 });
|
|
1679
|
+
},
|
|
1680
|
+
[ie, Z]
|
|
1681
|
+
), Vo = D(
|
|
1682
|
+
(l) => {
|
|
1683
|
+
X.current = !0;
|
|
1684
|
+
const d = new Set(l);
|
|
1685
|
+
ne((f) => {
|
|
1686
|
+
const w = f.filter((x) => !d.has(x));
|
|
1687
|
+
return w.length === f.length ? f : w;
|
|
1688
|
+
}), Z(
|
|
1689
|
+
[...d].filter((f) => je.current.has(f)),
|
|
1690
|
+
!0
|
|
1691
|
+
);
|
|
1692
|
+
for (const f of d)
|
|
1693
|
+
A.cancelQueries({ queryKey: ot(t, f) }), ie(f, !0, { track: !0 });
|
|
1694
|
+
},
|
|
1695
|
+
[A, t, ie, Z]
|
|
1696
|
+
), Fe = C(se);
|
|
1697
|
+
Fe.current = se;
|
|
1698
|
+
const rn = C(Ne);
|
|
1699
|
+
rn.current = Ne;
|
|
1700
|
+
const Xo = D(() => {
|
|
1701
|
+
X.current = !0;
|
|
1702
|
+
const l = new Set(I.modules.map((w) => w.id)), d = Fe.current.filter((w) => l.has(w));
|
|
1703
|
+
if (d.length === 0) return;
|
|
1704
|
+
const f = new Set(d);
|
|
1705
|
+
for (const w of d)
|
|
1706
|
+
A.cancelQueries({ queryKey: ot(t, w) });
|
|
1707
|
+
ne((w) => w.filter((x) => !f.has(x))), Z(je.current, !0), Ye(!0, d);
|
|
1708
|
+
}, [I.modules, A, t, Ye, Z]), Zo = D(() => {
|
|
1709
|
+
X.current = !0;
|
|
1710
|
+
const l = I.modules.map((d) => d.id);
|
|
1711
|
+
l.length !== 0 && (ne((d) => {
|
|
1712
|
+
const f = new Set(d), w = l.filter((x) => !f.has(x));
|
|
1713
|
+
return w.length === 0 ? d : [...d, ...w];
|
|
1714
|
+
}), Z(l, !1), Ye(!1, l));
|
|
1715
|
+
}, [I.modules, Ye, Z]), ft = C(L);
|
|
1716
|
+
ft.current = L;
|
|
1717
|
+
const Te = C(null), Qe = D(() => {
|
|
1718
|
+
Te.current === null && (Te.current = Fe.current);
|
|
1719
|
+
const l = X.current;
|
|
1720
|
+
for (const d of Fe.current) ke(d, { persist: !1 });
|
|
1721
|
+
X.current = l;
|
|
1722
|
+
}, [ke]), Ve = D(() => {
|
|
1723
|
+
Te.current !== null && (ne(Te.current), Fe.current = Te.current, Te.current = null);
|
|
1724
|
+
}, []), sn = C(P);
|
|
1725
|
+
ue(() => {
|
|
1726
|
+
sn.current !== P && (sn.current = P, P !== void 0 ? Qe() : S.current || Ve());
|
|
1727
|
+
}, [P, Qe, Ve]);
|
|
1728
|
+
const Jo = D(
|
|
1729
|
+
(l) => {
|
|
1730
|
+
if (l === ft.current) return;
|
|
1731
|
+
ft.current = l, Fn(De(M, l)) ? Qe() : xe.current || Ve(), F(l);
|
|
1732
|
+
},
|
|
1733
|
+
[M, Qe, Ve]
|
|
1734
|
+
), er = D(
|
|
1735
|
+
(l) => {
|
|
1736
|
+
rn.current.includes(l) ? ke(l) : gt(l);
|
|
1737
|
+
},
|
|
1738
|
+
[ke, gt]
|
|
1739
|
+
), an = C(pe);
|
|
1740
|
+
an.current = pe;
|
|
1741
|
+
const [cn, tr] = Q(() => /* @__PURE__ */ new Map()), ln = tn.goToPage, we = D(
|
|
1742
|
+
(l, d) => {
|
|
1743
|
+
var x;
|
|
1744
|
+
const f = (x = an.current.get(l)) == null ? void 0 : x.items;
|
|
1745
|
+
if (f === void 0) {
|
|
1746
|
+
ln(l, d);
|
|
1747
|
+
return;
|
|
1748
|
+
}
|
|
1749
|
+
const w = Be(f.length, m);
|
|
1750
|
+
tr((z) => {
|
|
1751
|
+
const J = Math.min(z.get(l) ?? 1, w), qe = d === "first" ? 1 : d === "last" ? w : Math.min(Math.max(J + (d === "next" ? 1 : -1), 1), w);
|
|
1752
|
+
return qe === J ? z : new Map(z).set(l, qe);
|
|
1753
|
+
});
|
|
1754
|
+
},
|
|
1755
|
+
[ln, m]
|
|
1756
|
+
), ht = W(() => /* @__PURE__ */ new Map(), [we]), un = D(
|
|
1757
|
+
(l) => {
|
|
1758
|
+
let d = ht.get(l);
|
|
1759
|
+
return d || (d = {
|
|
1760
|
+
goToFirstPage: () => we(l, "first"),
|
|
1761
|
+
goToPreviousPage: () => we(l, "previous"),
|
|
1762
|
+
goToNextPage: () => we(l, "next"),
|
|
1763
|
+
goToLastPage: () => we(l, "last")
|
|
1764
|
+
}, ht.set(l, d)), d;
|
|
1765
|
+
},
|
|
1766
|
+
[ht, we]
|
|
1767
|
+
), dn = tn.entries, mn = C(/* @__PURE__ */ new Map()), nr = D(
|
|
1768
|
+
(l) => {
|
|
1769
|
+
var hn, bn;
|
|
1770
|
+
const d = pe.get(l), f = dn.get(l), w = Jt.has(l), x = cn.get(l), z = un(l), J = mn.current.get(l);
|
|
1771
|
+
if (J && J.items === (d == null ? void 0 : d.items) && J.entry === f && J.active === w && J.inlinePage === x && J.navigation === z)
|
|
1772
|
+
return J.value;
|
|
1773
|
+
const qe = (ze) => (mn.current.set(l, {
|
|
1774
|
+
items: d == null ? void 0 : d.items,
|
|
1775
|
+
entry: f,
|
|
1776
|
+
active: w,
|
|
1777
|
+
inlinePage: x,
|
|
1778
|
+
navigation: z,
|
|
1779
|
+
value: ze
|
|
1780
|
+
}), ze);
|
|
1781
|
+
if ((d == null ? void 0 : d.items) !== void 0) {
|
|
1782
|
+
const ze = Be(d.items.length, m), yn = Math.min(x ?? 1, ze), bt = (yn - 1) * m;
|
|
1783
|
+
return qe({
|
|
1784
|
+
items: d.items.slice(bt, bt + m),
|
|
1785
|
+
page: yn,
|
|
1786
|
+
pageCount: ze,
|
|
1787
|
+
itemOffset: d.items.slice(0, bt).filter((or) => or.type !== "sub_header").length,
|
|
1788
|
+
...z,
|
|
1789
|
+
isLoading: !1,
|
|
1790
|
+
isRefreshing: !1,
|
|
1791
|
+
error: null,
|
|
1792
|
+
source: "inline"
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
const j = f == null ? void 0 : f.result, Xe = (f == null ? void 0 : f.page) ?? 1, ve = (hn = j == null ? void 0 : j.data) == null ? void 0 : hn.pageInfo;
|
|
1796
|
+
return qe({
|
|
1797
|
+
items: ((bn = j == null ? void 0 : j.data) == null ? void 0 : bn.items) ?? dl,
|
|
1798
|
+
page: Xe,
|
|
1799
|
+
pageCount: Math.max(
|
|
1800
|
+
Be((ve == null ? void 0 : ve.totalCount) ?? null, m),
|
|
1801
|
+
ve != null && ve.hasNextPage ? Xe + 1 : Xe
|
|
1802
|
+
),
|
|
1803
|
+
itemOffset: (Xe - 1) * m,
|
|
1804
|
+
...z,
|
|
1805
|
+
isLoading: j ? j.isLoading : w,
|
|
1806
|
+
isRefreshing: (j == null ? void 0 : j.isPlaceholderData) ?? !1,
|
|
1807
|
+
error: (j == null ? void 0 : j.error) ?? null,
|
|
1808
|
+
source: "onDemand"
|
|
1809
|
+
});
|
|
1810
|
+
},
|
|
1811
|
+
[pe, dn, Jt, cn, un, m]
|
|
1812
|
+
);
|
|
1813
|
+
return {
|
|
1814
|
+
modules: I.modules,
|
|
1815
|
+
pageInfo: I.pageInfo,
|
|
1816
|
+
page: I.page,
|
|
1817
|
+
pageCount: I.pageCount,
|
|
1818
|
+
pageSize: R,
|
|
1819
|
+
hasNextPage: I.hasNextPage,
|
|
1820
|
+
hasPreviousPage: I.hasPreviousPage,
|
|
1821
|
+
goToFirstPage: I.goToFirstPage,
|
|
1822
|
+
goToPreviousPage: I.goToPreviousPage,
|
|
1823
|
+
goToNextPage: I.goToNextPage,
|
|
1824
|
+
goToLastPage: I.goToLastPage,
|
|
1825
|
+
isLoading: (re.isResolving || I.isPending) && !I.isPlaceholderData,
|
|
1826
|
+
isRefreshing: I.isPlaceholderData,
|
|
1827
|
+
error: I.error ?? re.error,
|
|
1828
|
+
itemsMode: Se,
|
|
1829
|
+
getItems: nr,
|
|
1830
|
+
expandModule: gt,
|
|
1831
|
+
collapseModule: ke,
|
|
1832
|
+
expandModules: Qo,
|
|
1833
|
+
collapseModules: Vo,
|
|
1834
|
+
collapseAllModules: Xo,
|
|
1835
|
+
expandAllModules: Zo,
|
|
1836
|
+
toggleModule: er,
|
|
1837
|
+
expandedModuleIds: Ne,
|
|
1838
|
+
filter: L,
|
|
1839
|
+
setFilter: Jo,
|
|
1840
|
+
filterEntry: T,
|
|
1841
|
+
filterPredicate: Nc(T) ? T == null ? void 0 : T.predicate : void 0,
|
|
1842
|
+
isPersistingCollapsed: Yo > 0,
|
|
1843
|
+
searchEnabled: $,
|
|
1844
|
+
searchInput: H,
|
|
1845
|
+
setSearchInput: V,
|
|
1846
|
+
search: P,
|
|
1847
|
+
clearSearch: de
|
|
1848
|
+
};
|
|
1849
|
+
}
|
|
1850
|
+
const pl = 20, gl = 4.5, Gn = 7, fl = 5, hl = 20, qo = "#000000", zo = "#FFFFFF", Uo = {
|
|
1851
|
+
primary: { semantic: "base", textKey: "baseTextColor", borderKey: "baseBorderColor" },
|
|
1852
|
+
info: { semantic: "info", textKey: "infoTextColor", borderKey: "infoBorderColor" },
|
|
1853
|
+
success: { semantic: "success", textKey: "successTextColor", borderKey: "successBorderColor" },
|
|
1854
|
+
warning: { semantic: "warning", textKey: "warningTextColor", borderKey: "warningBorderColor" }
|
|
1855
|
+
}, bl = {
|
|
1856
|
+
card: {
|
|
1857
|
+
primary: { fill: "#E8EAEC", stroke: "#8D959F", text: "#273540" },
|
|
1858
|
+
info: { fill: "#D5E4F2", stroke: "#2B7ABC", text: "#23649A" },
|
|
1859
|
+
success: { fill: "#CDE7D8", stroke: "#03893D", text: "#02642C" },
|
|
1860
|
+
warning: { fill: "#F5DBCC", stroke: "#CF4A00", text: "#A13900" }
|
|
1861
|
+
},
|
|
1862
|
+
row: {
|
|
1863
|
+
primary: { fill: "#DEE1E4", stroke: "#8D959F", text: "#273540" },
|
|
1864
|
+
info: { fill: "#CADCEA", stroke: "#2B7ABC", text: "#1E5685" },
|
|
1865
|
+
success: { fill: "#C2DFD0", stroke: "#03893D", text: "#02642C" },
|
|
1866
|
+
warning: { fill: "#EBD2C4", stroke: "#CF4A00", text: "#A13900" }
|
|
1867
|
+
}
|
|
1868
|
+
};
|
|
1869
|
+
function yl(e, t) {
|
|
1870
|
+
const n = vr(
|
|
1871
|
+
vt(e),
|
|
1872
|
+
vt(Er(t, pl))
|
|
1873
|
+
);
|
|
1874
|
+
return co(n);
|
|
1875
|
+
}
|
|
1876
|
+
function Il(e, t, n) {
|
|
1877
|
+
const o = ye(n, t) >= Gn ? Gn : gl;
|
|
1878
|
+
return Math.min(o, Math.max(ye(e, qo), ye(e, zo)));
|
|
1879
|
+
}
|
|
1880
|
+
function Sl(e, t, n) {
|
|
1881
|
+
const o = Il(e, t, n);
|
|
1882
|
+
if (ye(e, t) >= o) return t;
|
|
1883
|
+
const r = ye(e, qo) > ye(e, zo) ? Pr : Cr;
|
|
1884
|
+
let s = t;
|
|
1885
|
+
for (let i = 0; i < hl && ye(e, s) < o; i++)
|
|
1886
|
+
s = r(s, fl);
|
|
1887
|
+
return co(s);
|
|
1888
|
+
}
|
|
1889
|
+
function Ml(e) {
|
|
1890
|
+
return wt(e) && vt(e).a === 1;
|
|
1891
|
+
}
|
|
1892
|
+
function jn(e, t) {
|
|
1893
|
+
var n;
|
|
1894
|
+
return t === "card" ? (n = e == null ? void 0 : e.elevatedSurface) == null ? void 0 : n.base : e == null ? void 0 : e.muted;
|
|
1895
|
+
}
|
|
1896
|
+
function Kn(e, t, n, o) {
|
|
1897
|
+
var i, u, m, p;
|
|
1898
|
+
const r = bl[n][e], s = t;
|
|
1899
|
+
try {
|
|
1900
|
+
const b = s == null ? void 0 : s.newTheme, g = (i = b == null ? void 0 : b.semantics) == null ? void 0 : i.call(b, b.primitives);
|
|
1901
|
+
if (!g) return r;
|
|
1902
|
+
const { semantic: h } = Uo[e], E = jn((p = (m = (u = s == null ? void 0 : s.themeOverride) == null ? void 0 : u.semantics) == null ? void 0 : m.color) == null ? void 0 : p.background, n) ?? jn(g.color.background, n) ?? "", y = o.stroke ?? g.color.stroke[h], q = o.label ?? g.color.text[h];
|
|
1903
|
+
if (!Ml(E) || !wt(y) || !wt(q)) return r;
|
|
1904
|
+
const k = yl(E, y);
|
|
1905
|
+
return { fill: k, stroke: y, text: Sl(k, q, E) };
|
|
1906
|
+
} catch {
|
|
1907
|
+
return r;
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
const Yn = /* @__PURE__ */ new WeakMap();
|
|
1911
|
+
function $o(e, t, n, o = {}) {
|
|
1912
|
+
if (typeof t != "object" || t === null)
|
|
1913
|
+
return Kn(e, t, n, o);
|
|
1914
|
+
let r = Yn.get(t);
|
|
1915
|
+
r === void 0 && (r = /* @__PURE__ */ new Map(), Yn.set(t, r));
|
|
1916
|
+
const s = `${n}:${e}:${o.stroke ?? ""}:${o.label ?? ""}`, i = r.get(s);
|
|
1917
|
+
if (i !== void 0) return i;
|
|
1918
|
+
const u = Kn(e, t, n, o);
|
|
1919
|
+
return r.set(s, u), u;
|
|
1920
|
+
}
|
|
1921
|
+
function tt(e, t) {
|
|
1922
|
+
const { textKey: n, borderKey: o } = Uo[e];
|
|
1923
|
+
return (r, s) => {
|
|
1924
|
+
const i = r, { fill: u, stroke: m, text: p } = $o(e, s, t, {
|
|
1925
|
+
stroke: i == null ? void 0 : i[o],
|
|
1926
|
+
label: i == null ? void 0 : i[n]
|
|
1927
|
+
});
|
|
1928
|
+
return { backgroundColor: u, [n]: p, [o]: m };
|
|
1929
|
+
};
|
|
1930
|
+
}
|
|
1931
|
+
function Qn(e) {
|
|
1932
|
+
return {
|
|
1933
|
+
primary: tt("primary", e),
|
|
1934
|
+
info: tt("info", e),
|
|
1935
|
+
success: tt("success", e),
|
|
1936
|
+
warning: tt("warning", e)
|
|
1937
|
+
};
|
|
1938
|
+
}
|
|
1939
|
+
const Tl = {
|
|
1940
|
+
card: Qn("card"),
|
|
1941
|
+
row: Qn("row")
|
|
1942
|
+
}, wl = "#9242B4", vl = "#9E58BD";
|
|
1943
|
+
function Vn(e) {
|
|
1944
|
+
return (t, n) => {
|
|
1945
|
+
var i, u, m, p;
|
|
1946
|
+
const { fill: o, stroke: r, text: s } = $o("primary", n, e, {
|
|
1947
|
+
stroke: ((u = (i = n.colors) == null ? void 0 : i.contrasts) == null ? void 0 : u.violet4570) ?? vl,
|
|
1948
|
+
label: ((p = (m = n.colors) == null ? void 0 : m.contrasts) == null ? void 0 : p.violet5790) ?? wl
|
|
1949
|
+
});
|
|
1950
|
+
return { backgroundColor: o, baseTextColor: s, baseBorderColor: r };
|
|
1951
|
+
};
|
|
1952
|
+
}
|
|
1953
|
+
const Bo = {
|
|
1954
|
+
tone: "primary",
|
|
1955
|
+
icon: /* @__PURE__ */ c(Ot, { size: "sm" }),
|
|
1956
|
+
themes: {
|
|
1957
|
+
card: Vn("card"),
|
|
1958
|
+
row: Vn("row")
|
|
1959
|
+
}
|
|
1960
|
+
}, El = {
|
|
1961
|
+
not_started: { tone: "primary", icon: /* @__PURE__ */ c(zt, { size: "sm" }) },
|
|
1962
|
+
in_progress: { tone: "info", icon: /* @__PURE__ */ c(qt, { size: "sm" }) },
|
|
1963
|
+
complete: { tone: "success", icon: /* @__PURE__ */ c(Ft, { size: "sm" }) },
|
|
1964
|
+
missing: { tone: "warning", icon: /* @__PURE__ */ c(_e, { size: "sm" }) },
|
|
1965
|
+
incomplete: { tone: "warning", icon: /* @__PURE__ */ c(_e, { size: "sm" }) },
|
|
1966
|
+
missing_and_incomplete: { tone: "warning", icon: /* @__PURE__ */ c(_e, { size: "sm" }) },
|
|
1967
|
+
locked: { tone: "primary", icon: /* @__PURE__ */ c(kt, { size: "sm" }) }
|
|
1968
|
+
}, Pl = {
|
|
1969
|
+
not_started: { tone: "primary", icon: /* @__PURE__ */ c(zt, { size: "sm" }) },
|
|
1970
|
+
in_progress: { tone: "info", icon: /* @__PURE__ */ c(qt, { size: "sm" }) },
|
|
1971
|
+
complete: { tone: "success", icon: /* @__PURE__ */ c(Ft, { size: "sm" }) },
|
|
1972
|
+
incomplete: { tone: "warning", icon: /* @__PURE__ */ c(_e, { size: "sm" }) },
|
|
1973
|
+
missing: { tone: "warning", icon: /* @__PURE__ */ c(_e, { size: "sm" }) },
|
|
1974
|
+
locked: { tone: "primary", icon: /* @__PURE__ */ c(kt, { size: "sm" }) }
|
|
1975
|
+
};
|
|
1976
|
+
function Wo(e, t, n, o) {
|
|
1977
|
+
switch (t) {
|
|
1978
|
+
case "not_started":
|
|
1979
|
+
return e("moduleStatusNotStarted");
|
|
1980
|
+
case "in_progress":
|
|
1981
|
+
return e("moduleStatusInProgress");
|
|
1982
|
+
case "complete":
|
|
1983
|
+
return e("moduleStatusComplete");
|
|
1984
|
+
case "missing":
|
|
1985
|
+
return e("moduleStatusMissing", { count: n });
|
|
1986
|
+
case "incomplete":
|
|
1987
|
+
return e("moduleStatusIncomplete", { count: o });
|
|
1988
|
+
case "missing_and_incomplete":
|
|
1989
|
+
return e("moduleStatusMissingAndIncomplete", {
|
|
1990
|
+
missing: e("moduleStatusMissing", { count: n }),
|
|
1991
|
+
incomplete: e("moduleStatusIncomplete", { count: o })
|
|
1992
|
+
});
|
|
1993
|
+
case "locked":
|
|
1994
|
+
return e("moduleStatusLocked");
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
function Cl(e, t) {
|
|
1998
|
+
switch (t) {
|
|
1999
|
+
case "not_started":
|
|
2000
|
+
return e("itemStatusNotStarted");
|
|
2001
|
+
case "in_progress":
|
|
2002
|
+
return e("itemStatusInProgress");
|
|
2003
|
+
case "complete":
|
|
2004
|
+
return e("itemStatusComplete");
|
|
2005
|
+
case "incomplete":
|
|
2006
|
+
return e("itemStatusIncomplete");
|
|
2007
|
+
case "missing":
|
|
2008
|
+
return e("itemStatusMissing");
|
|
2009
|
+
case "locked":
|
|
2010
|
+
return e("itemStatusLocked");
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
function dt(e, t, n, o) {
|
|
2014
|
+
var r;
|
|
2015
|
+
return /* @__PURE__ */ c(
|
|
2016
|
+
Mr,
|
|
2017
|
+
{
|
|
2018
|
+
color: e.tone,
|
|
2019
|
+
renderIcon: e.icon,
|
|
2020
|
+
themeOverride: ((r = e.themes) == null ? void 0 : r[o]) ?? Tl[o][e.tone],
|
|
2021
|
+
"data-testid": n,
|
|
2022
|
+
children: t
|
|
2023
|
+
}
|
|
2024
|
+
);
|
|
2025
|
+
}
|
|
2026
|
+
function Xu({
|
|
2027
|
+
status: e,
|
|
2028
|
+
missingCount: t,
|
|
2029
|
+
incompleteCount: n
|
|
2030
|
+
}) {
|
|
2031
|
+
const { t: o } = ee();
|
|
2032
|
+
return dt(
|
|
2033
|
+
El[e],
|
|
2034
|
+
Wo(o, e, t, n),
|
|
2035
|
+
"module-status-pill",
|
|
2036
|
+
"card"
|
|
2037
|
+
);
|
|
2038
|
+
}
|
|
2039
|
+
function _l({ status: e }) {
|
|
2040
|
+
const { t } = ee();
|
|
2041
|
+
return dt(
|
|
2042
|
+
Pl[e],
|
|
2043
|
+
Cl(t, e),
|
|
2044
|
+
"item-status-pill",
|
|
2045
|
+
"row"
|
|
2046
|
+
);
|
|
2047
|
+
}
|
|
2048
|
+
function Zu() {
|
|
2049
|
+
const { t: e } = ee();
|
|
2050
|
+
return dt(Bo, e("moduleStatusDueSoon"), "module-due-soon-pill", "card");
|
|
2051
|
+
}
|
|
2052
|
+
function Al() {
|
|
2053
|
+
const { t: e } = ee();
|
|
2054
|
+
return dt(Bo, e("itemStatusDueSoon"), "item-due-soon-pill", "row");
|
|
2055
|
+
}
|
|
2056
|
+
function Ju() {
|
|
2057
|
+
const { t: e } = ee();
|
|
2058
|
+
return /* @__PURE__ */ c(lo, { text: e("moduleRequiredPill"), size: "small", "data-testid": "module-required-pill" });
|
|
2059
|
+
}
|
|
2060
|
+
function Dl() {
|
|
2061
|
+
const { t: e } = ee();
|
|
2062
|
+
return /* @__PURE__ */ c(lo, { text: e("itemRequiredTag"), size: "small", "data-testid": "item-required-pill" });
|
|
2063
|
+
}
|
|
2064
|
+
const Ll = "#FCE8D4", xl = "#273540";
|
|
2065
|
+
function Rl() {
|
|
2066
|
+
var n;
|
|
2067
|
+
const e = Nt(), t = "colors" in e ? (n = e.colors) == null ? void 0 : n.contrasts : void 0;
|
|
2068
|
+
return {
|
|
2069
|
+
backgroundColor: (t == null ? void 0 : t.orange1212) ?? Ll,
|
|
2070
|
+
color: (t == null ? void 0 : t.grey125125) ?? xl
|
|
2071
|
+
};
|
|
2072
|
+
}
|
|
2073
|
+
function Nl(e, t) {
|
|
2074
|
+
const n = t.toLowerCase(), o = e.toLowerCase(), r = [];
|
|
2075
|
+
let s = 0, i = o.indexOf(n, s);
|
|
2076
|
+
for (; i !== -1; )
|
|
2077
|
+
i > s && r.push({ text: e.slice(s, i), matched: !1 }), r.push({ text: e.slice(i, i + n.length), matched: !0 }), s = i + n.length, i = o.indexOf(n, s);
|
|
2078
|
+
return s < e.length && r.push({ text: e.slice(s), matched: !1 }), r;
|
|
2079
|
+
}
|
|
2080
|
+
function At({ text: e, term: t }) {
|
|
2081
|
+
const n = Rl();
|
|
2082
|
+
return t ? /* @__PURE__ */ c(rt, { children: Nl(e, t).map(
|
|
2083
|
+
(o, r) => o.matched ? /* @__PURE__ */ c("mark", { style: n, "data-testid": "search-highlight", children: o.text }, r) : /* @__PURE__ */ c(Rt, { children: o.text }, r)
|
|
2084
|
+
) }) : /* @__PURE__ */ c(rt, { children: e });
|
|
2085
|
+
}
|
|
2086
|
+
const Mt = "\0";
|
|
2087
|
+
function Ol({ render: e, name: t, term: n }) {
|
|
2088
|
+
const [o, ...r] = e(Mt).split(Mt);
|
|
2089
|
+
return r.length === 0 ? /* @__PURE__ */ c(rt, { children: e(t) }) : /* @__PURE__ */ K(rt, { children: [
|
|
2090
|
+
o,
|
|
2091
|
+
/* @__PURE__ */ c(At, { text: t, term: n }),
|
|
2092
|
+
r.join(Mt)
|
|
2093
|
+
] });
|
|
2094
|
+
}
|
|
2095
|
+
function kl() {
|
|
2096
|
+
const e = Nt();
|
|
2097
|
+
return "key" in e && e.key === "canvas-high-contrast" ? "inline" : "standalone";
|
|
2098
|
+
}
|
|
2099
|
+
const Ho = 2.75, Fl = `${Ho}rem`, Xn = "0.065em", Ae = "0.8em", ql = "0.28em", Zn = "1px", zl = "0.57em", Go = {
|
|
2100
|
+
display: "inline-block",
|
|
2101
|
+
paddingLeft: Ae,
|
|
2102
|
+
marginLeft: `-${Ae}`,
|
|
2103
|
+
backgroundImage: `radial-gradient(circle, currentColor ${Xn}, transparent ${Xn})`,
|
|
2104
|
+
backgroundRepeat: "no-repeat",
|
|
2105
|
+
backgroundSize: `${Ae} 100%`,
|
|
2106
|
+
backgroundPosition: "left center"
|
|
2107
|
+
}, Ul = {
|
|
2108
|
+
...Go,
|
|
2109
|
+
backgroundImage: "none",
|
|
2110
|
+
borderLeft: `${Zn} solid`,
|
|
2111
|
+
paddingLeft: `calc(${Ae} / 2 - ${Zn})`,
|
|
2112
|
+
marginLeft: `calc(-${Ae} / 2)`
|
|
2113
|
+
};
|
|
2114
|
+
function Jn() {
|
|
2115
|
+
return typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia("(forced-colors: active)");
|
|
2116
|
+
}
|
|
2117
|
+
function $l() {
|
|
2118
|
+
const [e, t] = Q(() => {
|
|
2119
|
+
var n;
|
|
2120
|
+
return ((n = Jn()) == null ? void 0 : n.matches) ?? !1;
|
|
2121
|
+
});
|
|
2122
|
+
return ue(() => {
|
|
2123
|
+
const n = Jn();
|
|
2124
|
+
if (n === null) return;
|
|
2125
|
+
t(n.matches);
|
|
2126
|
+
const o = (r) => t(r.matches);
|
|
2127
|
+
return n.addEventListener("change", o), () => n.removeEventListener("change", o);
|
|
2128
|
+
}, []), e ? Ul : Go;
|
|
2129
|
+
}
|
|
2130
|
+
const Bl = {
|
|
2131
|
+
overflowX: "clip",
|
|
2132
|
+
overflowWrap: "anywhere",
|
|
2133
|
+
lineHeight: 0
|
|
2134
|
+
}, Wl = "#6A7883", jt = 0.5, at = { display: "block" }, Hl = { ...at, marginTop: `${jt}rem` }, Gl = {
|
|
2135
|
+
...at,
|
|
2136
|
+
marginTop: `-${jt}rem`
|
|
2137
|
+
}, eo = { marginTop: `${jt}rem` }, to = { display: "inline-block" }, jl = {
|
|
2138
|
+
display: "-webkit-box",
|
|
2139
|
+
WebkitLineClamp: 2,
|
|
2140
|
+
WebkitBoxOrient: "vertical",
|
|
2141
|
+
overflow: "hidden"
|
|
2142
|
+
}, Kl = {
|
|
2143
|
+
marginRight: `calc(${Ae} - ${ql})`
|
|
2144
|
+
}, Yl = {
|
|
2145
|
+
display: "inline-flex",
|
|
2146
|
+
alignItems: "center",
|
|
2147
|
+
height: "1lh",
|
|
2148
|
+
verticalAlign: "top",
|
|
2149
|
+
marginInlineEnd: zl
|
|
2150
|
+
};
|
|
2151
|
+
function Ce(e) {
|
|
2152
|
+
return e == null || typeof e == "boolean" || e === "" ? !0 : Array.isArray(e) ? e.every(Ce) : xt(e) && e.type === Rt ? Ce(e.props.children) : !1;
|
|
2153
|
+
}
|
|
2154
|
+
const Ql = 1.5, Vl = 0.25, Xl = 0.5;
|
|
2155
|
+
function Zl(e, t) {
|
|
2156
|
+
var o, r;
|
|
2157
|
+
const n = Nt();
|
|
2158
|
+
return ("colors" in n ? (r = (o = n.colors) == null ? void 0 : o.contrasts) == null ? void 0 : r[e] : void 0) ?? t;
|
|
2159
|
+
}
|
|
2160
|
+
function Jl({
|
|
2161
|
+
item: e,
|
|
2162
|
+
today: t,
|
|
2163
|
+
attachedAbove: n,
|
|
2164
|
+
attachedBelow: o,
|
|
2165
|
+
stackPill: r = !1,
|
|
2166
|
+
moduleLabel: s,
|
|
2167
|
+
itemNumber: i,
|
|
2168
|
+
searchTerm: u
|
|
2169
|
+
}) {
|
|
2170
|
+
var Me;
|
|
2171
|
+
const { t: m, locale: p, timezone: b } = ee(), g = Wr(), h = kl(), E = Zl("grey4570", Wl), y = $l(), q = C(null), k = No(), v = ut(), { navigation: R } = v, A = W(() => yo(v.itemMeta), [v.itemMeta]), N = e.title || m("itemUntitled");
|
|
2172
|
+
if (e.type === "sub_header")
|
|
2173
|
+
return /* @__PURE__ */ c(
|
|
2174
|
+
ge,
|
|
2175
|
+
{
|
|
2176
|
+
as: "div",
|
|
2177
|
+
padding: r ? "x-small small" : "x-small mediumSmall",
|
|
2178
|
+
margin: "x-small 0 0 0",
|
|
2179
|
+
"data-testid": `module-item-${e.id}`,
|
|
2180
|
+
children: /* @__PURE__ */ c(
|
|
2181
|
+
be,
|
|
2182
|
+
{
|
|
2183
|
+
size: "small",
|
|
2184
|
+
weight: "bold",
|
|
2185
|
+
transform: "uppercase",
|
|
2186
|
+
"data-testid": "module-item-title",
|
|
2187
|
+
"data-sub-header": "true",
|
|
2188
|
+
children: /* @__PURE__ */ c(At, { text: N, term: u })
|
|
2189
|
+
}
|
|
2190
|
+
)
|
|
2191
|
+
}
|
|
2192
|
+
);
|
|
2193
|
+
const L = wc(s, i, p), F = L ? m("itemNameWithLabel", { label: L, name: N }) : N, M = ((Me = R.getItemHref) == null ? void 0 : Me.call(R, e)) ?? e.url ?? null, T = e.status === "locked", _ = T ? null : M, $ = e.status !== void 0 && e.status !== "complete" && !T && vo(e.dueAt, t, b), H = R.onItemClick, V = (S) => {
|
|
2194
|
+
g(`item-click-${e.type}`), H == null || H(e, S);
|
|
2195
|
+
}, Y = (S) => {
|
|
2196
|
+
var B;
|
|
2197
|
+
const G = q.current;
|
|
2198
|
+
!G || G.contains(S.target) || (B = window.getSelection()) != null && B.toString().trim() || G.dispatchEvent(
|
|
2199
|
+
new window.MouseEvent("click", {
|
|
2200
|
+
bubbles: !0,
|
|
2201
|
+
cancelable: !0,
|
|
2202
|
+
ctrlKey: S.ctrlKey,
|
|
2203
|
+
metaKey: S.metaKey,
|
|
2204
|
+
shiftKey: S.shiftKey,
|
|
2205
|
+
altKey: S.altKey
|
|
2206
|
+
})
|
|
2207
|
+
);
|
|
2208
|
+
}, oe = { item: e, t: m, today: t, locale: p, timezone: b, formatters: k, config: v }, P = A.map((S) => ({
|
|
2209
|
+
key: S.key,
|
|
2210
|
+
node: S.render(oe),
|
|
2211
|
+
icon: S.renderIcon ? S.renderIcon(oe) : S.icon
|
|
2212
|
+
})).filter((S) => !Ce(S.node)), U = [];
|
|
2213
|
+
let de;
|
|
2214
|
+
const ce = r ? P.find((S) => S.key === "dueAt" && !Ce(S.icon)) : void 0, le = ce && P.find((S) => S.key === "estimatedDuration");
|
|
2215
|
+
for (const S of P)
|
|
2216
|
+
if (S !== le)
|
|
2217
|
+
if (!Ce(S.icon) && (r || !de)) {
|
|
2218
|
+
const G = S === ce && le ? [S, le] : [S];
|
|
2219
|
+
U.push(G), de ?? (de = G);
|
|
2220
|
+
} else de ? de.push(S) : U.length === 0 ? U.push([S]) : U[0].push(S);
|
|
2221
|
+
const he = r ? { ...to, ...eo } : to, Ie = r ? { ...y, ...eo } : y, te = e.completionRequirement ? /* @__PURE__ */ c(Dl, {}) : null, me = $ || e.status ? /* @__PURE__ */ K(O, { alignItems: "center", gap: "x-small", wrap: r ? "wrap" : "no-wrap", children: [
|
|
2222
|
+
$ ? /* @__PURE__ */ c(O.Item, { children: /* @__PURE__ */ c(Al, {}) }) : null,
|
|
2223
|
+
e.status ? /* @__PURE__ */ c(O.Item, { children: /* @__PURE__ */ c(_l, { status: e.status }) }) : null
|
|
2224
|
+
] }) : null, re = r && te ? /* @__PURE__ */ K(O, { direction: "column", alignItems: "start", gap: "x-small", children: [
|
|
2225
|
+
/* @__PURE__ */ c(O.Item, { children: te }),
|
|
2226
|
+
me ? /* @__PURE__ */ c(O.Item, { children: me }) : null
|
|
2227
|
+
] }) : me, Se = u ? L ? /* @__PURE__ */ c(
|
|
2228
|
+
Ol,
|
|
2229
|
+
{
|
|
2230
|
+
render: (S) => m("itemNameWithLabel", { label: L, name: S }),
|
|
2231
|
+
name: N,
|
|
2232
|
+
term: u
|
|
2233
|
+
}
|
|
2234
|
+
) : /* @__PURE__ */ c(At, { text: N, term: u }) : F, I = r ? /* @__PURE__ */ c("span", { style: jl, "data-title-clamp": "", children: Se }) : Se, se = {
|
|
2235
|
+
weight: "bold",
|
|
2236
|
+
size: r ? "medium" : "small",
|
|
2237
|
+
lineHeight: "condensed",
|
|
2238
|
+
"data-testid": "module-item-title"
|
|
2239
|
+
}, ne = _ ? /* @__PURE__ */ K(
|
|
2240
|
+
Sr,
|
|
2241
|
+
{
|
|
2242
|
+
href: _,
|
|
2243
|
+
elementRef: (S) => {
|
|
2244
|
+
q.current = S;
|
|
2245
|
+
},
|
|
2246
|
+
onClick: V,
|
|
2247
|
+
forceButtonRole: !1,
|
|
2248
|
+
variant: h,
|
|
2249
|
+
display: r ? "block" : void 0,
|
|
2250
|
+
target: e.newTab ? "_blank" : void 0,
|
|
2251
|
+
rel: e.newTab ? "noopener noreferrer" : void 0,
|
|
2252
|
+
children: [
|
|
2253
|
+
/* @__PURE__ */ c(be, { ...se, color: "primary", children: I }),
|
|
2254
|
+
e.newTab ? /* @__PURE__ */ c(ao, { children: ` ${m("opensInNewWindow")}` }) : null
|
|
2255
|
+
]
|
|
2256
|
+
}
|
|
2257
|
+
) : /* @__PURE__ */ c(
|
|
2258
|
+
be,
|
|
2259
|
+
{
|
|
2260
|
+
...se,
|
|
2261
|
+
color: T ? "secondary" : "primary",
|
|
2262
|
+
"data-locked": T ? "true" : void 0,
|
|
2263
|
+
children: I
|
|
2264
|
+
}
|
|
2265
|
+
), Le = n ? "none" : "large", X = o ? "none" : "large";
|
|
2266
|
+
return /* @__PURE__ */ c(
|
|
2267
|
+
ge,
|
|
2268
|
+
{
|
|
2269
|
+
as: "div",
|
|
2270
|
+
background: "secondary",
|
|
2271
|
+
borderRadius: `${Le} ${Le} ${X} ${X}`,
|
|
2272
|
+
padding: r ? "small" : "mediumSmall",
|
|
2273
|
+
margin: n ? "0" : "x-small 0 0 0",
|
|
2274
|
+
cursor: _ ? "pointer" : void 0,
|
|
2275
|
+
onClick: _ ? Y : void 0,
|
|
2276
|
+
"data-testid": `module-item-${e.id}`,
|
|
2277
|
+
children: /* @__PURE__ */ c("div", { style: { paddingInlineStart: `${Math.max(e.indent - 1, 0) * Ho}rem` }, children: /* @__PURE__ */ K(O, { alignItems: "start", gap: "mediumSmall", children: [
|
|
2278
|
+
/* @__PURE__ */ c(O.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ K(O, { alignItems: "center", children: [
|
|
2279
|
+
e.indent > 0 ? /* @__PURE__ */ c(
|
|
2280
|
+
O.Item,
|
|
2281
|
+
{
|
|
2282
|
+
size: Fl,
|
|
2283
|
+
textAlign: "center",
|
|
2284
|
+
"data-testid": "item-nest-arrow",
|
|
2285
|
+
children: /* @__PURE__ */ c("span", { style: { color: E }, children: /* @__PURE__ */ c(br, { size: "md", color: "inherit" }) })
|
|
2286
|
+
}
|
|
2287
|
+
) : null,
|
|
2288
|
+
/* @__PURE__ */ K(O.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
2289
|
+
/* @__PURE__ */ c(
|
|
2290
|
+
"div",
|
|
2291
|
+
{
|
|
2292
|
+
style: {
|
|
2293
|
+
lineHeight: r ? 0 : `${Ql}rem`,
|
|
2294
|
+
marginBottom: P.length === 0 ? 0 : `${r ? Xl : Vl}rem`
|
|
2295
|
+
},
|
|
2296
|
+
children: !r && te ? /* @__PURE__ */ K(O, { alignItems: "center", gap: "x-small", wrap: "wrap", children: [
|
|
2297
|
+
/* @__PURE__ */ c(O.Item, { shouldShrink: !0, children: ne }),
|
|
2298
|
+
/* @__PURE__ */ c(O.Item, { children: te })
|
|
2299
|
+
] }) : ne
|
|
2300
|
+
}
|
|
2301
|
+
),
|
|
2302
|
+
/* @__PURE__ */ c("div", { style: Bl, children: /* @__PURE__ */ c(
|
|
2303
|
+
be,
|
|
2304
|
+
{
|
|
2305
|
+
size: r ? "small" : "x-small",
|
|
2306
|
+
lineHeight: "default",
|
|
2307
|
+
color: "secondary",
|
|
2308
|
+
"data-testid": "module-item-meta",
|
|
2309
|
+
children: U.map((S, G) => /* @__PURE__ */ c(
|
|
2310
|
+
"span",
|
|
2311
|
+
{
|
|
2312
|
+
style: r ? G > 0 ? at : Gl : U.length > 1 ? G > 0 ? Hl : at : void 0,
|
|
2313
|
+
"data-testid": "meta-line",
|
|
2314
|
+
children: S.map((B, xe) => /* @__PURE__ */ K(Rt, { children: [
|
|
2315
|
+
xe > 0 ? /* @__PURE__ */ c("span", { style: Kl, children: " " }) : null,
|
|
2316
|
+
/* @__PURE__ */ K(
|
|
2317
|
+
"span",
|
|
2318
|
+
{
|
|
2319
|
+
style: xe > 0 ? Ie : he,
|
|
2320
|
+
"data-testid": "meta-fact",
|
|
2321
|
+
"data-fact-key": B.key,
|
|
2322
|
+
children: [
|
|
2323
|
+
Ce(B.icon) ? null : /* @__PURE__ */ c(
|
|
2324
|
+
"span",
|
|
2325
|
+
{
|
|
2326
|
+
style: Yl,
|
|
2327
|
+
"aria-hidden": "true",
|
|
2328
|
+
"data-testid": `meta-icon-${B.key}`,
|
|
2329
|
+
children: r && xt(B.icon) && B.icon.props.size === "xs" ? ir(B.icon, { size: "sm" }) : B.icon
|
|
2330
|
+
}
|
|
2331
|
+
),
|
|
2332
|
+
B.node
|
|
2333
|
+
]
|
|
2334
|
+
}
|
|
2335
|
+
)
|
|
2336
|
+
] }, B.key))
|
|
2337
|
+
},
|
|
2338
|
+
S[0].key
|
|
2339
|
+
))
|
|
2340
|
+
}
|
|
2341
|
+
) }),
|
|
2342
|
+
r && re ? /* @__PURE__ */ c(ge, { as: "div", margin: "x-small 0 0 0", children: re }) : null
|
|
2343
|
+
] })
|
|
2344
|
+
] }) }),
|
|
2345
|
+
!r && re ? /* @__PURE__ */ c(O.Item, { children: re }) : null
|
|
2346
|
+
] }) })
|
|
2347
|
+
}
|
|
2348
|
+
);
|
|
2349
|
+
}
|
|
2350
|
+
const ed = sr(Jl);
|
|
2351
|
+
function eu(e) {
|
|
2352
|
+
switch (e) {
|
|
2353
|
+
case "complete":
|
|
2354
|
+
return "complete";
|
|
2355
|
+
case "locked":
|
|
2356
|
+
return "locked";
|
|
2357
|
+
case void 0:
|
|
2358
|
+
case "not_started":
|
|
2359
|
+
return "notStarted";
|
|
2360
|
+
case "in_progress":
|
|
2361
|
+
return "inProgress";
|
|
2362
|
+
case "missing":
|
|
2363
|
+
case "incomplete":
|
|
2364
|
+
case "missing_and_incomplete":
|
|
2365
|
+
return "missing";
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
function Tt(e) {
|
|
2369
|
+
return (t, n) => {
|
|
2370
|
+
const { newTheme: o } = n;
|
|
2371
|
+
return {
|
|
2372
|
+
backgroundPrimaryInverse: o.semantics(o.primitives).color.background.accent[e]
|
|
2373
|
+
};
|
|
2374
|
+
};
|
|
2375
|
+
}
|
|
2376
|
+
const tu = {
|
|
2377
|
+
missing: {
|
|
2378
|
+
background: "primary-inverse",
|
|
2379
|
+
borderWidth: "none",
|
|
2380
|
+
themeOverride: Tt("honey"),
|
|
2381
|
+
icon: /* @__PURE__ */ c(_e, { size: "sm", color: "onColor" })
|
|
2382
|
+
},
|
|
2383
|
+
complete: {
|
|
2384
|
+
background: "primary-inverse",
|
|
2385
|
+
borderWidth: "none",
|
|
2386
|
+
themeOverride: Tt("aurora"),
|
|
2387
|
+
icon: /* @__PURE__ */ c(Ft, { size: "sm", color: "onColor" })
|
|
2388
|
+
},
|
|
2389
|
+
inProgress: {
|
|
2390
|
+
background: "primary-inverse",
|
|
2391
|
+
borderWidth: "none",
|
|
2392
|
+
themeOverride: Tt("sky"),
|
|
2393
|
+
icon: /* @__PURE__ */ c(qt, { size: "sm", color: "onColor" })
|
|
2394
|
+
},
|
|
2395
|
+
notStarted: {
|
|
2396
|
+
background: "primary",
|
|
2397
|
+
borderWidth: "medium",
|
|
2398
|
+
icon: /* @__PURE__ */ c(zt, { size: "sm", color: "baseColor" })
|
|
2399
|
+
},
|
|
2400
|
+
locked: {
|
|
2401
|
+
background: "secondary",
|
|
2402
|
+
borderWidth: "small",
|
|
2403
|
+
icon: /* @__PURE__ */ c(kt, { size: "sm", color: "baseColor" })
|
|
2404
|
+
}
|
|
2405
|
+
};
|
|
2406
|
+
function nu(e) {
|
|
2407
|
+
var i, u, m;
|
|
2408
|
+
let t = 0, n = 0, o = 0;
|
|
2409
|
+
for (const p of e)
|
|
2410
|
+
((i = p.progress) == null ? void 0 : i.status) === "complete" && (t += 1), n += ((u = p.progress) == null ? void 0 : u.requirementCount) ?? 0, o += ((m = p.progress) == null ? void 0 : m.requirementsMet) ?? 0;
|
|
2411
|
+
const r = e.length, s = r === 0 ? 0 : t === r ? 100 : Math.floor(t / r * 100);
|
|
2412
|
+
return {
|
|
2413
|
+
totalModules: r,
|
|
2414
|
+
completedModules: t,
|
|
2415
|
+
totalItems: n,
|
|
2416
|
+
completedItems: o,
|
|
2417
|
+
percent: s
|
|
2418
|
+
};
|
|
2419
|
+
}
|
|
2420
|
+
const Dt = 32, ou = "4px", ru = 4, Ue = { none: 0, small: 1, medium: 2 }, su = 6, iu = 8, no = 2, nt = 3;
|
|
2421
|
+
function au(e, t, n) {
|
|
2422
|
+
const o = ru + n / 2, r = e ? Dt / 2 : o, s = t ? Dt / 2 : o;
|
|
2423
|
+
return `${r}px ${s}px ${s}px ${r}px`;
|
|
2424
|
+
}
|
|
2425
|
+
function cu({
|
|
2426
|
+
module: e,
|
|
2427
|
+
isFirst: t,
|
|
2428
|
+
isLast: n,
|
|
2429
|
+
onClick: o
|
|
2430
|
+
}) {
|
|
2431
|
+
var h, E, y;
|
|
2432
|
+
const { t: r } = ee(), i = No().moduleLabel(e.position, e), u = i ? r("moduleNameWithLabel", { label: i, name: e.name }) : e.name, m = ((h = e.progress) == null ? void 0 : h.status) ?? "not_started", p = eu(m), b = r("moduleProgressSegmentLabel", {
|
|
2433
|
+
name: u,
|
|
2434
|
+
status: Wo(
|
|
2435
|
+
r,
|
|
2436
|
+
m,
|
|
2437
|
+
((E = e.progress) == null ? void 0 : E.missingCount) ?? 0,
|
|
2438
|
+
((y = e.progress) == null ? void 0 : y.incompleteCount) ?? 0
|
|
2439
|
+
)
|
|
2440
|
+
}), g = tu[p];
|
|
2441
|
+
return /* @__PURE__ */ c(O.Item, { shouldGrow: !0, shouldShrink: !0, size: "0", children: /* @__PURE__ */ c(wr, { renderTip: u, children: () => /* @__PURE__ */ K(
|
|
2442
|
+
ge,
|
|
2443
|
+
{
|
|
2444
|
+
as: "button",
|
|
2445
|
+
type: "button",
|
|
2446
|
+
display: "block",
|
|
2447
|
+
width: "100%",
|
|
2448
|
+
height: `${Dt}px`,
|
|
2449
|
+
padding: "0",
|
|
2450
|
+
position: "relative",
|
|
2451
|
+
borderRadius: au(t, n, Ue[g.borderWidth]),
|
|
2452
|
+
borderWidth: g.borderWidth,
|
|
2453
|
+
borderColor: "secondary",
|
|
2454
|
+
background: g.background,
|
|
2455
|
+
themeOverride: g.themeOverride,
|
|
2456
|
+
cursor: o ? "pointer" : void 0,
|
|
2457
|
+
onClick: o ? () => o(e.id) : void 0,
|
|
2458
|
+
"data-testid": `modules-progress-segment-${e.id}`,
|
|
2459
|
+
children: [
|
|
2460
|
+
/* @__PURE__ */ c(O, { as: "span", height: "100%", justifyItems: "center", alignItems: "center", children: g.icon }),
|
|
2461
|
+
/* @__PURE__ */ c(ao, { children: b }),
|
|
2462
|
+
/* @__PURE__ */ c(
|
|
2463
|
+
"span",
|
|
2464
|
+
{
|
|
2465
|
+
"aria-hidden": "true",
|
|
2466
|
+
"data-testid": `modules-progress-hit-area-${e.id}`,
|
|
2467
|
+
style: {
|
|
2468
|
+
position: "absolute",
|
|
2469
|
+
top: `-${su + Ue[g.borderWidth]}px`,
|
|
2470
|
+
bottom: `-${iu + Ue[g.borderWidth]}px`,
|
|
2471
|
+
left: `${no - Ue[g.borderWidth]}px`,
|
|
2472
|
+
right: `${no - Ue[g.borderWidth]}px`
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
)
|
|
2476
|
+
]
|
|
2477
|
+
}
|
|
2478
|
+
) }) });
|
|
2479
|
+
}
|
|
2480
|
+
function td({
|
|
2481
|
+
modules: e,
|
|
2482
|
+
onModuleClick: t,
|
|
2483
|
+
hasMoreModules: n = !1,
|
|
2484
|
+
continuesBefore: o = !1,
|
|
2485
|
+
continuesAfter: r = !1,
|
|
2486
|
+
pagination: s
|
|
2487
|
+
}) {
|
|
2488
|
+
const { t: i } = ee(), u = W(() => nu(e), [e]);
|
|
2489
|
+
if (!e.some((g) => g.progress !== void 0) || u.totalModules === 0) return null;
|
|
2490
|
+
const p = i("moduleProgressOverviewSummary", {
|
|
2491
|
+
count: u.totalModules,
|
|
2492
|
+
completedModules: u.completedModules,
|
|
2493
|
+
totalModules: u.totalModules
|
|
2494
|
+
}), b = u.totalItems > 0 ? i("moduleProgressOverviewDetail", {
|
|
2495
|
+
itemsSummary: i("moduleProgressOverviewItemsSummary", {
|
|
2496
|
+
count: u.totalItems,
|
|
2497
|
+
completedItems: u.completedItems,
|
|
2498
|
+
totalItems: u.totalItems
|
|
2499
|
+
})
|
|
2500
|
+
}) : null;
|
|
2501
|
+
return /* @__PURE__ */ K(ge, { as: "div", margin: "0 0 small 0", "data-testid": "modules-progress-overview", children: [
|
|
2502
|
+
n ? null : /* @__PURE__ */ c(O, { wrap: "wrap", children: /* @__PURE__ */ K(O.Item, { children: [
|
|
2503
|
+
/* @__PURE__ */ c(ge, { as: "span", margin: "0 x-small 0 0", children: /* @__PURE__ */ c(
|
|
2504
|
+
Tr,
|
|
2505
|
+
{
|
|
2506
|
+
level: "reset",
|
|
2507
|
+
variant: "titleSection",
|
|
2508
|
+
"data-testid": "modules-progress-overview-percent",
|
|
2509
|
+
children: i("moduleProgressOverviewPercentLabel", { percent: u.percent })
|
|
2510
|
+
}
|
|
2511
|
+
) }),
|
|
2512
|
+
/* @__PURE__ */ c(be, { variant: "content", "data-testid": "modules-progress-overview-summary", children: b ? `${p} ${b}` : p })
|
|
2513
|
+
] }) }),
|
|
2514
|
+
/* @__PURE__ */ c(ge, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ c(
|
|
2515
|
+
O,
|
|
2516
|
+
{
|
|
2517
|
+
gap: ou,
|
|
2518
|
+
role: "group",
|
|
2519
|
+
"aria-label": i("moduleProgressOverviewGroupLabel"),
|
|
2520
|
+
"data-testid": "modules-progress-overview-segments",
|
|
2521
|
+
children: e.map((g, h) => /* @__PURE__ */ c(
|
|
2522
|
+
cu,
|
|
2523
|
+
{
|
|
2524
|
+
module: g,
|
|
2525
|
+
isFirst: h === 0 && !o,
|
|
2526
|
+
isLast: h === e.length - 1 && !r,
|
|
2527
|
+
onClick: t
|
|
2528
|
+
},
|
|
2529
|
+
g.id
|
|
2530
|
+
))
|
|
2531
|
+
}
|
|
2532
|
+
) }),
|
|
2533
|
+
s ? /* @__PURE__ */ c(lu, { pagination: s, shownCount: e.length }) : null
|
|
2534
|
+
] });
|
|
2535
|
+
}
|
|
2536
|
+
function oo({
|
|
2537
|
+
targetRef: e,
|
|
2538
|
+
testId: t,
|
|
2539
|
+
children: n
|
|
2540
|
+
}) {
|
|
2541
|
+
return /* @__PURE__ */ c(
|
|
2542
|
+
"span",
|
|
2543
|
+
{
|
|
2544
|
+
"data-testid": t,
|
|
2545
|
+
style: {
|
|
2546
|
+
display: "inline-flex",
|
|
2547
|
+
padding: `0 ${nt}px ${nt}px`,
|
|
2548
|
+
margin: `0 -${nt}px -${nt}px`
|
|
2549
|
+
},
|
|
2550
|
+
onClick: (o) => {
|
|
2551
|
+
var r;
|
|
2552
|
+
o.target === o.currentTarget && ((r = e.current) == null || r.click());
|
|
2553
|
+
},
|
|
2554
|
+
children: n
|
|
2555
|
+
}
|
|
2556
|
+
);
|
|
2557
|
+
}
|
|
2558
|
+
function lu({
|
|
2559
|
+
pagination: e,
|
|
2560
|
+
shownCount: t
|
|
2561
|
+
}) {
|
|
2562
|
+
const { t: n } = ee(), { rangeStart: o, totalCount: r, hasPreviousPage: s, hasNextPage: i, disabled: u = !1 } = e, m = C(null), p = C(null), b = C(null);
|
|
2563
|
+
ar(() => {
|
|
2564
|
+
var E, y;
|
|
2565
|
+
const h = b.current;
|
|
2566
|
+
h !== null && (b.current = null, h === "next" && !i && ((E = m.current) == null || E.focus()), h === "previous" && !s && ((y = p.current) == null || y.focus()));
|
|
2567
|
+
}, [i, s]);
|
|
2568
|
+
const g = (h) => {
|
|
2569
|
+
if (u) return;
|
|
2570
|
+
b.current = h;
|
|
2571
|
+
const E = p.current, y = m.current;
|
|
2572
|
+
h === "next" ? e.onNextPage(E, y) : e.onPreviousPage(y, E);
|
|
2573
|
+
};
|
|
2574
|
+
return /* @__PURE__ */ c(ge, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ K(
|
|
2575
|
+
O,
|
|
2576
|
+
{
|
|
2577
|
+
as: "nav",
|
|
2578
|
+
justifyItems: "space-between",
|
|
2579
|
+
alignItems: "center",
|
|
2580
|
+
gap: "x-small",
|
|
2581
|
+
"aria-label": n("moduleProgressOverviewPaginationLabel"),
|
|
2582
|
+
"data-testid": "modules-progress-overview-pagination",
|
|
2583
|
+
children: [
|
|
2584
|
+
/* @__PURE__ */ c(oo, { targetRef: m, testId: "modules-progress-overview-previous-hit-area", children: /* @__PURE__ */ c(
|
|
2585
|
+
Sn,
|
|
2586
|
+
{
|
|
2587
|
+
size: "small",
|
|
2588
|
+
withBackground: !1,
|
|
2589
|
+
withBorder: !1,
|
|
2590
|
+
renderIcon: /* @__PURE__ */ c(yr, {}),
|
|
2591
|
+
screenReaderLabel: n("paginationPreviousPage"),
|
|
2592
|
+
interaction: s ? "enabled" : "disabled",
|
|
2593
|
+
elementRef: (h) => {
|
|
2594
|
+
m.current = h;
|
|
2595
|
+
},
|
|
2596
|
+
onClick: () => g("previous")
|
|
2597
|
+
}
|
|
2598
|
+
) }),
|
|
2599
|
+
r === null ? null : /* @__PURE__ */ c(be, { size: "small", color: "secondary", "data-testid": "modules-progress-overview-range", children: n("moduleProgressOverviewPageRange", {
|
|
2600
|
+
start: o,
|
|
2601
|
+
end: o + t - 1,
|
|
2602
|
+
total: r
|
|
2603
|
+
}) }),
|
|
2604
|
+
/* @__PURE__ */ c(oo, { targetRef: p, testId: "modules-progress-overview-next-hit-area", children: /* @__PURE__ */ c(
|
|
2605
|
+
Sn,
|
|
2606
|
+
{
|
|
2607
|
+
size: "small",
|
|
2608
|
+
withBackground: !1,
|
|
2609
|
+
withBorder: !1,
|
|
2610
|
+
renderIcon: /* @__PURE__ */ c(Ir, {}),
|
|
2611
|
+
screenReaderLabel: n("paginationNextPage"),
|
|
2612
|
+
interaction: i ? "enabled" : "disabled",
|
|
2613
|
+
elementRef: (h) => {
|
|
2614
|
+
p.current = h;
|
|
2615
|
+
},
|
|
2616
|
+
onClick: () => g("next")
|
|
2617
|
+
}
|
|
2618
|
+
) })
|
|
2619
|
+
]
|
|
2620
|
+
}
|
|
2621
|
+
) });
|
|
2622
|
+
}
|
|
2623
|
+
export {
|
|
2624
|
+
Lr as $,
|
|
2625
|
+
Cc as A,
|
|
2626
|
+
Bl as B,
|
|
2627
|
+
Kl as C,
|
|
2628
|
+
Bo as D,
|
|
2629
|
+
Zu as E,
|
|
2630
|
+
Gu as F,
|
|
2631
|
+
Hu as G,
|
|
2632
|
+
At as H,
|
|
2633
|
+
bo as I,
|
|
2634
|
+
ed as J,
|
|
2635
|
+
qr as K,
|
|
2636
|
+
Ol as L,
|
|
2637
|
+
Lu as M,
|
|
2638
|
+
$r as N,
|
|
2639
|
+
Ur as O,
|
|
2640
|
+
zr as P,
|
|
2641
|
+
Wu as Q,
|
|
2642
|
+
Ku as R,
|
|
2643
|
+
qu as S,
|
|
2644
|
+
Vu as T,
|
|
2645
|
+
td as U,
|
|
2646
|
+
Lc as V,
|
|
2647
|
+
uo as W,
|
|
2648
|
+
Rr as X,
|
|
2649
|
+
_r as Y,
|
|
2650
|
+
Ar as Z,
|
|
2651
|
+
mo as _,
|
|
2652
|
+
Du as a,
|
|
2653
|
+
Dr as a0,
|
|
2654
|
+
Nr as a1,
|
|
2655
|
+
Fr as a2,
|
|
2656
|
+
po as a3,
|
|
2657
|
+
xr as a4,
|
|
2658
|
+
Au as a5,
|
|
2659
|
+
Or as a6,
|
|
2660
|
+
go as a7,
|
|
2661
|
+
fo as a8,
|
|
2662
|
+
Fu as a9,
|
|
2663
|
+
ot as aA,
|
|
2664
|
+
We as aB,
|
|
2665
|
+
Vr as aC,
|
|
2666
|
+
Al as aD,
|
|
2667
|
+
Cl as aE,
|
|
2668
|
+
_l as aF,
|
|
2669
|
+
Wo as aG,
|
|
2670
|
+
So as aH,
|
|
2671
|
+
fe as aI,
|
|
2672
|
+
fc as aJ,
|
|
2673
|
+
Ce as aK,
|
|
2674
|
+
Ho as aL,
|
|
2675
|
+
Tt as aM,
|
|
2676
|
+
Hr as aa,
|
|
2677
|
+
Bn as ab,
|
|
2678
|
+
Rc as ac,
|
|
2679
|
+
Oc as ad,
|
|
2680
|
+
xc as ae,
|
|
2681
|
+
$t as af,
|
|
2682
|
+
Hc as ag,
|
|
2683
|
+
Uc as ah,
|
|
2684
|
+
Nc as ai,
|
|
2685
|
+
Bc as aj,
|
|
2686
|
+
Wc as ak,
|
|
2687
|
+
He as al,
|
|
2688
|
+
Ee as am,
|
|
2689
|
+
ju as an,
|
|
2690
|
+
zc as ao,
|
|
2691
|
+
Yu as ap,
|
|
2692
|
+
De as aq,
|
|
2693
|
+
Oo as ar,
|
|
2694
|
+
Qc as as,
|
|
2695
|
+
Yc as at,
|
|
2696
|
+
Kc as au,
|
|
2697
|
+
Ht as av,
|
|
2698
|
+
ko as aw,
|
|
2699
|
+
Gt as ax,
|
|
2700
|
+
nl as ay,
|
|
2701
|
+
$u as az,
|
|
2702
|
+
Mn as b,
|
|
2703
|
+
zu as c,
|
|
2704
|
+
Qu as d,
|
|
2705
|
+
Ou as e,
|
|
2706
|
+
Nu as f,
|
|
2707
|
+
ku as g,
|
|
2708
|
+
Et as h,
|
|
2709
|
+
Uu as i,
|
|
2710
|
+
Bt as j,
|
|
2711
|
+
ut as k,
|
|
2712
|
+
El as l,
|
|
2713
|
+
Bu as m,
|
|
2714
|
+
Yl as n,
|
|
2715
|
+
Pn as o,
|
|
2716
|
+
Wr as p,
|
|
2717
|
+
No as q,
|
|
2718
|
+
kl as r,
|
|
2719
|
+
Ju as s,
|
|
2720
|
+
Xu as t,
|
|
2721
|
+
ee as u,
|
|
2722
|
+
yo as v,
|
|
2723
|
+
xu as w,
|
|
2724
|
+
vo as x,
|
|
2725
|
+
Ru as y,
|
|
2726
|
+
$l as z
|
|
2727
|
+
};
|