@pdf-viewer/react 1.4.0-beta.6 → 1.4.0-beta.8

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