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