@instructure/platform-modules 1.16.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/adapters/canvasGraphql/index.d.ts.map +1 -1
  2. package/dist/adapters/canvasGraphql/normalize.d.ts +5 -0
  3. package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
  4. package/dist/adapters/canvasGraphql/queries.d.ts +5 -0
  5. package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
  6. package/dist/adapters/inMemory.d.ts.map +1 -1
  7. package/dist/adapters/types.d.ts +6 -0
  8. package/dist/adapters/types.d.ts.map +1 -1
  9. package/dist/cache/keys.d.ts +3 -0
  10. package/dist/cache/keys.d.ts.map +1 -1
  11. package/dist/chunks/ModulesProgressBar-BFKPmBau.js +2727 -0
  12. package/dist/components/HighlightedText.d.ts +13 -0
  13. package/dist/components/HighlightedText.d.ts.map +1 -0
  14. package/dist/components/ModuleCard.d.ts +1 -0
  15. package/dist/components/ModuleCard.d.ts.map +1 -1
  16. package/dist/components/ModuleItemRow.d.ts +1 -0
  17. package/dist/components/ModuleItemRow.d.ts.map +1 -1
  18. package/dist/components/ModulesList.d.ts.map +1 -1
  19. package/dist/components/ModulesList.stories.d.ts +5 -0
  20. package/dist/components/ModulesList.stories.d.ts.map +1 -1
  21. package/dist/components/ModulesProgressBar.d.ts +3 -2
  22. package/dist/components/ModulesProgressBar.d.ts.map +1 -1
  23. package/dist/edit.js +9 -9
  24. package/dist/hooks/constants.d.ts +2 -0
  25. package/dist/hooks/constants.d.ts.map +1 -1
  26. package/dist/hooks/queryOptions.d.ts +2 -0
  27. package/dist/hooks/queryOptions.d.ts.map +1 -1
  28. package/dist/hooks/useItemsMode.d.ts +1 -0
  29. package/dist/hooks/useItemsMode.d.ts.map +1 -1
  30. package/dist/hooks/useModules.d.ts +1 -0
  31. package/dist/hooks/useModules.d.ts.map +1 -1
  32. package/dist/hooks/useModulesPageData.d.ts +11 -0
  33. package/dist/hooks/useModulesPageData.d.ts.map +1 -1
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1212 -1104
  37. package/dist/types/domain.d.ts +5 -0
  38. package/dist/types/domain.d.ts.map +1 -1
  39. package/dist/types/filterClause.d.ts +1 -0
  40. package/dist/types/filterClause.d.ts.map +1 -1
  41. package/dist/types/index.d.ts +1 -1
  42. package/dist/types/index.d.ts.map +1 -1
  43. package/dist/types/schemas.d.ts +2 -1
  44. package/dist/types/schemas.d.ts.map +1 -1
  45. package/locales/en.json +6 -0
  46. package/package.json +1 -1
  47. package/dist/chunks/ModulesProgressBar-B1oRo549.js +0 -2548
package/dist/index.js CHANGED
@@ -1,49 +1,50 @@
1
- import { w as Je, I as En, M as Sn, a as yn, b as Tn, i as ft, c as bn, v as et, h as Pn, o as Ge, m as ie, d as Cn, e as vn, g as Ln, f as wn, j as An, u as N, k as Ce, D as Rn, l as Se, n as kn, p as tt, q as nt, r as On, s as qn, t as Dn, x as zn, y as Nn, z as Ot, A as xn, B as qt, C as Dt, E as $n, F as Un, G as Fn, H as Bn, J as Gn, K as Wn, L as Hn, N as Yn, O as jn, P as Qn, Q as Kn, R as Vn, S as Zn, T as ye } from "./chunks/ModulesProgressBar-B1oRo549.js";
2
- import { a9 as ro, U as so, V as oo, ap as lo, aq as ao, ar as uo, aG as co, as as mo, at as go, au as po, av as fo, ac as ho, a5 as Mo, W as _o, ae as Io, a8 as Eo, aB as So, ah as yo, ai as To, Y as bo, aD as Po, Z as Co, _ as vo, $ as Lo, a0 as wo, a2 as Ao, a7 as Ro, a1 as ko, a3 as Oo, a4 as qo, aj as Do, al as zo, aa as No, aF as xo, ab as $o, aH as Uo, ad as Fo, a6 as Bo, af as Go, ax as Wo, ag as Ho, aC as Yo, ay as jo, aE as Qo, az as Ko, aA as Vo, ak as Zo, X as Xo, am as Jo, an as el, aw as tl, ao as nl } from "./chunks/ModulesProgressBar-B1oRo549.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 H } 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 F, useMemo as B, useId as ni, memo as ii, useRef as R, useEffect as G, useState as W } from "react";
10
- import { SimpleSelect as _t } from "@instructure/ui-simple-select/v11_7";
1
+ import { w as ot, I as kn, M as On, a as Dn, b as qn, i as Ct, c as zn, v as lt, h as Nn, o as Ve, m as oe, d as xn, e as $n, g as Fn, f as Un, j as Bn, u as F, k as ke, D as Gn, l as ve, n as Hn, p as at, q as ut, r as Wn, L as Yn, H as jn, s as Qn, t as Kn, x as Vn, y as Zn, z as Ht, A as Xn, B as Wt, C as Yt, E as Jn, F as ei, G as ti, J as ni, K as ii, N as ri, O as si, P as oi, Q as li, R as ai, S as ui, T as di, U as ci, V as we } from "./chunks/ModulesProgressBar-BFKPmBau.js";
2
+ import { ab as Co, W as vo, X as wo, ar as Lo, as as Ao, at as Ro, aI as ko, au as Oo, av as Do, aw as qo, ax as zo, ae as No, a7 as xo, Y as $o, ag as Fo, aa as Uo, aD as Bo, aj as Go, ak as Ho, _ as Wo, aF as Yo, $ as jo, a0 as Qo, a1 as Ko, a2 as Vo, a4 as Zo, a9 as Xo, a3 as Jo, a5 as el, a6 as tl, al as nl, an as il, ac as rl, aH as sl, ad as ol, aJ as ll, af as al, a8 as ul, ah as dl, az as cl, ai as ml, aE as gl, aA as pl, aG as fl, aB as hl, aC as Il, am as Ml, Z as _l, ao as El, ap as Sl, ay as Tl, aq as yl } from "./chunks/ModulesProgressBar-BFKPmBau.js";
3
+ import { canvasFetch as vt } from "@instructure/platform-canvas-fetch";
4
+ import { z as wt } from "zod";
5
+ import { gql as ne } from "graphql-tag";
6
+ import { jsx as s, jsxs as g, Fragment as j } from "react/jsx-runtime";
7
+ import { Pill as mi } from "@instructure/ui-pill/v11_7";
8
+ import { useQueryClient as gi, QueryClient as pi, QueryClientProvider as fi } from "@tanstack/react-query";
9
+ import { useCallback as x, useMemo as W, useId as hi, memo as Ii, useRef as L, useEffect as $, useState as Y, useLayoutEffect as Mi } from "react";
10
+ import { SimpleSelect as Lt } from "@instructure/ui-simple-select/v11_7";
11
11
  import { Text as b } from "@instructure/ui-text/v11_7";
12
- import { IconArrowOpenUpLine as ri, IconArrowOpenDownLine as si, IconClockLine as zt, IconAiColoredSolid as oi, IconAiSolid as li } from "@instructure/ui-icons";
13
- import { politeAnnounce as z, getLiveRegion as be, TruncateWithTooltip as ai } from "@instructure/platform-instui-bindings";
14
- import { InstUISettingsProvider as ui } from "@instructure/emotion";
15
- import { Alert as X } from "@instructure/ui-alerts/v11_7";
16
- import { ScreenReaderContent as di } from "@instructure/ui-a11y-content";
17
- import { IconButton as ci, CloseButton as mi, Button as D } from "@instructure/ui-buttons/v11_7";
18
- import { Flex as M } from "@instructure/ui-flex/v11_7";
19
- import { Heading as me } from "@instructure/ui-heading/v11_7";
20
- import { Link as gi } from "@instructure/ui-link/v11_7";
21
- import { List as Ye, ListItem as je } from "@instructure/ui-list/v11_7";
22
- import { Pagination as Nt } from "@instructure/ui-pagination/v11_7";
23
- import { ProgressBar as pi } from "@instructure/ui-progress/v11_7";
24
- import { Spinner as it } from "@instructure/ui-spinner/v11_7";
25
- import { Tooltip as fi } from "@instructure/ui-tooltip/v11_7";
12
+ import { IconArrowOpenUpLine as _i, IconArrowOpenDownLine as Ei, IconClockLine as jt, IconAiColoredSolid as Si, IconAiSolid as Ti, XInstUIIcon as yi, SearchInstUIIcon as bi } from "@instructure/ui-icons";
13
+ import { politeAnnounce as O, getLiveRegion as Ae, TruncateWithTooltip as Pi } from "@instructure/platform-instui-bindings";
14
+ import { InstUISettingsProvider as Ci } from "@instructure/emotion";
15
+ import { Alert as te } from "@instructure/ui-alerts/v11_7";
16
+ import { ScreenReaderContent as vi } from "@instructure/ui-a11y-content";
17
+ import { IconButton as Qt, CloseButton as wi, Button as N } from "@instructure/ui-buttons/v11_7";
18
+ import { Flex as I } from "@instructure/ui-flex/v11_7";
19
+ import { Heading as Ie } from "@instructure/ui-heading/v11_7";
20
+ import { Link as Li } from "@instructure/ui-link/v11_7";
21
+ import { List as Je, ListItem as et } from "@instructure/ui-list/v11_7";
22
+ import { Pagination as Kt } from "@instructure/ui-pagination/v11_7";
23
+ import { ProgressBar as Ai } from "@instructure/ui-progress/v11_7";
24
+ import { Spinner as dt } from "@instructure/ui-spinner/v11_7";
25
+ import { Tooltip as Ri } from "@instructure/ui-tooltip/v11_7";
26
26
  import { View as _ } from "@instructure/ui-view/v11_7";
