@instructure/platform-modules 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +113 -3
  2. package/dist/adapters/canvasGraphql/index.d.ts +1 -1
  3. package/dist/adapters/canvasGraphql/normalize.d.ts +7 -6
  4. package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
  5. package/dist/adapters/canvasGraphql/queries.d.ts +2 -2
  6. package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
  7. package/dist/adapters/inMemory.d.ts +4 -4
  8. package/dist/adapters/limits.d.ts +4 -4
  9. package/dist/adapters/types.d.ts +6 -6
  10. package/dist/cache/keys.d.ts +1 -1
  11. package/dist/components/FilterChips.d.ts +10 -8
  12. package/dist/components/FilterChips.d.ts.map +1 -1
  13. package/dist/components/ModuleCard.d.ts +18 -6
  14. package/dist/components/ModuleCard.d.ts.map +1 -1
  15. package/dist/components/ModuleCard.stories.d.ts +12 -0
  16. package/dist/components/ModuleCard.stories.d.ts.map +1 -0
  17. package/dist/components/ModuleItemRow.d.ts +4 -2
  18. package/dist/components/ModuleItemRow.d.ts.map +1 -1
  19. package/dist/components/ModuleNumberBadge.d.ts +8 -0
  20. package/dist/components/ModuleNumberBadge.d.ts.map +1 -0
  21. package/dist/components/ModulesList.d.ts +4 -1
  22. package/dist/components/ModulesList.d.ts.map +1 -1
  23. package/dist/components/ModulesList.stories.d.ts +36 -8
  24. package/dist/components/ModulesList.stories.d.ts.map +1 -1
  25. package/dist/components/index.d.ts +1 -0
  26. package/dist/components/index.d.ts.map +1 -1
  27. package/dist/components/labels.d.ts +9 -13
  28. package/dist/components/labels.d.ts.map +1 -1
  29. package/dist/config/base.d.ts +8 -0
  30. package/dist/config/base.d.ts.map +1 -0
  31. package/dist/config/context.d.ts +11 -0
  32. package/dist/config/context.d.ts.map +1 -0
  33. package/dist/config/index.d.ts +6 -1
  34. package/dist/config/index.d.ts.map +1 -1
  35. package/dist/config/partialModulesConfig.d.ts +4 -0
  36. package/dist/config/partialModulesConfig.d.ts.map +1 -0
  37. package/dist/config/registry.d.ts +3 -0
  38. package/dist/config/registry.d.ts.map +1 -1
  39. package/dist/config/resolve.d.ts +7 -0
  40. package/dist/config/resolve.d.ts.map +1 -0
  41. package/dist/config/schemas.d.ts +2 -0
  42. package/dist/config/schemas.d.ts.map +1 -1
  43. package/dist/config/types.d.ts +32 -0
  44. package/dist/config/types.d.ts.map +1 -0
  45. package/dist/fixtures/generate.d.ts +1 -1
  46. package/dist/fixtures/generate.d.ts.map +1 -1
  47. package/dist/fixtures/index.d.ts +1 -1
  48. package/dist/fixtures/index.d.ts.map +1 -1
  49. package/dist/fixtures/scenarios.d.ts +5 -0
  50. package/dist/fixtures/scenarios.d.ts.map +1 -1
  51. package/dist/hooks/constants.d.ts +1 -1
  52. package/dist/hooks/queryOptions.d.ts +1 -1
  53. package/dist/hooks/useModuleItemQueries.d.ts +1 -1
  54. package/dist/hooks/useModuleItems.d.ts +1 -1
  55. package/dist/hooks/useModules.d.ts +1 -1
  56. package/dist/i18n.d.ts +33 -63
  57. package/dist/i18n.d.ts.map +1 -1
  58. package/dist/index.d.ts +5 -4
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +1135 -867
  61. package/dist/types/domain.d.ts +5 -3
  62. package/dist/types/domain.d.ts.map +1 -1
  63. package/dist/types/enums.d.ts +2 -2
  64. package/dist/types/index.d.ts +1 -0
  65. package/dist/types/index.d.ts.map +1 -1
  66. package/dist/types/navigation.d.ts +13 -0
  67. package/dist/types/navigation.d.ts.map +1 -0
  68. package/dist/types/schemas.d.ts +1 -1
  69. package/dist/types/schemas.d.ts.map +1 -1
  70. package/locales/en.json +102 -0
  71. package/package.json +11 -3
package/dist/index.js CHANGED
@@ -1,23 +1,25 @@
1
- import { z as g } from "zod";
2
- import { gql as ee } from "graphql-tag";
3
- import { useInfiniteQuery as be, useQueryClient as Fe, InfiniteQueryObserver as Ct } from "@tanstack/react-query";
4
- import { useMemo as L, useCallback as D, useRef as B, useState as X, useEffect as ae, createContext as vt, useContext as Tt, useId as ke, memo as ze } from "react";
5
- import Nt from "p-limit";
6
- import { jsx as o, jsxs as y } from "react/jsx-runtime";
7
- import { Button as Z, IconButton as At } from "@instructure/ui-buttons";
1
+ import { z as d } from "zod";
2
+ import { gql as J } from "graphql-tag";
3
+ import { jsx as o, jsxs as T } from "react/jsx-runtime";
4
+ import { createContext as Oe, useContext as $e, useMemo as v, useCallback as A, useRef as q, useState as V, useEffect as ce, useId as Be, memo as Ge } from "react";
5
+ import { useInfiniteQuery as _e, useQueryClient as je, InfiniteQueryObserver as kt } from "@tanstack/react-query";
6
+ import qt from "p-limit";
7
+ import { Button as Z, IconButton as Rt } from "@instructure/ui-buttons";
8
8
  import { Flex as P } from "@instructure/ui-flex";
