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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/dist/Combination-136ff99c.js +698 -0
  2. package/dist/MostPageTool.module-13578ad6.js +6 -0
  3. package/dist/OtherTool.module-a4be5f1f.js +6 -0
  4. package/dist/Paginate.module-4eef00aa.js +8 -0
  5. package/dist/PaginationContext-9217cab4.js +201 -0
  6. package/dist/RPLayout.module-b4b23e29.js +14 -0
  7. package/dist/RPSplitter-f6acf13b.js +71 -0
  8. package/dist/RPToolbar.module-27d7fe77.js +10 -0
  9. package/dist/SearchTool.module-99f60dc7.js +16 -0
  10. package/dist/ToolbarLayout.module-6e339802.js +12 -0
  11. package/dist/ZoomTool.module-7082af8c.js +12 -0
  12. package/dist/assets/style.css +1 -1
  13. package/dist/assets/style.js +32 -30
  14. package/dist/components/RPController.js +81 -152
  15. package/dist/components/RPDropFileZone.js +1 -1
  16. package/dist/components/RPPages.js +1028 -122
  17. package/dist/components/RPProvider.js +57 -113
  18. package/dist/components/icons/DualPageWithCoverIcon.js +22 -0
  19. package/dist/components/layout/LayoutContainer.js +31 -136
  20. package/dist/components/layout/LayoutWrapper.js +8 -4
  21. package/dist/components/layout/RPDefaultLayout.js +184 -86
  22. package/dist/components/layout/RPLayout.js +123 -105
  23. package/dist/components/layout/SkipLink.js +29 -0
  24. package/dist/components/layout/WrapperLayout.js +1 -1
  25. package/dist/components/layout/sidebar/RPSidebar.js +79 -112
  26. package/dist/components/layout/sidebar/RPSplitter.js +6 -59
  27. package/dist/components/layout/sidebar/Thumbnail.js +130 -125
  28. package/dist/components/layout/sidebar/Thumbnails.js +56 -119
  29. package/dist/components/layout/toolbar/DarkModeTool.js +7 -5
  30. package/dist/components/layout/toolbar/DocumentDialog.js +305 -131
  31. package/dist/components/layout/toolbar/DocumentProperties.js +13 -10
  32. package/dist/components/layout/toolbar/FileDownloadTool.js +34 -124
  33. package/dist/components/layout/toolbar/FileUploadTool.js +9 -6
  34. package/dist/components/layout/toolbar/FullScreenTool.js +17 -14
  35. package/dist/components/layout/toolbar/MenuItem.js +11 -8
  36. package/dist/components/layout/toolbar/MenuSeparator.js +8 -5
  37. package/dist/components/layout/toolbar/MostPageTool.js +66 -125
  38. package/dist/components/layout/toolbar/OtherTool.js +171 -112
  39. package/dist/components/layout/toolbar/Paginate.js +121 -116
  40. package/dist/components/layout/toolbar/PrintTool.js +55 -123
  41. package/dist/components/layout/toolbar/RPMenuItem.js +14 -11
  42. package/dist/components/layout/toolbar/RPMoreOptions.js +102 -154
  43. package/dist/components/layout/toolbar/RPToolbar.js +90 -79
  44. package/dist/components/layout/toolbar/RPToolbarEnd.js +69 -88
  45. package/dist/components/layout/toolbar/RotateTool.js +13 -10
  46. package/dist/components/layout/toolbar/ScrollModeTool.js +42 -39
  47. package/dist/components/layout/toolbar/SearchCloseButton.js +24 -10
  48. package/dist/components/layout/toolbar/SearchResultNavigator.js +74 -105
  49. package/dist/components/layout/toolbar/SearchTool.js +245 -121
  50. package/dist/components/layout/toolbar/SelectionModeTool.js +9 -6
  51. package/dist/components/layout/toolbar/ThumbnailTool.js +15 -122
  52. package/dist/components/layout/toolbar/ToolbarCustom.js +75 -143
  53. package/dist/components/layout/toolbar/ToolbarDefault.js +135 -122
  54. package/dist/components/layout/toolbar/ToolbarLayout.js +86 -81
  55. package/dist/components/layout/toolbar/ViewModeTool.js +47 -35
  56. package/dist/components/layout/toolbar/ZoomTool.js +129 -119
  57. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +18 -122
  58. package/dist/components/layout/toolbar/tools/DualPageTool.js +11 -129
  59. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +202 -0
  60. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +14 -123
  61. package/dist/components/layout/toolbar/tools/FileUploadTool.js +10 -8
  62. package/dist/components/layout/toolbar/tools/FirstPageTool.js +197 -0
  63. package/dist/components/layout/toolbar/tools/FullScreenTool.js +21 -18
  64. package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +37 -0
  65. package/dist/components/layout/toolbar/tools/InputPageTool.js +52 -136
  66. package/dist/components/layout/toolbar/tools/LastPageTool.js +197 -0
  67. package/dist/components/layout/toolbar/tools/NextPageTool.js +39 -129
  68. package/dist/components/layout/toolbar/tools/PageScrollingTool.js +37 -0
  69. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +28 -118
  70. package/dist/components/layout/toolbar/tools/PrintTool.js +14 -123
  71. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +18 -9
  72. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +15 -13
  73. package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +24 -14
  74. package/dist/components/layout/toolbar/tools/SinglePageTool.js +11 -129
  75. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +16 -6
  76. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +23 -131
  77. package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +37 -0
  78. package/dist/components/layout/toolbar/tools/ZoomInTool.js +21 -18
  79. package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +23 -136
  80. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +80 -141
  81. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +18 -15
  82. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +98 -105
  83. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +16 -123
  84. package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +17 -14
  85. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +29 -127
  86. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +31 -130
  87. package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +28 -17
  88. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +63 -134
  89. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +33 -131
  90. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +41 -24
  91. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +58 -37
  92. package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +44 -25
  93. package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +56 -30
  94. package/dist/components/page/AnnotationLayer.js +130 -125
  95. package/dist/components/page/CanvasLayer.js +57 -126
  96. package/dist/components/page/CustomElement.js +1 -1
  97. package/dist/components/page/DualPage.js +69 -110
  98. package/dist/components/page/DualPageWithCover.js +131 -0
  99. package/dist/components/page/RPPage.js +126 -123
  100. package/dist/components/page/SinglePage.js +59 -110
  101. package/dist/components/page/TextHighlightLayer.js +187 -129
  102. package/dist/components/page/TextLayer.js +186 -125
  103. package/dist/components/ui/Button.js +14 -12
  104. package/dist/components/ui/Checkbox.js +78 -70
  105. package/dist/components/ui/DropDown.js +11 -8
  106. package/dist/components/ui/Input.js +12 -11
  107. package/dist/components/ui/LoadingIndicator.js +34 -127
  108. package/dist/components/ui/PasswordModal.js +44 -30
  109. package/dist/components/ui/RPTooltip.js +121 -135
  110. package/dist/contexts/DimensionPagesContext.js +1 -1
  111. package/dist/contexts/DropFileZoneContext.js +1 -1
  112. package/dist/contexts/ElementPageContext.js +1 -1
  113. package/dist/contexts/EventCallbackContext.js +12 -8
  114. package/dist/contexts/FileInputContext.js +1 -1
  115. package/dist/contexts/HighlightContext.js +1 -1
  116. package/dist/contexts/LocalizationContext.js +1 -1
  117. package/dist/contexts/PagesRotateContext.js +1 -1
  118. package/dist/contexts/PaginationContext.js +15 -118
  119. package/dist/contexts/PrintContext.js +67 -131
  120. package/dist/contexts/RPDocumentContext.js +1 -1
  121. package/dist/contexts/RenderQueueProvider.js +48 -118
  122. package/dist/contexts/RotationContext.js +1 -1
  123. package/dist/contexts/ScrollModeContext.js +1 -1
  124. package/dist/contexts/SearchContext.js +66 -112
  125. package/dist/contexts/SelectionModeContext.js +1 -1
  126. package/dist/contexts/ThumbnailsContext.js +32 -131
  127. package/dist/contexts/ViewModeContext.js +19 -15
  128. package/dist/contexts/ZoomContext.js +1 -1
  129. package/dist/de_DE-a553b162.js +489 -0
  130. package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
  131. package/dist/index-61f59539.js +1198 -0
  132. package/dist/index-655864a7.js +27 -0
  133. package/dist/{index-c9a2990a.js → index-c0faa594.js} +64 -87
  134. package/dist/index-e3ee9457.js +150 -0
  135. package/dist/main.js +193 -130
  136. package/dist/types/components/icons/DualPageWithCoverIcon.d.ts +2 -0
  137. package/dist/types/components/layout/LayoutContainer.d.ts +1 -5
  138. package/dist/types/components/layout/LayoutWrapper.d.ts +1 -5
  139. package/dist/types/components/layout/SkipLink.d.ts +7 -0
  140. package/dist/types/components/layout/sidebar/Thumbnails.d.ts +1 -3
  141. package/dist/types/components/layout/toolbar/RPToolbar.d.ts +1 -3
  142. package/dist/types/components/layout/toolbar/tools/DualPageWithCoverTool.d.ts +3 -0
  143. package/dist/types/components/layout/toolbar/tools/FirstPageTool.d.ts +3 -0
  144. package/dist/types/components/layout/toolbar/tools/HorizontalScrollingTool.d.ts +3 -0
  145. package/dist/types/components/layout/toolbar/tools/LastPageTool.d.ts +3 -0
  146. package/dist/types/components/layout/toolbar/tools/PageScrollingTool.d.ts +3 -0
  147. package/dist/types/components/layout/toolbar/tools/VerticalScrollingTool.d.ts +3 -0
  148. package/dist/types/components/page/DualPageWithCover.d.ts +5 -0
  149. package/dist/types/components/page/RPPage.d.ts +1 -3
  150. package/dist/types/components/ui/Button.d.ts +1 -3
  151. package/dist/types/components/ui/Checkbox.d.ts +1 -0
  152. package/dist/types/components/ui/Input.d.ts +1 -3
  153. package/dist/types/components/ui/RPTooltip.d.ts +1 -3
  154. package/dist/types/locales/de_DE.json.d.ts +83 -0
  155. package/dist/types/locales/en_US.json.d.ts +2 -0
  156. package/dist/types/locales/it_IT.json.d.ts +2 -0
  157. package/dist/types/locales/pt_PT.json.d.ts +2 -0
  158. package/dist/types/locales/th_TH.json.d.ts +2 -0
  159. package/dist/types/locales/zh_CN.json.d.ts +2 -0
  160. package/dist/types/main.d.ts +8 -2
  161. package/dist/types/utils/annotations.d.ts +10 -1
  162. package/dist/types/utils/calculatePage.d.ts +3 -3
  163. package/dist/types/utils/hooks/usePresentPage.d.ts +2 -1
  164. package/dist/types/utils/hooks/useTextSelection.d.ts +7 -0
  165. package/dist/types/utils/types.d.ts +34 -3
  166. package/dist/types/utils/withRef.d.ts +5 -4
  167. package/dist/utils/annotations.js +145 -150
  168. package/dist/utils/calculatePage.js +17 -11
  169. package/dist/utils/getZoomLevel.js +9 -9
  170. package/dist/utils/highlight.js +139 -139
  171. package/dist/utils/hooks/useFileDownload.js +23 -130
  172. package/dist/utils/hooks/useLicense.js +1 -1
  173. package/dist/utils/hooks/useLoadPdf.js +1 -1
  174. package/dist/utils/hooks/useLocalization.js +12 -11
  175. package/dist/utils/hooks/usePageRotateContext.js +1 -1
  176. package/dist/utils/hooks/usePaginate.js +23 -126
  177. package/dist/utils/hooks/usePinch.js +1 -1
  178. package/dist/utils/hooks/usePresentPage.js +79 -129
  179. package/dist/utils/hooks/usePrint.js +175 -130
  180. package/dist/utils/hooks/useRotate.js +1 -1
  181. package/dist/utils/hooks/useScrollToPage.js +18 -121
  182. package/dist/utils/hooks/useSearch.js +149 -127
  183. package/dist/utils/hooks/useTextSelection.js +76 -0
  184. package/dist/utils/hooks/useThumbnail.js +50 -131
  185. package/dist/utils/hooks/useVirtualReactWindow.js +84 -128
  186. package/dist/utils/types.js +14 -13
  187. package/dist/utils/withRef.js +5 -5
  188. package/package.json +5 -4
  189. package/dist/LayoutWrapper-6224491f.js +0 -19
  190. package/dist/SearchCloseButton-08d57275.js +0 -33
  191. package/dist/ToolbarLayout.module-8d56d12b.js +0 -3560
  192. package/dist/floating-ui.react-dom-d22a10b4.js +0 -1474
  193. package/dist/index-3bf64864.js +0 -1886
  194. package/dist/th_TH-d627cd51.js +0 -398
