@pdf-viewer/react 1.9.1 → 1.9.2-rc.0

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