@pdf-viewer/react 1.6.0-beta.2 → 1.6.0-beta.4

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 (70) hide show
  1. package/dist/{RPDefaultLayout-db184803.js → RPDefaultLayout-cdc3cad8.js} +760 -750
  2. package/dist/assets/Container.css +1 -1
  3. package/dist/assets/RPDefaultLayout.css +1 -1
  4. package/dist/components/RPController.js +52 -51
  5. package/dist/components/RPPages.js +1 -1
  6. package/dist/components/RPProvider.js +1 -1
  7. package/dist/components/layout/Container.js +7 -6
  8. package/dist/components/layout/LayoutContainer.js +1 -1
  9. package/dist/components/layout/RPDefaultLayout.js +1 -1
  10. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  11. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  12. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  13. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  14. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  15. package/dist/components/layout/toolbar/MenuItem.js +1 -1
  16. package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
  17. package/dist/components/layout/toolbar/MostPageTool.js +2 -2
  18. package/dist/components/layout/toolbar/OtherTool.js +4 -3
  19. package/dist/components/layout/toolbar/Paginate.js +1 -1
  20. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  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/ViewModeTool.js +1 -1
  29. package/dist/components/layout/toolbar/ZoomTool.js +8 -27
  30. package/dist/components/page/AnnotationLayer.js +1 -1
  31. package/dist/components/page/CanvasLayer.js +1 -1
  32. package/dist/components/page/DualPage.js +1 -1
  33. package/dist/components/page/RPPage.js +1 -1
  34. package/dist/components/page/SinglePage.js +1 -1
  35. package/dist/components/page/TextHighlightLayer.js +1 -1
  36. package/dist/components/page/TextLayer.js +1 -1
  37. package/dist/components/ui/Checkbox.js +14 -13
  38. package/dist/components/ui/DropDown.js +1 -1
  39. package/dist/components/ui/LoadingIndicator.js +1 -1
  40. package/dist/components/ui/RPTooltip.js +689 -331
  41. package/dist/contexts/PaginationContext.js +1 -1
  42. package/dist/contexts/PrintContext.js +1 -1
  43. package/dist/contexts/SearchContext.js +1 -1
  44. package/dist/contexts/ThumbnailsContext.js +1 -1
  45. package/dist/contexts/ZoomContext.js +17 -16
  46. package/dist/index-2e540713.js +23 -0
  47. package/dist/index-353ec0a6.js +172 -0
  48. package/dist/index-5ff5dbd0.js +1675 -0
  49. package/dist/index-71898eb9.js +139 -0
  50. package/dist/main.js +1 -1
  51. package/dist/types/utils/constants.d.ts +1 -0
  52. package/dist/types/utils/getZoomLevel.d.ts +2 -2
  53. package/dist/types/utils/types.d.ts +5 -2
  54. package/dist/utils/constants.js +3 -2
  55. package/dist/utils/getZoomLevel.js +10 -7
  56. package/dist/utils/hooks/useFileDownload.js +1 -1
  57. package/dist/utils/hooks/useLicense.js +1 -1
  58. package/dist/utils/hooks/usePaginate.js +1 -1
  59. package/dist/utils/hooks/usePinch.js +68 -17
  60. package/dist/utils/hooks/usePresentPage.js +1 -1
  61. package/dist/utils/hooks/usePrint.js +1 -1
  62. package/dist/utils/hooks/useScrollToPage.js +1 -1
  63. package/dist/utils/hooks/useSearch.js +1 -1
  64. package/dist/utils/hooks/useThumbnail.js +1 -1
  65. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  66. package/dist/utils/types.js +9 -9
  67. package/package.json +1 -1
  68. package/dist/index-1cb41342.js +0 -307
  69. package/dist/index-7279fb4e.js +0 -1557
  70. package/dist/index-aa2d3884.js +0 -140
@@ -1,17 +1,17 @@
1
1
  import { jsx as i, Fragment as _e, jsxs as A } from "react/jsx-runtime";
2
2
  import * as U from "react";
3
- import { useRef as W, useEffect as F, useCallback as L, useState as H, createContext as Ke, useContext as Xe, useMemo as M, forwardRef as We, useImperativeHandle as dn, createElement as Ge, PureComponent as tr, Component as nr, memo as rr } from "react";
3
+ import { useRef as W, useEffect as F, useCallback as L, useState as H, createContext as Xe, useContext as Ye, useMemo as M, forwardRef as We, useImperativeHandle as dn, createElement as Ve, PureComponent as tr, Component as nr, memo as rr } from "react";
4
4
  import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
5
5
  import { UIButton as ne } from "./components/ui/Button.js";
6
6
  import { UIInput as un } from "./components/ui/Input.js";
7
7
  import { useScrollModeContext as Oe } from "./contexts/ScrollModeContext.js";
8
8
  import { useDocumentContext as X } from "./contexts/RPDocumentContext.js";
9
9
  import { useDarkModeContext as or } from "./contexts/DarkModeContext.js";
10
- import { ViewMode as Ze, ScrollMode as ee, AnnotationSubType as Ft, SelectionMode as ir, ZoomLevel as at } from "./utils/types.js";
11
- import { useRotationContext as Ye } from "./contexts/RotationContext.js";
10
+ import { ViewMode as Be, ScrollMode as ee, AnnotationSubType as Ft, SelectionMode as ir, ZoomLevel as at } from "./utils/types.js";
11
+ import { useRotationContext as Je } from "./contexts/RotationContext.js";
12
12
  import { useLayerContext as ar } from "./contexts/LayerContext.js";
13
- import { useZoomContext as Je } from "./contexts/ZoomContext.js";
14
- import { useViewModeContext as Qe } from "./contexts/ViewModeContext.js";
13
+ import { useZoomContext as Qe } from "./contexts/ZoomContext.js";
14
+ import { useViewModeContext as He } from "./contexts/ViewModeContext.js";
15
15
  import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
16
16
  import { useVirtualGridContext as pn } from "./contexts/VirtualGridContext.js";
17
17
  import { useSelectionModeContext as sr } from "./contexts/SelectionModeContext.js";
@@ -60,9 +60,10 @@ import { FileUploadTool as vn } from "./components/layout/toolbar/FileUploadTool
60
60
  import { DarkModeTool as Gr } from "./components/layout/toolbar/DarkModeTool.js";
61
61
  import { ThreeDotIcon as Vr } from "./components/icons/ThreeDotIcon.js";
62
62
  import { UIDropDown as _n } from "./components/ui/DropDown.js";
63
- import { e as Ur, a as yt, P as He, c as ke, g as xt, i as qr, k as Zr, f as Br } from "./index-1cb41342.js";
64
- import { D as jr, u as ct } from "./index-aa2d3884.js";
65
- import { a as Kr, u as Xr, F as Yr, b as Jr, G as Be } from "./index-7279fb4e.js";
63
+ import { u as yt, P as $e, c as ke, a as xt, S as Ur } from "./index-353ec0a6.js";
64
+ import { c as qr, e as Zr, b as Br } from "./index-71898eb9.js";
65
+ import { a as ct } from "./index-2e540713.js";
66
+ import { a as jr, u as Kr, F as Xr, D as Yr, b as Jr, G as je } from "./index-5ff5dbd0.js";
66
67
  import { h as Qr } from "./component-1da194e8.js";
67
68
  import { CloseIcon as eo } from "./components/icons/CloseIcon.js";
68
69
  import { dateFormatter as Ht } from "./utils/dateFormatter.js";
@@ -70,42 +71,43 @@ import { PropertyItem as to } from "./components/layout/toolbar/PropertyItem.js"
70
71
  import { useOtherToolContext as no, OtherToolProvider as ro } from "./contexts/OtherToolContext.js";
71
72
  import { DocumentProperties as oo } from "./components/layout/toolbar/DocumentProperties.js";
72
73
  import { RotateTool as io } from "./components/layout/toolbar/RotateTool.js";
73
- import { ScrollModeTool as ao } from "./components/layout/toolbar/ScrollModeTool.js";
74
+ import { ViewModeTool as ao } from "./components/layout/toolbar/ViewModeTool.js";
75
+ import { ScrollModeTool as so } from "./components/layout/toolbar/ScrollModeTool.js";
74
76
  import { MenuSeparator as It } from "./components/layout/toolbar/MenuSeparator.js";
75
- import { FileDownloadDefaultIcon as so } from "./components/icons/FileDownloadDefaultIcon.js";
77
+ import { FileDownloadDefaultIcon as co } from "./components/icons/FileDownloadDefaultIcon.js";
76
78
  import { MenuItem as ve } from "./components/layout/toolbar/MenuItem.js";
77
- import { PrintDefaultTool as co } from "./components/icons/PrintDefaultIcon.js";
79
+ import { PrintDefaultTool as lo } from "./components/icons/PrintDefaultIcon.js";
78
80
  import { FullScreenTool as wn } from "./components/layout/toolbar/FullScreenTool.js";
79
81
  import { GoToDownIcon as bn } from "./components/icons/GoToDownIcon.js";
80
- import { SelectionModeTool as lo } from "./components/layout/toolbar/SelectionModeTool.js";
81
- import { ZoomInIcon as uo } from "./components/icons/ZoomInIcon.js";
82
- import { ZoomOutIcon as po } from "./components/icons/ZoomOutIcon.js";
82
+ import { SelectionModeTool as uo } from "./components/layout/toolbar/SelectionModeTool.js";
83
+ import { ZoomInIcon as po } from "./components/icons/ZoomInIcon.js";
84
+ import { ZoomOutIcon as ho } from "./components/icons/ZoomOutIcon.js";
83
85
  import { PAGE_PADDING as $t } from "./utils/constants.js";
84
- import { getZoomLevel as ho } from "./utils/getZoomLevel.js";
85
- import { SearchIcon as mo } from "./components/icons/SearchIcon.js";
86
+ import { getZoomLevel as mo } from "./utils/getZoomLevel.js";
87
+ import { SearchIcon as fo } from "./components/icons/SearchIcon.js";
86
88
  import { c as K, S as Gt } from "./SearchCloseButton-959cc1ed.js";
87
89
  import { UICheckbox as Vt } from "./components/ui/Checkbox.js";
88
- import { ClearIcon as fo } from "./components/icons/ClearIcon.js";
90
+ import { ClearIcon as go } from "./components/icons/ClearIcon.js";
89
91
  import { InfoIcon as Ut } from "./components/icons/InfoIcon.js";
