@pdf-viewer/react 1.5.0-beta.13 → 1.5.0-beta.15

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