@pdf-viewer/react 1.7.0-beta.0 → 1.7.0-beta.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.
Files changed (49) hide show
  1. package/dist/{RPDefaultLayout-8c323c9f.js → RPDefaultLayout-d6cd2d0c.js} +693 -687
  2. package/dist/assets/PasswordModal.css +1 -1
  3. package/dist/assets/RPDefaultLayout.css +1 -1
  4. package/dist/components/RPController.js +1 -1
  5. package/dist/components/RPPages.js +1 -1
  6. package/dist/components/RPProvider.js +1 -1
  7. package/dist/components/layout/LayoutContainer.js +1 -1
  8. package/dist/components/layout/RPDefaultLayout.js +1 -1
  9. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  10. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  11. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  12. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  13. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  14. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  15. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  16. package/dist/components/layout/toolbar/Paginate.js +1 -1
  17. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  18. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  19. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  20. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  21. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  22. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  23. package/dist/components/page/AnnotationLayer.js +1 -1
  24. package/dist/components/page/CanvasLayer.js +1 -1
  25. package/dist/components/page/DualPage.js +1 -1
  26. package/dist/components/page/RPPage.js +1 -1
  27. package/dist/components/page/SinglePage.js +1 -1
  28. package/dist/components/page/TextHighlightLayer.js +1 -1
  29. package/dist/components/page/TextLayer.js +1 -1
  30. package/dist/components/ui/LoadingIndicator.js +1 -1
  31. package/dist/components/ui/PasswordModal.js +14 -14
  32. package/dist/contexts/PaginationContext.js +1 -1
  33. package/dist/contexts/PrintContext.js +1 -1
  34. package/dist/contexts/SearchContext.js +1 -1
  35. package/dist/contexts/ThumbnailsContext.js +1 -1
  36. package/dist/main.js +1 -1
  37. package/dist/types/utils/types.d.ts +1 -0
  38. package/dist/utils/hooks/useFileDownload.js +1 -1
  39. package/dist/utils/hooks/useLicense.js +1 -1
  40. package/dist/utils/hooks/useLoadPdf.js +21 -25
  41. package/dist/utils/hooks/usePaginate.js +1 -1
  42. package/dist/utils/hooks/usePresentPage.js +1 -1
  43. package/dist/utils/hooks/usePrint.js +1 -1
  44. package/dist/utils/hooks/useScrollToPage.js +1 -1
  45. package/dist/utils/hooks/useSearch.js +1 -1
  46. package/dist/utils/hooks/useThumbnail.js +1 -1
  47. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  48. package/dist/utils/types.js +1 -1
  49. package/package.json +1 -1
