@instructure/platform-notebook 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,120 +1,120 @@
1
- import { jsx as a, jsxs as E, Fragment as Me } from "react/jsx-runtime";
2
- import { ScreenReaderContent as be } from "@instructure/ui-a11y-content";
3
- import { createContext as nt, useContext as ot, useMemo as he, useReducer as rt, useRef as _, forwardRef as wt, useCallback as q, useEffect as V, useImperativeHandle as Rt, useState as z } from "react";
4
- import { createPortal as Ot } from "react-dom";
5
- import { z as f } from "zod";
6
- import kt from "diff-match-patch";
7
- import { useQueryClient as _e, useMutation as Fe, useQuery as Lt } from "@tanstack/react-query";
8
- import { CloseButton as At, Button as ne, IconButton as Ne } from "@instructure/ui-buttons/v11_7";
9
- import { Flex as x } from "@instructure/ui-flex/v11_7";
10
- import { Heading as we } from "@instructure/ui-heading/v11_7";
11
- import { Tray as Dt } from "@instructure/ui-tray/v11_7";
1
+ import { jsx as a, jsxs as b, Fragment as Fe } from "react/jsx-runtime";
2
+ import { ScreenReaderContent as Ee } from "@instructure/ui-a11y-content";
3
+ import { createContext as ot, useContext as rt, useMemo as pe, useReducer as it, useRef as F, forwardRef as Rt, useCallback as q, useEffect as V, useImperativeHandle as Ot, useState as G } from "react";
4
+ import { createPortal as kt } from "react-dom";
5
+ import { z as m } from "zod";
6
+ import Lt from "diff-match-patch";
7
+ import { useQueryClient as Ue, useMutation as $e, useQuery as Dt } from "@tanstack/react-query";
8
+ import { CloseButton as At, Button as te, IconButton as Ie } from "@instructure/ui-buttons/v11_7";
9
+ import { Flex as v } from "@instructure/ui-flex/v11_7";
10
+ import { Heading as Oe } from "@instructure/ui-heading/v11_7";
11
+ import { Tray as Pt } from "@instructure/ui-tray/v11_7";
12
12
  import { View as Y } from "@instructure/ui-view/v11_7";
