@instructure/platform-notebook 1.9.0 → 1.9.2

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,46 +1,46 @@
1
- import { jsx as i, jsxs as x, Fragment as dt } from "react/jsx-runtime";
2
- import { createContext as ze, useMemo as me, useContext as qe, useReducer as Ke, useRef as F, useEffect as W, useState as j, useCallback as q } from "react";
3
- import { createPortal as ut } from "react-dom";
1
+ import { jsx as s, jsxs as v, Fragment as qe } from "react/jsx-runtime";
2
+ import { createContext as Ke, useMemo as me, useContext as Xe, useReducer as Qe, useRef as B, useEffect as W, useState as U, useCallback as K } from "react";
3
+ import { createPortal as mt } from "react-dom";
4
4
  import { z as f } from "zod";
5
- import ft from "diff-match-patch";
6
- import { useQueryClient as xe, useMutation as Re, useQuery as mt } from "@tanstack/react-query";
7
- import { CloseButton as gt, Button as te, IconButton as ue } from "@instructure/ui-buttons";
8
- import { Flex as R } from "@instructure/ui-flex";
5
+ import gt from "diff-match-patch";
6
+ import { useQueryClient as Re, useMutation as ke, useQuery as ht } from "@tanstack/react-query";
7
+ import { CloseButton as pt, Button as ne, IconButton as ue } from "@instructure/ui-buttons";
8
+ import { Flex as x } from "@instructure/ui-flex";
9
9
  import { Heading as Ne } from "@instructure/ui-heading";
10
- import { Tray as ht } from "@instructure/ui-tray";
11
- import { View as X } from "@instructure/ui-view";
12
- import { IconQuestionLine as ke, IconPinLine as we, IconWarningLine as pt, IconNoteLine as yt, IconEditLine as ve, IconTrashLine as ye, IconArrowStartLine as Nt } from "@instructure/ui-icons";
10
+ import { Tray as yt } from "@instructure/ui-tray";
11
+ import { View as Q } from "@instructure/ui-view";
12
+ import { IconQuestionLine as we, IconPinLine as Oe, IconWarningLine as Nt, IconNoteLine as bt, IconEditLine as Ie, IconTrashLine as ye, IconArrowStartLine as Et } from "@instructure/ui-icons";
13
13
  import { Menu as ce } from "@instructure/ui-menu";
14
- import { TruncateText as Ie } from "@instructure/ui-truncate-text";
15
- import { SimpleSelect as Me } from "@instructure/ui-simple-select";
16
- import { Text as ee } from "@instructure/ui-text";
17
- import { ScreenReaderContent as bt } from "@instructure/ui-a11y-content";
18
- import { Dialog as Et } from "@instructure/ui-dialog";
19
- import { TextArea as Xe } from "@instructure/ui-text-area";
20
- import { Pill as Be } from "@instructure/ui-pill";
14
+ import { TruncateText as Ce } from "@instructure/ui-truncate-text";
15
+ import { SimpleSelect as Be } from "@instructure/ui-simple-select";
16
+ import { Text as te } from "@instructure/ui-text";
17
+ import { ScreenReaderContent as Te } from "@instructure/ui-a11y-content";
18
+ import { Dialog as Tt } from "@instructure/ui-dialog";
19
+ import { TextArea as Ye } from "@instructure/ui-text-area";
20
+ import { Pill as $e } from "@instructure/ui-pill";
21
21
  import { Pagination as St } from "@instructure/ui-pagination";