@@ -4,7 +4,7 @@ import { useRef as H, useEffect as k, useCallback as N, useState as $, useMemo a
4
4
  import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
5
5
  import { UIButton as re } from "./components/ui/Button.js";
6
6
  import { UIInput as ln } from "./components/ui/Input.js";
7
- import { ViewMode as He, ScrollMode as ee, AnnotationSubType as zt, SelectionMode as tr, ZoomLevel as at } from "./utils/types.js";
7
+ import { ViewMode as He, ScrollMode as ee, AnnotationSubType as At, SelectionMode as tr, ZoomLevel as at } from "./utils/types.js";
8
8
  import { useScrollModeContext as De } from "./contexts/ScrollModeContext.js";
9
9
  import { useDocumentContext as J } from "./contexts/RPDocumentContext.js";
10
10
  import { useDocumentPasswordContext as nr } from "./contexts/DocumentPasswordContext.js";
@@ -12,7 +12,7 @@ import { useDarkModeContext as rr } from "./contexts/DarkModeContext.js";
12
12
  import { useRotationContext as Ge } from "./contexts/RotationContext.js";
13
13
  import { useLayerContext as or } from "./contexts/LayerContext.js";
14
14
  import { useZoomContext as Qe } from "./contexts/ZoomContext.js";
15
- import { useViewModeContext as ze } from "./contexts/ViewModeContext.js";
15
+ import { useViewModeContext as Ae } from "./contexts/ViewModeContext.js";
16
16
  import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
17
17
  import { useVirtualGridContext as dn } from "./contexts/VirtualGridContext.js";
18
18
  import { useSelectionModeContext as ir } from "./contexts/SelectionModeContext.js";
@@ -47,8 +47,8 @@ import { useThemeContext as Pr } from "./contexts/ThemeContext.js";
47
47
  import * as Sr from "pdfjs-dist";
48
48
  import { PixelsPerInch as yr, AnnotationMode as xr, RenderingCancelledException as Ir, AnnotationLayer as Rr } from "pdfjs-dist";
49
49
  import { SimpleLinkService as Lr } from "./utils/link_service.js";
50
- import { annotationsEvents as Er, annotationEventsHandler as Nr, handleClick as At, handleAnnotationWidget as Or, handleAnnotationLink as Dr, bindLayerEvents as zr, unbindLayerEvents as Ft } from "./utils/annotations.js";
51
- import { normalizeSingleKeyword as Ar, sortHighlightPosition as Fr, unwrap as kr } from "./components/page/searchHighlight.js";
50
+ import { annotationsEvents as Er, annotationEventsHandler as Nr, handleClick as zt, handleAnnotationWidget as Or, handleAnnotationLink as Dr, bindLayerEvents as Ar, unbindLayerEvents as Ft } from "./utils/annotations.js";
51
+ import { normalizeSingleKeyword as zr, sortHighlightPosition as Fr, unwrap as kr } from "./components/page/searchHighlight.js";
52
52
  import { _ as Wr, U as Mr } from "./Popover-b7402893.js";
53
53
  import { useMousePressed as Hr } from "./utils/hooks/useMousePressed.js";
54
54
  import { useGrabScroll as $r } from "./utils/hooks/useGrabScroll.js";
@@ -94,14 +94,14 @@ import { UICheckbox as $t } from "./components/ui/Checkbox.js";
94
94
  import { ClearIcon as To } from "./components/icons/ClearIcon.js";
95
95
  import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
96
96
  import './assets/RPDefaultLayout.css';const vn = () => {
97
- const { viewMode: e } = ze(), { scrollMode: t } = De(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: s } = dn(), { widths: u, heights: p } = qe(), m = H(t), v = H(e), h = H(s), { targetScrollPage: _ } = un();
97
+ const { viewMode: e } = Ae(), { scrollMode: t } = De(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), s = H(), { columnCount: l } = dn(), { widths: u, heights: h } = qe(), m = H(t), v = H(e), p = H(l), { targetScrollPage: w } = un();
98
98
  k(() => {
99
- n != null && n.scrollToItem && (l.current = n);
99
+ n != null && n.scrollToItem && (s.current = n);
100
100
  }, [n]), k(() => {
101
101
  m.current = t, v.current = e;
102
102
  }, [t, e]);
103
103
  const T = N(
104
- (C, y) => {
104
+ (C, S) => {
105
105
  if (!r)
106
106
  return;
107
107
  const d = Math.ceil(C / 2) * 2 - 1;
@@ -120,7 +120,7 @@ import './assets/RPDefaultLayout.css';const vn = () => {
120
120
  };
121
121
  return r == null ? void 0 : r.scrollTo({
122
122
  ...f,
123
- behavior: y
123
+ behavior: S
124
124
  });
125
125
  },
126
126
  [r, u, st]
@@ -128,24 +128,24 @@ import './assets/RPDefaultLayout.css';const vn = () => {
128
128
  return k(() => {
129
129
  m.current = t, v.current = e;
130
130
  }, [t, e]), k(() => {
131
- h.current = s;
132
- }, [s]), { scrollToPage: N(
133
- (C, y = "smooth") => {
131
+ p.current = l;
132
+ }, [l]), { scrollToPage: N(
133
+ (C, S = "smooth") => {
134
134
  a(C);
135
135
  const d = C - 1;
136
136
  let f = d, g = 0;
137
137
  if (v.current === He.DUAL_PAGE && m.current === ee.PAGE_SCROLLING) {
138
- T(C, y);
138
+ T(C, S);
139
139
  return;
140
140
  }
141
141
  if (m.current === ee.PAGE_SCROLLING) {
142
142
  a(C);
143
143
  return;
144
144
  }
145
- if (!l.current || !o)
145
+ if (!s.current || !o)
146
146
  return;
147
147
  const c = o;
148
- if (_.current = C, m.current === ee.HORIZONTAL_SCROLLING) {
148
+ if (w.current = C, m.current === ee.HORIZONTAL_SCROLLING) {
149
149
  g = d;
150
150
  const P = {
151
151
  left: Oe(u, g),
@@ -153,73 +153,73 @@ import './assets/RPDefaultLayout.css';const vn = () => {
153
153
  };
154
154
  return c.scrollTo({
155
155
  ...P,
156
- behavior: y
156
+ behavior: S
157
157
  });
158
158
  }
159
159
  if (v.current === He.DUAL_PAGE) {
160
160
  g = d % 2, f = Math.floor(d / 2);
161
161
  const P = {
162
162
  left: Oe(u, g),
163
- top: Oe(p, f)
163
+ top: Oe(h, f)
164
164
  };
165
165
  return c.scrollTo({
166
166
  ...P,
167
- behavior: y
167
+ behavior: S
168
168
  });
169
169
  }
170
170
  const b = {
171
171
  left: 0,
172
- top: Oe(p, f)
172
+ top: Oe(h, f)
173
173
  };
174
174
  return c.scrollTo({
175
175
  ...b,
176
- behavior: y
176
+ behavior: S
177
177
  });
178
178
  },
179
179
  [
180
180
  o,
181
- s,
181
+ l,
182
182
  T,
183
183
  a,
184
184
  st,
185
- p,
185
+ h,
186
186
  u
187
187
  ]
188
188
  ) };
189
189
  }, Po = (e = 1) => {
190
- const [t, n] = $(e), [o, r] = $(0), { scrollToPage: a } = vn(), l = H(1), { viewMode: s } = ze(), { scrollMode: u } = De(), { widths: p } = qe(), { pagesRef: m } = ge(), v = Tt(t, 100), h = N(
190
+ const [t, n] = $(e), [o, r] = $(0), { scrollToPage: a } = vn(), s = H(1), { viewMode: l } = Ae(), { scrollMode: u } = De(), { widths: h } = qe(), { pagesRef: m } = ge(), v = Tt(t, 100), p = N(
191
191
  (d) => {
192
192
  if (!/^[0-9]*$/g.test(d.toString()) || !d)
193
- return { success: !1, currentPage: l.current };
193
+ return { success: !1, currentPage: s.current };
194
194
  const g = +d;
195
- return g < 0 || g > o ? { success: !1, currentPage: l.current } : (n(g), l.current = g, { success: !0, currentPage: +d });
195
+ return g < 0 || g > o ? { success: !1, currentPage: s.current } : (n(g), s.current = g, { success: !0, currentPage: +d });
196
196
  },
197
197
  [o]
198
- ), _ = N(h, [h]), T = N(
198
+ ), w = N(p, [p]), T = N(
199
199
  (d) => {
200
- const f = h(d);
200
+ const f = p(d);
201
201
  return f.success && a(f.currentPage), f;
202
202
  },
203
- [h, a]
204
- ), S = N(() => {
203
+ [p, a]
204
+ ), y = N(() => {
205
205
  let d = t - 1;
206
206
  T(d);
207
- }, [T, t, s, u]), C = W(() => {
207
+ }, [T, t, l, u]), C = W(() => {
208
208
  if (!m)
209
209
  return !1;
210
210
  const d = t + 1;
211
- return t % 2 === 1 && s === He.DUAL_PAGE && d <= o ? p[t] + p[d] < m.clientWidth : !1;
212
- }, [t, p, m, o]), y = N(() => {
211
+ return t % 2 === 1 && l === He.DUAL_PAGE && d <= o ? h[t] + h[d] < m.clientWidth : !1;
212
+ }, [t, h, m, o]), S = N(() => {
213
213
  let d = t + 1;
214
214
  C && (d = t + 2), T(d);
215
- }, [T, t, C, s, u]);
215
+ }, [T, t, C, l, u]);
216
216
  return {
217
217
  focusedPage: v,
218
218
  totalPages: o,
219
- setFocusedPage: _,
219
+ setFocusedPage: w,
220
220
  setTotalPages: r,
221
- nextPage: y,
222
- prevPage: S,
221
+ nextPage: S,
222
+ prevPage: y,
223
223
  goToPage: T
224
224
  };
225
225
  }, wn = Ye({
@@ -238,7 +238,7 @@ import './assets/RPDefaultLayout.css';const vn = () => {
238
238
  const e = Je(wn);
239
239
  return typeof (e == null ? void 0 : e.focusedPage) > "u" && Zr.error("Please use this hooks inside children component of RPProvider"), e;
240
240
  }, Ms = ({ children: e }) => {
241
- const { pdf: t } = J(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: s, prevPage: u } = Po();
241
+ const { pdf: t } = J(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: s, nextPage: l, prevPage: u } = Po();
242
242
  return k(() => {
243
243
  t != null && t.numPages && (a(t.numPages), r(1));
244
244
  }, [t, a, r]), /* @__PURE__ */ i(
@@ -249,9 +249,9 @@ import './assets/RPDefaultLayout.css';const vn = () => {
249
249
  totalPages: o,
250
250
  setFocusedPage: r,
251
251
  setTotalPages: a,
252
- nextPage: s,
252
+ nextPage: l,
253
253
  prevPage: u,
254
- goToPage: l
254
+ goToPage: s
255
255
  },
256
256
  children: e
257
257
  }
@@ -262,7 +262,7 @@ const So = () => {
262
262
  loadedPages: 0,
263
263
  totalPages: 0,
264
264
  percentage: 0
265
- }), [r, a] = $(!1), [l, s] = $(!1), [u, p] = $(null), m = H(!1);
265
+ }), [r, a] = $(!1), [s, l] = $(!1), [u, h] = $(null), m = H(!1);
266
266
  k(() => {
267
267
  m.current;
268
268
  }, [m]);
@@ -270,54 +270,54 @@ const So = () => {
270
270
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
271
271
  const f = document.querySelector(".rp-print-zone");
272
272
  f && f.remove();
273
- }, []), h = N(() => {
274
- m.current = !1, a(!1), s(!1), p(null), o({
273
+ }, []), p = N(() => {
274
+ m.current = !1, a(!1), l(!1), h(null), o({
275
275
  loadedPages: 0,
276
276
  totalPages: 0,
277
277
  percentage: 0
278
278
  });
279
- }, []), _ = () => {
279
+ }, []), w = () => {
280
280
  m.current = !0;
281
281
  }, T = async ({
282
282
  scratchCanvas: f,
283
283
  pdfDocument: g,
284
284
  pageNumber: c,
285
285
  viewerPdfPage: b,
286
- printResolution: w,
286
+ printResolution: _,
287
287
  optionalContentConfigPromise: P,
288
288
  printAnnotationStoragePromise: E
289
289
  }) => {
290
290
  if (m.current) {
291
- h();
291
+ p();
292
292
  return;
293
293
  }
294
- const x = w / yr.PDF;
294
+ const x = _ / yr.PDF;
295
295
  f.width = Math.floor(b.width * x), f.height = Math.floor(b.height * x);
296
296
  const R = f.getContext("2d");
297
297
  R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, f.width, f.height), R.restore();
298
- const [D, z] = await Promise.all([
298
+ const [D, A] = await Promise.all([
299
299
  g.getPage(c),
300
300
  E
301
301
  ]);
302
302
  if (m.current) {
303
- h();
303
+ p();
304
304
  return;
305
305
  }
306
- const A = {
306
+ const z = {
307
307
  canvasContext: R,
308
308
  transform: [x, 0, 0, x, 0, 0],
309
309
  viewport: D.getViewport({ scale: 1, rotation: b.rotation }),
310
310
  intent: "print",
311
311
  annotationMode: xr.ENABLE_STORAGE,
312
312
  optionalContentConfigPromise: P,
313
- printAnnotationStorage: z
313
+ printAnnotationStorage: A
314
314
  };
315
315
  try {
316
- return D.render(A).promise;
316
+ return D.render(z).promise;
317
317
  } catch (L) {
318
318
  throw L instanceof Ir || console.error(L), L;
319
319
  }
320
- }, S = N(() => {
320
+ }, y = N(() => {
321
321
  const f = window.print;
322
322
  return new Promise((g) => {
323
323
  const c = (P) => {
@@ -329,43 +329,43 @@ const So = () => {
329
329
  c(g);
330
330
  return;
331
331
  }
332
- const w = new MutationObserver(() => {
333
- document.querySelector(".rp-print-zone") && (c(g), w.disconnect());
332
+ const _ = new MutationObserver(() => {
333
+ document.querySelector(".rp-print-zone") && (c(g), _.disconnect());
334
334
  });
335
- w.observe(document.body, { childList: !0, subtree: !0 });
335
+ _.observe(document.body, { childList: !0, subtree: !0 });
336
336
  });
337
337
  }, []), C = async (f) => {
338
338
  const g = document.createElement("img"), c = document.createElement("div");
339
- return c.classList.add("rp-print-page"), await new Promise((b, w) => {
339
+ return c.classList.add("rp-print-page"), await new Promise((b, _) => {
340
340
  f.toBlob((P) => {
341
341
  P ? (g.src = URL.createObjectURL(P), g.onload = () => {
342
342
  URL.revokeObjectURL(g.src), b();
343
- }, g.onerror = w) : w(new Error("Failed to create blob"));
343
+ }, g.onerror = _) : _(new Error("Failed to create blob"));
344
344
  });
345
345
  }).catch(() => {
346
346
  }), c.appendChild(g), c;
347
- }, y = (f, g) => {
347
+ }, S = (f, g) => {
348
348
  const c = document.createElement("div");
349
349
  c.classList.add("rp-print-zone");
350
- const b = document.createElement("style"), w = g.get(1);
351
- if (w) {
352
- const { width: P, height: E } = w == null ? void 0 : w.page.getViewport({ scale: 1 });
350
+ const b = document.createElement("style"), _ = g.get(1);
351
+ if (_) {
352
+ const { width: P, height: E } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
353
353
  b.innerHTML = `@page { size: ${P}px ${E}px }`;
354
354
  }
355
355
  return c.appendChild(b), c.append(...f), c;
356
356
  }, d = N(async () => {
357
357
  if (!e)
358
358
  return;
359
- h();
359
+ p();
360
360
  const f = document.createElement("canvas"), g = [];
361
361
  try {
362
362
  e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
363
- const b = e.getOptionalContentConfig({ intent: "print" }), w = Promise.resolve(
363
+ const b = e.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
364
364
  e.annotationStorage.print ?? void 0
365
365
  ), P = t.size;
366
366
  for (const [x, R] of t) {
367
367
  if (m.current) {
368
- h();
368
+ p();
369
369
  return;
370
370
  }
371
371
  const D = R.page.getViewport({ scale: 1 });
@@ -376,45 +376,45 @@ const So = () => {
376
376
  viewerPdfPage: D,
377
377
  printResolution: 150,
378
378
  optionalContentConfigPromise: b,
379
- printAnnotationStoragePromise: w
379
+ printAnnotationStoragePromise: _
380
380
  }), m.current) {
381
- h();
381
+ p();
382
382
  return;
383
383
  }
384
- const z = await C(f);
385
- g.push(z);
386
- const A = parseFloat((g.length / P * 100).toFixed(2));
384
+ const A = await C(f);
385
+ g.push(A);
386
+ const z = parseFloat((g.length / P * 100).toFixed(2));
387
387
  o({
388
388
  loadedPages: x,
389
389
  totalPages: P,
390
- percentage: A
390
+ percentage: z
391
391
  });
392
392
  }
393
393
  if (m.current) {
394
- h();
394
+ p();
395
395
  return;
396
396
  }
397
- const E = y(g, t);
398
- document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await S();
397
+ const E = S(g, t);
398
+ document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await y();
399
399
  } catch (c) {
400
- s(!0), c instanceof Error && p(c);
400
+ l(!0), c instanceof Error && h(c);
401
401
  } finally {
402
402
  f.height = 0, f.width = 0;
403
403
  }
404
404
  }, [e, t, m]);
405
405
  return k(() => {
406
406
  const f = () => {
407
- h(), v();
407
+ p(), v();
408
408
  };
409
409
  return window.addEventListener("afterprint", f, !0), () => {
410
410
  window.removeEventListener("afterprint", f, !0);
411
411
  };
412
- }, [v, h]), {
412
+ }, [v, p]), {
413
413
  print: d,
414
- cancel: _,
414
+ cancel: w,
415
415
  progress: n,
416
416
  isComplete: r,
417
- isError: l,
417
+ isError: s,
418
418
  error: u
419
419
  };
420
420
  }, _n = Ye({
@@ -435,36 +435,36 @@ const So = () => {
435
435
  }
436
436
  }
437
437
  }), Hs = ({ children: e }) => {
438
- const [t, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: s, isComplete: u, isError: p, error: m } = So(), v = N((C) => {
438
+ const [t, n] = $(null), [o, r] = $(null), { print: a, cancel: s, progress: l, isComplete: u, isError: h, error: m } = So(), v = N((C) => {
439
439
  C && typeof C == "function" && r(() => C);
440
- }, []), h = (C) => {
440
+ }, []), p = (C) => {
441
441
  m && C(m);
442
- }, _ = N(
442
+ }, w = N(
443
443
  (C) => {
444
444
  n(() => C);
445
445
  },
446
- [s, t]
446
+ [l, t]
447
447
  );
448
448
  k(() => {
449
449
  u && o && T();
450
450
  }, [u, o]), k(() => {
451
- p && h((C) => {
451
+ h && p((C) => {
452
452
  console.error(C);
453
453
  });
454
- }, [p]), k(() => {
455
- s && t && t(s);
456
- }, [s, t]);
454
+ }, [h]), k(() => {
455
+ l && t && t(l);
456
+ }, [l, t]);
457
457
  const T = () => {
458
458
  o && (o(), r(null));
459
- }, S = {
459
+ }, y = {
460
460
  print: a,
461
- cancel: l,
462
- setOnProgress: _,
461
+ cancel: s,
462
+ setOnProgress: w,
463
463
  setOnComplete: v,
464
- setOnError: h,
465
- progress: s
464
+ setOnError: p,
465
+ progress: l
466
466
  };
467
- return /* @__PURE__ */ i(_n.Provider, { value: S, children: e });
467
+ return /* @__PURE__ */ i(_n.Provider, { value: y, children: e });
468
468
  }, tt = () => {
469
469
  const e = Je(_n);
470
470
  if (!e)
@@ -472,40 +472,40 @@ const So = () => {
472
472
  return e;
473
473
  }, yo = () => {
474
474
  const [e, t] = $({}), { pages: n } = J(), { rotate: o } = Ge(), r = W(() => Object.keys(e).length, [e]), a = N(
475
- (s) => {
476
- if (!n.size || s > n.size)
475
+ (l) => {
476
+ if (!n.size || l > n.size)
477
477
  return;
478
- const u = Array.from(n.values()).slice(0, s).map((v) => {
479
- const { thumbnailViewport: h, scale: _ } = kt(v.page, o);
478
+ const u = Array.from(n.values()).slice(0, l).map((v) => {
479
+ const { thumbnailViewport: p, scale: w } = kt(v.page, o);
480
480
  return {
481
- scale: _,
481
+ scale: w,
482
482
  page: v.page,
483
483
  loading: !0,
484
- viewport: h
484
+ viewport: p
485
485
  };
486
- }), p = u.reduce((v, h) => (v[h.page.pageNumber] = h, v), {});
487
- t(p);
486
+ }), h = u.reduce((v, p) => (v[p.page.pageNumber] = p, v), {});
487
+ t(h);
488
488
  const m = [];
489
489
  for (const v of u) {
490
- const h = document.createElement("canvas"), _ = vt(v.page, h, {
490
+ const p = document.createElement("canvas"), w = vt(v.page, p, {
491
491
  scale: v.scale,
492
492
  rotate: o
493
493
  }).promise.then(() => {
494
- const T = h.toDataURL();
494
+ const T = p.toDataURL();
495
495
  return {
496
496
  ...v,
497
497
  thumbnailSrc: T,
498
498
  loading: !1
499
499
  };
500
500
  });
501
- m.push(_);
501
+ m.push(w);
502
502
  }
503
503
  Promise.all(m).then((v) => {
504
- const h = v.reduce(
505
- (_, T) => (_[T.page.pageNumber] = T, _),
504
+ const p = v.reduce(
505
+ (w, T) => (w[T.page.pageNumber] = T, w),
506
506
  {}
507
507
  );
508
- t((_) => ({ ..._, ...h }));
508
+ t((w) => ({ ...w, ...p }));
509
509
  }).catch(() => {
510
510
  });
511
511
  },
@@ -514,39 +514,39 @@ const So = () => {
514
514
  k(() => {
515
515
  a(10);
516
516
  }, [a]);
517
- const l = N(
518
- (s) => {
517
+ const s = N(
518
+ (l) => {
519
519
  if (!n)
520
520
  return;
521
- const u = n.get(s);
521
+ const u = n.get(l);
522
522
  if (!u)
523
523
  return;
524
524
  t((m) => ({
525
525
  ...m,
526
- [s]: {
526
+ [l]: {
527
527
  loading: !0,
528
528
  page: u.page,
529
529
  viewport: u.thumbnailViewport,
530
530
  scale: u.thumbnailScale
531
531
  }
532
532
  }));
533
- const p = document.createElement("canvas");
534
- vt(u.page, p, { scale: u.thumbnailScale, rotate: o }).promise.then(() => {
535
- const m = p.toDataURL(), { thumbnailViewport: v, scale: h } = kt(u.page, o);
533
+ const h = document.createElement("canvas");
534
+ vt(u.page, h, { scale: u.thumbnailScale, rotate: o }).promise.then(() => {
535
+ const m = h.toDataURL(), { thumbnailViewport: v, scale: p } = kt(u.page, o);
536
536
  return {
537
- scale: h,
537
+ scale: p,
538
538
  thumbnailSrc: m,
539
539
  page: u.page,
540
540
  loading: !1,
541
541
  viewport: v
542
542
  };
543
543
  }).then((m) => {
544
- t((v) => ({ ...v, [s]: m }));
544
+ t((v) => ({ ...v, [l]: m }));
545
545
  });
546
546
  },
547
547
  [n, o]
548
548
  );
549
- return { thumbnailPages: e, addPage: l, addToPage: a, thumbnailLength: r };
549
+ return { thumbnailPages: e, addPage: s, addToPage: a, thumbnailLength: r };
550
550
  }, bn = Ye({
551
551
  thumbnailPages: {},
552
552
  addPage: (e) => {
@@ -561,36 +561,36 @@ const So = () => {
561
561
  children: e,
562
562
  initialThumbnailsVisible: t
563
563
  }) => {
564
- const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = yo(), [l, s] = $(t);
564
+ const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = yo(), [s, l] = $(t);
565
565
  return /* @__PURE__ */ i(
566
566
  bn.Provider,
567
567
  {
568
- value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: l, setActive: s },
568
+ value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: s, setActive: l },
569
569
  children: e
570
570
  }
571
571
  );
572
572
  }, xo = (e = {}, t = "") => {
573
- const [n, o] = $(t), [r, a] = $(!1), { pdf: l, pages: s } = J(), { widths: u, heights: p } = qe(), m = H(!n), { currentZoom: v } = Qe(), [h, _] = $([]), { setFocusedPage: T } = ie(), { columnCount: S } = ze(), { rotate: C } = Ge(), [y, d] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: c } = De(), { pagesRef: b } = ge(), [w, P] = $(null), E = H({}), x = W(() => y === 0 ? null : h[y - 1], [y, h]), R = W(() => h.length, [h]);
573
+ const [n, o] = $(t), [r, a] = $(!1), { pdf: s, pages: l } = J(), { widths: u, heights: h } = qe(), m = H(!n), { currentZoom: v } = Qe(), [p, w] = $([]), { setFocusedPage: T } = ie(), { columnCount: y } = Ae(), { rotate: C } = Ge(), [S, d] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: c } = De(), { pagesRef: b } = ge(), [_, P] = $(null), E = H({}), x = W(() => S === 0 ? null : p[S - 1], [S, p]), R = W(() => p.length, [p]);
574
574
  k(() => {
575
- if (!x || !s)
575
+ if (!x || !l)
576
576
  return;
577
577
  const L = g || f;
578
578
  if (!L || !b)
579
579
  return;
580
- const I = s.get(x.page);
580
+ const I = l.get(x.page);
581
581
  if (c === ee.PAGE_SCROLLING && T(x.page), !I)
582
582
  return;
583
583
  let O = 0, M = 0;
584
584
  if (c === ee.VERTICAL_SCROLLING) {
585
- const ae = x.page - 1, de = S, te = ae % de, Ae = Math.floor(ae / de);
586
- O = Oe(p, Ae), M = Oe(u, te);
585
+ const ae = x.page - 1, de = y, te = ae % de, ze = Math.floor(ae / de);
586
+ O = Oe(h, ze), M = Oe(u, te);
587
587
  }
588
588
  c === ee.HORIZONTAL_SCROLLING && (M = u.slice(0, x.page - 1).reduce((ae, de) => ae + de, 0));
589
589
  const G = {
590
590
  top: b.clientHeight / 2,
591
591
  left: b.clientWidth / 2
592
592
  }, Z = {
593
- height: p[x.page - 1],
593
+ height: h[x.page - 1],
594
594
  width: u[x.page - 1]
595
595
  }, { leftInPage: j, topInPage: U } = Br(
596
596
  Z,
@@ -606,10 +606,10 @@ const So = () => {
606
606
  ...le
607
607
  });
608
608
  }, [
609
- s,
609
+ l,
610
610
  T,
611
611
  u,
612
- p,
612
+ h,
613
613
  x,
614
614
  c,
615
615
  g,
@@ -618,9 +618,9 @@ const So = () => {
618
618
  ]);
619
619
  const D = N(() => {
620
620
  d((L) => R ? L + 1 > R ? 1 : L + 1 : 0);
621
- }, [R]), z = N(() => {
621
+ }, [R]), A = N(() => {
622
622
  d((L) => R ? L - 1 <= 0 ? R : L - 1 : 0);
623
- }, [R]), A = N(async (L) => {
623
+ }, [R]), z = N(async (L) => {
624
624
  if (!L)
625
625
  return {};
626
626
  const I = L.numPages, O = {};
@@ -634,10 +634,10 @@ const So = () => {
634
634
  }, []);
635
635
  return k(() => {
636
636
  if (!n) {
637
- m.current = !0, _([]), d(0);
637
+ m.current = !0, w([]), d(0);
638
638
  return;
639
639
  }
640
- m.current = !1, a(!0), _([]), d(0), A(l).then((L) => {
640
+ m.current = !1, a(!0), w([]), d(0), z(s).then((L) => {
641
641
  E.current = L;
642
642
  const O = Object.keys(L).reduce((M, G) => {
643
643
  const Z = cr(
@@ -648,21 +648,21 @@ const So = () => {
648
648
  ).map((j, U) => ({ ...j, page: Number(G), pageMatchIdx: U }));
649
649
  return [...M, ...Z];
650
650
  }, []);
651
- _(O), d(O.length ? 1 : 0);
651
+ w(O), d(O.length ? 1 : 0);
652
652
  }).catch(() => {
653
- _([]), d(0);
653
+ w([]), d(0);
654
654
  }).finally(() => a(!1));
655
- }, [n, A, l, e]), {
655
+ }, [n, z, s, e]), {
656
656
  search: n,
657
657
  setSearch: o,
658
658
  loading: r,
659
- matches: h,
659
+ matches: p,
660
660
  totalMatches: R,
661
- currentMatchPosition: y,
661
+ currentMatchPosition: S,
662
662
  currentMatch: x,
663
663
  nextMatch: D,
664
- prevMatch: z,
665
- currentMatchElement: w,
664
+ prevMatch: A,
665
+ currentMatchElement: _,
666
666
  setCurrentMatchElement: P
667
667
  };
668
668
  }, Tn = Ye({
@@ -690,14 +690,14 @@ const So = () => {
690
690
  const [n, o] = $({}), {
691
691
  loading: r,
692
692
  setSearch: a,
693
- totalMatches: l,
694
- currentMatchPosition: s,
693
+ totalMatches: s,
694
+ currentMatchPosition: l,
695
695
  currentMatch: u,
696
- search: p,
696
+ search: h,
697
697
  matches: m,
698
698
  nextMatch: v,
699
- prevMatch: h,
700
- currentMatchElement: _,
699
+ prevMatch: p,
700
+ currentMatchElement: w,
701
701
  setCurrentMatchElement: T
702
702
  } = xo(n, t);
703
703
  return /* @__PURE__ */ i(
@@ -708,14 +708,14 @@ const So = () => {
708
708
  setSearchOptions: o,
709
709
  loading: r,
710
710
  setSearch: a,
711
- totalMatches: l,
712
- currentMatchPosition: s,
711
+ totalMatches: s,
712
+ currentMatchPosition: l,
713
713
  currentMatch: u,
714
714
  nextMatch: v,
715
- prevMatch: h,
716
- search: p,
715
+ prevMatch: p,
716
+ search: h,
717
717
  matches: m,
718
- currentMatchElement: _,
718
+ currentMatchElement: w,
719
719
  setCurrentMatchElement: T
720
720
  },
721
721
  children: e
@@ -735,20 +735,20 @@ const So = () => {
735
735
  "rp-page": "_rp-page_h7a2q_1",
736
736
  "rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
737
737
  }, Io = (e) => {
738
- const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = H(null), { pages: a } = J(), { rotate: l } = Ge(), s = H(), { currentZoom: u } = Qe();
738
+ const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = H(null), { pages: a } = J(), { rotate: s } = Ge(), l = H(), { currentZoom: u } = Qe();
739
739
  return k(() => {
740
740
  if (!a || u === 0)
741
741
  return;
742
- const p = a.get(t);
743
- if (r.current && p) {
742
+ const h = a.get(t);
743
+ if (r.current && h) {
744
744
  const m = r.current;
745
745
  m.hidden = !0;
746
- const v = s.current;
747
- v && v.cancel(), o && o(), s.current = vt(p.page, m, {
746
+ const v = l.current;
747
+ v && v.cancel(), o && o(), l.current = vt(h.page, m, {
748
748
  scale: u,
749
- rotate: l,
749
+ rotate: s,
750
750
  renderForms: !0
751
- }), s.current.promise.then(() => {
751
+ }), l.current.promise.then(() => {
752
752
  m.hidden = !1;
753
753
  }).catch(() => {
754
754
  }).finally(() => {
@@ -757,60 +757,60 @@ const So = () => {
757
757
  }
758
758
  return () => {
759
759
  var m;
760
- (m = s.current) == null || m.cancel();
760
+ (m = l.current) == null || m.cancel();
761
761
  };
762
- }, [a, t, l, u, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
762
+ }, [a, t, s, u, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
763
763
  }, Ro = "_selecting_1x8te_9", Lo = "_endOfContent_1x8te_24", he = {
764
764
  "rp-text-layer": "_rp-text-layer_1x8te_1",
765
765
  selecting: Ro,
766
766
  endOfContent: Lo,
767
767
  "rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
768
768
  }, Eo = (e) => {
769
- const { pageNumber: t } = e, { pages: n } = J(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [s, u] = $(
769
+ const { pageNumber: t } = e, { pages: n } = J(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: s } = xt(), [l, u] = $(
770
770
  []
771
- ), p = H(), m = H(), v = H(), h = W(() => r.filter((f) => f.pageIndex === t - 1), [r, t]), _ = N(
771
+ ), h = H(), m = H(), v = H(), p = W(() => r.filter((f) => f.pageIndex === t - 1), [r, t]), w = N(
772
772
  (f, g, c = !1) => {
773
- if (c && lr(f, g), !h.length) {
773
+ if (c && lr(f, g), !p.length) {
774
774
  v.current = void 0, u([]);
775
775
  return;
776
776
  }
777
- const b = dr(h, f, g);
777
+ const b = dr(p, f, g);
778
778
  u(b);
779
779
  },
780
- [h]
781
- ), T = H(), S = H(!1), C = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
780
+ [p]
781
+ ), T = H(), y = H(!1), C = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
782
782
  k(() => ((() => {
783
783
  if (T.current)
784
784
  return;
785
785
  T.current = new AbortController();
786
786
  const { signal: g } = T.current, c = () => {
787
- C().forEach((w) => {
788
- const P = w.querySelector(".endOfContent");
789
- P && (w.appendChild(P), P.style.width = "", P.style.height = "", w.classList.remove(he.selecting));
787
+ C().forEach((_) => {
788
+ const P = _.querySelector(".endOfContent");
789
+ P && (_.appendChild(P), P.style.width = "", P.style.height = "", _.classList.remove(he.selecting));
790
790
  });
791
791
  };
792
792
  document.addEventListener(
793
793
  "pointerdown",
794
794
  () => {
795
- S.current = !0;
795
+ y.current = !0;
796
796
  },
797
797
  { signal: g }
798
798
  ), document.addEventListener(
799
799
  "pointerup",
800
800
  () => {
801
- S.current = !1, c();
801
+ y.current = !1, c();
802
802
  },
803
803
  { signal: g }
804
804
  ), window.addEventListener(
805
805
  "blur",
806
806
  () => {
807
- S.current = !1, c();
807
+ y.current = !1, c();
808
808
  },
809
809
  { signal: g }
810
810
  ), document.addEventListener(
811
811
  "keyup",
812
812
  () => {
813
- S.current || c();
813
+ y.current || c();
814
814
  },
815
815
  { signal: g }
816
816
  );
@@ -818,17 +818,17 @@ const So = () => {
818
818
  document.addEventListener(
819
819
  "selectionchange",
820
820
  () => {
821
- var A, L;
822
- const w = document.getSelection();
823
- if (!w)
821
+ var z, L;
822
+ const _ = document.getSelection();
823
+ if (!_)
824
824
  return;
825
- if (w.rangeCount === 0) {
825
+ if (_.rangeCount === 0) {
826
826
  c();
827
827
  return;
828
828
  }
829
829
  const P = /* @__PURE__ */ new Set();
830
- for (let I = 0; I < w.rangeCount; I++) {
831
- const O = w.getRangeAt(I);
830
+ for (let I = 0; I < _.rangeCount; I++) {
831
+ const O = _.getRangeAt(I);
832
832
  C().forEach((M) => {
833
833
  O.intersectsNode(M) && !P.has(M) && P.add(M);
834
834
  });
@@ -841,13 +841,13 @@ const So = () => {
841
841
  O && (I.appendChild(O), O.style.width = "", O.style.height = "", I.classList.remove(he.selecting));
842
842
  }
843
843
  });
844
- const E = w.getRangeAt(0);
844
+ const E = _.getRangeAt(0);
845
845
  let R = b && (E.compareBoundaryPoints(Range.END_TO_END, b) === 0 || E.compareBoundaryPoints(Range.START_TO_END, b) === 0) ? E.startContainer : E.endContainer;
846
846
  R.nodeType === Node.TEXT_NODE && (R = R.parentNode);
847
- const D = (A = R.parentElement) == null ? void 0 : A.closest(
847
+ const D = (z = R.parentElement) == null ? void 0 : z.closest(
848
848
  he["rp-text-layer"]
849
- ), z = D == null ? void 0 : D.querySelector(".endOfContent");
850
- z && D && (z.style.width = D.style.width, z.style.height = D.style.height, (L = R.parentElement) == null || L.insertBefore(z, R.nextSibling)), b = E.cloneRange();
849
+ ), A = D == null ? void 0 : D.querySelector(".endOfContent");
850
+ A && D && (A.style.width = D.style.width, A.style.height = D.style.height, (L = R.parentElement) == null || L.insertBefore(A, R.nextSibling)), b = E.cloneRange();
851
851
  },
852
852
  { signal: g }
853
853
  );
@@ -855,62 +855,62 @@ const So = () => {
855
855
  var g;
856
856
  (g = T.current) == null || g.abort(), T.current = void 0;
857
857
  }), [C]);
858
- const y = N(() => {
858
+ const S = N(() => {
859
859
  o.current && o.current.classList.add(he.selecting);
860
860
  }, []), d = N(() => {
861
861
  o.current && o.current.classList.remove(he.selecting);
862
862
  }, []);
863
863
  return k(() => {
864
864
  var c;
865
- if ((c = v.current) == null || c.classList.remove("selected"), !s.length || !a || a.pageIndex !== t - 1)
865
+ if ((c = v.current) == null || c.classList.remove("selected"), !l.length || !a || a.pageIndex !== t - 1)
866
866
  return;
867
- const f = h.findIndex(
867
+ const f = p.findIndex(
868
868
  (b) => JSON.stringify(b) === JSON.stringify(a)
869
869
  );
870
870
  if (f === -1)
871
871
  return;
872
- const g = s.find((b) => b.index === f);
873
- g && (v.current = g.element, l(g.element), g.element.classList.add("selected"));
874
- }, [a, s, h]), k(() => {
872
+ const g = l.find((b) => b.index === f);
873
+ g && (v.current = g.element, s(g.element), g.element.classList.add("selected"));
874
+ }, [a, l, p]), k(() => {
875
875
  const f = n.get(t);
876
876
  if (!f || !o.current)
877
877
  return;
878
878
  const g = o.current;
879
- return p.current && p.current.cancel(), f.page.getTextContent().then((c) => {
879
+ return h.current && h.current.cancel(), f.page.getTextContent().then((c) => {
880
880
  const b = f.page.getViewport({ scale: 1 });
881
- return p.current = new Sr.TextLayer({
881
+ return h.current = new Sr.TextLayer({
882
882
  viewport: b,
883
883
  textContentSource: c,
884
884
  container: g
885
- }), m.current = c, g && (g.innerText = ""), p.current.render();
885
+ }), m.current = c, g && (g.innerText = ""), h.current.render();
886
886
  }).then(() => {
887
887
  var P, E;
888
888
  [].slice.call(g.children).forEach((x) => {
889
889
  x.classList.add(he["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
890
890
  });
891
- const b = (P = p.current) == null ? void 0 : P.textDivs;
892
- b && m.current && _(m.current, b);
893
- const w = document.createElement("div");
894
- w.className = "endOfContent", (E = o.current) == null || E.appendChild(w);
891
+ const b = (P = h.current) == null ? void 0 : P.textDivs;
892
+ b && m.current && w(m.current, b);
893
+ const _ = document.createElement("div");
894
+ _.className = "endOfContent", (E = o.current) == null || E.appendChild(_);
895
895
  }).catch(() => {
896
896
  }), () => {
897
897
  var c;
898
- (c = p.current) == null || c.cancel();
898
+ (c = h.current) == null || c.cancel();
899
899
  };
900
900
  }, [n, t]), k(() => {
901
901
  var c;
902
902
  [].slice.call(o.current.children).forEach((b) => {
903
903
  b.classList.add(he["rp-text-layer-text"]);
904
904
  });
905
- const g = (c = p.current) == null ? void 0 : c.textDivs;
906
- g && m.current && _(m.current, g, !0);
907
- }, [_]), /* @__PURE__ */ i(
905
+ const g = (c = h.current) == null ? void 0 : c.textDivs;
906
+ g && m.current && w(m.current, g, !0);
907
+ }, [w]), /* @__PURE__ */ i(
908
908
  "div",
909
909
  {
910
910
  "data-rp": `page-${t}-textLayer`,
911
911
  className: he["rp-text-layer"],
912
912
  ref: o,
913
- onMouseDown: y,
913
+ onMouseDown: S,
914
914
  onMouseUp: d
915
915
  }
916
916
  );
@@ -919,42 +919,42 @@ const So = () => {
919
919
  };
920
920
  let Oo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
921
921
  const Do = (e) => {
922
- const { pageNumber: t } = e, n = H(null), { pages: o, pdf: r } = J(), a = H(), [l, s] = $(), { setFocusedPage: u, goToPage: p } = ie(), { scrollMode: m } = De(), { print: v } = tt(), { download: h } = Hn(), _ = W(() => o.get(t), [o, t]), T = W(() => _ == null ? void 0 : _.page.getViewport(), [_]);
922
+ const { pageNumber: t } = e, n = H(null), { pages: o, pdf: r } = J(), a = H(), [s, l] = $(), { setFocusedPage: u, goToPage: h } = ie(), { scrollMode: m } = De(), { print: v } = tt(), { download: p } = Hn(), w = W(() => o.get(t), [o, t]), T = W(() => w == null ? void 0 : w.page.getViewport(), [w]);
923
923
  k(() => {
924
924
  a.current && (a.current.div.replaceChildren(), a.current = void 0);
925
925
  }, [r]), k(() => {
926
- _ && _.page.getAnnotations().then((C) => {
927
- a.current = void 0, s(C), n.current && (n.current.innerText = "");
926
+ w && w.page.getAnnotations().then((C) => {
927
+ a.current = void 0, l(C), n.current && (n.current.innerText = "");
928
928
  });
929
- }, [_]);
930
- const S = N(
929
+ }, [w]);
930
+ const y = N(
931
931
  (C) => {
932
- !l || !r || (Er(C), Nr(C, r, l).then((y) => {
932
+ !s || !r || (Er(C), Nr(C, r, s).then((S) => {
933
933
  var d, f;
934
- ((d = y == null ? void 0 : y.data) == null ? void 0 : d.action) === "Print" ? v() : ((f = y == null ? void 0 : y.data) == null ? void 0 : f.action) === "SaveAs" && h();
935
- }), m === ee.PAGE_SCROLLING ? At(C, l, r, (y) => u(y.pageIndex + 1)) : At(C, l, r, (y) => p(y.pageIndex + 1)));
934
+ ((d = S == null ? void 0 : S.data) == null ? void 0 : d.action) === "Print" ? v() : ((f = S == null ? void 0 : S.data) == null ? void 0 : f.action) === "SaveAs" && p();
935
+ }), m === ee.PAGE_SCROLLING ? zt(C, s, r, (S) => u(S.pageIndex + 1)) : zt(C, s, r, (S) => h(S.pageIndex + 1)));
936
936
  },
937
- [r, l, p, u, m, v, h]
937
+ [r, s, h, u, m, v, p]
938
938
  );
939
939
  return k(() => {
940
- if (!_ || !l)
940
+ if (!w || !s)
941
941
  return;
942
- const C = _.page.getViewport();
942
+ const C = w.page.getViewport();
943
943
  if (a.current) {
944
944
  a.current.update({
945
945
  viewport: C.clone({ dontFlip: !0 })
946
946
  });
947
947
  return;
948
948
  }
949
- const y = /* @__PURE__ */ new Map([]);
950
- for (const g of l) {
949
+ const S = /* @__PURE__ */ new Map([]);
950
+ for (const g of s) {
951
951
  const { annotationType: c } = g;
952
952
  switch (c) {
953
- case zt.Link:
953
+ case At.Link:
954
954
  Dr(g);
955
955
  break;
956
- case zt.Widget:
957
- Or(g, C, y);
956
+ case At.Widget:
957
+ Or(g, C, S);
958
958
  break;
959
959
  }
960
960
  }
@@ -967,20 +967,20 @@ const Do = (e) => {
967
967
  annotationCanvasMap: void 0,
968
968
  annotationEditorUIManager: void 0,
969
969
  structTreeLayer: null,
970
- page: _.page,
970
+ page: w.page,
971
971
  viewport: C.clone({ dontFlip: !0 })
972
- }), n.current && Ft(n.current, S);
972
+ }), n.current && Ft(n.current, y);
973
973
  const g = await (r == null ? void 0 : r.hasJSActions()), c = await (r == null ? void 0 : r.getFieldObjects());
974
974
  if (d.signal.aborted)
975
975
  throw "abort";
976
976
  return (b = a.current) == null ? void 0 : b.render({
977
- annotations: l,
977
+ annotations: s,
978
978
  annotationStorage: r == null ? void 0 : r.annotationStorage,
979
979
  hasJSActions: g,
980
980
  fieldObjects: c,
981
981
  div: n.current,
982
982
  viewport: C.clone({ dontFlip: !0 }),
983
- page: _.page,
983
+ page: w.page,
984
984
  imageResourcesPath: Oo,
985
985
  renderForms: !0,
986
986
  linkService: new Lr(),
@@ -988,14 +988,14 @@ const Do = (e) => {
988
988
  enableScripting: !1
989
989
  });
990
990
  })().then(() => {
991
- n.current && zr(n.current, S);
991
+ n.current && Ar(n.current, y);
992
992
  }).catch((g) => {
993
993
  if (g !== "abort")
994
994
  throw g;
995
995
  }), () => {
996
- d.abort("clear"), n.current && Ft(n.current, S);
996
+ d.abort("clear"), n.current && Ft(n.current, y);
997
997
  };
998
- }, [r, l, S]), /* @__PURE__ */ i(
998
+ }, [r, s, y]), /* @__PURE__ */ i(
999
999
  "div",
1000
1000
  {
1001
1001
  "data-rp": `page-${t}-annotationLayer`,
@@ -1004,29 +1004,29 @@ const Do = (e) => {
1004
1004
  ref: n
1005
1005
  }
1006
1006
  );
1007
- }, zo = {
1007
+ }, Ao = {
1008
1008
  "rp-text-highlight": "_rp-text-highlight_jdkf8_1"
1009
- }, Ao = ({ pageNumber: e, viewport: t }) => {
1010
- const [n, o] = $(), { pages: r } = J(), { highlightKeywords: a } = pr(), l = !0, s = H(null), [u, p] = $(null), [m, v] = $([]);
1009
+ }, zo = ({ pageNumber: e, viewport: t }) => {
1010
+ const [n, o] = $(), { pages: r } = J(), { highlightKeywords: a } = pr(), s = !0, l = H(null), [u, h] = $(null), [m, v] = $([]);
1011
1011
  k(() => {
1012
- s.current && p(s.current.parentElement);
1013
- }, [s]), k(() => {
1012
+ l.current && h(l.current.parentElement);
1013
+ }, [l]), k(() => {
1014
1014
  (async () => {
1015
1015
  const f = r.get(e);
1016
- if (!f || !s.current)
1016
+ if (!f || !l.current)
1017
1017
  return;
1018
1018
  const g = await f.page.getTextContent();
1019
1019
  o(g);
1020
1020
  })();
1021
1021
  }, [r, e]);
1022
- const h = W(() => a ? a.map((d) => {
1022
+ const p = W(() => a ? a.map((d) => {
1023
1023
  var f, g;
1024
1024
  return {
1025
- ...Ar(d.keyword, (f = d.options) == null ? void 0 : f.matchCase, (g = d.options) == null ? void 0 : g.wholeWords),
1025
+ ...zr(d.keyword, (f = d.options) == null ? void 0 : f.matchCase, (g = d.options) == null ? void 0 : g.wholeWords),
1026
1026
  color: d.highlightColor
1027
1027
  };
1028
1028
  }) : [], [a]);
1029
- function _(d, f) {
1029
+ function w(d, f) {
1030
1030
  if (!d)
1031
1031
  return;
1032
1032
  const g = `[data-rp="page-${f}-textLayer"]`;
@@ -1051,38 +1051,38 @@ const Do = (e) => {
1051
1051
  f(Array.from(g));
1052
1052
  return;
1053
1053
  }
1054
- new MutationObserver((b, w) => {
1054
+ new MutationObserver((b, _) => {
1055
1055
  const P = d.querySelectorAll(
1056
1056
  ".vpv-text-layer-text"
1057
1057
  );
1058
- P.length && (f(Array.from(P)), w.disconnect());
1058
+ P.length && (f(Array.from(P)), _.disconnect());
1059
1059
  }).observe(d, { childList: !0, subtree: !0 });
1060
1060
  });
1061
1061
  }
1062
- const S = (d, f, g, c) => {
1062
+ const y = (d, f, g, c) => {
1063
1063
  var Z;
1064
- const b = document.createRange(), w = g.firstChild;
1065
- if (!w || w.nodeType !== Node.TEXT_NODE)
1064
+ const b = document.createRange(), _ = g.firstChild;
1065
+ if (!_ || _.nodeType !== Node.TEXT_NODE)
1066
1066
  return null;
1067
- const P = ((Z = w.textContent) == null ? void 0 : Z.length) ?? 0, E = c[0].charIdxInSpan, x = c.length === 1 ? E : c[c.length - 1].charIdxInSpan;
1067
+ const P = ((Z = _.textContent) == null ? void 0 : Z.length) ?? 0, E = c[0].charIdxInSpan, x = c.length === 1 ? E : c[c.length - 1].charIdxInSpan;
1068
1068
  if (E > P || x + 1 > P)
1069
1069
  return null;
1070
- b.setStart(w, E), b.setEnd(w, x + 1);
1070
+ b.setStart(_, E), b.setEnd(_, x + 1);
1071
1071
  const R = document.createElement("span");
1072
1072
  R.style.width = "auto", b.surroundContents(R);
1073
- const D = R.getBoundingClientRect(), z = d.getBoundingClientRect(), A = z.height, L = z.width, I = 100 * (D.left - z.left) / L, O = 100 * (D.top - z.top) / A, M = 100 * D.height / A, G = 100 * D.width / L;
1073
+ const D = R.getBoundingClientRect(), A = d.getBoundingClientRect(), z = A.height, L = A.width, I = 100 * (D.left - A.left) / L, O = 100 * (D.top - A.top) / z, M = 100 * D.height / z, G = 100 * D.width / L;
1074
1074
  return kr(R), {
1075
1075
  keywordStr: f,
1076
1076
  left: I,
1077
1077
  top: O,
1078
1078
  height: M,
1079
1079
  width: G,
1080
- pageHeight: A,
1080
+ pageHeight: z,
1081
1081
  pageWidth: L
1082
1082
  };
1083
1083
  };
1084
1084
  async function C(d, f) {
1085
- const g = await _(u, d);
1085
+ const g = await w(u, d);
1086
1086
  if (!g)
1087
1087
  return;
1088
1088
  const c = await T(g);
@@ -1102,18 +1102,18 @@ const Do = (e) => {
1102
1102
  spanIdx: 0
1103
1103
  }
1104
1104
  ]
1105
- ).slice(1), w = y(g, f, c, b);
1106
- v(w);
1105
+ ).slice(1), _ = S(g, f, c, b);
1106
+ v(_);
1107
1107
  }
1108
1108
  }
1109
- const y = (d, f, g, c) => {
1109
+ const S = (d, f, g, c) => {
1110
1110
  const b = f.length;
1111
1111
  if (!c.length || !b)
1112
1112
  return [];
1113
- const w = [], P = c.map((E) => E.char).join("");
1114
- return h.forEach((E) => {
1115
- const { keyword: x, regExp: R, wholeWords: D, color: z } = E, A = x;
1116
- if (!A.trim())
1113
+ const _ = [], P = c.map((E) => E.char).join("");
1114
+ return p.forEach((E) => {
1115
+ const { keyword: x, regExp: R, wholeWords: D, color: A } = E, z = x;
1116
+ if (!z.trim())
1117
1117
  return;
1118
1118
  const L = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1119
1119
  let I;
@@ -1127,7 +1127,7 @@ const Do = (e) => {
1127
1127
  const M = O.map((G) => ({
1128
1128
  keyword: G.keyword,
1129
1129
  indexes: c.slice(G.startIndex, G.endIndex),
1130
- color: z
1130
+ color: A
1131
1131
  }));
1132
1132
  for (const G of M) {
1133
1133
  const Z = G.indexes.reduce(
@@ -1136,21 +1136,21 @@ const Do = (e) => {
1136
1136
  );
1137
1137
  for (const j of Object.values(Z))
1138
1138
  if (j.length !== 1 || j[0].char.trim() !== "") {
1139
- const U = j, Q = g[U[0].spanIdx], X = S(
1139
+ const U = j, Q = g[U[0].spanIdx], X = y(
1140
1140
  d,
1141
- A,
1141
+ z,
1142
1142
  Q,
1143
1143
  U
1144
1144
  );
1145
1145
  if (X) {
1146
1146
  const { left: le, top: ae } = X;
1147
- if (w.find((te) => te.left === le && te.top === ae))
1147
+ if (_.find((te) => te.left === le && te.top === ae))
1148
1148
  continue;
1149
- w.push({ ...X, highlightColor: G.color });
1149
+ _.push({ ...X, highlightColor: G.color });
1150
1150
  }
1151
1151
  }
1152
1152
  }
1153
- }), w.sort(Fr), w;
1153
+ }), _.sort(Fr), _;
1154
1154
  };
1155
1155
  return k(() => {
1156
1156
  (async () => {
@@ -1161,10 +1161,10 @@ const Do = (e) => {
1161
1161
  console.error(f);
1162
1162
  }
1163
1163
  })();
1164
- }, [l, a, e, n, t]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: s, "data-rp": `page-${e}-textHighlightLayer`, children: m.map((d, f) => /* @__PURE__ */ i(
1164
+ }, [s, a, e, n, t]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: l, "data-rp": `page-${e}-textHighlightLayer`, children: m.map((d, f) => /* @__PURE__ */ i(
1165
1165
  "div",
1166
1166
  {
1167
- className: zo["rp-text-highlight"],
1167
+ className: Ao["rp-text-highlight"],
1168
1168
  style: {
1169
1169
  top: `${d.top}%`,
1170
1170
  left: `${d.left}%`,
@@ -1176,42 +1176,42 @@ const Do = (e) => {
1176
1176
  f
1177
1177
  )) }) });
1178
1178
  }, It = $e((e, t) => {
1179
- const { pageNumber: n, style: o, ...r } = e, { pages: a } = J(), { rotate: l } = Ge(), { textLayer: s } = or(), { currentZoom: u } = Qe(), p = H(a.get(n)), [m, v] = $(!1), h = H(null), [_, T] = $({
1179
+ const { pageNumber: n, style: o, ...r } = e, { pages: a } = J(), { rotate: s } = Ge(), { textLayer: l } = or(), { currentZoom: u } = Qe(), h = H(a.get(n)), [m, v] = $(!1), p = H(null), [w, T] = $({
1180
1180
  width: 0,
1181
1181
  height: 0
1182
1182
  });
1183
- cn(t, () => h.current), k(() => {
1184
- if (a && (p.current = a.get(n), p.current)) {
1185
- const d = p.current.page.getViewport({ scale: u, rotation: l });
1183
+ cn(t, () => p.current), k(() => {
1184
+ if (a && (h.current = a.get(n), h.current)) {
1185
+ const d = h.current.page.getViewport({ scale: u, rotation: s });
1186
1186
  T(d);
1187
1187
  }
1188
- }, [a, n, l, u]);
1189
- const S = W(() => {
1190
- switch (l) {
1188
+ }, [a, n, s, u]);
1189
+ const y = W(() => {
1190
+ switch (s) {
1191
1191
  case 90:
1192
- return `${_.width / 2}px ${_.width / 2}px`;
1192
+ return `${w.width / 2}px ${w.width / 2}px`;
1193
1193
  case -90:
1194
1194
  case 270:
1195
- return `${_.height / 2}px ${_.height / 2}px`;
1195
+ return `${w.height / 2}px ${w.height / 2}px`;
1196
1196
  default:
1197
1197
  return "center";
1198
1198
  }
1199
- }, [l, _]), C = N(() => {
1199
+ }, [s, w]), C = N(() => {
1200
1200
  v(!0);
1201
- }, []), y = N(() => {
1201
+ }, []), S = N(() => {
1202
1202
  v(!1);
1203
1203
  }, []);
1204
1204
  return /* @__PURE__ */ i(
1205
1205
  "div",
1206
1206
  {
1207
- ref: h,
1207
+ ref: p,
1208
1208
  id: `page-${n}`,
1209
1209
  "data-rp": `page-${n}`,
1210
1210
  ...r,
1211
1211
  style: {
1212
1212
  ...o,
1213
- "--rp-rotate": `${l}deg`,
1214
- "--rp-page-rotate-translate": `${S}`,
1213
+ "--rp-rotate": `${s}deg`,
1214
+ "--rp-page-rotate-translate": `${y}`,
1215
1215
  "--scale-factor": u
1216
1216
  },
1217
1217
  className: lt["rp-page-wrapper"],
@@ -1219,15 +1219,15 @@ const Do = (e) => {
1219
1219
  "div",
1220
1220
  {
1221
1221
  style: {
1222
- width: `${_.width}px`,
1223
- height: `${_.height}px`
1222
+ width: `${w.width}px`,
1223
+ height: `${w.height}px`
1224
1224
  },
1225
1225
  className: lt["rp-page"],
1226
1226
  children: [
1227
- /* @__PURE__ */ i(Io, { onLoading: C, onLoaded: y, pageNumber: n }),
1227
+ /* @__PURE__ */ i(Io, { onLoading: C, onLoaded: S, pageNumber: n }),
1228
1228
  m && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
1229
- s && /* @__PURE__ */ i(Eo, { pageNumber: n }),
1230
- /* @__PURE__ */ i(Ao, { pageNumber: n, viewport: _ }),
1229
+ l && /* @__PURE__ */ i(Eo, { pageNumber: n }),
1230
+ /* @__PURE__ */ i(zo, { pageNumber: n, viewport: w }),
1231
1231
  /* @__PURE__ */ i(Do, { pageNumber: n })
1232
1232
  ]
1233
1233
  }
@@ -1265,12 +1265,12 @@ function Wo(e, t) {
1265
1265
  function dt(e, t) {
1266
1266
  t === void 0 && (t = Wo);
1267
1267
  var n, o = [], r, a = !1;
1268
- function l() {
1269
- for (var s = [], u = 0; u < arguments.length; u++)
1270
- s[u] = arguments[u];
1271
- return a && n === this && t(s, o) || (r = e.apply(this, s), a = !0, n = this, o = s), r;
1268
+ function s() {
1269
+ for (var l = [], u = 0; u < arguments.length; u++)
1270
+ l[u] = arguments[u];
1271
+ return a && n === this && t(l, o) || (r = e.apply(this, l), a = !0, n = this, o = l), r;
1272
1272
  }
1273
- return l;
1273
+ return s;
1274
1274
  }
1275
1275
  function Ut(e, t) {
1276
1276
  if (e == null)
@@ -1328,12 +1328,12 @@ var Go = 150, qo = function(t) {
1328
1328
  }, Be = null, Ze = null, je = null;
1329
1329
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
1330
1330
  function Vo(e) {
1331
- var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, l = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, u = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, m = e.getRowHeight, v = e.getRowOffset, h = e.getRowStartIndexForOffset, _ = e.getRowStopIndexForStartIndex, T = e.initInstanceProps, S = e.shouldResetStyleCacheOnItemSizeChange, C = e.validateProps;
1332
- return t = /* @__PURE__ */ function(y) {
1333
- Fo(d, y);
1331
+ var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, s = e.getEstimatedTotalHeight, l = e.getEstimatedTotalWidth, u = e.getOffsetForColumnAndAlignment, h = e.getOffsetForRowAndAlignment, m = e.getRowHeight, v = e.getRowOffset, p = e.getRowStartIndexForOffset, w = e.getRowStopIndexForStartIndex, T = e.initInstanceProps, y = e.shouldResetStyleCacheOnItemSizeChange, C = e.validateProps;
1332
+ return t = /* @__PURE__ */ function(S) {
1333
+ Fo(d, S);
1334
1334
  function d(g) {
1335
1335
  var c;
1336
- return c = y.call(this, g) || this, c._instanceProps = T(c.props, qt(c)), c._resetIsScrollingTimeoutId = null, c._outerRef = void 0, c.state = {
1336
+ return c = S.call(this, g) || this, c._instanceProps = T(c.props, qt(c)), c._resetIsScrollingTimeoutId = null, c._outerRef = void 0, c.state = {
1337
1337
  instance: qt(c),
1338
1338
  isScrolling: !1,
1339
1339
  horizontalScrollDirection: "forward",
@@ -1341,47 +1341,47 @@ function Vo(e) {
1341
1341
  scrollTop: typeof c.props.initialScrollTop == "number" ? c.props.initialScrollTop : 0,
1342
1342
  scrollUpdateWasRequested: !1,
1343
1343
  verticalScrollDirection: "forward"
1344
- }, c._callOnItemsRendered = void 0, c._callOnItemsRendered = dt(function(b, w, P, E, x, R, D, z) {
1344
+ }, c._callOnItemsRendered = void 0, c._callOnItemsRendered = dt(function(b, _, P, E, x, R, D, A) {
1345
1345
  return c.props.onItemsRendered({
1346
1346
  overscanColumnStartIndex: b,
1347
- overscanColumnStopIndex: w,
1347
+ overscanColumnStopIndex: _,
1348
1348
  overscanRowStartIndex: P,
1349
1349
  overscanRowStopIndex: E,
1350
1350
  visibleColumnStartIndex: x,
1351
1351
  visibleColumnStopIndex: R,
1352
1352
  visibleRowStartIndex: D,
1353
- visibleRowStopIndex: z
1353
+ visibleRowStopIndex: A
1354
1354
  });
1355
- }), c._callOnScroll = void 0, c._callOnScroll = dt(function(b, w, P, E, x) {
1355
+ }), c._callOnScroll = void 0, c._callOnScroll = dt(function(b, _, P, E, x) {
1356
1356
  return c.props.onScroll({
1357
1357
  horizontalScrollDirection: P,
1358
1358
  scrollLeft: b,
1359
- scrollTop: w,
1359
+ scrollTop: _,
1360
1360
  verticalScrollDirection: E,
1361
1361
  scrollUpdateWasRequested: x
1362
1362
  });
1363
- }), c._getItemStyle = void 0, c._getItemStyle = function(b, w) {
1364
- var P = c.props, E = P.columnWidth, x = P.direction, R = P.rowHeight, D = c._getItemStyleCache(S && E, S && x, S && R), z = b + ":" + w, A;
1365
- if (D.hasOwnProperty(z))
1366
- A = D[z];
1363
+ }), c._getItemStyle = void 0, c._getItemStyle = function(b, _) {
1364
+ var P = c.props, E = P.columnWidth, x = P.direction, R = P.rowHeight, D = c._getItemStyleCache(y && E, y && x, y && R), A = b + ":" + _, z;
1365
+ if (D.hasOwnProperty(A))
1366
+ z = D[A];
1367
1367
  else {
1368
- var L = n(c.props, w, c._instanceProps), I = x === "rtl";
1369
- D[z] = A = {
1368
+ var L = n(c.props, _, c._instanceProps), I = x === "rtl";
1369
+ D[A] = z = {
1370
1370
  position: "absolute",
1371
1371
  left: I ? void 0 : L,
1372
1372
  right: I ? L : void 0,
1373
1373
  top: v(c.props, b, c._instanceProps),
1374
1374
  height: m(c.props, b, c._instanceProps),
1375
- width: a(c.props, w, c._instanceProps)
1375
+ width: a(c.props, _, c._instanceProps)
1376
1376
  };
1377
1377
  }
1378
- return A;
1379
- }, c._getItemStyleCache = void 0, c._getItemStyleCache = dt(function(b, w, P) {
1378
+ return z;
1379
+ }, c._getItemStyleCache = void 0, c._getItemStyleCache = dt(function(b, _, P) {
1380
1380
  return {};
1381
1381
  }), c._onScroll = function(b) {
1382
- var w = b.currentTarget, P = w.clientHeight, E = w.clientWidth, x = w.scrollLeft, R = w.scrollTop, D = w.scrollHeight, z = w.scrollWidth;
1383
- c.setState(function(A) {
1384
- if (A.scrollLeft === x && A.scrollTop === R)
1382
+ var _ = b.currentTarget, P = _.clientHeight, E = _.clientWidth, x = _.scrollLeft, R = _.scrollTop, D = _.scrollHeight, A = _.scrollWidth;
1383
+ c.setState(function(z) {
1384
+ if (z.scrollLeft === x && z.scrollTop === R)
1385
1385
  return null;
1386
1386
  var L = c.props.direction, I = x;
1387
1387
  if (L === "rtl")
@@ -1390,23 +1390,23 @@ function Vo(e) {
1390
1390
  I = -x;
1391
1391
  break;
1392
1392
  case "positive-descending":
1393
- I = z - E - x;
1393
+ I = A - E - x;
1394
1394
  break;
1395
1395
  }
1396
- I = Math.max(0, Math.min(I, z - E));
1396
+ I = Math.max(0, Math.min(I, A - E));
1397
1397
  var O = Math.max(0, Math.min(R, D - P));
1398
1398
  return {
1399
1399
  isScrolling: !0,
1400
- horizontalScrollDirection: A.scrollLeft < x ? "forward" : "backward",
1400
+ horizontalScrollDirection: z.scrollLeft < x ? "forward" : "backward",
1401
1401
  scrollLeft: I,
1402
1402
  scrollTop: O,
1403
- verticalScrollDirection: A.scrollTop < R ? "forward" : "backward",
1403
+ verticalScrollDirection: z.scrollTop < R ? "forward" : "backward",
1404
1404
  scrollUpdateWasRequested: !1
1405
1405
  };
1406
1406
  }, c._resetIsScrollingDebounced);
1407
1407
  }, c._outerRefSetter = function(b) {
1408
- var w = c.props.outerRef;
1409
- c._outerRef = b, typeof w == "function" ? w(b) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = b);
1408
+ var _ = c.props.outerRef;
1409
+ c._outerRef = b, typeof _ == "function" ? _(b) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = b);
1410
1410
  }, c._resetIsScrollingDebounced = function() {
1411
1411
  c._resetIsScrollingTimeoutId !== null && Zt(c._resetIsScrollingTimeoutId), c._resetIsScrollingTimeoutId = Ho(c._resetIsScrolling, Go);
1412
1412
  }, c._resetIsScrolling = function() {
@@ -1422,75 +1422,75 @@ function Vo(e) {
1422
1422
  };
1423
1423
  var f = d.prototype;
1424
1424
  return f.scrollTo = function(c) {
1425
- var b = c.scrollLeft, w = c.scrollTop;
1426
- b !== void 0 && (b = Math.max(0, b)), w !== void 0 && (w = Math.max(0, w)), this.setState(function(P) {
1427
- return b === void 0 && (b = P.scrollLeft), w === void 0 && (w = P.scrollTop), P.scrollLeft === b && P.scrollTop === w ? null : {
1425
+ var b = c.scrollLeft, _ = c.scrollTop;
1426
+ b !== void 0 && (b = Math.max(0, b)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(P) {
1427
+ return b === void 0 && (b = P.scrollLeft), _ === void 0 && (_ = P.scrollTop), P.scrollLeft === b && P.scrollTop === _ ? null : {
1428
1428
  horizontalScrollDirection: P.scrollLeft < b ? "forward" : "backward",
1429
1429
  scrollLeft: b,
1430
- scrollTop: w,
1430
+ scrollTop: _,
1431
1431
  scrollUpdateWasRequested: !0,
1432
- verticalScrollDirection: P.scrollTop < w ? "forward" : "backward"
1432
+ verticalScrollDirection: P.scrollTop < _ ? "forward" : "backward"
1433
1433
  };
1434
1434
  }, this._resetIsScrollingDebounced);
1435
1435
  }, f.scrollToItem = function(c) {
1436
- var b = c.align, w = b === void 0 ? "auto" : b, P = c.columnIndex, E = c.rowIndex, x = this.props, R = x.columnCount, D = x.height, z = x.rowCount, A = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M = $o();
1437
- P !== void 0 && (P = Math.max(0, Math.min(P, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
1438
- var G = l(this.props, this._instanceProps), Z = s(this.props, this._instanceProps), j = Z > A ? M : 0, U = G > D ? M : 0;
1436
+ var b = c.align, _ = b === void 0 ? "auto" : b, P = c.columnIndex, E = c.rowIndex, x = this.props, R = x.columnCount, D = x.height, A = x.rowCount, z = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M = $o();
1437
+ P !== void 0 && (P = Math.max(0, Math.min(P, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, A - 1)));
1438
+ var G = s(this.props, this._instanceProps), Z = l(this.props, this._instanceProps), j = Z > z ? M : 0, U = G > D ? M : 0;
1439
1439
  this.scrollTo({
1440
- scrollLeft: P !== void 0 ? u(this.props, P, w, I, this._instanceProps, U) : I,
1441
- scrollTop: E !== void 0 ? p(this.props, E, w, O, this._instanceProps, j) : O
1440
+ scrollLeft: P !== void 0 ? u(this.props, P, _, I, this._instanceProps, U) : I,
1441
+ scrollTop: E !== void 0 ? h(this.props, E, _, O, this._instanceProps, j) : O
1442
1442
  });
1443
1443
  }, f.componentDidMount = function() {
1444
- var c = this.props, b = c.initialScrollLeft, w = c.initialScrollTop;
1444
+ var c = this.props, b = c.initialScrollLeft, _ = c.initialScrollTop;
1445
1445
  if (this._outerRef != null) {
1446
1446
  var P = this._outerRef;
1447
- typeof b == "number" && (P.scrollLeft = b), typeof w == "number" && (P.scrollTop = w);
1447
+ typeof b == "number" && (P.scrollLeft = b), typeof _ == "number" && (P.scrollTop = _);
1448
1448
  }
1449
1449
  this._callPropsCallbacks();
1450
1450
  }, f.componentDidUpdate = function() {
1451
- var c = this.props.direction, b = this.state, w = b.scrollLeft, P = b.scrollTop, E = b.scrollUpdateWasRequested;
1451
+ var c = this.props.direction, b = this.state, _ = b.scrollLeft, P = b.scrollTop, E = b.scrollUpdateWasRequested;
1452
1452
  if (E && this._outerRef != null) {
1453
1453
  var x = this._outerRef;
1454
1454
  if (c === "rtl")
1455
1455
  switch (jt()) {
1456
1456
  case "negative":
1457
- x.scrollLeft = -w;
1457
+ x.scrollLeft = -_;
1458
1458
  break;
1459
1459
  case "positive-ascending":
1460
- x.scrollLeft = w;
1460
+ x.scrollLeft = _;
1461
1461
  break;
1462
1462
  default:
1463
1463
  var R = x.clientWidth, D = x.scrollWidth;
1464
- x.scrollLeft = D - R - w;
1464
+ x.scrollLeft = D - R - _;
1465
1465
  break;
1466
1466
  }
1467
1467
  else
1468
- x.scrollLeft = Math.max(0, w);
1468
+ x.scrollLeft = Math.max(0, _);
1469
1469
  x.scrollTop = Math.max(0, P);
1470
1470
  }
1471
1471
  this._callPropsCallbacks();
1472
1472
  }, f.componentWillUnmount = function() {
1473
1473
  this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
1474
1474
  }, f.render = function() {
1475
- var c = this.props, b = c.children, w = c.className, P = c.columnCount, E = c.direction, x = c.height, R = c.innerRef, D = c.innerElementType, z = c.innerTagName, A = c.itemData, L = c.itemKey, I = L === void 0 ? qo : L, O = c.outerElementType, M = c.outerTagName, G = c.rowCount, Z = c.style, j = c.useIsScrolling, U = c.width, Q = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Ae = de[1], Re = [];
1475
+ var c = this.props, b = c.children, _ = c.className, P = c.columnCount, E = c.direction, x = c.height, R = c.innerRef, D = c.innerElementType, A = c.innerTagName, z = c.itemData, L = c.itemKey, I = L === void 0 ? qo : L, O = c.outerElementType, M = c.outerTagName, G = c.rowCount, Z = c.style, j = c.useIsScrolling, U = c.width, Q = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], ze = de[1], Re = [];
1476
1476
  if (P > 0 && G)
1477
- for (var Te = te; Te <= Ae; Te++)
1477
+ for (var Te = te; Te <= ze; Te++)
1478
1478
  for (var we = le; we <= ae; we++)
1479
1479
  Re.push(Ue(b, {
1480
1480
  columnIndex: we,
1481
- data: A,
1481
+ data: z,
1482
1482
  isScrolling: j ? Q : void 0,
1483
1483
  key: I({
1484
1484
  columnIndex: we,
1485
- data: A,
1485
+ data: z,
1486
1486
  rowIndex: Te
1487
1487
  }),
1488
1488
  rowIndex: Te,
1489
1489
  style: this._getItemStyle(Te, we)
1490
1490
  }));
1491
- var nt = l(this.props, this._instanceProps), rt = s(this.props, this._instanceProps);
1491
+ var nt = s(this.props, this._instanceProps), rt = l(this.props, this._instanceProps);
1492
1492
  return Ue(O || M || "div", {
1493
- className: w,
1493
+ className: _,
1494
1494
  onScroll: this._onScroll,
1495
1495
  ref: this._outerRefSetter,
1496
1496
  style: Wr({
@@ -1502,7 +1502,7 @@ function Vo(e) {
1502
1502
  willChange: "transform",
1503
1503
  direction: E
1504
1504
  }, Z)
1505
- }, Ue(D || z || "div", {
1505
+ }, Ue(D || A || "div", {
1506
1506
  children: Re,
1507
1507
  ref: R,
1508
1508
  style: {
@@ -1512,26 +1512,26 @@ function Vo(e) {
1512
1512
  }
1513
1513
  }));
1514
1514
  }, f._callPropsCallbacks = function() {
1515
- var c = this.props, b = c.columnCount, w = c.onItemsRendered, P = c.onScroll, E = c.rowCount;
1516
- if (typeof w == "function" && b > 0 && E > 0) {
1517
- var x = this._getHorizontalRangeToRender(), R = x[0], D = x[1], z = x[2], A = x[3], L = this._getVerticalRangeToRender(), I = L[0], O = L[1], M = L[2], G = L[3];
1518
- this._callOnItemsRendered(R, D, I, O, z, A, M, G);
1515
+ var c = this.props, b = c.columnCount, _ = c.onItemsRendered, P = c.onScroll, E = c.rowCount;
1516
+ if (typeof _ == "function" && b > 0 && E > 0) {
1517
+ var x = this._getHorizontalRangeToRender(), R = x[0], D = x[1], A = x[2], z = x[3], L = this._getVerticalRangeToRender(), I = L[0], O = L[1], M = L[2], G = L[3];
1518
+ this._callOnItemsRendered(R, D, I, O, A, z, M, G);
1519
1519
  }
1520
1520
  if (typeof P == "function") {
1521
1521
  var Z = this.state, j = Z.horizontalScrollDirection, U = Z.scrollLeft, Q = Z.scrollTop, X = Z.scrollUpdateWasRequested, le = Z.verticalScrollDirection;
1522
1522
  this._callOnScroll(U, Q, j, le, X);
1523
1523
  }
1524
1524
  }, f._getHorizontalRangeToRender = function() {
1525
- var c = this.props, b = c.columnCount, w = c.overscanColumnCount, P = c.overscanColumnsCount, E = c.overscanCount, x = c.rowCount, R = this.state, D = R.horizontalScrollDirection, z = R.isScrolling, A = R.scrollLeft, L = w || P || E || 1;
1525
+ var c = this.props, b = c.columnCount, _ = c.overscanColumnCount, P = c.overscanColumnsCount, E = c.overscanCount, x = c.rowCount, R = this.state, D = R.horizontalScrollDirection, A = R.isScrolling, z = R.scrollLeft, L = _ || P || E || 1;
1526
1526
  if (b === 0 || x === 0)
1527
1527
  return [0, 0, 0, 0];
1528
- var I = o(this.props, A, this._instanceProps), O = r(this.props, I, A, this._instanceProps), M = !z || D === "backward" ? Math.max(1, L) : 1, G = !z || D === "forward" ? Math.max(1, L) : 1;
1528
+ var I = o(this.props, z, this._instanceProps), O = r(this.props, I, z, this._instanceProps), M = !A || D === "backward" ? Math.max(1, L) : 1, G = !A || D === "forward" ? Math.max(1, L) : 1;
1529
1529
  return [Math.max(0, I - M), Math.max(0, Math.min(b - 1, O + G)), I, O];
1530
1530
  }, f._getVerticalRangeToRender = function() {
1531
- var c = this.props, b = c.columnCount, w = c.overscanCount, P = c.overscanRowCount, E = c.overscanRowsCount, x = c.rowCount, R = this.state, D = R.isScrolling, z = R.verticalScrollDirection, A = R.scrollTop, L = P || E || w || 1;
1531
+ var c = this.props, b = c.columnCount, _ = c.overscanCount, P = c.overscanRowCount, E = c.overscanRowsCount, x = c.rowCount, R = this.state, D = R.isScrolling, A = R.verticalScrollDirection, z = R.scrollTop, L = P || E || _ || 1;
1532
1532
  if (b === 0 || x === 0)
1533
1533
  return [0, 0, 0, 0];
1534
- var I = h(this.props, A, this._instanceProps), O = _(this.props, I, A, this._instanceProps), M = !D || z === "backward" ? Math.max(1, L) : 1, G = !D || z === "forward" ? Math.max(1, L) : 1;
1534
+ var I = p(this.props, z, this._instanceProps), O = w(this.props, I, z, this._instanceProps), M = !D || A === "backward" ? Math.max(1, L) : 1, G = !D || A === "forward" ? Math.max(1, L) : 1;
1535
1535
  return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
1536
1536
  }, d;
1537
1537
  }(Jn), t.defaultProps = {
@@ -1541,9 +1541,9 @@ function Vo(e) {
1541
1541
  }, t;
1542
1542
  }
1543
1543
  var Uo = function(t, n) {
1544
- var o = t.children, r = t.direction, a = t.height, l = t.innerTagName, s = t.outerTagName, u = t.overscanColumnsCount, p = t.overscanCount, m = t.overscanRowsCount, v = t.width, h = n.instance;
1544
+ var o = t.children, r = t.direction, a = t.height, s = t.innerTagName, l = t.outerTagName, u = t.overscanColumnsCount, h = t.overscanCount, m = t.overscanRowsCount, v = t.width, p = n.instance;
1545
1545
  if (process.env.NODE_ENV !== "production") {
1546
- if (typeof p == "number" && Be && !Be.has(h) && (Be.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof m == "number") && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || s != null) && je && !je.has(h) && (je.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1546
+ if (typeof h == "number" && Be && !Be.has(p) && (Be.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof m == "number") && Ze && !Ze.has(p) && (Ze.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (s != null || l != null) && je && !je.has(p) && (je.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1547
1547
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1548
1548
  switch (r) {
1549
1549
  case "ltr":
@@ -1558,31 +1558,31 @@ var Uo = function(t, n) {
1558
1558
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1559
1559
  }
1560
1560
  }, Kt = 50, Pn = function(t, n) {
1561
- var o = t.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, l = n.lastMeasuredRowIndex, s = 0;
1562
- if (l >= o && (l = o - 1), l >= 0) {
1563
- var u = r[l];
1564
- s = u.offset + u.size;
1561
+ var o = t.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, s = n.lastMeasuredRowIndex, l = 0;
1562
+ if (s >= o && (s = o - 1), s >= 0) {
1563
+ var u = r[s];
1564
+ l = u.offset + u.size;
1565
1565
  }
1566
- var p = o - l - 1, m = p * a;
1567
- return s + m;
1566
+ var h = o - s - 1, m = h * a;
1567
+ return l + m;
1568
1568
  }, Sn = function(t, n) {
1569
- var o = t.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, s = 0;
1570
- if (l >= o && (l = o - 1), l >= 0) {
1571
- var u = r[l];
1572
- s = u.offset + u.size;
1569
+ var o = t.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, s = n.lastMeasuredColumnIndex, l = 0;
1570
+ if (s >= o && (s = o - 1), s >= 0) {
1571
+ var u = r[s];
1572
+ l = u.offset + u.size;
1573
1573
  }
1574
- var p = o - l - 1, m = p * a;
1575
- return s + m;
1574
+ var h = o - s - 1, m = h * a;
1575
+ return l + m;
1576
1576
  }, me = function(t, n, o, r) {
1577
- var a, l, s;
1578
- if (t === "column" ? (a = r.columnMetadataMap, l = n.columnWidth, s = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, l = n.rowHeight, s = r.lastMeasuredRowIndex), o > s) {
1577
+ var a, s, l;
1578
+ if (t === "column" ? (a = r.columnMetadataMap, s = n.columnWidth, l = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, s = n.rowHeight, l = r.lastMeasuredRowIndex), o > l) {
1579
1579
  var u = 0;
1580
- if (s >= 0) {
1581
- var p = a[s];
1582
- u = p.offset + p.size;
1580
+ if (l >= 0) {
1581
+ var h = a[l];
1582
+ u = h.offset + h.size;
1583
1583
  }
1584
- for (var m = s + 1; m <= o; m++) {
1585
- var v = l(m);
1584
+ for (var m = l + 1; m <= o; m++) {
1585
+ var v = s(m);
1586
1586
  a[m] = {
1587
1587
  offset: u,
1588
1588
  size: v
@@ -1592,34 +1592,34 @@ var Uo = function(t, n) {
1592
1592
  }
1593
1593
  return a[o];
1594
1594
  }, Xt = function(t, n, o, r) {
1595
- var a, l;
1596
- t === "column" ? (a = o.columnMetadataMap, l = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, l = o.lastMeasuredRowIndex);
1597
- var s = l > 0 ? a[l].offset : 0;
1598
- return s >= r ? yn(t, n, o, l, 0, r) : Bo(t, n, o, Math.max(0, l), r);
1599
- }, yn = function(t, n, o, r, a, l) {
1595
+ var a, s;
1596
+ t === "column" ? (a = o.columnMetadataMap, s = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, s = o.lastMeasuredRowIndex);
1597
+ var l = s > 0 ? a[s].offset : 0;
1598
+ return l >= r ? yn(t, n, o, s, 0, r) : Bo(t, n, o, Math.max(0, s), r);
1599
+ }, yn = function(t, n, o, r, a, s) {
1600
1600
  for (; a <= r; ) {
1601
- var s = a + Math.floor((r - a) / 2), u = me(t, n, s, o).offset;
1602
- if (u === l)
1603
- return s;
1604
- u < l ? a = s + 1 : u > l && (r = s - 1);
1601
+ var l = a + Math.floor((r - a) / 2), u = me(t, n, l, o).offset;
1602
+ if (u === s)
1603
+ return l;
1604
+ u < s ? a = l + 1 : u > s && (r = l - 1);
1605
1605
  }
1606
1606
  return a > 0 ? a - 1 : 0;
1607
1607
  }, Bo = function(t, n, o, r, a) {
1608
- for (var l = t === "column" ? n.columnCount : n.rowCount, s = 1; r < l && me(t, n, r, o).offset < a; )
1609
- r += s, s *= 2;
1610
- return yn(t, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
1611
- }, Yt = function(t, n, o, r, a, l, s) {
1612
- var u = t === "column" ? n.width : n.height, p = me(t, n, o, l), m = t === "column" ? Sn(n, l) : Pn(n, l), v = Math.max(0, Math.min(m - u, p.offset)), h = Math.max(0, p.offset - u + s + p.size);
1613
- switch (r === "smart" && (a >= h - u && a <= v + u ? r = "auto" : r = "center"), r) {
1608
+ for (var s = t === "column" ? n.columnCount : n.rowCount, l = 1; r < s && me(t, n, r, o).offset < a; )
1609
+ r += l, l *= 2;
1610
+ return yn(t, n, o, Math.min(r, s - 1), Math.floor(r / 2), a);
1611
+ }, Yt = function(t, n, o, r, a, s, l) {
1612
+ var u = t === "column" ? n.width : n.height, h = me(t, n, o, s), m = t === "column" ? Sn(n, s) : Pn(n, s), v = Math.max(0, Math.min(m - u, h.offset)), p = Math.max(0, h.offset - u + l + h.size);
1613
+ switch (r === "smart" && (a >= p - u && a <= v + u ? r = "auto" : r = "center"), r) {
1614
1614
  case "start":
1615
1615
  return v;
1616
1616
  case "end":
1617
- return h;
1617
+ return p;
1618
1618
  case "center":
1619
- return Math.round(h + (v - h) / 2);
1619
+ return Math.round(p + (v - p) / 2);
1620
1620
  case "auto":
1621
1621
  default:
1622
- return a >= h && a <= v ? a : h > v || a < h ? h : v;
1622
+ return a >= p && a <= v ? a : p > v || a < p ? p : v;
1623
1623
  }
1624
1624
  }, Zo = /* @__PURE__ */ Vo({
1625
1625
  getColumnOffset: function(t, n, o) {
@@ -1629,8 +1629,8 @@ var Uo = function(t, n) {
1629
1629
  return Xt("column", t, o, n);
1630
1630
  },
1631
1631
  getColumnStopIndexForStartIndex: function(t, n, o, r) {
1632
- for (var a = t.columnCount, l = t.width, s = me("column", t, n, r), u = o + l, p = s.offset + s.size, m = n; m < a - 1 && p < u; )
1633
- m++, p += me("column", t, m, r).size;
1632
+ for (var a = t.columnCount, s = t.width, l = me("column", t, n, r), u = o + s, h = l.offset + l.size, m = n; m < a - 1 && h < u; )
1633
+ m++, h += me("column", t, m, r).size;
1634
1634
  return m;
1635
1635
  },
1636
1636
  getColumnWidth: function(t, n, o) {
@@ -1638,11 +1638,11 @@ var Uo = function(t, n) {
1638
1638
  },
1639
1639
  getEstimatedTotalHeight: Pn,
1640
1640
  getEstimatedTotalWidth: Sn,
1641
- getOffsetForColumnAndAlignment: function(t, n, o, r, a, l) {
1642
- return Yt("column", t, n, o, r, a, l);
1641
+ getOffsetForColumnAndAlignment: function(t, n, o, r, a, s) {
1642
+ return Yt("column", t, n, o, r, a, s);
1643
1643
  },
1644
- getOffsetForRowAndAlignment: function(t, n, o, r, a, l) {
1645
- return Yt("row", t, n, o, r, a, l);
1644
+ getOffsetForRowAndAlignment: function(t, n, o, r, a, s) {
1645
+ return Yt("row", t, n, o, r, a, s);
1646
1646
  },
1647
1647
  getRowOffset: function(t, n, o) {
1648
1648
  return me("row", t, n, o).offset;
@@ -1654,12 +1654,12 @@ var Uo = function(t, n) {
1654
1654
  return Xt("row", t, o, n);
1655
1655
  },
1656
1656
  getRowStopIndexForStartIndex: function(t, n, o, r) {
1657
- for (var a = t.rowCount, l = t.height, s = me("row", t, n, r), u = o + l, p = s.offset + s.size, m = n; m < a - 1 && p < u; )
1658
- m++, p += me("row", t, m, r).size;
1657
+ for (var a = t.rowCount, s = t.height, l = me("row", t, n, r), u = o + s, h = l.offset + l.size, m = n; m < a - 1 && h < u; )
1658
+ m++, h += me("row", t, m, r).size;
1659
1659
  return m;
1660
1660
  },
1661
1661
  initInstanceProps: function(t, n) {
1662
- var o = t, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, l = {
1662
+ var o = t, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, s = {
1663
1663
  columnMetadataMap: {},
1664
1664
  estimatedColumnWidth: r || Kt,
1665
1665
  estimatedRowHeight: a || Kt,
@@ -1667,20 +1667,20 @@ var Uo = function(t, n) {
1667
1667
  lastMeasuredRowIndex: -1,
1668
1668
  rowMetadataMap: {}
1669
1669
  };
1670
- return n.resetAfterColumnIndex = function(s, u) {
1670
+ return n.resetAfterColumnIndex = function(l, u) {
1671
1671
  u === void 0 && (u = !0), n.resetAfterIndices({
1672
- columnIndex: s,
1672
+ columnIndex: l,
1673
1673
  shouldForceUpdate: u
1674
1674
  });
1675
- }, n.resetAfterRowIndex = function(s, u) {
1675
+ }, n.resetAfterRowIndex = function(l, u) {
1676
1676
  u === void 0 && (u = !0), n.resetAfterIndices({
1677
- rowIndex: s,
1677
+ rowIndex: l,
1678
1678
  shouldForceUpdate: u
1679
1679
  });
1680
- }, n.resetAfterIndices = function(s) {
1681
- var u = s.columnIndex, p = s.rowIndex, m = s.shouldForceUpdate, v = m === void 0 ? !0 : m;
1682
- typeof u == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, u - 1)), typeof p == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, p - 1)), n._getItemStyleCache(-1), v && n.forceUpdate();
1683
- }, l;
1680
+ }, n.resetAfterIndices = function(l) {
1681
+ var u = l.columnIndex, h = l.rowIndex, m = l.shouldForceUpdate, v = m === void 0 ? !0 : m;
1682
+ typeof u == "number" && (s.lastMeasuredColumnIndex = Math.min(s.lastMeasuredColumnIndex, u - 1)), typeof h == "number" && (s.lastMeasuredRowIndex = Math.min(s.lastMeasuredRowIndex, h - 1)), n._getItemStyleCache(-1), v && n.forceUpdate();
1683
+ }, s;
1684
1684
  },
1685
1685
  shouldResetStyleCacheOnItemSizeChange: !1,
1686
1686
  validateProps: function(t) {
@@ -1709,25 +1709,31 @@ function Xo(e, t) {
1709
1709
  return !Jt(n, r) && !Jt(o, a);
1710
1710
  }
1711
1711
  const Yo = () => {
1712
- const { viewMode: e } = ze(), { scrollMode: t } = De(), { setColumnCount: n } = dn(), { virtualScrollableElementRef: o } = et(), r = qe(), a = N(
1713
- (_) => r.widths[_] || 0,
1714
- [r.widths]
1715
- ), l = N(
1716
- (_) => r.heights[_] || 0,
1712
+ const { viewMode: e } = Ae(), { scrollMode: t } = De(), { setColumnCount: n } = dn(), { virtualScrollableElementRef: o } = et(), r = qe(), a = W(() => r.heights.length, [r.heights]), s = W(() => t === ee.HORIZONTAL_SCROLLING ? a : e === He.DUAL_PAGE ? 2 : 1, [e, t, t, a, o]), l = W(() => r.widths.reduce((T, y, C) => {
1713
+ const S = C % s;
1714
+ return (!T[S] || y > T[S]) && (T[S] = y), T;
1715
+ }, []), [r.widths, s]), u = N(
1716
+ (w) => {
1717
+ const T = w % l.length;
1718
+ return l[T] || 0;
1719
+ },
1720
+ [l]
1721
+ ), h = N(
1722
+ (w) => r.heights[w] || 0,
1717
1723
  [r.heights]
1718
- ), s = W(() => r.heights.length, [r.heights]), u = W(() => Math.max(...r.widths), [r.widths]), p = W(() => t === ee.HORIZONTAL_SCROLLING ? s : e === He.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, u]);
1724
+ );
1719
1725
  k(() => {
1720
- n(p);
1721
- }, [p, n]);
1722
- const m = W(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(s / p), [p, s, t]), v = W(() => r.heights.reduce((_, T) => _ + T, 0) / r.heights.length || 0, [r]), h = W(() => r.widths.reduce((_, T) => _ + T, 0) / r.heights.length || 0, [r]);
1726
+ n(s);
1727
+ }, [s, n]);
1728
+ const m = W(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(a / s), [s, a, t]), v = W(() => r.heights.reduce((w, T) => w + T, 0) / r.heights.length || 0, [r]), p = W(() => r.widths.reduce((w, T) => w + T, 0) / r.heights.length || 0, [r]);
1723
1729
  return {
1724
1730
  rowCount: m,
1725
- rowHeight: l,
1726
- columnCount: p,
1727
- columnWidth: a,
1731
+ rowHeight: h,
1732
+ columnCount: s,
1733
+ columnWidth: u,
1728
1734
  pageDimension: r,
1729
1735
  estimatedRowHeight: v,
1730
- estimatedColumnWidth: h
1736
+ estimatedColumnWidth: p
1731
1737
  };
1732
1738
  };
1733
1739
  let oe;
@@ -1747,71 +1753,71 @@ ht == null || tn == null ? (_t = pt, bt = function(t) {
1747
1753
  return [n, o];
1748
1754
  });
1749
1755
  function Jo(e) {
1750
- let t, n, o, r, a, l, s;
1756
+ let t, n, o, r, a, s, l;
1751
1757
  const u = typeof document < "u" && document.attachEvent;
1752
1758
  if (!u) {
1753
- l = function(y) {
1754
- const d = y.__resizeTriggers__, f = d.firstElementChild, g = d.lastElementChild, c = f.firstElementChild;
1759
+ s = function(S) {
1760
+ const d = S.__resizeTriggers__, f = d.firstElementChild, g = d.lastElementChild, c = f.firstElementChild;
1755
1761
  g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, c.style.width = f.offsetWidth + 1 + "px", c.style.height = f.offsetHeight + 1 + "px", f.scrollLeft = f.scrollWidth, f.scrollTop = f.scrollHeight;
1756
- }, a = function(y) {
1757
- return y.offsetWidth !== y.__resizeLast__.width || y.offsetHeight !== y.__resizeLast__.height;
1758
- }, s = function(y) {
1759
- if (y.target.className && typeof y.target.className.indexOf == "function" && y.target.className.indexOf("contract-trigger") < 0 && y.target.className.indexOf("expand-trigger") < 0)
1762
+ }, a = function(S) {
1763
+ return S.offsetWidth !== S.__resizeLast__.width || S.offsetHeight !== S.__resizeLast__.height;
1764
+ }, l = function(S) {
1765
+ if (S.target.className && typeof S.target.className.indexOf == "function" && S.target.className.indexOf("contract-trigger") < 0 && S.target.className.indexOf("expand-trigger") < 0)
1760
1766
  return;
1761
1767
  const d = this;
1762
- l(this), this.__resizeRAF__ && _t(this.__resizeRAF__), this.__resizeRAF__ = bt(function() {
1768
+ s(this), this.__resizeRAF__ && _t(this.__resizeRAF__), this.__resizeRAF__ = bt(function() {
1763
1769
  a(d) && (d.__resizeLast__.width = d.offsetWidth, d.__resizeLast__.height = d.offsetHeight, d.__resizeListeners__.forEach(function(c) {
1764
- c.call(d, y);
1770
+ c.call(d, S);
1765
1771
  }));
1766
1772
  });
1767
1773
  };
1768
- let h = !1, _ = "";
1774
+ let p = !1, w = "";
1769
1775
  o = "animationstart";
1770
1776
  const T = "Webkit Moz O ms".split(" ");
1771
- let S = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), C = "";
1777
+ let y = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), C = "";
1772
1778
  {
1773
- const y = document.createElement("fakeelement");
1774
- if (y.style.animationName !== void 0 && (h = !0), h === !1) {
1779
+ const S = document.createElement("fakeelement");
1780
+ if (S.style.animationName !== void 0 && (p = !0), p === !1) {
1775
1781
  for (let d = 0; d < T.length; d++)
1776
- if (y.style[T[d] + "AnimationName"] !== void 0) {
1777
- C = T[d], _ = "-" + C.toLowerCase() + "-", o = S[d], h = !0;
1782
+ if (S.style[T[d] + "AnimationName"] !== void 0) {
1783
+ C = T[d], w = "-" + C.toLowerCase() + "-", o = y[d], p = !0;
1778
1784
  break;
1779
1785
  }
1780
1786
  }
1781
1787
  }
1782
- n = "resizeanim", t = "@" + _ + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = _ + "animation: 1ms " + n + "; ";
1788
+ n = "resizeanim", t = "@" + w + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = w + "animation: 1ms " + n + "; ";
1783
1789
  }
1784
- const p = function(h) {
1785
- if (!h.getElementById("detectElementResize")) {
1786
- const _ = (t || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', T = h.head || h.getElementsByTagName("head")[0], S = h.createElement("style");
1787
- S.id = "detectElementResize", S.type = "text/css", e != null && S.setAttribute("nonce", e), S.styleSheet ? S.styleSheet.cssText = _ : S.appendChild(h.createTextNode(_)), T.appendChild(S);
1790
+ const h = function(p) {
1791
+ if (!p.getElementById("detectElementResize")) {
1792
+ const w = (t || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', T = p.head || p.getElementsByTagName("head")[0], y = p.createElement("style");
1793
+ y.id = "detectElementResize", y.type = "text/css", e != null && y.setAttribute("nonce", e), y.styleSheet ? y.styleSheet.cssText = w : y.appendChild(p.createTextNode(w)), T.appendChild(y);
1788
1794
  }
1789
1795
  };
1790
1796
  return {
1791
- addResizeListener: function(h, _) {
1797
+ addResizeListener: function(p, w) {
1792
1798
  if (u)
1793
- h.attachEvent("onresize", _);
1799
+ p.attachEvent("onresize", w);
1794
1800
  else {
1795
- if (!h.__resizeTriggers__) {
1796
- const T = h.ownerDocument, S = oe.getComputedStyle(h);
1797
- S && S.position === "static" && (h.style.position = "relative"), p(T), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = T.createElement("div")).className = "resize-triggers";
1801
+ if (!p.__resizeTriggers__) {
1802
+ const T = p.ownerDocument, y = oe.getComputedStyle(p);
1803
+ y && y.position === "static" && (p.style.position = "relative"), h(T), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = T.createElement("div")).className = "resize-triggers";
1798
1804
  const C = T.createElement("div");
1799
1805
  C.className = "expand-trigger", C.appendChild(T.createElement("div"));
1800
- const y = T.createElement("div");
1801
- y.className = "contract-trigger", h.__resizeTriggers__.appendChild(C), h.__resizeTriggers__.appendChild(y), h.appendChild(h.__resizeTriggers__), l(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(f) {
1802
- f.animationName === n && l(h);
1803
- }, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
1806
+ const S = T.createElement("div");
1807
+ S.className = "contract-trigger", p.__resizeTriggers__.appendChild(C), p.__resizeTriggers__.appendChild(S), p.appendChild(p.__resizeTriggers__), s(p), p.addEventListener("scroll", l, !0), o && (p.__resizeTriggers__.__animationListener__ = function(f) {
1808
+ f.animationName === n && s(p);
1809
+ }, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
1804
1810
  }
1805
- h.__resizeListeners__.push(_);
1811
+ p.__resizeListeners__.push(w);
1806
1812
  }
1807
1813
  },
1808
- removeResizeListener: function(h, _) {
1814
+ removeResizeListener: function(p, w) {
1809
1815
  if (u)
1810
- h.detachEvent("onresize", _);
1811
- else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(_), 1), !h.__resizeListeners__.length) {
1812
- h.removeEventListener("scroll", s, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
1816
+ p.detachEvent("onresize", w);
1817
+ else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(w), 1), !p.__resizeListeners__.length) {
1818
+ p.removeEventListener("scroll", l, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(o, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
1813
1819
  try {
1814
- h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
1820
+ p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
1815
1821
  } catch {
1816
1822
  }
1817
1823
  }
@@ -1833,16 +1839,16 @@ class Qo extends Qn {
1833
1839
  onResize: r
1834
1840
  } = this.props;
1835
1841
  if (this._parentNode) {
1836
- const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), p = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), v = m.height - u - p, h = m.width - l - s, _ = this._parentNode.offsetHeight - u - p, T = this._parentNode.offsetWidth - l - s;
1837
- (!n && (this.state.height !== _ || this.state.scaledHeight !== v) || !o && (this.state.width !== T || this.state.scaledWidth !== h)) && (this.setState({
1838
- height: _,
1842
+ const a = window.getComputedStyle(this._parentNode) || {}, s = parseFloat(a.paddingLeft || "0"), l = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), h = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), v = m.height - u - h, p = m.width - s - l, w = this._parentNode.offsetHeight - u - h, T = this._parentNode.offsetWidth - s - l;
1843
+ (!n && (this.state.height !== w || this.state.scaledHeight !== v) || !o && (this.state.width !== T || this.state.scaledWidth !== p)) && (this.setState({
1844
+ height: w,
1839
1845
  width: T,
1840
1846
  scaledHeight: v,
1841
- scaledWidth: h
1847
+ scaledWidth: p
1842
1848
  }), typeof r == "function" && r({
1843
- height: _,
1849
+ height: w,
1844
1850
  scaledHeight: v,
1845
- scaledWidth: h,
1851
+ scaledWidth: p,
1846
1852
  width: T
1847
1853
  }));
1848
1854
  }
@@ -1872,39 +1878,39 @@ class Qo extends Qn {
1872
1878
  defaultWidth: o,
1873
1879
  disableHeight: r = !1,
1874
1880
  disableWidth: a = !1,
1875
- doNotBailOutOnEmptyChildren: l = !1,
1876
- nonce: s,
1881
+ doNotBailOutOnEmptyChildren: s = !1,
1882
+ nonce: l,
1877
1883
  onResize: u,
1878
- style: p = {},
1884
+ style: h = {},
1879
1885
  tagName: m = "div",
1880
1886
  ...v
1881
1887
  } = this.props, {
1882
- height: h,
1883
- scaledHeight: _,
1888
+ height: p,
1889
+ scaledHeight: w,
1884
1890
  scaledWidth: T,
1885
- width: S
1891
+ width: y
1886
1892
  } = this.state, C = {
1887
1893
  overflow: "visible"
1888
- }, y = {};
1894
+ }, S = {};
1889
1895
  let d = !1;
1890
- return r || (h === 0 && (d = !0), C.height = 0, y.height = h, y.scaledHeight = _), a || (S === 0 && (d = !0), C.width = 0, y.width = S, y.scaledWidth = T), l && (d = !1), Ue(m, {
1896
+ return r || (p === 0 && (d = !0), C.height = 0, S.height = p, S.scaledHeight = w), a || (y === 0 && (d = !0), C.width = 0, S.width = y, S.scaledWidth = T), s && (d = !1), Ue(m, {
1891
1897
  ref: this._setRef,
1892
1898
  style: {
1893
1899
  ...C,
1894
- ...p
1900
+ ...h
1895
1901
  },
1896
1902
  ...v
1897
- }, !d && t(y));
1903
+ }, !d && t(S));
1898
1904
  }
1899
1905
  }
1900
1906
  const ei = ({ widths: e, heights: t }) => {
1901
1907
  const { focusedPage: n, totalPages: o } = ie(), r = W(() => {
1902
- const s = [], u = Math.ceil(n / 2) * 2 - 1;
1903
- if (s.push(u), u + 1 < o) {
1904
- const p = u + 1;
1905
- s.push(p);
1908
+ const l = [], u = Math.ceil(n / 2) * 2 - 1;
1909
+ if (l.push(u), u + 1 < o) {
1910
+ const h = u + 1;
1911
+ l.push(h);
1906
1912
  }
1907
- return s;
1913
+ return l;
1908
1914
  }, [n, o]), a = W(() => [
1909
1915
  {
1910
1916
  position: "absolute",
@@ -1919,8 +1925,8 @@ const ei = ({ widths: e, heights: t }) => {
1919
1925
  width: e(n),
1920
1926
  height: t(n)
1921
1927
  }
1922
- ], [e, t, r]), l = W(() => a.reduce((s, u) => s + Number(u.width || 0), 0), [a]);
1923
- return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((s, u) => /* @__PURE__ */ i(It, { style: a[u], pageNumber: s }, s)) });
1928
+ ], [e, t, r]), s = W(() => a.reduce((l, u) => l + Number(u.width || 0), 0), [a]);
1929
+ return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: r.map((l, u) => /* @__PURE__ */ i(It, { style: a[u], pageNumber: l }, l)) });
1924
1930
  }, ti = ({ widths: e, heights: t }) => {
1925
1931
  const { focusedPage: n } = ie(), o = W(() => ({
1926
1932
  position: "absolute",
@@ -1938,11 +1944,11 @@ const ei = ({ widths: e, heights: t }) => {
1938
1944
  }
1939
1945
  );
1940
1946
  }, ni = (e, t, n) => {
1941
- const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = qe(), { setFocusedPage: s } = ie(), [u, p] = $([]), { targetScrollPage: m } = un(), v = Tt(u, 0, 500), h = W(() => a.map((T, S) => {
1942
- const C = l[S], y = Vr(S + 1, e), d = C * y.columnIndex, f = T * y.rowIndex, g = d + C, c = f + T;
1947
+ const o = H(), { contentRef: r } = ge(), { heights: a, widths: s } = qe(), { setFocusedPage: l } = ie(), [u, h] = $([]), { targetScrollPage: m } = un(), v = Tt(u, 0, 500), p = W(() => a.map((T, y) => {
1948
+ const C = s[y], S = Vr(y + 1, e), d = C * S.columnIndex, f = T * S.rowIndex, g = d + C, c = f + T;
1943
1949
  return {
1944
- pageNumber: S + 1,
1945
- ...y,
1950
+ pageNumber: y + 1,
1951
+ ...S,
1946
1952
  width: C,
1947
1953
  height: T,
1948
1954
  startX: d,
@@ -1950,71 +1956,71 @@ const ei = ({ widths: e, heights: t }) => {
1950
1956
  endX: g,
1951
1957
  endY: c
1952
1958
  };
1953
- }), [a, l, e, t]);
1959
+ }), [a, s, e, t]);
1954
1960
  k(() => {
1955
- var S;
1956
- v.length > 0 && !m.current && s(v[0].pageNumber);
1957
- let T = (S = v[0]) == null ? void 0 : S.ratio;
1961
+ var y;
1962
+ v.length > 0 && !m.current && l(v[0].pageNumber);
1963
+ let T = (y = v[0]) == null ? void 0 : y.ratio;
1958
1964
  T && v.filter((C) => Math.round(C.ratio) === Math.round(T)).some((C) => C.pageNumber === m.current) && setTimeout(() => {
1959
1965
  m.current = void 0;
1960
1966
  }, 500);
1961
- }, [v, s]);
1962
- const _ = N(
1967
+ }, [v, l]);
1968
+ const w = N(
1963
1969
  (T) => {
1964
1970
  o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
1965
- const S = T.target, C = {
1966
- startTop: S.scrollTop,
1967
- startLeft: S.scrollLeft,
1968
- endTop: S.scrollTop + S.clientHeight,
1969
- endLeft: S.scrollLeft + S.clientWidth
1970
- }, y = h.filter((d) => {
1971
+ const y = T.target, C = {
1972
+ startTop: y.scrollTop,
1973
+ startLeft: y.scrollLeft,
1974
+ endTop: y.scrollTop + y.clientHeight,
1975
+ endLeft: y.scrollLeft + y.clientWidth
1976
+ }, S = p.filter((d) => {
1971
1977
  const f = d.endX >= C.startLeft && d.endY >= C.startTop, g = d.startX <= C.endLeft && d.startY <= C.endTop;
1972
1978
  return f && g;
1973
1979
  }).map((d) => {
1974
- const f = C.startLeft > d.startX ? C.startLeft : d.startX, g = C.startTop > d.startY ? C.startTop : d.startY, c = C.endLeft < d.endX ? C.endLeft : d.endX, b = C.endTop < d.endY ? C.endTop : d.endY, w = c - f, P = b - g, x = +(w * P / (d.width * d.height) * 100).toFixed(2);
1980
+ const f = C.startLeft > d.startX ? C.startLeft : d.startX, g = C.startTop > d.startY ? C.startTop : d.startY, c = C.endLeft < d.endX ? C.endLeft : d.endX, b = C.endTop < d.endY ? C.endTop : d.endY, _ = c - f, P = b - g, x = +(_ * P / (d.width * d.height) * 100).toFixed(2);
1975
1981
  return {
1976
1982
  pageNumber: d.pageNumber,
1977
1983
  ratio: x
1978
1984
  };
1979
1985
  }).sort((d, f) => f.ratio - d.ratio);
1980
- p(y);
1986
+ h(S);
1981
1987
  });
1982
1988
  },
1983
- [r, h]
1989
+ [r, p]
1984
1990
  );
1985
1991
  k(() => {
1986
1992
  if (n)
1987
- return n == null || n.addEventListener("scroll", _), () => {
1988
- n == null || n.removeEventListener("scroll", _);
1993
+ return n == null || n.addEventListener("scroll", w), () => {
1994
+ n == null || n.removeEventListener("scroll", w);
1989
1995
  };
1990
- }, [n, _]);
1996
+ }, [n, w]);
1991
1997
  }, ri = er(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
1992
1998
  const r = Ur(t, e, n.columnCount);
1993
1999
  return /* @__PURE__ */ i(It, { style: o, pageNumber: r }, r);
1994
2000
  }, Xo), qs = () => {
1995
2001
  const { initialPage: e = 1, initialScrollMode: t, instanceId: n } = ar(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: a } = vn(), {
1996
- virtualScrollRef: l,
1997
- getVirtualScrollRef: s,
2002
+ virtualScrollRef: s,
2003
+ getVirtualScrollRef: l,
1998
2004
  getPageScrollElementRef: u,
1999
- getVirtualScrollableElementRef: p,
2005
+ getVirtualScrollableElementRef: h,
2000
2006
  setTotalInnerDimensions: m,
2001
2007
  virtualScrollableElementRef: v,
2002
- totalInnerDimensions: h,
2003
- pageScrollElementRef: _
2004
- } = et(), T = H(!0), { nextPage: S, prevPage: C, setFocusedPage: y, focusedPage: d } = ie(), { scrollMode: f } = De(), { viewMode: g } = ze(), c = H(null), { loading: b } = J(), { passwordRequired: w } = nr(), { LoaderImageComponent: P } = pn(), E = H(
2005
- h
2008
+ totalInnerDimensions: p,
2009
+ pageScrollElementRef: w
2010
+ } = et(), T = H(!0), { nextPage: y, prevPage: C, setFocusedPage: S, focusedPage: d } = ie(), { scrollMode: f } = De(), { viewMode: g } = Ae(), c = H(null), { loading: b } = J(), { passwordRequired: _ } = nr(), { LoaderImageComponent: P } = pn(), E = H(
2011
+ p
2006
2012
  ), x = H({
2007
2013
  viewMode: g,
2008
2014
  scrollMode: f
2009
- }), R = H(!1), D = H(), { isFullScreen: z } = sr(), {
2010
- pageDimension: A,
2015
+ }), R = H(!1), D = H(), { isFullScreen: A } = sr(), {
2016
+ pageDimension: z,
2011
2017
  rowCount: L,
2012
2018
  rowHeight: I,
2013
2019
  columnCount: O,
2014
2020
  columnWidth: M,
2015
2021
  estimatedColumnWidth: G,
2016
2022
  estimatedRowHeight: Z
2017
- } = Yo(), j = Tt(h, 100), U = H();
2023
+ } = Yo(), j = Tt(p, 100), U = H();
2018
2024
  ni(O, L, v);
2019
2025
  const Q = H({
2020
2026
  scrollTop: 0,
@@ -2023,27 +2029,27 @@ const ei = ({ widths: e, heights: t }) => {
2023
2029
  Gr(o);
2024
2030
  const { isPressed: X } = Hr(), { selectionMode: le } = ir(), { initializeGrabScroll: ae, resetGrabState: de } = $r({
2025
2031
  isPressed: X
2026
- }), te = W(() => le === tr.HAND, [le]), Ae = W(() => ({
2032
+ }), te = W(() => le === tr.HAND, [le]), ze = W(() => ({
2027
2033
  columnCount: O
2028
2034
  }), [O]), Re = N(
2029
2035
  (q) => {
2030
2036
  const V = document.activeElement !== o;
2031
- !z && V || (["ArrowUp", "ArrowLeft"].includes(q.key) ? (q.preventDefault(), C()) : ["ArrowDown", "ArrowRight"].includes(q.key) && (q.preventDefault(), S()));
2037
+ !A && V || (["ArrowUp", "ArrowLeft"].includes(q.key) ? (q.preventDefault(), C()) : ["ArrowDown", "ArrowRight"].includes(q.key) && (q.preventDefault(), y()));
2032
2038
  },
2033
- [S, C, z, f]
2039
+ [y, C, A, f]
2034
2040
  );
2035
2041
  k(() => (window.addEventListener("keydown", Re), () => {
2036
2042
  window.removeEventListener("keydown", Re);
2037
2043
  }), [Re]), k(() => {
2038
- if (c.current && (c.current.style.position = "relative"), !!l)
2044
+ if (c.current && (c.current.style.position = "relative"), !!s)
2039
2045
  for (let q = 0; q < L; q++)
2040
2046
  for (let V = 0; V < O; V++)
2041
- l.resetAfterIndices({
2047
+ s.resetAfterIndices({
2042
2048
  columnIndex: V,
2043
2049
  rowIndex: q,
2044
2050
  shouldForceUpdate: !0
2045
2051
  });
2046
- }, [L, O, A, l]);
2052
+ }, [L, O, z, s]);
2047
2053
  const Te = N(
2048
2054
  (q, V) => {
2049
2055
  if (!v)
@@ -2075,7 +2081,7 @@ const ei = ({ widths: e, heights: t }) => {
2075
2081
  const jn = Se / Ot * ye, Kn = ot / Dt * it, Xn = Math.round(Math.min(jn, ye)) || 0, Yn = Math.round(Math.min(Kn, it)) || 0;
2076
2082
  D.current = setTimeout(() => {
2077
2083
  requestAnimationFrame(() => {
2078
- l == null || l.scrollTo({
2084
+ s == null || s.scrollTo({
2079
2085
  scrollTop: Xn,
2080
2086
  scrollLeft: Yn
2081
2087
  });
@@ -2085,7 +2091,7 @@ const ei = ({ widths: e, heights: t }) => {
2085
2091
  width: V.width
2086
2092
  };
2087
2093
  },
2088
- [l, g, f, a]
2094
+ [s, g, f, a]
2089
2095
  );
2090
2096
  k(() => {
2091
2097
  clearTimeout(D.current);
@@ -2100,7 +2106,7 @@ const ei = ({ widths: e, heights: t }) => {
2100
2106
  height: q,
2101
2107
  width: V
2102
2108
  });
2103
- }, [A, L, O, we]);
2109
+ }, [z, L, O, we]);
2104
2110
  const nt = N(
2105
2111
  (q) => {
2106
2112
  Q.current = {
@@ -2130,16 +2136,16 @@ const ei = ({ widths: e, heights: t }) => {
2130
2136
  }, [b]), k(() => {
2131
2137
  if (!(j.height === 0 || !T.current)) {
2132
2138
  if (t === ee.PAGE_SCROLLING) {
2133
- e !== d && _ && y(e), T.current = !1;
2139
+ e !== d && w && S(e), T.current = !1;
2134
2140
  return;
2135
2141
  }
2136
- a(e, "auto"), y(e), T.current = !1;
2142
+ a(e, "auto"), S(e), T.current = !1;
2137
2143
  }
2138
2144
  }, [
2139
2145
  a,
2140
2146
  t,
2141
- _,
2142
- y,
2147
+ w,
2148
+ S,
2143
2149
  j
2144
2150
  ]), /* @__PURE__ */ F(fe, { children: [
2145
2151
  /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Qo, { style: { minHeight: "50px" }, children: ({ width: q, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Zn, style: { width: q, height: V }, children: f === ee.PAGE_SCROLLING ? /* @__PURE__ */ i(
@@ -2153,9 +2159,9 @@ const ei = ({ widths: e, heights: t }) => {
2153
2159
  ) : G ? /* @__PURE__ */ i(
2154
2160
  Zo,
2155
2161
  {
2156
- ref: s,
2157
- itemData: Ae,
2158
- outerRef: p,
2162
+ ref: l,
2163
+ itemData: ze,
2164
+ outerRef: h,
2159
2165
  innerRef: c,
2160
2166
  onScroll: nt,
2161
2167
  columnCount: O,
@@ -2186,7 +2192,7 @@ const ei = ({ widths: e, heights: t }) => {
2186
2192
  children: P && /* @__PURE__ */ i(P, {})
2187
2193
  }
2188
2194
  ) }) }) }),
2189
- w && /* @__PURE__ */ i(qr, {})
2195
+ _ && /* @__PURE__ */ i(qr, {})
2190
2196
  ] });
2191
2197
  }, Fe = {
2192
2198
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
@@ -2205,23 +2211,23 @@ const ei = ({ widths: e, heights: t }) => {
2205
2211
  const { nextIcon: e } = pe();
2206
2212
  return e || /* @__PURE__ */ i(Me, { style: { transform: "rotate(180deg" } });
2207
2213
  }, ai = () => {
2208
- const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, s] = $(e.toString()), { pageNavigationTool: u = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages: m } = se();
2214
+ const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [s, l] = $(e.toString()), { pageNavigationTool: u = !0 } = ve(), { isSmallScreen: h } = Ce(), { localeMessages: m } = se();
2209
2215
  k(() => {
2210
- s(e.toString());
2216
+ l(e.toString());
2211
2217
  }, [e]);
2212
- const v = N((S) => {
2213
- const C = S.target.value;
2214
- s(C);
2215
- }, []), h = N(async () => {
2216
- const S = a(l);
2217
- S.success || s(S.currentPage.toString());
2218
- }, [a, l, t]), _ = N(() => {
2219
- s(e.toString());
2218
+ const v = N((y) => {
2219
+ const C = y.target.value;
2220
+ l(C);
2221
+ }, []), p = N(async () => {
2222
+ const y = a(s);
2223
+ y.success || l(y.currentPage.toString());
2224
+ }, [a, s, t]), w = N(() => {
2225
+ l(e.toString());
2220
2226
  }, [e]), T = N(
2221
- (S) => {
2222
- S.key === "Enter" && h();
2227
+ (y) => {
2228
+ y.key === "Enter" && p();
2223
2229
  },
2224
- [h]
2230
+ [p]
2225
2231
  );
2226
2232
  return typeof u != "boolean" ? /* @__PURE__ */ i(
2227
2233
  u,
@@ -2234,7 +2240,7 @@ const ei = ({ widths: e, heights: t }) => {
2234
2240
  changePage: n
2235
2241
  }
2236
2242
  ) : u ? /* @__PURE__ */ F("div", { className: mt["rp-paginate"], children: [
2237
- !p && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
2243
+ !h && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
2238
2244
  re,
2239
2245
  {
2240
2246
  onClick: r,
@@ -2247,9 +2253,9 @@ const ei = ({ widths: e, heights: t }) => {
2247
2253
  ln,
2248
2254
  {
2249
2255
  onKeyDown: T,
2250
- onBlur: _,
2256
+ onBlur: w,
2251
2257
  onChange: v,
2252
- value: l,
2258
+ value: s,
2253
2259
  className: mt["rp-page-input"]
2254
2260
  }
2255
2261
  ) }),
@@ -2257,7 +2263,7 @@ const ei = ({ widths: e, heights: t }) => {
2257
2263
  "/",
2258
2264
  t
2259
2265
  ] }),
2260
- !p && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
2266
+ !h && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
2261
2267
  re,
2262
2268
  {
2263
2269
  onClick: o,
@@ -2275,8 +2281,8 @@ var Rt = "Dialog", [xn, Vs] = Xr(Rt), [si, ce] = xn(Rt), In = (e) => {
2275
2281
  open: o,
2276
2282
  defaultOpen: r,
2277
2283
  onOpenChange: a,
2278
- modal: l = !0
2279
- } = e, s = B.useRef(null), u = B.useRef(null), [p = !1, m] = Qr({
2284
+ modal: s = !0
2285
+ } = e, l = B.useRef(null), u = B.useRef(null), [h = !1, m] = Qr({
2280
2286
  prop: o,
2281
2287
  defaultProp: r,
2282
2288
  onChange: a
@@ -2285,15 +2291,15 @@ var Rt = "Dialog", [xn, Vs] = Xr(Rt), [si, ce] = xn(Rt), In = (e) => {
2285
2291
  si,
2286
2292
  {
2287
2293
  scope: t,
2288
- triggerRef: s,
2294
+ triggerRef: l,
2289
2295
  contentRef: u,
2290
2296
  contentId: ct(),
2291
2297
  titleId: ct(),
2292
2298
  descriptionId: ct(),
2293
- open: p,
2299
+ open: h,
2294
2300
  onOpenChange: m,
2295
2301
  onOpenToggle: B.useCallback(() => m((v) => !v), [m]),
2296
- modal: l,
2302
+ modal: s,
2297
2303
  children: n
2298
2304
  }
2299
2305
  );
@@ -2322,7 +2328,7 @@ var Lt = "DialogPortal", [li, Ln] = xn(Lt, {
2322
2328
  forceMount: void 0
2323
2329
  }), En = (e) => {
2324
2330
  const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = ce(Lt, t);
2325
- return /* @__PURE__ */ i(li, { scope: t, forceMount: n, children: B.Children.map(o, (l) => /* @__PURE__ */ i(St, { present: n || a.open, children: /* @__PURE__ */ i(oo, { asChild: !0, container: r, children: l }) })) });
2331
+ return /* @__PURE__ */ i(li, { scope: t, forceMount: n, children: B.Children.map(o, (s) => /* @__PURE__ */ i(St, { present: n || a.open, children: /* @__PURE__ */ i(oo, { asChild: !0, container: r, children: s }) })) });
2326
2332
  };
2327
2333
  En.displayName = Lt;
2328
2334
  var Xe = "DialogOverlay", Nn = B.forwardRef(
@@ -2371,12 +2377,12 @@ var ui = B.forwardRef(
2371
2377
  trapFocus: n.open,
2372
2378
  disableOutsidePointerEvents: !0,
2373
2379
  onCloseAutoFocus: We(e.onCloseAutoFocus, (a) => {
2374
- var l;
2375
- a.preventDefault(), (l = n.triggerRef.current) == null || l.focus();
2380
+ var s;
2381
+ a.preventDefault(), (s = n.triggerRef.current) == null || s.focus();
2376
2382
  }),
2377
2383
  onPointerDownOutside: We(e.onPointerDownOutside, (a) => {
2378
- const l = a.detail.originalEvent, s = l.button === 0 && l.ctrlKey === !0;
2379
- (l.button === 2 || s) && a.preventDefault();
2384
+ const s = a.detail.originalEvent, l = s.button === 0 && s.ctrlKey === !0;
2385
+ (s.button === 2 || l) && a.preventDefault();
2380
2386
  }),
2381
2387
  onFocusOutside: We(
2382
2388
  e.onFocusOutside,
@@ -2396,21 +2402,21 @@ var ui = B.forwardRef(
2396
2402
  trapFocus: !1,
2397
2403
  disableOutsidePointerEvents: !1,
2398
2404
  onCloseAutoFocus: (a) => {
2399
- var l, s;
2400
- (l = e.onCloseAutoFocus) == null || l.call(e, a), a.defaultPrevented || (o.current || (s = n.triggerRef.current) == null || s.focus(), a.preventDefault()), o.current = !1, r.current = !1;
2405
+ var s, l;
2406
+ (s = e.onCloseAutoFocus) == null || s.call(e, a), a.defaultPrevented || (o.current || (l = n.triggerRef.current) == null || l.focus(), a.preventDefault()), o.current = !1, r.current = !1;
2401
2407
  },
2402
2408
  onInteractOutside: (a) => {
2403
- var u, p;
2409
+ var u, h;
2404
2410
  (u = e.onInteractOutside) == null || u.call(e, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
2405
- const l = a.target;
2406
- ((p = n.triggerRef.current) == null ? void 0 : p.contains(l)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2411
+ const s = a.target;
2412
+ ((h = n.triggerRef.current) == null ? void 0 : h.contains(s)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2407
2413
  }
2408
2414
  }
2409
2415
  );
2410
2416
  }
2411
2417
  ), Dn = B.forwardRef(
2412
2418
  (e, t) => {
2413
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = e, s = ce(Ie, n), u = B.useRef(null), p = Pt(t, u);
2419
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...s } = e, l = ce(Ie, n), u = B.useRef(null), h = Pt(t, u);
2414
2420
  return no(), /* @__PURE__ */ F(fe, { children: [
2415
2421
  /* @__PURE__ */ i(
2416
2422
  ro,
@@ -2424,37 +2430,37 @@ var ui = B.forwardRef(
2424
2430
  eo,
2425
2431
  {
2426
2432
  role: "dialog",
2427
- id: s.contentId,
2428
- "aria-describedby": s.descriptionId,
2429
- "aria-labelledby": s.titleId,
2430
- "data-state": Nt(s.open),
2431
- ...l,
2432
- ref: p,
2433
- onDismiss: () => s.onOpenChange(!1)
2433
+ id: l.contentId,
2434
+ "aria-describedby": l.descriptionId,
2435
+ "aria-labelledby": l.titleId,
2436
+ "data-state": Nt(l.open),
2437
+ ...s,
2438
+ ref: h,
2439
+ onDismiss: () => l.onOpenChange(!1)
2434
2440
  }
2435
2441
  )
2436
2442
  }
2437
2443
  ),
2438
2444
  /* @__PURE__ */ F(fe, { children: [
2439
- /* @__PURE__ */ i(mi, { titleId: s.titleId }),
2440
- /* @__PURE__ */ i(gi, { contentRef: u, descriptionId: s.descriptionId })
2445
+ /* @__PURE__ */ i(mi, { titleId: l.titleId }),
2446
+ /* @__PURE__ */ i(gi, { contentRef: u, descriptionId: l.descriptionId })
2441
2447
  ] })
2442
2448
  ] });
2443
2449
  }
2444
- ), Et = "DialogTitle", zn = B.forwardRef(
2450
+ ), Et = "DialogTitle", An = B.forwardRef(
2445
2451
  (e, t) => {
2446
2452
  const { __scopeDialog: n, ...o } = e, r = ce(Et, n);
2447
2453
  return /* @__PURE__ */ i(Ve.h2, { id: r.titleId, ...o, ref: t });
2448
2454
  }
2449
2455
  );
2450
- zn.displayName = Et;
2451
- var An = "DialogDescription", hi = B.forwardRef(
2456
+ An.displayName = Et;
2457
+ var zn = "DialogDescription", hi = B.forwardRef(
2452
2458
  (e, t) => {
2453
- const { __scopeDialog: n, ...o } = e, r = ce(An, n);
2459
+ const { __scopeDialog: n, ...o } = e, r = ce(zn, n);
2454
2460
  return /* @__PURE__ */ i(Ve.p, { id: r.descriptionId, ...o, ref: t });
2455
2461
  }
2456
2462
  );
2457
- hi.displayName = An;
2463
+ hi.displayName = zn;
2458
2464
  var Fn = "DialogClose", kn = B.forwardRef(
2459
2465
  (e, t) => {
2460
2466
  const { __scopeDialog: n, ...o } = e, r = ce(Fn, n);
@@ -2493,7 +2499,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
2493
2499
  const r = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
2494
2500
  t && r && (document.getElementById(t) || console.warn(o));
2495
2501
  }, [o, e, t]), null;
2496
- }, vi = In, wi = En, _i = Nn, bi = On, Ci = zn, Ti = kn;
2502
+ }, vi = In, wi = En, _i = Nn, bi = On, Ci = An, Ti = kn;
2497
2503
  const xe = {
2498
2504
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2499
2505
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
@@ -2507,28 +2513,28 @@ const xe = {
2507
2513
  if (!e)
2508
2514
  return [];
2509
2515
  const {
2510
- fileSize: l,
2511
- filename: s,
2516
+ fileSize: s,
2517
+ filename: l,
2512
2518
  title: u,
2513
- author: p,
2519
+ author: h,
2514
2520
  subject: m,
2515
2521
  createdOn: v,
2516
- creator: h,
2517
- keywords: _,
2522
+ creator: p,
2523
+ keywords: w,
2518
2524
  modifiedOn: T,
2519
- pdfProducer: S,
2525
+ pdfProducer: y,
2520
2526
  pdfVersion: C,
2521
- pageCount: y
2527
+ pageCount: S
2522
2528
  } = e;
2523
2529
  return [
2524
- { label: r == null ? void 0 : r.propertiesFilenameLabel, value: s },
2525
- { label: r == null ? void 0 : r.propertiesFileSizeLabel, value: l },
2530
+ { label: r == null ? void 0 : r.propertiesFilenameLabel, value: l },
2531
+ { label: r == null ? void 0 : r.propertiesFileSizeLabel, value: s },
2526
2532
  { separate: !0 },
2527
2533
  { label: r == null ? void 0 : r.propertiesTitleLabel, value: u },
2528
- { label: r == null ? void 0 : r.propertiesAuthorLabel, value: p },
2534
+ { label: r == null ? void 0 : r.propertiesAuthorLabel, value: h },
2529
2535
  { label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
2530
- { label: r == null ? void 0 : r.propertiesKeywordLabel, value: _ },
2531
- { label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
2536
+ { label: r == null ? void 0 : r.propertiesKeywordLabel, value: w },
2537
+ { label: r == null ? void 0 : r.propertiesCreatorLabel, value: p },
2532
2538
  {
2533
2539
  label: r == null ? void 0 : r.propertiesCreateOnLabel,
2534
2540
  value: v ? Wt(v) : ""
@@ -2538,16 +2544,16 @@ const xe = {
2538
2544
  value: T ? Wt(T) : ""
2539
2545
  },
2540
2546
  { separate: !0 },
2541
- { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: S },
2547
+ { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: y },
2542
2548
  { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: C },
2543
- { label: r == null ? void 0 : r.propertiesPageCountLabel, value: y }
2549
+ { label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
2544
2550
  ];
2545
2551
  }, [e, r]);
2546
2552
  return /* @__PURE__ */ i(vi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(wi, { container: t, children: /* @__PURE__ */ F("div", { className: xe["rp-dialog-wrapper"], children: [
2547
2553
  /* @__PURE__ */ i(_i, { className: xe["rp-dialog-overlay"] }),
2548
2554
  /* @__PURE__ */ F(bi, { className: xe["rp-document-dialog"], children: [
2549
2555
  /* @__PURE__ */ i(Ci, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2550
- /* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((l, s) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: l.label, value: l.value }) }, s)) }),
2556
+ /* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((s, l) => /* @__PURE__ */ i("div", { children: s.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: s.label, value: s.value }) }, l)) }),
2551
2557
  /* @__PURE__ */ i(Ti, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ i(ao, {}) })
2552
2558
  ] })
2553
2559
  ] }) }) });
@@ -2558,8 +2564,8 @@ const xe = {
2558
2564
  return yi(n);
2559
2565
  }, Hn = () => {
2560
2566
  const { filename: e, pdfSrc: t } = J(), { downloadFilename: n } = hr(), o = (a) => {
2561
- const l = n || a;
2562
- return l.endsWith(nn) ? l : `${l}${nn}`;
2567
+ const s = n || a;
2568
+ return s.endsWith(nn) ? s : `${s}${nn}`;
2563
2569
  };
2564
2570
  return { download: N(async () => {
2565
2571
  if (!e || !t)
@@ -2583,9 +2589,9 @@ const xe = {
2583
2589
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Vn, {}) }),
2584
2590
  t == null ? void 0 : t.printLabel
2585
2591
  ] }) }), Bn = () => {
2586
- const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ve(), { isSmallScreen: s } = Ce(), { localeMessages: u } = se();
2587
- return l ? s ? /* @__PURE__ */ i(Ei, { print: e, localeMessages: u }) : typeof l == "function" ? /* @__PURE__ */ i(
2588
- l,
2592
+ const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: s = !0 } = ve(), { isSmallScreen: l } = Ce(), { localeMessages: u } = se();
2593
+ return s ? l ? /* @__PURE__ */ i(Ei, { print: e, localeMessages: u }) : typeof s == "function" ? /* @__PURE__ */ i(
2594
+ s,
2589
2595
  {
2590
2596
  print: e,
2591
2597
  cancel: t,
@@ -2594,7 +2600,7 @@ const xe = {
2594
2600
  setOnComplete: o,
2595
2601
  progress: a
2596
2602
  }
2597
- ) : l ? /* @__PURE__ */ i(Li, { print: e, localeMessages: u }) : null : null;
2603
+ ) : s ? /* @__PURE__ */ i(Li, { print: e, localeMessages: u }) : null : null;
2598
2604
  }, Ni = {
2599
2605
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2600
2606
  }, Oi = () => {
@@ -2603,46 +2609,46 @@ const xe = {
2603
2609
  }, Di = () => {
2604
2610
  const { goToLastPageIcon: e } = pe();
2605
2611
  return e || /* @__PURE__ */ i(gn, {});
2606
- }, rn = { width: "100%" }, zi = () => {
2607
- const { goToPage: e, totalPages: t, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = W(() => n === 1, [n]), l = W(() => n === t, [n, t]), s = N(() => {
2612
+ }, rn = { width: "100%" }, Ai = () => {
2613
+ const { goToPage: e, totalPages: t, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = W(() => n === 1, [n]), s = W(() => n === t, [n, t]), l = N(() => {
2608
2614
  e(1);
2609
2615
  }, [e]), u = N(() => {
2610
2616
  e(t);
2611
2617
  }, [e, t]);
2612
2618
  return o ? /* @__PURE__ */ F(Ke, { children: [
2613
- /* @__PURE__ */ i(be, { onClick: s, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2619
+ /* @__PURE__ */ i(be, { onClick: l, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2614
2620
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Oi, {}) }),
2615
2621
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
2616
2622
  ] }) }) }),
2617
- /* @__PURE__ */ i(be, { onClick: u, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": l, children: [
2623
+ /* @__PURE__ */ i(be, { onClick: u, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": s, children: [
2618
2624
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Di, {}) }),
2619
2625
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
2620
2626
  ] }) }) }),
2621
2627
  /* @__PURE__ */ i(yt, {})
2622
2628
  ] }) : null;
2623
- }, Ai = () => {
2629
+ }, zi = () => {
2624
2630
  const { container: e } = ge(), { isSmallScreen: t } = Ce(), {
2625
2631
  openFileTool: n,
2626
2632
  downloadTool: o,
2627
2633
  documentProperties: r,
2628
2634
  scrollModeTool: a,
2629
- rotateTool: l,
2630
- selectionModeTool: s,
2635
+ rotateTool: s,
2636
+ selectionModeTool: l,
2631
2637
  jumpNavigationTool: u,
2632
- printTool: p,
2638
+ printTool: h,
2633
2639
  fullscreenTool: m
2634
2640
  } = ve(), { localeMessages: v } = se();
2635
2641
  return W(() => {
2636
- const _ = u || l || s || a || r;
2642
+ const w = u || s || l || a || r;
2637
2643
  let T = !1;
2638
- return t && (T = !(!n && !o && !p && !m)), _ || T;
2644
+ return t && (T = !(!n && !o && !h && !m)), w || T;
2639
2645
  }, [
2640
2646
  n,
2641
2647
  o,
2642
2648
  r,
2643
2649
  a,
2644
- l,
2645
2650
  s,
2651
+ l,
2646
2652
  u,
2647
2653
  t
2648
2654
  ]) ? /* @__PURE__ */ F(lo, { children: [
@@ -2659,7 +2665,7 @@ const xe = {
2659
2665
  /* @__PURE__ */ i(fn, {}),
2660
2666
  /* @__PURE__ */ i(yt, {})
2661
2667
  ] }),
2662
- /* @__PURE__ */ i(zi, {}),
2668
+ /* @__PURE__ */ i(Ai, {}),
2663
2669
  /* @__PURE__ */ i(po, {}),
2664
2670
  /* @__PURE__ */ i(vo, {}),
2665
2671
  /* @__PURE__ */ i(ho, {}),
@@ -2680,7 +2686,7 @@ const xe = {
2680
2686
  /* @__PURE__ */ i(Bn, {}),
2681
2687
  /* @__PURE__ */ i(fn, {})
2682
2688
  ] }),
2683
- /* @__PURE__ */ i(Ai, {})
2689
+ /* @__PURE__ */ i(zi, {})
2684
2690
  ] });
2685
2691
  }, Ee = {
2686
2692
  "rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
@@ -2695,22 +2701,22 @@ const xe = {
2695
2701
  const { zoomOutIcon: e } = pe();
2696
2702
  return e || /* @__PURE__ */ i(_o, {});
2697
2703
  }, $i = () => {
2698
- const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: s } = J(), { isSmallScreen: u } = Ce(), { localeMessages: p } = se(), { viewMode: m } = ze(), v = N(() => {
2704
+ const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: s } = Ge(), { pages: l } = J(), { isSmallScreen: u } = Ce(), { localeMessages: h } = se(), { viewMode: m } = Ae(), v = N(() => {
2699
2705
  t((d) => {
2700
2706
  const f = Math.floor(d / 25) * 25;
2701
2707
  return Math.min(f + 25, ft);
2702
2708
  });
2703
- }, [t]), h = N(() => {
2709
+ }, [t]), p = N(() => {
2704
2710
  t((d) => {
2705
2711
  const f = Math.ceil(d / 25) * 25;
2706
2712
  return Math.min(f - 25, ft);
2707
2713
  });
2708
- }, [t]), _ = W(() => e === ki, [e]), T = W(() => e === ft, [e]), S = W(() => {
2714
+ }, [t]), w = W(() => e === ki, [e]), T = W(() => e === ft, [e]), y = W(() => {
2709
2715
  var d;
2710
- return (d = s.get(a)) == null ? void 0 : d.page.getViewport({ scale: 1, rotation: l });
2711
- }, [s, a, l]), C = N(
2716
+ return (d = l.get(a)) == null ? void 0 : d.page.getViewport({ scale: 1, rotation: s });
2717
+ }, [l, a, s]), C = N(
2712
2718
  (d) => {
2713
- const f = ((S == null ? void 0 : S.width) || 0) + 2 * Mt, g = ((S == null ? void 0 : S.height) || 0) + 2 * Mt, c = (o == null ? void 0 : o.clientWidth) || 0, b = (o == null ? void 0 : o.clientHeight) || 0, w = bo(
2719
+ const f = ((y == null ? void 0 : y.width) || 0) + 2 * Mt, g = ((y == null ? void 0 : y.height) || 0) + 2 * Mt, c = (o == null ? void 0 : o.clientWidth) || 0, b = (o == null ? void 0 : o.clientHeight) || 0, _ = bo(
2714
2720
  d,
2715
2721
  c,
2716
2722
  b,
@@ -2718,22 +2724,22 @@ const xe = {
2718
2724
  g,
2719
2725
  m
2720
2726
  );
2721
- t(w);
2727
+ t(_);
2722
2728
  },
2723
- [t, S]
2724
- ), y = N(
2729
+ [t, y]
2730
+ ), S = N(
2725
2731
  (d) => {
2726
2732
  typeof d == "number" ? t(d) : C(d);
2727
2733
  },
2728
2734
  [t, C]
2729
2735
  );
2730
2736
  return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ F("div", { className: Ee["rp-zoom-wrapper"], children: [
2731
- /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomOutTooltip, children: /* @__PURE__ */ i(
2737
+ /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.zoomOutTooltip, children: /* @__PURE__ */ i(
2732
2738
  re,
2733
2739
  {
2734
- disabled: _,
2735
- onClick: h,
2736
- "aria-label": p == null ? void 0 : p.zoomOutTooltip,
2740
+ disabled: w,
2741
+ onClick: p,
2742
+ "aria-label": h == null ? void 0 : h.zoomOutTooltip,
2737
2743
  children: /* @__PURE__ */ i(Hi, {})
2738
2744
  }
2739
2745
  ) }),
@@ -2741,11 +2747,11 @@ const xe = {
2741
2747
  mn,
2742
2748
  {
2743
2749
  container: n,
2744
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomSelectTooltip, children: /* @__PURE__ */ F(
2750
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.zoomSelectTooltip, children: /* @__PURE__ */ F(
2745
2751
  re,
2746
2752
  {
2747
2753
  className: Ee["rp-current-zoom-wrapper"],
2748
- "aria-label": p == null ? void 0 : p.zoomSelectTooltip,
2754
+ "aria-label": h == null ? void 0 : h.zoomSelectTooltip,
2749
2755
  children: [
2750
2756
  /* @__PURE__ */ i("span", { className: Ee["rp-current-zoom-text"], children: e }),
2751
2757
  /* @__PURE__ */ i("span", { className: Ee["rp-current-zoom-text"], children: "%" }),
@@ -2757,24 +2763,24 @@ const xe = {
2757
2763
  align: "center",
2758
2764
  children: /* @__PURE__ */ F("div", { className: Ee["rp-zoom-dropdown-content"], children: [
2759
2765
  /* @__PURE__ */ F(Ke, { children: [
2760
- /* @__PURE__ */ i(be, { onClick: () => y(at.ACTUAL), children: p == null ? void 0 : p.zoomActualSize }),
2761
- /* @__PURE__ */ i(be, { onClick: () => y(at.PAGE_FIT), children: p == null ? void 0 : p.zoomPageFit }),
2762
- /* @__PURE__ */ i(be, { onClick: () => y(at.PAGE_WIDTH), children: p == null ? void 0 : p.zoomPageWidth })
2766
+ /* @__PURE__ */ i(be, { onClick: () => S(at.ACTUAL), children: h == null ? void 0 : h.zoomActualSize }),
2767
+ /* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_FIT), children: h == null ? void 0 : h.zoomPageFit }),
2768
+ /* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_WIDTH), children: h == null ? void 0 : h.zoomPageWidth })
2763
2769
  ] }),
2764
2770
  /* @__PURE__ */ i(yt, {}),
2765
- /* @__PURE__ */ i(Ke, { children: Wi.map((d) => /* @__PURE__ */ F(be, { onClick: () => y(d), children: [
2771
+ /* @__PURE__ */ i(Ke, { children: Wi.map((d) => /* @__PURE__ */ F(be, { onClick: () => S(d), children: [
2766
2772
  d,
2767
2773
  " %"
2768
2774
  ] }, d)) })
2769
2775
  ] })
2770
2776
  }
2771
2777
  ),
2772
- /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomInTooltip, children: /* @__PURE__ */ i(
2778
+ /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.zoomInTooltip, children: /* @__PURE__ */ i(
2773
2779
  re,
2774
2780
  {
2775
2781
  disabled: T,
2776
2782
  onClick: v,
2777
- "aria-label": p == null ? void 0 : p.zoomInTooltip,
2783
+ "aria-label": h == null ? void 0 : h.zoomInTooltip,
2778
2784
  children: /* @__PURE__ */ i(Mi, {})
2779
2785
  }
2780
2786
  ) })
@@ -2807,56 +2813,56 @@ const xe = {
2807
2813
  return e || /* @__PURE__ */ i(Co, {});
2808
2814
  }, Gi = () => {
2809
2815
  const { container: e } = ge(), [t, n] = $(!1), { pdf: o } = J(), [r, a] = $(null), {
2810
- searchOptions: l,
2811
- setSearchOptions: s,
2816
+ searchOptions: s,
2817
+ setSearchOptions: l,
2812
2818
  loading: u,
2813
- setSearch: p,
2819
+ setSearch: h,
2814
2820
  totalMatches: m,
2815
2821
  currentMatchPosition: v,
2816
- nextMatch: h,
2817
- prevMatch: _,
2822
+ nextMatch: p,
2823
+ prevMatch: w,
2818
2824
  search: T
2819
- } = xt(), { searchTool: S = !0 } = ve(), [C, y] = $(T), { localeMessages: d } = se(), { isSmallScreen: f } = Ce(), g = N(() => {
2825
+ } = xt(), { searchTool: y = !0 } = ve(), [C, S] = $(T), { localeMessages: d } = se(), { isSmallScreen: f } = Ce(), g = N(() => {
2820
2826
  n(!0);
2821
2827
  }, []), c = N(() => {
2822
- p(""), y(""), n(!1);
2823
- }, [p]), b = (I) => {
2828
+ h(""), S(""), n(!1);
2829
+ }, [h]), b = (I) => {
2824
2830
  const O = I.key === "Enter", M = I.key === " ";
2825
2831
  (O || M) && c();
2826
- }, w = N(
2832
+ }, _ = N(
2827
2833
  (I) => {
2828
2834
  I.key === "Escape" && t && c();
2829
2835
  },
2830
2836
  [t]
2831
2837
  ), P = N(
2832
2838
  (I) => {
2833
- I.shiftKey && I.key === "Enter" ? _() : I.key === "Enter" && T !== C ? p(C) : I.key === "Enter" && h();
2839
+ I.shiftKey && I.key === "Enter" ? w() : I.key === "Enter" && T !== C ? h(C) : I.key === "Enter" && p();
2834
2840
  },
2835
- [C, _, h, p, T]
2841
+ [C, w, p, h, T]
2836
2842
  );
2837
- k(() => (window.addEventListener("keydown", w), () => {
2838
- window.removeEventListener("keydown", w);
2839
- }), [w]), k(() => {
2843
+ k(() => (window.addEventListener("keydown", _), () => {
2844
+ window.removeEventListener("keydown", _);
2845
+ }), [_]), k(() => {
2840
2846
  r && r.focus();
2841
2847
  }, [r]);
2842
2848
  const E = N((I) => {
2843
- y(I.target.value);
2849
+ S(I.target.value);
2844
2850
  }, []), x = N(() => {
2845
- y(""), p("");
2846
- }, [p]), R = W(() => `${v} / ${m}`, [v, m]), { wholeWords: D, matchCase: z } = W(() => l, [l]), A = N(
2851
+ S(""), h("");
2852
+ }, [h]), R = W(() => `${v} / ${m}`, [v, m]), { wholeWords: D, matchCase: A } = W(() => s, [s]), z = N(
2847
2853
  (I) => {
2848
- s((O) => ({ ...O, matchCase: I }));
2854
+ l((O) => ({ ...O, matchCase: I }));
2849
2855
  },
2850
- [s]
2856
+ [l]
2851
2857
  ), L = N(
2852
2858
  (I) => {
2853
- s((O) => ({ ...O, wholeWords: I }));
2859
+ l((O) => ({ ...O, wholeWords: I }));
2854
2860
  },
2855
- [s]
2861
+ [l]
2856
2862
  );
2857
2863
  return k(() => {
2858
2864
  c();
2859
- }, [o, c]), S ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
2865
+ }, [o, c]), y ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
2860
2866
  Mr,
2861
2867
  {
2862
2868
  open: t,
@@ -2883,7 +2889,7 @@ const xe = {
2883
2889
  ] }),
2884
2890
  /* @__PURE__ */ F("div", { className: Y["rp-search-tool-input-checkboxes"], children: [
2885
2891
  f && /* @__PURE__ */ i(on, {}),
2886
- /* @__PURE__ */ i($t, { name: "matchCase", value: z, onChange: A, children: d == null ? void 0 : d.searchMatchCaseLabel }),
2892
+ /* @__PURE__ */ i($t, { name: "matchCase", value: A, onChange: z, children: d == null ? void 0 : d.searchMatchCaseLabel }),
2887
2893
  !f && /* @__PURE__ */ i(K, { content: d == null ? void 0 : d.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
2888
2894
  /* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: L, children: d == null ? void 0 : d.searchWholeWordsLabel }),
2889
2895
  !f && /* @__PURE__ */ i(K, { content: d == null ? void 0 : d.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
@@ -2921,9 +2927,9 @@ const xe = {
2921
2927
  /* @__PURE__ */ i("button", { className: ne(Ne["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
2922
2928
  ] }) });
2923
2929
  }, Ui = $e((e, t) => {
2924
- const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2930
+ const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, s = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2925
2931
  return /* @__PURE__ */ F("div", { children: [
2926
- /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Fe["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: Fe["rp-toolbar-wrapper"], style: l(), children: [
2932
+ /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Fe["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: Fe["rp-toolbar-wrapper"], style: s(), children: [
2927
2933
  /* @__PURE__ */ F("div", { "data-rp": "topBarLeft", className: Fe["rp-toolbar-start"], children: [
2928
2934
  /* @__PURE__ */ i(Gi, {}),
2929
2935
  /* @__PURE__ */ i(ai, {})
@@ -2945,7 +2951,7 @@ const xe = {
2945
2951
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
2946
2952
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
2947
2953
  }, Bi = (e) => {
2948
- const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = ie(), l = W(() => o ? ke["rp-thumbnail-active"] : "", [o]), s = W(() => ({
2954
+ const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = ie(), s = W(() => o ? ke["rp-thumbnail-active"] : "", [o]), l = W(() => ({
2949
2955
  width: Math.round(r.width),
2950
2956
  height: Math.round(r.height)
2951
2957
  }), [r]), u = N(() => {
@@ -2958,12 +2964,12 @@ const xe = {
2958
2964
  id: `page-${n}`,
2959
2965
  className: ke["rp-thumbnail-wrapper"],
2960
2966
  children: [
2961
- /* @__PURE__ */ i("div", { className: ne(l, ke["rp-thumbnail"]), children: t ? /* @__PURE__ */ i(
2967
+ /* @__PURE__ */ i("div", { className: ne(s, ke["rp-thumbnail"]), children: t ? /* @__PURE__ */ i(
2962
2968
  "img",
2963
2969
  {
2964
2970
  src: t,
2965
- width: s.width,
2966
- height: s.height,
2971
+ width: l.width,
2972
+ height: l.height,
2967
2973
  alt: "thumbnail"
2968
2974
  }
2969
2975
  ) : /* @__PURE__ */ i(
@@ -2971,8 +2977,8 @@ const xe = {
2971
2977
  {
2972
2978
  className: ke["rp-thumbnail-loader"],
2973
2979
  style: {
2974
- width: `${s.width}px`,
2975
- height: `${s.height}px`
2980
+ width: `${l.width}px`,
2981
+ height: `${l.height}px`
2976
2982
  },
2977
2983
  children: /* @__PURE__ */ i(Ct, {})
2978
2984
  }
@@ -2988,24 +2994,24 @@ const xe = {
2988
2994
  const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
2989
2995
  e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Zi);
2990
2996
  }, Ki = $e((e, t) => {
2991
- const { show: n } = e, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: s, addToPage: u } = Cn(), p = H(null), m = H(1);
2992
- cn(t, () => p.current);
2993
- const v = W(() => Object.values(a), [a]), h = N(() => {
2994
- const _ = s + 1;
2995
- _ <= r && l(_);
2996
- }, [l, r, s]);
2997
+ const { show: n } = e, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: s, thumbnailLength: l, addToPage: u } = Cn(), h = H(null), m = H(1);
2998
+ cn(t, () => h.current);
2999
+ const v = W(() => Object.values(a), [a]), p = N(() => {
3000
+ const w = l + 1;
3001
+ w <= r && s(w);
3002
+ }, [s, r, l]);
2997
3003
  return k(() => {
2998
- o > s ? u(o) : n && m.current !== o && (ji(p.current, o), m.current = o);
2999
- }, [o, s, u, n, v]), fr(p.current, h), /* @__PURE__ */ i("div", { ref: p, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? v.map((_, T) => {
3000
- var S, C;
3004
+ o > l ? u(o) : n && m.current !== o && (ji(h.current, o), m.current = o);
3005
+ }, [o, l, u, n, v]), fr(h.current, p), /* @__PURE__ */ i("div", { ref: h, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? v.map((w, T) => {
3006
+ var y, C;
3001
3007
  return /* @__PURE__ */ i(
3002
3008
  Bi,
3003
3009
  {
3004
- isFocused: o === ((S = _.page) == null ? void 0 : S.pageNumber),
3005
- pageNumber: (C = _.page) == null ? void 0 : C.pageNumber,
3006
- thumbnailSrc: _.thumbnailSrc,
3007
- loading: _.loading,
3008
- viewport: _.viewport
3010
+ isFocused: o === ((y = w.page) == null ? void 0 : y.pageNumber),
3011
+ pageNumber: (C = w.page) == null ? void 0 : C.pageNumber,
3012
+ thumbnailSrc: w.thumbnailSrc,
3013
+ loading: w.loading,
3014
+ viewport: w.viewport
3009
3015
  },
3010
3016
  T
3011
3017
  );
@@ -3014,25 +3020,25 @@ const xe = {
3014
3020
  const { thumbnailIcon: e } = pe();
3015
3021
  return e || /* @__PURE__ */ i(mr, {});
3016
3022
  }, Yi = () => {
3017
- const { active: e, setActive: t } = Cn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ve(), { localeMessages: s } = se(), u = N(() => {
3023
+ const { active: e, setActive: t } = Cn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: s } = ve(), { localeMessages: l } = se(), u = N(() => {
3018
3024
  t((m) => !m);
3019
- }, []), p = W(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: e }) : a ? /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
3025
+ }, []), h = W(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: e }) : a ? /* @__PURE__ */ i(K, { content: l == null ? void 0 : l.thumbnailTooltip, children: /* @__PURE__ */ i(
3020
3026
  re,
3021
3027
  {
3022
3028
  onClick: u,
3023
3029
  active: e,
3024
- "aria-label": s == null ? void 0 : s.thumbnailTooltip,
3030
+ "aria-label": l == null ? void 0 : l.thumbnailTooltip,
3025
3031
  children: /* @__PURE__ */ i(Xi, {})
3026
3032
  }
3027
- ) }) : null, [a, e, u, s]);
3028
- return /* @__PURE__ */ i(fe, { children: l && /* @__PURE__ */ F(
3033
+ ) }) : null, [a, e, u, l]);
3034
+ return /* @__PURE__ */ i(fe, { children: s && /* @__PURE__ */ F(
3029
3035
  "div",
3030
3036
  {
3031
3037
  style: { "--rp-thumbnail-width": `${n}px` },
3032
3038
  className: gt["rp-sidebar-content-wrapper"],
3033
3039
  "data-rp": "sidebar",
3034
3040
  children: [
3035
- /* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: p }),
3041
+ /* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: h }),
3036
3042
  /* @__PURE__ */ F(
3037
3043
  "div",
3038
3044
  {
@@ -3049,16 +3055,16 @@ const xe = {
3049
3055
  }
3050
3056
  ) });
3051
3057
  }, _e = {
3052
- "rp-layout": "_rp-layout_gz5nb_1",
3053
- "rp-content": "_rp-content_gz5nb_5",
3054
- "rp-pages": "_rp-pages_gz5nb_11",
3055
- "rp-container": "_rp-container_gz5nb_16",
3056
- "rp-loader": "_rp-loader_gz5nb_52",
3057
- "rp-theme-variables": "_rp-theme-variables_gz5nb_56",
3058
- "rp-dark-mode": "_rp-dark-mode_gz5nb_161"
3058
+ "rp-layout": "_rp-layout_1uujy_1",
3059
+ "rp-content": "_rp-content_1uujy_5",
3060
+ "rp-pages": "_rp-pages_1uujy_11",
3061
+ "rp-container": "_rp-container_1uujy_16",
3062
+ "rp-loader": "_rp-loader_1uujy_52",
3063
+ "rp-theme-variables": "_rp-theme-variables_1uujy_56",
3064
+ "rp-dark-mode": "_rp-dark-mode_1uujy_162"
3059
3065
  }, Ji = $e(
3060
3066
  (e, t) => {
3061
- const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: l, customDarkVariables: s } = Pr(), { darkMode: u } = rr();
3067
+ const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: s, customDarkVariables: l } = Pr(), { darkMode: u } = rr();
3062
3068
  return /* @__PURE__ */ i(
3063
3069
  "div",
3064
3070
  {
@@ -3071,8 +3077,8 @@ const xe = {
3071
3077
  ),
3072
3078
  style: {
3073
3079
  "--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
3074
- ...l,
3075
- ...u ? s : {},
3080
+ ...s,
3081
+ ...u ? l : {},
3076
3082
  ...r
3077
3083
  },
3078
3084
  children: n
@@ -3085,18 +3091,18 @@ const xe = {
3085
3091
  slots: o,
3086
3092
  icons: r,
3087
3093
  style: a,
3088
- className: l,
3089
- mobileWidth: s,
3094
+ className: s,
3095
+ mobileWidth: l,
3090
3096
  onLoaded: u,
3091
- cleanupOnLoaded: p,
3097
+ cleanupOnLoaded: h,
3092
3098
  onLayoutWidthChange: m
3093
- } = e, [v, h] = $(null), { setContainer: _, setContentRef: T } = ge(), { loading: S } = J(), { LoaderImageComponent: C } = pn();
3099
+ } = e, [v, p] = $(null), { setContainer: w, setContentRef: T } = ge(), { loading: y } = J(), { LoaderImageComponent: C } = pn();
3094
3100
  return k(() => (u && u(), () => {
3095
- p && p();
3096
- }), [u, p]), /* @__PURE__ */ i(Ji, { toolbarRef: v, ref: t, children: /* @__PURE__ */ i(Tr, { mobileWidth: s, onLayoutWidthChange: m, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: _, style: a, className: l, children: [
3101
+ h && h();
3102
+ }), [u, h]), /* @__PURE__ */ i(Ji, { toolbarRef: v, ref: t, children: /* @__PURE__ */ i(Tr, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: w, style: a, className: s, children: [
3097
3103
  /* @__PURE__ */ F(br, { children: [
3098
3104
  /* @__PURE__ */ F("div", { className: _e["rp-layout"], children: [
3099
- /* @__PURE__ */ i(Ui, { ref: h }),
3105
+ /* @__PURE__ */ i(Ui, { ref: p }),
3100
3106
  /* @__PURE__ */ F("div", { className: _e["rp-content"], children: [
3101
3107
  /* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(Yi, {}) }),
3102
3108
  /* @__PURE__ */ i("div", { ref: T, className: _e["rp-pages"], children: n })
@@ -3104,7 +3110,7 @@ const xe = {
3104
3110
  ] }),
3105
3111
  /* @__PURE__ */ i(Cr, {})
3106
3112
  ] }),
3107
- S ? /* @__PURE__ */ i(
3113
+ y ? /* @__PURE__ */ i(
3108
3114
  "div",
3109
3115
  {
3110
3116
  className: _e["rp-loader"],
@@ -3147,8 +3153,8 @@ export {
3147
3153
  Yi as J,
3148
3154
  Ji as K,
3149
3155
  Vi as L,
3150
- zi as M,
3151
- Ai as O,
3156
+ Ai as M,
3157
+ zi as O,
3152
3158
  Ms as P,
3153
3159
  qs as R,
3154
3160
  Gs as S,
@@ -3170,7 +3176,7 @@ export {
3170
3176
  xo as n,
3171
3177
  Tn as o,
3172
3178
  Eo as p,
3173
- Ao as q,
3179
+ zo as q,
3174
3180
  It as r,
3175
3181
  Yo as s,
3176
3182
  ti as t,