@pdf-viewer/react 1.10.0-beta.1 → 1.10.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/{ToolbarLayout.module-8fc14845.js → ToolbarLayout.module-2e734dc1.js} +1066 -1055
  2. package/dist/assets/ToolbarLayout.css +1 -1
  3. package/dist/components/RPController.js +1 -1
  4. package/dist/components/RPPages.js +1 -1
  5. package/dist/components/layout/LayoutContainer.js +1 -1
  6. package/dist/components/layout/RPDefaultLayout.js +1 -1
  7. package/dist/components/layout/RPLayout.js +1 -1
  8. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  9. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  10. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  11. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  12. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  13. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  14. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  15. package/dist/components/layout/toolbar/Paginate.js +1 -1
  16. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  17. package/dist/components/layout/toolbar/RPMoreOptions.js +1 -1
  18. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  19. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  20. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  21. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  22. package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
  23. package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
  24. package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
  25. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +1 -1
  26. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
  27. package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
  28. package/dist/components/layout/toolbar/tools/NextPageTool.js +1 -1
  29. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  30. package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
  31. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
  32. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
  33. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +1 -1
  34. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +1 -1
  35. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +1 -1
  36. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +1 -1
  37. package/dist/components/page/AnnotationLayer.js +1 -1
  38. package/dist/components/page/CanvasLayer.js +1 -1
  39. package/dist/components/page/DualPage.js +1 -1
  40. package/dist/components/page/RPPage.js +1 -1
  41. package/dist/components/page/SinglePage.js +1 -1
  42. package/dist/components/page/TextHighlightLayer.js +1 -1
  43. package/dist/components/page/TextLayer.js +1 -1
  44. package/dist/components/ui/LoadingIndicator.js +1 -1
  45. package/dist/contexts/PaginationContext.js +1 -1
  46. package/dist/contexts/PrintContext.js +1 -1
  47. package/dist/contexts/RenderQueueProvider.js +1 -1
  48. package/dist/contexts/SearchContext.js +1 -1
  49. package/dist/contexts/ThumbnailsContext.js +1 -1
  50. package/dist/main.js +1 -1
  51. package/dist/types/utils/getWordPositionInPage.d.ts +2 -5
  52. package/dist/utils/getWordPositionInPage.js +20 -21
  53. package/dist/utils/hooks/useFileDownload.js +1 -1
  54. package/dist/utils/hooks/useLicense.js +1 -1
  55. package/dist/utils/hooks/usePaginate.js +1 -1
  56. package/dist/utils/hooks/usePresentPage.js +1 -1
  57. package/dist/utils/hooks/usePrint.js +1 -1
  58. package/dist/utils/hooks/useScrollToPage.js +1 -1
  59. package/dist/utils/hooks/useSearch.js +1 -1
  60. package/dist/utils/hooks/useThumbnail.js +1 -1
  61. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  62. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
- import { jsx as a, Fragment as pe, jsxs as H } from "react/jsx-runtime";
1
+ import { jsx as s, Fragment as he, jsxs as H } from "react/jsx-runtime";
2
2
  import * as X from "react";
3
- import { useRef as W, useEffect as D, useCallback as E, useState as q, useMemo as M, createContext as $e, useContext as qe, useImperativeHandle as on, createElement as Ve, PureComponent as oo, Component as ro, memo as rn, forwardRef as io } from "react";
3
+ import { useRef as k, useEffect as A, useCallback as O, useState as $, useMemo as F, createContext as $e, useContext as qe, useImperativeHandle as on, createElement as Ve, PureComponent as oo, Component as ro, memo as rn, forwardRef as io } from "react";
4
4
  import { ChevronUpIcon as Ze } from "./components/icons/ChevronUpIcon.js";
5
- import { UIButton as ge } from "./components/ui/Button.js";
6
- import { UIInput as an } from "./components/ui/Input.js";
7
- import { ViewMode as Re, ScrollMode as ne, AnnotationSubType as Dt, SelectionMode as ao, ErrorType as so } from "./utils/types.js";
5
+ import { UIButton as we } from "./components/ui/Button.js";
6
+ import { UIInput as sn } from "./components/ui/Input.js";
7
+ import { ViewMode as Re, ScrollMode as ne, AnnotationSubType as Dt, SelectionMode as so, ErrorType as ao } from "./utils/types.js";
8
8
  import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
9
9
  import { useDocumentContext as oe } from "./contexts/RPDocumentContext.js";
10
10
  import { useDocumentPasswordContext as co } from "./contexts/DocumentPasswordContext.js";
@@ -12,18 +12,18 @@ import { useDarkModeContext as lo } from "./contexts/DarkModeContext.js";
12
12
  import "./contexts/RotationContext.js";
13
13
  import { useLayerContext as uo } from "./contexts/LayerContext.js";
14
14
  import { useZoomContext as wt } from "./contexts/ZoomContext.js";
15
- import { useViewModeContext as Fe } from "./contexts/ViewModeContext.js";
15
+ import { useViewModeContext as Me } from "./contexts/ViewModeContext.js";
16
16
  import { useVirtualScrollContext as Ye } from "./contexts/VirtualScrollContext.js";
17
- import { useVirtualGridContext as sn } from "./contexts/VirtualGridContext.js";
17
+ import { useVirtualGridContext as an } from "./contexts/VirtualGridContext.js";
18
18
  import { useSelectionModeContext as po } from "./contexts/SelectionModeContext.js";
19
19
  import { useInitialStateContext as ho } from "./contexts/InitialStateContext.js";
20
20
  import { useFullScreenContext as fo } from "./contexts/FullScreenContext.js";
21
21
  import "./contexts/FileInputContext.js";
22
22
  import "./contexts/DropFileZoneContext.js";
23
23
  import { findMatches as mo, resetDivs as go, highlightMatches as vo, isMatchEntireWord as wo } from "./utils/highlight.js";
24
- import { useLayoutContainer as _e } from "./contexts/LayoutContainerContext.js";
24
+ import { useLayoutContainer as be } from "./contexts/LayoutContainerContext.js";
25
25
  import { useDimensionPagesContext as Ge } from "./contexts/DimensionPagesContext.js";
26
- import { useLocalizationContext as he } from "./contexts/LocalizationContext.js";
26
+ import { useLocalizationContext as fe } from "./contexts/LocalizationContext.js";
27
27
  import { useHighlightContext as _o } from "./contexts/HighlightContext.js";
28
28
  import "./contexts/LicenseContext.js";
29
29
  import { useDownloadContext as bo } from "./contexts/DownloadContext.js";
@@ -35,38 +35,38 @@ import { renderPage as Co } from "./utils/renderPage.js";
35
35
  import { useGlobalCurrentPage as Po } from "./contexts/GlobalCurrentPage.js";
36
36
  import { useLoaderContext as _t } from "./contexts/LoaderContext.js";
37
37
  import { useToolComponentContext as Ne } from "./contexts/ToolComponentContext.js";
38
- import { useIconToolContext as be } from "./contexts/IconToolContext.js";
38
+ import { useIconToolContext as Te } from "./contexts/IconToolContext.js";
39
39
  import { useOtherToolContext as yo } from "./contexts/OtherToolContext.js";
40
40
  import "./components/RPConfig.js";
41
41
  import { ThumbnailIcon as xo } from "./components/icons/Thumbnail.js";
42
- import { c as se } from "./clsx-0c6e471a.js";
42
+ import { c as ce } from "./clsx-0c6e471a.js";
43
43
  import { LoaderIcon as ln } from "./components/icons/LoaderIcon.js";
44
44
  import { Container as So } from "./components/layout/Container.js";
45
45
  import { useViewportContext as Oe, ViewportProvider as Io } from "./contexts/ViewportContext.js";
46
- import { useToolbarComponentContext as Te, ToolbarComponentProvider as Ro } from "./contexts/ToolbarComponentContext.js";
46
+ import { useToolbarComponentContext as Ce, ToolbarComponentProvider as Ro } from "./contexts/ToolbarComponentContext.js";
47
47
  import { RPSplitter as Lo } from "./components/layout/sidebar/RPSplitter.js";
48
48
  import { WrapperLayout as Eo } from "./components/layout/WrapperLayout.js";
49
- import { c as we, L as No } from "./LayoutWrapper-e99afee2.js";
49
+ import { c as _e, L as No } from "./LayoutWrapper-e99afee2.js";
50
50
  import { useThemeContext as Oo } from "./contexts/ThemeContext.js";
51
51
  import { RPDropFileZone as Do } from "./components/RPDropFileZone.js";
52
52
  import { c as te, S as At } from "./SearchCloseButton-cbf182aa.js";
53
53
  import { UICheckbox as zt } from "./components/ui/Checkbox.js";
54
- import { useIconContext as Ce, IconProvider as Ao } from "./contexts/IconContext.js";
54
+ import { useIconContext as Pe, IconProvider as Ao } from "./contexts/IconContext.js";
55
55
  import Q from "./components/ui/RPTooltip.js";
56
56
  import { UIDropDown as dn } from "./components/ui/DropDown.js";
57
57
  import "./ZoomTool.module-6c5eabbb.js";
58
58
  import { MenuItem as Xe } from "./components/layout/toolbar/MenuItem.js";
59
59
  import { MenuSeparator as un } from "./components/layout/toolbar/MenuSeparator.js";
60
- import { dateFormatter as Ft } from "./utils/dateFormatter.js";
60
+ import { dateFormatter as Mt } from "./utils/dateFormatter.js";
61
61
  import { PropertyItem as zo } from "./components/layout/toolbar/PropertyItem.js";
62
62
  import "./RotateTool.module-03987eba.js";
63
63
  import { withRef as et } from "./utils/withRef.js";
64
- import { useInfiniteScroll as Fo } from "./utils/hooks/useInfiniteScroll.js";
65
- import { THUMBNAIL_MIN_WIDTH as Mo } from "./utils/constants.js";
64
+ import { useInfiniteScroll as Mo } from "./utils/hooks/useInfiniteScroll.js";
65
+ import { THUMBNAIL_MIN_WIDTH as Fo } from "./utils/constants.js";
66
66
  import * as ko from "pdfjs-dist";
67
67
  import { PixelsPerInch as Wo, AnnotationMode as Ho, RenderingCancelledException as $o, AnnotationLayer as qo } from "pdfjs-dist";
68
68
  import { SimpleLinkService as Go } from "./utils/link_service.js";
69
- import { annotationsEvents as Uo, annotationEventsHandler as Vo, handleClick as Mt, handleAnnotationWidget as Bo, handleAnnotationLink as jo, bindLayerEvents as Ko, unbindLayerEvents as kt } from "./utils/annotations.js";
69
+ import { annotationsEvents as Uo, annotationEventsHandler as Vo, handleClick as Ft, handleAnnotationWidget as Bo, handleAnnotationLink as jo, bindLayerEvents as Ko, unbindLayerEvents as kt } from "./utils/annotations.js";
70
70
  import { normalizeSingleKeyword as Zo, sortHighlightPosition as Xo, unwrap as Qo } from "./components/page/searchHighlight.js";
71
71
  import { CustomElement as Yo } from "./components/page/CustomElement.js";
72
72
  import { getGridDimension as bt, getPositionFromPage as Jo, getPageFromPosition as er } from "./utils/calculatePage.js";
@@ -77,14 +77,14 @@ import { useDebounce as Tt } from "./utils/hooks/useDebounce.js";
77
77
  import rr from "./components/ui/PasswordModal.js";
78
78
  import { getScrollDistance as ze } from "./utils/getScrollDistance.js";
79
79
  import { getWordPositionInPage as ir } from "./utils/getWordPositionInPage.js";
80
- import { getThumbnailViewport as ar } from "./utils/getThumbnailViewport.js";
80
+ import { getThumbnailViewport as sr } from "./utils/getThumbnailViewport.js";
81
81
  import { smoothScrollTo as it } from "./utils/smoothScrollTo.js";
82
- import { appConsole as sr } from "./utils/appConsole.js";
82
+ import { appConsole as ar } from "./utils/appConsole.js";
83
83
  import { FileUploadTool as pn } from "./components/layout/toolbar/FileUploadTool.js";
84
84
  import { DarkModeTool as cr } from "./components/layout/toolbar/DarkModeTool.js";
85
85
  import { ThreeDotIcon as lr } from "./components/icons/ThreeDotIcon.js";
86
86
  import { c as dr, u as Ct, P as Ue, b as He, d as Pt, i as ur, k as pr, a as hr } from "./index-48ca3f30.js";
87
- import { D as fr, d as at } from "./floating-ui.react-dom-88a86594.js";
87
+ import { D as fr, d as st } from "./floating-ui.react-dom-88a86594.js";
88
88
  import { a as mr, h as gr, u as vr, F as wr, b as _r, G as hn } from "./index-4ba3ab9a.js";
89
89
  import { CloseIcon as br } from "./components/icons/CloseIcon.js";
90
90
  import { DocumentProperties as Tr } from "./components/layout/toolbar/DocumentProperties.js";
@@ -101,13 +101,13 @@ import { SearchIcon as gn } from "./components/icons/SearchIcon.js";
101
101
  import { ClearIcon as Lr } from "./components/icons/ClearIcon.js";
102
102
  import { InfoIcon as Wt } from "./components/icons/InfoIcon.js";