9
- import { Text as I } from "@instructure/ui-text";
10
- import { View as S } from "@instructure/ui-view";
11
- import { politeAnnounce as Oe, getLiveRegion as Ue } from "@instructure/platform-instui-bindings";
12
- import { Alert as $e } from "@instructure/ui-alerts";
13
- import { Heading as Be } from "@instructure/ui-heading";
14
- import { IconLockLine as Ge, IconWarningLine as Ye, IconCheckLine as ue, IconClockLine as Qe, IconArrowNestLine as Lt, IconEmptyLine as Dt, IconLtiLine as Rt, IconLinkLine as qt, IconAttachMediaLine as Ft, IconDocumentLine as kt, IconDiscussionLine as zt, IconQuizLine as Ot, IconAssignmentLine as Ut, IconArrowOpenUpLine as $t, IconArrowOpenDownLine as je, IconSearchLine as Bt } from "@instructure/ui-icons";
15
- import { ProgressBar as Gt } from "@instructure/ui-progress";
16
- import { Spinner as We } from "@instructure/ui-spinner";
17
- import { Pill as Yt } from "@instructure/ui-pill";
18
- import { Menu as fe } from "@instructure/ui-menu";
19
- import { TextInput as Qt } from "@instructure/ui-text-input";
20
- const jt = g.enum([
9
+ import { Text as M } from "@instructure/ui-text";
10
+ import { View as _ } from "@instructure/ui-view";
11
+ import { politeAnnounce as Ye, getLiveRegion as Qe } from "@instructure/platform-instui-bindings";
12
+ import { Alert as We } from "@instructure/ui-alerts";
13
+ import { Heading as He } from "@instructure/ui-heading";
14
+ import { IconLockLine as Ke, IconWarningLine as Ve, IconCheckLine as de, IconClockLine as Ze, IconArrowNestLine as Ft, IconEmptyLine as zt, IconLtiLine as Ut, IconLinkLine as Ot, IconAttachMediaLine as $t, IconDocumentLine as Bt, IconDiscussionLine as Gt, IconQuizLine as jt, IconAssignmentLine as Yt, IconArrowOpenUpLine as Qt, IconArrowOpenDownLine as Xe, IconSearchLine as Wt } from "@instructure/ui-icons";
15
+ import { ProgressBar as Ht } from "@instructure/ui-progress";
16
+ import { Spinner as Je } from "@instructure/ui-spinner";
17
+ import { ScreenReaderContent as Kt } from "@instructure/ui-a11y-content";
18
+ import { Link as Vt } from "@instructure/ui-link";
19
+ import { Pill as Zt } from "@instructure/ui-pill";
20
+ import { Menu as be } from "@instructure/ui-menu";
21
+ import { TextInput as Xt } from "@instructure/ui-text-input";
22
+ const Jt = d.enum([
21
23
  "assignment",
22
24
  "quiz",
23
25
  "discussion",
@@ -26,7 +28,7 @@ const jt = g.enum([
26
28
  "external_url",
27
29
  "external_tool",
28
30
  "sub_header"
29
- ]), Wt = g.enum(["not_started", "in_progress", "submitted", "graded", "missing", "locked"]), Kt = g.enum(["not_started", "in_progress", "all_submitted", "all_graded", "missing", "locked"]), Ht = g.enum([
31
+ ]), en = d.enum(["not_started", "in_progress", "submitted", "graded", "missing", "locked"]), tn = d.enum(["not_started", "in_progress", "all_submitted", "all_graded", "missing", "locked"]), nn = d.enum([
30
32
  "must_view",
31
33
  "must_mark_done",
32
34
  "must_contribute",
@@ -34,94 +36,95 @@ const jt = g.enum([
34
36
  "min_score",
35
37
  "min_percentage",
36
38
  "unknown"
37
- ]), Vt = g.object({
38
- status: Kt,
39
- requirementsMet: g.number(),
40
- requirementCount: g.number(),
41
- percentComplete: g.number().min(0).max(100),
42
- latestDueAt: g.string().nullish(),
43
- missingCount: g.number()
44
- }), Ke = g.object({
45
- itemId: g.string(),
46
- type: Ht,
47
- minScore: g.number().nullish(),
48
- minPercentage: g.number().nullish()
49
- }), He = g.object({
50
- id: g.string(),
51
- moduleId: g.string(),
52
- title: g.string(),
53
- type: jt,
54
- position: g.number(),
55
- indent: g.number(),
56
- published: g.boolean(),
57
- url: g.string().nullish(),
58
- completionRequirement: Ke.nullish(),
59
- dueAt: g.string().nullish(),
60
- status: Wt.optional(),
61
- pointsPossible: g.number().nullish(),
62
- extensions: g.record(g.unknown()).optional()
63
- }), Xt = g.object({
64
- id: g.string(),
65
- name: g.string(),
66
- position: g.number(),
67
- published: g.boolean(),
68
- itemCount: g.number(),
69
- items: g.array(He).optional(),
70
- unlockAt: g.string().nullish(),
71
- prerequisiteModuleIds: g.array(g.string()),
72
- requirementCount: g.number().nullish(),
73
- requireSequentialProgress: g.boolean(),
74
- completionRequirements: g.array(Ke).optional(),
75
- progress: Vt.optional(),
76
- extensions: g.record(g.unknown()).optional()
77
- }), Ve = g.object({
78
- hasNextPage: g.boolean(),
79
- endCursor: g.string().nullable()
39
+ ]), sn = d.object({
40
+ status: tn,
41
+ requirementsMet: d.number(),
42
+ requirementCount: d.number(),
43
+ percentComplete: d.number().min(0).max(100),
44
+ latestDueAt: d.string().nullish(),
45
+ missingCount: d.number()
46
+ }), et = d.object({
47
+ itemId: d.string(),
48
+ type: nn,
49
+ minScore: d.number().nullish(),
50
+ minPercentage: d.number().nullish()
51
+ }), tt = d.object({
52
+ id: d.string(),
53
+ moduleId: d.string(),
54
+ title: d.string(),
55
+ type: Jt,
56
+ position: d.number(),
57
+ indent: d.number(),
58
+ published: d.boolean(),
59
+ url: d.string().nullish(),
60
+ newTab: d.boolean().nullish(),
61
+ completionRequirement: et.nullish(),
62
+ dueAt: d.string().nullish(),
63
+ status: en.optional(),
64
+ pointsPossible: d.number().nullish(),
65
+ extensions: d.record(d.unknown()).optional()
66
+ }), rn = d.object({
67
+ id: d.string(),
68
+ name: d.string(),
69
+ position: d.number(),
70
+ published: d.boolean(),
71
+ itemCount: d.number(),
72
+ items: d.array(tt).optional(),
73
+ unlockAt: d.string().nullish(),
74
+ prerequisiteModuleIds: d.array(d.string()),
75
+ requirementCount: d.number().nullish(),
76
+ requireSequentialProgress: d.boolean(),
77
+ completionRequirements: d.array(et).optional(),
78
+ progress: sn.optional(),
79
+ extensions: d.record(d.unknown()).optional()
80
+ }), nt = d.object({
81
+ hasNextPage: d.boolean(),
82
+ endCursor: d.string().nullable()
80
83
  }).refine((e) => !e.hasNextPage || e.endCursor !== null, {
81
84
  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.',
82
85
  path: ["endCursor"]
83
- }), Zt = g.object({
84
- modules: g.array(Xt),
85
- pageInfo: Ve
86
- }), Jt = g.object({
87
- items: g.array(He),
88
- pageInfo: Ve
89
- }), Xe = "career.estimatedDurationMinutes";
90
- function en(e) {
86
+ }), on = d.object({
87
+ modules: d.array(rn),
88
+ pageInfo: nt
89
+ }), ln = d.object({
90
+ items: d.array(tt),
91
+ pageInfo: nt
92
+ }), st = "career.estimatedDurationMinutes";
93
+ function an(e) {
91
94
  var n;
92
- const t = (n = e.extensions) == null ? void 0 : n[Xe];
95
+ const t = (n = e.extensions) == null ? void 0 : n[st];
93
96
  return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? null : t;
94
97
  }
95
- function Ze(e, t) {
96
- return t == null ? e : { ...e, [Xe]: t };
98
+ function rt(e, t) {
99
+ return t == null ? e : { ...e, [st]: t };
97
100
  }
98
- const pe = 100, Me = 2e3;
99
- class tn extends Error {
101
+ const Me = 100, Te = 2e3;
102
+ class un extends Error {
100
103
  constructor(t, n) {
101
104
  super(
102
105
  `This in-memory adapter was built for course ${t} but was asked for course ${n}. A fixture serves exactly one course.`
103
106
  ), this.name = "InMemoryCourseMismatchError", this.expected = t, this.received = n;
104
107
  }
105
108
  }
106
- const nn = (e) => `offset:${e}`, sn = (e) => {
109
+ const cn = (e) => `offset:${e}`, dn = (e) => {
107
110
  if (!e) return 0;
108
111
  const t = Number.parseInt(e.replace("offset:", ""), 10);
109
112
  return Number.isFinite(t) && t >= 0 ? t : 0;
110
- }, Pe = (e) => {
113
+ }, Ce = (e) => {
111
114
  if (e != null && e.aborted)
112
115
  throw new DOMException("The operation was aborted.", "AbortError");
113
116
  };
114
- function xe(e, t, n) {
115
- const s = sn(t), r = e.slice(s, s + n), i = s + r.length, u = i < e.length;
117
+ function Le(e, t, n) {
118
+ const s = dn(t), r = e.slice(s, s + n), i = s + r.length, u = i < e.length;
116
119
  return {
117
120
  slice: r,
118
- pageInfo: { hasNextPage: u, endCursor: u ? nn(i) : null }
121
+ pageInfo: { hasNextPage: u, endCursor: u ? cn(i) : null }
119
122
  };
120
123
  }
121
- function er(e, t = {}) {
124
+ function Qo(e, t = {}) {
122
125
  const n = (r) => e.itemsByModuleId[r] ?? [], s = (r) => {
123
126
  if (r !== e.courseId)
124
- throw new tn(e.courseId, r);
127
+ throw new un(e.courseId, r);
125
128
  };
126
129
  return {
127
130
  async listModules({
@@ -129,15 +132,15 @@ function er(e, t = {}) {
129
132
  cursor: i,
130
133
  pageSize: u,
131
134
  includeItems: a,
132
- inlineItemsFirst: d,
133
- signal: c
135
+ inlineItemsFirst: c,
136
+ signal: g
134
137
  }) {
135
- var h;
136
- Pe(c), s(r), (h = t.onRequest) == null || h.call(t, "listModules", { operation: "listModules", courseId: r });
137
- const { slice: l, pageInfo: m } = xe(e.modules, i, u), M = Math.min(d ?? pe, pe);
138
- return { modules: l.map((f) => {
139
- const w = n(f.id), v = a && w.length <= M;
140
- return { ...f, itemCount: w.length, items: v ? w : void 0 };
138
+ var f;
139
+ Ce(g), s(r), (f = t.onRequest) == null || f.call(t, "listModules", { operation: "listModules", courseId: r });
140
+ const { slice: l, pageInfo: m } = Le(e.modules, i, u), S = Math.min(c ?? Me, Me);
141
+ return { modules: l.map((h) => {
142
+ const w = n(h.id), x = a && w.length <= S;
143
+ return { ...h, itemCount: w.length, items: x ? w : void 0 };
141
144
  }), pageInfo: m };
142
145
  },
143
146
  async listModuleItems({
@@ -145,16 +148,16 @@ function er(e, t = {}) {
145
148
  moduleId: i,
146
149
  cursor: u,
147
150
  pageSize: a,
148
- signal: d
151
+ signal: c
149
152
  }) {
150
153
  var m;
151
- Pe(d), s(r), (m = t.onRequest) == null || m.call(t, "listModuleItems", { operation: "listModuleItems", courseId: r, moduleId: i });
152
- const { slice: c, pageInfo: l } = xe(n(i), u, a);
153
- return { items: c, pageInfo: l };
154
+ Ce(c), s(r), (m = t.onRequest) == null || m.call(t, "listModuleItems", { operation: "listModuleItems", courseId: r, moduleId: i });
155
+ const { slice: g, pageInfo: l } = Le(n(i), u, a);
156
+ return { items: g, pageInfo: l };
154
157
  }
155
158
  };
156
159
  }
157
- class Je extends Error {
160
+ class ot extends Error {
158
161
  constructor(t, n, s) {
159
162
  const r = t === "module" ? "module" : "module item";
160
163
  super(
@@ -162,11 +165,11 @@ class Je extends Error {
162
165
  ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = s;
163
166
  }
164
167
  }
165
- function et(e, t, n) {
168
+ function it(e, t, n) {
166
169
  if (e != null) return e;
167
- throw new Je(t, n, "published");
170
+ throw new ot(t, n, "published");
168
171
  }
169
- function rn(e, t) {
172
+ function mn(e, t) {
170
173
  if (e.onUnsupportedItem) {
171
174
  e.onUnsupportedItem(t);
172
175
  return;
@@ -175,7 +178,7 @@ function rn(e, t) {
175
178
  `[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
176
179
  );
177
180
  }
178
- const on = {
181
+ const gn = {
179
182
  Assignment: "assignment",
180
183
  Quiz: "quiz",
181
184
  Discussion: "discussion",
@@ -193,21 +196,21 @@ const on = {
193
196
  // for no better reason than not being listed.
194
197
  PeerReviewSubAssignment: "assignment"
195
198
  };
196
- function ln(e) {
199
+ function fn(e) {
197
200
  const t = e == null ? void 0 : e.__typename;
198
201
  if (!t) return null;
199
- const n = on[t];
202
+ const n = gn[t];
200
203
  return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
201
204
  }
202
- const an = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
203
- function un(e) {
205
+ const hn = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
206
+ function pn(e) {
204
207
  if (!e) return null;
205
- const t = an.exec(e);
208
+ const t = hn.exec(e);
206
209
  if (!t) return null;
207
210
  const [, n, s, r, i, u] = t, a = Number(n ?? 0) * 7 * 24 * 60 + Number(s ?? 0) * 24 * 60 + Number(r ?? 0) * 60 + Number(i ?? 0) + Number(u ?? 0) / 60;
208
211
  return Math.round(a);
209
212
  }
210
- const dn = /* @__PURE__ */ new Set([
213
+ const In = /* @__PURE__ */ new Set([
211
214
  "must_view",
212
215
  "must_mark_done",
213
216
  "must_contribute",
@@ -215,31 +218,31 @@ const dn = /* @__PURE__ */ new Set([
215
218
  "min_score",
216
219
  "min_percentage"
217
220
  ]);
218
- function cn(e) {
219
- return dn.has(e) ? e : "unknown";
221
+ function bn(e) {
222
+ return In.has(e) ? e : "unknown";
220
223
  }
221
- function mn(e) {
224
+ function Mn(e) {
222
225
  return {
223
226
  itemId: String(e.id),
224
- type: cn(e.type),
227
+ type: bn(e.type),
225
228
  minScore: e.minScore ?? null,
226
229
  minPercentage: e.minPercentage ?? null
227
230
  };
228
231
  }
229
- function tt(e) {
232
+ function lt(e) {
230
233
  return {
231
234
  hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
232
235
  endCursor: (e == null ? void 0 : e.endCursor) ?? null
233
236
  };
234
237
  }
235
- const gn = /* @__PURE__ */ new Set(["graded"]), hn = /* @__PURE__ */ new Set(["submitted", "pending_review"]), fn = /* @__PURE__ */ new Set(["graded", "excused"]);
236
- function nt(e) {
238
+ const Sn = /* @__PURE__ */ new Set(["graded"]), yn = /* @__PURE__ */ new Set(["submitted", "pending_review"]), _n = /* @__PURE__ */ new Set(["graded", "excused"]);
239
+ function at(e) {
237
240
  var t;
238
241
  for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
239
242
  if (n) return n;
240
243
  return null;
241
244
  }
242
- function st(e, t) {
245
+ function ut(e, t) {
243
246
  if (!e) return;
244
247
  const n = new Map(t.map((r) => [r.itemId, r.type])), s = /* @__PURE__ */ new Set();
245
248
  for (const r of e.requirementsMet ?? []) {
@@ -255,48 +258,48 @@ function st(e, t) {
255
258
  requirementsMetItemIds: s
256
259
  };
257
260
  }
258
- function pn(e, t, n) {
261
+ function Tn(e, t, n) {
259
262
  if (n.locked) return "locked";
260
- const s = nt(e);
263
+ const s = at(e);
261
264
  if (s) {
262
265
  if (s.missing === !0) return "missing";
263
- if (gn.has(s.state ?? "") || fn.has(s.gradingStatus ?? ""))
266
+ if (Sn.has(s.state ?? "") || _n.has(s.gradingStatus ?? ""))
264
267
  return "graded";
265
- if (s.submittedAt != null || hn.has(s.state ?? ""))
268
+ if (s.submittedAt != null || yn.has(s.state ?? ""))
266
269
  return "submitted";
267
270
  if ((s.attempt ?? 0) > 0) return "in_progress";
268
271
  }
269
272
  return n.requirementsMetItemIds.has(t) ? "in_progress" : "not_started";
270
273
  }
271
- const In = (e) => e.pointsPossible != null;
272
- function bn(e, t, n, s) {
274
+ const Pn = (e) => e.pointsPossible != null;
275
+ function wn(e, t, n, s) {
273
276
  if (e.locked) return "locked";
274
277
  if (t > 0 && !e.completed) return "missing";
275
278
  if (e.completed) {
276
- const r = (s ?? []).filter(In);
279
+ const r = (s ?? []).filter(Pn);
277
280
  return r.length > 0 && r.every((u) => u.status === "graded") ? "all_graded" : "all_submitted";
278
281
  }
279
282
  return e.started || n > 0 ? "in_progress" : "not_started";
280
283
  }
281
- function Mn(e, t, n, s) {
282
- var a, d;
284
+ function En(e, t, n, s) {
285
+ var a, c;
283
286
  if (!n) return;
284
287
  const r = e.requirementCount ?? t.length, i = Math.min(n.requirementsMetItemIds.size, r), u = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0;
285
288
  return {
286
- status: bn(n, u, i, s),
289
+ status: wn(n, u, i, s),
287
290
  requirementsMet: i,
288
291
  requirementCount: r,
289
292
  percentComplete: r > 0 ? Math.round(i / r * 100) : 0,
290
- latestDueAt: ((d = e.submissionStatistics) == null ? void 0 : d.latestDueAt) ?? null,
293
+ latestDueAt: ((c = e.submissionStatistics) == null ? void 0 : c.latestDueAt) ?? null,
291
294
  missingCount: u
292
295
  };
293
296
  }
294
- function _n(e, t, n, s = {}, r) {
295
- var d, c, l;
296
- const i = String(e._id), u = ln(e.content);
297
+ function xn(e, t, n, s = {}, r) {
298
+ var c, g, l;
299
+ const i = String(e._id), u = fn(e.content);
297
300
  if (!u)
298
- return rn(s, { id: i, typename: ((d = e.content) == null ? void 0 : d.__typename) ?? null }), null;
299
- const a = nt(e.content);
301
+ return mn(s, { id: i, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
302
+ const a = at(e.content);
300
303
  return {
301
304
  id: i,
302
305
  moduleId: t,
@@ -304,25 +307,26 @@ function _n(e, t, n, s = {}, r) {
304
307
  type: u,
305
308
  position: e.position ?? 0,
306
309
  indent: e.indent ?? 0,
307
- published: et(e.published, "moduleItem", i),
310
+ published: it(e.published, "moduleItem", i),
308
311
  url: e.url ?? null,
312
+ newTab: e.newTab ?? !1,
309
313
  completionRequirement: n.get(i) ?? null,
310
- dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((c = e.content) == null ? void 0 : c.dueAt) ?? null,
311
- status: r ? pn(e.content, i, r) : void 0,
314
+ dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((g = e.content) == null ? void 0 : g.dueAt) ?? null,
315
+ status: r ? Tn(e.content, i, r) : void 0,
312
316
  pointsPossible: ((l = e.content) == null ? void 0 : l.pointsPossible) ?? null,
313
317
  // Career-only, so it rides in `extensions` rather than widening the shared
314
318
  // model. Absent entirely for a Canvas LMS item, which is every item here.
315
- extensions: Ze(
319
+ extensions: rt(
316
320
  void 0,
317
- un(e.estimatedDuration)
321
+ pn(e.estimatedDuration)
318
322
  )
319
323
  };
320
324
  }
321
- function rt(e, t, n, s, r) {
325
+ function ct(e, t, n, s, r) {
322
326
  const i = [];
323
327
  for (const u of e ?? []) {
324
328
  if (!u) continue;
325
- const a = _n(
329
+ const a = xn(
326
330
  u,
327
331
  t,
328
332
  n,
@@ -333,52 +337,52 @@ function rt(e, t, n, s, r) {
333
337
  }
334
338
  return i;
335
339
  }
336
- function ot(e) {
340
+ function dt(e) {
337
341
  const t = [], n = /* @__PURE__ */ new Map();
338
342
  for (const s of e ?? []) {
339
343
  if (!s) continue;
340
- const r = mn(s);
344
+ const r = Mn(s);
341
345
  t.push(r), n.set(r.itemId, r);
342
346
  }
343
347
  return { list: t, byItemId: n };
344
348
  }
345
- function Sn(e, t = {}) {
346
- var c;
349
+ function Cn(e, t = {}) {
350
+ var g;
347
351
  const n = String(e._id);
348
352
  if (e.moduleItemsTotalCount == null)
349
- throw new Je("module", n, "moduleItemsTotalCount");
350
- const { list: s, byItemId: r } = ot(e.completionRequirements), i = e.moduleItemsConnection, u = i != null && !((c = i.pageInfo) != null && c.hasNextPage), a = st(e.progression, s), d = u ? rt(i.nodes, n, r, t, a) : void 0;
353
+ throw new ot("module", n, "moduleItemsTotalCount");
354
+ const { list: s, byItemId: r } = dt(e.completionRequirements), i = e.moduleItemsConnection, u = i != null && !((g = i.pageInfo) != null && g.hasNextPage), a = ut(e.progression, s), c = u ? ct(i.nodes, n, r, t, a) : void 0;
351
355
  return {
352
356
  id: n,
353
357
  name: e.name ?? "",
354
358
  position: e.position ?? 0,
355
- published: et(e.published, "module", n),
359
+ published: it(e.published, "module", n),
356
360
  itemCount: e.moduleItemsTotalCount,
357
- items: d,
361
+ items: c,
358
362
  unlockAt: e.unlockAt ?? null,
359
363
  prerequisiteModuleIds: (e.prerequisites ?? []).filter((l) => l != null).map((l) => String(l.id)),
360
364
  requirementCount: e.requirementCount ?? null,
361
365
  requireSequentialProgress: e.requireSequentialProgress ?? !1,
362
366
  completionRequirements: s,
363
367
  // Derived after the items so `all_graded` can see them when they are inline.
364
- progress: Mn(e, s, a, d)
368
+ progress: En(e, s, a, c)
365
369
  };
366
370
  }
367
- function yn(e, t = {}) {
371
+ function Ln(e, t = {}) {
368
372
  var r;
369
373
  const n = (r = e == null ? void 0 : e.legacyNode) == null ? void 0 : r.modulesConnection, s = [];
370
374
  for (const i of (n == null ? void 0 : n.nodes) ?? [])
371
- i && s.push(Sn(i, t));
372
- return { modules: s, pageInfo: tt(n == null ? void 0 : n.pageInfo) };
375
+ i && s.push(Cn(i, t));
376
+ return { modules: s, pageInfo: lt(n == null ? void 0 : n.pageInfo) };
373
377
  }
374
- function Pn(e, t, n = {}) {
375
- const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId: i } = ot(s == null ? void 0 : s.completionRequirements), u = s == null ? void 0 : s.moduleItemsConnection, a = st(s == null ? void 0 : s.progression, r);
378
+ function An(e, t, n = {}) {
379
+ const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId: i } = dt(s == null ? void 0 : s.completionRequirements), u = s == null ? void 0 : s.moduleItemsConnection, a = ut(s == null ? void 0 : s.progression, r);
376
380
  return {
377
- items: rt(u == null ? void 0 : u.nodes, t, i, n, a),
378
- pageInfo: tt(u == null ? void 0 : u.pageInfo)
381
+ items: ct(u == null ? void 0 : u.nodes, t, i, n, a),
382
+ pageInfo: lt(u == null ? void 0 : u.pageInfo)
379
383
  };
380
384
  }
381
- const xn = ee`
385
+ const vn = J`
382
386
  fragment PlatformModulesSubmissionFields on Submission {
383
387
  _id
384
388
  state
@@ -388,11 +392,12 @@ const xn = ee`
388
392
  missing
389
393
  cachedDueDate
390
394
  }
391
- `, it = ee`
395
+ `, mt = J`
392
396
  fragment PlatformModulesItemFields on ModuleItem {
393
397
  _id
394
398
  title
395
399
  url
400
+ newTab
396
401
  position
397
402
  indent
398
403
  published
@@ -434,8 +439,8 @@ const xn = ee`
434
439
  }
435
440
  }
436
441
  }
437
- ${xn}
438
- `, lt = ee`
442
+ ${vn}
443
+ `, gt = J`
439
444
  fragment PlatformModulesProgressionFields on ModuleProgression {
440
445
  workflowState
441
446
  completed
@@ -448,7 +453,7 @@ const xn = ee`
448
453
  minPercentage
449
454
  }
450
455
  }
451
- `, wn = ee`
456
+ `, Nn = J`
452
457
  query PlatformModulesGetModules(
453
458
  $courseId: ID!
454
459
  $first: Int!
@@ -504,9 +509,9 @@ const xn = ee`
504
509
  }
505
510
  }
506
511
  }
507
- ${it}
508
- ${lt}
509
- `, En = ee`
512
+ ${mt}
513
+ ${gt}
514
+ `, Dn = J`
510
515
  query PlatformModulesGetModuleItems(
511
516
  $moduleId: ID!
512
517
  $first: Int!
@@ -537,25 +542,25 @@ const xn = ee`
537
542
  }
538
543
  }
539
544
  }
540
- ${it}
541
- ${lt}
545
+ ${mt}
546
+ ${gt}
542
547
  `;
543
- function at() {
548
+ function ft() {
544
549
  return new DOMException("The operation was aborted.", "AbortError");
545
550
  }
546
- function le(e) {
547
- if (e != null && e.aborted) throw at();
551
+ function ae(e) {
552
+ if (e != null && e.aborted) throw ft();
548
553
  }
549
- function we(e, t) {
554
+ function Ae(e, t) {
550
555
  return t ? new Promise((n, s) => {
551
- const r = () => s(at());
556
+ const r = () => s(ft());
552
557
  t.addEventListener("abort", r, { once: !0 }), e.then(n, s).finally(() => t.removeEventListener("abort", r));
553
558
  }) : e;
554
559
  }
555
- function tr({
560
+ function Wo({
556
561
  executeQuery: e,
557
- inlineItemLimit: t = pe,
558
- nodeBudget: n = Me,
562
+ inlineItemLimit: t = Me,
563
+ nodeBudget: n = Te,
559
564
  onUnsupportedItem: s,
560
565
  studentId: r,
561
566
  validate: i = !0
@@ -566,71 +571,148 @@ function tr({
566
571
  // limit rather than assuming one. @see ModulesDataAdapter.inlineNodeBudget
567
572
  inlineNodeBudget: n,
568
573
  async listModules({
569
- courseId: d,
570
- cursor: c,
574
+ courseId: c,
575
+ cursor: g,
571
576
  pageSize: l,
572
577
  includeItems: m,
573
- inlineItemsFirst: M,
574
- inlineFirst: _,
575
- signal: h
578
+ inlineItemsFirst: S,
579
+ inlineFirst: p,
580
+ signal: f
576
581
  }) {
577
- le(h);
578
- const f = m ? Math.min(_ ?? l, l) : l, w = Math.min(M ?? t, t), v = Math.max(1, Math.min(w, Math.floor(n / f))), A = await we(
579
- e(wn, {
580
- courseId: d,
581
- first: f,
582
+ ae(f);
583
+ const h = m ? Math.min(p ?? l, l) : l, w = Math.min(S ?? t, t), x = Math.max(1, Math.min(w, Math.floor(n / h))), L = await Ae(
584
+ e(Nn, {
585
+ courseId: c,
586
+ first: h,
582
587
  // Pass through what the caller was given; never derive an offset.
583
- after: c ?? null,
588
+ after: g ?? null,
584
589
  includeItems: m,
585
- itemsFirst: v,
590
+ itemsFirst: x,
586
591
  includeSubmissions: a,
587
592
  studentId: r ?? null
588
593
  }),
589
- h
594
+ f
590
595
  );
591
- le(h);
592
- const N = yn(A, u);
593
- return i ? Zt.parse(N) : N;
596
+ ae(f);
597
+ const C = Ln(L, u);
598
+ return i ? on.parse(C) : C;
594
599
  },
595
600
  async listModuleItems({
596
- moduleId: d,
597
- cursor: c,
601
+ moduleId: c,
602
+ cursor: g,
598
603
  pageSize: l,
599
604
  signal: m
600
605
  }) {
601
- le(m);
602
- const M = await we(
603
- e(En, {
604
- moduleId: d,
606
+ ae(m);
607
+ const S = await Ae(
608
+ e(Dn, {
609
+ moduleId: c,
605
610
  first: l,
606
- after: c ?? null,
611
+ after: g ?? null,
607
612
  includeSubmissions: a,
608
613
  studentId: r ?? null
609
614
  }),
610
615
  m
611
616
  );
612
- le(m);
613
- const _ = Pn(M, d, u);
614
- return i ? Jt.parse(_) : _;
617
+ ae(m);
618
+ const p = An(S, c, u);
619
+ return i ? ln.parse(p) : p;
615
620
  }
616
621
  };
617
622
  }
618
- const _e = 100, ut = 100, dt = 100, Cn = 4, ce = 5 * 60 * 1e3, ct = 20, de = { hasNextPage: !1, endCursor: null }, W = ["platform-modules"], te = {
619
- all: W,
620
- course: (e) => [...W, e],
621
- list: (e, t = {}) => [...W, e, "list", t],
622
- items: (e, t, n = {}) => [...W, e, "module", t, "items", n]
623
+ const fe = {
624
+ formatters: {},
625
+ itemTypes: {},
626
+ itemStatuses: {},
627
+ itemMeta: {},
628
+ filters: {},
629
+ moduleActions: {},
630
+ itemActions: {},
631
+ navigation: {}
623
632
  };
624
- function vn(e) {
625
- return [...W, e, "list"];
633
+ Object.freeze(fe);
634
+ for (const e of Object.values(fe))
635
+ Object.freeze(e);
636
+ const ht = Oe(null);
637
+ function Ho({ value: e, children: t }) {
638
+ return /* @__PURE__ */ o(ht.Provider, { value: e, children: t });
639
+ }
640
+ function Ko() {
641
+ return $e(ht) ?? fe;
642
+ }
643
+ const Se = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
644
+ function me(e, t) {
645
+ const n = Object.entries(t ?? {}).filter(([, s]) => s !== void 0);
646
+ return { ...e, ...Object.fromEntries(n) };
647
+ }
648
+ function O(e, t = {}) {
649
+ const n = Object.keys(e).map((r) => [
650
+ r,
651
+ me(e[r], Se(t, r) ? t[r] : void 0)
652
+ ]), s = Object.keys(t).filter((r) => !Se(e, r)).sort().map((r) => [r, me({}, t[r])]);
653
+ return Object.fromEntries([...n, ...s]);
654
+ }
655
+ function Vo(e) {
656
+ return Object.keys(e).filter((t) => !e[t].hidden).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
657
+ }
658
+ const kn = d.object({
659
+ /** Resolved through `t` at render. */
660
+ label: d.string(),
661
+ /** Sort position, ascending. The base spaces its values (10, 20, 30…) so a host can insert between two built-ins. */
662
+ order: d.number(),
663
+ /** How a host removes an entry. Stays in the resolved registry; `visibleEntries` filters it at read time. */
664
+ hidden: d.boolean().optional()
665
+ });
666
+ function qn(e) {
667
+ return d.record(d.string(), e);
668
+ }
669
+ const $ = qn(kn.strict()), Rn = d.object({
670
+ formatters: d.object({}).strict(),
671
+ itemTypes: $,
672
+ itemStatuses: $,
673
+ itemMeta: $,
674
+ filters: $,
675
+ moduleActions: $,
676
+ itemActions: $,
677
+ navigation: d.object({}).strict()
678
+ });
679
+ function Fn(e, t = {}) {
680
+ const n = Object.keys(t).filter((r) => !Se(e, r));
681
+ if (n.length > 0)
682
+ throw new Error(
683
+ `Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
684
+ );
685
+ const s = {
686
+ formatters: me(e.formatters, t.formatters),
687
+ itemTypes: O(e.itemTypes, t.itemTypes),
688
+ itemStatuses: O(e.itemStatuses, t.itemStatuses),
689
+ itemMeta: O(e.itemMeta, t.itemMeta),
690
+ filters: O(e.filters, t.filters),
691
+ moduleActions: O(e.moduleActions, t.moduleActions),
692
+ itemActions: O(e.itemActions, t.itemActions),
693
+ navigation: me(e.navigation, t.navigation)
694
+ };
695
+ return Rn.parse(s), s;
696
+ }
697
+ function Zo(e = {}) {
698
+ return Fn(fe, e);
699
+ }
700
+ const Pe = 100, pt = 100, It = 100, zn = 4, he = 5 * 60 * 1e3, bt = 20, ge = { hasNextPage: !1, endCursor: null }, B = ["platform-modules"], ee = {
701
+ all: B,
702
+ course: (e) => [...B, e],
703
+ list: (e, t = {}) => [...B, e, "list", t],
704
+ items: (e, t, n = {}) => [...B, e, "module", t, "items", n]
705
+ };
706
+ function Un(e) {
707
+ return [...B, e, "list"];
626
708
  }
627
- function mt(e, t) {
628
- return [...W, e, "module", t, "items"];
709
+ function Mt(e, t) {
710
+ return [...B, e, "module", t, "items"];
629
711
  }
630
- function gt(e) {
712
+ function St(e) {
631
713
  return e.pageInfo.hasNextPage ? e.pageInfo.endCursor : null;
632
714
  }
633
- function ht(e) {
715
+ function yt(e) {
634
716
  const {
635
717
  courseId: t,
636
718
  adapter: n,
@@ -639,14 +721,14 @@ function ht(e) {
639
721
  inlineItemsFirst: i,
640
722
  inlineFirst: u,
641
723
  view: a,
642
- staleTime: d,
643
- enabled: c
724
+ staleTime: c,
725
+ enabled: g
644
726
  } = e;
645
727
  return {
646
728
  // `inlineItemsFirst` is deliberately NOT in the key. It is derived from the
647
729
  // probe of this very list, so it cannot vary for a fixed (view, pageSize,
648
730
  // includeItems) — including it would only add a segment that never differs.
649
- queryKey: te.list(t, { view: a, pageSize: s, includeItems: r }),
731
+ queryKey: ee.list(t, { view: a, pageSize: s, includeItems: r }),
650
732
  initialPageParam: null,
651
733
  queryFn: ({ pageParam: l, signal: m }) => n.listModules({
652
734
  courseId: t,
@@ -657,47 +739,47 @@ function ht(e) {
657
739
  inlineFirst: u,
658
740
  signal: m
659
741
  }),
660
- getNextPageParam: gt,
661
- enabled: c,
662
- staleTime: d,
742
+ getNextPageParam: St,
743
+ enabled: g,
744
+ staleTime: c,
663
745
  // A refetch of an infinite query re-walks every page it has loaded. Doing
664
- // that because someone alt-tabbed is the Canvas behaviour we are replacing.
746
+ // that because someone alt-tabbed is the Canvas behavior we are replacing.
665
747
  refetchOnWindowFocus: !1
666
748
  };
667
749
  }
668
- function ft(e) {
669
- const { courseId: t, moduleId: n, adapter: s, pageSize: r, view: i, staleTime: u, enabled: a, limit: d } = e;
750
+ function _t(e) {
751
+ const { courseId: t, moduleId: n, adapter: s, pageSize: r, view: i, staleTime: u, enabled: a, limit: c } = e;
670
752
  return {
671
- queryKey: te.items(t, n, { view: i, pageSize: r }),
753
+ queryKey: ee.items(t, n, { view: i, pageSize: r }),
672
754
  initialPageParam: null,
673
- queryFn: ({ pageParam: c, signal: l }) => {
674
- const m = () => s.listModuleItems({ courseId: t, moduleId: n, cursor: c, pageSize: r, signal: l });
675
- return d ? d(() => {
755
+ queryFn: ({ pageParam: g, signal: l }) => {
756
+ const m = () => s.listModuleItems({ courseId: t, moduleId: n, cursor: g, pageSize: r, signal: l });
757
+ return c ? c(() => {
676
758
  if (l.aborted)
677
759
  throw new DOMException("The operation was aborted.", "AbortError");
678
760
  return m();
679
761
  }) : m();
680
762
  },
681
- getNextPageParam: gt,
763
+ getNextPageParam: St,
682
764
  enabled: a,
683
765
  staleTime: u,
684
766
  refetchOnWindowFocus: !1
685
767
  };
686
768
  }
687
- function Tn(e) {
769
+ function On(e) {
688
770
  var w;
689
771
  const {
690
772
  courseId: t,
691
773
  adapter: n,
692
- pageSize: s = _e,
774
+ pageSize: s = Pe,
693
775
  includeItems: r = !1,
694
776
  inlineItemsFirst: i,
695
777
  inlineFirst: u,
696
778
  view: a,
697
- staleTime: d = ce,
698
- enabled: c = !0
699
- } = e, l = be(
700
- ht({
779
+ staleTime: c = he,
780
+ enabled: g = !0
781
+ } = e, l = _e(
782
+ yt({
701
783
  courseId: t,
702
784
  adapter: n,
703
785
  pageSize: s,
@@ -705,36 +787,36 @@ function Tn(e) {
705
787
  inlineItemsFirst: i,
706
788
  inlineFirst: u,
707
789
  view: a,
708
- staleTime: d,
709
- enabled: c
790
+ staleTime: c,
791
+ enabled: g
710
792
  })
711
- ), m = (w = l.data) == null ? void 0 : w.pages, M = L(() => (m ?? []).flatMap((v) => v.modules), [m]), _ = m && m.length > 0 ? m[m.length - 1].pageInfo : de, h = l.fetchNextPage, f = D(() => {
712
- h();
713
- }, [h]);
793
+ ), m = (w = l.data) == null ? void 0 : w.pages, S = v(() => (m ?? []).flatMap((x) => x.modules), [m]), p = m && m.length > 0 ? m[m.length - 1].pageInfo : ge, f = l.fetchNextPage, h = A(() => {
794
+ f();
795
+ }, [f]);
714
796
  return {
715
- modules: M,
716
- pageInfo: _,
717
- hasNextPage: _.hasNextPage,
718
- fetchNextPage: f,
797
+ modules: S,
798
+ pageInfo: p,
799
+ hasNextPage: p.hasNextPage,
800
+ fetchNextPage: h,
719
801
  isLoading: l.isLoading,
720
802
  isFetchingNextPage: l.isFetchingNextPage,
721
803
  isPending: l.isPending,
722
804
  error: l.error
723
805
  };
724
806
  }
725
- function nr(e) {
726
- var f;
807
+ function Xo(e) {
808
+ var h;
727
809
  const {
728
810
  courseId: t,
729
811
  moduleId: n,
730
812
  adapter: s,
731
- pageSize: r = ut,
813
+ pageSize: r = pt,
732
814
  view: i,
733
815
  enabled: u = !0,
734
- staleTime: a = ce,
735
- limit: d
736
- } = e, c = be(
737
- ft({
816
+ staleTime: a = he,
817
+ limit: c
818
+ } = e, g = _e(
819
+ _t({
738
820
  courseId: t,
739
821
  moduleId: n,
740
822
  adapter: s,
@@ -742,22 +824,22 @@ function nr(e) {
742
824
  view: i,
743
825
  staleTime: a,
744
826
  enabled: u,
745
- limit: d
827
+ limit: c
746
828
  })
747
- ), l = (f = c.data) == null ? void 0 : f.pages, m = L(() => (l ?? []).flatMap((w) => w.items), [l]), M = l && l.length > 0 ? l[l.length - 1].pageInfo : de, _ = c.fetchNextPage, h = D(() => {
748
- _();
749
- }, [_]);
829
+ ), l = (h = g.data) == null ? void 0 : h.pages, m = v(() => (l ?? []).flatMap((w) => w.items), [l]), S = l && l.length > 0 ? l[l.length - 1].pageInfo : ge, p = g.fetchNextPage, f = A(() => {
830
+ p();
831
+ }, [p]);
750
832
  return {
751
833
  items: m,
752
- pageInfo: M,
753
- hasNextPage: M.hasNextPage,
754
- fetchNextPage: h,
755
- isLoading: c.isLoading,
756
- isFetchingNextPage: c.isFetchingNextPage,
757
- error: c.error
834
+ pageInfo: S,
835
+ hasNextPage: S.hasNextPage,
836
+ fetchNextPage: f,
837
+ isLoading: g.isLoading,
838
+ isFetchingNextPage: g.isFetchingNextPage,
839
+ error: g.error
758
840
  };
759
841
  }
760
- function Nn(e, t, n = Me) {
842
+ function $n(e, t, n = Te) {
761
843
  if (e.pageInfo.hasNextPage) return "onDemand";
762
844
  let s = 0, r = 0;
763
845
  for (const i of e.modules) {
@@ -766,29 +848,29 @@ function Nn(e, t, n = Me) {
766
848
  }
767
849
  return s > t * 2 ? "onDemand" : Math.max(e.modules.length, 1) * Math.max(r, 1) <= n ? "inline" : "onDemand";
768
850
  }
769
- function An(e) {
770
- var M;
851
+ function Bn(e) {
852
+ var S;
771
853
  const {
772
854
  courseId: t,
773
855
  adapter: n,
774
856
  mode: s = "auto",
775
- inlineThreshold: r = dt,
776
- nodeBudget: i = n.inlineNodeBudget ?? Me,
777
- pageSize: u = _e,
857
+ inlineThreshold: r = It,
858
+ nodeBudget: i = n.inlineNodeBudget ?? Te,
859
+ pageSize: u = Pe,
778
860
  view: a,
779
- staleTime: d = ce
780
- } = e, c = s === "auto", l = be(
781
- ht({
861
+ staleTime: c = he
862
+ } = e, g = s === "auto", l = _e(
863
+ yt({
782
864
  courseId: t,
783
865
  adapter: n,
784
866
  pageSize: u,
785
867
  includeItems: !1,
786
868
  view: a,
787
- staleTime: d,
788
- enabled: c
869
+ staleTime: c,
870
+ enabled: g
789
871
  })
790
872
  );
791
- if (!c)
873
+ if (!g)
792
874
  return {
793
875
  resolvedMode: s,
794
876
  isResolving: !1,
@@ -804,87 +886,87 @@ function An(e) {
804
886
  error: l.error,
805
887
  inlineShape: null
806
888
  };
807
- const m = (M = l.data) == null ? void 0 : M.pages[0];
889
+ const m = (S = l.data) == null ? void 0 : S.pages[0];
808
890
  return m ? {
809
- resolvedMode: Nn(m, r, i),
891
+ resolvedMode: $n(m, r, i),
810
892
  isResolving: !1,
811
893
  probed: !0,
812
894
  error: null,
813
- inlineShape: Ln(m)
895
+ inlineShape: Gn(m)
814
896
  } : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
815
897
  }
816
- function Ln(e) {
898
+ function Gn(e) {
817
899
  let t = 1;
818
900
  for (const n of e.modules)
819
901
  n.itemCount > t && (t = n.itemCount);
820
902
  return { moduleCount: Math.max(e.modules.length, 1), maxItemCount: t };
821
903
  }
822
- const Ee = "\0", Dn = /* @__PURE__ */ new Map();
823
- function Rn(e, t, n = ct) {
824
- const s = Fe(), r = B(/* @__PURE__ */ new Map()), [i, u] = X(Dn), a = e.join(Ee), d = L(() => a === "" ? [] : a.split(Ee), [a]);
825
- ae(() => {
904
+ const ve = "\0", jn = /* @__PURE__ */ new Map();
905
+ function Yn(e, t, n = bt) {
906
+ const s = je(), r = q(/* @__PURE__ */ new Map()), [i, u] = V(jn), a = e.join(ve), c = v(() => a === "" ? [] : a.split(ve), [a]);
907
+ ce(() => {
826
908
  const l = r.current, m = () => {
827
- u((h) => {
828
- const f = /* @__PURE__ */ new Map();
829
- let w = h.size !== l.size;
830
- for (const [v, A] of l) {
831
- const N = A.getCurrentResult();
832
- f.set(v, N), !w && h.get(v) !== N && (w = !0);
909
+ u((f) => {
910
+ const h = /* @__PURE__ */ new Map();
911
+ let w = f.size !== l.size;
912
+ for (const [x, L] of l) {
913
+ const C = L.getCurrentResult();
914
+ h.set(x, C), !w && f.get(x) !== C && (w = !0);
833
915
  }
834
- return w ? f : h;
916
+ return w ? h : f;
835
917
  });
836
- }, M = new Set(d);
837
- for (const h of d) {
838
- if (l.has(h)) continue;
839
- const f = new Ct(
918
+ }, S = new Set(c);
919
+ for (const f of c) {
920
+ if (l.has(f)) continue;
921
+ const h = new kt(
840
922
  s,
841
- t(h, !0)
923
+ t(f, !0)
842
924
  );
843
- l.set(h, f), f.subscribe(m);
925
+ l.set(f, h), h.subscribe(m);
844
926
  }
845
- for (const [h, f] of l)
846
- f.setOptions(t(h, M.has(h)));
847
- for (const h of d) {
848
- const f = l.get(h);
849
- f && (l.delete(h), l.set(h, f));
927
+ for (const [f, h] of l)
928
+ h.setOptions(t(f, S.has(f)));
929
+ for (const f of c) {
930
+ const h = l.get(f);
931
+ h && (l.delete(f), l.set(f, h));
850
932
  }
851
- let _ = l.size - M.size;
852
- if (_ > n)
853
- for (const [h, f] of l) {
854
- if (_ <= n) break;
855
- M.has(h) || (f.destroy(), l.delete(h), _ -= 1);
933
+ let p = l.size - S.size;
934
+ if (p > n)
935
+ for (const [f, h] of l) {
936
+ if (p <= n) break;
937
+ S.has(f) || (h.destroy(), l.delete(f), p -= 1);
856
938
  }
857
939
  m();
858
- }, [s, t, d, n]), ae(() => {
940
+ }, [s, t, c, n]), ce(() => {
859
941
  const l = r.current;
860
942
  return () => {
861
943
  for (const m of l.values()) m.destroy();
862
944
  l.clear();
863
945
  };
864
946
  }, []);
865
- const c = D((l) => {
947
+ const g = A((l) => {
866
948
  var m;
867
949
  (m = r.current.get(l)) == null || m.fetchNextPage();
868
950
  }, []);
869
- return { results: i, fetchNextPage: c };
951
+ return { results: i, fetchNextPage: g };
870
952
  }
871
- const qn = [], Fn = () => {
953
+ const Qn = [], Wn = () => {
872
954
  };
873
- function sr(e) {
874
- var Q, oe;
955
+ function Jo(e) {
956
+ var z, ie;
875
957
  const {
876
958
  courseId: t,
877
959
  adapter: n,
878
960
  view: s,
879
961
  itemsMode: r = "auto",
880
- inlineThreshold: i = dt,
881
- pageSize: u = _e,
882
- itemPageSize: a = ut,
883
- itemConcurrency: d = Cn,
884
- retainCollapsedLimit: c = ct,
885
- staleTime: l = ce,
962
+ inlineThreshold: i = It,
963
+ pageSize: u = Pe,
964
+ itemPageSize: a = pt,
965
+ itemConcurrency: c = zn,
966
+ retainCollapsedLimit: g = bt,
967
+ staleTime: l = he,
886
968
  initialExpandedModuleIds: m
887
- } = e, M = Fe(), _ = An({
969
+ } = e, S = je(), p = Bn({
888
970
  courseId: t,
889
971
  adapter: n,
890
972
  mode: r,
@@ -892,264 +974,362 @@ function sr(e) {
892
974
  pageSize: u,
893
975
  view: s,
894
976
  staleTime: l
895
- }), h = _.resolvedMode, f = Tn({
977
+ }), f = p.resolvedMode, h = On({
896
978
  courseId: t,
897
979
  adapter: n,
898
980
  pageSize: u,
899
981
  view: s,
900
982
  staleTime: l,
901
- includeItems: h === "inline",
983
+ includeItems: f === "inline",
902
984
  // Measured by the probe, not assumed. Canvas charges GraphQL complexity on
903
985
  // the requested shape, so asking for the ceiling rejects the query outright
904
986
  // even on a tiny course. @see UseItemsModeResult.inlineShape
905
- inlineItemsFirst: (Q = _.inlineShape) == null ? void 0 : Q.maxItemCount,
987
+ inlineItemsFirst: (z = p.inlineShape) == null ? void 0 : z.maxItemCount,
906
988
  // Both axes, not just one: the budget is charged on the product, so asking
907
989
  // for 100 modules when page 1 held 6 is what forces `inlineItemsFirst` down.
908
- inlineFirst: (oe = _.inlineShape) == null ? void 0 : oe.moduleCount,
909
- enabled: h !== null
910
- }), [w, v] = X(
990
+ inlineFirst: (ie = p.inlineShape) == null ? void 0 : ie.moduleCount,
991
+ enabled: f !== null
992
+ }), [w, x] = V(
911
993
  () => m ?? []
912
- ), A = L(() => {
913
- const b = /* @__PURE__ */ new Map();
914
- for (const p of f.modules) b.set(p.id, p);
915
- return b;
916
- }, [f.modules]), N = L(
917
- () => w.filter((b) => {
918
- const p = A.get(b);
919
- return p !== void 0 && p.items === void 0;
994
+ ), L = v(() => {
995
+ const y = /* @__PURE__ */ new Map();
996
+ for (const b of h.modules) y.set(b.id, b);
997
+ return y;
998
+ }, [h.modules]), C = v(
999
+ () => w.filter((y) => {
1000
+ const b = L.get(y);
1001
+ return b !== void 0 && b.items === void 0;
920
1002
  }),
921
- [w, A]
922
- ), ne = L(() => new Set(N), [N]), E = L(() => Nt(d), [d]), z = D(
923
- (b, p) => ft({
1003
+ [w, L]
1004
+ ), ne = v(() => new Set(C), [C]), se = v(() => qt(c), [c]), E = A(
1005
+ (y, b) => _t({
924
1006
  courseId: t,
925
- moduleId: b,
1007
+ moduleId: y,
926
1008
  adapter: n,
927
1009
  pageSize: a,
928
1010
  view: s,
929
1011
  staleTime: l,
930
- enabled: p,
931
- limit: E
1012
+ enabled: b,
1013
+ limit: se
932
1014
  }),
933
- [t, n, a, s, l, E]
934
- ), G = Rn(N, z, c), K = G.fetchNextPage, q = B(/* @__PURE__ */ new Map()), H = D(
935
- (b) => {
936
- let p = q.current.get(b);
937
- return p || (p = () => K(b), q.current.set(b, p)), p;
1015
+ [t, n, a, s, l, se]
1016
+ ), G = Yn(C, E, g), j = G.fetchNextPage, R = q(/* @__PURE__ */ new Map()), Y = A(
1017
+ (y) => {
1018
+ let b = R.current.get(y);
1019
+ return b || (b = () => j(y), R.current.set(y, b)), b;
938
1020
  },
939
- [K]
940
- ), O = D((b) => {
941
- v(
942
- (p) => p.includes(b) ? p : [...p, b]
1021
+ [j]
1022
+ ), D = A((y) => {
1023
+ x(
1024
+ (b) => b.includes(y) ? b : [...b, y]
943
1025
  );
944
- }, []), Y = D(
945
- (b) => {
946
- v((p) => p.filter((C) => C !== b)), M.cancelQueries({ queryKey: mt(t, b) });
1026
+ }, []), F = A(
1027
+ (y) => {
1028
+ x((b) => b.filter((I) => I !== y)), S.cancelQueries({ queryKey: Mt(t, y) });
947
1029
  },
948
- [M, t]
949
- ), V = B(w);
950
- V.current = w;
951
- const se = D(
952
- (b) => {
953
- V.current.includes(b) ? Y(b) : O(b);
1030
+ [S, t]
1031
+ ), Q = q(w);
1032
+ Q.current = w;
1033
+ const re = A(
1034
+ (y) => {
1035
+ Q.current.includes(y) ? F(y) : D(y);
954
1036
  },
955
- [Y, O]
956
- ), U = G.results, re = B(/* @__PURE__ */ new Map()), $ = D(
957
- (b) => {
958
- var ye;
959
- const p = A.get(b), C = U.get(b), x = ne.has(b), T = re.current.get(b);
960
- if (T && T.items === (p == null ? void 0 : p.items) && T.result === C && T.active === x)
961
- return T.value;
962
- const j = (ie) => (re.current.set(b, { items: p == null ? void 0 : p.items, result: C, active: x, value: ie }), ie);
963
- if ((p == null ? void 0 : p.items) !== void 0)
964
- return j({
965
- items: p.items,
966
- pageInfo: de,
1037
+ [F, D]
1038
+ ), k = G.results, oe = q(/* @__PURE__ */ new Map()), W = A(
1039
+ (y) => {
1040
+ var xe;
1041
+ const b = L.get(y), I = k.get(y), H = ne.has(y), K = oe.current.get(y);
1042
+ if (K && K.items === (b == null ? void 0 : b.items) && K.result === I && K.active === H)
1043
+ return K.value;
1044
+ const we = (le) => (oe.current.set(y, { items: b == null ? void 0 : b.items, result: I, active: H, value: le }), le);
1045
+ if ((b == null ? void 0 : b.items) !== void 0)
1046
+ return we({
1047
+ items: b.items,
1048
+ pageInfo: ge,
967
1049
  hasNextPage: !1,
968
- fetchNextPage: Fn,
1050
+ fetchNextPage: Wn,
969
1051
  isLoading: !1,
970
1052
  isFetchingNextPage: !1,
971
1053
  error: null,
972
1054
  source: "inline"
973
1055
  });
974
- const F = (ye = C == null ? void 0 : C.data) == null ? void 0 : ye.pages, Et = F ? F.flatMap((ie) => ie.items) : qn, Se = F && F.length > 0 ? F[F.length - 1].pageInfo : de;
975
- return j({
976
- items: Et,
977
- pageInfo: Se,
978
- hasNextPage: Se.hasNextPage,
979
- fetchNextPage: H(b),
1056
+ const U = (xe = I == null ? void 0 : I.data) == null ? void 0 : xe.pages, Dt = U ? U.flatMap((le) => le.items) : Qn, Ee = U && U.length > 0 ? U[U.length - 1].pageInfo : ge;
1057
+ return we({
1058
+ items: Dt,
1059
+ pageInfo: Ee,
1060
+ hasNextPage: Ee.hasNextPage,
1061
+ fetchNextPage: Y(y),
980
1062
  // Between the click and the observer being wired up there is one commit
981
1063
  // with no result yet; report that as loading rather than as "empty".
982
- isLoading: C ? C.isLoading : x,
983
- isFetchingNextPage: (C == null ? void 0 : C.isFetchingNextPage) ?? !1,
984
- error: (C == null ? void 0 : C.error) ?? null,
1064
+ isLoading: I ? I.isLoading : H,
1065
+ isFetchingNextPage: (I == null ? void 0 : I.isFetchingNextPage) ?? !1,
1066
+ error: (I == null ? void 0 : I.error) ?? null,
985
1067
  source: "onDemand"
986
1068
  });
987
1069
  },
988
- [A, U, H, ne]
1070
+ [L, k, Y, ne]
989
1071
  );
990
1072
  return {
991
- modules: f.modules,
992
- pageInfo: f.pageInfo,
993
- hasNextPage: f.hasNextPage,
994
- fetchNextPage: f.fetchNextPage,
995
- isLoading: _.isResolving || f.isPending,
996
- isFetchingNextPage: f.isFetchingNextPage,
997
- error: f.error ?? _.error,
998
- itemsMode: h,
999
- getItems: $,
1000
- expandModule: O,
1001
- collapseModule: Y,
1002
- toggleModule: se,
1073
+ modules: h.modules,
1074
+ pageInfo: h.pageInfo,
1075
+ hasNextPage: h.hasNextPage,
1076
+ fetchNextPage: h.fetchNextPage,
1077
+ isLoading: p.isResolving || h.isPending,
1078
+ isFetchingNextPage: h.isFetchingNextPage,
1079
+ error: h.error ?? p.error,
1080
+ itemsMode: f,
1081
+ getItems: W,
1082
+ expandModule: D,
1083
+ collapseModule: F,
1084
+ toggleModule: re,
1003
1085
  expandedModuleIds: w
1004
1086
  };
1005
1087
  }
1006
- function rr(e, t, n, s) {
1007
- const r = s ? te.items(t, n, s) : mt(t, n);
1088
+ function ei(e, t, n, s) {
1089
+ const r = s ? ee.items(t, n, s) : Mt(t, n);
1008
1090
  return e.invalidateQueries({ queryKey: r });
1009
1091
  }
1010
- function or(e, t, n) {
1011
- const s = n ? te.list(t, n) : vn(t);
1092
+ function ti(e, t, n) {
1093
+ const s = n ? ee.list(t, n) : Un(t);
1012
1094
  return e.invalidateQueries({ queryKey: s });
1013
1095
  }
1014
- function ir(e, t) {
1015
- return e.invalidateQueries({ queryKey: te.course(t) });
1016
- }
1017
- const kn = /%\{(\w+)\}/g, pt = (e, t) => t ? e.replace(
1018
- kn,
1019
- (n, s) => s in t ? String(t[s]) : n
1020
- ) : e, k = "en-US", zn = { t: pt, locale: k }, It = vt(null);
1021
- function lr({ t: e, locale: t, children: n }) {
1022
- const s = L(
1023
- () => ({ t: e ?? pt, locale: t ?? k }),
1024
- [e, t]
1025
- );
1026
- return /* @__PURE__ */ o(It.Provider, { value: s, children: n });
1027
- }
1028
- function R() {
1029
- return Tt(It) ?? zn;
1030
- }
1031
- const On = 864e5, Ce = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map();
1032
- function me(e) {
1033
- const t = ve.get(e);
1034
- if (t) return t;
1035
- const n = new Intl.NumberFormat(e);
1036
- return ve.set(e, n), n;
1096
+ function ni(e, t) {
1097
+ return e.invalidateQueries({ queryKey: ee.course(t) });
1098
+ }
1099
+ const Hn = "Course modules", Kn = { one: "%{count} module loaded", other: "%{count} modules loaded" }, Vn = "Search by name", Zn = "Search…", Xn = "Expand / collapse", Jn = "Expand all", es = "Collapse all", ts = "Search matches module names only — items of collapsed modules are not loaded.", ns = "Modules failed to load: %{message}", ss = "Loading modules", rs = "This course has no modules.", os = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, is = "Clear filters", ls = "Loading more modules…", as = "Load more modules (%{count} loaded)", us = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, cs = "Filter", ds = "All", ms = "In progress", gs = "Complete", fs = "Due this week", hs = "Missing", ps = "Locked until prerequisites are met", Is = "%{name} progress", bs = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, Ms = "Items failed to load: %{message}", Ss = "Loading items", ys = "Loading…", _s = "No items.", Ts = "Loading more items…", Ps = "Load more items (%{loaded} of %{count} loaded)", ws = "(unpublished)", Es = "Collapse %{name}", xs = "Expand %{name}", Cs = "Not started", Ls = "In progress", As = "All items complete", vs = "All items graded", Ns = "Missing", Ds = "Locked", ks = "Not started", qs = "In progress", Rs = "Submitted", Fs = "Graded", zs = "Missing", Us = "Locked", Os = "Assignment", $s = "Quiz", Bs = "Discussion", Gs = "Page", js = "File", Ys = "External URL", Qs = "External tool", Ws = "Text header", Hs = "View the item", Ks = "Submit the assignment", Vs = "Contribute to the page", Zs = "Mark as done", Xs = "Score at least the minimum", Js = "Score at least %{count}", er = "Score at least the minimum percentage", tr = "Score at least %{count}%", nr = "Complete the requirement", sr = "today, %{time}", rr = "yesterday, %{time}", or = "tomorrow, %{time}", ir = "%{date}, %{time}", lr = "Due %{when}", ar = "Will unlock on %{when}", ur = { one: "%{count} pt", other: "%{count} pts" }, cr = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, dr = "%{count} min", mr = "Unpublished", gr = "Untitled item", fr = "opens in a new window", hr = {
1100
+ pageTitle: Hn,
1101
+ modulesLoadedAnnouncement: Kn,
1102
+ moduleSearchLabel: Vn,
1103
+ searchPlaceholder: Zn,
1104
+ expandCollapseTrigger: Xn,
1105
+ expandAll: Jn,
1106
+ collapseAll: es,
1107
+ searchScopeHint: ts,
1108
+ modulesLoadErrorAlert: ns,
1109
+ modulesLoadingSpinnerLabel: ss,
1110
+ noModulesEmptyState: rs,
1111
+ filteredEmptyState: os,
1112
+ clearFilters: is,
1113
+ loadMoreModulesLoading: ls,
1114
+ loadMoreModules: as,
1115
+ allModulesLoaded: us,
1116
+ filterGroupLabel: cs,
1117
+ filterAll: ds,
1118
+ filterInProgress: ms,
1119
+ filterComplete: gs,
1120
+ filterDueThisWeek: fs,
1121
+ filterMissing: hs,
1122
+ lockedByline: ps,
1123
+ moduleProgressScreenReaderLabel: Is,
1124
+ itemsLoadedAnnouncement: bs,
1125
+ itemsLoadErrorAlert: Ms,
1126
+ itemsLoadingSpinnerLabel: Ss,
1127
+ itemsLoadingText: ys,
1128
+ noItemsEmptyState: _s,
1129
+ loadMoreItemsLoading: Ts,
1130
+ loadMoreItems: Ps,
1131
+ moduleUnpublishedBadge: ws,
1132
+ collapseModule: Es,
1133
+ expandModule: xs,
1134
+ moduleStatusNotStarted: Cs,
1135
+ moduleStatusInProgress: Ls,
1136
+ moduleStatusAllSubmitted: As,
1137
+ moduleStatusAllGraded: vs,
1138
+ moduleStatusMissing: Ns,
1139
+ moduleStatusLocked: Ds,
1140
+ itemStatusNotStarted: ks,
1141
+ itemStatusInProgress: qs,
1142
+ itemStatusSubmitted: Rs,
1143
+ itemStatusGraded: Fs,
1144
+ itemStatusMissing: zs,
1145
+ itemStatusLocked: Us,
1146
+ itemTypeAssignment: Os,
1147
+ itemTypeQuiz: $s,
1148
+ itemTypeDiscussion: Bs,
1149
+ itemTypePage: Gs,
1150
+ itemTypeFile: js,
1151
+ itemTypeExternalUrl: Ys,
1152
+ itemTypeExternalTool: Qs,
1153
+ itemTypeSubHeader: Ws,
1154
+ requirementMustView: Hs,
1155
+ requirementMustSubmit: Ks,
1156
+ requirementMustContribute: Vs,
1157
+ requirementMustMarkDone: Zs,
1158
+ requirementMinScoreUnknown: Xs,
1159
+ requirementMinScore: Js,
1160
+ requirementMinPercentageUnknown: er,
1161
+ requirementMinPercentage: tr,
1162
+ requirementUnknown: nr,
1163
+ dateTimeToday: sr,
1164
+ dateTimeYesterday: rr,
1165
+ dateTimeTomorrow: or,
1166
+ dateTimeWithDate: ir,
1167
+ dueByline: lr,
1168
+ unlockByline: ar,
1169
+ pointsAbbreviated: ur,
1170
+ progressSummary: cr,
1171
+ durationMinutes: dr,
1172
+ itemUnpublishedLabel: mr,
1173
+ itemUntitled: gr,
1174
+ opensInNewWindow: fr
1175
+ }, pr = /%\{(\w+)\}/g, Ir = hr, te = "en-US", br = /* @__PURE__ */ new Map(), Mr = /* @__PURE__ */ new Map();
1176
+ function Tt(e, t, n) {
1177
+ const s = e.get(t);
1178
+ if (s) return s;
1179
+ const r = n();
1180
+ return e.set(t, r), r;
1181
+ }
1182
+ function Sr(e, t, n) {
1183
+ return n ? e.replace(pr, (s, r) => {
1184
+ if (!Object.prototype.hasOwnProperty.call(n, r)) return s;
1185
+ const i = n[r];
1186
+ return typeof i == "number" && Number.isFinite(i) ? Tt(Mr, t, () => new Intl.NumberFormat(t)).format(i) : String(i);
1187
+ }) : e;
1037
1188
  }
1038
- function Un(e) {
1039
- const t = Te.get(e);
1189
+ function yr(e, t, n) {
1190
+ const s = n == null ? void 0 : n.count;
1191
+ if (typeof s == "number" && Number.isFinite(s)) {
1192
+ const r = Tt(br, t, () => new Intl.PluralRules(t)).select(s), i = e[r];
1193
+ if (typeof i == "string") return i;
1194
+ }
1195
+ return typeof e.other == "string" ? e.other : void 0;
1196
+ }
1197
+ function Ne(e, t, n) {
1198
+ if (typeof e == "string") return e;
1199
+ if (e !== null && typeof e == "object")
1200
+ return yr(e, t, n);
1201
+ }
1202
+ function _r(e, t, n, s) {
1203
+ const r = Ne(e == null ? void 0 : e[t], n, s);
1204
+ if (typeof r == "string") return r;
1205
+ const i = Ne(Ir[t], n, s);
1206
+ return typeof i == "string" ? i : t;
1207
+ }
1208
+ function Pt(e, t = te) {
1209
+ return (n, s) => Sr(_r(e, n, t, s), t, s);
1210
+ }
1211
+ const Tr = Pt(), Pr = { t: Tr, locale: te }, wt = Oe(null);
1212
+ function si({
1213
+ translations: e,
1214
+ locale: t,
1215
+ children: n
1216
+ }) {
1217
+ const s = v(() => {
1218
+ const r = t ?? te;
1219
+ return { t: Pt(e, r), locale: r };
1220
+ }, [e, t]);
1221
+ return /* @__PURE__ */ o(wt.Provider, { value: s, children: n });
1222
+ }
1223
+ function N() {
1224
+ return $e(wt) ?? Pr;
1225
+ }
1226
+ const wr = 864e5, De = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map();
1227
+ function Er(e) {
1228
+ const t = ke.get(e);
1040
1229
  if (t) return t;
1041
1230
  const n = new Intl.NumberFormat(e, { minimumIntegerDigits: 2, useGrouping: !1 });
1042
- return Te.set(e, n), n;
1043
- }
1044
- function ge(e = k) {
1045
- return me(e);
1231
+ return ke.set(e, n), n;
1046
1232
  }
1047
- function $n(e) {
1048
- const t = Ce.get(e);
1233
+ function xr(e) {
1234
+ const t = De.get(e);
1049
1235
  if (t) return t;
1050
1236
  const n = {
1051
1237
  time: new Intl.DateTimeFormat(e, { hour: "numeric", minute: "2-digit" }),
1052
1238
  day: new Intl.DateTimeFormat(e, { month: "long", day: "numeric" }),
1053
1239
  dayYear: new Intl.DateTimeFormat(e, { month: "long", day: "numeric", year: "numeric" })
1054
1240
  };
1055
- return Ce.set(e, n), n;
1241
+ return De.set(e, n), n;
1056
1242
  }
1057
- function bt(e, t) {
1243
+ function Et(e, t) {
1058
1244
  const n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), s = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
1059
- return Math.round((n - s) / On);
1245
+ return Math.round((n - s) / wr);
1060
1246
  }
1061
- function Mt(e, t, n, s = k) {
1247
+ function xt(e, t, n, s = te) {
1062
1248
  const r = new Date(t);
1063
1249
  if (Number.isNaN(r.getTime())) return t;
1064
- const i = $n(s), u = i.time.format(r), a = bt(r, n);
1065
- if (a === 0) return e("today, %{time}", { time: u });
1066
- if (a === -1) return e("yesterday, %{time}", { time: u });
1067
- if (a === 1) return e("tomorrow, %{time}", { time: u });
1068
- const d = r.getFullYear() === n.getFullYear() ? i.day.format(r) : i.dayYear.format(r);
1069
- return e("%{date}, %{time}", { date: d, time: u });
1250
+ const i = xr(s), u = i.time.format(r), a = Et(r, n);
1251
+ if (a === 0) return e("dateTimeToday", { time: u });
1252
+ if (a === -1) return e("dateTimeYesterday", { time: u });
1253
+ if (a === 1) return e("dateTimeTomorrow", { time: u });
1254
+ const c = r.getFullYear() === n.getFullYear() ? i.day.format(r) : i.dayYear.format(r);
1255
+ return e("dateTimeWithDate", { date: c, time: u });
1070
1256
  }
1071
- function _t(e, t, n, s) {
1072
- return e("Due %{when}", { when: Mt(e, t, n, s) });
1257
+ function Ct(e, t, n, s) {
1258
+ return e("dueByline", { when: xt(e, t, n, s) });
1073
1259
  }
1074
- function Ne(e, t, n, s) {
1075
- return e("Will unlock on %{when}", { when: Mt(e, t, n, s) });
1260
+ function qe(e, t, n, s) {
1261
+ return e("unlockByline", { when: xt(e, t, n, s) });
1076
1262
  }
1077
- function Bn(e, t = k) {
1078
- return Un(t).format(e);
1263
+ function Cr(e, t = te) {
1264
+ return !Number.isInteger(e) || e < 1 ? null : Er(t).format(e);
1079
1265
  }
1080
- function Gn(e, t) {
1266
+ function Lr(e, t) {
1081
1267
  switch (t) {
1082
1268
  case "assignment":
1083
- return e("Assignment");
1269
+ return e("itemTypeAssignment");
1084
1270
  case "quiz":
1085
- return e("Quiz");
1271
+ return e("itemTypeQuiz");
1086
1272
  case "discussion":
1087
- return e("Discussion");
1273
+ return e("itemTypeDiscussion");
1088
1274
  case "page":
1089
- return e("Page");
1275
+ return e("itemTypePage");
1090
1276
  case "file":
1091
- return e("File");
1277
+ return e("itemTypeFile");
1092
1278
  case "external_url":
1093
- return e("External URL");
1279
+ return e("itemTypeExternalUrl");
1094
1280
  case "external_tool":
1095
- return e("External tool");
1281
+ return e("itemTypeExternalTool");
1096
1282
  case "sub_header":
1097
- return e("Text header");
1283
+ return e("itemTypeSubHeader");
1098
1284
  }
1099
1285
  }
1100
- function Yn(e, t, n = k) {
1101
- return t == null ? null : e("%{points} pts", { points: me(n).format(t) });
1286
+ function Ar(e, t) {
1287
+ return t == null ? null : e("pointsAbbreviated", { count: t });
1102
1288
  }
1103
- function Qn(e, t, n = k) {
1104
- const s = (r) => me(n).format(r);
1289
+ function vr(e, t) {
1105
1290
  switch (t.type) {
1106
1291
  case "must_view":
1107
- return e("View the item");
1292
+ return e("requirementMustView");
1108
1293
  case "must_submit":
1109
- return e("Submit the assignment");
1294
+ return e("requirementMustSubmit");
1110
1295
  case "must_contribute":
1111
- return e("Contribute to the page");
1296
+ return e("requirementMustContribute");
1112
1297
  case "must_mark_done":
1113
- return e("Mark as done");
1298
+ return e("requirementMustMarkDone");
1114
1299
  case "min_score":
1115
- return t.minScore === null || t.minScore === void 0 ? e("Score at least the minimum") : e("Score at least %{score}", { score: s(t.minScore) });
1300
+ return t.minScore === null || t.minScore === void 0 ? e("requirementMinScoreUnknown") : e("requirementMinScore", { count: t.minScore });
1116
1301
  case "min_percentage":
1117
- return t.minPercentage === null || t.minPercentage === void 0 ? e("Score at least the minimum percentage") : e("Score at least %{percentage}%", { percentage: s(t.minPercentage) });
1302
+ return t.minPercentage === null || t.minPercentage === void 0 ? e("requirementMinPercentageUnknown") : e("requirementMinPercentage", { count: t.minPercentage });
1118
1303
  case "unknown":
1119
- return e("Complete the requirement");
1304
+ return e("requirementUnknown");
1120
1305
  }
1121
1306
  }
1122
- function jn(e, t, n, s, r = k) {
1123
- const i = me(r);
1124
- return e("%{percent}% | %{met} of %{total} requirements met", {
1125
- percent: i.format(t),
1126
- met: i.format(n),
1127
- total: i.format(s)
1128
- });
1307
+ function Nr(e, t, n, s) {
1308
+ return e("progressSummary", { percent: t, met: n, count: s });
1129
1309
  }
1130
- const Wn = [
1310
+ const Dr = [
1131
1311
  "all",
1132
1312
  "in_progress",
1133
1313
  "complete",
1134
1314
  "due_this_week",
1135
1315
  "missing"
1136
1316
  ];
1137
- function Kn(e, t) {
1317
+ function kr(e, t) {
1138
1318
  switch (t) {
1139
1319
  case "all":
1140
- return e("All");
1320
+ return e("filterAll");
1141
1321
  case "in_progress":
1142
- return e("In progress");
1322
+ return e("filterInProgress");
1143
1323
  case "complete":
1144
- return e("Complete");
1324
+ return e("filterComplete");
1145
1325
  case "due_this_week":
1146
- return e("Due this week");
1326
+ return e("filterDueThisWeek");
1147
1327
  case "missing":
1148
- return e("Missing");
1328
+ return e("filterMissing");
1149
1329
  }
1150
1330
  }
1151
- const Hn = 7;
1152
- function Ae(e, t, n) {
1331
+ const qr = 7;
1332
+ function Rr(e, t, n) {
1153
1333
  if (t === "all") return !0;
1154
1334
  const s = e.progress;
1155
1335
  if (!s) return !1;
@@ -1164,148 +1344,160 @@ function Ae(e, t, n) {
1164
1344
  if (!s.latestDueAt) return !1;
1165
1345
  const r = new Date(s.latestDueAt);
1166
1346
  if (Number.isNaN(r.getTime())) return !1;
1167
- const i = bt(r, n);
1168
- return i >= 0 && i <= Hn;
1347
+ const i = Et(r, n);
1348
+ return i >= 0 && i <= qr;
1169
1349
  }
1170
1350
  default:
1171
1351
  return !0;
1172
1352
  }
1173
1353
  }
1174
- function Le(e, t, n) {
1354
+ function Fr(e, t, n) {
1175
1355
  const s = t.trim().toLocaleLowerCase(n);
1176
1356
  return s === "" ? !0 : e.name.toLocaleLowerCase(n).includes(s);
1177
1357
  }
1178
- function Vn({ value: e, onChange: t, counts: n }) {
1179
- const { t: s, locale: r } = R(), i = ke(), u = ge(r);
1180
- return /* @__PURE__ */ y(S, { as: "div", margin: "medium 0 0 0", children: [
1181
- /* @__PURE__ */ o(S, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ o(I, { size: "small", weight: "bold", id: i, children: s("Filter") }) }),
1358
+ function zr({ value: e, onChange: t }) {
1359
+ const { t: n } = N(), s = Be();
1360
+ return /* @__PURE__ */ T(_, { as: "div", margin: "medium 0 0 0", children: [
1361
+ /* @__PURE__ */ o(_, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ o(M, { size: "medium", weight: "bold", id: s, children: n("filterGroupLabel") }) }),
1182
1362
  /* @__PURE__ */ o(
1183
1363
  P,
1184
1364
  {
1185
- gap: "x-small",
1365
+ gap: "space4",
1186
1366
  wrap: "wrap",
1187
1367
  as: "div",
1188
1368
  role: "group",
1189
- "aria-labelledby": i,
1369
+ "aria-labelledby": s,
1190
1370
  "data-testid": "filter-chips",
1191
- children: Wn.map((a) => {
1192
- const d = a === e, c = n == null ? void 0 : n[a], l = Kn(s, a);
1371
+ children: Dr.map((r) => {
1372
+ const i = r === e;
1193
1373
  return /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1194
1374
  Z,
1195
1375
  {
1196
- size: "small",
1197
- color: d ? "primary" : "secondary",
1198
- "aria-pressed": d,
1199
- onClick: () => t(a),
1200
- "data-testid": `filter-chip-${a}`,
1201
- themeOverride: { borderRadius: "1.5rem" },
1202
- children: c === void 0 ? l : s("%{label} (%{count})", { label: l, count: u.format(c) })
1376
+ size: "medium",
1377
+ color: i ? "primary" : "secondary",
1378
+ "aria-pressed": i,
1379
+ onClick: () => t(r),
1380
+ "data-testid": `filter-chip-${r}`,
1381
+ themeOverride: { borderRadius: "0.5rem" },
1382
+ children: kr(n, r)
1203
1383
  }
1204
- ) }, a);
1384
+ ) }, r);
1205
1385
  })
1206
1386
  }
1207
1387
  )
1208
1388
  ] });
1209
1389
  }
1210
- const Xn = {
1390
+ const Ur = {
1211
1391
  not_started: {},
1212
- in_progress: { color: "info", icon: /* @__PURE__ */ o(Qe, {}) },
1213
- all_submitted: { color: "success", icon: /* @__PURE__ */ o(ue, {}) },
1214
- all_graded: { color: "success", icon: /* @__PURE__ */ o(ue, {}) },
1215
- missing: { color: "danger", icon: /* @__PURE__ */ o(Ye, {}) },
1216
- locked: { icon: /* @__PURE__ */ o(Ge, {}) }
1217
- }, Zn = {
1392
+ in_progress: { color: "info", icon: /* @__PURE__ */ o(Ze, {}) },
1393
+ all_submitted: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
1394
+ all_graded: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
1395
+ missing: { color: "danger", icon: /* @__PURE__ */ o(Ve, {}) },
1396
+ locked: { icon: /* @__PURE__ */ o(Ke, {}) }
1397
+ }, Or = {
1218
1398
  not_started: {},
1219
- in_progress: { color: "info", icon: /* @__PURE__ */ o(Qe, {}) },
1220
- submitted: { color: "success", icon: /* @__PURE__ */ o(ue, {}) },
1221
- graded: { color: "success", icon: /* @__PURE__ */ o(ue, {}) },
1222
- missing: { color: "danger", icon: /* @__PURE__ */ o(Ye, {}) },
1223
- locked: { icon: /* @__PURE__ */ o(Ge, {}) }
1399
+ in_progress: { color: "info", icon: /* @__PURE__ */ o(Ze, {}) },
1400
+ submitted: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
1401
+ graded: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
1402
+ missing: { color: "danger", icon: /* @__PURE__ */ o(Ve, {}) },
1403
+ locked: { icon: /* @__PURE__ */ o(Ke, {}) }
1224
1404
  };
1225
- function Jn(e, t) {
1405
+ function $r(e, t) {
1226
1406
  switch (t) {
1227
1407
  case "not_started":
1228
- return e("Not started");
1408
+ return e("moduleStatusNotStarted");
1229
1409
  case "in_progress":
1230
- return e("In progress");
1410
+ return e("moduleStatusInProgress");
1231
1411
  case "all_submitted":
1232
- return e("All items complete");
1412
+ return e("moduleStatusAllSubmitted");
1233
1413
  case "all_graded":
1234
- return e("All items graded");
1414
+ return e("moduleStatusAllGraded");
1235
1415
  case "missing":
1236
- return e("Missing");
1416
+ return e("moduleStatusMissing");
1237
1417
  case "locked":
1238
- return e("Locked");
1418
+ return e("moduleStatusLocked");
1239
1419
  }
1240
1420
  }
1241
- function es(e, t) {
1421
+ function Br(e, t) {
1242
1422
  switch (t) {
1243
1423
  case "not_started":
1244
- return e("Not started");
1424
+ return e("itemStatusNotStarted");
1245
1425
  case "in_progress":
1246
- return e("In progress");
1426
+ return e("itemStatusInProgress");
1247
1427
  case "submitted":
1248
- return e("Submitted");
1428
+ return e("itemStatusSubmitted");
1249
1429
  case "graded":
1250
- return e("Graded");
1430
+ return e("itemStatusGraded");
1251
1431
  case "missing":
1252
- return e("Missing");
1432
+ return e("itemStatusMissing");
1253
1433
  case "locked":
1254
- return e("Locked");
1434
+ return e("itemStatusLocked");
1255
1435
  }
1256
1436
  }
1257
- function St(e, t, n) {
1258
- return /* @__PURE__ */ o(Yt, { color: e.color, renderIcon: e.icon, "data-testid": n, children: t });
1437
+ function Lt(e, t, n) {
1438
+ return /* @__PURE__ */ o(Zt, { color: e.color, renderIcon: e.icon, "data-testid": n, children: t });
1259
1439
  }
1260
- function ts({ status: e }) {
1261
- const { t } = R();
1262
- return St(
1263
- Xn[e],
1264
- Jn(t, e),
1440
+ function Gr({ status: e }) {
1441
+ const { t } = N();
1442
+ return Lt(
1443
+ Ur[e],
1444
+ $r(t, e),
1265
1445
  "module-status-pill"
1266
1446
  );
1267
1447
  }
1268
- function ns({ status: e }) {
1269
- const { t } = R();
1270
- return St(
1271
- Zn[e],
1272
- es(t, e),
1448
+ function jr({ status: e }) {
1449
+ const { t } = N();
1450
+ return Lt(
1451
+ Or[e],
1452
+ Br(t, e),
1273
1453
  "item-status-pill"
1274
1454
  );
1275
1455
  }
1276
- const ss = {
1277
- assignment: /* @__PURE__ */ o(Ut, {}),
1278
- quiz: /* @__PURE__ */ o(Ot, {}),
1279
- discussion: /* @__PURE__ */ o(zt, {}),
1280
- page: /* @__PURE__ */ o(kt, {}),
1281
- file: /* @__PURE__ */ o(Ft, {}),
1282
- external_url: /* @__PURE__ */ o(qt, {}),
1283
- external_tool: /* @__PURE__ */ o(Rt, {}),
1284
- sub_header: /* @__PURE__ */ o(Dt, {})
1285
- }, rs = 1.75, os = {
1456
+ const Yr = {
1457
+ assignment: /* @__PURE__ */ o(Yt, {}),
1458
+ quiz: /* @__PURE__ */ o(jt, {}),
1459
+ discussion: /* @__PURE__ */ o(Gt, {}),
1460
+ page: /* @__PURE__ */ o(Bt, {}),
1461
+ file: /* @__PURE__ */ o($t, {}),
1462
+ external_url: /* @__PURE__ */ o(Ot, {}),
1463
+ external_tool: /* @__PURE__ */ o(Ut, {}),
1464
+ sub_header: /* @__PURE__ */ o(zt, {})
1465
+ }, Qr = 1.75, Wr = {
1286
1466
  contentVisibility: "auto",
1287
1467
  containIntrinsicSize: "auto 3.5rem"
1288
1468
  };
1289
- function is({ item: e, today: t }) {
1290
- const { t: n, locale: s } = R();
1469
+ function Hr({ item: e, today: t, navigation: n }) {
1470
+ var p;
1471
+ const { t: s, locale: r } = N(), i = e.title || s("itemUntitled");
1291
1472
  if (e.type === "sub_header")
1292
1473
  return /* @__PURE__ */ o(
1293
- S,
1474
+ _,
1294
1475
  {
1295
1476
  as: "div",
1296
1477
  padding: "x-small small",
1297
1478
  margin: "x-small 0 0 0",
1298
1479
  "data-testid": `module-item-${e.id}`,
1299
- children: /* @__PURE__ */ o(I, { size: "small", weight: "bold", transform: "uppercase", letterSpacing: "expanded", children: e.title })
1480
+ children: /* @__PURE__ */ o(
1481
+ M,
1482
+ {
1483
+ size: "small",
1484
+ weight: "bold",
1485
+ transform: "uppercase",
1486
+ letterSpacing: "expanded",
1487
+ "data-testid": "module-item-title",
1488
+ "data-sub-header": "true",
1489
+ children: i
1490
+ }
1491
+ )
1300
1492
  }
1301
1493
  );
1302
- const r = [Gn(n, e.type)];
1303
- e.dueAt && r.push(_t(n, e.dueAt, t, s));
1304
- const i = Yn(n, e.pointsPossible, s);
1305
- i && r.push(i), e.completionRequirement && r.push(Qn(n, e.completionRequirement, s));
1306
- const u = en(e);
1307
- return u !== null && r.push(n("%{minutes} min", { minutes: ge(s).format(u) })), e.published || r.push(n("Unpublished")), /* @__PURE__ */ o("div", { style: { marginLeft: `${e.indent * rs}rem`, ...os }, children: /* @__PURE__ */ o(
1308
- S,
1494
+ const u = ((p = n == null ? void 0 : n.getItemHref) == null ? void 0 : p.call(n, e)) ?? e.url ?? null, a = e.status === "locked", c = n == null ? void 0 : n.onItemClick, g = c ? (f) => c(e, f) : void 0, l = [Lr(s, e.type)];
1495
+ e.dueAt && l.push(Ct(s, e.dueAt, t, r));
1496
+ const m = Ar(s, e.pointsPossible);
1497
+ m && l.push(m), e.completionRequirement && l.push(vr(s, e.completionRequirement));
1498
+ const S = an(e);
1499
+ return S !== null && l.push(s("durationMinutes", { count: S })), e.published || l.push(s("itemUnpublishedLabel")), /* @__PURE__ */ o("div", { style: { marginLeft: `${e.indent * Qr}rem`, ...Wr }, children: /* @__PURE__ */ o(
1500
+ _,
1309
1501
  {
1310
1502
  as: "div",
1311
1503
  background: "secondary",
@@ -1313,10 +1505,10 @@ function is({ item: e, today: t }) {
1313
1505
  padding: "x-small small",
1314
1506
  margin: "x-small 0 0 0",
1315
1507
  "data-testid": `module-item-${e.id}`,
1316
- children: /* @__PURE__ */ y(P, { alignItems: "center", gap: "small", children: [
1317
- e.indent > 0 ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(I, { color: "secondary", children: /* @__PURE__ */ o(Lt, {}) }) }) : null,
1508
+ children: /* @__PURE__ */ T(P, { alignItems: "center", gap: "small", children: [
1509
+ e.indent > 0 ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(M, { color: "secondary", children: /* @__PURE__ */ o(Ft, {}) }) }) : null,
1318
1510
  /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1319
- S,
1511
+ _,
1320
1512
  {
1321
1513
  as: "div",
1322
1514
  background: "primary",
@@ -1326,92 +1518,131 @@ function is({ item: e, today: t }) {
1326
1518
  width: "2.25rem",
1327
1519
  height: "2.25rem",
1328
1520
  textAlign: "center",
1329
- children: /* @__PURE__ */ o(I, { color: "secondary", children: ss[e.type] })
1521
+ children: /* @__PURE__ */ o(M, { color: "secondary", children: Yr[e.type] })
1330
1522
  }
1331
1523
  ) }),
1332
- /* @__PURE__ */ y(P.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1333
- /* @__PURE__ */ o(S, { as: "div", children: /* @__PURE__ */ o(I, { weight: "bold", size: "small", "data-testid": "module-item-title", children: e.title }) }),
1334
- /* @__PURE__ */ o(S, { as: "div", children: /* @__PURE__ */ o(I, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: r.map((a, d) => /* @__PURE__ */ y("span", { children: [
1335
- d > 0 ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: " | " }) : null,
1336
- /* @__PURE__ */ o("span", { children: a })
1337
- ] }, a)) }) })
1524
+ /* @__PURE__ */ T(P.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1525
+ /* @__PURE__ */ o(_, { as: "div", children: a || !u ? /* @__PURE__ */ o(
1526
+ M,
1527
+ {
1528
+ weight: "bold",
1529
+ size: "small",
1530
+ color: a ? "secondary" : "primary",
1531
+ "data-testid": "module-item-title",
1532
+ "data-locked": a ? "true" : void 0,
1533
+ children: i
1534
+ }
1535
+ ) : /* @__PURE__ */ T(
1536
+ Vt,
1537
+ {
1538
+ href: u,
1539
+ onClick: g,
1540
+ forceButtonRole: !1,
1541
+ isWithinText: !1,
1542
+ target: e.newTab ? "_blank" : void 0,
1543
+ rel: e.newTab ? "noopener noreferrer" : void 0,
1544
+ children: [
1545
+ /* @__PURE__ */ o(M, { weight: "bold", size: "small", color: "primary", "data-testid": "module-item-title", children: i }),
1546
+ e.newTab ? /* @__PURE__ */ o(Kt, { children: ` ${s("opensInNewWindow")}` }) : null
1547
+ ]
1548
+ }
1549
+ ) }),
1550
+ /* @__PURE__ */ o(_, { as: "div", children: /* @__PURE__ */ o(M, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: l.map((f, h) => /* @__PURE__ */ T("span", { children: [
1551
+ h > 0 ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: " | " }) : null,
1552
+ /* @__PURE__ */ o("span", { children: f })
1553
+ ] }, f)) }) })
1338
1554
  ] }),
1339
- e.status ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(ns, { status: e.status }) }) : null
1555
+ e.status ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(jr, { status: e.status }) }) : null
1340
1556
  ] })
1341
1557
  }
1342
1558
  ) });
1343
1559
  }
1344
- const ls = ze(is), as = "3.5rem";
1345
- function us({ module: e, today: t }) {
1346
- var a, d;
1347
- const { t: n, locale: s } = R(), r = ((a = e.progress) == null ? void 0 : a.status) === "locked", i = e.unlockAt;
1560
+ const Kr = Ge(Hr), Re = "3rem";
1561
+ function Vr({
1562
+ label: e,
1563
+ dimmed: t = !1
1564
+ }) {
1565
+ return e === null ? null : /* @__PURE__ */ o(
1566
+ _,
1567
+ {
1568
+ as: "div",
1569
+ display: "inline-block",
1570
+ borderWidth: "small",
1571
+ borderRadius: "large",
1572
+ borderColor: t ? "primary" : "secondary",
1573
+ minWidth: Re,
1574
+ height: Re,
1575
+ padding: "0 xx-small",
1576
+ "data-testid": "module-number",
1577
+ children: /* @__PURE__ */ o(P, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ o(M, { weight: "bold", size: "medium", color: t ? "secondary" : "primary", children: e }) })
1578
+ }
1579
+ );
1580
+ }
1581
+ function Zr({ module: e, today: t }) {
1582
+ var a, c;
1583
+ const { t: n, locale: s } = N(), r = ((a = e.progress) == null ? void 0 : a.status) === "locked", i = e.unlockAt;
1348
1584
  if (r && i)
1349
- return /* @__PURE__ */ o(I, { size: "small", color: "secondary", "data-testid": "module-byline", children: Ne(n, i, t, s) });
1585
+ return /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: qe(n, i, t, s) });
1350
1586
  if (r)
1351
- return /* @__PURE__ */ o(I, { size: "small", color: "secondary", "data-testid": "module-byline", children: n("Locked until prerequisites are met") });
1352
- const u = (d = e.progress) == null ? void 0 : d.latestDueAt;
1353
- return u ? /* @__PURE__ */ o(I, { size: "small", color: "secondary", "data-testid": "module-byline", children: _t(n, u, t, s) }) : !e.progress && i ? /* @__PURE__ */ o(I, { size: "small", color: "secondary", "data-testid": "module-byline", children: Ne(n, i, t, s) }) : null;
1354
- }
1355
- function ds({ module: e }) {
1356
- const { t, locale: n } = R(), s = e.progress;
1357
- return !s || s.requirementCount <= 0 ? null : (
1358
- // Indented to sit under the module name rather than under the number badge,
1359
- // as the mock draws it. Plain `style` because InstUI's `margin` only takes
1360
- // spacing keywords and the badge width is not one of them.
1361
- /* @__PURE__ */ o("div", { style: { marginLeft: as }, children: /* @__PURE__ */ y(P, { alignItems: "center", gap: "small", margin: "small 0 0 0", "data-testid": "module-progress", children: [
1362
- /* @__PURE__ */ o(P.Item, { size: "22rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1363
- Gt,
1364
- {
1365
- size: "x-small",
1366
- meterColor: s.percentComplete >= 100 ? "success" : "brand",
1367
- valueNow: s.requirementsMet,
1368
- valueMax: Math.max(s.requirementCount, 1),
1369
- shouldAnimate: !1,
1370
- screenReaderLabel: t("%{name} progress", { name: e.name })
1371
- }
1372
- ) }),
1373
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(I, { size: "small", color: "secondary", children: jn(
1374
- t,
1375
- s.percentComplete,
1376
- s.requirementsMet,
1377
- s.requirementCount,
1378
- n
1379
- ) }) })
1380
- ] }) })
1381
- );
1587
+ return /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: n("lockedByline") });
1588
+ const u = (c = e.progress) == null ? void 0 : c.latestDueAt;
1589
+ return u ? /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: Ct(n, u, t, s) }) : !e.progress && i ? /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: qe(n, i, t, s) }) : null;
1590
+ }
1591
+ function Xr({ module: e }) {
1592
+ const { t } = N(), n = e.progress;
1593
+ return !n || n.requirementCount <= 0 ? null : /* @__PURE__ */ T(P, { alignItems: "center", gap: "small", margin: "small 0 0 0", "data-testid": "module-progress", children: [
1594
+ /* @__PURE__ */ o(P.Item, { size: "22rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1595
+ Ht,
1596
+ {
1597
+ size: "x-small",
1598
+ meterColor: n.percentComplete >= 100 ? "success" : "brand",
1599
+ valueNow: n.requirementsMet,
1600
+ valueMax: Math.max(n.requirementCount, 1),
1601
+ shouldAnimate: !1,
1602
+ screenReaderLabel: t("moduleProgressScreenReaderLabel", { name: e.name })
1603
+ }
1604
+ ) }),
1605
+ /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(M, { size: "small", color: "secondary", children: Nr(
1606
+ t,
1607
+ n.percentComplete,
1608
+ n.requirementsMet,
1609
+ n.requirementCount
1610
+ ) }) })
1611
+ ] });
1382
1612
  }
1383
- const De = (e) => `platform-modules-panel-${e}`;
1384
- function cs({
1613
+ const Fe = (e) => `platform-modules-panel-${e}`;
1614
+ function Jr({
1385
1615
  module: e,
1386
1616
  state: t,
1387
1617
  today: n,
1388
- showDiagnostics: s
1618
+ navigation: s,
1619
+ showDiagnostics: r
1389
1620
  }) {
1390
- const { t: r, locale: i } = R(), u = ge(i), a = B(null), d = t.items.length, c = !t.isLoading && !t.isFetchingNextPage;
1391
- return ae(() => {
1392
- !c || d === 0 || a.current !== d && (a.current = d, Oe(
1393
- r("%{loaded} of %{total} items loaded in %{name}", {
1394
- loaded: u.format(d),
1395
- total: u.format(e.itemCount),
1621
+ const { t: i } = N(), u = q(null), a = t.items.length, c = !t.isLoading && !t.isFetchingNextPage;
1622
+ return ce(() => {
1623
+ !c || a === 0 || u.current !== a && (u.current = a, Ye(
1624
+ i("itemsLoadedAnnouncement", {
1625
+ loaded: a,
1626
+ count: e.itemCount,
1396
1627
  name: e.name
1397
1628
  })
1398
1629
  ));
1399
- }, [c, d, e.itemCount, e.name, u, r]), t.error ? /* @__PURE__ */ o(S, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1400
- $e,
1630
+ }, [c, a, e.itemCount, e.name, i]), t.error ? /* @__PURE__ */ o(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1631
+ We,
1401
1632
  {
1402
1633
  variant: "error",
1403
1634
  margin: "0",
1404
- liveRegion: Ue,
1635
+ liveRegion: Qe,
1405
1636
  liveRegionPoliteness: "assertive",
1406
1637
  "data-testid": "items-error",
1407
- children: r("Items failed to load: %{message}", { message: t.error.message })
1638
+ children: i("itemsLoadErrorAlert", { message: t.error.message })
1408
1639
  }
1409
- ) }) : t.isLoading ? /* @__PURE__ */ y(S, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
1410
- /* @__PURE__ */ o(We, { size: "x-small", renderTitle: r("Loading items") }),
1640
+ ) }) : t.isLoading ? /* @__PURE__ */ T(_, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
1641
+ /* @__PURE__ */ o(Je, { size: "x-small", renderTitle: i("itemsLoadingSpinnerLabel") }),
1411
1642
  " ",
1412
- /* @__PURE__ */ o(I, { size: "small", color: "secondary", children: r("Loading items…") })
1413
- ] }) : /* @__PURE__ */ y(S, { as: "div", margin: "small 0 0 0", children: [
1414
- s ? /* @__PURE__ */ y(I, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
1643
+ /* @__PURE__ */ o(M, { size: "small", color: "secondary", children: i("itemsLoadingText") })
1644
+ ] }) : /* @__PURE__ */ T(_, { as: "div", margin: "small 0 0 0", children: [
1645
+ r ? /* @__PURE__ */ T(M, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
1415
1646
  "items source: ",
1416
1647
  t.source,
1417
1648
  " · loaded ",
@@ -1419,35 +1650,37 @@ function cs({
1419
1650
  " of ",
1420
1651
  e.itemCount
1421
1652
  ] }) : null,
1422
- t.items.length === 0 ? /* @__PURE__ */ o(S, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ o(I, { size: "small", color: "secondary", children: r("No items in this module.") }) }) : /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((l) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(ls, { item: l, today: n }) }, l.id)) }),
1423
- t.hasNextPage ? /* @__PURE__ */ o(S, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ o(
1653
+ t.items.length === 0 ? /* @__PURE__ */ o(_, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ o(M, { size: "small", color: "secondary", children: i("noItemsEmptyState") }) }) : /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((g) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(Kr, { item: g, today: n, navigation: s }) }, g.id)) }),
1654
+ t.hasNextPage ? /* @__PURE__ */ o(_, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ o(
1424
1655
  Z,
1425
1656
  {
1426
1657
  size: "small",
1427
1658
  onClick: t.fetchNextPage,
1428
1659
  interaction: t.isFetchingNextPage ? "disabled" : "enabled",
1429
1660
  "data-testid": "load-more-items",
1430
- children: t.isFetchingNextPage ? r("Loading more items…") : r("Load more items (%{loaded} of %{total} loaded)", {
1431
- loaded: u.format(t.items.length),
1432
- total: u.format(e.itemCount)
1661
+ children: t.isFetchingNextPage ? i("loadMoreItemsLoading") : i("loadMoreItems", {
1662
+ loaded: t.items.length,
1663
+ count: e.itemCount
1433
1664
  })
1434
1665
  }
1435
1666
  ) }) : null
1436
1667
  ] });
1437
1668
  }
1438
- function ms({
1669
+ function eo({
1439
1670
  module: e,
1440
1671
  expanded: t,
1441
1672
  onToggle: n,
1442
1673
  itemsState: s,
1443
1674
  today: r,
1444
- showDiagnostics: i = !1,
1445
- headingLevel: u = "h3"
1675
+ navigation: i,
1676
+ showDiagnostics: u = !1,
1677
+ headingLevel: a = "h3",
1678
+ moduleLabel: c
1446
1679
  }) {
1447
- var l;
1448
- const { t: a, locale: d } = R(), c = ((l = e.progress) == null ? void 0 : l.status) === "locked";
1449
- return /* @__PURE__ */ y(
1450
- S,
1680
+ var p;
1681
+ const { t: g, locale: l } = N(), m = ((p = e.progress) == null ? void 0 : p.status) === "locked", S = c === void 0 ? Cr(e.position, l) : c;
1682
+ return /* @__PURE__ */ T(
1683
+ _,
1451
1684
  {
1452
1685
  as: "div",
1453
1686
  background: "primary",
@@ -1458,77 +1691,66 @@ function ms({
1458
1691
  margin: "0 0 small 0",
1459
1692
  "data-testid": `module-card-${e.id}`,
1460
1693
  children: [
1461
- /* @__PURE__ */ y(P, { alignItems: "start", gap: "small", children: [
1462
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1463
- S,
1464
- {
1465
- as: "div",
1466
- borderWidth: "small",
1467
- borderRadius: "medium",
1468
- padding: "x-small",
1469
- width: "2.75rem",
1470
- textAlign: "center",
1471
- "data-testid": "module-number",
1472
- children: /* @__PURE__ */ o(I, { weight: "bold", size: "small", children: Bn(e.position, d) })
1473
- }
1474
- ) }),
1475
- /* @__PURE__ */ y(P.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1476
- /* @__PURE__ */ y(S, { as: "div", children: [
1694
+ /* @__PURE__ */ T(P, { alignItems: "start", gap: "small", "data-testid": "module-header", children: [
1695
+ S !== null ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(Vr, { label: S, dimmed: m }) }) : null,
1696
+ /* @__PURE__ */ T(P.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1697
+ /* @__PURE__ */ T(_, { as: "div", children: [
1477
1698
  /* @__PURE__ */ o(
1478
- Be,
1699
+ He,
1479
1700
  {
1480
- level: u,
1701
+ level: a,
1481
1702
  themeOverride: { h2FontSize: "1.375rem", h3FontSize: "1.375rem" },
1482
1703
  "data-testid": "module-name",
1483
- children: /* @__PURE__ */ o(I, { size: "large", weight: "bold", color: c ? "secondary" : "primary", children: e.name })
1704
+ children: /* @__PURE__ */ o(M, { size: "large", weight: "bold", color: m ? "secondary" : "primary", children: e.name })
1484
1705
  }
1485
1706
  ),
1486
- e.published ? null : /* @__PURE__ */ y(I, { size: "x-small", color: "secondary", children: [
1707
+ e.published ? null : /* @__PURE__ */ T(M, { size: "x-small", color: "secondary", children: [
1487
1708
  " ",
1488
- a("(unpublished)")
1709
+ g("moduleUnpublishedBadge")
1489
1710
  ] })
1490
1711
  ] }),
1491
- /* @__PURE__ */ o(S, { as: "div", children: /* @__PURE__ */ o(us, { module: e, today: r }) })
1712
+ /* @__PURE__ */ o(_, { as: "div", children: /* @__PURE__ */ o(Zr, { module: e, today: r }) }),
1713
+ /* @__PURE__ */ o(Xr, { module: e })
1492
1714
  ] }),
1493
- e.progress ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(ts, { status: e.progress.status }) }) : null,
1715
+ e.progress ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(Gr, { status: e.progress.status }) }) : null,
1494
1716
  /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1495
- At,
1717
+ Rt,
1496
1718
  {
1497
1719
  size: "small",
1498
1720
  withBorder: !0,
1499
1721
  withBackground: !1,
1500
- screenReaderLabel: t ? a("Collapse %{name}", { name: e.name }) : a("Expand %{name}", { name: e.name }),
1722
+ screenReaderLabel: t ? g("collapseModule", { name: e.name }) : g("expandModule", { name: e.name }),
1501
1723
  "aria-expanded": t,
1502
- "aria-controls": De(e.id),
1724
+ "aria-controls": Fe(e.id),
1503
1725
  onClick: () => n(e.id),
1504
1726
  "data-testid": `toggle-module-${e.id}`,
1505
- children: t ? /* @__PURE__ */ o($t, {}) : /* @__PURE__ */ o(je, {})
1727
+ children: t ? /* @__PURE__ */ o(Qt, {}) : /* @__PURE__ */ o(Xe, {})
1506
1728
  }
1507
1729
  ) })
1508
1730
  ] }),
1509
- /* @__PURE__ */ o(ds, { module: e }),
1510
- /* @__PURE__ */ o("div", { id: De(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ o(
1511
- cs,
1731
+ /* @__PURE__ */ o("div", { id: Fe(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ o(
1732
+ Jr,
1512
1733
  {
1513
1734
  module: e,
1514
1735
  state: s,
1515
1736
  today: r,
1516
- showDiagnostics: i
1737
+ navigation: i,
1738
+ showDiagnostics: u
1517
1739
  }
1518
1740
  ) : null })
1519
1741
  ]
1520
1742
  }
1521
1743
  );
1522
1744
  }
1523
- const gs = ze(ms);
1524
- function hs({
1745
+ const to = Ge(eo);
1746
+ function no({
1525
1747
  counts: e,
1526
1748
  itemsMode: t,
1527
1749
  loadedModules: n
1528
1750
  }) {
1529
1751
  const s = e.listModules + e.listModuleItems;
1530
1752
  return /* @__PURE__ */ o(
1531
- S,
1753
+ _,
1532
1754
  {
1533
1755
  as: "div",
1534
1756
  background: "secondary",
@@ -1537,25 +1759,25 @@ function hs({
1537
1759
  padding: "x-small small",
1538
1760
  margin: "0 0 small 0",
1539
1761
  "data-testid": "dev-diagnostics",
1540
- children: /* @__PURE__ */ y(P, { gap: "medium", wrap: "wrap", children: [
1541
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(I, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1542
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(I, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1762
+ children: /* @__PURE__ */ T(P, { gap: "medium", wrap: "wrap", children: [
1763
+ /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(M, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1764
+ /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1543
1765
  "listModules: ",
1544
1766
  e.listModules
1545
1767
  ] }) }),
1546
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(I, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1768
+ /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1547
1769
  "listModuleItems: ",
1548
1770
  e.listModuleItems
1549
1771
  ] }) }),
1550
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(I, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1772
+ /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1551
1773
  "total: ",
1552
1774
  s
1553
1775
  ] }) }),
1554
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(I, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1776
+ /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1555
1777
  "itemsMode: ",
1556
1778
  t ?? "probing…"
1557
1779
  ] }) }),
1558
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(I, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1780
+ /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1559
1781
  "modules loaded: ",
1560
1782
  n
1561
1783
  ] }) })
@@ -1563,7 +1785,7 @@ function hs({
1563
1785
  }
1564
1786
  );
1565
1787
  }
1566
- function ar({
1788
+ function ri({
1567
1789
  data: e,
1568
1790
  courseName: t,
1569
1791
  courseContext: n,
@@ -1571,112 +1793,104 @@ function ar({
1571
1793
  requestCounts: r,
1572
1794
  showDiagnostics: i = r !== void 0,
1573
1795
  initialFilter: u = "all",
1574
- as: a = "div",
1575
- headingLevel: d = "h2"
1796
+ navigation: a,
1797
+ as: c = "div",
1798
+ headingLevel: g = "h2"
1576
1799
  }) {
1577
1800
  const {
1578
- modules: c,
1579
- hasNextPage: l,
1580
- fetchNextPage: m,
1581
- isFetchingNextPage: M,
1582
- isLoading: _,
1801
+ modules: l,
1802
+ hasNextPage: m,
1803
+ fetchNextPage: S,
1804
+ isFetchingNextPage: p,
1805
+ isLoading: f,
1583
1806
  error: h,
1584
- itemsMode: f,
1585
- expandedModuleIds: w,
1586
- toggleModule: v,
1587
- expandModule: A,
1588
- collapseModule: N,
1589
- getItems: ne
1590
- } = e, { t: E, locale: z } = R(), G = ge(z), K = t ?? E("Course modules"), [q, H] = X(""), [O, Y] = X(u), V = B(null), se = ke(), U = B(!1), [re] = X(() => /* @__PURE__ */ new Date()), $ = s ?? re;
1591
- ae(() => {
1592
- var x;
1593
- !U.current || M || (U.current = !1, Oe(E("%{count} modules loaded", { count: String(c.length) })), (x = V.current) == null || x.focus());
1594
- }, [M, c.length, E]);
1595
- const Q = L(
1596
- () => c.filter(
1597
- (x) => Le(x, q, z) && Ae(x, O, $)
1807
+ itemsMode: w,
1808
+ expandedModuleIds: x,
1809
+ toggleModule: L,
1810
+ expandModule: C,
1811
+ collapseModule: ne,
1812
+ getItems: se
1813
+ } = e, { t: E, locale: G } = N(), j = t ?? E("pageTitle"), [R, Y] = V(""), [D, F] = V(u), Q = q(null), re = Be(), k = q(!1), [oe] = V(() => /* @__PURE__ */ new Date()), W = s ?? oe;
1814
+ ce(() => {
1815
+ var I;
1816
+ !k.current || p || (k.current = !1, Ye(E("modulesLoadedAnnouncement", { count: l.length })), (I = Q.current) == null || I.focus());
1817
+ }, [p, l.length, E]);
1818
+ const z = v(
1819
+ () => l.filter(
1820
+ (I) => Fr(I, R, G) && Rr(I, D, W)
1598
1821
  ),
1599
- [c, q, O, $, z]
1600
- ), oe = L(() => {
1601
- const x = c.filter((j) => Le(j, q, z)), T = (j) => x.filter((F) => Ae(F, j, $)).length;
1602
- return {
1603
- all: x.length,
1604
- in_progress: T("in_progress"),
1605
- complete: T("complete"),
1606
- due_this_week: T("due_this_week"),
1607
- missing: T("missing")
1608
- };
1609
- }, [c, q, $, z]), b = () => {
1610
- for (const x of Q) A(x.id);
1611
- }, p = () => {
1612
- for (const x of w) N(x);
1613
- }, C = c.length > 0 && Q.length === 0 && !_ && !h;
1614
- return /* @__PURE__ */ y(S, { as: a, display: "block", "data-testid": "modules-list", children: [
1615
- n ? /* @__PURE__ */ y(S, { as: "div", children: [
1616
- /* @__PURE__ */ o(I, { size: "small", color: "brand", children: n }),
1617
- /* @__PURE__ */ y(I, { size: "small", color: "secondary", children: [
1822
+ [l, R, D, W, G]
1823
+ ), ie = () => {
1824
+ for (const I of z) C(I.id);
1825
+ }, y = () => {
1826
+ for (const I of x) ne(I);
1827
+ }, b = l.length > 0 && z.length === 0 && !f && !h;
1828
+ return /* @__PURE__ */ T(_, { as: c, display: "block", "data-testid": "modules-list", children: [
1829
+ n ? /* @__PURE__ */ T(_, { as: "div", children: [
1830
+ /* @__PURE__ */ o(M, { size: "small", color: "brand", children: n }),
1831
+ /* @__PURE__ */ T(M, { size: "small", color: "secondary", children: [
1618
1832
  " ",
1619
1833
  "/",
1620
1834
  " "
1621
1835
  ] }),
1622
- /* @__PURE__ */ o(I, { size: "small", color: "secondary", children: K })
1836
+ /* @__PURE__ */ o(M, { size: "small", color: "secondary", children: j })
1623
1837
  ] }) : null,
1624
- /* @__PURE__ */ o(Be, { level: d, margin: "x-small 0 medium 0", children: K }),
1838
+ /* @__PURE__ */ o(He, { level: g, margin: "x-small 0 medium 0", children: j }),
1625
1839
  r ? /* @__PURE__ */ o(
1626
- hs,
1840
+ no,
1627
1841
  {
1628
1842
  counts: r,
1629
- itemsMode: f,
1630
- loadedModules: c.length
1843
+ itemsMode: w,
1844
+ loadedModules: l.length
1631
1845
  }
1632
1846
  ) : null,
1633
- /* @__PURE__ */ y(P, { gap: "small", wrap: "wrap", alignItems: "end", children: [
1847
+ /* @__PURE__ */ T(P, { gap: "small", wrap: "wrap", alignItems: "end", children: [
1634
1848
  /* @__PURE__ */ o(P.Item, { size: "24rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1635
- Qt,
1849
+ Xt,
1636
1850
  {
1637
- renderLabel: E("Search module names"),
1638
- placeholder: E("Search…"),
1639
- "aria-describedby": se,
1640
- value: q,
1641
- onChange: (x, T) => H(T),
1642
- renderBeforeInput: /* @__PURE__ */ o(Bt, { inline: !1 }),
1851
+ renderLabel: E("moduleSearchLabel"),
1852
+ placeholder: E("searchPlaceholder"),
1853
+ "aria-describedby": re,
1854
+ value: R,
1855
+ onChange: (I, H) => Y(H),
1856
+ renderBeforeInput: /* @__PURE__ */ o(Wt, { inline: !1 }),
1643
1857
  "data-testid": "modules-search"
1644
1858
  }
1645
1859
  ) }),
1646
1860
  /* @__PURE__ */ o(P.Item, { shouldGrow: !0 }),
1647
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(
1648
- fe,
1861
+ /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(
1862
+ be,
1649
1863
  {
1650
1864
  placement: "bottom end",
1651
- trigger: /* @__PURE__ */ o(Z, { renderIcon: /* @__PURE__ */ o(je, {}), "data-testid": "expand-collapse-trigger", children: E("Expand / collapse") }),
1865
+ trigger: /* @__PURE__ */ o(Z, { renderIcon: /* @__PURE__ */ o(Xe, {}), "data-testid": "expand-collapse-trigger", children: E("expandCollapseTrigger") }),
1652
1866
  children: [
1653
- /* @__PURE__ */ o(fe.Item, { onSelect: b, "data-testid": "expand-all", children: E("Expand all") }),
1654
- /* @__PURE__ */ o(fe.Item, { onSelect: p, "data-testid": "collapse-all", children: E("Collapse all") })
1867
+ /* @__PURE__ */ o(be.Item, { onSelect: ie, "data-testid": "expand-all", children: E("expandAll") }),
1868
+ /* @__PURE__ */ o(be.Item, { onSelect: y, "data-testid": "collapse-all", children: E("collapseAll") })
1655
1869
  ]
1656
1870
  }
1657
1871
  ) })
1658
1872
  ] }),
1659
- /* @__PURE__ */ o(S, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ o(I, { size: "x-small", color: "secondary", id: se, children: E("Search matches module names only — items of collapsed modules are not loaded.") }) }),
1660
- /* @__PURE__ */ o(Vn, { value: O, onChange: Y, counts: oe }),
1661
- /* @__PURE__ */ y(S, { as: "div", margin: "medium 0 0 0", children: [
1873
+ /* @__PURE__ */ o(_, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ o(M, { size: "x-small", color: "secondary", id: re, children: E("searchScopeHint") }) }),
1874
+ /* @__PURE__ */ o(zr, { value: D, onChange: F }),
1875
+ /* @__PURE__ */ T(_, { as: "div", margin: "medium 0 0 0", children: [
1662
1876
  h ? (
1663
1877
  // `liveRegion` is what makes this announce; without it InstUI's Alert
1664
1878
  // sets no role and no aria-live. See the same fix in ModuleCard.
1665
1879
  /* @__PURE__ */ o(
1666
- $e,
1880
+ We,
1667
1881
  {
1668
1882
  variant: "error",
1669
1883
  margin: "0 0 small 0",
1670
- liveRegion: Ue,
1884
+ liveRegion: Qe,
1671
1885
  liveRegionPoliteness: "assertive",
1672
1886
  "data-testid": "modules-error",
1673
- children: E("Modules failed to load: %{message}", { message: h.message })
1887
+ children: E("modulesLoadErrorAlert", { message: h.message })
1674
1888
  }
1675
1889
  )
1676
1890
  ) : null,
1677
- _ ? /* @__PURE__ */ o(S, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ o(We, { renderTitle: E("Loading modules") }) }) : null,
1678
- !_ && !h && c.length === 0 ? /* @__PURE__ */ o(
1679
- S,
1891
+ f ? /* @__PURE__ */ o(_, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ o(Je, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
1892
+ !f && !h && l.length === 0 ? /* @__PURE__ */ o(
1893
+ _,
1680
1894
  {
1681
1895
  as: "div",
1682
1896
  background: "secondary",
@@ -1684,11 +1898,11 @@ function ar({
1684
1898
  padding: "large",
1685
1899
  textAlign: "center",
1686
1900
  "data-testid": "modules-empty",
1687
- children: /* @__PURE__ */ o(I, { color: "secondary", children: E("This course has no modules.") })
1901
+ children: /* @__PURE__ */ o(M, { color: "secondary", children: E("noModulesEmptyState") })
1688
1902
  }
1689
1903
  ) : null,
1690
- C ? /* @__PURE__ */ y(
1691
- S,
1904
+ b ? /* @__PURE__ */ T(
1905
+ _,
1692
1906
  {
1693
1907
  as: "div",
1694
1908
  background: "secondary",
@@ -1697,64 +1911,61 @@ function ar({
1697
1911
  textAlign: "center",
1698
1912
  "data-testid": "modules-filtered-empty",
1699
1913
  children: [
1700
- /* @__PURE__ */ o(S, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ o(I, { color: "secondary", children: E("None of the %{count} loaded modules match this filter.", {
1701
- count: G.format(c.length)
1702
- }) }) }),
1914
+ /* @__PURE__ */ o(_, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ o(M, { color: "secondary", children: E("filteredEmptyState", { count: l.length }) }) }),
1703
1915
  /* @__PURE__ */ o(
1704
1916
  Z,
1705
1917
  {
1706
1918
  size: "small",
1707
1919
  onClick: () => {
1708
- Y("all"), H(""), U.current = !0;
1920
+ F("all"), Y(""), k.current = !0;
1709
1921
  },
1710
- children: E("Clear filters")
1922
+ children: E("clearFilters")
1711
1923
  }
1712
1924
  )
1713
1925
  ]
1714
1926
  }
1715
1927
  ) : null,
1716
- /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children: Q.map((x) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
1717
- gs,
1928
+ /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children: z.map((I) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
1929
+ to,
1718
1930
  {
1719
- module: x,
1720
- expanded: w.includes(x.id),
1721
- onToggle: v,
1722
- itemsState: ne(x.id),
1723
- today: $,
1931
+ module: I,
1932
+ expanded: x.includes(I.id),
1933
+ onToggle: L,
1934
+ itemsState: se(I.id),
1935
+ today: W,
1724
1936
  showDiagnostics: i,
1725
- headingLevel: d === "h1" ? "h2" : "h3"
1937
+ navigation: a,
1938
+ headingLevel: g === "h1" ? "h2" : "h3"
1726
1939
  }
1727
- ) }, x.id)) })
1940
+ ) }, I.id)) })
1728
1941
  ] }),
1729
- l ? /* @__PURE__ */ o(S, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1942
+ m ? /* @__PURE__ */ o(_, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1730
1943
  Z,
1731
1944
  {
1732
1945
  color: "primary",
1733
1946
  onClick: () => {
1734
- U.current = !0, m();
1947
+ k.current = !0, S();
1735
1948
  },
1736
- interaction: M ? "disabled" : "enabled",
1949
+ interaction: p ? "disabled" : "enabled",
1737
1950
  "data-testid": "load-more-modules",
1738
- children: M ? E("Loading more modules…") : E("Load more modules (%{count} loaded)", { count: G.format(c.length) })
1951
+ children: p ? E("loadMoreModulesLoading") : E("loadMoreModules", { count: l.length })
1739
1952
  }
1740
- ) }) : c.length > 0 ? /* @__PURE__ */ o(S, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1741
- I,
1953
+ ) }) : l.length > 0 ? /* @__PURE__ */ o(_, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1954
+ M,
1742
1955
  {
1743
1956
  size: "x-small",
1744
1957
  color: "secondary",
1745
1958
  "data-testid": "modules-all-loaded",
1746
- elementRef: (x) => {
1747
- V.current = x;
1959
+ elementRef: (I) => {
1960
+ Q.current = I;
1748
1961
  },
1749
1962
  tabIndex: -1,
1750
- children: E("All %{count} modules in this course are loaded.", {
1751
- count: G.format(c.length)
1752
- })
1963
+ children: E("allModulesLoaded", { count: l.length })
1753
1964
  }
1754
1965
  ) }) : null
1755
1966
  ] });
1756
1967
  }
1757
- const J = [
1968
+ const X = [
1758
1969
  "assignment",
1759
1970
  "quiz",
1760
1971
  "discussion",
@@ -1763,24 +1974,24 @@ const J = [
1763
1974
  "external_url",
1764
1975
  "external_tool",
1765
1976
  "sub_header"
1766
- ], Ie = [
1977
+ ], ye = [
1767
1978
  "not_started",
1768
1979
  "in_progress",
1769
1980
  "all_submitted",
1770
1981
  "all_graded",
1771
1982
  "missing",
1772
1983
  "locked"
1773
- ], Re = [
1984
+ ], ze = [
1774
1985
  "must_view",
1775
1986
  "must_submit",
1776
1987
  "must_contribute",
1777
1988
  "must_mark_done",
1778
1989
  "min_score",
1779
1990
  "min_percentage"
1780
- ], fs = ["assignment", "quiz", "discussion"], ps = ["assignment", "quiz", "discussion"], Is = Date.UTC(2025, 0, 6), bs = 864e5, yt = "1", Pt = (e) => new Date(Is + e * bs).toISOString(), Ms = (e, t) => {
1781
- const n = Re[Math.floor(t / 3) % Re.length];
1991
+ ], so = ["assignment", "quiz", "discussion"], ro = ["external_url", "external_tool"], oo = ["assignment", "quiz", "discussion"], io = Date.UTC(2025, 0, 6), lo = 864e5, pe = "1", At = (e) => new Date(io + e * lo).toISOString(), ao = (e, t) => {
1992
+ const n = ze[Math.floor(t / 3) % ze.length];
1782
1993
  return n === "min_score" ? { itemId: e, type: n, minScore: 10 } : n === "min_percentage" ? { itemId: e, type: n, minPercentage: 80 } : { itemId: e, type: n };
1783
- }, xt = (e, t) => t % 3 === 0 && e !== "sub_header", wt = (e) => Ie[(e - 1) % Ie.length], _s = (e, t) => !ps.includes(e) || e === "discussion" && Math.floor(t / J.length) % 2 === 1 ? null : 5 + t % 4 * 5, Ss = (e, t, n, s) => {
1994
+ }, vt = (e, t) => t % 3 === 0 && e !== "sub_header", Nt = (e) => ye[(e - 1) % ye.length], uo = (e, t) => !oo.includes(e) || e === "discussion" && Math.floor(t / X.length) % 2 === 1 ? null : 5 + t % 4 * 5, co = (e, t, n, s) => {
1784
1995
  const r = n ? "in_progress" : "not_started";
1785
1996
  switch (e) {
1786
1997
  case "locked":
@@ -1796,58 +2007,59 @@ const J = [
1796
2007
  case "in_progress":
1797
2008
  return t ? s % 3 === 0 ? "submitted" : s % 3 === 1 ? "in_progress" : "not_started" : s % 2 === 0 ? r : "not_started";
1798
2009
  }
1799
- }, ys = (e) => e.status === "submitted" || e.status === "graded" || e.status === "in_progress" && e.pointsPossible == null, Ps = (e, t, n, s, r, i) => {
1800
- const u = String(e), a = String(e * 1e3 + t + 1), d = J[n % J.length], c = d === "sub_header", l = fs.includes(d) && (n % 4 === 0 || s === "missing"), m = xt(d, n) ? Ms(a, n) : null;
2010
+ }, mo = (e) => e.status === "submitted" || e.status === "graded" || e.status === "in_progress" && e.pointsPossible == null, go = (e, t, n, s, r, i) => {
2011
+ const u = String(e), a = String(e * 1e3 + t + 1), c = X[n % X.length], g = c === "sub_header", l = so.includes(c) && (n % 4 === 0 || s === "missing"), m = vt(c, n) ? ao(a, n) : null;
1801
2012
  return {
1802
2013
  id: a,
1803
2014
  moduleId: u,
1804
- title: `${d} ${t + 1}`,
1805
- type: d,
2015
+ title: `${c} ${t + 1}`,
2016
+ type: c,
1806
2017
  position: t + 1,
1807
2018
  indent: t % 5 === 4 ? 1 : 0,
1808
- // 1 in 7 unpublished, so a teacher view always has something to grey out.
2019
+ // 1 in 7 unpublished, so a teacher view always has something to gray out.
1809
2020
  // Same rule as the module: a student's page contains no unpublished items,
1810
- // so only a teacher fixture greys any out.
2021
+ // so only a teacher fixture grays any out.
1811
2022
  published: i === "teacher" ? n % 7 !== 0 : !0,
1812
- url: c ? null : `/courses/${yt}/modules/items/${a}`,
2023
+ url: g ? null : `/courses/${pe}/modules/items/${a}`,
2024
+ newTab: ro.includes(c) && n % 2 === 0,
1813
2025
  completionRequirement: m,
1814
- dueAt: l ? Pt(n % 90) : null,
2026
+ dueAt: l ? At(n % 90) : null,
1815
2027
  status: s,
1816
2028
  pointsPossible: r,
1817
2029
  // Canvas Career only, so it rides in `extensions`. Sparse on purpose: a
1818
2030
  // handful per fixture proves the escape hatch survives a round trip, and
1819
2031
  // every other item must carry no `extensions` key at all.
1820
- extensions: Ze(
2032
+ extensions: rt(
1821
2033
  void 0,
1822
2034
  n % 37 === 0 ? 5 + n % 4 * 10 : null
1823
2035
  )
1824
2036
  };
1825
- }, xs = (e, t, n, s) => {
1826
- const r = wt(e), i = [];
2037
+ }, fo = (e, t, n, s) => {
2038
+ const r = Nt(e), i = [];
1827
2039
  let u = 0;
1828
2040
  for (let a = 0; a < t; a += 1) {
1829
- const d = n + a, c = J[d % J.length], l = _s(c, d), m = l !== null, M = m ? u++ : a, _ = Ss(r, m, xt(c, d), M);
1830
- i.push(Ps(e, a, d, _, l, s));
2041
+ const c = n + a, g = X[c % X.length], l = uo(g, c), m = l !== null, S = m ? u++ : a, p = co(r, m, vt(g, c), S);
2042
+ i.push(go(e, a, c, p, l, s));
1831
2043
  }
1832
2044
  return i;
1833
- }, ws = (e, t, n) => {
1834
- const s = wt(e);
2045
+ }, ho = (e, t, n) => {
2046
+ const s = Nt(e);
1835
2047
  return s === "locked" || s === "not_started" ? s : t.length === 0 ? "not_started" : !t.some((r) => r.pointsPossible != null) || s === "missing" && n === 0 ? "in_progress" : s;
1836
- }, Es = (e) => {
2048
+ }, po = (e) => {
1837
2049
  const t = e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort();
1838
2050
  return t.length > 0 ? t[t.length - 1] : null;
1839
- }, Cs = (e, t, n) => {
1840
- const s = t.filter((d) => d.completionRequirement), r = n ?? s.length, i = Math.min(s.filter(ys).length, r), u = t.filter((d) => d.status === "missing").length;
2051
+ }, Io = (e, t, n) => {
2052
+ const s = t.filter((c) => c.completionRequirement), r = n ?? s.length, i = Math.min(s.filter(mo).length, r), u = t.filter((c) => c.status === "missing").length;
1841
2053
  return {
1842
- status: ws(e, t, u),
2054
+ status: ho(e, t, u),
1843
2055
  requirementsMet: i,
1844
2056
  requirementCount: r,
1845
2057
  // Derived from the clamped pair, so the bar and the fraction always agree.
1846
2058
  percentComplete: r > 0 ? Math.round(i / r * 100) : 0,
1847
- latestDueAt: Es(t),
2059
+ latestDueAt: po(t),
1848
2060
  missingCount: u
1849
2061
  };
1850
- }, vs = (e, t, n) => {
2062
+ }, bo = (e, t, n) => {
1851
2063
  const s = e % 2 === 0 ? null : 1;
1852
2064
  return {
1853
2065
  id: String(e),
@@ -1856,17 +2068,17 @@ const J = [
1856
2068
  // A student sees only published modules; publish state varies for a teacher.
1857
2069
  published: n === "teacher" ? e % 4 !== 0 : !0,
1858
2070
  itemCount: t.length,
1859
- unlockAt: e % 5 === 0 ? Pt(e) : null,
2071
+ unlockAt: e % 5 === 0 ? At(e) : null,
1860
2072
  prerequisiteModuleIds: e > 1 && e % 3 === 0 ? [String(e - 1)] : [],
1861
2073
  requirementCount: s,
1862
2074
  requireSequentialProgress: e % 6 === 0,
1863
2075
  completionRequirements: t.flatMap(
1864
2076
  (r) => r.completionRequirement ? [r.completionRequirement] : []
1865
2077
  ),
1866
- progress: Cs(e, t, s)
2078
+ progress: Io(e, t, s)
1867
2079
  };
1868
2080
  };
1869
- function Ts(e) {
2081
+ function Mo(e) {
1870
2082
  return {
1871
2083
  courseId: e.courseId,
1872
2084
  modules: e.modules.map(({ progress: t, ...n }) => n),
@@ -1878,89 +2090,145 @@ function Ts(e) {
1878
2090
  )
1879
2091
  };
1880
2092
  }
1881
- function he(e, t = {}) {
1882
- const n = t.view ?? "student", s = t.courseId ?? yt, r = [], i = {};
2093
+ function Ie(e, t = {}) {
2094
+ const n = t.view ?? "student", s = t.courseId ?? pe, r = [], i = {};
1883
2095
  let u = 0;
1884
- e.forEach((d, c) => {
1885
- const l = c + 1, m = xs(l, d, u, n);
1886
- u += d, r.push(vs(l, m, n)), i[String(l)] = m;
2096
+ e.forEach((c, g) => {
2097
+ const l = g + 1, m = fo(l, c, u, n);
2098
+ u += c, r.push(bo(l, m, n)), i[String(l)] = m;
1887
2099
  });
1888
2100
  const a = { courseId: s, modules: r, itemsByModuleId: i };
1889
- return n === "teacher" ? Ts(a) : a;
2101
+ return n === "teacher" ? Mo(a) : a;
1890
2102
  }
1891
- const Ns = Ie.length, As = 8, Ls = 120, Ds = 25, Rs = 250, qe = 8;
1892
- function ur() {
1893
- return he(Array.from({ length: Ns }, () => As));
2103
+ const ue = (e) => `/courses/${pe}/modules/items/${e}`, So = ye.length, yo = 8, _o = 120, To = 25, Po = 250, Ue = 8;
2104
+ function oi() {
2105
+ return Ie(Array.from({ length: So }, () => yo));
1894
2106
  }
1895
- function dr() {
1896
- return he(Array.from({ length: Ls }, () => Ds));
2107
+ function ii() {
2108
+ return Ie(Array.from({ length: _o }, () => To));
1897
2109
  }
1898
- function cr() {
1899
- return he([
1900
- qe,
1901
- Rs,
1902
- qe
2110
+ function li() {
2111
+ return Ie([
2112
+ Ue,
2113
+ Po,
2114
+ Ue
1903
2115
  ]);
1904
2116
  }
1905
- function mr() {
1906
- return he([]);
2117
+ function ai() {
2118
+ return Ie([]);
2119
+ }
2120
+ function ui() {
2121
+ const t = [
2122
+ { title: "Reading: limits from the left and the right", type: "page", url: ue(1) },
2123
+ {
2124
+ title: "Desmos: interactive limit explorer",
2125
+ type: "external_url",
2126
+ url: ue(2),
2127
+ newTab: !0
2128
+ },
2129
+ { title: "Practice", type: "sub_header", url: null },
2130
+ { title: "Worksheet with no destination", type: "assignment", url: null },
2131
+ {
2132
+ title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
2133
+ type: "assignment",
2134
+ url: ue(5)
2135
+ },
2136
+ { title: "Unit test", type: "quiz", url: ue(6), status: "locked" }
2137
+ ].map((n, s) => ({
2138
+ id: String(s + 1),
2139
+ moduleId: "1",
2140
+ position: s + 1,
2141
+ indent: 0,
2142
+ published: !0,
2143
+ newTab: !1,
2144
+ status: "not_started",
2145
+ ...n
2146
+ }));
2147
+ return {
2148
+ courseId: pe,
2149
+ modules: [
2150
+ {
2151
+ id: "1",
2152
+ name: "Limits and Continuity",
2153
+ position: 1,
2154
+ published: !0,
2155
+ itemCount: t.length,
2156
+ prerequisiteModuleIds: [],
2157
+ requireSequentialProgress: !1
2158
+ }
2159
+ ],
2160
+ itemsByModuleId: { 1: t }
2161
+ };
1907
2162
  }
1908
2163
  export {
1909
- Ke as CompletionRequirementSchema,
1910
- Ht as CompletionRequirementTypeSchema,
1911
- dt as DEFAULT_INLINE_THRESHOLD,
1912
- Cn as DEFAULT_ITEM_CONCURRENCY,
1913
- ut as DEFAULT_ITEM_PAGE_SIZE,
1914
- k as DEFAULT_LOCALE,
1915
- _e as DEFAULT_PAGE_SIZE,
1916
- ct as DEFAULT_RETAIN_COLLAPSED_LIMIT,
1917
- ce as DEFAULT_STALE_TIME_MS,
1918
- Xe as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
1919
- yt as FIXTURE_COURSE_ID,
1920
- Vn as FilterChips,
1921
- wn as GET_MODULES,
1922
- En as GET_MODULE_ITEMS,
1923
- pe as INLINE_ITEM_LIMIT,
1924
- Me as INLINE_QUERY_NODE_BUDGET,
1925
- tn as InMemoryCourseMismatchError,
1926
- Wn as MODULES_FILTER_IDS,
1927
- gs as ModuleCard,
1928
- ls as ModuleItemRow,
1929
- He as ModuleItemSchema,
1930
- ns as ModuleItemStatusPill,
1931
- Wt as ModuleItemStatusSchema,
1932
- jt as ModuleItemTypeSchema,
1933
- Jt as ModuleItemsPageSchema,
1934
- Vt as ModuleProgressSchema,
1935
- Xt as ModuleSchema,
1936
- ts as ModuleStatusPill,
1937
- Kt as ModuleStatusSchema,
1938
- lr as ModulesI18nProvider,
1939
- ar as ModulesList,
1940
- Zt as ModulesPageSchema,
1941
- Ve as PageInfoSchema,
1942
- Je as PartialCanvasResponseError,
1943
- he as buildFixture,
1944
- mr as courseEmpty,
1945
- cr as courseFatModule,
1946
- dr as courseLarge,
1947
- ur as courseSmall,
1948
- tr as createCanvasGraphqlAdapter,
1949
- er as createInMemoryAdapter,
1950
- pt as defaultTranslate,
1951
- Kn as filterLabel,
1952
- en as getEstimatedDurationMinutes,
1953
- ir as invalidateCourse,
1954
- rr as invalidateModuleItems,
1955
- or as invalidateModuleList,
1956
- es as moduleItemStatusLabel,
1957
- mt as moduleItemsPrefix,
1958
- Jn as moduleStatusLabel,
1959
- te as modulesKeys,
1960
- vn as modulesListPrefix,
1961
- nr as useModuleItems,
1962
- Tn as useModules,
1963
- R as useModulesI18n,
1964
- sr as useModulesPageData,
1965
- Ze as withEstimatedDurationMinutes
2164
+ et as CompletionRequirementSchema,
2165
+ nn as CompletionRequirementTypeSchema,
2166
+ It as DEFAULT_INLINE_THRESHOLD,
2167
+ zn as DEFAULT_ITEM_CONCURRENCY,
2168
+ pt as DEFAULT_ITEM_PAGE_SIZE,
2169
+ te as DEFAULT_LOCALE,
2170
+ Pe as DEFAULT_PAGE_SIZE,
2171
+ bt as DEFAULT_RETAIN_COLLAPSED_LIMIT,
2172
+ he as DEFAULT_STALE_TIME_MS,
2173
+ st as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
2174
+ pe as FIXTURE_COURSE_ID,
2175
+ zr as FilterChips,
2176
+ Nn as GET_MODULES,
2177
+ Dn as GET_MODULE_ITEMS,
2178
+ Me as INLINE_ITEM_LIMIT,
2179
+ Te as INLINE_QUERY_NODE_BUDGET,
2180
+ un as InMemoryCourseMismatchError,
2181
+ Dr as MODULES_FILTER_IDS,
2182
+ to as ModuleCard,
2183
+ Kr as ModuleItemRow,
2184
+ tt as ModuleItemSchema,
2185
+ jr as ModuleItemStatusPill,
2186
+ en as ModuleItemStatusSchema,
2187
+ Jt as ModuleItemTypeSchema,
2188
+ ln as ModuleItemsPageSchema,
2189
+ Vr as ModuleNumberBadge,
2190
+ sn as ModuleProgressSchema,
2191
+ rn as ModuleSchema,
2192
+ Gr as ModuleStatusPill,
2193
+ tn as ModuleStatusSchema,
2194
+ Ho as ModulesConfigProvider,
2195
+ Rn as ModulesConfigSchema,
2196
+ si as ModulesI18nProvider,
2197
+ ri as ModulesList,
2198
+ on as ModulesPageSchema,
2199
+ nt as PageInfoSchema,
2200
+ ot as PartialCanvasResponseError,
2201
+ kn as RegistryEntrySchema,
2202
+ fe as baseModulesConfig,
2203
+ Ie as buildFixture,
2204
+ ai as courseEmpty,
2205
+ li as courseFatModule,
2206
+ ui as courseItemLinks,
2207
+ ii as courseLarge,
2208
+ oi as courseSmall,
2209
+ Wo as createCanvasGraphqlAdapter,
2210
+ Qo as createInMemoryAdapter,
2211
+ Pt as createTranslate,
2212
+ Tr as defaultTranslate,
2213
+ kr as filterLabel,
2214
+ an as getEstimatedDurationMinutes,
2215
+ ni as invalidateCourse,
2216
+ ei as invalidateModuleItems,
2217
+ ti as invalidateModuleList,
2218
+ O as mergeRegistry,
2219
+ Br as moduleItemStatusLabel,
2220
+ Mt as moduleItemsPrefix,
2221
+ $r as moduleStatusLabel,
2222
+ ee as modulesKeys,
2223
+ Un as modulesListPrefix,
2224
+ Zo as partialModulesConfig,
2225
+ qn as registrySchema,
2226
+ Fn as resolveModulesConfig,
2227
+ Xo as useModuleItems,
2228
+ On as useModules,
2229
+ Ko as useModulesConfig,
2230
+ N as useModulesI18n,
2231
+ Jo as useModulesPageData,
2232
+ Vo as visibleEntries,
2233
+ rt as withEstimatedDurationMinutes
1966
2234
  };