@@ -1,140 +1,1046 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import { R as Dr } from "../ToolbarLayout.module-8d56d12b.js";
4
- import "../contexts/VirtualScrollContext.js";
5
- import "../contexts/RPDocumentContext.js";
6
- import "../contexts/DocumentPasswordContext.js";
7
- import "../contexts/DarkModeContext.js";
8
- import "../utils/types.js";
9
- import "../contexts/RotationContext.js";
10
- import "../contexts/LayerContext.js";
1
+ import { jsx as y, jsxs as we, Fragment as at } from "react/jsx-runtime";
2
+ import { createElement as ue, PureComponent as lt, Component as ct, memo as ut, useRef as B, useMemo as Ce, useCallback as se, useEffect as te } from "react";
3
+ import { RPPage as Se } from "./page/RPPage.js";
4
+ import { useVirtualReactWindow as dt } from "../utils/hooks/useVirtualReactWindow.js";
5
+ import { useVirtualScrollContext as ft } from "../contexts/VirtualScrollContext.js";
6
+ import { a as mt, u as pt } from "../PaginationContext-9217cab4.js";
7
+ import { useDocumentContext as ht } from "../contexts/RPDocumentContext.js";
8
+ import { useViewModeContext as gt } from "../contexts/ViewModeContext.js";
9
+ import { useScrollModeContext as vt } from "../contexts/ScrollModeContext.js";
10
+ import { SelectionMode as _t, ViewMode as Ie, ScrollMode as Te, ErrorType as wt } from "../utils/types.js";
11
+ import { useFullScreenContext as Ct } from "../contexts/FullScreenContext.js";
12
+ import { c as ce } from "../clsx-0c6e471a.js";
13
+ import { DualPage as St } from "./page/DualPage.js";
14
+ import { DualPageWithCover as It } from "./page/DualPageWithCover.js";
15
+ import { SinglePage as Tt } from "./page/SinglePage.js";
16
+ import { useMousePressed as Rt } from "../utils/hooks/useMousePressed.js";
17
+ import { useSelectionModeContext as xt } from "../contexts/SelectionModeContext.js";
18
+ import { useGrabScroll as yt } from "../utils/hooks/useGrabScroll.js";
19
+ import { usePinch as bt } from "../utils/hooks/usePinch.js";
20
+ import { useInitialStateContext as zt } from "../contexts/InitialStateContext.js";
21
+ import { useLayoutContainer as Lt } from "../contexts/LayoutContainerContext.js";
22
+ import { useDebounce as Mt } from "../utils/hooks/useDebounce.js";
23
+ import { useLoaderContext as Et } from "../contexts/LoaderContext.js";
24
+ import Ot from "./ui/PasswordModal.js";
25
+ import { usePresentPage as Wt } from "../utils/hooks/usePresentPage.js";
26
+ import { getPageFromPosition as At } from "../utils/calculatePage.js";
27
+ import { useDocumentPasswordContext as Nt } from "../contexts/DocumentPasswordContext.js";
28
+ import { LayoutContainer as Pt } from "./layout/LayoutContainer.js";
29
+ import { LayoutWrapper as Ft } from "./layout/LayoutWrapper.js";
30
+ import { useEventCallbackContext as Dt } from "../contexts/EventCallbackContext.js";
31
+ import { useCopyText as Ht } from "../utils/hooks/useCopyText.js";
32
+ import { useTextSelection as kt } from "../utils/hooks/useTextSelection.js";
33
+ import { OutputScale as Ut } from "pdfjs-dist";
34
+ import { approximateFraction as Ne } from "../utils/approximateFragtion.js";
35
+ import "./page/CanvasLayer.js";
11
36
  import "../contexts/ZoomContext.js";
12
- import "../contexts/ViewModeContext.js";
13
- import "../contexts/ScrollModeContext.js";
37
+ import "../utils/appConsole.js";
38
+ import "../utils/constants.js";
39
+ import "../utils/getZoomLevel.js";
40
+ import "../de_DE-a553b162.js";
41
+ import "../contexts/RotationContext.js";
42
+ import "../utils/hooks/useLoadPdf.js";
43
+ import "../utils/getThumbnailViewport.js";
44
+ import "../contexts/ConfigContext.js";
45
+ import "../utils/hooks/usePdfProperties.js";
46
+ import "../utils/convertPdfDate.js";
47
+ import "../utils/formatFileSize.js";
48
+ import "../contexts/GlobalCurrentPage.js";
49
+ import "../contexts/PagesRotateContext.js";
50
+ import "../contexts/RenderQueueProvider.js";
51
+ import "../utils/Queue.js";
52
+ import "../utils/renderPage.js";
14
53
  import "../contexts/VirtualGridContext.js";
15
- import "../contexts/SelectionModeContext.js";
16
- import "../contexts/InitialStateContext.js";
17
- import "../contexts/FullScreenContext.js";
18
- import "../contexts/FileInputContext.js";
19
- import "../contexts/DropFileZoneContext.js";
20
- import "../contexts/LayoutContainerContext.js";
54
+ import "../utils/smoothScrollTo.js";
21
55
  import "../contexts/DimensionPagesContext.js";
22
- import "../contexts/LocalizationContext.js";
23
- import "../contexts/HighlightContext.js";
24
- import "../contexts/LicenseContext.js";
25
- import "../contexts/DownloadContext.js";
26
56
  import "../contexts/SmoothScrollContext.js";
