@pdf-viewer/react 1.8.0 → 1.8.1-rc.1

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