@pdf-viewer/react 1.11.0-beta.2 → 1.11.0-rc.1

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