@instructure/platform-modules 1.13.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/adapters/canvasGraphql/index.d.ts.map +1 -1
  2. package/dist/adapters/canvasGraphql/normalize.d.ts +1 -0
  3. package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
  4. package/dist/adapters/canvasGraphql/queries.d.ts +13 -1
  5. package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
  6. package/dist/adapters/inMemory.d.ts.map +1 -1
  7. package/dist/chunks/ModulesProgressBar-DOUI1JeK.js +2532 -0
  8. package/dist/components/FilterSelect.d.ts.map +1 -1
  9. package/dist/components/ModuleCard.d.ts.map +1 -1
  10. package/dist/components/ModuleItemRow.d.ts +3 -4
  11. package/dist/components/ModuleItemRow.d.ts.map +1 -1
  12. package/dist/components/ModulesList.stories.d.ts +1 -1
  13. package/dist/components/ModulesList.stories.d.ts.map +1 -1
  14. package/dist/components/ModulesProgressBar.d.ts +5 -1
  15. package/dist/components/ModulesProgressBar.d.ts.map +1 -1
  16. package/dist/edit/EditModuleCard.d.ts +19 -0
  17. package/dist/edit/EditModuleCard.d.ts.map +1 -0
  18. package/dist/edit/EditModuleItemRow.d.ts +10 -0
  19. package/dist/edit/EditModuleItemRow.d.ts.map +1 -0
  20. package/dist/edit/ModulesEditActions.d.ts +7 -0
  21. package/dist/edit/ModulesEditActions.d.ts.map +1 -0
  22. package/dist/edit/ModulesEditView.d.ts +10 -0
  23. package/dist/edit/ModulesEditView.d.ts.map +1 -0
  24. package/dist/edit/ModulesEditView.stories.d.ts +17 -0
  25. package/dist/edit/ModulesEditView.stories.d.ts.map +1 -0
  26. package/dist/edit/controls/AddItemMenu.d.ts +6 -0
  27. package/dist/edit/controls/AddItemMenu.d.ts.map +1 -0
  28. package/dist/edit/controls/AddModuleButton.d.ts +6 -0
  29. package/dist/edit/controls/AddModuleButton.d.ts.map +1 -0
  30. package/dist/edit/controls/DragHandle.d.ts +12 -0
  31. package/dist/edit/controls/DragHandle.d.ts.map +1 -0
  32. package/dist/edit/controls/InlineRename.d.ts +5 -0
  33. package/dist/edit/controls/InlineRename.d.ts.map +1 -0
  34. package/dist/edit/controls/ItemActionsMenu.d.ts +7 -0
  35. package/dist/edit/controls/ItemActionsMenu.d.ts.map +1 -0
  36. package/dist/edit/controls/ItemPublishToggle.d.ts +6 -0
  37. package/dist/edit/controls/ItemPublishToggle.d.ts.map +1 -0
  38. package/dist/edit/controls/ModuleActionsMenu.d.ts +6 -0
  39. package/dist/edit/controls/ModuleActionsMenu.d.ts.map +1 -0
  40. package/dist/edit/controls/ModulePublishMenu.d.ts +6 -0
  41. package/dist/edit/controls/ModulePublishMenu.d.ts.map +1 -0
  42. package/dist/edit/controls/ModuleSettingsModal.d.ts +6 -0
  43. package/dist/edit/controls/ModuleSettingsModal.d.ts.map +1 -0
  44. package/dist/edit/controls/PublishAllMenu.d.ts +6 -0
  45. package/dist/edit/controls/PublishAllMenu.d.ts.map +1 -0
  46. package/dist/edit/controls/ViewAsLearnerButton.d.ts +6 -0
  47. package/dist/edit/controls/ViewAsLearnerButton.d.ts.map +1 -0
  48. package/dist/edit/dnd/EditDndProvider.d.ts +18 -0
  49. package/dist/edit/dnd/EditDndProvider.d.ts.map +1 -0
  50. package/dist/edit/dnd/announcements.d.ts +24 -0
  51. package/dist/edit/dnd/announcements.d.ts.map +1 -0
  52. package/dist/edit/dnd/ids.d.ts +41 -0
  53. package/dist/edit/dnd/ids.d.ts.map +1 -0
  54. package/dist/edit/index.d.ts +6 -0
  55. package/dist/edit/index.d.ts.map +1 -1
  56. package/dist/edit.js +794 -131
  57. package/dist/hooks/useModulesPageData.d.ts.map +1 -1
  58. package/dist/index.js +1223 -1986
  59. package/dist/types/domain.d.ts +2 -0
  60. package/dist/types/domain.d.ts.map +1 -1
  61. package/dist/types/schemas.d.ts.map +1 -1
  62. package/locales/en.json +23 -1
  63. package/package.json +1 -1
  64. package/dist/chunks/useModulesPageData-BFCZuChP.js +0 -1639