27
- import { WithBreakpoints as hi } from "@instructure/platform-with-breakpoints";
28
- import { Modal as Mi, ModalHeader as _i, ModalBody as Ii, ModalFooter as Ei } from "@instructure/ui-modal/v11_7";
29
- import { CheckboxGroup as It, Checkbox as We } from "@instructure/ui-checkbox/v11_7";
30
- import { RadioInputGroup as Si, RadioInput as Et } from "@instructure/ui-radio-input/v11_7";
31
- import { TextArea as yi } from "@instructure/ui-text-area/v11_7";
32
- function xt(e) {
27
+ import { WithBreakpoints as ki } from "@instructure/platform-with-breakpoints";
28
+ import { TextInput as Oi } from "@instructure/ui-text-input/v11_7";
29
+ import { Modal as Di, ModalHeader as qi, ModalBody as zi, ModalFooter as Ni } from "@instructure/ui-modal/v11_7";
30
+ import { CheckboxGroup as At, Checkbox as Ze } from "@instructure/ui-checkbox/v11_7";
31
+ import { RadioInputGroup as xi, RadioInput as Rt } from "@instructure/ui-radio-input/v11_7";
32
+ import { TextArea as $i } from "@instructure/ui-text-area/v11_7";
33
+ function Vt(e) {
33
34
  return e === "module" ? "module" : "module item";
34
35
  }
35
- class $t extends Error {
36
- constructor(t, n, r) {
36
+ class Zt extends Error {
37
+ constructor(t, n, i) {
37
38
  super(
38
- `Canvas returned ${xt(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;
39
+ `Canvas returned ${Vt(t)} ${n} without a usable ${i}. This is a partial response; refusing to guess a value for it.`
40
+ ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = i;
40
41
  }
41
42
  }
42
- function Ut(e, t, n) {
43
+ function Xt(e, t, n) {
43
44
  if (e != null) return e;
44
- throw new $t(t, n, "published");
45
+ throw new Zt(t, n, "published");
45
46
  }
46
- function Ti(e, t) {
47
+ function Fi(e, t) {
47
48
  if (e.onUnsupportedItem) {
48
49
  e.onUnsupportedItem(t);
49
50
  return;
@@ -52,16 +53,16 @@ function Ti(e, t) {
52
53
  `[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
53
54
  );
54
55
  }
55
- function Ft(e, t) {
56
+ function Jt(e, t) {
56
57
  if (e.onUnsupportedStatus) {
57
58
  e.onUnsupportedStatus(t);
58
59
  return;
59
60
  }
60
61
  console.warn(
61
- `[platform-modules] ${xt(t.subject)} ${t.id}: status "${t.value}" is outside the closed status enum and was ignored. Pass \`onUnsupportedStatus\` to handle these yourself.`
62
+ `[platform-modules] ${Vt(t.subject)} ${t.id}: status "${t.value}" is outside the closed status enum and was ignored. Pass \`onUnsupportedStatus\` to handle these yourself.`
62
63
  );
63
64
  }
64
- const bi = /* @__PURE__ */ new Map([
65
+ const Ui = /* @__PURE__ */ new Map([
65
66
  ["Assignment", "assignment"],
66
67
  ["Quiz", "quiz"],
67
68
  ["Discussion", "discussion"],
@@ -73,21 +74,21 @@ const bi = /* @__PURE__ */ new Map([
73
74
  ["SubHeader", "sub_header"],
74
75
  ["PeerReviewSubAssignment", "assignment"]
75
76
  ]);
76
- function Pi(e) {
77
+ function Bi(e) {
77
78
  const t = e == null ? void 0 : e.__typename;
78
79
  if (!t) return null;
79
- const n = bi.get(t);
80
+ const n = Ui.get(t);
80
81
  return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
81
82
  }
82
- const Ci = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
83
- function Bt(e) {
83
+ const Gi = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
84
+ function en(e) {
84
85
  if (!e) return null;
85
- const t = Ci.exec(e);
86
+ const t = Gi.exec(e);
86
87
  if (!t) return null;
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);
88
+ const [, n, i, o, r, a] = t, l = Number(n ?? 0) * 7 * 24 * 60 + Number(i ?? 0) * 24 * 60 + Number(o ?? 0) * 60 + Number(r ?? 0) + Number(a ?? 0) / 60;
89
+ return Math.round(l);
89
90
  }
90
- const vi = /* @__PURE__ */ new Set([
91
+ const Hi = /* @__PURE__ */ new Set([
91
92
  "must_view",
92
93
  "must_mark_done",
93
94
  "must_contribute",
@@ -95,18 +96,18 @@ const vi = /* @__PURE__ */ new Set([
95
96
  "min_score",
96
97
  "min_percentage"
97
98
  ]);
98
- function Li(e) {
99
- return vi.has(e) ? e : "unknown";
99
+ function Wi(e) {
100
+ return Hi.has(e) ? e : "unknown";
100
101
  }
101
- function wi(e) {
102
+ function Yi(e) {
102
103
  return {
103
104
  itemId: String(e.id),
104
- type: Li(e.type),
105
+ type: Wi(e.type),
105
106
  minScore: e.minScore ?? null,
106
107
  minPercentage: e.minPercentage ?? null
107
108
  };
108
109
  }
109
- function Gt(e) {
110
+ function tn(e) {
110
111
  return {
111
112
  hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
112
113
  endCursor: (e == null ? void 0 : e.endCursor) ?? null,
@@ -116,36 +117,36 @@ function Gt(e) {
116
117
  totalNrOfPages: (e == null ? void 0 : e.totalNrOfPages) ?? null
117
118
  };
118
119
  }
119
- const Ai = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
120
- function Ri(e) {
120
+ const ji = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
121
+ function Qi(e) {
121
122
  var t;
122
123
  for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
123
124
  if (n) return n;
124
125
  return null;
125
126
  }
126
- function Wt(e, t) {
127
+ function nn(e, t) {
127
128
  if (!e) return;
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);
129
+ const n = new Map(t.map((r) => [r.itemId, r.type])), i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
130
+ for (const r of e.requirementsMet ?? []) {
131
+ if (!r) continue;
132
+ const a = String(r.id);
133
+ n.get(a) === r.type && i.add(a);
133
134
  }
134
- for (const i of e.incompleteRequirements ?? []) {
135
- if (!i) continue;
136
- const l = String(i.id);
137
- n.get(l) === i.type && Ai.has(i.type) && o.set(l, i.score ?? null);
135
+ for (const r of e.incompleteRequirements ?? []) {
136
+ if (!r) continue;
137
+ const a = String(r.id);
138
+ n.get(a) === r.type && ji.has(r.type) && o.set(a, r.score ?? null);
138
139
  }
139
140
  return {
140
141
  locked: e.locked === !0 || e.workflowState === "locked",
141
142
  workflowState: e.workflowState ?? null,
142
143
  completed: e.completed === !0 || e.workflowState === "completed",
143
144
  started: e.started === !0 || e.workflowState === "started",
144
- requirementsMetItemIds: r,
145
+ requirementsMetItemIds: i,
145
146
  incompleteRequirementScores: o
146
147
  };
147
148
  }
148
- const ki = /* @__PURE__ */ new Map([
149
+ const Ki = /* @__PURE__ */ new Map([
149
150
  ["LOCKED", "locked"],
150
151
  ["MISSING", "missing"],
151
152
  ["INCOMPLETE", "incomplete"],
@@ -153,16 +154,16 @@ const ki = /* @__PURE__ */ new Map([
153
154
  ["IN_PROGRESS", "in_progress"],
154
155
  ["NOT_STARTED", "not_started"]
155
156
  ]);
156
- function Oi(e, t, n) {
157
+ function Vi(e, t, n) {
157
158
  if (e == null) return;
158
- const r = ki.get(e);
159
- return r || Ft(n, {
159
+ const i = Ki.get(e);
160
+ return i || Jt(n, {
160
161
  subject: "moduleItem",
161
162
  id: String(t),
162
163
  value: e
163
- }), r;
164
+ }), i;
164
165
  }
165
- const qi = /* @__PURE__ */ new Map([
166
+ const Zi = /* @__PURE__ */ new Map([
166
167
  ["LOCKED", "locked"],
167
168
  ["MISSING", "missing"],
168
169
  ["MISSING_AND_INCOMPLETE", "missing_and_incomplete"],
@@ -171,123 +172,129 @@ const qi = /* @__PURE__ */ new Map([
171
172
  ["IN_PROGRESS", "in_progress"],
172
173
  ["NOT_STARTED", "not_started"]
173
174
  ]);
174
- function Di(e, t, n) {
175
+ function Xi(e, t, n) {
175
176
  if (e == null) return;
176
- const r = qi.get(e);
177
- return r || Ft(n, { subject: "module", id: String(t), value: e }), r;
177
+ const i = Zi.get(e);
178
+ return i || Jt(n, { subject: "module", id: String(t), value: e }), i;
178
179
  }
179
- function zi(e, t, n, r = {}) {
180
- var a, d;
180
+ function Ji(e, t, n, i = {}) {
181
+ var u, c;
181
182
  if (!n) return;
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
183
+ const o = e.requirementCount ?? t.length, r = Math.min(n.requirementsMetItemIds.size, o), a = ((u = e.submissionStatistics) == null ? void 0 : u.missingAssignmentCount) ?? 0, l = [...n.incompleteRequirementScores.values()].filter(
184
+ (p) => p != null
184
185
  ).length;
185
186
  return {
186
- status: Di(e.moduleStatus, e._id, r) ?? (n.locked ? "locked" : void 0),
187
- requirementsMet: i,
187
+ status: Xi(e.moduleStatus, e._id, i) ?? (n.locked ? "locked" : void 0),
188
+ requirementsMet: r,
188
189
  requirementCount: o,
189
- percentComplete: o > 0 ? Math.round(i / o * 100) : 0,
190
- nextDueAt: ((d = e.submissionStatistics) == null ? void 0 : d.nextDueAt) ?? null,
191
- missingCount: l,
192
- incompleteCount: u
190
+ percentComplete: o > 0 ? Math.round(r / o * 100) : 0,
191
+ nextDueAt: ((c = e.submissionStatistics) == null ? void 0 : c.nextDueAt) ?? null,
192
+ missingCount: a,
193
+ incompleteCount: l
193
194
  };
194
195
  }
195
- function Ni(e, t, n, r = {}, o) {
196
- var d, g, p;
197
- const i = String(e._id), l = Pi(e.content);
198
- if (!l)
199
- return Ti(r, { id: i, typename: ((d = e.content) == null ? void 0 : d.__typename) ?? null }), null;
200
- const u = Ri(e.content), a = n.get(i) ?? null;
196
+ function er(e, t, n, i = {}, o) {
197
+ var c, p, m;
198
+ const r = String(e._id), a = Bi(e.content);
199
+ if (!a)
200
+ return Fi(i, { id: r, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
201
+ const l = Qi(e.content), u = n.get(r) ?? null;
201
202
  return {
202
- id: i,
203
+ id: r,
203
204
  moduleId: t,
204
205
  title: e.title ?? "",
205
- type: l,
206
+ type: a,
206
207
  position: e.position ?? 0,
207
208
  itemNumber: e.itemNumber ?? void 0,
208
209
  indent: e.indent ?? 0,
209
- published: Ut(e.published, "moduleItem", i),
210
+ published: Xt(e.published, "moduleItem", r),
210
211
  url: e.url ?? null,
211
212
  newTab: e.newTab ?? !1,
212
- completionRequirement: a,
213
- dueAt: (u == null ? void 0 : u.cachedDueDate) ?? ((g = e.content) == null ? void 0 : g.dueAt) ?? null,
214
- status: o ? Oi(e.moduleItemStatus, i, r) ?? (o.locked ? "locked" : void 0) : void 0,
215
- pointsPossible: ((p = e.content) == null ? void 0 : p.pointsPossible) ?? null,
216
- extensions: Je(
213
+ completionRequirement: u,
214
+ dueAt: (l == null ? void 0 : l.cachedDueDate) ?? ((p = e.content) == null ? void 0 : p.dueAt) ?? null,
215
+ status: o ? Vi(e.moduleItemStatus, r, i) ?? (o.locked ? "locked" : void 0) : void 0,
216
+ pointsPossible: ((m = e.content) == null ? void 0 : m.pointsPossible) ?? null,
217
+ extensions: ot(
217
218
  void 0,
218
- Bt(e.estimatedDuration)
219
+ en(e.estimatedDuration)
219
220
  )
220
221
  };
221
222
  }
222
- function Ht(e, t, n, r, o) {
223
- const i = [];
224
- for (const l of e ?? []) {
225
- if (!l) continue;
226
- const u = Ni(
227
- l,
223
+ function rn(e, t, n, i, o) {
224
+ const r = [];
225
+ for (const a of e ?? []) {
226
+ if (!a) continue;
227
+ const l = er(
228
+ a,
228
229
  t,
229
230
  n,
230
- r,
231
+ i,
231
232
  o
232
233
  );
233
- u && i.push(u);
234
+ l && r.push(l);
234
235
  }
235
- return i;
236
+ return r;
236
237
  }
237
- function Yt(e) {
238
+ function sn(e) {
238
239
  const t = [], n = /* @__PURE__ */ new Map();
239
- for (const r of e ?? []) {
240
- if (!r) continue;
241
- const o = wi(r);
240
+ for (const i of e ?? []) {
241
+ if (!i) continue;
242
+ const o = Yi(i);
242
243
  t.push(o), n.set(o.itemId, o);
243
244
  }
244
245
  return { list: t, byItemId: n };
245
246
  }
246
- function xi(e, t = {}) {
247
- var d, g;
247
+ function tr(e, t = {}) {
248
+ var c, p;
248
249
  const n = String(e._id);
249
250
  if (e.moduleItemsTotalCount == null)
250
- throw new $t("module", n, "moduleItemsTotalCount");
251
- const { list: r, byItemId: o } = Yt(e.completionRequirements), i = e.moduleItemsConnection, l = i != null && !((d = i.pageInfo) != null && d.hasNextPage), u = Wt(e.progression, r), a = l ? Ht(i.nodes, n, o, t, u) : void 0;
251
+ throw new Zt("module", n, "moduleItemsTotalCount");
252
+ const { list: i, byItemId: o } = sn(e.completionRequirements), r = e.moduleItemsConnection, a = r != null && !((c = r.pageInfo) != null && c.hasNextPage), l = nn(e.progression, i), u = a ? rn(r.nodes, n, o, t, l) : void 0;
252
253
  return {
253
254
  id: n,
254
255
  name: e.name ?? "",
255
256
  position: e.position ?? 0,
256
- published: Ut(e.published, "module", n),
257
+ published: Xt(e.published, "module", n),
257
258
  itemCount: e.moduleItemsTotalCount,
258
- items: a,
259
- estimatedDurationMinutes: Bt(e.estimatedDuration) || void 0,
259
+ items: u,
260
+ estimatedDurationMinutes: en(e.estimatedDuration) || void 0,
260
261
  unlockAt: e.unlockAt ?? null,
261
262
  prerequisiteModules: (e.prerequisites ?? []).filter(
262
- (p) => p != null
263
- ).map((p) => ({ id: String(p.id), name: p.name ?? "" })),
263
+ (m) => m != null
264
+ ).map((m) => ({ id: String(m.id), name: m.name ?? "" })),
264
265
  requirementCount: e.requirementCount ?? null,
265
266
  requireSequentialProgress: e.requireSequentialProgress ?? !1,
266
- completionRequirements: r,
267
- progress: zi(e, r, u, t),
268
- collapsed: ((g = e.progression) == null ? void 0 : g.collapsed) ?? null
267
+ completionRequirements: i,
268
+ progress: Ji(e, i, l, t),
269
+ collapsed: ((p = e.progression) == null ? void 0 : p.collapsed) ?? null,
270
+ ...e.searchMatch ? {
271
+ searchMatch: {
272
+ nameMatched: e.searchMatch.nameMatched,
273
+ matchingItemCount: e.searchMatch.matchingItemCount
274
+ }
275
+ } : {}
269
276
  };
270
277
  }
271
- function $i(e, t = {}) {
278
+ function nr(e, t = {}) {
272
279
  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(xi(i, t));
276
- return { modules: r, pageInfo: Gt(n == null ? void 0 : n.pageInfo) };
280
+ const n = (o = e == null ? void 0 : e.legacyNode) == null ? void 0 : o.modulesConnection, i = [];
281
+ for (const r of (n == null ? void 0 : n.nodes) ?? [])
282
+ r && i.push(tr(r, t));
283
+ return { modules: i, pageInfo: tn(n == null ? void 0 : n.pageInfo) };
277
284
  }
278
- function Ui(e, t, n = {}) {
279
- const r = e == null ? void 0 : e.legacyNode, { list: o, byItemId: i } = Yt(r == null ? void 0 : r.completionRequirements), l = r == null ? void 0 : r.moduleItemsConnection, u = Wt(r == null ? void 0 : r.progression, o);
285
+ function ir(e, t, n = {}) {
286
+ const i = e == null ? void 0 : e.legacyNode, { list: o, byItemId: r } = sn(i == null ? void 0 : i.completionRequirements), a = i == null ? void 0 : i.moduleItemsConnection, l = nn(i == null ? void 0 : i.progression, o);
280
287
  return {
281
- items: Ht(l == null ? void 0 : l.nodes, t, i, n, u),
282
- pageInfo: Gt(l == null ? void 0 : l.pageInfo)
288
+ items: rn(a == null ? void 0 : a.nodes, t, r, n, l),
289
+ pageInfo: tn(a == null ? void 0 : a.pageInfo)
283
290
  };
284
291
  }
285
- const Fi = J`
292
+ const rr = ne`
286
293
  fragment PlatformModulesSubmissionFields on Submission {
287
294
  _id
288
295
  cachedDueDate
289
296
  }
290
- `, jt = J`
297
+ `, on = ne`
291
298
  fragment PlatformModulesItemFields on ModuleItem {
292
299
  _id
293
300
  title
@@ -336,8 +343,8 @@ const Fi = J`
336
343
  }
337
344
  }
338
345
  }
339
- ${Fi}
340
- `, Qt = J`
346
+ ${rr}
347
+ `, ln = ne`
341
348
  fragment PlatformModulesProgressionFields on ModuleProgression {
342
349
  workflowState
343
350
  completed
@@ -357,7 +364,7 @@ const Fi = J`
357
364
  score
358
365
  }
359
366
  }
360
- `, Kt = J`
367
+ `, an = ne`
361
368
  fragment PlatformModulesModuleFields on Module {
362
369
  _id
363
370
  name
@@ -387,9 +394,13 @@ const Fi = J`
387
394
  nextDueAt
388
395
  missingAssignmentCount
389
396
  }
397
+ searchMatch {
398
+ nameMatched
399
+ matchingItemCount
400
+ }
390
401
  }
391
- ${Qt}
392
- `, Bi = J`
402
+ ${ln}
403
+ `, sr = ne`
393
404
  query PlatformModulesGetModules(
394
405
  $courseId: ID!
395
406
  $first: Int
@@ -417,8 +428,8 @@ const Fi = J`
417
428
  }
418
429
  }
419
430
  }
420
- ${Kt}
421
- `, Gi = J`
431
+ ${an}
432
+ `, or = ne`
422
433
  query PlatformModulesGetModulesWithItems(
423
434
  $courseId: ID!
424
435
  $first: Int
@@ -458,9 +469,9 @@ const Fi = J`
458
469
  }
459
470
  }
460
471
  }
461
- ${Kt}
462
- ${jt}
463
- `, Wi = J`
472
+ ${an}
473
+ ${on}
474
+ `, lr = ne`
464
475
  query PlatformModulesGetModuleItems(
465
476
  $moduleId: ID!
466
477
  $first: Int
@@ -470,6 +481,7 @@ const Fi = J`
470
481
  $includeSubmissions: Boolean!
471
482
  $includeEstimatedDuration: Boolean!
472
483
  $studentId: ID
484
+ $itemsFilter: ModuleItemFilter
473
485
  ) {
474
486
  legacyNode(_id: $moduleId, type: Module) {
475
487
  ... on Module {
@@ -482,7 +494,13 @@ const Fi = J`
482
494
  progression {
483
495
  ...PlatformModulesProgressionFields
484
496
  }
485
- moduleItemsConnection(first: $first, after: $after, before: $before, last: $last) {
497
+ moduleItemsConnection(
498
+ first: $first
499
+ after: $after
500
+ before: $before
501
+ last: $last
502
+ filter: $itemsFilter
503
+ ) {
486
504
  nodes {
487
505
  ...PlatformModulesItemFields
488
506
  }
@@ -498,27 +516,27 @@ const Fi = J`
498
516
  }
499
517
  }
500
518
  }
501
- ${jt}
502
- ${Qt}
519
+ ${on}
520
+ ${ln}
503
521
  `;
504
- function Vt() {
522
+ function un() {
505
523
  return new DOMException("The operation was aborted.", "AbortError");
506
524
  }
507
- function Te(e) {
508
- if (e != null && e.aborted) throw Vt();
525
+ function Le(e) {
526
+ if (e != null && e.aborted) throw un();
509
527
  }
510
- function St(e, t) {
511
- return t ? new Promise((n, r) => {
512
- const o = () => r(Vt());
513
- t.addEventListener("abort", o, { once: !0 }), e.then(n, r).finally(() => t.removeEventListener("abort", o));
528
+ function kt(e, t) {
529
+ return t ? new Promise((n, i) => {
530
+ const o = () => i(un());
531
+ t.addEventListener("abort", o, { once: !0 }), e.then(n, i).finally(() => t.removeEventListener("abort", o));
514
532
  }) : e;
515
533
  }
516
- const yt = [
534
+ const Ot = [
517
535
  "COMPLETED",
518
536
  "INCOMPLETE",
519
537
  "IN_PROGRESS",
520
538
  "NOT_STARTED"
521
- ], Tt = /* @__PURE__ */ new Map([
539
+ ], Dt = /* @__PURE__ */ new Map([
522
540
  ["locked", ["LOCKED"]],
523
541
  ["missing", ["MISSING"]],
524
542
  ["missing_and_incomplete", ["MISSING_AND_INCOMPLETE"]],
@@ -526,24 +544,32 @@ const yt = [
526
544
  ["complete", ["COMPLETE"]],
527
545
  ["in_progress", ["IN_PROGRESS"]],
528
546
  ["not_started", ["NOT_STARTED"]]
529
- ]), Hi = {
530
- module: { completionStatus: ["eq"], moduleStatus: ["eq"], dueWithinDays: ["within"] }
547
+ ]), ar = {
548
+ module: { completionStatus: ["eq"], moduleStatus: ["eq"], dueWithinDays: ["within"] },
549
+ search: !0
531
550
  };
532
- function Yi(e, t) {
551
+ function ur(e, t, n) {
552
+ const i = cr(e, t);
553
+ return n ? { ...i, searchTerm: n } : i;
554
+ }
555
+ function dr(e) {
556
+ return e ? { searchTerm: e } : null;
557
+ }
558
+ function cr(e, t) {
533
559
  if (!e) return null;
534
560
  if (e.target === "module" && e.field === "completionStatus" && e.op === "eq") {
535
561
  const n = e.value;
536
- if (!yt.includes(n))
562
+ if (!Ot.includes(n))
537
563
  throw new Error(
538
- `"${e.value}" is not a ModuleCompletionStatus (${yt.join(", ")}).`
564
+ `"${e.value}" is not a ModuleCompletionStatus (${Ot.join(", ")}).`
539
565
  );
540
566
  return { completionStatus: n };
541
567
  }
542
568
  if (e.target === "module" && e.field === "moduleStatus" && e.op === "eq") {
543
- const n = typeof e.value == "string" ? Tt.get(e.value) : void 0;
569
+ const n = typeof e.value == "string" ? Dt.get(e.value) : void 0;
544
570
  if (!n)
545
571
  throw new Error(
546
- `"${String(e.value)}" is not a ModuleStatus (${[...Tt.keys()].join(", ")}).`
572
+ `"${String(e.value)}" is not a ModuleStatus (${[...Dt.keys()].join(", ")}).`
547
573
  );
548
574
  return { moduleStatus: n };
549
575
  }
@@ -556,331 +582,334 @@ function Yi(e, t) {
556
582
  `Canvas GraphQL cannot serve ${e.target}.${e.field} "${e.op}". It compiles module.completionStatus eq, module.moduleStatus eq and module.dueWithinDays within.`
557
583
  );
558
584
  }
559
- function He(e, t, n) {
585
+ function Xe(e, t, n) {
560
586
  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 };
561
587
  }
562
- function Gs({
588
+ function co({
563
589
  executeQuery: e,
564
- inlineItemLimit: t = Tn,
565
- nodeBudget: n = En,
566
- onUnsupportedItem: r,
590
+ inlineItemLimit: t = qn,
591
+ nodeBudget: n = kn,
592
+ onUnsupportedItem: i,
567
593
  onUnsupportedStatus: o,
568
- studentId: i,
569
- validate: l = !0,
570
- capabilities: u = Hi,
571
- includeEstimatedDuration: a = !1
594
+ studentId: r,
595
+ validate: a = !0,
596
+ capabilities: l = ar,
597
+ includeEstimatedDuration: u = !1
572
598
  }) {
573
- const d = i != null, g = { onUnsupportedItem: r, onUnsupportedStatus: o };
599
+ const c = r != null, p = { onUnsupportedItem: i, onUnsupportedStatus: o };
574
600
  return {
575
601
  inlineNodeBudget: n,
576
- capabilities: u,
602
+ capabilities: l,
577
603
  async listModules({
578
- courseId: p,
604
+ courseId: m,
579
605
  page: h = { kind: "first" },
580
- pageSize: f,
581
- includeItems: I,
582
- filter: L,
583
- dueRange: w,
584
- inlineItemsFirst: x,
585
- inlineFirst: k,
586
- signal: S
606
+ pageSize: S,
607
+ includeItems: M,
608
+ filter: T,
609
+ dueRange: D,
610
+ search: A,
611
+ inlineItemsFirst: U,
612
+ inlineFirst: y,
613
+ signal: P
587
614
  }) {
588
- Te(S);
589
- const C = Yi(L, w);
590
- let j;
591
- if (I) {
592
- const A = Math.min(k ?? f, f), O = Math.min(x ?? t, t), $ = Math.max(1, Math.min(O, Math.floor(n / A)));
593
- j = e(
594
- Gi,
615
+ Le(P);
616
+ const Q = ur(T, D, A);
617
+ let B;
618
+ if (M) {
619
+ const q = Math.min(y ?? S, S), G = Math.min(U ?? t, t), K = Math.max(1, Math.min(G, Math.floor(n / q)));
620
+ B = e(
621
+ or,
595
622
  {
596
- courseId: p,
597
- ...He(h, A, f),
598
- itemsFirst: $,
599
- includeSubmissions: d,
600
- includeEstimatedDuration: a,
601
- studentId: i ?? null,
602
- filter: C
623
+ courseId: m,
624
+ ...Xe(h, q, S),
625
+ itemsFirst: K,
626
+ includeSubmissions: c,
627
+ includeEstimatedDuration: u,
628
+ studentId: r ?? null,
629
+ filter: Q
603
630
  }
604
631
  );
605
632
  } else
606
- j = e(Bi, {
607
- courseId: p,
608
- ...He(h, f, f),
609
- includeEstimatedDuration: a,
610
- filter: C
633
+ B = e(sr, {
634
+ courseId: m,
635
+ ...Xe(h, S, S),
636
+ includeEstimatedDuration: u,
637
+ filter: Q
611
638
  });
612
- const Q = await St(j, S);
613
- Te(S);
614
- const T = $i(Q, g);
615
- return l ? yn.parse(T) : T;
639
+ const C = await kt(B, P);
640
+ Le(P);
641
+ const R = nr(C, p);
642
+ return a ? Dn.parse(R) : R;
616
643
  },
617
644
  async listModuleItems({
618
- moduleId: p,
645
+ moduleId: m,
619
646
  page: h = { kind: "first" },
620
- pageSize: f,
621
- signal: I
647
+ pageSize: S,
648
+ search: M,
649
+ signal: T
622
650
  }) {
623
- Te(I);
624
- const L = await St(
625
- e(Wi, {
626
- moduleId: p,
627
- ...He(h, f, f),
628
- includeSubmissions: d,
629
- includeEstimatedDuration: a,
630
- studentId: i ?? null
651
+ Le(T);
652
+ const D = await kt(
653
+ e(lr, {
654
+ moduleId: m,
655
+ ...Xe(h, S, S),
656
+ includeSubmissions: c,
657
+ includeEstimatedDuration: u,
658
+ studentId: r ?? null,
659
+ itemsFilter: dr(M)
631
660
  }),
632
- I
661
+ T
633
662
  );
634
- Te(I);
635
- const w = Ui(L, p, g);
636
- return l ? Sn.parse(w) : w;
663
+ Le(T);
664
+ const A = ir(D, m, p);
665
+ return a ? On.parse(A) : A;
637
666
  },
638
667
  async setModuleCollapsed({
639
- courseId: p,
668
+ courseId: m,
640
669
  moduleId: h,
641
- collapsed: f,
642
- signal: I
670
+ collapsed: S,
671
+ signal: M
643
672
  }) {
644
- await ht(
673
+ await vt(
645
674
  {
646
- path: `/courses/${p}/modules/${h}/collapse`,
675
+ path: `/courses/${m}/modules/${h}/collapse`,
647
676
  method: "POST",
648
- body: { collapse: f },
649
- signal: I
677
+ body: { collapse: S },
678
+ signal: M
650
679
  },
651
- Mt.unknown()
680
+ wt.unknown()
652
681
  );
653
682
  },
654
683
  async setAllModulesCollapsed({
655
- courseId: p,
684
+ courseId: m,
656
685
  collapsed: h,
657
- signal: f
686
+ signal: S
658
687
  }) {
659
- await ht(
688
+ await vt(
660
689
  {
661
- path: `/courses/${p}/collapse_all_modules`,
690
+ path: `/courses/${m}/collapse_all_modules`,
662
691
  method: "POST",
663
692
  params: { collapse: h ? 1 : 0 },
664
- signal: f
693
+ signal: S
665
694
  },
666
- Mt.unknown()
695
+ wt.unknown()
667
696
  );
668
697
  }
669
698
  };
670
699
  }
671
- const Ws = 1e3;
672
- function ji({
700
+ const mo = 1e3;
701
+ function mr({
673
702
  queryClient: e,
674
703
  courseId: t,
675
704
  module: n,
676
- item: r
705
+ item: i
677
706
  }) {
678
707
  return {
679
708
  module: n,
680
- item: r,
709
+ item: i,
681
710
  invalidateModuleItems: async (o) => {
682
711
  await Promise.all([
683
- bn(e, t, o),
684
- ft(e, t)
712
+ zn(e, t, o),
713
+ Ct(e, t)
685
714
  ]);
686
715
  },
687
- invalidateModuleList: () => ft(e, t)
716
+ invalidateModuleList: () => Ct(e, t)
688
717
  };
689
718
  }
690
- function Hs(e, t) {
691
- return et(e).filter(
719
+ function go(e, t) {
720
+ return lt(e).filter(
692
721
  (n) => n.visible == null || n.visible(t) === !0
693
722
  );
694
723
  }
695
- function Zt(e, t = {}) {
696
- const n = Object.keys(t).filter((o) => !Pn(e, o));
724
+ function dn(e, t = {}) {
725
+ const n = Object.keys(t).filter((o) => !Nn(e, o));
697
726
  if (n.length > 0)
698
727
  throw new Error(
699
728
  `Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
700
729
  );
701
- const r = {
702
- formatters: Ge(e.formatters, t.formatters),
703
- itemTypes: ie(e.itemTypes, t.itemTypes),
704
- itemStatuses: ie(e.itemStatuses, t.itemStatuses),
705
- itemMeta: ie(e.itemMeta, t.itemMeta),
706
- filters: ie(e.filters, t.filters),
707
- moduleActions: ie(e.moduleActions, t.moduleActions),
708
- itemActions: ie(e.itemActions, t.itemActions),
709
- navigation: Ge(e.navigation, t.navigation),
710
- permissions: Ge(e.permissions, t.permissions),
730
+ const i = {
731
+ formatters: Ve(e.formatters, t.formatters),
732
+ itemTypes: oe(e.itemTypes, t.itemTypes),
733
+ itemStatuses: oe(e.itemStatuses, t.itemStatuses),
734
+ itemMeta: oe(e.itemMeta, t.itemMeta),
735
+ filters: oe(e.filters, t.filters),
736
+ moduleActions: oe(e.moduleActions, t.moduleActions),
737
+ itemActions: oe(e.itemActions, t.itemActions),
738
+ navigation: Ve(e.navigation, t.navigation),
739
+ permissions: Ve(e.permissions, t.permissions),
711
740
  notify: t.notify ?? e.notify
712
741
  };
713
- return Cn.parse(r), r;
742
+ return xn.parse(i), i;
714
743
  }
715
- const Qi = "organizeNewPlacement", Ki = {
744
+ const gr = "organizeNewPlacement", pr = {
716
745
  label: "metaFieldNewPlacementLabel",
717
746
  order: 5,
718
- render: ({ item: e, t }) => wn(e) ? /* @__PURE__ */ s(Xn, { color: "success", children: t("organizeNewItemPill") }) : null
719
- }, Vi = (e) => Object.fromEntries(Object.keys(e).map((t) => [t, { hidden: !0 }])), Zi = (e) => Zt(e, {
720
- itemMeta: { [Qi]: Ki },
721
- filters: Vi(e.filters),
747
+ render: ({ item: e, t }) => Un(e) ? /* @__PURE__ */ s(mi, { color: "success", children: t("organizeNewItemPill") }) : null
748
+ }, fr = (e) => Object.fromEntries(Object.keys(e).map((t) => [t, { hidden: !0 }])), hr = (e) => dn(e, {
749
+ itemMeta: { [gr]: pr },
750
+ filters: fr(e.filters),
722
751
  formatters: {
723
- moduleLabel: (t, n, { t: r }) => {
724
- if (vn(n)) return r("organizeNewModuleLabel");
725
- const o = Ln(n);
726
- return o === 0 ? null : r("organizeItemsAddedLabel", { count: o });
752
+ moduleLabel: (t, n, { t: i }) => {
753
+ if ($n(n)) return i("organizeNewModuleLabel");
754
+ const o = Fn(n);
755
+ return o === 0 ? null : i("organizeItemsAddedLabel", { count: o });
727
756
  }
728
757
  }
729
758
  });
730
- function Ys(e = {}) {
731
- return Zt(An, e);
759
+ function po(e = {}) {
760
+ return dn(Bn, e);
732
761
  }
733
- function js(e) {
734
- const t = Jn();
735
- return F(
736
- (n, r) => ji({ queryClient: t, courseId: e, module: n, item: r }),
762
+ function fo(e) {
763
+ const t = gi();
764
+ return x(
765
+ (n, i) => mr({ queryClient: t, courseId: e, module: n, item: i }),
737
766
  [t, e]
738
767
  );
739
768
  }
740
- const Xi = {
741
- not_started: Se.not_started,
742
- in_progress: Se.in_progress,
743
- complete: Se.complete,
744
- missing: Se.missing,
745
- due_this_week: Rn
746
- }, Ji = {
769
+ const Ir = {
770
+ not_started: ve.not_started,
771
+ in_progress: ve.in_progress,
772
+ complete: ve.complete,
773
+ missing: ve.missing,
774
+ due_this_week: Gn
775
+ }, Mr = {
747
776
  primary: "secondary",
748
777
  info: "brand",
749
778
  success: "success",
750
779
  warning: "warning"
751
780
  };
752
- function er({
781
+ function _r({
753
782
  value: e,
754
783
  onChange: t,
755
784
  interaction: n = "enabled"
756
785
  }) {
757
- const { t: r } = N(), o = Ce(), i = B(() => et(o.filters), [o.filters]), l = ni();
758
- return i.length === 0 ? null : /* @__PURE__ */ s(
759
- _t,
786
+ const { t: i } = F(), o = ke(), r = W(() => lt(o.filters), [o.filters]), a = hi();
787
+ return r.length === 0 ? null : /* @__PURE__ */ s(
788
+ Lt,
760
789
  {
761
- renderLabel: r("filterGroupLabel"),
790
+ renderLabel: i("filterGroupLabel"),
762
791
  value: e,
763
- onChange: (u, a) => {
764
- a.value !== void 0 && t(String(a.value));
792
+ onChange: (l, u) => {
793
+ u.value !== void 0 && t(String(u.value));
765
794
  },
766
795
  interaction: n,
767
796
  "data-testid": "filter-select",
768
- children: i.map((u) => {
769
- const a = Xi[u.key];
797
+ children: r.map((l) => {
798
+ const u = Ir[l.key];
770
799
  return /* @__PURE__ */ s(
771
- _t.Option,
800
+ Lt.Option,
772
801
  {
773
- id: `${l}-${u.key}`,
774
- value: u.key,
775
- renderBeforeLabel: a ? /* @__PURE__ */ s(b, { color: Ji[a.tone], children: a.icon }) : void 0,
776
- "data-testid": `filter-option-${u.key}`,
777
- children: r(u.label)
802
+ id: `${a}-${l.key}`,
803
+ value: l.key,
804
+ renderBeforeLabel: u ? /* @__PURE__ */ s(b, { color: Mr[u.tone], children: u.icon }) : void 0,
805
+ "data-testid": `filter-option-${l.key}`,
806
+ children: i(l.label)
778
807
  },
779
- u.key
808
+ l.key
780
809
  );
781
810
  })
782
811
  }
783
812
  );
784
813
  }
785
- const bt = "\0", tr = { textDecoration: "underline dotted", cursor: "help" }, Xt = { ...kn, marginInlineEnd: "0.375rem" };
786
- function nr({ names: e }) {
787
- const { t } = N();
788
- if (e.length === 1) return /* @__PURE__ */ s(H, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
814
+ const qt = "\0", Er = { textDecoration: "underline dotted", cursor: "help" }, cn = { ...Hn, marginInlineEnd: "0.375rem" };
815
+ function Sr({ names: e }) {
816
+ const { t } = F();
817
+ if (e.length === 1) return /* @__PURE__ */ s(j, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
789
818
  const n = t("lockedByPrerequisitesByline", {
790
819
  count: e.length,
791
- prerequisites: bt
792
- }), [r, ...o] = n.split(bt), i = o.length > 0 ? o.join("") : null;
793
- return /* @__PURE__ */ m(H, { children: [
794
- i === null ? null : r,
795
- /* @__PURE__ */ s(fi, { renderTip: e.join(", "), children: /* @__PURE__ */ s(
820
+ prerequisites: qt
821
+ }), [i, ...o] = n.split(qt), r = o.length > 0 ? o.join("") : null;
822
+ return /* @__PURE__ */ g(j, { children: [
823
+ r === null ? null : i,
824
+ /* @__PURE__ */ s(Ri, { renderTip: e.join(", "), children: /* @__PURE__ */ s(
796
825
  "span",
797
826
  {
798
827
  tabIndex: 0,
799
- style: tr,
800
- onClick: (l) => l.stopPropagation(),
828
+ style: Er,
829
+ onClick: (a) => a.stopPropagation(),
801
830
  "data-testid": "module-byline-prerequisites",
802
- children: i === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
831
+ children: r === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
803
832
  }
804
833
  ) }),
805
- i
834
+ r
806
835
  ] });
807
836
  }
808
- function ir({ module: e, today: t }) {
809
- var p;
810
- const n = nt(), 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;
811
- let a = null;
812
- i !== null && u && (o || !e.progress) ? a = n.unlockByline(i, t) : i !== null && !u && !e.progress && (a = n.unlockedByline(i, t));
813
- const d = o && l.length > 0;
814
- let g = null;
815
- if (a === null && !d && !o) {
816
- const h = e.estimatedDurationMinutes ?? xn(e.items);
817
- g = h === null ? null : n.estimatedDurationByline(h);
837
+ function Tr({ module: e, today: t }) {
838
+ var m;
839
+ const n = ut(), i = Ht(), o = ((m = e.progress) == null ? void 0 : m.status) === "locked", r = e.unlockAt ?? null, a = e.prerequisiteModules.map((h) => h.name.trim()).filter((h) => h !== ""), l = r !== null && new Date(r) > t;
840
+ let u = null;
841
+ r !== null && l && (o || !e.progress) ? u = n.unlockByline(r, t) : r !== null && !l && !e.progress && (u = n.unlockedByline(r, t));
842
+ const c = o && a.length > 0;
843
+ let p = null;
844
+ if (u === null && !c && !o) {
845
+ const h = e.estimatedDurationMinutes ?? Xn(e.items);
846
+ p = h === null ? null : n.estimatedDurationByline(h);
818
847
  }
819
- return a === null && !d && g === null ? null : /* @__PURE__ */ s(_, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s("div", { style: qt, children: /* @__PURE__ */ s(b, { variant: "contentSmall", color: "secondary", "data-testid": "module-byline", children: g !== null ? /* @__PURE__ */ m(H, { children: [
820
- /* @__PURE__ */ s("span", { style: Xt, children: /* @__PURE__ */ s(zt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
821
- g
822
- ] }) : /* @__PURE__ */ m(H, { children: [
823
- a,
824
- a !== null && d ? /* @__PURE__ */ s("span", { style: Dt, children: " " }) : null,
825
- d ? /* @__PURE__ */ s("span", { style: a !== null ? r : void 0, children: /* @__PURE__ */ s(nr, { names: l }) }) : null
848
+ return u === null && !c && p === null ? null : /* @__PURE__ */ s(_, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s("div", { style: Wt, children: /* @__PURE__ */ s(b, { variant: "contentSmall", color: "secondary", "data-testid": "module-byline", children: p !== null ? /* @__PURE__ */ g(j, { children: [
849
+ /* @__PURE__ */ s("span", { style: cn, children: /* @__PURE__ */ s(jt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
850
+ p
851
+ ] }) : /* @__PURE__ */ g(j, { children: [
852
+ u,
853
+ u !== null && c ? /* @__PURE__ */ s("span", { style: Yt, children: " " }) : null,
854
+ c ? /* @__PURE__ */ s("span", { style: u !== null ? i : void 0, children: /* @__PURE__ */ s(Sr, { names: a }) }) : null
826
855
  ] }) }) }) });
827
856
  }
828
- const rr = "#273540", sr = "#D7DADE", or = "0.25rem", lr = (e, t) => {
829
- var n, r, o, i, l;
857
+ const yr = "#273540", br = "#D7DADE", Pr = "0.25rem", Cr = (e, t) => {
858
+ var n, i, o, r, a;
830
859
  return {
831
- meterColorBrand: ((r = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : r.grey125125) ?? rr,
832
- borderRadius: String(((o = t.borders) == null ? void 0 : o.radiusMedium) ?? or),
833
- borderColor: ((l = (i = t.colors) == null ? void 0 : i.contrasts) == null ? void 0 : l.grey1424) ?? sr,
860
+ meterColorBrand: ((i = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : i.grey125125) ?? yr,
861
+ borderRadius: String(((o = t.borders) == null ? void 0 : o.radiusMedium) ?? Pr),
862
+ borderColor: ((a = (r = t.colors) == null ? void 0 : r.contrasts) == null ? void 0 : a.grey1424) ?? br,
834
863
  trackBottomBorderColor: "transparent"
835
864
  };
836
- }, ar = "66.667%", ur = "80px", dr = 2, cr = { components: { TruncateText: { fontFamily: "inherit" } } };
837
- function mr({
865
+ }, vr = "66.667%", wr = "80px", Lr = 2, Ar = { components: { TruncateText: { fontFamily: "inherit" } } };
866
+ function Rr({
838
867
  module: e,
839
868
  breakpoints: t
840
869
  }) {
841
- const { t: n } = N(), r = nt(), o = Ot(), i = e.progress;
842
- if (!i || i.status === "locked" || i.requirementCount <= 0) return null;
843
- const l = Object.keys(t).length === 0 || t.desktop === !0, u = Un(e.items);
844
- return /* @__PURE__ */ m(
845
- M,
870
+ const { t: n } = F(), i = ut(), o = Ht(), r = e.progress;
871
+ if (!r || r.status === "locked" || r.requirementCount <= 0) return null;
872
+ const a = Object.keys(t).length === 0 || t.desktop === !0, l = ei(e.items);
873
+ return /* @__PURE__ */ g(
874
+ I,
846
875
  {
847
- width: l ? ar : "100%",
876
+ width: a ? vr : "100%",
848
877
  alignItems: "center",
849
878
  gap: "x-small",
850
879
  margin: "x-small 0 0 0",
851
880
  "data-testid": "module-progress",
852
881
  children: [
853
- /* @__PURE__ */ s(M.Item, { children: /* @__PURE__ */ s(_, { as: "div", width: ur, "data-testid": "module-progress-bar", children: /* @__PURE__ */ s(
854
- pi,
882
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ s(_, { as: "div", width: wr, "data-testid": "module-progress-bar", children: /* @__PURE__ */ s(
883
+ Ai,
855
884
  {
856
885
  size: "x-small",
857
886
  meterColor: "brand",
858
- valueNow: i.requirementsMet,
859
- valueMax: i.requirementCount,
887
+ valueNow: r.requirementsMet,
888
+ valueMax: r.requirementCount,
860
889
  shouldAnimate: !1,
861
890
  screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
862
891
  formatScreenReaderValue: () => {
863
- const a = Fn(
892
+ const u = ti(
864
893
  n,
865
- i.requirementsMet,
866
- i.requirementCount
894
+ r.requirementsMet,
895
+ r.requirementCount
867
896
  );
868
- return u === null ? a : `${a}, ${r.remainingDurationByline(u)}`;
897
+ return l === null ? u : `${u}, ${i.remainingDurationByline(l)}`;
869
898
  },
870
- themeOverride: lr
899
+ themeOverride: Cr
871
900
  }
872
901
  ) }) }),
873
- /* @__PURE__ */ s(M.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { style: qt, children: /* @__PURE__ */ m(b, { variant: "contentSmall", color: "secondary", children: [
874
- r.progress(
875
- i.percentComplete,
876
- i.requirementsMet,
877
- i.requirementCount
902
+ /* @__PURE__ */ s(I.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { style: Wt, children: /* @__PURE__ */ g(b, { variant: "contentSmall", color: "secondary", children: [
903
+ i.progress(
904
+ r.percentComplete,
905
+ r.requirementsMet,
906
+ r.requirementCount
878
907
  ),
879
- u !== null ? /* @__PURE__ */ m(H, { children: [
880
- /* @__PURE__ */ s("span", { style: Dt, children: " " }),
881
- /* @__PURE__ */ m("span", { style: o, children: [
882
- /* @__PURE__ */ s("span", { style: Xt, children: /* @__PURE__ */ s(zt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
883
- r.remainingDurationByline(u)
908
+ l !== null ? /* @__PURE__ */ g(j, { children: [
909
+ /* @__PURE__ */ s("span", { style: Yt, children: " " }),
910
+ /* @__PURE__ */ g("span", { style: o, children: [
911
+ /* @__PURE__ */ s("span", { style: cn, children: /* @__PURE__ */ s(jt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
912
+ i.remainingDurationByline(l)
884
913
  ] })
885
914
  ] }) : null
886
915
  ] }) }) })
@@ -888,35 +917,36 @@ function mr({
888
917
  }
889
918
  );
890
919
  }
891
- const Pt = (e) => `platform-modules-panel-${e}`;
892
- function Qe(e) {
920
+ const zt = (e) => `platform-modules-panel-${e}`;
921
+ function tt(e) {
893
922
  return e !== void 0 && e.type !== "sub_header";
894
923
  }
895
- function Ct(e) {
896
- return Qe(e) && e.indent > 0;
924
+ function Nt(e) {
925
+ return tt(e) && e.indent > 0;
897
926
  }
898
- function gr(e, t) {
927
+ function kr(e, t) {
899
928
  let n = t;
900
- return e.map((r) => {
901
- if (r.type !== "sub_header")
902
- return n = r.itemNumber ?? n + 1, n;
929
+ return e.map((i) => {
930
+ if (i.type !== "sub_header")
931
+ return n = i.itemNumber ?? n + 1, n;
903
932
  });
904
933
  }
905
- function pr({
934
+ function Or({
906
935
  module: e,
907
936
  state: t,
908
937
  today: n,
909
- showDiagnostics: r,
938
+ showDiagnostics: i,
910
939
  stackPill: o,
911
- moduleLabel: i
940
+ moduleLabel: r,
941
+ searchTerm: a
912
942
  }) {
913
- const { t: l } = N(), u = tt(), a = R(null), d = gr(t.items, t.itemOffset), g = t.items.length, p = !t.isLoading && !t.isRefreshing;
914
- G(() => {
915
- if (!p || g === 0 || a.current === t.page) return;
916
- const f = a.current === null;
917
- a.current = t.page, z(
918
- f ? l("itemsLoadedAnnouncement", {
919
- loaded: g,
943
+ const { t: l } = F(), u = at(), c = L(null), p = kr(t.items, t.itemOffset), m = t.items.length, h = !t.isLoading && !t.isRefreshing;
944
+ $(() => {
945
+ if (!h || m === 0 || c.current === t.page) return;
946
+ const M = c.current === null;
947
+ c.current = t.page, O(
948
+ M ? l("itemsLoadedAnnouncement", {
949
+ loaded: m,
920
950
  count: e.itemCount,
921
951
  name: e.name
922
952
  }) : l("itemsPageChangedAnnouncement", {
@@ -925,26 +955,26 @@ function pr({
925
955
  name: e.name
926
956
  })
927
957
  );
928
- }, [p, g, t.page, t.pageCount, e.itemCount, e.name, l]);
929
- const h = (f) => {
930
- u("paginate-items"), f === 1 ? t.goToFirstPage() : f === t.page - 1 ? t.goToPreviousPage() : f === t.page + 1 ? t.goToNextPage() : f === t.pageCount && t.goToLastPage();
958
+ }, [h, m, t.page, t.pageCount, e.itemCount, e.name, l]);
959
+ const S = (M) => {
960
+ u("paginate-items"), M === 1 ? t.goToFirstPage() : M === t.page - 1 ? t.goToPreviousPage() : M === t.page + 1 ? t.goToNextPage() : M === t.pageCount && t.goToLastPage();
931
961
  };
932
962
  return t.error ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(
933
- X,
963
+ te,
934
964
  {
935
965
  variant: "error",
936
966
  margin: "0",
937
- liveRegion: be,
967
+ liveRegion: Ae,
938
968
  liveRegionPoliteness: "assertive",
939
969
  "data-testid": "items-error",
940
970
  children: l("itemsLoadErrorAlert", { message: t.error.message })
941
971
  }
942
- ) }) : t.isLoading ? /* @__PURE__ */ m(_, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
943
- /* @__PURE__ */ s(it, { size: "x-small", renderTitle: l("itemsLoadingSpinnerLabel") }),
972
+ ) }) : t.isLoading ? /* @__PURE__ */ g(_, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
973
+ /* @__PURE__ */ s(dt, { size: "x-small", renderTitle: l("itemsLoadingSpinnerLabel") }),
944
974
  " ",
945
975
  /* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("itemsLoadingText") })
946
- ] }) : /* @__PURE__ */ m(_, { as: "div", margin: "small 0 0 0", children: [
947
- r ? /* @__PURE__ */ m(b, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
976
+ ] }) : /* @__PURE__ */ g(_, { as: "div", margin: "small 0 0 0", children: [
977
+ i ? /* @__PURE__ */ g(b, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
948
978
  "items source: ",
949
979
  t.source,
950
980
  " · page ",
@@ -952,89 +982,98 @@ function pr({
952
982
  " of ",
953
983
  t.pageCount
954
984
  ] }) : null,
955
- t.items.length === 0 ? /* @__PURE__ */ s(_, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("noItemsEmptyState") }) }) : /* @__PURE__ */ s(Ye, { isUnstyled: !0, margin: "none", "data-testid": "items-list", children: t.items.map((f, I) => /* @__PURE__ */ s(je, { children: /* @__PURE__ */ s(
956
- Bn,
985
+ t.items.length === 0 ? /* @__PURE__ */ s(_, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("noItemsEmptyState") }) }) : /* @__PURE__ */ s(Je, { isUnstyled: !0, margin: "none", "data-testid": "items-list", children: t.items.map((M, T) => /* @__PURE__ */ s(et, { children: /* @__PURE__ */ s(
986
+ ni,
957
987
  {
958
- item: f,
988
+ item: M,
959
989
  today: n,
960
- attachedAbove: Ct(f) && Qe(t.items[I - 1]),
961
- attachedBelow: Qe(f) && Ct(t.items[I + 1]),
990
+ attachedAbove: Nt(M) && tt(t.items[T - 1]),
991
+ attachedBelow: tt(M) && Nt(t.items[T + 1]),
962
992
  stackPill: o,
963
- moduleLabel: i,
964
- itemNumber: d[I]
993
+ moduleLabel: r,
994
+ itemNumber: p[T],
995
+ searchTerm: a
965
996
  }
966
- ) }, f.id)) }),
997
+ ) }, M.id)) }),
967
998
  t.pageCount > 1 ? /* @__PURE__ */ s(
968
- Nt,
999
+ Kt,
969
1000
  {
970
1001
  as: "nav",
971
1002
  variant: "compact",
972
1003
  withFirstAndLastButton: !0,
973
1004
  margin: "small 0 0 0",
974
- label: /* @__PURE__ */ s(di, { children: l("itemsPaginationLabel", { name: e.name }) }),
1005
+ label: /* @__PURE__ */ s(vi, { children: l("itemsPaginationLabel", { name: e.name }) }),
975
1006
  labelFirst: l("paginationFirstPage"),
976
1007
  labelPrev: l("paginationPreviousPage"),
977
1008
  labelNext: l("paginationNextPage"),
978
1009
  labelLast: l("paginationLastPage"),
979
- screenReaderLabelPageButton: (f) => l("paginationPageLabel", { page: f }),
1010
+ screenReaderLabelPageButton: (M) => l("paginationPageLabel", { page: M }),
980
1011
  ellipsis: l("paginationEllipsis"),
981
1012
  totalPageNumber: t.pageCount,
982
1013
  currentPage: t.page,
983
1014
  disabled: t.isRefreshing,
984
- onPageChange: h,
1015
+ onPageChange: S,
985
1016
  "data-testid": "items-pagination"
986
1017
  }
987
1018
  ) : null
988
1019
  ] });
989
1020
  }
990
- function fr({
1021
+ function Dr({
991
1022
  module: e,
992
1023
  expanded: t,
993
1024
  onToggle: n,
994
- itemsState: r,
1025
+ itemsState: i,
995
1026
  today: o,
996
- showDiagnostics: i = !1,
997
- headingLevel: l = "h3",
998
- moduleLabel: u,
999
- breakpoints: a = {},
1000
- toggleRef: d
1027
+ showDiagnostics: r = !1,
1028
+ headingLevel: a = "h3",
1029
+ moduleLabel: l,
1030
+ breakpoints: u = {},
1031
+ toggleRef: c,
1032
+ searchTerm: p
1001
1033
  }) {
1002
- var te, pe, Y, oe, le;
1003
- const { t: g, timezone: p } = N(), h = tt(), f = nt(), { navigation: I } = Ce(), L = On(), w = ((te = e.progress) == null ? void 0 : te.status) === "locked", x = w ? null : ((pe = I.getModuleHref) == null ? void 0 : pe.call(I, e)) ?? null, k = u === void 0 ? f.moduleLabel(e.position, e) : u, S = (k == null ? void 0 : k.trim()) || null, C = S ? g("moduleNameWithLabel", { label: S, name: e.name }) : e.name, Q = /* @__PURE__ */ s(
1004
- me,
1034
+ var V, ue, de, ce, _e;
1035
+ const { t: m, timezone: h } = F(), S = at(), M = ut(), { navigation: T } = ke(), D = Wn(), A = ((V = e.progress) == null ? void 0 : V.status) === "locked", U = A ? null : ((ue = T.getModuleHref) == null ? void 0 : ue.call(T, e)) ?? null, y = l === void 0 ? M.moduleLabel(e.position, e) : l, P = (y == null ? void 0 : y.trim()) || null, Q = P ? m("moduleNameWithLabel", { label: P, name: e.name }) : e.name, B = p ? P ? /* @__PURE__ */ s(
1036
+ Yn,
1037
+ {
1038
+ render: (z) => m("moduleNameWithLabel", { label: P, name: z }),
1039
+ name: e.name,
1040
+ term: p
1041
+ }
1042
+ ) : /* @__PURE__ */ s(jn, { text: e.name, term: p }) : Q, R = /* @__PURE__ */ s(
1043
+ Ie,
1005
1044
  {
1006
- level: l,
1045
+ level: a,
1007
1046
  variant: "titleCardMini",
1008
- color: w ? "secondary" : "primary",
1009
- "aria-label": C,
1047
+ color: A ? "secondary" : "primary",
1048
+ "aria-label": Q,
1010
1049
  "data-testid": "module-name",
1011
- children: /* @__PURE__ */ s(ui, { themeOverride: cr, children: /* @__PURE__ */ s(ai, { linesAllowed: dr, children: C }) })
1050
+ children: /* @__PURE__ */ s(Ci, { themeOverride: Ar, children: /* @__PURE__ */ s(Pi, { linesAllowed: Lr, children: B }) })
1012
1051
  }
1013
- ), T = x ? /* @__PURE__ */ s(
1014
- gi,
1052
+ ), q = U ? /* @__PURE__ */ s(
1053
+ Li,
1015
1054
  {
1016
- href: x,
1055
+ href: U,
1017
1056
  display: "inline-block",
1018
1057
  forceButtonRole: !1,
1019
- variant: L,
1020
- "aria-label": C,
1021
- onClick: (U) => U.stopPropagation(),
1022
- children: Q
1058
+ variant: D,
1059
+ "aria-label": Q,
1060
+ onClick: (z) => z.stopPropagation(),
1061
+ children: R
1023
1062
  }
1024
- ) : Q, A = (((Y = e.completionRequirements) == null ? void 0 : Y.length) ?? 0) > 0 ? /* @__PURE__ */ s(qn, {}) : null, O = a.mobileOnly === !0, $ = () => {
1025
- h(t ? "module-collapse" : "module-expand"), n(e.id);
1026
- }, ee = () => {
1027
- var U;
1028
- (U = window.getSelection()) != null && U.toString().trim() || $();
1029
- }, q = (oe = e.progress) != null && oe.status ? /* @__PURE__ */ s(
1030
- Dn,
1063
+ ) : R, G = (((de = e.completionRequirements) == null ? void 0 : de.length) ?? 0) > 0 ? /* @__PURE__ */ s(Qn, {}) : null, K = u.mobileOnly === !0, Z = () => {
1064
+ S(t ? "module-collapse" : "module-expand"), n(e.id);
1065
+ }, ie = () => {
1066
+ var z;
1067
+ (z = window.getSelection()) != null && z.toString().trim() || Z();
1068
+ }, w = (ce = e.progress) != null && ce.status ? /* @__PURE__ */ s(
1069
+ Kn,
1031
1070
  {
1032
1071
  status: e.progress.status,
1033
1072
  missingCount: e.progress.missingCount,
1034
1073
  incompleteCount: e.progress.incompleteCount
1035
1074
  }
1036
- ) : null, v = ((le = e.progress) == null ? void 0 : le.status) !== void 0 && e.progress.status !== "complete" && !w && zn(e.progress.nextDueAt, o, p) ? /* @__PURE__ */ s($n, {}) : null;
1037
- return /* @__PURE__ */ m(
1075
+ ) : null, X = ((_e = e.progress) == null ? void 0 : _e.status) !== void 0 && e.progress.status !== "complete" && !A && Vn(e.progress.nextDueAt, o, h) ? /* @__PURE__ */ s(Jn, {}) : null;
1076
+ return /* @__PURE__ */ g(
1038
1077
  _,
1039
1078
  {
1040
1079
  as: "div",
@@ -1046,106 +1085,107 @@ function fr({
1046
1085
  margin: "0 0 small 0",
1047
1086
  "data-testid": `module-card-${e.id}`,
1048
1087
  children: [
1049
- /* @__PURE__ */ s(_, { as: "div", cursor: "pointer", children: /* @__PURE__ */ m(
1050
- M,
1088
+ /* @__PURE__ */ s(_, { as: "div", cursor: "pointer", children: /* @__PURE__ */ g(
1089
+ I,
1051
1090
  {
1052
1091
  alignItems: "start",
1053
1092
  gap: "mediumSmall",
1054
- onClick: ee,
1093
+ onClick: ie,
1055
1094
  "data-testid": "module-header",
1056
1095
  children: [
1057
- /* @__PURE__ */ m(M.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1058
- /* @__PURE__ */ m(_, { as: "div", children: [
1059
- /* @__PURE__ */ s(_, { as: "div", children: A ? /* @__PURE__ */ m(M, { alignItems: "center", gap: "x-small", wrap: "wrap", children: [
1060
- /* @__PURE__ */ s(M.Item, { shouldShrink: !0, children: T }),
1061
- /* @__PURE__ */ s(M.Item, { children: A })
1062
- ] }) : T }),
1063
- e.published ? null : /* @__PURE__ */ m(b, { size: "x-small", color: "secondary", children: [
1096
+ /* @__PURE__ */ g(I.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1097
+ /* @__PURE__ */ g(_, { as: "div", children: [
1098
+ /* @__PURE__ */ s(_, { as: "div", children: G ? /* @__PURE__ */ g(I, { alignItems: "center", gap: "x-small", wrap: "wrap", children: [
1099
+ /* @__PURE__ */ s(I.Item, { shouldShrink: !0, children: q }),
1100
+ /* @__PURE__ */ s(I.Item, { children: G })
1101
+ ] }) : q }),
1102
+ e.published ? null : /* @__PURE__ */ g(b, { size: "x-small", color: "secondary", children: [
1064
1103
  " ",
1065
- g("moduleUnpublishedBadge")
1104
+ m("moduleUnpublishedBadge")
1066
1105
  ] })
1067
1106
  ] }),
1068
- /* @__PURE__ */ s(ir, { module: e, today: o }),
1069
- O && (q || v) ? /* @__PURE__ */ s(_, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ m(M, { gap: "x-small", wrap: "wrap", children: [
1070
- v ? /* @__PURE__ */ s(M.Item, { children: v }) : null,
1071
- q ? /* @__PURE__ */ s(M.Item, { children: q }) : null
1107
+ /* @__PURE__ */ s(Tr, { module: e, today: o }),
1108
+ K && (w || X) ? /* @__PURE__ */ s(_, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ g(I, { gap: "x-small", wrap: "wrap", children: [
1109
+ X ? /* @__PURE__ */ s(I.Item, { children: X }) : null,
1110
+ w ? /* @__PURE__ */ s(I.Item, { children: w }) : null
1072
1111
  ] }) }) : null,
1073
- /* @__PURE__ */ s(mr, { module: e, breakpoints: a })
1112
+ /* @__PURE__ */ s(Rr, { module: e, breakpoints: u })
1074
1113
  ] }),
1075
- /* @__PURE__ */ s(M.Item, { children: /* @__PURE__ */ m(M, { alignItems: "center", gap: "mediumSmall", children: [
1076
- !O && (v || q) ? /* @__PURE__ */ s(M.Item, { children: /* @__PURE__ */ m(M, { alignItems: "center", gap: "x-small", children: [
1077
- v ? /* @__PURE__ */ s(M.Item, { children: v }) : null,
1078
- q ? /* @__PURE__ */ s(M.Item, { children: q }) : null
1114
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(I, { alignItems: "center", gap: "mediumSmall", children: [
1115
+ !K && (X || w) ? /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(I, { alignItems: "center", gap: "x-small", children: [
1116
+ X ? /* @__PURE__ */ s(I.Item, { children: X }) : null,
1117
+ w ? /* @__PURE__ */ s(I.Item, { children: w }) : null
1079
1118
  ] }) }) : null,
1080
- /* @__PURE__ */ s(M.Item, { children: /* @__PURE__ */ s(
1081
- ci,
1119
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ s(
1120
+ Qt,
1082
1121
  {
1083
- elementRef: (U) => d == null ? void 0 : d(e.id, U),
1122
+ elementRef: (z) => c == null ? void 0 : c(e.id, z),
1084
1123
  size: "medium",
1085
1124
  withBorder: !0,
1086
1125
  withBackground: !1,
1087
- screenReaderLabel: t ? g("collapseModule", { name: e.name }) : g("expandModule", { name: e.name }),
1126
+ screenReaderLabel: t ? m("collapseModule", { name: e.name }) : m("expandModule", { name: e.name }),
1088
1127
  "aria-expanded": t,
1089
- "aria-controls": Pt(e.id),
1090
- onClick: (U) => {
1091
- U.stopPropagation(), $();
1128
+ "aria-controls": zt(e.id),
1129
+ onClick: (z) => {
1130
+ z.stopPropagation(), Z();
1092
1131
  },
1093
1132
  "data-testid": `toggle-module-${e.id}`,
1094
- children: t ? /* @__PURE__ */ s(ri, {}) : /* @__PURE__ */ s(si, {})
1133
+ children: t ? /* @__PURE__ */ s(_i, {}) : /* @__PURE__ */ s(Ei, {})
1095
1134
  }
1096
1135
  ) })
1097
1136
  ] }) })
1098
1137
  ]
1099
1138
  }
1100
1139
  ) }),
1101
- /* @__PURE__ */ s("div", { id: Pt(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ s(
1102
- pr,
1140
+ /* @__PURE__ */ s("div", { id: zt(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ s(
1141
+ Or,
1103
1142
  {
1104
1143
  module: e,
1105
- state: r,
1144
+ state: i,
1106
1145
  today: o,
1107
- showDiagnostics: i,
1108
- stackPill: O,
1109
- moduleLabel: Nn(e) ? null : S
1146
+ showDiagnostics: r,
1147
+ stackPill: K,
1148
+ moduleLabel: Zn(e) ? null : P,
1149
+ searchTerm: p
1110
1150
  }
1111
1151
  ) : null })
1112
1152
  ]
1113
1153
  }
1114
1154
  );
1115
1155
  }
1116
- const hr = ii(fr), Qs = ["place_new", "reorganize_all"], Jt = ["assignment", "discussion", "quiz", "page", "file"], Ke = 1e3, Mr = () => ({
1156
+ const qr = Ii(Dr), ho = ["place_new", "reorganize_all"], mn = ["assignment", "discussion", "quiz", "page", "file"], nt = 1e3, zr = () => ({
1117
1157
  mode: "place_new",
1118
- contentTypes: [...Jt],
1158
+ contentTypes: [...mn],
1119
1159
  setPrerequisites: !0,
1120
1160
  setRequirements: !0,
1121
1161
  direction: ""
1122
1162
  });
1123
- function _r(e, t) {
1163
+ function Nr(e, t) {
1124
1164
  return e(t === "assignment" ? "itemTypeAssignment" : t === "discussion" ? "itemTypeDiscussion" : t === "quiz" ? "itemTypeQuiz" : t === "page" ? "itemTypePage" : "itemTypeFile");
1125
1165
  }
1126
- const Ve = "prerequisites", Ze = "requirements", Ir = (e) => [
1127
- ...e.setPrerequisites ? [Ve] : [],
1128
- ...e.setRequirements ? [Ze] : []
1166
+ const it = "prerequisites", rt = "requirements", xr = (e) => [
1167
+ ...e.setPrerequisites ? [it] : [],
1168
+ ...e.setRequirements ? [rt] : []
1129
1169
  ];
1130
- function Er({
1170
+ function $r({
1131
1171
  input: e,
1132
1172
  errors: t,
1133
1173
  onChange: n,
1134
- disabled: r = !1
1174
+ disabled: i = !1
1135
1175
  }) {
1136
- const { t: o } = N();
1137
- return /* @__PURE__ */ m(_, { as: "div", "data-testid": "organize-form", children: [
1138
- /* @__PURE__ */ m(
1139
- Si,
1176
+ const { t: o } = F();
1177
+ return /* @__PURE__ */ g(_, { as: "div", "data-testid": "organize-form", children: [
1178
+ /* @__PURE__ */ g(
1179
+ xi,
1140
1180
  {
1141
1181
  name: "organize-mode",
1142
1182
  value: e.mode,
1143
- onChange: (i, l) => n({ mode: l }),
1183
+ onChange: (r, a) => n({ mode: a }),
1144
1184
  description: o("organizeModeLegend"),
1145
- disabled: r,
1185
+ disabled: i,
1146
1186
  children: [
1147
1187
  /* @__PURE__ */ s(
1148
- Et,
1188
+ Rt,
1149
1189
  {
1150
1190
  value: "place_new",
1151
1191
  label: o("organizeModePlaceNew"),
@@ -1153,7 +1193,7 @@ function Er({
1153
1193
  }
1154
1194
  ),
1155
1195
  /* @__PURE__ */ s(
1156
- Et,
1196
+ Rt,
1157
1197
  {
1158
1198
  value: "reorganize_all",
1159
1199
  label: o("organizeModeReorganizeAll"),
@@ -1163,400 +1203,400 @@ function Er({
1163
1203
  ]
1164
1204
  }
1165
1205
  ),
1166
- e.mode === "reorganize_all" ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(X, { variant: "warning", margin: "0", "data-testid": "organize-reorganize-warning", children: o("organizeReorganizeWarning") }) }) : null,
1206
+ e.mode === "reorganize_all" ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(te, { variant: "warning", margin: "0", "data-testid": "organize-reorganize-warning", children: o("organizeReorganizeWarning") }) }) : null,
1167
1207
  /* @__PURE__ */ s(_, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ s(
1168
- It,
1208
+ At,
1169
1209
  {
1170
1210
  name: "organize-content-types",
1171
1211
  value: [...e.contentTypes],
1172
- onChange: (i) => n({ contentTypes: i }),
1212
+ onChange: (r) => n({ contentTypes: r }),
1173
1213
  description: o("organizeContentTypesLegend"),
1174
1214
  messages: t.contentTypes ? [{ type: "newError", text: o("organizeErrorPickAContentType") }] : void 0,
1175
1215
  layout: "columns",
1176
- children: Jt.map((i) => /* @__PURE__ */ s(
1177
- We,
1216
+ children: mn.map((r) => /* @__PURE__ */ s(
1217
+ Ze,
1178
1218
  {
1179
- value: i,
1180
- label: _r(o, i),
1181
- disabled: r,
1182
- "data-testid": `organize-content-type-${i}`
1219
+ value: r,
1220
+ label: Nr(o, r),
1221
+ disabled: i,
1222
+ "data-testid": `organize-content-type-${r}`
1183
1223
  },
1184
- i
1224
+ r
1185
1225
  ))
1186
1226
  }
1187
1227
  ) }),
1188
- /* @__PURE__ */ s(_, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ m(
1189
- It,
1228
+ /* @__PURE__ */ s(_, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ g(
1229
+ At,
1190
1230
  {
1191
1231
  name: "organize-progression",
1192
- value: Ir(e),
1193
- onChange: (i) => n({
1194
- setPrerequisites: i.includes(Ve),
1195
- setRequirements: i.includes(Ze)
1232
+ value: xr(e),
1233
+ onChange: (r) => n({
1234
+ setPrerequisites: r.includes(it),
1235
+ setRequirements: r.includes(rt)
1196
1236
  }),
1197
1237
  description: o("organizeProgressionLegend"),
1198
1238
  children: [
1199
1239
  /* @__PURE__ */ s(
1200
- We,
1240
+ Ze,
1201
1241
  {
1202
- value: Ve,
1242
+ value: it,
1203
1243
  label: o("organizeSetPrerequisites"),
1204
- disabled: r,
1244
+ disabled: i,
1205
1245
  "data-testid": "organize-set-prerequisites"
1206
1246
  }
1207
1247
  ),
1208
1248
  /* @__PURE__ */ s(
1209
- We,
1249
+ Ze,
1210
1250
  {
1211
- value: Ze,
1251
+ value: rt,
1212
1252
  label: o("organizeSetRequirements"),
1213
- disabled: r,
1253
+ disabled: i,
1214
1254
  "data-testid": "organize-set-requirements"
1215
1255
  }
1216
1256
  )
1217
1257
  ]
1218
1258
  }
1219
1259
  ) }),
1220
- /* @__PURE__ */ m(_, { as: "div", margin: "medium 0 0 0", children: [
1260
+ /* @__PURE__ */ g(_, { as: "div", margin: "medium 0 0 0", children: [
1221
1261
  /* @__PURE__ */ s(
1222
- yi,
1262
+ $i,
1223
1263
  {
1224
1264
  label: o("organizeDirectionLabel"),
1225
1265
  placeholder: o("organizeDirectionPlaceholder"),
1226
1266
  value: e.direction,
1227
- onChange: (i) => n({ direction: i.target.value.slice(0, Ke) }),
1228
- disabled: r,
1267
+ onChange: (r) => n({ direction: r.target.value.slice(0, nt) }),
1268
+ disabled: i,
1229
1269
  height: "6rem",
1230
1270
  "data-testid": "organize-direction"
1231
1271
  }
1232
1272
  ),
1233
1273
  /* @__PURE__ */ s(_, { 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", {
1234
1274
  used: e.direction.length,
1235
- max: Ke
1275
+ max: nt
1236
1276
  }) }) })
1237
1277
  ] })
1238
1278
  ] });
1239
1279
  }
1240
- const en = "organize-preview", tn = (e) => `proposed-module-${e + 1}`, Sr = (e) => `${e.contentType}-${e.contentId}`;
1241
- function yr(e, t) {
1280
+ const gn = "organize-preview", pn = (e) => `proposed-module-${e + 1}`, Fr = (e) => `${e.contentType}-${e.contentId}`;
1281
+ function Ur(e, t) {
1242
1282
  const n = e.completionRequirement;
1243
1283
  if (n)
1244
1284
  return { itemId: t, type: n.type, minScore: n.minScore ?? null };
1245
1285
  }
1246
- function Tr(e, t, n) {
1247
- const r = Sr(e);
1286
+ function Br(e, t, n) {
1287
+ const i = Fr(e);
1248
1288
  return {
1249
- id: r,
1289
+ id: i,
1250
1290
  moduleId: t,
1251
1291
  title: e.title,
1252
1292
  type: e.contentType,
1253
1293
  position: n + 1,
1254
1294
  indent: 0,
1255
1295
  published: !0,
1256
- completionRequirement: yr(e, r) ?? null,
1257
- extensions: { [Yn]: e.isNew }
1296
+ completionRequirement: Ur(e, i) ?? null,
1297
+ extensions: { [oi]: e.isNew }
1258
1298
  };
1259
1299
  }
1260
- function br(e) {
1300
+ function Gr(e) {
1261
1301
  const t = /* @__PURE__ */ new Map();
1262
- return e.forEach((n, r) => {
1302
+ return e.forEach((n, i) => {
1263
1303
  t.set(
1264
1304
  n.position,
1265
- t.has(n.position) ? null : { id: tn(r), name: n.name }
1305
+ t.has(n.position) ? null : { id: pn(i), name: n.name }
1266
1306
  );
1267
1307
  }), t;
1268
1308
  }
1269
- function Pr(e, t, n) {
1270
- return e.prerequisitePositions.flatMap((r) => {
1271
- const o = n.get(r);
1309
+ function Hr(e, t, n) {
1310
+ return e.prerequisitePositions.flatMap((i) => {
1311
+ const o = n.get(i);
1272
1312
  return !o || o.id === t ? [] : [o];
1273
1313
  });
1274
1314
  }
1275
- function Cr(e) {
1276
- const t = br(e.modules), n = [], r = {};
1277
- for (const [o, i] of e.modules.entries()) {
1278
- const l = tn(o), u = i.items.map((a, d) => Tr(a, l, d));
1279
- r[l] = u, n.push({
1280
- id: l,
1281
- name: i.name,
1282
- position: i.position,
1315
+ function Wr(e) {
1316
+ const t = Gr(e.modules), n = [], i = {};
1317
+ for (const [o, r] of e.modules.entries()) {
1318
+ const a = pn(o), l = r.items.map((u, c) => Br(u, a, c));
1319
+ i[a] = l, n.push({
1320
+ id: a,
1321
+ name: r.name,
1322
+ position: r.position,
1283
1323
  published: !0,
1284
- itemCount: u.length,
1285
- items: u,
1286
- prerequisiteModules: Pr(i, l, t),
1287
- requirementCount: i.requirementType === "one" ? 1 : null,
1324
+ itemCount: l.length,
1325
+ items: l,
1326
+ prerequisiteModules: Hr(r, a, t),
1327
+ requirementCount: r.requirementType === "one" ? 1 : null,
1288
1328
  requireSequentialProgress: !1,
1289
- completionRequirements: u.flatMap(
1290
- (a) => a.completionRequirement ? [a.completionRequirement] : []
1329
+ completionRequirements: l.flatMap(
1330
+ (u) => u.completionRequirement ? [u.completionRequirement] : []
1291
1331
  ),
1292
1332
  extensions: {
1293
- [Hn]: i.isNew,
1294
- [Wn]: i.items.filter((a) => a.isNew).length,
1295
- [Gn]: !0
1333
+ [si]: r.isNew,
1334
+ [ri]: r.items.filter((u) => u.isNew).length,
1335
+ [ii]: !0
1296
1336
  }
1297
1337
  });
1298
1338
  }
1299
- return { courseId: en, modules: n, itemsByModuleId: r };
1339
+ return { courseId: gn, modules: n, itemsByModuleId: i };
1300
1340
  }
1301
- const vr = {
1341
+ const Yr = {
1302
1342
  itemsLoadedAnnouncement: ""
1303
1343
  };
1304
- function Lr({ proposal: e }) {
1305
- const { t } = N(), n = B(() => Cr(e), [e]), r = B(() => Kn(n), [n]), o = B(() => n.modules.map((l) => l.id), [n]), i = Vn({
1306
- courseId: en,
1307
- adapter: r,
1344
+ function jr({ proposal: e }) {
1345
+ const { t } = F(), n = W(() => Wr(e), [e]), i = W(() => ui(n), [n]), o = W(() => n.modules.map((a) => a.id), [n]), r = di({
1346
+ courseId: gn,
1347
+ adapter: i,
1308
1348
  itemsMode: "inline",
1309
1349
  initialExpandedModuleIds: o
1310
1350
  });
1311
- return /* @__PURE__ */ m(H, { children: [
1312
- /* @__PURE__ */ s(me, { level: "h3", margin: "0 0 medium 0", children: t("organizePreviewHeading") }),
1313
- /* @__PURE__ */ s(Ur, { data: i, headingLevel: "h3" })
1351
+ return /* @__PURE__ */ g(j, { children: [
1352
+ /* @__PURE__ */ s(Ie, { level: "h3", margin: "0 0 medium 0", children: t("organizePreviewHeading") }),
1353
+ /* @__PURE__ */ s(os, { data: r, headingLevel: "h3" })
1314
1354
  ] });
1315
1355
  }
1316
- function wr({ proposal: e }) {
1317
- const { t } = N(), n = Ce(), r = B(() => Zi(n), [n]), [o] = W(
1318
- () => new ei({ defaultOptions: { queries: { retry: !1 } } })
1356
+ function Qr({ proposal: e }) {
1357
+ const { t } = F(), n = ke(), i = W(() => hr(n), [n]), [o] = Y(
1358
+ () => new pi({ defaultOptions: { queries: { retry: !1 } } })
1319
1359
  );
1320
- return /* @__PURE__ */ m(_, { as: "div", "data-testid": "organize-proposal-preview", children: [
1321
- e.unplacedItems.length > 0 ? /* @__PURE__ */ m(X, { variant: "warning", margin: "0 0 small 0", "data-testid": "organize-unplaced", children: [
1360
+ return /* @__PURE__ */ g(_, { as: "div", "data-testid": "organize-proposal-preview", children: [
1361
+ e.unplacedItems.length > 0 ? /* @__PURE__ */ g(te, { variant: "warning", margin: "0 0 small 0", "data-testid": "organize-unplaced", children: [
1322
1362
  /* @__PURE__ */ s(_, { as: "div", children: /* @__PURE__ */ s(b, { weight: "bold", children: t("organizeUnplacedHeading", { count: e.unplacedItems.length }) }) }),
1323
1363
  /* @__PURE__ */ s(_, { as: "div", children: /* @__PURE__ */ s(b, { children: t("organizeUnplacedExplanation") }) }),
1324
- /* @__PURE__ */ s(Ye, { margin: "x-small 0 0 0", children: e.unplacedItems.map((i) => /* @__PURE__ */ s(je, { children: i.title }, `${i.contentType}-${i.contentId}`)) })
1364
+ /* @__PURE__ */ s(Je, { margin: "x-small 0 0 0", children: e.unplacedItems.map((r) => /* @__PURE__ */ s(et, { children: r.title }, `${r.contentType}-${r.contentId}`)) })
1325
1365
  ] }) : null,
1326
- e.warnings.length > 0 ? /* @__PURE__ */ m(X, { variant: "info", margin: "0 0 small 0", "data-testid": "organize-warnings", children: [
1366
+ e.warnings.length > 0 ? /* @__PURE__ */ g(te, { variant: "info", margin: "0 0 small 0", "data-testid": "organize-warnings", children: [
1327
1367
  /* @__PURE__ */ s(_, { as: "div", children: /* @__PURE__ */ s(b, { weight: "bold", children: t("organizeWarningsHeading", { count: e.warnings.length }) }) }),
1328
- /* @__PURE__ */ s(Ye, { margin: "x-small 0 0 0", children: e.warnings.map((i) => /* @__PURE__ */ s(je, { children: i }, i)) })
1368
+ /* @__PURE__ */ s(Je, { margin: "x-small 0 0 0", children: e.warnings.map((r) => /* @__PURE__ */ s(et, { children: r }, r)) })
1329
1369
  ] }) : null,
1330
- /* @__PURE__ */ s(ti, { client: o, children: /* @__PURE__ */ s(jn, { translations: vr, children: /* @__PURE__ */ s(Qn, { value: r, children: /* @__PURE__ */ s(Lr, { proposal: e }) }) }) })
1370
+ /* @__PURE__ */ s(fi, { client: o, children: /* @__PURE__ */ s(li, { translations: Yr, children: /* @__PURE__ */ s(ai, { value: i, children: /* @__PURE__ */ s(jr, { proposal: e }) }) }) })
1331
1371
  ] });
1332
1372
  }
1333
- function vt(e) {
1373
+ function xt(e) {
1334
1374
  const t = {};
1335
- return e.contentTypes.length === 0 && (t.contentTypes = "none_selected"), e.direction.length > Ke && (t.direction = "too_long"), t;
1375
+ return e.contentTypes.length === 0 && (t.contentTypes = "none_selected"), e.direction.length > nt && (t.direction = "too_long"), t;
1336
1376
  }
1337
- const Lt = (e) => Object.keys(e).length > 0, Ar = 1e4, Rr = (e) => e instanceof DOMException && e.name === "AbortError", kr = (e) => e instanceof Error ? e : new Error(String(e)), Or = { loading: "read", applying: "write" }, wt = (e) => {
1377
+ const $t = (e) => Object.keys(e).length > 0, Kr = 1e4, Vr = (e) => e instanceof DOMException && e.name === "AbortError", Zr = (e) => e instanceof Error ? e : new Error(String(e)), Xr = { loading: "read", applying: "write" }, Ft = (e) => {
1338
1378
  (e == null ? void 0 : e.kind) === "read" && e.controller.abort();
1339
1379
  };
1340
- function qr({
1380
+ function Jr({
1341
1381
  actions: e,
1342
1382
  onApplied: t
1343
1383
  }) {
1344
- const [n, r] = W("form"), [o, i] = W(Mr), [l, u] = W(null), [a, d] = W(null), [g, p] = W(!1), h = R(null), f = R(0), I = R(!0);
1345
- G(() => (I.current = !0, () => {
1346
- I.current = !1, wt(h.current), h.current = null;
1384
+ const [n, i] = Y("form"), [o, r] = Y(zr), [a, l] = Y(null), [u, c] = Y(null), [p, m] = Y(!1), h = L(null), S = L(0), M = L(!0);
1385
+ $(() => (M.current = !0, () => {
1386
+ M.current = !1, Ft(h.current), h.current = null;
1347
1387
  }), []);
1348
- const L = B(() => vt(o), [o]), w = !Lt(L), x = F(() => {
1349
- wt(h.current), h.current = null, f.current += 1, p(!1);
1350
- }, []), k = F((T) => {
1351
- i((A) => ({ ...A, ...T }));
1352
- }, []), S = F(
1353
- (T, A, O) => {
1354
- x();
1355
- const $ = new AbortController(), ee = f.current;
1356
- h.current = { kind: Or[T], controller: $ }, d(null), r(T);
1357
- const q = () => I.current && f.current === ee;
1358
- O({ signal: $.signal, current: q }).catch((se) => {
1359
- $.signal.aborted || Rr(se) || !q() || (d(kr(se)), r(A));
1388
+ const T = W(() => xt(o), [o]), D = !$t(T), A = x(() => {
1389
+ Ft(h.current), h.current = null, S.current += 1, m(!1);
1390
+ }, []), U = x((C) => {
1391
+ r((R) => ({ ...R, ...C }));
1392
+ }, []), y = x(
1393
+ (C, R, q) => {
1394
+ A();
1395
+ const G = new AbortController(), K = S.current;
1396
+ h.current = { kind: Xr[C], controller: G }, c(null), i(C);
1397
+ const Z = () => M.current && S.current === K;
1398
+ q({ signal: G.signal, current: Z }).catch((ie) => {
1399
+ G.signal.aborted || Vr(ie) || !Z() || (c(Zr(ie)), i(R));
1360
1400
  });
1361
1401
  },
1362
- [x]
1363
- ), C = F(() => {
1364
- Lt(vt(o)) || S("loading", "error", async ({ signal: T, current: A }) => {
1365
- const O = await e.organize(o, T);
1366
- T.aborted || !A() || (u(O), r("preview"));
1402
+ [A]
1403
+ ), P = x(() => {
1404
+ $t(xt(o)) || y("loading", "error", async ({ signal: C, current: R }) => {
1405
+ const q = await e.organize(o, C);
1406
+ C.aborted || !R() || (l(q), i("preview"));
1367
1407
  });
1368
- }, [e, o, S]), j = F(() => {
1369
- l !== null && S("applying", "preview", async ({ signal: T }) => {
1370
- await e.apply(l, o, T), t == null || t();
1408
+ }, [e, o, y]), Q = x(() => {
1409
+ a !== null && y("applying", "preview", async ({ signal: C }) => {
1410
+ await e.apply(a, o, C), t == null || t();
1371
1411
  });
1372
- }, [e, o, t, l, S]), Q = F(() => {
1373
- x(), u(null), d(null), r("form");
1374
- }, [x]);
1375
- return G(() => {
1412
+ }, [e, o, t, a, y]), B = x(() => {
1413
+ A(), l(null), c(null), i("form");
1414
+ }, [A]);
1415
+ return $(() => {
1376
1416
  if (n !== "loading" && n !== "applying") return;
1377
- const T = setTimeout(() => p(!0), Ar);
1378
- return () => clearTimeout(T);
1417
+ const C = setTimeout(() => m(!0), Kr);
1418
+ return () => clearTimeout(C);
1379
1419
  }, [n]), {
1380
1420
  status: n,
1381
1421
  input: o,
1382
- setInput: k,
1383
- errors: L,
1384
- canSubmit: w,
1385
- proposal: l,
1386
- error: a,
1387
- takingLong: g && (n === "loading" || n === "applying"),
1388
- submit: C,
1389
- regenerate: C,
1390
- apply: j,
1391
- cancel: Q
1422
+ setInput: U,
1423
+ errors: T,
1424
+ canSubmit: D,
1425
+ proposal: a,
1426
+ error: u,
1427
+ takingLong: p && (n === "loading" || n === "applying"),
1428
+ submit: P,
1429
+ regenerate: P,
1430
+ apply: Q,
1431
+ cancel: B
1392
1432
  };
1393
1433
  }
1394
- function At({ label: e, takingLong: t }) {
1395
- const { t: n } = N();
1396
- return /* @__PURE__ */ m(_, { as: "div", padding: "x-large", textAlign: "center", "data-testid": "organize-working", children: [
1397
- /* @__PURE__ */ s(it, { renderTitle: e }),
1434
+ function Ut({ label: e, takingLong: t }) {
1435
+ const { t: n } = F();
1436
+ return /* @__PURE__ */ g(_, { as: "div", padding: "x-large", textAlign: "center", "data-testid": "organize-working", children: [
1437
+ /* @__PURE__ */ s(dt, { renderTitle: e }),
1398
1438
  /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(b, { color: "secondary", children: e }) }),
1399
1439
  t ? /* @__PURE__ */ s(_, { 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
1400
1440
  ] });
1401
1441
  }
1402
- function Dr({
1442
+ function es({
1403
1443
  actions: e,
1404
1444
  open: t,
1405
1445
  onDismiss: n,
1406
- onApplied: r,
1446
+ onApplied: i,
1407
1447
  aiDisclosure: o
1408
1448
  }) {
1409
- const { t: i } = N(), l = R(!0);
1410
- G(() => (l.current = !0, () => {
1411
- l.current = !1;
1449
+ const { t: r } = F(), a = L(!0);
1450
+ $(() => (a.current = !0, () => {
1451
+ a.current = !1;
1412
1452
  }), []);
1413
- const u = qr({
1453
+ const l = Jr({
1414
1454
  actions: e,
1415
1455
  onApplied: () => {
1416
- z(i("organizeAppliedAnnouncement")), r == null || r(), l.current && n();
1456
+ O(r("organizeAppliedAnnouncement")), i == null || i(), a.current && n();
1417
1457
  }
1418
- }), { status: a, proposal: d, error: g, takingLong: p } = u;
1419
- return G(() => {
1420
- t && (a === "loading" && z(i("organizeLoadingLabel")), a === "applying" && z(i("organizeApplyingLabel")), a === "preview" && g === null && z(i("organizeProposalReadyAnnouncement")));
1421
- }, [t, a, g, i]), G(() => {
1422
- p && z(i("organizeStillWorking"));
1423
- }, [p, i]), /* @__PURE__ */ m(
1424
- Mi,
1458
+ }), { status: u, proposal: c, error: p, takingLong: m } = l;
1459
+ return $(() => {
1460
+ t && (u === "loading" && O(r("organizeLoadingLabel")), u === "applying" && O(r("organizeApplyingLabel")), u === "preview" && p === null && O(r("organizeProposalReadyAnnouncement")));
1461
+ }, [t, u, p, r]), $(() => {
1462
+ m && O(r("organizeStillWorking"));
1463
+ }, [m, r]), /* @__PURE__ */ g(
1464
+ Di,
1425
1465
  {
1426
1466
  open: t,
1427
1467
  onDismiss: n,
1428
1468
  size: "large",
1429
- label: i("organizeModalLabel"),
1469
+ label: r("organizeModalLabel"),
1430
1470
  shouldCloseOnDocumentClick: !1,
1431
1471
  children: [
1432
- /* @__PURE__ */ m(_i, { children: [
1472
+ /* @__PURE__ */ g(qi, { children: [
1433
1473
  /* @__PURE__ */ s(
1434
- mi,
1474
+ wi,
1435
1475
  {
1436
1476
  placement: "end",
1437
1477
  offset: "small",
1438
1478
  onClick: n,
1439
- screenReaderLabel: i("organizeCloseModal"),
1479
+ screenReaderLabel: r("organizeCloseModal"),
1440
1480
  "data-testid": "organize-close-modal"
1441
1481
  }
1442
1482
  ),
1443
- /* @__PURE__ */ m(M, { alignItems: "center", gap: "small", children: [
1444
- /* @__PURE__ */ s(M.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ s(me, { level: "h2", "data-testid": "organize-modal-title", children: i("organizeModalLabel") }) }),
1445
- o ? /* @__PURE__ */ s(M.Item, { "data-testid": "organize-ai-disclosure", children: o }) : null
1483
+ /* @__PURE__ */ g(I, { alignItems: "center", gap: "small", children: [
1484
+ /* @__PURE__ */ s(I.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ s(Ie, { level: "h2", "data-testid": "organize-modal-title", children: r("organizeModalLabel") }) }),
1485
+ o ? /* @__PURE__ */ s(I.Item, { "data-testid": "organize-ai-disclosure", children: o }) : null
1446
1486
  ] })
1447
1487
  ] }),
1448
- /* @__PURE__ */ m(Ii, { children: [
1449
- a === "form" ? /* @__PURE__ */ s(
1450
- Er,
1488
+ /* @__PURE__ */ g(zi, { children: [
1489
+ u === "form" ? /* @__PURE__ */ s(
1490
+ $r,
1451
1491
  {
1452
- input: u.input,
1453
- errors: u.errors,
1454
- onChange: u.setInput
1492
+ input: l.input,
1493
+ errors: l.errors,
1494
+ onChange: l.setInput
1455
1495
  }
1456
1496
  ) : null,
1457
- a === "loading" ? /* @__PURE__ */ s(At, { label: i("organizeLoadingLabel"), takingLong: p }) : null,
1458
- a === "applying" ? /* @__PURE__ */ s(At, { label: i("organizeApplyingLabel"), takingLong: p }) : null,
1459
- a === "preview" && d ? /* @__PURE__ */ m(H, { children: [
1460
- g ? /* @__PURE__ */ s(
1461
- X,
1497
+ u === "loading" ? /* @__PURE__ */ s(Ut, { label: r("organizeLoadingLabel"), takingLong: m }) : null,
1498
+ u === "applying" ? /* @__PURE__ */ s(Ut, { label: r("organizeApplyingLabel"), takingLong: m }) : null,
1499
+ u === "preview" && c ? /* @__PURE__ */ g(j, { children: [
1500
+ p ? /* @__PURE__ */ s(
1501
+ te,
1462
1502
  {
1463
1503
  variant: "error",
1464
1504
  margin: "0 0 small 0",
1465
- liveRegion: be,
1505
+ liveRegion: Ae,
1466
1506
  liveRegionPoliteness: "assertive",
1467
1507
  "data-testid": "organize-apply-error",
1468
- children: i("organizeApplyFailed", { message: g.message })
1508
+ children: r("organizeApplyFailed", { message: p.message })
1469
1509
  }
1470
1510
  ) : null,
1471
- /* @__PURE__ */ s(wr, { proposal: d })
1511
+ /* @__PURE__ */ s(Qr, { proposal: c })
1472
1512
  ] }) : null,
1473
- a === "error" ? /* @__PURE__ */ s(
1474
- X,
1513
+ u === "error" ? /* @__PURE__ */ s(
1514
+ te,
1475
1515
  {
1476
1516
  variant: "error",
1477
1517
  margin: "0",
1478
- liveRegion: be,
1518
+ liveRegion: Ae,
1479
1519
  liveRegionPoliteness: "assertive",
1480
1520
  "data-testid": "organize-error",
1481
- children: i("organizeFailed", { message: (g == null ? void 0 : g.message) ?? "" })
1521
+ children: r("organizeFailed", { message: (p == null ? void 0 : p.message) ?? "" })
1482
1522
  }
1483
1523
  ) : null
1484
1524
  ] }),
1485
- /* @__PURE__ */ m(Ei, { children: [
1486
- a === "form" ? /* @__PURE__ */ m(H, { children: [
1487
- /* @__PURE__ */ s(D, { onClick: n, margin: "0 x-small 0 0", "data-testid": "organize-close", children: i("organizeCancel") }),
1525
+ /* @__PURE__ */ g(Ni, { children: [
1526
+ u === "form" ? /* @__PURE__ */ g(j, { children: [
1527
+ /* @__PURE__ */ s(N, { onClick: n, margin: "0 x-small 0 0", "data-testid": "organize-close", children: r("organizeCancel") }),
1488
1528
  /* @__PURE__ */ s(
1489
- D,
1529
+ N,
1490
1530
  {
1491
1531
  color: "ai-primary",
1492
- onClick: u.submit,
1493
- interaction: u.canSubmit ? "enabled" : "disabled",
1532
+ onClick: l.submit,
1533
+ interaction: l.canSubmit ? "enabled" : "disabled",
1494
1534
  "data-testid": "organize-submit",
1495
- children: i("organizeSubmit")
1535
+ children: r("organizeSubmit")
1496
1536
  }
1497
1537
  )
1498
1538
  ] }) : null,
1499
- a === "loading" ? /* @__PURE__ */ s(D, { onClick: u.cancel, "data-testid": "organize-cancel-loading", children: i("organizeCancel") }) : null,
1500
- a === "preview" ? /* @__PURE__ */ m(H, { children: [
1501
- /* @__PURE__ */ s(D, { onClick: u.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: i("organizeStartOver") }),
1539
+ u === "loading" ? /* @__PURE__ */ s(N, { onClick: l.cancel, "data-testid": "organize-cancel-loading", children: r("organizeCancel") }) : null,
1540
+ u === "preview" ? /* @__PURE__ */ g(j, { children: [
1541
+ /* @__PURE__ */ s(N, { onClick: l.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: r("organizeStartOver") }),
1502
1542
  /* @__PURE__ */ s(
1503
- D,
1543
+ N,
1504
1544
  {
1505
- onClick: u.regenerate,
1545
+ onClick: l.regenerate,
1506
1546
  margin: "0 x-small 0 0",
1507
1547
  "data-testid": "organize-regenerate",
1508
- children: i("organizeRegenerate")
1548
+ children: r("organizeRegenerate")
1509
1549
  }
1510
1550
  ),
1511
- /* @__PURE__ */ s(D, { color: "primary", onClick: u.apply, "data-testid": "organize-apply", children: i("organizeApply") })
1551
+ /* @__PURE__ */ s(N, { color: "primary", onClick: l.apply, "data-testid": "organize-apply", children: r("organizeApply") })
1512
1552
  ] }) : null,
1513
- a === "error" ? /* @__PURE__ */ m(H, { children: [
1514
- /* @__PURE__ */ s(D, { onClick: u.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: i("organizeStartOver") }),
1515
- /* @__PURE__ */ s(D, { color: "primary", onClick: u.submit, "data-testid": "organize-retry", children: i("organizeTryAgain") })
1553
+ u === "error" ? /* @__PURE__ */ g(j, { children: [
1554
+ /* @__PURE__ */ s(N, { onClick: l.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: r("organizeStartOver") }),
1555
+ /* @__PURE__ */ s(N, { color: "primary", onClick: l.submit, "data-testid": "organize-retry", children: r("organizeTryAgain") })
1516
1556
  ] }) : null,
1517
- a === "applying" ? /* @__PURE__ */ s(D, { interaction: "disabled", "data-testid": "organize-applying", children: i("organizeApply") }) : null
1557
+ u === "applying" ? /* @__PURE__ */ s(N, { interaction: "disabled", "data-testid": "organize-applying", children: r("organizeApply") }) : null
1518
1558
  ] })
1519
1559
  ]
1520
1560
  }
1521
1561
  );
1522
1562
  }
1523
- function zr({
1563
+ function ts({
1524
1564
  actions: e,
1525
1565
  onApplied: t,
1526
1566
  aiDisclosure: n,
1527
- display: r = "inline-block"
1567
+ display: i = "inline-block"
1528
1568
  }) {
1529
- const { t: o } = N(), [i, l] = W(!1);
1530
- return /* @__PURE__ */ m(H, { children: [
1569
+ const { t: o } = F(), [r, a] = Y(!1);
1570
+ return /* @__PURE__ */ g(j, { children: [
1531
1571
  /* @__PURE__ */ s(
1532
- D,
1572
+ N,
1533
1573
  {
1534
1574
  color: "ai-primary",
1535
- display: r,
1536
- onClick: () => l(!0),
1537
- renderIcon: i ? /* @__PURE__ */ s(oi, {}) : /* @__PURE__ */ s(li, {}),
1575
+ display: i,
1576
+ onClick: () => a(!0),
1577
+ renderIcon: r ? /* @__PURE__ */ s(Si, {}) : /* @__PURE__ */ s(Ti, {}),
1538
1578
  "data-testid": "organize-modules-trigger",
1539
1579
  children: o("organizeModulesTrigger")
1540
1580
  }
1541
1581
  ),
1542
- i ? /* @__PURE__ */ s(
1543
- Dr,
1582
+ r ? /* @__PURE__ */ s(
1583
+ es,
1544
1584
  {
1545
1585
  actions: e,
1546
1586
  open: !0,
1547
- onDismiss: () => l(!1),
1587
+ onDismiss: () => a(!1),
1548
1588
  onApplied: t,
1549
1589
  aiDisclosure: n
1550
1590
  }
1551
1591
  ) : null
1552
1592
  ] });
1553
1593
  }
1554
- function Nr({
1594
+ function ns({
1555
1595
  counts: e,
1556
1596
  itemsMode: t,
1557
1597
  loadedModules: n
1558
1598
  }) {
1559
- const r = e.listModules + e.listModuleItems;
1599
+ const i = e.listModules + e.listModuleItems;
1560
1600
  return /* @__PURE__ */ s(
1561
1601
  _,
1562
1602
  {
@@ -1567,25 +1607,25 @@ function Nr({
1567
1607
  padding: "x-small small",
1568
1608
  margin: "0 0 small 0",
1569
1609
  "data-testid": "dev-diagnostics",
1570
- children: /* @__PURE__ */ m(M, { gap: "medium", wrap: "wrap", children: [
1571
- /* @__PURE__ */ s(M.Item, { children: /* @__PURE__ */ s(b, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1572
- /* @__PURE__ */ s(M.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1610
+ children: /* @__PURE__ */ g(I, { gap: "medium", wrap: "wrap", children: [
1611
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ s(b, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1612
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1573
1613
  "listModules: ",
1574
1614
  e.listModules
1575
1615
  ] }) }),
1576
- /* @__PURE__ */ s(M.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1616
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1577
1617
  "listModuleItems: ",
1578
1618
  e.listModuleItems
1579
1619
  ] }) }),
1580
- /* @__PURE__ */ s(M.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1620
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1581
1621
  "total: ",
1582
- r
1622
+ i
1583
1623
  ] }) }),
1584
- /* @__PURE__ */ s(M.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1624
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1585
1625
  "itemsMode: ",
1586
1626
  t ?? "probing…"
1587
1627
  ] }) }),
1588
- /* @__PURE__ */ s(M.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1628
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1589
1629
  "modules loaded: ",
1590
1630
  n
1591
1631
  ] }) })
@@ -1593,172 +1633,208 @@ function Nr({
1593
1633
  }
1594
1634
  );
1595
1635
  }
1596
- const xr = 200;
1597
- function $r({
1636
+ const is = 200, rs = "22rem";
1637
+ function ss({
1598
1638
  data: e,
1599
1639
  today: t,
1600
1640
  requestCounts: n,
1601
- showDiagnostics: r = n !== void 0,
1641
+ showDiagnostics: i = n !== void 0,
1602
1642
  as: o = "div",
1603
- headingLevel: i = "h2",
1604
- organizationActions: l,
1605
- onOrganizationApplied: u,
1606
- organizationAiDisclosure: a,
1607
- breakpoints: d = {}
1643
+ headingLevel: r = "h2",
1644
+ organizationActions: a,
1645
+ onOrganizationApplied: l,
1646
+ organizationAiDisclosure: u,
1647
+ breakpoints: c = {}
1608
1648
  }) {
1609
- const { miniTablet: g, tablet: p, desktop: h, desktopNavOpen: f, desktopOnly: I, mobileOnly: L, ICEDesktop: w } = d, x = B(
1610
- () => ({ miniTablet: g, tablet: p, desktop: h, desktopNavOpen: f, desktopOnly: I, mobileOnly: L, ICEDesktop: w }),
1611
- [g, p, h, f, I, L, w]
1649
+ const { miniTablet: p, tablet: m, desktop: h, desktopNavOpen: S, desktopOnly: M, mobileOnly: T, ICEDesktop: D } = c, A = W(
1650
+ () => ({ miniTablet: p, tablet: m, desktop: h, desktopNavOpen: S, desktopOnly: M, mobileOnly: T, ICEDesktop: D }),
1651
+ [p, m, h, S, M, T, D]
1612
1652
  ), {
1613
- modules: k,
1614
- page: S,
1615
- pageCount: C,
1616
- pageSize: j,
1617
- pageInfo: Q,
1618
- hasNextPage: T,
1619
- hasPreviousPage: A,
1620
- goToFirstPage: O,
1621
- goToPreviousPage: $,
1622
- goToNextPage: ee,
1623
- goToLastPage: q,
1624
- isLoading: se,
1625
- isRefreshing: v,
1626
- error: te,
1627
- itemsMode: pe,
1628
- expandedModuleIds: Y,
1629
- expandModule: oe,
1630
- collapseModule: le,
1631
- toggleModule: U,
1632
- expandModules: sn,
1633
- collapseModules: on,
1634
- expandAllModules: ln,
1635
- collapseAllModules: an,
1636
- isPersistingCollapsed: un,
1637
- getItems: Le,
1638
- filter: fe,
1639
- setFilter: st,
1640
- filterEntry: dn,
1641
- filterPredicate: we
1642
- } = e, { t: E, timezone: ot } = N(), he = tt(), { filters: lt } = Ce(), cn = B(() => et(lt).length > 0, [lt]), at = R(null), Ae = R(/* @__PURE__ */ new Map()), Re = R(/* @__PURE__ */ new Map()), K = L === !0, ae = R(null), mn = F((c) => {
1643
- var y, Z;
1644
- (y = Ae.current.get(c)) == null || y.scrollIntoView({ behavior: "smooth", block: "start" }), (Z = Re.current.get(c)) == null || Z.focus({ preventScroll: !0 });
1645
- }, []), gn = F((c, y) => {
1646
- y ? Re.current.set(c, y) : Re.current.delete(c);
1647
- }, []), [pn] = W(() => /* @__PURE__ */ new Date()), ke = t ?? pn;
1648
- G(() => {
1649
- var y;
1650
- if (ae.current === null || v) return;
1651
- const c = ae.current === "focusList";
1652
- ae.current = null, z(E("pageChangedAnnouncement", { page: S, pageCount: C })), c && ((y = at.current) == null || y.focus());
1653
- }, [v, S, C, E]);
1654
- const Oe = F(
1655
- (c, y = "focusList") => {
1656
- ae.current = y, he("paginate-modules"), c === 1 ? O() : c === S - 1 ? $() : c === S + 1 ? ee() : c === C && q();
1653
+ modules: U,
1654
+ page: y,
1655
+ pageCount: P,
1656
+ pageSize: Q,
1657
+ pageInfo: B,
1658
+ hasNextPage: C,
1659
+ hasPreviousPage: R,
1660
+ goToFirstPage: q,
1661
+ goToPreviousPage: G,
1662
+ goToNextPage: K,
1663
+ goToLastPage: Z,
1664
+ isLoading: ie,
1665
+ isRefreshing: w,
1666
+ error: ae,
1667
+ itemsMode: X,
1668
+ expandedModuleIds: V,
1669
+ expandModule: ue,
1670
+ collapseModule: de,
1671
+ toggleModule: ce,
1672
+ expandModules: _e,
1673
+ collapseModules: z,
1674
+ expandAllModules: In,
1675
+ collapseAllModules: Mn,
1676
+ isPersistingCollapsed: _n,
1677
+ getItems: De,
1678
+ filter: Ee,
1679
+ setFilter: mt,
1680
+ filterEntry: En,
1681
+ filterPredicate: qe,
1682
+ search: me,
1683
+ searchEnabled: Sn,
1684
+ searchInput: gt,
1685
+ setSearchInput: Tn,
1686
+ clearSearch: pt
1687
+ } = e, { t: E, timezone: ft } = F(), Se = at(), { filters: ht } = ke(), yn = W(() => lt(ht).length > 0, [ht]), It = L(null), ze = L(/* @__PURE__ */ new Map()), Ne = L(/* @__PURE__ */ new Map()), H = T === !0, Mt = L(null), re = L(null), Te = L(null), bn = x((d) => {
1688
+ var f, k;
1689
+ (f = ze.current.get(d)) == null || f.scrollIntoView({ behavior: "smooth", block: "start" }), (k = Ne.current.get(d)) == null || k.focus({ preventScroll: !0 });
1690
+ }, []), Pn = x((d, f) => {
1691
+ f ? Ne.current.set(d, f) : Ne.current.delete(d);
1692
+ }, []), [Cn] = Y(() => /* @__PURE__ */ new Date()), xe = t ?? Cn;
1693
+ Mi(() => {
1694
+ if (re.current !== "keepFocus" || !Te.current) return;
1695
+ const { control: d, fallback: f, scrollY: k } = Te.current;
1696
+ Te.current = null, d == null || d.focus({ preventScroll: !0 }), document.activeElement !== d && (f == null || f.focus({ preventScroll: !0 })), window.scrollTo({ top: k });
1697
+ }, [y]), $(() => {
1698
+ var f;
1699
+ if (re.current === null || w) return;
1700
+ const d = re.current === "focusList";
1701
+ re.current = null, O(E("pageChangedAnnouncement", { page: y, pageCount: P })), d && ((f = It.current) == null || f.focus({ preventScroll: !0 }));
1702
+ }, [w, y, P, E]);
1703
+ const $e = x(
1704
+ (d = null, f = null) => {
1705
+ const k = document.activeElement instanceof HTMLElement ? document.activeElement : null;
1706
+ re.current = "keepFocus", Te.current = {
1707
+ control: d ?? k,
1708
+ fallback: f,
1709
+ scrollY: window.scrollY
1710
+ };
1711
+ },
1712
+ []
1713
+ ), Fe = x(
1714
+ (d, f = null, k = null) => {
1715
+ $e(f, k), Se("paginate-modules"), d === 1 ? q() : d === y - 1 ? G() : d === y + 1 ? K() : d === P && Z();
1657
1716
  },
1658
- [S, C, O, $, ee, q, he]
1659
- ), qe = B(
1660
- () => k.filter(
1661
- (c) => we === void 0 || we(c, { today: ke, timezone: ot })
1717
+ [
1718
+ y,
1719
+ P,
1720
+ q,
1721
+ G,
1722
+ K,
1723
+ Z,
1724
+ Se,
1725
+ $e
1726
+ ]
1727
+ ), Ue = W(
1728
+ () => U.filter(
1729
+ (d) => qe === void 0 || qe(d, { today: xe, timezone: ft })
1662
1730
  ),
1663
- [k, we, ke, ot]
1664
- ), ut = R({
1665
- rows: qe,
1666
- expanded: Y,
1731
+ [U, qe, xe, ft]
1732
+ ), _t = L({
1733
+ rows: Ue,
1734
+ expanded: V,
1667
1735
  items: /* @__PURE__ */ new Map()
1668
- }), [P, ue] = W(null);
1669
- v ? P === null && ue(ut.current) : (ut.current = {
1670
- rows: qe,
1671
- expanded: Y,
1672
- items: new Map(Y.map((c) => [c, Le(c)]))
1673
- }, P !== null && ue(null));
1674
- const V = (P == null ? void 0 : P.rows) ?? qe, De = (P == null ? void 0 : P.expanded) ?? Y, dt = B(() => new Set(De), [De]), de = B(
1675
- () => V.filter((c) => dt.has(c.id)).map((c) => c.id),
1676
- [V, dt]
1677
- ), ct = de.length > 0, [ze, Ne] = W(!1), Me = de.filter((c) => Le(c).isLoading).length, ne = R(!1);
1678
- G(() => {
1679
- if (ze) {
1680
- if (Me > 0 && !ne.current) {
1681
- ne.current = !0, z(E("expandAllLoadingItems", { count: Me }));
1736
+ }), [v, ge] = Y(null);
1737
+ w ? v === null && ge(_t.current) : (_t.current = {
1738
+ rows: Ue,
1739
+ expanded: V,
1740
+ items: new Map(V.map((d) => [d, De(d)]))
1741
+ }, v !== null && ge(null));
1742
+ const J = (v == null ? void 0 : v.rows) ?? Ue, Be = (v == null ? void 0 : v.expanded) ?? V, Et = W(() => new Set(Be), [Be]), pe = W(
1743
+ () => J.filter((d) => Et.has(d.id)).map((d) => d.id),
1744
+ [J, Et]
1745
+ ), St = pe.length > 0, [Ge, He] = Y(!1), ye = pe.filter((d) => De(d).isLoading).length, se = L(!1);
1746
+ $(() => {
1747
+ if (Ge) {
1748
+ if (ye > 0 && !se.current) {
1749
+ se.current = !0, O(E("expandAllLoadingItems", { count: ye }));
1682
1750
  return;
1683
1751
  }
1684
- Me === 0 && (ne.current && Y.length > 0 && z(E("expandAllItemsLoaded")), ne.current = !1, Ne(!1));
1752
+ ye === 0 && (se.current && V.length > 0 && O(E("expandAllItemsLoaded")), se.current = !1, He(!1));
1685
1753
  }
1686
- }, [ze, Me, Y.length, E]);
1687
- const xe = ze || un, $e = R(null), Ue = R(!1);
1688
- G(() => {
1689
- var c;
1690
- xe || !Ue.current || (Ue.current = !1, (c = $e.current) == null || c.focus());
1691
- }, [xe]);
1692
- const fn = () => {
1693
- if (Ue.current = document.activeElement === $e.current, ct) {
1694
- he("collapse-all");
1695
- const y = new Set(de);
1696
- Ne(!1), ne.current = !1, fe === ye ? an() : on(de), P !== null && ue({ ...P, expanded: P.expanded.filter((Z) => !y.has(Z)) }), z(E("modulesCollapsedAnnouncement", { count: de.length }));
1754
+ }, [Ge, ye, V.length, E]);
1755
+ const We = Ge || _n, Ye = L(null), je = L(!1);
1756
+ $(() => {
1757
+ var d;
1758
+ We || !je.current || (je.current = !1, (d = Ye.current) == null || d.focus());
1759
+ }, [We]);
1760
+ const vn = () => {
1761
+ if (je.current = document.activeElement === Ye.current, St) {
1762
+ Se("collapse-all");
1763
+ const f = new Set(pe);
1764
+ He(!1), se.current = !1, Ee === we && me === void 0 ? Mn() : z(pe), v !== null && ge({ ...v, expanded: v.expanded.filter((k) => !f.has(k)) }), O(E("modulesCollapsedAnnouncement", { count: pe.length }));
1697
1765
  return;
1698
1766
  }
1699
- he("expand-all");
1700
- const c = V.map((y) => y.id);
1701
- Ne(!0), ne.current = !1, fe === ye ? ln() : sn(c), P !== null && ue({ ...P, expanded: c }), z(E("modulesExpandedAnnouncement", { count: c.length }));
1702
- }, mt = R(P);
1703
- mt.current = P;
1704
- const hn = F(
1705
- (c) => {
1706
- const y = mt.current;
1707
- if (y === null) {
1708
- U(c);
1767
+ Se("expand-all");
1768
+ const d = J.map((f) => f.id);
1769
+ He(!0), se.current = !1, Ee === we && me === void 0 ? In() : _e(d), v !== null && ge({ ...v, expanded: d }), O(E("modulesExpandedAnnouncement", { count: d.length }));
1770
+ }, Tt = L(v);
1771
+ Tt.current = v;
1772
+ const wn = x(
1773
+ (d) => {
1774
+ const f = Tt.current;
1775
+ if (f === null) {
1776
+ ce(d);
1709
1777
  return;
1710
1778
  }
1711
- const Z = y.expanded.includes(c);
1712
- ue({
1713
- ...y,
1714
- expanded: Z ? y.expanded.filter((In) => In !== c) : [...y.expanded, c]
1715
- }), Z ? le(c) : oe(c);
1779
+ const k = f.expanded.includes(d);
1780
+ ge({
1781
+ ...f,
1782
+ expanded: k ? f.expanded.filter((Rn) => Rn !== d) : [...f.expanded, d]
1783
+ }), k ? de(d) : ue(d);
1716
1784
  },
1717
- [U, le, oe]
1718
- ), [Mn, gt] = W(!1);
1719
- G(() => {
1720
- if (!v) {
1721
- gt(!1);
1785
+ [ce, de, ue]
1786
+ ), [Ln, yt] = Y(!1);
1787
+ $(() => {
1788
+ if (!w) {
1789
+ yt(!1);
1722
1790
  return;
1723
1791
  }
1724
- const c = setTimeout(() => gt(!0), xr);
1725
- return () => clearTimeout(c);
1726
- }, [v]);
1727
- const _e = dn !== void 0 && fe !== ye, Fe = se || v && V.length === 0, Ie = V.length === 0 && !Fe && !te, Ee = Ie && _e, Be = i === "h1" ? "h2" : "h3";
1728
- G(() => {
1729
- Ee && z(E("filteredEmptyStateTitle"));
1730
- }, [Ee, E]);
1731
- const pt = C > 1 || T || A, _n = C > 1 && !Fe && !Ie && !Ee;
1732
- return /* @__PURE__ */ m(_, { as: o, display: "block", "data-testid": "modules-list", children: [
1792
+ const d = setTimeout(() => yt(!0), is);
1793
+ return () => clearTimeout(d);
1794
+ }, [w]);
1795
+ const bt = me !== void 0, be = En !== void 0 && Ee !== we || bt, Pe = ie || w && J.length === 0, fe = J.length === 0 && !Pe && !ae, Ce = fe && be, Qe = r === "h1" ? "h2" : "h3";
1796
+ $(() => {
1797
+ Ce && O(E("filteredEmptyStateTitle"));
1798
+ }, [Ce, E]);
1799
+ const ee = bt && B.totalCount !== null && !Pe && !w && !ae && !fe ? E("searchResultsHint", { count: B.totalCount, term: me }) : null, Ke = L(null);
1800
+ $(() => {
1801
+ if (ee === null) {
1802
+ Ke.current = null;
1803
+ return;
1804
+ }
1805
+ Ke.current !== ee && (Ke.current = ee, O(ee));
1806
+ }, [ee]);
1807
+ const Pt = P > 1 || C || R, An = P > 1 && !Pe && !fe && !Ce;
1808
+ return /* @__PURE__ */ g(_, { as: o, display: "block", "data-testid": "modules-list", children: [
1733
1809
  /* @__PURE__ */ s(
1734
- Zn,
1810
+ ci,
1735
1811
  {
1736
- modules: k,
1737
- hasMoreModules: pt || _e,
1738
- continuesBefore: A,
1739
- continuesAfter: T,
1740
- onModuleClick: mn,
1741
- pagination: pt ? {
1742
- rangeStart: (S - 1) * j + 1,
1743
- totalCount: Q.totalCount,
1744
- hasPreviousPage: A,
1745
- hasNextPage: T,
1746
- onPreviousPage: () => Oe(S - 1, "keepFocus"),
1747
- onNextPage: () => Oe(S + 1, "keepFocus"),
1748
- disabled: v
1812
+ modules: U,
1813
+ hasMoreModules: Pt || be,
1814
+ continuesBefore: R,
1815
+ continuesAfter: C,
1816
+ onModuleClick: bn,
1817
+ pagination: Pt ? {
1818
+ rangeStart: (y - 1) * Q + 1,
1819
+ totalCount: B.totalCount,
1820
+ hasPreviousPage: R,
1821
+ hasNextPage: C,
1822
+ onPreviousPage: (d, f) => Fe(y - 1, d, f),
1823
+ onNextPage: (d, f) => Fe(y + 1, d, f),
1824
+ disabled: w
1749
1825
  } : void 0
1750
1826
  }
1751
1827
  ),
1752
- r && n ? /* @__PURE__ */ s(
1753
- Nr,
1828
+ i && n ? /* @__PURE__ */ s(
1829
+ ns,
1754
1830
  {
1755
1831
  counts: n,
1756
- itemsMode: pe,
1757
- loadedModules: k.length
1832
+ itemsMode: X,
1833
+ loadedModules: U.length
1758
1834
  }
1759
1835
  ) : null,
1760
- /* @__PURE__ */ m(
1761
- M,
1836
+ /* @__PURE__ */ g(
1837
+ I,
1762
1838
  {
1763
1839
  justifyItems: "end",
1764
1840
  alignItems: "end",
@@ -1767,53 +1843,85 @@ function $r({
1767
1843
  margin: "medium 0 0 0",
1768
1844
  "data-testid": "modules-controls",
1769
1845
  children: [
1770
- l ? /* @__PURE__ */ s(M.Item, { shouldGrow: K, children: /* @__PURE__ */ s(
1771
- zr,
1846
+ Sn ? /* @__PURE__ */ s(I.Item, { shouldGrow: H, margin: H ? void 0 : "0 auto 0 0", children: /* @__PURE__ */ s(
1847
+ Oi,
1772
1848
  {
1773
- actions: l,
1774
- onApplied: u,
1775
- aiDisclosure: a,
1776
- display: K ? "block" : "inline-block"
1849
+ renderLabel: E("searchLabel"),
1850
+ width: H ? void 0 : rs,
1851
+ value: gt,
1852
+ onChange: (d, f) => Tn(f),
1853
+ inputRef: (d) => {
1854
+ Mt.current = d;
1855
+ },
1856
+ renderBeforeInput: /* @__PURE__ */ s(bi, { size: "sm" }),
1857
+ renderAfterInput: gt === "" ? void 0 : /* @__PURE__ */ s(
1858
+ Qt,
1859
+ {
1860
+ size: "small",
1861
+ withBackground: !1,
1862
+ withBorder: !1,
1863
+ screenReaderLabel: E("clearSearch"),
1864
+ onClick: () => {
1865
+ var d;
1866
+ pt(), (d = Mt.current) == null || d.focus();
1867
+ },
1868
+ "data-testid": "modules-search-clear",
1869
+ children: /* @__PURE__ */ s(yi, { size: "sm" })
1870
+ }
1871
+ ),
1872
+ "data-testid": "modules-search"
1873
+ }
1874
+ ) }) : null,
1875
+ a ? /* @__PURE__ */ s(I.Item, { shouldGrow: H, children: /* @__PURE__ */ s(
1876
+ ts,
1877
+ {
1878
+ actions: a,
1879
+ onApplied: l,
1880
+ aiDisclosure: u,
1881
+ display: H ? "block" : "inline-block"
1777
1882
  }
1778
1883
  ) }) : null,
1779
- cn ? /* @__PURE__ */ s(M.Item, { shouldGrow: K, children: /* @__PURE__ */ s(
1780
- er,
1884
+ yn ? /* @__PURE__ */ s(I.Item, { shouldGrow: H, children: /* @__PURE__ */ s(
1885
+ _r,
1781
1886
  {
1782
- value: fe,
1783
- onChange: st,
1784
- interaction: Ie && !_e ? "disabled" : "enabled"
1887
+ value: Ee,
1888
+ onChange: (d) => {
1889
+ y !== 1 && $e(), mt(d);
1890
+ },
1891
+ interaction: fe && !be ? "disabled" : "enabled"
1785
1892
  }
1786
1893
  ) }) : null,
1787
- /* @__PURE__ */ s(M.Item, { shouldGrow: K, children: /* @__PURE__ */ s(
1788
- D,
1894
+ /* @__PURE__ */ s(I.Item, { shouldGrow: H, children: /* @__PURE__ */ s(
1895
+ N,
1789
1896
  {
1790
- elementRef: (c) => {
1791
- $e.current = c;
1897
+ elementRef: (d) => {
1898
+ Ye.current = d;
1792
1899
  },
1793
- display: K ? "block" : "inline-block",
1794
- onClick: fn,
1795
- interaction: V.length === 0 || xe ? "disabled" : "enabled",
1900
+ display: H ? "block" : "inline-block",
1901
+ onClick: vn,
1902
+ interaction: J.length === 0 || We ? "disabled" : "enabled",
1796
1903
  "data-testid": "expand-collapse-all",
1797
- children: E(ct ? "collapseAllModules" : "expandAllModules")
1904
+ children: E(St ? "collapseAllModules" : "expandAllModules")
1798
1905
  }
1799
1906
  ) })
1800
1907
  ]
1801
1908
  }
1802
1909
  ),
1803
- /* @__PURE__ */ m(_, { as: "div", margin: "medium 0 0 0", children: [
1804
- te ? /* @__PURE__ */ s(
1805
- X,
1910
+ ee !== null ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(b, { as: "div", size: "small", color: "secondary", "data-testid": "modules-search-hint", children: ee }) }) : null,
1911
+ /* @__PURE__ */ g(_, { as: "div", margin: "medium 0 0 0", children: [
1912
+ ae ? /* @__PURE__ */ s(
1913
+ te,
1806
1914
  {
1807
1915
  variant: "error",
1808
1916
  margin: "0 0 small 0",
1809
- liveRegion: be,
1917
+ liveRegion: Ae,
1810
1918
  liveRegionPoliteness: "assertive",
1811
1919
  "data-testid": "modules-error",
1812
- children: E("modulesLoadErrorAlert", { message: te.message })
1920
+ children: E("modulesLoadErrorAlert", { message: ae.message })
1813
1921
  }
1814
1922
  ) : null,
1815
- Fe ? /* @__PURE__ */ s(_, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ s(it, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
1816
- Ie && !_e ? /* @__PURE__ */ m(
1923
+ Pe ? /* @__PURE__ */ s(_, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ s(dt, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
1924
+ fe && !be ? /* @__PURE__ */ g(
1817
1925
  _,
1818
1926
  {
1819
1927
  as: "div",
@@ -1825,12 +1933,12 @@ function $r({
1825
1933
  textAlign: "center",
1826
1934
  "data-testid": "modules-empty",
1827
1935
  children: [
1828
- /* @__PURE__ */ s(me, { level: Be, variant: "titleCardLarge", margin: "0 0 x-small 0", children: E("noModulesEmptyStateTitle") }),
1936
+ /* @__PURE__ */ s(Ie, { level: Qe, variant: "titleCardLarge", margin: "0 0 x-small 0", children: E("noModulesEmptyStateTitle") }),
1829
1937
  /* @__PURE__ */ s(b, { color: "secondary", children: E("noModulesEmptyStateDescription") })
1830
1938
  ]
1831
1939
  }
1832
1940
  ) : null,
1833
- Ee ? /* @__PURE__ */ m(
1941
+ Ce ? /* @__PURE__ */ g(
1834
1942
  _,
1835
1943
  {
1836
1944
  as: "div",
@@ -1838,27 +1946,27 @@ function $r({
1838
1946
  borderRadius: "card.lg",
1839
1947
  borderWidth: "small",
1840
1948
  shadow: "resting",
1841
- padding: K ? "general.spaceLg general.spaceMd" : "general.space2xl general.spaceXl",
1949
+ padding: H ? "general.spaceLg general.spaceMd" : "general.space2xl general.spaceXl",
1842
1950
  textAlign: "center",
1843
1951
  "data-testid": "modules-filtered-empty",
1844
1952
  children: [
1845
1953
  /* @__PURE__ */ s(
1846
- me,
1954
+ Ie,
1847
1955
  {
1848
- level: Be,
1849
- variant: K ? "titleCardMini" : "titleCardLarge",
1956
+ level: Qe,
1957
+ variant: H ? "titleCardMini" : "titleCardLarge",
1850
1958
  margin: "0 0 general.spaceXs 0",
1851
1959
  children: E("filteredEmptyStateTitle")
1852
1960
  }
1853
1961
  ),
1854
- /* @__PURE__ */ s(b, { as: "div", color: "secondary", size: K ? "small" : void 0, children: E("filteredEmptyStateDescription") }),
1962
+ /* @__PURE__ */ s(b, { as: "div", color: "secondary", size: H ? "small" : void 0, children: E("filteredEmptyStateDescription") }),
1855
1963
  /* @__PURE__ */ s(
1856
- D,
1964
+ N,
1857
1965
  {
1858
1966
  color: "primary",
1859
1967
  margin: "general.spaceLg 0 0 0",
1860
1968
  onClick: () => {
1861
- st(ye), ae.current = "focusList";
1969
+ mt(we), pt(), re.current = "focusList";
1862
1970
  },
1863
1971
  "data-testid": "clear-filters",
1864
1972
  children: E("clearFilters")
@@ -1870,39 +1978,40 @@ function $r({
1870
1978
  /* @__PURE__ */ s(
1871
1979
  "ul",
1872
1980
  {
1873
- ref: at,
1874
- style: { listStyle: "none", margin: 0, padding: 0, opacity: Mn ? 0.5 : 1 },
1875
- "aria-busy": v,
1981
+ ref: It,
1982
+ style: { listStyle: "none", margin: 0, padding: 0, opacity: Ln ? 0.5 : 1 },
1983
+ "aria-busy": w,
1876
1984
  tabIndex: -1,
1877
1985
  "data-testid": "modules-stack",
1878
- children: V.map((c) => /* @__PURE__ */ s(
1986
+ children: J.map((d) => /* @__PURE__ */ s(
1879
1987
  "li",
1880
1988
  {
1881
- ref: (y) => {
1882
- y ? Ae.current.set(c.id, y) : Ae.current.delete(c.id);
1989
+ ref: (f) => {
1990
+ f ? ze.current.set(d.id, f) : ze.current.delete(d.id);
1883
1991
  },
1884
1992
  children: /* @__PURE__ */ s(
1885
- hr,
1993
+ qr,
1886
1994
  {
1887
- module: c,
1888
- expanded: De.includes(c.id),
1889
- onToggle: hn,
1890
- itemsState: (P == null ? void 0 : P.items.get(c.id)) ?? Le(c.id),
1891
- today: ke,
1892
- showDiagnostics: r,
1893
- headingLevel: Be,
1894
- breakpoints: x,
1895
- toggleRef: gn
1995
+ module: d,
1996
+ expanded: Be.includes(d.id),
1997
+ onToggle: wn,
1998
+ itemsState: (v == null ? void 0 : v.items.get(d.id)) ?? De(d.id),
1999
+ today: xe,
2000
+ showDiagnostics: i,
2001
+ headingLevel: Qe,
2002
+ breakpoints: A,
2003
+ toggleRef: Pn,
2004
+ searchTerm: me
1896
2005
  }
1897
2006
  )
1898
2007
  },
1899
- c.id
2008
+ d.id
1900
2009
  ))
1901
2010
  }
1902
2011
  )
1903
2012
  ] }),
1904
- _n ? /* @__PURE__ */ s(
1905
- Nt,
2013
+ An ? /* @__PURE__ */ s(
2014
+ Kt,
1906
2015
  {
1907
2016
  as: "nav",
1908
2017
  variant: "compact",
@@ -1912,21 +2021,20 @@ function $r({
1912
2021
  labelPrev: E("paginationPreviousPage"),
1913
2022
  labelNext: E("paginationNextPage"),
1914
2023
  labelLast: E("paginationLastPage"),
1915
- screenReaderLabelPageButton: (c) => E("paginationPageLabel", { page: c }),
2024
+ screenReaderLabelPageButton: (d) => E("paginationPageLabel", { page: d }),
1916
2025
  ellipsis: E("paginationEllipsis"),
1917
- totalPageNumber: C,
1918
- currentPage: S,
1919
- disabled: v,
1920
- onPageChange: (c) => Oe(c),
2026
+ totalPageNumber: P,
2027
+ currentPage: y,
2028
+ disabled: w,
2029
+ onPageChange: (d) => Fe(d),
1921
2030
  "data-testid": "modules-pagination"
1922
- },
1923
- S
2031
+ }
1924
2032
  ) : null
1925
2033
  ] });
1926
2034
  }
1927
- const Ur = hi(
1928
- $r
1929
- ), ge = [
2035
+ const os = ki(
2036
+ ss
2037
+ ), Me = [
1930
2038
  "assignment",
1931
2039
  "quiz",
1932
2040
  "discussion",
@@ -1935,7 +2043,7 @@ const Ur = hi(
1935
2043
  "external_url",
1936
2044
  "external_tool",
1937
2045
  "sub_header"
1938
- ], Xe = [
2046
+ ], st = [
1939
2047
  "not_started",
1940
2048
  "in_progress",
1941
2049
  "complete",
@@ -1943,30 +2051,30 @@ const Ur = hi(
1943
2051
  "incomplete",
1944
2052
  "missing_and_incomplete",
1945
2053
  "locked"
1946
- ], nn = [
2054
+ ], fn = [
1947
2055
  "must_view",
1948
2056
  "must_submit",
1949
2057
  "must_contribute",
1950
2058
  "must_mark_done",
1951
2059
  "min_score",
1952
2060
  "min_percentage"
1953
- ], Fr = ["assignment", "quiz", "discussion"], Br = ["external_url", "external_tool"], Gr = ["assignment", "quiz", "discussion"], Wr = Date.UTC(2025, 0, 6), Hr = 864e5, re = "1", rn = (e) => new Date(Wr + e * Hr).toISOString(), Pe = [
2061
+ ], ls = ["assignment", "quiz", "discussion"], as = ["external_url", "external_tool"], us = ["assignment", "quiz", "discussion"], ds = Date.UTC(2025, 0, 6), cs = 864e5, le = "1", hn = (e) => new Date(ds + e * cs).toISOString(), Re = [
1954
2062
  "min_score",
1955
2063
  "min_percentage"
1956
- ], Yr = nn.filter(
1957
- (e) => !Pe.includes(e)
1958
- ), jr = [
2064
+ ], ms = fn.filter(
2065
+ (e) => !Re.includes(e)
2066
+ ), gs = [
1959
2067
  "in_progress",
1960
2068
  "incomplete",
1961
2069
  "missing_and_incomplete"
1962
- ], Qr = (e, t, n, r) => {
1963
- const o = n ? nn : Yr, i = n && r ? Pe[t % Pe.length] : o[Math.floor(t / 3) % o.length];
1964
- return i === "min_score" ? { itemId: e, type: i, minScore: 10 } : i === "min_percentage" ? { itemId: e, type: i, minPercentage: 80 } : { itemId: e, type: i };
1965
- }, Kr = (e, t, n, r) => e === "sub_header" ? !1 : n && r || t % 3 === 0, rt = (e) => Xe[(e - 1) % Xe.length], Vr = (e, t) => !Gr.includes(e) || e === "discussion" && Math.floor(t / ge.length) % 2 === 1 ? null : 5 + t % 4 * 5, Zr = (e, t, n, r) => t ? e === "missing" ? n != null || r % 2 === 0 : e === "missing_and_incomplete" ? r % 2 === 1 : !1 : !1, Xr = (e, t, n, r) => {
2070
+ ], ps = (e, t, n, i) => {
2071
+ const o = n ? fn : ms, r = n && i ? Re[t % Re.length] : o[Math.floor(t / 3) % o.length];
2072
+ return r === "min_score" ? { itemId: e, type: r, minScore: 10 } : r === "min_percentage" ? { itemId: e, type: r, minPercentage: 80 } : { itemId: e, type: r };
2073
+ }, fs = (e, t, n, i) => e === "sub_header" ? !1 : n && i || t % 3 === 0, ct = (e) => st[(e - 1) % st.length], hs = (e, t) => !us.includes(e) || e === "discussion" && Math.floor(t / Me.length) % 2 === 1 ? null : 5 + t % 4 * 5, Is = (e, t, n, i) => t ? e === "missing" ? n != null || i % 2 === 0 : e === "missing_and_incomplete" ? i % 2 === 1 : !1 : !1, Ms = (e, t, n, i) => {
1966
2074
  if (e === "locked") return "locked";
1967
- if (Zr(e, t, n, r)) return "missing";
2075
+ if (Is(e, t, n, i)) return "missing";
1968
2076
  if (!n) return;
1969
- const o = t && Pe.includes(n.type);
2077
+ const o = t && Re.includes(n.type);
1970
2078
  switch (e) {
1971
2079
  case "not_started":
1972
2080
  case "missing":
@@ -1975,122 +2083,122 @@ const Ur = hi(
1975
2083
  return "complete";
1976
2084
  case "incomplete":
1977
2085
  case "missing_and_incomplete":
1978
- return o && r % 2 === 0 ? "incomplete" : "complete";
2086
+ return o && i % 2 === 0 ? "incomplete" : "complete";
1979
2087
  case "in_progress":
1980
- return o ? r % 3 === 0 ? "complete" : r % 3 === 1 ? "in_progress" : "not_started" : r % 2 === 0 ? "complete" : "not_started";
2088
+ return o ? i % 3 === 0 ? "complete" : i % 3 === 1 ? "in_progress" : "not_started" : i % 2 === 0 ? "complete" : "not_started";
1981
2089
  default:
1982
2090
  return e;
1983
2091
  }
1984
- }, Jr = (e) => e.status === "complete", es = (e, t, n, r, o, i, l, u) => {
1985
- const a = String(e), d = ge[r % ge.length], g = d === "sub_header", p = Fr.includes(d) && (r % 4 === 0 || o === "missing");
2092
+ }, _s = (e) => e.status === "complete", Es = (e, t, n, i, o, r, a, l) => {
2093
+ const u = String(e), c = Me[i % Me.length], p = c === "sub_header", m = ls.includes(c) && (i % 4 === 0 || o === "missing");
1986
2094
  return {
1987
2095
  id: n,
1988
- moduleId: a,
1989
- title: `${d} ${t + 1}`,
1990
- type: d,
2096
+ moduleId: u,
2097
+ title: `${c} ${t + 1}`,
2098
+ type: c,
1991
2099
  position: t + 1,
1992
2100
  indent: t % 5 === 4 ? 1 : 0,
1993
- published: u === "teacher" ? r % 7 !== 0 : !0,
1994
- url: g ? null : `/courses/${re}/modules/items/${n}`,
1995
- newTab: Br.includes(d) && r % 2 === 0,
1996
- completionRequirement: l,
1997
- dueAt: p ? rn(r % 90) : null,
2101
+ published: l === "teacher" ? i % 7 !== 0 : !0,
2102
+ url: p ? null : `/courses/${le}/modules/items/${n}`,
2103
+ newTab: as.includes(c) && i % 2 === 0,
2104
+ completionRequirement: a,
2105
+ dueAt: m ? hn(i % 90) : null,
1998
2106
  status: o,
1999
- pointsPossible: i,
2000
- extensions: Je(
2107
+ pointsPossible: r,
2108
+ extensions: ot(
2001
2109
  void 0,
2002
- r % 37 === 0 ? 5 + r % 4 * 10 : null
2110
+ i % 37 === 0 ? 5 + i % 4 * 10 : null
2003
2111
  )
2004
2112
  };
2005
- }, ts = (e, t, n, r) => {
2006
- const o = rt(e), i = jr.includes(o), l = [];
2007
- let u = 0;
2008
- for (let a = 0; a < t; a += 1) {
2009
- const d = n + a, g = ge[d % ge.length], p = Vr(g, d), h = p !== null, f = h ? u++ : a, I = String(e * 1e3 + a + 1), L = Kr(g, d, h, i) ? Qr(I, d, h, i) : null, w = Xr(o, h, L, f);
2010
- l.push(es(e, a, I, d, w, p, L, r));
2113
+ }, Ss = (e, t, n, i) => {
2114
+ const o = ct(e), r = gs.includes(o), a = [];
2115
+ let l = 0;
2116
+ for (let u = 0; u < t; u += 1) {
2117
+ const c = n + u, p = Me[c % Me.length], m = hs(p, c), h = m !== null, S = h ? l++ : u, M = String(e * 1e3 + u + 1), T = fs(p, c, h, r) ? ps(M, c, h, r) : null, D = Ms(o, h, T, S);
2118
+ a.push(Es(e, u, M, c, D, m, T, i));
2011
2119
  }
2012
- return l;
2013
- }, ns = (e, t, n, r) => {
2014
- const o = rt(e);
2120
+ return a;
2121
+ }, Ts = (e, t, n, i) => {
2122
+ const o = ct(e);
2015
2123
  if (o === "locked" || o === "not_started") return o;
2016
2124
  if (t.length === 0) return "not_started";
2017
- if (!t.some((i) => i.pointsPossible != null) || o === "missing" && n === 0 || o === "incomplete" && r === 0) return "in_progress";
2125
+ if (!t.some((r) => r.pointsPossible != null) || o === "missing" && n === 0 || o === "incomplete" && i === 0) return "in_progress";
2018
2126
  if (o === "missing_and_incomplete") {
2019
- if (n === 0 && r === 0) return "in_progress";
2127
+ if (n === 0 && i === 0) return "in_progress";
2020
2128
  if (n === 0) return "incomplete";
2021
- if (r === 0) return "missing";
2129
+ if (i === 0) return "missing";
2022
2130
  }
2023
2131
  return o;
2024
- }, is = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, rs = (e, t, n) => {
2025
- const r = t.filter((d) => d.completionRequirement), o = n ?? r.length, i = Math.min(r.filter(Jr).length, o), l = t.filter((d) => d.status === "missing").length, u = t.filter((d) => d.status === "incomplete").length;
2132
+ }, ys = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, bs = (e, t, n) => {
2133
+ const i = t.filter((c) => c.completionRequirement), o = n ?? i.length, r = Math.min(i.filter(_s).length, o), a = t.filter((c) => c.status === "missing").length, l = t.filter((c) => c.status === "incomplete").length;
2026
2134
  return {
2027
- status: ns(e, t, l, u),
2028
- requirementsMet: i,
2135
+ status: Ts(e, t, a, l),
2136
+ requirementsMet: r,
2029
2137
  requirementCount: o,
2030
- percentComplete: o > 0 ? Math.round(i / o * 100) : 0,
2031
- nextDueAt: is(t),
2032
- missingCount: l,
2033
- incompleteCount: u
2138
+ percentComplete: o > 0 ? Math.round(r / o * 100) : 0,
2139
+ nextDueAt: ys(t),
2140
+ missingCount: a,
2141
+ incompleteCount: l
2034
2142
  };
2035
- }, ss = (e, t, n) => {
2036
- const r = rt(e), o = e % 2 !== 0 && r !== "incomplete" && r !== "missing_and_incomplete" ? 1 : null;
2143
+ }, Ps = (e, t, n) => {
2144
+ const i = ct(e), o = e % 2 !== 0 && i !== "incomplete" && i !== "missing_and_incomplete" ? 1 : null;
2037
2145
  return {
2038
2146
  id: String(e),
2039
2147
  name: `Module ${e}`,
2040
2148
  position: e,
2041
2149
  published: n === "teacher" ? e % 4 !== 0 : !0,
2042
2150
  itemCount: t.length,
2043
- unlockAt: e % 5 === 0 ? rn(e) : null,
2151
+ unlockAt: e % 5 === 0 ? hn(e) : null,
2044
2152
  prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
2045
2153
  requirementCount: o,
2046
2154
  requireSequentialProgress: e % 6 === 0,
2047
2155
  completionRequirements: t.flatMap(
2048
- (i) => i.completionRequirement ? [i.completionRequirement] : []
2156
+ (r) => r.completionRequirement ? [r.completionRequirement] : []
2049
2157
  ),
2050
- progress: rs(e, t, o)
2158
+ progress: bs(e, t, o)
2051
2159
  };
2052
2160
  };
2053
- function os(e) {
2161
+ function Cs(e) {
2054
2162
  return {
2055
2163
  courseId: e.courseId,
2056
2164
  modules: e.modules.map(({ progress: t, ...n }) => n),
2057
2165
  itemsByModuleId: Object.fromEntries(
2058
2166
  Object.entries(e.itemsByModuleId).map(([t, n]) => [
2059
2167
  t,
2060
- n.map(({ status: r, ...o }) => o)
2168
+ n.map(({ status: i, ...o }) => o)
2061
2169
  ])
2062
2170
  )
2063
2171
  };
2064
2172
  }
2065
- function ve(e, t = {}) {
2066
- const n = t.view ?? "student", r = t.courseId ?? re, o = [], i = {};
2067
- let l = 0;
2068
- e.forEach((a, d) => {
2069
- const g = d + 1, p = ts(g, a, l, n);
2070
- l += a, o.push(ss(g, p, n)), i[String(g)] = p;
2173
+ function Oe(e, t = {}) {
2174
+ const n = t.view ?? "student", i = t.courseId ?? le, o = [], r = {};
2175
+ let a = 0;
2176
+ e.forEach((u, c) => {
2177
+ const p = c + 1, m = Ss(p, u, a, n);
2178
+ a += u, o.push(Ps(p, m, n)), r[String(p)] = m;
2071
2179
  });
2072
- const u = { courseId: r, modules: o, itemsByModuleId: i };
2073
- return n === "teacher" ? os(u) : u;
2180
+ const l = { courseId: i, modules: o, itemsByModuleId: r };
2181
+ return n === "teacher" ? Cs(l) : l;
2074
2182
  }
2075
- const ce = (e) => `/courses/${re}/modules/items/${e}`, Rt = "2099-08-31T06:59:00Z", ls = "2020-01-06T07:00:00Z", as = Xe.length, us = 8, ds = 120, cs = 25, ms = 250, kt = 8;
2076
- function Ks() {
2077
- return ve(Array.from({ length: as }, () => us));
2183
+ const he = (e) => `/courses/${le}/modules/items/${e}`, Bt = "2099-08-31T06:59:00Z", vs = "2020-01-06T07:00:00Z", ws = st.length, Ls = 8, As = 120, Rs = 25, ks = 250, Gt = 8;
2184
+ function Io() {
2185
+ return Oe(Array.from({ length: ws }, () => Ls));
2078
2186
  }
2079
- function Vs() {
2080
- return ve(Array.from({ length: ds }, () => cs));
2187
+ function Mo() {
2188
+ return Oe(Array.from({ length: As }, () => Rs));
2081
2189
  }
2082
- function Zs() {
2083
- return ve([
2084
- kt,
2085
- ms,
2086
- kt
2190
+ function _o() {
2191
+ return Oe([
2192
+ Gt,
2193
+ ks,
2194
+ Gt
2087
2195
  ]);
2088
2196
  }
2089
- function Xs() {
2090
- const e = (i, l, u) => ({
2091
- id: String(i),
2092
- name: l,
2093
- position: i,
2197
+ function Eo() {
2198
+ const e = (r, a, l) => ({
2199
+ id: String(r),
2200
+ name: a,
2201
+ position: r,
2094
2202
  published: !0,
2095
2203
  itemCount: 0,
2096
2204
  prerequisiteModules: [],
@@ -2103,29 +2211,29 @@ function Xs() {
2103
2211
  missingCount: 0,
2104
2212
  incompleteCount: 0
2105
2213
  },
2106
- ...u
2107
- }), 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 = [
2108
- e(1, "Locked by a future date", { unlockAt: Rt }),
2214
+ ...l
2215
+ }), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, i = { id: "103", name: "Trigonometry_Unit_One_Foundations_Of_Indirect_Measurement" }, o = [
2216
+ e(1, "Locked by a future date", { unlockAt: Bt }),
2109
2217
  e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
2110
2218
  e(3, "Locked by several prerequisites", {
2111
2219
  prerequisiteModules: [t, n]
2112
2220
  }),
2113
2221
  e(4, "Locked by a date and a prerequisite", {
2114
- unlockAt: Rt,
2115
- prerequisiteModules: [r]
2222
+ unlockAt: Bt,
2223
+ prerequisiteModules: [i]
2116
2224
  }),
2117
- e(5, "Locked, and the unlock date has passed", { unlockAt: ls })
2225
+ e(5, "Locked, and the unlock date has passed", { unlockAt: vs })
2118
2226
  ];
2119
2227
  return {
2120
- courseId: re,
2228
+ courseId: le,
2121
2229
  modules: o,
2122
- itemsByModuleId: Object.fromEntries(o.map((i) => [i.id, []]))
2230
+ itemsByModuleId: Object.fromEntries(o.map((r) => [r.id, []]))
2123
2231
  };
2124
2232
  }
2125
- function Js() {
2126
- return ve([]);
2233
+ function So() {
2234
+ return Oe([]);
2127
2235
  }
2128
- function eo() {
2236
+ function To() {
2129
2237
  const t = [
2130
2238
  {
2131
2239
  title: "Every fact: type, due date, points, requirement",
@@ -2154,7 +2262,7 @@ function eo() {
2154
2262
  title: "Career item carrying an estimated duration",
2155
2263
  type: "external_tool",
2156
2264
  completionRequirement: { itemId: "5", type: "must_view" },
2157
- extensions: Je(void 0, 45)
2265
+ extensions: ot(void 0, 45)
2158
2266
  },
2159
2267
  { title: "A file, ungradeable, so no points at all", type: "file" },
2160
2268
  { title: "External link, opens in a new tab", type: "external_url", newTab: !0 },
@@ -2170,19 +2278,19 @@ function eo() {
2170
2278
  { title: "Indented three levels", type: "quiz", indent: 3 },
2171
2279
  { title: "Indented four levels", type: "discussion", indent: 4 },
2172
2280
  { title: "Indented five levels, the deepest Canvas allows", type: "page", indent: 5 }
2173
- ].map((n, r) => ({
2174
- id: String(r + 1),
2281
+ ].map((n, i) => ({
2282
+ id: String(i + 1),
2175
2283
  moduleId: "1",
2176
- position: r + 1,
2284
+ position: i + 1,
2177
2285
  indent: 0,
2178
2286
  published: !0,
2179
2287
  newTab: !1,
2180
- url: ce(r + 1),
2288
+ url: he(i + 1),
2181
2289
  status: "not_started",
2182
2290
  ...n
2183
2291
  }));
2184
2292
  return {
2185
- courseId: re,
2293
+ courseId: le,
2186
2294
  modules: [
2187
2295
  {
2188
2296
  id: "1",
@@ -2197,13 +2305,13 @@ function eo() {
2197
2305
  itemsByModuleId: { 1: t }
2198
2306
  };
2199
2307
  }
2200
- function to() {
2308
+ function yo() {
2201
2309
  const t = [
2202
- { title: "Reading: limits from the left and the right", type: "page", url: ce(1) },
2310
+ { title: "Reading: limits from the left and the right", type: "page", url: he(1) },
2203
2311
  {
2204
2312
  title: "Desmos: interactive limit explorer",
2205
2313
  type: "external_url",
2206
- url: ce(2),
2314
+ url: he(2),
2207
2315
  newTab: !0
2208
2316
  },
2209
2317
  { title: "Practice", type: "sub_header", url: null },
@@ -2211,13 +2319,13 @@ function to() {
2211
2319
  {
2212
2320
  title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
2213
2321
  type: "assignment",
2214
- url: ce(5)
2322
+ url: he(5)
2215
2323
  },
2216
- { title: "Unit test", type: "quiz", url: ce(6), status: "locked" }
2217
- ].map((n, r) => ({
2218
- id: String(r + 1),
2324
+ { title: "Unit test", type: "quiz", url: he(6), status: "locked" }
2325
+ ].map((n, i) => ({
2326
+ id: String(i + 1),
2219
2327
  moduleId: "1",
2220
- position: r + 1,
2328
+ position: i + 1,
2221
2329
  indent: 0,
2222
2330
  published: !0,
2223
2331
  newTab: !1,
@@ -2225,7 +2333,7 @@ function to() {
2225
2333
  ...n
2226
2334
  }));
2227
2335
  return {
2228
- courseId: re,
2336
+ courseId: le,
2229
2337
  modules: [
2230
2338
  {
2231
2339
  id: "1",
@@ -2241,126 +2349,126 @@ function to() {
2241
2349
  };
2242
2350
  }
2243
2351
  export {
2244
- Ws as ACTION_ORDER_LTI_FLOOR,
2245
- ye as ALL_FILTER,
2246
- ro as ActionEntrySchema,
2247
- so as CompletionRequirementSchema,
2248
- oo as CompletionRequirementTypeSchema,
2249
- lo as DEFAULT_INLINE_THRESHOLD,
2250
- ao as DEFAULT_ITEM_CONCURRENCY,
2251
- uo as DEFAULT_ITEM_PAGE_SIZE,
2252
- co as DEFAULT_LOCALE,
2253
- mo as DEFAULT_MOBILE_PAGE_SIZE,
2254
- go as DEFAULT_PAGE_SIZE,
2255
- po as DEFAULT_RETAIN_COLLAPSED_LIMIT,
2256
- fo as DEFAULT_STALE_TIME_MS,
2257
- ho as DUE_THIS_WEEK_DAYS,
2258
- Mo as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
2259
- Wn as EXT_ORGANIZE_ADDED_ITEM_COUNT,
2260
- Hn as EXT_ORGANIZE_NEW_MODULE,
2261
- Yn as EXT_ORGANIZE_NEW_PLACEMENT,
2262
- Gn as EXT_SUPPRESS_ITEM_NUMBERING,
2263
- re as FIXTURE_COURSE_ID,
2264
- _o as FilterClauseSchema,
2265
- Io as FilterEntrySchema,
2266
- er as FilterSelect,
2267
- Bi as GET_MODULES,
2268
- Wi as GET_MODULE_ITEMS,
2269
- Tn as INLINE_ITEM_LIMIT,
2270
- En as INLINE_QUERY_NODE_BUDGET,
2271
- Eo as InMemoryCourseMismatchError,
2272
- So as ItemDueSoonPill,
2273
- yo as ItemTypeEntrySchema,
2274
- Ke as MAX_DIRECTION_CHARS,
2275
- To as MetaFieldEntrySchema,
2276
- hr as ModuleCard,
2277
- $n as ModuleDueSoonPill,
2278
- Bn as ModuleItemRow,
2279
- bo as ModuleItemSchema,
2280
- Po as ModuleItemStatusPill,
2281
- Co as ModuleItemStatusSchema,
2282
- vo as ModuleItemTypeSchema,
2283
- Sn as ModuleItemsPageSchema,
2284
- Lo as ModuleProgressSchema,
2285
- wo as ModuleSchema,
2286
- Dn as ModuleStatusPill,
2287
- Ao as ModuleStatusSchema,
2288
- Ro as ModulesAnalyticsProvider,
2289
- Qn as ModulesConfigProvider,
2290
- Cn as ModulesConfigSchema,
2291
- jn as ModulesI18nProvider,
2292
- Ur as ModulesList,
2293
- ko as ModulesPageInfoSchema,
2294
- yn as ModulesPageSchema,
2295
- Zn as ModulesProgressBar,
2296
- Qi as NEW_PLACEMENT_FIELD,
2297
- Jt as ORGANIZE_CONTENT_TYPES,
2298
- Qs as ORGANIZE_MODES,
2299
- Ar as ORGANIZE_SLOW_AFTER_MS,
2300
- Er as OrganizeForm,
2301
- zr as OrganizeModulesButton,
2302
- Dr as OrganizeModulesModal,
2303
- en as PROPOSAL_PREVIEW_COURSE_ID,
2304
- Oo as PageInfoSchema,
2305
- $t as PartialCanvasResponseError,
2306
- qo as PrerequisiteModuleSchema,
2307
- wr as ProposalPreview,
2308
- Do as RegistryEntrySchema,
2309
- zo as TYPE_FIELD,
2310
- No as baseFilters,
2311
- An as baseModulesConfig,
2312
- ve as buildFixture,
2313
- Js as courseEmpty,
2314
- Zs as courseFatModule,
2315
- to as courseItemLinks,
2316
- eo as courseItemRowVariants,
2317
- Vs as courseLarge,
2318
- Xs as courseLockReasons,
2319
- Ks as courseSmall,
2320
- ji as createActionContext,
2321
- Gs as createCanvasGraphqlAdapter,
2322
- Kn as createInMemoryAdapter,
2323
- xo as createTranslate,
2324
- $o as defaultFormatters,
2325
- Mr as defaultOrganizeInput,
2326
- Uo as defaultTranslate,
2327
- Fo as filterClauseOf,
2328
- Ln as getAddedItemCount,
2329
- Bo as getEstimatedDurationMinutes,
2330
- Lt as hasOrganizeInputErrors,
2331
- Go as hideUnservableFilters,
2332
- Wo as invalidateCourse,
2333
- bn as invalidateModuleItems,
2334
- ft as invalidateModuleList,
2335
- wn as isNewPlacement,
2336
- Ho as isPredicateServed,
2337
- vn as isProposedNewModule,
2338
- ie as mergeRegistry,
2339
- Yo as moduleItemStatusLabel,
2340
- jo as moduleItemsPrefix,
2341
- Qo as moduleStatusLabel,
2342
- Ko as modulesKeys,
2343
- Vo as modulesListPrefix,
2344
- Zi as organizePreviewConfig,
2345
- Ys as partialModulesConfig,
2346
- Cr as proposalToFixture,
2347
- Zo as registrySchema,
2348
- Zt as resolveModulesConfig,
2349
- Xo as servesClause,
2350
- Nn as suppressesItemNumbering,
2351
- Jo as unservableFilters,
2352
- js as useActionContext,
2353
- el as useFieldVisible,
2354
- nt as useFormatters,
2355
- tl as useModules,
2356
- tt as useModulesAnalytics,
2357
- Ce as useModulesConfig,
2358
- N as useModulesI18n,
2359
- Vn as useModulesPageData,
2360
- qr as useOrganizeModules,
2361
- vt as validateOrganizeInput,
2362
- Hs as visibleActions,
2363
- et as visibleEntries,
2364
- nl as visibleEntry,
2365
- Je as withEstimatedDurationMinutes
2352
+ mo as ACTION_ORDER_LTI_FLOOR,
2353
+ we as ALL_FILTER,
2354
+ Co as ActionEntrySchema,
2355
+ vo as CompletionRequirementSchema,
2356
+ wo as CompletionRequirementTypeSchema,
2357
+ Lo as DEFAULT_INLINE_THRESHOLD,
2358
+ Ao as DEFAULT_ITEM_CONCURRENCY,
2359
+ Ro as DEFAULT_ITEM_PAGE_SIZE,
2360
+ ko as DEFAULT_LOCALE,
2361
+ Oo as DEFAULT_MOBILE_PAGE_SIZE,
2362
+ Do as DEFAULT_PAGE_SIZE,
2363
+ qo as DEFAULT_RETAIN_COLLAPSED_LIMIT,
2364
+ zo as DEFAULT_STALE_TIME_MS,
2365
+ No as DUE_THIS_WEEK_DAYS,
2366
+ xo as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
2367
+ ri as EXT_ORGANIZE_ADDED_ITEM_COUNT,
2368
+ si as EXT_ORGANIZE_NEW_MODULE,
2369
+ oi as EXT_ORGANIZE_NEW_PLACEMENT,
2370
+ ii as EXT_SUPPRESS_ITEM_NUMBERING,
2371
+ le as FIXTURE_COURSE_ID,
2372
+ $o as FilterClauseSchema,
2373
+ Fo as FilterEntrySchema,
2374
+ _r as FilterSelect,
2375
+ sr as GET_MODULES,
2376
+ lr as GET_MODULE_ITEMS,
2377
+ qn as INLINE_ITEM_LIMIT,
2378
+ kn as INLINE_QUERY_NODE_BUDGET,
2379
+ Uo as InMemoryCourseMismatchError,
2380
+ Bo as ItemDueSoonPill,
2381
+ Go as ItemTypeEntrySchema,
2382
+ nt as MAX_DIRECTION_CHARS,
2383
+ Ho as MetaFieldEntrySchema,
2384
+ qr as ModuleCard,
2385
+ Jn as ModuleDueSoonPill,
2386
+ ni as ModuleItemRow,
2387
+ Wo as ModuleItemSchema,
2388
+ Yo as ModuleItemStatusPill,
2389
+ jo as ModuleItemStatusSchema,
2390
+ Qo as ModuleItemTypeSchema,
2391
+ On as ModuleItemsPageSchema,
2392
+ Ko as ModuleProgressSchema,
2393
+ Vo as ModuleSchema,
2394
+ Kn as ModuleStatusPill,
2395
+ Zo as ModuleStatusSchema,
2396
+ Xo as ModulesAnalyticsProvider,
2397
+ ai as ModulesConfigProvider,
2398
+ xn as ModulesConfigSchema,
2399
+ li as ModulesI18nProvider,
2400
+ os as ModulesList,
2401
+ Jo as ModulesPageInfoSchema,
2402
+ Dn as ModulesPageSchema,
2403
+ ci as ModulesProgressBar,
2404
+ gr as NEW_PLACEMENT_FIELD,
2405
+ mn as ORGANIZE_CONTENT_TYPES,
2406
+ ho as ORGANIZE_MODES,
2407
+ Kr as ORGANIZE_SLOW_AFTER_MS,
2408
+ $r as OrganizeForm,
2409
+ ts as OrganizeModulesButton,
2410
+ es as OrganizeModulesModal,
2411
+ gn as PROPOSAL_PREVIEW_COURSE_ID,
2412
+ el as PageInfoSchema,
2413
+ Zt as PartialCanvasResponseError,
2414
+ tl as PrerequisiteModuleSchema,
2415
+ Qr as ProposalPreview,
2416
+ nl as RegistryEntrySchema,
2417
+ il as TYPE_FIELD,
2418
+ rl as baseFilters,
2419
+ Bn as baseModulesConfig,
2420
+ Oe as buildFixture,
2421
+ So as courseEmpty,
2422
+ _o as courseFatModule,
2423
+ yo as courseItemLinks,
2424
+ To as courseItemRowVariants,
2425
+ Mo as courseLarge,
2426
+ Eo as courseLockReasons,
2427
+ Io as courseSmall,
2428
+ mr as createActionContext,
2429
+ co as createCanvasGraphqlAdapter,
2430
+ ui as createInMemoryAdapter,
2431
+ sl as createTranslate,
2432
+ ol as defaultFormatters,
2433
+ zr as defaultOrganizeInput,
2434
+ ll as defaultTranslate,
2435
+ al as filterClauseOf,
2436
+ Fn as getAddedItemCount,
2437
+ ul as getEstimatedDurationMinutes,
2438
+ $t as hasOrganizeInputErrors,
2439
+ dl as hideUnservableFilters,
2440
+ cl as invalidateCourse,
2441
+ zn as invalidateModuleItems,
2442
+ Ct as invalidateModuleList,
2443
+ Un as isNewPlacement,
2444
+ ml as isPredicateServed,
2445
+ $n as isProposedNewModule,
2446
+ oe as mergeRegistry,
2447
+ gl as moduleItemStatusLabel,
2448
+ pl as moduleItemsPrefix,
2449
+ fl as moduleStatusLabel,
2450
+ hl as modulesKeys,
2451
+ Il as modulesListPrefix,
2452
+ hr as organizePreviewConfig,
2453
+ po as partialModulesConfig,
2454
+ Wr as proposalToFixture,
2455
+ Ml as registrySchema,
2456
+ dn as resolveModulesConfig,
2457
+ _l as servesClause,
2458
+ Zn as suppressesItemNumbering,
2459
+ El as unservableFilters,
2460
+ fo as useActionContext,
2461
+ Sl as useFieldVisible,
2462
+ ut as useFormatters,
2463
+ Tl as useModules,
2464
+ at as useModulesAnalytics,
2465
+ ke as useModulesConfig,
2466
+ F as useModulesI18n,
2467
+ di as useModulesPageData,
2468
+ Jr as useOrganizeModules,
2469
+ xt as validateOrganizeInput,
2470
+ go as visibleActions,
2471
+ lt as visibleEntries,
2472
+ yl as visibleEntry,
2473
+ ot as withEstimatedDurationMinutes
2366
2474
  };