13
- import { IconQuestionLine as Ue, IconPinLine as $e, NotebookInstUIIcon as Pt, IconWarningLine as Mt, IconEditLine as De, IconTrashLine as xe, IconArrowStartLine as _t } from "@instructure/ui-icons";
14
- import { Menu as me } from "@instructure/ui-menu/v11_7";
15
- import { Text as Q } from "@instructure/ui-text/v11_7";
16
- import { TruncateText as Ce } from "@instructure/ui-truncate-text/v11_7";
17
- import { SimpleSelect as Ke } from "@instructure/ui-simple-select/v11_7";
18
- import { Dialog as Ft } from "@instructure/ui-dialog";
19
- import { TextArea as it } from "@instructure/ui-text-area/v11_7";
20
- import { Pill as ke } from "@instructure/ui-pill/v11_7";
21
- import { Pagination as Ut } from "@instructure/ui-pagination/v11_7";
22
- import { Spinner as $t } from "@instructure/ui-spinner/v11_7";
23
- const Bt = f.object({
24
- startContainer: f.string(),
25
- endContainer: f.string(),
26
- startOffset: f.number(),
27
- endOffset: f.number()
28
- }), Ht = f.object({
29
- start: f.number(),
30
- end: f.number()
31
- }), Be = f.object({
32
- selectedText: f.string(),
33
- hasNoHighlightAnymore: f.boolean().optional(),
34
- textPosition: Ht.nullable(),
13
+ import { IconQuestionLine as He, IconPinLine as Be, NotebookInstUIIcon as Mt, IconWarningLine as _t, IconEditLine as Me, IconTrashLine as we, IconArrowStartLine as Ft } from "@instructure/ui-icons";
14
+ import { Menu as ge } from "@instructure/ui-menu/v11_7";
15
+ import { Text as Z } from "@instructure/ui-text/v11_7";
16
+ import { TruncateText as xe } from "@instructure/ui-truncate-text/v11_7";
17
+ import { SimpleSelect as qe } from "@instructure/ui-simple-select/v11_7";
18
+ import { Dialog as Ut } from "@instructure/ui-dialog";
19
+ import { TextArea as st } from "@instructure/ui-text-area/v11_7";
20
+ import { Pill as De } from "@instructure/ui-pill/v11_7";
21
+ import { Pagination as $t } from "@instructure/ui-pagination/v11_7";
22
+ import { Spinner as Ht } from "@instructure/ui-spinner/v11_7";
23
+ const Bt = m.object({
24
+ startContainer: m.string(),
25
+ endContainer: m.string(),
26
+ startOffset: m.number(),
27
+ endOffset: m.number()
28
+ }), jt = m.object({
29
+ start: m.number(),
30
+ end: m.number()
31
+ }), je = m.object({
32
+ selectedText: m.string(),
33
+ hasNoHighlightAnymore: m.boolean().optional(),
34
+ textPosition: jt.nullable(),
35
35
  range: Bt.nullable(),
36
- pageLastModifiedAt: f.string()
36
+ pageLastModifiedAt: m.string()
37
37
  });
38
- var L = /* @__PURE__ */ ((t) => (t.IMPORTANT = "Important", t.CONFUSING = "Confusing", t))(L || {});
39
- const He = f.enum([
38
+ var k = /* @__PURE__ */ ((t) => (t.IMPORTANT = "Important", t.CONFUSING = "Confusing", t))(k || {});
39
+ const Ge = m.enum([
40
40
  "Important",
41
41
  "Confusing"
42
42
  /* CONFUSING */
43
- ]), jt = f.object({
44
- totalCount: f.number().nullish(),
45
- totalNrOfPages: f.number().nullish()
46
- }), Re = f.object({
47
- id: f.string(),
48
- rootAccountUuid: f.string(),
49
- userId: f.string(),
50
- courseId: f.string(),
51
- objectId: f.string(),
52
- objectType: f.string(),
53
- userText: f.string().optional(),
54
- reaction: f.array(He),
55
- highlightData: Be,
43
+ ]), Gt = m.object({
44
+ totalCount: m.number().nullish(),
45
+ totalNrOfPages: m.number().nullish()
46
+ }), ke = m.object({
47
+ id: m.string(),
48
+ rootAccountUuid: m.string(),
49
+ userId: m.string(),
50
+ courseId: m.string(),
51
+ objectId: m.string(),
52
+ objectType: m.string(),
53
+ userText: m.string().optional(),
54
+ reaction: m.array(Ge),
55
+ highlightData: je,
56
56
  // Set by the host when the note's highlight is gone specifically because its source
57
57
  // (the page/assignment/quiz it was captured from) was unpublished or deleted, as opposed
58
58
  // to the note never having had a highlight. Selects the HighlightError reason in NoteCard.
59
- highlightSourceUnavailable: f.boolean().optional(),
60
- updatedAt: f.string()
61
- }), Gt = f.object({
62
- cursor: f.string(),
63
- node: Re
59
+ highlightSourceUnavailable: m.boolean().optional(),
60
+ updatedAt: m.string()
61
+ }), zt = m.object({
62
+ cursor: m.string(),
63
+ node: ke
64
64
  });
65
- f.object({
66
- notes: f.object({
67
- edges: f.array(Gt),
68
- nodes: f.array(Re),
69
- pageInfo: jt
65
+ m.object({
66
+ notes: m.object({
67
+ edges: m.array(zt),
68
+ nodes: m.array(ke),
69
+ pageInfo: Gt
70
70
  })
71
71
  });
72
- const zt = f.object({
73
- type: f.string(),
74
- id: f.string()
75
- }), Wt = f.object({
76
- courseId: f.string().optional(),
77
- learningObject: zt.optional(),
78
- reactions: f.array(f.string()).optional()
72
+ const Wt = m.object({
73
+ type: m.string(),
74
+ id: m.string()
75
+ }), Kt = m.object({
76
+ courseId: m.string().optional(),
77
+ learningObject: Wt.optional(),
78
+ reactions: m.array(m.string()).optional()
79
79
  }).optional();
80
- f.object({
81
- courseId: f.string().optional(),
82
- filter: Wt,
83
- offset: f.number().optional(),
84
- pageSize: f.number().optional()
80
+ m.object({
81
+ courseId: m.string().optional(),
82
+ filter: Kt,
83
+ offset: m.number().optional(),
84
+ pageSize: m.number().optional()
85
85
  });
86
- f.object({
87
- courseId: f.string(),
88
- objectId: f.string(),
89
- objectType: f.string(),
90
- userText: f.string().optional(),
91
- reaction: f.array(He),
92
- highlightData: Be
86
+ m.object({
87
+ courseId: m.string(),
88
+ objectId: m.string(),
89
+ objectType: m.string(),
90
+ userText: m.string().optional(),
91
+ reaction: m.array(Ge),
92
+ highlightData: je
93
93
  });
94
- f.object({
95
- createNote: Re
94
+ m.object({
95
+ createNote: ke
96
96
  });
97
- f.object({
98
- id: f.string(),
99
- userText: f.string().optional(),
100
- reaction: f.array(He),
101
- highlightData: Be
97
+ m.object({
98
+ id: m.string(),
99
+ userText: m.string().optional(),
100
+ reaction: m.array(Ge),
101
+ highlightData: je
102
102
  });
103
- f.object({
104
- updateNote: Re
103
+ m.object({
104
+ updateNote: ke
105
105
  });
106
- f.object({
107
- deleteNote: f.string()
106
+ m.object({
107
+ deleteNote: m.string()
108
108
  });
109
- var st = /* @__PURE__ */ ((t) => (t[t.FORWARDS = 1] = "FORWARDS", t[t.BACKWARDS = 2] = "BACKWARDS", t))(st || {});
110
- class oe {
109
+ var at = /* @__PURE__ */ ((t) => (t[t.FORWARDS = 1] = "FORWARDS", t[t.BACKWARDS = 2] = "BACKWARDS", t))(at || {});
110
+ class ie {
111
111
  constructor(e, n) {
112
112
  this.start = e, this.end = n;
113
113
  }
114
114
  toRange() {
115
115
  let e, n;
116
116
  try {
117
- this.start.element === this.end.element && this.start.offset <= this.end.offset ? [e, n] = lt(this.start.element, this.start.offset, this.end.offset) : (e = this.start.resolve({
117
+ this.start.element === this.end.element && this.start.offset <= this.end.offset ? [e, n] = ct(this.start.element, this.start.offset, this.end.offset) : (e = this.start.resolve({
118
118
  direction: 1
119
119
  /* FORWARDS */
120
120
  }), n = this.end.resolve({
@@ -130,23 +130,23 @@ class oe {
130
130
  return o.setStart(e.node, e.offset), o.setEnd(n.node, n.offset), o;
131
131
  }
132
132
  static fromRange(e) {
133
- const n = Z.fromPoint(e.startContainer, e.startOffset), o = Z.fromPoint(e.endContainer, e.endOffset);
134
- return !n || !o ? null : new oe(n, o);
133
+ const n = Q.fromPoint(e.startContainer, e.startOffset), o = Q.fromPoint(e.endContainer, e.endOffset);
134
+ return !n || !o ? null : new ie(n, o);
135
135
  }
136
136
  static fromOffsets(e, n, o) {
137
- return new oe(new Z(e, n), new Z(e, o));
137
+ return new ie(new Q(e, n), new Q(e, o));
138
138
  }
139
139
  relativeTo(e) {
140
- return new oe(this.start.relativeTo(e), this.end.relativeTo(e));
140
+ return new ie(this.start.relativeTo(e), this.end.relativeTo(e));
141
141
  }
142
142
  }
143
- class Z {
143
+ class Q {
144
144
  constructor(e, n) {
145
145
  n < 0 && console.error("Offset is invalid"), this.element = e, this.offset = n;
146
146
  }
147
147
  resolve(e = {}) {
148
148
  try {
149
- const n = lt(this.element, this.offset)[0];
149
+ const n = ct(this.element, this.offset)[0];
150
150
  if (!n)
151
151
  throw new Error("Could not resolve offset to a text node");
152
152
  return n;
@@ -154,7 +154,7 @@ class Z {
154
154
  if (this.offset === 0 && e.direction !== void 0) {
155
155
  const o = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);
156
156
  o.currentNode = this.element;
157
- const r = e.direction === st.FORWARDS, i = r ? o.nextNode() : o.previousNode();
157
+ const r = e.direction === at.FORWARDS, i = r ? o.nextNode() : o.previousNode();
158
158
  if (!i)
159
159
  throw n;
160
160
  return { node: i, offset: r ? 0 : i.data.length };
@@ -165,9 +165,9 @@ class Z {
165
165
  static fromCharOffset(e, n) {
166
166
  switch (e.nodeType) {
167
167
  case Node.TEXT_NODE:
168
- return Z.fromPoint(e, n);
168
+ return Q.fromPoint(e, n);
169
169
  case Node.ELEMENT_NODE:
170
- return new Z(e, n);
170
+ return new Q(e, n);
171
171
  default:
172
172
  return console.error("Node is not an element or text node"), null;
173
173
  }
@@ -179,16 +179,16 @@ class Z {
179
179
  return console.error("Text node offset is out of range"), null;
180
180
  if (!e.parentElement)
181
181
  return console.error("Text node has no parent"), null;
182
- const o = Xe(e) + n;
183
- return new Z(e.parentElement, o);
182
+ const o = Ze(e) + n;
183
+ return new Q(e.parentElement, o);
184
184
  }
185
185
  case Node.ELEMENT_NODE: {
186
186
  if (n < 0 || n > e.childNodes.length)
187
187
  return console.error("Child node offset is out of range"), null;
188
188
  let o = 0;
189
189
  for (let r = 0; r < n; r++)
190
- o += at(e.childNodes[r]);
191
- return new Z(e, o);
190
+ o += lt(e.childNodes[r]);
191
+ return new Q(e, o);
192
192
  }
193
193
  default:
194
194
  return console.error("Point is not in an element or text node"), null;
@@ -199,34 +199,34 @@ class Z {
199
199
  throw new Error("Parent is not an ancestor of current element");
200
200
  let n = this.element, o = this.offset;
201
201
  for (; n !== e; )
202
- o += Xe(n), n.parentElement && (n = n.parentElement);
203
- return new Z(n, o);
202
+ o += Ze(n), n.parentElement && (n = n.parentElement);
203
+ return new Q(n, o);
204
204
  }
205
205
  }
206
- const Kt = (t) => {
206
+ const qt = (t) => {
207
207
  const e = t.nodeName.toLowerCase();
208
208
  return e === "#text" ? "text()" : e;
209
209
  };
210
- function qt(t) {
210
+ function Vt(t) {
211
211
  let e = 0, n = t;
212
212
  for (; n; )
213
213
  n.nodeName === t.nodeName && (e += 1), n = n.previousSibling;
214
214
  return e;
215
215
  }
216
- const Vt = (t) => {
217
- const e = Kt(t), n = qt(t);
216
+ const Xt = (t) => {
217
+ const e = qt(t), n = Vt(t);
218
218
  return `${e}[${n}]`;
219
- }, qe = (t, e) => {
219
+ }, Ve = (t, e) => {
220
220
  let n = "", o = t;
221
221
  for (; o !== e; ) {
222
222
  if (!o) {
223
223
  console.error("Node is not a descendant of root");
224
224
  return;
225
225
  }
226
- n = `${Vt(o)}/${n}`, o = o.parentNode;
226
+ n = `${Xt(o)}/${n}`, o = o.parentNode;
227
227
  }
228
228
  return n = `/${n}`, n = n.replace(/\/$/, ""), n;
229
- }, Xt = (t, e, n) => {
229
+ }, Zt = (t, e, n) => {
230
230
  const o = e.toUpperCase();
231
231
  let r = -1;
232
232
  for (let i = 0; i < t.children.length; i++) {
@@ -235,7 +235,7 @@ const Vt = (t) => {
235
235
  return s;
236
236
  }
237
237
  return null;
238
- }, Zt = (t, e) => {
238
+ }, Qt = (t, e) => {
239
239
  if (!(t.match(/^(\/[A-Za-z0-9-]+(\[[0-9]+])?)+$/) !== null))
240
240
  return console.error("Expression is not a simple XPath"), null;
241
241
  const o = t.split("/");
@@ -246,54 +246,54 @@ const Vt = (t) => {
246
246
  const d = i.indexOf("[");
247
247
  if (d !== -1) {
248
248
  s = i.slice(0, d);
249
- const m = i.slice(d + 1, i.indexOf("]"));
250
- if (l = Number.parseInt(m, 10) - 1, l < 0)
249
+ const f = i.slice(d + 1, i.indexOf("]"));
250
+ if (l = Number.parseInt(f, 10) - 1, l < 0)
251
251
  return null;
252
252
  } else
253
253
  s = i, l = 0;
254
- const u = Xt(r, s, l);
254
+ const u = Zt(r, s, l);
255
255
  if (!u)
256
256
  return null;
257
257
  r = u;
258
258
  }
259
259
  return r;
260
- }, Ve = (t, e = document.body) => {
260
+ }, Xe = (t, e = document.body) => {
261
261
  if (t === "")
262
262
  return e;
263
263
  try {
264
- return Zt(t, e);
264
+ return Qt(t, e);
265
265
  } catch {
266
266
  return document.evaluate(`.${t}`, e, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
267
267
  }
268
268
  };
269
- class de {
269
+ class ue {
270
270
  constructor(e, n) {
271
271
  this.root = e, this.range = n;
272
272
  }
273
273
  static fromRange(e, n) {
274
- return new de(e, n);
274
+ return new ue(e, n);
275
275
  }
276
276
  static fromSelector(e, n) {
277
277
  if ((n == null ? void 0 : n.startContainer) == null || (n == null ? void 0 : n.endContainer) == null)
278
278
  return console.error("No start or end container in selector"), null;
279
- const o = Ve(n.startContainer, e);
279
+ const o = Xe(n.startContainer, e);
280
280
  if (!o)
281
281
  return console.error("Failed to resolve startContainer XPath"), null;
282
- const r = Ve(n.endContainer, e);
282
+ const r = Xe(n.endContainer, e);
283
283
  if (!r)
284
284
  return console.error("Failed to resolve endContainer XPath"), null;
285
- const i = Z.fromCharOffset(o, n.startOffset), s = Z.fromCharOffset(r, n.endOffset);
285
+ const i = Q.fromCharOffset(o, n.startOffset), s = Q.fromCharOffset(r, n.endOffset);
286
286
  if (!i || !s)
287
287
  return null;
288
- const l = new oe(i, s).toRange();
289
- return l ? !e.contains(l.startContainer) || !e.contains(l.endContainer) ? (console.error("Resolved range escapes root"), null) : new de(e, l) : null;
288
+ const l = new ie(i, s).toRange();
289
+ return l ? !e.contains(l.startContainer) || !e.contains(l.endContainer) ? (console.error("Resolved range escapes root"), null) : new ue(e, l) : null;
290
290
  }
291
291
  toRange() {
292
292
  return this.range;
293
293
  }
294
294
  toSelector() {
295
295
  var i;
296
- const e = (i = oe.fromRange(this.range)) == null ? void 0 : i.toRange(), n = e && oe.fromRange(e), o = n && qe(n.start.element, this.root), r = n && qe(n.end.element, this.root);
296
+ const e = (i = ie.fromRange(this.range)) == null ? void 0 : i.toRange(), n = e && ie.fromRange(e), o = n && Ve(n.start.element, this.root), r = n && Ve(n.end.element, this.root);
297
297
  return !n || o == null || r == null ? null : {
298
298
  startContainer: o,
299
299
  startOffset: n.start.offset,
@@ -302,17 +302,17 @@ class de {
302
302
  };
303
303
  }
304
304
  }
305
- class le {
305
+ class ce {
306
306
  constructor(e, n, o) {
307
307
  this.root = e, this.start = n, this.end = o;
308
308
  }
309
309
  static fromRange(e, n) {
310
310
  var r;
311
- const o = (r = oe.fromRange(n)) == null ? void 0 : r.relativeTo(e);
312
- return o ? new le(e, o.start.offset, o.end.offset) : null;
311
+ const o = (r = ie.fromRange(n)) == null ? void 0 : r.relativeTo(e);
312
+ return o ? new ce(e, o.start.offset, o.end.offset) : null;
313
313
  }
314
314
  static fromSelector(e, n) {
315
- return new le(e, n.start, n.end);
315
+ return new ce(e, n.start, n.end);
316
316
  }
317
317
  toSelector() {
318
318
  return {
@@ -321,10 +321,10 @@ class le {
321
321
  };
322
322
  }
323
323
  toRange() {
324
- return oe.fromOffsets(this.root, this.start, this.end).toRange();
324
+ return ie.fromOffsets(this.root, this.start, this.end).toRange();
325
325
  }
326
326
  }
327
- const at = (t) => {
327
+ const lt = (t) => {
328
328
  var e;
329
329
  switch (t.nodeType) {
330
330
  case Node.ELEMENT_NODE:
@@ -333,12 +333,12 @@ const at = (t) => {
333
333
  default:
334
334
  return 0;
335
335
  }
336
- }, Xe = (t) => {
336
+ }, Ze = (t) => {
337
337
  let e = t.previousSibling, n = 0;
338
338
  for (; e; )
339
- n += at(e), e = e.previousSibling;
339
+ n += lt(e), e = e.previousSibling;
340
340
  return n;
341
- }, lt = (t, ...e) => {
341
+ }, ct = (t, ...e) => {
342
342
  let n = e.shift();
343
343
  const o = t.ownerDocument.createNodeIterator(t, NodeFilter.SHOW_TEXT), r = [];
344
344
  let i = o.nextNode(), s = null, l = 0;
@@ -347,14 +347,14 @@ const at = (t) => {
347
347
  for (; n !== void 0 && s && l === n; )
348
348
  r.push({ node: s, offset: s.data.length }), n = e.shift();
349
349
  return n !== void 0 && console.error("Offset exceeds text length"), r;
350
- }, Qt = (t, e, n, o) => {
350
+ }, Yt = (t, e, n, o) => {
351
351
  const r = n - e;
352
- return Math.abs(r - o) <= 5 ? le.fromSelector(t, {
352
+ return Math.abs(r - o) <= 5 ? ce.fromSelector(t, {
353
353
  start: e,
354
354
  end: n
355
355
  }) : null;
356
- }, Yt = (t, e, n, o) => {
357
- const r = new kt();
356
+ }, Jt = (t, e, n, o) => {
357
+ const r = new Lt();
358
358
  r.Match_Distance = 5e3;
359
359
  const i = t.textContent;
360
360
  if (!i)
@@ -362,41 +362,41 @@ const at = (t) => {
362
362
  if (e.length > 32) {
363
363
  const s = e.slice(0, 32), l = e.slice(-32), d = o - n;
364
364
  let u = r.match_main(i, s, n);
365
- const m = r.match_main(i, l, o), c = m + l.length;
366
- if (u === -1 || m === -1)
365
+ const f = r.match_main(i, l, o), c = f + l.length;
366
+ if (u === -1 || f === -1)
367
367
  return null;
368
- const p = c - u, T = Math.abs(p - d);
369
- if ((u > c || T > 5) && (r.Match_Distance = e.length + 100, u = r.match_main(i, s, c), u !== -1 && u < c))
370
- return Qt(t, u, c, d);
371
- if (u < c && T <= 5)
372
- return le.fromSelector(t, {
368
+ const p = c - u, E = Math.abs(p - d);
369
+ if ((u > c || E > 5) && (r.Match_Distance = e.length + 100, u = r.match_main(i, s, c), u !== -1 && u < c))
370
+ return Yt(t, u, c, d);
371
+ if (u < c && E <= 5)
372
+ return ce.fromSelector(t, {
373
373
  start: u,
374
374
  end: c
375
375
  });
376
376
  } else {
377
377
  const s = r.match_main(i, e, n);
378
378
  if (s !== -1)
379
- return le.fromSelector(t, {
379
+ return ce.fromSelector(t, {
380
380
  start: s,
381
381
  end: s + e.length
382
382
  });
383
383
  }
384
384
  return null;
385
- }, Jt = (t, e) => {
385
+ }, en = (t, e) => {
386
386
  if (!e) return null;
387
387
  const { highlightData: n } = t, { textPosition: o, selectedText: r } = n;
388
- return Yt(
388
+ return Jt(
389
389
  e,
390
390
  r,
391
391
  (o == null ? void 0 : o.start) ?? 0,
392
392
  (o == null ? void 0 : o.end) ?? 0
393
393
  );
394
- }, en = (t, e, n) => {
394
+ }, tn = (t, e, n) => {
395
395
  const o = [], r = [];
396
396
  for (const i of e) {
397
- const s = Jt(i, t);
397
+ const s = en(i, t);
398
398
  if (s) {
399
- const l = s.toRange(), d = l && de.fromRange(t, l), u = (l == null ? void 0 : l.toString().trim()) || i.highlightData.selectedText;
399
+ const l = s.toRange(), d = l && ue.fromRange(t, l), u = (l == null ? void 0 : l.toString().trim()) || i.highlightData.selectedText;
400
400
  o.push({
401
401
  id: i.id,
402
402
  reaction: i.reaction,
@@ -423,63 +423,63 @@ const at = (t) => {
423
423
  }) : r.push(i.id);
424
424
  }
425
425
  return { notesForUpdate: o, noteIdsForDelete: r };
426
- }, Ze = (t, e) => {
426
+ }, Qe = (t, e) => {
427
427
  var s;
428
428
  if (!e) return;
429
429
  const { highlightData: n, id: o } = t, { range: r } = n ?? {};
430
- r && ((s = de.fromSelector(e, r)) == null ? void 0 : s.toRange()) && gn({ id: o });
431
- }, tn = (t) => {
430
+ r && ((s = ue.fromSelector(e, r)) == null ? void 0 : s.toRange()) && hn({ id: o });
431
+ }, nn = (t) => {
432
432
  const n = document.querySelector(
433
433
  `[data-highlight-id="${CSS.escape(t)}"].highlight-content`
434
- ) ?? document.getElementById(Oe(t));
434
+ ) ?? document.getElementById(Le(t));
435
435
  if (n) {
436
436
  const o = n.getBoundingClientRect();
437
437
  o.top >= 0 && o.bottom <= (window.innerHeight || document.documentElement.clientHeight) || n.scrollIntoView({ behavior: "smooth", block: "center" });
438
438
  }
439
- }, Te = 90, Se = 172, nn = (t) => {
439
+ }, Se = 90, ve = 172, on = (t) => {
440
440
  const e = t.getClientRects();
441
441
  if (!e.length)
442
442
  return null;
443
- const n = e[0], o = e[e.length - 1], r = 4, i = 16, s = window.innerWidth || document.documentElement.clientWidth, l = window.innerHeight || document.documentElement.clientHeight, d = (b) => {
444
- const w = b + Se;
445
- return b >= i && w <= s - i;
446
- }, u = (b) => {
447
- const w = b + Te;
448
- return b >= i && w <= l - i;
443
+ const n = e[0], o = e[e.length - 1], r = 4, i = 16, s = window.innerWidth || document.documentElement.clientWidth, l = window.innerHeight || document.documentElement.clientHeight, d = (N) => {
444
+ const w = N + ve;
445
+ return N >= i && w <= s - i;
446
+ }, u = (N) => {
447
+ const w = N + Se;
448
+ return N >= i && w <= l - i;
449
449
  };
450
- let m;
451
- const c = n.right - Se;
450
+ let f;
451
+ const c = n.right - ve;
452
452
  if (d(c))
453
- m = c;
453
+ f = c;
454
454
  else {
455
- const b = n.left;
456
- if (d(b))
457
- m = b;
455
+ const N = n.left;
456
+ if (d(N))
457
+ f = N;
458
458
  else {
459
- const y = (n.left + n.right) / 2 - Se / 2;
460
- d(y) ? m = y : c < i ? m = i : m = s - Se - i;
459
+ const y = (n.left + n.right) / 2 - ve / 2;
460
+ d(y) ? f = y : c < i ? f = i : f = s - ve - i;
461
461
  }
462
462
  }
463
463
  let p;
464
- const T = o.bottom + r;
465
- if (u(T))
466
- p = T;
464
+ const E = o.bottom + r;
465
+ if (u(E))
466
+ p = E;
467
467
  else {
468
- const b = n.top - Te - r;
469
- u(b) ? p = b : T + Te > l - i ? p = l - Te - i : p = i;
468
+ const N = n.top - Se - r;
469
+ u(N) ? p = N : E + Se > l - i ? p = l - Se - i : p = i;
470
470
  }
471
- return { top: p, left: m };
472
- }, on = (t, e) => {
471
+ return { top: p, left: f };
472
+ }, rn = (t, e) => {
473
473
  for (const n of e)
474
474
  if (t.start < n.end && t.end > n.start)
475
475
  return !0;
476
476
  return !1;
477
- }, je = (t) => `highlight-wrapper-${t}`, Oe = (t) => `${je(t)}-start`, ct = (t) => `${je(t)}-end`, Ee = (t) => `[data-highlight-id="${CSS.escape(t)}"]`, rn = "2px", sn = "3px", an = "1px", dt = "3px", ln = "1px", ut = "Notebook note", Ge = (t, e) => {
477
+ }, ze = (t) => `highlight-wrapper-${t}`, Le = (t) => `${ze(t)}-start`, dt = (t) => `${ze(t)}-end`, Te = (t) => `[data-highlight-id="${CSS.escape(t)}"]`, sn = "2px", an = "3px", ln = "1px", ut = "3px", cn = "1px", ft = "Notebook note", We = (t, e) => {
478
478
  const n = Number.parseInt(t.slice(1, 3), 16), o = Number.parseInt(t.slice(3, 5), 16), r = Number.parseInt(t.slice(5, 7), 16);
479
479
  return `rgba(${n}, ${o}, ${r}, ${e})`;
480
- }, ft = (t, e, n, o, r) => {
481
- t.style.backgroundColor = n, t.style.textDecorationColor = o, t.style.textDecorationStyle = r, e ? (t.dataset.selected = "true", t.style.outline = `${an} ${r} ${o}`, t.style.outlineOffset = ln, t.style.borderRadius = dt, t.style.fontWeight = "bold", t.style.textDecorationLine = "none") : (t.removeAttribute("data-selected"), t.style.outline = "", t.style.outlineOffset = "", t.style.borderRadius = "", t.style.fontWeight = "", t.style.textDecorationLine = "underline");
482
- }, cn = /* @__PURE__ */ new Set([
480
+ }, mt = (t, e, n, o, r) => {
481
+ t.style.backgroundColor = n, t.style.textDecorationColor = o, t.style.textDecorationStyle = r, e ? (t.dataset.selected = "true", t.style.outline = `${ln} ${r} ${o}`, t.style.outlineOffset = cn, t.style.borderRadius = ut, t.style.fontWeight = "bold", t.style.textDecorationLine = "none") : (t.removeAttribute("data-selected"), t.style.outline = "", t.style.outlineOffset = "", t.style.borderRadius = "", t.style.fontWeight = "", t.style.textDecorationLine = "underline");
482
+ }, dn = /* @__PURE__ */ new Set([
483
483
  "AREA",
484
484
  "BASE",
485
485
  "BR",
@@ -494,15 +494,15 @@ const at = (t) => {
494
494
  "SOURCE",
495
495
  "TRACK",
496
496
  "WBR"
497
- ]), Qe = (t, e) => {
497
+ ]), Ye = (t, e) => {
498
498
  const n = t.cloneRange();
499
499
  n.collapse(e);
500
500
  const o = n.startContainer;
501
- if (!(o.nodeType === Node.ELEMENT_NODE && cn.has(o.tagName)) || !o.parentNode)
501
+ if (!(o.nodeType === Node.ELEMENT_NODE && dn.has(o.tagName)) || !o.parentNode)
502
502
  return n;
503
503
  const i = o.parentNode, s = Array.from(i.childNodes).indexOf(o), l = document.createRange();
504
504
  return l.setStart(i, s), l.collapse(!0), l;
505
- }, dn = (t, e) => {
505
+ }, un = (t, e) => {
506
506
  var n;
507
507
  try {
508
508
  const o = ((n = e.nodeValue) == null ? void 0 : n.length) ?? e.childNodes.length;
@@ -510,7 +510,7 @@ const at = (t) => {
510
510
  } catch {
511
511
  return !1;
512
512
  }
513
- }, un = (t) => {
513
+ }, fn = (t) => {
514
514
  var i;
515
515
  if (t.collapsed)
516
516
  return [];
@@ -520,7 +520,7 @@ const at = (t) => {
520
520
  const n = [], o = (i = e == null ? void 0 : e.ownerDocument) == null ? void 0 : i.createNodeIterator(e, NodeFilter.SHOW_TEXT);
521
521
  let r = (o == null ? void 0 : o.nextNode()) || null;
522
522
  for (; r; ) {
523
- if (!dn(t, r)) {
523
+ if (!un(t, r)) {
524
524
  r = (o == null ? void 0 : o.nextNode()) || null;
525
525
  continue;
526
526
  }
@@ -532,34 +532,34 @@ const at = (t) => {
532
532
  s === t.endContainer && t.endOffset < s.data.length && s.splitText(t.endOffset), n.push(s), r = (o == null ? void 0 : o.nextNode()) || null;
533
533
  }
534
534
  return n;
535
- }, fn = (t, e, n) => {
535
+ }, mn = (t, e, n) => {
536
536
  if (t.collapsed) return;
537
- const o = e.id ?? "", r = je(o);
538
- if (document.getElementById(Oe(o))) {
539
- mn(e, n);
537
+ const o = e.id ?? "", r = ze(o);
538
+ if (document.getElementById(Le(o))) {
539
+ gn(e, n);
540
540
  return;
541
541
  }
542
- const s = e.type === L.IMPORTANT ? n.colors.importantBackground : n.colors.confusingBackground, l = e.id === e.selectedNoteId, d = l ? s : Ge(s, 0.5), u = e.type === L.IMPORTANT ? n.colors.importantUnderline : n.colors.confusingUnderline, m = e.type === L.IMPORTANT ? "solid" : "dashed", c = document.createElement("span");
542
+ const s = e.type === k.IMPORTANT ? n.colors.importantBackground : n.colors.confusingBackground, l = e.id === e.selectedNoteId, d = l ? s : We(s, 0.5), u = e.type === k.IMPORTANT ? n.colors.importantUnderline : n.colors.confusingUnderline, f = e.type === k.IMPORTANT ? "solid" : "dashed", c = document.createElement("span");
543
543
  c.id = `${r}-start`, c.className = "highlight-marker-start", c.dataset.highlightId = o || "";
544
- const p = e.labelPrefix ?? ut;
544
+ const p = e.labelPrefix ?? ft;
545
545
  c.setAttribute("role", "button"), c.setAttribute("tabindex", "0"), c.setAttribute("aria-label", p), c.setAttribute("aria-haspopup", "dialog"), c.setAttribute("aria-expanded", String(l && !!e.isTrayOpen)), l && c.setAttribute("aria-current", "true"), e.popupId && c.setAttribute("aria-controls", e.popupId), c.style.position = "relative", c.style.fontSize = "0", c.style.lineHeight = "0", c.style.width = "0", c.style.height = "0", c.style.margin = "0", c.style.padding = "0", c.style.border = "0", c.style.outline = "none";
546
- const T = document.createElement("span");
547
- T.id = ct(o), T.className = "highlight-marker-end", T.dataset.highlightId = o || "", Qe(t, !1).insertNode(T), Qe(t, !0).insertNode(c);
546
+ const E = document.createElement("span");
547
+ E.id = dt(o), E.className = "highlight-marker-end", E.dataset.highlightId = o || "", Ye(t, !1).insertNode(E), Ye(t, !0).insertNode(c);
548
548
  const y = document.createRange();
549
- y.setStartAfter(c), y.setEndBefore(T);
550
- const v = un(y).filter((h) => h.textContent && h.textContent.length > 0);
551
- v.forEach((h, I) => {
552
- var B;
553
- const P = h.parentElement;
554
- if ((P == null ? void 0 : P.dataset.highlightId) === o) return;
555
- const D = I === 0, W = I === v.length - 1, C = v.length === 1;
549
+ y.setStartAfter(c), y.setEndBefore(E);
550
+ const C = fn(y).filter((h) => h.textContent && h.textContent.length > 0);
551
+ C.forEach((h, I) => {
552
+ var j;
553
+ const D = h.parentElement;
554
+ if ((D == null ? void 0 : D.dataset.highlightId) === o) return;
555
+ const A = I === 0, z = I === C.length - 1, x = C.length === 1;
556
556
  let R;
557
- C ? R = "single" : D ? R = "first" : W ? R = "last" : R = "middle";
558
- const S = document.createElement("span");
559
- S.className = "highlight-content", S.dataset.highlightId = o || "", S.dataset.position = R, S.style.textDecorationLine = "underline", S.style.textDecorationThickness = n.borderWidthSmall, S.style.textUnderlineOffset = n.underlineOffset, S.style.cursor = "pointer", ft(S, l, d, u, m), S.addEventListener("click", (re) => {
557
+ x ? R = "single" : A ? R = "first" : z ? R = "last" : R = "middle";
558
+ const T = document.createElement("span");
559
+ T.className = "highlight-content", T.dataset.highlightId = o || "", T.dataset.position = R, T.style.textDecorationLine = "underline", T.style.textDecorationThickness = n.borderWidthSmall, T.style.textUnderlineOffset = n.underlineOffset, T.style.cursor = "pointer", mt(T, l, d, u, f), T.addEventListener("click", (se) => {
560
560
  var X;
561
- re.target.tagName !== "A" && ((X = e.onClick) == null || X.call(e));
562
- }), (B = h.parentNode) == null || B.insertBefore(S, h), S.appendChild(h);
561
+ se.target.tagName !== "A" && ((X = e.onClick) == null || X.call(e));
562
+ }), (j = h.parentNode) == null || j.insertBefore(T, h), T.appendChild(h);
563
563
  }), c.addEventListener("click", (h) => {
564
564
  var I;
565
565
  h.target.tagName !== "A" && ((I = e.onClick) == null || I.call(e));
@@ -568,93 +568,93 @@ const at = (t) => {
568
568
  if (h.key === "Enter" || h.key === " ")
569
569
  h.preventDefault(), (I = e.onClick) == null || I.call(e);
570
570
  else if (h.key === "Tab" && !h.shiftKey) {
571
- const P = document.querySelectorAll(Ee(o));
572
- for (const D of P) {
573
- const W = D.querySelector("a");
574
- if (W) {
575
- h.preventDefault(), W.focus();
571
+ const D = document.querySelectorAll(Te(o));
572
+ for (const A of D) {
573
+ const z = A.querySelector("a");
574
+ if (z) {
575
+ h.preventDefault(), z.focus();
576
576
  break;
577
577
  }
578
578
  }
579
579
  }
580
580
  }), c.addEventListener("focus", () => {
581
581
  document.querySelectorAll(
582
- `.highlight-content${Ee(o)}`
582
+ `.highlight-content${Te(o)}`
583
583
  ).forEach((I) => {
584
- I.style.boxShadow = `0 0 0 ${rn} ${n.colors.focusOutline}`, I.style.borderRadius = sn;
584
+ I.style.boxShadow = `0 0 0 ${sn} ${n.colors.focusOutline}`, I.style.borderRadius = an;
585
585
  });
586
586
  }), c.addEventListener("blur", () => {
587
587
  document.querySelectorAll(
588
- `.highlight-content${Ee(o)}`
588
+ `.highlight-content${Te(o)}`
589
589
  ).forEach((I) => {
590
- I.style.boxShadow = "", I.style.borderRadius = I.dataset.selected ? dt : "";
590
+ I.style.boxShadow = "", I.style.borderRadius = I.dataset.selected ? ut : "";
591
591
  });
592
592
  });
593
593
  };
594
- function mn(t, e) {
595
- const n = t.type === L.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground, o = t.id === t.selectedNoteId, r = o ? n : Ge(n, 0.5), i = t.type === L.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline, s = t.type === L.IMPORTANT ? "solid" : "dashed";
594
+ function gn(t, e) {
595
+ const n = t.type === k.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground, o = t.id === t.selectedNoteId, r = o ? n : We(n, 0.5), i = t.type === k.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline, s = t.type === k.IMPORTANT ? "solid" : "dashed";
596
596
  document.querySelectorAll(
597
- `.highlight-content${Ee(t.id ?? "")}`
597
+ `.highlight-content${Te(t.id ?? "")}`
598
598
  ).forEach((u) => {
599
- ft(u, o, r, i, s);
599
+ mt(u, o, r, i, s);
600
600
  });
601
601
  const d = document.getElementById(
602
- Oe(t.id ?? "")
602
+ Le(t.id ?? "")
603
603
  );
604
- d && (d.setAttribute("aria-label", t.labelPrefix ?? ut), d.setAttribute("aria-expanded", String(o && !!t.isTrayOpen)), o ? d.setAttribute("aria-current", "true") : d.removeAttribute("aria-current"));
604
+ d && (d.setAttribute("aria-label", t.labelPrefix ?? ft), d.setAttribute("aria-expanded", String(o && !!t.isTrayOpen)), o ? d.setAttribute("aria-current", "true") : d.removeAttribute("aria-current"));
605
605
  }
606
- const gn = (t) => {
607
- const e = t.id ?? "", n = document.getElementById(Oe(e)), o = document.getElementById(ct(e));
606
+ const hn = (t) => {
607
+ const e = t.id ?? "", n = document.getElementById(Le(e)), o = document.getElementById(dt(e));
608
608
  document.querySelectorAll(
609
- Ee(e)
609
+ Te(e)
610
610
  ).forEach((i) => {
611
611
  var s;
612
612
  for (; i.firstChild; )
613
613
  (s = i.parentNode) == null || s.insertBefore(i.firstChild, i);
614
614
  i.remove();
615
615
  }), n == null || n.remove(), o == null || o.remove();
616
- }, ge = {
616
+ }, he = {
617
617
  all: ["notebook"],
618
618
  notes: (t) => ["notebook", "notes", t]
619
619
  };
620
- function hn(t) {
621
- const e = _e();
622
- return Fe({
620
+ function pn(t) {
621
+ const e = Ue();
622
+ return $e({
623
623
  mutationFn: (n) => t.createNote(n),
624
624
  onSuccess: () => {
625
- e.invalidateQueries({ queryKey: ge.all });
625
+ e.invalidateQueries({ queryKey: he.all });
626
626
  }
627
627
  });
628
628
  }
629
- function pn(t) {
630
- const e = _e();
631
- return Fe({
629
+ function yn(t) {
630
+ const e = Ue();
631
+ return $e({
632
632
  mutationFn: (n) => t.deleteNote(n),
633
633
  onSuccess: () => {
634
- e.invalidateQueries({ queryKey: ge.all });
634
+ e.invalidateQueries({ queryKey: he.all });
635
635
  }
636
636
  });
637
637
  }
638
- function mt({
638
+ function gt({
639
639
  api: t,
640
640
  enabled: e = !0,
641
641
  ...n
642
642
  }) {
643
- return Lt({
644
- queryKey: ge.notes(n),
643
+ return Dt({
644
+ queryKey: he.notes(n),
645
645
  queryFn: () => t.getNotes(n),
646
646
  enabled: e
647
647
  });
648
648
  }
649
- const yn = 100;
650
- function gt({
649
+ const Nn = 100;
650
+ function ht({
651
651
  api: t,
652
652
  courseId: e,
653
653
  learningObject: n,
654
654
  reactions: o,
655
655
  enabled: r = !0
656
656
  }) {
657
- return mt({
657
+ return gt({
658
658
  api: t,
659
659
  filter: {
660
660
  ...e ? { courseId: e } : {},
@@ -662,17 +662,17 @@ function gt({
662
662
  ...o != null && o.length ? { reactions: o } : {}
663
663
  },
664
664
  offset: 0,
665
- pageSize: yn,
665
+ pageSize: Nn,
666
666
  enabled: r
667
667
  });
668
668
  }
669
669
  function bn(t) {
670
- const e = _e();
671
- return Fe({
670
+ const e = Ue();
671
+ return $e({
672
672
  mutationFn: ({ id: n, input: o }) => t.updateNote(n, o),
673
673
  onMutate: async ({ id: n, input: o }) => {
674
- await e.cancelQueries({ queryKey: ge.all });
675
- const i = e.getQueryCache().findAll({ queryKey: ge.all }), s = /* @__PURE__ */ new Map();
674
+ await e.cancelQueries({ queryKey: he.all });
675
+ const i = e.getQueryCache().findAll({ queryKey: he.all }), s = /* @__PURE__ */ new Map();
676
676
  for (const l of i) {
677
677
  const d = l.state.data;
678
678
  d && (s.set(l.queryKey, d), e.setQueryData(l.queryKey, {
@@ -690,90 +690,90 @@ function bn(t) {
690
690
  e.setQueryData(i, s);
691
691
  },
692
692
  onSettled: () => {
693
- e.invalidateQueries({ queryKey: ge.all });
693
+ e.invalidateQueries({ queryKey: he.all });
694
694
  }
695
695
  });
696
696
  }
697
- const Nn = "Notebook", En = "Notes", Tn = "Important", Sn = "Unclear", vn = "Source changed", Cn = "Back", xn = "Edit note", In = "Save", wn = "Cancel", Rn = "Delete note", On = "Delete note confirmation", kn = "note", Ln = "Add note (optional)", An = "Remove from Notebook", Dn = "Add a note (optional)", Pn = "Last saved", Mn = "Mark important", _n = "Mark unclear", Fn = "Press Ctrl+Shift+L (Windows/Linux) or Cmd+Shift+L (Mac) to mark this selection as unclear or important.", Un = "Saved to Notebook.", $n = "Note updated", Bn = "Note deleted", Hn = "Error saving to Notebook.", jn = "Error updating note", Gn = "Note deletion failed", zn = "Loading notes", Wn = "Failed to load notes", Kn = "Start capturing your notes", qn = "To use the Notebook feature, select text on a page to mark it as Important or Unclear, and add an optional note.", Vn = "Only you can see your Notebook. Instructors and classmates don't see your notes.", Xn = "Nothing here yet", Zn = "Adjust your filters or create a new note to get started.", Qn = "You have no notes for the selected filter", Yn = "Filter", Jn = "Previous page", eo = "Next page", to = "All courses", no = "All notes", oo = "Close Notebook panel", ro = "To use the Notebook feature, highlight an excerpt from your learning material to flag it as 'confusing' or 'important' and leave an optional note.", io = "This text was changed or removed.", so = "This source is no longer available.", ao = "Notebook note", lo = "Page/Object Title", co = "Label", uo = "Highlighted Text", fo = "Note", mo = "Last Modified", go = "Untitled", ze = {
698
- notebook: Nn,
699
- notes: En,
700
- important: Tn,
701
- unclear: Sn,
702
- sourceChanged: vn,
703
- back: Cn,
704
- editNote: xn,
705
- save: In,
706
- cancel: wn,
707
- deleteNote: Rn,
708
- deleteNoteConfirmation: On,
709
- note: kn,
710
- addNotePrompt: Ln,
697
+ const En = "Notebook", Tn = "Notes", Sn = "Important", vn = "Unclear", Cn = "Source changed", xn = "Back", In = "Edit note", wn = "Save", Rn = "Cancel", On = "Delete note", kn = "Delete note confirmation", Ln = "note", Dn = "Add note (optional)", An = "Remove from Notebook", Pn = "Add a note (optional)", Mn = "Last saved", _n = "Mark important", Fn = "Mark unclear", Un = "Press Ctrl+Shift+L (Windows/Linux) or Cmd+Shift+L (Mac) to mark this selection as unclear or important.", $n = "Saved to Notebook.", Hn = "Note updated", Bn = "Note deleted", jn = "Error saving to Notebook.", Gn = "Error updating note", zn = "Note deletion failed", Wn = "Loading notes", Kn = "Failed to load notes", qn = "Start capturing your notes", Vn = "To use the Notebook feature, select text on a page to mark it as Important or Unclear, and add an optional note.", Xn = "Only you can see your Notebook. Instructors and classmates don't see your notes.", Zn = "Nothing here yet", Qn = "Adjust your filters or create a new note to get started.", Yn = "You have no notes for the selected filter", Jn = "Filter", eo = "Previous page", to = "Next page", no = "All courses", oo = "All notes", ro = "Close Notebook panel", io = "To use the Notebook feature, highlight an excerpt from your learning material to flag it as 'confusing' or 'important' and leave an optional note.", so = "This text was changed or removed.", ao = "This source is no longer available.", lo = "Notebook note", co = "Page/Object Title", uo = "Label", fo = "Highlighted Text", mo = "Note", go = "Last Modified", ho = "Untitled", Ke = {
698
+ notebook: En,
699
+ notes: Tn,
700
+ important: Sn,
701
+ unclear: vn,
702
+ sourceChanged: Cn,
703
+ back: xn,
704
+ editNote: In,
705
+ save: wn,
706
+ cancel: Rn,
707
+ deleteNote: On,
708
+ deleteNoteConfirmation: kn,
709
+ note: Ln,
710
+ addNotePrompt: Dn,
711
711
  removeFromNotebook: An,
712
- addNoteOptional: Dn,
713
- lastSaved: Pn,
714
- markImportant: Mn,
715
- markUnclear: _n,
716
- selectionMenuInstructions: Fn,
717
- savedToNotebook: Un,
718
- noteUpdated: $n,
712
+ addNoteOptional: Pn,
713
+ lastSaved: Mn,
714
+ markImportant: _n,
715
+ markUnclear: Fn,
716
+ selectionMenuInstructions: Un,
717
+ savedToNotebook: $n,
718
+ noteUpdated: Hn,
719
719
  noteDeleted: Bn,
720
- errorSavingNote: Hn,
721
- errorUpdatingNote: jn,
722
- noteDeletionFailed: Gn,
723
- loadingNotes: zn,
724
- failedToLoadNotes: Wn,
725
- emptyStateHeading: Kn,
726
- emptyStateDescription: qn,
727
- emptyStatePrecision: Vn,
728
- nothingHereYet: Xn,
729
- adjustFiltersOrCreate: Zn,
730
- noNotesForFilter: Qn,
731
- filter: Yn,
732
- previousPage: Jn,
733
- nextPage: eo,
734
- allCourses: to,
735
- allNotes: no,
736
- closeNotebookPanel: oo,
737
- featureDescription: ro,
738
- highlightUnavailable: io,
739
- highlightSourceUnavailable: so,
740
- notebookNote: ao,
741
- exportColumnPageTitle: lo,
742
- exportColumnLabel: co,
743
- exportColumnHighlightedText: uo,
744
- exportColumnNote: fo,
745
- exportColumnLastModified: mo,
746
- exportUntitled: go
747
- }, ht = nt(null);
748
- function pt(t, e) {
749
- const n = ze[t] ?? t;
720
+ errorSavingNote: jn,
721
+ errorUpdatingNote: Gn,
722
+ noteDeletionFailed: zn,
723
+ loadingNotes: Wn,
724
+ failedToLoadNotes: Kn,
725
+ emptyStateHeading: qn,
726
+ emptyStateDescription: Vn,
727
+ emptyStatePrecision: Xn,
728
+ nothingHereYet: Zn,
729
+ adjustFiltersOrCreate: Qn,
730
+ noNotesForFilter: Yn,
731
+ filter: Jn,
732
+ previousPage: eo,
733
+ nextPage: to,
734
+ allCourses: no,
735
+ allNotes: oo,
736
+ closeNotebookPanel: ro,
737
+ featureDescription: io,
738
+ highlightUnavailable: so,
739
+ highlightSourceUnavailable: ao,
740
+ notebookNote: lo,
741
+ exportColumnPageTitle: co,
742
+ exportColumnLabel: uo,
743
+ exportColumnHighlightedText: fo,
744
+ exportColumnNote: mo,
745
+ exportColumnLastModified: go,
746
+ exportUntitled: ho
747
+ }, pt = ot(null);
748
+ function yt(t, e) {
749
+ const n = Ke[t] ?? t;
750
750
  return e ? n.replace(/%\{([^}]+)}/g, (o, r) => String(e[r] ?? `%{${r}}`)) : n;
751
751
  }
752
- function ho({
752
+ function po({
753
753
  translations: t,
754
754
  translate: e,
755
755
  children: n
756
756
  }) {
757
- const o = he(() => ({
758
- translations: new Proxy(ze, {
757
+ const o = pe(() => ({
758
+ translations: new Proxy(Ke, {
759
759
  get(i, s) {
760
760
  return (t == null ? void 0 : t[s]) ?? i[s];
761
761
  }
762
762
  }),
763
- translate: e ?? pt
763
+ translate: e ?? yt
764
764
  }), [t, e]);
765
- return /* @__PURE__ */ a(ht.Provider, { value: o, children: n });
765
+ return /* @__PURE__ */ a(pt.Provider, { value: o, children: n });
766
766
  }
767
767
  function J() {
768
- const t = ot(ht);
769
- return t || { translations: ze, translate: pt };
768
+ const t = rt(pt);
769
+ return t || { translations: Ke, translate: yt };
770
770
  }
771
- const po = (t) => ({
771
+ const yo = (t) => ({
772
772
  selectedNoteId: t ?? null,
773
773
  isNoteEditing: !1,
774
774
  isTrayOpen: t != null
775
775
  });
776
- function yo(t, e) {
776
+ function No(t, e) {
777
777
  switch (e.type) {
778
778
  case "SELECT_NOTE":
779
779
  return {
@@ -793,8 +793,8 @@ function yo(t, e) {
793
793
  return t;
794
794
  }
795
795
  }
796
- const yt = nt(null);
797
- function ar({
796
+ const Nt = ot(null);
797
+ function lr({
798
798
  api: t,
799
799
  currentUserId: e,
800
800
  objectId: n,
@@ -805,9 +805,9 @@ function ar({
805
805
  initialNoteId: l,
806
806
  translations: d,
807
807
  translate: u,
808
- children: m
808
+ children: f
809
809
  }) {
810
- const [c, p] = rt(yo, po(l)), T = _(l != null), b = he(
810
+ const [c, p] = it(No, yo(l)), E = F(l != null), N = pe(
811
811
  () => ({
812
812
  api: t,
813
813
  currentUserId: e,
@@ -820,35 +820,35 @@ function ar({
820
820
  clearSelectedNote: () => p({ type: "CLEAR_SELECTED_NOTE" }),
821
821
  setEditing: (w) => p({ type: "SET_EDITING", payload: w }),
822
822
  openTray: () => {
823
- T.current || (T.current = !0, s == null || s()), p({ type: "OPEN_TRAY" });
823
+ E.current || (E.current = !0, s == null || s()), p({ type: "OPEN_TRAY" });
824
824
  },
825
825
  closeTray: () => {
826
- T.current = !1, p({ type: "CLOSE_TRAY" });
826
+ E.current = !1, p({ type: "CLOSE_TRAY" });
827
827
  }
828
828
  }),
829
829
  [t, e, n, o, r, i, s, c]
830
830
  );
831
- return /* @__PURE__ */ a(yt.Provider, { value: b, children: /* @__PURE__ */ a(ho, { translations: d, translate: u, children: m }) });
831
+ return /* @__PURE__ */ a(Nt.Provider, { value: N, children: /* @__PURE__ */ a(po, { translations: d, translate: u, children: f }) });
832
832
  }
833
833
  function bt() {
834
- const t = ot(yt);
834
+ const t = rt(Nt);
835
835
  if (!t)
836
836
  throw new Error("useNotebook must be used within a NotebookProvider");
837
837
  return t;
838
838
  }
839
- const Nt = "notebook-tray-content", lr = ({ children: t }) => {
839
+ const Et = "notebook-tray-content", cr = ({ children: t }) => {
840
840
  const { isTrayOpen: e, closeTray: n } = bt(), { translations: o } = J();
841
841
  return /* @__PURE__ */ a(
842
- Dt,
842
+ Pt,
843
843
  {
844
844
  label: o.notebook,
845
845
  open: e,
846
846
  onDismiss: n,
847
847
  placement: "end",
848
848
  size: "regular",
849
- children: /* @__PURE__ */ E(x, { direction: "column", height: "100vh", id: Nt, children: [
850
- /* @__PURE__ */ a(x.Item, { children: /* @__PURE__ */ a(Y, { as: "div", padding: "small medium", borderWidth: "0 0 small 0", children: /* @__PURE__ */ E(x, { justifyItems: "space-between", alignItems: "center", children: [
851
- /* @__PURE__ */ a(we, { level: "h3", children: o.notebook }),
849
+ children: /* @__PURE__ */ b(v, { direction: "column", height: "100vh", id: Et, children: [
850
+ /* @__PURE__ */ a(v.Item, { children: /* @__PURE__ */ a(Y, { as: "div", padding: "small medium", borderWidth: "0 0 small 0", children: /* @__PURE__ */ b(v, { justifyItems: "space-between", alignItems: "center", children: [
851
+ /* @__PURE__ */ a(Oe, { level: "h3", children: o.notebook }),
852
852
  /* @__PURE__ */ a(
853
853
  At,
854
854
  {
@@ -859,18 +859,18 @@ const Nt = "notebook-tray-content", lr = ({ children: t }) => {
859
859
  }
860
860
  )
861
861
  ] }) }) }),
862
- /* @__PURE__ */ a(x.Item, { shouldGrow: !0, shouldShrink: !0, overflowY: "auto", overflowX: "hidden", children: t })
862
+ /* @__PURE__ */ a(v.Item, { shouldGrow: !0, shouldShrink: !0, overflowY: "auto", overflowX: "hidden", children: t })
863
863
  ] })
864
864
  }
865
865
  );
866
- }, Et = wt(
866
+ }, Tt = Rt(
867
867
  ({ currentType: t, disabled: e = !1, autoFocus: n = !0, onSelectReaction: o }, r) => {
868
- const { translations: i } = J(), s = _(null), l = _(null), d = q(() => {
869
- t === L.CONFUSING && s.current ? s.current.focus() : t === L.IMPORTANT && l.current ? l.current.focus() : s.current && s.current.focus();
868
+ const { translations: i } = J(), s = F(null), l = F(null), d = q(() => {
869
+ t === k.CONFUSING && s.current ? s.current.focus() : t === k.IMPORTANT && l.current ? l.current.focus() : s.current && s.current.focus();
870
870
  }, [t]);
871
871
  return V(() => {
872
872
  n && d();
873
- }, [n, d]), Rt(r, () => ({ focus: d }), [d]), /* @__PURE__ */ a(
873
+ }, [n, d]), Ot(r, () => ({ focus: d }), [d]), /* @__PURE__ */ a(
874
874
  Y,
875
875
  {
876
876
  as: "div",
@@ -879,27 +879,27 @@ const Nt = "notebook-tray-content", lr = ({ children: t }) => {
879
879
  borderColor: "secondary",
880
880
  borderRadius: "medium",
881
881
  shadow: "resting",
882
- children: /* @__PURE__ */ E(me, { children: [
883
- /* @__PURE__ */ E(
884
- me.Item,
882
+ children: /* @__PURE__ */ b(ge, { children: [
883
+ /* @__PURE__ */ b(
884
+ ge.Item,
885
885
  {
886
886
  ref: s,
887
887
  disabled: e,
888
- onClick: () => o(L.CONFUSING),
888
+ onClick: () => o(k.CONFUSING),
889
889
  children: [
890
- /* @__PURE__ */ a(Ue, { size: "x-small" }),
890
+ /* @__PURE__ */ a(He, { size: "x-small" }),
891
891
  ` ${i.markUnclear}`
892
892
  ]
893
893
  }
894
894
  ),
895
- /* @__PURE__ */ E(
896
- me.Item,
895
+ /* @__PURE__ */ b(
896
+ ge.Item,
897
897
  {
898
898
  ref: l,
899
899
  disabled: e,
900
- onClick: () => o(L.IMPORTANT),
900
+ onClick: () => o(k.IMPORTANT),
901
901
  children: [
902
- /* @__PURE__ */ a($e, { size: "x-small" }),
902
+ /* @__PURE__ */ a(Be, { size: "x-small" }),
903
903
  ` ${i.markImportant}`
904
904
  ]
905
905
  }
@@ -909,13 +909,13 @@ const Nt = "notebook-tray-content", lr = ({ children: t }) => {
909
909
  );
910
910
  }
911
911
  );
912
- Et.displayName = "NoteReactionMenu";
913
- const Tt = "notebook-inline-reaction-menu";
914
- function Le(t) {
912
+ Tt.displayName = "NoteReactionMenu";
913
+ const St = "notebook-inline-reaction-menu";
914
+ function Ae(t) {
915
915
  var e;
916
- return !!((e = document.getElementById(Tt)) != null && e.contains(t));
916
+ return !!((e = document.getElementById(St)) != null && e.contains(t));
917
917
  }
918
- function cr({
918
+ function dr({
919
919
  containerRef: t,
920
920
  highlightTheme: e,
921
921
  debounceTime: n = 500,
@@ -928,179 +928,179 @@ function cr({
928
928
  api: l,
929
929
  objectId: d,
930
930
  objectType: u,
931
- courseId: m,
931
+ courseId: f,
932
932
  pageLastModifiedAt: c,
933
933
  selectedNoteId: p,
934
- isTrayOpen: T,
935
- selectNote: b,
934
+ isTrayOpen: E,
935
+ selectNote: N,
936
936
  openTray: w
937
- } = bt(), { translations: y } = J(), { data: O } = gt({
937
+ } = bt(), { translations: y } = J(), { data: O } = ht({
938
938
  api: l,
939
- courseId: m,
939
+ courseId: f,
940
940
  learningObject: { type: u, id: d }
941
- }), { mutate: v, isPending: h } = hn(l), { mutateAsync: I } = bn(l), { mutate: P } = pn(l), D = _([]), [W, C] = z([]), [R, S] = z(null), [B, re] = z(""), [X, ue] = z(null), te = _(null);
942
- te.current = X;
943
- const [pe, ie] = z(""), ce = _(null), F = _(!1), [K, se] = z(!1);
941
+ }), { mutate: C, isPending: h } = pn(l), { mutateAsync: I } = bn(l), { mutate: D } = yn(l), A = F([]), [z, x] = G([]), [R, T] = G(null), [j, se] = G(""), [X, fe] = G(null), ne = F(null);
942
+ ne.current = X;
943
+ const [ye, ae] = G(""), de = F(null), $ = F(!1), [K, le] = G(!1);
944
944
  V(() => {
945
945
  const M = t.current;
946
946
  if (!M) return;
947
- const A = M.closest(".user_content") ?? M;
948
- if (A.classList.contains("enhanced")) {
949
- se(!0);
947
+ const L = M.closest(".user_content") ?? M;
948
+ if (L.classList.contains("enhanced")) {
949
+ le(!0);
950
950
  return;
951
951
  }
952
- const U = new MutationObserver(($) => {
953
- for (const H of $)
954
- if (H.type === "attributes" && H.attributeName === "class" && H.target.classList.contains("enhanced")) {
955
- se(!0), U.disconnect();
952
+ const H = new MutationObserver((B) => {
953
+ for (const U of B)
954
+ if (U.type === "attributes" && U.attributeName === "class" && U.target.classList.contains("enhanced")) {
955
+ le(!0), H.disconnect();
956
956
  return;
957
957
  }
958
958
  });
959
- return U.observe(A, { attributes: !0, attributeFilter: ["class"] }), () => U.disconnect();
959
+ return H.observe(L, { attributes: !0, attributeFilter: ["class"] }), () => H.disconnect();
960
960
  }, [t]);
961
961
  const ee = q(() => {
962
- ue(null), S(null), re(""), ie("");
962
+ fe(null), T(null), se(""), ae("");
963
963
  }, []);
964
964
  V(() => {
965
965
  if (!K || !t.current) return;
966
- let A = null;
967
- const U = () => {
968
- A && clearTimeout(A), A = setTimeout(() => {
969
- var We;
970
- const N = window.getSelection(), j = t.current;
971
- if (!j) return;
972
- const g = N != null && N.rangeCount ? N.toString().trim() : "";
973
- if (!N || g === "") {
974
- te.current !== null && !Le(document.activeElement) && ee();
966
+ let L = null;
967
+ const H = () => {
968
+ L && clearTimeout(L), L = setTimeout(() => {
969
+ var W;
970
+ const S = window.getSelection(), _ = t.current;
971
+ if (!_) return;
972
+ const oe = S != null && S.rangeCount ? S.toString().trim() : "";
973
+ if (!S || oe === "") {
974
+ ne.current !== null && !Ae(document.activeElement) && ee();
975
975
  return;
976
976
  }
977
- const G = N.getRangeAt(0);
978
- if (!j.contains(G.commonAncestorContainer)) return;
979
- const ae = (We = le.fromRange(j, G)) == null ? void 0 : We.toSelector();
980
- ae && !on(ae, W) && (S(G.cloneRange()), re(g), ue(nn(G)), ie(y.selectionMenuInstructions));
977
+ const re = S.getRangeAt(0);
978
+ if (!_.contains(re.commonAncestorContainer)) return;
979
+ const g = (W = ce.fromRange(_, re)) == null ? void 0 : W.toSelector();
980
+ g && !rn(g, z) && (T(re.cloneRange()), se(oe), fe(on(re)), ae(y.selectionMenuInstructions));
981
981
  }, n);
982
- }, $ = (N) => {
983
- N.target instanceof Node && (Le(N.target) ? (N.preventDefault(), N.stopImmediatePropagation()) : ee());
984
- }, H = () => {
982
+ }, B = (S) => {
983
+ S.target instanceof Node && (Ae(S.target) ? (S.preventDefault(), S.stopImmediatePropagation()) : ee());
984
+ }, U = () => {
985
985
  ee();
986
- }, k = (N) => {
987
- var j;
988
- if (N.key === "Escape" && te.current !== null) {
989
- ee(), N.stopImmediatePropagation();
986
+ }, P = (S) => {
987
+ var _;
988
+ if (S.key === "Escape" && ne.current !== null) {
989
+ ee(), S.stopImmediatePropagation();
990
990
  return;
991
991
  }
992
- (N.ctrlKey || N.metaKey) && N.shiftKey && N.key.toLowerCase() === "l" && te.current !== null && (N.preventDefault(), (j = ce.current) == null || j.focus());
992
+ (S.ctrlKey || S.metaKey) && S.shiftKey && S.key.toLowerCase() === "l" && ne.current !== null && (S.preventDefault(), (_ = de.current) == null || _.focus());
993
993
  };
994
- return document.addEventListener("selectionchange", U), document.addEventListener("mousedown", $), document.addEventListener("touchstart", $), document.addEventListener("keydown", k), window.addEventListener("scroll", H, !0), () => {
995
- A && clearTimeout(A), document.removeEventListener("selectionchange", U), document.removeEventListener("mousedown", $), document.removeEventListener("touchstart", $), document.removeEventListener("keydown", k), window.removeEventListener("scroll", H, !0);
994
+ return document.addEventListener("selectionchange", H), document.addEventListener("mousedown", B), document.addEventListener("touchstart", B), document.addEventListener("keydown", P), window.addEventListener("scroll", U, !0), () => {
995
+ L && clearTimeout(L), document.removeEventListener("selectionchange", H), document.removeEventListener("mousedown", B), document.removeEventListener("touchstart", B), document.removeEventListener("keydown", P), window.removeEventListener("scroll", U, !0);
996
996
  };
997
- }, [K, W, n, t, ee, y]);
998
- const ye = q(
997
+ }, [K, z, n, t, ee, y]);
998
+ const Ne = q(
999
999
  (M) => {
1000
- var j;
1001
- const A = t.current;
1002
- if (!A || !M.highlightData) return null;
1003
- const { highlightData: U, reaction: $, id: H } = M;
1004
- if (U.hasNoHighlightAnymore) return null;
1005
- const { range: k } = U, N = k && ((j = de.fromSelector(A, k)) == null ? void 0 : j.toRange());
1006
- if (N) {
1007
- const g = $[0] === L.IMPORTANT ? y.important : y.unclear, G = {
1008
- id: H,
1000
+ var _;
1001
+ const L = t.current;
1002
+ if (!L || !M.highlightData) return null;
1003
+ const { highlightData: H, reaction: B, id: U } = M;
1004
+ if (H.hasNoHighlightAnymore) return null;
1005
+ const { range: P } = H, S = P && ((_ = ue.fromSelector(L, P)) == null ? void 0 : _.toRange());
1006
+ if (S) {
1007
+ const oe = B[0] === k.IMPORTANT ? y.important : y.unclear, re = {
1008
+ id: U,
1009
1009
  selectedNoteId: p,
1010
- type: $[0],
1011
- isTrayOpen: T,
1012
- labelPrefix: `${y.notebookNote} (${g})`,
1013
- popupId: Nt,
1010
+ type: B[0],
1011
+ isTrayOpen: E,
1012
+ labelPrefix: `${y.notebookNote} (${oe})`,
1013
+ popupId: Et,
1014
1014
  onClick: () => {
1015
- b(H), w();
1015
+ N(U), w();
1016
1016
  }
1017
1017
  };
1018
- return fn(N, G, e), U.textPosition;
1018
+ return mn(S, re, e), H.textPosition;
1019
1019
  }
1020
1020
  return null;
1021
1021
  },
1022
- [t, p, T, e, y, b, w]
1022
+ [t, p, E, e, y, N, w]
1023
1023
  );
1024
1024
  V(() => {
1025
1025
  if (!K || !O || !t.current) return;
1026
- const M = t.current, A = O.notes, U = /* @__PURE__ */ new Set(), $ = [], H = [];
1027
- if (A.length === 0) {
1028
- if (D.current.length > 0) {
1029
- for (const k of D.current)
1030
- Ze(k, M);
1031
- D.current = [], C([]);
1026
+ const M = t.current, L = O.notes, H = /* @__PURE__ */ new Set(), B = [], U = [];
1027
+ if (L.length === 0) {
1028
+ if (A.current.length > 0) {
1029
+ for (const P of A.current)
1030
+ Qe(P, M);
1031
+ A.current = [], x([]);
1032
1032
  }
1033
1033
  return;
1034
1034
  }
1035
- if (c && A[0].highlightData.pageLastModifiedAt !== c) {
1036
- const { notesForUpdate: k, noteIdsForDelete: N } = en(
1035
+ if (c && L[0].highlightData.pageLastModifiedAt !== c) {
1036
+ const { notesForUpdate: P, noteIdsForDelete: S } = tn(
1037
1037
  M,
1038
- A,
1038
+ L,
1039
1039
  c
1040
1040
  );
1041
- for (const j of k)
1042
- I({ id: j.id, input: j }).catch((g) => r == null ? void 0 : r(g));
1043
- for (const j of N)
1044
- P(j, { onError: i });
1041
+ for (const _ of P)
1042
+ I({ id: _.id, input: _ }).catch((oe) => r == null ? void 0 : r(oe));
1043
+ for (const _ of S)
1044
+ D(_, { onError: i });
1045
1045
  } else {
1046
- for (const k of A) {
1047
- const N = ye(k);
1048
- N && (U.add(k.id), $.push(k), H.push(N));
1046
+ for (const P of L) {
1047
+ const S = Ne(P);
1048
+ S && (H.add(P.id), B.push(P), U.push(S));
1049
1049
  }
1050
- for (const k of D.current)
1051
- U.has(k.id) || Ze(k, M);
1052
- C(H), D.current = $, p && tn(p);
1050
+ for (const P of A.current)
1051
+ H.has(P.id) || Qe(P, M);
1052
+ x(U), A.current = B, p && nn(p);
1053
1053
  }
1054
1054
  }, [
1055
1055
  K,
1056
1056
  O,
1057
- ye,
1057
+ Ne,
1058
1058
  c,
1059
1059
  t,
1060
1060
  I,
1061
- P,
1061
+ D,
1062
1062
  p
1063
1063
  ]);
1064
- const fe = (M) => {
1065
- const A = t.current;
1066
- if (!R || !A || F.current) return;
1067
- F.current = !0;
1068
- const U = de.fromRange(A, R), $ = le.fromRange(A, R);
1069
- v(
1064
+ const me = (M) => {
1065
+ const L = t.current;
1066
+ if (!R || !L || $.current) return;
1067
+ $.current = !0;
1068
+ const H = ue.fromRange(L, R), B = ce.fromRange(L, R);
1069
+ C(
1070
1070
  {
1071
- courseId: m,
1071
+ courseId: f,
1072
1072
  objectId: d,
1073
1073
  objectType: u,
1074
1074
  userText: "",
1075
1075
  reaction: [M],
1076
1076
  highlightData: {
1077
- selectedText: B,
1078
- textPosition: ($ == null ? void 0 : $.toSelector()) ?? null,
1079
- range: U.toSelector(),
1077
+ selectedText: j,
1078
+ textPosition: (B == null ? void 0 : B.toSelector()) ?? null,
1079
+ range: H.toSelector(),
1080
1080
  pageLastModifiedAt: c ?? ""
1081
1081
  }
1082
1082
  },
1083
1083
  {
1084
- onSuccess: (H) => {
1085
- var N;
1086
- const k = H.id;
1087
- ee(), (N = window.getSelection()) == null || N.removeAllRanges(), b(k), w(), s == null || s(H);
1084
+ onSuccess: (U) => {
1085
+ var S;
1086
+ const P = U.id;
1087
+ ee(), (S = window.getSelection()) == null || S.removeAllRanges(), N(P), w(), s == null || s(U);
1088
1088
  },
1089
1089
  onError: o,
1090
1090
  // Unlock on failure too, so the user can retry from the still-open menu
1091
1091
  onSettled: () => {
1092
- F.current = !1;
1092
+ $.current = !1;
1093
1093
  }
1094
1094
  }
1095
1095
  );
1096
1096
  };
1097
- return /* @__PURE__ */ E(Me, { children: [
1098
- /* @__PURE__ */ a(be, { "aria-live": "polite", "aria-atomic": "true", children: pe }),
1099
- R && X && Ot(
1097
+ return /* @__PURE__ */ b(Fe, { children: [
1098
+ /* @__PURE__ */ a(Ee, { "aria-live": "polite", "aria-atomic": "true", children: ye }),
1099
+ R && X && kt(
1100
1100
  /* @__PURE__ */ a(
1101
1101
  "div",
1102
1102
  {
1103
- id: Tt,
1103
+ id: St,
1104
1104
  role: "toolbar",
1105
1105
  style: {
1106
1106
  position: "fixed",
@@ -1110,14 +1110,14 @@ function cr({
1110
1110
  whiteSpace: "nowrap"
1111
1111
  },
1112
1112
  onBlur: (M) => {
1113
- Le(M.relatedTarget) || ee();
1113
+ Ae(M.relatedTarget) || ee();
1114
1114
  },
1115
1115
  children: /* @__PURE__ */ a(
1116
- Et,
1116
+ Tt,
1117
1117
  {
1118
- ref: ce,
1118
+ ref: de,
1119
1119
  autoFocus: !1,
1120
- onSelectReaction: fe,
1120
+ onSelectReaction: me,
1121
1121
  disabled: h
1122
1122
  }
1123
1123
  )
@@ -1128,18 +1128,18 @@ function cr({
1128
1128
  ] });
1129
1129
  }
1130
1130
  const bo = (t, e) => ({
1131
- backgroundColor: t === L.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground,
1132
- underlineColor: t === L.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline,
1133
- underlineStyle: t === L.IMPORTANT ? "solid" : "dashed"
1134
- }), Pe = ({
1131
+ backgroundColor: t === k.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground,
1132
+ underlineColor: t === k.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline,
1133
+ underlineStyle: t === k.IMPORTANT ? "solid" : "dashed"
1134
+ }), _e = ({
1135
1135
  children: t,
1136
- type: e = L.IMPORTANT,
1136
+ type: e = k.IMPORTANT,
1137
1137
  isCardActive: n = !0,
1138
1138
  theme: o
1139
1139
  }) => {
1140
1140
  const r = bo(e, o), s = {
1141
1141
  position: "relative",
1142
- backgroundColor: n ? r.backgroundColor : Ge(r.backgroundColor, 0.5),
1142
+ backgroundColor: n ? r.backgroundColor : We(r.backgroundColor, 0.5),
1143
1143
  textDecorationLine: "underline",
1144
1144
  textDecorationStyle: r.underlineStyle,
1145
1145
  textDecorationColor: r.underlineColor,
@@ -1149,47 +1149,47 @@ const bo = (t, e) => ({
1149
1149
  };
1150
1150
  return /* @__PURE__ */ a("span", { "data-note-highlight": "true", style: s, children: t });
1151
1151
  };
1152
- function St(t, e = "noHighlight") {
1152
+ function vt(t, e = "noHighlight") {
1153
1153
  return e === "sourceUnavailable" ? t.highlightSourceUnavailable : t.highlightUnavailable;
1154
1154
  }
1155
- const vt = ({ reason: t } = {}) => {
1155
+ const Ct = ({ reason: t } = {}) => {
1156
1156
  const { translations: e } = J();
1157
- return /* @__PURE__ */ a(x, { gap: "xx-small", alignItems: "start", as: "div", children: /* @__PURE__ */ a(x.Item, { padding: "xxx-small none", shouldShrink: !0, children: /* @__PURE__ */ a(Q, { as: "div", fontStyle: "italic", color: "secondary", children: /* @__PURE__ */ a(Ce, { maxLines: 3, children: St(e, t) }) }) }) });
1158
- }, No = {
1157
+ return /* @__PURE__ */ a(v, { gap: "xx-small", alignItems: "start", as: "div", children: /* @__PURE__ */ a(v.Item, { padding: "xxx-small none", shouldShrink: !0, children: /* @__PURE__ */ a(Z, { as: "div", fontStyle: "italic", color: "secondary", children: /* @__PURE__ */ a(xe, { maxLines: 3, children: vt(e, t) }) }) }) });
1158
+ }, Eo = {
1159
1159
  filter: null,
1160
1160
  courseFilter: null,
1161
1161
  currentPage: 1,
1162
1162
  totalPages: void 0
1163
1163
  };
1164
- function ve(t, e) {
1164
+ function Ce(t, e) {
1165
1165
  const n = typeof e == "number" ? Math.min(e, t) : t;
1166
1166
  return Math.max(1, n);
1167
1167
  }
1168
- function Eo(t, e) {
1168
+ function To(t, e) {
1169
1169
  switch (e.type) {
1170
1170
  case "SET_FILTER":
1171
1171
  return { ...t, filter: e.payload, currentPage: 1 };
1172
1172
  case "SET_COURSE_FILTER":
1173
1173
  return { ...t, courseFilter: e.payload, currentPage: 1 };
1174
1174
  case "SET_PAGE":
1175
- return { ...t, currentPage: ve(e.payload, t.totalPages) };
1175
+ return { ...t, currentPage: Ce(e.payload, t.totalPages) };
1176
1176
  case "FOCUS_PAGE":
1177
1177
  return { ...t, currentPage: Math.max(1, e.payload) };
1178
1178
  case "INCREMENT_PAGE":
1179
- return { ...t, currentPage: ve(t.currentPage + 1, t.totalPages) };
1179
+ return { ...t, currentPage: Ce(t.currentPage + 1, t.totalPages) };
1180
1180
  case "DECREMENT_PAGE":
1181
- return { ...t, currentPage: ve(t.currentPage - 1, t.totalPages) };
1181
+ return { ...t, currentPage: Ce(t.currentPage - 1, t.totalPages) };
1182
1182
  case "SET_TOTAL_PAGES":
1183
1183
  return t.totalPages === e.payload ? t : {
1184
1184
  ...t,
1185
1185
  totalPages: e.payload,
1186
- currentPage: ve(t.currentPage, e.payload)
1186
+ currentPage: Ce(t.currentPage, e.payload)
1187
1187
  };
1188
1188
  default:
1189
1189
  return t;
1190
1190
  }
1191
1191
  }
1192
- function dr({
1192
+ function ur({
1193
1193
  api: t,
1194
1194
  courseId: e,
1195
1195
  enableCourseFilter: n = !1,
@@ -1197,88 +1197,88 @@ function dr({
1197
1197
  pageSize: r = 16,
1198
1198
  focusNoteId: i
1199
1199
  }) {
1200
- var ce;
1201
- const [s, l] = rt(Eo, No), { filter: d, courseFilter: u, currentPage: m, totalPages: c } = s;
1200
+ var de;
1201
+ const [s, l] = it(To, Eo), { filter: d, courseFilter: u, currentPage: f, totalPages: c } = s;
1202
1202
  V(() => {
1203
1203
  l({ type: "SET_PAGE", payload: 1 });
1204
1204
  }, [r]);
1205
- const p = n ? u : e, T = (m - 1) * r, b = !!o, w = {
1205
+ const p = n ? u : e, E = (f - 1) * r, N = !!o, w = {
1206
1206
  ...p ? { courseId: p } : {},
1207
1207
  ...d ? { reactions: [d] } : {},
1208
1208
  ...o ? { learningObject: o } : {}
1209
1209
  }, {
1210
1210
  data: y,
1211
1211
  isLoading: O,
1212
- isError: v
1213
- } = mt({
1212
+ isError: C
1213
+ } = gt({
1214
1214
  api: t,
1215
1215
  filter: w,
1216
- offset: T,
1216
+ offset: E,
1217
1217
  pageSize: r,
1218
- enabled: !b
1218
+ enabled: !N
1219
1219
  }), {
1220
1220
  data: h,
1221
1221
  isLoading: I,
1222
- isError: P
1223
- } = gt({
1222
+ isError: D
1223
+ } = ht({
1224
1224
  api: t,
1225
1225
  courseId: p ?? void 0,
1226
1226
  learningObject: o,
1227
- enabled: b
1228
- }), D = he(() => {
1229
- const F = (h == null ? void 0 : h.notes) ?? [];
1230
- return d ? F.filter((K) => K.reaction.includes(d)) : F;
1231
- }, [h, d]), W = _(null);
1227
+ enabled: N
1228
+ }), A = pe(() => {
1229
+ const $ = (h == null ? void 0 : h.notes) ?? [];
1230
+ return d ? $.filter((K) => K.reaction.includes(d)) : $;
1231
+ }, [h, d]), z = F(null);
1232
1232
  V(() => {
1233
1233
  if (!i) {
1234
- W.current = null;
1234
+ z.current = null;
1235
1235
  return;
1236
1236
  }
1237
- if (W.current === i) return;
1238
- const F = D.findIndex((se) => se.id === i);
1239
- if (F === -1) return;
1240
- W.current = i;
1241
- const K = Math.floor(F / r) + 1;
1242
- K !== m && l({ type: "FOCUS_PAGE", payload: K });
1243
- }, [i, D, r, m]);
1244
- const C = b ? D.slice(T, T + r) : (y == null ? void 0 : y.notes) ?? [], R = b ? I : O, S = b ? P : v, B = b ? Math.max(1, Math.ceil(D.length / r)) : ((ce = y == null ? void 0 : y.pageInfo) == null ? void 0 : ce.totalNrOfPages) ?? void 0, re = b ? { totalCount: D.length, totalNrOfPages: B } : y == null ? void 0 : y.pageInfo;
1237
+ if (z.current === i) return;
1238
+ const $ = A.findIndex((le) => le.id === i);
1239
+ if ($ === -1) return;
1240
+ z.current = i;
1241
+ const K = Math.floor($ / r) + 1;
1242
+ K !== f && l({ type: "FOCUS_PAGE", payload: K });
1243
+ }, [i, A, r, f]);
1244
+ const x = N ? A.slice(E, E + r) : (y == null ? void 0 : y.notes) ?? [], R = N ? I : O, T = N ? D : C, j = N ? Math.max(1, Math.ceil(A.length / r)) : ((de = y == null ? void 0 : y.pageInfo) == null ? void 0 : de.totalNrOfPages) ?? void 0, se = N ? { totalCount: A.length, totalNrOfPages: j } : y == null ? void 0 : y.pageInfo;
1245
1245
  V(() => {
1246
- l({ type: "SET_TOTAL_PAGES", payload: B });
1247
- }, [B]);
1248
- const X = q((F) => {
1249
- l({ type: "SET_PAGE", payload: F });
1250
- }, []), ue = q(() => {
1246
+ l({ type: "SET_TOTAL_PAGES", payload: j });
1247
+ }, [j]);
1248
+ const X = q(($) => {
1249
+ l({ type: "SET_PAGE", payload: $ });
1250
+ }, []), fe = q(() => {
1251
1251
  l({
1252
1252
  type: "INCREMENT_PAGE"
1253
1253
  /* IncrementPage */
1254
1254
  });
1255
- }, []), te = q(() => {
1255
+ }, []), ne = q(() => {
1256
1256
  l({
1257
1257
  type: "DECREMENT_PAGE"
1258
1258
  /* DecrementPage */
1259
1259
  });
1260
- }, []), pe = q((F) => {
1261
- l({ type: "SET_FILTER", payload: F });
1262
- }, []), ie = q((F) => {
1263
- l({ type: "SET_COURSE_FILTER", payload: F });
1260
+ }, []), ye = q(($) => {
1261
+ l({ type: "SET_FILTER", payload: $ });
1262
+ }, []), ae = q(($) => {
1263
+ l({ type: "SET_COURSE_FILTER", payload: $ });
1264
1264
  }, []);
1265
1265
  return {
1266
- notes: C,
1267
- pageInfo: re,
1266
+ notes: x,
1267
+ pageInfo: se,
1268
1268
  isLoading: R,
1269
- isError: S,
1269
+ isError: T,
1270
1270
  filter: d,
1271
1271
  courseFilter: u,
1272
- currentPage: m,
1272
+ currentPage: f,
1273
1273
  totalPages: c,
1274
- setFilter: pe,
1275
- setCourseFilter: ie,
1274
+ setFilter: ye,
1275
+ setCourseFilter: ae,
1276
1276
  setPage: X,
1277
- fetchNextPage: ue,
1278
- fetchPreviousPage: te
1277
+ fetchNextPage: fe,
1278
+ fetchPreviousPage: ne
1279
1279
  };
1280
1280
  }
1281
- function Ie(t, e, n) {
1281
+ function Re(t, e, n) {
1282
1282
  try {
1283
1283
  return t.toLocaleDateString(e, n);
1284
1284
  } catch {
@@ -1290,7 +1290,7 @@ function Ie(t, e, n) {
1290
1290
  }
1291
1291
  }
1292
1292
  }
1293
- function Ye(t, e, n) {
1293
+ function Je(t, e, n) {
1294
1294
  try {
1295
1295
  return t.toLocaleTimeString(e, n);
1296
1296
  } catch {
@@ -1302,9 +1302,9 @@ function Ye(t, e, n) {
1302
1302
  }
1303
1303
  }
1304
1304
  }
1305
- const Je = /* @__PURE__ */ new Map(), et = /* @__PURE__ */ new Map();
1306
- function To(t) {
1307
- let e = Je.get(t);
1305
+ const et = /* @__PURE__ */ new Map(), tt = /* @__PURE__ */ new Map();
1306
+ function So(t) {
1307
+ let e = et.get(t);
1308
1308
  if (!e) {
1309
1309
  const n = {
1310
1310
  timeZone: t,
@@ -1319,20 +1319,20 @@ function To(t) {
1319
1319
  `[platform-datetime] invalid timezone "${t}" — falling back to runtime default`
1320
1320
  ), e = new Intl.DateTimeFormat("en-US", { ...n, timeZone: void 0 });
1321
1321
  }
1322
- Je.set(t, e);
1322
+ et.set(t, e);
1323
1323
  }
1324
1324
  return e;
1325
1325
  }
1326
- function So(t, e) {
1327
- const n = To(e), o = (s) => {
1326
+ function vo(t, e) {
1327
+ const n = So(e), o = (s) => {
1328
1328
  const l = Object.fromEntries(n.formatToParts(s).map((d) => [d.type, d.value]));
1329
1329
  return new Date(Number(l.year), Number(l.month) - 1, Number(l.day));
1330
1330
  }, r = o(t), i = o(/* @__PURE__ */ new Date());
1331
1331
  return Math.round((r.getTime() - i.getTime()) / (1e3 * 60 * 60 * 24));
1332
1332
  }
1333
- function vo(t, e, n, o, r) {
1333
+ function Co(t, e, n, o, r) {
1334
1334
  if (e >= -1 && e <= 1) {
1335
- let i = et.get(n);
1335
+ let i = tt.get(n);
1336
1336
  if (!i) {
1337
1337
  try {
1338
1338
  i = new Intl.RelativeTimeFormat(n, { numeric: "auto" });
@@ -1341,34 +1341,34 @@ function vo(t, e, n, o, r) {
1341
1341
  `[platform-datetime] invalid locale "${n}" — falling back to runtime default`
1342
1342
  ), i = new Intl.RelativeTimeFormat(void 0, { numeric: "auto" });
1343
1343
  }
1344
- et.set(n, i);
1344
+ tt.set(n, i);
1345
1345
  }
1346
1346
  const s = i.format(e, "day");
1347
1347
  return s.charAt(0).toUpperCase() + s.slice(1);
1348
1348
  }
1349
- return (r === "past" ? e >= -6 && e <= -2 : e >= 2 && e <= 6) ? Ie(t, n, {
1349
+ return (r === "past" ? e >= -6 && e <= -2 : e >= 2 && e <= 6) ? Re(t, n, {
1350
1350
  weekday: "long",
1351
1351
  timeZone: o
1352
- }) : Ie(t, n, {
1352
+ }) : Re(t, n, {
1353
1353
  month: "short",
1354
1354
  day: "numeric",
1355
1355
  year: "numeric",
1356
1356
  timeZone: o
1357
1357
  });
1358
1358
  }
1359
- function Ct(t, e, n, o) {
1359
+ function xt(t, e, n, o) {
1360
1360
  const r = t instanceof Date ? t : new Date(t);
1361
1361
  if (Number.isNaN(r.getTime())) return "";
1362
- const i = So(r, n), s = (o == null ? void 0 : o.showTime) ?? !1, l = (o == null ? void 0 : o.perspective) ?? "past";
1362
+ const i = vo(r, n), s = (o == null ? void 0 : o.showTime) ?? !1, l = (o == null ? void 0 : o.perspective) ?? "past";
1363
1363
  if (i === 0)
1364
- return Ye(r, e, {
1364
+ return Je(r, e, {
1365
1365
  timeZone: n,
1366
1366
  hour: "numeric",
1367
1367
  minute: "2-digit"
1368
1368
  });
1369
- const d = vo(r, i, e, n, l);
1369
+ const d = Co(r, i, e, n, l);
1370
1370
  if (s) {
1371
- const u = Ye(r, e, {
1371
+ const u = Je(r, e, {
1372
1372
  timeZone: n,
1373
1373
  hour: "numeric",
1374
1374
  minute: "2-digit"
@@ -1377,7 +1377,7 @@ function Ct(t, e, n, o) {
1377
1377
  }
1378
1378
  return d;
1379
1379
  }
1380
- function Co({
1380
+ function xo({
1381
1381
  dateTime: t,
1382
1382
  showTime: e = !1,
1383
1383
  prefix: n,
@@ -1385,25 +1385,25 @@ function Co({
1385
1385
  timezone: r,
1386
1386
  format: i
1387
1387
  }) {
1388
- const { isoString: s, formatted: l } = he(() => {
1388
+ const { isoString: s, formatted: l } = pe(() => {
1389
1389
  if (!t) return { isoString: "", formatted: "" };
1390
1390
  const u = t instanceof Date ? t : new Date(t);
1391
1391
  if (Number.isNaN(u.getTime())) return { isoString: "", formatted: "" };
1392
- const m = u.toISOString(), c = i ? Ie(u, o, { timeZone: r, ...i }) : Ct(u, o, r, { showTime: e });
1393
- return { isoString: m, formatted: c };
1392
+ const f = u.toISOString(), c = i ? Re(u, o, { timeZone: r, ...i }) : xt(u, o, r, { showTime: e });
1393
+ return { isoString: f, formatted: c };
1394
1394
  }, [t, o, r, i, e]);
1395
1395
  if (!l) return null;
1396
1396
  const d = n ? `${n} ${l}` : l;
1397
1397
  return /* @__PURE__ */ a("time", { dateTime: s, title: l, children: d });
1398
1398
  }
1399
- const xo = 1e3, Io = ["=", "+", "-", "@", " ", "\r"], tt = (t) => {
1399
+ const Io = 1e3, wo = ["=", "+", "-", "@", " ", "\r"], nt = (t) => {
1400
1400
  if (!t) return "";
1401
1401
  let e = t;
1402
- return Io.includes(e[0]) && (e = `'${e}`), e.includes(",") || e.includes('"') || e.includes(`
1402
+ return wo.includes(e[0]) && (e = `'${e}`), e.includes(",") || e.includes('"') || e.includes(`
1403
1403
  `) || e.includes("\r") ? `"${e.replace(/"/g, '""')}"` : e;
1404
- }, wo = (t, e, n) => {
1404
+ }, Ro = (t, e, n) => {
1405
1405
  const o = new Date(t);
1406
- return Number.isNaN(o.getTime()) ? t : Ie(o, e, {
1406
+ return Number.isNaN(o.getTime()) ? t : Re(o, e, {
1407
1407
  year: "numeric",
1408
1408
  month: "numeric",
1409
1409
  day: "numeric",
@@ -1412,7 +1412,7 @@ const xo = 1e3, Io = ["=", "+", "-", "@", " ", "\r"], tt = (t) => {
1412
1412
  second: "2-digit",
1413
1413
  timeZone: n
1414
1414
  });
1415
- }, Ro = (t, e, n, o) => {
1415
+ }, Oo = (t, e, n, o) => {
1416
1416
  const r = [
1417
1417
  e.exportColumnPageTitle,
1418
1418
  e.exportColumnLabel,
@@ -1425,53 +1425,53 @@ const xo = 1e3, Io = ["=", "+", "-", "@", " ", "\r"], tt = (t) => {
1425
1425
  l.label,
1426
1426
  l.highlightedText,
1427
1427
  l.noteText,
1428
- wo(l.updatedAt, n, o)
1428
+ Ro(l.updatedAt, n, o)
1429
1429
  ])
1430
1430
  );
1431
- return [r.map(tt).join(","), ...i.map((s) => s.map(tt).join(","))].join(
1431
+ return [r.map(nt).join(","), ...i.map((s) => s.map(nt).join(","))].join(
1432
1432
  `
1433
1433
  `
1434
1434
  );
1435
- }, Oo = (t) => t.replace(/[\\/:*?"<>|()]/g, "").trim(), ko = () => {
1435
+ }, ko = (t) => t.replace(/[\\/:*?"<>|()]/g, "").trim(), Lo = () => {
1436
1436
  const t = /* @__PURE__ */ new Date(), e = (n) => String(n).padStart(2, "0");
1437
1437
  return `${t.getFullYear()}-${e(t.getMonth() + 1)}-${e(t.getDate())}_${e(t.getHours())}-${e(t.getMinutes())}-${e(t.getSeconds())}`;
1438
1438
  };
1439
- function ur({ locale: t, timezone: e } = {}) {
1439
+ function fr({ locale: t, timezone: e } = {}) {
1440
1440
  const { translations: n } = J();
1441
1441
  return { exportNotesAsCSV: (r, i) => {
1442
- const s = Ro(
1442
+ const s = Oo(
1443
1443
  r,
1444
1444
  n,
1445
1445
  t ?? Intl.DateTimeFormat().resolvedOptions().locale,
1446
1446
  e
1447
- ), l = new Blob([s], { type: "text/csv;charset=utf-8;" }), d = URL.createObjectURL(l), u = document.createElement("a"), m = Oo(i), c = `${n.notebook} ${m ? `${m} ` : ""}${ko()}.csv`;
1448
- u.setAttribute("href", d), u.setAttribute("download", c), document.body.appendChild(u), u.click(), document.body.removeChild(u), setTimeout(() => URL.revokeObjectURL(d), xo);
1447
+ ), l = new Blob([s], { type: "text/csv;charset=utf-8;" }), d = URL.createObjectURL(l), u = document.createElement("a"), f = ko(i), c = `${n.notebook} ${f ? `${f} ` : ""}${Lo()}.csv`;
1448
+ u.setAttribute("href", d), u.setAttribute("download", c), document.body.appendChild(u), u.click(), document.body.removeChild(u), setTimeout(() => URL.revokeObjectURL(d), Io);
1449
1449
  } };
1450
1450
  }
1451
- const Ae = "all";
1452
- function fr({ filter: t, setFilter: e }) {
1453
- const { translations: n } = J(), o = he(
1451
+ const Pe = "all";
1452
+ function mr({ filter: t, setFilter: e }) {
1453
+ const { translations: n } = J(), o = pe(
1454
1454
  () => [
1455
- { label: n.allNotes, value: Ae },
1456
- { label: n.important, value: L.IMPORTANT },
1457
- { label: n.unclear, value: L.CONFUSING }
1455
+ { label: n.allNotes, value: Pe },
1456
+ { label: n.important, value: k.IMPORTANT },
1457
+ { label: n.unclear, value: k.CONFUSING }
1458
1458
  ],
1459
1459
  [n]
1460
1460
  ), r = q(
1461
1461
  (s, { value: l }) => {
1462
- e(!l || l === Ae ? null : l);
1462
+ e(!l || l === Pe ? null : l);
1463
1463
  },
1464
1464
  [e]
1465
1465
  );
1466
1466
  return {
1467
- filterElement: he(
1467
+ filterElement: pe(
1468
1468
  () => /* @__PURE__ */ a(
1469
- Ke,
1469
+ qe,
1470
1470
  {
1471
1471
  renderLabel: n.filter,
1472
- value: t ?? Ae,
1472
+ value: t ?? Pe,
1473
1473
  onChange: r,
1474
- children: o.map((s) => /* @__PURE__ */ a(Ke.Option, { id: s.value, value: s.value, children: s.label }, s.value))
1474
+ children: o.map((s) => /* @__PURE__ */ a(qe.Option, { id: s.value, value: s.value, children: s.label }, s.value))
1475
1475
  }
1476
1476
  ),
1477
1477
  [t, o, r, n.filter]
@@ -1480,49 +1480,49 @@ function fr({ filter: t, setFilter: e }) {
1480
1480
  handleReactionFilterChange: r
1481
1481
  };
1482
1482
  }
1483
- const Lo = ({ hasActiveFilter: t = !1 }) => {
1483
+ const Do = ({ hasActiveFilter: t = !1 }) => {
1484
1484
  const { translations: e } = J(), n = t ? e.nothingHereYet : e.emptyStateHeading, o = t ? e.adjustFiltersOrCreate : e.emptyStateDescription;
1485
- return /* @__PURE__ */ a(Y, { as: "div", textAlign: "center", children: /* @__PURE__ */ E(x, { direction: "column", alignItems: "center", gap: "small", children: [
1486
- !t && /* @__PURE__ */ a(Pt, { size: "medium" }),
1487
- /* @__PURE__ */ a(we, { level: "h3", children: n }),
1488
- /* @__PURE__ */ a(Q, { color: "secondary", children: o }),
1489
- !t && /* @__PURE__ */ a(Q, { color: "secondary", children: e.emptyStatePrecision })
1485
+ return /* @__PURE__ */ a(Y, { as: "div", textAlign: "center", children: /* @__PURE__ */ b(v, { direction: "column", alignItems: "center", gap: "small", children: [
1486
+ !t && /* @__PURE__ */ a(Mt, { size: "medium" }),
1487
+ /* @__PURE__ */ a(Oe, { level: "h3", children: n }),
1488
+ /* @__PURE__ */ a(Z, { color: "secondary", children: o }),
1489
+ !t && /* @__PURE__ */ a(Z, { color: "secondary", children: e.emptyStatePrecision })
1490
1490
  ] }) });
1491
- }, Ao = "#2871AF", Do = (t) => ({
1492
- [L.IMPORTANT]: {
1491
+ }, Ao = "#2871AF", Po = (t) => ({
1492
+ [k.IMPORTANT]: {
1493
1493
  color: "success",
1494
1494
  themeOverride: {
1495
1495
  successTextColor: t,
1496
1496
  successBorderColor: t
1497
1497
  },
1498
1498
  translationKey: "important",
1499
- icon: /* @__PURE__ */ a($e, { size: "x-small" })
1499
+ icon: /* @__PURE__ */ a(Be, { size: "x-small" })
1500
1500
  },
1501
- [L.CONFUSING]: {
1501
+ [k.CONFUSING]: {
1502
1502
  color: "error",
1503
1503
  themeOverride: void 0,
1504
1504
  translationKey: "unclear",
1505
- icon: /* @__PURE__ */ a(Ue, { size: "x-small" })
1505
+ icon: /* @__PURE__ */ a(He, { size: "x-small" })
1506
1506
  }
1507
- }), xt = ({
1507
+ }), It = ({
1508
1508
  type: t,
1509
1509
  onTypeChange: e,
1510
1510
  renderAsMenuTrigger: n = !1,
1511
1511
  theme: o,
1512
1512
  unavailable: r
1513
1513
  }) => {
1514
- const { translations: i } = J(), l = Do((o == null ? void 0 : o.importantPill) ?? Ao)[t], d = {
1514
+ const { translations: i } = J(), l = Po((o == null ? void 0 : o.importantPill) ?? Ao)[t], d = {
1515
1515
  color: "warning",
1516
1516
  themeOverride: void 0,
1517
1517
  translationKey: "sourceChanged",
1518
- icon: /* @__PURE__ */ a(Mt, { size: "x-small" })
1519
- }, u = i[l.translationKey], [m, c] = z(!1), p = _(null), T = _(null), b = _(null), w = q(
1518
+ icon: /* @__PURE__ */ a(_t, { size: "x-small" })
1519
+ }, u = i[l.translationKey], [f, c] = G(!1), p = F(null), E = F(null), N = F(null), w = q(
1520
1520
  (O) => {
1521
1521
  e == null || e(O), c(!1);
1522
1522
  },
1523
1523
  [e]
1524
1524
  ), y = r ? /* @__PURE__ */ a(
1525
- ke,
1525
+ De,
1526
1526
  {
1527
1527
  color: d.color,
1528
1528
  themeOverride: d.themeOverride,
@@ -1531,55 +1531,55 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1531
1531
  }
1532
1532
  ) : null;
1533
1533
  return V(() => {
1534
- if (!m) return;
1534
+ if (!f) return;
1535
1535
  const O = (h) => {
1536
1536
  h.key === "Escape" && h.stopPropagation();
1537
- }, v = (h) => {
1537
+ }, C = (h) => {
1538
1538
  var I;
1539
- h.key === "Escape" && (h.stopPropagation(), c(!1), (I = b.current) == null || I.focus());
1539
+ h.key === "Escape" && (h.stopPropagation(), c(!1), (I = N.current) == null || I.focus());
1540
1540
  };
1541
- return document.addEventListener("keydown", O, !0), document.addEventListener("keyup", v, !0), () => {
1542
- document.removeEventListener("keydown", O, !0), document.removeEventListener("keyup", v, !0);
1541
+ return document.addEventListener("keydown", O, !0), document.addEventListener("keyup", C, !0), () => {
1542
+ document.removeEventListener("keydown", O, !0), document.removeEventListener("keyup", C, !0);
1543
1543
  };
1544
- }, [m]), n && e ? /* @__PURE__ */ E(x, { gap: "x-small", wrap: "wrap", direction: "column", alignItems: "start", children: [
1545
- /* @__PURE__ */ E(
1546
- me,
1544
+ }, [f]), n && e ? /* @__PURE__ */ b(v, { gap: "x-small", wrap: "wrap", direction: "column", alignItems: "start", children: [
1545
+ /* @__PURE__ */ b(
1546
+ ge,
1547
1547
  {
1548
1548
  placement: "bottom start",
1549
- show: m,
1549
+ show: f,
1550
1550
  onToggle: (O) => c(O),
1551
1551
  shouldHideOnSelect: !0,
1552
1552
  shouldFocusTriggerOnClose: !0,
1553
1553
  trigger: /* @__PURE__ */ a(
1554
- ke,
1554
+ De,
1555
1555
  {
1556
1556
  color: l.color,
1557
1557
  themeOverride: l.themeOverride,
1558
1558
  renderIcon: l.icon,
1559
1559
  elementRef: (O) => {
1560
- b.current = O;
1560
+ N.current = O;
1561
1561
  },
1562
1562
  children: u
1563
1563
  }
1564
1564
  ),
1565
1565
  children: [
1566
- /* @__PURE__ */ E(me.Item, { ref: p, onClick: () => w(L.CONFUSING), children: [
1567
- /* @__PURE__ */ a(Ue, { size: "x-small" }),
1566
+ /* @__PURE__ */ b(ge.Item, { ref: p, onClick: () => w(k.CONFUSING), children: [
1567
+ /* @__PURE__ */ a(He, { size: "x-small" }),
1568
1568
  ` ${i.markUnclear}`
1569
1569
  ] }),
1570
- /* @__PURE__ */ E(me.Item, { ref: T, onClick: () => w(L.IMPORTANT), children: [
1571
- /* @__PURE__ */ a($e, { size: "x-small" }),
1570
+ /* @__PURE__ */ b(ge.Item, { ref: E, onClick: () => w(k.IMPORTANT), children: [
1571
+ /* @__PURE__ */ a(Be, { size: "x-small" }),
1572
1572
  ` ${i.markImportant}`
1573
1573
  ] })
1574
1574
  ]
1575
1575
  }
1576
1576
  ),
1577
1577
  y
1578
- ] }) : /* @__PURE__ */ E(x, { gap: "x-small", wrap: "wrap", direction: "column", alignItems: "start", children: [
1579
- /* @__PURE__ */ a(ke, { color: l.color, themeOverride: l.themeOverride, renderIcon: l.icon, children: u }),
1578
+ ] }) : /* @__PURE__ */ b(v, { gap: "x-small", wrap: "wrap", direction: "column", alignItems: "start", children: [
1579
+ /* @__PURE__ */ a(De, { color: l.color, themeOverride: l.themeOverride, renderIcon: l.icon, children: u }),
1580
1580
  y
1581
1581
  ] });
1582
- }, Po = "en-US", Mo = Intl.DateTimeFormat().resolvedOptions().timeZone, _o = ({
1582
+ }, Mo = "en-US", _o = Intl.DateTimeFormat().resolvedOptions().timeZone, Fo = ({
1583
1583
  noteId: t,
1584
1584
  date: e,
1585
1585
  highlight: n,
@@ -1590,52 +1590,61 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1590
1590
  onDelete: l,
1591
1591
  onSaveNote: d,
1592
1592
  onTypeChange: u,
1593
- isActive: m,
1593
+ isActive: f,
1594
1594
  isPanelView: c = !1,
1595
1595
  courseName: p,
1596
- locale: T,
1597
- timezone: b,
1596
+ locale: E,
1597
+ timezone: N,
1598
1598
  highlightTheme: w,
1599
1599
  renderLink: y,
1600
1600
  href: O
1601
1601
  }) => {
1602
- const { translations: v } = J(), [h, I] = z(!1), [P, D] = z(!1), [W, C] = z(r || ""), [R, S] = z(!1), [B, re] = z(!1), [X, ue] = z(!1), [te, pe] = z(!1), ie = _(null), ce = q((g) => {
1603
- ie.current = g;
1604
- }, []), F = _(null), K = _(null), se = _(!1), ee = _(null), ye = _(null), fe = _(!1);
1602
+ const { translations: C } = J(), [h, I] = G(!1), [D, A] = G(!1), [z, x] = G(r || ""), [R, T] = G(!1), [j, se] = G(!1), [X, fe] = G(!1), [ne, ye] = G(!1), ae = F(null), de = q((g) => {
1603
+ ae.current = g;
1604
+ }, []), $ = F(null), K = F(null), le = F(!1), ee = F(null), Ne = F(null), me = F(!1);
1605
1605
  V(() => {
1606
- var g, G;
1607
- m ? ((g = ie.current) == null || g.scrollIntoView({ behavior: "smooth", block: "nearest" }), (G = ie.current) == null || G.focus()) : S(!1);
1608
- }, [m]), V(() => {
1609
- var g, G;
1610
- P ? (se.current = !0, (g = F.current) == null || g.focus()) : se.current && (se.current = !1, (G = K.current) == null || G.focus());
1611
- }, [P]), V(() => {
1612
- if (!R && fe.current) {
1613
- fe.current = !1;
1606
+ var g, W;
1607
+ f ? ((g = ae.current) == null || g.scrollIntoView({ behavior: "smooth", block: "nearest" }), (W = ae.current) == null || W.focus()) : T(!1);
1608
+ }, [f]), V(() => {
1609
+ var g, W;
1610
+ D ? (le.current = !0, (g = $.current) == null || g.focus()) : le.current && (le.current = !1, (W = K.current) == null || W.focus());
1611
+ }, [D]), V(() => {
1612
+ if (!R && me.current) {
1613
+ me.current = !1;
1614
1614
  const g = ee.current;
1615
1615
  g != null && g.isConnected && g.focus();
1616
1616
  }
1617
1617
  }, [R]);
1618
- const M = q((g, G) => {
1619
- fe.current = !G, S(!1);
1618
+ const M = q((g, W) => {
1619
+ me.current = !W, T(!1);
1620
1620
  }, []);
1621
1621
  V(() => {
1622
1622
  if (!R) return;
1623
- const g = (ae) => {
1624
- ae.key === "Escape" && ae.stopPropagation();
1625
- }, G = (ae) => {
1626
- ae.key === "Escape" && (ae.stopPropagation(), M());
1623
+ const g = (be) => {
1624
+ be.key === "Escape" && be.stopPropagation();
1625
+ }, W = (be) => {
1626
+ be.key === "Escape" && (be.stopPropagation(), M());
1627
1627
  };
1628
- return window.addEventListener("keydown", g, !0), window.addEventListener("keyup", G, !0), () => {
1629
- window.removeEventListener("keydown", g, !0), window.removeEventListener("keyup", G, !0);
1628
+ return window.addEventListener("keydown", g, !0), window.addEventListener("keyup", W, !0), () => {
1629
+ window.removeEventListener("keydown", g, !0), window.removeEventListener("keyup", W, !0);
1630
1630
  };
1631
1631
  }, [R, M]);
1632
- const A = T ?? Po, U = b ?? Mo, $ = i === L.IMPORTANT ? v.important : v.unclear, H = (g) => {
1632
+ const L = E ?? Mo, H = N ?? _o, B = i === k.IMPORTANT ? C.important : C.unclear, U = (g) => {
1633
+ g.stopPropagation(), A(!0);
1634
+ }, P = (g) => {
1635
+ var W;
1636
+ if ((W = window.getSelection()) != null && W.toString()) {
1637
+ g.stopPropagation();
1638
+ return;
1639
+ }
1640
+ U(g);
1641
+ }, S = (g) => {
1633
1642
  g.key === "Enter" && (g.preventDefault(), s == null || s());
1634
- }, k = [v.note, $];
1635
- k.push(
1636
- n || St(v, o)
1637
- ), r && k.push(r), e && k.push(Ct(e, A, U)), p && k.push(p);
1638
- const N = k.join(", "), j = /* @__PURE__ */ E(
1643
+ }, _ = [C.note, B];
1644
+ _.push(
1645
+ n || vt(C, o)
1646
+ ), r && _.push(r), e && _.push(xt(e, L, H)), p && _.push(p);
1647
+ const oe = _.join(", "), re = /* @__PURE__ */ b(
1639
1648
  Y,
1640
1649
  {
1641
1650
  as: "div",
@@ -1644,17 +1653,17 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1644
1653
  borderRadius: "medium",
1645
1654
  padding: "small",
1646
1655
  position: "relative",
1647
- role: O ? void 0 : m || P ? "group" : "button",
1648
- "aria-label": O ? void 0 : N,
1649
- "aria-pressed": O || m || P ? void 0 : m,
1650
- tabIndex: O || m ? -1 : 0,
1656
+ role: O ? void 0 : f || D ? "group" : "button",
1657
+ "aria-label": O ? void 0 : oe,
1658
+ "aria-pressed": O || f || D ? void 0 : f,
1659
+ tabIndex: O || f ? -1 : 0,
1651
1660
  "data-testid": `note-card-${t}`,
1652
- elementRef: ce,
1653
- onClick: m ? void 0 : s,
1661
+ elementRef: de,
1662
+ onClick: f ? void 0 : s,
1654
1663
  onMouseEnter: () => I(!0),
1655
1664
  onMouseLeave: () => I(!1),
1656
- onKeyDown: m ? void 0 : H,
1657
- cursor: P ? "default" : "pointer",
1665
+ onKeyDown: f ? void 0 : S,
1666
+ cursor: D ? "default" : "pointer",
1658
1667
  children: [
1659
1668
  /* @__PURE__ */ a(
1660
1669
  "div",
@@ -1662,15 +1671,15 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1662
1671
  "data-testid": `note-card-${t}-content`,
1663
1672
  style: {
1664
1673
  height: "100%",
1665
- opacity: m && R && l ? 0.25 : void 0
1674
+ opacity: f && R && l ? 0.25 : void 0
1666
1675
  },
1667
- children: /* @__PURE__ */ E(x, { direction: "column", gap: "small", height: "100%", children: [
1676
+ children: /* @__PURE__ */ b(v, { direction: "column", gap: "small", height: "100%", children: [
1668
1677
  /* @__PURE__ */ a(
1669
- xt,
1678
+ It,
1670
1679
  {
1671
1680
  type: i,
1672
1681
  onTypeChange: c && u ? (g) => u(t, g) : void 0,
1673
- renderAsMenuTrigger: c && !!u && !!m,
1682
+ renderAsMenuTrigger: c && !!u && !!f,
1674
1683
  theme: w.colors,
1675
1684
  unavailable: !n
1676
1685
  }
@@ -1683,66 +1692,66 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1683
1692
  overflowWrap: "break-word",
1684
1693
  whiteSpace: "pre-wrap"
1685
1694
  },
1686
- children: /* @__PURE__ */ a(Q, { children: m && c ? /* @__PURE__ */ a(
1687
- Pe,
1695
+ children: /* @__PURE__ */ a(Z, { children: f && c ? /* @__PURE__ */ a(
1696
+ _e,
1688
1697
  {
1689
1698
  type: i,
1690
- isCardActive: !!m || h,
1699
+ isCardActive: !!f || h,
1691
1700
  theme: w,
1692
1701
  children: n
1693
1702
  }
1694
- ) : /* @__PURE__ */ E(Me, { children: [
1695
- B && /* @__PURE__ */ a(be, { children: n }),
1696
- /* @__PURE__ */ a("span", { "aria-hidden": B, style: { display: "block" }, children: /* @__PURE__ */ a(Ce, { maxLines: 3, truncate: "word", onUpdate: re, children: /* @__PURE__ */ a(
1697
- Pe,
1703
+ ) : /* @__PURE__ */ b(Fe, { children: [
1704
+ j && /* @__PURE__ */ a(Ee, { children: n }),
1705
+ /* @__PURE__ */ a("span", { "aria-hidden": j, style: { display: "block" }, children: /* @__PURE__ */ a(xe, { maxLines: 3, truncate: "word", onUpdate: se, children: /* @__PURE__ */ a(
1706
+ _e,
1698
1707
  {
1699
1708
  type: i,
1700
- isCardActive: !!m || h,
1709
+ isCardActive: !!f || h,
1701
1710
  theme: w,
1702
1711
  children: n
1703
1712
  }
1704
1713
  ) }) })
1705
1714
  ] }) })
1706
1715
  }
1707
- ) : /* @__PURE__ */ a(vt, { reason: o }),
1708
- /* @__PURE__ */ a(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ E(x, { direction: "column", gap: "small", height: "100%", children: [
1709
- P && c ? /* @__PURE__ */ E(x, { direction: "column", gap: "x-small", margin: "xx-small", children: [
1716
+ ) : /* @__PURE__ */ a(Ct, { reason: o }),
1717
+ /* @__PURE__ */ a(v.Item, { shouldGrow: !0, children: /* @__PURE__ */ b(v, { direction: "column", gap: "small", height: "100%", children: [
1718
+ D && c ? /* @__PURE__ */ b(v, { direction: "column", gap: "x-small", margin: "xx-small", children: [
1710
1719
  /* @__PURE__ */ a(
1711
- it,
1720
+ st,
1712
1721
  {
1713
- label: /* @__PURE__ */ a(be, { children: v.editNote }),
1714
- value: W,
1715
- onChange: (g) => C(g.target.value),
1716
- placeholder: v.addNoteOptional,
1722
+ label: /* @__PURE__ */ a(Ee, { children: C.editNote }),
1723
+ value: z,
1724
+ onChange: (g) => x(g.target.value),
1725
+ placeholder: C.addNoteOptional,
1717
1726
  textareaRef: (g) => {
1718
- F.current = g;
1727
+ $.current = g;
1719
1728
  }
1720
1729
  }
1721
1730
  ),
1722
- /* @__PURE__ */ E(x, { gap: "xx-small", children: [
1723
- /* @__PURE__ */ a(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ a(
1724
- ne,
1731
+ /* @__PURE__ */ b(v, { gap: "xx-small", children: [
1732
+ /* @__PURE__ */ a(v.Item, { shouldGrow: !0, children: /* @__PURE__ */ a(
1733
+ te,
1725
1734
  {
1726
1735
  display: "block",
1727
1736
  size: "small",
1728
1737
  "data-testid": `note-card-${t}-cancel`,
1729
1738
  onClick: () => {
1730
- C(r || ""), D(!1);
1739
+ x(r || ""), A(!1);
1731
1740
  },
1732
- children: v.cancel
1741
+ children: C.cancel
1733
1742
  }
1734
1743
  ) }),
1735
- /* @__PURE__ */ a(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ a(
1736
- ne,
1744
+ /* @__PURE__ */ a(v.Item, { shouldGrow: !0, children: /* @__PURE__ */ a(
1745
+ te,
1737
1746
  {
1738
1747
  display: "block",
1739
1748
  color: "primary",
1740
1749
  size: "small",
1741
1750
  "data-testid": `note-card-${t}-save`,
1742
1751
  onClick: () => {
1743
- d == null || d(t, W.trim()), D(!1);
1752
+ d == null || d(t, z.trim()), A(!1);
1744
1753
  },
1745
- children: v.save
1754
+ children: C.save
1746
1755
  }
1747
1756
  ) })
1748
1757
  ] })
@@ -1752,96 +1761,115 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1752
1761
  style: {
1753
1762
  wordBreak: "break-word",
1754
1763
  overflowWrap: "break-word",
1755
- whiteSpace: "pre-wrap"
1764
+ whiteSpace: "pre-wrap",
1765
+ cursor: f && c ? "pointer" : void 0
1756
1766
  },
1757
- children: m && c ? /* @__PURE__ */ E(Q, { children: [
1767
+ "data-testid": `note-card-${t}-note-area`,
1768
+ onClick: f && c ? P : void 0,
1769
+ children: f && c ? /* @__PURE__ */ b(Z, { children: [
1758
1770
  r,
1759
1771
  " ",
1760
1772
  /* @__PURE__ */ a(
1761
- Ne,
1773
+ Ie,
1762
1774
  {
1763
1775
  size: "small",
1764
1776
  withBackground: !1,
1765
1777
  withBorder: !1,
1766
1778
  margin: "xx-small 0 0 xxx-small",
1767
- screenReaderLabel: v.editNote,
1779
+ screenReaderLabel: C.editNote,
1768
1780
  "data-testid": `note-card-${t}-edit`,
1769
1781
  elementRef: (g) => {
1770
1782
  K.current = g;
1771
1783
  },
1772
- onClick: (g) => {
1773
- g.stopPropagation(), D(!0);
1784
+ onClick: U,
1785
+ children: /* @__PURE__ */ a(Me, {})
1786
+ }
1787
+ )
1788
+ ] }) : /* @__PURE__ */ b(Z, { children: [
1789
+ X && /* @__PURE__ */ a(Ee, { children: r }),
1790
+ /* @__PURE__ */ a("span", { "aria-hidden": X, style: { display: "block" }, children: /* @__PURE__ */ a(xe, { maxLines: 3, truncate: "word", onUpdate: fe, children: r }) })
1791
+ ] })
1792
+ }
1793
+ ) : c && f ? /* @__PURE__ */ a(
1794
+ "div",
1795
+ {
1796
+ style: { cursor: "pointer" },
1797
+ "data-testid": `note-card-${t}-note-area`,
1798
+ onClick: P,
1799
+ children: /* @__PURE__ */ b(Z, { color: "secondary", children: [
1800
+ C.addNotePrompt,
1801
+ " ",
1802
+ /* @__PURE__ */ a(
1803
+ Ie,
1804
+ {
1805
+ size: "small",
1806
+ withBackground: !1,
1807
+ withBorder: !1,
1808
+ margin: "xx-small 0 0 xxx-small",
1809
+ screenReaderLabel: C.editNote,
1810
+ "data-testid": `note-card-${t}-edit`,
1811
+ elementRef: (g) => {
1812
+ K.current = g;
1774
1813
  },
1775
- children: /* @__PURE__ */ a(De, {})
1814
+ onClick: U,
1815
+ children: /* @__PURE__ */ a(Me, {})
1776
1816
  }
1777
1817
  )
1778
- ] }) : /* @__PURE__ */ E(Q, { children: [
1779
- X && /* @__PURE__ */ a(be, { children: r }),
1780
- /* @__PURE__ */ a("span", { "aria-hidden": X, style: { display: "block" }, children: /* @__PURE__ */ a(Ce, { maxLines: 3, truncate: "word", onUpdate: ue, children: r }) })
1781
1818
  ] })
1782
1819
  }
1783
- ) : c && m ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ E(Q, { color: "secondary", children: [
1784
- v.addNotePrompt,
1785
- " ",
1786
- /* @__PURE__ */ a(
1787
- Ne,
1788
- {
1789
- size: "small",
1790
- withBackground: !1,
1791
- withBorder: !1,
1792
- margin: "xx-small 0 0 xxx-small",
1793
- screenReaderLabel: v.editNote,
1794
- "data-testid": `note-card-${t}-edit`,
1795
- elementRef: (g) => {
1796
- K.current = g;
1797
- },
1798
- onClick: (g) => {
1799
- g.stopPropagation(), D(!0);
1800
- },
1801
- children: /* @__PURE__ */ a(De, {})
1802
- }
1803
- )
1804
- ] }) }) : null,
1805
- m && /* @__PURE__ */ E(x, { direction: "column", gap: "xx-small", margin: "auto 0 0 0", children: [
1806
- /* @__PURE__ */ a(Q, { as: "div", size: "x-small", color: "secondary", children: /* @__PURE__ */ a(
1807
- Co,
1820
+ ) : null,
1821
+ f && /* @__PURE__ */ b(v, { direction: "column", gap: "xx-small", margin: "auto 0 0 0", children: [
1822
+ /* @__PURE__ */ a(Z, { as: "div", size: "x-small", color: "secondary", children: /* @__PURE__ */ a(
1823
+ xo,
1808
1824
  {
1809
1825
  dateTime: e,
1810
- locale: A,
1811
- timezone: U,
1812
- prefix: v.lastSaved
1826
+ locale: L,
1827
+ timezone: H,
1828
+ prefix: C.lastSaved
1813
1829
  }
1814
1830
  ) }),
1815
- l && /* @__PURE__ */ a(x, { justifyItems: "end", children: /* @__PURE__ */ a(
1816
- Ne,
1831
+ l && /* @__PURE__ */ a(v.Item, { children: /* @__PURE__ */ a(
1832
+ te,
1817
1833
  {
1834
+ display: "block",
1818
1835
  size: "small",
1819
1836
  withBackground: !1,
1820
- withBorder: !1,
1821
1837
  color: "danger",
1822
- margin: "xx-small",
1823
- screenReaderLabel: v.deleteNote,
1824
1838
  "data-testid": `note-card-${t}-delete`,
1825
1839
  elementRef: (g) => {
1826
1840
  ee.current = g;
1827
1841
  },
1828
1842
  onClick: (g) => {
1829
- g.stopPropagation(), fe.current = !1, S(!0);
1843
+ g.stopPropagation(), me.current = !1, T(!0);
1830
1844
  },
1831
- children: /* @__PURE__ */ a(xe, {})
1845
+ children: /* @__PURE__ */ b(v, { as: "span", alignItems: "center", justifyItems: "center", gap: "xx-small", children: [
1846
+ /* @__PURE__ */ a(
1847
+ Z,
1848
+ {
1849
+ color: "danger",
1850
+ size: "small",
1851
+ weight: "normal",
1852
+ fontStyle: "normal",
1853
+ lineHeight: "default",
1854
+ themeOverride: { lineHeight: "20px" },
1855
+ children: C.deleteNote
1856
+ }
1857
+ ),
1858
+ /* @__PURE__ */ a(we, {})
1859
+ ] })
1832
1860
  }
1833
1861
  ) })
1834
1862
  ] }),
1835
- p && /* @__PURE__ */ E(
1836
- Q,
1863
+ p && /* @__PURE__ */ b(
1864
+ Z,
1837
1865
  {
1838
1866
  as: "div",
1839
1867
  size: "small",
1840
1868
  color: "secondary",
1841
1869
  "data-testid": `note-card-${t}-course`,
1842
1870
  children: [
1843
- te && /* @__PURE__ */ a(be, { children: p }),
1844
- /* @__PURE__ */ a("span", { "aria-hidden": te, style: { display: "block" }, children: /* @__PURE__ */ a(Ce, { maxLines: 1, onUpdate: pe, children: p }) })
1871
+ ne && /* @__PURE__ */ a(Ee, { children: p }),
1872
+ /* @__PURE__ */ a("span", { "aria-hidden": ne, style: { display: "block" }, children: /* @__PURE__ */ a(xe, { maxLines: 1, onUpdate: ye, children: p }) })
1845
1873
  ]
1846
1874
  }
1847
1875
  )
@@ -1849,15 +1877,15 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1849
1877
  ] })
1850
1878
  }
1851
1879
  ),
1852
- m && R && l && /* @__PURE__ */ a(
1853
- Ft,
1880
+ f && R && l && /* @__PURE__ */ a(
1881
+ Ut,
1854
1882
  {
1855
1883
  open: !0,
1856
1884
  as: "div",
1857
- label: v.deleteNoteConfirmation,
1885
+ label: C.deleteNoteConfirmation,
1858
1886
  shouldContainFocus: !0,
1859
1887
  shouldFocusOnOpen: !0,
1860
- defaultFocusElement: () => ye.current,
1888
+ defaultFocusElement: () => Ne.current,
1861
1889
  shouldCloseOnDocumentClick: !0,
1862
1890
  shouldCloseOnEscape: !1,
1863
1891
  shouldReturnFocus: !1,
@@ -1875,8 +1903,8 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1875
1903
  insetInlineStart: "0",
1876
1904
  insetInlineEnd: "0",
1877
1905
  stacking: "above",
1878
- children: /* @__PURE__ */ E(
1879
- x,
1906
+ children: /* @__PURE__ */ b(
1907
+ v,
1880
1908
  {
1881
1909
  direction: "column",
1882
1910
  justifyItems: "center",
@@ -1885,32 +1913,32 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1885
1913
  height: "100%",
1886
1914
  children: [
1887
1915
  /* @__PURE__ */ a(
1888
- ne,
1916
+ te,
1889
1917
  {
1890
1918
  display: "block",
1891
1919
  color: "danger",
1892
1920
  withBackground: !1,
1893
- renderIcon: /* @__PURE__ */ a(xe, {}),
1921
+ renderIcon: /* @__PURE__ */ a(we, {}),
1894
1922
  "data-testid": `note-card-${t}-confirm-delete`,
1895
1923
  onClick: (g) => {
1896
- g.stopPropagation(), l(t), S(!1);
1924
+ g.stopPropagation(), l(t), T(!1);
1897
1925
  },
1898
- children: v.deleteNote
1926
+ children: C.deleteNote
1899
1927
  }
1900
1928
  ),
1901
1929
  /* @__PURE__ */ a(
1902
- ne,
1930
+ te,
1903
1931
  {
1904
1932
  display: "block",
1905
1933
  withBackground: !1,
1906
1934
  "data-testid": `note-card-${t}-cancel-delete`,
1907
1935
  elementRef: (g) => {
1908
- ye.current = g;
1936
+ Ne.current = g;
1909
1937
  },
1910
1938
  onClick: (g) => {
1911
1939
  g.stopPropagation(), M();
1912
1940
  },
1913
- children: v.cancel
1941
+ children: C.cancel
1914
1942
  }
1915
1943
  )
1916
1944
  ]
@@ -1923,11 +1951,11 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1923
1951
  ]
1924
1952
  }
1925
1953
  );
1926
- return O && y ? y({ href: O, children: j, ariaLabel: N }) : j;
1927
- }, It = (t) => {
1954
+ return O && y ? y({ href: O, children: re, ariaLabel: oe }) : re;
1955
+ }, wt = (t) => {
1928
1956
  var e;
1929
1957
  return t.highlightSourceUnavailable ? "sourceUnavailable" : (e = t.highlightData) != null && e.hasNoHighlightAnymore ? "noHighlight" : void 0;
1930
- }, Fo = (t) => It(t) !== void 0, Uo = {
1958
+ }, Uo = (t) => wt(t) !== void 0, $o = {
1931
1959
  display: "grid",
1932
1960
  gap: "1rem",
1933
1961
  boxSizing: "border-box",
@@ -1935,7 +1963,7 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1935
1963
  margin: 0,
1936
1964
  padding: 0,
1937
1965
  listStyle: "none"
1938
- }, mr = ({
1966
+ }, gr = ({
1939
1967
  notes: t,
1940
1968
  isLoading: e,
1941
1969
  isError: n,
@@ -1946,80 +1974,80 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
1946
1974
  onNoteDelete: l,
1947
1975
  onNoteSave: d,
1948
1976
  onNoteTypeChange: u,
1949
- onNotesEmptied: m,
1977
+ onNotesEmptied: f,
1950
1978
  selectedNoteId: c,
1951
1979
  hasActiveFilter: p = !1,
1952
- columnCount: T = 1,
1953
- highlightTheme: b,
1980
+ columnCount: E = 1,
1981
+ highlightTheme: N,
1954
1982
  locale: w,
1955
1983
  courseNames: y,
1956
1984
  renderNoteLink: O,
1957
- noteHref: v
1985
+ noteHref: C
1958
1986
  }) => {
1959
- const { translations: h } = J(), I = _(null), P = _(null), D = q(
1960
- (C) => {
1961
- const R = t.findIndex((B) => B.id === C);
1962
- let S = null;
1963
- t.length > 1 && (S = R > 0 ? t[R - 1].id : t[1].id), P.current = { targetId: S }, l == null || l(C);
1987
+ const { translations: h } = J(), I = F(null), D = F(null), A = q(
1988
+ (x) => {
1989
+ const R = t.findIndex((j) => j.id === x);
1990
+ let T = null;
1991
+ t.length > 1 && (T = R > 0 ? t[R - 1].id : t[1].id), D.current = { targetId: T }, l == null || l(x);
1964
1992
  },
1965
1993
  [t, l]
1966
1994
  );
1967
1995
  if (V(() => {
1968
1996
  var R;
1969
- const C = P.current;
1970
- if (C)
1971
- if (P.current = null, C.targetId === null)
1972
- m == null || m();
1997
+ const x = D.current;
1998
+ if (x)
1999
+ if (D.current = null, x.targetId === null)
2000
+ f == null || f();
1973
2001
  else {
1974
- const S = (R = I.current) == null ? void 0 : R.querySelector(
1975
- `[data-testid="note-card-${C.targetId}"]`
2002
+ const T = (R = I.current) == null ? void 0 : R.querySelector(
2003
+ `[data-testid="note-card-${x.targetId}"]`
1976
2004
  );
1977
- S == null || S.focus();
2005
+ T == null || T.focus();
1978
2006
  }
1979
- }, [t, m]), e)
1980
- return /* @__PURE__ */ a(Y, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-loading", children: /* @__PURE__ */ a($t, { renderTitle: h.loadingNotes }) });
2007
+ }, [t, f]), e)
2008
+ return /* @__PURE__ */ a(Y, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-loading", children: /* @__PURE__ */ a(Ht, { renderTitle: h.loadingNotes }) });
1981
2009
  if (n)
1982
- return /* @__PURE__ */ a(Y, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-error", children: /* @__PURE__ */ a(we, { level: "h4", children: h.failedToLoadNotes }) });
2010
+ return /* @__PURE__ */ a(Y, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-error", children: /* @__PURE__ */ a(Oe, { level: "h4", children: h.failedToLoadNotes }) });
1983
2011
  if (t.length === 0)
1984
- return /* @__PURE__ */ a(Y, { as: "div", padding: "large", "data-testid": "empty-notes", children: /* @__PURE__ */ a(Lo, { hasActiveFilter: p }) });
1985
- const W = typeof o == "number" && typeof r == "number" && r > 1 && i !== void 0;
1986
- return /* @__PURE__ */ E(Me, { children: [
2012
+ return /* @__PURE__ */ a(Y, { as: "div", padding: "large", "data-testid": "empty-notes", children: /* @__PURE__ */ a(Do, { hasActiveFilter: p }) });
2013
+ const z = typeof o == "number" && typeof r == "number" && r > 1 && i !== void 0;
2014
+ return /* @__PURE__ */ b(Fe, { children: [
1987
2015
  /* @__PURE__ */ a(
1988
2016
  "ul",
1989
2017
  {
1990
2018
  ref: I,
1991
- style: { ...Uo, gridTemplateColumns: `repeat(${T}, minmax(0, 1fr))` },
2019
+ style: { ...$o, gridTemplateColumns: `repeat(${E}, minmax(0, 1fr))` },
1992
2020
  role: "list",
1993
2021
  "data-testid": "notes-grid",
1994
- children: t.map((C) => {
2022
+ children: t.map((x) => {
1995
2023
  var R;
1996
2024
  return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
1997
- _o,
2025
+ Fo,
1998
2026
  {
1999
- noteId: C.id,
2000
- date: C.updatedAt,
2001
- type: C.reaction[0] ?? L.IMPORTANT,
2002
- highlight: Fo(C) || (R = C.highlightData) == null ? void 0 : R.selectedText,
2003
- highlightUnavailableReason: It(C),
2004
- note: C.userText,
2005
- isActive: c === C.id,
2027
+ noteId: x.id,
2028
+ date: x.updatedAt,
2029
+ type: x.reaction[0] ?? k.IMPORTANT,
2030
+ highlight: Uo(x) || (R = x.highlightData) == null ? void 0 : R.selectedText,
2031
+ highlightUnavailableReason: wt(x),
2032
+ note: x.userText,
2033
+ isActive: c === x.id,
2006
2034
  isPanelView: !!c,
2007
- onClick: s ? () => s(C.id) : void 0,
2008
- onDelete: l ? D : void 0,
2009
- onSaveNote: d ? (S, B) => d(S, B) : void 0,
2010
- onTypeChange: u ? (S, B) => u(S, B) : void 0,
2011
- highlightTheme: b,
2035
+ onClick: s ? () => s(x.id) : void 0,
2036
+ onDelete: l ? A : void 0,
2037
+ onSaveNote: d ? (T, j) => d(T, j) : void 0,
2038
+ onTypeChange: u ? (T, j) => u(T, j) : void 0,
2039
+ highlightTheme: N,
2012
2040
  locale: w,
2013
- courseName: y == null ? void 0 : y.get(C.courseId),
2041
+ courseName: y == null ? void 0 : y.get(x.courseId),
2014
2042
  renderLink: O,
2015
- href: v ? v(C.id, C) : void 0
2043
+ href: C ? C(x.id, x) : void 0
2016
2044
  }
2017
- ) }, C.id);
2045
+ ) }, x.id);
2018
2046
  })
2019
2047
  }
2020
2048
  ),
2021
- W && /* @__PURE__ */ a(x, { justifyItems: "center", padding: "small", "data-testid": "notes-pagination", children: /* @__PURE__ */ a(x.Item, { children: /* @__PURE__ */ a(
2022
- Ut,
2049
+ z && /* @__PURE__ */ a(v, { justifyItems: "center", padding: "small", "data-testid": "notes-pagination", children: /* @__PURE__ */ a(v.Item, { children: /* @__PURE__ */ a(
2050
+ $t,
2023
2051
  {
2024
2052
  as: "nav",
2025
2053
  variant: "input",
@@ -2031,7 +2059,7 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
2031
2059
  }
2032
2060
  ) }) })
2033
2061
  ] });
2034
- }, gr = ({
2062
+ }, hr = ({
2035
2063
  noteText: t,
2036
2064
  reaction: e,
2037
2065
  highlightText: n,
@@ -2042,11 +2070,11 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
2042
2070
  onBack: l,
2043
2071
  editing: d = !1
2044
2072
  }) => {
2045
- const { translations: u } = J(), [m, c] = z(d), [p, T] = z(t || ""), [b, w] = z(!1);
2046
- return /* @__PURE__ */ E(x, { direction: "column", gap: "small", "data-testid": "single-note", children: [
2047
- n != null ? /* @__PURE__ */ a(Y, { as: "div", children: /* @__PURE__ */ a(Q, { children: /* @__PURE__ */ a(Pe, { type: e, isCardActive: !0, theme: o, children: n }) }) }) : /* @__PURE__ */ a(vt, {}),
2073
+ const { translations: u } = J(), [f, c] = G(d), [p, E] = G(t || ""), [N, w] = G(!1);
2074
+ return /* @__PURE__ */ b(v, { direction: "column", gap: "small", "data-testid": "single-note", children: [
2075
+ n != null ? /* @__PURE__ */ a(Y, { as: "div", children: /* @__PURE__ */ a(Z, { children: /* @__PURE__ */ a(_e, { type: e, isCardActive: !0, theme: o, children: n }) }) }) : /* @__PURE__ */ a(Ct, {}),
2048
2076
  /* @__PURE__ */ a(
2049
- xt,
2077
+ It,
2050
2078
  {
2051
2079
  type: e,
2052
2080
  onTypeChange: s,
@@ -2055,31 +2083,31 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
2055
2083
  unavailable: n == null
2056
2084
  }
2057
2085
  ),
2058
- m ? /* @__PURE__ */ E(x, { direction: "column", gap: "x-small", children: [
2086
+ f ? /* @__PURE__ */ b(v, { direction: "column", gap: "x-small", children: [
2059
2087
  /* @__PURE__ */ a(
2060
- it,
2088
+ st,
2061
2089
  {
2062
2090
  label: u.addNoteOptional,
2063
2091
  value: p,
2064
- onChange: (y) => T(y.target.value),
2092
+ onChange: (y) => E(y.target.value),
2065
2093
  resize: "vertical"
2066
2094
  }
2067
2095
  ),
2068
- /* @__PURE__ */ E(x, { gap: "xx-small", children: [
2069
- /* @__PURE__ */ a(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ a(
2070
- ne,
2096
+ /* @__PURE__ */ b(v, { gap: "xx-small", children: [
2097
+ /* @__PURE__ */ a(v.Item, { shouldGrow: !0, children: /* @__PURE__ */ a(
2098
+ te,
2071
2099
  {
2072
2100
  display: "block",
2073
2101
  size: "small",
2074
2102
  "data-testid": "single-note-cancel",
2075
2103
  onClick: () => {
2076
- T(t || ""), c(!1);
2104
+ E(t || ""), c(!1);
2077
2105
  },
2078
2106
  children: u.cancel
2079
2107
  }
2080
2108
  ) }),
2081
- /* @__PURE__ */ a(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ a(
2082
- ne,
2109
+ /* @__PURE__ */ a(v.Item, { shouldGrow: !0, children: /* @__PURE__ */ a(
2110
+ te,
2083
2111
  {
2084
2112
  display: "block",
2085
2113
  color: "primary",
@@ -2092,25 +2120,25 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
2092
2120
  }
2093
2121
  ) })
2094
2122
  ] })
2095
- ] }) : /* @__PURE__ */ E(x, { direction: "column", gap: "small", children: [
2096
- t && /* @__PURE__ */ E(Y, { as: "div", children: [
2097
- /* @__PURE__ */ a(we, { level: "h4", margin: "0 0 xx-small 0", children: u.note }),
2098
- /* @__PURE__ */ a(Q, { children: t })
2123
+ ] }) : /* @__PURE__ */ b(v, { direction: "column", gap: "small", children: [
2124
+ t && /* @__PURE__ */ b(Y, { as: "div", children: [
2125
+ /* @__PURE__ */ a(Oe, { level: "h4", margin: "0 0 xx-small 0", children: u.note }),
2126
+ /* @__PURE__ */ a(Z, { children: t })
2099
2127
  ] }),
2100
- /* @__PURE__ */ E(x, { justifyItems: "space-between", children: [
2128
+ /* @__PURE__ */ b(v, { justifyItems: "space-between", children: [
2101
2129
  /* @__PURE__ */ a(
2102
- ne,
2130
+ te,
2103
2131
  {
2104
2132
  size: "small",
2105
- renderIcon: /* @__PURE__ */ a(_t, {}),
2133
+ renderIcon: /* @__PURE__ */ a(Ft, {}),
2106
2134
  "data-testid": "single-note-back",
2107
2135
  onClick: () => l == null ? void 0 : l(),
2108
2136
  children: u.back
2109
2137
  }
2110
2138
  ),
2111
- /* @__PURE__ */ E(x, { gap: "xx-small", children: [
2139
+ /* @__PURE__ */ b(v, { gap: "xx-small", children: [
2112
2140
  i && /* @__PURE__ */ a(
2113
- Ne,
2141
+ Ie,
2114
2142
  {
2115
2143
  size: "small",
2116
2144
  withBackground: !1,
@@ -2119,11 +2147,11 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
2119
2147
  screenReaderLabel: u.deleteNote,
2120
2148
  "data-testid": "single-note-delete",
2121
2149
  onClick: () => w(!0),
2122
- children: /* @__PURE__ */ a(xe, {})
2150
+ children: /* @__PURE__ */ a(we, {})
2123
2151
  }
2124
2152
  ),
2125
2153
  /* @__PURE__ */ a(
2126
- Ne,
2154
+ Ie,
2127
2155
  {
2128
2156
  size: "small",
2129
2157
  withBackground: !1,
@@ -2131,19 +2159,19 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
2131
2159
  screenReaderLabel: u.editNote,
2132
2160
  "data-testid": "single-note-edit",
2133
2161
  onClick: () => c(!0),
2134
- children: /* @__PURE__ */ a(De, {})
2162
+ children: /* @__PURE__ */ a(Me, {})
2135
2163
  }
2136
2164
  )
2137
2165
  ] })
2138
2166
  ] }),
2139
- b && i && /* @__PURE__ */ a(Y, { as: "div", background: "primary", padding: "medium", borderRadius: "large", children: /* @__PURE__ */ E(x, { direction: "column", justifyItems: "center", alignItems: "center", gap: "x-small", children: [
2167
+ N && i && /* @__PURE__ */ a(Y, { as: "div", background: "primary", padding: "medium", borderRadius: "large", children: /* @__PURE__ */ b(v, { direction: "column", justifyItems: "center", alignItems: "center", gap: "x-small", children: [
2140
2168
  /* @__PURE__ */ a(
2141
- ne,
2169
+ te,
2142
2170
  {
2143
2171
  display: "block",
2144
2172
  color: "danger",
2145
2173
  size: "small",
2146
- renderIcon: /* @__PURE__ */ a(xe, {}),
2174
+ renderIcon: /* @__PURE__ */ a(we, {}),
2147
2175
  "data-testid": "single-note-confirm-delete",
2148
2176
  onClick: () => {
2149
2177
  i(), w(!1);
@@ -2152,7 +2180,7 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
2152
2180
  }
2153
2181
  ),
2154
2182
  /* @__PURE__ */ a(
2155
- ne,
2183
+ te,
2156
2184
  {
2157
2185
  display: "block",
2158
2186
  size: "small",
@@ -2166,28 +2194,28 @@ const Lo = ({ hasActiveFilter: t = !1 }) => {
2166
2194
  ] });
2167
2195
  };
2168
2196
  export {
2169
- cr as ContentWithNoteWrapper,
2170
- Pe as Highlight,
2171
- vt as HighlightError,
2172
- _o as NoteCard,
2173
- xt as NoteChip,
2174
- Et as NoteReactionMenu,
2175
- Lo as NotebookEmptyState,
2176
- ar as NotebookProvider,
2177
- ho as NotebookTranslationsProvider,
2178
- lr as NotebookTray,
2179
- mr as NotesListView,
2180
- L as REACTION_TYPE,
2181
- gr as SingleNote,
2182
- Ge as createTransparentColor,
2183
- St as getHighlightUnavailableMessage,
2184
- hn as useCreateNote,
2185
- pn as useDeleteNote,
2186
- mt as useGetNotes,
2197
+ dr as ContentWithNoteWrapper,
2198
+ _e as Highlight,
2199
+ Ct as HighlightError,
2200
+ Fo as NoteCard,
2201
+ It as NoteChip,
2202
+ Tt as NoteReactionMenu,
2203
+ Do as NotebookEmptyState,
2204
+ lr as NotebookProvider,
2205
+ po as NotebookTranslationsProvider,
2206
+ cr as NotebookTray,
2207
+ gr as NotesListView,
2208
+ k as REACTION_TYPE,
2209
+ hr as SingleNote,
2210
+ We as createTransparentColor,
2211
+ vt as getHighlightUnavailableMessage,
2212
+ pn as useCreateNote,
2213
+ yn as useDeleteNote,
2214
+ gt as useGetNotes,
2187
2215
  bt as useNotebook,
2188
2216
  J as useNotebookTranslations,
2189
- dr as useNotesData,
2190
- ur as useNotesExport,
2191
- fr as useReactionFilter,
2217
+ ur as useNotesData,
2218
+ fr as useNotesExport,
2219
+ mr as useReactionFilter,
2192
2220
  bn as useUpdateNote
2193
2221
  };