@pdf-viewer/react 1.7.0 → 1.7.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/{RPDefaultLayout-d9b4e8b5.js → RPDefaultLayout-98bac47d.js} +646 -646
  2. package/dist/assets/Button.css +1 -1
  3. package/dist/assets/PasswordModal.css +1 -1
  4. package/dist/assets/RPDefaultLayout.css +1 -1
  5. package/dist/assets/RPTooltip.css +1 -1
  6. package/dist/components/RPController.js +1 -1
  7. package/dist/components/RPPages.js +1 -1
  8. package/dist/components/RPProvider.js +1 -1
  9. package/dist/components/layout/LayoutContainer.js +1 -1
  10. package/dist/components/layout/RPDefaultLayout.js +1 -1
  11. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  12. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  13. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  14. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  15. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  16. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  17. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  18. package/dist/components/layout/toolbar/Paginate.js +1 -1
  19. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  20. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  21. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  22. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  23. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  24. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  25. package/dist/components/page/AnnotationLayer.js +1 -1
  26. package/dist/components/page/CanvasLayer.js +1 -1
  27. package/dist/components/page/DualPage.js +1 -1
  28. package/dist/components/page/RPPage.js +1 -1
  29. package/dist/components/page/SinglePage.js +1 -1
  30. package/dist/components/page/TextHighlightLayer.js +1 -1
  31. package/dist/components/page/TextLayer.js +1 -1
  32. package/dist/components/ui/Button.js +6 -6
  33. package/dist/components/ui/LoadingIndicator.js +1 -1
  34. package/dist/components/ui/PasswordModal.js +21 -21
  35. package/dist/components/ui/RPTooltip.js +35 -35
  36. package/dist/contexts/PaginationContext.js +1 -1
  37. package/dist/contexts/PrintContext.js +1 -1
  38. package/dist/contexts/SearchContext.js +1 -1
  39. package/dist/contexts/ThumbnailsContext.js +1 -1
  40. package/dist/main.js +1 -1
  41. package/dist/types/utils/types.d.ts +5 -1
  42. package/dist/utils/annotations.js +4 -2
  43. package/dist/utils/hooks/useFileDownload.js +1 -1
  44. package/dist/utils/hooks/useLicense.js +1 -1
  45. package/dist/utils/hooks/useLoadPdf.js +12 -12
  46. package/dist/utils/hooks/usePaginate.js +1 -1
  47. package/dist/utils/hooks/usePresentPage.js +1 -1
  48. package/dist/utils/hooks/usePrint.js +1 -1
  49. package/dist/utils/hooks/useScrollToPage.js +1 -1
  50. package/dist/utils/hooks/useSearch.js +1 -1
  51. package/dist/utils/hooks/useThumbnail.js +1 -1
  52. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  53. package/dist/utils/types.js +4 -4
  54. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
- import { jsx as i, Fragment as me, jsxs as F } from "react/jsx-runtime";
1
+ import { jsx as i, Fragment as fe, jsxs as F } from "react/jsx-runtime";
2
2
  import * as B from "react";
3
- import { useRef as H, useEffect as k, useCallback as N, useState as $, useMemo as W, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as Ve, PureComponent as Qn, Component as er, memo as ln } from "react";
3
+ import { useRef as H, useEffect as W, useCallback as N, useState as $, useMemo as k, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as qe, PureComponent as Qn, Component as er, memo as ln } from "react";
4
4
  import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
5
5
  import { UIButton as re } from "./components/ui/Button.js";
6
6
  import { UIInput as dn } from "./components/ui/Input.js";
7
- import { ViewMode as Ie, ScrollMode as J, AnnotationSubType as At, SelectionMode as tr, ZoomLevel as at } from "./utils/types.js";
7
+ import { ViewMode as xe, ScrollMode as J, AnnotationSubType as zt, SelectionMode as tr, ZoomLevel as at } from "./utils/types.js";
8
8
  import { useScrollModeContext as Re } from "./contexts/ScrollModeContext.js";
9
9
  import { useDocumentContext as Q } from "./contexts/RPDocumentContext.js";
10
10
  import { useDocumentPasswordContext as nr } from "./contexts/DocumentPasswordContext.js";
@@ -23,7 +23,7 @@ import "./contexts/DropFileZoneContext.js";
23
23
  import { renderPage as vt } from "./utils/renderPage.js";
24
24
  import { findMatches as cr, resetDivs as lr, highlightMatches as dr, isMatchEntireWord as ur } from "./utils/highlight.js";
25
25
  import { useLayoutContainer as ge } from "./contexts/LayoutContainerContext.js";
26
- import { useDimensionPagesContext as qe } from "./contexts/DimensionPagesContext.js";
26
+ import { useDimensionPagesContext as Ue } from "./contexts/DimensionPagesContext.js";
27
27
  import { useLocalizationContext as se } from "./contexts/LocalizationContext.js";
28
28
  import { useHighlightContext as pr } from "./contexts/HighlightContext.js";
29
29
  import "./contexts/LicenseContext.js";
@@ -31,10 +31,10 @@ import { useDownloadContext as hr } from "./contexts/DownloadContext.js";
31
31
  import { useSmoothScrollContext as pn } from "./contexts/SmoothScrollContext.js";
32
32
  import { useLoaderContext as hn } from "./contexts/LoaderContext.js";
33
33
  import "./components/RPConfig.js";
34
- import { ThumbnailIcon as fr } from "./components/icons/Thumbnail.js";
34
+ import { ThumbnailIcon as mr } from "./components/icons/Thumbnail.js";
35
35
  import { c as ne } from "./clsx-0c6e471a.js";
36
36
  import { LoaderIcon as Ct } from "./components/icons/LoaderIcon.js";
37
- import { useInfiniteScroll as mr } from "./utils/hooks/useInfiniteScroll.js";
37
+ import { useInfiniteScroll as fr } from "./utils/hooks/useInfiniteScroll.js";
38
38
  import { RPSplitter as gr } from "./components/layout/sidebar/RPSplitter.js";
39
39
  import { useToolbarComponentContext as ve, ToolbarComponentProvider as vr } from "./contexts/ToolbarComponentContext.js";
40
40
  import { useIconContext as pe, IconProvider as wr } from "./contexts/IconContext.js";
@@ -45,40 +45,40 @@ import { RPDropFileZone as Cr } from "./components/RPDropFileZone.js";
45
45
  import { useViewportContext as Ce, ViewportProvider as Pr } from "./contexts/ViewportContext.js";
46
46
  import { useThemeContext as Tr } from "./contexts/ThemeContext.js";
47
47
  import * as Sr from "pdfjs-dist";
48
- import { PixelsPerInch as yr, AnnotationMode as xr, RenderingCancelledException as Ir, AnnotationLayer as Lr } from "pdfjs-dist";
48
+ import { PixelsPerInch as yr, AnnotationMode as Ir, RenderingCancelledException as xr, AnnotationLayer as Lr } from "pdfjs-dist";
49
49
  import { SimpleLinkService as Rr } from "./utils/link_service.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
