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

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