103
103
  import './assets/ToolbarLayout.css';const vn = () => {
104
- const { viewMode: t } = Fe(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = Ye(), { setFocusedPage: i } = le(), c = W(), { columnCount: l } = sn(), { widths: d, heights: f } = Ge(), m = W(e), P = W(t), h = W(l), { targetScrollPage: T } = cn();
105
- D(() => {
104
+ const { viewMode: t } = Me(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = Ye(), { setFocusedPage: i } = de(), c = k(), { columnCount: l } = an(), { widths: d, heights: f } = Ge(), m = k(e), P = k(t), p = k(l), { targetScrollPage: T } = cn();
105
+ A(() => {
106
106
  n != null && n.scrollToItem && (c.current = n);
107
- }, [n]), D(() => {
107
+ }, [n]), A(() => {
108
108
  m.current = e, P.current = t;
109
109
  }, [e, t]);
110
- const C = E(
110
+ const C = O(
111
111
  (v, y) => {
112
112
  if (!o)
113
113
  return;
@@ -118,29 +118,29 @@ import './assets/ToolbarLayout.css';const vn = () => {
118
118
  top: 0
119
119
  };
120
120
  return new Promise(
121
- (s) => it(o, u, s)
121
+ (a) => it(o, u, a)
122
122
  );
123
123
  }
124
- const p = {
124
+ const h = {
125
125
  left: 0,
126
126
  top: 0
127
127
  };
128
128
  return o == null ? void 0 : o.scrollTo({
129
- ...p,
129
+ ...h,
130
130
  behavior: y
131
131
  });
132
132
  },
133
133
  [o, d, it]
134
134
  );
135
- return D(() => {
135
+ return A(() => {
136
136
  m.current = e, P.current = t;
137
- }, [e, t]), D(() => {
138
- h.current = l;
139
- }, [l]), { scrollToPage: E(
137
+ }, [e, t]), A(() => {
138
+ p.current = l;
139
+ }, [l]), { scrollToPage: O(
140
140
  (v, y = "smooth") => {
141
141
  i(v);
142
142
  const g = v - 1;
143
- let p = g, u = 0;
143
+ let h = g, u = 0;
144
144
  if (P.current === Re.DUAL_PAGE && m.current === ne.PAGE_SCROLLING) {
145
145
  C(v, y);
146
146
  return;
@@ -151,39 +151,39 @@ import './assets/ToolbarLayout.css';const vn = () => {
151
151
  }
152
152
  if (!c.current || !r)
153
153
  return;
154
- const s = r;
154
+ const a = r;
155
155
  y === "smooth" && (T.current = v);
156
- const { columnsWidth: _, rowsHeight: w } = bt(
156
+ const { columnsWidth: w, rowsHeight: _ } = bt(
157
157
  { widths: d, heights: f },
158
158
  l
159
159
  );
160
160
  if (m.current === ne.HORIZONTAL_SCROLLING) {
161
161
  u = g;
162
162
  const S = {
163
- left: ze(_, u),
163
+ left: ze(w, u),
164
164
  top: 0
165
165
  };
166
- return s.scrollTo({
166
+ return a.scrollTo({
167
167
  ...S,
168
168
  behavior: y
169
169
  });
170
170
  }
171
171
  if (P.current === Re.DUAL_PAGE) {
172
- u = g % 2, p = Math.floor(g / 2);
172
+ u = g % 2, h = Math.floor(g / 2);
173
173
  const S = {
174
- left: ze(_, u),
175
- top: ze(w, p)
174
+ left: ze(w, u),
175
+ top: ze(_, h)
176
176
  };
177
- return s.scrollTo({
177
+ return a.scrollTo({
178
178
  ...S,
179
179
  behavior: y
180
180
  });
181
181
  }
182
182
  const x = {
183
183
  left: 0,
184
- top: ze(w, p)
184
+ top: ze(_, h)
185
185
  };
186
- return s.scrollTo({
186
+ return a.scrollTo({
187
187
  ...x,
188
188
  behavior: y
189
189
  });
@@ -199,34 +199,34 @@ import './assets/ToolbarLayout.css';const vn = () => {
199
199
  ]
200
200
  ) };
201
201
  }, Er = (t = 1) => {
202
- const [e, n] = q(t), [r, o] = q(0), { scrollToPage: i } = vn(), c = W(1), { viewMode: l } = Fe(), { scrollMode: d } = Ee(), { widths: f } = Ge(), { pagesRef: m } = _e(), P = Tt(e, 100), h = E(
203
- (p) => {
204
- if (!/^[0-9]*$/g.test(p.toString()) || !p)
202
+ const [e, n] = $(t), [r, o] = $(0), { scrollToPage: i } = vn(), c = k(1), { viewMode: l } = Me(), { scrollMode: d } = Ee(), { widths: f } = Ge(), { pagesRef: m } = be(), P = Tt(e, 100), p = O(
203
+ (h) => {
204
+ if (!/^[0-9]*$/g.test(h.toString()) || !h)
205
205
  return { success: !1, currentPage: c.current };
206
- const s = +p;
207
- return s < 0 || s > r ? { success: !1, currentPage: c.current } : (n(s), c.current = s, { success: !0, currentPage: +p });
206
+ const a = +h;
207
+ return a < 0 || a > r ? { success: !1, currentPage: c.current } : (n(a), c.current = a, { success: !0, currentPage: +h });
208
208
  },
209
209
  [r]
210
- ), T = E(h, [h]), C = E(
211
- (p) => {
212
- const u = h(p);
210
+ ), T = O(p, [p]), C = O(
211
+ (h) => {
212
+ const u = p(h);
213
213
  return u.success && i(u.currentPage), u;
214
214
  },
215
- [h, i]
216
- ), b = E((p) => {
217
- const u = p % 2 === 1;
215
+ [p, i]
216
+ ), b = O((h) => {
217
+ const u = h % 2 === 1;
218
218
  if (!m || u)
219
219
  return !1;
220
- const s = u ? f[p] : f[p - 1], _ = u ? f[p + 1] : f[p];
221
- return l === Re.DUAL_PAGE && s + _ < m.clientWidth;
222
- }, [l, f, m, r]), v = E(() => {
223
- let p = e - 1;
224
- b(p) && (p = e - 2), C(p);
225
- }, [C, e, l, d, b]), y = M(() => l === Re.DUAL_PAGE && d === ne.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, l, d]), g = E(() => {
220
+ const a = u ? f[h] : f[h - 1], w = u ? f[h + 1] : f[h];
221
+ return l === Re.DUAL_PAGE && a + w < m.clientWidth;
222
+ }, [l, f, m, r]), v = O(() => {
223
+ let h = e - 1;
224
+ b(h) && (h = e - 2), C(h);
225
+ }, [C, e, l, d, b]), y = F(() => l === Re.DUAL_PAGE && d === ne.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, l, d]), g = O(() => {
226
226
  if (y)
227
227
  return;
228
- let p = e + 1;
229
- b(p) && (p = e + 2), C(p);
228
+ let h = e + 1;
229
+ b(h) && (h = e + 2), C(h);
230
230
  }, [C, e, b, l, d, y]);
231
231
  return {
232
232
  focusedPage: P,
@@ -249,16 +249,16 @@ import './assets/ToolbarLayout.css';const vn = () => {
249
249
  },
250
250
  nextPage: () => {
251
251
  }
252
- }), le = () => {
252
+ }), de = () => {
253
253
  const t = qe(wn);
254
- return typeof (t == null ? void 0 : t.focusedPage) > "u" && sr.error("Please use this hooks inside children component of RPProvider"), t;
255
- }, Ks = ({ children: t }) => {
254
+ return typeof (t == null ? void 0 : t.focusedPage) > "u" && ar.error("Please use this hooks inside children component of RPProvider"), t;
255
+ }, Ka = ({ children: t }) => {
256
256
  const { pdf: e } = oe(), { setCurrentPage: n } = Po(), { focusedPage: r, totalPages: o, setFocusedPage: i, setTotalPages: c, goToPage: l, nextPage: d, prevPage: f } = Er();
257
- return D(() => {
257
+ return A(() => {
258
258
  e != null && e.numPages && (c(e.numPages), i(1));
259
- }, [e, c, i]), D(() => {
259
+ }, [e, c, i]), A(() => {
260
260
  n(r);
261
- }, [r, n]), /* @__PURE__ */ a(
261
+ }, [r, n]), /* @__PURE__ */ s(
262
262
  wn.Provider,
263
263
  {
264
264
  value: {
@@ -275,19 +275,19 @@ import './assets/ToolbarLayout.css';const vn = () => {
275
275
  );
276
276
  };
277
277
  const Nr = () => {
278
- const { pdf: t, pages: e } = oe(), [n, r] = q({
278
+ const { pdf: t, pages: e } = oe(), [n, r] = $({
279
279
  loadedPages: 0,
280
280
  totalPages: 0,
281
281
  percentage: 0
282
- }), [o, i] = q(!1), [c, l] = q(!1), [d, f] = q(null), m = W(!1);
283
- D(() => {
282
+ }), [o, i] = $(!1), [c, l] = $(!1), [d, f] = $(null), m = k(!1);
283
+ A(() => {
284
284
  m.current;
285
285
  }, [m]);
286
- const P = E(() => {
286
+ const P = O(() => {
287
287
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
288
- const p = document.querySelector(".rp-print-zone");
289
- p && p.remove();
290
- }, []), h = E(() => {
288
+ const h = document.querySelector(".rp-print-zone");
289
+ h && h.remove();
290
+ }, []), p = O(() => {
291
291
  m.current = !1, i(!1), l(!1), f(null), r({
292
292
  loadedPages: 0,
293
293
  totalPages: 0,
@@ -296,137 +296,137 @@ const Nr = () => {
296
296
  }, []), T = () => {
297
297
  m.current = !0;
298
298
  }, C = async ({
299
- scratchCanvas: p,
299
+ scratchCanvas: h,
300
300
  pdfDocument: u,
301
- pageNumber: s,
302
- viewerPdfPage: _,
303
- printResolution: w,
301
+ pageNumber: a,
302
+ viewerPdfPage: w,
303
+ printResolution: _,
304
304
  optionalContentConfigPromise: x,
305
305
  printAnnotationStoragePromise: I
306
306
  }) => {
307
307
  if (m.current) {
308
- h();
308
+ p();
309
309
  return;
310
310
  }
311
- const S = w / Wo.PDF;
312
- p.width = Math.floor(_.width * S), p.height = Math.floor(_.height * S);
313
- const R = p.getContext("2d");
314
- R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, p.width, p.height), R.restore();
315
- const [N, A] = await Promise.all([
316
- u.getPage(s),
311
+ const S = _ / Wo.PDF;
312
+ h.width = Math.floor(w.width * S), h.height = Math.floor(w.height * S);
313
+ const R = h.getContext("2d");
314
+ R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, h.width, h.height), R.restore();
315
+ const [N, z] = await Promise.all([
316
+ u.getPage(a),
317
317
  I
318
318
  ]);
319
319
  if (m.current) {
320
- h();
320
+ p();
321
321
  return;
322
322
  }
323
- const z = {
323
+ const M = {
324
324
  canvasContext: R,
325
325
  transform: [S, 0, 0, S, 0, 0],
326
- viewport: N.getViewport({ scale: 1, rotation: _.rotation }),
326
+ viewport: N.getViewport({ scale: 1, rotation: w.rotation }),
327
327
  intent: "print",
328
328
  annotationMode: Ho.ENABLE_STORAGE,
329
329
  optionalContentConfigPromise: x,
330
- printAnnotationStorage: A
330
+ printAnnotationStorage: z
331
331
  };
332
332
  try {
333
- return N.render(z).promise;
334
- } catch (L) {
335
- throw L instanceof $o || console.error(L), L;
333
+ return N.render(M).promise;
334
+ } catch (D) {
335
+ throw D instanceof $o || console.error(D), D;
336
336
  }
337
- }, b = E(() => {
338
- const p = window.print;
337
+ }, b = O(() => {
338
+ const h = window.print;
339
339
  return new Promise((u) => {
340
- const s = (x) => {
340
+ const a = (x) => {
341
341
  setTimeout(() => {
342
- p.call(window), setTimeout(() => x(), 20);
342
+ h.call(window), setTimeout(() => x(), 20);
343
343
  }, 0);
344
344
  };
345
345
  if (document.querySelector(".rp-print-zone")) {
346
- s(u);
346
+ a(u);
347
347
  return;
348
348
  }
349
- const w = new MutationObserver(() => {
350
- document.querySelector(".rp-print-zone") && (s(u), w.disconnect());
349
+ const _ = new MutationObserver(() => {
350
+ document.querySelector(".rp-print-zone") && (a(u), _.disconnect());
351
351
  });
352
- w.observe(document.body, { childList: !0, subtree: !0 });
352
+ _.observe(document.body, { childList: !0, subtree: !0 });
353
353
  });
354
- }, []), v = async (p) => {
355
- const u = document.createElement("img"), s = document.createElement("div");
356
- return s.classList.add("rp-print-page"), await new Promise((_, w) => {
357
- p.toBlob((x) => {
354
+ }, []), v = async (h) => {
355
+ const u = document.createElement("img"), a = document.createElement("div");
356
+ return a.classList.add("rp-print-page"), await new Promise((w, _) => {
357
+ h.toBlob((x) => {
358
358
  x ? (u.src = URL.createObjectURL(x), u.onload = () => {
359
- URL.revokeObjectURL(u.src), _();
360
- }, u.onerror = w) : w(new Error("Failed to create blob"));
359
+ URL.revokeObjectURL(u.src), w();
360
+ }, u.onerror = _) : _(new Error("Failed to create blob"));
361
361
  });
362
362
  }).catch(() => {
363
- }), s.appendChild(u), s;
364
- }, y = (p, u) => {
365
- const s = document.createElement("div");
366
- s.classList.add("rp-print-zone");
367
- const _ = document.createElement("style"), w = u.get(1);
368
- if (w) {
369
- const { width: x, height: I } = w == null ? void 0 : w.page.getViewport({ scale: 1 });
370
- _.innerHTML = `@page { size: ${x}px ${I}px }`;
363
+ }), a.appendChild(u), a;
364
+ }, y = (h, u) => {
365
+ const a = document.createElement("div");
366
+ a.classList.add("rp-print-zone");
367
+ const w = document.createElement("style"), _ = u.get(1);
368
+ if (_) {
369
+ const { width: x, height: I } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
370
+ w.innerHTML = `@page { size: ${x}px ${I}px }`;
371
371
  }
372
- return s.appendChild(_), s.append(...p), s;
373
- }, g = E(async () => {
372
+ return a.appendChild(w), a.append(...h), a;
373
+ }, g = O(async () => {
374
374
  if (!t)
375
375
  return;
376
- h();
377
- const p = document.createElement("canvas"), u = [];
376
+ p();
377
+ const h = document.createElement("canvas"), u = [];
378
378
  try {
379
379
  t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
380
- const _ = t.getOptionalContentConfig({ intent: "print" }), w = Promise.resolve(
380
+ const w = t.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
381
381
  t.annotationStorage.print ?? void 0
382
382
  ), x = e.size;
383
383
  for (const [S, R] of e) {
384
384
  if (m.current) {
385
- h();
385
+ p();
386
386
  return;
387
387
  }
388
388
  const N = R.page.getViewport({ scale: 1 });
389
389
  if (await C({
390
- scratchCanvas: p,
390
+ scratchCanvas: h,
391
391
  pdfDocument: t,
392
392
  pageNumber: S,
393
393
  viewerPdfPage: N,
394
394
  printResolution: 150,
395
- optionalContentConfigPromise: _,
396
- printAnnotationStoragePromise: w
395
+ optionalContentConfigPromise: w,
396
+ printAnnotationStoragePromise: _
397
397
  }), m.current) {
398
- h();
398
+ p();
399
399
  return;
400
400
  }
401
- const A = await v(p);
402
- u.push(A);
403
- const z = parseFloat((u.length / x * 100).toFixed(2));
401
+ const z = await v(h);
402
+ u.push(z);
403
+ const M = parseFloat((u.length / x * 100).toFixed(2));
404
404
  r({
405
405
  loadedPages: S,
406
406
  totalPages: x,
407
- percentage: z
407
+ percentage: M
408
408
  });
409
409
  }
410
410
  if (m.current) {
411
- h();
411
+ p();
412
412
  return;
413
413
  }
414
414
  const I = y(u, e);
415
415
  document.body.appendChild(I), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), i(!0), await b();
416
- } catch (s) {
417
- l(!0), s instanceof Error && f(s);
416
+ } catch (a) {
417
+ l(!0), a instanceof Error && f(a);
418
418
  } finally {
419
- p.height = 0, p.width = 0;
419
+ h.height = 0, h.width = 0;
420
420
  }
421
421
  }, [t, e, m]);
422
- return D(() => {
423
- const p = () => {
424
- h(), P();
422
+ return A(() => {
423
+ const h = () => {
424
+ p(), P();
425
425
  };
426
- return window.addEventListener("afterprint", p, !0), () => {
427
- window.removeEventListener("afterprint", p, !0);
426
+ return window.addEventListener("afterprint", h, !0), () => {
427
+ window.removeEventListener("afterprint", h, !0);
428
428
  };
429
- }, [P, h]), {
429
+ }, [P, p]), {
430
430
  print: g,
431
431
  cancel: T,
432
432
  progress: n,
@@ -451,24 +451,24 @@ const Nr = () => {
451
451
  console.error("Error in setOnError callback:", e);
452
452
  }
453
453
  }
454
- }), Zs = ({ children: t }) => {
455
- const [e, n] = q(null), [r, o] = q(null), { print: i, cancel: c, progress: l, isComplete: d, isError: f, error: m } = Nr(), P = E((v) => {
454
+ }), Za = ({ children: t }) => {
455
+ const [e, n] = $(null), [r, o] = $(null), { print: i, cancel: c, progress: l, isComplete: d, isError: f, error: m } = Nr(), P = O((v) => {
456
456
  v && typeof v == "function" && o(() => v);
457
- }, []), h = (v) => {
457
+ }, []), p = (v) => {
458
458
  m && v(m);
459
- }, T = E(
459
+ }, T = O(
460
460
  (v) => {
461
461
  n(() => v);
462
462
  },
463
463
  [l, e]
464
464
  );
465
- D(() => {
465
+ A(() => {
466
466
  d && r && C();
467
- }, [d, r]), D(() => {
468
- f && h((v) => {
467
+ }, [d, r]), A(() => {
468
+ f && p((v) => {
469
469
  console.error(v);
470
470
  });
471
- }, [f]), D(() => {
471
+ }, [f]), A(() => {
472
472
  l && e && e(l);
473
473
  }, [l, e]);
474
474
  const C = () => {
@@ -478,24 +478,24 @@ const Nr = () => {
478
478
  cancel: c,
479
479
  setOnProgress: T,
480
480
  setOnComplete: P,
481
- setOnError: h,
481
+ setOnError: p,
482
482
  progress: l
483
483
  };
484
- return /* @__PURE__ */ a(_n.Provider, { value: b, children: t });
484
+ return /* @__PURE__ */ s(_n.Provider, { value: b, children: t });
485
485
  }, tt = () => {
486
486
  const t = qe(_n);
487
487
  if (!t)
488
488
  throw new Error("usePrintContext must be used within a PrintProvider");
489
489
  return t;
490
490
  }, Or = () => {
491
- const [t, e] = q({}), { pages: n } = oe(), r = M(() => Object.keys(t).length, [t]), o = E(
491
+ const [t, e] = $({}), { pages: n } = oe(), r = F(() => Object.keys(t).length, [t]), o = O(
492
492
  (c) => {
493
493
  if (!n.size)
494
494
  return;
495
495
  const l = c > n.size ? n.size : c, f = Array.from(n.values()).slice(0, l).map((m) => {
496
- const { thumbnailViewport: P, scale: h } = ar(m.page, m.defaultRotation);
496
+ const { thumbnailViewport: P, scale: p } = sr(m.page, m.defaultRotation);
497
497
  return {
498
- scale: h,
498
+ scale: p,
499
499
  page: m.page,
500
500
  loading: !0,
501
501
  viewport: P,
@@ -506,10 +506,10 @@ const Nr = () => {
506
506
  },
507
507
  [n]
508
508
  );
509
- D(() => {
509
+ A(() => {
510
510
  o(10);
511
511
  }, [o]);
512
- const i = E(
512
+ const i = O(
513
513
  (c) => {
514
514
  if (!n)
515
515
  return;
@@ -538,12 +538,12 @@ const Nr = () => {
538
538
  setActive: (t) => {
539
539
  },
540
540
  active: !1
541
- }), Tn = () => qe(bn), Xs = ({
541
+ }), Tn = () => qe(bn), Xa = ({
542
542
  children: t,
543
543
  initialThumbnailsVisible: e
544
544
  }) => {
545
- const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i } = Or(), [c, l] = q(e);
546
- return /* @__PURE__ */ a(
545
+ const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i } = Or(), [c, l] = $(e);
546
+ return /* @__PURE__ */ s(
547
547
  bn.Provider,
548
548
  {
549
549
  value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i, active: c, setActive: l },
@@ -551,100 +551,111 @@ const Nr = () => {
551
551
  }
552
552
  );
553
553
  }, Dr = (t = {}, e = "") => {
554
- const [n, r] = q(e), [o, i] = q(!1), { pdf: c, pages: l } = oe(), { widths: d, heights: f } = Ge(), m = W(!n), { currentZoom: P } = wt(), [h, T] = q([]), { setFocusedPage: C } = le(), { columnCount: b } = Fe(), { pageRotate: v } = Je(), [y, g] = q(0), { pageScrollElementRef: p, virtualScrollableElementRef: u } = Ye(), { scrollMode: s } = Ee(), { pagesRef: _ } = _e(), [w, x] = q(null), I = W({}), S = M(() => y === 0 ? null : h[y - 1], [y, h]), R = M(() => h.length, [h]);
555
- D(() => {
556
- if (!S || !l)
557
- return;
558
- const L = u || p;
559
- if (!L || !_)
560
- return;
561
- const O = l.get(S.page);
562
- if (s === ne.PAGE_SCROLLING && C(S.page), !O)
563
- return;
564
- let F = 0, $ = 0;
565
- if (s === ne.VERTICAL_SCROLLING) {
566
- const J = S.page - 1, ee = b, re = J % ee, ve = Math.floor(J / ee);
567
- F = ze(f, ve), $ = ze(d, re);
568
- }
569
- s === ne.HORIZONTAL_SCROLLING && ($ = d.slice(0, S.page - 1).reduce((J, ee) => J + ee, 0));
570
- const k = {
571
- height: f[S.page - 1],
572
- width: d[S.page - 1]
573
- }, B = {
574
- top: k.height / 2,
575
- left: k.width / 2
576
- }, Z = v[S.page], { leftInPage: U, topInPage: ie } = ir(
577
- k,
578
- B,
579
- S.rect,
580
- P,
581
- Z
582
- ), G = $ + U, K = F + ie, Y = {
583
- left: Math.max(G, 0),
584
- top: Math.max(K, 0)
585
- };
586
- L.scrollTo({
587
- ...Y,
588
- behavior: "smooth"
554
+ const [n, r] = $(e), [o, i] = $(!1), { pdf: c, pages: l } = oe(), { widths: d, heights: f } = Ge(), m = k(!n), { currentZoom: P } = wt(), [p, T] = $([]), { setFocusedPage: C } = de(), { columnCount: b } = Me(), { pageRotate: v } = Je(), [y, g] = $(0), { pageScrollElementRef: h, virtualScrollableElementRef: u } = Ye(), { scrollMode: a } = Ee(), { pagesRef: w } = be(), [_, x] = $(null), I = k({}), S = F(() => y === 0 ? null : p[y - 1], [y, p]), R = F(() => p.length, [p]), N = O(
555
+ (L) => {
556
+ if (L === 0)
557
+ return;
558
+ const E = p[L - 1];
559
+ if (!E || !l)
560
+ return;
561
+ const q = u || h;
562
+ if (!q || !w)
563
+ return;
564
+ const W = l.get(E.page);
565
+ if (a === ne.PAGE_SCROLLING && C(E.page), !W)
566
+ return;
567
+ let U = 0, j = 0;
568
+ if (a === ne.VERTICAL_SCROLLING) {
569
+ const J = E.page - 1, ue = b, ie = J % ue, me = Math.floor(J / ue);
570
+ U = ze(f, me), j = ze(d, ie);
571
+ }
572
+ a === ne.HORIZONTAL_SCROLLING && (j = d.slice(0, E.page - 1).reduce((J, ue) => J + ue, 0));
573
+ const V = {
574
+ height: f[E.page - 1],
575
+ width: d[E.page - 1]
576
+ }, ee = v[E.page], { leftInPage: G, topInPage: Z } = ir(
577
+ V,
578
+ w,
579
+ E.rect,
580
+ P,
581
+ ee
582
+ ), Y = j + G, re = U + Z, se = {
583
+ left: Math.max(Y, 0),
584
+ top: Math.max(re, 0)
585
+ };
586
+ q.scrollTo({
587
+ ...se,
588
+ behavior: "smooth"
589
+ });
590
+ },
591
+ [
592
+ l,
593
+ C,
594
+ d,
595
+ f,
596
+ a,
597
+ u,
598
+ h,
599
+ w,
600
+ p
601
+ ]
602
+ );
603
+ A(() => {
604
+ y === 1 && N(y);
605
+ }, [y]);
606
+ const z = O(() => {
607
+ g((L) => {
608
+ let E;
609
+ return R ? L + 1 > R ? E = 1 : E = L + 1 : E = 0, E !== 1 && N(E), E;
589
610
  });
590
- }, [
591
- l,
592
- C,
593
- d,
594
- f,
595
- S,
596
- s,
597
- u,
598
- p,
599
- _
600
- ]);
601
- const N = E(() => {
602
- g((L) => R ? L + 1 > R ? 1 : L + 1 : 0);
603
- }, [R]), A = E(() => {
604
- g((L) => R ? L - 1 <= 0 ? R : L - 1 : 0);
605
- }, [R]), z = E(async (L) => {
611
+ }, [R, N]), M = O(() => {
612
+ g((L) => {
613
+ let E;
614
+ return R ? L - 1 <= 0 ? E = R : E = L - 1 : E = 0, E !== 1 && N(E), E;
615
+ });
616
+ }, [R, N]), D = O(async (L) => {
606
617
  if (!L)
607
618
  return {};
608
- const O = L.numPages, F = {};
609
- for (let $ = 1; $ <= O; $++) {
619
+ const E = L.numPages, q = {};
620
+ for (let W = 1; W <= E; W++) {
610
621
  if (m.current)
611
622
  throw "close pop over";
612
- const k = await L.getPage($);
613
- F[$.toString()] = await k.getTextContent();
623
+ const U = await L.getPage(W);
624
+ q[W.toString()] = await U.getTextContent();
614
625
  }
615
- return F;
626
+ return q;
616
627
  }, []);
617
- return D(() => {
628
+ return A(() => {
618
629
  if (!n) {
619
630
  m.current = !0, T([]), g(0);
620
631
  return;
621
632
  }
622
- m.current = !1, i(!0), T([]), g(0), z(c).then((L) => {
633
+ m.current = !1, i(!0), T([]), g(0), D(c).then((L) => {
623
634
  I.current = L;
624
- const F = Object.keys(L).reduce(($, k) => {
625
- const B = mo(
635
+ const q = Object.keys(L).reduce((W, U) => {
636
+ const j = mo(
626
637
  [n],
627
- L[k],
628
- Number(k) - 1,
638
+ L[U],
639
+ Number(U) - 1,
629
640
  t
630
- ).map((Z, U) => ({ ...Z, page: Number(k), pageMatchIdx: U }));
631
- return [...$, ...B];
641
+ ).map((V, ee) => ({ ...V, page: Number(U), pageMatchIdx: ee }));
642
+ return [...W, ...j];
632
643
  }, []);
633
- T(F), g(F.length ? 1 : 0);
644
+ T(q), g(q.length ? 1 : 0);
634
645
  }).catch(() => {
635
646
  T([]), g(0);
636
647
  }).finally(() => i(!1));
637
- }, [n, z, c, t]), {
648
+ }, [n, D, c, t]), {
638
649
  search: n,
639
650
  setSearch: r,
640
651
  loading: o,
641
- matches: h,
652
+ matches: p,
642
653
  totalMatches: R,
643
654
  currentMatchPosition: y,
644
655
  currentMatch: S,
645
- nextMatch: N,
646
- prevMatch: A,
647
- currentMatchElement: w,
656
+ nextMatch: z,
657
+ prevMatch: M,
658
+ currentMatchElement: _,
648
659
  setCurrentMatchElement: x
649
660
  };
650
661
  }, Cn = $e({
@@ -665,11 +676,11 @@ const Nr = () => {
665
676
  currentMatchElement: null,
666
677
  setCurrentMatchElement: (t) => {
667
678
  }
668
- }), Qs = ({
679
+ }), Qa = ({
669
680
  children: t,
670
681
  initialSearch: e
671
682
  }) => {
672
- const [n, r] = q({}), {
683
+ const [n, r] = $({}), {
673
684
  loading: o,
674
685
  setSearch: i,
675
686
  totalMatches: c,
@@ -678,11 +689,11 @@ const Nr = () => {
678
689
  search: f,
679
690
  matches: m,
680
691
  nextMatch: P,
681
- prevMatch: h,
692
+ prevMatch: p,
682
693
  currentMatchElement: T,
683
694
  setCurrentMatchElement: C
684
695
  } = Dr(n, e);
685
- return /* @__PURE__ */ a(
696
+ return /* @__PURE__ */ s(
686
697
  Cn.Provider,
687
698
  {
688
699
  value: {
@@ -694,7 +705,7 @@ const Nr = () => {
694
705
  currentMatchPosition: l,
695
706
  currentMatch: d,
696
707
  nextMatch: P,
697
- prevMatch: h,
708
+ prevMatch: p,
698
709
  search: f,
699
710
  matches: m,
700
711
  currentMatchElement: T,
@@ -703,10 +714,10 @@ const Nr = () => {
703
714
  children: t
704
715
  }
705
716
  );
706
- }, yt = () => qe(Cn), Pn = $e(null), Ys = ({ children: t }) => {
707
- const e = W(!1), [n, r] = q([]), o = E((d) => {
717
+ }, yt = () => qe(Cn), Pn = $e(null), Ya = ({ children: t }) => {
718
+ const e = k(!1), [n, r] = $([]), o = O((d) => {
708
719
  r((f) => [...f, { id: d.page.pageNumber.toString(), data: d, priority: 0 }]);
709
- }, []), i = M(() => new To(o), [o]), { focusedPage: c } = le(), l = E((d) => (e.current = !0, Co(
720
+ }, []), i = F(() => new To(o), [o]), { focusedPage: c } = de(), l = O((d) => (e.current = !0, Co(
710
721
  d.data.page,
711
722
  d.data.canvasElem,
712
723
  d.data.options
@@ -715,9 +726,9 @@ const Nr = () => {
715
726
  }).finally(() => {
716
727
  d.data.onLoaded && d.data.onLoaded();
717
728
  })), []);
718
- return D(() => {
729
+ return A(() => {
719
730
  c && (i.changePagePriority(`^page-${c}`, 0), i.changePagePriority(`^thumbnail-${c}`, 1));
720
- }, [c]), D(() => {
731
+ }, [c]), A(() => {
721
732
  if (i.isEmpty() || e.current)
722
733
  return;
723
734
  const d = () => {
@@ -727,7 +738,7 @@ const Nr = () => {
727
738
  }) : (e.current = !1, r(i.peekAll()));
728
739
  };
729
740
  d();
730
- }, [i, l, n]), /* @__PURE__ */ a(Pn.Provider, { value: i, children: t });
741
+ }, [i, l, n]), /* @__PURE__ */ s(Pn.Provider, { value: i, children: t });
731
742
  }, yn = () => {
732
743
  const t = qe(Pn);
733
744
  if (!t)
@@ -744,25 +755,25 @@ const Nr = () => {
744
755
  "rp-loader": "_rp-loader_1fvmx_78",
745
756
  "rp-not-supported": "_rp-not-supported_1fvmx_86",
746
757
  "rp-not-supported-content": "_rp-not-supported-content_1fvmx_102"
747
- }, st = {
758
+ }, at = {
748
759
  "rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
749
760
  "rp-page": "_rp-page_14ohm_1",
750
761
  "rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
751
762
  }, Ar = (t) => {
752
- const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = W(null), { pages: i } = oe(), { pageRotate: c } = Je(), l = W(), { currentZoom: d } = wt(), f = yn(), m = W(`page-${e}`);
753
- return D(() => {
763
+ const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = k(null), { pages: i } = oe(), { pageRotate: c } = Je(), l = k(), { currentZoom: d } = wt(), f = yn(), m = k(`page-${e}`);
764
+ return A(() => {
754
765
  if (!i || d === 0)
755
766
  return;
756
767
  const P = i.get(e);
757
768
  if (o.current && P) {
758
- const h = o.current;
759
- h.hidden = !0;
769
+ const p = o.current;
770
+ p.hidden = !0;
760
771
  const T = l.current;
761
772
  T && T.cancel(), r && r(), f.enqueue(
762
773
  m.current,
763
774
  {
764
775
  page: P.page,
765
- canvasElem: h,
776
+ canvasElem: p,
766
777
  options: {
767
778
  scale: d,
768
779
  rotate: c[e],
@@ -776,34 +787,34 @@ const Nr = () => {
776
787
  return () => {
777
788
  f.removeQueue(m.current);
778
789
  };
779
- }, [i, e, c, d, r, n, f]), /* @__PURE__ */ a("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
780
- }, zr = "_selecting_1uik2_10", Fr = "_markedContent_1uik2_33", fe = {
781
- "rp-text-layer": "_rp-text-layer_1uik2_1",
790
+ }, [i, e, c, d, r, n, f]), /* @__PURE__ */ s("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
791
+ }, zr = "_selecting_ppr5g_10", Mr = "_markedContent_ppr5g_33", ge = {
792
+ "rp-text-layer": "_rp-text-layer_ppr5g_1",
782
793
  selecting: zr,
783
- markedContent: Fr,
784
- "rp-text-layer-text": "_rp-text-layer-text_1uik2_52"
785
- }, Mr = (t) => {
786
- const { pageNumber: e } = t, { pages: n } = oe(), r = W(null), { matches: o, currentMatch: i, setCurrentMatchElement: c } = yt(), [l, d] = q(
794
+ markedContent: Mr,
795
+ "rp-text-layer-text": "_rp-text-layer-text_ppr5g_52"
796
+ }, Fr = (t) => {
797
+ const { pageNumber: e } = t, { pages: n } = oe(), r = k(null), { matches: o, currentMatch: i, setCurrentMatchElement: c } = yt(), [l, d] = $(
787
798
  []
788
- ), f = W(), m = W(), P = W([]), h = M(() => o.filter((p) => p.pageIndex === e - 1), [o, e]), T = E(
789
- (p, u, s = !1) => {
790
- if (s && go(p, u), !h.length) {
799
+ ), f = k(), m = k(), P = k([]), p = F(() => o.filter((h) => h.pageIndex === e - 1), [o, e]), T = O(
800
+ (h, u, a = !1) => {
801
+ if (a && go(h, u), !p.length) {
791
802
  P.current = [], d([]);
792
803
  return;
793
804
  }
794
- const _ = vo(h, p, u);
795
- d(_);
805
+ const w = vo(p, h, u);
806
+ d(w);
796
807
  },
797
- [h]
798
- ), C = W(), b = W(!1), v = E(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
799
- D(() => ((() => {
808
+ [p]
809
+ ), C = k(), b = k(!1), v = O(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
810
+ A(() => ((() => {
800
811
  if (C.current)
801
812
  return;
802
813
  C.current = new AbortController();
803
- const { signal: u } = C.current, s = () => {
804
- v().forEach((w) => {
805
- const x = w.querySelector(".endOfContent");
806
- x && (w.appendChild(x), x.style.width = "", x.style.height = "", w.classList.remove(fe.selecting));
814
+ const { signal: u } = C.current, a = () => {
815
+ v().forEach((_) => {
816
+ const x = _.querySelector(".endOfContent");
817
+ x && (_.appendChild(x), x.style.width = "", x.style.height = "", _.classList.remove(ge.selecting));
807
818
  });
808
819
  };
809
820
  document.addEventListener(
@@ -815,56 +826,56 @@ const Nr = () => {
815
826
  ), document.addEventListener(
816
827
  "pointerup",
817
828
  () => {
818
- b.current = !1, s();
829
+ b.current = !1, a();
819
830
  },
820
831
  { signal: u }
821
832
  ), window.addEventListener(
822
833
  "blur",
823
834
  () => {
824
- b.current = !1, s();
835
+ b.current = !1, a();
825
836
  },
826
837
  { signal: u }
827
838
  ), document.addEventListener(
828
839
  "keyup",
829
840
  () => {
830
- b.current || s();
841
+ b.current || a();
831
842
  },
832
843
  { signal: u }
833
844
  );
834
- let _ = null;
845
+ let w = null;
835
846
  document.addEventListener(
836
847
  "selectionchange",
837
848
  () => {
838
- var z, L;
839
- const w = document.getSelection();
840
- if (!w)
849
+ var M, D;
850
+ const _ = document.getSelection();
851
+ if (!_)
841
852
  return;
842
- if (w.rangeCount === 0) {
843
- s();
853
+ if (_.rangeCount === 0) {
854
+ a();
844
855
  return;
845
856
  }
846
857
  const x = /* @__PURE__ */ new Set();
847
- for (let O = 0; O < w.rangeCount; O++) {
848
- const F = w.getRangeAt(O);
849
- v().forEach(($) => {
850
- F.intersectsNode($) && !x.has($) && x.add($);
858
+ for (let L = 0; L < _.rangeCount; L++) {
859
+ const E = _.getRangeAt(L);
860
+ v().forEach((q) => {
861
+ E.intersectsNode(q) && !x.has(q) && x.add(q);
851
862
  });
852
863
  }
853
- v().forEach((O) => {
854
- if (x.has(O))
855
- O.classList.add(fe.selecting);
864
+ v().forEach((L) => {
865
+ if (x.has(L))
866
+ L.classList.add(ge.selecting);
856
867
  else {
857
- const F = O.querySelector(".endOfContent");
858
- F && (O.appendChild(F), F.style.width = "", F.style.height = "", O.classList.remove(fe.selecting));
868
+ const E = L.querySelector(".endOfContent");
869
+ E && (L.appendChild(E), E.style.width = "", E.style.height = "", L.classList.remove(ge.selecting));
859
870
  }
860
871
  });
861
- const I = w.getRangeAt(0);
862
- let R = _ && (I.compareBoundaryPoints(Range.END_TO_END, _) === 0 || I.compareBoundaryPoints(Range.START_TO_END, _) === 0) ? I.startContainer : I.endContainer;
872
+ const I = _.getRangeAt(0);
873
+ let R = w && (I.compareBoundaryPoints(Range.END_TO_END, w) === 0 || I.compareBoundaryPoints(Range.START_TO_END, w) === 0) ? I.startContainer : I.endContainer;
863
874
  R.nodeType === Node.TEXT_NODE && (R = R.parentNode);
864
- const N = (z = R.parentElement) == null ? void 0 : z.closest(
865
- fe["rp-text-layer"]
866
- ), A = N == null ? void 0 : N.querySelector(".endOfContent");
867
- A && N && (A.style.width = N.style.width, A.style.height = N.style.height, (L = R.parentElement) == null || L.insertBefore(A, R.nextSibling)), _ = I.cloneRange();
875
+ const N = (M = R.parentElement) == null ? void 0 : M.closest(
876
+ ge["rp-text-layer"]
877
+ ), z = N == null ? void 0 : N.querySelector(".endOfContent");
878
+ z && N && (z.style.width = N.style.width, z.style.height = N.style.height, (D = R.parentElement) == null || D.insertBefore(z, R.nextSibling)), w = I.cloneRange();
868
879
  },
869
880
  { signal: u }
870
881
  );
@@ -872,64 +883,64 @@ const Nr = () => {
872
883
  var u;
873
884
  (u = C.current) == null || u.abort(), C.current = void 0;
874
885
  }), [v]);
875
- const y = E(() => {
876
- r.current && r.current.classList.add(fe.selecting);
877
- }, []), g = E(() => {
878
- r.current && r.current.classList.remove(fe.selecting);
886
+ const y = O(() => {
887
+ r.current && r.current.classList.add(ge.selecting);
888
+ }, []), g = O(() => {
889
+ r.current && r.current.classList.remove(ge.selecting);
879
890
  }, []);
880
- return D(() => {
881
- if (P.current.forEach((s) => {
882
- s.classList.remove("selected");
891
+ return A(() => {
892
+ if (P.current.forEach((a) => {
893
+ a.classList.remove("selected");
883
894
  }), !l.length || !i || i.pageIndex !== e - 1)
884
895
  return;
885
- const p = h.findIndex(
886
- (s) => JSON.stringify(s) === JSON.stringify(i)
896
+ const h = p.findIndex(
897
+ (a) => JSON.stringify(a) === JSON.stringify(i)
887
898
  );
888
- if (p === -1)
899
+ if (h === -1)
889
900
  return;
890
- const u = l.filter((s) => s.index === p);
891
- u.length && (P.current = u.map((s) => s.element), c(u[0].element), u.forEach((s) => {
892
- s.element.classList.add("selected");
901
+ const u = l.filter((a) => a.index === h);
902
+ u.length && (P.current = u.map((a) => a.element), c(u[0].element), u.forEach((a) => {
903
+ a.element.classList.add("selected");
893
904
  }));
894
- }, [i, l, h]), D(() => {
895
- const p = n.get(e);
896
- if (!p || !r.current)
905
+ }, [i, l, p]), A(() => {
906
+ const h = n.get(e);
907
+ if (!h || !r.current)
897
908
  return;
898
909
  const u = r.current;
899
- return f.current && f.current.cancel(), p.page.getTextContent().then((s) => {
900
- const _ = p.page.getViewport({ scale: 1 });
910
+ return f.current && f.current.cancel(), h.page.getTextContent().then((a) => {
911
+ const w = h.page.getViewport({ scale: 1 });
901
912
  return f.current = new ko.TextLayer({
902
- viewport: _,
903
- textContentSource: s,
913
+ viewport: w,
914
+ textContentSource: a,
904
915
  container: u
905
- }), m.current = s, u && (u.innerText = ""), f.current.render();
916
+ }), m.current = a, u && (u.innerText = ""), f.current.render();
906
917
  }).then(() => {
907
918
  var x, I;
908
919
  [].slice.call(u.children).forEach((S) => {
909
- S.classList.add(fe["rp-text-layer-text"]), S.setAttribute("data-rp", "rp-text-layer-text");
920
+ S.classList.add(ge["rp-text-layer-text"]), S.setAttribute("data-rp", "rp-text-layer-text");
910
921
  });
911
- const _ = (x = f.current) == null ? void 0 : x.textDivs;
912
- _ && m.current && T(m.current, _);
913
- const w = document.createElement("div");
914
- w.className = "endOfContent", (I = r.current) == null || I.appendChild(w);
922
+ const w = (x = f.current) == null ? void 0 : x.textDivs;
923
+ w && m.current && T(m.current, w);
924
+ const _ = document.createElement("div");
925
+ _.className = "endOfContent", (I = r.current) == null || I.appendChild(_);
915
926
  }).catch(() => {
916
927
  }), () => {
917
- var s;
918
- (s = f.current) == null || s.cancel();
928
+ var a;
929
+ (a = f.current) == null || a.cancel();
919
930
  };
920
- }, [n, e]), D(() => {
921
- var s;
922
- [].slice.call(r.current.children).forEach((_) => {
923
- _.classList.add(fe["rp-text-layer-text"]);
931
+ }, [n, e]), A(() => {
932
+ var a;
933
+ [].slice.call(r.current.children).forEach((w) => {
934
+ w.classList.add(ge["rp-text-layer-text"]);
924
935
  });
925
- const u = (s = f.current) == null ? void 0 : s.textDivs;
936
+ const u = (a = f.current) == null ? void 0 : a.textDivs;
926
937
  u && m.current && T(m.current, u, !0);
927
- }, [T]), /* @__PURE__ */ a(
938
+ }, [T]), /* @__PURE__ */ s(
928
939
  "div",
929
940
  {
930
941
  "data-rp-text-layer": !0,
931
942
  "data-rp": `page-${e}-textLayer`,
932
- className: fe["rp-text-layer"],
943
+ className: ge["rp-text-layer"],
933
944
  ref: r,
934
945
  onMouseDown: y,
935
946
  onMouseUp: g
@@ -940,24 +951,24 @@ const Nr = () => {
940
951
  };
941
952
  let Wr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
942
953
  const Hr = (t) => {
943
- const { pageNumber: e } = t, n = W(null), { pages: r, pdf: o } = oe(), i = W(), [c, l] = q(), { setFocusedPage: d, goToPage: f } = le(), { scrollMode: m } = Ee(), { print: P } = tt(), { download: h } = Gn(), T = M(() => r.get(e), [r, e]), C = M(() => T == null ? void 0 : T.page.getViewport(), [T]);
944
- D(() => {
954
+ const { pageNumber: e } = t, n = k(null), { pages: r, pdf: o } = oe(), i = k(), [c, l] = $(), { setFocusedPage: d, goToPage: f } = de(), { scrollMode: m } = Ee(), { print: P } = tt(), { download: p } = Gn(), T = F(() => r.get(e), [r, e]), C = F(() => T == null ? void 0 : T.page.getViewport(), [T]);
955
+ A(() => {
945
956
  i.current && (i.current.div.replaceChildren(), i.current = void 0);
946
- }, [o]), D(() => {
957
+ }, [o]), A(() => {
947
958
  T && T.page.getAnnotations().then((v) => {
948
959
  i.current = void 0, l(v), n.current && (n.current.innerText = "");
949
960
  });
950
961
  }, [T]);
951
- const b = E(
962
+ const b = O(
952
963
  (v) => {
953
964
  !c || !o || (Uo(v), Vo(v, o, c).then((y) => {
954
- var g, p;
955
- ((g = y == null ? void 0 : y.data) == null ? void 0 : g.action) === "Print" ? P() : ((p = y == null ? void 0 : y.data) == null ? void 0 : p.action) === "SaveAs" && h();
956
- }), m === ne.PAGE_SCROLLING ? Mt(v, c, o, (y) => d(y.pageIndex + 1)) : Mt(v, c, o, (y) => f(y.pageIndex + 1)));
965
+ var g, h;
966
+ ((g = y == null ? void 0 : y.data) == null ? void 0 : g.action) === "Print" ? P() : ((h = y == null ? void 0 : y.data) == null ? void 0 : h.action) === "SaveAs" && p();
967
+ }), m === ne.PAGE_SCROLLING ? Ft(v, c, o, (y) => d(y.pageIndex + 1)) : Ft(v, c, o, (y) => f(y.pageIndex + 1)));
957
968
  },
958
- [o, c, f, d, m, P, h]
969
+ [o, c, f, d, m, P, p]
959
970
  );
960
- return D(() => {
971
+ return A(() => {
961
972
  if (!T || !c)
962
973
  return;
963
974
  const v = T.page.getViewport();
@@ -969,8 +980,8 @@ const Hr = (t) => {
969
980
  }
970
981
  const y = /* @__PURE__ */ new Map([]);
971
982
  for (const u of c) {
972
- const { annotationType: s } = u;
973
- switch (s) {
983
+ const { annotationType: a } = u;
984
+ switch (a) {
974
985
  case Dt.Link:
975
986
  jo(u);
976
987
  break;
@@ -981,7 +992,7 @@ const Hr = (t) => {
981
992
  }
982
993
  const g = new AbortController();
983
994
  return (async () => {
984
- var _;
995
+ var w;
985
996
  i.current && (i.current.div.replaceChildren(), i.current = void 0), n.current && (n.current.innerText = ""), i.current = new qo({
986
997
  div: n.current,
987
998
  accessibilityManager: void 0,
@@ -991,14 +1002,14 @@ const Hr = (t) => {
991
1002
  page: T.page,
992
1003
  viewport: v.clone({ dontFlip: !0 })
993
1004
  }), n.current && kt(n.current, b);
994
- const u = await (o == null ? void 0 : o.hasJSActions()), s = await (o == null ? void 0 : o.getFieldObjects());
1005
+ const u = await (o == null ? void 0 : o.hasJSActions()), a = await (o == null ? void 0 : o.getFieldObjects());
995
1006
  if (g.signal.aborted)
996
1007
  throw "abort";
997
- return (_ = i.current) == null ? void 0 : _.render({
1008
+ return (w = i.current) == null ? void 0 : w.render({
998
1009
  annotations: c,
999
1010
  annotationStorage: o == null ? void 0 : o.annotationStorage,
1000
1011
  hasJSActions: u,
1001
- fieldObjects: s,
1012
+ fieldObjects: a,
1002
1013
  div: n.current,
1003
1014
  viewport: v.clone({ dontFlip: !0 }),
1004
1015
  page: T.page,
@@ -1016,7 +1027,7 @@ const Hr = (t) => {
1016
1027
  }), () => {
1017
1028
  g.abort("clear"), n.current && kt(n.current, b);
1018
1029
  };
1019
- }, [o, c, b]), /* @__PURE__ */ a(
1030
+ }, [o, c, b]), /* @__PURE__ */ s(
1020
1031
  "div",
1021
1032
  {
1022
1033
  "data-rp": `page-${e}-annotationLayer`,
@@ -1028,87 +1039,87 @@ const Hr = (t) => {
1028
1039
  }, $r = {
1029
1040
  "rp-text-highlight": "_rp-text-highlight_jdkf8_1"
1030
1041
  }, qr = ({ pageNumber: t, viewport: e }) => {
1031
- const [n, r] = q(), { pages: o } = oe(), { highlightKeywords: i } = _o(), c = !0, l = W(null), [d, f] = q(null), [m, P] = q([]);
1032
- D(() => {
1042
+ const [n, r] = $(), { pages: o } = oe(), { highlightKeywords: i } = _o(), c = !0, l = k(null), [d, f] = $(null), [m, P] = $([]);
1043
+ A(() => {
1033
1044
  l.current && f(l.current.parentElement);
1034
- }, [l]), D(() => {
1045
+ }, [l]), A(() => {
1035
1046
  (async () => {
1036
- const p = o.get(t);
1037
- if (!p || !l.current)
1047
+ const h = o.get(t);
1048
+ if (!h || !l.current)
1038
1049
  return;
1039
- const u = await p.page.getTextContent();
1050
+ const u = await h.page.getTextContent();
1040
1051
  r(u);
1041
1052
  })();
1042
1053
  }, [o, t]);
1043
- const h = M(() => i ? i.map((g) => {
1044
- var p, u;
1054
+ const p = F(() => i ? i.map((g) => {
1055
+ var h, u;
1045
1056
  return {
1046
- ...Zo(g.keyword, (p = g.options) == null ? void 0 : p.matchCase, (u = g.options) == null ? void 0 : u.wholeWords),
1057
+ ...Zo(g.keyword, (h = g.options) == null ? void 0 : h.matchCase, (u = g.options) == null ? void 0 : u.wholeWords),
1047
1058
  color: g.highlightColor
1048
1059
  };
1049
1060
  }) : [], [i]);
1050
- function T(g, p) {
1061
+ function T(g, h) {
1051
1062
  if (!g)
1052
1063
  return;
1053
- const u = `[data-rp="page-${p}-textLayer"]`;
1054
- return new Promise((s) => {
1055
- const _ = g.querySelector(u);
1056
- if (_) {
1057
- s(_);
1064
+ const u = `[data-rp="page-${h}-textLayer"]`;
1065
+ return new Promise((a) => {
1066
+ const w = g.querySelector(u);
1067
+ if (w) {
1068
+ a(w);
1058
1069
  return;
1059
1070
  }
1060
1071
  new MutationObserver((x, I) => {
1061
1072
  const S = g.querySelector(u);
1062
- S && (s(S), I.disconnect());
1073
+ S && (a(S), I.disconnect());
1063
1074
  }).observe(g, { childList: !0, subtree: !0 });
1064
1075
  });
1065
1076
  }
1066
1077
  function C(g) {
1067
- return new Promise((p) => {
1078
+ return new Promise((h) => {
1068
1079
  const u = g.querySelectorAll(
1069
1080
  '[data-rp="rp-text-layer-text"]'
1070
1081
  );
1071
1082
  if (u.length) {
1072
- p(Array.from(u));
1083
+ h(Array.from(u));
1073
1084
  return;
1074
1085
  }
1075
- new MutationObserver((_, w) => {
1086
+ new MutationObserver((w, _) => {
1076
1087
  const x = g.querySelectorAll(
1077
1088
  ".rp-text-layer-text"
1078
1089
  );
1079
- x.length && (p(Array.from(x)), w.disconnect());
1090
+ x.length && (h(Array.from(x)), _.disconnect());
1080
1091
  }).observe(g, { childList: !0, subtree: !0 });
1081
1092
  });
1082
1093
  }
1083
- const b = (g, p, u, s) => {
1084
- var B;
1085
- const _ = document.createRange(), w = u.firstChild;
1086
- if (!w || w.nodeType !== Node.TEXT_NODE)
1094
+ const b = (g, h, u, a) => {
1095
+ var U;
1096
+ const w = document.createRange(), _ = u.firstChild;
1097
+ if (!_ || _.nodeType !== Node.TEXT_NODE)
1087
1098
  return null;
1088
- const x = ((B = w.textContent) == null ? void 0 : B.length) ?? 0, I = s[0].charIdxInSpan, S = s.length === 1 ? I : s[s.length - 1].charIdxInSpan;
1099
+ const x = ((U = _.textContent) == null ? void 0 : U.length) ?? 0, I = a[0].charIdxInSpan, S = a.length === 1 ? I : a[a.length - 1].charIdxInSpan;
1089
1100
  if (I > x || S + 1 > x)
1090
1101
  return null;
1091
- _.setStart(w, I), _.setEnd(w, S + 1);
1102
+ w.setStart(_, I), w.setEnd(_, S + 1);
1092
1103
  const R = document.createElement("span");
1093
- R.style.width = "auto", _.surroundContents(R);
1094
- const N = R.getBoundingClientRect(), A = g.getBoundingClientRect(), z = A.height, L = A.width, O = 100 * (N.left - A.left) / L, F = 100 * (N.top - A.top) / z, $ = 100 * N.height / z, k = 100 * N.width / L;
1104
+ R.style.width = "auto", w.surroundContents(R);
1105
+ const N = R.getBoundingClientRect(), z = g.getBoundingClientRect(), M = z.height, D = z.width, L = 100 * (N.left - z.left) / D, E = 100 * (N.top - z.top) / M, q = 100 * N.height / M, W = 100 * N.width / D;
1095
1106
  return Qo(R), {
1096
- keywordStr: p,
1097
- left: O,
1098
- top: F,
1099
- height: $,
1100
- width: k,
1101
- pageHeight: z,
1102
- pageWidth: L
1107
+ keywordStr: h,
1108
+ left: L,
1109
+ top: E,
1110
+ height: q,
1111
+ width: W,
1112
+ pageHeight: M,
1113
+ pageWidth: D
1103
1114
  };
1104
1115
  };
1105
- async function v(g, p) {
1116
+ async function v(g, h) {
1106
1117
  const u = await T(d, g);
1107
1118
  if (!u)
1108
1119
  return;
1109
- const s = await C(u);
1110
- if (s.length) {
1111
- const _ = s.map((x) => x.tagName === "BR" ? " " : x.textContent).reduce(
1120
+ const a = await C(u);
1121
+ if (a.length) {
1122
+ const w = a.map((x) => x.tagName === "BR" ? " " : x.textContent).reduce(
1112
1123
  (x, I, S) => x.concat(
1113
1124
  I.split("").map((R, N) => ({
1114
1125
  char: R,
@@ -1123,66 +1134,66 @@ const Hr = (t) => {
1123
1134
  spanIdx: 0
1124
1135
  }
1125
1136
  ]
1126
- ).slice(1), w = y(u, p, s, _);
1127
- P(w);
1137
+ ).slice(1), _ = y(u, h, a, w);
1138
+ P(_);
1128
1139
  }
1129
1140
  }
1130
- const y = (g, p, u, s) => {
1131
- const _ = p.length;
1132
- if (!s.length || !_)
1141
+ const y = (g, h, u, a) => {
1142
+ const w = h.length;
1143
+ if (!a.length || !w)
1133
1144
  return [];
1134
- const w = [], x = s.map((I) => I.char).join("");
1135
- return h.forEach((I) => {
1136
- const { keyword: S, regExp: R, wholeWords: N, color: A } = I, z = S;
1137
- if (!z.trim())
1145
+ const _ = [], x = a.map((I) => I.char).join("");
1146
+ return p.forEach((I) => {
1147
+ const { keyword: S, regExp: R, wholeWords: N, color: z } = I, M = S;
1148
+ if (!M.trim())
1138
1149
  return;
1139
- const L = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1140
- let O;
1141
- const F = [];
1142
- for (; (O = L.exec(x)) !== null; )
1143
- N && !wo(x, O.index, O[0].length) || F.push({
1144
- keyword: L,
1145
- startIndex: O.index,
1146
- endIndex: L.lastIndex
1150
+ const D = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1151
+ let L;
1152
+ const E = [];
1153
+ for (; (L = D.exec(x)) !== null; )
1154
+ N && !wo(x, L.index, L[0].length) || E.push({
1155
+ keyword: D,
1156
+ startIndex: L.index,
1157
+ endIndex: D.lastIndex
1147
1158
  });
1148
- const $ = F.map((k) => ({
1149
- keyword: k.keyword,
1150
- indexes: s.slice(k.startIndex, k.endIndex),
1151
- color: A
1159
+ const q = E.map((W) => ({
1160
+ keyword: W.keyword,
1161
+ indexes: a.slice(W.startIndex, W.endIndex),
1162
+ color: z
1152
1163
  }));
1153
- for (const k of $) {
1154
- const B = k.indexes.reduce(
1155
- (Z, U) => (Z[U.spanIdx] = (Z[U.spanIdx] || []).concat([U]), Z),
1164
+ for (const W of q) {
1165
+ const U = W.indexes.reduce(
1166
+ (j, V) => (j[V.spanIdx] = (j[V.spanIdx] || []).concat([V]), j),
1156
1167
  {}
1157
1168
  );
1158
- for (const Z of Object.values(B))
1159
- if (Z.length !== 1 || Z[0].char.trim() !== "") {
1160
- const U = Z, ie = u[U[0].spanIdx], G = b(
1169
+ for (const j of Object.values(U))
1170
+ if (j.length !== 1 || j[0].char.trim() !== "") {
1171
+ const V = j, ee = u[V[0].spanIdx], G = b(
1161
1172
  g,
1162
- z,
1163
- ie,
1164
- U
1173
+ M,
1174
+ ee,
1175
+ V
1165
1176
  );
1166
1177
  if (G) {
1167
- const { left: K, top: Y } = G;
1168
- if (w.find((ee) => ee.left === K && ee.top === Y))
1178
+ const { left: Z, top: Y } = G;
1179
+ if (_.find((se) => se.left === Z && se.top === Y))
1169
1180
  continue;
1170
- w.push({ ...G, highlightColor: k.color });
1181
+ _.push({ ...G, highlightColor: W.color });
1171
1182
  }
1172
1183
  }
1173
1184
  }
1174
- }), w.sort(Xo), w;
1185
+ }), _.sort(Xo), _;
1175
1186
  };
1176
- return D(() => {
1187
+ return A(() => {
1177
1188
  (async () => {
1178
1189
  if (!(!i || i.length === 0))
1179
1190
  try {
1180
1191
  await v(t, i);
1181
- } catch (p) {
1182
- console.error(p);
1192
+ } catch (h) {
1193
+ console.error(h);
1183
1194
  }
1184
1195
  })();
1185
- }, [c, i, t, n, e]), /* @__PURE__ */ a(pe, { children: /* @__PURE__ */ a("div", { ref: l, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((g, p) => /* @__PURE__ */ a(
1196
+ }, [c, i, t, n, e]), /* @__PURE__ */ s(he, { children: /* @__PURE__ */ s("div", { ref: l, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((g, h) => /* @__PURE__ */ s(
1186
1197
  "div",
1187
1198
  {
1188
1199
  className: $r["rp-text-highlight"],
@@ -1194,16 +1205,16 @@ const Hr = (t) => {
1194
1205
  backgroundColor: g.highlightColor
1195
1206
  }
1196
1207
  },
1197
- p
1208
+ h
1198
1209
  )) }) });
1199
1210
  }, xt = et((t, e) => {
1200
- const { pageNumber: n, style: r, ...o } = t, { pages: i } = oe(), { pageRotate: c } = Je(), { textLayer: l } = uo(), { currentZoom: d } = wt(), { LoaderImageComponent: f } = _t(), m = W(i.get(n)), [P, h] = q(!1), T = W(null), [C, b] = q({
1211
+ const { pageNumber: n, style: r, ...o } = t, { pages: i } = oe(), { pageRotate: c } = Je(), { textLayer: l } = uo(), { currentZoom: d } = wt(), { LoaderImageComponent: f } = _t(), m = k(i.get(n)), [P, p] = $(!1), T = k(null), [C, b] = $({
1201
1212
  width: 0,
1202
1213
  height: 0
1203
1214
  });
1204
1215
  on(e, () => T.current);
1205
- const v = M(() => m.current ? c[n] : 0, [n, c]);
1206
- D(() => {
1216
+ const v = F(() => m.current ? c[n] : 0, [n, c]);
1217
+ A(() => {
1207
1218
  if (i && (m.current = i.get(n), m.current)) {
1208
1219
  const u = m.current.page.getViewport({
1209
1220
  scale: d,
@@ -1212,7 +1223,7 @@ const Hr = (t) => {
1212
1223
  b(u);
1213
1224
  }
1214
1225
  }, [i, n, v, d]);
1215
- const y = M(() => {
1226
+ const y = F(() => {
1216
1227
  switch (v) {
1217
1228
  case 90:
1218
1229
  return `${C.width / 2}px ${C.width / 2}px`;
@@ -1222,12 +1233,12 @@ const Hr = (t) => {
1222
1233
  default:
1223
1234
  return "center";
1224
1235
  }
1225
- }, [v, C]), g = E(() => {
1226
- h(!0);
1227
- }, []), p = E(() => {
1228
- h(!1);
1236
+ }, [v, C]), g = O(() => {
1237
+ p(!0);
1238
+ }, []), h = O(() => {
1239
+ p(!1);
1229
1240
  }, []);
1230
- return /* @__PURE__ */ a(
1241
+ return /* @__PURE__ */ s(
1231
1242
  "div",
1232
1243
  {
1233
1244
  ref: T,
@@ -1240,7 +1251,7 @@ const Hr = (t) => {
1240
1251
  "--rp-page-rotate-translate": `${y}`,
1241
1252
  "--scale-factor": d
1242
1253
  },
1243
- className: st["rp-page-wrapper"],
1254
+ className: at["rp-page-wrapper"],
1244
1255
  children: /* @__PURE__ */ H(
1245
1256
  "div",
1246
1257
  {
@@ -1248,14 +1259,14 @@ const Hr = (t) => {
1248
1259
  width: `${C.width}px`,
1249
1260
  height: `${C.height}px`
1250
1261
  },
1251
- className: st["rp-page"],
1262
+ className: at["rp-page"],
1252
1263
  children: [
1253
- /* @__PURE__ */ a(Ar, { onLoading: g, onLoaded: p, pageNumber: n }),
1254
- P && f && /* @__PURE__ */ a("div", { className: st["rp-loader-wrapper"], children: /* @__PURE__ */ a(f, {}) }),
1255
- /* @__PURE__ */ a(Yo, { pageNumber: n }),
1256
- l && /* @__PURE__ */ a(Mr, { pageNumber: n }),
1257
- /* @__PURE__ */ a(qr, { pageNumber: n, viewport: C }),
1258
- /* @__PURE__ */ a(Hr, { pageNumber: n })
1264
+ /* @__PURE__ */ s(Ar, { onLoading: g, onLoaded: h, pageNumber: n }),
1265
+ P && f && /* @__PURE__ */ s("div", { className: at["rp-loader-wrapper"], children: /* @__PURE__ */ s(f, {}) }),
1266
+ /* @__PURE__ */ s(Yo, { pageNumber: n }),
1267
+ l && /* @__PURE__ */ s(Fr, { pageNumber: n }),
1268
+ /* @__PURE__ */ s(qr, { pageNumber: n, viewport: C }),
1269
+ /* @__PURE__ */ s(Hr, { pageNumber: n })
1259
1270
  ]
1260
1271
  }
1261
1272
  )
@@ -1365,211 +1376,211 @@ var Zr = 150, Xr = function(e) {
1365
1376
  }, Be = null, je = null, Ke = null;
1366
1377
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet(), Ke = /* @__PURE__ */ new WeakSet());
1367
1378
  function Qr(t) {
1368
- var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, i = t.getColumnWidth, c = t.getEstimatedTotalHeight, l = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, P = t.getRowOffset, h = t.getRowStartIndexForOffset, T = t.getRowStopIndexForStartIndex, C = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, v = t.validateProps;
1379
+ var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, i = t.getColumnWidth, c = t.getEstimatedTotalHeight, l = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, P = t.getRowOffset, p = t.getRowStartIndexForOffset, T = t.getRowStopIndexForStartIndex, C = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, v = t.validateProps;
1369
1380
  return e = /* @__PURE__ */ function(y) {
1370
1381
  Gr(g, y);
1371
1382
  function g(u) {
1372
- var s;
1373
- return s = y.call(this, u) || this, s._instanceProps = C(s.props, Ht(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1374
- instance: Ht(s),
1383
+ var a;
1384
+ return a = y.call(this, u) || this, a._instanceProps = C(a.props, Ht(a)), a._resetIsScrollingTimeoutId = null, a._outerRef = void 0, a.state = {
1385
+ instance: Ht(a),
1375
1386
  isScrolling: !1,
1376
1387
  horizontalScrollDirection: "forward",
1377
- scrollLeft: typeof s.props.initialScrollLeft == "number" ? s.props.initialScrollLeft : 0,
1378
- scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
1388
+ scrollLeft: typeof a.props.initialScrollLeft == "number" ? a.props.initialScrollLeft : 0,
1389
+ scrollTop: typeof a.props.initialScrollTop == "number" ? a.props.initialScrollTop : 0,
1379
1390
  scrollUpdateWasRequested: !1,
1380
1391
  verticalScrollDirection: "forward"
1381
- }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = ct(function(_, w, x, I, S, R, N, A) {
1382
- return s.props.onItemsRendered({
1383
- overscanColumnStartIndex: _,
1384
- overscanColumnStopIndex: w,
1392
+ }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = ct(function(w, _, x, I, S, R, N, z) {
1393
+ return a.props.onItemsRendered({
1394
+ overscanColumnStartIndex: w,
1395
+ overscanColumnStopIndex: _,
1385
1396
  overscanRowStartIndex: x,
1386
1397
  overscanRowStopIndex: I,
1387
1398
  visibleColumnStartIndex: S,
1388
1399
  visibleColumnStopIndex: R,
1389
1400
  visibleRowStartIndex: N,
1390
- visibleRowStopIndex: A
1401
+ visibleRowStopIndex: z
1391
1402
  });
1392
- }), s._callOnScroll = void 0, s._callOnScroll = ct(function(_, w, x, I, S) {
1393
- return s.props.onScroll({
1403
+ }), a._callOnScroll = void 0, a._callOnScroll = ct(function(w, _, x, I, S) {
1404
+ return a.props.onScroll({
1394
1405
  horizontalScrollDirection: x,
1395
- scrollLeft: _,
1396
- scrollTop: w,
1406
+ scrollLeft: w,
1407
+ scrollTop: _,
1397
1408
  verticalScrollDirection: I,
1398
1409
  scrollUpdateWasRequested: S
1399
1410
  });
1400
- }), s._getItemStyle = void 0, s._getItemStyle = function(_, w) {
1401
- var x = s.props, I = x.columnWidth, S = x.direction, R = x.rowHeight, N = s._getItemStyleCache(b && I, b && S, b && R), A = _ + ":" + w, z;
1402
- if (N.hasOwnProperty(A))
1403
- z = N[A];
1411
+ }), a._getItemStyle = void 0, a._getItemStyle = function(w, _) {
1412
+ var x = a.props, I = x.columnWidth, S = x.direction, R = x.rowHeight, N = a._getItemStyleCache(b && I, b && S, b && R), z = w + ":" + _, M;
1413
+ if (N.hasOwnProperty(z))
1414
+ M = N[z];
1404
1415
  else {
1405
- var L = n(s.props, w, s._instanceProps), O = S === "rtl";
1406
- N[A] = z = {
1416
+ var D = n(a.props, _, a._instanceProps), L = S === "rtl";
1417
+ N[z] = M = {
1407
1418
  position: "absolute",
1408
- left: O ? void 0 : L,
1409
- right: O ? L : void 0,
1410
- top: P(s.props, _, s._instanceProps),
1411
- height: m(s.props, _, s._instanceProps),
1412
- width: i(s.props, w, s._instanceProps)
1419
+ left: L ? void 0 : D,
1420
+ right: L ? D : void 0,
1421
+ top: P(a.props, w, a._instanceProps),
1422
+ height: m(a.props, w, a._instanceProps),
1423
+ width: i(a.props, _, a._instanceProps)
1413
1424
  };
1414
1425
  }
1415
- return z;
1416
- }, s._getItemStyleCache = void 0, s._getItemStyleCache = ct(function(_, w, x) {
1426
+ return M;
1427
+ }, a._getItemStyleCache = void 0, a._getItemStyleCache = ct(function(w, _, x) {
1417
1428
  return {};
1418
- }), s._onScroll = function(_) {
1419
- var w = _.currentTarget, x = w.clientHeight, I = w.clientWidth, S = w.scrollLeft, R = w.scrollTop, N = w.scrollHeight, A = w.scrollWidth;
1420
- s.setState(function(z) {
1421
- if (z.scrollLeft === S && z.scrollTop === R)
1429
+ }), a._onScroll = function(w) {
1430
+ var _ = w.currentTarget, x = _.clientHeight, I = _.clientWidth, S = _.scrollLeft, R = _.scrollTop, N = _.scrollHeight, z = _.scrollWidth;
1431
+ a.setState(function(M) {
1432
+ if (M.scrollLeft === S && M.scrollTop === R)
1422
1433
  return null;
1423
- var L = s.props.direction, O = S;
1424
- if (L === "rtl")
1434
+ var D = a.props.direction, L = S;
1435
+ if (D === "rtl")
1425
1436
  switch (Vt()) {
1426
1437
  case "negative":
1427
- O = -S;
1438
+ L = -S;
1428
1439
  break;
1429
1440
  case "positive-descending":
1430
- O = A - I - S;
1441
+ L = z - I - S;
1431
1442
  break;
1432
1443
  }
1433
- O = Math.max(0, Math.min(O, A - I));
1434
- var F = Math.max(0, Math.min(R, N - x));
1444
+ L = Math.max(0, Math.min(L, z - I));
1445
+ var E = Math.max(0, Math.min(R, N - x));
1435
1446
  return {
1436
1447
  isScrolling: !0,
1437
- horizontalScrollDirection: z.scrollLeft < S ? "forward" : "backward",
1438
- scrollLeft: O,
1439
- scrollTop: F,
1440
- verticalScrollDirection: z.scrollTop < R ? "forward" : "backward",
1448
+ horizontalScrollDirection: M.scrollLeft < S ? "forward" : "backward",
1449
+ scrollLeft: L,
1450
+ scrollTop: E,
1451
+ verticalScrollDirection: M.scrollTop < R ? "forward" : "backward",
1441
1452
  scrollUpdateWasRequested: !1
1442
1453
  };
1443
- }, s._resetIsScrollingDebounced);
1444
- }, s._outerRefSetter = function(_) {
1445
- var w = s.props.outerRef;
1446
- s._outerRef = _, typeof w == "function" ? w(_) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = _);
1447
- }, s._resetIsScrollingDebounced = function() {
1448
- s._resetIsScrollingTimeoutId !== null && Ut(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = jr(s._resetIsScrolling, Zr);
1449
- }, s._resetIsScrolling = function() {
1450
- s._resetIsScrollingTimeoutId = null, s.setState({
1454
+ }, a._resetIsScrollingDebounced);
1455
+ }, a._outerRefSetter = function(w) {
1456
+ var _ = a.props.outerRef;
1457
+ a._outerRef = w, typeof _ == "function" ? _(w) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = w);
1458
+ }, a._resetIsScrollingDebounced = function() {
1459
+ a._resetIsScrollingTimeoutId !== null && Ut(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = jr(a._resetIsScrolling, Zr);
1460
+ }, a._resetIsScrolling = function() {
1461
+ a._resetIsScrollingTimeoutId = null, a.setState({
1451
1462
  isScrolling: !1
1452
1463
  }, function() {
1453
- s._getItemStyleCache(-1);
1464
+ a._getItemStyleCache(-1);
1454
1465
  });
1455
- }, s;
1466
+ }, a;
1456
1467
  }
1457
- g.getDerivedStateFromProps = function(s, _) {
1458
- return Yr(s, _), v(s), null;
1468
+ g.getDerivedStateFromProps = function(a, w) {
1469
+ return Yr(a, w), v(a), null;
1459
1470
  };
1460
- var p = g.prototype;
1461
- return p.scrollTo = function(s) {
1462
- var _ = s.scrollLeft, w = s.scrollTop;
1463
- _ !== void 0 && (_ = Math.max(0, _)), w !== void 0 && (w = Math.max(0, w)), this.setState(function(x) {
1464
- return _ === void 0 && (_ = x.scrollLeft), w === void 0 && (w = x.scrollTop), x.scrollLeft === _ && x.scrollTop === w ? null : {
1465
- horizontalScrollDirection: x.scrollLeft < _ ? "forward" : "backward",
1466
- scrollLeft: _,
1467
- scrollTop: w,
1471
+ var h = g.prototype;
1472
+ return h.scrollTo = function(a) {
1473
+ var w = a.scrollLeft, _ = a.scrollTop;
1474
+ w !== void 0 && (w = Math.max(0, w)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(x) {
1475
+ return w === void 0 && (w = x.scrollLeft), _ === void 0 && (_ = x.scrollTop), x.scrollLeft === w && x.scrollTop === _ ? null : {
1476
+ horizontalScrollDirection: x.scrollLeft < w ? "forward" : "backward",
1477
+ scrollLeft: w,
1478
+ scrollTop: _,
1468
1479
  scrollUpdateWasRequested: !0,
1469
- verticalScrollDirection: x.scrollTop < w ? "forward" : "backward"
1480
+ verticalScrollDirection: x.scrollTop < _ ? "forward" : "backward"
1470
1481
  };
1471
1482
  }, this._resetIsScrollingDebounced);
1472
- }, p.scrollToItem = function(s) {
1473
- var _ = s.align, w = _ === void 0 ? "auto" : _, x = s.columnIndex, I = s.rowIndex, S = this.props, R = S.columnCount, N = S.height, A = S.rowCount, z = S.width, L = this.state, O = L.scrollLeft, F = L.scrollTop, $ = Kr();
1474
- x !== void 0 && (x = Math.max(0, Math.min(x, R - 1))), I !== void 0 && (I = Math.max(0, Math.min(I, A - 1)));
1475
- var k = c(this.props, this._instanceProps), B = l(this.props, this._instanceProps), Z = B > z ? $ : 0, U = k > N ? $ : 0;
1483
+ }, h.scrollToItem = function(a) {
1484
+ var w = a.align, _ = w === void 0 ? "auto" : w, x = a.columnIndex, I = a.rowIndex, S = this.props, R = S.columnCount, N = S.height, z = S.rowCount, M = S.width, D = this.state, L = D.scrollLeft, E = D.scrollTop, q = Kr();
1485
+ x !== void 0 && (x = Math.max(0, Math.min(x, R - 1))), I !== void 0 && (I = Math.max(0, Math.min(I, z - 1)));
1486
+ var W = c(this.props, this._instanceProps), U = l(this.props, this._instanceProps), j = U > M ? q : 0, V = W > N ? q : 0;
1476
1487
  this.scrollTo({
1477
- scrollLeft: x !== void 0 ? d(this.props, x, w, O, this._instanceProps, U) : O,
1478
- scrollTop: I !== void 0 ? f(this.props, I, w, F, this._instanceProps, Z) : F
1488
+ scrollLeft: x !== void 0 ? d(this.props, x, _, L, this._instanceProps, V) : L,
1489
+ scrollTop: I !== void 0 ? f(this.props, I, _, E, this._instanceProps, j) : E
1479
1490
  });
1480
- }, p.componentDidMount = function() {
1481
- var s = this.props, _ = s.initialScrollLeft, w = s.initialScrollTop;
1491
+ }, h.componentDidMount = function() {
1492
+ var a = this.props, w = a.initialScrollLeft, _ = a.initialScrollTop;
1482
1493
  if (this._outerRef != null) {
1483
1494
  var x = this._outerRef;
1484
- typeof _ == "number" && (x.scrollLeft = _), typeof w == "number" && (x.scrollTop = w);
1495
+ typeof w == "number" && (x.scrollLeft = w), typeof _ == "number" && (x.scrollTop = _);
1485
1496
  }
1486
1497
  this._callPropsCallbacks();
1487
- }, p.componentDidUpdate = function() {
1488
- var s = this.props.direction, _ = this.state, w = _.scrollLeft, x = _.scrollTop, I = _.scrollUpdateWasRequested;
1498
+ }, h.componentDidUpdate = function() {
1499
+ var a = this.props.direction, w = this.state, _ = w.scrollLeft, x = w.scrollTop, I = w.scrollUpdateWasRequested;
1489
1500
  if (I && this._outerRef != null) {
1490
1501
  var S = this._outerRef;
1491
- if (s === "rtl")
1502
+ if (a === "rtl")
1492
1503
  switch (Vt()) {
1493
1504
  case "negative":
1494
- S.scrollLeft = -w;
1505
+ S.scrollLeft = -_;
1495
1506
  break;
1496
1507
  case "positive-ascending":
1497
- S.scrollLeft = w;
1508
+ S.scrollLeft = _;
1498
1509
  break;
1499
1510
  default:
1500
1511
  var R = S.clientWidth, N = S.scrollWidth;
1501
- S.scrollLeft = N - R - w;
1512
+ S.scrollLeft = N - R - _;
1502
1513
  break;
1503
1514
  }
1504
1515
  else
1505
- S.scrollLeft = Math.max(0, w);
1516
+ S.scrollLeft = Math.max(0, _);
1506
1517
  S.scrollTop = Math.max(0, x);
1507
1518
  }
1508
1519
  this._callPropsCallbacks();
1509
- }, p.componentWillUnmount = function() {
1520
+ }, h.componentWillUnmount = function() {
1510
1521
  this._resetIsScrollingTimeoutId !== null && Ut(this._resetIsScrollingTimeoutId);
1511
- }, p.render = function() {
1512
- var s = this.props, _ = s.children, w = s.className, x = s.columnCount, I = s.direction, S = s.height, R = s.innerRef, N = s.innerElementType, A = s.innerTagName, z = s.itemData, L = s.itemKey, O = L === void 0 ? Xr : L, F = s.outerElementType, $ = s.outerTagName, k = s.rowCount, B = s.style, Z = s.useIsScrolling, U = s.width, ie = this.state.isScrolling, G = this._getHorizontalRangeToRender(), K = G[0], Y = G[1], J = this._getVerticalRangeToRender(), ee = J[0], re = J[1], ve = [];
1513
- if (x > 0 && k)
1514
- for (var de = ee; de <= re; de++)
1515
- for (var Pe = K; Pe <= Y; Pe++)
1516
- ve.push(Ve(_, {
1517
- columnIndex: Pe,
1518
- data: z,
1519
- isScrolling: Z ? ie : void 0,
1520
- key: O({
1521
- columnIndex: Pe,
1522
- data: z,
1523
- rowIndex: de
1522
+ }, h.render = function() {
1523
+ var a = this.props, w = a.children, _ = a.className, x = a.columnCount, I = a.direction, S = a.height, R = a.innerRef, N = a.innerElementType, z = a.innerTagName, M = a.itemData, D = a.itemKey, L = D === void 0 ? Xr : D, E = a.outerElementType, q = a.outerTagName, W = a.rowCount, U = a.style, j = a.useIsScrolling, V = a.width, ee = this.state.isScrolling, G = this._getHorizontalRangeToRender(), Z = G[0], Y = G[1], re = this._getVerticalRangeToRender(), se = re[0], J = re[1], ue = [];
1524
+ if (x > 0 && W)
1525
+ for (var ie = se; ie <= J; ie++)
1526
+ for (var me = Z; me <= Y; me++)
1527
+ ue.push(Ve(w, {
1528
+ columnIndex: me,
1529
+ data: M,
1530
+ isScrolling: j ? ee : void 0,
1531
+ key: L({
1532
+ columnIndex: me,
1533
+ data: M,
1534
+ rowIndex: ie
1524
1535
  }),
1525
- rowIndex: de,
1526
- style: this._getItemStyle(de, Pe)
1536
+ rowIndex: ie,
1537
+ style: this._getItemStyle(ie, me)
1527
1538
  }));
1528
- var Me = c(this.props, this._instanceProps), nt = l(this.props, this._instanceProps);
1529
- return Ve(F || $ || "div", {
1530
- className: w,
1539
+ var Fe = c(this.props, this._instanceProps), nt = l(this.props, this._instanceProps);
1540
+ return Ve(E || q || "div", {
1541
+ className: _,
1531
1542
  onScroll: this._onScroll,
1532
1543
  ref: this._outerRefSetter,
1533
1544
  style: ft({
1534
1545
  position: "relative",
1535
1546
  height: S,
1536
- width: U,
1547
+ width: V,
1537
1548
  overflow: "auto",
1538
1549
  WebkitOverflowScrolling: "touch",
1539
1550
  willChange: "transform",
1540
1551
  direction: I
1541
- }, B)
1542
- }, Ve(N || A || "div", {
1543
- children: ve,
1552
+ }, U)
1553
+ }, Ve(N || z || "div", {
1554
+ children: ue,
1544
1555
  ref: R,
1545
1556
  style: {
1546
- height: Me,
1547
- pointerEvents: ie ? "none" : void 0,
1557
+ height: Fe,
1558
+ pointerEvents: ee ? "none" : void 0,
1548
1559
  width: nt
1549
1560
  }
1550
1561
  }));
1551
- }, p._callPropsCallbacks = function() {
1552
- var s = this.props, _ = s.columnCount, w = s.onItemsRendered, x = s.onScroll, I = s.rowCount;
1553
- if (typeof w == "function" && _ > 0 && I > 0) {
1554
- var S = this._getHorizontalRangeToRender(), R = S[0], N = S[1], A = S[2], z = S[3], L = this._getVerticalRangeToRender(), O = L[0], F = L[1], $ = L[2], k = L[3];
1555
- this._callOnItemsRendered(R, N, O, F, A, z, $, k);
1562
+ }, h._callPropsCallbacks = function() {
1563
+ var a = this.props, w = a.columnCount, _ = a.onItemsRendered, x = a.onScroll, I = a.rowCount;
1564
+ if (typeof _ == "function" && w > 0 && I > 0) {
1565
+ var S = this._getHorizontalRangeToRender(), R = S[0], N = S[1], z = S[2], M = S[3], D = this._getVerticalRangeToRender(), L = D[0], E = D[1], q = D[2], W = D[3];
1566
+ this._callOnItemsRendered(R, N, L, E, z, M, q, W);
1556
1567
  }
1557
1568
  if (typeof x == "function") {
1558
- var B = this.state, Z = B.horizontalScrollDirection, U = B.scrollLeft, ie = B.scrollTop, G = B.scrollUpdateWasRequested, K = B.verticalScrollDirection;
1559
- this._callOnScroll(U, ie, Z, K, G);
1569
+ var U = this.state, j = U.horizontalScrollDirection, V = U.scrollLeft, ee = U.scrollTop, G = U.scrollUpdateWasRequested, Z = U.verticalScrollDirection;
1570
+ this._callOnScroll(V, ee, j, Z, G);
1560
1571
  }
1561
- }, p._getHorizontalRangeToRender = function() {
1562
- var s = this.props, _ = s.columnCount, w = s.overscanColumnCount, x = s.overscanColumnsCount, I = s.overscanCount, S = s.rowCount, R = this.state, N = R.horizontalScrollDirection, A = R.isScrolling, z = R.scrollLeft, L = w || x || I || 1;
1563
- if (_ === 0 || S === 0)
1572
+ }, h._getHorizontalRangeToRender = function() {
1573
+ var a = this.props, w = a.columnCount, _ = a.overscanColumnCount, x = a.overscanColumnsCount, I = a.overscanCount, S = a.rowCount, R = this.state, N = R.horizontalScrollDirection, z = R.isScrolling, M = R.scrollLeft, D = _ || x || I || 1;
1574
+ if (w === 0 || S === 0)
1564
1575
  return [0, 0, 0, 0];
1565
- var O = r(this.props, z, this._instanceProps), F = o(this.props, O, z, this._instanceProps), $ = !A || N === "backward" ? Math.max(1, L) : 1, k = !A || N === "forward" ? Math.max(1, L) : 1;
1566
- return [Math.max(0, O - $), Math.max(0, Math.min(_ - 1, F + k)), O, F];
1567
- }, p._getVerticalRangeToRender = function() {
1568
- var s = this.props, _ = s.columnCount, w = s.overscanCount, x = s.overscanRowCount, I = s.overscanRowsCount, S = s.rowCount, R = this.state, N = R.isScrolling, A = R.verticalScrollDirection, z = R.scrollTop, L = x || I || w || 1;
1569
- if (_ === 0 || S === 0)
1576
+ var L = r(this.props, M, this._instanceProps), E = o(this.props, L, M, this._instanceProps), q = !z || N === "backward" ? Math.max(1, D) : 1, W = !z || N === "forward" ? Math.max(1, D) : 1;
1577
+ return [Math.max(0, L - q), Math.max(0, Math.min(w - 1, E + W)), L, E];
1578
+ }, h._getVerticalRangeToRender = function() {
1579
+ var a = this.props, w = a.columnCount, _ = a.overscanCount, x = a.overscanRowCount, I = a.overscanRowsCount, S = a.rowCount, R = this.state, N = R.isScrolling, z = R.verticalScrollDirection, M = R.scrollTop, D = x || I || _ || 1;
1580
+ if (w === 0 || S === 0)
1570
1581
  return [0, 0, 0, 0];
1571
- var O = h(this.props, z, this._instanceProps), F = T(this.props, O, z, this._instanceProps), $ = !N || A === "backward" ? Math.max(1, L) : 1, k = !N || A === "forward" ? Math.max(1, L) : 1;
1572
- return [Math.max(0, O - $), Math.max(0, Math.min(S - 1, F + k)), O, F];
1582
+ var L = p(this.props, M, this._instanceProps), E = T(this.props, L, M, this._instanceProps), q = !N || z === "backward" ? Math.max(1, D) : 1, W = !N || z === "forward" ? Math.max(1, D) : 1;
1583
+ return [Math.max(0, L - q), Math.max(0, Math.min(S - 1, E + W)), L, E];
1573
1584
  }, g;
1574
1585
  }(oo), e.defaultProps = {
1575
1586
  direction: "ltr",
@@ -1578,9 +1589,9 @@ function Qr(t) {
1578
1589
  }, e;
1579
1590
  }
1580
1591
  var Yr = function(e, n) {
1581
- var r = e.children, o = e.direction, i = e.height, c = e.innerTagName, l = e.outerTagName, d = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, P = e.width, h = n.instance;
1592
+ var r = e.children, o = e.direction, i = e.height, c = e.innerTagName, l = e.outerTagName, d = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, P = e.width, p = n.instance;
1582
1593
  if (process.env.NODE_ENV !== "production") {
1583
- if (typeof f == "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") && je && !je.has(h) && (je.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || l != null) && Ke && !Ke.has(h) && (Ke.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
1594
+ if (typeof f == "number" && Be && !Be.has(p) && (Be.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && je && !je.has(p) && (je.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || l != null) && Ke && !Ke.has(p) && (Ke.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
1584
1595
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
1585
1596
  switch (o) {
1586
1597
  case "ltr":
@@ -1610,7 +1621,7 @@ var Yr = function(e, n) {
1610
1621
  }
1611
1622
  var f = r - c - 1, m = f * i;
1612
1623
  return l + m;
1613
- }, me = function(e, n, r, o) {
1624
+ }, ve = function(e, n, r, o) {
1614
1625
  var i, c, l;
1615
1626
  if (e === "column" ? (i = o.columnMetadataMap, c = n.columnWidth, l = o.lastMeasuredColumnIndex) : (i = o.rowMetadataMap, c = n.rowHeight, l = o.lastMeasuredRowIndex), r > l) {
1616
1627
  var d = 0;
@@ -1635,39 +1646,39 @@ var Yr = function(e, n) {
1635
1646
  return l >= o ? In(e, n, r, c, 0, o) : Jr(e, n, r, Math.max(0, c), o);
1636
1647
  }, In = function(e, n, r, o, i, c) {
1637
1648
  for (; i <= o; ) {
1638
- var l = i + Math.floor((o - i) / 2), d = me(e, n, l, r).offset;
1649
+ var l = i + Math.floor((o - i) / 2), d = ve(e, n, l, r).offset;
1639
1650
  if (d === c)
1640
1651
  return l;
1641
1652
  d < c ? i = l + 1 : d > c && (o = l - 1);
1642
1653
  }
1643
1654
  return i > 0 ? i - 1 : 0;
1644
1655
  }, Jr = function(e, n, r, o, i) {
1645
- for (var c = e === "column" ? n.columnCount : n.rowCount, l = 1; o < c && me(e, n, o, r).offset < i; )
1656
+ for (var c = e === "column" ? n.columnCount : n.rowCount, l = 1; o < c && ve(e, n, o, r).offset < i; )
1646
1657
  o += l, l *= 2;
1647
1658
  return In(e, n, r, Math.min(o, c - 1), Math.floor(o / 2), i);
1648
1659
  }, Kt = function(e, n, r, o, i, c, l) {
1649
- var d = e === "column" ? n.width : n.height, f = me(e, n, r, c), m = e === "column" ? Sn(n, c) : xn(n, c), P = Math.max(0, Math.min(m - d, f.offset)), h = Math.max(0, f.offset - d + l + f.size);
1650
- switch (o === "smart" && (i >= h - d && i <= P + d ? o = "auto" : o = "center"), o) {
1660
+ var d = e === "column" ? n.width : n.height, f = ve(e, n, r, c), m = e === "column" ? Sn(n, c) : xn(n, c), P = Math.max(0, Math.min(m - d, f.offset)), p = Math.max(0, f.offset - d + l + f.size);
1661
+ switch (o === "smart" && (i >= p - d && i <= P + d ? o = "auto" : o = "center"), o) {
1651
1662
  case "start":
1652
1663
  return P;
1653
1664
  case "end":
1654
- return h;
1665
+ return p;
1655
1666
  case "center":
1656
- return Math.round(h + (P - h) / 2);
1667
+ return Math.round(p + (P - p) / 2);
1657
1668
  case "auto":
1658
1669
  default:
1659
- return i >= h && i <= P ? i : h > P || i < h ? h : P;
1670
+ return i >= p && i <= P ? i : p > P || i < p ? p : P;
1660
1671
  }
1661
1672
  }, ei = /* @__PURE__ */ Qr({
1662
1673
  getColumnOffset: function(e, n, r) {
1663
- return me("column", e, n, r).offset;
1674
+ return ve("column", e, n, r).offset;
1664
1675
  },
1665
1676
  getColumnStartIndexForOffset: function(e, n, r) {
1666
1677
  return jt("column", e, r, n);
1667
1678
  },
1668
1679
  getColumnStopIndexForStartIndex: function(e, n, r, o) {
1669
- for (var i = e.columnCount, c = e.width, l = me("column", e, n, o), d = r + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1670
- m++, f += me("column", e, m, o).size;
1680
+ for (var i = e.columnCount, c = e.width, l = ve("column", e, n, o), d = r + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1681
+ m++, f += ve("column", e, m, o).size;
1671
1682
  return m;
1672
1683
  },
1673
1684
  getColumnWidth: function(e, n, r) {
@@ -1682,7 +1693,7 @@ var Yr = function(e, n) {
1682
1693
  return Kt("row", e, n, r, o, i, c);
1683
1694
  },
1684
1695
  getRowOffset: function(e, n, r) {
1685
- return me("row", e, n, r).offset;
1696
+ return ve("row", e, n, r).offset;
1686
1697
  },
1687
1698
  getRowHeight: function(e, n, r) {
1688
1699
  return r.rowMetadataMap[n].size;
@@ -1691,8 +1702,8 @@ var Yr = function(e, n) {
1691
1702
  return jt("row", e, r, n);
1692
1703
  },
1693
1704
  getRowStopIndexForStartIndex: function(e, n, r, o) {
1694
- for (var i = e.rowCount, c = e.height, l = me("row", e, n, o), d = r + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1695
- m++, f += me("row", e, m, o).size;
1705
+ for (var i = e.rowCount, c = e.height, l = ve("row", e, n, o), d = r + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1706
+ m++, f += ve("row", e, m, o).size;
1696
1707
  return m;
1697
1708
  },
1698
1709
  initInstanceProps: function(e, n) {
@@ -1746,35 +1757,35 @@ function oi(t, e) {
1746
1757
  return !Zt(n, o) && !Zt(r, i);
1747
1758
  }
1748
1759
  const ri = () => {
1749
- const { viewMode: t } = Fe(), { scrollMode: e } = Ee(), { setColumnCount: n } = sn(), { virtualScrollableElementRef: r } = Ye(), o = Ge(), i = M(() => o.heights.length, [o.heights]), c = M(() => e === ne.HORIZONTAL_SCROLLING ? i : t === Re.DUAL_PAGE ? 2 : 1, [t, e, e, i, r]), l = M(() => o.widths.reduce((v, y, g) => {
1750
- const p = g % c;
1751
- return (!v[p] || y > v[p]) && (v[p] = y), v;
1752
- }, []), [o.widths, c]), d = E(
1760
+ const { viewMode: t } = Me(), { scrollMode: e } = Ee(), { setColumnCount: n } = an(), { virtualScrollableElementRef: r } = Ye(), o = Ge(), i = F(() => o.heights.length, [o.heights]), c = F(() => e === ne.HORIZONTAL_SCROLLING ? i : t === Re.DUAL_PAGE ? 2 : 1, [t, e, e, i, r]), l = F(() => o.widths.reduce((v, y, g) => {
1761
+ const h = g % c;
1762
+ return (!v[h] || y > v[h]) && (v[h] = y), v;
1763
+ }, []), [o.widths, c]), d = O(
1753
1764
  (b) => {
1754
1765
  const v = b % l.length;
1755
1766
  return l[v] || 0;
1756
1767
  },
1757
1768
  [l]
1758
- ), f = E(
1769
+ ), f = O(
1759
1770
  (b) => {
1760
1771
  const v = Array.from({ length: c }, (y, g) => {
1761
- const p = b * c + g;
1762
- return o.heights[p] || 0;
1772
+ const h = b * c + g;
1773
+ return o.heights[h] || 0;
1763
1774
  });
1764
1775
  return Math.max(...v);
1765
1776
  },
1766
1777
  [o.heights, c]
1767
1778
  );
1768
- D(() => {
1779
+ A(() => {
1769
1780
  n(c);
1770
1781
  }, [c, n]);
1771
- const m = M(() => e === ne.HORIZONTAL_SCROLLING || e === ne.PAGE_SCROLLING ? 1 : Math.round(i / c), [c, i, e]), P = M(() => o.heights.reduce((b, v) => b + v, 0) / o.heights.length || 0, [o]), h = M(() => o.widths.reduce((b, v) => b + v, 0) / o.widths.length || 0, [o]), T = M(() => {
1782
+ const m = F(() => e === ne.HORIZONTAL_SCROLLING || e === ne.PAGE_SCROLLING ? 1 : Math.round(i / c), [c, i, e]), P = F(() => o.heights.reduce((b, v) => b + v, 0) / o.heights.length || 0, [o]), p = F(() => o.widths.reduce((b, v) => b + v, 0) / o.widths.length || 0, [o]), T = F(() => {
1772
1783
  const { rowsHeight: b, columnsWidth: v } = bt(o, c);
1773
1784
  return {
1774
1785
  rowsHeight: b,
1775
1786
  columnsWidth: v
1776
1787
  };
1777
- }, [o, c]), C = M(() => ({
1788
+ }, [o, c]), C = F(() => ({
1778
1789
  width: T.columnsWidth.reduce((b, v) => b + v, 0),
1779
1790
  height: T.rowsHeight.reduce((b, v) => b + v, 0)
1780
1791
  }), [T]);
@@ -1785,15 +1796,15 @@ const ri = () => {
1785
1796
  columnWidth: d,
1786
1797
  pageDimension: o,
1787
1798
  estimatedRowHeight: P,
1788
- estimatedColumnWidth: h,
1799
+ estimatedColumnWidth: p,
1789
1800
  gridDimension: T,
1790
1801
  totalDimension: C
1791
1802
  };
1792
1803
  };
1793
- let ce;
1794
- typeof window < "u" ? ce = window : typeof self < "u" ? ce = self : ce = global;
1804
+ let le;
1805
+ typeof window < "u" ? le = window : typeof self < "u" ? le = self : le = global;
1795
1806
  let gt = null, vt = null;
1796
- const Xt = 20, dt = ce.clearTimeout, Qt = ce.setTimeout, ut = ce.cancelAnimationFrame || ce.mozCancelAnimationFrame || ce.webkitCancelAnimationFrame, Yt = ce.requestAnimationFrame || ce.mozRequestAnimationFrame || ce.webkitRequestAnimationFrame;
1807
+ const Xt = 20, dt = le.clearTimeout, Qt = le.setTimeout, ut = le.cancelAnimationFrame || le.mozCancelAnimationFrame || le.webkitCancelAnimationFrame, Yt = le.requestAnimationFrame || le.mozRequestAnimationFrame || le.webkitRequestAnimationFrame;
1797
1808
  ut == null || Yt == null ? (gt = dt, vt = function(e) {
1798
1809
  return Qt(e, Xt);
1799
1810
  }) : (gt = function([e, n]) {
@@ -1811,8 +1822,8 @@ function ii(t) {
1811
1822
  const d = typeof document < "u" && document.attachEvent;
1812
1823
  if (!d) {
1813
1824
  c = function(y) {
1814
- const g = y.__resizeTriggers__, p = g.firstElementChild, u = g.lastElementChild, s = p.firstElementChild;
1815
- u.scrollLeft = u.scrollWidth, u.scrollTop = u.scrollHeight, s.style.width = p.offsetWidth + 1 + "px", s.style.height = p.offsetHeight + 1 + "px", p.scrollLeft = p.scrollWidth, p.scrollTop = p.scrollHeight;
1825
+ const g = y.__resizeTriggers__, h = g.firstElementChild, u = g.lastElementChild, a = h.firstElementChild;
1826
+ u.scrollLeft = u.scrollWidth, u.scrollTop = u.scrollHeight, a.style.width = h.offsetWidth + 1 + "px", a.style.height = h.offsetHeight + 1 + "px", h.scrollLeft = h.scrollWidth, h.scrollTop = h.scrollHeight;
1816
1827
  }, i = function(y) {
1817
1828
  return y.offsetWidth !== y.__resizeLast__.width || y.offsetHeight !== y.__resizeLast__.height;
1818
1829
  }, l = function(y) {
@@ -1820,65 +1831,65 @@ function ii(t) {
1820
1831
  return;
1821
1832
  const g = this;
1822
1833
  c(this), this.__resizeRAF__ && gt(this.__resizeRAF__), this.__resizeRAF__ = vt(function() {
1823
- i(g) && (g.__resizeLast__.width = g.offsetWidth, g.__resizeLast__.height = g.offsetHeight, g.__resizeListeners__.forEach(function(s) {
1824
- s.call(g, y);
1834
+ i(g) && (g.__resizeLast__.width = g.offsetWidth, g.__resizeLast__.height = g.offsetHeight, g.__resizeListeners__.forEach(function(a) {
1835
+ a.call(g, y);
1825
1836
  }));
1826
1837
  });
1827
1838
  };
1828
- let h = !1, T = "";
1839
+ let p = !1, T = "";
1829
1840
  r = "animationstart";
1830
1841
  const C = "Webkit Moz O ms".split(" ");
1831
1842
  let b = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
1832
1843
  {
1833
1844
  const y = document.createElement("fakeelement");
1834
- if (y.style.animationName !== void 0 && (h = !0), h === !1) {
1845
+ if (y.style.animationName !== void 0 && (p = !0), p === !1) {
1835
1846
  for (let g = 0; g < C.length; g++)
1836
1847
  if (y.style[C[g] + "AnimationName"] !== void 0) {
1837
- v = C[g], T = "-" + v.toLowerCase() + "-", r = b[g], h = !0;
1848
+ v = C[g], T = "-" + v.toLowerCase() + "-", r = b[g], p = !0;
1838
1849
  break;
1839
1850
  }
1840
1851
  }
1841
1852
  }
1842
1853
  n = "resizeanim", e = "@" + T + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", o = T + "animation: 1ms " + n + "; ";
1843
1854
  }
1844
- const f = function(h) {
1845
- if (!h.getElementById("detectElementResize")) {
1846
- const T = (e || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', C = h.head || h.getElementsByTagName("head")[0], b = h.createElement("style");
1847
- b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = T : b.appendChild(h.createTextNode(T)), C.appendChild(b);
1855
+ const f = function(p) {
1856
+ if (!p.getElementById("detectElementResize")) {
1857
+ const T = (e || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', C = p.head || p.getElementsByTagName("head")[0], b = p.createElement("style");
1858
+ b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = T : b.appendChild(p.createTextNode(T)), C.appendChild(b);
1848
1859
  }
1849
1860
  };
1850
1861
  return {
1851
- addResizeListener: function(h, T) {
1862
+ addResizeListener: function(p, T) {
1852
1863
  if (d)
1853
- h.attachEvent("onresize", T);
1864
+ p.attachEvent("onresize", T);
1854
1865
  else {
1855
- if (!h.__resizeTriggers__) {
1856
- const C = h.ownerDocument, b = ce.getComputedStyle(h);
1857
- b && b.position === "static" && (h.style.position = "relative"), f(C), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = C.createElement("div")).className = "resize-triggers";
1866
+ if (!p.__resizeTriggers__) {
1867
+ const C = p.ownerDocument, b = le.getComputedStyle(p);
1868
+ b && b.position === "static" && (p.style.position = "relative"), f(C), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = C.createElement("div")).className = "resize-triggers";
1858
1869
  const v = C.createElement("div");
1859
1870
  v.className = "expand-trigger", v.appendChild(C.createElement("div"));
1860
1871
  const y = C.createElement("div");
1861
- y.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(y), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", l, !0), r && (h.__resizeTriggers__.__animationListener__ = function(p) {
1862
- p.animationName === n && c(h);
1863
- }, h.__resizeTriggers__.addEventListener(r, h.__resizeTriggers__.__animationListener__));
1872
+ y.className = "contract-trigger", p.__resizeTriggers__.appendChild(v), p.__resizeTriggers__.appendChild(y), p.appendChild(p.__resizeTriggers__), c(p), p.addEventListener("scroll", l, !0), r && (p.__resizeTriggers__.__animationListener__ = function(h) {
1873
+ h.animationName === n && c(p);
1874
+ }, p.__resizeTriggers__.addEventListener(r, p.__resizeTriggers__.__animationListener__));
1864
1875
  }
1865
- h.__resizeListeners__.push(T);
1876
+ p.__resizeListeners__.push(T);
1866
1877
  }
1867
1878
  },
1868
- removeResizeListener: function(h, T) {
1879
+ removeResizeListener: function(p, T) {
1869
1880
  if (d)
1870
- h.detachEvent("onresize", T);
1871
- else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(T), 1), !h.__resizeListeners__.length) {
1872
- h.removeEventListener("scroll", l, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(r, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
1881
+ p.detachEvent("onresize", T);
1882
+ else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(T), 1), !p.__resizeListeners__.length) {
1883
+ p.removeEventListener("scroll", l, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(r, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
1873
1884
  try {
1874
- h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
1885
+ p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
1875
1886
  } catch {
1876
1887
  }
1877
1888
  }
1878
1889
  }
1879
1890
  };
1880
1891
  }
1881
- class ai extends ro {
1892
+ class si extends ro {
1882
1893
  constructor(...e) {
1883
1894
  super(...e), this.state = {
1884
1895
  height: this.props.defaultHeight || 0,
@@ -1893,16 +1904,16 @@ class ai extends ro {
1893
1904
  onResize: o
1894
1905
  } = this.props;
1895
1906
  if (this._parentNode) {
1896
- const i = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(i.paddingLeft || "0"), l = parseFloat(i.paddingRight || "0"), d = parseFloat(i.paddingTop || "0"), f = parseFloat(i.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), P = m.height - d - f, h = m.width - c - l, T = this._parentNode.offsetHeight - d - f, C = this._parentNode.offsetWidth - c - l;
1897
- (!n && (this.state.height !== T || this.state.scaledHeight !== P) || !r && (this.state.width !== C || this.state.scaledWidth !== h)) && (this.setState({
1907
+ const i = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(i.paddingLeft || "0"), l = parseFloat(i.paddingRight || "0"), d = parseFloat(i.paddingTop || "0"), f = parseFloat(i.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), P = m.height - d - f, p = m.width - c - l, T = this._parentNode.offsetHeight - d - f, C = this._parentNode.offsetWidth - c - l;
1908
+ (!n && (this.state.height !== T || this.state.scaledHeight !== P) || !r && (this.state.width !== C || this.state.scaledWidth !== p)) && (this.setState({
1898
1909
  height: T,
1899
1910
  width: C,
1900
1911
  scaledHeight: P,
1901
- scaledWidth: h
1912
+ scaledWidth: p
1902
1913
  }), typeof o == "function" && o({
1903
1914
  height: T,
1904
1915
  scaledHeight: P,
1905
- scaledWidth: h,
1916
+ scaledWidth: p,
1906
1917
  width: C
1907
1918
  }));
1908
1919
  }
@@ -1939,7 +1950,7 @@ class ai extends ro {
1939
1950
  tagName: m = "div",
1940
1951
  ...P
1941
1952
  } = this.props, {
1942
- height: h,
1953
+ height: p,
1943
1954
  scaledHeight: T,
1944
1955
  scaledWidth: C,
1945
1956
  width: b
@@ -1947,7 +1958,7 @@ class ai extends ro {
1947
1958
  overflow: "visible"
1948
1959
  }, y = {};
1949
1960
  let g = !1;
1950
- return o || (h === 0 && (g = !0), v.height = 0, y.height = h, y.scaledHeight = T), i || (b === 0 && (g = !0), v.width = 0, y.width = b, y.scaledWidth = C), c && (g = !1), Ve(m, {
1961
+ return o || (p === 0 && (g = !0), v.height = 0, y.height = p, y.scaledHeight = T), i || (b === 0 && (g = !0), v.width = 0, y.width = b, y.scaledWidth = C), c && (g = !1), Ve(m, {
1951
1962
  ref: this._setRef,
1952
1963
  style: {
1953
1964
  ...v,
@@ -1957,15 +1968,15 @@ class ai extends ro {
1957
1968
  }, !g && e(y));
1958
1969
  }
1959
1970
  }
1960
- const si = rn(({ widths: t, heights: e }) => {
1961
- const { focusedPage: n, totalPages: r } = le(), o = M(() => {
1971
+ const ai = rn(({ widths: t, heights: e }) => {
1972
+ const { focusedPage: n, totalPages: r } = de(), o = F(() => {
1962
1973
  const l = [], d = Math.ceil(n / 2) * 2 - 1;
1963
1974
  if (l.push(d), d + 1 <= r) {
1964
1975
  const f = d + 1;
1965
1976
  l.push(f);
1966
1977
  }
1967
1978
  return l;
1968
- }, [n, r]), i = M(() => {
1979
+ }, [n, r]), i = F(() => {
1969
1980
  const l = n % 2 === 1 ? n - 1 : n - 2, d = Math.floor(l / 2), f = e(d), m = t(l), P = t(l + 1);
1970
1981
  return [
1971
1982
  {
@@ -1981,48 +1992,48 @@ const si = rn(({ widths: t, heights: e }) => {
1981
1992
  height: f
1982
1993
  }
1983
1994
  ];
1984
- }, [t, e, o]), c = M(() => i.reduce((l, d) => l + Number(d.width || 0), 0), [i]);
1985
- return /* @__PURE__ */ a("div", { style: { width: c, position: "relative" }, children: o.map((l, d) => /* @__PURE__ */ a(xt, { style: i[d], pageNumber: l }, l)) });
1995
+ }, [t, e, o]), c = F(() => i.reduce((l, d) => l + Number(d.width || 0), 0), [i]);
1996
+ return /* @__PURE__ */ s("div", { style: { width: c, position: "relative" }, children: o.map((l, d) => /* @__PURE__ */ s(xt, { style: i[d], pageNumber: l }, l)) });
1986
1997
  }), ci = ({ widths: t, heights: e }) => {
1987
- const { focusedPage: n } = le(), r = M(() => ({
1998
+ const { focusedPage: n } = de(), r = F(() => ({
1988
1999
  position: "absolute",
1989
2000
  width: t(n - 1),
1990
2001
  height: e(n - 1)
1991
- }), [t, e, n]), o = M(() => t(n - 1), [t]);
1992
- return /* @__PURE__ */ a(
2002
+ }), [t, e, n]), o = F(() => t(n - 1), [t]);
2003
+ return /* @__PURE__ */ s(
1993
2004
  "div",
1994
2005
  {
1995
2006
  style: {
1996
2007
  width: o,
1997
2008
  position: "relative"
1998
2009
  },
1999
- children: /* @__PURE__ */ a(xt, { style: r, pageNumber: n }, n)
2010
+ children: /* @__PURE__ */ s(xt, { style: r, pageNumber: n }, n)
2000
2011
  }
2001
2012
  );
2002
2013
  }, li = (t, e, n) => {
2003
- const r = W(), { contentRef: o } = _e(), { heights: i, widths: c } = Ge(), { setFocusedPage: l } = le(), [d, f] = q([]), { targetScrollPage: m } = cn(), P = Tt(d, 0, 500), h = M(() => {
2014
+ const r = k(), { contentRef: o } = be(), { heights: i, widths: c } = Ge(), { setFocusedPage: l } = de(), [d, f] = $([]), { targetScrollPage: m } = cn(), P = Tt(d, 0, 500), p = F(() => {
2004
2015
  const { rowsHeight: C, columnsWidth: b } = bt({ heights: i, widths: c }, t);
2005
2016
  return i.map((v, y) => {
2006
- const g = c[y], p = Jo(y + 1, t), u = b.slice(0, p.columnIndex).reduce((x, I) => x + I, 0), s = C.slice(0, p.rowIndex).reduce((x, I) => x + I, 0), _ = u + g, w = s + v;
2017
+ const g = c[y], h = Jo(y + 1, t), u = b.slice(0, h.columnIndex).reduce((x, I) => x + I, 0), a = C.slice(0, h.rowIndex).reduce((x, I) => x + I, 0), w = u + g, _ = a + v;
2007
2018
  return {
2008
2019
  pageNumber: y + 1,
2009
- ...p,
2020
+ ...h,
2010
2021
  width: g,
2011
2022
  height: v,
2012
2023
  startX: u,
2013
- startY: s,
2014
- endX: _,
2015
- endY: w
2024
+ startY: a,
2025
+ endX: w,
2026
+ endY: _
2016
2027
  };
2017
2028
  });
2018
2029
  }, [i, c, t, e]);
2019
- D(() => {
2030
+ A(() => {
2020
2031
  var b;
2021
2032
  P.length > 0 && !m.current && l(P[0].pageNumber), ((b = P[0]) == null ? void 0 : b.ratio) && P.some((v) => v.pageNumber === m.current) && setTimeout(() => {
2022
2033
  m.current = void 0;
2023
2034
  }, 500);
2024
2035
  }, [P, l]);
2025
- const T = E(
2036
+ const T = O(
2026
2037
  (C) => {
2027
2038
  r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
2028
2039
  const b = C.target, v = {
@@ -2030,22 +2041,22 @@ const si = rn(({ widths: t, heights: e }) => {
2030
2041
  startLeft: b.scrollLeft,
2031
2042
  endTop: b.scrollTop + b.clientHeight,
2032
2043
  endLeft: b.scrollLeft + b.clientWidth
2033
- }, y = h.filter((g) => {
2034
- const p = g.endX >= v.startLeft && g.endY >= v.startTop, u = g.startX <= v.endLeft && g.startY <= v.endTop;
2035
- return p && u;
2044
+ }, y = p.filter((g) => {
2045
+ const h = g.endX >= v.startLeft && g.endY >= v.startTop, u = g.startX <= v.endLeft && g.startY <= v.endTop;
2046
+ return h && u;
2036
2047
  }).map((g) => {
2037
- const p = v.startLeft > g.startX ? v.startLeft : g.startX, u = v.startTop > g.startY ? v.startTop : g.startY, s = v.endLeft < g.endX ? v.endLeft : g.endX, _ = v.endTop < g.endY ? v.endTop : g.endY, w = s - p, x = _ - u, S = +(w * x / (g.width * g.height) * 100).toFixed(2);
2048
+ const h = v.startLeft > g.startX ? v.startLeft : g.startX, u = v.startTop > g.startY ? v.startTop : g.startY, a = v.endLeft < g.endX ? v.endLeft : g.endX, w = v.endTop < g.endY ? v.endTop : g.endY, _ = a - h, x = w - u, S = +(_ * x / (g.width * g.height) * 100).toFixed(2);
2038
2049
  return {
2039
2050
  pageNumber: g.pageNumber,
2040
2051
  ratio: S
2041
2052
  };
2042
- }).sort((g, p) => p.ratio - g.ratio);
2053
+ }).sort((g, h) => h.ratio - g.ratio);
2043
2054
  f(y);
2044
2055
  });
2045
2056
  },
2046
- [o, h]
2057
+ [o, p]
2047
2058
  );
2048
- D(() => {
2059
+ A(() => {
2049
2060
  if (n)
2050
2061
  return n == null || n.addEventListener("scroll", T), () => {
2051
2062
  n == null || n.removeEventListener("scroll", T);
@@ -2053,15 +2064,15 @@ const si = rn(({ widths: t, heights: e }) => {
2053
2064
  }, [n, T]);
2054
2065
  }, Rn = et((t, e) => {
2055
2066
  const { children: n, toolbarRef: r, style: o, className: i, ...c } = t, { customVariables: l, customDarkVariables: d } = Oo(), { darkMode: f } = lo();
2056
- return /* @__PURE__ */ a(
2067
+ return /* @__PURE__ */ s(
2057
2068
  "div",
2058
2069
  {
2059
2070
  ref: e,
2060
2071
  ...c,
2061
- className: se(
2062
- we["rp-theme-variables"],
2063
- we["rp-container"],
2064
- f ? we["rp-dark-mode"] : "",
2072
+ className: ce(
2073
+ _e["rp-theme-variables"],
2074
+ _e["rp-container"],
2075
+ f ? _e["rp-dark-mode"] : "",
2065
2076
  i
2066
2077
  ),
2067
2078
  style: {
@@ -2075,149 +2086,149 @@ const si = rn(({ widths: t, heights: e }) => {
2075
2086
  );
2076
2087
  }), di = rn(({ columnIndex: t, rowIndex: e, data: n, style: r }) => {
2077
2088
  const o = er(e, t, n.columnCount);
2078
- return /* @__PURE__ */ a(xt, { style: r, pageNumber: o }, o);
2079
- }, oi), Js = () => {
2080
- const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = ho(), { pagesRef: r, setPagesRef: o, setContentRef: i } = _e(), { scrollToPage: c } = vn(), {
2089
+ return /* @__PURE__ */ s(xt, { style: r, pageNumber: o }, o);
2090
+ }, oi), Ja = () => {
2091
+ const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = ho(), { pagesRef: r, setPagesRef: o, setContentRef: i } = be(), { scrollToPage: c } = vn(), {
2081
2092
  virtualScrollRef: l,
2082
2093
  getVirtualScrollRef: d,
2083
2094
  getPageScrollElementRef: f,
2084
2095
  getVirtualScrollableElementRef: m,
2085
2096
  setTotalInnerDimensions: P,
2086
- virtualScrollableElementRef: h,
2097
+ virtualScrollableElementRef: p,
2087
2098
  totalInnerDimensions: T,
2088
2099
  pageScrollElementRef: C
2089
- } = Ye(), b = W(!0), { nextPage: v, prevPage: y, setFocusedPage: g, focusedPage: p } = le(), { scrollMode: u } = Ee(), { viewMode: s } = Fe(), _ = W(null), { loading: w, error: x } = oe(), { passwordRequired: I } = co(), { LoaderImageComponent: S } = _t(), R = W(
2100
+ } = Ye(), b = k(!0), { nextPage: v, prevPage: y, setFocusedPage: g, focusedPage: h } = de(), { scrollMode: u } = Ee(), { viewMode: a } = Me(), w = k(null), { loading: _, error: x } = oe(), { passwordRequired: I } = co(), { LoaderImageComponent: S } = _t(), R = k(
2090
2101
  T
2091
- ), N = W({
2092
- viewMode: s,
2102
+ ), N = k({
2103
+ viewMode: a,
2093
2104
  scrollMode: u
2094
- }), A = W(!1), z = W(), { isFullScreen: L } = fo(), {
2095
- pageDimension: O,
2096
- rowCount: F,
2097
- rowHeight: $,
2098
- columnCount: k,
2099
- columnWidth: B,
2100
- estimatedColumnWidth: Z,
2101
- estimatedRowHeight: U,
2102
- totalDimension: ie
2103
- } = ri(), G = Tt(T, 100), K = W();
2104
- li(k, F, h);
2105
- const Y = W({
2105
+ }), z = k(!1), M = k(), { isFullScreen: D } = fo(), {
2106
+ pageDimension: L,
2107
+ rowCount: E,
2108
+ rowHeight: q,
2109
+ columnCount: W,
2110
+ columnWidth: U,
2111
+ estimatedColumnWidth: j,
2112
+ estimatedRowHeight: V,
2113
+ totalDimension: ee
2114
+ } = ri(), G = Tt(T, 100), Z = k();
2115
+ li(W, E, p);
2116
+ const Y = k({
2106
2117
  scrollTop: 0,
2107
2118
  scrollLeft: 0
2108
2119
  });
2109
2120
  or(r);
2110
- const { isPressed: J } = tr(), { selectionMode: ee } = po(), { initializeGrabScroll: re, resetGrabState: ve } = nr({
2111
- isPressed: J
2112
- }), de = M(() => ee === ao.HAND, [ee]), Pe = M(() => ({
2113
- columnCount: k
2114
- }), [k]), Me = E(
2115
- (V) => {
2116
- const j = document.activeElement !== r;
2117
- !L && j || (["ArrowUp", "ArrowLeft"].includes(V.key) ? (V.preventDefault(), y()) : ["ArrowDown", "ArrowRight"].includes(V.key) && (V.preventDefault(), v()));
2121
+ const { isPressed: re } = tr(), { selectionMode: se } = po(), { initializeGrabScroll: J, resetGrabState: ue } = nr({
2122
+ isPressed: re
2123
+ }), ie = F(() => se === so.HAND, [se]), me = F(() => ({
2124
+ columnCount: W
2125
+ }), [W]), Fe = O(
2126
+ (B) => {
2127
+ const K = document.activeElement !== r;
2128
+ !D && K || (["ArrowUp", "ArrowLeft"].includes(B.key) ? (B.preventDefault(), y()) : ["ArrowDown", "ArrowRight"].includes(B.key) && (B.preventDefault(), v()));
2118
2129
  },
2119
- [v, y, L, u]
2130
+ [v, y, D, u]
2120
2131
  );
2121
- D(() => (window.addEventListener("keydown", Me), () => {
2122
- window.removeEventListener("keydown", Me);
2123
- }), [Me]), D(() => {
2124
- if (_.current && (_.current.style.position = "relative"), !!l)
2125
- for (let V = 0; V < F; V++)
2126
- for (let j = 0; j < k; j++)
2132
+ A(() => (window.addEventListener("keydown", Fe), () => {
2133
+ window.removeEventListener("keydown", Fe);
2134
+ }), [Fe]), A(() => {
2135
+ if (w.current && (w.current.style.position = "relative"), !!l)
2136
+ for (let B = 0; B < E; B++)
2137
+ for (let K = 0; K < W; K++)
2127
2138
  l.resetAfterIndices({
2128
- columnIndex: j,
2129
- rowIndex: V,
2139
+ columnIndex: K,
2140
+ rowIndex: B,
2130
2141
  shouldForceUpdate: !0
2131
2142
  });
2132
- }, [F, k, O, l]);
2133
- const nt = E(
2134
- (V, j) => {
2135
- if (!h)
2143
+ }, [E, W, L, l]);
2144
+ const nt = O(
2145
+ (B, K) => {
2146
+ if (!p)
2136
2147
  return { scrollTop: 0, scrollLeft: 0 };
2137
- const ye = Y.current.scrollTop > j, xe = Y.current.scrollLeft > V;
2148
+ const ye = Y.current.scrollTop > K, xe = Y.current.scrollLeft > B;
2138
2149
  return ye || xe ? Y.current : {
2139
- scrollTop: h.scrollTop,
2140
- scrollLeft: h.scrollLeft
2150
+ scrollTop: p.scrollTop,
2151
+ scrollLeft: p.scrollLeft
2141
2152
  };
2142
2153
  },
2143
- [h]
2144
- ), Et = E(
2145
- (V, j) => {
2146
- if (N.current.viewMode !== s || N.current.scrollMode !== u) {
2147
- K.current && clearTimeout(K.current), A.current = !0, c(p, "auto"), K.current = setTimeout(() => {
2154
+ [p]
2155
+ ), Et = O(
2156
+ (B, K) => {
2157
+ if (N.current.viewMode !== a || N.current.scrollMode !== u) {
2158
+ Z.current && clearTimeout(Z.current), z.current = !0, c(h, "auto"), Z.current = setTimeout(() => {
2148
2159
  requestAnimationFrame(() => {
2149
- N.current = { viewMode: s, scrollMode: u };
2160
+ N.current = { viewMode: a, scrollMode: u };
2150
2161
  });
2151
2162
  }, 100);
2152
2163
  return;
2153
2164
  }
2154
- const xe = V.scrollTop, ot = V.scrollLeft;
2155
- if (!j.height || !j.width)
2165
+ const xe = B.scrollTop, ot = B.scrollLeft;
2166
+ if (!K.height || !K.width)
2156
2167
  return;
2157
- A.current = !0;
2158
- const { height: Se, width: rt } = j, { height: Nt, width: Ot } = R.current;
2168
+ z.current = !0;
2169
+ const { height: Se, width: rt } = K, { height: Nt, width: Ot } = R.current;
2159
2170
  if (Nt === Se && Ot === rt)
2160
2171
  return;
2161
2172
  const Jn = xe / Nt * Se, eo = ot / Ot * rt, to = Math.round(Math.min(Jn, Se)) || 0, no = Math.round(Math.min(eo, rt)) || 0;
2162
- z.current = setTimeout(() => {
2173
+ M.current = setTimeout(() => {
2163
2174
  requestAnimationFrame(() => {
2164
- h == null || h.scrollTo({
2175
+ p == null || p.scrollTo({
2165
2176
  top: to,
2166
2177
  left: no,
2167
2178
  behavior: "auto"
2168
2179
  });
2169
2180
  });
2170
2181
  }, 0), R.current = {
2171
- height: j.height,
2172
- width: j.width
2182
+ height: K.height,
2183
+ width: K.width
2173
2184
  };
2174
2185
  },
2175
- [h, s, u, c]
2186
+ [p, a, u, c]
2176
2187
  );
2177
- D(() => {
2178
- clearTimeout(z.current);
2179
- const V = Array.from({ length: F }).reduce(
2180
- (xe, ot, Se) => xe + $(Se),
2188
+ A(() => {
2189
+ clearTimeout(M.current);
2190
+ const B = Array.from({ length: E }).reduce(
2191
+ (xe, ot, Se) => xe + q(Se),
2181
2192
  0
2182
- ), j = Array.from({ length: k }).reduce(
2183
- (xe, ot, Se) => xe + B(Se),
2193
+ ), K = Array.from({ length: W }).reduce(
2194
+ (xe, ot, Se) => xe + U(Se),
2184
2195
  0
2185
- ), ye = nt(j, V);
2186
- Y.current = ye, Et(ye, { height: V, width: j }), P({
2187
- height: V,
2188
- width: j
2196
+ ), ye = nt(K, B);
2197
+ Y.current = ye, Et(ye, { height: B, width: K }), P({
2198
+ height: B,
2199
+ width: K
2189
2200
  });
2190
- }, [O, F, k, Et]);
2191
- const Xn = E(
2192
- (V) => {
2201
+ }, [L, E, W, Et]);
2202
+ const Xn = O(
2203
+ (B) => {
2193
2204
  Y.current = {
2194
- scrollTop: V.scrollTop,
2195
- scrollLeft: V.scrollLeft
2205
+ scrollTop: B.scrollTop,
2206
+ scrollLeft: B.scrollLeft
2196
2207
  };
2197
2208
  },
2198
- [h]
2209
+ [p]
2199
2210
  );
2200
- D(() => () => {
2201
- K.current && clearTimeout(K.current);
2211
+ A(() => () => {
2212
+ Z.current && clearTimeout(Z.current);
2202
2213
  }, []);
2203
- const Qn = M(() => se(ae["rp-pages-container"], {
2204
- [ae["rp-cursor-grab"]]: de && !J,
2205
- [ae["rp-cursor-grabbing"]]: de && J
2206
- }), [de, J]), Yn = E(
2207
- (V) => {
2208
- if (de && V) {
2209
- const j = se(ae["rp-pages"]), ye = document.querySelector(`.${j}`);
2210
- re(ye);
2214
+ const Qn = F(() => ce(ae["rp-pages-container"], {
2215
+ [ae["rp-cursor-grab"]]: ie && !re,
2216
+ [ae["rp-cursor-grabbing"]]: ie && re
2217
+ }), [ie, re]), Yn = O(
2218
+ (B) => {
2219
+ if (ie && B) {
2220
+ const K = ce(ae["rp-pages"]), ye = document.querySelector(`.${K}`);
2221
+ J(ye);
2211
2222
  }
2212
2223
  },
2213
- [de, re, ae]
2224
+ [ie, J, ae]
2214
2225
  );
2215
- return D(() => {
2216
- w && ve();
2217
- }, [w]), D(() => {
2226
+ return A(() => {
2227
+ _ && ue();
2228
+ }, [_]), A(() => {
2218
2229
  if (!(G.height === 0 || !b.current)) {
2219
2230
  if (e === ne.PAGE_SCROLLING) {
2220
- t !== p && C && g(t), b.current = !1;
2231
+ t !== h && C && g(t), b.current = !1;
2221
2232
  return;
2222
2233
  }
2223
2234
  c(t, "auto"), g(t), b.current = !1;
@@ -2228,51 +2239,51 @@ const si = rn(({ widths: t, heights: e }) => {
2228
2239
  C,
2229
2240
  g,
2230
2241
  G
2231
- ]), /* @__PURE__ */ H(pe, { children: [
2232
- /* @__PURE__ */ a(No, { ref: i, children: /* @__PURE__ */ a(
2242
+ ]), /* @__PURE__ */ H(he, { children: [
2243
+ /* @__PURE__ */ s(No, { ref: i, children: /* @__PURE__ */ s(
2233
2244
  Rn,
2234
2245
  {
2235
2246
  id: n,
2236
2247
  ref: o,
2237
2248
  tabIndex: -1,
2238
2249
  className: Qn,
2239
- children: /* @__PURE__ */ a(ai, { style: { minHeight: "50px" }, children: ({ width: V, height: j }) => /* @__PURE__ */ a("div", { "data-rp": "pages", ref: Yn, style: { width: V, height: j }, children: u === ne.PAGE_SCROLLING ? /* @__PURE__ */ a(
2250
+ children: /* @__PURE__ */ s(si, { style: { minHeight: "50px" }, children: ({ width: B, height: K }) => /* @__PURE__ */ s("div", { "data-rp": "pages", ref: Yn, style: { width: B, height: K }, children: u === ne.PAGE_SCROLLING ? /* @__PURE__ */ s(
2240
2251
  "div",
2241
2252
  {
2242
2253
  ref: f,
2243
- style: { width: V, height: j },
2244
- className: se(ae["rp-pages"], ae["rp-page-scrolling-wrapper"]),
2245
- children: s === Re.DUAL_PAGE ? /* @__PURE__ */ a(si, { widths: B, heights: $ }) : /* @__PURE__ */ a(ci, { widths: B, heights: $ })
2254
+ style: { width: B, height: K },
2255
+ className: ce(ae["rp-pages"], ae["rp-page-scrolling-wrapper"]),
2256
+ children: a === Re.DUAL_PAGE ? /* @__PURE__ */ s(ai, { widths: U, heights: q }) : /* @__PURE__ */ s(ci, { widths: U, heights: q })
2246
2257
  }
2247
- ) : U ? /* @__PURE__ */ a(
2258
+ ) : V ? /* @__PURE__ */ s(
2248
2259
  ei,
2249
2260
  {
2250
2261
  ref: d,
2251
- itemData: Pe,
2262
+ itemData: me,
2252
2263
  outerRef: m,
2253
- innerRef: _,
2264
+ innerRef: w,
2254
2265
  onScroll: Xn,
2255
- columnCount: k,
2256
- columnWidth: B,
2257
- rowHeight: $,
2258
- height: j,
2259
- width: V,
2260
- estimatedColumnWidth: Z,
2261
- estimatedRowHeight: U,
2262
- rowCount: F,
2263
- className: se(
2266
+ columnCount: W,
2267
+ columnWidth: U,
2268
+ rowHeight: q,
2269
+ height: K,
2270
+ width: B,
2271
+ estimatedColumnWidth: j,
2272
+ estimatedRowHeight: V,
2273
+ rowCount: E,
2274
+ className: ce(
2264
2275
  ae["rp-pages"],
2265
2276
  u === ne.HORIZONTAL_SCROLLING ? ae["rp-pages-horizontal-scroll"] : ""
2266
2277
  ),
2267
2278
  style: {
2268
- "--rp-page-height": `${ie.height}px`,
2269
- "--rp-page-width": `${ie.width}px`,
2270
- "--rp-row-count": `${F}`,
2271
- "--rp-column-count": `${k}`
2279
+ "--rp-page-height": `${ee.height}px`,
2280
+ "--rp-page-width": `${ee.width}px`,
2281
+ "--rp-row-count": `${E}`,
2282
+ "--rp-column-count": `${W}`
2272
2283
  },
2273
2284
  children: di
2274
2285
  }
2275
- ) : !w && !x ? /* @__PURE__ */ a(
2286
+ ) : !_ && !x ? /* @__PURE__ */ s(
2276
2287
  "div",
2277
2288
  {
2278
2289
  className: ae["rp-loader"],
@@ -2283,22 +2294,22 @@ const si = rn(({ widths: t, heights: e }) => {
2283
2294
  height: "100%",
2284
2295
  width: "100%"
2285
2296
  },
2286
- children: S && /* @__PURE__ */ a(S, {})
2297
+ children: S && /* @__PURE__ */ s(S, {})
2287
2298
  }
2288
- ) : x === so.NOT_SUPPORTED ? /* @__PURE__ */ a("div", { className: ae["rp-not-supported"], children: /* @__PURE__ */ H("div", { className: ae["rp-not-supported-content"], children: [
2299
+ ) : x === ao.NOT_SUPPORTED ? /* @__PURE__ */ s("div", { className: ae["rp-not-supported"], children: /* @__PURE__ */ H("div", { className: ae["rp-not-supported-content"], children: [
2289
2300
  "React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
2290
- /* @__PURE__ */ a("div", { children: /* @__PURE__ */ H("ul", { children: [
2291
- /* @__PURE__ */ a("li", { children: "Chrome 110+" }),
2292
- /* @__PURE__ */ a("li", { children: "Edge 115+" }),
2293
- /* @__PURE__ */ a("li", { children: "Firefox 115+" }),
2294
- /* @__PURE__ */ a("li", { children: "Safari 16.5+" }),
2295
- /* @__PURE__ */ a("li", { children: "Safari iOS 16.5+" }),
2296
- /* @__PURE__ */ a("li", { children: "Chrome Android 126+" })
2301
+ /* @__PURE__ */ s("div", { children: /* @__PURE__ */ H("ul", { children: [
2302
+ /* @__PURE__ */ s("li", { children: "Chrome 110+" }),
2303
+ /* @__PURE__ */ s("li", { children: "Edge 115+" }),
2304
+ /* @__PURE__ */ s("li", { children: "Firefox 115+" }),
2305
+ /* @__PURE__ */ s("li", { children: "Safari 16.5+" }),
2306
+ /* @__PURE__ */ s("li", { children: "Safari iOS 16.5+" }),
2307
+ /* @__PURE__ */ s("li", { children: "Chrome Android 126+" })
2297
2308
  ] }) })
2298
2309
  ] }) }) : null }) })
2299
2310
  }
2300
2311
  ) }),
2301
- I && /* @__PURE__ */ a(rr, {})
2312
+ I && /* @__PURE__ */ s(rr, {})
2302
2313
  ] });
2303
2314
  }, ke = {
2304
2315
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
@@ -2311,31 +2322,31 @@ const si = rn(({ widths: t, heights: e }) => {
2311
2322
  "rp-page-input": "_rp-page-input_1gck0_6",
2312
2323
  "rp-total-page": "_rp-total-page_1gck0_18"
2313
2324
  }, ui = () => {
2314
- const { prevIcon: t } = Ce(), { prevIcon: e } = be();
2315
- return t || e || /* @__PURE__ */ a(Ze, {});
2325
+ const { prevIcon: t } = Pe(), { prevIcon: e } = Te();
2326
+ return t || e || /* @__PURE__ */ s(Ze, {});
2316
2327
  }, pi = () => {
2317
- const { nextIcon: t } = Ce(), { nextIcon: e } = be();
2318
- return t || e || /* @__PURE__ */ a(Ze, { style: { transform: "rotate(180deg" } });
2328
+ const { nextIcon: t } = Pe(), { nextIcon: e } = Te();
2329
+ return t || e || /* @__PURE__ */ s(Ze, { style: { transform: "rotate(180deg" } });
2319
2330
  }, hi = () => {
2320
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: i } = le(), [c, l] = q(t.toString()), { pageNavigationTool: d = !0 } = Te(), { pageNavigationTool: f = !0 } = Ne(), { isSmallScreen: m } = Oe(), { viewMode: P } = Fe(), { scrollMode: h } = Ee(), { localeMessages: T } = he();
2321
- D(() => {
2331
+ const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: i } = de(), [c, l] = $(t.toString()), { pageNavigationTool: d = !0 } = Ce(), { pageNavigationTool: f = !0 } = Ne(), { isSmallScreen: m } = Oe(), { viewMode: P } = Me(), { scrollMode: p } = Ee(), { localeMessages: T } = fe();
2332
+ A(() => {
2322
2333
  l(t.toString());
2323
2334
  }, [t]);
2324
- const C = E((p) => {
2325
- const u = p.target.value;
2335
+ const C = O((h) => {
2336
+ const u = h.target.value;
2326
2337
  l(u);
2327
- }, []), b = E(async () => {
2328
- const p = i(c);
2329
- p.success || l(p.currentPage.toString());
2330
- }, [i, c, e]), v = E(() => {
2338
+ }, []), b = O(async () => {
2339
+ const h = i(c);
2340
+ h.success || l(h.currentPage.toString());
2341
+ }, [i, c, e]), v = O(() => {
2331
2342
  l(t.toString());
2332
- }, [t]), y = E(
2333
- (p) => {
2334
- p.key === "Enter" && b();
2343
+ }, [t]), y = O(
2344
+ (h) => {
2345
+ h.key === "Enter" && b();
2335
2346
  },
2336
2347
  [b]
2337
- ), g = M(() => P === Re.DUAL_PAGE && h === ne.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, P, h]);
2338
- return !d || !f ? null : typeof d != "boolean" ? /* @__PURE__ */ a(
2348
+ ), g = F(() => P === Re.DUAL_PAGE && p === ne.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, P, p]);
2349
+ return !d || !f ? null : typeof d != "boolean" ? /* @__PURE__ */ s(
2339
2350
  d,
2340
2351
  {
2341
2352
  total: e,
@@ -2345,7 +2356,7 @@ const si = rn(({ widths: t, heights: e }) => {
2345
2356
  goToPage: i,
2346
2357
  changePage: n
2347
2358
  }
2348
- ) : typeof f != "boolean" ? /* @__PURE__ */ a(
2359
+ ) : typeof f != "boolean" ? /* @__PURE__ */ s(
2349
2360
  f,
2350
2361
  {
2351
2362
  total: e,
@@ -2356,17 +2367,17 @@ const si = rn(({ widths: t, heights: e }) => {
2356
2367
  changePage: n
2357
2368
  }
2358
2369
  ) : /* @__PURE__ */ H("div", { className: pt["rp-paginate"], children: [
2359
- !m && /* @__PURE__ */ a(Q, { content: T == null ? void 0 : T.previousPageTooltip, children: /* @__PURE__ */ a(
2360
- ge,
2370
+ !m && /* @__PURE__ */ s(Q, { content: T == null ? void 0 : T.previousPageTooltip, children: /* @__PURE__ */ s(
2371
+ we,
2361
2372
  {
2362
2373
  onClick: o,
2363
2374
  "aria-label": T == null ? void 0 : T.previousPageTooltip,
2364
2375
  "aria-disabled": t === 1,
2365
- children: /* @__PURE__ */ a(ui, {})
2376
+ children: /* @__PURE__ */ s(ui, {})
2366
2377
  }
2367
2378
  ) }),
2368
- /* @__PURE__ */ a(Q, { content: T == null ? void 0 : T.currentPageTooltip, children: /* @__PURE__ */ a(
2369
- an,
2379
+ /* @__PURE__ */ s(Q, { content: T == null ? void 0 : T.currentPageTooltip, children: /* @__PURE__ */ s(
2380
+ sn,
2370
2381
  {
2371
2382
  onKeyDown: y,
2372
2383
  onBlur: v,
@@ -2381,18 +2392,18 @@ const si = rn(({ widths: t, heights: e }) => {
2381
2392
  "/",
2382
2393
  e
2383
2394
  ] }),
2384
- !m && /* @__PURE__ */ a(Q, { content: T == null ? void 0 : T.nextPageTooltip, children: /* @__PURE__ */ a(
2385
- ge,
2395
+ !m && /* @__PURE__ */ s(Q, { content: T == null ? void 0 : T.nextPageTooltip, children: /* @__PURE__ */ s(
2396
+ we,
2386
2397
  {
2387
2398
  onClick: r,
2388
2399
  "aria-label": T == null ? void 0 : T.nextPageTooltip,
2389
2400
  "aria-disabled": g,
2390
- children: /* @__PURE__ */ a(pi, {})
2401
+ children: /* @__PURE__ */ s(pi, {})
2391
2402
  }
2392
2403
  ) })
2393
2404
  ] });
2394
2405
  };
2395
- var St = "Dialog", [Ln, ec] = dr(St), [fi, ue] = Ln(St), En = (t) => {
2406
+ var St = "Dialog", [Ln, ec] = dr(St), [fi, pe] = Ln(St), En = (t) => {
2396
2407
  const {
2397
2408
  __scopeDialog: e,
2398
2409
  children: n,
@@ -2405,15 +2416,15 @@ var St = "Dialog", [Ln, ec] = dr(St), [fi, ue] = Ln(St), En = (t) => {
2405
2416
  defaultProp: o,
2406
2417
  onChange: i
2407
2418
  });
2408
- return /* @__PURE__ */ a(
2419
+ return /* @__PURE__ */ s(
2409
2420
  fi,
2410
2421
  {
2411
2422
  scope: e,
2412
2423
  triggerRef: l,
2413
2424
  contentRef: d,
2414
- contentId: at(),
2415
- titleId: at(),
2416
- descriptionId: at(),
2425
+ contentId: st(),
2426
+ titleId: st(),
2427
+ descriptionId: st(),
2417
2428
  open: f,
2418
2429
  onOpenChange: m,
2419
2430
  onOpenToggle: X.useCallback(() => m((P) => !P), [m]),
@@ -2425,8 +2436,8 @@ var St = "Dialog", [Ln, ec] = dr(St), [fi, ue] = Ln(St), En = (t) => {
2425
2436
  En.displayName = St;
2426
2437
  var Nn = "DialogTrigger", mi = X.forwardRef(
2427
2438
  (t, e) => {
2428
- const { __scopeDialog: n, ...r } = t, o = ue(Nn, n), i = Ct(e, o.triggerRef);
2429
- return /* @__PURE__ */ a(
2439
+ const { __scopeDialog: n, ...r } = t, o = pe(Nn, n), i = Ct(e, o.triggerRef);
2440
+ return /* @__PURE__ */ s(
2430
2441
  Ue.button,
2431
2442
  {
2432
2443
  type: "button",
@@ -2445,24 +2456,24 @@ mi.displayName = Nn;
2445
2456
  var It = "DialogPortal", [gi, On] = Ln(It, {
2446
2457
  forceMount: void 0
2447
2458
  }), Dn = (t) => {
2448
- const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, i = ue(It, e);
2449
- return /* @__PURE__ */ a(gi, { scope: e, forceMount: n, children: X.Children.map(r, (c) => /* @__PURE__ */ a(Pt, { present: n || i.open, children: /* @__PURE__ */ a(_r, { asChild: !0, container: o, children: c }) })) });
2459
+ const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, i = pe(It, e);
2460
+ return /* @__PURE__ */ s(gi, { scope: e, forceMount: n, children: X.Children.map(r, (c) => /* @__PURE__ */ s(Pt, { present: n || i.open, children: /* @__PURE__ */ s(_r, { asChild: !0, container: o, children: c }) })) });
2450
2461
  };
2451
2462
  Dn.displayName = It;
2452
2463
  var Qe = "DialogOverlay", An = X.forwardRef(
2453
2464
  (t, e) => {
2454
- const n = On(Qe, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = ue(Qe, t.__scopeDialog);
2455
- return i.modal ? /* @__PURE__ */ a(Pt, { present: r || i.open, children: /* @__PURE__ */ a(vi, { ...o, ref: e }) }) : null;
2465
+ const n = On(Qe, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = pe(Qe, t.__scopeDialog);
2466
+ return i.modal ? /* @__PURE__ */ s(Pt, { present: r || i.open, children: /* @__PURE__ */ s(vi, { ...o, ref: e }) }) : null;
2456
2467
  }
2457
2468
  );
2458
2469
  An.displayName = Qe;
2459
2470
  var vi = X.forwardRef(
2460
2471
  (t, e) => {
2461
- const { __scopeDialog: n, ...r } = t, o = ue(Qe, n);
2472
+ const { __scopeDialog: n, ...r } = t, o = pe(Qe, n);
2462
2473
  return (
2463
2474
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2464
2475
  // ie. when `Overlay` and `Content` are siblings
2465
- /* @__PURE__ */ a(mr, { as: ur, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ a(
2476
+ /* @__PURE__ */ s(mr, { as: ur, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ s(
2466
2477
  Ue.div,
2467
2478
  {
2468
2479
  "data-state": Lt(o.open),
@@ -2475,20 +2486,20 @@ var vi = X.forwardRef(
2475
2486
  }
2476
2487
  ), Le = "DialogContent", zn = X.forwardRef(
2477
2488
  (t, e) => {
2478
- const n = On(Le, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = ue(Le, t.__scopeDialog);
2479
- return /* @__PURE__ */ a(Pt, { present: r || i.open, children: i.modal ? /* @__PURE__ */ a(wi, { ...o, ref: e }) : /* @__PURE__ */ a(_i, { ...o, ref: e }) });
2489
+ const n = On(Le, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = pe(Le, t.__scopeDialog);
2490
+ return /* @__PURE__ */ s(Pt, { present: r || i.open, children: i.modal ? /* @__PURE__ */ s(wi, { ...o, ref: e }) : /* @__PURE__ */ s(_i, { ...o, ref: e }) });
2480
2491
  }
2481
2492
  );
2482
2493
  zn.displayName = Le;
2483
2494
  var wi = X.forwardRef(
2484
2495
  (t, e) => {
2485
- const n = ue(Le, t.__scopeDialog), r = X.useRef(null), o = Ct(e, n.contentRef, r);
2496
+ const n = pe(Le, t.__scopeDialog), r = X.useRef(null), o = Ct(e, n.contentRef, r);
2486
2497
  return X.useEffect(() => {
2487
2498
  const i = r.current;
2488
2499
  if (i)
2489
2500
  return gr(i);
2490
- }, []), /* @__PURE__ */ a(
2491
- Fn,
2501
+ }, []), /* @__PURE__ */ s(
2502
+ Mn,
2492
2503
  {
2493
2504
  ...t,
2494
2505
  ref: o,
@@ -2511,9 +2522,9 @@ var wi = X.forwardRef(
2511
2522
  }
2512
2523
  ), _i = X.forwardRef(
2513
2524
  (t, e) => {
2514
- const n = ue(Le, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
2515
- return /* @__PURE__ */ a(
2516
- Fn,
2525
+ const n = pe(Le, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
2526
+ return /* @__PURE__ */ s(
2527
+ Mn,
2517
2528
  {
2518
2529
  ...t,
2519
2530
  ref: e,
@@ -2532,11 +2543,11 @@ var wi = X.forwardRef(
2532
2543
  }
2533
2544
  );
2534
2545
  }
2535
- ), Fn = X.forwardRef(
2546
+ ), Mn = X.forwardRef(
2536
2547
  (t, e) => {
2537
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...c } = t, l = ue(Le, n), d = X.useRef(null), f = Ct(e, d);
2538
- return vr(), /* @__PURE__ */ H(pe, { children: [
2539
- /* @__PURE__ */ a(
2548
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...c } = t, l = pe(Le, n), d = X.useRef(null), f = Ct(e, d);
2549
+ return vr(), /* @__PURE__ */ H(he, { children: [
2550
+ /* @__PURE__ */ s(
2540
2551
  wr,
2541
2552
  {
2542
2553
  asChild: !0,
@@ -2544,7 +2555,7 @@ var wi = X.forwardRef(
2544
2555
  trapped: r,
2545
2556
  onMountAutoFocus: o,
2546
2557
  onUnmountAutoFocus: i,
2547
- children: /* @__PURE__ */ a(
2558
+ children: /* @__PURE__ */ s(
2548
2559
  fr,
2549
2560
  {
2550
2561
  role: "dialog",
@@ -2559,30 +2570,30 @@ var wi = X.forwardRef(
2559
2570
  )
2560
2571
  }
2561
2572
  ),
2562
- /* @__PURE__ */ H(pe, { children: [
2563
- /* @__PURE__ */ a(Ti, { titleId: l.titleId }),
2564
- /* @__PURE__ */ a(Pi, { contentRef: d, descriptionId: l.descriptionId })
2573
+ /* @__PURE__ */ H(he, { children: [
2574
+ /* @__PURE__ */ s(Ti, { titleId: l.titleId }),
2575
+ /* @__PURE__ */ s(Pi, { contentRef: d, descriptionId: l.descriptionId })
2565
2576
  ] })
2566
2577
  ] });
2567
2578
  }
2568
- ), Rt = "DialogTitle", Mn = X.forwardRef(
2579
+ ), Rt = "DialogTitle", Fn = X.forwardRef(
2569
2580
  (t, e) => {
2570
- const { __scopeDialog: n, ...r } = t, o = ue(Rt, n);
2571
- return /* @__PURE__ */ a(Ue.h2, { id: o.titleId, ...r, ref: e });
2581
+ const { __scopeDialog: n, ...r } = t, o = pe(Rt, n);
2582
+ return /* @__PURE__ */ s(Ue.h2, { id: o.titleId, ...r, ref: e });
2572
2583
  }
2573
2584
  );
2574
- Mn.displayName = Rt;
2585
+ Fn.displayName = Rt;
2575
2586
  var kn = "DialogDescription", bi = X.forwardRef(
2576
2587
  (t, e) => {
2577
- const { __scopeDialog: n, ...r } = t, o = ue(kn, n);
2578
- return /* @__PURE__ */ a(Ue.p, { id: o.descriptionId, ...r, ref: e });
2588
+ const { __scopeDialog: n, ...r } = t, o = pe(kn, n);
2589
+ return /* @__PURE__ */ s(Ue.p, { id: o.descriptionId, ...r, ref: e });
2579
2590
  }
2580
2591
  );
2581
2592
  bi.displayName = kn;
2582
2593
  var Wn = "DialogClose", Hn = X.forwardRef(
2583
2594
  (t, e) => {
2584
- const { __scopeDialog: n, ...r } = t, o = ue(Wn, n);
2585
- return /* @__PURE__ */ a(
2595
+ const { __scopeDialog: n, ...r } = t, o = pe(Wn, n);
2596
+ return /* @__PURE__ */ s(
2586
2597
  Ue.button,
2587
2598
  {
2588
2599
  type: "button",
@@ -2617,7 +2628,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
2617
2628
  const o = (i = t.current) == null ? void 0 : i.getAttribute("aria-describedby");
2618
2629
  e && o && (document.getElementById(e) || console.warn(r));
2619
2630
  }, [r, t, e]), null;
2620
- }, yi = En, xi = Dn, Si = An, Ii = zn, Ri = Mn, Li = Hn;
2631
+ }, yi = En, xi = Dn, Si = An, Ii = zn, Ri = Fn, Li = Hn;
2621
2632
  const Ie = {
2622
2633
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2623
2634
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
@@ -2627,7 +2638,7 @@ const Ie = {
2627
2638
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2628
2639
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2629
2640
  }, Ei = () => {
2630
- const { pdfProperties: t } = oe(), { container: e } = _e(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = yo(), { localeMessages: o } = he(), i = M(() => {
2641
+ const { pdfProperties: t } = oe(), { container: e } = be(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = yo(), { localeMessages: o } = fe(), i = F(() => {
2631
2642
  if (!t)
2632
2643
  return [];
2633
2644
  const {
@@ -2637,7 +2648,7 @@ const Ie = {
2637
2648
  author: f,
2638
2649
  subject: m,
2639
2650
  createdOn: P,
2640
- creator: h,
2651
+ creator: p,
2641
2652
  keywords: T,
2642
2653
  modifiedOn: C,
2643
2654
  pdfProducer: b,
@@ -2652,14 +2663,14 @@ const Ie = {
2652
2663
  { label: o == null ? void 0 : o.propertiesAuthorLabel, value: f },
2653
2664
  { label: o == null ? void 0 : o.propertiesSubjectLabel, value: m },
2654
2665
  { label: o == null ? void 0 : o.propertiesKeywordLabel, value: T },
2655
- { label: o == null ? void 0 : o.propertiesCreatorLabel, value: h },
2666
+ { label: o == null ? void 0 : o.propertiesCreatorLabel, value: p },
2656
2667
  {
2657
2668
  label: o == null ? void 0 : o.propertiesCreateOnLabel,
2658
- value: P ? Ft(P) : ""
2669
+ value: P ? Mt(P) : ""
2659
2670
  },
2660
2671
  {
2661
2672
  label: o == null ? void 0 : o.propertiesModifiedOnLabel,
2662
- value: C ? Ft(C) : ""
2673
+ value: C ? Mt(C) : ""
2663
2674
  },
2664
2675
  { separate: !0 },
2665
2676
  { label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: b },
@@ -2667,12 +2678,12 @@ const Ie = {
2667
2678
  { label: o == null ? void 0 : o.propertiesPageCountLabel, value: y }
2668
2679
  ];
2669
2680
  }, [t, o]);
2670
- return /* @__PURE__ */ a(yi, { open: n, onOpenChange: r, children: /* @__PURE__ */ a(xi, { container: e, children: /* @__PURE__ */ H("div", { className: Ie["rp-dialog-wrapper"], children: [
2671
- /* @__PURE__ */ a(Si, { className: Ie["rp-dialog-overlay"] }),
2681
+ return /* @__PURE__ */ s(yi, { open: n, onOpenChange: r, children: /* @__PURE__ */ s(xi, { container: e, children: /* @__PURE__ */ H("div", { className: Ie["rp-dialog-wrapper"], children: [
2682
+ /* @__PURE__ */ s(Si, { className: Ie["rp-dialog-overlay"] }),
2672
2683
  /* @__PURE__ */ H(Ii, { className: Ie["rp-document-dialog"], children: [
2673
- /* @__PURE__ */ a(Ri, { className: Ie["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
2674
- /* @__PURE__ */ a("div", { className: Ie["rp-document-properties"], children: i.map((c, l) => /* @__PURE__ */ a("div", { children: c.separate ? /* @__PURE__ */ a("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ a(zo, { label: c.label, value: c.value }) }, l)) }),
2675
- /* @__PURE__ */ a(Li, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ a(br, {}) })
2684
+ /* @__PURE__ */ s(Ri, { className: Ie["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
2685
+ /* @__PURE__ */ s("div", { className: Ie["rp-document-properties"], children: i.map((c, l) => /* @__PURE__ */ s("div", { children: c.separate ? /* @__PURE__ */ s("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ s(zo, { label: c.label, value: c.value }) }, l)) }),
2686
+ /* @__PURE__ */ s(Li, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ s(br, {}) })
2676
2687
  ] })
2677
2688
  ] }) }) });
2678
2689
  }, Ni = {
@@ -2685,30 +2696,30 @@ const Ie = {
2685
2696
  const c = n || i;
2686
2697
  return c.endsWith(Jt) ? c : `${c}${Jt}`;
2687
2698
  };
2688
- return { download: E(async () => {
2699
+ return { download: O(async () => {
2689
2700
  if (!t || !e)
2690
2701
  throw new Error("There is no PDF source to download");
2691
2702
  const i = document.createElement("a");
2692
2703
  i.href = await Di(e), i.download = r(t), document.body.appendChild(i), i.click(), document.body.removeChild(i);
2693
2704
  }, [t, e]) };
2694
2705
  }, Un = () => {
2695
- const { downloadIcon: t } = Ce(), { downloadIcon: e } = be();
2696
- return t || e || /* @__PURE__ */ a(xr, {});
2697
- }, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ai = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Vn, { localeMessages: e, children: /* @__PURE__ */ a(ge, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ a(Un, {}) }) }), zi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Xe, { onClick: t, children: /* @__PURE__ */ H(Vn, { className: "rp-menu-item", localeMessages: e, children: [
2698
- /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Un, {}) }),
2706
+ const { downloadIcon: t } = Pe(), { downloadIcon: e } = Te();
2707
+ return t || e || /* @__PURE__ */ s(xr, {});
2708
+ }, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ s(Q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ai = ({ download: t, localeMessages: e }) => /* @__PURE__ */ s(Vn, { localeMessages: e, children: /* @__PURE__ */ s(we, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ s(Un, {}) }) }), zi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ s(Xe, { onClick: t, children: /* @__PURE__ */ H(Vn, { className: "rp-menu-item", localeMessages: e, children: [
2709
+ /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Un, {}) }),
2699
2710
  e == null ? void 0 : e.downloadFileLabel
2700
2711
  ] }) }), Bn = () => {
2701
- const { download: t } = Gn(), { downloadTool: e = !0 } = Te(), { downloadTool: n = !0 } = Ne(), { isSmallScreen: r } = Oe(), { localeMessages: o } = he(), i = o == null ? void 0 : o.downloadFileTooltip;
2702
- return !e || !n ? null : r ? /* @__PURE__ */ a(zi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ a(Q, { content: i, children: /* @__PURE__ */ a(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ a(Q, { content: i, children: /* @__PURE__ */ a(n, { download: t }) }) : /* @__PURE__ */ a(Ai, { download: t, localeMessages: o });
2712
+ const { download: t } = Gn(), { downloadTool: e = !0 } = Ce(), { downloadTool: n = !0 } = Ne(), { isSmallScreen: r } = Oe(), { localeMessages: o } = fe(), i = o == null ? void 0 : o.downloadFileTooltip;
2713
+ return !e || !n ? null : r ? /* @__PURE__ */ s(zi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ s(Q, { content: i, children: /* @__PURE__ */ s(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ s(Q, { content: i, children: /* @__PURE__ */ s(n, { download: t }) }) : /* @__PURE__ */ s(Ai, { download: t, localeMessages: o });
2703
2714
  }, jn = () => {
2704
- const { printIcon: t } = Ce(), { printIcon: e } = be();
2705
- return t || e || /* @__PURE__ */ a(Sr, {});
2706
- }, Kn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Fi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(Kn, { localeMessages: e, children: /* @__PURE__ */ a(ge, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ a(jn, {}) }) }), Mi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(Xe, { onClick: t, children: /* @__PURE__ */ H(Kn, { className: "rp-menu-item", localeMessages: e, children: [
2707
- /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(jn, {}) }),
2715
+ const { printIcon: t } = Pe(), { printIcon: e } = Te();
2716
+ return t || e || /* @__PURE__ */ s(Sr, {});
2717
+ }, Kn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ s(Q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Mi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ s(Kn, { localeMessages: e, children: /* @__PURE__ */ s(we, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ s(jn, {}) }) }), Fi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ s(Xe, { onClick: t, children: /* @__PURE__ */ H(Kn, { className: "rp-menu-item", localeMessages: e, children: [
2718
+ /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(jn, {}) }),
2708
2719
  e == null ? void 0 : e.printLabel
2709
2720
  ] }) }), Zn = () => {
2710
- const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: i } = tt(), { printTool: c = !0 } = Te(), { printTool: l = !0 } = Ne(), { isSmallScreen: d } = Oe(), { localeMessages: f } = he(), m = f == null ? void 0 : f.printTooltip;
2711
- return !c || !l ? null : d ? /* @__PURE__ */ a(Mi, { print: t, localeMessages: f }) : typeof c == "function" ? /* @__PURE__ */ a(Q, { content: m, children: /* @__PURE__ */ a(
2721
+ const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: i } = tt(), { printTool: c = !0 } = Ce(), { printTool: l = !0 } = Ne(), { isSmallScreen: d } = Oe(), { localeMessages: f } = fe(), m = f == null ? void 0 : f.printTooltip;
2722
+ return !c || !l ? null : d ? /* @__PURE__ */ s(Fi, { print: t, localeMessages: f }) : typeof c == "function" ? /* @__PURE__ */ s(Q, { content: m, children: /* @__PURE__ */ s(
2712
2723
  c,
2713
2724
  {
2714
2725
  print: t,
@@ -2718,7 +2729,7 @@ const Ie = {
2718
2729
  setOnComplete: r,
2719
2730
  progress: i
2720
2731
  }
2721
- ) }) : typeof l == "function" ? /* @__PURE__ */ a(Q, { content: m, children: /* @__PURE__ */ a(
2732
+ ) }) : typeof l == "function" ? /* @__PURE__ */ s(Q, { content: m, children: /* @__PURE__ */ s(
2722
2733
  l,
2723
2734
  {
2724
2735
  print: t,
@@ -2728,34 +2739,34 @@ const Ie = {
2728
2739
  setOnComplete: r,
2729
2740
  progress: i
2730
2741
  }
2731
- ) }) : /* @__PURE__ */ a(Fi, { print: t, localeMessages: f });
2742
+ ) }) : /* @__PURE__ */ s(Mi, { print: t, localeMessages: f });
2732
2743
  }, ki = {
2733
2744
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2734
2745
  }, Wi = () => {
2735
- const { goToFirstPageIcon: t } = Ce(), { goToFirstPageIcon: e } = be();
2736
- return t || e || /* @__PURE__ */ a(mn, { className: ki["rp-go-to-Top"] });
2746
+ const { goToFirstPageIcon: t } = Pe(), { goToFirstPageIcon: e } = Te();
2747
+ return t || e || /* @__PURE__ */ s(mn, { className: ki["rp-go-to-Top"] });
2737
2748
  }, Hi = () => {
2738
- const { goToLastPageIcon: t } = Ce(), { goToLastPageIcon: e } = be();
2739
- return t || e || /* @__PURE__ */ a(mn, {});
2749
+ const { goToLastPageIcon: t } = Pe(), { goToLastPageIcon: e } = Te();
2750
+ return t || e || /* @__PURE__ */ s(mn, {});
2740
2751
  }, en = { width: "100%" }, $i = () => {
2741
- const { goToPage: t, totalPages: e, focusedPage: n } = le(), { jumpNavigationTool: r = !0 } = Te(), { jumpNavigationTool: o = !0 } = Ne(), { localeMessages: i } = he(), c = M(() => n === 1, [n]), l = M(() => n === e, [n, e]), d = E(() => {
2752
+ const { goToPage: t, totalPages: e, focusedPage: n } = de(), { jumpNavigationTool: r = !0 } = Ce(), { jumpNavigationTool: o = !0 } = Ne(), { localeMessages: i } = fe(), c = F(() => n === 1, [n]), l = F(() => n === e, [n, e]), d = O(() => {
2742
2753
  t(1);
2743
- }, [t]), f = E(() => {
2754
+ }, [t]), f = O(() => {
2744
2755
  t(e);
2745
2756
  }, [t, e]);
2746
2757
  return !r || !o ? null : /* @__PURE__ */ H(hn, { children: [
2747
- /* @__PURE__ */ a(Xe, { onClick: d, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.firstPageTooltip, style: en, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2748
- /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Wi, {}) }),
2749
- /* @__PURE__ */ a("span", { children: i == null ? void 0 : i.firstPageLabel })
2758
+ /* @__PURE__ */ s(Xe, { onClick: d, children: /* @__PURE__ */ s(Q, { content: i == null ? void 0 : i.firstPageTooltip, style: en, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2759
+ /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Wi, {}) }),
2760
+ /* @__PURE__ */ s("span", { children: i == null ? void 0 : i.firstPageLabel })
2750
2761
  ] }) }) }),
2751
- /* @__PURE__ */ a(Xe, { onClick: f, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.lastPageTooltip, style: en, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": l, children: [
2752
- /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Hi, {}) }),
2753
- /* @__PURE__ */ a("span", { children: i == null ? void 0 : i.lastPageLabel })
2762
+ /* @__PURE__ */ s(Xe, { onClick: f, children: /* @__PURE__ */ s(Q, { content: i == null ? void 0 : i.lastPageTooltip, style: en, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": l, children: [
2763
+ /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Hi, {}) }),
2764
+ /* @__PURE__ */ s("span", { children: i == null ? void 0 : i.lastPageLabel })
2754
2765
  ] }) }) }),
2755
- /* @__PURE__ */ a(un, {})
2766
+ /* @__PURE__ */ s(un, {})
2756
2767
  ] });
2757
2768
  }, qi = () => {
2758
- const [t, e] = q(!1), { container: n, pagesRef: r } = _e(), { isSmallScreen: o } = Oe(), {
2769
+ const [t, e] = $(!1), { container: n, pagesRef: r } = be(), { isSmallScreen: o } = Oe(), {
2759
2770
  openFileTool: i,
2760
2771
  downloadTool: c,
2761
2772
  documentProperties: l,
@@ -2763,28 +2774,28 @@ const Ie = {
2763
2774
  rotateTool: f,
2764
2775
  selectionModeTool: m,
2765
2776
  jumpNavigationTool: P,
2766
- printTool: h,
2777
+ printTool: p,
2767
2778
  fullscreenTool: T,
2768
2779
  viewModeTool: C
2769
- } = Te(), {
2780
+ } = Ce(), {
2770
2781
  openFileTool: b,
2771
2782
  downloadTool: v,
2772
2783
  documentProperties: y,
2773
2784
  scrollModeTool: g,
2774
- rotateTool: p,
2785
+ rotateTool: h,
2775
2786
  selectionModeTool: u,
2776
- jumpNavigationTool: s,
2777
- printTool: _,
2778
- fullscreenTool: w,
2787
+ jumpNavigationTool: a,
2788
+ printTool: w,
2789
+ fullscreenTool: _,
2779
2790
  viewModeTool: x
2780
- } = Ne(), { localeMessages: I } = he(), [S, R] = q(0), N = W(
2781
- new ResizeObserver((L) => {
2782
- R(L[0].contentRect.height);
2791
+ } = Ne(), { localeMessages: I } = fe(), [S, R] = $(0), N = k(
2792
+ new ResizeObserver((D) => {
2793
+ R(D[0].contentRect.height);
2783
2794
  })
2784
- ), A = M(() => P || f || m || d || l || C || o && (i || c || h || T), [
2795
+ ), z = F(() => P || f || m || d || l || C || o && (i || c || p || T), [
2785
2796
  i,
2786
2797
  c,
2787
- h,
2798
+ p,
2788
2799
  T,
2789
2800
  l,
2790
2801
  d,
@@ -2792,27 +2803,27 @@ const Ie = {
2792
2803
  m,
2793
2804
  P,
2794
2805
  o
2795
- ]), z = M(() => s || p || u || g || y || x || o && (b || v || _ || w), [
2806
+ ]), M = F(() => a || h || u || g || y || x || o && (b || v || w || _), [
2796
2807
  b,
2797
2808
  v,
2798
- _,
2799
2809
  w,
2810
+ _,
2800
2811
  y,
2801
2812
  g,
2802
- p,
2813
+ h,
2803
2814
  u,
2804
- s,
2815
+ a,
2805
2816
  o
2806
2817
  ]);
2807
- return D(() => (r && N.current.observe(r), () => {
2818
+ return A(() => (r && N.current.observe(r), () => {
2808
2819
  N.current.disconnect();
2809
- }), [r]), !A || !z ? null : /* @__PURE__ */ H(pe, { children: [
2810
- /* @__PURE__ */ a(
2820
+ }), [r]), !z || !M ? null : /* @__PURE__ */ H(he, { children: [
2821
+ /* @__PURE__ */ s(
2811
2822
  dn,
2812
2823
  {
2813
2824
  container: n,
2814
2825
  onOpenChange: e,
2815
- triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(Q, { content: I == null ? void 0 : I.moreOptionTooltip, children: /* @__PURE__ */ a(ge, { active: t, "aria-label": I == null ? void 0 : I.moreOptionTooltip, children: /* @__PURE__ */ a(lr, {}) }) }) }),
2826
+ triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(Q, { content: I == null ? void 0 : I.moreOptionTooltip, children: /* @__PURE__ */ s(we, { active: t, "aria-label": I == null ? void 0 : I.moreOptionTooltip, children: /* @__PURE__ */ s(lr, {}) }) }) }),
2816
2827
  side: "bottom",
2817
2828
  avoidCollisions: !1,
2818
2829
  children: /* @__PURE__ */ H(
@@ -2823,46 +2834,46 @@ const Ie = {
2823
2834
  "data-rp": "moreOptionsDropdown",
2824
2835
  children: [
2825
2836
  o && /* @__PURE__ */ H(hn, { children: [
2826
- /* @__PURE__ */ a(pn, {}),
2827
- /* @__PURE__ */ a(Bn, {}),
2828
- /* @__PURE__ */ a(Zn, {}),
2829
- /* @__PURE__ */ a(fn, {}),
2830
- /* @__PURE__ */ a(un, {})
2837
+ /* @__PURE__ */ s(pn, {}),
2838
+ /* @__PURE__ */ s(Bn, {}),
2839
+ /* @__PURE__ */ s(Zn, {}),
2840
+ /* @__PURE__ */ s(fn, {}),
2841
+ /* @__PURE__ */ s(un, {})
2831
2842
  ] }),
2832
- /* @__PURE__ */ a($i, {}),
2833
- /* @__PURE__ */ a(Cr, {}),
2834
- /* @__PURE__ */ a(Ir, {}),
2835
- /* @__PURE__ */ a(Pr, {}),
2836
- /* @__PURE__ */ a(yr, {}),
2837
- /* @__PURE__ */ a(Tr, {})
2843
+ /* @__PURE__ */ s($i, {}),
2844
+ /* @__PURE__ */ s(Cr, {}),
2845
+ /* @__PURE__ */ s(Ir, {}),
2846
+ /* @__PURE__ */ s(Pr, {}),
2847
+ /* @__PURE__ */ s(yr, {}),
2848
+ /* @__PURE__ */ s(Tr, {})
2838
2849
  ]
2839
2850
  }
2840
2851
  )
2841
2852
  }
2842
2853
  ),
2843
- /* @__PURE__ */ a(Ei, {})
2854
+ /* @__PURE__ */ s(Ei, {})
2844
2855
  ] });
2845
2856
  }, Gi = () => {
2846
2857
  const { isSmallScreen: t } = Oe();
2847
- return /* @__PURE__ */ H(pe, { children: [
2848
- /* @__PURE__ */ a(cr, {}),
2849
- !t && /* @__PURE__ */ H(pe, { children: [
2850
- /* @__PURE__ */ a(pn, {}),
2851
- /* @__PURE__ */ a(Bn, {}),
2852
- /* @__PURE__ */ a(Zn, {}),
2853
- /* @__PURE__ */ a(fn, {})
2858
+ return /* @__PURE__ */ H(he, { children: [
2859
+ /* @__PURE__ */ s(cr, {}),
2860
+ !t && /* @__PURE__ */ H(he, { children: [
2861
+ /* @__PURE__ */ s(pn, {}),
2862
+ /* @__PURE__ */ s(Bn, {}),
2863
+ /* @__PURE__ */ s(Zn, {}),
2864
+ /* @__PURE__ */ s(fn, {})
2854
2865
  ] }),
2855
- /* @__PURE__ */ a(qi, {})
2866
+ /* @__PURE__ */ s(qi, {})
2856
2867
  ] });
2857
2868
  }, tn = () => {
2858
- const { totalMatches: t, nextMatch: e, prevMatch: n } = yt(), { localeMessages: r } = he();
2859
- return /* @__PURE__ */ H(pe, { children: [
2860
- /* @__PURE__ */ a(
2869
+ const { totalMatches: t, nextMatch: e, prevMatch: n } = yt(), { localeMessages: r } = fe();
2870
+ return /* @__PURE__ */ H(he, { children: [
2871
+ /* @__PURE__ */ s(
2861
2872
  Q,
2862
2873
  {
2863
2874
  content: r == null ? void 0 : r.searchPrevTooltip,
2864
2875
  className: te["rp-search-tool-result-navigator"],
2865
- children: /* @__PURE__ */ a(ge, { tabIndex: 0, onClick: n, "aria-label": r == null ? void 0 : r.searchPrevTooltip, children: /* @__PURE__ */ a(
2876
+ children: /* @__PURE__ */ s(we, { tabIndex: 0, onClick: n, "aria-label": r == null ? void 0 : r.searchPrevTooltip, children: /* @__PURE__ */ s(
2866
2877
  Ze,
2867
2878
  {
2868
2879
  className: te["rp-search-tool-input-icon"],
@@ -2871,12 +2882,12 @@ const Ie = {
2871
2882
  ) })
2872
2883
  }
2873
2884
  ),
2874
- /* @__PURE__ */ a(
2885
+ /* @__PURE__ */ s(
2875
2886
  Q,
2876
2887
  {
2877
2888
  content: r == null ? void 0 : r.searchNextTooltip,
2878
2889
  className: te["rp-search-tool-result-navigator"],
2879
- children: /* @__PURE__ */ a(ge, { tabIndex: 0, onClick: e, "aria-label": r == null ? void 0 : r.searchNextTooltip, children: /* @__PURE__ */ a(
2890
+ children: /* @__PURE__ */ s(we, { tabIndex: 0, onClick: e, "aria-label": r == null ? void 0 : r.searchNextTooltip, children: /* @__PURE__ */ s(
2880
2891
  Ze,
2881
2892
  {
2882
2893
  style: { transform: "rotate(180deg" },
@@ -2888,93 +2899,93 @@ const Ie = {
2888
2899
  )
2889
2900
  ] });
2890
2901
  }, Ui = () => {
2891
- const { searchIcon: t } = Ce(), { searchIcon: e } = be();
2892
- return t || e || /* @__PURE__ */ a(gn, {});
2902
+ const { searchIcon: t } = Pe(), { searchIcon: e } = Te();
2903
+ return t || e || /* @__PURE__ */ s(gn, {});
2893
2904
  }, Vi = ({ icon: t }) => {
2894
- const { container: e } = _e(), [n, r] = q(!1), { pdf: o } = oe(), [i, c] = q(null), {
2905
+ const { container: e } = be(), [n, r] = $(!1), { pdf: o } = oe(), [i, c] = $(null), {
2895
2906
  searchOptions: l,
2896
2907
  setSearchOptions: d,
2897
2908
  loading: f,
2898
2909
  setSearch: m,
2899
2910
  totalMatches: P,
2900
- currentMatchPosition: h,
2911
+ currentMatchPosition: p,
2901
2912
  nextMatch: T,
2902
2913
  prevMatch: C,
2903
2914
  search: b
2904
- } = yt(), { searchTool: v = !0 } = Te(), { searchTool: y = !0 } = Ne(), [g, p] = q(b), { localeMessages: u } = he(), { isSmallScreen: s } = Oe(), [_, w] = q(null), [x, I] = q(!1), S = E(() => {
2915
+ } = yt(), { searchTool: v = !0 } = Ce(), { searchTool: y = !0 } = Ne(), [g, h] = $(b), { localeMessages: u } = fe(), { isSmallScreen: a } = Oe(), [w, _] = $(null), [x, I] = $(!1), S = O(() => {
2905
2916
  r(!0);
2906
- }, []), R = E(() => {
2907
- m(""), p(""), r(!1);
2917
+ }, []), R = O(() => {
2918
+ m(""), h(""), r(!1);
2908
2919
  }, [m]), N = (G) => {
2909
- const K = G.key === "Enter", Y = G.key === " ";
2910
- (K || Y) && R();
2911
- }, A = E(
2920
+ const Z = G.key === "Enter", Y = G.key === " ";
2921
+ (Z || Y) && R();
2922
+ }, z = O(
2912
2923
  (G) => {
2913
2924
  G.key === "Escape" && n && R();
2914
2925
  },
2915
2926
  [n]
2916
- ), z = E(
2927
+ ), M = O(
2917
2928
  (G) => {
2918
2929
  G.shiftKey && G.key === "Enter" ? C() : G.key === "Enter" && b !== g ? m(g) : G.key === "Enter" && T();
2919
2930
  },
2920
2931
  [g, C, T, m, b]
2921
2932
  );
2922
- D(() => {
2923
- p(b);
2924
- }, [b]), D(() => {
2933
+ A(() => {
2934
+ h(b);
2935
+ }, [b]), A(() => {
2925
2936
  b && o && I(!0);
2926
- }, [b, o]), D(() => {
2927
- b && b.trim() !== "" && (p(b), m(b));
2928
- }, []), D(() => (window.addEventListener("keydown", A), () => {
2929
- window.removeEventListener("keydown", A);
2930
- }), [A]), D(() => {
2937
+ }, [b, o]), A(() => {
2938
+ b && b.trim() !== "" && (h(b), m(b));
2939
+ }, []), A(() => (window.addEventListener("keydown", z), () => {
2940
+ window.removeEventListener("keydown", z);
2941
+ }), [z]), A(() => {
2931
2942
  i && setTimeout(() => {
2932
2943
  i.focus();
2933
2944
  }, 0);
2934
2945
  }, [i]);
2935
- const L = E((G) => {
2936
- p(G.target.value);
2937
- }, []), O = E(() => {
2938
- p(""), m("");
2939
- }, [m]), F = M(() => `${h} / ${P}`, [h, P]), { wholeWords: $, matchCase: k } = M(() => l, [l]), B = E(
2946
+ const D = O((G) => {
2947
+ h(G.target.value);
2948
+ }, []), L = O(() => {
2949
+ h(""), m("");
2950
+ }, [m]), E = F(() => `${p} / ${P}`, [p, P]), { wholeWords: q, matchCase: W } = F(() => l, [l]), U = O(
2940
2951
  (G) => {
2941
- d((K) => ({ ...K, matchCase: G }));
2952
+ d((Z) => ({ ...Z, matchCase: G }));
2942
2953
  },
2943
2954
  [d]
2944
- ), Z = E(
2955
+ ), j = O(
2945
2956
  (G) => {
2946
- d((K) => ({ ...K, wholeWords: G }));
2957
+ d((Z) => ({ ...Z, wholeWords: G }));
2947
2958
  },
2948
2959
  [d]
2949
2960
  );
2950
- D(() => {
2961
+ A(() => {
2951
2962
  o && x && R();
2952
2963
  }, [o, R]);
2953
- const U = M(() => (_ == null ? void 0 : _.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [_]), ie = E(
2964
+ const V = F(() => (w == null ? void 0 : w.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [w]), ee = O(
2954
2965
  (G) => {
2955
2966
  if (G.key === "Tab") {
2956
- const K = document.activeElement;
2967
+ const Z = document.activeElement;
2957
2968
  let Y = 0;
2958
- U.forEach((re, ve) => {
2959
- re === K && (Y = ve);
2969
+ V.forEach((J, ue) => {
2970
+ J === Z && (Y = ue);
2960
2971
  });
2961
- let J = Y + 1;
2962
- G.shiftKey && (J = Y - 1);
2963
- const ee = U[J];
2964
- if (ee)
2965
- ee.focus();
2966
- else if (J > U.length - 1) {
2967
- const re = U[0];
2968
- re && re.focus();
2972
+ let re = Y + 1;
2973
+ G.shiftKey && (re = Y - 1);
2974
+ const se = V[re];
2975
+ if (se)
2976
+ se.focus();
2977
+ else if (re > V.length - 1) {
2978
+ const J = V[0];
2979
+ J && J.focus();
2969
2980
  } else {
2970
- const re = U[U.length - 1];
2971
- re && re.focus();
2981
+ const J = V[V.length - 1];
2982
+ J && J.focus();
2972
2983
  }
2973
2984
  }
2974
2985
  },
2975
- [U]
2986
+ [V]
2976
2987
  );
2977
- return !v || !y ? null : /* @__PURE__ */ a(pe, { children: /* @__PURE__ */ a(
2988
+ return !v || !y ? null : /* @__PURE__ */ s(he, { children: /* @__PURE__ */ s(
2978
2989
  dn,
2979
2990
  {
2980
2991
  open: n,
@@ -2983,73 +2994,73 @@ const Ie = {
2983
2994
  align: "start",
2984
2995
  tabIndex: 0,
2985
2996
  avoidCollisions: !1,
2986
- triggerComponent: /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchButtonTooltip, children: /* @__PURE__ */ a(
2987
- ge,
2997
+ triggerComponent: /* @__PURE__ */ s(Q, { content: u == null ? void 0 : u.searchButtonTooltip, children: /* @__PURE__ */ s(
2998
+ we,
2988
2999
  {
2989
3000
  active: n,
2990
3001
  onClick: S,
2991
3002
  "aria-label": u == null ? void 0 : u.searchButtonTooltip,
2992
- children: t || /* @__PURE__ */ a(Ui, {})
3003
+ children: t || /* @__PURE__ */ s(Ui, {})
2993
3004
  }
2994
3005
  ) }),
2995
3006
  children: /* @__PURE__ */ H(
2996
3007
  "div",
2997
3008
  {
2998
- ref: w,
3009
+ ref: _,
2999
3010
  className: te["rp-search-tool-content"],
3000
3011
  tabIndex: 0,
3001
- onKeyDown: ie,
3012
+ onKeyDown: ee,
3002
3013
  children: [
3003
3014
  /* @__PURE__ */ H("div", { className: te["rp-search-tool-input-wrapper"], children: [
3004
3015
  /* @__PURE__ */ H("div", { className: te["rp-search-tool-input"], children: [
3005
- /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchInputTooltip, children: /* @__PURE__ */ a(
3006
- an,
3016
+ /* @__PURE__ */ s(Q, { content: u == null ? void 0 : u.searchInputTooltip, children: /* @__PURE__ */ s(
3017
+ sn,
3007
3018
  {
3008
3019
  value: g,
3009
- onKeyDown: z,
3010
- onChange: L,
3011
- icon: /* @__PURE__ */ a(gn, {}),
3020
+ onKeyDown: M,
3021
+ onChange: D,
3022
+ icon: /* @__PURE__ */ s(gn, {}),
3012
3023
  placeholder: u == null ? void 0 : u.searchInputPlaceholder,
3013
3024
  className: te["rp-search-input"],
3014
3025
  ref: c,
3015
3026
  id: "search-input",
3016
3027
  name: "search-input",
3017
3028
  tabIndex: 0,
3018
- children: !!g && /* @__PURE__ */ a("span", { className: te["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ a(Lr, {}) })
3029
+ children: !!g && /* @__PURE__ */ s("span", { className: te["rp-search-tool-input-clear"], onClick: L, children: /* @__PURE__ */ s(Lr, {}) })
3019
3030
  }
3020
3031
  ) }),
3021
- f ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(ln, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ a("span", { children: F }),
3022
- s && /* @__PURE__ */ a("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ a(At, { onKeyPress: N, handleClose: R }) })
3032
+ f ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(ln, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ s("span", { children: E }),
3033
+ a && /* @__PURE__ */ s("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ s(At, { onKeyPress: N, handleClose: R }) })
3023
3034
  ] }),
3024
3035
  /* @__PURE__ */ H("div", { className: te["rp-search-tool-input-checkboxes"], children: [
3025
- s && /* @__PURE__ */ a(tn, {}),
3026
- /* @__PURE__ */ a(
3036
+ a && /* @__PURE__ */ s(tn, {}),
3037
+ /* @__PURE__ */ s(
3027
3038
  zt,
3028
3039
  {
3029
3040
  tabIndex: 0,
3030
3041
  name: "matchCase",
3031
- value: k,
3032
- onChange: B,
3042
+ value: W,
3043
+ onChange: U,
3033
3044
  children: u == null ? void 0 : u.searchMatchCaseLabel
3034
3045
  }
3035
3046
  ),
3036
- !s && /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ a("div", { className: te["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ a(Wt, {}) }) }),
3037
- /* @__PURE__ */ a(
3047
+ !a && /* @__PURE__ */ s(Q, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ s("div", { className: te["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ s(Wt, {}) }) }),
3048
+ /* @__PURE__ */ s(
3038
3049
  zt,
3039
3050
  {
3040
3051
  tabIndex: 0,
3041
3052
  name: "wholeWord",
3042
- value: $,
3043
- onChange: Z,
3053
+ value: q,
3054
+ onChange: j,
3044
3055
  children: u == null ? void 0 : u.searchWholeWordsLabel
3045
3056
  }
3046
3057
  ),
3047
- !s && /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ a("div", { tabIndex: 0, className: te["rp-search-icon-info"], children: /* @__PURE__ */ a(Wt, {}) }) })
3058
+ !a && /* @__PURE__ */ s(Q, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ s("div", { tabIndex: 0, className: te["rp-search-icon-info"], children: /* @__PURE__ */ s(Wt, {}) }) })
3048
3059
  ] })
3049
3060
  ] }),
3050
- !s && /* @__PURE__ */ H("div", { className: te["rp-search-tool-controls"], children: [
3051
- /* @__PURE__ */ a(tn, {}),
3052
- /* @__PURE__ */ a(At, { onKeyPress: N, handleClose: R })
3061
+ !a && /* @__PURE__ */ H("div", { className: te["rp-search-tool-controls"], children: [
3062
+ /* @__PURE__ */ s(tn, {}),
3063
+ /* @__PURE__ */ s(At, { onKeyPress: N, handleClose: R })
3053
3064
  ] })
3054
3065
  ]
3055
3066
  }
@@ -3065,36 +3076,36 @@ const Ie = {
3065
3076
  "rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
3066
3077
  loading: Bi
3067
3078
  }, ji = ({ percentage: t }) => {
3068
- const { cancel: e } = tt(), { localeMessages: n } = he();
3069
- return t < 1 ? null : /* @__PURE__ */ a("div", { className: se(Ae["rp-loading-overlay"]), children: /* @__PURE__ */ H("div", { className: se(Ae["rp-loading-modal"]), children: [
3070
- /* @__PURE__ */ H("div", { className: se(Ae["rp-loading-title"]), children: [
3079
+ const { cancel: e } = tt(), { localeMessages: n } = fe();
3080
+ return t < 1 ? null : /* @__PURE__ */ s("div", { className: ce(Ae["rp-loading-overlay"]), children: /* @__PURE__ */ H("div", { className: ce(Ae["rp-loading-modal"]), children: [
3081
+ /* @__PURE__ */ H("div", { className: ce(Ae["rp-loading-title"]), children: [
3071
3082
  n == null ? void 0 : n.printLoadingMessage,
3072
3083
  "..."
3073
3084
  ] }),
3074
- /* @__PURE__ */ a("div", { className: se(Ae["rp-loading-progress-bar"]), children: /* @__PURE__ */ a(
3085
+ /* @__PURE__ */ s("div", { className: ce(Ae["rp-loading-progress-bar"]), children: /* @__PURE__ */ s(
3075
3086
  "div",
3076
3087
  {
3077
- className: se(Ae["rp-loading-progress"]),
3088
+ className: ce(Ae["rp-loading-progress"]),
3078
3089
  style: { width: `${t}%` }
3079
3090
  }
3080
3091
  ) }),
3081
- /* @__PURE__ */ a("button", { className: se(Ae["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3092
+ /* @__PURE__ */ s("button", { className: ce(Ae["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3082
3093
  ] }) });
3083
3094
  }, Ki = et((t, e) => {
3084
- const { showPrintProgress: n = !0 } = Te(), { showPrintProgress: r = !0 } = Ne(), { progress: o } = tt(), { isSmallScreen: i } = Oe(), { percentage: c } = o || {}, l = () => i ? { gridTemplateColumns: "25% 60% 15%" } : void 0, d = () => {
3095
+ const { showPrintProgress: n = !0 } = Ce(), { showPrintProgress: r = !0 } = Ne(), { progress: o } = tt(), { isSmallScreen: i } = Oe(), { percentage: c } = o || {}, l = () => i ? { gridTemplateColumns: "25% 60% 15%" } : void 0, d = () => {
3085
3096
  if (!(!n || !r || !c))
3086
- return /* @__PURE__ */ a(ji, { percentage: c });
3097
+ return /* @__PURE__ */ s(ji, { percentage: c });
3087
3098
  };
3088
3099
  return /* @__PURE__ */ H("div", { children: [
3089
- /* @__PURE__ */ a("div", { "data-rp": "topBar", ref: e, className: ke["rp-toolbar-content"], children: /* @__PURE__ */ H("div", { className: ke["rp-toolbar-wrapper"], style: l(), children: [
3100
+ /* @__PURE__ */ s("div", { "data-rp": "topBar", ref: e, className: ke["rp-toolbar-content"], children: /* @__PURE__ */ H("div", { className: ke["rp-toolbar-wrapper"], style: l(), children: [
3090
3101
  /* @__PURE__ */ H("div", { "data-rp": "topBarLeft", className: ke["rp-toolbar-start"], children: [
3091
- /* @__PURE__ */ a(Vi, {}),
3092
- /* @__PURE__ */ a(hi, {})
3102
+ /* @__PURE__ */ s(Vi, {}),
3103
+ /* @__PURE__ */ s(hi, {})
3093
3104
  ] }),
3094
- /* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: ke["rp-toolbar-middle"], children: /* @__PURE__ */ a(Rr, {}) }),
3095
- /* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: ke["rp-toolbar-end"], children: /* @__PURE__ */ a(Gi, {}) })
3105
+ /* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className: ke["rp-toolbar-middle"], children: /* @__PURE__ */ s(Rr, {}) }),
3106
+ /* @__PURE__ */ s("div", { "data-rp": "topBarRight", className: ke["rp-toolbar-end"], children: /* @__PURE__ */ s(Gi, {}) })
3096
3107
  ] }) }),
3097
- /* @__PURE__ */ a(d, {})
3108
+ /* @__PURE__ */ s(d, {})
3098
3109
  ] });
3099
3110
  }), ht = {
3100
3111
  "rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1bqgz_1",
@@ -3107,26 +3118,26 @@ const Ie = {
3107
3118
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
3108
3119
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
3109
3120
  }, Zi = (t) => {
3110
- const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = le(), { pageRotate: i } = Je(), c = W(null), l = yn(), { pages: d } = oe(), [f, m] = q(null), P = W(!1), h = W(), T = M(() => n ? We["rp-thumbnail-active"] : "", [n]), C = M(() => ({
3121
+ const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = de(), { pageRotate: i } = Je(), c = k(null), l = yn(), { pages: d } = oe(), [f, m] = $(null), P = k(!1), p = k(), T = F(() => n ? We["rp-thumbnail-active"] : "", [n]), C = F(() => ({
3111
3122
  width: Math.round(r.width),
3112
3123
  height: Math.round(r.height)
3113
- }), [r]), b = E(() => {
3124
+ }), [r]), b = O(() => {
3114
3125
  e && o(e);
3115
3126
  }, [o, e]);
3116
- return D(() => {
3127
+ return A(() => {
3117
3128
  const v = d.get(e);
3118
- h.current === v || (m(null), h.current = v);
3119
- }, [d, e]), D(() => {
3129
+ p.current === v || (m(null), p.current = v);
3130
+ }, [d, e]), A(() => {
3120
3131
  const v = d.get(e);
3121
3132
  if (!c.current || !e || !v || f)
3122
3133
  return;
3123
3134
  const y = new IntersectionObserver((g) => {
3124
- g.forEach((p) => {
3135
+ g.forEach((h) => {
3125
3136
  if (P.current) {
3126
3137
  P.current = !1, l.removeQueue(`thumbnail-${e}`);
3127
3138
  return;
3128
3139
  }
3129
- if (p.isIntersecting) {
3140
+ if (h.isIntersecting) {
3130
3141
  const u = document.createElement("canvas");
3131
3142
  P.current = !0, l.enqueue(
3132
3143
  `thumbnail-${e}`,
@@ -3137,11 +3148,11 @@ const Ie = {
3137
3148
  scale: 1
3138
3149
  },
3139
3150
  onLoaded: () => {
3140
- u.toBlob((s) => {
3141
- if (!s)
3151
+ u.toBlob((a) => {
3152
+ if (!a)
3142
3153
  return;
3143
- const _ = URL.createObjectURL(s);
3144
- m(_);
3154
+ const w = URL.createObjectURL(a);
3155
+ m(w);
3145
3156
  });
3146
3157
  }
3147
3158
  },
@@ -3161,14 +3172,14 @@ const Ie = {
3161
3172
  className: We["rp-thumbnail-wrapper"],
3162
3173
  ref: c,
3163
3174
  children: [
3164
- /* @__PURE__ */ a(
3175
+ /* @__PURE__ */ s(
3165
3176
  "div",
3166
3177
  {
3167
3178
  style: {
3168
3179
  transform: `rotate(${i[e || 0]}deg)`
3169
3180
  },
3170
- className: se(T, We["rp-thumbnail"]),
3171
- children: f ? /* @__PURE__ */ a(
3181
+ className: ce(T, We["rp-thumbnail"]),
3182
+ children: f ? /* @__PURE__ */ s(
3172
3183
  "img",
3173
3184
  {
3174
3185
  src: f,
@@ -3176,7 +3187,7 @@ const Ie = {
3176
3187
  height: C.height,
3177
3188
  alt: "thumbnail"
3178
3189
  }
3179
- ) : /* @__PURE__ */ a(
3190
+ ) : /* @__PURE__ */ s(
3180
3191
  "div",
3181
3192
  {
3182
3193
  className: We["rp-thumbnail-loader"],
@@ -3184,12 +3195,12 @@ const Ie = {
3184
3195
  width: `${C.width}px`,
3185
3196
  height: `${C.height}px`
3186
3197
  },
3187
- children: /* @__PURE__ */ a(ln, {})
3198
+ children: /* @__PURE__ */ s(ln, {})
3188
3199
  }
3189
3200
  )
3190
3201
  }
3191
3202
  ),
3192
- /* @__PURE__ */ a("div", { className: We["rp-thumbnail-text"], children: e })
3203
+ /* @__PURE__ */ s("div", { className: We["rp-thumbnail-text"], children: e })
3193
3204
  ]
3194
3205
  }
3195
3206
  );
@@ -3200,17 +3211,17 @@ const Ie = {
3200
3211
  const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
3201
3212
  t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Xi);
3202
3213
  }, Yi = et((t, e) => {
3203
- const { show: n, width: r } = t, { focusedPage: o, totalPages: i } = le(), { thumbnailPages: c, addPage: l, thumbnailLength: d, addToPage: f } = Tn(), m = W(null), P = W(1);
3214
+ const { show: n, width: r } = t, { focusedPage: o, totalPages: i } = de(), { thumbnailPages: c, addPage: l, thumbnailLength: d, addToPage: f } = Tn(), m = k(null), P = k(1);
3204
3215
  on(e, () => m.current);
3205
- const h = M(() => Object.values(c), [c]), T = E(() => {
3216
+ const p = F(() => Object.values(c), [c]), T = O(() => {
3206
3217
  const C = d + 1;
3207
3218
  C <= i && l(C);
3208
3219
  }, [l, i, d]);
3209
- return D(() => {
3220
+ return A(() => {
3210
3221
  o > d && i > d ? f(o) : n && P.current !== o && (Qi(m.current, o), P.current = o);
3211
- }, [o, d, f, n, h]), Fo(m.current, T), /* @__PURE__ */ a("div", { ref: m, className: nn["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ a("div", { className: nn["rp-thumbnails"], children: n ? h.map((C, b) => {
3222
+ }, [o, d, f, n, p]), Mo(m.current, T), /* @__PURE__ */ s("div", { ref: m, className: nn["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ s("div", { className: nn["rp-thumbnails"], children: n ? p.map((C, b) => {
3212
3223
  var v, y;
3213
- return /* @__PURE__ */ a(
3224
+ return /* @__PURE__ */ s(
3214
3225
  Zi,
3215
3226
  {
3216
3227
  isFocused: o === ((v = C.page) == null ? void 0 : v.pageNumber),
@@ -3223,28 +3234,28 @@ const Ie = {
3223
3234
  );
3224
3235
  }) : null }) });
3225
3236
  }), Ji = () => {
3226
- const { thumbnailIcon: t } = Ce(), { thumbnailIcon: e } = be();
3227
- return t || e || /* @__PURE__ */ a(xo, {});
3228
- }, ea = () => {
3229
- const { active: t, setActive: e } = Tn(), [n, r] = q(Mo), o = W(null), i = W(null), { thumbnailTool: c, sidebarEnable: l } = Te(), { localeMessages: d } = he(), f = E(() => {
3237
+ const { thumbnailIcon: t } = Pe(), { thumbnailIcon: e } = Te();
3238
+ return t || e || /* @__PURE__ */ s(xo, {});
3239
+ }, es = () => {
3240
+ const { active: t, setActive: e } = Tn(), [n, r] = $(Fo), o = k(null), i = k(null), { thumbnailTool: c, sidebarEnable: l } = Ce(), { localeMessages: d } = fe(), f = O(() => {
3230
3241
  e((P) => !P);
3231
- }, []), m = M(() => typeof c != "boolean" && c ? /* @__PURE__ */ a(c, { onClick: f, active: t }) : c ? /* @__PURE__ */ a(Q, { content: d == null ? void 0 : d.thumbnailTooltip, children: /* @__PURE__ */ a(
3232
- ge,
3242
+ }, []), m = F(() => typeof c != "boolean" && c ? /* @__PURE__ */ s(c, { onClick: f, active: t }) : c ? /* @__PURE__ */ s(Q, { content: d == null ? void 0 : d.thumbnailTooltip, children: /* @__PURE__ */ s(
3243
+ we,
3233
3244
  {
3234
3245
  onClick: f,
3235
3246
  active: t,
3236
3247
  "aria-label": d == null ? void 0 : d.thumbnailTooltip,
3237
- children: /* @__PURE__ */ a(Ji, {})
3248
+ children: /* @__PURE__ */ s(Ji, {})
3238
3249
  }
3239
3250
  ) }) : null, [c, t, f, d]);
3240
- return /* @__PURE__ */ a(pe, { children: l && /* @__PURE__ */ H(
3251
+ return /* @__PURE__ */ s(he, { children: l && /* @__PURE__ */ H(
3241
3252
  "div",
3242
3253
  {
3243
3254
  style: { "--rp-thumbnail-width": `${n}px` },
3244
3255
  className: ht["rp-sidebar-content-wrapper"],
3245
3256
  "data-rp": "sidebar",
3246
3257
  children: [
3247
- /* @__PURE__ */ a("div", { ref: i, className: ht["rp-sidebar-content"], children: m }),
3258
+ /* @__PURE__ */ s("div", { ref: i, className: ht["rp-sidebar-content"], children: m }),
3248
3259
  /* @__PURE__ */ H(
3249
3260
  "div",
3250
3261
  {
@@ -3252,8 +3263,8 @@ const Ie = {
3252
3263
  hidden: !t,
3253
3264
  className: ht["rp-thumbnails-wrapper"],
3254
3265
  children: [
3255
- /* @__PURE__ */ a(Yi, { show: t, ref: o }),
3256
- /* @__PURE__ */ a(
3266
+ /* @__PURE__ */ s(Yi, { show: t, ref: o }),
3267
+ /* @__PURE__ */ s(
3257
3268
  Lo,
3258
3269
  {
3259
3270
  onWidthChange: r,
@@ -3278,30 +3289,30 @@ const Ie = {
3278
3289
  onLoaded: d,
3279
3290
  cleanupOnLoaded: f,
3280
3291
  onLayoutWidthChange: m
3281
- } = t, [P, h] = q(null), { setContainer: T, setContentRef: C } = _e(), { loading: b } = oe(), { LoaderImageComponent: v } = _t();
3282
- return D(() => (d && d(), () => {
3292
+ } = t, [P, p] = $(null), { setContainer: T, setContentRef: C } = be(), { loading: b } = oe(), { LoaderImageComponent: v } = _t();
3293
+ return A(() => (d && d(), () => {
3283
3294
  f && f();
3284
3295
  }), [d, f]), // TODO: deprecated in v2.0.0, remove later ~
3285
- /* @__PURE__ */ a(Rn, { toolbarRef: P, ref: e, children: /* @__PURE__ */ a(Io, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ a(Ro, { slots: r, children: /* @__PURE__ */ a(Ao, { icons: o, children: /* @__PURE__ */ H(So, { getContainerRef: T, style: i, className: c, children: [
3296
+ /* @__PURE__ */ s(Rn, { toolbarRef: P, ref: e, children: /* @__PURE__ */ s(Io, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ s(Ro, { slots: r, children: /* @__PURE__ */ s(Ao, { icons: o, children: /* @__PURE__ */ H(So, { getContainerRef: T, style: i, className: c, children: [
3286
3297
  /* @__PURE__ */ H(Eo, { children: [
3287
- /* @__PURE__ */ H("div", { className: we["rp-layout"], children: [
3288
- /* @__PURE__ */ a(
3298
+ /* @__PURE__ */ H("div", { className: _e["rp-layout"], children: [
3299
+ /* @__PURE__ */ s(
3289
3300
  Ki,
3290
3301
  {
3291
- ref: h
3302
+ ref: p
3292
3303
  }
3293
3304
  ),
3294
- /* @__PURE__ */ H("div", { className: we["rp-content"], children: [
3295
- /* @__PURE__ */ a("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ a(ea, {}) }),
3296
- /* @__PURE__ */ a("div", { ref: C, className: we["rp-pages"], children: n })
3305
+ /* @__PURE__ */ H("div", { className: _e["rp-content"], children: [
3306
+ /* @__PURE__ */ s("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ s(es, {}) }),
3307
+ /* @__PURE__ */ s("div", { ref: C, className: _e["rp-pages"], children: n })
3297
3308
  ] })
3298
3309
  ] }),
3299
- /* @__PURE__ */ a(Do, {})
3310
+ /* @__PURE__ */ s(Do, {})
3300
3311
  ] }),
3301
- b ? /* @__PURE__ */ a(
3312
+ b ? /* @__PURE__ */ s(
3302
3313
  "div",
3303
3314
  {
3304
- className: we["rp-loader"],
3315
+ className: _e["rp-loader"],
3305
3316
  style: {
3306
3317
  position: "absolute",
3307
3318
  top: 0,
@@ -3311,7 +3322,7 @@ const Ie = {
3311
3322
  width: "100%",
3312
3323
  height: "100%"
3313
3324
  },
3314
- children: /* @__PURE__ */ a(
3325
+ children: /* @__PURE__ */ s(
3315
3326
  "div",
3316
3327
  {
3317
3328
  style: {
@@ -3321,7 +3332,7 @@ const Ie = {
3321
3332
  height: "100%",
3322
3333
  width: "100%"
3323
3334
  },
3324
- children: v && /* @__PURE__ */ a(v, {})
3335
+ children: v && /* @__PURE__ */ s(v, {})
3325
3336
  }
3326
3337
  )
3327
3338
  }
@@ -3341,34 +3352,34 @@ export {
3341
3352
  yn as C,
3342
3353
  Ei as D,
3343
3354
  Ar as E,
3344
- Mr as F,
3355
+ Fr as F,
3345
3356
  Hr as G,
3346
3357
  qr as H,
3347
3358
  xt as I,
3348
3359
  ri as J,
3349
- si as K,
3360
+ ai as K,
3350
3361
  Rn as L,
3351
3362
  ci as M,
3352
3363
  li as N,
3353
3364
  Bn as O,
3354
- Ks as P,
3365
+ Ka as P,
3355
3366
  Zn as Q,
3356
- Js as R,
3367
+ Ja as R,
3357
3368
  Vi as S,
3358
- Xs as T,
3369
+ Xa as T,
3359
3370
  $i as U,
3360
3371
  qi as V,
3361
3372
  tn as W,
3362
3373
  Ki as X,
3363
3374
  Zi as Y,
3364
- ea as Z,
3375
+ es as Z,
3365
3376
  nc as a,
3366
3377
  Gn as b,
3367
3378
  tt as c,
3368
3379
  yt as d,
3369
- Qs as e,
3370
- Ys as f,
3371
- Zs as g,
3380
+ Qa as e,
3381
+ Ya as f,
3382
+ Za as g,
3372
3383
  Tn as h,
3373
3384
  pt as i,
3374
3385
  ke as j,
@@ -3382,7 +3393,7 @@ export {
3382
3393
  vn as r,
3383
3394
  Er as s,
3384
3395
  wn as t,
3385
- le as u,
3396
+ de as u,
3386
3397
  Nr as v,
3387
3398
  _n as w,
3388
3399
  Or as x,