27
- import "../contexts/ElementPageContext.js";
28
- import "../contexts/PagesRotateContext.js";
29
- import "../contexts/GlobalCurrentPage.js";
30
- import "../contexts/LoaderContext.js";
31
- import "../contexts/ToolComponentContext.js";
32
- import "../contexts/IconToolContext.js";
33
- import "../contexts/OtherToolContext.js";
34
- import "../contexts/EventCallbackContext.js";
35
- import "../contexts/ThemeContext.js";
36
- import "../contexts/ConfigContext.js";
37
- import "pdfjs-dist";
38
- import "../clsx-0c6e471a.js";
39
- import "./layout/Container.js";
40
- import "../contexts/ViewportContext.js";
41
- import "../contexts/ToolbarComponentContext.js";
42
- import "./layout/sidebar/RPSplitter.js";
43
- import "./layout/WrapperLayout.js";
44
- import "./RPDropFileZone.js";
45
- import "../LayoutWrapper-6224491f.js";
46
- import "./ui/Button.js";
47
- import "../SearchCloseButton-08d57275.js";
48
- import "./ui/Input.js";
49
- import "./ui/Checkbox.js";
50
- import "./icons/LoaderIcon.js";
51
- import "../contexts/IconContext.js";
52
- import "./ui/RPTooltip.js";
53
- import "./ui/DropDown.js";
54
- import "./layout/toolbar/MenuItem.js";
55
- import "./layout/toolbar/MenuSeparator.js";
56
- import "../utils/dateFormatter.js";
57
- import "./layout/toolbar/PropertyItem.js";
58
- import "../RotateTool.module-67946714.js";
59
- import "../utils/hooks/useMousePressed.js";
60
- import "../utils/hooks/useGrabScroll.js";
61
- import "../utils/hooks/usePinch.js";
62
- import "../utils/hooks/useDebounce.js";
63
- import "./ui/PasswordModal.js";
64
- import "../utils/calculatePage.js";
65
- import "../utils/approximateFragtion.js";
66
- import "../utils/hooks/useCopyText.js";
67
- import "./icons/ChevronUpIcon.js";
57
+ import "../utils/getScrollDistance.js";
58
+ import "./page/TextLayer.js";
68
59
  import "../utils/highlight.js";
69
60
  import "../utils/charators.js";
70
- import "../utils/Queue.js";
71
- import "../utils/renderPage.js";
72
- import "./icons/Thumbnail.js";
73
- import "../utils/withRef.js";
74
- import "../utils/hooks/useInfiniteScroll.js";
75
- import "../utils/constants.js";
61
+ import "../contexts/SearchContext.js";
62
+ import "../utils/hooks/useSearch.js";
63
+ import "../utils/getWordPositionInPage.js";
64
+ import "./page/AnnotationLayer.js";
65
+ import "../contexts/PrintContext.js";
66
+ import "../utils/hooks/usePrint.js";
76
67
  import "../utils/link_service.js";
77
68
  import "../utils/annotations.js";
78
69
  import "../utils/sanitizeExternalUrl.js";
79
- import "../th_TH-d627cd51.js";
70
+ import "../utils/dateFormatter.js";
71
+ import "../utils/hooks/useFileDownload.js";
72
+ import "../contexts/DownloadContext.js";
73
+ import "../contexts/LayerContext.js";
74
+ import "./page/TextHighlightLayer.js";
75
+ import "../contexts/HighlightContext.js";
76
+ import "../utils/hooks/useHighlight.js";
80
77
  import "./page/searchHighlight.js";
81
78
  import "../utils/const.js";
82
79
  import "./page/CustomElement.js";
83
- import "../utils/appConsole.js";
84
- import "../utils/hooks/useLoadPdf.js";
85
- import "../utils/getThumbnailViewport.js";
86
- import "../utils/hooks/usePdfProperties.js";
87
- import "../utils/convertPdfDate.js";
88
- import "../utils/formatFileSize.js";
89
- import "../utils/getZoomLevel.js";
80
+ import "../contexts/ElementPageContext.js";
81
+ import "../contexts/LicenseContext.js";
90
82
  import "../utils/hooks/useLicense.js";
91
- import "../utils/getScrollDistance.js";
92
83
  import "../utils/getElementPositionInPage.js";
93
- import "../utils/getWordPositionInPage.js";
94
- import "../utils/smoothScrollTo.js";
95
- import "./layout/toolbar/FileUploadTool.js";
96
- import "./icons/FileUploadDefaultIcon.js";
97
- import "../index-3bf64864.js";
98
- import "../index-c9a2990a.js";
99
- import "react-dom";
100
- import "../floating-ui.react-dom-d22a10b4.js";
84
+ import "../utils/withRef.js";
85
+ import "./icons/LoaderIcon.js";
86
+ import "../utils/hooks/useFullScreen.js";
87
+ import "../contexts/LocalizationContext.js";
101
88
  import "../utils/hooks/useLocalization.js";
102
- import "./layout/toolbar/DarkModeTool.js";
103
- import "./icons/MoonIcon.js";
104
- import "./icons/SunIcon.js";
89
+ import "../RPLayout.module-b4b23e29.js";
90
+ import "../contexts/ThemeContext.js";
91
+ import "../contexts/DarkModeContext.js";
105
92
  import "../utils/hooks/useDarkMode.js";
