@pdf-viewer/react 1.1.0-beta.9 → 1.1.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{RPDefaultLayout-39eb8e56.js → RPDefaultLayout-69712c15.js} +949 -946
  2. package/dist/components/RPController.js +42 -35
  3. package/dist/components/RPPages.js +1 -1
  4. package/dist/components/RPProvider.js +1 -1
  5. package/dist/components/layout/RPDefaultLayout.js +1 -1
  6. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  7. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  8. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  9. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  10. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  11. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  12. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  13. package/dist/components/layout/toolbar/Paginate.js +1 -1
  14. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  15. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  16. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  17. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  18. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  19. package/dist/components/page/AnnotationLayer.js +1 -1
  20. package/dist/components/page/CanvasLayer.js +1 -1
  21. package/dist/components/page/DualPage.js +1 -1
  22. package/dist/components/page/RPPage.js +2 -3
  23. package/dist/components/page/SinglePage.js +1 -1
  24. package/dist/components/page/TextLayer.js +1 -1
  25. package/dist/components/ui/LoadingIndicator.js +1 -1
  26. package/dist/contexts/LayoutContainerContext.js +7 -4
  27. package/dist/contexts/PaginationContext.js +1 -1
  28. package/dist/contexts/PrintContext.js +1 -1
  29. package/dist/contexts/SearchContext.js +1 -1
  30. package/dist/contexts/ThumbnailsContext.js +1 -1
  31. package/dist/main.js +1 -1
  32. package/dist/types/contexts/LayoutContainerContext.d.ts +2 -0
  33. package/dist/types/utils/hooks/useWatermark.d.ts +1 -4
  34. package/dist/utils/hooks/useFileDownload.js +1 -1
  35. package/dist/utils/hooks/useLicense.js +1 -1
  36. package/dist/utils/hooks/usePaginate.js +1 -1
  37. package/dist/utils/hooks/usePrint.js +1 -1
  38. package/dist/utils/hooks/useScrollToPage.js +1 -1
  39. package/dist/utils/hooks/useSearch.js +1 -1
  40. package/dist/utils/hooks/useThumbnail.js +1 -1
  41. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  42. package/dist/utils/hooks/useWatermark.js +26 -28
  43. package/package.json +1 -1
@@ -1,64 +1,64 @@
1
- import { jsx as s, jsxs as O, Fragment as He } from "react/jsx-runtime";
2
- import * as U from "react";
3
- import { useRef as W, useEffect as E, useCallback as R, useState as H, createContext as Ue, useContext as qe, useMemo as z, forwardRef as je, useImperativeHandle as Kt, createElement as ze, PureComponent as Zn, Component as Bn, memo as Kn } from "react";
4
- import { ChevronUpIcon as Ne } from "./components/icons/ChevronUpIcon.js";
5
- import { UIButton as Y } from "./components/ui/Button.js";
1
+ import { jsx as a, jsxs as O, Fragment as He } from "react/jsx-runtime";
2
+ import * as V from "react";
3
+ import { useRef as W, useEffect as E, useCallback as R, useState as H, createContext as Ue, useContext as qe, useMemo as z, forwardRef as je, useImperativeHandle as Kt, createElement as ze, PureComponent as jn, Component as Zn, memo as Bn } from "react";
4
+ import { ChevronUpIcon as Oe } from "./components/icons/ChevronUpIcon.js";
5
+ import { UIButton as Q } from "./components/ui/Button.js";
6
6
  import { UIInput as Xt } from "./components/ui/Input.js";
7
- import { useScrollModeContext as ye } from "./contexts/ScrollModeContext.js";
8
- import { useDocumentContext as J } from "./contexts/RPDocumentContext.js";
7
+ import { useScrollModeContext as Le } from "./contexts/ScrollModeContext.js";
8
+ import { useDocumentContext as Y } from "./contexts/RPDocumentContext.js";
9
9
  import "./contexts/DarkModeContext.js";
10
- import { ViewMode as $e, ScrollMode as B, AnnotationSubType as lt, SelectionMode as Xn, ZoomLevel as Ye } from "./utils/types.js";
10
+ import { ViewMode as $e, ScrollMode as X, AnnotationSubType as lt, SelectionMode as Kn, ZoomLevel as Ye } from "./utils/types.js";
11
11
  import { useRotationContext as Ze } from "./contexts/RotationContext.js";
12
- import { useLayerContext as Jn } from "./contexts/LayerContext.js";
12
+ import { useLayerContext as Xn } from "./contexts/LayerContext.js";
13
13
  import { useZoomContext as Be } from "./contexts/ZoomContext.js";
14
14
  import { useViewModeContext as Ke } from "./contexts/ViewModeContext.js";
15
15
  import { useVirtualScrollContext as Xe } from "./contexts/VirtualScrollContext.js";
16
16
  import { useVirtualGridContext as Jt } from "./contexts/VirtualGridContext.js";
17
17
  import { useScrollStateContext as Je } from "./contexts/ScrollStateContext.js";
18
- import { useSelectionModeContext as Yn } from "./contexts/SelectionModeContext.js";
19
- import { useInitialStateContext as Qn } from "./contexts/InitialStateContext.js";
20
- import { useFullScreenContext as er } from "./contexts/FullScreenContext.js";
18
+ import { useSelectionModeContext as Jn } from "./contexts/SelectionModeContext.js";
19
+ import { useInitialStateContext as Yn } from "./contexts/InitialStateContext.js";
20
+ import { useFullScreenContext as Qn } from "./contexts/FullScreenContext.js";
21
21
  import "./contexts/FileInputContext.js";
22
22
  import "./contexts/DropFileZoneContext.js";
23
23
  import { renderPage as ut } from "./utils/renderPage.js";
24
- import { highlightMatches as Yt, findMatches as tr, resetDivs as nr } from "./utils/highlight.js";
24
+ import { highlightMatches as Yt, findMatches as er, resetDivs as tr } from "./utils/highlight.js";
25
25
  import * as Qt from "pdfjs-dist";
26
- import { PixelsPerInch as rr, AnnotationMode as or, RenderingCancelledException as ar, AnnotationLayer as sr } from "pdfjs-dist";
27
- import { useLayoutContainer as Me } from "./contexts/LayoutContainerContext.js";
26
+ import { PixelsPerInch as nr, AnnotationMode as rr, RenderingCancelledException as or, AnnotationLayer as sr } from "pdfjs-dist";
27
+ import { useLayoutContainer as be } from "./contexts/LayoutContainerContext.js";
28
28
  import { useDimensionPagesContext as en } from "./contexts/DimensionPagesContext.js";
29
29
  import "./components/RPConfig.js";
30
- import { ThumbnailIcon as ir } from "./components/icons/Thumbnail.js";
31
- import { c as ne } from "./clsx-0c6e471a.js";
32
- import { LoaderIcon as Ee } from "./components/icons/LoaderIcon.js";
33
- import { useInfiniteScroll as cr } from "./utils/hooks/useInfiniteScroll.js";
34
- import { RPSplitter as lr } from "./components/layout/sidebar/RPSplitter.js";
35
- import { useToolbarComponentContext as pe, ToolbarComponentProvider as ur } from "./contexts/ToolbarComponentContext.js";
36
- import { useIconContext as ce, IconProvider as dr } from "./contexts/IconContext.js";
37
- import re from "./components/ui/RPTooltip.js";
38
- import { c as Te, C as pr } from "./Container-fdb0a71f.js";
39
- import { WrapperLayout as hr } from "./components/layout/WrapperLayout.js";
40
- import { RPDropFileZone as mr } from "./components/RPDropFileZone.js";
41
- import { useViewportContext as be, ViewportProvider as fr } from "./contexts/ViewportContext.js";
30
+ import { ThumbnailIcon as ar } from "./components/icons/Thumbnail.js";
31
+ import { c as te } from "./clsx-0c6e471a.js";
32
+ import { LoaderIcon as De } from "./components/icons/LoaderIcon.js";
33
+ import { useInfiniteScroll as ir } from "./utils/hooks/useInfiniteScroll.js";
34
+ import { RPSplitter as cr } from "./components/layout/sidebar/RPSplitter.js";
35
+ import { useToolbarComponentContext as fe, ToolbarComponentProvider as lr } from "./contexts/ToolbarComponentContext.js";
36
+ import { useIconContext as ce, IconProvider as ur } from "./contexts/IconContext.js";
37
+ import ne from "./components/ui/RPTooltip.js";
38
+ import { c as Ie, C as dr } from "./Container-fdb0a71f.js";
39
+ import { WrapperLayout as pr } from "./components/layout/WrapperLayout.js";
40
+ import { RPDropFileZone as hr } from "./components/RPDropFileZone.js";
41
+ import { useViewportContext as Ce, ViewportProvider as mr } from "./contexts/ViewportContext.js";
42
42
  import "./contexts/ThemeContext.js";
43
- import { SimpleLinkService as gr } from "./utils/link_service.js";
43
+ import { SimpleLinkService as fr } from "./utils/link_service.js";
44
44
  import { dateFormatter as dt } from "./utils/dateFormatter.js";
45
- import { sanitizeExternalUrl as vr } from "./utils/sanitizeExternalUrl.js";
46
- import { useWatermark as tn } from "./utils/hooks/useWatermark.js";
45
+ import { sanitizeExternalUrl as gr } from "./utils/sanitizeExternalUrl.js";
46
+ import { useWatermark as vr } from "./utils/hooks/useWatermark.js";
47
47
  import { useMousePressed as _r } from "./utils/hooks/useMousePressed.js";
48
48
  import { useGrabScroll as wr } from "./utils/hooks/useGrabScroll.js";
49
49
  import { usePinch as br } from "./utils/hooks/usePinch.js";
50
- import { useDebounce as nn } from "./utils/hooks/useDebounce.js";
50
+ import { useDebounce as tn } from "./utils/hooks/useDebounce.js";
51
51
  import { getThumbnailViewport as Rt } from "./utils/getThumbnailViewport.js";
52
52
  import { useDimensionPages as Cr } from "./utils/hooks/useDimensionPages.js";
53
53
  import { appConsole as Tr } from "./utils/appConsole.js";
54
- import { FileUploadTool as rn } from "./components/layout/toolbar/FileUploadTool.js";
55
- import { DarkModeTool as Sr } from "./components/layout/toolbar/DarkModeTool.js";
56
- import { ThreeDotIcon as Pr } from "./components/icons/ThreeDotIcon.js";
54
+ import { FileUploadTool as nn } from "./components/layout/toolbar/FileUploadTool.js";
55
+ import { DarkModeTool as Pr } from "./components/layout/toolbar/DarkModeTool.js";
56
+ import { ThreeDotIcon as Sr } from "./components/icons/ThreeDotIcon.js";
57
57
  import { UIDropDown as vt } from "./components/ui/DropDown.js";
58
- import { c as Ir, a as _t, P as Oe, b as Le, d as wt, i as yr, k as xr, u as Rr } from "./index-3dff3fa8.js";
58
+ import { c as Ir, a as _t, P as Ae, b as Ee, d as wt, i as yr, k as xr, u as Rr } from "./index-3dff3fa8.js";
59
59
  import { D as Lr, u as Qe } from "./index-4f17fe4d.js";
60
60
  import { a as Nr, h as Mr, u as Er, F as Or, b as Dr, G as Ge } from "./index-1db49c1a.js";
61
- import { CloseIcon as on } from "./components/icons/CloseIcon.js";
61
+ import { CloseIcon as rn } from "./components/icons/CloseIcon.js";
62
62
  import { PropertyItem as Ar } from "./components/layout/toolbar/PropertyItem.js";
63
63
  import { useOtherToolContext as zr, OtherToolProvider as Fr } from "./contexts/OtherToolContext.js";
64
64
  import { DocumentProperties as kr } from "./components/layout/toolbar/DocumentProperties.js";
@@ -66,9 +66,9 @@ import { RotateTool as Wr } from "./components/layout/toolbar/RotateTool.js";
66
66
  import { ScrollModeTool as Hr } from "./components/layout/toolbar/ScrollModeTool.js";
67
67
  import { MenuSeparator as bt } from "./components/layout/toolbar/MenuSeparator.js";
68
68
  import { FileDownloadDefaultIcon as $r } from "./components/icons/FileDownloadDefaultIcon.js";
69
- import { MenuItem as he } from "./components/layout/toolbar/MenuItem.js";
69
+ import { MenuItem as ge } from "./components/layout/toolbar/MenuItem.js";
70
70
  import { PrintDefaultTool as Gr } from "./components/icons/PrintDefaultIcon.js";
71
- import { FullScreenTool as an } from "./components/layout/toolbar/FullScreenTool.js";
71
+ import { FullScreenTool as on } from "./components/layout/toolbar/FullScreenTool.js";
72
72
  import { GoToDownIcon as sn } from "./components/icons/GoToDownIcon.js";
73
73
  import { SelectionModeTool as Vr } from "./components/layout/toolbar/SelectionModeTool.js";
74
74
  import { ZoomInIcon as Ur } from "./components/icons/ZoomInIcon.js";
@@ -78,27 +78,27 @@ import { getZoomLevel as jr } from "./utils/getZoomLevel.js";
78
78
  import { SearchIcon as Zr } from "./components/icons/SearchIcon.js";
79
79
  import { UICheckbox as Nt } from "./components/ui/Checkbox.js";
80
80
  import { ClearIcon as Br } from "./components/icons/ClearIcon.js";