- import { _ as Wr, U as Mr } from "./Popover-b7402893.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 Wr } from "./components/page/searchHighlight.js";
52
+ import { _ as kr, 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";
55
55
  import { usePinch as Gr } from "./utils/hooks/usePinch.js";
56
56
  import { useDebounce as Pt } from "./utils/hooks/useDebounce.js";
57
- import qr from "./components/ui/PasswordModal.js";
58
- import { getPositionFromPage as Ur, getPageFromPosition as Vr } from "./utils/calculatePage.js";
59
- import { getScrollDistance as ze } from "./utils/getScrollDistance.js";
57
+ import Ur from "./components/ui/PasswordModal.js";
58
+ import { getPositionFromPage as Vr, getPageFromPosition as qr } from "./utils/calculatePage.js";
59
+ import { getScrollDistance as Ae } from "./utils/getScrollDistance.js";
60
60
  import { getWordPositionInPage as Br } from "./utils/getWordPositionInPage.js";
61
- import { getThumbnailViewport as kt } from "./utils/getThumbnailViewport.js";
61
+ import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
62
62
  import { smoothScrollTo as st } from "./utils/smoothScrollTo.js";
63
63
  import { appConsole as Zr } from "./utils/appConsole.js";
64
- import { FileUploadTool as fn } from "./components/layout/toolbar/FileUploadTool.js";
64
+ import { FileUploadTool as mn } from "./components/layout/toolbar/FileUploadTool.js";
65
65
  import { DarkModeTool as jr } from "./components/layout/toolbar/DarkModeTool.js";
66
66
  import { ThreeDotIcon as Kr } from "./components/icons/ThreeDotIcon.js";
67
- import { UIDropDown as mn } from "./components/ui/DropDown.js";
68
- import { e as Xr, a as Tt, P as Ue, c as Me, g as St, i as Yr, k as Jr, f as Qr } from "./index-1cb41342.js";
67
+ import { UIDropDown as fn } from "./components/ui/DropDown.js";
68
+ import { e as Xr, a as Tt, P as Ve, c as Me, g as St, i as Yr, k as Jr, f as Qr } from "./index-1cb41342.js";
69
69
  import { D as eo, u as ct } from "./index-aa2d3884.js";
70
70
  import { a as to, u as no, F as ro, b as oo, G as Ke } from "./index-7279fb4e.js";
71
71
  import { h as io } from "./component-1da194e8.js";
72
72
  import { CloseIcon as ao } from "./components/icons/CloseIcon.js";
73
- import { dateFormatter as Wt } from "./utils/dateFormatter.js";
73
+ import { dateFormatter as kt } from "./utils/dateFormatter.js";
74
74
  import { PropertyItem as so } from "./components/layout/toolbar/PropertyItem.js";
75
75
  import { useOtherToolContext as co, OtherToolProvider as lo } from "./contexts/OtherToolContext.js";
76
76
  import { DocumentProperties as uo } from "./components/layout/toolbar/DocumentProperties.js";
77
77
  import { RotateTool as po } from "./components/layout/toolbar/RotateTool.js";
78
78
  import { ViewModeTool as ho } from "./components/layout/toolbar/ViewModeTool.js";
79
- import { ScrollModeTool as fo } from "./components/layout/toolbar/ScrollModeTool.js";
79
+ import { ScrollModeTool as mo } from "./components/layout/toolbar/ScrollModeTool.js";
80
80
  import { MenuSeparator as yt } from "./components/layout/toolbar/MenuSeparator.js";
81
- import { FileDownloadDefaultIcon as mo } from "./components/icons/FileDownloadDefaultIcon.js";
81
+ import { FileDownloadDefaultIcon as fo } from "./components/icons/FileDownloadDefaultIcon.js";
82
82
  import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
83
83
  import { PrintDefaultTool as go } from "./components/icons/PrintDefaultIcon.js";
84
84
  import { FullScreenTool as gn } from "./components/layout/toolbar/FullScreenTool.js";
@@ -94,11 +94,11 @@ import { UICheckbox as $t } from "./components/ui/Checkbox.js";
94
94
  import { ClearIcon as Po } from "./components/icons/ClearIcon.js";
95
95
  import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
96
96
  import './assets/RPDefaultLayout.css';const wn = () => {
97
- const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights: p } = qe(), m = H(e), _ = H(t), h = H(c), { targetScrollPage: v } = pn();
98
- k(() => {
97
+ const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights: p } = Ue(), f = H(e), _ = H(t), h = H(c), { targetScrollPage: v } = pn();
98
+ W(() => {
99
99
  n != null && n.scrollToItem && (l.current = n);
100
- }, [n]), k(() => {
101
- m.current = e, _.current = t;
100
+ }, [n]), W(() => {
101
+ f.current = e, _.current = t;
102
102
  }, [e, t]);
103
103
  const w = N(
104
104
  (P, S) => {
@@ -114,41 +114,41 @@ import './assets/RPDefaultLayout.css';const wn = () => {
114
114
  (s) => st(r, g, s)
115
115
  );
116
116
  }
117
- const f = {
117
+ const m = {
118
118
  left: 0,
119
119
  top: 0
120
120
  };
121
121
  return r == null ? void 0 : r.scrollTo({
122
- ...f,
122
+ ...m,
123
123
  behavior: S
124
124
  });
125
125
  },
126
126
  [r, d, st]
127
127
  );
128
- return k(() => {
129
- m.current = e, _.current = t;
130
- }, [e, t]), k(() => {
128
+ return W(() => {
129
+ f.current = e, _.current = t;
130
+ }, [e, t]), W(() => {
131
131
  h.current = c;
132
132
  }, [c]), { scrollToPage: N(
133
133
  (P, S = "smooth") => {
134
134
  a(P);
135
135
  const u = P - 1;
136
- let f = u, g = 0;
137
- if (_.current === Ie.DUAL_PAGE && m.current === J.PAGE_SCROLLING) {
136
+ let m = u, g = 0;
137
+ if (_.current === xe.DUAL_PAGE && f.current === J.PAGE_SCROLLING) {
138
138
  w(P, S);
139
139
  return;
140
140
  }
141
- if (m.current === J.PAGE_SCROLLING) {
141
+ if (f.current === J.PAGE_SCROLLING) {
142
142
  a(P);
143
143
  return;
144
144
  }
145
145
  if (!l.current || !o)
146
146
  return;
147
147
  const s = o;
148
- if (v.current = P, m.current === J.HORIZONTAL_SCROLLING) {
148
+ if (v.current = P, f.current === J.HORIZONTAL_SCROLLING) {
149
149
  g = u;
150
150
  const y = {
151
- left: ze(d, g),
151
+ left: Ae(d, g),
152
152
  top: 0
153
153
  };
154
154
  return s.scrollTo({
@@ -156,11 +156,11 @@ import './assets/RPDefaultLayout.css';const wn = () => {
156
156
  behavior: S
157
157
  });
158
158
  }
159
- if (_.current === Ie.DUAL_PAGE) {
160
- g = u % 2, f = Math.floor(u / 2);
159
+ if (_.current === xe.DUAL_PAGE) {
160
+ g = u % 2, m = Math.floor(u / 2);
161
161
  const y = {
162
- left: ze(d, g),
163
- top: ze(p, f)
162
+ left: Ae(d, g),
163
+ top: Ae(p, m)
164
164
  };
165
165
  return s.scrollTo({
166
166
  ...y,
@@ -169,7 +169,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
169
169
  }
170
170
  const C = {
171
171
  left: 0,
172
- top: ze(p, f)
172
+ top: Ae(p, m)
173
173
  };
174
174
  return s.scrollTo({
175
175
  ...C,
@@ -187,34 +187,34 @@ import './assets/RPDefaultLayout.css';const wn = () => {
187
187
  ]
188
188
  ) };
189
189
  }, To = (t = 1) => {
190
- const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Re(), { widths: p } = qe(), { pagesRef: m } = ge(), _ = Pt(e, 100), h = N(
191
- (f) => {
192
- if (!/^[0-9]*$/g.test(f.toString()) || !f)
190
+ const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Re(), { widths: p } = Ue(), { pagesRef: f } = ge(), _ = Pt(e, 100), h = N(
191
+ (m) => {
192
+ if (!/^[0-9]*$/g.test(m.toString()) || !m)
193
193
  return { success: !1, currentPage: l.current };
194
- const s = +f;
195
- return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +f });
194
+ const s = +m;
195
+ return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +m });
196
196
  },
197
197
  [o]
198
198
  ), v = N(h, [h]), w = N(
199
- (f) => {
200
- const g = h(f);
199
+ (m) => {
200
+ const g = h(m);
201
201
  return g.success && a(g.currentPage), g;
202
202
  },
203
203
  [h, a]
204
- ), T = N((f) => {
205
- const g = f % 2 === 1;
206
- if (!m || g)
204
+ ), T = N((m) => {
205
+ const g = m % 2 === 1;
206
+ if (!f || g)
207
207
  return !1;
208
- const s = g ? p[f] : p[f - 1], C = g ? p[f + 1] : p[f];
209
- return c === Ie.DUAL_PAGE && s + C < m.clientWidth;
210
- }, [c, p, m, o]), P = N(() => {
211
- let f = e - 1;
212
- T(f) && (f = e - 2), w(f);
213
- }, [w, e, c, d, T]), S = W(() => c === Ie.DUAL_PAGE && d === J.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, d]), u = N(() => {
208
+ const s = g ? p[m] : p[m - 1], C = g ? p[m + 1] : p[m];
209
+ return c === xe.DUAL_PAGE && s + C < f.clientWidth;
210
+ }, [c, p, f, o]), P = N(() => {
211
+ let m = e - 1;
212
+ T(m) && (m = e - 2), w(m);
213
+ }, [w, e, c, d, T]), S = k(() => c === xe.DUAL_PAGE && d === J.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, d]), u = N(() => {
214
214
  if (S)
215
215
  return;
216
- let f = e + 1;
217
- T(f) && (f = e + 2), w(f);
216
+ let m = e + 1;
217
+ T(m) && (m = e + 2), w(m);
218
218
  }, [w, e, T, c, d, S]);
219
219
  return {
220
220
  focusedPage: _,
@@ -242,7 +242,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
242
242
  return typeof (t == null ? void 0 : t.focusedPage) > "u" && Zr.error("Please use this hooks inside children component of RPProvider"), t;
243
243
  }, Ms = ({ children: t }) => {
244
244
  const { pdf: e } = Q(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: c, prevPage: d } = To();
245
- return k(() => {
245
+ return W(() => {
246
246
  e != null && e.numPages && (a(e.numPages), r(1));
247
247
  }, [e, a, r]), /* @__PURE__ */ i(
248
248
  _n.Provider,
@@ -265,24 +265,24 @@ const So = () => {
265
265
  loadedPages: 0,
266
266
  totalPages: 0,
267
267
  percentage: 0
268
- }), [r, a] = $(!1), [l, c] = $(!1), [d, p] = $(null), m = H(!1);
269
- k(() => {
270
- m.current;
271
- }, [m]);
268
+ }), [r, a] = $(!1), [l, c] = $(!1), [d, p] = $(null), f = H(!1);
269
+ W(() => {
270
+ f.current;
271
+ }, [f]);
272
272
  const _ = N(() => {
273
273
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
274
- const f = document.querySelector(".rp-print-zone");
275
- f && f.remove();
274
+ const m = document.querySelector(".rp-print-zone");
275
+ m && m.remove();
276
276
  }, []), h = N(() => {
277
- m.current = !1, a(!1), c(!1), p(null), o({
277
+ f.current = !1, a(!1), c(!1), p(null), o({
278
278
  loadedPages: 0,
279
279
  totalPages: 0,
280
280
  percentage: 0
281
281
  });
282
282
  }, []), v = () => {
283
- m.current = !0;
283
+ f.current = !0;
284
284
  }, w = async ({
285
- scratchCanvas: f,
285
+ scratchCanvas: m,
286
286
  pdfDocument: g,
287
287
  pageNumber: s,
288
288
  viewerPdfPage: C,
@@ -290,42 +290,42 @@ const So = () => {
290
290
  optionalContentConfigPromise: y,
291
291
  printAnnotationStoragePromise: E
292
292
  }) => {
293
- if (m.current) {
293
+ if (f.current) {
294
294
  h();
295
295
  return;
296
296
  }
297
- const x = b / yr.PDF;
298
- f.width = Math.floor(C.width * x), f.height = Math.floor(C.height * x);
299
- const L = f.getContext("2d");
300
- L.save(), L.fillStyle = "rgb(255, 255, 255)", L.fillRect(0, 0, f.width, f.height), L.restore();
301
- const [D, A] = await Promise.all([
297
+ const I = b / yr.PDF;
298
+ m.width = Math.floor(C.width * I), m.height = Math.floor(C.height * I);
299
+ const L = m.getContext("2d");
300
+ L.save(), L.fillStyle = "rgb(255, 255, 255)", L.fillRect(0, 0, m.width, m.height), L.restore();
301
+ const [D, z] = await Promise.all([
302
302
  g.getPage(s),
303
303
  E
304
304
  ]);
305
- if (m.current) {
305
+ if (f.current) {
306
306
  h();
307
307
  return;
308
308
  }
309
- const z = {
309
+ const A = {
310
310
  canvasContext: L,
311
- transform: [x, 0, 0, x, 0, 0],
311
+ transform: [I, 0, 0, I, 0, 0],
312
312
  viewport: D.getViewport({ scale: 1, rotation: C.rotation }),
313
313
  intent: "print",
314
- annotationMode: xr.ENABLE_STORAGE,
314
+ annotationMode: Ir.ENABLE_STORAGE,
315
315
  optionalContentConfigPromise: y,
316
- printAnnotationStorage: A
316
+ printAnnotationStorage: z
317
317
  };
318
318
  try {
319
- return D.render(z).promise;
319
+ return D.render(A).promise;
320
320
  } catch (R) {
321
- throw R instanceof Ir || console.error(R), R;
321
+ throw R instanceof xr || console.error(R), R;
322
322
  }
323
323
  }, T = N(() => {
324
- const f = window.print;
324
+ const m = window.print;
325
325
  return new Promise((g) => {
326
326
  const s = (y) => {
327
327
  setTimeout(() => {
328
- f.call(window), setTimeout(() => y(), 20);
328
+ m.call(window), setTimeout(() => y(), 20);
329
329
  }, 0);
330
330
  };
331
331
  if (document.querySelector(".rp-print-zone")) {
@@ -337,17 +337,17 @@ const So = () => {
337
337
  });
338
338
  b.observe(document.body, { childList: !0, subtree: !0 });
339
339
  });
340
- }, []), P = async (f) => {
340
+ }, []), P = async (m) => {
341
341
  const g = document.createElement("img"), s = document.createElement("div");
342
342
  return s.classList.add("rp-print-page"), await new Promise((C, b) => {
343
- f.toBlob((y) => {
343
+ m.toBlob((y) => {
344
344
  y ? (g.src = URL.createObjectURL(y), g.onload = () => {
345
345
  URL.revokeObjectURL(g.src), C();
346
346
  }, g.onerror = b) : b(new Error("Failed to create blob"));
347
347
  });
348
348
  }).catch(() => {
349
349
  }), s.appendChild(g), s;
350
- }, S = (f, g) => {
350
+ }, S = (m, g) => {
351
351
  const s = document.createElement("div");
352
352
  s.classList.add("rp-print-zone");
353
353
  const C = document.createElement("style"), b = g.get(1);
@@ -355,45 +355,45 @@ const So = () => {
355
355
  const { width: y, height: E } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
356
356
  C.innerHTML = `@page { size: ${y}px ${E}px }`;
357
357
  }
358
- return s.appendChild(C), s.append(...f), s;
358
+ return s.appendChild(C), s.append(...m), s;
359
359
  }, u = N(async () => {
360
360
  if (!t)
361
361
  return;
362
362
  h();
363
- const f = document.createElement("canvas"), g = [];
363
+ const m = document.createElement("canvas"), g = [];
364
364
  try {
365
365
  t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
366
366
  const C = t.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
367
367
  t.annotationStorage.print ?? void 0
368
368
  ), y = e.size;
369
- for (const [x, L] of e) {
370
- if (m.current) {
369
+ for (const [I, L] of e) {
370
+ if (f.current) {
371
371
  h();
372
372
  return;
373
373
  }
374
374
  const D = L.page.getViewport({ scale: 1 });
375
375
  if (await w({
376
- scratchCanvas: f,
376
+ scratchCanvas: m,
377
377
  pdfDocument: t,
378
- pageNumber: x,
378
+ pageNumber: I,
379
379
  viewerPdfPage: D,
380
380
  printResolution: 150,
381
381
  optionalContentConfigPromise: C,
382
382
  printAnnotationStoragePromise: b
383
- }), m.current) {
383
+ }), f.current) {
384
384
  h();
385
385
  return;
386
386
  }
387
- const A = await P(f);
388
- g.push(A);
389
- const z = parseFloat((g.length / y * 100).toFixed(2));
387
+ const z = await P(m);
388
+ g.push(z);
389
+ const A = parseFloat((g.length / y * 100).toFixed(2));
390
390
  o({
391
- loadedPages: x,
391
+ loadedPages: I,
392
392
  totalPages: y,
393
- percentage: z
393
+ percentage: A
394
394
  });
395
395
  }
396
- if (m.current) {
396
+ if (f.current) {
397
397
  h();
398
398
  return;
399
399
  }
@@ -402,15 +402,15 @@ const So = () => {
402
402
  } catch (s) {
403
403
  c(!0), s instanceof Error && p(s);
404
404
  } finally {
405
- f.height = 0, f.width = 0;
405
+ m.height = 0, m.width = 0;
406
406
  }
407
- }, [t, e, m]);
408
- return k(() => {
409
- const f = () => {
407
+ }, [t, e, f]);
408
+ return W(() => {
409
+ const m = () => {
410
410
  h(), _();
411
411
  };
412
- return window.addEventListener("afterprint", f, !0), () => {
413
- window.removeEventListener("afterprint", f, !0);
412
+ return window.addEventListener("afterprint", m, !0), () => {
413
+ window.removeEventListener("afterprint", m, !0);
414
414
  };
415
415
  }, [_, h]), {
416
416
  print: u,
@@ -438,23 +438,23 @@ const So = () => {
438
438
  }
439
439
  }
440
440
  }), Hs = ({ children: t }) => {
441
- const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError: p, error: m } = So(), _ = N((P) => {
441
+ const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError: p, error: f } = So(), _ = N((P) => {
442
442
  P && typeof P == "function" && r(() => P);
443
443
  }, []), h = (P) => {
444
- m && P(m);
444
+ f && P(f);
445
445
  }, v = N(
446
446
  (P) => {
447
447
  n(() => P);
448
448
  },
449
449
  [c, e]
450
450
  );
451
- k(() => {
451
+ W(() => {
452
452
  d && o && w();
453
- }, [d, o]), k(() => {
453
+ }, [d, o]), W(() => {
454
454
  p && h((P) => {
455
455
  console.error(P);
456
456
  });
457
- }, [p]), k(() => {
457
+ }, [p]), W(() => {
458
458
  c && e && e(c);
459
459
  }, [c, e]);
460
460
  const w = () => {
@@ -474,20 +474,20 @@ const So = () => {
474
474
  throw new Error("usePrintContext must be used within a PrintProvider");
475
475
  return t;
476
476
  }, yo = () => {
477
- const [t, e] = $({}), { pages: n } = Q(), { rotate: o } = Ge(), r = W(() => Object.keys(t).length, [t]), a = N(
477
+ const [t, e] = $({}), { pages: n } = Q(), { rotate: o } = Ge(), r = k(() => Object.keys(t).length, [t]), a = N(
478
478
  (c) => {
479
479
  if (!n.size)
480
480
  return;
481
481
  const d = c > n.size ? n.size : c, p = Array.from(n.values()).slice(0, d).map((h) => {
482
- const { thumbnailViewport: v, scale: w } = kt(h.page, o);
482
+ const { thumbnailViewport: v, scale: w } = Wt(h.page, o);
483
483
  return {
484
484
  scale: w,
485
485
  page: h.page,
486
486
  loading: !0,
487
487
  viewport: v
488
488
  };
489
- }), m = p.reduce((h, v) => (h[v.page.pageNumber] = v, h), {});
490
- e(m);
489
+ }), f = p.reduce((h, v) => (h[v.page.pageNumber] = v, h), {});
490
+ e(f);
491
491
  const _ = [];
492
492
  for (const h of p) {
493
493
  const v = document.createElement("canvas"), w = vt(h.page, v, {
@@ -514,7 +514,7 @@ const So = () => {
514
514
  },
515
515
  [n, o]
516
516
  );
517
- k(() => {
517
+ W(() => {
518
518
  a(10);
519
519
  }, [a]);
520
520
  const l = N(
@@ -524,8 +524,8 @@ const So = () => {
524
524
  const d = n.get(c);
525
525
  if (!d)
526
526
  return;
527
- e((m) => ({
528
- ...m,
527
+ e((f) => ({
528
+ ...f,
529
529
  [c]: {
530
530
  loading: !0,
531
531
  page: d.page,
@@ -535,16 +535,16 @@ const So = () => {
535
535
  }));
536
536
  const p = document.createElement("canvas");
537
537
  vt(d.page, p, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
538
- const m = p.toDataURL(), { thumbnailViewport: _, scale: h } = kt(d.page, o);
538
+ const f = p.toDataURL(), { thumbnailViewport: _, scale: h } = Wt(d.page, o);
539
539
  return {
540
540
  scale: h,
541
- thumbnailSrc: m,
541
+ thumbnailSrc: f,
542
542
  page: d.page,
543
543
  loading: !1,
544
544
  viewport: _
545
545
  };
546
- }).then((m) => {
547
- e((_) => ({ ..._, [c]: m }));
546
+ }).then((f) => {
547
+ e((_) => ({ ..._, [c]: f }));
548
548
  });
549
549
  },
550
550
  [n, o]
@@ -572,36 +572,36 @@ const So = () => {
572
572
  children: t
573
573
  }
574
574
  );
575
- }, xo = (t = {}, e = "") => {
576
- const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } = qe(), m = H(!n), { currentZoom: _ } = Qe(), [h, v] = $([]), { setFocusedPage: w } = ie(), { columnCount: T } = Ee(), { rotate: P } = Ge(), [S, u] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Re(), { pagesRef: C } = ge(), [b, y] = $(null), E = H({}), x = W(() => S === 0 ? null : h[S - 1], [S, h]), L = W(() => h.length, [h]);
577
- k(() => {
578
- if (!x || !c)
575
+ }, Io = (t = {}, e = "") => {
576
+ const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } = Ue(), f = H(!n), { currentZoom: _ } = Qe(), [h, v] = $([]), { setFocusedPage: w } = ie(), { columnCount: T } = Ee(), { rotate: P } = Ge(), [S, u] = $(0), { pageScrollElementRef: m, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Re(), { pagesRef: C } = ge(), [b, y] = $(null), E = H({}), I = k(() => S === 0 ? null : h[S - 1], [S, h]), L = k(() => h.length, [h]);
577
+ W(() => {
578
+ if (!I || !c)
579
579
  return;
580
- const R = g || f;
580
+ const R = g || m;
581
581
  if (!R || !C)
582
582
  return;
583
- const I = c.get(x.page);
584
- if (s === J.PAGE_SCROLLING && w(x.page), !I)
583
+ const x = c.get(I.page);
584
+ if (s === J.PAGE_SCROLLING && w(I.page), !x)
585
585
  return;
586
586
  let O = 0, M = 0;
587
587
  if (s === J.VERTICAL_SCROLLING) {
588
- const ae = x.page - 1, de = T, te = ae % de, Fe = Math.floor(ae / de);
589
- O = ze(p, Fe), M = ze(d, te);
588
+ const ae = I.page - 1, de = T, te = ae % de, Fe = Math.floor(ae / de);
589
+ O = Ae(p, Fe), M = Ae(d, te);
590
590
  }
591
- s === J.HORIZONTAL_SCROLLING && (M = d.slice(0, x.page - 1).reduce((ae, de) => ae + de, 0));
591
+ s === J.HORIZONTAL_SCROLLING && (M = d.slice(0, I.page - 1).reduce((ae, de) => ae + de, 0));
592
592
  const G = {
593
593
  top: C.clientHeight / 2,
594
594
  left: C.clientWidth / 2
595
595
  }, Z = {
596
- height: p[x.page - 1],
597
- width: d[x.page - 1]
598
- }, { leftInPage: j, topInPage: V } = Br(
596
+ height: p[I.page - 1],
597
+ width: d[I.page - 1]
598
+ }, { leftInPage: j, topInPage: q } = Br(
599
599
  Z,
600
600
  G,
601
- x.rect,
601
+ I.rect,
602
602
  _,
603
603
  P
604
- ), ee = M + j, X = O + V, le = {
604
+ ), ee = M + j, X = O + q, le = {
605
605
  left: Math.max(ee, 0),
606
606
  top: Math.max(X, 0)
607
607
  };
@@ -613,34 +613,34 @@ const So = () => {
613
613
  w,
614
614
  d,
615
615
  p,
616
- x,
616
+ I,
617
617
  s,
618
618
  g,
619
- f,
619
+ m,
620
620
  C
621
621
  ]);
622
622
  const D = N(() => {
623
623
  u((R) => L ? R + 1 > L ? 1 : R + 1 : 0);
624
- }, [L]), A = N(() => {
624
+ }, [L]), z = N(() => {
625
625
  u((R) => L ? R - 1 <= 0 ? L : R - 1 : 0);
626
- }, [L]), z = N(async (R) => {
626
+ }, [L]), A = N(async (R) => {
627
627
  if (!R)
628
628
  return {};
629
- const I = R.numPages, O = {};
630
- for (let M = 1; M <= I; M++) {
631
- if (m.current)
629
+ const x = R.numPages, O = {};
630
+ for (let M = 1; M <= x; M++) {
631
+ if (f.current)
632
632
  throw "close pop over";
633
633
  const G = await R.getPage(M);
634
634
  O[M.toString()] = await G.getTextContent();
635
635
  }
636
636
  return O;
637
637
  }, []);
638
- return k(() => {
638
+ return W(() => {
639
639
  if (!n) {
640
- m.current = !0, v([]), u(0);
640
+ f.current = !0, v([]), u(0);
641
641
  return;
642
642
  }
643
- m.current = !1, a(!0), v([]), u(0), z(l).then((R) => {
643
+ f.current = !1, a(!0), v([]), u(0), A(l).then((R) => {
644
644
  E.current = R;
645
645
  const O = Object.keys(R).reduce((M, G) => {
646
646
  const Z = cr(
@@ -648,23 +648,23 @@ const So = () => {
648
648
  R[G],
649
649
  Number(G) - 1,
650
650
  t
651
- ).map((j, V) => ({ ...j, page: Number(G), pageMatchIdx: V }));
651
+ ).map((j, q) => ({ ...j, page: Number(G), pageMatchIdx: q }));
652
652
  return [...M, ...Z];
653
653
  }, []);
654
654
  v(O), u(O.length ? 1 : 0);
655
655
  }).catch(() => {
656
656
  v([]), u(0);
657
657
  }).finally(() => a(!1));
658
- }, [n, z, l, t]), {
658
+ }, [n, A, l, t]), {
659
659
  search: n,
660
660
  setSearch: o,
661
661
  loading: r,
662
662
  matches: h,
663
663
  totalMatches: L,
664
664
  currentMatchPosition: S,
665
- currentMatch: x,
665
+ currentMatch: I,
666
666
  nextMatch: D,
667
- prevMatch: A,
667
+ prevMatch: z,
668
668
  currentMatchElement: b,
669
669
  setCurrentMatchElement: y
670
670
  };
@@ -697,12 +697,12 @@ const So = () => {
697
697
  currentMatchPosition: c,
698
698
  currentMatch: d,
699
699
  search: p,
700
- matches: m,
700
+ matches: f,
701
701
  nextMatch: _,
702
702
  prevMatch: h,
703
703
  currentMatchElement: v,
704
704
  setCurrentMatchElement: w
705
- } = xo(n, e);
705
+ } = Io(n, e);
706
706
  return /* @__PURE__ */ i(
707
707
  Tn.Provider,
708
708
  {
@@ -717,14 +717,14 @@ const So = () => {
717
717
  nextMatch: _,
718
718
  prevMatch: h,
719
719
  search: p,
720
- matches: m,
720
+ matches: f,
721
721
  currentMatchElement: v,
722
722
  setCurrentMatchElement: w
723
723
  },
724
724
  children: t
725
725
  }
726
726
  );
727
- }, xt = () => Je(Tn), ue = {
727
+ }, It = () => Je(Tn), ue = {
728
728
  "rp-pages": "_rp-pages_1776r_1",
729
729
  "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
730
730
  "rp-pages-container": "_rp-pages-container_1776r_11",
@@ -734,33 +734,33 @@ const So = () => {
734
734
  "rp-cursor-grabbing": "_rp-cursor-grabbing_1776r_35",
735
735
  "rp-loader": "_rp-loader_1776r_43"
736
736
  }, lt = {
737
- "rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
738
- "rp-page": "_rp-page_h7a2q_1",
739
- "rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
740
- }, Io = (t) => {
737
+ "rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
738
+ "rp-page": "_rp-page_14ohm_1",
739
+ "rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
740
+ }, xo = (t) => {
741
741
  const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = H(null), { pages: a } = Q(), { rotate: l } = Ge(), c = H(), { currentZoom: d } = Qe();
742
- return k(() => {
742
+ return W(() => {
743
743
  if (!a || d === 0)
744
744
  return;
745
745
  const p = a.get(e);
746
746
  if (r.current && p) {
747
- const m = r.current;
748
- m.hidden = !0;
747
+ const f = r.current;
748
+ f.hidden = !0;
749
749
  const _ = c.current;
750
- _ && _.cancel(), o && o(), c.current = vt(p.page, m, {
750
+ _ && _.cancel(), o && o(), c.current = vt(p.page, f, {
751
751
  scale: d,
752
752
  rotate: l,
753
753
  renderForms: !0
754
754
  }), c.current.promise.then(() => {
755
- m.hidden = !1;
755
+ f.hidden = !1;
756
756
  }).catch(() => {
757
757
  }).finally(() => {
758
758
  n && n();
759
759
  });
760
760
  }
761
761
  return () => {
762
- var m;
763
- (m = c.current) == null || m.cancel();
762
+ var f;
763
+ (f = c.current) == null || f.cancel();
764
764
  };
765
765
  }, [a, e, l, d, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
766
766
  }, Lo = "_selecting_1x8te_9", Ro = "_endOfContent_1x8te_24", he = {
@@ -769,20 +769,20 @@ const So = () => {
769
769
  endOfContent: Ro,
770
770
  "rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
771
771
  }, Eo = (t) => {
772
- const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [c, d] = $(
772
+ const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = It(), [c, d] = $(
773
773
  []
774
- ), p = H(), m = H(), _ = H([]), h = W(() => r.filter((f) => f.pageIndex === e - 1), [r, e]), v = N(
775
- (f, g, s = !1) => {
776
- if (s && lr(f, g), !h.length) {
774
+ ), p = H(), f = H(), _ = H([]), h = k(() => r.filter((m) => m.pageIndex === e - 1), [r, e]), v = N(
775
+ (m, g, s = !1) => {
776
+ if (s && lr(m, g), !h.length) {
777
777
  _.current = [], d([]);
778
778
  return;
779
779
  }
780
- const C = dr(h, f, g);
780
+ const C = dr(h, m, g);
781
781
  d(C);
782
782
  },
783
783
  [h]
784
784
  ), w = H(), T = H(!1), P = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
785
- k(() => ((() => {
785
+ W(() => ((() => {
786
786
  if (w.current)
787
787
  return;
788
788
  w.current = new AbortController();
@@ -821,7 +821,7 @@ const So = () => {
821
821
  document.addEventListener(
822
822
  "selectionchange",
823
823
  () => {
824
- var z, R;
824
+ var A, R;
825
825
  const b = document.getSelection();
826
826
  if (!b)
827
827
  return;
@@ -830,27 +830,27 @@ const So = () => {
830
830
  return;
831
831
  }
832
832
  const y = /* @__PURE__ */ new Set();
833
- for (let I = 0; I < b.rangeCount; I++) {
834
- const O = b.getRangeAt(I);
833
+ for (let x = 0; x < b.rangeCount; x++) {
834
+ const O = b.getRangeAt(x);
835
835
  P().forEach((M) => {
836
836
  O.intersectsNode(M) && !y.has(M) && y.add(M);
837
837
  });
838
838
  }
839
- P().forEach((I) => {
840
- if (y.has(I))
841
- I.classList.add(he.selecting);
839
+ P().forEach((x) => {
840
+ if (y.has(x))
841
+ x.classList.add(he.selecting);
842
842
  else {
843
- const O = I.querySelector(".endOfContent");
844
- O && (I.appendChild(O), O.style.width = "", O.style.height = "", I.classList.remove(he.selecting));
843
+ const O = x.querySelector(".endOfContent");
844
+ O && (x.appendChild(O), O.style.width = "", O.style.height = "", x.classList.remove(he.selecting));
845
845
  }
846
846
  });
847
847
  const E = b.getRangeAt(0);
848
848
  let L = C && (E.compareBoundaryPoints(Range.END_TO_END, C) === 0 || E.compareBoundaryPoints(Range.START_TO_END, C) === 0) ? E.startContainer : E.endContainer;
849
849
  L.nodeType === Node.TEXT_NODE && (L = L.parentNode);
850
- const D = (z = L.parentElement) == null ? void 0 : z.closest(
850
+ const D = (A = L.parentElement) == null ? void 0 : A.closest(
851
851
  he["rp-text-layer"]
852
- ), A = D == null ? void 0 : D.querySelector(".endOfContent");
853
- A && D && (A.style.width = D.style.width, A.style.height = D.style.height, (R = L.parentElement) == null || R.insertBefore(A, L.nextSibling)), C = E.cloneRange();
852
+ ), z = D == null ? void 0 : D.querySelector(".endOfContent");
853
+ z && D && (z.style.width = D.style.width, z.style.height = D.style.height, (R = L.parentElement) == null || R.insertBefore(z, L.nextSibling)), C = E.cloneRange();
854
854
  },
855
855
  { signal: g }
856
856
  );
@@ -863,39 +863,39 @@ const So = () => {
863
863
  }, []), u = N(() => {
864
864
  o.current && o.current.classList.remove(he.selecting);
865
865
  }, []);
866
- return k(() => {
866
+ return W(() => {
867
867
  if (_.current.forEach((s) => {
868
868
  s.classList.remove("selected");
869
869
  }), !c.length || !a || a.pageIndex !== e - 1)
870
870
  return;
871
- const f = h.findIndex(
871
+ const m = h.findIndex(
872
872
  (s) => JSON.stringify(s) === JSON.stringify(a)
873
873
  );
874
- if (f === -1)
874
+ if (m === -1)
875
875
  return;
876
- const g = c.filter((s) => s.index === f);
876
+ const g = c.filter((s) => s.index === m);
877
877
  g.length && (_.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
878
878
  s.element.classList.add("selected");
879
879
  }));
880
- }, [a, c, h]), k(() => {
881
- const f = n.get(e);
882
- if (!f || !o.current)
880
+ }, [a, c, h]), W(() => {
881
+ const m = n.get(e);
882
+ if (!m || !o.current)
883
883
  return;
884
884
  const g = o.current;
885
- return p.current && p.current.cancel(), f.page.getTextContent().then((s) => {
886
- const C = f.page.getViewport({ scale: 1 });
885
+ return p.current && p.current.cancel(), m.page.getTextContent().then((s) => {
886
+ const C = m.page.getViewport({ scale: 1 });
887
887
  return p.current = new Sr.TextLayer({
888
888
  viewport: C,
889
889
  textContentSource: s,
890
890
  container: g
891
- }), m.current = s, g && (g.innerText = ""), p.current.render();
891
+ }), f.current = s, g && (g.innerText = ""), p.current.render();
892
892
  }).then(() => {
893
893
  var y, E;
894
- [].slice.call(g.children).forEach((x) => {
895
- x.classList.add(he["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
894
+ [].slice.call(g.children).forEach((I) => {
895
+ I.classList.add(he["rp-text-layer-text"]), I.setAttribute("data-rp", "rp-text-layer-text");
896
896
  });
897
897
  const C = (y = p.current) == null ? void 0 : y.textDivs;
898
- C && m.current && v(m.current, C);
898
+ C && f.current && v(f.current, C);
899
899
  const b = document.createElement("div");
900
900
  b.className = "endOfContent", (E = o.current) == null || E.appendChild(b);
901
901
  }).catch(() => {
@@ -903,13 +903,13 @@ const So = () => {
903
903
  var s;
904
904
  (s = p.current) == null || s.cancel();
905
905
  };
906
- }, [n, e]), k(() => {
906
+ }, [n, e]), W(() => {
907
907
  var s;
908
908
  [].slice.call(o.current.children).forEach((C) => {
909
909
  C.classList.add(he["rp-text-layer-text"]);
910
910
  });
911
911
  const g = (s = p.current) == null ? void 0 : s.textDivs;
912
- g && m.current && v(m.current, g, !0);
912
+ g && f.current && v(f.current, g, !0);
913
913
  }, [v]), /* @__PURE__ */ i(
914
914
  "div",
915
915
  {
@@ -925,10 +925,10 @@ const So = () => {
925
925
  };
926
926
  let Oo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
927
927
  const Do = (t) => {
928
- const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: p } = ie(), { scrollMode: m } = Re(), { print: _ } = tt(), { download: h } = $n(), v = W(() => o.get(e), [o, e]), w = W(() => v == null ? void 0 : v.page.getViewport(), [v]);
929
- k(() => {
928
+ const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: p } = ie(), { scrollMode: f } = Re(), { print: _ } = tt(), { download: h } = $n(), v = k(() => o.get(e), [o, e]), w = k(() => v == null ? void 0 : v.page.getViewport(), [v]);
929
+ W(() => {
930
930
  a.current && (a.current.div.replaceChildren(), a.current = void 0);
931
- }, [r]), k(() => {
931
+ }, [r]), W(() => {
932
932
  v && v.page.getAnnotations().then((P) => {
933
933
  a.current = void 0, c(P), n.current && (n.current.innerText = "");
934
934
  });
@@ -936,13 +936,13 @@ const Do = (t) => {
936
936
  const T = N(
937
937
  (P) => {
938
938
  !l || !r || (Er(P), Nr(P, r, l).then((S) => {
939
- var u, f;
940
- ((u = S == null ? void 0 : S.data) == null ? void 0 : u.action) === "Print" ? _() : ((f = S == null ? void 0 : S.data) == null ? void 0 : f.action) === "SaveAs" && h();
941
- }), m === J.PAGE_SCROLLING ? zt(P, l, r, (S) => d(S.pageIndex + 1)) : zt(P, l, r, (S) => p(S.pageIndex + 1)));
939
+ var u, m;
940
+ ((u = S == null ? void 0 : S.data) == null ? void 0 : u.action) === "Print" ? _() : ((m = S == null ? void 0 : S.data) == null ? void 0 : m.action) === "SaveAs" && h();
941
+ }), f === J.PAGE_SCROLLING ? At(P, l, r, (S) => d(S.pageIndex + 1)) : At(P, l, r, (S) => p(S.pageIndex + 1)));
942
942
  },
943
- [r, l, p, d, m, _, h]
943
+ [r, l, p, d, f, _, h]
944
944
  );
945
- return k(() => {
945
+ return W(() => {
946
946
  if (!v || !l)
947
947
  return;
948
948
  const P = v.page.getViewport();
@@ -956,10 +956,10 @@ const Do = (t) => {
956
956
  for (const g of l) {
957
957
  const { annotationType: s } = g;
958
958
  switch (s) {
959
- case At.Link:
959
+ case zt.Link:
960
960
  Dr(g);
961
961
  break;
962
- case At.Widget:
962
+ case zt.Widget:
963
963
  Or(g, P, S);
964
964
  break;
965
965
  }
@@ -994,7 +994,7 @@ const Do = (t) => {
994
994
  enableScripting: !1
995
995
  });
996
996
  })().then(() => {
997
- n.current && Ar(n.current, T);
997
+ n.current && zr(n.current, T);
998
998
  }).catch((g) => {
999
999
  if (g !== "abort")
1000
1000
  throw g;
@@ -1010,32 +1010,32 @@ const Do = (t) => {
1010
1010
  ref: n
1011
1011
  }
1012
1012
  );
1013
- }, Ao = {
1013
+ }, zo = {
1014
1014
  "rp-text-highlight": "_rp-text-highlight_jdkf8_1"
1015
- }, zo = ({ pageNumber: t, viewport: e }) => {
1016
- const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = pr(), l = !0, c = H(null), [d, p] = $(null), [m, _] = $([]);
1017
- k(() => {
1015
+ }, Ao = ({ pageNumber: t, viewport: e }) => {
1016
+ const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = pr(), l = !0, c = H(null), [d, p] = $(null), [f, _] = $([]);
1017
+ W(() => {
1018
1018
  c.current && p(c.current.parentElement);
1019
- }, [c]), k(() => {
1019
+ }, [c]), W(() => {
1020
1020
  (async () => {
1021
- const f = r.get(t);
1022
- if (!f || !c.current)
1021
+ const m = r.get(t);
1022
+ if (!m || !c.current)
1023
1023
  return;
1024
- const g = await f.page.getTextContent();
1024
+ const g = await m.page.getTextContent();
1025
1025
  o(g);
1026
1026
  })();
1027
1027
  }, [r, t]);
1028
- const h = W(() => a ? a.map((u) => {
1029
- var f, g;
1028
+ const h = k(() => a ? a.map((u) => {
1029
+ var m, g;
1030
1030
  return {
1031
- ...zr(u.keyword, (f = u.options) == null ? void 0 : f.matchCase, (g = u.options) == null ? void 0 : g.wholeWords),
1031
+ ...Ar(u.keyword, (m = u.options) == null ? void 0 : m.matchCase, (g = u.options) == null ? void 0 : g.wholeWords),
1032
1032
  color: u.highlightColor
1033
1033
  };
1034
1034
  }) : [], [a]);
1035
- function v(u, f) {
1035
+ function v(u, m) {
1036
1036
  if (!u)
1037
1037
  return;
1038
- const g = `[data-rp="page-${f}-textLayer"]`;
1038
+ const g = `[data-rp="page-${m}-textLayer"]`;
1039
1039
  return new Promise((s) => {
1040
1040
  const C = u.querySelector(g);
1041
1041
  if (C) {
@@ -1043,62 +1043,62 @@ const Do = (t) => {
1043
1043
  return;
1044
1044
  }
1045
1045
  new MutationObserver((y, E) => {
1046
- const x = u.querySelector(g);
1047
- x && (s(x), E.disconnect());
1046
+ const I = u.querySelector(g);
1047
+ I && (s(I), E.disconnect());
1048
1048
  }).observe(u, { childList: !0, subtree: !0 });
1049
1049
  });
1050
1050
  }
1051
1051
  function w(u) {
1052
- return new Promise((f) => {
1052
+ return new Promise((m) => {
1053
1053
  const g = u.querySelectorAll(
1054
1054
  '[data-rp="rp-text-layer-text"]'
1055
1055
  );
1056
1056
  if (g.length) {
1057
- f(Array.from(g));
1057
+ m(Array.from(g));
1058
1058
  return;
1059
1059
  }
1060
1060
  new MutationObserver((C, b) => {
1061
1061
  const y = u.querySelectorAll(
1062
1062
  ".vpv-text-layer-text"
1063
1063
  );
1064
- y.length && (f(Array.from(y)), b.disconnect());
1064
+ y.length && (m(Array.from(y)), b.disconnect());
1065
1065
  }).observe(u, { childList: !0, subtree: !0 });
1066
1066
  });
1067
1067
  }
1068
- const T = (u, f, g, s) => {
1068
+ const T = (u, m, g, s) => {
1069
1069
  var Z;
1070
1070
  const C = document.createRange(), b = g.firstChild;
1071
1071
  if (!b || b.nodeType !== Node.TEXT_NODE)
1072
1072
  return null;
1073
- const y = ((Z = b.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, x = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
1074
- if (E > y || x + 1 > y)
1073
+ const y = ((Z = b.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, I = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
1074
+ if (E > y || I + 1 > y)
1075
1075
  return null;
1076
- C.setStart(b, E), C.setEnd(b, x + 1);
1076
+ C.setStart(b, E), C.setEnd(b, I + 1);
1077
1077
  const L = document.createElement("span");
1078
1078
  L.style.width = "auto", C.surroundContents(L);
1079
- const D = L.getBoundingClientRect(), A = u.getBoundingClientRect(), z = A.height, R = A.width, I = 100 * (D.left - A.left) / R, O = 100 * (D.top - A.top) / z, M = 100 * D.height / z, G = 100 * D.width / R;
1080
- return kr(L), {
1081
- keywordStr: f,
1082
- left: I,
1079
+ const D = L.getBoundingClientRect(), z = u.getBoundingClientRect(), A = z.height, R = z.width, x = 100 * (D.left - z.left) / R, O = 100 * (D.top - z.top) / A, M = 100 * D.height / A, G = 100 * D.width / R;
1080
+ return Wr(L), {
1081
+ keywordStr: m,
1082
+ left: x,
1083
1083
  top: O,
1084
1084
  height: M,
1085
1085
  width: G,
1086
- pageHeight: z,
1086
+ pageHeight: A,
1087
1087
  pageWidth: R
1088
1088
  };
1089
1089
  };
1090
- async function P(u, f) {
1090
+ async function P(u, m) {
1091
1091
  const g = await v(d, u);
1092
1092
  if (!g)
1093
1093
  return;
1094
1094
  const s = await w(g);
1095
1095
  if (s.length) {
1096
1096
  const C = s.map((y) => y.tagName === "BR" ? " " : y.textContent).reduce(
1097
- (y, E, x) => y.concat(
1097
+ (y, E, I) => y.concat(
1098
1098
  E.split("").map((L, D) => ({
1099
1099
  char: L,
1100
1100
  charIdxInSpan: D,
1101
- spanIdx: x
1101
+ spanIdx: I
1102
1102
  }))
1103
1103
  ),
1104
1104
  [
@@ -1108,45 +1108,45 @@ const Do = (t) => {
1108
1108
  spanIdx: 0
1109
1109
  }
1110
1110
  ]
1111
- ).slice(1), b = S(g, f, s, C);
1111
+ ).slice(1), b = S(g, m, s, C);
1112
1112
  _(b);
1113
1113
  }
1114
1114
  }
1115
- const S = (u, f, g, s) => {
1116
- const C = f.length;
1115
+ const S = (u, m, g, s) => {
1116
+ const C = m.length;
1117
1117
  if (!s.length || !C)
1118
1118
  return [];
1119
1119
  const b = [], y = s.map((E) => E.char).join("");
1120
1120
  return h.forEach((E) => {
1121
- const { keyword: x, regExp: L, wholeWords: D, color: A } = E, z = x;
1122
- if (!z.trim())
1121
+ const { keyword: I, regExp: L, wholeWords: D, color: z } = E, A = I;
1122
+ if (!A.trim())
1123
1123
  return;
1124
1124
  const R = L.flags.indexOf("g") === -1 ? new RegExp(L, `${L.flags}g`) : L;
1125
- let I;
1125
+ let x;
1126
1126
  const O = [];
1127
- for (; (I = R.exec(y)) !== null; )
1128
- D && !ur(y, I.index, I[0].length) || O.push({
1127
+ for (; (x = R.exec(y)) !== null; )
1128
+ D && !ur(y, x.index, x[0].length) || O.push({
1129
1129
  keyword: R,
1130
- startIndex: I.index,
1130
+ startIndex: x.index,
1131
1131
  endIndex: R.lastIndex
1132
1132
  });
1133
1133
  const M = O.map((G) => ({
1134
1134
  keyword: G.keyword,
1135
1135
  indexes: s.slice(G.startIndex, G.endIndex),
1136
- color: A
1136
+ color: z
1137
1137
  }));
1138
1138
  for (const G of M) {
1139
1139
  const Z = G.indexes.reduce(
1140
- (j, V) => (j[V.spanIdx] = (j[V.spanIdx] || []).concat([V]), j),
1140
+ (j, q) => (j[q.spanIdx] = (j[q.spanIdx] || []).concat([q]), j),
1141
1141
  {}
1142
1142
  );
1143
1143
  for (const j of Object.values(Z))
1144
1144
  if (j.length !== 1 || j[0].char.trim() !== "") {
1145
- const V = j, ee = g[V[0].spanIdx], X = T(
1145
+ const q = j, ee = g[q[0].spanIdx], X = T(
1146
1146
  u,
1147
- z,
1147
+ A,
1148
1148
  ee,
1149
- V
1149
+ q
1150
1150
  );
1151
1151
  if (X) {
1152
1152
  const { left: le, top: ae } = X;
@@ -1158,19 +1158,19 @@ const Do = (t) => {
1158
1158
  }
1159
1159
  }), b.sort(Fr), b;
1160
1160
  };
1161
- return k(() => {
1161
+ return W(() => {
1162
1162
  (async () => {
1163
1163
  if (!(!a || a.length === 0))
1164
1164
  try {
1165
1165
  await P(t, a);
1166
- } catch (f) {
1167
- console.error(f);
1166
+ } catch (m) {
1167
+ console.error(m);
1168
1168
  }
1169
1169
  })();
1170
- }, [l, a, t, n, e]), /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((u, f) => /* @__PURE__ */ i(
1170
+ }, [l, a, t, n, e]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: f.map((u, m) => /* @__PURE__ */ i(
1171
1171
  "div",
1172
1172
  {
1173
- className: Ao["rp-text-highlight"],
1173
+ className: zo["rp-text-highlight"],
1174
1174
  style: {
1175
1175
  top: `${u.top}%`,
1176
1176
  left: `${u.left}%`,
@@ -1179,20 +1179,20 @@ const Do = (t) => {
1179
1179
  backgroundColor: u.highlightColor
1180
1180
  }
1181
1181
  },
1182
- f
1182
+ m
1183
1183
  )) }) });
1184
- }, It = $e((t, e) => {
1185
- const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = or(), { currentZoom: d } = Qe(), p = H(a.get(n)), [m, _] = $(!1), h = H(null), [v, w] = $({
1184
+ }, xt = $e((t, e) => {
1185
+ const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = or(), { currentZoom: d } = Qe(), p = H(a.get(n)), [f, _] = $(!1), h = H(null), [v, w] = $({
1186
1186
  width: 0,
1187
1187
  height: 0
1188
1188
  });
1189
- cn(e, () => h.current), k(() => {
1189
+ cn(e, () => h.current), W(() => {
1190
1190
  if (a && (p.current = a.get(n), p.current)) {
1191
1191
  const u = p.current.page.getViewport({ scale: d, rotation: l });
1192
1192
  w(u);
1193
1193
  }
1194
1194
  }, [a, n, l, d]);
1195
- const T = W(() => {
1195
+ const T = k(() => {
1196
1196
  switch (l) {
1197
1197
  case 90:
1198
1198
  return `${v.width / 2}px ${v.width / 2}px`;
@@ -1230,10 +1230,10 @@ const Do = (t) => {
1230
1230
  },
1231
1231
  className: lt["rp-page"],
1232
1232
  children: [
1233
- /* @__PURE__ */ i(Io, { onLoading: P, onLoaded: S, pageNumber: n }),
1234
- m && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
1233
+ /* @__PURE__ */ i(xo, { onLoading: P, onLoaded: S, pageNumber: n }),
1234
+ f && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
1235
1235
  c && /* @__PURE__ */ i(Eo, { pageNumber: n }),
1236
- /* @__PURE__ */ i(zo, { pageNumber: n, viewport: v }),
1236
+ /* @__PURE__ */ i(Ao, { pageNumber: n, viewport: v }),
1237
1237
  /* @__PURE__ */ i(Do, { pageNumber: n })
1238
1238
  ]
1239
1239
  }
@@ -1241,7 +1241,7 @@ const Do = (t) => {
1241
1241
  }
1242
1242
  );
1243
1243
  });
1244
- function qt(t) {
1244
+ function Ut(t) {
1245
1245
  if (t === void 0)
1246
1246
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1247
1247
  return t;
@@ -1254,22 +1254,22 @@ function wt(t, e) {
1254
1254
  function Fo(t, e) {
1255
1255
  t.prototype = Object.create(e.prototype), t.prototype.constructor = t, wt(t, e);
1256
1256
  }
1257
- var Ut = Number.isNaN || function(e) {
1257
+ var Vt = Number.isNaN || function(e) {
1258
1258
  return typeof e == "number" && e !== e;
1259
1259
  };
1260
- function ko(t, e) {
1261
- return !!(t === e || Ut(t) && Ut(e));
1262
- }
1263
1260
  function Wo(t, e) {
1261
+ return !!(t === e || Vt(t) && Vt(e));
1262
+ }
1263
+ function ko(t, e) {
1264
1264
  if (t.length !== e.length)
1265
1265
  return !1;
1266
1266
  for (var n = 0; n < t.length; n++)
1267
- if (!ko(t[n], e[n]))
1267
+ if (!Wo(t[n], e[n]))
1268
1268
  return !1;
1269
1269
  return !0;
1270
1270
  }
1271
1271
  function dt(t, e) {
1272
- e === void 0 && (e = Wo);
1272
+ e === void 0 && (e = ko);
1273
1273
  var n, o = [], r, a = !1;
1274
1274
  function l() {
1275
1275
  for (var c = [], d = 0; d < arguments.length; d++)
@@ -1278,7 +1278,7 @@ function dt(t, e) {
1278
1278
  }
1279
1279
  return l;
1280
1280
  }
1281
- function Vt(t, e) {
1281
+ function qt(t, e) {
1282
1282
  if (t == null)
1283
1283
  return {};
1284
1284
  var n = {};
@@ -1326,87 +1326,87 @@ function jt(t) {
1326
1326
  }
1327
1327
  return Oe;
1328
1328
  }
1329
- var Go = 150, qo = function(e) {
1329
+ var Go = 150, Uo = function(e) {
1330
1330
  var n = e.columnIndex;
1331
1331
  e.data;
1332
1332
  var o = e.rowIndex;
1333
1333
  return o + ":" + n;
1334
1334
  }, Be = null, Ze = null, je = null;
1335
1335
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
1336
- function Uo(t) {
1337
- var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, p = t.getOffsetForRowAndAlignment, m = t.getRowHeight, _ = t.getRowOffset, h = t.getRowStartIndexForOffset, v = t.getRowStopIndexForStartIndex, w = t.initInstanceProps, T = t.shouldResetStyleCacheOnItemSizeChange, P = t.validateProps;
1336
+ function Vo(t) {
1337
+ var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, p = t.getOffsetForRowAndAlignment, f = t.getRowHeight, _ = t.getRowOffset, h = t.getRowStartIndexForOffset, v = t.getRowStopIndexForStartIndex, w = t.initInstanceProps, T = t.shouldResetStyleCacheOnItemSizeChange, P = t.validateProps;
1338
1338
  return e = /* @__PURE__ */ function(S) {
1339
1339
  Fo(u, S);
1340
1340
  function u(g) {
1341
1341
  var s;
1342
- return s = S.call(this, g) || this, s._instanceProps = w(s.props, qt(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1343
- instance: qt(s),
1342
+ return s = S.call(this, g) || this, s._instanceProps = w(s.props, Ut(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1343
+ instance: Ut(s),
1344
1344
  isScrolling: !1,
1345
1345
  horizontalScrollDirection: "forward",
1346
1346
  scrollLeft: typeof s.props.initialScrollLeft == "number" ? s.props.initialScrollLeft : 0,
1347
1347
  scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
1348
1348
  scrollUpdateWasRequested: !1,
1349
1349
  verticalScrollDirection: "forward"
1350
- }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(C, b, y, E, x, L, D, A) {
1350
+ }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(C, b, y, E, I, L, D, z) {
1351
1351
  return s.props.onItemsRendered({
1352
1352
  overscanColumnStartIndex: C,
1353
1353
  overscanColumnStopIndex: b,
1354
1354
  overscanRowStartIndex: y,
1355
1355
  overscanRowStopIndex: E,
1356
- visibleColumnStartIndex: x,
1356
+ visibleColumnStartIndex: I,
1357
1357
  visibleColumnStopIndex: L,
1358
1358
  visibleRowStartIndex: D,
1359
- visibleRowStopIndex: A
1359
+ visibleRowStopIndex: z
1360
1360
  });
1361
- }), s._callOnScroll = void 0, s._callOnScroll = dt(function(C, b, y, E, x) {
1361
+ }), s._callOnScroll = void 0, s._callOnScroll = dt(function(C, b, y, E, I) {
1362
1362
  return s.props.onScroll({
1363
1363
  horizontalScrollDirection: y,
1364
1364
  scrollLeft: C,
1365
1365
  scrollTop: b,
1366
1366
  verticalScrollDirection: E,
1367
- scrollUpdateWasRequested: x
1367
+ scrollUpdateWasRequested: I
1368
1368
  });
1369
1369
  }), s._getItemStyle = void 0, s._getItemStyle = function(C, b) {
1370
- var y = s.props, E = y.columnWidth, x = y.direction, L = y.rowHeight, D = s._getItemStyleCache(T && E, T && x, T && L), A = C + ":" + b, z;
1371
- if (D.hasOwnProperty(A))
1372
- z = D[A];
1370
+ var y = s.props, E = y.columnWidth, I = y.direction, L = y.rowHeight, D = s._getItemStyleCache(T && E, T && I, T && L), z = C + ":" + b, A;
1371
+ if (D.hasOwnProperty(z))
1372
+ A = D[z];
1373
1373
  else {
1374
- var R = n(s.props, b, s._instanceProps), I = x === "rtl";
1375
- D[A] = z = {
1374
+ var R = n(s.props, b, s._instanceProps), x = I === "rtl";
1375
+ D[z] = A = {
1376
1376
  position: "absolute",
1377
- left: I ? void 0 : R,
1378
- right: I ? R : void 0,
1377
+ left: x ? void 0 : R,
1378
+ right: x ? R : void 0,
1379
1379
  top: _(s.props, C, s._instanceProps),
1380
- height: m(s.props, C, s._instanceProps),
1380
+ height: f(s.props, C, s._instanceProps),
1381
1381
  width: a(s.props, b, s._instanceProps)
1382
1382
  };
1383
1383
  }
1384
- return z;
1384
+ return A;
1385
1385
  }, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(C, b, y) {
1386
1386
  return {};
1387
1387
  }), s._onScroll = function(C) {
1388
- var b = C.currentTarget, y = b.clientHeight, E = b.clientWidth, x = b.scrollLeft, L = b.scrollTop, D = b.scrollHeight, A = b.scrollWidth;
1389
- s.setState(function(z) {
1390
- if (z.scrollLeft === x && z.scrollTop === L)
1388
+ var b = C.currentTarget, y = b.clientHeight, E = b.clientWidth, I = b.scrollLeft, L = b.scrollTop, D = b.scrollHeight, z = b.scrollWidth;
1389
+ s.setState(function(A) {
1390
+ if (A.scrollLeft === I && A.scrollTop === L)
1391
1391
  return null;
1392
- var R = s.props.direction, I = x;
1392
+ var R = s.props.direction, x = I;
1393
1393
  if (R === "rtl")
1394
1394
  switch (jt()) {
1395
1395
  case "negative":
1396
- I = -x;
1396
+ x = -I;
1397
1397
  break;
1398
1398
  case "positive-descending":
1399
- I = A - E - x;
1399
+ x = z - E - I;
1400
1400
  break;
1401
1401
  }
1402
- I = Math.max(0, Math.min(I, A - E));
1402
+ x = Math.max(0, Math.min(x, z - E));
1403
1403
  var O = Math.max(0, Math.min(L, D - y));
1404
1404
  return {
1405
1405
  isScrolling: !0,
1406
- horizontalScrollDirection: z.scrollLeft < x ? "forward" : "backward",
1407
- scrollLeft: I,
1406
+ horizontalScrollDirection: A.scrollLeft < I ? "forward" : "backward",
1407
+ scrollLeft: x,
1408
1408
  scrollTop: O,
1409
- verticalScrollDirection: z.scrollTop < L ? "forward" : "backward",
1409
+ verticalScrollDirection: A.scrollTop < L ? "forward" : "backward",
1410
1410
  scrollUpdateWasRequested: !1
1411
1411
  };
1412
1412
  }, s._resetIsScrollingDebounced);
@@ -1424,10 +1424,10 @@ function Uo(t) {
1424
1424
  }, s;
1425
1425
  }
1426
1426
  u.getDerivedStateFromProps = function(s, C) {
1427
- return Vo(s, C), P(s), null;
1427
+ return qo(s, C), P(s), null;
1428
1428
  };
1429
- var f = u.prototype;
1430
- return f.scrollTo = function(s) {
1429
+ var m = u.prototype;
1430
+ return m.scrollTo = function(s) {
1431
1431
  var C = s.scrollLeft, b = s.scrollTop;
1432
1432
  C !== void 0 && (C = Math.max(0, C)), b !== void 0 && (b = Math.max(0, b)), this.setState(function(y) {
1433
1433
  return C === void 0 && (C = y.scrollLeft), b === void 0 && (b = y.scrollTop), y.scrollLeft === C && y.scrollTop === b ? null : {
@@ -1438,77 +1438,77 @@ function Uo(t) {
1438
1438
  verticalScrollDirection: y.scrollTop < b ? "forward" : "backward"
1439
1439
  };
1440
1440
  }, this._resetIsScrollingDebounced);
1441
- }, f.scrollToItem = function(s) {
1442
- var C = s.align, b = C === void 0 ? "auto" : C, y = s.columnIndex, E = s.rowIndex, x = this.props, L = x.columnCount, D = x.height, A = x.rowCount, z = x.width, R = this.state, I = R.scrollLeft, O = R.scrollTop, M = $o();
1443
- y !== void 0 && (y = Math.max(0, Math.min(y, L - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, A - 1)));
1444
- var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > z ? M : 0, V = G > D ? M : 0;
1441
+ }, m.scrollToItem = function(s) {
1442
+ var C = s.align, b = C === void 0 ? "auto" : C, y = s.columnIndex, E = s.rowIndex, I = this.props, L = I.columnCount, D = I.height, z = I.rowCount, A = I.width, R = this.state, x = R.scrollLeft, O = R.scrollTop, M = $o();
1443
+ y !== void 0 && (y = Math.max(0, Math.min(y, L - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
1444
+ var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G > D ? M : 0;
1445
1445
  this.scrollTo({
1446
- scrollLeft: y !== void 0 ? d(this.props, y, b, I, this._instanceProps, V) : I,
1446
+ scrollLeft: y !== void 0 ? d(this.props, y, b, x, this._instanceProps, q) : x,
1447
1447
  scrollTop: E !== void 0 ? p(this.props, E, b, O, this._instanceProps, j) : O
1448
1448
  });
1449
- }, f.componentDidMount = function() {
1449
+ }, m.componentDidMount = function() {
1450
1450
  var s = this.props, C = s.initialScrollLeft, b = s.initialScrollTop;
1451
1451
  if (this._outerRef != null) {
1452
1452
  var y = this._outerRef;
1453
1453
  typeof C == "number" && (y.scrollLeft = C), typeof b == "number" && (y.scrollTop = b);
1454
1454
  }
1455
1455
  this._callPropsCallbacks();
1456
- }, f.componentDidUpdate = function() {
1456
+ }, m.componentDidUpdate = function() {
1457
1457
  var s = this.props.direction, C = this.state, b = C.scrollLeft, y = C.scrollTop, E = C.scrollUpdateWasRequested;
1458
1458
  if (E && this._outerRef != null) {
1459
- var x = this._outerRef;
1459
+ var I = this._outerRef;
1460
1460
  if (s === "rtl")
1461
1461
  switch (jt()) {
1462
1462
  case "negative":
1463
- x.scrollLeft = -b;
1463
+ I.scrollLeft = -b;
1464
1464
  break;
1465
1465
  case "positive-ascending":
1466
- x.scrollLeft = b;
1466
+ I.scrollLeft = b;
1467
1467
  break;
1468
1468
  default:
1469
- var L = x.clientWidth, D = x.scrollWidth;
1470
- x.scrollLeft = D - L - b;
1469
+ var L = I.clientWidth, D = I.scrollWidth;
1470
+ I.scrollLeft = D - L - b;
1471
1471
  break;
1472
1472
  }
1473
1473
  else
1474
- x.scrollLeft = Math.max(0, b);
1475
- x.scrollTop = Math.max(0, y);
1474
+ I.scrollLeft = Math.max(0, b);
1475
+ I.scrollTop = Math.max(0, y);
1476
1476
  }
1477
1477
  this._callPropsCallbacks();
1478
- }, f.componentWillUnmount = function() {
1478
+ }, m.componentWillUnmount = function() {
1479
1479
  this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
1480
- }, f.render = function() {
1481
- var s = this.props, C = s.children, b = s.className, y = s.columnCount, E = s.direction, x = s.height, L = s.innerRef, D = s.innerElementType, A = s.innerTagName, z = s.itemData, R = s.itemKey, I = R === void 0 ? qo : R, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, V = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
1480
+ }, m.render = function() {
1481
+ var s = this.props, C = s.children, b = s.className, y = s.columnCount, E = s.direction, I = s.height, L = s.innerRef, D = s.innerElementType, z = s.innerTagName, A = s.itemData, R = s.itemKey, x = R === void 0 ? Uo : R, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
1482
1482
  if (y > 0 && G)
1483
1483
  for (var Pe = te; Pe <= Fe; Pe++)
1484
1484
  for (var we = le; we <= ae; we++)
1485
- Ne.push(Ve(C, {
1485
+ Ne.push(qe(C, {
1486
1486
  columnIndex: we,
1487
- data: z,
1487
+ data: A,
1488
1488
  isScrolling: j ? ee : void 0,
1489
- key: I({
1489
+ key: x({
1490
1490
  columnIndex: we,
1491
- data: z,
1491
+ data: A,
1492
1492
  rowIndex: Pe
1493
1493
  }),
1494
1494
  rowIndex: Pe,
1495
1495
  style: this._getItemStyle(Pe, we)
1496
1496
  }));
1497
1497
  var nt = l(this.props, this._instanceProps), rt = c(this.props, this._instanceProps);
1498
- return Ve(O || M || "div", {
1498
+ return qe(O || M || "div", {
1499
1499
  className: b,
1500
1500
  onScroll: this._onScroll,
1501
1501
  ref: this._outerRefSetter,
1502
- style: Wr({
1502
+ style: kr({
1503
1503
  position: "relative",
1504
- height: x,
1505
- width: V,
1504
+ height: I,
1505
+ width: q,
1506
1506
  overflow: "auto",
1507
1507
  WebkitOverflowScrolling: "touch",
1508
1508
  willChange: "transform",
1509
1509
  direction: E
1510
1510
  }, Z)
1511
- }, Ve(D || A || "div", {
1511
+ }, qe(D || z || "div", {
1512
1512
  children: Ne,
1513
1513
  ref: L,
1514
1514
  style: {
@@ -1517,28 +1517,28 @@ function Uo(t) {
1517
1517
  width: rt
1518
1518
  }
1519
1519
  }));
1520
- }, f._callPropsCallbacks = function() {
1520
+ }, m._callPropsCallbacks = function() {
1521
1521
  var s = this.props, C = s.columnCount, b = s.onItemsRendered, y = s.onScroll, E = s.rowCount;
1522
1522
  if (typeof b == "function" && C > 0 && E > 0) {
1523
- var x = this._getHorizontalRangeToRender(), L = x[0], D = x[1], A = x[2], z = x[3], R = this._getVerticalRangeToRender(), I = R[0], O = R[1], M = R[2], G = R[3];
1524
- this._callOnItemsRendered(L, D, I, O, A, z, M, G);
1523
+ var I = this._getHorizontalRangeToRender(), L = I[0], D = I[1], z = I[2], A = I[3], R = this._getVerticalRangeToRender(), x = R[0], O = R[1], M = R[2], G = R[3];
1524
+ this._callOnItemsRendered(L, D, x, O, z, A, M, G);
1525
1525
  }
1526
1526
  if (typeof y == "function") {
1527
- var Z = this.state, j = Z.horizontalScrollDirection, V = Z.scrollLeft, ee = Z.scrollTop, X = Z.scrollUpdateWasRequested, le = Z.verticalScrollDirection;
1528
- this._callOnScroll(V, ee, j, le, X);
1527
+ var Z = this.state, j = Z.horizontalScrollDirection, q = Z.scrollLeft, ee = Z.scrollTop, X = Z.scrollUpdateWasRequested, le = Z.verticalScrollDirection;
1528
+ this._callOnScroll(q, ee, j, le, X);
1529
1529
  }
1530
- }, f._getHorizontalRangeToRender = function() {
1531
- var s = this.props, C = s.columnCount, b = s.overscanColumnCount, y = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, L = this.state, D = L.horizontalScrollDirection, A = L.isScrolling, z = L.scrollLeft, R = b || y || E || 1;
1532
- if (C === 0 || x === 0)
1530
+ }, m._getHorizontalRangeToRender = function() {
1531
+ var s = this.props, C = s.columnCount, b = s.overscanColumnCount, y = s.overscanColumnsCount, E = s.overscanCount, I = s.rowCount, L = this.state, D = L.horizontalScrollDirection, z = L.isScrolling, A = L.scrollLeft, R = b || y || E || 1;
1532
+ if (C === 0 || I === 0)
1533
1533
  return [0, 0, 0, 0];
1534
- var I = o(this.props, z, this._instanceProps), O = r(this.props, I, z, this._instanceProps), M = !A || D === "backward" ? Math.max(1, R) : 1, G = !A || D === "forward" ? Math.max(1, R) : 1;
1535
- return [Math.max(0, I - M), Math.max(0, Math.min(C - 1, O + G)), I, O];
1536
- }, f._getVerticalRangeToRender = function() {
1537
- var s = this.props, C = s.columnCount, b = s.overscanCount, y = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, L = this.state, D = L.isScrolling, A = L.verticalScrollDirection, z = L.scrollTop, R = y || E || b || 1;
1538
- if (C === 0 || x === 0)
1534
+ var x = o(this.props, A, this._instanceProps), O = r(this.props, x, A, this._instanceProps), M = !z || D === "backward" ? Math.max(1, R) : 1, G = !z || D === "forward" ? Math.max(1, R) : 1;
1535
+ return [Math.max(0, x - M), Math.max(0, Math.min(C - 1, O + G)), x, O];
1536
+ }, m._getVerticalRangeToRender = function() {
1537
+ var s = this.props, C = s.columnCount, b = s.overscanCount, y = s.overscanRowCount, E = s.overscanRowsCount, I = s.rowCount, L = this.state, D = L.isScrolling, z = L.verticalScrollDirection, A = L.scrollTop, R = y || E || b || 1;
1538
+ if (C === 0 || I === 0)
1539
1539
  return [0, 0, 0, 0];
1540
- var I = h(this.props, z, this._instanceProps), O = v(this.props, I, z, this._instanceProps), M = !D || A === "backward" ? Math.max(1, R) : 1, G = !D || A === "forward" ? Math.max(1, R) : 1;
1541
- return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
1540
+ var x = h(this.props, A, this._instanceProps), O = v(this.props, x, A, this._instanceProps), M = !D || z === "backward" ? Math.max(1, R) : 1, G = !D || z === "forward" ? Math.max(1, R) : 1;
1541
+ return [Math.max(0, x - M), Math.max(0, Math.min(I - 1, O + G)), x, O];
1542
1542
  }, u;
1543
1543
  }(Qn), e.defaultProps = {
1544
1544
  direction: "ltr",
@@ -1546,10 +1546,10 @@ function Uo(t) {
1546
1546
  useIsScrolling: !1
1547
1547
  }, e;
1548
1548
  }
1549
- var Vo = function(e, n) {
1550
- var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, p = e.overscanCount, m = e.overscanRowsCount, _ = e.width, h = n.instance;
1549
+ var qo = function(e, n) {
1550
+ var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, p = e.overscanCount, f = e.overscanRowsCount, _ = e.width, h = n.instance;
1551
1551
  if (process.env.NODE_ENV !== "production") {
1552
- 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 d == "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 || c != 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)
1552
+ 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 d == "number" || typeof f == "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 || c != 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)
1553
1553
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1554
1554
  switch (r) {
1555
1555
  case "ltr":
@@ -1569,17 +1569,17 @@ var Vo = function(e, n) {
1569
1569
  var d = r[l];
1570
1570
  c = d.offset + d.size;
1571
1571
  }
1572
- var p = o - l - 1, m = p * a;
1573
- return c + m;
1572
+ var p = o - l - 1, f = p * a;
1573
+ return c + f;
1574
1574
  }, yn = function(e, n) {
1575
1575
  var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, c = 0;
1576
1576
  if (l >= o && (l = o - 1), l >= 0) {
1577
1577
  var d = r[l];
1578
1578
  c = d.offset + d.size;
1579
1579
  }
1580
- var p = o - l - 1, m = p * a;
1581
- return c + m;
1582
- }, fe = function(e, n, o, r) {
1580
+ var p = o - l - 1, f = p * a;
1581
+ return c + f;
1582
+ }, me = function(e, n, o, r) {
1583
1583
  var a, l, c;
1584
1584
  if (e === "column" ? (a = r.columnMetadataMap, l = n.columnWidth, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, l = n.rowHeight, c = r.lastMeasuredRowIndex), o > c) {
1585
1585
  var d = 0;
@@ -1587,9 +1587,9 @@ var Vo = function(e, n) {
1587
1587
  var p = a[c];
1588
1588
  d = p.offset + p.size;
1589
1589
  }
1590
- for (var m = c + 1; m <= o; m++) {
1591
- var _ = l(m);
1592
- a[m] = {
1590
+ for (var f = c + 1; f <= o; f++) {
1591
+ var _ = l(f);
1592
+ a[f] = {
1593
1593
  offset: d,
1594
1594
  size: _
1595
1595
  }, d += _;
@@ -1601,21 +1601,21 @@ var Vo = function(e, n) {
1601
1601
  var a, l;
1602
1602
  e === "column" ? (a = o.columnMetadataMap, l = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, l = o.lastMeasuredRowIndex);
1603
1603
  var c = l > 0 ? a[l].offset : 0;
1604
- return c >= r ? xn(e, n, o, l, 0, r) : Bo(e, n, o, Math.max(0, l), r);
1605
- }, xn = function(e, n, o, r, a, l) {
1604
+ return c >= r ? In(e, n, o, l, 0, r) : Bo(e, n, o, Math.max(0, l), r);
1605
+ }, In = function(e, n, o, r, a, l) {
1606
1606
  for (; a <= r; ) {
1607
- var c = a + Math.floor((r - a) / 2), d = fe(e, n, c, o).offset;
1607
+ var c = a + Math.floor((r - a) / 2), d = me(e, n, c, o).offset;
1608
1608
  if (d === l)
1609
1609
  return c;
1610
1610
  d < l ? a = c + 1 : d > l && (r = c - 1);
1611
1611
  }
1612
1612
  return a > 0 ? a - 1 : 0;
1613
1613
  }, Bo = function(e, n, o, r, a) {
1614
- for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l && fe(e, n, r, o).offset < a; )
1614
+ for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l && me(e, n, r, o).offset < a; )
1615
1615
  r += c, c *= 2;
1616
- return xn(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
1616
+ return In(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
1617
1617
  }, Yt = function(e, n, o, r, a, l, c) {
1618
- var d = e === "column" ? n.width : n.height, p = fe(e, n, o, l), m = e === "column" ? yn(n, l) : Sn(n, l), _ = Math.max(0, Math.min(m - d, p.offset)), h = Math.max(0, p.offset - d + c + p.size);
1618
+ var d = e === "column" ? n.width : n.height, p = me(e, n, o, l), f = e === "column" ? yn(n, l) : Sn(n, l), _ = Math.max(0, Math.min(f - d, p.offset)), h = Math.max(0, p.offset - d + c + p.size);
1619
1619
  switch (r === "smart" && (a >= h - d && a <= _ + d ? r = "auto" : r = "center"), r) {
1620
1620
  case "start":
1621
1621
  return _;
@@ -1627,17 +1627,17 @@ var Vo = function(e, n) {
1627
1627
  default:
1628
1628
  return a >= h && a <= _ ? a : h > _ || a < h ? h : _;
1629
1629
  }
1630
- }, Zo = /* @__PURE__ */ Uo({
1630
+ }, Zo = /* @__PURE__ */ Vo({
1631
1631
  getColumnOffset: function(e, n, o) {
1632
- return fe("column", e, n, o).offset;
1632
+ return me("column", e, n, o).offset;
1633
1633
  },
1634
1634
  getColumnStartIndexForOffset: function(e, n, o) {
1635
1635
  return Xt("column", e, o, n);
1636
1636
  },
1637
1637
  getColumnStopIndexForStartIndex: function(e, n, o, r) {
1638
- for (var a = e.columnCount, l = e.width, c = fe("column", e, n, r), d = o + l, p = c.offset + c.size, m = n; m < a - 1 && p < d; )
1639
- m++, p += fe("column", e, m, r).size;
1640
- return m;
1638
+ for (var a = e.columnCount, l = e.width, c = me("column", e, n, r), d = o + l, p = c.offset + c.size, f = n; f < a - 1 && p < d; )
1639
+ f++, p += me("column", e, f, r).size;
1640
+ return f;
1641
1641
  },
1642
1642
  getColumnWidth: function(e, n, o) {
1643
1643
  return o.columnMetadataMap[n].size;
@@ -1651,7 +1651,7 @@ var Vo = function(e, n) {
1651
1651
  return Yt("row", e, n, o, r, a, l);
1652
1652
  },
1653
1653
  getRowOffset: function(e, n, o) {
1654
- return fe("row", e, n, o).offset;
1654
+ return me("row", e, n, o).offset;
1655
1655
  },
1656
1656
  getRowHeight: function(e, n, o) {
1657
1657
  return o.rowMetadataMap[n].size;
@@ -1660,9 +1660,9 @@ var Vo = function(e, n) {
1660
1660
  return Xt("row", e, o, n);
1661
1661
  },
1662
1662
  getRowStopIndexForStartIndex: function(e, n, o, r) {
1663
- for (var a = e.rowCount, l = e.height, c = fe("row", e, n, r), d = o + l, p = c.offset + c.size, m = n; m < a - 1 && p < d; )
1664
- m++, p += fe("row", e, m, r).size;
1665
- return m;
1663
+ for (var a = e.rowCount, l = e.height, c = me("row", e, n, r), d = o + l, p = c.offset + c.size, f = n; f < a - 1 && p < d; )
1664
+ f++, p += me("row", e, f, r).size;
1665
+ return f;
1666
1666
  },
1667
1667
  initInstanceProps: function(e, n) {
1668
1668
  var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, l = {
@@ -1684,7 +1684,7 @@ var Vo = function(e, n) {
1684
1684
  shouldForceUpdate: d
1685
1685
  });
1686
1686
  }, n.resetAfterIndices = function(c) {
1687
- var d = c.columnIndex, p = c.rowIndex, m = c.shouldForceUpdate, _ = m === void 0 ? !0 : m;
1687
+ var d = c.columnIndex, p = c.rowIndex, f = c.shouldForceUpdate, _ = f === void 0 ? !0 : f;
1688
1688
  typeof d == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, d - 1)), typeof p == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, p - 1)), n._getItemStyleCache(-1), _ && n.forceUpdate();
1689
1689
  }, l;
1690
1690
  },
@@ -1711,11 +1711,11 @@ function Jt(t, e) {
1711
1711
  }
1712
1712
  var jo = ["style"], Ko = ["style"];
1713
1713
  function Xo(t, e) {
1714
- var n = t.style, o = Vt(t, jo), r = e.style, a = Vt(e, Ko);
1714
+ var n = t.style, o = qt(t, jo), r = e.style, a = qt(e, Ko);
1715
1715
  return !Jt(n, r) && !Jt(o, a);
1716
1716
  }
1717
1717
  const Yo = () => {
1718
- const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = qe(), a = W(() => r.heights.length, [r.heights]), l = W(() => e === J.HORIZONTAL_SCROLLING ? a : t === Ie.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = W(() => r.widths.reduce((w, T, P) => {
1718
+ const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ue(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === J.HORIZONTAL_SCROLLING ? a : t === xe.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((w, T, P) => {
1719
1719
  const S = P % l;
1720
1720
  return (!w[S] || T > w[S]) && (w[S] = T), w;
1721
1721
  }, []), [r.widths, l]), d = N(
@@ -1728,12 +1728,12 @@ const Yo = () => {
1728
1728
  (v) => r.heights[v] || 0,
1729
1729
  [r.heights]
1730
1730
  );
1731
- k(() => {
1731
+ W(() => {
1732
1732
  n(l);
1733
1733
  }, [l, n]);
1734
- const m = W(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), _ = W(() => r.heights.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]), h = W(() => r.widths.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]);
1734
+ const f = k(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), _ = k(() => r.heights.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]), h = k(() => r.widths.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]);
1735
1735
  return {
1736
- rowCount: m,
1736
+ rowCount: f,
1737
1737
  rowHeight: p,
1738
1738
  columnCount: l,
1739
1739
  columnWidth: d,
@@ -1763,8 +1763,8 @@ function Jo(t) {
1763
1763
  const d = typeof document < "u" && document.attachEvent;
1764
1764
  if (!d) {
1765
1765
  l = function(S) {
1766
- const u = S.__resizeTriggers__, f = u.firstElementChild, g = u.lastElementChild, s = f.firstElementChild;
1767
- g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = f.offsetWidth + 1 + "px", s.style.height = f.offsetHeight + 1 + "px", f.scrollLeft = f.scrollWidth, f.scrollTop = f.scrollHeight;
1766
+ const u = S.__resizeTriggers__, m = u.firstElementChild, g = u.lastElementChild, s = m.firstElementChild;
1767
+ g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = m.offsetWidth + 1 + "px", s.style.height = m.offsetHeight + 1 + "px", m.scrollLeft = m.scrollWidth, m.scrollTop = m.scrollHeight;
1768
1768
  }, a = function(S) {
1769
1769
  return S.offsetWidth !== S.__resizeLast__.width || S.offsetHeight !== S.__resizeLast__.height;
1770
1770
  }, c = function(S) {
@@ -1810,8 +1810,8 @@ function Jo(t) {
1810
1810
  const P = w.createElement("div");
1811
1811
  P.className = "expand-trigger", P.appendChild(w.createElement("div"));
1812
1812
  const S = w.createElement("div");
1813
- S.className = "contract-trigger", h.__resizeTriggers__.appendChild(P), h.__resizeTriggers__.appendChild(S), h.appendChild(h.__resizeTriggers__), l(h), h.addEventListener("scroll", c, !0), o && (h.__resizeTriggers__.__animationListener__ = function(f) {
1814
- f.animationName === n && l(h);
1813
+ S.className = "contract-trigger", h.__resizeTriggers__.appendChild(P), h.__resizeTriggers__.appendChild(S), h.appendChild(h.__resizeTriggers__), l(h), h.addEventListener("scroll", c, !0), o && (h.__resizeTriggers__.__animationListener__ = function(m) {
1814
+ m.animationName === n && l(h);
1815
1815
  }, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
1816
1816
  }
1817
1817
  h.__resizeListeners__.push(v);
@@ -1845,7 +1845,7 @@ class Qo extends er {
1845
1845
  onResize: r
1846
1846
  } = this.props;
1847
1847
  if (this._parentNode) {
1848
- const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), p = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), _ = m.height - d - p, h = m.width - l - c, v = this._parentNode.offsetHeight - d - p, w = this._parentNode.offsetWidth - l - c;
1848
+ const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), p = parseFloat(a.paddingBottom || "0"), f = this._parentNode.getBoundingClientRect(), _ = f.height - d - p, h = f.width - l - c, v = this._parentNode.offsetHeight - d - p, w = this._parentNode.offsetWidth - l - c;
1849
1849
  (!n && (this.state.height !== v || this.state.scaledHeight !== _) || !o && (this.state.width !== w || this.state.scaledWidth !== h)) && (this.setState({
1850
1850
  height: v,
1851
1851
  width: w,
@@ -1888,7 +1888,7 @@ class Qo extends er {
1888
1888
  nonce: c,
1889
1889
  onResize: d,
1890
1890
  style: p = {},
1891
- tagName: m = "div",
1891
+ tagName: f = "div",
1892
1892
  ..._
1893
1893
  } = this.props, {
1894
1894
  height: h,
@@ -1899,7 +1899,7 @@ class Qo extends er {
1899
1899
  overflow: "visible"
1900
1900
  }, S = {};
1901
1901
  let u = !1;
1902
- return r || (h === 0 && (u = !0), P.height = 0, S.height = h, S.scaledHeight = v), a || (T === 0 && (u = !0), P.width = 0, S.width = T, S.scaledWidth = w), l && (u = !1), Ve(m, {
1902
+ return r || (h === 0 && (u = !0), P.height = 0, S.height = h, S.scaledHeight = v), a || (T === 0 && (u = !0), P.width = 0, S.width = T, S.scaledWidth = w), l && (u = !1), qe(f, {
1903
1903
  ref: this._setRef,
1904
1904
  style: {
1905
1905
  ...P,
@@ -1910,15 +1910,15 @@ class Qo extends er {
1910
1910
  }
1911
1911
  }
1912
1912
  const ei = ln(({ widths: t, heights: e }) => {
1913
- const { focusedPage: n, totalPages: o } = ie(), r = W(() => {
1913
+ const { focusedPage: n, totalPages: o } = ie(), r = k(() => {
1914
1914
  const c = [], d = Math.ceil(n / 2) * 2 - 1;
1915
1915
  if (c.push(d), d + 1 <= o) {
1916
1916
  const p = d + 1;
1917
1917
  c.push(p);
1918
1918
  }
1919
1919
  return c;
1920
- }, [n, o]), a = W(() => {
1921
- const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c), p = e(c), m = t(c + 1), _ = e(c + 1), h = p > _ ? p : _, v = p < _ ? p : _, w = h / 2 - v / 2;
1920
+ }, [n, o]), a = k(() => {
1921
+ const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c), p = e(c), f = t(c + 1), _ = e(c + 1), h = p > _ ? p : _, v = p < _ ? p : _, w = h / 2 - v / 2;
1922
1922
  return [
1923
1923
  {
1924
1924
  position: "absolute",
@@ -1931,18 +1931,18 @@ const ei = ln(({ widths: t, heights: e }) => {
1931
1931
  position: "absolute",
1932
1932
  left: d,
1933
1933
  top: h === _ ? 0 : w,
1934
- width: m,
1934
+ width: f,
1935
1935
  height: _
1936
1936
  }
1937
1937
  ];
1938
- }, [t, e, r]), l = W(() => a.reduce((c, d) => c + Number(d.width || 0), 0), [a]);
1939
- return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, d) => /* @__PURE__ */ i(It, { style: a[d], pageNumber: c }, c)) });
1938
+ }, [t, e, r]), l = k(() => a.reduce((c, d) => c + Number(d.width || 0), 0), [a]);
1939
+ return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, d) => /* @__PURE__ */ i(xt, { style: a[d], pageNumber: c }, c)) });
1940
1940
  }), ti = ({ widths: t, heights: e }) => {
1941
- const { focusedPage: n } = ie(), o = W(() => ({
1941
+ const { focusedPage: n } = ie(), o = k(() => ({
1942
1942
  position: "absolute",
1943
1943
  width: t(n - 1),
1944
1944
  height: e(n - 1)
1945
- }), [t, e, n]), r = W(() => t(n - 1), [t]);
1945
+ }), [t, e, n]), r = k(() => t(n - 1), [t]);
1946
1946
  return /* @__PURE__ */ i(
1947
1947
  "div",
1948
1948
  {
@@ -1950,29 +1950,29 @@ const ei = ln(({ widths: t, heights: e }) => {
1950
1950
  width: r,
1951
1951
  position: "relative"
1952
1952
  },
1953
- children: /* @__PURE__ */ i(It, { style: o, pageNumber: n }, n)
1953
+ children: /* @__PURE__ */ i(xt, { style: o, pageNumber: n }, n)
1954
1954
  }
1955
1955
  );
1956
1956
  }, ni = (t, e, n) => {
1957
- const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = qe(), { setFocusedPage: c } = ie(), [d, p] = $([]), { targetScrollPage: m } = pn(), _ = Pt(d, 0, 500), h = W(() => a.map((w, T) => {
1958
- const P = l[T], S = Ur(T + 1, t), u = P * S.columnIndex, f = w * S.rowIndex, g = u + P, s = f + w;
1957
+ const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = Ue(), { setFocusedPage: c } = ie(), [d, p] = $([]), { targetScrollPage: f } = pn(), _ = Pt(d, 0, 500), h = k(() => a.map((w, T) => {
1958
+ const P = l[T], S = Vr(T + 1, t), u = P * S.columnIndex, m = w * S.rowIndex, g = u + P, s = m + w;
1959
1959
  return {
1960
1960
  pageNumber: T + 1,
1961
1961
  ...S,
1962
1962
  width: P,
1963
1963
  height: w,
1964
1964
  startX: u,
1965
- startY: f,
1965
+ startY: m,
1966
1966
  endX: g,
1967
1967
  endY: s
1968
1968
  };
1969
1969
  }), [a, l, t, e]);
1970
- k(() => {
1970
+ W(() => {
1971
1971
  var T;
1972
- _.length > 0 && !m.current && c(_[0].pageNumber);
1972
+ _.length > 0 && !f.current && c(_[0].pageNumber);
1973
1973
  let w = (T = _[0]) == null ? void 0 : T.ratio;
1974
- w && _.filter((P) => Math.round(P.ratio) === Math.round(w)).some((P) => P.pageNumber === m.current) && setTimeout(() => {
1975
- m.current = void 0;
1974
+ w && _.filter((P) => Math.round(P.ratio) === Math.round(w)).some((P) => P.pageNumber === f.current) && setTimeout(() => {
1975
+ f.current = void 0;
1976
1976
  }, 500);
1977
1977
  }, [_, c]);
1978
1978
  const v = N(
@@ -1984,53 +1984,53 @@ const ei = ln(({ widths: t, heights: e }) => {
1984
1984
  endTop: T.scrollTop + T.clientHeight,
1985
1985
  endLeft: T.scrollLeft + T.clientWidth
1986
1986
  }, S = h.filter((u) => {
1987
- const f = u.endX >= P.startLeft && u.endY >= P.startTop, g = u.startX <= P.endLeft && u.startY <= P.endTop;
1988
- return f && g;
1987
+ const m = u.endX >= P.startLeft && u.endY >= P.startTop, g = u.startX <= P.endLeft && u.startY <= P.endTop;
1988
+ return m && g;
1989
1989
  }).map((u) => {
1990
- const f = P.startLeft > u.startX ? P.startLeft : u.startX, g = P.startTop > u.startY ? P.startTop : u.startY, s = P.endLeft < u.endX ? P.endLeft : u.endX, C = P.endTop < u.endY ? P.endTop : u.endY, b = s - f, y = C - g, x = +(b * y / (u.width * u.height) * 100).toFixed(2);
1990
+ const m = P.startLeft > u.startX ? P.startLeft : u.startX, g = P.startTop > u.startY ? P.startTop : u.startY, s = P.endLeft < u.endX ? P.endLeft : u.endX, C = P.endTop < u.endY ? P.endTop : u.endY, b = s - m, y = C - g, I = +(b * y / (u.width * u.height) * 100).toFixed(2);
1991
1991
  return {
1992
1992
  pageNumber: u.pageNumber,
1993
- ratio: x
1993
+ ratio: I
1994
1994
  };
1995
- }).sort((u, f) => f.ratio - u.ratio);
1995
+ }).sort((u, m) => m.ratio - u.ratio);
1996
1996
  p(S);
1997
1997
  });
1998
1998
  },
1999
1999
  [r, h]
2000
2000
  );
2001
- k(() => {
2001
+ W(() => {
2002
2002
  if (n)
2003
2003
  return n == null || n.addEventListener("scroll", v), () => {
2004
2004
  n == null || n.removeEventListener("scroll", v);
2005
2005
  };
2006
2006
  }, [n, v]);
2007
2007
  }, ri = ln(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
2008
- const r = Vr(e, t, n.columnCount);
2009
- return /* @__PURE__ */ i(It, { style: o, pageNumber: r }, r);
2010
- }, Xo), qs = () => {
2008
+ const r = qr(e, t, n.columnCount);
2009
+ return /* @__PURE__ */ i(xt, { style: o, pageNumber: r }, r);
2010
+ }, Xo), Us = () => {
2011
2011
  const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = ar(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: a } = wn(), {
2012
2012
  virtualScrollRef: l,
2013
2013
  getVirtualScrollRef: c,
2014
2014
  getPageScrollElementRef: d,
2015
2015
  getVirtualScrollableElementRef: p,
2016
- setTotalInnerDimensions: m,
2016
+ setTotalInnerDimensions: f,
2017
2017
  virtualScrollableElementRef: _,
2018
2018
  totalInnerDimensions: h,
2019
2019
  pageScrollElementRef: v
2020
- } = et(), w = H(!0), { nextPage: T, prevPage: P, setFocusedPage: S, focusedPage: u } = ie(), { scrollMode: f } = Re(), { viewMode: g } = Ee(), s = H(null), { loading: C } = Q(), { passwordRequired: b } = nr(), { LoaderImageComponent: y } = hn(), E = H(
2020
+ } = et(), w = H(!0), { nextPage: T, prevPage: P, setFocusedPage: S, focusedPage: u } = ie(), { scrollMode: m } = Re(), { viewMode: g } = Ee(), s = H(null), { loading: C } = Q(), { passwordRequired: b } = nr(), { LoaderImageComponent: y } = hn(), E = H(
2021
2021
  h
2022
- ), x = H({
2022
+ ), I = H({
2023
2023
  viewMode: g,
2024
- scrollMode: f
2025
- }), L = H(!1), D = H(), { isFullScreen: A } = sr(), {
2026
- pageDimension: z,
2024
+ scrollMode: m
2025
+ }), L = H(!1), D = H(), { isFullScreen: z } = sr(), {
2026
+ pageDimension: A,
2027
2027
  rowCount: R,
2028
- rowHeight: I,
2028
+ rowHeight: x,
2029
2029
  columnCount: O,
2030
2030
  columnWidth: M,
2031
2031
  estimatedColumnWidth: G,
2032
2032
  estimatedRowHeight: Z
2033
- } = Yo(), j = Pt(h, 100), V = H();
2033
+ } = Yo(), j = Pt(h, 100), q = H();
2034
2034
  ni(O, R, _);
2035
2035
  const ee = H({
2036
2036
  scrollTop: 0,
@@ -2039,32 +2039,32 @@ const ei = ln(({ widths: t, heights: e }) => {
2039
2039
  Gr(o);
2040
2040
  const { isPressed: X } = Hr(), { selectionMode: le } = ir(), { initializeGrabScroll: ae, resetGrabState: de } = $r({
2041
2041
  isPressed: X
2042
- }), te = W(() => le === tr.HAND, [le]), Fe = W(() => ({
2042
+ }), te = k(() => le === tr.HAND, [le]), Fe = k(() => ({
2043
2043
  columnCount: O
2044
2044
  }), [O]), Ne = N(
2045
- (q) => {
2046
- const U = document.activeElement !== o;
2047
- !A && U || (["ArrowUp", "ArrowLeft"].includes(q.key) ? (q.preventDefault(), P()) : ["ArrowDown", "ArrowRight"].includes(q.key) && (q.preventDefault(), T()));
2045
+ (U) => {
2046
+ const V = document.activeElement !== o;
2047
+ !z && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), P()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), T()));
2048
2048
  },
2049
- [T, P, A, f]
2049
+ [T, P, z, m]
2050
2050
  );
2051
- k(() => (window.addEventListener("keydown", Ne), () => {
2051
+ W(() => (window.addEventListener("keydown", Ne), () => {
2052
2052
  window.removeEventListener("keydown", Ne);
2053
- }), [Ne]), k(() => {
2053
+ }), [Ne]), W(() => {
2054
2054
  if (s.current && (s.current.style.position = "relative"), !!l)
2055
- for (let q = 0; q < R; q++)
2056
- for (let U = 0; U < O; U++)
2055
+ for (let U = 0; U < R; U++)
2056
+ for (let V = 0; V < O; V++)
2057
2057
  l.resetAfterIndices({
2058
- columnIndex: U,
2059
- rowIndex: q,
2058
+ columnIndex: V,
2059
+ rowIndex: U,
2060
2060
  shouldForceUpdate: !0
2061
2061
  });
2062
- }, [R, O, z, l]);
2062
+ }, [R, O, A, l]);
2063
2063
  const Pe = N(
2064
- (q, U) => {
2064
+ (U, V) => {
2065
2065
  if (!_)
2066
2066
  return { scrollTop: 0, scrollLeft: 0 };
2067
- const Te = ee.current.scrollTop > U, Se = ee.current.scrollLeft > q;
2067
+ const Te = ee.current.scrollTop > V, Se = ee.current.scrollLeft > U;
2068
2068
  return Te || Se ? ee.current : {
2069
2069
  scrollTop: _.scrollTop,
2070
2070
  scrollLeft: _.scrollLeft
@@ -2072,20 +2072,20 @@ const ei = ln(({ widths: t, heights: e }) => {
2072
2072
  },
2073
2073
  [_]
2074
2074
  ), we = N(
2075
- (q, U) => {
2076
- if (x.current.viewMode !== g || x.current.scrollMode !== f) {
2077
- V.current && clearTimeout(V.current), L.current = !0, a(u, "auto"), V.current = setTimeout(() => {
2075
+ (U, V) => {
2076
+ if (I.current.viewMode !== g || I.current.scrollMode !== m) {
2077
+ q.current && clearTimeout(q.current), L.current = !0, a(u, "auto"), q.current = setTimeout(() => {
2078
2078
  requestAnimationFrame(() => {
2079
- x.current = { viewMode: g, scrollMode: f };
2079
+ I.current = { viewMode: g, scrollMode: m };
2080
2080
  });
2081
2081
  }, 100);
2082
2082
  return;
2083
2083
  }
2084
- const Se = q.scrollTop, ot = q.scrollLeft;
2085
- if (!U.height || !U.width)
2084
+ const Se = U.scrollTop, ot = U.scrollLeft;
2085
+ if (!V.height || !V.width)
2086
2086
  return;
2087
2087
  L.current = !0;
2088
- const { height: ye, width: it } = U, { height: Ot, width: Dt } = E.current;
2088
+ const { height: ye, width: it } = V, { height: Ot, width: Dt } = E.current;
2089
2089
  if (Ot === ye && Dt === it)
2090
2090
  return;
2091
2091
  const Kn = Se / Ot * ye, Xn = ot / Dt * it, Yn = Math.round(Math.min(Kn, ye)) || 0, Jn = Math.round(Math.min(Xn, it)) || 0;
@@ -2097,53 +2097,53 @@ const ei = ln(({ widths: t, heights: e }) => {
2097
2097
  });
2098
2098
  });
2099
2099
  }, 0), E.current = {
2100
- height: U.height,
2101
- width: U.width
2100
+ height: V.height,
2101
+ width: V.width
2102
2102
  };
2103
2103
  },
2104
- [l, g, f, a]
2104
+ [l, g, m, a]
2105
2105
  );
2106
- k(() => {
2106
+ W(() => {
2107
2107
  clearTimeout(D.current);
2108
- const q = Array.from({ length: R }).reduce(
2109
- (Se, ot, ye) => Se + I(ye),
2108
+ const U = Array.from({ length: R }).reduce(
2109
+ (Se, ot, ye) => Se + x(ye),
2110
2110
  0
2111
- ), U = Array.from({ length: O }).reduce(
2111
+ ), V = Array.from({ length: O }).reduce(
2112
2112
  (Se, ot, ye) => Se + M(ye),
2113
2113
  0
2114
- ), Te = Pe(U, q);
2115
- ee.current = Te, we(Te, { height: q, width: U }), m({
2116
- height: q,
2117
- width: U
2114
+ ), Te = Pe(V, U);
2115
+ ee.current = Te, we(Te, { height: U, width: V }), f({
2116
+ height: U,
2117
+ width: V
2118
2118
  });
2119
- }, [z, R, O, we]);
2119
+ }, [A, R, O, we]);
2120
2120
  const nt = N(
2121
- (q) => {
2121
+ (U) => {
2122
2122
  ee.current = {
2123
- scrollTop: q.scrollTop,
2124
- scrollLeft: q.scrollLeft
2123
+ scrollTop: U.scrollTop,
2124
+ scrollLeft: U.scrollLeft
2125
2125
  };
2126
2126
  },
2127
2127
  [_]
2128
2128
  );
2129
- k(() => () => {
2130
- V.current && clearTimeout(V.current);
2129
+ W(() => () => {
2130
+ q.current && clearTimeout(q.current);
2131
2131
  }, []);
2132
- const rt = W(() => ne(ue["rp-pages-container"], {
2132
+ const rt = k(() => ne(ue["rp-pages-container"], {
2133
2133
  [ue["rp-cursor-grab"]]: te && !X,
2134
2134
  [ue["rp-cursor-grabbing"]]: te && X
2135
2135
  }), [te, X]), jn = N(
2136
- (q) => {
2137
- if (te && q) {
2138
- const U = ne(ue["rp-pages"]), Te = document.querySelector(`.${U}`);
2136
+ (U) => {
2137
+ if (te && U) {
2138
+ const V = ne(ue["rp-pages"]), Te = document.querySelector(`.${V}`);
2139
2139
  ae(Te);
2140
2140
  }
2141
2141
  },
2142
2142
  [te, ae, ue]
2143
2143
  );
2144
- return k(() => {
2144
+ return W(() => {
2145
2145
  C && de();
2146
- }, [C]), k(() => {
2146
+ }, [C]), W(() => {
2147
2147
  if (!(j.height === 0 || !w.current)) {
2148
2148
  if (e === J.PAGE_SCROLLING) {
2149
2149
  t !== u && v && S(t), w.current = !1;
@@ -2157,14 +2157,14 @@ const ei = ln(({ widths: t, heights: e }) => {
2157
2157
  v,
2158
2158
  S,
2159
2159
  j
2160
- ]), /* @__PURE__ */ F(me, { children: [
2161
- /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Qo, { style: { minHeight: "50px" }, children: ({ width: q, height: U }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: jn, style: { width: q, height: U }, children: f === J.PAGE_SCROLLING ? /* @__PURE__ */ i(
2160
+ ]), /* @__PURE__ */ F(fe, { children: [
2161
+ /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Qo, { style: { minHeight: "50px" }, children: ({ width: U, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: jn, style: { width: U, height: V }, children: m === J.PAGE_SCROLLING ? /* @__PURE__ */ i(
2162
2162
  "div",
2163
2163
  {
2164
2164
  ref: d,
2165
- style: { width: q, height: U },
2165
+ style: { width: U, height: V },
2166
2166
  className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
2167
- children: g === Ie.DUAL_PAGE ? /* @__PURE__ */ i(ei, { widths: M, heights: I }) : /* @__PURE__ */ i(ti, { widths: M, heights: I })
2167
+ children: g === xe.DUAL_PAGE ? /* @__PURE__ */ i(ei, { widths: M, heights: x }) : /* @__PURE__ */ i(ti, { widths: M, heights: x })
2168
2168
  }
2169
2169
  ) : G ? /* @__PURE__ */ i(
2170
2170
  Zo,
@@ -2176,15 +2176,15 @@ const ei = ln(({ widths: t, heights: e }) => {
2176
2176
  onScroll: nt,
2177
2177
  columnCount: O,
2178
2178
  columnWidth: M,
2179
- rowHeight: I,
2180
- height: U,
2181
- width: q,
2179
+ rowHeight: x,
2180
+ height: V,
2181
+ width: U,
2182
2182
  estimatedColumnWidth: G,
2183
2183
  estimatedRowHeight: Z,
2184
2184
  rowCount: R,
2185
2185
  className: ne(
2186
2186
  ue["rp-pages"],
2187
- f === J.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
2187
+ m === J.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
2188
2188
  ),
2189
2189
  children: ri
2190
2190
  }
@@ -2202,15 +2202,15 @@ const ei = ln(({ widths: t, heights: e }) => {
2202
2202
  children: y && /* @__PURE__ */ i(y, {})
2203
2203
  }
2204
2204
  ) }) }) }),
2205
- b && /* @__PURE__ */ i(qr, {})
2205
+ b && /* @__PURE__ */ i(Ur, {})
2206
2206
  ] });
2207
- }, ke = {
2207
+ }, We = {
2208
2208
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
2209
2209
  "rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
2210
2210
  "rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
2211
2211
  "rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
2212
2212
  "rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
2213
- }, ft = {
2213
+ }, mt = {
2214
2214
  "rp-paginate": "_rp-paginate_1y9vo_1",
2215
2215
  "rp-page-input": "_rp-page-input_1y9vo_6",
2216
2216
  "rp-total-page": "_rp-total-page_1y9vo_11"
@@ -2221,13 +2221,13 @@ const ei = ln(({ widths: t, heights: e }) => {
2221
2221
  const { nextIcon: t } = pe();
2222
2222
  return t || /* @__PURE__ */ i(He, { style: { transform: "rotate(180deg" } });
2223
2223
  }, ai = () => {
2224
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages: m } = se(), { viewMode: _ } = Ee(), { scrollMode: h } = Re();
2225
- k(() => {
2224
+ const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages: f } = se(), { viewMode: _ } = Ee(), { scrollMode: h } = Re();
2225
+ W(() => {
2226
2226
  c(t.toString());
2227
2227
  }, [t]);
2228
2228
  const v = N((u) => {
2229
- const f = u.target.value;
2230
- c(f);
2229
+ const m = u.target.value;
2230
+ c(m);
2231
2231
  }, []), w = N(async () => {
2232
2232
  const u = a(l);
2233
2233
  u.success || c(u.currentPage.toString());
@@ -2238,7 +2238,7 @@ const ei = ln(({ widths: t, heights: e }) => {
2238
2238
  u.key === "Enter" && w();
2239
2239
  },
2240
2240
  [w]
2241
- ), S = W(() => _ === Ie.DUAL_PAGE && h === J.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, _, h]);
2241
+ ), S = k(() => _ === xe.DUAL_PAGE && h === J.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, _, h]);
2242
2242
  return typeof d != "boolean" ? /* @__PURE__ */ i(
2243
2243
  d,
2244
2244
  {
@@ -2249,42 +2249,42 @@ const ei = ln(({ widths: t, heights: e }) => {
2249
2249
  goToPage: a,
2250
2250
  changePage: n
2251
2251
  }
2252
- ) : d ? /* @__PURE__ */ F("div", { className: ft["rp-paginate"], children: [
2253
- !p && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
2252
+ ) : d ? /* @__PURE__ */ F("div", { className: mt["rp-paginate"], children: [
2253
+ !p && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.previousPageTooltip, children: /* @__PURE__ */ i(
2254
2254
  re,
2255
2255
  {
2256
2256
  onClick: r,
2257
- "aria-label": m == null ? void 0 : m.previousPageTooltip,
2257
+ "aria-label": f == null ? void 0 : f.previousPageTooltip,
2258
2258
  "aria-disabled": t === 1,
2259
2259
  children: /* @__PURE__ */ i(oi, {})
2260
2260
  }
2261
2261
  ) }),
2262
- /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ i(
2262
+ /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.currentPageTooltip, children: /* @__PURE__ */ i(
2263
2263
  dn,
2264
2264
  {
2265
2265
  onKeyDown: P,
2266
2266
  onBlur: T,
2267
2267
  onChange: v,
2268
2268
  value: l,
2269
- className: ft["rp-page-input"]
2269
+ className: mt["rp-page-input"]
2270
2270
  }
2271
2271
  ) }),
2272
- /* @__PURE__ */ F("span", { className: ft["rp-total-page"], children: [
2272
+ /* @__PURE__ */ F("span", { className: mt["rp-total-page"], children: [
2273
2273
  "/",
2274
2274
  e
2275
2275
  ] }),
2276
- !p && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
2276
+ !p && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.nextPageTooltip, children: /* @__PURE__ */ i(
2277
2277
  re,
2278
2278
  {
2279
2279
  onClick: o,
2280
- "aria-label": m == null ? void 0 : m.nextPageTooltip,
2280
+ "aria-label": f == null ? void 0 : f.nextPageTooltip,
2281
2281
  "aria-disabled": S,
2282
2282
  children: /* @__PURE__ */ i(ii, {})
2283
2283
  }
2284
2284
  ) })
2285
2285
  ] }) : null;
2286
2286
  };
2287
- var Lt = "Dialog", [In, Us] = Xr(Lt), [si, ce] = In(Lt), Ln = (t) => {
2287
+ var Lt = "Dialog", [xn, Vs] = Xr(Lt), [si, ce] = xn(Lt), Ln = (t) => {
2288
2288
  const {
2289
2289
  __scopeDialog: e,
2290
2290
  children: n,
@@ -2292,7 +2292,7 @@ var Lt = "Dialog", [In, Us] = Xr(Lt), [si, ce] = In(Lt), Ln = (t) => {
2292
2292
  defaultOpen: r,
2293
2293
  onOpenChange: a,
2294
2294
  modal: l = !0
2295
- } = t, c = B.useRef(null), d = B.useRef(null), [p = !1, m] = Qr({
2295
+ } = t, c = B.useRef(null), d = B.useRef(null), [p = !1, f] = Qr({
2296
2296
  prop: o,
2297
2297
  defaultProp: r,
2298
2298
  onChange: a
@@ -2307,8 +2307,8 @@ var Lt = "Dialog", [In, Us] = Xr(Lt), [si, ce] = In(Lt), Ln = (t) => {
2307
2307
  titleId: ct(),
2308
2308
  descriptionId: ct(),
2309
2309
  open: p,
2310
- onOpenChange: m,
2311
- onOpenToggle: B.useCallback(() => m((_) => !_), [m]),
2310
+ onOpenChange: f,
2311
+ onOpenToggle: B.useCallback(() => f((_) => !_), [f]),
2312
2312
  modal: l,
2313
2313
  children: n
2314
2314
  }
@@ -2319,7 +2319,7 @@ var Rn = "DialogTrigger", ci = B.forwardRef(
2319
2319
  (t, e) => {
2320
2320
  const { __scopeDialog: n, ...o } = t, r = ce(Rn, n), a = Tt(e, r.triggerRef);
2321
2321
  return /* @__PURE__ */ i(
2322
- Ue.button,
2322
+ Ve.button,
2323
2323
  {
2324
2324
  type: "button",
2325
2325
  "aria-haspopup": "dialog",
@@ -2334,7 +2334,7 @@ var Rn = "DialogTrigger", ci = B.forwardRef(
2334
2334
  }
2335
2335
  );
2336
2336
  ci.displayName = Rn;
2337
- var Rt = "DialogPortal", [li, En] = In(Rt, {
2337
+ var Rt = "DialogPortal", [li, En] = xn(Rt, {
2338
2338
  forceMount: void 0
2339
2339
  }), Nn = (t) => {
2340
2340
  const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(Rt, e);
@@ -2355,7 +2355,7 @@ var di = B.forwardRef(
2355
2355
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2356
2356
  // ie. when `Overlay` and `Content` are siblings
2357
2357
  /* @__PURE__ */ i(to, { as: Yr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
2358
- Ue.div,
2358
+ Ve.div,
2359
2359
  {
2360
2360
  "data-state": Nt(r.open),
2361
2361
  ...o,
@@ -2380,7 +2380,7 @@ var ui = B.forwardRef(
2380
2380
  if (a)
2381
2381
  return io(a);
2382
2382
  }, []), /* @__PURE__ */ i(
2383
- An,
2383
+ zn,
2384
2384
  {
2385
2385
  ...t,
2386
2386
  ref: r,
@@ -2405,7 +2405,7 @@ var ui = B.forwardRef(
2405
2405
  (t, e) => {
2406
2406
  const n = ce(Le, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
2407
2407
  return /* @__PURE__ */ i(
2408
- An,
2408
+ zn,
2409
2409
  {
2410
2410
  ...t,
2411
2411
  ref: e,
@@ -2424,10 +2424,10 @@ var ui = B.forwardRef(
2424
2424
  }
2425
2425
  );
2426
2426
  }
2427
- ), An = B.forwardRef(
2427
+ ), zn = B.forwardRef(
2428
2428
  (t, e) => {
2429
2429
  const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = ce(Le, n), d = B.useRef(null), p = Tt(e, d);
2430
- return no(), /* @__PURE__ */ F(me, { children: [
2430
+ return no(), /* @__PURE__ */ F(fe, { children: [
2431
2431
  /* @__PURE__ */ i(
2432
2432
  ro,
2433
2433
  {
@@ -2451,31 +2451,31 @@ var ui = B.forwardRef(
2451
2451
  )
2452
2452
  }
2453
2453
  ),
2454
- /* @__PURE__ */ F(me, { children: [
2455
- /* @__PURE__ */ i(fi, { titleId: c.titleId }),
2454
+ /* @__PURE__ */ F(fe, { children: [
2455
+ /* @__PURE__ */ i(mi, { titleId: c.titleId }),
2456
2456
  /* @__PURE__ */ i(gi, { contentRef: d, descriptionId: c.descriptionId })
2457
2457
  ] })
2458
2458
  ] });
2459
2459
  }
2460
- ), Et = "DialogTitle", zn = B.forwardRef(
2460
+ ), Et = "DialogTitle", An = B.forwardRef(
2461
2461
  (t, e) => {
2462
2462
  const { __scopeDialog: n, ...o } = t, r = ce(Et, n);
2463
- return /* @__PURE__ */ i(Ue.h2, { id: r.titleId, ...o, ref: e });
2463
+ return /* @__PURE__ */ i(Ve.h2, { id: r.titleId, ...o, ref: e });
2464
2464
  }
2465
2465
  );
2466
- zn.displayName = Et;
2466
+ An.displayName = Et;
2467
2467
  var Fn = "DialogDescription", hi = B.forwardRef(
2468
2468
  (t, e) => {
2469
2469
  const { __scopeDialog: n, ...o } = t, r = ce(Fn, n);
2470
- return /* @__PURE__ */ i(Ue.p, { id: r.descriptionId, ...o, ref: e });
2470
+ return /* @__PURE__ */ i(Ve.p, { id: r.descriptionId, ...o, ref: e });
2471
2471
  }
2472
2472
  );
2473
2473
  hi.displayName = Fn;
2474
- var kn = "DialogClose", Wn = B.forwardRef(
2474
+ var Wn = "DialogClose", kn = B.forwardRef(
2475
2475
  (t, e) => {
2476
- const { __scopeDialog: n, ...o } = t, r = ce(kn, n);
2476
+ const { __scopeDialog: n, ...o } = t, r = ce(Wn, n);
2477
2477
  return /* @__PURE__ */ i(
2478
- Ue.button,
2478
+ Ve.button,
2479
2479
  {
2480
2480
  type: "button",
2481
2481
  ...o,
@@ -2485,15 +2485,15 @@ var kn = "DialogClose", Wn = B.forwardRef(
2485
2485
  );
2486
2486
  }
2487
2487
  );
2488
- Wn.displayName = kn;
2488
+ kn.displayName = Wn;
2489
2489
  function Nt(t) {
2490
2490
  return t ? "open" : "closed";
2491
2491
  }
2492
- var Mn = "DialogTitleWarning", [Vs, Hn] = Jr(Mn, {
2492
+ var Mn = "DialogTitleWarning", [qs, Hn] = Jr(Mn, {
2493
2493
  contentName: Le,
2494
2494
  titleName: Et,
2495
2495
  docsSlug: "dialog"
2496
- }), fi = ({ titleId: t }) => {
2496
+ }), mi = ({ titleId: t }) => {
2497
2497
  const e = Hn(Mn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
2498
2498
 
2499
2499
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
@@ -2502,15 +2502,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
2502
2502
  return B.useEffect(() => {
2503
2503
  t && (document.getElementById(t) || console.error(n));
2504
2504
  }, [n, t]), null;
2505
- }, mi = "DialogDescriptionWarning", gi = ({ contentRef: t, descriptionId: e }) => {
2506
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(mi).contentName}}.`;
2505
+ }, fi = "DialogDescriptionWarning", gi = ({ contentRef: t, descriptionId: e }) => {
2506
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(fi).contentName}}.`;
2507
2507
  return B.useEffect(() => {
2508
2508
  var a;
2509
2509
  const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
2510
2510
  e && r && (document.getElementById(e) || console.warn(o));
2511
2511
  }, [o, t, e]), null;
2512
- }, vi = Ln, wi = Nn, _i = On, bi = Dn, Ci = zn, Pi = Wn;
2513
- const xe = {
2512
+ }, vi = Ln, wi = Nn, _i = On, bi = Dn, Ci = An, Pi = kn;
2513
+ const Ie = {
2514
2514
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2515
2515
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
2516
2516
  "rp-document-dialog": "_rp-document-dialog_slqo7_13",
@@ -2519,7 +2519,7 @@ const xe = {
2519
2519
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2520
2520
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2521
2521
  }, Ti = () => {
2522
- const { pdfProperties: t } = Q(), { container: e } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = co(), { localeMessages: r } = se(), a = W(() => {
2522
+ const { pdfProperties: t } = Q(), { container: e } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = co(), { localeMessages: r } = se(), a = k(() => {
2523
2523
  if (!t)
2524
2524
  return [];
2525
2525
  const {
@@ -2527,7 +2527,7 @@ const xe = {
2527
2527
  filename: c,
2528
2528
  title: d,
2529
2529
  author: p,
2530
- subject: m,
2530
+ subject: f,
2531
2531
  createdOn: _,
2532
2532
  creator: h,
2533
2533
  keywords: v,
@@ -2542,16 +2542,16 @@ const xe = {
2542
2542
  { separate: !0 },
2543
2543
  { label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
2544
2544
  { label: r == null ? void 0 : r.propertiesAuthorLabel, value: p },
2545
- { label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
2545
+ { label: r == null ? void 0 : r.propertiesSubjectLabel, value: f },
2546
2546
  { label: r == null ? void 0 : r.propertiesKeywordLabel, value: v },
2547
2547
  { label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
2548
2548
  {
2549
2549
  label: r == null ? void 0 : r.propertiesCreateOnLabel,
2550
- value: _ ? Wt(_) : ""
2550
+ value: _ ? kt(_) : ""
2551
2551
  },
2552
2552
  {
2553
2553
  label: r == null ? void 0 : r.propertiesModifiedOnLabel,
2554
- value: w ? Wt(w) : ""
2554
+ value: w ? kt(w) : ""
2555
2555
  },
2556
2556
  { separate: !0 },
2557
2557
  { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: T },
@@ -2559,17 +2559,17 @@ const xe = {
2559
2559
  { label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
2560
2560
  ];
2561
2561
  }, [t, r]);
2562
- return /* @__PURE__ */ i(vi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(wi, { container: e, children: /* @__PURE__ */ F("div", { className: xe["rp-dialog-wrapper"], children: [
2563
- /* @__PURE__ */ i(_i, { className: xe["rp-dialog-overlay"] }),
2564
- /* @__PURE__ */ F(bi, { className: xe["rp-document-dialog"], children: [
2565
- /* @__PURE__ */ i(Ci, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2566
- /* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: l.label, value: l.value }) }, c)) }),
2567
- /* @__PURE__ */ i(Pi, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ i(ao, {}) })
2562
+ return /* @__PURE__ */ i(vi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(wi, { container: e, children: /* @__PURE__ */ F("div", { className: Ie["rp-dialog-wrapper"], children: [
2563
+ /* @__PURE__ */ i(_i, { className: Ie["rp-dialog-overlay"] }),
2564
+ /* @__PURE__ */ F(bi, { className: Ie["rp-document-dialog"], children: [
2565
+ /* @__PURE__ */ i(Ci, { className: Ie["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2566
+ /* @__PURE__ */ i("div", { className: Ie["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: l.label, value: l.value }) }, c)) }),
2567
+ /* @__PURE__ */ i(Pi, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ i(ao, {}) })
2568
2568
  ] })
2569
2569
  ] }) }) });
2570
2570
  }, Si = {
2571
2571
  "rp-other-tool-content": "_rp-other-tool-content_su718_1"
2572
- }, nn = ".pdf", yi = (t) => URL.createObjectURL(t), xi = async (t) => {
2572
+ }, nn = ".pdf", yi = (t) => URL.createObjectURL(t), Ii = async (t) => {
2573
2573
  const n = await (await fetch(t)).blob();
2574
2574
  return yi(n);
2575
2575
  }, $n = () => {
@@ -2581,22 +2581,22 @@ const xe = {
2581
2581
  if (!t || !e)
2582
2582
  throw new Error("There is no PDF source to download");
2583
2583
  const a = document.createElement("a");
2584
- a.href = await xi(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
2584
+ a.href = await Ii(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
2585
2585
  }, [t, e]) };
2586
2586
  }, Gn = () => {
2587
2587
  const { downloadIcon: t } = pe();
2588
- return t || /* @__PURE__ */ i(mo, {});
2589
- }, qn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ii = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(qn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Gn, {}) }) }), Li = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(qn, { className: "rp-menu-item", localeMessages: e, children: [
2588
+ return t || /* @__PURE__ */ i(fo, {});
2589
+ }, Un = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), xi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Un, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Gn, {}) }) }), Li = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(Un, { className: "rp-menu-item", localeMessages: e, children: [
2590
2590
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Gn, {}) }),
2591
2591
  e == null ? void 0 : e.downloadFileLabel
2592
- ] }) }), Un = () => {
2592
+ ] }) }), Vn = () => {
2593
2593
  const { download: t } = $n(), { downloadTool: e = !0 } = ve(), { isSmallScreen: n } = Ce(), { localeMessages: o } = se();
2594
- return e ? n ? /* @__PURE__ */ i(Li, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(Ii, { download: t, localeMessages: o }) : null : null;
2595
- }, Vn = () => {
2594
+ return e ? n ? /* @__PURE__ */ i(Li, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(xi, { download: t, localeMessages: o }) : null : null;
2595
+ }, qn = () => {
2596
2596
  const { printIcon: t } = pe();
2597
2597
  return t || /* @__PURE__ */ i(go, {});
2598
- }, Bn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ri = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Bn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Vn, {}) }) }), Ei = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(Bn, { className: "rp-menu-item", localeMessages: e, children: [
2599
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Vn, {}) }),
2598
+ }, Bn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ri = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Bn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(qn, {}) }) }), Ei = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(Bn, { className: "rp-menu-item", localeMessages: e, children: [
2599
+ /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qn, {}) }),
2600
2600
  e == null ? void 0 : e.printLabel
2601
2601
  ] }) }), Zn = () => {
2602
2602
  const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ve(), { isSmallScreen: c } = Ce(), { localeMessages: d } = se();
@@ -2619,8 +2619,8 @@ const xe = {
2619
2619
  }, Di = () => {
2620
2620
  const { goToLastPageIcon: t } = pe();
2621
2621
  return t || /* @__PURE__ */ i(vn, {});
2622
- }, rn = { width: "100%" }, Ai = () => {
2623
- const { goToPage: t, totalPages: e, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = W(() => n === 1, [n]), l = W(() => n === e, [n, e]), c = N(() => {
2622
+ }, rn = { width: "100%" }, zi = () => {
2623
+ const { goToPage: t, totalPages: e, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = k(() => n === 1, [n]), l = k(() => n === e, [n, e]), c = N(() => {
2624
2624
  t(1);
2625
2625
  }, [t]), d = N(() => {
2626
2626
  t(e);
@@ -2636,7 +2636,7 @@ const xe = {
2636
2636
  ] }) }) }),
2637
2637
  /* @__PURE__ */ i(yt, {})
2638
2638
  ] }) : null;
2639
- }, zi = () => {
2639
+ }, Ai = () => {
2640
2640
  const { container: t } = ge(), { isSmallScreen: e } = Ce(), {
2641
2641
  openFileTool: n,
2642
2642
  downloadTool: o,
@@ -2646,12 +2646,12 @@ const xe = {
2646
2646
  selectionModeTool: c,
2647
2647
  jumpNavigationTool: d,
2648
2648
  printTool: p,
2649
- fullscreenTool: m
2649
+ fullscreenTool: f
2650
2650
  } = ve(), { localeMessages: _ } = se();
2651
- return W(() => {
2651
+ return k(() => {
2652
2652
  const v = d || l || c || a || r;
2653
2653
  let w = !1;
2654
- return e && (w = !(!n && !o && !p && !m)), v || w;
2654
+ return e && (w = !(!n && !o && !p && !f)), v || w;
2655
2655
  }, [
2656
2656
  n,
2657
2657
  o,
@@ -2663,23 +2663,23 @@ const xe = {
2663
2663
  e
2664
2664
  ]) ? /* @__PURE__ */ F(lo, { children: [
2665
2665
  /* @__PURE__ */ i(
2666
- mn,
2666
+ fn,
2667
2667
  {
2668
2668
  container: t,
2669
2669
  triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: _ == null ? void 0 : _.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": _ == null ? void 0 : _.moreOptionTooltip, children: /* @__PURE__ */ i(Kr, {}) }) }) }),
2670
2670
  children: /* @__PURE__ */ F("div", { className: Si["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2671
2671
  e && /* @__PURE__ */ F(Ke, { children: [
2672
- /* @__PURE__ */ i(fn, {}),
2673
- /* @__PURE__ */ i(Un, {}),
2672
+ /* @__PURE__ */ i(mn, {}),
2673
+ /* @__PURE__ */ i(Vn, {}),
2674
2674
  /* @__PURE__ */ i(Zn, {}),
2675
2675
  /* @__PURE__ */ i(gn, {}),
2676
2676
  /* @__PURE__ */ i(yt, {})
2677
2677
  ] }),
2678
- /* @__PURE__ */ i(Ai, {}),
2678
+ /* @__PURE__ */ i(zi, {}),
2679
2679
  /* @__PURE__ */ i(po, {}),
2680
2680
  /* @__PURE__ */ i(vo, {}),
2681
2681
  /* @__PURE__ */ i(ho, {}),
2682
- /* @__PURE__ */ i(fo, {}),
2682
+ /* @__PURE__ */ i(mo, {}),
2683
2683
  /* @__PURE__ */ i(uo, {})
2684
2684
  ] })
2685
2685
  }
@@ -2688,15 +2688,15 @@ const xe = {
2688
2688
  ] }) : null;
2689
2689
  }, Fi = () => {
2690
2690
  const { isSmallScreen: t } = Ce();
2691
- return /* @__PURE__ */ F(me, { children: [
2691
+ return /* @__PURE__ */ F(fe, { children: [
2692
2692
  /* @__PURE__ */ i(jr, {}),
2693
- !t && /* @__PURE__ */ F(me, { children: [
2694
- /* @__PURE__ */ i(fn, {}),
2695
- /* @__PURE__ */ i(Un, {}),
2693
+ !t && /* @__PURE__ */ F(fe, { children: [
2694
+ /* @__PURE__ */ i(mn, {}),
2695
+ /* @__PURE__ */ i(Vn, {}),
2696
2696
  /* @__PURE__ */ i(Zn, {}),
2697
2697
  /* @__PURE__ */ i(gn, {})
2698
2698
  ] }),
2699
- /* @__PURE__ */ i(zi, {})
2699
+ /* @__PURE__ */ i(Ai, {})
2700
2700
  ] });
2701
2701
  }, De = {
2702
2702
  "rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
@@ -2704,35 +2704,35 @@ const xe = {
2704
2704
  "rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
2705
2705
  "rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
2706
2706
  "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
2707
- }, ki = 25, mt = 1e3, Wi = [50, 75, 100, 125, 150, 200, 300, 400], Mi = () => {
2707
+ }, Wi = 25, ft = 1e3, ki = [50, 75, 100, 125, 150, 200, 300, 400], Mi = () => {
2708
2708
  const { zoomInIcon: t } = pe();
2709
2709
  return t || /* @__PURE__ */ i(wo, {});
2710
2710
  }, Hi = () => {
2711
2711
  const { zoomOutIcon: t } = pe();
2712
2712
  return t || /* @__PURE__ */ i(_o, {});
2713
2713
  }, $i = () => {
2714
- const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: c } = Q(), { isSmallScreen: d } = Ce(), { localeMessages: p } = se(), { viewMode: m } = Ee(), _ = N(() => {
2714
+ const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: c } = Q(), { isSmallScreen: d } = Ce(), { localeMessages: p } = se(), { viewMode: f } = Ee(), _ = N(() => {
2715
2715
  e((u) => {
2716
- const f = Math.floor(u / 25) * 25;
2717
- return Math.min(f + 25, mt);
2716
+ const m = Math.floor(u / 25) * 25;
2717
+ return Math.min(m + 25, ft);
2718
2718
  });
2719
2719
  }, [e]), h = N(() => {
2720
2720
  e((u) => {
2721
- const f = Math.ceil(u / 25) * 25;
2722
- return Math.min(f - 25, mt);
2721
+ const m = Math.ceil(u / 25) * 25;
2722
+ return Math.min(m - 25, ft);
2723
2723
  });
2724
- }, [e]), v = W(() => t === ki, [t]), w = W(() => t === mt, [t]), T = W(() => {
2724
+ }, [e]), v = k(() => t === Wi, [t]), w = k(() => t === ft, [t]), T = k(() => {
2725
2725
  var u;
2726
2726
  return (u = c.get(a)) == null ? void 0 : u.page.getViewport({ scale: 1, rotation: l });
2727
2727
  }, [c, a, l]), P = N(
2728
2728
  (u) => {
2729
- const f = ((T == null ? void 0 : T.width) || 0) + 2 * Mt, g = ((T == null ? void 0 : T.height) || 0) + 2 * Mt, s = (o == null ? void 0 : o.clientWidth) || 0, C = (o == null ? void 0 : o.clientHeight) || 0, b = bo(
2729
+ const m = ((T == null ? void 0 : T.width) || 0) + 2 * Mt, g = ((T == null ? void 0 : T.height) || 0) + 2 * Mt, s = (o == null ? void 0 : o.clientWidth) || 0, C = (o == null ? void 0 : o.clientHeight) || 0, b = bo(
2730
2730
  u,
2731
2731
  s,
2732
2732
  C,
2733
- f,
2733
+ m,
2734
2734
  g,
2735
- m
2735
+ f
2736
2736
  );
2737
2737
  e(b);
2738
2738
  },
@@ -2754,7 +2754,7 @@ const xe = {
2754
2754
  }
2755
2755
  ) }),
2756
2756
  !d && /* @__PURE__ */ i(
2757
- mn,
2757
+ fn,
2758
2758
  {
2759
2759
  container: n,
2760
2760
  triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomSelectTooltip, children: /* @__PURE__ */ F(
@@ -2778,7 +2778,7 @@ const xe = {
2778
2778
  /* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_WIDTH), children: p == null ? void 0 : p.zoomPageWidth })
2779
2779
  ] }),
2780
2780
  /* @__PURE__ */ i(yt, {}),
2781
- /* @__PURE__ */ i(Ke, { children: Wi.map((u) => /* @__PURE__ */ F(be, { onClick: () => S(u), children: [
2781
+ /* @__PURE__ */ i(Ke, { children: ki.map((u) => /* @__PURE__ */ F(be, { onClick: () => S(u), children: [
2782
2782
  u,
2783
2783
  " %"
2784
2784
  ] }, u)) })
@@ -2800,8 +2800,8 @@ const xe = {
2800
2800
  totalMatches: t,
2801
2801
  nextMatch: e,
2802
2802
  prevMatch: n
2803
- } = xt(), { localeMessages: o } = se();
2804
- return /* @__PURE__ */ F(me, { children: [
2803
+ } = It(), { localeMessages: o } = se();
2804
+ return /* @__PURE__ */ F(fe, { children: [
2805
2805
  /* @__PURE__ */ i(K, { content: o == null ? void 0 : o.searchPrevTooltip, className: Y["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ i(
2806
2806
  He,
2807
2807
  {
@@ -2827,52 +2827,52 @@ const xe = {
2827
2827
  setSearchOptions: c,
2828
2828
  loading: d,
2829
2829
  setSearch: p,
2830
- totalMatches: m,
2830
+ totalMatches: f,
2831
2831
  currentMatchPosition: _,
2832
2832
  nextMatch: h,
2833
2833
  prevMatch: v,
2834
2834
  search: w
2835
- } = xt(), { searchTool: T = !0 } = ve(), [P, S] = $(w), { localeMessages: u } = se(), { isSmallScreen: f } = Ce(), g = N(() => {
2835
+ } = It(), { searchTool: T = !0 } = ve(), [P, S] = $(w), { localeMessages: u } = se(), { isSmallScreen: m } = Ce(), g = N(() => {
2836
2836
  n(!0);
2837
2837
  }, []), s = N(() => {
2838
2838
  p(""), S(""), n(!1);
2839
- }, [p]), C = (I) => {
2840
- const O = I.key === "Enter", M = I.key === " ";
2839
+ }, [p]), C = (x) => {
2840
+ const O = x.key === "Enter", M = x.key === " ";
2841
2841
  (O || M) && s();
2842
2842
  }, b = N(
2843
- (I) => {
2844
- I.key === "Escape" && e && s();
2843
+ (x) => {
2844
+ x.key === "Escape" && e && s();
2845
2845
  },
2846
2846
  [e]
2847
2847
  ), y = N(
2848
- (I) => {
2849
- I.shiftKey && I.key === "Enter" ? v() : I.key === "Enter" && w !== P ? p(P) : I.key === "Enter" && h();
2848
+ (x) => {
2849
+ x.shiftKey && x.key === "Enter" ? v() : x.key === "Enter" && w !== P ? p(P) : x.key === "Enter" && h();
2850
2850
  },
2851
2851
  [P, v, h, p, w]
2852
2852
  );
2853
- k(() => (window.addEventListener("keydown", b), () => {
2853
+ W(() => (window.addEventListener("keydown", b), () => {
2854
2854
  window.removeEventListener("keydown", b);
2855
- }), [b]), k(() => {
2855
+ }), [b]), W(() => {
2856
2856
  r && r.focus();
2857
2857
  }, [r]);
2858
- const E = N((I) => {
2859
- S(I.target.value);
2860
- }, []), x = N(() => {
2858
+ const E = N((x) => {
2859
+ S(x.target.value);
2860
+ }, []), I = N(() => {
2861
2861
  S(""), p("");
2862
- }, [p]), L = W(() => `${_} / ${m}`, [_, m]), { wholeWords: D, matchCase: A } = W(() => l, [l]), z = N(
2863
- (I) => {
2864
- c((O) => ({ ...O, matchCase: I }));
2862
+ }, [p]), L = k(() => `${_} / ${f}`, [_, f]), { wholeWords: D, matchCase: z } = k(() => l, [l]), A = N(
2863
+ (x) => {
2864
+ c((O) => ({ ...O, matchCase: x }));
2865
2865
  },
2866
2866
  [c]
2867
2867
  ), R = N(
2868
- (I) => {
2869
- c((O) => ({ ...O, wholeWords: I }));
2868
+ (x) => {
2869
+ c((O) => ({ ...O, wholeWords: x }));
2870
2870
  },
2871
2871
  [c]
2872
2872
  );
2873
- return k(() => {
2873
+ return W(() => {
2874
2874
  s();
2875
- }, [o, s]), T ? /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i(
2875
+ }, [o, s]), T ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
2876
2876
  Mr,
2877
2877
  {
2878
2878
  open: e,
@@ -2891,77 +2891,77 @@ const xe = {
2891
2891
  placeholder: u == null ? void 0 : u.searchInputPlaceholder,
2892
2892
  className: Y["rp-search-input"],
2893
2893
  ref: a,
2894
- children: !!P && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(Po, {}) })
2894
+ children: !!P && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(Po, {}) })
2895
2895
  }
2896
2896
  ) }),
2897
2897
  d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: L }),
2898
- f && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s }) })
2898
+ m && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s }) })
2899
2899
  ] }),
2900
2900
  /* @__PURE__ */ F("div", { className: Y["rp-search-tool-input-checkboxes"], children: [
2901
- f && /* @__PURE__ */ i(on, {}),
2902
- /* @__PURE__ */ i($t, { name: "matchCase", value: A, onChange: z, children: u == null ? void 0 : u.searchMatchCaseLabel }),
2903
- !f && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
2901
+ m && /* @__PURE__ */ i(on, {}),
2902
+ /* @__PURE__ */ i($t, { name: "matchCase", value: z, onChange: A, children: u == null ? void 0 : u.searchMatchCaseLabel }),
2903
+ !m && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
2904
2904
  /* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: R, children: u == null ? void 0 : u.searchWholeWordsLabel }),
2905
- !f && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
2905
+ !m && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
2906
2906
  ] })
2907
2907
  ] }),
2908
- !f && /* @__PURE__ */ F("div", { className: Y["rp-search-tool-controls"], children: [
2908
+ !m && /* @__PURE__ */ F("div", { className: Y["rp-search-tool-controls"], children: [
2909
2909
  /* @__PURE__ */ i(on, {}),
2910
2910
  /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s })
2911
2911
  ] })
2912
2912
  ] })
2913
2913
  }
2914
2914
  ) }) : null;
2915
- }, qi = "_loading_vpexk_1", Ae = {
2916
- "rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
2917
- "rp-loading-modal": "_rp-loading-modal_vpexk_14",
2918
- "rp-loading-title": "_rp-loading-title_vpexk_27",
2919
- "rp-loading-progress-bar": "_rp-loading-progress-bar_vpexk_35",
2920
- "rp-loading-progress": "_rp-loading-progress_vpexk_35",
2921
- "rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
2922
- loading: qi
2923
- }, Ui = ({ percentage: t }) => {
2915
+ }, Ui = "_loading_wazy2_1", ze = {
2916
+ "rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
2917
+ "rp-loading-modal": "_rp-loading-modal_wazy2_14",
2918
+ "rp-loading-title": "_rp-loading-title_wazy2_27",
2919
+ "rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
2920
+ "rp-loading-progress": "_rp-loading-progress_wazy2_35",
2921
+ "rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
2922
+ loading: Ui
2923
+ }, Vi = ({ percentage: t }) => {
2924
2924
  const { cancel: e } = tt(), { localeMessages: n } = se();
2925
- return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(Ae["rp-loading-overlay"]), children: /* @__PURE__ */ F("div", { className: ne(Ae["rp-loading-modal"]), children: [
2926
- /* @__PURE__ */ F("div", { className: ne(Ae["rp-loading-title"]), children: [
2925
+ return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(ze["rp-loading-overlay"]), children: /* @__PURE__ */ F("div", { className: ne(ze["rp-loading-modal"]), children: [
2926
+ /* @__PURE__ */ F("div", { className: ne(ze["rp-loading-title"]), children: [
2927
2927
  n == null ? void 0 : n.printLoadingMessage,
2928
2928
  "..."
2929
2929
  ] }),
2930
- /* @__PURE__ */ i("div", { className: ne(Ae["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
2930
+ /* @__PURE__ */ i("div", { className: ne(ze["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
2931
2931
  "div",
2932
2932
  {
2933
- className: ne(Ae["rp-loading-progress"]),
2933
+ className: ne(ze["rp-loading-progress"]),
2934
2934
  style: { width: `${t}%` }
2935
2935
  }
2936
2936
  ) }),
2937
- /* @__PURE__ */ i("button", { className: ne(Ae["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
2937
+ /* @__PURE__ */ i("button", { className: ne(ze["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
2938
2938
  ] }) });
2939
- }, Vi = $e((t, e) => {
2939
+ }, qi = $e((t, e) => {
2940
2940
  const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2941
2941
  return /* @__PURE__ */ F("div", { children: [
2942
- /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ke["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: ke["rp-toolbar-wrapper"], style: l(), children: [
2943
- /* @__PURE__ */ F("div", { "data-rp": "topBarLeft", className: ke["rp-toolbar-start"], children: [
2942
+ /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: We["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: We["rp-toolbar-wrapper"], style: l(), children: [
2943
+ /* @__PURE__ */ F("div", { "data-rp": "topBarLeft", className: We["rp-toolbar-start"], children: [
2944
2944
  /* @__PURE__ */ i(Gi, {}),
2945
2945
  /* @__PURE__ */ i(ai, {})
2946
2946
  ] }),
2947
- /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ke["rp-toolbar-middle"], children: /* @__PURE__ */ i($i, {}) }),
2948
- /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ke["rp-toolbar-end"], children: /* @__PURE__ */ i(Fi, {}) })
2947
+ /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ i($i, {}) }),
2948
+ /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ i(Fi, {}) })
2949
2949
  ] }) }),
2950
- n && a ? /* @__PURE__ */ i(Ui, { percentage: a }) : null
2950
+ n && a ? /* @__PURE__ */ i(Vi, { percentage: a }) : null
2951
2951
  ] });
2952
2952
  }), gt = {
2953
2953
  "rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
2954
2954
  "rp-sidebar-content": "_rp-sidebar-content_1sdl6_1",
2955
2955
  "rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1sdl6_16",
2956
2956
  "rp-thumbnail-dragging": "_rp-thumbnail-dragging_1sdl6_21"
2957
- }, We = {
2957
+ }, ke = {
2958
2958
  "rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
2959
2959
  "rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
2960
2960
  "rp-thumbnail": "_rp-thumbnail_3fenb_1",
2961
2961
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
2962
2962
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
2963
2963
  }, Bi = (t) => {
2964
- const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ie(), l = W(() => o ? We["rp-thumbnail-active"] : "", [o]), c = W(() => ({
2964
+ const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ie(), l = k(() => o ? ke["rp-thumbnail-active"] : "", [o]), c = k(() => ({
2965
2965
  width: Math.round(r.width),
2966
2966
  height: Math.round(r.height)
2967
2967
  }), [r]), d = N(() => {
@@ -2972,9 +2972,9 @@ const xe = {
2972
2972
  {
2973
2973
  onClick: d,
2974
2974
  id: `page-${n}`,
2975
- className: We["rp-thumbnail-wrapper"],
2975
+ className: ke["rp-thumbnail-wrapper"],
2976
2976
  children: [
2977
- /* @__PURE__ */ i("div", { className: ne(l, We["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
2977
+ /* @__PURE__ */ i("div", { className: ne(l, ke["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
2978
2978
  "img",
2979
2979
  {
2980
2980
  src: e,
@@ -2985,7 +2985,7 @@ const xe = {
2985
2985
  ) : /* @__PURE__ */ i(
2986
2986
  "div",
2987
2987
  {
2988
- className: We["rp-thumbnail-loader"],
2988
+ className: ke["rp-thumbnail-loader"],
2989
2989
  style: {
2990
2990
  width: `${c.width}px`,
2991
2991
  height: `${c.height}px`
@@ -2993,7 +2993,7 @@ const xe = {
2993
2993
  children: /* @__PURE__ */ i(Ct, {})
2994
2994
  }
2995
2995
  ) }),
2996
- /* @__PURE__ */ i("div", { className: We["rp-thumbnail-text"], children: n })
2996
+ /* @__PURE__ */ i("div", { className: ke["rp-thumbnail-text"], children: n })
2997
2997
  ]
2998
2998
  }
2999
2999
  );
@@ -3004,15 +3004,15 @@ const xe = {
3004
3004
  const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
3005
3005
  t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Zi);
3006
3006
  }, Ki = $e((t, e) => {
3007
- const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(), p = H(null), m = H(1);
3007
+ const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(), p = H(null), f = H(1);
3008
3008
  cn(e, () => p.current);
3009
- const _ = W(() => Object.values(a), [a]), h = N(() => {
3009
+ const _ = k(() => Object.values(a), [a]), h = N(() => {
3010
3010
  const v = c + 1;
3011
3011
  v <= r && l(v);
3012
3012
  }, [l, r, c]);
3013
- return k(() => {
3014
- o > c ? d(o) : n && m.current !== o && (ji(p.current, o), m.current = o);
3015
- }, [o, c, d, n, _]), mr(p.current, h), /* @__PURE__ */ i("div", { ref: p, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? _.map((v, w) => {
3013
+ return W(() => {
3014
+ o > c ? d(o) : n && f.current !== o && (ji(p.current, o), f.current = o);
3015
+ }, [o, c, d, n, _]), fr(p.current, h), /* @__PURE__ */ i("div", { ref: p, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? _.map((v, w) => {
3016
3016
  var T, P;
3017
3017
  return /* @__PURE__ */ i(
3018
3018
  Bi,
@@ -3028,11 +3028,11 @@ const xe = {
3028
3028
  }) : null }) });
3029
3029
  }), Xi = () => {
3030
3030
  const { thumbnailIcon: t } = pe();
3031
- return t || /* @__PURE__ */ i(fr, {});
3031
+ return t || /* @__PURE__ */ i(mr, {});
3032
3032
  }, Yi = () => {
3033
3033
  const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ve(), { localeMessages: c } = se(), d = N(() => {
3034
- e((m) => !m);
3035
- }, []), p = W(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
3034
+ e((f) => !f);
3035
+ }, []), p = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
3036
3036
  re,
3037
3037
  {
3038
3038
  onClick: d,
@@ -3041,7 +3041,7 @@ const xe = {
3041
3041
  children: /* @__PURE__ */ i(Xi, {})
3042
3042
  }
3043
3043
  ) }) : null, [a, t, d, c]);
3044
- return /* @__PURE__ */ i(me, { children: l && /* @__PURE__ */ F(
3044
+ return /* @__PURE__ */ i(fe, { children: l && /* @__PURE__ */ F(
3045
3045
  "div",
3046
3046
  {
3047
3047
  style: { "--rp-thumbnail-width": `${n}px` },
@@ -3065,13 +3065,13 @@ const xe = {
3065
3065
  }
3066
3066
  ) });
3067
3067
  }, _e = {
3068
- "rp-layout": "_rp-layout_1uujy_1",
3069
- "rp-content": "_rp-content_1uujy_5",
3070
- "rp-pages": "_rp-pages_1uujy_11",
3071
- "rp-container": "_rp-container_1uujy_16",
3072
- "rp-loader": "_rp-loader_1uujy_52",
3073
- "rp-theme-variables": "_rp-theme-variables_1uujy_56",
3074
- "rp-dark-mode": "_rp-dark-mode_1uujy_162"
3068
+ "rp-layout": "_rp-layout_1585d_1",
3069
+ "rp-content": "_rp-content_1585d_5",
3070
+ "rp-pages": "_rp-pages_1585d_11",
3071
+ "rp-container": "_rp-container_1585d_16",
3072
+ "rp-loader": "_rp-loader_1585d_52",
3073
+ "rp-theme-variables": "_rp-theme-variables_1585d_56",
3074
+ "rp-dark-mode": "_rp-dark-mode_1585d_166"
3075
3075
  }, Ji = $e(
3076
3076
  (t, e) => {
3077
3077
  const { children: n, toolbarRef: o, style: r, className: a } = t, { customVariables: l, customDarkVariables: c } = Tr(), { darkMode: d } = rr();
@@ -3105,14 +3105,14 @@ const xe = {
3105
3105
  mobileWidth: c,
3106
3106
  onLoaded: d,
3107
3107
  cleanupOnLoaded: p,
3108
- onLayoutWidthChange: m
3108
+ onLayoutWidthChange: f
3109
3109
  } = t, [_, h] = $(null), { setContainer: v, setContentRef: w } = ge(), { loading: T } = Q(), { LoaderImageComponent: P } = hn();
3110
- return k(() => (d && d(), () => {
3110
+ return W(() => (d && d(), () => {
3111
3111
  p && p();
3112
- }), [d, p]), /* @__PURE__ */ i(Ji, { toolbarRef: _, ref: e, children: /* @__PURE__ */ i(Pr, { mobileWidth: c, onLayoutWidthChange: m, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: v, style: a, className: l, children: [
3112
+ }), [d, p]), /* @__PURE__ */ i(Ji, { toolbarRef: _, ref: e, children: /* @__PURE__ */ i(Pr, { mobileWidth: c, onLayoutWidthChange: f, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: v, style: a, className: l, children: [
3113
3113
  /* @__PURE__ */ F(br, { children: [
3114
3114
  /* @__PURE__ */ F("div", { className: _e["rp-layout"], children: [
3115
- /* @__PURE__ */ i(Vi, { ref: h }),
3115
+ /* @__PURE__ */ i(qi, { ref: h }),
3116
3116
  /* @__PURE__ */ F("div", { className: _e["rp-content"], children: [
3117
3117
  /* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(Yi, {}) }),
3118
3118
  /* @__PURE__ */ i("div", { ref: w, className: _e["rp-pages"], children: n })
@@ -3153,20 +3153,20 @@ const xe = {
3153
3153
  export {
3154
3154
  Do as A,
3155
3155
  on as B,
3156
- Io as C,
3156
+ xo as C,
3157
3157
  ei as D,
3158
3158
  Gi as E,
3159
- Un as F,
3160
- Vi as G,
3159
+ Vn as F,
3160
+ qi as G,
3161
3161
  Bi as H,
3162
3162
  Ki as I,
3163
3163
  Yi as J,
3164
3164
  Ji as K,
3165
- Ui as L,
3166
- Ai as M,
3167
- zi as O,
3165
+ Vi as L,
3166
+ zi as M,
3167
+ Ai as O,
3168
3168
  Ms as P,
3169
- qs as R,
3169
+ Us as R,
3170
3170
  Gs as S,
3171
3171
  $s as T,
3172
3172
  $i as Z,
@@ -3174,7 +3174,7 @@ export {
3174
3174
  Bs as b,
3175
3175
  $n as c,
3176
3176
  tt as d,
3177
- xt as e,
3177
+ It as e,
3178
3178
  wn as f,
3179
3179
  To as g,
3180
3180
  _n as h,
@@ -3183,11 +3183,11 @@ export {
3183
3183
  yo as k,
3184
3184
  Cn as l,
3185
3185
  Pn as m,
3186
- xo as n,
3186
+ Io as n,
3187
3187
  Tn as o,
3188
3188
  Eo as p,
3189
- zo as q,
3190
- It as r,
3189
+ Ao as q,
3190
+ xt as r,
3191
3191
  Yo as s,
3192
3192
  ti as t,
3193
3193
  ie as u,