@pdf-viewer/react 1.4.0-beta.3 → 1.4.0-beta.5

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 (43) hide show
  1. package/dist/{RPDefaultLayout-e42e8172.js → RPDefaultLayout-3344b69e.js} +289 -281
  2. package/dist/components/RPController.js +1 -1
  3. package/dist/components/RPPages.js +1 -1
  4. package/dist/components/RPProvider.js +1 -1
  5. package/dist/components/layout/RPDefaultLayout.js +1 -1
  6. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  7. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  8. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  9. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  10. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  11. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  12. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  13. package/dist/components/layout/toolbar/Paginate.js +1 -1
  14. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  15. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  16. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  17. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  18. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  19. package/dist/components/page/AnnotationLayer.js +1 -1
  20. package/dist/components/page/CanvasLayer.js +1 -1
  21. package/dist/components/page/DualPage.js +1 -1
  22. package/dist/components/page/RPPage.js +1 -1
  23. package/dist/components/page/SinglePage.js +1 -1
  24. package/dist/components/page/TextHighlightLayer.js +1 -1
  25. package/dist/components/page/TextLayer.js +1 -1
  26. package/dist/components/ui/LoadingIndicator.js +1 -1
  27. package/dist/contexts/PaginationContext.js +1 -1
  28. package/dist/contexts/PrintContext.js +1 -1
  29. package/dist/contexts/SearchContext.js +1 -1
  30. package/dist/contexts/ThumbnailsContext.js +1 -1
  31. package/dist/contexts/ToolbarComponentContext.js +10 -8
  32. package/dist/main.js +1 -1
  33. package/dist/types/utils/types.d.ts +1 -0
  34. package/dist/utils/hooks/useFileDownload.js +1 -1
  35. package/dist/utils/hooks/useHighlight.js +13 -13
  36. package/dist/utils/hooks/useLicense.js +1 -1
  37. package/dist/utils/hooks/usePaginate.js +1 -1
  38. package/dist/utils/hooks/usePrint.js +1 -1
  39. package/dist/utils/hooks/useScrollToPage.js +1 -1
  40. package/dist/utils/hooks/useSearch.js +1 -1
  41. package/dist/utils/hooks/useThumbnail.js +1 -1
  42. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  43. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { jsx as i, Fragment as Ee, jsxs as z } from "react/jsx-runtime";
1
+ import { jsx as i, Fragment as Ie, jsxs as z } from "react/jsx-runtime";
2
2
  import * as V from "react";
3
3
  import { useRef as W, useEffect as O, useCallback as x, useState as $, createContext as Ze, useContext as je, useMemo as k, forwardRef as Be, useImperativeHandle as sn, createElement as Me, PureComponent as rr, Component as or, memo as ir } from "react";
4
4
  import { ChevronUpIcon as ke } from "./components/icons/ChevronUpIcon.js";
@@ -24,7 +24,7 @@ import { renderPage as gt } from "./utils/renderPage.js";
24
24
  import { highlightMatches as un, findMatches as dr, resetDivs as dn, highlightMultipleColorMatches as pr } from "./utils/highlight.js";
25
25
  import * as Tt from "pdfjs-dist";
26
26
  import { PixelsPerInch as hr, AnnotationMode as mr, RenderingCancelledException as fr, AnnotationLayer as gr } from "pdfjs-dist";
27
- import { useLayoutContainer as ye } from "./contexts/LayoutContainerContext.js";
27
+ import { useLayoutContainer as xe } from "./contexts/LayoutContainerContext.js";
28
28
  import { useDimensionPagesContext as Pt } from "./contexts/DimensionPagesContext.js";
29
29
  import { useLocalizationContext as me } from "./contexts/LocalizationContext.js";
30
30
  import { useHighlightContext as vr } from "./contexts/HighlightContext.js";
@@ -41,7 +41,7 @@ import q from "./components/ui/RPTooltip.js";
41
41
  import { c as Pe, C as Pr } from "./Container-8fea0875.js";
42
42
  import { WrapperLayout as Sr } from "./components/layout/WrapperLayout.js";
43
43
  import { RPDropFileZone as Ir } from "./components/RPDropFileZone.js";
44
- import { useViewportContext as xe, ViewportProvider as yr } from "./contexts/ViewportContext.js";
44
+ import { useViewportContext as Re, ViewportProvider as yr } from "./contexts/ViewportContext.js";
45
45
  import "./contexts/ThemeContext.js";
46
46
  import { SimpleLinkService as xr } from "./utils/link_service.js";
47
47
  import { annotationsEvents as Rr, annotationEventsHandler as Lr, handleClick as Ft, handleAnnotationWidget as Nr, handleAnnotationLink as Er, bindLayerEvents as Or, unbindLayerEvents as kt } from "./utils/annotations.js";
@@ -84,9 +84,9 @@ import { ClearIcon as lo } from "./components/icons/ClearIcon.js";
84
84
  import { InfoIcon as Vt } from "./components/icons/InfoIcon.js";
85
85
  import { UIPopOver as uo } from "./components/ui/Popover.js";