81
- import './assets/RPDefaultLayout.css';const cn = () => {
82
- const { viewMode: e } = Ke(), { scrollMode: t } = ye(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = Xe(), { setFocusedPage: a } = ae(), i = W(), c = W(null), { columnCount: l } = Jt(), { widths: p, heights: h } = Cr(), m = W(t), u = W(e), g = W(l);
81
+ import './assets/RPDefaultLayout.css';const an = () => {
82
+ const { viewMode: e } = Ke(), { scrollMode: t } = Le(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = Xe(), { setFocusedPage: s } = oe(), i = W(), c = W(null), { columnCount: l } = Jt(), { widths: p, heights: h } = Cr(), m = W(t), u = W(e), g = W(l);
83
83
  E(() => {
84
84
  n != null && n.scrollToItem && (i.current = n);
85
85
  }, [n]), E(() => {
86
86
  m.current = t, u.current = e;
87
87
  }, [t, e]);
88
- const f = R((C, T, S) => {
88
+ const f = R((b, P, C) => {
89
89
  c.current && cancelAnimationFrame(c.current), c.current = requestAnimationFrame(() => {
90
- C.scrollTo({
91
- left: T,
92
- top: S,
90
+ b.scrollTo({
91
+ left: P,
92
+ top: C,
93
93
  behavior: "instant"
94
94
  });
95
95
  });
96
- }, []), _ = R(
97
- (C) => {
96
+ }, []), w = R(
97
+ (b) => {
98
98
  if (!o)
99
99
  return;
100
- const T = Math.ceil(C / 2) * 2 - 1;
101
- C === T + 1 ? f(o, p[T], 0) : f(o, 0, 0);
100
+ const P = Math.ceil(b / 2) * 2 - 1;
101
+ b === P + 1 ? f(o, p[P], 0) : f(o, 0, 0);
102
102
  },
103
103
  [o, p, f]
104
104
  );
@@ -108,38 +108,38 @@ import './assets/RPDefaultLayout.css';const cn = () => {
108
108
  g.current = l;
109
109
  }, [l]);
110
110
  const v = R(
111
- (C) => {
112
- const T = C - 1;
113
- let S = T, y = 0;
114
- if (u.current === $e.DUAL_PAGE && m.current === B.PAGE_SCROLLING) {
115
- _(C);
111
+ (b) => {
112
+ const P = b - 1;
113
+ let C = P, y = 0;
114
+ if (u.current === $e.DUAL_PAGE && m.current === X.PAGE_SCROLLING) {
115
+ w(b);
116
116
  return;
117
117
  }
118
- if (m.current === B.PAGE_SCROLLING) {
119
- a(C);
118
+ if (m.current === X.PAGE_SCROLLING) {
119
+ s(b);
120
120
  return;
121
121
  }
122
122
  if (!i.current || !r)
123
123
  return;
124
124
  const d = r;
125
- if (m.current === B.HORIZONTAL_SCROLLING) {
126
- y = T;
127
- const b = T * (p[T] ?? 0);
128
- f(d, b, 0);
125
+ if (m.current === X.HORIZONTAL_SCROLLING) {
126
+ y = P;
127
+ const T = P * (p[P] ?? 0);
128
+ f(d, T, 0);
129
129
  } else if (u.current === $e.DUAL_PAGE) {
130
- y = T % 2, S = Math.floor(T / 2);
131
- const w = S * (h[S] ?? 0), P = y * (p[y] ?? 0);
132
- f(d, P, w);
130
+ y = P % 2, C = Math.floor(P / 2);
131
+ const _ = C * (h[C] ?? 0), S = y * (p[y] ?? 0);
132
+ f(d, S, _);
133
133
  } else {
134
- const b = S * (h[S] ?? 0);
135
- f(d, 0, b);
134
+ const T = C * (h[C] ?? 0);
135
+ f(d, 0, T);
136
136
  }
137
137
  },
138
138
  [
139
139
  r,
140
140
  l,
141
- _,
142
- a,
141
+ w,
142
+ s,
143
143
  f,
144
144
  h,
145
145
  p
@@ -149,24 +149,24 @@ import './assets/RPDefaultLayout.css';const cn = () => {
149
149
  c.current && cancelAnimationFrame(c.current);
150
150
  }, []), { scrollToPage: v };
151
151
  }, Kr = (e = 1) => {
152
- const [t, n] = H(e), [r, o] = H(0), { scrollToPage: a } = cn(), i = W(1), { isScrolling: c } = Je(), { viewMode: l } = Ke(), { scrollMode: p } = ye(), h = nn(t, 100), m = R(
152
+ const [t, n] = H(e), [r, o] = H(0), { scrollToPage: s } = an(), i = W(1), { isScrolling: c } = Je(), { viewMode: l } = Ke(), { scrollMode: p } = Le(), h = tn(t, 100), m = R(
153
153
  (v) => {
154
154
  if (!/^[0-9]*$/g.test(v.toString()) || !v)
155
155
  return { success: !1, currentPage: i.current };
156
- const T = +v;
157
- return T < 0 || T > r ? { success: !1, currentPage: i.current } : (n(T), i.current = T, { success: !0, currentPage: +v });
156
+ const P = +v;
157
+ return P < 0 || P > r ? { success: !1, currentPage: i.current } : (n(P), i.current = P, { success: !0, currentPage: +v });
158
158
  },
159
159
  [r]
160
160
  ), u = R(m, [m]), g = R(
161
161
  (v) => {
162
- const C = m(v);
163
- return C.success && (c.current = !0, a(C.currentPage)), C;
162
+ const b = m(v);
163
+ return b.success && (c.current = !0, s(b.currentPage)), b;
164
164
  },
165
- [m, a]
165
+ [m, s]
166
166
  ), f = R(() => {
167
167
  let v = t - 1;
168
168
  g(v);
169
- }, [g, t, l, p]), _ = R(() => {
169
+ }, [g, t, l, p]), w = R(() => {
170
170
  let v = t + 1;
171
171
  g(v);
172
172
  }, [g, t, l, p]);
@@ -175,11 +175,11 @@ import './assets/RPDefaultLayout.css';const cn = () => {
175
175
  totalPages: r,
176
176
  setFocusedPage: u,
177
177
  setTotalPages: o,
178
- nextPage: _,
178
+ nextPage: w,
179
179
  prevPage: f,
180
180
  goToPage: g
181
181
  };
182
- }, ln = Ue({
182
+ }, cn = Ue({
183
183
  focusedPage: 0,
184
184
  setFocusedPage: (e) => {
185
185
  },
@@ -191,21 +191,21 @@ import './assets/RPDefaultLayout.css';const cn = () => {
191
191
  },
192
192
  nextPage: () => {
193
193
  }
194
- }), ae = () => {
195
- const e = qe(ln);
194
+ }), oe = () => {
195
+ const e = qe(cn);
196
196
  return typeof (e == null ? void 0 : e.focusedPage) > "u" && Tr.error("Please use this hooks inside children component of RPProvider"), e;
197
- }, Js = ({ children: e }) => {
198
- const { pdf: t } = J(), { focusedPage: n, totalPages: r, setFocusedPage: o, setTotalPages: a, goToPage: i, nextPage: c, prevPage: l } = Kr();
197
+ }, Ja = ({ children: e }) => {
198
+ const { pdf: t } = Y(), { focusedPage: n, totalPages: r, setFocusedPage: o, setTotalPages: s, goToPage: i, nextPage: c, prevPage: l } = Kr();
199
199
  return E(() => {
200
- t != null && t.numPages && a(t.numPages);
201
- }, [t, a]), /* @__PURE__ */ s(
202
- ln.Provider,
200
+ t != null && t.numPages && s(t.numPages);
201
+ }, [t, s]), /* @__PURE__ */ a(
202
+ cn.Provider,
203
203
  {
204
204
  value: {
205
205
  focusedPage: n,
206
206
  totalPages: r,
207
207
  setFocusedPage: o,
208
- setTotalPages: a,
208
+ setTotalPages: s,
209
209
  nextPage: c,
210
210
  prevPage: l,
211
211
  goToPage: i
@@ -215,20 +215,20 @@ import './assets/RPDefaultLayout.css';const cn = () => {
215
215
  );
216
216
  };
217
217
  const Xr = () => {
218
- const { pdf: e, pages: t } = J(), [n, r] = H({
218
+ const { pdf: e, pages: t } = Y(), [n, r] = H({
219
219
  loadedPages: 0,
220
220
  totalPages: 0,
221
221
  percentage: 0
222
- }), [o, a] = H(!1), [i, c] = H(!1), [l, p] = H(null), h = W(!1);
222
+ }), [o, s] = H(!1), [i, c] = H(!1), [l, p] = H(null), h = W(!1);
223
223
  E(() => {
224
224
  h.current;
225
225
  }, [h]);
226
226
  const m = R(() => {
227
227
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
228
- const S = document.querySelector(".rp-print-zone");
229
- S && S.remove();
228
+ const C = document.querySelector(".rp-print-zone");
229
+ C && C.remove();
230
230
  }, []), u = R(() => {
231
- h.current = !1, a(!1), c(!1), p(null), r({
231
+ h.current = !1, s(!1), c(!1), p(null), r({
232
232
  loadedPages: 0,
233
233
  totalPages: 0,
234
234
  percentage: 0
@@ -236,23 +236,23 @@ const Xr = () => {
236
236
  }, []), g = () => {
237
237
  h.current = !0;
238
238
  }, f = async ({
239
- scratchCanvas: S,
239
+ scratchCanvas: C,
240
240
  pdfDocument: y,
241
241
  pageNumber: d,
242
- viewerPdfPage: b,
243
- printResolution: w,
244
- optionalContentConfigPromise: P,
242
+ viewerPdfPage: T,
243
+ printResolution: _,
244
+ optionalContentConfigPromise: S,
245
245
  printAnnotationStoragePromise: A
246
246
  }) => {
247
247
  if (h.current) {
248
248
  u();
249
249
  return;
250
250
  }
251
- const x = w / rr.PDF;
252
- S.width = Math.floor(b.width * x), S.height = Math.floor(b.height * x);
253
- const I = S.getContext("2d");
254
- I.save(), I.fillStyle = "rgb(255, 255, 255)", I.fillRect(0, 0, S.width, S.height), I.restore();
255
- const [M, L] = await Promise.all([
251
+ const I = _ / nr.PDF;
252
+ C.width = Math.floor(T.width * I), C.height = Math.floor(T.height * I);
253
+ const N = C.getContext("2d");
254
+ N.save(), N.fillStyle = "rgb(255, 255, 255)", N.fillRect(0, 0, C.width, C.height), N.restore();
255
+ const [x, L] = await Promise.all([
256
256
  y.getPage(d),
257
257
  A
258
258
  ]);
@@ -260,121 +260,121 @@ const Xr = () => {
260
260
  u();
261
261
  return;
262
262
  }
263
- const N = {
264
- canvasContext: I,
265
- transform: [x, 0, 0, x, 0, 0],
266
- viewport: M.getViewport({ scale: 1, rotation: b.rotation }),
263
+ const M = {
264
+ canvasContext: N,
265
+ transform: [I, 0, 0, I, 0, 0],
266
+ viewport: x.getViewport({ scale: 1, rotation: T.rotation }),
267
267
  intent: "print",
268
- annotationMode: or.ENABLE_STORAGE,
269
- optionalContentConfigPromise: P,
268
+ annotationMode: rr.ENABLE_STORAGE,
269
+ optionalContentConfigPromise: S,
270
270
  printAnnotationStorage: L
271
271
  };
272
272
  try {
273
- return M.render(N).promise;
273
+ return x.render(M).promise;
274
274
  } catch (D) {
275
- throw D instanceof ar || console.error(D), D;
275
+ throw D instanceof or || console.error(D), D;
276
276
  }
277
- }, _ = R(() => {
278
- const S = window.print;
277
+ }, w = R(() => {
278
+ const C = window.print;
279
279
  return new Promise((y) => {
280
- const d = (P) => {
280
+ const d = (S) => {
281
281
  setTimeout(() => {
282
- S.call(window), setTimeout(() => P(), 20);
282
+ C.call(window), setTimeout(() => S(), 20);
283
283
  }, 0);
284
284
  };
285
285
  if (document.querySelector(".rp-print-zone")) {
286
286
  d(y);
287
287
  return;
288
288
  }
289
- const w = new MutationObserver(() => {
290
- document.querySelector(".rp-print-zone") && (d(y), w.disconnect());
289
+ const _ = new MutationObserver(() => {
290
+ document.querySelector(".rp-print-zone") && (d(y), _.disconnect());
291
291
  });
292
- w.observe(document.body, { childList: !0, subtree: !0 });
292
+ _.observe(document.body, { childList: !0, subtree: !0 });
293
293
  });
294
- }, []), v = async (S) => {
294
+ }, []), v = async (C) => {
295
295
  const y = document.createElement("img"), d = document.createElement("div");
296
- return d.classList.add("rp-print-page"), await new Promise((b, w) => {
297
- S.toBlob((P) => {
298
- P ? (y.src = URL.createObjectURL(P), y.onload = () => {
299
- URL.revokeObjectURL(y.src), b();
300
- }, y.onerror = w) : w(new Error("Failed to create blob"));
296
+ return d.classList.add("rp-print-page"), await new Promise((T, _) => {
297
+ C.toBlob((S) => {
298
+ S ? (y.src = URL.createObjectURL(S), y.onload = () => {
299
+ URL.revokeObjectURL(y.src), T();
300
+ }, y.onerror = _) : _(new Error("Failed to create blob"));
301
301
  });
302
302
  }).catch(() => {
303
303
  }), d.appendChild(y), d;
304
- }, C = (S, y) => {
304
+ }, b = (C, y) => {
305
305
  const d = document.createElement("div");
306
306
  d.classList.add("rp-print-zone");
307
- const b = document.createElement("style"), w = y.get(1);
308
- if (w) {
309
- const { width: P, height: A } = w == null ? void 0 : w.page.getViewport({ scale: 1 });
310
- b.innerHTML = `@page { size: ${P}px ${A}px }`;
307
+ const T = document.createElement("style"), _ = y.get(1);
308
+ if (_) {
309
+ const { width: S, height: A } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
310
+ T.innerHTML = `@page { size: ${S}px ${A}px }`;
311
311
  }
312
- return d.appendChild(b), d.append(...S), d;
313
- }, T = R(async () => {
312
+ return d.appendChild(T), d.append(...C), d;
313
+ }, P = R(async () => {
314
314
  if (!e)
315
315
  return;
316
316
  u();
317
- const S = document.createElement("canvas"), y = [];
317
+ const C = document.createElement("canvas"), y = [];
318
318
  try {
319
319
  e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
320
- const b = e.getOptionalContentConfig({ intent: "print" }), w = Promise.resolve(
320
+ const T = e.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
321
321
  e.annotationStorage.print ?? void 0
322
- ), P = t.size;
323
- for (const [x, I] of t) {
322
+ ), S = t.size;
323
+ for (const [I, N] of t) {
324
324
  if (h.current) {
325
325
  u();
326
326
  return;
327
327
  }
328
- const M = I.page.getViewport({ scale: 1 });
328
+ const x = N.page.getViewport({ scale: 1 });
329
329
  if (await f({
330
- scratchCanvas: S,
330
+ scratchCanvas: C,
331
331
  pdfDocument: e,
332
- pageNumber: x,
333
- viewerPdfPage: M,
332
+ pageNumber: I,
333
+ viewerPdfPage: x,
334
334
  printResolution: 150,
335
- optionalContentConfigPromise: b,
336
- printAnnotationStoragePromise: w
335
+ optionalContentConfigPromise: T,
336
+ printAnnotationStoragePromise: _
337
337
  }), h.current) {
338
338
  u();
339
339
  return;
340
340
  }
341
- const L = await v(S);
341
+ const L = await v(C);
342
342
  y.push(L);
343
- const N = parseFloat((y.length / P * 100).toFixed(2));
343
+ const M = parseFloat((y.length / S * 100).toFixed(2));
344
344
  r({
345
- loadedPages: x,
346
- totalPages: P,
347
- percentage: N
345
+ loadedPages: I,
346
+ totalPages: S,
347
+ percentage: M
348
348
  });
349
349
  }
350
350
  if (h.current) {
351
351
  u();
352
352
  return;
353
353
  }
354
- const A = C(y, t);
355
- document.body.appendChild(A), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await _();
354
+ const A = b(y, t);
355
+ document.body.appendChild(A), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), s(!0), await w();
356
356
  } catch (d) {
357
357
  c(!0), d instanceof Error && p(d);
358
358
  } finally {
359
- S.height = 0, S.width = 0;
359
+ C.height = 0, C.width = 0;
360
360
  }
361
361
  }, [e, t, h]);
362
362
  return E(() => {
363
- const S = () => {
363
+ const C = () => {
364
364
  u(), m();
365
365
  };
366
- return window.addEventListener("afterprint", S, !0), () => {
367
- window.removeEventListener("afterprint", S, !0);
366
+ return window.addEventListener("afterprint", C, !0), () => {
367
+ window.removeEventListener("afterprint", C, !0);
368
368
  };
369
369
  }, [m, u]), {
370
- print: T,
370
+ print: P,
371
371
  cancel: g,
372
372
  progress: n,
373
373
  isComplete: o,
374
374
  isError: i,
375
375
  error: l
376
376
  };
377
- }, un = Ue({
377
+ }, ln = Ue({
378
378
  print: () => {
379
379
  },
380
380
  cancel: () => {
@@ -391,8 +391,8 @@ const Xr = () => {
391
391
  console.error("Error in setOnError callback:", t);
392
392
  }
393
393
  }
394
- }), Ys = ({ children: e }) => {
395
- const [t, n] = H(null), [r, o] = H(null), { print: a, cancel: i, progress: c, isComplete: l, isError: p, error: h } = Xr(), m = R((v) => {
394
+ }), Ya = ({ children: e }) => {
395
+ const [t, n] = H(null), [r, o] = H(null), { print: s, cancel: i, progress: c, isComplete: l, isError: p, error: h } = Xr(), m = R((v) => {
396
396
  v && typeof v == "function" && o(() => v);
397
397
  }, []), u = (v) => {
398
398
  h && v(h);
@@ -413,22 +413,22 @@ const Xr = () => {
413
413
  }, [c, t]);
414
414
  const f = () => {
415
415
  r && (r(), o(null));
416
- }, _ = {
417
- print: a,
416
+ }, w = {
417
+ print: s,
418
418
  cancel: i,
419
419
  setOnProgress: g,
420
420
  setOnComplete: m,
421
421
  setOnError: u,
422
422
  progress: c
423
423
  };
424
- return /* @__PURE__ */ s(un.Provider, { value: _, children: e });
424
+ return /* @__PURE__ */ a(ln.Provider, { value: w, children: e });
425
425
  }, Ct = () => {
426
- const e = qe(un);
426
+ const e = qe(ln);
427
427
  if (!e)
428
428
  throw new Error("usePrintContext must be used within a PrintProvider");
429
429
  return e;
430
430
  }, Jr = () => {
431
- const [e, t] = H({}), { pages: n } = J(), { rotate: r } = Ze(), o = z(() => Object.keys(e).length, [e]), a = R(
431
+ const [e, t] = H({}), { pages: n } = Y(), { rotate: r } = Ze(), o = z(() => Object.keys(e).length, [e]), s = R(
432
432
  (c) => {
433
433
  if (!n.size)
434
434
  return;
@@ -470,8 +470,8 @@ const Xr = () => {
470
470
  [n, r]
471
471
  );
472
472
  E(() => {
473
- a(10);
474
- }, [a]);
473
+ s(10);
474
+ }, [s]);
475
475
  const i = R(
476
476
  (c) => {
477
477
  if (!n)
@@ -504,8 +504,8 @@ const Xr = () => {
504
504
  },
505
505
  [n, r]
506
506
  );
507
- return { thumbnailPages: e, addPage: i, addToPage: a, thumbnailLength: o };
508
- }, dn = Ue({
507
+ return { thumbnailPages: e, addPage: i, addToPage: s, thumbnailLength: o };
508
+ }, un = Ue({
509
509
  thumbnailPages: {},
510
510
  addPage: (e) => {
511
511
  },
@@ -515,107 +515,108 @@ const Xr = () => {
515
515
  setActive: (e) => {
516
516
  },
517
517
  active: !1
518
- }), pn = () => qe(dn), Qs = ({
518
+ }), dn = () => qe(un), Qa = ({
519
519
  children: e,
520
520
  initialThumbnailsVisible: t
521
521
  }) => {
522
- const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } = Jr(), [i, c] = H(t);
523
- return /* @__PURE__ */ s(
524
- dn.Provider,
522
+ const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s } = Jr(), [i, c] = H(t);
523
+ return /* @__PURE__ */ a(
524
+ un.Provider,
525
525
  {
526
- value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a, active: i, setActive: c },
526
+ value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s, active: i, setActive: c },
527
527
  children: e
528
528
  }
529
529
  );
530
530
  }, Yr = (e = {}, t = "") => {
531
- const [n, r] = H(t), [o, a] = H(!1), { pdf: i, pages: c } = J(), l = en(), p = W(!n), { currentZoom: h } = Be(), [m, u] = H([]), { setFocusedPage: g } = ae(), [f, _] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: C } = Xe(), { scrollMode: T } = ye(), [S, y] = H(null), d = W({}), b = z(() => f === 0 ? null : m[f - 1], [f, m]), w = z(() => m.length, [m]);
531
+ const [n, r] = H(t), [o, s] = H(!1), { pdf: i, pages: c } = Y(), l = en(), p = W(!n), { currentZoom: h } = Be(), [m, u] = H([]), { setFocusedPage: g } = oe(), [f, w] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: b } = Xe(), { scrollMode: P } = Le(), { pagesRef: C } = be(), [y, d] = H(null), T = W({}), _ = z(() => f === 0 ? null : m[f - 1], [f, m]), S = z(() => m.length, [m]);
532
532
  E(() => {
533
- if (!b || !c)
533
+ if (!_ || !c)
534
534
  return;
535
- const I = C || v;
536
- if (!I)
535
+ const x = b || v;
536
+ if (!x || !C)
537
537
  return;
538
- const M = c.get(b.page), L = I.clientHeight / 2, N = I.clientWidth / 2;
539
- let D = 0, F = 0;
540
- T === B.PAGE_SCROLLING && g(b.page), T === B.VERTICAL_SCROLLING && (D = l.heights.slice(0, b.page - 1).reduce((V, Z) => V + Z, 0)), T === B.HORIZONTAL_SCROLLING && (F = l.widths.slice(0, b.page - 1).reduce((V, Z) => V + Z, 0));
541
- let $;
542
- if (!M)
538
+ const L = c.get(_.page), M = C.clientHeight / 2, D = C.clientWidth / 2;
539
+ let F = 0, G = 0;
540
+ P === X.PAGE_SCROLLING && g(_.page), P === X.VERTICAL_SCROLLING && (F = l.heights.slice(0, _.page - 1).reduce((Z, B) => Z + B, 0)), P === X.HORIZONTAL_SCROLLING && (G = l.widths.slice(0, _.page - 1).reduce((Z, B) => Z + B, 0));
541
+ let U;
542
+ if (!L)
543
543
  return;
544
- const q = d.current[b.page], j = M.page.getViewport({ scale: 1 });
545
- $ = new Qt.TextLayer({
544
+ const q = T.current[_.page], j = L.page.getViewport({ scale: 1 });
545
+ U = new Qt.TextLayer({
546
546
  viewport: j,
547
547
  textContentSource: q,
548
548
  container: document.createElement("div")
549
- }), $.render().then(() => {
550
- const V = $.textDivs[b.start.idx], [Z] = Yt([b], q, $.textDivs), Q = l.widths[b.page - 1], le = l.heights[b.page - 1], K = document.createElement("div"), ee = document.createElement("div");
551
- V.style.position = "absolute", V.style.color = "transparent", ee.style.position = "absolute", ee.style.top = "0", ee.style.setProperty("--scale-factor", `${h}`), K.style.position = "relative", K.style.width = `${Q}px`, K.style.height = `${le}px`, K.style.zIndex = "-1", K.appendChild(V), ee.appendChild(K), document.body.prepend(ee);
552
- const te = Z.element.getBoundingClientRect(), me = D + +te.top - L + te.height / 2, fe = {
553
- left: F + +te.left - N + te.width / 2,
554
- top: me
549
+ }), U.render().then(() => {
550
+ const Z = U.textDivs[_.start.idx], [B] = Yt([_], q, U.textDivs), le = l.widths[_.page - 1], ue = l.heights[_.page - 1], ee = document.createElement("div"), K = document.createElement("div");
551
+ Z.style.position = "absolute", Z.style.color = "transparent", K.style.position = "absolute", K.style.top = "0", K.style.setProperty("--scale-factor", `${h}`), ee.style.position = "relative", ee.style.width = `${le}px`, ee.style.height = `${ue}px`, ee.style.zIndex = "-1", ee.appendChild(Z), K.appendChild(ee), C.prepend(K);
552
+ const ae = B.element.getBoundingClientRect(), Te = K.getBoundingClientRect(), ve = ae.top - Te.top, Pe = ae.left - Te.left, de = F + ve - M + ae.height / 2, pe = G + Pe - D + ae.width / 2, k = {
553
+ left: Math.max(pe, 0),
554
+ top: Math.max(de, 0)
555
555
  };
556
- document.body.removeChild(ee), I.scrollTo({
557
- ...fe
556
+ C.removeChild(K), x.scrollTo({
557
+ ...k
558
558
  });
559
559
  });
560
560
  }, [
561
561
  c,
562
562
  g,
563
563
  l,
564
+ _,
565
+ P,
564
566
  b,
565
- T,
566
- C,
567
- v
567
+ v,
568
+ C
568
569
  ]);
569
- const P = R(() => {
570
- _((I) => w ? I + 1 > w ? 1 : I + 1 : 0);
571
- }, [w]), A = R(() => {
572
- _((I) => w ? I - 1 <= 0 ? w : I - 1 : 0);
573
- }, [w]), x = R(async (I) => {
574
- if (!I)
570
+ const A = R(() => {
571
+ w((x) => S ? x + 1 > S ? 1 : x + 1 : 0);
572
+ }, [S]), I = R(() => {
573
+ w((x) => S ? x - 1 <= 0 ? S : x - 1 : 0);
574
+ }, [S]), N = R(async (x) => {
575
+ if (!x)
575
576
  return {};
576
- const M = I.numPages, L = {};
577
- for (let N = 1; N <= M; N++) {
577
+ const L = x.numPages, M = {};
578
+ for (let D = 1; D <= L; D++) {
578
579
  if (p.current)
579
580
  throw "close pop over";
580
- const D = await I.getPage(N);
581
- L[N.toString()] = await D.getTextContent();
581
+ const F = await x.getPage(D);
582
+ M[D.toString()] = await F.getTextContent();
582
583
  }
583
- return L;
584
+ return M;
584
585
  }, []);
585
586
  return E(() => {
586
587
  if (!n) {
587
- p.current = !0, u([]), _(0);
588
+ p.current = !0, u([]), w(0);
588
589
  return;
589
590
  }
590
- p.current = !1, a(!0), u([]), _(0), x(i).then((I) => {
591
- d.current = I;
592
- const L = Object.keys(I).reduce((N, D) => {
593
- const F = tr(
591
+ p.current = !1, s(!0), u([]), w(0), N(i).then((x) => {
592
+ T.current = x;
593
+ const M = Object.keys(x).reduce((D, F) => {
594
+ const G = er(
594
595
  [n],
595
- I[D],
596
- Number(D) - 1,
596
+ x[F],
597
+ Number(F) - 1,
597
598
  e
598
- ).map(($, q) => ({ ...$, page: Number(D), pageMatchIdx: q }));
599
- return [...N, ...F];
599
+ ).map((U, q) => ({ ...U, page: Number(F), pageMatchIdx: q }));
600
+ return [...D, ...G];
600
601
  }, []);
601
- u(L), _(L.length ? 1 : 0);
602
+ u(M), w(M.length ? 1 : 0);
602
603
  }).catch(() => {
603
- u([]), _(0);
604
- }).finally(() => a(!1));
605
- }, [n, x, i, e]), {
604
+ u([]), w(0);
605
+ }).finally(() => s(!1));
606
+ }, [n, N, i, e]), {
606
607
  search: n,
607
608
  setSearch: r,
608
609
  loading: o,
609
610
  matches: m,
610
- totalMatches: w,
611
+ totalMatches: S,
611
612
  currentMatchPosition: f,
612
- currentMatch: b,
613
- nextMatch: P,
614
- prevMatch: A,
615
- currentMatchElement: S,
616
- setCurrentMatchElement: y
613
+ currentMatch: _,
614
+ nextMatch: A,
615
+ prevMatch: I,
616
+ currentMatchElement: y,
617
+ setCurrentMatchElement: d
617
618
  };
618
- }, hn = Ue({
619
+ }, pn = Ue({
619
620
  search: "",
620
621
  setSearch: (e) => {
621
622
  },
@@ -639,7 +640,7 @@ const Xr = () => {
639
640
  }) => {
640
641
  const [n, r] = H({}), {
641
642
  loading: o,
642
- setSearch: a,
643
+ setSearch: s,
643
644
  totalMatches: i,
644
645
  currentMatchPosition: c,
645
646
  currentMatch: l,
@@ -650,14 +651,14 @@ const Xr = () => {
650
651
  currentMatchElement: g,
651
652
  setCurrentMatchElement: f
652
653
  } = Yr(n, t);
653
- return /* @__PURE__ */ s(
654
- hn.Provider,
654
+ return /* @__PURE__ */ a(
655
+ pn.Provider,
655
656
  {
656
657
  value: {
657
658
  searchOptions: n,
658
659
  setSearchOptions: r,
659
660
  loading: o,
660
- setSearch: a,
661
+ setSearch: s,
661
662
  totalMatches: i,
662
663
  currentMatchPosition: c,
663
664
  currentMatch: l,
@@ -671,7 +672,7 @@ const Xr = () => {
671
672
  children: e
672
673
  }
673
674
  );
674
- }, mn = () => qe(hn), ue = {
675
+ }, hn = () => qe(pn), he = {
675
676
  "rp-pages": "_rp-pages_34orh_1",
676
677
  "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_34orh_7",
677
678
  "rp-pages-container": "_rp-pages-container_34orh_11",
@@ -684,11 +685,11 @@ const Xr = () => {
684
685
  "rp-page": "_rp-page_h7a2q_1",
685
686
  "rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
686
687
  }, Qr = (e) => {
687
- const { pageNumber: t, onLoaded: n, onLoading: r } = e, o = W(null), { pages: a } = J(), { rotate: i } = Ze(), c = W(), { currentZoom: l } = Be();
688
+ const { pageNumber: t, onLoaded: n, onLoading: r } = e, o = W(null), { pages: s } = Y(), { rotate: i } = Ze(), c = W(), { currentZoom: l } = Be();
688
689
  return E(() => {
689
- if (!a || l === 0)
690
+ if (!s || l === 0)
690
691
  return;
691
- const p = a.get(t);
692
+ const p = s.get(t);
692
693
  if (o.current && p) {
693
694
  const h = o.current;
694
695
  h.hidden = !0;
@@ -700,65 +701,65 @@ const Xr = () => {
700
701
  n && n();
701
702
  });
702
703
  }
703
- }, [a, t, i, l, r, n]), /* @__PURE__ */ s("canvas", { "data-rp": `page-${t}-canvas`, ref: o });
704
+ }, [s, t, i, l, r, n]), /* @__PURE__ */ a("canvas", { "data-rp": `page-${t}-canvas`, ref: o });
704
705
  }, tt = {
705
706
  "rp-text-layer": "_rp-text-layer_1mgyz_1",
706
707
  "rp-text-layer-text": "_rp-text-layer-text_1mgyz_9"
707
708
  }, eo = (e) => {
708
- const { pageNumber: t } = e, { pages: n } = J(), r = W(null), { matches: o, currentMatch: a, setCurrentMatchElement: i } = mn(), [c, l] = H(
709
+ const { pageNumber: t } = e, { pages: n } = Y(), r = W(null), { matches: o, currentMatch: s, setCurrentMatchElement: i } = hn(), [c, l] = H(
709
710
  []
710
711
  ), p = W(), h = W(), m = W(), u = z(() => o.filter((f) => f.pageIndex === t - 1), [o, t]), g = R(
711
- (f, _, v = !1) => {
712
- if (v && nr(f, _), !u.length) {
712
+ (f, w, v = !1) => {
713
+ if (v && tr(f, w), !u.length) {
713
714
  m.current = void 0, l([]);
714
715
  return;
715
716
  }
716
- const C = Yt(u, f, _);
717
- l(C);
717
+ const b = Yt(u, f, w);
718
+ l(b);
718
719
  },
719
720
  [u]
720
721
  );
721
722
  return E(() => {
722
723
  var v;
723
- if ((v = m.current) == null || v.classList.remove("selected"), !c.length || !a || a.pageIndex !== t - 1)
724
+ if ((v = m.current) == null || v.classList.remove("selected"), !c.length || !s || s.pageIndex !== t - 1)
724
725
  return;
725
726
  const f = u.findIndex(
726
- (C) => JSON.stringify(C) === JSON.stringify(a)
727
+ (b) => JSON.stringify(b) === JSON.stringify(s)
727
728
  );
728
729
  if (f === -1)
729
730
  return;
730
- const _ = c.find((C) => C.index === f);
731
- _ && (m.current = _.element, i(_.element), _.element.classList.add("selected"));
732
- }, [a, c, u]), E(() => {
731
+ const w = c.find((b) => b.index === f);
732
+ w && (m.current = w.element, i(w.element), w.element.classList.add("selected"));
733
+ }, [s, c, u]), E(() => {
733
734
  const f = n.get(t);
734
735
  if (!(!f || !r.current))
735
- return p.current && p.current.cancel(), f.page.getTextContent().then((_) => {
736
+ return p.current && p.current.cancel(), f.page.getTextContent().then((w) => {
736
737
  const v = f.page.getViewport({ scale: 1 });
737
738
  return p.current = new Qt.TextLayer({
738
739
  viewport: v,
739
- textContentSource: _,
740
+ textContentSource: w,
740
741
  container: r.current
741
- }), h.current = _, r.current && (r.current.innerText = ""), p.current.render();
742
+ }), h.current = w, r.current && (r.current.innerText = ""), p.current.render();
742
743
  }).then(() => {
743
- var C;
744
- [].slice.call(r.current.children).forEach((T) => {
745
- T.classList.add(tt["rp-text-layer-text"]);
744
+ var b;
745
+ [].slice.call(r.current.children).forEach((P) => {
746
+ P.classList.add(tt["rp-text-layer-text"]);
746
747
  });
747
- const v = (C = p.current) == null ? void 0 : C.textDivs;
748
+ const v = (b = p.current) == null ? void 0 : b.textDivs;
748
749
  v && h.current && g(h.current, v);
749
750
  }).catch(() => {
750
751
  }), () => {
751
- var _;
752
- (_ = p.current) == null || _.cancel();
752
+ var w;
753
+ (w = p.current) == null || w.cancel();
753
754
  };
754
755
  }, [n, t]), E(() => {
755
756
  var v;
756
- [].slice.call(r.current.children).forEach((C) => {
757
- C.classList.add(tt["rp-text-layer-text"]);
757
+ [].slice.call(r.current.children).forEach((b) => {
758
+ b.classList.add(tt["rp-text-layer-text"]);
758
759
  });
759
- const _ = (v = p.current) == null ? void 0 : v.textDivs;
760
- _ && h.current && g(h.current, _, !0);
761
- }, [g]), /* @__PURE__ */ s(
760
+ const w = (v = p.current) == null ? void 0 : v.textDivs;
761
+ w && h.current && g(h.current, w, !0);
762
+ }, [g]), /* @__PURE__ */ a(
762
763
  "div",
763
764
  {
764
765
  "data-rp": `page-${t}-textLayer`,
@@ -768,15 +769,15 @@ const Xr = () => {
768
769
  );
769
770
  }, to = {
770
771
  "rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
771
- }, fn = ["click", "dblclick", "mouseover", "input", "change"];
772
+ }, mn = ["click", "dblclick", "mouseover", "input", "change"];
772
773
  let no = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
773
- const pt = /* @__PURE__ */ new Map(), gn = (e, t) => `${e.loadingTask.docId}___${t.num}R${t.gen === 0 ? "" : t.gen}`;
774
+ const pt = /* @__PURE__ */ new Map(), fn = (e, t) => `${e.loadingTask.docId}___${t.num}R${t.gen === 0 ? "" : t.gen}`;
774
775
  function ro(e, t) {
775
- const n = gn(e, t);
776
+ const n = fn(e, t);
776
777
  return pt.has(n) ? pt.get(n) ?? null : null;
777
778
  }
778
779
  const oo = (e, t, n) => {
779
- pt.set(gn(e, t), n);
780
+ pt.set(fn(e, t), n);
780
781
  }, Mt = (e, t) => {
781
782
  switch (t[1].name) {
782
783
  case "XYZ":
@@ -811,29 +812,29 @@ const oo = (e, t, n) => {
811
812
  };
812
813
  }
813
814
  };
814
- async function vn(e, t) {
815
+ async function gn(e, t) {
815
816
  let n;
816
817
  if (typeof t == "string" ? n = await e.getDestination(t) : n = t, n && typeof n[0] == "object" && n[0] !== null) {
817
818
  const r = n[0], o = ro(e, r);
818
819
  if (o === null) {
819
- const a = await e.getPageIndex(r);
820
- return oo(e, r, a), await vn(e, n);
820
+ const s = await e.getPageIndex(r);
821
+ return oo(e, r, s), await gn(e, n);
821
822
  } else
822
823
  return Mt(o, n);
823
824
  } else
824
825
  return Mt(n[0], n);
825
826
  }
826
- function ao(e) {
827
+ function so(e) {
827
828
  const { id: t, url: n, unsafeUrl: r } = e;
828
- new MutationObserver((a, i) => {
829
+ new MutationObserver((s, i) => {
829
830
  const c = document.querySelector(`[data-annotation-id="${t}"]`);
830
831
  if (c) {
831
- const l = c.querySelector("a"), p = vr((n || r) ?? "", "");
832
+ const l = c.querySelector("a"), p = gr((n || r) ?? "", "");
832
833
  l && (l.setAttribute("target", "_blank"), l.setAttribute("href", p), l.setAttribute("rel", "noopener noreferrer")), i.disconnect();
833
834
  }
834
835
  }).observe(document.body, { childList: !0, subtree: !0 });
835
836
  }
836
- const so = (e) => {
837
+ const ao = (e) => {
837
838
  const n = e.target.parentNode;
838
839
  if (!n)
839
840
  return;
@@ -863,81 +864,81 @@ const so = (e) => {
863
864
  }, Et = (e, t, n, r) => {
864
865
  if (e.type !== "click")
865
866
  return;
866
- const o = e.target, a = o.getAttribute("data-element-id"), i = o.getAttribute("href");
867
+ const o = e.target, s = o.getAttribute("data-element-id"), i = o.getAttribute("href");
867
868
  if (i && i !== "#")
868
869
  return;
869
- const c = t.find((l) => l.id === a);
870
- !c || c.annotationType !== lt.Link || c.dest && vn(n, c.dest).then((l) => {
870
+ const c = t.find((l) => l.id === s);
871
+ !c || c.annotationType !== lt.Link || c.dest && gn(n, c.dest).then((l) => {
871
872
  r(l);
872
873
  });
873
874
  };
874
875
  function io(e, t) {
875
- for (const n of fn)
876
+ for (const n of mn)
876
877
  e.addEventListener(n, t);
877
878
  }
878
879
  function Ot(e, t) {
879
- for (const n of fn)
880
+ for (const n of mn)
880
881
  e.removeEventListener(n, t);
881
882
  }
882
883
  const co = (e) => {
883
- const { pageNumber: t } = e, n = W(null), { pages: r, pdf: o } = J(), a = W(), [i, c] = H(), { setFocusedPage: l, goToPage: p } = ae(), { scrollMode: h } = ye(), m = z(() => r.get(t), [r, t]), u = z(() => m == null ? void 0 : m.page.getViewport(), [m]);
884
+ const { pageNumber: t } = e, n = W(null), { pages: r, pdf: o } = Y(), s = W(), [i, c] = H(), { setFocusedPage: l, goToPage: p } = oe(), { scrollMode: h } = Le(), m = z(() => r.get(t), [r, t]), u = z(() => m == null ? void 0 : m.page.getViewport(), [m]);
884
885
  E(() => {
885
- a.current && (a.current.div.replaceChildren(), a.current = void 0);
886
+ s.current && (s.current.div.replaceChildren(), s.current = void 0);
886
887
  }, [o]);
887
888
  const g = z(() => o == null ? void 0 : o.annotationStorage, [o]);
888
889
  E(() => {
889
- m && m.page.getAnnotations().then((_) => {
890
- a.current = void 0, c(_), n.current && (n.current.innerText = "");
890
+ m && m.page.getAnnotations().then((w) => {
891
+ s.current = void 0, c(w), n.current && (n.current.innerText = "");
891
892
  });
892
893
  }, [m]);
893
894
  const f = R(
894
- (_) => {
895
- so(_), !(!i || !o) && (h === B.PAGE_SCROLLING ? Et(_, i, o, (v) => l(v.pageIndex + 1)) : Et(_, i, o, (v) => p(v.pageIndex + 1)));
895
+ (w) => {
896
+ ao(w), !(!i || !o) && (h === X.PAGE_SCROLLING ? Et(w, i, o, (v) => l(v.pageIndex + 1)) : Et(w, i, o, (v) => p(v.pageIndex + 1)));
896
897
  },
897
898
  [o, i, p, l, h]
898
899
  );
899
900
  return E(() => {
900
901
  if (!m || !i)
901
902
  return;
902
- const _ = m.page.getViewport();
903
- if (a.current) {
904
- a.current.update({
905
- viewport: _.clone({ dontFlip: !0 })
903
+ const w = m.page.getViewport();
904
+ if (s.current) {
905
+ s.current.update({
906
+ viewport: w.clone({ dontFlip: !0 })
906
907
  });
907
908
  return;
908
909
  }
909
- for (const C of i) {
910
- const { annotationType: T } = C;
911
- switch (T) {
910
+ for (const b of i) {
911
+ const { annotationType: P } = b;
912
+ switch (P) {
912
913
  case lt.Link:
913
- ao(C);
914
+ so(b);
914
915
  break;
915
916
  case lt.Widget:
916
917
  break;
917
918
  }
918
919
  }
919
920
  return (async () => {
920
- a.current = new sr({
921
+ s.current = new sr({
921
922
  div: n.current,
922
923
  accessibilityManager: void 0,
923
924
  annotationCanvasMap: void 0,
924
925
  annotationEditorUIManager: void 0,
925
926
  structTreeLayer: void 0,
926
927
  page: m.page,
927
- viewport: _.clone({ dontFlip: !0 })
928
+ viewport: w.clone({ dontFlip: !0 })
928
929
  }), n.current && Ot(n.current, f);
929
- const C = await (o == null ? void 0 : o.hasJSActions()), T = await (o == null ? void 0 : o.getFieldObjects());
930
- return a.current.render({
930
+ const b = await (o == null ? void 0 : o.hasJSActions()), P = await (o == null ? void 0 : o.getFieldObjects());
931
+ return s.current.render({
931
932
  annotations: i,
932
933
  annotationStorage: g,
933
- hasJSActions: C,
934
- fieldObjects: T,
934
+ hasJSActions: b,
935
+ fieldObjects: P,
935
936
  div: n.current,
936
- viewport: _.clone({ dontFlip: !0 }),
937
+ viewport: w.clone({ dontFlip: !0 }),
937
938
  page: m.page,
938
939
  imageResourcesPath: no,
939
940
  renderForms: !1,
940
- linkService: new gr(),
941
+ linkService: new fr(),
941
942
  downloadManager: null,
942
943
  enableScripting: !1
943
944
  });
@@ -946,7 +947,7 @@ const co = (e) => {
946
947
  }), () => {
947
948
  n.current && Ot(n.current, f);
948
949
  };
949
- }, [o, i, f]), /* @__PURE__ */ s(
950
+ }, [o, i, f]), /* @__PURE__ */ a(
950
951
  "div",
951
952
  {
952
953
  "data-rp": `page-${t}-annotationLayer`,
@@ -955,53 +956,53 @@ const co = (e) => {
955
956
  ref: n
956
957
  }
957
958
  );
958
- }, lo = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1], Tt = je((e, t) => {
959
- const { pageNumber: n, style: r, onIntersectRatioChange: o, ...a } = e, { pages: i } = J(), { rotate: c } = Ze(), { textLayer: l } = Jn(), { currentZoom: p } = Be(), { container: h } = tn(), m = W(i.get(n)), [u, g] = H(!1), f = W(null), [_, v] = H({
959
+ }, lo = Array.from({ length: 21 }, (e, t) => Number((t * 0.05).toFixed(2))), Tt = je((e, t) => {
960
+ const { pageNumber: n, style: r, onIntersectRatioChange: o, ...s } = e, { pages: i } = Y(), { rotate: c } = Ze(), { textLayer: l } = Xn(), { currentZoom: p } = Be(), h = W(i.get(n)), [m, u] = H(!1), g = W(null), [f, w] = H({
960
961
  width: 0,
961
962
  height: 0
962
963
  });
963
- Kt(t, () => f.current), E(() => {
964
- if (i && (m.current = i.get(n), m.current)) {
965
- const y = m.current.page.getViewport({ scale: p, rotation: c });
966
- v(y);
964
+ Kt(t, () => g.current), E(() => {
965
+ if (i && (h.current = i.get(n), h.current)) {
966
+ const C = h.current.page.getViewport({ scale: p, rotation: c });
967
+ w(C);
967
968
  }
968
969
  }, [i, n, c, p]);
969
- const C = z(() => {
970
+ const v = z(() => {
970
971
  switch (c) {
971
972
  case 90:
972
- return `${_.width / 2}px ${_.width / 2}px`;
973
+ return `${f.width / 2}px ${f.width / 2}px`;
973
974
  case -90:
974
975
  case 270:
975
- return `${_.height / 2}px ${_.height / 2}px`;
976
+ return `${f.height / 2}px ${f.height / 2}px`;
976
977
  default:
977
978
  return "center";
978
979
  }
979
- }, [c, _]), T = R(() => {
980
- g(!0);
981
- }, []), S = R(() => {
982
- g(!1);
980
+ }, [c, f]), b = R(() => {
981
+ u(!0);
982
+ }, []), P = R(() => {
983
+ u(!1);
983
984
  }, []);
984
985
  return E(() => {
985
- const y = new IntersectionObserver(
986
- (d) => {
987
- o(n, d[0].intersectionRatio);
986
+ const C = new IntersectionObserver(
987
+ (y) => {
988
+ o(n, y[0].intersectionRatio);
988
989
  },
989
- { threshold: lo, root: h, rootMargin: "0px" }
990
+ { threshold: lo }
990
991
  );
991
- return f.current && y.observe(f.current), () => {
992
- y.disconnect(), o(n, -1);
992
+ return g.current && C.observe(g.current), () => {
993
+ C.disconnect(), o(n, -1);
993
994
  };
994
- }, [o, n, c, _]), /* @__PURE__ */ s(
995
+ }, [o, n, c, f]), /* @__PURE__ */ a(
995
996
  "div",
996
997
  {
997
- ref: f,
998
+ ref: g,
998
999
  id: `page-${n}`,
999
1000
  "data-rp": `page-${n}`,
1000
- ...a,
1001
+ ...s,
1001
1002
  style: {
1002
1003
  ...r,
1003
1004
  "--rp-rotate": `${c}deg`,
1004
- "--rp-page-rotate-translate": `${C}`,
1005
+ "--rp-page-rotate-translate": `${v}`,
1005
1006
  "--scale-factor": p
1006
1007
  },
1007
1008
  className: et["rp-page-wrapper"],
@@ -1009,15 +1010,15 @@ const co = (e) => {
1009
1010
  "div",
1010
1011
  {
1011
1012
  style: {
1012
- width: `${_.width}px`,
1013
- height: `${_.height}px`
1013
+ width: `${f.width}px`,
1014
+ height: `${f.height}px`
1014
1015
  },
1015
1016
  className: et["rp-page"],
1016
1017
  children: [
1017
- /* @__PURE__ */ s(Qr, { onLoading: T, onLoaded: S, pageNumber: n }),
1018
- u && /* @__PURE__ */ s("div", { className: et["rp-loader-wrapper"], children: /* @__PURE__ */ s(Ee, {}) }),
1019
- l && /* @__PURE__ */ s(eo, { pageNumber: n }),
1020
- /* @__PURE__ */ s(co, { pageNumber: n })
1018
+ /* @__PURE__ */ a(Qr, { onLoading: b, onLoaded: P, pageNumber: n }),
1019
+ m && /* @__PURE__ */ a("div", { className: et["rp-loader-wrapper"], children: /* @__PURE__ */ a(De, {}) }),
1020
+ l && /* @__PURE__ */ a(eo, { pageNumber: n }),
1021
+ /* @__PURE__ */ a(co, { pageNumber: n })
1021
1022
  ]
1022
1023
  }
1023
1024
  )
@@ -1063,11 +1064,11 @@ function ho(e, t) {
1063
1064
  }
1064
1065
  function nt(e, t) {
1065
1066
  t === void 0 && (t = ho);
1066
- var n, r = [], o, a = !1;
1067
+ var n, r = [], o, s = !1;
1067
1068
  function i() {
1068
1069
  for (var c = [], l = 0; l < arguments.length; l++)
1069
1070
  c[l] = arguments[l];
1070
- return a && n === this && t(c, r) || (o = e.apply(this, c), a = !0, n = this, r = c), o;
1071
+ return s && n === this && t(c, r) || (o = e.apply(this, c), s = !0, n = this, r = c), o;
1071
1072
  }
1072
1073
  return i;
1073
1074
  }
@@ -1109,15 +1110,15 @@ function go(e) {
1109
1110
  }
1110
1111
  return rt;
1111
1112
  }
1112
- var Se = null;
1113
+ var ye = null;
1113
1114
  function Wt(e) {
1114
- if (e === void 0 && (e = !1), Se === null || e) {
1115
+ if (e === void 0 && (e = !1), ye === null || e) {
1115
1116
  var t = document.createElement("div"), n = t.style;
1116
1117
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
1117
1118
  var r = document.createElement("div"), o = r.style;
1118
- return o.width = "100px", o.height = "100px", t.appendChild(r), document.body.appendChild(t), t.scrollLeft > 0 ? Se = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? Se = "negative" : Se = "positive-ascending"), document.body.removeChild(t), Se;
1119
+ return o.width = "100px", o.height = "100px", t.appendChild(r), document.body.appendChild(t), t.scrollLeft > 0 ? ye = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? ye = "negative" : ye = "positive-ascending"), document.body.removeChild(t), ye;
1119
1120
  }
1120
- return Se;
1121
+ return ye;
1121
1122
  }
1122
1123
  var vo = 150, _o = function(t) {
1123
1124
  var n = t.columnIndex;
@@ -1127,12 +1128,12 @@ var vo = 150, _o = function(t) {
1127
1128
  }, Fe = null, ke = null, We = null;
1128
1129
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Fe = /* @__PURE__ */ new WeakSet(), ke = /* @__PURE__ */ new WeakSet(), We = /* @__PURE__ */ new WeakSet());
1129
1130
  function wo(e) {
1130
- var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, i = e.getEstimatedTotalHeight, c = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, h = e.getRowHeight, m = e.getRowOffset, u = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, f = e.initInstanceProps, _ = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
1131
- return t = /* @__PURE__ */ function(C) {
1132
- uo(T, C);
1133
- function T(y) {
1131
+ var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, s = e.getColumnWidth, i = e.getEstimatedTotalHeight, c = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, h = e.getRowHeight, m = e.getRowOffset, u = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, f = e.initInstanceProps, w = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
1132
+ return t = /* @__PURE__ */ function(b) {
1133
+ uo(P, b);
1134
+ function P(y) {
1134
1135
  var d;
1135
- return d = C.call(this, y) || this, d._instanceProps = f(d.props, Dt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
1136
+ return d = b.call(this, y) || this, d._instanceProps = f(d.props, Dt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
1136
1137
  instance: Dt(d),
1137
1138
  isScrolling: !1,
1138
1139
  horizontalScrollDirection: "forward",
@@ -1140,72 +1141,72 @@ function wo(e) {
1140
1141
  scrollTop: typeof d.props.initialScrollTop == "number" ? d.props.initialScrollTop : 0,
1141
1142
  scrollUpdateWasRequested: !1,
1142
1143
  verticalScrollDirection: "forward"
1143
- }, d._callOnItemsRendered = void 0, d._callOnItemsRendered = nt(function(b, w, P, A, x, I, M, L) {
1144
+ }, d._callOnItemsRendered = void 0, d._callOnItemsRendered = nt(function(T, _, S, A, I, N, x, L) {
1144
1145
  return d.props.onItemsRendered({
1145
- overscanColumnStartIndex: b,
1146
- overscanColumnStopIndex: w,
1147
- overscanRowStartIndex: P,
1146
+ overscanColumnStartIndex: T,
1147
+ overscanColumnStopIndex: _,
1148
+ overscanRowStartIndex: S,
1148
1149
  overscanRowStopIndex: A,
1149
- visibleColumnStartIndex: x,
1150
- visibleColumnStopIndex: I,
1151
- visibleRowStartIndex: M,
1150
+ visibleColumnStartIndex: I,
1151
+ visibleColumnStopIndex: N,
1152
+ visibleRowStartIndex: x,
1152
1153
  visibleRowStopIndex: L
1153
1154
  });
1154
- }), d._callOnScroll = void 0, d._callOnScroll = nt(function(b, w, P, A, x) {
1155
+ }), d._callOnScroll = void 0, d._callOnScroll = nt(function(T, _, S, A, I) {
1155
1156
  return d.props.onScroll({
1156
- horizontalScrollDirection: P,
1157
- scrollLeft: b,
1158
- scrollTop: w,
1157
+ horizontalScrollDirection: S,
1158
+ scrollLeft: T,
1159
+ scrollTop: _,
1159
1160
  verticalScrollDirection: A,
1160
- scrollUpdateWasRequested: x
1161
+ scrollUpdateWasRequested: I
1161
1162
  });
1162
- }), d._getItemStyle = void 0, d._getItemStyle = function(b, w) {
1163
- var P = d.props, A = P.columnWidth, x = P.direction, I = P.rowHeight, M = d._getItemStyleCache(_ && A, _ && x, _ && I), L = b + ":" + w, N;
1164
- if (M.hasOwnProperty(L))
1165
- N = M[L];
1163
+ }), d._getItemStyle = void 0, d._getItemStyle = function(T, _) {
1164
+ var S = d.props, A = S.columnWidth, I = S.direction, N = S.rowHeight, x = d._getItemStyleCache(w && A, w && I, w && N), L = T + ":" + _, M;
1165
+ if (x.hasOwnProperty(L))
1166
+ M = x[L];
1166
1167
  else {
1167
- var D = n(d.props, w, d._instanceProps), F = x === "rtl";
1168
- M[L] = N = {
1168
+ var D = n(d.props, _, d._instanceProps), F = I === "rtl";
1169
+ x[L] = M = {
1169
1170
  position: "absolute",
1170
1171
  left: F ? void 0 : D,
1171
1172
  right: F ? D : void 0,
1172
- top: m(d.props, b, d._instanceProps),
1173
- height: h(d.props, b, d._instanceProps),
1174
- width: a(d.props, w, d._instanceProps)
1173
+ top: m(d.props, T, d._instanceProps),
1174
+ height: h(d.props, T, d._instanceProps),
1175
+ width: s(d.props, _, d._instanceProps)
1175
1176
  };
1176
1177
  }
1177
- return N;
1178
- }, d._getItemStyleCache = void 0, d._getItemStyleCache = nt(function(b, w, P) {
1178
+ return M;
1179
+ }, d._getItemStyleCache = void 0, d._getItemStyleCache = nt(function(T, _, S) {
1179
1180
  return {};
1180
- }), d._onScroll = function(b) {
1181
- var w = b.currentTarget, P = w.clientHeight, A = w.clientWidth, x = w.scrollLeft, I = w.scrollTop, M = w.scrollHeight, L = w.scrollWidth;
1182
- d.setState(function(N) {
1183
- if (N.scrollLeft === x && N.scrollTop === I)
1181
+ }), d._onScroll = function(T) {
1182
+ var _ = T.currentTarget, S = _.clientHeight, A = _.clientWidth, I = _.scrollLeft, N = _.scrollTop, x = _.scrollHeight, L = _.scrollWidth;
1183
+ d.setState(function(M) {
1184
+ if (M.scrollLeft === I && M.scrollTop === N)
1184
1185
  return null;
1185
- var D = d.props.direction, F = x;
1186
+ var D = d.props.direction, F = I;
1186
1187
  if (D === "rtl")
1187
1188
  switch (Wt()) {
1188
1189
  case "negative":
1189
- F = -x;
1190
+ F = -I;
1190
1191
  break;
1191
1192
  case "positive-descending":
1192
- F = L - A - x;
1193
+ F = L - A - I;
1193
1194
  break;
1194
1195
  }
1195
1196
  F = Math.max(0, Math.min(F, L - A));
1196
- var $ = Math.max(0, Math.min(I, M - P));
1197
+ var G = Math.max(0, Math.min(N, x - S));
1197
1198
  return {
1198
1199
  isScrolling: !0,
1199
- horizontalScrollDirection: N.scrollLeft < x ? "forward" : "backward",
1200
+ horizontalScrollDirection: M.scrollLeft < I ? "forward" : "backward",
1200
1201
  scrollLeft: F,
1201
- scrollTop: $,
1202
- verticalScrollDirection: N.scrollTop < I ? "forward" : "backward",
1202
+ scrollTop: G,
1203
+ verticalScrollDirection: M.scrollTop < N ? "forward" : "backward",
1203
1204
  scrollUpdateWasRequested: !1
1204
1205
  };
1205
1206
  }, d._resetIsScrollingDebounced);
1206
- }, d._outerRefSetter = function(b) {
1207
- var w = d.props.outerRef;
1208
- d._outerRef = b, typeof w == "function" ? w(b) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = b);
1207
+ }, d._outerRefSetter = function(T) {
1208
+ var _ = d.props.outerRef;
1209
+ d._outerRef = T, typeof _ == "function" ? _(T) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = T);
1209
1210
  }, d._resetIsScrollingDebounced = function() {
1210
1211
  d._resetIsScrollingTimeoutId !== null && kt(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId = fo(d._resetIsScrolling, vo);
1211
1212
  }, d._resetIsScrolling = function() {
@@ -1216,131 +1217,131 @@ function wo(e) {
1216
1217
  });
1217
1218
  }, d;
1218
1219
  }
1219
- T.getDerivedStateFromProps = function(d, b) {
1220
- return bo(d, b), v(d), null;
1220
+ P.getDerivedStateFromProps = function(d, T) {
1221
+ return bo(d, T), v(d), null;
1221
1222
  };
1222
- var S = T.prototype;
1223
- return S.scrollTo = function(d) {
1224
- var b = d.scrollLeft, w = d.scrollTop;
1225
- b !== void 0 && (b = Math.max(0, b)), w !== void 0 && (w = Math.max(0, w)), this.setState(function(P) {
1226
- return b === void 0 && (b = P.scrollLeft), w === void 0 && (w = P.scrollTop), P.scrollLeft === b && P.scrollTop === w ? null : {
1227
- horizontalScrollDirection: P.scrollLeft < b ? "forward" : "backward",
1228
- scrollLeft: b,
1229
- scrollTop: w,
1223
+ var C = P.prototype;
1224
+ return C.scrollTo = function(d) {
1225
+ var T = d.scrollLeft, _ = d.scrollTop;
1226
+ T !== void 0 && (T = Math.max(0, T)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(S) {
1227
+ return T === void 0 && (T = S.scrollLeft), _ === void 0 && (_ = S.scrollTop), S.scrollLeft === T && S.scrollTop === _ ? null : {
1228
+ horizontalScrollDirection: S.scrollLeft < T ? "forward" : "backward",
1229
+ scrollLeft: T,
1230
+ scrollTop: _,
1230
1231
  scrollUpdateWasRequested: !0,
1231
- verticalScrollDirection: P.scrollTop < w ? "forward" : "backward"
1232
+ verticalScrollDirection: S.scrollTop < _ ? "forward" : "backward"
1232
1233
  };
1233
1234
  }, this._resetIsScrollingDebounced);
1234
- }, S.scrollToItem = function(d) {
1235
- var b = d.align, w = b === void 0 ? "auto" : b, P = d.columnIndex, A = d.rowIndex, x = this.props, I = x.columnCount, M = x.height, L = x.rowCount, N = x.width, D = this.state, F = D.scrollLeft, $ = D.scrollTop, q = go();
1236
- P !== void 0 && (P = Math.max(0, Math.min(P, I - 1))), A !== void 0 && (A = Math.max(0, Math.min(A, L - 1)));
1237
- var j = i(this.props, this._instanceProps), V = c(this.props, this._instanceProps), Z = V > N ? q : 0, Q = j > M ? q : 0;
1235
+ }, C.scrollToItem = function(d) {
1236
+ var T = d.align, _ = T === void 0 ? "auto" : T, S = d.columnIndex, A = d.rowIndex, I = this.props, N = I.columnCount, x = I.height, L = I.rowCount, M = I.width, D = this.state, F = D.scrollLeft, G = D.scrollTop, U = go();
1237
+ S !== void 0 && (S = Math.max(0, Math.min(S, N - 1))), A !== void 0 && (A = Math.max(0, Math.min(A, L - 1)));
1238
+ var q = i(this.props, this._instanceProps), j = c(this.props, this._instanceProps), Z = j > M ? U : 0, B = q > x ? U : 0;
1238
1239
  this.scrollTo({
1239
- scrollLeft: P !== void 0 ? l(this.props, P, w, F, this._instanceProps, Q) : F,
1240
- scrollTop: A !== void 0 ? p(this.props, A, w, $, this._instanceProps, Z) : $
1240
+ scrollLeft: S !== void 0 ? l(this.props, S, _, F, this._instanceProps, B) : F,
1241
+ scrollTop: A !== void 0 ? p(this.props, A, _, G, this._instanceProps, Z) : G
1241
1242
  });
1242
- }, S.componentDidMount = function() {
1243
- var d = this.props, b = d.initialScrollLeft, w = d.initialScrollTop;
1243
+ }, C.componentDidMount = function() {
1244
+ var d = this.props, T = d.initialScrollLeft, _ = d.initialScrollTop;
1244
1245
  if (this._outerRef != null) {
1245
- var P = this._outerRef;
1246
- typeof b == "number" && (P.scrollLeft = b), typeof w == "number" && (P.scrollTop = w);
1246
+ var S = this._outerRef;
1247
+ typeof T == "number" && (S.scrollLeft = T), typeof _ == "number" && (S.scrollTop = _);
1247
1248
  }
1248
1249
  this._callPropsCallbacks();
1249
- }, S.componentDidUpdate = function() {
1250
- var d = this.props.direction, b = this.state, w = b.scrollLeft, P = b.scrollTop, A = b.scrollUpdateWasRequested;
1250
+ }, C.componentDidUpdate = function() {
1251
+ var d = this.props.direction, T = this.state, _ = T.scrollLeft, S = T.scrollTop, A = T.scrollUpdateWasRequested;
1251
1252
  if (A && this._outerRef != null) {
1252
- var x = this._outerRef;
1253
+ var I = this._outerRef;
1253
1254
  if (d === "rtl")
1254
1255
  switch (Wt()) {
1255
1256
  case "negative":
1256
- x.scrollLeft = -w;
1257
+ I.scrollLeft = -_;
1257
1258
  break;
1258
1259
  case "positive-ascending":
1259
- x.scrollLeft = w;
1260
+ I.scrollLeft = _;
1260
1261
  break;
1261
1262
  default:
1262
- var I = x.clientWidth, M = x.scrollWidth;
1263
- x.scrollLeft = M - I - w;
1263
+ var N = I.clientWidth, x = I.scrollWidth;
1264
+ I.scrollLeft = x - N - _;
1264
1265
  break;
1265
1266
  }
1266
1267
  else
1267
- x.scrollLeft = Math.max(0, w);
1268
- x.scrollTop = Math.max(0, P);
1268
+ I.scrollLeft = Math.max(0, _);
1269
+ I.scrollTop = Math.max(0, S);
1269
1270
  }
1270
1271
  this._callPropsCallbacks();
1271
- }, S.componentWillUnmount = function() {
1272
+ }, C.componentWillUnmount = function() {
1272
1273
  this._resetIsScrollingTimeoutId !== null && kt(this._resetIsScrollingTimeoutId);
1273
- }, S.render = function() {
1274
- var d = this.props, b = d.children, w = d.className, P = d.columnCount, A = d.direction, x = d.height, I = d.innerRef, M = d.innerElementType, L = d.innerTagName, N = d.itemData, D = d.itemKey, F = D === void 0 ? _o : D, $ = d.outerElementType, q = d.outerTagName, j = d.rowCount, V = d.style, Z = d.useIsScrolling, Q = d.width, le = this.state.isScrolling, K = this._getHorizontalRangeToRender(), ee = K[0], te = K[1], me = this._getVerticalRangeToRender(), De = me[0], fe = me[1], Ae = [];
1275
- if (P > 0 && j)
1276
- for (var ge = De; ge <= fe; ge++)
1277
- for (var ve = ee; ve <= te; ve++)
1278
- Ae.push(ze(b, {
1279
- columnIndex: ve,
1280
- data: N,
1274
+ }, C.render = function() {
1275
+ var d = this.props, T = d.children, _ = d.className, S = d.columnCount, A = d.direction, I = d.height, N = d.innerRef, x = d.innerElementType, L = d.innerTagName, M = d.itemData, D = d.itemKey, F = D === void 0 ? _o : D, G = d.outerElementType, U = d.outerTagName, q = d.rowCount, j = d.style, Z = d.useIsScrolling, B = d.width, le = this.state.isScrolling, ue = this._getHorizontalRangeToRender(), ee = ue[0], K = ue[1], ae = this._getVerticalRangeToRender(), Te = ae[0], ve = ae[1], Pe = [];
1276
+ if (S > 0 && q)
1277
+ for (var de = Te; de <= ve; de++)
1278
+ for (var pe = ee; pe <= K; pe++)
1279
+ Pe.push(ze(T, {
1280
+ columnIndex: pe,
1281
+ data: M,
1281
1282
  isScrolling: Z ? le : void 0,
1282
1283
  key: F({
1283
- columnIndex: ve,
1284
- data: N,
1285
- rowIndex: ge
1284
+ columnIndex: pe,
1285
+ data: M,
1286
+ rowIndex: de
1286
1287
  }),
1287
- rowIndex: ge,
1288
- style: this._getItemStyle(ge, ve)
1288
+ rowIndex: de,
1289
+ style: this._getItemStyle(de, pe)
1289
1290
  }));
1290
- var k = i(this.props, this._instanceProps), G = c(this.props, this._instanceProps);
1291
- return ze($ || q || "div", {
1292
- className: w,
1291
+ var k = i(this.props, this._instanceProps), $ = c(this.props, this._instanceProps);
1292
+ return ze(G || U || "div", {
1293
+ className: _,
1293
1294
  onScroll: this._onScroll,
1294
1295
  ref: this._outerRefSetter,
1295
1296
  style: ht({
1296
1297
  position: "relative",
1297
- height: x,
1298
- width: Q,
1298
+ height: I,
1299
+ width: B,
1299
1300
  overflow: "auto",
1300
1301
  WebkitOverflowScrolling: "touch",
1301
1302
  willChange: "transform",
1302
1303
  direction: A
1303
- }, V)
1304
- }, ze(M || L || "div", {
1305
- children: Ae,
1306
- ref: I,
1304
+ }, j)
1305
+ }, ze(x || L || "div", {
1306
+ children: Pe,
1307
+ ref: N,
1307
1308
  style: {
1308
1309
  height: k,
1309
1310
  pointerEvents: le ? "none" : void 0,
1310
- width: G
1311
+ width: $
1311
1312
  }
1312
1313
  }));
1313
- }, S._callPropsCallbacks = function() {
1314
- var d = this.props, b = d.columnCount, w = d.onItemsRendered, P = d.onScroll, A = d.rowCount;
1315
- if (typeof w == "function" && b > 0 && A > 0) {
1316
- var x = this._getHorizontalRangeToRender(), I = x[0], M = x[1], L = x[2], N = x[3], D = this._getVerticalRangeToRender(), F = D[0], $ = D[1], q = D[2], j = D[3];
1317
- this._callOnItemsRendered(I, M, F, $, L, N, q, j);
1314
+ }, C._callPropsCallbacks = function() {
1315
+ var d = this.props, T = d.columnCount, _ = d.onItemsRendered, S = d.onScroll, A = d.rowCount;
1316
+ if (typeof _ == "function" && T > 0 && A > 0) {
1317
+ var I = this._getHorizontalRangeToRender(), N = I[0], x = I[1], L = I[2], M = I[3], D = this._getVerticalRangeToRender(), F = D[0], G = D[1], U = D[2], q = D[3];
1318
+ this._callOnItemsRendered(N, x, F, G, L, M, U, q);
1318
1319
  }
1319
- if (typeof P == "function") {
1320
- var V = this.state, Z = V.horizontalScrollDirection, Q = V.scrollLeft, le = V.scrollTop, K = V.scrollUpdateWasRequested, ee = V.verticalScrollDirection;
1321
- this._callOnScroll(Q, le, Z, ee, K);
1320
+ if (typeof S == "function") {
1321
+ var j = this.state, Z = j.horizontalScrollDirection, B = j.scrollLeft, le = j.scrollTop, ue = j.scrollUpdateWasRequested, ee = j.verticalScrollDirection;
1322
+ this._callOnScroll(B, le, Z, ee, ue);
1322
1323
  }
1323
- }, S._getHorizontalRangeToRender = function() {
1324
- var d = this.props, b = d.columnCount, w = d.overscanColumnCount, P = d.overscanColumnsCount, A = d.overscanCount, x = d.rowCount, I = this.state, M = I.horizontalScrollDirection, L = I.isScrolling, N = I.scrollLeft, D = w || P || A || 1;
1325
- if (b === 0 || x === 0)
1324
+ }, C._getHorizontalRangeToRender = function() {
1325
+ var d = this.props, T = d.columnCount, _ = d.overscanColumnCount, S = d.overscanColumnsCount, A = d.overscanCount, I = d.rowCount, N = this.state, x = N.horizontalScrollDirection, L = N.isScrolling, M = N.scrollLeft, D = _ || S || A || 1;
1326
+ if (T === 0 || I === 0)
1326
1327
  return [0, 0, 0, 0];
1327
- var F = r(this.props, N, this._instanceProps), $ = o(this.props, F, N, this._instanceProps), q = !L || M === "backward" ? Math.max(1, D) : 1, j = !L || M === "forward" ? Math.max(1, D) : 1;
1328
- return [Math.max(0, F - q), Math.max(0, Math.min(b - 1, $ + j)), F, $];
1329
- }, S._getVerticalRangeToRender = function() {
1330
- var d = this.props, b = d.columnCount, w = d.overscanCount, P = d.overscanRowCount, A = d.overscanRowsCount, x = d.rowCount, I = this.state, M = I.isScrolling, L = I.verticalScrollDirection, N = I.scrollTop, D = P || A || w || 1;
1331
- if (b === 0 || x === 0)
1328
+ var F = r(this.props, M, this._instanceProps), G = o(this.props, F, M, this._instanceProps), U = !L || x === "backward" ? Math.max(1, D) : 1, q = !L || x === "forward" ? Math.max(1, D) : 1;
1329
+ return [Math.max(0, F - U), Math.max(0, Math.min(T - 1, G + q)), F, G];
1330
+ }, C._getVerticalRangeToRender = function() {
1331
+ var d = this.props, T = d.columnCount, _ = d.overscanCount, S = d.overscanRowCount, A = d.overscanRowsCount, I = d.rowCount, N = this.state, x = N.isScrolling, L = N.verticalScrollDirection, M = N.scrollTop, D = S || A || _ || 1;
1332
+ if (T === 0 || I === 0)
1332
1333
  return [0, 0, 0, 0];
1333
- var F = u(this.props, N, this._instanceProps), $ = g(this.props, F, N, this._instanceProps), q = !M || L === "backward" ? Math.max(1, D) : 1, j = !M || L === "forward" ? Math.max(1, D) : 1;
1334
- return [Math.max(0, F - q), Math.max(0, Math.min(x - 1, $ + j)), F, $];
1335
- }, T;
1336
- }(Zn), t.defaultProps = {
1334
+ var F = u(this.props, M, this._instanceProps), G = g(this.props, F, M, this._instanceProps), U = !x || L === "backward" ? Math.max(1, D) : 1, q = !x || L === "forward" ? Math.max(1, D) : 1;
1335
+ return [Math.max(0, F - U), Math.max(0, Math.min(I - 1, G + q)), F, G];
1336
+ }, P;
1337
+ }(jn), t.defaultProps = {
1337
1338
  direction: "ltr",
1338
1339
  itemData: void 0,
1339
1340
  useIsScrolling: !1
1340
1341
  }, t;
1341
1342
  }
1342
1343
  var bo = function(t, n) {
1343
- var r = t.children, o = t.direction, a = t.height, i = t.innerTagName, c = t.outerTagName, l = t.overscanColumnsCount, p = t.overscanCount, h = t.overscanRowsCount, m = t.width, u = n.instance;
1344
+ var r = t.children, o = t.direction, s = t.height, i = t.innerTagName, c = t.outerTagName, l = t.overscanColumnsCount, p = t.overscanCount, h = t.overscanRowsCount, m = t.width, u = n.instance;
1344
1345
  if (process.env.NODE_ENV !== "production") {
1345
1346
  if (typeof p == "number" && Fe && !Fe.has(u) && (Fe.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof h == "number") && ke && !ke.has(u) && (ke.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (i != null || c != null) && We && !We.has(u) && (We.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
1346
1347
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
@@ -1353,63 +1354,63 @@ var bo = function(t, n) {
1353
1354
  }
1354
1355
  if (typeof m != "number")
1355
1356
  throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (m === null ? "null" : typeof m) + '" was specified.'));
1356
- if (typeof a != "number")
1357
- throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1357
+ if (typeof s != "number")
1358
+ throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (s === null ? "null" : typeof s) + '" was specified.'));
1358
1359
  }
1359
- }, Ht = 50, _n = function(t, n) {
1360
- var r = t.rowCount, o = n.rowMetadataMap, a = n.estimatedRowHeight, i = n.lastMeasuredRowIndex, c = 0;
1360
+ }, Ht = 50, vn = function(t, n) {
1361
+ var r = t.rowCount, o = n.rowMetadataMap, s = n.estimatedRowHeight, i = n.lastMeasuredRowIndex, c = 0;
1361
1362
  if (i >= r && (i = r - 1), i >= 0) {
1362
1363
  var l = o[i];
1363
1364
  c = l.offset + l.size;
1364
1365
  }
1365
- var p = r - i - 1, h = p * a;
1366
+ var p = r - i - 1, h = p * s;
1366
1367
  return c + h;
1367
- }, wn = function(t, n) {
1368
- var r = t.columnCount, o = n.columnMetadataMap, a = n.estimatedColumnWidth, i = n.lastMeasuredColumnIndex, c = 0;
1368
+ }, _n = function(t, n) {
1369
+ var r = t.columnCount, o = n.columnMetadataMap, s = n.estimatedColumnWidth, i = n.lastMeasuredColumnIndex, c = 0;
1369
1370
  if (i >= r && (i = r - 1), i >= 0) {
1370
1371
  var l = o[i];
1371
1372
  c = l.offset + l.size;
1372
1373
  }
1373
- var p = r - i - 1, h = p * a;
1374
+ var p = r - i - 1, h = p * s;
1374
1375
  return c + h;
1375
- }, de = function(t, n, r, o) {
1376
- var a, i, c;
1377
- if (t === "column" ? (a = o.columnMetadataMap, i = n.columnWidth, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, i = n.rowHeight, c = o.lastMeasuredRowIndex), r > c) {
1376
+ }, me = function(t, n, r, o) {
1377
+ var s, i, c;
1378
+ if (t === "column" ? (s = o.columnMetadataMap, i = n.columnWidth, c = o.lastMeasuredColumnIndex) : (s = o.rowMetadataMap, i = n.rowHeight, c = o.lastMeasuredRowIndex), r > c) {
1378
1379
  var l = 0;
1379
1380
  if (c >= 0) {
1380
- var p = a[c];
1381
+ var p = s[c];
1381
1382
  l = p.offset + p.size;
1382
1383
  }
1383
1384
  for (var h = c + 1; h <= r; h++) {
1384
1385
  var m = i(h);
1385
- a[h] = {
1386
+ s[h] = {
1386
1387
  offset: l,
1387
1388
  size: m
1388
1389
  }, l += m;
1389
1390
  }
1390
1391
  t === "column" ? o.lastMeasuredColumnIndex = r : o.lastMeasuredRowIndex = r;
1391
1392
  }
1392
- return a[r];
1393
+ return s[r];
1393
1394
  }, $t = function(t, n, r, o) {
1394
- var a, i;
1395
- t === "column" ? (a = r.columnMetadataMap, i = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, i = r.lastMeasuredRowIndex);
1396
- var c = i > 0 ? a[i].offset : 0;
1397
- return c >= o ? bn(t, n, r, i, 0, o) : Co(t, n, r, Math.max(0, i), o);
1398
- }, bn = function(t, n, r, o, a, i) {
1399
- for (; a <= o; ) {
1400
- var c = a + Math.floor((o - a) / 2), l = de(t, n, c, r).offset;
1395
+ var s, i;
1396
+ t === "column" ? (s = r.columnMetadataMap, i = r.lastMeasuredColumnIndex) : (s = r.rowMetadataMap, i = r.lastMeasuredRowIndex);
1397
+ var c = i > 0 ? s[i].offset : 0;
1398
+ return c >= o ? wn(t, n, r, i, 0, o) : Co(t, n, r, Math.max(0, i), o);
1399
+ }, wn = function(t, n, r, o, s, i) {
1400
+ for (; s <= o; ) {
1401
+ var c = s + Math.floor((o - s) / 2), l = me(t, n, c, r).offset;
1401
1402
  if (l === i)
1402
1403
  return c;
1403
- l < i ? a = c + 1 : l > i && (o = c - 1);
1404
+ l < i ? s = c + 1 : l > i && (o = c - 1);
1404
1405
  }
1405
- return a > 0 ? a - 1 : 0;
1406
- }, Co = function(t, n, r, o, a) {
1407
- for (var i = t === "column" ? n.columnCount : n.rowCount, c = 1; o < i && de(t, n, o, r).offset < a; )
1406
+ return s > 0 ? s - 1 : 0;
1407
+ }, Co = function(t, n, r, o, s) {
1408
+ for (var i = t === "column" ? n.columnCount : n.rowCount, c = 1; o < i && me(t, n, o, r).offset < s; )
1408
1409
  o += c, c *= 2;
1409
- return bn(t, n, r, Math.min(o, i - 1), Math.floor(o / 2), a);
1410
- }, Gt = function(t, n, r, o, a, i, c) {
1411
- var l = t === "column" ? n.width : n.height, p = de(t, n, r, i), h = t === "column" ? wn(n, i) : _n(n, i), m = Math.max(0, Math.min(h - l, p.offset)), u = Math.max(0, p.offset - l + c + p.size);
1412
- switch (o === "smart" && (a >= u - l && a <= m + l ? o = "auto" : o = "center"), o) {
1410
+ return wn(t, n, r, Math.min(o, i - 1), Math.floor(o / 2), s);
1411
+ }, Gt = function(t, n, r, o, s, i, c) {
1412
+ var l = t === "column" ? n.width : n.height, p = me(t, n, r, i), h = t === "column" ? _n(n, i) : vn(n, i), m = Math.max(0, Math.min(h - l, p.offset)), u = Math.max(0, p.offset - l + c + p.size);
1413
+ switch (o === "smart" && (s >= u - l && s <= m + l ? o = "auto" : o = "center"), o) {
1413
1414
  case "start":
1414
1415
  return m;
1415
1416
  case "end":
@@ -1418,33 +1419,33 @@ var bo = function(t, n) {
1418
1419
  return Math.round(u + (m - u) / 2);
1419
1420
  case "auto":
1420
1421
  default:
1421
- return a >= u && a <= m ? a : u > m || a < u ? u : m;
1422
+ return s >= u && s <= m ? s : u > m || s < u ? u : m;
1422
1423
  }
1423
1424
  }, To = /* @__PURE__ */ wo({
1424
1425
  getColumnOffset: function(t, n, r) {
1425
- return de("column", t, n, r).offset;
1426
+ return me("column", t, n, r).offset;
1426
1427
  },
1427
1428
  getColumnStartIndexForOffset: function(t, n, r) {
1428
1429
  return $t("column", t, r, n);
1429
1430
  },
1430
1431
  getColumnStopIndexForStartIndex: function(t, n, r, o) {
1431
- for (var a = t.columnCount, i = t.width, c = de("column", t, n, o), l = r + i, p = c.offset + c.size, h = n; h < a - 1 && p < l; )
1432
- h++, p += de("column", t, h, o).size;
1432
+ for (var s = t.columnCount, i = t.width, c = me("column", t, n, o), l = r + i, p = c.offset + c.size, h = n; h < s - 1 && p < l; )
1433
+ h++, p += me("column", t, h, o).size;
1433
1434
  return h;
1434
1435
  },
1435
1436
  getColumnWidth: function(t, n, r) {
1436
1437
  return r.columnMetadataMap[n].size;
1437
1438
  },
1438
- getEstimatedTotalHeight: _n,
1439
- getEstimatedTotalWidth: wn,
1440
- getOffsetForColumnAndAlignment: function(t, n, r, o, a, i) {
1441
- return Gt("column", t, n, r, o, a, i);
1439
+ getEstimatedTotalHeight: vn,
1440
+ getEstimatedTotalWidth: _n,
1441
+ getOffsetForColumnAndAlignment: function(t, n, r, o, s, i) {
1442
+ return Gt("column", t, n, r, o, s, i);
1442
1443
  },
1443
- getOffsetForRowAndAlignment: function(t, n, r, o, a, i) {
1444
- return Gt("row", t, n, r, o, a, i);
1444
+ getOffsetForRowAndAlignment: function(t, n, r, o, s, i) {
1445
+ return Gt("row", t, n, r, o, s, i);
1445
1446
  },
1446
1447
  getRowOffset: function(t, n, r) {
1447
- return de("row", t, n, r).offset;
1448
+ return me("row", t, n, r).offset;
1448
1449
  },
1449
1450
  getRowHeight: function(t, n, r) {
1450
1451
  return r.rowMetadataMap[n].size;
@@ -1453,15 +1454,15 @@ var bo = function(t, n) {
1453
1454
  return $t("row", t, r, n);
1454
1455
  },
1455
1456
  getRowStopIndexForStartIndex: function(t, n, r, o) {
1456
- for (var a = t.rowCount, i = t.height, c = de("row", t, n, o), l = r + i, p = c.offset + c.size, h = n; h < a - 1 && p < l; )
1457
- h++, p += de("row", t, h, o).size;
1457
+ for (var s = t.rowCount, i = t.height, c = me("row", t, n, o), l = r + i, p = c.offset + c.size, h = n; h < s - 1 && p < l; )
1458
+ h++, p += me("row", t, h, o).size;
1458
1459
  return h;
1459
1460
  },
1460
1461
  initInstanceProps: function(t, n) {
1461
- var r = t, o = r.estimatedColumnWidth, a = r.estimatedRowHeight, i = {
1462
+ var r = t, o = r.estimatedColumnWidth, s = r.estimatedRowHeight, i = {
1462
1463
  columnMetadataMap: {},
1463
1464
  estimatedColumnWidth: o || Ht,
1464
- estimatedRowHeight: a || Ht,
1465
+ estimatedRowHeight: s || Ht,
1465
1466
  lastMeasuredColumnIndex: -1,
1466
1467
  lastMeasuredRowIndex: -1,
1467
1468
  rowMetadataMap: {}
@@ -1502,78 +1503,78 @@ function Vt(e, t) {
1502
1503
  return !0;
1503
1504
  return !1;
1504
1505
  }
1505
- var So = ["style"], Po = ["style"];
1506
+ var Po = ["style"], So = ["style"];
1506
1507
  function Io(e, t) {
1507
- var n = e.style, r = zt(e, So), o = t.style, a = zt(t, Po);
1508
- return !Vt(n, o) && !Vt(r, a);
1508
+ var n = e.style, r = zt(e, Po), o = t.style, s = zt(t, So);
1509
+ return !Vt(n, o) && !Vt(r, s);
1509
1510
  }
1510
1511
  const yo = () => {
1511
- const { viewMode: e } = Ke(), { scrollMode: t } = ye(), { setColumnCount: n } = Jt(), { virtualScrollableElementRef: r } = Xe(), o = en(), a = R(
1512
+ const { viewMode: e } = Ke(), { scrollMode: t } = Le(), { setColumnCount: n } = Jt(), { virtualScrollableElementRef: r } = Xe(), o = en(), s = R(
1512
1513
  (g) => o.widths[g] || 0,
1513
1514
  [o.widths]
1514
1515
  ), i = R(
1515
1516
  (g) => o.heights[g] || 0,
1516
1517
  [o.heights]
1517
- ), c = z(() => o.heights.length, [o.heights]), l = z(() => Math.max(...o.widths), [o.widths]), p = z(() => t === B.HORIZONTAL_SCROLLING ? c : e === $e.DUAL_PAGE ? 2 : 1, [e, t, t, c, r, l]);
1518
+ ), c = z(() => o.heights.length, [o.heights]), l = z(() => Math.max(...o.widths), [o.widths]), p = z(() => t === X.HORIZONTAL_SCROLLING ? c : e === $e.DUAL_PAGE ? 2 : 1, [e, t, t, c, r, l]);
1518
1519
  E(() => {
1519
1520
  n(p);
1520
1521
  }, [p, n]);
1521
- const h = z(() => t === B.HORIZONTAL_SCROLLING || t === B.PAGE_SCROLLING ? 1 : Math.round(c / p), [p, c, t]), m = z(() => o.heights.reduce((g, f) => g + f, 0) / o.heights.length || 0, [o]), u = z(() => o.widths.reduce((g, f) => g + f, 0) / o.heights.length || 0, [o]);
1522
+ const h = z(() => t === X.HORIZONTAL_SCROLLING || t === X.PAGE_SCROLLING ? 1 : Math.round(c / p), [p, c, t]), m = z(() => o.heights.reduce((g, f) => g + f, 0) / o.heights.length || 0, [o]), u = z(() => o.widths.reduce((g, f) => g + f, 0) / o.heights.length || 0, [o]);
1522
1523
  return {
1523
1524
  rowCount: h,
1524
1525
  rowHeight: i,
1525
1526
  columnCount: p,
1526
- columnWidth: a,
1527
+ columnWidth: s,
1527
1528
  pageDimension: o,
1528
1529
  estimatedRowHeight: m,
1529
1530
  estimatedColumnWidth: u
1530
1531
  };
1531
1532
  };
1532
- let oe;
1533
- typeof window < "u" ? oe = window : typeof self < "u" ? oe = self : oe = global;
1533
+ let re;
1534
+ typeof window < "u" ? re = window : typeof self < "u" ? re = self : re = global;
1534
1535
  let ft = null, gt = null;
1535
- const Ut = 20, ot = oe.clearTimeout, qt = oe.setTimeout, at = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, jt = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
1536
- at == null || jt == null ? (ft = ot, gt = function(t) {
1536
+ const Ut = 20, ot = re.clearTimeout, qt = re.setTimeout, st = re.cancelAnimationFrame || re.mozCancelAnimationFrame || re.webkitCancelAnimationFrame, jt = re.requestAnimationFrame || re.mozRequestAnimationFrame || re.webkitRequestAnimationFrame;
1537
+ st == null || jt == null ? (ft = ot, gt = function(t) {
1537
1538
  return qt(t, Ut);
1538
1539
  }) : (ft = function([t, n]) {
1539
- at(t), ot(n);
1540
+ st(t), ot(n);
1540
1541
  }, gt = function(t) {
1541
1542
  const n = jt(function() {
1542
1543
  ot(r), t();
1543
1544
  }), r = qt(function() {
1544
- at(n), t();
1545
+ st(n), t();
1545
1546
  }, Ut);
1546
1547
  return [n, r];
1547
1548
  });
1548
1549
  function xo(e) {
1549
- let t, n, r, o, a, i, c;
1550
+ let t, n, r, o, s, i, c;
1550
1551
  const l = typeof document < "u" && document.attachEvent;
1551
1552
  if (!l) {
1552
- i = function(C) {
1553
- const T = C.__resizeTriggers__, S = T.firstElementChild, y = T.lastElementChild, d = S.firstElementChild;
1554
- y.scrollLeft = y.scrollWidth, y.scrollTop = y.scrollHeight, d.style.width = S.offsetWidth + 1 + "px", d.style.height = S.offsetHeight + 1 + "px", S.scrollLeft = S.scrollWidth, S.scrollTop = S.scrollHeight;
1555
- }, a = function(C) {
1556
- return C.offsetWidth !== C.__resizeLast__.width || C.offsetHeight !== C.__resizeLast__.height;
1557
- }, c = function(C) {
1558
- if (C.target.className && typeof C.target.className.indexOf == "function" && C.target.className.indexOf("contract-trigger") < 0 && C.target.className.indexOf("expand-trigger") < 0)
1553
+ i = function(b) {
1554
+ const P = b.__resizeTriggers__, C = P.firstElementChild, y = P.lastElementChild, d = C.firstElementChild;
1555
+ y.scrollLeft = y.scrollWidth, y.scrollTop = y.scrollHeight, d.style.width = C.offsetWidth + 1 + "px", d.style.height = C.offsetHeight + 1 + "px", C.scrollLeft = C.scrollWidth, C.scrollTop = C.scrollHeight;
1556
+ }, s = function(b) {
1557
+ return b.offsetWidth !== b.__resizeLast__.width || b.offsetHeight !== b.__resizeLast__.height;
1558
+ }, c = function(b) {
1559
+ if (b.target.className && typeof b.target.className.indexOf == "function" && b.target.className.indexOf("contract-trigger") < 0 && b.target.className.indexOf("expand-trigger") < 0)
1559
1560
  return;
1560
- const T = this;
1561
+ const P = this;
1561
1562
  i(this), this.__resizeRAF__ && ft(this.__resizeRAF__), this.__resizeRAF__ = gt(function() {
1562
- a(T) && (T.__resizeLast__.width = T.offsetWidth, T.__resizeLast__.height = T.offsetHeight, T.__resizeListeners__.forEach(function(d) {
1563
- d.call(T, C);
1563
+ s(P) && (P.__resizeLast__.width = P.offsetWidth, P.__resizeLast__.height = P.offsetHeight, P.__resizeListeners__.forEach(function(d) {
1564
+ d.call(P, b);
1564
1565
  }));
1565
1566
  });
1566
1567
  };
1567
1568
  let u = !1, g = "";
1568
1569
  r = "animationstart";
1569
1570
  const f = "Webkit Moz O ms".split(" ");
1570
- let _ = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
1571
+ let w = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
1571
1572
  {
1572
- const C = document.createElement("fakeelement");
1573
- if (C.style.animationName !== void 0 && (u = !0), u === !1) {
1574
- for (let T = 0; T < f.length; T++)
1575
- if (C.style[f[T] + "AnimationName"] !== void 0) {
1576
- v = f[T], g = "-" + v.toLowerCase() + "-", r = _[T], u = !0;
1573
+ const b = document.createElement("fakeelement");
1574
+ if (b.style.animationName !== void 0 && (u = !0), u === !1) {
1575
+ for (let P = 0; P < f.length; P++)
1576
+ if (b.style[f[P] + "AnimationName"] !== void 0) {
1577
+ v = f[P], g = "-" + v.toLowerCase() + "-", r = w[P], u = !0;
1577
1578
  break;
1578
1579
  }
1579
1580
  }
@@ -1582,8 +1583,8 @@ function xo(e) {
1582
1583
  }
1583
1584
  const p = function(u) {
1584
1585
  if (!u.getElementById("detectElementResize")) {
1585
- const g = (t || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', f = u.head || u.getElementsByTagName("head")[0], _ = u.createElement("style");
1586
- _.id = "detectElementResize", _.type = "text/css", e != null && _.setAttribute("nonce", e), _.styleSheet ? _.styleSheet.cssText = g : _.appendChild(u.createTextNode(g)), f.appendChild(_);
1586
+ const g = (t || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', f = u.head || u.getElementsByTagName("head")[0], w = u.createElement("style");
1587
+ w.id = "detectElementResize", w.type = "text/css", e != null && w.setAttribute("nonce", e), w.styleSheet ? w.styleSheet.cssText = g : w.appendChild(u.createTextNode(g)), f.appendChild(w);
1587
1588
  }
1588
1589
  };
1589
1590
  return {
@@ -1592,13 +1593,13 @@ function xo(e) {
1592
1593
  u.attachEvent("onresize", g);
1593
1594
  else {
1594
1595
  if (!u.__resizeTriggers__) {
1595
- const f = u.ownerDocument, _ = oe.getComputedStyle(u);
1596
- _ && _.position === "static" && (u.style.position = "relative"), p(f), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = f.createElement("div")).className = "resize-triggers";
1596
+ const f = u.ownerDocument, w = re.getComputedStyle(u);
1597
+ w && w.position === "static" && (u.style.position = "relative"), p(f), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = f.createElement("div")).className = "resize-triggers";
1597
1598
  const v = f.createElement("div");
1598
1599
  v.className = "expand-trigger", v.appendChild(f.createElement("div"));
1599
- const C = f.createElement("div");
1600
- C.className = "contract-trigger", u.__resizeTriggers__.appendChild(v), u.__resizeTriggers__.appendChild(C), u.appendChild(u.__resizeTriggers__), i(u), u.addEventListener("scroll", c, !0), r && (u.__resizeTriggers__.__animationListener__ = function(S) {
1601
- S.animationName === n && i(u);
1600
+ const b = f.createElement("div");
1601
+ b.className = "contract-trigger", u.__resizeTriggers__.appendChild(v), u.__resizeTriggers__.appendChild(b), u.appendChild(u.__resizeTriggers__), i(u), u.addEventListener("scroll", c, !0), r && (u.__resizeTriggers__.__animationListener__ = function(C) {
1602
+ C.animationName === n && i(u);
1602
1603
  }, u.__resizeTriggers__.addEventListener(r, u.__resizeTriggers__.__animationListener__));
1603
1604
  }
1604
1605
  u.__resizeListeners__.push(g);
@@ -1617,7 +1618,7 @@ function xo(e) {
1617
1618
  }
1618
1619
  };
1619
1620
  }
1620
- class Ro extends Bn {
1621
+ class Ro extends Zn {
1621
1622
  constructor(...t) {
1622
1623
  super(...t), this.state = {
1623
1624
  height: this.props.defaultHeight || 0,
@@ -1632,7 +1633,7 @@ class Ro extends Bn {
1632
1633
  onResize: o
1633
1634
  } = this.props;
1634
1635
  if (this._parentNode) {
1635
- const a = window.getComputedStyle(this._parentNode) || {}, i = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), l = parseFloat(a.paddingTop || "0"), p = parseFloat(a.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), m = h.height - l - p, u = h.width - i - c, g = this._parentNode.offsetHeight - l - p, f = this._parentNode.offsetWidth - i - c;
1636
+ const s = window.getComputedStyle(this._parentNode) || {}, i = parseFloat(s.paddingLeft || "0"), c = parseFloat(s.paddingRight || "0"), l = parseFloat(s.paddingTop || "0"), p = parseFloat(s.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), m = h.height - l - p, u = h.width - i - c, g = this._parentNode.offsetHeight - l - p, f = this._parentNode.offsetWidth - i - c;
1636
1637
  (!n && (this.state.height !== g || this.state.scaledHeight !== m) || !r && (this.state.width !== f || this.state.scaledWidth !== u)) && (this.setState({
1637
1638
  height: g,
1638
1639
  width: f,
@@ -1670,7 +1671,7 @@ class Ro extends Bn {
1670
1671
  defaultHeight: n,
1671
1672
  defaultWidth: r,
1672
1673
  disableHeight: o = !1,
1673
- disableWidth: a = !1,
1674
+ disableWidth: s = !1,
1674
1675
  doNotBailOutOnEmptyChildren: i = !1,
1675
1676
  nonce: c,
1676
1677
  onResize: l,
@@ -1681,23 +1682,23 @@ class Ro extends Bn {
1681
1682
  height: u,
1682
1683
  scaledHeight: g,
1683
1684
  scaledWidth: f,
1684
- width: _
1685
+ width: w
1685
1686
  } = this.state, v = {
1686
1687
  overflow: "visible"
1687
- }, C = {};
1688
- let T = !1;
1689
- return o || (u === 0 && (T = !0), v.height = 0, C.height = u, C.scaledHeight = g), a || (_ === 0 && (T = !0), v.width = 0, C.width = _, C.scaledWidth = f), i && (T = !1), ze(h, {
1688
+ }, b = {};
1689
+ let P = !1;
1690
+ return o || (u === 0 && (P = !0), v.height = 0, b.height = u, b.scaledHeight = g), s || (w === 0 && (P = !0), v.width = 0, b.width = w, b.scaledWidth = f), i && (P = !1), ze(h, {
1690
1691
  ref: this._setRef,
1691
1692
  style: {
1692
1693
  ...v,
1693
1694
  ...p
1694
1695
  },
1695
1696
  ...m
1696
- }, !T && t(C));
1697
+ }, !P && t(b));
1697
1698
  }
1698
1699
  }
1699
1700
  const Lo = ({ widths: e, heights: t }) => {
1700
- const { focusedPage: n, totalPages: r } = ae(), { isScrolling: o } = Je(), a = z(() => {
1701
+ const { focusedPage: n, totalPages: r } = oe(), { isScrolling: o } = Je(), s = z(() => {
1701
1702
  const l = [], p = Math.ceil(n / 2) * 2 - 1;
1702
1703
  if (l.push(p), p + 1 < r) {
1703
1704
  const h = p + 1;
@@ -1718,15 +1719,15 @@ const Lo = ({ widths: e, heights: t }) => {
1718
1719
  width: e(n),
1719
1720
  height: t(n)
1720
1721
  }
1721
- ], [e, t, a]);
1722
+ ], [e, t, s]);
1722
1723
  E(() => {
1723
1724
  o.current = !1;
1724
1725
  }, [n]);
1725
1726
  const c = z(() => i.reduce((l, p) => l + Number(p.width || 0), 0), [i]);
1726
- return /* @__PURE__ */ s("div", { style: { width: c, position: "relative" }, children: a.map((l, p) => /* @__PURE__ */ s(Tt, { onIntersectRatioChange: () => {
1727
+ return /* @__PURE__ */ a("div", { style: { width: c, position: "relative" }, children: s.map((l, p) => /* @__PURE__ */ a(Tt, { onIntersectRatioChange: () => {
1727
1728
  }, style: i[p], pageNumber: l }, l)) });
1728
1729
  }, No = ({ widths: e, heights: t }) => {
1729
- const { focusedPage: n } = ae(), { isScrolling: r } = Je(), o = z(() => ({
1730
+ const { focusedPage: n } = oe(), { isScrolling: r } = Je(), o = z(() => ({
1730
1731
  position: "absolute",
1731
1732
  width: e(n - 1),
1732
1733
  height: t(n - 1)
@@ -1734,15 +1735,15 @@ const Lo = ({ widths: e, heights: t }) => {
1734
1735
  E(() => {
1735
1736
  r.current = !1;
1736
1737
  }, [n]);
1737
- const a = z(() => e(n - 1), [e]);
1738
- return /* @__PURE__ */ s(
1738
+ const s = z(() => e(n - 1), [e]);
1739
+ return /* @__PURE__ */ a(
1739
1740
  "div",
1740
1741
  {
1741
1742
  style: {
1742
- width: a,
1743
+ width: s,
1743
1744
  position: "relative"
1744
1745
  },
1745
- children: /* @__PURE__ */ s(
1746
+ children: /* @__PURE__ */ a(
1746
1747
  Tt,
1747
1748
  {
1748
1749
  style: o,
@@ -1754,9 +1755,9 @@ const Lo = ({ widths: e, heights: t }) => {
1754
1755
  )
1755
1756
  }
1756
1757
  );
1757
- }, Mo = Kn(({ columnIndex: e, rowIndex: t, data: n, style: r }) => {
1758
+ }, Mo = Bn(({ columnIndex: e, rowIndex: t, data: n, style: r }) => {
1758
1759
  const o = e + 1 + t * n.columnCount;
1759
- return /* @__PURE__ */ s(
1760
+ return /* @__PURE__ */ a(
1760
1761
  Tt,
1761
1762
  {
1762
1763
  style: r,
@@ -1766,141 +1767,143 @@ const Lo = ({ widths: e, heights: t }) => {
1766
1767
  o
1767
1768
  );
1768
1769
  }, Io), ti = () => {
1769
- const { initialPage: e = 1, initialScrollMode: t } = Qn(), { getContainer: n, container: r } = tn(), { scrollToPage: o } = cn(), {
1770
- virtualScrollRef: a,
1770
+ const { initialPage: e = 1, initialScrollMode: t } = Yn(), { pagesRef: n, setPagesRef: r } = be();
1771
+ vr(n);
1772
+ const { scrollToPage: o } = an(), {
1773
+ virtualScrollRef: s,
1771
1774
  getVirtualScrollRef: i,
1772
1775
  getPageScrollElementRef: c,
1773
1776
  getVirtualScrollableElementRef: l,
1774
1777
  setTotalInnerDimensions: p,
1775
1778
  totalInnerDimensions: h,
1776
1779
  pageScrollElementRef: m
1777
- } = Xe(), { nextPage: u, prevPage: g, setFocusedPage: f, focusedPage: _ } = ae(), { scrollMode: v } = ye(), { viewMode: C } = Ke(), T = W(null), { loading: S } = J(), y = W(
1780
+ } = Xe(), { nextPage: u, prevPage: g, setFocusedPage: f, focusedPage: w } = oe(), { scrollMode: v } = Le(), { viewMode: b } = Ke(), P = W(null), { loading: C } = Y(), y = W(
1778
1781
  h
1779
1782
  ), d = W({
1780
- viewMode: C,
1783
+ viewMode: b,
1781
1784
  scrollMode: v
1782
- }), b = W(!1), w = W(), { isFullScreen: P } = er(), {
1785
+ }), T = W(!1), _ = W(), { isFullScreen: S } = Qn(), {
1783
1786
  pageDimension: A,
1784
- rowCount: x,
1785
- rowHeight: I,
1786
- columnCount: M,
1787
+ rowCount: I,
1788
+ rowHeight: N,
1789
+ columnCount: x,
1787
1790
  columnWidth: L,
1788
- estimatedColumnWidth: N,
1791
+ estimatedColumnWidth: M,
1789
1792
  estimatedRowHeight: D
1790
- } = yo(), [F, $] = H({}), q = nn(F, 100), { isScrolling: j } = Je(), V = W(), Z = W({
1793
+ } = yo(), [F, G] = H({}), U = tn(F, 100), { isScrolling: q } = Je(), j = W(), Z = W({
1791
1794
  scrollTop: 0,
1792
1795
  scrollLeft: 0
1793
1796
  });
1794
- br(r);
1795
- const { isPressed: Q } = _r(), { selectionMode: le } = Yn(), { initializeGrabScroll: K, resetGrabState: ee } = wr({
1796
- isPressed: Q
1797
- }), te = z(() => le === Xn.HAND, [le]), me = R((k, G) => {
1798
- $((X) => G > -1 ? { ...X, [k]: Math.round(G * 100) } : (delete X[k], X));
1799
- }, []), De = z(() => ({
1800
- columnCount: M,
1801
- handleIntersectRatioChange: me
1802
- }), [M, me]), fe = R(
1797
+ br(n);
1798
+ const { isPressed: B } = _r(), { selectionMode: le } = Jn(), { initializeGrabScroll: ue, resetGrabState: ee } = wr({
1799
+ isPressed: B
1800
+ }), K = z(() => le === Kn.HAND, [le]), ae = R((k, $) => {
1801
+ G((J) => $ > -1 ? { ...J, [k]: Math.round($ * 100) } : (delete J[k], J));
1802
+ }, []), Te = z(() => ({
1803
+ columnCount: x,
1804
+ handleIntersectRatioChange: ae
1805
+ }), [x, ae]), ve = R(
1803
1806
  (k) => {
1804
- const G = document.activeElement !== r;
1805
- !P && G || (["ArrowUp", "ArrowLeft"].includes(k.key) ? (k.preventDefault(), g()) : ["ArrowDown", "ArrowRight"].includes(k.key) && (k.preventDefault(), u()));
1807
+ const $ = document.activeElement !== n;
1808
+ !S && $ || (["ArrowUp", "ArrowLeft"].includes(k.key) ? (k.preventDefault(), g()) : ["ArrowDown", "ArrowRight"].includes(k.key) && (k.preventDefault(), u()));
1806
1809
  },
1807
- [u, g, P, v]
1808
- ), Ae = R((k) => {
1810
+ [u, g, S, v]
1811
+ ), Pe = R((k) => {
1809
1812
  Z.current = {
1810
1813
  scrollTop: k.scrollTop,
1811
1814
  scrollLeft: k.scrollLeft
1812
1815
  };
1813
1816
  }, []);
1814
- E(() => (window.addEventListener("keydown", fe), () => {
1815
- window.removeEventListener("keydown", fe);
1816
- }), [fe]), E(() => {
1817
- if (T.current && (T.current.style.position = "relative"), !!a) {
1817
+ E(() => (window.addEventListener("keydown", ve), () => {
1818
+ window.removeEventListener("keydown", ve);
1819
+ }), [ve]), E(() => {
1820
+ if (P.current && (P.current.style.position = "relative"), !!s) {
1818
1821
  y.current = {
1819
1822
  height: h.height,
1820
1823
  width: h.width
1821
1824
  }, p({
1822
- height: Array.from({ length: x }).reduce(
1823
- (k, G, X) => k + I(X),
1825
+ height: Array.from({ length: I }).reduce(
1826
+ (k, $, J) => k + N(J),
1824
1827
  0
1825
1828
  ),
1826
- width: Array.from({ length: M }).reduce(
1827
- (k, G, X) => k + L(X),
1829
+ width: Array.from({ length: x }).reduce(
1830
+ (k, $, J) => k + L(J),
1828
1831
  0
1829
1832
  )
1830
1833
  });
1831
- for (let k = 0; k < x; k++)
1832
- for (let G = 0; G < M; G++)
1833
- a.resetAfterIndices({
1834
- columnIndex: G,
1834
+ for (let k = 0; k < I; k++)
1835
+ for (let $ = 0; $ < x; $++)
1836
+ s.resetAfterIndices({
1837
+ columnIndex: $,
1835
1838
  rowIndex: k,
1836
1839
  shouldForceUpdate: !0
1837
1840
  });
1838
1841
  }
1839
- }, [x, M, A, a, o]), E(() => {
1840
- if (j.current)
1842
+ }, [I, x, A, s, o]), E(() => {
1843
+ if (q.current)
1841
1844
  return;
1842
- if (d.current.viewMode !== C || d.current.scrollMode !== v) {
1843
- V.current && clearTimeout(V.current), $({}), b.current = !0, o(_), v === B.HORIZONTAL_SCROLLING && (a == null || a.scrollTo({
1845
+ if (d.current.viewMode !== b || d.current.scrollMode !== v) {
1846
+ j.current && clearTimeout(j.current), G({}), T.current = !0, o(w), v === X.HORIZONTAL_SCROLLING && (s == null || s.scrollTo({
1844
1847
  scrollTop: 0
1845
- })), V.current = setTimeout(() => {
1848
+ })), j.current = setTimeout(() => {
1846
1849
  requestAnimationFrame(() => {
1847
- d.current = { viewMode: C, scrollMode: v };
1850
+ d.current = { viewMode: b, scrollMode: v };
1848
1851
  });
1849
1852
  }, 100);
1850
1853
  return;
1851
1854
  }
1852
- const G = Z.current.scrollTop, X = Z.current.scrollLeft;
1855
+ const $ = Z.current.scrollTop, J = Z.current.scrollLeft;
1853
1856
  if (h.height && h.width) {
1854
- b.current = !0;
1855
- const { height: Ce, width: xt } = h, { height: $n, width: Gn } = y.current, Vn = G / $n * Ce, Un = X / Gn * xt, qn = Math.min(Vn, Ce) || 0, jn = Math.min(Un, xt) || 0;
1856
- a == null || a.scrollTo({
1857
- scrollTop: qn,
1858
- scrollLeft: jn
1859
- }), w.current && clearTimeout(w.current), w.current = setTimeout(() => {
1860
- b.current = !1;
1857
+ T.current = !0;
1858
+ const { height: Se, width: xt } = h, { height: Hn, width: $n } = y.current, Gn = $ / Hn * Se, Vn = J / $n * xt, Un = Math.min(Gn, Se) || 0, qn = Math.min(Vn, xt) || 0;
1859
+ s == null || s.scrollTo({
1860
+ scrollTop: Un,
1861
+ scrollLeft: qn
1862
+ }), _.current && clearTimeout(_.current), _.current = setTimeout(() => {
1863
+ T.current = !1;
1861
1864
  }, 100);
1862
1865
  }
1863
- }, [h, C, v]), E(() => {
1864
- if ((j.current || b.current) && (j.current = !1), j.current)
1866
+ }, [h, b, v]), E(() => {
1867
+ if ((q.current || T.current) && (q.current = !1), q.current)
1865
1868
  return;
1866
- const k = Object.entries(q);
1867
- let G = 0, X = -1;
1868
- k.forEach((Ce) => {
1869
- X < Ce[1] && (G = Number(Ce[0]), X = Ce[1]);
1870
- }), G && f(G);
1871
- }, [q, f]), E(() => () => {
1872
- V.current && clearTimeout(V.current), w.current && clearTimeout(w.current);
1869
+ const k = Object.entries(U);
1870
+ let $ = 0, J = -1;
1871
+ k.forEach((Se) => {
1872
+ J < Se[1] && ($ = Number(Se[0]), J = Se[1]);
1873
+ }), $ && f($);
1874
+ }, [U, f]), E(() => () => {
1875
+ j.current && clearTimeout(j.current), _.current && clearTimeout(_.current);
1873
1876
  }, []);
1874
- const ge = z(() => ne(ue["rp-pages-container"], {
1875
- [ue["rp-cursor-grab"]]: te && !Q,
1876
- [ue["rp-cursor-grabbing"]]: te && Q
1877
- }), [te, Q]), ve = R(
1877
+ const de = z(() => te(he["rp-pages-container"], {
1878
+ [he["rp-cursor-grab"]]: K && !B,
1879
+ [he["rp-cursor-grabbing"]]: K && B
1880
+ }), [K, B]), pe = R(
1878
1881
  (k) => {
1879
- if (te && k) {
1880
- const G = ne(ue["rp-pages"]), X = document.querySelector(`.${G}`);
1881
- K(X);
1882
+ if (K && k) {
1883
+ const $ = te(he["rp-pages"]), J = document.querySelector(`.${$}`);
1884
+ ue(J);
1882
1885
  }
1883
1886
  },
1884
- [te, K, ue]
1887
+ [K, ue, he]
1885
1888
  );
1886
1889
  return E(() => {
1887
- S && ee();
1888
- }, [S]), E(() => {
1889
- if (t === B.PAGE_SCROLLING) {
1890
- e !== _ && m && f(e);
1890
+ C && ee();
1891
+ }, [C]), E(() => {
1892
+ if (t === X.PAGE_SCROLLING) {
1893
+ e !== w && m && f(e);
1891
1894
  return;
1892
1895
  }
1893
- if (a != null && a.scrollToItem) {
1896
+ if (s != null && s.scrollToItem) {
1894
1897
  switch (t) {
1895
- case B.HORIZONTAL_SCROLLING:
1896
- a.scrollToItem({
1898
+ case X.HORIZONTAL_SCROLLING:
1899
+ s.scrollToItem({
1897
1900
  columnIndex: e - 1,
1898
1901
  rowIndex: 0,
1899
1902
  align: "start"
1900
1903
  });
1901
1904
  break;
1902
1905
  default:
1903
- a.scrollToItem({
1906
+ s.scrollToItem({
1904
1907
  columnIndex: 0,
1905
1908
  rowIndex: e - 1,
1906
1909
  align: "start"
@@ -1909,37 +1912,37 @@ const Lo = ({ widths: e, heights: t }) => {
1909
1912
  }
1910
1913
  f(e);
1911
1914
  }
1912
- }, [a, t, m, f]), /* @__PURE__ */ s("div", { ref: n, tabIndex: -1, className: ge, children: /* @__PURE__ */ s(Ro, { children: ({ width: k, height: G }) => /* @__PURE__ */ s("div", { "data-rp": "pages", ref: ve, style: { width: k, height: G }, children: v === B.PAGE_SCROLLING ? /* @__PURE__ */ s(
1915
+ }, [s, t, m, f]), /* @__PURE__ */ a("div", { ref: r, tabIndex: -1, className: de, children: /* @__PURE__ */ a(Ro, { children: ({ width: k, height: $ }) => /* @__PURE__ */ a("div", { "data-rp": "pages", ref: pe, style: { width: k, height: $ }, children: v === X.PAGE_SCROLLING ? /* @__PURE__ */ a(
1913
1916
  "div",
1914
1917
  {
1915
1918
  ref: c,
1916
- style: { width: k, height: G },
1917
- className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
1918
- children: C === $e.DUAL_PAGE ? /* @__PURE__ */ s(Lo, { widths: L, heights: I }) : /* @__PURE__ */ s(No, { widths: L, heights: I })
1919
+ style: { width: k, height: $ },
1920
+ className: te(he["rp-pages"], he["rp-page-scrolling-wrapper"]),
1921
+ children: b === $e.DUAL_PAGE ? /* @__PURE__ */ a(Lo, { widths: L, heights: N }) : /* @__PURE__ */ a(No, { widths: L, heights: N })
1919
1922
  }
1920
- ) : N ? /* @__PURE__ */ s(
1923
+ ) : M ? /* @__PURE__ */ a(
1921
1924
  To,
1922
1925
  {
1923
1926
  ref: i,
1924
- itemData: De,
1927
+ itemData: Te,
1925
1928
  outerRef: l,
1926
- innerRef: T,
1927
- onScroll: Ae,
1928
- columnCount: M,
1929
+ innerRef: P,
1930
+ onScroll: Pe,
1931
+ columnCount: x,
1929
1932
  columnWidth: L,
1930
- rowHeight: I,
1931
- height: G,
1933
+ rowHeight: N,
1934
+ height: $,
1932
1935
  width: k,
1933
- estimatedColumnWidth: N,
1936
+ estimatedColumnWidth: M,
1934
1937
  estimatedRowHeight: D,
1935
- rowCount: x,
1936
- className: ne(
1937
- ue["rp-pages"],
1938
- v === B.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
1938
+ rowCount: I,
1939
+ className: te(
1940
+ he["rp-pages"],
1941
+ v === X.HORIZONTAL_SCROLLING ? he["rp-pages-horizontal-scroll"] : ""
1939
1942
  ),
1940
1943
  children: Mo
1941
1944
  }
1942
- ) : S ? null : /* @__PURE__ */ s(
1945
+ ) : C ? null : /* @__PURE__ */ a(
1943
1946
  "div",
1944
1947
  {
1945
1948
  style: {
@@ -1949,37 +1952,37 @@ const Lo = ({ widths: e, heights: t }) => {
1949
1952
  height: "100%",
1950
1953
  width: "100%"
1951
1954
  },
1952
- children: /* @__PURE__ */ s(Ee, {})
1955
+ children: /* @__PURE__ */ a(De, {})
1953
1956
  }
1954
1957
  ) }) }) });
1955
- }, xe = {
1958
+ }, Ne = {
1956
1959
  "rp-toolbar-content": "_rp-toolbar-content_1js09_1",
1957
1960
  "rp-toolbar-wrapper": "_rp-toolbar-wrapper_1js09_10",
1958
1961
  "rp-toolbar-start": "_rp-toolbar-start_1js09_32",
1959
1962
  "rp-toolbar-middle": "_rp-toolbar-middle_1js09_38",
1960
1963
  "rp-toolbar-end": "_rp-toolbar-end_1js09_45"
1961
- }, st = {
1964
+ }, at = {
1962
1965
  "rp-paginate": "_rp-paginate_1vu6o_1",
1963
1966
  "rp-page-input": "_rp-page-input_1vu6o_6",
1964
1967
  "rp-total-page": "_rp-total-page_1vu6o_12"
1965
1968
  }, Eo = () => {
1966
1969
  const { prevIcon: e } = ce();
1967
- return e || /* @__PURE__ */ s(Ne, {});
1970
+ return e || /* @__PURE__ */ a(Oe, {});
1968
1971
  }, Oo = () => {
1969
1972
  const { nextIcon: e } = ce();
1970
- return e || /* @__PURE__ */ s(Ne, { style: { transform: "rotate(180deg" } });
1973
+ return e || /* @__PURE__ */ a(Oe, { style: { transform: "rotate(180deg" } });
1971
1974
  }, Do = () => {
1972
- const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: a } = ae(), [i, c] = H(e.toString()), { pageNavigationTool: l = !0 } = pe(), { isSmallScreen: p } = be();
1975
+ const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: s } = oe(), [i, c] = H(e.toString()), { pageNavigationTool: l = !0 } = fe(), { isSmallScreen: p } = Ce();
1973
1976
  E(() => {
1974
1977
  c(e.toString());
1975
1978
  }, [e]);
1976
1979
  const h = R((f) => {
1977
- const _ = f.target.value;
1978
- c(_);
1980
+ const w = f.target.value;
1981
+ c(w);
1979
1982
  }, []), m = R(() => {
1980
- const f = a(i);
1983
+ const f = s(i);
1981
1984
  f.success || c(f.currentPage.toString());
1982
- }, [a, i, t]), u = R(() => {
1985
+ }, [s, i, t]), u = R(() => {
1983
1986
  c(e.toString());
1984
1987
  }, [e]), g = R(
1985
1988
  (f) => {
@@ -1987,49 +1990,49 @@ const Lo = ({ widths: e, heights: t }) => {
1987
1990
  },
1988
1991
  [m]
1989
1992
  );
1990
- return typeof l != "boolean" ? /* @__PURE__ */ s(
1993
+ return typeof l != "boolean" ? /* @__PURE__ */ a(
1991
1994
  l,
1992
1995
  {
1993
1996
  total: t,
1994
1997
  current: e,
1995
1998
  nextPage: r,
1996
1999
  prevPage: o,
1997
- goToPage: a,
2000
+ goToPage: s,
1998
2001
  changePage: n
1999
2002
  }
2000
- ) : l ? /* @__PURE__ */ O("div", { className: st["rp-paginate"], children: [
2001
- !p && /* @__PURE__ */ s(re, { content: "Previous page", children: /* @__PURE__ */ s(Y, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ s(Eo, {}) }) }),
2002
- /* @__PURE__ */ s(
2003
+ ) : l ? /* @__PURE__ */ O("div", { className: at["rp-paginate"], children: [
2004
+ !p && /* @__PURE__ */ a(ne, { content: "Previous page", children: /* @__PURE__ */ a(Q, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ a(Eo, {}) }) }),
2005
+ /* @__PURE__ */ a(
2003
2006
  Xt,
2004
2007
  {
2005
2008
  onKeyDown: g,
2006
2009
  onBlur: u,
2007
2010
  onChange: h,
2008
2011
  value: i,
2009
- className: st["rp-page-input"]
2012
+ className: at["rp-page-input"]
2010
2013
  }
2011
2014
  ),
2012
- /* @__PURE__ */ O("span", { className: st["rp-total-page"], children: [
2015
+ /* @__PURE__ */ O("span", { className: at["rp-total-page"], children: [
2013
2016
  "/",
2014
2017
  t
2015
2018
  ] }),
2016
- !p && /* @__PURE__ */ s(re, { content: "Next page", children: /* @__PURE__ */ s(Y, { onClick: r, disabled: e === t, children: /* @__PURE__ */ s(Oo, {}) }) })
2019
+ !p && /* @__PURE__ */ a(ne, { content: "Next page", children: /* @__PURE__ */ a(Q, { onClick: r, disabled: e === t, children: /* @__PURE__ */ a(Oo, {}) }) })
2017
2020
  ] }) : null;
2018
2021
  };
2019
- var St = "Dialog", [Cn, ni] = Ir(St), [Ao, se] = Cn(St), Tn = (e) => {
2022
+ var Pt = "Dialog", [bn, ni] = Ir(Pt), [Ao, se] = bn(Pt), Cn = (e) => {
2020
2023
  const {
2021
2024
  __scopeDialog: t,
2022
2025
  children: n,
2023
2026
  open: r,
2024
2027
  defaultOpen: o,
2025
- onOpenChange: a,
2028
+ onOpenChange: s,
2026
2029
  modal: i = !0
2027
- } = e, c = U.useRef(null), l = U.useRef(null), [p = !1, h] = Rr({
2030
+ } = e, c = V.useRef(null), l = V.useRef(null), [p = !1, h] = Rr({
2028
2031
  prop: r,
2029
2032
  defaultProp: o,
2030
- onChange: a
2033
+ onChange: s
2031
2034
  });
2032
- return /* @__PURE__ */ s(
2035
+ return /* @__PURE__ */ a(
2033
2036
  Ao,
2034
2037
  {
2035
2038
  scope: t,
@@ -2040,18 +2043,18 @@ var St = "Dialog", [Cn, ni] = Ir(St), [Ao, se] = Cn(St), Tn = (e) => {
2040
2043
  descriptionId: Qe(),
2041
2044
  open: p,
2042
2045
  onOpenChange: h,
2043
- onOpenToggle: U.useCallback(() => h((m) => !m), [h]),
2046
+ onOpenToggle: V.useCallback(() => h((m) => !m), [h]),
2044
2047
  modal: i,
2045
2048
  children: n
2046
2049
  }
2047
2050
  );
2048
2051
  };
2049
- Tn.displayName = St;
2050
- var Sn = "DialogTrigger", zo = U.forwardRef(
2052
+ Cn.displayName = Pt;
2053
+ var Tn = "DialogTrigger", zo = V.forwardRef(
2051
2054
  (e, t) => {
2052
- const { __scopeDialog: n, ...r } = e, o = se(Sn, n), a = _t(t, o.triggerRef);
2053
- return /* @__PURE__ */ s(
2054
- Oe.button,
2055
+ const { __scopeDialog: n, ...r } = e, o = se(Tn, n), s = _t(t, o.triggerRef);
2056
+ return /* @__PURE__ */ a(
2057
+ Ae.button,
2055
2058
  {
2056
2059
  type: "button",
2057
2060
  "aria-haspopup": "dialog",
@@ -2059,35 +2062,35 @@ var Sn = "DialogTrigger", zo = U.forwardRef(
2059
2062
  "aria-controls": o.contentId,
2060
2063
  "data-state": yt(o.open),
2061
2064
  ...r,
2062
- ref: a,
2063
- onClick: Le(e.onClick, o.onOpenToggle)
2065
+ ref: s,
2066
+ onClick: Ee(e.onClick, o.onOpenToggle)
2064
2067
  }
2065
2068
  );
2066
2069
  }
2067
2070
  );
2068
- zo.displayName = Sn;
2069
- var Pt = "DialogPortal", [Fo, Pn] = Cn(Pt, {
2071
+ zo.displayName = Tn;
2072
+ var St = "DialogPortal", [Fo, Pn] = bn(St, {
2070
2073
  forceMount: void 0
2071
- }), In = (e) => {
2072
- const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = se(Pt, t);
2073
- return /* @__PURE__ */ s(Fo, { scope: t, forceMount: n, children: U.Children.map(r, (i) => /* @__PURE__ */ s(wt, { present: n || a.open, children: /* @__PURE__ */ s(Dr, { asChild: !0, container: o, children: i }) })) });
2074
+ }), Sn = (e) => {
2075
+ const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = se(St, t);
2076
+ return /* @__PURE__ */ a(Fo, { scope: t, forceMount: n, children: V.Children.map(r, (i) => /* @__PURE__ */ a(wt, { present: n || s.open, children: /* @__PURE__ */ a(Dr, { asChild: !0, container: o, children: i }) })) });
2074
2077
  };
2075
- In.displayName = Pt;
2076
- var Ve = "DialogOverlay", yn = U.forwardRef(
2078
+ Sn.displayName = St;
2079
+ var Ve = "DialogOverlay", In = V.forwardRef(
2077
2080
  (e, t) => {
2078
- const n = Pn(Ve, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = se(Ve, e.__scopeDialog);
2079
- return a.modal ? /* @__PURE__ */ s(wt, { present: r || a.open, children: /* @__PURE__ */ s(ko, { ...o, ref: t }) }) : null;
2081
+ const n = Pn(Ve, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = se(Ve, e.__scopeDialog);
2082
+ return s.modal ? /* @__PURE__ */ a(wt, { present: r || s.open, children: /* @__PURE__ */ a(ko, { ...o, ref: t }) }) : null;
2080
2083
  }
2081
2084
  );
2082
- yn.displayName = Ve;
2083
- var ko = U.forwardRef(
2085
+ In.displayName = Ve;
2086
+ var ko = V.forwardRef(
2084
2087
  (e, t) => {
2085
2088
  const { __scopeDialog: n, ...r } = e, o = se(Ve, n);
2086
2089
  return (
2087
2090
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2088
2091
  // ie. when `Overlay` and `Content` are siblings
2089
- /* @__PURE__ */ s(Nr, { as: yr, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ s(
2090
- Oe.div,
2092
+ /* @__PURE__ */ a(Nr, { as: yr, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ a(
2093
+ Ae.div,
2091
2094
  {
2092
2095
  "data-state": yt(o.open),
2093
2096
  ...r,
@@ -2097,78 +2100,78 @@ var ko = U.forwardRef(
2097
2100
  ) })
2098
2101
  );
2099
2102
  }
2100
- ), we = "DialogContent", xn = U.forwardRef(
2103
+ ), we = "DialogContent", yn = V.forwardRef(
2101
2104
  (e, t) => {
2102
- const n = Pn(we, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = se(we, e.__scopeDialog);
2103
- return /* @__PURE__ */ s(wt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ s(Wo, { ...o, ref: t }) : /* @__PURE__ */ s(Ho, { ...o, ref: t }) });
2105
+ const n = Pn(we, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = se(we, e.__scopeDialog);
2106
+ return /* @__PURE__ */ a(wt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ a(Wo, { ...o, ref: t }) : /* @__PURE__ */ a(Ho, { ...o, ref: t }) });
2104
2107
  }
2105
2108
  );
2106
- xn.displayName = we;
2107
- var Wo = U.forwardRef(
2109
+ yn.displayName = we;
2110
+ var Wo = V.forwardRef(
2108
2111
  (e, t) => {
2109
- const n = se(we, e.__scopeDialog), r = U.useRef(null), o = _t(t, n.contentRef, r);
2110
- return U.useEffect(() => {
2111
- const a = r.current;
2112
- if (a)
2113
- return Mr(a);
2114
- }, []), /* @__PURE__ */ s(
2115
- Rn,
2112
+ const n = se(we, e.__scopeDialog), r = V.useRef(null), o = _t(t, n.contentRef, r);
2113
+ return V.useEffect(() => {
2114
+ const s = r.current;
2115
+ if (s)
2116
+ return Mr(s);
2117
+ }, []), /* @__PURE__ */ a(
2118
+ xn,
2116
2119
  {
2117
2120
  ...e,
2118
2121
  ref: o,
2119
2122
  trapFocus: n.open,
2120
2123
  disableOutsidePointerEvents: !0,
2121
- onCloseAutoFocus: Le(e.onCloseAutoFocus, (a) => {
2124
+ onCloseAutoFocus: Ee(e.onCloseAutoFocus, (s) => {
2122
2125
  var i;
2123
- a.preventDefault(), (i = n.triggerRef.current) == null || i.focus();
2126
+ s.preventDefault(), (i = n.triggerRef.current) == null || i.focus();
2124
2127
  }),
2125
- onPointerDownOutside: Le(e.onPointerDownOutside, (a) => {
2126
- const i = a.detail.originalEvent, c = i.button === 0 && i.ctrlKey === !0;
2127
- (i.button === 2 || c) && a.preventDefault();
2128
+ onPointerDownOutside: Ee(e.onPointerDownOutside, (s) => {
2129
+ const i = s.detail.originalEvent, c = i.button === 0 && i.ctrlKey === !0;
2130
+ (i.button === 2 || c) && s.preventDefault();
2128
2131
  }),
2129
- onFocusOutside: Le(
2132
+ onFocusOutside: Ee(
2130
2133
  e.onFocusOutside,
2131
- (a) => a.preventDefault()
2134
+ (s) => s.preventDefault()
2132
2135
  )
2133
2136
  }
2134
2137
  );
2135
2138
  }
2136
- ), Ho = U.forwardRef(
2139
+ ), Ho = V.forwardRef(
2137
2140
  (e, t) => {
2138
- const n = se(we, e.__scopeDialog), r = U.useRef(!1), o = U.useRef(!1);
2139
- return /* @__PURE__ */ s(
2140
- Rn,
2141
+ const n = se(we, e.__scopeDialog), r = V.useRef(!1), o = V.useRef(!1);
2142
+ return /* @__PURE__ */ a(
2143
+ xn,
2141
2144
  {
2142
2145
  ...e,
2143
2146
  ref: t,
2144
2147
  trapFocus: !1,
2145
2148
  disableOutsidePointerEvents: !1,
2146
- onCloseAutoFocus: (a) => {
2149
+ onCloseAutoFocus: (s) => {
2147
2150
  var i, c;
2148
- (i = e.onCloseAutoFocus) == null || i.call(e, a), a.defaultPrevented || (r.current || (c = n.triggerRef.current) == null || c.focus(), a.preventDefault()), r.current = !1, o.current = !1;
2151
+ (i = e.onCloseAutoFocus) == null || i.call(e, s), s.defaultPrevented || (r.current || (c = n.triggerRef.current) == null || c.focus(), s.preventDefault()), r.current = !1, o.current = !1;
2149
2152
  },
2150
- onInteractOutside: (a) => {
2153
+ onInteractOutside: (s) => {
2151
2154
  var l, p;
2152
- (l = e.onInteractOutside) == null || l.call(e, a), a.defaultPrevented || (r.current = !0, a.detail.originalEvent.type === "pointerdown" && (o.current = !0));
2153
- const i = a.target;
2154
- ((p = n.triggerRef.current) == null ? void 0 : p.contains(i)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && o.current && a.preventDefault();
2155
+ (l = e.onInteractOutside) == null || l.call(e, s), s.defaultPrevented || (r.current = !0, s.detail.originalEvent.type === "pointerdown" && (o.current = !0));
2156
+ const i = s.target;
2157
+ ((p = n.triggerRef.current) == null ? void 0 : p.contains(i)) && s.preventDefault(), s.detail.originalEvent.type === "focusin" && o.current && s.preventDefault();
2155
2158
  }
2156
2159
  }
2157
2160
  );
2158
2161
  }
2159
- ), Rn = U.forwardRef(
2162
+ ), xn = V.forwardRef(
2160
2163
  (e, t) => {
2161
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...i } = e, c = se(we, n), l = U.useRef(null), p = _t(t, l);
2164
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, c = se(we, n), l = V.useRef(null), p = _t(t, l);
2162
2165
  return Er(), /* @__PURE__ */ O(He, { children: [
2163
- /* @__PURE__ */ s(
2166
+ /* @__PURE__ */ a(
2164
2167
  Or,
2165
2168
  {
2166
2169
  asChild: !0,
2167
2170
  loop: !0,
2168
2171
  trapped: r,
2169
2172
  onMountAutoFocus: o,
2170
- onUnmountAutoFocus: a,
2171
- children: /* @__PURE__ */ s(
2173
+ onUnmountAutoFocus: s,
2174
+ children: /* @__PURE__ */ a(
2172
2175
  Lr,
2173
2176
  {
2174
2177
  role: "dialog",
@@ -2184,64 +2187,64 @@ var Wo = U.forwardRef(
2184
2187
  }
2185
2188
  ),
2186
2189
  /* @__PURE__ */ O(He, { children: [
2187
- /* @__PURE__ */ s(Go, { titleId: c.titleId }),
2188
- /* @__PURE__ */ s(Uo, { contentRef: l, descriptionId: c.descriptionId })
2190
+ /* @__PURE__ */ a(Go, { titleId: c.titleId }),
2191
+ /* @__PURE__ */ a(Uo, { contentRef: l, descriptionId: c.descriptionId })
2189
2192
  ] })
2190
2193
  ] });
2191
2194
  }
2192
- ), It = "DialogTitle", Ln = U.forwardRef(
2195
+ ), It = "DialogTitle", Rn = V.forwardRef(
2193
2196
  (e, t) => {
2194
2197
  const { __scopeDialog: n, ...r } = e, o = se(It, n);
2195
- return /* @__PURE__ */ s(Oe.h2, { id: o.titleId, ...r, ref: t });
2198
+ return /* @__PURE__ */ a(Ae.h2, { id: o.titleId, ...r, ref: t });
2196
2199
  }
2197
2200
  );
2198
- Ln.displayName = It;
2199
- var Nn = "DialogDescription", $o = U.forwardRef(
2201
+ Rn.displayName = It;
2202
+ var Ln = "DialogDescription", $o = V.forwardRef(
2200
2203
  (e, t) => {
2201
- const { __scopeDialog: n, ...r } = e, o = se(Nn, n);
2202
- return /* @__PURE__ */ s(Oe.p, { id: o.descriptionId, ...r, ref: t });
2204
+ const { __scopeDialog: n, ...r } = e, o = se(Ln, n);
2205
+ return /* @__PURE__ */ a(Ae.p, { id: o.descriptionId, ...r, ref: t });
2203
2206
  }
2204
2207
  );
2205
- $o.displayName = Nn;
2206
- var Mn = "DialogClose", En = U.forwardRef(
2208
+ $o.displayName = Ln;
2209
+ var Nn = "DialogClose", Mn = V.forwardRef(
2207
2210
  (e, t) => {
2208
- const { __scopeDialog: n, ...r } = e, o = se(Mn, n);
2209
- return /* @__PURE__ */ s(
2210
- Oe.button,
2211
+ const { __scopeDialog: n, ...r } = e, o = se(Nn, n);
2212
+ return /* @__PURE__ */ a(
2213
+ Ae.button,
2211
2214
  {
2212
2215
  type: "button",
2213
2216
  ...r,
2214
2217
  ref: t,
2215
- onClick: Le(e.onClick, () => o.onOpenChange(!1))
2218
+ onClick: Ee(e.onClick, () => o.onOpenChange(!1))
2216
2219
  }
2217
2220
  );
2218
2221
  }
2219
2222
  );
2220
- En.displayName = Mn;
2223
+ Mn.displayName = Nn;
2221
2224
  function yt(e) {
2222
2225
  return e ? "open" : "closed";
2223
2226
  }
2224
- var On = "DialogTitleWarning", [ri, Dn] = xr(On, {
2227
+ var En = "DialogTitleWarning", [ri, On] = xr(En, {
2225
2228
  contentName: we,
2226
2229
  titleName: It,
2227
2230
  docsSlug: "dialog"
2228
2231
  }), Go = ({ titleId: e }) => {
2229
- const t = Dn(On), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2232
+ const t = On(En), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2230
2233
 
2231
2234
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
2232
2235
 
2233
2236
  For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
2234
- return U.useEffect(() => {
2237
+ return V.useEffect(() => {
2235
2238
  e && (document.getElementById(e) || console.error(n));
2236
2239
  }, [n, e]), null;
2237
2240
  }, Vo = "DialogDescriptionWarning", Uo = ({ contentRef: e, descriptionId: t }) => {
2238
- const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Dn(Vo).contentName}}.`;
2239
- return U.useEffect(() => {
2240
- var a;
2241
- const o = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
2241
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${On(Vo).contentName}}.`;
2242
+ return V.useEffect(() => {
2243
+ var s;
2244
+ const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
2242
2245
  t && o && (document.getElementById(t) || console.warn(r));
2243
2246
  }, [r, e, t]), null;
2244
- }, qo = Tn, jo = In, Zo = yn, Bo = xn, Ko = Ln, Xo = En;
2247
+ }, qo = Cn, jo = Sn, Zo = In, Bo = yn, Ko = Rn, Xo = Mn;
2245
2248
  const _e = {
2246
2249
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2247
2250
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
@@ -2251,11 +2254,11 @@ const _e = {
2251
2254
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2252
2255
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2253
2256
  }, Jo = () => {
2254
- const { pdfProperties: e } = J(), { container: t } = Me(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = zr(), o = z(() => {
2257
+ const { pdfProperties: e } = Y(), { container: t } = be(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = zr(), o = z(() => {
2255
2258
  if (!e)
2256
2259
  return [];
2257
2260
  const {
2258
- fileSize: a,
2261
+ fileSize: s,
2259
2262
  filename: i,
2260
2263
  title: c,
2261
2264
  author: l,
@@ -2265,12 +2268,12 @@ const _e = {
2265
2268
  keywords: u,
2266
2269
  modifiedOn: g,
2267
2270
  pdfProducer: f,
2268
- pdfVersion: _,
2271
+ pdfVersion: w,
2269
2272
  pageCount: v
2270
2273
  } = e;
2271
2274
  return [
2272
2275
  { label: "File name", value: i },
2273
- { label: "File size", value: a },
2276
+ { label: "File size", value: s },
2274
2277
  { separate: !0 },
2275
2278
  { label: "Title", value: c },
2276
2279
  { label: "Author", value: l },
@@ -2287,49 +2290,49 @@ const _e = {
2287
2290
  },
2288
2291
  { separate: !0 },
2289
2292
  { label: "PDF producer", value: f },
2290
- { label: "PDF version", value: _ },
2293
+ { label: "PDF version", value: w },
2291
2294
  { label: "Page count", value: v }
2292
2295
  ];
2293
2296
  }, [e]);
2294
- return /* @__PURE__ */ s(qo, { open: n, onOpenChange: r, children: /* @__PURE__ */ s(jo, { container: t, children: /* @__PURE__ */ O("div", { className: _e["rp-dialog-wrapper"], children: [
2295
- /* @__PURE__ */ s(Zo, { className: _e["rp-dialog-overlay"] }),
2297
+ return /* @__PURE__ */ a(qo, { open: n, onOpenChange: r, children: /* @__PURE__ */ a(jo, { container: t, children: /* @__PURE__ */ O("div", { className: _e["rp-dialog-wrapper"], children: [
2298
+ /* @__PURE__ */ a(Zo, { className: _e["rp-dialog-overlay"] }),
2296
2299
  /* @__PURE__ */ O(Bo, { className: _e["rp-document-dialog"], children: [
2297
- /* @__PURE__ */ s(Ko, { className: _e["rp-dialog-title"], children: "Document Properties" }),
2298
- /* @__PURE__ */ s("div", { className: _e["rp-document-properties"], children: o.map((a, i) => /* @__PURE__ */ s("div", { children: a.separate ? /* @__PURE__ */ s("div", { className: _e["rp-properties-divider"] }) : /* @__PURE__ */ s(Ar, { label: a.label, value: a.value }) }, i)) }),
2299
- /* @__PURE__ */ s(Xo, { asChild: !0, className: _e["rp-dialog-close"], children: /* @__PURE__ */ s(on, {}) })
2300
+ /* @__PURE__ */ a(Ko, { className: _e["rp-dialog-title"], children: "Document Properties" }),
2301
+ /* @__PURE__ */ a("div", { className: _e["rp-document-properties"], children: o.map((s, i) => /* @__PURE__ */ a("div", { children: s.separate ? /* @__PURE__ */ a("div", { className: _e["rp-properties-divider"] }) : /* @__PURE__ */ a(Ar, { label: s.label, value: s.value }) }, i)) }),
2302
+ /* @__PURE__ */ a(Xo, { asChild: !0, className: _e["rp-dialog-close"], children: /* @__PURE__ */ a(rn, {}) })
2300
2303
  ] })
2301
2304
  ] }) }) });
2302
2305
  }, Yo = {
2303
2306
  "rp-other-tool-content": "_rp-other-tool-content_su718_1"
2304
- }, Qo = (e) => URL.createObjectURL(e), ea = async (e) => {
2307
+ }, Qo = (e) => URL.createObjectURL(e), es = async (e) => {
2305
2308
  const n = await (await fetch(e)).blob();
2306
2309
  return Qo(n);
2307
- }, ta = () => {
2308
- const { filename: e, pdfSrc: t } = J();
2310
+ }, ts = () => {
2311
+ const { filename: e, pdfSrc: t } = Y();
2309
2312
  return { download: R(async () => {
2310
2313
  if (!e || !t)
2311
2314
  throw new Error("There is no PDF source to download");
2312
2315
  const r = document.createElement("a");
2313
- r.href = await ea(t), r.download = e, document.body.appendChild(r), r.click(), document.body.removeChild(r);
2316
+ r.href = await es(t), r.download = e, document.body.appendChild(r), r.click(), document.body.removeChild(r);
2314
2317
  }, []) };
2315
- }, An = () => {
2318
+ }, Dn = () => {
2316
2319
  const { downloadIcon: e } = ce();
2317
- return e || /* @__PURE__ */ s($r, {});
2318
- }, zn = ({ children: e, className: t }) => /* @__PURE__ */ s(re, { className: t, content: "Download file", children: e }), na = ({ download: e }) => /* @__PURE__ */ s(zn, { children: /* @__PURE__ */ s(Y, { onClick: e, children: /* @__PURE__ */ s(An, {}) }) }), ra = ({ download: e }) => /* @__PURE__ */ s(he, { onClick: e, children: /* @__PURE__ */ O(zn, { className: "rp-menu-item", children: [
2319
- /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(An, {}) }),
2320
+ return e || /* @__PURE__ */ a($r, {});
2321
+ }, An = ({ children: e, className: t }) => /* @__PURE__ */ a(ne, { className: t, content: "Download file", children: e }), ns = ({ download: e }) => /* @__PURE__ */ a(An, { children: /* @__PURE__ */ a(Q, { onClick: e, children: /* @__PURE__ */ a(Dn, {}) }) }), rs = ({ download: e }) => /* @__PURE__ */ a(ge, { onClick: e, children: /* @__PURE__ */ O(An, { className: "rp-menu-item", children: [
2322
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Dn, {}) }),
2320
2323
  "Download file"
2321
- ] }) }), Fn = () => {
2322
- const { download: e } = ta(), { downloadTool: t = !0 } = pe(), { isSmallScreen: n } = be();
2323
- return t ? n ? /* @__PURE__ */ s(ra, { download: e }) : typeof t == "function" ? /* @__PURE__ */ s(t, { download: e }) : t ? /* @__PURE__ */ s(na, { download: e }) : null : null;
2324
- }, kn = () => {
2324
+ ] }) }), zn = () => {
2325
+ const { download: e } = ts(), { downloadTool: t = !0 } = fe(), { isSmallScreen: n } = Ce();
2326
+ return t ? n ? /* @__PURE__ */ a(rs, { download: e }) : typeof t == "function" ? /* @__PURE__ */ a(t, { download: e }) : t ? /* @__PURE__ */ a(ns, { download: e }) : null : null;
2327
+ }, Fn = () => {
2325
2328
  const { printIcon: e } = ce();
2326
- return e || /* @__PURE__ */ s(Gr, {});
2327
- }, Wn = ({ children: e, className: t }) => /* @__PURE__ */ s(re, { className: t, content: "Print", children: e }), oa = ({ print: e }) => /* @__PURE__ */ s(Wn, { children: /* @__PURE__ */ s(Y, { onClick: e, children: /* @__PURE__ */ s(kn, {}) }) }), aa = ({ print: e }) => /* @__PURE__ */ s(he, { onClick: e, children: /* @__PURE__ */ O(Wn, { className: "rp-menu-item", children: [
2328
- /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(kn, {}) }),
2329
+ return e || /* @__PURE__ */ a(Gr, {});
2330
+ }, kn = ({ children: e, className: t }) => /* @__PURE__ */ a(ne, { className: t, content: "Print", children: e }), os = ({ print: e }) => /* @__PURE__ */ a(kn, { children: /* @__PURE__ */ a(Q, { onClick: e, children: /* @__PURE__ */ a(Fn, {}) }) }), ss = ({ print: e }) => /* @__PURE__ */ a(ge, { onClick: e, children: /* @__PURE__ */ O(kn, { className: "rp-menu-item", children: [
2331
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Fn, {}) }),
2329
2332
  "Print"
2330
- ] }) }), Hn = () => {
2331
- const { print: e, cancel: t, setOnProgress: n, setOnComplete: r, setOnError: o, progress: a } = Ct(), { printTool: i = !0 } = pe(), { isSmallScreen: c } = be();
2332
- return i ? c ? /* @__PURE__ */ s(aa, { print: e }) : typeof i == "function" ? /* @__PURE__ */ s(
2333
+ ] }) }), Wn = () => {
2334
+ const { print: e, cancel: t, setOnProgress: n, setOnComplete: r, setOnError: o, progress: s } = Ct(), { printTool: i = !0 } = fe(), { isSmallScreen: c } = Ce();
2335
+ return i ? c ? /* @__PURE__ */ a(ss, { print: e }) : typeof i == "function" ? /* @__PURE__ */ a(
2333
2336
  i,
2334
2337
  {
2335
2338
  print: e,
@@ -2337,161 +2340,161 @@ const _e = {
2337
2340
  setOnProgress: n,
2338
2341
  setOnError: o,
2339
2342
  setOnComplete: r,
2340
- progress: a
2343
+ progress: s
2341
2344
  }
2342
- ) : i ? /* @__PURE__ */ s(oa, { print: e }) : null : null;
2343
- }, sa = {
2345
+ ) : i ? /* @__PURE__ */ a(os, { print: e }) : null : null;
2346
+ }, as = {
2344
2347
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2345
- }, ia = () => {
2348
+ }, is = () => {
2346
2349
  const { goToFirstPageIcon: e } = ce();
2347
- return e || /* @__PURE__ */ s(sn, { className: sa["rp-go-to-Top"] });
2348
- }, ca = () => {
2350
+ return e || /* @__PURE__ */ a(sn, { className: as["rp-go-to-Top"] });
2351
+ }, cs = () => {
2349
2352
  const { goToLastPageIcon: e } = ce();
2350
- return e || /* @__PURE__ */ s(sn, {});
2351
- }, la = () => {
2352
- const { goToPage: e, totalPages: t, focusedPage: n } = ae(), { jumpNavigationTool: r = !0 } = pe(), o = z(() => n === 1, [n]), a = z(() => n === t, [n, t]), i = R(() => {
2353
+ return e || /* @__PURE__ */ a(sn, {});
2354
+ }, ls = () => {
2355
+ const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: r = !0 } = fe(), o = z(() => n === 1, [n]), s = z(() => n === t, [n, t]), i = R(() => {
2353
2356
  e(1);
2354
2357
  }, [e]), c = R(() => {
2355
2358
  e(t);
2356
2359
  }, [e, t]);
2357
2360
  return r ? /* @__PURE__ */ O(Ge, { children: [
2358
- /* @__PURE__ */ s(he, { disabled: o, onClick: i, children: /* @__PURE__ */ O(re, { className: "rp-menu-item", content: "Go to first page", children: [
2359
- /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(ia, {}) }),
2361
+ /* @__PURE__ */ a(ge, { disabled: o, onClick: i, children: /* @__PURE__ */ O(ne, { className: "rp-menu-item", content: "Go to first page", children: [
2362
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(is, {}) }),
2360
2363
  "First page"
2361
2364
  ] }) }),
2362
- /* @__PURE__ */ s(he, { disabled: a, onClick: c, children: /* @__PURE__ */ O(re, { className: "rp-menu-item", content: "Go to last page", children: [
2363
- /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(ca, {}) }),
2365
+ /* @__PURE__ */ a(ge, { disabled: s, onClick: c, children: /* @__PURE__ */ O(ne, { className: "rp-menu-item", content: "Go to last page", children: [
2366
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(cs, {}) }),
2364
2367
  "Last page"
2365
2368
  ] }) }),
2366
- /* @__PURE__ */ s(bt, {})
2369
+ /* @__PURE__ */ a(bt, {})
2367
2370
  ] }) : null;
2368
- }, ua = () => {
2369
- const { container: e } = Me(), { isSmallScreen: t } = be(), {
2371
+ }, us = () => {
2372
+ const { container: e } = be(), { isSmallScreen: t } = Ce(), {
2370
2373
  openFileTool: n,
2371
2374
  downloadTool: r,
2372
2375
  documentProperties: o,
2373
- scrollModeTool: a,
2376
+ scrollModeTool: s,
2374
2377
  rotateTool: i,
2375
2378
  selectionModeTool: c,
2376
2379
  jumpNavigationTool: l,
2377
2380
  printTool: p,
2378
2381
  fullscreenTool: h
2379
- } = pe();
2382
+ } = fe();
2380
2383
  return z(() => {
2381
- const u = l || i || c || a || o;
2384
+ const u = l || i || c || s || o;
2382
2385
  let g = !1;
2383
2386
  return t && (g = !(!n && !r && !p && !h)), u || g;
2384
2387
  }, [
2385
2388
  n,
2386
2389
  r,
2387
2390
  o,
2388
- a,
2391
+ s,
2389
2392
  i,
2390
2393
  c,
2391
2394
  l,
2392
2395
  t
2393
2396
  ]) ? /* @__PURE__ */ O(Fr, { children: [
2394
- /* @__PURE__ */ s(
2397
+ /* @__PURE__ */ a(
2395
2398
  vt,
2396
2399
  {
2397
2400
  container: e,
2398
- triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(re, { content: "More options", children: /* @__PURE__ */ s(Y, { children: /* @__PURE__ */ s(Pr, {}) }) }) }),
2401
+ triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(ne, { content: "More options", children: /* @__PURE__ */ a(Q, { children: /* @__PURE__ */ a(Sr, {}) }) }) }),
2399
2402
  children: /* @__PURE__ */ O("div", { className: Yo["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2400
2403
  t && /* @__PURE__ */ O(Ge, { children: [
2401
- /* @__PURE__ */ s(rn, {}),
2402
- /* @__PURE__ */ s(Fn, {}),
2403
- /* @__PURE__ */ s(Hn, {}),
2404
- /* @__PURE__ */ s(an, {}),
2405
- /* @__PURE__ */ s(bt, {})
2404
+ /* @__PURE__ */ a(nn, {}),
2405
+ /* @__PURE__ */ a(zn, {}),
2406
+ /* @__PURE__ */ a(Wn, {}),
2407
+ /* @__PURE__ */ a(on, {}),
2408
+ /* @__PURE__ */ a(bt, {})
2406
2409
  ] }),
2407
- /* @__PURE__ */ s(la, {}),
2408
- /* @__PURE__ */ s(Wr, {}),
2409
- /* @__PURE__ */ s(Vr, {}),
2410
- /* @__PURE__ */ s(Hr, {}),
2411
- /* @__PURE__ */ s(kr, {})
2410
+ /* @__PURE__ */ a(ls, {}),
2411
+ /* @__PURE__ */ a(Wr, {}),
2412
+ /* @__PURE__ */ a(Vr, {}),
2413
+ /* @__PURE__ */ a(Hr, {}),
2414
+ /* @__PURE__ */ a(kr, {})
2412
2415
  ] })
2413
2416
  }
2414
2417
  ),
2415
- /* @__PURE__ */ s(Jo, {})
2418
+ /* @__PURE__ */ a(Jo, {})
2416
2419
  ] }) : null;
2417
- }, da = () => {
2418
- const { isSmallScreen: e } = be();
2420
+ }, ds = () => {
2421
+ const { isSmallScreen: e } = Ce();
2419
2422
  return /* @__PURE__ */ O(He, { children: [
2420
- /* @__PURE__ */ s(Sr, {}),
2423
+ /* @__PURE__ */ a(Pr, {}),
2421
2424
  !e && /* @__PURE__ */ O(He, { children: [
2422
- /* @__PURE__ */ s(rn, {}),
2423
- /* @__PURE__ */ s(Fn, {}),
2424
- /* @__PURE__ */ s(Hn, {}),
2425
- /* @__PURE__ */ s(an, {})
2425
+ /* @__PURE__ */ a(nn, {}),
2426
+ /* @__PURE__ */ a(zn, {}),
2427
+ /* @__PURE__ */ a(Wn, {}),
2428
+ /* @__PURE__ */ a(on, {})
2426
2429
  ] }),
2427
- /* @__PURE__ */ s(ua, {})
2430
+ /* @__PURE__ */ a(us, {})
2428
2431
  ] });
2429
- }, Pe = {
2432
+ }, xe = {
2430
2433
  "rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
2431
2434
  "rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_cocqs_6",
2432
2435
  "rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
2433
2436
  "rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
2434
2437
  "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
2435
- }, pa = 25, it = 1e3, ha = [50, 75, 100, 125, 150, 200, 300, 400], ma = () => {
2438
+ }, ps = 25, it = 1e3, hs = [50, 75, 100, 125, 150, 200, 300, 400], ms = () => {
2436
2439
  const { zoomInIcon: e } = ce();
2437
- return e || /* @__PURE__ */ s(Ur, {});
2438
- }, fa = () => {
2440
+ return e || /* @__PURE__ */ a(Ur, {});
2441
+ }, fs = () => {
2439
2442
  const { zoomOutIcon: e } = ce();
2440
- return e || /* @__PURE__ */ s(qr, {});
2441
- }, ga = () => {
2442
- const { zoomLevel: e, setZoomLevel: t } = Be(), { container: n, contentRef: r } = Me(), { zoomTool: o = !0 } = pe(), { focusedPage: a } = ae(), { rotate: i } = Ze(), { pages: c } = J(), { isSmallScreen: l } = be(), p = R(() => {
2443
+ return e || /* @__PURE__ */ a(qr, {});
2444
+ }, gs = () => {
2445
+ const { zoomLevel: e, setZoomLevel: t } = Be(), { container: n, contentRef: r } = be(), { zoomTool: o = !0 } = fe(), { focusedPage: s } = oe(), { rotate: i } = Ze(), { pages: c } = Y(), { isSmallScreen: l } = Ce(), p = R(() => {
2443
2446
  t((v) => {
2444
- const C = Math.floor(v / 25) * 25;
2445
- return Math.min(C + 25, it);
2447
+ const b = Math.floor(v / 25) * 25;
2448
+ return Math.min(b + 25, it);
2446
2449
  });
2447
2450
  }, [t]), h = R(() => {
2448
2451
  t((v) => {
2449
- const C = Math.ceil(v / 25) * 25;
2450
- return Math.min(C - 25, it);
2452
+ const b = Math.ceil(v / 25) * 25;
2453
+ return Math.min(b - 25, it);
2451
2454
  });
2452
- }, [t]), m = z(() => e === pa, [e]), u = z(() => e === it, [e]), g = z(() => {
2455
+ }, [t]), m = z(() => e === ps, [e]), u = z(() => e === it, [e]), g = z(() => {
2453
2456
  var v;
2454
- return (v = c.get(a)) == null ? void 0 : v.page.getViewport({ scale: 1, rotation: i });
2455
- }, [c, a, i]), f = R(
2457
+ return (v = c.get(s)) == null ? void 0 : v.page.getViewport({ scale: 1, rotation: i });
2458
+ }, [c, s, i]), f = R(
2456
2459
  (v) => {
2457
- const C = ((g == null ? void 0 : g.width) || 0) + 2 * Lt, T = ((g == null ? void 0 : g.height) || 0) + 2 * Lt, S = (r == null ? void 0 : r.clientWidth) || 0, y = (r == null ? void 0 : r.clientHeight) || 0, d = jr(v, S, y, C, T);
2460
+ const b = ((g == null ? void 0 : g.width) || 0) + 2 * Lt, P = ((g == null ? void 0 : g.height) || 0) + 2 * Lt, C = (r == null ? void 0 : r.clientWidth) || 0, y = (r == null ? void 0 : r.clientHeight) || 0, d = jr(v, C, y, b, P);
2458
2461
  t(d);
2459
2462
  },
2460
2463
  [t, g]
2461
- ), _ = R(
2464
+ ), w = R(
2462
2465
  (v) => {
2463
2466
  typeof v == "number" ? t(v) : f(v);
2464
2467
  },
2465
2468
  [t, f]
2466
2469
  );
2467
- return typeof o != "boolean" ? /* @__PURE__ */ s(o, { zoomLevel: e, setZoomLevel: t }) : o ? /* @__PURE__ */ O("div", { className: Pe["rp-zoom-wrapper"], children: [
2468
- /* @__PURE__ */ s(re, { content: "Zoom out", children: /* @__PURE__ */ s(Y, { disabled: m, onClick: h, children: /* @__PURE__ */ s(fa, {}) }) }),
2469
- !l && /* @__PURE__ */ s(
2470
+ return typeof o != "boolean" ? /* @__PURE__ */ a(o, { zoomLevel: e, setZoomLevel: t }) : o ? /* @__PURE__ */ O("div", { className: xe["rp-zoom-wrapper"], children: [
2471
+ /* @__PURE__ */ a(ne, { content: "Zoom out", children: /* @__PURE__ */ a(Q, { disabled: m, onClick: h, children: /* @__PURE__ */ a(fs, {}) }) }),
2472
+ !l && /* @__PURE__ */ a(
2470
2473
  vt,
2471
2474
  {
2472
2475
  container: n,
2473
- triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(re, { content: "Select zoom level", children: /* @__PURE__ */ O(Y, { className: Pe["rp-current-zoom-wrapper"], children: [
2474
- /* @__PURE__ */ s("span", { className: Pe["rp-current-zoom-text"], children: e }),
2475
- /* @__PURE__ */ s("span", { className: Pe["rp-current-zoom-text"], children: "%" }),
2476
- /* @__PURE__ */ s(Ne, { className: Pe["rp-current-zoom-icon"] })
2476
+ triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(ne, { content: "Select zoom level", children: /* @__PURE__ */ O(Q, { className: xe["rp-current-zoom-wrapper"], children: [
2477
+ /* @__PURE__ */ a("span", { className: xe["rp-current-zoom-text"], children: e }),
2478
+ /* @__PURE__ */ a("span", { className: xe["rp-current-zoom-text"], children: "%" }),
2479
+ /* @__PURE__ */ a(Oe, { className: xe["rp-current-zoom-icon"] })
2477
2480
  ] }) }) }),
2478
2481
  style: { minWidth: "200px" },
2479
2482
  align: "center",
2480
- children: /* @__PURE__ */ O("div", { className: Pe["rp-zoom-dropdown-content"], children: [
2483
+ children: /* @__PURE__ */ O("div", { className: xe["rp-zoom-dropdown-content"], children: [
2481
2484
  /* @__PURE__ */ O(Ge, { children: [
2482
- /* @__PURE__ */ s(he, { onClick: () => _(Ye.ACTUAL), children: "Actual size" }),
2483
- /* @__PURE__ */ s(he, { onClick: () => _(Ye.PAGE_FIT), children: "Page fit" }),
2484
- /* @__PURE__ */ s(he, { onClick: () => _(Ye.PAGE_WIDTH), children: "Page width" })
2485
+ /* @__PURE__ */ a(ge, { onClick: () => w(Ye.ACTUAL), children: "Actual size" }),
2486
+ /* @__PURE__ */ a(ge, { onClick: () => w(Ye.PAGE_FIT), children: "Page fit" }),
2487
+ /* @__PURE__ */ a(ge, { onClick: () => w(Ye.PAGE_WIDTH), children: "Page width" })
2485
2488
  ] }),
2486
- /* @__PURE__ */ s(bt, {}),
2487
- /* @__PURE__ */ s(Ge, { children: ha.map((v) => /* @__PURE__ */ O(he, { onClick: () => _(v), children: [
2489
+ /* @__PURE__ */ a(bt, {}),
2490
+ /* @__PURE__ */ a(Ge, { children: hs.map((v) => /* @__PURE__ */ O(ge, { onClick: () => w(v), children: [
2488
2491
  v,
2489
2492
  " %"
2490
2493
  ] }, v)) })
2491
2494
  ] })
2492
2495
  }
2493
2496
  ),
2494
- /* @__PURE__ */ s(re, { content: "Zoom in", children: /* @__PURE__ */ s(Y, { disabled: u, onClick: p, children: /* @__PURE__ */ s(ma, {}) }) })
2497
+ /* @__PURE__ */ a(ne, { content: "Zoom in", children: /* @__PURE__ */ a(Q, { disabled: u, onClick: p, children: /* @__PURE__ */ a(ms, {}) }) })
2495
2498
  ] }) : null;
2496
2499
  }, ie = {
2497
2500
  "rp-search-tool-content": "_rp-search-tool-content_1vxow_1",
@@ -2504,9 +2507,9 @@ const _e = {
2504
2507
  "rp-search-input": "_rp-search-input_1vxow_49"
2505
2508
  }, Zt = () => {
2506
2509
  const { searchIcon: e } = ce();
2507
- return e || /* @__PURE__ */ s(Zr, {});
2508
- }, va = () => {
2509
- const { container: e } = Me(), [t, n] = H(!1), { pdf: r } = J(), [o, a] = H(null), {
2510
+ return e || /* @__PURE__ */ a(Zr, {});
2511
+ }, vs = () => {
2512
+ const { container: e } = be(), [t, n] = H(!1), { pdf: r } = Y(), [o, s] = H(null), {
2510
2513
  searchOptions: i,
2511
2514
  setSearchOptions: c,
2512
2515
  loading: l,
@@ -2516,13 +2519,13 @@ const _e = {
2516
2519
  nextMatch: u,
2517
2520
  prevMatch: g,
2518
2521
  search: f
2519
- } = mn(), { searchTool: _ = !0 } = pe(), [v, C] = H(f), T = R(() => {
2522
+ } = hn(), { searchTool: w = !0 } = fe(), [v, b] = H(f), P = R(() => {
2520
2523
  n(!0);
2521
- }, []), S = R(() => {
2522
- p(""), C(""), n(!1);
2524
+ }, []), C = R(() => {
2525
+ p(""), b(""), n(!1);
2523
2526
  }, [p]), y = R(
2524
2527
  (L) => {
2525
- L.key === "Escape" && t && S();
2528
+ L.key === "Escape" && t && C();
2526
2529
  },
2527
2530
  [t]
2528
2531
  ), d = R(
@@ -2536,127 +2539,127 @@ const _e = {
2536
2539
  }), [y]), E(() => {
2537
2540
  o && o.focus();
2538
2541
  }, [o]);
2539
- const b = R((L) => {
2540
- C(L.target.value);
2541
- }, []), w = R(() => {
2542
- C(""), p("");
2543
- }, [p]), P = z(() => `${m} / ${h}`, [m, h]), { wholeWords: A, matchCase: x } = z(() => i, [i]), I = R(
2542
+ const T = R((L) => {
2543
+ b(L.target.value);
2544
+ }, []), _ = R(() => {
2545
+ b(""), p("");
2546
+ }, [p]), S = z(() => `${m} / ${h}`, [m, h]), { wholeWords: A, matchCase: I } = z(() => i, [i]), N = R(
2544
2547
  (L) => {
2545
- c((N) => ({ ...N, matchCase: L }));
2548
+ c((M) => ({ ...M, matchCase: L }));
2546
2549
  },
2547
2550
  [c]
2548
- ), M = R(
2551
+ ), x = R(
2549
2552
  (L) => {
2550
- c((N) => ({ ...N, wholeWords: L }));
2553
+ c((M) => ({ ...M, wholeWords: L }));
2551
2554
  },
2552
2555
  [c]
2553
2556
  );
2554
2557
  return E(() => {
2555
- S();
2556
- }, [r, S]), _ ? /* @__PURE__ */ s(
2558
+ C();
2559
+ }, [r, C]), w ? /* @__PURE__ */ a(
2557
2560
  vt,
2558
2561
  {
2559
2562
  open: t,
2560
2563
  container: e,
2561
2564
  align: "start",
2562
- triggerComponent: /* @__PURE__ */ s(re, { content: "Search in document", children: /* @__PURE__ */ s(Y, { onClick: T, children: /* @__PURE__ */ s(Zt, {}) }) }),
2565
+ triggerComponent: /* @__PURE__ */ a(ne, { content: "Search in document", children: /* @__PURE__ */ a(Q, { onClick: P, children: /* @__PURE__ */ a(Zt, {}) }) }),
2563
2566
  children: /* @__PURE__ */ O("div", { className: ie["rp-search-tool-content"], children: [
2564
2567
  /* @__PURE__ */ O("div", { className: ie["rp-search-tool-input-wrapper"], children: [
2565
2568
  /* @__PURE__ */ O("div", { className: ie["rp-search-tool-input"], children: [
2566
- /* @__PURE__ */ s(
2569
+ /* @__PURE__ */ a(
2567
2570
  Xt,
2568
2571
  {
2569
2572
  value: v,
2570
2573
  onKeyDown: d,
2571
- onChange: b,
2572
- icon: /* @__PURE__ */ s(Zt, {}),
2574
+ onChange: T,
2575
+ icon: /* @__PURE__ */ a(Zt, {}),
2573
2576
  placeholder: "Enter to Search",
2574
2577
  className: ie["rp-search-input"],
2575
- ref: a,
2576
- children: !!v && /* @__PURE__ */ s("span", { className: ie["rp-search-tool-input-clear"], onClick: w, children: /* @__PURE__ */ s(Br, {}) })
2578
+ ref: s,
2579
+ children: !!v && /* @__PURE__ */ a("span", { className: ie["rp-search-tool-input-clear"], onClick: _, children: /* @__PURE__ */ a(Br, {}) })
2577
2580
  }
2578
2581
  ),
2579
- l ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(Ee, {}) }) : /* @__PURE__ */ s("span", { children: P })
2582
+ l ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(De, {}) }) : /* @__PURE__ */ a("span", { children: S })
2580
2583
  ] }),
2581
2584
  /* @__PURE__ */ O("div", { className: ie["rp-search-tool-input-checkboxes"], children: [
2582
- /* @__PURE__ */ s(Nt, { name: "matchCase", value: x, onChange: I, children: "Match Case" }),
2583
- /* @__PURE__ */ s(Nt, { name: "wholeWord", value: A, onChange: M, children: "Whole Word" })
2585
+ /* @__PURE__ */ a(Nt, { name: "matchCase", value: I, onChange: N, children: "Match Case" }),
2586
+ /* @__PURE__ */ a(Nt, { name: "wholeWord", value: A, onChange: x, children: "Whole Word" })
2584
2587
  ] })
2585
2588
  ] }),
2586
2589
  /* @__PURE__ */ O("div", { className: ie["rp-search-tool-controls"], children: [
2587
- /* @__PURE__ */ s(Y, { onClick: g, children: /* @__PURE__ */ s(Ne, { className: ie["rp-search-tool-input-icon"] }) }),
2588
- /* @__PURE__ */ s(Y, { onClick: u, children: /* @__PURE__ */ s(
2589
- Ne,
2590
+ /* @__PURE__ */ a(Q, { onClick: g, children: /* @__PURE__ */ a(Oe, { className: ie["rp-search-tool-input-icon"] }) }),
2591
+ /* @__PURE__ */ a(Q, { onClick: u, children: /* @__PURE__ */ a(
2592
+ Oe,
2590
2593
  {
2591
2594
  style: { transform: "rotate(180deg" },
2592
2595
  className: ie["rp-search-tool-input-icon"]
2593
2596
  }
2594
2597
  ) }),
2595
- /* @__PURE__ */ s(Y, { children: /* @__PURE__ */ s(on, { onClick: S, className: ie["rp-search-tool-input-icon"] }) })
2598
+ /* @__PURE__ */ a(Q, { children: /* @__PURE__ */ a(rn, { onClick: C, className: ie["rp-search-tool-input-icon"] }) })
2596
2599
  ] })
2597
2600
  ] })
2598
2601
  }
2599
2602
  ) : null;
2600
- }, _a = "_loading_1snj5_1", Ie = {
2603
+ }, _s = "_loading_1snj5_1", Re = {
2601
2604
  "rp-loading-overlay": "_rp-loading-overlay_1snj5_1",
2602
2605
  "rp-loading-modal": "_rp-loading-modal_1snj5_14",
2603
2606
  "rp-loading-title": "_rp-loading-title_1snj5_27",
2604
2607
  "rp-loading-progress-bar": "_rp-loading-progress-bar_1snj5_35",
2605
2608
  "rp-loading-progress": "_rp-loading-progress_1snj5_35",
2606
2609
  "rp-loading-cancel-button": "_rp-loading-cancel-button_1snj5_52",
2607
- loading: _a
2608
- }, wa = ({ percentage: e }) => {
2610
+ loading: _s
2611
+ }, ws = ({ percentage: e }) => {
2609
2612
  const { cancel: t } = Ct();
2610
- return e < 1 ? null : /* @__PURE__ */ s("div", { className: ne(Ie["rp-loading-overlay"]), children: /* @__PURE__ */ O("div", { className: ne(Ie["rp-loading-modal"]), children: [
2611
- /* @__PURE__ */ s("div", { className: ne(Ie["rp-loading-title"]), children: "Preparing document..." }),
2612
- /* @__PURE__ */ s("div", { className: ne(Ie["rp-loading-progress-bar"]), children: /* @__PURE__ */ s(
2613
+ return e < 1 ? null : /* @__PURE__ */ a("div", { className: te(Re["rp-loading-overlay"]), children: /* @__PURE__ */ O("div", { className: te(Re["rp-loading-modal"]), children: [
2614
+ /* @__PURE__ */ a("div", { className: te(Re["rp-loading-title"]), children: "Preparing document..." }),
2615
+ /* @__PURE__ */ a("div", { className: te(Re["rp-loading-progress-bar"]), children: /* @__PURE__ */ a(
2613
2616
  "div",
2614
2617
  {
2615
- className: ne(Ie["rp-loading-progress"]),
2618
+ className: te(Re["rp-loading-progress"]),
2616
2619
  style: { width: `${e}%` }
2617
2620
  }
2618
2621
  ) }),
2619
- /* @__PURE__ */ s("button", { className: ne(Ie["rp-loading-cancel-button"]), onClick: t, children: "Cancel" })
2622
+ /* @__PURE__ */ a("button", { className: te(Re["rp-loading-cancel-button"]), onClick: t, children: "Cancel" })
2620
2623
  ] }) });
2621
- }, ba = je((e, t) => {
2622
- const { showPrintProgress: n } = pe(), { progress: r } = Ct(), { isSmallScreen: o } = be(), { percentage: a } = r || {}, i = () => o ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2624
+ }, bs = je((e, t) => {
2625
+ const { showPrintProgress: n } = fe(), { progress: r } = Ct(), { isSmallScreen: o } = Ce(), { percentage: s } = r || {}, i = () => o ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2623
2626
  return /* @__PURE__ */ O("div", { children: [
2624
- /* @__PURE__ */ s("div", { "data-rp": "topBar", ref: t, className: xe["rp-toolbar-content"], children: /* @__PURE__ */ O("div", { className: xe["rp-toolbar-wrapper"], style: i(), children: [
2625
- /* @__PURE__ */ O("div", { "data-rp": "topBarLeft", className: xe["rp-toolbar-start"], children: [
2626
- /* @__PURE__ */ s(va, {}),
2627
- /* @__PURE__ */ s(Do, {})
2627
+ /* @__PURE__ */ a("div", { "data-rp": "topBar", ref: t, className: Ne["rp-toolbar-content"], children: /* @__PURE__ */ O("div", { className: Ne["rp-toolbar-wrapper"], style: i(), children: [
2628
+ /* @__PURE__ */ O("div", { "data-rp": "topBarLeft", className: Ne["rp-toolbar-start"], children: [
2629
+ /* @__PURE__ */ a(vs, {}),
2630
+ /* @__PURE__ */ a(Do, {})
2628
2631
  ] }),
2629
- /* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className: xe["rp-toolbar-middle"], children: /* @__PURE__ */ s(ga, {}) }),
2630
- /* @__PURE__ */ s("div", { "data-rp": "topBarRight", className: xe["rp-toolbar-end"], children: /* @__PURE__ */ s(da, {}) })
2632
+ /* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: Ne["rp-toolbar-middle"], children: /* @__PURE__ */ a(gs, {}) }),
2633
+ /* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: Ne["rp-toolbar-end"], children: /* @__PURE__ */ a(ds, {}) })
2631
2634
  ] }) }),
2632
- n && a ? /* @__PURE__ */ s(wa, { percentage: a }) : null
2635
+ n && s ? /* @__PURE__ */ a(ws, { percentage: s }) : null
2633
2636
  ] });
2634
2637
  }), ct = {
2635
2638
  "rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_4wlw3_1",
2636
2639
  "rp-sidebar-content": "_rp-sidebar-content_4wlw3_1",
2637
2640
  "rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_4wlw3_16",
2638
2641
  "rp-thumbnail-dragging": "_rp-thumbnail-dragging_4wlw3_21"
2639
- }, Re = {
2642
+ }, Me = {
2640
2643
  "rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
2641
2644
  "rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
2642
2645
  "rp-thumbnail": "_rp-thumbnail_3fenb_1",
2643
2646
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
2644
2647
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
2645
- }, Ca = (e) => {
2646
- const { thumbnailSrc: t, pageNumber: n, isFocused: r, viewport: o } = e, { goToPage: a } = ae(), i = z(() => r ? Re["rp-thumbnail-active"] : "", [r]), c = z(() => ({
2648
+ }, Cs = (e) => {
2649
+ const { thumbnailSrc: t, pageNumber: n, isFocused: r, viewport: o } = e, { goToPage: s } = oe(), i = z(() => r ? Me["rp-thumbnail-active"] : "", [r]), c = z(() => ({
2647
2650
  width: Math.round(o.width),
2648
2651
  height: Math.round(o.height)
2649
2652
  }), [o]), l = R(() => {
2650
- n && a(n);
2651
- }, [a, n]);
2653
+ n && s(n);
2654
+ }, [s, n]);
2652
2655
  return /* @__PURE__ */ O(
2653
2656
  "div",
2654
2657
  {
2655
2658
  onClick: l,
2656
2659
  id: `page-${n}`,
2657
- className: Re["rp-thumbnail-wrapper"],
2660
+ className: Me["rp-thumbnail-wrapper"],
2658
2661
  children: [
2659
- /* @__PURE__ */ s("div", { className: ne(i, Re["rp-thumbnail"]), children: t ? /* @__PURE__ */ s(
2662
+ /* @__PURE__ */ a("div", { className: te(i, Me["rp-thumbnail"]), children: t ? /* @__PURE__ */ a(
2660
2663
  "img",
2661
2664
  {
2662
2665
  src: t,
@@ -2664,42 +2667,42 @@ const _e = {
2664
2667
  height: c.height,
2665
2668
  alt: "thumbnail"
2666
2669
  }
2667
- ) : /* @__PURE__ */ s(
2670
+ ) : /* @__PURE__ */ a(
2668
2671
  "div",
2669
2672
  {
2670
- className: Re["rp-thumbnail-loader"],
2673
+ className: Me["rp-thumbnail-loader"],
2671
2674
  style: {
2672
2675
  width: `${c.width}px`,
2673
2676
  height: `${c.height}px`
2674
2677
  },
2675
- children: /* @__PURE__ */ s(Ee, {})
2678
+ children: /* @__PURE__ */ a(De, {})
2676
2679
  }
2677
2680
  ) }),
2678
- /* @__PURE__ */ s("div", { className: Re["rp-thumbnail-text"], children: n })
2681
+ /* @__PURE__ */ a("div", { className: Me["rp-thumbnail-text"], children: n })
2679
2682
  ]
2680
2683
  }
2681
2684
  );
2682
2685
  }, Bt = {
2683
2686
  "rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
2684
2687
  "rp-thumbnails": "_rp-thumbnails_16vqr_1"
2685
- }, Ta = 16, Sa = (e, t) => {
2688
+ }, Ts = 16, Ps = (e, t) => {
2686
2689
  const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
2687
- e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Ta);
2688
- }, Pa = je((e, t) => {
2689
- const { show: n } = e, { focusedPage: r, totalPages: o } = ae(), { thumbnailPages: a, addPage: i, thumbnailLength: c, addToPage: l } = pn(), p = W(null), h = W(1);
2690
+ e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Ts);
2691
+ }, Ss = je((e, t) => {
2692
+ const { show: n } = e, { focusedPage: r, totalPages: o } = oe(), { thumbnailPages: s, addPage: i, thumbnailLength: c, addToPage: l } = dn(), p = W(null), h = W(1);
2690
2693
  Kt(t, () => p.current);
2691
- const m = z(() => Object.values(a), [a]), u = R(() => {
2694
+ const m = z(() => Object.values(s), [s]), u = R(() => {
2692
2695
  const g = c + 1;
2693
2696
  g <= o && i(g);
2694
2697
  }, [i, o, c]);
2695
2698
  return E(() => {
2696
- r > c ? l(r) : n && h.current !== r && (Sa(p.current, r), h.current = r);
2697
- }, [r, c, l, n, m]), cr(p.current, u), /* @__PURE__ */ s("div", { ref: p, className: Bt["rp-thumbnails-container"], children: /* @__PURE__ */ s("div", { className: Bt["rp-thumbnails"], children: n ? m.map((g, f) => {
2698
- var _, v;
2699
- return /* @__PURE__ */ s(
2700
- Ca,
2699
+ r > c ? l(r) : n && h.current !== r && (Ps(p.current, r), h.current = r);
2700
+ }, [r, c, l, n, m]), ir(p.current, u), /* @__PURE__ */ a("div", { ref: p, className: Bt["rp-thumbnails-container"], children: /* @__PURE__ */ a("div", { className: Bt["rp-thumbnails"], children: n ? m.map((g, f) => {
2701
+ var w, v;
2702
+ return /* @__PURE__ */ a(
2703
+ Cs,
2701
2704
  {
2702
- isFocused: r === ((_ = g.page) == null ? void 0 : _.pageNumber),
2705
+ isFocused: r === ((w = g.page) == null ? void 0 : w.pageNumber),
2703
2706
  pageNumber: (v = g.page) == null ? void 0 : v.pageNumber,
2704
2707
  thumbnailSrc: g.thumbnailSrc,
2705
2708
  loading: g.loading,
@@ -2708,13 +2711,13 @@ const _e = {
2708
2711
  f
2709
2712
  );
2710
2713
  }) : null }) });
2711
- }), Ia = () => {
2714
+ }), Is = () => {
2712
2715
  const { thumbnailIcon: e } = ce();
2713
- return e || /* @__PURE__ */ s(ir, {});
2714
- }, ya = () => {
2715
- const { active: e, setActive: t } = pn(), [n, r] = H(200), o = W(null), { thumbnailTool: a } = pe(), i = R(() => {
2716
+ return e || /* @__PURE__ */ a(ar, {});
2717
+ }, ys = () => {
2718
+ const { active: e, setActive: t } = dn(), [n, r] = H(200), o = W(null), { thumbnailTool: s } = fe(), i = R(() => {
2716
2719
  t((l) => !l);
2717
- }, []), c = z(() => typeof a != "boolean" && a ? /* @__PURE__ */ s(a, { onClick: i, active: e }) : a ? /* @__PURE__ */ s(re, { content: "Thumbnail", children: /* @__PURE__ */ s(Y, { onClick: i, active: e, children: /* @__PURE__ */ s(Ia, {}) }) }) : null, [a, e, i]);
2720
+ }, []), c = z(() => typeof s != "boolean" && s ? /* @__PURE__ */ a(s, { onClick: i, active: e }) : s ? /* @__PURE__ */ a(ne, { content: "Thumbnail", children: /* @__PURE__ */ a(Q, { onClick: i, active: e, children: /* @__PURE__ */ a(Is, {}) }) }) : null, [s, e, i]);
2718
2721
  return /* @__PURE__ */ O(
2719
2722
  "div",
2720
2723
  {
@@ -2722,37 +2725,37 @@ const _e = {
2722
2725
  className: ct["rp-sidebar-content-wrapper"],
2723
2726
  "data-rp": "sidebar",
2724
2727
  children: [
2725
- /* @__PURE__ */ s("div", { className: ct["rp-sidebar-content"], children: c }),
2728
+ /* @__PURE__ */ a("div", { className: ct["rp-sidebar-content"], children: c }),
2726
2729
  /* @__PURE__ */ O("div", { "data-rp": "thumbnailSidebar", hidden: !e, className: ct["rp-thumbnails-wrapper"], children: [
2727
- /* @__PURE__ */ s(Pa, { show: e, ref: o }),
2728
- /* @__PURE__ */ s(lr, { onWidthChange: r, thumbnailRef: o })
2730
+ /* @__PURE__ */ a(Ss, { show: e, ref: o }),
2731
+ /* @__PURE__ */ a(cr, { onWidthChange: r, thumbnailRef: o })
2729
2732
  ] })
2730
2733
  ]
2731
2734
  }
2732
2735
  );
2733
2736
  }, oi = je((e, t) => {
2734
- const { children: n, slots: r, icons: o, style: a, className: i, mobileWidth: c, onLoaded: l, cleanupOnLoaded: p } = e, [h, m] = H(null), { setContainer: u, setContentRef: g } = Me(), { loading: f } = J();
2737
+ const { children: n, slots: r, icons: o, style: s, className: i, mobileWidth: c, onLoaded: l, cleanupOnLoaded: p } = e, [h, m] = H(null), { setContainer: u, setContentRef: g } = be(), { loading: f } = Y();
2735
2738
  return E(() => (l && l(), () => {
2736
2739
  p && p();
2737
- }), [l, p]), /* @__PURE__ */ s("div", { ref: t, className: ne(Te["rp-theme-variables"], Te["rp-container"]), children: /* @__PURE__ */ s(fr, { mobileWidth: c, children: /* @__PURE__ */ s(ur, { slots: r, children: /* @__PURE__ */ s(dr, { icons: o, children: /* @__PURE__ */ O(
2738
- pr,
2740
+ }), [l, p]), /* @__PURE__ */ a("div", { ref: t, className: te(Ie["rp-theme-variables"], Ie["rp-container"]), children: /* @__PURE__ */ a(mr, { mobileWidth: c, children: /* @__PURE__ */ a(lr, { slots: r, children: /* @__PURE__ */ a(ur, { icons: o, children: /* @__PURE__ */ O(
2741
+ dr,
2739
2742
  {
2740
2743
  getContainerRef: u,
2741
2744
  toolbarRef: h,
2742
- style: a,
2745
+ style: s,
2743
2746
  className: i,
2744
2747
  children: [
2745
- /* @__PURE__ */ O(hr, { children: [
2746
- /* @__PURE__ */ O("div", { className: Te["rp-layout"], children: [
2747
- /* @__PURE__ */ s(ba, { ref: m }),
2748
- /* @__PURE__ */ O("div", { className: Te["rp-content"], children: [
2749
- /* @__PURE__ */ s("div", { className: Te["rp-sidebar"], children: /* @__PURE__ */ s(ya, {}) }),
2750
- /* @__PURE__ */ s("div", { ref: g, className: Te["rp-pages"], children: n })
2748
+ /* @__PURE__ */ O(pr, { children: [
2749
+ /* @__PURE__ */ O("div", { className: Ie["rp-layout"], children: [
2750
+ /* @__PURE__ */ a(bs, { ref: m }),
2751
+ /* @__PURE__ */ O("div", { className: Ie["rp-content"], children: [
2752
+ /* @__PURE__ */ a("div", { className: Ie["rp-sidebar"], children: /* @__PURE__ */ a(ys, {}) }),
2753
+ /* @__PURE__ */ a("div", { ref: g, className: Ie["rp-pages"], children: n })
2751
2754
  ] })
2752
2755
  ] }),
2753
- /* @__PURE__ */ s(mr, {})
2756
+ /* @__PURE__ */ a(hr, {})
2754
2757
  ] }),
2755
- f ? /* @__PURE__ */ s(
2758
+ f ? /* @__PURE__ */ a(
2756
2759
  "div",
2757
2760
  {
2758
2761
  style: {
@@ -2765,7 +2768,7 @@ const _e = {
2765
2768
  height: "100%",
2766
2769
  backgroundColor: "rgba(0, 0, 0, 0.2)"
2767
2770
  },
2768
- children: /* @__PURE__ */ s(
2771
+ children: /* @__PURE__ */ a(
2769
2772
  "div",
2770
2773
  {
2771
2774
  style: {
@@ -2775,7 +2778,7 @@ const _e = {
2775
2778
  height: "100%",
2776
2779
  width: "100%"
2777
2780
  },
2778
- children: /* @__PURE__ */ s(Ee, {})
2781
+ children: /* @__PURE__ */ a(De, {})
2779
2782
  }
2780
2783
  )
2781
2784
  }
@@ -2786,44 +2789,44 @@ const _e = {
2786
2789
  });
2787
2790
  export {
2788
2791
  co as A,
2789
- Ca as B,
2792
+ Cs as B,
2790
2793
  Qr as C,
2791
2794
  Lo as D,
2792
- Pa as E,
2793
- Fn as F,
2794
- ya as G,
2795
- wa as L,
2796
- la as M,
2797
- ua as O,
2798
- Js as P,
2795
+ Ss as E,
2796
+ zn as F,
2797
+ ys as G,
2798
+ ws as L,
2799
+ ls as M,
2800
+ us as O,
2801
+ Ja as P,
2799
2802
  ti as R,
2800
2803
  ei as S,
2801
- Qs as T,
2802
- ga as Z,
2803
- Ys as a,
2804
+ Qa as T,
2805
+ gs as Z,
2806
+ Ya as a,
2804
2807
  oi as b,
2805
- ta as c,
2808
+ ts as c,
2806
2809
  Ct as d,
2807
- mn as e,
2808
- cn as f,
2810
+ hn as e,
2811
+ an as f,
2809
2812
  Kr as g,
2810
- ln as h,
2813
+ cn as h,
2811
2814
  Xr as i,
2812
- un as j,
2815
+ ln as j,
2813
2816
  Jr as k,
2814
- dn as l,
2815
- pn as m,
2817
+ un as l,
2818
+ dn as m,
2816
2819
  Yr as n,
2817
- hn as o,
2820
+ pn as o,
2818
2821
  eo as p,
2819
2822
  Tt as q,
2820
2823
  yo as r,
2821
2824
  No as s,
2822
2825
  Do as t,
2823
- ae as u,
2826
+ oe as u,
2824
2827
  Jo as v,
2825
- Hn as w,
2826
- da as x,
2827
- va as y,
2828
- ba as z
2828
+ Wn as w,
2829
+ ds as x,
2830
+ vs as y,
2831
+ bs as z
2829
2832
  };