90
- import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) => r < t ? n + o : n, 0), Cn = () => {
91
- const { viewMode: e } = Qe(), { scrollMode: t } = Oe(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = oe(), c = W(), { columnCount: s } = pn(), { widths: d, heights: u } = tt(), p = W(t), m = W(e), h = W(s), { targetScrollPage: v } = fn();
92
+ import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) => r < t ? n + o : n, 0), Cn = () => {
93
+ const { viewMode: e } = He(), { scrollMode: t } = Oe(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = oe(), c = W(), { columnCount: s } = pn(), { widths: d, heights: u } = tt(), p = W(t), f = W(e), h = W(s), { targetScrollPage: g } = fn();
92
94
  F(() => {
93
95
  n != null && n.scrollToItem && (c.current = n);
94
96
  }, [n]), F(() => {
95
- p.current = t, m.current = e;
97
+ p.current = t, f.current = e;
96
98
  }, [t, e]);
97
- const b = L(
98
- (g, C) => {
99
+ const P = L(
100
+ (v, S) => {
99
101
  if (!r)
100
102
  return;
101
- const f = Math.ceil(g / 2) * 2 - 1;
102
- if (g === f + 1) {
103
- const T = {
104
- left: d[f],
103
+ const m = Math.ceil(v / 2) * 2 - 1;
104
+ if (v === m + 1) {
105
+ const C = {
106
+ left: d[m],
105
107
  top: 0
106
108
  };
107
109
  return new Promise(
108
- (l) => st(r, T, l)
110
+ (l) => st(r, C, l)
109
111
  );
110
112
  }
111
113
  const w = {
@@ -114,104 +116,104 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
114
116
  };
115
117
  return r == null ? void 0 : r.scrollTo({
116
118
  ...w,
117
- behavior: C
119
+ behavior: S
118
120
  });
119
121
  },
120
122
  [r, d, st]
121
123
  );
122
124
  return F(() => {
123
- p.current = t, m.current = e;
125
+ p.current = t, f.current = e;
124
126
  }, [t, e]), F(() => {
125
127
  h.current = s;
126
128
  }, [s]), { scrollToPage: L(
127
- (g, C = "smooth") => {
128
- a(g);
129
- const f = g - 1;
130
- let w = f, T = 0;
131
- if (m.current === Ze.DUAL_PAGE && p.current === ee.PAGE_SCROLLING) {
132
- b(g, C);
129
+ (v, S = "smooth") => {
130
+ a(v);
131
+ const m = v - 1;
132
+ let w = m, C = 0;
133
+ if (f.current === Be.DUAL_PAGE && p.current === ee.PAGE_SCROLLING) {
134
+ P(v, S);
133
135
  return;
134
136
  }
135
137
  if (p.current === ee.PAGE_SCROLLING) {
136
- a(g);
138
+ a(v);
137
139
  return;
138
140
  }
139
141
  if (!c.current || !o)
140
142
  return;
141
143
  const l = o;
142
- if (v.current = g, p.current === ee.HORIZONTAL_SCROLLING) {
143
- T = f;
144
+ if (g.current = v, p.current === ee.HORIZONTAL_SCROLLING) {
145
+ C = m;
144
146
  const y = {
145
- left: $e(d, T),
147
+ left: Ge(d, C),
146
148
  top: 0
147
149
  };
148
150
  return l.scrollTo({
149
151
  ...y,
150
- behavior: C
152
+ behavior: S
151
153
  });
152
154
  }
153
- if (m.current === Ze.DUAL_PAGE) {
154
- T = f % 2, w = Math.floor(f / 2);
155
+ if (f.current === Be.DUAL_PAGE) {
156
+ C = m % 2, w = Math.floor(m / 2);
155
157
  const y = {
156
- left: $e(d, T),
157
- top: $e(u, w)
158
+ left: Ge(d, C),
159
+ top: Ge(u, w)
158
160
  };
159
161
  return l.scrollTo({
160
162
  ...y,
161
- behavior: C
163
+ behavior: S
162
164
  });
163
165
  }
164
- const P = {
166
+ const T = {
165
167
  left: 0,
166
- top: $e(u, w)
168
+ top: Ge(u, w)
167
169
  };
168
170
  return l.scrollTo({
169
- ...P,
170
- behavior: C
171
+ ...T,
172
+ behavior: S
171
173
  });
172
174
  },
173
175
  [
174
176
  o,
175
177
  s,
176
- b,
178
+ P,
177
179
  a,
178
180
  st,
179
181
  u,
180
182
  d
181
183
  ]
182
184
  ) };
183
- }, go = (e = 1) => {
184
- const [t, n] = H(e), [o, r] = H(0), { scrollToPage: a } = Cn(), c = W(1), { viewMode: s } = Qe(), { scrollMode: d } = Oe(), u = St(t, 100), p = L(
185
- (S) => {
186
- if (!/^[0-9]*$/g.test(S.toString()) || !S)
185
+ }, vo = (e = 1) => {
186
+ const [t, n] = H(e), [o, r] = H(0), { scrollToPage: a } = Cn(), c = W(1), { viewMode: s } = He(), { scrollMode: d } = Oe(), u = St(t, 100), p = L(
187
+ (b) => {
188
+ if (!/^[0-9]*$/g.test(b.toString()) || !b)
187
189
  return { success: !1, currentPage: c.current };
188
- const C = +S;
189
- return C < 0 || C > o ? { success: !1, currentPage: c.current } : (n(C), c.current = C, { success: !0, currentPage: +S });
190
+ const S = +b;
191
+ return S < 0 || S > o ? { success: !1, currentPage: c.current } : (n(S), c.current = S, { success: !0, currentPage: +b });
190
192
  },
191
193
  [o]
192
- ), m = L(p, [p]), h = L(
193
- (S) => {
194
- const g = p(S);
195
- return g.success && a(g.currentPage), g;
194
+ ), f = L(p, [p]), h = L(
195
+ (b) => {
196
+ const v = p(b);
197
+ return v.success && a(v.currentPage), v;
196
198
  },
197
199
  [p, a]
198
- ), v = L(() => {
199
- let S = t - 1;
200
- h(S);
201
- }, [h, t, s, d]), b = L(() => {
202
- let S = t + 1;
203
- h(S);
200
+ ), g = L(() => {
201
+ let b = t - 1;
202
+ h(b);
203
+ }, [h, t, s, d]), P = L(() => {
204
+ let b = t + 1;
205
+ h(b);
204
206
  }, [h, t, s, d]);
205
207
  return {
206
208
  focusedPage: u,
207
209
  totalPages: o,
208
- setFocusedPage: m,
210
+ setFocusedPage: f,
209
211
  setTotalPages: r,
210
- nextPage: b,
211
- prevPage: v,
212
+ nextPage: P,
213
+ prevPage: g,
212
214
  goToPage: h
213
215
  };
214
- }, Tn = Ke({
216
+ }, Tn = Xe({
215
217
  focusedPage: 0,
216
218
  setFocusedPage: (e) => {
217
219
  },
@@ -224,10 +226,10 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
224
226
  nextPage: () => {
225
227
  }
226
228
  }), oe = () => {
227
- const e = Xe(Tn);
229
+ const e = Ye(Tn);
228
230
  return typeof (e == null ? void 0 : e.focusedPage) > "u" && $r.error("Please use this hooks inside children component of RPProvider"), e;
229
- }, ys = ({ children: e }) => {
230
- const { pdf: t } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: d } = go();
231
+ }, Ls = ({ children: e }) => {
232
+ const { pdf: t } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: d } = vo();
231
233
  return F(() => {
232
234
  t != null && t.numPages && (a(t.numPages), r(1));
233
235
  }, [t, a, r]), /* @__PURE__ */ i(
@@ -246,7 +248,7 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
246
248
  }
247
249
  );
248
250
  };
249
- const vo = () => {
251
+ const _o = () => {
250
252
  const { pdf: e, pages: t } = X(), [n, o] = H({
251
253
  loadedPages: 0,
252
254
  totalPages: 0,
@@ -255,7 +257,7 @@ const vo = () => {
255
257
  F(() => {
256
258
  p.current;
257
259
  }, [p]);
258
- const m = L(() => {
260
+ const f = L(() => {
259
261
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
260
262
  const w = document.querySelector(".rp-print-zone");
261
263
  w && w.remove();
@@ -265,13 +267,13 @@ const vo = () => {
265
267
  totalPages: 0,
266
268
  percentage: 0
267
269
  });
268
- }, []), v = () => {
270
+ }, []), g = () => {
269
271
  p.current = !0;
270
- }, b = async ({
272
+ }, P = async ({
271
273
  scratchCanvas: w,
272
- pdfDocument: T,
274
+ pdfDocument: C,
273
275
  pageNumber: l,
274
- viewerPdfPage: P,
276
+ viewerPdfPage: T,
275
277
  printResolution: _,
276
278
  optionalContentConfigPromise: y,
277
279
  printAnnotationStoragePromise: E
@@ -281,11 +283,11 @@ const vo = () => {
281
283
  return;
282
284
  }
283
285
  const I = _ / pr.PDF;
284
- w.width = Math.floor(P.width * I), w.height = Math.floor(P.height * I);
286
+ w.width = Math.floor(T.width * I), w.height = Math.floor(T.height * I);
285
287
  const N = w.getContext("2d");
286
288
  N.save(), N.fillStyle = "rgb(255, 255, 255)", N.fillRect(0, 0, w.width, w.height), N.restore();
287
289
  const [R, z] = await Promise.all([
288
- T.getPage(l),
290
+ C.getPage(l),
289
291
  E
290
292
  ]);
291
293
  if (p.current) {
@@ -295,7 +297,7 @@ const vo = () => {
295
297
  const O = {
296
298
  canvasContext: N,
297
299
  transform: [I, 0, 0, I, 0, 0],
298
- viewport: R.getViewport({ scale: 1, rotation: P.rotation }),
300
+ viewport: R.getViewport({ scale: 1, rotation: T.rotation }),
299
301
  intent: "print",
300
302
  annotationMode: hr.ENABLE_STORAGE,
301
303
  optionalContentConfigPromise: y,
@@ -306,50 +308,50 @@ const vo = () => {
306
308
  } catch (D) {
307
309
  throw D instanceof mr || console.error(D), D;
308
310
  }
309
- }, S = L(() => {
311
+ }, b = L(() => {
310
312
  const w = window.print;
311
- return new Promise((T) => {
313
+ return new Promise((C) => {
312
314
  const l = (y) => {
313
315
  setTimeout(() => {
314
316
  w.call(window), setTimeout(() => y(), 20);
315
317
  }, 0);
316
318
  };
317
319
  if (document.querySelector(".rp-print-zone")) {
318
- l(T);
320
+ l(C);
319
321
  return;
320
322
  }
321
323
  const _ = new MutationObserver(() => {
322
- document.querySelector(".rp-print-zone") && (l(T), _.disconnect());
324
+ document.querySelector(".rp-print-zone") && (l(C), _.disconnect());
323
325
  });
324
326
  _.observe(document.body, { childList: !0, subtree: !0 });
325
327
  });
326
- }, []), g = async (w) => {
327
- const T = document.createElement("img"), l = document.createElement("div");
328
- return l.classList.add("rp-print-page"), await new Promise((P, _) => {
328
+ }, []), v = async (w) => {
329
+ const C = document.createElement("img"), l = document.createElement("div");
330
+ return l.classList.add("rp-print-page"), await new Promise((T, _) => {
329
331
  w.toBlob((y) => {
330
- y ? (T.src = URL.createObjectURL(y), T.onload = () => {
331
- URL.revokeObjectURL(T.src), P();
332
- }, T.onerror = _) : _(new Error("Failed to create blob"));
332
+ y ? (C.src = URL.createObjectURL(y), C.onload = () => {
333
+ URL.revokeObjectURL(C.src), T();
334
+ }, C.onerror = _) : _(new Error("Failed to create blob"));
333
335
  });
334
336
  }).catch(() => {
335
- }), l.appendChild(T), l;
336
- }, C = (w, T) => {
337
+ }), l.appendChild(C), l;
338
+ }, S = (w, C) => {
337
339
  const l = document.createElement("div");
338
340
  l.classList.add("rp-print-zone");
339
- const P = document.createElement("style"), _ = T.get(1);
341
+ const T = document.createElement("style"), _ = C.get(1);
340
342
  if (_) {
341
343
  const { width: y, height: E } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
342
- P.innerHTML = `@page { size: ${y}px ${E}px }`;
344
+ T.innerHTML = `@page { size: ${y}px ${E}px }`;
343
345
  }
344
- return l.appendChild(P), l.append(...w), l;
345
- }, f = L(async () => {
346
+ return l.appendChild(T), l.append(...w), l;
347
+ }, m = L(async () => {
346
348
  if (!e)
347
349
  return;
348
350
  h();
349
- const w = document.createElement("canvas"), T = [];
351
+ const w = document.createElement("canvas"), C = [];
350
352
  try {
351
353
  e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
352
- const P = e.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
354
+ const T = e.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
353
355
  e.annotationStorage.print ?? void 0
354
356
  ), y = t.size;
355
357
  for (const [I, N] of t) {
@@ -358,21 +360,21 @@ const vo = () => {
358
360
  return;
359
361
  }
360
362
  const R = N.page.getViewport({ scale: 1 });
361
- if (await b({
363
+ if (await P({
362
364
  scratchCanvas: w,
363
365
  pdfDocument: e,
364
366
  pageNumber: I,
365
367
  viewerPdfPage: R,
366
368
  printResolution: 150,
367
- optionalContentConfigPromise: P,
369
+ optionalContentConfigPromise: T,
368
370
  printAnnotationStoragePromise: _
369
371
  }), p.current) {
370
372
  h();
371
373
  return;
372
374
  }
373
- const z = await g(w);
374
- T.push(z);
375
- const O = parseFloat((T.length / y * 100).toFixed(2));
375
+ const z = await v(w);
376
+ C.push(z);
377
+ const O = parseFloat((C.length / y * 100).toFixed(2));
376
378
  o({
377
379
  loadedPages: I,
378
380
  totalPages: y,
@@ -383,8 +385,8 @@ const vo = () => {
383
385
  h();
384
386
  return;
385
387
  }
386
- const E = C(T, t);
387
- document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await S();
388
+ const E = S(C, t);
389
+ document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await b();
388
390
  } catch (l) {
389
391
  s(!0), l instanceof Error && u(l);
390
392
  } finally {
@@ -393,20 +395,20 @@ const vo = () => {
393
395
  }, [e, t, p]);
394
396
  return F(() => {
395
397
  const w = () => {
396
- h(), m();
398
+ h(), f();
397
399
  };
398
400
  return window.addEventListener("afterprint", w, !0), () => {
399
401
  window.removeEventListener("afterprint", w, !0);
400
402
  };
401
- }, [m, h]), {
402
- print: f,
403
- cancel: v,
403
+ }, [f, h]), {
404
+ print: m,
405
+ cancel: g,
404
406
  progress: n,
405
407
  isComplete: r,
406
408
  isError: c,
407
409
  error: d
408
410
  };
409
- }, Pn = Ke({
411
+ }, Pn = Xe({
410
412
  print: () => {
411
413
  },
412
414
  cancel: () => {
@@ -423,78 +425,78 @@ const vo = () => {
423
425
  console.error("Error in setOnError callback:", t);
424
426
  }
425
427
  }
426
- }), xs = ({ children: e }) => {
427
- const [t, n] = H(null), [o, r] = H(null), { print: a, cancel: c, progress: s, isComplete: d, isError: u, error: p } = vo(), m = L((g) => {
428
- g && typeof g == "function" && r(() => g);
429
- }, []), h = (g) => {
430
- p && g(p);
431
- }, v = L(
432
- (g) => {
433
- n(() => g);
428
+ }), Rs = ({ children: e }) => {
429
+ const [t, n] = H(null), [o, r] = H(null), { print: a, cancel: c, progress: s, isComplete: d, isError: u, error: p } = _o(), f = L((v) => {
430
+ v && typeof v == "function" && r(() => v);
431
+ }, []), h = (v) => {
432
+ p && v(p);
433
+ }, g = L(
434
+ (v) => {
435
+ n(() => v);
434
436
  },
435
437
  [s, t]
436
438
  );
437
439
  F(() => {
438
- d && o && b();
440
+ d && o && P();
439
441
  }, [d, o]), F(() => {
440
- u && h((g) => {
441
- console.error(g);
442
+ u && h((v) => {
443
+ console.error(v);
442
444
  });
443
445
  }, [u]), F(() => {
444
446
  s && t && t(s);
445
447
  }, [s, t]);
446
- const b = () => {
448
+ const P = () => {
447
449
  o && (o(), r(null));
448
- }, S = {
450
+ }, b = {
449
451
  print: a,
450
452
  cancel: c,
451
- setOnProgress: v,
452
- setOnComplete: m,
453
+ setOnProgress: g,
454
+ setOnComplete: f,
453
455
  setOnError: h,
454
456
  progress: s
455
457
  };
456
- return /* @__PURE__ */ i(Pn.Provider, { value: S, children: e });
458
+ return /* @__PURE__ */ i(Pn.Provider, { value: b, children: e });
457
459
  }, nt = () => {
458
- const e = Xe(Pn);
460
+ const e = Ye(Pn);
459
461
  if (!e)
460
462
  throw new Error("usePrintContext must be used within a PrintProvider");
461
463
  return e;
462
- }, _o = () => {
463
- const [e, t] = H({}), { pages: n } = X(), { rotate: o } = Ye(), r = M(() => Object.keys(e).length, [e]), a = L(
464
+ }, wo = () => {
465
+ const [e, t] = H({}), { pages: n } = X(), { rotate: o } = Je(), r = M(() => Object.keys(e).length, [e]), a = L(
464
466
  (s) => {
465
467
  if (!n.size || s > n.size)
466
468
  return;
467
- const d = Array.from(n.values()).slice(0, s).map((m) => {
468
- const { thumbnailViewport: h, scale: v } = Wt(m.page, o);
469
+ const d = Array.from(n.values()).slice(0, s).map((f) => {
470
+ const { thumbnailViewport: h, scale: g } = Wt(f.page, o);
469
471
  return {
470
- scale: v,
471
- page: m.page,
472
+ scale: g,
473
+ page: f.page,
472
474
  loading: !0,
473
475
  viewport: h
474
476
  };
475
- }), u = d.reduce((m, h) => (m[h.page.pageNumber] = h, m), {});
477
+ }), u = d.reduce((f, h) => (f[h.page.pageNumber] = h, f), {});
476
478
  t(u);
477
479
  const p = [];
478
- for (const m of d) {
479
- const h = document.createElement("canvas"), v = _t(m.page, h, {
480
- scale: m.scale,
480
+ for (const f of d) {
481
+ const h = document.createElement("canvas"), g = _t(f.page, h, {
482
+ scale: f.scale,
481
483
  rotate: o
482
484
  }).promise.then(() => {
483
- const b = h.toDataURL();
485
+ const P = h.toDataURL();
484
486
  return {
485
- ...m,
486
- thumbnailSrc: b,
487
+ ...f,
488
+ thumbnailSrc: P,
487
489
  loading: !1
488
490
  };
489
491
  });
490
- p.push(v);
492
+ p.push(g);
491
493
  }
492
- Promise.all(p).then((m) => {
493
- const h = m.reduce(
494
- (v, b) => (v[b.page.pageNumber] = b, v),
494
+ Promise.all(p).then((f) => {
495
+ const h = f.reduce(
496
+ (g, P) => (g[P.page.pageNumber] = P, g),
495
497
  {}
496
498
  );
497
- t((v) => ({ ...v, ...h }));
499
+ t((g) => ({ ...g, ...h }));
498
500
  }).catch(() => {
499
501
  });
500
502
  },
@@ -521,22 +523,22 @@ const vo = () => {
521
523
  }));
522
524
  const u = document.createElement("canvas");
523
525
  _t(d.page, u, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
524
- const p = u.toDataURL(), { thumbnailViewport: m, scale: h } = Wt(d.page, o);
526
+ const p = u.toDataURL(), { thumbnailViewport: f, scale: h } = Wt(d.page, o);
525
527
  return {
526
528
  scale: h,
527
529
  thumbnailSrc: p,
528
530
  page: d.page,
529
531
  loading: !1,
530
- viewport: m
532
+ viewport: f
531
533
  };
532
534
  }).then((p) => {
533
- t((m) => ({ ...m, [s]: p }));
535
+ t((f) => ({ ...f, [s]: p }));
534
536
  });
535
537
  },
536
538
  [n, o]
537
539
  );
538
540
  return { thumbnailPages: e, addPage: c, addToPage: a, thumbnailLength: r };
539
- }, Sn = Ke({
541
+ }, Sn = Xe({
540
542
  thumbnailPages: {},
541
543
  addPage: (e) => {
542
544
  },
@@ -546,11 +548,11 @@ const vo = () => {
546
548
  setActive: (e) => {
547
549
  },
548
550
  active: !1
549
- }), yn = () => Xe(Sn), Is = ({
551
+ }), yn = () => Ye(Sn), Es = ({
550
552
  children: e,
551
553
  initialThumbnailsVisible: t
552
554
  }) => {
553
- const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = _o(), [c, s] = H(t);
555
+ const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = wo(), [c, s] = H(t);
554
556
  return /* @__PURE__ */ i(
555
557
  Sn.Provider,
556
558
  {
@@ -558,21 +560,21 @@ const vo = () => {
558
560
  children: e
559
561
  }
560
562
  );
561
- }, wo = (e = {}, t = "") => {
562
- const [n, o] = H(t), [r, a] = H(!1), { pdf: c, pages: s } = X(), d = tt(), u = W(!n), { currentZoom: p } = Je(), [m, h] = H([]), { setFocusedPage: v } = oe(), [b, S] = H(0), { pageScrollElementRef: g, virtualScrollableElementRef: C } = et(), { scrollMode: f } = Oe(), { pagesRef: w } = we(), [T, l] = H(null), P = W({}), _ = M(() => b === 0 ? null : m[b - 1], [b, m]), y = M(() => m.length, [m]);
563
+ }, bo = (e = {}, t = "") => {
564
+ const [n, o] = H(t), [r, a] = H(!1), { pdf: c, pages: s } = X(), d = tt(), u = W(!n), { currentZoom: p } = Qe(), [f, h] = H([]), { setFocusedPage: g } = oe(), [P, b] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: S } = et(), { scrollMode: m } = Oe(), { pagesRef: w } = we(), [C, l] = H(null), T = W({}), _ = M(() => P === 0 ? null : f[P - 1], [P, f]), y = M(() => f.length, [f]);
563
565
  F(() => {
564
566
  if (!_ || !s)
565
567
  return;
566
- const R = C || g;
568
+ const R = S || v;
567
569
  if (!R || !w)
568
570
  return;
569
571
  const z = s.get(_.page), O = w.clientHeight / 2, D = w.clientWidth / 2;
570
572
  let x = 0, k = 0;
571
- f === ee.PAGE_SCROLLING && v(_.page), f === ee.VERTICAL_SCROLLING && (x = d.heights.slice(0, _.page - 1).reduce((q, B) => q + B, 0)), f === ee.HORIZONTAL_SCROLLING && (k = d.widths.slice(0, _.page - 1).reduce((q, B) => q + B, 0));
573
+ m === ee.PAGE_SCROLLING && g(_.page), m === ee.VERTICAL_SCROLLING && (x = d.heights.slice(0, _.page - 1).reduce((q, B) => q + B, 0)), m === ee.HORIZONTAL_SCROLLING && (k = d.widths.slice(0, _.page - 1).reduce((q, B) => q + B, 0));
572
574
  let $;
573
575
  if (!z)
574
576
  return;
575
- const j = P.current[_.page], Y = z.page.getViewport({ scale: 1 });
577
+ const j = T.current[_.page], Y = z.page.getViewport({ scale: 1 });
576
578
  $ = new Tt.TextLayer({
577
579
  viewport: Y,
578
580
  textContentSource: j,
@@ -590,18 +592,18 @@ const vo = () => {
590
592
  });
591
593
  }, [
592
594
  s,
593
- v,
595
+ g,
594
596
  d,
595
597
  _,
596
- f,
597
- C,
598
- g,
598
+ m,
599
+ S,
600
+ v,
599
601
  w
600
602
  ]);
601
603
  const E = L(() => {
602
- S((R) => y ? R + 1 > y ? 1 : R + 1 : 0);
604
+ b((R) => y ? R + 1 > y ? 1 : R + 1 : 0);
603
605
  }, [y]), I = L(() => {
604
- S((R) => y ? R - 1 <= 0 ? y : R - 1 : 0);
606
+ b((R) => y ? R - 1 <= 0 ? y : R - 1 : 0);
605
607
  }, [y]), N = L(async (R) => {
606
608
  if (!R)
607
609
  return {};
@@ -616,11 +618,11 @@ const vo = () => {
616
618
  }, []);
617
619
  return F(() => {
618
620
  if (!n) {
619
- u.current = !0, h([]), S(0);
621
+ u.current = !0, h([]), b(0);
620
622
  return;
621
623
  }
622
- u.current = !1, a(!0), h([]), S(0), N(c).then((R) => {
623
- P.current = R;
624
+ u.current = !1, a(!0), h([]), b(0), N(c).then((R) => {
625
+ T.current = R;
624
626
  const O = Object.keys(R).reduce((D, x) => {
625
627
  const k = dr(
626
628
  [n],
@@ -630,24 +632,24 @@ const vo = () => {
630
632
  ).map(($, j) => ({ ...$, page: Number(x), pageMatchIdx: j }));
631
633
  return [...D, ...k];
632
634
  }, []);
633
- h(O), S(O.length ? 1 : 0);
635
+ h(O), b(O.length ? 1 : 0);
634
636
  }).catch(() => {
635
- h([]), S(0);
637
+ h([]), b(0);
636
638
  }).finally(() => a(!1));
637
639
  }, [n, N, c, e]), {
638
640
  search: n,
639
641
  setSearch: o,
640
642
  loading: r,
641
- matches: m,
643
+ matches: f,
642
644
  totalMatches: y,
643
- currentMatchPosition: b,
645
+ currentMatchPosition: P,
644
646
  currentMatch: _,
645
647
  nextMatch: E,
646
648
  prevMatch: I,
647
- currentMatchElement: T,
649
+ currentMatchElement: C,
648
650
  setCurrentMatchElement: l
649
651
  };
650
- }, xn = Ke({
652
+ }, xn = Xe({
651
653
  search: "",
652
654
  setSearch: (e) => {
653
655
  },
@@ -665,7 +667,7 @@ const vo = () => {
665
667
  currentMatchElement: null,
666
668
  setCurrentMatchElement: (e) => {
667
669
  }
668
- }), Ls = ({
670
+ }), Ns = ({
669
671
  children: e,
670
672
  initialSearch: t
671
673
  }) => {
@@ -677,11 +679,11 @@ const vo = () => {
677
679
  currentMatch: d,
678
680
  search: u,
679
681
  matches: p,
680
- nextMatch: m,
682
+ nextMatch: f,
681
683
  prevMatch: h,
682
- currentMatchElement: v,
683
- setCurrentMatchElement: b
684
- } = wo(n, t);
684
+ currentMatchElement: g,
685
+ setCurrentMatchElement: P
686
+ } = bo(n, t);
685
687
  return /* @__PURE__ */ i(
686
688
  xn.Provider,
687
689
  {
@@ -693,17 +695,17 @@ const vo = () => {
693
695
  totalMatches: c,
694
696
  currentMatchPosition: s,
695
697
  currentMatch: d,
696
- nextMatch: m,
698
+ nextMatch: f,
697
699
  prevMatch: h,
698
700
  search: u,
699
701
  matches: p,
700
- currentMatchElement: v,
701
- setCurrentMatchElement: b
702
+ currentMatchElement: g,
703
+ setCurrentMatchElement: P
702
704
  },
703
705
  children: e
704
706
  }
705
707
  );
706
- }, Lt = () => Xe(xn), de = {
708
+ }, Lt = () => Ye(xn), de = {
707
709
  "rp-pages": "_rp-pages_1776r_1",
708
710
  "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
709
711
  "rp-pages-container": "_rp-pages-container_1776r_11",
@@ -716,8 +718,8 @@ const vo = () => {
716
718
  "rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
717
719
  "rp-page": "_rp-page_h7a2q_1",
718
720
  "rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
719
- }, bo = (e) => {
720
- const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = W(null), { pages: a } = X(), { rotate: c } = Ye(), s = W(), { currentZoom: d } = Je();
721
+ }, Co = (e) => {
722
+ const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = W(null), { pages: a } = X(), { rotate: c } = Je(), s = W(), { currentZoom: d } = Qe();
721
723
  return F(() => {
722
724
  if (!a || d === 0)
723
725
  return;
@@ -725,8 +727,8 @@ const vo = () => {
725
727
  if (r.current && u) {
726
728
  const p = r.current;
727
729
  p.hidden = !0;
728
- const m = s.current;
729
- m && m.cancel(), o && o(), s.current = _t(u.page, p, {
730
+ const f = s.current;
731
+ f && f.cancel(), o && o(), s.current = _t(u.page, p, {
730
732
  scale: d,
731
733
  rotate: c,
732
734
  renderForms: !0
@@ -742,31 +744,31 @@ const vo = () => {
742
744
  (p = s.current) == null || p.cancel();
743
745
  };
744
746
  }, [a, t, c, d, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
745
- }, Co = "_selecting_1x8te_9", To = "_endOfContent_1x8te_24", ze = {
747
+ }, To = "_selecting_1x8te_9", Po = "_endOfContent_1x8te_24", ze = {
746
748
  "rp-text-layer": "_rp-text-layer_1x8te_1",
747
- selecting: Co,
748
- endOfContent: To,
749
+ selecting: To,
750
+ endOfContent: Po,
749
751
  "rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
750
- }, Po = (e) => {
752
+ }, So = (e) => {
751
753
  const { pageNumber: t } = e, { pages: n } = X(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = Lt(), [s, d] = H(
752
754
  []
753
- ), u = W(), p = W(), m = W(), h = M(() => r.filter((w) => w.pageIndex === t - 1), [r, t]), v = L(
754
- (w, T, l = !1) => {
755
- if (l && mn(w, T), !h.length) {
756
- m.current = void 0, d([]);
755
+ ), u = W(), p = W(), f = W(), h = M(() => r.filter((w) => w.pageIndex === t - 1), [r, t]), g = L(
756
+ (w, C, l = !1) => {
757
+ if (l && mn(w, C), !h.length) {
758
+ f.current = void 0, d([]);
757
759
  return;
758
760
  }
759
- const P = hn(h, w, T);
760
- d(P);
761
+ const T = hn(h, w, C);
762
+ d(T);
761
763
  },
762
764
  [h]
763
- ), b = W(), S = W(!1), g = L(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
765
+ ), P = W(), b = W(!1), v = L(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
764
766
  F(() => ((() => {
765
- if (b.current)
767
+ if (P.current)
766
768
  return;
767
- b.current = new AbortController();
768
- const { signal: T } = b.current, l = () => {
769
- g().forEach((_) => {
769
+ P.current = new AbortController();
770
+ const { signal: C } = P.current, l = () => {
771
+ v().forEach((_) => {
770
772
  const y = _.querySelector(".endOfContent");
771
773
  y && (_.appendChild(y), y.style.width = "", y.style.height = "", _.classList.remove(ze.selecting));
772
774
  });
@@ -774,29 +776,29 @@ const vo = () => {
774
776
  document.addEventListener(
775
777
  "pointerdown",
776
778
  () => {
777
- S.current = !0;
779
+ b.current = !0;
778
780
  },
779
- { signal: T }
781
+ { signal: C }
780
782
  ), document.addEventListener(
781
783
  "pointerup",
782
784
  () => {
783
- S.current = !1, l();
785
+ b.current = !1, l();
784
786
  },
785
- { signal: T }
787
+ { signal: C }
786
788
  ), window.addEventListener(
787
789
  "blur",
788
790
  () => {
789
- S.current = !1, l();
791
+ b.current = !1, l();
790
792
  },
791
- { signal: T }
793
+ { signal: C }
792
794
  ), document.addEventListener(
793
795
  "keyup",
794
796
  () => {
795
- S.current || l();
797
+ b.current || l();
796
798
  },
797
- { signal: T }
799
+ { signal: C }
798
800
  );
799
- let P = null;
801
+ let T = null;
800
802
  document.addEventListener(
801
803
  "selectionchange",
802
804
  () => {
@@ -811,11 +813,11 @@ const vo = () => {
811
813
  const y = /* @__PURE__ */ new Set();
812
814
  for (let x = 0; x < _.rangeCount; x++) {
813
815
  const k = _.getRangeAt(x);
814
- g().forEach(($) => {
816
+ v().forEach(($) => {
815
817
  k.intersectsNode($) && !y.has($) && y.add($);
816
818
  });
817
819
  }
818
- g().forEach((x) => {
820
+ v().forEach((x) => {
819
821
  if (y.has(x))
820
822
  x.classList.add("selecting");
821
823
  else {
@@ -824,54 +826,54 @@ const vo = () => {
824
826
  }
825
827
  });
826
828
  const E = _.getRangeAt(0);
827
- let N = P && (E.compareBoundaryPoints(Range.END_TO_END, P) === 0 || E.compareBoundaryPoints(Range.START_TO_END, P) === 0) ? E.startContainer : E.endContainer;
829
+ let N = T && (E.compareBoundaryPoints(Range.END_TO_END, T) === 0 || E.compareBoundaryPoints(Range.START_TO_END, T) === 0) ? E.startContainer : E.endContainer;
828
830
  N.nodeType === Node.TEXT_NODE && (N = N.parentNode);
829
831
  const R = (O = N.parentElement) == null ? void 0 : O.closest(
830
832
  ze["rp-text-layer"]
831
833
  ), z = R == null ? void 0 : R.querySelector(".endOfContent");
832
- z && R && (z.style.width = R.style.width, z.style.height = R.style.height, (D = N.parentElement) == null || D.insertBefore(z, N.nextSibling)), P = E.cloneRange();
834
+ z && R && (z.style.width = R.style.width, z.style.height = R.style.height, (D = N.parentElement) == null || D.insertBefore(z, N.nextSibling)), T = E.cloneRange();
833
835
  },
834
- { signal: T }
836
+ { signal: C }
835
837
  );
836
838
  })(), () => {
837
- var T;
838
- (T = b.current) == null || T.abort(), b.current = void 0;
839
- }), [g]);
840
- const C = L(() => {
839
+ var C;
840
+ (C = P.current) == null || C.abort(), P.current = void 0;
841
+ }), [v]);
842
+ const S = L(() => {
841
843
  o.current && o.current.classList.add("selecting");
842
- }, []), f = L(() => {
844
+ }, []), m = L(() => {
843
845
  o.current && o.current.classList.remove("selecting");
844
846
  }, []);
845
847
  return F(() => {
846
848
  var l;
847
- if ((l = m.current) == null || l.classList.remove("selected"), !s.length || !a || a.pageIndex !== t - 1)
849
+ if ((l = f.current) == null || l.classList.remove("selected"), !s.length || !a || a.pageIndex !== t - 1)
848
850
  return;
849
851
  const w = h.findIndex(
850
- (P) => JSON.stringify(P) === JSON.stringify(a)
852
+ (T) => JSON.stringify(T) === JSON.stringify(a)
851
853
  );
852
854
  if (w === -1)
853
855
  return;
854
- const T = s.find((P) => P.index === w);
855
- T && (m.current = T.element, c(T.element), T.element.classList.add("selected"));
856
+ const C = s.find((T) => T.index === w);
857
+ C && (f.current = C.element, c(C.element), C.element.classList.add("selected"));
856
858
  }, [a, s, h]), F(() => {
857
859
  const w = n.get(t);
858
860
  if (!w || !o.current)
859
861
  return;
860
- const T = o.current;
862
+ const C = o.current;
861
863
  return u.current && u.current.cancel(), w.page.getTextContent().then((l) => {
862
- const P = w.page.getViewport({ scale: 1 });
864
+ const T = w.page.getViewport({ scale: 1 });
863
865
  return u.current = new Tt.TextLayer({
864
- viewport: P,
866
+ viewport: T,
865
867
  textContentSource: l,
866
- container: T
867
- }), p.current = l, T && (T.innerText = ""), u.current.render();
868
+ container: C
869
+ }), p.current = l, C && (C.innerText = ""), u.current.render();
868
870
  }).then(() => {
869
871
  var y, E;
870
- [].slice.call(T.children).forEach((I) => {
872
+ [].slice.call(C.children).forEach((I) => {
871
873
  I.classList.add(ze["rp-text-layer-text"]);
872
874
  });
873
- const P = (y = u.current) == null ? void 0 : y.textDivs;
874
- P && p.current && v(p.current, P);
875
+ const T = (y = u.current) == null ? void 0 : y.textDivs;
876
+ T && p.current && g(p.current, T);
875
877
  const _ = document.createElement("div");
876
878
  _.className = "endOfContent", (E = o.current) == null || E.appendChild(_);
877
879
  }).catch(() => {
@@ -881,115 +883,115 @@ const vo = () => {
881
883
  };
882
884
  }, [n, t]), F(() => {
883
885
  var l;
884
- [].slice.call(o.current.children).forEach((P) => {
885
- P.classList.add(ze["rp-text-layer-text"]);
886
+ [].slice.call(o.current.children).forEach((T) => {
887
+ T.classList.add(ze["rp-text-layer-text"]);
886
888
  });
887
- const T = (l = u.current) == null ? void 0 : l.textDivs;
888
- T && p.current && v(p.current, T, !0);
889
- }, [v]), /* @__PURE__ */ i(
889
+ const C = (l = u.current) == null ? void 0 : l.textDivs;
890
+ C && p.current && g(p.current, C, !0);
891
+ }, [g]), /* @__PURE__ */ i(
890
892
  "div",
891
893
  {
892
894
  "data-rp": `page-${t}-textLayer`,
893
895
  className: ze["rp-text-layer"],
894
896
  ref: o,
895
- onMouseDown: C,
896
- onMouseUp: f
897
+ onMouseDown: S,
898
+ onMouseUp: m
897
899
  }
898
900
  );
899
- }, So = {
901
+ }, yo = {
900
902
  "rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
901
903
  };
902
- let yo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
903
- const xo = (e) => {
904
- const { pageNumber: t } = e, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] = H(), { setFocusedPage: d, goToPage: u } = oe(), { scrollMode: p } = Oe(), { print: m } = nt(), { download: h } = Un(), v = M(() => o.get(t), [o, t]), b = M(() => v == null ? void 0 : v.page.getViewport(), [v]);
904
+ let xo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
905
+ const Io = (e) => {
906
+ const { pageNumber: t } = e, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] = H(), { setFocusedPage: d, goToPage: u } = oe(), { scrollMode: p } = Oe(), { print: f } = nt(), { download: h } = Un(), g = M(() => o.get(t), [o, t]), P = M(() => g == null ? void 0 : g.page.getViewport(), [g]);
905
907
  F(() => {
906
908
  a.current && (a.current.div.replaceChildren(), a.current = void 0);
907
909
  }, [r]), F(() => {
908
- v && v.page.getAnnotations().then((g) => {
909
- a.current = void 0, s(g), n.current && (n.current.innerText = "");
910
+ g && g.page.getAnnotations().then((v) => {
911
+ a.current = void 0, s(v), n.current && (n.current.innerText = "");
910
912
  });
911
- }, [v]);
912
- const S = L(
913
- (g) => {
914
- !c || !r || (Rr(g), Er(g, r, c).then((C) => {
915
- var f, w;
916
- ((f = C == null ? void 0 : C.data) == null ? void 0 : f.action) === "Print" ? m() : ((w = C == null ? void 0 : C.data) == null ? void 0 : w.action) === "SaveAs" && h();
917
- }), p === ee.PAGE_SCROLLING ? kt(g, c, r, (C) => d(C.pageIndex + 1)) : kt(g, c, r, (C) => u(C.pageIndex + 1)));
913
+ }, [g]);
914
+ const b = L(
915
+ (v) => {
916
+ !c || !r || (Rr(v), Er(v, r, c).then((S) => {
917
+ var m, w;
918
+ ((m = S == null ? void 0 : S.data) == null ? void 0 : m.action) === "Print" ? f() : ((w = S == null ? void 0 : S.data) == null ? void 0 : w.action) === "SaveAs" && h();
919
+ }), p === ee.PAGE_SCROLLING ? kt(v, c, r, (S) => d(S.pageIndex + 1)) : kt(v, c, r, (S) => u(S.pageIndex + 1)));
918
920
  },
919
- [r, c, u, d, p, m, h]
921
+ [r, c, u, d, p, f, h]
920
922
  );
921
923
  return F(() => {
922
- if (!v || !c)
924
+ if (!g || !c)
923
925
  return;
924
- const g = v.page.getViewport();
926
+ const v = g.page.getViewport();
925
927
  if (a.current) {
926
928
  a.current.update({
927
- viewport: g.clone({ dontFlip: !0 })
929
+ viewport: v.clone({ dontFlip: !0 })
928
930
  });
929
931
  return;
930
932
  }
931
- const C = /* @__PURE__ */ new Map([]);
932
- for (const T of c) {
933
- const { annotationType: l } = T;
933
+ const S = /* @__PURE__ */ new Map([]);
934
+ for (const C of c) {
935
+ const { annotationType: l } = C;
934
936
  switch (l) {
935
937
  case Ft.Link:
936
- Or(T);
938
+ Or(C);
937
939
  break;
938
940
  case Ft.Widget:
939
- Nr(T, g, C);
941
+ Nr(C, v, S);
940
942
  break;
941
943
  }
942
944
  }
943
- const f = new AbortController();
945
+ const m = new AbortController();
944
946
  return (async () => {
945
- var P;
947
+ var T;
946
948
  a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new fr({
947
949
  div: n.current,
948
950
  accessibilityManager: void 0,
949
951
  annotationCanvasMap: void 0,
950
952
  annotationEditorUIManager: void 0,
951
953
  structTreeLayer: null,
952
- page: v.page,
953
- viewport: g.clone({ dontFlip: !0 })
954
- }), n.current && Mt(n.current, S);
955
- const T = await (r == null ? void 0 : r.hasJSActions()), l = await (r == null ? void 0 : r.getFieldObjects());
956
- if (f.signal.aborted)
954
+ page: g.page,
955
+ viewport: v.clone({ dontFlip: !0 })
956
+ }), n.current && Mt(n.current, b);
957
+ const C = await (r == null ? void 0 : r.hasJSActions()), l = await (r == null ? void 0 : r.getFieldObjects());
958
+ if (m.signal.aborted)
957
959
  throw "abort";
958
- return (P = a.current) == null ? void 0 : P.render({
960
+ return (T = a.current) == null ? void 0 : T.render({
959
961
  annotations: c,
960
962
  annotationStorage: r == null ? void 0 : r.annotationStorage,
961
- hasJSActions: T,
963
+ hasJSActions: C,
962
964
  fieldObjects: l,
963
965
  div: n.current,
964
- viewport: g.clone({ dontFlip: !0 }),
965
- page: v.page,
966
- imageResourcesPath: yo,
966
+ viewport: v.clone({ dontFlip: !0 }),
967
+ page: g.page,
968
+ imageResourcesPath: xo,
967
969
  renderForms: !0,
968
970
  linkService: new Lr(),
969
971
  downloadManager: null,
970
972
  enableScripting: !1
971
973
  });
972
974
  })().then(() => {
973
- n.current && Dr(n.current, S);
974
- }).catch((T) => {
975
- if (T !== "abort")
976
- throw T;
975
+ n.current && Dr(n.current, b);
976
+ }).catch((C) => {
977
+ if (C !== "abort")
978
+ throw C;
977
979
  }), () => {
978
- f.abort("clear"), n.current && Mt(n.current, S);
980
+ m.abort("clear"), n.current && Mt(n.current, b);
979
981
  };
980
- }, [r, c, S]), /* @__PURE__ */ i(
982
+ }, [r, c, b]), /* @__PURE__ */ i(
981
983
  "div",
982
984
  {
983
985
  "data-rp": `page-${t}-annotationLayer`,
984
- style: { width: `${b == null ? void 0 : b.width}px`, height: `${b == null ? void 0 : b.height}px` },
985
- className: So["rp-annotation-layer"],
986
+ style: { width: `${P == null ? void 0 : P.width}px`, height: `${P == null ? void 0 : P.height}px` },
987
+ className: yo["rp-annotation-layer"],
986
988
  ref: n
987
989
  }
988
990
  );
989
991
  }, dt = {
990
992
  "rp-text-highlight-layer": "_rp-text-highlight-layer_1fxd3_1",
991
993
  "rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1fxd3_14"
992
- }, Io = ({ pageNumber: e }) => {
994
+ }, Lo = ({ pageNumber: e }) => {
993
995
  const t = W(null), n = W(), o = W(), { pages: r } = X(), { highlightMatches: a } = gr(), c = M(() => a.filter((u) => u.pageIndex === e - 1), [a]), s = L(
994
996
  (d, u, p = !1) => {
995
997
  p && mn(d, u), ur(c, d, u);
@@ -1002,19 +1004,19 @@ const xo = (e) => {
1002
1004
  return;
1003
1005
  const u = t.current;
1004
1006
  return n.current && n.current.cancel(), d.page.getTextContent().then((p) => {
1005
- const m = d.page.getViewport({ scale: 1 });
1007
+ const f = d.page.getViewport({ scale: 1 });
1006
1008
  return n.current = new Tt.TextLayer({
1007
- viewport: m,
1009
+ viewport: f,
1008
1010
  textContentSource: p,
1009
1011
  container: u
1010
1012
  }), o.current = p, u && (u.innerText = ""), n.current.render();
1011
1013
  }).then(() => {
1012
1014
  var h;
1013
- [].slice.call(u.children).forEach((v) => {
1014
- v.classList.add(dt["rp-text-highlight-layer-text"]);
1015
+ [].slice.call(u.children).forEach((g) => {
1016
+ g.classList.add(dt["rp-text-highlight-layer-text"]);
1015
1017
  });
1016
- const m = (h = n.current) == null ? void 0 : h.textDivs;
1017
- m && o.current && s(o.current, m);
1018
+ const f = (h = n.current) == null ? void 0 : h.textDivs;
1019
+ f && o.current && s(o.current, f);
1018
1020
  }).catch(() => {
1019
1021
  }), () => {
1020
1022
  var p;
@@ -1022,8 +1024,8 @@ const xo = (e) => {
1022
1024
  };
1023
1025
  }, [r, e]), F(() => {
1024
1026
  var p;
1025
- [].slice.call(t.current.children).forEach((m) => {
1026
- m.classList.add(dt["rp-text-highlight-layer-text"]);
1027
+ [].slice.call(t.current.children).forEach((f) => {
1028
+ f.classList.add(dt["rp-text-highlight-layer-text"]);
1027
1029
  });
1028
1030
  const u = (p = n.current) == null ? void 0 : p.textDivs;
1029
1031
  u && o.current && s(o.current, u, !0);
@@ -1036,30 +1038,30 @@ const xo = (e) => {
1036
1038
  }
1037
1039
  ) });
1038
1040
  }, Rt = We((e, t) => {
1039
- const { pageNumber: n, style: o, ...r } = e, { pages: a } = X(), { rotate: c } = Ye(), { textLayer: s } = ar(), { currentZoom: d } = Je(), u = W(a.get(n)), [p, m] = H(!1), h = W(null), [v, b] = H({
1041
+ const { pageNumber: n, style: o, ...r } = e, { pages: a } = X(), { rotate: c } = Je(), { textLayer: s } = ar(), { currentZoom: d } = Qe(), u = W(a.get(n)), [p, f] = H(!1), h = W(null), [g, P] = H({
1040
1042
  width: 0,
1041
1043
  height: 0
1042
1044
  });
1043
1045
  dn(t, () => h.current), F(() => {
1044
1046
  if (a && (u.current = a.get(n), u.current)) {
1045
- const f = u.current.page.getViewport({ scale: d, rotation: c });
1046
- b(f);
1047
+ const m = u.current.page.getViewport({ scale: d, rotation: c });
1048
+ P(m);
1047
1049
  }
1048
1050
  }, [a, n, c, d]);
1049
- const S = M(() => {
1051
+ const b = M(() => {
1050
1052
  switch (c) {
1051
1053
  case 90:
1052
- return `${v.width / 2}px ${v.width / 2}px`;
1054
+ return `${g.width / 2}px ${g.width / 2}px`;
1053
1055
  case -90:
1054
1056
  case 270:
1055
- return `${v.height / 2}px ${v.height / 2}px`;
1057
+ return `${g.height / 2}px ${g.height / 2}px`;
1056
1058
  default:
1057
1059
  return "center";
1058
1060
  }
1059
- }, [c, v]), g = L(() => {
1060
- m(!0);
1061
- }, []), C = L(() => {
1062
- m(!1);
1061
+ }, [c, g]), v = L(() => {
1062
+ f(!0);
1063
+ }, []), S = L(() => {
1064
+ f(!1);
1063
1065
  }, []);
1064
1066
  return /* @__PURE__ */ i(
1065
1067
  "div",
@@ -1071,7 +1073,7 @@ const xo = (e) => {
1071
1073
  style: {
1072
1074
  ...o,
1073
1075
  "--rp-rotate": `${c}deg`,
1074
- "--rp-page-rotate-translate": `${S}`,
1076
+ "--rp-page-rotate-translate": `${b}`,
1075
1077
  "--scale-factor": d
1076
1078
  },
1077
1079
  className: lt["rp-page-wrapper"],
@@ -1079,16 +1081,16 @@ const xo = (e) => {
1079
1081
  "div",
1080
1082
  {
1081
1083
  style: {
1082
- width: `${v.width}px`,
1083
- height: `${v.height}px`
1084
+ width: `${g.width}px`,
1085
+ height: `${g.height}px`
1084
1086
  },
1085
1087
  className: lt["rp-page"],
1086
1088
  children: [
1087
- /* @__PURE__ */ i(bo, { onLoading: g, onLoaded: C, pageNumber: n }),
1089
+ /* @__PURE__ */ i(Co, { onLoading: v, onLoaded: S, pageNumber: n }),
1088
1090
  p && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Pt, {}) }),
1089
- s && /* @__PURE__ */ i(Po, { pageNumber: n }),
1090
- /* @__PURE__ */ i(Io, { pageNumber: n }),
1091
- /* @__PURE__ */ i(xo, { pageNumber: n })
1091
+ s && /* @__PURE__ */ i(So, { pageNumber: n }),
1092
+ /* @__PURE__ */ i(Lo, { pageNumber: n }),
1093
+ /* @__PURE__ */ i(Io, { pageNumber: n })
1092
1094
  ]
1093
1095
  }
1094
1096
  )
@@ -1105,25 +1107,25 @@ function wt(e, t) {
1105
1107
  return n.__proto__ = o, n;
1106
1108
  }, wt(e, t);
1107
1109
  }
1108
- function Lo(e, t) {
1110
+ function Ro(e, t) {
1109
1111
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, wt(e, t);
1110
1112
  }
1111
1113
  var Zt = Number.isNaN || function(t) {
1112
1114
  return typeof t == "number" && t !== t;
1113
1115
  };
1114
- function Ro(e, t) {
1116
+ function Eo(e, t) {
1115
1117
  return !!(e === t || Zt(e) && Zt(t));
1116
1118
  }
1117
- function Eo(e, t) {
1119
+ function No(e, t) {
1118
1120
  if (e.length !== t.length)
1119
1121
  return !1;
1120
1122
  for (var n = 0; n < e.length; n++)
1121
- if (!Ro(e[n], t[n]))
1123
+ if (!Eo(e[n], t[n]))
1122
1124
  return !1;
1123
1125
  return !0;
1124
1126
  }
1125
1127
  function ut(e, t) {
1126
- t === void 0 && (t = Eo);
1128
+ t === void 0 && (t = No);
1127
1129
  var n, o = [], r, a = !1;
1128
1130
  function c() {
1129
1131
  for (var s = [], d = 0; d < arguments.length; d++)
@@ -1144,7 +1146,7 @@ function Bt(e, t) {
1144
1146
  }
1145
1147
  return n;
1146
1148
  }
1147
- var No = typeof performance == "object" && typeof performance.now == "function", jt = No ? function() {
1149
+ var Oo = typeof performance == "object" && typeof performance.now == "function", jt = Oo ? function() {
1148
1150
  return performance.now();
1149
1151
  } : function() {
1150
1152
  return Date.now();
@@ -1152,7 +1154,7 @@ var No = typeof performance == "object" && typeof performance.now == "function",
1152
1154
  function Kt(e) {
1153
1155
  cancelAnimationFrame(e.id);
1154
1156
  }
1155
- function Oo(e, t) {
1157
+ function Do(e, t) {
1156
1158
  var n = jt();
1157
1159
  function o() {
1158
1160
  jt() - n >= t ? e.call(null) : r.id = requestAnimationFrame(o);
@@ -1163,7 +1165,7 @@ function Oo(e, t) {
1163
1165
  return r;
1164
1166
  }
1165
1167
  var pt = -1;
1166
- function Do(e) {
1168
+ function zo(e) {
1167
1169
  if (e === void 0 && (e = !1), pt === -1 || e) {
1168
1170
  var t = document.createElement("div"), n = t.style;
1169
1171
  n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), pt = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
@@ -1180,20 +1182,20 @@ function Xt(e) {
1180
1182
  }
1181
1183
  return Re;
1182
1184
  }
1183
- var zo = 150, Ao = function(t) {
1185
+ var Ao = 150, Fo = function(t) {
1184
1186
  var n = t.columnIndex;
1185
1187
  t.data;
1186
1188
  var o = t.rowIndex;
1187
1189
  return o + ":" + n;
1188
- }, Ve = null, Ue = null, qe = null;
1189
- process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ve = /* @__PURE__ */ new WeakSet(), Ue = /* @__PURE__ */ new WeakSet(), qe = /* @__PURE__ */ new WeakSet());
1190
- function Fo(e) {
1191
- var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, d = e.getOffsetForColumnAndAlignment, u = e.getOffsetForRowAndAlignment, p = e.getRowHeight, m = e.getRowOffset, h = e.getRowStartIndexForOffset, v = e.getRowStopIndexForStartIndex, b = e.initInstanceProps, S = e.shouldResetStyleCacheOnItemSizeChange, g = e.validateProps;
1192
- return t = /* @__PURE__ */ function(C) {
1193
- Lo(f, C);
1194
- function f(T) {
1190
+ }, Ue = null, qe = null, Ze = null;
1191
+ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ue = /* @__PURE__ */ new WeakSet(), qe = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet());
1192
+ function ko(e) {
1193
+ var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, d = e.getOffsetForColumnAndAlignment, u = e.getOffsetForRowAndAlignment, p = e.getRowHeight, f = e.getRowOffset, h = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, P = e.initInstanceProps, b = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
1194
+ return t = /* @__PURE__ */ function(S) {
1195
+ Ro(m, S);
1196
+ function m(C) {
1195
1197
  var l;
1196
- return l = C.call(this, T) || this, l._instanceProps = b(l.props, qt(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
1198
+ return l = S.call(this, C) || this, l._instanceProps = P(l.props, qt(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
1197
1199
  instance: qt(l),
1198
1200
  isScrolling: !1,
1199
1201
  horizontalScrollDirection: "forward",
@@ -1201,9 +1203,9 @@ function Fo(e) {
1201
1203
  scrollTop: typeof l.props.initialScrollTop == "number" ? l.props.initialScrollTop : 0,
1202
1204
  scrollUpdateWasRequested: !1,
1203
1205
  verticalScrollDirection: "forward"
1204
- }, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ut(function(P, _, y, E, I, N, R, z) {
1206
+ }, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ut(function(T, _, y, E, I, N, R, z) {
1205
1207
  return l.props.onItemsRendered({
1206
- overscanColumnStartIndex: P,
1208
+ overscanColumnStartIndex: T,
1207
1209
  overscanColumnStopIndex: _,
1208
1210
  overscanRowStartIndex: y,
1209
1211
  overscanRowStopIndex: E,
@@ -1212,16 +1214,16 @@ function Fo(e) {
1212
1214
  visibleRowStartIndex: R,
1213
1215
  visibleRowStopIndex: z
1214
1216
  });
1215
- }), l._callOnScroll = void 0, l._callOnScroll = ut(function(P, _, y, E, I) {
1217
+ }), l._callOnScroll = void 0, l._callOnScroll = ut(function(T, _, y, E, I) {
1216
1218
  return l.props.onScroll({
1217
1219
  horizontalScrollDirection: y,
1218
- scrollLeft: P,
1220
+ scrollLeft: T,
1219
1221
  scrollTop: _,
1220
1222
  verticalScrollDirection: E,
1221
1223
  scrollUpdateWasRequested: I
1222
1224
  });
1223
- }), l._getItemStyle = void 0, l._getItemStyle = function(P, _) {
1224
- var y = l.props, E = y.columnWidth, I = y.direction, N = y.rowHeight, R = l._getItemStyleCache(S && E, S && I, S && N), z = P + ":" + _, O;
1225
+ }), l._getItemStyle = void 0, l._getItemStyle = function(T, _) {
1226
+ var y = l.props, E = y.columnWidth, I = y.direction, N = y.rowHeight, R = l._getItemStyleCache(b && E, b && I, b && N), z = T + ":" + _, O;
1225
1227
  if (R.hasOwnProperty(z))
1226
1228
  O = R[z];
1227
1229
  else {
@@ -1230,16 +1232,16 @@ function Fo(e) {
1230
1232
  position: "absolute",
1231
1233
  left: x ? void 0 : D,
1232
1234
  right: x ? D : void 0,
1233
- top: m(l.props, P, l._instanceProps),
1234
- height: p(l.props, P, l._instanceProps),
1235
+ top: f(l.props, T, l._instanceProps),
1236
+ height: p(l.props, T, l._instanceProps),
1235
1237
  width: a(l.props, _, l._instanceProps)
1236
1238
  };
1237
1239
  }
1238
1240
  return O;
1239
- }, l._getItemStyleCache = void 0, l._getItemStyleCache = ut(function(P, _, y) {
1241
+ }, l._getItemStyleCache = void 0, l._getItemStyleCache = ut(function(T, _, y) {
1240
1242
  return {};
1241
- }), l._onScroll = function(P) {
1242
- var _ = P.currentTarget, y = _.clientHeight, E = _.clientWidth, I = _.scrollLeft, N = _.scrollTop, R = _.scrollHeight, z = _.scrollWidth;
1243
+ }), l._onScroll = function(T) {
1244
+ var _ = T.currentTarget, y = _.clientHeight, E = _.clientWidth, I = _.scrollLeft, N = _.scrollTop, R = _.scrollHeight, z = _.scrollWidth;
1243
1245
  l.setState(function(O) {
1244
1246
  if (O.scrollLeft === I && O.scrollTop === N)
1245
1247
  return null;
@@ -1264,11 +1266,11 @@ function Fo(e) {
1264
1266
  scrollUpdateWasRequested: !1
1265
1267
  };
1266
1268
  }, l._resetIsScrollingDebounced);
1267
- }, l._outerRefSetter = function(P) {
1269
+ }, l._outerRefSetter = function(T) {
1268
1270
  var _ = l.props.outerRef;
1269
- l._outerRef = P, typeof _ == "function" ? _(P) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = P);
1271
+ l._outerRef = T, typeof _ == "function" ? _(T) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = T);
1270
1272
  }, l._resetIsScrollingDebounced = function() {
1271
- l._resetIsScrollingTimeoutId !== null && Kt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = Oo(l._resetIsScrolling, zo);
1273
+ l._resetIsScrollingTimeoutId !== null && Kt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = Do(l._resetIsScrolling, Ao);
1272
1274
  }, l._resetIsScrolling = function() {
1273
1275
  l._resetIsScrollingTimeoutId = null, l.setState({
1274
1276
  isScrolling: !1
@@ -1277,23 +1279,23 @@ function Fo(e) {
1277
1279
  });
1278
1280
  }, l;
1279
1281
  }
1280
- f.getDerivedStateFromProps = function(l, P) {
1281
- return ko(l, P), g(l), null;
1282
+ m.getDerivedStateFromProps = function(l, T) {
1283
+ return Mo(l, T), v(l), null;
1282
1284
  };
1283
- var w = f.prototype;
1285
+ var w = m.prototype;
1284
1286
  return w.scrollTo = function(l) {
1285
- var P = l.scrollLeft, _ = l.scrollTop;
1286
- P !== void 0 && (P = Math.max(0, P)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(y) {
1287
- return P === void 0 && (P = y.scrollLeft), _ === void 0 && (_ = y.scrollTop), y.scrollLeft === P && y.scrollTop === _ ? null : {
1288
- horizontalScrollDirection: y.scrollLeft < P ? "forward" : "backward",
1289
- scrollLeft: P,
1287
+ var T = l.scrollLeft, _ = l.scrollTop;
1288
+ T !== void 0 && (T = Math.max(0, T)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(y) {
1289
+ return T === void 0 && (T = y.scrollLeft), _ === void 0 && (_ = y.scrollTop), y.scrollLeft === T && y.scrollTop === _ ? null : {
1290
+ horizontalScrollDirection: y.scrollLeft < T ? "forward" : "backward",
1291
+ scrollLeft: T,
1290
1292
  scrollTop: _,
1291
1293
  scrollUpdateWasRequested: !0,
1292
1294
  verticalScrollDirection: y.scrollTop < _ ? "forward" : "backward"
1293
1295
  };
1294
1296
  }, this._resetIsScrollingDebounced);
1295
1297
  }, w.scrollToItem = function(l) {
1296
- var P = l.align, _ = P === void 0 ? "auto" : P, y = l.columnIndex, E = l.rowIndex, I = this.props, N = I.columnCount, R = I.height, z = I.rowCount, O = I.width, D = this.state, x = D.scrollLeft, k = D.scrollTop, $ = Do();
1298
+ var T = l.align, _ = T === void 0 ? "auto" : T, y = l.columnIndex, E = l.rowIndex, I = this.props, N = I.columnCount, R = I.height, z = I.rowCount, O = I.width, D = this.state, x = D.scrollLeft, k = D.scrollTop, $ = zo();
1297
1299
  y !== void 0 && (y = Math.max(0, Math.min(y, N - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
1298
1300
  var j = c(this.props, this._instanceProps), Y = s(this.props, this._instanceProps), q = Y > O ? $ : 0, B = j > R ? $ : 0;
1299
1301
  this.scrollTo({
@@ -1301,14 +1303,14 @@ function Fo(e) {
1301
1303
  scrollTop: E !== void 0 ? u(this.props, E, _, k, this._instanceProps, q) : k
1302
1304
  });
1303
1305
  }, w.componentDidMount = function() {
1304
- var l = this.props, P = l.initialScrollLeft, _ = l.initialScrollTop;
1306
+ var l = this.props, T = l.initialScrollLeft, _ = l.initialScrollTop;
1305
1307
  if (this._outerRef != null) {
1306
1308
  var y = this._outerRef;
1307
- typeof P == "number" && (y.scrollLeft = P), typeof _ == "number" && (y.scrollTop = _);
1309
+ typeof T == "number" && (y.scrollLeft = T), typeof _ == "number" && (y.scrollTop = _);
1308
1310
  }
1309
1311
  this._callPropsCallbacks();
1310
1312
  }, w.componentDidUpdate = function() {
1311
- var l = this.props.direction, P = this.state, _ = P.scrollLeft, y = P.scrollTop, E = P.scrollUpdateWasRequested;
1313
+ var l = this.props.direction, T = this.state, _ = T.scrollLeft, y = T.scrollTop, E = T.scrollUpdateWasRequested;
1312
1314
  if (E && this._outerRef != null) {
1313
1315
  var I = this._outerRef;
1314
1316
  if (l === "rtl")
@@ -1332,11 +1334,11 @@ function Fo(e) {
1332
1334
  }, w.componentWillUnmount = function() {
1333
1335
  this._resetIsScrollingTimeoutId !== null && Kt(this._resetIsScrollingTimeoutId);
1334
1336
  }, w.render = function() {
1335
- var l = this.props, P = l.children, _ = l.className, y = l.columnCount, E = l.direction, I = l.height, N = l.innerRef, R = l.innerElementType, z = l.innerTagName, O = l.itemData, D = l.itemKey, x = D === void 0 ? Ao : D, k = l.outerElementType, $ = l.outerTagName, j = l.rowCount, Y = l.style, q = l.useIsScrolling, B = l.width, ie = this.state.isScrolling, pe = this._getHorizontalRangeToRender(), J = pe[0], ae = pe[1], Q = this._getVerticalRangeToRender(), Ie = Q[0], Ce = Q[1], Le = [];
1337
+ var l = this.props, T = l.children, _ = l.className, y = l.columnCount, E = l.direction, I = l.height, N = l.innerRef, R = l.innerElementType, z = l.innerTagName, O = l.itemData, D = l.itemKey, x = D === void 0 ? Fo : D, k = l.outerElementType, $ = l.outerTagName, j = l.rowCount, Y = l.style, q = l.useIsScrolling, B = l.width, ie = this.state.isScrolling, pe = this._getHorizontalRangeToRender(), J = pe[0], ae = pe[1], Q = this._getVerticalRangeToRender(), Ie = Q[0], Ce = Q[1], Le = [];
1336
1338
  if (y > 0 && j)
1337
1339
  for (var le = Ie; le <= Ce; le++)
1338
1340
  for (var he = J; he <= ae; he++)
1339
- Le.push(Ge(P, {
1341
+ Le.push(Ve(T, {
1340
1342
  columnIndex: he,
1341
1343
  data: O,
1342
1344
  isScrolling: q ? ie : void 0,
@@ -1349,7 +1351,7 @@ function Fo(e) {
1349
1351
  style: this._getItemStyle(le, he)
1350
1352
  }));
1351
1353
  var De = c(this.props, this._instanceProps), rt = s(this.props, this._instanceProps);
1352
- return Ge(k || $ || "div", {
1354
+ return Ve(k || $ || "div", {
1353
1355
  className: _,
1354
1356
  onScroll: this._onScroll,
1355
1357
  ref: this._outerRefSetter,
@@ -1362,7 +1364,7 @@ function Fo(e) {
1362
1364
  willChange: "transform",
1363
1365
  direction: E
1364
1366
  }, Y)
1365
- }, Ge(R || z || "div", {
1367
+ }, Ve(R || z || "div", {
1366
1368
  children: Le,
1367
1369
  ref: N,
1368
1370
  style: {
@@ -1372,8 +1374,8 @@ function Fo(e) {
1372
1374
  }
1373
1375
  }));
1374
1376
  }, w._callPropsCallbacks = function() {
1375
- var l = this.props, P = l.columnCount, _ = l.onItemsRendered, y = l.onScroll, E = l.rowCount;
1376
- if (typeof _ == "function" && P > 0 && E > 0) {
1377
+ var l = this.props, T = l.columnCount, _ = l.onItemsRendered, y = l.onScroll, E = l.rowCount;
1378
+ if (typeof _ == "function" && T > 0 && E > 0) {
1377
1379
  var I = this._getHorizontalRangeToRender(), N = I[0], R = I[1], z = I[2], O = I[3], D = this._getVerticalRangeToRender(), x = D[0], k = D[1], $ = D[2], j = D[3];
1378
1380
  this._callOnItemsRendered(N, R, x, k, z, O, $, j);
1379
1381
  }
@@ -1382,28 +1384,28 @@ function Fo(e) {
1382
1384
  this._callOnScroll(B, ie, q, J, pe);
1383
1385
  }
1384
1386
  }, w._getHorizontalRangeToRender = function() {
1385
- var l = this.props, P = l.columnCount, _ = l.overscanColumnCount, y = l.overscanColumnsCount, E = l.overscanCount, I = l.rowCount, N = this.state, R = N.horizontalScrollDirection, z = N.isScrolling, O = N.scrollLeft, D = _ || y || E || 1;
1386
- if (P === 0 || I === 0)
1387
+ var l = this.props, T = l.columnCount, _ = l.overscanColumnCount, y = l.overscanColumnsCount, E = l.overscanCount, I = l.rowCount, N = this.state, R = N.horizontalScrollDirection, z = N.isScrolling, O = N.scrollLeft, D = _ || y || E || 1;
1388
+ if (T === 0 || I === 0)
1387
1389
  return [0, 0, 0, 0];
1388
1390
  var x = o(this.props, O, this._instanceProps), k = r(this.props, x, O, this._instanceProps), $ = !z || R === "backward" ? Math.max(1, D) : 1, j = !z || R === "forward" ? Math.max(1, D) : 1;
1389
- return [Math.max(0, x - $), Math.max(0, Math.min(P - 1, k + j)), x, k];
1391
+ return [Math.max(0, x - $), Math.max(0, Math.min(T - 1, k + j)), x, k];
1390
1392
  }, w._getVerticalRangeToRender = function() {
1391
- var l = this.props, P = l.columnCount, _ = l.overscanCount, y = l.overscanRowCount, E = l.overscanRowsCount, I = l.rowCount, N = this.state, R = N.isScrolling, z = N.verticalScrollDirection, O = N.scrollTop, D = y || E || _ || 1;
1392
- if (P === 0 || I === 0)
1393
+ var l = this.props, T = l.columnCount, _ = l.overscanCount, y = l.overscanRowCount, E = l.overscanRowsCount, I = l.rowCount, N = this.state, R = N.isScrolling, z = N.verticalScrollDirection, O = N.scrollTop, D = y || E || _ || 1;
1394
+ if (T === 0 || I === 0)
1393
1395
  return [0, 0, 0, 0];
1394
- var x = h(this.props, O, this._instanceProps), k = v(this.props, x, O, this._instanceProps), $ = !R || z === "backward" ? Math.max(1, D) : 1, j = !R || z === "forward" ? Math.max(1, D) : 1;
1396
+ var x = h(this.props, O, this._instanceProps), k = g(this.props, x, O, this._instanceProps), $ = !R || z === "backward" ? Math.max(1, D) : 1, j = !R || z === "forward" ? Math.max(1, D) : 1;
1395
1397
  return [Math.max(0, x - $), Math.max(0, Math.min(I - 1, k + j)), x, k];
1396
- }, f;
1398
+ }, m;
1397
1399
  }(tr), t.defaultProps = {
1398
1400
  direction: "ltr",
1399
1401
  itemData: void 0,
1400
1402
  useIsScrolling: !1
1401
1403
  }, t;
1402
1404
  }
1403
- var ko = function(t, n) {
1404
- var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, s = t.outerTagName, d = t.overscanColumnsCount, u = t.overscanCount, p = t.overscanRowsCount, m = t.width, h = n.instance;
1405
+ var Mo = function(t, n) {
1406
+ var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, s = t.outerTagName, d = t.overscanColumnsCount, u = t.overscanCount, p = t.overscanRowsCount, f = t.width, h = n.instance;
1405
1407
  if (process.env.NODE_ENV !== "production") {
1406
- if (typeof u == "number" && Ve && !Ve.has(h) && (Ve.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof p == "number") && Ue && !Ue.has(h) && (Ue.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && qe && !qe.has(h) && (qe.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1408
+ if (typeof u == "number" && Ue && !Ue.has(h) && (Ue.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof p == "number") && qe && !qe.has(h) && (qe.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1407
1409
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1408
1410
  switch (r) {
1409
1411
  case "ltr":
@@ -1412,8 +1414,8 @@ var ko = function(t, n) {
1412
1414
  default:
1413
1415
  throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + r + '" was specified.'));
1414
1416
  }
1415
- if (typeof m != "number")
1416
- throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (m === null ? "null" : typeof m) + '" was specified.'));
1417
+ if (typeof f != "number")
1418
+ throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (f === null ? "null" : typeof f) + '" was specified.'));
1417
1419
  if (typeof a != "number")
1418
1420
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1419
1421
  }
@@ -1442,11 +1444,11 @@ var ko = function(t, n) {
1442
1444
  d = u.offset + u.size;
1443
1445
  }
1444
1446
  for (var p = s + 1; p <= o; p++) {
1445
- var m = c(p);
1447
+ var f = c(p);
1446
1448
  a[p] = {
1447
1449
  offset: d,
1448
- size: m
1449
- }, d += m;
1450
+ size: f
1451
+ }, d += f;
1450
1452
  }
1451
1453
  t === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
1452
1454
  }
@@ -1455,7 +1457,7 @@ var ko = function(t, n) {
1455
1457
  var a, c;
1456
1458
  t === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
1457
1459
  var s = c > 0 ? a[c].offset : 0;
1458
- return s >= r ? Rn(t, n, o, c, 0, r) : Mo(t, n, o, Math.max(0, c), r);
1460
+ return s >= r ? Rn(t, n, o, c, 0, r) : Wo(t, n, o, Math.max(0, c), r);
1459
1461
  }, Rn = function(t, n, o, r, a, c) {
1460
1462
  for (; a <= r; ) {
1461
1463
  var s = a + Math.floor((r - a) / 2), d = me(t, n, s, o).offset;
@@ -1464,24 +1466,24 @@ var ko = function(t, n) {
1464
1466
  d < c ? a = s + 1 : d > c && (r = s - 1);
1465
1467
  }
1466
1468
  return a > 0 ? a - 1 : 0;
1467
- }, Mo = function(t, n, o, r, a) {
1469
+ }, Wo = function(t, n, o, r, a) {
1468
1470
  for (var c = t === "column" ? n.columnCount : n.rowCount, s = 1; r < c && me(t, n, r, o).offset < a; )
1469
1471
  r += s, s *= 2;
1470
1472
  return Rn(t, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
1471
1473
  }, Qt = function(t, n, o, r, a, c, s) {
1472
- var d = t === "column" ? n.width : n.height, u = me(t, n, o, c), p = t === "column" ? Ln(n, c) : In(n, c), m = Math.max(0, Math.min(p - d, u.offset)), h = Math.max(0, u.offset - d + s + u.size);
1473
- switch (r === "smart" && (a >= h - d && a <= m + d ? r = "auto" : r = "center"), r) {
1474
+ var d = t === "column" ? n.width : n.height, u = me(t, n, o, c), p = t === "column" ? Ln(n, c) : In(n, c), f = Math.max(0, Math.min(p - d, u.offset)), h = Math.max(0, u.offset - d + s + u.size);
1475
+ switch (r === "smart" && (a >= h - d && a <= f + d ? r = "auto" : r = "center"), r) {
1474
1476
  case "start":
1475
- return m;
1477
+ return f;
1476
1478
  case "end":
1477
1479
  return h;
1478
1480
  case "center":
1479
- return Math.round(h + (m - h) / 2);
1481
+ return Math.round(h + (f - h) / 2);
1480
1482
  case "auto":
1481
1483
  default:
1482
- return a >= h && a <= m ? a : h > m || a < h ? h : m;
1484
+ return a >= h && a <= f ? a : h > f || a < h ? h : f;
1483
1485
  }
1484
- }, Wo = /* @__PURE__ */ Fo({
1486
+ }, Ho = /* @__PURE__ */ ko({
1485
1487
  getColumnOffset: function(t, n, o) {
1486
1488
  return me("column", t, n, o).offset;
1487
1489
  },
@@ -1538,8 +1540,8 @@ var ko = function(t, n) {
1538
1540
  shouldForceUpdate: d
1539
1541
  });
1540
1542
  }, n.resetAfterIndices = function(s) {
1541
- var d = s.columnIndex, u = s.rowIndex, p = s.shouldForceUpdate, m = p === void 0 ? !0 : p;
1542
- typeof d == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, d - 1)), typeof u == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, u - 1)), n._getItemStyleCache(-1), m && n.forceUpdate();
1543
+ var d = s.columnIndex, u = s.rowIndex, p = s.shouldForceUpdate, f = p === void 0 ? !0 : p;
1544
+ typeof d == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, d - 1)), typeof u == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, u - 1)), n._getItemStyleCache(-1), f && n.forceUpdate();
1543
1545
  }, c;
1544
1546
  },
1545
1547
  shouldResetStyleCacheOnItemSizeChange: !1,
@@ -1563,30 +1565,30 @@ function en(e, t) {
1563
1565
  return !0;
1564
1566
  return !1;
1565
1567
  }
1566
- var Ho = ["style"], $o = ["style"];
1567
- function Go(e, t) {
1568
- var n = e.style, o = Bt(e, Ho), r = t.style, a = Bt(t, $o);
1568
+ var $o = ["style"], Go = ["style"];
1569
+ function Vo(e, t) {
1570
+ var n = e.style, o = Bt(e, $o), r = t.style, a = Bt(t, Go);
1569
1571
  return !en(n, r) && !en(o, a);
1570
1572
  }
1571
- const Vo = () => {
1572
- const { viewMode: e } = Qe(), { scrollMode: t } = Oe(), { setColumnCount: n } = pn(), { virtualScrollableElementRef: o } = et(), r = tt(), a = L(
1573
- (v) => r.widths[v] || 0,
1573
+ const Uo = () => {
1574
+ const { viewMode: e } = He(), { scrollMode: t } = Oe(), { setColumnCount: n } = pn(), { virtualScrollableElementRef: o } = et(), r = tt(), a = L(
1575
+ (g) => r.widths[g] || 0,
1574
1576
  [r.widths]
1575
1577
  ), c = L(
1576
- (v) => r.heights[v] || 0,
1578
+ (g) => r.heights[g] || 0,
1577
1579
  [r.heights]
1578
- ), s = M(() => r.heights.length, [r.heights]), d = M(() => Math.max(...r.widths), [r.widths]), u = M(() => t === ee.HORIZONTAL_SCROLLING ? s : e === Ze.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, d]);
1580
+ ), s = M(() => r.heights.length, [r.heights]), d = M(() => Math.max(...r.widths), [r.widths]), u = M(() => t === ee.HORIZONTAL_SCROLLING ? s : e === Be.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, d]);
1579
1581
  F(() => {
1580
1582
  n(u);
1581
1583
  }, [u, n]);
1582
- const p = M(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(s / u), [u, s, t]), m = M(() => r.heights.reduce((v, b) => v + b, 0) / r.heights.length || 0, [r]), h = M(() => r.widths.reduce((v, b) => v + b, 0) / r.heights.length || 0, [r]);
1584
+ const p = M(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(s / u), [u, s, t]), f = M(() => r.heights.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]), h = M(() => r.widths.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]);
1583
1585
  return {
1584
1586
  rowCount: p,
1585
1587
  rowHeight: c,
1586
1588
  columnCount: u,
1587
1589
  columnWidth: a,
1588
1590
  pageDimension: r,
1589
- estimatedRowHeight: m,
1591
+ estimatedRowHeight: f,
1590
1592
  estimatedColumnWidth: h
1591
1593
  };
1592
1594
  };
@@ -1606,69 +1608,69 @@ mt == null || rn == null ? (bt = ht, Ct = function(t) {
1606
1608
  }, tn);
1607
1609
  return [n, o];
1608
1610
  });
1609
- function Uo(e) {
1611
+ function qo(e) {
1610
1612
  let t, n, o, r, a, c, s;
1611
1613
  const d = typeof document < "u" && document.attachEvent;
1612
1614
  if (!d) {
1613
- c = function(C) {
1614
- const f = C.__resizeTriggers__, w = f.firstElementChild, T = f.lastElementChild, l = w.firstElementChild;
1615
- T.scrollLeft = T.scrollWidth, T.scrollTop = T.scrollHeight, l.style.width = w.offsetWidth + 1 + "px", l.style.height = w.offsetHeight + 1 + "px", w.scrollLeft = w.scrollWidth, w.scrollTop = w.scrollHeight;
1616
- }, a = function(C) {
1617
- return C.offsetWidth !== C.__resizeLast__.width || C.offsetHeight !== C.__resizeLast__.height;
1618
- }, s = function(C) {
1619
- if (C.target.className && typeof C.target.className.indexOf == "function" && C.target.className.indexOf("contract-trigger") < 0 && C.target.className.indexOf("expand-trigger") < 0)
1615
+ c = function(S) {
1616
+ const m = S.__resizeTriggers__, w = m.firstElementChild, C = m.lastElementChild, l = w.firstElementChild;
1617
+ C.scrollLeft = C.scrollWidth, C.scrollTop = C.scrollHeight, l.style.width = w.offsetWidth + 1 + "px", l.style.height = w.offsetHeight + 1 + "px", w.scrollLeft = w.scrollWidth, w.scrollTop = w.scrollHeight;
1618
+ }, a = function(S) {
1619
+ return S.offsetWidth !== S.__resizeLast__.width || S.offsetHeight !== S.__resizeLast__.height;
1620
+ }, s = function(S) {
1621
+ if (S.target.className && typeof S.target.className.indexOf == "function" && S.target.className.indexOf("contract-trigger") < 0 && S.target.className.indexOf("expand-trigger") < 0)
1620
1622
  return;
1621
- const f = this;
1623
+ const m = this;
1622
1624
  c(this), this.__resizeRAF__ && bt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
1623
- a(f) && (f.__resizeLast__.width = f.offsetWidth, f.__resizeLast__.height = f.offsetHeight, f.__resizeListeners__.forEach(function(l) {
1624
- l.call(f, C);
1625
+ a(m) && (m.__resizeLast__.width = m.offsetWidth, m.__resizeLast__.height = m.offsetHeight, m.__resizeListeners__.forEach(function(l) {
1626
+ l.call(m, S);
1625
1627
  }));
1626
1628
  });
1627
1629
  };
1628
- let h = !1, v = "";
1630
+ let h = !1, g = "";
1629
1631
  o = "animationstart";
1630
- const b = "Webkit Moz O ms".split(" ");
1631
- let S = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), g = "";
1632
+ const P = "Webkit Moz O ms".split(" ");
1633
+ let b = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
1632
1634
  {
1633
- const C = document.createElement("fakeelement");
1634
- if (C.style.animationName !== void 0 && (h = !0), h === !1) {
1635
- for (let f = 0; f < b.length; f++)
1636
- if (C.style[b[f] + "AnimationName"] !== void 0) {
1637
- g = b[f], v = "-" + g.toLowerCase() + "-", o = S[f], h = !0;
1635
+ const S = document.createElement("fakeelement");
1636
+ if (S.style.animationName !== void 0 && (h = !0), h === !1) {
1637
+ for (let m = 0; m < P.length; m++)
1638
+ if (S.style[P[m] + "AnimationName"] !== void 0) {
1639
+ v = P[m], g = "-" + v.toLowerCase() + "-", o = b[m], h = !0;
1638
1640
  break;
1639
1641
  }
1640
1642
  }
1641
1643
  }
1642
- n = "resizeanim", t = "@" + v + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = v + "animation: 1ms " + n + "; ";
1644
+ n = "resizeanim", t = "@" + g + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = g + "animation: 1ms " + n + "; ";
1643
1645
  }
1644
1646
  const u = function(h) {
1645
1647
  if (!h.getElementById("detectElementResize")) {
1646
- const v = (t || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', b = h.head || h.getElementsByTagName("head")[0], S = h.createElement("style");
1647
- S.id = "detectElementResize", S.type = "text/css", e != null && S.setAttribute("nonce", e), S.styleSheet ? S.styleSheet.cssText = v : S.appendChild(h.createTextNode(v)), b.appendChild(S);
1648
+ const g = (t || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', P = h.head || h.getElementsByTagName("head")[0], b = h.createElement("style");
1649
+ b.id = "detectElementResize", b.type = "text/css", e != null && b.setAttribute("nonce", e), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(h.createTextNode(g)), P.appendChild(b);
1648
1650
  }
1649
1651
  };
1650
1652
  return {
1651
- addResizeListener: function(h, v) {
1653
+ addResizeListener: function(h, g) {
1652
1654
  if (d)
1653
- h.attachEvent("onresize", v);
1655
+ h.attachEvent("onresize", g);
1654
1656
  else {
1655
1657
  if (!h.__resizeTriggers__) {
1656
- const b = h.ownerDocument, S = re.getComputedStyle(h);
1657
- S && S.position === "static" && (h.style.position = "relative"), u(b), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = b.createElement("div")).className = "resize-triggers";
1658
- const g = b.createElement("div");
1659
- g.className = "expand-trigger", g.appendChild(b.createElement("div"));
1660
- const C = b.createElement("div");
1661
- C.className = "contract-trigger", h.__resizeTriggers__.appendChild(g), h.__resizeTriggers__.appendChild(C), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(w) {
1658
+ const P = h.ownerDocument, b = re.getComputedStyle(h);
1659
+ b && b.position === "static" && (h.style.position = "relative"), u(P), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = P.createElement("div")).className = "resize-triggers";
1660
+ const v = P.createElement("div");
1661
+ v.className = "expand-trigger", v.appendChild(P.createElement("div"));
1662
+ const S = P.createElement("div");
1663
+ S.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(S), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(w) {
1662
1664
  w.animationName === n && c(h);
1663
1665
  }, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
1664
1666
  }
1665
- h.__resizeListeners__.push(v);
1667
+ h.__resizeListeners__.push(g);
1666
1668
  }
1667
1669
  },
1668
- removeResizeListener: function(h, v) {
1670
+ removeResizeListener: function(h, g) {
1669
1671
  if (d)
1670
- h.detachEvent("onresize", v);
1671
- else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(v), 1), !h.__resizeListeners__.length) {
1672
+ h.detachEvent("onresize", g);
1673
+ else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(g), 1), !h.__resizeListeners__.length) {
1672
1674
  h.removeEventListener("scroll", s, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
1673
1675
  try {
1674
1676
  h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
@@ -1678,7 +1680,7 @@ function Uo(e) {
1678
1680
  }
1679
1681
  };
1680
1682
  }
1681
- class qo extends nr {
1683
+ class Zo extends nr {
1682
1684
  constructor(...t) {
1683
1685
  super(...t), this.state = {
1684
1686
  height: this.props.defaultHeight || 0,
@@ -1693,17 +1695,17 @@ class qo extends nr {
1693
1695
  onResize: r
1694
1696
  } = this.props;
1695
1697
  if (this._parentNode) {
1696
- const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), u = parseFloat(a.paddingBottom || "0"), p = this._parentNode.getBoundingClientRect(), m = p.height - d - u, h = p.width - c - s, v = this._parentNode.offsetHeight - d - u, b = this._parentNode.offsetWidth - c - s;
1697
- (!n && (this.state.height !== v || this.state.scaledHeight !== m) || !o && (this.state.width !== b || this.state.scaledWidth !== h)) && (this.setState({
1698
- height: v,
1699
- width: b,
1700
- scaledHeight: m,
1698
+ const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), u = parseFloat(a.paddingBottom || "0"), p = this._parentNode.getBoundingClientRect(), f = p.height - d - u, h = p.width - c - s, g = this._parentNode.offsetHeight - d - u, P = this._parentNode.offsetWidth - c - s;
1699
+ (!n && (this.state.height !== g || this.state.scaledHeight !== f) || !o && (this.state.width !== P || this.state.scaledWidth !== h)) && (this.setState({
1700
+ height: g,
1701
+ width: P,
1702
+ scaledHeight: f,
1701
1703
  scaledWidth: h
1702
1704
  }), typeof r == "function" && r({
1703
- height: v,
1704
- scaledHeight: m,
1705
+ height: g,
1706
+ scaledHeight: f,
1705
1707
  scaledWidth: h,
1706
- width: b
1708
+ width: P
1707
1709
  }));
1708
1710
  }
1709
1711
  }, this._setRef = (n) => {
@@ -1719,7 +1721,7 @@ class qo extends nr {
1719
1721
  const o = n.ownerDocument.defaultView.ResizeObserver;
1720
1722
  o != null ? (this._resizeObserver = new o(() => {
1721
1723
  this._timeoutId = setTimeout(this._onResize, 0);
1722
- }), this._resizeObserver.observe(n)) : (this._detectElementResize = Uo(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
1724
+ }), this._resizeObserver.observe(n)) : (this._detectElementResize = qo(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
1723
1725
  }
1724
1726
  }
1725
1727
  componentWillUnmount() {
@@ -1737,27 +1739,27 @@ class qo extends nr {
1737
1739
  onResize: d,
1738
1740
  style: u = {},
1739
1741
  tagName: p = "div",
1740
- ...m
1742
+ ...f
1741
1743
  } = this.props, {
1742
1744
  height: h,
1743
- scaledHeight: v,
1744
- scaledWidth: b,
1745
- width: S
1746
- } = this.state, g = {
1745
+ scaledHeight: g,
1746
+ scaledWidth: P,
1747
+ width: b
1748
+ } = this.state, v = {
1747
1749
  overflow: "visible"
1748
- }, C = {};
1749
- let f = !1;
1750
- return r || (h === 0 && (f = !0), g.height = 0, C.height = h, C.scaledHeight = v), a || (S === 0 && (f = !0), g.width = 0, C.width = S, C.scaledWidth = b), c && (f = !1), Ge(p, {
1750
+ }, S = {};
1751
+ let m = !1;
1752
+ return r || (h === 0 && (m = !0), v.height = 0, S.height = h, S.scaledHeight = g), a || (b === 0 && (m = !0), v.width = 0, S.width = b, S.scaledWidth = P), c && (m = !1), Ve(p, {
1751
1753
  ref: this._setRef,
1752
1754
  style: {
1753
- ...g,
1755
+ ...v,
1754
1756
  ...u
1755
1757
  },
1756
- ...m
1757
- }, !f && t(C));
1758
+ ...f
1759
+ }, !m && t(S));
1758
1760
  }
1759
1761
  }
1760
- const Zo = ({ widths: e, heights: t }) => {
1762
+ const Bo = ({ widths: e, heights: t }) => {
1761
1763
  const { focusedPage: n, totalPages: o } = oe(), r = M(() => {
1762
1764
  const s = [], d = Math.ceil(n / 2) * 2 - 1;
1763
1765
  if (s.push(d), d + 1 < o) {
@@ -1781,7 +1783,7 @@ const Zo = ({ widths: e, heights: t }) => {
1781
1783
  }
1782
1784
  ], [e, t, r]), c = M(() => a.reduce((s, d) => s + Number(d.width || 0), 0), [a]);
1783
1785
  return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: r.map((s, d) => /* @__PURE__ */ i(Rt, { style: a[d], pageNumber: s }, s)) });
1784
- }, Bo = ({ widths: e, heights: t }) => {
1786
+ }, jo = ({ widths: e, heights: t }) => {
1785
1787
  const { focusedPage: n } = oe(), o = M(() => ({
1786
1788
  position: "absolute",
1787
1789
  width: e(n - 1),
@@ -1797,72 +1799,72 @@ const Zo = ({ widths: e, heights: t }) => {
1797
1799
  children: /* @__PURE__ */ i(Rt, { style: o, pageNumber: n }, n)
1798
1800
  }
1799
1801
  );
1800
- }, jo = (e, t, n) => {
1801
- const o = W(), { contentRef: r } = we(), { heights: a, widths: c } = tt(), { setFocusedPage: s } = oe(), [d, u] = H([]), { targetScrollPage: p } = fn(), m = St(d, 0, 500), h = M(() => a.map((b, S) => {
1802
- const g = c[S], C = Wr(S + 1, e), f = g * C.columnIndex, w = b * C.rowIndex, T = f + g, l = w + b;
1802
+ }, Ko = (e, t, n) => {
1803
+ const o = W(), { contentRef: r } = we(), { heights: a, widths: c } = tt(), { setFocusedPage: s } = oe(), [d, u] = H([]), { targetScrollPage: p } = fn(), f = St(d, 0, 500), h = M(() => a.map((P, b) => {
1804
+ const v = c[b], S = Wr(b + 1, e), m = v * S.columnIndex, w = P * S.rowIndex, C = m + v, l = w + P;
1803
1805
  return {
1804
- pageNumber: S + 1,
1805
- ...C,
1806
- width: g,
1807
- height: b,
1808
- startX: f,
1806
+ pageNumber: b + 1,
1807
+ ...S,
1808
+ width: v,
1809
+ height: P,
1810
+ startX: m,
1809
1811
  startY: w,
1810
- endX: T,
1812
+ endX: C,
1811
1813
  endY: l
1812
1814
  };
1813
1815
  }), [a, c, e, t]);
1814
1816
  F(() => {
1815
- var S;
1816
- m.length > 0 && !p.current && s(m[0].pageNumber);
1817
- let b = (S = m[0]) == null ? void 0 : S.ratio;
1818
- b && m.filter((g) => Math.round(g.ratio) === Math.round(b)).some((g) => g.pageNumber === p.current) && (p.current = void 0);
1819
- }, [m, s]);
1820
- const v = L(
1821
- (b) => {
1817
+ var b;
1818
+ f.length > 0 && !p.current && s(f[0].pageNumber);
1819
+ let P = (b = f[0]) == null ? void 0 : b.ratio;
1820
+ P && f.filter((v) => Math.round(v.ratio) === Math.round(P)).some((v) => v.pageNumber === p.current) && (p.current = void 0);
1821
+ }, [f, s]);
1822
+ const g = L(
1823
+ (P) => {
1822
1824
  o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
1823
- const S = b.target, g = {
1824
- startTop: S.scrollTop,
1825
- startLeft: S.scrollLeft,
1826
- endTop: S.scrollTop + S.clientHeight,
1827
- endLeft: S.scrollLeft + S.clientWidth
1828
- }, C = h.filter((f) => {
1829
- const w = f.endX >= g.startLeft && f.endY >= g.startTop, T = f.startX <= g.endLeft && f.startY <= g.endTop;
1830
- return w && T;
1831
- }).map((f) => {
1832
- const w = g.startLeft > f.startX ? g.startLeft : f.startX, T = g.startTop > f.startY ? g.startTop : f.startY, l = g.endLeft < f.endX ? g.endLeft : f.endX, P = g.endTop < f.endY ? g.endTop : f.endY, _ = l - w, y = P - T, I = +(_ * y / (f.width * f.height) * 100).toFixed(2);
1825
+ const b = P.target, v = {
1826
+ startTop: b.scrollTop,
1827
+ startLeft: b.scrollLeft,
1828
+ endTop: b.scrollTop + b.clientHeight,
1829
+ endLeft: b.scrollLeft + b.clientWidth
1830
+ }, S = h.filter((m) => {
1831
+ const w = m.endX >= v.startLeft && m.endY >= v.startTop, C = m.startX <= v.endLeft && m.startY <= v.endTop;
1832
+ return w && C;
1833
+ }).map((m) => {
1834
+ const w = v.startLeft > m.startX ? v.startLeft : m.startX, C = v.startTop > m.startY ? v.startTop : m.startY, l = v.endLeft < m.endX ? v.endLeft : m.endX, T = v.endTop < m.endY ? v.endTop : m.endY, _ = l - w, y = T - C, I = +(_ * y / (m.width * m.height) * 100).toFixed(2);
1833
1835
  return {
1834
- pageNumber: f.pageNumber,
1836
+ pageNumber: m.pageNumber,
1835
1837
  ratio: I
1836
1838
  };
1837
- }).sort((f, w) => w.ratio - f.ratio);
1838
- u(C);
1839
+ }).sort((m, w) => w.ratio - m.ratio);
1840
+ u(S);
1839
1841
  });
1840
1842
  },
1841
1843
  [r, h]
1842
1844
  );
1843
1845
  F(() => {
1844
1846
  if (n)
1845
- return n == null || n.addEventListener("scroll", v), () => {
1846
- n == null || n.removeEventListener("scroll", v);
1847
+ return n == null || n.addEventListener("scroll", g), () => {
1848
+ n == null || n.removeEventListener("scroll", g);
1847
1849
  };
1848
- }, [n, v]);
1849
- }, Ko = rr(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
1850
+ }, [n, g]);
1851
+ }, Xo = rr(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
1850
1852
  const r = Hr(t, e, n.columnCount);
1851
1853
  return /* @__PURE__ */ i(Rt, { style: o, pageNumber: r }, r);
1852
- }, Go), Rs = () => {
1854
+ }, Vo), Os = () => {
1853
1855
  const { initialPage: e = 1, initialScrollMode: t, instanceId: n } = cr(), { pagesRef: o, setPagesRef: r } = we(), { scrollToPage: a } = Cn(), {
1854
1856
  virtualScrollRef: c,
1855
1857
  getVirtualScrollRef: s,
1856
1858
  getPageScrollElementRef: d,
1857
1859
  getVirtualScrollableElementRef: u,
1858
1860
  setTotalInnerDimensions: p,
1859
- virtualScrollableElementRef: m,
1861
+ virtualScrollableElementRef: f,
1860
1862
  totalInnerDimensions: h,
1861
- pageScrollElementRef: v
1862
- } = et(), b = W(!0), { nextPage: S, prevPage: g, setFocusedPage: C, focusedPage: f } = oe(), { scrollMode: w } = Oe(), { viewMode: T } = Qe(), l = W(null), { loading: P } = X(), { LoaderImageComponent: _ } = gn(), y = W(
1863
+ pageScrollElementRef: g
1864
+ } = et(), P = W(!0), { nextPage: b, prevPage: v, setFocusedPage: S, focusedPage: m } = oe(), { scrollMode: w } = Oe(), { viewMode: C } = He(), l = W(null), { loading: T } = X(), { LoaderImageComponent: _ } = gn(), y = W(
1863
1865
  h
1864
1866
  ), E = W({
1865
- viewMode: T,
1867
+ viewMode: C,
1866
1868
  scrollMode: w
1867
1869
  }), I = W(!1), N = W(), { isFullScreen: R } = lr(), {
1868
1870
  pageDimension: z,
@@ -1872,8 +1874,8 @@ const Zo = ({ widths: e, heights: t }) => {
1872
1874
  columnWidth: k,
1873
1875
  estimatedColumnWidth: $,
1874
1876
  estimatedRowHeight: j
1875
- } = Vo(), Y = St(h, 100), q = W();
1876
- jo(x, O, m);
1877
+ } = Uo(), Y = St(h, 100), q = W();
1878
+ Ko(x, O, f);
1877
1879
  const B = W({
1878
1880
  scrollTop: 0,
1879
1881
  scrollLeft: 0
@@ -1886,9 +1888,9 @@ const Zo = ({ widths: e, heights: t }) => {
1886
1888
  }), [x]), Ce = L(
1887
1889
  (G) => {
1888
1890
  const V = document.activeElement !== o;
1889
- !R && V || (["ArrowUp", "ArrowLeft"].includes(G.key) ? (G.preventDefault(), g()) : ["ArrowDown", "ArrowRight"].includes(G.key) && (G.preventDefault(), S()));
1891
+ !R && V || (["ArrowUp", "ArrowLeft"].includes(G.key) ? (G.preventDefault(), v()) : ["ArrowDown", "ArrowRight"].includes(G.key) && (G.preventDefault(), b()));
1890
1892
  },
1891
- [S, g, R, w]
1893
+ [b, v, R, w]
1892
1894
  );
1893
1895
  F(() => (window.addEventListener("keydown", Ce), () => {
1894
1896
  window.removeEventListener("keydown", Ce);
@@ -1904,21 +1906,21 @@ const Zo = ({ widths: e, heights: t }) => {
1904
1906
  }, [O, x, z, c]);
1905
1907
  const Le = L(
1906
1908
  (G, V) => {
1907
- if (!m)
1909
+ if (!f)
1908
1910
  return { scrollTop: 0, scrollLeft: 0 };
1909
1911
  const Te = B.current.scrollTop > V, Pe = B.current.scrollLeft > G;
1910
1912
  return Te || Pe ? B.current : {
1911
- scrollTop: m.scrollTop,
1912
- scrollLeft: m.scrollLeft
1913
+ scrollTop: f.scrollTop,
1914
+ scrollLeft: f.scrollLeft
1913
1915
  };
1914
1916
  },
1915
- [m]
1917
+ [f]
1916
1918
  ), le = L(
1917
1919
  (G, V) => {
1918
- if (E.current.viewMode !== T || E.current.scrollMode !== w) {
1919
- q.current && clearTimeout(q.current), I.current = !0, a(f, "auto"), q.current = setTimeout(() => {
1920
+ if (E.current.viewMode !== C || E.current.scrollMode !== w) {
1921
+ q.current && clearTimeout(q.current), I.current = !0, a(m, "auto"), q.current = setTimeout(() => {
1920
1922
  requestAnimationFrame(() => {
1921
- E.current = { viewMode: T, scrollMode: w };
1923
+ E.current = { viewMode: C, scrollMode: w };
1922
1924
  });
1923
1925
  }, 100);
1924
1926
  return;
@@ -1943,7 +1945,7 @@ const Zo = ({ widths: e, heights: t }) => {
1943
1945
  width: V.width
1944
1946
  };
1945
1947
  },
1946
- [c, T, w, a]
1948
+ [c, C, w, a]
1947
1949
  );
1948
1950
  F(() => {
1949
1951
  clearTimeout(N.current);
@@ -1966,7 +1968,7 @@ const Zo = ({ widths: e, heights: t }) => {
1966
1968
  scrollLeft: G.scrollLeft
1967
1969
  };
1968
1970
  },
1969
- [m]
1971
+ [f]
1970
1972
  );
1971
1973
  F(() => () => {
1972
1974
  q.current && clearTimeout(q.current);
@@ -1984,31 +1986,31 @@ const Zo = ({ widths: e, heights: t }) => {
1984
1986
  [Q, J, de]
1985
1987
  );
1986
1988
  return F(() => {
1987
- P && ae();
1988
- }, [P]), F(() => {
1989
- if (!(Y.height === 0 || !b.current)) {
1989
+ T && ae();
1990
+ }, [T]), F(() => {
1991
+ if (!(Y.height === 0 || !P.current)) {
1990
1992
  if (t === ee.PAGE_SCROLLING) {
1991
- e !== f && v && C(e), b.current = !1;
1993
+ e !== m && g && S(e), P.current = !1;
1992
1994
  return;
1993
1995
  }
1994
- a(e, "auto"), C(e), b.current = !1;
1996
+ a(e, "auto"), S(e), P.current = !1;
1995
1997
  }
1996
1998
  }, [
1997
1999
  a,
1998
2000
  t,
1999
- v,
2000
- C,
2001
+ g,
2002
+ S,
2001
2003
  Y
2002
- ]), /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: De, children: /* @__PURE__ */ i(qo, { style: { minHeight: "50px" }, children: ({ width: G, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: rt, style: { width: G, height: V }, children: w === ee.PAGE_SCROLLING ? /* @__PURE__ */ i(
2004
+ ]), /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: De, children: /* @__PURE__ */ i(Zo, { style: { minHeight: "50px" }, children: ({ width: G, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: rt, style: { width: G, height: V }, children: w === ee.PAGE_SCROLLING ? /* @__PURE__ */ i(
2003
2005
  "div",
2004
2006
  {
2005
2007
  ref: d,
2006
2008
  style: { width: G, height: V },
2007
2009
  className: te(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
2008
- children: T === Ze.DUAL_PAGE ? /* @__PURE__ */ i(Zo, { widths: k, heights: D }) : /* @__PURE__ */ i(Bo, { widths: k, heights: D })
2010
+ children: C === Be.DUAL_PAGE ? /* @__PURE__ */ i(Bo, { widths: k, heights: D }) : /* @__PURE__ */ i(jo, { widths: k, heights: D })
2009
2011
  }
2010
2012
  ) : $ ? /* @__PURE__ */ i(
2011
- Wo,
2013
+ Ho,
2012
2014
  {
2013
2015
  ref: s,
2014
2016
  itemData: Ie,
@@ -2027,9 +2029,9 @@ const Zo = ({ widths: e, heights: t }) => {
2027
2029
  de["rp-pages"],
2028
2030
  w === ee.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
2029
2031
  ),
2030
- children: Ko
2032
+ children: Xo
2031
2033
  }
2032
- ) : P ? null : /* @__PURE__ */ i(
2034
+ ) : T ? null : /* @__PURE__ */ i(
2033
2035
  "div",
2034
2036
  {
2035
2037
  className: de["rp-loader"],
@@ -2053,28 +2055,28 @@ const Zo = ({ widths: e, heights: t }) => {
2053
2055
  "rp-paginate": "_rp-paginate_1y9vo_1",
2054
2056
  "rp-page-input": "_rp-page-input_1y9vo_6",
2055
2057
  "rp-total-page": "_rp-total-page_1y9vo_11"
2056
- }, Xo = () => {
2058
+ }, Yo = () => {
2057
2059
  const { prevIcon: e } = ue();
2058
2060
  return e || /* @__PURE__ */ i(Me, {});
2059
- }, Yo = () => {
2061
+ }, Jo = () => {
2060
2062
  const { nextIcon: e } = ue();
2061
2063
  return e || /* @__PURE__ */ i(Me, { style: { transform: "rotate(180deg" } });
2062
- }, Jo = () => {
2064
+ }, Qo = () => {
2063
2065
  const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = oe(), [c, s] = H(e.toString()), { pageNavigationTool: d = !0 } = fe(), { isSmallScreen: u } = be(), { localeMessages: p } = se();
2064
2066
  F(() => {
2065
2067
  s(e.toString());
2066
2068
  }, [e]);
2067
- const m = L((S) => {
2068
- const g = S.target.value;
2069
- s(g);
2069
+ const f = L((b) => {
2070
+ const v = b.target.value;
2071
+ s(v);
2070
2072
  }, []), h = L(async () => {
2071
- const S = a(c);
2072
- S.success || s(S.currentPage.toString());
2073
- }, [a, c, t]), v = L(() => {
2073
+ const b = a(c);
2074
+ b.success || s(b.currentPage.toString());
2075
+ }, [a, c, t]), g = L(() => {
2074
2076
  s(e.toString());
2075
- }, [e]), b = L(
2076
- (S) => {
2077
- S.key === "Enter" && h();
2077
+ }, [e]), P = L(
2078
+ (b) => {
2079
+ b.key === "Enter" && h();
2078
2080
  },
2079
2081
  [h]
2080
2082
  );
@@ -2095,15 +2097,15 @@ const Zo = ({ widths: e, heights: t }) => {
2095
2097
  onClick: r,
2096
2098
  "aria-label": p == null ? void 0 : p.previousPageTooltip,
2097
2099
  "aria-disabled": e === 1,
2098
- children: /* @__PURE__ */ i(Xo, {})
2100
+ children: /* @__PURE__ */ i(Yo, {})
2099
2101
  }
2100
2102
  ) }),
2101
2103
  /* @__PURE__ */ i(Z, { content: p == null ? void 0 : p.currentPageTooltip, children: /* @__PURE__ */ i(
2102
2104
  un,
2103
2105
  {
2104
- onKeyDown: b,
2105
- onBlur: v,
2106
- onChange: m,
2106
+ onKeyDown: P,
2107
+ onBlur: g,
2108
+ onChange: f,
2107
2109
  value: c,
2108
2110
  className: ft["rp-page-input"]
2109
2111
  }
@@ -2118,12 +2120,12 @@ const Zo = ({ widths: e, heights: t }) => {
2118
2120
  onClick: o,
2119
2121
  "aria-label": p == null ? void 0 : p.nextPageTooltip,
2120
2122
  "aria-disabled": e === t,
2121
- children: /* @__PURE__ */ i(Yo, {})
2123
+ children: /* @__PURE__ */ i(Jo, {})
2122
2124
  }
2123
2125
  ) })
2124
2126
  ] }) : null;
2125
2127
  };
2126
- var Et = "Dialog", [En, Es] = Ur(Et), [Qo, ce] = En(Et), Nn = (e) => {
2128
+ var Et = "Dialog", [En, Ds] = qr(Et), [ei, ce] = En(Et), Nn = (e) => {
2127
2129
  const {
2128
2130
  __scopeDialog: t,
2129
2131
  children: n,
@@ -2137,7 +2139,7 @@ var Et = "Dialog", [En, Es] = Ur(Et), [Qo, ce] = En(Et), Nn = (e) => {
2137
2139
  onChange: a
2138
2140
  });
2139
2141
  return /* @__PURE__ */ i(
2140
- Qo,
2142
+ ei,
2141
2143
  {
2142
2144
  scope: t,
2143
2145
  triggerRef: s,
@@ -2147,18 +2149,18 @@ var Et = "Dialog", [En, Es] = Ur(Et), [Qo, ce] = En(Et), Nn = (e) => {
2147
2149
  descriptionId: ct(),
2148
2150
  open: u,
2149
2151
  onOpenChange: p,
2150
- onOpenToggle: U.useCallback(() => p((m) => !m), [p]),
2152
+ onOpenToggle: U.useCallback(() => p((f) => !f), [p]),
2151
2153
  modal: c,
2152
2154
  children: n
2153
2155
  }
2154
2156
  );
2155
2157
  };
2156
2158
  Nn.displayName = Et;
2157
- var On = "DialogTrigger", ei = U.forwardRef(
2159
+ var On = "DialogTrigger", ti = U.forwardRef(
2158
2160
  (e, t) => {
2159
2161
  const { __scopeDialog: n, ...o } = e, r = ce(On, n), a = yt(t, r.triggerRef);
2160
2162
  return /* @__PURE__ */ i(
2161
- He.button,
2163
+ $e.button,
2162
2164
  {
2163
2165
  type: "button",
2164
2166
  "aria-haspopup": "dialog",
@@ -2172,29 +2174,29 @@ var On = "DialogTrigger", ei = U.forwardRef(
2172
2174
  );
2173
2175
  }
2174
2176
  );
2175
- ei.displayName = On;
2176
- var Nt = "DialogPortal", [ti, Dn] = En(Nt, {
2177
+ ti.displayName = On;
2178
+ var Nt = "DialogPortal", [ni, Dn] = En(Nt, {
2177
2179
  forceMount: void 0
2178
2180
  }), zn = (e) => {
2179
2181
  const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = ce(Nt, t);
2180
- return /* @__PURE__ */ i(ti, { scope: t, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ i(xt, { present: n || a.open, children: /* @__PURE__ */ i(Jr, { asChild: !0, container: r, children: c }) })) });
2182
+ return /* @__PURE__ */ i(ni, { scope: t, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ i(xt, { present: n || a.open, children: /* @__PURE__ */ i(Jr, { asChild: !0, container: r, children: c }) })) });
2181
2183
  };
2182
2184
  zn.displayName = Nt;
2183
- var je = "DialogOverlay", An = U.forwardRef(
2185
+ var Ke = "DialogOverlay", An = U.forwardRef(
2184
2186
  (e, t) => {
2185
- const n = Dn(je, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(je, e.__scopeDialog);
2186
- return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(ni, { ...r, ref: t }) }) : null;
2187
+ const n = Dn(Ke, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(Ke, e.__scopeDialog);
2188
+ return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(ri, { ...r, ref: t }) }) : null;
2187
2189
  }
2188
2190
  );
2189
- An.displayName = je;
2190
- var ni = U.forwardRef(
2191
+ An.displayName = Ke;
2192
+ var ri = U.forwardRef(
2191
2193
  (e, t) => {
2192
- const { __scopeDialog: n, ...o } = e, r = ce(je, n);
2194
+ const { __scopeDialog: n, ...o } = e, r = ce(Ke, n);
2193
2195
  return (
2194
2196
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2195
2197
  // ie. when `Overlay` and `Content` are siblings
2196
- /* @__PURE__ */ i(Kr, { as: qr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
2197
- He.div,
2198
+ /* @__PURE__ */ i(jr, { as: Ur, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
2199
+ $e.div,
2198
2200
  {
2199
2201
  "data-state": Dt(r.open),
2200
2202
  ...o,
@@ -2207,11 +2209,11 @@ var ni = U.forwardRef(
2207
2209
  ), xe = "DialogContent", Fn = U.forwardRef(
2208
2210
  (e, t) => {
2209
2211
  const n = Dn(xe, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(xe, e.__scopeDialog);
2210
- return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(ri, { ...r, ref: t }) : /* @__PURE__ */ i(oi, { ...r, ref: t }) });
2212
+ return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(oi, { ...r, ref: t }) : /* @__PURE__ */ i(ii, { ...r, ref: t }) });
2211
2213
  }
2212
2214
  );
2213
2215
  Fn.displayName = xe;
2214
- var ri = U.forwardRef(
2216
+ var oi = U.forwardRef(
2215
2217
  (e, t) => {
2216
2218
  const n = ce(xe, e.__scopeDialog), o = U.useRef(null), r = yt(t, n.contentRef, o);
2217
2219
  return U.useEffect(() => {
@@ -2240,7 +2242,7 @@ var ri = U.forwardRef(
2240
2242
  }
2241
2243
  );
2242
2244
  }
2243
- ), oi = U.forwardRef(
2245
+ ), ii = U.forwardRef(
2244
2246
  (e, t) => {
2245
2247
  const n = ce(xe, e.__scopeDialog), o = U.useRef(!1), r = U.useRef(!1);
2246
2248
  return /* @__PURE__ */ i(
@@ -2266,9 +2268,9 @@ var ri = U.forwardRef(
2266
2268
  ), kn = U.forwardRef(
2267
2269
  (e, t) => {
2268
2270
  const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s = ce(xe, n), d = U.useRef(null), u = yt(t, d);
2269
- return Xr(), /* @__PURE__ */ A(_e, { children: [
2271
+ return Kr(), /* @__PURE__ */ A(_e, { children: [
2270
2272
  /* @__PURE__ */ i(
2271
- Yr,
2273
+ Xr,
2272
2274
  {
2273
2275
  asChild: !0,
2274
2276
  loop: !0,
@@ -2276,7 +2278,7 @@ var ri = U.forwardRef(
2276
2278
  onMountAutoFocus: r,
2277
2279
  onUnmountAutoFocus: a,
2278
2280
  children: /* @__PURE__ */ i(
2279
- jr,
2281
+ Yr,
2280
2282
  {
2281
2283
  role: "dialog",
2282
2284
  id: s.contentId,
@@ -2291,30 +2293,30 @@ var ri = U.forwardRef(
2291
2293
  }
2292
2294
  ),
2293
2295
  /* @__PURE__ */ A(_e, { children: [
2294
- /* @__PURE__ */ i(ai, { titleId: s.titleId }),
2295
- /* @__PURE__ */ i(ci, { contentRef: d, descriptionId: s.descriptionId })
2296
+ /* @__PURE__ */ i(si, { titleId: s.titleId }),
2297
+ /* @__PURE__ */ i(li, { contentRef: d, descriptionId: s.descriptionId })
2296
2298
  ] })
2297
2299
  ] });
2298
2300
  }
2299
2301
  ), Ot = "DialogTitle", Mn = U.forwardRef(
2300
2302
  (e, t) => {
2301
2303
  const { __scopeDialog: n, ...o } = e, r = ce(Ot, n);
2302
- return /* @__PURE__ */ i(He.h2, { id: r.titleId, ...o, ref: t });
2304
+ return /* @__PURE__ */ i($e.h2, { id: r.titleId, ...o, ref: t });
2303
2305
  }
2304
2306
  );
2305
2307
  Mn.displayName = Ot;
2306
- var Wn = "DialogDescription", ii = U.forwardRef(
2308
+ var Wn = "DialogDescription", ai = U.forwardRef(
2307
2309
  (e, t) => {
2308
2310
  const { __scopeDialog: n, ...o } = e, r = ce(Wn, n);
2309
- return /* @__PURE__ */ i(He.p, { id: r.descriptionId, ...o, ref: t });
2311
+ return /* @__PURE__ */ i($e.p, { id: r.descriptionId, ...o, ref: t });
2310
2312
  }
2311
2313
  );
2312
- ii.displayName = Wn;
2314
+ ai.displayName = Wn;
2313
2315
  var Hn = "DialogClose", $n = U.forwardRef(
2314
2316
  (e, t) => {
2315
2317
  const { __scopeDialog: n, ...o } = e, r = ce(Hn, n);
2316
2318
  return /* @__PURE__ */ i(
2317
- He.button,
2319
+ $e.button,
2318
2320
  {
2319
2321
  type: "button",
2320
2322
  ...o,
@@ -2328,11 +2330,11 @@ $n.displayName = Hn;
2328
2330
  function Dt(e) {
2329
2331
  return e ? "open" : "closed";
2330
2332
  }
2331
- var Gn = "DialogTitleWarning", [Ns, Vn] = Zr(Gn, {
2333
+ var Gn = "DialogTitleWarning", [zs, Vn] = Zr(Gn, {
2332
2334
  contentName: xe,
2333
2335
  titleName: Ot,
2334
2336
  docsSlug: "dialog"
2335
- }), ai = ({ titleId: e }) => {
2337
+ }), si = ({ titleId: e }) => {
2336
2338
  const t = Vn(Gn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2337
2339
 
2338
2340
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
@@ -2341,14 +2343,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
2341
2343
  return U.useEffect(() => {
2342
2344
  e && (document.getElementById(e) || console.error(n));
2343
2345
  }, [n, e]), null;
2344
- }, si = "DialogDescriptionWarning", ci = ({ contentRef: e, descriptionId: t }) => {
2345
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(si).contentName}}.`;
2346
+ }, ci = "DialogDescriptionWarning", li = ({ contentRef: e, descriptionId: t }) => {
2347
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(ci).contentName}}.`;
2346
2348
  return U.useEffect(() => {
2347
2349
  var a;
2348
2350
  const r = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
2349
2351
  t && r && (document.getElementById(t) || console.warn(o));
2350
2352
  }, [o, e, t]), null;
2351
- }, li = Nn, di = zn, ui = An, pi = Fn, hi = Mn, mi = $n;
2353
+ }, di = Nn, ui = zn, pi = An, hi = Fn, mi = Mn, fi = $n;
2352
2354
  const ye = {
2353
2355
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2354
2356
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
@@ -2357,7 +2359,7 @@ const ye = {
2357
2359
  "rp-dialog-title": "_rp-dialog-title_slqo7_39",
2358
2360
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2359
2361
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2360
- }, fi = () => {
2362
+ }, gi = () => {
2361
2363
  const { pdfProperties: e } = X(), { container: t } = we(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = no(), { localeMessages: r } = se(), a = M(() => {
2362
2364
  if (!e)
2363
2365
  return [];
@@ -2367,13 +2369,13 @@ const ye = {
2367
2369
  title: d,
2368
2370
  author: u,
2369
2371
  subject: p,
2370
- createdOn: m,
2372
+ createdOn: f,
2371
2373
  creator: h,
2372
- keywords: v,
2373
- modifiedOn: b,
2374
- pdfProducer: S,
2375
- pdfVersion: g,
2376
- pageCount: C
2374
+ keywords: g,
2375
+ modifiedOn: P,
2376
+ pdfProducer: b,
2377
+ pdfVersion: v,
2378
+ pageCount: S
2377
2379
  } = e;
2378
2380
  return [
2379
2381
  { label: r == null ? void 0 : r.propertiesFilenameLabel, value: s },
@@ -2382,35 +2384,35 @@ const ye = {
2382
2384
  { label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
2383
2385
  { label: r == null ? void 0 : r.propertiesAuthorLabel, value: u },
2384
2386
  { label: r == null ? void 0 : r.propertiesSubjectLabel, value: p },
2385
- { label: r == null ? void 0 : r.propertiesKeywordLabel, value: v },
2387
+ { label: r == null ? void 0 : r.propertiesKeywordLabel, value: g },
2386
2388
  { label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
2387
2389
  {
2388
2390
  label: r == null ? void 0 : r.propertiesCreateOnLabel,
2389
- value: m ? Ht(m) : ""
2391
+ value: f ? Ht(f) : ""
2390
2392
  },
2391
2393
  {
2392
2394
  label: r == null ? void 0 : r.propertiesModifiedOnLabel,
2393
- value: b ? Ht(b) : ""
2395
+ value: P ? Ht(P) : ""
2394
2396
  },
2395
2397
  { separate: !0 },
2396
- { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: S },
2397
- { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: g },
2398
- { label: r == null ? void 0 : r.propertiesPageCountLabel, value: C }
2398
+ { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: b },
2399
+ { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: v },
2400
+ { label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
2399
2401
  ];
2400
2402
  }, [e, r]);
2401
- return /* @__PURE__ */ i(li, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(di, { container: t, children: /* @__PURE__ */ A("div", { className: ye["rp-dialog-wrapper"], children: [
2402
- /* @__PURE__ */ i(ui, { className: ye["rp-dialog-overlay"] }),
2403
- /* @__PURE__ */ A(pi, { className: ye["rp-document-dialog"], children: [
2404
- /* @__PURE__ */ i(hi, { className: ye["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2403
+ return /* @__PURE__ */ i(di, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(ui, { container: t, children: /* @__PURE__ */ A("div", { className: ye["rp-dialog-wrapper"], children: [
2404
+ /* @__PURE__ */ i(pi, { className: ye["rp-dialog-overlay"] }),
2405
+ /* @__PURE__ */ A(hi, { className: ye["rp-document-dialog"], children: [
2406
+ /* @__PURE__ */ i(mi, { className: ye["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2405
2407
  /* @__PURE__ */ i("div", { className: ye["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: ye["rp-properties-divider"] }) : /* @__PURE__ */ i(to, { label: c.label, value: c.value }) }, s)) }),
2406
- /* @__PURE__ */ i(mi, { asChild: !0, className: ye["rp-dialog-close"], children: /* @__PURE__ */ i(eo, {}) })
2408
+ /* @__PURE__ */ i(fi, { asChild: !0, className: ye["rp-dialog-close"], children: /* @__PURE__ */ i(eo, {}) })
2407
2409
  ] })
2408
2410
  ] }) }) });
2409
- }, gi = {
2411
+ }, vi = {
2410
2412
  "rp-other-tool-content": "_rp-other-tool-content_su718_1"
2411
- }, on = ".pdf", vi = (e) => URL.createObjectURL(e), _i = async (e) => {
2413
+ }, on = ".pdf", _i = (e) => URL.createObjectURL(e), wi = async (e) => {
2412
2414
  const n = await (await fetch(e)).blob();
2413
- return vi(n);
2415
+ return _i(n);
2414
2416
  }, Un = () => {
2415
2417
  const { filename: e, pdfSrc: t } = X(), { downloadFilename: n } = vr(), o = (a) => {
2416
2418
  const c = n || a;
@@ -2420,26 +2422,26 @@ const ye = {
2420
2422
  if (!e || !t)
2421
2423
  throw new Error("There is no PDF source to download");
2422
2424
  const a = document.createElement("a");
2423
- a.href = await _i(t), a.download = o(e), document.body.appendChild(a), a.click(), document.body.removeChild(a);
2425
+ a.href = await wi(t), a.download = o(e), document.body.appendChild(a), a.click(), document.body.removeChild(a);
2424
2426
  }, [e, t]) };
2425
2427
  }, qn = () => {
2426
2428
  const { downloadIcon: e } = ue();
2427
- return e || /* @__PURE__ */ i(so, {});
2428
- }, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }), wi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(Zn, { localeMessages: t, children: /* @__PURE__ */ i(ne, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ i(qn, {}) }) }), bi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(ve, { onClick: e, children: /* @__PURE__ */ A(Zn, { className: "rp-menu-item", localeMessages: t, children: [
2429
+ return e || /* @__PURE__ */ i(co, {});
2430
+ }, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }), bi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(Zn, { localeMessages: t, children: /* @__PURE__ */ i(ne, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ i(qn, {}) }) }), Ci = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(ve, { onClick: e, children: /* @__PURE__ */ A(Zn, { className: "rp-menu-item", localeMessages: t, children: [
2429
2431
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qn, {}) }),
2430
2432
  t == null ? void 0 : t.downloadFileLabel
2431
2433
  ] }) }), Bn = () => {
2432
2434
  const { download: e } = Un(), { downloadTool: t = !0 } = fe(), { isSmallScreen: n } = be(), { localeMessages: o } = se();
2433
- return t ? n ? /* @__PURE__ */ i(bi, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ i(t, { download: e }) : t ? /* @__PURE__ */ i(wi, { download: e, localeMessages: o }) : null : null;
2435
+ return t ? n ? /* @__PURE__ */ i(Ci, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ i(t, { download: e }) : t ? /* @__PURE__ */ i(bi, { download: e, localeMessages: o }) : null : null;
2434
2436
  }, jn = () => {
2435
2437
  const { printIcon: e } = ue();
2436
- return e || /* @__PURE__ */ i(co, {});
2437
- }, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }), Ci = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(Kn, { localeMessages: t, children: /* @__PURE__ */ i(ne, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ i(jn, {}) }) }), Ti = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(ve, { onClick: e, children: /* @__PURE__ */ A(Kn, { className: "rp-menu-item", localeMessages: t, children: [
2438
+ return e || /* @__PURE__ */ i(lo, {});
2439
+ }, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }), Ti = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(Kn, { localeMessages: t, children: /* @__PURE__ */ i(ne, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ i(jn, {}) }) }), Pi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(ve, { onClick: e, children: /* @__PURE__ */ A(Kn, { className: "rp-menu-item", localeMessages: t, children: [
2438
2440
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(jn, {}) }),
2439
2441
  t == null ? void 0 : t.printLabel
2440
2442
  ] }) }), Xn = () => {
2441
2443
  const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = nt(), { printTool: c = !0 } = fe(), { isSmallScreen: s } = be(), { localeMessages: d } = se();
2442
- return c ? s ? /* @__PURE__ */ i(Ti, { print: e, localeMessages: d }) : typeof c == "function" ? /* @__PURE__ */ i(
2444
+ return c ? s ? /* @__PURE__ */ i(Pi, { print: e, localeMessages: d }) : typeof c == "function" ? /* @__PURE__ */ i(
2443
2445
  c,
2444
2446
  {
2445
2447
  print: e,
@@ -2449,33 +2451,33 @@ const ye = {
2449
2451
  setOnComplete: o,
2450
2452
  progress: a
2451
2453
  }
2452
- ) : c ? /* @__PURE__ */ i(Ci, { print: e, localeMessages: d }) : null : null;
2453
- }, Pi = {
2454
+ ) : c ? /* @__PURE__ */ i(Ti, { print: e, localeMessages: d }) : null : null;
2455
+ }, Si = {
2454
2456
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2455
- }, Si = () => {
2456
- const { goToFirstPageIcon: e } = ue();
2457
- return e || /* @__PURE__ */ i(bn, { className: Pi["rp-go-to-Top"] });
2458
2457
  }, yi = () => {
2458
+ const { goToFirstPageIcon: e } = ue();
2459
+ return e || /* @__PURE__ */ i(bn, { className: Si["rp-go-to-Top"] });
2460
+ }, xi = () => {
2459
2461
  const { goToLastPageIcon: e } = ue();
2460
2462
  return e || /* @__PURE__ */ i(bn, {});
2461
- }, an = { width: "100%" }, xi = () => {
2463
+ }, an = { width: "100%" }, Ii = () => {
2462
2464
  const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: o = !0 } = fe(), { localeMessages: r } = se(), a = M(() => n === 1, [n]), c = M(() => n === t, [n, t]), s = L(() => {
2463
2465
  e(1);
2464
2466
  }, [e]), d = L(() => {
2465
2467
  e(t);
2466
2468
  }, [e, t]);
2467
- return o ? /* @__PURE__ */ A(Be, { children: [
2469
+ return o ? /* @__PURE__ */ A(je, { children: [
2468
2470
  /* @__PURE__ */ i(ve, { onClick: s, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.firstPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2469
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Si, {}) }),
2471
+ /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(yi, {}) }),
2470
2472
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
2471
2473
  ] }) }) }),
2472
2474
  /* @__PURE__ */ i(ve, { onClick: d, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.lastPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2473
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(yi, {}) }),
2475
+ /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(xi, {}) }),
2474
2476
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
2475
2477
  ] }) }) }),
2476
2478
  /* @__PURE__ */ i(It, {})
2477
2479
  ] }) : null;
2478
- }, Ii = () => {
2480
+ }, Li = () => {
2479
2481
  const { container: e } = we(), { isSmallScreen: t } = be(), {
2480
2482
  openFileTool: n,
2481
2483
  downloadTool: o,
@@ -2486,11 +2488,11 @@ const ye = {
2486
2488
  jumpNavigationTool: d,
2487
2489
  printTool: u,
2488
2490
  fullscreenTool: p
2489
- } = fe(), { localeMessages: m } = se();
2491
+ } = fe(), { localeMessages: f } = se();
2490
2492
  return M(() => {
2491
- const v = d || c || s || a || r;
2492
- let b = !1;
2493
- return t && (b = !(!n && !o && !u && !p)), v || b;
2493
+ const g = d || c || s || a || r;
2494
+ let P = !1;
2495
+ return t && (P = !(!n && !o && !u && !p)), g || P;
2494
2496
  }, [
2495
2497
  n,
2496
2498
  o,
@@ -2505,26 +2507,27 @@ const ye = {
2505
2507
  _n,
2506
2508
  {
2507
2509
  container: e,
2508
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.moreOptionTooltip, children: /* @__PURE__ */ i(ne, { "aria-label": m == null ? void 0 : m.moreOptionTooltip, children: /* @__PURE__ */ i(Vr, {}) }) }) }),
2509
- children: /* @__PURE__ */ A("div", { className: gi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2510
- t && /* @__PURE__ */ A(Be, { children: [
2510
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(ne, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Vr, {}) }) }) }),
2511
+ children: /* @__PURE__ */ A("div", { className: vi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2512
+ t && /* @__PURE__ */ A(je, { children: [
2511
2513
  /* @__PURE__ */ i(vn, {}),
2512
2514
  /* @__PURE__ */ i(Bn, {}),
2513
2515
  /* @__PURE__ */ i(Xn, {}),
2514
2516
  /* @__PURE__ */ i(wn, {}),
2515
2517
  /* @__PURE__ */ i(It, {})
2516
2518
  ] }),
2517
- /* @__PURE__ */ i(xi, {}),
2519
+ /* @__PURE__ */ i(Ii, {}),
2518
2520
  /* @__PURE__ */ i(io, {}),
2519
- /* @__PURE__ */ i(lo, {}),
2521
+ /* @__PURE__ */ i(uo, {}),
2520
2522
  /* @__PURE__ */ i(ao, {}),
2523
+ /* @__PURE__ */ i(so, {}),
2521
2524
  /* @__PURE__ */ i(oo, {})
2522
2525
  ] })
2523
2526
  }
2524
2527
  ),
2525
- /* @__PURE__ */ i(fi, {})
2528
+ /* @__PURE__ */ i(gi, {})
2526
2529
  ] }) : null;
2527
- }, Li = () => {
2530
+ }, Ri = () => {
2528
2531
  const { isSmallScreen: e } = be();
2529
2532
  return /* @__PURE__ */ A(_e, { children: [
2530
2533
  /* @__PURE__ */ i(Gr, {}),
@@ -2534,7 +2537,7 @@ const ye = {
2534
2537
  /* @__PURE__ */ i(Xn, {}),
2535
2538
  /* @__PURE__ */ i(wn, {})
2536
2539
  ] }),
2537
- /* @__PURE__ */ i(Ii, {})
2540
+ /* @__PURE__ */ i(Li, {})
2538
2541
  ] });
2539
2542
  }, Ee = {
2540
2543
  "rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
@@ -2542,46 +2545,53 @@ const ye = {
2542
2545
  "rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
2543
2546
  "rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
2544
2547
  "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
2545
- }, Ri = 25, gt = 1e3, Ei = [50, 75, 100, 125, 150, 200, 300, 400], Ni = () => {
2548
+ }, Ei = 25, gt = 1e3, Ni = [50, 75, 100, 125, 150, 200, 300, 400], Oi = () => {
2546
2549
  const { zoomInIcon: e } = ue();
2547
- return e || /* @__PURE__ */ i(uo, {});
2548
- }, Oi = () => {
2549
- const { zoomOutIcon: e } = ue();
2550
2550
  return e || /* @__PURE__ */ i(po, {});
2551
2551
  }, Di = () => {
2552
- const { zoomLevel: e, setZoomLevel: t } = Je(), { container: n, contentRef: o } = we(), { zoomTool: r = !0 } = fe(), { focusedPage: a } = oe(), { rotate: c } = Ye(), { pages: s } = X(), { isSmallScreen: d } = be(), { localeMessages: u } = se(), p = L(() => {
2553
- t((C) => {
2554
- const f = Math.floor(C / 25) * 25;
2555
- return Math.min(f + 25, gt);
2552
+ const { zoomOutIcon: e } = ue();
2553
+ return e || /* @__PURE__ */ i(ho, {});
2554
+ }, zi = () => {
2555
+ const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = we(), { zoomTool: r = !0 } = fe(), { focusedPage: a } = oe(), { rotate: c } = Je(), { pages: s } = X(), { isSmallScreen: d } = be(), { localeMessages: u } = se(), { viewMode: p } = He(), f = L(() => {
2556
+ t((m) => {
2557
+ const w = Math.floor(m / 25) * 25;
2558
+ return Math.min(w + 25, gt);
2556
2559
  });
2557
- }, [t]), m = L(() => {
2558
- t((C) => {
2559
- const f = Math.ceil(C / 25) * 25;
2560
- return Math.min(f - 25, gt);
2560
+ }, [t]), h = L(() => {
2561
+ t((m) => {
2562
+ const w = Math.ceil(m / 25) * 25;
2563
+ return Math.min(w - 25, gt);
2561
2564
  });
2562
- }, [t]), h = M(() => e === Ri, [e]), v = M(() => e === gt, [e]), b = M(() => {
2563
- var C;
2564
- return (C = s.get(a)) == null ? void 0 : C.page.getViewport({ scale: 1, rotation: c });
2565
- }, [s, a, c]), S = L(
2566
- (C) => {
2567
- const f = ((b == null ? void 0 : b.width) || 0) + 2 * $t, w = ((b == null ? void 0 : b.height) || 0) + 2 * $t, T = (o == null ? void 0 : o.clientWidth) || 0, l = (o == null ? void 0 : o.clientHeight) || 0, P = ho(C, T, l, f, w);
2568
- t(P);
2565
+ }, [t]), g = M(() => e === Ei, [e]), P = M(() => e === gt, [e]), b = M(() => {
2566
+ var m;
2567
+ return (m = s.get(a)) == null ? void 0 : m.page.getViewport({ scale: 1, rotation: c });
2568
+ }, [s, a, c]), v = L(
2569
+ (m) => {
2570
+ const w = ((b == null ? void 0 : b.width) || 0) + 2 * $t, C = ((b == null ? void 0 : b.height) || 0) + 2 * $t, l = (o == null ? void 0 : o.clientWidth) || 0, T = (o == null ? void 0 : o.clientHeight) || 0, _ = mo(
2571
+ m,
2572
+ l,
2573
+ T,
2574
+ w,
2575
+ C,
2576
+ p
2577
+ );
2578
+ t(_);
2569
2579
  },
2570
2580
  [t, b]
2571
- ), g = L(
2572
- (C) => {
2573
- typeof C == "number" ? t(C) : S(C);
2581
+ ), S = L(
2582
+ (m) => {
2583
+ typeof m == "number" ? t(m) : v(m);
2574
2584
  },
2575
- [t, S]
2585
+ [t, v]
2576
2586
  );
2577
2587
  return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ A("div", { className: Ee["rp-zoom-wrapper"], children: [
2578
2588
  /* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
2579
2589
  ne,
2580
2590
  {
2581
- disabled: h,
2582
- onClick: m,
2591
+ disabled: g,
2592
+ onClick: h,
2583
2593
  "aria-label": u == null ? void 0 : u.zoomOutTooltip,
2584
- children: /* @__PURE__ */ i(Oi, {})
2594
+ children: /* @__PURE__ */ i(Di, {})
2585
2595
  }
2586
2596
  ) }),
2587
2597
  !d && /* @__PURE__ */ i(
@@ -2603,26 +2613,26 @@ const ye = {
2603
2613
  style: { minWidth: "200px" },
2604
2614
  align: "center",
2605
2615
  children: /* @__PURE__ */ A("div", { className: Ee["rp-zoom-dropdown-content"], children: [
2606
- /* @__PURE__ */ A(Be, { children: [
2607
- /* @__PURE__ */ i(ve, { onClick: () => g(at.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
2608
- /* @__PURE__ */ i(ve, { onClick: () => g(at.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
2609
- /* @__PURE__ */ i(ve, { onClick: () => g(at.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
2616
+ /* @__PURE__ */ A(je, { children: [
2617
+ /* @__PURE__ */ i(ve, { onClick: () => S(at.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
2618
+ /* @__PURE__ */ i(ve, { onClick: () => S(at.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
2619
+ /* @__PURE__ */ i(ve, { onClick: () => S(at.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
2610
2620
  ] }),
2611
2621
  /* @__PURE__ */ i(It, {}),
2612
- /* @__PURE__ */ i(Be, { children: Ei.map((C) => /* @__PURE__ */ A(ve, { onClick: () => g(C), children: [
2613
- C,
2622
+ /* @__PURE__ */ i(je, { children: Ni.map((m) => /* @__PURE__ */ A(ve, { onClick: () => S(m), children: [
2623
+ m,
2614
2624
  " %"
2615
- ] }, C)) })
2625
+ ] }, m)) })
2616
2626
  ] })
2617
2627
  }
2618
2628
  ),
2619
2629
  /* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
2620
2630
  ne,
2621
2631
  {
2622
- disabled: v,
2623
- onClick: p,
2632
+ disabled: P,
2633
+ onClick: f,
2624
2634
  "aria-label": u == null ? void 0 : u.zoomInTooltip,
2625
- children: /* @__PURE__ */ i(Ni, {})
2635
+ children: /* @__PURE__ */ i(Oi, {})
2626
2636
  }
2627
2637
  ) })
2628
2638
  ] }) : null;
@@ -2651,23 +2661,23 @@ const ye = {
2651
2661
  ] });
2652
2662
  }, cn = () => {
2653
2663
  const { searchIcon: e } = ue();
2654
- return e || /* @__PURE__ */ i(mo, {});
2655
- }, zi = () => {
2664
+ return e || /* @__PURE__ */ i(fo, {});
2665
+ }, Ai = () => {
2656
2666
  const { container: e } = we(), [t, n] = H(!1), { pdf: o } = X(), [r, a] = H(null), {
2657
2667
  searchOptions: c,
2658
2668
  setSearchOptions: s,
2659
2669
  loading: d,
2660
2670
  setSearch: u,
2661
2671
  totalMatches: p,
2662
- currentMatchPosition: m,
2672
+ currentMatchPosition: f,
2663
2673
  nextMatch: h,
2664
- prevMatch: v,
2665
- search: b
2666
- } = Lt(), { searchTool: S = !0 } = fe(), [g, C] = H(b), { localeMessages: f } = se(), { isSmallScreen: w } = be(), T = L(() => {
2674
+ prevMatch: g,
2675
+ search: P
2676
+ } = Lt(), { searchTool: b = !0 } = fe(), [v, S] = H(P), { localeMessages: m } = se(), { isSmallScreen: w } = be(), C = L(() => {
2667
2677
  n(!0);
2668
2678
  }, []), l = L(() => {
2669
- u(""), C(""), n(!1);
2670
- }, [u]), P = (x) => {
2679
+ u(""), S(""), n(!1);
2680
+ }, [u]), T = (x) => {
2671
2681
  const k = x.key === "Enter", $ = x.key === " ";
2672
2682
  (k || $) && l();
2673
2683
  }, _ = L(
@@ -2677,9 +2687,9 @@ const ye = {
2677
2687
  [t]
2678
2688
  ), y = L(
2679
2689
  (x) => {
2680
- x.shiftKey && x.key === "Enter" ? v() : x.key === "Enter" && b !== g ? u(g) : x.key === "Enter" && h();
2690
+ x.shiftKey && x.key === "Enter" ? g() : x.key === "Enter" && P !== v ? u(v) : x.key === "Enter" && h();
2681
2691
  },
2682
- [g, v, h, u, b]
2692
+ [v, g, h, u, P]
2683
2693
  );
2684
2694
  F(() => (window.addEventListener("keydown", _), () => {
2685
2695
  window.removeEventListener("keydown", _);
@@ -2687,10 +2697,10 @@ const ye = {
2687
2697
  r && r.focus();
2688
2698
  }, [r]);
2689
2699
  const E = L((x) => {
2690
- C(x.target.value);
2700
+ S(x.target.value);
2691
2701
  }, []), I = L(() => {
2692
- C(""), u("");
2693
- }, [u]), N = M(() => `${m} / ${p}`, [m, p]), { wholeWords: R, matchCase: z } = M(() => c, [c]), O = L(
2702
+ S(""), u("");
2703
+ }, [u]), N = M(() => `${f} / ${p}`, [f, p]), { wholeWords: R, matchCase: z } = M(() => c, [c]), O = L(
2694
2704
  (x) => {
2695
2705
  s((k) => ({ ...k, matchCase: x }));
2696
2706
  },
@@ -2703,55 +2713,55 @@ const ye = {
2703
2713
  );
2704
2714
  return F(() => {
2705
2715
  l();
2706
- }, [o, l]), S ? /* @__PURE__ */ i(_e, { children: /* @__PURE__ */ i(
2716
+ }, [o, l]), b ? /* @__PURE__ */ i(_e, { children: /* @__PURE__ */ i(
2707
2717
  Ar,
2708
2718
  {
2709
2719
  open: t,
2710
2720
  container: e,
2711
- triggerComponent: /* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(ne, { onClick: T, "aria-label": f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(cn, {}) }) }),
2721
+ triggerComponent: /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(ne, { onClick: C, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(cn, {}) }) }),
2712
2722
  children: /* @__PURE__ */ A("div", { className: K["rp-search-tool-content"], children: [
2713
2723
  /* @__PURE__ */ A("div", { className: K["rp-search-tool-input-wrapper"], children: [
2714
2724
  /* @__PURE__ */ A("div", { className: K["rp-search-tool-input"], children: [
2715
- /* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchInputTooltip, children: /* @__PURE__ */ i(
2725
+ /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
2716
2726
  un,
2717
2727
  {
2718
- value: g,
2728
+ value: v,
2719
2729
  onKeyDown: y,
2720
2730
  onChange: E,
2721
2731
  icon: /* @__PURE__ */ i(cn, {}),
2722
- placeholder: f == null ? void 0 : f.searchInputPlaceholder,
2732
+ placeholder: m == null ? void 0 : m.searchInputPlaceholder,
2723
2733
  className: K["rp-search-input"],
2724
2734
  ref: a,
2725
- children: !!g && /* @__PURE__ */ i("span", { className: K["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(fo, {}) })
2735
+ children: !!v && /* @__PURE__ */ i("span", { className: K["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(go, {}) })
2726
2736
  }
2727
2737
  ) }),
2728
2738
  d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, { className: K["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: N }),
2729
- w && /* @__PURE__ */ i("div", { className: K["rp-search-tool-controls"], children: /* @__PURE__ */ i(Gt, { onKeyPress: P, handleClose: l }) })
2739
+ w && /* @__PURE__ */ i("div", { className: K["rp-search-tool-controls"], children: /* @__PURE__ */ i(Gt, { onKeyPress: T, handleClose: l }) })
2730
2740
  ] }),
2731
2741
  /* @__PURE__ */ A("div", { className: K["rp-search-tool-input-checkboxes"], children: [
2732
2742
  w && /* @__PURE__ */ i(sn, {}),
2733
- /* @__PURE__ */ i(Vt, { name: "matchCase", value: z, onChange: O, children: f == null ? void 0 : f.searchMatchCaseLabel }),
2734
- !w && /* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) }),
2735
- /* @__PURE__ */ i(Vt, { name: "wholeWord", value: R, onChange: D, children: f == null ? void 0 : f.searchWholeWordsLabel }),
2736
- !w && /* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) })
2743
+ /* @__PURE__ */ i(Vt, { name: "matchCase", value: z, onChange: O, children: m == null ? void 0 : m.searchMatchCaseLabel }),
2744
+ !w && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) }),
2745
+ /* @__PURE__ */ i(Vt, { name: "wholeWord", value: R, onChange: D, children: m == null ? void 0 : m.searchWholeWordsLabel }),
2746
+ !w && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) })
2737
2747
  ] })
2738
2748
  ] }),
2739
2749
  !w && /* @__PURE__ */ A("div", { className: K["rp-search-tool-controls"], children: [
2740
2750
  /* @__PURE__ */ i(sn, {}),
2741
- /* @__PURE__ */ i(Gt, { onKeyPress: P, handleClose: l })
2751
+ /* @__PURE__ */ i(Gt, { onKeyPress: T, handleClose: l })
2742
2752
  ] })
2743
2753
  ] })
2744
2754
  }
2745
2755
  ) }) : null;
2746
- }, Ai = "_loading_vpexk_1", Ne = {
2756
+ }, Fi = "_loading_vpexk_1", Ne = {
2747
2757
  "rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
2748
2758
  "rp-loading-modal": "_rp-loading-modal_vpexk_14",
2749
2759
  "rp-loading-title": "_rp-loading-title_vpexk_27",
2750
2760
  "rp-loading-progress-bar": "_rp-loading-progress-bar_vpexk_35",
2751
2761
  "rp-loading-progress": "_rp-loading-progress_vpexk_35",
2752
2762
  "rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
2753
- loading: Ai
2754
- }, Fi = ({ percentage: e }) => {
2763
+ loading: Fi
2764
+ }, ki = ({ percentage: e }) => {
2755
2765
  const { cancel: t } = nt(), { localeMessages: n } = se();
2756
2766
  return e < 1 ? null : /* @__PURE__ */ i("div", { className: te(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ A("div", { className: te(Ne["rp-loading-modal"]), children: [
2757
2767
  /* @__PURE__ */ A("div", { className: te(Ne["rp-loading-title"]), children: [
@@ -2767,18 +2777,18 @@ const ye = {
2767
2777
  ) }),
2768
2778
  /* @__PURE__ */ i("button", { className: te(Ne["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
2769
2779
  ] }) });
2770
- }, ki = We((e, t) => {
2780
+ }, Mi = We((e, t) => {
2771
2781
  const { showPrintProgress: n } = fe(), { progress: o } = nt(), { isSmallScreen: r } = be(), { percentage: a } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2772
2782
  return /* @__PURE__ */ A("div", { children: [
2773
2783
  /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Ae["rp-toolbar-content"], children: /* @__PURE__ */ A("div", { className: Ae["rp-toolbar-wrapper"], style: c(), children: [
2774
2784
  /* @__PURE__ */ A("div", { "data-rp": "topBarLeft", className: Ae["rp-toolbar-start"], children: [
2775
- /* @__PURE__ */ i(zi, {}),
2776
- /* @__PURE__ */ i(Jo, {})
2785
+ /* @__PURE__ */ i(Ai, {}),
2786
+ /* @__PURE__ */ i(Qo, {})
2777
2787
  ] }),
2778
- /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(Di, {}) }),
2779
- /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(Li, {}) })
2788
+ /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(zi, {}) }),
2789
+ /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(Ri, {}) })
2780
2790
  ] }) }),
2781
- n && a ? /* @__PURE__ */ i(Fi, { percentage: a }) : null
2791
+ n && a ? /* @__PURE__ */ i(ki, { percentage: a }) : null
2782
2792
  ] });
2783
2793
  }), vt = {
2784
2794
  "rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
@@ -2791,7 +2801,7 @@ const ye = {
2791
2801
  "rp-thumbnail": "_rp-thumbnail_3fenb_1",
2792
2802
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
2793
2803
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
2794
- }, Mi = (e) => {
2804
+ }, Wi = (e) => {
2795
2805
  const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = oe(), c = M(() => o ? Fe["rp-thumbnail-active"] : "", [o]), s = M(() => ({
2796
2806
  width: Math.round(r.width),
2797
2807
  height: Math.round(r.height)
@@ -2831,36 +2841,36 @@ const ye = {
2831
2841
  }, ln = {
2832
2842
  "rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
2833
2843
  "rp-thumbnails": "_rp-thumbnails_16vqr_1"
2834
- }, Wi = 16, Hi = (e, t) => {
2844
+ }, Hi = 16, $i = (e, t) => {
2835
2845
  const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
2836
- e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Wi);
2837
- }, $i = We((e, t) => {
2846
+ e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Hi);
2847
+ }, Gi = We((e, t) => {
2838
2848
  const { show: n } = e, { focusedPage: o, totalPages: r } = oe(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: d } = yn(), u = W(null), p = W(1);
2839
2849
  dn(t, () => u.current);
2840
- const m = M(() => Object.values(a), [a]), h = L(() => {
2841
- const v = s + 1;
2842
- v <= r && c(v);
2850
+ const f = M(() => Object.values(a), [a]), h = L(() => {
2851
+ const g = s + 1;
2852
+ g <= r && c(g);
2843
2853
  }, [c, r, s]);
2844
2854
  return F(() => {
2845
- o > s ? d(o) : n && p.current !== o && (Hi(u.current, o), p.current = o);
2846
- }, [o, s, d, n, m]), wr(u.current, h), /* @__PURE__ */ i("div", { ref: u, className: ln["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: ln["rp-thumbnails"], children: n ? m.map((v, b) => {
2847
- var S, g;
2855
+ o > s ? d(o) : n && p.current !== o && ($i(u.current, o), p.current = o);
2856
+ }, [o, s, d, n, f]), wr(u.current, h), /* @__PURE__ */ i("div", { ref: u, className: ln["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: ln["rp-thumbnails"], children: n ? f.map((g, P) => {
2857
+ var b, v;
2848
2858
  return /* @__PURE__ */ i(
2849
- Mi,
2859
+ Wi,
2850
2860
  {
2851
- isFocused: o === ((S = v.page) == null ? void 0 : S.pageNumber),
2852
- pageNumber: (g = v.page) == null ? void 0 : g.pageNumber,
2853
- thumbnailSrc: v.thumbnailSrc,
2854
- loading: v.loading,
2855
- viewport: v.viewport
2861
+ isFocused: o === ((b = g.page) == null ? void 0 : b.pageNumber),
2862
+ pageNumber: (v = g.page) == null ? void 0 : v.pageNumber,
2863
+ thumbnailSrc: g.thumbnailSrc,
2864
+ loading: g.loading,
2865
+ viewport: g.viewport
2856
2866
  },
2857
- b
2867
+ P
2858
2868
  );
2859
2869
  }) : null }) });
2860
- }), Gi = () => {
2870
+ }), Vi = () => {
2861
2871
  const { thumbnailIcon: e } = ue();
2862
2872
  return e || /* @__PURE__ */ i(_r, {});
2863
- }, Vi = () => {
2873
+ }, Ui = () => {
2864
2874
  const { active: e, setActive: t } = yn(), [n, o] = H(200), r = W(null), { thumbnailTool: a, sidebarEnable: c } = fe(), { localeMessages: s } = se(), d = L(() => {
2865
2875
  t((p) => !p);
2866
2876
  }, []), u = M(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: e }) : a ? /* @__PURE__ */ i(Z, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
@@ -2869,7 +2879,7 @@ const ye = {
2869
2879
  onClick: d,
2870
2880
  active: e,
2871
2881
  "aria-label": s == null ? void 0 : s.thumbnailTooltip,
2872
- children: /* @__PURE__ */ i(Gi, {})
2882
+ children: /* @__PURE__ */ i(Vi, {})
2873
2883
  }
2874
2884
  ) }) : null, [a, e, d, s]);
2875
2885
  return /* @__PURE__ */ i(_e, { children: c && /* @__PURE__ */ A(
@@ -2887,7 +2897,7 @@ const ye = {
2887
2897
  hidden: !e,
2888
2898
  className: vt["rp-thumbnails-wrapper"],
2889
2899
  children: [
2890
- /* @__PURE__ */ i($i, { show: e, ref: r }),
2900
+ /* @__PURE__ */ i(Gi, { show: e, ref: r }),
2891
2901
  /* @__PURE__ */ i(br, { onWidthChange: o, thumbnailRef: r })
2892
2902
  ]
2893
2903
  }
@@ -2896,14 +2906,14 @@ const ye = {
2896
2906
  }
2897
2907
  ) });
2898
2908
  }, ge = {
2899
- "rp-layout": "_rp-layout_12d1x_1",
2900
- "rp-content": "_rp-content_12d1x_5",
2901
- "rp-pages": "_rp-pages_12d1x_11",
2902
- "rp-container": "_rp-container_12d1x_16",
2903
- "rp-loader": "_rp-loader_12d1x_52",
2904
- "rp-theme-variables": "_rp-theme-variables_12d1x_56",
2905
- "rp-dark-mode": "_rp-dark-mode_12d1x_147"
2906
- }, Ui = We(
2909
+ "rp-layout": "_rp-layout_vutcr_1",
2910
+ "rp-content": "_rp-content_vutcr_5",
2911
+ "rp-pages": "_rp-pages_vutcr_11",
2912
+ "rp-container": "_rp-container_vutcr_16",
2913
+ "rp-loader": "_rp-loader_vutcr_52",
2914
+ "rp-theme-variables": "_rp-theme-variables_vutcr_56",
2915
+ "rp-dark-mode": "_rp-dark-mode_vutcr_151"
2916
+ }, qi = We(
2907
2917
  (e, t) => {
2908
2918
  const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: c, customDarkVariables: s } = Ir(), { darkMode: d } = or();
2909
2919
  return /* @__PURE__ */ i(
@@ -2926,7 +2936,7 @@ const ye = {
2926
2936
  }
2927
2937
  );
2928
2938
  }
2929
- ), Os = We((e, t) => {
2939
+ ), As = We((e, t) => {
2930
2940
  const {
2931
2941
  children: n,
2932
2942
  slots: o,
@@ -2937,21 +2947,21 @@ const ye = {
2937
2947
  onLoaded: d,
2938
2948
  cleanupOnLoaded: u,
2939
2949
  onLayoutWidthChange: p
2940
- } = e, [m, h] = H(null), { setContainer: v, setContentRef: b } = we(), { loading: S } = X(), { LoaderImageComponent: g } = gn();
2950
+ } = e, [f, h] = H(null), { setContainer: g, setContentRef: P } = we(), { loading: b } = X(), { LoaderImageComponent: v } = gn();
2941
2951
  return F(() => (d && d(), () => {
2942
2952
  u && u();
2943
- }), [d, u]), /* @__PURE__ */ i(Ui, { toolbarRef: m, ref: t, children: /* @__PURE__ */ i(xr, { mobileWidth: s, onLayoutWidthChange: p, children: /* @__PURE__ */ i(Cr, { slots: o, children: /* @__PURE__ */ i(Tr, { icons: r, children: /* @__PURE__ */ A(Pr, { getContainerRef: v, style: a, className: c, children: [
2953
+ }), [d, u]), /* @__PURE__ */ i(qi, { toolbarRef: f, ref: t, children: /* @__PURE__ */ i(xr, { mobileWidth: s, onLayoutWidthChange: p, children: /* @__PURE__ */ i(Cr, { slots: o, children: /* @__PURE__ */ i(Tr, { icons: r, children: /* @__PURE__ */ A(Pr, { getContainerRef: g, style: a, className: c, children: [
2944
2954
  /* @__PURE__ */ A(Sr, { children: [
2945
2955
  /* @__PURE__ */ A("div", { className: ge["rp-layout"], children: [
2946
- /* @__PURE__ */ i(ki, { ref: h }),
2956
+ /* @__PURE__ */ i(Mi, { ref: h }),
2947
2957
  /* @__PURE__ */ A("div", { className: ge["rp-content"], children: [
2948
- /* @__PURE__ */ i("div", { className: ge["rp-sidebar"], children: /* @__PURE__ */ i(Vi, {}) }),
2949
- /* @__PURE__ */ i("div", { ref: b, className: ge["rp-pages"], children: n })
2958
+ /* @__PURE__ */ i("div", { className: ge["rp-sidebar"], children: /* @__PURE__ */ i(Ui, {}) }),
2959
+ /* @__PURE__ */ i("div", { ref: P, className: ge["rp-pages"], children: n })
2950
2960
  ] })
2951
2961
  ] }),
2952
2962
  /* @__PURE__ */ i(yr, {})
2953
2963
  ] }),
2954
- S ? /* @__PURE__ */ i(
2964
+ b ? /* @__PURE__ */ i(
2955
2965
  "div",
2956
2966
  {
2957
2967
  className: ge["rp-loader"],
@@ -2974,7 +2984,7 @@ const ye = {
2974
2984
  height: "100%",
2975
2985
  width: "100%"
2976
2986
  },
2977
- children: g && /* @__PURE__ */ i(g, {})
2987
+ children: v && /* @__PURE__ */ i(v, {})
2978
2988
  }
2979
2989
  )
2980
2990
  }
@@ -2982,49 +2992,49 @@ const ye = {
2982
2992
  ] }) }) }) }) });
2983
2993
  });
2984
2994
  export {
2985
- xo as A,
2995
+ Io as A,
2986
2996
  sn as B,
2987
- bo as C,
2988
- Zo as D,
2989
- zi as E,
2997
+ Co as C,
2998
+ Bo as D,
2999
+ Ai as E,
2990
3000
  Bn as F,
2991
- ki as G,
2992
- Mi as H,
2993
- $i as I,
2994
- Vi as J,
2995
- Ui as K,
2996
- Fi as L,
2997
- xi as M,
2998
- Ii as O,
2999
- ys as P,
3000
- Rs as R,
3001
- Ls as S,
3002
- Is as T,
3003
- Di as Z,
3004
- xs as a,
3005
- Os as b,
3001
+ Mi as G,
3002
+ Wi as H,
3003
+ Gi as I,
3004
+ Ui as J,
3005
+ qi as K,
3006
+ ki as L,
3007
+ Ii as M,
3008
+ Li as O,
3009
+ Ls as P,
3010
+ Os as R,
3011
+ Ns as S,
3012
+ Es as T,
3013
+ zi as Z,
3014
+ Rs as a,
3015
+ As as b,
3006
3016
  Un as c,
3007
3017
  nt as d,
3008
3018
  Lt as e,
3009
3019
  Cn as f,
3010
- go as g,
3020
+ vo as g,
3011
3021
  Tn as h,
3012
- vo as i,
3022
+ _o as i,
3013
3023
  Pn as j,
3014
- _o as k,
3024
+ wo as k,
3015
3025
  Sn as l,
3016
3026
  yn as m,
3017
- wo as n,
3027
+ bo as n,
3018
3028
  xn as o,
3019
- Po as p,
3020
- Io as q,
3029
+ So as p,
3030
+ Lo as q,
3021
3031
  Rt as r,
3022
- Vo as s,
3023
- Bo as t,
3032
+ Uo as s,
3033
+ jo as t,
3024
3034
  oe as u,
3025
- jo as v,
3026
- Jo as w,
3027
- fi as x,
3035
+ Ko as v,
3036
+ Qo as w,
3037
+ gi as x,
3028
3038
  Xn as y,
3029
- Li as z
3039
+ Ri as z
3030
3040
  };