106
- import "./icons/ThreeDotIcon.js";
107
- import "./icons/CloseIcon.js";
108
- import "./layout/toolbar/DocumentProperties.js";
109
- import "./icons/InfoIcon.js";
110
- import "./layout/toolbar/RotateTool.js";
111
- import "./icons/ClockwiseIcon.js";
112
- import "../utils/hooks/useRotate.js";
113
- import "./layout/toolbar/ViewModeTool.js";
114
- import "./icons/DualPageIcon.js";
115
- import "./icons/SinglePageIcon.js";
116
- import "./icons/CheckIcon.js";
117
- import "./layout/toolbar/ScrollModeTool.js";
118
- import "./icons/PageScrollingIcon.js";
119
- import "./icons/VerticalScrollingIcon.js";
120
- import "./icons/HorizontalScrollingIcon.js";
121
- import "./icons/FileDownloadDefaultIcon.js";
122
- import "./icons/PrintDefaultIcon.js";
123
- import "./layout/toolbar/FullScreenTool.js";
124
- import "./icons/FullScreenIcon.js";
125
- import "../utils/hooks/useFullScreen.js";
126
- import "./icons/GoToDownIcon.js";
127
- import "./layout/toolbar/SelectionModeTool.js";
128
- import "./icons/TextSelectionDefaultIcon.js";
129
- import "./icons/HandModeDefaultIcon.js";
130
- import "./icons/ZoomInIcon.js";
131
- import "./icons/ZoomOutIcon.js";
132
- import "../utils/zoom.js";
133
- import "./icons/SearchIcon.js";
134
- import "./icons/ClearIcon.js";
135
- import "../utils/hooks/useHighlight.js";
136
- import "./icons/LightPdfIcon.js";
137
- import "./icons/DarkPdfIcon.js";
93
+ const V = {
94
+ "rp-pages": "_rp-pages_u7m2r_1",
95
+ "rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_u7m2r_6",
96
+ "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_u7m2r_11",
97
+ "rp-pages-container": "_rp-pages-container_u7m2r_15",
98
+ "rp-viewer": "_rp-viewer_u7m2r_57",
99
+ "rp-cursor-grab": "_rp-cursor-grab_u7m2r_62",
100
+ "rp-cursor-grabbing": "_rp-cursor-grabbing_u7m2r_70",
101
+ "rp-loader": "_rp-loader_u7m2r_78",
102
+ "rp-not-supported": "_rp-not-supported_u7m2r_86",
103
+ "rp-not-supported-content": "_rp-not-supported-content_u7m2r_102"
104
+ };
105
+ function ze() {
106
+ return ze = Object.assign ? Object.assign.bind() : function(n) {
107
+ for (var e = 1; e < arguments.length; e++) {
108
+ var t = arguments[e];
109
+ for (var r in t)
110
+ ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
111
+ }
112
+ return n;
113
+ }, ze.apply(null, arguments);
114
+ }
115
+ function Pe(n) {
116
+ if (n === void 0)
117
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
118
+ return n;
119
+ }
120
+ function Le(n, e) {
121
+ return Le = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
122
+ return t.__proto__ = r, t;
123
+ }, Le(n, e);
124
+ }
125
+ function Vt(n, e) {
126
+ n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Le(n, e);
127
+ }
128
+ var Fe = Number.isNaN || function(e) {
129
+ return typeof e == "number" && e !== e;
130
+ };
131
+ function qt(n, e) {
132
+ return !!(n === e || Fe(n) && Fe(e));
133
+ }
134
+ function Gt(n, e) {
135
+ if (n.length !== e.length)
136
+ return !1;
137
+ for (var t = 0; t < n.length; t++)
138
+ if (!qt(n[t], e[t]))
139
+ return !1;
140
+ return !0;
141
+ }
142
+ function Re(n, e) {
143
+ e === void 0 && (e = Gt);
144
+ var t, r = [], i, l = !1;
145
+ function a() {
146
+ for (var c = [], d = 0; d < arguments.length; d++)
147
+ c[d] = arguments[d];
148
+ return l && t === this && e(c, r) || (i = n.apply(this, c), l = !0, t = this, r = c), i;
149
+ }
150
+ return a;
151
+ }
152
+ function De(n, e) {
153
+ if (n == null)
154
+ return {};
155
+ var t = {};
156
+ for (var r in n)
157
+ if ({}.hasOwnProperty.call(n, r)) {
158
+ if (e.indexOf(r) !== -1)
159
+ continue;
160
+ t[r] = n[r];
161
+ }
162
+ return t;
163
+ }
164
+ var $t = typeof performance == "object" && typeof performance.now == "function", He = $t ? function() {
165
+ return performance.now();
166
+ } : function() {
167
+ return Date.now();
168
+ };
169
+ function ke(n) {
170
+ cancelAnimationFrame(n.id);
171
+ }
172
+ function jt(n, e) {
173
+ var t = He();
174
+ function r() {
175
+ He() - t >= e ? n.call(null) : i.id = requestAnimationFrame(r);
176
+ }
177
+ var i = {
178
+ id: requestAnimationFrame(r)
179
+ };
180
+ return i;
181
+ }
182
+ var xe = -1;
183
+ function Bt(n) {
184
+ if (n === void 0 && (n = !1), xe === -1 || n) {
185
+ var e = document.createElement("div"), t = e.style;
186
+ t.width = "50px", t.height = "50px", t.overflow = "scroll", document.body.appendChild(e), xe = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
187
+ }
188
+ return xe;
189
+ }
190
+ var ne = null;
191
+ function Ue(n) {
192
+ if (n === void 0 && (n = !1), ne === null || n) {
193
+ var e = document.createElement("div"), t = e.style;
194
+ t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
195
+ var r = document.createElement("div"), i = r.style;
196
+ return i.width = "100px", i.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? ne = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? ne = "negative" : ne = "positive-ascending"), document.body.removeChild(e), ne;
197
+ }
198
+ return ne;
199
+ }
200
+ var Kt = 150, Zt = function(e) {
201
+ var t = e.columnIndex;
202
+ e.data;
203
+ var r = e.rowIndex;
204
+ return r + ":" + t;
205
+ }, de = null, fe = null, me = null;
206
+ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (de = /* @__PURE__ */ new WeakSet(), fe = /* @__PURE__ */ new WeakSet(), me = /* @__PURE__ */ new WeakSet());
207
+ function Jt(n) {
208
+ var e, t = n.getColumnOffset, r = n.getColumnStartIndexForOffset, i = n.getColumnStopIndexForStartIndex, l = n.getColumnWidth, a = n.getEstimatedTotalHeight, c = n.getEstimatedTotalWidth, d = n.getOffsetForColumnAndAlignment, v = n.getOffsetForRowAndAlignment, g = n.getRowHeight, S = n.getRowOffset, s = n.getRowStartIndexForOffset, h = n.getRowStopIndexForStartIndex, W = n.initInstanceProps, _ = n.shouldResetStyleCacheOnItemSizeChange, N = n.validateProps;
209
+ return e = /* @__PURE__ */ function(b) {
210
+ Vt(T, b);
211
+ function T(A) {
212
+ var o;
213
+ return o = b.call(this, A) || this, o._instanceProps = W(o.props, Pe(o)), o._resetIsScrollingTimeoutId = null, o._outerRef = void 0, o.state = {
214
+ instance: Pe(o),
215
+ isScrolling: !1,
216
+ horizontalScrollDirection: "forward",
217
+ scrollLeft: typeof o.props.initialScrollLeft == "number" ? o.props.initialScrollLeft : 0,
218
+ scrollTop: typeof o.props.initialScrollTop == "number" ? o.props.initialScrollTop : 0,
219
+ scrollUpdateWasRequested: !1,
220
+ verticalScrollDirection: "forward"
221
+ }, o._callOnItemsRendered = void 0, o._callOnItemsRendered = Re(function(f, u, m, w, p, R, L, O) {
222
+ return o.props.onItemsRendered({
223
+ overscanColumnStartIndex: f,
224
+ overscanColumnStopIndex: u,
225
+ overscanRowStartIndex: m,
226
+ overscanRowStopIndex: w,
227
+ visibleColumnStartIndex: p,
228
+ visibleColumnStopIndex: R,
229
+ visibleRowStartIndex: L,
230
+ visibleRowStopIndex: O
231
+ });
232
+ }), o._callOnScroll = void 0, o._callOnScroll = Re(function(f, u, m, w, p) {
233
+ return o.props.onScroll({
234
+ horizontalScrollDirection: m,
235
+ scrollLeft: f,
236
+ scrollTop: u,
237
+ verticalScrollDirection: w,
238
+ scrollUpdateWasRequested: p
239
+ });
240
+ }), o._getItemStyle = void 0, o._getItemStyle = function(f, u) {
241
+ var m = o.props, w = m.columnWidth, p = m.direction, R = m.rowHeight, L = o._getItemStyleCache(_ && w, _ && p, _ && R), O = f + ":" + u, x;
242
+ if (L.hasOwnProperty(O))
243
+ x = L[O];
244
+ else {
245
+ var M = t(o.props, u, o._instanceProps), I = p === "rtl";
246
+ L[O] = x = {
247
+ position: "absolute",
248
+ left: I ? void 0 : M,
249
+ right: I ? M : void 0,
250
+ top: S(o.props, f, o._instanceProps),
251
+ height: g(o.props, f, o._instanceProps),
252
+ width: l(o.props, u, o._instanceProps)
253
+ };
254
+ }
255
+ return x;
256
+ }, o._getItemStyleCache = void 0, o._getItemStyleCache = Re(function(f, u, m) {
257
+ return {};
258
+ }), o._onScroll = function(f) {
259
+ var u = f.currentTarget, m = u.clientHeight, w = u.clientWidth, p = u.scrollLeft, R = u.scrollTop, L = u.scrollHeight, O = u.scrollWidth;
260
+ o.setState(function(x) {
261
+ if (x.scrollLeft === p && x.scrollTop === R)
262
+ return null;
263
+ var M = o.props.direction, I = p;
264
+ if (M === "rtl")
265
+ switch (Ue()) {
266
+ case "negative":
267
+ I = -p;
268
+ break;
269
+ case "positive-descending":
270
+ I = O - w - p;
271
+ break;
272
+ }
273
+ I = Math.max(0, Math.min(I, O - w));
274
+ var P = Math.max(0, Math.min(R, L - m));
275
+ return {
276
+ isScrolling: !0,
277
+ horizontalScrollDirection: x.scrollLeft < p ? "forward" : "backward",
278
+ scrollLeft: I,
279
+ scrollTop: P,
280
+ verticalScrollDirection: x.scrollTop < R ? "forward" : "backward",
281
+ scrollUpdateWasRequested: !1
282
+ };
283
+ }, o._resetIsScrollingDebounced);
284
+ }, o._outerRefSetter = function(f) {
285
+ var u = o.props.outerRef;
286
+ o._outerRef = f, typeof u == "function" ? u(f) : u != null && typeof u == "object" && u.hasOwnProperty("current") && (u.current = f);
287
+ }, o._resetIsScrollingDebounced = function() {
288
+ o._resetIsScrollingTimeoutId !== null && ke(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = jt(o._resetIsScrolling, Kt);
289
+ }, o._resetIsScrolling = function() {
290
+ o._resetIsScrollingTimeoutId = null, o.setState({
291
+ isScrolling: !1
292
+ }, function() {
293
+ o._getItemStyleCache(-1);
294
+ });
295
+ }, o;
296
+ }
297
+ T.getDerivedStateFromProps = function(o, f) {
298
+ return Qt(o, f), N(o), null;
299
+ };
300
+ var z = T.prototype;
301
+ return z.scrollTo = function(o) {
302
+ var f = o.scrollLeft, u = o.scrollTop;
303
+ f !== void 0 && (f = Math.max(0, f)), u !== void 0 && (u = Math.max(0, u)), this.setState(function(m) {
304
+ return f === void 0 && (f = m.scrollLeft), u === void 0 && (u = m.scrollTop), m.scrollLeft === f && m.scrollTop === u ? null : {
305
+ horizontalScrollDirection: m.scrollLeft < f ? "forward" : "backward",
306
+ scrollLeft: f,
307
+ scrollTop: u,
308
+ scrollUpdateWasRequested: !0,
309
+ verticalScrollDirection: m.scrollTop < u ? "forward" : "backward"
310
+ };
311
+ }, this._resetIsScrollingDebounced);
312
+ }, z.scrollToItem = function(o) {
313
+ var f = o.align, u = f === void 0 ? "auto" : f, m = o.columnIndex, w = o.rowIndex, p = this.props, R = p.columnCount, L = p.height, O = p.rowCount, x = p.width, M = this.state, I = M.scrollLeft, P = M.scrollTop, k = Bt();
314
+ m !== void 0 && (m = Math.max(0, Math.min(m, R - 1))), w !== void 0 && (w = Math.max(0, Math.min(w, O - 1)));
315
+ var F = a(this.props, this._instanceProps), H = c(this.props, this._instanceProps), D = H > x ? k : 0, U = F > L ? k : 0;
316
+ this.scrollTo({
317
+ scrollLeft: m !== void 0 ? d(this.props, m, u, I, this._instanceProps, U) : I,
318
+ scrollTop: w !== void 0 ? v(this.props, w, u, P, this._instanceProps, D) : P
319
+ });
320
+ }, z.componentDidMount = function() {
321
+ var o = this.props, f = o.initialScrollLeft, u = o.initialScrollTop;
322
+ if (this._outerRef != null) {
323
+ var m = this._outerRef;
324
+ typeof f == "number" && (m.scrollLeft = f), typeof u == "number" && (m.scrollTop = u);
325
+ }
326
+ this._callPropsCallbacks();
327
+ }, z.componentDidUpdate = function() {
328
+ var o = this.props.direction, f = this.state, u = f.scrollLeft, m = f.scrollTop, w = f.scrollUpdateWasRequested;
329
+ if (w && this._outerRef != null) {
330
+ var p = this._outerRef;
331
+ if (o === "rtl")
332
+ switch (Ue()) {
333
+ case "negative":
334
+ p.scrollLeft = -u;
335
+ break;
336
+ case "positive-ascending":
337
+ p.scrollLeft = u;
338
+ break;
339
+ default:
340
+ var R = p.clientWidth, L = p.scrollWidth;
341
+ p.scrollLeft = L - R - u;
342
+ break;
343
+ }
344
+ else
345
+ p.scrollLeft = Math.max(0, u);
346
+ p.scrollTop = Math.max(0, m);
347
+ }
348
+ this._callPropsCallbacks();
349
+ }, z.componentWillUnmount = function() {
350
+ this._resetIsScrollingTimeoutId !== null && ke(this._resetIsScrollingTimeoutId);
351
+ }, z.render = function() {
352
+ var o = this.props, f = o.children, u = o.className, m = o.columnCount, w = o.direction, p = o.height, R = o.innerRef, L = o.innerElementType, O = o.innerTagName, x = o.itemData, M = o.itemKey, I = M === void 0 ? Zt : M, P = o.outerElementType, k = o.outerTagName, F = o.rowCount, H = o.style, D = o.useIsScrolling, U = o.width, re = this.state.isScrolling, Q = this._getHorizontalRangeToRender(), oe = Q[0], ae = Q[1], $ = this._getVerticalRangeToRender(), pe = $[0], X = $[1], Z = [];
353
+ if (m > 0 && F)
354
+ for (var G = pe; G <= X; G++)
355
+ for (var J = oe; J <= ae; J++)
356
+ Z.push(ue(f, {
357
+ columnIndex: J,
358
+ data: x,
359
+ isScrolling: D ? re : void 0,
360
+ key: I({
361
+ columnIndex: J,
362
+ data: x,
363
+ rowIndex: G
364
+ }),
365
+ rowIndex: G,
366
+ style: this._getItemStyle(G, J)
367
+ }));
368
+ var le = a(this.props, this._instanceProps), he = c(this.props, this._instanceProps);
369
+ return ue(P || k || "div", {
370
+ className: u,
371
+ onScroll: this._onScroll,
372
+ ref: this._outerRefSetter,
373
+ style: ze({
374
+ position: "relative",
375
+ height: p,
376
+ width: U,
377
+ overflow: "auto",
378
+ WebkitOverflowScrolling: "touch",
379
+ willChange: "transform",
380
+ direction: w
381
+ }, H)
382
+ }, ue(L || O || "div", {
383
+ children: Z,
384
+ ref: R,
385
+ style: {
386
+ height: le,
387
+ pointerEvents: re ? "none" : void 0,
388
+ width: he
389
+ }
390
+ }));
391
+ }, z._callPropsCallbacks = function() {
392
+ var o = this.props, f = o.columnCount, u = o.onItemsRendered, m = o.onScroll, w = o.rowCount;
393
+ if (typeof u == "function" && f > 0 && w > 0) {
394
+ var p = this._getHorizontalRangeToRender(), R = p[0], L = p[1], O = p[2], x = p[3], M = this._getVerticalRangeToRender(), I = M[0], P = M[1], k = M[2], F = M[3];
395
+ this._callOnItemsRendered(R, L, I, P, O, x, k, F);
396
+ }
397
+ if (typeof m == "function") {
398
+ var H = this.state, D = H.horizontalScrollDirection, U = H.scrollLeft, re = H.scrollTop, Q = H.scrollUpdateWasRequested, oe = H.verticalScrollDirection;
399
+ this._callOnScroll(U, re, D, oe, Q);
400
+ }
401
+ }, z._getHorizontalRangeToRender = function() {
402
+ var o = this.props, f = o.columnCount, u = o.overscanColumnCount, m = o.overscanColumnsCount, w = o.overscanCount, p = o.rowCount, R = this.state, L = R.horizontalScrollDirection, O = R.isScrolling, x = R.scrollLeft, M = u || m || w || 1;
403
+ if (f === 0 || p === 0)
404
+ return [0, 0, 0, 0];
405
+ var I = r(this.props, x, this._instanceProps), P = i(this.props, I, x, this._instanceProps), k = !O || L === "backward" ? Math.max(1, M) : 1, F = !O || L === "forward" ? Math.max(1, M) : 1;
406
+ return [Math.max(0, I - k), Math.max(0, Math.min(f - 1, P + F)), I, P];
407
+ }, z._getVerticalRangeToRender = function() {
408
+ var o = this.props, f = o.columnCount, u = o.overscanCount, m = o.overscanRowCount, w = o.overscanRowsCount, p = o.rowCount, R = this.state, L = R.isScrolling, O = R.verticalScrollDirection, x = R.scrollTop, M = m || w || u || 1;
409
+ if (f === 0 || p === 0)
410
+ return [0, 0, 0, 0];
411
+ var I = s(this.props, x, this._instanceProps), P = h(this.props, I, x, this._instanceProps), k = !L || O === "backward" ? Math.max(1, M) : 1, F = !L || O === "forward" ? Math.max(1, M) : 1;
412
+ return [Math.max(0, I - k), Math.max(0, Math.min(p - 1, P + F)), I, P];
413
+ }, T;
414
+ }(lt), e.defaultProps = {
415
+ direction: "ltr",
416
+ itemData: void 0,
417
+ useIsScrolling: !1
418
+ }, e;
419
+ }
420
+ var Qt = function(e, t) {
421
+ var r = e.children, i = e.direction, l = e.height, a = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, v = e.overscanCount, g = e.overscanRowsCount, S = e.width, s = t.instance;
422
+ if (process.env.NODE_ENV !== "production") {
423
+ if (typeof v == "number" && de && !de.has(s) && (de.add(s), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof g == "number") && fe && !fe.has(s) && (fe.add(s), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || c != null) && me && !me.has(s) && (me.add(s), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
424
+ throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
425
+ switch (i) {
426
+ case "ltr":
427
+ case "rtl":
428
+ break;
429
+ default:
430
+ throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + i + '" was specified.'));
431
+ }
432
+ if (typeof S != "number")
433
+ throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (S === null ? "null" : typeof S) + '" was specified.'));
434
+ if (typeof l != "number")
435
+ throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (l === null ? "null" : typeof l) + '" was specified.'));
436
+ }
437
+ }, Ve = 50, Ze = function(e, t) {
438
+ var r = e.rowCount, i = t.rowMetadataMap, l = t.estimatedRowHeight, a = t.lastMeasuredRowIndex, c = 0;
439
+ if (a >= r && (a = r - 1), a >= 0) {
440
+ var d = i[a];
441
+ c = d.offset + d.size;
442
+ }
443
+ var v = r - a - 1, g = v * l;
444
+ return c + g;
445
+ }, Je = function(e, t) {
446
+ var r = e.columnCount, i = t.columnMetadataMap, l = t.estimatedColumnWidth, a = t.lastMeasuredColumnIndex, c = 0;
447
+ if (a >= r && (a = r - 1), a >= 0) {
448
+ var d = i[a];
449
+ c = d.offset + d.size;
450
+ }
451
+ var v = r - a - 1, g = v * l;
452
+ return c + g;
453
+ }, K = function(e, t, r, i) {
454
+ var l, a, c;
455
+ if (e === "column" ? (l = i.columnMetadataMap, a = t.columnWidth, c = i.lastMeasuredColumnIndex) : (l = i.rowMetadataMap, a = t.rowHeight, c = i.lastMeasuredRowIndex), r > c) {
456
+ var d = 0;
457
+ if (c >= 0) {
458
+ var v = l[c];
459
+ d = v.offset + v.size;
460
+ }
461
+ for (var g = c + 1; g <= r; g++) {
462
+ var S = a(g);
463
+ l[g] = {
464
+ offset: d,
465
+ size: S
466
+ }, d += S;
467
+ }
468
+ e === "column" ? i.lastMeasuredColumnIndex = r : i.lastMeasuredRowIndex = r;
469
+ }
470
+ return l[r];
471
+ }, qe = function(e, t, r, i) {
472
+ var l, a;
473
+ e === "column" ? (l = r.columnMetadataMap, a = r.lastMeasuredColumnIndex) : (l = r.rowMetadataMap, a = r.lastMeasuredRowIndex);
474
+ var c = a > 0 ? l[a].offset : 0;
475
+ return c >= i ? Qe(e, t, r, a, 0, i) : Xt(e, t, r, Math.max(0, a), i);
476
+ }, Qe = function(e, t, r, i, l, a) {
477
+ for (; l <= i; ) {
478
+ var c = l + Math.floor((i - l) / 2), d = K(e, t, c, r).offset;
479
+ if (d === a)
480
+ return c;
481
+ d < a ? l = c + 1 : d > a && (i = c - 1);
482
+ }
483
+ return l > 0 ? l - 1 : 0;
484
+ }, Xt = function(e, t, r, i, l) {
485
+ for (var a = e === "column" ? t.columnCount : t.rowCount, c = 1; i < a && K(e, t, i, r).offset < l; )
486
+ i += c, c *= 2;
487
+ return Qe(e, t, r, Math.min(i, a - 1), Math.floor(i / 2), l);
488
+ }, Ge = function(e, t, r, i, l, a, c) {
489
+ var d = e === "column" ? t.width : t.height, v = K(e, t, r, a), g = e === "column" ? Je(t, a) : Ze(t, a), S = Math.max(0, Math.min(g - d, v.offset)), s = Math.max(0, v.offset - d + c + v.size);
490
+ switch (i === "smart" && (l >= s - d && l <= S + d ? i = "auto" : i = "center"), i) {
491
+ case "start":
492
+ return S;
493
+ case "end":
494
+ return s;
495
+ case "center":
496
+ return Math.round(s + (S - s) / 2);
497
+ case "auto":
498
+ default:
499
+ return l >= s && l <= S ? l : s > S || l < s ? s : S;
500
+ }
501
+ }, Yt = /* @__PURE__ */ Jt({
502
+ getColumnOffset: function(e, t, r) {
503
+ return K("column", e, t, r).offset;
504
+ },
505
+ getColumnStartIndexForOffset: function(e, t, r) {
506
+ return qe("column", e, r, t);
507
+ },
508
+ getColumnStopIndexForStartIndex: function(e, t, r, i) {
509
+ for (var l = e.columnCount, a = e.width, c = K("column", e, t, i), d = r + a, v = c.offset + c.size, g = t; g < l - 1 && v < d; )
510
+ g++, v += K("column", e, g, i).size;
511
+ return g;
512
+ },
513
+ getColumnWidth: function(e, t, r) {
514
+ return r.columnMetadataMap[t].size;
515
+ },
516
+ getEstimatedTotalHeight: Ze,
517
+ getEstimatedTotalWidth: Je,
518
+ getOffsetForColumnAndAlignment: function(e, t, r, i, l, a) {
519
+ return Ge("column", e, t, r, i, l, a);
520
+ },
521
+ getOffsetForRowAndAlignment: function(e, t, r, i, l, a) {
522
+ return Ge("row", e, t, r, i, l, a);
523
+ },
524
+ getRowOffset: function(e, t, r) {
525
+ return K("row", e, t, r).offset;
526
+ },
527
+ getRowHeight: function(e, t, r) {
528
+ return r.rowMetadataMap[t].size;
529
+ },
530
+ getRowStartIndexForOffset: function(e, t, r) {
531
+ return qe("row", e, r, t);
532
+ },
533
+ getRowStopIndexForStartIndex: function(e, t, r, i) {
534
+ for (var l = e.rowCount, a = e.height, c = K("row", e, t, i), d = r + a, v = c.offset + c.size, g = t; g < l - 1 && v < d; )
535
+ g++, v += K("row", e, g, i).size;
536
+ return g;
537
+ },
538
+ initInstanceProps: function(e, t) {
539
+ var r = e, i = r.estimatedColumnWidth, l = r.estimatedRowHeight, a = {
540
+ columnMetadataMap: {},
541
+ estimatedColumnWidth: i || Ve,
542
+ estimatedRowHeight: l || Ve,
543
+ lastMeasuredColumnIndex: -1,
544
+ lastMeasuredRowIndex: -1,
545
+ rowMetadataMap: {}
546
+ };
547
+ return t.resetAfterColumnIndex = function(c, d) {
548
+ d === void 0 && (d = !0), t.resetAfterIndices({
549
+ columnIndex: c,
550
+ shouldForceUpdate: d
551
+ });
552
+ }, t.resetAfterRowIndex = function(c, d) {
553
+ d === void 0 && (d = !0), t.resetAfterIndices({
554
+ rowIndex: c,
555
+ shouldForceUpdate: d
556
+ });
557
+ }, t.resetAfterIndices = function(c) {
558
+ var d = c.columnIndex, v = c.rowIndex, g = c.shouldForceUpdate, S = g === void 0 ? !0 : g;
559
+ typeof d == "number" && (a.lastMeasuredColumnIndex = Math.min(a.lastMeasuredColumnIndex, d - 1)), typeof v == "number" && (a.lastMeasuredRowIndex = Math.min(a.lastMeasuredRowIndex, v - 1)), t._getItemStyleCache(-1), S && t.forceUpdate();
560
+ }, a;
561
+ },
562
+ shouldResetStyleCacheOnItemSizeChange: !1,
563
+ validateProps: function(e) {
564
+ var t = e.columnWidth, r = e.rowHeight;
565
+ if (process.env.NODE_ENV !== "production") {
566
+ if (typeof t != "function")
567
+ throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (t === null ? "null" : typeof t) + '" was specified.'));
568
+ if (typeof r != "function")
569
+ throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
570
+ }
571
+ }
572
+ });
573
+ process.env.NODE_ENV;
574
+ function $e(n, e) {
575
+ for (var t in n)
576
+ if (!(t in e))
577
+ return !0;
578
+ for (var r in e)
579
+ if (n[r] !== e[r])
580
+ return !0;
581
+ return !1;
582
+ }
583
+ var er = ["style"], tr = ["style"];
584
+ function rr(n, e) {
585
+ var t = n.style, r = De(n, er), i = e.style, l = De(e, tr);
586
+ return !$e(t, i) && !$e(r, l);
587
+ }
588
+ let q;
589
+ typeof window < "u" ? q = window : typeof self < "u" ? q = self : q = global;
590
+ let Me = null, Ee = null;
591
+ const je = 20, ye = q.clearTimeout, Be = q.setTimeout, be = q.cancelAnimationFrame || q.mozCancelAnimationFrame || q.webkitCancelAnimationFrame, Ke = q.requestAnimationFrame || q.mozRequestAnimationFrame || q.webkitRequestAnimationFrame;
592
+ be == null || Ke == null ? (Me = ye, Ee = function(e) {
593
+ return Be(e, je);
594
+ }) : (Me = function([e, t]) {
595
+ be(e), ye(t);
596
+ }, Ee = function(e) {
597
+ const t = Ke(function() {
598
+ ye(r), e();
599
+ }), r = Be(function() {
600
+ be(t), e();
601
+ }, je);
602
+ return [t, r];
603
+ });
604
+ function or(n) {
605
+ let e, t, r, i, l, a, c;
606
+ const d = typeof document < "u" && document.attachEvent;
607
+ if (!d) {
608
+ a = function(b) {
609
+ const T = b.__resizeTriggers__, z = T.firstElementChild, A = T.lastElementChild, o = z.firstElementChild;
610
+ A.scrollLeft = A.scrollWidth, A.scrollTop = A.scrollHeight, o.style.width = z.offsetWidth + 1 + "px", o.style.height = z.offsetHeight + 1 + "px", z.scrollLeft = z.scrollWidth, z.scrollTop = z.scrollHeight;
611
+ }, l = function(b) {
612
+ return b.offsetWidth !== b.__resizeLast__.width || b.offsetHeight !== b.__resizeLast__.height;
613
+ }, c = function(b) {
614
+ if (b.target.className && typeof b.target.className.indexOf == "function" && b.target.className.indexOf("contract-trigger") < 0 && b.target.className.indexOf("expand-trigger") < 0)
615
+ return;
616
+ const T = this;
617
+ a(this), this.__resizeRAF__ && Me(this.__resizeRAF__), this.__resizeRAF__ = Ee(function() {
618
+ l(T) && (T.__resizeLast__.width = T.offsetWidth, T.__resizeLast__.height = T.offsetHeight, T.__resizeListeners__.forEach(function(o) {
619
+ o.call(T, b);
620
+ }));
621
+ });
622
+ };
623
+ let s = !1, h = "";
624
+ r = "animationstart";
625
+ const W = "Webkit Moz O ms".split(" ");
626
+ let _ = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), N = "";
627
+ {
628
+ const b = document.createElement("fakeelement");
629
+ if (b.style.animationName !== void 0 && (s = !0), s === !1) {
630
+ for (let T = 0; T < W.length; T++)
631
+ if (b.style[W[T] + "AnimationName"] !== void 0) {
632
+ N = W[T], h = "-" + N.toLowerCase() + "-", r = _[T], s = !0;
633
+ break;
634
+ }
635
+ }
636
+ }
637
+ t = "resizeanim", e = "@" + h + "keyframes " + t + " { from { opacity: 0; } to { opacity: 0; } } ", i = h + "animation: 1ms " + t + "; ";
638
+ }
639
+ const v = function(s) {
640
+ if (!s.getElementById("detectElementResize")) {
641
+ const h = (e || "") + ".resize-triggers { " + (i || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', W = s.head || s.getElementsByTagName("head")[0], _ = s.createElement("style");
642
+ _.id = "detectElementResize", _.type = "text/css", n != null && _.setAttribute("nonce", n), _.styleSheet ? _.styleSheet.cssText = h : _.appendChild(s.createTextNode(h)), W.appendChild(_);
643
+ }
644
+ };
645
+ return {
646
+ addResizeListener: function(s, h) {
647
+ if (d)
648
+ s.attachEvent("onresize", h);
649
+ else {
650
+ if (!s.__resizeTriggers__) {
651
+ const W = s.ownerDocument, _ = q.getComputedStyle(s);
652
+ _ && _.position === "static" && (s.style.position = "relative"), v(W), s.__resizeLast__ = {}, s.__resizeListeners__ = [], (s.__resizeTriggers__ = W.createElement("div")).className = "resize-triggers";
653
+ const N = W.createElement("div");
654
+ N.className = "expand-trigger", N.appendChild(W.createElement("div"));
655
+ const b = W.createElement("div");
656
+ b.className = "contract-trigger", s.__resizeTriggers__.appendChild(N), s.__resizeTriggers__.appendChild(b), s.appendChild(s.__resizeTriggers__), a(s), s.addEventListener("scroll", c, !0), r && (s.__resizeTriggers__.__animationListener__ = function(z) {
657
+ z.animationName === t && a(s);
658
+ }, s.__resizeTriggers__.addEventListener(r, s.__resizeTriggers__.__animationListener__));
659
+ }
660
+ s.__resizeListeners__.push(h);
661
+ }
662
+ },
663
+ removeResizeListener: function(s, h) {
664
+ if (d)
665
+ s.detachEvent("onresize", h);
666
+ else if (s.__resizeListeners__.splice(s.__resizeListeners__.indexOf(h), 1), !s.__resizeListeners__.length) {
667
+ s.removeEventListener("scroll", c, !0), s.__resizeTriggers__.__animationListener__ && (s.__resizeTriggers__.removeEventListener(r, s.__resizeTriggers__.__animationListener__), s.__resizeTriggers__.__animationListener__ = null);
668
+ try {
669
+ s.__resizeTriggers__ = !s.removeChild(s.__resizeTriggers__);
670
+ } catch {
671
+ }
672
+ }
673
+ }
674
+ };
675
+ }
676
+ class nr extends ct {
677
+ constructor(...e) {
678
+ super(...e), this.state = {
679
+ height: this.props.defaultHeight || 0,
680
+ width: this.props.defaultWidth || 0
681
+ }, this._autoSizer = null, this._detectElementResize = null, this._didLogDeprecationWarning = !1, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
682
+ this._timeoutId = null;
683
+ const {
684
+ disableHeight: t,
685
+ disableWidth: r,
686
+ onResize: i
687
+ } = this.props;
688
+ if (this._parentNode) {
689
+ const l = window.getComputedStyle(this._parentNode) || {}, a = parseFloat(l.paddingLeft || "0"), c = parseFloat(l.paddingRight || "0"), d = parseFloat(l.paddingTop || "0"), v = parseFloat(l.paddingBottom || "0"), g = this._parentNode.getBoundingClientRect(), S = g.height - d - v, s = g.width - a - c;
690
+ if (!t && this.state.height !== S || !r && this.state.width !== s) {
691
+ this.setState({
692
+ height: S,
693
+ width: s
694
+ });
695
+ const h = () => {
696
+ this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
697
+ };
698
+ typeof i == "function" && i({
699
+ height: S,
700
+ width: s,
701
+ // TODO Remove these params in the next major release
702
+ get scaledHeight() {
703
+ return h(), S;
704
+ },
705
+ get scaledWidth() {
706
+ return h(), s;
707
+ }
708
+ });
709
+ }
710
+ }
711
+ }, this._setRef = (t) => {
712
+ this._autoSizer = t;
713
+ };
714
+ }
715
+ componentDidMount() {
716
+ const {
717
+ nonce: e
718
+ } = this.props, t = this._autoSizer ? this._autoSizer.parentNode : null;
719
+ if (t != null && t.ownerDocument && t.ownerDocument.defaultView && t instanceof t.ownerDocument.defaultView.HTMLElement) {
720
+ this._parentNode = t;
721
+ const r = t.ownerDocument.defaultView.ResizeObserver;
722
+ r != null ? (this._resizeObserver = new r(() => {
723
+ this._timeoutId = setTimeout(this._onResize, 0);
724
+ }), this._resizeObserver.observe(t)) : (this._detectElementResize = or(e), this._detectElementResize.addResizeListener(t, this._onResize)), this._onResize();
725
+ }
726
+ }
727
+ componentWillUnmount() {
728
+ this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && this._resizeObserver.disconnect());
729
+ }
730
+ render() {
731
+ const {
732
+ children: e,
733
+ defaultHeight: t,
734
+ defaultWidth: r,
735
+ disableHeight: i = !1,
736
+ disableWidth: l = !1,
737
+ doNotBailOutOnEmptyChildren: a = !1,
738
+ nonce: c,
739
+ onResize: d,
740
+ style: v = {},
741
+ tagName: g = "div",
742
+ ...S
743
+ } = this.props, {
744
+ height: s,
745
+ width: h
746
+ } = this.state, W = {
747
+ overflow: "visible"
748
+ }, _ = {};
749
+ let N = !1;
750
+ return i || (s === 0 && (N = !0), W.height = 0, _.height = s, _.scaledHeight = s), l || (h === 0 && (N = !0), W.width = 0, _.width = h, _.scaledWidth = h), a && (N = !1), ue(g, {
751
+ ref: this._setRef,
752
+ style: {
753
+ ...W,
754
+ ...v
755
+ },
756
+ ...S
757
+ }, !N && e(_));
758
+ }
759
+ }
760
+ const ir = ut(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
761
+ const i = At(
762
+ e,
763
+ n,
764
+ t.columnCount,
765
+ t.isDualPageWithCover
766
+ );
767
+ if (i <= 0)
768
+ return null;
769
+ if (t.isDualPageWithCover) {
770
+ const a = i === t.totalPages && t.totalPages % 2 === 0;
771
+ if (e === 0 && i === 1 || a && n === 0) {
772
+ const d = t.columnWidths.reduce((v, g) => v + g, 0);
773
+ return /* @__PURE__ */ y(
774
+ "div",
775
+ {
776
+ style: {
777
+ ...r,
778
+ width: d,
779
+ display: "flex",
780
+ justifyContent: "center",
781
+ alignItems: "flex-start"
782
+ },
783
+ children: /* @__PURE__ */ y(Se, { style: { position: "relative" }, pageNumber: i }, i)
784
+ }
785
+ );
786
+ }
787
+ }
788
+ return t.columnCount === 2 ? /* @__PURE__ */ y(
789
+ "div",
790
+ {
791
+ style: {
792
+ ...r,
793
+ display: "flex",
794
+ justifyContent: n === 0 ? "flex-end" : "flex-start",
795
+ alignItems: "flex-start"
796
+ },
797
+ children: /* @__PURE__ */ y(Se, { style: { position: "relative" }, pageNumber: i }, i)
798
+ }
799
+ ) : /* @__PURE__ */ y(Se, { style: r, pageNumber: i }, i);
800
+ }, rr), jo = () => {
801
+ const n = B(new Ut()), { initialPage: e = 1, initialScrollMode: t, instanceId: r } = zt(), { pagesRef: i, setPagesRef: l, setContentRef: a } = Lt(), { scrollToPage: c } = mt();
802
+ Ht(i);
803
+ const {
804
+ virtualScrollRef: d,
805
+ getVirtualScrollRef: v,
806
+ getPageScrollElementRef: g,
807
+ getVirtualScrollableElementRef: S,
808
+ setTotalInnerDimensions: s,
809
+ virtualScrollableElementRef: h,
810
+ totalInnerDimensions: W,
811
+ pageScrollElementRef: _
812
+ } = ft(), N = B(!0), { nextPage: b, prevPage: T, setFocusedPage: z, focusedPage: A, totalPages: o } = pt(), { scrollMode: f } = vt(), { viewMode: u } = gt(), m = B(null), { loading: w, error: p } = ht(), { passwordRequired: R } = Nt(), { LoaderImageComponent: L } = Et(), O = B(
813
+ W
814
+ ), x = B({
815
+ viewMode: u,
816
+ scrollMode: f
817
+ }), M = B(!1), I = B(), { isFullScreen: P } = Ct(), {
818
+ pageDimension: k,
819
+ rowCount: F,
820
+ rowHeight: H,
821
+ columnCount: D,
822
+ columnWidth: U,
823
+ estimatedColumnWidth: re,
824
+ estimatedRowHeight: Q,
825
+ totalDimension: oe
826
+ } = dt(), ae = Mt(W, 100), { onScroll: $, onTextSelect: pe } = Dt();
827
+ kt({ onTextSelect: pe, pagesRef: i });
828
+ const X = B();
829
+ Wt(D, F, h, u);
830
+ const Z = B({
831
+ scrollTop: 0,
832
+ scrollLeft: 0
833
+ });
834
+ bt(i);
835
+ const { isPressed: G } = Rt(), { selectionMode: J } = xt(), { initializeGrabScroll: le, resetGrabState: he } = yt({
836
+ isPressed: G
837
+ }), ie = Ce(() => J === _t.HAND, [J]), Xe = Ce(() => {
838
+ const C = Array.from({ length: D }, (E, j) => U(j));
839
+ return {
840
+ columnCount: D,
841
+ isDualPageWithCover: u === Ie.DUAL_PAGE_WITH_COVER,
842
+ columnWidths: C,
843
+ totalPages: o
844
+ };
845
+ }, [D, u, U, o]), ge = se(
846
+ (C) => {
847
+ const E = document.activeElement !== i;
848
+ !P && E || (["ArrowUp", "ArrowLeft"].includes(C.key) ? (C.preventDefault(), T()) : ["ArrowDown", "ArrowRight"].includes(C.key) && (C.preventDefault(), b()));
849
+ },
850
+ [b, T, P, f]
851
+ );
852
+ te(() => (window.addEventListener("keydown", ge), () => {
853
+ window.removeEventListener("keydown", ge);
854
+ }), [ge]), te(() => {
855
+ if (m.current && (m.current.style.position = "relative"), !!d)
856
+ for (let C = 0; C < F; C++)
857
+ for (let E = 0; E < D; E++)
858
+ d.resetAfterIndices({
859
+ columnIndex: E,
860
+ rowIndex: C,
861
+ shouldForceUpdate: !0
862
+ });
863
+ }, [F, D, k, d]);
864
+ const Ye = se(
865
+ (C, E) => {
866
+ if (!h)
867
+ return { scrollTop: 0, scrollLeft: 0 };
868
+ const j = Z.current.scrollTop > E, Y = Z.current.scrollLeft > C;
869
+ return j || Y ? Z.current : {
870
+ scrollTop: h.scrollTop,
871
+ scrollLeft: h.scrollLeft
872
+ };
873
+ },
874
+ [h]
875
+ ), Oe = se(
876
+ (C, E) => {
877
+ if (x.current.viewMode !== u || x.current.scrollMode !== f) {
878
+ X.current && clearTimeout(X.current), M.current = !0, c(A, "auto"), X.current = setTimeout(() => {
879
+ requestAnimationFrame(() => {
880
+ x.current = { viewMode: u, scrollMode: f };
881
+ });
882
+ }, 100);
883
+ return;
884
+ }
885
+ const Y = C.scrollTop, ve = C.scrollLeft;
886
+ if (!E.height || !E.width)
887
+ return;
888
+ M.current = !0;
889
+ const { height: ee, width: _e } = E, { height: We, width: Ae } = O.current;
890
+ if (We === ee && Ae === _e)
891
+ return;
892
+ const ot = Y / We * ee, nt = ve / Ae * _e, it = Math.round(Math.min(ot, ee)) || 0, st = Math.round(Math.min(nt, _e)) || 0;
893
+ I.current = setTimeout(() => {
894
+ requestAnimationFrame(() => {
895
+ h == null || h.scrollTo({
896
+ top: it,
897
+ left: st,
898
+ behavior: "auto"
899
+ });
900
+ });
901
+ }, 0), O.current = {
902
+ height: E.height,
903
+ width: E.width
904
+ };
905
+ },
906
+ [h, u, f, c]
907
+ );
908
+ te(() => {
909
+ clearTimeout(I.current);
910
+ const C = Array.from({ length: F }).reduce(
911
+ (Y, ve, ee) => Y + H(ee),
912
+ 0
913
+ ), E = Array.from({ length: D }).reduce(
914
+ (Y, ve, ee) => Y + U(ee),
915
+ 0
916
+ ), j = Ye(E, C);
917
+ Z.current = j, Oe(j, { height: C, width: E }), s({
918
+ height: C,
919
+ width: E
920
+ });
921
+ }, [k, F, D, Oe]);
922
+ const et = se(
923
+ (C) => {
924
+ Z.current = {
925
+ scrollTop: C.scrollTop,
926
+ scrollLeft: C.scrollLeft
927
+ };
928
+ },
929
+ [h]
930
+ );
931
+ te(() => {
932
+ if ($)
933
+ return _ && _.addEventListener("scroll", $), h && h.addEventListener("scroll", $), () => {
934
+ _ == null || _.removeEventListener("scroll", $), h == null || h.removeEventListener("scroll", $);
935
+ };
936
+ }, [h, _, $]), te(() => () => {
937
+ X.current && clearTimeout(X.current);
938
+ }, []);
939
+ const tt = Ce(() => ce(V["rp-pages-container"], {
940
+ [V["rp-cursor-grab"]]: ie && !G,
941
+ [V["rp-cursor-grabbing"]]: ie && G
942
+ }), [ie, G]), rt = se(
943
+ (C) => {
944
+ if (ie && C) {
945
+ const E = ce(V["rp-pages"]), j = document.querySelector(`.${E}`);
946
+ le(j);
947
+ }
948
+ },
949
+ [ie, le, V]
950
+ );
951
+ return te(() => {
952
+ w && he();
953
+ }, [w]), te(() => {
954
+ if (!(ae.height === 0 || !N.current)) {
955
+ if (t === Te.PAGE_SCROLLING) {
956
+ e !== A && _ && z(e), N.current = !1;
957
+ return;
958
+ }
959
+ c(e, "auto"), z(e), N.current = !1;
960
+ }
961
+ }, [
962
+ c,
963
+ t,
964
+ _,
965
+ z,
966
+ ae
967
+ ]), /* @__PURE__ */ we(at, { children: [
968
+ /* @__PURE__ */ y(Ft, { ref: a, children: /* @__PURE__ */ y(
969
+ Pt,
970
+ {
971
+ id: r,
972
+ ref: l,
973
+ tabIndex: -1,
974
+ className: tt,
975
+ style: {
976
+ "--scale-round-x": `${Ne(n.current.sx)[1]}px`,
977
+ "--scale-round-y": `${Ne(n.current.sy)[1]}px`
978
+ },
979
+ children: /* @__PURE__ */ y(nr, { style: { minHeight: "50px" }, children: ({ width: C, height: E }) => /* @__PURE__ */ y("div", { "data-rp": "pages", ref: rt, style: { width: C, height: E }, children: f === Te.PAGE_SCROLLING ? /* @__PURE__ */ y(
980
+ "div",
981
+ {
982
+ ref: g,
983
+ style: { width: C, height: E },
984
+ className: ce(V["rp-pages"], V["rp-page-scrolling-wrapper"]),
985
+ children: u === Ie.DUAL_PAGE ? /* @__PURE__ */ y(St, { widths: U, heights: H }) : u === Ie.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ y(It, { widths: U, heights: H }) : /* @__PURE__ */ y(Tt, { widths: U, heights: H })
986
+ }
987
+ ) : Q ? /* @__PURE__ */ y(
988
+ Yt,
989
+ {
990
+ ref: v,
991
+ itemData: Xe,
992
+ outerRef: S,
993
+ innerRef: m,
994
+ onScroll: et,
995
+ columnCount: D,
996
+ columnWidth: U,
997
+ rowHeight: H,
998
+ height: E,
999
+ width: C,
1000
+ estimatedColumnWidth: re,
1001
+ estimatedRowHeight: Q,
1002
+ rowCount: F,
1003
+ className: ce(
1004
+ V["rp-pages"],
1005
+ f === Te.HORIZONTAL_SCROLLING ? V["rp-pages-horizontal-scroll"] : ""
1006
+ ),
1007
+ style: {
1008
+ "--rp-pages-height": `${oe.height}px`,
1009
+ "--rp-pages-width": `${oe.width}px`,
1010
+ "--rp-row-count": `${F}`,
1011
+ "--rp-column-count": `${D}`
1012
+ },
1013
+ children: ir
1014
+ }
1015
+ ) : !w && !p ? /* @__PURE__ */ y(
1016
+ "div",
1017
+ {
1018
+ className: V["rp-loader"],
1019
+ style: {
1020
+ display: "flex",
1021
+ justifyContent: "center",
1022
+ alignItems: "center",
1023
+ height: "100%",
1024
+ width: "100%"
1025
+ },
1026
+ children: L && /* @__PURE__ */ y(L, {})
1027
+ }
1028
+ ) : p === wt.NOT_SUPPORTED ? /* @__PURE__ */ y("div", { className: V["rp-not-supported"], children: /* @__PURE__ */ we("div", { className: V["rp-not-supported-content"], children: [
1029
+ "React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
1030
+ /* @__PURE__ */ y("div", { children: /* @__PURE__ */ we("ul", { children: [
1031
+ /* @__PURE__ */ y("li", { children: "Chrome 126+" }),
1032
+ /* @__PURE__ */ y("li", { children: "Edge 126+" }),
1033
+ /* @__PURE__ */ y("li", { children: "Firefox 126+" }),
1034
+ /* @__PURE__ */ y("li", { children: "Safari 18.4+" }),
1035
+ /* @__PURE__ */ y("li", { children: "Safari iOS 18.4+" }),
1036
+ /* @__PURE__ */ y("li", { children: "Chrome Android 126+" })
1037
+ ] }) })
1038
+ ] }) }) : null }) })
1039
+ }
1040
+ ) }),
1041
+ R && /* @__PURE__ */ y(Ot, {})
1042
+ ] });
1043
+ };
138
1044
  export {
139
- Dr as RPPages
1045
+ jo as RPPages
140
1046
  };