@instructure/platform-modules 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,37 +1,37 @@
1
- import { z as m } from "zod";
1
+ import { z as p } from "zod";
2
2
  import { gql as xe } from "graphql-tag";
3
- import { jsx as l, jsxs as C, Fragment as vt } from "react/jsx-runtime";
4
- import { createContext as en, useContext as tn, useMemo as N, isValidElement as nn, useCallback as U, useRef as $, useState as V, useEffect as Z, useId as st, memo as on, Fragment as sn } from "react";
5
- import { PlugInstUIIcon as ro, ExternalLinkInstUIIcon as io, FileInstUIIcon as lo, FileTextInstUIIcon as ao, MessagesSquareInstUIIcon as co, RocketInstUIIcon as uo, FilePenLineInstUIIcon as mo, LockInstUIIcon as rn, CircleAlertInstUIIcon as Pe, CircleCheckInstUIIcon as ln, ClockFadingInstUIIcon as an, CircleDashedInstUIIcon as cn, CornerDownRightInstUIIcon as po, IconArrowOpenUpLine as fo, IconArrowOpenDownLine as go } from "@instructure/ui-icons";
6
- import { useQueryClient as ht, useInfiniteQuery as It, keepPreviousData as ho, InfiniteQueryObserver as Io } from "@tanstack/react-query";
7
- import bo from "p-limit";
8
- import { Button as ve, IconButton as Mo } from "@instructure/ui-buttons/v11_7";
9
- import { Flex as E } from "@instructure/ui-flex/v11_7";
10
- import { Text as v } from "@instructure/ui-text/v11_7";
11
- import { View as T } from "@instructure/ui-view/v11_7";
12
- import { TruncateWithTooltip as yo, politeAnnounce as pe, getLiveRegion as un } from "@instructure/platform-instui-bindings";
13
- import { Alert as dn } from "@instructure/ui-alerts/v11_7";
14
- import { Heading as mn } from "@instructure/ui-heading/v11_7";
15
- import { ProgressBar as So } from "@instructure/ui-progress/v11_7";
16
- import { Spinner as rt } from "@instructure/ui-spinner/v11_7";
17
- import { Tooltip as pn } from "@instructure/ui-tooltip/v11_7";
18
- import { useTheme as fn } from "@instructure/emotion";
19
- import { ScreenReaderContent as it } from "@instructure/ui-a11y-content";
20
- import { Link as _o } from "@instructure/ui-link/v11_7";
21
- import { isValid as lt, colorToRGB as at, overlayColors as To, alpha as Eo, color2hex as gn, contrast as oe, darken as Co, lighten as wo } from "@instructure/ui-color-utils";
22
- import { Pill as Po } from "@instructure/ui-pill/v11_7";
23
- import { WithBreakpoints as vo } from "@instructure/platform-with-breakpoints";
24
- const Ao = m.object({
25
- target: m.enum(["module", "item"]),
26
- field: m.string(),
27
- op: m.enum(["eq", "contains"]),
28
- value: m.union([m.string(), m.boolean()])
3
+ import { jsx as i, jsxs as _, Fragment as xt } from "react/jsx-runtime";
4
+ import { createContext as on, useContext as sn, useMemo as N, isValidElement as rn, useCallback as F, useRef as $, useState as ee, useEffect as te, useId as rt, memo as ln, Fragment as an } from "react";
5
+ import { PlugInstUIIcon as po, ExternalLinkInstUIIcon as go, FileInstUIIcon as fo, FileTextInstUIIcon as ho, MessagesSquareInstUIIcon as Io, RocketInstUIIcon as bo, FilePenLineInstUIIcon as Mo, LockInstUIIcon as cn, CircleAlertInstUIIcon as ve, CircleCheckInstUIIcon as un, ClockFadingInstUIIcon as dn, CircleDashedInstUIIcon as mn, CalendarInstUIIcon as So, CornerDownRightInstUIIcon as yo, IconArrowOpenUpLine as _o, IconArrowOpenDownLine as To } from "@instructure/ui-icons";
6
+ import { useQueryClient as It, useInfiniteQuery as bt, keepPreviousData as Eo, InfiniteQueryObserver as Co } from "@tanstack/react-query";
7
+ import wo from "p-limit";
8
+ import { Button as Pe, IconButton as vo } from "@instructure/ui-buttons/v11_7";
9
+ import { Flex as M } from "@instructure/ui-flex/v11_7";
10
+ import { Text as A } from "@instructure/ui-text/v11_7";
11
+ import { View as C } from "@instructure/ui-view/v11_7";
12
+ import { politeAnnounce as he, getLiveRegion as pn, TruncateWithTooltip as Po } from "@instructure/platform-instui-bindings";
13
+ import { Alert as gn } from "@instructure/ui-alerts/v11_7";
14
+ import { Heading as fn } from "@instructure/ui-heading/v11_7";
15
+ import { Link as hn } from "@instructure/ui-link/v11_7";
16
+ import { ProgressBar as Ao } from "@instructure/ui-progress/v11_7";
17
+ import { Spinner as it } from "@instructure/ui-spinner/v11_7";
18
+ import { Tooltip as In } from "@instructure/ui-tooltip/v11_7";
19
+ import { useTheme as bn } from "@instructure/emotion";
20
+ import { ScreenReaderContent as lt } from "@instructure/ui-a11y-content";
21
+ import { isValid as at, colorToRGB as ct, overlayColors as xo, alpha as Lo, color2hex as Mn, contrast as se, darken as Ro, lighten as ko } from "@instructure/ui-color-utils";
22
+ import { Pill as Do } from "@instructure/ui-pill/v11_7";
23
+ import { WithBreakpoints as No } from "@instructure/platform-with-breakpoints";
24
+ const Oo = p.object({
25
+ target: p.enum(["module", "item"]),
26
+ field: p.string(),
27
+ op: p.enum(["eq", "contains"]),
28
+ value: p.union([p.string(), p.boolean()])
29
29
  }).strict();
30
- function xo(e, t) {
30
+ function qo(e, t) {
31
31
  const n = e == null ? void 0 : e[t.target];
32
32
  return !n || !Object.prototype.hasOwnProperty.call(n, t.field) ? !1 : n[t.field].includes(t.op);
33
33
  }
34
- const Lo = m.enum([
34
+ const Fo = p.enum([
35
35
  "assignment",
36
36
  "quiz",
37
37
  "discussion",
@@ -40,7 +40,7 @@ const Lo = m.enum([
40
40
  "external_url",
41
41
  "external_tool",
42
42
  "sub_header"
43
- ]), Ro = m.enum(["not_started", "in_progress", "complete", "incomplete", "missing", "locked"]), ko = m.enum([
43
+ ]), Uo = p.enum(["not_started", "in_progress", "complete", "incomplete", "missing", "locked"]), zo = p.enum([
44
44
  "not_started",
45
45
  "in_progress",
46
46
  "complete",
@@ -48,7 +48,7 @@ const Lo = m.enum([
48
48
  "incomplete",
49
49
  "missing_and_incomplete",
50
50
  "locked"
51
- ]), No = m.enum([
51
+ ]), $o = p.enum([
52
52
  "must_view",
53
53
  "must_mark_done",
54
54
  "must_contribute",
@@ -56,97 +56,97 @@ const Lo = m.enum([
56
56
  "min_score",
57
57
  "min_percentage",
58
58
  "unknown"
59
- ]), Do = m.object({
60
- status: ko.optional(),
61
- requirementsMet: m.number(),
62
- requirementCount: m.number(),
63
- percentComplete: m.number().min(0).max(100),
64
- nextDueAt: m.string().nullish(),
65
- missingCount: m.number(),
66
- incompleteCount: m.number()
67
- }), hn = m.object({
68
- itemId: m.string(),
69
- type: No,
70
- minScore: m.number().nullish(),
71
- minPercentage: m.number().nullish()
72
- }), In = m.object({
73
- id: m.string(),
74
- moduleId: m.string(),
75
- title: m.string(),
76
- type: Lo,
77
- position: m.number(),
78
- indent: m.number(),
79
- published: m.boolean(),
80
- url: m.string().nullish(),
81
- newTab: m.boolean().nullish(),
82
- completionRequirement: hn.nullish(),
83
- dueAt: m.string().nullish(),
84
- status: Ro.optional(),
85
- pointsPossible: m.number().nullish(),
86
- extensions: m.record(m.unknown()).optional()
87
- }), Oo = m.object({
88
- id: m.string(),
89
- name: m.string()
90
- }), qo = m.object({
91
- id: m.string(),
92
- name: m.string(),
93
- position: m.number(),
94
- published: m.boolean(),
95
- itemCount: m.number(),
96
- items: m.array(In).optional(),
97
- unlockAt: m.string().nullish(),
98
- prerequisiteModules: m.array(Oo),
99
- requirementCount: m.number().nullish(),
100
- requireSequentialProgress: m.boolean(),
101
- completionRequirements: m.array(hn).optional(),
102
- progress: Do.optional(),
103
- collapsed: m.boolean().nullish(),
104
- extensions: m.record(m.unknown()).optional()
105
- }), bn = m.object({
106
- hasNextPage: m.boolean(),
107
- endCursor: m.string().nullable()
59
+ ]), Bo = p.object({
60
+ status: zo.optional(),
61
+ requirementsMet: p.number(),
62
+ requirementCount: p.number(),
63
+ percentComplete: p.number().min(0).max(100),
64
+ nextDueAt: p.string().nullish(),
65
+ missingCount: p.number(),
66
+ incompleteCount: p.number()
67
+ }), Sn = p.object({
68
+ itemId: p.string(),
69
+ type: $o,
70
+ minScore: p.number().nullish(),
71
+ minPercentage: p.number().nullish()
72
+ }), yn = p.object({
73
+ id: p.string(),
74
+ moduleId: p.string(),
75
+ title: p.string(),
76
+ type: Fo,
77
+ position: p.number(),
78
+ indent: p.number(),
79
+ published: p.boolean(),
80
+ url: p.string().nullish(),
81
+ newTab: p.boolean().nullish(),
82
+ completionRequirement: Sn.nullish(),
83
+ dueAt: p.string().nullish(),
84
+ status: Uo.optional(),
85
+ pointsPossible: p.number().nullish(),
86
+ extensions: p.record(p.unknown()).optional()
87
+ }), Go = p.object({
88
+ id: p.string(),
89
+ name: p.string()
90
+ }), jo = p.object({
91
+ id: p.string(),
92
+ name: p.string(),
93
+ position: p.number(),
94
+ published: p.boolean(),
95
+ itemCount: p.number(),
96
+ items: p.array(yn).optional(),
97
+ unlockAt: p.string().nullish(),
98
+ prerequisiteModules: p.array(Go),
99
+ requirementCount: p.number().nullish(),
100
+ requireSequentialProgress: p.boolean(),
101
+ completionRequirements: p.array(Sn).optional(),
102
+ progress: Bo.optional(),
103
+ collapsed: p.boolean().nullish(),
104
+ extensions: p.record(p.unknown()).optional()
105
+ }), _n = p.object({
106
+ hasNextPage: p.boolean(),
107
+ endCursor: p.string().nullable()
108
108
  }).refine((e) => !e.hasNextPage || e.endCursor !== null, {
109
109
  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.',
110
110
  path: ["endCursor"]
111
- }), Fo = m.object({
112
- modules: m.array(qo),
113
- pageInfo: bn
114
- }), Uo = m.object({
115
- items: m.array(In),
116
- pageInfo: bn
117
- }), Mn = "career.estimatedDurationMinutes";
118
- function zo(e) {
111
+ }), Yo = p.object({
112
+ modules: p.array(jo),
113
+ pageInfo: _n
114
+ }), Ho = p.object({
115
+ items: p.array(yn),
116
+ pageInfo: _n
117
+ }), Tn = "career.estimatedDurationMinutes";
118
+ function Wo(e) {
119
119
  var n;
120
- const t = (n = e.extensions) == null ? void 0 : n[Mn];
120
+ const t = (n = e.extensions) == null ? void 0 : n[Tn];
121
121
  return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? null : t;
122
122
  }
123
- function bt(e, t) {
124
- return t == null ? e : { ...e, [Mn]: t };
123
+ function Mt(e, t) {
124
+ return t == null ? e : { ...e, [Tn]: t };
125
125
  }
126
- const ct = 100, Mt = 2e3;
127
- class $o extends Error {
126
+ const ut = 100, St = 2e3;
127
+ class Ko extends Error {
128
128
  constructor(t, n) {
129
129
  super(
130
130
  `This in-memory adapter was built for course ${t} but was asked for course ${n}. A fixture serves exactly one course.`
131
131
  ), this.name = "InMemoryCourseMismatchError", this.expected = t, this.received = n;
132
132
  }
133
133
  }
134
- const Bo = (e) => `offset:${e}`, Go = (e) => {
134
+ const Qo = (e) => `offset:${e}`, Vo = (e) => {
135
135
  if (!e) return 0;
136
136
  const t = Number.parseInt(e.replace("offset:", ""), 10);
137
137
  return Number.isFinite(t) && t >= 0 ? t : 0;
138
- }, At = (e) => {
138
+ }, Lt = (e) => {
139
139
  if (e != null && e.aborted)
140
140
  throw new DOMException("The operation was aborted.", "AbortError");
141
141
  };
142
- function xt(e, t, n) {
143
- const o = Go(t), s = e.slice(o, o + n), r = o + s.length, i = r < e.length;
142
+ function Rt(e, t, n) {
143
+ const o = Vo(t), s = e.slice(o, o + n), r = o + s.length, l = r < e.length;
144
144
  return {
145
145
  slice: s,
146
- pageInfo: { hasNextPage: i, endCursor: i ? Bo(r) : null }
146
+ pageInfo: { hasNextPage: l, endCursor: l ? Qo(r) : null }
147
147
  };
148
148
  }
149
- const jo = /* @__PURE__ */ new Map([
149
+ const Zo = /* @__PURE__ */ new Map([
150
150
  ["COMPLETED", (e) => {
151
151
  var t;
152
152
  return ((t = e.progress) == null ? void 0 : t.status) === "complete";
@@ -166,55 +166,55 @@ const jo = /* @__PURE__ */ new Map([
166
166
  return ((t = e.progress) == null ? void 0 : t.status) !== "complete" && ((n = e.progress) == null ? void 0 : n.status) !== "in_progress";
167
167
  }
168
168
  ]
169
- ]), Yo = { module: { completionStatus: ["eq"] } };
170
- function Wo(e) {
169
+ ]), Xo = { module: { completionStatus: ["eq"] } };
170
+ function Jo(e) {
171
171
  if (e.target !== "module" || e.field !== "completionStatus" || e.op !== "eq")
172
172
  throw new Error(
173
173
  `in-memory adapter cannot compile ${e.target}.${e.field} ${e.op}`
174
174
  );
175
- const t = typeof e.value == "string" ? jo.get(e.value) : void 0;
175
+ const t = typeof e.value == "string" ? Zo.get(e.value) : void 0;
176
176
  if (!t) throw new Error(`unknown completionStatus "${String(e.value)}"`);
177
177
  return t;
178
178
  }
179
- function Wa(e, t = {}) {
179
+ function oc(e, t = {}) {
180
180
  const n = (s) => e.itemsByModuleId[s] ?? [], o = (s) => {
181
181
  if (s !== e.courseId)
182
- throw new $o(e.courseId, s);
182
+ throw new Ko(e.courseId, s);
183
183
  };
184
184
  return {
185
- capabilities: Yo,
185
+ capabilities: Xo,
186
186
  async listModules({
187
187
  courseId: s,
188
188
  cursor: r,
189
- pageSize: i,
189
+ pageSize: l,
190
190
  includeItems: a,
191
- filter: d,
192
- inlineItemsFirst: u,
193
- signal: c
191
+ filter: u,
192
+ inlineItemsFirst: c,
193
+ signal: d
194
194
  }) {
195
195
  var w;
196
- At(c), o(s), (w = t.onRequest) == null || w.call(t, "listModules", { operation: "listModules", courseId: s });
197
- const p = d ? e.modules.filter(Wo(d)) : e.modules, { slice: f, pageInfo: y } = xt(p, r, i), g = Math.min(u ?? ct, ct);
198
- return { modules: f.map((x) => {
199
- const _ = n(x.id), A = a && _.length <= g;
200
- return { ...x, itemCount: _.length, items: A ? _ : void 0 };
201
- }), pageInfo: y };
196
+ Lt(d), o(s), (w = t.onRequest) == null || w.call(t, "listModules", { operation: "listModules", courseId: s });
197
+ const m = u ? e.modules.filter(Jo(u)) : e.modules, { slice: f, pageInfo: S } = Rt(m, r, l), h = Math.min(c ?? ut, ut);
198
+ return { modules: f.map((E) => {
199
+ const P = n(E.id), z = a && P.length <= h;
200
+ return { ...E, itemCount: P.length, items: z ? P : void 0 };
201
+ }), pageInfo: S };
202
202
  },
203
203
  async listModuleItems({
204
204
  courseId: s,
205
205
  moduleId: r,
206
- cursor: i,
206
+ cursor: l,
207
207
  pageSize: a,
208
- signal: d
208
+ signal: u
209
209
  }) {
210
- var p;
211
- At(d), o(s), (p = t.onRequest) == null || p.call(t, "listModuleItems", { operation: "listModuleItems", courseId: s, moduleId: r });
212
- const { slice: u, pageInfo: c } = xt(n(r), i, a);
213
- return { items: u, pageInfo: c };
210
+ var m;
211
+ Lt(u), o(s), (m = t.onRequest) == null || m.call(t, "listModuleItems", { operation: "listModuleItems", courseId: s, moduleId: r });
212
+ const { slice: c, pageInfo: d } = Rt(n(r), l, a);
213
+ return { items: c, pageInfo: d };
214
214
  }
215
215
  };
216
216
  }
217
- class yn extends Error {
217
+ class En extends Error {
218
218
  constructor(t, n, o) {
219
219
  const s = t === "module" ? "module" : "module item";
220
220
  super(
@@ -222,11 +222,11 @@ class yn extends Error {
222
222
  ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = o;
223
223
  }
224
224
  }
225
- function Sn(e, t, n) {
225
+ function Cn(e, t, n) {
226
226
  if (e != null) return e;
227
- throw new yn(t, n, "published");
227
+ throw new En(t, n, "published");
228
228
  }
229
- function Ho(e, t) {
229
+ function es(e, t) {
230
230
  if (e.onUnsupportedItem) {
231
231
  e.onUnsupportedItem(t);
232
232
  return;
@@ -235,7 +235,7 @@ function Ho(e, t) {
235
235
  `[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
236
236
  );
237
237
  }
238
- const Ko = {
238
+ const ts = {
239
239
  Assignment: "assignment",
240
240
  Quiz: "quiz",
241
241
  Discussion: "discussion",
@@ -247,21 +247,21 @@ const Ko = {
247
247
  SubHeader: "sub_header",
248
248
  PeerReviewSubAssignment: "assignment"
249
249
  };
250
- function Qo(e) {
250
+ function ns(e) {
251
251
  const t = e == null ? void 0 : e.__typename;
252
252
  if (!t) return null;
253
- const n = Ko[t];
253
+ const n = ts[t];
254
254
  return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
255
255
  }
256
- const Vo = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
257
- function Zo(e) {
256
+ const os = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
257
+ function ss(e) {
258
258
  if (!e) return null;
259
- const t = Vo.exec(e);
259
+ const t = os.exec(e);
260
260
  if (!t) return null;
261
- const [, n, o, s, r, i] = t, a = Number(n ?? 0) * 7 * 24 * 60 + Number(o ?? 0) * 24 * 60 + Number(s ?? 0) * 60 + Number(r ?? 0) + Number(i ?? 0) / 60;
261
+ const [, n, o, s, r, l] = t, a = Number(n ?? 0) * 7 * 24 * 60 + Number(o ?? 0) * 24 * 60 + Number(s ?? 0) * 60 + Number(r ?? 0) + Number(l ?? 0) / 60;
262
262
  return Math.round(a);
263
263
  }
264
- const Xo = /* @__PURE__ */ new Set([
264
+ const rs = /* @__PURE__ */ new Set([
265
265
  "must_view",
266
266
  "must_mark_done",
267
267
  "must_contribute",
@@ -269,42 +269,42 @@ const Xo = /* @__PURE__ */ new Set([
269
269
  "min_score",
270
270
  "min_percentage"
271
271
  ]);
272
- function Jo(e) {
273
- return Xo.has(e) ? e : "unknown";
272
+ function is(e) {
273
+ return rs.has(e) ? e : "unknown";
274
274
  }
275
- function es(e) {
275
+ function ls(e) {
276
276
  return {
277
277
  itemId: String(e.id),
278
- type: Jo(e.type),
278
+ type: is(e.type),
279
279
  minScore: e.minScore ?? null,
280
280
  minPercentage: e.minPercentage ?? null
281
281
  };
282
282
  }
283
- function _n(e) {
283
+ function wn(e) {
284
284
  return {
285
285
  hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
286
286
  endCursor: (e == null ? void 0 : e.endCursor) ?? null
287
287
  };
288
288
  }
289
- const ts = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
290
- function ns(e) {
289
+ const as = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
290
+ function cs(e) {
291
291
  var t;
292
292
  for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
293
293
  if (n) return n;
294
294
  return null;
295
295
  }
296
- function Tn(e, t) {
296
+ function vn(e, t) {
297
297
  if (!e) return;
298
298
  const n = new Map(t.map((r) => [r.itemId, r.type])), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
299
299
  for (const r of e.requirementsMet ?? []) {
300
300
  if (!r) continue;
301
- const i = String(r.id);
302
- n.get(i) === r.type && o.add(i);
301
+ const l = String(r.id);
302
+ n.get(l) === r.type && o.add(l);
303
303
  }
304
304
  for (const r of e.incompleteRequirements ?? []) {
305
305
  if (!r) continue;
306
- const i = String(r.id);
307
- n.get(i) === r.type && ts.has(r.type) && s.set(i, r.score ?? null);
306
+ const l = String(r.id);
307
+ n.get(l) === r.type && as.has(r.type) && s.set(l, r.score ?? null);
308
308
  }
309
309
  return {
310
310
  locked: e.locked === !0 || e.workflowState === "locked",
@@ -315,7 +315,7 @@ function Tn(e, t) {
315
315
  incompleteRequirementScores: s
316
316
  };
317
317
  }
318
- const os = {
318
+ const us = {
319
319
  LOCKED: "locked",
320
320
  MISSING: "missing",
321
321
  INCOMPLETE: "incomplete",
@@ -323,11 +323,11 @@ const os = {
323
323
  IN_PROGRESS: "in_progress",
324
324
  NOT_STARTED: "not_started"
325
325
  };
326
- function ss(e) {
326
+ function ds(e) {
327
327
  if (e != null)
328
- return os[e];
328
+ return us[e];
329
329
  }
330
- const rs = {
330
+ const ms = {
331
331
  LOCKED: "locked",
332
332
  MISSING: "missing",
333
333
  MISSING_AND_INCOMPLETE: "missing_and_incomplete",
@@ -336,58 +336,58 @@ const rs = {
336
336
  IN_PROGRESS: "in_progress",
337
337
  NOT_STARTED: "not_started"
338
338
  };
339
- function is(e) {
339
+ function ps(e) {
340
340
  if (e != null)
341
- return rs[e];
341
+ return ms[e];
342
342
  }
343
- function ls(e, t, n) {
344
- var a, d;
343
+ function gs(e, t, n) {
344
+ var a, u;
345
345
  if (!n) return;
346
- const o = e.requirementCount ?? t.length, s = Math.min(n.requirementsMetItemIds.size, o), r = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0, i = [...n.incompleteRequirementScores.values()].filter(
347
- (u) => u != null
346
+ const o = e.requirementCount ?? t.length, s = Math.min(n.requirementsMetItemIds.size, o), r = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0, l = [...n.incompleteRequirementScores.values()].filter(
347
+ (c) => c != null
348
348
  ).length;
349
349
  return {
350
- status: is(e.moduleStatus) ?? (n.locked ? "locked" : void 0),
350
+ status: ps(e.moduleStatus) ?? (n.locked ? "locked" : void 0),
351
351
  requirementsMet: s,
352
352
  requirementCount: o,
353
353
  percentComplete: o > 0 ? Math.round(s / o * 100) : 0,
354
- nextDueAt: ((d = e.submissionStatistics) == null ? void 0 : d.nextDueAt) ?? null,
354
+ nextDueAt: ((u = e.submissionStatistics) == null ? void 0 : u.nextDueAt) ?? null,
355
355
  missingCount: r,
356
- incompleteCount: i
356
+ incompleteCount: l
357
357
  };
358
358
  }
359
- function as(e, t, n, o = {}, s) {
360
- var u, c, p;
361
- const r = String(e._id), i = Qo(e.content);
362
- if (!i)
363
- return Ho(o, { id: r, typename: ((u = e.content) == null ? void 0 : u.__typename) ?? null }), null;
364
- const a = ns(e.content), d = n.get(r) ?? null;
359
+ function fs(e, t, n, o = {}, s) {
360
+ var c, d, m;
361
+ const r = String(e._id), l = ns(e.content);
362
+ if (!l)
363
+ return es(o, { id: r, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
364
+ const a = cs(e.content), u = n.get(r) ?? null;
365
365
  return {
366
366
  id: r,
367
367
  moduleId: t,
368
368
  title: e.title ?? "",
369
- type: i,
369
+ type: l,
370
370
  position: e.position ?? 0,
371
371
  indent: e.indent ?? 0,
372
- published: Sn(e.published, "moduleItem", r),
372
+ published: Cn(e.published, "moduleItem", r),
373
373
  url: e.url ?? null,
374
374
  newTab: e.newTab ?? !1,
375
- completionRequirement: d,
376
- dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((c = e.content) == null ? void 0 : c.dueAt) ?? null,
377
- status: s ? ss(e.moduleItemStatus) ?? (s.locked ? "locked" : void 0) : void 0,
378
- pointsPossible: ((p = e.content) == null ? void 0 : p.pointsPossible) ?? null,
379
- extensions: bt(
375
+ completionRequirement: u,
376
+ dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((d = e.content) == null ? void 0 : d.dueAt) ?? null,
377
+ status: s ? ds(e.moduleItemStatus) ?? (s.locked ? "locked" : void 0) : void 0,
378
+ pointsPossible: ((m = e.content) == null ? void 0 : m.pointsPossible) ?? null,
379
+ extensions: Mt(
380
380
  void 0,
381
- Zo(e.estimatedDuration)
381
+ ss(e.estimatedDuration)
382
382
  )
383
383
  };
384
384
  }
385
- function En(e, t, n, o, s) {
385
+ function Pn(e, t, n, o, s) {
386
386
  const r = [];
387
- for (const i of e ?? []) {
388
- if (!i) continue;
389
- const a = as(
390
- i,
387
+ for (const l of e ?? []) {
388
+ if (!l) continue;
389
+ const a = fs(
390
+ l,
391
391
  t,
392
392
  n,
393
393
  o,
@@ -397,59 +397,59 @@ function En(e, t, n, o, s) {
397
397
  }
398
398
  return r;
399
399
  }
400
- function Cn(e) {
400
+ function An(e) {
401
401
  const t = [], n = /* @__PURE__ */ new Map();
402
402
  for (const o of e ?? []) {
403
403
  if (!o) continue;
404
- const s = es(o);
404
+ const s = ls(o);
405
405
  t.push(s), n.set(s.itemId, s);
406
406
  }
407
407
  return { list: t, byItemId: n };
408
408
  }
409
- function cs(e, t = {}) {
410
- var u, c;
409
+ function hs(e, t = {}) {
410
+ var c, d;
411
411
  const n = String(e._id);
412
412
  if (e.moduleItemsTotalCount == null)
413
- throw new yn("module", n, "moduleItemsTotalCount");
414
- const { list: o, byItemId: s } = Cn(e.completionRequirements), r = e.moduleItemsConnection, i = r != null && !((u = r.pageInfo) != null && u.hasNextPage), a = Tn(e.progression, o), d = i ? En(r.nodes, n, s, t, a) : void 0;
413
+ throw new En("module", n, "moduleItemsTotalCount");
414
+ const { list: o, byItemId: s } = An(e.completionRequirements), r = e.moduleItemsConnection, l = r != null && !((c = r.pageInfo) != null && c.hasNextPage), a = vn(e.progression, o), u = l ? Pn(r.nodes, n, s, t, a) : void 0;
415
415
  return {
416
416
  id: n,
417
417
  name: e.name ?? "",
418
418
  position: e.position ?? 0,
419
- published: Sn(e.published, "module", n),
419
+ published: Cn(e.published, "module", n),
420
420
  itemCount: e.moduleItemsTotalCount,
421
- items: d,
421
+ items: u,
422
422
  unlockAt: e.unlockAt ?? null,
423
423
  prerequisiteModules: (e.prerequisites ?? []).filter(
424
- (p) => p != null
425
- ).map((p) => ({ id: String(p.id), name: p.name ?? "" })),
424
+ (m) => m != null
425
+ ).map((m) => ({ id: String(m.id), name: m.name ?? "" })),
426
426
  requirementCount: e.requirementCount ?? null,
427
427
  requireSequentialProgress: e.requireSequentialProgress ?? !1,
428
428
  completionRequirements: o,
429
- progress: ls(e, o, a),
430
- collapsed: ((c = e.progression) == null ? void 0 : c.collapsed) ?? null
429
+ progress: gs(e, o, a),
430
+ collapsed: ((d = e.progression) == null ? void 0 : d.collapsed) ?? null
431
431
  };
432
432
  }
433
- function us(e, t = {}) {
433
+ function Is(e, t = {}) {
434
434
  var s;
435
435
  const n = (s = e == null ? void 0 : e.legacyNode) == null ? void 0 : s.modulesConnection, o = [];
436
436
  for (const r of (n == null ? void 0 : n.nodes) ?? [])
437
- r && o.push(cs(r, t));
438
- return { modules: o, pageInfo: _n(n == null ? void 0 : n.pageInfo) };
437
+ r && o.push(hs(r, t));
438
+ return { modules: o, pageInfo: wn(n == null ? void 0 : n.pageInfo) };
439
439
  }
440
- function ds(e, t, n = {}) {
441
- const o = e == null ? void 0 : e.legacyNode, { list: s, byItemId: r } = Cn(o == null ? void 0 : o.completionRequirements), i = o == null ? void 0 : o.moduleItemsConnection, a = Tn(o == null ? void 0 : o.progression, s);
440
+ function bs(e, t, n = {}) {
441
+ const o = e == null ? void 0 : e.legacyNode, { list: s, byItemId: r } = An(o == null ? void 0 : o.completionRequirements), l = o == null ? void 0 : o.moduleItemsConnection, a = vn(o == null ? void 0 : o.progression, s);
442
442
  return {
443
- items: En(i == null ? void 0 : i.nodes, t, r, n, a),
444
- pageInfo: _n(i == null ? void 0 : i.pageInfo)
443
+ items: Pn(l == null ? void 0 : l.nodes, t, r, n, a),
444
+ pageInfo: wn(l == null ? void 0 : l.pageInfo)
445
445
  };
446
446
  }
447
- const ms = xe`
447
+ const Ms = xe`
448
448
  fragment PlatformModulesSubmissionFields on Submission {
449
449
  _id
450
450
  cachedDueDate
451
451
  }
452
- `, wn = xe`
452
+ `, xn = xe`
453
453
  fragment PlatformModulesItemFields on ModuleItem {
454
454
  _id
455
455
  title
@@ -497,8 +497,8 @@ const ms = xe`
497
497
  }
498
498
  }
499
499
  }
500
- ${ms}
501
- `, Pn = xe`
500
+ ${Ms}
501
+ `, Ln = xe`
502
502
  fragment PlatformModulesProgressionFields on ModuleProgression {
503
503
  workflowState
504
504
  completed
@@ -518,7 +518,7 @@ const ms = xe`
518
518
  score
519
519
  }
520
520
  }
521
- `, ps = xe`
521
+ `, Ss = xe`
522
522
  query PlatformModulesGetModules(
523
523
  $courseId: ID!
524
524
  $first: Int!
@@ -578,9 +578,9 @@ const ms = xe`
578
578
  }
579
579
  }
580
580
  }
581
- ${wn}
582
- ${Pn}
583
- `, fs = xe`
581
+ ${xn}
582
+ ${Ln}
583
+ `, ys = xe`
584
584
  query PlatformModulesGetModuleItems(
585
585
  $moduleId: ID!
586
586
  $first: Int!
@@ -611,150 +611,150 @@ const ms = xe`
611
611
  }
612
612
  }
613
613
  }
614
- ${wn}
615
- ${Pn}
614
+ ${xn}
615
+ ${Ln}
616
616
  `;
617
- function vn() {
617
+ function Rn() {
618
618
  return new DOMException("The operation was aborted.", "AbortError");
619
619
  }
620
- function We(e) {
621
- if (e != null && e.aborted) throw vn();
620
+ function je(e) {
621
+ if (e != null && e.aborted) throw Rn();
622
622
  }
623
- function Lt(e, t) {
623
+ function kt(e, t) {
624
624
  return t ? new Promise((n, o) => {
625
- const s = () => o(vn());
625
+ const s = () => o(Rn());
626
626
  t.addEventListener("abort", s, { once: !0 }), e.then(n, o).finally(() => t.removeEventListener("abort", s));
627
627
  }) : e;
628
628
  }
629
- const Rt = [
629
+ const Dt = [
630
630
  "COMPLETED",
631
631
  "INCOMPLETE",
632
632
  "IN_PROGRESS",
633
633
  "NOT_STARTED"
634
- ], gs = {
634
+ ], _s = {
635
635
  module: { completionStatus: ["eq"] }
636
636
  };
637
- function hs(e) {
637
+ function Ts(e) {
638
638
  if (!e) return null;
639
639
  if (e.target !== "module" || e.field !== "completionStatus" || e.op !== "eq")
640
640
  throw new Error(
641
641
  `Canvas GraphQL cannot serve ${e.target}.${e.field} "${e.op}". Only module.completionStatus eq is compiled here.`
642
642
  );
643
643
  const t = e.value;
644
- if (!Rt.includes(t))
644
+ if (!Dt.includes(t))
645
645
  throw new Error(
646
- `"${e.value}" is not a ModuleCompletionStatus (${Rt.join(", ")}).`
646
+ `"${e.value}" is not a ModuleCompletionStatus (${Dt.join(", ")}).`
647
647
  );
648
648
  return { completionStatus: t };
649
649
  }
650
- function Ha({
650
+ function sc({
651
651
  executeQuery: e,
652
- inlineItemLimit: t = ct,
653
- nodeBudget: n = Mt,
652
+ inlineItemLimit: t = ut,
653
+ nodeBudget: n = St,
654
654
  onUnsupportedItem: o,
655
655
  studentId: s,
656
656
  validate: r = !0,
657
- capabilities: i = gs
657
+ capabilities: l = _s
658
658
  }) {
659
- const a = s != null, d = { onUnsupportedItem: o };
659
+ const a = s != null, u = { onUnsupportedItem: o };
660
660
  return {
661
661
  inlineNodeBudget: n,
662
- capabilities: i,
662
+ capabilities: l,
663
663
  async listModules({
664
- courseId: u,
665
- cursor: c,
666
- pageSize: p,
664
+ courseId: c,
665
+ cursor: d,
666
+ pageSize: m,
667
667
  includeItems: f,
668
- filter: y,
669
- inlineItemsFirst: g,
668
+ filter: S,
669
+ inlineItemsFirst: h,
670
670
  inlineFirst: b,
671
671
  signal: w
672
672
  }) {
673
- We(w);
674
- const x = f ? Math.min(b ?? p, p) : p, _ = Math.min(g ?? t, t), A = Math.max(1, Math.min(_, Math.floor(n / x))), q = await Lt(
675
- e(ps, {
676
- courseId: u,
677
- first: x,
678
- after: c ?? null,
673
+ je(w);
674
+ const E = f ? Math.min(b ?? m, m) : m, P = Math.min(h ?? t, t), z = Math.max(1, Math.min(P, Math.floor(n / E))), L = await kt(
675
+ e(Ss, {
676
+ courseId: c,
677
+ first: E,
678
+ after: d ?? null,
679
679
  includeItems: f,
680
- itemsFirst: A,
680
+ itemsFirst: z,
681
681
  includeSubmissions: a,
682
682
  studentId: s ?? null,
683
- filter: hs(y)
683
+ filter: Ts(S)
684
684
  }),
685
685
  w
686
686
  );
687
- We(w);
688
- const B = us(q, d);
689
- return r ? Fo.parse(B) : B;
687
+ je(w);
688
+ const G = Is(L, u);
689
+ return r ? Yo.parse(G) : G;
690
690
  },
691
691
  async listModuleItems({
692
- moduleId: u,
693
- cursor: c,
694
- pageSize: p,
692
+ moduleId: c,
693
+ cursor: d,
694
+ pageSize: m,
695
695
  signal: f
696
696
  }) {
697
- We(f);
698
- const y = await Lt(
699
- e(fs, {
700
- moduleId: u,
701
- first: p,
702
- after: c ?? null,
697
+ je(f);
698
+ const S = await kt(
699
+ e(ys, {
700
+ moduleId: c,
701
+ first: m,
702
+ after: d ?? null,
703
703
  includeSubmissions: a,
704
704
  studentId: s ?? null
705
705
  }),
706
706
  f
707
707
  );
708
- We(f);
709
- const g = ds(y, u, d);
710
- return r ? Uo.parse(g) : g;
708
+ je(f);
709
+ const h = bs(S, c, u);
710
+ return r ? Ho.parse(h) : h;
711
711
  }
712
712
  };
713
713
  }
714
- const ge = ["platform-modules"], Le = {
715
- all: ge,
716
- course: (e) => [...ge, e],
717
- list: (e, t = {}) => [...ge, e, "list", t],
718
- items: (e, t, n = {}) => [...ge, e, "module", t, "items", n]
714
+ const be = ["platform-modules"], Le = {
715
+ all: be,
716
+ course: (e) => [...be, e],
717
+ list: (e, t = {}) => [...be, e, "list", t],
718
+ items: (e, t, n = {}) => [...be, e, "module", t, "items", n]
719
719
  };
720
- function Is(e) {
721
- return [...ge, e, "list"];
720
+ function Es(e) {
721
+ return [...be, e, "list"];
722
722
  }
723
- function ut(e, t) {
724
- return [...ge, e, "module", t, "items"];
723
+ function dt(e, t) {
724
+ return [...be, e, "module", t, "items"];
725
725
  }
726
- function bs(e, t, n, o) {
727
- const s = o ? Le.items(t, n, o) : ut(t, n);
726
+ function Cs(e, t, n, o) {
727
+ const s = o ? Le.items(t, n, o) : dt(t, n);
728
728
  return e.invalidateQueries({ queryKey: s });
729
729
  }
730
- function kt(e, t, n) {
731
- const o = n ? Le.list(t, n) : Is(t);
730
+ function Nt(e, t, n) {
731
+ const o = n ? Le.list(t, n) : Es(t);
732
732
  return e.invalidateQueries({ queryKey: o });
733
733
  }
734
- function Ka(e, t) {
734
+ function rc(e, t) {
735
735
  return e.invalidateQueries({ queryKey: Le.course(t) });
736
736
  }
737
- const Qe = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
738
- function Ve(e, t) {
737
+ const We = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
738
+ function Ke(e, t) {
739
739
  const n = Object.entries(t ?? {}).filter(([, o]) => o !== void 0);
740
740
  return { ...e, ...Object.fromEntries(n) };
741
741
  }
742
- function me(e, t = {}) {
742
+ function fe(e, t = {}) {
743
743
  const n = Object.keys(e).map((s) => [
744
744
  s,
745
- Ve(e[s], Qe(t, s) ? t[s] : void 0)
746
- ]), o = Object.keys(t).filter((s) => !Qe(e, s)).sort().map((s) => [s, Ve({}, t[s])]);
745
+ Ke(e[s], We(t, s) ? t[s] : void 0)
746
+ ]), o = Object.keys(t).filter((s) => !We(e, s)).sort().map((s) => [s, Ke({}, t[s])]);
747
747
  return Object.fromEntries([...n, ...o]);
748
748
  }
749
- function he(e, t) {
750
- if (!(!Qe(e, t) || e[t].hidden))
749
+ function Me(e, t) {
750
+ if (!(!We(e, t) || e[t].hidden))
751
751
  return e[t];
752
752
  }
753
- function Je(e) {
754
- return Object.keys(e).filter((t) => he(e, t) !== void 0).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
753
+ function Ze(e) {
754
+ return Object.keys(e).filter((t) => Me(e, t) !== void 0).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
755
755
  }
756
- const Qa = 1e3;
757
- function Ms({
756
+ const ic = 1e3;
757
+ function ws({
758
758
  queryClient: e,
759
759
  courseId: t,
760
760
  module: n,
@@ -765,159 +765,161 @@ function Ms({
765
765
  item: o,
766
766
  invalidateModuleItems: async (s) => {
767
767
  await Promise.all([
768
- bs(e, t, s),
769
- kt(e, t)
768
+ Cs(e, t, s),
769
+ Nt(e, t)
770
770
  ]);
771
771
  },
772
- invalidateModuleList: () => kt(e, t)
772
+ invalidateModuleList: () => Nt(e, t)
773
773
  };
774
774
  }
775
- function Va(e, t) {
776
- return Je(e).filter(
775
+ function lc(e, t) {
776
+ return Ze(e).filter(
777
777
  (n) => n.visible == null || n.visible(t) === !0
778
778
  );
779
779
  }
780
- const ys = "Course modules", Ss = { one: "%{count} module loaded", other: "%{count} modules loaded" }, _s = "Expand all modules", Ts = "Collapse all modules", Es = { one: "Loading items in %{count} module…", other: "Loading items in %{count} modules…" }, Cs = "All items loaded", ws = { one: "%{count} module expanded", other: "%{count} modules expanded" }, Ps = { one: "%{count} module collapsed", other: "%{count} modules collapsed" }, vs = "This filter runs on the modules loaded so far — load more to filter the rest of the course.", As = "Modules failed to load: %{message}", xs = "Loading modules", Ls = "This course has no modules.", Rs = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, ks = "No modules match this filter.", Ns = "Clear filters", Ds = "Loading more modules…", Os = "Load more modules (%{count} loaded)", qs = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, Fs = "Filter", Us = "All", zs = "In progress", $s = "Complete", Bs = "Due this week", Gs = "Missing", js = "Locked until %{name} is completed.", Ys = "Locked until %{prerequisites} are completed.", Ws = "%{count} prerequisites", Hs = "%{label}. %{name}", Ks = "%{name} progress", Qs = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, Vs = "Items failed to load: %{message}", Zs = "Loading items", Xs = "Loading…", Js = "No items.", er = "Loading more items…", tr = "Load more items (%{loaded} of %{count} loaded)", nr = "(unpublished)", or = "Collapse %{name}", sr = "Expand %{name}", rr = "Not started", ir = "In progress", lr = "All completed", ar = "%{count} Missing", cr = "%{count} Incomplete", ur = "%{missing} & %{incomplete}", dr = "Locked", mr = "Not started", pr = "In progress", fr = "Completed", gr = "Incomplete", hr = "Missing", Ir = "Locked", br = "Assignment", Mr = "Quiz", yr = "Discussion", Sr = "Page", _r = "File", Tr = "External URL", Er = "External tool", Cr = "Text header", wr = "Item type", Pr = "Due date", vr = "Points", Ar = "Requirement", xr = "Estimated duration", Lr = "Publish state", Rr = "View the item", kr = "Submit the assignment", Nr = "Contribute to the page", Dr = "Mark as done", Or = "Score at least the minimum", qr = "Score at least %{count}", Fr = "Score at least the minimum percentage", Ur = "Score at least %{count}%", zr = "Complete the requirement", $r = "today, %{time}", Br = "yesterday, %{time}", Gr = "tomorrow, %{time}", jr = "%{date}, %{time}", Yr = "%{time} (%{zone})", Wr = "Due %{when}", Hr = "Will unlock on %{when}", Kr = "Unlocked on %{when}", Qr = { one: "%{count} pt", other: "%{count} pts" }, Vr = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, Zr = { one: "%{percent}% complete, %{met} of %{count} requirement met", other: "%{percent}% complete, %{met} of %{count} requirements met" }, Xr = "%{percent}%", Jr = { one: "%{completedModules} of %{totalModules} module complete", other: "%{completedModules} of %{totalModules} modules complete" }, ei = "(%{itemsSummary})", ti = { one: "%{completedItems} of %{totalItems} item", other: "%{completedItems} of %{totalItems} items" }, ni = "Module progress", oi = "%{name}: %{status}", si = "%{count} min", ri = "Unpublished", ii = "Untitled item", li = "opens in a new window", ai = {
781
- pageTitle: ys,
782
- modulesLoadedAnnouncement: Ss,
783
- expandAllModules: _s,
784
- collapseAllModules: Ts,
785
- expandAllLoadingItems: Es,
786
- expandAllItemsLoaded: Cs,
787
- modulesExpandedAnnouncement: ws,
788
- modulesCollapsedAnnouncement: Ps,
789
- filterScopeHint: vs,
790
- modulesLoadErrorAlert: As,
791
- modulesLoadingSpinnerLabel: xs,
792
- noModulesEmptyState: Ls,
793
- filteredEmptyState: Rs,
794
- noFilterMatches: ks,
795
- clearFilters: Ns,
796
- loadMoreModulesLoading: Ds,
797
- loadMoreModules: Os,
798
- allModulesLoaded: qs,
799
- filterGroupLabel: Fs,
800
- filterAll: Us,
801
- filterInProgress: zs,
802
- filterComplete: $s,
803
- filterDueThisWeek: Bs,
804
- filterMissing: Gs,
805
- lockedByPrerequisiteByline: js,
806
- lockedByPrerequisitesByline: Ys,
807
- lockedByPrerequisitesCount: Ws,
808
- moduleNameWithLabel: Hs,
809
- moduleProgressScreenReaderLabel: Ks,
810
- itemsLoadedAnnouncement: Qs,
811
- itemsLoadErrorAlert: Vs,
812
- itemsLoadingSpinnerLabel: Zs,
813
- itemsLoadingText: Xs,
814
- noItemsEmptyState: Js,
815
- loadMoreItemsLoading: er,
816
- loadMoreItems: tr,
817
- moduleUnpublishedBadge: nr,
818
- collapseModule: or,
819
- expandModule: sr,
820
- moduleStatusNotStarted: rr,
821
- moduleStatusInProgress: ir,
822
- moduleStatusComplete: lr,
823
- moduleStatusMissing: ar,
824
- moduleStatusIncomplete: cr,
825
- moduleStatusMissingAndIncomplete: ur,
826
- moduleStatusLocked: dr,
827
- itemStatusNotStarted: mr,
828
- itemStatusInProgress: pr,
829
- itemStatusComplete: fr,
830
- itemStatusIncomplete: gr,
831
- itemStatusMissing: hr,
832
- itemStatusLocked: Ir,
833
- itemTypeAssignment: br,
834
- itemTypeQuiz: Mr,
835
- itemTypeDiscussion: yr,
836
- itemTypePage: Sr,
837
- itemTypeFile: _r,
838
- itemTypeExternalUrl: Tr,
839
- itemTypeExternalTool: Er,
840
- itemTypeSubHeader: Cr,
841
- metaFieldTypeLabel: wr,
842
- metaFieldDueAtLabel: Pr,
843
- metaFieldPointsLabel: vr,
844
- metaFieldRequirementLabel: Ar,
845
- metaFieldDurationLabel: xr,
846
- metaFieldPublishStateLabel: Lr,
847
- requirementMustView: Rr,
848
- requirementMustSubmit: kr,
849
- requirementMustContribute: Nr,
850
- requirementMustMarkDone: Dr,
851
- requirementMinScoreUnknown: Or,
852
- requirementMinScore: qr,
853
- requirementMinPercentageUnknown: Fr,
854
- requirementMinPercentage: Ur,
855
- requirementUnknown: zr,
856
- dateTimeToday: $r,
857
- dateTimeYesterday: Br,
858
- dateTimeTomorrow: Gr,
859
- dateTimeWithDate: jr,
860
- timeWithZone: Yr,
861
- dueByline: Wr,
862
- unlockByline: Hr,
863
- unlockedByline: Kr,
864
- pointsAbbreviated: Qr,
865
- progressSummary: Vr,
866
- progressScreenReaderValue: Zr,
867
- moduleProgressOverviewPercentLabel: Xr,
868
- moduleProgressOverviewSummary: Jr,
869
- moduleProgressOverviewDetail: ei,
870
- moduleProgressOverviewItemsSummary: ti,
871
- moduleProgressOverviewGroupLabel: ni,
872
- moduleProgressSegmentLabel: oi,
873
- durationMinutes: si,
874
- itemUnpublishedLabel: ri,
875
- itemUntitled: ii,
876
- opensInNewWindow: li
877
- }, ci = /%\{(\w+)\}/g, ui = ai, Ie = "en-US", di = /* @__PURE__ */ new Map(), mi = /* @__PURE__ */ new Map();
878
- function An(e, t, n) {
780
+ const vs = "Course modules", Ps = { one: "%{count} module loaded", other: "%{count} modules loaded" }, As = "Expand all modules", xs = "Collapse all modules", Ls = { one: "Loading items in %{count} module…", other: "Loading items in %{count} modules…" }, Rs = "All items loaded", ks = { one: "%{count} module expanded", other: "%{count} modules expanded" }, Ds = { one: "%{count} module collapsed", other: "%{count} modules collapsed" }, Ns = "This filter runs on the modules loaded so far — load more to filter the rest of the course.", Os = "Modules failed to load: %{message}", qs = "Loading modules", Fs = "This course has no modules.", Us = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, zs = "No modules match this filter.", $s = "Clear filters", Bs = "Loading more modules…", Gs = "Load more modules (%{count} loaded)", js = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, Ys = "Filter", Hs = "All", Ws = "In progress", Ks = "Complete", Qs = "Due this week", Vs = "Missing", Zs = "Locked until %{name} is completed.", Xs = "Locked until %{prerequisites} are completed.", Js = "%{count} prerequisites", er = "%{label}. %{name}", tr = "%{name} progress", nr = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, or = "Items failed to load: %{message}", sr = "Loading items", rr = "Loading…", ir = "No items.", lr = "Loading more items…", ar = "Load more items (%{loaded} of %{count} loaded)", cr = "(unpublished)", ur = "Collapse %{name}", dr = "Expand %{name}", mr = "Not started", pr = "In progress", gr = "All completed", fr = "%{count} Missing", hr = "%{count} Incomplete", Ir = "%{missing} & %{incomplete}", br = "Locked", Mr = "Due soon", Sr = "Not started", yr = "In progress", _r = "Completed", Tr = "Incomplete", Er = "Missing", Cr = "Locked", wr = "Due soon", vr = "Assignment", Pr = "Quiz", Ar = "Discussion", xr = "Page", Lr = "File", Rr = "External URL", kr = "External tool", Dr = "Text header", Nr = "Item type", Or = "Due date", qr = "Points", Fr = "Requirement", Ur = "Estimated duration", zr = "Publish state", $r = "View the item", Br = "Submit the assignment", Gr = "Contribute to the page", jr = "Mark as done", Yr = "Score at least the minimum", Hr = "Score at least %{count}", Wr = "Score at least the minimum percentage", Kr = "Score at least %{count}%", Qr = "Complete the requirement", Vr = "today, %{time}", Zr = "yesterday, %{time}", Xr = "tomorrow, %{time}", Jr = "%{date}, %{time}", ei = "%{time} (%{zone})", ti = "Due %{when}", ni = "Will unlock on %{when}", oi = "Unlocked on %{when}", si = { one: "%{count} pt", other: "%{count} pts" }, ri = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, ii = { one: "%{percent}% complete, %{met} of %{count} requirement met", other: "%{percent}% complete, %{met} of %{count} requirements met" }, li = "%{percent}%", ai = { one: "%{completedModules} of %{totalModules} module complete", other: "%{completedModules} of %{totalModules} modules complete" }, ci = "(%{itemsSummary})", ui = { one: "%{completedItems} of %{totalItems} item", other: "%{completedItems} of %{totalItems} items" }, di = "Module progress", mi = "%{name}: %{status}", pi = "%{count} min", gi = "Unpublished", fi = "Untitled item", hi = "opens in a new window", Ii = {
781
+ pageTitle: vs,
782
+ modulesLoadedAnnouncement: Ps,
783
+ expandAllModules: As,
784
+ collapseAllModules: xs,
785
+ expandAllLoadingItems: Ls,
786
+ expandAllItemsLoaded: Rs,
787
+ modulesExpandedAnnouncement: ks,
788
+ modulesCollapsedAnnouncement: Ds,
789
+ filterScopeHint: Ns,
790
+ modulesLoadErrorAlert: Os,
791
+ modulesLoadingSpinnerLabel: qs,
792
+ noModulesEmptyState: Fs,
793
+ filteredEmptyState: Us,
794
+ noFilterMatches: zs,
795
+ clearFilters: $s,
796
+ loadMoreModulesLoading: Bs,
797
+ loadMoreModules: Gs,
798
+ allModulesLoaded: js,
799
+ filterGroupLabel: Ys,
800
+ filterAll: Hs,
801
+ filterInProgress: Ws,
802
+ filterComplete: Ks,
803
+ filterDueThisWeek: Qs,
804
+ filterMissing: Vs,
805
+ lockedByPrerequisiteByline: Zs,
806
+ lockedByPrerequisitesByline: Xs,
807
+ lockedByPrerequisitesCount: Js,
808
+ moduleNameWithLabel: er,
809
+ moduleProgressScreenReaderLabel: tr,
810
+ itemsLoadedAnnouncement: nr,
811
+ itemsLoadErrorAlert: or,
812
+ itemsLoadingSpinnerLabel: sr,
813
+ itemsLoadingText: rr,
814
+ noItemsEmptyState: ir,
815
+ loadMoreItemsLoading: lr,
816
+ loadMoreItems: ar,
817
+ moduleUnpublishedBadge: cr,
818
+ collapseModule: ur,
819
+ expandModule: dr,
820
+ moduleStatusNotStarted: mr,
821
+ moduleStatusInProgress: pr,
822
+ moduleStatusComplete: gr,
823
+ moduleStatusMissing: fr,
824
+ moduleStatusIncomplete: hr,
825
+ moduleStatusMissingAndIncomplete: Ir,
826
+ moduleStatusLocked: br,
827
+ moduleStatusDueSoon: Mr,
828
+ itemStatusNotStarted: Sr,
829
+ itemStatusInProgress: yr,
830
+ itemStatusComplete: _r,
831
+ itemStatusIncomplete: Tr,
832
+ itemStatusMissing: Er,
833
+ itemStatusLocked: Cr,
834
+ itemStatusDueSoon: wr,
835
+ itemTypeAssignment: vr,
836
+ itemTypeQuiz: Pr,
837
+ itemTypeDiscussion: Ar,
838
+ itemTypePage: xr,
839
+ itemTypeFile: Lr,
840
+ itemTypeExternalUrl: Rr,
841
+ itemTypeExternalTool: kr,
842
+ itemTypeSubHeader: Dr,
843
+ metaFieldTypeLabel: Nr,
844
+ metaFieldDueAtLabel: Or,
845
+ metaFieldPointsLabel: qr,
846
+ metaFieldRequirementLabel: Fr,
847
+ metaFieldDurationLabel: Ur,
848
+ metaFieldPublishStateLabel: zr,
849
+ requirementMustView: $r,
850
+ requirementMustSubmit: Br,
851
+ requirementMustContribute: Gr,
852
+ requirementMustMarkDone: jr,
853
+ requirementMinScoreUnknown: Yr,
854
+ requirementMinScore: Hr,
855
+ requirementMinPercentageUnknown: Wr,
856
+ requirementMinPercentage: Kr,
857
+ requirementUnknown: Qr,
858
+ dateTimeToday: Vr,
859
+ dateTimeYesterday: Zr,
860
+ dateTimeTomorrow: Xr,
861
+ dateTimeWithDate: Jr,
862
+ timeWithZone: ei,
863
+ dueByline: ti,
864
+ unlockByline: ni,
865
+ unlockedByline: oi,
866
+ pointsAbbreviated: si,
867
+ progressSummary: ri,
868
+ progressScreenReaderValue: ii,
869
+ moduleProgressOverviewPercentLabel: li,
870
+ moduleProgressOverviewSummary: ai,
871
+ moduleProgressOverviewDetail: ci,
872
+ moduleProgressOverviewItemsSummary: ui,
873
+ moduleProgressOverviewGroupLabel: di,
874
+ moduleProgressSegmentLabel: mi,
875
+ durationMinutes: pi,
876
+ itemUnpublishedLabel: gi,
877
+ itemUntitled: fi,
878
+ opensInNewWindow: hi
879
+ }, bi = /%\{(\w+)\}/g, Mi = Ii, Se = "en-US", Si = /* @__PURE__ */ new Map(), yi = /* @__PURE__ */ new Map();
880
+ function kn(e, t, n) {
879
881
  const o = e.get(t);
880
882
  if (o) return o;
881
883
  const s = n();
882
884
  return e.set(t, s), s;
883
885
  }
884
- function pi(e, t, n) {
885
- return n ? e.replace(ci, (o, s) => {
886
+ function _i(e, t, n) {
887
+ return n ? e.replace(bi, (o, s) => {
886
888
  if (!Object.prototype.hasOwnProperty.call(n, s)) return o;
887
889
  const r = n[s];
888
- return typeof r == "number" && Number.isFinite(r) ? An(mi, t, () => new Intl.NumberFormat(t)).format(r) : String(r);
890
+ return typeof r == "number" && Number.isFinite(r) ? kn(yi, t, () => new Intl.NumberFormat(t)).format(r) : String(r);
889
891
  }) : e;
890
892
  }
891
- function fi(e, t, n) {
893
+ function Ti(e, t, n) {
892
894
  const o = n == null ? void 0 : n.count;
893
895
  if (typeof o == "number" && Number.isFinite(o)) {
894
- const s = An(di, t, () => new Intl.PluralRules(t)).select(o), r = e[s];
896
+ const s = kn(Si, t, () => new Intl.PluralRules(t)).select(o), r = e[s];
895
897
  if (typeof r == "string") return r;
896
898
  }
897
899
  return typeof e.other == "string" ? e.other : void 0;
898
900
  }
899
- function Nt(e, t, n) {
901
+ function Ot(e, t, n) {
900
902
  if (typeof e == "string") return e;
901
903
  if (e !== null && typeof e == "object")
902
- return fi(e, t, n);
904
+ return Ti(e, t, n);
903
905
  }
904
- const Dt = /* @__PURE__ */ new Set();
905
- function gi(e) {
906
- Dt.has(e) || (Dt.add(e), console.warn(
906
+ const qt = /* @__PURE__ */ new Set();
907
+ function Ei(e) {
908
+ qt.has(e) || (qt.add(e), console.warn(
907
909
  `[platform-modules] no translation for "${e}"; it will render as itself. Add it to the catalog passed to ModulesI18nProvider.`
908
910
  ));
909
911
  }
910
- function hi(e, t, n, o, s) {
911
- const r = Nt(e == null ? void 0 : e[t], n, s);
912
+ function Ci(e, t, n, o, s) {
913
+ const r = Ot(e == null ? void 0 : e[t], n, s);
912
914
  if (typeof r == "string") return r;
913
- const i = Nt(ui[t], n, s);
914
- return typeof i == "string" ? i : (o && gi(t), t);
915
+ const l = Ot(Mi[t], n, s);
916
+ return typeof l == "string" ? l : (o && Ei(t), t);
915
917
  }
916
- function xn(e, t = Ie, n = !1) {
917
- return (o, s) => pi(hi(e, o, t, n, s), t, s);
918
+ function Dn(e, t = Se, n = !1) {
919
+ return (o, s) => _i(Ci(e, o, t, n, s), t, s);
918
920
  }
919
- const Ii = xn(), bi = { t: Ii, locale: Ie }, Ln = en(null);
920
- function Za({
921
+ const wi = Dn(), vi = { t: wi, locale: Se }, Nn = on(null);
922
+ function ac({
921
923
  translations: e,
922
924
  locale: t,
923
925
  timezone: n,
@@ -925,26 +927,26 @@ function Za({
925
927
  children: s
926
928
  }) {
927
929
  const r = N(() => {
928
- const i = t ?? Ie;
930
+ const l = t ?? Se;
929
931
  return {
930
- t: xn(e, i, o),
931
- locale: i,
932
+ t: Dn(e, l, o),
933
+ locale: l,
932
934
  timezone: n
933
935
  };
934
936
  }, [e, t, n, o]);
935
- return /* @__PURE__ */ l(Ln.Provider, { value: r, children: s });
937
+ return /* @__PURE__ */ i(Nn.Provider, { value: r, children: s });
936
938
  }
937
- function j() {
938
- return tn(Ln) ?? bi;
939
+ function B() {
940
+ return sn(Nn) ?? vi;
939
941
  }
940
- const Mi = 864e5, yi = "en-US", Ot = /* @__PURE__ */ new Map(), qt = /* @__PURE__ */ new Map();
941
- function Si(e) {
942
- const t = qt.get(e);
942
+ const Pi = 864e5, Ai = "en-US", Ft = /* @__PURE__ */ new Map(), Ut = /* @__PURE__ */ new Map();
943
+ function xi(e) {
944
+ const t = Ut.get(e);
943
945
  if (t) return t;
944
946
  const n = new Intl.NumberFormat(e, { minimumIntegerDigits: 2, useGrouping: !1 });
945
- return qt.set(e, n), n;
947
+ return Ut.set(e, n), n;
946
948
  }
947
- function Ft(e, t) {
949
+ function zt(e, t) {
948
950
  return {
949
951
  time: new Intl.DateTimeFormat(e, {
950
952
  hour: "numeric",
@@ -959,7 +961,7 @@ function Ft(e, t) {
959
961
  timeZone: t
960
962
  }),
961
963
  zone: t ? new Intl.DateTimeFormat(e, { timeZone: t, timeZoneName: "short" }) : void 0,
962
- civilDay: new Intl.DateTimeFormat(yi, {
964
+ civilDay: new Intl.DateTimeFormat(Ai, {
963
965
  year: "numeric",
964
966
  month: "numeric",
965
967
  day: "numeric",
@@ -967,57 +969,65 @@ function Ft(e, t) {
967
969
  })
968
970
  };
969
971
  }
970
- function Rn(e, t) {
971
- const n = t || void 0, o = `${e}|${n ?? ""}`, s = Ot.get(o);
972
+ function On(e, t) {
973
+ const n = t || void 0, o = `${e}|${n ?? ""}`, s = Ft.get(o);
972
974
  if (s) return s;
973
975
  let r;
974
976
  try {
975
- r = Ft(e, n);
977
+ r = zt(e, n);
976
978
  } catch {
977
979
  console.warn(
978
980
  `[platform-modules] Unusable timezone ${JSON.stringify(n)}; rendering dates in the viewer's own clock instead.`
979
- ), r = Ft(e, void 0);
981
+ ), r = zt(e, void 0);
980
982
  }
981
- return Ot.set(o, r), r;
983
+ return Ft.set(o, r), r;
982
984
  }
983
- function Ut(e, t) {
984
- return new Date(dt(e, t)).getUTCFullYear();
985
+ function $t(e, t) {
986
+ return new Date(mt(e, t)).getUTCFullYear();
985
987
  }
986
- function _i(e, t) {
988
+ function Li(e, t) {
987
989
  var o;
988
990
  const n = (o = e.zone) == null ? void 0 : o.formatToParts(t).find((s) => s.type === "timeZoneName");
989
991
  return (n == null ? void 0 : n.value) ?? null;
990
992
  }
991
- function dt(e, t) {
993
+ function mt(e, t) {
992
994
  const n = e.civilDay.formatToParts(t), o = (s) => {
993
995
  var r;
994
- return Number((r = n.find((i) => i.type === s)) == null ? void 0 : r.value);
996
+ return Number((r = n.find((l) => l.type === s)) == null ? void 0 : r.value);
995
997
  };
996
998
  return Date.UTC(o("year"), o("month") - 1, o("day"));
997
999
  }
998
- function Ti(e, t, n) {
999
- return kn(Rn(Ie, n), e, t);
1000
+ function Ri(e, t, n) {
1001
+ return Fn(On(Se, n), e, t);
1000
1002
  }
1001
- function kn(e, t, n) {
1002
- return Math.round((dt(e, t) - dt(e, n)) / Mi);
1003
+ const qn = 7;
1004
+ function yt(e, t, n) {
1005
+ if (!e) return !1;
1006
+ const o = new Date(e);
1007
+ if (Number.isNaN(o.getTime())) return !1;
1008
+ const s = Ri(o, t, n);
1009
+ return s >= 0 && s < qn;
1010
+ }
1011
+ function Fn(e, t, n) {
1012
+ return Math.round((mt(e, t) - mt(e, n)) / Pi);
1003
1013
  }
1004
- function Ei(e, t, n, { locale: o = Ie, timezone: s } = {}) {
1014
+ function ki(e, t, n, { locale: o = Se, timezone: s } = {}) {
1005
1015
  const r = new Date(t);
1006
1016
  if (Number.isNaN(r.getTime())) return t;
1007
- const i = Rn(o, s), a = _i(i, r), d = i.time.format(r), u = a ? e("timeWithZone", { time: d, zone: a }) : d, c = kn(i, r, n);
1008
- if (c === 0) return e("dateTimeToday", { time: u });
1009
- if (c === -1) return e("dateTimeYesterday", { time: u });
1010
- if (c === 1) return e("dateTimeTomorrow", { time: u });
1011
- const f = Ut(i, r) === Ut(i, n) ? i.day.format(r) : i.dayYear.format(r);
1012
- return e("dateTimeWithDate", { date: f, time: u });
1017
+ const l = On(o, s), a = Li(l, r), u = l.time.format(r), c = a ? e("timeWithZone", { time: u, zone: a }) : u, d = Fn(l, r, n);
1018
+ if (d === 0) return e("dateTimeToday", { time: c });
1019
+ if (d === -1) return e("dateTimeYesterday", { time: c });
1020
+ if (d === 1) return e("dateTimeTomorrow", { time: c });
1021
+ const f = $t(l, r) === $t(l, n) ? l.day.format(r) : l.dayYear.format(r);
1022
+ return e("dateTimeWithDate", { date: f, time: c });
1013
1023
  }
1014
- function Ci(e, t = Ie) {
1015
- return !Number.isInteger(e) || e < 1 ? null : Si(t).format(e);
1024
+ function Di(e, t = Se) {
1025
+ return !Number.isInteger(e) || e < 1 ? null : xi(t).format(e);
1016
1026
  }
1017
- function wi(e, t) {
1027
+ function Ni(e, t) {
1018
1028
  return t == null ? null : e("pointsAbbreviated", { count: t });
1019
1029
  }
1020
- function Pi(e, t) {
1030
+ function Oi(e, t) {
1021
1031
  switch (t.type) {
1022
1032
  case "must_view":
1023
1033
  return e("requirementMustView");
@@ -1035,13 +1045,13 @@ function Pi(e, t) {
1035
1045
  return e("requirementUnknown");
1036
1046
  }
1037
1047
  }
1038
- function vi(e, t, n, o) {
1048
+ function qi(e, t, n, o) {
1039
1049
  return e("progressSummary", { percent: t, met: n, count: o });
1040
1050
  }
1041
- function Ai(e, t, n, o) {
1051
+ function Fi(e, t, n, o) {
1042
1052
  return e("progressScreenReaderValue", { percent: t, met: n, count: o });
1043
1053
  }
1044
- const X = "all", xi = 7, Li = {
1054
+ const ne = "all", cc = qn, Ui = {
1045
1055
  all: {
1046
1056
  label: "filterAll",
1047
1057
  order: 10,
@@ -1070,13 +1080,8 @@ const X = "all", xi = 7, Li = {
1070
1080
  label: "filterDueThisWeek",
1071
1081
  order: 40,
1072
1082
  predicate: (e, { today: t, timezone: n }) => {
1073
- var i;
1074
- const o = (i = e.progress) == null ? void 0 : i.nextDueAt;
1075
- if (!o) return !1;
1076
- const s = new Date(o);
1077
- if (Number.isNaN(s.getTime())) return !1;
1078
- const r = Ti(s, t, n);
1079
- return r >= 0 && r < xi;
1083
+ var o;
1084
+ return yt((o = e.progress) == null ? void 0 : o.nextDueAt, t, n);
1080
1085
  }
1081
1086
  },
1082
1087
  missing: {
@@ -1088,24 +1093,24 @@ const X = "all", xi = 7, Li = {
1088
1093
  }
1089
1094
  }
1090
1095
  };
1091
- function yt(e) {
1096
+ function _t(e) {
1092
1097
  if (!(!e || e.clientOnly))
1093
1098
  return e.query;
1094
1099
  }
1095
- function mt(e) {
1096
- return e !== void 0 && yt(e) === void 0;
1097
- }
1098
- const Ri = {
1099
- moduleLabel: (e, t, { locale: n }) => Ci(e, n),
1100
- dateTime: (e, t, { t: n, locale: o, timezone: s }) => Ei(n, e, t, { locale: o, timezone: s }),
1101
- points: (e, { t }) => wi(t, e),
1102
- progress: (e, t, n, { t: o }) => vi(o, e, t, n)
1103
- }, ki = "type", Ni = {
1100
+ function pt(e) {
1101
+ return e !== void 0 && _t(e) === void 0;
1102
+ }
1103
+ const zi = {
1104
+ moduleLabel: (e, t, { locale: n }) => Di(e, n),
1105
+ dateTime: (e, t, { t: n, locale: o, timezone: s }) => ki(n, e, t, { locale: o, timezone: s }),
1106
+ points: (e, { t }) => Ni(t, e),
1107
+ progress: (e, t, n, { t: o }) => qi(o, e, t, n)
1108
+ }, $i = "type", Bi = {
1104
1109
  type: {
1105
1110
  label: "metaFieldTypeLabel",
1106
1111
  order: 10,
1107
1112
  render: ({ item: e, t, config: n }) => {
1108
- const o = he(n.itemTypes, e.type);
1113
+ const o = Me(n.itemTypes, e.type);
1109
1114
  return o ? t(o.label) : null;
1110
1115
  }
1111
1116
  },
@@ -1122,13 +1127,13 @@ const Ri = {
1122
1127
  requirement: {
1123
1128
  label: "metaFieldRequirementLabel",
1124
1129
  order: 40,
1125
- render: ({ item: e, t }) => e.completionRequirement ? Pi(t, e.completionRequirement) : null
1130
+ render: ({ item: e, t }) => e.completionRequirement ? Oi(t, e.completionRequirement) : null
1126
1131
  },
1127
1132
  estimatedDuration: {
1128
1133
  label: "metaFieldDurationLabel",
1129
1134
  order: 50,
1130
1135
  render: ({ item: e, t }) => {
1131
- const n = zo(e);
1136
+ const n = Wo(e);
1132
1137
  return n === null ? null : t("durationMinutes", { count: n });
1133
1138
  }
1134
1139
  },
@@ -1137,311 +1142,315 @@ const Ri = {
1137
1142
  order: 60,
1138
1143
  render: ({ item: e, t }) => e.published ? null : t("itemUnpublishedLabel")
1139
1144
  }
1140
- }, ne = { size: "md", color: "mutedColor" }, Di = {
1145
+ }, oe = { size: "md", color: "mutedColor" }, Gi = {
1141
1146
  assignment: {
1142
1147
  label: "itemTypeAssignment",
1143
1148
  order: 10,
1144
- icon: /* @__PURE__ */ l(mo, { ...ne })
1149
+ icon: /* @__PURE__ */ i(Mo, { ...oe })
1145
1150
  },
1146
- quiz: { label: "itemTypeQuiz", order: 20, icon: /* @__PURE__ */ l(uo, { ...ne }) },
1151
+ quiz: { label: "itemTypeQuiz", order: 20, icon: /* @__PURE__ */ i(bo, { ...oe }) },
1147
1152
  discussion: {
1148
1153
  label: "itemTypeDiscussion",
1149
1154
  order: 30,
1150
- icon: /* @__PURE__ */ l(co, { ...ne })
1155
+ icon: /* @__PURE__ */ i(Io, { ...oe })
1151
1156
  },
1152
- page: { label: "itemTypePage", order: 40, icon: /* @__PURE__ */ l(ao, { ...ne }) },
1153
- file: { label: "itemTypeFile", order: 50, icon: /* @__PURE__ */ l(lo, { ...ne }) },
1157
+ page: { label: "itemTypePage", order: 40, icon: /* @__PURE__ */ i(ho, { ...oe }) },
1158
+ file: { label: "itemTypeFile", order: 50, icon: /* @__PURE__ */ i(fo, { ...oe }) },
1154
1159
  external_url: {
1155
1160
  label: "itemTypeExternalUrl",
1156
1161
  order: 60,
1157
- icon: /* @__PURE__ */ l(io, { ...ne })
1162
+ icon: /* @__PURE__ */ i(go, { ...oe })
1158
1163
  },
1159
1164
  external_tool: {
1160
1165
  label: "itemTypeExternalTool",
1161
1166
  order: 70,
1162
- icon: /* @__PURE__ */ l(ro, { ...ne })
1167
+ icon: /* @__PURE__ */ i(po, { ...oe })
1163
1168
  },
1164
1169
  sub_header: { label: "itemTypeSubHeader", order: 80, icon: null }
1165
- }, et = {
1166
- formatters: Ri,
1167
- itemTypes: Di,
1170
+ }, Xe = {
1171
+ formatters: zi,
1172
+ itemTypes: Gi,
1168
1173
  itemStatuses: {},
1169
- itemMeta: Ni,
1170
- filters: Li,
1174
+ itemMeta: Bi,
1175
+ filters: Ui,
1171
1176
  moduleActions: {},
1172
1177
  itemActions: {},
1173
1178
  navigation: {}
1174
1179
  };
1175
- Object.freeze(et);
1176
- for (const e of Object.values(et)) {
1180
+ Object.freeze(Xe);
1181
+ for (const e of Object.values(Xe)) {
1177
1182
  Object.freeze(e);
1178
1183
  for (const t of Object.values(e)) Object.freeze(t);
1179
1184
  }
1180
- function Oi(e, t) {
1181
- return Je(e).filter((n) => {
1182
- const o = yt(n);
1183
- return o !== void 0 && !xo(t, o);
1185
+ function ji(e, t) {
1186
+ return Ze(e).filter((n) => {
1187
+ const o = _t(n);
1188
+ return o !== void 0 && !qo(t, o);
1184
1189
  }).map((n) => n.key);
1185
1190
  }
1186
- function zt(e) {
1191
+ function Bt(e) {
1187
1192
  return `[platform-modules] the adapter cannot serve filter(s): ${e.join(", ")}. Add the field to the adapter's capabilities, or set clientOnly on the entry.`;
1188
1193
  }
1189
- function qi(e, t) {
1190
- const n = Oi(e, t);
1194
+ function Yi(e, t) {
1195
+ const n = ji(e, t);
1191
1196
  if (n.length === 0) return e;
1192
1197
  if (process.env.NODE_ENV !== "production")
1193
- throw new Error(zt(n));
1194
- console.warn(zt(n));
1198
+ throw new Error(Bt(n));
1199
+ console.warn(Bt(n));
1195
1200
  const o = Object.fromEntries(n.map((s) => [s, { ...e[s], hidden: !0 }]));
1196
1201
  return { ...e, ...o };
1197
1202
  }
1198
- const Nn = en(null);
1199
- function Xa({ value: e, children: t }) {
1200
- return /* @__PURE__ */ l(Nn.Provider, { value: e, children: t });
1203
+ const Un = on(null);
1204
+ function uc({ value: e, children: t }) {
1205
+ return /* @__PURE__ */ i(Un.Provider, { value: e, children: t });
1201
1206
  }
1202
- function Re() {
1203
- return tn(Nn) ?? et;
1207
+ function ye() {
1208
+ return sn(Un) ?? Xe;
1204
1209
  }
1205
- function Ja(e) {
1206
- return he(Re().itemMeta, e) !== void 0;
1210
+ function dc(e) {
1211
+ return Me(ye().itemMeta, e) !== void 0;
1207
1212
  }
1208
- const ke = m.object({
1209
- label: m.string(),
1210
- order: m.number(),
1211
- hidden: m.boolean().optional()
1213
+ const Re = p.object({
1214
+ label: p.string(),
1215
+ order: p.number(),
1216
+ hidden: p.boolean().optional()
1212
1217
  });
1213
- function fe(e) {
1214
- return m.record(m.string(), e);
1218
+ function Ie(e) {
1219
+ return p.record(p.string(), e);
1215
1220
  }
1216
- const Fi = fe(ke.strict()), Dn = (e) => e == null || typeof e == "string" || typeof e == "number" || typeof e == "bigint" || typeof e == "boolean" || nn(e) || Array.isArray(e) && e.every(Dn), Ui = (e) => {
1221
+ const Hi = Ie(Re.strict()), zn = (e) => e == null || typeof e == "string" || typeof e == "number" || typeof e == "bigint" || typeof e == "boolean" || rn(e) || Array.isArray(e) && e.every(zn), Wi = (e) => {
1217
1222
  var t;
1218
1223
  return e == null || typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
1219
- }, zi = ke.extend({
1220
- icon: m.custom(Dn, { message: "icon must be a ReactNode" }),
1221
- renderIcon: m.custom(Ui, {
1224
+ }, Ki = Re.extend({
1225
+ icon: p.custom(zn, { message: "icon must be a ReactNode" }),
1226
+ renderIcon: p.custom(Wi, {
1222
1227
  message: "renderIcon must be a function of the item, not a React component"
1223
1228
  })
1224
- }).strict(), On = (e) => {
1229
+ }).strict(), $n = (e) => {
1225
1230
  var t;
1226
1231
  return typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
1227
- }, $t = (e) => e == null || On(e), Bt = ke.extend({
1228
- onSelect: m.custom(On, {
1232
+ }, Gt = (e) => e == null || $n(e), jt = Re.extend({
1233
+ onSelect: p.custom($n, {
1229
1234
  message: "onSelect must be a function taking an ActionContext"
1230
1235
  }),
1231
- visible: m.custom($t, {
1236
+ visible: p.custom(Gt, {
1232
1237
  message: "visible must be a function taking an ActionContext, not a React component"
1233
1238
  }),
1234
- renderModal: m.custom($t, {
1239
+ renderModal: p.custom(Gt, {
1235
1240
  message: "renderModal must be a function taking an ActionContext, not a React component"
1236
1241
  })
1237
1242
  }).strict();
1238
- function He() {
1239
- return m.custom((e) => typeof e == "function", {
1243
+ function Ye() {
1244
+ return p.custom((e) => typeof e == "function", {
1240
1245
  message: "Expected a function"
1241
1246
  });
1242
1247
  }
1243
- const $i = ke.extend({
1244
- render: m.custom((e) => typeof e == "function", {
1248
+ const Qi = Re.extend({
1249
+ render: p.custom((e) => typeof e == "function", {
1245
1250
  message: "render must be a function taking a MetaFieldContext"
1246
1251
  })
1247
- }).strict(), Bi = ke.extend({
1248
- predicate: m.custom((e) => typeof e == "function", {
1252
+ }).strict(), Vi = Re.extend({
1253
+ predicate: p.custom((e) => typeof e == "function", {
1249
1254
  message: "predicate must be a function of the module and a FilterContext"
1250
1255
  }),
1251
- query: Ao.optional(),
1252
- clientOnly: m.boolean().optional()
1253
- }).strict(), Gi = m.object({
1254
- formatters: m.object({
1255
- moduleLabel: He(),
1256
- dateTime: He(),
1257
- points: He(),
1258
- progress: He()
1256
+ query: Oo.optional(),
1257
+ clientOnly: p.boolean().optional()
1258
+ }).strict(), ot = () => p.custom((e) => typeof e == "function", { message: "Expected a function" }).optional(), Zi = p.object({
1259
+ getItemHref: ot(),
1260
+ getModuleHref: ot(),
1261
+ onItemClick: ot()
1262
+ }).strict(), Xi = p.object({
1263
+ formatters: p.object({
1264
+ moduleLabel: Ye(),
1265
+ dateTime: Ye(),
1266
+ points: Ye(),
1267
+ progress: Ye()
1259
1268
  }).strict(),
1260
- itemTypes: fe(zi),
1261
- itemStatuses: Fi,
1262
- itemMeta: fe($i),
1263
- filters: fe(Bi),
1264
- moduleActions: fe(Bt),
1265
- itemActions: fe(Bt),
1266
- navigation: m.object({}).strict()
1269
+ itemTypes: Ie(Ki),
1270
+ itemStatuses: Hi,
1271
+ itemMeta: Ie(Qi),
1272
+ filters: Ie(Vi),
1273
+ moduleActions: Ie(jt),
1274
+ itemActions: Ie(jt),
1275
+ navigation: Zi
1267
1276
  });
1268
- function ji(e, t = {}) {
1269
- const n = Object.keys(t).filter((s) => !Qe(e, s));
1277
+ function Ji(e, t = {}) {
1278
+ const n = Object.keys(t).filter((s) => !We(e, s));
1270
1279
  if (n.length > 0)
1271
1280
  throw new Error(
1272
1281
  `Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
1273
1282
  );
1274
1283
  const o = {
1275
- formatters: Ve(e.formatters, t.formatters),
1276
- itemTypes: me(e.itemTypes, t.itemTypes),
1277
- itemStatuses: me(e.itemStatuses, t.itemStatuses),
1278
- itemMeta: me(e.itemMeta, t.itemMeta),
1279
- filters: me(e.filters, t.filters),
1280
- moduleActions: me(e.moduleActions, t.moduleActions),
1281
- itemActions: me(e.itemActions, t.itemActions),
1282
- navigation: Ve(e.navigation, t.navigation)
1284
+ formatters: Ke(e.formatters, t.formatters),
1285
+ itemTypes: fe(e.itemTypes, t.itemTypes),
1286
+ itemStatuses: fe(e.itemStatuses, t.itemStatuses),
1287
+ itemMeta: fe(e.itemMeta, t.itemMeta),
1288
+ filters: fe(e.filters, t.filters),
1289
+ moduleActions: fe(e.moduleActions, t.moduleActions),
1290
+ itemActions: fe(e.itemActions, t.itemActions),
1291
+ navigation: Ke(e.navigation, t.navigation)
1283
1292
  };
1284
- return Gi.parse(o), o;
1293
+ return Xi.parse(o), o;
1285
1294
  }
1286
- function ec(e = {}) {
1287
- return ji(et, e);
1295
+ function mc(e = {}) {
1296
+ return Ji(Xe, e);
1288
1297
  }
1289
- function tc(e) {
1290
- const t = ht();
1291
- return U(
1292
- (n, o) => Ms({ queryClient: t, courseId: e, module: n, item: o }),
1298
+ function pc(e) {
1299
+ const t = It();
1300
+ return F(
1301
+ (n, o) => ws({ queryClient: t, courseId: e, module: n, item: o }),
1293
1302
  [t, e]
1294
1303
  );
1295
1304
  }
1296
- function Ne() {
1297
- const { formatters: e } = Re(), { t, locale: n, timezone: o } = j();
1305
+ function ke() {
1306
+ const { formatters: e } = ye(), { t, locale: n, timezone: o } = B();
1298
1307
  return N(() => {
1299
- const s = { t, locale: n, timezone: o }, r = (i, a) => e.dateTime(i, a, s);
1308
+ const s = { t, locale: n, timezone: o }, r = (l, a) => e.dateTime(l, a, s);
1300
1309
  return {
1301
- moduleLabel: (i, a) => e.moduleLabel(i, a, s) || null,
1302
- dueByline: (i, a) => t("dueByline", { when: r(i, a) }),
1303
- unlockByline: (i, a) => t("unlockByline", { when: r(i, a) }),
1304
- unlockedByline: (i, a) => t("unlockedByline", { when: r(i, a) }),
1305
- points: (i) => e.points(i, s),
1306
- progress: (i, a, d) => e.progress(i, a, d, s)
1310
+ moduleLabel: (l, a) => e.moduleLabel(l, a, s) || null,
1311
+ dueByline: (l, a) => t("dueByline", { when: r(l, a) }),
1312
+ unlockByline: (l, a) => t("unlockByline", { when: r(l, a) }),
1313
+ unlockedByline: (l, a) => t("unlockedByline", { when: r(l, a) }),
1314
+ points: (l) => e.points(l, s),
1315
+ progress: (l, a, u) => e.progress(l, a, u, s)
1307
1316
  };
1308
1317
  }, [e, t, n, o]);
1309
1318
  }
1310
- const St = 100, qn = 100, Fn = 100, Yi = 4, tt = 5 * 60 * 1e3, Un = 20, Ze = { hasNextPage: !1, endCursor: null };
1311
- function zn(e) {
1319
+ const Tt = 100, Bn = 100, Gn = 100, el = 4, Je = 5 * 60 * 1e3, jn = 20, Qe = { hasNextPage: !1, endCursor: null };
1320
+ function Yn(e) {
1312
1321
  return e.pageInfo.hasNextPage ? e.pageInfo.endCursor : null;
1313
1322
  }
1314
- function $n(e) {
1323
+ function Hn(e) {
1315
1324
  const {
1316
1325
  courseId: t,
1317
1326
  adapter: n,
1318
1327
  pageSize: o,
1319
1328
  includeItems: s,
1320
1329
  filter: r,
1321
- inlineItemsFirst: i,
1330
+ inlineItemsFirst: l,
1322
1331
  inlineFirst: a,
1323
- view: d,
1324
- staleTime: u,
1325
- enabled: c
1332
+ view: u,
1333
+ staleTime: c,
1334
+ enabled: d
1326
1335
  } = e;
1327
1336
  return {
1328
1337
  // `inlineItemsFirst` is deliberately out of the key: it is derived from this very list.
1329
- queryKey: Le.list(t, { view: d, pageSize: o, includeItems: s, filter: r }),
1338
+ queryKey: Le.list(t, { view: u, pageSize: o, includeItems: s, filter: r }),
1330
1339
  initialPageParam: null,
1331
- queryFn: ({ pageParam: p, signal: f }) => n.listModules({
1340
+ queryFn: ({ pageParam: m, signal: f }) => n.listModules({
1332
1341
  courseId: t,
1333
- cursor: p,
1342
+ cursor: m,
1334
1343
  pageSize: o,
1335
1344
  includeItems: s,
1336
1345
  filter: r,
1337
- inlineItemsFirst: i,
1346
+ inlineItemsFirst: l,
1338
1347
  inlineFirst: a,
1339
1348
  signal: f
1340
1349
  }),
1341
- getNextPageParam: zn,
1342
- enabled: c,
1343
- staleTime: u,
1350
+ getNextPageParam: Yn,
1351
+ enabled: d,
1352
+ staleTime: c,
1344
1353
  refetchOnWindowFocus: !1
1345
1354
  };
1346
1355
  }
1347
- function Bn(e) {
1348
- const { courseId: t, moduleId: n, adapter: o, pageSize: s, view: r, staleTime: i, enabled: a, limit: d } = e;
1356
+ function Wn(e) {
1357
+ const { courseId: t, moduleId: n, adapter: o, pageSize: s, view: r, staleTime: l, enabled: a, limit: u } = e;
1349
1358
  return {
1350
1359
  queryKey: Le.items(t, n, { view: r, pageSize: s }),
1351
1360
  initialPageParam: null,
1352
- queryFn: ({ pageParam: u, signal: c }) => {
1353
- const p = () => o.listModuleItems({ courseId: t, moduleId: n, cursor: u, pageSize: s, signal: c });
1354
- return d ? d(() => {
1355
- if (c.aborted)
1361
+ queryFn: ({ pageParam: c, signal: d }) => {
1362
+ const m = () => o.listModuleItems({ courseId: t, moduleId: n, cursor: c, pageSize: s, signal: d });
1363
+ return u ? u(() => {
1364
+ if (d.aborted)
1356
1365
  throw new DOMException("The operation was aborted.", "AbortError");
1357
- return p();
1358
- }) : p();
1366
+ return m();
1367
+ }) : m();
1359
1368
  },
1360
- getNextPageParam: zn,
1369
+ getNextPageParam: Yn,
1361
1370
  enabled: a,
1362
- staleTime: i,
1371
+ staleTime: l,
1363
1372
  refetchOnWindowFocus: !1
1364
1373
  };
1365
1374
  }
1366
- function Wi(e) {
1367
- var x;
1375
+ function tl(e) {
1376
+ var E;
1368
1377
  const {
1369
1378
  courseId: t,
1370
1379
  adapter: n,
1371
- pageSize: o = St,
1380
+ pageSize: o = Tt,
1372
1381
  includeItems: s = !1,
1373
1382
  filter: r,
1374
- inlineItemsFirst: i,
1383
+ inlineItemsFirst: l,
1375
1384
  inlineFirst: a,
1376
- view: d,
1377
- staleTime: u = tt,
1378
- enabled: c = !0
1379
- } = e, p = It({
1380
- ...$n({
1385
+ view: u,
1386
+ staleTime: c = Je,
1387
+ enabled: d = !0
1388
+ } = e, m = bt({
1389
+ ...Hn({
1381
1390
  courseId: t,
1382
1391
  adapter: n,
1383
1392
  pageSize: o,
1384
1393
  includeItems: s,
1385
1394
  filter: r,
1386
- inlineItemsFirst: i,
1395
+ inlineItemsFirst: l,
1387
1396
  inlineFirst: a,
1388
- view: d,
1389
- staleTime: u,
1390
- enabled: c
1397
+ view: u,
1398
+ staleTime: c,
1399
+ enabled: d
1391
1400
  }),
1392
1401
  // `useItemsMode` shares `modulesQueryOptions`, and `inlineFirst` is out of that key.
1393
- placeholderData: ho
1394
- }), f = (x = p.data) == null ? void 0 : x.pages, y = N(() => (f ?? []).flatMap((_) => _.modules), [f]), g = f && f.length > 0 ? f[f.length - 1].pageInfo : Ze, b = p.fetchNextPage, w = U(() => {
1402
+ placeholderData: Eo
1403
+ }), f = (E = m.data) == null ? void 0 : E.pages, S = N(() => (f ?? []).flatMap((P) => P.modules), [f]), h = f && f.length > 0 ? f[f.length - 1].pageInfo : Qe, b = m.fetchNextPage, w = F(() => {
1395
1404
  b();
1396
1405
  }, [b]);
1397
1406
  return {
1398
- modules: y,
1399
- pageInfo: g,
1400
- hasNextPage: g.hasNextPage,
1407
+ modules: S,
1408
+ pageInfo: h,
1409
+ hasNextPage: h.hasNextPage,
1401
1410
  fetchNextPage: w,
1402
- isLoading: p.isLoading,
1403
- isFetchingNextPage: p.isFetchingNextPage,
1404
- isPending: p.isPending,
1405
- isPlaceholderData: p.isPlaceholderData,
1406
- error: p.error
1411
+ isLoading: m.isLoading,
1412
+ isFetchingNextPage: m.isFetchingNextPage,
1413
+ isPending: m.isPending,
1414
+ isPlaceholderData: m.isPlaceholderData,
1415
+ error: m.error
1407
1416
  };
1408
1417
  }
1409
- function nc(e) {
1418
+ function gc(e) {
1410
1419
  var b;
1411
1420
  const {
1412
1421
  courseId: t,
1413
1422
  moduleId: n,
1414
1423
  adapter: o,
1415
- pageSize: s = qn,
1424
+ pageSize: s = Bn,
1416
1425
  view: r,
1417
- enabled: i = !0,
1418
- staleTime: a = tt,
1419
- limit: d
1420
- } = e, u = It(
1421
- Bn({
1426
+ enabled: l = !0,
1427
+ staleTime: a = Je,
1428
+ limit: u
1429
+ } = e, c = bt(
1430
+ Wn({
1422
1431
  courseId: t,
1423
1432
  moduleId: n,
1424
1433
  adapter: o,
1425
1434
  pageSize: s,
1426
1435
  view: r,
1427
1436
  staleTime: a,
1428
- enabled: i,
1429
- limit: d
1437
+ enabled: l,
1438
+ limit: u
1430
1439
  })
1431
- ), c = (b = u.data) == null ? void 0 : b.pages, p = N(() => (c ?? []).flatMap((w) => w.items), [c]), f = c && c.length > 0 ? c[c.length - 1].pageInfo : Ze, y = u.fetchNextPage, g = U(() => {
1432
- y();
1433
- }, [y]);
1440
+ ), d = (b = c.data) == null ? void 0 : b.pages, m = N(() => (d ?? []).flatMap((w) => w.items), [d]), f = d && d.length > 0 ? d[d.length - 1].pageInfo : Qe, S = c.fetchNextPage, h = F(() => {
1441
+ S();
1442
+ }, [S]);
1434
1443
  return {
1435
- items: p,
1444
+ items: m,
1436
1445
  pageInfo: f,
1437
1446
  hasNextPage: f.hasNextPage,
1438
- fetchNextPage: g,
1439
- isLoading: u.isLoading,
1440
- isFetchingNextPage: u.isFetchingNextPage,
1441
- error: u.error
1447
+ fetchNextPage: h,
1448
+ isLoading: c.isLoading,
1449
+ isFetchingNextPage: c.isFetchingNextPage,
1450
+ error: c.error
1442
1451
  };
1443
1452
  }
1444
- function Hi(e, t, n = Mt) {
1453
+ function nl(e, t, n = St) {
1445
1454
  if (e.pageInfo.hasNextPage) return "onDemand";
1446
1455
  let o = 0, s = 0;
1447
1456
  for (const r of e.modules) {
@@ -1450,31 +1459,31 @@ function Hi(e, t, n = Mt) {
1450
1459
  }
1451
1460
  return o > t * 2 ? "onDemand" : Math.max(e.modules.length, 1) * Math.max(s, 1) <= n ? "inline" : "onDemand";
1452
1461
  }
1453
- function Ki(e) {
1454
- var y;
1462
+ function ol(e) {
1463
+ var S;
1455
1464
  const {
1456
1465
  courseId: t,
1457
1466
  adapter: n,
1458
1467
  mode: o = "auto",
1459
- inlineThreshold: s = Fn,
1460
- nodeBudget: r = n.inlineNodeBudget ?? Mt,
1461
- pageSize: i = St,
1468
+ inlineThreshold: s = Gn,
1469
+ nodeBudget: r = n.inlineNodeBudget ?? St,
1470
+ pageSize: l = Tt,
1462
1471
  filter: a,
1463
- view: d,
1464
- staleTime: u = tt
1465
- } = e, c = o === "auto", p = It(
1466
- $n({
1472
+ view: u,
1473
+ staleTime: c = Je
1474
+ } = e, d = o === "auto", m = bt(
1475
+ Hn({
1467
1476
  courseId: t,
1468
1477
  adapter: n,
1469
- pageSize: i,
1478
+ pageSize: l,
1470
1479
  includeItems: !1,
1471
1480
  filter: a,
1472
- view: d,
1473
- staleTime: u,
1474
- enabled: c
1481
+ view: u,
1482
+ staleTime: c,
1483
+ enabled: d
1475
1484
  })
1476
1485
  );
1477
- if (!c)
1486
+ if (!d)
1478
1487
  return {
1479
1488
  resolvedMode: o,
1480
1489
  isResolving: !1,
@@ -1482,286 +1491,286 @@ function Ki(e) {
1482
1491
  error: null,
1483
1492
  inlineShape: null
1484
1493
  };
1485
- if (p.error)
1494
+ if (m.error)
1486
1495
  return {
1487
1496
  resolvedMode: "onDemand",
1488
1497
  isResolving: !1,
1489
1498
  probed: !0,
1490
- error: p.error,
1499
+ error: m.error,
1491
1500
  inlineShape: null
1492
1501
  };
1493
- const f = (y = p.data) == null ? void 0 : y.pages[0];
1502
+ const f = (S = m.data) == null ? void 0 : S.pages[0];
1494
1503
  return f ? {
1495
- resolvedMode: Hi(f, s, r),
1504
+ resolvedMode: nl(f, s, r),
1496
1505
  isResolving: !1,
1497
1506
  probed: !0,
1498
1507
  error: null,
1499
- inlineShape: Qi(f)
1508
+ inlineShape: sl(f)
1500
1509
  } : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
1501
1510
  }
1502
- function Qi(e) {
1511
+ function sl(e) {
1503
1512
  let t = 1;
1504
1513
  for (const n of e.modules)
1505
1514
  n.itemCount > t && (t = n.itemCount);
1506
1515
  return { moduleCount: Math.max(e.modules.length, 1), maxItemCount: t };
1507
1516
  }
1508
- const Gt = "\0", Vi = /* @__PURE__ */ new Map();
1509
- function Zi(e, t, n = Un) {
1510
- const o = ht(), s = $(/* @__PURE__ */ new Map()), [r, i] = V(Vi), a = e.join(Gt), d = N(() => a === "" ? [] : a.split(Gt), [a]);
1511
- Z(() => {
1512
- const c = s.current, p = () => {
1513
- i((g) => {
1517
+ const Yt = "\0", rl = /* @__PURE__ */ new Map();
1518
+ function il(e, t, n = jn) {
1519
+ const o = It(), s = $(/* @__PURE__ */ new Map()), [r, l] = ee(rl), a = e.join(Yt), u = N(() => a === "" ? [] : a.split(Yt), [a]);
1520
+ te(() => {
1521
+ const d = s.current, m = () => {
1522
+ l((h) => {
1514
1523
  const b = /* @__PURE__ */ new Map();
1515
- let w = g.size !== c.size;
1516
- for (const [x, _] of c) {
1517
- const A = _.getCurrentResult();
1518
- b.set(x, A), !w && g.get(x) !== A && (w = !0);
1524
+ let w = h.size !== d.size;
1525
+ for (const [E, P] of d) {
1526
+ const z = P.getCurrentResult();
1527
+ b.set(E, z), !w && h.get(E) !== z && (w = !0);
1519
1528
  }
1520
- return w ? b : g;
1529
+ return w ? b : h;
1521
1530
  });
1522
- }, f = new Set(d);
1523
- for (const g of d) {
1524
- if (c.has(g)) continue;
1525
- const b = new Io(
1531
+ }, f = new Set(u);
1532
+ for (const h of u) {
1533
+ if (d.has(h)) continue;
1534
+ const b = new Co(
1526
1535
  o,
1527
- t(g, !0)
1536
+ t(h, !0)
1528
1537
  );
1529
- c.set(g, b), b.subscribe(p);
1538
+ d.set(h, b), b.subscribe(m);
1530
1539
  }
1531
- for (const [g, b] of c)
1532
- b.setOptions(t(g, f.has(g)));
1533
- for (const g of d) {
1534
- const b = c.get(g);
1535
- b && (c.delete(g), c.set(g, b));
1540
+ for (const [h, b] of d)
1541
+ b.setOptions(t(h, f.has(h)));
1542
+ for (const h of u) {
1543
+ const b = d.get(h);
1544
+ b && (d.delete(h), d.set(h, b));
1536
1545
  }
1537
- let y = c.size - f.size;
1538
- if (y > n)
1539
- for (const [g, b] of c) {
1540
- if (y <= n) break;
1541
- f.has(g) || (b.destroy(), c.delete(g), y -= 1);
1546
+ let S = d.size - f.size;
1547
+ if (S > n)
1548
+ for (const [h, b] of d) {
1549
+ if (S <= n) break;
1550
+ f.has(h) || (b.destroy(), d.delete(h), S -= 1);
1542
1551
  }
1543
- p();
1544
- }, [o, t, d, n]), Z(() => {
1545
- const c = s.current;
1552
+ m();
1553
+ }, [o, t, u, n]), te(() => {
1554
+ const d = s.current;
1546
1555
  return () => {
1547
- for (const p of c.values()) p.destroy();
1548
- c.clear();
1556
+ for (const m of d.values()) m.destroy();
1557
+ d.clear();
1549
1558
  };
1550
1559
  }, []);
1551
- const u = U((c) => {
1552
- var p;
1553
- (p = s.current.get(c)) == null || p.fetchNextPage();
1560
+ const c = F((d) => {
1561
+ var m;
1562
+ (m = s.current.get(d)) == null || m.fetchNextPage();
1554
1563
  }, []);
1555
- return { results: r, fetchNextPage: u };
1564
+ return { results: r, fetchNextPage: c };
1556
1565
  }
1557
- const Xi = [], Ji = () => {
1566
+ const ll = [], al = () => {
1558
1567
  };
1559
- function oc(e) {
1560
- var Te, Ge;
1568
+ function fc(e) {
1569
+ var ze, de;
1561
1570
  const {
1562
1571
  courseId: t,
1563
1572
  adapter: n,
1564
1573
  view: o,
1565
1574
  itemsMode: s = "auto",
1566
- inlineThreshold: r = Fn,
1567
- pageSize: i = St,
1568
- itemPageSize: a = qn,
1569
- itemConcurrency: d = Yi,
1570
- retainCollapsedLimit: u = Un,
1571
- staleTime: c = tt,
1572
- initialExpandedModuleIds: p,
1573
- initialFilter: f = X
1574
- } = e, y = ht(), g = Re(), [b, w] = V(f), x = N(
1575
- () => qi(g.filters, n.capabilities),
1576
- [g.filters, n.capabilities]
1577
- ), _ = he(x, b), A = yt(_), q = Ki({
1575
+ inlineThreshold: r = Gn,
1576
+ pageSize: l = Tt,
1577
+ itemPageSize: a = Bn,
1578
+ itemConcurrency: u = el,
1579
+ retainCollapsedLimit: c = jn,
1580
+ staleTime: d = Je,
1581
+ initialExpandedModuleIds: m,
1582
+ initialFilter: f = ne
1583
+ } = e, S = It(), h = ye(), [b, w] = ee(f), E = N(
1584
+ () => Yi(h.filters, n.capabilities),
1585
+ [h.filters, n.capabilities]
1586
+ ), P = Me(E, b), z = _t(P), L = ol({
1578
1587
  courseId: t,
1579
1588
  adapter: n,
1580
1589
  mode: s,
1581
1590
  inlineThreshold: r,
1582
- pageSize: i,
1583
- filter: A,
1591
+ pageSize: l,
1592
+ filter: z,
1584
1593
  view: o,
1585
- staleTime: c
1586
- }), B = q.resolvedMode, L = Wi({
1594
+ staleTime: d
1595
+ }), G = L.resolvedMode, v = tl({
1587
1596
  courseId: t,
1588
1597
  adapter: n,
1589
- pageSize: i,
1590
- filter: A,
1598
+ pageSize: l,
1599
+ filter: z,
1591
1600
  view: o,
1592
- staleTime: c,
1593
- includeItems: B === "inline",
1594
- inlineItemsFirst: (Te = q.inlineShape) == null ? void 0 : Te.maxItemCount,
1595
- inlineFirst: (Ge = q.inlineShape) == null ? void 0 : Ge.moduleCount,
1596
- enabled: B !== null
1597
- }), [k, G] = V(
1598
- () => p ?? []
1599
- ), J = p === void 0, F = $(!1), D = b !== X && _ !== void 0;
1600
- Z(() => {
1601
- !J || F.current || D || L.isPlaceholderData || G((h) => {
1602
- const M = new Set(h), I = [...h];
1603
- for (const R of L.modules)
1604
- R.collapsed === !1 && !M.has(R.id) && I.push(R.id);
1605
- return I.length === h.length ? h : I;
1601
+ staleTime: d,
1602
+ includeItems: G === "inline",
1603
+ inlineItemsFirst: (ze = L.inlineShape) == null ? void 0 : ze.maxItemCount,
1604
+ inlineFirst: (de = L.inlineShape) == null ? void 0 : de.moduleCount,
1605
+ enabled: G !== null
1606
+ }), [D, H] = ee(
1607
+ () => m ?? []
1608
+ ), O = m === void 0, q = $(!1), W = b !== ne && P !== void 0;
1609
+ te(() => {
1610
+ !O || q.current || W || v.isPlaceholderData || H((I) => {
1611
+ const g = new Set(I), T = [...I];
1612
+ for (const R of v.modules)
1613
+ R.collapsed === !1 && !g.has(R.id) && T.push(R.id);
1614
+ return T.length === I.length ? I : T;
1606
1615
  });
1607
- }, [L.modules, L.isPlaceholderData, J, D]);
1608
- const Y = N(() => {
1609
- const h = /* @__PURE__ */ new Map();
1610
- for (const M of L.modules) h.set(M.id, M);
1611
- return h;
1612
- }, [L.modules]), se = N(
1613
- () => k.filter((h) => {
1614
- const M = Y.get(h);
1615
- return M !== void 0 && M.items === void 0;
1616
+ }, [v.modules, v.isPlaceholderData, O, W]);
1617
+ const k = N(() => {
1618
+ const I = /* @__PURE__ */ new Map();
1619
+ for (const g of v.modules) I.set(g.id, g);
1620
+ return I;
1621
+ }, [v.modules]), K = N(
1622
+ () => D.filter((I) => {
1623
+ const g = k.get(I);
1624
+ return g !== void 0 && g.items === void 0;
1616
1625
  }),
1617
- [k, Y]
1618
- ), De = N(() => new Set(se), [se]), Oe = N(() => bo(d), [d]), Me = U(
1619
- (h, M) => Bn({
1626
+ [D, k]
1627
+ ), Q = N(() => new Set(K), [K]), re = N(() => wo(u), [u]), ie = F(
1628
+ (I, g) => Wn({
1620
1629
  courseId: t,
1621
- moduleId: h,
1630
+ moduleId: I,
1622
1631
  adapter: n,
1623
1632
  pageSize: a,
1624
1633
  view: o,
1625
- staleTime: c,
1626
- enabled: M,
1627
- limit: Oe
1634
+ staleTime: d,
1635
+ enabled: g,
1636
+ limit: re
1628
1637
  }),
1629
- [t, n, a, o, c, Oe]
1630
- ), ee = Zi(se, Me, u), ye = ee.fetchNextPage, qe = $(/* @__PURE__ */ new Map()), re = U(
1631
- (h) => {
1632
- let M = qe.current.get(h);
1633
- return M || (M = () => ye(h), qe.current.set(h, M)), M;
1638
+ [t, n, a, o, d, re]
1639
+ ), Te = il(K, ie, c), De = Te.fetchNextPage, le = $(/* @__PURE__ */ new Map()), Ee = F(
1640
+ (I) => {
1641
+ let g = le.current.get(I);
1642
+ return g || (g = () => De(I), le.current.set(I, g)), g;
1634
1643
  },
1635
- [ye]
1636
- ), ie = U((h) => {
1637
- F.current = !0, G(
1638
- (M) => M.includes(h) ? M : [...M, h]
1644
+ [De]
1645
+ ), x = F((I) => {
1646
+ q.current = !0, H(
1647
+ (g) => g.includes(I) ? g : [...g, I]
1639
1648
  );
1640
- }, []), P = U(
1641
- (h) => {
1642
- F.current = !0, G((M) => M.filter((I) => I !== h)), y.cancelQueries({ queryKey: ut(t, h) });
1649
+ }, []), V = F(
1650
+ (I) => {
1651
+ q.current = !0, H((g) => g.filter((T) => T !== I)), S.cancelQueries({ queryKey: dt(t, I) });
1643
1652
  },
1644
- [y, t]
1645
- ), Fe = U((h) => {
1646
- F.current = !0, G((M) => {
1647
- const I = new Set(M), R = h.filter((O) => !I.has(O));
1648
- return R.length === 0 ? M : [...M, ...R];
1653
+ [S, t]
1654
+ ), Ne = F((I) => {
1655
+ q.current = !0, H((g) => {
1656
+ const T = new Set(g), R = I.filter((j) => !T.has(j));
1657
+ return R.length === 0 ? g : [...g, ...R];
1649
1658
  });
1650
- }, []), Ue = U(
1651
- (h) => {
1652
- F.current = !0;
1653
- const M = new Set(h);
1654
- G((I) => {
1655
- const R = I.filter((O) => !M.has(O));
1656
- return R.length === I.length ? I : R;
1659
+ }, []), Oe = F(
1660
+ (I) => {
1661
+ q.current = !0;
1662
+ const g = new Set(I);
1663
+ H((T) => {
1664
+ const R = T.filter((j) => !g.has(j));
1665
+ return R.length === T.length ? T : R;
1657
1666
  });
1658
- for (const I of M)
1659
- y.cancelQueries({ queryKey: ut(t, I) });
1667
+ for (const T of g)
1668
+ S.cancelQueries({ queryKey: dt(t, T) });
1660
1669
  },
1661
- [y, t]
1662
- ), W = $(k);
1663
- W.current = k;
1664
- const Se = U(() => {
1665
- F.current = !0;
1666
- for (const h of W.current) P(h);
1667
- }, [P]), le = $(b);
1668
- le.current = b;
1669
- const H = $(null), ze = U(
1670
- (h) => {
1671
- if (h === le.current) return;
1672
- if (le.current = h, h !== X && he(x, h) !== void 0) {
1673
- H.current === null && (H.current = W.current);
1674
- const I = F.current;
1675
- for (const R of W.current) P(R);
1676
- F.current = I;
1677
- } else H.current !== null && (G(H.current), W.current = H.current, H.current = null);
1678
- w(h);
1670
+ [S, t]
1671
+ ), Z = $(D);
1672
+ Z.current = D;
1673
+ const qe = F(() => {
1674
+ q.current = !0;
1675
+ for (const I of Z.current) V(I);
1676
+ }, [V]), ae = $(b);
1677
+ ae.current = b;
1678
+ const J = $(null), ce = F(
1679
+ (I) => {
1680
+ if (I === ae.current) return;
1681
+ if (ae.current = I, I !== ne && Me(E, I) !== void 0) {
1682
+ J.current === null && (J.current = Z.current);
1683
+ const T = q.current;
1684
+ for (const R of Z.current) V(R);
1685
+ q.current = T;
1686
+ } else J.current !== null && (H(J.current), Z.current = J.current, J.current = null);
1687
+ w(I);
1679
1688
  },
1680
- [x, P]
1681
- ), ae = U(
1682
- (h) => {
1683
- W.current.includes(h) ? P(h) : ie(h);
1689
+ [E, V]
1690
+ ), nt = F(
1691
+ (I) => {
1692
+ Z.current.includes(I) ? V(I) : x(I);
1684
1693
  },
1685
- [P, ie]
1686
- ), $e = ee.results, Be = $(/* @__PURE__ */ new Map()), _e = U(
1687
- (h) => {
1688
- var ue;
1689
- const M = Y.get(h), I = $e.get(h), R = De.has(h), O = Be.current.get(h);
1690
- if (O && O.items === (M == null ? void 0 : M.items) && O.result === I && O.active === R)
1691
- return O.value;
1692
- const ce = (Q) => (Be.current.set(h, { items: M == null ? void 0 : M.items, result: I, active: R, value: Q }), Q);
1693
- if ((M == null ? void 0 : M.items) !== void 0)
1694
- return ce({
1695
- items: M.items,
1696
- pageInfo: Ze,
1694
+ [V, x]
1695
+ ), Fe = Te.results, ue = $(/* @__PURE__ */ new Map()), Ue = F(
1696
+ (I) => {
1697
+ var pe;
1698
+ const g = k.get(I), T = Fe.get(I), R = Q.has(I), j = ue.current.get(I);
1699
+ if (j && j.items === (g == null ? void 0 : g.items) && j.result === T && j.active === R)
1700
+ return j.value;
1701
+ const Ce = (X) => (ue.current.set(I, { items: g == null ? void 0 : g.items, result: T, active: R, value: X }), X);
1702
+ if ((g == null ? void 0 : g.items) !== void 0)
1703
+ return Ce({
1704
+ items: g.items,
1705
+ pageInfo: Qe,
1697
1706
  hasNextPage: !1,
1698
- fetchNextPage: Ji,
1707
+ fetchNextPage: al,
1699
1708
  isLoading: !1,
1700
1709
  isFetchingNextPage: !1,
1701
1710
  error: null,
1702
1711
  source: "inline"
1703
1712
  });
1704
- const K = (ue = I == null ? void 0 : I.data) == null ? void 0 : ue.pages, te = K ? K.flatMap((Q) => Q.items) : Xi, Ee = K && K.length > 0 ? K[K.length - 1].pageInfo : Ze;
1705
- return ce({
1706
- items: te,
1707
- pageInfo: Ee,
1708
- hasNextPage: Ee.hasNextPage,
1709
- fetchNextPage: re(h),
1710
- isLoading: I ? I.isLoading : R,
1711
- isFetchingNextPage: (I == null ? void 0 : I.isFetchingNextPage) ?? !1,
1712
- error: (I == null ? void 0 : I.error) ?? null,
1713
+ const Y = (pe = T == null ? void 0 : T.data) == null ? void 0 : pe.pages, $e = Y ? Y.flatMap((X) => X.items) : ll, me = Y && Y.length > 0 ? Y[Y.length - 1].pageInfo : Qe;
1714
+ return Ce({
1715
+ items: $e,
1716
+ pageInfo: me,
1717
+ hasNextPage: me.hasNextPage,
1718
+ fetchNextPage: Ee(I),
1719
+ isLoading: T ? T.isLoading : R,
1720
+ isFetchingNextPage: (T == null ? void 0 : T.isFetchingNextPage) ?? !1,
1721
+ error: (T == null ? void 0 : T.error) ?? null,
1713
1722
  source: "onDemand"
1714
1723
  });
1715
1724
  },
1716
- [Y, $e, re, De]
1725
+ [k, Fe, Ee, Q]
1717
1726
  );
1718
1727
  return {
1719
- modules: L.modules,
1720
- pageInfo: L.pageInfo,
1721
- hasNextPage: L.hasNextPage,
1722
- fetchNextPage: L.fetchNextPage,
1723
- isLoading: (q.isResolving || L.isPending) && !L.isPlaceholderData,
1724
- isRefreshing: L.isPlaceholderData,
1725
- isFetchingNextPage: L.isFetchingNextPage,
1726
- error: L.error ?? q.error,
1727
- itemsMode: B,
1728
- getItems: _e,
1729
- expandModule: ie,
1730
- collapseModule: P,
1731
- expandModules: Fe,
1732
- collapseModules: Ue,
1733
- collapseAllModules: Se,
1734
- toggleModule: ae,
1735
- expandedModuleIds: k,
1728
+ modules: v.modules,
1729
+ pageInfo: v.pageInfo,
1730
+ hasNextPage: v.hasNextPage,
1731
+ fetchNextPage: v.fetchNextPage,
1732
+ isLoading: (L.isResolving || v.isPending) && !v.isPlaceholderData,
1733
+ isRefreshing: v.isPlaceholderData,
1734
+ isFetchingNextPage: v.isFetchingNextPage,
1735
+ error: v.error ?? L.error,
1736
+ itemsMode: G,
1737
+ getItems: Ue,
1738
+ expandModule: x,
1739
+ collapseModule: V,
1740
+ expandModules: Ne,
1741
+ collapseModules: Oe,
1742
+ collapseAllModules: qe,
1743
+ toggleModule: nt,
1744
+ expandedModuleIds: D,
1736
1745
  filter: b,
1737
- setFilter: ze,
1738
- filterEntry: _,
1739
- filterPredicate: mt(_) ? _ == null ? void 0 : _.predicate : void 0,
1740
- filterResultsArePartial: b !== X && mt(_) && L.hasNextPage
1746
+ setFilter: ce,
1747
+ filterEntry: P,
1748
+ filterPredicate: pt(P) ? P == null ? void 0 : P.predicate : void 0,
1749
+ filterResultsArePartial: b !== ne && pt(P) && v.hasNextPage
1741
1750
  };
1742
1751
  }
1743
- function el({ value: e, onChange: t, describedBy: n }) {
1744
- const { t: o } = j(), s = Re(), r = N(() => Je(s.filters), [s.filters]), i = st();
1745
- return /* @__PURE__ */ C(T, { as: "div", margin: "medium 0 0 0", children: [
1746
- /* @__PURE__ */ l(T, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ l(v, { size: "medium", weight: "bold", id: i, children: o("filterGroupLabel") }) }),
1747
- /* @__PURE__ */ l(
1748
- E,
1752
+ function cl({ value: e, onChange: t, describedBy: n }) {
1753
+ const { t: o } = B(), s = ye(), r = N(() => Ze(s.filters), [s.filters]), l = rt();
1754
+ return /* @__PURE__ */ _(C, { as: "div", margin: "medium 0 0 0", children: [
1755
+ /* @__PURE__ */ i(C, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ i(A, { size: "medium", weight: "bold", id: l, children: o("filterGroupLabel") }) }),
1756
+ /* @__PURE__ */ i(
1757
+ M,
1749
1758
  {
1750
1759
  gap: "space4",
1751
1760
  wrap: "wrap",
1752
1761
  as: "div",
1753
1762
  role: "group",
1754
- "aria-labelledby": i,
1763
+ "aria-labelledby": l,
1755
1764
  "data-testid": "filter-chips",
1756
1765
  children: r.map((a) => {
1757
- const d = a.key === e;
1758
- return /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ l(
1759
- ve,
1766
+ const u = a.key === e;
1767
+ return /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ i(
1768
+ Pe,
1760
1769
  {
1761
1770
  size: "medium",
1762
- color: d ? "primary" : "secondary",
1763
- "aria-pressed": d,
1764
- "aria-describedby": a.key !== X && mt(a) ? n : void 0,
1771
+ color: u ? "primary" : "secondary",
1772
+ "aria-pressed": u,
1773
+ "aria-describedby": a.key !== ne && pt(a) ? n : void 0,
1765
1774
  onClick: () => t(a.key),
1766
1775
  "data-testid": `filter-chip-${a.key}`,
1767
1776
  themeOverride: { borderRadius: "0.5rem" },
@@ -1773,12 +1782,12 @@ function el({ value: e, onChange: t, describedBy: n }) {
1773
1782
  )
1774
1783
  ] });
1775
1784
  }
1776
- const tl = 20, nl = 4.5, jt = 7, ol = 5, sl = 20, Gn = "#000000", jn = "#FFFFFF", Yn = {
1785
+ const ul = 20, dl = 4.5, Ht = 7, ml = 5, pl = 20, Kn = "#000000", Qn = "#FFFFFF", Vn = {
1777
1786
  primary: { semantic: "base", textKey: "baseTextColor", borderKey: "baseBorderColor" },
1778
1787
  info: { semantic: "info", textKey: "infoTextColor", borderKey: "infoBorderColor" },
1779
1788
  success: { semantic: "success", textKey: "successTextColor", borderKey: "successBorderColor" },
1780
1789
  warning: { semantic: "warning", textKey: "warningTextColor", borderKey: "warningBorderColor" }
1781
- }, rl = {
1790
+ }, gl = {
1782
1791
  card: {
1783
1792
  primary: { fill: "#E8EAEC", stroke: "#8D959F", text: "#273540" },
1784
1793
  info: { fill: "#D5E4F2", stroke: "#2B7ABC", text: "#23649A" },
@@ -1792,96 +1801,114 @@ const tl = 20, nl = 4.5, jt = 7, ol = 5, sl = 20, Gn = "#000000", jn = "#FFFFFF"
1792
1801
  warning: { fill: "#EBD2C4", stroke: "#CF4A00", text: "#A13900" }
1793
1802
  }
1794
1803
  };
1795
- function il(e, t) {
1796
- const n = To(
1797
- at(e),
1798
- at(Eo(t, tl))
1804
+ function fl(e, t) {
1805
+ const n = xo(
1806
+ ct(e),
1807
+ ct(Lo(t, ul))
1799
1808
  );
1800
- return gn(n);
1809
+ return Mn(n);
1801
1810
  }
1802
- function ll(e, t, n) {
1803
- const o = oe(n, t) >= jt ? jt : nl;
1804
- return Math.min(o, Math.max(oe(e, Gn), oe(e, jn)));
1811
+ function hl(e, t, n) {
1812
+ const o = se(n, t) >= Ht ? Ht : dl;
1813
+ return Math.min(o, Math.max(se(e, Kn), se(e, Qn)));
1805
1814
  }
1806
- function al(e, t, n) {
1807
- const o = ll(e, t, n);
1808
- if (oe(e, t) >= o) return t;
1809
- const s = oe(e, Gn) > oe(e, jn) ? Co : wo;
1815
+ function Il(e, t, n) {
1816
+ const o = hl(e, t, n);
1817
+ if (se(e, t) >= o) return t;
1818
+ const s = se(e, Kn) > se(e, Qn) ? Ro : ko;
1810
1819
  let r = t;
1811
- for (let i = 0; i < sl && oe(e, r) < o; i++)
1812
- r = s(r, ol);
1813
- return gn(r);
1820
+ for (let l = 0; l < pl && se(e, r) < o; l++)
1821
+ r = s(r, ml);
1822
+ return Mn(r);
1814
1823
  }
1815
- function cl(e) {
1816
- return lt(e) && at(e).a === 1;
1824
+ function bl(e) {
1825
+ return at(e) && ct(e).a === 1;
1817
1826
  }
1818
- function Yt(e, t) {
1827
+ function Wt(e, t) {
1819
1828
  var n;
1820
1829
  return t === "card" ? (n = e == null ? void 0 : e.elevatedSurface) == null ? void 0 : n.base : e == null ? void 0 : e.muted;
1821
1830
  }
1822
- function Wt(e, t, n, o) {
1823
- var i, a, d, u;
1824
- const s = rl[n][e], r = t;
1831
+ function Kt(e, t, n, o) {
1832
+ var l, a, u, c;
1833
+ const s = gl[n][e], r = t;
1825
1834
  try {
1826
- const c = r == null ? void 0 : r.newTheme, p = (i = c == null ? void 0 : c.semantics) == null ? void 0 : i.call(c, c.primitives);
1827
- if (!p) return s;
1828
- const { semantic: f } = Yn[e], y = Yt((u = (d = (a = r == null ? void 0 : r.themeOverride) == null ? void 0 : a.semantics) == null ? void 0 : d.color) == null ? void 0 : u.background, n) ?? Yt(p.color.background, n) ?? "", g = o.stroke ?? p.color.stroke[f], b = o.label ?? p.color.text[f];
1829
- if (!cl(y) || !lt(g) || !lt(b)) return s;
1830
- const w = il(y, g);
1831
- return { fill: w, stroke: g, text: al(w, b, y) };
1835
+ const d = r == null ? void 0 : r.newTheme, m = (l = d == null ? void 0 : d.semantics) == null ? void 0 : l.call(d, d.primitives);
1836
+ if (!m) return s;
1837
+ const { semantic: f } = Vn[e], S = Wt((c = (u = (a = r == null ? void 0 : r.themeOverride) == null ? void 0 : a.semantics) == null ? void 0 : u.color) == null ? void 0 : c.background, n) ?? Wt(m.color.background, n) ?? "", h = o.stroke ?? m.color.stroke[f], b = o.label ?? m.color.text[f];
1838
+ if (!bl(S) || !at(h) || !at(b)) return s;
1839
+ const w = fl(S, h);
1840
+ return { fill: w, stroke: h, text: Il(w, b, S) };
1832
1841
  } catch {
1833
1842
  return s;
1834
1843
  }
1835
1844
  }
1836
- const Ht = /* @__PURE__ */ new WeakMap();
1837
- function ul(e, t, n, o = {}) {
1845
+ const Qt = /* @__PURE__ */ new WeakMap();
1846
+ function Zn(e, t, n, o = {}) {
1838
1847
  if (typeof t != "object" || t === null)
1839
- return Wt(e, t, n, o);
1840
- let s = Ht.get(t);
1841
- s === void 0 && (s = /* @__PURE__ */ new Map(), Ht.set(t, s));
1842
- const r = `${n}:${e}:${o.stroke ?? ""}:${o.label ?? ""}`, i = s.get(r);
1843
- if (i !== void 0) return i;
1844
- const a = Wt(e, t, n, o);
1848
+ return Kt(e, t, n, o);
1849
+ let s = Qt.get(t);
1850
+ s === void 0 && (s = /* @__PURE__ */ new Map(), Qt.set(t, s));
1851
+ const r = `${n}:${e}:${o.stroke ?? ""}:${o.label ?? ""}`, l = s.get(r);
1852
+ if (l !== void 0) return l;
1853
+ const a = Kt(e, t, n, o);
1845
1854
  return s.set(r, a), a;
1846
1855
  }
1847
- function Ke(e, t) {
1848
- const { textKey: n, borderKey: o } = Yn[e];
1856
+ function He(e, t) {
1857
+ const { textKey: n, borderKey: o } = Vn[e];
1849
1858
  return (s, r) => {
1850
- const i = s, { fill: a, stroke: d, text: u } = ul(e, r, t, {
1851
- stroke: i == null ? void 0 : i[o],
1852
- label: i == null ? void 0 : i[n]
1859
+ const l = s, { fill: a, stroke: u, text: c } = Zn(e, r, t, {
1860
+ stroke: l == null ? void 0 : l[o],
1861
+ label: l == null ? void 0 : l[n]
1853
1862
  });
1854
- return { backgroundColor: a, [n]: u, [o]: d };
1863
+ return { backgroundColor: a, [n]: c, [o]: u };
1855
1864
  };
1856
1865
  }
1857
- function Kt(e) {
1866
+ function Vt(e) {
1858
1867
  return {
1859
- primary: Ke("primary", e),
1860
- info: Ke("info", e),
1861
- success: Ke("success", e),
1862
- warning: Ke("warning", e)
1868
+ primary: He("primary", e),
1869
+ info: He("info", e),
1870
+ success: He("success", e),
1871
+ warning: He("warning", e)
1872
+ };
1873
+ }
1874
+ const Ml = {
1875
+ card: Vt("card"),
1876
+ row: Vt("row")
1877
+ }, Sl = "#9242B4", yl = "#9E58BD";
1878
+ function Zt(e) {
1879
+ return (t, n) => {
1880
+ var l, a, u, c;
1881
+ const { fill: o, stroke: s, text: r } = Zn("primary", n, e, {
1882
+ stroke: ((a = (l = n.colors) == null ? void 0 : l.contrasts) == null ? void 0 : a.violet4570) ?? yl,
1883
+ label: ((c = (u = n.colors) == null ? void 0 : u.contrasts) == null ? void 0 : c.violet5790) ?? Sl
1884
+ });
1885
+ return { backgroundColor: o, baseTextColor: r, baseBorderColor: s };
1863
1886
  };
1864
1887
  }
1865
- const dl = {
1866
- card: Kt("card"),
1867
- row: Kt("row")
1868
- }, ml = {
1869
- not_started: { tone: "primary", icon: /* @__PURE__ */ l(cn, { size: "sm" }) },
1870
- in_progress: { tone: "info", icon: /* @__PURE__ */ l(an, { size: "sm" }) },
1871
- complete: { tone: "success", icon: /* @__PURE__ */ l(ln, { size: "sm" }) },
1872
- missing: { tone: "warning", icon: /* @__PURE__ */ l(Pe, { size: "sm" }) },
1873
- incomplete: { tone: "warning", icon: /* @__PURE__ */ l(Pe, { size: "sm" }) },
1874
- missing_and_incomplete: { tone: "warning", icon: /* @__PURE__ */ l(Pe, { size: "sm" }) },
1875
- locked: { tone: "primary", icon: /* @__PURE__ */ l(rn, { size: "sm" }) }
1876
- }, pl = {
1877
- not_started: { tone: "primary", icon: /* @__PURE__ */ l(cn, { size: "sm" }) },
1878
- in_progress: { tone: "info", icon: /* @__PURE__ */ l(an, { size: "sm" }) },
1879
- complete: { tone: "success", icon: /* @__PURE__ */ l(ln, { size: "sm" }) },
1880
- incomplete: { tone: "warning", icon: /* @__PURE__ */ l(Pe, { size: "sm" }) },
1881
- missing: { tone: "warning", icon: /* @__PURE__ */ l(Pe, { size: "sm" }) },
1882
- locked: { tone: "primary", icon: /* @__PURE__ */ l(rn, { size: "sm" }) }
1888
+ const Xn = {
1889
+ tone: "primary",
1890
+ icon: /* @__PURE__ */ i(So, { size: "sm" }),
1891
+ themes: {
1892
+ card: Zt("card"),
1893
+ row: Zt("row")
1894
+ }
1895
+ }, _l = {
1896
+ not_started: { tone: "primary", icon: /* @__PURE__ */ i(mn, { size: "sm" }) },
1897
+ in_progress: { tone: "info", icon: /* @__PURE__ */ i(dn, { size: "sm" }) },
1898
+ complete: { tone: "success", icon: /* @__PURE__ */ i(un, { size: "sm" }) },
1899
+ missing: { tone: "warning", icon: /* @__PURE__ */ i(ve, { size: "sm" }) },
1900
+ incomplete: { tone: "warning", icon: /* @__PURE__ */ i(ve, { size: "sm" }) },
1901
+ missing_and_incomplete: { tone: "warning", icon: /* @__PURE__ */ i(ve, { size: "sm" }) },
1902
+ locked: { tone: "primary", icon: /* @__PURE__ */ i(cn, { size: "sm" }) }
1903
+ }, Tl = {
1904
+ not_started: { tone: "primary", icon: /* @__PURE__ */ i(mn, { size: "sm" }) },
1905
+ in_progress: { tone: "info", icon: /* @__PURE__ */ i(dn, { size: "sm" }) },
1906
+ complete: { tone: "success", icon: /* @__PURE__ */ i(un, { size: "sm" }) },
1907
+ incomplete: { tone: "warning", icon: /* @__PURE__ */ i(ve, { size: "sm" }) },
1908
+ missing: { tone: "warning", icon: /* @__PURE__ */ i(ve, { size: "sm" }) },
1909
+ locked: { tone: "primary", icon: /* @__PURE__ */ i(cn, { size: "sm" }) }
1883
1910
  };
1884
- function Wn(e, t, n, o) {
1911
+ function Jn(e, t, n, o) {
1885
1912
  switch (t) {
1886
1913
  case "not_started":
1887
1914
  return e("moduleStatusNotStarted");
@@ -1902,7 +1929,7 @@ function Wn(e, t, n, o) {
1902
1929
  return e("moduleStatusLocked");
1903
1930
  }
1904
1931
  }
1905
- function fl(e, t) {
1932
+ function El(e, t) {
1906
1933
  switch (t) {
1907
1934
  case "not_started":
1908
1935
  return e("itemStatusNotStarted");
@@ -1918,87 +1945,95 @@ function fl(e, t) {
1918
1945
  return e("itemStatusLocked");
1919
1946
  }
1920
1947
  }
1921
- function Hn(e, t, n, o) {
1922
- return /* @__PURE__ */ l(
1923
- Po,
1948
+ function et(e, t, n, o) {
1949
+ var s;
1950
+ return /* @__PURE__ */ i(
1951
+ Do,
1924
1952
  {
1925
1953
  color: e.tone,
1926
1954
  renderIcon: e.icon,
1927
- themeOverride: dl[o][e.tone],
1955
+ themeOverride: ((s = e.themes) == null ? void 0 : s[o]) ?? Ml[o][e.tone],
1928
1956
  "data-testid": n,
1929
1957
  children: t
1930
1958
  }
1931
1959
  );
1932
1960
  }
1933
- function gl({
1961
+ function Cl({
1934
1962
  status: e,
1935
1963
  missingCount: t,
1936
1964
  incompleteCount: n
1937
1965
  }) {
1938
- const { t: o } = j();
1939
- return Hn(
1940
- ml[e],
1941
- Wn(o, e, t, n),
1966
+ const { t: o } = B();
1967
+ return et(
1968
+ _l[e],
1969
+ Jn(o, e, t, n),
1942
1970
  "module-status-pill",
1943
1971
  "card"
1944
1972
  );
1945
1973
  }
1946
- function hl({ status: e }) {
1947
- const { t } = j();
1948
- return Hn(
1949
- pl[e],
1950
- fl(t, e),
1974
+ function wl({ status: e }) {
1975
+ const { t } = B();
1976
+ return et(
1977
+ Tl[e],
1978
+ El(t, e),
1951
1979
  "item-status-pill",
1952
1980
  "row"
1953
1981
  );
1954
1982
  }
1955
- const Kn = 2.75, ot = `${Kn}rem`, Il = { lineHeight: 0, display: "block" }, bl = {
1983
+ function vl() {
1984
+ const { t: e } = B();
1985
+ return et(Xn, e("moduleStatusDueSoon"), "module-due-soon-pill", "card");
1986
+ }
1987
+ function Pl() {
1988
+ const { t: e } = B();
1989
+ return et(Xn, e("itemStatusDueSoon"), "item-due-soon-pill", "row");
1990
+ }
1991
+ function eo() {
1992
+ const e = bn();
1993
+ return "key" in e && e.key === "canvas-high-contrast" ? "inline" : "standalone";
1994
+ }
1995
+ const to = 2.75, st = `${to}rem`, Al = { lineHeight: 0, display: "block" }, xl = {
1956
1996
  display: "inline-block",
1957
1997
  paddingLeft: "0.5rem",
1958
1998
  marginLeft: "0.5rem"
1959
- }, Ml = "#D7DADE", yl = "#6A7883", Qn = { fontSize: 0 };
1960
- function pt(e) {
1961
- return e == null || typeof e == "boolean" || e === "" ? !0 : Array.isArray(e) ? e.every(pt) : nn(e) && e.type === sn ? pt(e.props.children) : !1;
1999
+ }, Ll = "#D7DADE", Rl = "#6A7883", no = { fontSize: 0 };
2000
+ function gt(e) {
2001
+ return e == null || typeof e == "boolean" || e === "" ? !0 : Array.isArray(e) ? e.every(gt) : rn(e) && e.type === an ? gt(e.props.children) : !1;
1962
2002
  }
1963
- const Sl = {
2003
+ const kl = {
1964
2004
  contentVisibility: "auto",
1965
2005
  containIntrinsicSize: "auto 4.25rem"
1966
- }, _l = "0.5rem";
1967
- function Tl() {
1968
- const e = fn();
1969
- return "key" in e && e.key === "canvas-high-contrast" ? "inline" : "standalone";
1970
- }
1971
- function Vn(e, t) {
2006
+ }, Dl = "0.5rem";
2007
+ function oo(e, t) {
1972
2008
  var o, s;
1973
- const n = fn();
2009
+ const n = bn();
1974
2010
  return ("colors" in n ? (s = (o = n.colors) == null ? void 0 : o.contrasts) == null ? void 0 : s[e] : void 0) ?? t;
1975
2011
  }
1976
- function Zn() {
1977
- const e = Vn("grey1424", Ml);
2012
+ function so() {
2013
+ const e = oo("grey1424", Ll);
1978
2014
  return N(
1979
- () => ({ ...bl, borderLeft: `1px solid ${e}` }),
2015
+ () => ({ ...xl, borderLeft: `1px solid ${e}` }),
1980
2016
  [e]
1981
2017
  );
1982
2018
  }
1983
- function El({
2019
+ function Nl({
1984
2020
  item: e,
1985
2021
  today: t,
1986
- navigation: n,
1987
- attachedAbove: o,
1988
- attachedBelow: s
2022
+ attachedAbove: n,
2023
+ attachedBelow: o
1989
2024
  }) {
1990
- var F;
1991
- const { t: r, locale: i, timezone: a } = j(), d = Tl(), u = Vn("grey4570", yl), c = Zn(), p = Ne(), f = Re(), y = N(() => Je(f.itemMeta), [f.itemMeta]), g = e.title || r("itemUntitled");
2025
+ var W;
2026
+ const { t: s, locale: r, timezone: l } = B(), a = eo(), u = oo("grey4570", Rl), c = so(), d = ke(), m = ye(), { navigation: f } = m, S = N(() => Ze(m.itemMeta), [m.itemMeta]), h = e.title || s("itemUntitled");
1992
2027
  if (e.type === "sub_header")
1993
- return /* @__PURE__ */ l(
1994
- T,
2028
+ return /* @__PURE__ */ i(
2029
+ C,
1995
2030
  {
1996
2031
  as: "div",
1997
2032
  padding: "x-small small",
1998
2033
  margin: "x-small 0 0 0",
1999
2034
  "data-testid": `module-item-${e.id}`,
2000
- children: /* @__PURE__ */ l(
2001
- v,
2035
+ children: /* @__PURE__ */ i(
2036
+ A,
2002
2037
  {
2003
2038
  size: "small",
2004
2039
  weight: "bold",
@@ -2006,42 +2041,42 @@ function El({
2006
2041
  letterSpacing: "expanded",
2007
2042
  "data-testid": "module-item-title",
2008
2043
  "data-sub-header": "true",
2009
- children: g
2044
+ children: h
2010
2045
  }
2011
2046
  )
2012
2047
  }
2013
2048
  );
2014
- const b = ((F = n == null ? void 0 : n.getItemHref) == null ? void 0 : F.call(n, e)) ?? e.url ?? null, w = e.status === "locked", x = n == null ? void 0 : n.onItemClick, _ = x ? (D) => x(e, D) : void 0, A = he(f.itemTypes, e.type), q = A != null && A.renderIcon ? A.renderIcon({ item: e }) : A == null ? void 0 : A.icon, B = { item: e, t: r, today: t, locale: i, timezone: a, formatters: p, config: f }, L = y.map((D) => ({ key: D.key, node: D.render(B) })).filter((D) => !pt(D.node)), k = L.some((D) => D.key === ki), G = o ? "none" : "large", J = s ? "none" : "large";
2015
- return /* @__PURE__ */ l("div", { style: { ...Sl, marginTop: o ? void 0 : _l }, children: /* @__PURE__ */ l(
2016
- T,
2049
+ const b = ((W = f.getItemHref) == null ? void 0 : W.call(f, e)) ?? e.url ?? null, w = e.status === "locked", E = e.status !== void 0 && e.status !== "complete" && !w && yt(e.dueAt, t, l), P = f.onItemClick, z = P ? (k) => P(e, k) : void 0, L = Me(m.itemTypes, e.type), G = L != null && L.renderIcon ? L.renderIcon({ item: e }) : L == null ? void 0 : L.icon, v = { item: e, t: s, today: t, locale: r, timezone: l, formatters: d, config: m }, D = S.map((k) => ({ key: k.key, node: k.render(v) })).filter((k) => !gt(k.node)), H = D.some((k) => k.key === $i), O = n ? "none" : "large", q = o ? "none" : "large";
2050
+ return /* @__PURE__ */ i("div", { style: { ...kl, marginTop: n ? void 0 : Dl }, children: /* @__PURE__ */ i(
2051
+ C,
2017
2052
  {
2018
2053
  as: "div",
2019
2054
  background: "secondary",
2020
- borderRadius: `${G} ${G} ${J} ${J}`,
2055
+ borderRadius: `${O} ${O} ${q} ${q}`,
2021
2056
  padding: "small",
2022
2057
  "data-testid": `module-item-${e.id}`,
2023
- children: /* @__PURE__ */ l("div", { style: { paddingInlineStart: `${Math.max(e.indent - 1, 0) * Kn}rem` }, children: /* @__PURE__ */ C(E, { alignItems: "center", gap: "mediumSmall", children: [
2024
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(E, { alignItems: "center", children: [
2025
- e.indent > 0 ? /* @__PURE__ */ l(E.Item, { size: ot, textAlign: "center", "data-testid": "item-nest-arrow", children: /* @__PURE__ */ l("span", { style: { color: u }, children: /* @__PURE__ */ l(po, { size: "md", color: "inherit" }) }) }) : null,
2026
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ l(
2027
- T,
2058
+ children: /* @__PURE__ */ i("div", { style: { paddingInlineStart: `${Math.max(e.indent - 1, 0) * to}rem` }, children: /* @__PURE__ */ _(M, { alignItems: "center", gap: "mediumSmall", children: [
2059
+ /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ _(M, { alignItems: "center", children: [
2060
+ e.indent > 0 ? /* @__PURE__ */ i(M.Item, { size: st, textAlign: "center", "data-testid": "item-nest-arrow", children: /* @__PURE__ */ i("span", { style: { color: u }, children: /* @__PURE__ */ i(yo, { size: "md", color: "inherit" }) }) }) : null,
2061
+ /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ i(
2062
+ C,
2028
2063
  {
2029
2064
  as: "div",
2030
2065
  background: "primary",
2031
2066
  borderWidth: "small",
2032
2067
  borderRadius: "large",
2033
- width: ot,
2034
- height: ot,
2035
- children: /* @__PURE__ */ l(E, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ C(E.Item, { children: [
2036
- /* @__PURE__ */ l("span", { style: Il, "data-testid": "item-type-icon", children: q }),
2037
- A && !k ? /* @__PURE__ */ l(it, { children: r(A.label) }) : null
2068
+ width: st,
2069
+ height: st,
2070
+ children: /* @__PURE__ */ i(M, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ _(M.Item, { children: [
2071
+ /* @__PURE__ */ i("span", { style: Al, "data-testid": "item-type-icon", children: G }),
2072
+ L && !H ? /* @__PURE__ */ i(lt, { children: s(L.label) }) : null
2038
2073
  ] }) })
2039
2074
  }
2040
2075
  ) })
2041
2076
  ] }) }),
2042
- /* @__PURE__ */ C(E.Item, { shouldGrow: !0, shouldShrink: !0, children: [
2043
- /* @__PURE__ */ l(T, { as: "div", children: w || !b ? /* @__PURE__ */ l(
2044
- v,
2077
+ /* @__PURE__ */ _(M.Item, { shouldGrow: !0, shouldShrink: !0, children: [
2078
+ /* @__PURE__ */ i(C, { as: "div", children: w || !b ? /* @__PURE__ */ i(
2079
+ A,
2045
2080
  {
2046
2081
  weight: "bold",
2047
2082
  size: "medium",
@@ -2049,59 +2084,62 @@ function El({
2049
2084
  color: w ? "secondary" : "primary",
2050
2085
  "data-testid": "module-item-title",
2051
2086
  "data-locked": w ? "true" : void 0,
2052
- children: g
2087
+ children: h
2053
2088
  }
2054
- ) : /* @__PURE__ */ C(
2055
- _o,
2089
+ ) : /* @__PURE__ */ _(
2090
+ hn,
2056
2091
  {
2057
2092
  href: b,
2058
- onClick: _,
2093
+ onClick: z,
2059
2094
  forceButtonRole: !1,
2060
- variant: d,
2095
+ variant: a,
2061
2096
  target: e.newTab ? "_blank" : void 0,
2062
2097
  rel: e.newTab ? "noopener noreferrer" : void 0,
2063
2098
  children: [
2064
- /* @__PURE__ */ l(
2065
- v,
2099
+ /* @__PURE__ */ i(
2100
+ A,
2066
2101
  {
2067
2102
  weight: "bold",
2068
2103
  size: "medium",
2069
2104
  lineHeight: "condensed",
2070
2105
  color: "primary",
2071
2106
  "data-testid": "module-item-title",
2072
- children: g
2107
+ children: h
2073
2108
  }
2074
2109
  ),
2075
- e.newTab ? /* @__PURE__ */ l(it, { children: ` ${r("opensInNewWindow")}` }) : null
2110
+ e.newTab ? /* @__PURE__ */ i(lt, { children: ` ${s("opensInNewWindow")}` }) : null
2076
2111
  ]
2077
2112
  }
2078
2113
  ) }),
2079
- /* @__PURE__ */ l(T, { as: "div", children: /* @__PURE__ */ l(v, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: L.map((D, Y) => /* @__PURE__ */ C(sn, { children: [
2080
- Y > 0 ? /* @__PURE__ */ l("span", { style: Qn, children: " " }) : null,
2081
- /* @__PURE__ */ l("span", { style: Y > 0 ? c : void 0, children: D.node })
2082
- ] }, D.key)) }) })
2114
+ /* @__PURE__ */ i(C, { as: "div", children: /* @__PURE__ */ i(A, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: D.map((k, K) => /* @__PURE__ */ _(an, { children: [
2115
+ K > 0 ? /* @__PURE__ */ i("span", { style: no, children: " " }) : null,
2116
+ /* @__PURE__ */ i("span", { style: K > 0 ? c : void 0, children: k.node })
2117
+ ] }, k.key)) }) })
2083
2118
  ] }),
2084
- e.status ? /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ l(hl, { status: e.status }) }) : null
2119
+ E || e.status ? /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ _(M, { alignItems: "center", gap: "x-small", children: [
2120
+ E ? /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ i(Pl, {}) }) : null,
2121
+ e.status ? /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ i(wl, { status: e.status }) }) : null
2122
+ ] }) }) : null
2085
2123
  ] }) })
2086
2124
  }
2087
2125
  ) });
2088
2126
  }
2089
- const Cl = on(El), Qt = "\0", wl = { textDecoration: "underline dotted", cursor: "help" };
2090
- function Pl({ names: e }) {
2091
- const { t } = j();
2092
- if (e.length === 1) return /* @__PURE__ */ l(vt, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
2127
+ const Ol = ln(Nl), Xt = "\0", ql = { textDecoration: "underline dotted", cursor: "help" };
2128
+ function Fl({ names: e }) {
2129
+ const { t } = B();
2130
+ if (e.length === 1) return /* @__PURE__ */ i(xt, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
2093
2131
  const n = t("lockedByPrerequisitesByline", {
2094
2132
  count: e.length,
2095
- prerequisites: Qt
2096
- }), [o, ...s] = n.split(Qt), r = s.length > 0 ? s.join("") : null;
2097
- return /* @__PURE__ */ C(vt, { children: [
2133
+ prerequisites: Xt
2134
+ }), [o, ...s] = n.split(Xt), r = s.length > 0 ? s.join("") : null;
2135
+ return /* @__PURE__ */ _(xt, { children: [
2098
2136
  r === null ? null : o,
2099
- /* @__PURE__ */ l(pn, { renderTip: e.join(", "), children: /* @__PURE__ */ l(
2137
+ /* @__PURE__ */ i(In, { renderTip: e.join(", "), children: /* @__PURE__ */ i(
2100
2138
  "span",
2101
2139
  {
2102
2140
  tabIndex: 0,
2103
- style: wl,
2104
- onClick: (i) => i.stopPropagation(),
2141
+ style: ql,
2142
+ onClick: (l) => l.stopPropagation(),
2105
2143
  "data-testid": "module-byline-prerequisites",
2106
2144
  children: r === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
2107
2145
  }
@@ -2109,38 +2147,38 @@ function Pl({ names: e }) {
2109
2147
  r
2110
2148
  ] });
2111
2149
  }
2112
- function vl({ module: e, today: t }) {
2113
- var c;
2114
- const n = Ne(), o = Zn(), s = ((c = e.progress) == null ? void 0 : c.status) === "locked", r = e.unlockAt ?? null, i = e.prerequisiteModules.map((p) => p.name.trim()).filter((p) => p !== ""), a = r !== null && new Date(r) > t;
2115
- let d = null;
2116
- r !== null && a && (s || !e.progress) ? d = n.unlockByline(r, t) : r !== null && !a && !e.progress && (d = n.unlockedByline(r, t));
2117
- const u = s && i.length > 0;
2118
- return d === null && !u ? null : /* @__PURE__ */ l(T, { as: "div", margin: "xxx-small 0 0 0", children: /* @__PURE__ */ C(v, { size: "small", color: "secondary", "data-testid": "module-byline", children: [
2119
- d,
2120
- d !== null && u ? /* @__PURE__ */ l("span", { style: Qn, children: " " }) : null,
2121
- u ? /* @__PURE__ */ l("span", { style: d !== null ? o : void 0, children: /* @__PURE__ */ l(Pl, { names: i }) }) : null
2150
+ function Ul({ module: e, today: t }) {
2151
+ var d;
2152
+ const n = ke(), o = so(), s = ((d = e.progress) == null ? void 0 : d.status) === "locked", r = e.unlockAt ?? null, l = e.prerequisiteModules.map((m) => m.name.trim()).filter((m) => m !== ""), a = r !== null && new Date(r) > t;
2153
+ let u = null;
2154
+ r !== null && a && (s || !e.progress) ? u = n.unlockByline(r, t) : r !== null && !a && !e.progress && (u = n.unlockedByline(r, t));
2155
+ const c = s && l.length > 0;
2156
+ return u === null && !c ? null : /* @__PURE__ */ i(C, { as: "div", margin: "xxx-small 0 0 0", children: /* @__PURE__ */ _(A, { size: "small", color: "secondary", "data-testid": "module-byline", children: [
2157
+ u,
2158
+ u !== null && c ? /* @__PURE__ */ i("span", { style: no, children: " " }) : null,
2159
+ c ? /* @__PURE__ */ i("span", { style: u !== null ? o : void 0, children: /* @__PURE__ */ i(Fl, { names: l }) }) : null
2122
2160
  ] }) });
2123
2161
  }
2124
- const Al = "#273540", xl = "#D7DADE", Ll = "0.5rem", Rl = (e, t) => {
2125
- var n, o, s, r, i;
2162
+ const zl = "#273540", $l = "#D7DADE", Bl = "0.5rem", Gl = (e, t) => {
2163
+ var n, o, s, r, l;
2126
2164
  return {
2127
- meterColorBrand: ((o = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : o.grey125125) ?? Al,
2128
- borderRadius: String(((s = t.borders) == null ? void 0 : s.radiusLarge) ?? Ll),
2129
- borderColor: ((i = (r = t.colors) == null ? void 0 : r.contrasts) == null ? void 0 : i.grey1424) ?? xl,
2165
+ meterColorBrand: ((o = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : o.grey125125) ?? zl,
2166
+ borderRadius: String(((s = t.borders) == null ? void 0 : s.radiusLarge) ?? Bl),
2167
+ borderColor: ((l = (r = t.colors) == null ? void 0 : r.contrasts) == null ? void 0 : l.grey1424) ?? $l,
2130
2168
  trackBottomBorderColor: "transparent"
2131
2169
  };
2132
- }, kl = "66.667%", Nl = "8rem", Dl = 2;
2133
- function Ol({
2170
+ }, jl = "66.667%", Yl = "8rem", Hl = 2;
2171
+ function Wl({
2134
2172
  module: e,
2135
2173
  breakpoints: t
2136
2174
  }) {
2137
- const { t: n } = j(), o = Ne(), s = e.progress;
2175
+ const { t: n } = B(), o = ke(), s = e.progress;
2138
2176
  if (!s || s.status === "locked" || s.requirementCount <= 0) return null;
2139
- const r = t.mobileOnly, i = Object.keys(t).length === 0 || t.desktop === !0;
2140
- return /* @__PURE__ */ C(
2141
- E,
2177
+ const r = t.mobileOnly, l = Object.keys(t).length === 0 || t.desktop === !0;
2178
+ return /* @__PURE__ */ _(
2179
+ M,
2142
2180
  {
2143
- width: i ? kl : "100%",
2181
+ width: l ? jl : "100%",
2144
2182
  direction: r ? "column" : "row",
2145
2183
  alignItems: r ? "stretch" : "center",
2146
2184
  wrap: "wrap",
@@ -2148,8 +2186,8 @@ function Ol({
2148
2186
  margin: "small 0 0 0",
2149
2187
  "data-testid": "module-progress",
2150
2188
  children: [
2151
- /* @__PURE__ */ l(E.Item, { size: r ? void 0 : Nl, shouldGrow: !0, children: /* @__PURE__ */ l(
2152
- So,
2189
+ /* @__PURE__ */ i(M.Item, { size: r ? void 0 : Yl, shouldGrow: !0, children: /* @__PURE__ */ i(
2190
+ Ao,
2153
2191
  {
2154
2192
  size: "x-small",
2155
2193
  meterColor: "brand",
@@ -2157,16 +2195,16 @@ function Ol({
2157
2195
  valueMax: s.requirementCount,
2158
2196
  shouldAnimate: !1,
2159
2197
  screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
2160
- formatScreenReaderValue: () => Ai(
2198
+ formatScreenReaderValue: () => Fi(
2161
2199
  n,
2162
2200
  s.percentComplete,
2163
2201
  s.requirementsMet,
2164
2202
  s.requirementCount
2165
2203
  ),
2166
- themeOverride: Rl
2204
+ themeOverride: Gl
2167
2205
  }
2168
2206
  ) }),
2169
- /* @__PURE__ */ l(E.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ l(v, { size: "small", color: "secondary", children: o.progress(
2207
+ /* @__PURE__ */ i(M.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ i(A, { size: "small", color: "secondary", children: o.progress(
2170
2208
  s.percentComplete,
2171
2209
  s.requirementsMet,
2172
2210
  s.requirementCount
@@ -2175,45 +2213,44 @@ function Ol({
2175
2213
  }
2176
2214
  );
2177
2215
  }
2178
- const Vt = (e) => `platform-modules-panel-${e}`;
2216
+ const Jt = (e) => `platform-modules-panel-${e}`;
2179
2217
  function ft(e) {
2180
2218
  return e !== void 0 && e.type !== "sub_header";
2181
2219
  }
2182
- function Zt(e) {
2220
+ function en(e) {
2183
2221
  return ft(e) && e.indent > 0;
2184
2222
  }
2185
- function ql({
2223
+ function Kl({
2186
2224
  module: e,
2187
2225
  state: t,
2188
2226
  today: n,
2189
- navigation: o,
2190
- showDiagnostics: s
2227
+ showDiagnostics: o
2191
2228
  }) {
2192
- const { t: r } = j(), i = $(null), a = t.items.length, d = !t.isLoading && !t.isFetchingNextPage;
2193
- return Z(() => {
2194
- !d || a === 0 || i.current !== a && (i.current = a, pe(
2195
- r("itemsLoadedAnnouncement", {
2196
- loaded: a,
2229
+ const { t: s } = B(), r = $(null), l = t.items.length, a = !t.isLoading && !t.isFetchingNextPage;
2230
+ return te(() => {
2231
+ !a || l === 0 || r.current !== l && (r.current = l, he(
2232
+ s("itemsLoadedAnnouncement", {
2233
+ loaded: l,
2197
2234
  count: e.itemCount,
2198
2235
  name: e.name
2199
2236
  })
2200
2237
  ));
2201
- }, [d, a, e.itemCount, e.name, r]), t.error ? /* @__PURE__ */ l(T, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ l(
2202
- dn,
2238
+ }, [a, l, e.itemCount, e.name, s]), t.error ? /* @__PURE__ */ i(C, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ i(
2239
+ gn,
2203
2240
  {
2204
2241
  variant: "error",
2205
2242
  margin: "0",
2206
- liveRegion: un,
2243
+ liveRegion: pn,
2207
2244
  liveRegionPoliteness: "assertive",
2208
2245
  "data-testid": "items-error",
2209
- children: r("itemsLoadErrorAlert", { message: t.error.message })
2246
+ children: s("itemsLoadErrorAlert", { message: t.error.message })
2210
2247
  }
2211
- ) }) : t.isLoading ? /* @__PURE__ */ C(T, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
2212
- /* @__PURE__ */ l(rt, { size: "x-small", renderTitle: r("itemsLoadingSpinnerLabel") }),
2248
+ ) }) : t.isLoading ? /* @__PURE__ */ _(C, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
2249
+ /* @__PURE__ */ i(it, { size: "x-small", renderTitle: s("itemsLoadingSpinnerLabel") }),
2213
2250
  " ",
2214
- /* @__PURE__ */ l(v, { size: "small", color: "secondary", children: r("itemsLoadingText") })
2215
- ] }) : /* @__PURE__ */ C(T, { as: "div", margin: "small 0 0 0", children: [
2216
- s ? /* @__PURE__ */ C(v, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
2251
+ /* @__PURE__ */ i(A, { size: "small", color: "secondary", children: s("itemsLoadingText") })
2252
+ ] }) : /* @__PURE__ */ _(C, { as: "div", margin: "small 0 0 0", children: [
2253
+ o ? /* @__PURE__ */ _(A, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
2217
2254
  "items source: ",
2218
2255
  t.source,
2219
2256
  " · loaded ",
@@ -2221,24 +2258,23 @@ function ql({
2221
2258
  " of ",
2222
2259
  e.itemCount
2223
2260
  ] }) : null,
2224
- t.items.length === 0 ? /* @__PURE__ */ l(T, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ l(v, { size: "small", color: "secondary", children: r("noItemsEmptyState") }) }) : /* @__PURE__ */ l("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((u, c) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
2225
- Cl,
2261
+ t.items.length === 0 ? /* @__PURE__ */ i(C, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ i(A, { size: "small", color: "secondary", children: s("noItemsEmptyState") }) }) : /* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((u, c) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
2262
+ Ol,
2226
2263
  {
2227
2264
  item: u,
2228
2265
  today: n,
2229
- navigation: o,
2230
- attachedAbove: Zt(u) && ft(t.items[c - 1]),
2231
- attachedBelow: ft(u) && Zt(t.items[c + 1])
2266
+ attachedAbove: en(u) && ft(t.items[c - 1]),
2267
+ attachedBelow: ft(u) && en(t.items[c + 1])
2232
2268
  }
2233
2269
  ) }, u.id)) }),
2234
- t.hasNextPage ? /* @__PURE__ */ l(T, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ l(
2235
- ve,
2270
+ t.hasNextPage ? /* @__PURE__ */ i(C, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ i(
2271
+ Pe,
2236
2272
  {
2237
2273
  size: "small",
2238
2274
  onClick: t.fetchNextPage,
2239
2275
  interaction: t.isFetchingNextPage ? "disabled" : "enabled",
2240
2276
  "data-testid": "load-more-items",
2241
- children: t.isFetchingNextPage ? r("loadMoreItemsLoading") : r("loadMoreItems", {
2277
+ children: t.isFetchingNextPage ? s("loadMoreItemsLoading") : s("loadMoreItems", {
2242
2278
  loaded: t.items.length,
2243
2279
  count: e.itemCount
2244
2280
  })
@@ -2246,32 +2282,41 @@ function ql({
2246
2282
  ) }) : null
2247
2283
  ] });
2248
2284
  }
2249
- function Fl({
2285
+ function Ql({
2250
2286
  module: e,
2251
2287
  expanded: t,
2252
2288
  onToggle: n,
2253
2289
  itemsState: o,
2254
2290
  today: s,
2255
- navigation: r,
2256
- showDiagnostics: i = !1,
2257
- headingLevel: a = "h3",
2258
- moduleLabel: d,
2291
+ showDiagnostics: r = !1,
2292
+ headingLevel: l = "h3",
2293
+ moduleLabel: a,
2259
2294
  breakpoints: u = {}
2260
2295
  }) {
2261
- var _, A;
2262
- const { t: c } = j(), p = Ne(), f = ((_ = e.progress) == null ? void 0 : _.status) === "locked", y = d === void 0 ? p.moduleLabel(e.position, e) : d, g = (y == null ? void 0 : y.trim()) || null, b = u.mobileOnly === !0, w = () => {
2263
- var q;
2264
- (q = window.getSelection()) != null && q.toString().trim() || n(e.id);
2265
- }, x = (A = e.progress) != null && A.status ? /* @__PURE__ */ l(
2266
- gl,
2296
+ var q, W, k, K;
2297
+ const { t: c, timezone: d } = B(), m = ke(), { navigation: f } = ye(), S = eo(), h = ((q = e.progress) == null ? void 0 : q.status) === "locked", b = h ? null : ((W = f.getModuleHref) == null ? void 0 : W.call(f, e)) ?? null, w = a === void 0 ? m.moduleLabel(e.position, e) : a, E = (w == null ? void 0 : w.trim()) || null, P = E ? c("moduleNameWithLabel", { label: E, name: e.name }) : e.name, L = /* @__PURE__ */ i(
2298
+ fn,
2299
+ {
2300
+ level: l,
2301
+ variant: "titleCardRegular",
2302
+ color: h ? "secondary" : "primary",
2303
+ "aria-label": P,
2304
+ "data-testid": "module-name",
2305
+ children: /* @__PURE__ */ i(Po, { linesAllowed: Hl, children: P })
2306
+ }
2307
+ ), G = u.mobileOnly === !0, v = () => {
2308
+ var Q;
2309
+ (Q = window.getSelection()) != null && Q.toString().trim() || n(e.id);
2310
+ }, D = (k = e.progress) != null && k.status ? /* @__PURE__ */ i(
2311
+ Cl,
2267
2312
  {
2268
2313
  status: e.progress.status,
2269
2314
  missingCount: e.progress.missingCount,
2270
2315
  incompleteCount: e.progress.incompleteCount
2271
2316
  }
2272
- ) : null;
2273
- return /* @__PURE__ */ C(
2274
- T,
2317
+ ) : null, O = ((K = e.progress) == null ? void 0 : K.status) !== void 0 && e.progress.status !== "complete" && !h && yt(e.progress.nextDueAt, s, d) ? /* @__PURE__ */ i(vl, {}) : null;
2318
+ return /* @__PURE__ */ _(
2319
+ C,
2275
2320
  {
2276
2321
  as: "div",
2277
2322
  background: "primary",
@@ -2282,73 +2327,80 @@ function Fl({
2282
2327
  margin: "0 0 small 0",
2283
2328
  "data-testid": `module-card-${e.id}`,
2284
2329
  children: [
2285
- /* @__PURE__ */ l(T, { as: "div", cursor: "pointer", children: /* @__PURE__ */ C(
2286
- E,
2330
+ /* @__PURE__ */ i(C, { as: "div", cursor: "pointer", children: /* @__PURE__ */ _(
2331
+ M,
2287
2332
  {
2288
2333
  alignItems: "start",
2289
2334
  gap: "mediumSmall",
2290
- onClick: w,
2335
+ onClick: v,
2291
2336
  "data-testid": "module-header",
2292
2337
  children: [
2293
- /* @__PURE__ */ C(E.Item, { shouldGrow: !0, shouldShrink: !0, children: [
2294
- /* @__PURE__ */ C(T, { as: "div", children: [
2295
- /* @__PURE__ */ l(
2296
- mn,
2338
+ /* @__PURE__ */ _(M.Item, { shouldGrow: !0, shouldShrink: !0, children: [
2339
+ /* @__PURE__ */ _(C, { as: "div", children: [
2340
+ /* @__PURE__ */ i(C, { as: "div", children: b ? /* @__PURE__ */ i(
2341
+ hn,
2297
2342
  {
2298
- level: a,
2299
- variant: "titleCardRegular",
2300
- color: f ? "secondary" : "primary",
2301
- "data-testid": "module-name",
2302
- children: /* @__PURE__ */ l(yo, { linesAllowed: Dl, children: g ? c("moduleNameWithLabel", { label: g, name: e.name }) : e.name })
2343
+ href: b,
2344
+ display: "inline-block",
2345
+ forceButtonRole: !1,
2346
+ variant: S,
2347
+ "aria-label": P,
2348
+ onClick: (Q) => Q.stopPropagation(),
2349
+ children: L
2303
2350
  }
2304
- ),
2305
- e.published ? null : /* @__PURE__ */ C(v, { size: "x-small", color: "secondary", children: [
2351
+ ) : L }),
2352
+ e.published ? null : /* @__PURE__ */ _(A, { size: "x-small", color: "secondary", children: [
2306
2353
  " ",
2307
2354
  c("moduleUnpublishedBadge")
2308
2355
  ] })
2309
2356
  ] }),
2310
- /* @__PURE__ */ l(vl, { module: e, today: s }),
2311
- b && x ? /* @__PURE__ */ l(T, { as: "div", margin: "x-small 0 0 0", children: x }) : null,
2312
- /* @__PURE__ */ l(Ol, { module: e, breakpoints: u })
2357
+ /* @__PURE__ */ i(Ul, { module: e, today: s }),
2358
+ G && (D || O) ? /* @__PURE__ */ i(C, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ _(M, { gap: "x-small", wrap: "wrap", children: [
2359
+ O ? /* @__PURE__ */ i(M.Item, { children: O }) : null,
2360
+ D ? /* @__PURE__ */ i(M.Item, { children: D }) : null
2361
+ ] }) }) : null,
2362
+ /* @__PURE__ */ i(Wl, { module: e, breakpoints: u })
2313
2363
  ] }),
2314
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(E, { alignItems: "center", gap: "mediumSmall", children: [
2315
- !b && x ? /* @__PURE__ */ l(E.Item, { children: x }) : null,
2316
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ l(
2317
- Mo,
2364
+ /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ _(M, { alignItems: "center", gap: "mediumSmall", children: [
2365
+ !G && (O || D) ? /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ _(M, { alignItems: "center", gap: "x-small", children: [
2366
+ O ? /* @__PURE__ */ i(M.Item, { children: O }) : null,
2367
+ D ? /* @__PURE__ */ i(M.Item, { children: D }) : null
2368
+ ] }) }) : null,
2369
+ /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ i(
2370
+ vo,
2318
2371
  {
2319
2372
  size: "medium",
2320
2373
  withBorder: !0,
2321
2374
  withBackground: !1,
2322
2375
  screenReaderLabel: t ? c("collapseModule", { name: e.name }) : c("expandModule", { name: e.name }),
2323
2376
  "aria-expanded": t,
2324
- "aria-controls": Vt(e.id),
2325
- onClick: (q) => {
2326
- q.stopPropagation(), n(e.id);
2377
+ "aria-controls": Jt(e.id),
2378
+ onClick: (Q) => {
2379
+ Q.stopPropagation(), n(e.id);
2327
2380
  },
2328
2381
  "data-testid": `toggle-module-${e.id}`,
2329
- children: t ? /* @__PURE__ */ l(fo, {}) : /* @__PURE__ */ l(go, {})
2382
+ children: t ? /* @__PURE__ */ i(_o, {}) : /* @__PURE__ */ i(To, {})
2330
2383
  }
2331
2384
  ) })
2332
2385
  ] }) })
2333
2386
  ]
2334
2387
  }
2335
2388
  ) }),
2336
- /* @__PURE__ */ l("div", { id: Vt(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ l(
2337
- ql,
2389
+ /* @__PURE__ */ i("div", { id: Jt(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ i(
2390
+ Kl,
2338
2391
  {
2339
2392
  module: e,
2340
2393
  state: o,
2341
2394
  today: s,
2342
- navigation: r,
2343
- showDiagnostics: i
2395
+ showDiagnostics: r
2344
2396
  }
2345
2397
  ) : null })
2346
2398
  ]
2347
2399
  }
2348
2400
  );
2349
2401
  }
2350
- const Ul = on(Fl);
2351
- function zl(e) {
2402
+ const Vl = ln(Ql);
2403
+ function Zl(e) {
2352
2404
  switch (e) {
2353
2405
  case "complete":
2354
2406
  return "complete";
@@ -2364,11 +2416,11 @@ function zl(e) {
2364
2416
  return "inProgress";
2365
2417
  }
2366
2418
  }
2367
- function $l(e) {
2368
- var i, a, d;
2419
+ function Xl(e) {
2420
+ var l, a, u;
2369
2421
  let t = 0, n = 0, o = 0;
2370
- for (const u of e)
2371
- ((i = u.progress) == null ? void 0 : i.status) === "complete" && (t += 1), n += ((a = u.progress) == null ? void 0 : a.requirementCount) ?? 0, o += ((d = u.progress) == null ? void 0 : d.requirementsMet) ?? 0;
2422
+ for (const c of e)
2423
+ ((l = c.progress) == null ? void 0 : l.status) === "complete" && (t += 1), n += ((a = c.progress) == null ? void 0 : a.requirementCount) ?? 0, o += ((u = c.progress) == null ? void 0 : u.requirementsMet) ?? 0;
2372
2424
  const s = e.length, r = s === 0 ? 0 : t === s ? 100 : Math.floor(t / s * 100);
2373
2425
  return {
2374
2426
  totalModules: s,
@@ -2378,30 +2430,30 @@ function $l(e) {
2378
2430
  percent: r
2379
2431
  };
2380
2432
  }
2381
- const Bl = "1.75rem", Gl = "4px", jl = "4px", Yl = "6.5rem";
2382
- function Wl({
2433
+ const Jl = "1.75rem", ea = "4px", ta = "4px", na = "6.5rem";
2434
+ function oa({
2383
2435
  module: e,
2384
2436
  onClick: t
2385
2437
  }) {
2386
- var c, p, f, y;
2387
- const { t: n } = j(), s = Ne().moduleLabel(e.position, e), r = s ? n("moduleNameWithLabel", { label: s, name: e.name }) : e.name, i = ((c = e.progress) == null ? void 0 : c.status) ?? "not_started", a = zl(i), d = n("moduleProgressSegmentLabel", {
2438
+ var d, m, f, S;
2439
+ const { t: n } = B(), s = ke().moduleLabel(e.position, e), r = s ? n("moduleNameWithLabel", { label: s, name: e.name }) : e.name, l = ((d = e.progress) == null ? void 0 : d.status) ?? "not_started", a = Zl(l), u = n("moduleProgressSegmentLabel", {
2388
2440
  name: r,
2389
- status: Wn(
2441
+ status: Jn(
2390
2442
  n,
2391
- i,
2392
- ((p = e.progress) == null ? void 0 : p.missingCount) ?? 0,
2443
+ l,
2444
+ ((m = e.progress) == null ? void 0 : m.missingCount) ?? 0,
2393
2445
  ((f = e.progress) == null ? void 0 : f.incompleteCount) ?? 0
2394
2446
  )
2395
- }), u = a === "complete" ? 100 : a === "inProgress" ? ((y = e.progress) == null ? void 0 : y.percentComplete) ?? 0 : 0;
2396
- return /* @__PURE__ */ l(E.Item, { shouldShrink: !0, width: Yl, children: /* @__PURE__ */ l(pn, { renderTip: r, children: () => /* @__PURE__ */ C(
2397
- T,
2447
+ }), c = a === "complete" ? 100 : a === "inProgress" ? ((S = e.progress) == null ? void 0 : S.percentComplete) ?? 0 : 0;
2448
+ return /* @__PURE__ */ i(M.Item, { shouldShrink: !0, width: na, children: /* @__PURE__ */ i(In, { renderTip: r, children: () => /* @__PURE__ */ _(
2449
+ C,
2398
2450
  {
2399
2451
  as: "button",
2400
2452
  type: "button",
2401
2453
  display: "block",
2402
2454
  width: "100%",
2403
- height: Bl,
2404
- borderRadius: Gl,
2455
+ height: Jl,
2456
+ borderRadius: ea,
2405
2457
  borderWidth: a === "complete" ? "none" : "small",
2406
2458
  borderColor: "secondary",
2407
2459
  background: a === "locked" ? "secondary" : "primary",
@@ -2412,44 +2464,44 @@ function Wl({
2412
2464
  onClick: t ? () => t(e.id) : void 0,
2413
2465
  "data-testid": `modules-progress-segment-${e.id}`,
2414
2466
  children: [
2415
- u > 0 ? /* @__PURE__ */ l(
2416
- T,
2467
+ c > 0 ? /* @__PURE__ */ i(
2468
+ C,
2417
2469
  {
2418
2470
  as: "div",
2419
2471
  position: "absolute",
2420
2472
  insetInlineStart: "0",
2421
2473
  insetInlineEnd: "0",
2422
2474
  insetBlockEnd: "0",
2423
- height: `${u}%`,
2475
+ height: `${c}%`,
2424
2476
  background: "brand"
2425
2477
  }
2426
2478
  ) : null,
2427
- /* @__PURE__ */ l(it, { children: d })
2479
+ /* @__PURE__ */ i(lt, { children: u })
2428
2480
  ]
2429
2481
  }
2430
2482
  ) }) });
2431
2483
  }
2432
- function Hl({
2484
+ function sa({
2433
2485
  modules: e,
2434
2486
  onModuleClick: t
2435
2487
  }) {
2436
- const { t: n } = j(), o = N(() => $l(e), [e]);
2488
+ const { t: n } = B(), o = N(() => Xl(e), [e]);
2437
2489
  if (!e.some((a) => a.progress !== void 0) || o.totalModules === 0) return null;
2438
2490
  const r = n("moduleProgressOverviewSummary", {
2439
2491
  count: o.totalModules,
2440
2492
  completedModules: o.completedModules,
2441
2493
  totalModules: o.totalModules
2442
- }), i = o.totalItems > 0 ? n("moduleProgressOverviewDetail", {
2494
+ }), l = o.totalItems > 0 ? n("moduleProgressOverviewDetail", {
2443
2495
  itemsSummary: n("moduleProgressOverviewItemsSummary", {
2444
2496
  count: o.totalItems,
2445
2497
  completedItems: o.completedItems,
2446
2498
  totalItems: o.totalItems
2447
2499
  })
2448
2500
  }) : null;
2449
- return /* @__PURE__ */ C(T, { as: "div", margin: "medium 0 small 0", "data-testid": "modules-progress-overview", children: [
2450
- /* @__PURE__ */ l(E, { wrap: "wrap", children: /* @__PURE__ */ C(E.Item, { children: [
2451
- /* @__PURE__ */ l(T, { as: "span", margin: "0 x-small 0 0", children: /* @__PURE__ */ l(
2452
- v,
2501
+ return /* @__PURE__ */ _(C, { as: "div", margin: "medium 0 small 0", "data-testid": "modules-progress-overview", children: [
2502
+ /* @__PURE__ */ i(M, { wrap: "wrap", children: /* @__PURE__ */ _(M.Item, { children: [
2503
+ /* @__PURE__ */ i(C, { as: "span", margin: "0 x-small 0 0", children: /* @__PURE__ */ i(
2504
+ A,
2453
2505
  {
2454
2506
  size: "large",
2455
2507
  weight: "bold",
@@ -2458,29 +2510,29 @@ function Hl({
2458
2510
  children: n("moduleProgressOverviewPercentLabel", { percent: o.percent })
2459
2511
  }
2460
2512
  ) }),
2461
- /* @__PURE__ */ l(v, { size: "medium", "data-testid": "modules-progress-overview-summary", children: i ? `${r} ${i}` : r })
2513
+ /* @__PURE__ */ i(A, { size: "medium", "data-testid": "modules-progress-overview-summary", children: l ? `${r} ${l}` : r })
2462
2514
  ] }) }),
2463
- /* @__PURE__ */ l(
2464
- E,
2515
+ /* @__PURE__ */ i(
2516
+ M,
2465
2517
  {
2466
2518
  margin: "xx-small 0 0 0",
2467
- gap: jl,
2519
+ gap: ta,
2468
2520
  role: "group",
2469
2521
  "aria-label": n("moduleProgressOverviewGroupLabel"),
2470
2522
  "data-testid": "modules-progress-overview-segments",
2471
- children: e.map((a) => /* @__PURE__ */ l(Wl, { module: a, onClick: t }, a.id))
2523
+ children: e.map((a) => /* @__PURE__ */ i(oa, { module: a, onClick: t }, a.id))
2472
2524
  }
2473
2525
  )
2474
2526
  ] });
2475
2527
  }
2476
- function Kl({
2528
+ function ra({
2477
2529
  counts: e,
2478
2530
  itemsMode: t,
2479
2531
  loadedModules: n
2480
2532
  }) {
2481
2533
  const o = e.listModules + e.listModuleItems;
2482
- return /* @__PURE__ */ l(
2483
- T,
2534
+ return /* @__PURE__ */ i(
2535
+ C,
2484
2536
  {
2485
2537
  as: "div",
2486
2538
  background: "secondary",
@@ -2489,25 +2541,25 @@ function Kl({
2489
2541
  padding: "x-small small",
2490
2542
  margin: "0 0 small 0",
2491
2543
  "data-testid": "dev-diagnostics",
2492
- children: /* @__PURE__ */ C(E, { gap: "medium", wrap: "wrap", children: [
2493
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ l(v, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
2494
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(v, { size: "x-small", "data-testid": "request-count-list-modules", children: [
2544
+ children: /* @__PURE__ */ _(M, { gap: "medium", wrap: "wrap", children: [
2545
+ /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ i(A, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
2546
+ /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ _(A, { size: "x-small", "data-testid": "request-count-list-modules", children: [
2495
2547
  "listModules: ",
2496
2548
  e.listModules
2497
2549
  ] }) }),
2498
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(v, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
2550
+ /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ _(A, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
2499
2551
  "listModuleItems: ",
2500
2552
  e.listModuleItems
2501
2553
  ] }) }),
2502
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(v, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
2554
+ /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ _(A, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
2503
2555
  "total: ",
2504
2556
  o
2505
2557
  ] }) }),
2506
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(v, { size: "x-small", "data-testid": "resolved-items-mode", children: [
2558
+ /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ _(A, { size: "x-small", "data-testid": "resolved-items-mode", children: [
2507
2559
  "itemsMode: ",
2508
2560
  t ?? "probing…"
2509
2561
  ] }) }),
2510
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(v, { size: "x-small", "data-testid": "modules-loaded-count", children: [
2562
+ /* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ _(A, { size: "x-small", "data-testid": "modules-loaded-count", children: [
2511
2563
  "modules loaded: ",
2512
2564
  n
2513
2565
  ] }) })
@@ -2515,190 +2567,189 @@ function Kl({
2515
2567
  }
2516
2568
  );
2517
2569
  }
2518
- const Ql = 200;
2519
- function Vl({
2570
+ const ia = 200;
2571
+ function la({
2520
2572
  data: e,
2521
2573
  courseName: t,
2522
2574
  courseContext: n,
2523
2575
  today: o,
2524
2576
  requestCounts: s,
2525
2577
  showDiagnostics: r = s !== void 0,
2526
- navigation: i,
2527
- as: a = "div",
2528
- headingLevel: d = "h2",
2578
+ as: l = "div",
2579
+ headingLevel: a = "h2",
2529
2580
  breakpoints: u = {}
2530
2581
  }) {
2531
- const { miniTablet: c, tablet: p, desktop: f, desktopNavOpen: y, desktopOnly: g, mobileOnly: b, ICEDesktop: w } = u, x = N(
2532
- () => ({ miniTablet: c, tablet: p, desktop: f, desktopNavOpen: y, desktopOnly: g, mobileOnly: b, ICEDesktop: w }),
2533
- [c, p, f, y, g, b, w]
2582
+ const { miniTablet: c, tablet: d, desktop: m, desktopNavOpen: f, desktopOnly: S, mobileOnly: h, ICEDesktop: b } = u, w = N(
2583
+ () => ({ miniTablet: c, tablet: d, desktop: m, desktopNavOpen: f, desktopOnly: S, mobileOnly: h, ICEDesktop: b }),
2584
+ [c, d, m, f, S, h, b]
2534
2585
  ), {
2535
- modules: _,
2536
- hasNextPage: A,
2537
- fetchNextPage: q,
2538
- isFetchingNextPage: B,
2539
- isLoading: L,
2540
- isRefreshing: k,
2541
- error: G,
2542
- itemsMode: J,
2543
- expandedModuleIds: F,
2544
- expandModule: D,
2545
- collapseModule: Y,
2546
- toggleModule: se,
2547
- expandModules: De,
2548
- collapseModules: Oe,
2549
- getItems: Me,
2550
- filter: ee,
2551
- setFilter: ye,
2552
- filterEntry: qe,
2553
- filterPredicate: re,
2554
- filterResultsArePartial: ie
2555
- } = e, { t: P, timezone: Fe } = j(), Ue = t ?? P("pageTitle"), W = $(null), Se = $(/* @__PURE__ */ new Map()), le = st(), H = st(), ze = b === !0, ae = $(!1), $e = U((S) => {
2556
- var z;
2557
- (z = Se.current.get(S)) == null || z.scrollIntoView({ behavior: "smooth", block: "start" });
2558
- }, []), [Be] = V(() => /* @__PURE__ */ new Date()), _e = o ?? Be, [Te, Ge] = V(null);
2559
- Z(() => {
2560
- !A && !k && ee === X && Ge(_);
2561
- }, [A, k, ee, _]), Z(() => {
2562
- var S;
2563
- !ae.current || B || k || (ae.current = !1, pe(P("modulesLoadedAnnouncement", { count: _.length })), (S = W.current) == null || S.focus());
2564
- }, [B, k, _.length, P]);
2565
- const h = N(
2566
- () => _.filter(
2567
- (S) => re === void 0 || re(S, { today: _e, timezone: Fe })
2586
+ modules: E,
2587
+ hasNextPage: P,
2588
+ fetchNextPage: z,
2589
+ isFetchingNextPage: L,
2590
+ isLoading: G,
2591
+ isRefreshing: v,
2592
+ error: D,
2593
+ itemsMode: H,
2594
+ expandedModuleIds: O,
2595
+ expandModule: q,
2596
+ collapseModule: W,
2597
+ toggleModule: k,
2598
+ expandModules: K,
2599
+ collapseModules: Q,
2600
+ getItems: re,
2601
+ filter: ie,
2602
+ setFilter: Te,
2603
+ filterEntry: De,
2604
+ filterPredicate: le,
2605
+ filterResultsArePartial: Ee
2606
+ } = e, { t: x, timezone: V } = B(), Ne = t ?? x("pageTitle"), Oe = $(null), Z = $(/* @__PURE__ */ new Map()), qe = rt(), ae = rt(), J = h === !0, ce = $(!1), nt = F((y) => {
2607
+ var U;
2608
+ (U = Z.current.get(y)) == null || U.scrollIntoView({ behavior: "smooth", block: "start" });
2609
+ }, []), [Fe] = ee(() => /* @__PURE__ */ new Date()), ue = o ?? Fe, [Ue, ze] = ee(null);
2610
+ te(() => {
2611
+ !P && !v && ie === ne && ze(E);
2612
+ }, [P, v, ie, E]), te(() => {
2613
+ var y;
2614
+ !ce.current || L || v || (ce.current = !1, he(x("modulesLoadedAnnouncement", { count: E.length })), (y = Oe.current) == null || y.focus());
2615
+ }, [L, v, E.length, x]);
2616
+ const de = N(
2617
+ () => E.filter(
2618
+ (y) => le === void 0 || le(y, { today: ue, timezone: V })
2568
2619
  ),
2569
- [_, re, _e, Fe]
2570
- ), M = $({
2571
- rows: h,
2572
- expanded: F,
2620
+ [E, le, ue, V]
2621
+ ), I = $({
2622
+ rows: de,
2623
+ expanded: O,
2573
2624
  items: /* @__PURE__ */ new Map()
2574
- }), [I, R] = V(null);
2575
- k ? I === null && R(M.current) : (M.current = {
2576
- rows: h,
2577
- expanded: F,
2578
- items: new Map(F.map((S) => [S, Me(S)]))
2579
- }, I !== null && R(null));
2580
- const O = (I == null ? void 0 : I.rows) ?? h, ce = (I == null ? void 0 : I.expanded) ?? F, K = N(() => new Set(ce), [ce]), te = N(
2581
- () => O.filter((S) => K.has(S.id)).map((S) => S.id),
2582
- [O, K]
2583
- ), Ee = te.length > 0, [ue, Q] = V(!1), Ce = te.filter((S) => Me(S).isLoading).length, je = ue ? Ce : 0, de = $(!1);
2584
- Z(() => {
2585
- if (ue) {
2586
- if (Ce > 0 && !de.current) {
2587
- de.current = !0, pe(P("expandAllLoadingItems", { count: Ce }));
2625
+ }), [g, T] = ee(null);
2626
+ v ? g === null && T(I.current) : (I.current = {
2627
+ rows: de,
2628
+ expanded: O,
2629
+ items: new Map(O.map((y) => [y, re(y)]))
2630
+ }, g !== null && T(null));
2631
+ const R = (g == null ? void 0 : g.rows) ?? de, j = (g == null ? void 0 : g.expanded) ?? O, Ce = N(() => new Set(j), [j]), Y = N(
2632
+ () => R.filter((y) => Ce.has(y.id)).map((y) => y.id),
2633
+ [R, Ce]
2634
+ ), $e = Y.length > 0, [me, pe] = ee(!1), X = Y.filter((y) => re(y).isLoading).length, Be = me ? X : 0, ge = $(!1);
2635
+ te(() => {
2636
+ if (me) {
2637
+ if (X > 0 && !ge.current) {
2638
+ ge.current = !0, he(x("expandAllLoadingItems", { count: X }));
2588
2639
  return;
2589
2640
  }
2590
- Ce === 0 && de.current && (de.current = !1, Q(!1), pe(P("expandAllItemsLoaded")));
2641
+ X === 0 && ge.current && (ge.current = !1, pe(!1), he(x("expandAllItemsLoaded")));
2591
2642
  }
2592
- }, [ue, Ce, P]);
2593
- const eo = () => {
2594
- if (Ee) {
2595
- const z = new Set(te);
2596
- Q(!1), de.current = !1, Oe(te), I !== null && R({ ...I, expanded: I.expanded.filter((Ye) => !z.has(Ye)) }), pe(P("modulesCollapsedAnnouncement", { count: te.length }));
2643
+ }, [me, X, x]);
2644
+ const lo = () => {
2645
+ if ($e) {
2646
+ const U = new Set(Y);
2647
+ pe(!1), ge.current = !1, Q(Y), g !== null && T({ ...g, expanded: g.expanded.filter((Ge) => !U.has(Ge)) }), he(x("modulesCollapsedAnnouncement", { count: Y.length }));
2597
2648
  return;
2598
2649
  }
2599
- const S = O.map((z) => z.id);
2600
- Q(!0), de.current = !1, De(S), I !== null && R({ ...I, expanded: S }), pe(P("modulesExpandedAnnouncement", { count: S.length }));
2601
- }, Tt = $(I);
2602
- Tt.current = I;
2603
- const to = U(
2604
- (S) => {
2605
- const z = Tt.current;
2606
- if (z === null) {
2607
- se(S);
2650
+ const y = R.map((U) => U.id);
2651
+ pe(!0), ge.current = !1, K(y), g !== null && T({ ...g, expanded: y }), he(x("modulesExpandedAnnouncement", { count: y.length }));
2652
+ }, Ct = $(g);
2653
+ Ct.current = g;
2654
+ const ao = F(
2655
+ (y) => {
2656
+ const U = Ct.current;
2657
+ if (U === null) {
2658
+ k(y);
2608
2659
  return;
2609
2660
  }
2610
- const Ye = z.expanded.includes(S);
2611
- R({
2612
- ...z,
2613
- expanded: Ye ? z.expanded.filter((so) => so !== S) : [...z.expanded, S]
2614
- }), Ye ? Y(S) : D(S);
2661
+ const Ge = U.expanded.includes(y);
2662
+ T({
2663
+ ...U,
2664
+ expanded: Ge ? U.expanded.filter((mo) => mo !== y) : [...U.expanded, y]
2665
+ }), Ge ? W(y) : q(y);
2615
2666
  },
2616
- [se, Y, D]
2617
- ), [no, Et] = V(!1);
2618
- Z(() => {
2619
- if (!k) {
2620
- Et(!1);
2667
+ [k, W, q]
2668
+ ), [co, wt] = ee(!1);
2669
+ te(() => {
2670
+ if (!v) {
2671
+ wt(!1);
2621
2672
  return;
2622
2673
  }
2623
- const S = setTimeout(() => Et(!0), Ql);
2624
- return () => clearTimeout(S);
2625
- }, [k]);
2626
- const Ct = qe !== void 0 && ee !== X, wt = L || k && O.length === 0, Pt = O.length === 0 && !wt && !G, oo = Pt && Ct;
2627
- return /* @__PURE__ */ C(T, { as: a, display: "block", "data-testid": "modules-list", children: [
2628
- n ? /* @__PURE__ */ C(T, { as: "div", children: [
2629
- /* @__PURE__ */ l(v, { size: "small", color: "brand", children: n }),
2630
- /* @__PURE__ */ C(v, { size: "small", color: "secondary", children: [
2674
+ const y = setTimeout(() => wt(!0), ia);
2675
+ return () => clearTimeout(y);
2676
+ }, [v]);
2677
+ const vt = De !== void 0 && ie !== ne, Pt = G || v && R.length === 0, At = R.length === 0 && !Pt && !D, uo = At && vt;
2678
+ return /* @__PURE__ */ _(C, { as: l, display: "block", "data-testid": "modules-list", children: [
2679
+ n ? /* @__PURE__ */ _(C, { as: "div", children: [
2680
+ /* @__PURE__ */ i(A, { size: "small", color: "brand", children: n }),
2681
+ /* @__PURE__ */ _(A, { size: "small", color: "secondary", children: [
2631
2682
  " ",
2632
2683
  "/",
2633
2684
  " "
2634
2685
  ] }),
2635
- /* @__PURE__ */ l(v, { size: "small", color: "secondary", children: Ue })
2686
+ /* @__PURE__ */ i(A, { size: "small", color: "secondary", children: Ne })
2636
2687
  ] }) : null,
2637
- /* @__PURE__ */ l(mn, { level: d, margin: "x-small 0 medium 0", children: Ue }),
2638
- Te ? /* @__PURE__ */ l(Hl, { modules: Te, onModuleClick: $e }) : null,
2639
- r && s ? /* @__PURE__ */ l(
2640
- Kl,
2688
+ /* @__PURE__ */ i(fn, { level: a, margin: "x-small 0 medium 0", children: Ne }),
2689
+ Ue ? /* @__PURE__ */ i(sa, { modules: Ue, onModuleClick: nt }) : null,
2690
+ r && s ? /* @__PURE__ */ i(
2691
+ ra,
2641
2692
  {
2642
2693
  counts: s,
2643
- itemsMode: J,
2644
- loadedModules: _.length
2694
+ itemsMode: H,
2695
+ loadedModules: E.length
2645
2696
  }
2646
2697
  ) : null,
2647
- /* @__PURE__ */ l(E, { justifyItems: "end", "data-testid": "modules-controls", children: /* @__PURE__ */ l(E.Item, { shouldGrow: ze, children: /* @__PURE__ */ l(
2648
- ve,
2698
+ /* @__PURE__ */ i(M, { justifyItems: "end", "data-testid": "modules-controls", children: /* @__PURE__ */ i(M.Item, { shouldGrow: J, children: /* @__PURE__ */ i(
2699
+ Pe,
2649
2700
  {
2650
- display: ze ? "block" : "inline-block",
2651
- onClick: eo,
2652
- interaction: O.length === 0 ? "disabled" : "enabled",
2653
- renderIcon: je > 0 ? /* @__PURE__ */ l(rt, { size: "x-small", renderTitle: P("itemsLoadingSpinnerLabel") }) : void 0,
2654
- "aria-describedby": je > 0 ? H : void 0,
2701
+ display: J ? "block" : "inline-block",
2702
+ onClick: lo,
2703
+ interaction: R.length === 0 ? "disabled" : "enabled",
2704
+ renderIcon: Be > 0 ? /* @__PURE__ */ i(it, { size: "x-small", renderTitle: x("itemsLoadingSpinnerLabel") }) : void 0,
2705
+ "aria-describedby": Be > 0 ? ae : void 0,
2655
2706
  "data-testid": "expand-collapse-all",
2656
- children: P(Ee ? "collapseAllModules" : "expandAllModules")
2707
+ children: x($e ? "collapseAllModules" : "expandAllModules")
2657
2708
  }
2658
2709
  ) }) }),
2659
- je > 0 ? /* @__PURE__ */ l(T, { as: "div", margin: "xx-small 0 0 0", textAlign: "end", children: /* @__PURE__ */ l(
2660
- v,
2710
+ Be > 0 ? /* @__PURE__ */ i(C, { as: "div", margin: "xx-small 0 0 0", textAlign: "end", children: /* @__PURE__ */ i(
2711
+ A,
2661
2712
  {
2662
2713
  size: "x-small",
2663
2714
  color: "secondary",
2664
- id: H,
2715
+ id: ae,
2665
2716
  "data-testid": "expand-all-loading-hint",
2666
- children: P("expandAllLoadingItems", { count: je })
2717
+ children: x("expandAllLoadingItems", { count: Be })
2667
2718
  }
2668
2719
  ) }) : null,
2669
- /* @__PURE__ */ l(
2670
- el,
2720
+ /* @__PURE__ */ i(
2721
+ cl,
2671
2722
  {
2672
- value: ee,
2673
- onChange: ye,
2674
- describedBy: ie ? le : void 0
2723
+ value: ie,
2724
+ onChange: Te,
2725
+ describedBy: Ee ? qe : void 0
2675
2726
  }
2676
2727
  ),
2677
- ie ? /* @__PURE__ */ l(T, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ l(
2678
- v,
2728
+ Ee ? /* @__PURE__ */ i(C, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ i(
2729
+ A,
2679
2730
  {
2680
2731
  size: "x-small",
2681
2732
  color: "secondary",
2682
- id: le,
2733
+ id: qe,
2683
2734
  "data-testid": "filter-partial-hint",
2684
- children: P("filterScopeHint")
2735
+ children: x("filterScopeHint")
2685
2736
  }
2686
2737
  ) }) : null,
2687
- /* @__PURE__ */ C(T, { as: "div", margin: "medium 0 0 0", children: [
2688
- G ? /* @__PURE__ */ l(
2689
- dn,
2738
+ /* @__PURE__ */ _(C, { as: "div", margin: "medium 0 0 0", children: [
2739
+ D ? /* @__PURE__ */ i(
2740
+ gn,
2690
2741
  {
2691
2742
  variant: "error",
2692
2743
  margin: "0 0 small 0",
2693
- liveRegion: un,
2744
+ liveRegion: pn,
2694
2745
  liveRegionPoliteness: "assertive",
2695
2746
  "data-testid": "modules-error",
2696
- children: P("modulesLoadErrorAlert", { message: G.message })
2747
+ children: x("modulesLoadErrorAlert", { message: D.message })
2697
2748
  }
2698
2749
  ) : null,
2699
- wt ? /* @__PURE__ */ l(T, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ l(rt, { renderTitle: P("modulesLoadingSpinnerLabel") }) }) : null,
2700
- Pt && !Ct ? /* @__PURE__ */ l(
2701
- T,
2750
+ Pt ? /* @__PURE__ */ i(C, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ i(it, { renderTitle: x("modulesLoadingSpinnerLabel") }) }) : null,
2751
+ At && !vt ? /* @__PURE__ */ i(
2752
+ C,
2702
2753
  {
2703
2754
  as: "div",
2704
2755
  background: "secondary",
@@ -2706,11 +2757,11 @@ function Vl({
2706
2757
  padding: "large",
2707
2758
  textAlign: "center",
2708
2759
  "data-testid": "modules-empty",
2709
- children: /* @__PURE__ */ l(v, { color: "secondary", children: P("noModulesEmptyState") })
2760
+ children: /* @__PURE__ */ i(A, { color: "secondary", children: x("noModulesEmptyState") })
2710
2761
  }
2711
2762
  ) : null,
2712
- oo ? /* @__PURE__ */ C(
2713
- T,
2763
+ uo ? /* @__PURE__ */ _(
2764
+ C,
2714
2765
  {
2715
2766
  as: "div",
2716
2767
  background: "secondary",
@@ -2719,80 +2770,79 @@ function Vl({
2719
2770
  textAlign: "center",
2720
2771
  "data-testid": "modules-filtered-empty",
2721
2772
  children: [
2722
- /* @__PURE__ */ l(T, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ l(v, { color: "secondary", children: _.length === 0 ? P("noFilterMatches") : P("filteredEmptyState", { count: _.length }) }) }),
2723
- /* @__PURE__ */ l(
2724
- ve,
2773
+ /* @__PURE__ */ i(C, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ i(A, { color: "secondary", children: E.length === 0 ? x("noFilterMatches") : x("filteredEmptyState", { count: E.length }) }) }),
2774
+ /* @__PURE__ */ i(
2775
+ Pe,
2725
2776
  {
2726
2777
  size: "small",
2727
2778
  onClick: () => {
2728
- ye(X), ae.current = !0;
2779
+ Te(ne), ce.current = !0;
2729
2780
  },
2730
- children: P("clearFilters")
2781
+ children: x("clearFilters")
2731
2782
  }
2732
2783
  )
2733
2784
  ]
2734
2785
  }
2735
2786
  ) : null,
2736
- /* @__PURE__ */ l(
2787
+ /* @__PURE__ */ i(
2737
2788
  "ul",
2738
2789
  {
2739
- style: { listStyle: "none", margin: 0, padding: 0, opacity: no ? 0.5 : 1 },
2740
- "aria-busy": k,
2790
+ style: { listStyle: "none", margin: 0, padding: 0, opacity: co ? 0.5 : 1 },
2791
+ "aria-busy": v,
2741
2792
  "data-testid": "modules-stack",
2742
- children: O.map((S) => /* @__PURE__ */ l(
2793
+ children: R.map((y) => /* @__PURE__ */ i(
2743
2794
  "li",
2744
2795
  {
2745
- ref: (z) => {
2746
- z ? Se.current.set(S.id, z) : Se.current.delete(S.id);
2796
+ ref: (U) => {
2797
+ U ? Z.current.set(y.id, U) : Z.current.delete(y.id);
2747
2798
  },
2748
- children: /* @__PURE__ */ l(
2749
- Ul,
2799
+ children: /* @__PURE__ */ i(
2800
+ Vl,
2750
2801
  {
2751
- module: S,
2752
- expanded: ce.includes(S.id),
2753
- onToggle: to,
2754
- itemsState: (I == null ? void 0 : I.items.get(S.id)) ?? Me(S.id),
2755
- today: _e,
2802
+ module: y,
2803
+ expanded: j.includes(y.id),
2804
+ onToggle: ao,
2805
+ itemsState: (g == null ? void 0 : g.items.get(y.id)) ?? re(y.id),
2806
+ today: ue,
2756
2807
  showDiagnostics: r,
2757
- navigation: i,
2758
- headingLevel: d === "h1" ? "h2" : "h3",
2759
- breakpoints: x
2808
+ headingLevel: a === "h1" ? "h2" : "h3",
2809
+ breakpoints: w
2760
2810
  }
2761
2811
  )
2762
2812
  },
2763
- S.id
2813
+ y.id
2764
2814
  ))
2765
2815
  }
2766
2816
  )
2767
2817
  ] }),
2768
- A ? /* @__PURE__ */ l(T, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ l(
2769
- ve,
2818
+ P ? /* @__PURE__ */ i(C, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
2819
+ Pe,
2770
2820
  {
2771
2821
  color: "primary",
2772
2822
  onClick: () => {
2773
- ae.current = !0, q();
2823
+ ce.current = !0, z();
2774
2824
  },
2775
- interaction: B || k ? "disabled" : "enabled",
2825
+ interaction: L || v ? "disabled" : "enabled",
2776
2826
  "data-testid": "load-more-modules",
2777
- children: B ? P("loadMoreModulesLoading") : P("loadMoreModules", { count: _.length })
2827
+ children: L ? x("loadMoreModulesLoading") : x("loadMoreModules", { count: E.length })
2778
2828
  }
2779
- ) }) : _.length > 0 ? /* @__PURE__ */ l(T, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ l(
2780
- v,
2829
+ ) }) : E.length > 0 ? /* @__PURE__ */ i(C, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
2830
+ A,
2781
2831
  {
2782
2832
  size: "x-small",
2783
2833
  color: "secondary",
2784
2834
  "data-testid": "modules-all-loaded",
2785
- elementRef: (S) => {
2786
- W.current = S;
2835
+ elementRef: (y) => {
2836
+ Oe.current = y;
2787
2837
  },
2788
2838
  tabIndex: -1,
2789
- children: P("allModulesLoaded", { count: _.length })
2839
+ children: x("allModulesLoaded", { count: E.length })
2790
2840
  }
2791
2841
  ) }) : null
2792
2842
  ] });
2793
2843
  }
2794
- const sc = vo(
2795
- Vl
2844
+ const hc = No(
2845
+ la
2796
2846
  ), Ae = [
2797
2847
  "assignment",
2798
2848
  "quiz",
@@ -2802,7 +2852,7 @@ const sc = vo(
2802
2852
  "external_url",
2803
2853
  "external_tool",
2804
2854
  "sub_header"
2805
- ], gt = [
2855
+ ], ht = [
2806
2856
  "not_started",
2807
2857
  "in_progress",
2808
2858
  "complete",
@@ -2810,30 +2860,30 @@ const sc = vo(
2810
2860
  "incomplete",
2811
2861
  "missing_and_incomplete",
2812
2862
  "locked"
2813
- ], Xn = [
2863
+ ], ro = [
2814
2864
  "must_view",
2815
2865
  "must_submit",
2816
2866
  "must_contribute",
2817
2867
  "must_mark_done",
2818
2868
  "min_score",
2819
2869
  "min_percentage"
2820
- ], Zl = ["assignment", "quiz", "discussion"], Xl = ["external_url", "external_tool"], Jl = ["assignment", "quiz", "discussion"], ea = Date.UTC(2025, 0, 6), ta = 864e5, be = "1", Jn = (e) => new Date(ea + e * ta).toISOString(), Xe = [
2870
+ ], aa = ["assignment", "quiz", "discussion"], ca = ["external_url", "external_tool"], ua = ["assignment", "quiz", "discussion"], da = Date.UTC(2025, 0, 6), ma = 864e5, _e = "1", io = (e) => new Date(da + e * ma).toISOString(), Ve = [
2821
2871
  "min_score",
2822
2872
  "min_percentage"
2823
- ], na = Xn.filter(
2824
- (e) => !Xe.includes(e)
2825
- ), oa = [
2873
+ ], pa = ro.filter(
2874
+ (e) => !Ve.includes(e)
2875
+ ), ga = [
2826
2876
  "in_progress",
2827
2877
  "incomplete",
2828
2878
  "missing_and_incomplete"
2829
- ], sa = (e, t, n, o) => {
2830
- const s = n ? Xn : na, r = n && o ? Xe[t % Xe.length] : s[Math.floor(t / 3) % s.length];
2879
+ ], fa = (e, t, n, o) => {
2880
+ const s = n ? ro : pa, r = n && o ? Ve[t % Ve.length] : s[Math.floor(t / 3) % s.length];
2831
2881
  return r === "min_score" ? { itemId: e, type: r, minScore: 10 } : r === "min_percentage" ? { itemId: e, type: r, minPercentage: 80 } : { itemId: e, type: r };
2832
- }, ra = (e, t, n, o) => e === "sub_header" ? !1 : n && o || t % 3 === 0, _t = (e) => gt[(e - 1) % gt.length], ia = (e, t) => !Jl.includes(e) || e === "discussion" && Math.floor(t / Ae.length) % 2 === 1 ? null : 5 + t % 4 * 5, la = (e, t, n, o) => t ? e === "missing" ? n != null || o % 2 === 0 : e === "missing_and_incomplete" ? o % 2 === 1 : !1 : !1, aa = (e, t, n, o) => {
2882
+ }, ha = (e, t, n, o) => e === "sub_header" ? !1 : n && o || t % 3 === 0, Et = (e) => ht[(e - 1) % ht.length], Ia = (e, t) => !ua.includes(e) || e === "discussion" && Math.floor(t / Ae.length) % 2 === 1 ? null : 5 + t % 4 * 5, ba = (e, t, n, o) => t ? e === "missing" ? n != null || o % 2 === 0 : e === "missing_and_incomplete" ? o % 2 === 1 : !1 : !1, Ma = (e, t, n, o) => {
2833
2883
  if (e === "locked") return "locked";
2834
- if (la(e, t, n, o)) return "missing";
2884
+ if (ba(e, t, n, o)) return "missing";
2835
2885
  if (!n) return;
2836
- const s = t && Xe.includes(n.type);
2886
+ const s = t && Ve.includes(n.type);
2837
2887
  switch (e) {
2838
2888
  case "not_started":
2839
2889
  case "missing":
@@ -2848,37 +2898,37 @@ const sc = vo(
2848
2898
  default:
2849
2899
  return e;
2850
2900
  }
2851
- }, ca = (e) => e.status === "complete", ua = (e, t, n, o, s, r, i, a) => {
2852
- const d = String(e), u = Ae[o % Ae.length], c = u === "sub_header", p = Zl.includes(u) && (o % 4 === 0 || s === "missing");
2901
+ }, Sa = (e) => e.status === "complete", ya = (e, t, n, o, s, r, l, a) => {
2902
+ const u = String(e), c = Ae[o % Ae.length], d = c === "sub_header", m = aa.includes(c) && (o % 4 === 0 || s === "missing");
2853
2903
  return {
2854
2904
  id: n,
2855
- moduleId: d,
2856
- title: `${u} ${t + 1}`,
2857
- type: u,
2905
+ moduleId: u,
2906
+ title: `${c} ${t + 1}`,
2907
+ type: c,
2858
2908
  position: t + 1,
2859
2909
  indent: t % 5 === 4 ? 1 : 0,
2860
2910
  published: a === "teacher" ? o % 7 !== 0 : !0,
2861
- url: c ? null : `/courses/${be}/modules/items/${n}`,
2862
- newTab: Xl.includes(u) && o % 2 === 0,
2863
- completionRequirement: i,
2864
- dueAt: p ? Jn(o % 90) : null,
2911
+ url: d ? null : `/courses/${_e}/modules/items/${n}`,
2912
+ newTab: ca.includes(c) && o % 2 === 0,
2913
+ completionRequirement: l,
2914
+ dueAt: m ? io(o % 90) : null,
2865
2915
  status: s,
2866
2916
  pointsPossible: r,
2867
- extensions: bt(
2917
+ extensions: Mt(
2868
2918
  void 0,
2869
2919
  o % 37 === 0 ? 5 + o % 4 * 10 : null
2870
2920
  )
2871
2921
  };
2872
- }, da = (e, t, n, o) => {
2873
- const s = _t(e), r = oa.includes(s), i = [];
2922
+ }, _a = (e, t, n, o) => {
2923
+ const s = Et(e), r = ga.includes(s), l = [];
2874
2924
  let a = 0;
2875
- for (let d = 0; d < t; d += 1) {
2876
- const u = n + d, c = Ae[u % Ae.length], p = ia(c, u), f = p !== null, y = f ? a++ : d, g = String(e * 1e3 + d + 1), b = ra(c, u, f, r) ? sa(g, u, f, r) : null, w = aa(s, f, b, y);
2877
- i.push(ua(e, d, g, u, w, p, b, o));
2925
+ for (let u = 0; u < t; u += 1) {
2926
+ const c = n + u, d = Ae[c % Ae.length], m = Ia(d, c), f = m !== null, S = f ? a++ : u, h = String(e * 1e3 + u + 1), b = ha(d, c, f, r) ? fa(h, c, f, r) : null, w = Ma(s, f, b, S);
2927
+ l.push(ya(e, u, h, c, w, m, b, o));
2878
2928
  }
2879
- return i;
2880
- }, ma = (e, t, n, o) => {
2881
- const s = _t(e);
2929
+ return l;
2930
+ }, Ta = (e, t, n, o) => {
2931
+ const s = Et(e);
2882
2932
  if (s === "locked" || s === "not_started") return s;
2883
2933
  if (t.length === 0) return "not_started";
2884
2934
  if (!t.some((r) => r.pointsPossible != null) || s === "missing" && n === 0 || s === "incomplete" && o === 0) return "in_progress";
@@ -2888,36 +2938,36 @@ const sc = vo(
2888
2938
  if (o === 0) return "missing";
2889
2939
  }
2890
2940
  return s;
2891
- }, pa = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, fa = (e, t, n) => {
2892
- const o = t.filter((u) => u.completionRequirement), s = n ?? o.length, r = Math.min(o.filter(ca).length, s), i = t.filter((u) => u.status === "missing").length, a = t.filter((u) => u.status === "incomplete").length;
2941
+ }, Ea = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, Ca = (e, t, n) => {
2942
+ const o = t.filter((c) => c.completionRequirement), s = n ?? o.length, r = Math.min(o.filter(Sa).length, s), l = t.filter((c) => c.status === "missing").length, a = t.filter((c) => c.status === "incomplete").length;
2893
2943
  return {
2894
- status: ma(e, t, i, a),
2944
+ status: Ta(e, t, l, a),
2895
2945
  requirementsMet: r,
2896
2946
  requirementCount: s,
2897
2947
  percentComplete: s > 0 ? Math.round(r / s * 100) : 0,
2898
- nextDueAt: pa(t),
2899
- missingCount: i,
2948
+ nextDueAt: Ea(t),
2949
+ missingCount: l,
2900
2950
  incompleteCount: a
2901
2951
  };
2902
- }, ga = (e, t, n) => {
2903
- const o = _t(e), s = e % 2 !== 0 && o !== "incomplete" && o !== "missing_and_incomplete" ? 1 : null;
2952
+ }, wa = (e, t, n) => {
2953
+ const o = Et(e), s = e % 2 !== 0 && o !== "incomplete" && o !== "missing_and_incomplete" ? 1 : null;
2904
2954
  return {
2905
2955
  id: String(e),
2906
2956
  name: `Module ${e}`,
2907
2957
  position: e,
2908
2958
  published: n === "teacher" ? e % 4 !== 0 : !0,
2909
2959
  itemCount: t.length,
2910
- unlockAt: e % 5 === 0 ? Jn(e) : null,
2960
+ unlockAt: e % 5 === 0 ? io(e) : null,
2911
2961
  prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
2912
2962
  requirementCount: s,
2913
2963
  requireSequentialProgress: e % 6 === 0,
2914
2964
  completionRequirements: t.flatMap(
2915
2965
  (r) => r.completionRequirement ? [r.completionRequirement] : []
2916
2966
  ),
2917
- progress: fa(e, t, s)
2967
+ progress: Ca(e, t, s)
2918
2968
  };
2919
2969
  };
2920
- function ha(e) {
2970
+ function va(e) {
2921
2971
  return {
2922
2972
  courseId: e.courseId,
2923
2973
  modules: e.modules.map(({ progress: t, ...n }) => n),
@@ -2929,32 +2979,32 @@ function ha(e) {
2929
2979
  )
2930
2980
  };
2931
2981
  }
2932
- function nt(e, t = {}) {
2933
- const n = t.view ?? "student", o = t.courseId ?? be, s = [], r = {};
2934
- let i = 0;
2935
- e.forEach((d, u) => {
2936
- const c = u + 1, p = da(c, d, i, n);
2937
- i += d, s.push(ga(c, p, n)), r[String(c)] = p;
2982
+ function tt(e, t = {}) {
2983
+ const n = t.view ?? "student", o = t.courseId ?? _e, s = [], r = {};
2984
+ let l = 0;
2985
+ e.forEach((u, c) => {
2986
+ const d = c + 1, m = _a(d, u, l, n);
2987
+ l += u, s.push(wa(d, m, n)), r[String(d)] = m;
2938
2988
  });
2939
2989
  const a = { courseId: o, modules: s, itemsByModuleId: r };
2940
- return n === "teacher" ? ha(a) : a;
2990
+ return n === "teacher" ? va(a) : a;
2941
2991
  }
2942
- const we = (e) => `/courses/${be}/modules/items/${e}`, Xt = "2099-08-31T06:59:00Z", Ia = "2020-01-06T07:00:00Z", ba = gt.length, Ma = 8, ya = 120, Sa = 25, _a = 250, Jt = 8;
2943
- function rc() {
2944
- return nt(Array.from({ length: ba }, () => Ma));
2992
+ const we = (e) => `/courses/${_e}/modules/items/${e}`, tn = "2099-08-31T06:59:00Z", Pa = "2020-01-06T07:00:00Z", Aa = ht.length, xa = 8, La = 120, Ra = 25, ka = 250, nn = 8;
2993
+ function Ic() {
2994
+ return tt(Array.from({ length: Aa }, () => xa));
2945
2995
  }
2946
- function ic() {
2947
- return nt(Array.from({ length: ya }, () => Sa));
2996
+ function bc() {
2997
+ return tt(Array.from({ length: La }, () => Ra));
2948
2998
  }
2949
- function lc() {
2950
- return nt([
2951
- Jt,
2952
- _a,
2953
- Jt
2999
+ function Mc() {
3000
+ return tt([
3001
+ nn,
3002
+ ka,
3003
+ nn
2954
3004
  ]);
2955
3005
  }
2956
- function ac() {
2957
- const e = (s, r, i) => ({
3006
+ function Sc() {
3007
+ const e = (s, r, l) => ({
2958
3008
  id: String(s),
2959
3009
  name: r,
2960
3010
  position: s,
@@ -2970,29 +3020,29 @@ function ac() {
2970
3020
  missingCount: 0,
2971
3021
  incompleteCount: 0
2972
3022
  },
2973
- ...i
3023
+ ...l
2974
3024
  }), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, o = [
2975
- e(1, "Locked by a future date", { unlockAt: Xt }),
3025
+ e(1, "Locked by a future date", { unlockAt: tn }),
2976
3026
  e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
2977
3027
  e(3, "Locked by several prerequisites", {
2978
3028
  prerequisiteModules: [t, n]
2979
3029
  }),
2980
3030
  e(4, "Locked by a date and a prerequisite", {
2981
- unlockAt: Xt,
3031
+ unlockAt: tn,
2982
3032
  prerequisiteModules: [t]
2983
3033
  }),
2984
- e(5, "Locked, and the unlock date has passed", { unlockAt: Ia })
3034
+ e(5, "Locked, and the unlock date has passed", { unlockAt: Pa })
2985
3035
  ];
2986
3036
  return {
2987
- courseId: be,
3037
+ courseId: _e,
2988
3038
  modules: o,
2989
3039
  itemsByModuleId: Object.fromEntries(o.map((s) => [s.id, []]))
2990
3040
  };
2991
3041
  }
2992
- function cc() {
2993
- return nt([]);
3042
+ function yc() {
3043
+ return tt([]);
2994
3044
  }
2995
- function uc() {
3045
+ function _c() {
2996
3046
  const t = [
2997
3047
  {
2998
3048
  title: "Every fact: type, due date, points, requirement",
@@ -3021,7 +3071,7 @@ function uc() {
3021
3071
  title: "Career item carrying an estimated duration",
3022
3072
  type: "external_tool",
3023
3073
  completionRequirement: { itemId: "5", type: "must_view" },
3024
- extensions: bt(void 0, 45)
3074
+ extensions: Mt(void 0, 45)
3025
3075
  },
3026
3076
  { title: "A file, ungradeable, so no points at all", type: "file" },
3027
3077
  { title: "External link, opens in a new tab", type: "external_url", newTab: !0 },
@@ -3049,7 +3099,7 @@ function uc() {
3049
3099
  ...n
3050
3100
  }));
3051
3101
  return {
3052
- courseId: be,
3102
+ courseId: _e,
3053
3103
  modules: [
3054
3104
  {
3055
3105
  id: "1",
@@ -3064,7 +3114,7 @@ function uc() {
3064
3114
  itemsByModuleId: { 1: t }
3065
3115
  };
3066
3116
  }
3067
- function dc() {
3117
+ function Tc() {
3068
3118
  const t = [
3069
3119
  { title: "Reading: limits from the left and the right", type: "page", url: we(1) },
3070
3120
  {
@@ -3092,7 +3142,7 @@ function dc() {
3092
3142
  ...n
3093
3143
  }));
3094
3144
  return {
3095
- courseId: be,
3145
+ courseId: _e,
3096
3146
  modules: [
3097
3147
  {
3098
3148
  id: "1",
@@ -3108,97 +3158,99 @@ function dc() {
3108
3158
  };
3109
3159
  }
3110
3160
  export {
3111
- Qa as ACTION_ORDER_LTI_FLOOR,
3112
- X as ALL_FILTER,
3113
- Bt as ActionEntrySchema,
3114
- hn as CompletionRequirementSchema,
3115
- No as CompletionRequirementTypeSchema,
3116
- Fn as DEFAULT_INLINE_THRESHOLD,
3117
- Yi as DEFAULT_ITEM_CONCURRENCY,
3118
- qn as DEFAULT_ITEM_PAGE_SIZE,
3119
- Ie as DEFAULT_LOCALE,
3120
- St as DEFAULT_PAGE_SIZE,
3121
- Un as DEFAULT_RETAIN_COLLAPSED_LIMIT,
3122
- tt as DEFAULT_STALE_TIME_MS,
3123
- xi as DUE_THIS_WEEK_DAYS,
3124
- Mn as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
3125
- be as FIXTURE_COURSE_ID,
3126
- el as FilterChips,
3127
- Ao as FilterClauseSchema,
3128
- Bi as FilterEntrySchema,
3129
- ps as GET_MODULES,
3130
- fs as GET_MODULE_ITEMS,
3131
- ct as INLINE_ITEM_LIMIT,
3132
- Mt as INLINE_QUERY_NODE_BUDGET,
3133
- $o as InMemoryCourseMismatchError,
3134
- zi as ItemTypeEntrySchema,
3135
- $i as MetaFieldEntrySchema,
3136
- Ul as ModuleCard,
3137
- Cl as ModuleItemRow,
3138
- In as ModuleItemSchema,
3139
- hl as ModuleItemStatusPill,
3140
- Ro as ModuleItemStatusSchema,
3141
- Lo as ModuleItemTypeSchema,
3142
- Uo as ModuleItemsPageSchema,
3143
- Do as ModuleProgressSchema,
3144
- qo as ModuleSchema,
3145
- gl as ModuleStatusPill,
3146
- ko as ModuleStatusSchema,
3147
- Xa as ModulesConfigProvider,
3148
- Gi as ModulesConfigSchema,
3149
- Za as ModulesI18nProvider,
3150
- sc as ModulesList,
3151
- Fo as ModulesPageSchema,
3152
- Hl as ModulesProgressBar,
3153
- bn as PageInfoSchema,
3154
- yn as PartialCanvasResponseError,
3155
- Oo as PrerequisiteModuleSchema,
3156
- ke as RegistryEntrySchema,
3157
- ki as TYPE_FIELD,
3158
- Li as baseFilters,
3159
- et as baseModulesConfig,
3160
- nt as buildFixture,
3161
- cc as courseEmpty,
3162
- lc as courseFatModule,
3163
- dc as courseItemLinks,
3164
- uc as courseItemRowVariants,
3165
- ic as courseLarge,
3166
- ac as courseLockReasons,
3167
- rc as courseSmall,
3168
- Ms as createActionContext,
3169
- Ha as createCanvasGraphqlAdapter,
3170
- Wa as createInMemoryAdapter,
3171
- xn as createTranslate,
3172
- Ri as defaultFormatters,
3173
- Ii as defaultTranslate,
3174
- yt as filterClauseOf,
3175
- zo as getEstimatedDurationMinutes,
3176
- qi as hideUnservableFilters,
3177
- Ka as invalidateCourse,
3178
- bs as invalidateModuleItems,
3179
- kt as invalidateModuleList,
3180
- mt as isPredicateServed,
3181
- me as mergeRegistry,
3182
- fl as moduleItemStatusLabel,
3183
- ut as moduleItemsPrefix,
3184
- Wn as moduleStatusLabel,
3161
+ ic as ACTION_ORDER_LTI_FLOOR,
3162
+ ne as ALL_FILTER,
3163
+ jt as ActionEntrySchema,
3164
+ Sn as CompletionRequirementSchema,
3165
+ $o as CompletionRequirementTypeSchema,
3166
+ Gn as DEFAULT_INLINE_THRESHOLD,
3167
+ el as DEFAULT_ITEM_CONCURRENCY,
3168
+ Bn as DEFAULT_ITEM_PAGE_SIZE,
3169
+ Se as DEFAULT_LOCALE,
3170
+ Tt as DEFAULT_PAGE_SIZE,
3171
+ jn as DEFAULT_RETAIN_COLLAPSED_LIMIT,
3172
+ Je as DEFAULT_STALE_TIME_MS,
3173
+ cc as DUE_THIS_WEEK_DAYS,
3174
+ Tn as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
3175
+ _e as FIXTURE_COURSE_ID,
3176
+ cl as FilterChips,
3177
+ Oo as FilterClauseSchema,
3178
+ Vi as FilterEntrySchema,
3179
+ Ss as GET_MODULES,
3180
+ ys as GET_MODULE_ITEMS,
3181
+ ut as INLINE_ITEM_LIMIT,
3182
+ St as INLINE_QUERY_NODE_BUDGET,
3183
+ Ko as InMemoryCourseMismatchError,
3184
+ Pl as ItemDueSoonPill,
3185
+ Ki as ItemTypeEntrySchema,
3186
+ Qi as MetaFieldEntrySchema,
3187
+ Vl as ModuleCard,
3188
+ vl as ModuleDueSoonPill,
3189
+ Ol as ModuleItemRow,
3190
+ yn as ModuleItemSchema,
3191
+ wl as ModuleItemStatusPill,
3192
+ Uo as ModuleItemStatusSchema,
3193
+ Fo as ModuleItemTypeSchema,
3194
+ Ho as ModuleItemsPageSchema,
3195
+ Bo as ModuleProgressSchema,
3196
+ jo as ModuleSchema,
3197
+ Cl as ModuleStatusPill,
3198
+ zo as ModuleStatusSchema,
3199
+ uc as ModulesConfigProvider,
3200
+ Xi as ModulesConfigSchema,
3201
+ ac as ModulesI18nProvider,
3202
+ hc as ModulesList,
3203
+ Yo as ModulesPageSchema,
3204
+ sa as ModulesProgressBar,
3205
+ _n as PageInfoSchema,
3206
+ En as PartialCanvasResponseError,
3207
+ Go as PrerequisiteModuleSchema,
3208
+ Re as RegistryEntrySchema,
3209
+ $i as TYPE_FIELD,
3210
+ Ui as baseFilters,
3211
+ Xe as baseModulesConfig,
3212
+ tt as buildFixture,
3213
+ yc as courseEmpty,
3214
+ Mc as courseFatModule,
3215
+ Tc as courseItemLinks,
3216
+ _c as courseItemRowVariants,
3217
+ bc as courseLarge,
3218
+ Sc as courseLockReasons,
3219
+ Ic as courseSmall,
3220
+ ws as createActionContext,
3221
+ sc as createCanvasGraphqlAdapter,
3222
+ oc as createInMemoryAdapter,
3223
+ Dn as createTranslate,
3224
+ zi as defaultFormatters,
3225
+ wi as defaultTranslate,
3226
+ _t as filterClauseOf,
3227
+ Wo as getEstimatedDurationMinutes,
3228
+ Yi as hideUnservableFilters,
3229
+ rc as invalidateCourse,
3230
+ Cs as invalidateModuleItems,
3231
+ Nt as invalidateModuleList,
3232
+ pt as isPredicateServed,
3233
+ fe as mergeRegistry,
3234
+ El as moduleItemStatusLabel,
3235
+ dt as moduleItemsPrefix,
3236
+ Jn as moduleStatusLabel,
3185
3237
  Le as modulesKeys,
3186
- Is as modulesListPrefix,
3187
- ec as partialModulesConfig,
3188
- fe as registrySchema,
3189
- ji as resolveModulesConfig,
3190
- xo as servesClause,
3191
- Oi as unservableFilters,
3192
- tc as useActionContext,
3193
- Ja as useFieldVisible,
3194
- Ne as useFormatters,
3195
- nc as useModuleItems,
3196
- Wi as useModules,
3197
- Re as useModulesConfig,
3198
- j as useModulesI18n,
3199
- oc as useModulesPageData,
3200
- Va as visibleActions,
3201
- Je as visibleEntries,
3202
- he as visibleEntry,
3203
- bt as withEstimatedDurationMinutes
3238
+ Es as modulesListPrefix,
3239
+ mc as partialModulesConfig,
3240
+ Ie as registrySchema,
3241
+ Ji as resolveModulesConfig,
3242
+ qo as servesClause,
3243
+ ji as unservableFilters,
3244
+ pc as useActionContext,
3245
+ dc as useFieldVisible,
3246
+ ke as useFormatters,
3247
+ gc as useModuleItems,
3248
+ tl as useModules,
3249
+ ye as useModulesConfig,
3250
+ B as useModulesI18n,
3251
+ fc as useModulesPageData,
3252
+ lc as visibleActions,
3253
+ Ze as visibleEntries,
3254
+ Me as visibleEntry,
3255
+ Mt as withEstimatedDurationMinutes
3204
3256
  };