package/dist/index.js CHANGED
@@ -1,68 +1,49 @@
1
- import { w as vt, I as Ro, M as ko, a as Oo, b as xo, i as Yt, c as Do, v as je, F as No, h as zo, o as gt, m as me, d as qo, g as $o, e as Fo, f as Uo, u as _e, j as P, r as Bo, k as Go, l as Wo, n as An, s as Ho, p as Ko, q as jo, t as Yo, E as Vo, x as Qo, y as Xo, z as Zo, A as Jo, B as er, C as tr, D as nr, G as Fe } from "./chunks/useModulesPageData-BFCZuChP.js";
2
- import { H as ma, J as ga, a6 as pa, a7 as fa, a8 as ha, aj as Ia, a9 as _a, aa as Ea, ab as ya, ac as ba, _ as Sa, V as Ma, X as Ta, L as Ca, N as va, O as wa, P as Pa, Q as Aa, S as La, R as Ra, T as ka, U as Oa, a2 as xa, Y as Da, ai as Na, Z as za, ak as qa, $ as $a, W as Fa, a0 as Ua, ae as Ba, a1 as Ga, af as Wa, ag as Ha, ah as Ka, K as ja, a3 as Ya, a4 as Va, ad as Qa, a5 as Xa } from "./chunks/useModulesPageData-BFCZuChP.js";
3
- import { jsx as r, jsxs as g, Fragment as Q } from "react/jsx-runtime";
4
- import { createContext as or, useContext as rr, useRef as k, useMemo as F, isValidElement as wt, useCallback as V, memo as Ln, Fragment as Rn, cloneElement as ir, useState as j, useEffect as W, useId as sr } from "react";
5
- import { canvasFetch as Vt } from "@instructure/platform-canvas-fetch";
6
- import { z as b } from "zod";
7
- import { gql as we } from "graphql-tag";
8
- import { Pill as kn } from "@instructure/ui-pill/v11_7";
9
- import { useQueryClient as lr, QueryClient as ar, QueryClientProvider as cr } from "@tanstack/react-query";
10
- import { ScreenReaderContent as Ye } from "@instructure/ui-a11y-content";
11
- import { SimpleSelect as Qt } from "@instructure/ui-simple-select/v11_7";
12
- import { Text as S } from "@instructure/ui-text/v11_7";
13
- import { LockInstUIIcon as Pt, CircleAlertInstUIIcon as fe, CircleCheckInstUIIcon as At, ClockFadingInstUIIcon as Lt, CircleDashedInstUIIcon as Rt, CalendarInstUIIcon as ur, CornerDownRightInstUIIcon as dr, IconArrowOpenUpLine as mr, IconArrowOpenDownLine as gr, IconClockLine as On, IconAiColoredSolid as pr, IconAiSolid as fr, IconArrowOpenStartLine as hr, IconArrowOpenEndLine as Ir } from "@instructure/ui-icons";
14
- import { useTheme as xn, InstUISettingsProvider as _r } from "@instructure/emotion";
15
- import { Flex as I } from "@instructure/ui-flex/v11_7";
16
- import { Link as Dn } from "@instructure/ui-link/v11_7";
17
- import { View as E } from "@instructure/ui-view/v11_7";
18
- import { isValid as ht, colorToRGB as It, overlayColors as Er, alpha as yr, color2hex as Nn, contrast as le, darken as br, lighten as Sr } from "@instructure/ui-color-utils";
19
- import { politeAnnounce as K, getLiveRegion as We, TruncateWithTooltip as Mr } from "@instructure/platform-instui-bindings";
20
- import { Alert as ae } from "@instructure/ui-alerts/v11_7";
21
- import { IconButton as _t, CloseButton as Tr, Button as H } from "@instructure/ui-buttons/v11_7";
22
- import { Heading as Ie } from "@instructure/ui-heading/v11_7";
23
- import { Pagination as zn } from "@instructure/ui-pagination/v11_7";
24
- import { ProgressBar as Cr } from "@instructure/ui-progress/v11_7";
25
- import { Spinner as kt } from "@instructure/ui-spinner/v11_7";
26
- import { Tooltip as qn } from "@instructure/ui-tooltip/v11_7";
27
- import { WithBreakpoints as vr } from "@instructure/platform-with-breakpoints";
28
- import { Modal as wr, ModalHeader as Pr, ModalBody as Ar, ModalFooter as Lr } from "@instructure/ui-modal/v11_7";
29
- import { CheckboxGroup as Xt, Checkbox as pt } from "@instructure/ui-checkbox/v11_7";
30
- import { RadioInputGroup as Rr, RadioInput as Zt } from "@instructure/ui-radio-input/v11_7";
31
- import { TextArea as kr } from "@instructure/ui-text-area/v11_7";
32
- import { List as Jt, ListItem as en } from "@instructure/ui-list/v11_7";
33
- const $n = or(null), Or = () => {
34
- };
35
- function Ql({
36
- host: e,
37
- onEvent: t,
38
- children: n
39
- }) {
40
- const o = k(t);
41
- o.current = t;
42
- const i = F(
43
- () => (s) => o.current({ event: s, host: e }),
44
- [e]
45
- );
46
- return /* @__PURE__ */ r($n.Provider, { value: i, children: n });
47
- }
48
- function Ve() {
49
- return rr($n) ?? Or;
50
- }
51
- function Fn(e) {
1
+ import { w as Ve, I as Sn, M as yn, a as Tn, b as bn, i as ft, c as Pn, v as Ze, h as Cn, o as Ue, m as ne, d as vn, e as Ln, g as wn, f as An, j as Rn, u as x, k as Te, D as kn, l as _e, n as On, p as Xe, q as Je, r as Dn, s as qn, t as zn, x as Nn, y as Ot, z as xn, A as Dt, B as qt, C as $n, E as Un, F as Fn, G as Bn, H as Gn, J as Wn, K as Hn, L as Yn, N as jn, O as Qn, P as Kn, Q as Vn, R as Zn, S as Ie } from "./chunks/ModulesProgressBar-DOUI1JeK.js";
2
+ import { a8 as io, T as ro, U as so, ao as oo, ap as lo, aq as ao, aF as uo, ar as co, as as mo, at as go, au as po, ab as fo, a4 as ho, V as Mo, ad as _o, a7 as Io, aA as Eo, ag as So, ah as yo, X as To, aC as bo, Y as Po, Z as Co, _ as vo, $ as Lo, a1 as wo, a6 as Ao, a0 as Ro, a2 as ko, a3 as Oo, ai as Do, ak as qo, a9 as zo, aE as No, aa as xo, aG as $o, ac as Uo, a5 as Fo, ae as Bo, aw as Go, af as Wo, aB as Ho, ax as Yo, aD as jo, ay as Qo, az as Ko, aj as Vo, W as Zo, al as Xo, am as Jo, av as el, an as tl } from "./chunks/ModulesProgressBar-DOUI1JeK.js";
3
+ import { canvasFetch as ht } from "@instructure/platform-canvas-fetch";
4
+ import { z as Mt } from "zod";
5
+ import { gql as J } from "graphql-tag";
6
+ import { jsx as s, jsxs as m, Fragment as W } from "react/jsx-runtime";
7
+ import { Pill as Xn } from "@instructure/ui-pill/v11_7";
8
+ import { useQueryClient as Jn, QueryClient as ei, QueryClientProvider as ti } from "@tanstack/react-query";
9
+ import { useCallback as U, useMemo as F, useId as ni, memo as ii, useRef as k, useEffect as B, useState as G } from "react";
10
+ import { ScreenReaderContent as zt } from "@instructure/ui-a11y-content";
11
+ import { SimpleSelect as _t } from "@instructure/ui-simple-select/v11_7";
12
+ import { Text as b } from "@instructure/ui-text/v11_7";
13
+ import { IconArrowOpenUpLine as ri, IconArrowOpenDownLine as si, IconClockLine as Nt, IconAiColoredSolid as oi, IconAiSolid as li } from "@instructure/ui-icons";
14
+ import { politeAnnounce as N, getLiveRegion as Se, TruncateWithTooltip as ai } from "@instructure/platform-instui-bindings";
15
+ import { InstUISettingsProvider as ui } from "@instructure/emotion";
16
+ import { Alert as X } from "@instructure/ui-alerts/v11_7";
17
+ import { IconButton as di, CloseButton as ci, Button as z } from "@instructure/ui-buttons/v11_7";
18
+ import { Flex as _ } from "@instructure/ui-flex/v11_7";
19
+ import { Heading as ue } from "@instructure/ui-heading/v11_7";
20
+ import { Link as mi } from "@instructure/ui-link/v11_7";
21
+ import { List as Ge, ListItem as We } from "@instructure/ui-list/v11_7";
22
+ import { Pagination as xt } from "@instructure/ui-pagination/v11_7";
23
+ import { ProgressBar as gi } from "@instructure/ui-progress/v11_7";
24
+ import { Spinner as et } from "@instructure/ui-spinner/v11_7";
25
+ import { Tooltip as pi } from "@instructure/ui-tooltip/v11_7";
26
+ import { View as M } from "@instructure/ui-view/v11_7";
27
+ import { WithBreakpoints as fi } from "@instructure/platform-with-breakpoints";
28
+ import { Modal as hi, ModalHeader as Mi, ModalBody as _i, ModalFooter as Ii } from "@instructure/ui-modal/v11_7";
29
+ import { CheckboxGroup as It, Checkbox as Fe } from "@instructure/ui-checkbox/v11_7";
30
+ import { RadioInputGroup as Ei, RadioInput as Et } from "@instructure/ui-radio-input/v11_7";
31
+ import { TextArea as Si } from "@instructure/ui-text-area/v11_7";
32
+ function $t(e) {
52
33
  return e === "module" ? "module" : "module item";
53
34
  }
54
- class Un extends Error {
55
- constructor(t, n, o) {
35
+ class Ut extends Error {
36
+ constructor(t, n, r) {
56
37
  super(
57
- `Canvas returned ${Fn(t)} ${n} without a usable ${o}. This is a partial response; refusing to guess a value for it.`
58
- ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = o;
38
+ `Canvas returned ${$t(t)} ${n} without a usable ${r}. This is a partial response; refusing to guess a value for it.`
39
+ ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = r;
59
40
  }
60
41
  }
61
- function Bn(e, t, n) {
42
+ function Ft(e, t, n) {
62
43
  if (e != null) return e;
63
- throw new Un(t, n, "published");
44
+ throw new Ut(t, n, "published");
64
45
  }
65
- function xr(e, t) {
46
+ function yi(e, t) {
66
47
  if (e.onUnsupportedItem) {
67
48
  e.onUnsupportedItem(t);
68
49
  return;
@@ -71,16 +52,16 @@ function xr(e, t) {
71
52
  `[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
72
53
  );
73
54
  }
74
- function Gn(e, t) {
55
+ function Bt(e, t) {
75
56
  if (e.onUnsupportedStatus) {
76
57
  e.onUnsupportedStatus(t);
77
58
  return;
78
59
  }
79
60
  console.warn(
80
- `[platform-modules] ${Fn(t.subject)} ${t.id}: status "${t.value}" is outside the closed status enum and was ignored. Pass \`onUnsupportedStatus\` to handle these yourself.`
61
+ `[platform-modules] ${$t(t.subject)} ${t.id}: status "${t.value}" is outside the closed status enum and was ignored. Pass \`onUnsupportedStatus\` to handle these yourself.`
81
62
  );
82
63
  }
83
- const Dr = /* @__PURE__ */ new Map([
64
+ const Ti = /* @__PURE__ */ new Map([
84
65
  ["Assignment", "assignment"],
85
66
  ["Quiz", "quiz"],
86
67
  ["Discussion", "discussion"],
@@ -92,21 +73,21 @@ const Dr = /* @__PURE__ */ new Map([
92
73
  ["SubHeader", "sub_header"],
93
74
  ["PeerReviewSubAssignment", "assignment"]
94
75
  ]);
95
- function Nr(e) {
76
+ function bi(e) {
96
77
  const t = e == null ? void 0 : e.__typename;
97
78
  if (!t) return null;
98
- const n = Dr.get(t);
79
+ const n = Ti.get(t);
99
80
  return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
100
81
  }
101
- const zr = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
102
- function Wn(e) {
82
+ const Pi = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
83
+ function Gt(e) {
103
84
  if (!e) return null;
104
- const t = zr.exec(e);
85
+ const t = Pi.exec(e);
105
86
  if (!t) return null;
106
- const [, n, o, i, s, l] = t, a = Number(n ?? 0) * 7 * 24 * 60 + Number(o ?? 0) * 24 * 60 + Number(i ?? 0) * 60 + Number(s ?? 0) + Number(l ?? 0) / 60;
107
- return Math.round(a);
87
+ const [, n, r, o, i, l] = t, u = Number(n ?? 0) * 7 * 24 * 60 + Number(r ?? 0) * 24 * 60 + Number(o ?? 0) * 60 + Number(i ?? 0) + Number(l ?? 0) / 60;
88
+ return Math.round(u);
108
89
  }
109
- const qr = /* @__PURE__ */ new Set([
90
+ const Ci = /* @__PURE__ */ new Set([
110
91
  "must_view",
111
92
  "must_mark_done",
112
93
  "must_contribute",
@@ -114,18 +95,18 @@ const qr = /* @__PURE__ */ new Set([
114
95
  "min_score",
115
96
  "min_percentage"
116
97
  ]);
117
- function $r(e) {
118
- return qr.has(e) ? e : "unknown";
98
+ function vi(e) {
99
+ return Ci.has(e) ? e : "unknown";
119
100
  }
120
- function Fr(e) {
101
+ function Li(e) {
121
102
  return {
122
103
  itemId: String(e.id),
123
- type: $r(e.type),
104
+ type: vi(e.type),
124
105
  minScore: e.minScore ?? null,
125
106
  minPercentage: e.minPercentage ?? null
126
107
  };
127
108
  }
128
- function Hn(e) {
109
+ function Wt(e) {
129
110
  return {
130
111
  hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
131
112
  endCursor: (e == null ? void 0 : e.endCursor) ?? null,
@@ -135,36 +116,36 @@ function Hn(e) {
135
116
  totalNrOfPages: (e == null ? void 0 : e.totalNrOfPages) ?? null
136
117
  };
137
118
  }
138
- const Ur = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
139
- function Br(e) {
119
+ const wi = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
120
+ function Ai(e) {
140
121
  var t;
141
122
  for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
142
123
  if (n) return n;
143
124
  return null;
144
125
  }
145
- function Kn(e, t) {
126
+ function Ht(e, t) {
146
127
  if (!e) return;
147
- const n = new Map(t.map((s) => [s.itemId, s.type])), o = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
148
- for (const s of e.requirementsMet ?? []) {
149
- if (!s) continue;
150
- const l = String(s.id);
151
- n.get(l) === s.type && o.add(l);
128
+ const n = new Map(t.map((i) => [i.itemId, i.type])), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
129
+ for (const i of e.requirementsMet ?? []) {
130
+ if (!i) continue;
131
+ const l = String(i.id);
132
+ n.get(l) === i.type && r.add(l);
152
133
  }
153
- for (const s of e.incompleteRequirements ?? []) {
154
- if (!s) continue;
155
- const l = String(s.id);
156
- n.get(l) === s.type && Ur.has(s.type) && i.set(l, s.score ?? null);
134
+ for (const i of e.incompleteRequirements ?? []) {
135
+ if (!i) continue;
136
+ const l = String(i.id);
137
+ n.get(l) === i.type && wi.has(i.type) && o.set(l, i.score ?? null);
157
138
  }
158
139
  return {
159
140
  locked: e.locked === !0 || e.workflowState === "locked",
160
141
  workflowState: e.workflowState ?? null,
161
142
  completed: e.completed === !0 || e.workflowState === "completed",
162
143
  started: e.started === !0 || e.workflowState === "started",
163
- requirementsMetItemIds: o,
164
- incompleteRequirementScores: i
144
+ requirementsMetItemIds: r,
145
+ incompleteRequirementScores: o
165
146
  };
166
147
  }
167
- const Gr = /* @__PURE__ */ new Map([
148
+ const Ri = /* @__PURE__ */ new Map([
168
149
  ["LOCKED", "locked"],
169
150
  ["MISSING", "missing"],
170
151
  ["INCOMPLETE", "incomplete"],
@@ -172,16 +153,16 @@ const Gr = /* @__PURE__ */ new Map([
172
153
  ["IN_PROGRESS", "in_progress"],
173
154
  ["NOT_STARTED", "not_started"]
174
155
  ]);
175
- function Wr(e, t, n) {
156
+ function ki(e, t, n) {
176
157
  if (e == null) return;
177
- const o = Gr.get(e);
178
- return o || Gn(n, {
158
+ const r = Ri.get(e);
159
+ return r || Bt(n, {
179
160
  subject: "moduleItem",
180
161
  id: String(t),
181
162
  value: e
182
- }), o;
163
+ }), r;
183
164
  }
184
- const Hr = /* @__PURE__ */ new Map([
165
+ const Oi = /* @__PURE__ */ new Map([
185
166
  ["LOCKED", "locked"],
186
167
  ["MISSING", "missing"],
187
168
  ["MISSING_AND_INCOMPLETE", "missing_and_incomplete"],
@@ -190,128 +171,130 @@ const Hr = /* @__PURE__ */ new Map([
190
171
  ["IN_PROGRESS", "in_progress"],
191
172
  ["NOT_STARTED", "not_started"]
192
173
  ]);
193
- function Kr(e, t, n) {
174
+ function Di(e, t, n) {
194
175
  if (e == null) return;
195
- const o = Hr.get(e);
196
- return o || Gn(n, { subject: "module", id: String(t), value: e }), o;
176
+ const r = Oi.get(e);
177
+ return r || Bt(n, { subject: "module", id: String(t), value: e }), r;
197
178
  }
198
- function jr(e, t, n, o = {}) {
199
- var c, u;
179
+ function qi(e, t, n, r = {}) {
180
+ var a, d;
200
181
  if (!n) return;
201
- const i = e.requirementCount ?? t.length, s = Math.min(n.requirementsMetItemIds.size, i), l = ((c = e.submissionStatistics) == null ? void 0 : c.missingAssignmentCount) ?? 0, a = [...n.incompleteRequirementScores.values()].filter(
202
- (d) => d != null
182
+ const o = e.requirementCount ?? t.length, i = Math.min(n.requirementsMetItemIds.size, o), l = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0, u = [...n.incompleteRequirementScores.values()].filter(
183
+ (g) => g != null
203
184
  ).length;
204
185
  return {
205
- status: Kr(e.moduleStatus, e._id, o) ?? (n.locked ? "locked" : void 0),
206
- requirementsMet: s,
207
- requirementCount: i,
208
- percentComplete: i > 0 ? Math.round(s / i * 100) : 0,
209
- nextDueAt: ((u = e.submissionStatistics) == null ? void 0 : u.nextDueAt) ?? null,
186
+ status: Di(e.moduleStatus, e._id, r) ?? (n.locked ? "locked" : void 0),
187
+ requirementsMet: i,
188
+ requirementCount: o,
189
+ percentComplete: o > 0 ? Math.round(i / o * 100) : 0,
190
+ nextDueAt: ((d = e.submissionStatistics) == null ? void 0 : d.nextDueAt) ?? null,
210
191
  missingCount: l,
211
- incompleteCount: a
192
+ incompleteCount: u
212
193
  };
213
194
  }
214
- function Yr(e, t, n, o = {}, i) {
215
- var u, d, m;
216
- const s = String(e._id), l = Nr(e.content);
195
+ function zi(e, t, n, r = {}, o) {
196
+ var d, g, p;
197
+ const i = String(e._id), l = bi(e.content);
217
198
  if (!l)
218
- return xr(o, { id: s, typename: ((u = e.content) == null ? void 0 : u.__typename) ?? null }), null;
219
- const a = Br(e.content), c = n.get(s) ?? null;
199
+ return yi(r, { id: i, typename: ((d = e.content) == null ? void 0 : d.__typename) ?? null }), null;
200
+ const u = Ai(e.content), a = n.get(i) ?? null;
220
201
  return {
221
- id: s,
202
+ id: i,
222
203
  moduleId: t,
223
204
  title: e.title ?? "",
224
205
  type: l,
225
206
  position: e.position ?? 0,
207
+ itemNumber: e.itemNumber ?? void 0,
226
208
  indent: e.indent ?? 0,
227
- published: Bn(e.published, "moduleItem", s),
209
+ published: Ft(e.published, "moduleItem", i),
228
210
  url: e.url ?? null,
229
211
  newTab: e.newTab ?? !1,
230
- completionRequirement: c,
231
- dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((d = e.content) == null ? void 0 : d.dueAt) ?? null,
232
- status: i ? Wr(e.moduleItemStatus, s, o) ?? (i.locked ? "locked" : void 0) : void 0,
233
- pointsPossible: ((m = e.content) == null ? void 0 : m.pointsPossible) ?? null,
234
- extensions: vt(
212
+ completionRequirement: a,
213
+ dueAt: (u == null ? void 0 : u.cachedDueDate) ?? ((g = e.content) == null ? void 0 : g.dueAt) ?? null,
214
+ status: o ? ki(e.moduleItemStatus, i, r) ?? (o.locked ? "locked" : void 0) : void 0,
215
+ pointsPossible: ((p = e.content) == null ? void 0 : p.pointsPossible) ?? null,
216
+ extensions: Ve(
235
217
  void 0,
236
- Wn(e.estimatedDuration)
218
+ Gt(e.estimatedDuration)
237
219
  )
238
220
  };
239
221
  }
240
- function jn(e, t, n, o, i) {
241
- const s = [];
222
+ function Yt(e, t, n, r, o) {
223
+ const i = [];
242
224
  for (const l of e ?? []) {
243
225
  if (!l) continue;
244
- const a = Yr(
226
+ const u = zi(
245
227
  l,
246
228
  t,
247
229
  n,
248
- o,
249
- i
230
+ r,
231
+ o
250
232
  );
251
- a && s.push(a);
233
+ u && i.push(u);
252
234
  }
253
- return s;
235
+ return i;
254
236
  }
255
- function Yn(e) {
237
+ function jt(e) {
256
238
  const t = [], n = /* @__PURE__ */ new Map();
257
- for (const o of e ?? []) {
258
- if (!o) continue;
259
- const i = Fr(o);
260
- t.push(i), n.set(i.itemId, i);
239
+ for (const r of e ?? []) {
240
+ if (!r) continue;
241
+ const o = Li(r);
242
+ t.push(o), n.set(o.itemId, o);
261
243
  }
262
244
  return { list: t, byItemId: n };
263
245
  }
264
- function Vr(e, t = {}) {
265
- var u, d;
246
+ function Ni(e, t = {}) {
247
+ var d, g;
266
248
  const n = String(e._id);
267
249
  if (e.moduleItemsTotalCount == null)
268
- throw new Un("module", n, "moduleItemsTotalCount");
269
- const { list: o, byItemId: i } = Yn(e.completionRequirements), s = e.moduleItemsConnection, l = s != null && !((u = s.pageInfo) != null && u.hasNextPage), a = Kn(e.progression, o), c = l ? jn(s.nodes, n, i, t, a) : void 0;
250
+ throw new Ut("module", n, "moduleItemsTotalCount");
251
+ const { list: r, byItemId: o } = jt(e.completionRequirements), i = e.moduleItemsConnection, l = i != null && !((d = i.pageInfo) != null && d.hasNextPage), u = Ht(e.progression, r), a = l ? Yt(i.nodes, n, o, t, u) : void 0;
270
252
  return {
271
253
  id: n,
272
254
  name: e.name ?? "",
273
255
  position: e.position ?? 0,
274
- published: Bn(e.published, "module", n),
256
+ published: Ft(e.published, "module", n),
275
257
  itemCount: e.moduleItemsTotalCount,
276
- items: c,
277
- estimatedDurationMinutes: Wn(e.estimatedDuration) || void 0,
258
+ items: a,
259
+ estimatedDurationMinutes: Gt(e.estimatedDuration) || void 0,
278
260
  unlockAt: e.unlockAt ?? null,
279
261
  prerequisiteModules: (e.prerequisites ?? []).filter(
280
- (m) => m != null
281
- ).map((m) => ({ id: String(m.id), name: m.name ?? "" })),
262
+ (p) => p != null
263
+ ).map((p) => ({ id: String(p.id), name: p.name ?? "" })),
282
264
  requirementCount: e.requirementCount ?? null,
283
265
  requireSequentialProgress: e.requireSequentialProgress ?? !1,
284
- completionRequirements: o,
285
- progress: jr(e, o, a, t),
286
- collapsed: ((d = e.progression) == null ? void 0 : d.collapsed) ?? null
266
+ completionRequirements: r,
267
+ progress: qi(e, r, u, t),
268
+ collapsed: ((g = e.progression) == null ? void 0 : g.collapsed) ?? null
287
269
  };
288
270
  }
289
- function Qr(e, t = {}) {
290
- var i;
291
- const n = (i = e == null ? void 0 : e.legacyNode) == null ? void 0 : i.modulesConnection, o = [];
292
- for (const s of (n == null ? void 0 : n.nodes) ?? [])
293
- s && o.push(Vr(s, t));
294
- return { modules: o, pageInfo: Hn(n == null ? void 0 : n.pageInfo) };
271
+ function xi(e, t = {}) {
272
+ var o;
273
+ const n = (o = e == null ? void 0 : e.legacyNode) == null ? void 0 : o.modulesConnection, r = [];
274
+ for (const i of (n == null ? void 0 : n.nodes) ?? [])
275
+ i && r.push(Ni(i, t));
276
+ return { modules: r, pageInfo: Wt(n == null ? void 0 : n.pageInfo) };
295
277
  }
296
- function Xr(e, t, n = {}) {
297
- const o = e == null ? void 0 : e.legacyNode, { list: i, byItemId: s } = Yn(o == null ? void 0 : o.completionRequirements), l = o == null ? void 0 : o.moduleItemsConnection, a = Kn(o == null ? void 0 : o.progression, i);
278
+ function $i(e, t, n = {}) {
279
+ const r = e == null ? void 0 : e.legacyNode, { list: o, byItemId: i } = jt(r == null ? void 0 : r.completionRequirements), l = r == null ? void 0 : r.moduleItemsConnection, u = Ht(r == null ? void 0 : r.progression, o);
298
280
  return {
299
- items: jn(l == null ? void 0 : l.nodes, t, s, n, a),
300
- pageInfo: Hn(l == null ? void 0 : l.pageInfo)
281
+ items: Yt(l == null ? void 0 : l.nodes, t, i, n, u),
282
+ pageInfo: Wt(l == null ? void 0 : l.pageInfo)
301
283
  };
302
284
  }
303
- const Zr = we`
285
+ const Ui = J`
304
286
  fragment PlatformModulesSubmissionFields on Submission {
305
287
  _id
306
288
  cachedDueDate
307
289
  }
308
- `, Vn = we`
290
+ `, Qt = J`
309
291
  fragment PlatformModulesItemFields on ModuleItem {
310
292
  _id
311
293
  title
312
294
  url
313
295
  newTab
314
296
  position
297
+ itemNumber
315
298
  indent
316
299
  published
317
300
  estimatedDuration @include(if: $includeEstimatedDuration)
@@ -353,8 +336,8 @@ const Zr = we`
353
336
  }
354
337
  }
355
338
  }
356
- ${Zr}
357
- `, Qn = we`
339
+ ${Ui}
340
+ `, Kt = J`
358
341
  fragment PlatformModulesProgressionFields on ModuleProgression {
359
342
  workflowState
360
343
  completed
@@ -374,14 +357,74 @@ const Zr = we`
374
357
  score
375
358
  }
376
359
  }
377
- `, Jr = we`
360
+ `, Vt = J`
361
+ fragment PlatformModulesModuleFields on Module {
362
+ _id
363
+ name
364
+ position
365
+ published
366
+ unlockAt
367
+ moduleItemsTotalCount
368
+ estimatedDuration @include(if: $includeEstimatedDuration)
369
+ moduleStatus
370
+ requirementCount
371
+ requireSequentialProgress
372
+ prerequisites {
373
+ id
374
+ name
375
+ }
376
+ completionRequirements {
377
+ id
378
+ type
379
+ minScore
380
+ minPercentage
381
+ }
382
+ progression {
383
+ collapsed
384
+ ...PlatformModulesProgressionFields
385
+ }
386
+ submissionStatistics {
387
+ nextDueAt
388
+ missingAssignmentCount
389
+ }
390
+ }
391
+ ${Kt}
392
+ `, Fi = J`
378
393
  query PlatformModulesGetModules(
379
394
  $courseId: ID!
380
395
  $first: Int
381
396
  $after: String
382
397
  $before: String
383
398
  $last: Int
384
- $includeItems: Boolean!
399
+ $includeEstimatedDuration: Boolean!
400
+ $filter: ModuleFilterInput
401
+ ) {
402
+ legacyNode(_id: $courseId, type: Course) {
403
+ ... on Course {
404
+ modulesConnection(first: $first, after: $after, before: $before, last: $last, filter: $filter) {
405
+ nodes {
406
+ ...PlatformModulesModuleFields
407
+ }
408
+ pageInfo {
409
+ hasNextPage
410
+ hasPreviousPage
411
+ endCursor
412
+ startCursor
413
+ totalCount
414
+ totalNrOfPages
415
+ }
416
+ }
417
+ }
418
+ }
419
+ }
420
+ ${Vt}
421
+ `, Bi = J`
422
+ query PlatformModulesGetModulesWithItems(
423
+ $courseId: ID!
424
+ $first: Int
425
+ $after: String
426
+ $before: String
427
+ $last: Int
385
428
  $itemsFirst: Int!
386
429
  $includeSubmissions: Boolean!
387
430
  $includeEstimatedDuration: Boolean!
@@ -392,35 +435,8 @@ const Zr = we`
392
435
  ... on Course {
393
436
  modulesConnection(first: $first, after: $after, before: $before, last: $last, filter: $filter) {
394
437
  nodes {
395
- _id
396
- name
397
- position
398
- published
399
- unlockAt
400
- moduleItemsTotalCount
401
- estimatedDuration @include(if: $includeEstimatedDuration)
402
- moduleStatus
403
- requirementCount
404
- requireSequentialProgress
405
- prerequisites {
406
- id
407
- name
408
- }
409
- completionRequirements {
410
- id
411
- type
412
- minScore
413
- minPercentage
414
- }
415
- progression {
416
- collapsed
417
- ...PlatformModulesProgressionFields
418
- }
419
- submissionStatistics {
420
- nextDueAt
421
- missingAssignmentCount
422
- }
423
- moduleItemsConnection(first: $itemsFirst) @include(if: $includeItems) {
438
+ ...PlatformModulesModuleFields
439
+ moduleItemsConnection(first: $itemsFirst) {
424
440
  nodes {
425
441
  ...PlatformModulesItemFields
426
442
  }
@@ -442,9 +458,9 @@ const Zr = we`
442
458
  }
443
459
  }
444
460
  }
445
- ${Vn}
446
- ${Qn}
447
- `, ei = we`
461
+ ${Vt}
462
+ ${Qt}
463
+ `, Gi = J`
448
464
  query PlatformModulesGetModuleItems(
449
465
  $moduleId: ID!
450
466
  $first: Int
@@ -482,27 +498,27 @@ const Zr = we`
482
498
  }
483
499
  }
484
500
  }
485
- ${Vn}
486
- ${Qn}
501
+ ${Qt}
502
+ ${Kt}
487
503
  `;
488
- function Xn() {
504
+ function Zt() {
489
505
  return new DOMException("The operation was aborted.", "AbortError");
490
506
  }
491
- function Ue(e) {
492
- if (e != null && e.aborted) throw Xn();
507
+ function Ee(e) {
508
+ if (e != null && e.aborted) throw Zt();
493
509
  }
494
- function tn(e, t) {
495
- return t ? new Promise((n, o) => {
496
- const i = () => o(Xn());
497
- t.addEventListener("abort", i, { once: !0 }), e.then(n, o).finally(() => t.removeEventListener("abort", i));
510
+ function St(e, t) {
511
+ return t ? new Promise((n, r) => {
512
+ const o = () => r(Zt());
513
+ t.addEventListener("abort", o, { once: !0 }), e.then(n, r).finally(() => t.removeEventListener("abort", o));
498
514
  }) : e;
499
515
  }
500
- const nn = [
516
+ const yt = [
501
517
  "COMPLETED",
502
518
  "INCOMPLETE",
503
519
  "IN_PROGRESS",
504
520
  "NOT_STARTED"
505
- ], on = /* @__PURE__ */ new Map([
521
+ ], Tt = /* @__PURE__ */ new Map([
506
522
  ["locked", ["LOCKED"]],
507
523
  ["missing", ["MISSING"]],
508
524
  ["missing_and_incomplete", ["MISSING_AND_INCOMPLETE"]],
@@ -510,24 +526,24 @@ const nn = [
510
526
  ["complete", ["COMPLETE"]],
511
527
  ["in_progress", ["IN_PROGRESS"]],
512
528
  ["not_started", ["NOT_STARTED"]]
513
- ]), ti = {
529
+ ]), Wi = {
514
530
  module: { completionStatus: ["eq"], moduleStatus: ["eq"], dueWithinDays: ["within"] }
515
531
  };
516
- function ni(e, t) {
532
+ function Hi(e, t) {
517
533
  if (!e) return null;
518
534
  if (e.target === "module" && e.field === "completionStatus" && e.op === "eq") {
519
535
  const n = e.value;
520
- if (!nn.includes(n))
536
+ if (!yt.includes(n))
521
537
  throw new Error(
522
- `"${e.value}" is not a ModuleCompletionStatus (${nn.join(", ")}).`
538
+ `"${e.value}" is not a ModuleCompletionStatus (${yt.join(", ")}).`
523
539
  );
524
540
  return { completionStatus: n };
525
541
  }
526
542
  if (e.target === "module" && e.field === "moduleStatus" && e.op === "eq") {
527
- const n = typeof e.value == "string" ? on.get(e.value) : void 0;
543
+ const n = typeof e.value == "string" ? Tt.get(e.value) : void 0;
528
544
  if (!n)
529
545
  throw new Error(
530
- `"${String(e.value)}" is not a ModuleStatus (${[...on.keys()].join(", ")}).`
546
+ `"${String(e.value)}" is not a ModuleStatus (${[...Tt.keys()].join(", ")}).`
531
547
  );
532
548
  return { moduleStatus: n };
533
549
  }
@@ -540,881 +556,332 @@ function ni(e, t) {
540
556
  `Canvas GraphQL cannot serve ${e.target}.${e.field} "${e.op}". It compiles module.completionStatus eq, module.moduleStatus eq and module.dueWithinDays within.`
541
557
  );
542
558
  }
543
- function rn(e, t, n) {
559
+ function Be(e, t, n) {
544
560
  return e.kind === "before" ? { first: null, after: null, before: e.cursor, last: n } : e.kind === "last" ? { first: null, after: null, before: null, last: e.count } : { first: t, after: e.kind === "after" ? e.cursor : null, before: null, last: null };
545
561
  }
546
- function Xl({
562
+ function Bs({
547
563
  executeQuery: e,
548
- inlineItemLimit: t = xo,
549
- nodeBudget: n = Ro,
550
- onUnsupportedItem: o,
551
- onUnsupportedStatus: i,
552
- studentId: s,
564
+ inlineItemLimit: t = bn,
565
+ nodeBudget: n = Sn,
566
+ onUnsupportedItem: r,
567
+ onUnsupportedStatus: o,
568
+ studentId: i,
553
569
  validate: l = !0,
554
- capabilities: a = ti,
555
- includeEstimatedDuration: c = !1
570
+ capabilities: u = Wi,
571
+ includeEstimatedDuration: a = !1
556
572
  }) {
557
- const u = s != null, d = { onUnsupportedItem: o, onUnsupportedStatus: i };
573
+ const d = i != null, g = { onUnsupportedItem: r, onUnsupportedStatus: o };
558
574
  return {
559
575
  inlineNodeBudget: n,
560
- capabilities: a,
576
+ capabilities: u,
561
577
  async listModules({
562
- courseId: m,
563
- page: p = { kind: "first" },
564
- pageSize: h,
565
- includeItems: _,
566
- filter: A,
567
- dueRange: v,
568
- inlineItemsFirst: z,
569
- inlineFirst: U,
570
- signal: M
578
+ courseId: p,
579
+ page: h = { kind: "first" },
580
+ pageSize: f,
581
+ includeItems: I,
582
+ filter: v,
583
+ dueRange: L,
584
+ inlineItemsFirst: $,
585
+ inlineFirst: O,
586
+ signal: S
571
587
  }) {
572
- Ue(M);
573
- const L = _ ? Math.min(U ?? h, h) : h, J = Math.min(z ?? t, t), X = Math.max(1, Math.min(J, Math.floor(n / L))), C = rn(p, L, h), R = await tn(
574
- e(Jr, {
575
- courseId: m,
576
- ...C,
577
- includeItems: _,
578
- itemsFirst: X,
579
- includeSubmissions: u,
580
- includeEstimatedDuration: c,
581
- studentId: s ?? null,
582
- filter: ni(A, v)
583
- }),
584
- M
585
- );
586
- Ue(M);
587
- const B = Qr(R, d);
588
- return l ? Oo.parse(B) : B;
588
+ Ee(S);
589
+ const C = Hi(v, L);
590
+ let Y;
591
+ if (I) {
592
+ const w = Math.min(O ?? f, f), H = Math.min($ ?? t, t), A = Math.max(1, Math.min(H, Math.floor(n / w)));
593
+ Y = e(
594
+ Bi,
595
+ {
596
+ courseId: p,
597
+ ...Be(h, w, f),
598
+ itemsFirst: A,
599
+ includeSubmissions: d,
600
+ includeEstimatedDuration: a,
601
+ studentId: i ?? null,
602
+ filter: C
603
+ }
604
+ );
605
+ } else
606
+ Y = e(Fi, {
607
+ courseId: p,
608
+ ...Be(h, f, f),
609
+ includeEstimatedDuration: a,
610
+ filter: C
611
+ });
612
+ const j = await St(Y, S);
613
+ Ee(S);
614
+ const T = xi(j, g);
615
+ return l ? Tn.parse(T) : T;
589
616
  },
590
617
  async listModuleItems({
591
- moduleId: m,
592
- page: p = { kind: "first" },
593
- pageSize: h,
594
- signal: _
618
+ moduleId: p,
619
+ page: h = { kind: "first" },
620
+ pageSize: f,
621
+ signal: I
595
622
  }) {
596
- Ue(_);
597
- const A = await tn(
598
- e(ei, {
599
- moduleId: m,
600
- ...rn(p, h, h),
601
- includeSubmissions: u,
602
- includeEstimatedDuration: c,
603
- studentId: s ?? null
623
+ Ee(I);
624
+ const v = await St(
625
+ e(Gi, {
626
+ moduleId: p,
627
+ ...Be(h, f, f),
628
+ includeSubmissions: d,
629
+ includeEstimatedDuration: a,
630
+ studentId: i ?? null
604
631
  }),
605
- _
632
+ I
606
633
  );
607
- Ue(_);
608
- const v = Xr(A, m, d);
609
- return l ? ko.parse(v) : v;
634
+ Ee(I);
635
+ const L = $i(v, p, g);
636
+ return l ? yn.parse(L) : L;
610
637
  },
611
638
  async setModuleCollapsed({
612
- courseId: m,
613
- moduleId: p,
614
- collapsed: h,
615
- signal: _
639
+ courseId: p,
640
+ moduleId: h,
641
+ collapsed: f,
642
+ signal: I
616
643
  }) {
617
- await Vt(
644
+ await ht(
618
645
  {
619
- path: `/courses/${m}/modules/${p}/collapse`,
646
+ path: `/courses/${p}/modules/${h}/collapse`,
620
647
  method: "POST",
621
- body: { collapse: h },
622
- signal: _
648
+ body: { collapse: f },
649
+ signal: I
623
650
  },
624
- b.unknown()
651
+ Mt.unknown()
625
652
  );
626
653
  },
627
654
  async setAllModulesCollapsed({
628
- courseId: m,
629
- collapsed: p,
630
- signal: h
655
+ courseId: p,
656
+ collapsed: h,
657
+ signal: f
631
658
  }) {
632
- await Vt(
659
+ await ht(
633
660
  {
634
- path: `/courses/${m}/collapse_all_modules`,
661
+ path: `/courses/${p}/collapse_all_modules`,
635
662
  method: "POST",
636
- params: { collapse: p ? 1 : 0 },
637
- signal: h
663
+ params: { collapse: h ? 1 : 0 },
664
+ signal: f
638
665
  },
639
- b.unknown()
666
+ Mt.unknown()
640
667
  );
641
668
  }
642
669
  };
643
670
  }
644
- const Zl = 1e3;
645
- function oi({
671
+ const Gs = 1e3;
672
+ function Yi({
646
673
  queryClient: e,
647
674
  courseId: t,
648
675
  module: n,
649
- item: o
676
+ item: r
650
677
  }) {
651
678
  return {
652
679
  module: n,
653
- item: o,
654
- invalidateModuleItems: async (i) => {
680
+ item: r,
681
+ invalidateModuleItems: async (o) => {
655
682
  await Promise.all([
656
- Do(e, t, i),
657
- Yt(e, t)
683
+ Pn(e, t, o),
684
+ ft(e, t)
658
685
  ]);
659
686
  },
660
- invalidateModuleList: () => Yt(e, t)
687
+ invalidateModuleList: () => ft(e, t)
661
688
  };
662
689
  }
663
- function Jl(e, t) {
664
- return je(e).filter(
690
+ function Ws(e, t) {
691
+ return Ze(e).filter(
665
692
  (n) => n.visible == null || n.visible(t) === !0
666
693
  );
667
694
  }
668
- const Pe = b.object({
669
- label: b.string(),
670
- order: b.number(),
671
- hidden: b.boolean().optional()
672
- });
673
- function ge(e) {
674
- return b.record(b.string(), e);
675
- }
676
- const ri = ge(Pe.strict()), Ot = (e) => e == null || typeof e == "string" || typeof e == "number" || typeof e == "bigint" || typeof e == "boolean" || wt(e) || Array.isArray(e) && e.every(Ot), Zn = (e) => {
677
- var t;
678
- return e == null || typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
679
- }, ii = Pe.extend({
680
- icon: b.custom(Ot, { message: "icon must be a ReactNode" }),
681
- renderIcon: b.custom(Zn, {
682
- message: "renderIcon must be a function of the item, not a React component"
683
- })
684
- }).strict(), Jn = (e) => {
685
- var t;
686
- return typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
687
- }, sn = (e) => e == null || Jn(e), ln = Pe.extend({
688
- onSelect: b.custom(Jn, {
689
- message: "onSelect must be a function taking an ActionContext"
690
- }),
691
- visible: b.custom(sn, {
692
- message: "visible must be a function taking an ActionContext, not a React component"
693
- }),
694
- renderModal: b.custom(sn, {
695
- message: "renderModal must be a function taking an ActionContext, not a React component"
696
- })
697
- }).strict();
698
- function Be() {
699
- return b.custom((e) => typeof e == "function", {
700
- message: "Expected a function"
701
- });
702
- }
703
- const si = Pe.extend({
704
- render: b.custom((e) => typeof e == "function", {
705
- message: "render must be a function taking a MetaFieldContext"
706
- }),
707
- icon: b.custom(Ot, { message: "icon must be a ReactNode" }),
708
- renderIcon: b.custom(Zn, {
709
- message: "renderIcon must be a function of the field context, not a React component"
710
- })
711
- }).strict(), li = Pe.extend({
712
- predicate: b.custom((e) => typeof e == "function", {
713
- message: "predicate must be a function of the module and a FilterContext"
714
- }),
715
- query: No.optional(),
716
- unfiltered: b.boolean().optional()
717
- }).strict(), Me = () => b.custom((e) => typeof e == "function", { message: "Expected a function" }).optional(), ai = b.object({
718
- getItemHref: Me(),
719
- getItemEditHref: Me(),
720
- getModuleHref: Me(),
721
- onItemClick: Me()
722
- }).strict(), ci = b.object({
723
- createModule: b.boolean().optional(),
724
- updateModule: b.boolean().optional(),
725
- deleteModule: b.boolean().optional(),
726
- reorderModules: b.boolean().optional(),
727
- setModulesPublished: b.boolean().optional(),
728
- createModuleItem: b.boolean().optional(),
729
- updateModuleItem: b.boolean().optional(),
730
- deleteModuleItem: b.boolean().optional(),
731
- reorderModuleItems: b.boolean().optional()
732
- }).strict(), ui = b.object({
733
- formatters: b.object({
734
- moduleLabel: Be(),
735
- dateTime: Be(),
736
- points: Be(),
737
- progress: Be()
738
- }).strict(),
739
- itemTypes: ge(ii),
740
- itemStatuses: ri,
741
- itemMeta: ge(si),
742
- filters: ge(li),
743
- moduleActions: ge(ln),
744
- itemActions: ge(ln),
745
- navigation: ai,
746
- permissions: ci,
747
- notify: Me()
748
- });
749
- function eo(e, t = {}) {
750
- const n = Object.keys(t).filter((i) => !zo(e, i));
695
+ function Xt(e, t = {}) {
696
+ const n = Object.keys(t).filter((o) => !Cn(e, o));
751
697
  if (n.length > 0)
752
698
  throw new Error(
753
699
  `Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
754
700
  );
755
- const o = {
756
- formatters: gt(e.formatters, t.formatters),
757
- itemTypes: me(e.itemTypes, t.itemTypes),
758
- itemStatuses: me(e.itemStatuses, t.itemStatuses),
759
- itemMeta: me(e.itemMeta, t.itemMeta),
760
- filters: me(e.filters, t.filters),
761
- moduleActions: me(e.moduleActions, t.moduleActions),
762
- itemActions: me(e.itemActions, t.itemActions),
763
- navigation: gt(e.navigation, t.navigation),
764
- permissions: gt(e.permissions, t.permissions),
701
+ const r = {
702
+ formatters: Ue(e.formatters, t.formatters),
703
+ itemTypes: ne(e.itemTypes, t.itemTypes),
704
+ itemStatuses: ne(e.itemStatuses, t.itemStatuses),
705
+ itemMeta: ne(e.itemMeta, t.itemMeta),
706
+ filters: ne(e.filters, t.filters),
707
+ moduleActions: ne(e.moduleActions, t.moduleActions),
708
+ itemActions: ne(e.itemActions, t.itemActions),
709
+ navigation: Ue(e.navigation, t.navigation),
710
+ permissions: Ue(e.permissions, t.permissions),
765
711
  notify: t.notify ?? e.notify
766
712
  };
767
- return ui.parse(o), o;
713
+ return vn.parse(r), r;
768
714
  }
769
- const di = "organizeNewPlacement", mi = {
715
+ const ji = "organizeNewPlacement", Qi = {
770
716
  label: "metaFieldNewPlacementLabel",
771
717
  order: 5,
772
- render: ({ item: e, t }) => Fo(e) ? /* @__PURE__ */ r(kn, { color: "success", children: t("organizeNewItemPill") }) : null
773
- }, gi = (e) => Object.fromEntries(Object.keys(e).map((t) => [t, { hidden: !0 }])), pi = (e) => eo(e, {
774
- itemMeta: { [di]: mi },
775
- filters: gi(e.filters),
718
+ render: ({ item: e, t }) => An(e) ? /* @__PURE__ */ s(Xn, { color: "success", children: t("organizeNewItemPill") }) : null
719
+ }, Ki = (e) => Object.fromEntries(Object.keys(e).map((t) => [t, { hidden: !0 }])), Vi = (e) => Xt(e, {
720
+ itemMeta: { [ji]: Qi },
721
+ filters: Ki(e.filters),
776
722
  formatters: {
777
- moduleLabel: (t, n, { t: o }) => {
778
- if (qo(n)) return o("organizeNewModuleLabel");
779
- const i = $o(n);
780
- return i === 0 ? null : o("organizeItemsAddedLabel", { count: i });
723
+ moduleLabel: (t, n, { t: r }) => {
724
+ if (Ln(n)) return r("organizeNewModuleLabel");
725
+ const o = wn(n);
726
+ return o === 0 ? null : r("organizeItemsAddedLabel", { count: o });
781
727
  }
782
728
  }
783
729
  });
784
- function ea(e = {}) {
785
- return eo(Uo, e);
730
+ function Hs(e = {}) {
731
+ return Xt(Rn, e);
786
732
  }
787
- function ta(e) {
788
- const t = lr();
789
- return V(
790
- (n, o) => oi({ queryClient: t, courseId: e, module: n, item: o }),
733
+ function Ys(e) {
734
+ const t = Jn();
735
+ return U(
736
+ (n, r) => Yi({ queryClient: t, courseId: e, module: n, item: r }),
791
737
  [t, e]
792
738
  );
793
739
  }
794
- function Ae() {
795
- const { formatters: e } = _e(), { t, locale: n, timezone: o } = P();
796
- return F(() => {
797
- const i = { t, locale: n, timezone: o }, s = (l, a) => e.dateTime(l, a, i);
798
- return {
799
- moduleLabel: (l, a) => e.moduleLabel(l, a, i) || null,
800
- dueByline: (l, a) => t("dueByline", { when: s(l, a) }),
801
- pastDueByline: (l, a) => t("pastDueByline", { when: s(l, a) }),
802
- unlockByline: (l, a) => t("unlockByline", { when: s(l, a) }),
803
- unlockedByline: (l, a) => t("unlockedByline", { when: s(l, a) }),
804
- estimatedDurationByline: (l) => Go(t, l),
805
- remainingDurationByline: (l) => Bo(t, l),
806
- points: (l) => e.points(l, i),
807
- progress: (l, a, c) => e.progress(l, a, c, i)
808
- };
809
- }, [e, t, n, o]);
810
- }
811
- const fi = 20, hi = 4.5, an = 7, Ii = 5, _i = 20, to = "#000000", no = "#FFFFFF", oo = {
812
- primary: { semantic: "base", textKey: "baseTextColor", borderKey: "baseBorderColor" },
813
- info: { semantic: "info", textKey: "infoTextColor", borderKey: "infoBorderColor" },
814
- success: { semantic: "success", textKey: "successTextColor", borderKey: "successBorderColor" },
815
- warning: { semantic: "warning", textKey: "warningTextColor", borderKey: "warningBorderColor" }
816
- }, Ei = {
817
- card: {
818
- primary: { fill: "#E8EAEC", stroke: "#8D959F", text: "#273540" },
819
- info: { fill: "#D5E4F2", stroke: "#2B7ABC", text: "#23649A" },
820
- success: { fill: "#CDE7D8", stroke: "#03893D", text: "#02642C" },
821
- warning: { fill: "#F5DBCC", stroke: "#CF4A00", text: "#A13900" }
822
- },
823
- row: {
824
- primary: { fill: "#DEE1E4", stroke: "#8D959F", text: "#273540" },
825
- info: { fill: "#CADCEA", stroke: "#2B7ABC", text: "#1E5685" },
826
- success: { fill: "#C2DFD0", stroke: "#03893D", text: "#02642C" },
827
- warning: { fill: "#EBD2C4", stroke: "#CF4A00", text: "#A13900" }
828
- }
829
- };
830
- function yi(e, t) {
831
- const n = Er(
832
- It(e),
833
- It(yr(t, fi))
834
- );
835
- return Nn(n);
836
- }
837
- function bi(e, t, n) {
838
- const o = le(n, t) >= an ? an : hi;
839
- return Math.min(o, Math.max(le(e, to), le(e, no)));
840
- }
841
- function Si(e, t, n) {
842
- const o = bi(e, t, n);
843
- if (le(e, t) >= o) return t;
844
- const i = le(e, to) > le(e, no) ? br : Sr;
845
- let s = t;
846
- for (let l = 0; l < _i && le(e, s) < o; l++)
847
- s = i(s, Ii);
848
- return Nn(s);
849
- }
850
- function Mi(e) {
851
- return ht(e) && It(e).a === 1;
852
- }
853
- function cn(e, t) {
854
- var n;
855
- return t === "card" ? (n = e == null ? void 0 : e.elevatedSurface) == null ? void 0 : n.base : e == null ? void 0 : e.muted;
856
- }
857
- function un(e, t, n, o) {
858
- var l, a, c, u;
859
- const i = Ei[n][e], s = t;
860
- try {
861
- const d = s == null ? void 0 : s.newTheme, m = (l = d == null ? void 0 : d.semantics) == null ? void 0 : l.call(d, d.primitives);
862
- if (!m) return i;
863
- const { semantic: p } = oo[e], h = cn((u = (c = (a = s == null ? void 0 : s.themeOverride) == null ? void 0 : a.semantics) == null ? void 0 : c.color) == null ? void 0 : u.background, n) ?? cn(m.color.background, n) ?? "", _ = o.stroke ?? m.color.stroke[p], A = o.label ?? m.color.text[p];
864
- if (!Mi(h) || !ht(_) || !ht(A)) return i;
865
- const v = yi(h, _);
866
- return { fill: v, stroke: _, text: Si(v, A, h) };
867
- } catch {
868
- return i;
869
- }
870
- }
871
- const dn = /* @__PURE__ */ new WeakMap();
872
- function ro(e, t, n, o = {}) {
873
- if (typeof t != "object" || t === null)
874
- return un(e, t, n, o);
875
- let i = dn.get(t);
876
- i === void 0 && (i = /* @__PURE__ */ new Map(), dn.set(t, i));
877
- const s = `${n}:${e}:${o.stroke ?? ""}:${o.label ?? ""}`, l = i.get(s);
878
- if (l !== void 0) return l;
879
- const a = un(e, t, n, o);
880
- return i.set(s, a), a;
881
- }
882
- function Ge(e, t) {
883
- const { textKey: n, borderKey: o } = oo[e];
884
- return (i, s) => {
885
- const l = i, { fill: a, stroke: c, text: u } = ro(e, s, t, {
886
- stroke: l == null ? void 0 : l[o],
887
- label: l == null ? void 0 : l[n]
888
- });
889
- return { backgroundColor: a, [n]: u, [o]: c };
890
- };
891
- }
892
- function mn(e) {
893
- return {
894
- primary: Ge("primary", e),
895
- info: Ge("info", e),
896
- success: Ge("success", e),
897
- warning: Ge("warning", e)
898
- };
899
- }
900
- const Ti = {
901
- card: mn("card"),
902
- row: mn("row")
903
- }, Ci = "#9242B4", vi = "#9E58BD";
904
- function gn(e) {
905
- return (t, n) => {
906
- var l, a, c, u;
907
- const { fill: o, stroke: i, text: s } = ro("primary", n, e, {
908
- stroke: ((a = (l = n.colors) == null ? void 0 : l.contrasts) == null ? void 0 : a.violet4570) ?? vi,
909
- label: ((u = (c = n.colors) == null ? void 0 : c.contrasts) == null ? void 0 : u.violet5790) ?? Ci
910
- });
911
- return { backgroundColor: o, baseTextColor: s, baseBorderColor: i };
912
- };
913
- }
914
- const xt = {
915
- tone: "primary",
916
- icon: /* @__PURE__ */ r(ur, { size: "sm" }),
917
- themes: {
918
- card: gn("card"),
919
- row: gn("row")
920
- }
921
- }, Te = {
922
- not_started: { tone: "primary", icon: /* @__PURE__ */ r(Rt, { size: "sm" }) },
923
- in_progress: { tone: "info", icon: /* @__PURE__ */ r(Lt, { size: "sm" }) },
924
- complete: { tone: "success", icon: /* @__PURE__ */ r(At, { size: "sm" }) },
925
- missing: { tone: "warning", icon: /* @__PURE__ */ r(fe, { size: "sm" }) },
926
- incomplete: { tone: "warning", icon: /* @__PURE__ */ r(fe, { size: "sm" }) },
927
- missing_and_incomplete: { tone: "warning", icon: /* @__PURE__ */ r(fe, { size: "sm" }) },
928
- locked: { tone: "primary", icon: /* @__PURE__ */ r(Pt, { size: "sm" }) }
929
- }, wi = {
930
- not_started: { tone: "primary", icon: /* @__PURE__ */ r(Rt, { size: "sm" }) },
931
- in_progress: { tone: "info", icon: /* @__PURE__ */ r(Lt, { size: "sm" }) },
932
- complete: { tone: "success", icon: /* @__PURE__ */ r(At, { size: "sm" }) },
933
- incomplete: { tone: "warning", icon: /* @__PURE__ */ r(fe, { size: "sm" }) },
934
- missing: { tone: "warning", icon: /* @__PURE__ */ r(fe, { size: "sm" }) },
935
- locked: { tone: "primary", icon: /* @__PURE__ */ r(Pt, { size: "sm" }) }
936
- };
937
- function io(e, t, n, o) {
938
- switch (t) {
939
- case "not_started":
940
- return e("moduleStatusNotStarted");
941
- case "in_progress":
942
- return e("moduleStatusInProgress");
943
- case "complete":
944
- return e("moduleStatusComplete");
945
- case "missing":
946
- return e("moduleStatusMissing", { count: n });
947
- case "incomplete":
948
- return e("moduleStatusIncomplete", { count: o });
949
- case "missing_and_incomplete":
950
- return e("moduleStatusMissingAndIncomplete", {
951
- missing: e("moduleStatusMissing", { count: n }),
952
- incomplete: e("moduleStatusIncomplete", { count: o })
953
- });
954
- case "locked":
955
- return e("moduleStatusLocked");
956
- }
957
- }
958
- function Pi(e, t) {
959
- switch (t) {
960
- case "not_started":
961
- return e("itemStatusNotStarted");
962
- case "in_progress":
963
- return e("itemStatusInProgress");
964
- case "complete":
965
- return e("itemStatusComplete");
966
- case "incomplete":
967
- return e("itemStatusIncomplete");
968
- case "missing":
969
- return e("itemStatusMissing");
970
- case "locked":
971
- return e("itemStatusLocked");
972
- }
973
- }
974
- function Qe(e, t, n, o) {
975
- var i;
976
- return /* @__PURE__ */ r(
977
- kn,
978
- {
979
- color: e.tone,
980
- renderIcon: e.icon,
981
- themeOverride: ((i = e.themes) == null ? void 0 : i[o]) ?? Ti[o][e.tone],
982
- "data-testid": n,
983
- children: t
984
- }
985
- );
986
- }
987
- function Ai({
988
- status: e,
989
- missingCount: t,
990
- incompleteCount: n
991
- }) {
992
- const { t: o } = P();
993
- return Qe(
994
- Te[e],
995
- io(o, e, t, n),
996
- "module-status-pill",
997
- "card"
998
- );
999
- }
1000
- function Li({ status: e }) {
1001
- const { t } = P();
1002
- return Qe(
1003
- wi[e],
1004
- Pi(t, e),
1005
- "item-status-pill",
1006
- "row"
1007
- );
1008
- }
1009
- function Ri() {
1010
- const { t: e } = P();
1011
- return Qe(xt, e("moduleStatusDueSoon"), "module-due-soon-pill", "card");
1012
- }
1013
- function ki() {
1014
- const { t: e } = P();
1015
- return Qe(xt, e("itemStatusDueSoon"), "item-due-soon-pill", "row");
1016
- }
1017
- function so() {
1018
- const e = xn();
1019
- return "key" in e && e.key === "canvas-high-contrast" ? "inline" : "standalone";
1020
- }
1021
- const lo = 2.75, Oi = `${lo}rem`, pn = "0.065em", he = "0.8em", xi = "0.28em", fn = "1px", Di = "0.57em", ao = {
1022
- display: "inline-block",
1023
- paddingLeft: he,
1024
- marginLeft: `-${he}`,
1025
- backgroundImage: `radial-gradient(circle, currentColor ${pn}, transparent ${pn})`,
1026
- backgroundRepeat: "no-repeat",
1027
- backgroundSize: `${he} 100%`,
1028
- backgroundPosition: "left center"
1029
- }, Ni = {
1030
- ...ao,
1031
- backgroundImage: "none",
1032
- borderLeft: `${fn} solid`,
1033
- paddingLeft: `calc(${he} / 2 - ${fn})`,
1034
- marginLeft: `calc(-${he} / 2)`
1035
- };
1036
- function hn() {
1037
- return typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia("(forced-colors: active)");
1038
- }
1039
- function Dt() {
1040
- const [e, t] = j(() => {
1041
- var n;
1042
- return ((n = hn()) == null ? void 0 : n.matches) ?? !1;
1043
- });
1044
- return W(() => {
1045
- const n = hn();
1046
- if (n === null) return;
1047
- t(n.matches);
1048
- const o = (i) => t(i.matches);
1049
- return n.addEventListener("change", o), () => n.removeEventListener("change", o);
1050
- }, []), e ? Ni : ao;
1051
- }
1052
- const Nt = {
1053
- overflowX: "clip",
1054
- overflowWrap: "anywhere",
1055
- lineHeight: 0
1056
- }, zi = "#6A7883", Xe = 0.5, He = { display: "block" }, qi = { ...He, marginTop: `${Xe}rem` }, $i = {
1057
- ...He,
1058
- marginTop: `-${Xe}rem`
1059
- }, In = { marginTop: `${Xe}rem` }, _n = { display: "inline-block" }, Fi = {
1060
- display: "-webkit-box",
1061
- WebkitLineClamp: 2,
1062
- WebkitBoxOrient: "vertical",
1063
- overflow: "hidden"
1064
- }, zt = {
1065
- marginRight: `calc(${he} - ${xi})`
1066
- }, co = {
1067
- display: "inline-flex",
1068
- alignItems: "center",
1069
- height: "1lh",
1070
- verticalAlign: "top",
1071
- marginInlineEnd: Di
1072
- };
1073
- function pe(e) {
1074
- return e == null || typeof e == "boolean" || e === "" ? !0 : Array.isArray(e) ? e.every(pe) : wt(e) && e.type === Rn ? pe(e.props.children) : !1;
1075
- }
1076
- const uo = 1.5, mo = 0.25, go = 0.5, po = 1.125, fo = 1.3125, Ui = 1 + uo + mo + po + 1, Bi = 0.75 + 1.25 + go + fo + 0.75, Gi = 2;
1077
- function En(e, t, n, o) {
1078
- const i = Math.max(n - 1, 0) * (t + Xe);
1079
- return { contentVisibility: "auto", containIntrinsicSize: `auto ${e + i + (o ? Gi : 0)}rem` };
1080
- }
1081
- const Wi = "0.5rem", Et = { fontWeightBold: 700 };
1082
- function Hi(e, t) {
1083
- var o, i;
1084
- const n = xn();
1085
- return ("colors" in n ? (i = (o = n.colors) == null ? void 0 : o.contrasts) == null ? void 0 : i[e] : void 0) ?? t;
1086
- }
1087
- function Ki({
1088
- item: e,
1089
- today: t,
1090
- attachedAbove: n,
1091
- attachedBelow: o,
1092
- stackPill: i = !1,
1093
- moduleLabel: s,
1094
- itemNumber: l
1095
- }) {
1096
- var re;
1097
- const { t: a, locale: c, timezone: u } = P(), d = Ve(), m = so(), p = Hi("grey4570", zi), h = Dt(), _ = k(null), A = Ae(), v = _e(), { navigation: z } = v, U = F(() => je(v.itemMeta), [v.itemMeta]), M = e.title || a("itemUntitled");
1098
- if (e.type === "sub_header")
1099
- return /* @__PURE__ */ r(
1100
- E,
1101
- {
1102
- as: "div",
1103
- padding: i ? "x-small small" : "x-small mediumSmall",
1104
- margin: "x-small 0 0 0",
1105
- "data-testid": `module-item-${e.id}`,
1106
- children: /* @__PURE__ */ r(
1107
- S,
1108
- {
1109
- size: "small",
1110
- weight: "bold",
1111
- transform: "uppercase",
1112
- themeOverride: Et,
1113
- "data-testid": "module-item-title",
1114
- "data-sub-header": "true",
1115
- children: M
1116
- }
1117
- )
1118
- }
1119
- );
1120
- const L = Wo(s, l, c), J = L ? a("itemNameWithLabel", { label: L, name: M }) : M, X = ((re = z.getItemHref) == null ? void 0 : re.call(z, e)) ?? e.url ?? null, C = e.status === "locked", R = C ? null : X, B = e.status !== void 0 && e.status !== "complete" && !C && An(e.dueAt, t, u), D = z.onItemClick, ne = (y) => {
1121
- d(`item-click-${e.type}`), D == null || D(e, y);
1122
- }, G = (y) => {
1123
- var q;
1124
- const Y = _.current;
1125
- !Y || Y.contains(y.target) || (q = window.getSelection()) != null && q.toString().trim() || Y.dispatchEvent(
1126
- new window.MouseEvent("click", {
1127
- bubbles: !0,
1128
- cancelable: !0,
1129
- ctrlKey: y.ctrlKey,
1130
- metaKey: y.metaKey,
1131
- shiftKey: y.shiftKey,
1132
- altKey: y.altKey
1133
- })
1134
- );
1135
- }, Z = { item: e, t: a, today: t, locale: c, timezone: u, formatters: A, config: v }, N = U.map((y) => ({
1136
- key: y.key,
1137
- node: y.render(Z),
1138
- icon: y.renderIcon ? y.renderIcon(Z) : y.icon
1139
- })).filter((y) => !pe(y.node)), $ = [];
1140
- let ee;
1141
- const O = i ? N.find((y) => y.key === "dueAt" && !pe(y.icon)) : void 0, ce = O && N.find((y) => y.key === "estimatedDuration");
1142
- for (const y of N)
1143
- if (y !== ce)
1144
- if (!pe(y.icon) && (i || !ee)) {
1145
- const Y = y === O && ce ? [y, ce] : [y];
1146
- $.push(Y), ee ?? (ee = Y);
1147
- } else ee ? ee.push(y) : $.length === 0 ? $.push([y]) : $[0].push(y);
1148
- const Le = i ? { ..._n, ...In } : _n, Re = i ? { ...h, ...In } : h, oe = B || e.status ? /* @__PURE__ */ g(I, { alignItems: "center", gap: "x-small", wrap: i ? "wrap" : "no-wrap", children: [
1149
- B ? /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ r(ki, {}) }) : null,
1150
- e.status ? /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ r(Li, { status: e.status }) }) : null
1151
- ] }) : null, ke = i ? /* @__PURE__ */ r("span", { style: Fi, "data-title-clamp": "", children: J }) : J, Oe = {
1152
- weight: "bold",
1153
- size: i ? "medium" : "small",
1154
- lineHeight: "condensed",
1155
- themeOverride: Et,
1156
- "data-testid": "module-item-title"
1157
- }, Je = R ? /* @__PURE__ */ g(
1158
- Dn,
1159
- {
1160
- href: R,
1161
- elementRef: (y) => {
1162
- _.current = y;
1163
- },
1164
- onClick: ne,
1165
- forceButtonRole: !1,
1166
- variant: m,
1167
- display: i ? "block" : void 0,
1168
- target: e.newTab ? "_blank" : void 0,
1169
- rel: e.newTab ? "noopener noreferrer" : void 0,
1170
- children: [
1171
- /* @__PURE__ */ r(S, { ...Oe, color: "primary", children: ke }),
1172
- e.newTab ? /* @__PURE__ */ r(Ye, { children: ` ${a("opensInNewWindow")}` }) : null
1173
- ]
1174
- }
1175
- ) : /* @__PURE__ */ r(
1176
- S,
1177
- {
1178
- ...Oe,
1179
- color: C ? "secondary" : "primary",
1180
- "data-locked": C ? "true" : void 0,
1181
- children: ke
1182
- }
1183
- ), xe = n ? "none" : "large", ue = o ? "none" : "large";
1184
- return /* @__PURE__ */ r(
1185
- "div",
1186
- {
1187
- style: {
1188
- ...i ? En(Bi, fo, $.length, oe !== null) : En(Ui, po, $.length, !1),
1189
- marginTop: n ? void 0 : Wi
1190
- },
1191
- children: /* @__PURE__ */ r(
1192
- E,
1193
- {
1194
- as: "div",
1195
- background: "secondary",
1196
- borderRadius: `${xe} ${xe} ${ue} ${ue}`,
1197
- padding: i ? "small" : "mediumSmall",
1198
- cursor: R ? "pointer" : void 0,
1199
- onClick: R ? G : void 0,
1200
- "data-testid": `module-item-${e.id}`,
1201
- children: /* @__PURE__ */ r("div", { style: { paddingInlineStart: `${Math.max(e.indent - 1, 0) * lo}rem` }, children: /* @__PURE__ */ g(I, { alignItems: "start", gap: "mediumSmall", children: [
1202
- /* @__PURE__ */ r(I.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ g(I, { alignItems: "center", children: [
1203
- e.indent > 0 ? /* @__PURE__ */ r(
1204
- I.Item,
1205
- {
1206
- size: Oi,
1207
- textAlign: "center",
1208
- "data-testid": "item-nest-arrow",
1209
- children: /* @__PURE__ */ r("span", { style: { color: p }, children: /* @__PURE__ */ r(dr, { size: "md", color: "inherit" }) })
1210
- }
1211
- ) : null,
1212
- /* @__PURE__ */ g(I.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1213
- /* @__PURE__ */ r(
1214
- "div",
1215
- {
1216
- style: {
1217
- lineHeight: i ? 0 : `${uo}rem`,
1218
- marginBottom: N.length === 0 ? 0 : `${i ? go : mo}rem`
1219
- },
1220
- children: Je
1221
- }
1222
- ),
1223
- /* @__PURE__ */ r("div", { style: Nt, children: /* @__PURE__ */ r(
1224
- S,
1225
- {
1226
- size: i ? "small" : "x-small",
1227
- lineHeight: "default",
1228
- color: "secondary",
1229
- "data-testid": "module-item-meta",
1230
- children: $.map((y, Y) => /* @__PURE__ */ r(
1231
- "span",
1232
- {
1233
- style: i ? Y > 0 ? He : $i : $.length > 1 ? Y > 0 ? qi : He : void 0,
1234
- "data-testid": "meta-line",
1235
- children: y.map((q, T) => /* @__PURE__ */ g(Rn, { children: [
1236
- T > 0 ? /* @__PURE__ */ r("span", { style: zt, children: " " }) : null,
1237
- /* @__PURE__ */ g(
1238
- "span",
1239
- {
1240
- style: T > 0 ? Re : Le,
1241
- "data-testid": "meta-fact",
1242
- "data-fact-key": q.key,
1243
- children: [
1244
- pe(q.icon) ? null : /* @__PURE__ */ r(
1245
- "span",
1246
- {
1247
- style: co,
1248
- "aria-hidden": "true",
1249
- "data-testid": `meta-icon-${q.key}`,
1250
- children: i && wt(q.icon) && q.icon.props.size === "xs" ? ir(q.icon, { size: "sm" }) : q.icon
1251
- }
1252
- ),
1253
- q.node
1254
- ]
1255
- }
1256
- )
1257
- ] }, q.key))
1258
- },
1259
- y[0].key
1260
- ))
1261
- }
1262
- ) }),
1263
- i && oe ? /* @__PURE__ */ r(E, { as: "div", margin: "x-small 0 0 0", children: oe }) : null
1264
- ] })
1265
- ] }) }),
1266
- !i && oe ? /* @__PURE__ */ r(I.Item, { children: oe }) : null
1267
- ] }) })
1268
- }
1269
- )
1270
- }
1271
- );
1272
- }
1273
- const ji = Ln(Ki), Yi = {
1274
- not_started: Te.not_started,
1275
- in_progress: Te.in_progress,
1276
- complete: Te.complete,
1277
- missing: Te.missing,
1278
- due_this_week: xt
1279
- }, Vi = {
740
+ const Zi = {
741
+ not_started: _e.not_started,
742
+ in_progress: _e.in_progress,
743
+ complete: _e.complete,
744
+ missing: _e.missing,
745
+ due_this_week: kn
746
+ }, Xi = {
1280
747
  primary: "secondary",
1281
748
  info: "brand",
1282
749
  success: "success",
1283
750
  warning: "warning"
1284
751
  };
1285
- function Qi({
752
+ function Ji({
1286
753
  value: e,
1287
754
  onChange: t,
1288
755
  interaction: n = "enabled"
1289
756
  }) {
1290
- const { t: o } = P(), i = _e(), s = F(() => je(i.filters), [i.filters]), l = sr();
1291
- return s.length === 0 ? null : /* @__PURE__ */ r(
1292
- Qt,
757
+ const { t: r } = x(), o = Te(), i = F(() => Ze(o.filters), [o.filters]), l = ni();
758
+ return i.length === 0 ? null : /* @__PURE__ */ s(
759
+ _t,
1293
760
  {
1294
- renderLabel: /* @__PURE__ */ r(Ye, { children: o("filterGroupLabel") }),
1295
- renderBeforeInput: /* @__PURE__ */ r(S, { weight: "bold", themeOverride: Et, "aria-hidden": "true", children: o("filterGroupLabel") }),
761
+ renderLabel: /* @__PURE__ */ s(zt, { children: r("filterGroupLabel") }),
762
+ renderBeforeInput: /* @__PURE__ */ s(b, { weight: "bold", "aria-hidden": "true", children: r("filterGroupLabel") }),
1296
763
  value: e,
1297
- onChange: (a, c) => {
1298
- c.value !== void 0 && t(String(c.value));
764
+ onChange: (u, a) => {
765
+ a.value !== void 0 && t(String(a.value));
1299
766
  },
1300
767
  interaction: n,
1301
768
  "data-testid": "filter-select",
1302
- children: s.map((a) => {
1303
- const c = Yi[a.key];
1304
- return /* @__PURE__ */ r(
1305
- Qt.Option,
769
+ children: i.map((u) => {
770
+ const a = Zi[u.key];
771
+ return /* @__PURE__ */ s(
772
+ _t.Option,
1306
773
  {
1307
- id: `${l}-${a.key}`,
1308
- value: a.key,
1309
- renderBeforeLabel: c ? /* @__PURE__ */ r(S, { color: Vi[c.tone], children: c.icon }) : void 0,
1310
- "data-testid": `filter-option-${a.key}`,
1311
- children: o(a.label)
774
+ id: `${l}-${u.key}`,
775
+ value: u.key,
776
+ renderBeforeLabel: a ? /* @__PURE__ */ s(b, { color: Xi[a.tone], children: a.icon }) : void 0,
777
+ "data-testid": `filter-option-${u.key}`,
778
+ children: r(u.label)
1312
779
  },
1313
- a.key
780
+ u.key
1314
781
  );
1315
782
  })
1316
783
  }
1317
784
  );
1318
785
  }
1319
- const yn = "\0", Xi = { textDecoration: "underline dotted", cursor: "help" }, ho = { ...co, marginInlineEnd: "0.375rem" };
1320
- function Zi({ names: e }) {
1321
- const { t } = P();
1322
- if (e.length === 1) return /* @__PURE__ */ r(Q, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
786
+ const bt = "\0", er = { textDecoration: "underline dotted", cursor: "help" }, Jt = { ...On, marginInlineEnd: "0.375rem" };
787
+ function tr({ names: e }) {
788
+ const { t } = x();
789
+ if (e.length === 1) return /* @__PURE__ */ s(W, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
1323
790
  const n = t("lockedByPrerequisitesByline", {
1324
791
  count: e.length,
1325
- prerequisites: yn
1326
- }), [o, ...i] = n.split(yn), s = i.length > 0 ? i.join("") : null;
1327
- return /* @__PURE__ */ g(Q, { children: [
1328
- s === null ? null : o,
1329
- /* @__PURE__ */ r(qn, { renderTip: e.join(", "), children: /* @__PURE__ */ r(
792
+ prerequisites: bt
793
+ }), [r, ...o] = n.split(bt), i = o.length > 0 ? o.join("") : null;
794
+ return /* @__PURE__ */ m(W, { children: [
795
+ i === null ? null : r,
796
+ /* @__PURE__ */ s(pi, { renderTip: e.join(", "), children: /* @__PURE__ */ s(
1330
797
  "span",
1331
798
  {
1332
799
  tabIndex: 0,
1333
- style: Xi,
800
+ style: er,
1334
801
  onClick: (l) => l.stopPropagation(),
1335
802
  "data-testid": "module-byline-prerequisites",
1336
- children: s === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
803
+ children: i === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
1337
804
  }
1338
805
  ) }),
1339
- s
806
+ i
1340
807
  ] });
1341
808
  }
1342
- function Ji({ module: e, today: t }) {
1343
- var m;
1344
- const n = Ae(), o = Dt(), i = ((m = e.progress) == null ? void 0 : m.status) === "locked", s = e.unlockAt ?? null, l = e.prerequisiteModules.map((p) => p.name.trim()).filter((p) => p !== ""), a = s !== null && new Date(s) > t;
1345
- let c = null;
1346
- s !== null && a && (i || !e.progress) ? c = n.unlockByline(s, t) : s !== null && !a && !e.progress && (c = n.unlockedByline(s, t));
1347
- const u = i && l.length > 0;
1348
- let d = null;
1349
- if (c === null && !u && !i) {
1350
- const p = e.estimatedDurationMinutes ?? Ko(e.items);
1351
- d = p === null ? null : n.estimatedDurationByline(p);
809
+ function nr({ module: e, today: t }) {
810
+ var p;
811
+ const n = Je(), r = Ot(), o = ((p = e.progress) == null ? void 0 : p.status) === "locked", i = e.unlockAt ?? null, l = e.prerequisiteModules.map((h) => h.name.trim()).filter((h) => h !== ""), u = i !== null && new Date(i) > t;
812
+ let a = null;
813
+ i !== null && u && (o || !e.progress) ? a = n.unlockByline(i, t) : i !== null && !u && !e.progress && (a = n.unlockedByline(i, t));
814
+ const d = o && l.length > 0;
815
+ let g = null;
816
+ if (a === null && !d && !o) {
817
+ const h = e.estimatedDurationMinutes ?? xn(e.items);
818
+ g = h === null ? null : n.estimatedDurationByline(h);
1352
819
  }
1353
- return c === null && !u && d === null ? null : /* @__PURE__ */ r(E, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ r("div", { style: Nt, children: /* @__PURE__ */ r(S, { variant: "contentSmall", color: "secondary", "data-testid": "module-byline", children: d !== null ? /* @__PURE__ */ g(Q, { children: [
1354
- /* @__PURE__ */ r("span", { style: ho, children: /* @__PURE__ */ r(On, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
1355
- d
1356
- ] }) : /* @__PURE__ */ g(Q, { children: [
1357
- c,
1358
- c !== null && u ? /* @__PURE__ */ r("span", { style: zt, children: " " }) : null,
1359
- u ? /* @__PURE__ */ r("span", { style: c !== null ? o : void 0, children: /* @__PURE__ */ r(Zi, { names: l }) }) : null
820
+ return a === null && !d && g === null ? null : /* @__PURE__ */ s(M, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s("div", { style: Dt, children: /* @__PURE__ */ s(b, { variant: "contentSmall", color: "secondary", "data-testid": "module-byline", children: g !== null ? /* @__PURE__ */ m(W, { children: [
821
+ /* @__PURE__ */ s("span", { style: Jt, children: /* @__PURE__ */ s(Nt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
822
+ g
823
+ ] }) : /* @__PURE__ */ m(W, { children: [
824
+ a,
825
+ a !== null && d ? /* @__PURE__ */ s("span", { style: qt, children: " " }) : null,
826
+ d ? /* @__PURE__ */ s("span", { style: a !== null ? r : void 0, children: /* @__PURE__ */ s(tr, { names: l }) }) : null
1360
827
  ] }) }) }) });
1361
828
  }
1362
- const es = "#273540", ts = "#D7DADE", ns = "0.25rem", os = (e, t) => {
1363
- var n, o, i, s, l;
829
+ const ir = "#273540", rr = "#D7DADE", sr = "0.25rem", or = (e, t) => {
830
+ var n, r, o, i, l;
1364
831
  return {
1365
- meterColorBrand: ((o = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : o.grey125125) ?? es,
1366
- borderRadius: String(((i = t.borders) == null ? void 0 : i.radiusMedium) ?? ns),
1367
- borderColor: ((l = (s = t.colors) == null ? void 0 : s.contrasts) == null ? void 0 : l.grey1424) ?? ts,
832
+ meterColorBrand: ((r = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : r.grey125125) ?? ir,
833
+ borderRadius: String(((o = t.borders) == null ? void 0 : o.radiusMedium) ?? sr),
834
+ borderColor: ((l = (i = t.colors) == null ? void 0 : i.contrasts) == null ? void 0 : l.grey1424) ?? rr,
1368
835
  trackBottomBorderColor: "transparent"
1369
836
  };
1370
- }, rs = "66.667%", is = "80px", ss = 2, ls = { components: { TruncateText: { fontFamily: "inherit" } } };
1371
- function as({
837
+ }, lr = "66.667%", ar = "80px", ur = 2, dr = { components: { TruncateText: { fontFamily: "inherit" } } };
838
+ function cr({
1372
839
  module: e,
1373
840
  breakpoints: t
1374
841
  }) {
1375
- const { t: n } = P(), o = Ae(), i = Dt(), s = e.progress;
1376
- if (!s || s.status === "locked" || s.requirementCount <= 0) return null;
1377
- const l = Object.keys(t).length === 0 || t.desktop === !0, a = jo(e.items);
1378
- return /* @__PURE__ */ g(
1379
- I,
842
+ const { t: n } = x(), r = Je(), o = Ot(), i = e.progress;
843
+ if (!i || i.status === "locked" || i.requirementCount <= 0) return null;
844
+ const l = Object.keys(t).length === 0 || t.desktop === !0, u = Un(e.items);
845
+ return /* @__PURE__ */ m(
846
+ _,
1380
847
  {
1381
- width: l ? rs : "100%",
848
+ width: l ? lr : "100%",
1382
849
  alignItems: "center",
1383
850
  gap: "x-small",
1384
851
  margin: "x-small 0 0 0",
1385
852
  "data-testid": "module-progress",
1386
853
  children: [
1387
- /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ r(E, { as: "div", width: is, "data-testid": "module-progress-bar", children: /* @__PURE__ */ r(
1388
- Cr,
854
+ /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ s(M, { as: "div", width: ar, "data-testid": "module-progress-bar", children: /* @__PURE__ */ s(
855
+ gi,
1389
856
  {
1390
857
  size: "x-small",
1391
858
  meterColor: "brand",
1392
- valueNow: s.requirementsMet,
1393
- valueMax: s.requirementCount,
859
+ valueNow: i.requirementsMet,
860
+ valueMax: i.requirementCount,
1394
861
  shouldAnimate: !1,
1395
862
  screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
1396
863
  formatScreenReaderValue: () => {
1397
- const c = Yo(
864
+ const a = Fn(
1398
865
  n,
1399
- s.requirementsMet,
1400
- s.requirementCount
866
+ i.requirementsMet,
867
+ i.requirementCount
1401
868
  );
1402
- return a === null ? c : `${c}, ${o.remainingDurationByline(a)}`;
869
+ return u === null ? a : `${a}, ${r.remainingDurationByline(u)}`;
1403
870
  },
1404
- themeOverride: os
871
+ themeOverride: or
1405
872
  }
1406
873
  ) }) }),
1407
- /* @__PURE__ */ r(I.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ r("div", { style: Nt, children: /* @__PURE__ */ g(S, { variant: "contentSmall", color: "secondary", children: [
1408
- o.progress(
1409
- s.percentComplete,
1410
- s.requirementsMet,
1411
- s.requirementCount
874
+ /* @__PURE__ */ s(_.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { style: Dt, children: /* @__PURE__ */ m(b, { variant: "contentSmall", color: "secondary", children: [
875
+ r.progress(
876
+ i.percentComplete,
877
+ i.requirementsMet,
878
+ i.requirementCount
1412
879
  ),
1413
- a !== null ? /* @__PURE__ */ g(Q, { children: [
1414
- /* @__PURE__ */ r("span", { style: zt, children: " " }),
1415
- /* @__PURE__ */ g("span", { style: i, children: [
1416
- /* @__PURE__ */ r("span", { style: ho, children: /* @__PURE__ */ r(On, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
1417
- o.remainingDurationByline(a)
880
+ u !== null ? /* @__PURE__ */ m(W, { children: [
881
+ /* @__PURE__ */ s("span", { style: qt, children: " " }),
882
+ /* @__PURE__ */ m("span", { style: o, children: [
883
+ /* @__PURE__ */ s("span", { style: Jt, children: /* @__PURE__ */ s(Nt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
884
+ r.remainingDurationByline(u)
1418
885
  ] })
1419
886
  ] }) : null
1420
887
  ] }) }) })
@@ -1422,32 +889,35 @@ function as({
1422
889
  }
1423
890
  );
1424
891
  }
1425
- const bn = (e) => `platform-modules-panel-${e}`;
1426
- function yt(e) {
892
+ const Pt = (e) => `platform-modules-panel-${e}`;
893
+ function He(e) {
1427
894
  return e !== void 0 && e.type !== "sub_header";
1428
895
  }
1429
- function Sn(e) {
1430
- return yt(e) && e.indent > 0;
896
+ function Ct(e) {
897
+ return He(e) && e.indent > 0;
1431
898
  }
1432
- function cs(e, t) {
899
+ function mr(e, t) {
1433
900
  let n = t;
1434
- return e.map((o) => o.type === "sub_header" ? void 0 : ++n);
901
+ return e.map((r) => {
902
+ if (r.type !== "sub_header")
903
+ return n = r.itemNumber ?? n + 1, n;
904
+ });
1435
905
  }
1436
- function us({
906
+ function gr({
1437
907
  module: e,
1438
908
  state: t,
1439
909
  today: n,
1440
- showDiagnostics: o,
1441
- stackPill: i,
1442
- moduleLabel: s
910
+ showDiagnostics: r,
911
+ stackPill: o,
912
+ moduleLabel: i
1443
913
  }) {
1444
- const { t: l } = P(), a = Ve(), c = k(null), u = cs(t.items, t.itemOffset), d = t.items.length, m = !t.isLoading && !t.isRefreshing;
1445
- W(() => {
1446
- if (!m || d === 0 || c.current === t.page) return;
1447
- const h = c.current === null;
1448
- c.current = t.page, K(
1449
- h ? l("itemsLoadedAnnouncement", {
1450
- loaded: d,
914
+ const { t: l } = x(), u = Xe(), a = k(null), d = mr(t.items, t.itemOffset), g = t.items.length, p = !t.isLoading && !t.isRefreshing;
915
+ B(() => {
916
+ if (!p || g === 0 || a.current === t.page) return;
917
+ const f = a.current === null;
918
+ a.current = t.page, N(
919
+ f ? l("itemsLoadedAnnouncement", {
920
+ loaded: g,
1451
921
  count: e.itemCount,
1452
922
  name: e.name
1453
923
  }) : l("itemsPageChangedAnnouncement", {
@@ -1456,26 +926,26 @@ function us({
1456
926
  name: e.name
1457
927
  })
1458
928
  );
1459
- }, [m, d, t.page, t.pageCount, e.itemCount, e.name, l]);
1460
- const p = (h) => {
1461
- a("paginate-items"), h === 1 ? t.goToFirstPage() : h === t.page - 1 ? t.goToPreviousPage() : h === t.page + 1 ? t.goToNextPage() : h === t.pageCount && t.goToLastPage();
929
+ }, [p, g, t.page, t.pageCount, e.itemCount, e.name, l]);
930
+ const h = (f) => {
931
+ u("paginate-items"), f === 1 ? t.goToFirstPage() : f === t.page - 1 ? t.goToPreviousPage() : f === t.page + 1 ? t.goToNextPage() : f === t.pageCount && t.goToLastPage();
1462
932
  };
1463
- return t.error ? /* @__PURE__ */ r(E, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ r(
1464
- ae,
933
+ return t.error ? /* @__PURE__ */ s(M, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(
934
+ X,
1465
935
  {
1466
936
  variant: "error",
1467
937
  margin: "0",
1468
- liveRegion: We,
938
+ liveRegion: Se,
1469
939
  liveRegionPoliteness: "assertive",
1470
940
  "data-testid": "items-error",
1471
941
  children: l("itemsLoadErrorAlert", { message: t.error.message })
1472
942
  }
1473
- ) }) : t.isLoading ? /* @__PURE__ */ g(E, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
1474
- /* @__PURE__ */ r(kt, { size: "x-small", renderTitle: l("itemsLoadingSpinnerLabel") }),
943
+ ) }) : t.isLoading ? /* @__PURE__ */ m(M, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
944
+ /* @__PURE__ */ s(et, { size: "x-small", renderTitle: l("itemsLoadingSpinnerLabel") }),
1475
945
  " ",
1476
- /* @__PURE__ */ r(S, { size: "small", color: "secondary", children: l("itemsLoadingText") })
1477
- ] }) : /* @__PURE__ */ g(E, { as: "div", margin: "small 0 0 0", children: [
1478
- o ? /* @__PURE__ */ g(S, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
946
+ /* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("itemsLoadingText") })
947
+ ] }) : /* @__PURE__ */ m(M, { as: "div", margin: "small 0 0 0", children: [
948
+ r ? /* @__PURE__ */ m(b, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
1479
949
  "items source: ",
1480
950
  t.source,
1481
951
  " · page ",
@@ -1483,79 +953,79 @@ function us({
1483
953
  " of ",
1484
954
  t.pageCount
1485
955
  ] }) : null,
1486
- t.items.length === 0 ? /* @__PURE__ */ r(E, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ r(S, { size: "small", color: "secondary", children: l("noItemsEmptyState") }) }) : /* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((h, _) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
1487
- ji,
956
+ t.items.length === 0 ? /* @__PURE__ */ s(M, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("noItemsEmptyState") }) }) : /* @__PURE__ */ s(Ge, { isUnstyled: !0, margin: "none", "data-testid": "items-list", children: t.items.map((f, I) => /* @__PURE__ */ s(We, { children: /* @__PURE__ */ s(
957
+ Bn,
1488
958
  {
1489
- item: h,
959
+ item: f,
1490
960
  today: n,
1491
- attachedAbove: Sn(h) && yt(t.items[_ - 1]),
1492
- attachedBelow: yt(h) && Sn(t.items[_ + 1]),
1493
- stackPill: i,
1494
- moduleLabel: s,
1495
- itemNumber: u[_]
961
+ attachedAbove: Ct(f) && He(t.items[I - 1]),
962
+ attachedBelow: He(f) && Ct(t.items[I + 1]),
963
+ stackPill: o,
964
+ moduleLabel: i,
965
+ itemNumber: d[I]
1496
966
  }
1497
- ) }, h.id)) }),
1498
- t.pageCount > 1 ? /* @__PURE__ */ r(
1499
- zn,
967
+ ) }, f.id)) }),
968
+ t.pageCount > 1 ? /* @__PURE__ */ s(
969
+ xt,
1500
970
  {
1501
971
  as: "nav",
1502
972
  variant: "compact",
1503
973
  withFirstAndLastButton: !0,
1504
974
  margin: "small 0 0 0",
1505
- label: /* @__PURE__ */ r(Ye, { children: l("itemsPaginationLabel", { name: e.name }) }),
975
+ label: /* @__PURE__ */ s(zt, { children: l("itemsPaginationLabel", { name: e.name }) }),
1506
976
  labelFirst: l("paginationFirstPage"),
1507
977
  labelPrev: l("paginationPreviousPage"),
1508
978
  labelNext: l("paginationNextPage"),
1509
979
  labelLast: l("paginationLastPage"),
1510
- screenReaderLabelPageButton: (h) => l("paginationPageLabel", { page: h }),
980
+ screenReaderLabelPageButton: (f) => l("paginationPageLabel", { page: f }),
1511
981
  ellipsis: l("paginationEllipsis"),
1512
982
  totalPageNumber: t.pageCount,
1513
983
  currentPage: t.page,
1514
984
  disabled: t.isRefreshing,
1515
- onPageChange: p,
985
+ onPageChange: h,
1516
986
  "data-testid": "items-pagination"
1517
987
  }
1518
988
  ) : null
1519
989
  ] });
1520
990
  }
1521
- function ds({
991
+ function pr({
1522
992
  module: e,
1523
993
  expanded: t,
1524
994
  onToggle: n,
1525
- itemsState: o,
1526
- today: i,
1527
- showDiagnostics: s = !1,
995
+ itemsState: r,
996
+ today: o,
997
+ showDiagnostics: i = !1,
1528
998
  headingLevel: l = "h3",
1529
- moduleLabel: a,
1530
- breakpoints: c = {},
1531
- toggleRef: u
999
+ moduleLabel: u,
1000
+ breakpoints: a = {},
1001
+ toggleRef: d
1532
1002
  }) {
1533
- var Z, N, $, ee;
1534
- const { t: d, timezone: m } = P(), p = Ve(), h = Ae(), { navigation: _ } = _e(), A = so(), v = ((Z = e.progress) == null ? void 0 : Z.status) === "locked", z = v ? null : ((N = _.getModuleHref) == null ? void 0 : N.call(_, e)) ?? null, U = a === void 0 ? h.moduleLabel(e.position, e) : a, M = (U == null ? void 0 : U.trim()) || null, L = M ? d("moduleNameWithLabel", { label: M, name: e.name }) : e.name, X = /* @__PURE__ */ r(
1535
- Ie,
1003
+ var K, q, ee, ce;
1004
+ const { t: g, timezone: p } = x(), h = Xe(), f = Je(), { navigation: I } = Te(), v = Dn(), L = ((K = e.progress) == null ? void 0 : K.status) === "locked", $ = L ? null : ((q = I.getModuleHref) == null ? void 0 : q.call(I, e)) ?? null, O = u === void 0 ? f.moduleLabel(e.position, e) : u, S = (O == null ? void 0 : O.trim()) || null, C = S ? g("moduleNameWithLabel", { label: S, name: e.name }) : e.name, j = /* @__PURE__ */ s(
1005
+ ue,
1536
1006
  {
1537
1007
  level: l,
1538
1008
  variant: "titleCardMini",
1539
- color: v ? "secondary" : "primary",
1540
- "aria-label": L,
1009
+ color: L ? "secondary" : "primary",
1010
+ "aria-label": C,
1541
1011
  "data-testid": "module-name",
1542
- children: /* @__PURE__ */ r(_r, { themeOverride: ls, children: /* @__PURE__ */ r(Mr, { linesAllowed: ss, children: L }) })
1012
+ children: /* @__PURE__ */ s(ui, { themeOverride: dr, children: /* @__PURE__ */ s(ai, { linesAllowed: ur, children: C }) })
1543
1013
  }
1544
- ), C = c.mobileOnly === !0, R = () => {
1545
- p(t ? "module-collapse" : "module-expand"), n(e.id);
1546
- }, B = () => {
1547
- var O;
1548
- (O = window.getSelection()) != null && O.toString().trim() || R();
1549
- }, D = ($ = e.progress) != null && $.status ? /* @__PURE__ */ r(
1550
- Ai,
1014
+ ), T = a.mobileOnly === !0, w = () => {
1015
+ h(t ? "module-collapse" : "module-expand"), n(e.id);
1016
+ }, H = () => {
1017
+ var R;
1018
+ (R = window.getSelection()) != null && R.toString().trim() || w();
1019
+ }, A = (ee = e.progress) != null && ee.status ? /* @__PURE__ */ s(
1020
+ qn,
1551
1021
  {
1552
1022
  status: e.progress.status,
1553
1023
  missingCount: e.progress.missingCount,
1554
1024
  incompleteCount: e.progress.incompleteCount
1555
1025
  }
1556
- ) : null, G = ((ee = e.progress) == null ? void 0 : ee.status) !== void 0 && e.progress.status !== "complete" && !v && An(e.progress.nextDueAt, i, m) ? /* @__PURE__ */ r(Ri, {}) : null;
1557
- return /* @__PURE__ */ g(
1558
- E,
1026
+ ) : null, D = ((ce = e.progress) == null ? void 0 : ce.status) !== void 0 && e.progress.status !== "complete" && !L && zn(e.progress.nextDueAt, o, p) ? /* @__PURE__ */ s($n, {}) : null;
1027
+ return /* @__PURE__ */ m(
1028
+ M,
1559
1029
  {
1560
1030
  as: "div",
1561
1031
  background: "primary",
@@ -1566,509 +1036,509 @@ function ds({
1566
1036
  margin: "0 0 small 0",
1567
1037
  "data-testid": `module-card-${e.id}`,
1568
1038
  children: [
1569
- /* @__PURE__ */ r(E, { as: "div", cursor: "pointer", children: /* @__PURE__ */ g(
1570
- I,
1039
+ /* @__PURE__ */ s(M, { as: "div", cursor: "pointer", children: /* @__PURE__ */ m(
1040
+ _,
1571
1041
  {
1572
1042
  alignItems: "start",
1573
1043
  gap: "mediumSmall",
1574
- onClick: B,
1044
+ onClick: H,
1575
1045
  "data-testid": "module-header",
1576
1046
  children: [
1577
- /* @__PURE__ */ g(I.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1578
- /* @__PURE__ */ g(E, { as: "div", children: [
1579
- /* @__PURE__ */ r(E, { as: "div", children: z ? /* @__PURE__ */ r(
1580
- Dn,
1047
+ /* @__PURE__ */ m(_.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1048
+ /* @__PURE__ */ m(M, { as: "div", children: [
1049
+ /* @__PURE__ */ s(M, { as: "div", children: $ ? /* @__PURE__ */ s(
1050
+ mi,
1581
1051
  {
1582
- href: z,
1052
+ href: $,
1583
1053
  display: "inline-block",
1584
1054
  forceButtonRole: !1,
1585
- variant: A,
1586
- "aria-label": L,
1587
- onClick: (O) => O.stopPropagation(),
1588
- children: X
1055
+ variant: v,
1056
+ "aria-label": C,
1057
+ onClick: (R) => R.stopPropagation(),
1058
+ children: j
1589
1059
  }
1590
- ) : X }),
1591
- e.published ? null : /* @__PURE__ */ g(S, { size: "x-small", color: "secondary", children: [
1060
+ ) : j }),
1061
+ e.published ? null : /* @__PURE__ */ m(b, { size: "x-small", color: "secondary", children: [
1592
1062
  " ",
1593
- d("moduleUnpublishedBadge")
1063
+ g("moduleUnpublishedBadge")
1594
1064
  ] })
1595
1065
  ] }),
1596
- /* @__PURE__ */ r(Ji, { module: e, today: i }),
1597
- C && (D || G) ? /* @__PURE__ */ r(E, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ g(I, { gap: "x-small", wrap: "wrap", children: [
1598
- G ? /* @__PURE__ */ r(I.Item, { children: G }) : null,
1599
- D ? /* @__PURE__ */ r(I.Item, { children: D }) : null
1066
+ /* @__PURE__ */ s(nr, { module: e, today: o }),
1067
+ T && (A || D) ? /* @__PURE__ */ s(M, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ m(_, { gap: "x-small", wrap: "wrap", children: [
1068
+ D ? /* @__PURE__ */ s(_.Item, { children: D }) : null,
1069
+ A ? /* @__PURE__ */ s(_.Item, { children: A }) : null
1600
1070
  ] }) }) : null,
1601
- /* @__PURE__ */ r(as, { module: e, breakpoints: c })
1071
+ /* @__PURE__ */ s(cr, { module: e, breakpoints: a })
1602
1072
  ] }),
1603
- /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ g(I, { alignItems: "center", gap: "mediumSmall", children: [
1604
- !C && (G || D) ? /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ g(I, { alignItems: "center", gap: "x-small", children: [
1605
- G ? /* @__PURE__ */ r(I.Item, { children: G }) : null,
1606
- D ? /* @__PURE__ */ r(I.Item, { children: D }) : null
1073
+ /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(_, { alignItems: "center", gap: "mediumSmall", children: [
1074
+ !T && (D || A) ? /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(_, { alignItems: "center", gap: "x-small", children: [
1075
+ D ? /* @__PURE__ */ s(_.Item, { children: D }) : null,
1076
+ A ? /* @__PURE__ */ s(_.Item, { children: A }) : null
1607
1077
  ] }) }) : null,
1608
- /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ r(
1609
- _t,
1078
+ /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ s(
1079
+ di,
1610
1080
  {
1611
- elementRef: (O) => u == null ? void 0 : u(e.id, O),
1081
+ elementRef: (R) => d == null ? void 0 : d(e.id, R),
1612
1082
  size: "medium",
1613
1083
  withBorder: !0,
1614
1084
  withBackground: !1,
1615
- screenReaderLabel: t ? d("collapseModule", { name: e.name }) : d("expandModule", { name: e.name }),
1085
+ screenReaderLabel: t ? g("collapseModule", { name: e.name }) : g("expandModule", { name: e.name }),
1616
1086
  "aria-expanded": t,
1617
- "aria-controls": bn(e.id),
1618
- onClick: (O) => {
1619
- O.stopPropagation(), R();
1087
+ "aria-controls": Pt(e.id),
1088
+ onClick: (R) => {
1089
+ R.stopPropagation(), w();
1620
1090
  },
1621
1091
  "data-testid": `toggle-module-${e.id}`,
1622
- children: t ? /* @__PURE__ */ r(mr, {}) : /* @__PURE__ */ r(gr, {})
1092
+ children: t ? /* @__PURE__ */ s(ri, {}) : /* @__PURE__ */ s(si, {})
1623
1093
  }
1624
1094
  ) })
1625
1095
  ] }) })
1626
1096
  ]
1627
1097
  }
1628
1098
  ) }),
1629
- /* @__PURE__ */ r("div", { id: bn(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ r(
1630
- us,
1099
+ /* @__PURE__ */ s("div", { id: Pt(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ s(
1100
+ gr,
1631
1101
  {
1632
1102
  module: e,
1633
- state: o,
1634
- today: i,
1635
- showDiagnostics: s,
1636
- stackPill: C,
1637
- moduleLabel: Ho(e) ? null : M
1103
+ state: r,
1104
+ today: o,
1105
+ showDiagnostics: i,
1106
+ stackPill: T,
1107
+ moduleLabel: Nn(e) ? null : S
1638
1108
  }
1639
1109
  ) : null })
1640
1110
  ]
1641
1111
  }
1642
1112
  );
1643
1113
  }
1644
- const ms = Ln(ds), na = ["place_new", "reorganize_all"], Io = ["assignment", "discussion", "quiz", "page", "file"], bt = 1e3, gs = () => ({
1114
+ const fr = ii(pr), js = ["place_new", "reorganize_all"], en = ["assignment", "discussion", "quiz", "page", "file"], Ye = 1e3, hr = () => ({
1645
1115
  mode: "place_new",
1646
- contentTypes: [...Io],
1116
+ contentTypes: [...en],
1647
1117
  setPrerequisites: !0,
1648
1118
  setRequirements: !0,
1649
1119
  direction: ""
1650
1120
  });
1651
- function ps(e, t) {
1121
+ function Mr(e, t) {
1652
1122
  return e(t === "assignment" ? "itemTypeAssignment" : t === "discussion" ? "itemTypeDiscussion" : t === "quiz" ? "itemTypeQuiz" : t === "page" ? "itemTypePage" : "itemTypeFile");
1653
1123
  }
1654
- const St = "prerequisites", Mt = "requirements", fs = (e) => [
1655
- ...e.setPrerequisites ? [St] : [],
1656
- ...e.setRequirements ? [Mt] : []
1124
+ const je = "prerequisites", Qe = "requirements", _r = (e) => [
1125
+ ...e.setPrerequisites ? [je] : [],
1126
+ ...e.setRequirements ? [Qe] : []
1657
1127
  ];
1658
- function hs({
1128
+ function Ir({
1659
1129
  input: e,
1660
1130
  errors: t,
1661
1131
  onChange: n,
1662
- disabled: o = !1
1132
+ disabled: r = !1
1663
1133
  }) {
1664
- const { t: i } = P();
1665
- return /* @__PURE__ */ g(E, { as: "div", "data-testid": "organize-form", children: [
1666
- /* @__PURE__ */ g(
1667
- Rr,
1134
+ const { t: o } = x();
1135
+ return /* @__PURE__ */ m(M, { as: "div", "data-testid": "organize-form", children: [
1136
+ /* @__PURE__ */ m(
1137
+ Ei,
1668
1138
  {
1669
1139
  name: "organize-mode",
1670
1140
  value: e.mode,
1671
- onChange: (s, l) => n({ mode: l }),
1672
- description: i("organizeModeLegend"),
1673
- disabled: o,
1141
+ onChange: (i, l) => n({ mode: l }),
1142
+ description: o("organizeModeLegend"),
1143
+ disabled: r,
1674
1144
  children: [
1675
- /* @__PURE__ */ r(
1676
- Zt,
1145
+ /* @__PURE__ */ s(
1146
+ Et,
1677
1147
  {
1678
1148
  value: "place_new",
1679
- label: i("organizeModePlaceNew"),
1149
+ label: o("organizeModePlaceNew"),
1680
1150
  "data-testid": "organize-mode-place-new"
1681
1151
  }
1682
1152
  ),
1683
- /* @__PURE__ */ r(
1684
- Zt,
1153
+ /* @__PURE__ */ s(
1154
+ Et,
1685
1155
  {
1686
1156
  value: "reorganize_all",
1687
- label: i("organizeModeReorganizeAll"),
1157
+ label: o("organizeModeReorganizeAll"),
1688
1158
  "data-testid": "organize-mode-reorganize-all"
1689
1159
  }
1690
1160
  )
1691
1161
  ]
1692
1162
  }
1693
1163
  ),
1694
- e.mode === "reorganize_all" ? /* @__PURE__ */ r(E, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ r(ae, { variant: "warning", margin: "0", "data-testid": "organize-reorganize-warning", children: i("organizeReorganizeWarning") }) }) : null,
1695
- /* @__PURE__ */ r(E, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ r(
1696
- Xt,
1164
+ e.mode === "reorganize_all" ? /* @__PURE__ */ s(M, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(X, { variant: "warning", margin: "0", "data-testid": "organize-reorganize-warning", children: o("organizeReorganizeWarning") }) }) : null,
1165
+ /* @__PURE__ */ s(M, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ s(
1166
+ It,
1697
1167
  {
1698
1168
  name: "organize-content-types",
1699
1169
  value: [...e.contentTypes],
1700
- onChange: (s) => n({ contentTypes: s }),
1701
- description: i("organizeContentTypesLegend"),
1702
- messages: t.contentTypes ? [{ type: "newError", text: i("organizeErrorPickAContentType") }] : void 0,
1170
+ onChange: (i) => n({ contentTypes: i }),
1171
+ description: o("organizeContentTypesLegend"),
1172
+ messages: t.contentTypes ? [{ type: "newError", text: o("organizeErrorPickAContentType") }] : void 0,
1703
1173
  layout: "columns",
1704
- children: Io.map((s) => /* @__PURE__ */ r(
1705
- pt,
1174
+ children: en.map((i) => /* @__PURE__ */ s(
1175
+ Fe,
1706
1176
  {
1707
- value: s,
1708
- label: ps(i, s),
1709
- disabled: o,
1710
- "data-testid": `organize-content-type-${s}`
1177
+ value: i,
1178
+ label: Mr(o, i),
1179
+ disabled: r,
1180
+ "data-testid": `organize-content-type-${i}`
1711
1181
  },
1712
- s
1182
+ i
1713
1183
  ))
1714
1184
  }
1715
1185
  ) }),
1716
- /* @__PURE__ */ r(E, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ g(
1717
- Xt,
1186
+ /* @__PURE__ */ s(M, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ m(
1187
+ It,
1718
1188
  {
1719
1189
  name: "organize-progression",
1720
- value: fs(e),
1721
- onChange: (s) => n({
1722
- setPrerequisites: s.includes(St),
1723
- setRequirements: s.includes(Mt)
1190
+ value: _r(e),
1191
+ onChange: (i) => n({
1192
+ setPrerequisites: i.includes(je),
1193
+ setRequirements: i.includes(Qe)
1724
1194
  }),
1725
- description: i("organizeProgressionLegend"),
1195
+ description: o("organizeProgressionLegend"),
1726
1196
  children: [
1727
- /* @__PURE__ */ r(
1728
- pt,
1197
+ /* @__PURE__ */ s(
1198
+ Fe,
1729
1199
  {
1730
- value: St,
1731
- label: i("organizeSetPrerequisites"),
1732
- disabled: o,
1200
+ value: je,
1201
+ label: o("organizeSetPrerequisites"),
1202
+ disabled: r,
1733
1203
  "data-testid": "organize-set-prerequisites"
1734
1204
  }
1735
1205
  ),
1736
- /* @__PURE__ */ r(
1737
- pt,
1206
+ /* @__PURE__ */ s(
1207
+ Fe,
1738
1208
  {
1739
- value: Mt,
1740
- label: i("organizeSetRequirements"),
1741
- disabled: o,
1209
+ value: Qe,
1210
+ label: o("organizeSetRequirements"),
1211
+ disabled: r,
1742
1212
  "data-testid": "organize-set-requirements"
1743
1213
  }
1744
1214
  )
1745
1215
  ]
1746
1216
  }
1747
1217
  ) }),
1748
- /* @__PURE__ */ g(E, { as: "div", margin: "medium 0 0 0", children: [
1749
- /* @__PURE__ */ r(
1750
- kr,
1218
+ /* @__PURE__ */ m(M, { as: "div", margin: "medium 0 0 0", children: [
1219
+ /* @__PURE__ */ s(
1220
+ Si,
1751
1221
  {
1752
- label: i("organizeDirectionLabel"),
1753
- placeholder: i("organizeDirectionPlaceholder"),
1222
+ label: o("organizeDirectionLabel"),
1223
+ placeholder: o("organizeDirectionPlaceholder"),
1754
1224
  value: e.direction,
1755
- onChange: (s) => n({ direction: s.target.value.slice(0, bt) }),
1756
- disabled: o,
1225
+ onChange: (i) => n({ direction: i.target.value.slice(0, Ye) }),
1226
+ disabled: r,
1757
1227
  height: "6rem",
1758
1228
  "data-testid": "organize-direction"
1759
1229
  }
1760
1230
  ),
1761
- /* @__PURE__ */ r(E, { as: "div", textAlign: "end", margin: "xx-small 0 0 0", children: /* @__PURE__ */ r(S, { size: "x-small", color: "secondary", "data-testid": "organize-direction-count", children: i("organizeDirectionCount", {
1231
+ /* @__PURE__ */ s(M, { as: "div", textAlign: "end", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s(b, { size: "x-small", color: "secondary", "data-testid": "organize-direction-count", children: o("organizeDirectionCount", {
1762
1232
  used: e.direction.length,
1763
- max: bt
1233
+ max: Ye
1764
1234
  }) }) })
1765
1235
  ] })
1766
1236
  ] });
1767
1237
  }
1768
- const _o = "organize-preview", Eo = (e) => `proposed-module-${e + 1}`, Is = (e) => `${e.contentType}-${e.contentId}`;
1769
- function _s(e, t) {
1238
+ const tn = "organize-preview", nn = (e) => `proposed-module-${e + 1}`, Er = (e) => `${e.contentType}-${e.contentId}`;
1239
+ function Sr(e, t) {
1770
1240
  const n = e.completionRequirement;
1771
1241
  if (n)
1772
1242
  return { itemId: t, type: n.type, minScore: n.minScore ?? null };
1773
1243
  }
1774
- function Es(e, t, n) {
1775
- const o = Is(e);
1244
+ function yr(e, t, n) {
1245
+ const r = Er(e);
1776
1246
  return {
1777
- id: o,
1247
+ id: r,
1778
1248
  moduleId: t,
1779
1249
  title: e.title,
1780
1250
  type: e.contentType,
1781
1251
  position: n + 1,
1782
1252
  indent: 0,
1783
1253
  published: !0,
1784
- completionRequirement: _s(e, o) ?? null,
1785
- extensions: { [Zo]: e.isNew }
1254
+ completionRequirement: Sr(e, r) ?? null,
1255
+ extensions: { [Yn]: e.isNew }
1786
1256
  };
1787
1257
  }
1788
- function ys(e) {
1258
+ function Tr(e) {
1789
1259
  const t = /* @__PURE__ */ new Map();
1790
- return e.forEach((n, o) => {
1260
+ return e.forEach((n, r) => {
1791
1261
  t.set(
1792
1262
  n.position,
1793
- t.has(n.position) ? null : { id: Eo(o), name: n.name }
1263
+ t.has(n.position) ? null : { id: nn(r), name: n.name }
1794
1264
  );
1795
1265
  }), t;
1796
1266
  }
1797
- function bs(e, t, n) {
1798
- return e.prerequisitePositions.flatMap((o) => {
1799
- const i = n.get(o);
1800
- return !i || i.id === t ? [] : [i];
1267
+ function br(e, t, n) {
1268
+ return e.prerequisitePositions.flatMap((r) => {
1269
+ const o = n.get(r);
1270
+ return !o || o.id === t ? [] : [o];
1801
1271
  });
1802
1272
  }
1803
- function Ss(e) {
1804
- const t = ys(e.modules), n = [], o = {};
1805
- for (const [i, s] of e.modules.entries()) {
1806
- const l = Eo(i), a = s.items.map((c, u) => Es(c, l, u));
1807
- o[l] = a, n.push({
1273
+ function Pr(e) {
1274
+ const t = Tr(e.modules), n = [], r = {};
1275
+ for (const [o, i] of e.modules.entries()) {
1276
+ const l = nn(o), u = i.items.map((a, d) => yr(a, l, d));
1277
+ r[l] = u, n.push({
1808
1278
  id: l,
1809
- name: s.name,
1810
- position: s.position,
1279
+ name: i.name,
1280
+ position: i.position,
1811
1281
  published: !0,
1812
- itemCount: a.length,
1813
- items: a,
1814
- prerequisiteModules: bs(s, l, t),
1815
- requirementCount: s.requirementType === "one" ? 1 : null,
1282
+ itemCount: u.length,
1283
+ items: u,
1284
+ prerequisiteModules: br(i, l, t),
1285
+ requirementCount: i.requirementType === "one" ? 1 : null,
1816
1286
  requireSequentialProgress: !1,
1817
- completionRequirements: a.flatMap(
1818
- (c) => c.completionRequirement ? [c.completionRequirement] : []
1287
+ completionRequirements: u.flatMap(
1288
+ (a) => a.completionRequirement ? [a.completionRequirement] : []
1819
1289
  ),
1820
1290
  extensions: {
1821
- [Xo]: s.isNew,
1822
- [Qo]: s.items.filter((c) => c.isNew).length,
1823
- [Vo]: !0
1291
+ [Hn]: i.isNew,
1292
+ [Wn]: i.items.filter((a) => a.isNew).length,
1293
+ [Gn]: !0
1824
1294
  }
1825
1295
  });
1826
1296
  }
1827
- return { courseId: _o, modules: n, itemsByModuleId: o };
1297
+ return { courseId: tn, modules: n, itemsByModuleId: r };
1828
1298
  }
1829
- const Ms = {
1299
+ const Cr = {
1830
1300
  itemsLoadedAnnouncement: ""
1831
1301
  };
1832
- function Ts({ proposal: e }) {
1833
- const { t } = P(), n = F(() => Ss(e), [e]), o = F(() => tr(n), [n]), i = F(() => n.modules.map((l) => l.id), [n]), s = nr({
1834
- courseId: _o,
1835
- adapter: o,
1302
+ function vr({ proposal: e }) {
1303
+ const { t } = x(), n = F(() => Pr(e), [e]), r = F(() => Kn(n), [n]), o = F(() => n.modules.map((l) => l.id), [n]), i = Vn({
1304
+ courseId: tn,
1305
+ adapter: r,
1836
1306
  itemsMode: "inline",
1837
- initialExpandedModuleIds: i
1307
+ initialExpandedModuleIds: o
1838
1308
  });
1839
- return /* @__PURE__ */ g(Q, { children: [
1840
- /* @__PURE__ */ r(Ie, { level: "h3", margin: "0 0 medium 0", children: t("organizePreviewHeading") }),
1841
- /* @__PURE__ */ r(Ks, { data: s, headingLevel: "h3" })
1309
+ return /* @__PURE__ */ m(W, { children: [
1310
+ /* @__PURE__ */ s(ue, { level: "h3", margin: "0 0 medium 0", children: t("organizePreviewHeading") }),
1311
+ /* @__PURE__ */ s($r, { data: i, headingLevel: "h3" })
1842
1312
  ] });
1843
1313
  }
1844
- function Cs({ proposal: e }) {
1845
- const { t } = P(), n = _e(), o = F(() => pi(n), [n]), [i] = j(
1846
- () => new ar({ defaultOptions: { queries: { retry: !1 } } })
1314
+ function Lr({ proposal: e }) {
1315
+ const { t } = x(), n = Te(), r = F(() => Vi(n), [n]), [o] = G(
1316
+ () => new ei({ defaultOptions: { queries: { retry: !1 } } })
1847
1317
  );
1848
- return /* @__PURE__ */ g(E, { as: "div", "data-testid": "organize-proposal-preview", children: [
1849
- e.unplacedItems.length > 0 ? /* @__PURE__ */ g(ae, { variant: "warning", margin: "0 0 small 0", "data-testid": "organize-unplaced", children: [
1850
- /* @__PURE__ */ r(E, { as: "div", children: /* @__PURE__ */ r(S, { weight: "bold", children: t("organizeUnplacedHeading", { count: e.unplacedItems.length }) }) }),
1851
- /* @__PURE__ */ r(E, { as: "div", children: /* @__PURE__ */ r(S, { children: t("organizeUnplacedExplanation") }) }),
1852
- /* @__PURE__ */ r(Jt, { margin: "x-small 0 0 0", children: e.unplacedItems.map((s) => /* @__PURE__ */ r(en, { children: s.title }, `${s.contentType}-${s.contentId}`)) })
1318
+ return /* @__PURE__ */ m(M, { as: "div", "data-testid": "organize-proposal-preview", children: [
1319
+ e.unplacedItems.length > 0 ? /* @__PURE__ */ m(X, { variant: "warning", margin: "0 0 small 0", "data-testid": "organize-unplaced", children: [
1320
+ /* @__PURE__ */ s(M, { as: "div", children: /* @__PURE__ */ s(b, { weight: "bold", children: t("organizeUnplacedHeading", { count: e.unplacedItems.length }) }) }),
1321
+ /* @__PURE__ */ s(M, { as: "div", children: /* @__PURE__ */ s(b, { children: t("organizeUnplacedExplanation") }) }),
1322
+ /* @__PURE__ */ s(Ge, { margin: "x-small 0 0 0", children: e.unplacedItems.map((i) => /* @__PURE__ */ s(We, { children: i.title }, `${i.contentType}-${i.contentId}`)) })
1853
1323
  ] }) : null,
1854
- e.warnings.length > 0 ? /* @__PURE__ */ g(ae, { variant: "info", margin: "0 0 small 0", "data-testid": "organize-warnings", children: [
1855
- /* @__PURE__ */ r(E, { as: "div", children: /* @__PURE__ */ r(S, { weight: "bold", children: t("organizeWarningsHeading", { count: e.warnings.length }) }) }),
1856
- /* @__PURE__ */ r(Jt, { margin: "x-small 0 0 0", children: e.warnings.map((s) => /* @__PURE__ */ r(en, { children: s }, s)) })
1324
+ e.warnings.length > 0 ? /* @__PURE__ */ m(X, { variant: "info", margin: "0 0 small 0", "data-testid": "organize-warnings", children: [
1325
+ /* @__PURE__ */ s(M, { as: "div", children: /* @__PURE__ */ s(b, { weight: "bold", children: t("organizeWarningsHeading", { count: e.warnings.length }) }) }),
1326
+ /* @__PURE__ */ s(Ge, { margin: "x-small 0 0 0", children: e.warnings.map((i) => /* @__PURE__ */ s(We, { children: i }, i)) })
1857
1327
  ] }) : null,
1858
- /* @__PURE__ */ r(cr, { client: i, children: /* @__PURE__ */ r(Jo, { translations: Ms, children: /* @__PURE__ */ r(er, { value: o, children: /* @__PURE__ */ r(Ts, { proposal: e }) }) }) })
1328
+ /* @__PURE__ */ s(ti, { client: o, children: /* @__PURE__ */ s(jn, { translations: Cr, children: /* @__PURE__ */ s(Qn, { value: r, children: /* @__PURE__ */ s(vr, { proposal: e }) }) }) })
1859
1329
  ] });
1860
1330
  }
1861
- function Mn(e) {
1331
+ function vt(e) {
1862
1332
  const t = {};
1863
- return e.contentTypes.length === 0 && (t.contentTypes = "none_selected"), e.direction.length > bt && (t.direction = "too_long"), t;
1333
+ return e.contentTypes.length === 0 && (t.contentTypes = "none_selected"), e.direction.length > Ye && (t.direction = "too_long"), t;
1864
1334
  }
1865
- const Tn = (e) => Object.keys(e).length > 0, vs = 1e4, ws = (e) => e instanceof DOMException && e.name === "AbortError", Ps = (e) => e instanceof Error ? e : new Error(String(e)), As = { loading: "read", applying: "write" }, Cn = (e) => {
1335
+ const Lt = (e) => Object.keys(e).length > 0, wr = 1e4, Ar = (e) => e instanceof DOMException && e.name === "AbortError", Rr = (e) => e instanceof Error ? e : new Error(String(e)), kr = { loading: "read", applying: "write" }, wt = (e) => {
1866
1336
  (e == null ? void 0 : e.kind) === "read" && e.controller.abort();
1867
1337
  };
1868
- function Ls({
1338
+ function Or({
1869
1339
  actions: e,
1870
1340
  onApplied: t
1871
1341
  }) {
1872
- const [n, o] = j("form"), [i, s] = j(gs), [l, a] = j(null), [c, u] = j(null), [d, m] = j(!1), p = k(null), h = k(0), _ = k(!0);
1873
- W(() => (_.current = !0, () => {
1874
- _.current = !1, Cn(p.current), p.current = null;
1342
+ const [n, r] = G("form"), [o, i] = G(hr), [l, u] = G(null), [a, d] = G(null), [g, p] = G(!1), h = k(null), f = k(0), I = k(!0);
1343
+ B(() => (I.current = !0, () => {
1344
+ I.current = !1, wt(h.current), h.current = null;
1875
1345
  }), []);
1876
- const A = F(() => Mn(i), [i]), v = !Tn(A), z = V(() => {
1877
- Cn(p.current), p.current = null, h.current += 1, m(!1);
1878
- }, []), U = V((C) => {
1879
- s((R) => ({ ...R, ...C }));
1880
- }, []), M = V(
1881
- (C, R, B) => {
1882
- z();
1883
- const D = new AbortController(), ne = h.current;
1884
- p.current = { kind: As[C], controller: D }, u(null), o(C);
1885
- const G = () => _.current && h.current === ne;
1886
- B({ signal: D.signal, current: G }).catch((Z) => {
1887
- D.signal.aborted || ws(Z) || !G() || (u(Ps(Z)), o(R));
1346
+ const v = F(() => vt(o), [o]), L = !Lt(v), $ = U(() => {
1347
+ wt(h.current), h.current = null, f.current += 1, p(!1);
1348
+ }, []), O = U((T) => {
1349
+ i((w) => ({ ...w, ...T }));
1350
+ }, []), S = U(
1351
+ (T, w, H) => {
1352
+ $();
1353
+ const A = new AbortController(), re = f.current;
1354
+ h.current = { kind: kr[T], controller: A }, d(null), r(T);
1355
+ const D = () => I.current && f.current === re;
1356
+ H({ signal: A.signal, current: D }).catch((K) => {
1357
+ A.signal.aborted || Ar(K) || !D() || (d(Rr(K)), r(w));
1888
1358
  });
1889
1359
  },
1890
- [z]
1891
- ), L = V(() => {
1892
- Tn(Mn(i)) || M("loading", "error", async ({ signal: C, current: R }) => {
1893
- const B = await e.organize(i, C);
1894
- C.aborted || !R() || (a(B), o("preview"));
1360
+ [$]
1361
+ ), C = U(() => {
1362
+ Lt(vt(o)) || S("loading", "error", async ({ signal: T, current: w }) => {
1363
+ const H = await e.organize(o, T);
1364
+ T.aborted || !w() || (u(H), r("preview"));
1895
1365
  });
1896
- }, [e, i, M]), J = V(() => {
1897
- l !== null && M("applying", "preview", async ({ signal: C }) => {
1898
- await e.apply(l, i, C), t == null || t();
1366
+ }, [e, o, S]), Y = U(() => {
1367
+ l !== null && S("applying", "preview", async ({ signal: T }) => {
1368
+ await e.apply(l, o, T), t == null || t();
1899
1369
  });
1900
- }, [e, i, t, l, M]), X = V(() => {
1901
- z(), a(null), u(null), o("form");
1902
- }, [z]);
1903
- return W(() => {
1370
+ }, [e, o, t, l, S]), j = U(() => {
1371
+ $(), u(null), d(null), r("form");
1372
+ }, [$]);
1373
+ return B(() => {
1904
1374
  if (n !== "loading" && n !== "applying") return;
1905
- const C = setTimeout(() => m(!0), vs);
1906
- return () => clearTimeout(C);
1375
+ const T = setTimeout(() => p(!0), wr);
1376
+ return () => clearTimeout(T);
1907
1377
  }, [n]), {
1908
1378
  status: n,
1909
- input: i,
1910
- setInput: U,
1911
- errors: A,
1912
- canSubmit: v,
1379
+ input: o,
1380
+ setInput: O,
1381
+ errors: v,
1382
+ canSubmit: L,
1913
1383
  proposal: l,
1914
- error: c,
1915
- takingLong: d && (n === "loading" || n === "applying"),
1916
- submit: L,
1917
- regenerate: L,
1918
- apply: J,
1919
- cancel: X
1384
+ error: a,
1385
+ takingLong: g && (n === "loading" || n === "applying"),
1386
+ submit: C,
1387
+ regenerate: C,
1388
+ apply: Y,
1389
+ cancel: j
1920
1390
  };
1921
1391
  }
1922
- function vn({ label: e, takingLong: t }) {
1923
- const { t: n } = P();
1924
- return /* @__PURE__ */ g(E, { as: "div", padding: "x-large", textAlign: "center", "data-testid": "organize-working", children: [
1925
- /* @__PURE__ */ r(kt, { renderTitle: e }),
1926
- /* @__PURE__ */ r(E, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ r(S, { color: "secondary", children: e }) }),
1927
- t ? /* @__PURE__ */ r(E, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ r(S, { size: "small", color: "secondary", "data-testid": "organize-taking-long", children: n("organizeStillWorking") }) }) : null
1392
+ function At({ label: e, takingLong: t }) {
1393
+ const { t: n } = x();
1394
+ return /* @__PURE__ */ m(M, { as: "div", padding: "x-large", textAlign: "center", "data-testid": "organize-working", children: [
1395
+ /* @__PURE__ */ s(et, { renderTitle: e }),
1396
+ /* @__PURE__ */ s(M, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(b, { color: "secondary", children: e }) }),
1397
+ t ? /* @__PURE__ */ s(M, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ s(b, { size: "small", color: "secondary", "data-testid": "organize-taking-long", children: n("organizeStillWorking") }) }) : null
1928
1398
  ] });
1929
1399
  }
1930
- function Rs({
1400
+ function Dr({
1931
1401
  actions: e,
1932
1402
  open: t,
1933
1403
  onDismiss: n,
1934
- onApplied: o,
1935
- aiDisclosure: i
1404
+ onApplied: r,
1405
+ aiDisclosure: o
1936
1406
  }) {
1937
- const { t: s } = P(), l = k(!0);
1938
- W(() => (l.current = !0, () => {
1407
+ const { t: i } = x(), l = k(!0);
1408
+ B(() => (l.current = !0, () => {
1939
1409
  l.current = !1;
1940
1410
  }), []);
1941
- const a = Ls({
1411
+ const u = Or({
1942
1412
  actions: e,
1943
1413
  onApplied: () => {
1944
- K(s("organizeAppliedAnnouncement")), o == null || o(), l.current && n();
1414
+ N(i("organizeAppliedAnnouncement")), r == null || r(), l.current && n();
1945
1415
  }
1946
- }), { status: c, proposal: u, error: d, takingLong: m } = a;
1947
- return W(() => {
1948
- t && (c === "loading" && K(s("organizeLoadingLabel")), c === "applying" && K(s("organizeApplyingLabel")), c === "preview" && d === null && K(s("organizeProposalReadyAnnouncement")));
1949
- }, [t, c, d, s]), W(() => {
1950
- m && K(s("organizeStillWorking"));
1951
- }, [m, s]), /* @__PURE__ */ g(
1952
- wr,
1416
+ }), { status: a, proposal: d, error: g, takingLong: p } = u;
1417
+ return B(() => {
1418
+ t && (a === "loading" && N(i("organizeLoadingLabel")), a === "applying" && N(i("organizeApplyingLabel")), a === "preview" && g === null && N(i("organizeProposalReadyAnnouncement")));
1419
+ }, [t, a, g, i]), B(() => {
1420
+ p && N(i("organizeStillWorking"));
1421
+ }, [p, i]), /* @__PURE__ */ m(
1422
+ hi,
1953
1423
  {
1954
1424
  open: t,
1955
1425
  onDismiss: n,
1956
1426
  size: "large",
1957
- label: s("organizeModalLabel"),
1427
+ label: i("organizeModalLabel"),
1958
1428
  shouldCloseOnDocumentClick: !1,
1959
1429
  children: [
1960
- /* @__PURE__ */ g(Pr, { children: [
1961
- /* @__PURE__ */ r(
1962
- Tr,
1430
+ /* @__PURE__ */ m(Mi, { children: [
1431
+ /* @__PURE__ */ s(
1432
+ ci,
1963
1433
  {
1964
1434
  placement: "end",
1965
1435
  offset: "small",
1966
1436
  onClick: n,
1967
- screenReaderLabel: s("organizeCloseModal"),
1437
+ screenReaderLabel: i("organizeCloseModal"),
1968
1438
  "data-testid": "organize-close-modal"
1969
1439
  }
1970
1440
  ),
1971
- /* @__PURE__ */ g(I, { alignItems: "center", gap: "small", children: [
1972
- /* @__PURE__ */ r(I.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ r(Ie, { level: "h2", "data-testid": "organize-modal-title", children: s("organizeModalLabel") }) }),
1973
- i ? /* @__PURE__ */ r(I.Item, { "data-testid": "organize-ai-disclosure", children: i }) : null
1441
+ /* @__PURE__ */ m(_, { alignItems: "center", gap: "small", children: [
1442
+ /* @__PURE__ */ s(_.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ s(ue, { level: "h2", "data-testid": "organize-modal-title", children: i("organizeModalLabel") }) }),
1443
+ o ? /* @__PURE__ */ s(_.Item, { "data-testid": "organize-ai-disclosure", children: o }) : null
1974
1444
  ] })
1975
1445
  ] }),
1976
- /* @__PURE__ */ g(Ar, { children: [
1977
- c === "form" ? /* @__PURE__ */ r(
1978
- hs,
1446
+ /* @__PURE__ */ m(_i, { children: [
1447
+ a === "form" ? /* @__PURE__ */ s(
1448
+ Ir,
1979
1449
  {
1980
- input: a.input,
1981
- errors: a.errors,
1982
- onChange: a.setInput
1450
+ input: u.input,
1451
+ errors: u.errors,
1452
+ onChange: u.setInput
1983
1453
  }
1984
1454
  ) : null,
1985
- c === "loading" ? /* @__PURE__ */ r(vn, { label: s("organizeLoadingLabel"), takingLong: m }) : null,
1986
- c === "applying" ? /* @__PURE__ */ r(vn, { label: s("organizeApplyingLabel"), takingLong: m }) : null,
1987
- c === "preview" && u ? /* @__PURE__ */ g(Q, { children: [
1988
- d ? /* @__PURE__ */ r(
1989
- ae,
1455
+ a === "loading" ? /* @__PURE__ */ s(At, { label: i("organizeLoadingLabel"), takingLong: p }) : null,
1456
+ a === "applying" ? /* @__PURE__ */ s(At, { label: i("organizeApplyingLabel"), takingLong: p }) : null,
1457
+ a === "preview" && d ? /* @__PURE__ */ m(W, { children: [
1458
+ g ? /* @__PURE__ */ s(
1459
+ X,
1990
1460
  {
1991
1461
  variant: "error",
1992
1462
  margin: "0 0 small 0",
1993
- liveRegion: We,
1463
+ liveRegion: Se,
1994
1464
  liveRegionPoliteness: "assertive",
1995
1465
  "data-testid": "organize-apply-error",
1996
- children: s("organizeApplyFailed", { message: d.message })
1466
+ children: i("organizeApplyFailed", { message: g.message })
1997
1467
  }
1998
1468
  ) : null,
1999
- /* @__PURE__ */ r(Cs, { proposal: u })
1469
+ /* @__PURE__ */ s(Lr, { proposal: d })
2000
1470
  ] }) : null,
2001
- c === "error" ? /* @__PURE__ */ r(
2002
- ae,
1471
+ a === "error" ? /* @__PURE__ */ s(
1472
+ X,
2003
1473
  {
2004
1474
  variant: "error",
2005
1475
  margin: "0",
2006
- liveRegion: We,
1476
+ liveRegion: Se,
2007
1477
  liveRegionPoliteness: "assertive",
2008
1478
  "data-testid": "organize-error",
2009
- children: s("organizeFailed", { message: (d == null ? void 0 : d.message) ?? "" })
1479
+ children: i("organizeFailed", { message: (g == null ? void 0 : g.message) ?? "" })
2010
1480
  }
2011
1481
  ) : null
2012
1482
  ] }),
2013
- /* @__PURE__ */ g(Lr, { children: [
2014
- c === "form" ? /* @__PURE__ */ g(Q, { children: [
2015
- /* @__PURE__ */ r(H, { onClick: n, margin: "0 x-small 0 0", "data-testid": "organize-close", children: s("organizeCancel") }),
2016
- /* @__PURE__ */ r(
2017
- H,
1483
+ /* @__PURE__ */ m(Ii, { children: [
1484
+ a === "form" ? /* @__PURE__ */ m(W, { children: [
1485
+ /* @__PURE__ */ s(z, { onClick: n, margin: "0 x-small 0 0", "data-testid": "organize-close", children: i("organizeCancel") }),
1486
+ /* @__PURE__ */ s(
1487
+ z,
2018
1488
  {
2019
1489
  color: "ai-primary",
2020
- onClick: a.submit,
2021
- interaction: a.canSubmit ? "enabled" : "disabled",
1490
+ onClick: u.submit,
1491
+ interaction: u.canSubmit ? "enabled" : "disabled",
2022
1492
  "data-testid": "organize-submit",
2023
- children: s("organizeSubmit")
1493
+ children: i("organizeSubmit")
2024
1494
  }
2025
1495
  )
2026
1496
  ] }) : null,
2027
- c === "loading" ? /* @__PURE__ */ r(H, { onClick: a.cancel, "data-testid": "organize-cancel-loading", children: s("organizeCancel") }) : null,
2028
- c === "preview" ? /* @__PURE__ */ g(Q, { children: [
2029
- /* @__PURE__ */ r(H, { onClick: a.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: s("organizeStartOver") }),
2030
- /* @__PURE__ */ r(
2031
- H,
1497
+ a === "loading" ? /* @__PURE__ */ s(z, { onClick: u.cancel, "data-testid": "organize-cancel-loading", children: i("organizeCancel") }) : null,
1498
+ a === "preview" ? /* @__PURE__ */ m(W, { children: [
1499
+ /* @__PURE__ */ s(z, { onClick: u.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: i("organizeStartOver") }),
1500
+ /* @__PURE__ */ s(
1501
+ z,
2032
1502
  {
2033
- onClick: a.regenerate,
1503
+ onClick: u.regenerate,
2034
1504
  margin: "0 x-small 0 0",
2035
1505
  "data-testid": "organize-regenerate",
2036
- children: s("organizeRegenerate")
1506
+ children: i("organizeRegenerate")
2037
1507
  }
2038
1508
  ),
2039
- /* @__PURE__ */ r(H, { color: "primary", onClick: a.apply, "data-testid": "organize-apply", children: s("organizeApply") })
1509
+ /* @__PURE__ */ s(z, { color: "primary", onClick: u.apply, "data-testid": "organize-apply", children: i("organizeApply") })
2040
1510
  ] }) : null,
2041
- c === "error" ? /* @__PURE__ */ g(Q, { children: [
2042
- /* @__PURE__ */ r(H, { onClick: a.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: s("organizeStartOver") }),
2043
- /* @__PURE__ */ r(H, { color: "primary", onClick: a.submit, "data-testid": "organize-retry", children: s("organizeTryAgain") })
1511
+ a === "error" ? /* @__PURE__ */ m(W, { children: [
1512
+ /* @__PURE__ */ s(z, { onClick: u.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: i("organizeStartOver") }),
1513
+ /* @__PURE__ */ s(z, { color: "primary", onClick: u.submit, "data-testid": "organize-retry", children: i("organizeTryAgain") })
2044
1514
  ] }) : null,
2045
- c === "applying" ? /* @__PURE__ */ r(H, { interaction: "disabled", "data-testid": "organize-applying", children: s("organizeApply") }) : null
1515
+ a === "applying" ? /* @__PURE__ */ s(z, { interaction: "disabled", "data-testid": "organize-applying", children: i("organizeApply") }) : null
2046
1516
  ] })
2047
1517
  ]
2048
1518
  }
2049
1519
  );
2050
1520
  }
2051
- function ks({
1521
+ function qr({
2052
1522
  actions: e,
2053
1523
  onApplied: t,
2054
1524
  aiDisclosure: n,
2055
- display: o = "inline-block"
1525
+ display: r = "inline-block"
2056
1526
  }) {
2057
- const { t: i } = P(), [s, l] = j(!1);
2058
- return /* @__PURE__ */ g(Q, { children: [
2059
- /* @__PURE__ */ r(
2060
- H,
1527
+ const { t: o } = x(), [i, l] = G(!1);
1528
+ return /* @__PURE__ */ m(W, { children: [
1529
+ /* @__PURE__ */ s(
1530
+ z,
2061
1531
  {
2062
1532
  color: "ai-primary",
2063
- display: o,
1533
+ display: r,
2064
1534
  onClick: () => l(!0),
2065
- renderIcon: s ? /* @__PURE__ */ r(pr, {}) : /* @__PURE__ */ r(fr, {}),
1535
+ renderIcon: i ? /* @__PURE__ */ s(oi, {}) : /* @__PURE__ */ s(li, {}),
2066
1536
  "data-testid": "organize-modules-trigger",
2067
- children: i("organizeModulesTrigger")
1537
+ children: o("organizeModulesTrigger")
2068
1538
  }
2069
1539
  ),
2070
- s ? /* @__PURE__ */ r(
2071
- Rs,
1540
+ i ? /* @__PURE__ */ s(
1541
+ Dr,
2072
1542
  {
2073
1543
  actions: e,
2074
1544
  open: !0,
@@ -2079,247 +1549,14 @@ function ks({
2079
1549
  ) : null
2080
1550
  ] });
2081
1551
  }
2082
- function Os(e) {
2083
- switch (e) {
2084
- case "complete":
2085
- return "complete";
2086
- case "locked":
2087
- return "locked";
2088
- case void 0:
2089
- case "not_started":
2090
- return "notStarted";
2091
- case "in_progress":
2092
- return "inProgress";
2093
- case "missing":
2094
- case "incomplete":
2095
- case "missing_and_incomplete":
2096
- return "missing";
2097
- }
2098
- }
2099
- function ft(e) {
2100
- return (t, n) => {
2101
- const { newTheme: o } = n;
2102
- return {
2103
- backgroundPrimaryInverse: o.semantics(o.primitives).color.background.accent[e]
2104
- };
2105
- };
2106
- }
2107
- const xs = {
2108
- missing: {
2109
- background: "primary-inverse",
2110
- borderWidth: "none",
2111
- themeOverride: ft("honey"),
2112
- icon: /* @__PURE__ */ r(fe, { size: "sm", color: "onColor" })
2113
- },
2114
- complete: {
2115
- background: "primary-inverse",
2116
- borderWidth: "none",
2117
- themeOverride: ft("aurora"),
2118
- icon: /* @__PURE__ */ r(At, { size: "sm", color: "onColor" })
2119
- },
2120
- inProgress: {
2121
- background: "primary-inverse",
2122
- borderWidth: "none",
2123
- themeOverride: ft("sky"),
2124
- icon: /* @__PURE__ */ r(Lt, { size: "sm", color: "onColor" })
2125
- },
2126
- notStarted: {
2127
- background: "primary",
2128
- borderWidth: "medium",
2129
- icon: /* @__PURE__ */ r(Rt, { size: "sm", color: "baseColor" })
2130
- },
2131
- locked: {
2132
- background: "secondary",
2133
- borderWidth: "small",
2134
- icon: /* @__PURE__ */ r(Pt, { size: "sm", color: "baseColor" })
2135
- }
2136
- };
2137
- function Ds(e) {
2138
- var l, a, c;
2139
- let t = 0, n = 0, o = 0;
2140
- for (const u of e)
2141
- ((l = u.progress) == null ? void 0 : l.status) === "complete" && (t += 1), n += ((a = u.progress) == null ? void 0 : a.requirementCount) ?? 0, o += ((c = u.progress) == null ? void 0 : c.requirementsMet) ?? 0;
2142
- const i = e.length, s = i === 0 ? 0 : t === i ? 100 : Math.floor(t / i * 100);
2143
- return {
2144
- totalModules: i,
2145
- completedModules: t,
2146
- totalItems: n,
2147
- completedItems: o,
2148
- percent: s
2149
- };
2150
- }
2151
- const Tt = 32, Ns = "4px", zs = 4, qs = { none: 0, small: 1, medium: 2 };
2152
- function $s(e, t, n) {
2153
- const o = zs + n / 2, i = e ? Tt / 2 : o, s = t ? Tt / 2 : o;
2154
- return `${i}px ${s}px ${s}px ${i}px`;
2155
- }
2156
- function Fs({
2157
- module: e,
2158
- isFirst: t,
2159
- isLast: n,
2160
- onClick: o
2161
- }) {
2162
- var p, h, _;
2163
- const { t: i } = P(), l = Ae().moduleLabel(e.position, e), a = l ? i("moduleNameWithLabel", { label: l, name: e.name }) : e.name, c = ((p = e.progress) == null ? void 0 : p.status) ?? "not_started", u = Os(c), d = i("moduleProgressSegmentLabel", {
2164
- name: a,
2165
- status: io(
2166
- i,
2167
- c,
2168
- ((h = e.progress) == null ? void 0 : h.missingCount) ?? 0,
2169
- ((_ = e.progress) == null ? void 0 : _.incompleteCount) ?? 0
2170
- )
2171
- }), m = xs[u];
2172
- return /* @__PURE__ */ r(I.Item, { shouldGrow: !0, shouldShrink: !0, size: "0", children: /* @__PURE__ */ r(qn, { renderTip: a, children: () => /* @__PURE__ */ g(
2173
- E,
2174
- {
2175
- as: "button",
2176
- type: "button",
2177
- display: "block",
2178
- width: "100%",
2179
- height: `${Tt}px`,
2180
- padding: "0",
2181
- borderRadius: $s(t, n, qs[m.borderWidth]),
2182
- borderWidth: m.borderWidth,
2183
- borderColor: "secondary",
2184
- background: m.background,
2185
- themeOverride: m.themeOverride,
2186
- cursor: o ? "pointer" : void 0,
2187
- onClick: o ? () => o(e.id) : void 0,
2188
- "data-testid": `modules-progress-segment-${e.id}`,
2189
- children: [
2190
- /* @__PURE__ */ r(I, { as: "span", height: "100%", justifyItems: "center", alignItems: "center", children: m.icon }),
2191
- /* @__PURE__ */ r(Ye, { children: d })
2192
- ]
2193
- }
2194
- ) }) });
2195
- }
2196
- function Us({
2197
- modules: e,
2198
- onModuleClick: t,
2199
- hasMoreModules: n = !1,
2200
- continuesBefore: o = !1,
2201
- continuesAfter: i = !1,
2202
- pagination: s
2203
- }) {
2204
- const { t: l } = P(), a = F(() => Ds(e), [e]);
2205
- if (!e.some((m) => m.progress !== void 0) || a.totalModules === 0) return null;
2206
- const u = l("moduleProgressOverviewSummary", {
2207
- count: a.totalModules,
2208
- completedModules: a.completedModules,
2209
- totalModules: a.totalModules
2210
- }), d = a.totalItems > 0 ? l("moduleProgressOverviewDetail", {
2211
- itemsSummary: l("moduleProgressOverviewItemsSummary", {
2212
- count: a.totalItems,
2213
- completedItems: a.completedItems,
2214
- totalItems: a.totalItems
2215
- })
2216
- }) : null;
2217
- return /* @__PURE__ */ g(E, { as: "div", margin: "0 0 small 0", "data-testid": "modules-progress-overview", children: [
2218
- n ? null : /* @__PURE__ */ r(I, { wrap: "wrap", children: /* @__PURE__ */ g(I.Item, { children: [
2219
- /* @__PURE__ */ r(E, { as: "span", margin: "0 x-small 0 0", children: /* @__PURE__ */ r(
2220
- Ie,
2221
- {
2222
- level: "reset",
2223
- variant: "titleSection",
2224
- "data-testid": "modules-progress-overview-percent",
2225
- children: l("moduleProgressOverviewPercentLabel", { percent: a.percent })
2226
- }
2227
- ) }),
2228
- /* @__PURE__ */ r(S, { variant: "content", "data-testid": "modules-progress-overview-summary", children: d ? `${u} ${d}` : u })
2229
- ] }) }),
2230
- /* @__PURE__ */ r(E, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ r(
2231
- I,
2232
- {
2233
- gap: Ns,
2234
- role: "group",
2235
- "aria-label": l("moduleProgressOverviewGroupLabel"),
2236
- "data-testid": "modules-progress-overview-segments",
2237
- children: e.map((m, p) => /* @__PURE__ */ r(
2238
- Fs,
2239
- {
2240
- module: m,
2241
- isFirst: p === 0 && !o,
2242
- isLast: p === e.length - 1 && !i,
2243
- onClick: t
2244
- },
2245
- m.id
2246
- ))
2247
- }
2248
- ) }),
2249
- s ? /* @__PURE__ */ r(Bs, { pagination: s, shownCount: e.length }) : null
2250
- ] });
2251
- }
2252
- function Bs({
2253
- pagination: e,
2254
- shownCount: t
2255
- }) {
2256
- const { t: n } = P(), { rangeStart: o, totalCount: i, hasPreviousPage: s, hasNextPage: l, disabled: a = !1 } = e, c = k(null), u = k(null), d = k(null);
2257
- W(() => {
2258
- var h, _;
2259
- if (a) return;
2260
- const p = d.current;
2261
- d.current = null, p === "next" && !l && ((h = c.current) == null || h.focus()), p === "previous" && !s && ((_ = u.current) == null || _.focus());
2262
- }, [a, l, s]);
2263
- const m = (p) => {
2264
- a || (d.current = p, p === "next" ? e.onNextPage() : e.onPreviousPage());
2265
- };
2266
- return /* @__PURE__ */ r(E, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ g(
2267
- I,
2268
- {
2269
- as: "nav",
2270
- justifyItems: "space-between",
2271
- alignItems: "center",
2272
- gap: "x-small",
2273
- "aria-label": n("moduleProgressOverviewPaginationLabel"),
2274
- "data-testid": "modules-progress-overview-pagination",
2275
- children: [
2276
- /* @__PURE__ */ r(
2277
- _t,
2278
- {
2279
- size: "small",
2280
- withBackground: !1,
2281
- withBorder: !1,
2282
- renderIcon: /* @__PURE__ */ r(hr, {}),
2283
- screenReaderLabel: n("paginationPreviousPage"),
2284
- interaction: s ? "enabled" : "disabled",
2285
- elementRef: (p) => {
2286
- c.current = p;
2287
- },
2288
- onClick: () => m("previous")
2289
- }
2290
- ),
2291
- i === null ? null : /* @__PURE__ */ r(S, { size: "small", color: "secondary", "data-testid": "modules-progress-overview-range", children: n("moduleProgressOverviewPageRange", {
2292
- start: o,
2293
- end: o + t - 1,
2294
- total: i
2295
- }) }),
2296
- /* @__PURE__ */ r(
2297
- _t,
2298
- {
2299
- size: "small",
2300
- withBackground: !1,
2301
- withBorder: !1,
2302
- renderIcon: /* @__PURE__ */ r(Ir, {}),
2303
- screenReaderLabel: n("paginationNextPage"),
2304
- interaction: l ? "enabled" : "disabled",
2305
- elementRef: (p) => {
2306
- u.current = p;
2307
- },
2308
- onClick: () => m("next")
2309
- }
2310
- )
2311
- ]
2312
- }
2313
- ) });
2314
- }
2315
- function Gs({
1552
+ function zr({
2316
1553
  counts: e,
2317
1554
  itemsMode: t,
2318
1555
  loadedModules: n
2319
1556
  }) {
2320
- const o = e.listModules + e.listModuleItems;
2321
- return /* @__PURE__ */ r(
2322
- E,
1557
+ const r = e.listModules + e.listModuleItems;
1558
+ return /* @__PURE__ */ s(
1559
+ M,
2323
1560
  {
2324
1561
  as: "div",
2325
1562
  background: "secondary",
@@ -2328,25 +1565,25 @@ function Gs({
2328
1565
  padding: "x-small small",
2329
1566
  margin: "0 0 small 0",
2330
1567
  "data-testid": "dev-diagnostics",
2331
- children: /* @__PURE__ */ g(I, { gap: "medium", wrap: "wrap", children: [
2332
- /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ r(S, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
2333
- /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ g(S, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1568
+ children: /* @__PURE__ */ m(_, { gap: "medium", wrap: "wrap", children: [
1569
+ /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ s(b, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1570
+ /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "request-count-list-modules", children: [
2334
1571
  "listModules: ",
2335
1572
  e.listModules
2336
1573
  ] }) }),
2337
- /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ g(S, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1574
+ /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
2338
1575
  "listModuleItems: ",
2339
1576
  e.listModuleItems
2340
1577
  ] }) }),
2341
- /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ g(S, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1578
+ /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
2342
1579
  "total: ",
2343
- o
1580
+ r
2344
1581
  ] }) }),
2345
- /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ g(S, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1582
+ /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "resolved-items-mode", children: [
2346
1583
  "itemsMode: ",
2347
1584
  t ?? "probing…"
2348
1585
  ] }) }),
2349
- /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ g(S, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1586
+ /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "modules-loaded-count", children: [
2350
1587
  "modules loaded: ",
2351
1588
  n
2352
1589
  ] }) })
@@ -2354,172 +1591,172 @@ function Gs({
2354
1591
  }
2355
1592
  );
2356
1593
  }
2357
- const Ws = 200;
2358
- function Hs({
1594
+ const Nr = 200;
1595
+ function xr({
2359
1596
  data: e,
2360
1597
  today: t,
2361
1598
  requestCounts: n,
2362
- showDiagnostics: o = n !== void 0,
2363
- as: i = "div",
2364
- headingLevel: s = "h2",
1599
+ showDiagnostics: r = n !== void 0,
1600
+ as: o = "div",
1601
+ headingLevel: i = "h2",
2365
1602
  organizationActions: l,
2366
- onOrganizationApplied: a,
2367
- organizationAiDisclosure: c,
2368
- breakpoints: u = {}
1603
+ onOrganizationApplied: u,
1604
+ organizationAiDisclosure: a,
1605
+ breakpoints: d = {}
2369
1606
  }) {
2370
- const { miniTablet: d, tablet: m, desktop: p, desktopNavOpen: h, desktopOnly: _, mobileOnly: A, ICEDesktop: v } = u, z = F(
2371
- () => ({ miniTablet: d, tablet: m, desktop: p, desktopNavOpen: h, desktopOnly: _, mobileOnly: A, ICEDesktop: v }),
2372
- [d, m, p, h, _, A, v]
1607
+ const { miniTablet: g, tablet: p, desktop: h, desktopNavOpen: f, desktopOnly: I, mobileOnly: v, ICEDesktop: L } = d, $ = F(
1608
+ () => ({ miniTablet: g, tablet: p, desktop: h, desktopNavOpen: f, desktopOnly: I, mobileOnly: v, ICEDesktop: L }),
1609
+ [g, p, h, f, I, v, L]
2373
1610
  ), {
2374
- modules: U,
2375
- page: M,
2376
- pageCount: L,
2377
- pageSize: J,
2378
- pageInfo: X,
2379
- hasNextPage: C,
2380
- hasPreviousPage: R,
2381
- goToFirstPage: B,
2382
- goToPreviousPage: D,
2383
- goToNextPage: ne,
2384
- goToLastPage: G,
2385
- isLoading: Z,
2386
- isRefreshing: N,
2387
- error: $,
2388
- itemsMode: ee,
2389
- expandedModuleIds: O,
2390
- expandModule: ce,
2391
- collapseModule: Le,
2392
- toggleModule: Re,
2393
- expandModules: oe,
2394
- collapseModules: ke,
2395
- expandAllModules: Oe,
2396
- collapseAllModules: Je,
2397
- isPersistingCollapsed: xe,
2398
- getItems: ue,
2399
- filter: re,
2400
- setFilter: y,
2401
- filterEntry: Y,
2402
- filterPredicate: q
2403
- } = e, { t: T, timezone: $t } = P(), De = Ve(), { filters: Ft } = _e(), So = F(() => je(Ft).length > 0, [Ft]), Ut = k(null), et = k(/* @__PURE__ */ new Map()), tt = k(/* @__PURE__ */ new Map()), te = A === !0, ye = k(null), Mo = V((f) => {
2404
- var w, se;
2405
- (w = et.current.get(f)) == null || w.scrollIntoView({ behavior: "smooth", block: "start" }), (se = tt.current.get(f)) == null || se.focus({ preventScroll: !0 });
2406
- }, []), To = V((f, w) => {
2407
- w ? tt.current.set(f, w) : tt.current.delete(f);
2408
- }, []), [Co] = j(() => /* @__PURE__ */ new Date()), nt = t ?? Co;
2409
- W(() => {
2410
- var w;
2411
- if (ye.current === null || N) return;
2412
- const f = ye.current === "focusList";
2413
- ye.current = null, K(T("pageChangedAnnouncement", { page: M, pageCount: L })), f && ((w = Ut.current) == null || w.focus());
2414
- }, [N, M, L, T]);
2415
- const ot = V(
2416
- (f, w = "focusList") => {
2417
- ye.current = w, De("paginate-modules"), f === 1 ? B() : f === M - 1 ? D() : f === M + 1 ? ne() : f === L && G();
1611
+ modules: O,
1612
+ page: S,
1613
+ pageCount: C,
1614
+ pageSize: Y,
1615
+ pageInfo: j,
1616
+ hasNextPage: T,
1617
+ hasPreviousPage: w,
1618
+ goToFirstPage: H,
1619
+ goToPreviousPage: A,
1620
+ goToNextPage: re,
1621
+ goToLastPage: D,
1622
+ isLoading: K,
1623
+ isRefreshing: q,
1624
+ error: ee,
1625
+ itemsMode: ce,
1626
+ expandedModuleIds: R,
1627
+ expandModule: nt,
1628
+ collapseModule: it,
1629
+ toggleModule: rt,
1630
+ expandModules: on,
1631
+ collapseModules: ln,
1632
+ expandAllModules: an,
1633
+ collapseAllModules: un,
1634
+ isPersistingCollapsed: dn,
1635
+ getItems: Pe,
1636
+ filter: me,
1637
+ setFilter: st,
1638
+ filterEntry: cn,
1639
+ filterPredicate: Ce
1640
+ } = e, { t: E, timezone: ot } = x(), ge = Xe(), { filters: lt } = Te(), mn = F(() => Ze(lt).length > 0, [lt]), at = k(null), ve = k(/* @__PURE__ */ new Map()), Le = k(/* @__PURE__ */ new Map()), Q = v === !0, se = k(null), gn = U((c) => {
1641
+ var y, Z;
1642
+ (y = ve.current.get(c)) == null || y.scrollIntoView({ behavior: "smooth", block: "start" }), (Z = Le.current.get(c)) == null || Z.focus({ preventScroll: !0 });
1643
+ }, []), pn = U((c, y) => {
1644
+ y ? Le.current.set(c, y) : Le.current.delete(c);
1645
+ }, []), [fn] = G(() => /* @__PURE__ */ new Date()), we = t ?? fn;
1646
+ B(() => {
1647
+ var y;
1648
+ if (se.current === null || q) return;
1649
+ const c = se.current === "focusList";
1650
+ se.current = null, N(E("pageChangedAnnouncement", { page: S, pageCount: C })), c && ((y = at.current) == null || y.focus());
1651
+ }, [q, S, C, E]);
1652
+ const Ae = U(
1653
+ (c, y = "focusList") => {
1654
+ se.current = y, ge("paginate-modules"), c === 1 ? H() : c === S - 1 ? A() : c === S + 1 ? re() : c === C && D();
2418
1655
  },
2419
- [M, L, B, D, ne, G, De]
2420
- ), rt = F(
2421
- () => U.filter(
2422
- (f) => q === void 0 || q(f, { today: nt, timezone: $t })
1656
+ [S, C, H, A, re, D, ge]
1657
+ ), Re = F(
1658
+ () => O.filter(
1659
+ (c) => Ce === void 0 || Ce(c, { today: we, timezone: ot })
2423
1660
  ),
2424
- [U, q, nt, $t]
2425
- ), Bt = k({
2426
- rows: rt,
2427
- expanded: O,
1661
+ [O, Ce, we, ot]
1662
+ ), ut = k({
1663
+ rows: Re,
1664
+ expanded: R,
2428
1665
  items: /* @__PURE__ */ new Map()
2429
- }), [x, be] = j(null);
2430
- N ? x === null && be(Bt.current) : (Bt.current = {
2431
- rows: rt,
2432
- expanded: O,
2433
- items: new Map(O.map((f) => [f, ue(f)]))
2434
- }, x !== null && be(null));
2435
- const ie = (x == null ? void 0 : x.rows) ?? rt, it = (x == null ? void 0 : x.expanded) ?? O, Gt = F(() => new Set(it), [it]), Se = F(
2436
- () => ie.filter((f) => Gt.has(f.id)).map((f) => f.id),
2437
- [ie, Gt]
2438
- ), Wt = Se.length > 0, [st, lt] = j(!1), Ne = Se.filter((f) => ue(f).isLoading).length, de = k(!1);
2439
- W(() => {
2440
- if (st) {
2441
- if (Ne > 0 && !de.current) {
2442
- de.current = !0, K(T("expandAllLoadingItems", { count: Ne }));
1666
+ }), [P, oe] = G(null);
1667
+ q ? P === null && oe(ut.current) : (ut.current = {
1668
+ rows: Re,
1669
+ expanded: R,
1670
+ items: new Map(R.map((c) => [c, Pe(c)]))
1671
+ }, P !== null && oe(null));
1672
+ const V = (P == null ? void 0 : P.rows) ?? Re, ke = (P == null ? void 0 : P.expanded) ?? R, dt = F(() => new Set(ke), [ke]), le = F(
1673
+ () => V.filter((c) => dt.has(c.id)).map((c) => c.id),
1674
+ [V, dt]
1675
+ ), ct = le.length > 0, [Oe, De] = G(!1), pe = le.filter((c) => Pe(c).isLoading).length, te = k(!1);
1676
+ B(() => {
1677
+ if (Oe) {
1678
+ if (pe > 0 && !te.current) {
1679
+ te.current = !0, N(E("expandAllLoadingItems", { count: pe }));
2443
1680
  return;
2444
1681
  }
2445
- Ne === 0 && (de.current && O.length > 0 && K(T("expandAllItemsLoaded")), de.current = !1, lt(!1));
1682
+ pe === 0 && (te.current && R.length > 0 && N(E("expandAllItemsLoaded")), te.current = !1, De(!1));
2446
1683
  }
2447
- }, [st, Ne, O.length, T]);
2448
- const at = st || xe, ct = k(null), ut = k(!1);
2449
- W(() => {
2450
- var f;
2451
- at || !ut.current || (ut.current = !1, (f = ct.current) == null || f.focus());
2452
- }, [at]);
2453
- const vo = () => {
2454
- if (ut.current = document.activeElement === ct.current, Wt) {
2455
- De("collapse-all");
2456
- const w = new Set(Se);
2457
- lt(!1), de.current = !1, re === Fe ? Je() : ke(Se), x !== null && be({ ...x, expanded: x.expanded.filter((se) => !w.has(se)) }), K(T("modulesCollapsedAnnouncement", { count: Se.length }));
1684
+ }, [Oe, pe, R.length, E]);
1685
+ const qe = Oe || dn, ze = k(null), Ne = k(!1);
1686
+ B(() => {
1687
+ var c;
1688
+ qe || !Ne.current || (Ne.current = !1, (c = ze.current) == null || c.focus());
1689
+ }, [qe]);
1690
+ const hn = () => {
1691
+ if (Ne.current = document.activeElement === ze.current, ct) {
1692
+ ge("collapse-all");
1693
+ const y = new Set(le);
1694
+ De(!1), te.current = !1, me === Ie ? un() : ln(le), P !== null && oe({ ...P, expanded: P.expanded.filter((Z) => !y.has(Z)) }), N(E("modulesCollapsedAnnouncement", { count: le.length }));
2458
1695
  return;
2459
1696
  }
2460
- De("expand-all");
2461
- const f = ie.map((w) => w.id);
2462
- lt(!0), de.current = !1, re === Fe ? Oe() : oe(f), x !== null && be({ ...x, expanded: f }), K(T("modulesExpandedAnnouncement", { count: f.length }));
2463
- }, Ht = k(x);
2464
- Ht.current = x;
2465
- const wo = V(
2466
- (f) => {
2467
- const w = Ht.current;
2468
- if (w === null) {
2469
- Re(f);
1697
+ ge("expand-all");
1698
+ const c = V.map((y) => y.id);
1699
+ De(!0), te.current = !1, me === Ie ? an() : on(c), P !== null && oe({ ...P, expanded: c }), N(E("modulesExpandedAnnouncement", { count: c.length }));
1700
+ }, mt = k(P);
1701
+ mt.current = P;
1702
+ const Mn = U(
1703
+ (c) => {
1704
+ const y = mt.current;
1705
+ if (y === null) {
1706
+ rt(c);
2470
1707
  return;
2471
1708
  }
2472
- const se = w.expanded.includes(f);
2473
- be({
2474
- ...w,
2475
- expanded: se ? w.expanded.filter((Lo) => Lo !== f) : [...w.expanded, f]
2476
- }), se ? Le(f) : ce(f);
1709
+ const Z = y.expanded.includes(c);
1710
+ oe({
1711
+ ...y,
1712
+ expanded: Z ? y.expanded.filter((En) => En !== c) : [...y.expanded, c]
1713
+ }), Z ? it(c) : nt(c);
2477
1714
  },
2478
- [Re, Le, ce]
2479
- ), [Po, Kt] = j(!1);
2480
- W(() => {
2481
- if (!N) {
2482
- Kt(!1);
1715
+ [rt, it, nt]
1716
+ ), [_n, gt] = G(!1);
1717
+ B(() => {
1718
+ if (!q) {
1719
+ gt(!1);
2483
1720
  return;
2484
1721
  }
2485
- const f = setTimeout(() => Kt(!0), Ws);
2486
- return () => clearTimeout(f);
2487
- }, [N]);
2488
- const ze = Y !== void 0 && re !== Fe, dt = Z || N && ie.length === 0, qe = ie.length === 0 && !dt && !$, $e = qe && ze, mt = s === "h1" ? "h2" : "h3";
2489
- W(() => {
2490
- $e && K(T("filteredEmptyStateTitle"));
2491
- }, [$e, T]);
2492
- const jt = L > 1 || C || R, Ao = L > 1 && !dt && !qe && !$e;
2493
- return /* @__PURE__ */ g(E, { as: i, display: "block", "data-testid": "modules-list", children: [
2494
- /* @__PURE__ */ r(
2495
- Us,
1722
+ const c = setTimeout(() => gt(!0), Nr);
1723
+ return () => clearTimeout(c);
1724
+ }, [q]);
1725
+ const fe = cn !== void 0 && me !== Ie, xe = K || q && V.length === 0, he = V.length === 0 && !xe && !ee, Me = he && fe, $e = i === "h1" ? "h2" : "h3";
1726
+ B(() => {
1727
+ Me && N(E("filteredEmptyStateTitle"));
1728
+ }, [Me, E]);
1729
+ const pt = C > 1 || T || w, In = C > 1 && !xe && !he && !Me;
1730
+ return /* @__PURE__ */ m(M, { as: o, display: "block", "data-testid": "modules-list", children: [
1731
+ /* @__PURE__ */ s(
1732
+ Zn,
2496
1733
  {
2497
- modules: U,
2498
- hasMoreModules: jt || ze,
2499
- continuesBefore: R,
2500
- continuesAfter: C,
2501
- onModuleClick: Mo,
2502
- pagination: jt ? {
2503
- rangeStart: (M - 1) * J + 1,
2504
- totalCount: X.totalCount,
2505
- hasPreviousPage: R,
2506
- hasNextPage: C,
2507
- onPreviousPage: () => ot(M - 1, "keepFocus"),
2508
- onNextPage: () => ot(M + 1, "keepFocus"),
2509
- disabled: N
1734
+ modules: O,
1735
+ hasMoreModules: pt || fe,
1736
+ continuesBefore: w,
1737
+ continuesAfter: T,
1738
+ onModuleClick: gn,
1739
+ pagination: pt ? {
1740
+ rangeStart: (S - 1) * Y + 1,
1741
+ totalCount: j.totalCount,
1742
+ hasPreviousPage: w,
1743
+ hasNextPage: T,
1744
+ onPreviousPage: () => Ae(S - 1, "keepFocus"),
1745
+ onNextPage: () => Ae(S + 1, "keepFocus"),
1746
+ disabled: q
2510
1747
  } : void 0
2511
1748
  }
2512
1749
  ),
2513
- o && n ? /* @__PURE__ */ r(
2514
- Gs,
1750
+ r && n ? /* @__PURE__ */ s(
1751
+ zr,
2515
1752
  {
2516
1753
  counts: n,
2517
- itemsMode: ee,
2518
- loadedModules: U.length
1754
+ itemsMode: ce,
1755
+ loadedModules: O.length
2519
1756
  }
2520
1757
  ) : null,
2521
- /* @__PURE__ */ g(
2522
- I,
1758
+ /* @__PURE__ */ m(
1759
+ _,
2523
1760
  {
2524
1761
  justifyItems: "end",
2525
1762
  gap: "x-small",
@@ -2527,54 +1764,54 @@ function Hs({
2527
1764
  margin: "medium 0 0 0",
2528
1765
  "data-testid": "modules-controls",
2529
1766
  children: [
2530
- l ? /* @__PURE__ */ r(I.Item, { shouldGrow: te, children: /* @__PURE__ */ r(
2531
- ks,
1767
+ l ? /* @__PURE__ */ s(_.Item, { shouldGrow: Q, children: /* @__PURE__ */ s(
1768
+ qr,
2532
1769
  {
2533
1770
  actions: l,
2534
- onApplied: a,
2535
- aiDisclosure: c,
2536
- display: te ? "block" : "inline-block"
1771
+ onApplied: u,
1772
+ aiDisclosure: a,
1773
+ display: Q ? "block" : "inline-block"
2537
1774
  }
2538
1775
  ) }) : null,
2539
- So ? /* @__PURE__ */ r(I.Item, { shouldGrow: te, children: /* @__PURE__ */ r(
2540
- Qi,
1776
+ mn ? /* @__PURE__ */ s(_.Item, { shouldGrow: Q, children: /* @__PURE__ */ s(
1777
+ Ji,
2541
1778
  {
2542
- value: re,
2543
- onChange: y,
2544
- interaction: qe && !ze ? "disabled" : "enabled"
1779
+ value: me,
1780
+ onChange: st,
1781
+ interaction: he && !fe ? "disabled" : "enabled"
2545
1782
  }
2546
1783
  ) }) : null,
2547
- /* @__PURE__ */ r(I.Item, { shouldGrow: te, children: /* @__PURE__ */ r(
2548
- H,
1784
+ /* @__PURE__ */ s(_.Item, { shouldGrow: Q, children: /* @__PURE__ */ s(
1785
+ z,
2549
1786
  {
2550
- elementRef: (f) => {
2551
- ct.current = f;
1787
+ elementRef: (c) => {
1788
+ ze.current = c;
2552
1789
  },
2553
- display: te ? "block" : "inline-block",
2554
- onClick: vo,
2555
- interaction: ie.length === 0 || at ? "disabled" : "enabled",
1790
+ display: Q ? "block" : "inline-block",
1791
+ onClick: hn,
1792
+ interaction: V.length === 0 || qe ? "disabled" : "enabled",
2556
1793
  "data-testid": "expand-collapse-all",
2557
- children: T(Wt ? "collapseAllModules" : "expandAllModules")
1794
+ children: E(ct ? "collapseAllModules" : "expandAllModules")
2558
1795
  }
2559
1796
  ) })
2560
1797
  ]
2561
1798
  }
2562
1799
  ),
2563
- /* @__PURE__ */ g(E, { as: "div", margin: "medium 0 0 0", children: [
2564
- $ ? /* @__PURE__ */ r(
2565
- ae,
1800
+ /* @__PURE__ */ m(M, { as: "div", margin: "medium 0 0 0", children: [
1801
+ ee ? /* @__PURE__ */ s(
1802
+ X,
2566
1803
  {
2567
1804
  variant: "error",
2568
1805
  margin: "0 0 small 0",
2569
- liveRegion: We,
1806
+ liveRegion: Se,
2570
1807
  liveRegionPoliteness: "assertive",
2571
1808
  "data-testid": "modules-error",
2572
- children: T("modulesLoadErrorAlert", { message: $.message })
1809
+ children: E("modulesLoadErrorAlert", { message: ee.message })
2573
1810
  }
2574
1811
  ) : null,
2575
- dt ? /* @__PURE__ */ r(E, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ r(kt, { renderTitle: T("modulesLoadingSpinnerLabel") }) }) : null,
2576
- qe && !ze ? /* @__PURE__ */ g(
2577
- E,
1812
+ xe ? /* @__PURE__ */ s(M, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ s(et, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
1813
+ he && !fe ? /* @__PURE__ */ m(
1814
+ M,
2578
1815
  {
2579
1816
  as: "div",
2580
1817
  background: "primary",
@@ -2585,108 +1822,108 @@ function Hs({
2585
1822
  textAlign: "center",
2586
1823
  "data-testid": "modules-empty",
2587
1824
  children: [
2588
- /* @__PURE__ */ r(Ie, { level: mt, variant: "titleCardLarge", margin: "0 0 x-small 0", children: T("noModulesEmptyStateTitle") }),
2589
- /* @__PURE__ */ r(S, { color: "secondary", children: T("noModulesEmptyStateDescription") })
1825
+ /* @__PURE__ */ s(ue, { level: $e, variant: "titleCardLarge", margin: "0 0 x-small 0", children: E("noModulesEmptyStateTitle") }),
1826
+ /* @__PURE__ */ s(b, { color: "secondary", children: E("noModulesEmptyStateDescription") })
2590
1827
  ]
2591
1828
  }
2592
1829
  ) : null,
2593
- $e ? /* @__PURE__ */ g(
2594
- E,
1830
+ Me ? /* @__PURE__ */ m(
1831
+ M,
2595
1832
  {
2596
1833
  as: "div",
2597
1834
  background: "primary",
2598
1835
  borderRadius: "card.lg",
2599
1836
  borderWidth: "small",
2600
1837
  shadow: "resting",
2601
- padding: te ? "general.spaceLg general.spaceMd" : "general.space2xl general.spaceXl",
1838
+ padding: Q ? "general.spaceLg general.spaceMd" : "general.space2xl general.spaceXl",
2602
1839
  textAlign: "center",
2603
1840
  "data-testid": "modules-filtered-empty",
2604
1841
  children: [
2605
- /* @__PURE__ */ r(
2606
- Ie,
1842
+ /* @__PURE__ */ s(
1843
+ ue,
2607
1844
  {
2608
- level: mt,
2609
- variant: te ? "titleCardMini" : "titleCardLarge",
1845
+ level: $e,
1846
+ variant: Q ? "titleCardMini" : "titleCardLarge",
2610
1847
  margin: "0 0 general.spaceXs 0",
2611
- children: T("filteredEmptyStateTitle")
1848
+ children: E("filteredEmptyStateTitle")
2612
1849
  }
2613
1850
  ),
2614
- /* @__PURE__ */ r(S, { as: "div", color: "secondary", size: te ? "small" : void 0, children: T("filteredEmptyStateDescription") }),
2615
- /* @__PURE__ */ r(
2616
- H,
1851
+ /* @__PURE__ */ s(b, { as: "div", color: "secondary", size: Q ? "small" : void 0, children: E("filteredEmptyStateDescription") }),
1852
+ /* @__PURE__ */ s(
1853
+ z,
2617
1854
  {
2618
1855
  color: "primary",
2619
1856
  margin: "general.spaceLg 0 0 0",
2620
1857
  onClick: () => {
2621
- y(Fe), ye.current = "focusList";
1858
+ st(Ie), se.current = "focusList";
2622
1859
  },
2623
1860
  "data-testid": "clear-filters",
2624
- children: T("clearFilters")
1861
+ children: E("clearFilters")
2625
1862
  }
2626
1863
  )
2627
1864
  ]
2628
1865
  }
2629
1866
  ) : null,
2630
- /* @__PURE__ */ r(
1867
+ /* @__PURE__ */ s(
2631
1868
  "ul",
2632
1869
  {
2633
- ref: Ut,
2634
- style: { listStyle: "none", margin: 0, padding: 0, opacity: Po ? 0.5 : 1 },
2635
- "aria-busy": N,
1870
+ ref: at,
1871
+ style: { listStyle: "none", margin: 0, padding: 0, opacity: _n ? 0.5 : 1 },
1872
+ "aria-busy": q,
2636
1873
  tabIndex: -1,
2637
1874
  "data-testid": "modules-stack",
2638
- children: ie.map((f) => /* @__PURE__ */ r(
1875
+ children: V.map((c) => /* @__PURE__ */ s(
2639
1876
  "li",
2640
1877
  {
2641
- ref: (w) => {
2642
- w ? et.current.set(f.id, w) : et.current.delete(f.id);
1878
+ ref: (y) => {
1879
+ y ? ve.current.set(c.id, y) : ve.current.delete(c.id);
2643
1880
  },
2644
- children: /* @__PURE__ */ r(
2645
- ms,
1881
+ children: /* @__PURE__ */ s(
1882
+ fr,
2646
1883
  {
2647
- module: f,
2648
- expanded: it.includes(f.id),
2649
- onToggle: wo,
2650
- itemsState: (x == null ? void 0 : x.items.get(f.id)) ?? ue(f.id),
2651
- today: nt,
2652
- showDiagnostics: o,
2653
- headingLevel: mt,
2654
- breakpoints: z,
2655
- toggleRef: To
1884
+ module: c,
1885
+ expanded: ke.includes(c.id),
1886
+ onToggle: Mn,
1887
+ itemsState: (P == null ? void 0 : P.items.get(c.id)) ?? Pe(c.id),
1888
+ today: we,
1889
+ showDiagnostics: r,
1890
+ headingLevel: $e,
1891
+ breakpoints: $,
1892
+ toggleRef: pn
2656
1893
  }
2657
1894
  )
2658
1895
  },
2659
- f.id
1896
+ c.id
2660
1897
  ))
2661
1898
  }
2662
1899
  )
2663
1900
  ] }),
2664
- Ao ? /* @__PURE__ */ r(
2665
- zn,
1901
+ In ? /* @__PURE__ */ s(
1902
+ xt,
2666
1903
  {
2667
1904
  as: "nav",
2668
1905
  variant: "compact",
2669
1906
  withFirstAndLastButton: !0,
2670
1907
  margin: "small 0 0 0",
2671
- labelFirst: T("paginationFirstPage"),
2672
- labelPrev: T("paginationPreviousPage"),
2673
- labelNext: T("paginationNextPage"),
2674
- labelLast: T("paginationLastPage"),
2675
- screenReaderLabelPageButton: (f) => T("paginationPageLabel", { page: f }),
2676
- ellipsis: T("paginationEllipsis"),
2677
- totalPageNumber: L,
2678
- currentPage: M,
2679
- disabled: N,
2680
- onPageChange: (f) => ot(f),
1908
+ labelFirst: E("paginationFirstPage"),
1909
+ labelPrev: E("paginationPreviousPage"),
1910
+ labelNext: E("paginationNextPage"),
1911
+ labelLast: E("paginationLastPage"),
1912
+ screenReaderLabelPageButton: (c) => E("paginationPageLabel", { page: c }),
1913
+ ellipsis: E("paginationEllipsis"),
1914
+ totalPageNumber: C,
1915
+ currentPage: S,
1916
+ disabled: q,
1917
+ onPageChange: (c) => Ae(c),
2681
1918
  "data-testid": "modules-pagination"
2682
1919
  },
2683
- M
1920
+ S
2684
1921
  ) : null
2685
1922
  ] });
2686
1923
  }
2687
- const Ks = vr(
2688
- Hs
2689
- ), ve = [
1924
+ const $r = fi(
1925
+ xr
1926
+ ), de = [
2690
1927
  "assignment",
2691
1928
  "quiz",
2692
1929
  "discussion",
@@ -2695,7 +1932,7 @@ const Ks = vr(
2695
1932
  "external_url",
2696
1933
  "external_tool",
2697
1934
  "sub_header"
2698
- ], Ct = [
1935
+ ], Ke = [
2699
1936
  "not_started",
2700
1937
  "in_progress",
2701
1938
  "complete",
@@ -2703,30 +1940,30 @@ const Ks = vr(
2703
1940
  "incomplete",
2704
1941
  "missing_and_incomplete",
2705
1942
  "locked"
2706
- ], yo = [
1943
+ ], rn = [
2707
1944
  "must_view",
2708
1945
  "must_submit",
2709
1946
  "must_contribute",
2710
1947
  "must_mark_done",
2711
1948
  "min_score",
2712
1949
  "min_percentage"
2713
- ], js = ["assignment", "quiz", "discussion"], Ys = ["external_url", "external_tool"], Vs = ["assignment", "quiz", "discussion"], Qs = Date.UTC(2025, 0, 6), Xs = 864e5, Ee = "1", bo = (e) => new Date(Qs + e * Xs).toISOString(), Ke = [
1950
+ ], Ur = ["assignment", "quiz", "discussion"], Fr = ["external_url", "external_tool"], Br = ["assignment", "quiz", "discussion"], Gr = Date.UTC(2025, 0, 6), Wr = 864e5, ie = "1", sn = (e) => new Date(Gr + e * Wr).toISOString(), ye = [
2714
1951
  "min_score",
2715
1952
  "min_percentage"
2716
- ], Zs = yo.filter(
2717
- (e) => !Ke.includes(e)
2718
- ), Js = [
1953
+ ], Hr = rn.filter(
1954
+ (e) => !ye.includes(e)
1955
+ ), Yr = [
2719
1956
  "in_progress",
2720
1957
  "incomplete",
2721
1958
  "missing_and_incomplete"
2722
- ], el = (e, t, n, o) => {
2723
- const i = n ? yo : Zs, s = n && o ? Ke[t % Ke.length] : i[Math.floor(t / 3) % i.length];
2724
- return s === "min_score" ? { itemId: e, type: s, minScore: 10 } : s === "min_percentage" ? { itemId: e, type: s, minPercentage: 80 } : { itemId: e, type: s };
2725
- }, tl = (e, t, n, o) => e === "sub_header" ? !1 : n && o || t % 3 === 0, qt = (e) => Ct[(e - 1) % Ct.length], nl = (e, t) => !Vs.includes(e) || e === "discussion" && Math.floor(t / ve.length) % 2 === 1 ? null : 5 + t % 4 * 5, ol = (e, t, n, o) => t ? e === "missing" ? n != null || o % 2 === 0 : e === "missing_and_incomplete" ? o % 2 === 1 : !1 : !1, rl = (e, t, n, o) => {
1959
+ ], jr = (e, t, n, r) => {
1960
+ const o = n ? rn : Hr, i = n && r ? ye[t % ye.length] : o[Math.floor(t / 3) % o.length];
1961
+ return i === "min_score" ? { itemId: e, type: i, minScore: 10 } : i === "min_percentage" ? { itemId: e, type: i, minPercentage: 80 } : { itemId: e, type: i };
1962
+ }, Qr = (e, t, n, r) => e === "sub_header" ? !1 : n && r || t % 3 === 0, tt = (e) => Ke[(e - 1) % Ke.length], Kr = (e, t) => !Br.includes(e) || e === "discussion" && Math.floor(t / de.length) % 2 === 1 ? null : 5 + t % 4 * 5, Vr = (e, t, n, r) => t ? e === "missing" ? n != null || r % 2 === 0 : e === "missing_and_incomplete" ? r % 2 === 1 : !1 : !1, Zr = (e, t, n, r) => {
2726
1963
  if (e === "locked") return "locked";
2727
- if (ol(e, t, n, o)) return "missing";
1964
+ if (Vr(e, t, n, r)) return "missing";
2728
1965
  if (!n) return;
2729
- const i = t && Ke.includes(n.type);
1966
+ const o = t && ye.includes(n.type);
2730
1967
  switch (e) {
2731
1968
  case "not_started":
2732
1969
  case "missing":
@@ -2735,122 +1972,122 @@ const Ks = vr(
2735
1972
  return "complete";
2736
1973
  case "incomplete":
2737
1974
  case "missing_and_incomplete":
2738
- return i && o % 2 === 0 ? "incomplete" : "complete";
1975
+ return o && r % 2 === 0 ? "incomplete" : "complete";
2739
1976
  case "in_progress":
2740
- return i ? o % 3 === 0 ? "complete" : o % 3 === 1 ? "in_progress" : "not_started" : o % 2 === 0 ? "complete" : "not_started";
1977
+ return o ? r % 3 === 0 ? "complete" : r % 3 === 1 ? "in_progress" : "not_started" : r % 2 === 0 ? "complete" : "not_started";
2741
1978
  default:
2742
1979
  return e;
2743
1980
  }
2744
- }, il = (e) => e.status === "complete", sl = (e, t, n, o, i, s, l, a) => {
2745
- const c = String(e), u = ve[o % ve.length], d = u === "sub_header", m = js.includes(u) && (o % 4 === 0 || i === "missing");
1981
+ }, Xr = (e) => e.status === "complete", Jr = (e, t, n, r, o, i, l, u) => {
1982
+ const a = String(e), d = de[r % de.length], g = d === "sub_header", p = Ur.includes(d) && (r % 4 === 0 || o === "missing");
2746
1983
  return {
2747
1984
  id: n,
2748
- moduleId: c,
2749
- title: `${u} ${t + 1}`,
2750
- type: u,
1985
+ moduleId: a,
1986
+ title: `${d} ${t + 1}`,
1987
+ type: d,
2751
1988
  position: t + 1,
2752
1989
  indent: t % 5 === 4 ? 1 : 0,
2753
- published: a === "teacher" ? o % 7 !== 0 : !0,
2754
- url: d ? null : `/courses/${Ee}/modules/items/${n}`,
2755
- newTab: Ys.includes(u) && o % 2 === 0,
1990
+ published: u === "teacher" ? r % 7 !== 0 : !0,
1991
+ url: g ? null : `/courses/${ie}/modules/items/${n}`,
1992
+ newTab: Fr.includes(d) && r % 2 === 0,
2756
1993
  completionRequirement: l,
2757
- dueAt: m ? bo(o % 90) : null,
2758
- status: i,
2759
- pointsPossible: s,
2760
- extensions: vt(
1994
+ dueAt: p ? sn(r % 90) : null,
1995
+ status: o,
1996
+ pointsPossible: i,
1997
+ extensions: Ve(
2761
1998
  void 0,
2762
- o % 37 === 0 ? 5 + o % 4 * 10 : null
1999
+ r % 37 === 0 ? 5 + r % 4 * 10 : null
2763
2000
  )
2764
2001
  };
2765
- }, ll = (e, t, n, o) => {
2766
- const i = qt(e), s = Js.includes(i), l = [];
2767
- let a = 0;
2768
- for (let c = 0; c < t; c += 1) {
2769
- const u = n + c, d = ve[u % ve.length], m = nl(d, u), p = m !== null, h = p ? a++ : c, _ = String(e * 1e3 + c + 1), A = tl(d, u, p, s) ? el(_, u, p, s) : null, v = rl(i, p, A, h);
2770
- l.push(sl(e, c, _, u, v, m, A, o));
2002
+ }, es = (e, t, n, r) => {
2003
+ const o = tt(e), i = Yr.includes(o), l = [];
2004
+ let u = 0;
2005
+ for (let a = 0; a < t; a += 1) {
2006
+ const d = n + a, g = de[d % de.length], p = Kr(g, d), h = p !== null, f = h ? u++ : a, I = String(e * 1e3 + a + 1), v = Qr(g, d, h, i) ? jr(I, d, h, i) : null, L = Zr(o, h, v, f);
2007
+ l.push(Jr(e, a, I, d, L, p, v, r));
2771
2008
  }
2772
2009
  return l;
2773
- }, al = (e, t, n, o) => {
2774
- const i = qt(e);
2775
- if (i === "locked" || i === "not_started") return i;
2010
+ }, ts = (e, t, n, r) => {
2011
+ const o = tt(e);
2012
+ if (o === "locked" || o === "not_started") return o;
2776
2013
  if (t.length === 0) return "not_started";
2777
- if (!t.some((s) => s.pointsPossible != null) || i === "missing" && n === 0 || i === "incomplete" && o === 0) return "in_progress";
2778
- if (i === "missing_and_incomplete") {
2779
- if (n === 0 && o === 0) return "in_progress";
2014
+ if (!t.some((i) => i.pointsPossible != null) || o === "missing" && n === 0 || o === "incomplete" && r === 0) return "in_progress";
2015
+ if (o === "missing_and_incomplete") {
2016
+ if (n === 0 && r === 0) return "in_progress";
2780
2017
  if (n === 0) return "incomplete";
2781
- if (o === 0) return "missing";
2018
+ if (r === 0) return "missing";
2782
2019
  }
2783
- return i;
2784
- }, cl = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, ul = (e, t, n) => {
2785
- const o = t.filter((u) => u.completionRequirement), i = n ?? o.length, s = Math.min(o.filter(il).length, i), l = t.filter((u) => u.status === "missing").length, a = t.filter((u) => u.status === "incomplete").length;
2020
+ return o;
2021
+ }, ns = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, is = (e, t, n) => {
2022
+ const r = t.filter((d) => d.completionRequirement), o = n ?? r.length, i = Math.min(r.filter(Xr).length, o), l = t.filter((d) => d.status === "missing").length, u = t.filter((d) => d.status === "incomplete").length;
2786
2023
  return {
2787
- status: al(e, t, l, a),
2788
- requirementsMet: s,
2789
- requirementCount: i,
2790
- percentComplete: i > 0 ? Math.round(s / i * 100) : 0,
2791
- nextDueAt: cl(t),
2024
+ status: ts(e, t, l, u),
2025
+ requirementsMet: i,
2026
+ requirementCount: o,
2027
+ percentComplete: o > 0 ? Math.round(i / o * 100) : 0,
2028
+ nextDueAt: ns(t),
2792
2029
  missingCount: l,
2793
- incompleteCount: a
2030
+ incompleteCount: u
2794
2031
  };
2795
- }, dl = (e, t, n) => {
2796
- const o = qt(e), i = e % 2 !== 0 && o !== "incomplete" && o !== "missing_and_incomplete" ? 1 : null;
2032
+ }, rs = (e, t, n) => {
2033
+ const r = tt(e), o = e % 2 !== 0 && r !== "incomplete" && r !== "missing_and_incomplete" ? 1 : null;
2797
2034
  return {
2798
2035
  id: String(e),
2799
2036
  name: `Module ${e}`,
2800
2037
  position: e,
2801
2038
  published: n === "teacher" ? e % 4 !== 0 : !0,
2802
2039
  itemCount: t.length,
2803
- unlockAt: e % 5 === 0 ? bo(e) : null,
2040
+ unlockAt: e % 5 === 0 ? sn(e) : null,
2804
2041
  prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
2805
- requirementCount: i,
2042
+ requirementCount: o,
2806
2043
  requireSequentialProgress: e % 6 === 0,
2807
2044
  completionRequirements: t.flatMap(
2808
- (s) => s.completionRequirement ? [s.completionRequirement] : []
2045
+ (i) => i.completionRequirement ? [i.completionRequirement] : []
2809
2046
  ),
2810
- progress: ul(e, t, i)
2047
+ progress: is(e, t, o)
2811
2048
  };
2812
2049
  };
2813
- function ml(e) {
2050
+ function ss(e) {
2814
2051
  return {
2815
2052
  courseId: e.courseId,
2816
2053
  modules: e.modules.map(({ progress: t, ...n }) => n),
2817
2054
  itemsByModuleId: Object.fromEntries(
2818
2055
  Object.entries(e.itemsByModuleId).map(([t, n]) => [
2819
2056
  t,
2820
- n.map(({ status: o, ...i }) => i)
2057
+ n.map(({ status: r, ...o }) => o)
2821
2058
  ])
2822
2059
  )
2823
2060
  };
2824
2061
  }
2825
- function Ze(e, t = {}) {
2826
- const n = t.view ?? "student", o = t.courseId ?? Ee, i = [], s = {};
2062
+ function be(e, t = {}) {
2063
+ const n = t.view ?? "student", r = t.courseId ?? ie, o = [], i = {};
2827
2064
  let l = 0;
2828
- e.forEach((c, u) => {
2829
- const d = u + 1, m = ll(d, c, l, n);
2830
- l += c, i.push(dl(d, m, n)), s[String(d)] = m;
2065
+ e.forEach((a, d) => {
2066
+ const g = d + 1, p = es(g, a, l, n);
2067
+ l += a, o.push(rs(g, p, n)), i[String(g)] = p;
2831
2068
  });
2832
- const a = { courseId: o, modules: i, itemsByModuleId: s };
2833
- return n === "teacher" ? ml(a) : a;
2069
+ const u = { courseId: r, modules: o, itemsByModuleId: i };
2070
+ return n === "teacher" ? ss(u) : u;
2834
2071
  }
2835
- const Ce = (e) => `/courses/${Ee}/modules/items/${e}`, wn = "2099-08-31T06:59:00Z", gl = "2020-01-06T07:00:00Z", pl = Ct.length, fl = 8, hl = 120, Il = 25, _l = 250, Pn = 8;
2836
- function oa() {
2837
- return Ze(Array.from({ length: pl }, () => fl));
2072
+ const ae = (e) => `/courses/${ie}/modules/items/${e}`, Rt = "2099-08-31T06:59:00Z", os = "2020-01-06T07:00:00Z", ls = Ke.length, as = 8, us = 120, ds = 25, cs = 250, kt = 8;
2073
+ function Qs() {
2074
+ return be(Array.from({ length: ls }, () => as));
2838
2075
  }
2839
- function ra() {
2840
- return Ze(Array.from({ length: hl }, () => Il));
2076
+ function Ks() {
2077
+ return be(Array.from({ length: us }, () => ds));
2841
2078
  }
2842
- function ia() {
2843
- return Ze([
2844
- Pn,
2845
- _l,
2846
- Pn
2079
+ function Vs() {
2080
+ return be([
2081
+ kt,
2082
+ cs,
2083
+ kt
2847
2084
  ]);
2848
2085
  }
2849
- function sa() {
2850
- const e = (s, l, a) => ({
2851
- id: String(s),
2086
+ function Zs() {
2087
+ const e = (i, l, u) => ({
2088
+ id: String(i),
2852
2089
  name: l,
2853
- position: s,
2090
+ position: i,
2854
2091
  published: !0,
2855
2092
  itemCount: 0,
2856
2093
  prerequisiteModules: [],
@@ -2863,29 +2100,29 @@ function sa() {
2863
2100
  missingCount: 0,
2864
2101
  incompleteCount: 0
2865
2102
  },
2866
- ...a
2867
- }), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, o = { id: "103", name: "Trigonometry_Unit_One_Foundations_Of_Indirect_Measurement" }, i = [
2868
- e(1, "Locked by a future date", { unlockAt: wn }),
2103
+ ...u
2104
+ }), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, r = { id: "103", name: "Trigonometry_Unit_One_Foundations_Of_Indirect_Measurement" }, o = [
2105
+ e(1, "Locked by a future date", { unlockAt: Rt }),
2869
2106
  e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
2870
2107
  e(3, "Locked by several prerequisites", {
2871
2108
  prerequisiteModules: [t, n]
2872
2109
  }),
2873
2110
  e(4, "Locked by a date and a prerequisite", {
2874
- unlockAt: wn,
2875
- prerequisiteModules: [o]
2111
+ unlockAt: Rt,
2112
+ prerequisiteModules: [r]
2876
2113
  }),
2877
- e(5, "Locked, and the unlock date has passed", { unlockAt: gl })
2114
+ e(5, "Locked, and the unlock date has passed", { unlockAt: os })
2878
2115
  ];
2879
2116
  return {
2880
- courseId: Ee,
2881
- modules: i,
2882
- itemsByModuleId: Object.fromEntries(i.map((s) => [s.id, []]))
2117
+ courseId: ie,
2118
+ modules: o,
2119
+ itemsByModuleId: Object.fromEntries(o.map((i) => [i.id, []]))
2883
2120
  };
2884
2121
  }
2885
- function la() {
2886
- return Ze([]);
2122
+ function Xs() {
2123
+ return be([]);
2887
2124
  }
2888
- function aa() {
2125
+ function Js() {
2889
2126
  const t = [
2890
2127
  {
2891
2128
  title: "Every fact: type, due date, points, requirement",
@@ -2914,7 +2151,7 @@ function aa() {
2914
2151
  title: "Career item carrying an estimated duration",
2915
2152
  type: "external_tool",
2916
2153
  completionRequirement: { itemId: "5", type: "must_view" },
2917
- extensions: vt(void 0, 45)
2154
+ extensions: Ve(void 0, 45)
2918
2155
  },
2919
2156
  { title: "A file, ungradeable, so no points at all", type: "file" },
2920
2157
  { title: "External link, opens in a new tab", type: "external_url", newTab: !0 },
@@ -2930,19 +2167,19 @@ function aa() {
2930
2167
  { title: "Indented three levels", type: "quiz", indent: 3 },
2931
2168
  { title: "Indented four levels", type: "discussion", indent: 4 },
2932
2169
  { title: "Indented five levels, the deepest Canvas allows", type: "page", indent: 5 }
2933
- ].map((n, o) => ({
2934
- id: String(o + 1),
2170
+ ].map((n, r) => ({
2171
+ id: String(r + 1),
2935
2172
  moduleId: "1",
2936
- position: o + 1,
2173
+ position: r + 1,
2937
2174
  indent: 0,
2938
2175
  published: !0,
2939
2176
  newTab: !1,
2940
- url: Ce(o + 1),
2177
+ url: ae(r + 1),
2941
2178
  status: "not_started",
2942
2179
  ...n
2943
2180
  }));
2944
2181
  return {
2945
- courseId: Ee,
2182
+ courseId: ie,
2946
2183
  modules: [
2947
2184
  {
2948
2185
  id: "1",
@@ -2957,13 +2194,13 @@ function aa() {
2957
2194
  itemsByModuleId: { 1: t }
2958
2195
  };
2959
2196
  }
2960
- function ca() {
2197
+ function eo() {
2961
2198
  const t = [
2962
- { title: "Reading: limits from the left and the right", type: "page", url: Ce(1) },
2199
+ { title: "Reading: limits from the left and the right", type: "page", url: ae(1) },
2963
2200
  {
2964
2201
  title: "Desmos: interactive limit explorer",
2965
2202
  type: "external_url",
2966
- url: Ce(2),
2203
+ url: ae(2),
2967
2204
  newTab: !0
2968
2205
  },
2969
2206
  { title: "Practice", type: "sub_header", url: null },
@@ -2971,13 +2208,13 @@ function ca() {
2971
2208
  {
2972
2209
  title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
2973
2210
  type: "assignment",
2974
- url: Ce(5)
2211
+ url: ae(5)
2975
2212
  },
2976
- { title: "Unit test", type: "quiz", url: Ce(6), status: "locked" }
2977
- ].map((n, o) => ({
2978
- id: String(o + 1),
2213
+ { title: "Unit test", type: "quiz", url: ae(6), status: "locked" }
2214
+ ].map((n, r) => ({
2215
+ id: String(r + 1),
2979
2216
  moduleId: "1",
2980
- position: o + 1,
2217
+ position: r + 1,
2981
2218
  indent: 0,
2982
2219
  published: !0,
2983
2220
  newTab: !1,
@@ -2985,7 +2222,7 @@ function ca() {
2985
2222
  ...n
2986
2223
  }));
2987
2224
  return {
2988
- courseId: Ee,
2225
+ courseId: ie,
2989
2226
  modules: [
2990
2227
  {
2991
2228
  id: "1",
@@ -3001,126 +2238,126 @@ function ca() {
3001
2238
  };
3002
2239
  }
3003
2240
  export {
3004
- Zl as ACTION_ORDER_LTI_FLOOR,
3005
- Fe as ALL_FILTER,
3006
- ln as ActionEntrySchema,
3007
- ma as CompletionRequirementSchema,
3008
- ga as CompletionRequirementTypeSchema,
3009
- pa as DEFAULT_INLINE_THRESHOLD,
3010
- fa as DEFAULT_ITEM_CONCURRENCY,
3011
- ha as DEFAULT_ITEM_PAGE_SIZE,
3012
- Ia as DEFAULT_LOCALE,
3013
- _a as DEFAULT_MOBILE_PAGE_SIZE,
3014
- Ea as DEFAULT_PAGE_SIZE,
3015
- ya as DEFAULT_RETAIN_COLLAPSED_LIMIT,
3016
- ba as DEFAULT_STALE_TIME_MS,
3017
- Sa as DUE_THIS_WEEK_DAYS,
3018
- Ma as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
3019
- Qo as EXT_ORGANIZE_ADDED_ITEM_COUNT,
3020
- Xo as EXT_ORGANIZE_NEW_MODULE,
3021
- Zo as EXT_ORGANIZE_NEW_PLACEMENT,
3022
- Vo as EXT_SUPPRESS_ITEM_NUMBERING,
3023
- Ee as FIXTURE_COURSE_ID,
3024
- No as FilterClauseSchema,
3025
- li as FilterEntrySchema,
3026
- Qi as FilterSelect,
3027
- Jr as GET_MODULES,
3028
- ei as GET_MODULE_ITEMS,
3029
- xo as INLINE_ITEM_LIMIT,
3030
- Ro as INLINE_QUERY_NODE_BUDGET,
3031
- Ta as InMemoryCourseMismatchError,
3032
- ki as ItemDueSoonPill,
3033
- ii as ItemTypeEntrySchema,
3034
- bt as MAX_DIRECTION_CHARS,
3035
- si as MetaFieldEntrySchema,
3036
- ms as ModuleCard,
3037
- Ri as ModuleDueSoonPill,
3038
- ji as ModuleItemRow,
3039
- Ca as ModuleItemSchema,
3040
- Li as ModuleItemStatusPill,
3041
- va as ModuleItemStatusSchema,
3042
- wa as ModuleItemTypeSchema,
3043
- ko as ModuleItemsPageSchema,
3044
- Pa as ModuleProgressSchema,
3045
- Aa as ModuleSchema,
3046
- Ai as ModuleStatusPill,
3047
- La as ModuleStatusSchema,
3048
- Ql as ModulesAnalyticsProvider,
3049
- er as ModulesConfigProvider,
3050
- ui as ModulesConfigSchema,
3051
- Jo as ModulesI18nProvider,
3052
- Ks as ModulesList,
3053
- Ra as ModulesPageInfoSchema,
3054
- Oo as ModulesPageSchema,
3055
- Us as ModulesProgressBar,
3056
- di as NEW_PLACEMENT_FIELD,
3057
- Io as ORGANIZE_CONTENT_TYPES,
3058
- na as ORGANIZE_MODES,
3059
- vs as ORGANIZE_SLOW_AFTER_MS,
3060
- hs as OrganizeForm,
3061
- ks as OrganizeModulesButton,
3062
- Rs as OrganizeModulesModal,
3063
- _o as PROPOSAL_PREVIEW_COURSE_ID,
3064
- ka as PageInfoSchema,
3065
- Un as PartialCanvasResponseError,
3066
- Oa as PrerequisiteModuleSchema,
3067
- Cs as ProposalPreview,
3068
- Pe as RegistryEntrySchema,
3069
- xa as TYPE_FIELD,
3070
- Da as baseFilters,
3071
- Uo as baseModulesConfig,
3072
- Ze as buildFixture,
3073
- la as courseEmpty,
3074
- ia as courseFatModule,
3075
- ca as courseItemLinks,
3076
- aa as courseItemRowVariants,
3077
- ra as courseLarge,
3078
- sa as courseLockReasons,
3079
- oa as courseSmall,
3080
- oi as createActionContext,
3081
- Xl as createCanvasGraphqlAdapter,
3082
- tr as createInMemoryAdapter,
3083
- Na as createTranslate,
3084
- za as defaultFormatters,
3085
- gs as defaultOrganizeInput,
3086
- qa as defaultTranslate,
3087
- $a as filterClauseOf,
3088
- $o as getAddedItemCount,
3089
- Fa as getEstimatedDurationMinutes,
3090
- Tn as hasOrganizeInputErrors,
3091
- Ua as hideUnservableFilters,
3092
- Ba as invalidateCourse,
3093
- Do as invalidateModuleItems,
3094
- Yt as invalidateModuleList,
3095
- Fo as isNewPlacement,
3096
- Ga as isPredicateServed,
3097
- qo as isProposedNewModule,
3098
- me as mergeRegistry,
3099
- Pi as moduleItemStatusLabel,
3100
- Wa as moduleItemsPrefix,
3101
- io as moduleStatusLabel,
3102
- Ha as modulesKeys,
3103
- Ka as modulesListPrefix,
3104
- pi as organizePreviewConfig,
3105
- ea as partialModulesConfig,
3106
- Ss as proposalToFixture,
3107
- ge as registrySchema,
3108
- eo as resolveModulesConfig,
3109
- ja as servesClause,
3110
- Ho as suppressesItemNumbering,
3111
- Ya as unservableFilters,
3112
- ta as useActionContext,
3113
- Va as useFieldVisible,
3114
- Ae as useFormatters,
3115
- Qa as useModules,
3116
- Ve as useModulesAnalytics,
3117
- _e as useModulesConfig,
3118
- P as useModulesI18n,
3119
- nr as useModulesPageData,
3120
- Ls as useOrganizeModules,
3121
- Mn as validateOrganizeInput,
3122
- Jl as visibleActions,
3123
- je as visibleEntries,
3124
- Xa as visibleEntry,
3125
- vt as withEstimatedDurationMinutes
2241
+ Gs as ACTION_ORDER_LTI_FLOOR,
2242
+ Ie as ALL_FILTER,
2243
+ io as ActionEntrySchema,
2244
+ ro as CompletionRequirementSchema,
2245
+ so as CompletionRequirementTypeSchema,
2246
+ oo as DEFAULT_INLINE_THRESHOLD,
2247
+ lo as DEFAULT_ITEM_CONCURRENCY,
2248
+ ao as DEFAULT_ITEM_PAGE_SIZE,
2249
+ uo as DEFAULT_LOCALE,
2250
+ co as DEFAULT_MOBILE_PAGE_SIZE,
2251
+ mo as DEFAULT_PAGE_SIZE,
2252
+ go as DEFAULT_RETAIN_COLLAPSED_LIMIT,
2253
+ po as DEFAULT_STALE_TIME_MS,
2254
+ fo as DUE_THIS_WEEK_DAYS,
2255
+ ho as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
2256
+ Wn as EXT_ORGANIZE_ADDED_ITEM_COUNT,
2257
+ Hn as EXT_ORGANIZE_NEW_MODULE,
2258
+ Yn as EXT_ORGANIZE_NEW_PLACEMENT,
2259
+ Gn as EXT_SUPPRESS_ITEM_NUMBERING,
2260
+ ie as FIXTURE_COURSE_ID,
2261
+ Mo as FilterClauseSchema,
2262
+ _o as FilterEntrySchema,
2263
+ Ji as FilterSelect,
2264
+ Fi as GET_MODULES,
2265
+ Gi as GET_MODULE_ITEMS,
2266
+ bn as INLINE_ITEM_LIMIT,
2267
+ Sn as INLINE_QUERY_NODE_BUDGET,
2268
+ Io as InMemoryCourseMismatchError,
2269
+ Eo as ItemDueSoonPill,
2270
+ So as ItemTypeEntrySchema,
2271
+ Ye as MAX_DIRECTION_CHARS,
2272
+ yo as MetaFieldEntrySchema,
2273
+ fr as ModuleCard,
2274
+ $n as ModuleDueSoonPill,
2275
+ Bn as ModuleItemRow,
2276
+ To as ModuleItemSchema,
2277
+ bo as ModuleItemStatusPill,
2278
+ Po as ModuleItemStatusSchema,
2279
+ Co as ModuleItemTypeSchema,
2280
+ yn as ModuleItemsPageSchema,
2281
+ vo as ModuleProgressSchema,
2282
+ Lo as ModuleSchema,
2283
+ qn as ModuleStatusPill,
2284
+ wo as ModuleStatusSchema,
2285
+ Ao as ModulesAnalyticsProvider,
2286
+ Qn as ModulesConfigProvider,
2287
+ vn as ModulesConfigSchema,
2288
+ jn as ModulesI18nProvider,
2289
+ $r as ModulesList,
2290
+ Ro as ModulesPageInfoSchema,
2291
+ Tn as ModulesPageSchema,
2292
+ Zn as ModulesProgressBar,
2293
+ ji as NEW_PLACEMENT_FIELD,
2294
+ en as ORGANIZE_CONTENT_TYPES,
2295
+ js as ORGANIZE_MODES,
2296
+ wr as ORGANIZE_SLOW_AFTER_MS,
2297
+ Ir as OrganizeForm,
2298
+ qr as OrganizeModulesButton,
2299
+ Dr as OrganizeModulesModal,
2300
+ tn as PROPOSAL_PREVIEW_COURSE_ID,
2301
+ ko as PageInfoSchema,
2302
+ Ut as PartialCanvasResponseError,
2303
+ Oo as PrerequisiteModuleSchema,
2304
+ Lr as ProposalPreview,
2305
+ Do as RegistryEntrySchema,
2306
+ qo as TYPE_FIELD,
2307
+ zo as baseFilters,
2308
+ Rn as baseModulesConfig,
2309
+ be as buildFixture,
2310
+ Xs as courseEmpty,
2311
+ Vs as courseFatModule,
2312
+ eo as courseItemLinks,
2313
+ Js as courseItemRowVariants,
2314
+ Ks as courseLarge,
2315
+ Zs as courseLockReasons,
2316
+ Qs as courseSmall,
2317
+ Yi as createActionContext,
2318
+ Bs as createCanvasGraphqlAdapter,
2319
+ Kn as createInMemoryAdapter,
2320
+ No as createTranslate,
2321
+ xo as defaultFormatters,
2322
+ hr as defaultOrganizeInput,
2323
+ $o as defaultTranslate,
2324
+ Uo as filterClauseOf,
2325
+ wn as getAddedItemCount,
2326
+ Fo as getEstimatedDurationMinutes,
2327
+ Lt as hasOrganizeInputErrors,
2328
+ Bo as hideUnservableFilters,
2329
+ Go as invalidateCourse,
2330
+ Pn as invalidateModuleItems,
2331
+ ft as invalidateModuleList,
2332
+ An as isNewPlacement,
2333
+ Wo as isPredicateServed,
2334
+ Ln as isProposedNewModule,
2335
+ ne as mergeRegistry,
2336
+ Ho as moduleItemStatusLabel,
2337
+ Yo as moduleItemsPrefix,
2338
+ jo as moduleStatusLabel,
2339
+ Qo as modulesKeys,
2340
+ Ko as modulesListPrefix,
2341
+ Vi as organizePreviewConfig,
2342
+ Hs as partialModulesConfig,
2343
+ Pr as proposalToFixture,
2344
+ Vo as registrySchema,
2345
+ Xt as resolveModulesConfig,
2346
+ Zo as servesClause,
2347
+ Nn as suppressesItemNumbering,
2348
+ Xo as unservableFilters,
2349
+ Ys as useActionContext,
2350
+ Jo as useFieldVisible,
2351
+ Je as useFormatters,
2352
+ el as useModules,
2353
+ Xe as useModulesAnalytics,
2354
+ Te as useModulesConfig,
2355
+ x as useModulesI18n,
2356
+ Vn as useModulesPageData,
2357
+ Or as useOrganizeModules,
2358
+ vt as validateOrganizeInput,
2359
+ Ws as visibleActions,
2360
+ Ze as visibleEntries,
2361
+ tl as visibleEntry,
2362
+ Ve as withEstimatedDurationMinutes
3126
2363
  };