86
86
  import './assets/RPDefaultLayout.css';const _n = () => {
87
- const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = Ye(), { setFocusedPage: a } = ce(), s = W(), { columnCount: c } = ln(), { widths: u, heights: l } = Pt(), d = W(e), f = W(t), h = W(c);
87
+ const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = Ye(), { setFocusedPage: a } = ce(), c = W(), { columnCount: s } = ln(), { widths: u, heights: l } = Pt(), d = W(e), f = W(t), h = W(s);
88
88
  O(() => {
89
- n != null && n.scrollToItem && (s.current = n);
89
+ n != null && n.scrollToItem && (c.current = n);
90
90
  }, [n]), O(() => {
91
91
  d.current = e, f.current = t;
92
92
  }, [e, t]);
@@ -112,8 +112,8 @@ import './assets/RPDefaultLayout.css';const _n = () => {
112
112
  return O(() => {
113
113
  d.current = e, f.current = t;
114
114
  }, [e, t]), O(() => {
115
- h.current = c;
116
- }, [c]), { scrollToPage: x(
115
+ h.current = s;
116
+ }, [s]), { scrollToPage: x(
117
117
  (b) => {
118
118
  const v = b - 1;
119
119
  let w = v, m = 0;
@@ -121,7 +121,7 @@ import './assets/RPDefaultLayout.css';const _n = () => {
121
121
  return g(b), Promise.resolve();
122
122
  if (d.current === K.PAGE_SCROLLING)
123
123
  return a(b), Promise.resolve();
124
- if (!s.current || !o)
124
+ if (!c.current || !o)
125
125
  return Promise.resolve();
126
126
  const T = o;
127
127
  if (d.current === K.HORIZONTAL_SCROLLING) {
@@ -157,7 +157,7 @@ import './assets/RPDefaultLayout.css';const _n = () => {
157
157
  },
158
158
  [
159
159
  o,
160
- c,
160
+ s,
161
161
  g,
162
162
  a,
163
163
  Mt,
@@ -166,20 +166,20 @@ import './assets/RPDefaultLayout.css';const _n = () => {
166
166
  ]
167
167
  ) };
168
168
  }, po = (t = 1) => {
169
- const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = _n(), s = W(1), { isScrolling: c } = Qe(), { viewMode: u } = Je(), { scrollMode: l } = Oe(), d = vt(e, 100), f = x(
169
+ const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = _n(), c = W(1), { isScrolling: s } = Qe(), { viewMode: u } = Je(), { scrollMode: l } = Oe(), d = vt(e, 100), f = x(
170
170
  (v) => {
171
171
  if (!/^[0-9]*$/g.test(v.toString()) || !v)
172
- return { success: !1, currentPage: s.current };
172
+ return { success: !1, currentPage: c.current };
173
173
  const m = +v;
174
- return m < 0 || m > o ? { success: !1, currentPage: s.current } : (n(m), s.current = m, { success: !0, currentPage: +v });
174
+ return m < 0 || m > o ? { success: !1, currentPage: c.current } : (n(m), c.current = m, { success: !0, currentPage: +v });
175
175
  },
176
176
  [o]
177
177
  ), h = x(f, [f]), g = x(
178
178
  async (v) => {
179
- if (c.current)
180
- return { success: !1, currentPage: s.current };
179
+ if (s.current)
180
+ return { success: !1, currentPage: c.current };
181
181
  const w = f(v);
182
- return w.success && (c.current = !0, await a(w.currentPage), c.current = !1), w;
182
+ return w.success && (s.current = !0, await a(w.currentPage), s.current = !1), w;
183
183
  },
184
184
  [f, a]
185
185
  ), _ = x(() => {
@@ -214,7 +214,7 @@ import './assets/RPDefaultLayout.css';const _n = () => {
214
214
  const t = je(wn);
215
215
  return typeof (t == null ? void 0 : t.focusedPage) > "u" && kr.error("Please use this hooks inside children component of RPProvider"), t;
216
216
  }, ms = ({ children: t }) => {
217
- const { pdf: e } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: s, nextPage: c, prevPage: u } = po();
217
+ const { pdf: e } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: u } = po();
218
218
  return O(() => {
219
219
  e != null && e.numPages && a(e.numPages);
220
220
  }, [e, a]), /* @__PURE__ */ i(
@@ -225,9 +225,9 @@ import './assets/RPDefaultLayout.css';const _n = () => {
225
225
  totalPages: o,
226
226
  setFocusedPage: r,
227
227
  setTotalPages: a,
228
- nextPage: c,
228
+ nextPage: s,
229
229
  prevPage: u,
230
- goToPage: s
230
+ goToPage: c
231
231
  },
232
232
  children: t
233
233
  }
@@ -238,7 +238,7 @@ const ho = () => {
238
238
  loadedPages: 0,
239
239
  totalPages: 0,
240
240
  percentage: 0
241
- }), [r, a] = $(!1), [s, c] = $(!1), [u, l] = $(null), d = W(!1);
241
+ }), [r, a] = $(!1), [c, s] = $(!1), [u, l] = $(null), d = W(!1);
242
242
  O(() => {
243
243
  d.current;
244
244
  }, [d]);
@@ -247,7 +247,7 @@ const ho = () => {
247
247
  const T = document.querySelector(".rp-print-zone");
248
248
  T && T.remove();
249
249
  }, []), h = x(() => {
250
- d.current = !1, a(!1), c(!1), l(null), o({
250
+ d.current = !1, a(!1), s(!1), l(null), o({
251
251
  loadedPages: 0,
252
252
  totalPages: 0,
253
253
  percentage: 0
@@ -373,7 +373,7 @@ const ho = () => {
373
373
  const A = w(I, e);
374
374
  document.body.appendChild(A), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await b();
375
375
  } catch (p) {
376
- c(!0), p instanceof Error && l(p);
376
+ s(!0), p instanceof Error && l(p);
377
377
  } finally {
378
378
  T.height = 0, T.width = 0;
379
379
  }
@@ -390,7 +390,7 @@ const ho = () => {
390
390
  cancel: g,
391
391
  progress: n,
392
392
  isComplete: r,
393
- isError: s,
393
+ isError: c,
394
394
  error: u
395
395
  };
396
396
  }, bn = Ze({
@@ -411,7 +411,7 @@ const ho = () => {
411
411
  }
412
412
  }
413
413
  }), fs = ({ children: t }) => {
414
- const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: s, progress: c, isComplete: u, isError: l, error: d } = ho(), f = x((v) => {
414
+ const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: c, progress: s, isComplete: u, isError: l, error: d } = ho(), f = x((v) => {
415
415
  v && typeof v == "function" && r(() => v);
416
416
  }, []), h = (v) => {
417
417
  d && v(d);
@@ -419,7 +419,7 @@ const ho = () => {
419
419
  (v) => {
420
420
  n(() => v);
421
421
  },
422
- [c, e]
422
+ [s, e]
423
423
  );
424
424
  O(() => {
425
425
  u && o && _();
@@ -428,17 +428,17 @@ const ho = () => {
428
428
  console.error(v);
429
429
  });
430
430
  }, [l]), O(() => {
431
- c && e && e(c);
432
- }, [c, e]);
431
+ s && e && e(s);
432
+ }, [s, e]);
433
433
  const _ = () => {
434
434
  o && (o(), r(null));
435
435
  }, b = {
436
436
  print: a,
437
- cancel: s,
437
+ cancel: c,
438
438
  setOnProgress: g,
439
439
  setOnComplete: f,
440
440
  setOnError: h,
441
- progress: c
441
+ progress: s
442
442
  };
443
443
  return /* @__PURE__ */ i(bn.Provider, { value: b, children: t });
444
444
  }, et = () => {
@@ -448,10 +448,10 @@ const ho = () => {
448
448
  return t;
449
449
  }, mo = () => {
450
450
  const [t, e] = $({}), { pages: n } = X(), { rotate: o } = Ke(), r = k(() => Object.keys(t).length, [t]), a = x(
451
- (c) => {
451
+ (s) => {
452
452
  if (!n.size)
453
453
  return;
454
- const u = Array.from(n.values()).slice(0, c).map((f) => {
454
+ const u = Array.from(n.values()).slice(0, s).map((f) => {
455
455
  const { thumbnailViewport: h, scale: g } = Wt(f.page, o);
456
456
  return {
457
457
  scale: g,
@@ -489,16 +489,16 @@ const ho = () => {
489
489
  O(() => {
490
490
  a(10);
491
491
  }, [a]);
492
- const s = x(
493
- (c) => {
492
+ const c = x(
493
+ (s) => {
494
494
  if (!n)
495
495
  return;
496
- const u = n.get(c);
496
+ const u = n.get(s);
497
497
  if (!u)
498
498
  return;
499
499
  e((d) => ({
500
500
  ...d,
501
- [c]: {
501
+ [s]: {
502
502
  loading: !0,
503
503
  page: u.page,
504
504
  viewport: u.thumbnailViewport,
@@ -516,12 +516,12 @@ const ho = () => {
516
516
  viewport: f
517
517
  };
518
518
  }).then((d) => {
519
- e((f) => ({ ...f, [c]: d }));
519
+ e((f) => ({ ...f, [s]: d }));
520
520
  });
521
521
  },
522
522
  [n, o]
523
523
  );
524
- return { thumbnailPages: t, addPage: s, addToPage: a, thumbnailLength: r };
524
+ return { thumbnailPages: t, addPage: c, addToPage: a, thumbnailLength: r };
525
525
  }, Cn = Ze({
526
526
  thumbnailPages: {},
527
527
  addPage: (t) => {
@@ -536,23 +536,23 @@ const ho = () => {
536
536
  children: t,
537
537
  initialThumbnailsVisible: e
538
538
  }) => {
539
- const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = mo(), [s, c] = $(e);
539
+ const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = mo(), [c, s] = $(e);
540
540
  return /* @__PURE__ */ i(
541
541
  Cn.Provider,
542
542
  {
543
- value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: s, setActive: c },
543
+ value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: c, setActive: s },
544
544
  children: t
545
545
  }
546
546
  );
547
547
  }, fo = (t = {}, e = "") => {
548
- const [n, o] = $(e), [r, a] = $(!1), { pdf: s, pages: c } = X(), u = Pt(), l = W(!n), { currentZoom: d } = Xe(), [f, h] = $([]), { setFocusedPage: g } = ce(), [_, b] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: w } = Ye(), { scrollMode: m } = Oe(), { pagesRef: T } = ye(), [I, p] = $(null), P = W({}), C = k(() => _ === 0 ? null : f[_ - 1], [_, f]), S = k(() => f.length, [f]);
548
+ const [n, o] = $(e), [r, a] = $(!1), { pdf: c, pages: s } = X(), u = Pt(), l = W(!n), { currentZoom: d } = Xe(), [f, h] = $([]), { setFocusedPage: g } = ce(), [_, b] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: w } = Ye(), { scrollMode: m } = Oe(), { pagesRef: T } = xe(), [I, p] = $(null), P = W({}), C = k(() => _ === 0 ? null : f[_ - 1], [_, f]), S = k(() => f.length, [f]);
549
549
  O(() => {
550
- if (!C || !c)
550
+ if (!C || !s)
551
551
  return;
552
552
  const L = w || v;
553
553
  if (!L || !T)
554
554
  return;
555
- const F = c.get(C.page), E = T.clientHeight / 2, y = T.clientWidth / 2;
555
+ const F = s.get(C.page), E = T.clientHeight / 2, y = T.clientWidth / 2;
556
556
  let N = 0, G = 0;
557
557
  m === K.PAGE_SCROLLING && g(C.page), m === K.VERTICAL_SCROLLING && (N = u.heights.slice(0, C.page - 1).reduce((j, J) => j + J, 0)), m === K.HORIZONTAL_SCROLLING && (G = u.widths.slice(0, C.page - 1).reduce((j, J) => j + J, 0));
558
558
  let U;
@@ -575,7 +575,7 @@ const ho = () => {
575
575
  });
576
576
  });
577
577
  }, [
578
- c,
578
+ s,
579
579
  g,
580
580
  u,
581
581
  C,
@@ -605,7 +605,7 @@ const ho = () => {
605
605
  l.current = !0, h([]), b(0);
606
606
  return;
607
607
  }
608
- l.current = !1, a(!0), h([]), b(0), D(s).then((L) => {
608
+ l.current = !1, a(!0), h([]), b(0), D(c).then((L) => {
609
609
  P.current = L;
610
610
  const E = Object.keys(L).reduce((y, N) => {
611
611
  const G = dr(
@@ -620,7 +620,7 @@ const ho = () => {
620
620
  }).catch(() => {
621
621
  h([]), b(0);
622
622
  }).finally(() => a(!1));
623
- }, [n, D, s, t]), {
623
+ }, [n, D, c, t]), {
624
624
  search: n,
625
625
  setSearch: o,
626
626
  loading: r,
@@ -658,8 +658,8 @@ const ho = () => {
658
658
  const [n, o] = $({}), {
659
659
  loading: r,
660
660
  setSearch: a,
661
- totalMatches: s,
662
- currentMatchPosition: c,
661
+ totalMatches: c,
662
+ currentMatchPosition: s,
663
663
  currentMatch: u,
664
664
  search: l,
665
665
  matches: d,
@@ -676,8 +676,8 @@ const ho = () => {
676
676
  setSearchOptions: o,
677
677
  loading: r,
678
678
  setSearch: a,
679
- totalMatches: s,
680
- currentMatchPosition: c,
679
+ totalMatches: c,
680
+ currentMatchPosition: s,
681
681
  currentMatch: u,
682
682
  nextMatch: f,
683
683
  prevMatch: h,
@@ -703,7 +703,7 @@ const ho = () => {
703
703
  "rp-page": "_rp-page_h7a2q_1",
704
704
  "rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
705
705
  }, go = (t) => {
706
- const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = W(null), { pages: a } = X(), { rotate: s } = Ke(), c = W(), { currentZoom: u } = Xe();
706
+ const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = W(null), { pages: a } = X(), { rotate: c } = Ke(), s = W(), { currentZoom: u } = Xe();
707
707
  return O(() => {
708
708
  if (!a || u === 0)
709
709
  return;
@@ -711,24 +711,24 @@ const ho = () => {
711
711
  if (r.current && l) {
712
712
  const d = r.current;
713
713
  d.hidden = !0;
714
- const f = c.current;
715
- f && f.cancel(), o && o(), c.current = gt(l.page, d, {
714
+ const f = s.current;
715
+ f && f.cancel(), o && o(), s.current = gt(l.page, d, {
716
716
  scale: u,
717
- rotate: s,
717
+ rotate: c,
718
718
  renderForms: !0
719
- }), c.current.promise.then(() => {
719
+ }), s.current.promise.then(() => {
720
720
  d.hidden = !1;
721
721
  }).catch((h) => {
722
722
  }).finally(() => {
723
723
  n && n();
724
724
  });
725
725
  }
726
- }, [a, e, s, u, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
726
+ }, [a, e, c, u, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
727
727
  }, st = {
728
728
  "rp-text-layer": "_rp-text-layer_kwwfn_1",
729
729
  "rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
730
730
  }, vo = (t) => {
731
- const { pageNumber: e } = t, { pages: n } = X(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: s } = Sn(), [c, u] = $(
731
+ const { pageNumber: e } = t, { pages: n } = X(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = Sn(), [s, u] = $(
732
732
  []
733
733
  ), l = W(), d = W(), f = W(), h = k(() => r.filter((_) => _.pageIndex === e - 1), [r, e]), g = x(
734
734
  (_, b, v = !1) => {
@@ -743,16 +743,16 @@ const ho = () => {
743
743
  );
744
744
  return O(() => {
745
745
  var v;
746
- if ((v = f.current) == null || v.classList.remove("selected"), !c.length || !a || a.pageIndex !== e - 1)
746
+ if ((v = f.current) == null || v.classList.remove("selected"), !s.length || !a || a.pageIndex !== e - 1)
747
747
  return;
748
748
  const _ = h.findIndex(
749
749
  (w) => JSON.stringify(w) === JSON.stringify(a)
750
750
  );
751
751
  if (_ === -1)
752
752
  return;
753
- const b = c.find((w) => w.index === _);
754
- b && (f.current = b.element, s(b.element), b.element.classList.add("selected"));
755
- }, [a, c, h]), O(() => {
753
+ const b = s.find((w) => w.index === _);
754
+ b && (f.current = b.element, c(b.element), b.element.classList.add("selected"));
755
+ }, [a, s, h]), O(() => {
756
756
  const _ = n.get(e);
757
757
  if (!(!_ || !o.current))
758
758
  return l.current && l.current.cancel(), _.page.getTextContent().then((b) => {
@@ -794,25 +794,25 @@ const ho = () => {
794
794
  };
795
795
  let wo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
796
796
  const bo = (t) => {
797
- const { pageNumber: e } = t, n = W(null), { pages: o, pdf: r } = X(), a = W(), [s, c] = $(), { setFocusedPage: u, goToPage: l } = ce(), { scrollMode: d } = Oe(), { print: f } = et(), { download: h } = Gn(), g = k(() => o.get(e), [o, e]), _ = k(() => g == null ? void 0 : g.page.getViewport(), [g]);
797
+ const { pageNumber: e } = t, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] = $(), { setFocusedPage: u, goToPage: l } = ce(), { scrollMode: d } = Oe(), { print: f } = et(), { download: h } = Gn(), g = k(() => o.get(e), [o, e]), _ = k(() => g == null ? void 0 : g.page.getViewport(), [g]);
798
798
  O(() => {
799
799
  a.current && (a.current.div.replaceChildren(), a.current = void 0);
800
800
  }, [r]), O(() => {
801
801
  g && g.page.getAnnotations().then((v) => {
802
- a.current = void 0, c(v), n.current && (n.current.innerText = "");
802
+ a.current = void 0, s(v), n.current && (n.current.innerText = "");
803
803
  });
804
804
  }, [g]);
805
805
  const b = x(
806
806
  (v) => {
807
- !s || !r || (Rr(v), Lr(v, r, s).then((w) => {
807
+ !c || !r || (Rr(v), Lr(v, r, c).then((w) => {
808
808
  var m, T;
809
809
  ((m = w == null ? void 0 : w.data) == null ? void 0 : m.action) === "Print" ? f() : ((T = w == null ? void 0 : w.data) == null ? void 0 : T.action) === "SaveAs" && h();
810
- }), d === K.PAGE_SCROLLING ? Ft(v, s, r, (w) => u(w.pageIndex + 1)) : Ft(v, s, r, (w) => l(w.pageIndex + 1)));
810
+ }), d === K.PAGE_SCROLLING ? Ft(v, c, r, (w) => u(w.pageIndex + 1)) : Ft(v, c, r, (w) => l(w.pageIndex + 1)));
811
811
  },
812
- [r, s, l, u, d, f, h]
812
+ [r, c, l, u, d, f, h]
813
813
  );
814
814
  return O(() => {
815
- if (!g || !s)
815
+ if (!g || !c)
816
816
  return;
817
817
  const v = g.page.getViewport();
818
818
  if (a.current) {
@@ -822,7 +822,7 @@ const bo = (t) => {
822
822
  return;
823
823
  }
824
824
  const w = /* @__PURE__ */ new Map([]);
825
- for (const I of s) {
825
+ for (const I of c) {
826
826
  const { annotationType: p } = I;
827
827
  switch (p) {
828
828
  case At.Link:
@@ -848,7 +848,7 @@ const bo = (t) => {
848
848
  if (m.signal.aborted)
849
849
  throw "abort";
850
850
  return a.current.render({
851
- annotations: s,
851
+ annotations: c,
852
852
  annotationStorage: r == null ? void 0 : r.annotationStorage,
853
853
  hasJSActions: I,
854
854
  fieldObjects: p,
@@ -869,7 +869,7 @@ const bo = (t) => {
869
869
  }), () => {
870
870
  m.abort("clear"), n.current && kt(n.current, b);
871
871
  };
872
- }, [r, s, b]), /* @__PURE__ */ i(
872
+ }, [r, c, b]), /* @__PURE__ */ i(
873
873
  "div",
874
874
  {
875
875
  "data-rp": `page-${e}-annotationLayer`,
@@ -882,11 +882,11 @@ const bo = (t) => {
882
882
  "rp-text-highlight-layer": "_rp-text-highlight-layer_1470i_1",
883
883
  "rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1470i_9"
884
884
  }, Co = ({ pageNumber: t }) => {
885
- const e = W(null), n = W(), o = W(), { pages: r } = X(), { highlightMatches: a } = vr(), s = k(() => a.filter((l) => l.pageIndex === t - 1), [a]), c = x(
885
+ const e = W(null), n = W(), o = W(), { pages: r } = X(), { highlightMatches: a } = vr(), c = k(() => a.filter((l) => l.pageIndex === t - 1), [a]), s = x(
886
886
  (u, l, d = !1) => {
887
- d && dn(u, l), pr(s, u, l);
887
+ d && dn(u, l), pr(c, u, l);
888
888
  },
889
- [s, r, t]
889
+ [c, r, t]
890
890
  );
891
891
  return O(() => {
892
892
  const u = r.get(t);
@@ -904,7 +904,7 @@ const bo = (t) => {
904
904
  h.classList.add(ct["rp-text-highlight-layer-text"]);
905
905
  });
906
906
  const d = (f = n.current) == null ? void 0 : f.textDivs;
907
- d && o.current && c(o.current, d);
907
+ d && o.current && s(o.current, d);
908
908
  }).catch(() => {
909
909
  }), () => {
910
910
  var l;
@@ -916,8 +916,8 @@ const bo = (t) => {
916
916
  f.classList.add(ct["rp-text-highlight-layer-text"]);
917
917
  });
918
918
  const l = (d = n.current) == null ? void 0 : d.textDivs;
919
- l && o.current && c(o.current, l, !0);
920
- }, [c]), /* @__PURE__ */ i(Ee, { children: /* @__PURE__ */ i(
919
+ l && o.current && s(o.current, l, !0);
920
+ }, [s]), /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ i(
921
921
  "div",
922
922
  {
923
923
  "data-rp": `page-${t}-textHighlightLayer`,
@@ -926,18 +926,18 @@ const bo = (t) => {
926
926
  }
927
927
  ) });
928
928
  }, To = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))), Rt = Be((t, e) => {
929
- const { pageNumber: n, style: o, onIntersectRatioChange: r, ...a } = t, { pages: s } = X(), { rotate: c } = Ke(), { textLayer: u } = sr(), { currentZoom: l } = Xe(), d = W(s.get(n)), [f, h] = $(!1), g = W(null), [_, b] = $({
929
+ const { pageNumber: n, style: o, onIntersectRatioChange: r, ...a } = t, { pages: c } = X(), { rotate: s } = Ke(), { textLayer: u } = sr(), { currentZoom: l } = Xe(), d = W(c.get(n)), [f, h] = $(!1), g = W(null), [_, b] = $({
930
930
  width: 0,
931
931
  height: 0
932
932
  });
933
933
  sn(e, () => g.current), O(() => {
934
- if (s && (d.current = s.get(n), d.current)) {
935
- const T = d.current.page.getViewport({ scale: l, rotation: c });
934
+ if (c && (d.current = c.get(n), d.current)) {
935
+ const T = d.current.page.getViewport({ scale: l, rotation: s });
936
936
  b(T);
937
937
  }
938
- }, [s, n, c, l]);
938
+ }, [c, n, s, l]);
939
939
  const v = k(() => {
940
- switch (c) {
940
+ switch (s) {
941
941
  case 90:
942
942
  return `${_.width / 2}px ${_.width / 2}px`;
943
943
  case -90:
@@ -946,7 +946,7 @@ const bo = (t) => {
946
946
  default:
947
947
  return "center";
948
948
  }
949
- }, [c, _]), w = x(() => {
949
+ }, [s, _]), w = x(() => {
950
950
  h(!0);
951
951
  }, []), m = x(() => {
952
952
  h(!1);
@@ -961,7 +961,7 @@ const bo = (t) => {
961
961
  return g.current && T.observe(g.current), () => {
962
962
  T.disconnect(), r(n, -1);
963
963
  };
964
- }, [r, n, c, _]), /* @__PURE__ */ i(
964
+ }, [r, n, s, _]), /* @__PURE__ */ i(
965
965
  "div",
966
966
  {
967
967
  ref: g,
@@ -970,7 +970,7 @@ const bo = (t) => {
970
970
  ...a,
971
971
  style: {
972
972
  ...o,
973
- "--rp-rotate": `${c}deg`,
973
+ "--rp-rotate": `${s}deg`,
974
974
  "--rp-page-rotate-translate": `${v}`,
975
975
  "--scale-factor": l
976
976
  },
@@ -1035,12 +1035,12 @@ function Io(t, e) {
1035
1035
  function lt(t, e) {
1036
1036
  e === void 0 && (e = Io);
1037
1037
  var n, o = [], r, a = !1;
1038
- function s() {
1039
- for (var c = [], u = 0; u < arguments.length; u++)
1040
- c[u] = arguments[u];
1041
- return a && n === this && e(c, o) || (r = t.apply(this, c), a = !0, n = this, o = c), r;
1038
+ function c() {
1039
+ for (var s = [], u = 0; u < arguments.length; u++)
1040
+ s[u] = arguments[u];
1041
+ return a && n === this && e(s, o) || (r = t.apply(this, s), a = !0, n = this, o = s), r;
1042
1042
  }
1043
- return s;
1043
+ return c;
1044
1044
  }
1045
1045
  function Zt(t, e) {
1046
1046
  if (t == null)
@@ -1080,15 +1080,15 @@ function Ro(t) {
1080
1080
  }
1081
1081
  return ut;
1082
1082
  }
1083
- var Re = null;
1083
+ var Le = null;
1084
1084
  function Kt(t) {
1085
- if (t === void 0 && (t = !1), Re === null || t) {
1085
+ if (t === void 0 && (t = !1), Le === null || t) {
1086
1086
  var e = document.createElement("div"), n = e.style;
1087
1087
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
1088
1088
  var o = document.createElement("div"), r = o.style;
1089
- return r.width = "100px", r.height = "100px", e.appendChild(o), document.body.appendChild(e), e.scrollLeft > 0 ? Re = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? Re = "negative" : Re = "positive-ascending"), document.body.removeChild(e), Re;
1089
+ return r.width = "100px", r.height = "100px", e.appendChild(o), document.body.appendChild(e), e.scrollLeft > 0 ? Le = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? Le = "negative" : Le = "positive-ascending"), document.body.removeChild(e), Le;
1090
1090
  }
1091
- return Re;
1091
+ return Le;
1092
1092
  }
1093
1093
  var Lo = 150, No = function(e) {
1094
1094
  var n = e.columnIndex;
@@ -1098,7 +1098,7 @@ var Lo = 150, No = function(e) {
1098
1098
  }, He = null, $e = null, Ge = null;
1099
1099
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (He = /* @__PURE__ */ new WeakSet(), $e = /* @__PURE__ */ new WeakSet(), Ge = /* @__PURE__ */ new WeakSet());
1100
1100
  function Eo(t) {
1101
- var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, s = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, l = t.getOffsetForRowAndAlignment, d = t.getRowHeight, f = t.getRowOffset, h = t.getRowStartIndexForOffset, g = t.getRowStopIndexForStartIndex, _ = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, v = t.validateProps;
1101
+ var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, s = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, l = t.getOffsetForRowAndAlignment, d = t.getRowHeight, f = t.getRowOffset, h = t.getRowStartIndexForOffset, g = t.getRowStopIndexForStartIndex, _ = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, v = t.validateProps;
1102
1102
  return e = /* @__PURE__ */ function(w) {
1103
1103
  Po(m, w);
1104
1104
  function m(I) {
@@ -1205,7 +1205,7 @@ function Eo(t) {
1205
1205
  }, T.scrollToItem = function(p) {
1206
1206
  var P = p.align, C = P === void 0 ? "auto" : P, S = p.columnIndex, A = p.rowIndex, R = this.props, D = R.columnCount, L = R.height, F = R.rowCount, E = R.width, y = this.state, N = y.scrollLeft, G = y.scrollTop, U = Ro();
1207
1207
  S !== void 0 && (S = Math.max(0, Math.min(S, D - 1))), A !== void 0 && (A = Math.max(0, Math.min(A, F - 1)));
1208
- var Z = s(this.props, this._instanceProps), ee = c(this.props, this._instanceProps), j = ee > E ? U : 0, J = Z > L ? U : 0;
1208
+ var Z = c(this.props, this._instanceProps), ee = s(this.props, this._instanceProps), j = ee > E ? U : 0, J = Z > L ? U : 0;
1209
1209
  this.scrollTo({
1210
1210
  scrollLeft: S !== void 0 ? u(this.props, S, C, N, this._instanceProps, J) : N,
1211
1211
  scrollTop: A !== void 0 ? l(this.props, A, C, G, this._instanceProps, j) : G
@@ -1258,7 +1258,7 @@ function Eo(t) {
1258
1258
  rowIndex: pe,
1259
1259
  style: this._getItemStyle(pe, ge)
1260
1260
  }));
1261
- var Ce = s(this.props, this._instanceProps), tt = c(this.props, this._instanceProps);
1261
+ var Ce = c(this.props, this._instanceProps), tt = s(this.props, this._instanceProps);
1262
1262
  return Me(G || U || "div", {
1263
1263
  className: C,
1264
1264
  onScroll: this._onScroll,
@@ -1311,9 +1311,9 @@ function Eo(t) {
1311
1311
  }, e;
1312
1312
  }
1313
1313
  var Oo = function(e, n) {
1314
- var o = e.children, r = e.direction, a = e.height, s = e.innerTagName, c = e.outerTagName, u = e.overscanColumnsCount, l = e.overscanCount, d = e.overscanRowsCount, f = e.width, h = n.instance;
1314
+ var o = e.children, r = e.direction, a = e.height, c = e.innerTagName, s = e.outerTagName, u = e.overscanColumnsCount, l = e.overscanCount, d = e.overscanRowsCount, f = e.width, h = n.instance;
1315
1315
  if (process.env.NODE_ENV !== "production") {
1316
- if (typeof l == "number" && He && !He.has(h) && (He.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof d == "number") && $e && !$e.has(h) && ($e.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (s != null || c != null) && Ge && !Ge.has(h) && (Ge.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1316
+ if (typeof l == "number" && He && !He.has(h) && (He.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof d == "number") && $e && !$e.has(h) && ($e.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ge && !Ge.has(h) && (Ge.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1317
1317
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1318
1318
  switch (r) {
1319
1319
  case "ltr":
@@ -1328,31 +1328,31 @@ var Oo = function(e, n) {
1328
1328
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1329
1329
  }
1330
1330
  }, Xt = 50, In = function(e, n) {
1331
- var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, s = n.lastMeasuredRowIndex, c = 0;
1332
- if (s >= o && (s = o - 1), s >= 0) {
1333
- var u = r[s];
1334
- c = u.offset + u.size;
1331
+ var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, c = n.lastMeasuredRowIndex, s = 0;
1332
+ if (c >= o && (c = o - 1), c >= 0) {
1333
+ var u = r[c];
1334
+ s = u.offset + u.size;
1335
1335
  }
1336
- var l = o - s - 1, d = l * a;
1337
- return c + d;
1336
+ var l = o - c - 1, d = l * a;
1337
+ return s + d;
1338
1338
  }, yn = function(e, n) {
1339
- var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, s = n.lastMeasuredColumnIndex, c = 0;
1340
- if (s >= o && (s = o - 1), s >= 0) {
1341
- var u = r[s];
1342
- c = u.offset + u.size;
1339
+ var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, c = n.lastMeasuredColumnIndex, s = 0;
1340
+ if (c >= o && (c = o - 1), c >= 0) {
1341
+ var u = r[c];
1342
+ s = u.offset + u.size;
1343
1343
  }
1344
- var l = o - s - 1, d = l * a;
1345
- return c + d;
1344
+ var l = o - c - 1, d = l * a;
1345
+ return s + d;
1346
1346
  }, ve = function(e, n, o, r) {
1347
- var a, s, c;
1348
- if (e === "column" ? (a = r.columnMetadataMap, s = n.columnWidth, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, s = n.rowHeight, c = r.lastMeasuredRowIndex), o > c) {
1347
+ var a, c, s;
1348
+ if (e === "column" ? (a = r.columnMetadataMap, c = n.columnWidth, s = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = n.rowHeight, s = r.lastMeasuredRowIndex), o > s) {
1349
1349
  var u = 0;
1350
- if (c >= 0) {
1351
- var l = a[c];
1350
+ if (s >= 0) {
1351
+ var l = a[s];
1352
1352
  u = l.offset + l.size;
1353
1353
  }
1354
- for (var d = c + 1; d <= o; d++) {
1355
- var f = s(d);
1354
+ for (var d = s + 1; d <= o; d++) {
1355
+ var f = c(d);
1356
1356
  a[d] = {
1357
1357
  offset: u,
1358
1358
  size: f
@@ -1362,24 +1362,24 @@ var Oo = function(e, n) {
1362
1362
  }
1363
1363
  return a[o];
1364
1364
  }, Jt = function(e, n, o, r) {
1365
- var a, s;
1366
- e === "column" ? (a = o.columnMetadataMap, s = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, s = o.lastMeasuredRowIndex);
1367
- var c = s > 0 ? a[s].offset : 0;
1368
- return c >= r ? xn(e, n, o, s, 0, r) : Do(e, n, o, Math.max(0, s), r);
1369
- }, xn = function(e, n, o, r, a, s) {
1365
+ var a, c;
1366
+ e === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
1367
+ var s = c > 0 ? a[c].offset : 0;
1368
+ return s >= r ? xn(e, n, o, c, 0, r) : Do(e, n, o, Math.max(0, c), r);
1369
+ }, xn = function(e, n, o, r, a, c) {
1370
1370
  for (; a <= r; ) {
1371
- var c = a + Math.floor((r - a) / 2), u = ve(e, n, c, o).offset;
1372
- if (u === s)
1373
- return c;
1374
- u < s ? a = c + 1 : u > s && (r = c - 1);
1371
+ var s = a + Math.floor((r - a) / 2), u = ve(e, n, s, o).offset;
1372
+ if (u === c)
1373
+ return s;
1374
+ u < c ? a = s + 1 : u > c && (r = s - 1);
1375
1375
  }
1376
1376
  return a > 0 ? a - 1 : 0;
1377
1377
  }, Do = function(e, n, o, r, a) {
1378
- for (var s = e === "column" ? n.columnCount : n.rowCount, c = 1; r < s && ve(e, n, r, o).offset < a; )
1379
- r += c, c *= 2;
1380
- return xn(e, n, o, Math.min(r, s - 1), Math.floor(r / 2), a);
1381
- }, Yt = function(e, n, o, r, a, s, c) {
1382
- var u = e === "column" ? n.width : n.height, l = ve(e, n, o, s), d = e === "column" ? yn(n, s) : In(n, s), f = Math.max(0, Math.min(d - u, l.offset)), h = Math.max(0, l.offset - u + c + l.size);
1378
+ for (var c = e === "column" ? n.columnCount : n.rowCount, s = 1; r < c && ve(e, n, r, o).offset < a; )
1379
+ r += s, s *= 2;
1380
+ return xn(e, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
1381
+ }, Yt = function(e, n, o, r, a, c, s) {
1382
+ var u = e === "column" ? n.width : n.height, l = ve(e, n, o, c), d = e === "column" ? yn(n, c) : In(n, c), f = Math.max(0, Math.min(d - u, l.offset)), h = Math.max(0, l.offset - u + s + l.size);
1383
1383
  switch (r === "smart" && (a >= h - u && a <= f + u ? r = "auto" : r = "center"), r) {
1384
1384
  case "start":
1385
1385
  return f;
@@ -1399,7 +1399,7 @@ var Oo = function(e, n) {
1399
1399
  return Jt("column", e, o, n);
1400
1400
  },
1401
1401
  getColumnStopIndexForStartIndex: function(e, n, o, r) {
1402
- for (var a = e.columnCount, s = e.width, c = ve("column", e, n, r), u = o + s, l = c.offset + c.size, d = n; d < a - 1 && l < u; )
1402
+ for (var a = e.columnCount, c = e.width, s = ve("column", e, n, r), u = o + c, l = s.offset + s.size, d = n; d < a - 1 && l < u; )
1403
1403
  d++, l += ve("column", e, d, r).size;
1404
1404
  return d;
1405
1405
  },
@@ -1408,11 +1408,11 @@ var Oo = function(e, n) {
1408
1408
  },
1409
1409
  getEstimatedTotalHeight: In,
1410
1410
  getEstimatedTotalWidth: yn,
1411
- getOffsetForColumnAndAlignment: function(e, n, o, r, a, s) {
1412
- return Yt("column", e, n, o, r, a, s);
1411
+ getOffsetForColumnAndAlignment: function(e, n, o, r, a, c) {
1412
+ return Yt("column", e, n, o, r, a, c);
1413
1413
  },
1414
- getOffsetForRowAndAlignment: function(e, n, o, r, a, s) {
1415
- return Yt("row", e, n, o, r, a, s);
1414
+ getOffsetForRowAndAlignment: function(e, n, o, r, a, c) {
1415
+ return Yt("row", e, n, o, r, a, c);
1416
1416
  },
1417
1417
  getRowOffset: function(e, n, o) {
1418
1418
  return ve("row", e, n, o).offset;
@@ -1424,12 +1424,12 @@ var Oo = function(e, n) {
1424
1424
  return Jt("row", e, o, n);
1425
1425
  },
1426
1426
  getRowStopIndexForStartIndex: function(e, n, o, r) {
1427
- for (var a = e.rowCount, s = e.height, c = ve("row", e, n, r), u = o + s, l = c.offset + c.size, d = n; d < a - 1 && l < u; )
1427
+ for (var a = e.rowCount, c = e.height, s = ve("row", e, n, r), u = o + c, l = s.offset + s.size, d = n; d < a - 1 && l < u; )
1428
1428
  d++, l += ve("row", e, d, r).size;
1429
1429
  return d;
1430
1430
  },
1431
1431
  initInstanceProps: function(e, n) {
1432
- var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, s = {
1432
+ var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, c = {
1433
1433
  columnMetadataMap: {},
1434
1434
  estimatedColumnWidth: r || Xt,
1435
1435
  estimatedRowHeight: a || Xt,
@@ -1437,20 +1437,20 @@ var Oo = function(e, n) {
1437
1437
  lastMeasuredRowIndex: -1,
1438
1438
  rowMetadataMap: {}
1439
1439
  };
1440
- return n.resetAfterColumnIndex = function(c, u) {
1440
+ return n.resetAfterColumnIndex = function(s, u) {
1441
1441
  u === void 0 && (u = !0), n.resetAfterIndices({
1442
- columnIndex: c,
1442
+ columnIndex: s,
1443
1443
  shouldForceUpdate: u
1444
1444
  });
1445
- }, n.resetAfterRowIndex = function(c, u) {
1445
+ }, n.resetAfterRowIndex = function(s, u) {
1446
1446
  u === void 0 && (u = !0), n.resetAfterIndices({
1447
- rowIndex: c,
1447
+ rowIndex: s,
1448
1448
  shouldForceUpdate: u
1449
1449
  });
1450
- }, n.resetAfterIndices = function(c) {
1451
- var u = c.columnIndex, l = c.rowIndex, d = c.shouldForceUpdate, f = d === void 0 ? !0 : d;
1452
- typeof u == "number" && (s.lastMeasuredColumnIndex = Math.min(s.lastMeasuredColumnIndex, u - 1)), typeof l == "number" && (s.lastMeasuredRowIndex = Math.min(s.lastMeasuredRowIndex, l - 1)), n._getItemStyleCache(-1), f && n.forceUpdate();
1453
- }, s;
1450
+ }, n.resetAfterIndices = function(s) {
1451
+ var u = s.columnIndex, l = s.rowIndex, d = s.shouldForceUpdate, f = d === void 0 ? !0 : d;
1452
+ typeof u == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, u - 1)), typeof l == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, l - 1)), n._getItemStyleCache(-1), f && n.forceUpdate();
1453
+ }, c;
1454
1454
  },
1455
1455
  shouldResetStyleCacheOnItemSizeChange: !1,
1456
1456
  validateProps: function(e) {
@@ -1482,17 +1482,17 @@ const Wo = () => {
1482
1482
  const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { setColumnCount: n } = ln(), { virtualScrollableElementRef: o } = Ye(), r = Pt(), a = x(
1483
1483
  (g) => r.widths[g] || 0,
1484
1484
  [r.widths]
1485
- ), s = x(
1485
+ ), c = x(
1486
1486
  (g) => r.heights[g] || 0,
1487
1487
  [r.heights]
1488
- ), c = k(() => r.heights.length, [r.heights]), u = k(() => Math.max(...r.widths), [r.widths]), l = k(() => e === K.HORIZONTAL_SCROLLING ? c : t === Ve.DUAL_PAGE ? 2 : 1, [t, e, e, c, o, u]);
1488
+ ), s = k(() => r.heights.length, [r.heights]), u = k(() => Math.max(...r.widths), [r.widths]), l = k(() => e === K.HORIZONTAL_SCROLLING ? s : t === Ve.DUAL_PAGE ? 2 : 1, [t, e, e, s, o, u]);
1489
1489
  O(() => {
1490
1490
  n(l);
1491
1491
  }, [l, n]);
1492
- const d = k(() => e === K.HORIZONTAL_SCROLLING || e === K.PAGE_SCROLLING ? 1 : Math.round(c / l), [l, c, e]), f = k(() => r.heights.reduce((g, _) => g + _, 0) / r.heights.length || 0, [r]), h = k(() => r.widths.reduce((g, _) => g + _, 0) / r.heights.length || 0, [r]);
1492
+ const d = k(() => e === K.HORIZONTAL_SCROLLING || e === K.PAGE_SCROLLING ? 1 : Math.round(s / l), [l, s, e]), f = k(() => r.heights.reduce((g, _) => g + _, 0) / r.heights.length || 0, [r]), h = k(() => r.widths.reduce((g, _) => g + _, 0) / r.heights.length || 0, [r]);
1493
1493
  return {
1494
1494
  rowCount: d,
1495
- rowHeight: s,
1495
+ rowHeight: c,
1496
1496
  columnCount: l,
1497
1497
  columnWidth: a,
1498
1498
  pageDimension: r,
@@ -1517,19 +1517,19 @@ pt == null || nn == null ? (bt = dt, Ct = function(e) {
1517
1517
  return [n, o];
1518
1518
  });
1519
1519
  function Mo(t) {
1520
- let e, n, o, r, a, s, c;
1520
+ let e, n, o, r, a, c, s;
1521
1521
  const u = typeof document < "u" && document.attachEvent;
1522
1522
  if (!u) {
1523
- s = function(w) {
1523
+ c = function(w) {
1524
1524
  const m = w.__resizeTriggers__, T = m.firstElementChild, I = m.lastElementChild, p = T.firstElementChild;
1525
1525
  I.scrollLeft = I.scrollWidth, I.scrollTop = I.scrollHeight, p.style.width = T.offsetWidth + 1 + "px", p.style.height = T.offsetHeight + 1 + "px", T.scrollLeft = T.scrollWidth, T.scrollTop = T.scrollHeight;
1526
1526
  }, a = function(w) {
1527
1527
  return w.offsetWidth !== w.__resizeLast__.width || w.offsetHeight !== w.__resizeLast__.height;
1528
- }, c = function(w) {
1528
+ }, s = function(w) {
1529
1529
  if (w.target.className && typeof w.target.className.indexOf == "function" && w.target.className.indexOf("contract-trigger") < 0 && w.target.className.indexOf("expand-trigger") < 0)
1530
1530
  return;
1531
1531
  const m = this;
1532
- s(this), this.__resizeRAF__ && bt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
1532
+ c(this), this.__resizeRAF__ && bt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
1533
1533
  a(m) && (m.__resizeLast__.width = m.offsetWidth, m.__resizeLast__.height = m.offsetHeight, m.__resizeListeners__.forEach(function(p) {
1534
1534
  p.call(m, w);
1535
1535
  }));
@@ -1568,8 +1568,8 @@ function Mo(t) {
1568
1568
  const v = _.createElement("div");
1569
1569
  v.className = "expand-trigger", v.appendChild(_.createElement("div"));
1570
1570
  const w = _.createElement("div");
1571
- w.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(w), h.appendChild(h.__resizeTriggers__), s(h), h.addEventListener("scroll", c, !0), o && (h.__resizeTriggers__.__animationListener__ = function(T) {
1572
- T.animationName === n && s(h);
1571
+ w.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(w), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(T) {
1572
+ T.animationName === n && c(h);
1573
1573
  }, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
1574
1574
  }
1575
1575
  h.__resizeListeners__.push(g);
@@ -1579,7 +1579,7 @@ function Mo(t) {
1579
1579
  if (u)
1580
1580
  h.detachEvent("onresize", g);
1581
1581
  else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(g), 1), !h.__resizeListeners__.length) {
1582
- h.removeEventListener("scroll", c, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
1582
+ h.removeEventListener("scroll", s, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
1583
1583
  try {
1584
1584
  h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
1585
1585
  } catch {
@@ -1603,7 +1603,7 @@ class Ho extends or {
1603
1603
  onResize: r
1604
1604
  } = this.props;
1605
1605
  if (this._parentNode) {
1606
- const a = window.getComputedStyle(this._parentNode) || {}, s = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), l = parseFloat(a.paddingBottom || "0"), d = this._parentNode.getBoundingClientRect(), f = d.height - u - l, h = d.width - s - c, g = this._parentNode.offsetHeight - u - l, _ = this._parentNode.offsetWidth - s - c;
1606
+ const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), l = parseFloat(a.paddingBottom || "0"), d = this._parentNode.getBoundingClientRect(), f = d.height - u - l, h = d.width - c - s, g = this._parentNode.offsetHeight - u - l, _ = this._parentNode.offsetWidth - c - s;
1607
1607
  (!n && (this.state.height !== g || this.state.scaledHeight !== f) || !o && (this.state.width !== _ || this.state.scaledWidth !== h)) && (this.setState({
1608
1608
  height: g,
1609
1609
  width: _,
@@ -1642,8 +1642,8 @@ class Ho extends or {
1642
1642
  defaultWidth: o,
1643
1643
  disableHeight: r = !1,
1644
1644
  disableWidth: a = !1,
1645
- doNotBailOutOnEmptyChildren: s = !1,
1646
- nonce: c,
1645
+ doNotBailOutOnEmptyChildren: c = !1,
1646
+ nonce: s,
1647
1647
  onResize: u,
1648
1648
  style: l = {},
1649
1649
  tagName: d = "div",
@@ -1657,7 +1657,7 @@ class Ho extends or {
1657
1657
  overflow: "visible"
1658
1658
  }, w = {};
1659
1659
  let m = !1;
1660
- return r || (h === 0 && (m = !0), v.height = 0, w.height = h, w.scaledHeight = g), a || (b === 0 && (m = !0), v.width = 0, w.width = b, w.scaledWidth = _), s && (m = !1), Me(d, {
1660
+ return r || (h === 0 && (m = !0), v.height = 0, w.height = h, w.scaledHeight = g), a || (b === 0 && (m = !0), v.width = 0, w.width = b, w.scaledWidth = _), c && (m = !1), Me(d, {
1661
1661
  ref: this._setRef,
1662
1662
  style: {
1663
1663
  ...v,
@@ -1675,7 +1675,7 @@ const $o = ({ widths: t, heights: e }) => {
1675
1675
  u.push(d);
1676
1676
  }
1677
1677
  return u;
1678
- }, [n, o]), s = k(() => [
1678
+ }, [n, o]), c = k(() => [
1679
1679
  {
1680
1680
  position: "absolute",
1681
1681
  left: 0,
@@ -1693,9 +1693,9 @@ const $o = ({ widths: t, heights: e }) => {
1693
1693
  O(() => {
1694
1694
  r.current = !1;
1695
1695
  }, [n]);
1696
- const c = k(() => s.reduce((u, l) => u + Number(l.width || 0), 0), [s]);
1697
- return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: a.map((u, l) => /* @__PURE__ */ i(Rt, { onIntersectRatioChange: () => {
1698
- }, style: s[l], pageNumber: u }, u)) });
1696
+ const s = k(() => c.reduce((u, l) => u + Number(l.width || 0), 0), [c]);
1697
+ return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((u, l) => /* @__PURE__ */ i(Rt, { onIntersectRatioChange: () => {
1698
+ }, style: c[l], pageNumber: u }, u)) });
1699
1699
  }, Go = ({ widths: t, heights: e }) => {
1700
1700
  const { focusedPage: n } = ce(), { isScrolling: o } = Qe(), r = k(() => ({
1701
1701
  position: "absolute",
@@ -1737,12 +1737,12 @@ const $o = ({ widths: t, heights: e }) => {
1737
1737
  r
1738
1738
  );
1739
1739
  }, ko), _s = () => {
1740
- const { initialPage: t = 1, initialScrollMode: e } = lr(), { pagesRef: n, setPagesRef: o } = ye();
1740
+ const { initialPage: t = 1, initialScrollMode: e } = lr(), { pagesRef: n, setPagesRef: o } = xe();
1741
1741
  Dr(n);
1742
1742
  const { scrollToPage: r } = _n(), {
1743
1743
  virtualScrollRef: a,
1744
- getVirtualScrollRef: s,
1745
- getPageScrollElementRef: c,
1744
+ getVirtualScrollRef: c,
1745
+ getPageScrollElementRef: s,
1746
1746
  getVirtualScrollableElementRef: u,
1747
1747
  setTotalInnerDimensions: l,
1748
1748
  virtualScrollableElementRef: d,
@@ -1919,7 +1919,7 @@ const $o = ({ widths: t, heights: e }) => {
1919
1919
  ]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: Jn, children: /* @__PURE__ */ i(Ho, { style: { minHeight: "50px" }, children: ({ width: M, height: H }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Yn, style: { width: M, height: H }, children: m === K.PAGE_SCROLLING ? /* @__PURE__ */ i(
1920
1920
  "div",
1921
1921
  {
1922
- ref: c,
1922
+ ref: s,
1923
1923
  style: { width: M, height: H },
1924
1924
  className: oe(he["rp-pages"], he["rp-page-scrolling-wrapper"]),
1925
1925
  children: T === Ve.DUAL_PAGE ? /* @__PURE__ */ i($o, { widths: N, heights: E }) : /* @__PURE__ */ i(Go, { widths: N, heights: E })
@@ -1927,7 +1927,7 @@ const $o = ({ widths: t, heights: e }) => {
1927
1927
  ) : G ? /* @__PURE__ */ i(
1928
1928
  zo,
1929
1929
  {
1930
- ref: s,
1930
+ ref: c,
1931
1931
  itemData: ge,
1932
1932
  outerRef: u,
1933
1933
  innerRef: I,
@@ -1977,18 +1977,18 @@ const $o = ({ widths: t, heights: e }) => {
1977
1977
  const { nextIcon: t } = fe();
1978
1978
  return t || /* @__PURE__ */ i(ke, { style: { transform: "rotate(180deg" } });
1979
1979
  }, Zo = () => {
1980
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ce(), [s, c] = $(t.toString()), { pageNavigationTool: u = !0 } = _e(), { isSmallScreen: l } = xe(), { localeMessages: d } = me();
1980
+ const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ce(), [c, s] = $(t.toString()), { pageNavigationTool: u = !0 } = _e(), { isSmallScreen: l } = Re(), { localeMessages: d } = me();
1981
1981
  O(() => {
1982
- c(t.toString());
1982
+ s(t.toString());
1983
1983
  }, [t]);
1984
1984
  const f = x((b) => {
1985
1985
  const v = b.target.value;
1986
- c(v);
1986
+ s(v);
1987
1987
  }, []), h = x(async () => {
1988
- const b = await a(s);
1989
- b.success || c(b.currentPage.toString());
1990
- }, [a, s, e]), g = x(() => {
1991
- c(t.toString());
1988
+ const b = await a(c);
1989
+ b.success || s(b.currentPage.toString());
1990
+ }, [a, c, e]), g = x(() => {
1991
+ s(t.toString());
1992
1992
  }, [t]), _ = x(
1993
1993
  (b) => {
1994
1994
  b.key === "Enter" && h();
@@ -2021,7 +2021,7 @@ const $o = ({ widths: t, heights: e }) => {
2021
2021
  onKeyDown: _,
2022
2022
  onBlur: g,
2023
2023
  onChange: f,
2024
- value: s,
2024
+ value: c,
2025
2025
  className: ht["rp-page-input"]
2026
2026
  }
2027
2027
  ) }),
@@ -2047,8 +2047,8 @@ var Lt = "Dialog", [Rn, ws] = Hr(Lt), [jo, le] = Rn(Lt), Ln = (t) => {
2047
2047
  open: o,
2048
2048
  defaultOpen: r,
2049
2049
  onOpenChange: a,
2050
- modal: s = !0
2051
- } = t, c = V.useRef(null), u = V.useRef(null), [l = !1, d] = Vr({
2050
+ modal: c = !0
2051
+ } = t, s = V.useRef(null), u = V.useRef(null), [l = !1, d] = Vr({
2052
2052
  prop: o,
2053
2053
  defaultProp: r,
2054
2054
  onChange: a
@@ -2057,7 +2057,7 @@ var Lt = "Dialog", [Rn, ws] = Hr(Lt), [jo, le] = Rn(Lt), Ln = (t) => {
2057
2057
  jo,
2058
2058
  {
2059
2059
  scope: e,
2060
- triggerRef: c,
2060
+ triggerRef: s,
2061
2061
  contentRef: u,
2062
2062
  contentId: it(),
2063
2063
  titleId: it(),
@@ -2065,7 +2065,7 @@ var Lt = "Dialog", [Rn, ws] = Hr(Lt), [jo, le] = Rn(Lt), Ln = (t) => {
2065
2065
  open: l,
2066
2066
  onOpenChange: d,
2067
2067
  onOpenToggle: V.useCallback(() => d((f) => !f), [d]),
2068
- modal: s,
2068
+ modal: c,
2069
2069
  children: n
2070
2070
  }
2071
2071
  );
@@ -2094,7 +2094,7 @@ var Nt = "DialogPortal", [Ko, En] = Rn(Nt, {
2094
2094
  forceMount: void 0
2095
2095
  }), On = (t) => {
2096
2096
  const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = le(Nt, e);
2097
- return /* @__PURE__ */ i(Ko, { scope: e, forceMount: n, children: V.Children.map(o, (s) => /* @__PURE__ */ i(yt, { present: n || a.open, children: /* @__PURE__ */ i(Kr, { asChild: !0, container: r, children: s }) })) });
2097
+ return /* @__PURE__ */ i(Ko, { scope: e, forceMount: n, children: V.Children.map(o, (c) => /* @__PURE__ */ i(yt, { present: n || a.open, children: /* @__PURE__ */ i(Kr, { asChild: !0, container: r, children: c }) })) });
2098
2098
  };
2099
2099
  On.displayName = Nt;
2100
2100
  var qe = "DialogOverlay", Dn = V.forwardRef(
@@ -2121,16 +2121,16 @@ var Xo = V.forwardRef(
2121
2121
  ) })
2122
2122
  );
2123
2123
  }
2124
- ), Ie = "DialogContent", zn = V.forwardRef(
2124
+ ), ye = "DialogContent", zn = V.forwardRef(
2125
2125
  (t, e) => {
2126
- const n = En(Ie, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = le(Ie, t.__scopeDialog);
2126
+ const n = En(ye, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = le(ye, t.__scopeDialog);
2127
2127
  return /* @__PURE__ */ i(yt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(Jo, { ...r, ref: e }) : /* @__PURE__ */ i(Yo, { ...r, ref: e }) });
2128
2128
  }
2129
2129
  );
2130
- zn.displayName = Ie;
2130
+ zn.displayName = ye;
2131
2131
  var Jo = V.forwardRef(
2132
2132
  (t, e) => {
2133
- const n = le(Ie, t.__scopeDialog), o = V.useRef(null), r = It(e, n.contentRef, o);
2133
+ const n = le(ye, t.__scopeDialog), o = V.useRef(null), r = It(e, n.contentRef, o);
2134
2134
  return V.useEffect(() => {
2135
2135
  const a = o.current;
2136
2136
  if (a)
@@ -2143,12 +2143,12 @@ var Jo = V.forwardRef(
2143
2143
  trapFocus: n.open,
2144
2144
  disableOutsidePointerEvents: !0,
2145
2145
  onCloseAutoFocus: Fe(t.onCloseAutoFocus, (a) => {
2146
- var s;
2147
- a.preventDefault(), (s = n.triggerRef.current) == null || s.focus();
2146
+ var c;
2147
+ a.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
2148
2148
  }),
2149
2149
  onPointerDownOutside: Fe(t.onPointerDownOutside, (a) => {
2150
- const s = a.detail.originalEvent, c = s.button === 0 && s.ctrlKey === !0;
2151
- (s.button === 2 || c) && a.preventDefault();
2150
+ const c = a.detail.originalEvent, s = c.button === 0 && c.ctrlKey === !0;
2151
+ (c.button === 2 || s) && a.preventDefault();
2152
2152
  }),
2153
2153
  onFocusOutside: Fe(
2154
2154
  t.onFocusOutside,
@@ -2159,7 +2159,7 @@ var Jo = V.forwardRef(
2159
2159
  }
2160
2160
  ), Yo = V.forwardRef(
2161
2161
  (t, e) => {
2162
- const n = le(Ie, t.__scopeDialog), o = V.useRef(!1), r = V.useRef(!1);
2162
+ const n = le(ye, t.__scopeDialog), o = V.useRef(!1), r = V.useRef(!1);
2163
2163
  return /* @__PURE__ */ i(
2164
2164
  An,
2165
2165
  {
@@ -2168,22 +2168,22 @@ var Jo = V.forwardRef(
2168
2168
  trapFocus: !1,
2169
2169
  disableOutsidePointerEvents: !1,
2170
2170
  onCloseAutoFocus: (a) => {
2171
- var s, c;
2172
- (s = t.onCloseAutoFocus) == null || s.call(t, a), a.defaultPrevented || (o.current || (c = n.triggerRef.current) == null || c.focus(), a.preventDefault()), o.current = !1, r.current = !1;
2171
+ var c, s;
2172
+ (c = t.onCloseAutoFocus) == null || c.call(t, a), a.defaultPrevented || (o.current || (s = n.triggerRef.current) == null || s.focus(), a.preventDefault()), o.current = !1, r.current = !1;
2173
2173
  },
2174
2174
  onInteractOutside: (a) => {
2175
2175
  var u, l;
2176
2176
  (u = t.onInteractOutside) == null || u.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
2177
- const s = a.target;
2178
- ((l = n.triggerRef.current) == null ? void 0 : l.contains(s)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2177
+ const c = a.target;
2178
+ ((l = n.triggerRef.current) == null ? void 0 : l.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2179
2179
  }
2180
2180
  }
2181
2181
  );
2182
2182
  }
2183
2183
  ), An = V.forwardRef(
2184
2184
  (t, e) => {
2185
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...s } = t, c = le(Ie, n), u = V.useRef(null), l = It(e, u);
2186
- return jr(), /* @__PURE__ */ z(Ee, { children: [
2185
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = t, s = le(ye, n), u = V.useRef(null), l = It(e, u);
2186
+ return jr(), /* @__PURE__ */ z(Ie, { children: [
2187
2187
  /* @__PURE__ */ i(
2188
2188
  Br,
2189
2189
  {
@@ -2196,20 +2196,20 @@ var Jo = V.forwardRef(
2196
2196
  Ur,
2197
2197
  {
2198
2198
  role: "dialog",
2199
- id: c.contentId,
2200
- "aria-describedby": c.descriptionId,
2201
- "aria-labelledby": c.titleId,
2202
- "data-state": Ot(c.open),
2203
- ...s,
2199
+ id: s.contentId,
2200
+ "aria-describedby": s.descriptionId,
2201
+ "aria-labelledby": s.titleId,
2202
+ "data-state": Ot(s.open),
2203
+ ...c,
2204
2204
  ref: l,
2205
- onDismiss: () => c.onOpenChange(!1)
2205
+ onDismiss: () => s.onOpenChange(!1)
2206
2206
  }
2207
2207
  )
2208
2208
  }
2209
2209
  ),
2210
- /* @__PURE__ */ z(Ee, { children: [
2211
- /* @__PURE__ */ i(ei, { titleId: c.titleId }),
2212
- /* @__PURE__ */ i(ni, { contentRef: u, descriptionId: c.descriptionId })
2210
+ /* @__PURE__ */ z(Ie, { children: [
2211
+ /* @__PURE__ */ i(ei, { titleId: s.titleId }),
2212
+ /* @__PURE__ */ i(ni, { contentRef: u, descriptionId: s.descriptionId })
2213
2213
  ] })
2214
2214
  ] });
2215
2215
  }
@@ -2246,7 +2246,7 @@ function Ot(t) {
2246
2246
  return t ? "open" : "closed";
2247
2247
  }
2248
2248
  var Hn = "DialogTitleWarning", [bs, $n] = Gr(Hn, {
2249
- contentName: Ie,
2249
+ contentName: ye,
2250
2250
  titleName: Et,
2251
2251
  docsSlug: "dialog"
2252
2252
  }), ei = ({ titleId: t }) => {
@@ -2275,12 +2275,12 @@ const Se = {
2275
2275
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2276
2276
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2277
2277
  }, li = () => {
2278
- const { pdfProperties: t } = X(), { container: e } = ye(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = Jr(), { localeMessages: r } = me(), a = k(() => {
2278
+ const { pdfProperties: t } = X(), { container: e } = xe(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = Jr(), { localeMessages: r } = me(), a = k(() => {
2279
2279
  if (!t)
2280
2280
  return [];
2281
2281
  const {
2282
- fileSize: s,
2283
- filename: c,
2282
+ fileSize: c,
2283
+ filename: s,
2284
2284
  title: u,
2285
2285
  author: l,
2286
2286
  subject: d,
@@ -2293,8 +2293,8 @@ const Se = {
2293
2293
  pageCount: w
2294
2294
  } = t;
2295
2295
  return [
2296
- { label: r == null ? void 0 : r.propertiesFilenameLabel, value: c },
2297
- { label: r == null ? void 0 : r.propertiesFileSizeLabel, value: s },
2296
+ { label: r == null ? void 0 : r.propertiesFilenameLabel, value: s },
2297
+ { label: r == null ? void 0 : r.propertiesFileSizeLabel, value: c },
2298
2298
  { separate: !0 },
2299
2299
  { label: r == null ? void 0 : r.propertiesTitleLabel, value: u },
2300
2300
  { label: r == null ? void 0 : r.propertiesAuthorLabel, value: l },
@@ -2319,7 +2319,7 @@ const Se = {
2319
2319
  /* @__PURE__ */ i(ii, { className: Se["rp-dialog-overlay"] }),
2320
2320
  /* @__PURE__ */ z(ai, { className: Se["rp-document-dialog"], children: [
2321
2321
  /* @__PURE__ */ i(si, { className: Se["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2322
- /* @__PURE__ */ i("div", { className: Se["rp-document-properties"], children: a.map((s, c) => /* @__PURE__ */ i("div", { children: s.separate ? /* @__PURE__ */ i("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ i(Xr, { label: s.label, value: s.value }) }, c)) }),
2322
+ /* @__PURE__ */ i("div", { className: Se["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ i(Xr, { label: c.label, value: c.value }) }, s)) }),
2323
2323
  /* @__PURE__ */ i(ci, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ i(fn, {}) })
2324
2324
  ] })
2325
2325
  ] }) }) });
@@ -2343,7 +2343,7 @@ const Se = {
2343
2343
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Vn, {}) }),
2344
2344
  e == null ? void 0 : e.downloadFileLabel
2345
2345
  ] }) }), qn = () => {
2346
- const { download: t } = Gn(), { downloadTool: e = !0 } = _e(), { isSmallScreen: n } = xe(), { localeMessages: o } = me();
2346
+ const { download: t } = Gn(), { downloadTool: e = !0 } = _e(), { isSmallScreen: n } = Re(), { localeMessages: o } = me();
2347
2347
  return e ? n ? /* @__PURE__ */ i(mi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(hi, { download: t, localeMessages: o }) : null : null;
2348
2348
  }, Zn = () => {
2349
2349
  const { printIcon: t } = fe();
@@ -2352,9 +2352,9 @@ const Se = {
2352
2352
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Zn, {}) }),
2353
2353
  e == null ? void 0 : e.printLabel
2354
2354
  ] }) }), Bn = () => {
2355
- const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = et(), { printTool: s = !0 } = _e(), { isSmallScreen: c } = xe(), { localeMessages: u } = me();
2356
- return s ? c ? /* @__PURE__ */ i(gi, { print: t, localeMessages: u }) : typeof s == "function" ? /* @__PURE__ */ i(
2357
- s,
2355
+ const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = et(), { printTool: c = !0 } = _e(), { isSmallScreen: s } = Re(), { localeMessages: u } = me();
2356
+ return c ? s ? /* @__PURE__ */ i(gi, { print: t, localeMessages: u }) : typeof c == "function" ? /* @__PURE__ */ i(
2357
+ c,
2358
2358
  {
2359
2359
  print: t,
2360
2360
  cancel: e,
@@ -2363,7 +2363,7 @@ const Se = {
2363
2363
  setOnComplete: o,
2364
2364
  progress: a
2365
2365
  }
2366
- ) : s ? /* @__PURE__ */ i(fi, { print: t, localeMessages: u }) : null : null;
2366
+ ) : c ? /* @__PURE__ */ i(fi, { print: t, localeMessages: u }) : null : null;
2367
2367
  }, vi = {
2368
2368
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2369
2369
  }, _i = () => {
@@ -2373,36 +2373,36 @@ const Se = {
2373
2373
  const { goToLastPageIcon: t } = fe();
2374
2374
  return t || /* @__PURE__ */ i(vn, {});
2375
2375
  }, rn = { width: "100%" }, bi = () => {
2376
- const { goToPage: t, totalPages: e, focusedPage: n } = ce(), { jumpNavigationTool: o = !0 } = _e(), { localeMessages: r } = me(), a = k(() => n === 1, [n]), s = k(() => n === e, [n, e]), c = x(() => {
2376
+ const { goToPage: t, totalPages: e, focusedPage: n } = ce(), { jumpNavigationTool: o = !0 } = _e(), { localeMessages: r } = me(), a = k(() => n === 1, [n]), c = k(() => n === e, [n, e]), s = x(() => {
2377
2377
  t(1);
2378
2378
  }, [t]), u = x(() => {
2379
2379
  t(e);
2380
2380
  }, [t, e]);
2381
2381
  return o ? /* @__PURE__ */ z(Ue, { children: [
2382
- /* @__PURE__ */ i(we, { onClick: c, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2382
+ /* @__PURE__ */ i(we, { onClick: s, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2383
2383
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(_i, {}) }),
2384
2384
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
2385
2385
  ] }) }) }),
2386
- /* @__PURE__ */ i(we, { onClick: u, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": s, children: [
2386
+ /* @__PURE__ */ i(we, { onClick: u, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2387
2387
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(wi, {}) }),
2388
2388
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
2389
2389
  ] }) }) }),
2390
2390
  /* @__PURE__ */ i(xt, {})
2391
2391
  ] }) : null;
2392
2392
  }, Ci = () => {
2393
- const { container: t } = ye(), { isSmallScreen: e } = xe(), {
2393
+ const { container: t } = xe(), { isSmallScreen: e } = Re(), {
2394
2394
  openFileTool: n,
2395
2395
  downloadTool: o,
2396
2396
  documentProperties: r,
2397
2397
  scrollModeTool: a,
2398
- rotateTool: s,
2399
- selectionModeTool: c,
2398
+ rotateTool: c,
2399
+ selectionModeTool: s,
2400
2400
  jumpNavigationTool: u,
2401
2401
  printTool: l,
2402
2402
  fullscreenTool: d
2403
2403
  } = _e(), { localeMessages: f } = me();
2404
2404
  return k(() => {
2405
- const g = u || s || c || a || r;
2405
+ const g = u || c || s || a || r;
2406
2406
  let _ = !1;
2407
2407
  return e && (_ = !(!n && !o && !l && !d)), g || _;
2408
2408
  }, [
@@ -2410,8 +2410,8 @@ const Se = {
2410
2410
  o,
2411
2411
  r,
2412
2412
  a,
2413
- s,
2414
2413
  c,
2414
+ s,
2415
2415
  u,
2416
2416
  e
2417
2417
  ]) ? /* @__PURE__ */ z(Yr, { children: [
@@ -2439,10 +2439,10 @@ const Se = {
2439
2439
  /* @__PURE__ */ i(li, {})
2440
2440
  ] }) : null;
2441
2441
  }, Ti = () => {
2442
- const { isSmallScreen: t } = xe();
2443
- return /* @__PURE__ */ z(Ee, { children: [
2442
+ const { isSmallScreen: t } = Re();
2443
+ return /* @__PURE__ */ z(Ie, { children: [
2444
2444
  /* @__PURE__ */ i(Wr, {}),
2445
- !t && /* @__PURE__ */ z(Ee, { children: [
2445
+ !t && /* @__PURE__ */ z(Ie, { children: [
2446
2446
  /* @__PURE__ */ i(hn, {}),
2447
2447
  /* @__PURE__ */ i(qn, {}),
2448
2448
  /* @__PURE__ */ i(Bn, {}),
@@ -2450,7 +2450,7 @@ const Se = {
2450
2450
  ] }),
2451
2451
  /* @__PURE__ */ i(Ci, {})
2452
2452
  ] });
2453
- }, Le = {
2453
+ }, Ne = {
2454
2454
  "rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
2455
2455
  "rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_cocqs_6",
2456
2456
  "rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
@@ -2463,7 +2463,7 @@ const Se = {
2463
2463
  const { zoomOutIcon: t } = fe();
2464
2464
  return t || /* @__PURE__ */ i(ao, {});
2465
2465
  }, xi = () => {
2466
- const { zoomLevel: t, setZoomLevel: e } = Xe(), { container: n, contentRef: o } = ye(), { zoomTool: r = !0 } = _e(), { focusedPage: a } = ce(), { rotate: s } = Ke(), { pages: c } = X(), { isSmallScreen: u } = xe(), { localeMessages: l } = me(), d = x(() => {
2466
+ const { zoomLevel: t, setZoomLevel: e } = Xe(), { container: n, contentRef: o } = xe(), { zoomTool: r = !0 } = _e(), { focusedPage: a } = ce(), { rotate: c } = Ke(), { pages: s } = X(), { isSmallScreen: u } = Re(), { localeMessages: l } = me(), d = x(() => {
2467
2467
  e((w) => {
2468
2468
  const m = Math.floor(w / 25) * 25;
2469
2469
  return Math.min(m + 25, mt);
@@ -2475,8 +2475,8 @@ const Se = {
2475
2475
  });
2476
2476
  }, [e]), h = k(() => t === Pi, [t]), g = k(() => t === mt, [t]), _ = k(() => {
2477
2477
  var w;
2478
- return (w = c.get(a)) == null ? void 0 : w.page.getViewport({ scale: 1, rotation: s });
2479
- }, [c, a, s]), b = x(
2478
+ return (w = s.get(a)) == null ? void 0 : w.page.getViewport({ scale: 1, rotation: c });
2479
+ }, [s, a, c]), b = x(
2480
2480
  (w) => {
2481
2481
  const m = ((_ == null ? void 0 : _.width) || 0) + 2 * $t, T = ((_ == null ? void 0 : _.height) || 0) + 2 * $t, I = (o == null ? void 0 : o.clientWidth) || 0, p = (o == null ? void 0 : o.clientHeight) || 0, P = so(w, I, p, m, T);
2482
2482
  e(P);
@@ -2488,7 +2488,7 @@ const Se = {
2488
2488
  },
2489
2489
  [e, b]
2490
2490
  );
2491
- return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ z("div", { className: Le["rp-zoom-wrapper"], children: [
2491
+ return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ z("div", { className: Ne["rp-zoom-wrapper"], children: [
2492
2492
  /* @__PURE__ */ i(q, { content: l == null ? void 0 : l.zoomOutTooltip, children: /* @__PURE__ */ i(
2493
2493
  te,
2494
2494
  {
@@ -2505,18 +2505,18 @@ const Se = {
2505
2505
  triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: l == null ? void 0 : l.zoomSelectTooltip, children: /* @__PURE__ */ z(
2506
2506
  te,
2507
2507
  {
2508
- className: Le["rp-current-zoom-wrapper"],
2508
+ className: Ne["rp-current-zoom-wrapper"],
2509
2509
  "aria-label": l == null ? void 0 : l.zoomSelectTooltip,
2510
2510
  children: [
2511
- /* @__PURE__ */ i("span", { className: Le["rp-current-zoom-text"], children: t }),
2512
- /* @__PURE__ */ i("span", { className: Le["rp-current-zoom-text"], children: "%" }),
2513
- /* @__PURE__ */ i(ke, { className: Le["rp-current-zoom-icon"] })
2511
+ /* @__PURE__ */ i("span", { className: Ne["rp-current-zoom-text"], children: t }),
2512
+ /* @__PURE__ */ i("span", { className: Ne["rp-current-zoom-text"], children: "%" }),
2513
+ /* @__PURE__ */ i(ke, { className: Ne["rp-current-zoom-icon"] })
2514
2514
  ]
2515
2515
  }
2516
2516
  ) }) }),
2517
2517
  style: { minWidth: "200px" },
2518
2518
  align: "center",
2519
- children: /* @__PURE__ */ z("div", { className: Le["rp-zoom-dropdown-content"], children: [
2519
+ children: /* @__PURE__ */ z("div", { className: Ne["rp-zoom-dropdown-content"], children: [
2520
2520
  /* @__PURE__ */ z(Ue, { children: [
2521
2521
  /* @__PURE__ */ i(we, { onClick: () => v(ot.ACTUAL), children: l == null ? void 0 : l.zoomActualSize }),
2522
2522
  /* @__PURE__ */ i(we, { onClick: () => v(ot.PAGE_FIT), children: l == null ? void 0 : l.zoomPageFit }),
@@ -2554,9 +2554,9 @@ const Se = {
2554
2554
  const { searchIcon: t } = fe();
2555
2555
  return t || /* @__PURE__ */ i(co, {});
2556
2556
  }, Ri = () => {
2557
- const { container: t } = ye(), [e, n] = $(!1), { pdf: o } = X(), [r, a] = $(null), {
2558
- searchOptions: s,
2559
- setSearchOptions: c,
2557
+ const { container: t } = xe(), [e, n] = $(!1), { pdf: o } = X(), [r, a] = $(null), {
2558
+ searchOptions: c,
2559
+ setSearchOptions: s,
2560
2560
  loading: u,
2561
2561
  setSearch: l,
2562
2562
  totalMatches: d,
@@ -2591,20 +2591,20 @@ const Se = {
2591
2591
  w(y.target.value);
2592
2592
  }, []), A = x(() => {
2593
2593
  w(""), l("");
2594
- }, [l]), R = k(() => `${f} / ${d}`, [f, d]), { wholeWords: D, matchCase: L } = k(() => s, [s]), F = x(
2594
+ }, [l]), R = k(() => `${f} / ${d}`, [f, d]), { wholeWords: D, matchCase: L } = k(() => c, [c]), F = x(
2595
2595
  (y) => {
2596
- c((N) => ({ ...N, matchCase: y }));
2596
+ s((N) => ({ ...N, matchCase: y }));
2597
2597
  },
2598
- [c]
2598
+ [s]
2599
2599
  ), E = x(
2600
2600
  (y) => {
2601
- c((N) => ({ ...N, wholeWords: y }));
2601
+ s((N) => ({ ...N, wholeWords: y }));
2602
2602
  },
2603
- [c]
2603
+ [s]
2604
2604
  );
2605
2605
  return O(() => {
2606
2606
  I();
2607
- }, [o, I]), b ? /* @__PURE__ */ i(Ee, { children: /* @__PURE__ */ i(
2607
+ }, [o, I]), b ? /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ i(
2608
2608
  uo,
2609
2609
  {
2610
2610
  open: e,
@@ -2663,7 +2663,7 @@ const Se = {
2663
2663
  ] })
2664
2664
  }
2665
2665
  ) }) : null;
2666
- }, Li = "_loading_1ln1d_1", Ne = {
2666
+ }, Li = "_loading_1ln1d_1", Ee = {
2667
2667
  "rp-loading-overlay": "_rp-loading-overlay_1ln1d_1",
2668
2668
  "rp-loading-modal": "_rp-loading-modal_1ln1d_14",
2669
2669
  "rp-loading-title": "_rp-loading-title_1ln1d_27",
@@ -2673,24 +2673,24 @@ const Se = {
2673
2673
  loading: Li
2674
2674
  }, Ni = ({ percentage: t }) => {
2675
2675
  const { cancel: e } = et(), { localeMessages: n } = me();
2676
- return t < 1 ? null : /* @__PURE__ */ i("div", { className: oe(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ z("div", { className: oe(Ne["rp-loading-modal"]), children: [
2677
- /* @__PURE__ */ z("div", { className: oe(Ne["rp-loading-title"]), children: [
2676
+ return t < 1 ? null : /* @__PURE__ */ i("div", { className: oe(Ee["rp-loading-overlay"]), children: /* @__PURE__ */ z("div", { className: oe(Ee["rp-loading-modal"]), children: [
2677
+ /* @__PURE__ */ z("div", { className: oe(Ee["rp-loading-title"]), children: [
2678
2678
  n == null ? void 0 : n.printLoadingMessage,
2679
2679
  "..."
2680
2680
  ] }),
2681
- /* @__PURE__ */ i("div", { className: oe(Ne["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
2681
+ /* @__PURE__ */ i("div", { className: oe(Ee["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
2682
2682
  "div",
2683
2683
  {
2684
- className: oe(Ne["rp-loading-progress"]),
2684
+ className: oe(Ee["rp-loading-progress"]),
2685
2685
  style: { width: `${t}%` }
2686
2686
  }
2687
2687
  ) }),
2688
- /* @__PURE__ */ i("button", { className: oe(Ne["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
2688
+ /* @__PURE__ */ i("button", { className: oe(Ee["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
2689
2689
  ] }) });
2690
2690
  }, Ei = Be((t, e) => {
2691
- const { showPrintProgress: n } = _e(), { progress: o } = et(), { isSmallScreen: r } = xe(), { percentage: a } = o || {}, s = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2691
+ const { showPrintProgress: n } = _e(), { progress: o } = et(), { isSmallScreen: r } = Re(), { percentage: a } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2692
2692
  return /* @__PURE__ */ z("div", { children: [
2693
- /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ze["rp-toolbar-content"], children: /* @__PURE__ */ z("div", { className: ze["rp-toolbar-wrapper"], style: s(), children: [
2693
+ /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ze["rp-toolbar-content"], children: /* @__PURE__ */ z("div", { className: ze["rp-toolbar-wrapper"], style: c(), children: [
2694
2694
  /* @__PURE__ */ z("div", { "data-rp": "topBarLeft", className: ze["rp-toolbar-start"], children: [
2695
2695
  /* @__PURE__ */ i(Ri, {}),
2696
2696
  /* @__PURE__ */ i(Zo, {})
@@ -2712,7 +2712,7 @@ const Se = {
2712
2712
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
2713
2713
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
2714
2714
  }, Oi = (t) => {
2715
- const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ce(), s = k(() => o ? Ae["rp-thumbnail-active"] : "", [o]), c = k(() => ({
2715
+ const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ce(), c = k(() => o ? Ae["rp-thumbnail-active"] : "", [o]), s = k(() => ({
2716
2716
  width: Math.round(r.width),
2717
2717
  height: Math.round(r.height)
2718
2718
  }), [r]), u = x(() => {
@@ -2725,12 +2725,12 @@ const Se = {
2725
2725
  id: `page-${n}`,
2726
2726
  className: Ae["rp-thumbnail-wrapper"],
2727
2727
  children: [
2728
- /* @__PURE__ */ i("div", { className: oe(s, Ae["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
2728
+ /* @__PURE__ */ i("div", { className: oe(c, Ae["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
2729
2729
  "img",
2730
2730
  {
2731
2731
  src: e,
2732
- width: c.width,
2733
- height: c.height,
2732
+ width: s.width,
2733
+ height: s.height,
2734
2734
  alt: "thumbnail"
2735
2735
  }
2736
2736
  ) : /* @__PURE__ */ i(
@@ -2738,8 +2738,8 @@ const Se = {
2738
2738
  {
2739
2739
  className: Ae["rp-thumbnail-loader"],
2740
2740
  style: {
2741
- width: `${c.width}px`,
2742
- height: `${c.height}px`
2741
+ width: `${s.width}px`,
2742
+ height: `${s.height}px`
2743
2743
  },
2744
2744
  children: /* @__PURE__ */ i(St, {})
2745
2745
  }
@@ -2755,15 +2755,15 @@ const Se = {
2755
2755
  const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
2756
2756
  t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Di);
2757
2757
  }, Ai = Be((t, e) => {
2758
- const { show: n } = t, { focusedPage: o, totalPages: r } = ce(), { thumbnailPages: a, addPage: s, thumbnailLength: c, addToPage: u } = Tn(), l = W(null), d = W(1);
2758
+ const { show: n } = t, { focusedPage: o, totalPages: r } = ce(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: u } = Tn(), l = W(null), d = W(1);
2759
2759
  sn(e, () => l.current);
2760
2760
  const f = k(() => Object.values(a), [a]), h = x(() => {
2761
- const g = c + 1;
2762
- g <= r && s(g);
2763
- }, [s, r, c]);
2761
+ const g = s + 1;
2762
+ g <= r && c(g);
2763
+ }, [c, r, s]);
2764
2764
  return O(() => {
2765
- o > c ? u(o) : n && d.current !== o && (zi(l.current, o), d.current = o);
2766
- }, [o, c, u, n, f]), wr(l.current, h), /* @__PURE__ */ i("div", { ref: l, className: an["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: an["rp-thumbnails"], children: n ? f.map((g, _) => {
2765
+ o > s ? u(o) : n && d.current !== o && (zi(l.current, o), d.current = o);
2766
+ }, [o, s, u, n, f]), wr(l.current, h), /* @__PURE__ */ i("div", { ref: l, className: an["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: an["rp-thumbnails"], children: n ? f.map((g, _) => {
2767
2767
  var b, v;
2768
2768
  return /* @__PURE__ */ i(
2769
2769
  Oi,
@@ -2781,43 +2781,51 @@ const Se = {
2781
2781
  const { thumbnailIcon: t } = fe();
2782
2782
  return t || /* @__PURE__ */ i(_r, {});
2783
2783
  }, ki = () => {
2784
- const { active: t, setActive: e } = Tn(), [n, o] = $(200), r = W(null), { thumbnailTool: a } = _e(), { localeMessages: s } = me(), c = x(() => {
2785
- e((l) => !l);
2786
- }, []), u = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: c, active: t }) : a ? /* @__PURE__ */ i(q, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
2784
+ const { active: t, setActive: e } = Tn(), [n, o] = $(200), r = W(null), { thumbnailTool: a, sidebarEnable: c } = _e(), { localeMessages: s } = me(), u = x(() => {
2785
+ e((d) => !d);
2786
+ }, []), l = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: t }) : a ? /* @__PURE__ */ i(q, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
2787
2787
  te,
2788
2788
  {
2789
- onClick: c,
2789
+ onClick: u,
2790
2790
  active: t,
2791
2791
  "aria-label": s == null ? void 0 : s.thumbnailTooltip,
2792
2792
  children: /* @__PURE__ */ i(Fi, {})
2793
2793
  }
2794
- ) }) : null, [a, t, c, s]);
2795
- return /* @__PURE__ */ z(
2794
+ ) }) : null, [a, t, u, s]);
2795
+ return /* @__PURE__ */ i(Ie, { children: c && /* @__PURE__ */ z(
2796
2796
  "div",
2797
2797
  {
2798
2798
  style: { "--rp-thumbnail-width": `${n}px` },
2799
2799
  className: ft["rp-sidebar-content-wrapper"],
2800
2800
  "data-rp": "sidebar",
2801
2801
  children: [
2802
- /* @__PURE__ */ i("div", { className: ft["rp-sidebar-content"], children: u }),
2803
- /* @__PURE__ */ z("div", { "data-rp": "thumbnailSidebar", hidden: !t, className: ft["rp-thumbnails-wrapper"], children: [
2804
- /* @__PURE__ */ i(Ai, { show: t, ref: r }),
2805
- /* @__PURE__ */ i(br, { onWidthChange: o, thumbnailRef: r })
2806
- ] })
2802
+ /* @__PURE__ */ i("div", { className: ft["rp-sidebar-content"], children: l }),
2803
+ /* @__PURE__ */ z(
2804
+ "div",
2805
+ {
2806
+ "data-rp": "thumbnailSidebar",
2807
+ hidden: !t,
2808
+ className: ft["rp-thumbnails-wrapper"],
2809
+ children: [
2810
+ /* @__PURE__ */ i(Ai, { show: t, ref: r }),
2811
+ /* @__PURE__ */ i(br, { onWidthChange: o, thumbnailRef: r })
2812
+ ]
2813
+ }
2814
+ )
2807
2815
  ]
2808
2816
  }
2809
- );
2817
+ ) });
2810
2818
  }, Cs = Be((t, e) => {
2811
- const { children: n, slots: o, icons: r, style: a, className: s, mobileWidth: c, onLoaded: u, cleanupOnLoaded: l } = t, [d, f] = $(null), { setContainer: h, setContentRef: g } = ye(), { loading: _ } = X(), { LoaderImageComponent: b } = pn();
2819
+ const { children: n, slots: o, icons: r, style: a, className: c, mobileWidth: s, onLoaded: u, cleanupOnLoaded: l } = t, [d, f] = $(null), { setContainer: h, setContentRef: g } = xe(), { loading: _ } = X(), { LoaderImageComponent: b } = pn();
2812
2820
  return O(() => (u && u(), () => {
2813
2821
  l && l();
2814
- }), [u, l]), /* @__PURE__ */ i("div", { ref: e, className: oe(Pe["rp-theme-variables"], Pe["rp-container"]), children: /* @__PURE__ */ i(yr, { mobileWidth: c, children: /* @__PURE__ */ i(Cr, { slots: o, children: /* @__PURE__ */ i(Tr, { icons: r, children: /* @__PURE__ */ z(
2822
+ }), [u, l]), /* @__PURE__ */ i("div", { ref: e, className: oe(Pe["rp-theme-variables"], Pe["rp-container"]), children: /* @__PURE__ */ i(yr, { mobileWidth: s, children: /* @__PURE__ */ i(Cr, { slots: o, children: /* @__PURE__ */ i(Tr, { icons: r, children: /* @__PURE__ */ z(
2815
2823
  Pr,
2816
2824
  {
2817
2825
  getContainerRef: h,
2818
2826
  toolbarRef: d,
2819
2827
  style: a,
2820
- className: s,
2828
+ className: c,
2821
2829
  children: [
2822
2830
  /* @__PURE__ */ z(Sr, { children: [
2823
2831
  /* @__PURE__ */ z("div", { className: Pe["rp-layout"], children: [