@pdf-viewer/react 1.15.0-beta.1 → 1.15.0-beta.2
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.
- package/dist/{ToolbarLayout.module-5b9624f8.js → ToolbarLayout.module-ffef94eb.js} +1035 -988
- package/dist/components/RPController.js +4 -4
- package/dist/components/RPPages.js +4 -4
- package/dist/components/RPProvider.js +4 -4
- package/dist/components/layout/LayoutContainer.js +4 -4
- package/dist/components/layout/RPDefaultLayout.js +4 -4
- package/dist/components/layout/RPLayout.js +4 -4
- package/dist/components/layout/sidebar/RPSidebar.js +4 -4
- package/dist/components/layout/sidebar/Thumbnail.js +4 -4
- package/dist/components/layout/sidebar/Thumbnails.js +4 -4
- package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +4 -4
- package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +4 -4
- package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
- package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/MenuItem.js +3 -3
- package/dist/components/layout/toolbar/MenuSeparator.js +3 -3
- package/dist/components/layout/toolbar/MostPageTool.js +4 -4
- package/dist/components/layout/toolbar/OtherTool.js +4 -4
- package/dist/components/layout/toolbar/Paginate.js +4 -4
- package/dist/components/layout/toolbar/PrintTool.js +4 -4
- package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
- package/dist/components/layout/toolbar/RPMoreOptions.js +4 -4
- package/dist/components/layout/toolbar/RPToolbar.js +4 -4
- package/dist/components/layout/toolbar/RPToolbarEnd.js +4 -4
- package/dist/components/layout/toolbar/RotateTool.js +3 -3
- package/dist/components/layout/toolbar/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/SearchCloseButton.js +2 -2
- package/dist/components/layout/toolbar/SearchResultNavigator.js +4 -4
- package/dist/components/layout/toolbar/SearchTool.js +4 -4
- package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/ThumbnailTool.js +4 -4
- package/dist/components/layout/toolbar/ToolbarCustom.js +4 -4
- package/dist/components/layout/toolbar/ToolbarDefault.js +4 -4
- package/dist/components/layout/toolbar/ToolbarLayout.js +4 -4
- package/dist/components/layout/toolbar/ViewModeTool.js +3 -3
- package/dist/components/layout/toolbar/ZoomTool.js +4 -4
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +4 -4
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +4 -4
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +2 -2
- package/dist/components/layout/toolbar/tools/InputPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/NextPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/PrintTool.js +4 -4
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +2 -2
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +2 -2
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +4 -4
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +4 -4
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +4 -4
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +4 -4
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +3 -3
- package/dist/components/page/AnnotationLayer.js +4 -4
- package/dist/components/page/CanvasLayer.js +4 -4
- package/dist/components/page/DualPage.js +4 -4
- package/dist/components/page/RPPage.js +4 -4
- package/dist/components/page/SinglePage.js +4 -4
- package/dist/components/page/TextHighlightLayer.js +4 -4
- package/dist/components/page/TextLayer.js +4 -4
- package/dist/components/ui/Checkbox.js +1 -1
- package/dist/components/ui/DropDown.js +3 -3
- package/dist/components/ui/LoadingIndicator.js +4 -4
- package/dist/components/ui/RPTooltip.js +118 -102
- package/dist/contexts/PaginationContext.js +4 -4
- package/dist/contexts/PrintContext.js +4 -4
- package/dist/contexts/RenderQueueProvider.js +4 -4
- package/dist/contexts/SearchContext.js +4 -4
- package/dist/contexts/ThumbnailsContext.js +4 -4
- package/dist/{floating-ui.react-dom-6b2fe0df.js → floating-ui.react-dom-d22a10b4.js} +3 -3
- package/dist/{index-f563c6f0.js → index-27c30844.js} +2 -2
- package/dist/{index-35c7f4a2.js → index-c9a2990a.js} +3 -3
- package/dist/main.js +4 -4
- package/dist/utils/hooks/useFileDownload.js +4 -4
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +4 -4
- package/dist/utils/hooks/usePresentPage.js +4 -4
- package/dist/utils/hooks/usePrint.js +4 -4
- package/dist/utils/hooks/useScrollToPage.js +4 -4
- package/dist/utils/hooks/useSearch.js +4 -4
- package/dist/utils/hooks/useThumbnail.js +4 -4
- package/dist/utils/hooks/useVirtualReactWindow.js +4 -4
- package/package.json +1 -1
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
1
|
+
import { jsx as i, Fragment as ve, jsxs as W } from "react/jsx-runtime";
|
|
2
2
|
import * as Q from "react";
|
|
3
|
-
import { useRef as M, useEffect as
|
|
4
|
-
import { ChevronUpIcon as
|
|
5
|
-
import { UIButton as
|
|
6
|
-
import { UIInput as
|
|
7
|
-
import { ViewMode as
|
|
8
|
-
import { useScrollModeContext as
|
|
3
|
+
import { useRef as M, useEffect as D, useCallback as N, useState as $, useMemo as k, createContext as et, useContext as tt, useImperativeHandle as _n, createElement as at, PureComponent as mo, Component as go, memo as bn, Fragment as vo, forwardRef as wo } from "react";
|
|
4
|
+
import { ChevronUpIcon as Je } from "./components/icons/ChevronUpIcon.js";
|
|
5
|
+
import { UIButton as ue } from "./components/ui/Button.js";
|
|
6
|
+
import { UIInput as Tn } from "./components/ui/Input.js";
|
|
7
|
+
import { ViewMode as Me, ScrollMode as oe, AnnotationSubType as Zt, SelectionMode as _o, ErrorType as bo, ZoomLevel as Ze } from "./utils/types.js";
|
|
8
|
+
import { useScrollModeContext as $e } from "./contexts/ScrollModeContext.js";
|
|
9
9
|
import { useDocumentContext as re } from "./contexts/RPDocumentContext.js";
|
|
10
|
-
import { useDocumentPasswordContext as
|
|
11
|
-
import { useDarkModeContext as
|
|
10
|
+
import { useDocumentPasswordContext as To } from "./contexts/DocumentPasswordContext.js";
|
|
11
|
+
import { useDarkModeContext as Co } from "./contexts/DarkModeContext.js";
|
|
12
12
|
import "./contexts/RotationContext.js";
|
|
13
|
-
import { useLayerContext as
|
|
14
|
-
import { useZoomContext as
|
|
15
|
-
import { useViewModeContext as
|
|
16
|
-
import { useVirtualScrollContext as
|
|
17
|
-
import { useVirtualGridContext as
|
|
18
|
-
import { useSelectionModeContext as
|
|
19
|
-
import { useInitialStateContext as
|
|
20
|
-
import { useFullScreenContext as
|
|
13
|
+
import { useLayerContext as Po } from "./contexts/LayerContext.js";
|
|
14
|
+
import { useZoomContext as ht } from "./contexts/ZoomContext.js";
|
|
15
|
+
import { useViewModeContext as je } from "./contexts/ViewModeContext.js";
|
|
16
|
+
import { useVirtualScrollContext as ft } from "./contexts/VirtualScrollContext.js";
|
|
17
|
+
import { useVirtualGridContext as Cn } from "./contexts/VirtualGridContext.js";
|
|
18
|
+
import { useSelectionModeContext as yo } from "./contexts/SelectionModeContext.js";
|
|
19
|
+
import { useInitialStateContext as Dt } from "./contexts/InitialStateContext.js";
|
|
20
|
+
import { useFullScreenContext as Io } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
|
-
import { findMatches as
|
|
24
|
-
import { useLayoutContainer as
|
|
25
|
-
import { useDimensionPagesContext as
|
|
26
|
-
import { useLocalizationContext as
|
|
27
|
-
import { useHighlightContext as
|
|
23
|
+
import { findMatches as xo, resetDivs as So, highlightMatches as Ro, isMatchEntireWord as Lo } from "./utils/highlight.js";
|
|
24
|
+
import { useLayoutContainer as Ee } from "./contexts/LayoutContainerContext.js";
|
|
25
|
+
import { useDimensionPagesContext as nt } from "./contexts/DimensionPagesContext.js";
|
|
26
|
+
import { useLocalizationContext as he } from "./contexts/LocalizationContext.js";
|
|
27
|
+
import { useHighlightContext as Eo } from "./contexts/HighlightContext.js";
|
|
28
28
|
import "./contexts/LicenseContext.js";
|
|
29
|
-
import { useDownloadContext as
|
|
30
|
-
import { useSmoothScrollContext as
|
|
29
|
+
import { useDownloadContext as No } from "./contexts/DownloadContext.js";
|
|
30
|
+
import { useSmoothScrollContext as Pn } from "./contexts/SmoothScrollContext.js";
|
|
31
31
|
import "./contexts/ElementPageContext.js";
|
|
32
|
-
import { usePagesRotateContext as
|
|
33
|
-
import { Queue as
|
|
34
|
-
import { renderPage as
|
|
35
|
-
import { useGlobalCurrentPage as
|
|
36
|
-
import { useLoaderContext as
|
|
37
|
-
import { useToolComponentContext as
|
|
38
|
-
import { useIconToolContext as
|
|
39
|
-
import { useOtherToolContext as
|
|
40
|
-
import { useEventCallbackContext as
|
|
41
|
-
import { useThemeContext as
|
|
32
|
+
import { usePagesRotateContext as mt } from "./contexts/PagesRotateContext.js";
|
|
33
|
+
import { Queue as Oo } from "./utils/Queue.js";
|
|
34
|
+
import { renderPage as Do } from "./utils/renderPage.js";
|
|
35
|
+
import { useGlobalCurrentPage as zo } from "./contexts/GlobalCurrentPage.js";
|
|
36
|
+
import { useLoaderContext as zt } from "./contexts/LoaderContext.js";
|
|
37
|
+
import { useToolComponentContext as Fe } from "./contexts/ToolComponentContext.js";
|
|
38
|
+
import { useIconToolContext as _e } from "./contexts/IconToolContext.js";
|
|
39
|
+
import { useOtherToolContext as Ao } from "./contexts/OtherToolContext.js";
|
|
40
|
+
import { useEventCallbackContext as Fo } from "./contexts/EventCallbackContext.js";
|
|
41
|
+
import { useThemeContext as ko } from "./contexts/ThemeContext.js";
|
|
42
42
|
import "./contexts/ConfigContext.js";
|
|
43
|
-
import * as
|
|
44
|
-
import { PixelsPerInch as
|
|
45
|
-
import { ThumbnailIcon as
|
|
46
|
-
import { c as
|
|
47
|
-
import { LoaderIcon as
|
|
48
|
-
import { Container as
|
|
49
|
-
import { useViewportContext as
|
|
50
|
-
import { useToolbarComponentContext as
|
|
51
|
-
import { RPSplitter as
|
|
52
|
-
import { WrapperLayout as
|
|
53
|
-
import { c as
|
|
54
|
-
import { RPDropFileZone as
|
|
55
|
-
import { c as ne, S as
|
|
56
|
-
import { UICheckbox as
|
|
57
|
-
import { useIconContext as
|
|
43
|
+
import * as Wo from "pdfjs-dist";
|
|
44
|
+
import { PixelsPerInch as Mo, AnnotationMode as Ho, RenderingCancelledException as $o, AnnotationLayer as Go } from "pdfjs-dist";
|
|
45
|
+
import { ThumbnailIcon as qo } from "./components/icons/Thumbnail.js";
|
|
46
|
+
import { c as ae } from "./clsx-0c6e471a.js";
|
|
47
|
+
import { LoaderIcon as yn } from "./components/icons/LoaderIcon.js";
|
|
48
|
+
import { Container as Uo } from "./components/layout/Container.js";
|
|
49
|
+
import { useViewportContext as ke, ViewportProvider as Vo } from "./contexts/ViewportContext.js";
|
|
50
|
+
import { useToolbarComponentContext as Ne, ToolbarComponentProvider as Bo } from "./contexts/ToolbarComponentContext.js";
|
|
51
|
+
import { RPSplitter as Zo } from "./components/layout/sidebar/RPSplitter.js";
|
|
52
|
+
import { WrapperLayout as jo } from "./components/layout/WrapperLayout.js";
|
|
53
|
+
import { c as ze, L as Ko } from "./LayoutWrapper-6224491f.js";
|
|
54
|
+
import { RPDropFileZone as Xo } from "./components/RPDropFileZone.js";
|
|
55
|
+
import { c as ne, S as jt } from "./SearchCloseButton-08d57275.js";
|
|
56
|
+
import { UICheckbox as Kt } from "./components/ui/Checkbox.js";
|
|
57
|
+
import { useIconContext as be, IconProvider as Qo } from "./contexts/IconContext.js";
|
|
58
58
|
import K from "./components/ui/RPTooltip.js";
|
|
59
|
-
import { UIDropDown as
|
|
60
|
-
import { MenuItem as
|
|
61
|
-
import { MenuSeparator as
|
|
62
|
-
import { dateFormatter as
|
|
63
|
-
import { PropertyItem as
|
|
59
|
+
import { UIDropDown as At } from "./components/ui/DropDown.js";
|
|
60
|
+
import { MenuItem as Ae } from "./components/layout/toolbar/MenuItem.js";
|
|
61
|
+
import { MenuSeparator as Ft } from "./components/layout/toolbar/MenuSeparator.js";
|
|
62
|
+
import { dateFormatter as Xt } from "./utils/dateFormatter.js";
|
|
63
|
+
import { PropertyItem as Yo } from "./components/layout/toolbar/PropertyItem.js";
|
|
64
64
|
import "./RotateTool.module-67946714.js";
|
|
65
|
-
import { withRef as
|
|
66
|
-
import { useInfiniteScroll as
|
|
67
|
-
import { MAX_ZOOM_SCALE as
|
|
68
|
-
import { SimpleLinkService as
|
|
69
|
-
import { annotationsEvents as
|
|
70
|
-
import { normalizeSingleKeyword as
|
|
71
|
-
import { CustomElement as
|
|
72
|
-
import { getGridDimension as
|
|
73
|
-
import { useMousePressed as
|
|
74
|
-
import { useGrabScroll as
|
|
75
|
-
import { usePinch as
|
|
76
|
-
import { useDebounce as
|
|
77
|
-
import
|
|
78
|
-
import { getScrollDistance as
|
|
79
|
-
import { getWordPositionInPage as
|
|
80
|
-
import { getThumbnailViewport as
|
|
81
|
-
import { smoothScrollTo as
|
|
82
|
-
import { appConsole as
|
|
83
|
-
import { FileUploadTool as
|
|
84
|
-
import { DarkModeTool as
|
|
85
|
-
import { ThreeDotIcon as
|
|
86
|
-
import { c as
|
|
87
|
-
import { D as
|
|
88
|
-
import { a as
|
|
89
|
-
import { CloseIcon as
|
|
90
|
-
import { DocumentProperties as
|
|
91
|
-
import { RotateTool as
|
|
92
|
-
import { ViewModeTool as
|
|
93
|
-
import { ScrollModeTool as
|
|
94
|
-
import { FileDownloadDefaultIcon as
|
|
95
|
-
import { PrintDefaultTool as
|
|
96
|
-
import { FullScreenTool as
|
|
97
|
-
import { GoToDownIcon as
|
|
98
|
-
import { SelectionModeTool as
|
|
99
|
-
import { ZoomInIcon as
|
|
100
|
-
import { ZoomOutIcon as
|
|
101
|
-
import { isZoomOutDisabled as
|
|
102
|
-
import { SearchIcon as
|
|
103
|
-
import { ClearIcon as
|
|
104
|
-
import { InfoIcon as
|
|
105
|
-
const
|
|
106
|
-
const { viewMode: t } =
|
|
107
|
-
|
|
65
|
+
import { withRef as gt } from "./utils/withRef.js";
|
|
66
|
+
import { useInfiniteScroll as Jo } from "./utils/hooks/useInfiniteScroll.js";
|
|
67
|
+
import { MAX_ZOOM_SCALE as Qt, THUMBNAIL_MIN_WIDTH as er } from "./utils/constants.js";
|
|
68
|
+
import { SimpleLinkService as tr } from "./utils/link_service.js";
|
|
69
|
+
import { annotationsEvents as nr, annotationEventsHandler as or, handleClick as Yt, handleAnnotationWidget as rr, handleAnnotationLink as ir, bindLayerEvents as sr, unbindLayerEvents as Jt } from "./utils/annotations.js";
|
|
70
|
+
import { normalizeSingleKeyword as ar, sortHighlightPosition as cr, unwrap as lr } from "./components/page/searchHighlight.js";
|
|
71
|
+
import { CustomElement as dr } from "./components/page/CustomElement.js";
|
|
72
|
+
import { getGridDimension as kt, getPositionFromPage as ur, getPageFromPosition as pr } from "./utils/calculatePage.js";
|
|
73
|
+
import { useMousePressed as hr } from "./utils/hooks/useMousePressed.js";
|
|
74
|
+
import { useGrabScroll as fr } from "./utils/hooks/useGrabScroll.js";
|
|
75
|
+
import { usePinch as mr } from "./utils/hooks/usePinch.js";
|
|
76
|
+
import { useDebounce as Wt } from "./utils/hooks/useDebounce.js";
|
|
77
|
+
import gr from "./components/ui/PasswordModal.js";
|
|
78
|
+
import { getScrollDistance as Be } from "./utils/getScrollDistance.js";
|
|
79
|
+
import { getWordPositionInPage as vr } from "./utils/getWordPositionInPage.js";
|
|
80
|
+
import { getThumbnailViewport as wr } from "./utils/getThumbnailViewport.js";
|
|
81
|
+
import { smoothScrollTo as bt } from "./utils/smoothScrollTo.js";
|
|
82
|
+
import { appConsole as _r } from "./utils/appConsole.js";
|
|
83
|
+
import { FileUploadTool as In } from "./components/layout/toolbar/FileUploadTool.js";
|
|
84
|
+
import { DarkModeTool as br } from "./components/layout/toolbar/DarkModeTool.js";
|
|
85
|
+
import { ThreeDotIcon as Tr } from "./components/icons/ThreeDotIcon.js";
|
|
86
|
+
import { c as Cr, u as Mt, P as ot, a as Ye, b as Ht, k as Pr, e as yr, i as Ir } from "./index-c9a2990a.js";
|
|
87
|
+
import { D as xr, d as Tt } from "./floating-ui.react-dom-d22a10b4.js";
|
|
88
|
+
import { a as Sr, h as Rr, u as Lr, F as Er, b as Nr, G as ut } from "./index-27c30844.js";
|
|
89
|
+
import { CloseIcon as Or } from "./components/icons/CloseIcon.js";
|
|
90
|
+
import { DocumentProperties as Dr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
91
|
+
import { RotateTool as zr } from "./components/layout/toolbar/RotateTool.js";
|
|
92
|
+
import { ViewModeTool as Ar } from "./components/layout/toolbar/ViewModeTool.js";
|
|
93
|
+
import { ScrollModeTool as Fr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
94
|
+
import { FileDownloadDefaultIcon as kr } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
95
|
+
import { PrintDefaultTool as Wr } from "./components/icons/PrintDefaultIcon.js";
|
|
96
|
+
import { FullScreenTool as xn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
97
|
+
import { GoToDownIcon as Sn } from "./components/icons/GoToDownIcon.js";
|
|
98
|
+
import { SelectionModeTool as Mr } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
99
|
+
import { ZoomInIcon as Hr } from "./components/icons/ZoomInIcon.js";
|
|
100
|
+
import { ZoomOutIcon as $r } from "./components/icons/ZoomOutIcon.js";
|
|
101
|
+
import { isZoomOutDisabled as Gr, isZoomInDisabled as qr } from "./utils/zoom.js";
|
|
102
|
+
import { SearchIcon as Rn } from "./components/icons/SearchIcon.js";
|
|
103
|
+
import { ClearIcon as Ur } from "./components/icons/ClearIcon.js";
|
|
104
|
+
import { InfoIcon as en } from "./components/icons/InfoIcon.js";
|
|
105
|
+
const Ln = () => {
|
|
106
|
+
const { viewMode: t } = je(), { scrollMode: e } = $e(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = ft(), { setFocusedPage: s } = fe(), a = M(), { columnCount: d } = Cn(), { widths: c, heights: m } = nt(), g = M(e), C = M(t), u = M(d), { targetScrollPage: y } = Pn();
|
|
107
|
+
D(() => {
|
|
108
108
|
n != null && n.scrollToItem && (a.current = n);
|
|
109
|
-
}, [n]),
|
|
109
|
+
}, [n]), D(() => {
|
|
110
110
|
g.current = e, C.current = t;
|
|
111
111
|
}, [e, t]);
|
|
112
112
|
const _ = N(
|
|
@@ -120,7 +120,7 @@ const Tn = () => {
|
|
|
120
120
|
top: 0
|
|
121
121
|
};
|
|
122
122
|
return new Promise(
|
|
123
|
-
(l) =>
|
|
123
|
+
(l) => bt(o, f, l)
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
const h = {
|
|
@@ -132,18 +132,18 @@ const Tn = () => {
|
|
|
132
132
|
behavior: P
|
|
133
133
|
});
|
|
134
134
|
},
|
|
135
|
-
[o, c,
|
|
135
|
+
[o, c, bt]
|
|
136
136
|
);
|
|
137
|
-
return
|
|
137
|
+
return D(() => {
|
|
138
138
|
g.current = e, C.current = t;
|
|
139
|
-
}, [e, t]),
|
|
139
|
+
}, [e, t]), D(() => {
|
|
140
140
|
u.current = d;
|
|
141
141
|
}, [d]), { scrollToPage: N(
|
|
142
142
|
(T, P = "smooth") => {
|
|
143
143
|
s(T);
|
|
144
144
|
const p = T - 1;
|
|
145
145
|
let h = p, f = 0;
|
|
146
|
-
if (C.current ===
|
|
146
|
+
if (C.current === Me.DUAL_PAGE && g.current === oe.PAGE_SCROLLING) {
|
|
147
147
|
_(T, P);
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
@@ -155,14 +155,14 @@ const Tn = () => {
|
|
|
155
155
|
return;
|
|
156
156
|
const l = r;
|
|
157
157
|
P === "smooth" && (y.current = T);
|
|
158
|
-
const { columnsWidth: v, rowsHeight: w } =
|
|
158
|
+
const { columnsWidth: v, rowsHeight: w } = kt(
|
|
159
159
|
{ widths: c, heights: m },
|
|
160
160
|
d
|
|
161
161
|
);
|
|
162
162
|
if (g.current === oe.HORIZONTAL_SCROLLING) {
|
|
163
163
|
f = p;
|
|
164
|
-
const
|
|
165
|
-
left: Math.floor(
|
|
164
|
+
const x = Be(v, f), L = {
|
|
165
|
+
left: Math.floor(x),
|
|
166
166
|
top: 0
|
|
167
167
|
};
|
|
168
168
|
return l.scrollTo({
|
|
@@ -170,23 +170,23 @@ const Tn = () => {
|
|
|
170
170
|
behavior: P
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
if (C.current ===
|
|
173
|
+
if (C.current === Me.DUAL_PAGE) {
|
|
174
174
|
f = p % 2, h = Math.floor(p / 2);
|
|
175
|
-
const L =
|
|
175
|
+
const L = Be(v, f), O = Be(w, h), z = {
|
|
176
176
|
left: Math.floor(L),
|
|
177
177
|
top: Math.floor(O)
|
|
178
178
|
};
|
|
179
179
|
return l.scrollTo({
|
|
180
|
-
...
|
|
180
|
+
...z,
|
|
181
181
|
behavior: P
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
-
const I =
|
|
184
|
+
const I = Be(w, h), S = {
|
|
185
185
|
left: 0,
|
|
186
186
|
top: Math.floor(I)
|
|
187
187
|
};
|
|
188
188
|
return l.scrollTo({
|
|
189
|
-
...
|
|
189
|
+
...S,
|
|
190
190
|
behavior: P
|
|
191
191
|
});
|
|
192
192
|
},
|
|
@@ -195,13 +195,13 @@ const Tn = () => {
|
|
|
195
195
|
d,
|
|
196
196
|
_,
|
|
197
197
|
s,
|
|
198
|
-
|
|
198
|
+
bt,
|
|
199
199
|
m,
|
|
200
200
|
c
|
|
201
201
|
]
|
|
202
202
|
) };
|
|
203
|
-
},
|
|
204
|
-
const [e, n] = $(t), [r, o] = $(0), { scrollToPage: s } =
|
|
203
|
+
}, Vr = (t = 1) => {
|
|
204
|
+
const [e, n] = $(t), [r, o] = $(0), { scrollToPage: s } = Ln(), a = M(1), { viewMode: d } = je(), { scrollMode: c } = $e(), { widths: m } = nt(), { pagesRef: g } = Ee(), C = Wt(e, 100), u = N(
|
|
205
205
|
(h) => {
|
|
206
206
|
if (!/^[0-9]*$/g.test(h.toString()) || !h)
|
|
207
207
|
return { success: !1, currentPage: a.current };
|
|
@@ -220,11 +220,11 @@ const Tn = () => {
|
|
|
220
220
|
if (!g || f)
|
|
221
221
|
return !1;
|
|
222
222
|
const l = f ? m[h] : m[h - 1], v = f ? m[h + 1] : m[h];
|
|
223
|
-
return d ===
|
|
223
|
+
return d === Me.DUAL_PAGE && l + v < g.clientWidth;
|
|
224
224
|
}, [d, m, g, r]), T = N(() => {
|
|
225
225
|
let h = e - 1;
|
|
226
226
|
b(h) && (h = e - 2), _(h);
|
|
227
|
-
}, [_, e, d, c, b]), P = k(() => d ===
|
|
227
|
+
}, [_, e, d, c, b]), P = k(() => d === Me.DUAL_PAGE && c === oe.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, d, c]), p = N(() => {
|
|
228
228
|
if (P)
|
|
229
229
|
return;
|
|
230
230
|
let h = e + 1;
|
|
@@ -239,7 +239,7 @@ const Tn = () => {
|
|
|
239
239
|
prevPage: T,
|
|
240
240
|
goToPage: _
|
|
241
241
|
};
|
|
242
|
-
},
|
|
242
|
+
}, En = et({
|
|
243
243
|
focusedPage: 0,
|
|
244
244
|
setFocusedPage: (t) => {
|
|
245
245
|
},
|
|
@@ -251,17 +251,17 @@ const Tn = () => {
|
|
|
251
251
|
},
|
|
252
252
|
nextPage: () => {
|
|
253
253
|
}
|
|
254
|
-
}),
|
|
255
|
-
const t =
|
|
256
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
257
|
-
},
|
|
258
|
-
const { pdf: e } = re(), { setCurrentPage: n } =
|
|
259
|
-
return
|
|
254
|
+
}), fe = () => {
|
|
255
|
+
const t = tt(En);
|
|
256
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && _r.error("Please use this hooks inside children component of RPProvider"), t;
|
|
257
|
+
}, wc = ({ children: t }) => {
|
|
258
|
+
const { pdf: e } = re(), { setCurrentPage: n } = zo(), { focusedPage: r, totalPages: o, setFocusedPage: s, setTotalPages: a, goToPage: d, nextPage: c, prevPage: m } = Vr();
|
|
259
|
+
return D(() => {
|
|
260
260
|
e != null && e.numPages && (a(e.numPages), s(1));
|
|
261
|
-
}, [e, a, s]),
|
|
261
|
+
}, [e, a, s]), D(() => {
|
|
262
262
|
n(r);
|
|
263
263
|
}, [r, n]), /* @__PURE__ */ i(
|
|
264
|
-
|
|
264
|
+
En.Provider,
|
|
265
265
|
{
|
|
266
266
|
value: {
|
|
267
267
|
focusedPage: r,
|
|
@@ -275,13 +275,13 @@ const Tn = () => {
|
|
|
275
275
|
children: t
|
|
276
276
|
}
|
|
277
277
|
);
|
|
278
|
-
},
|
|
278
|
+
}, Br = () => {
|
|
279
279
|
const { pdf: t, pages: e } = re(), [n, r] = $({
|
|
280
280
|
loadedPages: 0,
|
|
281
281
|
totalPages: 0,
|
|
282
282
|
percentage: 0
|
|
283
283
|
}), [o, s] = $(!1), [a, d] = $(!1), [c, m] = $(null), [g, C] = $(void 0), u = M(!1);
|
|
284
|
-
|
|
284
|
+
D(() => {
|
|
285
285
|
u.current;
|
|
286
286
|
}, [u]);
|
|
287
287
|
const y = N(() => {
|
|
@@ -301,18 +301,18 @@ const Tn = () => {
|
|
|
301
301
|
pdfDocument: v,
|
|
302
302
|
pageNumber: w,
|
|
303
303
|
viewerPdfPage: I,
|
|
304
|
-
printResolution:
|
|
305
|
-
optionalContentConfigPromise:
|
|
304
|
+
printResolution: S,
|
|
305
|
+
optionalContentConfigPromise: x,
|
|
306
306
|
printAnnotationStoragePromise: L
|
|
307
307
|
}) => {
|
|
308
308
|
if (u.current) {
|
|
309
309
|
_();
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
|
-
const O =
|
|
312
|
+
const O = S / Mo.PDF;
|
|
313
313
|
l.width = Math.floor(I.width * O), l.height = Math.floor(I.height * O);
|
|
314
|
-
const
|
|
315
|
-
|
|
314
|
+
const z = l.getContext("2d");
|
|
315
|
+
z.save(), z.fillStyle = "rgb(255, 255, 255)", z.fillRect(0, 0, l.width, l.height), z.restore();
|
|
316
316
|
const [F, E] = await Promise.all([
|
|
317
317
|
v.getPage(w),
|
|
318
318
|
L
|
|
@@ -322,53 +322,53 @@ const Tn = () => {
|
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
324
|
const R = {
|
|
325
|
-
canvasContext:
|
|
325
|
+
canvasContext: z,
|
|
326
326
|
transform: [O, 0, 0, O, 0, 0],
|
|
327
327
|
viewport: F.getViewport({ scale: 1, rotation: I.rotation }),
|
|
328
328
|
intent: "print",
|
|
329
|
-
annotationMode:
|
|
330
|
-
optionalContentConfigPromise:
|
|
329
|
+
annotationMode: Ho.ENABLE_STORAGE,
|
|
330
|
+
optionalContentConfigPromise: x,
|
|
331
331
|
printAnnotationStorage: E
|
|
332
332
|
};
|
|
333
333
|
try {
|
|
334
334
|
return F.render(R).promise;
|
|
335
335
|
} catch (A) {
|
|
336
|
-
throw A instanceof
|
|
336
|
+
throw A instanceof $o || console.error(A), A;
|
|
337
337
|
}
|
|
338
338
|
}, P = N(() => {
|
|
339
339
|
const l = window.print;
|
|
340
340
|
return new Promise((v) => {
|
|
341
|
-
const w = (
|
|
341
|
+
const w = (x) => {
|
|
342
342
|
setTimeout(() => {
|
|
343
|
-
l.call(window), setTimeout(() =>
|
|
343
|
+
l.call(window), setTimeout(() => x(), 20);
|
|
344
344
|
}, 0);
|
|
345
345
|
};
|
|
346
346
|
if (document.querySelector(".rp-print-zone")) {
|
|
347
347
|
w(v);
|
|
348
348
|
return;
|
|
349
349
|
}
|
|
350
|
-
const
|
|
351
|
-
document.querySelector(".rp-print-zone") && (w(v),
|
|
350
|
+
const S = new MutationObserver(() => {
|
|
351
|
+
document.querySelector(".rp-print-zone") && (w(v), S.disconnect());
|
|
352
352
|
});
|
|
353
|
-
|
|
353
|
+
S.observe(document.body, { childList: !0, subtree: !0 });
|
|
354
354
|
});
|
|
355
355
|
}, []), p = async (l) => {
|
|
356
356
|
const v = document.createElement("img"), w = document.createElement("div");
|
|
357
|
-
return w.classList.add("rp-print-page"), await new Promise((I,
|
|
358
|
-
l.toBlob((
|
|
359
|
-
|
|
357
|
+
return w.classList.add("rp-print-page"), await new Promise((I, S) => {
|
|
358
|
+
l.toBlob((x) => {
|
|
359
|
+
x ? (v.src = URL.createObjectURL(x), v.onload = () => {
|
|
360
360
|
URL.revokeObjectURL(v.src), I();
|
|
361
|
-
}, v.onerror =
|
|
361
|
+
}, v.onerror = S) : S(new Error("Failed to create blob"));
|
|
362
362
|
});
|
|
363
363
|
}).catch(() => {
|
|
364
364
|
}), w.appendChild(v), w;
|
|
365
365
|
}, h = (l, v) => {
|
|
366
366
|
const w = document.createElement("div");
|
|
367
367
|
w.classList.add("rp-print-zone");
|
|
368
|
-
const I = document.createElement("style"),
|
|
369
|
-
if (
|
|
370
|
-
const { width:
|
|
371
|
-
I.innerHTML = `@page { size: ${
|
|
368
|
+
const I = document.createElement("style"), S = v.get(1);
|
|
369
|
+
if (S) {
|
|
370
|
+
const { width: x, height: L } = S == null ? void 0 : S.page.getViewport({ scale: 1 });
|
|
371
|
+
I.innerHTML = `@page { size: ${x}px ${L}px }`;
|
|
372
372
|
}
|
|
373
373
|
return w.appendChild(I), w.append(...l), w;
|
|
374
374
|
}, f = N(
|
|
@@ -381,7 +381,7 @@ const Tn = () => {
|
|
|
381
381
|
const w = document.createElement("canvas"), I = [];
|
|
382
382
|
try {
|
|
383
383
|
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
384
|
-
const
|
|
384
|
+
const x = t.getOptionalContentConfig({ intent: "print" }), L = Promise.resolve(
|
|
385
385
|
t.annotationStorage.print ?? void 0
|
|
386
386
|
), O = e.size;
|
|
387
387
|
for (const [F, E] of e) {
|
|
@@ -396,7 +396,7 @@ const Tn = () => {
|
|
|
396
396
|
pageNumber: F,
|
|
397
397
|
viewerPdfPage: R,
|
|
398
398
|
printResolution: 150,
|
|
399
|
-
optionalContentConfigPromise:
|
|
399
|
+
optionalContentConfigPromise: x,
|
|
400
400
|
printAnnotationStoragePromise: L
|
|
401
401
|
}), u.current) {
|
|
402
402
|
_();
|
|
@@ -415,17 +415,17 @@ const Tn = () => {
|
|
|
415
415
|
_();
|
|
416
416
|
return;
|
|
417
417
|
}
|
|
418
|
-
const
|
|
419
|
-
document.body.appendChild(
|
|
420
|
-
} catch (
|
|
421
|
-
d(!0),
|
|
418
|
+
const z = h(I, e);
|
|
419
|
+
document.body.appendChild(z), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), s(!0), await P();
|
|
420
|
+
} catch (S) {
|
|
421
|
+
d(!0), S instanceof Error && m(S);
|
|
422
422
|
} finally {
|
|
423
423
|
w.height = 0, w.width = 0;
|
|
424
424
|
}
|
|
425
425
|
},
|
|
426
426
|
[t, e, u, _, h, P]
|
|
427
427
|
);
|
|
428
|
-
return
|
|
428
|
+
return D(() => {
|
|
429
429
|
const l = () => {
|
|
430
430
|
_(), y();
|
|
431
431
|
};
|
|
@@ -441,7 +441,7 @@ const Tn = () => {
|
|
|
441
441
|
error: c,
|
|
442
442
|
showDefaultProgress: g
|
|
443
443
|
};
|
|
444
|
-
},
|
|
444
|
+
}, Nn = et({
|
|
445
445
|
print: async () => {
|
|
446
446
|
},
|
|
447
447
|
cancel: () => {
|
|
@@ -458,8 +458,8 @@ const Tn = () => {
|
|
|
458
458
|
console.error("Error in setOnError callback:", e);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
}),
|
|
462
|
-
const [e, n] = $(null), [r, o] = $(null), { print: s, cancel: a, progress: d, isComplete: c, isError: m, error: g, showDefaultProgress: C } =
|
|
461
|
+
}), _c = ({ children: t }) => {
|
|
462
|
+
const [e, n] = $(null), [r, o] = $(null), { print: s, cancel: a, progress: d, isComplete: c, isError: m, error: g, showDefaultProgress: C } = Br(), u = N((P) => {
|
|
463
463
|
P && typeof P == "function" && o(() => P);
|
|
464
464
|
}, []), y = (P) => {
|
|
465
465
|
g && P(g);
|
|
@@ -469,13 +469,13 @@ const Tn = () => {
|
|
|
469
469
|
},
|
|
470
470
|
[d, e]
|
|
471
471
|
);
|
|
472
|
-
|
|
472
|
+
D(() => {
|
|
473
473
|
c && r && b();
|
|
474
|
-
}, [c, r]),
|
|
474
|
+
}, [c, r]), D(() => {
|
|
475
475
|
m && y((P) => {
|
|
476
476
|
console.error(P);
|
|
477
477
|
});
|
|
478
|
-
}, [m]),
|
|
478
|
+
}, [m]), D(() => {
|
|
479
479
|
d && e && e(d);
|
|
480
480
|
}, [d, e]);
|
|
481
481
|
const b = () => {
|
|
@@ -489,19 +489,19 @@ const Tn = () => {
|
|
|
489
489
|
progress: d,
|
|
490
490
|
showDefaultProgress: C
|
|
491
491
|
};
|
|
492
|
-
return /* @__PURE__ */ i(
|
|
493
|
-
},
|
|
494
|
-
const t =
|
|
492
|
+
return /* @__PURE__ */ i(Nn.Provider, { value: T, children: t });
|
|
493
|
+
}, vt = () => {
|
|
494
|
+
const t = tt(Nn);
|
|
495
495
|
if (!t)
|
|
496
496
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
497
497
|
return t;
|
|
498
|
-
},
|
|
498
|
+
}, Zr = () => {
|
|
499
499
|
const [t, e] = $({}), { pages: n } = re(), r = k(() => Object.keys(t).length, [t]), o = N(
|
|
500
500
|
(a) => {
|
|
501
501
|
if (!n.size)
|
|
502
502
|
return;
|
|
503
503
|
const d = a > n.size ? n.size : a, m = Array.from(n.values()).slice(0, d).map((g) => {
|
|
504
|
-
const { thumbnailViewport: C, scale: u } =
|
|
504
|
+
const { thumbnailViewport: C, scale: u } = wr(g.page, g.defaultRotation);
|
|
505
505
|
return {
|
|
506
506
|
scale: u,
|
|
507
507
|
page: g.page,
|
|
@@ -514,7 +514,7 @@ const Tn = () => {
|
|
|
514
514
|
},
|
|
515
515
|
[n]
|
|
516
516
|
);
|
|
517
|
-
|
|
517
|
+
D(() => {
|
|
518
518
|
o(10);
|
|
519
519
|
}, [o]);
|
|
520
520
|
const s = N(
|
|
@@ -536,7 +536,7 @@ const Tn = () => {
|
|
|
536
536
|
[n]
|
|
537
537
|
);
|
|
538
538
|
return { thumbnailPages: t, addPage: s, addToPage: o, thumbnailLength: r };
|
|
539
|
-
},
|
|
539
|
+
}, On = et({
|
|
540
540
|
thumbnailPages: {},
|
|
541
541
|
addPage: (t) => {
|
|
542
542
|
},
|
|
@@ -546,20 +546,20 @@ const Tn = () => {
|
|
|
546
546
|
setActive: (t) => {
|
|
547
547
|
},
|
|
548
548
|
active: !1
|
|
549
|
-
}),
|
|
549
|
+
}), Dn = () => tt(On), bc = ({
|
|
550
550
|
children: t,
|
|
551
551
|
initialThumbnailsVisible: e
|
|
552
552
|
}) => {
|
|
553
|
-
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s } =
|
|
553
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s } = Zr(), [a, d] = $(e);
|
|
554
554
|
return /* @__PURE__ */ i(
|
|
555
|
-
|
|
555
|
+
On.Provider,
|
|
556
556
|
{
|
|
557
557
|
value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s, active: a, setActive: d },
|
|
558
558
|
children: t
|
|
559
559
|
}
|
|
560
560
|
);
|
|
561
|
-
},
|
|
562
|
-
const [n, r] = $(e), [o, s] = $(!1), { pdf: a, pages: d } = re(), { widths: c, heights: m } =
|
|
561
|
+
}, jr = (t = {}, e = "") => {
|
|
562
|
+
const [n, r] = $(e), [o, s] = $(!1), { pdf: a, pages: d } = re(), { widths: c, heights: m } = nt(), g = M(!n), { currentZoom: C } = ht(), [u, y] = $([]), { setFocusedPage: _ } = fe(), { columnCount: b } = je(), { pageRotate: T } = mt(), [P, p] = $(0), { pageScrollElementRef: h, virtualScrollableElementRef: f } = ft(), { scrollMode: l } = $e(), { pagesRef: v } = Ee(), w = M({}), I = M(0), S = k(() => P === 0 ? null : u[P - 1], [P, u]), x = k(() => u.length, [u]), L = N(
|
|
563
563
|
(E) => {
|
|
564
564
|
if (E === 0)
|
|
565
565
|
return;
|
|
@@ -572,23 +572,23 @@ const Tn = () => {
|
|
|
572
572
|
const G = d.get(R.page);
|
|
573
573
|
if (l === oe.PAGE_SCROLLING && _(R.page), !G)
|
|
574
574
|
return;
|
|
575
|
-
let H = 0,
|
|
575
|
+
let H = 0, V = 0;
|
|
576
576
|
if (l === oe.VERTICAL_SCROLLING) {
|
|
577
|
-
const J = R.page - 1, ee = b,
|
|
578
|
-
H =
|
|
577
|
+
const J = R.page - 1, ee = b, Te = J % ee, Ce = Math.floor(J / ee);
|
|
578
|
+
H = Be(m, Ce), V = Be(c, Te);
|
|
579
579
|
}
|
|
580
|
-
l === oe.HORIZONTAL_SCROLLING && (
|
|
580
|
+
l === oe.HORIZONTAL_SCROLLING && (V = c.slice(0, R.page - 1).reduce((J, ee) => J + ee, 0));
|
|
581
581
|
const X = {
|
|
582
582
|
height: m[R.page - 1],
|
|
583
583
|
width: c[R.page - 1]
|
|
584
|
-
},
|
|
584
|
+
}, B = T[R.page], { leftInPage: se, topInPage: q } = vr(
|
|
585
585
|
X,
|
|
586
586
|
v,
|
|
587
587
|
R.rect,
|
|
588
588
|
C,
|
|
589
|
-
|
|
590
|
-
),
|
|
591
|
-
left: Math.max(
|
|
589
|
+
B
|
|
590
|
+
), j = V + se, Y = H + q, te = {
|
|
591
|
+
left: Math.max(j, 0),
|
|
592
592
|
top: Math.max(Y, 0)
|
|
593
593
|
};
|
|
594
594
|
A.scrollTo({
|
|
@@ -608,20 +608,20 @@ const Tn = () => {
|
|
|
608
608
|
u
|
|
609
609
|
]
|
|
610
610
|
);
|
|
611
|
-
|
|
611
|
+
D(() => {
|
|
612
612
|
P && L(P);
|
|
613
613
|
}, [P]);
|
|
614
614
|
const O = N(() => {
|
|
615
615
|
p((E) => {
|
|
616
616
|
let R;
|
|
617
|
-
return
|
|
617
|
+
return x ? E + 1 > x ? R = 1 : R = E + 1 : R = 0, I.current = R, R;
|
|
618
618
|
}), I.current === 1 && L(I.current);
|
|
619
|
-
}, [
|
|
619
|
+
}, [x, L]), z = N(() => {
|
|
620
620
|
p((E) => {
|
|
621
621
|
let R;
|
|
622
|
-
return
|
|
622
|
+
return x ? E - 1 <= 0 ? R = x : R = E - 1 : R = 0, I.current = R, R;
|
|
623
623
|
}), I.current === 1 && L(I.current);
|
|
624
|
-
}, [
|
|
624
|
+
}, [x, L]), F = N(async (E) => {
|
|
625
625
|
if (!E)
|
|
626
626
|
return {};
|
|
627
627
|
const R = E.numPages, A = {};
|
|
@@ -633,7 +633,7 @@ const Tn = () => {
|
|
|
633
633
|
}
|
|
634
634
|
return A;
|
|
635
635
|
}, []);
|
|
636
|
-
return
|
|
636
|
+
return D(() => {
|
|
637
637
|
if (!n) {
|
|
638
638
|
g.current = !0, y([]), p(0);
|
|
639
639
|
return;
|
|
@@ -641,13 +641,13 @@ const Tn = () => {
|
|
|
641
641
|
g.current = !1, s(!0), y([]), p(0), F(a).then((E) => {
|
|
642
642
|
w.current = E;
|
|
643
643
|
const A = Object.keys(E).reduce((G, H) => {
|
|
644
|
-
const
|
|
644
|
+
const V = xo(
|
|
645
645
|
[n],
|
|
646
646
|
E[H],
|
|
647
647
|
Number(H) - 1,
|
|
648
648
|
t
|
|
649
|
-
).map((X,
|
|
650
|
-
return [...G, ...
|
|
649
|
+
).map((X, B) => ({ ...X, page: Number(H), pageMatchIdx: B }));
|
|
650
|
+
return [...G, ...V];
|
|
651
651
|
}, []);
|
|
652
652
|
y(A), p(A.length ? 1 : 0);
|
|
653
653
|
}).catch(() => {
|
|
@@ -658,14 +658,14 @@ const Tn = () => {
|
|
|
658
658
|
setSearch: r,
|
|
659
659
|
loading: o,
|
|
660
660
|
matches: u,
|
|
661
|
-
totalMatches:
|
|
661
|
+
totalMatches: x,
|
|
662
662
|
currentMatchPosition: P,
|
|
663
|
-
currentMatch:
|
|
663
|
+
currentMatch: S,
|
|
664
664
|
nextMatch: O,
|
|
665
|
-
prevMatch:
|
|
665
|
+
prevMatch: z,
|
|
666
666
|
setCurrentMatchPosition: p
|
|
667
667
|
};
|
|
668
|
-
},
|
|
668
|
+
}, zn = et({
|
|
669
669
|
search: "",
|
|
670
670
|
setSearch: (t) => {
|
|
671
671
|
},
|
|
@@ -681,7 +681,7 @@ const Tn = () => {
|
|
|
681
681
|
searchOptions: {},
|
|
682
682
|
setSearchOptions: (t) => t,
|
|
683
683
|
setCurrentMatchPosition: (t) => t
|
|
684
|
-
}),
|
|
684
|
+
}), Tc = ({
|
|
685
685
|
children: t,
|
|
686
686
|
initialSearch: e
|
|
687
687
|
}) => {
|
|
@@ -696,9 +696,9 @@ const Tn = () => {
|
|
|
696
696
|
nextMatch: C,
|
|
697
697
|
prevMatch: u,
|
|
698
698
|
setCurrentMatchPosition: y
|
|
699
|
-
} =
|
|
699
|
+
} = jr(n, e);
|
|
700
700
|
return /* @__PURE__ */ i(
|
|
701
|
-
|
|
701
|
+
zn.Provider,
|
|
702
702
|
{
|
|
703
703
|
value: {
|
|
704
704
|
searchOptions: n,
|
|
@@ -717,10 +717,10 @@ const Tn = () => {
|
|
|
717
717
|
children: t
|
|
718
718
|
}
|
|
719
719
|
);
|
|
720
|
-
},
|
|
720
|
+
}, $t = () => tt(zn), An = et(null), Cc = ({ children: t }) => {
|
|
721
721
|
const e = M(!1), [n, r] = $([]), o = N((c) => {
|
|
722
722
|
r((m) => [...m, { id: c.page.pageNumber.toString(), data: c, priority: 0 }]);
|
|
723
|
-
}, []), s = k(() => new
|
|
723
|
+
}, []), s = k(() => new Oo(o), [o]), { focusedPage: a } = fe(), d = N((c) => (e.current = !0, Do(
|
|
724
724
|
c.data.page,
|
|
725
725
|
c.data.canvasElem,
|
|
726
726
|
c.data.options
|
|
@@ -729,9 +729,9 @@ const Tn = () => {
|
|
|
729
729
|
}).finally(() => {
|
|
730
730
|
c.data.onLoaded && c.data.onLoaded();
|
|
731
731
|
})), []);
|
|
732
|
-
return
|
|
732
|
+
return D(() => {
|
|
733
733
|
a && (s.changePagePriority(`^page-${a}`, 0), s.changePagePriority(`^thumbnail-${a}`, 1));
|
|
734
|
-
}, [a]),
|
|
734
|
+
}, [a]), D(() => {
|
|
735
735
|
if (s.isEmpty() || e.current)
|
|
736
736
|
return;
|
|
737
737
|
const c = () => {
|
|
@@ -741,13 +741,13 @@ const Tn = () => {
|
|
|
741
741
|
}) : (e.current = !1, r(s.peekAll()));
|
|
742
742
|
};
|
|
743
743
|
c();
|
|
744
|
-
}, [s, d, n]), /* @__PURE__ */ i(
|
|
745
|
-
},
|
|
746
|
-
const t =
|
|
744
|
+
}, [s, d, n]), /* @__PURE__ */ i(An.Provider, { value: s, children: t });
|
|
745
|
+
}, Fn = () => {
|
|
746
|
+
const t = tt(An);
|
|
747
747
|
if (!t)
|
|
748
748
|
throw new Error("RenderQueue not found");
|
|
749
749
|
return t;
|
|
750
|
-
},
|
|
750
|
+
}, de = {
|
|
751
751
|
"rp-pages": "_rp-pages_u7m2r_1",
|
|
752
752
|
"rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_u7m2r_6",
|
|
753
753
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_u7m2r_11",
|
|
@@ -758,13 +758,13 @@ const Tn = () => {
|
|
|
758
758
|
"rp-loader": "_rp-loader_u7m2r_78",
|
|
759
759
|
"rp-not-supported": "_rp-not-supported_u7m2r_86",
|
|
760
760
|
"rp-not-supported-content": "_rp-not-supported-content_u7m2r_102"
|
|
761
|
-
},
|
|
761
|
+
}, Ct = {
|
|
762
762
|
"rp-page-wrapper": "_rp-page-wrapper_ii91u_1",
|
|
763
763
|
"rp-page": "_rp-page_ii91u_1",
|
|
764
764
|
"rp-loader-wrapper": "_rp-loader-wrapper_ii91u_15"
|
|
765
|
-
},
|
|
766
|
-
const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = M(null), { pages: s } = re(), { pageRotate: a } =
|
|
767
|
-
return
|
|
765
|
+
}, Kr = (t) => {
|
|
766
|
+
const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = M(null), { pages: s } = re(), { pageRotate: a } = mt(), d = M(), { currentZoom: c } = ht(), { interactiveForm: m } = Dt(), g = Fn(), C = M(`page-${e}`);
|
|
767
|
+
return D(() => {
|
|
768
768
|
if (!s || c === 0)
|
|
769
769
|
return;
|
|
770
770
|
const u = s.get(e);
|
|
@@ -792,33 +792,33 @@ const Tn = () => {
|
|
|
792
792
|
g.removeQueue(C.current);
|
|
793
793
|
};
|
|
794
794
|
}, [s, e, a, c, r, n, g, m]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
|
|
795
|
-
},
|
|
795
|
+
}, Xr = "_selecting_ppr5g_10", Qr = "_markedContent_ppr5g_33", Re = {
|
|
796
796
|
"rp-text-layer": "_rp-text-layer_ppr5g_1",
|
|
797
|
-
selecting:
|
|
798
|
-
markedContent:
|
|
797
|
+
selecting: Xr,
|
|
798
|
+
markedContent: Qr,
|
|
799
799
|
"rp-text-layer-text": "_rp-text-layer-text_ppr5g_52"
|
|
800
|
-
},
|
|
801
|
-
const { pageNumber: e } = t, { pages: n } = re(), r = M(null), { matches: o, currentMatch: s } =
|
|
800
|
+
}, Yr = (t) => {
|
|
801
|
+
const { pageNumber: e } = t, { pages: n } = re(), r = M(null), { matches: o, currentMatch: s } = $t(), [a, d] = $(
|
|
802
802
|
[]
|
|
803
803
|
), c = M(), m = M(), g = M([]), C = k(() => o.filter((p) => p.pageIndex === e - 1), [o, e]), u = N(
|
|
804
804
|
(p, h, f = !1) => {
|
|
805
|
-
if (f &&
|
|
805
|
+
if (f && So(p, h), !C.length) {
|
|
806
806
|
g.current = [], d([]);
|
|
807
807
|
return;
|
|
808
808
|
}
|
|
809
|
-
const l =
|
|
809
|
+
const l = Ro(C, p, h);
|
|
810
810
|
d(l);
|
|
811
811
|
},
|
|
812
812
|
[C]
|
|
813
813
|
), y = M(), _ = M(!1), b = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
814
|
-
|
|
814
|
+
D(() => ((() => {
|
|
815
815
|
if (y.current)
|
|
816
816
|
return;
|
|
817
817
|
y.current = new AbortController();
|
|
818
818
|
const { signal: h } = y.current, f = () => {
|
|
819
819
|
b().forEach((v) => {
|
|
820
820
|
const w = v.querySelector(".endOfContent");
|
|
821
|
-
w && (v.appendChild(w), w.style.width = "", w.style.height = "", v.classList.remove(
|
|
821
|
+
w && (v.appendChild(w), w.style.width = "", w.style.height = "", v.classList.remove(Re.selecting));
|
|
822
822
|
});
|
|
823
823
|
};
|
|
824
824
|
document.addEventListener(
|
|
@@ -850,7 +850,7 @@ const Tn = () => {
|
|
|
850
850
|
document.addEventListener(
|
|
851
851
|
"selectionchange",
|
|
852
852
|
() => {
|
|
853
|
-
var
|
|
853
|
+
var z, F;
|
|
854
854
|
const v = document.getSelection();
|
|
855
855
|
if (!v)
|
|
856
856
|
return;
|
|
@@ -867,19 +867,19 @@ const Tn = () => {
|
|
|
867
867
|
}
|
|
868
868
|
b().forEach((E) => {
|
|
869
869
|
if (w.has(E))
|
|
870
|
-
E.classList.add(
|
|
870
|
+
E.classList.add(Re.selecting);
|
|
871
871
|
else {
|
|
872
872
|
const R = E.querySelector(".endOfContent");
|
|
873
|
-
R && (E.appendChild(R), R.style.width = "", R.style.height = "", E.classList.remove(
|
|
873
|
+
R && (E.appendChild(R), R.style.width = "", R.style.height = "", E.classList.remove(Re.selecting));
|
|
874
874
|
}
|
|
875
875
|
});
|
|
876
876
|
const I = v.getRangeAt(0);
|
|
877
|
-
let
|
|
878
|
-
|
|
879
|
-
const L = (
|
|
880
|
-
|
|
877
|
+
let x = l && (I.compareBoundaryPoints(Range.END_TO_END, l) === 0 || I.compareBoundaryPoints(Range.START_TO_END, l) === 0) ? I.startContainer : I.endContainer;
|
|
878
|
+
x.nodeType === Node.TEXT_NODE && (x = x.parentNode);
|
|
879
|
+
const L = (z = x.parentElement) == null ? void 0 : z.closest(
|
|
880
|
+
Re["rp-text-layer"]
|
|
881
881
|
), O = L == null ? void 0 : L.querySelector(".endOfContent");
|
|
882
|
-
O && L && (O.style.width = L.style.width, O.style.height = L.style.height, (F =
|
|
882
|
+
O && L && (O.style.width = L.style.width, O.style.height = L.style.height, (F = x.parentElement) == null || F.insertBefore(O, x.nextSibling)), l = I.cloneRange();
|
|
883
883
|
},
|
|
884
884
|
{ signal: h }
|
|
885
885
|
);
|
|
@@ -888,11 +888,11 @@ const Tn = () => {
|
|
|
888
888
|
(h = y.current) == null || h.abort(), y.current = void 0;
|
|
889
889
|
}), [b]);
|
|
890
890
|
const T = N(() => {
|
|
891
|
-
r.current && r.current.classList.add(
|
|
891
|
+
r.current && r.current.classList.add(Re.selecting);
|
|
892
892
|
}, []), P = N(() => {
|
|
893
|
-
r.current && r.current.classList.remove(
|
|
893
|
+
r.current && r.current.classList.remove(Re.selecting);
|
|
894
894
|
}, []);
|
|
895
|
-
return
|
|
895
|
+
return D(() => {
|
|
896
896
|
if (g.current.forEach((f) => {
|
|
897
897
|
f.classList.remove("selected");
|
|
898
898
|
}), !a.length || !s || s.pageIndex !== e - 1)
|
|
@@ -906,22 +906,22 @@ const Tn = () => {
|
|
|
906
906
|
h.length && (g.current = h.map((f) => f.element), h.forEach((f) => {
|
|
907
907
|
f.element.classList.add("selected");
|
|
908
908
|
}));
|
|
909
|
-
}, [s, a, C]),
|
|
909
|
+
}, [s, a, C]), D(() => {
|
|
910
910
|
const p = n.get(e);
|
|
911
911
|
if (!p || !r.current)
|
|
912
912
|
return;
|
|
913
913
|
const h = r.current;
|
|
914
914
|
return c.current && c.current.cancel(), p.page.getTextContent().then((f) => {
|
|
915
915
|
const l = p.page.getViewport({ scale: 1 });
|
|
916
|
-
return c.current = new
|
|
916
|
+
return c.current = new Wo.TextLayer({
|
|
917
917
|
viewport: l,
|
|
918
918
|
textContentSource: f,
|
|
919
919
|
container: h
|
|
920
920
|
}), m.current = f, h && (h.innerText = ""), c.current.render();
|
|
921
921
|
}).then(() => {
|
|
922
922
|
var w, I;
|
|
923
|
-
[].slice.call(h.children).forEach((
|
|
924
|
-
|
|
923
|
+
[].slice.call(h.children).forEach((S) => {
|
|
924
|
+
S.classList.add(Re["rp-text-layer-text"]), S.setAttribute("data-rp", "rp-text-layer-text");
|
|
925
925
|
});
|
|
926
926
|
const l = (w = c.current) == null ? void 0 : w.textDivs;
|
|
927
927
|
l && m.current && u(m.current, l);
|
|
@@ -932,10 +932,10 @@ const Tn = () => {
|
|
|
932
932
|
var f;
|
|
933
933
|
(f = c.current) == null || f.cancel();
|
|
934
934
|
};
|
|
935
|
-
}, [n, e]),
|
|
935
|
+
}, [n, e]), D(() => {
|
|
936
936
|
var f;
|
|
937
937
|
[].slice.call(r.current.children).forEach((l) => {
|
|
938
|
-
l.classList.add(
|
|
938
|
+
l.classList.add(Re["rp-text-layer-text"]);
|
|
939
939
|
});
|
|
940
940
|
const h = (f = c.current) == null ? void 0 : f.textDivs;
|
|
941
941
|
h && m.current && u(m.current, h, !0);
|
|
@@ -944,35 +944,35 @@ const Tn = () => {
|
|
|
944
944
|
{
|
|
945
945
|
"data-rp-text-layer": !0,
|
|
946
946
|
"data-rp": `page-${e}-textLayer`,
|
|
947
|
-
className:
|
|
947
|
+
className: Re["rp-text-layer"],
|
|
948
948
|
ref: r,
|
|
949
949
|
onMouseDown: T,
|
|
950
950
|
onMouseUp: P
|
|
951
951
|
}
|
|
952
952
|
);
|
|
953
|
-
},
|
|
953
|
+
}, Jr = {
|
|
954
954
|
"rp-annotation-layer": "_rp-annotation-layer_1udza_1"
|
|
955
955
|
};
|
|
956
|
-
let
|
|
957
|
-
const
|
|
958
|
-
const { pageNumber: e } = t, n = M(null), { pages: r, pdf: o } = re(), { interactiveForm: s } =
|
|
959
|
-
|
|
956
|
+
let ei = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
957
|
+
const ti = (t) => {
|
|
958
|
+
const { pageNumber: e } = t, n = M(null), { pages: r, pdf: o } = re(), { interactiveForm: s } = Dt(), a = M(), [d, c] = $(), { setFocusedPage: m, goToPage: g } = fe(), { scrollMode: C } = $e(), { print: u } = vt(), { download: y } = to(), _ = k(() => r.get(e), [r, e]), b = k(() => _ == null ? void 0 : _.page.getViewport(), [_]);
|
|
959
|
+
D(() => {
|
|
960
960
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
961
|
-
}, [o]),
|
|
961
|
+
}, [o]), D(() => {
|
|
962
962
|
_ && _.page.getAnnotations().then((P) => {
|
|
963
963
|
a.current = void 0, c(P), n.current && (n.current.innerText = "");
|
|
964
964
|
});
|
|
965
965
|
}, [_]);
|
|
966
966
|
const T = N(
|
|
967
967
|
(P) => {
|
|
968
|
-
!d || !o || (
|
|
968
|
+
!d || !o || (nr(P), or(P, o, d).then((p) => {
|
|
969
969
|
var h, f;
|
|
970
970
|
((h = p == null ? void 0 : p.data) == null ? void 0 : h.action) === "Print" ? u() : ((f = p == null ? void 0 : p.data) == null ? void 0 : f.action) === "SaveAs" && y();
|
|
971
|
-
}), C === oe.PAGE_SCROLLING ?
|
|
971
|
+
}), C === oe.PAGE_SCROLLING ? Yt(P, d, o, (p) => m(p.pageIndex + 1)) : Yt(P, d, o, (p) => g(p.pageIndex + 1)));
|
|
972
972
|
},
|
|
973
973
|
[o, d, g, m, C, u, y]
|
|
974
974
|
);
|
|
975
|
-
return
|
|
975
|
+
return D(() => {
|
|
976
976
|
if (!_ || !d)
|
|
977
977
|
return;
|
|
978
978
|
const P = _.page.getViewport();
|
|
@@ -986,18 +986,18 @@ const Kr = (t) => {
|
|
|
986
986
|
for (const l of d) {
|
|
987
987
|
const { annotationType: v } = l;
|
|
988
988
|
switch (v) {
|
|
989
|
-
case
|
|
990
|
-
|
|
989
|
+
case Zt.Link:
|
|
990
|
+
ir(l);
|
|
991
991
|
break;
|
|
992
|
-
case
|
|
993
|
-
|
|
992
|
+
case Zt.Widget:
|
|
993
|
+
rr(l, P, p);
|
|
994
994
|
break;
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
const h = new AbortController();
|
|
998
998
|
return (async () => {
|
|
999
999
|
var w;
|
|
1000
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new
|
|
1000
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Go({
|
|
1001
1001
|
div: n.current,
|
|
1002
1002
|
accessibilityManager: void 0,
|
|
1003
1003
|
annotationCanvasMap: void 0,
|
|
@@ -1005,7 +1005,7 @@ const Kr = (t) => {
|
|
|
1005
1005
|
structTreeLayer: null,
|
|
1006
1006
|
page: _.page,
|
|
1007
1007
|
viewport: P.clone({ dontFlip: !0 })
|
|
1008
|
-
}), n.current &&
|
|
1008
|
+
}), n.current && Jt(n.current, T);
|
|
1009
1009
|
const l = await (o == null ? void 0 : o.hasJSActions()), v = await (o == null ? void 0 : o.getFieldObjects());
|
|
1010
1010
|
if (h.signal.aborted)
|
|
1011
1011
|
throw "abort";
|
|
@@ -1017,36 +1017,36 @@ const Kr = (t) => {
|
|
|
1017
1017
|
div: n.current,
|
|
1018
1018
|
viewport: P.clone({ dontFlip: !0 }),
|
|
1019
1019
|
page: _.page,
|
|
1020
|
-
imageResourcesPath:
|
|
1020
|
+
imageResourcesPath: ei,
|
|
1021
1021
|
renderForms: s ?? !0,
|
|
1022
|
-
linkService: new
|
|
1022
|
+
linkService: new tr(),
|
|
1023
1023
|
downloadManager: null,
|
|
1024
1024
|
enableScripting: !1
|
|
1025
1025
|
});
|
|
1026
1026
|
})().then(() => {
|
|
1027
|
-
n.current &&
|
|
1027
|
+
n.current && sr(n.current, T);
|
|
1028
1028
|
}).catch((l) => {
|
|
1029
1029
|
if (l !== "abort")
|
|
1030
1030
|
throw l;
|
|
1031
1031
|
}), () => {
|
|
1032
|
-
h.abort("clear"), n.current &&
|
|
1032
|
+
h.abort("clear"), n.current && Jt(n.current, T);
|
|
1033
1033
|
};
|
|
1034
1034
|
}, [o, d, T]), /* @__PURE__ */ i(
|
|
1035
1035
|
"div",
|
|
1036
1036
|
{
|
|
1037
1037
|
"data-rp": `page-${e}-annotationLayer`,
|
|
1038
1038
|
style: { width: `${b == null ? void 0 : b.width}px`, height: `${b == null ? void 0 : b.height}px` },
|
|
1039
|
-
className:
|
|
1039
|
+
className: Jr["rp-annotation-layer"],
|
|
1040
1040
|
ref: n
|
|
1041
1041
|
}
|
|
1042
1042
|
);
|
|
1043
|
-
},
|
|
1043
|
+
}, ni = {
|
|
1044
1044
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1045
|
-
},
|
|
1046
|
-
const [n, r] = $(), { pages: o } = re(), { highlightKeywords: s } =
|
|
1047
|
-
|
|
1045
|
+
}, oi = ({ pageNumber: t, viewport: e }) => {
|
|
1046
|
+
const [n, r] = $(), { pages: o } = re(), { highlightKeywords: s } = Eo(), a = !0, d = M(null), [c, m] = $(null), [g, C] = $([]);
|
|
1047
|
+
D(() => {
|
|
1048
1048
|
d.current && m(d.current.parentElement);
|
|
1049
|
-
}, [d]),
|
|
1049
|
+
}, [d]), D(() => {
|
|
1050
1050
|
(async () => {
|
|
1051
1051
|
const h = o.get(t);
|
|
1052
1052
|
if (!h || !d.current)
|
|
@@ -1058,7 +1058,7 @@ const Kr = (t) => {
|
|
|
1058
1058
|
const u = k(() => s ? s.map((p) => {
|
|
1059
1059
|
var h, f;
|
|
1060
1060
|
return {
|
|
1061
|
-
...
|
|
1061
|
+
...ar(p.keyword, (h = p.options) == null ? void 0 : h.matchCase, (f = p.options) == null ? void 0 : f.wholeWords),
|
|
1062
1062
|
color: p.highlightColor
|
|
1063
1063
|
};
|
|
1064
1064
|
}) : [], [s]);
|
|
@@ -1072,9 +1072,9 @@ const Kr = (t) => {
|
|
|
1072
1072
|
l(v);
|
|
1073
1073
|
return;
|
|
1074
1074
|
}
|
|
1075
|
-
new MutationObserver((I,
|
|
1076
|
-
const
|
|
1077
|
-
|
|
1075
|
+
new MutationObserver((I, S) => {
|
|
1076
|
+
const x = p.querySelector(f);
|
|
1077
|
+
x && (l(x), S.disconnect());
|
|
1078
1078
|
}).observe(p, { childList: !0, subtree: !0 });
|
|
1079
1079
|
});
|
|
1080
1080
|
}
|
|
@@ -1096,18 +1096,18 @@ const Kr = (t) => {
|
|
|
1096
1096
|
});
|
|
1097
1097
|
}
|
|
1098
1098
|
const b = (p, h, f, l) => {
|
|
1099
|
-
var
|
|
1099
|
+
var V;
|
|
1100
1100
|
const v = document.createRange(), w = f.firstChild;
|
|
1101
1101
|
if (!w || w.nodeType !== Node.TEXT_NODE)
|
|
1102
1102
|
return null;
|
|
1103
|
-
const I = ((
|
|
1104
|
-
if (
|
|
1103
|
+
const I = ((V = w.textContent) == null ? void 0 : V.length) ?? 0, S = l[0].charIdxInSpan, x = l.length === 1 ? S : l[l.length - 1].charIdxInSpan;
|
|
1104
|
+
if (S > I || x + 1 > I)
|
|
1105
1105
|
return null;
|
|
1106
|
-
v.setStart(w,
|
|
1106
|
+
v.setStart(w, S), v.setEnd(w, x + 1);
|
|
1107
1107
|
const L = document.createElement("span");
|
|
1108
1108
|
L.style.width = "auto", v.surroundContents(L);
|
|
1109
|
-
const O = L.getBoundingClientRect(),
|
|
1110
|
-
return
|
|
1109
|
+
const O = L.getBoundingClientRect(), z = p.getBoundingClientRect(), F = z.height, E = z.width, R = 100 * (O.left - z.left) / E, A = 100 * (O.top - z.top) / F, G = 100 * O.height / F, H = 100 * O.width / E;
|
|
1110
|
+
return lr(L), {
|
|
1111
1111
|
keywordStr: h,
|
|
1112
1112
|
left: R,
|
|
1113
1113
|
top: A,
|
|
@@ -1124,11 +1124,11 @@ const Kr = (t) => {
|
|
|
1124
1124
|
const l = await _(f);
|
|
1125
1125
|
if (l.length) {
|
|
1126
1126
|
const v = l.map((I) => I.tagName === "BR" ? " " : I.textContent).reduce(
|
|
1127
|
-
(I,
|
|
1128
|
-
|
|
1127
|
+
(I, S, x) => I.concat(
|
|
1128
|
+
S.split("").map((L, O) => ({
|
|
1129
1129
|
char: L,
|
|
1130
1130
|
charIdxInSpan: O,
|
|
1131
|
-
spanIdx:
|
|
1131
|
+
spanIdx: x
|
|
1132
1132
|
}))
|
|
1133
1133
|
),
|
|
1134
1134
|
[
|
|
@@ -1146,16 +1146,16 @@ const Kr = (t) => {
|
|
|
1146
1146
|
const v = h.length;
|
|
1147
1147
|
if (!l.length || !v)
|
|
1148
1148
|
return [];
|
|
1149
|
-
const w = [], I = l.map((
|
|
1150
|
-
return u.forEach((
|
|
1151
|
-
const { keyword:
|
|
1149
|
+
const w = [], I = l.map((S) => S.char).join("");
|
|
1150
|
+
return u.forEach((S) => {
|
|
1151
|
+
const { keyword: x, regExp: L, wholeWords: O, color: z } = S, F = x;
|
|
1152
1152
|
if (!F.trim())
|
|
1153
1153
|
return;
|
|
1154
1154
|
const E = L.flags.indexOf("g") === -1 ? new RegExp(L, `${L.flags}g`) : L;
|
|
1155
1155
|
let R;
|
|
1156
1156
|
const A = [];
|
|
1157
1157
|
for (; (R = E.exec(I)) !== null; )
|
|
1158
|
-
O && !
|
|
1158
|
+
O && !Lo(I, R.index, R[0].length) || A.push({
|
|
1159
1159
|
keyword: E,
|
|
1160
1160
|
startIndex: R.index,
|
|
1161
1161
|
endIndex: E.lastIndex
|
|
@@ -1163,32 +1163,32 @@ const Kr = (t) => {
|
|
|
1163
1163
|
const G = A.map((H) => ({
|
|
1164
1164
|
keyword: H.keyword,
|
|
1165
1165
|
indexes: l.slice(H.startIndex, H.endIndex),
|
|
1166
|
-
color:
|
|
1166
|
+
color: z
|
|
1167
1167
|
}));
|
|
1168
1168
|
for (const H of G) {
|
|
1169
|
-
const
|
|
1170
|
-
(X,
|
|
1169
|
+
const V = H.indexes.reduce(
|
|
1170
|
+
(X, B) => (X[B.spanIdx] = (X[B.spanIdx] || []).concat([B]), X),
|
|
1171
1171
|
{}
|
|
1172
1172
|
);
|
|
1173
|
-
for (const X of Object.values(
|
|
1173
|
+
for (const X of Object.values(V))
|
|
1174
1174
|
if (X.length !== 1 || X[0].char.trim() !== "") {
|
|
1175
|
-
const
|
|
1175
|
+
const B = X, se = f[B[0].spanIdx], q = b(
|
|
1176
1176
|
p,
|
|
1177
1177
|
F,
|
|
1178
|
-
|
|
1179
|
-
|
|
1178
|
+
se,
|
|
1179
|
+
B
|
|
1180
1180
|
);
|
|
1181
1181
|
if (q) {
|
|
1182
|
-
const { left:
|
|
1183
|
-
if (w.find((J) => J.left ===
|
|
1182
|
+
const { left: j, top: Y } = q;
|
|
1183
|
+
if (w.find((J) => J.left === j && J.top === Y))
|
|
1184
1184
|
continue;
|
|
1185
1185
|
w.push({ ...q, highlightColor: H.color });
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
|
-
}), w.sort(
|
|
1189
|
+
}), w.sort(cr), w;
|
|
1190
1190
|
};
|
|
1191
|
-
return
|
|
1191
|
+
return D(() => {
|
|
1192
1192
|
(async () => {
|
|
1193
1193
|
if (!s || s.length === 0) {
|
|
1194
1194
|
C([]);
|
|
@@ -1200,10 +1200,10 @@ const Kr = (t) => {
|
|
|
1200
1200
|
console.error(h);
|
|
1201
1201
|
}
|
|
1202
1202
|
})();
|
|
1203
|
-
}, [a, s, t, n, e]), /* @__PURE__ */ i(
|
|
1203
|
+
}, [a, s, t, n, e]), /* @__PURE__ */ i(ve, { children: /* @__PURE__ */ i("div", { ref: d, "data-rp": `page-${t}-textHighlightLayer`, children: g.map((p, h) => /* @__PURE__ */ i(
|
|
1204
1204
|
"div",
|
|
1205
1205
|
{
|
|
1206
|
-
className:
|
|
1206
|
+
className: ni["rp-text-highlight"],
|
|
1207
1207
|
style: {
|
|
1208
1208
|
top: `${p.top}%`,
|
|
1209
1209
|
left: `${p.left}%`,
|
|
@@ -1214,14 +1214,14 @@ const Kr = (t) => {
|
|
|
1214
1214
|
},
|
|
1215
1215
|
h
|
|
1216
1216
|
)) }) });
|
|
1217
|
-
},
|
|
1218
|
-
const { pageNumber: n, style: r, ...o } = t, { pages: s } = re(), { pageRotate: a } =
|
|
1217
|
+
}, Gt = gt((t, e) => {
|
|
1218
|
+
const { pageNumber: n, style: r, ...o } = t, { pages: s } = re(), { pageRotate: a } = mt(), { textLayer: d } = Po(), { currentZoom: c } = ht(), { LoaderImageComponent: m } = zt(), g = M(s.get(n)), [C, u] = $(!1), y = M(null), [_, b] = $({
|
|
1219
1219
|
width: 0,
|
|
1220
1220
|
height: 0
|
|
1221
1221
|
});
|
|
1222
|
-
|
|
1222
|
+
_n(e, () => y.current);
|
|
1223
1223
|
const T = k(() => g.current ? a[n] : 0, [n, a]);
|
|
1224
|
-
|
|
1224
|
+
D(() => {
|
|
1225
1225
|
if (s && (g.current = s.get(n), g.current)) {
|
|
1226
1226
|
const f = g.current.page.getViewport({
|
|
1227
1227
|
scale: c,
|
|
@@ -1258,7 +1258,7 @@ const Kr = (t) => {
|
|
|
1258
1258
|
"--rp-page-rotate-translate": `${P}`,
|
|
1259
1259
|
"--scale-factor": c
|
|
1260
1260
|
},
|
|
1261
|
-
className:
|
|
1261
|
+
className: Ct["rp-page-wrapper"],
|
|
1262
1262
|
children: /* @__PURE__ */ W(
|
|
1263
1263
|
"div",
|
|
1264
1264
|
{
|
|
@@ -1266,59 +1266,59 @@ const Kr = (t) => {
|
|
|
1266
1266
|
width: `${_.width}px`,
|
|
1267
1267
|
height: `${_.height}px`
|
|
1268
1268
|
},
|
|
1269
|
-
className:
|
|
1269
|
+
className: Ct["rp-page"],
|
|
1270
1270
|
children: [
|
|
1271
|
-
/* @__PURE__ */ i(
|
|
1272
|
-
C && m && /* @__PURE__ */ i("div", { className:
|
|
1273
|
-
/* @__PURE__ */ i(
|
|
1274
|
-
d && /* @__PURE__ */ i(
|
|
1275
|
-
/* @__PURE__ */ i(
|
|
1276
|
-
/* @__PURE__ */ i(
|
|
1271
|
+
/* @__PURE__ */ i(Kr, { onLoading: p, onLoaded: h, pageNumber: n }),
|
|
1272
|
+
C && m && /* @__PURE__ */ i("div", { className: Ct["rp-loader-wrapper"], children: /* @__PURE__ */ i(m, {}) }),
|
|
1273
|
+
/* @__PURE__ */ i(dr, { pageNumber: n }),
|
|
1274
|
+
d && /* @__PURE__ */ i(Yr, { pageNumber: n }),
|
|
1275
|
+
/* @__PURE__ */ i(oi, { pageNumber: n, viewport: _ }),
|
|
1276
|
+
/* @__PURE__ */ i(ti, { pageNumber: n })
|
|
1277
1277
|
]
|
|
1278
1278
|
}
|
|
1279
1279
|
)
|
|
1280
1280
|
}
|
|
1281
1281
|
);
|
|
1282
1282
|
});
|
|
1283
|
-
function
|
|
1284
|
-
return
|
|
1283
|
+
function Lt() {
|
|
1284
|
+
return Lt = Object.assign ? Object.assign.bind() : function(t) {
|
|
1285
1285
|
for (var e = 1; e < arguments.length; e++) {
|
|
1286
1286
|
var n = arguments[e];
|
|
1287
1287
|
for (var r in n)
|
|
1288
1288
|
({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
|
|
1289
1289
|
}
|
|
1290
1290
|
return t;
|
|
1291
|
-
},
|
|
1291
|
+
}, Lt.apply(null, arguments);
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function tn(t) {
|
|
1294
1294
|
if (t === void 0)
|
|
1295
1295
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1296
1296
|
return t;
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1299
|
-
return
|
|
1298
|
+
function Et(t, e) {
|
|
1299
|
+
return Et = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
|
|
1300
1300
|
return n.__proto__ = r, n;
|
|
1301
|
-
},
|
|
1301
|
+
}, Et(t, e);
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1304
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
1303
|
+
function ri(t, e) {
|
|
1304
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, Et(t, e);
|
|
1305
1305
|
}
|
|
1306
|
-
var
|
|
1306
|
+
var nn = Number.isNaN || function(e) {
|
|
1307
1307
|
return typeof e == "number" && e !== e;
|
|
1308
1308
|
};
|
|
1309
|
-
function
|
|
1310
|
-
return !!(t === e ||
|
|
1309
|
+
function ii(t, e) {
|
|
1310
|
+
return !!(t === e || nn(t) && nn(e));
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function si(t, e) {
|
|
1313
1313
|
if (t.length !== e.length)
|
|
1314
1314
|
return !1;
|
|
1315
1315
|
for (var n = 0; n < t.length; n++)
|
|
1316
|
-
if (!
|
|
1316
|
+
if (!ii(t[n], e[n]))
|
|
1317
1317
|
return !1;
|
|
1318
1318
|
return !0;
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1321
|
-
e === void 0 && (e =
|
|
1320
|
+
function Pt(t, e) {
|
|
1321
|
+
e === void 0 && (e = si);
|
|
1322
1322
|
var n, r = [], o, s = !1;
|
|
1323
1323
|
function a() {
|
|
1324
1324
|
for (var d = [], c = 0; c < arguments.length; c++)
|
|
@@ -1327,7 +1327,7 @@ function ht(t, e) {
|
|
|
1327
1327
|
}
|
|
1328
1328
|
return a;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function on(t, e) {
|
|
1331
1331
|
if (t == null)
|
|
1332
1332
|
return {};
|
|
1333
1333
|
var n = {};
|
|
@@ -1339,89 +1339,89 @@ function Kt(t, e) {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
return n;
|
|
1341
1341
|
}
|
|
1342
|
-
var
|
|
1342
|
+
var ai = typeof performance == "object" && typeof performance.now == "function", rn = ai ? function() {
|
|
1343
1343
|
return performance.now();
|
|
1344
1344
|
} : function() {
|
|
1345
1345
|
return Date.now();
|
|
1346
1346
|
};
|
|
1347
|
-
function
|
|
1347
|
+
function sn(t) {
|
|
1348
1348
|
cancelAnimationFrame(t.id);
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1351
|
-
var n =
|
|
1350
|
+
function ci(t, e) {
|
|
1351
|
+
var n = rn();
|
|
1352
1352
|
function r() {
|
|
1353
|
-
|
|
1353
|
+
rn() - n >= e ? t.call(null) : o.id = requestAnimationFrame(r);
|
|
1354
1354
|
}
|
|
1355
1355
|
var o = {
|
|
1356
1356
|
id: requestAnimationFrame(r)
|
|
1357
1357
|
};
|
|
1358
1358
|
return o;
|
|
1359
1359
|
}
|
|
1360
|
-
var
|
|
1361
|
-
function
|
|
1362
|
-
if (t === void 0 && (t = !1),
|
|
1360
|
+
var yt = -1;
|
|
1361
|
+
function li(t) {
|
|
1362
|
+
if (t === void 0 && (t = !1), yt === -1 || t) {
|
|
1363
1363
|
var e = document.createElement("div"), n = e.style;
|
|
1364
|
-
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e),
|
|
1364
|
+
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), yt = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
1365
1365
|
}
|
|
1366
|
-
return
|
|
1366
|
+
return yt;
|
|
1367
1367
|
}
|
|
1368
|
-
var
|
|
1369
|
-
function
|
|
1370
|
-
if (t === void 0 && (t = !1),
|
|
1368
|
+
var qe = null;
|
|
1369
|
+
function an(t) {
|
|
1370
|
+
if (t === void 0 && (t = !1), qe === null || t) {
|
|
1371
1371
|
var e = document.createElement("div"), n = e.style;
|
|
1372
1372
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1373
1373
|
var r = document.createElement("div"), o = r.style;
|
|
1374
|
-
return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ?
|
|
1374
|
+
return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? qe = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? qe = "negative" : qe = "positive-ascending"), document.body.removeChild(e), qe;
|
|
1375
1375
|
}
|
|
1376
|
-
return
|
|
1376
|
+
return qe;
|
|
1377
1377
|
}
|
|
1378
|
-
var
|
|
1378
|
+
var di = 150, ui = function(e) {
|
|
1379
1379
|
var n = e.columnIndex;
|
|
1380
1380
|
e.data;
|
|
1381
1381
|
var r = e.rowIndex;
|
|
1382
1382
|
return r + ":" + n;
|
|
1383
|
-
},
|
|
1384
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (
|
|
1385
|
-
function
|
|
1383
|
+
}, ct = null, lt = null, dt = null;
|
|
1384
|
+
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (ct = /* @__PURE__ */ new WeakSet(), lt = /* @__PURE__ */ new WeakSet(), dt = /* @__PURE__ */ new WeakSet());
|
|
1385
|
+
function pi(t) {
|
|
1386
1386
|
var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, s = t.getColumnWidth, a = t.getEstimatedTotalHeight, d = t.getEstimatedTotalWidth, c = t.getOffsetForColumnAndAlignment, m = t.getOffsetForRowAndAlignment, g = t.getRowHeight, C = t.getRowOffset, u = t.getRowStartIndexForOffset, y = t.getRowStopIndexForStartIndex, _ = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, T = t.validateProps;
|
|
1387
1387
|
return e = /* @__PURE__ */ function(P) {
|
|
1388
|
-
|
|
1388
|
+
ri(p, P);
|
|
1389
1389
|
function p(f) {
|
|
1390
1390
|
var l;
|
|
1391
|
-
return l = P.call(this, f) || this, l._instanceProps = _(l.props,
|
|
1392
|
-
instance:
|
|
1391
|
+
return l = P.call(this, f) || this, l._instanceProps = _(l.props, tn(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
|
|
1392
|
+
instance: tn(l),
|
|
1393
1393
|
isScrolling: !1,
|
|
1394
1394
|
horizontalScrollDirection: "forward",
|
|
1395
1395
|
scrollLeft: typeof l.props.initialScrollLeft == "number" ? l.props.initialScrollLeft : 0,
|
|
1396
1396
|
scrollTop: typeof l.props.initialScrollTop == "number" ? l.props.initialScrollTop : 0,
|
|
1397
1397
|
scrollUpdateWasRequested: !1,
|
|
1398
1398
|
verticalScrollDirection: "forward"
|
|
1399
|
-
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered =
|
|
1399
|
+
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered = Pt(function(v, w, I, S, x, L, O, z) {
|
|
1400
1400
|
return l.props.onItemsRendered({
|
|
1401
1401
|
overscanColumnStartIndex: v,
|
|
1402
1402
|
overscanColumnStopIndex: w,
|
|
1403
1403
|
overscanRowStartIndex: I,
|
|
1404
|
-
overscanRowStopIndex:
|
|
1405
|
-
visibleColumnStartIndex:
|
|
1404
|
+
overscanRowStopIndex: S,
|
|
1405
|
+
visibleColumnStartIndex: x,
|
|
1406
1406
|
visibleColumnStopIndex: L,
|
|
1407
1407
|
visibleRowStartIndex: O,
|
|
1408
|
-
visibleRowStopIndex:
|
|
1408
|
+
visibleRowStopIndex: z
|
|
1409
1409
|
});
|
|
1410
|
-
}), l._callOnScroll = void 0, l._callOnScroll =
|
|
1410
|
+
}), l._callOnScroll = void 0, l._callOnScroll = Pt(function(v, w, I, S, x) {
|
|
1411
1411
|
return l.props.onScroll({
|
|
1412
1412
|
horizontalScrollDirection: I,
|
|
1413
1413
|
scrollLeft: v,
|
|
1414
1414
|
scrollTop: w,
|
|
1415
|
-
verticalScrollDirection:
|
|
1416
|
-
scrollUpdateWasRequested:
|
|
1415
|
+
verticalScrollDirection: S,
|
|
1416
|
+
scrollUpdateWasRequested: x
|
|
1417
1417
|
});
|
|
1418
1418
|
}), l._getItemStyle = void 0, l._getItemStyle = function(v, w) {
|
|
1419
|
-
var I = l.props,
|
|
1420
|
-
if (O.hasOwnProperty(
|
|
1421
|
-
F = O[
|
|
1419
|
+
var I = l.props, S = I.columnWidth, x = I.direction, L = I.rowHeight, O = l._getItemStyleCache(b && S, b && x, b && L), z = v + ":" + w, F;
|
|
1420
|
+
if (O.hasOwnProperty(z))
|
|
1421
|
+
F = O[z];
|
|
1422
1422
|
else {
|
|
1423
|
-
var E = n(l.props, w, l._instanceProps), R =
|
|
1424
|
-
O[
|
|
1423
|
+
var E = n(l.props, w, l._instanceProps), R = x === "rtl";
|
|
1424
|
+
O[z] = F = {
|
|
1425
1425
|
position: "absolute",
|
|
1426
1426
|
left: R ? void 0 : E,
|
|
1427
1427
|
right: R ? E : void 0,
|
|
@@ -1431,28 +1431,28 @@ function si(t) {
|
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
1433
1433
|
return F;
|
|
1434
|
-
}, l._getItemStyleCache = void 0, l._getItemStyleCache =
|
|
1434
|
+
}, l._getItemStyleCache = void 0, l._getItemStyleCache = Pt(function(v, w, I) {
|
|
1435
1435
|
return {};
|
|
1436
1436
|
}), l._onScroll = function(v) {
|
|
1437
|
-
var w = v.currentTarget, I = w.clientHeight,
|
|
1437
|
+
var w = v.currentTarget, I = w.clientHeight, S = w.clientWidth, x = w.scrollLeft, L = w.scrollTop, O = w.scrollHeight, z = w.scrollWidth;
|
|
1438
1438
|
l.setState(function(F) {
|
|
1439
|
-
if (F.scrollLeft ===
|
|
1439
|
+
if (F.scrollLeft === x && F.scrollTop === L)
|
|
1440
1440
|
return null;
|
|
1441
|
-
var E = l.props.direction, R =
|
|
1441
|
+
var E = l.props.direction, R = x;
|
|
1442
1442
|
if (E === "rtl")
|
|
1443
|
-
switch (
|
|
1443
|
+
switch (an()) {
|
|
1444
1444
|
case "negative":
|
|
1445
|
-
R = -
|
|
1445
|
+
R = -x;
|
|
1446
1446
|
break;
|
|
1447
1447
|
case "positive-descending":
|
|
1448
|
-
R =
|
|
1448
|
+
R = z - S - x;
|
|
1449
1449
|
break;
|
|
1450
1450
|
}
|
|
1451
|
-
R = Math.max(0, Math.min(R,
|
|
1451
|
+
R = Math.max(0, Math.min(R, z - S));
|
|
1452
1452
|
var A = Math.max(0, Math.min(L, O - I));
|
|
1453
1453
|
return {
|
|
1454
1454
|
isScrolling: !0,
|
|
1455
|
-
horizontalScrollDirection: F.scrollLeft <
|
|
1455
|
+
horizontalScrollDirection: F.scrollLeft < x ? "forward" : "backward",
|
|
1456
1456
|
scrollLeft: R,
|
|
1457
1457
|
scrollTop: A,
|
|
1458
1458
|
verticalScrollDirection: F.scrollTop < L ? "forward" : "backward",
|
|
@@ -1463,7 +1463,7 @@ function si(t) {
|
|
|
1463
1463
|
var w = l.props.outerRef;
|
|
1464
1464
|
l._outerRef = v, typeof w == "function" ? w(v) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = v);
|
|
1465
1465
|
}, l._resetIsScrollingDebounced = function() {
|
|
1466
|
-
l._resetIsScrollingTimeoutId !== null &&
|
|
1466
|
+
l._resetIsScrollingTimeoutId !== null && sn(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = ci(l._resetIsScrolling, di);
|
|
1467
1467
|
}, l._resetIsScrolling = function() {
|
|
1468
1468
|
l._resetIsScrollingTimeoutId = null, l.setState({
|
|
1469
1469
|
isScrolling: !1
|
|
@@ -1473,7 +1473,7 @@ function si(t) {
|
|
|
1473
1473
|
}, l;
|
|
1474
1474
|
}
|
|
1475
1475
|
p.getDerivedStateFromProps = function(l, v) {
|
|
1476
|
-
return
|
|
1476
|
+
return hi(l, v), T(l), null;
|
|
1477
1477
|
};
|
|
1478
1478
|
var h = p.prototype;
|
|
1479
1479
|
return h.scrollTo = function(l) {
|
|
@@ -1488,12 +1488,12 @@ function si(t) {
|
|
|
1488
1488
|
};
|
|
1489
1489
|
}, this._resetIsScrollingDebounced);
|
|
1490
1490
|
}, h.scrollToItem = function(l) {
|
|
1491
|
-
var v = l.align, w = v === void 0 ? "auto" : v, I = l.columnIndex,
|
|
1492
|
-
I !== void 0 && (I = Math.max(0, Math.min(I, L - 1))),
|
|
1493
|
-
var H = a(this.props, this._instanceProps),
|
|
1491
|
+
var v = l.align, w = v === void 0 ? "auto" : v, I = l.columnIndex, S = l.rowIndex, x = this.props, L = x.columnCount, O = x.height, z = x.rowCount, F = x.width, E = this.state, R = E.scrollLeft, A = E.scrollTop, G = li();
|
|
1492
|
+
I !== void 0 && (I = Math.max(0, Math.min(I, L - 1))), S !== void 0 && (S = Math.max(0, Math.min(S, z - 1)));
|
|
1493
|
+
var H = a(this.props, this._instanceProps), V = d(this.props, this._instanceProps), X = V > F ? G : 0, B = H > O ? G : 0;
|
|
1494
1494
|
this.scrollTo({
|
|
1495
|
-
scrollLeft: I !== void 0 ? c(this.props, I, w, R, this._instanceProps,
|
|
1496
|
-
scrollTop:
|
|
1495
|
+
scrollLeft: I !== void 0 ? c(this.props, I, w, R, this._instanceProps, B) : R,
|
|
1496
|
+
scrollTop: S !== void 0 ? m(this.props, S, w, A, this._instanceProps, X) : A
|
|
1497
1497
|
});
|
|
1498
1498
|
}, h.componentDidMount = function() {
|
|
1499
1499
|
var l = this.props, v = l.initialScrollLeft, w = l.initialScrollTop;
|
|
@@ -1503,102 +1503,102 @@ function si(t) {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
this._callPropsCallbacks();
|
|
1505
1505
|
}, h.componentDidUpdate = function() {
|
|
1506
|
-
var l = this.props.direction, v = this.state, w = v.scrollLeft, I = v.scrollTop,
|
|
1507
|
-
if (
|
|
1508
|
-
var
|
|
1506
|
+
var l = this.props.direction, v = this.state, w = v.scrollLeft, I = v.scrollTop, S = v.scrollUpdateWasRequested;
|
|
1507
|
+
if (S && this._outerRef != null) {
|
|
1508
|
+
var x = this._outerRef;
|
|
1509
1509
|
if (l === "rtl")
|
|
1510
|
-
switch (
|
|
1510
|
+
switch (an()) {
|
|
1511
1511
|
case "negative":
|
|
1512
|
-
|
|
1512
|
+
x.scrollLeft = -w;
|
|
1513
1513
|
break;
|
|
1514
1514
|
case "positive-ascending":
|
|
1515
|
-
|
|
1515
|
+
x.scrollLeft = w;
|
|
1516
1516
|
break;
|
|
1517
1517
|
default:
|
|
1518
|
-
var L =
|
|
1519
|
-
|
|
1518
|
+
var L = x.clientWidth, O = x.scrollWidth;
|
|
1519
|
+
x.scrollLeft = O - L - w;
|
|
1520
1520
|
break;
|
|
1521
1521
|
}
|
|
1522
1522
|
else
|
|
1523
|
-
|
|
1524
|
-
|
|
1523
|
+
x.scrollLeft = Math.max(0, w);
|
|
1524
|
+
x.scrollTop = Math.max(0, I);
|
|
1525
1525
|
}
|
|
1526
1526
|
this._callPropsCallbacks();
|
|
1527
1527
|
}, h.componentWillUnmount = function() {
|
|
1528
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1528
|
+
this._resetIsScrollingTimeoutId !== null && sn(this._resetIsScrollingTimeoutId);
|
|
1529
1529
|
}, h.render = function() {
|
|
1530
|
-
var l = this.props, v = l.children, w = l.className, I = l.columnCount,
|
|
1530
|
+
var l = this.props, v = l.children, w = l.className, I = l.columnCount, S = l.direction, x = l.height, L = l.innerRef, O = l.innerElementType, z = l.innerTagName, F = l.itemData, E = l.itemKey, R = E === void 0 ? ui : E, A = l.outerElementType, G = l.outerTagName, H = l.rowCount, V = l.style, X = l.useIsScrolling, B = l.width, se = this.state.isScrolling, q = this._getHorizontalRangeToRender(), j = q[0], Y = q[1], te = this._getVerticalRangeToRender(), J = te[0], ee = te[1], Te = [];
|
|
1531
1531
|
if (I > 0 && H)
|
|
1532
|
-
for (var
|
|
1533
|
-
for (var
|
|
1534
|
-
|
|
1535
|
-
columnIndex:
|
|
1532
|
+
for (var Ce = J; Ce <= ee; Ce++)
|
|
1533
|
+
for (var me = j; me <= Y; me++)
|
|
1534
|
+
Te.push(at(v, {
|
|
1535
|
+
columnIndex: me,
|
|
1536
1536
|
data: F,
|
|
1537
|
-
isScrolling: X ?
|
|
1537
|
+
isScrolling: X ? se : void 0,
|
|
1538
1538
|
key: R({
|
|
1539
|
-
columnIndex:
|
|
1539
|
+
columnIndex: me,
|
|
1540
1540
|
data: F,
|
|
1541
|
-
rowIndex:
|
|
1541
|
+
rowIndex: Ce
|
|
1542
1542
|
}),
|
|
1543
|
-
rowIndex:
|
|
1544
|
-
style: this._getItemStyle(
|
|
1543
|
+
rowIndex: Ce,
|
|
1544
|
+
style: this._getItemStyle(Ce, me)
|
|
1545
1545
|
}));
|
|
1546
|
-
var
|
|
1547
|
-
return
|
|
1546
|
+
var _t = a(this.props, this._instanceProps), Ke = d(this.props, this._instanceProps);
|
|
1547
|
+
return at(A || G || "div", {
|
|
1548
1548
|
className: w,
|
|
1549
1549
|
onScroll: this._onScroll,
|
|
1550
1550
|
ref: this._outerRefSetter,
|
|
1551
|
-
style:
|
|
1551
|
+
style: Lt({
|
|
1552
1552
|
position: "relative",
|
|
1553
|
-
height:
|
|
1554
|
-
width:
|
|
1553
|
+
height: x,
|
|
1554
|
+
width: B,
|
|
1555
1555
|
overflow: "auto",
|
|
1556
1556
|
WebkitOverflowScrolling: "touch",
|
|
1557
1557
|
willChange: "transform",
|
|
1558
|
-
direction:
|
|
1559
|
-
},
|
|
1560
|
-
},
|
|
1561
|
-
children:
|
|
1558
|
+
direction: S
|
|
1559
|
+
}, V)
|
|
1560
|
+
}, at(O || z || "div", {
|
|
1561
|
+
children: Te,
|
|
1562
1562
|
ref: L,
|
|
1563
1563
|
style: {
|
|
1564
|
-
height:
|
|
1565
|
-
pointerEvents:
|
|
1566
|
-
width:
|
|
1564
|
+
height: _t,
|
|
1565
|
+
pointerEvents: se ? "none" : void 0,
|
|
1566
|
+
width: Ke
|
|
1567
1567
|
}
|
|
1568
1568
|
}));
|
|
1569
1569
|
}, h._callPropsCallbacks = function() {
|
|
1570
|
-
var l = this.props, v = l.columnCount, w = l.onItemsRendered, I = l.onScroll,
|
|
1571
|
-
if (typeof w == "function" && v > 0 &&
|
|
1572
|
-
var
|
|
1573
|
-
this._callOnItemsRendered(L, O, R, A,
|
|
1570
|
+
var l = this.props, v = l.columnCount, w = l.onItemsRendered, I = l.onScroll, S = l.rowCount;
|
|
1571
|
+
if (typeof w == "function" && v > 0 && S > 0) {
|
|
1572
|
+
var x = this._getHorizontalRangeToRender(), L = x[0], O = x[1], z = x[2], F = x[3], E = this._getVerticalRangeToRender(), R = E[0], A = E[1], G = E[2], H = E[3];
|
|
1573
|
+
this._callOnItemsRendered(L, O, R, A, z, F, G, H);
|
|
1574
1574
|
}
|
|
1575
1575
|
if (typeof I == "function") {
|
|
1576
|
-
var
|
|
1577
|
-
this._callOnScroll(
|
|
1576
|
+
var V = this.state, X = V.horizontalScrollDirection, B = V.scrollLeft, se = V.scrollTop, q = V.scrollUpdateWasRequested, j = V.verticalScrollDirection;
|
|
1577
|
+
this._callOnScroll(B, se, X, j, q);
|
|
1578
1578
|
}
|
|
1579
1579
|
}, h._getHorizontalRangeToRender = function() {
|
|
1580
|
-
var l = this.props, v = l.columnCount, w = l.overscanColumnCount, I = l.overscanColumnsCount,
|
|
1581
|
-
if (v === 0 ||
|
|
1580
|
+
var l = this.props, v = l.columnCount, w = l.overscanColumnCount, I = l.overscanColumnsCount, S = l.overscanCount, x = l.rowCount, L = this.state, O = L.horizontalScrollDirection, z = L.isScrolling, F = L.scrollLeft, E = w || I || S || 1;
|
|
1581
|
+
if (v === 0 || x === 0)
|
|
1582
1582
|
return [0, 0, 0, 0];
|
|
1583
|
-
var R = r(this.props, F, this._instanceProps), A = o(this.props, R, F, this._instanceProps), G = !
|
|
1583
|
+
var R = r(this.props, F, this._instanceProps), A = o(this.props, R, F, this._instanceProps), G = !z || O === "backward" ? Math.max(1, E) : 1, H = !z || O === "forward" ? Math.max(1, E) : 1;
|
|
1584
1584
|
return [Math.max(0, R - G), Math.max(0, Math.min(v - 1, A + H)), R, A];
|
|
1585
1585
|
}, h._getVerticalRangeToRender = function() {
|
|
1586
|
-
var l = this.props, v = l.columnCount, w = l.overscanCount, I = l.overscanRowCount,
|
|
1587
|
-
if (v === 0 ||
|
|
1586
|
+
var l = this.props, v = l.columnCount, w = l.overscanCount, I = l.overscanRowCount, S = l.overscanRowsCount, x = l.rowCount, L = this.state, O = L.isScrolling, z = L.verticalScrollDirection, F = L.scrollTop, E = I || S || w || 1;
|
|
1587
|
+
if (v === 0 || x === 0)
|
|
1588
1588
|
return [0, 0, 0, 0];
|
|
1589
|
-
var R = u(this.props, F, this._instanceProps), A = y(this.props, R, F, this._instanceProps), G = !O ||
|
|
1590
|
-
return [Math.max(0, R - G), Math.max(0, Math.min(
|
|
1589
|
+
var R = u(this.props, F, this._instanceProps), A = y(this.props, R, F, this._instanceProps), G = !O || z === "backward" ? Math.max(1, E) : 1, H = !O || z === "forward" ? Math.max(1, E) : 1;
|
|
1590
|
+
return [Math.max(0, R - G), Math.max(0, Math.min(x - 1, A + H)), R, A];
|
|
1591
1591
|
}, p;
|
|
1592
|
-
}(
|
|
1592
|
+
}(mo), e.defaultProps = {
|
|
1593
1593
|
direction: "ltr",
|
|
1594
1594
|
itemData: void 0,
|
|
1595
1595
|
useIsScrolling: !1
|
|
1596
1596
|
}, e;
|
|
1597
1597
|
}
|
|
1598
|
-
var
|
|
1598
|
+
var hi = function(e, n) {
|
|
1599
1599
|
var r = e.children, o = e.direction, s = e.height, a = e.innerTagName, d = e.outerTagName, c = e.overscanColumnsCount, m = e.overscanCount, g = e.overscanRowsCount, C = e.width, u = n.instance;
|
|
1600
1600
|
if (process.env.NODE_ENV !== "production") {
|
|
1601
|
-
if (typeof m == "number" &&
|
|
1601
|
+
if (typeof m == "number" && ct && !ct.has(u) && (ct.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof c == "number" || typeof g == "number") && lt && !lt.has(u) && (lt.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || d != null) && dt && !dt.has(u) && (dt.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
|
|
1602
1602
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
1603
1603
|
switch (o) {
|
|
1604
1604
|
case "ltr":
|
|
@@ -1612,7 +1612,7 @@ var ai = function(e, n) {
|
|
|
1612
1612
|
if (typeof s != "number")
|
|
1613
1613
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (s === null ? "null" : typeof s) + '" was specified.'));
|
|
1614
1614
|
}
|
|
1615
|
-
},
|
|
1615
|
+
}, cn = 50, kn = function(e, n) {
|
|
1616
1616
|
var r = e.rowCount, o = n.rowMetadataMap, s = n.estimatedRowHeight, a = n.lastMeasuredRowIndex, d = 0;
|
|
1617
1617
|
if (a >= r && (a = r - 1), a >= 0) {
|
|
1618
1618
|
var c = o[a];
|
|
@@ -1620,7 +1620,7 @@ var ai = function(e, n) {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
var m = r - a - 1, g = m * s;
|
|
1622
1622
|
return d + g;
|
|
1623
|
-
},
|
|
1623
|
+
}, Wn = function(e, n) {
|
|
1624
1624
|
var r = e.columnCount, o = n.columnMetadataMap, s = n.estimatedColumnWidth, a = n.lastMeasuredColumnIndex, d = 0;
|
|
1625
1625
|
if (a >= r && (a = r - 1), a >= 0) {
|
|
1626
1626
|
var c = o[a];
|
|
@@ -1628,7 +1628,7 @@ var ai = function(e, n) {
|
|
|
1628
1628
|
}
|
|
1629
1629
|
var m = r - a - 1, g = m * s;
|
|
1630
1630
|
return d + g;
|
|
1631
|
-
},
|
|
1631
|
+
}, Le = function(e, n, r, o) {
|
|
1632
1632
|
var s, a, d;
|
|
1633
1633
|
if (e === "column" ? (s = o.columnMetadataMap, a = n.columnWidth, d = o.lastMeasuredColumnIndex) : (s = o.rowMetadataMap, a = n.rowHeight, d = o.lastMeasuredRowIndex), r > d) {
|
|
1634
1634
|
var c = 0;
|
|
@@ -1646,25 +1646,25 @@ var ai = function(e, n) {
|
|
|
1646
1646
|
e === "column" ? o.lastMeasuredColumnIndex = r : o.lastMeasuredRowIndex = r;
|
|
1647
1647
|
}
|
|
1648
1648
|
return s[r];
|
|
1649
|
-
},
|
|
1649
|
+
}, ln = function(e, n, r, o) {
|
|
1650
1650
|
var s, a;
|
|
1651
1651
|
e === "column" ? (s = r.columnMetadataMap, a = r.lastMeasuredColumnIndex) : (s = r.rowMetadataMap, a = r.lastMeasuredRowIndex);
|
|
1652
1652
|
var d = a > 0 ? s[a].offset : 0;
|
|
1653
|
-
return d >= o ?
|
|
1654
|
-
},
|
|
1653
|
+
return d >= o ? Mn(e, n, r, a, 0, o) : fi(e, n, r, Math.max(0, a), o);
|
|
1654
|
+
}, Mn = function(e, n, r, o, s, a) {
|
|
1655
1655
|
for (; s <= o; ) {
|
|
1656
|
-
var d = s + Math.floor((o - s) / 2), c =
|
|
1656
|
+
var d = s + Math.floor((o - s) / 2), c = Le(e, n, d, r).offset;
|
|
1657
1657
|
if (c === a)
|
|
1658
1658
|
return d;
|
|
1659
1659
|
c < a ? s = d + 1 : c > a && (o = d - 1);
|
|
1660
1660
|
}
|
|
1661
1661
|
return s > 0 ? s - 1 : 0;
|
|
1662
|
-
},
|
|
1663
|
-
for (var a = e === "column" ? n.columnCount : n.rowCount, d = 1; o < a &&
|
|
1662
|
+
}, fi = function(e, n, r, o, s) {
|
|
1663
|
+
for (var a = e === "column" ? n.columnCount : n.rowCount, d = 1; o < a && Le(e, n, o, r).offset < s; )
|
|
1664
1664
|
o += d, d *= 2;
|
|
1665
|
-
return
|
|
1666
|
-
},
|
|
1667
|
-
var c = e === "column" ? n.width : n.height, m =
|
|
1665
|
+
return Mn(e, n, r, Math.min(o, a - 1), Math.floor(o / 2), s);
|
|
1666
|
+
}, dn = function(e, n, r, o, s, a, d) {
|
|
1667
|
+
var c = e === "column" ? n.width : n.height, m = Le(e, n, r, a), g = e === "column" ? Wn(n, a) : kn(n, a), C = Math.max(0, Math.min(g - c, m.offset)), u = Math.max(0, m.offset - c + d + m.size);
|
|
1668
1668
|
switch (o === "smart" && (s >= u - c && s <= C + c ? o = "auto" : o = "center"), o) {
|
|
1669
1669
|
case "start":
|
|
1670
1670
|
return C;
|
|
@@ -1676,48 +1676,48 @@ var ai = function(e, n) {
|
|
|
1676
1676
|
default:
|
|
1677
1677
|
return s >= u && s <= C ? s : u > C || s < u ? u : C;
|
|
1678
1678
|
}
|
|
1679
|
-
},
|
|
1679
|
+
}, mi = /* @__PURE__ */ pi({
|
|
1680
1680
|
getColumnOffset: function(e, n, r) {
|
|
1681
|
-
return
|
|
1681
|
+
return Le("column", e, n, r).offset;
|
|
1682
1682
|
},
|
|
1683
1683
|
getColumnStartIndexForOffset: function(e, n, r) {
|
|
1684
|
-
return
|
|
1684
|
+
return ln("column", e, r, n);
|
|
1685
1685
|
},
|
|
1686
1686
|
getColumnStopIndexForStartIndex: function(e, n, r, o) {
|
|
1687
|
-
for (var s = e.columnCount, a = e.width, d =
|
|
1688
|
-
g++, m +=
|
|
1687
|
+
for (var s = e.columnCount, a = e.width, d = Le("column", e, n, o), c = r + a, m = d.offset + d.size, g = n; g < s - 1 && m < c; )
|
|
1688
|
+
g++, m += Le("column", e, g, o).size;
|
|
1689
1689
|
return g;
|
|
1690
1690
|
},
|
|
1691
1691
|
getColumnWidth: function(e, n, r) {
|
|
1692
1692
|
return r.columnMetadataMap[n].size;
|
|
1693
1693
|
},
|
|
1694
|
-
getEstimatedTotalHeight:
|
|
1695
|
-
getEstimatedTotalWidth:
|
|
1694
|
+
getEstimatedTotalHeight: kn,
|
|
1695
|
+
getEstimatedTotalWidth: Wn,
|
|
1696
1696
|
getOffsetForColumnAndAlignment: function(e, n, r, o, s, a) {
|
|
1697
|
-
return
|
|
1697
|
+
return dn("column", e, n, r, o, s, a);
|
|
1698
1698
|
},
|
|
1699
1699
|
getOffsetForRowAndAlignment: function(e, n, r, o, s, a) {
|
|
1700
|
-
return
|
|
1700
|
+
return dn("row", e, n, r, o, s, a);
|
|
1701
1701
|
},
|
|
1702
1702
|
getRowOffset: function(e, n, r) {
|
|
1703
|
-
return
|
|
1703
|
+
return Le("row", e, n, r).offset;
|
|
1704
1704
|
},
|
|
1705
1705
|
getRowHeight: function(e, n, r) {
|
|
1706
1706
|
return r.rowMetadataMap[n].size;
|
|
1707
1707
|
},
|
|
1708
1708
|
getRowStartIndexForOffset: function(e, n, r) {
|
|
1709
|
-
return
|
|
1709
|
+
return ln("row", e, r, n);
|
|
1710
1710
|
},
|
|
1711
1711
|
getRowStopIndexForStartIndex: function(e, n, r, o) {
|
|
1712
|
-
for (var s = e.rowCount, a = e.height, d =
|
|
1713
|
-
g++, m +=
|
|
1712
|
+
for (var s = e.rowCount, a = e.height, d = Le("row", e, n, o), c = r + a, m = d.offset + d.size, g = n; g < s - 1 && m < c; )
|
|
1713
|
+
g++, m += Le("row", e, g, o).size;
|
|
1714
1714
|
return g;
|
|
1715
1715
|
},
|
|
1716
1716
|
initInstanceProps: function(e, n) {
|
|
1717
1717
|
var r = e, o = r.estimatedColumnWidth, s = r.estimatedRowHeight, a = {
|
|
1718
1718
|
columnMetadataMap: {},
|
|
1719
|
-
estimatedColumnWidth: o ||
|
|
1720
|
-
estimatedRowHeight: s ||
|
|
1719
|
+
estimatedColumnWidth: o || cn,
|
|
1720
|
+
estimatedRowHeight: s || cn,
|
|
1721
1721
|
lastMeasuredColumnIndex: -1,
|
|
1722
1722
|
lastMeasuredRowIndex: -1,
|
|
1723
1723
|
rowMetadataMap: {}
|
|
@@ -1749,7 +1749,7 @@ var ai = function(e, n) {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
});
|
|
1751
1751
|
process.env.NODE_ENV;
|
|
1752
|
-
function
|
|
1752
|
+
function un(t, e) {
|
|
1753
1753
|
for (var n in t)
|
|
1754
1754
|
if (!(n in e))
|
|
1755
1755
|
return !0;
|
|
@@ -1758,13 +1758,13 @@ function nn(t, e) {
|
|
|
1758
1758
|
return !0;
|
|
1759
1759
|
return !1;
|
|
1760
1760
|
}
|
|
1761
|
-
var
|
|
1762
|
-
function
|
|
1763
|
-
var n = t.style, r =
|
|
1764
|
-
return !
|
|
1761
|
+
var gi = ["style"], vi = ["style"];
|
|
1762
|
+
function wi(t, e) {
|
|
1763
|
+
var n = t.style, r = on(t, gi), o = e.style, s = on(e, vi);
|
|
1764
|
+
return !un(n, o) && !un(r, s);
|
|
1765
1765
|
}
|
|
1766
|
-
const
|
|
1767
|
-
const { viewMode: t } =
|
|
1766
|
+
const _i = () => {
|
|
1767
|
+
const { viewMode: t } = je(), { scrollMode: e } = $e(), { setColumnCount: n } = Cn(), { virtualScrollableElementRef: r } = ft(), o = nt(), s = k(() => o.heights.length, [o.heights]), a = k(() => e === oe.HORIZONTAL_SCROLLING ? s : t === Me.DUAL_PAGE ? 2 : 1, [t, e, e, s, r]), d = k(() => o.widths.reduce((T, P, p) => {
|
|
1768
1768
|
const h = p % a;
|
|
1769
1769
|
return (!T[h] || P > T[h]) && (T[h] = P), T;
|
|
1770
1770
|
}, []), [o.widths, a]), c = N(
|
|
@@ -1783,11 +1783,11 @@ const hi = () => {
|
|
|
1783
1783
|
},
|
|
1784
1784
|
[o.heights, a]
|
|
1785
1785
|
);
|
|
1786
|
-
|
|
1786
|
+
D(() => {
|
|
1787
1787
|
n(a);
|
|
1788
1788
|
}, [a, n]);
|
|
1789
1789
|
const g = k(() => e === oe.HORIZONTAL_SCROLLING || e === oe.PAGE_SCROLLING ? 1 : Math.round(s / a), [a, s, e]), C = k(() => o.heights.reduce((b, T) => b + T, 0) / o.heights.length || 0, [o]), u = k(() => o.widths.reduce((b, T) => b + T, 0) / o.widths.length || 0, [o]), y = k(() => {
|
|
1790
|
-
const { rowsHeight: b, columnsWidth: T } =
|
|
1790
|
+
const { rowsHeight: b, columnsWidth: T } = kt(o, a);
|
|
1791
1791
|
return {
|
|
1792
1792
|
rowsHeight: b,
|
|
1793
1793
|
columnsWidth: T
|
|
@@ -1808,23 +1808,23 @@ const hi = () => {
|
|
|
1808
1808
|
totalDimension: _
|
|
1809
1809
|
};
|
|
1810
1810
|
};
|
|
1811
|
-
let
|
|
1812
|
-
typeof window < "u" ?
|
|
1813
|
-
let
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1816
|
-
return
|
|
1817
|
-
}) : (
|
|
1818
|
-
|
|
1819
|
-
},
|
|
1820
|
-
const n =
|
|
1821
|
-
|
|
1822
|
-
}), r =
|
|
1823
|
-
|
|
1824
|
-
},
|
|
1811
|
+
let pe;
|
|
1812
|
+
typeof window < "u" ? pe = window : typeof self < "u" ? pe = self : pe = global;
|
|
1813
|
+
let Nt = null, Ot = null;
|
|
1814
|
+
const pn = 20, It = pe.clearTimeout, hn = pe.setTimeout, xt = pe.cancelAnimationFrame || pe.mozCancelAnimationFrame || pe.webkitCancelAnimationFrame, fn = pe.requestAnimationFrame || pe.mozRequestAnimationFrame || pe.webkitRequestAnimationFrame;
|
|
1815
|
+
xt == null || fn == null ? (Nt = It, Ot = function(e) {
|
|
1816
|
+
return hn(e, pn);
|
|
1817
|
+
}) : (Nt = function([e, n]) {
|
|
1818
|
+
xt(e), It(n);
|
|
1819
|
+
}, Ot = function(e) {
|
|
1820
|
+
const n = fn(function() {
|
|
1821
|
+
It(r), e();
|
|
1822
|
+
}), r = hn(function() {
|
|
1823
|
+
xt(n), e();
|
|
1824
|
+
}, pn);
|
|
1825
1825
|
return [n, r];
|
|
1826
1826
|
});
|
|
1827
|
-
function
|
|
1827
|
+
function bi(t) {
|
|
1828
1828
|
let e, n, r, o, s, a, d;
|
|
1829
1829
|
const c = typeof document < "u" && document.attachEvent;
|
|
1830
1830
|
if (!c) {
|
|
@@ -1837,7 +1837,7 @@ function fi(t) {
|
|
|
1837
1837
|
if (P.target.className && typeof P.target.className.indexOf == "function" && P.target.className.indexOf("contract-trigger") < 0 && P.target.className.indexOf("expand-trigger") < 0)
|
|
1838
1838
|
return;
|
|
1839
1839
|
const p = this;
|
|
1840
|
-
a(this), this.__resizeRAF__ &&
|
|
1840
|
+
a(this), this.__resizeRAF__ && Nt(this.__resizeRAF__), this.__resizeRAF__ = Ot(function() {
|
|
1841
1841
|
s(p) && (p.__resizeLast__.width = p.offsetWidth, p.__resizeLast__.height = p.offsetHeight, p.__resizeListeners__.forEach(function(l) {
|
|
1842
1842
|
l.call(p, P);
|
|
1843
1843
|
}));
|
|
@@ -1871,7 +1871,7 @@ function fi(t) {
|
|
|
1871
1871
|
u.attachEvent("onresize", y);
|
|
1872
1872
|
else {
|
|
1873
1873
|
if (!u.__resizeTriggers__) {
|
|
1874
|
-
const _ = u.ownerDocument, b =
|
|
1874
|
+
const _ = u.ownerDocument, b = pe.getComputedStyle(u);
|
|
1875
1875
|
b && b.position === "static" && (u.style.position = "relative"), m(_), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = _.createElement("div")).className = "resize-triggers";
|
|
1876
1876
|
const T = _.createElement("div");
|
|
1877
1877
|
T.className = "expand-trigger", T.appendChild(_.createElement("div"));
|
|
@@ -1896,7 +1896,7 @@ function fi(t) {
|
|
|
1896
1896
|
}
|
|
1897
1897
|
};
|
|
1898
1898
|
}
|
|
1899
|
-
class
|
|
1899
|
+
class Ti extends go {
|
|
1900
1900
|
constructor(...e) {
|
|
1901
1901
|
super(...e), this.state = {
|
|
1902
1902
|
height: this.props.defaultHeight || 0,
|
|
@@ -1944,7 +1944,7 @@ class mi extends lo {
|
|
|
1944
1944
|
const r = n.ownerDocument.defaultView.ResizeObserver;
|
|
1945
1945
|
r != null ? (this._resizeObserver = new r(() => {
|
|
1946
1946
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1947
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1947
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = bi(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1948
1948
|
}
|
|
1949
1949
|
}
|
|
1950
1950
|
componentWillUnmount() {
|
|
@@ -1970,7 +1970,7 @@ class mi extends lo {
|
|
|
1970
1970
|
overflow: "visible"
|
|
1971
1971
|
}, b = {};
|
|
1972
1972
|
let T = !1;
|
|
1973
|
-
return o || (u === 0 && (T = !0), _.height = 0, b.height = u, b.scaledHeight = u), s || (y === 0 && (T = !0), _.width = 0, b.width = y, b.scaledWidth = y), a && (T = !1),
|
|
1973
|
+
return o || (u === 0 && (T = !0), _.height = 0, b.height = u, b.scaledHeight = u), s || (y === 0 && (T = !0), _.width = 0, b.width = y, b.scaledWidth = y), a && (T = !1), at(g, {
|
|
1974
1974
|
ref: this._setRef,
|
|
1975
1975
|
style: {
|
|
1976
1976
|
..._,
|
|
@@ -1980,8 +1980,8 @@ class mi extends lo {
|
|
|
1980
1980
|
}, !T && e(b));
|
|
1981
1981
|
}
|
|
1982
1982
|
}
|
|
1983
|
-
const
|
|
1984
|
-
const { focusedPage: n, totalPages: r } =
|
|
1983
|
+
const Ci = bn(({ widths: t, heights: e }) => {
|
|
1984
|
+
const { focusedPage: n, totalPages: r } = fe(), o = k(() => {
|
|
1985
1985
|
const d = [], c = Math.ceil(n / 2) * 2 - 1;
|
|
1986
1986
|
if (d.push(c), c + 1 <= r) {
|
|
1987
1987
|
const m = c + 1;
|
|
@@ -2005,9 +2005,9 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
];
|
|
2007
2007
|
}, [t, e, o]), a = k(() => s.reduce((d, c) => d + Number(c.width || 0), 0), [s]);
|
|
2008
|
-
return /* @__PURE__ */ i("div", { style: { width: a, position: "relative" }, children: o.map((d, c) => /* @__PURE__ */ i(
|
|
2009
|
-
}),
|
|
2010
|
-
const { focusedPage: n } =
|
|
2008
|
+
return /* @__PURE__ */ i("div", { style: { width: a, position: "relative" }, children: o.map((d, c) => /* @__PURE__ */ i(Gt, { style: s[c], pageNumber: d }, d)) });
|
|
2009
|
+
}), Pi = ({ widths: t, heights: e }) => {
|
|
2010
|
+
const { focusedPage: n } = fe(), r = k(() => ({
|
|
2011
2011
|
position: "absolute",
|
|
2012
2012
|
width: t(n - 1),
|
|
2013
2013
|
height: e(n - 1)
|
|
@@ -2019,14 +2019,14 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2019
2019
|
width: o,
|
|
2020
2020
|
position: "relative"
|
|
2021
2021
|
},
|
|
2022
|
-
children: /* @__PURE__ */ i(
|
|
2022
|
+
children: /* @__PURE__ */ i(Gt, { style: r, pageNumber: n }, n)
|
|
2023
2023
|
}
|
|
2024
2024
|
);
|
|
2025
|
-
},
|
|
2026
|
-
const r = M(), { contentRef: o } =
|
|
2027
|
-
const { rowsHeight: _, columnsWidth: b } =
|
|
2025
|
+
}, yi = (t, e, n) => {
|
|
2026
|
+
const r = M(), { contentRef: o } = Ee(), { heights: s, widths: a } = nt(), { setFocusedPage: d } = fe(), [c, m] = $([]), { targetScrollPage: g } = Pn(), C = Wt(c, 0, 500), u = k(() => {
|
|
2027
|
+
const { rowsHeight: _, columnsWidth: b } = kt({ heights: s, widths: a }, t);
|
|
2028
2028
|
return s.map((T, P) => {
|
|
2029
|
-
const p = a[P], h =
|
|
2029
|
+
const p = a[P], h = ur(P + 1, t), f = b.slice(0, h.columnIndex).reduce((I, S) => I + S, 0), l = _.slice(0, h.rowIndex).reduce((I, S) => I + S, 0), v = f + p, w = l + T;
|
|
2030
2030
|
return {
|
|
2031
2031
|
pageNumber: P + 1,
|
|
2032
2032
|
...h,
|
|
@@ -2039,7 +2039,7 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2039
2039
|
};
|
|
2040
2040
|
});
|
|
2041
2041
|
}, [s, a, t, e]);
|
|
2042
|
-
|
|
2042
|
+
D(() => {
|
|
2043
2043
|
var b;
|
|
2044
2044
|
C.length > 0 && !g.current && d(C[0].pageNumber), ((b = C[0]) == null ? void 0 : b.ratio) && C.some((T) => T.pageNumber === g.current) && setTimeout(() => {
|
|
2045
2045
|
g.current = void 0;
|
|
@@ -2057,10 +2057,10 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2057
2057
|
const h = p.endX >= T.startLeft && p.endY >= T.startTop, f = p.startX <= T.endLeft && p.startY <= T.endTop;
|
|
2058
2058
|
return h && f;
|
|
2059
2059
|
}).map((p) => {
|
|
2060
|
-
const h = T.startLeft > p.startX ? T.startLeft : p.startX, f = T.startTop > p.startY ? T.startTop : p.startY, l = T.endLeft < p.endX ? T.endLeft : p.endX, v = T.endTop < p.endY ? T.endTop : p.endY, w = l - h, I = v - f,
|
|
2060
|
+
const h = T.startLeft > p.startX ? T.startLeft : p.startX, f = T.startTop > p.startY ? T.startTop : p.startY, l = T.endLeft < p.endX ? T.endLeft : p.endX, v = T.endTop < p.endY ? T.endTop : p.endY, w = l - h, I = v - f, x = +(w * I / (p.width * p.height) * 100).toFixed(2);
|
|
2061
2061
|
return {
|
|
2062
2062
|
pageNumber: p.pageNumber,
|
|
2063
|
-
ratio:
|
|
2063
|
+
ratio: x
|
|
2064
2064
|
};
|
|
2065
2065
|
}).sort((p, h) => h.ratio - p.ratio);
|
|
2066
2066
|
m(P);
|
|
@@ -2068,23 +2068,23 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2068
2068
|
},
|
|
2069
2069
|
[o, u]
|
|
2070
2070
|
);
|
|
2071
|
-
|
|
2071
|
+
D(() => {
|
|
2072
2072
|
if (n)
|
|
2073
2073
|
return n == null || n.addEventListener("scroll", y), () => {
|
|
2074
2074
|
n == null || n.removeEventListener("scroll", y);
|
|
2075
2075
|
};
|
|
2076
2076
|
}, [n, y]);
|
|
2077
|
-
},
|
|
2078
|
-
const { children: n, toolbarRef: r, style: o, className: s, ...a } = t, { customVariables: d, customDarkVariables: c } =
|
|
2077
|
+
}, Hn = gt((t, e) => {
|
|
2078
|
+
const { children: n, toolbarRef: r, style: o, className: s, ...a } = t, { customVariables: d, customDarkVariables: c } = ko(), { darkMode: m } = Co();
|
|
2079
2079
|
return /* @__PURE__ */ i(
|
|
2080
2080
|
"div",
|
|
2081
2081
|
{
|
|
2082
2082
|
ref: e,
|
|
2083
2083
|
...a,
|
|
2084
|
-
className:
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
m ?
|
|
2084
|
+
className: ae(
|
|
2085
|
+
ze["rp-theme-variables"],
|
|
2086
|
+
ze["rp-container"],
|
|
2087
|
+
m ? ze["rp-dark-mode"] : "",
|
|
2088
2088
|
s
|
|
2089
2089
|
),
|
|
2090
2090
|
style: {
|
|
@@ -2096,11 +2096,11 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2096
2096
|
children: n
|
|
2097
2097
|
}
|
|
2098
2098
|
);
|
|
2099
|
-
}),
|
|
2100
|
-
const o =
|
|
2101
|
-
return /* @__PURE__ */ i(
|
|
2102
|
-
},
|
|
2103
|
-
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } =
|
|
2099
|
+
}), Ii = bn(({ columnIndex: t, rowIndex: e, data: n, style: r }) => {
|
|
2100
|
+
const o = pr(e, t, n.columnCount);
|
|
2101
|
+
return /* @__PURE__ */ i(Gt, { style: r, pageNumber: o }, o);
|
|
2102
|
+
}, wi), Pc = () => {
|
|
2103
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = Dt(), { pagesRef: r, setPagesRef: o, setContentRef: s } = Ee(), { scrollToPage: a } = Ln(), {
|
|
2104
2104
|
virtualScrollRef: d,
|
|
2105
2105
|
getVirtualScrollRef: c,
|
|
2106
2106
|
getPageScrollElementRef: m,
|
|
@@ -2109,140 +2109,187 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2109
2109
|
virtualScrollableElementRef: u,
|
|
2110
2110
|
totalInnerDimensions: y,
|
|
2111
2111
|
pageScrollElementRef: _
|
|
2112
|
-
} =
|
|
2112
|
+
} = ft(), b = M(!0), { nextPage: T, prevPage: P, setFocusedPage: p, focusedPage: h } = fe(), { scrollMode: f } = $e(), { viewMode: l } = je(), v = M(null), { loading: w, error: I } = re(), { passwordRequired: S } = To(), { LoaderImageComponent: x } = zt(), L = M(
|
|
2113
2113
|
y
|
|
2114
2114
|
), O = M({
|
|
2115
2115
|
viewMode: l,
|
|
2116
2116
|
scrollMode: f
|
|
2117
|
-
}),
|
|
2117
|
+
}), z = M(!1), F = M(), { isFullScreen: E } = Io(), {
|
|
2118
2118
|
pageDimension: R,
|
|
2119
2119
|
rowCount: A,
|
|
2120
2120
|
rowHeight: G,
|
|
2121
2121
|
columnCount: H,
|
|
2122
|
-
columnWidth:
|
|
2122
|
+
columnWidth: V,
|
|
2123
2123
|
estimatedColumnWidth: X,
|
|
2124
|
-
estimatedRowHeight:
|
|
2125
|
-
totalDimension:
|
|
2126
|
-
} =
|
|
2127
|
-
|
|
2124
|
+
estimatedRowHeight: B,
|
|
2125
|
+
totalDimension: se
|
|
2126
|
+
} = _i(), q = Wt(y, 100), { onScroll: j } = Fo(), Y = M();
|
|
2127
|
+
yi(H, A, u);
|
|
2128
2128
|
const te = M({
|
|
2129
2129
|
scrollTop: 0,
|
|
2130
2130
|
scrollLeft: 0
|
|
2131
2131
|
});
|
|
2132
|
-
|
|
2133
|
-
const { isPressed: J } =
|
|
2132
|
+
mr(r);
|
|
2133
|
+
const { isPressed: J } = hr(), { selectionMode: ee } = yo(), { initializeGrabScroll: Te, resetGrabState: Ce } = fr({
|
|
2134
2134
|
isPressed: J
|
|
2135
|
-
}),
|
|
2135
|
+
}), me = k(() => ee === _o.HAND, [ee]), _t = k(() => ({
|
|
2136
2136
|
columnCount: H
|
|
2137
|
-
}), [H]),
|
|
2138
|
-
(
|
|
2139
|
-
const
|
|
2140
|
-
!E &&
|
|
2137
|
+
}), [H]), Ke = N(
|
|
2138
|
+
(U) => {
|
|
2139
|
+
const Z = document.activeElement !== r;
|
|
2140
|
+
!E && Z || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), P()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), T()));
|
|
2141
2141
|
},
|
|
2142
2142
|
[T, P, E, f]
|
|
2143
2143
|
);
|
|
2144
|
-
|
|
2145
|
-
window.removeEventListener("keydown",
|
|
2146
|
-
}), [
|
|
2144
|
+
D(() => (window.addEventListener("keydown", Ke), () => {
|
|
2145
|
+
window.removeEventListener("keydown", Ke);
|
|
2146
|
+
}), [Ke]), D(() => {
|
|
2147
2147
|
if (v.current && (v.current.style.position = "relative"), !!d)
|
|
2148
|
-
for (let
|
|
2149
|
-
for (let
|
|
2148
|
+
for (let U = 0; U < A; U++)
|
|
2149
|
+
for (let Z = 0; Z < H; Z++)
|
|
2150
2150
|
d.resetAfterIndices({
|
|
2151
|
-
columnIndex:
|
|
2152
|
-
rowIndex:
|
|
2151
|
+
columnIndex: Z,
|
|
2152
|
+
rowIndex: U,
|
|
2153
2153
|
shouldForceUpdate: !0
|
|
2154
2154
|
});
|
|
2155
2155
|
}, [A, H, R, d]);
|
|
2156
|
-
const
|
|
2157
|
-
(
|
|
2156
|
+
const co = N(
|
|
2157
|
+
(U, Z) => {
|
|
2158
2158
|
if (!u)
|
|
2159
2159
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
2160
|
-
const
|
|
2161
|
-
return
|
|
2160
|
+
const ce = te.current.scrollTop > Z, Pe = te.current.scrollLeft > U;
|
|
2161
|
+
return ce || Pe ? te.current : {
|
|
2162
2162
|
scrollTop: u.scrollTop,
|
|
2163
2163
|
scrollLeft: u.scrollLeft
|
|
2164
2164
|
};
|
|
2165
2165
|
},
|
|
2166
2166
|
[u]
|
|
2167
|
-
),
|
|
2168
|
-
(
|
|
2167
|
+
), Bt = N(
|
|
2168
|
+
(U, Z) => {
|
|
2169
2169
|
if (O.current.viewMode !== l || O.current.scrollMode !== f) {
|
|
2170
|
-
Y.current && clearTimeout(Y.current),
|
|
2170
|
+
Y.current && clearTimeout(Y.current), z.current = !0, a(h, "auto"), Y.current = setTimeout(() => {
|
|
2171
2171
|
requestAnimationFrame(() => {
|
|
2172
2172
|
O.current = { viewMode: l, scrollMode: f };
|
|
2173
2173
|
});
|
|
2174
2174
|
}, 100);
|
|
2175
2175
|
return;
|
|
2176
2176
|
}
|
|
2177
|
-
const
|
|
2178
|
-
if (!
|
|
2177
|
+
const Pe = U.scrollTop, Ge = U.scrollLeft;
|
|
2178
|
+
if (!Z.height || !Z.width)
|
|
2179
2179
|
return;
|
|
2180
|
-
|
|
2181
|
-
const { height:
|
|
2182
|
-
if (
|
|
2180
|
+
z.current = !0;
|
|
2181
|
+
const { height: Oe, width: De } = Z, { height: ye, width: Ie } = L.current;
|
|
2182
|
+
if (ye === Oe && Ie === De)
|
|
2183
2183
|
return;
|
|
2184
|
-
const
|
|
2184
|
+
const it = Pe / ye * Oe, le = Ge / Ie * De, xe = Math.round(Math.min(it, Oe)) || 0, ie = Math.round(Math.min(le, De)) || 0;
|
|
2185
2185
|
F.current = setTimeout(() => {
|
|
2186
2186
|
requestAnimationFrame(() => {
|
|
2187
2187
|
u == null || u.scrollTo({
|
|
2188
|
-
top:
|
|
2189
|
-
left:
|
|
2188
|
+
top: xe,
|
|
2189
|
+
left: ie,
|
|
2190
2190
|
behavior: "auto"
|
|
2191
2191
|
});
|
|
2192
2192
|
});
|
|
2193
2193
|
}, 0), L.current = {
|
|
2194
|
-
height:
|
|
2195
|
-
width:
|
|
2194
|
+
height: Z.height,
|
|
2195
|
+
width: Z.width
|
|
2196
2196
|
};
|
|
2197
2197
|
},
|
|
2198
2198
|
[u, l, f, a]
|
|
2199
2199
|
);
|
|
2200
|
-
|
|
2200
|
+
D(() => {
|
|
2201
2201
|
clearTimeout(F.current);
|
|
2202
|
-
const
|
|
2203
|
-
(
|
|
2202
|
+
const U = Array.from({ length: A }).reduce(
|
|
2203
|
+
(Pe, Ge, Oe) => Pe + G(Oe),
|
|
2204
2204
|
0
|
|
2205
|
-
),
|
|
2206
|
-
(
|
|
2205
|
+
), Z = Array.from({ length: H }).reduce(
|
|
2206
|
+
(Pe, Ge, Oe) => Pe + V(Oe),
|
|
2207
2207
|
0
|
|
2208
|
-
),
|
|
2209
|
-
te.current =
|
|
2210
|
-
height:
|
|
2211
|
-
width:
|
|
2208
|
+
), ce = co(Z, U);
|
|
2209
|
+
te.current = ce, Bt(ce, { height: U, width: Z }), C({
|
|
2210
|
+
height: U,
|
|
2211
|
+
width: Z
|
|
2212
2212
|
});
|
|
2213
|
-
}, [R, A, H,
|
|
2214
|
-
const
|
|
2215
|
-
(
|
|
2213
|
+
}, [R, A, H, Bt]);
|
|
2214
|
+
const lo = N(
|
|
2215
|
+
(U) => {
|
|
2216
2216
|
te.current = {
|
|
2217
|
-
scrollTop:
|
|
2218
|
-
scrollLeft:
|
|
2217
|
+
scrollTop: U.scrollTop,
|
|
2218
|
+
scrollLeft: U.scrollLeft
|
|
2219
2219
|
};
|
|
2220
2220
|
},
|
|
2221
2221
|
[u]
|
|
2222
2222
|
);
|
|
2223
|
-
|
|
2224
|
-
if (
|
|
2225
|
-
return _ && _.addEventListener("scroll",
|
|
2226
|
-
_ == null || _.removeEventListener("scroll",
|
|
2223
|
+
D(() => {
|
|
2224
|
+
if (j)
|
|
2225
|
+
return _ && _.addEventListener("scroll", j), u && u.addEventListener("scroll", j), () => {
|
|
2226
|
+
_ == null || _.removeEventListener("scroll", j), u == null || u.removeEventListener("scroll", j);
|
|
2227
2227
|
};
|
|
2228
|
-
}, [u, _,
|
|
2228
|
+
}, [u, _, j]), D(() => () => {
|
|
2229
2229
|
Y.current && clearTimeout(Y.current);
|
|
2230
2230
|
}, []);
|
|
2231
|
-
const
|
|
2232
|
-
[
|
|
2233
|
-
[
|
|
2234
|
-
}), [
|
|
2235
|
-
(
|
|
2236
|
-
if (
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2231
|
+
const uo = k(() => ae(de["rp-pages-container"], {
|
|
2232
|
+
[de["rp-cursor-grab"]]: me && !J,
|
|
2233
|
+
[de["rp-cursor-grabbing"]]: me && J
|
|
2234
|
+
}), [me, J]), po = N(
|
|
2235
|
+
(U) => {
|
|
2236
|
+
if (me && U) {
|
|
2237
|
+
const Z = ae(de["rp-pages"]), ce = document.querySelector(`.${Z}`);
|
|
2238
|
+
Te(ce);
|
|
2239
2239
|
}
|
|
2240
2240
|
},
|
|
2241
|
-
[
|
|
2241
|
+
[me, Te, de]
|
|
2242
2242
|
);
|
|
2243
|
-
return
|
|
2244
|
-
w &&
|
|
2245
|
-
}, [w]),
|
|
2243
|
+
return D(() => {
|
|
2244
|
+
w && Ce();
|
|
2245
|
+
}, [w]), D(() => {
|
|
2246
|
+
const U = (Z) => {
|
|
2247
|
+
var it;
|
|
2248
|
+
const ce = window.getSelection();
|
|
2249
|
+
if (!ce || ce.rangeCount === 0)
|
|
2250
|
+
return;
|
|
2251
|
+
const Pe = ce.getRangeAt(0), Ge = Array.from(document.querySelectorAll('[data-rp$="-textLayer"]'));
|
|
2252
|
+
if (!Ge.some(
|
|
2253
|
+
(le) => le.contains(Pe.commonAncestorContainer)
|
|
2254
|
+
))
|
|
2255
|
+
return;
|
|
2256
|
+
const De = [];
|
|
2257
|
+
if (Ge.forEach((le) => {
|
|
2258
|
+
Array.from(le.querySelectorAll('[data-rp="rp-text-layer-text"]')).forEach((ie) => {
|
|
2259
|
+
if (ce.containsNode(ie, !0)) {
|
|
2260
|
+
const ge = ie.getBoundingClientRect(), Se = ie.textContent || "";
|
|
2261
|
+
Se && ge.height > 0 && De.push({
|
|
2262
|
+
element: ie,
|
|
2263
|
+
text: Se,
|
|
2264
|
+
rect: ge
|
|
2265
|
+
});
|
|
2266
|
+
}
|
|
2267
|
+
});
|
|
2268
|
+
}), De.length === 0)
|
|
2269
|
+
return;
|
|
2270
|
+
De.sort((le, xe) => {
|
|
2271
|
+
const ie = le.rect.top + le.rect.height / 2, ge = xe.rect.top + xe.rect.height / 2, Se = ie - ge, st = (le.rect.height + xe.rect.height) / 2;
|
|
2272
|
+
return Math.abs(Se) < st * 0.3 ? le.rect.left - xe.rect.left : Se;
|
|
2273
|
+
});
|
|
2274
|
+
let ye = "", Ie = null, rt = 0;
|
|
2275
|
+
De.forEach((le, xe) => {
|
|
2276
|
+
const { text: ie, rect: ge } = le, Se = ge.top + ge.height / 2;
|
|
2277
|
+
if (xe === 0)
|
|
2278
|
+
ye = ie, rt = Se;
|
|
2279
|
+
else {
|
|
2280
|
+
const st = (ge.height + Ie.height) / 2, ho = Math.abs(Se - rt), fo = ge.top - (Ie.top + Ie.height);
|
|
2281
|
+
ho > st * 0.3 ? fo > st * 1.2 ? ye += `
|
|
2282
|
+
|
|
2283
|
+
` + ie : ye += `
|
|
2284
|
+
` + ie : ge.left - (Ie.left + Ie.width) > 1 ? ye += " " + ie : ye += ie, rt = Se;
|
|
2285
|
+
}
|
|
2286
|
+
Ie = ge;
|
|
2287
|
+
}), (it = Z.clipboardData) == null || it.setData("text/plain", ye), Z.preventDefault();
|
|
2288
|
+
};
|
|
2289
|
+
return document.addEventListener("copy", U), () => {
|
|
2290
|
+
document.removeEventListener("copy", U);
|
|
2291
|
+
};
|
|
2292
|
+
}, []), D(() => {
|
|
2246
2293
|
if (!(q.height === 0 || !b.current)) {
|
|
2247
2294
|
if (e === oe.PAGE_SCROLLING) {
|
|
2248
2295
|
t !== h && _ && p(t), b.current = !1;
|
|
@@ -2256,54 +2303,54 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2256
2303
|
_,
|
|
2257
2304
|
p,
|
|
2258
2305
|
q
|
|
2259
|
-
]), /* @__PURE__ */ W(
|
|
2260
|
-
/* @__PURE__ */ i(
|
|
2261
|
-
|
|
2306
|
+
]), /* @__PURE__ */ W(ve, { children: [
|
|
2307
|
+
/* @__PURE__ */ i(Ko, { ref: s, children: /* @__PURE__ */ i(
|
|
2308
|
+
Hn,
|
|
2262
2309
|
{
|
|
2263
2310
|
id: n,
|
|
2264
2311
|
ref: o,
|
|
2265
2312
|
tabIndex: -1,
|
|
2266
|
-
className:
|
|
2267
|
-
children: /* @__PURE__ */ i(
|
|
2313
|
+
className: uo,
|
|
2314
|
+
children: /* @__PURE__ */ i(Ti, { style: { minHeight: "50px" }, children: ({ width: U, height: Z }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: po, style: { width: U, height: Z }, children: f === oe.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2268
2315
|
"div",
|
|
2269
2316
|
{
|
|
2270
2317
|
ref: m,
|
|
2271
|
-
style: { width:
|
|
2272
|
-
className:
|
|
2273
|
-
children: l ===
|
|
2318
|
+
style: { width: U, height: Z },
|
|
2319
|
+
className: ae(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
|
|
2320
|
+
children: l === Me.DUAL_PAGE ? /* @__PURE__ */ i(Ci, { widths: V, heights: G }) : /* @__PURE__ */ i(Pi, { widths: V, heights: G })
|
|
2274
2321
|
}
|
|
2275
|
-
) :
|
|
2276
|
-
|
|
2322
|
+
) : B ? /* @__PURE__ */ i(
|
|
2323
|
+
mi,
|
|
2277
2324
|
{
|
|
2278
2325
|
ref: c,
|
|
2279
|
-
itemData:
|
|
2326
|
+
itemData: _t,
|
|
2280
2327
|
outerRef: g,
|
|
2281
2328
|
innerRef: v,
|
|
2282
|
-
onScroll:
|
|
2329
|
+
onScroll: lo,
|
|
2283
2330
|
columnCount: H,
|
|
2284
|
-
columnWidth:
|
|
2331
|
+
columnWidth: V,
|
|
2285
2332
|
rowHeight: G,
|
|
2286
|
-
height:
|
|
2287
|
-
width:
|
|
2333
|
+
height: Z,
|
|
2334
|
+
width: U,
|
|
2288
2335
|
estimatedColumnWidth: X,
|
|
2289
|
-
estimatedRowHeight:
|
|
2336
|
+
estimatedRowHeight: B,
|
|
2290
2337
|
rowCount: A,
|
|
2291
|
-
className:
|
|
2292
|
-
|
|
2293
|
-
f === oe.HORIZONTAL_SCROLLING ?
|
|
2338
|
+
className: ae(
|
|
2339
|
+
de["rp-pages"],
|
|
2340
|
+
f === oe.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
|
|
2294
2341
|
),
|
|
2295
2342
|
style: {
|
|
2296
|
-
"--rp-pages-height": `${
|
|
2297
|
-
"--rp-pages-width": `${
|
|
2343
|
+
"--rp-pages-height": `${se.height}px`,
|
|
2344
|
+
"--rp-pages-width": `${se.width}px`,
|
|
2298
2345
|
"--rp-row-count": `${A}`,
|
|
2299
2346
|
"--rp-column-count": `${H}`
|
|
2300
2347
|
},
|
|
2301
|
-
children:
|
|
2348
|
+
children: Ii
|
|
2302
2349
|
}
|
|
2303
2350
|
) : !w && !I ? /* @__PURE__ */ i(
|
|
2304
2351
|
"div",
|
|
2305
2352
|
{
|
|
2306
|
-
className:
|
|
2353
|
+
className: de["rp-loader"],
|
|
2307
2354
|
style: {
|
|
2308
2355
|
display: "flex",
|
|
2309
2356
|
justifyContent: "center",
|
|
@@ -2311,9 +2358,9 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2311
2358
|
height: "100%",
|
|
2312
2359
|
width: "100%"
|
|
2313
2360
|
},
|
|
2314
|
-
children:
|
|
2361
|
+
children: x && /* @__PURE__ */ i(x, {})
|
|
2315
2362
|
}
|
|
2316
|
-
) : I ===
|
|
2363
|
+
) : I === bo.NOT_SUPPORTED ? /* @__PURE__ */ i("div", { className: de["rp-not-supported"], children: /* @__PURE__ */ W("div", { className: de["rp-not-supported-content"], children: [
|
|
2317
2364
|
"React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
|
|
2318
2365
|
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ W("ul", { children: [
|
|
2319
2366
|
/* @__PURE__ */ i("li", { children: "Chrome 119+" }),
|
|
@@ -2326,27 +2373,27 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2326
2373
|
] }) }) : null }) })
|
|
2327
2374
|
}
|
|
2328
2375
|
) }),
|
|
2329
|
-
|
|
2376
|
+
S && /* @__PURE__ */ i(gr, {})
|
|
2330
2377
|
] });
|
|
2331
|
-
},
|
|
2378
|
+
}, Xe = {
|
|
2332
2379
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
2333
2380
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
|
|
2334
2381
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
2335
2382
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
2336
2383
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
2337
|
-
},
|
|
2384
|
+
}, St = {
|
|
2338
2385
|
"rp-paginate": "_rp-paginate_1gck0_1",
|
|
2339
2386
|
"rp-page-input": "_rp-page-input_1gck0_6",
|
|
2340
2387
|
"rp-total-page": "_rp-total-page_1gck0_18"
|
|
2341
|
-
},
|
|
2342
|
-
const { prevIcon: t } =
|
|
2343
|
-
return t || e || /* @__PURE__ */ i(
|
|
2344
|
-
},
|
|
2345
|
-
const { nextIcon: t } =
|
|
2346
|
-
return t || e || /* @__PURE__ */ i(
|
|
2347
|
-
},
|
|
2348
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: s } =
|
|
2349
|
-
|
|
2388
|
+
}, xi = () => {
|
|
2389
|
+
const { prevIcon: t } = be(), { prevIcon: e } = _e();
|
|
2390
|
+
return t || e || /* @__PURE__ */ i(Je, {});
|
|
2391
|
+
}, Si = () => {
|
|
2392
|
+
const { nextIcon: t } = be(), { nextIcon: e } = _e();
|
|
2393
|
+
return t || e || /* @__PURE__ */ i(Je, { style: { transform: "rotate(180deg" } });
|
|
2394
|
+
}, Ri = () => {
|
|
2395
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: s } = fe(), [a, d] = $(t.toString()), { pageNavigationTool: c = !0 } = Ne(), { pageNavigationTool: m = !0 } = Fe(), { isSmallScreen: g } = ke(), { viewMode: C } = je(), { scrollMode: u } = $e(), { localeMessages: y } = he();
|
|
2396
|
+
D(() => {
|
|
2350
2397
|
d(t.toString());
|
|
2351
2398
|
}, [t]);
|
|
2352
2399
|
const _ = N((h) => {
|
|
@@ -2362,7 +2409,7 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2362
2409
|
h.key === "Enter" && b();
|
|
2363
2410
|
},
|
|
2364
2411
|
[b]
|
|
2365
|
-
), p = k(() => C ===
|
|
2412
|
+
), p = k(() => C === Me.DUAL_PAGE && u === oe.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, C, u]);
|
|
2366
2413
|
return !c || !m ? null : typeof c != "boolean" ? /* @__PURE__ */ i(
|
|
2367
2414
|
c,
|
|
2368
2415
|
{
|
|
@@ -2383,44 +2430,44 @@ const gi = pn(({ widths: t, heights: e }) => {
|
|
|
2383
2430
|
goToPage: s,
|
|
2384
2431
|
changePage: n
|
|
2385
2432
|
}
|
|
2386
|
-
) : /* @__PURE__ */ W("div", { className:
|
|
2433
|
+
) : /* @__PURE__ */ W("div", { className: St["rp-paginate"], children: [
|
|
2387
2434
|
!g && /* @__PURE__ */ i(K, { content: y == null ? void 0 : y.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2388
|
-
|
|
2435
|
+
ue,
|
|
2389
2436
|
{
|
|
2390
2437
|
onClick: o,
|
|
2391
2438
|
"aria-label": y == null ? void 0 : y.previousPageTooltip,
|
|
2392
2439
|
"aria-disabled": t === 1,
|
|
2393
|
-
children: /* @__PURE__ */ i(
|
|
2440
|
+
children: /* @__PURE__ */ i(xi, {})
|
|
2394
2441
|
}
|
|
2395
2442
|
) }),
|
|
2396
2443
|
/* @__PURE__ */ i(K, { content: y == null ? void 0 : y.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2397
|
-
|
|
2444
|
+
Tn,
|
|
2398
2445
|
{
|
|
2399
2446
|
onKeyDown: P,
|
|
2400
2447
|
onBlur: T,
|
|
2401
2448
|
onChange: _,
|
|
2402
2449
|
value: a,
|
|
2403
|
-
className:
|
|
2450
|
+
className: St["rp-page-input"],
|
|
2404
2451
|
id: "page-input",
|
|
2405
2452
|
name: "page-input"
|
|
2406
2453
|
}
|
|
2407
2454
|
) }),
|
|
2408
|
-
/* @__PURE__ */ W("span", { className:
|
|
2455
|
+
/* @__PURE__ */ W("span", { className: St["rp-total-page"], children: [
|
|
2409
2456
|
"/",
|
|
2410
2457
|
e
|
|
2411
2458
|
] }),
|
|
2412
2459
|
!g && /* @__PURE__ */ i(K, { content: y == null ? void 0 : y.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2413
|
-
|
|
2460
|
+
ue,
|
|
2414
2461
|
{
|
|
2415
2462
|
onClick: r,
|
|
2416
2463
|
"aria-label": y == null ? void 0 : y.nextPageTooltip,
|
|
2417
2464
|
"aria-disabled": p,
|
|
2418
|
-
children: /* @__PURE__ */ i(
|
|
2465
|
+
children: /* @__PURE__ */ i(Si, {})
|
|
2419
2466
|
}
|
|
2420
2467
|
) })
|
|
2421
2468
|
] });
|
|
2422
2469
|
};
|
|
2423
|
-
var
|
|
2470
|
+
var wt = "Dialog", [$n, yc] = Cr(wt), [Li, we] = $n(wt), Gn = (t) => {
|
|
2424
2471
|
const {
|
|
2425
2472
|
__scopeDialog: e,
|
|
2426
2473
|
children: n,
|
|
@@ -2428,21 +2475,21 @@ var st = "Dialog", [Dn, wc] = gr(st), [Pi, fe] = Dn(st), zn = (t) => {
|
|
|
2428
2475
|
defaultOpen: o,
|
|
2429
2476
|
onOpenChange: s,
|
|
2430
2477
|
modal: a = !0
|
|
2431
|
-
} = t, d = Q.useRef(null), c = Q.useRef(null), [m, g] =
|
|
2478
|
+
} = t, d = Q.useRef(null), c = Q.useRef(null), [m, g] = yr({
|
|
2432
2479
|
prop: r,
|
|
2433
2480
|
defaultProp: o ?? !1,
|
|
2434
2481
|
onChange: s,
|
|
2435
|
-
caller:
|
|
2482
|
+
caller: wt
|
|
2436
2483
|
});
|
|
2437
2484
|
return /* @__PURE__ */ i(
|
|
2438
|
-
|
|
2485
|
+
Li,
|
|
2439
2486
|
{
|
|
2440
2487
|
scope: e,
|
|
2441
2488
|
triggerRef: d,
|
|
2442
2489
|
contentRef: c,
|
|
2443
|
-
contentId:
|
|
2444
|
-
titleId:
|
|
2445
|
-
descriptionId:
|
|
2490
|
+
contentId: Tt(),
|
|
2491
|
+
titleId: Tt(),
|
|
2492
|
+
descriptionId: Tt(),
|
|
2446
2493
|
open: m,
|
|
2447
2494
|
onOpenChange: g,
|
|
2448
2495
|
onOpenToggle: Q.useCallback(() => g((C) => !C), [g]),
|
|
@@ -2451,50 +2498,50 @@ var st = "Dialog", [Dn, wc] = gr(st), [Pi, fe] = Dn(st), zn = (t) => {
|
|
|
2451
2498
|
}
|
|
2452
2499
|
);
|
|
2453
2500
|
};
|
|
2454
|
-
|
|
2455
|
-
var
|
|
2501
|
+
Gn.displayName = wt;
|
|
2502
|
+
var qn = "DialogTrigger", Ei = Q.forwardRef(
|
|
2456
2503
|
(t, e) => {
|
|
2457
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2504
|
+
const { __scopeDialog: n, ...r } = t, o = we(qn, n), s = Mt(e, o.triggerRef);
|
|
2458
2505
|
return /* @__PURE__ */ i(
|
|
2459
|
-
|
|
2506
|
+
ot.button,
|
|
2460
2507
|
{
|
|
2461
2508
|
type: "button",
|
|
2462
2509
|
"aria-haspopup": "dialog",
|
|
2463
2510
|
"aria-expanded": o.open,
|
|
2464
2511
|
"aria-controls": o.contentId,
|
|
2465
|
-
"data-state":
|
|
2512
|
+
"data-state": Vt(o.open),
|
|
2466
2513
|
...r,
|
|
2467
2514
|
ref: s,
|
|
2468
|
-
onClick:
|
|
2515
|
+
onClick: Ye(t.onClick, o.onOpenToggle)
|
|
2469
2516
|
}
|
|
2470
2517
|
);
|
|
2471
2518
|
}
|
|
2472
2519
|
);
|
|
2473
|
-
|
|
2474
|
-
var
|
|
2520
|
+
Ei.displayName = qn;
|
|
2521
|
+
var qt = "DialogPortal", [Ni, Un] = $n(qt, {
|
|
2475
2522
|
forceMount: void 0
|
|
2476
|
-
}),
|
|
2477
|
-
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, s =
|
|
2478
|
-
return /* @__PURE__ */ i(
|
|
2523
|
+
}), Vn = (t) => {
|
|
2524
|
+
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, s = we(qt, e);
|
|
2525
|
+
return /* @__PURE__ */ i(Ni, { scope: e, forceMount: n, children: Q.Children.map(r, (a) => /* @__PURE__ */ i(Ht, { present: n || s.open, children: /* @__PURE__ */ i(Nr, { asChild: !0, container: o, children: a }) })) });
|
|
2479
2526
|
};
|
|
2480
|
-
|
|
2481
|
-
var
|
|
2527
|
+
Vn.displayName = qt;
|
|
2528
|
+
var pt = "DialogOverlay", Bn = Q.forwardRef(
|
|
2482
2529
|
(t, e) => {
|
|
2483
|
-
const n =
|
|
2484
|
-
return s.modal ? /* @__PURE__ */ i(
|
|
2530
|
+
const n = Un(pt, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, s = we(pt, t.__scopeDialog);
|
|
2531
|
+
return s.modal ? /* @__PURE__ */ i(Ht, { present: r || s.open, children: /* @__PURE__ */ i(Di, { ...o, ref: e }) }) : null;
|
|
2485
2532
|
}
|
|
2486
2533
|
);
|
|
2487
|
-
|
|
2488
|
-
var
|
|
2534
|
+
Bn.displayName = pt;
|
|
2535
|
+
var Oi = Ir("DialogOverlay.RemoveScroll"), Di = Q.forwardRef(
|
|
2489
2536
|
(t, e) => {
|
|
2490
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2537
|
+
const { __scopeDialog: n, ...r } = t, o = we(pt, n);
|
|
2491
2538
|
return (
|
|
2492
2539
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2493
2540
|
// ie. when `Overlay` and `Content` are siblings
|
|
2494
|
-
/* @__PURE__ */ i(
|
|
2495
|
-
|
|
2541
|
+
/* @__PURE__ */ i(Sr, { as: Oi, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ i(
|
|
2542
|
+
ot.div,
|
|
2496
2543
|
{
|
|
2497
|
-
"data-state":
|
|
2544
|
+
"data-state": Vt(o.open),
|
|
2498
2545
|
...r,
|
|
2499
2546
|
ref: e,
|
|
2500
2547
|
style: { pointerEvents: "auto", ...r.style }
|
|
@@ -2502,47 +2549,47 @@ var Si = _r("DialogOverlay.RemoveScroll"), xi = Q.forwardRef(
|
|
|
2502
2549
|
) })
|
|
2503
2550
|
);
|
|
2504
2551
|
}
|
|
2505
|
-
),
|
|
2552
|
+
), He = "DialogContent", Zn = Q.forwardRef(
|
|
2506
2553
|
(t, e) => {
|
|
2507
|
-
const n =
|
|
2508
|
-
return /* @__PURE__ */ i(
|
|
2554
|
+
const n = Un(He, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, s = we(He, t.__scopeDialog);
|
|
2555
|
+
return /* @__PURE__ */ i(Ht, { present: r || s.open, children: s.modal ? /* @__PURE__ */ i(zi, { ...o, ref: e }) : /* @__PURE__ */ i(Ai, { ...o, ref: e }) });
|
|
2509
2556
|
}
|
|
2510
2557
|
);
|
|
2511
|
-
|
|
2512
|
-
var
|
|
2558
|
+
Zn.displayName = He;
|
|
2559
|
+
var zi = Q.forwardRef(
|
|
2513
2560
|
(t, e) => {
|
|
2514
|
-
const n =
|
|
2561
|
+
const n = we(He, t.__scopeDialog), r = Q.useRef(null), o = Mt(e, n.contentRef, r);
|
|
2515
2562
|
return Q.useEffect(() => {
|
|
2516
2563
|
const s = r.current;
|
|
2517
2564
|
if (s)
|
|
2518
|
-
return
|
|
2565
|
+
return Rr(s);
|
|
2519
2566
|
}, []), /* @__PURE__ */ i(
|
|
2520
|
-
|
|
2567
|
+
jn,
|
|
2521
2568
|
{
|
|
2522
2569
|
...t,
|
|
2523
2570
|
ref: o,
|
|
2524
2571
|
trapFocus: n.open,
|
|
2525
2572
|
disableOutsidePointerEvents: !0,
|
|
2526
|
-
onCloseAutoFocus:
|
|
2573
|
+
onCloseAutoFocus: Ye(t.onCloseAutoFocus, (s) => {
|
|
2527
2574
|
var a;
|
|
2528
2575
|
s.preventDefault(), (a = n.triggerRef.current) == null || a.focus();
|
|
2529
2576
|
}),
|
|
2530
|
-
onPointerDownOutside:
|
|
2577
|
+
onPointerDownOutside: Ye(t.onPointerDownOutside, (s) => {
|
|
2531
2578
|
const a = s.detail.originalEvent, d = a.button === 0 && a.ctrlKey === !0;
|
|
2532
2579
|
(a.button === 2 || d) && s.preventDefault();
|
|
2533
2580
|
}),
|
|
2534
|
-
onFocusOutside:
|
|
2581
|
+
onFocusOutside: Ye(
|
|
2535
2582
|
t.onFocusOutside,
|
|
2536
2583
|
(s) => s.preventDefault()
|
|
2537
2584
|
)
|
|
2538
2585
|
}
|
|
2539
2586
|
);
|
|
2540
2587
|
}
|
|
2541
|
-
),
|
|
2588
|
+
), Ai = Q.forwardRef(
|
|
2542
2589
|
(t, e) => {
|
|
2543
|
-
const n =
|
|
2590
|
+
const n = we(He, t.__scopeDialog), r = Q.useRef(!1), o = Q.useRef(!1);
|
|
2544
2591
|
return /* @__PURE__ */ i(
|
|
2545
|
-
|
|
2592
|
+
jn,
|
|
2546
2593
|
{
|
|
2547
2594
|
...t,
|
|
2548
2595
|
ref: e,
|
|
@@ -2561,12 +2608,12 @@ var Ri = Q.forwardRef(
|
|
|
2561
2608
|
}
|
|
2562
2609
|
);
|
|
2563
2610
|
}
|
|
2564
|
-
),
|
|
2611
|
+
), jn = Q.forwardRef(
|
|
2565
2612
|
(t, e) => {
|
|
2566
|
-
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...a } = t, d =
|
|
2567
|
-
return
|
|
2613
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...a } = t, d = we(He, n), c = Q.useRef(null), m = Mt(e, c);
|
|
2614
|
+
return Lr(), /* @__PURE__ */ W(ve, { children: [
|
|
2568
2615
|
/* @__PURE__ */ i(
|
|
2569
|
-
|
|
2616
|
+
Er,
|
|
2570
2617
|
{
|
|
2571
2618
|
asChild: !0,
|
|
2572
2619
|
loop: !0,
|
|
@@ -2574,13 +2621,13 @@ var Ri = Q.forwardRef(
|
|
|
2574
2621
|
onMountAutoFocus: o,
|
|
2575
2622
|
onUnmountAutoFocus: s,
|
|
2576
2623
|
children: /* @__PURE__ */ i(
|
|
2577
|
-
|
|
2624
|
+
xr,
|
|
2578
2625
|
{
|
|
2579
2626
|
role: "dialog",
|
|
2580
2627
|
id: d.contentId,
|
|
2581
2628
|
"aria-describedby": d.descriptionId,
|
|
2582
2629
|
"aria-labelledby": d.titleId,
|
|
2583
|
-
"data-state":
|
|
2630
|
+
"data-state": Vt(d.open),
|
|
2584
2631
|
...a,
|
|
2585
2632
|
ref: m,
|
|
2586
2633
|
onDismiss: () => d.onOpenChange(!1)
|
|
@@ -2588,50 +2635,50 @@ var Ri = Q.forwardRef(
|
|
|
2588
2635
|
)
|
|
2589
2636
|
}
|
|
2590
2637
|
),
|
|
2591
|
-
/* @__PURE__ */ W(
|
|
2592
|
-
/* @__PURE__ */ i(
|
|
2593
|
-
/* @__PURE__ */ i(
|
|
2638
|
+
/* @__PURE__ */ W(ve, { children: [
|
|
2639
|
+
/* @__PURE__ */ i(ki, { titleId: d.titleId }),
|
|
2640
|
+
/* @__PURE__ */ i(Mi, { contentRef: c, descriptionId: d.descriptionId })
|
|
2594
2641
|
] })
|
|
2595
2642
|
] });
|
|
2596
2643
|
}
|
|
2597
|
-
),
|
|
2644
|
+
), Ut = "DialogTitle", Kn = Q.forwardRef(
|
|
2598
2645
|
(t, e) => {
|
|
2599
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2600
|
-
return /* @__PURE__ */ i(
|
|
2646
|
+
const { __scopeDialog: n, ...r } = t, o = we(Ut, n);
|
|
2647
|
+
return /* @__PURE__ */ i(ot.h2, { id: o.titleId, ...r, ref: e });
|
|
2601
2648
|
}
|
|
2602
2649
|
);
|
|
2603
|
-
|
|
2604
|
-
var
|
|
2650
|
+
Kn.displayName = Ut;
|
|
2651
|
+
var Xn = "DialogDescription", Fi = Q.forwardRef(
|
|
2605
2652
|
(t, e) => {
|
|
2606
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2607
|
-
return /* @__PURE__ */ i(
|
|
2653
|
+
const { __scopeDialog: n, ...r } = t, o = we(Xn, n);
|
|
2654
|
+
return /* @__PURE__ */ i(ot.p, { id: o.descriptionId, ...r, ref: e });
|
|
2608
2655
|
}
|
|
2609
2656
|
);
|
|
2610
|
-
|
|
2611
|
-
var
|
|
2657
|
+
Fi.displayName = Xn;
|
|
2658
|
+
var Qn = "DialogClose", Yn = Q.forwardRef(
|
|
2612
2659
|
(t, e) => {
|
|
2613
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2660
|
+
const { __scopeDialog: n, ...r } = t, o = we(Qn, n);
|
|
2614
2661
|
return /* @__PURE__ */ i(
|
|
2615
|
-
|
|
2662
|
+
ot.button,
|
|
2616
2663
|
{
|
|
2617
2664
|
type: "button",
|
|
2618
2665
|
...r,
|
|
2619
2666
|
ref: e,
|
|
2620
|
-
onClick:
|
|
2667
|
+
onClick: Ye(t.onClick, () => o.onOpenChange(!1))
|
|
2621
2668
|
}
|
|
2622
2669
|
);
|
|
2623
2670
|
}
|
|
2624
2671
|
);
|
|
2625
|
-
|
|
2626
|
-
function
|
|
2672
|
+
Yn.displayName = Qn;
|
|
2673
|
+
function Vt(t) {
|
|
2627
2674
|
return t ? "open" : "closed";
|
|
2628
2675
|
}
|
|
2629
|
-
var
|
|
2630
|
-
contentName:
|
|
2631
|
-
titleName:
|
|
2676
|
+
var Jn = "DialogTitleWarning", [Ic, eo] = Pr(Jn, {
|
|
2677
|
+
contentName: He,
|
|
2678
|
+
titleName: Ut,
|
|
2632
2679
|
docsSlug: "dialog"
|
|
2633
|
-
}),
|
|
2634
|
-
const e =
|
|
2680
|
+
}), ki = ({ titleId: t }) => {
|
|
2681
|
+
const e = eo(Jn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2635
2682
|
|
|
2636
2683
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2637
2684
|
|
|
@@ -2639,15 +2686,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2639
2686
|
return Q.useEffect(() => {
|
|
2640
2687
|
t && (document.getElementById(t) || console.error(n));
|
|
2641
2688
|
}, [n, t]), null;
|
|
2642
|
-
},
|
|
2643
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2689
|
+
}, Wi = "DialogDescriptionWarning", Mi = ({ contentRef: t, descriptionId: e }) => {
|
|
2690
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${eo(Wi).contentName}}.`;
|
|
2644
2691
|
return Q.useEffect(() => {
|
|
2645
2692
|
var s;
|
|
2646
2693
|
const o = (s = t.current) == null ? void 0 : s.getAttribute("aria-describedby");
|
|
2647
2694
|
e && o && (document.getElementById(e) || console.warn(r));
|
|
2648
2695
|
}, [r, t, e]), null;
|
|
2649
|
-
},
|
|
2650
|
-
const
|
|
2696
|
+
}, Hi = Gn, $i = Vn, Gi = Bn, qi = Zn, Ui = Kn, Vi = Yn;
|
|
2697
|
+
const We = {
|
|
2651
2698
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2652
2699
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
2653
2700
|
"rp-document-dialog": "_rp-document-dialog_slqo7_13",
|
|
@@ -2655,8 +2702,8 @@ const Ee = {
|
|
|
2655
2702
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2656
2703
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2657
2704
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2658
|
-
},
|
|
2659
|
-
const { pdfProperties: t } = re(), { container: e } =
|
|
2705
|
+
}, Bi = () => {
|
|
2706
|
+
const { pdfProperties: t } = re(), { container: e } = Ee(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Ao(), { localeMessages: o } = he(), s = k(() => {
|
|
2660
2707
|
if (!t)
|
|
2661
2708
|
return [];
|
|
2662
2709
|
const {
|
|
@@ -2684,11 +2731,11 @@ const Ee = {
|
|
|
2684
2731
|
{ label: o == null ? void 0 : o.propertiesCreatorLabel, value: u },
|
|
2685
2732
|
{
|
|
2686
2733
|
label: o == null ? void 0 : o.propertiesCreateOnLabel,
|
|
2687
|
-
value: C ?
|
|
2734
|
+
value: C ? Xt(C) : ""
|
|
2688
2735
|
},
|
|
2689
2736
|
{
|
|
2690
2737
|
label: o == null ? void 0 : o.propertiesModifiedOnLabel,
|
|
2691
|
-
value: _ ?
|
|
2738
|
+
value: _ ? Xt(_) : ""
|
|
2692
2739
|
},
|
|
2693
2740
|
{ separate: !0 },
|
|
2694
2741
|
{ label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: b },
|
|
@@ -2696,48 +2743,48 @@ const Ee = {
|
|
|
2696
2743
|
{ label: o == null ? void 0 : o.propertiesPageCountLabel, value: P }
|
|
2697
2744
|
];
|
|
2698
2745
|
}, [t, o]);
|
|
2699
|
-
return /* @__PURE__ */ i(
|
|
2700
|
-
/* @__PURE__ */ i(
|
|
2701
|
-
/* @__PURE__ */ W(
|
|
2702
|
-
/* @__PURE__ */ i(
|
|
2703
|
-
/* @__PURE__ */ i("div", { className:
|
|
2704
|
-
/* @__PURE__ */ i(
|
|
2746
|
+
return /* @__PURE__ */ i(Hi, { open: n, onOpenChange: r, children: /* @__PURE__ */ i($i, { container: e, children: /* @__PURE__ */ W("div", { className: We["rp-dialog-wrapper"], children: [
|
|
2747
|
+
/* @__PURE__ */ i(Gi, { className: We["rp-dialog-overlay"] }),
|
|
2748
|
+
/* @__PURE__ */ W(qi, { className: We["rp-document-dialog"], children: [
|
|
2749
|
+
/* @__PURE__ */ i(Ui, { className: We["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
|
|
2750
|
+
/* @__PURE__ */ i("div", { className: We["rp-document-properties"], children: s.map((a, d) => /* @__PURE__ */ i("div", { children: a.separate ? /* @__PURE__ */ i("div", { className: We["rp-properties-divider"] }) : /* @__PURE__ */ i(Yo, { label: a.label, value: a.value }) }, d)) }),
|
|
2751
|
+
/* @__PURE__ */ i(Vi, { asChild: !0, className: We["rp-dialog-close"], children: /* @__PURE__ */ i(Or, {}) })
|
|
2705
2752
|
] })
|
|
2706
2753
|
] }) }) });
|
|
2707
|
-
},
|
|
2754
|
+
}, Zi = {
|
|
2708
2755
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2709
|
-
},
|
|
2756
|
+
}, mn = ".pdf", ji = (t) => URL.createObjectURL(t), Ki = async (t) => {
|
|
2710
2757
|
const n = await (await fetch(t)).blob();
|
|
2711
|
-
return
|
|
2712
|
-
},
|
|
2713
|
-
const { filename: t, pdfSrc: e } = re(), { downloadFilename: n } =
|
|
2758
|
+
return ji(n);
|
|
2759
|
+
}, to = () => {
|
|
2760
|
+
const { filename: t, pdfSrc: e } = re(), { downloadFilename: n } = No(), r = (s) => {
|
|
2714
2761
|
const a = n || s;
|
|
2715
|
-
return a.endsWith(
|
|
2762
|
+
return a.endsWith(mn) ? a : `${a}${mn}`;
|
|
2716
2763
|
};
|
|
2717
2764
|
return { download: N(async () => {
|
|
2718
2765
|
if (!t || !e)
|
|
2719
2766
|
throw new Error("There is no PDF source to download");
|
|
2720
2767
|
const s = document.createElement("a");
|
|
2721
|
-
s.href = await
|
|
2768
|
+
s.href = await Ki(e), s.download = r(t), document.body.appendChild(s), s.click(), document.body.removeChild(s);
|
|
2722
2769
|
}, [t, e]) };
|
|
2723
|
-
},
|
|
2724
|
-
const { downloadIcon: t } =
|
|
2725
|
-
return t || e || /* @__PURE__ */ i(
|
|
2726
|
-
},
|
|
2727
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2770
|
+
}, no = () => {
|
|
2771
|
+
const { downloadIcon: t } = be(), { downloadIcon: e } = _e();
|
|
2772
|
+
return t || e || /* @__PURE__ */ i(kr, {});
|
|
2773
|
+
}, oo = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Xi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(oo, { localeMessages: e, children: /* @__PURE__ */ i(ue, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(no, {}) }) }), Qi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Ae, { onClick: t, children: /* @__PURE__ */ W(oo, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2774
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(no, {}) }),
|
|
2728
2775
|
e == null ? void 0 : e.downloadFileLabel
|
|
2729
|
-
] }) }),
|
|
2730
|
-
const { download: t } =
|
|
2731
|
-
return !e || !n ? null : r ? /* @__PURE__ */ i(
|
|
2732
|
-
},
|
|
2733
|
-
const { printIcon: t } =
|
|
2734
|
-
return t || e || /* @__PURE__ */ i(
|
|
2735
|
-
},
|
|
2736
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2776
|
+
] }) }), ro = () => {
|
|
2777
|
+
const { download: t } = to(), { downloadTool: e = !0 } = Ne(), { downloadTool: n = !0 } = Fe(), { isSmallScreen: r } = ke(), { localeMessages: o } = he(), s = o == null ? void 0 : o.downloadFileTooltip;
|
|
2778
|
+
return !e || !n ? null : r ? /* @__PURE__ */ i(Qi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(K, { content: s, children: /* @__PURE__ */ i(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ i(K, { content: s, children: /* @__PURE__ */ i(n, { download: t }) }) : /* @__PURE__ */ i(Xi, { download: t, localeMessages: o });
|
|
2779
|
+
}, io = () => {
|
|
2780
|
+
const { printIcon: t } = be(), { printIcon: e } = _e();
|
|
2781
|
+
return t || e || /* @__PURE__ */ i(Wr, {});
|
|
2782
|
+
}, so = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Yi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(so, { localeMessages: e, children: /* @__PURE__ */ i(ue, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(io, {}) }) }), Ji = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ae, { onClick: t, children: /* @__PURE__ */ W(so, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2783
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(io, {}) }),
|
|
2737
2784
|
e == null ? void 0 : e.printLabel
|
|
2738
|
-
] }) }),
|
|
2739
|
-
const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: s, showDefaultProgress: a } =
|
|
2740
|
-
return !d || !c ? null : m ? /* @__PURE__ */ i(
|
|
2785
|
+
] }) }), ao = () => {
|
|
2786
|
+
const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: s, showDefaultProgress: a } = vt(), { printTool: d = !0 } = Ne(), { printTool: c = !0 } = Fe(), { isSmallScreen: m } = ke(), { localeMessages: g } = he(), C = g == null ? void 0 : g.printTooltip;
|
|
2787
|
+
return !d || !c ? null : m ? /* @__PURE__ */ i(Ji, { print: t, localeMessages: g }) : typeof d == "function" ? /* @__PURE__ */ i(K, { content: C, children: /* @__PURE__ */ i(
|
|
2741
2788
|
d,
|
|
2742
2789
|
{
|
|
2743
2790
|
print: t,
|
|
@@ -2759,34 +2806,34 @@ const Ee = {
|
|
|
2759
2806
|
progress: s,
|
|
2760
2807
|
showDefaultProgress: a
|
|
2761
2808
|
}
|
|
2762
|
-
) }) : /* @__PURE__ */ i(
|
|
2763
|
-
},
|
|
2809
|
+
) }) : /* @__PURE__ */ i(Yi, { print: t, localeMessages: g });
|
|
2810
|
+
}, es = {
|
|
2764
2811
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2765
|
-
},
|
|
2766
|
-
const { goToFirstPageIcon: t } =
|
|
2767
|
-
return t || e || /* @__PURE__ */ i(
|
|
2768
|
-
},
|
|
2769
|
-
const { goToLastPageIcon: t } =
|
|
2770
|
-
return t || e || /* @__PURE__ */ i(
|
|
2771
|
-
},
|
|
2772
|
-
const { goToPage: t, totalPages: e, focusedPage: n } =
|
|
2812
|
+
}, ts = () => {
|
|
2813
|
+
const { goToFirstPageIcon: t } = be(), { goToFirstPageIcon: e } = _e();
|
|
2814
|
+
return t || e || /* @__PURE__ */ i(Sn, { className: es["rp-go-to-Top"] });
|
|
2815
|
+
}, ns = () => {
|
|
2816
|
+
const { goToLastPageIcon: t } = be(), { goToLastPageIcon: e } = _e();
|
|
2817
|
+
return t || e || /* @__PURE__ */ i(Sn, {});
|
|
2818
|
+
}, gn = { width: "100%" }, os = () => {
|
|
2819
|
+
const { goToPage: t, totalPages: e, focusedPage: n } = fe(), { jumpNavigationTool: r = !0 } = Ne(), { jumpNavigationTool: o = !0 } = Fe(), { localeMessages: s } = he(), a = k(() => n === 1, [n]), d = k(() => n === e, [n, e]), c = N(() => {
|
|
2773
2820
|
t(1);
|
|
2774
2821
|
}, [t]), m = N(() => {
|
|
2775
2822
|
t(e);
|
|
2776
2823
|
}, [t, e]);
|
|
2777
|
-
return !r || !o ? null : /* @__PURE__ */ W(
|
|
2778
|
-
/* @__PURE__ */ i(
|
|
2779
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2824
|
+
return !r || !o ? null : /* @__PURE__ */ W(ut, { children: [
|
|
2825
|
+
/* @__PURE__ */ i(Ae, { onClick: c, children: /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.firstPageTooltip, style: gn, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2826
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(ts, {}) }),
|
|
2780
2827
|
/* @__PURE__ */ i("span", { children: s == null ? void 0 : s.firstPageLabel })
|
|
2781
2828
|
] }) }) }),
|
|
2782
|
-
/* @__PURE__ */ i(
|
|
2783
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2829
|
+
/* @__PURE__ */ i(Ae, { onClick: m, children: /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.lastPageTooltip, style: gn, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": d, children: [
|
|
2830
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(ns, {}) }),
|
|
2784
2831
|
/* @__PURE__ */ i("span", { children: s == null ? void 0 : s.lastPageLabel })
|
|
2785
2832
|
] }) }) }),
|
|
2786
|
-
/* @__PURE__ */ i(
|
|
2833
|
+
/* @__PURE__ */ i(Ft, {})
|
|
2787
2834
|
] });
|
|
2788
|
-
},
|
|
2789
|
-
const [t, e] = $(!1), { container: n, pagesRef: r } =
|
|
2835
|
+
}, rs = () => {
|
|
2836
|
+
const [t, e] = $(!1), { container: n, pagesRef: r } = Ee(), { isSmallScreen: o } = ke(), {
|
|
2790
2837
|
openFileTool: s,
|
|
2791
2838
|
downloadTool: a,
|
|
2792
2839
|
documentProperties: d,
|
|
@@ -2797,7 +2844,7 @@ const Ee = {
|
|
|
2797
2844
|
printTool: u,
|
|
2798
2845
|
fullscreenTool: y,
|
|
2799
2846
|
viewModeTool: _
|
|
2800
|
-
} =
|
|
2847
|
+
} = Ne(), {
|
|
2801
2848
|
openFileTool: b,
|
|
2802
2849
|
downloadTool: T,
|
|
2803
2850
|
documentProperties: P,
|
|
@@ -2808,11 +2855,11 @@ const Ee = {
|
|
|
2808
2855
|
printTool: v,
|
|
2809
2856
|
fullscreenTool: w,
|
|
2810
2857
|
viewModeTool: I
|
|
2811
|
-
} =
|
|
2858
|
+
} = Fe(), { localeMessages: S } = he(), [x, L] = $(0), O = M(
|
|
2812
2859
|
new ResizeObserver((E) => {
|
|
2813
2860
|
L(E[0].contentRect.height);
|
|
2814
2861
|
})
|
|
2815
|
-
),
|
|
2862
|
+
), z = k(() => C || m || g || c || d || _ || o && (s || a || u || y), [
|
|
2816
2863
|
s,
|
|
2817
2864
|
a,
|
|
2818
2865
|
u,
|
|
@@ -2835,137 +2882,137 @@ const Ee = {
|
|
|
2835
2882
|
l,
|
|
2836
2883
|
o
|
|
2837
2884
|
]);
|
|
2838
|
-
return
|
|
2885
|
+
return D(() => (r && O.current.observe(r), () => {
|
|
2839
2886
|
O.current.disconnect();
|
|
2840
|
-
}), [r]), !
|
|
2887
|
+
}), [r]), !z || !F ? null : /* @__PURE__ */ W(ve, { children: [
|
|
2841
2888
|
/* @__PURE__ */ i(
|
|
2842
|
-
|
|
2889
|
+
At,
|
|
2843
2890
|
{
|
|
2844
2891
|
container: n,
|
|
2845
2892
|
onOpenChange: e,
|
|
2846
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content:
|
|
2893
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: S == null ? void 0 : S.moreOptionTooltip, children: /* @__PURE__ */ i(ue, { active: t, "aria-label": S == null ? void 0 : S.moreOptionTooltip, children: /* @__PURE__ */ i(Tr, {}) }) }) }),
|
|
2847
2894
|
side: "bottom",
|
|
2848
2895
|
avoidCollisions: !1,
|
|
2849
2896
|
children: /* @__PURE__ */ W(
|
|
2850
2897
|
"div",
|
|
2851
2898
|
{
|
|
2852
|
-
style: { maxHeight: `${
|
|
2853
|
-
className:
|
|
2899
|
+
style: { maxHeight: `${x}px`, overflow: "auto" },
|
|
2900
|
+
className: Zi["rp-other-tool-content"],
|
|
2854
2901
|
"data-rp": "moreOptionsDropdown",
|
|
2855
2902
|
children: [
|
|
2856
|
-
o && /* @__PURE__ */ W(
|
|
2857
|
-
/* @__PURE__ */ i(
|
|
2858
|
-
/* @__PURE__ */ i(
|
|
2859
|
-
/* @__PURE__ */ i(
|
|
2860
|
-
/* @__PURE__ */ i(
|
|
2861
|
-
/* @__PURE__ */ i(
|
|
2903
|
+
o && /* @__PURE__ */ W(ut, { children: [
|
|
2904
|
+
/* @__PURE__ */ i(In, {}),
|
|
2905
|
+
/* @__PURE__ */ i(ro, {}),
|
|
2906
|
+
/* @__PURE__ */ i(ao, {}),
|
|
2907
|
+
/* @__PURE__ */ i(xn, {}),
|
|
2908
|
+
/* @__PURE__ */ i(Ft, {})
|
|
2862
2909
|
] }),
|
|
2863
|
-
/* @__PURE__ */ i(
|
|
2864
|
-
/* @__PURE__ */ i(
|
|
2865
|
-
/* @__PURE__ */ i(
|
|
2866
|
-
/* @__PURE__ */ i(
|
|
2867
|
-
/* @__PURE__ */ i(
|
|
2868
|
-
/* @__PURE__ */ i(
|
|
2910
|
+
/* @__PURE__ */ i(os, {}),
|
|
2911
|
+
/* @__PURE__ */ i(zr, {}),
|
|
2912
|
+
/* @__PURE__ */ i(Mr, {}),
|
|
2913
|
+
/* @__PURE__ */ i(Ar, {}),
|
|
2914
|
+
/* @__PURE__ */ i(Fr, {}),
|
|
2915
|
+
/* @__PURE__ */ i(Dr, {})
|
|
2869
2916
|
]
|
|
2870
2917
|
}
|
|
2871
2918
|
)
|
|
2872
2919
|
}
|
|
2873
2920
|
),
|
|
2874
|
-
/* @__PURE__ */ i(
|
|
2921
|
+
/* @__PURE__ */ i(Bi, {})
|
|
2875
2922
|
] });
|
|
2876
|
-
},
|
|
2877
|
-
const { isSmallScreen: t } =
|
|
2878
|
-
return /* @__PURE__ */ W(
|
|
2879
|
-
/* @__PURE__ */ i(
|
|
2880
|
-
!t && /* @__PURE__ */ W(
|
|
2881
|
-
/* @__PURE__ */ i(
|
|
2882
|
-
/* @__PURE__ */ i(
|
|
2883
|
-
/* @__PURE__ */ i(
|
|
2884
|
-
/* @__PURE__ */ i(
|
|
2923
|
+
}, is = () => {
|
|
2924
|
+
const { isSmallScreen: t } = ke();
|
|
2925
|
+
return /* @__PURE__ */ W(ve, { children: [
|
|
2926
|
+
/* @__PURE__ */ i(br, {}),
|
|
2927
|
+
!t && /* @__PURE__ */ W(ve, { children: [
|
|
2928
|
+
/* @__PURE__ */ i(In, {}),
|
|
2929
|
+
/* @__PURE__ */ i(ro, {}),
|
|
2930
|
+
/* @__PURE__ */ i(ao, {}),
|
|
2931
|
+
/* @__PURE__ */ i(xn, {})
|
|
2885
2932
|
] }),
|
|
2886
|
-
/* @__PURE__ */ i(
|
|
2933
|
+
/* @__PURE__ */ i(rs, {})
|
|
2887
2934
|
] });
|
|
2888
|
-
},
|
|
2935
|
+
}, ss = "_active_1yldl_11", Ue = {
|
|
2889
2936
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_1yldl_1",
|
|
2890
2937
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_1yldl_6",
|
|
2891
|
-
active:
|
|
2938
|
+
active: ss,
|
|
2892
2939
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_1yldl_15",
|
|
2893
2940
|
"rp-zoom-level-icon": "_rp-zoom-level-icon_1yldl_20",
|
|
2894
2941
|
"rp-current-zoom-text": "_rp-current-zoom-text_1yldl_24",
|
|
2895
2942
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_1yldl_28"
|
|
2896
|
-
},
|
|
2897
|
-
const { localeMessages: n } =
|
|
2943
|
+
}, as = ({ zoomLevel: t, className: e }) => {
|
|
2944
|
+
const { localeMessages: n } = he(), r = k(() => {
|
|
2898
2945
|
switch (t) {
|
|
2899
|
-
case
|
|
2946
|
+
case Ze.ACTUAL:
|
|
2900
2947
|
return n == null ? void 0 : n.zoomActualSize;
|
|
2901
|
-
case
|
|
2948
|
+
case Ze.PAGE_FIT:
|
|
2902
2949
|
return n == null ? void 0 : n.zoomPageFit;
|
|
2903
|
-
case
|
|
2950
|
+
case Ze.PAGE_WIDTH:
|
|
2904
2951
|
return n == null ? void 0 : n.zoomPageWidth;
|
|
2905
2952
|
}
|
|
2906
2953
|
return t.toString();
|
|
2907
2954
|
}, [t, n]);
|
|
2908
|
-
return /* @__PURE__ */ i(
|
|
2955
|
+
return /* @__PURE__ */ i(ve, { children: typeof t == "number" ? /* @__PURE__ */ W(vo, { children: [
|
|
2909
2956
|
/* @__PURE__ */ i("span", { className: e, children: t }),
|
|
2910
2957
|
/* @__PURE__ */ i("span", { className: e, children: "%" })
|
|
2911
2958
|
] }) : /* @__PURE__ */ i("span", { className: e, children: r }) });
|
|
2912
|
-
},
|
|
2913
|
-
const { zoomInIcon: t } =
|
|
2914
|
-
return t || e || /* @__PURE__ */ i(
|
|
2915
|
-
},
|
|
2916
|
-
const { zoomOutIcon: t } =
|
|
2917
|
-
return t || e || /* @__PURE__ */ i(
|
|
2918
|
-
},
|
|
2919
|
-
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } =
|
|
2959
|
+
}, cs = [50, 75, 100, 125, 150, 200, 300, 400], ls = () => {
|
|
2960
|
+
const { zoomInIcon: t } = be(), { zoomInIcon: e } = _e();
|
|
2961
|
+
return t || e || /* @__PURE__ */ i(Hr, {});
|
|
2962
|
+
}, ds = () => {
|
|
2963
|
+
const { zoomOutIcon: t } = be(), { zoomOutIcon: e } = _e();
|
|
2964
|
+
return t || e || /* @__PURE__ */ i($r, {});
|
|
2965
|
+
}, us = () => {
|
|
2966
|
+
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } = ht(), { container: r, pagesRef: o } = Ee(), { zoomTool: s = !0 } = Ne(), { zoomTool: a = !0 } = Fe(), { isSmallScreen: d } = ke(), { localeMessages: c } = he(), [m, g] = $(0), [C, u] = $(!1), y = M(
|
|
2920
2967
|
new ResizeObserver((p) => {
|
|
2921
2968
|
g(p[0].contentRect.height);
|
|
2922
2969
|
})
|
|
2923
2970
|
), _ = N(() => {
|
|
2924
2971
|
e(() => {
|
|
2925
2972
|
const p = Math.floor(n * 100 / 25) * 25;
|
|
2926
|
-
return Math.min(p + 25,
|
|
2973
|
+
return Math.min(p + 25, Qt);
|
|
2927
2974
|
});
|
|
2928
2975
|
}, [e, n]), b = N(() => {
|
|
2929
2976
|
e(() => {
|
|
2930
2977
|
const p = Math.ceil(n * 100 / 25) * 25;
|
|
2931
|
-
return Math.min(p - 25,
|
|
2978
|
+
return Math.min(p - 25, Qt);
|
|
2932
2979
|
});
|
|
2933
|
-
}, [e, n]), T = k(() =>
|
|
2934
|
-
return
|
|
2980
|
+
}, [e, n]), T = k(() => Gr(n), [n]), P = k(() => qr(n), [n]);
|
|
2981
|
+
return D(() => (o && y.current.observe(o), () => {
|
|
2935
2982
|
y.current.disconnect();
|
|
2936
|
-
}), [o]), !s || !a ? null : typeof s == "function" ? /* @__PURE__ */ i(s, { zoomLevel: t, setZoomLevel: e }) : typeof a == "function" ? /* @__PURE__ */ i(a, { zoomLevel: t, setZoomLevel: e }) : /* @__PURE__ */ W("div", { className:
|
|
2983
|
+
}), [o]), !s || !a ? null : typeof s == "function" ? /* @__PURE__ */ i(s, { zoomLevel: t, setZoomLevel: e }) : typeof a == "function" ? /* @__PURE__ */ i(a, { zoomLevel: t, setZoomLevel: e }) : /* @__PURE__ */ W("div", { className: Ue["rp-zoom-wrapper"], children: [
|
|
2937
2984
|
/* @__PURE__ */ i(K, { content: c == null ? void 0 : c.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2938
|
-
|
|
2985
|
+
ue,
|
|
2939
2986
|
{
|
|
2940
2987
|
disabled: T,
|
|
2941
2988
|
onClick: b,
|
|
2942
2989
|
"aria-label": c == null ? void 0 : c.zoomOutTooltip,
|
|
2943
|
-
children: /* @__PURE__ */ i(
|
|
2990
|
+
children: /* @__PURE__ */ i(ds, {})
|
|
2944
2991
|
}
|
|
2945
2992
|
) }),
|
|
2946
2993
|
!d && /* @__PURE__ */ i(
|
|
2947
|
-
|
|
2994
|
+
At,
|
|
2948
2995
|
{
|
|
2949
2996
|
container: r,
|
|
2950
2997
|
open: C,
|
|
2951
2998
|
onOpenChange: u,
|
|
2952
2999
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.zoomSelectTooltip, children: /* @__PURE__ */ W(
|
|
2953
|
-
|
|
3000
|
+
ue,
|
|
2954
3001
|
{
|
|
2955
|
-
className:
|
|
2956
|
-
|
|
2957
|
-
C &&
|
|
3002
|
+
className: ae(
|
|
3003
|
+
Ue["rp-current-zoom-wrapper"],
|
|
3004
|
+
C && Ue.active
|
|
2958
3005
|
),
|
|
2959
3006
|
"aria-label": c == null ? void 0 : c.zoomSelectTooltip,
|
|
2960
3007
|
children: [
|
|
2961
3008
|
/* @__PURE__ */ i(
|
|
2962
|
-
|
|
3009
|
+
as,
|
|
2963
3010
|
{
|
|
2964
3011
|
zoomLevel: t,
|
|
2965
|
-
className:
|
|
3012
|
+
className: Ue["rp-current-zoom-text"]
|
|
2966
3013
|
}
|
|
2967
3014
|
),
|
|
2968
|
-
/* @__PURE__ */ i(
|
|
3015
|
+
/* @__PURE__ */ i(Je, { className: Ue["rp-current-zoom-icon"] })
|
|
2969
3016
|
]
|
|
2970
3017
|
}
|
|
2971
3018
|
) }) }),
|
|
@@ -2977,15 +3024,15 @@ const Ee = {
|
|
|
2977
3024
|
"div",
|
|
2978
3025
|
{
|
|
2979
3026
|
style: { maxHeight: `${m}px`, overflow: "auto" },
|
|
2980
|
-
className:
|
|
3027
|
+
className: Ue["rp-zoom-dropdown-content"],
|
|
2981
3028
|
children: [
|
|
2982
|
-
/* @__PURE__ */ W(
|
|
2983
|
-
/* @__PURE__ */ i(
|
|
2984
|
-
/* @__PURE__ */ i(
|
|
2985
|
-
/* @__PURE__ */ i(
|
|
3029
|
+
/* @__PURE__ */ W(ut, { children: [
|
|
3030
|
+
/* @__PURE__ */ i(Ae, { onClick: () => e(Ze.ACTUAL), children: c == null ? void 0 : c.zoomActualSize }),
|
|
3031
|
+
/* @__PURE__ */ i(Ae, { onClick: () => e(Ze.PAGE_FIT), children: c == null ? void 0 : c.zoomPageFit }),
|
|
3032
|
+
/* @__PURE__ */ i(Ae, { onClick: () => e(Ze.PAGE_WIDTH), children: c == null ? void 0 : c.zoomPageWidth })
|
|
2986
3033
|
] }),
|
|
2987
|
-
/* @__PURE__ */ i(
|
|
2988
|
-
/* @__PURE__ */ i(
|
|
3034
|
+
/* @__PURE__ */ i(Ft, {}),
|
|
3035
|
+
/* @__PURE__ */ i(ut, { children: cs.map((p) => /* @__PURE__ */ W(Ae, { onClick: () => e(p), children: [
|
|
2989
3036
|
p,
|
|
2990
3037
|
" %"
|
|
2991
3038
|
] }, p)) })
|
|
@@ -2995,25 +3042,25 @@ const Ee = {
|
|
|
2995
3042
|
}
|
|
2996
3043
|
),
|
|
2997
3044
|
/* @__PURE__ */ i(K, { content: c == null ? void 0 : c.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2998
|
-
|
|
3045
|
+
ue,
|
|
2999
3046
|
{
|
|
3000
3047
|
disabled: P,
|
|
3001
3048
|
onClick: _,
|
|
3002
3049
|
"aria-label": c == null ? void 0 : c.zoomInTooltip,
|
|
3003
|
-
children: /* @__PURE__ */ i(
|
|
3050
|
+
children: /* @__PURE__ */ i(ls, {})
|
|
3004
3051
|
}
|
|
3005
3052
|
) })
|
|
3006
3053
|
] });
|
|
3007
|
-
},
|
|
3008
|
-
const { totalMatches: t, nextMatch: e, prevMatch: n } =
|
|
3009
|
-
return /* @__PURE__ */ W(
|
|
3054
|
+
}, vn = () => {
|
|
3055
|
+
const { totalMatches: t, nextMatch: e, prevMatch: n } = $t(), { localeMessages: r } = he();
|
|
3056
|
+
return /* @__PURE__ */ W(ve, { children: [
|
|
3010
3057
|
/* @__PURE__ */ i(
|
|
3011
3058
|
K,
|
|
3012
3059
|
{
|
|
3013
3060
|
content: r == null ? void 0 : r.searchPrevTooltip,
|
|
3014
3061
|
className: ne["rp-search-tool-result-navigator"],
|
|
3015
|
-
children: /* @__PURE__ */ i(
|
|
3016
|
-
|
|
3062
|
+
children: /* @__PURE__ */ i(ue, { tabIndex: 0, onClick: n, "aria-label": r == null ? void 0 : r.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
3063
|
+
Je,
|
|
3017
3064
|
{
|
|
3018
3065
|
className: ne["rp-search-tool-input-icon"],
|
|
3019
3066
|
"aria-disabled": !t
|
|
@@ -3026,8 +3073,8 @@ const Ee = {
|
|
|
3026
3073
|
{
|
|
3027
3074
|
content: r == null ? void 0 : r.searchNextTooltip,
|
|
3028
3075
|
className: ne["rp-search-tool-result-navigator"],
|
|
3029
|
-
children: /* @__PURE__ */ i(
|
|
3030
|
-
|
|
3076
|
+
children: /* @__PURE__ */ i(ue, { tabIndex: 0, onClick: e, "aria-label": r == null ? void 0 : r.searchNextTooltip, children: /* @__PURE__ */ i(
|
|
3077
|
+
Je,
|
|
3031
3078
|
{
|
|
3032
3079
|
style: { transform: "rotate(180deg" },
|
|
3033
3080
|
className: ne["rp-search-tool-input-icon"],
|
|
@@ -3037,11 +3084,11 @@ const Ee = {
|
|
|
3037
3084
|
}
|
|
3038
3085
|
)
|
|
3039
3086
|
] });
|
|
3040
|
-
},
|
|
3041
|
-
const { searchIcon: t } =
|
|
3042
|
-
return t || e || /* @__PURE__ */ i(
|
|
3043
|
-
},
|
|
3044
|
-
const { container: e } =
|
|
3087
|
+
}, ps = () => {
|
|
3088
|
+
const { searchIcon: t } = be(), { searchIcon: e } = _e();
|
|
3089
|
+
return t || e || /* @__PURE__ */ i(Rn, {});
|
|
3090
|
+
}, hs = ({ icon: t }) => {
|
|
3091
|
+
const { container: e } = Ee(), [n, r] = $(!1), { pdf: o } = re(), [s, a] = $(null), {
|
|
3045
3092
|
searchOptions: d,
|
|
3046
3093
|
setSearchOptions: c,
|
|
3047
3094
|
loading: m,
|
|
@@ -3051,14 +3098,14 @@ const Ee = {
|
|
|
3051
3098
|
nextMatch: y,
|
|
3052
3099
|
prevMatch: _,
|
|
3053
3100
|
search: b
|
|
3054
|
-
} =
|
|
3101
|
+
} = $t(), { searchTool: T = !0 } = Ne(), { searchTool: P = !0 } = Fe(), [p, h] = $(b), { localeMessages: f } = he(), { isSmallScreen: l } = ke(), [v, w] = $(null), [I, S] = $(!1), x = N(() => {
|
|
3055
3102
|
r(!0);
|
|
3056
3103
|
}, []), L = N(() => {
|
|
3057
3104
|
g(""), h(""), r(!1);
|
|
3058
3105
|
}, [g]), O = (q) => {
|
|
3059
|
-
const
|
|
3060
|
-
(
|
|
3061
|
-
},
|
|
3106
|
+
const j = q.key === "Enter", Y = q.key === " ";
|
|
3107
|
+
(j || Y) && L();
|
|
3108
|
+
}, z = N(
|
|
3062
3109
|
(q) => {
|
|
3063
3110
|
q.key === "Escape" && n && L();
|
|
3064
3111
|
},
|
|
@@ -3069,15 +3116,15 @@ const Ee = {
|
|
|
3069
3116
|
},
|
|
3070
3117
|
[p, _, y, g, b]
|
|
3071
3118
|
);
|
|
3072
|
-
|
|
3119
|
+
D(() => {
|
|
3073
3120
|
h(b);
|
|
3074
|
-
}, [b]),
|
|
3075
|
-
b && o &&
|
|
3076
|
-
}, [b, o]),
|
|
3121
|
+
}, [b]), D(() => {
|
|
3122
|
+
b && o && S(!0);
|
|
3123
|
+
}, [b, o]), D(() => {
|
|
3077
3124
|
b && b.trim() !== "" && (h(b), g(b));
|
|
3078
|
-
}, []),
|
|
3079
|
-
window.removeEventListener("keydown",
|
|
3080
|
-
}), [
|
|
3125
|
+
}, []), D(() => (window.addEventListener("keydown", z), () => {
|
|
3126
|
+
window.removeEventListener("keydown", z);
|
|
3127
|
+
}), [z]), D(() => {
|
|
3081
3128
|
s && setTimeout(() => {
|
|
3082
3129
|
s.focus();
|
|
3083
3130
|
}, 0);
|
|
@@ -3086,46 +3133,46 @@ const Ee = {
|
|
|
3086
3133
|
h(q.target.value);
|
|
3087
3134
|
}, []), R = N(() => {
|
|
3088
3135
|
h(""), g("");
|
|
3089
|
-
}, [g]), A = k(() => `${u} / ${C}`, [u, C]), { wholeWords: G, matchCase: H } = k(() => d, [d]),
|
|
3136
|
+
}, [g]), A = k(() => `${u} / ${C}`, [u, C]), { wholeWords: G, matchCase: H } = k(() => d, [d]), V = N(
|
|
3090
3137
|
(q) => {
|
|
3091
|
-
c((
|
|
3138
|
+
c((j) => ({ ...j, matchCase: q }));
|
|
3092
3139
|
},
|
|
3093
3140
|
[c]
|
|
3094
3141
|
), X = N(
|
|
3095
3142
|
(q) => {
|
|
3096
|
-
c((
|
|
3143
|
+
c((j) => ({ ...j, wholeWords: q }));
|
|
3097
3144
|
},
|
|
3098
3145
|
[c]
|
|
3099
3146
|
);
|
|
3100
|
-
|
|
3147
|
+
D(() => {
|
|
3101
3148
|
o && I && L();
|
|
3102
3149
|
}, [o, L]);
|
|
3103
|
-
const
|
|
3150
|
+
const B = k(() => (v == null ? void 0 : v.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [v]), se = N(
|
|
3104
3151
|
(q) => {
|
|
3105
3152
|
if (q.key === "Tab") {
|
|
3106
|
-
const
|
|
3153
|
+
const j = document.activeElement;
|
|
3107
3154
|
let Y = 0;
|
|
3108
|
-
|
|
3109
|
-
ee ===
|
|
3155
|
+
B.forEach((ee, Te) => {
|
|
3156
|
+
ee === j && (Y = Te);
|
|
3110
3157
|
});
|
|
3111
3158
|
let te = Y + 1;
|
|
3112
3159
|
q.shiftKey && (te = Y - 1);
|
|
3113
|
-
const J =
|
|
3160
|
+
const J = B[te];
|
|
3114
3161
|
if (J)
|
|
3115
3162
|
J.focus();
|
|
3116
|
-
else if (te >
|
|
3117
|
-
const ee =
|
|
3163
|
+
else if (te > B.length - 1) {
|
|
3164
|
+
const ee = B[0];
|
|
3118
3165
|
ee && ee.focus();
|
|
3119
3166
|
} else {
|
|
3120
|
-
const ee =
|
|
3167
|
+
const ee = B[B.length - 1];
|
|
3121
3168
|
ee && ee.focus();
|
|
3122
3169
|
}
|
|
3123
3170
|
}
|
|
3124
3171
|
},
|
|
3125
|
-
[
|
|
3172
|
+
[B]
|
|
3126
3173
|
);
|
|
3127
|
-
return !T || !P ? null : /* @__PURE__ */ i(
|
|
3128
|
-
|
|
3174
|
+
return !T || !P ? null : /* @__PURE__ */ i(ve, { children: /* @__PURE__ */ i(
|
|
3175
|
+
At,
|
|
3129
3176
|
{
|
|
3130
3177
|
open: n,
|
|
3131
3178
|
container: e,
|
|
@@ -3134,12 +3181,12 @@ const Ee = {
|
|
|
3134
3181
|
tabIndex: 0,
|
|
3135
3182
|
avoidCollisions: !1,
|
|
3136
3183
|
triggerComponent: /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(
|
|
3137
|
-
|
|
3184
|
+
ue,
|
|
3138
3185
|
{
|
|
3139
3186
|
active: n,
|
|
3140
|
-
onClick:
|
|
3187
|
+
onClick: x,
|
|
3141
3188
|
"aria-label": f == null ? void 0 : f.searchButtonTooltip,
|
|
3142
|
-
children: t || /* @__PURE__ */ i(
|
|
3189
|
+
children: t || /* @__PURE__ */ i(ps, {})
|
|
3143
3190
|
}
|
|
3144
3191
|
) }),
|
|
3145
3192
|
children: /* @__PURE__ */ W(
|
|
@@ -3148,44 +3195,44 @@ const Ee = {
|
|
|
3148
3195
|
ref: w,
|
|
3149
3196
|
className: ne["rp-search-tool-content"],
|
|
3150
3197
|
tabIndex: 0,
|
|
3151
|
-
onKeyDown:
|
|
3198
|
+
onKeyDown: se,
|
|
3152
3199
|
children: [
|
|
3153
3200
|
/* @__PURE__ */ W("div", { className: ne["rp-search-tool-input-wrapper"], children: [
|
|
3154
3201
|
/* @__PURE__ */ W("div", { className: ne["rp-search-tool-input"], children: [
|
|
3155
3202
|
/* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
3156
|
-
|
|
3203
|
+
Tn,
|
|
3157
3204
|
{
|
|
3158
3205
|
value: p,
|
|
3159
3206
|
onKeyDown: F,
|
|
3160
3207
|
onChange: E,
|
|
3161
|
-
icon: /* @__PURE__ */ i(
|
|
3208
|
+
icon: /* @__PURE__ */ i(Rn, {}),
|
|
3162
3209
|
placeholder: f == null ? void 0 : f.searchInputPlaceholder,
|
|
3163
3210
|
className: ne["rp-search-input"],
|
|
3164
3211
|
ref: a,
|
|
3165
3212
|
id: "search-input",
|
|
3166
3213
|
name: "search-input",
|
|
3167
3214
|
tabIndex: 0,
|
|
3168
|
-
children: !!p && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: R, children: /* @__PURE__ */ i(
|
|
3215
|
+
children: !!p && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: R, children: /* @__PURE__ */ i(Ur, {}) })
|
|
3169
3216
|
}
|
|
3170
3217
|
) }),
|
|
3171
|
-
m ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
3172
|
-
l && /* @__PURE__ */ i("div", { className: ne["rp-search-tool-controls"], children: /* @__PURE__ */ i(
|
|
3218
|
+
m ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(yn, { className: ne["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: A }),
|
|
3219
|
+
l && /* @__PURE__ */ i("div", { className: ne["rp-search-tool-controls"], children: /* @__PURE__ */ i(jt, { onKeyPress: O, handleClose: L }) })
|
|
3173
3220
|
] }),
|
|
3174
3221
|
/* @__PURE__ */ W("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
3175
|
-
l && /* @__PURE__ */ i(
|
|
3222
|
+
l && /* @__PURE__ */ i(vn, {}),
|
|
3176
3223
|
/* @__PURE__ */ i(
|
|
3177
|
-
|
|
3224
|
+
Kt,
|
|
3178
3225
|
{
|
|
3179
3226
|
tabIndex: 0,
|
|
3180
3227
|
name: "matchCase",
|
|
3181
3228
|
value: H,
|
|
3182
|
-
onChange:
|
|
3229
|
+
onChange: V,
|
|
3183
3230
|
children: f == null ? void 0 : f.searchMatchCaseLabel
|
|
3184
3231
|
}
|
|
3185
3232
|
),
|
|
3186
|
-
!l && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(
|
|
3233
|
+
!l && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(en, {}) }) }),
|
|
3187
3234
|
/* @__PURE__ */ i(
|
|
3188
|
-
|
|
3235
|
+
Kt,
|
|
3189
3236
|
{
|
|
3190
3237
|
tabIndex: 0,
|
|
3191
3238
|
name: "wholeWord",
|
|
@@ -3194,79 +3241,79 @@ const Ee = {
|
|
|
3194
3241
|
children: f == null ? void 0 : f.searchWholeWordsLabel
|
|
3195
3242
|
}
|
|
3196
3243
|
),
|
|
3197
|
-
!l && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { tabIndex: 0, className: ne["rp-search-icon-info"], children: /* @__PURE__ */ i(
|
|
3244
|
+
!l && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { tabIndex: 0, className: ne["rp-search-icon-info"], children: /* @__PURE__ */ i(en, {}) }) })
|
|
3198
3245
|
] })
|
|
3199
3246
|
] }),
|
|
3200
3247
|
!l && /* @__PURE__ */ W("div", { className: ne["rp-search-tool-controls"], children: [
|
|
3201
|
-
/* @__PURE__ */ i(
|
|
3202
|
-
/* @__PURE__ */ i(
|
|
3248
|
+
/* @__PURE__ */ i(vn, {}),
|
|
3249
|
+
/* @__PURE__ */ i(jt, { onKeyPress: O, handleClose: L })
|
|
3203
3250
|
] })
|
|
3204
3251
|
]
|
|
3205
3252
|
}
|
|
3206
3253
|
)
|
|
3207
3254
|
}
|
|
3208
3255
|
) });
|
|
3209
|
-
},
|
|
3256
|
+
}, fs = "_loading_wazy2_1", Ve = {
|
|
3210
3257
|
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
3211
3258
|
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
3212
3259
|
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
3213
3260
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
|
|
3214
3261
|
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
3215
3262
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
3216
|
-
loading:
|
|
3217
|
-
},
|
|
3218
|
-
const { cancel: e } =
|
|
3219
|
-
return t < 1 ? null : /* @__PURE__ */ i("div", { className:
|
|
3220
|
-
/* @__PURE__ */ W("div", { className:
|
|
3263
|
+
loading: fs
|
|
3264
|
+
}, ms = ({ percentage: t }) => {
|
|
3265
|
+
const { cancel: e } = vt(), { localeMessages: n } = he();
|
|
3266
|
+
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ae(Ve["rp-loading-overlay"]), children: /* @__PURE__ */ W("div", { className: ae(Ve["rp-loading-modal"]), children: [
|
|
3267
|
+
/* @__PURE__ */ W("div", { className: ae(Ve["rp-loading-title"]), children: [
|
|
3221
3268
|
n == null ? void 0 : n.printLoadingMessage,
|
|
3222
3269
|
"..."
|
|
3223
3270
|
] }),
|
|
3224
|
-
/* @__PURE__ */ i("div", { className:
|
|
3271
|
+
/* @__PURE__ */ i("div", { className: ae(Ve["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
3225
3272
|
"div",
|
|
3226
3273
|
{
|
|
3227
|
-
className:
|
|
3274
|
+
className: ae(Ve["rp-loading-progress"]),
|
|
3228
3275
|
style: { width: `${t}%` }
|
|
3229
3276
|
}
|
|
3230
3277
|
) }),
|
|
3231
|
-
/* @__PURE__ */ i("button", { className:
|
|
3278
|
+
/* @__PURE__ */ i("button", { className: ae(Ve["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
3232
3279
|
] }) });
|
|
3233
|
-
},
|
|
3234
|
-
const { showPrintProgress: n = !0 } =
|
|
3280
|
+
}, gs = gt((t, e) => {
|
|
3281
|
+
const { showPrintProgress: n = !0 } = Ne(), { showPrintProgress: r = !0 } = Fe(), { progress: o, showDefaultProgress: s } = vt(), { isSmallScreen: a } = ke(), { percentage: d } = o || {}, c = () => a ? { gridTemplateColumns: "25% 60% 15%" } : void 0, m = () => {
|
|
3235
3282
|
if (!(!(s ?? (n && r)) || !d))
|
|
3236
|
-
return /* @__PURE__ */ i(
|
|
3283
|
+
return /* @__PURE__ */ i(ms, { percentage: d });
|
|
3237
3284
|
};
|
|
3238
3285
|
return /* @__PURE__ */ W("div", { children: [
|
|
3239
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className:
|
|
3240
|
-
/* @__PURE__ */ W("div", { "data-rp": "topBarLeft", className:
|
|
3241
|
-
/* @__PURE__ */ i(
|
|
3242
|
-
/* @__PURE__ */ i(
|
|
3286
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: Xe["rp-toolbar-content"], children: /* @__PURE__ */ W("div", { className: Xe["rp-toolbar-wrapper"], style: c(), children: [
|
|
3287
|
+
/* @__PURE__ */ W("div", { "data-rp": "topBarLeft", className: Xe["rp-toolbar-start"], children: [
|
|
3288
|
+
/* @__PURE__ */ i(hs, {}),
|
|
3289
|
+
/* @__PURE__ */ i(Ri, {})
|
|
3243
3290
|
] }),
|
|
3244
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className:
|
|
3245
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className:
|
|
3291
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Xe["rp-toolbar-middle"], children: /* @__PURE__ */ i(us, {}) }),
|
|
3292
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Xe["rp-toolbar-end"], children: /* @__PURE__ */ i(is, {}) })
|
|
3246
3293
|
] }) }),
|
|
3247
3294
|
/* @__PURE__ */ i(m, {})
|
|
3248
3295
|
] });
|
|
3249
|
-
}),
|
|
3296
|
+
}), Rt = {
|
|
3250
3297
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1bqgz_1",
|
|
3251
3298
|
"rp-sidebar-content": "_rp-sidebar-content_1bqgz_1",
|
|
3252
3299
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1bqgz_16"
|
|
3253
|
-
},
|
|
3300
|
+
}, Qe = {
|
|
3254
3301
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
3255
3302
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
3256
3303
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
3257
3304
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3258
3305
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3259
|
-
},
|
|
3260
|
-
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } =
|
|
3306
|
+
}, vs = (t) => {
|
|
3307
|
+
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = fe(), { pageRotate: s } = mt(), a = M(null), d = Fn(), { pages: c } = re(), [m, g] = $(null), C = M(!1), u = M(), y = k(() => n ? Qe["rp-thumbnail-active"] : "", [n]), _ = k(() => ({
|
|
3261
3308
|
width: Math.round(r.width),
|
|
3262
3309
|
height: Math.round(r.height)
|
|
3263
3310
|
}), [r]), b = N(() => {
|
|
3264
3311
|
e && o(e);
|
|
3265
3312
|
}, [o, e]);
|
|
3266
|
-
return
|
|
3313
|
+
return D(() => {
|
|
3267
3314
|
const T = c.get(e);
|
|
3268
3315
|
u.current === T || (g(null), u.current = T);
|
|
3269
|
-
}, [c, e]),
|
|
3316
|
+
}, [c, e]), D(() => {
|
|
3270
3317
|
const T = c.get(e);
|
|
3271
3318
|
if (!a.current || !e || !T || m)
|
|
3272
3319
|
return;
|
|
@@ -3308,7 +3355,7 @@ const Ee = {
|
|
|
3308
3355
|
{
|
|
3309
3356
|
onClick: b,
|
|
3310
3357
|
id: `page-${e}`,
|
|
3311
|
-
className:
|
|
3358
|
+
className: Qe["rp-thumbnail-wrapper"],
|
|
3312
3359
|
ref: a,
|
|
3313
3360
|
children: [
|
|
3314
3361
|
/* @__PURE__ */ i(
|
|
@@ -3317,7 +3364,7 @@ const Ee = {
|
|
|
3317
3364
|
style: {
|
|
3318
3365
|
transform: `rotate(${s[e || 0]}deg)`
|
|
3319
3366
|
},
|
|
3320
|
-
className:
|
|
3367
|
+
className: ae(y, Qe["rp-thumbnail"]),
|
|
3321
3368
|
children: m ? /* @__PURE__ */ i(
|
|
3322
3369
|
"img",
|
|
3323
3370
|
{
|
|
@@ -3329,39 +3376,39 @@ const Ee = {
|
|
|
3329
3376
|
) : /* @__PURE__ */ i(
|
|
3330
3377
|
"div",
|
|
3331
3378
|
{
|
|
3332
|
-
className:
|
|
3379
|
+
className: Qe["rp-thumbnail-loader"],
|
|
3333
3380
|
style: {
|
|
3334
3381
|
width: `${_.width}px`,
|
|
3335
3382
|
height: `${_.height}px`
|
|
3336
3383
|
},
|
|
3337
|
-
children: /* @__PURE__ */ i(
|
|
3384
|
+
children: /* @__PURE__ */ i(yn, {})
|
|
3338
3385
|
}
|
|
3339
3386
|
)
|
|
3340
3387
|
}
|
|
3341
3388
|
),
|
|
3342
|
-
/* @__PURE__ */ i("div", { className:
|
|
3389
|
+
/* @__PURE__ */ i("div", { className: Qe["rp-thumbnail-text"], children: e })
|
|
3343
3390
|
]
|
|
3344
3391
|
}
|
|
3345
3392
|
);
|
|
3346
|
-
},
|
|
3393
|
+
}, wn = {
|
|
3347
3394
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
3348
3395
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
3349
|
-
},
|
|
3396
|
+
}, ws = 16, _s = (t, e) => {
|
|
3350
3397
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3351
|
-
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
3352
|
-
},
|
|
3353
|
-
const { show: n, width: r } = t, { focusedPage: o, totalPages: s } =
|
|
3354
|
-
|
|
3398
|
+
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - ws);
|
|
3399
|
+
}, bs = gt((t, e) => {
|
|
3400
|
+
const { show: n, width: r } = t, { focusedPage: o, totalPages: s } = fe(), { thumbnailPages: a, addPage: d, thumbnailLength: c, addToPage: m } = Dn(), g = M(null), C = M(1);
|
|
3401
|
+
_n(e, () => g.current);
|
|
3355
3402
|
const u = k(() => Object.values(a), [a]), y = N(() => {
|
|
3356
3403
|
const _ = c + 1;
|
|
3357
3404
|
_ <= s && d(_);
|
|
3358
3405
|
}, [d, s, c]);
|
|
3359
|
-
return
|
|
3360
|
-
o > c && s > c ? m(o) : n && C.current !== o && (
|
|
3361
|
-
}, [o, c, m, n, u]),
|
|
3406
|
+
return D(() => {
|
|
3407
|
+
o > c && s > c ? m(o) : n && C.current !== o && (_s(g.current, o), C.current = o);
|
|
3408
|
+
}, [o, c, m, n, u]), Jo(g.current, y), /* @__PURE__ */ i("div", { ref: g, className: wn["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ i("div", { className: wn["rp-thumbnails"], children: n ? u.map((_, b) => {
|
|
3362
3409
|
var T, P;
|
|
3363
3410
|
return /* @__PURE__ */ i(
|
|
3364
|
-
|
|
3411
|
+
vs,
|
|
3365
3412
|
{
|
|
3366
3413
|
isFocused: o === ((T = _.page) == null ? void 0 : T.pageNumber),
|
|
3367
3414
|
pageNumber: (P = _.page) == null ? void 0 : P.pageNumber,
|
|
@@ -3372,39 +3419,39 @@ const Ee = {
|
|
|
3372
3419
|
b
|
|
3373
3420
|
);
|
|
3374
3421
|
}) : null }) });
|
|
3375
|
-
}),
|
|
3376
|
-
const { thumbnailIcon: t } =
|
|
3377
|
-
return t || e || /* @__PURE__ */ i(
|
|
3378
|
-
},
|
|
3379
|
-
const { active: t, setActive: e } =
|
|
3422
|
+
}), Ts = () => {
|
|
3423
|
+
const { thumbnailIcon: t } = be(), { thumbnailIcon: e } = _e();
|
|
3424
|
+
return t || e || /* @__PURE__ */ i(qo, {});
|
|
3425
|
+
}, Cs = () => {
|
|
3426
|
+
const { active: t, setActive: e } = Dn(), [n, r] = $(er), o = M(null), s = M(null), { thumbnailTool: a, sidebarEnable: d } = Ne(), { localeMessages: c } = he(), m = N(() => {
|
|
3380
3427
|
e((C) => !C);
|
|
3381
3428
|
}, []), g = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: m, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
3382
|
-
|
|
3429
|
+
ue,
|
|
3383
3430
|
{
|
|
3384
3431
|
onClick: m,
|
|
3385
3432
|
active: t,
|
|
3386
3433
|
"aria-label": c == null ? void 0 : c.thumbnailTooltip,
|
|
3387
|
-
children: /* @__PURE__ */ i(
|
|
3434
|
+
children: /* @__PURE__ */ i(Ts, {})
|
|
3388
3435
|
}
|
|
3389
3436
|
) }) : null, [a, t, m, c]);
|
|
3390
|
-
return /* @__PURE__ */ i(
|
|
3437
|
+
return /* @__PURE__ */ i(ve, { children: d && /* @__PURE__ */ W(
|
|
3391
3438
|
"div",
|
|
3392
3439
|
{
|
|
3393
3440
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
3394
|
-
className:
|
|
3441
|
+
className: Rt["rp-sidebar-content-wrapper"],
|
|
3395
3442
|
"data-rp": "sidebar",
|
|
3396
3443
|
children: [
|
|
3397
|
-
/* @__PURE__ */ i("div", { ref: s, className:
|
|
3444
|
+
/* @__PURE__ */ i("div", { ref: s, className: Rt["rp-sidebar-content"], children: g }),
|
|
3398
3445
|
/* @__PURE__ */ W(
|
|
3399
3446
|
"div",
|
|
3400
3447
|
{
|
|
3401
3448
|
"data-rp": "thumbnailSidebar",
|
|
3402
3449
|
hidden: !t,
|
|
3403
|
-
className:
|
|
3450
|
+
className: Rt["rp-thumbnails-wrapper"],
|
|
3404
3451
|
children: [
|
|
3405
|
-
/* @__PURE__ */ i(
|
|
3452
|
+
/* @__PURE__ */ i(bs, { show: t, ref: o }),
|
|
3406
3453
|
/* @__PURE__ */ i(
|
|
3407
|
-
|
|
3454
|
+
Zo,
|
|
3408
3455
|
{
|
|
3409
3456
|
onWidthChange: r,
|
|
3410
3457
|
thumbnailRef: o,
|
|
@@ -3417,7 +3464,7 @@ const Ee = {
|
|
|
3417
3464
|
]
|
|
3418
3465
|
}
|
|
3419
3466
|
) });
|
|
3420
|
-
},
|
|
3467
|
+
}, xc = wo((t, e) => {
|
|
3421
3468
|
const {
|
|
3422
3469
|
children: n,
|
|
3423
3470
|
slots: r,
|
|
@@ -3428,30 +3475,30 @@ const Ee = {
|
|
|
3428
3475
|
onLoaded: c,
|
|
3429
3476
|
cleanupOnLoaded: m,
|
|
3430
3477
|
onLayoutWidthChange: g
|
|
3431
|
-
} = t, [C, u] = $(null), { setContainer: y, setContentRef: _ } =
|
|
3432
|
-
return
|
|
3478
|
+
} = t, [C, u] = $(null), { setContainer: y, setContentRef: _ } = Ee(), { loading: b } = re(), { LoaderImageComponent: T } = zt();
|
|
3479
|
+
return D(() => (c && c(), () => {
|
|
3433
3480
|
m && m();
|
|
3434
3481
|
}), [c, m]), // TODO: deprecated in v2.0.0, remove later ~
|
|
3435
|
-
/* @__PURE__ */ i(
|
|
3436
|
-
/* @__PURE__ */ W(
|
|
3437
|
-
/* @__PURE__ */ W("div", { className:
|
|
3482
|
+
/* @__PURE__ */ i(Hn, { toolbarRef: C, ref: e, children: /* @__PURE__ */ i(Vo, { mobileWidth: d, onLayoutWidthChange: g, children: /* @__PURE__ */ i(Bo, { slots: r, children: /* @__PURE__ */ i(Qo, { icons: o, children: /* @__PURE__ */ W(Uo, { getContainerRef: y, style: s, className: a, children: [
|
|
3483
|
+
/* @__PURE__ */ W(jo, { children: [
|
|
3484
|
+
/* @__PURE__ */ W("div", { className: ze["rp-layout"], children: [
|
|
3438
3485
|
/* @__PURE__ */ i(
|
|
3439
|
-
|
|
3486
|
+
gs,
|
|
3440
3487
|
{
|
|
3441
3488
|
ref: u
|
|
3442
3489
|
}
|
|
3443
3490
|
),
|
|
3444
|
-
/* @__PURE__ */ W("div", { className:
|
|
3445
|
-
/* @__PURE__ */ i("div", { className:
|
|
3446
|
-
/* @__PURE__ */ i("div", { ref: _, className:
|
|
3491
|
+
/* @__PURE__ */ W("div", { className: ze["rp-content"], children: [
|
|
3492
|
+
/* @__PURE__ */ i("div", { className: ze["rp-sidebar"], children: /* @__PURE__ */ i(Cs, {}) }),
|
|
3493
|
+
/* @__PURE__ */ i("div", { ref: _, className: ze["rp-pages"], children: n })
|
|
3447
3494
|
] })
|
|
3448
3495
|
] }),
|
|
3449
|
-
/* @__PURE__ */ i(
|
|
3496
|
+
/* @__PURE__ */ i(Xo, {})
|
|
3450
3497
|
] }),
|
|
3451
3498
|
b ? /* @__PURE__ */ i(
|
|
3452
3499
|
"div",
|
|
3453
3500
|
{
|
|
3454
|
-
className:
|
|
3501
|
+
className: ze["rp-loader"],
|
|
3455
3502
|
style: {
|
|
3456
3503
|
position: "absolute",
|
|
3457
3504
|
top: 0,
|
|
@@ -3477,7 +3524,7 @@ const Ee = {
|
|
|
3477
3524
|
}
|
|
3478
3525
|
) : null
|
|
3479
3526
|
] }) }) }) }) });
|
|
3480
|
-
}),
|
|
3527
|
+
}), Sc = {
|
|
3481
3528
|
"rp-toolbar-layout": "_rp-toolbar-layout_vwobs_1",
|
|
3482
3529
|
"rp-content": "_rp-content_vwobs_7",
|
|
3483
3530
|
"rp-topbar-content": "_rp-topbar-content_vwobs_13",
|
|
@@ -3486,59 +3533,59 @@ const Ee = {
|
|
|
3486
3533
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_vwobs_37"
|
|
3487
3534
|
};
|
|
3488
3535
|
export {
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3536
|
+
vs as $,
|
|
3537
|
+
On as A,
|
|
3538
|
+
jr as B,
|
|
3539
|
+
zn as C,
|
|
3540
|
+
Bi as D,
|
|
3541
|
+
An as E,
|
|
3542
|
+
Fn as F,
|
|
3543
|
+
Kr as G,
|
|
3544
|
+
Yr as H,
|
|
3545
|
+
ti as I,
|
|
3546
|
+
oi as J,
|
|
3547
|
+
Gt as K,
|
|
3548
|
+
Hn as L,
|
|
3549
|
+
_i as M,
|
|
3550
|
+
Ci as N,
|
|
3551
|
+
Pi as O,
|
|
3552
|
+
wc as P,
|
|
3553
|
+
yi as Q,
|
|
3554
|
+
Pc as R,
|
|
3555
|
+
hs as S,
|
|
3556
|
+
bc as T,
|
|
3557
|
+
ro as U,
|
|
3558
|
+
ao as V,
|
|
3559
|
+
os as W,
|
|
3560
|
+
rs as X,
|
|
3561
|
+
vn as Y,
|
|
3562
|
+
as as Z,
|
|
3563
|
+
gs as _,
|
|
3564
|
+
xc as a,
|
|
3565
|
+
Cs as a0,
|
|
3566
|
+
to as b,
|
|
3567
|
+
vt as c,
|
|
3568
|
+
$t as d,
|
|
3569
|
+
Tc as e,
|
|
3570
|
+
Cc as f,
|
|
3571
|
+
_c as g,
|
|
3572
|
+
Dn as h,
|
|
3573
|
+
St as i,
|
|
3574
|
+
Ue as j,
|
|
3575
|
+
Xe as k,
|
|
3576
|
+
Ri as l,
|
|
3577
|
+
us as m,
|
|
3578
|
+
is as n,
|
|
3579
|
+
Sc as o,
|
|
3580
|
+
bs as p,
|
|
3581
|
+
ms as q,
|
|
3582
|
+
Zi as r,
|
|
3583
|
+
es as s,
|
|
3584
|
+
Ln as t,
|
|
3585
|
+
fe as u,
|
|
3586
|
+
Vr as v,
|
|
3587
|
+
En as w,
|
|
3588
|
+
Br as x,
|
|
3589
|
+
Nn as y,
|
|
3590
|
+
Zr as z
|
|
3544
3591
|
};
|