22
- import { Spinner as Tt } from "@instructure/ui-spinner";
23
- const vt = f.object({
22
+ import { Spinner as vt } from "@instructure/ui-spinner";
23
+ const It = f.object({
24
24
  startContainer: f.string(),
25
25
  endContainer: f.string(),
26
26
  startOffset: f.number(),
27
27
  endOffset: f.number()
28
- }), It = f.object({
28
+ }), Ct = f.object({
29
29
  start: f.number(),
30
30
  end: f.number()
31
- }), Oe = f.object({
31
+ }), Le = f.object({
32
32
  selectedText: f.string(),
33
33
  hasNoHighlightAnymore: f.boolean().optional(),
34
- textPosition: It.nullable(),
35
- range: vt.nullable(),
34
+ textPosition: Ct.nullable(),
35
+ range: It.nullable(),
36
36
  pageLastModifiedAt: f.string()
37
37
  });
38
- var L = /* @__PURE__ */ ((t) => (t.IMPORTANT = "Important", t.CONFUSING = "Confusing", t))(L || {});
39
- const Le = f.enum([
38
+ var O = /* @__PURE__ */ ((t) => (t.IMPORTANT = "Important", t.CONFUSING = "Confusing", t))(O || {});
39
+ const Ae = f.enum([
40
40
  "Important",
41
41
  "Confusing"
42
42
  /* CONFUSING */
43
- ]), Ct = f.object({
43
+ ]), xt = f.object({
44
44
  totalCount: f.number().nullish(),
45
45
  totalNrOfPages: f.number().nullish()
46
46
  }), be = f.object({
@@ -51,32 +51,32 @@ const Le = f.enum([
51
51
  objectId: f.string(),
52
52
  objectType: f.string(),
53
53
  userText: f.string().optional(),
54
- reaction: f.array(Le),
55
- highlightData: Oe,
54
+ reaction: f.array(Ae),
55
+ highlightData: Le,
56
56
  createdAt: f.string(),
57
57
  updatedAt: f.string()
58
- }), xt = f.object({
58
+ }), Rt = f.object({
59
59
  cursor: f.string(),
60
60
  node: be
61
61
  });
62
62
  f.object({
63
63
  notes: f.object({
64
- edges: f.array(xt),
64
+ edges: f.array(Rt),
65
65
  nodes: f.array(be),
66
- pageInfo: Ct
66
+ pageInfo: xt
67
67
  })
68
68
  });
69
- const Rt = f.object({
69
+ const kt = f.object({
70
70
  type: f.string(),
71
71
  id: f.string()
72
- }), kt = f.object({
72
+ }), wt = f.object({
73
73
  courseId: f.string().optional(),
74
- learningObject: Rt.optional(),
74
+ learningObject: kt.optional(),
75
75
  reactions: f.array(f.string()).optional()
76
76
  }).optional();
77
77
  f.object({
78
78
  courseId: f.string().optional(),
79
- filter: kt,
79
+ filter: wt,
80
80
  offset: f.number().optional(),
81
81
  pageSize: f.number().optional()
82
82
  });
@@ -85,8 +85,8 @@ f.object({
85
85
  objectId: f.string(),
86
86
  objectType: f.string(),
87
87
  userText: f.string().optional(),
88
- reaction: f.array(Le),
89
- highlightData: Oe
88
+ reaction: f.array(Ae),
89
+ highlightData: Le
90
90
  });
91
91
  f.object({
92
92
  createNote: be
@@ -94,8 +94,8 @@ f.object({
94
94
  f.object({
95
95
  id: f.string(),
96
96
  userText: f.string().optional(),
97
- reaction: f.array(Le),
98
- highlightData: Oe
97
+ reaction: f.array(Ae),
98
+ highlightData: Le
99
99
  });
100
100
  f.object({
101
101
  updateNote: be
@@ -103,14 +103,14 @@ f.object({
103
103
  f.object({
104
104
  deleteNote: f.string()
105
105
  });
106
- var Qe = /* @__PURE__ */ ((t) => (t[t.FORWARDS = 1] = "FORWARDS", t[t.BACKWARDS = 2] = "BACKWARDS", t))(Qe || {});
107
- class ne {
106
+ var Ve = /* @__PURE__ */ ((t) => (t[t.FORWARDS = 1] = "FORWARDS", t[t.BACKWARDS = 2] = "BACKWARDS", t))(Ve || {});
107
+ class oe {
108
108
  constructor(e, n) {
109
109
  this.start = e, this.end = n;
110
110
  }
111
111
  toRange() {
112
112
  let e, n;
113
- if (this.start.element === this.end.element && this.start.offset <= this.end.offset ? [e, n] = Ve(this.start.element, this.start.offset, this.end.offset) : (e = this.start.resolve({
113
+ if (this.start.element === this.end.element && this.start.offset <= this.end.offset ? [e, n] = Je(this.start.element, this.start.offset, this.end.offset) : (e = this.start.resolve({
114
114
  direction: 1
115
115
  /* FORWARDS */
116
116
  }), n = this.end.resolve({
@@ -122,31 +122,31 @@ class ne {
122
122
  return o.setStart(e.node, e.offset), o.setEnd(n.node, n.offset), o;
123
123
  }
124
124
  static fromRange(e) {
125
- const n = K.fromPoint(e.startContainer, e.startOffset), o = K.fromPoint(e.endContainer, e.endOffset);
126
- return !n || !o ? null : new ne(n, o);
125
+ const n = X.fromPoint(e.startContainer, e.startOffset), o = X.fromPoint(e.endContainer, e.endOffset);
126
+ return !n || !o ? null : new oe(n, o);
127
127
  }
128
128
  static fromOffsets(e, n, o) {
129
- return new ne(new K(e, n), new K(e, o));
129
+ return new oe(new X(e, n), new X(e, o));
130
130
  }
131
131
  relativeTo(e) {
132
- return new ne(this.start.relativeTo(e), this.end.relativeTo(e));
132
+ return new oe(this.start.relativeTo(e), this.end.relativeTo(e));
133
133
  }
134
134
  }
135
- class K {
135
+ class X {
136
136
  constructor(e, n) {
137
137
  n < 0 && console.error("Offset is invalid"), this.element = e, this.offset = n;
138
138
  }
139
139
  resolve(e = {}) {
140
140
  try {
141
- return Ve(this.element, this.offset)[0];
141
+ return Je(this.element, this.offset)[0];
142
142
  } catch (n) {
143
143
  if (this.offset === 0 && e.direction !== void 0) {
144
144
  const o = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);
145
145
  o.currentNode = this.element;
146
- const r = e.direction === Qe.FORWARDS, s = r ? o.nextNode() : o.previousNode();
147
- if (!s)
146
+ const r = e.direction === Ve.FORWARDS, i = r ? o.nextNode() : o.previousNode();
147
+ if (!i)
148
148
  throw n;
149
- return { node: s, offset: r ? 0 : s.data.length };
149
+ return { node: i, offset: r ? 0 : i.data.length };
150
150
  }
151
151
  throw n;
152
152
  }
@@ -154,9 +154,9 @@ class K {
154
154
  static fromCharOffset(e, n) {
155
155
  switch (e.nodeType) {
156
156
  case Node.TEXT_NODE:
157
- return K.fromPoint(e, n);
157
+ return X.fromPoint(e, n);
158
158
  case Node.ELEMENT_NODE:
159
- return new K(e, n);
159
+ return new X(e, n);
160
160
  default:
161
161
  return console.error("Node is not an element or text node"), null;
162
162
  }
@@ -168,16 +168,16 @@ class K {
168
168
  return console.error("Text node offset is out of range"), null;
169
169
  if (!e.parentElement)
170
170
  return console.error("Text node has no parent"), null;
171
- const o = Ge(e) + n;
172
- return new K(e.parentElement, o);
171
+ const o = Ue(e) + n;
172
+ return new X(e.parentElement, o);
173
173
  }
174
174
  case Node.ELEMENT_NODE: {
175
175
  if (n < 0 || n > e.childNodes.length)
176
176
  return console.error("Child node offset is out of range"), null;
177
177
  let o = 0;
178
178
  for (let r = 0; r < n; r++)
179
- o += Ye(e.childNodes[r]);
180
- return new K(e, o);
179
+ o += Ze(e.childNodes[r]);
180
+ return new X(e, o);
181
181
  }
182
182
  default:
183
183
  return console.error("Point is not in an element or text node"), null;
@@ -188,99 +188,99 @@ class K {
188
188
  throw new Error("Parent is not an ancestor of current element");
189
189
  let n = this.element, o = this.offset;
190
190
  for (; n !== e; )
191
- o += Ge(n), n.parentElement && (n = n.parentElement);
192
- return new K(n, o);
191
+ o += Ue(n), n.parentElement && (n = n.parentElement);
192
+ return new X(n, o);
193
193
  }
194
194
  }
195
- const wt = (t) => {
195
+ const Ot = (t) => {
196
196
  const e = t.nodeName.toLowerCase();
197
197
  return e === "#text" ? "text()" : e;
198
198
  };
199
- function Ot(t) {
199
+ function Lt(t) {
200
200
  let e = 0, n = t;
201
201
  for (; n; )
202
202
  n.nodeName === t.nodeName && (e += 1), n = n.previousSibling;
203
203
  return e;
204
204
  }
205
- const Lt = (t) => {
206
- const e = wt(t), n = Ot(t);
205
+ const At = (t) => {
206
+ const e = Ot(t), n = Lt(t);
207
207
  return `${e}[${n}]`;
208
- }, $e = (t, e) => {
208
+ }, He = (t, e) => {
209
209
  let n = "", o = t;
210
210
  for (; o !== e; ) {
211
211
  if (!o) {
212
212
  console.error("Node is not a descendant of root");
213
213
  return;
214
214
  }
215
- n = `${Lt(o)}/${n}`, o = o.parentNode;
215
+ n = `${At(o)}/${n}`, o = o.parentNode;
216
216
  }
217
217
  return n = `/${n}`, n = n.replace(/\/$/, ""), n;
218
- }, At = (t, e, n) => {
218
+ }, Dt = (t, e, n) => {
219
219
  const o = e.toUpperCase();
220
220
  let r = -1;
221
- for (let s = 0; s < t.children.length; s++) {
222
- const l = t.children[s];
221
+ for (let i = 0; i < t.children.length; i++) {
222
+ const l = t.children[i];
223
223
  if (l.nodeName.toUpperCase() === o && (++r, r === n))
224
224
  return l;
225
225
  }
226
226
  return null;
227
- }, Dt = (t, e) => {
227
+ }, Pt = (t, e) => {
228
228
  if (!(t.match(/^(\/[A-Za-z0-9-]+(\[[0-9]+])?)+$/) !== null))
229
229
  return console.error("Expression is not a simple XPath"), null;
230
230
  const o = t.split("/");
231
231
  let r = e;
232
232
  o.shift();
233
- for (const s of o) {
233
+ for (const i of o) {
234
234
  let l, a;
235
- const m = s.indexOf("[");
235
+ const m = i.indexOf("[");
236
236
  if (m !== -1) {
237
- l = s.slice(0, m);
238
- const p = s.slice(m + 1, s.indexOf("]"));
239
- if (a = Number.parseInt(p, 10) - 1, a < 0)
237
+ l = i.slice(0, m);
238
+ const y = i.slice(m + 1, i.indexOf("]"));
239
+ if (a = Number.parseInt(y, 10) - 1, a < 0)
240
240
  return null;
241
241
  } else
242
- l = s, a = 0;
243
- const c = At(r, l, a);
242
+ l = i, a = 0;
243
+ const c = Dt(r, l, a);
244
244
  if (!c)
245
245
  return null;
246
246
  r = c;
247
247
  }
248
248
  return r;
249
- }, He = (t, e = document.body) => {
249
+ }, Ge = (t, e = document.body) => {
250
250
  try {
251
- return Dt(t, e);
251
+ return Pt(t, e);
252
252
  } catch {
253
253
  return document.evaluate(`.${t}`, e, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
254
254
  }
255
255
  };
256
- class ie {
256
+ class le {
257
257
  constructor(e, n) {
258
258
  this.root = e, this.range = n;
259
259
  }
260
260
  static fromRange(e, n) {
261
- return new ie(e, n);
261
+ return new le(e, n);
262
262
  }
263
263
  static fromSelector(e, n) {
264
264
  if (!(n != null && n.startContainer) || !(n != null && n.endContainer))
265
265
  return console.error("No start or end container in selector"), null;
266
- const o = He(n.startContainer, e);
266
+ const o = Ge(n.startContainer, e);
267
267
  if (!o)
268
268
  return console.error("Failed to resolve startContainer XPath"), null;
269
- const r = He(n.endContainer, e);
269
+ const r = Ge(n.endContainer, e);
270
270
  if (!r)
271
271
  return console.error("Failed to resolve endContainer XPath"), null;
272
- const s = K.fromCharOffset(o, n.startOffset), l = K.fromCharOffset(r, n.endOffset);
273
- if (!s || !l)
272
+ const i = X.fromCharOffset(o, n.startOffset), l = X.fromCharOffset(r, n.endOffset);
273
+ if (!i || !l)
274
274
  return null;
275
- const a = new ne(s, l).toRange();
276
- return a ? new ie(e, a) : null;
275
+ const a = new oe(i, l).toRange();
276
+ return a ? new le(e, a) : null;
277
277
  }
278
278
  toRange() {
279
279
  return this.range;
280
280
  }
281
281
  toSelector() {
282
- var s;
283
- const e = (s = ne.fromRange(this.range)) == null ? void 0 : s.toRange(), n = e && ne.fromRange(e), o = n && $e(n.start.element, this.root), r = n && $e(n.end.element, this.root);
282
+ var i;
283
+ const e = (i = oe.fromRange(this.range)) == null ? void 0 : i.toRange(), n = e && oe.fromRange(e), o = n && He(n.start.element, this.root), r = n && He(n.end.element, this.root);
284
284
  return !o || !r ? null : {
285
285
  startContainer: o,
286
286
  startOffset: n.start.offset,
@@ -289,17 +289,17 @@ class ie {
289
289
  };
290
290
  }
291
291
  }
292
- class oe {
292
+ class ie {
293
293
  constructor(e, n, o) {
294
294
  this.root = e, this.start = n, this.end = o;
295
295
  }
296
296
  static fromRange(e, n) {
297
297
  var r;
298
- const o = (r = ne.fromRange(n)) == null ? void 0 : r.relativeTo(e);
299
- return o ? new oe(e, o.start.offset, o.end.offset) : null;
298
+ const o = (r = oe.fromRange(n)) == null ? void 0 : r.relativeTo(e);
299
+ return o ? new ie(e, o.start.offset, o.end.offset) : null;
300
300
  }
301
301
  static fromSelector(e, n) {
302
- return new oe(e, n.start, n.end);
302
+ return new ie(e, n.start, n.end);
303
303
  }
304
304
  toSelector() {
305
305
  return {
@@ -308,10 +308,10 @@ class oe {
308
308
  };
309
309
  }
310
310
  toRange() {
311
- return ne.fromOffsets(this.root, this.start, this.end).toRange();
311
+ return oe.fromOffsets(this.root, this.start, this.end).toRange();
312
312
  }
313
313
  }
314
- const Ye = (t) => {
314
+ const Ze = (t) => {
315
315
  var e;
316
316
  switch (t.nodeType) {
317
317
  case Node.ELEMENT_NODE:
@@ -320,76 +320,76 @@ const Ye = (t) => {
320
320
  default:
321
321
  return 0;
322
322
  }
323
- }, Ge = (t) => {
323
+ }, Ue = (t) => {
324
324
  let e = t.previousSibling, n = 0;
325
325
  for (; e; )
326
- n += Ye(e), e = e.previousSibling;
326
+ n += Ze(e), e = e.previousSibling;
327
327
  return n;
328
- }, Ve = (t, ...e) => {
328
+ }, Je = (t, ...e) => {
329
329
  let n = e.shift();
330
330
  const o = t.ownerDocument.createNodeIterator(t, NodeFilter.SHOW_TEXT), r = [];
331
- let s = o.nextNode(), l = null, a = 0;
332
- for (; n !== void 0 && s; )
333
- l = s, a + l.data.length > n ? (r.push({ node: l, offset: n - a }), n = e.shift()) : (s = o.nextNode(), a += l.data.length);
331
+ let i = o.nextNode(), l = null, a = 0;
332
+ for (; n !== void 0 && i; )
333
+ l = i, a + l.data.length > n ? (r.push({ node: l, offset: n - a }), n = e.shift()) : (i = o.nextNode(), a += l.data.length);
334
334
  for (; n !== void 0 && l && a === n; )
335
335
  r.push({ node: l, offset: l.data.length }), n = e.shift();
336
336
  return n !== void 0 && console.error("Offset exceeds text length"), r;
337
- }, Pt = (t, e, n, o) => {
337
+ }, _t = (t, e, n, o) => {
338
338
  const r = n - e;
339
- return Math.abs(r - o) <= 5 ? oe.fromSelector(t, {
339
+ return Math.abs(r - o) <= 5 ? ie.fromSelector(t, {
340
340
  start: e,
341
341
  end: n
342
342
  }) : null;
343
- }, _t = (t, e, n, o) => {
344
- const r = new ft();
343
+ }, Ft = (t, e, n, o) => {
344
+ const r = new gt();
345
345
  r.Match_Distance = 5e3;
346
- const s = t.textContent;
347
- if (!s)
346
+ const i = t.textContent;
347
+ if (!i)
348
348
  return null;
349
349
  if (e.length > 32) {
350
350
  const l = e.slice(0, 32), a = e.slice(-32), m = o - n;
351
- let c = r.match_main(s, l, n);
352
- const p = r.match_main(s, a, o), d = p + a.length;
353
- if (c === -1 || p === -1)
351
+ let c = r.match_main(i, l, n);
352
+ const y = r.match_main(i, a, o), d = y + a.length;
353
+ if (c === -1 || y === -1)
354
354
  return null;
355
- const h = d - c, E = Math.abs(h - m);
356
- if ((c > d || E > 5) && (r.Match_Distance = e.length + 100, c = r.match_main(s, l, d), c !== -1 && c < d))
357
- return Pt(t, c, d, m);
358
- if (c < d && E <= 5)
359
- return oe.fromSelector(t, {
355
+ const h = d - c, b = Math.abs(h - m);
356
+ if ((c > d || b > 5) && (r.Match_Distance = e.length + 100, c = r.match_main(i, l, d), c !== -1 && c < d))
357
+ return _t(t, c, d, m);
358
+ if (c < d && b <= 5)
359
+ return ie.fromSelector(t, {
360
360
  start: c,
361
361
  end: d
362
362
  });
363
363
  } else {
364
- const l = r.match_main(s, e, n);
364
+ const l = r.match_main(i, e, n);
365
365
  if (l !== -1)
366
- return oe.fromSelector(t, {
366
+ return ie.fromSelector(t, {
367
367
  start: l,
368
368
  end: l + e.length
369
369
  });
370
370
  }
371
371
  return null;
372
- }, Ft = (t, e) => {
372
+ }, Mt = (t, e) => {
373
373
  if (!e) return null;
374
374
  const { highlightData: n } = t, { textPosition: o, selectedText: r } = n;
375
- return _t(
375
+ return Ft(
376
376
  e,
377
377
  r,
378
378
  (o == null ? void 0 : o.start) ?? 0,
379
379
  (o == null ? void 0 : o.end) ?? 0
380
380
  );
381
- }, Mt = (t, e, n) => {
381
+ }, Bt = (t, e, n) => {
382
382
  const o = [], r = [];
383
- for (const s of e) {
384
- const l = Ft(s, t);
383
+ for (const i of e) {
384
+ const l = Mt(i, t);
385
385
  if (l) {
386
- const a = l.toRange(), m = a && ie.fromRange(t, a), c = (a == null ? void 0 : a.toString().trim()) || s.highlightData.selectedText;
386
+ const a = l.toRange(), m = a && le.fromRange(t, a), c = (a == null ? void 0 : a.toString().trim()) || i.highlightData.selectedText;
387
387
  o.push({
388
- id: s.id,
389
- reaction: s.reaction,
390
- userText: s.userText,
388
+ id: i.id,
389
+ reaction: i.reaction,
390
+ userText: i.userText,
391
391
  highlightData: {
392
- ...s.highlightData,
392
+ ...i.highlightData,
393
393
  selectedText: c,
394
394
  hasNoHighlightAnymore: !1,
395
395
  range: (m == null ? void 0 : m.toSelector()) ?? null,
@@ -398,24 +398,24 @@ const Ye = (t) => {
398
398
  }
399
399
  });
400
400
  } else
401
- s.userText ? o.push({
402
- id: s.id,
403
- reaction: s.reaction,
404
- userText: s.userText,
401
+ i.userText ? o.push({
402
+ id: i.id,
403
+ reaction: i.reaction,
404
+ userText: i.userText,
405
405
  highlightData: {
406
- ...s.highlightData,
406
+ ...i.highlightData,
407
407
  pageLastModifiedAt: n,
408
408
  hasNoHighlightAnymore: !0
409
409
  }
410
- }) : r.push(s.id);
410
+ }) : r.push(i.id);
411
411
  }
412
412
  return { notesForUpdate: o, noteIdsForDelete: r };
413
- }, Ue = (t, e) => {
413
+ }, je = (t, e) => {
414
414
  var l;
415
415
  if (!e) return;
416
416
  const { highlightData: n, id: o } = t, { range: r } = n ?? {};
417
- r && ((l = ie.fromSelector(e, r)) == null ? void 0 : l.toRange()) && Yt({ id: o });
418
- }, Bt = (t) => {
417
+ r && ((l = le.fromSelector(e, r)) == null ? void 0 : l.toRange()) && Yt({ id: o });
418
+ }, $t = (t) => {
419
419
  const n = document.querySelector(
420
420
  `[data-highlight-id="${CSS.escape(t)}"].highlight-content`
421
421
  ) ?? document.getElementById(Ee(t));
@@ -423,49 +423,49 @@ const Ye = (t) => {
423
423
  const o = n.getBoundingClientRect();
424
424
  o.top >= 0 && o.bottom <= (window.innerHeight || document.documentElement.clientHeight) || n.scrollIntoView({ behavior: "smooth", block: "center" });
425
425
  }
426
- }, ge = 90, he = 172, $t = (t) => {
426
+ }, ge = 90, he = 172, Ht = (t) => {
427
427
  const e = t.getClientRects();
428
428
  if (!e.length)
429
429
  return null;
430
- const n = e[0], o = e[e.length - 1], r = 4, s = 16, l = window.innerWidth || document.documentElement.clientWidth, a = window.innerHeight || document.documentElement.clientHeight, m = (y) => {
431
- const S = y + he;
432
- return y >= s && S <= l - s;
433
- }, c = (y) => {
434
- const S = y + ge;
435
- return y >= s && S <= a - s;
430
+ const n = e[0], o = e[e.length - 1], r = 4, i = 16, l = window.innerWidth || document.documentElement.clientWidth, a = window.innerHeight || document.documentElement.clientHeight, m = (p) => {
431
+ const E = p + he;
432
+ return p >= i && E <= l - i;
433
+ }, c = (p) => {
434
+ const E = p + ge;
435
+ return p >= i && E <= a - i;
436
436
  };
437
- let p;
437
+ let y;
438
438
  const d = n.right - he;
439
439
  if (m(d))
440
- p = d;
440
+ y = d;
441
441
  else {
442
- const y = n.left;
443
- if (m(y))
444
- p = y;
442
+ const p = n.left;
443
+ if (m(p))
444
+ y = p;
445
445
  else {
446
446
  const g = (n.left + n.right) / 2 - he / 2;
447
- m(g) ? p = g : d < s ? p = s : p = l - he - s;
447
+ m(g) ? y = g : d < i ? y = i : y = l - he - i;
448
448
  }
449
449
  }
450
450
  let h;
451
- const E = o.bottom + r;
452
- if (c(E))
453
- h = E;
451
+ const b = o.bottom + r;
452
+ if (c(b))
453
+ h = b;
454
454
  else {
455
- const y = n.top - ge - r;
456
- c(y) ? h = y : E + ge > a - s ? h = a - ge - s : h = s;
455
+ const p = n.top - ge - r;
456
+ c(p) ? h = p : b + ge > a - i ? h = a - ge - i : h = i;
457
457
  }
458
- return { top: h, left: p };
459
- }, Ht = (t, e) => {
458
+ return { top: h, left: y };
459
+ }, Gt = (t, e) => {
460
460
  for (const n of e)
461
461
  if (t.start < n.end && t.end > n.start)
462
462
  return !0;
463
463
  return !1;
464
- }, Ae = (t) => `highlight-wrapper-${t}`, Ee = (t) => `${Ae(t)}-start`, Ze = (t) => `${Ae(t)}-end`, fe = (t) => `[data-highlight-id="${CSS.escape(t)}"]`, Gt = "2px", Ut = "3px", jt = "1px", Je = "3px", Wt = "1px", zt = "Notebook note", De = (t, e) => {
464
+ }, De = (t) => `highlight-wrapper-${t}`, Ee = (t) => `${De(t)}-start`, et = (t) => `${De(t)}-end`, fe = (t) => `[data-highlight-id="${CSS.escape(t)}"]`, Ut = "2px", jt = "3px", Wt = "1px", tt = "3px", zt = "1px", nt = "Notebook note", Pe = (t, e) => {
465
465
  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);
466
466
  return `rgba(${n}, ${o}, ${r}, ${e})`;
467
- }, et = (t, e, n, o, r) => {
468
- t.style.backgroundColor = n, e ? (t.dataset.selected = "true", t.style.outline = `${jt} ${r} ${o}`, t.style.outlineOffset = Wt, t.style.borderRadius = Je, t.style.fontWeight = "bold") : (t.removeAttribute("data-selected"), t.style.outline = "", t.style.outlineOffset = "", t.style.borderRadius = "", t.style.fontWeight = "");
467
+ }, ot = (t, e, n, o, r) => {
468
+ t.style.backgroundColor = n, t.style.textDecorationColor = o, t.style.textDecorationStyle = r, e ? (t.dataset.selected = "true", t.style.outline = `${Wt} ${r} ${o}`, t.style.outlineOffset = zt, t.style.borderRadius = tt, t.style.fontWeight = "bold") : (t.removeAttribute("data-selected"), t.style.outline = "", t.style.outlineOffset = "", t.style.borderRadius = "", t.style.fontWeight = "");
469
469
  }, qt = (t, e) => {
470
470
  var n;
471
471
  try {
@@ -475,13 +475,13 @@ const Ye = (t) => {
475
475
  return !1;
476
476
  }
477
477
  }, Kt = (t) => {
478
- var s;
478
+ var i;
479
479
  if (t.collapsed)
480
480
  return [];
481
481
  let e = t.commonAncestorContainer;
482
482
  if (e && e.nodeType !== Node.ELEMENT_NODE && (e = e.parentElement), !e)
483
483
  return [];
484
- const n = [], o = (s = e == null ? void 0 : e.ownerDocument) == null ? void 0 : s.createNodeIterator(e, NodeFilter.SHOW_TEXT);
484
+ const n = [], o = (i = e == null ? void 0 : e.ownerDocument) == null ? void 0 : i.createNodeIterator(e, NodeFilter.SHOW_TEXT);
485
485
  let r = (o == null ? void 0 : o.nextNode()) || null;
486
486
  for (; r; ) {
487
487
  if (!qt(t, r)) {
@@ -498,49 +498,49 @@ const Ye = (t) => {
498
498
  return n;
499
499
  }, Xt = (t, e, n) => {
500
500
  if (t.collapsed) return;
501
- const o = e.id ?? "", r = Ae(o);
501
+ const o = e.id ?? "", r = De(o);
502
502
  if (document.getElementById(Ee(o))) {
503
503
  Qt(e, n);
504
504
  return;
505
505
  }
506
- const l = e.type === L.IMPORTANT ? n.colors.importantBackground : n.colors.confusingBackground, a = e.id === e.selectedNoteId, m = a ? l : De(l, 0.5), c = e.type === L.IMPORTANT ? n.colors.importantUnderline : n.colors.confusingUnderline, p = e.type === L.IMPORTANT ? "solid" : "dashed", d = document.createElement("span");
506
+ const l = e.type === O.IMPORTANT ? n.colors.importantBackground : n.colors.confusingBackground, a = e.id === e.selectedNoteId, m = a ? l : Pe(l, 0.5), c = e.type === O.IMPORTANT ? n.colors.importantUnderline : n.colors.confusingUnderline, y = e.type === O.IMPORTANT ? "solid" : "dashed", d = document.createElement("span");
507
507
  d.id = `${r}-start`, d.className = "highlight-marker-start", d.dataset.highlightId = o || "";
508
- const h = e.labelPrefix ?? zt;
508
+ const h = e.labelPrefix ?? nt;
509
509
  d.setAttribute("role", "button"), d.setAttribute("tabindex", "0"), d.setAttribute("aria-label", h), d.setAttribute("aria-haspopup", "dialog"), d.setAttribute("aria-expanded", String(a && !!e.isTrayOpen)), a && d.setAttribute("aria-current", "true"), e.popupId && d.setAttribute("aria-controls", e.popupId), d.style.position = "relative", d.style.fontSize = "0", d.style.lineHeight = "0", d.style.width = "0", d.style.height = "0", d.style.margin = "0", d.style.padding = "0", d.style.border = "0", d.style.outline = "none";
510
- const E = document.createElement("span");
511
- E.id = Ze(o), E.className = "highlight-marker-end", E.dataset.highlightId = o || "";
512
- const y = t.cloneRange();
513
- y.collapse(!1), y.insertNode(E);
514
- const S = t.cloneRange();
515
- S.collapse(!0), S.insertNode(d);
510
+ const b = document.createElement("span");
511
+ b.id = et(o), b.className = "highlight-marker-end", b.dataset.highlightId = o || "";
512
+ const p = t.cloneRange();
513
+ p.collapse(!1), p.insertNode(b);
514
+ const E = t.cloneRange();
515
+ E.collapse(!0), E.insertNode(d);
516
516
  const g = document.createRange();
517
- g.setStartAfter(d), g.setEndBefore(E);
518
- const G = Kt(g).filter((N) => N.textContent && N.textContent.length > 0);
519
- G.forEach((N, C) => {
520
- var _;
521
- const D = N.parentElement;
522
- if ((D == null ? void 0 : D.dataset.highlightId) === o) return;
523
- const M = C === 0, P = C === G.length - 1, T = G.length === 1;
524
- let A;
525
- T ? A = "single" : M ? A = "first" : P ? A = "last" : A = "middle";
526
- const v = document.createElement("span");
527
- v.className = "highlight-content", v.dataset.highlightId = o || "", v.dataset.position = A, v.style.textDecorationLine = "underline", v.style.textDecorationColor = c, v.style.textDecorationStyle = p, v.style.textDecorationThickness = n.borderWidthSmall, v.style.textUnderlineOffset = n.underlineOffset, v.style.cursor = "pointer", et(v, a, m, c, p), v.addEventListener("click", (z) => {
528
- var Y;
529
- z.target.tagName !== "A" && ((Y = e.onClick) == null || Y.call(e));
530
- }), (_ = N.parentNode) == null || _.insertBefore(v, N), v.appendChild(N);
517
+ g.setStartAfter(d), g.setEndBefore(b);
518
+ const j = Kt(g).filter((N) => N.textContent && N.textContent.length > 0);
519
+ j.forEach((N, I) => {
520
+ var F;
521
+ const P = N.parentElement;
522
+ if ((P == null ? void 0 : P.dataset.highlightId) === o) return;
523
+ const $ = I === 0, _ = I === j.length - 1, T = j.length === 1;
524
+ let L;
525
+ T ? L = "single" : $ ? L = "first" : _ ? L = "last" : L = "middle";
526
+ const C = document.createElement("span");
527
+ C.className = "highlight-content", C.dataset.highlightId = o || "", C.dataset.position = L, C.style.textDecorationLine = "underline", C.style.textDecorationThickness = n.borderWidthSmall, C.style.textUnderlineOffset = n.underlineOffset, C.style.cursor = "pointer", ot(C, a, m, c, y), C.addEventListener("click", (Z) => {
528
+ var V;
529
+ Z.target.tagName !== "A" && ((V = e.onClick) == null || V.call(e));
530
+ }), (F = N.parentNode) == null || F.insertBefore(C, N), C.appendChild(N);
531
531
  }), d.addEventListener("click", (N) => {
532
- var C;
533
- N.target.tagName !== "A" && ((C = e.onClick) == null || C.call(e));
532
+ var I;
533
+ N.target.tagName !== "A" && ((I = e.onClick) == null || I.call(e));
534
534
  }), d.addEventListener("keydown", (N) => {
535
- var C;
535
+ var I;
536
536
  if (N.key === "Enter" || N.key === " ")
537
- N.preventDefault(), (C = e.onClick) == null || C.call(e);
537
+ N.preventDefault(), (I = e.onClick) == null || I.call(e);
538
538
  else if (N.key === "Tab" && !N.shiftKey) {
539
- const D = document.querySelectorAll(fe(o));
540
- for (const M of D) {
541
- const P = M.querySelector("a");
542
- if (P) {
543
- N.preventDefault(), P.focus();
539
+ const P = document.querySelectorAll(fe(o));
540
+ for (const $ of P) {
541
+ const _ = $.querySelector("a");
542
+ if (_) {
543
+ N.preventDefault(), _.focus();
544
544
  break;
545
545
  }
546
546
  }
@@ -548,46 +548,46 @@ const Ye = (t) => {
548
548
  }), d.addEventListener("focus", () => {
549
549
  document.querySelectorAll(
550
550
  `.highlight-content${fe(o)}`
551
- ).forEach((C) => {
552
- C.style.boxShadow = `0 0 0 ${Gt} ${n.colors.focusOutline}`, C.style.borderRadius = Ut;
551
+ ).forEach((I) => {
552
+ I.style.boxShadow = `0 0 0 ${Ut} ${n.colors.focusOutline}`, I.style.borderRadius = jt;
553
553
  });
554
554
  }), d.addEventListener("blur", () => {
555
555
  document.querySelectorAll(
556
556
  `.highlight-content${fe(o)}`
557
- ).forEach((C) => {
558
- C.style.boxShadow = "", C.style.borderRadius = C.dataset.selected ? Je : "";
557
+ ).forEach((I) => {
558
+ I.style.boxShadow = "", I.style.borderRadius = I.dataset.selected ? tt : "";
559
559
  });
560
560
  });
561
561
  };
562
562
  function Qt(t, e) {
563
- const n = t.type === L.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground, o = t.id === t.selectedNoteId, r = o ? n : De(n, 0.5), s = t.type === L.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline, l = t.type === L.IMPORTANT ? "solid" : "dashed";
563
+ const n = t.type === O.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground, o = t.id === t.selectedNoteId, r = o ? n : Pe(n, 0.5), i = t.type === O.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline, l = t.type === O.IMPORTANT ? "solid" : "dashed";
564
564
  document.querySelectorAll(
565
565
  `.highlight-content${fe(t.id ?? "")}`
566
566
  ).forEach((c) => {
567
- et(c, o, r, s, l);
567
+ ot(c, o, r, i, l);
568
568
  });
569
569
  const m = document.getElementById(
570
570
  Ee(t.id ?? "")
571
571
  );
572
- m && (m.setAttribute("aria-expanded", String(o && !!t.isTrayOpen)), o ? m.setAttribute("aria-current", "true") : m.removeAttribute("aria-current"));
572
+ m && (m.setAttribute("aria-label", t.labelPrefix ?? nt), m.setAttribute("aria-expanded", String(o && !!t.isTrayOpen)), o ? m.setAttribute("aria-current", "true") : m.removeAttribute("aria-current"));
573
573
  }
574
574
  const Yt = (t) => {
575
- const e = t.id ?? "", n = document.getElementById(Ee(e)), o = document.getElementById(Ze(e));
575
+ const e = t.id ?? "", n = document.getElementById(Ee(e)), o = document.getElementById(et(e));
576
576
  document.querySelectorAll(
577
577
  fe(e)
578
- ).forEach((s) => {
578
+ ).forEach((i) => {
579
579
  var l;
580
- for (; s.firstChild; )
581
- (l = s.parentNode) == null || l.insertBefore(s.firstChild, s);
582
- s.remove();
580
+ for (; i.firstChild; )
581
+ (l = i.parentNode) == null || l.insertBefore(i.firstChild, i);
582
+ i.remove();
583
583
  }), n == null || n.remove(), o == null || o.remove();
584
584
  }, de = {
585
585
  all: ["notebook"],
586
586
  notes: (t) => ["notebook", "notes", t]
587
587
  };
588
588
  function Vt(t) {
589
- const e = xe();
590
- return Re({
589
+ const e = Re();
590
+ return ke({
591
591
  mutationFn: (n) => t.createNote(n),
592
592
  onSuccess: () => {
593
593
  e.invalidateQueries({ queryKey: de.all });
@@ -595,34 +595,34 @@ function Vt(t) {
595
595
  });
596
596
  }
597
597
  function Zt(t) {
598
- const e = xe();
599
- return Re({
598
+ const e = Re();
599
+ return ke({
600
600
  mutationFn: (n) => t.deleteNote(n),
601
601
  onSuccess: () => {
602
602
  e.invalidateQueries({ queryKey: de.all });
603
603
  }
604
604
  });
605
605
  }
606
- function tt({
606
+ function rt({
607
607
  api: t,
608
608
  enabled: e = !0,
609
609
  ...n
610
610
  }) {
611
- return mt({
611
+ return ht({
612
612
  queryKey: de.notes(n),
613
613
  queryFn: () => t.getNotes(n),
614
614
  enabled: e
615
615
  });
616
616
  }
617
617
  const Jt = 100;
618
- function nt({
618
+ function st({
619
619
  api: t,
620
620
  courseId: e,
621
621
  learningObject: n,
622
622
  reactions: o,
623
623
  enabled: r = !0
624
624
  }) {
625
- return tt({
625
+ return rt({
626
626
  api: t,
627
627
  filter: {
628
628
  ...e ? { courseId: e } : {},
@@ -635,13 +635,13 @@ function nt({
635
635
  });
636
636
  }
637
637
  function en(t) {
638
- const e = xe();
639
- return Re({
638
+ const e = Re();
639
+ return ke({
640
640
  mutationFn: ({ id: n, input: o }) => t.updateNote(n, o),
641
641
  onMutate: async ({ id: n, input: o }) => {
642
642
  await e.cancelQueries({ queryKey: de.all });
643
- const s = e.getQueryCache().findAll({ queryKey: de.all }), l = /* @__PURE__ */ new Map();
644
- for (const a of s) {
643
+ const i = e.getQueryCache().findAll({ queryKey: de.all }), l = /* @__PURE__ */ new Map();
644
+ for (const a of i) {
645
645
  const m = a.state.data;
646
646
  m && (l.set(a.queryKey, m), e.setQueryData(a.queryKey, {
647
647
  ...m,
@@ -654,15 +654,15 @@ function en(t) {
654
654
  },
655
655
  onError: (n, o, r) => {
656
656
  if (r != null && r.previousData)
657
- for (const [s, l] of r.previousData)
658
- e.setQueryData(s, l);
657
+ for (const [i, l] of r.previousData)
658
+ e.setQueryData(i, l);
659
659
  },
660
660
  onSettled: () => {
661
661
  e.invalidateQueries({ queryKey: de.all });
662
662
  }
663
663
  });
664
664
  }
665
- const tn = "Notebook", nn = "Notes", on = "Important", rn = "Unclear", sn = "Back", ln = "Edit note", an = "Save", cn = "Cancel", dn = "Delete note", un = "Delete note confirmation", fn = "note", mn = "Add note (optional)", gn = "Remove from Notebook", hn = "Add a note (optional)", pn = "Mark important", yn = "Mark unclear", Nn = "Saved to Notebook.", bn = "Note updated", En = "Note deleted", Sn = "Error saving to Notebook.", Tn = "Error updating note", vn = "Note deletion failed", In = "Loading notes", Cn = "Failed to load notes", xn = "Start capturing your notes", Rn = "Your notes from learning materials will appear here. Highlight key ideas, reflections, or questions as you learn—they'll all be saved in your Notebook for easy review later.", kn = "Nothing here yet", wn = "Adjust your filters or create a new note to get started.", On = "You have no notes for the selected filter", Ln = "Filter", An = "Previous page", Dn = "Next page", Pn = "All courses", _n = "All notes", Fn = "Close Notebook panel", Mn = "To use the Notebook feature, highlight an excerpt from your learning material to flag it as 'confusing' or 'important' and leave an optional note.", Bn = "The content you highlighted is no longer available.", $n = "Notebook note", Pe = {
665
+ const tn = "Notebook", nn = "Notes", on = "Important", rn = "Unclear", sn = "Back", ln = "Edit note", an = "Save", cn = "Cancel", dn = "Delete note", un = "Delete note confirmation", fn = "note", mn = "Add note (optional)", gn = "Remove from Notebook", hn = "Add a note (optional)", pn = "Mark important", yn = "Mark unclear", Nn = "Saved to Notebook.", bn = "Note updated", En = "Note deleted", Tn = "Error saving to Notebook.", Sn = "Error updating note", vn = "Note deletion failed", In = "Loading notes", Cn = "Failed to load notes", xn = "Start capturing your notes", Rn = "Your notes from learning materials will appear here. Highlight key ideas, reflections, or questions as you learn—they'll all be saved in your Notebook for easy review later.", kn = "Nothing here yet", wn = "Adjust your filters or create a new note to get started.", On = "You have no notes for the selected filter", Ln = "Filter", An = "Previous page", Dn = "Next page", Pn = "All courses", _n = "All notes", Fn = "Close Notebook panel", Mn = "To use the Notebook feature, highlight an excerpt from your learning material to flag it as 'confusing' or 'important' and leave an optional note.", Bn = "The content you highlighted is no longer available.", $n = "Notebook note", _e = {
666
666
  notebook: tn,
667
667
  notes: nn,
668
668
  important: on,
@@ -682,8 +682,8 @@ const tn = "Notebook", nn = "Notes", on = "Important", rn = "Unclear", sn = "Bac
682
682
  savedToNotebook: Nn,
683
683
  noteUpdated: bn,
684
684
  noteDeleted: En,
685
- errorSavingNote: Sn,
686
- errorUpdatingNote: Tn,
685
+ errorSavingNote: Tn,
686
+ errorUpdatingNote: Sn,
687
687
  noteDeletionFailed: vn,
688
688
  loadingNotes: In,
689
689
  failedToLoadNotes: Cn,
@@ -701,9 +701,9 @@ const tn = "Notebook", nn = "Notes", on = "Important", rn = "Unclear", sn = "Bac
701
701
  featureDescription: Mn,
702
702
  highlightUnavailable: Bn,
703
703
  notebookNote: $n
704
- }, ot = ze(null);
705
- function rt(t, e) {
706
- const n = Pe[t] ?? t;
704
+ }, it = Ke(null);
705
+ function lt(t, e) {
706
+ const n = _e[t] ?? t;
707
707
  return e ? n.replace(/%\{([^}]+)}/g, (o, r) => String(e[r] ?? `%{${r}}`)) : n;
708
708
  }
709
709
  function Hn({
@@ -713,16 +713,16 @@ function Hn({
713
713
  }) {
714
714
  const o = me(
715
715
  () => ({
716
- translations: { ...Pe, ...t },
717
- translate: e ?? rt
716
+ translations: { ..._e, ...t },
717
+ translate: e ?? lt
718
718
  }),
719
719
  [t, e]
720
720
  );
721
- return /* @__PURE__ */ i(ot.Provider, { value: o, children: n });
721
+ return /* @__PURE__ */ s(it.Provider, { value: o, children: n });
722
722
  }
723
- function V() {
724
- const t = qe(ot);
725
- return t || { translations: Pe, translate: rt };
723
+ function J() {
724
+ const t = Xe(it);
725
+ return t || { translations: _e, translate: lt };
726
726
  }
727
727
  const Gn = (t) => ({
728
728
  selectedNoteId: t ?? null,
@@ -749,64 +749,64 @@ function Un(t, e) {
749
749
  return t;
750
750
  }
751
751
  }
752
- const st = ze(null);
752
+ const at = Ke(null);
753
753
  function Eo({
754
754
  api: t,
755
755
  currentUserId: e,
756
756
  objectId: n,
757
757
  objectType: o,
758
758
  courseId: r,
759
- pageLastModifiedAt: s,
759
+ pageLastModifiedAt: i,
760
760
  onOpen: l,
761
761
  initialNoteId: a,
762
762
  translations: m,
763
763
  translate: c,
764
- children: p
764
+ children: y
765
765
  }) {
766
- const [d, h] = Ke(Un, Gn(a)), E = F(a != null), y = me(
766
+ const [d, h] = Qe(Un, Gn(a)), b = B(a != null), p = me(
767
767
  () => ({
768
768
  api: t,
769
769
  currentUserId: e,
770
770
  objectId: n,
771
771
  objectType: o,
772
772
  courseId: r,
773
- pageLastModifiedAt: s,
773
+ pageLastModifiedAt: i,
774
774
  ...d,
775
- selectNote: (S, g = !1) => h({ type: "SELECT_NOTE", payload: { id: S, isEditing: g } }),
775
+ selectNote: (E, g = !1) => h({ type: "SELECT_NOTE", payload: { id: E, isEditing: g } }),
776
776
  clearSelectedNote: () => h({ type: "CLEAR_SELECTED_NOTE" }),
777
- setEditing: (S) => h({ type: "SET_EDITING", payload: S }),
777
+ setEditing: (E) => h({ type: "SET_EDITING", payload: E }),
778
778
  openTray: () => {
779
- E.current || (E.current = !0, l == null || l()), h({ type: "OPEN_TRAY" });
779
+ b.current || (b.current = !0, l == null || l()), h({ type: "OPEN_TRAY" });
780
780
  },
781
781
  closeTray: () => {
782
- E.current = !1, h({ type: "CLOSE_TRAY" });
782
+ b.current = !1, h({ type: "CLOSE_TRAY" });
783
783
  }
784
784
  }),
785
- [t, e, n, o, r, s, l, d]
785
+ [t, e, n, o, r, i, l, d]
786
786
  );
787
- return /* @__PURE__ */ i(st.Provider, { value: y, children: /* @__PURE__ */ i(Hn, { translations: m, translate: c, children: p }) });
787
+ return /* @__PURE__ */ s(at.Provider, { value: p, children: /* @__PURE__ */ s(Hn, { translations: m, translate: c, children: y }) });
788
788
  }
789
- function it() {
790
- const t = qe(st);
789
+ function ct() {
790
+ const t = Xe(at);
791
791
  if (!t)
792
792
  throw new Error("useNotebook must be used within a NotebookProvider");
793
793
  return t;
794
794
  }
795
- const lt = "notebook-tray-content", So = ({ children: t }) => {
796
- const { isTrayOpen: e, closeTray: n } = it(), { translations: o } = V();
797
- return /* @__PURE__ */ i(
798
- ht,
795
+ const dt = "notebook-tray-content", To = ({ children: t }) => {
796
+ const { isTrayOpen: e, closeTray: n } = ct(), { translations: o } = J();
797
+ return /* @__PURE__ */ s(
798
+ yt,
799
799
  {
800
800
  label: o.notebook,
801
801
  open: e,
802
802
  onDismiss: n,
803
803
  placement: "end",
804
804
  size: "regular",
805
- children: /* @__PURE__ */ x(R, { direction: "column", height: "100vh", id: lt, children: [
806
- /* @__PURE__ */ i(R.Item, { children: /* @__PURE__ */ i(X, { as: "div", padding: "small medium", borderWidth: "0 0 small 0", children: /* @__PURE__ */ x(R, { justifyItems: "space-between", alignItems: "center", children: [
807
- /* @__PURE__ */ i(Ne, { level: "h3", children: o.notebook }),
808
- /* @__PURE__ */ i(
809
- gt,
805
+ children: /* @__PURE__ */ v(x, { direction: "column", height: "100vh", id: dt, children: [
806
+ /* @__PURE__ */ s(x.Item, { children: /* @__PURE__ */ s(Q, { as: "div", padding: "small medium", borderWidth: "0 0 small 0", children: /* @__PURE__ */ v(x, { justifyItems: "space-between", alignItems: "center", children: [
807
+ /* @__PURE__ */ s(Ne, { level: "h3", children: o.notebook }),
808
+ /* @__PURE__ */ s(
809
+ pt,
810
810
  {
811
811
  screenReaderLabel: o.closeNotebookPanel,
812
812
  onClick: n,
@@ -815,16 +815,16 @@ const lt = "notebook-tray-content", So = ({ children: t }) => {
815
815
  }
816
816
  )
817
817
  ] }) }) }),
818
- /* @__PURE__ */ i(R.Item, { shouldGrow: !0, shouldShrink: !0, overflowY: "auto", overflowX: "hidden", children: t })
818
+ /* @__PURE__ */ s(x.Item, { shouldGrow: !0, shouldShrink: !0, overflowY: "auto", overflowX: "hidden", children: t })
819
819
  ] })
820
820
  }
821
821
  );
822
822
  }, jn = ({ currentType: t, onSelectReaction: e }) => {
823
- const { translations: n } = V(), o = F(null), r = F(null);
823
+ const { translations: n } = J(), o = B(null), r = B(null);
824
824
  return W(() => {
825
- t === L.CONFUSING && o.current ? o.current.focus() : t === L.IMPORTANT && r.current ? r.current.focus() : o.current && o.current.focus();
826
- }, [t]), /* @__PURE__ */ i(
827
- X,
825
+ t === O.CONFUSING && o.current ? o.current.focus() : t === O.IMPORTANT && r.current ? r.current.focus() : o.current && o.current.focus();
826
+ }, [t]), /* @__PURE__ */ s(
827
+ Q,
828
828
  {
829
829
  as: "div",
830
830
  background: "primary",
@@ -832,25 +832,25 @@ const lt = "notebook-tray-content", So = ({ children: t }) => {
832
832
  borderColor: "secondary",
833
833
  borderRadius: "medium",
834
834
  shadow: "resting",
835
- children: /* @__PURE__ */ x(ce, { children: [
836
- /* @__PURE__ */ x(
835
+ children: /* @__PURE__ */ v(ce, { children: [
836
+ /* @__PURE__ */ v(
837
837
  ce.Item,
838
838
  {
839
839
  ref: o,
840
- onClick: () => e(L.CONFUSING),
840
+ onClick: () => e(O.CONFUSING),
841
841
  children: [
842
- /* @__PURE__ */ i(ke, { size: "x-small" }),
842
+ /* @__PURE__ */ s(we, { size: "x-small" }),
843
843
  ` ${n.markUnclear}`
844
844
  ]
845
845
  }
846
846
  ),
847
- /* @__PURE__ */ x(
847
+ /* @__PURE__ */ v(
848
848
  ce.Item,
849
849
  {
850
850
  ref: r,
851
- onClick: () => e(L.IMPORTANT),
851
+ onClick: () => e(O.IMPORTANT),
852
852
  children: [
853
- /* @__PURE__ */ i(we, { size: "x-small" }),
853
+ /* @__PURE__ */ s(Oe, { size: "x-small" }),
854
854
  ` ${n.markImportant}`
855
855
  ]
856
856
  }
@@ -859,174 +859,174 @@ const lt = "notebook-tray-content", So = ({ children: t }) => {
859
859
  }
860
860
  );
861
861
  }, Se = "notebook-inline-reaction-menu";
862
- function To({
862
+ function So({
863
863
  containerRef: t,
864
864
  highlightTheme: e,
865
865
  debounceTime: n = 500,
866
866
  onCreateError: o,
867
867
  onUpdateError: r,
868
- onDeleteError: s,
868
+ onDeleteError: i,
869
869
  onNoteCreate: l
870
870
  }) {
871
871
  const {
872
872
  api: a,
873
873
  objectId: m,
874
874
  objectType: c,
875
- courseId: p,
875
+ courseId: y,
876
876
  pageLastModifiedAt: d,
877
877
  selectedNoteId: h,
878
- isTrayOpen: E,
879
- selectNote: y,
880
- openTray: S
881
- } = it(), { translations: g } = V(), { data: Q } = nt({
878
+ isTrayOpen: b,
879
+ selectNote: p,
880
+ openTray: E
881
+ } = ct(), { translations: g } = J(), { data: Y } = st({
882
882
  api: a,
883
- courseId: p,
883
+ courseId: y,
884
884
  learningObject: { type: c, id: m }
885
- }), { mutate: G } = Vt(a), { mutateAsync: N } = en(a), { mutate: C } = Zt(a), D = F([]), [M, P] = j([]), [T, A] = j(null), [v, _] = j(""), [z, Y] = j(null), re = F(null);
886
- re.current = z;
887
- const [Z, J] = j(!1);
885
+ }), { mutate: j } = Vt(a), { mutateAsync: N } = en(a), { mutate: I } = Zt(a), P = B([]), [$, _] = U([]), [T, L] = U(null), [C, F] = U(""), [Z, V] = U(null), ae = B(null);
886
+ ae.current = Z;
887
+ const [ee, re] = U(!1);
888
888
  W(() => {
889
- const k = t.current;
890
- if (!k) return;
891
- const I = k.closest(".user_content") ?? k;
892
- if (I.classList.contains("enhanced")) {
893
- J(!0);
889
+ const w = t.current;
890
+ if (!w) return;
891
+ const S = w.closest(".user_content") ?? w;
892
+ if (S.classList.contains("enhanced")) {
893
+ re(!0);
894
894
  return;
895
895
  }
896
- const B = new MutationObserver((u) => {
897
- for (const b of u)
898
- if (b.type === "attributes" && b.attributeName === "class" && b.target.classList.contains("enhanced")) {
899
- J(!0), B.disconnect();
896
+ const G = new MutationObserver((M) => {
897
+ for (const A of M)
898
+ if (A.type === "attributes" && A.attributeName === "class" && A.target.classList.contains("enhanced")) {
899
+ re(!0), G.disconnect();
900
900
  return;
901
901
  }
902
902
  });
903
- return B.observe(I, { attributes: !0, attributeFilter: ["class"] }), () => B.disconnect();
903
+ return G.observe(S, { attributes: !0, attributeFilter: ["class"] }), () => G.disconnect();
904
904
  }, [t]);
905
- const U = q(() => {
906
- Y(null), A(null), _("");
905
+ const z = K(() => {
906
+ V(null), L(null), F("");
907
907
  }, []);
908
908
  W(() => {
909
- if (!Z || !t.current) return;
910
- let I = null;
911
- const B = () => {
912
- I && clearTimeout(I), I = setTimeout(() => {
913
- var Fe;
914
- const O = window.getSelection(), H = t.current;
915
- if (!(O != null && O.rangeCount) || !H) return;
916
- const le = O.toString().trim();
917
- if (le === "") return;
918
- const ae = O.getRangeAt(0);
919
- if (!H.contains(ae.commonAncestorContainer)) return;
920
- const _e = (Fe = oe.fromRange(H, ae)) == null ? void 0 : Fe.toSelector();
921
- _e && !Ht(_e, M) && (A(ae.cloneRange()), _(le), Y($t(ae)));
909
+ if (!ee || !t.current) return;
910
+ let S = null;
911
+ const G = () => {
912
+ S && clearTimeout(S), S = setTimeout(() => {
913
+ var Me;
914
+ const R = window.getSelection(), u = t.current;
915
+ if (!(R != null && R.rangeCount) || !u) return;
916
+ const k = R.toString().trim();
917
+ if (k === "") return;
918
+ const q = R.getRangeAt(0);
919
+ if (!u.contains(q.commonAncestorContainer)) return;
920
+ const Fe = (Me = ie.fromRange(u, q)) == null ? void 0 : Me.toSelector();
921
+ Fe && !Gt(Fe, $) && (L(q.cloneRange()), F(k), V(Ht(q)));
922
922
  }, n);
923
- }, u = (O) => {
924
- if (!(O.target instanceof Node)) return;
925
- const H = document.getElementById(Se);
926
- H != null && H.contains(O.target) ? (O.preventDefault(), O.stopImmediatePropagation()) : U();
927
- }, b = () => {
928
- U();
929
- }, w = (O) => {
930
- O.key === "Escape" && re.current !== null && (U(), O.stopImmediatePropagation());
923
+ }, M = (R) => {
924
+ if (!(R.target instanceof Node)) return;
925
+ const u = document.getElementById(Se);
926
+ u != null && u.contains(R.target) ? (R.preventDefault(), R.stopImmediatePropagation()) : z();
927
+ }, A = () => {
928
+ z();
929
+ }, D = (R) => {
930
+ R.key === "Escape" && ae.current !== null && (z(), R.stopImmediatePropagation());
931
931
  };
932
- return document.addEventListener("selectionchange", B), document.addEventListener("mousedown", u), document.addEventListener("touchstart", u), document.addEventListener("keydown", w), window.addEventListener("scroll", b, !0), () => {
933
- I && clearTimeout(I), document.removeEventListener("selectionchange", B), document.removeEventListener("mousedown", u), document.removeEventListener("touchstart", u), document.removeEventListener("keydown", w), window.removeEventListener("scroll", b, !0);
932
+ return document.addEventListener("selectionchange", G), document.addEventListener("mousedown", M), document.addEventListener("touchstart", M), document.addEventListener("keydown", D), window.addEventListener("scroll", A, !0), () => {
933
+ S && clearTimeout(S), document.removeEventListener("selectionchange", G), document.removeEventListener("mousedown", M), document.removeEventListener("touchstart", M), document.removeEventListener("keydown", D), window.removeEventListener("scroll", A, !0);
934
934
  };
935
- }, [Z, M, n, t, U]);
936
- const se = q(
937
- (k) => {
938
- var H;
939
- const I = t.current;
940
- if (!I || !k.highlightData) return null;
941
- const { highlightData: B, reaction: u, id: b } = k, { range: w } = B, O = w && ((H = ie.fromSelector(I, w)) == null ? void 0 : H.toRange());
942
- if (O) {
943
- const le = u[0] === L.IMPORTANT ? g.important : g.unclear, ae = {
944
- id: b,
935
+ }, [ee, $, n, t, z]);
936
+ const se = K(
937
+ (w) => {
938
+ var u;
939
+ const S = t.current;
940
+ if (!S || !w.highlightData) return null;
941
+ const { highlightData: G, reaction: M, id: A } = w, { range: D } = G, R = D && ((u = le.fromSelector(S, D)) == null ? void 0 : u.toRange());
942
+ if (R) {
943
+ const k = M[0] === O.IMPORTANT ? g.important : g.unclear, q = {
944
+ id: A,
945
945
  selectedNoteId: h,
946
- type: u[0],
947
- isTrayOpen: E,
948
- labelPrefix: `${g.notebookNote} (${le})`,
949
- popupId: lt,
946
+ type: M[0],
947
+ isTrayOpen: b,
948
+ labelPrefix: `${g.notebookNote} (${k})`,
949
+ popupId: dt,
950
950
  onClick: () => {
951
- y(b), S();
951
+ p(A), E();
952
952
  }
953
953
  };
954
- return Xt(O, ae, e), B.textPosition;
954
+ return Xt(R, q, e), G.textPosition;
955
955
  }
956
956
  return null;
957
957
  },
958
- [t, h, E, e, g, y, S]
958
+ [t, h, b, e, g, p, E]
959
959
  );
960
960
  W(() => {
961
- if (!Z || !Q || !t.current) return;
962
- const k = t.current, I = Q.notes, B = /* @__PURE__ */ new Set(), u = [], b = [];
963
- if (I.length === 0) {
964
- if (D.current.length > 0) {
965
- for (const w of D.current)
966
- Ue(w, k);
967
- D.current = [], P([]);
961
+ if (!ee || !Y || !t.current) return;
962
+ const w = t.current, S = Y.notes, G = /* @__PURE__ */ new Set(), M = [], A = [];
963
+ if (S.length === 0) {
964
+ if (P.current.length > 0) {
965
+ for (const D of P.current)
966
+ je(D, w);
967
+ P.current = [], _([]);
968
968
  }
969
969
  return;
970
970
  }
971
- if (d && I[0].highlightData.pageLastModifiedAt !== d) {
972
- const { notesForUpdate: w, noteIdsForDelete: O } = Mt(
973
- k,
974
- I,
971
+ if (d && S[0].highlightData.pageLastModifiedAt !== d) {
972
+ const { notesForUpdate: D, noteIdsForDelete: R } = Bt(
973
+ w,
974
+ S,
975
975
  d
976
976
  );
977
- for (const H of w)
978
- N({ id: H.id, input: H }).catch((le) => r == null ? void 0 : r(le));
979
- for (const H of O)
980
- C(H, { onError: s });
977
+ for (const u of D)
978
+ N({ id: u.id, input: u }).catch((k) => r == null ? void 0 : r(k));
979
+ for (const u of R)
980
+ I(u, { onError: i });
981
981
  } else {
982
- for (const w of I) {
983
- const O = se(w);
984
- B.add(w.id), O && (u.push(w), b.push(O));
982
+ for (const D of S) {
983
+ const R = se(D);
984
+ G.add(D.id), R && (M.push(D), A.push(R));
985
985
  }
986
- for (const w of D.current)
987
- B.has(w.id) || Ue(w, k);
988
- P(b), D.current = u, h && Bt(h);
986
+ for (const D of P.current)
987
+ G.has(D.id) || je(D, w);
988
+ _(A), P.current = M, h && $t(h);
989
989
  }
990
990
  }, [
991
- Z,
992
- Q,
991
+ ee,
992
+ Y,
993
993
  se,
994
994
  d,
995
995
  t,
996
996
  N,
997
- C,
997
+ I,
998
998
  h
999
999
  ]);
1000
- const $ = (k) => {
1001
- const I = t.current;
1002
- if (!T || !I) return;
1003
- const B = ie.fromRange(I, T), u = oe.fromRange(I, T);
1004
- G(
1000
+ const H = (w) => {
1001
+ const S = t.current;
1002
+ if (!T || !S) return;
1003
+ const G = le.fromRange(S, T), M = ie.fromRange(S, T);
1004
+ j(
1005
1005
  {
1006
- courseId: p,
1006
+ courseId: y,
1007
1007
  objectId: m,
1008
1008
  objectType: c,
1009
1009
  userText: "",
1010
- reaction: [k],
1010
+ reaction: [w],
1011
1011
  highlightData: {
1012
- selectedText: v,
1013
- textPosition: (u == null ? void 0 : u.toSelector()) ?? null,
1014
- range: B.toSelector(),
1012
+ selectedText: C,
1013
+ textPosition: (M == null ? void 0 : M.toSelector()) ?? null,
1014
+ range: G.toSelector(),
1015
1015
  pageLastModifiedAt: d ?? ""
1016
1016
  }
1017
1017
  },
1018
1018
  {
1019
- onSuccess: (b) => {
1020
- var O;
1021
- const w = b.id;
1022
- U(), (O = window.getSelection()) == null || O.removeAllRanges(), y(w), S(), l == null || l(b);
1019
+ onSuccess: (A) => {
1020
+ var R;
1021
+ const D = A.id;
1022
+ z(), (R = window.getSelection()) == null || R.removeAllRanges(), p(D), E(), l == null || l(A);
1023
1023
  },
1024
1024
  onError: o
1025
1025
  }
1026
1026
  );
1027
1027
  };
1028
- return !T || !z ? null : ut(
1029
- /* @__PURE__ */ i(
1028
+ return !T || !Z ? null : mt(
1029
+ /* @__PURE__ */ s(
1030
1030
  "div",
1031
1031
  {
1032
1032
  id: Se,
@@ -1034,33 +1034,33 @@ function To({
1034
1034
  style: {
1035
1035
  position: "fixed",
1036
1036
  zIndex: 100,
1037
- top: z.top,
1038
- left: z.left,
1037
+ top: Z.top,
1038
+ left: Z.left,
1039
1039
  whiteSpace: "nowrap"
1040
1040
  },
1041
- onBlur: (k) => {
1042
- const I = document.getElementById(Se);
1043
- I != null && I.contains(k.relatedTarget) || U();
1041
+ onBlur: (w) => {
1042
+ const S = document.getElementById(Se);
1043
+ S != null && S.contains(w.relatedTarget) || z();
1044
1044
  },
1045
- children: /* @__PURE__ */ i(jn, { onSelectReaction: $ })
1045
+ children: /* @__PURE__ */ s(jn, { onSelectReaction: H })
1046
1046
  }
1047
1047
  ),
1048
1048
  document.body
1049
1049
  );
1050
1050
  }
1051
1051
  const Wn = (t, e) => ({
1052
- backgroundColor: t === L.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground,
1053
- underlineColor: t === L.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline,
1054
- underlineStyle: t === L.IMPORTANT ? "solid" : "dashed"
1055
- }), Ce = ({
1052
+ backgroundColor: t === O.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground,
1053
+ underlineColor: t === O.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline,
1054
+ underlineStyle: t === O.IMPORTANT ? "solid" : "dashed"
1055
+ }), xe = ({
1056
1056
  children: t,
1057
- type: e = L.IMPORTANT,
1057
+ type: e = O.IMPORTANT,
1058
1058
  isCardActive: n = !0,
1059
1059
  theme: o
1060
1060
  }) => {
1061
1061
  const r = Wn(e, o), l = {
1062
1062
  position: "relative",
1063
- backgroundColor: n ? r.backgroundColor : De(r.backgroundColor, 0.5),
1063
+ backgroundColor: n ? r.backgroundColor : Pe(r.backgroundColor, 0.5),
1064
1064
  textDecorationLine: "underline",
1065
1065
  textDecorationStyle: r.underlineStyle,
1066
1066
  textDecorationColor: r.underlineColor,
@@ -1068,12 +1068,12 @@ const Wn = (t, e) => ({
1068
1068
  textUnderlineOffset: o.underlineOffset,
1069
1069
  lineHeight: "normal"
1070
1070
  };
1071
- return /* @__PURE__ */ i("span", { "data-note-highlight": "true", style: l, children: t });
1072
- }, at = () => {
1073
- const { translations: t } = V();
1074
- return /* @__PURE__ */ x(R, { gap: "xx-small", alignItems: "start", as: "div", children: [
1075
- /* @__PURE__ */ i(R.Item, { as: "div", children: /* @__PURE__ */ i(pt, { color: "error" }) }),
1076
- /* @__PURE__ */ i(R.Item, { padding: "xxx-small none", shouldShrink: !0, children: /* @__PURE__ */ i(Ie, { maxLines: 3, children: t.highlightUnavailable }) })
1071
+ return /* @__PURE__ */ s("span", { "data-note-highlight": "true", style: l, children: t });
1072
+ }, ut = () => {
1073
+ const { translations: t } = J();
1074
+ return /* @__PURE__ */ v(x, { gap: "xx-small", alignItems: "start", as: "div", children: [
1075
+ /* @__PURE__ */ s(x.Item, { as: "div", children: /* @__PURE__ */ s(Nt, { color: "error" }) }),
1076
+ /* @__PURE__ */ s(x.Item, { padding: "xxx-small none", shouldShrink: !0, children: /* @__PURE__ */ s(Ce, { maxLines: 3, children: t.highlightUnavailable }) })
1077
1077
  ] });
1078
1078
  }, zn = {
1079
1079
  filter: null,
@@ -1115,113 +1115,113 @@ function vo({
1115
1115
  enableCourseFilter: n = !1,
1116
1116
  learningObject: o,
1117
1117
  pageSize: r = 16,
1118
- focusNoteId: s
1118
+ focusNoteId: i
1119
1119
  }) {
1120
1120
  var se;
1121
- const [l, a] = Ke(qn, zn), { filter: m, courseFilter: c, currentPage: p, totalPages: d } = l;
1121
+ const [l, a] = Qe(qn, zn), { filter: m, courseFilter: c, currentPage: y, totalPages: d } = l;
1122
1122
  W(() => {
1123
1123
  a({ type: "SET_PAGE", payload: 1 });
1124
1124
  }, [r]);
1125
- const h = n ? c : e, E = (p - 1) * r, y = !!o, S = {
1125
+ const h = n ? c : e, b = (y - 1) * r, p = !!o, E = {
1126
1126
  ...h ? { courseId: h } : {},
1127
1127
  ...m ? { reactions: [m] } : {},
1128
1128
  ...o ? { learningObject: o } : {}
1129
1129
  }, {
1130
1130
  data: g,
1131
- isLoading: Q,
1132
- isError: G
1133
- } = tt({
1131
+ isLoading: Y,
1132
+ isError: j
1133
+ } = rt({
1134
1134
  api: t,
1135
- filter: S,
1136
- offset: E,
1135
+ filter: E,
1136
+ offset: b,
1137
1137
  pageSize: r,
1138
- enabled: !y
1138
+ enabled: !p
1139
1139
  }), {
1140
1140
  data: N,
1141
- isLoading: C,
1142
- isError: D
1143
- } = nt({
1141
+ isLoading: I,
1142
+ isError: P
1143
+ } = st({
1144
1144
  api: t,
1145
1145
  courseId: h ?? void 0,
1146
1146
  learningObject: o,
1147
- enabled: y
1148
- }), M = me(() => {
1149
- const $ = (N == null ? void 0 : N.notes) ?? [];
1150
- return m ? $.filter((k) => k.reaction.includes(m)) : $;
1151
- }, [N, m]), P = F(null);
1147
+ enabled: p
1148
+ }), $ = me(() => {
1149
+ const H = (N == null ? void 0 : N.notes) ?? [];
1150
+ return m ? H.filter((w) => w.reaction.includes(m)) : H;
1151
+ }, [N, m]), _ = B(null);
1152
1152
  W(() => {
1153
- if (!s) {
1154
- P.current = null;
1153
+ if (!i) {
1154
+ _.current = null;
1155
1155
  return;
1156
1156
  }
1157
- if (P.current === s) return;
1158
- const $ = M.findIndex((I) => I.id === s);
1159
- if ($ === -1) return;
1160
- P.current = s;
1161
- const k = Math.floor($ / r) + 1;
1162
- k !== p && a({ type: "FOCUS_PAGE", payload: k });
1163
- }, [s, M, r, p]);
1164
- const T = y ? M.slice(E, E + r) : (g == null ? void 0 : g.notes) ?? [], A = y ? C : Q, v = y ? D : G, _ = y ? Math.max(1, Math.ceil(M.length / r)) : ((se = g == null ? void 0 : g.pageInfo) == null ? void 0 : se.totalNrOfPages) ?? void 0, z = y ? { totalCount: M.length, totalNrOfPages: _ } : g == null ? void 0 : g.pageInfo;
1157
+ if (_.current === i) return;
1158
+ const H = $.findIndex((S) => S.id === i);
1159
+ if (H === -1) return;
1160
+ _.current = i;
1161
+ const w = Math.floor(H / r) + 1;
1162
+ w !== y && a({ type: "FOCUS_PAGE", payload: w });
1163
+ }, [i, $, r, y]);
1164
+ const T = p ? $.slice(b, b + r) : (g == null ? void 0 : g.notes) ?? [], L = p ? I : Y, C = p ? P : j, F = p ? Math.max(1, Math.ceil($.length / r)) : ((se = g == null ? void 0 : g.pageInfo) == null ? void 0 : se.totalNrOfPages) ?? void 0, Z = p ? { totalCount: $.length, totalNrOfPages: F } : g == null ? void 0 : g.pageInfo;
1165
1165
  W(() => {
1166
- a({ type: "SET_TOTAL_PAGES", payload: _ });
1167
- }, [_]);
1168
- const Y = q(($) => {
1169
- a({ type: "SET_PAGE", payload: $ });
1170
- }, []), re = q(() => {
1166
+ a({ type: "SET_TOTAL_PAGES", payload: F });
1167
+ }, [F]);
1168
+ const V = K((H) => {
1169
+ a({ type: "SET_PAGE", payload: H });
1170
+ }, []), ae = K(() => {
1171
1171
  a({
1172
1172
  type: "INCREMENT_PAGE"
1173
1173
  /* IncrementPage */
1174
1174
  });
1175
- }, []), Z = q(() => {
1175
+ }, []), ee = K(() => {
1176
1176
  a({
1177
1177
  type: "DECREMENT_PAGE"
1178
1178
  /* DecrementPage */
1179
1179
  });
1180
- }, []), J = q(($) => {
1181
- a({ type: "SET_FILTER", payload: $ });
1182
- }, []), U = q(($) => {
1183
- a({ type: "SET_COURSE_FILTER", payload: $ });
1180
+ }, []), re = K((H) => {
1181
+ a({ type: "SET_FILTER", payload: H });
1182
+ }, []), z = K((H) => {
1183
+ a({ type: "SET_COURSE_FILTER", payload: H });
1184
1184
  }, []);
1185
1185
  return {
1186
1186
  notes: T,
1187
- pageInfo: z,
1188
- isLoading: A,
1189
- isError: v,
1187
+ pageInfo: Z,
1188
+ isLoading: L,
1189
+ isError: C,
1190
1190
  filter: m,
1191
1191
  courseFilter: c,
1192
- currentPage: p,
1192
+ currentPage: y,
1193
1193
  totalPages: d,
1194
- setFilter: J,
1195
- setCourseFilter: U,
1196
- setPage: Y,
1197
- fetchNextPage: re,
1198
- fetchPreviousPage: Z
1194
+ setFilter: re,
1195
+ setCourseFilter: z,
1196
+ setPage: V,
1197
+ fetchNextPage: ae,
1198
+ fetchPreviousPage: ee
1199
1199
  };
1200
1200
  }
1201
- const Te = "all";
1201
+ const ve = "all";
1202
1202
  function Io({ filter: t, setFilter: e }) {
1203
- const { translations: n } = V(), o = me(
1203
+ const { translations: n } = J(), o = me(
1204
1204
  () => [
1205
- { label: n.allNotes, value: Te },
1206
- { label: n.important, value: L.IMPORTANT },
1207
- { label: n.unclear, value: L.CONFUSING }
1205
+ { label: n.allNotes, value: ve },
1206
+ { label: n.important, value: O.IMPORTANT },
1207
+ { label: n.unclear, value: O.CONFUSING }
1208
1208
  ],
1209
1209
  [n]
1210
- ), r = q(
1210
+ ), r = K(
1211
1211
  (l, { value: a }) => {
1212
- e(!a || a === Te ? null : a);
1212
+ e(!a || a === ve ? null : a);
1213
1213
  },
1214
1214
  [e]
1215
1215
  );
1216
1216
  return {
1217
1217
  filterElement: me(
1218
- () => /* @__PURE__ */ i(
1219
- Me,
1218
+ () => /* @__PURE__ */ s(
1219
+ Be,
1220
1220
  {
1221
1221
  renderLabel: n.filter,
1222
- value: t ?? Te,
1222
+ value: t ?? ve,
1223
1223
  onChange: r,
1224
- children: o.map((l) => /* @__PURE__ */ i(Me.Option, { id: l.value, value: l.value, children: l.label }, l.value))
1224
+ children: o.map((l) => /* @__PURE__ */ s(Be.Option, { id: l.value, value: l.value, children: l.label }, l.value))
1225
1225
  }
1226
1226
  ),
1227
1227
  [t, o, r, n.filter]
@@ -1231,25 +1231,25 @@ function Io({ filter: t, setFilter: e }) {
1231
1231
  };
1232
1232
  }
1233
1233
  const Kn = ({ hasActiveFilter: t = !1 }) => {
1234
- const { translations: e } = V(), n = t ? e.nothingHereYet : e.emptyStateHeading, o = t ? e.adjustFiltersOrCreate : e.emptyStateDescription;
1235
- return /* @__PURE__ */ i(X, { as: "div", textAlign: "center", children: /* @__PURE__ */ x(R, { direction: "column", alignItems: "center", gap: "small", children: [
1236
- !t && /* @__PURE__ */ i(yt, { size: "medium" }),
1237
- /* @__PURE__ */ i(Ne, { level: "h3", children: n }),
1238
- /* @__PURE__ */ i(ee, { color: "secondary", children: o })
1234
+ const { translations: e } = J(), n = t ? e.nothingHereYet : e.emptyStateHeading, o = t ? e.adjustFiltersOrCreate : e.emptyStateDescription;
1235
+ return /* @__PURE__ */ s(Q, { as: "div", textAlign: "center", children: /* @__PURE__ */ v(x, { direction: "column", alignItems: "center", gap: "small", children: [
1236
+ !t && /* @__PURE__ */ s(bt, { size: "medium" }),
1237
+ /* @__PURE__ */ s(Ne, { level: "h3", children: n }),
1238
+ /* @__PURE__ */ s(te, { color: "secondary", children: o })
1239
1239
  ] }) });
1240
1240
  }, Xn = {
1241
- [L.IMPORTANT]: {
1241
+ [O.IMPORTANT]: {
1242
1242
  color: "success",
1243
1243
  translationKey: "important",
1244
- icon: /* @__PURE__ */ i(we, { size: "x-small" })
1244
+ icon: /* @__PURE__ */ s(Oe, { size: "x-small" })
1245
1245
  },
1246
- [L.CONFUSING]: {
1246
+ [O.CONFUSING]: {
1247
1247
  color: "danger",
1248
1248
  translationKey: "unclear",
1249
- icon: /* @__PURE__ */ i(ke, { size: "x-small" })
1249
+ icon: /* @__PURE__ */ s(we, { size: "x-small" })
1250
1250
  }
1251
- }, ct = ({ type: t, onTypeChange: e, renderAsMenuTrigger: n = !1 }) => {
1252
- const { translations: o } = V(), r = Xn[t], s = o[r.translationKey], [l, a] = j(!1), m = F(null), c = F(null), p = F(null), d = q(
1251
+ }, ft = ({ type: t, onTypeChange: e, renderAsMenuTrigger: n = !1 }) => {
1252
+ const { translations: o } = J(), r = Xn[t], i = o[r.translationKey], [l, a] = U(!1), m = B(null), c = B(null), y = B(null), d = K(
1253
1253
  (h) => {
1254
1254
  e == null || e(h), a(!1);
1255
1255
  },
@@ -1257,16 +1257,16 @@ const Kn = ({ hasActiveFilter: t = !1 }) => {
1257
1257
  );
1258
1258
  return W(() => {
1259
1259
  if (!l) return;
1260
- const h = (y) => {
1261
- y.key === "Escape" && y.stopPropagation();
1262
- }, E = (y) => {
1263
- var S;
1264
- y.key === "Escape" && (y.stopPropagation(), a(!1), (S = p.current) == null || S.focus());
1260
+ const h = (p) => {
1261
+ p.key === "Escape" && p.stopPropagation();
1262
+ }, b = (p) => {
1263
+ var E;
1264
+ p.key === "Escape" && (p.stopPropagation(), a(!1), (E = y.current) == null || E.focus());
1265
1265
  };
1266
- return document.addEventListener("keydown", h, !0), document.addEventListener("keyup", E, !0), () => {
1267
- document.removeEventListener("keydown", h, !0), document.removeEventListener("keyup", E, !0);
1266
+ return document.addEventListener("keydown", h, !0), document.addEventListener("keyup", b, !0), () => {
1267
+ document.removeEventListener("keydown", h, !0), document.removeEventListener("keyup", b, !0);
1268
1268
  };
1269
- }, [l]), n && e ? /* @__PURE__ */ x(
1269
+ }, [l]), n && e ? /* @__PURE__ */ v(
1270
1270
  ce,
1271
1271
  {
1272
1272
  placement: "bottom start",
@@ -1274,31 +1274,31 @@ const Kn = ({ hasActiveFilter: t = !1 }) => {
1274
1274
  onToggle: (h) => a(h),
1275
1275
  shouldHideOnSelect: !0,
1276
1276
  shouldFocusTriggerOnClose: !0,
1277
- trigger: /* @__PURE__ */ i(
1278
- Be,
1277
+ trigger: /* @__PURE__ */ s(
1278
+ $e,
1279
1279
  {
1280
1280
  color: r.color,
1281
1281
  renderIcon: r.icon,
1282
1282
  elementRef: (h) => {
1283
- p.current = h;
1283
+ y.current = h;
1284
1284
  },
1285
- children: s
1285
+ children: i
1286
1286
  }
1287
1287
  ),
1288
1288
  children: [
1289
- /* @__PURE__ */ x(ce.Item, { ref: m, onClick: () => d(L.CONFUSING), children: [
1290
- /* @__PURE__ */ i(ke, { size: "x-small" }),
1289
+ /* @__PURE__ */ v(ce.Item, { ref: m, onClick: () => d(O.CONFUSING), children: [
1290
+ /* @__PURE__ */ s(we, { size: "x-small" }),
1291
1291
  ` ${o.markUnclear}`
1292
1292
  ] }),
1293
- /* @__PURE__ */ x(ce.Item, { ref: c, onClick: () => d(L.IMPORTANT), children: [
1294
- /* @__PURE__ */ i(we, { size: "x-small" }),
1293
+ /* @__PURE__ */ v(ce.Item, { ref: c, onClick: () => d(O.IMPORTANT), children: [
1294
+ /* @__PURE__ */ s(Oe, { size: "x-small" }),
1295
1295
  ` ${o.markImportant}`
1296
1296
  ] })
1297
1297
  ]
1298
1298
  }
1299
- ) : /* @__PURE__ */ i(X, { display: "inline-flex", children: /* @__PURE__ */ i(Be, { color: r.color, renderIcon: r.icon, children: s }) });
1300
- }, je = "0.75rem";
1301
- function We(t, e) {
1299
+ ) : /* @__PURE__ */ s(Q, { display: "inline-flex", children: /* @__PURE__ */ s($e, { color: r.color, renderIcon: r.icon, children: i }) });
1300
+ }, We = "0.75rem";
1301
+ function ze(t, e) {
1302
1302
  return (t instanceof Date ? t : new Date(t)).toLocaleString(e, {
1303
1303
  year: "numeric",
1304
1304
  month: "short",
@@ -1311,54 +1311,54 @@ const Qn = ({
1311
1311
  highlight: n,
1312
1312
  note: o,
1313
1313
  type: r,
1314
- onClick: s,
1314
+ onClick: i,
1315
1315
  onDelete: l,
1316
1316
  onSaveNote: a,
1317
1317
  onTypeChange: m,
1318
1318
  isActive: c,
1319
- isPanelView: p = !1,
1319
+ isPanelView: y = !1,
1320
1320
  courseName: d,
1321
1321
  locale: h,
1322
- highlightTheme: E,
1323
- renderLink: y,
1324
- href: S
1322
+ highlightTheme: b,
1323
+ renderLink: p,
1324
+ href: E
1325
1325
  }) => {
1326
- const { translations: g } = V(), [Q, G] = j(!1), [N, C] = j(!1), [D, M] = j(o || ""), [P, T] = j(!1), A = F(null), v = q((u) => {
1327
- A.current = u;
1328
- }, []), _ = F(null), z = F(null), Y = F(!1), re = F(null), Z = F(null), J = F(!1);
1326
+ const { translations: g } = J(), [Y, j] = U(!1), [N, I] = U(!1), [P, $] = U(o || ""), [_, T] = U(!1), [L, C] = U(!1), [F, Z] = U(!1), V = B(null), ae = K((u) => {
1327
+ V.current = u;
1328
+ }, []), ee = B(null), re = B(null), z = B(!1), se = B(null), H = B(null), w = B(!1);
1329
1329
  W(() => {
1330
- var u, b;
1331
- c ? ((u = A.current) == null || u.scrollIntoView({ behavior: "smooth", block: "nearest" }), (b = A.current) == null || b.focus()) : T(!1);
1330
+ var u, k;
1331
+ c ? ((u = V.current) == null || u.scrollIntoView({ behavior: "smooth", block: "nearest" }), (k = V.current) == null || k.focus()) : T(!1);
1332
1332
  }, [c]), W(() => {
1333
- var u, b;
1334
- N ? (Y.current = !0, (u = _.current) == null || u.focus()) : Y.current && (Y.current = !1, (b = z.current) == null || b.focus());
1333
+ var u, k;
1334
+ N ? (z.current = !0, (u = ee.current) == null || u.focus()) : z.current && (z.current = !1, (k = re.current) == null || k.focus());
1335
1335
  }, [N]), W(() => {
1336
- if (!P && J.current) {
1337
- J.current = !1;
1338
- const u = re.current;
1336
+ if (!_ && w.current) {
1337
+ w.current = !1;
1338
+ const u = se.current;
1339
1339
  u != null && u.isConnected && u.focus();
1340
1340
  }
1341
- }, [P]);
1342
- const U = q((u, b) => {
1343
- J.current = !b, T(!1);
1341
+ }, [_]);
1342
+ const S = K((u, k) => {
1343
+ w.current = !k, T(!1);
1344
1344
  }, []);
1345
1345
  W(() => {
1346
- if (!P) return;
1347
- const u = (w) => {
1348
- w.key === "Escape" && w.stopPropagation();
1349
- }, b = (w) => {
1350
- w.key === "Escape" && (w.stopPropagation(), U());
1346
+ if (!_) return;
1347
+ const u = (q) => {
1348
+ q.key === "Escape" && q.stopPropagation();
1349
+ }, k = (q) => {
1350
+ q.key === "Escape" && (q.stopPropagation(), S());
1351
1351
  };
1352
- return window.addEventListener("keydown", u, !0), window.addEventListener("keyup", b, !0), () => {
1353
- window.removeEventListener("keydown", u, !0), window.removeEventListener("keyup", b, !0);
1352
+ return window.addEventListener("keydown", u, !0), window.addEventListener("keyup", k, !0), () => {
1353
+ window.removeEventListener("keydown", u, !0), window.removeEventListener("keyup", k, !0);
1354
1354
  };
1355
- }, [P, U]);
1356
- const se = r === L.IMPORTANT ? g.important : g.unclear, $ = (u) => {
1357
- u.key === "Enter" && (u.preventDefault(), s == null || s());
1358
- }, k = [se, g.note];
1359
- n && k.push(n), o && k.push(o), e && k.push(We(e, h)), d && k.push(d);
1360
- const I = k.join(", "), B = /* @__PURE__ */ x(
1361
- X,
1355
+ }, [_, S]);
1356
+ const G = r === O.IMPORTANT ? g.important : g.unclear, M = (u) => {
1357
+ u.key === "Enter" && (u.preventDefault(), i == null || i());
1358
+ }, A = [g.note, G];
1359
+ A.push(n || g.highlightUnavailable), o && A.push(o), e && A.push(ze(e, h)), d && A.push(d);
1360
+ const D = A.join(", "), R = /* @__PURE__ */ v(
1361
+ Q,
1362
1362
  {
1363
1363
  as: "div",
1364
1364
  height: "100%",
@@ -1366,97 +1366,100 @@ const Qn = ({
1366
1366
  borderRadius: "medium",
1367
1367
  padding: "small",
1368
1368
  position: "relative",
1369
- role: S ? void 0 : c || N ? "group" : "button",
1370
- "aria-label": S ? void 0 : I,
1371
- "aria-pressed": S || c || N ? void 0 : c,
1372
- tabIndex: S || c ? -1 : 0,
1369
+ role: E ? void 0 : c || N ? "group" : "button",
1370
+ "aria-label": E ? void 0 : D,
1371
+ "aria-pressed": E || c || N ? void 0 : c,
1372
+ tabIndex: E || c ? -1 : 0,
1373
1373
  "data-testid": `note-card-${t}`,
1374
- elementRef: v,
1375
- onClick: c ? void 0 : s,
1376
- onMouseEnter: () => G(!0),
1377
- onMouseLeave: () => G(!1),
1378
- onKeyDown: c ? void 0 : $,
1374
+ elementRef: ae,
1375
+ onClick: c ? void 0 : i,
1376
+ onMouseEnter: () => j(!0),
1377
+ onMouseLeave: () => j(!1),
1378
+ onKeyDown: c ? void 0 : M,
1379
1379
  cursor: N ? "default" : "pointer",
1380
1380
  children: [
1381
- /* @__PURE__ */ i(
1381
+ /* @__PURE__ */ s(
1382
1382
  "div",
1383
1383
  {
1384
1384
  "data-testid": `note-card-${t}-content`,
1385
1385
  style: {
1386
1386
  height: "100%",
1387
- opacity: c && P && l ? 0.25 : void 0
1387
+ opacity: c && _ && l ? 0.25 : void 0
1388
1388
  },
1389
- children: /* @__PURE__ */ x(R, { direction: "column", gap: "small", height: "100%", children: [
1390
- /* @__PURE__ */ i(
1391
- ct,
1389
+ children: /* @__PURE__ */ v(x, { direction: "column", gap: "small", height: "100%", children: [
1390
+ /* @__PURE__ */ s(
1391
+ ft,
1392
1392
  {
1393
1393
  type: r,
1394
- onTypeChange: p && m ? (u) => m(t, u) : void 0,
1395
- renderAsMenuTrigger: p && !!m && !!c
1394
+ onTypeChange: y && m ? (u) => m(t, u) : void 0,
1395
+ renderAsMenuTrigger: y && !!m && !!c
1396
1396
  }
1397
1397
  ),
1398
- n ? /* @__PURE__ */ i("div", { style: { wordBreak: "break-word", overflowWrap: "break-word" }, children: /* @__PURE__ */ i(ee, { children: c && p ? /* @__PURE__ */ i(
1399
- Ce,
1398
+ n ? /* @__PURE__ */ s("div", { style: { wordBreak: "break-word", overflowWrap: "break-word" }, children: /* @__PURE__ */ s(te, { children: c && y ? /* @__PURE__ */ s(
1399
+ xe,
1400
1400
  {
1401
1401
  type: r,
1402
- isCardActive: !!c || Q,
1403
- theme: E,
1402
+ isCardActive: !!c || Y,
1403
+ theme: b,
1404
1404
  children: n
1405
1405
  }
1406
- ) : /* @__PURE__ */ i(Ie, { maxLines: 3, truncate: "word", children: /* @__PURE__ */ i(
1407
- Ce,
1408
- {
1409
- type: r,
1410
- isCardActive: !!c || Q,
1411
- theme: E,
1412
- children: n
1413
- }
1414
- ) }) }) }) : /* @__PURE__ */ i(at, {}),
1415
- /* @__PURE__ */ i(R.Item, { shouldGrow: !0, children: /* @__PURE__ */ x(R, { direction: "column", gap: "small", height: "100%", children: [
1416
- N && p ? /* @__PURE__ */ x(R, { direction: "column", gap: "x-small", margin: "xx-small", children: [
1417
- /* @__PURE__ */ i(
1418
- Xe,
1406
+ ) : /* @__PURE__ */ v(qe, { children: [
1407
+ L && /* @__PURE__ */ s(Te, { children: n }),
1408
+ /* @__PURE__ */ s("span", { "aria-hidden": L, style: { display: "block" }, children: /* @__PURE__ */ s(Ce, { maxLines: 3, truncate: "word", onUpdate: C, children: /* @__PURE__ */ s(
1409
+ xe,
1410
+ {
1411
+ type: r,
1412
+ isCardActive: !!c || Y,
1413
+ theme: b,
1414
+ children: n
1415
+ }
1416
+ ) }) })
1417
+ ] }) }) }) : /* @__PURE__ */ s(ut, {}),
1418
+ /* @__PURE__ */ s(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ v(x, { direction: "column", gap: "small", height: "100%", children: [
1419
+ N && y ? /* @__PURE__ */ v(x, { direction: "column", gap: "x-small", margin: "xx-small", children: [
1420
+ /* @__PURE__ */ s(
1421
+ Ye,
1419
1422
  {
1420
- label: /* @__PURE__ */ i(bt, { children: g.editNote }),
1421
- value: D,
1422
- onChange: (u) => M(u.target.value),
1423
+ label: /* @__PURE__ */ s(Te, { children: g.editNote }),
1424
+ value: P,
1425
+ onChange: (u) => $(u.target.value),
1423
1426
  placeholder: g.addNoteOptional,
1424
1427
  textareaRef: (u) => {
1425
- _.current = u;
1428
+ ee.current = u;
1426
1429
  }
1427
1430
  }
1428
1431
  ),
1429
- /* @__PURE__ */ x(R, { gap: "xx-small", children: [
1430
- /* @__PURE__ */ i(R.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1431
- te,
1432
+ /* @__PURE__ */ v(x, { gap: "xx-small", children: [
1433
+ /* @__PURE__ */ s(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ s(
1434
+ ne,
1432
1435
  {
1433
1436
  display: "block",
1434
1437
  size: "small",
1435
1438
  "data-testid": `note-card-${t}-cancel`,
1436
1439
  onClick: () => {
1437
- M(o || ""), C(!1);
1440
+ $(o || ""), I(!1);
1438
1441
  },
1439
1442
  children: g.cancel
1440
1443
  }
1441
1444
  ) }),
1442
- /* @__PURE__ */ i(R.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1443
- te,
1445
+ /* @__PURE__ */ s(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ s(
1446
+ ne,
1444
1447
  {
1445
1448
  display: "block",
1446
1449
  color: "primary",
1447
1450
  size: "small",
1448
1451
  "data-testid": `note-card-${t}-save`,
1449
1452
  onClick: () => {
1450
- a == null || a(t, D.trim()), C(!1);
1453
+ a == null || a(t, P.trim()), I(!1);
1451
1454
  },
1452
1455
  children: g.save
1453
1456
  }
1454
1457
  ) })
1455
1458
  ] })
1456
- ] }) : o ? /* @__PURE__ */ i("div", { style: { wordBreak: "break-word", overflowWrap: "break-word" }, children: c && p ? /* @__PURE__ */ x(ee, { children: [
1459
+ ] }) : o ? /* @__PURE__ */ s("div", { style: { wordBreak: "break-word", overflowWrap: "break-word" }, children: c && y ? /* @__PURE__ */ v(te, { children: [
1457
1460
  o,
1458
1461
  " ",
1459
- /* @__PURE__ */ i(
1462
+ /* @__PURE__ */ s(
1460
1463
  ue,
1461
1464
  {
1462
1465
  size: "small",
@@ -1466,18 +1469,21 @@ const Qn = ({
1466
1469
  screenReaderLabel: g.editNote,
1467
1470
  "data-testid": `note-card-${t}-edit`,
1468
1471
  elementRef: (u) => {
1469
- z.current = u;
1472
+ re.current = u;
1470
1473
  },
1471
1474
  onClick: (u) => {
1472
- u.stopPropagation(), C(!0);
1475
+ u.stopPropagation(), I(!0);
1473
1476
  },
1474
- children: /* @__PURE__ */ i(ve, {})
1477
+ children: /* @__PURE__ */ s(Ie, {})
1475
1478
  }
1476
1479
  )
1477
- ] }) : /* @__PURE__ */ i(ee, { children: /* @__PURE__ */ i(Ie, { maxLines: 3, truncate: "word", children: o }) }) }) : p && c ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ x(ee, { color: "secondary", children: [
1480
+ ] }) : /* @__PURE__ */ v(te, { children: [
1481
+ F && /* @__PURE__ */ s(Te, { children: o }),
1482
+ /* @__PURE__ */ s("span", { "aria-hidden": F, style: { display: "block" }, children: /* @__PURE__ */ s(Ce, { maxLines: 3, truncate: "word", onUpdate: Z, children: o }) })
1483
+ ] }) }) : y && c ? /* @__PURE__ */ s("div", { children: /* @__PURE__ */ v(te, { color: "secondary", children: [
1478
1484
  g.addNotePrompt,
1479
1485
  " ",
1480
- /* @__PURE__ */ i(
1486
+ /* @__PURE__ */ s(
1481
1487
  ue,
1482
1488
  {
1483
1489
  size: "small",
@@ -1487,18 +1493,18 @@ const Qn = ({
1487
1493
  screenReaderLabel: g.editNote,
1488
1494
  "data-testid": `note-card-${t}-edit`,
1489
1495
  elementRef: (u) => {
1490
- z.current = u;
1496
+ re.current = u;
1491
1497
  },
1492
1498
  onClick: (u) => {
1493
- u.stopPropagation(), C(!0);
1499
+ u.stopPropagation(), I(!0);
1494
1500
  },
1495
- children: /* @__PURE__ */ i(ve, {})
1501
+ children: /* @__PURE__ */ s(Ie, {})
1496
1502
  }
1497
1503
  )
1498
1504
  ] }) }) : null,
1499
- /* @__PURE__ */ x(R, { justifyItems: "space-between", alignItems: "center", margin: "auto 0 0 0", children: [
1500
- /* @__PURE__ */ i(ee, { size: "small", color: "secondary", children: We(e, h) }),
1501
- c && l && /* @__PURE__ */ i(
1505
+ /* @__PURE__ */ v(x, { justifyItems: "space-between", alignItems: "center", margin: "auto 0 0 0", children: [
1506
+ /* @__PURE__ */ s(te, { as: "div", size: "small", color: "secondary", children: ze(e, h) }),
1507
+ c && l && /* @__PURE__ */ s(
1502
1508
  ue,
1503
1509
  {
1504
1510
  size: "small",
@@ -1509,35 +1515,44 @@ const Qn = ({
1509
1515
  screenReaderLabel: g.deleteNote,
1510
1516
  "data-testid": `note-card-${t}-delete`,
1511
1517
  elementRef: (u) => {
1512
- re.current = u;
1518
+ se.current = u;
1513
1519
  },
1514
1520
  onClick: (u) => {
1515
- u.stopPropagation(), J.current = !1, T(!0);
1521
+ u.stopPropagation(), w.current = !1, T(!0);
1516
1522
  },
1517
- children: /* @__PURE__ */ i(ye, {})
1523
+ children: /* @__PURE__ */ s(ye, {})
1518
1524
  }
1519
1525
  )
1520
1526
  ] }),
1521
- d && /* @__PURE__ */ i(ee, { size: "small", color: "secondary", "data-testid": `note-card-${t}-course`, children: d })
1527
+ d && /* @__PURE__ */ s(
1528
+ te,
1529
+ {
1530
+ as: "div",
1531
+ size: "small",
1532
+ color: "secondary",
1533
+ "data-testid": `note-card-${t}-course`,
1534
+ children: d
1535
+ }
1536
+ )
1522
1537
  ] }) })
1523
1538
  ] })
1524
1539
  }
1525
1540
  ),
1526
- c && P && l && /* @__PURE__ */ i(
1527
- Et,
1541
+ c && _ && l && /* @__PURE__ */ s(
1542
+ Tt,
1528
1543
  {
1529
1544
  open: !0,
1530
1545
  as: "div",
1531
1546
  label: g.deleteNoteConfirmation,
1532
1547
  shouldContainFocus: !0,
1533
1548
  shouldFocusOnOpen: !0,
1534
- defaultFocusElement: () => Z.current,
1549
+ defaultFocusElement: () => H.current,
1535
1550
  shouldCloseOnDocumentClick: !0,
1536
1551
  shouldCloseOnEscape: !1,
1537
1552
  shouldReturnFocus: !1,
1538
- onDismiss: U,
1539
- children: /* @__PURE__ */ i(
1540
- X,
1553
+ onDismiss: S,
1554
+ children: /* @__PURE__ */ s(
1555
+ Q,
1541
1556
  {
1542
1557
  as: "div",
1543
1558
  padding: "medium",
@@ -1547,8 +1562,8 @@ const Qn = ({
1547
1562
  insetInlineStart: "0",
1548
1563
  insetInlineEnd: "0",
1549
1564
  stacking: "above",
1550
- children: /* @__PURE__ */ x(
1551
- R,
1565
+ children: /* @__PURE__ */ v(
1566
+ x,
1552
1567
  {
1553
1568
  direction: "column",
1554
1569
  justifyItems: "center",
@@ -1556,23 +1571,23 @@ const Qn = ({
1556
1571
  gap: "x-small",
1557
1572
  height: "100%",
1558
1573
  children: [
1559
- /* @__PURE__ */ i(
1560
- te,
1574
+ /* @__PURE__ */ s(
1575
+ ne,
1561
1576
  {
1562
1577
  display: "block",
1563
1578
  color: "danger",
1564
1579
  withBackground: !1,
1565
- themeOverride: (u, b) => ({
1566
- borderRadius: je,
1580
+ themeOverride: (u, k) => ({
1581
+ borderRadius: We,
1567
1582
  // Ghost states default to translucent fills; the faded card would show through.
1568
- dangerGhostBackground: b.colors.contrasts.white1010,
1569
- dangerGhostHoverBackground: b.colors.contrasts.red1212,
1570
- dangerGhostActiveBackground: b.colors.contrasts.red1212,
1583
+ dangerGhostBackground: k.colors.contrasts.white1010,
1584
+ dangerGhostHoverBackground: k.colors.contrasts.red1212,
1585
+ dangerGhostActiveBackground: k.colors.contrasts.red1212,
1571
1586
  // red45 on the hover tint is 3.74:1; red57 clears AA in every state.
1572
- dangerGhostColor: b.colors.contrasts.red5782,
1573
- dangerGhostBorderColor: b.colors.contrasts.red5782
1587
+ dangerGhostColor: k.colors.contrasts.red5782,
1588
+ dangerGhostBorderColor: k.colors.contrasts.red5782
1574
1589
  }),
1575
- renderIcon: /* @__PURE__ */ i(ye, {}),
1590
+ renderIcon: /* @__PURE__ */ s(ye, {}),
1576
1591
  "data-testid": `note-card-${t}-confirm-delete`,
1577
1592
  onClick: (u) => {
1578
1593
  u.stopPropagation(), l(t), T(!1);
@@ -1580,22 +1595,22 @@ const Qn = ({
1580
1595
  children: g.deleteNote
1581
1596
  }
1582
1597
  ),
1583
- /* @__PURE__ */ i(
1584
- te,
1598
+ /* @__PURE__ */ s(
1599
+ ne,
1585
1600
  {
1586
1601
  display: "block",
1587
1602
  withBackground: !1,
1588
- themeOverride: (u, b) => ({
1589
- borderRadius: je,
1590
- secondaryGhostBackground: b.colors.contrasts.white1010,
1591
- secondaryGhostActiveBackground: b.colors.contrasts.grey1111
1603
+ themeOverride: (u, k) => ({
1604
+ borderRadius: We,
1605
+ secondaryGhostBackground: k.colors.contrasts.white1010,
1606
+ secondaryGhostActiveBackground: k.colors.contrasts.grey1111
1592
1607
  }),
1593
1608
  "data-testid": `note-card-${t}-cancel-delete`,
1594
1609
  elementRef: (u) => {
1595
- Z.current = u;
1610
+ H.current = u;
1596
1611
  },
1597
1612
  onClick: (u) => {
1598
- u.stopPropagation(), U();
1613
+ u.stopPropagation(), S();
1599
1614
  },
1600
1615
  children: g.cancel
1601
1616
  }
@@ -1610,7 +1625,7 @@ const Qn = ({
1610
1625
  ]
1611
1626
  }
1612
1627
  );
1613
- return S && y ? y({ href: S, children: B, ariaLabel: I }) : B;
1628
+ return E && p ? p({ href: E, children: R, ariaLabel: D }) : R;
1614
1629
  }, Yn = {
1615
1630
  display: "grid",
1616
1631
  gap: "1rem",
@@ -1625,83 +1640,83 @@ const Qn = ({
1625
1640
  isError: n,
1626
1641
  currentPage: o,
1627
1642
  totalPages: r,
1628
- onPageChange: s,
1643
+ onPageChange: i,
1629
1644
  onNoteSelect: l,
1630
1645
  onNoteDelete: a,
1631
1646
  onNoteSave: m,
1632
1647
  onNoteTypeChange: c,
1633
- onNotesEmptied: p,
1648
+ onNotesEmptied: y,
1634
1649
  selectedNoteId: d,
1635
1650
  hasActiveFilter: h = !1,
1636
- columnCount: E = 1,
1637
- highlightTheme: y,
1638
- locale: S,
1651
+ columnCount: b = 1,
1652
+ highlightTheme: p,
1653
+ locale: E,
1639
1654
  courseNames: g,
1640
- renderNoteLink: Q,
1641
- noteHref: G
1655
+ renderNoteLink: Y,
1656
+ noteHref: j
1642
1657
  }) => {
1643
- const { translations: N } = V(), C = F(null), D = F(null), M = q(
1658
+ const { translations: N } = J(), I = B(null), P = B(null), $ = K(
1644
1659
  (T) => {
1645
- const A = t.findIndex((_) => _.id === T);
1646
- let v = null;
1647
- t.length > 1 && (v = A > 0 ? t[A - 1].id : t[1].id), D.current = { targetId: v }, a == null || a(T);
1660
+ const L = t.findIndex((F) => F.id === T);
1661
+ let C = null;
1662
+ t.length > 1 && (C = L > 0 ? t[L - 1].id : t[1].id), P.current = { targetId: C }, a == null || a(T);
1648
1663
  },
1649
1664
  [t, a]
1650
1665
  );
1651
1666
  if (W(() => {
1652
- var A;
1653
- const T = D.current;
1667
+ var L;
1668
+ const T = P.current;
1654
1669
  if (T)
1655
- if (D.current = null, T.targetId === null)
1656
- p == null || p();
1670
+ if (P.current = null, T.targetId === null)
1671
+ y == null || y();
1657
1672
  else {
1658
- const v = (A = C.current) == null ? void 0 : A.querySelector(
1673
+ const C = (L = I.current) == null ? void 0 : L.querySelector(
1659
1674
  `[data-testid="note-card-${T.targetId}"]`
1660
1675
  );
1661
- v == null || v.focus();
1676
+ C == null || C.focus();
1662
1677
  }
1663
- }, [t, p]), e)
1664
- return /* @__PURE__ */ i(X, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-loading", children: /* @__PURE__ */ i(Tt, { renderTitle: N.loadingNotes }) });
1678
+ }, [t, y]), e)
1679
+ return /* @__PURE__ */ s(Q, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-loading", children: /* @__PURE__ */ s(vt, { renderTitle: N.loadingNotes }) });
1665
1680
  if (n)
1666
- return /* @__PURE__ */ i(X, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-error", children: /* @__PURE__ */ i(Ne, { level: "h4", children: N.failedToLoadNotes }) });
1681
+ return /* @__PURE__ */ s(Q, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-error", children: /* @__PURE__ */ s(Ne, { level: "h4", children: N.failedToLoadNotes }) });
1667
1682
  if (t.length === 0)
1668
- return /* @__PURE__ */ i(X, { as: "div", padding: "large", "data-testid": "empty-notes", children: /* @__PURE__ */ i(Kn, { hasActiveFilter: h }) });
1669
- const P = typeof o == "number" && typeof r == "number" && r > 1 && s !== void 0;
1670
- return /* @__PURE__ */ x(dt, { children: [
1671
- /* @__PURE__ */ i(
1683
+ return /* @__PURE__ */ s(Q, { as: "div", padding: "large", "data-testid": "empty-notes", children: /* @__PURE__ */ s(Kn, { hasActiveFilter: h }) });
1684
+ const _ = typeof o == "number" && typeof r == "number" && r > 1 && i !== void 0;
1685
+ return /* @__PURE__ */ v(qe, { children: [
1686
+ /* @__PURE__ */ s(
1672
1687
  "ul",
1673
1688
  {
1674
- ref: C,
1675
- style: { ...Yn, gridTemplateColumns: `repeat(${E}, minmax(0, 1fr))` },
1689
+ ref: I,
1690
+ style: { ...Yn, gridTemplateColumns: `repeat(${b}, minmax(0, 1fr))` },
1676
1691
  role: "list",
1677
1692
  "data-testid": "notes-grid",
1678
1693
  children: t.map((T) => {
1679
- var A;
1680
- return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1694
+ var L;
1695
+ return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
1681
1696
  Qn,
1682
1697
  {
1683
1698
  noteId: T.id,
1684
1699
  date: T.createdAt,
1685
- type: T.reaction[0] ?? L.IMPORTANT,
1686
- highlight: (A = T.highlightData) == null ? void 0 : A.selectedText,
1700
+ type: T.reaction[0] ?? O.IMPORTANT,
1701
+ highlight: (L = T.highlightData) == null ? void 0 : L.selectedText,
1687
1702
  note: T.userText,
1688
1703
  isActive: d === T.id,
1689
1704
  isPanelView: !!d,
1690
1705
  onClick: l ? () => l(T.id) : void 0,
1691
- onDelete: a ? M : void 0,
1692
- onSaveNote: m ? (v, _) => m(v, _) : void 0,
1693
- onTypeChange: c ? (v, _) => c(v, _) : void 0,
1694
- highlightTheme: y,
1695
- locale: S,
1706
+ onDelete: a ? $ : void 0,
1707
+ onSaveNote: m ? (C, F) => m(C, F) : void 0,
1708
+ onTypeChange: c ? (C, F) => c(C, F) : void 0,
1709
+ highlightTheme: p,
1710
+ locale: E,
1696
1711
  courseName: g == null ? void 0 : g.get(T.courseId),
1697
- renderLink: Q,
1698
- href: G ? G(T.id, T) : void 0
1712
+ renderLink: Y,
1713
+ href: j ? j(T.id, T) : void 0
1699
1714
  }
1700
1715
  ) }, T.id);
1701
1716
  })
1702
1717
  }
1703
1718
  ),
1704
- P && /* @__PURE__ */ i(R, { justifyItems: "center", padding: "small", "data-testid": "notes-pagination", children: /* @__PURE__ */ i(R.Item, { children: /* @__PURE__ */ i(
1719
+ _ && /* @__PURE__ */ s(x, { justifyItems: "center", padding: "small", "data-testid": "notes-pagination", children: /* @__PURE__ */ s(x.Item, { children: /* @__PURE__ */ s(
1705
1720
  St,
1706
1721
  {
1707
1722
  as: "nav",
@@ -1710,7 +1725,7 @@ const Qn = ({
1710
1725
  labelPrev: N.previousPage,
1711
1726
  currentPage: o,
1712
1727
  totalPageNumber: r,
1713
- onPageChange: s
1728
+ onPageChange: i
1714
1729
  }
1715
1730
  ) }) })
1716
1731
  ] });
@@ -1720,40 +1735,40 @@ const Qn = ({
1720
1735
  highlightText: n,
1721
1736
  highlightTheme: o,
1722
1737
  onSave: r,
1723
- onDelete: s,
1738
+ onDelete: i,
1724
1739
  onTypeChange: l,
1725
1740
  onBack: a,
1726
1741
  editing: m = !1
1727
1742
  }) => {
1728
- const { translations: c } = V(), [p, d] = j(m), [h, E] = j(t || ""), [y, S] = j(!1);
1729
- return /* @__PURE__ */ x(R, { direction: "column", gap: "small", "data-testid": "single-note", children: [
1730
- n != null ? /* @__PURE__ */ i(X, { as: "div", children: /* @__PURE__ */ i(ee, { children: /* @__PURE__ */ i(Ce, { type: e, isCardActive: !0, theme: o, children: n }) }) }) : /* @__PURE__ */ i(at, {}),
1731
- /* @__PURE__ */ i(ct, { type: e, onTypeChange: l, renderAsMenuTrigger: !!l }),
1732
- p ? /* @__PURE__ */ x(R, { direction: "column", gap: "x-small", children: [
1733
- /* @__PURE__ */ i(
1734
- Xe,
1743
+ const { translations: c } = J(), [y, d] = U(m), [h, b] = U(t || ""), [p, E] = U(!1);
1744
+ return /* @__PURE__ */ v(x, { direction: "column", gap: "small", "data-testid": "single-note", children: [
1745
+ n != null ? /* @__PURE__ */ s(Q, { as: "div", children: /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(xe, { type: e, isCardActive: !0, theme: o, children: n }) }) }) : /* @__PURE__ */ s(ut, {}),
1746
+ /* @__PURE__ */ s(ft, { type: e, onTypeChange: l, renderAsMenuTrigger: !!l }),
1747
+ y ? /* @__PURE__ */ v(x, { direction: "column", gap: "x-small", children: [
1748
+ /* @__PURE__ */ s(
1749
+ Ye,
1735
1750
  {
1736
1751
  label: c.addNoteOptional,
1737
1752
  value: h,
1738
- onChange: (g) => E(g.target.value),
1753
+ onChange: (g) => b(g.target.value),
1739
1754
  resize: "vertical"
1740
1755
  }
1741
1756
  ),
1742
- /* @__PURE__ */ x(R, { gap: "xx-small", children: [
1743
- /* @__PURE__ */ i(R.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1744
- te,
1757
+ /* @__PURE__ */ v(x, { gap: "xx-small", children: [
1758
+ /* @__PURE__ */ s(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ s(
1759
+ ne,
1745
1760
  {
1746
1761
  display: "block",
1747
1762
  size: "small",
1748
1763
  "data-testid": "single-note-cancel",
1749
1764
  onClick: () => {
1750
- E(t || ""), d(!1);
1765
+ b(t || ""), d(!1);
1751
1766
  },
1752
1767
  children: c.cancel
1753
1768
  }
1754
1769
  ) }),
1755
- /* @__PURE__ */ i(R.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1756
- te,
1770
+ /* @__PURE__ */ s(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ s(
1771
+ ne,
1757
1772
  {
1758
1773
  display: "block",
1759
1774
  color: "primary",
@@ -1766,24 +1781,24 @@ const Qn = ({
1766
1781
  }
1767
1782
  ) })
1768
1783
  ] })
1769
- ] }) : /* @__PURE__ */ x(R, { direction: "column", gap: "small", children: [
1770
- t && /* @__PURE__ */ x(X, { as: "div", children: [
1771
- /* @__PURE__ */ i(Ne, { level: "h4", margin: "0 0 xx-small 0", children: c.note }),
1772
- /* @__PURE__ */ i(ee, { children: t })
1784
+ ] }) : /* @__PURE__ */ v(x, { direction: "column", gap: "small", children: [
1785
+ t && /* @__PURE__ */ v(Q, { as: "div", children: [
1786
+ /* @__PURE__ */ s(Ne, { level: "h4", margin: "0 0 xx-small 0", children: c.note }),
1787
+ /* @__PURE__ */ s(te, { children: t })
1773
1788
  ] }),
1774
- /* @__PURE__ */ x(R, { justifyItems: "space-between", children: [
1775
- /* @__PURE__ */ i(
1776
- te,
1789
+ /* @__PURE__ */ v(x, { justifyItems: "space-between", children: [
1790
+ /* @__PURE__ */ s(
1791
+ ne,
1777
1792
  {
1778
1793
  size: "small",
1779
- renderIcon: /* @__PURE__ */ i(Nt, {}),
1794
+ renderIcon: /* @__PURE__ */ s(Et, {}),
1780
1795
  "data-testid": "single-note-back",
1781
1796
  onClick: () => a == null ? void 0 : a(),
1782
1797
  children: c.back
1783
1798
  }
1784
1799
  ),
1785
- /* @__PURE__ */ x(R, { gap: "xx-small", children: [
1786
- s && /* @__PURE__ */ i(
1800
+ /* @__PURE__ */ v(x, { gap: "xx-small", children: [
1801
+ i && /* @__PURE__ */ s(
1787
1802
  ue,
1788
1803
  {
1789
1804
  size: "small",
@@ -1792,11 +1807,11 @@ const Qn = ({
1792
1807
  color: "danger",
1793
1808
  screenReaderLabel: c.deleteNote,
1794
1809
  "data-testid": "single-note-delete",
1795
- onClick: () => S(!0),
1796
- children: /* @__PURE__ */ i(ye, {})
1810
+ onClick: () => E(!0),
1811
+ children: /* @__PURE__ */ s(ye, {})
1797
1812
  }
1798
1813
  ),
1799
- /* @__PURE__ */ i(
1814
+ /* @__PURE__ */ s(
1800
1815
  ue,
1801
1816
  {
1802
1817
  size: "small",
@@ -1805,33 +1820,33 @@ const Qn = ({
1805
1820
  screenReaderLabel: c.editNote,
1806
1821
  "data-testid": "single-note-edit",
1807
1822
  onClick: () => d(!0),
1808
- children: /* @__PURE__ */ i(ve, {})
1823
+ children: /* @__PURE__ */ s(Ie, {})
1809
1824
  }
1810
1825
  )
1811
1826
  ] })
1812
1827
  ] }),
1813
- y && s && /* @__PURE__ */ i(X, { as: "div", background: "primary", padding: "medium", borderRadius: "large", children: /* @__PURE__ */ x(R, { direction: "column", justifyItems: "center", alignItems: "center", gap: "x-small", children: [
1814
- /* @__PURE__ */ i(
1815
- te,
1828
+ p && i && /* @__PURE__ */ s(Q, { as: "div", background: "primary", padding: "medium", borderRadius: "large", children: /* @__PURE__ */ v(x, { direction: "column", justifyItems: "center", alignItems: "center", gap: "x-small", children: [
1829
+ /* @__PURE__ */ s(
1830
+ ne,
1816
1831
  {
1817
1832
  display: "block",
1818
1833
  color: "danger",
1819
1834
  size: "small",
1820
- renderIcon: /* @__PURE__ */ i(ye, {}),
1835
+ renderIcon: /* @__PURE__ */ s(ye, {}),
1821
1836
  "data-testid": "single-note-confirm-delete",
1822
1837
  onClick: () => {
1823
- s(), S(!1);
1838
+ i(), E(!1);
1824
1839
  },
1825
1840
  children: c.deleteNote
1826
1841
  }
1827
1842
  ),
1828
- /* @__PURE__ */ i(
1829
- te,
1843
+ /* @__PURE__ */ s(
1844
+ ne,
1830
1845
  {
1831
1846
  display: "block",
1832
1847
  size: "small",
1833
1848
  "data-testid": "single-note-cancel-delete",
1834
- onClick: () => S(!1),
1849
+ onClick: () => E(!1),
1835
1850
  children: c.cancel
1836
1851
  }
1837
1852
  )
@@ -1840,25 +1855,25 @@ const Qn = ({
1840
1855
  ] });
1841
1856
  };
1842
1857
  export {
1843
- To as ContentWithNoteWrapper,
1844
- Ce as Highlight,
1845
- at as HighlightError,
1858
+ So as ContentWithNoteWrapper,
1859
+ xe as Highlight,
1860
+ ut as HighlightError,
1846
1861
  Qn as NoteCard,
1847
- ct as NoteChip,
1862
+ ft as NoteChip,
1848
1863
  jn as NoteReactionMenu,
1849
1864
  Kn as NotebookEmptyState,
1850
1865
  Eo as NotebookProvider,
1851
1866
  Hn as NotebookTranslationsProvider,
1852
- So as NotebookTray,
1867
+ To as NotebookTray,
1853
1868
  Co as NotesListView,
1854
- L as REACTION_TYPE,
1869
+ O as REACTION_TYPE,
1855
1870
  xo as SingleNote,
1856
- De as createTransparentColor,
1871
+ Pe as createTransparentColor,
1857
1872
  Vt as useCreateNote,
1858
1873
  Zt as useDeleteNote,
1859
- tt as useGetNotes,
1860
- it as useNotebook,
1861
- V as useNotebookTranslations,
1874
+ rt as useGetNotes,
1875
+ ct as useNotebook,
1876
+ J as useNotebookTranslations,
1862
1877
  vo as useNotesData,
1863
1878
  Io as useReactionFilter,
1864
1879
  en as useUpdateNote